pike.git / src / modules / _Stdio / buffer.cmod

version» Context lines:

pike.git/src/modules/_Stdio/buffer.cmod:941:    nbytes -= res;    io->len += res;    bread += res;    if( res != READ_CHUNKSIZE || once || !nbytes )    break;    }    io_set_events( io, fd, PIKE_BIT_FD_READ_OOB, PIKE_FD_READ );    }    else    { -  /* some other object. Just call read */ +  /* Some other object. Just call read(). */    while( nbytes )    {    push_int( MINIMUM(READ_CHUNKSIZE, nbytes) );    safe_apply( f, "read", 1 );    if( TYPEOF(Pike_sp[-1]) != PIKE_T_STRING || Pike_sp[-1].u.string->len == 0 )    break;    if( Pike_sp[-1].u.string->size_shift )    Pike_error("Can not handle non-8bit data.\n");    io_append( io, Pike_sp[-1].u.string->str, Pike_sp[-1].u.string->len );    nbytes -= Pike_sp[-1].u.string->len; -  +  bread += Pike_sp[-1].u.string->len;    pop_stack();    }    }       if (!bread) RETURN -1;       io_trigger_output( io );       RETURN bread;    }