Branch: Tag:

2014-11-25

2014-11-25 12:19:19 by Martin Nilsson <nilsson@opera.com>

Renamed methods for consistency with Stdio.Buffer

35:   //! 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) + this_program add_int_array(array(int) data, int(0..) item_size, int(0..) len)   {    add_int(sizeof(data)*item_size, len );    return [object(this_program)]add_ints(data,item_size);
44:   //! 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) + this_program add_string_array(array(string(8bit)) data, int(0..) item_size, +  int(0..) len)   {    Stdio.Buffer sub = Stdio.Buffer();    foreach(data, string(8bit) s)
52:    return [object(this_program)]add_hstring(sub, len);   }    - //! Reads an array of integers as written by @[put_var_uint_array] + //! Reads an array of integers as written by @[add_int_array]   //! from the buffer. - array(int) get_var_uint_array(int item_size, int len) + array(int) read_int_array(int item_size, int len)   {    int size = read_int(len);    int elems = size/item_size;