pike.git / lib / modules / ADT.pmod / module.pmod

version» Context lines:

pike.git/lib/modules/ADT.pmod/module.pmod:15:      protected class structError   {    inherit Error.Generic;    constant ADT_struct = 1;   }      //! String buffer with the possibility to read and write data   //! as they would be formatted in structs.   class struct { -  inherit Stdio.IOBuffer; +  inherit Stdio.Buffer;       //! Create a new buffer, optionally initialized with the    //! value @[s].    void create(void|string(0..255) s)    {    if( s && strlen(s) )    ::create(s);    else    ::create();    set_error_mode(structError);
pike.git/lib/modules/ADT.pmod/module.pmod:101:    {    add_int(sizeof(data)*item_size, len );    return [object(this_program)]add_ints(data,item_size);    }       //! Appends an array of variable length strings with @[item_size]    //! bytes hollerith coding, prefixed by a @[len] bytes large integer    //! declaring the total size of the array in bytes.    this_program put_var_string_array(array(string(8bit)) data, int(0..) item_size, int(0..) len)    { -  Stdio.IOBuffer sub = Stdio.IOBuffer(); +  Stdio.Buffer sub = Stdio.Buffer();    foreach(data, string(8bit) s)    sub->add_hstring(s, item_size);    add_int(sizeof(sub),len);    return [object(this_program)]add(sub);    }       //! Reads an unsigned integer from the buffer.    int(0..) get_uint(int len)    {    return read_int(len);