* include/ruby/encoding.h (rb_econv_t): add fields: in_buf_start,
commit84378f16d537a41577c7e30f954b587eeff252f4
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>
Sat, 16 Aug 2008 05:32:42 +0000 (16 05:32 +0000)
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>
Sat, 16 Aug 2008 05:32:42 +0000 (16 05:32 +0000)
tree63b4f0774952fcf345a764249c853c3415c1c793
parent37d70c14aad46059220e84a30035c681e7d7062b
* include/ruby/encoding.h (rb_econv_t): add fields: in_buf_start,
  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: http://svn.ruby-lang.org/repos/ruby/trunk@18654 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
ChangeLog
enc/trans/newline.trans
include/ruby/encoding.h
test/ruby/test_econv.rb
transcode.c