1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/enc
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
..
trans * include/ruby/io.h (FMODE_TEXTMODE): defined. 2008-08-22 16:44:00 +00:00
ascii.c * enc/ascii.c: ISO C does not allow extra ';' outside of a 2008-07-01 08:39:10 +00:00
big5.c forgot to commit 2008-07-01 09:50:30 +00:00
cp949.c * enc/{euc_jp.c,gbk.c,iso_8859_1.c,iso_8859_11.c,iso_8859_13.c, 2008-02-17 03:21:20 +00:00
depend * enc/depend: (transvpath_prefix): prefix has no extension, so replace 2008-08-12 06:19:00 +00:00
encdb.c * encoding.c (enc_init_db): moved to enc/encdb.c. 2008-04-07 06:51:33 +00:00
euc_jp.c forgot to commit 2008-07-01 09:50:30 +00:00
euc_kr.c forgot to commit 2008-07-01 09:50:30 +00:00
euc_tw.c forgot to commit 2008-07-01 09:50:30 +00:00
gb2312.c forgot to commit 2008-07-01 09:50:30 +00:00
gb18030.c forgot to commit 2008-07-01 09:50:30 +00:00
gbk.c forgot to commit 2008-07-01 09:50:30 +00:00
iso_2022_jp.h * common.mk (encdb.h): give output file name to make_encdb.rb. 2008-01-17 14:56:22 +00:00
iso_8859_1.c forgot to commit 2008-07-01 09:50:30 +00:00
iso_8859_2.c forgot to commit 2008-07-01 09:50:30 +00:00
iso_8859_3.c forgot to commit 2008-07-01 09:50:30 +00:00
iso_8859_4.c forgot to commit 2008-07-01 09:50:30 +00:00
iso_8859_5.c forgot to commit 2008-07-01 09:50:30 +00:00
iso_8859_6.c forgot to commit 2008-07-01 09:50:30 +00:00
iso_8859_7.c forgot to commit 2008-07-01 09:50:30 +00:00
iso_8859_8.c forgot to commit 2008-07-01 09:50:30 +00:00
iso_8859_9.c forgot to commit 2008-07-01 09:50:30 +00:00
iso_8859_10.c forgot to commit 2008-07-01 09:50:30 +00:00
iso_8859_11.c forgot to commit 2008-07-01 09:50:30 +00:00
iso_8859_13.c forgot to commit 2008-07-01 09:50:30 +00:00
iso_8859_14.c forgot to commit 2008-07-01 09:50:30 +00:00
iso_8859_15.c forgot to commit 2008-07-01 09:50:30 +00:00
iso_8859_16.c forgot to commit 2008-07-01 09:50:30 +00:00
koi8_r.c forgot to commit 2008-07-01 09:50:30 +00:00
koi8_u.c * enc/koi8_u.c: added. 2008-01-19 15:37:06 +00:00
make_encdb.rb * enc/make_encdb.rb, enc/trans/make_transdb.rb: skip nonexistent 2008-08-08 21:37:43 +00:00
make_encmake.rb * enc/Makefile.in (.SUFFIXES): renamed to .trans. 2008-08-12 05:25:14 +00:00
Makefile.in * enc/Makefile.in (.SUFFIXES): renamed to .trans. 2008-08-12 05:25:14 +00:00
prelude.rb * common.mk (prelude.c): depends on enc/prelude.rb. 2008-04-08 01:30:31 +00:00
shift_jis.c * enc/shift_jis.c (code_is_ctype): HALF WIDTH KATAKANA is 2008-07-01 10:05:48 +00:00
unicode.c * enc/euc_jp.c (property_name_to_ctype): core dumped when sizeof(int) 2008-06-17 13:06:34 +00:00
us_ascii.c * enc/ascii.c: ISO C does not allow extra ';' outside of a 2008-07-01 08:39:10 +00:00
utf_7.h * enc/utf_7.h: add dummy encoding UTF-7 and its alias CP65000. 2008-01-28 08:57:40 +00:00
utf_8.c * enc/ascii.c: ISO C does not allow extra ';' outside of a 2008-07-01 08:39:10 +00:00
utf_16be.c forgot to commit 2008-07-01 09:50:30 +00:00
utf_16le.c * enc/utf_16{be,le}.c (utf16{be,le}_code_to_mbc): 2008-05-31 10:14:38 +00:00
utf_32be.c forgot to commit 2008-07-01 09:50:30 +00:00
utf_32le.c forgot to commit 2008-07-01 09:50:30 +00:00
windows_1251.c forgot to commit 2008-07-01 09:50:30 +00:00