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

version» Context lines:

pike.git/lib/modules/ADT.pmod/module.pmod:111:    //! Appends an array of unsigned integers of width @[item_size]    //! to the buffer, preceded with an unsigned integer @[len] declaring    //! the size of the array in bytes.    this_program put_var_uint_array(array(int) data, int(0..) item_size, int(0..) len)    {    put_uint(sizeof(data)*item_size, len);    put_fix_uint_array(data, item_size);    return this;    }    +  //! 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)    {    string(8bit) temp = buffer;    buffer = "";    foreach(data, string(8bit) s)    put_var_string(s, item_size);    string(8bit) arr = buffer;    buffer = temp;    put_var_string(arr, len);    return this;