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

version» Context lines:

pike.git/src/modules/_Stdio/buffer.cmod:1: + /* -*- c -*- + || This file is part of Pike. For copyright information see COPYRIGHT. + || Pike is distributed under GPL, LGPL and MPL. See the file COPYING + || for more information. + */ +    #include "global.h"   #include "fdlib.h"   #include "pike_netlib.h"   #include "object.h"   #include "interpret.h"   #include "operators.h"   #include "bignum.h"   #include "sscanf.h"   #include "builtin_functions.h"   #include "interpret.h"
pike.git/src/modules/_Stdio/buffer.cmod:1017:    }    else    {    /* some other object. Just call write */    while( sz > written && nbytes )    {    size_t rd = MINIMUM(MINIMUM(sz-written,4096),nbytes);    ptrdiff_t wr = io_call_write( io, f, rd );    if( wr <= 0 )    { -  io_rewind(io, rd ); +     if (!written) written = -1;    break;    }    written += wr;    if( wr < 4096 ) { -  io_rewind(io, rd-wr ); +     break;    }    }    }    RETURN written;    }       /*! @decl int read_sint( int size )    *!    *! Read a network byte order two:s complement signed number of size n*8 bits, then