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

version» Context lines:

pike.git/src/modules/_Stdio/buffer.cmod:858:    */    PIKEFUN string(0..255) read()    {    struct pike_string * s = io_read_string(THIS, io_len(THIS));    if( !s )    push_int(0);    else    push_string(s);    }    -  /*! @decl read_int( int n ) +  /*! @decl int read_int( int n )    *!    *! Read a network (if n is positive) or little endian (if n is    *! negative) byte order unsigned number of size n*8 bits, then    *! return it.    *!    *! Will return -1 if there is not enough buffer space available    *! unless error mode is set to throw errors.    */    PIKEFUN int read_int( int len )    {
pike.git/src/modules/_Stdio/buffer.cmod:945:    flags ID_PROTECTED;    {    IOBuffer *this = THIS;    if( this->buffer )    Pike_error("Can not initialize twice.\n");    this->buffer = xalloc(4096-32);    this->allocated = 4096-32;    this->malloced = 1;    }    + /*! @endclass +  */       INIT {    IOBuffer *this = THIS;    memset( this, 0, sizeof(IOBuffer));    }       EXIT {    IOBuffer *this = THIS;    if( this->sub )    {    free_object( this->sub );    io_unlock( get_storage(this->sub,IOBuffer_program ) );    }    if( this->str )    free_string( this->str );    if( this->malloced )    free( this->buffer );    }   } -  +    void init_stdio_buffer(void)   {    INIT   }         void exit_stdio_buffer(void)   {    EXIT   }