Using the word 'location' makes more semantic sense than 'input', especially given that the variable type is called a location.
#endif
#ifndef _di_fll_fss_basic_read_
- f_return_status fll_fss_basic_read(f_string_dynamic *buffer, f_string_location *input, f_fss_objects *objects, f_fss_contents *contents) {
+ f_return_status fll_fss_basic_read(f_string_dynamic *buffer, f_string_location *location, f_fss_objects *objects, f_fss_contents *contents) {
#ifndef _di_level_2_parameter_checking_
if (buffer == 0) return f_status_set_error(f_invalid_parameter);
+ if (location == 0) return f_status_set_error(f_invalid_parameter);
if (objects == 0) return f_status_set_error(f_invalid_parameter);
if (contents == 0) return f_status_set_error(f_invalid_parameter);
#endif // _di_level_2_parameter_checking_
}
do {
- status = fl_fss_basic_object_read(buffer, input, &objects->array[objects->used]);
+ status = fl_fss_basic_object_read(buffer, location, &objects->array[objects->used]);
if (f_status_is_error(status)) {
return status;
}
- if (input->start >= input->stop || input->start >= buffer->used) {
+ if (location->start >= location->stop || location->start >= buffer->used) {
if (status == fl_fss_found_object || status == fl_fss_found_object_no_content) {
objects->used++;
}
if (found_data) {
- if (input->start >= buffer->used) {
+ if (location->start >= buffer->used) {
return f_none_on_eos;
}
return f_none_on_stop;
}
else {
- if (input->start >= buffer->used) {
+ if (location->start >= buffer->used) {
return f_no_data_on_eos;
}
if (status == fl_fss_found_object) {
found_data = f_true;
- status = fl_fss_basic_content_read(buffer, input, &contents->array[contents->used]);
+ status = fl_fss_basic_content_read(buffer, location, &contents->array[contents->used]);
if (f_status_is_error(status)) {
return status;
else if (status != fl_fss_found_object && status != fl_fss_found_content && status != fl_fss_found_no_content && status != fl_fss_found_object_no_content) {
return status;
}
- // When content is found, the input->start is incremented, if content is found at input->stop, then input->start will be > input.stop.
- else if (input->start >= input->stop || input->start >= buffer->used) {
+ // When content is found, the location->start is incremented, if content is found at location->stop, then location->start will be > location.stop.
+ else if (location->start >= location->stop || location->start >= buffer->used) {
if (status == fl_fss_found_object || status == fl_fss_found_content || status == fl_fss_found_no_content || status == fl_fss_found_object_no_content) {
objects->used++;
contents->used++;
}
- if (input->start >= buffer->used) {
+ if (location->start >= buffer->used) {
return f_none_on_eos;
}
objects->used++;
contents->used++;
- } while (input->start < f_string_max_size);
+ } while (location->start < f_string_max_size);
return f_status_is_error(f_number_overflow);
}
* f_number_overflow (with error bit) if the maximimum buffer size is reached.
*/
#ifndef _di_fll_fss_basic_read_
- extern f_return_status fll_fss_basic_read(f_string_dynamic *buffer, f_string_location *input, f_fss_objects *objects, f_fss_contents *contents);
+ extern f_return_status fll_fss_basic_read(f_string_dynamic *buffer, f_string_location *location, f_fss_objects *objects, f_fss_contents *contents);
#endif // _di_fll_fss_basic_read_
/**
#endif
#ifndef _di_fll_fss_basic_list_read_
- f_return_status fll_fss_basic_list_read(f_string_dynamic *buffer, f_string_location *input, f_fss_objects *objects, f_fss_contents *contents) {
+ f_return_status fll_fss_basic_list_read(f_string_dynamic *buffer, f_string_location *location, f_fss_objects *objects, f_fss_contents *contents) {
#ifndef _di_level_2_parameter_checking_
if (buffer == 0) return f_status_set_error(f_invalid_parameter);
+ if (location == 0) return f_status_set_error(f_invalid_parameter);
if (objects == 0) return f_status_set_error(f_invalid_parameter);
if (contents == 0) return f_status_set_error(f_invalid_parameter);
#endif // _di_level_2_parameter_checking_
}
do {
- status = fl_fss_basic_list_object_read(buffer, input, &objects->array[objects->used]);
+ status = fl_fss_basic_list_object_read(buffer, location, &objects->array[objects->used]);
if (f_status_is_error(status)) {
return status;
}
- if (input->start >= input->stop || input->start >= buffer->used) {
+ if (location->start >= location->stop || location->start >= buffer->used) {
if (status == fl_fss_found_object || status == fl_fss_found_object_no_content) {
objects->used++;
}
if (found_data) {
- if (input->start >= buffer->used) {
+ if (location->start >= buffer->used) {
return f_none_on_eos;
}
return f_none_on_stop;
}
else {
- if (input->start >= buffer->used) {
+ if (location->start >= buffer->used) {
return f_no_data_on_eos;
}
if (status == fl_fss_found_object) {
found_data = f_true;
- status = fl_fss_basic_list_content_read(buffer, input, &contents->array[contents->used]);
+ status = fl_fss_basic_list_content_read(buffer, location, &contents->array[contents->used]);
if (f_status_is_error(status)) {
return status;
else if (status != fl_fss_found_object && status != fl_fss_found_content && status != fl_fss_found_no_content && status != fl_fss_found_object_no_content) {
return status;
}
- // When content is found, the input->start is incremented, if content is found at input->stop, then input->start will be > input.stop.
- else if (input->start >= input->stop || input->start >= buffer->used) {
+ // When content is found, the location->start is incremented, if content is found at location->stop, then location->start will be > location.stop.
+ else if (location->start >= location->stop || location->start >= buffer->used) {
if (status == fl_fss_found_object || status == fl_fss_found_content || status == fl_fss_found_no_content || status == fl_fss_found_object_no_content) {
objects->used++;
contents->used++;
}
- if (input->start >= buffer->used) {
+ if (location->start >= buffer->used) {
return f_none_on_eos;
}
objects->used++;
contents->used++;
- } while (input->start < f_string_max_size);
+ } while (location->start < f_string_max_size);
return f_status_is_error(f_number_overflow);
}
* f_number_overflow (with error bit) if the maximimum buffer size is reached.
*/
#ifndef _di_fll_fss_basic_list_read_
- extern f_return_status fll_fss_basic_list_read(f_string_dynamic *buffer, f_string_location *input, f_fss_objects *objects, f_fss_contents *contents);
+ extern f_return_status fll_fss_basic_list_read(f_string_dynamic *buffer, f_string_location *location, f_fss_objects *objects, f_fss_contents *contents);
#endif // _di_fll_fss_basic_list_read_
/**
#endif
#ifndef _di_fll_fss_extended_read_
- f_return_status fll_fss_extended_read(f_string_dynamic *buffer, f_string_location *input, f_fss_objects *objects, f_fss_contents *contents) {
+ f_return_status fll_fss_extended_read(f_string_dynamic *buffer, f_string_location *location, f_fss_objects *objects, f_fss_contents *contents) {
#ifndef _di_level_2_parameter_checking_
if (buffer == 0) return f_status_set_error(f_invalid_parameter);
+ if (location == 0) return f_status_set_error(f_invalid_parameter);
if (objects == 0) return f_status_set_error(f_invalid_parameter);
if (contents == 0) return f_status_set_error(f_invalid_parameter);
#endif // _di_level_2_parameter_checking_
}
do {
- status = fl_fss_extended_object_read(buffer, input, &objects->array[objects->used]);
+ status = fl_fss_extended_object_read(buffer, location, &objects->array[objects->used]);
if (f_status_is_error(status)) {
return status;
}
- if (input->start >= input->stop || input->start >= buffer->used) {
+ if (location->start >= location->stop || location->start >= buffer->used) {
if (status == fl_fss_found_object || status == fl_fss_found_object_no_content) {
objects->used++;
}
if (found_data) {
- if (input->start >= buffer->used) {
+ if (location->start >= buffer->used) {
return f_none_on_eos;
}
return f_none_on_stop;
}
else {
- if (input->start >= buffer->used) {
+ if (location->start >= buffer->used) {
return f_no_data_on_eos;
}
if (status == fl_fss_found_object) {
found_data = f_true;
- status = fl_fss_extended_content_read(buffer, input, &contents->array[contents->used]);
+ status = fl_fss_extended_content_read(buffer, location, &contents->array[contents->used]);
if (f_status_is_error(status)) {
return status;
else if (status != fl_fss_found_object && status != fl_fss_found_content && status != fl_fss_found_no_content && status != fl_fss_found_object_no_content) {
return status;
}
- // When content is found, the input->start is incremented, if content is found at input->stop, then input->start will be > input.stop.
- else if (input->start >= input->stop || input->start >= buffer->used) {
+ // When content is found, the location->start is incremented, if content is found at location->stop, then location->start will be > location.stop.
+ else if (location->start >= location->stop || location->start >= buffer->used) {
if (status == fl_fss_found_object || status == fl_fss_found_content || status == fl_fss_found_no_content || status == fl_fss_found_object_no_content) {
objects->used++;
contents->used++;
}
- if (input->start >= buffer->used) {
+ if (location->start >= buffer->used) {
return f_none_on_eos;
}
objects->used++;
contents->used++;
- } while (input->start < f_string_max_size);
+ } while (location->start < f_string_max_size);
return f_status_is_error(f_number_overflow);
}
* f_number_overflow (with error bit) if the maximimum buffer size is reached.
*/
#ifndef _di_fll_fss_extended_read_
- extern f_return_status fll_fss_extended_read(f_string_dynamic *buffer, f_string_location *input, f_fss_objects *objects, f_fss_contents *contents);
+ extern f_return_status fll_fss_extended_read(f_string_dynamic *buffer, f_string_location *location, f_fss_objects *objects, f_fss_contents *contents);
#endif // _di_fll_fss_extended_read_
/**
#endif
#ifndef _di_fll_fss_extended_list_read_
- f_return_status fll_fss_extended_list_read(f_string_dynamic *buffer, f_string_location *input, f_fss_nest *nest) {
+ f_return_status fll_fss_extended_list_read(f_string_dynamic *buffer, f_string_location *location, f_fss_nest *nest) {
#ifndef _di_level_3_parameter_checking_
if (buffer == 0) return f_status_set_error(f_invalid_parameter);
+ if (location == 0) return f_status_set_error(f_invalid_parameter);
if (nest == 0) return f_status_set_error(f_invalid_parameter);
#endif // _di_level_3_parameter_checking_
}
}
- status = fl_fss_extended_list_object_read(buffer, input, &nest->depth[0].array[nest->depth[0].used].object);
+ status = fl_fss_extended_list_object_read(buffer, location, &nest->depth[0].array[nest->depth[0].used].object);
if (f_status_is_error(status)) {
return status;
}
- if (input->start >= input->stop || input->start >= buffer->used) {
+ if (location->start >= location->stop || location->start >= buffer->used) {
if (status == fl_fss_found_object || status == fl_fss_found_object_no_content) {
// extended list requires content closure, so this could be an error.
return fl_fss_found_object_no_content;
}
if (found_data) {
- if (input->start >= buffer->used) {
+ if (location->start >= buffer->used) {
return f_none_on_eos;
}
return f_none_on_stop;
}
else {
- if (input->start >= buffer->used) {
+ if (location->start >= buffer->used) {
return f_no_data_on_eos;
}
if (status == fl_fss_found_object) {
found_data = f_true;
- status = fl_fss_extended_list_content_read(buffer, input, nest);
+ status = fl_fss_extended_list_content_read(buffer, location, nest);
break;
}
else if (status != fl_fss_found_object && status != fl_fss_found_content && status != fl_fss_found_no_content && status != fl_fss_found_object_no_content) {
return status;
}
- // When content is found, the input->start is incremented, if content is found at input->stop, then input->start will be > input.stop.
- else if (input->start >= input->stop || input->start >= buffer->used) {
- if (input->start >= buffer->used) {
+ // When content is found, the location->start is incremented, if content is found at location->stop, then location->start will be > location.stop.
+ else if (location->start >= location->stop || location->start >= buffer->used) {
+ if (location->start >= buffer->used) {
return f_none_on_eos;
}
return f_none_on_stop;
}
- } while (input->start < f_string_max_size);
+ } while (location->start < f_string_max_size);
return f_status_is_error(f_number_overflow);
}
* f_number_overflow (with error bit) if the maximimum buffer size is reached.
*/
#ifndef _di_fll_fss_extended_list_read_
- extern f_return_status fll_fss_extended_list_read(f_string_dynamic *buffer, f_string_location *input, f_fss_nest *nest);
+ extern f_return_status fll_fss_extended_list_read(f_string_dynamic *buffer, f_string_location *location, f_fss_nest *nest);
#endif // _di_fll_fss_extended_list_read_
/**