Project

General

Profile

Actions

Bug #689

closed

reading after EOF with textmode

Added by usa (Usaku NAKAMURA) over 15 years ago. Updated almost 13 years ago.

Status:
Closed
Assignee:
-
Target version:
ruby -v:
Backport:
[ruby-dev:36977]

Description

=begin
こんにちは、なかむら(う)です。

テキストモード時に一度EOFに到達すると、rewindやseekでポインタ
を移動するとか新しいデータが到達するとかしても、EOF状態から脱
出できないようです。
more_char()でEOFを検知した時点でreadconvをリセットする必要が
あるように思えるのですが、そういう理解で正しいでしょうか?

Index: io.c

--- io.c (revision 19991)
+++ io.c (working copy)
@@ -1457,6 +1457,8 @@ make_readconv(rb_io_t *fptr)
}
}

+static void clear_readconv(rb_io_t *fptr);
+
static int
more_char(rb_io_t *fptr)
{
@@ -1499,8 +1501,10 @@ more_char(rb_io_t *fptr)
if (cbuf_len0 != fptr->cbuf_len)
return 0;

  •    if (res == econv_finished)
    
  • if (res == econv_finished) {

  •  clear_readconv(fptr);
           return -1;
    
  • }

      if (res == econv_source_buffer_empty) {
          if (fptr->rbuf_len == 0) {
    


それでは。

U.Nakamura
=end

Actions #1

Updated by usa (Usaku NAKAMURA) over 15 years ago

  • Due date set to 11/25/2008
  • Category set to M17N
  • Priority changed from 3 to Normal
  • Target version set to 2.0.0
  • Start date set to 10/28/2008

=begin

=end

Actions #2

Updated by matz (Yukihiro Matsumoto) over 15 years ago

  • Status changed from Open to Closed

=begin
fixed by r20045
=end

Actions

Also available in: Atom PDF

Like0
Like0Like0