This is done so that the start position is always after the stop position.
In such a case, this means that the range is undefined.
Originally. -1 was used, but that does not work if the position integers are unsigned.
Using {1, 0} allows for assigning an undefined state with unsigned integers.
Also note that the default of {0, 0} means start at 0 and stop at 0, which would return the value at position 0 and no other values after that first value.
f_string_length stop;
} f_string_location;
- #define f_string_location_initialize { f_string_length_initialize, f_string_length_initialize }
+ #define f_string_location_initialize { 1, 0 }
#define f_new_string_location(status, string_location, length) status = f_new_array((void **) & string_location, sizeof(f_string_location), length)
#define f_delete_string_location(status, string_location, size) status = f_delete((void **) & string_location, sizeof(f_string_location), size)
{
f_string_location input = f_string_location_initialize;
- input.stop = data->buffer.used - 1;
+ input.start = 0;
+ input.stop = data->buffer.used - 1;
status = fll_fss_basic_list_read(&data->buffer, &input, &data->objects, &data->contents);
}
{
f_string_location input = f_string_location_initialize;
- input.stop = data->buffer.used - 1;
+ input.start = 0;
+ input.stop = data->buffer.used - 1;
status = fll_fss_basic_read(&data->buffer, &input, &data->objects, &data->contents);
}
{
f_string_location input = f_string_location_initialize;
- input.stop = data->buffer.used - 1;
+ input.start = 0;
+ input.stop = data->buffer.used - 1;
status = fll_fss_extended_read(&data->buffer, &input, &data->objects, &data->contents);
}