* enc/trans/newline.trans: new file.
commitc03c1d196c3aa39579fc15cda94b6d081fe89fd8
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>
Wed, 13 Aug 2008 05:30:42 +0000 (13 05:30 +0000)
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>
Wed, 13 Aug 2008 05:30:42 +0000 (13 05:30 +0000)
tree4b4ca9d7d11fe733e5ca1ec4cf78f372050a1636
parent462f30c91bcd1025081f52bddc4d505776fb217f
* enc/trans/newline.trans: new file.

* transcode_data.h (rb_trans_t): add last_tc field.

* transcode.c (UNIVERSAL_NEWLINE): defined.
  (CRLF_NEWLINE): defined.
  (CR_NEWLINE): defined.
  (rb_trans_open_by_transcoder_entries): initialize last_tc.
  (trans_open_i): allocate one more room for newline converter.
  (rb_trans_open): universal newline implemented.
  (more_output_buffer): take max_output argument instead ts.
  (output_replacement_character): take tc argument instead of ts.
  (transcode_loop): use last_tc field.
  (econv_init): add flags argument for rb_trans_open.
  (Init_transcode): Encoding::Converter::UNIVERSAL_NEWLINE defined.

git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@18556 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
ChangeLog
enc/trans/newline.trans [new file with mode: 0644]
test/ruby/test_econv.rb
transcode.c
transcode_data.h