summaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)Author
2008-09-13* include/ruby/oniguruma.hakr
(onigenc_get_right_adjust_char_head_with_prev): add end argument. * regenc.c (onigenc_get_right_adjust_char_head_with_prev): use end argument. * regexec.c (forward_search_range): follow the interface change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19331 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-13* include/ruby/oniguruma.h (onigenc_get_right_adjust_char_head): addakr
end argument. * include/ruby/encoding.h (rb_enc_right_char_head): add end argument. * regenc.c (onigenc_get_right_adjust_char_head): use end argument. * re.c (rb_reg_adjust_startpos): follow the interface change. * string.c (rb_str_index): ditto. * regexec.c (backward_search_range): ditto. (onig_search): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19330 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-12comment modified.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19302 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-11* include/ruby/oniguruma.h (OnigCodePoint): unsigned long to unsigned int.naruse
* include/ruby/encoding.h (rb_enc_codepoint): ditto. * encoding.c (rb_enc_codepoint): signed int to unsigned int. * encoding.c (rb_enc_ascget): ditto. * string.c (rb_str_casecmp): ditto. * string.c (enc_succ_alnum_char): ditto. * string.c (rb_str_inspect): ditto. * string.c (rb_str_upcase_bang): ditto. * string.c (rb_str_downcase_bang): ditto. * string.c (rb_str_capitalize_bang): ditto. * string.c (rb_str_swapcase_bang): ditto. * string.c (struct tr): ditto. * string.c (trnext): ditto. * string.c (tr_trans): ditto. * string.c (tr_setup_table): ditto. * string.c (tr_find): ditto. * string.c (rb_str_delete_bang): ditto. * string.c (rb_str_squeeze_bang): ditto. * string.c (rb_str_count): ditto. * string.c (rb_str_split_m): ditto. * string.c (rb_str_each_line): ditto. * string.c (rb_str_lstrip_bang): ditto. * string.c (rb_str_rstrip_bang): ditto. * string.c (rb_str_intern): ditto. * dir.c (char_casecmp): ditto. * sprintf.c (rb_str_format): ditto. * enc/emacs_mule.c (mbc_to_code): to be 32bit clean. * enc/emacs_mule.c (code_to_mbc): ditto. * enc/gb18030.c (mbc_to_code): ditto. * enc/gb18030.c (code_to_mbc): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19295 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-09* include/ruby/encoding.h (econv_after_output): renamed fromakr
econv_output_followed_by_input. (ECONV_AFTER_OUTPUT): renamed from ECONV_OUTPUT_FOLLOWED_BY_INPUT. * transcode.c: follow the renaming. * io.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19278 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-09* include/ruby/io.h (rb_io_t): rename field: writeconv_stateless toakr
writeconv_asciicompat. * io.c: follow the renaming. * gc.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19274 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-09* include/ruby/encoding.h (ECONV_DECORATOR_MASK): mergeakr
ECONV_ENCODER_MASK and ECONV_DECORATOR_MASK. (ECONV_UNIVERSAL_NEWLINE_DECORATOR): renamed from ECONV_UNIVERSAL_NEWLINE_DECODER. (ECONV_CRLF_NEWLINE_DECORATOR): renamed from ECONV_CRLF_NEWLINE_ENCODER. (ECONV_CR_NEWLINE_DECORATOR): renamed from ECONV_CR_NEWLINE_ENCODER. (ECONV_XML_TEXT_DECORATOR): renamed from ECONV_XML_TEXT_ENCODER. (ECONV_XML_ATTR_CONTENT_DECORATOR): renamed from ECONV_XML_ATTR_CONTENT_ENCODER. (ECONV_STATEFUL_DECORATOR_MASK): renamed from ECONV_STATEFUL_ENCODER_MASK. (ECONV_XML_ATTR_QUOTE_DECORATOR): renamed from ECONV_XML_ATTR_CONTENT_DECORATOR. * io.c: follow the renaming. * transcode.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19271 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-09fix typos.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19270 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-08* include/ruby/encoding.h (rb_econv_decorate_at_first): declared.akr
(rb_econv_decorate_at_last): declared. * transcode.c (rb_econv_open_by_transcoder_entries): initialize replacement_enc. allocate outbuf for the last transcoder. (rb_econv_open0): extracted from rb_econv_open. (rb_econv_open): use rb_econv_open0 and decorate the result using rb_econv_decorate_at_first and rb_econv_decorate_at_last. (rb_econv_decorate_at): new function. (rb_econv_decorate_at_first): ditto. (rb_econv_decorate_at_last): ditto. (rb_econv_binmode): fix iteration end condition. (econv_init): don't set source_encoding_name and destination_encoding_name because they are set in rb_econv_open0. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19262 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-08* include/ruby/encoding.h (rb_econv_asciicompat_encoding): renamedakr
from rb_econv_stateless_encoding to apply stateless ASCII incompatible encodings such as UTF-16BE. * io.c (make_writeconv): use rb_econv_asciicompat_encoding. * transcode_data.h (rb_transcoder_asciicompat_type_t): renamed from rb_transcoder_stateful_type_t. (rb_transcoder): use rb_transcoder_asciicompat_type_t. * transcode.c: follow the type change. (asciicompat_encoding_i): renamed from stateless_encoding_i. (rb_econv_asciicompat_encoding): renamed from rb_econv_stateless_encoding. (econv_s_asciicompat_encoding): method renamed. * tool/transcode-tblgen.rb: follow the type change. * enc/trans/utf_16_32.trans: follow the type change. rb_from_UTF_16BE to UTF-8 is asciicompat_decoder. rb_from_UTF_16LE to UTF-8 is asciicompat_decoder. rb_from_UTF_32BE to UTF-8 is asciicompat_decoder. rb_from_UTF_32LE to UTF-8 is asciicompat_decoder. UTF-8 to rb_to_UTF_16BE is asciicompat_encoder. UTF-8 to rb_to_UTF_16LE is asciicompat_encoder. UTF-8 to rb_to_UTF_32BE is asciicompat_encoder. UTF-8 to rb_to_UTF_32LE is asciicompat_encoder. * enc/trans/newline.trans: follow the type change. universal newline decoder is asciicompat_converter. * enc/trans/escape.trans: follow the type change. * enc/trans/iso2022.trans: ditto. * enc/trans/japanese.trans: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19249 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-07* include/ruby/encoding.h (rb_econv_set_replacement): renamed fromakr
rb_econv_set_replacemenet. * transcode.c: follow the renaming. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19227 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-07* include/ruby/encoding.h (ECONV_XML_ATTR_CONTENT_ENCODER): defined.akr
(ECONV_STATEFUL_ENCODER_MASK): defined. (ECONV_XML_ATTR_QUOTE_ENCODER): defined. (ECONV_XML_ATTR_ENCODER): removed. * enc/trans/escape.trans (rb_escape_xml_attr_content): defined. (rb_escape_xml_attr_quote): defined. (rb_escape_xml_attr): removed. * io.c (NEED_WRITECONV): writeconv is required if supplemental converter is used. (make_writeconv): apply stateful encoder in writeconv. * transcode.c: follow the constant change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19209 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-06* include/ruby/encoding.h (ECONV_ERROR_HANDLER_MASK): defined.akr
(ECONV_DECODER_MASK): defined. (ECONV_ENCODER_MASK): defined. * io.c (make_writeconv): restrict ecflags for writeconv with ECONV_ERROR_HANDLER_MASK. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19193 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-06* include/ruby/encoding.h (ECONV_XML_TEXT_ENCODER): renamed fromakr
ECONV_HTML_TEXT_ENCODER. (ECONV_XML_ATTR_ENCODER): renamed from ECONV_HTML_ATTR_ENCODER. * enc/trans/escape.trans: follow the renaming. * transcode.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19191 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-06* include/ruby/encoding.h (ECONV_HTML_TEXT_ENCODER): new constant.akr
(ECONV_HTML_ATTR_ENCODER): ditto. * transcode.c (rb_econv_open): check ECONV_HTML_TEXT_ENCODER and ECONV_HTML_ATTR_ENCODER. (Init_transcode): Encoding::Converter::HTML_TEXT_ENCODER and Encoding::Converter::HTML_ATTR_ENCODER defined. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19179 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-05comment updated.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19170 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-05* include/ruby/encoding.h (ECONV_UNDEF_HEX_CHARREF): defined.akr
* transcode.c (output_hex_charref): new function. (rb_econv_convert): call output_hex_charref if ECONV_UNDEF_HEX_CHARREF. (Init_transcode): Encoding::Converter::UNDEF_HEX_CHARREF added. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19162 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-05* include/ruby/ruby.h (DBL2NUM): renamed from DOUBLE2NUM.matz
a patch from Tadashi Saito <shiba at mail2.accsnet.ne.jp> in [ruby-dev:36102]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19160 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-05* include/ruby/io.h (rb_io_modestr_fmode): renamed fromakr
rb_io_mode_flags. (rb_io_modestr_oflags): renamed from rb_io_mode_modenum. (rb_io_oflags_fmode): renamed from rb_io_modenum_flags. (rb_io_mode_flags): defined as a macro. (rb_io_modenum_flags): ditto. * io.c: follow the renaming with consistency. * process.c (check_exec_redirect): call rb_io_modestr_oflags. * ext/pty/depend: pty.o depends on io.h. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19153 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-05* include/ruby/io.h (rb_io_mode_modenum): moved fromakr
include/ruby/intern.h. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19150 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-04* include/ruby/intern.h (rb_file_open_str): declared.akr
* io.c (rb_file_open_str): defined. * ext/zlib/zlib.c (gzfile_s_open): use rb_file_open_str instead of rb_file_open. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19137 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-04* include/ruby/io.h (rb_io_enc_t): rename flags to ecflags.akr
(rb_io_t): rename writeconv_pre_flags to writeconv_pre_ecflags. (MakeOpenFile): follow the renaming. * io.c: follow the renaming. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19124 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-04* include/ruby/encoding.h (ECONV_INVALID_IGNORE): removed becauseakr
it tend to cause security problem. If the behaviour is really required, ECONV_INVALID_REPLACE with empty string can be used. For example, CVE-2006-2313, CVE-2008-1036, [ruby-core:15645] (ECONV_UNDEF_IGNORE): ditto. * transcode.c (rb_econv_convert): follow the above change. (econv_opts): ditto. (Init_transcode): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19123 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-03* include/ruby/io.h (rb_io_t): new fields: encs.ecopts andakr
writeconv_pre_ecopts. (MakeOpenFile): initialize them. * include/ruby/encoding.h (rb_str_transcode): take ecopts argument. (rb_econv_flags): removed. (rb_econv_prepare_opts): declared. (rb_econv_open_opts): declared. * io.c (make_writeconv): use rb_econv_open_opts. (make_readconv): ditto. (io_fwrite): follow rb_str_transcode change. (rb_io_extract_modeenc): use rb_econv_prepare_opts. (rb_file_open_generic): initialize encs.ecopts. (rb_file_open_internal): ditto. (rb_io_reopen): ditto. (argf_ecopts): defined. (argf_next_argv): set encs.ecopts. (io_encoding_set): use rb_econv_prepare_opts. (argf_set_encoding): set argf_ecopts. * gc.c (gc_mark_children): mark encs.ecopts and writeconv_pre_ecopts in T_FILE. * transcode.c (transcode_loop): take ecopts argument. use rb_econv_open_opts. (rb_econv_flags): removed. (rb_econv_prepare_opts): defined. (rb_econv_open_opts): defined. (str_transcode0): take ecopts. (str_transcode): use rb_econv_prepare_opts. (rb_str_transcode): take ecopts. (econv_init): accept hash argument. (econv_insert_output): follow rb_str_transcode change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19109 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-03* include/ruby/encoding.h (rb_econv_set_replacemenet): declared.akr
* transcode.c (rb_econv_t): new fields: replacement_str, replacement_len, replacement_enc and replacement_allocated. (get_replacement_character): make len as size_t. (rb_econv_open_by_transcoder_entries): initialize the new fields. (rb_econv_close): deallocate replacement_str if it allocated. (make_replacement): new function. (output_replacement_character): use make_replacement. (rb_econv_set_replacemenet): defined. (econv_get_replacement): new method. (econv_set_replacement): new method. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19108 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-03* include/ruby/encoding.h (rb_econv_option_t): removed. Sinceakr
rb_econv_option_t has only one field, int flags, rb_econv_option_t is replaced by int. * include/ruby/io.h: follow the above change. * io.c: ditto. * transcode.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19103 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-03* include/ruby/signal.h: removed.ko1
* common.mk, class.c, eval.c, eval_intern.h, file.c, gc.c, hash.c, io.c, process.c, signal.c: vm_core.h: ditto. Some unused external global variables are also removed. (rb_prohibit_interrupt, rb_trap_immediate, rb_trap_pending, rb_thread_critical) * ext/openssl/ossl_ssl.c, ext/openssl/ossl_x509store.c, ext/readline/readline.c, ext/socket/depend, ext/socket/socket.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19080 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-31* include/ruby/intern.h: rename RB_UBF_DFL toko1
RUBY_UBF_IO and RUBY_UBF_PROCESS. Because there is no default (universal) unblocking function. * ext/socket/socket.c, file.c, io.c, process.c, thread.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18985 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-29* include/ruby/intern.h (rb_file_s_absolute_path),nobu
(rb_file_absolute_path): prototyped. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18935 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-29* gc.c, include/ruby/ruby.h: rename T_DEFERRED to T_ZOMBIE.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18923 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-28 * win32/win32.c, include/ruby/win32.h (rb_w32_open): overlapped fileusa
I/O support. * win32/win32.c, include/ruby/win32.h (rb_w32_pipe): overlapped pipe I/O support. * wn32/win32.c (rb_w32_read, rb_w32_write): overlapped I/O support to enable canceling I/O. * thread_win32.c (ubf_handle): remove workaround. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18897 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-27* include/ruby/io.h (rb_io_t): refcnt field removed.akr
(MakeOpenFile): refcnt initialization removed. * io.c (rb_io_fptr_finalize): don't check refcnt. (rb_io_close_read): don't use refcnt. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18885 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-26* include/ruby/encoding.h (rb_econv_result_t): enumeration constant:akr
econv_incomplete_input. * io.c (finish_writeconv): check econv_incomplete_input. * transcode.c (transcode_restartable0): return econv_incomplete_input for unexpected end of source buffer. (trans_sweep): check econv_incomplete_input. (rb_trans_conv): ditto. (rb_econv_convert0): ditto. (rb_econv_convert): ditto. (transcode_loop): ditto. (make_econv_exception): change message for econv_incomplete_input. (econv_result_to_symbol): return :incomplete_input for econv_incomplete_input. (ecerr_incomplete_input): new method. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18875 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-26* include/ruby/io.h (rb_io_t): rename crbuf to cbuf.akr
* io.c: follow the renaming. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18874 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-26* include/ruby/encoding.h (rb_econv_elem_t): move to transcode.cakr
(rb_econv_t): defined as an incomplete type. * transcode.c (rb_econv_elem_t): moved from encoding.h. (rb_econv_t): complete type defined. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18872 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-26* transcode.c (rb_econv_open): disable newline conversion for ASCIIakr
incompatible encodings. (str_transcode0): don't need disable newline conversion here. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18870 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-25* include/ruby/io.h (rb_io_t): new field: writeconv_pre_opts.akr
* io.c (make_writeconv): initialize writeconv_pre_opts. (io_fwrite): use writeconv_pre_opts. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18856 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-25* include/ruby/intern.h (rb_io_ungetbyte): added prototype.nobu
* io.c (rb_io_gets): use rb_io_getline_1 for unget buffer. * ruby.c (load_file): use rb_io_ungetbyte. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18832 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-24* include/ruby/encoding.h (rb_econv_t): use rb_econv_option_t.akr
* transcode.c: follow the rb_econv_t change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18823 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-24* include/ruby/io.h (rb_io_enc_t): add opts field.akr
(FMODE_INVALID_MASK): removed. (FMODE_INVALID_IGNORE): ditto. (FMODE_INVALID_REPLACE): ditto. (FMODE_UNDEF_MASK): ditto. (FMODE_UNDEF_IGNORE): ditto. (FMODE_UNDEF_REPLACE): ditto. (MakeOpenFile): initialize the opts field. * io.c (make_writeconv): use the opts field. (io_fwrite): ditto. (make_readconv): ditto. (argf_ecopts): new macro. (rb_io_extract_modeenc): fill the opts field. (argf_next_argv): ditto. (rb_file_open_generic): initialize the opts field. (rb_file_open_internal): ditto. (io_encoding_set): ditto. (argf_set_encoding): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18816 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-24* include/ruby/encoding.h (rb_str_transcode): make 3rd argumentakr
rb_econv_option_t*. * transcode.c (transcode_loop): take rb_econv_option_t* as a argument. (str_transcode0): ditto. (str_transcode): make rb_econv_option_t and call str_transcode0 with it. (rb_str_transcode): take rb_econv_option_t*. * io.c (io_fwrite): follow the rb_str_transcode change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18814 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-24* include/ruby/io.h (rb_io_t): make enc and enc2 as structakr
rb_io_enc_t; * io.c: follow the structure change. (convconfig_t): defined by rb_io_enc_t. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18813 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-24add comment.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18812 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-24* include/ruby/encoding.h (rb_econv_opts): declared.akr
* transcode.c (rb_econv_opts): defined. * io.c (rb_io_extract_modeenc): use rb_econv_opts. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18811 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-24* include/ruby/encoding.h (rb_econv_option_t): defined.akr
(rb_econv_open): 3rd arg changed. (rb_econv_open_exc): ditto. * io.c (make_writeconv): use rb_econv_option_t. (make_readconv): ditto. (rb_econv_open): take rb_econv_option_t for options. (rb_econv_open_exc): ditto. (transcode_loop): use rb_econv_option_t. (econv_init): use rb_econv_option_t. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18810 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-24* include/ruby/encoding.h (rb_str_transcode): add ecflags argument.akr
* transcode.c (econv_opts): extracted from str_transcode. (str_transcode_enc_args): extracted from str_transcode. (str_transcode0): extracted from str_transcode. (str_transcode): use econv_opts, str_transcode_enc_args, str_transcode0. (rb_str_transcode): call str_transcode0. (econv_primitive_insert_output): give the additional argument for rb_str_transcode. * io.c (make_writeconv): use invalid/undef flags. (io_fwrite): ditto. (rb_scan_open_args): give the additional argument for rb_str_transcode. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18808 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-24* include/ruby/encoding.h (rb_econv_substr_append): renamed fromakr
rb_econv_string. (rb_econv_str_convert): declared. (rb_econv_substr_convert): declared. (rb_econv_str_append): declared. * io.c (io_fwrite): use rb_econv_str_convert instead of rb_econv_string. * transcode.c (rb_econv_substr_append): renamed from rb_econv_string. (rb_econv_str_append): new function. (rb_econv_substr_convert): ditto. (rb_econv_str_convert): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18806 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-24* include/ruby/encoding.h (rb_econv_open_exc): declared.akr
* transcode.c (rb_eNoConverter): new exception. (rb_econv_open_exc): new function. (transcode_loop): use rb_econv_open_exc. * io.c (make_writeconv): use rb_econv_open_exc. (make_readconv): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18803 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-23* include/ruby/io.h (FMODE_INVALID_MASK): defined.akr
(FMODE_INVALID_IGNORE): defined. (FMODE_INVALID_REPLACE): defined. (FMODE_UNDEF_MASK): defined. (FMODE_UNDEF_IGNORE): defined. (FMODE_UNDEF_REPLACE): defined. * io.c (sym_invalid): defined. (sym_undef): defined. (sym_ignore): defined. (sym_replace): defined. (make_readconv): specify ECONV_INVALID_* and ECONV_UNDEF_* if FMODE_INVALID_* and FMODE_UNDEF_* is set. (rb_io_extract_modeenc): check {:invalid, :undef} => {:replace, :ignore} for FMODE_INVALID_* and FMODE_UNDEF_*. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18791 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-23* include/ruby/encoding.h (ECONV_INVALID_MASK): defined.akr
(ECONV_INVALID_IGNORE): defined. (ECONV_INVALID_REPLACE): defined. (ECONV_UNDEF_MASK): defined. (ECONV_UNDEF_IGNORE): defined. (ECONV_UNDEF_REPLACE): defined. * transcode.c (INVALID_IGNORE): removed. (INVALID_REPLACE): removed. (UNDEF_IGNORE): removed. (UNDEF_REPLACE): removed. (rb_econv_convert0): renamed from rb_econv_convert. (rb_econv_convert): defined to call rb_econv_convert0 with replace/ignore behavior moved from transcode_loop. (transcode_loop): replace/ignore behavior removed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18787 b2dd03c8-39d4-4d8f-98ff-823fe69b080e