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

version» Context lines:

pike.git/src/modules/_Stdio/buffer.cmod:947:       /*! @decl int(-1..) output_to( Stdio.Stream f, int(0..)|void nbytes )    *!    *! Write data from the buffer to the indicated file.    *!    *! @param nbytes    *! If @[nbytes] is not specified the whole buffer will be written    *! if possible. Otherwise at most @[nbytes] will be written.    *!    *! @returns -  *! Will return the number of bytes that were successfully written. +  *! Will return the number of bytes that have been written successfully.    *! -  *! If no bytes were successfully written and @expr{f->write()@} failed -  *! with an error @expr{-1@} will be returned. +  *! If no bytes have been written successfully and @expr{f->write()@} failed +  *! with an error, @expr{-1@} will be returned.    */    PIKEFUN int(-1..) output_to( object f, int|void _nbytes )    {    IOBuffer *io = THIS;    ptrdiff_t written = 0, nbytes = (ptrdiff_t)(((size_t)~0)>>1);    struct my_file *fd;    ptrdiff_t sz = io_len( io );       if( !sz )    {
pike.git/src/modules/_Stdio/buffer.cmod:1789:    *! @returns    *!    *! This function returns how many more bytes of buffer is    *! available to rewind, or -1 on error.    *!    *! @note    *!    *! Unless you add new data to the buffer using any of the add    *! functions you can always rewind.    *! -  *! You can call @[undread(0)] to see how much. +  *! You can call @[unread(0)] to see how much.    */    PIKEFUN int(-1..) unread( int bytes )    {    push_int64( io_rewind( THIS, bytes ) );    }       /*! @decl string(8bit) read( int n )    *!    *! Read @[bytes] bytes of data from the buffer.    *!