The existing _size_increase() functions are renamed to _increase_by().
The existing _size_decrease() functions are renamed to _decrease_by().
f_status_t status = F_none;
if (destination->used + length > destination->size) {
- status = private_fl_string_dynamic_size_increase(length, destination);
+ status = private_fl_string_dynamic_increase_by(length, destination);
if (F_status_is_error(status)) return status;
}
size = i - first;
if (destination->used + size > destination->size) {
- status = private_fl_string_dynamic_size_increase(size, destination);
+ status = private_fl_string_dynamic_increase_by(size, destination);
if (F_status_is_error(status)) return status;
}
size = i - first;
if (destination->used + size > destination->size) {
- status = private_fl_string_dynamic_size_increase(size, destination);
+ status = private_fl_string_dynamic_increase_by(size, destination);
if (F_status_is_error(status)) return status;
}
}
#endif // !defined(_di_fl_string_compare_trim_) || !defined(_di_fl_string_dynamic_compare_trim_) || !defined(_di_fl_string_dynamic_partial_compare_trim_)
-#if !defined(_di_fl_string_dynamic_size_increase_) || !defined(_di_fl_string_append_) || !defined(_di_fl_string_dynamic_append_) || !defined(_di_fl_string_append_mash_) || !defined(_di_fl_string_dynamic_mash_) || !defined(_di_fl_string_append_nulless_) || !defined(_di_fl_string_dynamic_append_nulless_) || !defined(_di_fl_string_mash_nulless_) || !defined(_di_fl_string_dynamic_mash_nulless_) || !defined(_di_fl_string_prepend_) || !defined(_di_fl_string_dynamic_prepend_) || !defined(_di_fl_string_prepend_nulless_) || !defined(_di_fl_string_dynamic_prepend_nulless_)
- f_return_status private_fl_string_dynamic_size_increase(const f_string_length_t amount, f_string_dynamic_t *string) {
+#if !defined(_di_fl_string_dynamic_increase_by_) || !defined(_di_fl_string_append_) || !defined(_di_fl_string_dynamic_append_) || !defined(_di_fl_string_append_mash_) || !defined(_di_fl_string_dynamic_mash_) || !defined(_di_fl_string_append_nulless_) || !defined(_di_fl_string_dynamic_append_nulless_) || !defined(_di_fl_string_mash_nulless_) || !defined(_di_fl_string_dynamic_mash_nulless_) || !defined(_di_fl_string_prepend_) || !defined(_di_fl_string_dynamic_prepend_) || !defined(_di_fl_string_prepend_nulless_) || !defined(_di_fl_string_dynamic_prepend_nulless_)
+ f_return_status private_fl_string_dynamic_increase_by(const f_string_length_t amount, f_string_dynamic_t *string) {
f_status_t status = F_none;
if (string->size + amount > f_string_length_t_size) {
f_macro_string_dynamic_t_resize(status, (*string), string->size + amount);
return status;
}
-#endif // !defined(_di_fl_string_dynamic_size_increase_) || !defined(_di_fl_string_append_) || !defined(_di_fl_string_dynamic_append_) || !defined(_di_fl_string_append_mash_) || !defined(_di_fl_string_dynamic_mash_) || !defined(_di_fl_string_append_nulless_) || !defined(_di_fl_string_dynamic_append_nulless_) || !defined(_di_fl_string_mash_nulless_) || !defined(_di_fl_string_dynamic_mash_nulless_) || !defined(_di_fl_string_prepend_) || !defined(_di_fl_string_dynamic_prepend_) || !defined(_di_fl_string_prepend_nulless_) || !defined(_di_fl_string_dynamic_prepend_nulless_)
+#endif // !defined(_di_fl_string_dynamic_increase_by_) || !defined(_di_fl_string_append_) || !defined(_di_fl_string_dynamic_append_) || !defined(_di_fl_string_append_mash_) || !defined(_di_fl_string_dynamic_mash_) || !defined(_di_fl_string_append_nulless_) || !defined(_di_fl_string_dynamic_append_nulless_) || !defined(_di_fl_string_mash_nulless_) || !defined(_di_fl_string_dynamic_mash_nulless_) || !defined(_di_fl_string_prepend_) || !defined(_di_fl_string_dynamic_prepend_) || !defined(_di_fl_string_prepend_nulless_) || !defined(_di_fl_string_dynamic_prepend_nulless_)
#if !defined(_di_fl_string_prepend_) || !defined(_di_fl_string_dynamic_prepend_) || !defined(_di_fl_string_append_mish_) || !defined(_di_fl_string_dynamic_mish_)
f_return_status private_fl_string_prepend(const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination) {
f_status_t status = F_none;
if (destination->used + length > destination->size) {
- status = private_fl_string_dynamic_size_increase(length, destination);
+ status = private_fl_string_dynamic_increase_by(length, destination);
if (F_status_is_error(status)) return status;
}
size = i - first;
if (destination->used + size > destination->size) {
- status = private_fl_string_dynamic_size_increase(size, destination);
+ status = private_fl_string_dynamic_increase_by(size, destination);
if (F_status_is_error(status)) return status;
}
size = i - first;
if (destination->used + size > destination->size) {
- status = private_fl_string_dynamic_size_increase(size, destination);
+ status = private_fl_string_dynamic_increase_by(size, destination);
if (F_status_is_error(status)) return status;
}
#endif // !defined(_di_fl_string_compare_trim_) || !defined(_di_fl_string_dynamic_compare_trim_) || !defined(_di_fl_string_dynamic_partial_compare_trim_)
/**
- * Private implementation of fl_string_dynamic_size_increase().
+ * Private implementation of fl_string_dynamic_increase_by().
*
* Intended to be shared to each of the different implementation variations.
*
* @param amount
- * A positive number greater than 0 representing how much to increase the size by.
+ * A positive number representing how much to increase the size by.
* @param string
* The string to resize.
*
* F_parameter (with error bit) if a parameter is invalid.
* F_string_too_large (with error bit) if the combined string is too large.
*/
-#if !defined(_di_fl_string_dynamic_size_increase_) || !defined(_di_fl_string_append_) || !defined(_di_fl_string_dynamic_append_) || !defined(_di_fl_string_append_mash_) || !defined(_di_fl_string_dynamic_mash_) || !defined(_di_fl_string_append_nulless_) || !defined(_di_fl_string_dynamic_append_nulless_) || !defined(_di_fl_string_mash_nulless_) || !defined(_di_fl_string_dynamic_mash_nulless_) || !defined(_di_fl_string_prepend_) || !defined(_di_fl_string_dynamic_prepend_) || !defined(_di_fl_string_prepend_nulless_) || !defined(_di_fl_string_dynamic_prepend_nulless_)
- extern f_return_status private_fl_string_dynamic_size_increase(const f_string_length_t amount, f_string_dynamic_t *string) f_gcc_attribute_visibility_internal;
-#endif // !defined(_di_fl_string_dynamic_size_increase_) || !defined(_di_fl_string_append_) || !defined(_di_fl_string_dynamic_append_) || !defined(_di_fl_string_append_mash_) || !defined(_di_fl_string_dynamic_mash_) || !defined(_di_fl_string_append_nulless_) || !defined(_di_fl_string_dynamic_append_nulless_) || !defined(_di_fl_string_mash_nulless_) || !defined(_di_fl_string_dynamic_mash_nulless_) || !defined(_di_fl_string_prepend_) || !defined(_di_fl_string_dynamic_prepend_) || !defined(_di_fl_string_prepend_nulless_) || !defined(_di_fl_string_dynamic_prepend_nulless_)
+#if !defined(_di_fl_string_dynamic_increase_by_) || !defined(_di_fl_string_append_) || !defined(_di_fl_string_dynamic_append_) || !defined(_di_fl_string_append_mash_) || !defined(_di_fl_string_dynamic_mash_) || !defined(_di_fl_string_append_nulless_) || !defined(_di_fl_string_dynamic_append_nulless_) || !defined(_di_fl_string_mash_nulless_) || !defined(_di_fl_string_dynamic_mash_nulless_) || !defined(_di_fl_string_prepend_) || !defined(_di_fl_string_dynamic_prepend_) || !defined(_di_fl_string_prepend_nulless_) || !defined(_di_fl_string_dynamic_prepend_nulless_)
+ extern f_return_status private_fl_string_dynamic_increase_by(const f_string_length_t amount, f_string_dynamic_t *string) f_gcc_attribute_visibility_internal;
+#endif // !defined(_di_fl_string_dynamic_increase_by_) || !defined(_di_fl_string_append_) || !defined(_di_fl_string_dynamic_append_) || !defined(_di_fl_string_append_mash_) || !defined(_di_fl_string_dynamic_mash_) || !defined(_di_fl_string_append_nulless_) || !defined(_di_fl_string_dynamic_append_nulless_) || !defined(_di_fl_string_mash_nulless_) || !defined(_di_fl_string_dynamic_mash_nulless_) || !defined(_di_fl_string_prepend_) || !defined(_di_fl_string_dynamic_prepend_) || !defined(_di_fl_string_prepend_nulless_) || !defined(_di_fl_string_dynamic_prepend_nulless_)
/**
* Private implementation of fl_string_prepend().
}
#endif // _di_fl_string_dynamic_rip_nulless_
-#ifndef _di_fl_string_dynamic_size_decrease_
- f_return_status fl_string_dynamic_size_decrease(const f_string_length_t amount, f_string_dynamic_t *string) {
+#ifndef _di_fl_string_dynamic_decrease_
+ f_return_status fl_string_dynamic_decrease(f_string_dynamic_t *string) {
+ #ifndef _di_level_1_parameter_checking_
+ if (!string) return F_status_set_error(F_parameter);
+ #endif // _di_level_1_parameter_checking_
+
+ f_status_t status = F_none;
+
+ if (string->size - 1 > 0) {
+ f_macro_string_dynamic_t_resize(status, (*string), string->size - 1);
+ }
+ else {
+ f_macro_string_dynamic_t_delete(status, (*string));
+ }
+
+ return status;
+ }
+#endif // _di_fl_string_dynamic_decrease_
+
+#ifndef _di_fl_string_dynamic_decrease_by_
+ f_return_status fl_string_dynamic_decrease_by(const f_string_length_t amount, f_string_dynamic_t *string) {
#ifndef _di_level_1_parameter_checking_
if (!amount) return F_status_set_error(F_parameter);
if (!string) return F_status_set_error(F_parameter);
if (string->size - amount > 0) {
f_macro_string_dynamic_t_resize(status, (*string), string->size - amount);
}
- else if (string->size - amount <= 0) {
+ else {
f_macro_string_dynamic_t_delete(status, (*string));
}
return status;
}
-#endif // _di_fl_string_dynamic_size_decrease_
+#endif // _di_fl_string_dynamic_decrease_by_
+
+#ifndef _di_fl_string_dynamic_increase_
+ f_return_status fl_string_dynamic_increase(f_string_dynamic_t *string) {
+ #ifndef _di_level_1_parameter_checking_
+ if (!string) return F_status_set_error(F_parameter);
+ #endif // _di_level_1_parameter_checking_
+
+ f_status_t status = F_none;
+
+ if (string->size + f_memory_default_allocation_step > f_string_length_t_size) {
+ if (string->size == f_string_length_t_size) {
+ return F_status_set_error(F_string_too_large);
+ }
+
+ f_macro_string_dynamic_t_resize(status, (*string), f_string_length_t_size);
+ return F_string_too_large;
+ }
+
+ f_macro_string_dynamic_t_resize(status, (*string), string->size + f_memory_default_allocation_step);
+ return status;
+ }
+#endif // _di_fl_string_dynamic_increase_
-#ifndef _di_fl_string_dynamic_size_increase_
- f_return_status fl_string_dynamic_size_increase(const f_string_length_t amount, f_string_dynamic_t *string) {
+#ifndef _di_fl_string_dynamic_increase_by_
+ f_return_status fl_string_dynamic_increase_by(const f_string_length_t amount, f_string_dynamic_t *string) {
#ifndef _di_level_1_parameter_checking_
if (!amount) return F_status_set_error(F_parameter);
if (!string) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- return private_fl_string_dynamic_size_increase(amount, string);
+ return private_fl_string_dynamic_increase_by(amount, string);
}
-#endif // _di_fl_string_dynamic_size_increase_
+#endif // _di_fl_string_dynamic_increase_by_
#ifndef _di_fl_string_dynamic_seek_line_
f_return_status fl_string_dynamic_seek_line(const f_string_t string, f_string_range_t *range) {
}
#endif // _di_fl_string_dynamic_terminate_after_
-#ifndef _di_fl_string_dynamics_size_decrease_
- f_return_status fl_string_dynamics_size_decrease(const f_array_length_t length, f_string_dynamics_t *strings) {
+#ifndef _di_fl_string_dynamics_decrease_
+ f_return_status fl_string_dynamics_decrease(f_string_dynamics_t *strings) {
#ifndef _di_level_1_parameter_checking_
- if (!length) return F_status_set_error(F_parameter);
if (!strings) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
f_status_t status = F_none;
- if (strings->size - length > 0) {
- f_macro_string_dynamics_t_resize(status, (*strings), strings->size - length);
+ if (strings->size - 1 > 0) {
+ f_macro_string_dynamics_t_resize(status, (*strings), strings->size - 1);
}
- else if (strings->size - length <= 0) {
+ else {
f_macro_string_dynamics_t_delete(status, (*strings));
}
return status;
}
-#endif // _di_fl_string_dynamics_size_decrease_
+#endif // _di_fl_string_dynamics_decrease_
-#ifndef _di_fl_string_dynamics_size_increase_
- f_return_status fl_string_dynamics_size_increase(const f_array_length_t length, f_string_dynamics_t *strings) {
+#ifndef _di_fl_string_dynamics_decrease_by_
+ f_return_status fl_string_dynamics_decrease_by(const f_array_length_t amount, f_string_dynamics_t *strings) {
#ifndef _di_level_1_parameter_checking_
- if (!length) return F_status_set_error(F_parameter);
+ if (!amount) return F_status_set_error(F_parameter);
if (!strings) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
f_status_t status = F_none;
- if (strings->size + length > f_array_length_t_size) {
+ if (strings->size - amount > 0) {
+ f_macro_string_dynamics_t_resize(status, (*strings), strings->size - amount);
+ }
+ else {
+ f_macro_string_dynamics_t_delete(status, (*strings));
+ }
+
+ return status;
+ }
+#endif // _di_fl_string_dynamics_decrease_by_
+
+#ifndef _di_fl_string_dynamics_increase_
+ f_return_status fl_string_dynamics_increase(f_string_dynamics_t *strings) {
+ #ifndef _di_level_1_parameter_checking_
+ if (!strings) return F_status_set_error(F_parameter);
+ #endif // _di_level_1_parameter_checking_
+
+ f_status_t status = F_none;
+
+ if (strings->size + f_memory_default_allocation_step > f_array_length_t_size) {
if (strings->size == f_array_length_t_size) {
- return F_status_set_error(F_string_too_large);
+ return F_status_set_error(F_buffer_too_large);
}
f_macro_string_dynamics_t_resize(status, (*strings), f_array_length_t_size);
- return F_string_too_large;
+ return F_buffer_too_large;
}
- f_macro_string_dynamics_t_resize(status, (*strings), strings->size + length);
+ f_macro_string_dynamics_t_resize(status, (*strings), strings->size + f_memory_default_allocation_step);
return status;
}
-#endif // _di_fl_string_dynamics_size_increase_
+#endif // _di_fl_string_dynamics_increase_
-#ifndef _di_fl_string_lengths_size_decrease_
- f_return_status fl_string_lengths_size_decrease(const f_array_length_t length, f_string_lengths_t *lengths) {
+#ifndef _di_fl_string_dynamics_increase_by_
+ f_return_status fl_string_dynamics_increase_by(const f_array_length_t amount, f_string_dynamics_t *strings) {
+ #ifndef _di_level_1_parameter_checking_
+ if (!amount) return F_status_set_error(F_parameter);
+ if (!strings) return F_status_set_error(F_parameter);
+ #endif // _di_level_1_parameter_checking_
+
+ f_status_t status = F_none;
+
+ if (strings->size + amount > f_array_length_t_size) {
+ if (strings->size == f_array_length_t_size) {
+ return F_status_set_error(F_buffer_too_large);
+ }
+
+ f_macro_string_dynamics_t_resize(status, (*strings), f_array_length_t_size);
+ return F_buffer_too_large;
+ }
+
+ f_macro_string_dynamics_t_resize(status, (*strings), strings->size + amount);
+ return status;
+ }
+#endif // _di_fl_string_dynamics_increase_by_
+
+#ifndef _di_fl_string_lengths_decrease_
+ f_return_status fl_string_lengths_decrease(f_string_lengths_t *lengths) {
#ifndef _di_level_1_parameter_checking_
- if (!length) return F_status_set_error(F_parameter);
if (!lengths) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
f_status_t status = F_none;
- if (lengths->used - length > 0) {
- f_macro_string_lengths_t_resize(status, (*lengths), lengths->size - length);
+ if (lengths->size - 1 > 0) {
+ f_macro_string_lengths_t_resize(status, (*lengths), lengths->size - 1);
}
- else if (lengths->used - length <= 0) {
+ else {
f_macro_string_lengths_t_delete(status, (*lengths));
}
return status;
}
-#endif // _di_fl_string_lengths_size_decrease_
+#endif // _di_fl_string_lengths_decrease_
-#ifndef _di_fl_string_lengths_size_increase_
- f_return_status fl_string_lengths_size_increase(const f_array_length_t length, f_string_lengths_t *lengths) {
+#ifndef _di_fl_string_lengths_decrease_by_
+ f_return_status fl_string_lengths_decrease_by(const f_array_length_t amount, f_string_lengths_t *lengths) {
#ifndef _di_level_1_parameter_checking_
- if (!length) return F_status_set_error(F_parameter);
+ if (!amount) return F_status_set_error(F_parameter);
if (!lengths) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
f_status_t status = F_none;
- if (lengths->used + length > lengths->size) {
- if (lengths->used + length > f_array_length_t_size) {
- if (lengths->used == f_array_length_t_size) {
- status = F_status_set_error(F_string_too_large);
- }
- else {
- f_macro_string_lengths_t_resize(status, (*lengths), f_array_length_t_size);
- }
+ if (lengths->size - amount > 0) {
+ f_macro_string_lengths_t_resize(status, (*lengths), lengths->size - amount);
+ }
+ else {
+ f_macro_string_lengths_t_delete(status, (*lengths));
+ }
+
+ return status;
+ }
+#endif // _di_fl_string_lengths_decrease_by_
+
+#ifndef _di_fl_string_lengths_increase_
+ f_return_status fl_string_lengths_increase(f_string_lengths_t *lengths) {
+ #ifndef _di_level_1_parameter_checking_
+ if (!lengths) return F_status_set_error(F_parameter);
+ #endif // _di_level_1_parameter_checking_
+
+ f_status_t status = F_none;
+
+ if (lengths->size + f_memory_default_allocation_step > f_array_length_t_size) {
+ if (lengths->size == f_array_length_t_size) {
+ return F_status_set_error(F_buffer_too_large);
}
- else {
- f_macro_string_lengths_t_resize(status, (*lengths), lengths->size + length);
+
+ f_macro_string_lengths_t_resize(status, (*lengths), f_array_length_t_size);
+ return F_buffer_too_large;
+ }
+
+ f_macro_string_lengths_t_resize(status, (*lengths), lengths->size + f_memory_default_allocation_step);
+ return status;
+ }
+#endif // _di_fl_string_lengths_increase_
+
+#ifndef _di_fl_string_lengths_increase_by_
+ f_return_status fl_string_lengths_increase_by(const f_array_length_t amount, f_string_lengths_t *lengths) {
+ #ifndef _di_level_1_parameter_checking_
+ if (!amount) return F_status_set_error(F_parameter);
+ if (!lengths) return F_status_set_error(F_parameter);
+ #endif // _di_level_1_parameter_checking_
+
+ f_status_t status = F_none;
+
+ if (lengths->size + amount > f_array_length_t_size) {
+ if (lengths->size == f_array_length_t_size) {
+ return F_status_set_error(F_buffer_too_large);
}
+
+ f_macro_string_lengths_t_resize(status, (*lengths), f_array_length_t_size);
+ return F_buffer_too_large;
}
+ f_macro_string_lengths_t_resize(status, (*lengths), lengths->size + amount);
return status;
}
-#endif // _di_fl_string_lengths_size_increase_
+#endif // _di_fl_string_lengths_increase_by_
#ifndef _di_fl_string_mash_
f_return_status fl_string_mash(const f_string_t glue, const f_string_length_t glue_length, const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination) {
#endif // _di_fl_string_dynamic_rip_nulless_
/**
+ * Resize the dynamic string to a smaller size, by 1.
+ *
+ * This will shrink the size by size - 1.
+ * This will not shrink the size to less than 0.
+ *
+ * @param string
+ * The string to resize.
+ *
+ * @return
+ * F_none on success.
+ * F_memory_allocation (with error bit) on memory allocation error.
+ * F_memory_reallocation (with error bit) on memory reallocation error.
+ * F_parameter (with error bit) if a parameter is invalid.
+ */
+#ifndef _di_fl_string_dynamic_decrease_
+ extern f_return_status fl_string_dynamic_decrease(f_string_dynamic_t *string);
+#endif // _di_fl_string_dynamic_decrease_
+
+/**
* Resize the dynamic string to a smaller size.
*
- * This will resize making the string smaller based on the given length.
+ * This will resize making the string smaller based on (size - given length).
* If the given length is too small, then the resize will fail.
* This will not shrink the size to less than 0.
*
* @param amount
- * A positive number greater than 0 representing how much to decrease the size by.
+ * A positive number representing how much to decrease the size by.
+ * @param string
+ * The string to resize.
+ *
+ * @return
+ * F_none on success.
+ * F_memory_allocation (with error bit) on memory allocation error.
+ * F_memory_reallocation (with error bit) on memory reallocation error.
+ * F_parameter (with error bit) if a parameter is invalid.
+ */
+#ifndef _di_fl_string_dynamic_decrease_by_
+ extern f_return_status fl_string_dynamic_decrease_by(const f_string_length_t amount, f_string_dynamic_t *string);
+#endif // _di_fl_string_dynamic_decrease_by_
+
+/**
+ * Resize the dynamic string 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_string_length_t_size).
+ * If already set to the maximum buffer size, then the resize will fail.
+ *
+ * @param amount
+ * A positive number representing how much to increase the size by.
* @param string
* The string to resize.
*
* @return
* F_none on success.
+ * F_string_too_large on success, but the requested length is too large for the buffer.
* F_memory_allocation (with error bit) on memory allocation error.
* F_memory_reallocation (with error bit) on memory reallocation error.
* 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_fl_string_dynamic_size_decrease_
- extern f_return_status fl_string_dynamic_size_decrease(const f_string_length_t amount, f_string_dynamic_t *string);
-#endif // _di_fl_string_dynamic_size_decrease_
+#ifndef _di_fl_string_dynamic_increase_
+ extern f_return_status fl_string_dynamic_increase(f_string_dynamic_t *string);
+#endif // _di_fl_string_dynamic_increase_
/**
* Resize the dynamic string to a larger size.
* If already set to the maximum buffer size, then the resize will fail.
*
* @param amount
- * A positive number greater than 0 representing how much to increase the size by.
+ * A positive number representing how much to increase the size by.
* @param string
* The string to resize.
*
* 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_fl_string_dynamic_size_increase_
- extern f_return_status fl_string_dynamic_size_increase(const f_string_length_t amount, f_string_dynamic_t *string);
-#endif // _di_fl_string_dynamic_size_increase_
+#ifndef _di_fl_string_dynamic_increase_by_
+ extern f_return_status fl_string_dynamic_increase_by(const f_string_length_t amount, f_string_dynamic_t *string);
+#endif // _di_fl_string_dynamic_increase_by_
/**
* Seek the buffer location forward until EOL is reached.
#endif // _di_fl_string_dynamic_terminate_after_
/**
- * Resize the array of dynamic strings to a smaller size.
+ * Resize the dynamic string array to a smaller size, by 1.
+ *
+ * This will shrink the size by size - 1.
+ * This will not shrink the size to less than 0.
+ *
+ * @param strings
+ * The string array to resize.
+ *
+ * @return
+ * F_none on success.
+ * F_memory_allocation (with error bit) on memory allocation error.
+ * F_memory_reallocation (with error bit) on memory reallocation error.
+ * F_parameter (with error bit) if a parameter is invalid.
+ */
+#ifndef _di_fl_string_dynamics_decrease_
+ extern f_return_status fl_string_dynamics_decrease(f_string_dynamics_t *strings);
+#endif // _di_fl_string_dynamics_decrease_
+
+/**
+ * Resize the dynamic string array to a smaller size.
*
- * This will resize making the string smaller based on the given length.
+ * This will resize making the array smaller based on (size - given length).
* If the given length is too small, then the resize will fail.
* This will not shrink the size to less than 0.
*
- * @param length
- * A positive number greater than 0 representing how much to decrease the size by.
+ * @param amount
+ * A positive number representing how much to decrease the size by.
* @param strings
* The string array to resize.
*
* F_memory_allocation (with error bit) on memory allocation error.
* F_memory_reallocation (with error bit) on memory reallocation error.
* 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_fl_string_dynamics_size_decrease_
- extern f_return_status fl_string_dynamics_size_decrease(const f_array_length_t length, f_string_dynamics_t *strings);
-#endif // _di_fl_string_dynamics_size_decrease_
+#ifndef _di_fl_string_dynamics_decrease_by_
+ extern f_return_status fl_string_dynamics_decrease_by(const f_array_length_t amount, f_string_dynamics_t *strings);
+#endif // _di_fl_string_dynamics_decrease_by_
+
+/**
+ * Increase the size of the dynamic string 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 strings
+ * The string array to resize.
+ *
+ * @return
+ * F_none on success.
+ * F_buffer_too_large on success, but the requested length is too large for the buffer.
+ * F_memory_allocation (with error bit) on memory allocation error.
+ * F_memory_reallocation (with error bit) on memory reallocation error.
+ * F_parameter (with error bit) if a parameter is invalid.
+ * F_buffer_too_large (with error bit) if the new array length is too large.
+ */
+#ifndef _di_fl_string_dynamics_increase_
+ extern f_return_status fl_string_dynamics_increase(f_string_dynamics_t *strings);
+#endif // _di_fl_string_dynamics_increase_
/**
- * Resize the array of dynamic strings to a larger size.
+ * Resize the dynamic string 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).
* If already set to the maximum buffer size, then the resize will fail.
*
- * @param length
- * A positive number greater than 0 representing how much to increase the size by.
+ * @param amount
+ * A positive number representing how much to increase the size by.
* @param strings
* The string array to resize.
*
* @return
* F_none on success.
- * F_string_too_large on success, but the requested length is too large for the buffer.
+ * F_buffer_too_large on success, but the requested length is too large for the buffer.
+ * F_memory_allocation (with error bit) on memory allocation error.
+ * F_memory_reallocation (with error bit) on memory reallocation error.
+ * F_parameter (with error bit) if a parameter is invalid.
+ * F_buffer_too_large (with error bit) if the new array length is too large.
+ */
+#ifndef _di_fl_string_dynamics_increase_by_
+ extern f_return_status fl_string_dynamics_increase_by(const f_array_length_t amount, f_string_dynamics_t *strings);
+#endif // _di_fl_string_dynamics_increase_by_
+
+/**
+ * Resize the string lengths array to a smaller size, by 1.
+ *
+ * This will shrink the size by size - 1.
+ * This will not shrink the size to less than 0.
+ *
+ * @param lengths
+ * The string lengths array to resize.
+ *
+ * @return
+ * F_none on success.
* F_memory_allocation (with error bit) on memory allocation error.
* F_memory_reallocation (with error bit) on memory reallocation error.
* 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_fl_string_dynamics_size_increase_
- extern f_return_status fl_string_dynamics_size_increase(const f_array_length_t length, f_string_dynamics_t *strings);
-#endif // _di_fl_string_dynamics_size_increase_
+#ifndef _di_fl_string_lengths_decrease_
+ extern f_return_status fl_string_lengths_decrease(f_string_lengths_t *lengths);
+#endif // _di_fl_string_lengths_decrease_
/**
- * Resize the array of string lengths to a smaller size.
+ * Resize the string lengths array to a smaller size.
*
- * This will resize making the string smaller based on the given length.
+ * This will resize making the array smaller based on (size - given length).
* If the given length is too small, then the resize will fail.
* This will not shrink the size to less than 0.
*
- * @param length
- * A positive number greater than 0 representing how much to decrease the size by.
- * @param strings
- * The string array to resize.
+ * @param amount
+ * A positive number representing how much to decrease the size by.
+ * @param lengths
+ * The string lengths array to resize.
*
* @return
* F_none on success.
* F_memory_allocation (with error bit) on memory allocation error.
* F_memory_reallocation (with error bit) on memory reallocation error.
* 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_fl_string_lengths_size_decrease_
- extern f_return_status fl_string_length_size_decrease(const f_array_length_t length, f_string_lengths_t *lengths);
-#endif // _di_fl_string_lengths_size_decrease_
+#ifndef _di_fl_string_lengths_decrease_by_
+ extern f_return_status fl_string_lengths_decrease_by(const f_array_length_t amount, f_string_lengths_t *lengths);
+#endif // _di_fl_string_lengths_decrease_by_
+
+/**
+ * Increase the size of the string lengths 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 lengths
+ * The string lengths array to resize.
+ *
+ * @return
+ * F_none on success.
+ * F_buffer_too_large on success, but the requested length is too large for the buffer.
+ * F_memory_allocation (with error bit) on memory allocation error.
+ * F_memory_reallocation (with error bit) on memory reallocation error.
+ * F_parameter (with error bit) if a parameter is invalid.
+ * F_buffer_too_large (with error bit) if the new array length is too large.
+ */
+#ifndef _di_fl_string_lengths_increase_
+ extern f_return_status fl_string_lengths_increase(f_string_lengths_t *lengths);
+#endif // _di_fl_string_lengths_increase_
/**
- * Resize the array of string lengths to a larger size.
+ * Resize the string lengths 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).
* If already set to the maximum buffer size, then the resize will fail.
*
- * @param length
- * A positive number greater than 0 representing how much to increase the size by.
- * @param strings
- * The string array to resize.
+ * @param amount
+ * A positive number representing how much to increase the size by.
+ * @param lengths
+ * The string lengths array to resize.
*
* @return
* F_none on success.
+ * F_buffer_too_large on success, but the requested length is too large for the buffer.
* F_memory_allocation (with error bit) on memory allocation error.
* F_memory_reallocation (with error bit) on memory reallocation error.
* F_parameter (with error bit) if a parameter is invalid.
- * F_string_too_large (with error bit) if the combined string is too large.
+ * F_buffer_too_large (with error bit) if the new array length is too large.
*/
-#ifndef _di_fl_string_lengths_size_increase_
- extern f_return_status fl_string_lengths_size_increase(const f_array_length_t length, f_string_lengths_t *lengths);
-#endif // _di_fl_string_lengths_size_increase_
+#ifndef _di_fl_string_lengths_increase_by_
+ extern f_return_status fl_string_lengths_increase_by(const f_array_length_t amount, f_string_lengths_t *lengths);
+#endif // _di_fl_string_lengths_increase_by_
/**
* Append the source string onto the destination with the glue in between.
}
else {
if (destination->used + 1 > destination->size) {
- status = fl_string_dynamic_size_increase(f_fss_default_allocation_step, destination);
+ status = fl_string_dynamic_increase_by(f_fss_default_allocation_step, destination);
if (F_status_is_error(status)) return status;
}
*
* Errors (with error bit) from: fl_fss_basic_content_write_string().
* Errors (with error bit) from: fl_fss_basic_object_write_string().
- * Errors (with error bit) from: fl_string_dynamic_size_increase().
+ * Errors (with error bit) from: fl_string_dynamic_increase_by().
*/
#ifndef _di_fll_fss_basic_write_string_
extern f_return_status fll_fss_basic_write_string(const f_string_static_t object, const f_string_static_t content, const f_fss_quote_t quote, f_string_dynamic_t *destination);
*
* Errors (with error bit) from: fl_fss_basic_list_content_write_string().
* Errors (with error bit) from: fl_fss_basic_list_object_write_string().
- * Errors (with error bit) from: fl_string_dynamic_size_increase().
+ * Errors (with error bit) from: fl_string_dynamic_increase_by().
*/
#ifndef _di_fll_fss_basic_list_write_string_
extern f_return_status fll_fss_basic_list_write_string(const f_string_static_t object, const f_string_static_t content, const f_string_static_t *content_prepend, f_string_dynamic_t *buffer);
*
* Errors (with error bit) from: fl_fss_extended_content_write_string().
* Errors (with error bit) from: fl_fss_extended_object_write_string().
- * Errors (with error bit) from: fl_string_dynamic_size_increase().
+ * Errors (with error bit) from: fl_string_dynamic_increase_by().
*/
#ifndef _di_fll_fss_extended_write_string_
extern f_return_status fll_fss_extended_write_string(const f_string_static_t object, const f_string_statics_t contents, const f_fss_quote_t quote, f_string_dynamic_t *destination);
*
* Errors (with error bit) from: fl_fss_extended_list_content_write_string().
* Errors (with error bit) from: fl_fss_extended_list_object_write_string().
- * Errors (with error bit) from: fl_string_dynamic_size_increase().
+ * Errors (with error bit) from: fl_string_dynamic_increase_by().
*/
#ifndef _di_fll_fss_extended_list_write_string_
extern f_return_status fll_fss_extended_list_write_string(const f_string_static_t object, const f_string_static_t content, const f_string_static_t *content_prepend, const f_string_ranges_t *ignore, f_string_dynamic_t *destination);
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_macro_string_dynamic_t_resize().
- * Errors (with error bit) from: fl_string_dynamic_size_increase().
+ * Errors (with error bit) from: fl_string_dynamic_increase_by().
*/
#ifndef _di_fll_iki_content_escape_
extern f_return_status fll_iki_content_escape(const f_string_static_t content, const uint8_t quote, f_string_dynamic_t *escaped);
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_macro_string_dynamic_t_resize().
- * Errors (with error bit) from: fl_string_dynamic_size_increase().
+ * Errors (with error bit) from: fl_string_dynamic_increase_by().
*/
#ifndef _di_fll_iki_content_partial_escape_
extern f_return_status fll_iki_content_partial_escape(const f_string_static_t content, const f_string_range_t range, const uint8_t quote, f_string_dynamic_t *escaped);
* F_syntax (with error bit) if the given string is invalid, such as having an undelimited quote.
*
* Errors (with error bit) from: f_macro_string_dynamic_t_resize().
- * Errors (with error bit) from: fl_string_dynamic_size_increase().
+ * Errors (with error bit) from: fl_string_dynamic_increase_by().
*/
#ifndef _di_fll_iki_content_escape_un_
extern f_return_status fll_iki_content_escape_un(const f_string_static_t content, const uint8_t quote, f_string_dynamic_t *unescaped);
* F_syntax (with error bit) if the given string is invalid, such as having an undelimited quote.
*
* Errors (with error bit) from: f_macro_string_dynamic_t_resize().
- * Errors (with error bit) from: fl_string_dynamic_size_increase().
+ * Errors (with error bit) from: fl_string_dynamic_increase_by().
*/
#ifndef _di_fll_iki_content_partial_escape_un_
extern f_return_status fll_iki_content_partial_escape_un(const f_string_static_t content, const f_string_range_t range, const uint8_t quote, f_string_dynamic_t *unescaped);
if (content.string[i] == quote) {
if (escaped->used + delimits + 2 > escaped->size) {
- status = fl_string_dynamic_size_increase(delimits + 2, escaped);
+ status = fl_string_dynamic_increase_by(delimits + 2, escaped);
if (F_status_is_error(status)) return status;
}
}
else if (content.string[i]) {
if (escaped->used + 1 > escaped->size) {
- status = fl_string_dynamic_size_increase(f_memory_default_allocation_step, escaped);
+ status = fl_string_dynamic_increase_by(f_memory_default_allocation_step, escaped);
if (F_status_is_error(status)) return status;
}
// delimits found at the end must be escaped to prevent escaping the end quote.
if (delimits) {
if (escaped->used + delimits > escaped->size) {
- status = fl_string_dynamic_size_increase(delimits, escaped);
+ status = fl_string_dynamic_increase_by(delimits, escaped);
if (F_status_is_error(status)) return status;
}
delimits /= 2;
if (unescaped->used + delimits + 1 > unescaped->size) {
- status = fl_string_dynamic_size_increase(delimits + 1, unescaped);
+ status = fl_string_dynamic_increase_by(delimits + 1, unescaped);
if (F_status_is_error(status)) return status;
}
}
else if (content.string[j]) {
if (unescaped->used + (j - i) + 1 > unescaped->size) {
- status = fl_string_dynamic_size_increase((j - i) + 1, unescaped);
+ status = fl_string_dynamic_increase_by((j - i) + 1, unescaped);
if (F_status_is_error(status)) return status;
}
delimits /= 2;
if (unescaped->used + delimits > unescaped->size) {
- status = fl_string_dynamic_size_increase(delimits, unescaped);
+ status = fl_string_dynamic_increase_by(delimits, unescaped);
if (F_status_is_error(status)) return status;
}
}
else if (content.string[i]) {
if (unescaped->used + 1 > unescaped->size) {
- status = fl_string_dynamic_size_increase(f_memory_default_allocation_step, unescaped);
+ status = fl_string_dynamic_increase_by(f_memory_default_allocation_step, unescaped);
if (F_status_is_error(status)) return status;
}
* F_parameter (with error bit) if a parameter is invalid.
*
* Errors (with error bit) from: f_macro_string_dynamic_t_resize().
- * Errors (with error bit) from: fl_string_dynamic_size_increase().
+ * Errors (with error bit) from: fl_string_dynamic_increase_by().
*/
#if !defined(_di_fll_iki_content_escape_) || !defined(_di_fll_iki_content_partial_escape_)
extern f_return_status private_fll_iki_content_partial_escape(const f_string_static_t content, const f_string_range_t range, const uint8_t quote, f_string_dynamic_t *escaped) f_gcc_attribute_visibility_internal;
* F_syntax (with error bit) if the given string is invalid, such as having an undelimited quote.
*
* Errors (with error bit) from: f_macro_string_dynamic_t_resize().
- * Errors (with error bit) from: fl_string_dynamic_size_increase().
+ * Errors (with error bit) from: fl_string_dynamic_increase_by().
*/
#if !defined(_di_fll_iki_content_escape_un_) || !defined(_di_fll_iki_content_partial_escape_un_)
extern f_return_status private_fll_iki_content_partial_escape_un(const f_string_static_t content, const f_string_range_t range, const uint8_t quote, f_string_dynamic_t *unescaped) f_gcc_attribute_visibility_internal;
if (k == data_make->setting_build.environment.used) {
if (data_make->setting_build.environment.used + 1 > data_make->setting_build.environment.size) {
- *status = fl_string_dynamics_size_increase(f_memory_default_allocation_step, &data_make->setting_build.environment);
+ *status = fl_string_dynamics_increase_by(f_memory_default_allocation_step, &data_make->setting_build.environment);
if (F_status_is_error(*status)) {
- fll_error_print(data.error, F_status_set_fine(*status), "fl_string_lengths_size_increase", F_true);
+ fll_error_print(data.error, F_status_set_fine(*status), "fl_string_lengths_increase_by", F_true);
break;
}
}
if (data.context.mode != f_color_mode_none) {
if (data_make->parameter.color.used >= data_make->parameter.color.size) {
- *status = fl_string_dynamics_size_increase(f_memory_default_allocation_step, &data_make->parameter.color);
+ *status = fl_string_dynamics_increase_by(f_memory_default_allocation_step, &data_make->parameter.color);
if (F_status_is_error(*status)) {
- fll_error_print(data.error, F_status_set_fine(*status), "fl_string_dynamics_size_increase", F_true);
+ fll_error_print(data.error, F_status_set_fine(*status), "fl_string_dynamics_increase_by", F_true);
return;
}
}
if (data.error.verbosity != f_console_verbosity_normal) {
if (data_make->parameter.verbosity.used >= data_make->parameter.verbosity.size) {
- *status = fl_string_dynamics_size_increase(f_memory_default_allocation_step, &data_make->parameter.verbosity);
+ *status = fl_string_dynamics_increase_by(f_memory_default_allocation_step, &data_make->parameter.verbosity);
if (F_status_is_error(*status)) {
- fll_error_print(data.error, F_status_set_fine(*status), "fl_string_dynamics_size_increase", F_true);
+ fll_error_print(data.error, F_status_set_fine(*status), "fl_string_dynamics_increase_by", F_true);
return;
}
}
for (j = 0; j < source[i]->used; j++) {
if (destination[i]->used >= destination[i]->size) {
- *status = fl_string_dynamics_size_increase(f_memory_default_allocation_step, destination[i]);
+ *status = fl_string_dynamics_increase_by(f_memory_default_allocation_step, destination[i]);
if (F_status_is_error(*status)) {
- fll_error_print(data.error, F_status_set_fine(*status), "fl_string_dynamics_size_increase", F_true);
+ fll_error_print(data.error, F_status_set_fine(*status), "fl_string_dynamics_increase_by", F_true);
return;
}
}
}
if (destination[i]->used >= destination[i]->size) {
- *status = fl_string_dynamics_size_increase(f_memory_default_allocation_step, destination[i]);
+ *status = fl_string_dynamics_increase_by(f_memory_default_allocation_step, destination[i]);
if (F_status_is_error(*status)) {
- fll_error_print(data.error, F_status_set_fine(*status), "fl_string_dynamics_size_increase", F_true);
+ fll_error_print(data.error, F_status_set_fine(*status), "fl_string_dynamics_increase_by", F_true);
return;
}
}
for (uint8_t i = 0; i < 7; i ++) {
if (destination[i]->used >= destination[i]->size) {
- *status = fl_string_dynamics_size_increase(f_memory_default_allocation_step, destination[i]);
+ *status = fl_string_dynamics_increase_by(f_memory_default_allocation_step, destination[i]);
if (F_status_is_error(*status)) {
- fll_error_print(data.error, F_status_set_fine(*status), "fl_string_dynamics_size_increase", F_true);
+ fll_error_print(data.error, F_status_set_fine(*status), "fl_string_dynamics_increase_by", F_true);
return;
}
}
}
if (destination[i]->used >= destination[i]->size) {
- *status = fl_string_dynamics_size_increase(f_memory_default_allocation_step, destination[i]);
+ *status = fl_string_dynamics_increase_by(f_memory_default_allocation_step, destination[i]);
if (F_status_is_error(*status)) {
- fll_error_print(data.error, F_status_set_fine(*status), "fl_string_dynamics_size_increase", F_true);
+ fll_error_print(data.error, F_status_set_fine(*status), "fl_string_dynamics_increase_by", F_true);
return;
}
}
// pre-allocate the known arguments size.
if (arguments->used + content.used > arguments->size) {
- *status = fl_string_dynamics_size_increase(content.used, arguments);
+ *status = fl_string_dynamics_increase_by(content.used, arguments);
if (F_status_is_error(*status) || *status == F_string_too_large) {
- fll_error_print(data_make->error, F_status_set_fine(*status), "fl_string_dynamics_size_increase", F_true);
+ fll_error_print(data_make->error, F_status_set_fine(*status), "fl_string_dynamics_increase_by", F_true);
return;
}
}
}
if (arguments->used >= arguments->size) {
- *status = fl_string_dynamics_size_increase(f_memory_default_allocation_step, arguments);
+ *status = fl_string_dynamics_increase_by(f_memory_default_allocation_step, arguments);
if (F_status_is_error(*status)) {
- fll_error_print(data_make->error, F_status_set_fine(*status), "fl_string_lengths_size_increase", F_true);
+ fll_error_print(data_make->error, F_status_set_fine(*status), "fl_string_lengths_increase_by", F_true);
return;
}
}
if (fl_string_dynamic_partial_compare_string(reserved_name[k], data_make->buffer, reserved_length[k], iki_content.array[j]) == F_equal_to) {
if (arguments->used >= arguments->size) {
- *status = fl_string_dynamics_size_increase(f_memory_default_allocation_step, arguments);
+ *status = fl_string_dynamics_increase_by(f_memory_default_allocation_step, arguments);
if (F_status_is_error(*status)) {
- fll_error_print(data_make->error, F_status_set_fine(*status), "fl_string_dynamics_size_increase", F_true);
+ fll_error_print(data_make->error, F_status_set_fine(*status), "fl_string_dynamics_increase_by", F_true);
return;
}
}
}
else {
if (arguments->used >= arguments->size) {
- *status = fl_string_dynamics_size_increase(f_memory_default_allocation_step, arguments);
+ *status = fl_string_dynamics_increase_by(f_memory_default_allocation_step, arguments);
if (F_status_is_error(*status)) {
- fll_error_print(data_make->error, F_status_set_fine(*status), "fl_string_dynamics_size_increase", F_true);
+ fll_error_print(data_make->error, F_status_set_fine(*status), "fl_string_dynamics_increase_by", F_true);
break;
}
}
status = fl_string_dynamic_append_nulless(value, &arguments->array[arguments->used]);
}
else {
- status = fl_string_dynamics_size_increase(f_memory_default_allocation_step, arguments);
+ status = fl_string_dynamics_increase_by(f_memory_default_allocation_step, arguments);
if (F_status_is_error_not(status)) {
status = fl_string_dynamic_append_nulless(value, &arguments->array[arguments->used]);
status = fl_string_dynamic_append_nulless(value, &arguments->array[arguments->used]);
}
else {
- status = fl_string_dynamics_size_increase(f_memory_default_allocation_step, arguments);
+ status = fl_string_dynamics_increase_by(f_memory_default_allocation_step, arguments);
if (F_status_is_error_not(status)) {
status = fl_string_dynamic_append_nulless(value, &arguments->array[arguments->used]);
// add the operation id to the operation stack.
if (section_stack->used + 1 > section_stack->size) {
- *status = fl_string_lengths_size_increase(f_memory_default_allocation_step, section_stack);
+ *status = fl_string_lengths_increase_by(f_memory_default_allocation_step, section_stack);
if (F_status_is_error(*status)) {
- fll_error_print(data_make->error, F_status_set_fine(*status), "fl_string_lengths_size_increase", F_true);
+ fll_error_print(data_make->error, F_status_set_fine(*status), "fl_string_lengths_increase_by", F_true);
return;
}
}
}
else {
if (data_make->path.stack.used == data_make->path.stack.size) {
- *status = fl_string_dynamics_size_increase(f_memory_default_allocation_step, &data_make->path.stack);
+ *status = fl_string_dynamics_increase_by(f_memory_default_allocation_step, &data_make->path.stack);
if (F_status_set_fine(*status) == F_buffer_too_large) {
- fake_print_message_section_operation_path_stack_max(data, data_make->error, F_buffer_too_large, "fl_string_lengths_size_increase", "path stack");
+ fake_print_message_section_operation_path_stack_max(data, data_make->error, F_buffer_too_large, "fl_string_lengths_increase_by", "path stack");
return;
}
else if (F_status_is_error(*status)) {
}
if (object.used + block.used > object.size) {
- status = fl_string_dynamic_size_increase(block.used, &object);
+ status = fl_string_dynamic_increase_by(block.used, &object);
if (F_status_is_error(status)) {
- fll_error_print(data.error, F_status_set_fine(status), "fl_string_dynamic_size_increase", F_true);
+ fll_error_print(data.error, F_status_set_fine(status), "fl_string_dynamic_increase_by", F_true);
break;
}
}
if (total) {
if (content.used + total > content.size) {
- status = fl_string_dynamic_size_increase(total, &content);
+ status = fl_string_dynamic_increase_by(total, &content);
if (F_status_is_error(status)) {
- fll_error_print(data.error, F_status_set_fine(status), "fl_string_dynamic_size_increase", F_true);
+ fll_error_print(data.error, F_status_set_fine(status), "fl_string_dynamic_increase_by", F_true);
break;
}
}
}
if (object.used + block.used > object.size) {
- status = fl_string_dynamic_size_increase(block.used, &object);
+ status = fl_string_dynamic_increase_by(block.used, &object);
if (F_status_is_error(status)) {
- fll_error_print(data.error, F_status_set_fine(status), "fl_string_dynamic_size_increase", F_true);
+ fll_error_print(data.error, F_status_set_fine(status), "fl_string_dynamic_increase_by", F_true);
break;
}
}
if (total) {
if (content.used + total > content.size) {
- status = fl_string_dynamic_size_increase(total, &content);
+ status = fl_string_dynamic_increase_by(total, &content);
if (F_status_is_error(status)) {
- fll_error_print(data.error, F_status_set_fine(status), "fl_string_dynamic_size_increase", F_true);
+ fll_error_print(data.error, F_status_set_fine(status), "fl_string_dynamic_increase_by", F_true);
break;
}
}
}
if (object.used + block.used > object.size) {
- status = fl_string_dynamic_size_increase(block.used, &object);
+ status = fl_string_dynamic_increase_by(block.used, &object);
if (F_status_is_error(status)) {
- fll_error_print(data.error, F_status_set_fine(status), "fl_string_dynamic_size_increase", F_true);
+ fll_error_print(data.error, F_status_set_fine(status), "fl_string_dynamic_increase_by", F_true);
break;
}
}
if (total) {
if (content.used + total > content.size) {
- status = fl_string_dynamic_size_increase(total, &content);
+ status = fl_string_dynamic_increase_by(total, &content);
if (F_status_is_error(status)) {
- fll_error_print(data.error, F_status_set_fine(status), "fl_string_dynamic_size_increase", F_true);
+ fll_error_print(data.error, F_status_set_fine(status), "fl_string_dynamic_increase_by", F_true);
break;
}
}
else {
object.used = 0;
- status = fl_string_dynamics_size_increase(data->parameters[fss_extended_write_parameter_content].values.used, &contents);
+ status = fl_string_dynamics_increase_by(data->parameters[fss_extended_write_parameter_content].values.used, &contents);
if (status == F_buffer_too_large) {
status = F_status_set_error(status);
}
if (F_status_is_error(status)) {
- fll_error_print(data->error, F_status_set_fine(status), "fl_string_dynamics_size_increase", F_true);
+ fll_error_print(data->error, F_status_set_fine(status), "fl_string_dynamics_increase_by", F_true);
}
else {
f_array_length_t i = 0;
if (content_current < object_current || content_current > object_next) break;
}
- status = fl_string_dynamics_size_increase(f_fss_default_allocation_step, &contents);
+ status = fl_string_dynamics_increase_by(f_fss_default_allocation_step, &contents);
if (F_status_is_error(status)) {
- fll_error_print(data->error, F_status_set_fine(status), "fl_string_dynamics_size_increase", F_true);
+ fll_error_print(data->error, F_status_set_fine(status), "fl_string_dynamics_increase_by", F_true);
break;
}
}
if (object.used + block.used > object.size) {
- status = fl_string_dynamic_size_increase(block.used, &object);
+ status = fl_string_dynamic_increase_by(block.used, &object);
if (F_status_is_error(status)) {
- fll_error_print(data.error, F_status_set_fine(status), "fl_string_dynamic_size_increase", F_true);
+ fll_error_print(data.error, F_status_set_fine(status), "fl_string_dynamic_increase_by", F_true);
break;
}
}
if (state == 0x2) {
if (contents.used + 1 > contents.size) {
- status = fl_string_dynamics_size_increase(f_fss_default_allocation_step, &contents);
+ status = fl_string_dynamics_increase_by(f_fss_default_allocation_step, &contents);
if (F_status_is_error(status)) {
- fll_error_print(data.error, F_status_set_fine(status), "fl_string_dynamics_size_increase", F_true);
+ fll_error_print(data.error, F_status_set_fine(status), "fl_string_dynamics_increase_by", F_true);
break;
}
}
if (block.string[range.start] == fss_extended_write_pipe_content_start) {
if (contents.used + 1 > contents.size) {
- status = fl_string_dynamics_size_increase(f_fss_default_allocation_step, &contents);
+ status = fl_string_dynamics_increase_by(f_fss_default_allocation_step, &contents);
if (F_status_is_error(status)) {
- fll_error_print(data.error, F_status_set_fine(status), "fl_string_dynamics_size_increase", F_true);
+ fll_error_print(data.error, F_status_set_fine(status), "fl_string_dynamics_increase_by", F_true);
break;
}
}
}
if (contents.array[contents.used - 1].used + 1 > contents.array[contents.used - 1].size) {
- status = fl_string_dynamic_size_increase(f_fss_default_allocation_step, &contents.array[contents.used - 1]);
+ status = fl_string_dynamic_increase_by(f_fss_default_allocation_step, &contents.array[contents.used - 1]);
if (F_status_is_error(status)) {
- fll_error_print(data.error, F_status_set_fine(status), "fl_string_dynamic_size_increase", F_true);
+ fll_error_print(data.error, F_status_set_fine(status), "fl_string_dynamic_increase_by", F_true);
break;
}
}