1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/enc/trans
akr c0d3881e0e * include/ruby/io.h (FMODE_TEXTMODE): defined.
* include/ruby/encoding.h (rb_econv_t): new field: flags.
  (rb_econv_binmode): declared.

* io.c (io_unread): text mode hack removed.
  (NEED_NEWLINE_DECODER): defined.
  (NEED_NEWLINE_ENCODER): defined.
  (NEED_READCONV): defined.
  (NEED_WRITECONV): defined.
  (TEXTMODE_NEWLINE_ENCODER): defined for windows.
  (make_writeconv): setup converter with TEXTMODE_NEWLINE_ENCODER for
  text mode.
  (io_fwrite): use NEED_WRITECONV.  character code conversion is
  disabled if fptr->writeconv_stateless is nil.
  (make_readconv): setup converter with
  ECONV_UNIVERSAL_NEWLINE_DECODER for text mode.
  (read_all): use NEED_READCONV.
  (appendline): use NEED_READCONV.
  (rb_io_getline_1): use NEED_READCONV.
  (io_getc): use NEED_READCONV.
  (rb_io_ungetc): use NEED_READCONV.
  (rb_io_binmode): OS-level text mode test removed.  call
  rb_econv_binmode.
  (rb_io_binmode_m): call rb_io_binmode_m with write_io as well.
  (rb_io_flags_mode): return mode string including "t".
  (rb_io_mode_flags): detect "t" for text mode.
  (rb_sysopen): always specify O_BINARY.

* transcode.c (rb_econv_open_by_transcoder_entries): initialize flags.
  (rb_econv_open): if source and destination encoding is
  both empty string, open newline converter.  last_tc will be NULL in
  this case.
  (rb_econv_encoding_to_insert_output): last_tc may be NULL now.
  (rb_econv_string): ditto.
  (output_replacement_character): ditto.
  (transcode_loop): ditto.
  (econv_init): ditto.
  (econv_inspect): ditto.
  (rb_econv_binmode): new function.




git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18780 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-22 16:44:00 +00:00
..
cp949-tbl.rb * tool/build-transcode: new file. 2008-08-05 12:32:13 +00:00
eucjp-tbl.rb * tool/build-transcode: new file. 2008-08-05 12:32:13 +00:00
euckr-tbl.rb * tool/build-transcode: new file. 2008-08-05 12:32:13 +00:00
iso-8859-2-tbl.rb * tool/build-transcode: new file. 2008-08-05 12:32:13 +00:00
iso-8859-3-tbl.rb * tool/build-transcode: new file. 2008-08-05 12:32:13 +00:00
iso-8859-4-tbl.rb * tool/build-transcode: new file. 2008-08-05 12:32:13 +00:00
iso-8859-5-tbl.rb * tool/build-transcode: new file. 2008-08-05 12:32:13 +00:00
iso-8859-6-tbl.rb * tool/build-transcode: new file. 2008-08-05 12:32:13 +00:00
iso-8859-7-tbl.rb * tool/build-transcode: new file. 2008-08-05 12:32:13 +00:00
iso-8859-8-tbl.rb * tool/build-transcode: new file. 2008-08-05 12:32:13 +00:00
iso-8859-9-tbl.rb * tool/build-transcode: new file. 2008-08-05 12:32:13 +00:00
iso-8859-10-tbl.rb * tool/build-transcode: new file. 2008-08-05 12:32:13 +00:00
iso-8859-11-tbl.rb * tool/build-transcode: new file. 2008-08-05 12:32:13 +00:00
iso-8859-13-tbl.rb * tool/build-transcode: new file. 2008-08-05 12:32:13 +00:00
iso-8859-14-tbl.rb * tool/build-transcode: new file. 2008-08-05 12:32:13 +00:00
iso-8859-15-tbl.rb * tool/build-transcode: new file. 2008-08-05 12:32:13 +00:00
iso2022.trans * transcode_data.h (rb_transcoder_stateful_type_t): defined. 2008-08-15 23:13:01 +00:00
japanese.trans * enc/trans/iso2022.trans: renamed from iso2022.erb.c. 2008-08-11 07:39:52 +00:00
korean.trans * enc/trans/iso2022.trans: renamed from iso2022.erb.c. 2008-08-11 07:39:52 +00:00
make_transdb.rb * enc/trans/make_transdb.rb: *.erb.c is not used anymore. 2008-08-12 09:43:44 +00:00
newline.trans * include/ruby/io.h (FMODE_TEXTMODE): defined. 2008-08-22 16:44:00 +00:00
single_byte.trans * enc/trans/iso2022.trans: renamed from iso2022.erb.c. 2008-08-11 07:39:52 +00:00
sjis-tbl.rb * tool/build-transcode: new file. 2008-08-05 12:32:13 +00:00
transdb.c * encoding.c (enc_init_db): moved to enc/encdb.c. 2008-04-07 06:51:33 +00:00
utf_16_32.trans * transcode_data.h (rb_transcoder_stateful_type_t): defined. 2008-08-15 23:13:01 +00:00