Return F_data_not rather than return F_parameter (with error bit set).
This allows for more possibilities where a set of data may be calculated without worrying about an error that is not really an error.
If you want to allocate nothing, then nothing is allocated (and the same for deallocated).
The resize and adjust functions still use a length of 0 as synonymous to deleting the data.
The array of an array of F_triple_t is no longer missing.
All appropriate allocation functions are defined.
* @return
* F_none on success.
*
- * Errors (with error bit) from macro_f_string_dynamic_t_resize().
+ * Errors (with error bit) from f_string_dynamic_resize().
*
- * @see f_account_by_name()
- * @see f_account_by_id()
- * @see macro_f_string_dynamic_t_resize()
+ * @see f_string_dynamic_resize()
*/
#if !defined(_di_f_account_by_name_) || !defined(_di_f_account_by_id_)
extern f_status_t private_f_account_from_passwd(const struct passwd password, const f_array_length_t password_length, f_account_t * const account) F_attribute_visibility_internal_d;
#ifndef _di_f_fss_named_decimate_by_
f_status_t f_fss_named_decimate_by(const f_array_length_t amount, f_fss_named_t * const named) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!named) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (named->objects.size - amount > 0) {
return private_f_fss_named_adjust(named->objects.size - amount, named);
}
#ifndef _di_f_fss_named_decrease_by_
f_status_t f_fss_named_decrease_by(const f_array_length_t amount, f_fss_named_t * const named) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!named) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (named->objects.size - amount > 0) {
return private_f_fss_named_resize(named->objects.size - amount, named);
}
#ifndef _di_f_fss_named_increase_
f_status_t f_fss_named_increase(const f_array_length_t step, f_fss_named_t * const named) {
#ifndef _di_level_0_parameter_checking_
- if (!step) return F_status_set_error(F_parameter);
if (!named) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- if (named->objects.used + 1 > named->objects.size) {
+ if (step && named->objects.used + 1 > named->objects.size) {
f_array_length_t size = named->objects.used + step;
if (size > F_array_length_t_size_d) {
#ifndef _di_f_fss_named_increase_by_
f_status_t f_fss_named_increase_by(const f_array_length_t amount, f_fss_named_t * const named) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!named) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (named->objects.used + amount > named->objects.size) {
if (named->objects.used + amount > F_array_length_t_size_d) {
return F_status_set_error(F_array_too_large);
#ifndef _di_f_fss_nameds_decimate_by_
f_status_t f_fss_nameds_decimate_by(const f_array_length_t amount, f_fss_nameds_t * const nameds) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!nameds) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (nameds->size - amount > 0) {
return private_f_fss_nameds_adjust(nameds->size - amount, nameds);
}
#ifndef _di_f_fss_nameds_decrease_by_
f_status_t f_fss_nameds_decrease_by(const f_array_length_t amount, f_fss_nameds_t * const nameds) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!nameds) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (nameds->size - amount > 0) {
return private_f_fss_nameds_resize(nameds->size - amount, nameds);
}
#ifndef _di_f_fss_nameds_increase_
f_status_t f_fss_nameds_increase(const f_array_length_t step, f_fss_nameds_t * const nameds) {
#ifndef _di_level_0_parameter_checking_
- if (!step) return F_status_set_error(F_parameter);
if (!nameds) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- if (nameds->used + 1 > nameds->size) {
+ if (step && nameds->used + 1 > nameds->size) {
f_array_length_t size = nameds->used + step;
if (size > F_array_length_t_size_d) {
#ifndef _di_f_fss_nameds_increase_by_
f_status_t f_fss_nameds_increase_by(const f_array_length_t amount, f_fss_nameds_t * const nameds) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!nameds) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (nameds->used + amount > nameds->size) {
if (nameds->used + amount > F_array_length_t_size_d) {
return F_status_set_error(F_array_too_large);
*
* @return
* F_none on success.
+ * F_data_not if amount is 0.
*
* F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* @return
* F_none on success.
+ * F_data_not if amount is 0.
*
* F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
#ifndef _di_f_fss_items_decimate_by_
f_status_t f_fss_items_decimate_by(const f_array_length_t amount, f_fss_items_t * const items) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!items) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (items->size - amount > 0) {
return private_f_fss_items_adjust(items->size - amount, items);
}
#ifndef _di_f_fss_items_decrease_by_
f_status_t f_fss_items_decrease_by(const f_array_length_t amount, f_fss_items_t * const items) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!items) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (items->size - amount > 0) {
return private_f_fss_items_resize(items->size - amount, items);
}
#ifndef _di_f_fss_items_increase_
f_status_t f_fss_items_increase(const f_array_length_t step, f_fss_items_t * const items) {
#ifndef _di_level_0_parameter_checking_
- if (!step) return F_status_set_error(F_parameter);
if (!items) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- if (items->used + 1 > items->size) {
+ if (step && items->used + 1 > items->size) {
f_array_length_t size = items->used + step;
if (size > F_array_length_t_size_d) {
#ifndef _di_f_fss_items_increase_by_
f_status_t f_fss_items_increase_by(const f_array_length_t amount, f_fss_items_t * const items) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!items) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (items->used + amount > items->size) {
if (items->used + amount > F_array_length_t_size_d) {
return F_status_set_error(F_array_too_large);
#ifndef _di_f_fss_nest_decimate_by_
f_status_t f_fss_nest_decimate_by(const f_array_length_t amount, f_fss_nest_t * const nest) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!nest) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (nest->size - amount > 0) {
return private_f_fss_nest_adjust(nest->size - amount, nest);
}
#ifndef _di_f_fss_nest_decrease_by_
f_status_t f_fss_nest_decrease_by(const f_array_length_t amount, f_fss_nest_t * const nest) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!nest) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (nest->size - amount > 0) {
return private_f_fss_nest_resize(nest->size - amount, nest);
}
#ifndef _di_f_fss_nest_increase_
f_status_t f_fss_nest_increase(const f_array_length_t step, f_fss_nest_t * const nest) {
#ifndef _di_level_0_parameter_checking_
- if (!step) return F_status_set_error(F_parameter);
if (!nest) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- if (nest->used + 1 > nest->size) {
+ if (step && nest->used + 1 > nest->size) {
f_array_length_t size = nest->used + step;
if (size > F_array_length_t_size_d) {
#ifndef _di_f_fss_nest_increase_by_
f_status_t f_fss_nest_increase_by(const f_array_length_t amount, f_fss_nest_t * const nest) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!nest) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (nest->used + amount > nest->size) {
if (nest->used + amount > F_array_length_t_size_d) {
return F_status_set_error(F_array_too_large);
#ifndef _di_f_fss_nests_decimate_by_
f_status_t f_fss_nests_decimate_by(const f_array_length_t amount, f_fss_nests_t * const nests) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!nests) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (nests->size - amount > 0) {
return private_f_fss_nests_adjust(nests->size - amount, nests);
}
#ifndef _di_f_fss_nests_decrease_by_
f_status_t f_fss_nests_decrease_by(const f_array_length_t amount, f_fss_nests_t * const nests) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!nests) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#ifndef _di_f_fss_nests_increase_
f_status_t f_fss_nests_increase(const f_array_length_t step, f_fss_nests_t * const nests) {
#ifndef _di_level_0_parameter_checking_
- if (!step) return F_status_set_error(F_parameter);
if (!nests) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- if (nests->used + 1 > nests->size) {
+ if (step && nests->used + 1 > nests->size) {
f_array_length_t size = nests->used + step;
if (size > F_array_length_t_size_d) {
#ifndef _di_f_fss_nests_increase_by_
f_status_t f_fss_nests_increase_by(const f_array_length_t amount, f_fss_nests_t * const nests) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!nests) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (nests->used + amount > nests->size) {
if (nests->used + amount > F_array_length_t_size_d) {
return F_status_set_error(F_array_too_large);
*
* @return
* F_none on success.
+ * F_data_not if amount is 0.
*
* F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* @return
* F_none on success.
+ * F_data_not if amount is 0.
*
* F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
#ifndef _di_f_fss_set_decimate_by_
f_status_t f_fss_set_decimate_by(const f_array_length_t amount, f_fss_set_t * const set) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!set) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (set->objects.size - amount > 0) {
return private_f_fss_set_adjust(set->objects.size - amount, set);
}
#ifndef _di_f_fss_set_decrease_by_
f_status_t f_fss_set_decrease_by(const f_array_length_t amount, f_fss_set_t * const set) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!set) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (set->objects.size - amount > 0) {
return private_f_fss_set_resize(set->objects.size - amount, set);
}
#ifndef _di_f_fss_set_increase_
f_status_t f_fss_set_increase(const f_array_length_t step, f_fss_set_t * const set) {
#ifndef _di_level_0_parameter_checking_
- if (!step) return F_status_set_error(F_parameter);
if (!set) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- if (set->objects.used + 1 > set->objects.size) {
+ if (step && set->objects.used + 1 > set->objects.size) {
f_array_length_t size = set->objects.used + step;
if (size > F_array_length_t_size_d) {
#ifndef _di_f_fss_set_increase_by_
f_status_t f_fss_set_increase_by(const f_array_length_t amount, f_fss_set_t * const set) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!set) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (set->objects.used + amount > set->objects.size) {
if (set->objects.used + amount > F_array_length_t_size_d) {
return F_status_set_error(F_array_too_large);
#ifndef _di_f_fss_set_quote_decimate_by_
f_status_t f_fss_set_quote_decimate_by(const f_array_length_t amount, f_fss_set_quote_t * const set_quote) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!set_quote) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (set_quote->objects.size - amount > 0) {
return private_f_fss_set_quote_adjust(set_quote->objects.size - amount, set_quote);
}
#ifndef _di_f_fss_set_quote_decrease_by_
f_status_t f_fss_set_quote_decrease_by(const f_array_length_t amount, f_fss_set_quote_t * const set_quote) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!set_quote) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (set_quote->objects.size - amount > 0) {
return private_f_fss_set_quote_resize(set_quote->objects.size - amount, set_quote);
}
#ifndef _di_f_fss_set_quote_increase_
f_status_t f_fss_set_quote_increase(const f_array_length_t step, f_fss_set_quote_t * const set_quote) {
#ifndef _di_level_0_parameter_checking_
- if (!step) return F_status_set_error(F_parameter);
if (!set_quote) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- if (set_quote->objects.used + 1 > set_quote->objects.size) {
+ if (step && set_quote->objects.used + 1 > set_quote->objects.size) {
f_array_length_t size = set_quote->objects.used + step;
if (size > F_array_length_t_size_d) {
#ifndef _di_f_fss_set_quote_increase_by_
f_status_t f_fss_set_quote_increase_by(const f_array_length_t amount, f_fss_set_quote_t * const set_quote) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!set_quote) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (set_quote->objects.used + amount > set_quote->objects.size) {
if (set_quote->objects.used + amount > F_array_length_t_size_d) {
return F_status_set_error(F_array_too_large);
#ifndef _di_f_fss_set_quotes_decimate_by_
f_status_t f_fss_set_quotes_decimate_by(const f_array_length_t amount, f_fss_set_quotes_t * const set_quotes) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!set_quotes) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (set_quotes->size - amount > 0) {
return private_f_fss_set_quotes_adjust(set_quotes->size - amount, set_quotes);
}
#ifndef _di_f_fss_set_quotes_decrease_by_
f_status_t f_fss_set_quotes_decrease_by(const f_array_length_t amount, f_fss_set_quotes_t * const set_quotes) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!set_quotes) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (set_quotes->size - amount > 0) {
return private_f_fss_set_quotes_resize(set_quotes->size - amount, set_quotes);
}
#ifndef _di_f_fss_set_quotes_increase_
f_status_t f_fss_set_quotes_increase(const f_array_length_t step, f_fss_set_quotes_t * const set_quotes) {
#ifndef _di_level_0_parameter_checking_
- if (!step) return F_status_set_error(F_parameter);
if (!set_quotes) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- if (set_quotes->used + 1 > set_quotes->size) {
+ if (step && set_quotes->used + 1 > set_quotes->size) {
f_array_length_t size = set_quotes->used + step;
if (size > F_array_length_t_size_d) {
#ifndef _di_f_fss_set_quotes_increase_by_
f_status_t f_fss_set_quotes_increase_by(const f_array_length_t amount, f_fss_set_quotes_t * const set_quotes) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!set_quotes) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (set_quotes->used + amount > set_quotes->size) {
if (set_quotes->used + amount > F_array_length_t_size_d) {
return F_status_set_error(F_array_too_large);
#ifndef _di_f_fss_sets_decimate_by_
f_status_t f_fss_sets_decimate_by(const f_array_length_t amount, f_fss_sets_t * const sets) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!sets) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (sets->size - amount > 0) {
return private_f_fss_sets_adjust(sets->size - amount, sets);
}
#ifndef _di_f_fss_sets_decrease_by_
f_status_t f_fss_sets_decrease_by(const f_array_length_t amount, f_fss_sets_t * const sets) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!sets) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (sets->size - amount > 0) {
return private_f_fss_sets_resize(sets->size - amount, sets);
}
#ifndef _di_f_fss_sets_increase_
f_status_t f_fss_sets_increase(const f_array_length_t step, f_fss_sets_t * const sets) {
#ifndef _di_level_0_parameter_checking_
- if (!step) return F_status_set_error(F_parameter);
if (!sets) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- if (sets->used + 1 > sets->size) {
+ if (step && sets->used + 1 > sets->size) {
f_array_length_t size = sets->used + step;
if (size > F_array_length_t_size_d) {
#ifndef _di_f_fss_sets_increase_by_
f_status_t f_fss_sets_increase_by(const f_array_length_t amount, f_fss_sets_t * const sets) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!sets) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (sets->used + amount > sets->size) {
if (sets->used + amount > F_array_length_t_size_d) {
return F_status_set_error(F_array_too_large);
*
* @return
* F_none on success.
+ * F_data_not if amount is 0.
*
* F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* @return
* F_none on success.
+ * F_data_not if amount is 0.
*
* F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* @return
* F_none on success.
+ * F_data_not if amount is 0.
*
* F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* @return
* F_none on success.
+ * F_data_not if amount is 0.
*
* F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
for (f_array_length_t i = 0; i < source.used; ++i, ++destination->used) {
+ destination->array[destination->used].content.used = 0;
+ destination->array[destination->used].delimits.used = 0;
+ destination->array[destination->used].variable.used = 0;
+ destination->array[destination->used].vocabulary.used = 0;
+
status = f_string_ranges_append(source.array[i].content, &destination->array[destination->used].content);
if (F_status_is_error(status)) return status;
#ifndef _di_f_iki_datas_decimate_by_
f_status_t f_iki_datas_decimate_by(const f_array_length_t amount, f_iki_datas_t *datas) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!datas) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (datas->size - amount > 0) {
return private_f_iki_datas_adjust(datas->size - amount, datas);
}
#ifndef _di_f_iki_datas_decrease_by_
f_status_t f_iki_datas_decrease_by(const f_array_length_t amount, f_iki_datas_t *datas) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!datas) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (datas->size - amount > 0) {
return private_f_iki_datas_resize(datas->size - amount, datas);
}
#ifndef _di_f_iki_datas_increase_
f_status_t f_iki_datas_increase(const f_array_length_t step, f_iki_datas_t *datas) {
#ifndef _di_level_0_parameter_checking_
- if (!step) return F_status_set_error(F_parameter);
if (!datas) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- if (datas->used + 1 > datas->size) {
+ if (step && datas->used + 1 > datas->size) {
f_array_length_t size = datas->used + step;
if (size > F_array_length_t_size_d) {
#ifndef _di_f_iki_datas_increase_by_
f_status_t f_iki_datas_increase_by(const f_array_length_t amount, f_iki_datas_t *datas) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!datas) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (datas->used + amount > datas->size) {
if (datas->used + amount > F_array_length_t_size_d) {
return F_status_set_error(F_array_too_large);
*
* @return
* F_none on success.
+ * F_data_not if amount is 0.
*
* F_parameter (with error bit) if a parameter is invalid.
*
*
* @return
* F_none on success.
+ * F_data_not if amount is 0.
*
* F_parameter (with error bit) if a parameter is invalid.
*
}
#endif // !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_)
+#if !defined(_di_f_string_tripless_adjust_) || !defined(_di_f_string_tripless_decimate_by_)
+ f_status_t private_f_string_tripless_adjust(const f_array_length_t length, f_string_tripless_t * const tripless) {
+
+ if (tripless->used + length > F_array_length_t_size_d) {
+ return F_status_set_error(F_array_too_large);
+ }
+
+ f_status_t status = F_none;
+
+ for (f_array_length_t i = length; i < tripless->size; ++i) {
+
+ status = private_f_string_triples_adjust(0, &tripless->array[i]);
+ if (F_status_is_error(status)) return status;
+ } // for
+
+ status = f_memory_adjust(tripless->size, length, sizeof(f_string_triples_t), (void **) & tripless->array);
+
+ if (F_status_is_error_not(status)) {
+ tripless->size = length;
+
+ if (tripless->used > tripless->size) {
+ tripless->used = length;
+ }
+ }
+
+ return status;
+ }
+#endif // !defined(_di_f_string_tripless_adjust_) || !defined(_di_f_string_tripless_decimate_by_)
+
+#if !defined(_di_f_string_tripless_decrease_) || !defined(_di_f_string_tripless_decrease_by_) || !defined(_di_f_string_tripless_increase_) || !defined(_di_f_string_tripless_increase_by_) || !defined(_di_f_string_tripless_terminate_) || !defined(_di_f_string_tripless_terminate_after_)
+ f_status_t private_f_string_tripless_resize(const f_array_length_t length, f_string_tripless_t * const tripless) {
+
+ if (tripless->used + length > F_array_length_t_size_d) {
+ return F_status_set_error(F_array_too_large);
+ }
+
+ f_status_t status = F_none;
+
+ for (f_array_length_t i = length; i < tripless->size; ++i) {
+
+ status = private_f_string_triples_resize(0, &tripless->array[i]);
+ if (F_status_is_error(status)) return status;
+ } // for
+
+ status = f_memory_resize(tripless->size, length, sizeof(f_string_triples_t), (void **) & tripless->array);
+
+ if (F_status_is_error_not(status)) {
+ tripless->size = length;
+
+ if (tripless->used > tripless->size) {
+ tripless->used = length;
+ }
+ }
+
+ return status;
+ }
+#endif // !defined(_di_f_string_tripless_decrease_) || !defined(_di_f_string_tripless_decrease_by_) || !defined(_di_f_string_tripless_increase_) || !defined(_di_f_string_tripless_increase_by_) || !defined(_di_f_string_tripless_terminate_) || !defined(_di_f_string_tripless_terminate_after_)
+
#ifdef __cplusplus
} // extern "C"
#endif
extern f_status_t private_f_string_triples_resize(const f_array_length_t length, f_string_triples_t * const triples) F_attribute_visibility_internal_d;
#endif // !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_)
+/**
+ * Private implementation for resizing.
+ *
+ * Intended to be shared to each of the different implementation variations.
+ *
+ * @param length
+ * The new size to use.
+ * @param tripless
+ * The tripless to adjust.
+ *
+ * @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_memory_adjust()
+ * @see f_string_tripless_adjust()
+ * @see f_string_tripless_decimate_by()
+ */
+#if !defined(_di_f_string_tripless_adjust_) || !defined(_di_f_string_tripless_decimate_by_)
+ extern f_status_t private_f_string_tripless_adjust(const f_array_length_t length, f_string_tripless_t * const tripless) F_attribute_visibility_internal_d;
+#endif // !defined(_di_f_string_tripless_adjust_) || !defined(_di_f_string_tripless_decimate_by_)
+
+/**
+ * Private implementation for resizing.
+ *
+ * Intended to be shared to each of the different implementation variations.
+ *
+ * @param length
+ * The new size to use.
+ * @param tripless
+ * The tripless to resize.
+ *
+ * @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().
+ *
+ * @see f_memory_resize()
+ * @see f_string_tripless_decrease_by()
+ * @see f_string_tripless_increase()
+ * @see f_string_tripless_increase_by()
+ * @see f_string_tripless_terminate()
+ * @see f_string_tripless_terminate_after()
+ */
+#if !defined(_di_f_string_tripless_decrease_by_) || !defined(_di_f_string_tripless_increase_) || !defined(_di_f_string_tripless_increase_by_) || !defined(_di_f_string_tripless_terminate_) || !defined(_di_f_string_tripless_terminate_after_)
+ extern f_status_t private_f_string_tripless_resize(const f_array_length_t length, f_string_tripless_t * const tripless) F_attribute_visibility_internal_d;
+#endif // !defined(_di_f_string_tripless_decrease_by_) || !defined(_di_f_string_tripless_increase_) || !defined(_di_f_string_tripless_increase_by_) || !defined(_di_f_string_tripless_terminate_) || !defined(_di_f_string_tripless_terminate_after_)
+
#ifdef __cplusplus
} // extern "C"
#endif
#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 * const dynamic) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!dynamic) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (dynamic->size - amount > 0) {
return private_f_string_dynamic_adjust(dynamic->size - amount, dynamic);
}
#ifndef _di_f_string_dynamic_decrease_by_
f_status_t f_string_dynamic_decrease_by(const f_array_length_t amount, f_string_dynamic_t * const dynamic) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!dynamic) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (dynamic->size - amount > 0) {
return private_f_string_dynamic_resize(dynamic->size - amount, dynamic);
}
#ifndef _di_f_string_dynamic_increase_
f_status_t f_string_dynamic_increase(const f_array_length_t step, f_string_dynamic_t * const dynamic) {
#ifndef _di_level_0_parameter_checking_
- if (!step) return F_status_set_error(F_parameter);
if (!dynamic) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- if (dynamic->used + 1 > dynamic->size) {
+ if (step && dynamic->used + 1 > dynamic->size) {
f_array_length_t size = dynamic->used + step;
if (size > F_string_t_size_d) {
if (!dynamic) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
return private_f_string_dynamic_increase_by(amount, dynamic);
}
#endif // _di_f_string_dynamic_increase_by_
#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 * const dynamics) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!dynamics) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (dynamics->size - amount > 0) {
return private_f_string_dynamics_adjust(dynamics->size - amount, dynamics);
}
#ifndef _di_f_string_dynamics_decrease_by_
f_status_t f_string_dynamics_decrease_by(const f_array_length_t amount, f_string_dynamics_t * const dynamics) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!dynamics) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (dynamics->size - amount > 0) {
return private_f_string_dynamics_resize(dynamics->size - amount, dynamics);
}
#ifndef _di_f_string_dynamics_increase_
f_status_t f_string_dynamics_increase(const f_array_length_t step, f_string_dynamics_t * const dynamics) {
#ifndef _di_level_0_parameter_checking_
- if (!step) return F_status_set_error(F_parameter);
if (!dynamics) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!step) {
+ return F_data_not;
+ }
+
if (dynamics->used + 1 > dynamics->size) {
f_array_length_t size = dynamics->used + step;
#ifndef _di_f_string_dynamicss_decimate_by_
f_status_t f_string_dynamicss_decimate_by(const f_array_length_t amount, f_string_dynamicss_t * const dynamicss) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!dynamicss) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (dynamicss->size - amount > 0) {
return private_f_string_dynamicss_adjust(dynamicss->size - amount, dynamicss);
}
#ifndef _di_f_string_dynamicss_decrease_by_
f_status_t f_string_dynamicss_decrease_by(const f_array_length_t amount, f_string_dynamicss_t * const dynamicss) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!dynamicss) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (dynamicss->size - amount > 0) {
return private_f_string_dynamicss_resize(dynamicss->size - amount, dynamicss);
}
#ifndef _di_f_string_dynamicss_increase_
f_status_t f_string_dynamicss_increase(const f_array_length_t step, f_string_dynamicss_t * const dynamicss) {
#ifndef _di_level_0_parameter_checking_
- if (!step) return F_status_set_error(F_parameter);
if (!dynamicss) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!step) {
+ return F_data_not;
+ }
+
if (dynamicss->used + 1 > dynamicss->size) {
f_array_length_t size = dynamicss->used + step;
if (!dynamicss) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (dynamicss->used + amount > dynamicss->size) {
if (dynamicss->used + amount > F_array_length_t_size_d) {
return F_status_set_error(F_array_too_large);
*
* @return
* F_none on success.
+ * F_data_not if amount 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_decimate_by_
+ extern f_status_t f_string_dynamic_decimate_by(const f_array_length_t amount, f_string_dynamic_t * const dynamic);
+#endif // _di_f_string_dynamic_decimate_by_
+
+/**
+ * Resize the dynamic string to a smaller size.
+ *
+ * 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 representing how much to decrease the size by.
+ * @param dynamic
+ * The string to resize.
+ *
+ * @return
+ * F_none on success.
+ * F_data_not if amount 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.
*
* @return
* F_none on success.
- * F_data_not on success, but there is no reason to increase size (used + 1 <= size).
+ * F_data_not on success, but there is no reason to increase size (used + 1 <= size) (or step 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.
*
* @return
* F_none on success.
- * F_data_not on success, but there is no reason to increase size (size == 0).
+ * F_data_not on success, but there is no reason to increase size (size == 0) (or amount is 0).
*
* F_parameter (with error bit) if a parameter is invalid.
*
*
* @return
* F_none on success.
- * F_data_not on success, but there is no reason to increase size (size == 0).
+ * F_data_not on success, but there is no reason to increase size (size == 0) (or amount is 0).
*
* F_parameter (with error bit) if a parameter is invalid.
*
*
* @return
* F_none on success.
- * F_data_not on success, but there is no reason to increase size (size == 0).
+ * F_data_not on success, but there is no reason to increase size (size == 0) (or amount is 0).
*
* F_parameter (with error bit) if a parameter is invalid.
*
*
* @return
* F_none on success.
- * F_data_not on success, but there is no reason to increase size (size == 0).
+ * F_data_not on success, but there is no reason to increase size (size == 0) (or amount is 0).
*
* F_parameter (with error bit) if a parameter is invalid.
*
#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 * const map_multis) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!map_multis) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (map_multis->size - amount > 0) {
return private_f_string_map_multis_adjust(map_multis->size - amount, map_multis);
}
#ifndef _di_f_string_map_multis_decrease_by_
f_status_t f_string_map_multis_decrease_by(const f_array_length_t amount, f_string_map_multis_t * const map_multis) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!map_multis) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (map_multis->size - amount > 0) {
return private_f_string_map_multis_resize(map_multis->size - amount, map_multis);
}
#ifndef _di_f_string_map_multis_increase_
f_status_t f_string_map_multis_increase(const f_array_length_t step, f_string_map_multis_t * const map_multis) {
#ifndef _di_level_0_parameter_checking_
- if (!step) return F_status_set_error(F_parameter);
if (!map_multis) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- if (map_multis->used + 1 > map_multis->size) {
+ if (step && map_multis->used + 1 > map_multis->size) {
f_array_length_t size = map_multis->used + step;
if (size > F_array_length_t_size_d) {
#ifndef _di_f_string_map_multis_increase_by_
f_status_t f_string_map_multis_increase_by(const f_array_length_t amount, f_string_map_multis_t * const map_multis) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!map_multis) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (map_multis->used + amount > map_multis->size) {
if (map_multis->used + amount > F_array_length_t_size_d) {
return F_status_set_error(F_array_too_large);
#ifndef _di_f_string_map_multiss_decimate_by_
f_status_t f_string_map_multiss_decimate_by(const f_array_length_t amount, f_string_map_multiss_t * const map_multiss) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!map_multiss) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (map_multiss->size - amount > 0) {
return private_f_string_map_multiss_adjust(map_multiss->size - amount, map_multiss);
}
#ifndef _di_f_string_map_multiss_decrease_by_
f_status_t f_string_map_multiss_decrease_by(const f_array_length_t amount, f_string_map_multiss_t * const map_multiss) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!map_multiss) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (map_multiss->size - amount > 0) {
return private_f_string_map_multiss_resize(map_multiss->size - amount, map_multiss);
}
#ifndef _di_f_string_map_multiss_increase_
f_status_t f_string_map_multiss_increase(const f_array_length_t step, f_string_map_multiss_t * const map_multiss) {
#ifndef _di_level_0_parameter_checking_
- if (!step) return F_status_set_error(F_parameter);
if (!map_multiss) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- if (map_multiss->used + 1 > map_multiss->size) {
+ if (step && map_multiss->used + 1 > map_multiss->size) {
f_array_length_t size = map_multiss->used + step;
if (size > F_array_length_t_size_d) {
#ifndef _di_f_string_map_multiss_increase_by_
f_status_t f_string_map_multiss_increase_by(const f_array_length_t amount, f_string_map_multiss_t * const map_multiss) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!map_multiss) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (map_multiss->used + amount > map_multiss->size) {
if (map_multiss->used + amount > F_array_length_t_size_d) {
return F_status_set_error(F_array_too_large);
#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 * const maps) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!maps) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (maps->size - amount > 0) {
return private_f_string_maps_adjust(maps->size - amount, maps);
}
#ifndef _di_f_string_maps_decrease_by_
f_status_t f_string_maps_decrease_by(const f_array_length_t amount, f_string_maps_t * const maps) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!maps) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (maps->size - amount > 0) {
return private_f_string_maps_resize(maps->size - amount, maps);
}
#ifndef _di_f_string_maps_increase_
f_status_t f_string_maps_increase(const f_array_length_t step, f_string_maps_t * const maps) {
#ifndef _di_level_0_parameter_checking_
- if (!step) return F_status_set_error(F_parameter);
if (!maps) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- if (maps->used + 1 > maps->size) {
+ if (step && maps->used + 1 > maps->size) {
f_array_length_t size = maps->used + step;
if (size > F_array_length_t_size_d) {
#ifndef _di_f_string_maps_increase_by_
f_status_t f_string_maps_increase_by(const f_array_length_t amount, f_string_maps_t * const maps) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!maps) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (maps->used + amount > maps->size) {
if (maps->used + amount > F_array_length_t_size_d) {
return F_status_set_error(F_array_too_large);
#ifndef _di_f_string_mapss_decimate_by_
f_status_t f_string_mapss_decimate_by(const f_array_length_t amount, f_string_mapss_t * const mapss) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!mapss) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (mapss->size - amount > 0) {
return private_f_string_mapss_adjust(mapss->size - amount, mapss);
}
#ifndef _di_f_string_mapss_decrease_by_
f_status_t f_string_mapss_decrease_by(const f_array_length_t amount, f_string_mapss_t * const mapss) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!mapss) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (mapss->size - amount > 0) {
return private_f_string_mapss_resize(mapss->size - amount, mapss);
}
#ifndef _di_f_string_mapss_increase_
f_status_t f_string_mapss_increase(const f_array_length_t step, f_string_mapss_t * const mapss) {
#ifndef _di_level_0_parameter_checking_
- if (!step) return F_status_set_error(F_parameter);
if (!mapss) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- if (mapss->used + 1 > mapss->size) {
+ if (step && mapss->used + 1 > mapss->size) {
f_array_length_t size = mapss->used + step;
if (size > F_array_length_t_size_d) {
#ifndef _di_f_string_mapss_increase_by_
f_status_t f_string_mapss_increase_by(const f_array_length_t amount, f_string_mapss_t * const mapss) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!mapss) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (mapss->used + amount > mapss->size) {
if (mapss->used + amount > F_array_length_t_size_d) {
return F_status_set_error(F_array_too_large);
*
* @return
* F_none on success.
+ * F_data_not if amount is 0.
*
* F_parameter (with error bit) if a parameter is invalid.
*
*
* @return
* F_none on success.
+ * F_data_not if amount is 0.
*
* F_parameter (with error bit) if a parameter is invalid.
*
*
* @return
* F_none on success.
+ * F_data_not if amount is 0.
*
* F_parameter (with error bit) if a parameter is invalid.
*
*
* @return
* F_none on success.
+ * F_data_not if amount is 0.
*
* F_parameter (with error bit) if a parameter is invalid.
*
*
* @return
* F_none on success.
- * F_data_not on success, but there is no reason to increase size (used + 1 <= size).
+ * F_data_not on success, but there is no reason to increase size (used + 1 <= size) (or step is 0).
*
* 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.
#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 * const quantitys) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!quantitys) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (quantitys->size - amount > 0) {
return private_f_string_quantitys_adjust(quantitys->size - amount, quantitys);
}
#ifndef _di_f_string_quantitys_decrease_by_
f_status_t f_string_quantitys_decrease_by(const f_array_length_t amount, f_string_quantitys_t * const quantitys) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!quantitys) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (quantitys->size - amount > 0) {
return private_f_string_quantitys_resize(quantitys->size - amount, quantitys);
}
#ifndef _di_f_string_quantitys_increase_
f_status_t f_string_quantitys_increase(const f_array_length_t step, f_string_quantitys_t * const quantitys) {
#ifndef _di_level_0_parameter_checking_
- if (!step) return F_status_set_error(F_parameter);
if (!quantitys) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- if (quantitys->used + 1 > quantitys->size) {
+ if (step && quantitys->used + 1 > quantitys->size) {
f_array_length_t size = quantitys->used + step;
if (size > F_array_length_t_size_d) {
#ifndef _di_f_string_quantitys_increase_by_
f_status_t f_string_quantitys_increase_by(const f_array_length_t amount, f_string_quantitys_t * const quantitys) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!quantitys) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (quantitys->used + amount > quantitys->size) {
if (quantitys->used + amount > F_array_length_t_size_d) {
return F_status_set_error(F_array_too_large);
#ifndef _di_f_string_quantityss_decimate_by_
f_status_t f_string_quantityss_decimate_by(const f_array_length_t amount, f_string_quantityss_t * const quantityss) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!quantityss) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (quantityss->size - amount > 0) {
return private_f_string_quantityss_adjust(quantityss->size - amount, quantityss);
}
#ifndef _di_f_string_quantityss_decrease_by_
f_status_t f_string_quantityss_decrease_by(const f_array_length_t amount, f_string_quantityss_t * const quantityss) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!quantityss) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (quantityss->size - amount > 0) {
return private_f_string_quantityss_resize(quantityss->size - amount, quantityss);
}
#ifndef _di_f_string_quantityss_increase_
f_status_t f_string_quantityss_increase(const f_array_length_t step, f_string_quantityss_t * const quantityss) {
#ifndef _di_level_0_parameter_checking_
- if (!step) return F_status_set_error(F_parameter);
if (!quantityss) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- if (quantityss->used + 1 > quantityss->size) {
+ if (step && quantityss->used + 1 > quantityss->size) {
f_array_length_t size = quantityss->used + step;
if (size > F_array_length_t_size_d) {
#ifndef _di_f_string_quantityss_increase_by_
f_status_t f_string_quantityss_increase_by(const f_array_length_t amount, f_string_quantityss_t * const quantityss) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!quantityss) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (quantityss->used + amount > quantityss->size) {
if (quantityss->used + amount > F_array_length_t_size_d) {
return F_status_set_error(F_array_too_large);
*
* @return
* F_none on success.
+ * F_data_not if amount is 0.
*
* F_parameter (with error bit) if a parameter is invalid.
*
*
* @return
* F_none on success.
+ * F_data_not if amount is 0.
*
* F_parameter (with error bit) if a parameter is invalid.
*
#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 * const ranges) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!ranges) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (ranges->size - amount > 0) {
return private_f_string_ranges_adjust(ranges->size - amount, ranges);
}
#ifndef _di_f_string_ranges_decrease_by_
f_status_t f_string_ranges_decrease_by(const f_array_length_t amount, f_string_ranges_t * const ranges) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!ranges) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (ranges->size - amount > 0) {
return private_f_string_ranges_resize(ranges->size - amount, ranges);
}
#ifndef _di_f_string_ranges_increase_
f_status_t f_string_ranges_increase(const f_array_length_t step, f_string_ranges_t * const ranges) {
#ifndef _di_level_0_parameter_checking_
- if (!step) return F_status_set_error(F_parameter);
if (!ranges) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- if (ranges->used + 1 > ranges->size) {
+ if (step && ranges->used + 1 > ranges->size) {
f_array_length_t size = ranges->used + step;
if (size > F_array_length_t_size_d) {
#ifndef _di_f_string_ranges_increase_by_
f_status_t f_string_ranges_increase_by(const f_array_length_t amount, f_string_ranges_t * const ranges) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!ranges) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (ranges->used + amount > ranges->size) {
if (ranges->used + amount > F_array_length_t_size_d) {
return F_status_set_error(F_array_too_large);
#ifndef _di_f_string_rangess_decimate_by_
f_status_t f_string_rangess_decimate_by(const f_array_length_t amount, f_string_rangess_t * const rangess) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!rangess) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (rangess->size - amount > 0) {
return private_f_string_rangess_adjust(rangess->size - amount, rangess);
}
#ifndef _di_f_string_rangess_decrease_by_
f_status_t f_string_rangess_decrease_by(const f_array_length_t amount, f_string_rangess_t * const rangess) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!rangess) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (rangess->size - amount > 0) {
return private_f_string_rangess_resize(rangess->size - amount, rangess);
}
#ifndef _di_f_string_rangess_increase_
f_status_t f_string_rangess_increase(const f_array_length_t step, f_string_rangess_t * const rangess) {
#ifndef _di_level_0_parameter_checking_
- if (!step) return F_status_set_error(F_parameter);
if (!rangess) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- if (rangess->used + 1 > rangess->size) {
+ if (step && rangess->used + 1 > rangess->size) {
f_array_length_t size = rangess->used + step;
if (size > F_array_length_t_size_d) {
#ifndef _di_f_string_rangess_increase_by_
f_status_t f_string_rangess_increase_by(const f_array_length_t amount, f_string_rangess_t * const rangess) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!rangess) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (rangess->used + amount > rangess->size) {
if (rangess->used + amount > F_array_length_t_size_d) {
return F_status_set_error(F_array_too_large);
*
* @return
* F_none on success.
+ * F_data_not if amount is 0.
*
* F_parameter (with error bit) if a parameter is invalid.
*
*
* @return
* F_none on success.
+ * F_data_not if amount is 0.
*
* F_parameter (with error bit) if a parameter is invalid.
*
*
* @return
* F_none on success.
+ * F_data_not if amount is 0.
*
* F_parameter (with error bit) if a parameter is invalid.
*
*
* @return
* F_none on success.
+ * F_data_not if amount is 0.
*
* F_parameter (with error bit) if a parameter is invalid.
*
#ifndef _di_f_string_triples_decrease_by_
f_status_t f_string_triples_decrease_by(const f_array_length_t amount, f_string_triples_t * const triples) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!triples) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (triples->size - amount > 0) {
return private_f_string_triples_resize(triples->size - amount, triples);
}
#ifndef _di_f_string_triples_increase_
f_status_t f_string_triples_increase(const f_array_length_t step, f_string_triples_t * const triples) {
#ifndef _di_level_0_parameter_checking_
- if (!step) return F_status_set_error(F_parameter);
if (!triples) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- if (triples->used + 1 > triples->size) {
+ if (step && triples->used + 1 > triples->size) {
f_array_length_t size = triples->used + F_memory_default_allocation_small_d;
if (size > F_array_length_t_size_d) {
#ifndef _di_f_string_triples_increase_by_
f_status_t f_string_triples_increase_by(const f_array_length_t amount, f_string_triples_t * const triples) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!triples) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (triples->used + amount > triples->size) {
if (triples->used + amount > F_array_length_t_size_d) {
return F_status_set_error(F_array_too_large);
}
#endif // _di_f_string_triples_resize_
+#ifndef _di_f_string_tripless_adjust_
+ f_status_t f_string_tripless_adjust(const f_array_length_t length, f_string_tripless_t * const tripless) {
+ #ifndef _di_level_0_parameter_checking_
+ if (!tripless) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ return private_f_string_tripless_adjust(length, tripless);
+ }
+#endif // _di_f_string_tripless_adjust_
+
+#ifndef _di_f_string_tripless_decimate_by_
+ f_status_t f_string_tripless_decimate_by(const f_array_length_t amount, f_string_tripless_t * const tripless) {
+ #ifndef _di_level_0_parameter_checking_
+ if (!tripless) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ if (!amount) {
+ return F_data_not;
+ }
+
+ if (tripless->size - amount > 0) {
+ return private_f_string_tripless_adjust(tripless->size - amount, tripless);
+ }
+
+ return private_f_string_tripless_adjust(0, tripless);
+ }
+#endif // _di_f_string_tripless_decimate_by_
+
+#ifndef _di_f_string_tripless_decrease_by_
+ f_status_t f_string_tripless_decrease_by(const f_array_length_t amount, f_string_tripless_t * const tripless) {
+ #ifndef _di_level_0_parameter_checking_
+ if (!tripless) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ if (!amount) {
+ return F_data_not;
+ }
+
+ if (tripless->size - amount > 0) {
+ return private_f_string_tripless_resize(tripless->size - amount, tripless);
+ }
+
+ return private_f_string_tripless_resize(0, tripless);
+ }
+#endif // _di_f_string_tripless_decrease_by_
+
+#ifndef _di_f_string_tripless_increase_
+ f_status_t f_string_tripless_increase(const f_array_length_t step, f_string_tripless_t * const tripless) {
+ #ifndef _di_level_0_parameter_checking_
+ if (!tripless) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ if (step && tripless->used + 1 > tripless->size) {
+ f_array_length_t size = tripless->used + step;
+
+ if (size > F_array_length_t_size_d) {
+ if (tripless->used + 1 > F_array_length_t_size_d) {
+ return F_status_set_error(F_array_too_large);
+ }
+
+ size = F_array_length_t_size_d;
+ }
+
+ return private_f_string_tripless_resize(size, tripless);
+ }
+
+ return F_data_not;
+ }
+#endif // _di_f_string_tripless_increase_
+
+#ifndef _di_f_string_tripless_increase_by_
+ f_status_t f_string_tripless_increase_by(const f_array_length_t amount, f_string_tripless_t * const tripless) {
+ #ifndef _di_level_0_parameter_checking_
+ if (!tripless) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ if (!amount) {
+ return F_data_not;
+ }
+
+ if (tripless->used + amount > tripless->size) {
+ if (tripless->used + amount > F_array_length_t_size_d) {
+ return F_status_set_error(F_array_too_large);
+ }
+
+ return private_f_string_tripless_resize(tripless->used + amount, tripless);
+ }
+
+ return F_data_not;
+ }
+#endif // _di_f_string_tripless_increase_by_
+
+#ifndef _di_f_string_tripless_resize_
+ f_status_t f_string_tripless_resize(const f_array_length_t length, f_string_tripless_t * const tripless) {
+ #ifndef _di_level_0_parameter_checking_
+ if (!tripless) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameter_checking_
+
+ return private_f_string_tripless_resize(length, tripless);
+ }
+#endif // _di_f_string_tripless_resize_
+
#ifdef __cplusplus
} // extern "C"
#endif
#endif // _di_f_string_triples_t_
/**
+ * An array of string tripless.
+ *
+ * array: The array of string triples.
+ * size: Total amount of allocated space.
+ * used: Total number of allocated spaces used.
+ */
+#ifndef _di_f_string_tripless_t_
+ typedef struct {
+ f_string_triples_t *array;
+
+ f_array_length_t size;
+ f_array_length_t used;
+ } f_string_tripless_t;
+
+ #define f_string_tripless_t_initialize f_string_statics_t_initialize
+
+ #define macro_f_string_tripless_t_clear(tripless) macro_f_memory_structure_clear(tripless)
+
+ #define macro_f_string_tripless_t_resize(status, tripless, length) status = f_string_tripless_resize(length, &tripless);
+ #define macro_f_string_tripless_t_adjust(status, tripless, length) status = f_string_tripless_adjust(length, &tripless);
+
+ #define macro_f_string_tripless_t_delete_simple(tripless) f_string_tripless_resize(0, &tripless);
+ #define macro_f_string_tripless_t_destroy_simple(tripless) f_string_tripless_adjust(0, &tripless);
+
+ #define macro_f_string_tripless_t_increase(status, step, tripless) status = f_string_tripless_increase(step, tripless);
+ #define macro_f_string_tripless_t_increase_by(status, tripless, amount) status = f_string_tripless_increase_by(amount, tripless);
+ #define macro_f_string_tripless_t_decrease_by(status, tripless, amount) status = f_string_tripless_decrease_by(amount, tripless);
+ #define macro_f_string_tripless_t_decimate_by(status, tripless, amount) status = f_string_tripless_decimate_by(amount, tripless);
+#endif // _di_f_string_tripless_t_
+
+/**
* Resize the string triples array.
*
* @param length
*
* @return
* F_none on success.
+ * F_data_not if amount is 0.
*
* F_parameter (with error bit) if a parameter is invalid.
*
*
* @return
* F_none on success.
+ * F_data_not if amount is 0.
*
* F_parameter (with error bit) if a parameter is invalid.
*
extern f_status_t f_string_triples_resize(const f_array_length_t length, f_string_triples_t * const triples);
#endif // _di_f_string_triples_resize_
+/**
+ * Resize the string tripless array.
+ *
+ * @param length
+ * The new size to use.
+ * @param tripless
+ * The string tripless 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.
+ */
+#ifndef _di_f_string_tripless_adjust_
+ extern f_status_t f_string_tripless_adjust(const f_array_length_t length, f_string_tripless_t * const tripless);
+#endif // _di_f_string_tripless_adjust_
+
+/**
+ * Append the source tripless onto the destination.
+ *
+ * @param source
+ * The source tripless to append.
+ * @param destination
+ * The destination tripless 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_tripless_append_
+ extern f_status_t f_string_tripless_append(const f_string_tripless_t source, f_string_tripless_t * const destination);
+#endif // _di_f_string_tripless_append_
+
+/**
+ * Resize the string tripless 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.
+ * This will not shrink the size to less than 0.
+ *
+ * @param amount
+ * A positive number representing how much to decimate the size by.
+ * @param tripless
+ * The string tripless array to resize.
+ *
+ * @return
+ * F_none on success.
+ * F_data_not if amount is 0.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_string_tripless_decimate_by_
+ extern f_status_t f_string_tripless_decimate_by(const f_array_length_t amount, f_string_tripless_t * const tripless);
+#endif // _di_f_string_tripless_decimate_by_
+
+/**
+ * Resize the string tripless 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.
+ * This will not shrink the size to less than 0.
+ *
+ * @param amount
+ * A positive number representing how much to decrease the size by.
+ * @param tripless
+ * The string tripless array to resize.
+ *
+ * @return
+ * F_none on success.
+ * F_data_not if amount is 0.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_string_tripless_decrease_by_
+ extern f_status_t f_string_tripless_decrease_by(const f_array_length_t amount, f_string_tripless_t * const tripless);
+#endif // _di_f_string_tripless_decrease_by_
+
+/**
+ * Increase the size of the string tripless 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_d).
+ * If already set to the maximum buffer size, then the resize will fail.
+ *
+ * @param step
+ * The allocation step to use.
+ * Must be greater than 0.
+ * @param tripless
+ * The string tripless 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_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_string_tripless_increase_
+ extern f_status_t f_string_tripless_increase(const f_array_length_t step, f_string_tripless_t * const tripless);
+#endif // _di_f_string_tripless_increase_
+
+/**
+ * Resize the string tripless 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_d).
+ * 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 tripless
+ * The string tripless 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_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_tripless_increase_by_
+ extern f_status_t f_string_tripless_increase_by(const f_array_length_t amount, f_string_tripless_t * const tripless);
+#endif // _di_f_string_tripless_increase_by_
+
+/**
+ * Resize the string tripless array.
+ *
+ * @param length
+ * The new size to use.
+ * @param tripless
+ * The string tripless array to adjust.
+ *
+ * @return
+ * F_none on success.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_memory_resize().
+ */
+#ifndef _di_f_string_tripless_resize_
+ extern f_status_t f_string_tripless_resize(const f_array_length_t length, f_string_tripless_t * const tripless);
+#endif // _di_f_string_tripless_resize_
+
#ifdef __cplusplus
} // extern "C"
#endif
#ifndef _di_f_thread_attributes_decrease_by_
f_status_t f_thread_attributes_decrease_by(const f_array_length_t amount, f_thread_attributes_t * const attributes) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!attributes) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (attributes->size - amount > 0) {
return private_f_thread_attributes_resize(attributes->size - amount, attributes);
}
#ifndef _di_f_thread_attributes_increase_
f_status_t f_thread_attributes_increase(const f_array_length_t step, f_thread_attributes_t * const attributes) {
#ifndef _di_level_0_parameter_checking_
- if (!step) return F_status_set_error(F_parameter);
if (!attributes) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- if (attributes->used + 1 > attributes->size) {
+ if (step && attributes->used + 1 > attributes->size) {
f_array_length_t size = attributes->used + step;
if (size > F_array_length_t_size_d) {
#ifndef _di_f_thread_attributes_increase_by_
f_status_t f_thread_attributes_increase_by(const f_array_length_t amount, f_thread_attributes_t * const attributes) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!attributes) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (attributes->used + amount > attributes->size) {
if (attributes->used + amount > F_array_length_t_size_d) {
return F_status_set_error(F_array_too_large);
#ifndef _di_f_thread_barrier_attributes_decimate_by_
f_status_t f_thread_barrier_attributes_decimate_by(const f_array_length_t amount, f_thread_barrier_attributes_t * const attributes) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!attributes) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (attributes->size - amount > 0) {
return private_f_thread_barrier_attributes_adjust(attributes->size - amount, attributes);
}
#ifndef _di_f_thread_barrier_attributes_decrease_by_
f_status_t f_thread_barrier_attributes_decrease_by(const f_array_length_t amount, f_thread_barrier_attributes_t * const attributes) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!attributes) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (attributes->size - amount > 0) {
return private_f_thread_barrier_attributes_resize(attributes->size - amount, attributes);
}
#ifndef _di_f_thread_barrier_attributes_increase_
f_status_t f_thread_barrier_attributes_increase(const f_array_length_t step, f_thread_barrier_attributes_t * const attributes) {
#ifndef _di_level_0_parameter_checking_
- if (!step) return F_status_set_error(F_parameter);
if (!attributes) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- if (attributes->used + 1 > attributes->size) {
+ if (step && attributes->used + 1 > attributes->size) {
f_array_length_t size = attributes->used + step;
if (size > F_array_length_t_size_d) {
#ifndef _di_f_thread_barrier_attributes_increase_by_
f_status_t f_thread_barrier_attributes_increase_by(const f_array_length_t amount, f_thread_barrier_attributes_t * const attributes) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!attributes) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (attributes->used + amount > attributes->size) {
if (attributes->used + amount > F_array_length_t_size_d) {
return F_status_set_error(F_array_too_large);
#ifndef _di_f_thread_barriers_decimate_by_
f_status_t f_thread_barriers_decimate_by(const f_array_length_t amount, f_thread_barriers_t * const barriers) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!barriers) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (barriers->size - amount > 0) {
return private_f_thread_barriers_adjust(barriers->size - amount, barriers);
}
#ifndef _di_f_thread_barriers_decrease_by_
f_status_t f_thread_barriers_decrease_by(const f_array_length_t amount, f_thread_barriers_t * const barriers) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!barriers) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (barriers->size - amount > 0) {
return private_f_thread_barriers_resize(barriers->size - amount, barriers);
}
#ifndef _di_f_thread_barriers_increase_
f_status_t f_thread_barriers_increase(const f_array_length_t step, f_thread_barriers_t * const barriers) {
#ifndef _di_level_0_parameter_checking_
- if (!step) return F_status_set_error(F_parameter);
if (!barriers) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- if (barriers->used + 1 > barriers->size) {
+ if (step && barriers->used + 1 > barriers->size) {
f_array_length_t size = barriers->used + step;
if (size > F_array_length_t_size_d) {
#ifndef _di_f_thread_barriers_increase_by_
f_status_t f_thread_barriers_increase_by(const f_array_length_t amount, f_thread_barriers_t * const barriers) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!barriers) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (barriers->used + amount > barriers->size) {
if (barriers->used + amount > F_array_length_t_size_d) {
return F_status_set_error(F_array_too_large);
#ifndef _di_f_thread_condition_attributes_decimate_by_
f_status_t f_thread_condition_attributes_decimate_by(const f_array_length_t amount, f_thread_condition_attributes_t * const attributes) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!attributes) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (attributes->size - amount > 0) {
return private_f_thread_condition_attributes_adjust(attributes->size - amount, attributes);
}
#ifndef _di_f_thread_condition_attributes_decrease_by_
f_status_t f_thread_condition_attributes_decrease_by(const f_array_length_t amount, f_thread_condition_attributes_t * const attributes) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!attributes) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (attributes->size - amount > 0) {
return private_f_thread_condition_attributes_resize(attributes->size - amount, attributes);
}
#ifndef _di_f_thread_condition_attributes_increase_
f_status_t f_thread_condition_attributes_increase(const f_array_length_t step, f_thread_condition_attributes_t * const attributes) {
#ifndef _di_level_0_parameter_checking_
- if (!step) return F_status_set_error(F_parameter);
if (!attributes) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- if (attributes->used + 1 > attributes->size) {
+ if (step && attributes->used + 1 > attributes->size) {
f_array_length_t size = attributes->used + step;
if (size > F_array_length_t_size_d) {
#ifndef _di_f_thread_condition_attributes_increase_by_
f_status_t f_thread_condition_attributes_increase_by(const f_array_length_t amount, f_thread_condition_attributes_t * const attributes) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!attributes) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (attributes->used + amount > attributes->size) {
if (attributes->used + amount > F_array_length_t_size_d) {
return F_status_set_error(F_array_too_large);
#ifndef _di_f_thread_conditions_decrease_by_
f_status_t f_thread_conditions_decrease_by(const f_array_length_t amount, f_thread_conditions_t * const conditions) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!conditions) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (conditions->size - amount > 0) {
return private_f_thread_conditions_resize(conditions->size - amount, conditions);
}
#ifndef _di_f_thread_conditions_increase_
f_status_t f_thread_conditions_increase(const f_array_length_t step, f_thread_conditions_t * const conditions) {
#ifndef _di_level_0_parameter_checking_
- if (!step) return F_status_set_error(F_parameter);
if (!conditions) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- if (conditions->used + 1 > conditions->size) {
+ if (step && conditions->used + 1 > conditions->size) {
f_array_length_t size = conditions->used + step;
if (size > F_array_length_t_size_d) {
#ifndef _di_f_thread_conditions_increase_by_
f_status_t f_thread_conditions_increase_by(const f_array_length_t amount, f_thread_conditions_t * const conditions) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!conditions) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (conditions->used + amount > conditions->size) {
if (conditions->used + amount > F_array_length_t_size_d) {
return F_status_set_error(F_array_too_large);
#ifndef _di_f_thread_keys_decimate_by_
f_status_t f_thread_keys_decimate_by(const f_array_length_t amount, f_thread_keys_t * const keys) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!keys) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (keys->size - amount > 0) {
return private_f_thread_keys_adjust(keys->size - amount, keys);
}
#ifndef _di_f_thread_keys_decrease_by_
f_status_t f_thread_keys_decrease_by(const f_array_length_t amount, f_thread_keys_t * const keys) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!keys) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (keys->size - amount > 0) {
return private_f_thread_keys_resize(keys->size - amount, keys);
}
#ifndef _di_f_thread_keys_increase_
f_status_t f_thread_keys_increase(const f_array_length_t step, f_thread_keys_t * const keys) {
#ifndef _di_level_0_parameter_checking_
- if (!step) return F_status_set_error(F_parameter);
if (!keys) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- if (keys->used + 1 > keys->size) {
+ if (step && keys->used + 1 > keys->size) {
f_array_length_t size = keys->used + step;
if (size > F_array_length_t_size_d) {
#ifndef _di_f_thread_keys_increase_by_
f_status_t f_thread_keys_increase_by(const f_array_length_t amount, f_thread_keys_t * const keys) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!keys) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (keys->used + amount > keys->size) {
if (keys->used + amount > F_array_length_t_size_d) {
return F_status_set_error(F_array_too_large);
const int error = pthread_rwlockattr_init(attribute);
- // @todo figure out the error codes and update accordingly.
if (error) {
if (error == EAGAIN) return F_status_set_error(F_resource_not);
if (error == EBUSY) return F_status_set_error(F_busy);
#ifndef _di_f_thread_lock_attributes_decimate_by_
f_status_t f_thread_lock_attributes_decimate_by(const f_array_length_t amount, f_thread_lock_attributes_t * const attributes) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!attributes) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (attributes->size - amount > 0) {
return private_f_thread_lock_attributes_adjust(attributes->size - amount, attributes);
}
#ifndef _di_f_thread_lock_attributes_decrease_by_
f_status_t f_thread_lock_attributes_decrease_by(const f_array_length_t amount, f_thread_lock_attributes_t * const attributes) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!attributes) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (attributes->size - amount > 0) {
return private_f_thread_lock_attributes_resize(attributes->size - amount, attributes);
}
#ifndef _di_f_thread_lock_attributes_increase_
f_status_t f_thread_lock_attributes_increase(const f_array_length_t step, f_thread_lock_attributes_t * const attributes) {
#ifndef _di_level_0_parameter_checking_
- if (!step) return F_status_set_error(F_parameter);
if (!attributes) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- if (attributes->used + 1 > attributes->size) {
+ if (step && attributes->used + 1 > attributes->size) {
f_array_length_t size = attributes->used + step;
if (size > F_array_length_t_size_d) {
#ifndef _di_f_thread_lock_attributes_increase_by_
f_status_t f_thread_lock_attributes_increase_by(const f_array_length_t amount, f_thread_lock_attributes_t * const attributes) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!attributes) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (attributes->used + amount > attributes->size) {
if (attributes->used + amount > F_array_length_t_size_d) {
return F_status_set_error(F_array_too_large);
#ifndef _di_f_thread_locks_decimate_by_
f_status_t f_thread_locks_decimate_by(const f_array_length_t amount, f_thread_locks_t * const locks) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!locks) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (locks->size - amount > 0) {
return private_f_thread_locks_adjust(locks->size - amount, locks);
}
#ifndef _di_f_thread_locks_decrease_by_
f_status_t f_thread_locks_decrease_by(const f_array_length_t amount, f_thread_locks_t * const locks) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!locks) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (locks->size - amount > 0) {
return private_f_thread_locks_resize(locks->size - amount, locks);
}
#ifndef _di_f_thread_locks_increase_
f_status_t f_thread_locks_increase(const f_array_length_t step, f_thread_locks_t * const locks) {
#ifndef _di_level_0_parameter_checking_
- if (!step) return F_status_set_error(F_parameter);
if (!locks) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- if (locks->used + 1 > locks->size) {
+ if (step && locks->used + 1 > locks->size) {
f_array_length_t size = locks->used + step;
if (size > F_array_length_t_size_d) {
#ifndef _di_f_thread_locks_increase_by_
f_status_t f_thread_locks_increase_by(const f_array_length_t amount, f_thread_locks_t * const locks) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!locks) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (locks->used + amount > locks->size) {
if (locks->used + amount > F_array_length_t_size_d) {
return F_status_set_error(F_array_too_large);
const int error = pthread_mutexattr_init(attribute);
- // @todo figure out the error codes and update accordingly.
if (error) {
if (error == EAGAIN) return F_status_set_error(F_resource_not);
if (error == EBUSY) return F_status_set_error(F_busy);
#ifndef _di_f_thread_mutex_attributes_decimate_by_
f_status_t f_thread_mutex_attributes_decimate_by(const f_array_length_t amount, f_thread_mutex_attributes_t * const attributes) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!attributes) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (attributes->size - amount > 0) {
return private_f_thread_mutex_attributes_adjust(attributes->size - amount, attributes);
}
#ifndef _di_f_thread_mutex_attributes_decrease_by_
f_status_t f_thread_mutex_attributes_decrease_by(const f_array_length_t amount, f_thread_mutex_attributes_t * const attributes) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!attributes) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (attributes->size - amount > 0) {
return private_f_thread_mutex_attributes_resize(attributes->size - amount, attributes);
}
#ifndef _di_f_thread_mutex_attributes_increase_
f_status_t f_thread_mutex_attributes_increase(const f_array_length_t step, f_thread_mutex_attributes_t * const attributes) {
#ifndef _di_level_0_parameter_checking_
- if (!step) return F_status_set_error(F_parameter);
if (!attributes) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- if (attributes->used + 1 > attributes->size) {
+ if (step && attributes->used + 1 > attributes->size) {
f_array_length_t size = attributes->used + step;
if (size > F_array_length_t_size_d) {
#ifndef _di_f_thread_mutex_attributes_increase_by_
f_status_t f_thread_mutex_attributes_increase_by(const f_array_length_t amount, f_thread_mutex_attributes_t * const attributes) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!attributes) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (attributes->used + amount > attributes->size) {
if (attributes->used + amount > F_array_length_t_size_d) {
return F_status_set_error(F_array_too_large);
#ifndef _di_f_thread_mutexs_decimate_by_
f_status_t f_thread_mutexs_decimate_by(const f_array_length_t amount, f_thread_mutexs_t * const mutexs) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!mutexs) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (mutexs->size - amount > 0) {
return private_f_thread_mutexs_adjust(mutexs->size - amount, mutexs);
}
#ifndef _di_f_thread_mutexs_decrease_by_
f_status_t f_thread_mutexs_decrease_by(const f_array_length_t amount, f_thread_mutexs_t * const mutexs) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!mutexs) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (mutexs->size - amount > 0) {
return private_f_thread_mutexs_resize(mutexs->size - amount, mutexs);
}
#ifndef _di_f_thread_mutexs_increase_
f_status_t f_thread_mutexs_increase(const f_array_length_t step, f_thread_mutexs_t * const mutexs) {
#ifndef _di_level_0_parameter_checking_
- if (!step) return F_status_set_error(F_parameter);
if (!mutexs) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- if (mutexs->used + 1 > mutexs->size) {
+ if (step && mutexs->used + 1 > mutexs->size) {
f_array_length_t size = mutexs->used + step;
if (size > F_array_length_t_size_d) {
#ifndef _di_f_thread_mutexs_increase_by_
f_status_t f_thread_mutexs_increase_by(const f_array_length_t amount, f_thread_mutexs_t * const mutexs) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!mutexs) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (mutexs->used + amount > mutexs->size) {
if (mutexs->used + amount > F_array_length_t_size_d) {
return F_status_set_error(F_array_too_large);
#ifndef _di_f_thread_semaphores_decimate_by_
f_status_t f_thread_semaphores_decimate_by(const f_array_length_t amount, f_thread_semaphores_t * const semaphores) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!semaphores) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (semaphores->size - amount > 0) {
return private_f_thread_semaphores_adjust(semaphores->size - amount, semaphores);
}
#ifndef _di_f_thread_semaphores_decrease_by_
f_status_t f_thread_semaphores_decrease_by(const f_array_length_t amount, f_thread_semaphores_t * const semaphores) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!semaphores) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (semaphores->size - amount > 0) {
return private_f_thread_semaphores_resize(semaphores->size - amount, semaphores);
}
#ifndef _di_f_thread_semaphores_increase_
f_status_t f_thread_semaphores_increase(const f_array_length_t step, f_thread_semaphores_t * const semaphores) {
#ifndef _di_level_0_parameter_checking_
- if (!step) return F_status_set_error(F_parameter);
if (!semaphores) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- if (semaphores->used + 1 > semaphores->size) {
+ if (step && semaphores->used + 1 > semaphores->size) {
f_array_length_t size = semaphores->used + step;
if (size > F_array_length_t_size_d) {
#ifndef _di_f_thread_semaphores_increase_by_
f_status_t f_thread_semaphores_increase_by(const f_array_length_t amount, f_thread_semaphores_t * const semaphores) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!semaphores) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (semaphores->used + amount > semaphores->size) {
if (semaphores->used + amount > F_array_length_t_size_d) {
return F_status_set_error(F_array_too_large);
#ifndef _di_f_thread_sets_decimate_by_
f_status_t f_thread_sets_decimate_by(const f_array_length_t amount, f_thread_sets_t * const sets) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!sets) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (sets->size - amount > 0) {
return private_f_thread_sets_adjust(sets->size - amount, sets);
}
#ifndef _di_f_thread_sets_decrease_by_
f_status_t f_thread_sets_decrease_by(const f_array_length_t amount, f_thread_sets_t * const sets) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!sets) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (sets->size - amount > 0) {
return private_f_thread_sets_resize(sets->size - amount, sets);
}
#ifndef _di_f_thread_sets_increase_
f_status_t f_thread_sets_increase(const f_array_length_t step, f_thread_sets_t * const sets) {
#ifndef _di_level_0_parameter_checking_
- if (!step) return F_status_set_error(F_parameter);
if (!sets) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- if (sets->used + 1 > sets->size) {
+ if (step && sets->used + 1 > sets->size) {
f_array_length_t size = sets->used + step;
if (size > F_array_length_t_size_d) {
#ifndef _di_f_thread_sets_increase_by_
f_status_t f_thread_sets_increase_by(const f_array_length_t amount, f_thread_sets_t * const sets) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!sets) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (sets->used + amount > sets->size) {
if (sets->used + amount > F_array_length_t_size_d) {
return F_status_set_error(F_array_too_large);
#ifndef _di_f_thread_spins_decimate_by_
f_status_t f_thread_spins_decimate_by(const f_array_length_t amount, f_thread_spins_t * const spins) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!spins) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (spins->size - amount > 0) {
return private_f_thread_spins_adjust(spins->size - amount, spins);
}
#ifndef _di_f_thread_spins_decrease_by_
f_status_t f_thread_spins_decrease_by(const f_array_length_t amount, f_thread_spins_t * const spins) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!spins) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (spins->size - amount > 0) {
return private_f_thread_spins_resize(spins->size - amount, spins);
}
#ifndef _di_f_thread_spins_increase_
f_status_t f_thread_spins_increase(const f_array_length_t step, f_thread_spins_t * const spins) {
#ifndef _di_level_0_parameter_checking_
- if (!step) return F_status_set_error(F_parameter);
if (!spins) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- if (spins->used + 1 > spins->size) {
+ if (step && spins->used + 1 > spins->size) {
f_array_length_t size = spins->used + step;
if (size > F_array_length_t_size_d) {
#ifndef _di_f_thread_spins_increase_by_
f_status_t f_thread_spins_increase_by(const f_array_length_t amount, f_thread_spins_t * const spins) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!spins) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (spins->used + amount > spins->size) {
if (spins->used + amount > F_array_length_t_size_d) {
return F_status_set_error(F_array_too_large);
*
* @return
* F_none on success.
+ * F_data_not if amount is 0.
*
* F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* @return
* F_none on success.
+ * F_data_not if amount is 0.
*
* F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* @return
* F_none on success.
+ * F_data_not if amount is 0.
*
* F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* @return
* F_none on success.
+ * F_data_not if amount is 0.
*
* F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* @return
* F_none on success.
+ * F_data_not if amount is 0.
*
* F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* @return
* F_none on success.
+ * F_data_not if amount is 0.
*
* F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* @return
* F_none on success.
+ * F_data_not if amount is 0.
*
* F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* @return
* F_none on success.
+ * F_data_not if amount is 0.
*
* F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* @return
* F_none on success.
+ * F_data_not if amount is 0.
*
* F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* @return
* F_none on success.
+ * F_data_not if amount is 0.
*
* F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* @return
* F_none on success.
+ * F_data_not if amount is 0.
*
* F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* @return
* F_none on success.
+ * F_data_not if amount is 0.
*
* F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* @return
* F_none on success.
+ * F_data_not if amount is 0.
*
* F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* @return
* F_none on success.
+ * F_data_not if amount is 0.
*
* F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* @return
* F_none on success.
+ * F_data_not if amount is 0.
*
* F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* @return
* F_none on success.
+ * F_data_not if amount is 0.
*
* F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* @return
* F_none on success.
+ * F_data_not if amount is 0.
*
* F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* @return
* F_none on success.
+ * F_data_not if amount is 0.
*
* F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* @return
* F_none on success.
+ * F_data_not if amount is 0.
*
* F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* @return
* F_none on success.
+ * F_data_not if amount is 0.
*
* F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* @return
* F_none on success.
+ * F_data_not if amount is 0.
*
* F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* @return
* F_none on success.
+ * F_data_not if amount is 0.
*
* F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* @return
* F_none on success.
+ * F_data_not if amount is 0.
*
* F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* @return
* F_none on success.
+ * F_data_not if amount is 0.
*
* F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* @return
* F_none on success.
+ * F_data_not if amount is 0.
*
* F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
*
* @return
* F_none on success.
+ * F_data_not if amount is 0.
*
* F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
#ifndef _di_f_array_lengths_decimate_by_
f_status_t f_array_lengths_decimate_by(const f_array_length_t amount, f_array_lengths_t *lengths) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!lengths) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (lengths->size - amount > 0) {
return private_f_array_lengths_adjust(lengths->size - amount, lengths);
}
#ifndef _di_f_array_lengths_decrease_by_
f_status_t f_array_lengths_decrease_by(const f_array_length_t amount, f_array_lengths_t *lengths) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!lengths) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (lengths->size - amount > 0) {
return private_f_array_lengths_resize(lengths->size - amount, lengths);
}
#ifndef _di_f_array_lengths_increase_
f_status_t f_array_lengths_increase(const f_array_length_t step, f_array_lengths_t *lengths) {
#ifndef _di_level_0_parameter_checking_
- if (!step) return F_status_set_error(F_parameter);
if (!lengths) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- if (lengths->used + 1 > lengths->size) {
+ if (step && lengths->used + 1 > lengths->size) {
f_array_length_t size = lengths->used + step;
if (size > F_array_length_t_size_d) {
#ifndef _di_f_array_lengths_increase_by_
f_status_t f_array_lengths_increase_by(const f_array_length_t amount, f_array_lengths_t *lengths) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!lengths) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (lengths->used + amount > lengths->size) {
if (lengths->used + amount > F_array_length_t_size_d) {
return F_status_set_error(F_array_too_large);
#ifndef _di_f_array_lengthss_decimate_by_
f_status_t f_array_lengthss_decimate_by(const f_array_length_t amount, f_array_lengthss_t *lengthss) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!lengthss) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (lengthss->size - amount > 0) {
return private_f_array_lengthss_adjust(lengthss->size - amount, lengthss);
}
#ifndef _di_f_array_lengthss_decrease_by_
f_status_t f_array_lengthss_decrease_by(const f_array_length_t amount, f_array_lengthss_t *lengthss) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!lengthss) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (lengthss->size - amount > 0) {
return private_f_array_lengthss_resize(lengthss->size - amount, lengthss);
}
#ifndef _di_f_array_lengthss_increase_
f_status_t f_array_lengthss_increase(const f_array_length_t step, f_array_lengthss_t *lengthss) {
#ifndef _di_level_0_parameter_checking_
- if (!step) return F_status_set_error(F_parameter);
if (!lengthss) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- if (lengthss->used + 1 > lengthss->size) {
+ if (step && lengthss->used + 1 > lengthss->size) {
f_array_length_t size = lengthss->used + step;
if (size > F_array_length_t_size_d) {
#ifndef _di_f_array_lengthss_increase_by_
f_status_t f_array_lengthss_increase_by(const f_array_length_t amount, f_array_lengthss_t *lengthss) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!lengthss) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (lengthss->used + amount > lengthss->size) {
if (lengthss->used + amount > F_array_length_t_size_d) {
return F_status_set_error(F_array_too_large);
*
* @return
* F_none on success.
+ * F_data_not if amount is 0.
*
* F_parameter (with error bit) if a parameter is invalid.
*
*
* @return
* F_none on success.
+ * F_data_not if amount is 0.
*
* F_parameter (with error bit) if a parameter is invalid.
*
#ifndef _di_f_cells_decimate_by_
f_status_t f_cells_decimate_by(const f_array_length_t amount, f_cells_t *cells) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!cells) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (cells->size - amount > 0) {
return private_f_cells_adjust(cells->size - amount, cells);
}
#ifndef _di_f_cells_decrease_by_
f_status_t f_cells_decrease_by(const f_array_length_t amount, f_cells_t *cells) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!cells) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (cells->size - amount > 0) {
return private_f_cells_resize(cells->size - amount, cells);
}
#ifndef _di_f_cells_increase_
f_status_t f_cells_increase(const f_array_length_t step, f_cells_t *cells) {
#ifndef _di_level_0_parameter_checking_
- if (!step) return F_status_set_error(F_parameter);
if (!cells) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- if (cells->used + 1 > cells->size) {
+ if (step && cells->used + 1 > cells->size) {
f_array_length_t size = cells->used + step;
if (size > F_array_length_t_size_d) {
#ifndef _di_f_cells_increase_by_
f_status_t f_cells_increase_by(const f_array_length_t amount, f_cells_t *cells) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!cells) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (cells->used + amount > cells->size) {
if (cells->used + amount > F_array_length_t_size_d) {
return F_status_set_error(F_array_too_large);
#ifndef _di_f_cellss_decimate_by_
f_status_t f_cellss_decimate_by(const f_array_length_t amount, f_cellss_t *cellss) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!cellss) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (cellss->size - amount > 0) {
return private_f_cellss_adjust(cellss->size - amount, cellss);
}
#ifndef _di_f_cellss_decrease_by_
f_status_t f_cellss_decrease_by(const f_array_length_t amount, f_cellss_t *cellss) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!cellss) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (cellss->size - amount > 0) {
return private_f_cellss_resize(cellss->size - amount, cellss);
}
#ifndef _di_f_cellss_increase_
f_status_t f_cellss_increase(const f_array_length_t step, f_cellss_t *cellss) {
#ifndef _di_level_0_parameter_checking_
- if (!step) return F_status_set_error(F_parameter);
if (!cellss) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- if (cellss->used + 1 > cellss->size) {
+ if (step && cellss->used + 1 > cellss->size) {
f_array_length_t size = cellss->used + step;
if (size > F_array_length_t_size_d) {
#ifndef _di_f_cellss_increase_by_
f_status_t f_cellss_increase_by(const f_array_length_t amount, f_cellss_t *cellss) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!cellss) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (cellss->used + amount > cellss->size) {
if (cellss->used + amount > F_array_length_t_size_d) {
return F_status_set_error(F_array_too_large);
*
* @return
* F_none on success.
+ * F_data_not if amount is 0.
*
* F_parameter (with error bit) if a parameter is invalid.
*
*
* @return
* F_none on success.
+ * F_data_not if amount is 0.
*
* F_parameter (with error bit) if a parameter is invalid.
*
#ifndef _di_f_fll_ids_decimate_by_
f_status_t f_fll_ids_decimate_by(const f_array_length_t amount, f_fll_ids_t *ids) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!ids) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (ids->size - amount > 0) {
return private_f_fll_ids_adjust(ids->size - amount, ids);
}
#ifndef _di_f_fll_ids_decrease_by_
f_status_t f_fll_ids_decrease_by(const f_array_length_t amount, f_fll_ids_t *ids) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!ids) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (ids->size - amount > 0) {
return private_f_fll_ids_resize(ids->size - amount, ids);
}
#ifndef _di_f_fll_ids_increase_
f_status_t f_fll_ids_increase(const f_array_length_t step, f_fll_ids_t *ids) {
#ifndef _di_level_0_parameter_checking_
- if (!step) return F_status_set_error(F_parameter);
if (!ids) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- if (ids->used + 1 > ids->size) {
+ if (step && ids->used + 1 > ids->size) {
f_array_length_t size = ids->used + step;
if (size > F_array_length_t_size_d) {
#ifndef _di_f_fll_ids_increase_by_
f_status_t f_fll_ids_increase_by(const f_array_length_t amount, f_fll_ids_t *ids) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!ids) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (ids->used + amount > ids->size) {
if (ids->used + amount > F_array_length_t_size_d) {
return F_status_set_error(F_array_too_large);
#ifndef _di_f_fll_idss_decimate_by_
f_status_t f_fll_idss_decimate_by(const f_array_length_t amount, f_fll_idss_t *idss) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!idss) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (idss->size - amount > 0) {
return private_f_fll_idss_adjust(idss->size - amount, idss);
}
#ifndef _di_f_fll_idss_decrease_by_
f_status_t f_fll_idss_decrease_by(const f_array_length_t amount, f_fll_idss_t *idss) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!idss) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (idss->size - amount > 0) {
return private_f_fll_idss_resize(idss->size - amount, idss);
}
#ifndef _di_f_fll_idss_increase_
f_status_t f_fll_idss_increase(const f_array_length_t step, f_fll_idss_t *idss) {
#ifndef _di_level_0_parameter_checking_
- if (!step) return F_status_set_error(F_parameter);
if (!idss) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- if (idss->used + 1 > idss->size) {
+ if (step && idss->used + 1 > idss->size) {
f_array_length_t size = idss->used + step;
if (size > F_array_length_t_size_d) {
#ifndef _di_f_fll_idss_increase_by_
f_status_t f_fll_idss_increase_by(const f_array_length_t amount, f_fll_idss_t *idss) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!idss) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (idss->used + amount > idss->size) {
if (idss->used + amount > F_array_length_t_size_d) {
return F_status_set_error(F_array_too_large);
*
* @return
* F_none on success.
+ * F_data_not if amount is 0.
*
* F_parameter (with error bit) if a parameter is invalid.
*
*
* @return
* F_none on success.
+ * F_data_not if amount is 0.
*
* F_parameter (with error bit) if a parameter is invalid.
*
#ifndef _di_f_int128s_decimate_by_
f_status_t f_int128s_decimate_by(const f_array_length_t amount, f_int128s_t *int128s) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!int128s) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (int128s->size - amount > 0) {
return private_f_int128s_adjust(int128s->size - amount, int128s);
}
#ifndef _di_f_int128s_decrease_by_
f_status_t f_int128s_decrease_by(const f_array_length_t amount, f_int128s_t *int128s) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!int128s) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (int128s->size - amount > 0) {
return private_f_int128s_resize(int128s->size - amount, int128s);
}
#ifndef _di_f_int128s_increase_
f_status_t f_int128s_increase(const f_array_length_t step, f_int128s_t *int128s) {
#ifndef _di_level_0_parameter_checking_
- if (!step) return F_status_set_error(F_parameter);
if (!int128s) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- if (int128s->used + 1 > int128s->size) {
+ if (step && int128s->used + 1 > int128s->size) {
f_array_length_t size = int128s->used + step;
if (size > F_array_length_t_size_d) {
#ifndef _di_f_int128s_increase_by_
f_status_t f_int128s_increase_by(const f_array_length_t amount, f_int128s_t *int128s) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!int128s) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (int128s->used + amount > int128s->size) {
if (int128s->used + amount > F_array_length_t_size_d) {
return F_status_set_error(F_array_too_large);
#ifndef _di_f_int128ss_decimate_by_
f_status_t f_int128ss_decimate_by(const f_array_length_t amount, f_int128ss_t *int128ss) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!int128ss) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (int128ss->size - amount > 0) {
return private_f_int128ss_adjust(int128ss->size - amount, int128ss);
}
#ifndef _di_f_int128ss_decrease_by_
f_status_t f_int128ss_decrease_by(const f_array_length_t amount, f_int128ss_t *int128ss) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!int128ss) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (int128ss->size - amount > 0) {
return private_f_int128ss_resize(int128ss->size - amount, int128ss);
}
#ifndef _di_f_int128ss_increase_
f_status_t f_int128ss_increase(const f_array_length_t step, f_int128ss_t *int128ss) {
#ifndef _di_level_0_parameter_checking_
- if (!step) return F_status_set_error(F_parameter);
if (!int128ss) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- if (int128ss->used + 1 > int128ss->size) {
+ if (step && int128ss->used + 1 > int128ss->size) {
f_array_length_t size = int128ss->used + step;
if (size > F_array_length_t_size_d) {
#ifndef _di_f_int128ss_increase_by_
f_status_t f_int128ss_increase_by(const f_array_length_t amount, f_int128ss_t *int128ss) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!int128ss) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (int128ss->used + amount > int128ss->size) {
if (int128ss->used + amount > F_array_length_t_size_d) {
return F_status_set_error(F_array_too_large);
#ifndef _di_f_uint128s_decimate_by_
f_status_t f_uint128s_decimate_by(const f_array_length_t amount, f_uint128s_t *uint128s) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!uint128s) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (uint128s->size - amount > 0) {
return private_f_uint128s_adjust(uint128s->size - amount, uint128s);
}
#ifndef _di_f_uint128s_decrease_by_
f_status_t f_uint128s_decrease_by(const f_array_length_t amount, f_uint128s_t *uint128s) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!uint128s) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (uint128s->size - amount > 0) {
return private_f_uint128s_resize(uint128s->size - amount, uint128s);
}
#ifndef _di_f_uint128s_increase_
f_status_t f_uint128s_increase(const f_array_length_t step, f_uint128s_t *uint128s) {
#ifndef _di_level_0_parameter_checking_
- if (!step) return F_status_set_error(F_parameter);
if (!uint128s) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- if (uint128s->used + 1 > uint128s->size) {
+ if (step && uint128s->used + 1 > uint128s->size) {
f_array_length_t size = uint128s->used + step;
if (size > F_array_length_t_size_d) {
#ifndef _di_f_uint128s_increase_by_
f_status_t f_uint128s_increase_by(const f_array_length_t amount, f_uint128s_t *uint128s) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!uint128s) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (uint128s->used + amount > uint128s->size) {
if (uint128s->used + amount > F_array_length_t_size_d) {
return F_status_set_error(F_array_too_large);
#ifndef _di_f_uint128ss_decimate_by_
f_status_t f_uint128ss_decimate_by(const f_array_length_t amount, f_uint128ss_t *uint128ss) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!uint128ss) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (uint128ss->size - amount > 0) {
return private_f_uint128ss_adjust(uint128ss->size - amount, uint128ss);
}
#ifndef _di_f_uint128ss_decrease_by_
f_status_t f_uint128ss_decrease_by(const f_array_length_t amount, f_uint128ss_t *uint128ss) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!uint128ss) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (uint128ss->size - amount > 0) {
return private_f_uint128ss_resize(uint128ss->size - amount, uint128ss);
}
#ifndef _di_f_uint128ss_increase_
f_status_t f_uint128ss_increase(const f_array_length_t step, f_uint128ss_t *uint128ss) {
#ifndef _di_level_0_parameter_checking_
- if (!step) return F_status_set_error(F_parameter);
if (!uint128ss) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- if (uint128ss->used + 1 > uint128ss->size) {
+ if (step && uint128ss->used + 1 > uint128ss->size) {
f_array_length_t size = uint128ss->used + step;
if (size > F_array_length_t_size_d) {
#ifndef _di_f_uint128ss_increase_by_
f_status_t f_uint128ss_increase_by(const f_array_length_t amount, f_uint128ss_t *uint128ss) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!uint128ss) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (uint128ss->used + amount > uint128ss->size) {
if (uint128ss->used + amount > F_array_length_t_size_d) {
return F_status_set_error(F_array_too_large);
*
* @return
* F_none on success.
+ * F_data_not if amount is 0.
*
* F_parameter (with error bit) if a parameter is invalid.
*
*
* @return
* F_none on success.
+ * F_data_not if amount is 0.
*
* F_parameter (with error bit) if a parameter is invalid.
*
*
* @return
* F_none on success.
+ * F_data_not if amount is 0.
*
* F_parameter (with error bit) if a parameter is invalid.
*
*
* @return
* F_none on success.
+ * F_data_not if amount is 0.
*
* F_parameter (with error bit) if a parameter is invalid.
*
#ifndef _di_f_int16s_decimate_by_
f_status_t f_int16s_decimate_by(const f_array_length_t amount, f_int16s_t *int16s) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!int16s) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (int16s->size - amount > 0) {
return private_f_int16s_adjust(int16s->size - amount, int16s);
}
#ifndef _di_f_int16s_decrease_by_
f_status_t f_int16s_decrease_by(const f_array_length_t amount, f_int16s_t *int16s) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!int16s) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (int16s->size - amount > 0) {
return private_f_int16s_resize(int16s->size - amount, int16s);
}
#ifndef _di_f_int16s_increase_
f_status_t f_int16s_increase(const f_array_length_t step, f_int16s_t *int16s) {
#ifndef _di_level_0_parameter_checking_
- if (!step) return F_status_set_error(F_parameter);
if (!int16s) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- if (int16s->used + 1 > int16s->size) {
+ if (step && int16s->used + 1 > int16s->size) {
f_array_length_t size = int16s->used + step;
if (size > F_array_length_t_size_d) {
#ifndef _di_f_int16s_increase_by_
f_status_t f_int16s_increase_by(const f_array_length_t amount, f_int16s_t *int16s) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!int16s) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (int16s->used + amount > int16s->size) {
if (int16s->used + amount > F_array_length_t_size_d) {
return F_status_set_error(F_array_too_large);
#ifndef _di_f_int16ss_decimate_by_
f_status_t f_int16ss_decimate_by(const f_array_length_t amount, f_int16ss_t *int16ss) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!int16ss) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (int16ss->size - amount > 0) {
return private_f_int16ss_adjust(int16ss->size - amount, int16ss);
}
#ifndef _di_f_int16ss_decrease_by_
f_status_t f_int16ss_decrease_by(const f_array_length_t amount, f_int16ss_t *int16ss) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!int16ss) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (int16ss->size - amount > 0) {
return private_f_int16ss_resize(int16ss->size - amount, int16ss);
}
#ifndef _di_f_int16ss_increase_
f_status_t f_int16ss_increase(const f_array_length_t step, f_int16ss_t *int16ss) {
#ifndef _di_level_0_parameter_checking_
- if (!step) return F_status_set_error(F_parameter);
if (!int16ss) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- if (int16ss->used + 1 > int16ss->size) {
+ if (step && int16ss->used + 1 > int16ss->size) {
f_array_length_t size = int16ss->used + step;
if (size > F_array_length_t_size_d) {
#ifndef _di_f_int16ss_increase_by_
f_status_t f_int16ss_increase_by(const f_array_length_t amount, f_int16ss_t *int16ss) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!int16ss) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (int16ss->used + amount > int16ss->size) {
if (int16ss->used + amount > F_array_length_t_size_d) {
return F_status_set_error(F_array_too_large);
#ifndef _di_f_uint16s_decimate_by_
f_status_t f_uint16s_decimate_by(const f_array_length_t amount, f_uint16s_t *uint16s) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!uint16s) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (uint16s->size - amount > 0) {
return private_f_uint16s_adjust(uint16s->size - amount, uint16s);
}
#ifndef _di_f_uint16s_decrease_by_
f_status_t f_uint16s_decrease_by(const f_array_length_t amount, f_uint16s_t *uint16s) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!uint16s) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (uint16s->size - amount > 0) {
return private_f_uint16s_resize(uint16s->size - amount, uint16s);
}
#ifndef _di_f_uint16s_increase_
f_status_t f_uint16s_increase(const f_array_length_t step, f_uint16s_t *uint16s) {
#ifndef _di_level_0_parameter_checking_
- if (!step) return F_status_set_error(F_parameter);
if (!uint16s) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- if (uint16s->used + 1 > uint16s->size) {
+ if (step && uint16s->used + 1 > uint16s->size) {
f_array_length_t size = uint16s->used + step;
if (size > F_array_length_t_size_d) {
#ifndef _di_f_uint16s_increase_by_
f_status_t f_uint16s_increase_by(const f_array_length_t amount, f_uint16s_t *uint16s) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!uint16s) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (uint16s->used + amount > uint16s->size) {
if (uint16s->used + amount > F_array_length_t_size_d) {
return F_status_set_error(F_array_too_large);
#ifndef _di_f_uint16ss_decimate_by_
f_status_t f_uint16ss_decimate_by(const f_array_length_t amount, f_uint16ss_t *uint16ss) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!uint16ss) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (uint16ss->size - amount > 0) {
return private_f_uint16ss_adjust(uint16ss->size - amount, uint16ss);
}
#ifndef _di_f_uint16ss_decrease_by_
f_status_t f_uint16ss_decrease_by(const f_array_length_t amount, f_uint16ss_t *uint16ss) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!uint16ss) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (uint16ss->size - amount > 0) {
return private_f_uint16ss_resize(uint16ss->size - amount, uint16ss);
}
#ifndef _di_f_uint16ss_increase_
f_status_t f_uint16ss_increase(const f_array_length_t step, f_uint16ss_t *uint16ss) {
#ifndef _di_level_0_parameter_checking_
- if (!step) return F_status_set_error(F_parameter);
if (!uint16ss) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- if (uint16ss->used + 1 > uint16ss->size) {
+ if (step && uint16ss->used + 1 > uint16ss->size) {
f_array_length_t size = uint16ss->used + step;
if (size > F_array_length_t_size_d) {
#ifndef _di_f_uint16ss_increase_by_
f_status_t f_uint16ss_increase_by(const f_array_length_t amount, f_uint16ss_t *uint16ss) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!uint16ss) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (uint16ss->used + amount > uint16ss->size) {
if (uint16ss->used + amount > F_array_length_t_size_d) {
return F_status_set_error(F_array_too_large);
*
* @return
* F_none on success.
+ * F_data_not if amount is 0.
*
* F_parameter (with error bit) if a parameter is invalid.
*
*
* @return
* F_none on success.
+ * F_data_not if amount is 0.
*
* F_parameter (with error bit) if a parameter is invalid.
*
*
* @return
* F_none on success.
+ * F_data_not if amount is 0.
*
* F_parameter (with error bit) if a parameter is invalid.
*
*
* @return
* F_none on success.
+ * F_data_not if amount is 0.
*
* F_parameter (with error bit) if a parameter is invalid.
*
*
* @return
* F_none on success.
+ * F_data_not if amount is 0.
*
* F_parameter (with error bit) if a parameter is invalid.
*
*
* @return
* F_none on success.
+ * F_data_not if amount is 0.
*
* F_parameter (with error bit) if a parameter is invalid.
*
#ifndef _di_f_int32s_decimate_by_
f_status_t f_int32s_decimate_by(const f_array_length_t amount, f_int32s_t *int32s) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!int32s) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (int32s->size - amount > 0) {
return private_f_int32s_adjust(int32s->size - amount, int32s);
}
#ifndef _di_f_int32s_decrease_by_
f_status_t f_int32s_decrease_by(const f_array_length_t amount, f_int32s_t *int32s) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!int32s) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (int32s->size - amount > 0) {
return private_f_int32s_resize(int32s->size - amount, int32s);
}
#ifndef _di_f_int32s_increase_
f_status_t f_int32s_increase(const f_array_length_t step, f_int32s_t *int32s) {
#ifndef _di_level_0_parameter_checking_
- if (!step) return F_status_set_error(F_parameter);
if (!int32s) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- if (int32s->used + 1 > int32s->size) {
+ if (step && int32s->used + 1 > int32s->size) {
f_array_length_t size = int32s->used + step;
if (size > F_array_length_t_size_d) {
#ifndef _di_f_int32s_increase_by_
f_status_t f_int32s_increase_by(const f_array_length_t amount, f_int32s_t *int32s) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!int32s) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (int32s->used + amount > int32s->size) {
if (int32s->used + amount > F_array_length_t_size_d) {
return F_status_set_error(F_array_too_large);
#ifndef _di_f_int32ss_decimate_by_
f_status_t f_int32ss_decimate_by(const f_array_length_t amount, f_int32ss_t *int32ss) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!int32ss) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (int32ss->size - amount > 0) {
return private_f_int32ss_adjust(int32ss->size - amount, int32ss);
}
#ifndef _di_f_int32ss_decrease_by_
f_status_t f_int32ss_decrease_by(const f_array_length_t amount, f_int32ss_t *int32ss) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!int32ss) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (int32ss->size - amount > 0) {
return private_f_int32ss_resize(int32ss->size - amount, int32ss);
}
#ifndef _di_f_int32ss_increase_
f_status_t f_int32ss_increase(const f_array_length_t step, f_int32ss_t *int32ss) {
#ifndef _di_level_0_parameter_checking_
- if (!step) return F_status_set_error(F_parameter);
if (!int32ss) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- if (int32ss->used + 1 > int32ss->size) {
+ if (step && int32ss->used + 1 > int32ss->size) {
f_array_length_t size = int32ss->used + step;
if (size > F_array_length_t_size_d) {
#ifndef _di_f_int32ss_increase_by_
f_status_t f_int32ss_increase_by(const f_array_length_t amount, f_int32ss_t *int32ss) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!int32ss) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (int32ss->used + amount > int32ss->size) {
if (int32ss->used + amount > F_array_length_t_size_d) {
return F_status_set_error(F_array_too_large);
#ifndef _di_f_uint32s_decimate_by_
f_status_t f_uint32s_decimate_by(const f_array_length_t amount, f_uint32s_t *uint32s) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!uint32s) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (uint32s->size - amount > 0) {
return private_f_uint32s_adjust(uint32s->size - amount, uint32s);
}
#ifndef _di_f_uint32s_decrease_by_
f_status_t f_uint32s_decrease_by(const f_array_length_t amount, f_uint32s_t *uint32s) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!uint32s) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (uint32s->size - amount > 0) {
return private_f_uint32s_resize(uint32s->size - amount, uint32s);
}
#ifndef _di_f_uint32s_increase_
f_status_t f_uint32s_increase(const f_array_length_t step, f_uint32s_t *uint32s) {
#ifndef _di_level_0_parameter_checking_
- if (!step) return F_status_set_error(F_parameter);
if (!uint32s) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- if (uint32s->used + 1 > uint32s->size) {
+ if (step && uint32s->used + 1 > uint32s->size) {
f_array_length_t size = uint32s->used + step;
if (size > F_array_length_t_size_d) {
#ifndef _di_f_uint32s_increase_by_
f_status_t f_uint32s_increase_by(const f_array_length_t amount, f_uint32s_t *uint32s) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!uint32s) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (uint32s->used + amount > uint32s->size) {
if (uint32s->used + amount > F_array_length_t_size_d) {
return F_status_set_error(F_array_too_large);
#ifndef _di_f_uint32ss_decimate_by_
f_status_t f_uint32ss_decimate_by(const f_array_length_t amount, f_uint32ss_t *uint32ss) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!uint32ss) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (uint32ss->size - amount > 0) {
return private_f_uint32ss_adjust(uint32ss->size - amount, uint32ss);
}
#ifndef _di_f_uint32ss_decrease_by_
f_status_t f_uint32ss_decrease_by(const f_array_length_t amount, f_uint32ss_t *uint32ss) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!uint32ss) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (uint32ss->size - amount > 0) {
return private_f_uint32ss_resize(uint32ss->size - amount, uint32ss);
}
#ifndef _di_f_uint32ss_increase_
f_status_t f_uint32ss_increase(const f_array_length_t step, f_uint32ss_t *uint32ss) {
#ifndef _di_level_0_parameter_checking_
- if (!step) return F_status_set_error(F_parameter);
if (!uint32ss) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- if (uint32ss->used + 1 > uint32ss->size) {
+ if (step && uint32ss->used + 1 > uint32ss->size) {
f_array_length_t size = uint32ss->used + step;
if (size > F_array_length_t_size_d) {
#ifndef _di_f_uint32ss_increase_by_
f_status_t f_uint32ss_increase_by(const f_array_length_t amount, f_uint32ss_t *uint32ss) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!uint32ss) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (uint32ss->used + amount > uint32ss->size) {
if (uint32ss->used + amount > F_array_length_t_size_d) {
return F_status_set_error(F_array_too_large);
*
* @return
* F_none on success.
+ * F_data_not if amount is 0.
*
* F_parameter (with error bit) if a parameter is invalid.
*
*
* @return
* F_none on success.
+ * F_data_not if amount is 0.
*
* F_parameter (with error bit) if a parameter is invalid.
*
*
* @return
* F_none on success.
+ * F_data_not if amount is 0.
*
* F_parameter (with error bit) if a parameter is invalid.
*
*
* @return
* F_none on success.
+ * F_data_not if amount is 0.
*
* F_parameter (with error bit) if a parameter is invalid.
*
#ifndef _di_f_int64s_decimate_by_
f_status_t f_int64s_decimate_by(const f_array_length_t amount, f_int64s_t *int64s) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!int64s) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (int64s->size - amount > 0) {
return private_f_int64s_adjust(int64s->size - amount, int64s);
}
#ifndef _di_f_int64s_decrease_by_
f_status_t f_int64s_decrease_by(const f_array_length_t amount, f_int64s_t *int64s) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!int64s) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (int64s->size - amount > 0) {
return private_f_int64s_resize(int64s->size - amount, int64s);
}
#ifndef _di_f_int64s_increase_
f_status_t f_int64s_increase(const f_array_length_t step, f_int64s_t *int64s) {
#ifndef _di_level_0_parameter_checking_
- if (!step) return F_status_set_error(F_parameter);
if (!int64s) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- if (int64s->used + 1 > int64s->size) {
+ if (step && int64s->used + 1 > int64s->size) {
f_array_length_t size = int64s->used + step;
if (size > F_array_length_t_size_d) {
#ifndef _di_f_int64s_increase_by_
f_status_t f_int64s_increase_by(const f_array_length_t amount, f_int64s_t *int64s) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!int64s) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (int64s->used + amount > int64s->size) {
if (int64s->used + amount > F_array_length_t_size_d) {
return F_status_set_error(F_array_too_large);
#ifndef _di_f_int64ss_decimate_by_
f_status_t f_int64ss_decimate_by(const f_array_length_t amount, f_int64ss_t *int64ss) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!int64ss) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (int64ss->size - amount > 0) {
return private_f_int64ss_adjust(int64ss->size - amount, int64ss);
}
#ifndef _di_f_int64ss_decrease_by_
f_status_t f_int64ss_decrease_by(const f_array_length_t amount, f_int64ss_t *int64ss) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!int64ss) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (int64ss->size - amount > 0) {
return private_f_int64ss_resize(int64ss->size - amount, int64ss);
}
#ifndef _di_f_int64ss_increase_
f_status_t f_int64ss_increase(const f_array_length_t step, f_int64ss_t *int64ss) {
#ifndef _di_level_0_parameter_checking_
- if (!step) return F_status_set_error(F_parameter);
if (!int64ss) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- if (int64ss->used + 1 > int64ss->size) {
+ if (step && int64ss->used + 1 > int64ss->size) {
f_array_length_t size = int64ss->used + step;
if (size > F_array_length_t_size_d) {
#ifndef _di_f_int64ss_increase_by_
f_status_t f_int64ss_increase_by(const f_array_length_t amount, f_int64ss_t *int64ss) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!int64ss) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (int64ss->used + amount > int64ss->size) {
if (int64ss->used + amount > F_array_length_t_size_d) {
return F_status_set_error(F_array_too_large);
#ifndef _di_f_uint64s_decimate_by_
f_status_t f_uint64s_decimate_by(const f_array_length_t amount, f_uint64s_t *uint64s) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!uint64s) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (uint64s->size - amount > 0) {
return private_f_uint64s_adjust(uint64s->size - amount, uint64s);
}
#ifndef _di_f_uint64s_decrease_by_
f_status_t f_uint64s_decrease_by(const f_array_length_t amount, f_uint64s_t *uint64s) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!uint64s) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (uint64s->size - amount > 0) {
return private_f_uint64s_resize(uint64s->size - amount, uint64s);
}
#ifndef _di_f_uint64s_increase_
f_status_t f_uint64s_increase(const f_array_length_t step, f_uint64s_t *uint64s) {
#ifndef _di_level_0_parameter_checking_
- if (!step) return F_status_set_error(F_parameter);
if (!uint64s) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- if (uint64s->used + 1 > uint64s->size) {
+ if (step && uint64s->used + 1 > uint64s->size) {
f_array_length_t size = uint64s->used + step;
if (size > F_array_length_t_size_d) {
#ifndef _di_f_uint64s_increase_by_
f_status_t f_uint64s_increase_by(const f_array_length_t amount, f_uint64s_t *uint64s) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!uint64s) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (uint64s->used + amount > uint64s->size) {
if (uint64s->used + amount > F_array_length_t_size_d) {
return F_status_set_error(F_array_too_large);
#ifndef _di_f_uint64ss_decimate_by_
f_status_t f_uint64ss_decimate_by(const f_array_length_t amount, f_uint64ss_t *uint64ss) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!uint64ss) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (uint64ss->size - amount > 0) {
return private_f_uint64ss_adjust(uint64ss->size - amount, uint64ss);
}
#ifndef _di_f_uint64ss_decrease_by_
f_status_t f_uint64ss_decrease_by(const f_array_length_t amount, f_uint64ss_t *uint64ss) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!uint64ss) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (uint64ss->size - amount > 0) {
return private_f_uint64ss_resize(uint64ss->size - amount, uint64ss);
}
#ifndef _di_f_uint64ss_increase_
f_status_t f_uint64ss_increase(const f_array_length_t step, f_uint64ss_t *uint64ss) {
#ifndef _di_level_0_parameter_checking_
- if (!step) return F_status_set_error(F_parameter);
if (!uint64ss) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- if (uint64ss->used + 1 > uint64ss->size) {
+ if (step && uint64ss->used + 1 > uint64ss->size) {
f_array_length_t size = uint64ss->used + step;
if (size > F_array_length_t_size_d) {
#ifndef _di_f_uint64ss_increase_by_
f_status_t f_uint64ss_increase_by(const f_array_length_t amount, f_uint64ss_t *uint64ss) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!uint64ss) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (uint64ss->used + amount > uint64ss->size) {
if (uint64ss->used + amount > F_array_length_t_size_d) {
return F_status_set_error(F_array_too_large);
*
* @return
* F_none on success.
+ * F_data_not if amount is 0.
*
* F_parameter (with error bit) if a parameter is invalid.
*
*
* @return
* F_none on success.
+ * F_data_not if amount is 0.
*
* F_parameter (with error bit) if a parameter is invalid.
*
*
* @return
* F_none on success.
+ * F_data_not if amount is 0.
*
* F_parameter (with error bit) if a parameter is invalid.
*
*
* @return
* F_none on success.
+ * F_data_not if amount is 0.
*
* F_parameter (with error bit) if a parameter is invalid.
*
*
* @return
* F_none on success.
+ * F_data_not if amount is 0.
*
* F_parameter (with error bit) if a parameter is invalid.
*
*
* @return
* F_none on success.
+ * F_data_not if amount is 0.
*
* F_parameter (with error bit) if a parameter is invalid.
*
*
* @return
* F_none on success.
+ * F_data_not if amount is 0.
*
* F_parameter (with error bit) if a parameter is invalid.
*
*
* @return
* F_none on success.
+ * F_data_not if amount is 0.
*
* F_parameter (with error bit) if a parameter is invalid.
*
#ifndef _di_f_int8s_decimate_by_
f_status_t f_int8s_decimate_by(const f_array_length_t amount, f_int8s_t *int8s) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!int8s) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (int8s->size - amount > 0) {
return private_f_int8s_adjust(int8s->size - amount, int8s);
}
#ifndef _di_f_int8s_decrease_by_
f_status_t f_int8s_decrease_by(const f_array_length_t amount, f_int8s_t *int8s) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!int8s) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (int8s->size - amount > 0) {
return private_f_int8s_resize(int8s->size - amount, int8s);
}
#ifndef _di_f_int8s_increase_
f_status_t f_int8s_increase(const f_array_length_t step, f_int8s_t *int8s) {
#ifndef _di_level_0_parameter_checking_
- if (!step) return F_status_set_error(F_parameter);
if (!int8s) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- if (int8s->used + 1 > int8s->size) {
+ if (step && int8s->used + 1 > int8s->size) {
f_array_length_t size = int8s->used + step;
if (size > F_array_length_t_size_d) {
#ifndef _di_f_int8s_increase_by_
f_status_t f_int8s_increase_by(const f_array_length_t amount, f_int8s_t *int8s) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!int8s) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (int8s->used + amount > int8s->size) {
if (int8s->used + amount > F_array_length_t_size_d) {
return F_status_set_error(F_array_too_large);
#ifndef _di_f_int8ss_decimate_by_
f_status_t f_int8ss_decimate_by(const f_array_length_t amount, f_int8ss_t *int8ss) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!int8ss) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (int8ss->size - amount > 0) {
return private_f_int8ss_adjust(int8ss->size - amount, int8ss);
}
#ifndef _di_f_int8ss_decrease_by_
f_status_t f_int8ss_decrease_by(const f_array_length_t amount, f_int8ss_t *int8ss) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!int8ss) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (int8ss->size - amount > 0) {
return private_f_int8ss_resize(int8ss->size - amount, int8ss);
}
#ifndef _di_f_int8ss_increase_
f_status_t f_int8ss_increase(const f_array_length_t step, f_int8ss_t *int8ss) {
#ifndef _di_level_0_parameter_checking_
- if (!step) return F_status_set_error(F_parameter);
if (!int8ss) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- if (int8ss->used + 1 > int8ss->size) {
+ if (step && int8ss->used + 1 > int8ss->size) {
f_array_length_t size = int8ss->used + step;
if (size > F_array_length_t_size_d) {
#ifndef _di_f_int8ss_increase_by_
f_status_t f_int8ss_increase_by(const f_array_length_t amount, f_int8ss_t *int8ss) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!int8ss) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (int8ss->used + amount > int8ss->size) {
if (int8ss->used + amount > F_array_length_t_size_d) {
return F_status_set_error(F_array_too_large);
#ifndef _di_f_uint8s_decimate_by_
f_status_t f_uint8s_decimate_by(const f_array_length_t amount, f_uint8s_t *uint8s) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!uint8s) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (uint8s->size - amount > 0) {
return private_f_uint8s_adjust(uint8s->size - amount, uint8s);
}
#ifndef _di_f_uint8s_decrease_by_
f_status_t f_uint8s_decrease_by(const f_array_length_t amount, f_uint8s_t *uint8s) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!uint8s) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (uint8s->size - amount > 0) {
return private_f_uint8s_resize(uint8s->size - amount, uint8s);
}
#ifndef _di_f_uint8s_increase_
f_status_t f_uint8s_increase(const f_array_length_t step, f_uint8s_t *uint8s) {
#ifndef _di_level_0_parameter_checking_
- if (!step) return F_status_set_error(F_parameter);
if (!uint8s) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- if (uint8s->used + 1 > uint8s->size) {
+ if (step && uint8s->used + 1 > uint8s->size) {
f_array_length_t size = uint8s->used + step;
if (size > F_array_length_t_size_d) {
#ifndef _di_f_uint8s_increase_by_
f_status_t f_uint8s_increase_by(const f_array_length_t amount, f_uint8s_t *uint8s) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!uint8s) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (uint8s->used + amount > uint8s->size) {
if (uint8s->used + amount > F_array_length_t_size_d) {
return F_status_set_error(F_array_too_large);
#ifndef _di_f_uint8ss_decimate_by_
f_status_t f_uint8ss_decimate_by(const f_array_length_t amount, f_uint8ss_t *uint8ss) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!uint8ss) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (uint8ss->size - amount > 0) {
return private_f_uint8ss_adjust(uint8ss->size - amount, uint8ss);
}
#ifndef _di_f_uint8ss_decrease_by_
f_status_t f_uint8ss_decrease_by(const f_array_length_t amount, f_uint8ss_t *uint8ss) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!uint8ss) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (uint8ss->size - amount > 0) {
return private_f_uint8ss_resize(uint8ss->size - amount, uint8ss);
}
#ifndef _di_f_uint8ss_increase_
f_status_t f_uint8ss_increase(const f_array_length_t step, f_uint8ss_t *uint8ss) {
#ifndef _di_level_0_parameter_checking_
- if (!step) return F_status_set_error(F_parameter);
if (!uint8ss) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- if (uint8ss->used + 1 > uint8ss->size) {
+ if (step && uint8ss->used + 1 > uint8ss->size) {
f_array_length_t size = uint8ss->used + step;
if (size > F_array_length_t_size_d) {
#ifndef _di_f_uint8ss_increase_by_
f_status_t f_uint8ss_increase_by(const f_array_length_t amount, f_uint8ss_t *uint8ss) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!uint8ss) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (uint8ss->used + amount > uint8ss->size) {
if (uint8ss->used + amount > F_array_length_t_size_d) {
return F_status_set_error(F_array_too_large);
*
* @return
* F_none on success.
+ * F_data_not if amount is 0.
*
* F_parameter (with error bit) if a parameter is invalid.
*
*
* @return
* F_none on success.
+ * F_data_not if amount is 0.
*
* F_parameter (with error bit) if a parameter is invalid.
*
*
* @return
* F_none on success.
+ * F_data_not if amount is 0.
*
* F_parameter (with error bit) if a parameter is invalid.
*
*
* @return
* F_none on success.
+ * F_data_not if amount is 0.
*
* F_parameter (with error bit) if a parameter is invalid.
*
*
* @return
* F_none on success.
+ * F_data_not if amount is 0.
*
* F_parameter (with error bit) if a parameter is invalid.
*
*
* @return
* F_none on success.
+ * F_data_not if amount is 0.
*
* F_parameter (with error bit) if a parameter is invalid.
*
*
* @return
* F_none on success.
+ * F_data_not if amount is 0.
*
* F_parameter (with error bit) if a parameter is invalid.
*
*
* @return
* F_none on success.
+ * F_data_not if amount is 0.
*
* F_parameter (with error bit) if a parameter is invalid.
*
#ifndef _di_f_states_decimate_by_
f_status_t f_states_decimate_by(const f_array_length_t amount, f_states_t *states) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!states) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (states->size - amount > 0) {
return private_f_states_adjust(states->size - amount, states);
}
#ifndef _di_f_states_decrease_by_
f_status_t f_states_decrease_by(const f_array_length_t amount, f_states_t *states) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!states) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (states->size - amount > 0) {
return private_f_states_resize(states->size - amount, states);
}
#ifndef _di_f_states_increase_
f_status_t f_states_increase(const f_array_length_t step, f_states_t *states) {
#ifndef _di_level_0_parameter_checking_
- if (!step) return F_status_set_error(F_parameter);
if (!states) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- if (states->used + 1 > states->size) {
+ if (step && states->used + 1 > states->size) {
f_array_length_t size = states->used + step;
if (size > F_array_length_t_size_d) {
#ifndef _di_f_states_increase_by_
f_status_t f_states_increase_by(const f_array_length_t amount, f_states_t *states) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!states) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (states->used + amount > states->size) {
if (states->used + amount > F_array_length_t_size_d) {
return F_status_set_error(F_array_too_large);
#ifndef _di_f_statess_decimate_by_
f_status_t f_statess_decimate_by(const f_array_length_t amount, f_statess_t *statess) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!statess) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (statess->size - amount > 0) {
return private_f_statess_adjust(statess->size - amount, statess);
}
#ifndef _di_f_statess_decrease_by_
f_status_t f_statess_decrease_by(const f_array_length_t amount, f_statess_t *statess) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!statess) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (statess->size - amount > 0) {
return private_f_statess_resize(statess->size - amount, statess);
}
#ifndef _di_f_statess_increase_
f_status_t f_statess_increase(const f_array_length_t step, f_statess_t *statess) {
#ifndef _di_level_0_parameter_checking_
- if (!step) return F_status_set_error(F_parameter);
if (!statess) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- if (statess->used + 1 > statess->size) {
+ if (step && statess->used + 1 > statess->size) {
f_array_length_t size = statess->used + step;
if (size > F_array_length_t_size_d) {
#ifndef _di_f_statess_increase_by_
f_status_t f_statess_increase_by(const f_array_length_t amount, f_statess_t *statess) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!statess) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (statess->used + amount > statess->size) {
if (statess->used + amount > F_array_length_t_size_d) {
return F_status_set_error(F_array_too_large);
*
* @return
* F_none on success.
+ * F_data_not if amount is 0.
*
* F_parameter (with error bit) if a parameter is invalid.
*
*
* @return
* F_none on success.
+ * F_data_not if amount is 0.
*
* F_parameter (with error bit) if a parameter is invalid.
*
*
* @return
* F_none on success.
+ * F_data_not if amount is 0.
*
* F_parameter (with error bit) if a parameter is invalid.
*
*
* @return
* F_none on success.
+ * F_data_not if amount is 0.
*
* F_parameter (with error bit) if a parameter is invalid.
*
#ifndef _di_f_statuss_decimate_by_
f_status_t f_statuss_decimate_by(const f_array_length_t amount, f_statuss_t *statuss) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!statuss) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (statuss->size - amount > 0) {
return private_f_statuss_adjust(statuss->size - amount, statuss);
}
#ifndef _di_f_statuss_decrease_by_
f_status_t f_statuss_decrease_by(const f_array_length_t amount, f_statuss_t *statuss) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!statuss) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (statuss->size - amount > 0) {
return private_f_statuss_resize(statuss->size - amount, statuss);
}
#ifndef _di_f_statuss_increase_
f_status_t f_statuss_increase(const f_array_length_t step, f_statuss_t *statuss) {
#ifndef _di_level_0_parameter_checking_
- if (!step) return F_status_set_error(F_parameter);
if (!statuss) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- if (statuss->used + 1 > statuss->size) {
+ if (step && statuss->used + 1 > statuss->size) {
f_array_length_t size = statuss->used + step;
if (size > F_array_length_t_size_d) {
#ifndef _di_f_statuss_increase_by_
f_status_t f_statuss_increase_by(const f_array_length_t amount, f_statuss_t *statuss) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!statuss) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (statuss->used + amount > statuss->size) {
if (statuss->used + amount > F_array_length_t_size_d) {
return F_status_set_error(F_array_too_large);
#ifndef _di_f_statusss_decimate_by_
f_status_t f_statusss_decimate_by(const f_array_length_t amount, f_statusss_t *statusss) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!statusss) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (statusss->size - amount > 0) {
return private_f_statusss_adjust(statusss->size - amount, statusss);
}
#ifndef _di_f_statusss_decrease_by_
f_status_t f_statusss_decrease_by(const f_array_length_t amount, f_statusss_t *statusss) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!statusss) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (statusss->size - amount > 0) {
return private_f_statusss_resize(statusss->size - amount, statusss);
}
#ifndef _di_f_statusss_increase_
f_status_t f_statusss_increase(const f_array_length_t step, f_statusss_t *statusss) {
#ifndef _di_level_0_parameter_checking_
- if (!step) return F_status_set_error(F_parameter);
if (!statusss) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- if (statusss->used + 1 > statusss->size) {
+ if (step && statusss->used + 1 > statusss->size) {
f_array_length_t size = statusss->used + step;
if (size > F_array_length_t_size_d) {
#ifndef _di_f_statusss_increase_by_
f_status_t f_statusss_increase_by(const f_array_length_t amount, f_statusss_t *statusss) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!statusss) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (statusss->used + amount > statusss->size) {
if (statusss->used + amount > F_array_length_t_size_d) {
return F_status_set_error(F_array_too_large);
*
* @return
* F_none on success.
+ * F_data_not if amount is 0.
*
* F_parameter (with error bit) if a parameter is invalid.
*
*
* @return
* F_none on success.
+ * F_data_not if amount is 0.
*
* F_parameter (with error bit) if a parameter is invalid.
*
*
* @return
* F_none on success.
+ * F_data_not if amount is 0.
*
* F_parameter (with error bit) if a parameter is invalid.
*
*
* @return
* F_none on success.
+ * F_data_not if amount is 0.
*
* F_parameter (with error bit) if a parameter is invalid.
*
*
* @return
* F_none on success.
- * F_data_not on success, but there is no reason to increase size (size == 0).
+ * F_data_not if amount is 0.
*
* F_parameter (with error bit) if a parameter is invalid.
*
*
* @return
* F_none on success.
- * F_data_not on success, but there is no reason to increase size (size == 0).
+ * F_data_not if amount is 0.
*
* F_parameter (with error bit) if a parameter is invalid.
*
*
* @return
* F_none on success.
+ * F_data_not if amount is 0.
*
* F_parameter (with error bit) if a parameter is invalid.
*
*
* @return
* F_none on success.
+ * F_data_not if amount is 0.
*
* F_parameter (with error bit) if a parameter is invalid.
*
*
* @return
* F_none on success.
+ * F_data_not if amount is 0.
*
* F_parameter (with error bit) if a parameter is invalid.
*
*
* @return
* F_none on success.
+ * F_data_not if amount is 0.
*
* F_parameter (with error bit) if a parameter is invalid.
*
#ifndef _di_f_utf_string_triples_decimate_by_
f_status_t f_utf_string_triples_decimate_by(const f_array_length_t amount, f_utf_string_triples_t *triples) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!triples) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (triples->size - amount > 0) {
return private_f_utf_string_triples_adjust(triples->size - amount, triples);
}
#ifndef _di_f_utf_string_triples_decrease_by_
f_status_t f_utf_string_triples_decrease_by(const f_array_length_t amount, f_utf_string_triples_t *triples) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!triples) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (triples->size - amount > 0) {
return private_f_utf_string_triples_resize(triples->size - amount, triples);
}
#ifndef _di_f_utf_string_triples_increase_
f_status_t f_utf_string_triples_increase(const f_array_length_t step, f_utf_string_triples_t *triples) {
#ifndef _di_level_0_parameter_checking_
- if (!step) return F_status_set_error(F_parameter);
if (!triples) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- if (triples->used + 1 > triples->size) {
+ if (step && triples->used + 1 > triples->size) {
f_array_length_t size = triples->used + step;
if (size > F_array_length_t_size_d) {
#ifndef _di_f_utf_string_triples_increase_by_
f_status_t f_utf_string_triples_increase_by(const f_array_length_t amount, f_utf_string_triples_t *triples) {
#ifndef _di_level_0_parameter_checking_
- if (!amount) return F_status_set_error(F_parameter);
if (!triples) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!amount) {
+ return F_data_not;
+ }
+
if (triples->used + amount > triples->size) {
if (triples->used + amount > F_array_length_t_size_d) {
return F_status_set_error(F_array_too_large);
*
* @return
* F_none on success.
+ * F_data_not if amount is 0.
*
* F_parameter (with error bit) if a parameter is invalid.
*
*
* @return
* F_none on success.
+ * F_data_not if amount is 0.
*
* F_parameter (with error bit) if a parameter is invalid.
*