aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* * transcode.c (make_econv_exception): add several instance variablesakr2008-08-173-7/+88
| | | | | | | | | | | | | | | | | to exception object. (ecerr_source_encoding): new method: Encoding::ConversionUndefined#source_encoding and Encoding::InvalidByteSequence#source_encoding. (ecerr_destination_encoding): new method: Encoding::ConversionUndefined#destination_encoding and Encoding::InvalidByteSequence#destination_encoding. (econverr_error_char): new method: Encoding::ConversionUndefined#error_char. (econverr_error_bytes): new method: Encoding::ConversionUndefined#error_bytes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18669 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * random.c (struct MT): packed Mersenne Twister staffs.nobu2008-08-172-81/+94
| | | | | | | * random.c (struct RandSeed): packed random seed staffs. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18668 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/iconv/test_option.rb (test_ignore_option): skip if iconvnaruse2008-08-162-0/+9
| | | | | | | | doesn't have transliterate. * test/iconv/test_option.rb (test_translit_option): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18667 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/io.h (rb_io_t): new fields: readconv, crbuf, crbuf_off,akr2008-08-164-10/+105
| | | | | | | | | | | | | crbuf_len, crbuf_capa. (MakeOpenFile): initialize them. * io.c (io_shift_crbuf): new function. (io_getc): use econv. (rb_io_fptr_finalize): finalize readconv and crbuf. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18666 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2008-08-17svn2008-08-161-3/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18663 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/encoding.h (rb_econv_check_error): declared.akr2008-08-163-5/+58
| | | | | | | | | * transcode.c (make_econv_exception): new function. (transcode_loop): use make_econv_exception. (rb_econv_check_error): defined. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18662 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ChangeLog: stripped trailing spaces.nobu2008-08-161-47/+47
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18657 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * id.c (Init_id): commit miss.nobu2008-08-161-1/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18656 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/encoding.h (rb_econv_elem_t): fields removed: from andakr2008-08-163-6/+27
| | | | | | | | | | | | | | | to. (rb_econv_t): new fields: source_encoding_name and destination_encoding_name. * transcode.c (rb_econv_open_by_transcoder_entries): initialize the new fields. (rb_econv_open): set up the new fields. (econv_inspect): use the new fields. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18655 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/encoding.h (rb_econv_t): add fields: in_buf_start,akr2008-08-165-244/+264
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | in_data_start, in_data_end, in_buf_end and last_trans_index. (rb_econv_output): removed. (rb_econv_insert_output): declared. (rb_econv_encoding_to_insert_output): declared. * enc/trans/newline.trans (rb_universal_newline): stateful_type changed. * transcode.c (transcode_restartable0): initialize inchar_start, tc->recognized_len and next_table at beginning of the loop. (rb_econv_open_by_transcoder_entries): initialize new fields. (rb_econv_open): setup last_trans_index. (trans_sweep): last out_buf_start can be non-NULL now. (rb_econv_convert): check last out_buf_start and in_buf_start at first. (rb_econv_output_with_destination_encoding): removed. (econv_just_convert): removed. (rb_econv_output): removed. (econv_primitive_output): method removed. (rb_econv_encoding_to_insert_output): new function. (allocate_converted_string): new function. (rb_econv_insert_output): new function. (econv_primitive_insert_output): new method. (output_replacement_character): use rb_econv_insert_output. unused arguments removed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18654 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/ruby.h (rb_intern_const): tiny optimization.nobu2008-08-1622-6/+35
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18653 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/ruby.h: commit miss.nobu2008-08-161-0/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18652 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/ruby.h (SSIZET2NUM, NUM2SSIZET, SSIZE_MAX, SSIZE_MIN):nobu2008-08-152-0/+25
| | | | | | | macros for ssize_t. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18651 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * transcode_data.h (rb_transcoder_stateful_type_t): defined.akr2008-08-156-0/+36
| | | | | | | | | | | | | | | | | (rb_transcoder): add field: stateful_type. * tool/transcode-tblgen.rb: generate stateful_type field as stateless_converter. * enc/trans/iso2022.trans: follow rb_transcoder change. * enc/trans/newline.trans: ditto. * enc/trans/utf_16_32.trans: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18650 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2008-08-16svn2008-08-151-3/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18649 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* add a test.akr2008-08-151-0/+8
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18648 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * transcode.c (econv_just_convert): extracted from rb_econv_output.akr2008-08-153-38/+177
| | | | | | | | (rb_econv_output): use econv_just_convert. (econv_primitive_output): new method. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18647 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/encoding.h (rb_econv_output): add str_encodingakr2008-08-153-8/+105
| | | | | | | | | | | | | | | argument. * transcode.c (get_replacement_character): add repl_enc_ptr argument. (rb_econv_output_with_destination_encoding): renamed from rb_econv_output and make it static. (rb_econv_output): convert str and call rb_econv_output_with_destination_encoding. (output_replacement_character): follow above interface change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18646 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * string.c (rb_str_drop_bytes): use memmove.nobu2008-08-152-1/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18645 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/encoding.h (rb_econv_t): add error_tc in last_error.akr2008-08-153-5/+14
| | | | | | | | * transcode.c (rb_econv_convert): fill error_tc. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18644 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/encoding.h (rb_econv_t): new field: last_error.akr2008-08-154-16/+218
| | | | | | | | | | | * transcode.c (rb_trans_conv): new argument: result_position_ptr. (rb_econv_convert): fill last_error. (econv_result_to_symbol): extracted from econv_primitive_convert. (econv_primitive_errinfo): new method. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18643 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * common.mk (parse.{c,h}): creates in the dependency order.nobu2008-08-152-2/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18642 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_settracefunc.rb (test_call, test_class):nobu2008-08-151-8/+0
| | | | | | | RubyVM::FrozenCore is no longer visible. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18641 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_core.h (exec_event_hooks): skips RubyVM::FrozenCore.nobu2008-08-152-1/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18640 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm.c (Init_VM): get rid of SEGV in a trace proc.nobu2008-08-152-1/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18639 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* add tests.akr2008-08-151-1/+20
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18638 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * transcode.c (conv_init): check empty name.akr2008-08-152-4/+10
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18637 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* add a test.akr2008-08-151-0/+48
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18636 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* add tests.akr2008-08-151-0/+38
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18635 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * transcode.c (econv_init): don't create dummy encoding ifakr2008-08-153-12/+53
| | | | | | | | | rb_econv_open is failed. (make_dummy_encoding): new function extracted from make_encoding. (make_encoding): removed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18634 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ignore uncommon.mk.akr2008-08-140-0/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18633 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* udpate rdoc.akr2008-08-141-0/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18632 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * common.mk ({$(srcdir)}.y.c): escape backslash.naruse2008-08-142-1/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18631 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * transcode.c (econv_primitive_convert): set destination_bufferakr2008-08-143-0/+17
| | | | | | | encoding. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18630 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2008-08-15svn2008-08-141-3/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18629 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/encoding.h (rb_econv_output): declared.akr2008-08-146-49/+114
| | | | | | | | | | | | | | | | | | * transcode_data.h (rb_transcoder): add resetsize_func field. * enc/trans/iso2022.trans (iso2022jp_reset_sequence_size): defined. (rb_EUC_JP_to_ISO_2022_JP): provede resetsize_func. * tool/transcode-tblgen.rb: set NULL for resetsize_func. * transcode.c (rb_econv_output): new function for inserting output. (output_replacement_character): use rb_econv_output. (transcode_loop): check return value of output_replacement_character. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18628 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/encoding.h (ECONV_UNIVERSAL_NEWLINE_DECODER): defined.akr2008-08-143-29/+43
| | | | | | | | | | | | | (ECONV_CRLF_NEWLINE_ENCODER): ditto. (ECONV_CR_NEWLINE_ENCODER): ditto. (ECONV_PARTIAL_INPUT): ditto. (ECONV_OUTPUT_FOLLOWED_BY_INPUT): ditto. * transcode.c: use ECONV_* defined as above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18627 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * transcode.c: local variable renamed.akr2008-08-142-87/+91
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18626 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/encoding.h (rb_econv_result_t): moved fromakr2008-08-145-58/+135
| | | | | | | | | | | | | | | | | | | | | | | | | | | transcode_data.h. (rb_econv_elem_t): ditto. (rb_econv_t): ditto. source_encoding and destination_encoding field is added. (rb_econv_open): declared. (rb_econv_convert): ditto. (rb_econv_close): ditto. * transcode.c (rb_econv_open_by_transcoder_entries): initialize source_encoding and destination_encoding field as NULL. (rb_econv_open): make it external linkage. (rb_econv_close): ditto. (rb_econv_convert): ditto. renamed from rb_econv_conv. (make_encoding): new function. (econv_init): use make_encoding and store rb_encoding* in rb_econv_t. (econv_source_encoding): new method Encoding::Converter#source_encoding. (econv_destination_encoding): new method Encoding::Converter#destination_encoding. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18625 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * transcode_data.h (rb_econv_result_t): change enumerationakr2008-08-143-57/+64
| | | | | | | | | constant's prefix: transcode_ to econv_. * transcode.c: follow the constant prefix change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18624 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * transcode.c (econv_init): accept Encoding object as source_encodingakr2008-08-143-12/+38
| | | | | | | and destination_encoding. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18623 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * encoding.c (rb_filesystem_encoding): use default external encodingakr2008-08-143-9/+12
| | | | | | | | | | for Unix. * dir.c (dir_initialize): don't cache fs_encoding. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18622 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * transcode.c (rb_econv_open_by_transcoder_entries): renamed fromakr2008-08-142-2/+7
| | | | | | | rb_trans_open_by_transcoder_entries. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18621 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * transcode.c (econv_max_output): removed.akr2008-08-142-17/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18620 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * tool/transcode-tblgen.rb: check unexpected actions.akr2008-08-142-1/+7
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18619 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * transcode_data.h (transcode_invalid_byte_sequence): renamed fromakr2008-08-144-175/+193
| | | | | | | | | | | | | | | | | | | | transcode_invalid_input. (transcode_destination_buffer_full): renamed from transcode_obuf_full. (transcode_source_buffer_empty): renamed from transcode_ibuf_empty. (rb_econv_result_t): renamed from rb_trans_result_t. (rb_econv_elem_t): renamed from rb_trans_elem_t. (rb_econv_t): renamed from rb_trans_t. * transcode.c (UNIVERSAL_NEWLINE_DECODER): renamed from UNIVERSAL_NEWLINE. (CRLF_NEWLINE_ENCODER): renamed from CRLF_NEWLINE. (CR_NEWLINE_ENCODER): renamed from CR_NEWLINE. (rb_econv_open): renamed from rb_trans_open. (rb_econv_close): renamed from rb_trans_close. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18618 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * transcode.c (load_transcoder): unused function removed.akr2008-08-142-34/+5
| | | | | | | (rb_transcoding_open): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18617 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* add a test.akr2008-08-141-1/+9
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18616 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ChangeLog: typo.nobu2008-08-141-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18615 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/encoding.h (rb_enc_ispunct): added.nobu2008-08-147-108/+148
| | | | | | | | | | | | | | | * common.mk (COMMONOBJS), inits.c (rb_call_inits): id.c is now included from parse.c. * id.c (Init_id), id.h (ruby_method_ids): added IDs used by VM. * parse.y (global_symbols): added rooms for VM IDs. * parse.y (rb_intern3, rb_id2str): single puctuation symbol is now same as char code. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18614 b2dd03c8-39d4-4d8f-98ff-823fe69b080e