"eoa" or "End of Array" is being experimentally added as a compliment of "eos" or "End of String".
Remove stale status code from before I fully embraced error and warning bits.
Add more append functions.
Make existing functions more consistent, checking for array overflows, returning F_array_too_large when appropriate.
Update the comments while I am at it.
Relocate the f_string_dynamic_* functions in string.h and string.c to string-dynamic.h and string-dynamic.c, respectively.
This requires that the string_dynamic.h header depend on string_range.h
F_empty_not,
F_encoding,
F_encoding_not,
+ F_eoa,
+ F_eoa_not,
F_eof,
F_eof_not,
F_eol,
F_buffer_too_small,
F_complete_not_utf,
F_complete_not_utf_block,
+ F_complete_not_utf_eoa,
F_complete_not_utf_eof,
F_complete_not_utf_eol,
F_complete_not_utf_eos,
F_complete_not_utf_stop,
F_none_block,
+ F_none_eoa,
F_none_eof,
F_none_eol,
F_none_eos,
F_data,
F_data_not,
F_data_not_block,
+ F_data_not_eoa,
F_data_not_eof,
F_data_not_eol,
F_data_not_eos,
F_terminated,
F_terminated_not,
F_terminated_not_block,
+ F_terminated_not_eoa,
F_terminated_not_eof,
F_terminated_not_eol,
F_terminated_not_eos,
F_terminated_not_group,
F_terminated_not_group_block,
+ F_terminated_not_group_eoa,
F_terminated_not_group_eof,
F_terminated_not_group_eol,
F_terminated_not_group_eos,
F_terminated_not_group_stop,
F_terminated_not_nest,
F_terminated_not_nest_block,
+ F_terminated_not_nest_eoa,
F_terminated_not_nest_eof,
F_terminated_not_nest_eol,
F_terminated_not_nest_eos,
extern "C" {
#endif
-#if !defined(_di_f_string_append_) || !defined(_di_f_string_dynamic_append_) || !defined(_di_f_string_dynamic_mash_) || !defined(_di_f_string_mash_)
+#if !defined(_di_f_string_append_) || !defined(_di_f_string_dynamic_append_) || !defined(_di_f_string_dynamic_mash_) || !defined(_di_f_string_mash_) || !defined(f_string_map_multis_append) || !defined(f_string_maps_append)
f_status_t private_f_string_append(const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination) {
if (destination->used + length > destination->size) {
return F_none;
}
-#endif // !defined(_di_f_string_append_) || !defined(_di_f_string_dynamic_append_) || !defined(_di_f_string_dynamic_mash_) || !defined(_di_f_string_mash_)
+#endif // !defined(_di_f_string_append_) || !defined(_di_f_string_dynamic_append_) || !defined(_di_f_string_dynamic_mash_) || !defined(_di_f_string_mash_) || !defined(f_string_map_multis_append) || !defined(f_string_maps_append)
#if !defined(_di_f_string_append_nulless_) || !defined(_di_f_string_dynamic_append_nulless_) || !defined(_di_f_string_dynamic_mash_nulless_) || !defined(_di_f_string_mash_nulless_)
f_status_t private_f_string_append_nulless(const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination) {
#if !defined(_di_f_string_dynamics_adjust_) || !defined(_di_f_string_dynamics_decimate_by_)
f_status_t private_f_string_dynamics_adjust(const f_array_length_t length, f_string_dynamics_t *dynamics) {
+
+ if (dynamics->used + length > f_array_length_t_size) {
+ return F_status_set_error(F_array_too_large);
+ }
+
f_status_t status = F_none;
for (f_array_length_t i = length; i < dynamics->size; ++i) {
}
#endif // !defined(_di_f_string_dynamics_adjust_) || !defined(_di_f_string_dynamics_decimate_by_)
+#if !defined(_di_f_string_dynamics_append_) || !defined(_di_f_string_map_multis_append_)
+ f_status_t private_f_string_dynamics_append(const f_string_dynamics_t source, f_string_dynamics_t *destination) {
+ f_status_t status = F_none;
+
+ if (destination->used + source.used > destination->size) {
+ status = private_f_string_dynamics_adjust(destination->used + source.used, destination);
+ if (F_status_is_error(status)) return status;
+ }
+
+ for (f_array_length_t i = 0; i < source.used; ++i, ++destination->used) {
+
+ destination->array[destination->used].used = 0;
+
+ if (source.array[i].used) {
+ status = private_f_string_append(source.array[i].string, source.array[i].used, &destination->array[destination->used]);
+ if (F_status_is_error(status)) return status;
+ }
+ } // for
+
+ return F_none;
+ }
+#endif // !defined(_di_f_string_dynamics_append_) || !defined(_di_f_string_map_multis_append_)
+
#if !defined(_di_f_string_dynamics_decrease_by_) || !defined(_di_f_string_dynamics_increase_) || !defined(_di_f_string_dynamics_increase_by_)
f_status_t private_f_string_dynamics_resize(const f_array_length_t length, f_string_dynamics_t *dynamics) {
+
+ if (dynamics->used + length > f_array_length_t_size) {
+ return F_status_set_error(F_array_too_large);
+ }
+
f_status_t status = F_none;
for (f_array_length_t i = length; i < dynamics->size; ++i) {
#if !defined(_di_f_string_map_multis_adjust_) || !defined(_di_f_string_map_multis_decimate_by_)
f_status_t private_f_string_map_multis_adjust(const f_array_length_t length, f_string_map_multis_t *map_multis) {
+
+ if (map_multis->used + length > f_array_length_t_size) {
+ return F_status_set_error(F_array_too_large);
+ }
+
f_status_t status = F_none;
for (f_array_length_t i = length; i < map_multis->size; ++i) {
#if !defined(_di_f_string_map_multis_decrease_by_) || !defined(_di_f_string_map_multis_increase_) || !defined(_di_f_string_map_multis_increase_by_) || !defined(_di_f_string_map_multis_terminate_) || !defined(_di_f_string_map_multis_terminate_after_)
f_status_t private_f_string_map_multis_resize(const f_array_length_t length, f_string_map_multis_t *map_multis) {
+
+ if (map_multis->used + length > f_array_length_t_size) {
+ return F_status_set_error(F_array_too_large);
+ }
+
f_status_t status = F_none;
for (f_array_length_t i = length; i < map_multis->size; ++i) {
#if !defined(_di_f_string_maps_adjust_) || !defined(_di_f_string_maps_decimate_by_)
f_status_t private_f_string_maps_adjust(const f_array_length_t length, f_string_maps_t *maps) {
+
+ if (maps->used + length > f_array_length_t_size) {
+ return F_status_set_error(F_array_too_large);
+ }
+
f_status_t status = F_none;
for (f_array_length_t i = length; i < maps->size; ++i) {
#if !defined(_di_f_string_maps_decrease_by_) || !defined(_di_f_string_maps_increase_) || !defined(_di_f_string_maps_increase_by_) || !defined(_di_f_string_maps_terminate_) || !defined(_di_f_string_maps_terminate_after_)
f_status_t private_f_string_maps_resize(const f_array_length_t length, f_string_maps_t *maps) {
+
+ if (maps->used + length > f_array_length_t_size) {
+ return F_status_set_error(F_array_too_large);
+ }
+
f_status_t status = F_none;
for (f_array_length_t i = length; i < maps->size; ++i) {
#if !defined(_di_f_string_quantitys_adjust_) || !defined(_di_f_string_quantitys_decimate_by_)
f_status_t private_f_string_quantitys_adjust(const f_array_length_t length, f_string_quantitys_t *quantitys) {
+ if (quantitys->used + length > f_array_length_t_size) {
+ return F_status_set_error(F_array_too_large);
+ }
+
const f_status_t status = f_memory_adjust(quantitys->size, length, sizeof(f_string_quantity_t), (void **) & quantitys->array);
if (F_status_is_error_not(status)) {
#if !defined(_di_f_string_quantitys_decrease_) || !defined(_di_f_string_quantitys_decrease_by_) || !defined(_di_f_string_quantitys_increase_) || !defined(_di_f_string_quantitys_increase_by_) || !defined(_di_f_string_quantitys_terminate_) || !defined(_di_f_string_quantitys_terminate_after_)
f_status_t private_f_string_quantitys_resize(const f_array_length_t length, f_string_quantitys_t *quantitys) {
+ if (quantitys->used + length > f_array_length_t_size) {
+ return F_status_set_error(F_array_too_large);
+ }
+
const f_status_t status = f_memory_resize(quantitys->size, length, sizeof(f_string_quantity_t), (void **) & quantitys->array);
if (F_status_is_error_not(status)) {
#if !defined(_di_f_string_quantityss_adjust_) || !defined(_di_f_string_quantityss_decimate_by_)
f_status_t private_f_string_quantityss_adjust(const f_array_length_t length, f_string_quantityss_t *quantityss) {
+
+ if (quantityss->used + length > f_array_length_t_size) {
+ return F_status_set_error(F_array_too_large);
+ }
+
f_status_t status = F_none;
for (f_array_length_t i = length; i < quantityss->size; ++i) {
#if !defined(_di_f_string_quantityss_decrease_) || !defined(_di_f_string_quantityss_decrease_by_) || !defined(_di_f_string_quantityss_increase_) || !defined(_di_f_string_quantityss_increase_by_) || !defined(_di_f_string_quantityss_terminate_) || !defined(_di_f_string_quantityss_terminate_after_)
f_status_t private_f_string_quantityss_resize(const f_array_length_t length, f_string_quantityss_t *quantityss) {
+
+ if (quantityss->used + length > f_array_length_t_size) {
+ return F_status_set_error(F_array_too_large);
+ }
+
f_status_t status = F_none;
for (f_array_length_t i = length; i < quantityss->size; ++i) {
#if !defined(_di_f_string_ranges_adjust_) || !defined(_di_f_string_ranges_decimate_by_)
f_status_t private_f_string_ranges_adjust(const f_array_length_t length, f_string_ranges_t *ranges) {
+ if (ranges->used + length > f_array_length_t_size) {
+ return F_status_set_error(F_array_too_large);
+ }
+
const f_status_t status = f_memory_adjust(ranges->size, length, sizeof(f_string_range_t), (void **) & ranges->array);
if (F_status_is_error_not(status)) {
#if !defined(_di_f_string_ranges_decrease_) || !defined(_di_f_string_ranges_decrease_by_) || !defined(_di_f_string_ranges_increase_) || !defined(_di_f_string_ranges_increase_by_) || !defined(_di_f_string_ranges_terminate_) || !defined(_di_f_string_ranges_terminate_after_)
f_status_t private_f_string_ranges_resize(const f_array_length_t length, f_string_ranges_t *ranges) {
+ if (ranges->used + length > f_array_length_t_size) {
+ return F_status_set_error(F_array_too_large);
+ }
+
const f_status_t status = f_memory_resize(ranges->size, length, sizeof(f_string_range_t), (void **) & ranges->array);
if (F_status_is_error_not(status)) {
#if !defined(_di_f_string_rangess_adjust_) || !defined(_di_f_string_rangess_decimate_by_)
f_status_t private_f_string_rangess_adjust(const f_array_length_t length, f_string_rangess_t *rangess) {
+
+ if (rangess->used + length > f_array_length_t_size) {
+ return F_status_set_error(F_array_too_large);
+ }
+
f_status_t status = F_none;
for (f_array_length_t i = length; i < rangess->size; ++i) {
#if !defined(_di_f_string_rangess_decrease_) || !defined(_di_f_string_rangess_decrease_by_) || !defined(_di_f_string_rangess_increase_) || !defined(_di_f_string_rangess_increase_by_) || !defined(_di_f_string_rangess_terminate_) || !defined(_di_f_string_rangess_terminate_after_)
f_status_t private_f_string_rangess_resize(const f_array_length_t length, f_string_rangess_t *rangess) {
+
+ if (rangess->used + length > f_array_length_t_size) {
+ return F_status_set_error(F_array_too_large);
+ }
+
f_status_t status = F_none;
for (f_array_length_t i = length; i < rangess->size; ++i) {
#if !defined(_di_f_string_triples_adjust_) || !defined(_di_f_string_triples_decimate_by_)
f_status_t private_f_string_triples_adjust(const f_array_length_t length, f_string_triples_t *triples) {
+
+ if (triples->used + length > f_array_length_t_size) {
+ return F_status_set_error(F_array_too_large);
+ }
+
f_status_t status = F_none;
for (f_array_length_t i = length; i < triples->size; ++i) {
#if !defined(_di_f_string_triples_decrease_) || !defined(_di_f_string_triples_decrease_by_) || !defined(_di_f_string_triples_increase_) || !defined(_di_f_string_triples_increase_by_) || !defined(_di_f_string_triples_terminate_) || !defined(_di_f_string_triples_terminate_after_)
f_status_t private_f_string_triples_resize(const f_array_length_t length, f_string_triples_t *triples) {
+
+ if (triples->used + length > f_array_length_t_size) {
+ return F_status_set_error(F_array_too_large);
+ }
+
f_status_t status = F_none;
for (f_array_length_t i = length; i < triples->size; ++i) {
*
* @return
* F_none on success.
- * F_data_not if source length is 0.
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
- * F_string_too_large (with error bit) if the combined string is too large.
*
- * @return
- * F_none on success.
+ * F_string_too_large (with error bit) if the combined string is too large.
*
- * Errors (with error bit) from: private_f_string_dynamic_increase_by().
+ * Errors (with error bit) from: f_memory_resize().
*
* @see memcpy()
*
* @see f_string_append()
* @see f_string_dynamic_append()
* @see f_string_dynamic_mash()
+ * @see f_string_map_multis_append()
+ * @see f_string_maps_append()
* @see f_string_mash()
- *
- * @see private_f_string_dynamic_increase_by()
*/
-#if !defined(_di_f_string_append_) || !defined(_di_f_string_dynamic_append_) || !defined(_di_f_string_dynamic_mash_) || !defined(_di_f_string_mash_)
+#if !defined(_di_f_string_append_) || !defined(_di_f_string_dynamic_append_) || !defined(_di_f_string_dynamic_mash_) || !defined(_di_f_string_mash_) || !defined(f_string_map_multis_append) || !defined(f_string_maps_append)
extern f_status_t private_f_string_append(const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination) f_gcc_attribute_visibility_internal;
-#endif // !defined(_di_f_string_append_) || !defined(_di_f_string_dynamic_append_) || !defined(_di_f_string_dynamic_mash_) || !defined(_di_f_string_mash_)
+#endif // !defined(_di_f_string_append_) || !defined(_di_f_string_dynamic_append_) || !defined(_di_f_string_dynamic_mash_) || !defined(_di_f_string_mash_) || !defined(f_string_map_multis_append) || !defined(f_string_maps_append)
/**
* Private implementation of f_string_append_nulless().
* @return
* F_none on success.
*
- * Errors (with error bit) from: private_f_string_dynamic_increase_by().
+ * F_string_too_large (with error bit) if the combined string is too large.
*
* @see memcpy()
*
* @see f_string_dynamic_append_nulless()
* @see f_string_dynamic_mash_nulless()
* @see f_string_mash_nulless()
- *
- * @see private_f_string_dynamic_increase_by()
*/
#if !defined(_di_f_string_append_nulless_) || !defined(_di_f_string_dynamic_append_nulless_) || !defined(_di_f_string_dynamic_mash_nulless_) || !defined(_di_f_string_mash_nulless_)
extern f_status_t private_f_string_append_nulless(const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination) f_gcc_attribute_visibility_internal;
* @return
* F_none on success.
* F_data_not on success, but there is no reason to increase size (used + amount <= size).
+ *
* F_string_too_large (with error bit) if the combined string is too large.
*
- * Errors (with error bit) from: private_f_string_dynamic_resize().
+ * Errors (with error bit) from: f_memory_resize().
*
* @see memcpy()
*
* @return
* F_none on success.
*
+ * F_array_too_large (with error bit) if the combined array is too large.
+ *
* Errors (with error bit) from: f_memory_adjust().
- * Errors (with error bit) from: private_f_string_dynamic_adjust().
*
* @see f_memory_adjust()
* @see f_string_dynamics_adjust()
* @see f_string_dynamics_decimate_by()
- *
- * @see private_f_string_dynamic_adjust()
*/
#if !defined(_di_f_string_dynamics_adjust_) || !defined(_di_f_string_dynamics_decimate_by_)
extern f_status_t private_f_string_dynamics_adjust(const f_array_length_t length, f_string_dynamics_t *strings) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_f_string_dynamics_adjust_) || !defined(_di_f_string_dynamics_decimate_by_)
/**
+ * Private implementation for appending.
+ *
+ * Intended to be shared to each of the different implementation variations.
+ *
+ * @param source
+ * The source strings to append.
+ * @param destination
+ * The destination strings the source is appended onto.
+ *
+ * @return
+ * F_none on success.
+ *
+ * F_array_too_large (with error bit) if the combined array is too large.
+ *
+ * Errors (with error bit) from: f_memory_adjust().
+ *
+ * @see f_string_dynamics_append()
+ * @see f_string_map_multis_append()
+ */
+#if !defined(_di_f_string_dynamics_append_) || !defined(_di_f_string_map_multis_append_)
+ extern f_status_t private_f_string_dynamics_append(const f_string_dynamics_t source, f_string_dynamics_t *destination) f_gcc_attribute_visibility_internal;
+#endif // !defined(_di_f_string_dynamics_append_) || !defined(_di_f_string_map_multis_append_)
+
+/**
* Private implementation for resizing.
*
* Intended to be shared to each of the different implementation variations.
* @return
* F_none on success.
*
+ * F_array_too_large (with error bit) if the combined array is too large.
+ *
* Errors (with error bit) from: f_memory_resize().
- * Errors (with error bit) from: private_f_string_dynamic_resize().
*
* @see f_memory_resize()
* @see f_string_dynamics_decrease_by()
* @see f_string_dynamics_increase()
* @see f_string_dynamics_increase_by()
- *
- * @see private_f_string_dynamic_resize()
*/
#if !defined(_di_f_string_dynamics_decrease_by_) || !defined(_di_f_string_dynamics_increase_) || !defined(_di_f_string_dynamics_increase_by_)
extern f_status_t private_f_string_dynamics_resize(const f_array_length_t length, f_string_dynamics_t *strings) f_gcc_attribute_visibility_internal;
* @return
* F_none on success.
*
+ * F_array_too_large (with error bit) if the combined array is too large.
+ *
* Errors (with error bit) from: f_memory_adjust().
- * Errors (with error bit) from: private_f_string_dynamic_adjust().
*
* @see f_memory_adjust()
* @see f_string_map_multis_adjust()
- *
- * @see private_f_string_dynamic_adjust()
*/
#if !defined(_di_f_string_map_multis_adjust_) || !defined(_di_f_string_map_multis_decimate_by_)
extern f_status_t private_f_string_map_multis_adjust(const f_array_length_t length, f_string_map_multis_t *map_multis) f_gcc_attribute_visibility_internal;
* @return
* F_none on success.
*
+ * F_array_too_large (with error bit) if the combined array is too large.
+ *
* Errors (with error bit) from: f_memory_resize().
- * Errors (with error bit) from: private_f_string_dynamic_resize().
*
* @see f_memory_adjust()
* @see f_string_map_multis_decrease_by()
* @see f_string_map_multis_increase_by()
* @see f_string_map_multis_terminate()
* @see f_string_map_multis_terminate_after()
- *
- * @see private_f_string_dynamic_resize()
*/
#if !defined(_di_f_string_map_multis_decrease_by_) || !defined(_di_f_string_map_multis_increase_) || !defined(_di_f_string_map_multis_increase_by_) || !defined(_di_f_string_map_multis_terminate_) || !defined(_di_f_string_map_multis_terminate_after_)
extern f_status_t private_f_string_map_multis_resize(const f_array_length_t length, f_string_map_multis_t *map_multis) f_gcc_attribute_visibility_internal;
* @return
* F_none on success.
*
+ * F_array_too_large (with error bit) if the combined array is too large.
+ *
* Errors (with error bit) from: f_memory_adjust().
- * Errors (with error bit) from: private_f_string_dynamic_adjust().
*
* @see f_memory_adjust()
* @see f_string_maps_adjust()
- *
- * @see private_f_string_dynamic_adjust()
*/
#if !defined(_di_f_string_maps_adjust_) || !defined(_di_f_string_maps_decimate_by_)
extern f_status_t private_f_string_maps_adjust(const f_array_length_t length, f_string_maps_t *maps) f_gcc_attribute_visibility_internal;
* @return
* F_none on success.
*
+ * F_array_too_large (with error bit) if the combined array is too large.
+ *
* Errors (with error bit) from: f_memory_resize().
- * Errors (with error bit) from: private_f_string_dynamic_resize().
*
* @see f_memory_adjust()
* @see f_string_maps_decrease_by()
* @see f_string_maps_increase_by()
* @see f_string_maps_terminate()
* @see f_string_maps_terminate_after()
- *
- * @see private_f_string_dynamic_resize()
*/
#if !defined(_di_f_string_maps_decrease_by_) || !defined(_di_f_string_maps_increase_) || !defined(_di_f_string_maps_increase_by_) || !defined(_di_f_string_maps_terminate_) || !defined(_di_f_string_maps_terminate_after_)
extern f_status_t private_f_string_maps_resize(const f_array_length_t length, f_string_maps_t *maps) f_gcc_attribute_visibility_internal;
*
* @return
* F_none on success.
+ *
* F_string_too_large (with error bit) if the combined string is too large.
*
- * Errors (with error bit) from: private_f_string_dynamic_increase_by().
+ * Errors (with error bit) from: f_memory_resize().
*
* @see memcopy()
* @see memmove()
* @see f_string_mish()
* @see f_string_prepend_assure()
* @see f_string_prepend()
- *
- * @see private_f_string_dynamic_increase_by()
*/
#if !defined(_di_f_string_dynamic_mish_) || !defined(_di_f_string_dynamic_partial_mish_) || !defined(_di_f_string_dynamic_partial_prepend_assure_) || !defined(_di_f_string_dynamic_partial_prepend_) || !defined(_di_f_string_dynamic_prepend_assure_) || !defined(_di_f_string_dynamic_prepend_) || !defined(_di_f_string_mish_) || !defined(_di_f_string_prepend_assure_) || !defined(_di_f_string_prepend_)
extern f_status_t private_f_string_prepend(const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination) f_gcc_attribute_visibility_internal;
*
* @return
* F_none on success.
+ *
* F_string_too_large (with error bit) if the combined string is too large.
*
- * Errors (with error bit) from: private_f_string_dynamic_increase_by().
+ * Errors (with error bit) from: f_memory_resize().
*
* @see memcopy()
* @see memmove()
* @see f_string_mish_nulless()
* @see f_string_prepend_assure_nulless()
* @see f_string_prepend_nulless()
- *
- * @see private_f_string_dynamic_increase_by()
*/
#if !defined(_di_f_string_dynamic_mish_nulless_) || !defined(_di_f_string_dynamic_partial_mish_nulless_) || !defined(_di_f_string_dynamic_partial_prepend_assure_nulless_) || !defined(_di_f_string_dynamic_partial_prepend_nulless_) || !defined(_di_f_string_dynamic_prepend_assure_nulless_) || !defined(_di_f_string_dynamic_prepend_nulless_) || !defined(_di_f_string_mish_nulless_) || !defined(_di_f_string_prepend_assure_nulless_) || !defined(_di_f_string_prepend_nulless_)
extern f_status_t private_f_string_prepend_nulless(const f_string_t source, f_array_length_t length, f_string_dynamic_t *destination) f_gcc_attribute_visibility_internal;
* @return
* F_none on success.
*
+ * F_array_too_large (with error bit) if the combined array is too large.
+ *
* Errors (with error bit) from: f_memory_adjust().
- * Errors (with error bit) from: private_f_string_dynamic_adjust().
*
* @see f_memory_adjust()
* @see f_string_quantitys_adjust()
* @see f_string_quantitys_decimate_by()
- * @see private_f_string_dynamic_adjust()
*/
#if !defined(_di_f_string_quantitys_adjust_) || !defined(_di_f_string_quantitys_decimate_by_)
extern f_status_t private_f_string_quantitys_adjust(const f_array_length_t length, f_string_quantitys_t *quantitys) f_gcc_attribute_visibility_internal;
* @return
* F_none on success.
*
+ * F_array_too_large (with error bit) if the combined array is too large.
+ *
* Errors (with error bit) from: f_memory_resize().
- * Errors (with error bit) from: private_f_string_dynamic_adjust().
*
* @see f_memory_resize()
* @see f_string_quantitys_decrease_by()
* @see f_string_quantitys_increase_by()
* @see f_string_quantitys_terminate()
* @see f_string_quantitys_terminate_after()
- * @see private_f_string_dynamic_resize()
*/
#if !defined(_di_f_string_quantitys_decrease_by_) || !defined(_di_f_string_quantitys_increase_) || !defined(_di_f_string_quantitys_increase_by_) || !defined(_di_f_string_quantitys_terminate_) || !defined(_di_f_string_quantitys_terminate_after_)
extern f_status_t private_f_string_quantitys_resize(const f_array_length_t length, f_string_quantitys_t *quantitys) f_gcc_attribute_visibility_internal;
* @return
* F_none on success.
*
+ * F_array_too_large (with error bit) if the combined array is too large.
+ *
* Errors (with error bit) from: f_memory_adjust().
- * Errors (with error bit) from: private_f_string_dynamic_adjust().
*
* @see f_memory_adjust()
* @see f_string_quantityss_adjust()
* @see f_string_quantityss_decimate_by()
- * @see private_f_string_dynamic_adjust()
*/
#if !defined(_di_f_string_quantityss_adjust_) || !defined(_di_f_string_quantityss_decimate_by_)
extern f_status_t private_f_string_quantityss_adjust(const f_array_length_t length, f_string_quantityss_t *quantityss) f_gcc_attribute_visibility_internal;
* @return
* F_none on success.
*
+ * F_array_too_large (with error bit) if the combined array is too large.
+ *
* Errors (with error bit) from: f_memory_resize().
- * Errors (with error bit) from: private_f_string_dynamic_adjust().
*
* @see f_memory_resize()
* @see f_string_quantityss_decrease_by()
* @see f_string_quantityss_increase_by()
* @see f_string_quantityss_terminate()
* @see f_string_quantityss_terminate_after()
- * @see private_f_string_dynamic_resize()
*/
#if !defined(_di_f_string_quantityss_decrease_by_) || !defined(_di_f_string_quantityss_increase_) || !defined(_di_f_string_quantityss_increase_by_) || !defined(_di_f_string_quantityss_terminate_) || !defined(_di_f_string_quantityss_terminate_after_)
extern f_status_t private_f_string_quantityss_resize(const f_array_length_t length, f_string_quantityss_t *quantityss) f_gcc_attribute_visibility_internal;
* @return
* F_none on success.
*
+ * F_array_too_large (with error bit) if the combined array is too large.
+ *
* Errors (with error bit) from: f_memory_adjust().
- * Errors (with error bit) from: private_f_string_dynamic_adjust().
*
* @see f_memory_adjust()
* @see f_string_ranges_adjust()
* @see f_string_ranges_decimate_by()
- * @see private_f_string_dynamic_adjust()
*/
#if !defined(_di_f_string_ranges_adjust_) || !defined(_di_f_string_ranges_decimate_by_)
extern f_status_t private_f_string_ranges_adjust(const f_array_length_t length, f_string_ranges_t *ranges) f_gcc_attribute_visibility_internal;
* @return
* F_none on success.
*
+ * F_array_too_large (with error bit) if the combined array is too large.
+ *
* Errors (with error bit) from: f_memory_resize().
- * Errors (with error bit) from: private_f_string_dynamic_adjust().
*
* @see f_memory_resize()
* @see f_string_ranges_decrease_by()
* @see f_string_ranges_increase_by()
* @see f_string_ranges_terminate()
* @see f_string_ranges_terminate_after()
- * @see private_f_string_dynamic_resize()
*/
#if !defined(_di_f_string_ranges_decrease_by_) || !defined(_di_f_string_ranges_increase_) || !defined(_di_f_string_ranges_increase_by_) || !defined(_di_f_string_ranges_terminate_) || !defined(_di_f_string_ranges_terminate_after_)
extern f_status_t private_f_string_ranges_resize(const f_array_length_t length, f_string_ranges_t *ranges) f_gcc_attribute_visibility_internal;
* @return
* F_none on success.
*
+ * F_array_too_large (with error bit) if the combined array is too large.
+ *
* Errors (with error bit) from: f_memory_adjust().
- * Errors (with error bit) from: private_f_string_dynamic_adjust().
*
* @see f_memory_adjust()
* @see f_string_rangess_adjust()
* @see f_string_rangess_decimate_by()
- * @see private_f_string_dynamic_adjust()
*/
#if !defined(_di_f_string_rangess_adjust_) || !defined(_di_f_string_rangess_decimate_by_)
extern f_status_t private_f_string_rangess_adjust(const f_array_length_t length, f_string_rangess_t *rangess) f_gcc_attribute_visibility_internal;
* @return
* F_none on success.
*
+ * F_array_too_large (with error bit) if the combined array is too large.
+ *
* Errors (with error bit) from: f_memory_resize().
- * Errors (with error bit) from: private_f_string_dynamic_adjust().
*
* @see f_memory_resize()
* @see f_string_rangess_decrease_by()
* @see f_string_rangess_increase_by()
* @see f_string_rangess_terminate()
* @see f_string_rangess_terminate_after()
- * @see private_f_string_dynamic_resize()
*/
#if !defined(_di_f_string_rangess_decrease_by_) || !defined(_di_f_string_rangess_increase_) || !defined(_di_f_string_rangess_increase_by_) || !defined(_di_f_string_rangess_terminate_) || !defined(_di_f_string_rangess_terminate_after_)
extern f_status_t private_f_string_rangess_resize(const f_array_length_t length, f_string_rangess_t *rangess) f_gcc_attribute_visibility_internal;
* @return
* F_none on success.
*
+ * F_array_too_large (with error bit) if the combined array is too large.
+ *
* Errors (with error bit) from: f_memory_adjust().
- * Errors (with error bit) from: private_f_string_dynamic_adjust().
*
* @see f_memory_adjust()
* @see f_string_triples_adjust()
* @see f_string_triples_decimate_by()
- * @see private_f_string_dynamic_adjust()
*/
#if !defined(_di_f_string_triples_adjust_) || !defined(_di_f_string_triples_decimate_by_)
extern f_status_t private_f_string_triples_adjust(const f_array_length_t length, f_string_triples_t *triples) f_gcc_attribute_visibility_internal;
* @return
* F_none on success.
*
+ * F_array_too_large (with error bit) if the combined array is too large.
+ *
* Errors (with error bit) from: f_memory_resize().
- * Errors (with error bit) from: private_f_string_dynamic_adjust().
*
* @see f_memory_resize()
* @see f_string_triples_decrease_by()
* @see f_string_triples_increase_by()
* @see f_string_triples_terminate()
* @see f_string_triples_terminate_after()
- * @see private_f_string_dynamic_resize()
*/
#if !defined(_di_f_string_triples_decrease_by_) || !defined(_di_f_string_triples_increase_) || !defined(_di_f_string_triples_increase_by_) || !defined(_di_f_string_triples_terminate_) || !defined(_di_f_string_triples_terminate_after_)
extern f_status_t private_f_string_triples_resize(const f_array_length_t length, f_string_triples_t *triples) f_gcc_attribute_visibility_internal;
}
#endif // _di_f_string_append_nulless_
-#ifndef _di_f_string_dynamic_append_
- f_status_t f_string_dynamic_append(const f_string_static_t source, f_string_dynamic_t *destination) {
- #ifndef _di_level_0_parameter_checking_
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!source.used) return F_data_not_eos;
-
- return private_f_string_append(source.string, source.used, destination);
- }
-#endif // _di_f_string_dynamic_append_
-
-#ifndef _di_f_string_dynamic_append_assure_
- f_status_t f_string_dynamic_append_assure(const f_string_static_t source, f_string_dynamic_t *destination) {
- #ifndef _di_level_0_parameter_checking_
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!source.used) return F_data_not_eos;
-
- if (destination->used < source.used) {
- return private_f_string_append(source.string, source.used, destination);
- }
-
- f_array_length_t i = 1;
- f_array_length_t j = 1;
-
- while (i <= source.used && j <= destination->used) {
- if (!source.string[source.used - i]) {
- i++;
- continue;
- }
-
- if (!destination->string[destination->used - j]) {
- j++;
- continue;
- }
-
- if (source.string[source.used - i] != destination->string[destination->used - j]) {
- return private_f_string_append(source.string, source.used, destination);
- }
-
- i++;
- j++;
- } // while
-
- return F_none;
- }
-#endif // _di_f_string_dynamic_append_assure_
-
-#ifndef _di_f_string_dynamic_append_assure_nulless_
- f_status_t f_string_dynamic_append_assure_nulless(const f_string_static_t source, f_string_dynamic_t *destination) {
- #ifndef _di_level_0_parameter_checking_
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!source.used) return F_data_not_eos;
-
- if (destination->used < source.used) {
- return private_f_string_append_nulless(source.string, source.used, destination);
- }
-
- f_array_length_t i = 1;
- f_array_length_t j = 1;
-
- while (i <= source.used && j <= destination->used) {
- if (!source.string[source.used - i]) {
- i++;
- continue;
- }
-
- if (!destination->string[destination->used - j]) {
- j++;
- continue;
- }
-
- if (source.string[source.used - i] != destination->string[destination->used - j]) {
- return private_f_string_append_nulless(source.string, source.used, destination);
- }
-
- i++;
- j++;
- } // while
-
- return F_none;
- }
-#endif // _di_f_string_dynamic_append_assure_nulless_
-
-#ifndef _di_f_string_dynamic_append_nulless_
- f_status_t f_string_dynamic_append_nulless(const f_string_static_t source, f_string_dynamic_t *destination) {
- #ifndef _di_level_0_parameter_checking_
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!source.used) return F_data_not_eos;
-
- return private_f_string_append_nulless(source.string, source.used, destination);
- }
-#endif // _di_f_string_dynamic_append_nulless_
-
-#ifndef _di_f_string_dynamic_mash_
- f_status_t f_string_dynamic_mash(const f_string_t glue, const f_array_length_t glue_length, const f_string_static_t source, f_string_dynamic_t *destination) {
- #ifndef _di_level_0_parameter_checking_
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!source.used) return F_data_not_eos;
-
- if (glue_length && destination->used) {
- const f_status_t status = private_f_string_append(glue, glue_length, destination);
- if (F_status_is_error(status)) return status;
- }
-
- return private_f_string_append(source.string, source.used, destination);
- }
-#endif // _di_f_string_dynamic_mash_
-
-#ifndef _di_f_string_dynamic_mash_nulless_
- f_status_t f_string_dynamic_mash_nulless(const f_string_t glue, const f_array_length_t glue_length, const f_string_static_t source, f_string_dynamic_t *destination) {
- #ifndef _di_level_0_parameter_checking_
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!source.used) return F_data_not_eos;
-
- if (glue_length && destination->used) {
- const f_status_t status = private_f_string_append_nulless(glue, glue_length, destination);
- if (F_status_is_error(status)) return status;
- }
-
- return private_f_string_append_nulless(source.string, source.used, destination);
- }
-#endif // _di_f_string_dynamic_mash_nulless_
-
-#ifndef _di_f_string_dynamic_mish_
- f_status_t f_string_dynamic_mish(const f_string_t glue, const f_array_length_t glue_length, const f_string_static_t source, f_string_dynamic_t *destination) {
- #ifndef _di_level_0_parameter_checking_
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!source.used) return F_data_not_eos;
-
- if (glue_length && destination->used) {
- const f_status_t status = private_f_string_prepend(glue, glue_length, destination);
- if (F_status_is_error(status)) return status;
- }
-
- return private_f_string_prepend(source.string, source.used, destination);
- }
-#endif // _di_f_string_dynamic_mish_
-
-#ifndef _di_f_string_dynamic_mish_nulless_
- f_status_t f_string_dynamic_mish_nulless(const f_string_t glue, const f_array_length_t glue_length, const f_string_static_t source, f_string_dynamic_t *destination) {
- #ifndef _di_level_0_parameter_checking_
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!source.used) return F_data_not_eos;
-
- if (glue_length && destination->used) {
- const f_status_t status = private_f_string_prepend_nulless(glue, glue_length, destination);
- if (F_status_is_error(status)) return status;
- }
-
- return private_f_string_prepend_nulless(source.string, source.used, destination);
- }
-#endif // _di_f_string_dynamic_mish_nulless_
-
-#ifndef _di_f_string_dynamic_partial_append_
- f_status_t f_string_dynamic_partial_append(const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination) {
- #ifndef _di_level_0_parameter_checking_
- if (source.used <= range.stop) return F_status_set_error(F_parameter);
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!source.used) return F_data_not_eos;
- if (range.start > range.stop) return F_data_not_stop;
-
- return private_f_string_append(source.string + range.start, (range.stop - range.start) + 1, destination);
- }
-#endif // _di_f_string_dynamic_partial_append_
-
-#ifndef _di_f_string_dynamic_partial_append_assure_
- f_status_t f_string_dynamic_partial_append_assure(const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination) {
- #ifndef _di_level_0_parameter_checking_
- if (source.used <= range.stop) return F_status_set_error(F_parameter);
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!source.used) return F_data_not_eos;
- if (range.start > range.stop) return F_data_not_stop;
-
- const f_array_length_t length = (range.stop - range.start) + 1;
-
- if (destination->used < length) {
- return private_f_string_append(source.string + range.start, length, destination);
- }
-
- f_array_length_t i = 1;
- f_array_length_t j = 1;
-
- while (i <= length && j <= destination->used) {
- if (!source.string[range.stop - i]) {
- i++;
- continue;
- }
-
- if (!destination->string[destination->used - j]) {
- j++;
- continue;
- }
-
- if (source.string[range.stop - i] != destination->string[destination->used - j]) {
- return private_f_string_append(source.string + range.start, length, destination);
- }
-
- i++;
- j++;
- } // while
- }
-#endif // _di_f_string_dynamic_partial_append_assure_
-
-#ifndef _di_f_string_dynamic_partial_append_assure_nulless_
- f_status_t f_string_dynamic_partial_append_assure_nulless(const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination) {
- #ifndef _di_level_0_parameter_checking_
- if (source.used <= range.stop) return F_status_set_error(F_parameter);
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!source.used) return F_data_not_eos;
- if (range.start > range.stop) return F_data_not_stop;
-
- const f_array_length_t length = (range.stop - range.start) + 1;
-
- if (destination->used < length) {
- return private_f_string_append_nulless(source.string + range.start, length, destination);
- }
-
- f_array_length_t i = 1;
- f_array_length_t j = 1;
-
- while (i <= length && j <= destination->used) {
- if (!source.string[range.stop - i]) {
- i++;
- continue;
- }
-
- if (!destination->string[destination->used - j]) {
- j++;
- continue;
- }
-
- if (source.string[range.stop - i] != destination->string[destination->used - j]) {
- return private_f_string_append_nulless(source.string + range.start, length, destination);
- }
-
- i++;
- j++;
- } // while
- }
-#endif // _di_f_string_dynamic_append_assure_nulless_
-
-#ifndef _di_f_string_dynamic_partial_append_nulless_
- f_status_t f_string_dynamic_partial_append_nulless(const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination) {
- #ifndef _di_level_0_parameter_checking_
- if (source.used <= range.stop) return F_status_set_error(F_parameter);
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!source.used) return F_data_not_eos;
- if (range.start > range.stop) return F_data_not_stop;
-
- return private_f_string_append_nulless(source.string + range.start, (range.stop - range.start) + 1, destination);
- }
-#endif // _di_f_string_dynamic_partial_append_nulless_
-
-#ifndef _di_f_string_dynamic_partial_mash_
- f_status_t f_string_dynamic_partial_mash(const f_string_t glue, const f_array_length_t glue_length, const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination) {
- #ifndef _di_level_0_parameter_checking_
- if (source.used <= range.stop) return F_status_set_error(F_parameter);
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!source.used) return F_data_not_eos;
- if (range.start > range.stop) return F_data_not_stop;
-
- if (glue_length && destination->used) {
- f_status_t status = private_f_string_append(glue, glue_length, destination);
- if (F_status_is_error(status)) return status;
- }
-
- return private_f_string_append(source.string + range.start, (range.stop - range.start) + 1, destination);
- }
-#endif // _di_f_string_dynamic_partial_mash_
-
-#ifndef _di_f_string_dynamic_partial_mash_nulless_
- f_status_t f_string_dynamic_partial_mash_nulless(const f_string_t glue, const f_array_length_t glue_length, const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination) {
- #ifndef _di_level_0_parameter_checking_
- if (source.used <= range.stop) return F_status_set_error(F_parameter);
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!source.used) return F_data_not_eos;
- if (range.start > range.stop) return F_data_not_stop;
-
- if (glue_length && destination->used) {
- f_status_t status = private_f_string_append_nulless(glue, glue_length, destination);
- if (F_status_is_error(status)) return status;
- }
-
- return private_f_string_append_nulless(source.string + range.start, (range.stop - range.start) + 1, destination);
- }
-#endif // _di_f_string_dynamic_partial_mash_nulless_
-
-#ifndef _di_f_string_dynamic_partial_mish_
- f_status_t f_string_partial_dynamic_mish(const f_string_t glue, const f_array_length_t glue_length, const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination) {
- #ifndef _di_level_0_parameter_checking_
- if (source.used <= range.stop) return F_status_set_error(F_parameter);
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!source.used) return F_data_not_eos;
- if (range.start > range.stop) return F_data_not_stop;
-
- if (glue_length && destination->used) {
- f_status_t status = private_f_string_prepend(glue, glue_length, destination);
- if (F_status_is_error(status)) return status;
- }
-
- return private_f_string_prepend(source.string + range.start, (range.stop - range.start) + 1, destination);
- }
-#endif // _di_f_string_dynamic_partial_mish_
-
-#ifndef _di_f_string_dynamic_partial_mish_nulless_
- f_status_t f_string_dynamic_partial_mish_nulless(const f_string_t glue, const f_array_length_t glue_length, const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination) {
- #ifndef _di_level_0_parameter_checking_
- if (source.used <= range.stop) return F_status_set_error(F_parameter);
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!source.used) return F_data_not_eos;
- if (range.start > range.stop) return F_data_not_stop;
-
- if (glue_length && destination->used) {
- f_status_t status = private_f_string_prepend_nulless(glue, glue_length, destination);
- if (F_status_is_error(status)) return status;
- }
-
- return private_f_string_prepend_nulless(source.string + range.start, (range.stop - range.start) + 1, destination);
- }
-#endif // _di_f_string_dynamic_partial_mish_nulless_
-
-#ifndef _di_f_string_dynamic_partial_prepend_
- f_status_t f_string_dynamic_partial_prepend(const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination) {
- #ifndef _di_level_0_parameter_checking_
- if (source.used <= range.stop) return F_status_set_error(F_parameter);
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!source.used) return F_data_not_eos;
- if (range.start > range.stop) return F_data_not_stop;
-
- return private_f_string_prepend(source.string + range.start, (range.stop - range.start) + 1, destination);
- }
-#endif // _di_f_string_dynamic_partial_prepend_
-
-#ifndef _di_f_string_dynamic_partial_prepend_assure_
- f_status_t f_string_dynamic_partial_prepend_assure(const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination) {
- #ifndef _di_level_0_parameter_checking_
- if (source.used <= range.stop) return F_status_set_error(F_parameter);
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!source.used) return F_data_not_eos;
- if (range.start > range.stop) return F_data_not_stop;
-
- const f_array_length_t length = (range.stop - range.start) + 1;
-
- if (destination->used < length) {
- return private_f_string_prepend(source.string + range.start, length, destination);
- }
-
- f_array_length_t i = 0;
- f_array_length_t j = 0;
-
- while (i < length && j < destination->used) {
- if (!source.string[i + range.start]) {
- i++;
- continue;
- }
-
- if (!destination->string[j]) {
- j++;
- continue;
- }
-
- if (source.string[i + range.start] != destination->string[i]) {
- return private_f_string_prepend(source.string + range.start, length, destination);
- }
-
- i++;
- j++;
- } // while
-
- return F_none;
- }
-#endif // _di_f_string_dynamic_partial_prepend_assure_
-
-#ifndef _di_f_string_dynamic_partial_prepend_assure_nulless_
- f_status_t f_string_dynamic_partial_prepend_assure_nulless(const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination) {
- #ifndef _di_level_0_parameter_checking_
- if (source.used <= range.stop) return F_status_set_error(F_parameter);
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!source.used) return F_data_not_eos;
- if (range.start > range.stop) return F_data_not_stop;
-
- const f_array_length_t length = (range.stop - range.start) + 1;
-
- if (destination->used < length) {
- return private_f_string_prepend_nulless(source.string + range.start, length, destination);
- }
-
- f_array_length_t i = 0;
- f_array_length_t j = 0;
-
- while (i < length && j < destination->used) {
- if (!source.string[i + range.start]) {
- i++;
- continue;
- }
-
- if (!destination->string[j]) {
- j++;
- continue;
- }
-
- if (source.string[i + range.start] != destination->string[i]) {
- return private_f_string_prepend_nulless(source.string + range.start, length, destination);
- }
-
- i++;
- j++;
- } // while
-
- return F_none;
- }
-#endif // _di_f_string_dynamic_partial_prepend_assure_nulless
-
-#ifndef _di_f_string_dynamic_partial_prepend_nulless_
- f_status_t f_string_dynamic_partial_prepend_nulless(const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination) {
- #ifndef _di_level_0_parameter_checking_
- if (source.used <= range.stop) return F_status_set_error(F_parameter);
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!source.used) return F_data_not_eos;
- if (range.start > range.stop) return F_data_not_stop;
-
- return private_f_string_prepend_nulless(source.string + range.start, (range.stop - range.start) + 1, destination);
- }
-#endif // _di_f_string_dynamic_partial_prepend_nulless
-
-#ifndef _di_f_string_dynamic_prepend_
- f_status_t f_string_dynamic_prepend(const f_string_static_t source, f_string_dynamic_t *destination) {
- #ifndef _di_level_0_parameter_checking_
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!source.used) return F_data_not_eos;
-
- return private_f_string_prepend(source.string, source.used, destination);
- }
-#endif // _di_f_string_dynamic_prepend_
-
-#ifndef _di_f_string_dynamic_prepend_assure_
- f_status_t f_string_dynamic_prepend_assure(const f_string_static_t source, f_string_dynamic_t *destination) {
- #ifndef _di_level_0_parameter_checking_
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!source.used) return F_data_not_eos;
-
- if (destination->used < source.used) {
- return private_f_string_prepend(source.string, source.used, destination);
- }
-
- f_array_length_t i = 0;
- f_array_length_t j = 0;
-
- while (i < source.used && j < destination->used) {
- if (!source.string[i]) {
- i++;
- continue;
- }
-
- if (!destination->string[j]) {
- j++;
- continue;
- }
-
- if (source.string[i] != destination->string[i]) {
- return private_f_string_prepend(source.string, source.used, destination);
- }
-
- i++;
- j++;
- } // while
-
- return F_none;
- }
-#endif // _di_f_string_dynamic_prepend_assure_
-
-#ifndef _di_f_string_dynamic_prepend_assure_nulless_
- f_status_t f_string_dynamic_prepend_assure_nulless(const f_string_static_t source, f_string_dynamic_t *destination) {
- #ifndef _di_level_0_parameter_checking_
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!source.used) return F_data_not_eos;
-
- if (destination->used < source.used) {
- return private_f_string_prepend_nulless(source.string, source.used, destination);
- }
-
- f_array_length_t i = 0;
- f_array_length_t j = 0;
-
- while (i < source.used && j < destination->used) {
- if (!source.string[i]) {
- i++;
- continue;
- }
-
- if (!destination->string[j]) {
- j++;
- continue;
- }
-
- if (source.string[i] != destination->string[i]) {
- return private_f_string_prepend_nulless(source.string, source.used, destination);
- }
-
- i++;
- j++;
- } // while
-
- return F_none;
- }
-#endif // _di_f_string_dynamic_prepend_assure_nulless_
-
-#ifndef _di_f_string_dynamic_prepend_nulless_
- f_status_t f_string_dynamic_prepend_nulless(const f_string_static_t source, f_string_dynamic_t *destination) {
- #ifndef _di_level_0_parameter_checking_
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!source.used) return F_data_not_eos;
-
- return private_f_string_prepend_nulless(source.string, source.used, destination);
- }
-#endif // _di_f_string_dynamic_prepend_nulless_
-
-#ifndef _di_f_string_dynamic_seek_line_
- f_status_t f_string_dynamic_seek_line(const f_string_t string, f_string_range_t *range) {
- #ifndef _di_level_0_parameter_checking_
- if (!range) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!string) return F_data_not;
- if (range->start > range->stop) return F_data_not_stop;
-
- while (string[range->start] != f_string_eol_s[0]) {
- range->start++;
-
- if (range->start > range->stop) return F_none_stop;
- } // while
-
- return F_none;
- }
-#endif // _di_f_string_dynamic_seek_line_
-
-#ifndef _di_f_string_dynamic_seek_line_to_
- f_status_t f_string_dynamic_seek_line_to(const f_string_t string, const int8_t seek_to_this, f_string_range_t *range) {
- #ifndef _di_level_0_parameter_checking_
- if (!range) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!string) return F_data_not;
- if (range->start > range->stop) return F_data_not_stop;
-
- while (string[range->start] != seek_to_this) {
-
- if (string[range->start] == f_string_eol_s[0]) return F_none_eol;
-
- range->start++;
-
- if (range->start > range->stop) return F_none_stop;
- } // while
-
- return F_none;
- }
-#endif // _di_f_string_dynamic_seek_line_to_
-
-#ifndef _di_f_string_dynamic_seek_to_
- f_status_t f_string_dynamic_seek_to(const f_string_t string, const int8_t seek_to_this, f_string_range_t *range) {
- #ifndef _di_level_0_parameter_checking_
- if (!range) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!string) return F_data_not;
- if (range->start > range->stop) return F_data_not_stop;
-
- while (string[range->start] != seek_to_this) {
- range->start++;
-
- if (range->start > range->stop) return F_none_stop;
- } // while
-
- return F_none;
- }
-#endif // _di_f_string_dynamic_seek_to_
-
-#ifndef _di_f_string_dynamic_terminate_
- f_status_t f_string_dynamic_terminate(f_string_dynamic_t *destination) {
- #ifndef _di_level_0_parameter_checking_
- if (!destination) return F_status_set_error(F_parameter);
- if (destination->used > destination->size) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!destination->used && destination->size && !destination->string[destination->used - 1]) {
- return F_none;
- }
-
- if (destination->used == f_array_length_t_size) {
- return F_status_set_error(F_string_too_large);
- }
-
- const f_array_length_t total = destination->used + 1;
-
- if (total > destination->size) {
- const f_status_t status = private_f_string_dynamic_resize(total, destination);
- if (F_status_is_error(status)) return status;
- }
-
- destination->string[destination->used] = 0;
- destination->used = total;
-
- return F_none;
- }
-#endif // _di_f_string_dynamic_terminate_
-
-#ifndef _di_f_string_dynamic_terminate_after_
- f_status_t f_string_dynamic_terminate_after(f_string_dynamic_t *destination) {
- #ifndef _di_level_0_parameter_checking_
- if (!destination) return F_status_set_error(F_parameter);
- if (destination->used > destination->size) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (destination->used) {
- for (; destination->used; destination->used--) {
- if (!destination->string[destination->used - 1]) continue;
- break;
- } // for
- }
-
- if (destination->used == f_array_length_t_size) {
- return F_status_set_error(F_string_too_large);
- }
-
- const f_array_length_t total = destination->used + 1;
-
- if (total > destination->size) {
- const f_status_t status = private_f_string_dynamic_resize(total, destination);
- if (F_status_is_error(status)) return status;
- }
-
- destination->string[destination->used] = 0;
- destination->used = total - 1;
-
- return F_none;
- }
-#endif // _di_f_string_dynamic_terminate_after_
-
#ifndef _di_f_string_mash_
f_status_t f_string_mash(const f_string_t glue, const f_array_length_t glue_length, const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination) {
#ifndef _di_level_0_parameter_checking_
* @return
* F_none on success.
* F_data_not_eos if source length is 0.
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
- * F_string_too_large (with error bit) if the combined string is too large.
- */
-#ifndef _di_f_string_append_
- extern f_status_t f_string_append(const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination);
-#endif // _di_f_string_append_
-
-/**
- * Append the source string onto the destination, but only if the string is not already at the end.
- *
- * This ignores NULL characters when comparing both the source and the destination.
- *
- * @param source
- * The source string to append.
- * @param length
- * The length of source to append.
- * @param destination
- * The destination string the source is appended onto.
- *
- * @return
- * F_none on success.
- * F_data_not_eos if source length is 0.
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
- * F_string_too_large (with error bit) if the combined string is too large.
- */
-#ifndef _di_f_string_append_assure_
- extern f_status_t f_string_append_assure(const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination);
-#endif // _di_f_string_append_assure_
-
-/**
- * Append the source string onto the destination, but only if the string is not already at the end.
- *
- * This ignores NULL characters when comparing both the source and the destination.
- * Skips over NULL characters from source when appending.
- *
- * @param source
- * The source string to append.
- * @param length
- * The length of source to append.
- * @param destination
- * The destination string the source is appended onto.
- *
- * @return
- * F_none on success.
- * F_data_not_eos if source length is 0.
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
- * F_string_too_large (with error bit) if the combined string is too large.
- */
-#ifndef _di_f_string_append_assure_nulless_
- extern f_status_t f_string_append_assure_nulless(const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination);
-#endif // _di_f_string_append_assure_nulless_
-
-/**
- * Append the source string onto the destination.
- *
- * Skips over NULL characters from source when appending.
- *
- * @param source
- * The source string to append.
- * @param length
- * The length of source to append.
- * @param destination
- * The destination string the source is appended onto.
- *
- * @return
- * F_none on success.
- * F_data_not_eos if source length is 0.
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
- * F_string_too_large (with error bit) if the combined string is too large.
- */
-#ifndef _di_f_string_append_nulless_
- extern f_status_t f_string_append_nulless(const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination);
-#endif // _di_f_string_append_nulless_
-
-/**
- * Append the source string onto the destination.
- *
- * @param source
- * The source string to append.
- * @param destination
- * The destination string the source is appended onto.
- *
- * @return
- * F_none on success.
- * F_data_not_eos if source length is 0.
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
- * F_string_too_large (with error bit) if the combined string is too large.
- */
-#ifndef _di_f_string_dynamic_append_
- extern f_status_t f_string_dynamic_append(const f_string_static_t source, f_string_dynamic_t *destination);
-#endif // _di_f_string_dynamic_append_
-
-/**
- * Append the source string onto the destination.
- *
- * @param source
- * The source string to append.
- * @param destination
- * The destination string the source is appended onto.
- *
- * @return
- * F_none on success.
- * F_data_not_eos if source length is 0.
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
- * F_string_too_large (with error bit) if the combined string is too large.
- */
-#ifndef _di_f_string_dynamic_append_assure_
- extern f_status_t f_string_dynamic_append_assure(const f_string_static_t source, f_string_dynamic_t *destination);
-#endif // _di_f_string_dynamic_append_assure_
-
-/**
- * Append the source string onto the destination.
- *
- * Skips over NULL characters from source when appending.
- *
- * @param source
- * The source string to append.
- * @param destination
- * The destination string the source is appended onto.
- *
- * @return
- * F_none on success.
- * F_data_not_eos if source length is 0.
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
- * F_string_too_large (with error bit) if the combined string is too large.
- */
-#ifndef _di_f_string_dynamic_append_assure_nulless_
- extern f_status_t f_string_dynamic_append_assure_nulless(const f_string_static_t source, f_string_dynamic_t *destination);
-#endif // _di_f_string_dynamic_append_assure_nulless_
-
-/**
- * Append the source string onto the destination.
- *
- * Skips over NULL characters from source when appending.
- *
- * @param source
- * The source string to append.
- * @param destination
- * The destination string the source is appended onto.
- *
- * @return
- * F_none on success.
- * F_data_not_eos if source length is 0.
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
- * F_string_too_large (with error bit) if the combined string is too large.
- */
-#ifndef _di_f_string_dynamic_append_nulless_
- extern f_status_t f_string_dynamic_append_nulless(const f_string_static_t source, f_string_dynamic_t *destination);
-#endif // _di_f_string_dynamic_append_nulless_
-
-/**
- * Append the source string onto the destination with the glue in between.
- *
- * If the destination string is empty, then no glue is appended.
- *
- * @param glue
- * A string to append between the source and destination, such as a space: ' '.
- * @param glue_length
- * The number of bytes the glue takes up.
- * @param source
- * The source string to append.
- * @param destination
- * The destination string the source and glue are appended onto.
- *
- * @return
- * F_none on success.
- * F_data_not_eos if source length is 0.
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
- * F_string_too_large (with error bit) if the combined string is too large.
- */
-#ifndef _di_f_string_dynamic_mash_
- extern f_status_t f_string_dynamic_mash(const f_string_t glue, const f_array_length_t glue_length, const f_string_static_t source, f_string_dynamic_t *destination);
-#endif // _di_f_string_dynamic_mash_
-
-/**
- * Append the source string onto the destination with the glue in between.
- *
- * If the destination string is empty, then no glue is appended.
- *
- * Skips over NULL characters from glue and source when appending.
- *
- * @param glue
- * A string to append between the source and destination, such as a space: ' '.
- * @param glue_length
- * The number of bytes the glue takes up.
- * @param source
- * The source string to append.
- * @param destination
- * The destination string the source and glue are appended onto.
- *
- * @return
- * F_none on success.
- * F_data_not_eos if source length is 0.
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
- * F_string_too_large (with error bit) if the combined string is too large.
- */
-#ifndef _di_f_string_dynamic_mash_nulless_
- extern f_status_t f_string_dynamic_mash_nulless(const f_string_t glue, const f_array_length_t glue_length, const f_string_static_t source, f_string_dynamic_t *destination);
-#endif // _di_f_string_dynamic_mash_nulless_
-
-/**
- * Prepend the source string onto the destination with the glue in between.
- *
- * If the destination string is empty, then no glue is appended.
- *
- * @param glue
- * A string to append between the source and destination, such as a space: ' '.
- * @param glue_length
- * The number of bytes the glue takes up.
- * @param source
- * The source string to append.
- * @param destination
- * The destination string the source and glue are appended onto.
- *
- * @return
- * F_none on success.
- * F_data_not_eos if source length is 0.
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
- * F_string_too_large (with error bit) if the combined string is too large.
- */
-#ifndef _di_f_string_dynamic_mish_
- extern f_status_t f_string_dynamic_mish(const f_string_t glue, const f_array_length_t glue_length, const f_string_static_t source, f_string_dynamic_t *destination);
-#endif // _di_f_string_dynamic_mish_
-
-/**
- * Prepend the source string onto the destination with the glue in between.
- *
- * If the destination string is empty, then no glue is appended.
- *
- * Skips over NULL characters from glue and source when appending.
- *
- * @param glue
- * A string to append between the source and destination, such as a space: ' '.
- * @param glue_length
- * The number of bytes the glue takes up.
- * @param source
- * The source string to append.
- * @param destination
- * The destination string the source and glue are appended onto.
- *
- * @return
- * F_none on success.
- * F_data_not_eos if source length is 0.
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
- * F_string_too_large (with error bit) if the combined string is too large.
- */
-#ifndef _di_f_string_dynamic_mish_nulless_
- extern f_status_t f_string_dynamic_mish_nulless(const f_string_t glue, const f_array_length_t glue_length, const f_string_static_t source, f_string_dynamic_t *destination);
-#endif // _di_f_string_dynamic_mish_nulless_
-
-/**
- * Append the source string onto the destination, but restricted to the given range.
- *
- * @param source
- * The source string to append.
- * @param range
- * A range within the source to restrict the copy from.
- * @param destination
- * The destination string the source is appended onto.
- *
- * @return
- * F_none on success.
- * F_data_not_eos if source length is 0.
- * F_data_not_stop if range.start > range.stop.
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
- * F_string_too_large (with error bit) if the combined string is too large.
- */
-#ifndef _di_f_string_dynamic_partial_append_
- extern f_status_t f_string_dynamic_partial_append(const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination);
-#endif // _di_f_string_dynamic_partial_append_
-
-/**
- * Append the source string onto the destination, but only if the string is not already at the end and restricted to the given range
- *
- * This ignores NULL characters when comparing both the source and the destination.
- *
- * @param source
- * The source string to append.
- * @param range
- * A range within the source to restrict the copy from.
- * @param destination
- * The destination string the source is appended onto.
- *
- * @return
- * F_none on success.
- * F_data_not_eos if source length is 0.
- * F_data_not_stop if range.start > range.stop.
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
- * F_string_too_large (with error bit) if the combined string is too large.
- */
-#ifndef _di_f_string_dynamic_partial_append_assure_
- extern f_status_t f_string_dynamic_partial_append_assure(const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination);
-#endif // _di_f_string_dynamic_partial_append_assure_
-
-/**
- * Append the source string onto the destination, but only if the string is not already at the end and restricted to the given range
- *
- * This ignores NULL characters when comparing both the source and the destination.
- *
- * Skips over NULL characters from source when appending.
- *
- * @param source
- * The source string to append.
- * @param range
- * A range within the source to restrict the copy from.
- * @param destination
- * The destination string the source is appended onto.
- *
- * @return
- * F_none on success.
- * F_data_not_eos if source length is 0.
- * F_data_not_stop if range.start > range.stop.
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
- * F_string_too_large (with error bit) if the combined string is too large.
- */
-#ifndef _di_f_string_dynamic_partial_append_assure_nulless_
- extern f_status_t f_string_dynamic_partial_append_assure_nulless(const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination);
-#endif // _di_f_string_dynamic_partial_append_assure_nulless_
-
-/**
- * Append the source string onto the destination, but restricted to the given range.
- *
- * Skips over NULL characters from source when appending.
- *
- * @param source
- * The source string to append.
- * @param range
- * A range within the source to restrict the copy from.
- * @param destination
- * The destination string the source is appended onto.
- *
- * @return
- * F_none on success.
- * F_data_not_eos if source length is 0.
- * F_data_not_stop if range.start > range.stop.
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
- * F_string_too_large (with error bit) if the combined string is too large.
- */
-#ifndef _di_f_string_dynamic_partial_append_nulless_
- extern f_status_t f_string_dynamic_partial_append_nulless(const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination);
-#endif // _di_f_string_dynamic_partial_append_nulless_
-
-/**
- * Append the source string onto the destination with the glue in between, but restricted to the given range.
- *
- * If the destination string is empty, then no glue is appended.
- *
- * @param glue
- * A string to append between the source and destination, such as a space: ' '.
- * @param glue_length
- * The number of bytes the glue takes up.
- * @param source
- * The source string to append.
- * @param range
- * A range within the source to restrict the copy from.
- * @param destination
- * The destination string the source and glue are appended onto.
- *
- * @return
- * F_none on success.
- * F_data_not_eos if source length is 0.
- * F_data_not_stop if range.start > range.stop.
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
- * F_string_too_large (with error bit) if the combined string is too large.
- */
-#ifndef _di_f_string_dynamic_partial_mash_
- extern f_status_t f_string_dynamic_partial_mash(const f_string_t glue, const f_array_length_t glue_length, const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination);
-#endif // _di_f_string_dynamic_partial_mash_
-
-/**
- * Append the source string onto the destination with the glue in between, but restricted to the given range.
- *
- * If the destination string is empty, then no glue is appended.
- *
- * Skips over NULL characters from glue and source when appending.
- *
- * @param glue
- * A string to append between the source and destination, such as a space: ' '.
- * @param glue_length
- * The number of bytes the glue takes up.
- * @param source
- * The source string to append.
- * @param range
- * A range within the source to restrict the copy from.
- * @param destination
- * The destination string the source and glue are appended onto.
- *
- * @return
- * F_none on success.
- * F_data_not_eos if source length is 0.
- * F_data_not_stop if range.start > range.stop.
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
- * F_string_too_large (with error bit) if the combined string is too large.
- */
-#ifndef _di_f_string_dynamic_partial_mash_nulless_
- extern f_status_t f_string_dynamic_partial_mash_nulless(const f_string_t glue, const f_array_length_t glue_length, const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination);
-#endif // _di_f_string_dynamic_partial_mash_nulless_
-
-/**
- * Prepend the source string onto the destination with the glue in between, but restricted to the given range.
- *
- * If the destination string is empty, then no glue is appended.
- *
- * @param glue
- * A string to append between the source and destination, such as a space: ' '.
- * @param glue_length
- * The number of bytes the glue takes up.
- * @param source
- * The source string to append.
- * @param range
- * A range within the source to restrict the copy from.
- * @param destination
- * The destination string the source and glue are appended onto.
*
- * @return
- * F_none on success.
- * F_data_not_eos if source length is 0.
- * F_data_not_stop if range.start > range.stop.
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
* F_string_too_large (with error bit) if the combined string is too large.
+ *
+ * Errors (with error bit) from: f_memory_resize().
*/
-#ifndef _di_f_string_dynamic_partial_mish_
- extern f_status_t f_string_dynamic_partial_mish(const f_string_t glue, const f_array_length_t glue_length, const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination);
-#endif // _di_f_string_dynamic_partial_mish_
+#ifndef _di_f_string_append_
+ extern f_status_t f_string_append(const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination);
+#endif // _di_f_string_append_
/**
- * Prepend the source string onto the destination with the glue in between, but restricted to the given range.
- *
- * If the destination string is empty, then no glue is appended.
+ * Append the source string onto the destination, but only if the string is not already at the end.
*
- * Skips over NULL characters from glue and source when appending.
+ * This ignores NULL characters when comparing both the source and the destination.
*
- * @param glue
- * A string to append between the source and destination, such as a space: ' '.
- * @param glue_length
- * The number of bytes the glue takes up.
* @param source
* The source string to append.
- * @param range
- * A range within the source to restrict the copy from.
+ * @param length
+ * The length of source to append.
* @param destination
- * The destination string the source and glue are appended onto.
+ * The destination string the source is appended onto.
*
* @return
* F_none on success.
* F_data_not_eos if source length is 0.
- * F_data_not_stop if range.start > range.stop.
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
- * F_string_too_large (with error bit) if the combined string is too large.
- */
-#ifndef _di_f_string_dynamic_partial_mish_nulless_
- extern f_status_t f_string_dynamic_partial_mish_nulless(const f_string_t glue, const f_array_length_t glue_length, const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination);
-#endif // _di_f_string_dynamic_partial_mish_nulless_
-
-/**
- * Prepend the source string onto the destination, but restricted to the given range.
- *
- * Prepend operations require memory move operations and are therefore likely more expensive than append operations.
- *
- * @param source
- * The source string to prepend.
- * @param range
- * A range within the source to restrict the copy from.
- * @param destination
- * The destination string the source is prepended onto.
*
- * @return
- * F_none on success.
- * F_data_not_eos if source length is 0.
- * F_data_not_stop if range.start > range.stop.
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
* F_string_too_large (with error bit) if the combined string is too large.
- */
-#ifndef _di_f_string_dynamic_partial_prepend_
- extern f_status_t f_string_dynamic_partial_prepend(const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination);
-#endif // _di_f_string_dynamic_partial_prepend_
-
-/**
- * Prepend the source string onto the destination, but only if the string is not already at the end and restricted to the given range
- *
- * Prepend operations require memory move operations and are therefore likely more expensive than append operations.
- *
- * This ignores NULL characters when comparing both the source and the destination.
- *
- * @param source
- * The source string to prepend.
- * @param range
- * A range within the source to restrict the copy from.
- * @param destination
- * The destination string the source is prepended onto.
*
- * @return
- * F_none on success.
- * F_data_not_eos if source length is 0.
- * F_data_not_stop if range.start > range.stop.
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
- * F_string_too_large (with error bit) if the combined string is too large.
+ * Errors (with error bit) from: f_memory_resize().
*/
-#ifndef _di_f_string_dynamic_partial_prepend_assure_
- extern f_status_t f_string_dynamic_partial_prepend_assure(const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination);
-#endif // _di_f_string_dynamic_partial_prepend_assure_
+#ifndef _di_f_string_append_assure_
+ extern f_status_t f_string_append_assure(const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination);
+#endif // _di_f_string_append_assure_
/**
- * Prepend the source string onto the destination, but only if the string is not already at the end and restricted to the given range
- *
- * Prepend operations require memory move operations and are therefore likely more expensive than append operations.
+ * Append the source string onto the destination, but only if the string is not already at the end.
*
* This ignores NULL characters when comparing both the source and the destination.
+ * Skips over NULL characters from source when appending.
*
* @param source
- * The source string to prepend.
- * @param range
- * A range within the source to restrict the copy from.
- * @param destination
- * The destination string the source is prepended onto.
- *
- * @return
- * F_none on success.
- * F_data_not_eos if source length is 0.
- * F_data_not_stop if range.start > range.stop.
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
- * F_string_too_large (with error bit) if the combined string is too large.
- */
-#ifndef _di_f_string_dynamic_partial_prepend_assure_nulless_
- extern f_status_t f_string_dynamic_partial_prepend_assure_nulless(const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination);
-#endif // _di_f_string_dynamic_partial_prepend_assure_nulless_
-
-/**
- * Prepend the source string onto the destination, but restricted to the given range.
- *
- * Prepend operations require memory move operations and are therefore likely more expensive than append operations.
- *
- * @param source
- * The source string to prepend.
- * @param range
- * A range within the source to restrict the copy from.
+ * The source string to append.
+ * @param length
+ * The length of source to append.
* @param destination
- * The destination string the source is prepended onto.
+ * The destination string the source is appended onto.
*
* @return
* F_none on success.
* F_data_not_eos if source length is 0.
- * F_data_not_stop if range.start > range.stop.
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
- * F_string_too_large (with error bit) if the combined string is too large.
- */
-#ifndef _di_f_string_dynamic_partial_prepend_nulless_
- extern f_status_t f_string_dynamic_partial_prepend_nulless(const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination);
-#endif // _di_f_string_dynamic_partial_prepend_nulless_
-
-/**
- * Prepend the source string onto the destination.
- *
- * Prepend operations require memory move operations and are therefore likely more expensive than append operations.
- *
- * @param source
- * The source string to prepend.
- * @param destination
- * The destination string the source is prepended onto.
*
- * @return
- * F_none on success.
- * F_data_not_eos if source length is 0.
- * F_data_not_stop if range.start > range.stop.
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
* F_string_too_large (with error bit) if the combined string is too large.
- */
-#ifndef _di_f_string_dynamic_prepend_
- extern f_status_t f_string_dynamic_prepend(const f_string_static_t source, f_string_dynamic_t *destination);
-#endif // _di_f_string_dynamic_prepend_
-
-/**
- * Prepend the source string onto the destination, but only if the string is not already at the beginning.
- *
- * Prepend operations require memory move operations and are therefore likely more expensive than append operations.
- *
- * This ignores NULL characters when comparing both the source and the destination.
- *
- * @param source
- * The source string to prepend.
- * @param destination
- * The destination string the source is prepended onto.
*
- * @return
- * F_none on success.
- * F_data_not_eos if source length is 0.
- * F_data_not_stop if range.start > range.stop.
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
- * F_string_too_large (with error bit) if the combined string is too large.
+ * Errors (with error bit) from: f_memory_resize().
*/
-#ifndef _di_f_string_dynamic_prepend_assure_
- extern f_status_t f_string_dynamic_prepend_assure(const f_string_static_t source, f_string_dynamic_t *destination);
-#endif // _di_f_string_dynamic_prepend_assure_
+#ifndef _di_f_string_append_assure_nulless_
+ extern f_status_t f_string_append_assure_nulless(const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination);
+#endif // _di_f_string_append_assure_nulless_
/**
- * Prepend the source string onto the destination, but only if the string is not already at the beginning.
- *
- * Prepend operations require memory move operations and are therefore likely more expensive than append operations.
+ * Append the source string onto the destination.
*
- * This ignores NULL characters when comparing both the source and the destination.
+ * Skips over NULL characters from source when appending.
*
* @param source
- * The source string to prepend.
+ * The source string to append.
+ * @param length
+ * The length of source to append.
* @param destination
- * The destination string the source is prepended onto.
+ * The destination string the source is appended onto.
*
* @return
* F_none on success.
* F_data_not_eos if source length is 0.
- * F_data_not_stop if range.start > range.stop.
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
- * F_string_too_large (with error bit) if the combined string is too large.
- */
-#ifndef _di_f_string_dynamic_prepend_assure_nulless_
- extern f_status_t f_string_dynamic_prepend_assure_nulless(const f_string_static_t source, f_string_dynamic_t *destination);
-#endif // _di_f_string_dynamic_prepend_assure_nulless_
-
-/**
- * Prepend the source string onto the destination.
- *
- * Prepend operations require memory move operations and are therefore likely more expensive than append operations.
*
- * @param source
- * The source string to prepend.
- * @param destination
- * The destination string the source is prepended onto.
- *
- * @return
- * F_none on success.
- * F_data_not_eos if source length is 0.
- * F_data_not_stop if range.start > range.stop.
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
* F_string_too_large (with error bit) if the combined string is too large.
- */
-#ifndef _di_f_string_dynamic_prepend_nulless_
- extern f_status_t f_string_dynamic_prepend_nulless(const f_string_static_t source, f_string_dynamic_t *destination);
-#endif // _di_f_string_dynamic_prepend_nulless_
-
-/**
- * Seek the buffer location forward until EOL is reached.
- *
- * @param string
- * The string to traverse.
- * @param range
- * A range within the buffer representing the start and stop locations.
- * The start location will be incremented by seek.
- *
- * @return
- * F_none on success.
- * F_none_stop on success, but stopped at end of range.
- * F_data_not on success, but there was no string data to seek.
- * F_data_not_stop on success, but the range.start > range.stop.
- * F_parameter (with error bit) if a parameter is invalid.
- */
-#ifndef _di_f_string_dynamic_seek_line_
- extern f_status_t f_string_dynamic_seek_line(const f_string_t string, f_string_range_t *range);
-#endif // _di_f_string_dynamic_seek_line_
-
-/**
- * Seek the buffer location forward until the character (1-byte wide) or EOL is reached.
- *
- * @param string
- * The string to traverse.
- * @param seek_to_this
- * A single-width character representing a character to seek to.
- * @param range
- * A range within the buffer representing the start and stop locations.
- * The start location will be incremented by seek.
*
- * @return
- * F_none on success.
- * F_none_eol on success, but stopped at EOL.
- * F_none_stop on success, but stopped at end of range.
- * F_data_not on success, but there was no string data to seek.
- * F_data_not_stop on success, but the range.start > range.stop.
- * F_parameter (with error bit) if a parameter is invalid.
- */
-#ifndef _di_f_string_dynamic_seek_line_to_
- extern f_status_t f_string_dynamic_seek_line_to(const f_string_t string, const int8_t seek_to_this, f_string_range_t *range);
-#endif // _di_f_string_dynamic_seek_line_to_
-
-/**
- * Seek the buffer location forward until the character (1-byte wide) is reached.
- *
- * @param string
- * The string to traverse.
- * @param seek_to_this
- * A single-width character representing a character to seek to.
- * @param range
- * A range within the buffer representing the start and stop locations.
- * The start location will be incremented by seek.
- *
- * @return
- * F_none on success.
- * F_none_stop on success, but stopped at end of range.
- * F_data_not on success, but there was no string data to seek.
- * F_data_not_stop on success, but the range.start > range.stop.
- * F_complete_not_utf (with error bit) if character is an incomplete UTF-8 fragment.
- * F_complete_not_utf_stop (with error bit) if the stop location is reached before the complete UTF-8 character can be processed.
- * F_parameter (with error bit) if a parameter is invalid.
- */
-#ifndef _di_f_string_dynamic_seek_to_
- extern f_status_t f_string_dynamic_seek_to(const f_string_t string, const int8_t seek_to_this, f_string_range_t *range);
-#endif // _di_f_string_dynamic_seek_to_
-
-/**
- * Guarantee that an end of string (NULL) exists at the end of the string.
- *
- * This is intended to be used for anything requiring NULL terminated strings.
- * This will reallocate more space if necessary.
- *
- * If destination size is 0, then it will be reallocated and have the NULL assigned at index 0.
- *
- * @param destination
- * The new string, which will be allocated or reallocated as necessary.
- *
- * @return
- * F_none on success.
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
- * F_string_too_large (with error bit) if string is too large to fit into the buffer.
- */
-#ifndef _di_f_string_dynamic_terminate_
- extern f_status_t f_string_dynamic_terminate(f_string_dynamic_t *destination);
-#endif // _di_f_string_dynamic_terminate_
-
-/**
- * Guarantee that an end of string (NULL) exists at the end of the string.
- *
- * This ensures that the terminating NULL not only exists but is not counted in destination.used.
- *
- * This is intended to be used for anything requiring NULL terminated strings whose used length cannot be counted.
- * This will reallocate more space if necessary.
- *
- * If destination size is 0, then it will be reallocated and have the NULL assigned at index 0.
- *
- * @param destination
- * The new string, which will be allocated or reallocated as necessary.
- *
- * @return
- * F_none on success.
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
- * F_string_too_large (with error bit) if string is too large to fit into the buffer.
+ * Errors (with error bit) from: f_memory_resize().
*/
-#ifndef _di_f_string_dynamic_terminate_after_
- extern f_status_t f_string_dynamic_terminate_after(f_string_dynamic_t *destination);
-#endif // _di_f_string_dynamic_terminate_after_
+#ifndef _di_f_string_append_nulless_
+ extern f_status_t f_string_append_nulless(const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination);
+#endif // _di_f_string_append_nulless_
/**
* Append the source string onto the destination with the glue in between.
* @return
* F_none on success.
* F_data_not_eos if source length is 0.
- * F_memory_not (with error bit) on out of memory.
+ *
* F_parameter (with error bit) if a parameter is invalid.
* F_string_too_large (with error bit) if the combined string is too large.
+ *
+ * Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_string_mash_
extern f_status_t f_string_mash(const f_string_t glue, const f_array_length_t glue_length, const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination);
* @return
* F_none on success.
* F_data_not_eos if source length is 0.
- * F_memory_not (with error bit) on out of memory.
+ *
* F_parameter (with error bit) if a parameter is invalid.
* F_string_too_large (with error bit) if the combined string is too large.
+ *
+ * Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_string_mash_nulless_
extern f_status_t f_string_mash_nulless(const f_string_t glue, const f_array_length_t glue_length, const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination);
* @return
* F_none on success.
* F_data_not_eos if source length is 0.
- * F_memory_not (with error bit) on out of memory.
+ *
* F_parameter (with error bit) if a parameter is invalid.
* F_string_too_large (with error bit) if the combined string is too large.
+ *
+ * Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_string_mish_
extern f_status_t f_string_mish(const f_string_t glue, const f_array_length_t glue_length, const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination);
* @return
* F_none on success.
* F_data_not_eos if source length is 0.
- * F_memory_not (with error bit) on out of memory.
+ *
* F_parameter (with error bit) if a parameter is invalid.
* F_string_too_large (with error bit) if the combined string is too large.
+ *
+ * Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_string_mish_nulless_
extern f_status_t f_string_mish_nulless(const f_string_t glue, const f_array_length_t glue_length, const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination);
* @return
* F_none on success.
* F_data_not_eos if source length is 0.
- * F_memory_not (with error bit) on out of memory.
+ *
* F_parameter (with error bit) if a parameter is invalid.
* F_string_too_large (with error bit) if the combined string is too large.
+ *
+ * Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_string_prepend_
extern f_status_t f_string_prepend(const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination);
* @return
* F_none on success.
* F_data_not_eos if source length is 0.
- * F_memory_not (with error bit) on out of memory.
+ *
* F_parameter (with error bit) if a parameter is invalid.
* F_string_too_large (with error bit) if the combined string is too large.
+ *
+ * Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_string_prepend_assure_
extern f_status_t f_string_prepend_assure(const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination);
* @return
* F_none on success.
* F_data_not_eos if source length is 0.
- * F_memory_not (with error bit) on out of memory.
+ *
* F_parameter (with error bit) if a parameter is invalid.
* F_string_too_large (with error bit) if the combined string is too large.
+ *
+ * Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_string_prepend_assure_nulless_
extern f_status_t f_string_prepend_assure_nulless(const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination);
* @return
* F_none on success.
* F_data_not_eos if source length is 0.
- * F_memory_not (with error bit) on out of memory.
+ *
* F_parameter (with error bit) if a parameter is invalid.
* F_string_too_large (with error bit) if the combined string is too large.
+ *
+ * Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_string_prepend_nulless_
extern f_status_t f_string_prepend_nulless(const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination);
* F_none_eol on success, but stopped at EOL.
* F_none_stop on success, but stopped stop location.
* F_data_not_stop if range.start > range.stop.
+ *
* F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_f_string_seek_line_to_
* F_none on success.
* F_none_stop on success, but stopped stop location.
* F_data_not_stop if range.start > range.stop.
+ *
* F_complete_not_utf (with error bit) if character is an incomplete UTF-8 fragment.
* F_complete_not_utf_stop (with error bit) if the stop location is reached before the complete UTF-8 character can be processed.
* F_parameter (with error bit) if a parameter is invalid.
}
#endif // _di_f_string_dynamic_adjust_
+#ifndef _di_f_string_dynamic_append_
+ f_status_t f_string_dynamic_append(const f_string_static_t source, f_string_dynamic_t *destination) {
+ #ifndef _di_level_0_parameter_checking_
+ if (!destination) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ if (!source.used) return F_data_not_eos;
+
+ return private_f_string_append(source.string, source.used, destination);
+ }
+#endif // _di_f_string_dynamic_append_
+
+#ifndef _di_f_string_dynamic_append_assure_
+ f_status_t f_string_dynamic_append_assure(const f_string_static_t source, f_string_dynamic_t *destination) {
+ #ifndef _di_level_0_parameter_checking_
+ if (!destination) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ if (!source.used) return F_data_not_eos;
+
+ if (destination->used < source.used) {
+ return private_f_string_append(source.string, source.used, destination);
+ }
+
+ f_array_length_t i = 1;
+ f_array_length_t j = 1;
+
+ while (i <= source.used && j <= destination->used) {
+ if (!source.string[source.used - i]) {
+ i++;
+ continue;
+ }
+
+ if (!destination->string[destination->used - j]) {
+ j++;
+ continue;
+ }
+
+ if (source.string[source.used - i] != destination->string[destination->used - j]) {
+ return private_f_string_append(source.string, source.used, destination);
+ }
+
+ i++;
+ j++;
+ } // while
+
+ return F_none;
+ }
+#endif // _di_f_string_dynamic_append_assure_
+
+#ifndef _di_f_string_dynamic_append_assure_nulless_
+ f_status_t f_string_dynamic_append_assure_nulless(const f_string_static_t source, f_string_dynamic_t *destination) {
+ #ifndef _di_level_0_parameter_checking_
+ if (!destination) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ if (!source.used) return F_data_not_eos;
+
+ if (destination->used < source.used) {
+ return private_f_string_append_nulless(source.string, source.used, destination);
+ }
+
+ f_array_length_t i = 1;
+ f_array_length_t j = 1;
+
+ while (i <= source.used && j <= destination->used) {
+ if (!source.string[source.used - i]) {
+ i++;
+ continue;
+ }
+
+ if (!destination->string[destination->used - j]) {
+ j++;
+ continue;
+ }
+
+ if (source.string[source.used - i] != destination->string[destination->used - j]) {
+ return private_f_string_append_nulless(source.string, source.used, destination);
+ }
+
+ i++;
+ j++;
+ } // while
+
+ return F_none;
+ }
+#endif // _di_f_string_dynamic_append_assure_nulless_
+
+#ifndef _di_f_string_dynamic_append_nulless_
+ f_status_t f_string_dynamic_append_nulless(const f_string_static_t source, f_string_dynamic_t *destination) {
+ #ifndef _di_level_0_parameter_checking_
+ if (!destination) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ if (!source.used) return F_data_not_eos;
+
+ return private_f_string_append_nulless(source.string, source.used, destination);
+ }
+#endif // _di_f_string_dynamic_append_nulless_
+
#ifndef _di_f_string_dynamic_decimate_by_
f_status_t f_string_dynamic_decimate_by(const f_array_length_t amount, f_string_dynamic_t *dynamic) {
#ifndef _di_level_0_parameter_checking_
}
#endif // _di_f_string_dynamic_increase_by_
+#ifndef _di_f_string_dynamic_mash_
+ f_status_t f_string_dynamic_mash(const f_string_t glue, const f_array_length_t glue_length, const f_string_static_t source, f_string_dynamic_t *destination) {
+ #ifndef _di_level_0_parameter_checking_
+ if (!destination) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ if (!source.used) return F_data_not_eos;
+
+ if (glue_length && destination->used) {
+ const f_status_t status = private_f_string_append(glue, glue_length, destination);
+ if (F_status_is_error(status)) return status;
+ }
+
+ return private_f_string_append(source.string, source.used, destination);
+ }
+#endif // _di_f_string_dynamic_mash_
+
+#ifndef _di_f_string_dynamic_mash_nulless_
+ f_status_t f_string_dynamic_mash_nulless(const f_string_t glue, const f_array_length_t glue_length, const f_string_static_t source, f_string_dynamic_t *destination) {
+ #ifndef _di_level_0_parameter_checking_
+ if (!destination) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ if (!source.used) return F_data_not_eos;
+
+ if (glue_length && destination->used) {
+ const f_status_t status = private_f_string_append_nulless(glue, glue_length, destination);
+ if (F_status_is_error(status)) return status;
+ }
+
+ return private_f_string_append_nulless(source.string, source.used, destination);
+ }
+#endif // _di_f_string_dynamic_mash_nulless_
+
+#ifndef _di_f_string_dynamic_mish_
+ f_status_t f_string_dynamic_mish(const f_string_t glue, const f_array_length_t glue_length, const f_string_static_t source, f_string_dynamic_t *destination) {
+ #ifndef _di_level_0_parameter_checking_
+ if (!destination) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ if (!source.used) return F_data_not_eos;
+
+ if (glue_length && destination->used) {
+ const f_status_t status = private_f_string_prepend(glue, glue_length, destination);
+ if (F_status_is_error(status)) return status;
+ }
+
+ return private_f_string_prepend(source.string, source.used, destination);
+ }
+#endif // _di_f_string_dynamic_mish_
+
+#ifndef _di_f_string_dynamic_mish_nulless_
+ f_status_t f_string_dynamic_mish_nulless(const f_string_t glue, const f_array_length_t glue_length, const f_string_static_t source, f_string_dynamic_t *destination) {
+ #ifndef _di_level_0_parameter_checking_
+ if (!destination) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ if (!source.used) return F_data_not_eos;
+
+ if (glue_length && destination->used) {
+ const f_status_t status = private_f_string_prepend_nulless(glue, glue_length, destination);
+ if (F_status_is_error(status)) return status;
+ }
+
+ return private_f_string_prepend_nulless(source.string, source.used, destination);
+ }
+#endif // _di_f_string_dynamic_mish_nulless_
+
+#ifndef _di_f_string_dynamic_partial_append_
+ f_status_t f_string_dynamic_partial_append(const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination) {
+ #ifndef _di_level_0_parameter_checking_
+ if (source.used <= range.stop) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ if (!source.used) return F_data_not_eos;
+ if (range.start > range.stop) return F_data_not_stop;
+
+ return private_f_string_append(source.string + range.start, (range.stop - range.start) + 1, destination);
+ }
+#endif // _di_f_string_dynamic_partial_append_
+
+#ifndef _di_f_string_dynamic_partial_append_assure_
+ f_status_t f_string_dynamic_partial_append_assure(const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination) {
+ #ifndef _di_level_0_parameter_checking_
+ if (source.used <= range.stop) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ if (!source.used) return F_data_not_eos;
+ if (range.start > range.stop) return F_data_not_stop;
+
+ const f_array_length_t length = (range.stop - range.start) + 1;
+
+ if (destination->used < length) {
+ return private_f_string_append(source.string + range.start, length, destination);
+ }
+
+ f_array_length_t i = 1;
+ f_array_length_t j = 1;
+
+ while (i <= length && j <= destination->used) {
+ if (!source.string[range.stop - i]) {
+ i++;
+ continue;
+ }
+
+ if (!destination->string[destination->used - j]) {
+ j++;
+ continue;
+ }
+
+ if (source.string[range.stop - i] != destination->string[destination->used - j]) {
+ return private_f_string_append(source.string + range.start, length, destination);
+ }
+
+ i++;
+ j++;
+ } // while
+ }
+#endif // _di_f_string_dynamic_partial_append_assure_
+
+#ifndef _di_f_string_dynamic_partial_append_assure_nulless_
+ f_status_t f_string_dynamic_partial_append_assure_nulless(const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination) {
+ #ifndef _di_level_0_parameter_checking_
+ if (source.used <= range.stop) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ if (!source.used) return F_data_not_eos;
+ if (range.start > range.stop) return F_data_not_stop;
+
+ const f_array_length_t length = (range.stop - range.start) + 1;
+
+ if (destination->used < length) {
+ return private_f_string_append_nulless(source.string + range.start, length, destination);
+ }
+
+ f_array_length_t i = 1;
+ f_array_length_t j = 1;
+
+ while (i <= length && j <= destination->used) {
+ if (!source.string[range.stop - i]) {
+ i++;
+ continue;
+ }
+
+ if (!destination->string[destination->used - j]) {
+ j++;
+ continue;
+ }
+
+ if (source.string[range.stop - i] != destination->string[destination->used - j]) {
+ return private_f_string_append_nulless(source.string + range.start, length, destination);
+ }
+
+ i++;
+ j++;
+ } // while
+ }
+#endif // _di_f_string_dynamic_append_assure_nulless_
+
+#ifndef _di_f_string_dynamic_partial_append_nulless_
+ f_status_t f_string_dynamic_partial_append_nulless(const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination) {
+ #ifndef _di_level_0_parameter_checking_
+ if (source.used <= range.stop) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ if (!source.used) return F_data_not_eos;
+ if (range.start > range.stop) return F_data_not_stop;
+
+ return private_f_string_append_nulless(source.string + range.start, (range.stop - range.start) + 1, destination);
+ }
+#endif // _di_f_string_dynamic_partial_append_nulless_
+
+#ifndef _di_f_string_dynamic_partial_mash_
+ f_status_t f_string_dynamic_partial_mash(const f_string_t glue, const f_array_length_t glue_length, const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination) {
+ #ifndef _di_level_0_parameter_checking_
+ if (source.used <= range.stop) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ if (!source.used) return F_data_not_eos;
+ if (range.start > range.stop) return F_data_not_stop;
+
+ if (glue_length && destination->used) {
+ f_status_t status = private_f_string_append(glue, glue_length, destination);
+ if (F_status_is_error(status)) return status;
+ }
+
+ return private_f_string_append(source.string + range.start, (range.stop - range.start) + 1, destination);
+ }
+#endif // _di_f_string_dynamic_partial_mash_
+
+#ifndef _di_f_string_dynamic_partial_mash_nulless_
+ f_status_t f_string_dynamic_partial_mash_nulless(const f_string_t glue, const f_array_length_t glue_length, const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination) {
+ #ifndef _di_level_0_parameter_checking_
+ if (source.used <= range.stop) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ if (!source.used) return F_data_not_eos;
+ if (range.start > range.stop) return F_data_not_stop;
+
+ if (glue_length && destination->used) {
+ f_status_t status = private_f_string_append_nulless(glue, glue_length, destination);
+ if (F_status_is_error(status)) return status;
+ }
+
+ return private_f_string_append_nulless(source.string + range.start, (range.stop - range.start) + 1, destination);
+ }
+#endif // _di_f_string_dynamic_partial_mash_nulless_
+
+#ifndef _di_f_string_dynamic_partial_mish_
+ f_status_t f_string_partial_dynamic_mish(const f_string_t glue, const f_array_length_t glue_length, const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination) {
+ #ifndef _di_level_0_parameter_checking_
+ if (source.used <= range.stop) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ if (!source.used) return F_data_not_eos;
+ if (range.start > range.stop) return F_data_not_stop;
+
+ if (glue_length && destination->used) {
+ f_status_t status = private_f_string_prepend(glue, glue_length, destination);
+ if (F_status_is_error(status)) return status;
+ }
+
+ return private_f_string_prepend(source.string + range.start, (range.stop - range.start) + 1, destination);
+ }
+#endif // _di_f_string_dynamic_partial_mish_
+
+#ifndef _di_f_string_dynamic_partial_mish_nulless_
+ f_status_t f_string_dynamic_partial_mish_nulless(const f_string_t glue, const f_array_length_t glue_length, const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination) {
+ #ifndef _di_level_0_parameter_checking_
+ if (source.used <= range.stop) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ if (!source.used) return F_data_not_eos;
+ if (range.start > range.stop) return F_data_not_stop;
+
+ if (glue_length && destination->used) {
+ f_status_t status = private_f_string_prepend_nulless(glue, glue_length, destination);
+ if (F_status_is_error(status)) return status;
+ }
+
+ return private_f_string_prepend_nulless(source.string + range.start, (range.stop - range.start) + 1, destination);
+ }
+#endif // _di_f_string_dynamic_partial_mish_nulless_
+
+#ifndef _di_f_string_dynamic_partial_prepend_
+ f_status_t f_string_dynamic_partial_prepend(const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination) {
+ #ifndef _di_level_0_parameter_checking_
+ if (source.used <= range.stop) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ if (!source.used) return F_data_not_eos;
+ if (range.start > range.stop) return F_data_not_stop;
+
+ return private_f_string_prepend(source.string + range.start, (range.stop - range.start) + 1, destination);
+ }
+#endif // _di_f_string_dynamic_partial_prepend_
+
+#ifndef _di_f_string_dynamic_partial_prepend_assure_
+ f_status_t f_string_dynamic_partial_prepend_assure(const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination) {
+ #ifndef _di_level_0_parameter_checking_
+ if (source.used <= range.stop) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ if (!source.used) return F_data_not_eos;
+ if (range.start > range.stop) return F_data_not_stop;
+
+ const f_array_length_t length = (range.stop - range.start) + 1;
+
+ if (destination->used < length) {
+ return private_f_string_prepend(source.string + range.start, length, destination);
+ }
+
+ f_array_length_t i = 0;
+ f_array_length_t j = 0;
+
+ while (i < length && j < destination->used) {
+ if (!source.string[i + range.start]) {
+ i++;
+ continue;
+ }
+
+ if (!destination->string[j]) {
+ j++;
+ continue;
+ }
+
+ if (source.string[i + range.start] != destination->string[i]) {
+ return private_f_string_prepend(source.string + range.start, length, destination);
+ }
+
+ i++;
+ j++;
+ } // while
+
+ return F_none;
+ }
+#endif // _di_f_string_dynamic_partial_prepend_assure_
+
+#ifndef _di_f_string_dynamic_partial_prepend_assure_nulless_
+ f_status_t f_string_dynamic_partial_prepend_assure_nulless(const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination) {
+ #ifndef _di_level_0_parameter_checking_
+ if (source.used <= range.stop) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ if (!source.used) return F_data_not_eos;
+ if (range.start > range.stop) return F_data_not_stop;
+
+ const f_array_length_t length = (range.stop - range.start) + 1;
+
+ if (destination->used < length) {
+ return private_f_string_prepend_nulless(source.string + range.start, length, destination);
+ }
+
+ f_array_length_t i = 0;
+ f_array_length_t j = 0;
+
+ while (i < length && j < destination->used) {
+ if (!source.string[i + range.start]) {
+ i++;
+ continue;
+ }
+
+ if (!destination->string[j]) {
+ j++;
+ continue;
+ }
+
+ if (source.string[i + range.start] != destination->string[i]) {
+ return private_f_string_prepend_nulless(source.string + range.start, length, destination);
+ }
+
+ i++;
+ j++;
+ } // while
+
+ return F_none;
+ }
+#endif // _di_f_string_dynamic_partial_prepend_assure_nulless
+
+#ifndef _di_f_string_dynamic_partial_prepend_nulless_
+ f_status_t f_string_dynamic_partial_prepend_nulless(const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination) {
+ #ifndef _di_level_0_parameter_checking_
+ if (source.used <= range.stop) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ if (!source.used) return F_data_not_eos;
+ if (range.start > range.stop) return F_data_not_stop;
+
+ return private_f_string_prepend_nulless(source.string + range.start, (range.stop - range.start) + 1, destination);
+ }
+#endif // _di_f_string_dynamic_partial_prepend_nulless
+
+#ifndef _di_f_string_dynamic_prepend_
+ f_status_t f_string_dynamic_prepend(const f_string_static_t source, f_string_dynamic_t *destination) {
+ #ifndef _di_level_0_parameter_checking_
+ if (!destination) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ if (!source.used) return F_data_not_eos;
+
+ return private_f_string_prepend(source.string, source.used, destination);
+ }
+#endif // _di_f_string_dynamic_prepend_
+
+#ifndef _di_f_string_dynamic_prepend_assure_
+ f_status_t f_string_dynamic_prepend_assure(const f_string_static_t source, f_string_dynamic_t *destination) {
+ #ifndef _di_level_0_parameter_checking_
+ if (!destination) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ if (!source.used) return F_data_not_eos;
+
+ if (destination->used < source.used) {
+ return private_f_string_prepend(source.string, source.used, destination);
+ }
+
+ f_array_length_t i = 0;
+ f_array_length_t j = 0;
+
+ while (i < source.used && j < destination->used) {
+ if (!source.string[i]) {
+ i++;
+ continue;
+ }
+
+ if (!destination->string[j]) {
+ j++;
+ continue;
+ }
+
+ if (source.string[i] != destination->string[i]) {
+ return private_f_string_prepend(source.string, source.used, destination);
+ }
+
+ i++;
+ j++;
+ } // while
+
+ return F_none;
+ }
+#endif // _di_f_string_dynamic_prepend_assure_
+
+#ifndef _di_f_string_dynamic_prepend_assure_nulless_
+ f_status_t f_string_dynamic_prepend_assure_nulless(const f_string_static_t source, f_string_dynamic_t *destination) {
+ #ifndef _di_level_0_parameter_checking_
+ if (!destination) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ if (!source.used) return F_data_not_eos;
+
+ if (destination->used < source.used) {
+ return private_f_string_prepend_nulless(source.string, source.used, destination);
+ }
+
+ f_array_length_t i = 0;
+ f_array_length_t j = 0;
+
+ while (i < source.used && j < destination->used) {
+ if (!source.string[i]) {
+ i++;
+ continue;
+ }
+
+ if (!destination->string[j]) {
+ j++;
+ continue;
+ }
+
+ if (source.string[i] != destination->string[i]) {
+ return private_f_string_prepend_nulless(source.string, source.used, destination);
+ }
+
+ i++;
+ j++;
+ } // while
+
+ return F_none;
+ }
+#endif // _di_f_string_dynamic_prepend_assure_nulless_
+
+#ifndef _di_f_string_dynamic_prepend_nulless_
+ f_status_t f_string_dynamic_prepend_nulless(const f_string_static_t source, f_string_dynamic_t *destination) {
+ #ifndef _di_level_0_parameter_checking_
+ if (!destination) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ if (!source.used) return F_data_not_eos;
+
+ return private_f_string_prepend_nulless(source.string, source.used, destination);
+ }
+#endif // _di_f_string_dynamic_prepend_nulless_
+
#ifndef _di_f_string_dynamic_resize_
f_status_t f_string_dynamic_resize(const f_array_length_t length, f_string_dynamic_t *dynamic) {
#ifndef _di_level_0_parameter_checking_
}
#endif // _di_f_string_dynamic_resize_
+#ifndef _di_f_string_dynamic_seek_line_
+ f_status_t f_string_dynamic_seek_line(const f_string_t string, f_string_range_t *range) {
+ #ifndef _di_level_0_parameter_checking_
+ if (!range) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ if (!string) return F_data_not;
+ if (range->start > range->stop) return F_data_not_stop;
+
+ while (string[range->start] != f_string_eol_s[0]) {
+ range->start++;
+
+ if (range->start > range->stop) return F_none_stop;
+ } // while
+
+ return F_none;
+ }
+#endif // _di_f_string_dynamic_seek_line_
+
+#ifndef _di_f_string_dynamic_seek_line_to_
+ f_status_t f_string_dynamic_seek_line_to(const f_string_t string, const int8_t seek_to_this, f_string_range_t *range) {
+ #ifndef _di_level_0_parameter_checking_
+ if (!range) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ if (!string) return F_data_not;
+ if (range->start > range->stop) return F_data_not_stop;
+
+ while (string[range->start] != seek_to_this) {
+
+ if (string[range->start] == f_string_eol_s[0]) return F_none_eol;
+
+ range->start++;
+
+ if (range->start > range->stop) return F_none_stop;
+ } // while
+
+ return F_none;
+ }
+#endif // _di_f_string_dynamic_seek_line_to_
+
+#ifndef _di_f_string_dynamic_seek_to_
+ f_status_t f_string_dynamic_seek_to(const f_string_t string, const int8_t seek_to_this, f_string_range_t *range) {
+ #ifndef _di_level_0_parameter_checking_
+ if (!range) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ if (!string) return F_data_not;
+ if (range->start > range->stop) return F_data_not_stop;
+
+ while (string[range->start] != seek_to_this) {
+ range->start++;
+
+ if (range->start > range->stop) return F_none_stop;
+ } // while
+
+ return F_none;
+ }
+#endif // _di_f_string_dynamic_seek_to_
+
+#ifndef _di_f_string_dynamic_terminate_
+ f_status_t f_string_dynamic_terminate(f_string_dynamic_t *destination) {
+ #ifndef _di_level_0_parameter_checking_
+ if (!destination) return F_status_set_error(F_parameter);
+ if (destination->used > destination->size) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ if (!destination->used && destination->size && !destination->string[destination->used - 1]) {
+ return F_none;
+ }
+
+ if (destination->used == f_array_length_t_size) {
+ return F_status_set_error(F_string_too_large);
+ }
+
+ const f_array_length_t total = destination->used + 1;
+
+ if (total > destination->size) {
+ const f_status_t status = private_f_string_dynamic_resize(total, destination);
+ if (F_status_is_error(status)) return status;
+ }
+
+ destination->string[destination->used] = 0;
+ destination->used = total;
+
+ return F_none;
+ }
+#endif // _di_f_string_dynamic_terminate_
+
+#ifndef _di_f_string_dynamic_terminate_after_
+ f_status_t f_string_dynamic_terminate_after(f_string_dynamic_t *destination) {
+ #ifndef _di_level_0_parameter_checking_
+ if (!destination) return F_status_set_error(F_parameter);
+ if (destination->used > destination->size) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ if (destination->used) {
+ for (; destination->used; destination->used--) {
+ if (!destination->string[destination->used - 1]) continue;
+ break;
+ } // for
+ }
+
+ if (destination->used == f_array_length_t_size) {
+ return F_status_set_error(F_string_too_large);
+ }
+
+ const f_array_length_t total = destination->used + 1;
+
+ if (total > destination->size) {
+ const f_status_t status = private_f_string_dynamic_resize(total, destination);
+ if (F_status_is_error(status)) return status;
+ }
+
+ destination->string[destination->used] = 0;
+ destination->used = total - 1;
+
+ return F_none;
+ }
+#endif // _di_f_string_dynamic_terminate_after_
+
#ifndef _di_f_string_dynamics_adjust_
f_status_t f_string_dynamics_adjust(const f_array_length_t length, f_string_dynamics_t *dynamics) {
#ifndef _di_level_0_parameter_checking_
}
#endif // _di_f_string_dynamics_adjust_
+#ifndef _di_f_string_dynamics_append_
+ f_status_t f_string_dynamics_append(const f_string_dynamics_t source, f_string_dynamics_t *destination) {
+ #ifndef _di_level_0_parameter_checking_
+ if (!destination) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ if (!source.used) return F_data_not;
+
+ return private_f_string_dynamics_append(source, destination);
+ }
+#endif // _di_f_string_dynamics_append_
+
#ifndef _di_f_string_dynamics_decimate_by_
f_status_t f_string_dynamics_decimate_by(const f_array_length_t amount, f_string_dynamics_t *dynamics) {
#ifndef _di_level_0_parameter_checking_
extern "C" {
#endif
+// fll-0 string includes
+#include <level_0/string_range.h>
+
/**
* A string that is analogous to f_string_dynamic_t but intended for static-only uses.
*
#endif // _di_f_string_dynamic_adjust_
/**
+ * Append the source string onto the destination.
+ *
+ * @param source
+ * The source string to append.
+ * @param destination
+ * The destination string the source is appended onto.
+ *
+ * @return
+ * F_none on success.
+ * F_data_not_eos if source length is 0.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ * F_string_too_large (with error bit) if the combined string is too large.
+ *
+ * Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_string_dynamic_append_
+ extern f_status_t f_string_dynamic_append(const f_string_dynamic_t source, f_string_dynamic_t *destination);
+#endif // _di_f_string_dynamic_append_
+
+/**
+ * Append the source string onto the destination.
+ *
+ * @param source
+ * The source string to append.
+ * @param destination
+ * The destination string the source is appended onto.
+ *
+ * @return
+ * F_none on success.
+ * F_data_not_eos if source length is 0.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ * F_string_too_large (with error bit) if the combined string is too large.
+ *
+ * Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_string_dynamic_append_assure_
+ extern f_status_t f_string_dynamic_append_assure(const f_string_static_t source, f_string_dynamic_t *destination);
+#endif // _di_f_string_dynamic_append_assure_
+
+/**
+ * Append the source string onto the destination.
+ *
+ * Skips over NULL characters from source when appending.
+ *
+ * @param source
+ * The source string to append.
+ * @param destination
+ * The destination string the source is appended onto.
+ *
+ * @return
+ * F_none on success.
+ * F_data_not_eos if source length is 0.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ * F_string_too_large (with error bit) if the combined string is too large.
+ *
+ * Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_string_dynamic_append_assure_nulless_
+ extern f_status_t f_string_dynamic_append_assure_nulless(const f_string_static_t source, f_string_dynamic_t *destination);
+#endif // _di_f_string_dynamic_append_assure_nulless_
+
+/**
+ * Append the source string onto the destination.
+ *
+ * Skips over NULL characters from source when appending.
+ *
+ * @param source
+ * The source string to append.
+ * @param destination
+ * The destination string the source is appended onto.
+ *
+ * @return
+ * F_none on success.
+ * F_data_not_eos if source length is 0.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ * F_string_too_large (with error bit) if the combined string is too large.
+ *
+ * Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_string_dynamic_append_nulless_
+ extern f_status_t f_string_dynamic_append_nulless(const f_string_static_t source, f_string_dynamic_t *destination);
+#endif // _di_f_string_dynamic_append_nulless_
+
+/**
* Resize the dynamic string to a smaller size.
*
* This will resize making the string smaller based on (size - given length).
*
* @return
* F_none on success.
- * F_data_not on success, but there is no reason to decrease size (size = 0).
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
+ * F_string_too_large (with error bit) if the combined string is too large.
+ *
+ * Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_string_dynamic_decrease_by_
extern f_status_t f_string_dynamic_decrease_by(const f_array_length_t amount, f_string_dynamic_t *dynamic);
* F_none on success.
* F_data_not on success, but there is no reason to increase size (used + 1 <= size).
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
* F_string_too_large (with error bit) if the combined string is too large.
+ *
+ * Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_string_dynamic_increase_
extern f_status_t f_string_dynamic_increase(f_string_dynamic_t *dynamic);
* F_none on success.
* F_data_not on success, but there is no reason to increase size (used + amount <= size).
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
* F_string_too_large (with error bit) if the combined string is too large.
+ *
+ * Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_string_dynamic_increase_by_
extern f_status_t f_string_dynamic_increase_by(const f_array_length_t amount, f_string_dynamic_t *dynamic);
#endif // _di_f_string_dynamic_increase_by_
/**
+ * Append the source string onto the destination with the glue in between.
+ *
+ * If the destination string is empty, then no glue is appended.
+ *
+ * @param glue
+ * A string to append between the source and destination, such as a space: ' '.
+ * @param glue_length
+ * The number of bytes the glue takes up.
+ * @param source
+ * The source string to append.
+ * @param destination
+ * The destination string the source and glue are appended onto.
+ *
+ * @return
+ * F_none on success.
+ * F_data_not_eos if source length is 0.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ * F_string_too_large (with error bit) if the combined string is too large.
+ *
+ * Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_string_dynamic_mash_
+ extern f_status_t f_string_dynamic_mash(const f_string_t glue, const f_array_length_t glue_length, const f_string_static_t source, f_string_dynamic_t *destination);
+#endif // _di_f_string_dynamic_mash_
+
+/**
+ * Append the source string onto the destination with the glue in between.
+ *
+ * If the destination string is empty, then no glue is appended.
+ *
+ * Skips over NULL characters from glue and source when appending.
+ *
+ * @param glue
+ * A string to append between the source and destination, such as a space: ' '.
+ * @param glue_length
+ * The number of bytes the glue takes up.
+ * @param source
+ * The source string to append.
+ * @param destination
+ * The destination string the source and glue are appended onto.
+ *
+ * @return
+ * F_none on success.
+ * F_data_not_eos if source length is 0.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ * F_string_too_large (with error bit) if the combined string is too large.
+ *
+ * Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_string_dynamic_mash_nulless_
+ extern f_status_t f_string_dynamic_mash_nulless(const f_string_t glue, const f_array_length_t glue_length, const f_string_static_t source, f_string_dynamic_t *destination);
+#endif // _di_f_string_dynamic_mash_nulless_
+
+/**
+ * Prepend the source string onto the destination with the glue in between.
+ *
+ * If the destination string is empty, then no glue is appended.
+ *
+ * @param glue
+ * A string to append between the source and destination, such as a space: ' '.
+ * @param glue_length
+ * The number of bytes the glue takes up.
+ * @param source
+ * The source string to append.
+ * @param destination
+ * The destination string the source and glue are appended onto.
+ *
+ * @return
+ * F_none on success.
+ * F_data_not_eos if source length is 0.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ * F_string_too_large (with error bit) if the combined string is too large.
+ *
+ * Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_string_dynamic_mish_
+ extern f_status_t f_string_dynamic_mish(const f_string_t glue, const f_array_length_t glue_length, const f_string_static_t source, f_string_dynamic_t *destination);
+#endif // _di_f_string_dynamic_mish_
+
+/**
+ * Prepend the source string onto the destination with the glue in between.
+ *
+ * If the destination string is empty, then no glue is appended.
+ *
+ * Skips over NULL characters from glue and source when appending.
+ *
+ * @param glue
+ * A string to append between the source and destination, such as a space: ' '.
+ * @param glue_length
+ * The number of bytes the glue takes up.
+ * @param source
+ * The source string to append.
+ * @param destination
+ * The destination string the source and glue are appended onto.
+ *
+ * @return
+ * F_none on success.
+ * F_data_not_eos if source length is 0.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ * F_string_too_large (with error bit) if the combined string is too large.
+ *
+ * Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_string_dynamic_mish_nulless_
+ extern f_status_t f_string_dynamic_mish_nulless(const f_string_t glue, const f_array_length_t glue_length, const f_string_static_t source, f_string_dynamic_t *destination);
+#endif // _di_f_string_dynamic_mish_nulless_
+
+/**
+ * Append the source string onto the destination, but restricted to the given range.
+ *
+ * @param source
+ * The source string to append.
+ * @param range
+ * A range within the source to restrict the copy from.
+ * @param destination
+ * The destination string the source is appended onto.
+ *
+ * @return
+ * F_none on success.
+ * F_data_not_eos if source length is 0.
+ * F_data_not_stop if range.start > range.stop.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ * F_string_too_large (with error bit) if the combined string is too large.
+ *
+ * Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_string_dynamic_partial_append_
+ extern f_status_t f_string_dynamic_partial_append(const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination);
+#endif // _di_f_string_dynamic_partial_append_
+
+/**
+ * Append the source string onto the destination, but only if the string is not already at the end and restricted to the given range
+ *
+ * This ignores NULL characters when comparing both the source and the destination.
+ *
+ * @param source
+ * The source string to append.
+ * @param range
+ * A range within the source to restrict the copy from.
+ * @param destination
+ * The destination string the source is appended onto.
+ *
+ * @return
+ * F_none on success.
+ * F_data_not_eos if source length is 0.
+ * F_data_not_stop if range.start > range.stop.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ * F_string_too_large (with error bit) if the combined string is too large.
+ *
+ * Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_string_dynamic_partial_append_assure_
+ extern f_status_t f_string_dynamic_partial_append_assure(const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination);
+#endif // _di_f_string_dynamic_partial_append_assure_
+
+/**
+ * Append the source string onto the destination, but only if the string is not already at the end and restricted to the given range
+ *
+ * This ignores NULL characters when comparing both the source and the destination.
+ *
+ * Skips over NULL characters from source when appending.
+ *
+ * @param source
+ * The source string to append.
+ * @param range
+ * A range within the source to restrict the copy from.
+ * @param destination
+ * The destination string the source is appended onto.
+ *
+ * @return
+ * F_none on success.
+ * F_data_not_eos if source length is 0.
+ * F_data_not_stop if range.start > range.stop.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ * F_string_too_large (with error bit) if the combined string is too large.
+ *
+ * Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_string_dynamic_partial_append_assure_nulless_
+ extern f_status_t f_string_dynamic_partial_append_assure_nulless(const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination);
+#endif // _di_f_string_dynamic_partial_append_assure_nulless_
+
+/**
+ * Append the source string onto the destination, but restricted to the given range.
+ *
+ * Skips over NULL characters from source when appending.
+ *
+ * @param source
+ * The source string to append.
+ * @param range
+ * A range within the source to restrict the copy from.
+ * @param destination
+ * The destination string the source is appended onto.
+ *
+ * @return
+ * F_none on success.
+ * F_data_not_eos if source length is 0.
+ * F_data_not_stop if range.start > range.stop.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ * F_string_too_large (with error bit) if the combined string is too large.
+ *
+ * Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_string_dynamic_partial_append_nulless_
+ extern f_status_t f_string_dynamic_partial_append_nulless(const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination);
+#endif // _di_f_string_dynamic_partial_append_nulless_
+
+/**
+ * Append the source string onto the destination with the glue in between, but restricted to the given range.
+ *
+ * If the destination string is empty, then no glue is appended.
+ *
+ * @param glue
+ * A string to append between the source and destination, such as a space: ' '.
+ * @param glue_length
+ * The number of bytes the glue takes up.
+ * @param source
+ * The source string to append.
+ * @param range
+ * A range within the source to restrict the copy from.
+ * @param destination
+ * The destination string the source and glue are appended onto.
+ *
+ * @return
+ * F_none on success.
+ * F_data_not_eos if source length is 0.
+ * F_data_not_stop if range.start > range.stop.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ * F_string_too_large (with error bit) if the combined string is too large.
+ *
+ * Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_string_dynamic_partial_mash_
+ extern f_status_t f_string_dynamic_partial_mash(const f_string_t glue, const f_array_length_t glue_length, const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination);
+#endif // _di_f_string_dynamic_partial_mash_
+
+/**
+ * Append the source string onto the destination with the glue in between, but restricted to the given range.
+ *
+ * If the destination string is empty, then no glue is appended.
+ *
+ * Skips over NULL characters from glue and source when appending.
+ *
+ * @param glue
+ * A string to append between the source and destination, such as a space: ' '.
+ * @param glue_length
+ * The number of bytes the glue takes up.
+ * @param source
+ * The source string to append.
+ * @param range
+ * A range within the source to restrict the copy from.
+ * @param destination
+ * The destination string the source and glue are appended onto.
+ *
+ * @return
+ * F_none on success.
+ * F_data_not_eos if source length is 0.
+ * F_data_not_stop if range.start > range.stop.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ * F_string_too_large (with error bit) if the combined string is too large.
+ *
+ * Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_string_dynamic_partial_mash_nulless_
+ extern f_status_t f_string_dynamic_partial_mash_nulless(const f_string_t glue, const f_array_length_t glue_length, const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination);
+#endif // _di_f_string_dynamic_partial_mash_nulless_
+
+/**
+ * Prepend the source string onto the destination with the glue in between, but restricted to the given range.
+ *
+ * If the destination string is empty, then no glue is appended.
+ *
+ * @param glue
+ * A string to append between the source and destination, such as a space: ' '.
+ * @param glue_length
+ * The number of bytes the glue takes up.
+ * @param source
+ * The source string to append.
+ * @param range
+ * A range within the source to restrict the copy from.
+ * @param destination
+ * The destination string the source and glue are appended onto.
+ *
+ * @return
+ * F_none on success.
+ * F_data_not_eos if source length is 0.
+ * F_data_not_stop if range.start > range.stop.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ * F_string_too_large (with error bit) if the combined string is too large.
+ *
+ * Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_string_dynamic_partial_mish_
+ extern f_status_t f_string_dynamic_partial_mish(const f_string_t glue, const f_array_length_t glue_length, const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination);
+#endif // _di_f_string_dynamic_partial_mish_
+
+/**
+ * Prepend the source string onto the destination with the glue in between, but restricted to the given range.
+ *
+ * If the destination string is empty, then no glue is appended.
+ *
+ * Skips over NULL characters from glue and source when appending.
+ *
+ * @param glue
+ * A string to append between the source and destination, such as a space: ' '.
+ * @param glue_length
+ * The number of bytes the glue takes up.
+ * @param source
+ * The source string to append.
+ * @param range
+ * A range within the source to restrict the copy from.
+ * @param destination
+ * The destination string the source and glue are appended onto.
+ *
+ * @return
+ * F_none on success.
+ * F_data_not_eos if source length is 0.
+ * F_data_not_stop if range.start > range.stop.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ * F_string_too_large (with error bit) if the combined string is too large.
+ *
+ * Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_string_dynamic_partial_mish_nulless_
+ extern f_status_t f_string_dynamic_partial_mish_nulless(const f_string_t glue, const f_array_length_t glue_length, const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination);
+#endif // _di_f_string_dynamic_partial_mish_nulless_
+
+/**
+ * Prepend the source string onto the destination, but restricted to the given range.
+ *
+ * Prepend operations require memory move operations and are therefore likely more expensive than append operations.
+ *
+ * @param source
+ * The source string to prepend.
+ * @param range
+ * A range within the source to restrict the copy from.
+ * @param destination
+ * The destination string the source is prepended onto.
+ *
+ * @return
+ * F_none on success.
+ * F_data_not_eos if source length is 0.
+ * F_data_not_stop if range.start > range.stop.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ * F_string_too_large (with error bit) if the combined string is too large.
+ *
+ * Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_string_dynamic_partial_prepend_
+ extern f_status_t f_string_dynamic_partial_prepend(const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination);
+#endif // _di_f_string_dynamic_partial_prepend_
+
+/**
+ * Prepend the source string onto the destination, but only if the string is not already at the end and restricted to the given range
+ *
+ * Prepend operations require memory move operations and are therefore likely more expensive than append operations.
+ *
+ * This ignores NULL characters when comparing both the source and the destination.
+ *
+ * @param source
+ * The source string to prepend.
+ * @param range
+ * A range within the source to restrict the copy from.
+ * @param destination
+ * The destination string the source is prepended onto.
+ *
+ * @return
+ * F_none on success.
+ * F_data_not_eos if source length is 0.
+ * F_data_not_stop if range.start > range.stop.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ * F_string_too_large (with error bit) if the combined string is too large.
+ *
+ * Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_string_dynamic_partial_prepend_assure_
+ extern f_status_t f_string_dynamic_partial_prepend_assure(const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination);
+#endif // _di_f_string_dynamic_partial_prepend_assure_
+
+/**
+ * Prepend the source string onto the destination, but only if the string is not already at the end and restricted to the given range
+ *
+ * Prepend operations require memory move operations and are therefore likely more expensive than append operations.
+ *
+ * This ignores NULL characters when comparing both the source and the destination.
+ *
+ * @param source
+ * The source string to prepend.
+ * @param range
+ * A range within the source to restrict the copy from.
+ * @param destination
+ * The destination string the source is prepended onto.
+ *
+ * @return
+ * F_none on success.
+ * F_data_not_eos if source length is 0.
+ * F_data_not_stop if range.start > range.stop.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ * F_string_too_large (with error bit) if the combined string is too large.
+ *
+ * Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_string_dynamic_partial_prepend_assure_nulless_
+ extern f_status_t f_string_dynamic_partial_prepend_assure_nulless(const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination);
+#endif // _di_f_string_dynamic_partial_prepend_assure_nulless_
+
+/**
+ * Prepend the source string onto the destination, but restricted to the given range.
+ *
+ * Prepend operations require memory move operations and are therefore likely more expensive than append operations.
+ *
+ * @param source
+ * The source string to prepend.
+ * @param range
+ * A range within the source to restrict the copy from.
+ * @param destination
+ * The destination string the source is prepended onto.
+ *
+ * @return
+ * F_none on success.
+ * F_data_not_eos if source length is 0.
+ * F_data_not_stop if range.start > range.stop.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ * F_string_too_large (with error bit) if the combined string is too large.
+ *
+ * Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_string_dynamic_partial_prepend_nulless_
+ extern f_status_t f_string_dynamic_partial_prepend_nulless(const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination);
+#endif // _di_f_string_dynamic_partial_prepend_nulless_
+
+/**
+ * Prepend the source string onto the destination.
+ *
+ * Prepend operations require memory move operations and are therefore likely more expensive than append operations.
+ *
+ * @param source
+ * The source string to prepend.
+ * @param destination
+ * The destination string the source is prepended onto.
+ *
+ * @return
+ * F_none on success.
+ * F_data_not_eos if source length is 0.
+ * F_data_not_stop if range.start > range.stop.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ * F_string_too_large (with error bit) if the combined string is too large.
+ *
+ * Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_string_dynamic_prepend_
+ extern f_status_t f_string_dynamic_prepend(const f_string_static_t source, f_string_dynamic_t *destination);
+#endif // _di_f_string_dynamic_prepend_
+
+/**
+ * Prepend the source string onto the destination, but only if the string is not already at the beginning.
+ *
+ * Prepend operations require memory move operations and are therefore likely more expensive than append operations.
+ *
+ * This ignores NULL characters when comparing both the source and the destination.
+ *
+ * @param source
+ * The source string to prepend.
+ * @param destination
+ * The destination string the source is prepended onto.
+ *
+ * @return
+ * F_none on success.
+ * F_data_not_eos if source length is 0.
+ * F_data_not_stop if range.start > range.stop.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ * F_string_too_large (with error bit) if the combined string is too large.
+ *
+ * Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_string_dynamic_prepend_assure_
+ extern f_status_t f_string_dynamic_prepend_assure(const f_string_static_t source, f_string_dynamic_t *destination);
+#endif // _di_f_string_dynamic_prepend_assure_
+
+/**
+ * Prepend the source string onto the destination, but only if the string is not already at the beginning.
+ *
+ * Prepend operations require memory move operations and are therefore likely more expensive than append operations.
+ *
+ * This ignores NULL characters when comparing both the source and the destination.
+ *
+ * @param source
+ * The source string to prepend.
+ * @param destination
+ * The destination string the source is prepended onto.
+ *
+ * @return
+ * F_none on success.
+ * F_data_not_eos if source length is 0.
+ * F_data_not_stop if range.start > range.stop.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ * F_string_too_large (with error bit) if the combined string is too large.
+ *
+ * Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_string_dynamic_prepend_assure_nulless_
+ extern f_status_t f_string_dynamic_prepend_assure_nulless(const f_string_static_t source, f_string_dynamic_t *destination);
+#endif // _di_f_string_dynamic_prepend_assure_nulless_
+
+/**
+ * Prepend the source string onto the destination.
+ *
+ * Prepend operations require memory move operations and are therefore likely more expensive than append operations.
+ *
+ * @param source
+ * The source string to prepend.
+ * @param destination
+ * The destination string the source is prepended onto.
+ *
+ * @return
+ * F_none on success.
+ * F_data_not_eos if source length is 0.
+ * F_data_not_stop if range.start > range.stop.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ * F_string_too_large (with error bit) if the combined string is too large.
+ *
+ * Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_string_dynamic_prepend_nulless_
+ extern f_status_t f_string_dynamic_prepend_nulless(const f_string_static_t source, f_string_dynamic_t *destination);
+#endif // _di_f_string_dynamic_prepend_nulless_
+
+/**
* Resize the dynamic string.
*
* @param length
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_string_dynamic_resize_
extern f_status_t f_string_dynamic_resize(const f_array_length_t length, f_string_dynamic_t *dynamic);
#endif // _di_f_string_dynamic_resize_
/**
+ * Seek the buffer location forward until EOL is reached.
+ *
+ * @param string
+ * The string to traverse.
+ * @param range
+ * A range within the buffer representing the start and stop locations.
+ * The start location will be incremented by seek.
+ *
+ * @return
+ * F_none on success.
+ * F_none_stop on success, but stopped at end of range.
+ * F_data_not on success, but there was no string data to seek.
+ * F_data_not_stop on success, but the range.start > range.stop.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_string_dynamic_seek_line_
+ extern f_status_t f_string_dynamic_seek_line(const f_string_t string, f_string_range_t *range);
+#endif // _di_f_string_dynamic_seek_line_
+
+/**
+ * Seek the buffer location forward until the character (1-byte wide) or EOL is reached.
+ *
+ * @param string
+ * The string to traverse.
+ * @param seek_to_this
+ * A single-width character representing a character to seek to.
+ * @param range
+ * A range within the buffer representing the start and stop locations.
+ * The start location will be incremented by seek.
+ *
+ * @return
+ * F_none on success.
+ * F_none_eol on success, but stopped at EOL.
+ * F_none_stop on success, but stopped at end of range.
+ * F_data_not on success, but there was no string data to seek.
+ * F_data_not_stop on success, but the range.start > range.stop.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_string_dynamic_seek_line_to_
+ extern f_status_t f_string_dynamic_seek_line_to(const f_string_t string, const int8_t seek_to_this, f_string_range_t *range);
+#endif // _di_f_string_dynamic_seek_line_to_
+
+/**
+ * Seek the buffer location forward until the character (1-byte wide) is reached.
+ *
+ * @param string
+ * The string to traverse.
+ * @param seek_to_this
+ * A single-width character representing a character to seek to.
+ * @param range
+ * A range within the buffer representing the start and stop locations.
+ * The start location will be incremented by seek.
+ *
+ * @return
+ * F_none on success.
+ * F_none_stop on success, but stopped at end of range.
+ * F_data_not on success, but there was no string data to seek.
+ * F_data_not_stop on success, but the range.start > range.stop.
+ *
+ * F_complete_not_utf (with error bit) if character is an incomplete UTF-8 fragment.
+ * F_complete_not_utf_stop (with error bit) if the stop location is reached before the complete UTF-8 character can be processed.
+ * F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_string_dynamic_seek_to_
+ extern f_status_t f_string_dynamic_seek_to(const f_string_t string, const int8_t seek_to_this, f_string_range_t *range);
+#endif // _di_f_string_dynamic_seek_to_
+
+/**
+ * Guarantee that an end of string (NULL) exists at the end of the string.
+ *
+ * This is intended to be used for anything requiring NULL terminated strings.
+ * This will reallocate more space if necessary.
+ *
+ * If destination size is 0, then it will be reallocated and have the NULL assigned at index 0.
+ *
+ * @param destination
+ * The new string, which will be allocated or reallocated as necessary.
+ *
+ * @return
+ * F_none on success.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ * F_string_too_large (with error bit) if string is too large to fit into the buffer.
+ *
+ * Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_string_dynamic_terminate_
+ extern f_status_t f_string_dynamic_terminate(f_string_dynamic_t *destination);
+#endif // _di_f_string_dynamic_terminate_
+
+/**
+ * Guarantee that an end of string (NULL) exists at the end of the string.
+ *
+ * This ensures that the terminating NULL not only exists but is not counted in destination.used.
+ *
+ * This is intended to be used for anything requiring NULL terminated strings whose used length cannot be counted.
+ * This will reallocate more space if necessary.
+ *
+ * If destination size is 0, then it will be reallocated and have the NULL assigned at index 0.
+ *
+ * @param destination
+ * The new string, which will be allocated or reallocated as necessary.
+ *
+ * @return
+ * F_none on success.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ * F_string_too_large (with error bit) if string is too large to fit into the buffer.
+ *
+ * Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_string_dynamic_terminate_after_
+ extern f_status_t f_string_dynamic_terminate_after(f_string_dynamic_t *destination);
+#endif // _di_f_string_dynamic_terminate_after_
+
+/**
* Resize the dynamic string array.
*
* @param length
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_adjust().
*/
#ifndef _di_f_string_dynamics_adjust_
extern f_status_t f_string_dynamics_adjust(const f_array_length_t length, f_string_dynamics_t *dynamics);
#endif // _di_f_string_dynamics_adjust_
/**
+ * Append the source strings onto the destination.
+ *
+ * @param source
+ * The source strings to append.
+ * @param destination
+ * The destination strings the source is appended onto.
+ *
+ * @return
+ * F_none on success.
+ * F_data_not on success, but there is nothing to append (size == 0).
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ * F_string_too_large (with error bit) if the combined string is too large.
+ *
+ * Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_string_dynamics_append_
+ extern f_status_t f_string_dynamics_append(const f_string_dynamics_t source, f_string_dynamics_t *destination);
+#endif // _di_f_string_dynamics_append_
+
+/**
* Resize the dynamic string array to a smaller size.
*
* This will resize making the array smaller based on (size - given length).
* F_none on success.
* F_data_not on success, but there is no reason to increase size (size == 0).
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_string_dynamics_decimate_by_
extern f_status_t f_string_dynamics_decimate_by(const f_array_length_t amount, f_string_dynamics_t *dynamics);
* F_none on success.
* F_data_not on success, but there is no reason to increase size (size == 0).
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_string_dynamics_decrease_by_
extern f_status_t f_string_dynamics_decrease_by(const f_array_length_t amount, f_string_dynamics_t *dynamics);
* F_none on success.
* F_data_not on success, but there is no reason to increase size (used + 1 <= size).
*
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
* F_array_too_large (with error bit) if the new array length is too large.
+ * F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_string_dynamics_increase_
extern f_status_t f_string_dynamics_increase(f_string_dynamics_t *dynamics);
* F_none on success.
* F_data_not on success, but there is no reason to increase size (used + amount <= size).
*
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
* F_array_too_large (with error bit) if the new array length is too large.
+ * F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_string_dynamics_increase_by_
extern f_status_t f_string_dynamics_increase_by(const f_array_length_t amount, f_string_dynamics_t *dynamics);
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_string_dynamics_resize_
extern f_status_t f_string_dynamics_resize(const f_array_length_t length, f_string_dynamics_t *dynamics);
}
#endif // _di_f_string_map_multis_adjust_
+#ifndef _di_f_string_map_multis_append_
+ f_status_t f_string_map_multis_append(const f_string_map_multis_t source, f_string_map_multis_t *destination) {
+ #ifndef _di_level_0_parameter_checking_
+ if (!destination) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ f_status_t status = F_none;
+
+ if (destination->used + source.used > destination->size) {
+ status = private_f_string_map_multis_resize(destination->used + source.used, destination);
+ if (F_status_is_error(status)) return status;
+ }
+
+ for (f_array_length_t i = 0; i < source.used; ++i, ++destination->used) {
+
+ destination->array[destination->used].name.used = 0;
+ destination->array[destination->used].value.used = 0;
+
+ if (source.array[i].name.used) {
+ status = private_f_string_append(source.array[i].name.string, source.array[i].name.used, &destination->array[destination->used].name);
+ if (F_status_is_error(status)) return status;
+ }
+
+ if (source.array[i].value.used) {
+ status = private_f_string_dynamics_append(source.array[i].value, &destination->array[destination->used].value);
+ if (F_status_is_error(status)) return status;
+ }
+ } // for
+
+ return F_none;
+ }
+#endif // _di_f_string_map_multis_append_
+
#ifndef _di_f_string_map_multis_decimate_by_
f_status_t f_string_map_multis_decimate_by(const f_array_length_t amount, f_string_map_multis_t *map_multis) {
#ifndef _di_level_0_parameter_checking_
}
#endif // _di_f_string_maps_adjust_
+#ifndef _di_f_string_maps_append_
+ f_status_t f_string_maps_append(const f_string_maps_t source, f_string_maps_t *destination) {
+ #ifndef _di_level_0_parameter_checking_
+ if (!destination) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ if (!source.used) return F_data_not;
+
+ f_status_t status = F_none;
+
+ if (destination->used + source.used > destination->size) {
+ status = private_f_string_maps_resize(destination->used + source.used, destination);
+ if (F_status_is_error(status)) return status;
+ }
+
+ for (f_array_length_t i = 0; i < source.used; ++i, ++destination->used) {
+
+ destination->array[destination->used].name.used = 0;
+ destination->array[destination->used].value.used = 0;
+
+ if (source.array[i].name.used) {
+ status = private_f_string_append(source.array[i].name.string, source.array[i].name.used, &destination->array[destination->used].name);
+ if (F_status_is_error(status)) return status;
+ }
+
+ if (source.array[i].value.used) {
+ status = private_f_string_append(source.array[i].value.string, source.array[i].value.used, &destination->array[destination->used].value);
+ if (F_status_is_error(status)) return status;
+ }
+ } // for
+
+ return F_none;
+ }
+#endif // _di_f_string_maps_append_
+
#ifndef _di_f_string_maps_decimate_by_
f_status_t f_string_maps_decimate_by(const f_array_length_t amount, f_string_maps_t *maps) {
#ifndef _di_level_0_parameter_checking_
#endif // _di_f_string_map_multis_t_
/**
- * Resize the string map_multis array.
+ * Resize the map_multis array.
*
* @param length
* The new size to use.
* @param map_multis
- * The string map_multis array to resize.
+ * The map_multis array to resize.
*
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_string_map_multis_adjust_
extern f_status_t f_string_map_multis_adjust(const f_array_length_t length, f_string_map_multis_t *map_multis);
#endif // _di_f_string_map_multis_adjust_
/**
- * Resize the string map_multis array to a smaller size.
+ * Append the source map_multis onto the destination.
+ *
+ * @param source
+ * The source maps to append.
+ * @param destination
+ * The destination maps the source is appended onto.
+ *
+ * @return
+ * F_none on success.
+ * F_data_not on success, but there is nothing to append (size == 0).
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ * F_string_too_large (with error bit) if the combined string is too large.
+ *
+ * Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_string_map_multis_append_
+ f_status_t f_string_map_multis_append(const f_string_map_multis_t source, f_string_map_multis_t *destination);
+#endif // _di_f_string_map_multis_append_
+
+/**
+ * Resize the map_multis array to a smaller size.
*
* This will resize making the array smaller based on (size - given length).
* If the given length is too small, then the resize will fail.
* @param amount
* A positive number representing how much to decimate the size by.
* @param map_multis
- * The string map_multis array to resize.
+ * The map_multis array to resize.
*
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_string_map_multis_decimate_by_
extern f_status_t f_string_map_multis_decimate_by(const f_array_length_t amount, f_string_map_multis_t *map_multis);
#endif // _di_f_string_map_multis_decimate_by_
/**
- * Resize the string map_multis array to a smaller size.
+ * Resize the map_multis array to a smaller size.
*
* This will resize making the array smaller based on (size - given length).
* If the given length is too small, then the resize will fail.
* @param amount
* A positive number representing how much to decrease the size by.
* @param map_multis
- * The string map_multis array to resize.
+ * The map_multis array to resize.
*
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_string_map_multis_decrease_by_
extern f_status_t f_string_map_multis_decrease_by(const f_array_length_t amount, f_string_map_multis_t *map_multis);
#endif // _di_f_string_map_multis_decrease_by_
/**
- * Increase the size of the string map_multis array, but only if necessary.
+ * Increase the size of the map_multis array, but only if necessary.
*
* If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size).
* If already set to the maximum buffer size, then the resize will fail.
*
* @param map_multis
- * The string map_multis array to resize.
+ * The map_multis array to resize.
*
* @return
* F_none on success.
* F_data_not on success, but there is no reason to increase size (used + 1 <= size).
*
* F_array_too_large (with error bit) if the new array length is too large.
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_string_map_multis_increase_
extern f_status_t f_string_map_multis_increase(f_string_map_multis_t *map_multis);
#endif // _di_f_string_map_multis_increase_
/**
- * Resize the string map_multis array to a larger size.
+ * Resize the map_multis array to a larger size.
*
* This will resize making the string larger based on the given length.
* If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size).
* @param amount
* A positive number representing how much to increase the size by.
* @param map_multis
- * The string map_multis array to resize.
+ * The map_multis array to resize.
*
* @return
* F_none on success.
* F_data_not on success, but there is no reason to increase size (used + amount <= size).
*
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
* F_array_too_large (with error bit) if the new array length is too large.
+ * F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_string_map_multis_increase_by_
extern f_status_t f_string_map_multis_increase_by(const f_array_length_t amount, f_string_map_multis_t *map_multis);
#endif // _di_f_string_map_multis_increase_by_
/**
- * Resize the string map_multis array.
+ * Resize the map_multis array.
*
* @param length
* The new size to use.
* @param map_multis
- * The string map_multis array to adjust.
+ * The map_multis array to adjust.
*
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_string_map_multis_resize_
extern f_status_t f_string_map_multis_resize(const f_array_length_t length, f_string_map_multis_t *map_multis);
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_string_maps_adjust_
extern f_status_t f_string_maps_adjust(const f_array_length_t length, f_string_maps_t *maps);
#endif // _di_f_string_maps_adjust_
/**
+ * Append the source maps onto the destination.
+ *
+ * @param source
+ * The source maps to append.
+ * @param destination
+ * The destination maps the source is appended onto.
+ *
+ * @return
+ * F_none on success.
+ * F_data_not on success, but there is nothing to append (size == 0).
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ * F_string_too_large (with error bit) if the combined string is too large.
+ *
+ * Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_string_maps_append_
+ extern f_status_t f_string_maps_append(const f_string_maps_t source, f_string_maps_t *destination);
+#endif // _di_f_string_maps_append_
+
+/**
* Resize the string maps array to a smaller size.
*
* This will resize making the array smaller based on (size - given length).
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_string_maps_decimate_by_
extern f_status_t f_string_maps_decimate_by(const f_array_length_t amount, f_string_maps_t *maps);
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_string_maps_decrease_by_
extern f_status_t f_string_maps_decrease_by(const f_array_length_t amount, f_string_maps_t *maps);
* F_data_not on success, but there is no reason to increase size (used + 1 <= size).
*
* F_array_too_large (with error bit) if the new array length is too large.
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_string_maps_increase_
extern f_status_t f_string_maps_increase(f_string_maps_t *maps);
* F_none on success.
* F_data_not on success, but there is no reason to increase size (used + amount <= size).
*
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
* F_array_too_large (with error bit) if the new array length is too large.
+ * F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_string_maps_increase_by_
extern f_status_t f_string_maps_increase_by(const f_array_length_t amount, f_string_maps_t *maps);
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_string_maps_resize_
extern f_status_t f_string_maps_resize(const f_array_length_t length, f_string_maps_t *maps);
}
#endif // _di_f_string_quantitys_adjust_
+#ifndef _di_f_string_quantitys_append_
+ f_status_t f_string_quantitys_append(const f_string_quantitys_t source, f_string_quantitys_t *destination) {
+ #ifndef _di_level_0_parameter_checking_
+ if (!destination) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ if (!source.used) return F_data_not;
+
+ f_status_t status = F_none;
+
+ if (destination->used + source.used > destination->size) {
+ status = private_f_string_quantitys_adjust(destination->used + source.used, destination);
+ if (F_status_is_error(status)) return status;
+ }
+
+ for (f_array_length_t i = 0; i < source.used; ++i, ++destination->used) {
+
+ destination->array[destination->used].start = source.array[i].start;
+ destination->array[destination->used].total = source.array[i].total;
+ } // for
+
+ return F_none;
+ }
+#endif // _di_f_string_quantitys_append_
+
#ifndef _di_f_string_quantitys_decimate_by_
f_status_t f_string_quantitys_decimate_by(const f_array_length_t amount, f_string_quantitys_t *quantitys) {
#ifndef _di_level_0_parameter_checking_
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_string_quantitys_adjust_
extern f_status_t f_string_quantitys_adjust(const f_array_length_t length, f_string_quantitys_t *quantitys);
#endif // _di_f_string_quantitys_adjust_
/**
+ * Append the source quantitys onto the destination.
+ *
+ * @param source
+ * The source quantitys to append.
+ * @param destination
+ * The destination quantitys the source is appended onto.
+ *
+ * @return
+ * F_none on success.
+ * F_data_not on success, but there is nothing to append (size == 0).
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_string_quantitys_append_
+ extern f_status_t f_string_quantitys_append(const f_string_quantitys_t source, f_string_quantitys_t *destination);
+#endif // _di_f_string_quantitys_append_
+
+/**
* Resize the string quantitys array to a smaller size.
*
* This will resize making the array smaller based on (size - given length).
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_string_quantitys_decimate_by_
extern f_status_t f_string_quantitys_decimate_by(const f_array_length_t amount, f_string_quantitys_t *quantitys);
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_string_quantitys_decrease_by_
extern f_status_t f_string_quantitys_decrease_by(const f_array_length_t amount, f_string_quantitys_t *quantitys);
*
* @return
* F_none on success.
- * F_array_too_large (with error bit) if the new array length is too large.
*
- * F_memory_not (with error bit) on out of memory.
+ * F_array_too_large (with error bit) if the new array length is too large.
* F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_string_quantitys_increase_
extern f_status_t f_string_quantitys_increase(f_string_quantitys_t *quantitys);
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
* F_array_too_large (with error bit) if the new array length is too large.
+ * F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_string_quantitys_increase_by_
extern f_status_t f_string_quantitys_increase_by(const f_array_length_t amount, f_string_quantitys_t *quantitys);
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_string_quantitys_resize_
extern f_status_t f_string_quantitys_resize(const f_array_length_t length, f_string_quantitys_t *quantitys);
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_string_quantityss_adjust_
extern f_status_t f_string_quantityss_adjust(const f_array_length_t length, f_string_quantityss_t *quantityss);
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_string_quantityss_decimate_by_
extern f_status_t f_string_quantityss_decimate_by(const f_array_length_t amount, f_string_quantityss_t *quantityss);
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_string_quantityss_decrease_by_
extern f_status_t f_string_quantityss_decrease_by(const f_array_length_t amount, f_string_quantityss_t *quantityss);
* F_data_not on success, but there is no reason to increase size (used + 1 <= size).
*
* F_array_too_large (with error bit) if the new array length is too large.
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_string_quantityss_increase_
extern f_status_t f_string_quantityss_increase(f_string_quantityss_t *quantityss);
* F_none on success.
* F_data_not on success, but there is no reason to increase size (used + amount <= size).
*
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
* F_array_too_large (with error bit) if the new array length is too large.
+ * F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_string_quantityss_increase_by_
extern f_status_t f_string_quantityss_increase_by(const f_array_length_t amount, f_string_quantityss_t *quantityss);
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_string_quantityss_resize_
extern f_status_t f_string_quantityss_resize(const f_array_length_t length, f_string_quantityss_t *quantityss);
}
#endif // _di_f_string_ranges_adjust_
+#ifndef _di_f_string_ranges_append_
+ f_status_t f_string_ranges_append(const f_string_ranges_t source, f_string_ranges_t *destination) {
+ #ifndef _di_level_0_parameter_checking_
+ if (!destination) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ if (!source.used) return F_data_not;
+
+ f_status_t status = F_none;
+
+ if (destination->used + source.used > destination->size) {
+ status = private_f_string_ranges_adjust(destination->used + source.used, destination);
+ if (F_status_is_error(status)) return status;
+ }
+
+ for (f_array_length_t i = 0; i < source.used; ++i, ++destination->used) {
+
+ destination->array[destination->used].start = source.array[i].start;
+ destination->array[destination->used].stop = source.array[i].stop;
+ } // for
+
+ return F_none;
+ }
+#endif // _di_f_string_ranges_append_
+
#ifndef _di_f_string_ranges_decimate_by_
f_status_t f_string_ranges_decimate_by(const f_array_length_t amount, f_string_ranges_t *ranges) {
#ifndef _di_level_0_parameter_checking_
#endif // _di_f_string_ranges_adjust_
/**
+ * Append the source ranges onto the destination.
+ *
+ * @param source
+ * The source ranges to append.
+ * @param destination
+ * The destination ranges the source is appended onto.
+ *
+ * @return
+ * F_none on success.
+ * F_data_not on success, but there is nothing to append (size == 0).
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_string_ranges_append_
+ extern f_status_t f_string_ranges_append(const f_string_ranges_t source, f_string_ranges_t *destination);
+#endif // _di_f_string_ranges_append_
+
+/**
* Resize the string ranges array to a smaller size.
*
* This will resize making the array smaller based on (size - given length).
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_string_ranges_decimate_by_
extern f_status_t f_string_ranges_decimate_by(const f_array_length_t amount, f_string_ranges_t *ranges);
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_string_ranges_decrease_by_
extern f_status_t f_string_ranges_decrease_by(const f_array_length_t amount, f_string_ranges_t *ranges);
* F_none on success.
* F_array_too_large (with error bit) if the new array length is too large.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_string_ranges_increase_
extern f_status_t f_string_ranges_increase(f_string_ranges_t *ranges);
* F_none on success.
* F_data_not on success, but there is no reason to increase size (used + amount <= size).
*
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
* F_array_too_large (with error bit) if the new array length is too large.
+ * F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_string_ranges_increase_by_
extern f_status_t f_string_ranges_increase_by(const f_array_length_t amount, f_string_ranges_t *ranges);
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_string_ranges_resize_
extern f_status_t f_string_ranges_resize(const f_array_length_t length, f_string_ranges_t *ranges);
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_string_rangess_adjust_
extern f_status_t f_string_rangess_adjust(const f_array_length_t length, f_string_rangess_t *rangess);
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_string_rangess_decimate_by_
extern f_status_t f_string_rangess_decimate_by(const f_array_length_t amount, f_string_rangess_t *rangess);
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_string_rangess_decrease_by_
extern f_status_t f_string_rangess_decrease_by(const f_array_length_t amount, f_string_rangess_t *rangess);
* F_data_not on success, but there is no reason to increase size (used + 1 <= size).
*
* F_array_too_large (with error bit) if the new array length is too large.
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_string_rangess_increase_
extern f_status_t f_string_rangess_increase(f_string_rangess_t *rangess);
* F_none on success.
* F_data_not on success, but there is no reason to increase size (used + amount <= size).
*
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
* F_array_too_large (with error bit) if the new array length is too large.
+ * F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_string_rangess_increase_by_
extern f_status_t f_string_rangess_increase_by(const f_array_length_t amount, f_string_rangess_t *rangess);
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_string_rangess_resize_
extern f_status_t f_string_rangess_resize(const f_array_length_t length, f_string_rangess_t *rangess);
}
#endif // _di_f_string_triples_adjust_
+#ifndef _di_f_string_triples_append_
+ f_status_t f_string_triples_append(const f_string_triples_t source, f_string_triples_t *destination) {
+ #ifndef _di_level_0_parameter_checking_
+ if (!destination) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ if (!source.used) return F_data_not;
+
+ f_status_t status = F_none;
+
+ if (destination->used + source.used > destination->size) {
+ status = private_f_string_triples_adjust(destination->used + source.used, destination);
+ if (F_status_is_error(status)) return status;
+ }
+
+ for (f_array_length_t i = 0; i < source.used; ++i, ++destination->used) {
+
+ destination->array[destination->used].one.used = 0;
+ destination->array[destination->used].two.used = 0;
+ destination->array[destination->used].three.used = 0;
+
+ if (source.array[i].one.used) {
+ status = private_f_string_append(source.array[i].one.string, source.array[i].one.used, &destination->array[destination->used].one);
+ if (F_status_is_error(status)) return status;
+ }
+
+ if (source.array[i].two.used) {
+ status = private_f_string_append(source.array[i].two.string, source.array[i].two.used, &destination->array[destination->used].two);
+ if (F_status_is_error(status)) return status;
+ }
+
+ if (source.array[i].three.used) {
+ status = private_f_string_append(source.array[i].three.string, source.array[i].three.used, &destination->array[destination->used].three);
+ if (F_status_is_error(status)) return status;
+ }
+ } // for
+
+ return F_none;
+ }
+#endif // _di_f_string_triples_append_
+
#ifndef _di_f_string_triples_decimate_by_
f_status_t f_string_triples_decimate_by(const f_array_length_t amount, f_string_triples_t *triples) {
#ifndef _di_level_0_parameter_checking_
#endif // _di_f_string_triples_adjust_
/**
+ * Append the source triples onto the destination.
+ *
+ * @param source
+ * The source triples to append.
+ * @param destination
+ * The destination triples the source is appended onto.
+ *
+ * @return
+ * F_none on success.
+ * F_data_not on success, but there is no reason to increase size (size == 0).
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ * F_string_too_large (with error bit) if the combined string is too large.
+ *
+ * Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_string_triples_append_
+ extern f_status_t f_string_triples_append(const f_string_triples_t source, f_string_triples_t *destination);
+#endif // _di_f_string_triples_append_
+
+/**
* Resize the string triples array to a smaller size.
*
* This will resize making the array smaller based on (size - given length).
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_string_triples_decimate_by_
extern f_status_t f_string_triples_decimate_by(const f_array_length_t amount, f_string_triples_t *triples);
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_string_triples_decrease_by_
extern f_status_t f_string_triples_decrease_by(const f_array_length_t amount, f_string_triples_t *triples);
* F_data_not on success, but there is no reason to increase size (used + 1 <= size).
*
* F_array_too_large (with error bit) if the new array length is too large.
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_string_triples_increase_
extern f_status_t f_string_triples_increase(f_string_triples_t *triples);
* F_none on success.
* F_data_not on success, but there is no reason to increase size (used + amount <= size).
*
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
* F_array_too_large (with error bit) if the new array length is too large.
+ * F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_string_triples_increase_by_
extern f_status_t f_string_triples_increase_by(const f_array_length_t amount, f_string_triples_t *triples);
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_string_triples_resize_
extern f_status_t f_string_triples_resize(const f_array_length_t length, f_string_triples_t *triples);
if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!source.used) return F_data_not;
+
return private_f_type_cells_append(source, destination);
}
#endif // _di_f_type_cells_append_
if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!source.used) return F_data_not;
+
f_status_t status = F_none;
if (destination->used + source.used > destination->size) {
if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!source.used) return F_data_not;
+
return private_f_type_array_lengths_append(source, destination);
}
#endif // _di_f_type_array_lengths_append_
if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!source.used) return F_data_not;
+
f_status_t status = F_none;
if (destination->used + source.used > destination->size) {
if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!source.used) return F_data_not;
+
return private_f_type_int8s_append(source, destination);
}
#endif // _di_f_type_int8s_append_
if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!source.used) return F_data_not;
+
f_status_t status = F_none;
if (destination->used + source.used > destination->size) {
if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!source.used) return F_data_not;
+
return private_f_type_uint8s_append(source, destination);
}
#endif // _di_f_type_uint8s_append_
if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!source.used) return F_data_not;
+
f_status_t status = F_none;
if (destination->used + source.used > destination->size) {
if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!source.used) return F_data_not;
+
return private_f_type_int16s_append(source, destination);
}
#endif // _di_f_type_int16s_append_
if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!source.used) return F_data_not;
+
f_status_t status = F_none;
if (destination->used + source.used > destination->size) {
if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!source.used) return F_data_not;
+
return private_f_type_uint16s_append(source, destination);
}
#endif // _di_f_type_uint16s_append_
if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!source.used) return F_data_not;
+
f_status_t status = F_none;
if (destination->used + source.used > destination->size) {
if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!source.used) return F_data_not;
+
return private_f_type_int32s_append(source, destination);
}
#endif // _di_f_type_int32s_append_
if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!source.used) return F_data_not;
+
f_status_t status = F_none;
if (destination->used + source.used > destination->size) {
if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!source.used) return F_data_not;
+
return private_f_type_uint32s_append(source, destination);
}
#endif // _di_f_type_uint32s_append_
if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!source.used) return F_data_not;
+
f_status_t status = F_none;
if (destination->used + source.used > destination->size) {
if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!source.used) return F_data_not;
+
return private_f_type_int64s_append(source, destination);
}
#endif // _di_f_type_int64s_append_
if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!source.used) return F_data_not;
+
f_status_t status = F_none;
if (destination->used + source.used > destination->size) {
if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!source.used) return F_data_not;
+
return private_f_type_uint64s_append(source, destination);
}
#endif // _di_f_type_uint64s_append_
if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!source.used) return F_data_not;
+
f_status_t status = F_none;
if (destination->used + source.used > destination->size) {
if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!source.used) return F_data_not;
+
return private_f_type_int128s_append(source, destination);
}
#endif // _di_f_type_int128s_append_
if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!source.used) return F_data_not;
+
f_status_t status = F_none;
if (destination->used + source.used > destination->size) {
if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!source.used) return F_data_not;
+
return private_f_type_uint128s_append(source, destination);
}
#endif // _di_f_type_uint128s_append_
if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!source.used) return F_data_not;
+
f_status_t status = F_none;
if (destination->used + source.used > destination->size) {
*
* @return
* F_none on success.
+ * F_data_not on success, but there is nothing to append (size == 0).
*
* F_parameter (with error bit) if a parameter is invalid.
*
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_adjust().
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_resize().
* F_data_not on success, but there is no reason to increase size (used + 1 <= size).
*
* F_array_too_large (with error bit) if the new array length is too large.
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_resize().
* F_none on success.
* F_data_not on success, but there is no reason to increase size (used + amount <= size).
*
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
* F_array_too_large (with error bit) if the new array length is too large.
+ * F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_resize().
*/
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_resize().
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_adjust().
*
* @return
* F_none on success.
+ * F_data_not on success, but there is nothing to append (size == 0).
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_resize().
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_adjust().
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_adjust().
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_delete().
* F_data_not on success, but there is no reason to increase size (used + 1 <= size).
*
* F_array_too_large (with error bit) if the new array length is too large.
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_resize().
* F_none on success.
* F_data_not on success, but there is no reason to increase size (used + amount <= size).
*
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
* F_array_too_large (with error bit) if the new array length is too large.
+ * F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_resize().
*/
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_delete().
*
* @return
* F_none on success.
+ * F_data_not on success, but there is nothing to append (size == 0).
*
* F_parameter (with error bit) if a parameter is invalid.
*
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_adjust().
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_resize().
* F_data_not on success, but there is no reason to increase size (used + 1 <= size).
*
* F_array_too_large (with error bit) if the new array length is too large.
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_resize().
* F_none on success.
* F_data_not on success, but there is no reason to increase size (used + amount <= size).
*
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
* F_array_too_large (with error bit) if the new array length is too large.
+ * F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_resize().
*/
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_resize().
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_adjust().
*
* @return
* F_none on success.
+ * F_data_not on success, but there is nothing to append (size == 0).
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_resize().
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_adjust().
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_adjust().
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_delete().
* F_data_not on success, but there is no reason to increase size (used + 1 <= size).
*
* F_array_too_large (with error bit) if the new array length is too large.
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_resize().
* F_none on success.
* F_data_not on success, but there is no reason to increase size (used + amount <= size).
*
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
* F_array_too_large (with error bit) if the new array length is too large.
+ * F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_resize().
*/
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_delete().
*
* @return
* F_none on success.
+ * F_data_not on success, but there is nothing to append (size == 0).
*
* F_parameter (with error bit) if a parameter is invalid.
*
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_adjust().
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_resize().
* F_data_not on success, but there is no reason to increase size (used + 1 <= size).
*
* F_array_too_large (with error bit) if the new array length is too large.
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_resize().
* F_none on success.
* F_data_not on success, but there is no reason to increase size (used + amount <= size).
*
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
* F_array_too_large (with error bit) if the new array length is too large.
+ * F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_resize().
*/
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_resize().
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_adjust().
*
* @return
* F_none on success.
+ * F_data_not on success, but there is nothing to append (size == 0).
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_resize().
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_adjust().
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_adjust().
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_delete().
* F_data_not on success, but there is no reason to increase size (used + 1 <= size).
*
* F_array_too_large (with error bit) if the new array length is too large.
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_resize().
* F_none on success.
* F_data_not on success, but there is no reason to increase size (used + amount <= size).
*
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
* F_array_too_large (with error bit) if the new array length is too large.
+ * F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_resize().
*/
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_delete().
*
* @return
* F_none on success.
+ * F_data_not on success, but there is nothing to append (size == 0).
*
* F_parameter (with error bit) if a parameter is invalid.
*
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_adjust().
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_resize().
* F_data_not on success, but there is no reason to increase size (used + 1 <= size).
*
* F_array_too_large (with error bit) if the new array length is too large.
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_resize().
* F_none on success.
* F_data_not on success, but there is no reason to increase size (used + amount <= size).
*
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
* F_array_too_large (with error bit) if the new array length is too large.
+ * F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_resize().
*/
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_resize().
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_adjust().
*
* @return
* F_none on success.
+ * F_data_not on success, but there is nothing to append (size == 0).
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_resize().
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_adjust().
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_adjust().
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_delete().
* F_data_not on success, but there is no reason to increase size (used + 1 <= size).
*
* F_array_too_large (with error bit) if the new array length is too large.
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_resize().
* F_none on success.
* F_data_not on success, but there is no reason to increase size (used + amount <= size).
*
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
* F_array_too_large (with error bit) if the new array length is too large.
+ * F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_resize().
*/
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_delete().
*
* @return
* F_none on success.
+ * F_data_not on success, but there is nothing to append (size == 0).
*
* F_parameter (with error bit) if a parameter is invalid.
*
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_adjust().
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_resize().
* F_data_not on success, but there is no reason to increase size (used + 1 <= size).
*
* F_array_too_large (with error bit) if the new array length is too large.
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_resize().
* F_none on success.
* F_data_not on success, but there is no reason to increase size (used + amount <= size).
*
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
* F_array_too_large (with error bit) if the new array length is too large.
+ * F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_resize().
*/
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_resize().
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_adjust().
*
* @return
* F_none on success.
+ * F_data_not on success, but there is nothing to append (size == 0).
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_resize().
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_adjust().
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_adjust().
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_delete().
* F_data_not on success, but there is no reason to increase size (used + 1 <= size).
*
* F_array_too_large (with error bit) if the new array length is too large.
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_resize().
* F_none on success.
* F_data_not on success, but there is no reason to increase size (used + amount <= size).
*
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
* F_array_too_large (with error bit) if the new array length is too large.
+ * F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_resize().
*/
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_delete().
*
* @return
* F_none on success.
+ * F_data_not on success, but there is nothing to append (size == 0).
*
* F_parameter (with error bit) if a parameter is invalid.
*
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_adjust().
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_resize().
* F_data_not on success, but there is no reason to increase size (used + 1 <= size).
*
* F_array_too_large (with error bit) if the new array length is too large.
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_resize().
* F_none on success.
* F_data_not on success, but there is no reason to increase size (used + amount <= size).
*
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
* F_array_too_large (with error bit) if the new array length is too large.
+ * F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_resize().
*/
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_resize().
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_adjust().
*
* @return
* F_none on success.
+ * F_data_not on success, but there is nothing to append (size == 0).
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_resize().
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_adjust().
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_adjust().
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_delete().
* F_data_not on success, but there is no reason to increase size (used + 1 <= size).
*
* F_array_too_large (with error bit) if the new array length is too large.
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_resize().
* F_none on success.
* F_data_not on success, but there is no reason to increase size (used + amount <= size).
*
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
* F_array_too_large (with error bit) if the new array length is too large.
+ * F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_resize().
*/
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_delete().
*
* @return
* F_none on success.
+ * F_data_not on success, but there is nothing to append (size == 0).
*
* F_parameter (with error bit) if a parameter is invalid.
*
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_adjust().
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_resize().
* F_data_not on success, but there is no reason to increase size (used + 1 <= size).
*
* F_array_too_large (with error bit) if the new array length is too large.
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_resize().
* F_none on success.
* F_data_not on success, but there is no reason to increase size (used + amount <= size).
*
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
* F_array_too_large (with error bit) if the new array length is too large.
+ * F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_resize().
*/
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_resize().
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_adjust().
*
* @return
* F_none on success.
+ * F_data_not on success, but there is nothing to append (size == 0).
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_resize().
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_adjust().
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_adjust().
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_delete().
* F_data_not on success, but there is no reason to increase size (used + 1 <= size).
*
* F_array_too_large (with error bit) if the new array length is too large.
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_resize().
* F_none on success.
* F_data_not on success, but there is no reason to increase size (used + amount <= size).
*
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
* F_array_too_large (with error bit) if the new array length is too large.
+ * F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_resize().
*/
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_delete().
*
* @return
* F_none on success.
+ * F_data_not on success, but there is nothing to append (size == 0).
*
* F_parameter (with error bit) if a parameter is invalid.
*
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_adjust().
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_resize().
* F_data_not on success, but there is no reason to increase size (used + 1 <= size).
*
* F_array_too_large (with error bit) if the new array length is too large.
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_resize().
* F_none on success.
* F_data_not on success, but there is no reason to increase size (used + amount <= size).
*
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
* F_array_too_large (with error bit) if the new array length is too large.
+ * F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_resize().
*/
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_resize().
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_adjust().
*
* @return
* F_none on success.
+ * F_data_not on success, but there is nothing to append (size == 0).
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_resize().
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_adjust().
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_adjust().
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_delete().
* F_data_not on success, but there is no reason to increase size (used + 1 <= size).
*
* F_array_too_large (with error bit) if the new array length is too large.
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_resize().
* F_none on success.
* F_data_not on success, but there is no reason to increase size (used + amount <= size).
*
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
* F_array_too_large (with error bit) if the new array length is too large.
+ * F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_resize().
*/
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_delete().
*
* @return
* F_none on success.
+ * F_data_not on success, but there is nothing to append (size == 0).
*
* F_parameter (with error bit) if a parameter is invalid.
*
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_adjust().
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_resize().
* F_data_not on success, but there is no reason to increase size (used + 1 <= size).
*
* F_array_too_large (with error bit) if the new array length is too large.
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_resize().
* F_none on success.
* F_data_not on success, but there is no reason to increase size (used + amount <= size).
*
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
* F_array_too_large (with error bit) if the new array length is too large.
+ * F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_resize().
*/
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_resize().
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_adjust().
*
* @return
* F_none on success.
+ * F_data_not on success, but there is nothing to append (size == 0).
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_resize().
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_adjust().
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_adjust().
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_delete().
* F_data_not on success, but there is no reason to increase size (used + 1 <= size).
*
* F_array_too_large (with error bit) if the new array length is too large.
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_resize().
* F_none on success.
* F_data_not on success, but there is no reason to increase size (used + amount <= size).
*
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
* F_array_too_large (with error bit) if the new array length is too large.
+ * F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_resize().
*/
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_delete().
*
* @return
* F_none on success.
+ * F_data_not on success, but there is nothing to append (size == 0).
*
* F_parameter (with error bit) if a parameter is invalid.
*
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_adjust().
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_resize().
* F_data_not on success, but there is no reason to increase size (used + 1 <= size).
*
* F_array_too_large (with error bit) if the new array length is too large.
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_resize().
* F_none on success.
* F_data_not on success, but there is no reason to increase size (used + amount <= size).
*
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
* F_array_too_large (with error bit) if the new array length is too large.
+ * F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_resize().
*/
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_resize().
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_adjust().
*
* @return
* F_none on success.
+ * F_data_not on success, but there is nothing to append (size == 0).
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_resize().
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_adjust().
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_adjust().
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_delete().
* F_data_not on success, but there is no reason to increase size (used + 1 <= size).
*
* F_array_too_large (with error bit) if the new array length is too large.
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_resize().
* F_none on success.
* F_data_not on success, but there is no reason to increase size (used + amount <= size).
*
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
* F_array_too_large (with error bit) if the new array length is too large.
+ * F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_resize().
*/
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_delete().
*
* @return
* F_none on success.
+ * F_data_not on success, but there is nothing to append (size == 0).
*
* F_parameter (with error bit) if a parameter is invalid.
*
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_adjust().
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_resize().
* F_data_not on success, but there is no reason to increase size (used + 1 <= size).
*
* F_array_too_large (with error bit) if the new array length is too large.
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_resize().
* F_none on success.
* F_data_not on success, but there is no reason to increase size (used + amount <= size).
*
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
* F_array_too_large (with error bit) if the new array length is too large.
+ * F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_resize().
*/
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_resize().
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_adjust().
*
* @return
* F_none on success.
+ * F_data_not on success, but there is nothing to append (size == 0).
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_resize().
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_adjust().
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_adjust().
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_delete().
* F_data_not on success, but there is no reason to increase size (used + 1 <= size).
*
* F_array_too_large (with error bit) if the new array length is too large.
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_resize().
* F_none on success.
* F_data_not on success, but there is no reason to increase size (used + amount <= size).
*
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
* F_array_too_large (with error bit) if the new array length is too large.
+ * F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_resize().
*/
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_delete().
*
* @return
* F_none on success.
+ * F_data_not on success, but there is nothing to append (size == 0).
*
* F_parameter (with error bit) if a parameter is invalid.
*
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_adjust().
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_resize().
* F_data_not on success, but there is no reason to increase size (used + 1 <= size).
*
* F_array_too_large (with error bit) if the new array length is too large.
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_resize().
* F_none on success.
* F_data_not on success, but there is no reason to increase size (used + amount <= size).
*
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
* F_array_too_large (with error bit) if the new array length is too large.
+ * F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_resize().
*/
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_resize().
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_adjust().
*
* @return
* F_none on success.
+ * F_data_not on success, but there is nothing to append (size == 0).
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_resize().
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_adjust().
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_adjust().
* @return
* F_none on success.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_delete().
* F_data_not on success, but there is no reason to increase size (used + 1 <= size).
*
* F_array_too_large (with error bit) if the new array length is too large.
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_resize().
* F_none on success.
* F_data_not on success, but there is no reason to increase size (used + amount <= size).
*
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
* F_array_too_large (with error bit) if the new array length is too large.
+ * F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_memory_resize().
*/
case F_encoding_not:
*string = FL_status_string_encoding_not;
break;
+ case F_eoa:
+ *string = FL_status_string_eoa;
+ break;
+ case F_eoa_not:
+ *string = FL_status_string_eoa_not;
+ break;
case F_eof:
*string = FL_status_string_eof;
break;
case F_complete_not_utf_block:
*string = FL_status_string_complete_not_utf_block;
break;
+ case F_complete_not_utf_eoa:
+ *string = FL_status_string_complete_not_utf_eoa;
+ break;
case F_complete_not_utf_eof:
*string = FL_status_string_complete_not_utf_eof;
break;
case F_none_block:
*string = FL_status_string_none_block;
break;
+ case F_none_eoa:
+ *string = FL_status_string_none_eoa;
+ break;
case F_none_eof:
*string = FL_status_string_none_eof;
break;
case F_data_not_block:
*string = FL_status_string_data_not_block;
break;
+ case F_data_not_eoa:
+ *string = FL_status_string_data_not_eoa;
+ break;
case F_data_not_eof:
*string = FL_status_string_data_not_eof;
break;
case F_terminated_not_block:
*string = FL_status_string_terminated_not_block;
break;
+ case F_terminated_not_eoa:
+ *string = FL_status_string_terminated_not_eoa;
+ break;
case F_terminated_not_eof:
*string = FL_status_string_terminated_not_eof;
break;
case F_terminated_not_group_block:
*string = FL_status_string_terminated_not_group_block;
break;
+ case F_terminated_not_group_eoa:
+ *string = FL_status_string_terminated_not_group_eoa;
+ break;
case F_terminated_not_group_eof:
*string = FL_status_string_terminated_not_group_eof;
break;
case F_terminated_not_nest_block:
*string = FL_status_string_terminated_not_nest_block;
break;
+ case F_terminated_not_nest_eoa:
+ *string = FL_status_string_terminated_not_nest_eoa;
+ break;
case F_terminated_not_nest_eof:
*string = FL_status_string_terminated_not_nest_eof;
break;
#define FL_status_string_empty_not "F_empty_not"
#define FL_status_string_encoding "F_encoding"
#define FL_status_string_encoding_not "F_encoding_not"
+ #define FL_status_string_eoa "F_eoa"
+ #define FL_status_string_eoa_not "F_eoa_not"
#define FL_status_string_eof "F_eof"
#define FL_status_string_eof_not "F_eof_not"
#define FL_status_string_eol "F_eol"
#define FL_status_string_empty_not_length 11
#define FL_status_string_encoding_length 10
#define FL_status_string_encoding_not_length 14
+ #define FL_status_string_eoa_length 5
+ #define FL_status_string_eoa_not_length 9
#define FL_status_string_eof_length 5
#define FL_status_string_eof_not_length 9
#define FL_status_string_eol_length 5
#define FL_status_string_buffer_too_small "F_buffer_too_small"
#define FL_status_string_complete_not_utf "F_complete_not_utf"
#define FL_status_string_complete_not_utf_block "F_complete_not_utf_block"
+ #define FL_status_string_complete_not_utf_eoa "F_complete_not_utf_eoa"
#define FL_status_string_complete_not_utf_eof "F_complete_not_utf_eof"
#define FL_status_string_complete_not_utf_eol "F_complete_not_utf_eol"
#define FL_status_string_complete_not_utf_eos "F_complete_not_utf_eos"
#define FL_status_string_complete_not_utf_stop "F_complete_not_utf_stop"
#define FL_status_string_none_block "F_none_block"
+ #define FL_status_string_none_eoa "F_none_eoa"
#define FL_status_string_none_eof "F_none_eof"
#define FL_status_string_none_eol "F_none_eol"
#define FL_status_string_none_eos "F_none_eos"
#define FL_status_string_data "F_data"
#define FL_status_string_data_not "F_data_not"
#define FL_status_string_data_not_block "F_data_not_block"
+ #define FL_status_string_data_not_eoa "F_data_not_eoa"
#define FL_status_string_data_not_eof "F_data_not_eof"
#define FL_status_string_data_not_eol "F_data_not_eol"
#define FL_status_string_data_not_eos "F_data_not_eos"
#define FL_status_string_terminated "F_terminated"
#define FL_status_string_terminated_not "F_terminated_not"
#define FL_status_string_terminated_not_block "F_terminated_not_block"
+ #define FL_status_string_terminated_not_eoa "F_terminated_not_eoa"
#define FL_status_string_terminated_not_eof "F_terminated_not_eof"
#define FL_status_string_terminated_not_eol "F_terminated_not_eol"
#define FL_status_string_terminated_not_eos "F_terminated_not_eos"
#define FL_status_string_terminated_not_stop "F_terminated_not_stop"
#define FL_status_string_terminated_not_group "F_terminated_not_group"
#define FL_status_string_terminated_not_group_block "F_terminated_not_group_block"
+ #define FL_status_string_terminated_not_group_eoa "F_terminated_not_group_eoa"
#define FL_status_string_terminated_not_group_eof "F_terminated_not_group_eof"
#define FL_status_string_terminated_not_group_eol "F_terminated_not_group_eol"
#define FL_status_string_terminated_not_group_eos "F_terminated_not_group_eos"
#define FL_status_string_terminated_not_group_stop "F_terminated_not_group_stop"
#define FL_status_string_terminated_not_nest "F_terminated_not_nest"
#define FL_status_string_terminated_not_nest_block "F_terminated_not_nest_block"
+ #define FL_status_string_terminated_not_nest_eoa "F_terminated_not_nest_eoa"
#define FL_status_string_terminated_not_nest_eof "F_terminated_not_nest_eof"
#define FL_status_string_terminated_not_nest_eol "F_terminated_not_nest_eol"
#define FL_status_string_terminated_not_nest_eos "F_terminated_not_nest_eos"
#define FL_status_string_buffer_too_small_length 18
#define FL_status_string_complete_not_utf_length 18
#define FL_status_string_complete_not_utf_block_length 24
+ #define FL_status_string_complete_not_utf_eoa_length 22
#define FL_status_string_complete_not_utf_eof_length 22
#define FL_status_string_complete_not_utf_eol_length 22
#define FL_status_string_complete_not_utf_eos_length 22
#define FL_status_string_complete_not_utf_stop_length 23
#define FL_status_string_none_block_length 12
+ #define FL_status_string_none_eoa_length 10
#define FL_status_string_none_eof_length 10
#define FL_status_string_none_eol_length 10
#define FL_status_string_none_eos_length 10
#define FL_status_string_data_length 6
#define FL_status_string_data_not_length 10
#define FL_status_string_data_not_block_length 16
+ #define FL_status_string_data_not_eoa_length 14
#define FL_status_string_data_not_eof_length 14
#define FL_status_string_data_not_eol_length 14
#define FL_status_string_data_not_eos_length 14
#define FL_status_string_terminated_length 12
#define FL_status_string_terminated_not_length 16
#define FL_status_string_terminated_not_block_length 22
+ #define FL_status_string_terminated_not_eoa_length 20
#define FL_status_string_terminated_not_eof_length 20
#define FL_status_string_terminated_not_eol_length 20
#define FL_status_string_terminated_not_eos_length 20
#define FL_status_string_terminated_not_stop_length 21
#define FL_status_string_terminated_not_group_length 22
#define FL_status_string_terminated_not_group_block_length 28
+ #define FL_status_string_terminated_not_group_eoa_length 25
#define FL_status_string_terminated_not_group_eof_length 25
#define FL_status_string_terminated_not_group_eol_length 25
#define FL_status_string_terminated_not_group_eos_length 25
#define FL_status_string_terminated_not_group_stop_length 26
#define FL_status_string_terminated_not_nest_length 21
#define FL_status_string_terminated_not_nest_block_length 26
+ #define FL_status_string_terminated_not_nest_eoa_length 25
#define FL_status_string_terminated_not_nest_eof_length 25
#define FL_status_string_terminated_not_nest_eol_length 25
#define FL_status_string_terminated_not_nest_eos_length 25
}
#endif // _di_fll_status_to_string_
-#ifndef _di_fll_fss_status_is_error_
- f_status_t fll_fss_status_is_error(const f_status_t code) {
-
- if (fll_fss_status_is_fine(code) == F_true) {
- return F_false;
- }
- else if (fll_fss_status_is_warning(code) == F_true) {
- return F_false;
- }
-
- return F_true;
- }
-#endif // _di_fll_fss_status_is_error_
-
-#ifndef _di_fll_fss_status_is_warning_
- f_status_t fll_fss_status_is_warning(const f_status_t code) {
-
- switch (code) {
- #ifndef _di_fll_fss_status_basic_
- case F_data_not:
- return F_true;
- #endif // _di_fll_fss_status_basic_
-
- #ifndef _di_f_status_buffers_
- case F_data_not_eof:
- return F_true;
- case F_data_not_eos:
- return F_true;
- case F_data_not_stop:
- return F_true;
- case F_none_eof:
- return F_true;
- case F_none_eos:
- return F_true;
- case F_none_stop:
- return F_true;
- #endif // _di_f_status_buffers_
- }
-
- return F_false;
- }
-#endif // _di_fll_fss_status_is_warning_
-
-#ifndef _di_fll_fss_status_is_fine_
- f_status_t fll_fss_status_is_fine(const f_status_t code) {
-
- switch (code) {
- #ifndef _di_fll_fss_status_booleans_
- case F_false:
- return F_true;
- case F_true:
- return F_true;
- #endif // _di_fll_fss_status_booleans_
-
- #ifndef _di_fll_fss_status_basic_
- case F_none:
- return F_true;
- case F_dummy:
- return F_true;
- #endif // _di_fll_fss_status_basic_
-
- #ifndef _di_F_error_compare_
- case F_than_less:
- return F_true;
- case F_equal_to:
- return F_true;
- case F_equal_to_not:
- return F_true;
- case F_than_greater:
- return F_true;
- #endif // _di_fll_fss_status_non_
- }
-
- return F_false;
- }
-#endif // _di_fll_fss_status_is_fine_
-
#ifdef __cplusplus
} // extern "C"
#endif
extern f_status_t fll_fss_status_to_string(const f_status_t code, f_string_t *string);
#endif // _di_fll_status_to_string_
-/**
- * Returns true or false depending on whether the given status code has the error bit set.
- *
- * @param code
- * The code to process.
- *
- * @return
- * F_true if status has the error bit set.
- * F_false otherwise.
- */
-#ifndef _di_fll_fss_status_is_error_
- extern f_status_t fll_fss_status_is_error(const f_status_t code);
-#endif // _di_fll_fss_status_is_error_
-
-/**
- * Returns true or false depending on whether the given status code has the warning bit set.
- *
- * @param code
- * The code to process.
- *
- * @return
- * F_true if status has the warning bit set.
- * F_false otherwise.
- */
-#ifndef _di_fll_fss_status_is_warning_
- extern f_status_t fll_fss_status_is_warning(const f_status_t code);
-#endif // _di_fll_fss_status_is_warning_
-
-/**
- * Returns true or false depending on whether the given status code has neither the error bit nor the warning bit set.
- *
- * @param code
- * The code to process.
- *
- * @return
- * F_true if status does not have the error bit nor warning bit set.
- * F_false otherwise.
- */
-#ifndef _di_fll_fss_status_is_fine_
- extern f_status_t fll_fss_status_is_fine(const f_status_t code);
-#endif // _di_fll_fss_status_is_fine_
-
#ifdef __cplusplus
} // extern "C"
#endif
return F_none;
}
+ if (fl_string_compare(string, FL_status_string_eoa, length, FL_status_string_eoa_length) == F_equal_to) {
+ *code = F_eoa;
+ return F_none;
+ }
+
+ if (fl_string_compare(string, FL_status_string_eoa_not, length, FL_status_string_eoa_not_length) == F_equal_to) {
+ *code = F_eoa_not;
+ return F_none;
+ }
+
if (fl_string_compare(string, FL_status_string_eof, length, FL_status_string_eof_length) == F_equal_to) {
*code = F_eof;
return F_none;
return F_none;
}
+ if (fl_string_compare(string, FL_status_string_complete_not_utf_eoa, length, FL_status_string_complete_not_utf_eoa_length) == F_equal_to) {
+ *code = F_complete_not_utf_eoa;
+ return F_none;
+ }
+
if (fl_string_compare(string, FL_status_string_complete_not_utf_eof, length, FL_status_string_complete_not_utf_eof_length) == F_equal_to) {
*code = F_complete_not_utf_eof;
return F_none;
return F_none;
}
+ if (fl_string_compare(string, FL_status_string_none_eoa, length, FL_status_string_none_eoa_length) == F_equal_to) {
+ *code = F_none_eoa;
+ return F_none;
+ }
+
if (fl_string_compare(string, FL_status_string_none_eof, length, FL_status_string_none_eof_length) == F_equal_to) {
*code = F_none_eof;
return F_none;
return F_none;
}
+ if (fl_string_compare(string, FL_status_string_data_not_eoa, length, FL_status_string_data_not_eoa_length) == F_equal_to) {
+ *code = F_data_not_eoa;
+ return F_none;
+ }
+
if (fl_string_compare(string, FL_status_string_data_not_eof, length, FL_status_string_data_not_eof_length) == F_equal_to) {
*code = F_data_not_eof;
return F_none;
return F_none;
}
+ if (fl_string_compare(string, FL_status_string_terminated_not_eoa, length, FL_status_string_terminated_not_eoa_length) == F_equal_to) {
+ *code = F_terminated_not_eoa;
+ return F_none;
+ }
+
if (fl_string_compare(string, FL_status_string_terminated_not_eof, length, FL_status_string_terminated_not_eof_length) == F_equal_to) {
*code = F_terminated_not_eof;
return F_none;
return F_none;
}
+ if (fl_string_compare(string, FL_status_string_terminated_not_group_eoa, length, FL_status_string_terminated_not_group_eoa_length) == F_equal_to) {
+ *code = F_terminated_not_group_eoa;
+ return F_none;
+ }
+
if (fl_string_compare(string, FL_status_string_terminated_not_group_eof, length, FL_status_string_terminated_not_group_eof_length) == F_equal_to) {
*code = F_terminated_not_group_eof;
return F_none;
return F_none;
}
+ if (fl_string_compare(string, FL_status_string_terminated_not_nest_eoa, length, FL_status_string_terminated_not_nest_eoa_length) == F_equal_to) {
+ *code = F_terminated_not_nest_eoa;
+ return F_none;
+ }
+
if (fl_string_compare(string, FL_status_string_terminated_not_nest_eof, length, FL_status_string_terminated_not_nest_eof_length) == F_equal_to) {
*code = F_terminated_not_nest_eof;
return F_none;