The f_string_length_t, f_string_lengths_t, etc.. types are somewhat redundant.
Simplify the code (reducing binary size as well) and just stick with the f_array_length_t types.
Miscellaneous documentation cleanups.
return F_exist_not;
}
- const f_string_length_t name_length = strnlen(password.pw_name, length);
+ const f_array_length_t name_length = strnlen(password.pw_name, length);
f_macro_string_dynamic_t_resize(status, (*name), name_length + 1);
if (F_status_is_error(status)) return status;
return F_exist_not;
}
- const f_string_length_t name_length = strnlen(password.pw_name, length);
+ const f_array_length_t name_length = strnlen(password.pw_name, length);
f_macro_string_dynamic_t_resize(status, (*name), name_length + 1);
if (F_status_is_error(status)) return status;
#endif
#if !defined(_di_f_account_by_name_) || !defined(_di_f_account_by_id_)
- f_status_t private_f_account_from_passwd(const struct passwd password, const f_string_length_t password_length, f_account_t *account) {
+ f_status_t private_f_account_from_passwd(const struct passwd password, const f_array_length_t password_length, f_account_t *account) {
f_status_t status = F_none;
// account home directory.
- f_string_length_t string_length = strnlen(password.pw_dir, password_length);
+ f_array_length_t string_length = strnlen(password.pw_dir, password_length);
f_macro_string_dynamic_t_resize(status, account->home, string_length + 1);
if (F_status_is_error(status)) return status;
* @see f_macro_string_dynamic_t_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_string_length_t password_length, f_account_t *account) f_gcc_attribute_visibility_internal;
+ extern f_status_t private_f_account_from_passwd(const struct passwd password, const f_array_length_t password_length, f_account_t *account) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_f_account_by_name_) || !defined(_di_f_account_by_id_)
#ifdef __cplusplus
char *result = cap_to_name(code);
if (result) {
- const f_string_length_t length = strlen(result);
+ const f_array_length_t length = strlen(result);
f_status_t status = F_none;
if (name->used + length + 1 > name->size) {
- if (name->used + length + 1 > f_string_length_t_size) {
+ if (name->used + length + 1 > f_array_length_t_size) {
return F_status_set_error(F_string_too_large);
}
if (!text) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- f_string_length_t length = 0;
+ f_array_length_t length = 0;
char *result = cap_to_text(capability, &length);
f_status_t status = F_none;
if (text->used + length + 1> text->size) {
- if (text->used + length + 1 > f_string_length_t_size) {
+ if (text->used + length + 1 > f_array_length_t_size) {
return F_status_set_error(F_string_too_large);
}
#endif // _di_f_console_standard_s_
/**
- * The maximum size for a single parameter.
+ * The maximum size for a single parameter (the length of the string representing the parameter).
*/
#ifndef _di_f_console_length_size_
- #define f_console_length_size f_string_length_t_size
+ #define f_console_parameter_size f_array_length_t_size
#endif // _di_f_console_length_size_
/**
f_array_length_t result;
f_array_length_t location;
- f_string_length_t location_sub;
+ f_array_length_t location_sub;
f_array_lengths_t locations;
f_array_lengths_t locations_sub;
f_array_lengths_t values;
if (!result) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_f
- const f_string_length_t length = strnlen(input, 3);
+ const f_array_length_t length = strnlen(input, 3);
if (!length) {
*result = f_console_none;
#endif // _di_f_console_identify_
#ifndef _di_f_console_parameter_process_
- f_status_t f_console_parameter_process(const f_console_arguments_t arguments, f_console_parameters_t parameters, f_string_lengths_t *remaining) {
+ f_status_t f_console_parameter_process(const f_console_arguments_t arguments, f_console_parameters_t parameters, f_array_lengths_t *remaining) {
#ifndef _di_level_0_parameter_checking_
if (!remaining) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
unsigned long location = 1; // Parameter 0 represents the program name so skip it.
- f_string_length_t sub_location = 0;
- f_string_length_t increment_by = 0;
- f_string_length_t argument_length = 0;
+ f_array_length_t sub_location = 0;
+ f_array_length_t increment_by = 0;
+ f_array_length_t argument_length = 0;
f_array_length_t i = 0;
f_array_length_t values = 0;
uint8_t console_long = f_console_none;
uint8_t console_type = f_console_type_normal;
- f_string_lengths_t needs_value = f_string_lengths_t_initialize;
+ f_array_lengths_t needs_value = f_array_lengths_t_initialize;
uint8_t width = 0;
f_macro_array_lengths_t_increase(status, parameters.parameter[i].values)
if (F_status_is_error(status)) {
- f_macro_string_lengths_t_delete_simple(needs_value);
+ f_macro_array_lengths_t_delete_simple(needs_value);
return status;
}
needs_value.used--;
// Pop the matched parameter off of the top of the needs_value array.
- for (f_string_length_t i = 0; i < needs_value.used; ++i) {
+ for (f_array_length_t i = 0; i < needs_value.used; ++i) {
needs_value.array[i] = needs_value.array[i + 1];
} // for
f_console_identify(arguments.argv[location], &result);
- argument_length = strnlen(arguments.argv[location], f_console_length_size);
+ argument_length = strnlen(arguments.argv[location], f_console_parameter_size);
// process the current parameter.
if (result == f_console_short_enable || result == f_console_short_disable) {
status = f_utf_char_to_character(arguments.argv[location] + sub_location, width_max, &character_argument_utf);
if (F_status_is_error(status)) {
- f_macro_string_lengths_t_delete_simple(needs_value);
+ f_macro_array_lengths_t_delete_simple(needs_value);
return status;
}
status = f_utf_char_to_character((f_string_t) parameters.parameter[i].symbol_short, width_max, &character_console_utf);
if (F_status_is_error(status)) {
- f_macro_string_lengths_t_delete_simple(needs_value);
+ f_macro_array_lengths_t_delete_simple(needs_value);
return status;
}
continue;
}
- f_macro_string_lengths_t_increase(status, parameters.parameter[i].locations)
+ f_macro_array_lengths_t_increase(status, parameters.parameter[i].locations)
if (F_status_is_error(status)) {
- f_macro_string_lengths_t_delete_simple(needs_value);
+ f_macro_array_lengths_t_delete_simple(needs_value);
return status;
}
- f_macro_string_lengths_t_increase(status, parameters.parameter[i].locations_sub)
+ f_macro_array_lengths_t_increase(status, parameters.parameter[i].locations_sub)
if (F_status_is_error(status)) {
- f_macro_string_lengths_t_delete_simple(needs_value);
+ f_macro_array_lengths_t_delete_simple(needs_value);
return status;
}
if (parameters.parameter[i].has_values) {
if (needs_value.used + parameters.parameter[i].has_values > needs_value.size) {
- f_macro_string_lengths_t_resize(status, needs_value, needs_value.used + parameters.parameter[i].has_values);
+ f_macro_array_lengths_t_resize(status, needs_value, needs_value.used + parameters.parameter[i].has_values);
if (F_status_is_error(status)) {
- f_macro_string_lengths_t_delete_simple(needs_value);
+ f_macro_array_lengths_t_delete_simple(needs_value);
return status;
}
}
if (strncmp(arguments.argv[location], parameters.parameter[i].symbol_other, argument_length + 1) != 0) continue;
- f_macro_string_lengths_t_increase(status, parameters.parameter[i].locations)
+ f_macro_array_lengths_t_increase(status, parameters.parameter[i].locations)
if (F_status_is_error(status)) {
- f_macro_string_lengths_t_delete_simple(needs_value);
+ f_macro_array_lengths_t_delete_simple(needs_value);
return status;
}
- f_macro_string_lengths_t_increase(status, parameters.parameter[i].locations_sub)
+ f_macro_array_lengths_t_increase(status, parameters.parameter[i].locations_sub)
if (F_status_is_error(status)) {
- f_macro_string_lengths_t_delete_simple(needs_value);
+ f_macro_array_lengths_t_delete_simple(needs_value);
return status;
}
if (parameters.parameter[i].has_values) {
if (needs_value.used + parameters.parameter[i].has_values > needs_value.size) {
- f_macro_string_lengths_t_resize(status, needs_value, needs_value.used + parameters.parameter[i].has_values);
+ f_macro_array_lengths_t_resize(status, needs_value, needs_value.used + parameters.parameter[i].has_values);
if (F_status_is_error(status)) {
- f_macro_string_lengths_t_delete_simple(needs_value);
+ f_macro_array_lengths_t_delete_simple(needs_value);
return status;
}
}
// populate list of remaining parameters.parameter not associated with anything.
if (remaining->used == remaining->size) {
- f_macro_memory_structure_macro_increment(status, (*remaining), 1, f_memory_default_allocation_step, f_macro_string_lengths_t_resize, F_array_too_large);
+ f_macro_memory_structure_macro_increment(status, (*remaining), 1, f_memory_default_allocation_step, f_macro_array_lengths_t_resize, F_array_too_large);
if (F_status_is_error(status)) {
- f_macro_string_lengths_t_delete_simple(needs_value);
+ f_macro_array_lengths_t_delete_simple(needs_value);
return status;
}
}
status = F_none;
}
- f_macro_string_lengths_t_delete_simple(needs_value);
+ f_macro_array_lengths_t_delete_simple(needs_value);
return status;
}
* F_utf (with error bit) if character is an invalid UTF-8 character, when processing arguments.
*/
#ifndef _di_f_console_parameter_process_
- extern f_status_t f_console_parameter_process(const f_console_arguments_t arguments, f_console_parameters_t parameters, f_string_lengths_t *remaining);
+ extern f_status_t f_console_parameter_process(const f_console_arguments_t arguments, f_console_parameters_t parameters, f_array_lengths_t *remaining);
#endif // _di_f_console_parameter_process_
/**
negative = F_true;
}
- f_string_length_t total = 0;
+ f_array_length_t total = 0;
for (register f_number_signed_t work = current; work; total++) {
work /= base;
return F_none;
}
- f_string_length_t total = 0;
+ f_array_length_t total = 0;
for (register f_number_unsigned_t work = number; work; total++) {
work /= base;
struct dirent **listing = 0;
size_t i = 0;
- f_string_length_t size = 0;
+ f_array_length_t size = 0;
f_status_t status = F_none;
const size_t length = scandir(path, &listing, filter, sort);
* Environment related defines.
*/
#ifndef _di_f_environment_defines_
- #define f_environment_max_length f_string_length_t_size
+ #define f_environment_max_length f_array_length_t_size
#endif // _di_f_environment_defines_
#ifdef __cplusplus
return F_exist_not;
}
- const f_string_length_t size = strnlen(result, f_environment_max_length);
+ const f_array_length_t size = strnlen(result, f_environment_max_length);
if (size) {
if (value->used + size > f_environment_max_length) {
mode_umask |= f_file_mode_t_block_world & f_file_mode_t_mask_bit_execute;
}
- for (f_string_length_t i = 0; syntax && string[i]; i++) {
+ for (f_array_length_t i = 0; syntax && string[i]; i++) {
if (string[i] == f_string_ascii_o_s[0]) {
on |= 1;
// 1 = add, 2 = replace, 3 = subtract.
uint8_t how = 0;
- f_string_length_t i = 0;
+ f_array_length_t i = 0;
*replace = 0;
}
if (string[i]) {
- f_string_length_t j = 0;
+ f_array_length_t j = 0;
for (; string[i + j] && j < 4; j++) {
#endif // _di_f_file_mode_to_mode_
#ifndef _di_f_file_name_base_
- f_status_t f_file_name_base(const f_string_t path, const f_string_length_t length, f_string_dynamic_t *name_base) {
+ f_status_t f_file_name_base(const f_string_t path, const f_array_length_t length, f_string_dynamic_t *name_base) {
#ifndef _di_level_0_parameter_checking_
if (!path) return F_status_set_error(F_parameter);
if (!name_base) return F_status_set_error(F_parameter);
path_to_name = basename(path_argument);
- f_string_length_t size = strnlen(path_to_name, length);
+ f_array_length_t size = strnlen(path_to_name, length);
if (name_base->used + size > name_base->size) {
- if (name_base->used + size > f_string_length_t_size) {
+ if (name_base->used + size > f_array_length_t_size) {
return F_status_set_error(F_string_too_large);
}
#endif // _di_f_file_name_base_
#ifndef _di_f_file_name_directory_
- f_status_t f_file_name_directory(const f_string_t path, const f_string_length_t length, f_string_dynamic_t *name_directory) {
+ f_status_t f_file_name_directory(const f_string_t path, const f_array_length_t length, f_string_dynamic_t *name_directory) {
#ifndef _di_level_0_parameter_checking_
if (!path) return F_status_set_error(F_parameter);
if (!name_directory) return F_status_set_error(F_parameter);
path_to_name = dirname(path_argument);
- f_string_length_t size = strnlen(path_to_name, length);
+ f_array_length_t size = strnlen(path_to_name, length);
if (name_directory->used + size > name_directory->size) {
- if (name_directory->used + size > f_string_length_t_size) {
+ if (name_directory->used + size > f_array_length_t_size) {
return F_status_set_error(F_string_too_large);
}
for (f_string_t buffer_read = 0; ; ) {
if (buffer->used + file.size_read > buffer->size) {
- if (buffer->size + file.size_read > f_string_length_t_size) {
+ if (buffer->size + file.size_read > f_array_length_t_size) {
return F_status_set_error(F_string_too_large);
}
f_string_t buffer_read = 0;
if (buffer->used + file.size_read > buffer->size) {
- if (buffer->size + file.size_read > f_string_length_t_size) {
+ if (buffer->size + file.size_read > f_array_length_t_size) {
return F_status_set_error(F_string_too_large);
}
#endif // _di_f_file_read_block_
#ifndef _di_f_file_read_until_
- f_status_t f_file_read_until(const f_file_t file, const f_string_length_t total, f_string_dynamic_t *buffer) {
+ f_status_t f_file_read_until(const f_file_t file, const f_array_length_t total, f_string_dynamic_t *buffer) {
#ifndef _di_level_0_parameter_checking_
if (!file.size_read) return F_status_set_error(F_parameter);
if (buffer->used > buffer->size) return F_status_set_error(F_parameter);
if (file.id == -1) return F_status_set_error(F_file_closed);
- f_string_length_t buffer_size = file.size_read;
- f_string_length_t buffer_count = 0;
+ f_array_length_t buffer_size = file.size_read;
+ f_array_length_t buffer_count = 0;
f_status_t status = F_none;
ssize_t size_read = 0;
}
if (buffer->used + buffer_size > buffer->size) {
- if (buffer->size + buffer_size > f_string_length_t_size) {
+ if (buffer->size + buffer_size > f_array_length_t_size) {
return F_status_set_error(F_string_too_large);
}
#endif // _di_f_file_role_change_at_
#ifndef _di_f_file_seek_
- f_status_t f_file_seek(const int id, const int whence, const f_string_length_t offset, f_string_length_t *seeked) {
+ f_status_t f_file_seek(const int id, const int whence, const f_array_length_t offset, f_array_length_t *seeked) {
#ifndef _di_level_0_parameter_checking_
if (id <= 0) return F_status_set_error(F_parameter);
if (whence < 0) return F_status_set_error(F_parameter);
#endif // _di_f_file_seek_
#ifndef _di_f_file_size_
- f_status_t f_file_size(const f_string_t path, const bool dereference, f_string_length_t *size) {
+ f_status_t f_file_size(const f_string_t path, const bool dereference, f_array_length_t *size) {
#ifndef _di_level_0_parameter_checking_
if (!path) return F_status_set_error(F_parameter);
if (!size) return F_status_set_error(F_parameter);
#endif // _di_f_file_size_
#ifndef _di_f_file_size_at_
- f_status_t f_file_size_at(const int at_id, const f_string_t path, const bool dereference, f_string_length_t *size) {
+ f_status_t f_file_size_at(const int at_id, const f_string_t path, const bool dereference, f_array_length_t *size) {
#ifndef _di_level_0_parameter_checking_
if (!path) return F_status_set_error(F_parameter);
if (at_id <= 0) return F_status_set_error(F_parameter);
#endif // _di_f_file_size_at_
#ifndef _di_f_file_size_by_id_
- f_status_t f_file_size_by_id(const int id, f_string_length_t *size) {
+ f_status_t f_file_size_by_id(const int id, f_array_length_t *size) {
#ifndef _di_level_0_parameter_checking_
if (id <= 0) return F_status_set_error(F_parameter);
if (!size) return F_status_set_error(F_parameter);
#endif // _di_f_file_stream_open_
#ifndef _di_f_file_stream_read_
- f_status_t f_file_stream_read(const f_file_t file, const f_string_length_t amount, f_string_dynamic_t *buffer) {
+ f_status_t f_file_stream_read(const f_file_t file, const f_array_length_t amount, f_string_dynamic_t *buffer) {
#ifndef _di_level_0_parameter_checking_
if (!file.size_read) return F_status_set_error(F_parameter);
if (amount < 1) return F_status_set_error(F_parameter);
for (;;) {
if (buffer->used + file.size_read > buffer->size) {
- if (buffer->size + file.size_read > f_string_length_t_size) {
+ if (buffer->size + file.size_read > f_array_length_t_size) {
return F_status_set_error(F_string_too_large);
}
#endif // _di_f_file_stream_read_
#ifndef _di_f_file_stream_read_block_
- f_status_t f_file_stream_read_block(const f_file_t file, const f_string_length_t amount, f_string_dynamic_t *buffer) {
+ f_status_t f_file_stream_read_block(const f_file_t file, const f_array_length_t amount, f_string_dynamic_t *buffer) {
#ifndef _di_level_0_parameter_checking_
if (!file.size_read) return F_status_set_error(F_parameter);
if (amount < 1) return F_status_set_error(F_parameter);
if (!file.stream) return F_status_set_error(F_file_closed);
- const f_string_length_t buffer_size = file.size_read * amount;
+ const f_array_length_t buffer_size = file.size_read * amount;
f_status_t status = F_none;
ssize_t size_read = 0;
if (buffer->used + buffer_size > buffer->size) {
- if (buffer->size + buffer_size > f_string_length_t_size) {
+ if (buffer->size + buffer_size > f_array_length_t_size) {
return F_status_set_error(F_string_too_large);
}
#endif // _di_f_file_stream_read_block_
#ifndef _di_f_file_stream_read_until_
- f_status_t f_file_stream_read_until(const f_file_t file, const f_string_length_t amount, const f_string_length_t total, f_string_dynamic_t *buffer) {
+ f_status_t f_file_stream_read_until(const f_file_t file, const f_array_length_t amount, const f_array_length_t total, f_string_dynamic_t *buffer) {
#ifndef _di_level_0_parameter_checking_
if (!file.size_read) return F_status_set_error(F_parameter);
if (amount < 1) return F_status_set_error(F_parameter);
if (!file.stream) return F_status_set_error(F_file_closed);
- f_string_length_t buffer_size = file.size_read;
- f_string_length_t buffer_count = 0;
+ f_array_length_t buffer_size = file.size_read;
+ f_array_length_t buffer_count = 0;
f_status_t status = F_none;
ssize_t size_read = 0;
}
if (buffer->used + buffer_size > buffer->size) {
- if (buffer->size + buffer_size > f_string_length_t_size) {
+ if (buffer->size + buffer_size > f_array_length_t_size) {
return F_status_set_error(F_string_too_large);
}
#endif // _di_f_file_stream_reopen_
#ifndef _di_f_file_stream_write_
- f_status_t f_file_stream_write(const f_file_t file, const f_string_static_t buffer, const f_string_length_t amount, f_string_length_t *written) {
+ f_status_t f_file_stream_write(const f_file_t file, const f_string_static_t buffer, const f_array_length_t amount, f_array_length_t *written) {
#ifndef _di_level_0_parameter_checking_
if (!file.size_write) return F_status_set_error(F_parameter);
if (buffer.used > buffer.size) return F_status_set_error(F_parameter);
if (status == F_none && *written == buffer.used) return F_none_eos;
}
else {
- f_string_length_t written_local = 0;
+ f_array_length_t written_local = 0;
private_f_file_stream_write_until(file, buffer.string, amount, buffer.used, &written_local);
#endif // _di_f_file_stream_write_
#ifndef _di_f_file_stream_write_block_
- f_status_t f_file_stream_write_block(const f_file_t file, const f_string_static_t buffer, const f_string_length_t amount, f_string_length_t *written) {
+ f_status_t f_file_stream_write_block(const f_file_t file, const f_string_static_t buffer, const f_array_length_t amount, f_array_length_t *written) {
#ifndef _di_level_0_parameter_checking_
if (!file.size_write) return F_status_set_error(F_parameter);
if (buffer.used > buffer.size) return F_status_set_error(F_parameter);
return F_data_not;
}
- f_string_length_t write_max = file.size_write;
+ f_array_length_t write_max = file.size_write;
if (write_max > buffer.used) {
write_max = buffer.used;
}
}
else {
- f_string_length_t written_local = 0;
+ f_array_length_t written_local = 0;
private_f_file_stream_write_until(file, buffer.string, amount, write_max, &written_local);
#endif // _di_f_file_stream_write_block_
#ifndef _di_f_file_stream_write_until_
- f_status_t f_file_stream_write_until(const f_file_t file, const f_string_static_t buffer, const f_string_length_t amount, const f_string_length_t total, f_string_length_t *written) {
+ f_status_t f_file_stream_write_until(const f_file_t file, const f_string_static_t buffer, const f_array_length_t amount, const f_array_length_t total, f_array_length_t *written) {
#ifndef _di_level_0_parameter_checking_
if (!file.size_write) return F_status_set_error(F_parameter);
if (buffer.used > buffer.size) return F_status_set_error(F_parameter);
return F_data_not;
}
- f_string_length_t write_max = total;
+ f_array_length_t write_max = total;
if (write_max > buffer.used) {
write_max = buffer.used;
}
}
else {
- f_string_length_t written_local = 0;
+ f_array_length_t written_local = 0;
private_f_file_stream_write_until(file, buffer.string, amount, buffer.used, &written_local);
#endif // _di_f_file_stream_write_until_
#ifndef _di_f_file_stream_write_range_
- f_status_t f_file_stream_write_range(const f_file_t file, const f_string_static_t buffer, const f_string_length_t amount, const f_string_range_t range, f_string_length_t *written) {
+ f_status_t f_file_stream_write_range(const f_file_t file, const f_string_static_t buffer, const f_array_length_t amount, const f_string_range_t range, f_array_length_t *written) {
#ifndef _di_level_0_parameter_checking_
if (!file.size_write) return F_status_set_error(F_parameter);
if (buffer.used > buffer.size) return F_status_set_error(F_parameter);
return F_data_not;
}
- const f_string_length_t total = (range.stop - range.start) + 1;
- f_string_length_t write_max = total;
+ const f_array_length_t total = (range.stop - range.start) + 1;
+ f_array_length_t write_max = total;
if (write_max > buffer.used) {
write_max = buffer.used;
}
}
else {
- f_string_length_t written_local = 0;
+ f_array_length_t written_local = 0;
private_f_file_stream_write_until(file, buffer.string + range.start, amount, write_max, &written_local);
#endif // _di_f_file_type_at_
#ifndef _di_f_file_write_
- f_status_t f_file_write(const f_file_t file, const f_string_static_t buffer, f_string_length_t *written) {
+ f_status_t f_file_write(const f_file_t file, const f_string_static_t buffer, f_array_length_t *written) {
#ifndef _di_level_0_parameter_checking_
if (!file.size_write) return F_status_set_error(F_parameter);
if (buffer.used > buffer.size) return F_status_set_error(F_parameter);
if (status == F_none && *written == buffer.used) return F_none_eos;
}
else {
- f_string_length_t written_local = 0;
+ f_array_length_t written_local = 0;
private_f_file_write_until(file, buffer.string, buffer.used, &written_local);
#endif // _di_f_file_write_
#ifndef _di_f_file_write_block_
- f_status_t f_file_write_block(const f_file_t file, const f_string_static_t buffer, f_string_length_t *written) {
+ f_status_t f_file_write_block(const f_file_t file, const f_string_static_t buffer, f_array_length_t *written) {
#ifndef _di_level_0_parameter_checking_
if (!file.size_write) return F_status_set_error(F_parameter);
if (buffer.used > buffer.size) return F_status_set_error(F_parameter);
return F_data_not;
}
- f_string_length_t write_max = file.size_write;
+ f_array_length_t write_max = file.size_write;
if (write_max > buffer.used) {
write_max = buffer.used;
}
}
else {
- f_string_length_t written_local = 0;
+ f_array_length_t written_local = 0;
private_f_file_write_until(file, buffer.string, write_max, &written_local);
#endif // _di_f_file_write_block_
#ifndef _di_f_file_write_until_
- f_status_t f_file_write_until(const f_file_t file, const f_string_static_t buffer, const f_string_length_t total, f_string_length_t *written) {
+ f_status_t f_file_write_until(const f_file_t file, const f_string_static_t buffer, const f_array_length_t total, f_array_length_t *written) {
#ifndef _di_level_0_parameter_checking_
if (!file.size_write) return F_status_set_error(F_parameter);
if (buffer.used > buffer.size) return F_status_set_error(F_parameter);
return F_data_not;
}
- f_string_length_t write_max = total;
+ f_array_length_t write_max = total;
if (write_max > buffer.used) {
write_max = buffer.used;
}
}
else {
- f_string_length_t written_local = 0;
+ f_array_length_t written_local = 0;
private_f_file_write_until(file, buffer.string, buffer.used, &written_local);
#endif // _di_f_file_write_until_
#ifndef _di_f_file_write_range_
- f_status_t f_file_write_range(const f_file_t file, const f_string_static_t buffer, const f_string_range_t range, f_string_length_t *written) {
+ f_status_t f_file_write_range(const f_file_t file, const f_string_static_t buffer, const f_string_range_t range, f_array_length_t *written) {
#ifndef _di_level_0_parameter_checking_
if (!file.size_write) return F_status_set_error(F_parameter);
if (buffer.used > buffer.size) return F_status_set_error(F_parameter);
return F_data_not;
}
- const f_string_length_t total = (range.stop - range.start) + 1;
- f_string_length_t write_max = total;
+ const f_array_length_t total = (range.stop - range.start) + 1;
+ f_array_length_t write_max = total;
if (write_max > buffer.used) {
write_max = buffer.used;
}
}
else {
- f_string_length_t written_local = 0;
+ f_array_length_t written_local = 0;
private_f_file_write_until(file, buffer.string + range.start, write_max, &written_local);
* @see basename()
*/
#ifndef _di_f_file_name_base_
- extern f_status_t f_file_name_base(const f_string_t path, const f_string_length_t length, f_string_dynamic_t *name_base);
+ extern f_status_t f_file_name_base(const f_string_t path, const f_array_length_t length, f_string_dynamic_t *name_base);
#endif // _di_f_file_name_base_
/**
* @see dirname()
*/
#ifndef _di_f_file_name_directory_
- extern f_status_t f_file_name_directory(const f_string_t path, const f_string_length_t length, f_string_dynamic_t *name_directory);
+ extern f_status_t f_file_name_directory(const f_string_t path, const f_array_length_t length, f_string_dynamic_t *name_directory);
#endif // _di_f_file_name_directory_
/**
* @see read()
*/
#ifndef _di_f_file_read_until_
- extern f_status_t f_file_read_until(const f_file_t file, const f_string_length_t total, f_string_dynamic_t *buffer);
+ extern f_status_t f_file_read_until(const f_file_t file, const f_array_length_t total, f_string_dynamic_t *buffer);
#endif // _di_f_file_read_until_
/**
* @see lseek
*/
#ifndef _di_f_file_seek_
- extern f_status_t f_file_seek(const int id, const int whence, const f_string_length_t offset, f_string_length_t *seeked);
+ extern f_status_t f_file_seek(const int id, const int whence, const f_array_length_t offset, f_array_length_t *seeked);
#endif // _di_f_file_seek_
/**
* @see f_file_stat()
*/
#ifndef _di_f_file_size_
- extern f_status_t f_file_size(const f_string_t path, const bool dereference, f_string_length_t *size);
+ extern f_status_t f_file_size(const f_string_t path, const bool dereference, f_array_length_t *size);
#endif // _di_f_file_size_
/**
* @see f_file_stat_at()
*/
#ifndef _di_f_file_size_at_
- extern f_status_t f_file_size_at(const int at_id, const f_string_t path, const bool dereference, f_string_length_t *size);
+ extern f_status_t f_file_size_at(const int at_id, const f_string_t path, const bool dereference, f_array_length_t *size);
#endif // _di_f_file_size_at_
/**
* @see f_file_stat_by_id()
*/
#ifndef _di_f_file_size_by_id_
- extern f_status_t f_file_size_by_id(const int id, f_string_length_t *size);
+ extern f_status_t f_file_size_by_id(const int id, f_array_length_t *size);
#endif // _di_f_file_size_by_id_
/**
* @see fread()
*/
#ifndef _di_f_file_stream_read_
- extern f_status_t f_file_stream_read(const f_file_t file, const f_string_length_t amount, f_string_dynamic_t *buffer);
+ extern f_status_t f_file_stream_read(const f_file_t file, const f_array_length_t amount, f_string_dynamic_t *buffer);
#endif // _di_f_file_stream_read_
/**
* @see fread()
*/
#ifndef _di_f_file_stream_read_block_
- extern f_status_t f_file_stream_read_block(const f_file_t file, const f_string_length_t amount, f_string_dynamic_t *buffer);
+ extern f_status_t f_file_stream_read_block(const f_file_t file, const f_array_length_t amount, f_string_dynamic_t *buffer);
#endif // _di_f_file_stream_read_block_
/**
* @see fread()
*/
#ifndef _di_f_file_stream_read_until_
- extern f_status_t f_file_stream_read_until(const f_file_t file, const f_string_length_t amount, const f_string_length_t total, f_string_dynamic_t *buffer);
+ extern f_status_t f_file_stream_read_until(const f_file_t file, const f_array_length_t amount, const f_array_length_t total, f_string_dynamic_t *buffer);
#endif // _di_f_file_stream_read_until_
/**
* @see fwrite()
*/
#ifndef _di_f_file_stream_write_
- extern f_status_t f_file_stream_write(const f_file_t file, const f_string_static_t buffer, const f_string_length_t amount, f_string_length_t *written);
+ extern f_status_t f_file_stream_write(const f_file_t file, const f_string_static_t buffer, const f_array_length_t amount, f_array_length_t *written);
#endif // _di_f_file_stream_write_
/**
* @see fwrite()
*/
#ifndef _di_f_file_stream_write_block_
- extern f_status_t f_file_stream_write_block(const f_file_t file, const f_string_static_t buffer, const f_string_length_t amount, f_string_length_t *written);
+ extern f_status_t f_file_stream_write_block(const f_file_t file, const f_string_static_t buffer, const f_array_length_t amount, f_array_length_t *written);
#endif // _di_f_file_stream_write_block_
/**
* @see fwrite()
*/
#ifndef _di_f_file_stream_write_until_
- extern f_status_t f_file_stream_write_until(const f_file_t file, const f_string_static_t buffer, const f_string_length_t amount, const f_string_length_t total, f_string_length_t *written);
+ extern f_status_t f_file_stream_write_until(const f_file_t file, const f_string_static_t buffer, const f_array_length_t amount, const f_array_length_t total, f_array_length_t *written);
#endif // _di_f_file_stream_write_until_
/**
* @see fwrite()
*/
#ifndef _di_f_file_stream_write_range_
- extern f_status_t f_file_stream_write_range(const f_file_t file, const f_string_static_t buffer, const f_string_length_t amount, const f_string_range_t range, f_string_length_t *written);
+ extern f_status_t f_file_stream_write_range(const f_file_t file, const f_string_static_t buffer, const f_array_length_t amount, const f_string_range_t range, f_array_length_t *written);
#endif // _di_f_file_stream_write_range_
* @see write()
*/
#ifndef _di_f_file_write_
- extern f_status_t f_file_write(const f_file_t file, const f_string_static_t buffer, f_string_length_t *written);
+ extern f_status_t f_file_write(const f_file_t file, const f_string_static_t buffer, f_array_length_t *written);
#endif // _di_f_file_write_
/**
* @see write()
*/
#ifndef _di_f_file_write_block_
- extern f_status_t f_file_write_block(const f_file_t file, const f_string_static_t buffer, f_string_length_t *written);
+ extern f_status_t f_file_write_block(const f_file_t file, const f_string_static_t buffer, f_array_length_t *written);
#endif // _di_f_file_write_block_
/**
* @see write()
*/
#ifndef _di_f_file_write_until_
- extern f_status_t f_file_write_until(const f_file_t file, const f_string_static_t buffer, const f_string_length_t total, f_string_length_t *written);
+ extern f_status_t f_file_write_until(const f_file_t file, const f_string_static_t buffer, const f_array_length_t total, f_array_length_t *written);
#endif // _di_f_file_write_until_
/**
* @see write()
*/
#ifndef _di_f_file_write_range_
- extern f_status_t f_file_write_range(const f_file_t file, const f_string_static_t buffer, const f_string_range_t range, f_string_length_t *written);
+ extern f_status_t f_file_write_range(const f_file_t file, const f_string_static_t buffer, const f_string_range_t range, f_array_length_t *written);
#endif // _di_f_file_write_range_
#ifdef __cplusplus
f_status_t private_f_file_link_read(const f_string_t path, const struct stat link_stat, f_string_dynamic_t *target) {
// create a NULL terminated string based on file stat.
if (link_stat.st_size + 1 > target->size) {
- if (link_stat.st_size + 1 > f_string_length_t_size) {
+ if (link_stat.st_size + 1 > f_array_length_t_size) {
return F_status_set_error(F_string_too_large);
}
f_status_t private_f_file_link_read_at(const int at_id, const f_string_t path, const struct stat link_stat, f_string_dynamic_t *target) {
// create a NULL terminated string based on file stat.
if (link_stat.st_size + 1 > target->size) {
- if (link_stat.st_size + 1 > f_string_length_t_size) {
+ if (link_stat.st_size + 1 > f_array_length_t_size) {
return F_status_set_error(F_string_too_large);
}
#endif // !defined(_di_f_file_stream_descriptor_) || !defined(_di_f_file_stream_open_) || !defined(_di_f_file_stream_reopen_)
#if !defined(f_file_stream_write) || !defined(_di_f_file_stream_write_block_) || !defined(f_file_stream_write_until) || !defined(f_file_stream_write_range)
- f_status_t private_f_file_stream_write_until(const f_file_t file, const f_string_t string, const f_string_length_t amount, const f_string_length_t total, f_string_length_t *written) {
+ f_status_t private_f_file_stream_write_until(const f_file_t file, const f_string_t string, const f_array_length_t amount, const f_array_length_t total, f_array_length_t *written) {
*written = 0;
f_status_t status = F_none;
- f_string_length_t write_amount = amount;
- f_string_length_t write_size = file.size_write;
- f_string_length_t write_max = total;
+ f_array_length_t write_amount = amount;
+ f_array_length_t write_size = file.size_write;
+ f_array_length_t write_max = total;
ssize_t size_write = 0;
#endif // !defined(f_file_stream_write) || !defined(_di_f_file_stream_write_block_) || !defined(f_file_stream_write_until) || !defined(f_file_stream_write_range)
#if !defined(f_file_write) || !defined(_di_f_file_write_block_) || !defined(f_file_write_until) || !defined(f_file_write_range)
- f_status_t private_f_file_write_until(const f_file_t file, const f_string_t string, const f_string_length_t total, f_string_length_t *written) {
+ f_status_t private_f_file_write_until(const f_file_t file, const f_string_t string, const f_array_length_t total, f_array_length_t *written) {
*written = 0;
f_status_t status = F_none;
- f_string_length_t write_size = file.size_write;
- f_string_length_t write_max = total;
+ f_array_length_t write_size = file.size_write;
+ f_array_length_t write_max = total;
ssize_t size_write = 0;
* @see f_file_stream_write_until()
*/
#if !defined(f_file_stream_write) || !defined(_di_f_file_stream_write_block_) || !defined(f_file_stream_write_until) || !defined(f_file_stream_write_range)
- extern f_status_t private_f_file_stream_write_until(const f_file_t file, const f_string_t string, const f_string_length_t amount, const f_string_length_t total, f_string_length_t *written) f_gcc_attribute_visibility_internal;
+ extern f_status_t private_f_file_stream_write_until(const f_file_t file, const f_string_t string, const f_array_length_t amount, const f_array_length_t total, f_array_length_t *written) f_gcc_attribute_visibility_internal;
#endif // !defined(f_file_stream_write) || !defined(_di_f_file_stream_write_block_) || !defined(f_file_stream_write_until) || !defined(f_file_stream_write_range)
/**
* @see f_file_write_until()
*/
#if !defined(f_file_write) || !defined(_di_f_file_write_block_) || !defined(f_file_write_until) || !defined(f_file_write_range)
- extern f_status_t private_f_file_write_until(const f_file_t file, const f_string_t string, const f_string_length_t total, f_string_length_t *written) f_gcc_attribute_visibility_internal;
+ extern f_status_t private_f_file_write_until(const f_file_t file, const f_string_t string, const f_array_length_t total, f_array_length_t *written) f_gcc_attribute_visibility_internal;
#endif // !defined(f_file_write) || !defined(_di_f_file_write_block_) || !defined(f_file_write_until) || !defined(f_file_write_range)
#ifdef __cplusplus
typedef struct {
f_fss_id_t type;
- f_string_length_t length;
+ f_array_length_t length;
} f_fss_header_t;
#define f_fss_header_initialize { 0, 0 }
typedef struct {
f_fss_header_t *array;
- f_string_length_t size;
- f_string_length_t used;
+ f_array_length_t size;
+ f_array_length_t used;
} f_fss_headers_t;
#define f_fss_headers_t_initialize { 0, 0, 0 }
#endif // _di_fl_fss_apply_delimit_between_
#ifndef _di_f_fss_count_lines_
- f_status_t f_fss_count_lines(const f_string_static_t buffer, const f_string_length_t before, f_string_length_t *line) {
+ f_status_t f_fss_count_lines(const f_string_static_t buffer, const f_array_length_t before, f_array_length_t *line) {
#ifndef _di_level_0_parameter_checking_
if (!line) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
return F_none;
}
- for (f_string_length_t i = before; i > 0; i--) {
+ for (f_array_length_t i = before; i > 0; i--) {
if (buffer.string[i] == f_fss_eol) {
(*line)++;
}
#endif // _di_f_fss_count_lines_
#ifndef _di_f_fss_count_lines_range_
- f_status_t f_fss_count_lines_range(const f_string_static_t buffer, const f_string_range_t range, const f_string_length_t before, f_string_length_t *line) {
+ f_status_t f_fss_count_lines_range(const f_string_static_t buffer, const f_string_range_t range, const f_array_length_t before, f_array_length_t *line) {
#ifndef _di_level_0_parameter_checking_
if (!line) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
return F_none;
}
- for (f_string_length_t i = before; i > range.start; i--) {
+ for (f_array_length_t i = before; i > range.start; i--) {
if (buffer.string[i] == f_fss_eol) {
(*line)++;
}
return F_false;
}
- f_string_length_t width_max = (range.stop - range.start) + 1;
+ f_array_length_t width_max = (range.stop - range.start) + 1;
if (width_max > buffer.used - range.start) {
width_max = buffer.used - range.start;
return F_false;
}
- f_string_length_t width_max = (range.stop - range.start) + 1;
+ f_array_length_t width_max = (range.stop - range.start) + 1;
if (width_max > buffer.used - range.start) {
width_max = buffer.used - range.start;
return F_false;
}
- f_string_length_t width_max = (range.stop - range.start) + 1;
+ f_array_length_t width_max = (range.stop - range.start) + 1;
if (width_max > buffer.used - range.start) {
width_max = buffer.used - range.start;
return F_none;
}
- f_string_length_t position = 0;
- f_string_length_t distance = 0;
+ f_array_length_t position = 0;
+ f_array_length_t distance = 0;
uint8_t utf_width = 0;
uint8_t i = 0;
f_status_t status = F_none;
uint8_t width = 0;
- f_string_length_t width_max = (range->stop - range->start) + 1;
+ f_array_length_t width_max = (range->stop - range->start) + 1;
if (width_max > buffer.used - range->start) {
width_max = buffer.used - range->start;
f_status_t status = F_none;
uint8_t width = 0;
- f_string_length_t width_max = (range->stop - range->start) + 1;
- f_string_length_t next = 0;
- f_string_length_t next_width_max = 0;
+ f_array_length_t width_max = (range->stop - range->start) + 1;
+ f_array_length_t next = 0;
+ f_array_length_t next_width_max = 0;
if (width_max > buffer.used - range->start) {
width_max = buffer.used - range->start;
* F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_f_fss_count_lines_
- extern f_status_t f_fss_count_lines(const f_string_static_t buffer, const f_string_length_t before, f_string_length_t *line);
+ extern f_status_t f_fss_count_lines(const f_string_static_t buffer, const f_array_length_t before, f_array_length_t *line);
#endif // _di_f_fss_count_lines_
/**
* F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_f_fss_count_lines_range_
- extern f_status_t f_fss_count_lines_range(const f_string_static_t buffer, const f_string_range_t range, const f_string_length_t before, f_string_length_t *line);
+ extern f_status_t f_fss_count_lines_range(const f_string_static_t buffer, const f_string_range_t range, const f_array_length_t before, f_array_length_t *line);
#endif // _di_f_fss_count_lines_range_
/**
* Designate an fss delimit location.
*/
#ifndef _di_f_fss_delimit_t_
- typedef f_string_length_t f_fss_delimit_t;
+ typedef f_array_length_t f_fss_delimit_t;
#endif // _di_f_fss_delimit_t_
/**
* used: total number of allocated spaces used.
*/
#ifndef _di_f_fss_delimits_t_
- typedef f_string_lengths_t f_fss_delimits_t;
+ typedef f_array_lengths_t f_fss_delimits_t;
- #define f_fss_delimits_t_initialize f_string_lengths_t_initialize
+ #define f_fss_delimits_t_initialize f_array_lengths_t_initialize
- #define f_macro_fss_delimits_t_clear(delimits) f_macro_string_lengths_t_clear(delimits)
+ #define f_macro_fss_delimits_t_clear(delimits) f_macro_array_lengths_t_clear(delimits)
- #define f_macro_fss_delimits_t_resize(status, delimits, length) f_macro_string_lengths_t_resize(status, delimits, length)
- #define f_macro_fss_delimits_t_adjust(status, delimits, length) f_macro_string_lengths_t_adjust(status, delimits, length)
+ #define f_macro_fss_delimits_t_resize(status, delimits, length) f_macro_array_lengths_t_resize(status, delimits, length)
+ #define f_macro_fss_delimits_t_adjust(status, delimits, length) f_macro_array_lengths_t_adjust(status, delimits, length)
- #define f_macro_fss_delimits_t_delete_simple(delimits) f_macro_string_lengths_t_delete_simple(delimits)
- #define f_macro_fss_delimits_t_destroy_simple(delimits) f_macro_string_lengths_t_destroy_simple(delimits)
+ #define f_macro_fss_delimits_t_delete_simple(delimits) f_macro_array_lengths_t_delete_simple(delimits)
+ #define f_macro_fss_delimits_t_destroy_simple(delimits) f_macro_array_lengths_t_destroy_simple(delimits)
- #define f_macro_fss_delimits_t_increase(status, delimits) f_macro_string_lengths_t_increase(status, delimits)
- #define f_macro_fss_delimits_t_increase_by(status, delimits, amount) f_macro_string_lengths_t_increase_by(status, delimits, amount)
- #define f_macro_fss_delimits_t_decrease_by(status, delimits, amount) f_macro_string_lengths_t_decrease_by(status, delimits, amount)
- #define f_macro_fss_delimits_t_decimate_by(status, delimits, amount) f_macro_string_lengths_t_decimate_by(status, delimits, amount)
+ #define f_macro_fss_delimits_t_increase(status, delimits) f_macro_array_lengths_t_increase(status, delimits)
+ #define f_macro_fss_delimits_t_increase_by(status, delimits, amount) f_macro_array_lengths_t_increase_by(status, delimits, amount)
+ #define f_macro_fss_delimits_t_decrease_by(status, delimits, amount) f_macro_array_lengths_t_decrease_by(status, delimits, amount)
+ #define f_macro_fss_delimits_t_decimate_by(status, delimits, amount) f_macro_array_lengths_t_decimate_by(status, delimits, amount)
#endif // _di_f_fss_delimits_t_
/**
* used: total number of allocated spaces used.
*/
#ifndef _di_f_fss_delimitss_t_
- typedef f_string_lengthss_t f_fss_delimitss_t;
+ typedef f_array_lengthss_t f_fss_delimitss_t;
- #define f_fss_delimitss_t_initialize f_string_lengthss_t_initialize
+ #define f_fss_delimitss_t_initialize f_array_lengthss_t_initialize
- #define f_macro_fss_delimitss_t_clear(delimitss) f_macro_string_lengthss_t_clear(delimitss)
+ #define f_macro_fss_delimitss_t_clear(delimitss) f_macro_array_lengthss_t_clear(delimitss)
- #define f_macro_fss_delimitss_t_resize(status, delimitss, length) f_macro_string_lengthss_t_resize(status, delimitss, length)
- #define f_macro_fss_delimitss_t_adjust(status, delimitss, length) f_macro_string_lengthss_t_adjust(status, delimitss, length)
+ #define f_macro_fss_delimitss_t_resize(status, delimitss, length) f_macro_array_lengthss_t_resize(status, delimitss, length)
+ #define f_macro_fss_delimitss_t_adjust(status, delimitss, length) f_macro_array_lengthss_t_adjust(status, delimitss, length)
- #define f_macro_fss_delimitss_t_delete_simple(delimitss) f_macro_string_lengthss_t_delete_simple(delimitss)
- #define f_macro_fss_delimitss_t_destroy_simple(delimitss) f_macro_string_lengthss_t_destroy_simple(delimitss)
+ #define f_macro_fss_delimitss_t_delete_simple(delimitss) f_macro_array_lengthss_t_delete_simple(delimitss)
+ #define f_macro_fss_delimitss_t_destroy_simple(delimitss) f_macro_array_lengthss_t_destroy_simple(delimitss)
- #define f_macro_fss_delimitss_t_increase(status, delimitss) f_macro_string_lengthss_t_increase(status, delimitss)
- #define f_macro_fss_delimitss_t_increase_by(status, delimitss, amount) f_macro_string_lengthss_t_increase_by(status, delimitss, amount)
- #define f_macro_fss_delimitss_t_decrease_by(status, delimitss, amount) f_macro_string_lengthss_t_decrease_by(status, delimitss, amount)
- #define f_macro_fss_delimitss_t_decimate_by(status, delimitss, amount) f_macro_string_lengthss_t_decimate_by(status, delimitss, amount)
+ #define f_macro_fss_delimitss_t_increase(status, delimitss) f_macro_array_lengthss_t_increase(status, delimitss)
+ #define f_macro_fss_delimitss_t_increase_by(status, delimitss, amount) f_macro_array_lengthss_t_increase_by(status, delimitss, amount)
+ #define f_macro_fss_delimitss_t_decrease_by(status, delimitss, amount) f_macro_array_lengthss_t_decrease_by(status, delimitss, amount)
+ #define f_macro_fss_delimitss_t_decimate_by(status, delimitss, amount) f_macro_array_lengthss_t_decimate_by(status, delimitss, amount)
#endif // _di_f_fss_delimitss_t_
#ifdef __cplusplus
#endif
#ifndef _di_f_fss_named_adjust_
- f_status_t f_fss_named_adjust(const f_string_length_t length, f_fss_named_t *named) {
+ f_status_t f_fss_named_adjust(const f_array_length_t length, f_fss_named_t *named) {
#ifndef _di_level_0_parameter_checking_
if (!named) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_fss_named_increase_by_
#ifndef _di_f_fss_named_resize_
- f_status_t f_fss_named_resize(const f_string_length_t length, f_fss_named_t *named) {
+ f_status_t f_fss_named_resize(const f_array_length_t length, f_fss_named_t *named) {
#ifndef _di_level_0_parameter_checking_
if (!named) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_fss_named_resize_
#ifndef _di_f_fss_nameds_adjust_
- f_status_t f_fss_nameds_adjust(const f_string_length_t length, f_fss_nameds_t *nameds) {
+ f_status_t f_fss_nameds_adjust(const f_array_length_t length, f_fss_nameds_t *nameds) {
#ifndef _di_level_0_parameter_checking_
if (!nameds) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_fss_nameds_increase_by_
#ifndef _di_f_fss_nameds_resize_
- f_status_t f_fss_nameds_resize(const f_string_length_t length, f_fss_nameds_t *nameds) {
+ f_status_t f_fss_nameds_resize(const f_array_length_t length, f_fss_nameds_t *nameds) {
#ifndef _di_level_0_parameter_checking_
if (!nameds) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif
#ifndef _di_f_fss_items_adjust_
- f_status_t f_fss_items_adjust(const f_string_length_t length, f_fss_items_t *items) {
+ f_status_t f_fss_items_adjust(const f_array_length_t length, f_fss_items_t *items) {
#ifndef _di_level_0_parameter_checking_
if (!items) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_fss_items_increase_by_
#ifndef _di_f_fss_items_resize_
- f_status_t f_fss_items_resize(const f_string_length_t length, f_fss_items_t *items) {
+ f_status_t f_fss_items_resize(const f_array_length_t length, f_fss_items_t *items) {
#ifndef _di_level_0_parameter_checking_
if (!items) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_fss_items_resize_
#ifndef _di_f_fss_nest_adjust_
- f_status_t f_fss_nest_adjust(const f_string_length_t length, f_fss_nest_t *nest) {
+ f_status_t f_fss_nest_adjust(const f_array_length_t length, f_fss_nest_t *nest) {
#ifndef _di_level_0_parameter_checking_
if (!nest) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_fss_nest_increase_by_
#ifndef _di_f_fss_nest_resize_
- f_status_t f_fss_nest_resize(const f_string_length_t length, f_fss_nest_t *nest) {
+ f_status_t f_fss_nest_resize(const f_array_length_t length, f_fss_nest_t *nest) {
#ifndef _di_level_0_parameter_checking_
if (!nest) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_fss_nest_resize_
#ifndef _di_f_fss_nests_adjust_
- f_status_t f_fss_nests_adjust(const f_string_length_t length, f_fss_nests_t *nests) {
+ f_status_t f_fss_nests_adjust(const f_array_length_t length, f_fss_nests_t *nests) {
#ifndef _di_level_0_parameter_checking_
if (!nests) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_fss_nests_increase_by_
#ifndef _di_f_fss_nests_resize_
- f_status_t f_fss_nests_resize(const f_string_length_t length, f_fss_nests_t *nests) {
+ f_status_t f_fss_nests_resize(const f_array_length_t length, f_fss_nests_t *nests) {
#ifndef _di_level_0_parameter_checking_
if (!nests) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif
#ifndef _di_f_fss_set_adjust_
- f_status_t f_fss_set_adjust(const f_string_length_t length, f_fss_set_t *set) {
+ f_status_t f_fss_set_adjust(const f_array_length_t length, f_fss_set_t *set) {
#ifndef _di_level_0_parameter_checking_
if (!set) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_fss_set_increase_by_
#ifndef _di_f_fss_set_resize_
- f_status_t f_fss_set_resize(const f_string_length_t length, f_fss_set_t *set) {
+ f_status_t f_fss_set_resize(const f_array_length_t length, f_fss_set_t *set) {
#ifndef _di_level_0_parameter_checking_
if (!set) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_fss_set_resize_
#ifndef _di_f_fss_set_quote_adjust_
- f_status_t f_fss_set_quote_adjust(const f_string_length_t length, f_fss_set_quote_t *set_quote) {
+ f_status_t f_fss_set_quote_adjust(const f_array_length_t length, f_fss_set_quote_t *set_quote) {
#ifndef _di_level_0_parameter_checking_
if (!set_quote) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_fss_set_quote_increase_by_
#ifndef _di_f_fss_set_quote_resize_
- f_status_t f_fss_set_quote_resize(const f_string_length_t length, f_fss_set_quote_t *set_quote) {
+ f_status_t f_fss_set_quote_resize(const f_array_length_t length, f_fss_set_quote_t *set_quote) {
#ifndef _di_level_0_parameter_checking_
if (!set_quote) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_fss_set_quote_resize_
#ifndef _di_f_fss_set_quotes_adjust_
- f_status_t f_fss_set_quotes_adjust(const f_string_length_t length, f_fss_set_quotes_t *set_quotes) {
+ f_status_t f_fss_set_quotes_adjust(const f_array_length_t length, f_fss_set_quotes_t *set_quotes) {
#ifndef _di_level_0_parameter_checking_
if (!set_quotes) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_fss_set_quotes_increase_by_
#ifndef _di_f_fss_set_quotes_resize_
- f_status_t f_fss_set_quotes_resize(const f_string_length_t length, f_fss_set_quotes_t *set_quotes) {
+ f_status_t f_fss_set_quotes_resize(const f_array_length_t length, f_fss_set_quotes_t *set_quotes) {
#ifndef _di_level_0_parameter_checking_
if (!set_quotes) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_fss_set_quotes_resize_
#ifndef _di_f_fss_sets_adjust_
- f_status_t f_fss_sets_adjust(const f_string_length_t length, f_fss_sets_t *sets) {
+ f_status_t f_fss_sets_adjust(const f_array_length_t length, f_fss_sets_t *sets) {
#ifndef _di_level_0_parameter_checking_
if (!sets) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_fss_sets_increase_by_
#ifndef _di_f_fss_sets_resize_
- f_status_t f_fss_sets_resize(const f_string_length_t length, f_fss_sets_t *sets) {
+ f_status_t f_fss_sets_resize(const f_array_length_t length, f_fss_sets_t *sets) {
#ifndef _di_level_0_parameter_checking_
if (!sets) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#define f_macro_iki_allocate_delimits_if_necessary(status, delimits) \
status = F_none; \
if (delimits.used == delimits.size) { \
- if (delimits.used + f_iki_default_allocation_step > f_string_length_t_size) { \
- if (delimits.used == f_string_length_t_size) { \
+ if (delimits.used + f_iki_default_allocation_step > f_array_length_t_size) { \
+ if (delimits.used == f_array_length_t_size) { \
status = F_status_set_error(F_string_too_large); \
} \
else { \
- f_macro_string_lengths_t_resize(status, delimits, delimits.size + 1); \
+ f_macro_array_lengths_t_resize(status, delimits, delimits.size + 1); \
} \
} \
else { \
- f_macro_string_lengths_t_resize(status, delimits, delimits.size + f_iki_default_allocation_step); \
+ f_macro_array_lengths_t_resize(status, delimits, delimits.size + f_iki_default_allocation_step); \
} \
}
#endif // _di_f_macro_iki_allocate_delimits_if_necessary_
#define f_macro_iki_allocate_ranges_if_necessary(status, ranges) \
status = F_none; \
if (ranges.used == ranges.size) { \
- if (ranges.used + f_iki_default_allocation_step > f_string_length_t_size) { \
- if (ranges.used == f_string_length_t_size) { \
+ if (ranges.used + f_iki_default_allocation_step > f_array_length_t_size) { \
+ if (ranges.used == f_array_length_t_size) { \
status = F_status_set_error(F_string_too_large); \
} \
else { \
f_status_t status = F_none;
- f_string_length_t width_max = 0;
+ f_array_length_t width_max = 0;
if (width_max > buffer->used - range->start) {
width_max = buffer->used - range->start;
}
f_string_range_t found_vocabulary = f_string_range_t_initialize;
- f_string_length_t found_content = 0;
+ f_array_length_t found_content = 0;
found_vocabulary.start = range->start;
- f_string_length_t vocabulary_slash_first = range->start;
+ f_array_length_t vocabulary_slash_first = range->start;
uint8_t quote = 0;
bool find_next = F_false;
// delimits must only be applied once a valid object is found.
- f_string_lengths_t delimits = f_string_lengths_t_initialize;
+ f_array_lengths_t delimits = f_array_lengths_t_initialize;
do {
status = f_utf_buffer_increment(*buffer, range, 1);
if (F_status_is_error(status)) {
- f_macro_string_lengths_t_delete_simple(delimits);
+ f_macro_array_lengths_t_delete_simple(delimits);
return status;
}
} while (F_status_is_fine(status) && buffer->string[range->start] == f_iki_syntax_placeholder);
if (F_status_is_error(status)) {
- f_macro_string_lengths_t_delete_simple(delimits);
+ f_macro_array_lengths_t_delete_simple(delimits);
return status;
}
// this is not a valid vocabulary name so seek until a non-word, non-dash, or non-plus character.
f_macro_iki_seek_word_dash_plus(status, buffer, range, width_max, F_false);
if (F_status_is_error(status)) {
- f_macro_string_lengths_t_delete_simple(delimits);
+ f_macro_array_lengths_t_delete_simple(delimits);
return status;
}
status = f_utf_buffer_increment(*buffer, range, 1);
if (F_status_is_error(status)) {
- f_macro_string_lengths_t_delete_simple(delimits);
+ f_macro_array_lengths_t_delete_simple(delimits);
return status;
}
} // while
status = f_utf_is_word_dash_plus(buffer->string + range->start, width_max, F_false);
if (F_status_is_error(status)) {
- f_macro_string_lengths_t_delete_simple(delimits);
+ f_macro_array_lengths_t_delete_simple(delimits);
return status;
}
f_macro_iki_seek_word_dash_plus(status, buffer, range, width_max, F_true);
if (F_status_is_error(status)) {
- f_macro_string_lengths_t_delete_simple(delimits);
+ f_macro_array_lengths_t_delete_simple(delimits);
return status;
}
else if (range->start > range->stop) {
- f_macro_string_lengths_t_delete_simple(delimits);
+ f_macro_array_lengths_t_delete_simple(delimits);
return F_data_not_stop;
}
else if (range->start >= buffer->used) {
- f_macro_string_lengths_t_delete_simple(delimits);
+ f_macro_array_lengths_t_delete_simple(delimits);
return F_data_not_eos;
}
status = f_utf_buffer_increment(*buffer, range, 1);
if (F_status_is_error(status)) {
- f_macro_string_lengths_t_delete_simple(delimits);
+ f_macro_array_lengths_t_delete_simple(delimits);
return status;
}
} // while
f_macro_iki_allocate_delimits_if_necessary(status, delimits);
if (F_status_is_error(status)) {
- f_macro_string_lengths_t_delete_simple(delimits);
+ f_macro_array_lengths_t_delete_simple(delimits);
return status;
}
}
if (F_status_is_error(status)) {
- f_macro_string_lengths_t_delete_simple(delimits);
+ f_macro_array_lengths_t_delete_simple(delimits);
return status;
}
buffer->string[delimits.array[i]] = f_iki_syntax_placeholder;
} // for
- f_macro_string_lengths_t_delete_simple(delimits);
+ f_macro_array_lengths_t_delete_simple(delimits);
if (F_status_is_error(status)) return status;
range->start++;
}
}
else if (buffer->string[range->start] == f_iki_syntax_slash) {
- f_string_length_t content_slash_first = range->start;
+ f_array_length_t content_slash_first = range->start;
f_array_length_t content_slash_total = 0;
while (range->start <= range->stop && range->start < buffer->used) {
}
if (delimits.used + content_slash_delimits > delimits.size) {
- if (delimits.used + content_slash_delimits > f_string_length_t_size) {
+ if (delimits.used + content_slash_delimits > f_array_length_t_size) {
status = F_status_set_error(F_string_too_large);
}
else {
- f_macro_string_lengths_t_resize(status, delimits, delimits.used + content_slash_delimits);
+ f_macro_array_lengths_t_resize(status, delimits, delimits.used + content_slash_delimits);
}
if (F_status_is_error(status)) {
- f_macro_string_lengths_t_delete_simple(delimits);
+ f_macro_array_lengths_t_delete_simple(delimits);
return status;
}
}
status = f_utf_buffer_increment(*buffer, (&content_range), 1);
if (F_status_is_error(status)) {
- f_macro_string_lengths_t_delete_simple(delimits);
+ f_macro_array_lengths_t_delete_simple(delimits);
return status;
}
} // while
f_macro_iki_allocate_delimits_if_necessary(status, delimits);
if (F_status_is_error(status)) {
- f_macro_string_lengths_t_delete_simple(delimits);
+ f_macro_array_lengths_t_delete_simple(delimits);
return status;
}
}
if (F_status_is_error(status)) {
- f_macro_string_lengths_t_delete_simple(delimits);
+ f_macro_array_lengths_t_delete_simple(delimits);
return status;
}
buffer->string[delimits.array[i]] = f_iki_syntax_placeholder;
} // for
- f_macro_string_lengths_t_delete_simple(delimits);
+ f_macro_array_lengths_t_delete_simple(delimits);
if (F_status_is_error(status)) return status;
range->start++;
status = f_utf_buffer_increment(*buffer, range, 1);
if (F_status_is_error(status)) {
- f_macro_string_lengths_t_delete_simple(delimits);
+ f_macro_array_lengths_t_delete_simple(delimits);
return status;
}
} // while
status = f_utf_buffer_increment(*buffer, range, 1);
if (F_status_is_error(status)) {
- f_macro_string_lengths_t_delete_simple(delimits);
+ f_macro_array_lengths_t_delete_simple(delimits);
return status;
}
} // while
buffer->string[delimits.array[i]] = f_iki_syntax_placeholder;
} // for
- f_macro_string_lengths_t_delete_simple(delimits);
+ f_macro_array_lengths_t_delete_simple(delimits);
if (F_status_is_error(status)) return status;
if (range->start > range->stop) {
#include <level_0/type.h>
#include <level_0/status.h>
#include <level_0/memory.h>
+#include <level_0/type_array.h>
#include <level_0/string.h>
#include <level_0/utf.h>
#if !defined(_di_f_iki_content_is_) || !defined(_di_f_iki_content_partial_is_)
f_status_t private_f_iki_content_partial_is(const f_string_static_t buffer, const f_string_range_t range, const uint8_t quote) {
- f_string_length_t delimits = 0;
+ f_array_length_t delimits = 0;
- for (f_string_length_t i = 0; i < buffer.used; i++) {
+ for (f_array_length_t i = 0; i < buffer.used; i++) {
if (buffer.string[i] == quote) {
if (delimits && delimits % 2) {
f_status_t private_f_iki_object_partial_is(const f_string_static_t buffer, const f_string_range_t range) {
f_status_t status = F_none;
- for (f_string_length_t i = 0; i < buffer.used; i++) {
+ for (f_array_length_t i = 0; i < buffer.used; i++) {
status = f_utf_is_word(buffer.string + i, buffer.used - i, F_false);
if (F_status_is_error(status)) return status;
return private_f_path_real(buffer, path);
}
- const f_string_length_t length = strnlen(buffer, f_path_length_max);
+ const f_array_length_t length = strnlen(buffer, f_path_length_max);
if (length + 1 > path->size) {
f_status_t status = F_none;
#endif // _di_f_path_current_
#ifndef _di_f_path_is_
- f_status_t f_path_is(const f_string_t path, const f_string_length_t length) {
+ f_status_t f_path_is(const f_string_t path, const f_array_length_t length) {
if (!path || !length) {
return F_false;
}
- for (f_string_length_t i = 0; i < length; i++) {
+ for (f_array_length_t i = 0; i < length; i++) {
if (path[i] == f_path_separator_s[0]) {
return F_true;
* F_false if this string is not a path string.
*/
#ifndef _di_f_path_is_
- extern f_status_t f_path_is(const f_string_t path, const f_string_length_t length);
+ extern f_status_t f_path_is(const f_string_t path, const f_array_length_t length);
#endif // _di_f_path_is_
/**
return F_status_set_error(F_failure);
}
- const f_string_length_t length = strnlen(buffer, f_path_length_max);
+ const f_array_length_t length = strnlen(buffer, f_path_length_max);
if (length + 1 > real->size) {
f_status_t status = F_none;
#endif
#ifndef _di_f_print_
- f_status_t f_print(FILE *output, const f_string_t string, const f_string_length_t length) {
+ f_status_t f_print(FILE *output, const f_string_t string, const f_array_length_t length) {
#ifndef _di_level_0_parameter_checking_
if (!output) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
if (!buffer.used || range.start > range.stop || range.start >= buffer.used) return F_data_not;
- f_string_length_t length = (range.stop - range.start) + 1;
+ f_array_length_t length = (range.stop - range.start) + 1;
if (length + range.start > buffer.used) {
length = buffer.used - range.start;
#endif // _di_f_print_dynamic_partial_
#ifndef _di_f_print_except_
- f_status_t f_print_except(FILE *output, const f_string_t string, const f_string_length_t length, const f_string_lengths_t except) {
+ f_status_t f_print_except(FILE *output, const f_string_t string, const f_array_length_t length, const f_array_lengths_t except) {
#ifndef _di_level_0_parameter_checking_
if (!output) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_print_except_
#ifndef _di_f_print_except_dynamic_
- f_status_t f_print_except_dynamic(FILE *output, const f_string_static_t buffer, const f_string_lengths_t except) {
+ f_status_t f_print_except_dynamic(FILE *output, const f_string_static_t buffer, const f_array_lengths_t except) {
#ifndef _di_level_0_parameter_checking_
if (!output) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_print_except_dynamic_
#ifndef _di_f_print_except_dynamic_partial_
- f_status_t f_print_except_dynamic_partial(FILE *output, const f_string_static_t buffer, const f_string_range_t range, const f_string_lengths_t except) {
+ f_status_t f_print_except_dynamic_partial(FILE *output, const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except) {
#ifndef _di_level_0_parameter_checking_
if (!output) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
if (!buffer.used || range.start > range.stop || range.start >= buffer.used) return F_data_not;
- f_string_length_t length = (range.stop - range.start) + 1;
+ f_array_length_t length = (range.stop - range.start) + 1;
if (length + range.start > buffer.used) {
length = buffer.used - range.start;
#endif // _di_f_print_except_dynamic_partial_
#ifndef _di_f_print_to_
- f_status_t f_print_to(const int id, const f_string_t string, const f_string_length_t length) {
+ f_status_t f_print_to(const int id, const f_string_t string, const f_array_length_t length) {
#ifndef _di_level_0_parameter_checking_
if (id == -1) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
if (!buffer.used || range.start > range.stop || range.start >= buffer.used) return F_data_not;
- f_string_length_t length = (range.stop - range.start) + 1;
+ f_array_length_t length = (range.stop - range.start) + 1;
if (length + range.start > buffer.used) {
length = buffer.used - range.start;
#endif // _di_f_print_to_dynamic_partial_
#ifndef _di_f_print_to_except_
- f_status_t f_print_to_except(const int id, const f_string_t string, const f_string_length_t length, const f_string_lengths_t except) {
+ f_status_t f_print_to_except(const int id, const f_string_t string, const f_array_length_t length, const f_array_lengths_t except) {
#ifndef _di_level_0_parameter_checking_
if (id == -1) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_print_to_except_
#ifndef _di_f_print_to_except_dynamic_
- f_status_t f_print_to_except_dynamic(const int id, const f_string_static_t buffer, const f_string_lengths_t except) {
+ f_status_t f_print_to_except_dynamic(const int id, const f_string_static_t buffer, const f_array_lengths_t except) {
#ifndef _di_level_0_parameter_checking_
if (id == -1) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_print_to_except_dynamic_
#ifndef _di_f_print_to_except_dynamic_partial_
- f_status_t f_print_to_except_dynamic_partial(const int id, const f_string_static_t buffer, const f_string_range_t range, const f_string_lengths_t except) {
+ f_status_t f_print_to_except_dynamic_partial(const int id, const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except) {
#ifndef _di_level_0_parameter_checking_
if (id == -1) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
if (!buffer.used || range.start > range.stop || range.start >= buffer.used) return F_data_not;
- f_string_length_t length = (range.stop - range.start) + 1;
+ f_array_length_t length = (range.stop - range.start) + 1;
if (length + range.start > buffer.used) {
length = buffer.used - range.start;
* @see fputc()
*/
#ifndef _di_f_print_
- extern f_status_t f_print(FILE *output, const f_string_t string, const f_string_length_t length);
+ extern f_status_t f_print(FILE *output, const f_string_t string, const f_array_length_t length);
#endif // _di_f_print_
/**
* @see fputc()
*/
#ifndef _di_f_print_except_
- extern f_status_t f_print_except(FILE *output, const f_string_t string, const f_string_length_t length, const f_string_lengths_t except);
+ extern f_status_t f_print_except(FILE *output, const f_string_t string, const f_array_length_t length, const f_array_lengths_t except);
#endif // _di_f_print_except_
/**
* @see fputc()
*/
#ifndef _di_f_print_except_dynamic_
- extern f_status_t f_print_except_dynamic(FILE *output, const f_string_static_t buffer, const f_string_lengths_t except);
+ extern f_status_t f_print_except_dynamic(FILE *output, const f_string_static_t buffer, const f_array_lengths_t except);
#endif // _di_f_print_except_dynamic_
/**
* @see fputc()
*/
#ifndef _di_f_print_dynamic_except_partial_
- extern f_status_t f_print_except_dynamic_partial(FILE *output, const f_string_static_t buffer, const f_string_range_t range, const f_string_lengths_t except);
+ extern f_status_t f_print_except_dynamic_partial(FILE *output, const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except);
#endif // _di_f_print_except_dynamic_partial_
* @see write()
*/
#ifndef _di_f_print_to_
- extern f_status_t f_print_to(const int id, const f_string_t string, const f_string_length_t length);
+ extern f_status_t f_print_to(const int id, const f_string_t string, const f_array_length_t length);
#endif // _di_f_print_to_
/**
* @see write()
*/
#ifndef _di_f_print_to_except_
- extern f_status_t f_print_to_except(const int id, const f_string_t string, const f_string_length_t length, const f_string_lengths_t except);
+ extern f_status_t f_print_to_except(const int id, const f_string_t string, const f_array_length_t length, const f_array_lengths_t except);
#endif // _di_f_print_to_except_
/**
* @see write()
*/
#ifndef _di_f_print_to_except_dynamic_
- extern f_status_t f_print_to_except_dynamic(const int id, const f_string_static_t buffer, const f_string_lengths_t except);
+ extern f_status_t f_print_to_except_dynamic(const int id, const f_string_static_t buffer, const f_array_lengths_t except);
#endif // _di_f_print_to_except_dynamic_
/**
* @see write()
*/
#ifndef _di_f_print_to_except_dynamic_partial_
- extern f_status_t f_print_to_except_dynamic_partial(const int id, const f_string_static_t buffer, const f_string_range_t range, const f_string_lengths_t except);
+ extern f_status_t f_print_to_except_dynamic_partial(const int id, const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except);
#endif // _di_f_print_to_except_dynamic_partial_
#ifdef __cplusplus
#endif
#if !defined(_di_f_print_) || !defined(_di_f_print_dynamic_) || !defined(_di_f_print_dynamic_partial_)
- f_status_t private_f_print(FILE *output, const f_string_t string, const f_string_length_t length) {
- for (register f_string_length_t i = 0; i < length; ++i) {
+ f_status_t private_f_print(FILE *output, const f_string_t string, const f_array_length_t length) {
+ for (register f_array_length_t i = 0; i < length; ++i) {
if (string[i]) {
if (!fputc(string[i], output)) {
#endif // !defined(_di_f_print_) || !defined(_di_f_print_dynamic_) || !defined(_di_f_print_dynamic_partial_)
#if !defined(_di_f_print_except_) || !defined(_di_f_print_except_dynamic_) || !defined(_di_f_print_except_dynamic_partial_)
- f_status_t private_f_print_except(FILE *output, const f_string_t string, const f_string_length_t offset, const f_string_length_t stop, const f_string_lengths_t except) {
- f_string_length_t j = 0;
+ f_status_t private_f_print_except(FILE *output, const f_string_t string, const f_array_length_t offset, const f_array_length_t stop, const f_array_lengths_t except) {
+ f_array_length_t j = 0;
- for (register f_string_length_t i = offset; i < stop; ++i) {
+ for (register f_array_length_t i = offset; i < stop; ++i) {
for (; j < except.used && except.array[j] < i; ++j) {
// do nothing.
#endif // !defined(_di_f_print_except_) || !defined(_di_f_print_except_dynamic_) || !defined(_di_f_print_except_dynamic_partial_)
#if !defined(_di_f_print_to_) || !defined(_di_f_print_dynamic_to_) || !defined(_di_f_print_dynamic_partial_to_)
- f_status_t private_f_print_to(const int id, const f_string_t string, const f_string_length_t length) {
- register f_string_length_t i = 0;
+ f_status_t private_f_print_to(const int id, const f_string_t string, const f_array_length_t length) {
+ register f_array_length_t i = 0;
- f_string_length_t start = 0;
- f_string_length_t total = 0;
+ f_array_length_t start = 0;
+ f_array_length_t total = 0;
for (; i < length; ++i) {
#endif // !defined(_di_f_print_to_) || !defined(_di_f_print_dynamic_to_) || !defined(_di_f_print_dynamic_partial_to_)
#if !defined(_di_f_print_to_except_) || !defined(_di_f_print_to_except_dynamic_) || !defined(_di_f_print_to_except_dynamic_partial_)
- f_status_t private_f_print_to_except(const int id, const f_string_t string, const f_string_length_t offset, const f_string_length_t stop, const f_string_lengths_t except) {
- register f_string_length_t i = offset;
+ f_status_t private_f_print_to_except(const int id, const f_string_t string, const f_array_length_t offset, const f_array_length_t stop, const f_array_lengths_t except) {
+ register f_array_length_t i = offset;
- f_string_length_t j = 0;
- f_string_length_t start = offset;
- f_string_length_t total = 0;
+ f_array_length_t j = 0;
+ f_array_length_t start = offset;
+ f_array_length_t total = 0;
for (; i < stop; ++i) {
* @see f_print_dynamic_partial()
*/
#if !defined(_di_f_print_) || !defined(_di_f_print_dynamic_) || !defined(_di_f_print_dynamic_partial_)
- extern f_status_t private_f_print(FILE *output, const f_string_t string, const f_string_length_t length) f_gcc_attribute_visibility_internal;
+ extern f_status_t private_f_print(FILE *output, const f_string_t string, const f_array_length_t length) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_f_print_) || !defined(_di_f_print_dynamic_) || !defined(_di_f_print_dynamic_partial_)
/**
* @see f_print_except_dynamic_partial()
*/
#if !defined(_di_f_print_except_) || !defined(_di_f_print_except_dynamic_) || !defined(_di_f_print_except_dynamic_partial_)
- extern f_status_t private_f_print_except(FILE *output, const f_string_t string, const f_string_length_t offset, const f_string_length_t stop, const f_string_lengths_t except) f_gcc_attribute_visibility_internal;
+ extern f_status_t private_f_print_except(FILE *output, const f_string_t string, const f_array_length_t offset, const f_array_length_t stop, const f_array_lengths_t except) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_f_print_except_) || !defined(_di_f_print_except_dynamic_) || !defined(_di_f_print_except_dynamic_partial_)
/**
* @see f_print_to_dynamic_partial()
*/
#if !defined(_di_f_print_to_) || !defined(_di_f_print_to_dynamic_) || !defined(_di_f_print_to_dynamic_partial_)
- extern f_status_t private_f_print_to(const int id, const f_string_t string, const f_string_length_t length) f_gcc_attribute_visibility_internal;
+ extern f_status_t private_f_print_to(const int id, const f_string_t string, const f_array_length_t length) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_f_print_to_) || !defined(_di_f_print_to_dynamic_) || !defined(_di_f_print_to_dynamic_partial_)
/**
* @see f_print_to_except_dynamic_partial()
*/
#if !defined(_di_f_print_to_except_) || !defined(_di_f_print_to_except_dynamic_) || !defined(_di_f_print_to_except_dynamic_partial_)
- extern f_status_t private_f_print_to_except(const int id, const f_string_t string, const f_string_length_t offset, const f_string_length_t stop, const f_string_lengths_t except) f_gcc_attribute_visibility_internal;
+ extern f_status_t private_f_print_to_except(const int id, const f_string_t string, const f_array_length_t offset, const f_array_length_t stop, const f_array_lengths_t except) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_f_print_to_except_) || !defined(_di_f_print_to_except_dynamic_) || !defined(_di_f_print_to_except_dynamic_partial_)
#ifdef __cplusplus
strings->used++;
}
else {
- f_string_length_t total;
+ f_array_length_t total;
if (i + 1 >= serialize.used) {
total = (i - start) + 1;
return status;
}
- f_string_length_t total = (range.stop - range.start) + 1;
+ f_array_length_t total = (range.stop - range.start) + 1;
if (total >= dynamic->size) {
f_status_t status_allocation = F_none;
#endif
#if !defined(_di_f_string_append_) || !defined(_di_f_string_dynamic_append_) || !defined(_di_f_string_dynamic_mash_) || !defined(_di_f_string_mash_)
- f_status_t private_f_string_append(const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination) {
+ f_status_t private_f_string_append(const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination) {
if (destination->used + length > destination->size) {
const f_status_t status = private_f_string_dynamic_increase_by(length, destination);
#endif // !defined(_di_f_string_append_) || !defined(_di_f_string_dynamic_append_) || !defined(_di_f_string_dynamic_mash_) || !defined(_di_f_string_mash_)
#if !defined(_di_f_string_append_nulless_) || !defined(_di_f_string_dynamic_append_nulless_) || !defined(_di_f_string_dynamic_mash_nulless_) || !defined(_di_f_string_mash_nulless_)
- f_status_t private_f_string_append_nulless(const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination) {
+ f_status_t private_f_string_append_nulless(const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination) {
- if (destination->used + length > f_string_length_t_size) {
+ if (destination->used + length > f_array_length_t_size) {
return F_status_set_error(F_string_too_large);
}
f_status_t status = F_none;
- f_string_length_t i = 0;
- f_string_length_t first = 0;
- f_string_length_t size = 0;
+ f_array_length_t i = 0;
+ f_array_length_t first = 0;
+ f_array_length_t size = 0;
for (; i < length; i++) {
#endif // !defined(_di_f_string_append_nulless_) || !defined(_di_f_string_dynamic_append_nulless_) || !defined(_di_f_string_dynamic_mash_nulless_) || !defined(_di_f_string_mash_nulless_)
#if !defined(_di_f_string_dynamic_adjust_) || !defined(_di_f_string_dynamic_decimate_by_)
- f_status_t private_f_string_dynamic_adjust(const f_string_length_t length, f_string_dynamic_t *dynamic) {
+ f_status_t private_f_string_dynamic_adjust(const f_array_length_t length, f_string_dynamic_t *dynamic) {
f_status_t status = f_memory_adjust(dynamic->size, length, sizeof(f_string_t), (void **) & dynamic->string);
#endif // !defined(_di_f_string_dynamic_adjust_) || !defined(_di_f_string_dynamic_decimate_by_)
#if !defined(_di_f_string_dynamic_increase_by_) || !defined(_di_f_string_append_) || !defined(_di_f_string_dynamic_append_) || !defined(_di_f_string_append_mash_) || !defined(_di_f_string_dynamic_mash_) || !defined(_di_f_string_append_nulless_) || !defined(_di_f_string_dynamic_append_nulless_) || !defined(_di_f_string_mash_nulless_) || !defined(_di_f_string_dynamic_mash_nulless_) || !defined(_di_f_string_prepend_) || !defined(_di_f_string_dynamic_prepend_) || !defined(_di_f_string_prepend_nulless_) || !defined(_di_f_string_dynamic_prepend_nulless_)
- f_status_t private_f_string_dynamic_increase_by(const f_string_length_t amount, f_string_dynamic_t *dynamic) {
+ f_status_t private_f_string_dynamic_increase_by(const f_array_length_t amount, f_string_dynamic_t *dynamic) {
if (dynamic->used + amount > dynamic->size) {
- if (dynamic->used + amount > f_string_length_t_size) {
+ if (dynamic->used + amount > f_array_length_t_size) {
return F_status_set_error(F_string_too_large);
}
#endif // !defined(_di_f_string_dynamic_increase_by_) || !defined(_di_f_string_append_) || !defined(_di_f_string_dynamic_append_) || !defined(_di_f_string_append_mash_) || !defined(_di_f_string_dynamic_mash_) || !defined(_di_f_string_append_nulless_) || !defined(_di_f_string_dynamic_append_nulless_) || !defined(_di_f_string_mash_nulless_) || !defined(_di_f_string_dynamic_mash_nulless_) || !defined(_di_f_string_prepend_) || !defined(_di_f_string_dynamic_prepend_) || !defined(_di_f_string_prepend_nulless_) || !defined(_di_f_string_dynamic_prepend_nulless_)
#if !defined(_di_f_string_dynamic_decrease_by_) || !defined(_di_f_string_dynamic_increase_) || !defined(_di_f_string_dynamic_increase_by_) || !defined(_di_f_string_dynamic_terminate_) || !defined(_di_f_string_dynamic_terminate_after_)
- f_status_t private_f_string_dynamic_resize(const f_string_length_t length, f_string_dynamic_t *dynamic) {
+ f_status_t private_f_string_dynamic_resize(const f_array_length_t length, f_string_dynamic_t *dynamic) {
const f_status_t status = f_memory_resize(dynamic->size, length, sizeof(f_string_t), (void **) & dynamic->string);
#endif // !defined(_di_f_string_maps_decrease_by_) || !defined(_di_f_string_maps_increase_) || !defined(_di_f_string_maps_increase_by_) || !defined(_di_f_string_maps_terminate_) || !defined(_di_f_string_maps_terminate_after_)
#if !defined(_di_f_string_dynamic_mish_) || !defined(_di_f_string_dynamic_partial_mish_) || !defined(_di_f_string_dynamic_partial_prepend_assure_) || !defined(_di_f_string_dynamic_partial_prepend_) || !defined(_di_f_string_dynamic_prepend_assure_) || !defined(_di_f_string_dynamic_prepend_) || !defined(_di_f_string_mish_) || !defined(_di_f_string_prepend_assure_) || !defined(_di_f_string_prepend_)
- f_status_t private_f_string_prepend(const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination) {
+ f_status_t private_f_string_prepend(const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination) {
- if (destination->used + length > f_string_length_t_size) {
+ if (destination->used + length > f_array_length_t_size) {
return F_status_set_error(F_string_too_large);
}
#endif // !defined(_di_f_string_dynamic_mish_) || !defined(_di_f_string_dynamic_partial_mish_) || !defined(_di_f_string_dynamic_partial_prepend_assure_) || !defined(_di_f_string_dynamic_partial_prepend_) || !defined(_di_f_string_dynamic_prepend_assure_) || !defined(_di_f_string_dynamic_prepend_) || !defined(_di_f_string_mish_) || !defined(_di_f_string_prepend_assure_) || !defined(_di_f_string_prepend_)
#if !defined(_di_f_string_dynamic_mish_nulless_) || !defined(_di_f_string_dynamic_partial_mish_nulless_) || !defined(_di_f_string_dynamic_partial_prepend_assure_nulless_) || !defined(_di_f_string_dynamic_partial_prepend_nulless_) || !defined(_di_f_string_dynamic_prepend_assure_nulless_) || !defined(_di_f_string_dynamic_prepend_nulless_) || !defined(_di_f_string_mish_nulless_) || !defined(_di_f_string_prepend_assure_nulless_) || !defined(_di_f_string_prepend_nulless_)
- f_status_t private_f_string_prepend_nulless(const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination) {
+ f_status_t private_f_string_prepend_nulless(const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination) {
- if (destination->used + length > f_string_length_t_size) {
+ if (destination->used + length > f_array_length_t_size) {
return F_status_set_error(F_string_too_large);
}
f_status_t status = F_none;
- f_string_length_t first = 0;
- f_string_length_t offset = 0;
+ f_array_length_t first = 0;
+ f_array_length_t offset = 0;
- f_string_length_t size = 0;
+ f_array_length_t size = 0;
- for (f_string_length_t i = 0; i <= length; i++) {
+ for (f_array_length_t i = 0; i <= length; i++) {
if (i == length) {
if (i > first) {
* @see private_f_string_dynamic_increase_by()
*/
#if !defined(_di_f_string_append_) || !defined(_di_f_string_dynamic_append_) || !defined(_di_f_string_dynamic_mash_) || !defined(_di_f_string_mash_)
- extern f_status_t private_f_string_append(const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination) f_gcc_attribute_visibility_internal;
+ extern f_status_t private_f_string_append(const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_f_string_append_) || !defined(_di_f_string_dynamic_append_) || !defined(_di_f_string_dynamic_mash_) || !defined(_di_f_string_mash_)
/**
* @see private_f_string_dynamic_increase_by()
*/
#if !defined(_di_f_string_append_nulless_) || !defined(_di_f_string_dynamic_append_nulless_) || !defined(_di_f_string_dynamic_mash_nulless_) || !defined(_di_f_string_mash_nulless_)
- extern f_status_t private_f_string_append_nulless(const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination) f_gcc_attribute_visibility_internal;
+ extern f_status_t private_f_string_append_nulless(const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_f_string_append_nulless_) || !defined(_di_f_string_dynamic_append_nulless_) || !defined(_di_f_string_dynamic_mash_nulless_) || !defined(_di_f_string_mash_nulless_)
/**
* @see f_string_dynamic_decimate_by()
*/
#if !defined(_di_f_string_dynamic_adjust_) || !defined(_di_f_string_dynamic_decimate_by_)
- extern f_status_t private_f_string_dynamic_adjust(const f_string_length_t length, f_string_dynamic_t *string) f_gcc_attribute_visibility_internal;
+ extern f_status_t private_f_string_dynamic_adjust(const f_array_length_t length, f_string_dynamic_t *string) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_f_string_dynamic_adjust_) || !defined(_di_f_string_dynamic_decimate_by_)
/**
* @see f_string_prepend_nulless()
*/
#if !defined(_di_f_string_dynamic_increase_by_) || !defined(_di_f_string_append_) || !defined(_di_f_string_dynamic_append_) || !defined(_di_f_string_append_mash_) || !defined(_di_f_string_dynamic_mash_) || !defined(_di_f_string_append_nulless_) || !defined(_di_f_string_dynamic_append_nulless_) || !defined(_di_f_string_mash_nulless_) || !defined(_di_f_string_dynamic_mash_nulless_) || !defined(_di_f_string_prepend_) || !defined(_di_f_string_dynamic_prepend_) || !defined(_di_f_string_prepend_nulless_) || !defined(_di_f_string_dynamic_prepend_nulless_)
- extern f_status_t private_f_string_dynamic_increase_by(const f_string_length_t amount, f_string_dynamic_t *string) f_gcc_attribute_visibility_internal;
+ extern f_status_t private_f_string_dynamic_increase_by(const f_array_length_t amount, f_string_dynamic_t *string) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_f_string_dynamic_increase_by_) || !defined(_di_f_string_append_) || !defined(_di_f_string_dynamic_append_) || !defined(_di_f_string_append_mash_) || !defined(_di_f_string_dynamic_mash_) || !defined(_di_f_string_append_nulless_) || !defined(_di_f_string_dynamic_append_nulless_) || !defined(_di_f_string_mash_nulless_) || !defined(_di_f_string_dynamic_mash_nulless_) || !defined(_di_f_string_prepend_) || !defined(_di_f_string_dynamic_prepend_) || !defined(_di_f_string_prepend_nulless_) || !defined(_di_f_string_dynamic_prepend_nulless_)
/**
* @see f_string_dynamic_terminate_after()
*/
#if !defined(_di_f_string_dynamic_decrease_by_) || !defined(_di_f_string_dynamic_increase_) || !defined(_di_f_string_dynamic_increase_by_) || !defined(_di_f_string_dynamic_terminate_) || !defined(_di_f_string_dynamic_terminate_after_)
- extern f_status_t private_f_string_dynamic_resize(const f_string_length_t length, f_string_dynamic_t *string) f_gcc_attribute_visibility_internal;
+ extern f_status_t private_f_string_dynamic_resize(const f_array_length_t length, f_string_dynamic_t *string) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_f_string_dynamic_decrease_by_) || !defined(_di_f_string_dynamic_increase_) || !defined(_di_f_string_dynamic_increase_by_) || !defined(_di_f_string_dynamic_terminate_) || !defined(_di_f_string_dynamic_terminate_after_)
/**
* @see private_f_string_dynamic_increase_by()
*/
#if !defined(_di_f_string_dynamic_mish_) || !defined(_di_f_string_dynamic_partial_mish_) || !defined(_di_f_string_dynamic_partial_prepend_assure_) || !defined(_di_f_string_dynamic_partial_prepend_) || !defined(_di_f_string_dynamic_prepend_assure_) || !defined(_di_f_string_dynamic_prepend_) || !defined(_di_f_string_mish_) || !defined(_di_f_string_prepend_assure_) || !defined(_di_f_string_prepend_)
- extern f_status_t private_f_string_prepend(const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination) f_gcc_attribute_visibility_internal;
+ extern f_status_t private_f_string_prepend(const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_f_string_dynamic_mish_) || !defined(_di_f_string_dynamic_partial_mish_) || !defined(_di_f_string_dynamic_partial_prepend_assure_) || !defined(_di_f_string_dynamic_partial_prepend_) || !defined(_di_f_string_dynamic_prepend_assure_) || !defined(_di_f_string_dynamic_prepend_) || !defined(_di_f_string_mish_) || !defined(_di_f_string_prepend_assure_) || !defined(_di_f_string_prepend_)
/**
* @see private_f_string_dynamic_increase_by()
*/
#if !defined(_di_f_string_dynamic_mish_nulless_) || !defined(_di_f_string_dynamic_partial_mish_nulless_) || !defined(_di_f_string_dynamic_partial_prepend_assure_nulless_) || !defined(_di_f_string_dynamic_partial_prepend_nulless_) || !defined(_di_f_string_dynamic_prepend_assure_nulless_) || !defined(_di_f_string_dynamic_prepend_nulless_) || !defined(_di_f_string_mish_nulless_) || !defined(_di_f_string_prepend_assure_nulless_) || !defined(_di_f_string_prepend_nulless_)
- extern f_status_t private_f_string_prepend_nulless(const f_string_t source, f_string_length_t length, f_string_dynamic_t *destination) f_gcc_attribute_visibility_internal;
+ extern f_status_t private_f_string_prepend_nulless(const f_string_t source, f_array_length_t length, f_string_dynamic_t *destination) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_f_string_dynamic_mish_nulless_) || !defined(_di_f_string_dynamic_partial_mish_nulless_) || !defined(_di_f_string_dynamic_partial_prepend_assure_nulless_) || !defined(_di_f_string_dynamic_partial_prepend_nulless_) || !defined(_di_f_string_dynamic_prepend_assure_nulless_) || !defined(_di_f_string_dynamic_prepend_nulless_) || !defined(_di_f_string_mish_nulless_) || !defined(_di_f_string_prepend_assure_nulless_) || !defined(_di_f_string_prepend_nulless_)
/**
#define f_macro_string_t_destroy_simple(string, length) f_memory_adjust(length, 0, sizeof(f_string_t), (void **) & string);
#endif // _di_f_string_t_
-#ifndef _di_f_string_length_t_
- typedef f_number_unsigned_t f_string_length_t;
-
- // string size is set to (size - 4) to compensate for UTF-8 4-byte character such that it can easily act as a (size - 1) regardless of UTF-8.
- #define f_string_length_t_size 0xfffffffffffffffb
- #define f_string_length_t_size_max f_number_t_size_max_unsigned
-
- #define f_string_length_t_printf string_format_long_integer
-#endif // _di_f_string_length_t_
-
-/**
- * A structure containing an array of string lengths.
- *
- * array: the array of string lengths.
- * size: total amount of allocated space.
- * used: total number of allocated spaces used.
- */
-#ifndef _di_f_string_lengths_t_
- typedef struct {
- f_string_length_t *array;
-
- f_array_length_t size;
- f_array_length_t used;
- } f_string_lengths_t;
-
- #define f_string_lengths_t_initialize { 0, 0, 0 }
-
- #define f_macro_string_lengths_t_clear(string_lengths) f_macro_memory_structures_clear(string_lengths)
-
- #define f_macro_string_lengths_t_resize(status, string_lengths, length) f_macro_memory_structure_resize(status, string_lengths, f_string_length_t, length)
- #define f_macro_string_lengths_t_adjust(status, string_lengths, length) f_macro_memory_structure_adjust(status, string_lengths, f_string_length_t, length)
-
- #define f_macro_string_lengths_t_delete_simple(string_lengths) f_macro_memory_structure_delete_simple(string_lengths, f_string_length_t)
- #define f_macro_string_lengths_t_destroy_simple(string_lengths) f_macro_memory_structure_destroy_simple(string_lengths, f_string_length_t)
-
- #define f_macro_string_lengths_t_increase(status, string_lengths) f_macro_memory_structure_increase(status, string_lengths, f_string_length_t)
- #define f_macro_string_lengths_t_increase_by(status, string_lengths, amount) f_macro_memory_structure_increase_by(status, string_lengths, f_string_length_t, amount)
- #define f_macro_string_lengths_t_decrease_by(status, string_lengths, amount) f_macro_memory_structure_decrease_by(status, string_lengths, f_string_length_t, amount)
- #define f_macro_string_lengths_t_decimate_by(status, string_lengths, amount) f_macro_memory_structure_decimate_by(status, string_lengths, f_string_length_t, amount)
-#endif // _di_f_string_lengths_t_
-
-/**
- * This holds an array of f_string_lengths_t.
- *
- * array: the array of string lenths arrays.
- * size: total amount of allocated space.
- * used: total number of allocated spaces used.
- */
-#ifndef _di_f_string_lengthss_t_
- typedef struct {
- f_string_lengths_t *array;
-
- f_array_length_t size;
- f_array_length_t used;
- } f_string_lengthss_t;
-
- #define f_string_lengthss_t_initialize { 0, 0, 0 }
-
- #define f_macro_string_lengthss_t_clear(lengthss) f_macro_memory_structures_clear(lengthss)
-
- #define f_macro_string_lengthss_t_resize(status, lengthss, length) f_macro_memory_structures_resize(status, lengthss, f_string_length_t, f_string_lengths_t, length, f_array_length_t)
- #define f_macro_string_lengthss_t_adjust(status, lengthss, length) f_macro_memory_structures_adjust(status, lengthss, f_string_length_t, f_string_lengths_t, length, f_array_length_t)
-
- #define f_macro_string_lengthss_t_delete_simple(lengthss) f_macro_memory_structures_delete_simple(lengthss, f_string_length_t, f_string_lengths_t)
- #define f_macro_string_lengthss_t_destroy_simple(lengthss) f_macro_memory_structures_destroy_simple(lengthss, f_string_length_t, f_string_lengths_t)
-
- #define f_macro_string_lengthss_t_increase(status, string_lengths) f_macro_memory_structures_increase(status, string_lengths, f_string_length_t, f_array_length_t)
- #define f_macro_string_lengthss_t_increase_by(status, string_lengths, amount) f_macro_memory_structures_increase_by(status, string_lengths, f_string_length_t, f_array_length_t, amount)
- #define f_macro_string_lengthss_t_decrease_by(status, string_lengths, amount) f_macro_memory_structures_decrease_by(status, string_lengths, f_string_length_t, f_string_lengths_t, f_array_length_t, amount)
- #define f_macro_string_lengthss_t_decimate_by(status, string_lengths, amount) f_macro_memory_structures_decimate_by(status, string_lengths, f_string_length_t, f_string_lengths_t, f_array_length_t, amount)
-#endif // _di_f_string_lengthss_t_
-
/**
* Define the end of line character.
* FLL forbids '\r' and '\r\n' as end of line characters, \r will be silently ignored.
#endif
#ifndef _di_f_string_append_
- f_status_t f_string_append(const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination) {
+ f_status_t f_string_append(const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
#endif // _di_f_string_append_
#ifndef _di_f_string_append_assure_
- f_status_t f_string_append_assure(const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination) {
+ f_status_t f_string_append_assure(const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
if (!length) return F_data_not_eos;
if (destination->used < length) return private_f_string_append(source, length, destination);
- f_string_length_t i = 1;
- f_string_length_t j = 1;
+ f_array_length_t i = 1;
+ f_array_length_t j = 1;
while (i <= length && j <= destination->used) {
if (!source[length - i]) {
#endif // _di_f_string_append_assure_
#ifndef _di_f_string_append_assure_nulless_
- f_status_t f_string_append_assure_nulless(const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination) {
+ f_status_t f_string_append_assure_nulless(const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
return private_f_string_append_nulless(source, length, destination);
}
- f_string_length_t i = 1;
- f_string_length_t j = 1;
+ f_array_length_t i = 1;
+ f_array_length_t j = 1;
while (i <= length && j <= destination->used) {
if (!source[length - i]) {
#endif // _di_f_string_append_assure_nulless_
#ifndef _di_f_string_append_nulless_
- f_status_t f_string_append_nulless(const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination) {
+ f_status_t f_string_append_nulless(const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
return private_f_string_append(source.string, source.used, destination);
}
- f_string_length_t i = 1;
- f_string_length_t j = 1;
+ f_array_length_t i = 1;
+ f_array_length_t j = 1;
while (i <= source.used && j <= destination->used) {
if (!source.string[source.used - i]) {
return private_f_string_append_nulless(source.string, source.used, destination);
}
- f_string_length_t i = 1;
- f_string_length_t j = 1;
+ f_array_length_t i = 1;
+ f_array_length_t j = 1;
while (i <= source.used && j <= destination->used) {
if (!source.string[source.used - i]) {
#endif // _di_f_string_dynamic_append_nulless_
#ifndef _di_f_string_dynamic_mash_
- f_status_t f_string_dynamic_mash(const f_string_t glue, const f_string_length_t glue_length, const f_string_static_t source, f_string_dynamic_t *destination) {
+ f_status_t f_string_dynamic_mash(const f_string_t glue, const f_array_length_t glue_length, const f_string_static_t source, f_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
#endif // _di_f_string_dynamic_mash_
#ifndef _di_f_string_dynamic_mash_nulless_
- f_status_t f_string_dynamic_mash_nulless(const f_string_t glue, const f_string_length_t glue_length, const f_string_static_t source, f_string_dynamic_t *destination) {
+ f_status_t f_string_dynamic_mash_nulless(const f_string_t glue, const f_array_length_t glue_length, const f_string_static_t source, f_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
#endif // _di_f_string_dynamic_mash_nulless_
#ifndef _di_f_string_dynamic_mish_
- f_status_t f_string_dynamic_mish(const f_string_t glue, const f_string_length_t glue_length, const f_string_static_t source, f_string_dynamic_t *destination) {
+ f_status_t f_string_dynamic_mish(const f_string_t glue, const f_array_length_t glue_length, const f_string_static_t source, f_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
#endif // _di_f_string_dynamic_mish_
#ifndef _di_f_string_dynamic_mish_nulless_
- f_status_t f_string_dynamic_mish_nulless(const f_string_t glue, const f_string_length_t glue_length, const f_string_static_t source, f_string_dynamic_t *destination) {
+ f_status_t f_string_dynamic_mish_nulless(const f_string_t glue, const f_array_length_t glue_length, const f_string_static_t source, f_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
if (!source.used) return F_data_not_eos;
if (range.start > range.stop) return F_data_not_stop;
- const f_string_length_t length = (range.stop - range.start) + 1;
+ const f_array_length_t length = (range.stop - range.start) + 1;
if (destination->used < length) {
return private_f_string_append(source.string + range.start, length, destination);
}
- f_string_length_t i = 1;
- f_string_length_t j = 1;
+ f_array_length_t i = 1;
+ f_array_length_t j = 1;
while (i <= length && j <= destination->used) {
if (!source.string[range.stop - i]) {
if (!source.used) return F_data_not_eos;
if (range.start > range.stop) return F_data_not_stop;
- const f_string_length_t length = (range.stop - range.start) + 1;
+ const f_array_length_t length = (range.stop - range.start) + 1;
if (destination->used < length) {
return private_f_string_append_nulless(source.string + range.start, length, destination);
}
- f_string_length_t i = 1;
- f_string_length_t j = 1;
+ f_array_length_t i = 1;
+ f_array_length_t j = 1;
while (i <= length && j <= destination->used) {
if (!source.string[range.stop - i]) {
#endif // _di_f_string_dynamic_partial_append_nulless_
#ifndef _di_f_string_dynamic_partial_mash_
- f_status_t f_string_dynamic_partial_mash(const f_string_t glue, const f_string_length_t glue_length, const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination) {
+ f_status_t f_string_dynamic_partial_mash(const f_string_t glue, const f_array_length_t glue_length, const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (source.used <= range.stop) return F_status_set_error(F_parameter);
if (!destination) return F_status_set_error(F_parameter);
#endif // _di_f_string_dynamic_partial_mash_
#ifndef _di_f_string_dynamic_partial_mash_nulless_
- f_status_t f_string_dynamic_partial_mash_nulless(const f_string_t glue, const f_string_length_t glue_length, const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination) {
+ f_status_t f_string_dynamic_partial_mash_nulless(const f_string_t glue, const f_array_length_t glue_length, const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (source.used <= range.stop) return F_status_set_error(F_parameter);
if (!destination) return F_status_set_error(F_parameter);
#endif // _di_f_string_dynamic_partial_mash_nulless_
#ifndef _di_f_string_dynamic_partial_mish_
- f_status_t f_string_partial_dynamic_mish(const f_string_t glue, const f_string_length_t glue_length, const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination) {
+ f_status_t f_string_partial_dynamic_mish(const f_string_t glue, const f_array_length_t glue_length, const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (source.used <= range.stop) return F_status_set_error(F_parameter);
if (!destination) return F_status_set_error(F_parameter);
#endif // _di_f_string_dynamic_partial_mish_
#ifndef _di_f_string_dynamic_partial_mish_nulless_
- f_status_t f_string_dynamic_partial_mish_nulless(const f_string_t glue, const f_string_length_t glue_length, const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination) {
+ f_status_t f_string_dynamic_partial_mish_nulless(const f_string_t glue, const f_array_length_t glue_length, const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (source.used <= range.stop) return F_status_set_error(F_parameter);
if (!destination) return F_status_set_error(F_parameter);
if (!source.used) return F_data_not_eos;
if (range.start > range.stop) return F_data_not_stop;
- const f_string_length_t length = (range.stop - range.start) + 1;
+ const f_array_length_t length = (range.stop - range.start) + 1;
if (destination->used < length) {
return private_f_string_prepend(source.string + range.start, length, destination);
}
- f_string_length_t i = 0;
- f_string_length_t j = 0;
+ f_array_length_t i = 0;
+ f_array_length_t j = 0;
while (i < length && j < destination->used) {
if (!source.string[i + range.start]) {
if (!source.used) return F_data_not_eos;
if (range.start > range.stop) return F_data_not_stop;
- const f_string_length_t length = (range.stop - range.start) + 1;
+ const f_array_length_t length = (range.stop - range.start) + 1;
if (destination->used < length) {
return private_f_string_prepend_nulless(source.string + range.start, length, destination);
}
- f_string_length_t i = 0;
- f_string_length_t j = 0;
+ f_array_length_t i = 0;
+ f_array_length_t j = 0;
while (i < length && j < destination->used) {
if (!source.string[i + range.start]) {
return private_f_string_prepend(source.string, source.used, destination);
}
- f_string_length_t i = 0;
- f_string_length_t j = 0;
+ f_array_length_t i = 0;
+ f_array_length_t j = 0;
while (i < source.used && j < destination->used) {
if (!source.string[i]) {
return private_f_string_prepend_nulless(source.string, source.used, destination);
}
- f_string_length_t i = 0;
- f_string_length_t j = 0;
+ f_array_length_t i = 0;
+ f_array_length_t j = 0;
while (i < source.used && j < destination->used) {
if (!source.string[i]) {
return F_none;
}
- if (destination->used == f_string_length_t_size) {
+ if (destination->used == f_array_length_t_size) {
return F_status_set_error(F_string_too_large);
}
- const f_string_length_t total = destination->used + 1;
+ const f_array_length_t total = destination->used + 1;
if (total > destination->size) {
const f_status_t status = private_f_string_dynamic_resize(total, destination);
} // for
}
- if (destination->used == f_string_length_t_size) {
+ if (destination->used == f_array_length_t_size) {
return F_status_set_error(F_string_too_large);
}
- const f_string_length_t total = destination->used + 1;
+ const f_array_length_t total = destination->used + 1;
if (total > destination->size) {
const f_status_t status = private_f_string_dynamic_resize(total, destination);
#endif // _di_f_string_dynamic_terminate_after_
#ifndef _di_f_string_mash_
- f_status_t f_string_mash(const f_string_t glue, const f_string_length_t glue_length, const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination) {
+ f_status_t f_string_mash(const f_string_t glue, const f_array_length_t glue_length, const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
#endif // _di_f_string_mash_
#ifndef _di_f_string_mash_nulless_
- f_status_t f_string_mash_nulless(const f_string_t glue, const f_string_length_t glue_length, const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination) {
+ f_status_t f_string_mash_nulless(const f_string_t glue, const f_array_length_t glue_length, const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
#endif // _di_f_string_mash_nulless_
#ifndef _di_f_string_mish_
- f_status_t f_string_mish(const f_string_t glue, const f_string_length_t glue_length, const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination) {
+ f_status_t f_string_mish(const f_string_t glue, const f_array_length_t glue_length, const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
#endif // _di_f_string_mish_
#ifndef _di_f_string_mish_nulless_
- f_status_t f_string_mish_nulless(const f_string_t glue, const f_string_length_t glue_length, const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination) {
+ f_status_t f_string_mish_nulless(const f_string_t glue, const f_array_length_t glue_length, const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
#endif // _di_f_string_mish_nulless_
#ifndef _di_f_string_prepend_
- f_status_t f_string_prepend(const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination) {
+ f_status_t f_string_prepend(const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
#endif // _di_f_string_prepend_
#ifndef _di_f_string_prepend_assure_
- f_status_t f_string_prepend_assure(const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination) {
+ f_status_t f_string_prepend_assure(const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
if (!length) return F_data_not_eos;
if (destination->used < length) return private_f_string_prepend(source, length, destination);
- f_string_length_t i = 0;
- f_string_length_t j = 0;
+ f_array_length_t i = 0;
+ f_array_length_t j = 0;
while (i < length && j < destination->used) {
if (!source[i]) {
#endif // _di_f_string_prepend_assure_
#ifndef _di_f_string_prepend_assure_nulless_
- f_status_t f_string_prepend_assure_nulless(const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination) {
+ f_status_t f_string_prepend_assure_nulless(const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
if (!length) return F_data_not_eos;
if (destination->used < length) return private_f_string_prepend_nulless(source, length, destination);
- f_string_length_t i = 0;
- f_string_length_t j = 0;
+ f_array_length_t i = 0;
+ f_array_length_t j = 0;
while (i < length && j < destination->used) {
if (!source[i]) {
#endif // _di_f_string_prepend_assure_nulless_
#ifndef _di_f_string_prepend_nulless_
- f_status_t f_string_prepend_nulless(const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination) {
+ f_status_t f_string_prepend_nulless(const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
*
* Provides string capabilities.
*
- * It is highly recommended that all string arrays are set to a max size of f_string_length_t_size.
- * Any calculations against the length (aka: string.used) can always perform (A < B) operators such that the B is f_string_length_t_size + 1 without integer overflow.
+ * It is highly recommended that all string arrays are set to a max size of f_array_length_t_size.
+ * Any calculations against the length (aka: string.used) can always perform (A < B) operators such that the B is f_array_length_t_size + 1 without integer overflow.
*/
#ifndef _F_string_h
#define _F_string_h
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_f_string_append_
- extern f_status_t f_string_append(const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination);
+ extern f_status_t f_string_append(const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination);
#endif // _di_f_string_append_
/**
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_f_string_append_assure_
- extern f_status_t f_string_append_assure(const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination);
+ extern f_status_t f_string_append_assure(const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination);
#endif // _di_f_string_append_assure_
/**
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_f_string_append_assure_nulless_
- extern f_status_t f_string_append_assure_nulless(const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination);
+ extern f_status_t f_string_append_assure_nulless(const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination);
#endif // _di_f_string_append_assure_nulless_
/**
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_f_string_append_nulless_
- extern f_status_t f_string_append_nulless(const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination);
+ extern f_status_t f_string_append_nulless(const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination);
#endif // _di_f_string_append_nulless_
/**
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_f_string_dynamic_mash_
- extern f_status_t f_string_dynamic_mash(const f_string_t glue, const f_string_length_t glue_length, const f_string_static_t source, f_string_dynamic_t *destination);
+ extern f_status_t f_string_dynamic_mash(const f_string_t glue, const f_array_length_t glue_length, const f_string_static_t source, f_string_dynamic_t *destination);
#endif // _di_f_string_dynamic_mash_
/**
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_f_string_dynamic_mash_nulless_
- extern f_status_t f_string_dynamic_mash_nulless(const f_string_t glue, const f_string_length_t glue_length, const f_string_static_t source, f_string_dynamic_t *destination);
+ extern f_status_t f_string_dynamic_mash_nulless(const f_string_t glue, const f_array_length_t glue_length, const f_string_static_t source, f_string_dynamic_t *destination);
#endif // _di_f_string_dynamic_mash_nulless_
/**
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_f_string_dynamic_mish_
- extern f_status_t f_string_dynamic_mish(const f_string_t glue, const f_string_length_t glue_length, const f_string_static_t source, f_string_dynamic_t *destination);
+ extern f_status_t f_string_dynamic_mish(const f_string_t glue, const f_array_length_t glue_length, const f_string_static_t source, f_string_dynamic_t *destination);
#endif // _di_f_string_dynamic_mish_
/**
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_f_string_dynamic_mish_nulless_
- extern f_status_t f_string_dynamic_mish_nulless(const f_string_t glue, const f_string_length_t glue_length, const f_string_static_t source, f_string_dynamic_t *destination);
+ extern f_status_t f_string_dynamic_mish_nulless(const f_string_t glue, const f_array_length_t glue_length, const f_string_static_t source, f_string_dynamic_t *destination);
#endif // _di_f_string_dynamic_mish_nulless_
/**
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_f_string_dynamic_partial_mash_
- extern f_status_t f_string_dynamic_partial_mash(const f_string_t glue, const f_string_length_t glue_length, const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination);
+ extern f_status_t f_string_dynamic_partial_mash(const f_string_t glue, const f_array_length_t glue_length, const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination);
#endif // _di_f_string_dynamic_partial_mash_
/**
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_f_string_dynamic_partial_mash_nulless_
- extern f_status_t f_string_dynamic_partial_mash_nulless(const f_string_t glue, const f_string_length_t glue_length, const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination);
+ extern f_status_t f_string_dynamic_partial_mash_nulless(const f_string_t glue, const f_array_length_t glue_length, const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination);
#endif // _di_f_string_dynamic_partial_mash_nulless_
/**
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_f_string_dynamic_partial_mish_
- extern f_status_t f_string_dynamic_partial_mish(const f_string_t glue, const f_string_length_t glue_length, const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination);
+ extern f_status_t f_string_dynamic_partial_mish(const f_string_t glue, const f_array_length_t glue_length, const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination);
#endif // _di_f_string_dynamic_partial_mish_
/**
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_f_string_dynamic_partial_mish_nulless_
- extern f_status_t f_string_dynamic_partial_mish_nulless(const f_string_t glue, const f_string_length_t glue_length, const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination);
+ extern f_status_t f_string_dynamic_partial_mish_nulless(const f_string_t glue, const f_array_length_t glue_length, const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination);
#endif // _di_f_string_dynamic_partial_mish_nulless_
/**
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_f_string_mash_
- extern f_status_t f_string_mash(const f_string_t glue, const f_string_length_t glue_length, const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination);
+ extern f_status_t f_string_mash(const f_string_t glue, const f_array_length_t glue_length, const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination);
#endif // _di_f_string_mash_
/**
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_f_string_mash_nulless_
- extern f_status_t f_string_mash_nulless(const f_string_t glue, const f_string_length_t glue_length, const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination);
+ extern f_status_t f_string_mash_nulless(const f_string_t glue, const f_array_length_t glue_length, const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination);
#endif // _di_f_string_mash_nulless_
/**
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_f_string_mish_
- extern f_status_t f_string_mish(const f_string_t glue, const f_string_length_t glue_length, const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination);
+ extern f_status_t f_string_mish(const f_string_t glue, const f_array_length_t glue_length, const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination);
#endif // _di_f_string_mish_
/**
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_f_string_mish_nulless_
- extern f_status_t f_string_mish_nulless(const f_string_t glue, const f_string_length_t glue_length, const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination);
+ extern f_status_t f_string_mish_nulless(const f_string_t glue, const f_array_length_t glue_length, const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination);
#endif // _di_f_string_mish_nulless_
/**
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_f_string_prepend_
- extern f_status_t f_string_prepend(const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination);
+ extern f_status_t f_string_prepend(const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination);
#endif // _di_f_string_prepend_
/**
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_f_string_prepend_assure_
- extern f_status_t f_string_prepend_assure(const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination);
+ extern f_status_t f_string_prepend_assure(const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination);
#endif // _di_f_string_prepend_assure_
/**
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_f_string_prepend_assure_nulless_
- extern f_status_t f_string_prepend_assure_nulless(const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination);
+ extern f_status_t f_string_prepend_assure_nulless(const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination);
#endif // _di_f_string_prepend_assure_nulless_
/**
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_f_string_prepend_nulless_
- extern f_status_t f_string_prepend_nulless(const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination);
+ extern f_status_t f_string_prepend_nulless(const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination);
#endif // _di_f_string_prepend_nulless_
/**
#endif // _di_f_string_static_empty_s_
#ifndef _di_f_string_dynamic_adjust_
- f_status_t f_string_dynamic_adjust(const f_string_length_t length, f_string_dynamic_t *dynamic) {
+ f_status_t f_string_dynamic_adjust(const f_array_length_t length, f_string_dynamic_t *dynamic) {
#ifndef _di_level_0_parameter_checking_
if (!dynamic) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_string_dynamic_adjust_
#ifndef _di_f_string_dynamic_decimate_by_
- f_status_t f_string_dynamic_decimate_by(const f_string_length_t amount, f_string_dynamic_t *dynamic) {
+ f_status_t f_string_dynamic_decimate_by(const f_array_length_t amount, f_string_dynamic_t *dynamic) {
#ifndef _di_level_0_parameter_checking_
if (!amount) return F_status_set_error(F_parameter);
if (!dynamic) return F_status_set_error(F_parameter);
#endif // _di_f_string_dynamic_decimate_by_
#ifndef _di_f_string_dynamic_decrease_by_
- f_status_t f_string_dynamic_decrease_by(const f_string_length_t amount, f_string_dynamic_t *dynamic) {
+ f_status_t f_string_dynamic_decrease_by(const f_array_length_t amount, f_string_dynamic_t *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);
if (dynamic->used + 1 > dynamic->size) {
f_array_length_t size = dynamic->used + f_memory_default_allocation_step;
- if (size > f_string_length_t_size) {
- if (dynamic->used + 1 > f_string_length_t_size) {
+ if (size > f_array_length_t_size) {
+ if (dynamic->used + 1 > f_array_length_t_size) {
return F_status_set_error(F_string_too_large);
}
- size = f_string_length_t_size;
+ size = f_array_length_t_size;
}
return private_f_string_dynamic_resize(size, dynamic);
#endif // _di_f_string_dynamic_increase_
#ifndef _di_f_string_dynamic_increase_by_
- f_status_t f_string_dynamic_increase_by(const f_string_length_t amount, f_string_dynamic_t *dynamic) {
+ f_status_t f_string_dynamic_increase_by(const f_array_length_t amount, f_string_dynamic_t *dynamic) {
#ifndef _di_level_0_parameter_checking_
if (!dynamic) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_string_dynamic_increase_by_
#ifndef _di_f_string_dynamic_resize_
- f_status_t f_string_dynamic_resize(const f_string_length_t length, f_string_dynamic_t *dynamic) {
+ f_status_t f_string_dynamic_resize(const f_array_length_t length, f_string_dynamic_t *dynamic) {
#ifndef _di_level_0_parameter_checking_
if (!dynamic) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
typedef struct {
f_string_t string;
- f_string_length_t size;
- f_string_length_t used;
+ f_array_length_t size;
+ f_array_length_t used;
} f_string_static_t;
#define f_string_static_t_initialize { 0, 0, 0 }
* F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_f_string_dynamic_adjust_
- extern f_status_t f_string_dynamic_adjust(const f_string_length_t length, f_string_dynamic_t *dynamic);
+ extern f_status_t f_string_dynamic_adjust(const f_array_length_t length, f_string_dynamic_t *dynamic);
#endif // _di_f_string_dynamic_adjust_
/**
* F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_f_string_dynamic_decrease_by_
- extern f_status_t f_string_dynamic_decrease_by(const f_string_length_t amount, f_string_dynamic_t *dynamic);
+ extern f_status_t f_string_dynamic_decrease_by(const f_array_length_t amount, f_string_dynamic_t *dynamic);
#endif // _di_f_string_dynamic_decrease_by_
/**
* Resize the dynamic string to a larger size.
*
* This will resize making the string larger based on the given length.
- * If the given length is too large for the buffer, then attempt to set max buffer size (f_string_length_t_size).
+ * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size).
* If already set to the maximum buffer size, then the resize will fail.
*
* @param amount
* Resize the dynamic string to a larger size.
*
* This will resize making the string larger based on the given length.
- * If the given length is too large for the buffer, then attempt to set max buffer size (f_string_length_t_size).
+ * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size).
* If already set to the maximum buffer size, then the resize will fail.
*
* @param amount
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_f_string_dynamic_increase_by_
- extern f_status_t f_string_dynamic_increase_by(const f_string_length_t amount, f_string_dynamic_t *dynamic);
+ extern f_status_t f_string_dynamic_increase_by(const f_array_length_t amount, f_string_dynamic_t *dynamic);
#endif // _di_f_string_dynamic_increase_by_
/**
* F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_f_string_dynamic_resize_
- extern f_status_t f_string_dynamic_resize(const f_string_length_t length, f_string_dynamic_t *dynamic);
+ extern f_status_t f_string_dynamic_resize(const f_array_length_t length, f_string_dynamic_t *dynamic);
#endif // _di_f_string_dynamic_resize_
/**
* @param length
* The new size to use.
* @param dynamics
- * The string array to resize.
+ * The array to resize.
*
* @return
* F_none on success.
* @param amount
* A positive number representing how much to decimate the size by.
* @param dynamics
- * The string array to resize.
+ * The array to resize.
*
* @return
* F_none on success.
* @param amount
* A positive number representing how much to decrease the size by.
* @param dynamics
- * The string array to resize.
+ * The array to resize.
*
* @return
* F_none on success.
* If already set to the maximum buffer size, then the resize will fail.
*
* @param dynamics
- * The string array to resize.
+ * The array to resize.
*
* @return
* F_none on success.
/**
* Resize the dynamic string array to a larger size.
*
- * This will resize making the string larger based on the given length.
+ * This will resize making the array larger based on the given length.
* If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size).
* If already set to the maximum buffer size, then the resize will fail.
*
* @param amount
* A positive number representing how much to increase the size by.
* @param dynamics
- * The string array to resize.
+ * The array to resize.
*
* @return
* F_none on success.
* @param length
* The new size to use.
* @param dynamics
- * The string array to resize.
+ * The array to resize.
*
* @return
* F_none on success.
*/
#ifndef _di_f_string_quantity_t_
typedef struct {
- f_string_length_t start;
- f_string_length_t total;
+ f_array_length_t start;
+ f_array_length_t total;
} f_string_quantity_t;
#define f_string_quantity_t_initialize { 0, 0 }
*/
#ifndef _di_f_string_range_t_
typedef struct {
- f_string_length_t start;
- f_string_length_t stop;
+ f_array_length_t start;
+ f_array_length_t stop;
} f_string_range_t;
#define f_string_range_t_initialize { 1, 0 }
#ifndef _di_f_thread_condition_t_
typedef pthread_cond_t f_thread_condition_t;
- #define f_thread_condition_t_initialize PTHREAD_COND_INITIALIZER;
+ #define f_thread_condition_t_initialize PTHREAD_COND_INITIALIZER
#define f_macro_thread_condition_t_clear(condition) condition = 0;
#endif // !defined(_di_f_utf_character_is_zero_width_) || !defined(_di_f_utf_is_zero_width_)
#if !defined(_di_f_utf_string_append_) || !defined(_di_f_utf_string_dynamic_append_) || !defined(_di_f_utf_string_dynamic_mash_) || !defined(_di_f_utf_string_mash_)
- f_status_t private_f_utf_string_append(const f_utf_string_t source, const f_string_length_t length, f_utf_string_dynamic_t *destination) {
+ f_status_t private_f_utf_string_append(const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination) {
if (destination->used + length > destination->size) {
const f_status_t status = private_f_utf_string_dynamic_increase_by(length, destination);
#endif // !defined(_di_f_utf_string_append_) || !defined(_di_f_utf_string_dynamic_append_) || !defined(_di_f_utf_string_dynamic_mash_) || !defined(_di_f_utf_string_mash_)
#if !defined(_di_f_utf_string_append_nulless_) || !defined(_di_f_utf_string_dynamic_append_nulless_) || !defined(_di_f_utf_string_dynamic_mash_nulless_) || !defined(_di_f_utf_string_mash_nulless_)
- f_status_t private_f_utf_string_append_nulless(const f_utf_string_t source, const f_string_length_t length, f_utf_string_dynamic_t *destination) {
+ f_status_t private_f_utf_string_append_nulless(const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination) {
- if (destination->used + length > f_string_length_t_size) {
+ if (destination->used + length > f_array_length_t_size) {
return F_status_set_error(F_string_too_large);
}
f_status_t status = F_none;
- f_string_length_t i = 0;
- f_string_length_t first = 0;
- f_string_length_t size = 0;
+ f_array_length_t i = 0;
+ f_array_length_t first = 0;
+ f_array_length_t size = 0;
for (; i < length; i++) {
#endif // !defined(_di_f_utf_string_append_nulless_) || !defined(_di_f_utf_string_dynamic_append_nulless_) || !defined(_di_f_utf_string_dynamic_mash_nulless_) || !defined(_di_f_utf_string_mash_nulless_)
#if !defined(_di_f_utf_string_dynamic_adjust_) || !defined(_di_f_utf_string_dynamic_decimate_by_)
- f_status_t private_f_utf_string_dynamic_adjust(const f_string_length_t length, f_utf_string_dynamic_t *dynamic) {
+ f_status_t private_f_utf_string_dynamic_adjust(const f_array_length_t length, f_utf_string_dynamic_t *dynamic) {
f_status_t status = f_memory_adjust(dynamic->size, length, sizeof(f_utf_string_t), (void **) & dynamic->string);
#endif // !defined(_di_f_utf_string_dynamic_adjust_) || !defined(_di_f_utf_string_dynamic_decimate_by_)
#if !defined(_di_f_utf_string_dynamic_increase_by_) || !defined(_di_f_utf_string_append_) || !defined(_di_f_utf_string_dynamic_append_) || !defined(_di_f_utf_string_append_mash_) || !defined(_di_f_utf_string_dynamic_mash_) || !defined(_di_f_utf_string_append_nulless_) || !defined(_di_f_utf_string_dynamic_append_nulless_) || !defined(_di_f_utf_string_mash_nulless_) || !defined(_di_f_utf_string_dynamic_mash_nulless_) || !defined(_di_f_utf_string_prepend_) || !defined(_di_f_utf_string_dynamic_prepend_) || !defined(_di_f_utf_string_prepend_nulless_) || !defined(_di_f_utf_string_dynamic_prepend_nulless_)
- f_status_t private_f_utf_string_dynamic_increase_by(const f_string_length_t amount, f_utf_string_dynamic_t *dynamic) {
+ f_status_t private_f_utf_string_dynamic_increase_by(const f_array_length_t amount, f_utf_string_dynamic_t *dynamic) {
if (dynamic->used + amount > dynamic->size) {
- if (dynamic->used + amount > f_string_length_t_size) {
+ if (dynamic->used + amount > f_array_length_t_size) {
return F_status_set_error(F_string_too_large);
}
#endif // !defined(_di_f_utf_string_dynamic_increase_by_) || !defined(_di_f_utf_string_append_) || !defined(_di_f_utf_string_dynamic_append_) || !defined(_di_f_utf_string_append_mash_) || !defined(_di_f_utf_string_dynamic_mash_) || !defined(_di_f_utf_string_append_nulless_) || !defined(_di_f_utf_string_dynamic_append_nulless_) || !defined(_di_f_utf_string_mash_nulless_) || !defined(_di_f_utf_string_dynamic_mash_nulless_) || !defined(_di_f_utf_string_prepend_) || !defined(_di_f_utf_string_dynamic_prepend_) || !defined(_di_f_utf_string_prepend_nulless_) || !defined(_di_f_utf_string_dynamic_prepend_nulless_)
#if !defined(_di_f_utf_string_dynamic_decrease_by_) || !defined(_di_f_utf_string_dynamic_increase_) || !defined(_di_f_utf_string_dynamic_increase_by_) || !defined(_di_f_utf_string_dynamic_terminate_) || !defined(_di_f_utf_string_dynamic_terminate_after_)
- f_status_t private_f_utf_string_dynamic_resize(const f_string_length_t length, f_utf_string_dynamic_t *dynamic) {
+ f_status_t private_f_utf_string_dynamic_resize(const f_array_length_t length, f_utf_string_dynamic_t *dynamic) {
const f_status_t status = f_memory_resize(dynamic->size, length, sizeof(f_utf_string_t), (void **) & dynamic->string);
#endif // !defined(_di_f_utf_string_maps_decrease_by_) || !defined(_di_f_utf_string_maps_increase_) || !defined(_di_f_utf_string_maps_increase_by_) || !defined(_di_f_utf_string_maps_terminate_) || !defined(_di_f_utf_string_maps_terminate_after_)
#if !defined(_di_f_utf_string_dynamic_mish_) || !defined(_di_f_utf_string_dynamic_partial_mish_) || !defined(_di_f_utf_string_dynamic_partial_prepend_assure_) || !defined(_di_f_utf_string_dynamic_partial_prepend_) || !defined(_di_f_utf_string_dynamic_prepend_assure_) || !defined(_di_f_utf_string_dynamic_prepend_) || !defined(_di_f_utf_string_mish_) || !defined(_di_f_utf_string_prepend_assure_) || !defined(_di_f_utf_string_prepend_)
- f_status_t private_f_utf_string_prepend(const f_utf_string_t source, const f_string_length_t length, f_utf_string_dynamic_t *destination) {
+ f_status_t private_f_utf_string_prepend(const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination) {
- if (destination->used + length > f_string_length_t_size) {
+ if (destination->used + length > f_array_length_t_size) {
return F_status_set_error(F_string_too_large);
}
#endif // !defined(_di_f_utf_string_dynamic_mish_) || !defined(_di_f_utf_string_dynamic_partial_mish_) || !defined(_di_f_utf_string_dynamic_partial_prepend_assure_) || !defined(_di_f_utf_string_dynamic_partial_prepend_) || !defined(_di_f_utf_string_dynamic_prepend_assure_) || !defined(_di_f_utf_string_dynamic_prepend_) || !defined(_di_f_utf_string_mish_) || !defined(_di_f_utf_string_prepend_assure_) || !defined(_di_f_utf_string_prepend_)
#if !defined(_di_f_utf_string_dynamic_mish_nulless_) || !defined(_di_f_utf_string_dynamic_partial_mish_nulless_) || !defined(_di_f_utf_string_dynamic_partial_prepend_assure_nulless_) || !defined(_di_f_utf_string_dynamic_partial_prepend_nulless_) || !defined(_di_f_utf_string_dynamic_prepend_assure_nulless_) || !defined(_di_f_utf_string_dynamic_prepend_nulless_) || !defined(_di_f_utf_string_mish_nulless_) || !defined(_di_f_utf_string_prepend_assure_nulless_) || !defined(_di_f_utf_string_prepend_nulless_)
- f_status_t private_f_utf_string_prepend_nulless(const f_utf_string_t source, const f_string_length_t length, f_utf_string_dynamic_t *destination) {
+ f_status_t private_f_utf_string_prepend_nulless(const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination) {
- if (destination->used + length > f_string_length_t_size) {
+ if (destination->used + length > f_array_length_t_size) {
return F_status_set_error(F_string_too_large);
}
f_status_t status = F_none;
- f_string_length_t first = 0;
- f_string_length_t offset = 0;
+ f_array_length_t first = 0;
+ f_array_length_t offset = 0;
- f_string_length_t size = 0;
+ f_array_length_t size = 0;
- for (f_string_length_t i = 0; i <= length; i++) {
+ for (f_array_length_t i = 0; i <= length; i++) {
if (i == length) {
if (i > first) {
* @see private_f_utf_string_dynamic_increase_by()
*/
#if !defined(_di_f_utf_string_append_) || !defined(_di_f_utf_string_dynamic_append_) || !defined(_di_f_utf_string_dynamic_mash_) || !defined(_di_f_utf_string_mash_)
- extern f_status_t private_f_utf_string_append(const f_utf_string_t source, const f_string_length_t length, f_utf_string_dynamic_t *destination) f_gcc_attribute_visibility_internal;
+ extern f_status_t private_f_utf_string_append(const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_f_utf_string_append_) || !defined(_di_f_utf_string_dynamic_append_) || !defined(_di_f_utf_string_dynamic_mash_) || !defined(_di_f_utf_string_mash_)
/**
* @see private_f_utf_string_dynamic_increase_by()
*/
#if !defined(_di_f_utf_string_append_nulless_) || !defined(_di_f_utf_string_dynamic_append_nulless_) || !defined(_di_f_utf_string_dynamic_mash_nulless_) || !defined(_di_f_utf_string_mash_nulless_)
- extern f_status_t private_f_utf_string_append_nulless(const f_utf_string_t source, const f_string_length_t length, f_utf_string_dynamic_t *destination) f_gcc_attribute_visibility_internal;
+ extern f_status_t private_f_utf_string_append_nulless(const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_f_utf_string_append_nulless_) || !defined(_di_f_utf_string_dynamic_append_nulless_) || !defined(_di_f_utf_string_dynamic_mash_nulless_) || !defined(_di_f_utf_string_mash_nulless_)
/**
* @see f_utf_string_dynamic_decimate_by()
*/
#if !defined(_di_f_utf_string_dynamic_adjust_) || !defined(_di_f_utf_string_dynamic_decimate_by_)
- extern f_status_t private_f_utf_string_dynamic_adjust(const f_string_length_t length, f_utf_string_dynamic_t *string) f_gcc_attribute_visibility_internal;
+ extern f_status_t private_f_utf_string_dynamic_adjust(const f_array_length_t length, f_utf_string_dynamic_t *string) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_f_utf_string_dynamic_adjust_) || !defined(_di_f_utf_string_dynamic_decimate_by_)
/**
* @see f_utf_string_prepend_nulless()
*/
#if !defined(_di_f_utf_string_dynamic_increase_by_) || !defined(_di_f_utf_string_append_) || !defined(_di_f_utf_string_dynamic_append_) || !defined(_di_f_utf_string_append_mash_) || !defined(_di_f_utf_string_dynamic_mash_) || !defined(_di_f_utf_string_append_nulless_) || !defined(_di_f_utf_string_dynamic_append_nulless_) || !defined(_di_f_utf_string_mash_nulless_) || !defined(_di_f_utf_string_dynamic_mash_nulless_) || !defined(_di_f_utf_string_prepend_) || !defined(_di_f_utf_string_dynamic_prepend_) || !defined(_di_f_utf_string_prepend_nulless_) || !defined(_di_f_utf_string_dynamic_prepend_nulless_)
- extern f_status_t private_f_utf_string_dynamic_increase_by(const f_string_length_t amount, f_utf_string_dynamic_t *string) f_gcc_attribute_visibility_internal;
+ extern f_status_t private_f_utf_string_dynamic_increase_by(const f_array_length_t amount, f_utf_string_dynamic_t *string) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_f_utf_string_dynamic_increase_by_) || !defined(_di_f_utf_string_append_) || !defined(_di_f_utf_string_dynamic_append_) || !defined(_di_f_utf_string_append_mash_) || !defined(_di_f_utf_string_dynamic_mash_) || !defined(_di_f_utf_string_append_nulless_) || !defined(_di_f_utf_string_dynamic_append_nulless_) || !defined(_di_f_utf_string_mash_nulless_) || !defined(_di_f_utf_string_dynamic_mash_nulless_) || !defined(_di_f_utf_string_prepend_) || !defined(_di_f_utf_string_dynamic_prepend_) || !defined(_di_f_utf_string_prepend_nulless_) || !defined(_di_f_utf_string_dynamic_prepend_nulless_)
/**
* @see f_utf_string_dynamic_terminate_after()
*/
#if !defined(_di_f_utf_string_dynamic_decrease_by_) || !defined(_di_f_utf_string_dynamic_increase_) || !defined(_di_f_utf_string_dynamic_increase_by_) || !defined(_di_f_utf_string_dynamic_terminate_) || !defined(_di_f_utf_string_dynamic_terminate_after_)
- extern f_status_t private_f_utf_string_dynamic_resize(const f_string_length_t length, f_utf_string_dynamic_t *string) f_gcc_attribute_visibility_internal;
+ extern f_status_t private_f_utf_string_dynamic_resize(const f_array_length_t length, f_utf_string_dynamic_t *string) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_f_utf_string_dynamic_decrease_by_) || !defined(_di_f_utf_string_dynamic_increase_) || !defined(_di_f_utf_string_dynamic_increase_by_) || !defined(_di_f_utf_string_dynamic_terminate_) || !defined(_di_f_utf_string_dynamic_terminate_after_)
/**
* @see private_f_utf_string_dynamic_increase_by()
*/
#if !defined(_di_f_utf_string_dynamic_mish_) || !defined(_di_f_utf_string_dynamic_partial_mish_) || !defined(_di_f_utf_string_dynamic_partial_prepend_assure_) || !defined(_di_f_utf_string_dynamic_partial_prepend_) || !defined(_di_f_utf_string_dynamic_prepend_assure_) || !defined(_di_f_utf_string_dynamic_prepend_) || !defined(_di_f_utf_string_mish_) || !defined(_di_f_utf_string_prepend_assure_) || !defined(_di_f_utf_string_prepend_)
- extern f_status_t private_f_utf_string_prepend(const f_utf_string_t source, const f_string_length_t length, f_utf_string_dynamic_t *destination) f_gcc_attribute_visibility_internal;
+ extern f_status_t private_f_utf_string_prepend(const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_f_utf_string_dynamic_mish_) || !defined(_di_f_utf_string_dynamic_partial_mish_) || !defined(_di_f_utf_string_dynamic_partial_prepend_assure_) || !defined(_di_f_utf_string_dynamic_partial_prepend_) || !defined(_di_f_utf_string_dynamic_prepend_assure_) || !defined(_di_f_utf_string_dynamic_prepend_) || !defined(_di_f_utf_string_mish_) || !defined(_di_f_utf_string_prepend_assure_) || !defined(_di_f_utf_string_prepend_)
/**
* @see private_f_utf_string_dynamic_increase_by()
*/
#if !defined(_di_f_utf_string_dynamic_mish_nulless_) || !defined(_di_f_utf_string_dynamic_partial_mish_nulless_) || !defined(_di_f_utf_string_dynamic_partial_prepend_assure_nulless_) || !defined(_di_f_utf_string_dynamic_partial_prepend_nulless_) || !defined(_di_f_utf_string_dynamic_prepend_assure_nulless_) || !defined(_di_f_utf_string_dynamic_prepend_nulless_) || !defined(_di_f_utf_string_mish_nulless_) || !defined(_di_f_utf_string_prepend_assure_nulless_) || !defined(_di_f_utf_string_prepend_nulless_)
- extern f_status_t private_f_utf_string_prepend_nulless(const f_utf_string_t source, f_string_length_t length, f_utf_string_dynamic_t *destination) f_gcc_attribute_visibility_internal;
+ extern f_status_t private_f_utf_string_prepend_nulless(const f_utf_string_t source, f_array_length_t length, f_utf_string_dynamic_t *destination) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_f_utf_string_dynamic_mish_nulless_) || !defined(_di_f_utf_string_dynamic_partial_mish_nulless_) || !defined(_di_f_utf_string_dynamic_partial_prepend_assure_nulless_) || !defined(_di_f_utf_string_dynamic_partial_prepend_nulless_) || !defined(_di_f_utf_string_dynamic_prepend_assure_nulless_) || !defined(_di_f_utf_string_dynamic_prepend_nulless_) || !defined(_di_f_utf_string_mish_nulless_) || !defined(_di_f_utf_string_prepend_assure_nulless_) || !defined(_di_f_utf_string_prepend_nulless_)
/**
#endif
#ifndef _di_f_utf_buffer_decrement_
- f_status_t f_utf_buffer_decrement(const f_string_static_t buffer, f_string_range_t *range, const f_string_length_t step) {
+ f_status_t f_utf_buffer_decrement(const f_string_static_t buffer, f_string_range_t *range, const f_array_length_t step) {
#ifndef _di_level_0_parameter_checking_
if (!range) return F_status_set_error(F_parameter);
if (step < 1) return F_status_set_error(F_parameter);
if (!buffer.used || range->start > range->stop || range->start >= buffer.used) return F_data_not;
- f_string_length_t i = 0;
+ f_array_length_t i = 0;
uint8_t width = 0;
do {
#endif // _di_f_utf_buffer_decrement_
#ifndef _di_f_utf_buffer_increment_
- f_status_t f_utf_buffer_increment(const f_string_static_t buffer, f_string_range_t *range, const f_string_length_t step) {
+ f_status_t f_utf_buffer_increment(const f_string_static_t buffer, f_string_range_t *range, const f_array_length_t step) {
#ifndef _di_level_0_parameter_checking_
if (!range) return F_status_set_error(F_parameter);
if (step < 1) return F_status_set_error(F_parameter);
if (!buffer.used || range->start > range->stop || range->start >= buffer.used) return F_data_not;
- f_string_length_t i = 0;
+ f_array_length_t i = 0;
uint8_t width = 0;
do {
#endif // _di_f_utf_character_is_zero_width_
#ifndef _di_f_utf_character_to_char_
- f_status_t f_utf_character_to_char(const f_utf_character_t utf_character, f_string_t *character, f_string_length_t *width_max) {
+ f_status_t f_utf_character_to_char(const f_utf_character_t utf_character, f_string_t *character, f_array_length_t *width_max) {
#ifndef _di_level_0_parameter_checking_
if (!utf_character) return F_status_set_error(F_parameter);
if (!width_max && *character) return F_status_set_error(F_parameter);
#endif // _di_f_utf_is_big_endian_
#ifndef _di_f_utf_is_
- f_status_t f_utf_is(const f_string_t character, const f_string_length_t width_max) {
+ f_status_t f_utf_is(const f_string_t character, const f_array_length_t width_max) {
#ifndef _di_level_0_parameter_checking_
if (width_max < 1) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_utf_is_
#ifndef _di_f_utf_is_alpha_
- f_status_t f_utf_is_alpha(const f_string_t character, const f_string_length_t width_max) {
+ f_status_t f_utf_is_alpha(const f_string_t character, const f_array_length_t width_max) {
#ifndef _di_level_0_parameter_checking_
if (width_max < 1) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_utf_is_alpha_
#ifndef _di_f_utf_is_alpha_digit_
- f_status_t f_utf_is_alpha_digit(const f_string_t character, const f_string_length_t width_max) {
+ f_status_t f_utf_is_alpha_digit(const f_string_t character, const f_array_length_t width_max) {
#ifndef _di_level_0_parameter_checking_
if (width_max < 1) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_utf_is_alpha_digit_
#ifndef _di_f_utf_is_alpha_numeric_
- f_status_t f_utf_is_alpha_numeric(const f_string_t character, const f_string_length_t width_max) {
+ f_status_t f_utf_is_alpha_numeric(const f_string_t character, const f_array_length_t width_max) {
#ifndef _di_level_0_parameter_checking_
if (width_max < 1) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_utf_is_alpha_numeric_
#ifndef _di_f_utf_is_ascii_
- f_status_t f_utf_is_ascii(const f_string_t character, const f_string_length_t width_max) {
+ f_status_t f_utf_is_ascii(const f_string_t character, const f_array_length_t width_max) {
#ifndef _di_level_0_parameter_checking_
if (width_max < 1) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_utf_is_ascii_
#ifndef _di_f_utf_is_combining_
- f_status_t f_utf_is_combining(const f_string_t character, const f_string_length_t width_max) {
+ f_status_t f_utf_is_combining(const f_string_t character, const f_array_length_t width_max) {
#ifndef _di_level_0_parameter_checking_
if (width_max < 1) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_utf_is_combining_
#ifndef _di_f_utf_is_control_
- f_status_t f_utf_is_control(const f_string_t character, const f_string_length_t width_max) {
+ f_status_t f_utf_is_control(const f_string_t character, const f_array_length_t width_max) {
#ifndef _di_level_0_parameter_checking_
if (width_max < 1) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_utf_is_control_
#ifndef _di_f_utf_is_control_picture_
- f_status_t f_utf_is_control_picture(const f_string_t character, const f_string_length_t width_max) {
+ f_status_t f_utf_is_control_picture(const f_string_t character, const f_array_length_t width_max) {
#ifndef _di_level_0_parameter_checking_
if (width_max < 1) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_utf_is_control_picture_
#ifndef _di_f_utf_is_digit_
- f_status_t f_utf_is_digit(const f_string_t character, const f_string_length_t width_max) {
+ f_status_t f_utf_is_digit(const f_string_t character, const f_array_length_t width_max) {
#ifndef _di_level_0_parameter_checking_
if (width_max < 1) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_utf_is_digit_
#ifndef _di_f_utf_is_emoji_
- f_status_t f_utf_is_emoji(const f_string_t character, const f_string_length_t width_max) {
+ f_status_t f_utf_is_emoji(const f_string_t character, const f_array_length_t width_max) {
#ifndef _di_level_0_parameter_checking_
if (width_max < 1) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_utf_is_emoji_
#ifndef _di_f_utf_is_fragment_
- f_status_t f_utf_is_fragment(const f_string_t character, const f_string_length_t width_max) {
+ f_status_t f_utf_is_fragment(const f_string_t character, const f_array_length_t width_max) {
#ifndef _di_level_0_parameter_checking_
if (width_max < 1) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_utf_is_fragment_
#ifndef _di_f_utf_is_graph_
- f_status_t f_utf_is_graph(const f_string_t character, const f_string_length_t width_max) {
+ f_status_t f_utf_is_graph(const f_string_t character, const f_array_length_t width_max) {
#ifndef _di_level_0_parameter_checking_
if (width_max < 1) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_utf_is_graph_
#ifndef _di_f_utf_is_numeric_
- f_status_t f_utf_is_numeric(const f_string_t character, const f_string_length_t width_max) {
+ f_status_t f_utf_is_numeric(const f_string_t character, const f_array_length_t width_max) {
#ifndef _di_level_0_parameter_checking_
if (width_max < 1) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_utf_is_numeric_
#ifndef _di_f_utf_is_phonetic_
- f_status_t f_utf_is_phonetic(const f_string_t character, const f_string_length_t width_max) {
+ f_status_t f_utf_is_phonetic(const f_string_t character, const f_array_length_t width_max) {
#ifndef _di_level_0_parameter_checking_
if (width_max < 1) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_utf_is_phonetic_
#ifndef _di_f_utf_is_private_
- f_status_t f_utf_is_private(const f_string_t character, const f_string_length_t width_max) {
+ f_status_t f_utf_is_private(const f_string_t character, const f_array_length_t width_max) {
#ifndef _di_level_0_parameter_checking_
if (width_max < 1) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_utf_is_private_
#ifndef _di_f_utf_is_punctuation_
- f_status_t f_utf_is_punctuation(const f_string_t character, const f_string_length_t width_max) {
+ f_status_t f_utf_is_punctuation(const f_string_t character, const f_array_length_t width_max) {
#ifndef _di_level_0_parameter_checking_
if (width_max < 1) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_utf_is_punctuation_
#ifndef _di_f_utf_is_symbol_
- f_status_t f_utf_is_symbol(const f_string_t character, const f_string_length_t width_max) {
+ f_status_t f_utf_is_symbol(const f_string_t character, const f_array_length_t width_max) {
#ifndef _di_level_0_parameter_checking_
if (width_max < 1) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_utf_is_symbol_
#ifndef _di_f_utf_is_unassigned_
- f_status_t f_utf_is_unassigned(const f_string_t character, const f_string_length_t width_max) {
+ f_status_t f_utf_is_unassigned(const f_string_t character, const f_array_length_t width_max) {
#ifndef _di_level_0_parameter_checking_
if (width_max < 1) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_utf_is_unassigned_
#ifndef _di_f_utf_is_valid_
- f_status_t f_utf_is_valid(const f_string_t character, const f_string_length_t width_max) {
+ f_status_t f_utf_is_valid(const f_string_t character, const f_array_length_t width_max) {
#ifndef _di_level_0_parameter_checking_
if (width_max < 1) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_utf_is_valid_
#ifndef _di_f_utf_is_whitespace_
- f_status_t f_utf_is_whitespace(const f_string_t character, const f_string_length_t width_max) {
+ f_status_t f_utf_is_whitespace(const f_string_t character, const f_array_length_t width_max) {
#ifndef _di_level_0_parameter_checking_
if (width_max < 1) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_utf_is_whitespace_
#ifndef _di_f_utf_is_whitespace_modifier_
- f_status_t f_utf_is_whitespace_modifier(const f_string_t character, const f_string_length_t width_max) {
+ f_status_t f_utf_is_whitespace_modifier(const f_string_t character, const f_array_length_t width_max) {
#ifndef _di_level_0_parameter_checking_
if (width_max < 1) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_utf_is_whitespace_modifier_
#ifndef _di_f_utf_is_whitespace_other_
- f_status_t f_utf_is_whitespace_other(const f_string_t character, const f_string_length_t width_max) {
+ f_status_t f_utf_is_whitespace_other(const f_string_t character, const f_array_length_t width_max) {
#ifndef _di_level_0_parameter_checking_
if (width_max < 1) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_utf_is_whitespace_other_
#ifndef _di_f_utf_is_word_
- f_status_t f_utf_is_word(const f_string_t character, const f_string_length_t width_max, const bool strict) {
+ f_status_t f_utf_is_word(const f_string_t character, const f_array_length_t width_max, const bool strict) {
#ifndef _di_level_0_parameter_checking_
if (width_max < 1) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_utf_is_word_
#ifndef _di_f_utf_is_word_dash_
- f_status_t f_utf_is_word_dash(const f_string_t character, const f_string_length_t width_max, const bool strict) {
+ f_status_t f_utf_is_word_dash(const f_string_t character, const f_array_length_t width_max, const bool strict) {
#ifndef _di_level_0_parameter_checking_
if (width_max < 1) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_utf_is_word_dash_
#ifndef _di_f_utf_is_word_dash_plus_
- f_status_t f_utf_is_word_dash_plus(const f_string_t character, const f_string_length_t width_max, const bool strict) {
+ f_status_t f_utf_is_word_dash_plus(const f_string_t character, const f_array_length_t width_max, const bool strict) {
#ifndef _di_level_0_parameter_checking_
if (width_max < 1) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_utf_is_word_dash_plus_
#ifndef _di_f_utf_is_zero_width_
- f_status_t f_utf_is_zero_width(const f_string_t character, const f_string_length_t width_max) {
+ f_status_t f_utf_is_zero_width(const f_string_t character, const f_array_length_t width_max) {
#ifndef _di_level_0_parameter_checking_
if (width_max < 1) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_utf_is_zero_width_
#ifndef _di_f_utf_char_to_character_
- f_status_t f_utf_char_to_character(const f_string_t character, const f_string_length_t width_max, f_utf_character_t *character_utf) {
+ f_status_t f_utf_char_to_character(const f_string_t character, const f_array_length_t width_max, f_utf_character_t *character_utf) {
#ifndef _di_level_0_parameter_checking_
if (width_max < 1) return F_status_set_error(F_parameter);
if (!character_utf) return F_status_set_error(F_parameter);
#endif // _di_f_utf_char_to_character_
#ifndef _di_f_utf_string_append_
- f_status_t f_utf_string_append(const f_utf_string_t source, const f_string_length_t length, f_utf_string_dynamic_t *destination) {
+ f_status_t f_utf_string_append(const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination) {
#ifndef _di_level_0_parameter_checking_
if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_utf_string_append_
#ifndef _di_f_utf_string_append_assure_
- f_status_t f_utf_string_append_assure(const f_utf_string_t source, const f_string_length_t length, f_utf_string_dynamic_t *destination) {
+ f_status_t f_utf_string_append_assure(const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination) {
#ifndef _di_level_0_parameter_checking_
if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
if (!length) return F_data_not_eos;
if (destination->used < length) return private_f_utf_string_append(source, length, destination);
- f_string_length_t i = 1;
- f_string_length_t j = 1;
+ f_array_length_t i = 1;
+ f_array_length_t j = 1;
while (i <= length && j <= destination->used) {
if (!source[length - i]) {
#endif // _di_f_utf_string_append_assure_
#ifndef _di_f_utf_string_append_assure_nulless_
- f_status_t f_utf_string_append_assure_nulless(const f_utf_string_t source, const f_string_length_t length, f_utf_string_dynamic_t *destination) {
+ f_status_t f_utf_string_append_assure_nulless(const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination) {
#ifndef _di_level_0_parameter_checking_
if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
return private_f_utf_string_append_nulless(source, length, destination);
}
- f_string_length_t i = 1;
- f_string_length_t j = 1;
+ f_array_length_t i = 1;
+ f_array_length_t j = 1;
while (i <= length && j <= destination->used) {
if (!source[length - i]) {
#endif // _di_f_utf_string_append_assure_nulless_
#ifndef _di_f_utf_string_append_nulless_
- f_status_t f_utf_string_append_nulless(const f_utf_string_t source, const f_string_length_t length, f_utf_string_dynamic_t *destination) {
+ f_status_t f_utf_string_append_nulless(const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination) {
#ifndef _di_level_0_parameter_checking_
if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
return private_f_utf_string_append(source.string, source.used, destination);
}
- f_string_length_t i = 1;
- f_string_length_t j = 1;
+ f_array_length_t i = 1;
+ f_array_length_t j = 1;
while (i <= source.used && j <= destination->used) {
if (!source.string[source.used - i]) {
return private_f_utf_string_append_nulless(source.string, source.used, destination);
}
- f_string_length_t i = 1;
- f_string_length_t j = 1;
+ f_array_length_t i = 1;
+ f_array_length_t j = 1;
while (i <= source.used && j <= destination->used) {
if (!source.string[source.used - i]) {
#endif // _di_f_utf_string_dynamic_append_nulless_
#ifndef _di_f_utf_string_dynamic_mash_
- f_status_t f_utf_string_dynamic_mash(const f_utf_string_t glue, const f_string_length_t glue_length, const f_utf_string_static_t source, f_utf_string_dynamic_t *destination) {
+ f_status_t f_utf_string_dynamic_mash(const f_utf_string_t glue, const f_array_length_t glue_length, const f_utf_string_static_t source, f_utf_string_dynamic_t *destination) {
#ifndef _di_level_0_parameter_checking_
if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_utf_string_dynamic_mash_
#ifndef _di_f_utf_string_dynamic_mash_nulless_
- f_status_t f_utf_string_dynamic_mash_nulless(const f_utf_string_t glue, const f_string_length_t glue_length, const f_utf_string_static_t source, f_utf_string_dynamic_t *destination) {
+ f_status_t f_utf_string_dynamic_mash_nulless(const f_utf_string_t glue, const f_array_length_t glue_length, const f_utf_string_static_t source, f_utf_string_dynamic_t *destination) {
#ifndef _di_level_0_parameter_checking_
if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_utf_string_dynamic_mash_nulless_
#ifndef _di_f_utf_string_dynamic_mish_
- f_status_t f_utf_string_dynamic_mish(const f_utf_string_t glue, const f_string_length_t glue_length, const f_utf_string_static_t source, f_utf_string_dynamic_t *destination) {
+ f_status_t f_utf_string_dynamic_mish(const f_utf_string_t glue, const f_array_length_t glue_length, const f_utf_string_static_t source, f_utf_string_dynamic_t *destination) {
#ifndef _di_level_0_parameter_checking_
if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_utf_string_dynamic_mish_
#ifndef _di_f_utf_string_dynamic_mish_nulless_
- f_status_t f_utf_string_dynamic_mish_nulless(const f_utf_string_t glue, const f_string_length_t glue_length, const f_utf_string_static_t source, f_utf_string_dynamic_t *destination) {
+ f_status_t f_utf_string_dynamic_mish_nulless(const f_utf_string_t glue, const f_array_length_t glue_length, const f_utf_string_static_t source, f_utf_string_dynamic_t *destination) {
#ifndef _di_level_0_parameter_checking_
if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
if (!source.used) return F_data_not_eos;
if (range.start > range.stop) return F_data_not_stop;
- const f_string_length_t length = (range.stop - range.start) + 1;
+ const f_array_length_t length = (range.stop - range.start) + 1;
if (destination->used < length) {
return private_f_utf_string_append(source.string + range.start, length, destination);
}
- f_string_length_t i = 1;
- f_string_length_t j = 1;
+ f_array_length_t i = 1;
+ f_array_length_t j = 1;
while (i <= length && j <= destination->used) {
if (!source.string[range.stop - i]) {
if (!source.used) return F_data_not_eos;
if (range.start > range.stop) return F_data_not_stop;
- const f_string_length_t length = (range.stop - range.start) + 1;
+ const f_array_length_t length = (range.stop - range.start) + 1;
if (destination->used < length) {
return private_f_utf_string_append_nulless(source.string + range.start, length, destination);
}
- f_string_length_t i = 1;
- f_string_length_t j = 1;
+ f_array_length_t i = 1;
+ f_array_length_t j = 1;
while (i <= length && j <= destination->used) {
if (!source.string[range.stop - i]) {
#endif // _di_f_utf_string_dynamic_partial_append_nulless_
#ifndef _di_f_utf_string_dynamic_partial_mash_
- f_status_t f_utf_string_dynamic_partial_mash(const f_utf_string_t glue, const f_string_length_t glue_length, const f_utf_string_static_t source, const f_utf_string_range_t range, f_utf_string_dynamic_t *destination) {
+ f_status_t f_utf_string_dynamic_partial_mash(const f_utf_string_t glue, const f_array_length_t glue_length, const f_utf_string_static_t source, const f_utf_string_range_t range, f_utf_string_dynamic_t *destination) {
#ifndef _di_level_0_parameter_checking_
if (source.used <= range.stop) return F_status_set_error(F_parameter);
if (!destination) return F_status_set_error(F_parameter);
#endif // _di_f_utf_string_dynamic_partial_mash_
#ifndef _di_f_utf_string_dynamic_partial_mash_nulless_
- f_status_t f_utf_string_dynamic_partial_mash_nulless(const f_utf_string_t glue, const f_string_length_t glue_length, const f_utf_string_static_t source, const f_utf_string_range_t range, f_utf_string_dynamic_t *destination) {
+ f_status_t f_utf_string_dynamic_partial_mash_nulless(const f_utf_string_t glue, const f_array_length_t glue_length, const f_utf_string_static_t source, const f_utf_string_range_t range, f_utf_string_dynamic_t *destination) {
#ifndef _di_level_0_parameter_checking_
if (source.used <= range.stop) return F_status_set_error(F_parameter);
if (!destination) return F_status_set_error(F_parameter);
#endif // _di_f_utf_string_dynamic_partial_mash_nulless_
#ifndef _di_f_utf_string_dynamic_partial_mish_
- f_status_t f_utf_string_dynamic_partial_mish(const f_utf_string_t glue, const f_string_length_t glue_length, const f_utf_string_static_t source, const f_utf_string_range_t range, f_utf_string_dynamic_t *destination) {
+ f_status_t f_utf_string_dynamic_partial_mish(const f_utf_string_t glue, const f_array_length_t glue_length, const f_utf_string_static_t source, const f_utf_string_range_t range, f_utf_string_dynamic_t *destination) {
#ifndef _di_level_0_parameter_checking_
if (source.used <= range.stop) return F_status_set_error(F_parameter);
if (!destination) return F_status_set_error(F_parameter);
#endif // _di_f_utf_string_dynamic_partial_mish_
#ifndef _di_f_utf_string_dynamic_partial_mish_nulless_
- f_status_t f_utf_string_dynamic_partial_mish_nulless(const f_utf_string_t glue, const f_string_length_t glue_length, const f_utf_string_static_t source, const f_utf_string_range_t range, f_utf_string_dynamic_t *destination) {
+ f_status_t f_utf_string_dynamic_partial_mish_nulless(const f_utf_string_t glue, const f_array_length_t glue_length, const f_utf_string_static_t source, const f_utf_string_range_t range, f_utf_string_dynamic_t *destination) {
#ifndef _di_level_0_parameter_checking_
if (source.used <= range.stop) return F_status_set_error(F_parameter);
if (!destination) return F_status_set_error(F_parameter);
if (!source.used) return F_data_not_eos;
if (range.start > range.stop) return F_data_not_stop;
- const f_string_length_t length = (range.stop - range.start) + 1;
+ const f_array_length_t length = (range.stop - range.start) + 1;
if (destination->used < length) {
return private_f_utf_string_prepend(source.string + range.start, length, destination);
}
- f_string_length_t i = 0;
- f_string_length_t j = 0;
+ f_array_length_t i = 0;
+ f_array_length_t j = 0;
while (i < length && j < destination->used) {
if (!source.string[i + range.start]) {
if (!source.used) return F_data_not_eos;
if (range.start > range.stop) return F_data_not_stop;
- const f_string_length_t length = (range.stop - range.start) + 1;
+ const f_array_length_t length = (range.stop - range.start) + 1;
if (destination->used < length) {
return private_f_utf_string_prepend_nulless(source.string + range.start, length, destination);
}
- f_string_length_t i = 0;
- f_string_length_t j = 0;
+ f_array_length_t i = 0;
+ f_array_length_t j = 0;
while (i < length && j < destination->used) {
if (!source.string[i + range.start]) {
return private_f_utf_string_prepend(source.string, source.used, destination);
}
- f_string_length_t i = 0;
- f_string_length_t j = 0;
+ f_array_length_t i = 0;
+ f_array_length_t j = 0;
while (i < source.used && j < destination->used) {
if (!source.string[i]) {
return private_f_utf_string_prepend_nulless(source.string, source.used, destination);
}
- f_string_length_t i = 0;
- f_string_length_t j = 0;
+ f_array_length_t i = 0;
+ f_array_length_t j = 0;
while (i < source.used && j < destination->used) {
if (!source.string[i]) {
return F_none;
}
- if (destination->used == f_string_length_t_size) {
+ if (destination->used == f_array_length_t_size) {
return F_status_set_error(F_string_too_large);
}
- const f_string_length_t total = destination->used + 1;
+ const f_array_length_t total = destination->used + 1;
if (total > destination->size) {
const f_status_t status = private_f_utf_string_dynamic_resize(total, destination);
} // for
}
- if (destination->used == f_string_length_t_size) {
+ if (destination->used == f_array_length_t_size) {
return F_status_set_error(F_string_too_large);
}
- const f_string_length_t total = destination->used + 1;
+ const f_array_length_t total = destination->used + 1;
if (total > destination->size) {
const f_status_t status = private_f_utf_string_dynamic_resize(total, destination);
#endif // _di_f_utf_string_dynamic_terminate_after_
#ifndef _di_f_utf_string_mash_
- f_status_t f_utf_string_mash(const f_utf_string_t glue, const f_string_length_t glue_length, const f_utf_string_t source, const f_string_length_t length, f_utf_string_dynamic_t *destination) {
+ f_status_t f_utf_string_mash(const f_utf_string_t glue, const f_array_length_t glue_length, const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination) {
#ifndef _di_level_0_parameter_checking_
if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_utf_string_mash_
#ifndef _di_f_utf_string_mash_nulless_
- f_status_t f_utf_string_mash_nulless(const f_utf_string_t glue, const f_string_length_t glue_length, const f_utf_string_t source, const f_string_length_t length, f_utf_string_dynamic_t *destination) {
+ f_status_t f_utf_string_mash_nulless(const f_utf_string_t glue, const f_array_length_t glue_length, const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination) {
#ifndef _di_level_0_parameter_checking_
if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_utf_string_mash_nulless_
#ifndef _di_f_utf_string_mish_
- f_status_t f_utf_string_mish(const f_utf_string_t glue, const f_string_length_t glue_length, const f_utf_string_t source, const f_string_length_t length, f_utf_string_dynamic_t *destination) {
+ f_status_t f_utf_string_mish(const f_utf_string_t glue, const f_array_length_t glue_length, const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination) {
#ifndef _di_level_0_parameter_checking_
if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_utf_string_mish_
#ifndef _di_f_utf_string_mish_nulless_
- f_status_t f_utf_string_mish_nulless(const f_utf_string_t glue, const f_string_length_t glue_length, const f_utf_string_t source, const f_string_length_t length, f_utf_string_dynamic_t *destination) {
+ f_status_t f_utf_string_mish_nulless(const f_utf_string_t glue, const f_array_length_t glue_length, const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination) {
#ifndef _di_level_0_parameter_checking_
if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_utf_string_mish_nulless_
#ifndef _di_f_utf_string_prepend_
- f_status_t f_utf_string_prepend(const f_utf_string_t source, const f_string_length_t length, f_utf_string_dynamic_t *destination) {
+ f_status_t f_utf_string_prepend(const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination) {
#ifndef _di_level_0_parameter_checking_
if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_utf_string_prepend_
#ifndef _di_f_utf_string_prepend_assure_
- f_status_t f_utf_string_prepend_assure(const f_utf_string_t source, const f_string_length_t length, f_utf_string_dynamic_t *destination) {
+ f_status_t f_utf_string_prepend_assure(const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination) {
#ifndef _di_level_0_parameter_checking_
if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
if (!length) return F_data_not_eos;
if (destination->used < length) return private_f_utf_string_prepend(source, length, destination);
- f_string_length_t i = 0;
- f_string_length_t j = 0;
+ f_array_length_t i = 0;
+ f_array_length_t j = 0;
while (i < length && j < destination->used) {
if (!source[i]) {
#endif // _di_f_utf_string_prepend_assure_
#ifndef _di_f_utf_string_prepend_assure_nulless_
- f_status_t f_utf_string_prepend_assure_nulless(const f_utf_string_t source, const f_string_length_t length, f_utf_string_dynamic_t *destination) {
+ f_status_t f_utf_string_prepend_assure_nulless(const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination) {
#ifndef _di_level_0_parameter_checking_
if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
if (!length) return F_data_not_eos;
if (destination->used < length) return private_f_utf_string_prepend_nulless(source, length, destination);
- f_string_length_t i = 0;
- f_string_length_t j = 0;
+ f_array_length_t i = 0;
+ f_array_length_t j = 0;
while (i < length && j < destination->used) {
if (!source[i]) {
#endif // _di_f_utf_string_prepend_assure_nulless_
#ifndef _di_f_utf_string_prepend_nulless_
- f_status_t f_utf_string_prepend_nulless(const f_utf_string_t source, const f_string_length_t length, f_utf_string_dynamic_t *destination) {
+ f_status_t f_utf_string_prepend_nulless(const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination) {
#ifndef _di_level_0_parameter_checking_
if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
* F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_f_utf_buffer_decrement_
- extern f_status_t f_utf_buffer_decrement(const f_string_static_t buffer, f_string_range_t *range, const f_string_length_t step);
+ extern f_status_t f_utf_buffer_decrement(const f_string_static_t buffer, f_string_range_t *range, const f_array_length_t step);
#endif // _di_f_utf_buffer_decrement_
/**
* F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_f_utf_buffer_increment_
- extern f_status_t f_utf_buffer_increment(const f_string_static_t buffer, f_string_range_t *range, const f_string_length_t step);
+ extern f_status_t f_utf_buffer_increment(const f_string_static_t buffer, f_string_range_t *range, const f_array_length_t step);
#endif // _di_f_utf_buffer_increment_
/**
* F_failure (with error bit) if width is not long enough to convert.
*/
#ifndef _di_f_utf_character_to_char_
- extern f_status_t f_utf_character_to_char(const f_utf_character_t utf_character, f_string_t *character, f_string_length_t *width_max);
+ extern f_status_t f_utf_character_to_char(const f_utf_character_t utf_character, f_string_t *character, f_array_length_t *width_max);
#endif // _di_f_utf_character_to_char_
/**
* F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_f_utf_is_
- extern f_status_t f_utf_is(const f_string_t character, const f_string_length_t width_max);
+ extern f_status_t f_utf_is(const f_string_t character, const f_array_length_t width_max);
#endif // _di_f_utf_is_
/**
* @see isalpha()
*/
#ifndef _di_f_utf_is_alpha_
- extern f_status_t f_utf_is_alpha(const f_string_t character, const f_string_length_t width_max);
+ extern f_status_t f_utf_is_alpha(const f_string_t character, const f_array_length_t width_max);
#endif // _di_f_utf_is_alpha_
/**
* @see isalnum()
*/
#ifndef _di_f_utf_is_alpha_digit_
- extern f_status_t f_utf_is_alpha_digit(const f_string_t character, const f_string_length_t width_max);
+ extern f_status_t f_utf_is_alpha_digit(const f_string_t character, const f_array_length_t width_max);
#endif // _di_f_utf_is_alpha_digit_
/**
* @see isalnum()
*/
#ifndef _di_f_utf_is_alpha_numeric_
- extern f_status_t f_utf_is_alpha_numeric(const f_string_t character, const f_string_length_t width_max);
+ extern f_status_t f_utf_is_alpha_numeric(const f_string_t character, const f_array_length_t width_max);
#endif // _di_f_utf_is_alpha_numeric_
/**
* F_complete_not_utf (with error bit) if character is an incomplete UTF-8 fragment.
*/
#ifndef _di_f_utf_is_ascii_
- extern f_status_t f_utf_is_ascii(const f_string_t character, const f_string_length_t width_max);
+ extern f_status_t f_utf_is_ascii(const f_string_t character, const f_array_length_t width_max);
#endif // _di_f_utf_is_ascii_
/**
* F_complete_not_utf (with error bit) if character is an incomplete UTF-8 fragment.
*/
#ifndef _di_f_utf_is_combining_
- extern f_status_t f_utf_is_combining(const f_string_t character, const f_string_length_t width_max);
+ extern f_status_t f_utf_is_combining(const f_string_t character, const f_array_length_t width_max);
#endif // _di_f_utf_is_combining_
/**
* @see iscntrl()
*/
#ifndef _di_f_utf_is_control_
- extern f_status_t f_utf_is_control(const f_string_t character, const f_string_length_t width_max);
+ extern f_status_t f_utf_is_control(const f_string_t character, const f_array_length_t width_max);
#endif // _di_f_utf_is_control_
/**
* F_complete_not_utf (with error bit) if character is an incomplete UTF-8 fragment.
*/
#ifndef _di_f_utf_is_control_picture_
- extern f_status_t f_utf_is_control_picture(const f_string_t character, const f_string_length_t width_max);
+ extern f_status_t f_utf_is_control_picture(const f_string_t character, const f_array_length_t width_max);
#endif // _di_f_utf_is_control_picture_
/**
* @see isdigit()
*/
#ifndef _di_f_utf_is_digit_
- extern f_status_t f_utf_is_digit(const f_string_t character, const f_string_length_t width_max);
+ extern f_status_t f_utf_is_digit(const f_string_t character, const f_array_length_t width_max);
#endif // _di_f_utf_is_digit_
/**
* F_complete_not_utf (with error bit) if character is an incomplete UTF-8 fragment.
*/
#ifndef _di_f_utf_is_emoji_
- extern f_status_t f_utf_is_emoji(const f_string_t character, const f_string_length_t width_max);
+ extern f_status_t f_utf_is_emoji(const f_string_t character, const f_array_length_t width_max);
#endif // _di_f_utf_is_emoji_
/**
* F_false if not a UTF-8 character.
*/
#ifndef _di_f_utf_is_fragment_
- extern f_status_t f_utf_is_fragment(const f_string_t character, const f_string_length_t width_max);
+ extern f_status_t f_utf_is_fragment(const f_string_t character, const f_array_length_t width_max);
#endif // _di_f_utf_is_fragment_
/**
* @see isgraph()
*/
#ifndef _di_f_utf_is_graph_
- extern f_status_t f_utf_is_graph(const f_string_t character, const f_string_length_t width_max);
+ extern f_status_t f_utf_is_graph(const f_string_t character, const f_array_length_t width_max);
#endif // _di_f_utf_is_graph_
/**
* @see isdigit()
*/
#ifndef _di_f_utf_is_numeric_
- extern f_status_t f_utf_is_numeric(const f_string_t character, const f_string_length_t width_max);
+ extern f_status_t f_utf_is_numeric(const f_string_t character, const f_array_length_t width_max);
#endif // _di_f_utf_is_numeric_
/**
* F_complete_not_utf (with error bit) if character is an incomplete UTF-8 fragment.
*/
#ifndef _di_f_utf_is_phonetic_
- extern f_status_t f_utf_is_phonetic(const f_string_t character, const f_string_length_t width_max);
+ extern f_status_t f_utf_is_phonetic(const f_string_t character, const f_array_length_t width_max);
#endif // _di_f_utf_is_phonetic_
/**
* F_complete_not_utf (with error bit) if character is an incomplete UTF-8 fragment.
*/
#ifndef _di_f_utf_is_private_
- extern f_status_t f_utf_is_private(const f_string_t character, const f_string_length_t width_max);
+ extern f_status_t f_utf_is_private(const f_string_t character, const f_array_length_t width_max);
#endif // _di_f_utf_is_private_
/**
* F_complete_not_utf (with error bit) if character is an incomplete UTF-8 fragment.
*/
#ifndef _di_f_utf_is_punctuation_
- extern f_status_t f_utf_is_punctuation(const f_string_t character, const f_string_length_t width_max);
+ extern f_status_t f_utf_is_punctuation(const f_string_t character, const f_array_length_t width_max);
#endif // _di_f_utf_is_punctuation_
/**
* F_complete_not_utf (with error bit) if character is an incomplete UTF-8 fragment.
*/
#ifndef _di_f_utf_is_symbol_
- extern f_status_t f_utf_is_symbol(const f_string_t character, const f_string_length_t width_max);
+ extern f_status_t f_utf_is_symbol(const f_string_t character, const f_array_length_t width_max);
#endif // _di_f_utf_is_symbol_
/**
* F_parameter (with error bit) if a parameter is inunassigned.
*/
#ifndef _di_f_utf_is_unassigned_
- extern f_status_t f_utf_is_unassigned(const f_string_t character, const f_string_length_t width_max);
+ extern f_status_t f_utf_is_unassigned(const f_string_t character, const f_array_length_t width_max);
#endif // _di_f_utf_is_unassigned_
/**
* F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_f_utf_is_valid_
- extern f_status_t f_utf_is_valid(const f_string_t character, const f_string_length_t width_max);
+ extern f_status_t f_utf_is_valid(const f_string_t character, const f_array_length_t width_max);
#endif // _di_f_utf_is_valid_
/**
* @see isspace()
*/
#ifndef _di_f_utf_is_whitespace_
- extern f_status_t f_utf_is_whitespace(const f_string_t character, const f_string_length_t width_max);
+ extern f_status_t f_utf_is_whitespace(const f_string_t character, const f_array_length_t width_max);
#endif // _di_f_utf_is_whitespace_
/**
* F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_f_utf_is_whitespace_modifier_
- extern f_status_t f_utf_is_whitespace_modifier(const f_string_t character, const f_string_length_t width_max);
+ extern f_status_t f_utf_is_whitespace_modifier(const f_string_t character, const f_array_length_t width_max);
#endif // _di_f_utf_is_whitespace_modifier_
/**
* F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_f_utf_is_whitespace_other_
- extern f_status_t f_utf_is_whitespace_other(const f_string_t character, const f_string_length_t width_max);
+ extern f_status_t f_utf_is_whitespace_other(const f_string_t character, const f_array_length_t width_max);
#endif // _di_f_utf_is_whitespace_other_
/**
* @see isalnum()
*/
#ifndef _di_f_utf_is_word_
- extern f_status_t f_utf_is_word(const f_string_t character, const f_string_length_t width_max, const bool strict);
+ extern f_status_t f_utf_is_word(const f_string_t character, const f_array_length_t width_max, const bool strict);
#endif // _di_f_utf_is_word_
/**
* @see isalnum()
*/
#ifndef _di_f_utf_is_word_dash_
- extern f_status_t f_utf_is_word_dash(const f_string_t character, const f_string_length_t width_max, const bool strict);
+ extern f_status_t f_utf_is_word_dash(const f_string_t character, const f_array_length_t width_max, const bool strict);
#endif // _di_f_utf_is_word_dash_
/**
* @see isalnum()
*/
#ifndef _di_f_utf_is_word_dash_plus_
- extern f_status_t f_utf_is_word_dash_plus(const f_string_t character, const f_string_length_t width_max, const bool strict);
+ extern f_status_t f_utf_is_word_dash_plus(const f_string_t character, const f_array_length_t width_max, const bool strict);
#endif // _di_f_utf_is_word_dash_plus_
/**
* F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_f_utf_is_zero_width_
- extern f_status_t f_utf_is_zero_width(const f_string_t character, const f_string_length_t width_max);
+ extern f_status_t f_utf_is_zero_width(const f_string_t character, const f_array_length_t width_max);
#endif // _di_f_utf_is_zero_width_
/**
* F_utf (with error bit) if character is an invalid UTF-8 character.
*/
#ifndef _di_f_utf_char_to_character_
- extern f_status_t f_utf_char_to_character(const f_string_t character, const f_string_length_t width_max, f_utf_character_t *character_utf);
+ extern f_status_t f_utf_char_to_character(const f_string_t character, const f_array_length_t width_max, f_utf_character_t *character_utf);
#endif // _di_f_utf_char_to_character_
/**
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_f_utf_string_append_
- extern f_status_t f_utf_string_append(const f_utf_string_t source, const f_string_length_t length, f_utf_string_dynamic_t *destination);
+ extern f_status_t f_utf_string_append(const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination);
#endif // _di_f_utf_string_append_
/**
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_f_utf_string_append_assure_
- extern f_status_t f_utf_string_append_assure(const f_utf_string_t source, const f_string_length_t length, f_utf_string_dynamic_t *destination);
+ extern f_status_t f_utf_string_append_assure(const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination);
#endif // _di_f_utf_string_append_assure_
/**
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_f_utf_string_append_assure_nulless_
- extern f_status_t f_utf_string_append_assure_nulless(const f_utf_string_t source, const f_string_length_t length, f_utf_string_dynamic_t *destination);
+ extern f_status_t f_utf_string_append_assure_nulless(const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination);
#endif // _di_f_utf_string_append_assure_nulless_
/**
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_f_utf_string_append_nulless_
- extern f_status_t f_utf_string_append_nulless(const f_utf_string_t source, const f_string_length_t length, f_utf_string_dynamic_t *destination);
+ extern f_status_t f_utf_string_append_nulless(const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination);
#endif // _di_f_utf_string_append_nulless_
/**
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_f_utf_string_dynamic_mash_
- extern f_status_t f_utf_string_dynamic_mash(const f_utf_string_t glue, const f_string_length_t glue_length, const f_utf_string_static_t source, f_utf_string_dynamic_t *destination);
+ extern f_status_t f_utf_string_dynamic_mash(const f_utf_string_t glue, const f_array_length_t glue_length, const f_utf_string_static_t source, f_utf_string_dynamic_t *destination);
#endif // _di_f_utf_string_dynamic_mash_
/**
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_f_utf_string_dynamic_mash_nulless_
- extern f_status_t f_utf_string_dynamic_mash_nulless(const f_utf_string_t glue, const f_string_length_t glue_length, const f_utf_string_static_t source, f_utf_string_dynamic_t *destination);
+ extern f_status_t f_utf_string_dynamic_mash_nulless(const f_utf_string_t glue, const f_array_length_t glue_length, const f_utf_string_static_t source, f_utf_string_dynamic_t *destination);
#endif // _di_f_utf_string_dynamic_mash_nulless_
/**
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_f_utf_string_dynamic_mish_
- extern f_status_t f_utf_string_dynamic_mish(const f_utf_string_t glue, const f_string_length_t glue_length, const f_utf_string_static_t source, f_utf_string_dynamic_t *destination);
+ extern f_status_t f_utf_string_dynamic_mish(const f_utf_string_t glue, const f_array_length_t glue_length, const f_utf_string_static_t source, f_utf_string_dynamic_t *destination);
#endif // _di_f_utf_string_dynamic_mish_
/**
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_f_utf_string_dynamic_mish_nulless_
- extern f_status_t f_utf_string_dynamic_mish_nulless(const f_utf_string_t glue, const f_string_length_t glue_length, const f_utf_string_static_t source, f_utf_string_dynamic_t *destination);
+ extern f_status_t f_utf_string_dynamic_mish_nulless(const f_utf_string_t glue, const f_array_length_t glue_length, const f_utf_string_static_t source, f_utf_string_dynamic_t *destination);
#endif // _di_f_utf_string_dynamic_mish_nulless_
/**
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_f_utf_string_dynamic_partial_mash_
- extern f_status_t f_utf_string_dynamic_partial_mash(const f_utf_string_t glue, const f_string_length_t glue_length, const f_utf_string_static_t source, const f_utf_string_range_t range, f_utf_string_dynamic_t *destination);
+ extern f_status_t f_utf_string_dynamic_partial_mash(const f_utf_string_t glue, const f_array_length_t glue_length, const f_utf_string_static_t source, const f_utf_string_range_t range, f_utf_string_dynamic_t *destination);
#endif // _di_f_utf_string_dynamic_partial_mash_
/**
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_f_utf_string_dynamic_partial_mash_nulless_
- extern f_status_t f_utf_string_dynamic_partial_mash_nulless(const f_utf_string_t glue, const f_string_length_t glue_length, const f_utf_string_static_t source, const f_utf_string_range_t range, f_utf_string_dynamic_t *destination);
+ extern f_status_t f_utf_string_dynamic_partial_mash_nulless(const f_utf_string_t glue, const f_array_length_t glue_length, const f_utf_string_static_t source, const f_utf_string_range_t range, f_utf_string_dynamic_t *destination);
#endif // _di_f_utf_string_dynamic_partial_mash_nulless_
/**
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_f_utf_string_dynamic_partial_mish_
- extern f_status_t f_utf_string_dynamic_partial_mish(const f_utf_string_t glue, const f_string_length_t glue_length, const f_utf_string_static_t source, const f_utf_string_range_t range, f_utf_string_dynamic_t *destination);
+ extern f_status_t f_utf_string_dynamic_partial_mish(const f_utf_string_t glue, const f_array_length_t glue_length, const f_utf_string_static_t source, const f_utf_string_range_t range, f_utf_string_dynamic_t *destination);
#endif // _di_f_utf_string_dynamic_partial_mish_
/**
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_f_utf_string_dynamic_partial_mish_nulless_
- extern f_status_t f_utf_string_dynamic_partial_mish_nulless(const f_utf_string_t glue, const f_string_length_t glue_length, const f_utf_string_static_t source, const f_utf_string_range_t range, f_utf_string_dynamic_t *destination);
+ extern f_status_t f_utf_string_dynamic_partial_mish_nulless(const f_utf_string_t glue, const f_array_length_t glue_length, const f_utf_string_static_t source, const f_utf_string_range_t range, f_utf_string_dynamic_t *destination);
#endif // _di_f_utf_string_dynamic_partial_mish_nulless_
/**
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_f_utf_string_mash_
- extern f_status_t f_utf_string_mash(const f_utf_string_t glue, const f_string_length_t glue_length, const f_utf_string_t source, const f_string_length_t length, f_utf_string_dynamic_t *destination);
+ extern f_status_t f_utf_string_mash(const f_utf_string_t glue, const f_array_length_t glue_length, const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination);
#endif // _di_f_utf_string_mash_
/**
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_f_utf_string_mash_nulless_
- extern f_status_t f_utf_string_mash_nulless(const f_utf_string_t glue, const f_string_length_t glue_length, const f_utf_string_t source, const f_string_length_t length, f_utf_string_dynamic_t *destination);
+ extern f_status_t f_utf_string_mash_nulless(const f_utf_string_t glue, const f_array_length_t glue_length, const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination);
#endif // _di_f_utf_string_mash_nulless_
/**
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_f_utf_string_mish_
- extern f_status_t f_utf_string_mish(const f_utf_string_t glue, const f_string_length_t glue_length, const f_utf_string_t source, const f_string_length_t length, f_utf_string_dynamic_t *destination);
+ extern f_status_t f_utf_string_mish(const f_utf_string_t glue, const f_array_length_t glue_length, const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination);
#endif // _di_f_utf_string_mish_
/**
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_f_utf_string_mish_nulless_
- extern f_status_t f_utf_string_mish_nulless(const f_utf_string_t glue, const f_string_length_t glue_length, const f_utf_string_t source, const f_string_length_t length, f_utf_string_dynamic_t *destination);
+ extern f_status_t f_utf_string_mish_nulless(const f_utf_string_t glue, const f_array_length_t glue_length, const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination);
#endif // _di_f_utf_string_mish_nulless_
/**
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_f_utf_string_prepend_
- extern f_status_t f_utf_string_prepend(const f_utf_string_t source, const f_string_length_t length, f_utf_string_dynamic_t *destination);
+ extern f_status_t f_utf_string_prepend(const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination);
#endif // _di_f_utf_string_prepend_
/**
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_f_utf_string_prepend_assure_
- extern f_status_t f_utf_string_prepend_assure(const f_utf_string_t source, const f_string_length_t length, f_utf_string_dynamic_t *destination);
+ extern f_status_t f_utf_string_prepend_assure(const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination);
#endif // _di_f_utf_string_prepend_assure_
/**
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_f_utf_string_prepend_assure_nulless_
- extern f_status_t f_utf_string_prepend_assure_nulless(const f_utf_string_t source, const f_string_length_t length, f_utf_string_dynamic_t *destination);
+ extern f_status_t f_utf_string_prepend_assure_nulless(const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination);
#endif // _di_f_utf_string_prepend_assure_nulless_
/**
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_f_utf_string_prepend_nulless_
- extern f_status_t f_utf_string_prepend_nulless(const f_utf_string_t source, const f_string_length_t length, f_utf_string_dynamic_t *destination);
+ extern f_status_t f_utf_string_prepend_nulless(const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination);
#endif // _di_f_utf_string_prepend_nulless_
/**
#endif // _di_f_utf_string_static_empty_s_
#ifndef _di_f_utf_string_dynamic_adjust_
- f_status_t f_utf_string_dynamic_adjust(const f_string_length_t length, f_utf_string_dynamic_t *dynamic) {
+ f_status_t f_utf_string_dynamic_adjust(const f_array_length_t length, f_utf_string_dynamic_t *dynamic) {
#ifndef _di_level_0_parameter_checking_
if (!dynamic) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_utf_string_dynamic_adjust_
#ifndef _di_f_utf_string_dynamic_decimate_by_
- f_status_t f_utf_string_dynamic_decimate_by(const f_string_length_t amount, f_utf_string_dynamic_t *dynamic) {
+ f_status_t f_utf_string_dynamic_decimate_by(const f_array_length_t amount, f_utf_string_dynamic_t *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_f_utf_string_dynamic_decimate_by_
#ifndef _di_f_utf_string_dynamic_decrease_by_
- f_status_t f_utf_string_dynamic_decrease_by(const f_string_length_t amount, f_utf_string_dynamic_t *dynamic) {
+ f_status_t f_utf_string_dynamic_decrease_by(const f_array_length_t amount, f_utf_string_dynamic_t *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);
if (dynamic->used + 1 > dynamic->size) {
f_array_length_t size = dynamic->used + f_memory_default_allocation_step;
- if (size > f_string_length_t_size) {
- if (dynamic->used + 1 > f_string_length_t_size) {
+ if (size > f_array_length_t_size) {
+ if (dynamic->used + 1 > f_array_length_t_size) {
return F_status_set_error(F_string_too_large);
}
- size = f_string_length_t_size;
+ size = f_array_length_t_size;
}
return private_f_utf_string_dynamic_resize(size, dynamic);
#endif // _di_f_utf_string_dynamic_increase_
#ifndef _di_f_utf_string_dynamic_increase_by_
- f_status_t f_utf_string_dynamic_increase_by(const f_string_length_t amount, f_utf_string_dynamic_t *dynamic) {
+ f_status_t f_utf_string_dynamic_increase_by(const f_array_length_t amount, f_utf_string_dynamic_t *dynamic) {
#ifndef _di_level_0_parameter_checking_
if (!dynamic) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_utf_string_dynamic_increase_by_
#ifndef _di_f_utf_string_dynamic_resize_
- f_status_t f_utf_string_dynamic_resize(const f_string_length_t length, f_utf_string_dynamic_t *dynamic) {
+ f_status_t f_utf_string_dynamic_resize(const f_array_length_t length, f_utf_string_dynamic_t *dynamic) {
#ifndef _di_level_0_parameter_checking_
if (!dynamic) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
typedef struct {
f_utf_string_t string;
- f_string_length_t size;
- f_string_length_t used;
+ f_array_length_t size;
+ f_array_length_t used;
} f_utf_string_static_t;
#define f_utf_string_static_t_initialize { 0, 0, 0 }
* F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_f_utf_string_dynamic_decrease_by_
- extern f_status_t f_utf_string_dynamic_decrease_by(const f_string_length_t amount, f_utf_string_dynamic_t *dynamic);
+ extern f_status_t f_utf_string_dynamic_decrease_by(const f_array_length_t amount, f_utf_string_dynamic_t *dynamic);
#endif // _di_f_utf_string_dynamic_decrease_by_
/**
* Resize the dynamic string to a larger size.
*
* This will resize making the string larger based on the given length.
- * If the given length is too large for the buffer, then attempt to set max buffer size (f_string_length_t_size).
+ * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size).
* If already set to the maximum buffer size, then the resize will fail.
*
* @param amount
* Resize the dynamic string to a larger size.
*
* This will resize making the string larger based on the given length.
- * If the given length is too large for the buffer, then attempt to set max buffer size (f_string_length_t_size).
+ * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size).
* If already set to the maximum buffer size, then the resize will fail.
*
* @param amount
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_f_utf_string_dynamic_increase_by_
- extern f_status_t f_utf_string_dynamic_increase_by(const f_string_length_t amount, f_utf_string_dynamic_t *dynamic);
+ extern f_status_t f_utf_string_dynamic_increase_by(const f_array_length_t amount, f_utf_string_dynamic_t *dynamic);
#endif // _di_f_utf_string_dynamic_increase_by_
/**
* @param length
* The new size to use.
* @param dynamics
- * The string array to resize.
+ * The array to resize.
*
* @return
* F_none on success.
* @param amount
* A positive number representing how much to decimate the size by.
* @param dynamics
- * The string array to resize.
+ * The array to resize.
*
* @return
* F_none on success.
* @param amount
* A positive number representing how much to decrease the size by.
* @param dynamics
- * The string array to resize.
+ * The array to resize.
*
* @return
* F_none on success.
* If already set to the maximum buffer size, then the resize will fail.
*
* @param dynamics
- * The string array to resize.
+ * The array to resize.
*
* @return
* F_none on success.
/**
* Resize the dynamic string array to a larger size.
*
- * This will resize making the string larger based on the given length.
+ * This will resize making the array larger based on the given length.
* If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size).
* If already set to the maximum buffer size, then the resize will fail.
*
* @param amount
* A positive number representing how much to increase the size by.
* @param dynamics
- * The string array to resize.
+ * The array to resize.
*
* @return
* F_none on success.
* @param length
* The new size to use.
* @param dynamics
- * The string array to resize.
+ * The array to resize.
*
* @return
* F_none on success.
*/
#ifndef _di_f_utf_string_quantity_t_
typedef struct {
- f_string_length_t start;
- f_string_length_t total;
+ f_array_length_t start;
+ f_array_length_t total;
} f_utf_string_quantity_t;
#define f_utf_string_quantity_t_initialize { 0, 0 }
*/
#ifndef _di_f_utf_string_range_t_
typedef struct {
- f_string_length_t start;
- f_string_length_t stop;
+ f_array_length_t start;
+ f_array_length_t stop;
} f_utf_string_range_t;
#define f_utf_string_range_t_initialize { 1, 0 }
if (!color4 && color5 != 0) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- f_string_length_t string_size = strnlen(format.begin, f_color_max_size) + strnlen(format.end, f_color_max_size) + 1;
+ f_array_length_t string_size = strnlen(format.begin, f_color_max_size) + strnlen(format.end, f_color_max_size) + 1;
if (!color2) string_size += strnlen(color1, f_color_max_size);
else if (!color3) string_size += strnlen(color1, f_color_max_size) + strnlen(color2, f_color_max_size);
#endif // _di_level_1_parameter_checking_
f_status_t status = F_none;
- f_string_length_t length = strlen(argument);
+ f_array_length_t length = strlen(argument);
if (!length) {
directory->used = 0;
} // while
if (argument[0] == f_path_separator_s[0]) {
- f_string_length_t begin = 1;
+ f_array_length_t begin = 1;
while (begin < length && argument[begin] == f_path_separator_s[0]) {
begin++;
}
}
else if (length > 3 && argument[0] == f_path_separator_current_s[0] && argument[1] == f_path_separator_current_s[0] && argument[2] == f_path_separator_s[0]) {
- f_string_length_t begin = 3;
+ f_array_length_t begin = 3;
while (begin < length && argument[begin] == f_path_separator_s[0]) {
begin++;
}
}
else if (length > 2 && argument[0] == f_path_separator_current_s[0] && argument[1] == f_path_separator_s[0]) {
- f_string_length_t begin = 2;
+ f_array_length_t begin = 2;
while (begin < length && argument[begin] == f_path_separator_s[0]) {
begin++;
f_file_t file = f_macro_file_t_initialize2(0, -1, f_file_flag_write_only);
f_status_t status = F_none;
- f_string_length_t length = 0;
+ f_array_length_t length = 0;
for (f_array_length_t i = 0; i < control_group.groups.used; ++i) {
f_number_unsigned_t digit = 0;
f_number_unsigned_t converted = 0;
- for (f_string_length_t i = range.start; i <= range.stop; i++) {
+ for (f_array_length_t i = range.start; i <= range.stop; i++) {
if (f_conversion_character_to_binary(string[i], &digit) == F_none) {
if (digits) {
f_number_unsigned_t digit = 0;
f_number_unsigned_t converted = 0;
- for (f_string_length_t i = range.start; i <= range.stop; i++) {
+ for (f_array_length_t i = range.start; i <= range.stop; i++) {
if (f_conversion_character_to_binary(string[i], &digit) == F_none) {
if (digits) {
f_number_unsigned_t digit = 0;
f_number_unsigned_t converted = 0;
- for (f_string_length_t i = range.start; i <= range.stop; i++) {
+ for (f_array_length_t i = range.start; i <= range.stop; i++) {
if (f_conversion_character_to_decimal(string[i], &digit) == F_none) {
f_number_unsigned_t digit = 0;
f_number_unsigned_t converted = 0;
- for (f_string_length_t i = range.start; i <= range.stop; i++) {
+ for (f_array_length_t i = range.start; i <= range.stop; i++) {
if (f_conversion_character_to_decimal(string[i], &digit) == F_none) {
f_number_unsigned_t digit = 0;
f_number_unsigned_t converted = 0;
- for (f_string_length_t i = range.start; i <= range.stop; i++) {
+ for (f_array_length_t i = range.start; i <= range.stop; i++) {
if (f_conversion_character_to_duodecimal(string[i], &digit) == F_none) {
f_number_unsigned_t digit = 0;
f_number_unsigned_t converted = 0;
- for (f_string_length_t i = range.start; i <= range.stop; i++) {
+ for (f_array_length_t i = range.start; i <= range.stop; i++) {
if (f_conversion_character_to_duodecimal(string[i], &digit) == F_none) {
f_number_unsigned_t digit = 0;
f_number_unsigned_t converted = 0;
- for (f_string_length_t i = range.start; i <= range.stop; i++) {
+ for (f_array_length_t i = range.start; i <= range.stop; i++) {
if (f_conversion_character_to_hexidecimal(string[i], &digit) == F_none) {
f_number_unsigned_t digit = 0;
f_number_unsigned_t converted = 0;
- for (f_string_length_t i = range.start; i <= range.stop; i++) {
+ for (f_array_length_t i = range.start; i <= range.stop; i++) {
if (f_conversion_character_to_hexidecimal(string[i], &digit) == F_none) {
f_number_unsigned_t digit = 0;
f_number_unsigned_t converted = 0;
- for (f_string_length_t i = range.start; i <= range.stop; i++) {
+ for (f_array_length_t i = range.start; i <= range.stop; i++) {
if (f_conversion_character_to_octal(string[i], &digit) == F_none) {
f_number_unsigned_t digit = 0;
f_number_unsigned_t converted = 0;
- for (f_string_length_t i = range.start; i <= range.stop; i++) {
+ for (f_array_length_t i = range.start; i <= range.stop; i++) {
if (f_conversion_character_to_octal(string[i], &digit) == F_none) {
uint8_t width_max = 0;
uint8_t mode = 0;
int8_t vector = 0; // 0 for assumed positive, 1 for explicit positive, -1 for negative.
- f_string_length_t j = 0;
- f_string_length_t offset = 0;
+ f_array_length_t j = 0;
+ f_array_length_t offset = 0;
f_status_t status = F_none;
- for (f_string_length_t i = range.start; i <= range.stop; i++) {
+ for (f_array_length_t i = range.start; i <= range.stop; i++) {
width = f_macro_utf_byte_width_is(string[i]);
if (!width) {
uint8_t width = 0;
uint8_t width_max = 0;
uint8_t mode = 0;
- f_string_length_t j = 0;
- f_string_length_t offset = 0;
+ f_array_length_t j = 0;
+ f_array_length_t offset = 0;
f_status_t status = F_none;
int8_t sign_found = 0;
- for (f_string_length_t i = range.start; i <= range.stop; i++) {
+ for (f_array_length_t i = range.start; i <= range.stop; i++) {
width = f_macro_utf_byte_width_is(string[i]);
if (!width) {
#endif
#ifndef _di_fl_directory_create_
- f_status_t fl_directory_create(const f_string_t path, const f_string_length_t length, const mode_t mode) {
+ f_status_t fl_directory_create(const f_string_t path, const f_array_length_t length, const mode_t mode) {
#ifndef _di_level_1_parameter_checking_
if (!path) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
if (status == F_true) return F_directory_found;
{
- f_string_length_t at_tree = 0;
- f_string_length_t at_path = 0;
+ f_array_length_t at_tree = 0;
+ f_array_length_t at_path = 0;
char tree[length];
#endif // _di_fl_directory_create_
#ifndef _di_fl_directory_clone_
- f_status_t fl_directory_clone(const f_string_t source, const f_string_t destination, const f_string_length_t source_length, const f_string_length_t destination_length, const bool role, const fl_directory_recurse_t recurse) {
+ f_status_t fl_directory_clone(const f_string_t source, const f_string_t destination, const f_array_length_t source_length, const f_array_length_t destination_length, const bool role, const fl_directory_recurse_t recurse) {
#ifndef _di_level_1_parameter_checking_
if (!source) return F_status_set_error(F_parameter);
if (!destination) return F_status_set_error(F_parameter);
// do not allow null termination or trailing path separators in the string's length calculation.
{
- f_string_length_t i = source_length;
+ f_array_length_t i = source_length;
for (; i > 0; i--, static_source.used--) {
#endif // _di_fl_directory_clone_
#ifndef _di_fl_directory_clone_content_
- f_status_t fl_directory_clone_content(const f_string_t source, const f_string_t destination, const f_string_length_t source_length, const f_string_length_t destination_length, const bool role, const fl_directory_recurse_t recurse) {
+ f_status_t fl_directory_clone_content(const f_string_t source, const f_string_t destination, const f_array_length_t source_length, const f_array_length_t destination_length, const bool role, const fl_directory_recurse_t recurse) {
#ifndef _di_level_1_parameter_checking_
if (!source) return F_status_set_error(F_parameter);
if (!destination) return F_status_set_error(F_parameter);
// do not allow null termination or trailing path separators in the string's length calculation.
{
- f_string_length_t i = source_length;
+ f_array_length_t i = source_length;
for (; i > 0; i--, static_source.used--) {
#endif // _di_fl_directory_clone_content_
#ifndef _di_fl_directory_copy_
- f_status_t fl_directory_copy(const f_string_t source, const f_string_t destination, const f_string_length_t source_length, const f_string_length_t destination_length, const f_mode_t mode, const fl_directory_recurse_t recurse) {
+ f_status_t fl_directory_copy(const f_string_t source, const f_string_t destination, const f_array_length_t source_length, const f_array_length_t destination_length, const f_mode_t mode, const fl_directory_recurse_t recurse) {
#ifndef _di_level_1_parameter_checking_
if (!source) return F_status_set_error(F_parameter);
if (!destination) return F_status_set_error(F_parameter);
// do not allow null termination or trailing path separators in the string's length calculation.
{
- f_string_length_t i = source_length;
+ f_array_length_t i = source_length;
for (; i > 0; i--, static_source.used--) {
#endif // _di_fl_directory_copy_
#ifndef _di_fl_directory_copy_content_
- f_status_t fl_directory_copy_content(const f_string_t source, const f_string_t destination, const f_string_length_t source_length, const f_string_length_t destination_length, const f_mode_t mode, const fl_directory_recurse_t recurse) {
+ f_status_t fl_directory_copy_content(const f_string_t source, const f_string_t destination, const f_array_length_t source_length, const f_array_length_t destination_length, const f_mode_t mode, const fl_directory_recurse_t recurse) {
#ifndef _di_level_1_parameter_checking_
if (!source) return F_status_set_error(F_parameter);
if (!destination) return F_status_set_error(F_parameter);
// do not allow null termination or trailing path separators in the string's length calculation.
{
- f_string_length_t i = source_length;
+ f_array_length_t i = source_length;
for (; i > 0; i--, static_source.used--) {
const bool null_terminated = path->string[path->used] == 0;
bool first_nulless = F_false;
- f_string_length_t i = path->used - 1;
- f_string_length_t j = 0;
+ f_array_length_t i = path->used - 1;
+ f_array_length_t j = 0;
f_status_t status = F_none;
#endif // _di_fl_directory_path_pop_
#ifndef _di_fl_directory_path_push_
- f_status_t fl_directory_path_push(const f_string_t source, f_string_length_t length, f_string_dynamic_t *destination) {
+ f_status_t fl_directory_path_push(const f_string_t source, f_array_length_t length, f_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (!source) return F_status_set_error(F_parameter);
if (destination->used > destination->size) return F_status_set_error(F_parameter);
* @see f_directory_create()
*/
#ifndef _di_fl_directory_create_
- extern f_status_t fl_directory_create(const f_string_t path, const f_string_length_t length, const mode_t mode);
+ extern f_status_t fl_directory_create(const f_string_t path, const f_array_length_t length, const mode_t mode);
#endif // _di_fl_directory_create_
/**
* @see f_file_clone()
*/
#ifndef _di_fl_directory_clone_
- extern f_status_t fl_directory_clone(const f_string_t source, const f_string_t destination, const f_string_length_t source_length, const f_string_length_t destination_length, const bool role, const fl_directory_recurse_t recurse);
+ extern f_status_t fl_directory_clone(const f_string_t source, const f_string_t destination, const f_array_length_t source_length, const f_array_length_t destination_length, const bool role, const fl_directory_recurse_t recurse);
#endif // _di_fl_directory_clone_
/**
* @see f_file_clone()
*/
#ifndef _di_fl_directory_clone_content_
- extern f_status_t fl_directory_clone_content(const f_string_t source, const f_string_t destination, const f_string_length_t source_length, const f_string_length_t destination_length, const bool role, const fl_directory_recurse_t recurse);
+ extern f_status_t fl_directory_clone_content(const f_string_t source, const f_string_t destination, const f_array_length_t source_length, const f_array_length_t destination_length, const bool role, const fl_directory_recurse_t recurse);
#endif // _di_fl_directory_clone_content_
/**
* @see f_file_copy()
*/
#ifndef _di_fl_directory_copy_
- extern f_status_t fl_directory_copy(const f_string_t source, const f_string_t destination, const f_string_length_t source_length, const f_string_length_t destination_length, const f_mode_t mode, const fl_directory_recurse_t recurse);
+ extern f_status_t fl_directory_copy(const f_string_t source, const f_string_t destination, const f_array_length_t source_length, const f_array_length_t destination_length, const f_mode_t mode, const fl_directory_recurse_t recurse);
#endif // _di_fl_directory_copy_
/**
* @see f_file_copy()
*/
#ifndef _di_fl_directory_copy_content_
- extern f_status_t fl_directory_copy_content(const f_string_t source, const f_string_t destination, const f_string_length_t source_length, const f_string_length_t destination_length, const f_mode_t mode, const fl_directory_recurse_t recurse);
+ extern f_status_t fl_directory_copy_content(const f_string_t source, const f_string_t destination, const f_array_length_t source_length, const f_array_length_t destination_length, const f_mode_t mode, const fl_directory_recurse_t recurse);
#endif // _di_fl_directory_copy_content_
/**
* Errors (with error bit) from: f_utf_is_control().
*/
#ifndef _di_fl_directory_path_push_
- extern f_status_t fl_directory_path_push(const f_string_t source, f_string_length_t length, f_string_dynamic_t *destination);
+ extern f_status_t fl_directory_path_push(const f_string_t source, f_array_length_t length, f_string_dynamic_t *destination);
#endif // _di_fl_directory_path_push_
/**
status = F_none;
int directory_fd = 0;
- f_string_length_t failures_used = recurse.failures ? recurse.failures->used : 0;
+ f_array_length_t failures_used = recurse.failures ? recurse.failures->used : 0;
{
f_string_dynamics_t * const list[] = {
if (F_status_is_error(status)) return status;
f_directory_status_t failure = f_directory_status_t_initialize;
- f_string_length_t size = 0;
+ f_array_length_t size = 0;
// identify if failure was because of source or destination.
struct stat source_stat;
status = f_file_stat(source.string, F_false, &source_stat);
if (F_status_is_error(status)) {
if (status == F_status_set_error(F_string_too_large)) {
- size = f_string_length_t_size - 1;
+ size = f_array_length_t_size - 1;
}
else {
size = source.used + file.used + 1;
}
else {
if (status == F_status_set_error(F_string_too_large)) {
- size = f_string_length_t_size - 1;
+ size = f_array_length_t_size - 1;
}
else {
size = destination.used + file.used + 1;
status = F_none;
int directory_fd = 0;
- f_string_length_t failures_used = recurse.failures ? recurse.failures->used : 0;
+ f_array_length_t failures_used = recurse.failures ? recurse.failures->used : 0;
{
f_string_dynamics_t * const list[] = {
if (F_status_is_error(status)) return status;
f_directory_status_t failure = f_directory_status_t_initialize;
- f_string_length_t size = 0;
+ f_array_length_t size = 0;
// identify if failure was because of source or destination.
struct stat source_stat;
if (F_status_is_error(status)) {
if (status == F_status_set_error(F_string_too_large)) {
- size = f_string_length_t_size - 1;
+ size = f_array_length_t_size - 1;
}
else {
size = source.used + file.used + 1;
}
else {
if (status == F_status_set_error(F_string_too_large)) {
- size = f_string_length_t_size - 1;
+ size = f_array_length_t_size - 1;
}
else {
size = destination.used + file.used + 1;
f_status_t private_fl_directory_list(const f_string_t path, int (*filter)(const struct dirent *), int (*sort)(const struct dirent **, const struct dirent **), const bool dereference, f_directory_listing_t *listing) {
struct dirent **entity = 0;
- f_string_length_t size = 0;
+ f_array_length_t size = 0;
f_status_t status = F_none;
DIR *parent = opendir(path);
}
f_string_dynamics_t *names = 0;
- f_string_length_t total = 0;
+ f_array_length_t total = 0;
struct stat file_stat;
int mode = 0;
size_t i = 0;
if (F_status_is_error(status)) break;
if (names->array[names->used].used > 0 && names->array[names->used].string[names->array[names->used].used - 1] != 0) {
- if (names->array[names->used].used == f_string_length_t_size) {
+ if (names->array[names->used].used == f_array_length_t_size) {
status = F_status_set_error(F_string_too_large);
break;
}
#endif // !defined(_di_fl_directory_list_)
#if !defined(_di_fl_directory_path_push_) || !defined(_di_fl_directory_path_push_dynamic_)
- f_status_t private_fl_directory_path_push(const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination) {
+ f_status_t private_fl_directory_path_push(const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination) {
bool terminated_null = F_false;
bool separator_prepend = F_false;
bool separator_append = F_false;
- f_string_length_t total = 0;
- f_string_length_t start = 0;
- f_string_length_t length_truncated = length;
+ f_array_length_t total = 0;
+ f_array_length_t start = 0;
+ f_array_length_t length_truncated = length;
f_status_t status = F_none;
{
- f_string_length_t i = 0;
- f_string_length_t j = 0;
+ f_array_length_t i = 0;
+ f_array_length_t j = 0;
if (destination->used > 0) {
if (!destination->string[destination->used - 1]) {
total += length_truncated - start;
if (destination->used + total > destination->size) {
- if (destination->used + total > f_string_length_t_size) {
+ if (destination->used + total > f_array_length_t_size) {
return F_status_set_error(F_string_too_large);
}
* @see fl_directory_path_push_dynamic()
*/
#if !defined(_di_fl_directory_path_push_) || !defined(_di_fl_directory_path_push_dynamic_)
- extern f_status_t private_fl_directory_path_push(const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination) f_gcc_attribute_visibility_internal;
+ extern f_status_t private_fl_directory_path_push(const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_fl_directory_path_push_) || !defined(_di_fl_directory_path_push_dynamic_)
#ifdef __cplusplus
#endif
#ifndef _di_fl_environment_load_name_
- f_status_t fl_environment_load_name(const f_string_t name, const f_string_length_t length, f_string_maps_t *environment) {
+ f_status_t fl_environment_load_name(const f_string_t name, const f_array_length_t length, f_string_maps_t *environment) {
#ifndef _di_level_2_parameter_checking_
if (!name) return F_status_set_error(F_parameter);
if (!environment) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
f_status_t status = F_none;
- const f_string_length_t length = strnlen(path, PATH_MAX);
+ const f_array_length_t length = strnlen(path, PATH_MAX);
if (!length) {
return F_none;
}
- f_string_length_t i = length;
- f_string_length_t first = 0;
- f_string_length_t total = 0;
+ f_array_length_t i = length;
+ f_array_length_t first = 0;
+ f_array_length_t total = 0;
for (i = 0; i <= length; i++) {
return F_none;
}
- f_string_length_t i = 0;
- f_string_length_t j = 0;
- f_string_length_t first = 0;
- f_string_length_t total = 0;
+ f_array_length_t i = 0;
+ f_array_length_t j = 0;
+ f_array_length_t first = 0;
+ f_array_length_t total = 0;
f_string_dynamic_t part = f_string_dynamic_t_initialize;
#endif // _di_level_0_parameter_checking_
f_status_t status = F_none;
- const f_string_length_t length = strnlen(path, PATH_MAX);
+ const f_array_length_t length = strnlen(path, PATH_MAX);
if (!length) {
return F_none;
}
- f_string_length_t i = length;
- f_string_length_t j = length;
- f_string_length_t last = length;
- f_string_length_t total = 0;
+ f_array_length_t i = length;
+ f_array_length_t j = length;
+ f_array_length_t last = length;
+ f_array_length_t total = 0;
f_string_dynamic_t part = f_string_dynamic_t_initialize;
return F_none;
}
- f_string_length_t i = path.used;
- f_string_length_t j = path.used;
- f_string_length_t k = 0;
- f_string_length_t last = path.used;
- f_string_length_t total = 0;
+ f_array_length_t i = path.used;
+ f_array_length_t j = path.used;
+ f_array_length_t k = 0;
+ f_array_length_t last = path.used;
+ f_array_length_t total = 0;
f_string_dynamic_t part = f_string_dynamic_t_initialize;
* @see f_string_maps_increase_by()
*/
#ifndef _di_fl_environment_load_name_
- extern f_status_t fl_environment_load_name(const f_string_t name, const f_string_length_t length, f_string_maps_t *environment);
+ extern f_status_t fl_environment_load_name(const f_string_t name, const f_array_length_t length, f_string_maps_t *environment);
#endif // _di_fl_environment_load_name_
/**
if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- const f_string_length_t destination_used = destination->used;
+ const f_array_length_t destination_used = destination->used;
f_status_t status = private_fl_fss_basic_write(F_true, object, quote ? quote : f_fss_delimit_quote_double, range, destination);
status = f_string_dynamic_increase_by(destination->used + (range->stop - range->start) + 1, destination);
if (F_status_is_error(status)) return status;
- const f_string_length_t destination_used = destination->used;
+ const f_array_length_t destination_used = destination->used;
for (; range->start <= range->stop && range->start < content.used; range->start++) {
return FL_fss_found_object_not;
}
- f_string_length_t slash_first = 0;
- f_string_length_t slash_count = 0;
- f_string_length_t start = 0;
- f_string_length_t stop = 0;
+ f_array_length_t slash_first = 0;
+ f_array_length_t slash_count = 0;
+ f_array_length_t start = 0;
+ f_array_length_t stop = 0;
bool graph_first = F_true;
found->array[found->used].start = range->start;
- f_string_length_t newline_last = range->start;
- f_string_length_t slash_first = 0;
- f_string_length_t slash_count = 0;
- f_string_length_t start = 0;
- f_string_length_t comment_delimit = 0;
+ f_array_length_t newline_last = range->start;
+ f_array_length_t slash_first = 0;
+ f_array_length_t slash_count = 0;
+ f_array_length_t start = 0;
+ f_array_length_t comment_delimit = 0;
uint8_t graph_first = 0x1; // 0x0 = false, 0x1 = true, 0x2 = false, but there is a delimited comment, comment_delimit is set.
status = f_string_dynamic_increase_by(destination->used + (range->stop - range->start) + 3, destination);
if (F_status_is_error(status)) return status;
- const f_string_length_t input_start = range->start;
- const f_string_length_t used_start = destination->used;
+ const f_array_length_t input_start = range->start;
+ const f_array_length_t used_start = destination->used;
- f_string_length_t i = 0;
- f_string_length_t slash_count = 0;
+ f_array_length_t i = 0;
+ f_array_length_t slash_count = 0;
f_string_range_t range_next = f_string_range_t_initialize;
status = f_string_dynamic_increase_by(destination->used + (range->stop - range->start) + 2, destination);
if (F_status_is_error(status)) return status;
- const f_string_length_t input_start = range->start;
- const f_string_length_t used_start = destination->used;
+ const f_array_length_t input_start = range->start;
+ const f_array_length_t used_start = destination->used;
bool is_comment = F_false;
bool has_graph = F_false;
bool do_prepend = F_true;
- f_string_length_t i = 0;
- f_string_length_t slash_count = 0;
- f_string_length_t start = 0;
+ f_array_length_t i = 0;
+ f_array_length_t slash_count = 0;
+ f_array_length_t start = 0;
uint8_t width = 0;
return FL_fss_found_object_not;
}
- f_string_length_t start = 0;
- f_string_length_t stop = 0;
- f_string_length_t slash_first = 0;
- f_string_length_t slash_count = 0;
+ f_array_length_t start = 0;
+ f_array_length_t stop = 0;
+ f_array_length_t slash_first = 0;
+ f_array_length_t slash_count = 0;
bool graph_first = F_true;
f_macro_fss_nest_t_increase(status, (*found));
if (F_status_is_error(status)) return status;
- f_string_lengths_t positions_start = f_string_lengths_t_initialize;
+ f_array_lengths_t positions_start = f_array_lengths_t_initialize;
- f_macro_string_lengths_t_clear(positions_start)
- f_macro_string_lengths_t_resize(status, positions_start, f_fss_default_allocation_step)
+ f_macro_array_lengths_t_clear(positions_start)
+ f_macro_array_lengths_t_resize(status, positions_start, f_fss_default_allocation_step)
if (F_status_is_error(status)) return status;
f_fss_objects_t objects = f_fss_objects_t_initialize;
f_macro_fss_objects_t_resize(status, objects, f_fss_default_allocation_step)
if (F_status_is_error(status)) {
- f_macro_string_lengths_t_delete_simple(positions_start);
+ f_macro_array_lengths_t_delete_simple(positions_start);
return status;
}
f_array_length_t depth = 0;
f_array_length_t position = 0;
- f_string_length_t position_previous = range->start;
- f_string_length_t line_start = range->start;
- f_string_length_t newline_last = range->start;
- f_string_length_t comment_delimit = 0;
+ f_array_length_t position_previous = range->start;
+ f_array_length_t line_start = range->start;
+ f_array_length_t newline_last = range->start;
+ f_array_length_t comment_delimit = 0;
- f_string_length_t slash_first = 0;
- f_string_length_t slash_last = 0;
- f_string_length_t slash_count = 0;
+ f_array_length_t slash_first = 0;
+ f_array_length_t slash_last = 0;
+ f_array_length_t slash_count = 0;
- f_string_length_t before_list_open = position_previous;
+ f_array_length_t before_list_open = position_previous;
bool is_open = F_false;
depth++;
if (depth > positions_start.size) {
- f_macro_string_lengths_t_resize(status, positions_start, positions_start.size + f_fss_default_allocation_step);
+ f_macro_array_lengths_t_resize(status, positions_start, positions_start.size + f_fss_default_allocation_step);
if (F_status_is_error(status)) break;
}
depth++;
if (depth >= positions_start.size) {
- f_macro_string_lengths_t_resize(status, positions_start, positions_start.size + f_fss_default_allocation_step);
+ f_macro_array_lengths_t_resize(status, positions_start, positions_start.size + f_fss_default_allocation_step);
if (F_status_is_error(status)) break;
f_macro_fss_objects_t_resize(status, objects, objects.size + f_fss_default_allocation_step);
private_fl_macro_fss_nest_return_on_overflow_delimited((buffer), (*range), (*found), positions_start, objects, F_none_eos, F_none_stop)
- f_macro_string_lengths_t_delete_simple(positions_start);
+ f_macro_array_lengths_t_delete_simple(positions_start);
f_macro_fss_objects_t_delete_simple(objects);
return FL_fss_found_content;
if (F_status_is_error(status)) break;
} // while
- f_macro_string_lengths_t_delete_simple(positions_start);
+ f_macro_array_lengths_t_delete_simple(positions_start);
f_macro_fss_objects_t_delete_simple(objects);
delimits->used = delimits_used;
status = f_string_dynamic_increase_by(destination->used + (range->stop - range->start) + 3, destination);
if (F_status_is_error(status)) return status;
- const f_string_length_t input_start = range->start;
- const f_string_length_t used_start = destination->used;
+ const f_array_length_t input_start = range->start;
+ const f_array_length_t used_start = destination->used;
- f_string_length_t i = 0;
- f_string_length_t slash_count = 0;
+ f_array_length_t i = 0;
+ f_array_length_t slash_count = 0;
f_string_range_t range_next = f_string_range_t_initialize;
status = f_string_dynamic_increase_by(destination->used + (range->stop - range->start) + 3, destination);
if (F_status_is_error(status)) return status;
- const f_string_length_t input_start = range->start;
- const f_string_length_t used_start = destination->used;
+ const f_array_length_t input_start = range->start;
+ const f_array_length_t used_start = destination->used;
bool is_comment = F_false;
bool ends_on_eol = F_false;
bool has_graph = F_false;
bool do_prepend = F_true;
- f_string_length_t i = 0;
- f_string_length_t slash_count = 0;
- f_string_length_t start = 0;
+ f_array_length_t i = 0;
+ f_array_length_t slash_count = 0;
+ f_array_length_t start = 0;
f_array_length_t r = 0;
if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- const f_string_length_t used_start = destination->used;
+ const f_array_length_t used_start = destination->used;
f_status_t status = private_fl_fss_basic_write(F_true, object, quote ? quote : f_fss_delimit_quote_double, range, destination);
return FL_fss_found_object_not;
}
- f_string_length_t start = 0;
- f_string_length_t stop = 0;
- f_string_length_t slash_first = 0;
- f_string_length_t slash_count = 0;
+ f_array_length_t start = 0;
+ f_array_length_t stop = 0;
+ f_array_length_t slash_first = 0;
+ f_array_length_t slash_count = 0;
bool graph_first = F_true;
found->array[found->used].start = range->start;
- f_string_length_t newline_last = range->start;
- f_string_length_t slash_first = 0;
- f_string_length_t slash_count = 0;
- f_string_length_t start = 0;
+ f_array_length_t newline_last = range->start;
+ f_array_length_t slash_first = 0;
+ f_array_length_t slash_count = 0;
+ f_array_length_t start = 0;
// identify where the content ends.
while (range->start <= range->stop && range->start < buffer.used) {
status = f_string_dynamic_increase_by(destination->used + (range->stop - range->start) + 3, destination);
if (F_status_is_error(status)) return status;
- const f_string_length_t input_start = range->start;
- const f_string_length_t used_start = destination->used;
+ const f_array_length_t input_start = range->start;
+ const f_array_length_t used_start = destination->used;
- f_string_length_t i = 0;
- f_string_length_t slash_count = 0;
+ f_array_length_t i = 0;
+ f_array_length_t slash_count = 0;
f_string_range_t range_next = f_string_range_t_initialize;
status = f_string_dynamic_increase_by(destination->used + (range->stop - range->start) + 3, destination);
if (F_status_is_error(status)) return status;
- const f_string_length_t input_start = range->start;
- const f_string_length_t used_start = destination->used;
+ const f_array_length_t input_start = range->start;
+ const f_array_length_t used_start = destination->used;
bool is_comment = F_false;
bool ends_on_eol = F_false;
bool has_graph = F_false;
bool do_prepend = F_true;
- f_string_length_t i = 0;
- f_string_length_t slash_count = 0;
- f_string_length_t start = 0;
+ f_array_length_t i = 0;
+ f_array_length_t slash_count = 0;
+ f_array_length_t start = 0;
f_array_length_t r = 0;
#endif
#if !defined(_di_fl_fss_basic_object_write_string_) || !defined(_di_fl_fss_extended_object_write_string_)
- f_status_t private_fl_fss_basic_write_object_trim(const f_fss_quote_t quote, const f_string_length_t used_start, f_string_dynamic_t *destination) {
+ f_status_t private_fl_fss_basic_write_object_trim(const f_fss_quote_t quote, const f_array_length_t used_start, f_string_dynamic_t *destination) {
f_status_t status = F_none;
f_string_range_t destination_range = f_macro_string_range_t_initialize(destination->used);
- f_string_length_t i = 0;
+ f_array_length_t i = 0;
uint8_t width = 0;
} // for
if (destination->string[destination_range.start] == quote) {
- const f_string_length_t front = destination_range.start;
+ const f_array_length_t front = destination_range.start;
for (destination_range.start++; destination_range.start < destination->used; destination_range.start++) {
}
} // for
- const f_string_length_t rear = destination_range.start + 1;
+ const f_array_length_t rear = destination_range.start + 1;
for (; destination_range.start > front; destination_range.start--) {
#endif // !defined(_di_fl_fss_basic_list_content_write_string_) || !defined(_di_fl_fss_extended_list_content_write_string_) || !defined(_di_fl_fss_embedded_list_content_write_string_)
#if !defined(_di_fl_fss_basic_list_object_write_string_) || !defined(_di_fl_fss_extended_list_object_write_string_)
- f_status_t private_fl_fss_basic_list_write_object_trim(const f_string_length_t used_start, f_string_dynamic_t *destination) {
+ f_status_t private_fl_fss_basic_list_write_object_trim(const f_array_length_t used_start, f_string_dynamic_t *destination) {
f_status_t status = F_none;
f_string_range_t destination_range = f_macro_string_range_t_initialize(destination->used);
- f_string_length_t i = 0;
+ f_array_length_t i = 0;
uint8_t width = 0;
// identify where the object begins.
if (buffer.string[range->start] == f_fss_delimit_slash) {
- f_string_length_t first_slash = range->start;
+ f_array_length_t first_slash = range->start;
found->start = range->start;
return FL_fss_found_object;
}
else {
- f_string_length_t first_slash = 0;
- f_string_length_t slash_count = 0;
- f_string_length_t location = 0;
+ f_array_length_t first_slash = 0;
+ f_array_length_t slash_count = 0;
+ f_array_length_t location = 0;
while (range->start <= range->stop && range->start < buffer.used) {
status = f_string_dynamic_increase_by(destination->used + (range->stop - range->start) + 4, destination);
if (F_status_is_error(status)) return status;
- const f_string_length_t input_start = range->start;
- const f_string_length_t used_start = destination->used;
+ const f_array_length_t input_start = range->start;
+ const f_array_length_t used_start = destination->used;
bool quoted = F_false;
bool commented = F_false;
- f_string_length_t item_first = 0;
- f_string_length_t item_total = 0;
- f_string_length_t quote_start = 0;
- f_string_length_t i = 0;
+ f_array_length_t item_first = 0;
+ f_array_length_t item_total = 0;
+ f_array_length_t quote_start = 0;
+ f_array_length_t i = 0;
// use placeholders for potential quote and potential delimited quote to avoid doing things such as memmove().
destination->string[destination->used++] = f_fss_delimit_placeholder;
* @see fl_fss_extended_object_write_string()
*/
#if !defined(_di_fl_fss_basic_object_write_string_) || !defined(_di_fl_fss_extended_object_write_string_)
- extern f_status_t private_fl_fss_basic_write_object_trim(const f_fss_quote_t quote, const f_string_length_t used_start, f_string_dynamic_t *destination) f_gcc_attribute_visibility_internal;
+ extern f_status_t private_fl_fss_basic_write_object_trim(const f_fss_quote_t quote, const f_array_length_t used_start, f_string_dynamic_t *destination) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_fl_fss_basic_object_write_string_) || !defined(_di_fl_fss_extended_object_write_string_)
/**
* @see fl_fss_extended_list_object_write_string()
*/
#if !defined(_di_fl_fss_basic_list_object_write_string_) || !defined(_di_fl_fss_extended_list_object_write_string_)
- extern f_status_t private_fl_fss_basic_list_write_object_trim(const f_string_length_t used_start, f_string_dynamic_t *destination) f_gcc_attribute_visibility_internal;
+ extern f_status_t private_fl_fss_basic_list_write_object_trim(const f_array_length_t used_start, f_string_dynamic_t *destination) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_fl_fss_basic_list_object_write_string_) || !defined(_di_fl_fss_extended_list_object_write_string_)
/**
if (range.start >= buffer.used) { \
delimits.used = delimits_used; \
comments.used = comments_used; \
- f_macro_string_lengths_t_delete_simple(positions); \
+ f_macro_array_lengths_t_delete_simple(positions); \
f_macro_fss_objects_t_delete_simple(objects); \
return eos_status; \
} \
else if (range.start > range.stop) { \
delimits.used = delimits_used; \
comments.used = comments_used; \
- f_macro_string_lengths_t_delete_simple(positions); \
+ f_macro_array_lengths_t_delete_simple(positions); \
f_macro_fss_objects_t_delete_simple(objects); \
return stop_status; \
}
#ifndef _di_fl_macro_fss_nest_return_on_overflow_delimited_
#define private_fl_macro_fss_nest_return_on_overflow_delimited(buffer, range, found, positions, objects, eos_status, stop_status) \
if (range.start >= buffer.used) { \
- f_macro_string_lengths_t_delete_simple(positions); \
+ f_macro_array_lengths_t_delete_simple(positions); \
f_macro_fss_objects_t_delete_simple(objects); \
return eos_status; \
} \
else if (range.start > range.stop) { \
- f_macro_string_lengths_t_delete_simple(positions); \
+ f_macro_array_lengths_t_delete_simple(positions); \
f_macro_fss_objects_t_delete_simple(objects); \
return stop_status; \
}
#endif
#ifndef _di_fl_print_trim_except_
- f_status_t fl_print_trim_except(FILE *output, const f_string_t string, const f_string_length_t length, const f_string_lengths_t except) {
+ f_status_t fl_print_trim_except(FILE *output, const f_string_t string, const f_array_length_t length, const f_array_lengths_t except) {
#ifndef _di_level_1_parameter_checking_
if (!output) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
#endif // _di_fl_print_trim_except_
#ifndef _di_fl_print_trim_except_dynamic_
- f_status_t fl_print_trim_except_dynamic(FILE *output, const f_string_static_t buffer, const f_string_lengths_t except) {
+ f_status_t fl_print_trim_except_dynamic(FILE *output, const f_string_static_t buffer, const f_array_lengths_t except) {
#ifndef _di_level_1_parameter_checking_
if (!output) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
#endif // _di_fl_print_trim_except_dynamic_
#ifndef _di_fl_print_trim_except_dynamic_partial_
- f_status_t fl_print_trim_except_dynamic_partial(FILE *output, const f_string_static_t buffer, const f_string_range_t range, const f_string_lengths_t except) {
+ f_status_t fl_print_trim_except_dynamic_partial(FILE *output, const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except) {
#ifndef _di_level_1_parameter_checking_
if (!output) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
if (!buffer.used || range.start > range.stop || range.start >= buffer.used) return F_data_not;
- f_string_length_t length = (range.stop - range.start) + 1;
+ f_array_length_t length = (range.stop - range.start) + 1;
if (length + range.start > buffer.used) {
length = buffer.used - range.start;
#endif // _di_fl_print_trim_except_dynamic_partial_
#ifndef _di_fl_print_trim_except_utf_
- f_status_t fl_print_trim_except_utf(FILE *output, const f_utf_string_t string, const f_string_length_t length, const f_string_lengths_t except) {
+ f_status_t fl_print_trim_except_utf(FILE *output, const f_utf_string_t string, const f_array_length_t length, const f_array_lengths_t except) {
#ifndef _di_level_1_parameter_checking_
if (!output) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
#endif // _di_fl_print_trim_except_utf_
#ifndef _di_fl_print_trim_except_utf_dynamic_
- f_status_t fl_print_trim_except_utf_dynamic(FILE *output, const f_utf_string_static_t buffer, const f_string_lengths_t except) {
+ f_status_t fl_print_trim_except_utf_dynamic(FILE *output, const f_utf_string_static_t buffer, const f_array_lengths_t except) {
#ifndef _di_level_1_parameter_checking_
if (!output) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
#endif // _di_fl_print_trim_except_utf_dynamic_
#ifndef _di_fl_print_trim_except_utf_dynamic_partial_
- f_status_t fl_print_trim_except_utf_dynamic_partial(FILE *output, const f_utf_string_static_t buffer, const f_utf_string_range_t range, const f_string_lengths_t except) {
+ f_status_t fl_print_trim_except_utf_dynamic_partial(FILE *output, const f_utf_string_static_t buffer, const f_utf_string_range_t range, const f_array_lengths_t except) {
#ifndef _di_level_1_parameter_checking_
if (!output) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
if (!buffer.used || range.start > range.stop || range.start >= buffer.used) return F_data_not;
- f_string_length_t length = (range.stop - range.start) + 1;
+ f_array_length_t length = (range.stop - range.start) + 1;
if (length + range.start > buffer.used) {
length = buffer.used - range.start;
#endif // _di_fl_print_trim_except_utf_dynamic_partial_
#ifndef _di_fl_print_trim_
- f_status_t fl_print_trim(FILE *output, const f_string_t string, const f_string_length_t length) {
+ f_status_t fl_print_trim(FILE *output, const f_string_t string, const f_array_length_t length) {
#ifndef _di_level_1_parameter_checking_
if (!output) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
if (!buffer.used || range.start > range.stop || range.start >= buffer.used) return F_data_not;
- f_string_length_t length = (range.stop - range.start) + 1;
+ f_array_length_t length = (range.stop - range.start) + 1;
if (length + range.start > buffer.used) {
length = buffer.used - range.start;
#endif // _di_fl_print_trim_dynamic_partial_
#ifndef _di_fl_print_trim_utf_
- f_status_t fl_print_trim_utf(FILE *output, const f_utf_string_t string, const f_string_length_t length) {
+ f_status_t fl_print_trim_utf(FILE *output, const f_utf_string_t string, const f_array_length_t length) {
#ifndef _di_level_1_parameter_checking_
if (!output) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
if (!buffer.used || range.start > range.stop || range.start >= buffer.used) return F_data_not;
- f_string_length_t length = (range.stop - range.start) + 1;
+ f_array_length_t length = (range.stop - range.start) + 1;
if (length + range.start > buffer.used) {
length = buffer.used - range.start;
* Errors (with error bit) from: f_utf_is_whitespace().
*/
#ifndef _di_fl_print_trim_except_
- extern f_status_t fl_print_trim_except(FILE *output, const f_string_t string, const f_string_length_t length, const f_string_lengths_t except);
+ extern f_status_t fl_print_trim_except(FILE *output, const f_string_t string, const f_array_length_t length, const f_array_lengths_t except);
#endif // _di_fl_print_trim_except_
/**
* Errors (with error bit) from: f_utf_is_whitespace().
*/
#ifndef _di_fl_print_trim_except_dynamic_
- extern f_status_t fl_print_trim_except_dynamic(FILE *output, const f_string_static_t buffer, const f_string_lengths_t except);
+ extern f_status_t fl_print_trim_except_dynamic(FILE *output, const f_string_static_t buffer, const f_array_lengths_t except);
#endif // _di_fl_print_trim_except_dynamic_
/**
* Errors (with error bit) from: f_utf_is_whitespace().
*/
#ifndef _di_fl_print_trim_except_dynamic_partial_
- extern f_status_t fl_print_trim_except_dynamic_partial(FILE *output, const f_string_static_t buffer, const f_string_range_t range, const f_string_lengths_t except);
+ extern f_status_t fl_print_trim_except_dynamic_partial(FILE *output, const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except);
#endif // _di_fl_print_trim_except_dynamic_partial_
/**
* Errors (with error bit) from: f_utf_character_is_whitespace().
*/
#ifndef _di_fl_print_trim_except_utf_
- extern f_status_t fl_print_trim_except_utf(FILE *output, const f_utf_string_t string, const f_string_length_t length, const f_string_lengths_t except);
+ extern f_status_t fl_print_trim_except_utf(FILE *output, const f_utf_string_t string, const f_array_length_t length, const f_array_lengths_t except);
#endif // _di_fl_print_trim_except_utf_
/**
* Errors (with error bit) from: f_utf_character_is_whitespace().
*/
#ifndef _di_fl_print_trim_except_utf_dynamic_
- extern f_status_t fl_print_trim_except_utf_dynamic(FILE *output, const f_utf_string_static_t buffer, const f_string_lengths_t except);
+ extern f_status_t fl_print_trim_except_utf_dynamic(FILE *output, const f_utf_string_static_t buffer, const f_array_lengths_t except);
#endif // _di_fl_print_trim_except_utf_dynamic_
/**
* Errors (with error bit) from: f_utf_character_is_whitespace().
*/
#ifndef _di_fl_print_trim_except_utf_dynamic_partial_
- extern f_status_t fl_print_trim_except_utf_dynamic_partial(FILE *output, const f_utf_string_static_t buffer, const f_utf_string_range_t range, const f_string_lengths_t except);
+ extern f_status_t fl_print_trim_except_utf_dynamic_partial(FILE *output, const f_utf_string_static_t buffer, const f_utf_string_range_t range, const f_array_lengths_t except);
#endif // _di_fl_print_trim_except_utf_dynamic_partial_
/**
* Errors (with error bit) from: f_utf_is_whitespace().
*/
#ifndef _di_fl_print_trim_
- extern f_status_t fl_print_trim(FILE *output, const f_string_t string, const f_string_length_t length);
+ extern f_status_t fl_print_trim(FILE *output, const f_string_t string, const f_array_length_t length);
#endif // _di_fl_print_trim_
/**
* Errors (with error bit) from: f_utf_character_is_whitespace().
*/
#ifndef _di_fl_print_trim_utf_
- extern f_status_t fl_print_trim_utf(FILE *output, const f_utf_string_t string, const f_string_length_t length);
+ extern f_status_t fl_print_trim_utf(FILE *output, const f_utf_string_t string, const f_array_length_t length);
#endif // _di_fl_print_trim_utf_
/**
#endif
#if !defined(_di_fl_print_trim_except_) || !defined(_di_fl_print_trim_except_dynamic_) || !defined(_di_fl_print_trim_except_dynamic_partial_)
- f_status_t private_fl_print_trim_except(FILE *output, const f_string_t string, const f_string_length_t start, const f_string_length_t stop, const f_string_lengths_t except) {
- register f_string_length_t i = start;
+ f_status_t private_fl_print_trim_except(FILE *output, const f_string_t string, const f_array_length_t start, const f_array_length_t stop, const f_array_lengths_t except) {
+ register f_array_length_t i = start;
- f_string_length_t j = 0;
- f_string_length_t e = 0;
- f_string_length_t ej = 0;
+ f_array_length_t j = 0;
+ f_array_length_t e = 0;
+ f_array_length_t ej = 0;
f_status_t status = F_none;
uint8_t width_max = 0;
#endif // !defined(_di_fl_print_trim_except_) || !defined(_di_fl_print_trim_except_dynamic_) || !defined(_di_fl_print_trim_except_dynamic_partial_)
#if !defined(_di_fl_print_trim_except_utf_) || !defined(_di_fl_print_trim_except_utf_dynamic_) || !defined(_di_fl_print_trim_except_utf_dynamic_partial_)
- f_status_t private_fl_print_trim_except_utf(FILE *output, const f_utf_string_t string, const f_string_length_t start, const f_string_length_t stop, const f_string_lengths_t except) {
- register f_string_length_t i = start;
+ f_status_t private_fl_print_trim_except_utf(FILE *output, const f_utf_string_t string, const f_array_length_t start, const f_array_length_t stop, const f_array_lengths_t except) {
+ register f_array_length_t i = start;
- f_string_length_t j = 0;
- f_string_length_t e = 0;
- f_string_length_t ej = 0;
+ f_array_length_t j = 0;
+ f_array_length_t e = 0;
+ f_array_length_t ej = 0;
f_status_t status = F_none;
#endif // !defined(_di_fl_print_trim_except_utf_) || !defined(_di_fl_print_trim_except_utf_dynamic_) || !defined(_di_fl_print_trim_except_utf_dynamic_partial_)
#if !defined(_di_fl_print_trim_) || !defined(_di_fl_print_trim_dynamic_) || !defined(_di_fl_print_trim_dynamic_partial_)
- f_status_t private_fl_print_trim(FILE *output, const f_string_t string, const f_string_length_t length) {
- register f_string_length_t i = 0;
+ f_status_t private_fl_print_trim(FILE *output, const f_string_t string, const f_array_length_t length) {
+ register f_array_length_t i = 0;
- f_string_length_t j = 0;
+ f_array_length_t j = 0;
f_status_t status = F_none;
uint8_t width_max = 0;
#endif // !defined(_di_fl_print_trim_) || !defined(_di_fl_print_trim_dynamic_) || !defined(_di_fl_print_trim_dynamic_partial_)
#if !defined(_di_fl_print_trim_utf_) || !defined(_di_fl_print_trim_utf_dynamic_) || !defined(_di_fl_print_trim_utf_dynamic_partial_)
- f_status_t private_fl_print_trim_utf(FILE *output, const f_utf_string_t string, const f_string_length_t length) {
- register f_string_length_t i = 0;
+ f_status_t private_fl_print_trim_utf(FILE *output, const f_utf_string_t string, const f_array_length_t length) {
+ register f_array_length_t i = 0;
- f_string_length_t j = 0;
+ f_array_length_t j = 0;
f_status_t status = F_none;
* @see fl_print_trim_except_dynamic_partial()
*/
#if !defined(_di_fl_print_trim_except_) || !defined(_di_fl_print_trim_except_dynamic_) || !defined(_di_fl_print_trim_except_dynamic_partial_)
- extern f_status_t private_fl_print_trim_except(FILE *output, const f_string_t string, const f_string_length_t start, const f_string_length_t stop, const f_string_lengths_t except) f_gcc_attribute_visibility_internal;
+ extern f_status_t private_fl_print_trim_except(FILE *output, const f_string_t string, const f_array_length_t start, const f_array_length_t stop, const f_array_lengths_t except) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_fl_print_trim_except_) || !defined(_di_fl_print_trim_except_dynamic_) || !defined(_di_fl_print_trim_except_dynamic_partial_)
/**
* @see fl_print_trim_except_utf_dynamic_partial()
*/
#if !defined(_di_fl_print_trim_except_utf_) || !defined(_di_fl_print_trim_except_utf_dynamic_) || !defined(_di_fl_print_trim_except_utf_dynamic_partial_)
- extern f_status_t private_fl_print_trim_except_utf(FILE *output, const f_utf_string_t string, const f_string_length_t start, const f_string_length_t stop, const f_string_lengths_t except) f_gcc_attribute_visibility_internal;
+ extern f_status_t private_fl_print_trim_except_utf(FILE *output, const f_utf_string_t string, const f_array_length_t start, const f_array_length_t stop, const f_array_lengths_t except) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_fl_print_trim_except_utf_) || !defined(_di_fl_print_trim_except_utf_dynamic_) || !defined(_di_fl_print_trim_except_utf_dynamic_partial_)
/**
* @see fl_print_trim_dynamic_partial()
*/
#if !defined(_di_fl_print_trim_) || !defined(_di_fl_print_trim_dynamic_) || !defined(_di_fl_print_trim_dynamic_partial_)
- extern f_status_t private_fl_print_trim(FILE *output, const f_string_t string, const f_string_length_t length) f_gcc_attribute_visibility_internal;
+ extern f_status_t private_fl_print_trim(FILE *output, const f_string_t string, const f_array_length_t length) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_fl_print_trim_) || !defined(_di_fl_print_trim_dynamic_) || !defined(_di_fl_print_trim_dynamic_partial_)
/**
* @see fl_print_trim_utf_dynamic_partial()
*/
#if !defined(_di_fl_print_trim_utf_) || !defined(_di_fl_print_trim_utf_dynamic_) || !defined(_di_fl_print_trim_utf_dynamic_partial_)
- extern f_status_t private_fl_print_trim_utf(FILE *output, const f_utf_string_t string, const f_string_length_t length) f_gcc_attribute_visibility_internal;
+ extern f_status_t private_fl_print_trim_utf(FILE *output, const f_utf_string_t string, const f_array_length_t length) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_fl_print_trim_utf_) || !defined(_di_fl_print_trim_utf_dynamic_) || !defined(_di_fl_print_trim_utf_dynamic_partial_)
#ifdef __cplusplus
#endif
#if !defined(_di_fl_string_compare_) || !defined(_di_fl_string_dynamic_compare_) || !defined(_di_fl_string_dynamic_partial_compare_)
- f_status_t private_fl_string_compare(const f_string_t string1, const f_string_t string2, const f_string_length_t offset1, const f_string_length_t offset2, const f_string_length_t stop1, const f_string_length_t stop2) {
- f_string_length_t i1 = offset1;
- f_string_length_t i2 = offset2;
+ f_status_t private_fl_string_compare(const f_string_t string1, const f_string_t string2, const f_array_length_t offset1, const f_array_length_t offset2, const f_array_length_t stop1, const f_array_length_t stop2) {
+ f_array_length_t i1 = offset1;
+ f_array_length_t i2 = offset2;
for (; i1 < stop1 && i2 < stop2; i1++, i2++) {
#endif // !defined(_di_fl_string_compare_) || !defined(_di_fl_string_dynamic_compare_) || !defined(_di_fl_string_dynamic_partial_compare_)
#if !defined(_di_fl_string_compare_except_) || !defined(_di_fl_string_dynamic_compare_except_) || !defined(_di_fl_string_dynamic_partial_compare_except_)
- f_status_t private_fl_string_compare_except(const f_string_t string1, const f_string_t string2, const f_string_length_t offset1, const f_string_length_t offset2, const f_string_length_t stop1, const f_string_length_t stop2, const f_string_lengths_t except1, const f_string_lengths_t except2) {
- f_string_length_t i1 = offset1;
- f_string_length_t i2 = offset2;
+ f_status_t private_fl_string_compare_except(const f_string_t string1, const f_string_t string2, const f_array_length_t offset1, const f_array_length_t offset2, const f_array_length_t stop1, const f_array_length_t stop2, const f_array_lengths_t except1, const f_array_lengths_t except2) {
+ f_array_length_t i1 = offset1;
+ f_array_length_t i2 = offset2;
- f_string_length_t e1 = 0;
- f_string_length_t e2 = 0;
+ f_array_length_t e1 = 0;
+ f_array_length_t e2 = 0;
while (i1 < stop1 && i2 < stop2) {
#endif // !defined(_di_fl_string_compare_except_) || !defined(_di_fl_string_dynamic_compare_except_) || !defined(_di_fl_string_dynamic_partial_compare_except_)
#if !defined(_di_fl_string_compare_except_trim_) || !defined(_di_fl_string_dynamic_compare_except_trim_) || !defined(_di_fl_string_dynamic_partial_compare_except_trim_)
- f_status_t private_fl_string_compare_except_trim(const f_string_t string1, const f_string_t string2, const f_string_length_t offset1, const f_string_length_t offset2, const f_string_length_t stop1, const f_string_length_t stop2, const f_string_lengths_t except1, const f_string_lengths_t except2) {
- f_string_length_t i1 = offset1;
- f_string_length_t i2 = offset2;
+ f_status_t private_fl_string_compare_except_trim(const f_string_t string1, const f_string_t string2, const f_array_length_t offset1, const f_array_length_t offset2, const f_array_length_t stop1, const f_array_length_t stop2, const f_array_lengths_t except1, const f_array_lengths_t except2) {
+ f_array_length_t i1 = offset1;
+ f_array_length_t i2 = offset2;
- f_string_length_t e1 = 0;
- f_string_length_t e2 = 0;
+ f_array_length_t e1 = 0;
+ f_array_length_t e2 = 0;
uint8_t width = 0;
uint8_t width_max = 0;
width = f_macro_utf_byte_width(string2[i2]);
} // for
- f_string_length_t last1 = i1;
- f_string_length_t last2 = i2;
+ f_array_length_t last1 = i1;
+ f_array_length_t last2 = i2;
{
// size1 and size2 are to represent to total number of characters after trim that are not ignored via "except".
- f_string_length_t size1 = 0;
- f_string_length_t size2 = 0;
+ f_array_length_t size1 = 0;
+ f_array_length_t size2 = 0;
- f_string_length_t j = 0;
- f_string_length_t ej = e1;
+ f_array_length_t j = 0;
+ f_array_length_t ej = e1;
// determine where the last non-whitespace is in string1.
for (j = i1; j < stop1; j += width) {
#endif // !defined(_di_fl_string_compare_except_trim_) || !defined(_di_fl_string_dynamic_compare_except_trim_) || !defined(_di_fl_string_dynamic_partial_compare_except_trim_)
#if !defined(_di_fl_string_compare_trim_) || !defined(_di_fl_string_dynamic_compare_trim_) || !defined(_di_fl_string_dynamic_partial_compare_trim_)
- f_status_t private_fl_string_compare_trim(const f_string_t string1, const f_string_t string2, const f_string_length_t offset1, const f_string_length_t offset2, const f_string_length_t stop1, const f_string_length_t stop2) {
- f_string_length_t i1 = offset1;
- f_string_length_t i2 = offset2;
+ f_status_t private_fl_string_compare_trim(const f_string_t string1, const f_string_t string2, const f_array_length_t offset1, const f_array_length_t offset2, const f_array_length_t stop1, const f_array_length_t stop2) {
+ f_array_length_t i1 = offset1;
+ f_array_length_t i2 = offset2;
uint8_t width = 0;
uint8_t width_max = 0;
width = f_macro_utf_byte_width(string2[i2]);
} // for
- f_string_length_t last1 = i1;
- f_string_length_t last2 = i2;
+ f_array_length_t last1 = i1;
+ f_array_length_t last2 = i2;
{
// size1 and size2 are to represent to total number of characters after trim.
- f_string_length_t size1 = 0;
- f_string_length_t size2 = 0;
+ f_array_length_t size1 = 0;
+ f_array_length_t size2 = 0;
// determine where the last non-whitespace is in string1.
- for (f_string_length_t j = i1; j < stop1; j += width) {
+ for (f_array_length_t j = i1; j < stop1; j += width) {
// skip past NULL in string1.
while (j < stop1 && !string1[j]) j++;
} // for
// determine where the last non-whitespace is in string2.
- for (f_string_length_t j = i2; j < stop2; j += width) {
+ for (f_array_length_t j = i2; j < stop2; j += width) {
// skip past NULL in string2.
while (j < stop2 && !string2[j]) j++;
#endif // !defined(_di_fl_string_compare_trim_) || !defined(_di_fl_string_dynamic_compare_trim_) || !defined(_di_fl_string_dynamic_partial_compare_trim_)
#if !defined(_di_fl_string_rip_) || !defined(_di_fl_string_dynamic_rip_) || !defined(_di_fl_string_rip_nulless_) || !defined(_di_fl_string_dynamic_rip_nulless_)
- f_status_t private_fl_string_rip_find_range(const f_string_t source, f_string_length_t *start, f_string_length_t *stop) {
- const f_string_length_t stop_original = *stop;
+ f_status_t private_fl_string_rip_find_range(const f_string_t source, f_array_length_t *start, f_array_length_t *stop) {
+ const f_array_length_t stop_original = *stop;
f_status_t status = F_none;
* @see fl_string_dynamic_partial_compare()
*/
#if !defined(_di_fl_string_compare_) || !defined(_di_fl_string_dynamic_compare_) || !defined(_di_fl_string_dynamic_partial_compare_)
- extern f_status_t private_fl_string_compare(const f_string_t string1, const f_string_t string2, const f_string_length_t offset1, const f_string_length_t offset2, const f_string_length_t stop1, const f_string_length_t stop2) f_gcc_attribute_visibility_internal;
+ extern f_status_t private_fl_string_compare(const f_string_t string1, const f_string_t string2, const f_array_length_t offset1, const f_array_length_t offset2, const f_array_length_t stop1, const f_array_length_t stop2) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_fl_string_compare_) || !defined(_di_fl_string_dynamic_compare_) || !defined(_di_fl_string_dynamic_partial_compare_)
/**
* @see fl_string_dynamic_partial_compare_except()
*/
#if !defined(_di_fl_string_compare_except_) || !defined(_di_fl_string_dynamic_compare_except_) || !defined(_di_fl_string_dynamic_partial_compare_except_)
- extern f_status_t private_fl_string_compare_except(const f_string_t string1, const f_string_t string2, const f_string_length_t offset1, const f_string_length_t offset2, const f_string_length_t stop1, const f_string_length_t stop2, const f_string_lengths_t except1, const f_string_lengths_t except2) f_gcc_attribute_visibility_internal;
+ extern f_status_t private_fl_string_compare_except(const f_string_t string1, const f_string_t string2, const f_array_length_t offset1, const f_array_length_t offset2, const f_array_length_t stop1, const f_array_length_t stop2, const f_array_lengths_t except1, const f_array_lengths_t except2) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_fl_string_compare_except_) || !defined(_di_fl_string_dynamic_compare_except_) || !defined(_di_fl_string_dynamic_partial_compare_except_)
/**
* @see fl_string_dynamic_partial_compare_except_trim()
*/
#if !defined(_di_fl_string_compare_except_trim_) || !defined(_di_fl_string_dynamic_compare_except_trim_) || !defined(_di_fl_string_dynamic_partial_compare_except_trim_)
- extern f_status_t private_fl_string_compare_except_trim(const f_string_t string1, const f_string_t string2, const f_string_length_t offset1, const f_string_length_t offset2, const f_string_length_t stop1, const f_string_length_t stop2, const f_string_lengths_t except1, const f_string_lengths_t except2) f_gcc_attribute_visibility_internal;
+ extern f_status_t private_fl_string_compare_except_trim(const f_string_t string1, const f_string_t string2, const f_array_length_t offset1, const f_array_length_t offset2, const f_array_length_t stop1, const f_array_length_t stop2, const f_array_lengths_t except1, const f_array_lengths_t except2) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_fl_string_compare_except_trim_) || !defined(_di_fl_string_dynamic_compare_except_trim_) || !defined(_di_fl_string_dynamic_partial_compare_except_trim_)
/**
* @see fl_string_dynamic_partial_compare_trim()
*/
#if !defined(_di_fl_string_compare_trim_) || !defined(_di_fl_string_dynamic_compare_trim_) || !defined(_di_fl_string_dynamic_partial_compare_trim_)
- extern f_status_t private_fl_string_compare_trim(const f_string_t string1, const f_string_t string2, const f_string_length_t offset1, const f_string_length_t offset2, const f_string_length_t stop1, const f_string_length_t stop2) f_gcc_attribute_visibility_internal;
+ extern f_status_t private_fl_string_compare_trim(const f_string_t string1, const f_string_t string2, const f_array_length_t offset1, const f_array_length_t offset2, const f_array_length_t stop1, const f_array_length_t stop2) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_fl_string_compare_trim_) || !defined(_di_fl_string_dynamic_compare_trim_) || !defined(_di_fl_string_dynamic_partial_compare_trim_)
/**
* @see fl_string_dynamic_rip_nulless()
*/
#if !defined(_di_fl_string_rip_) || !defined(_di_fl_string_dynamic_rip_) || !defined(_di_fl_string_rip_nulless_) || !defined(_di_fl_string_dynamic_rip_nulless_)
- extern f_status_t private_fl_string_rip_find_range(const f_string_t source, f_string_length_t *start, f_string_length_t *stop) f_gcc_attribute_visibility_internal;
+ extern f_status_t private_fl_string_rip_find_range(const f_string_t source, f_array_length_t *start, f_array_length_t *stop) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_fl_string_rip_) || !defined(_di_fl_string_dynamic_rip_) || !defined(_di_fl_string_rip_nulless_) || !defined(_di_fl_string_dynamic_rip_nulless_)
#ifdef __cplusplus
#endif
#ifndef _di_fl_string_compare_
- f_status_t fl_string_compare(const f_string_t string1, const f_string_t string2, const f_string_length_t length1, const f_string_length_t length2) {
+ f_status_t fl_string_compare(const f_string_t string1, const f_string_t string2, const f_array_length_t length1, const f_array_length_t length2) {
return private_fl_string_compare(string1, string2, 0, 0, length1, length2);
}
#endif // _di_fl_string_compare_
#ifndef _di_fl_string_compare_except_
- f_status_t fl_string_compare_except(const f_string_t string1, const f_string_t string2, const f_string_length_t length1, const f_string_length_t length2, const f_string_lengths_t except1, const f_string_lengths_t except2) {
+ f_status_t fl_string_compare_except(const f_string_t string1, const f_string_t string2, const f_array_length_t length1, const f_array_length_t length2, const f_array_lengths_t except1, const f_array_lengths_t except2) {
return private_fl_string_compare_except(string1, string2, 0, 0, length1, length2, except1, except2);
}
#endif // _di_fl_string_compare_except_
#ifndef _di_fl_string_compare_except_trim_
- f_status_t fl_string_compare_except_trim(const f_string_t string1, const f_string_t string2, const f_string_length_t length1, const f_string_length_t length2, const f_string_lengths_t except1, const f_string_lengths_t except2) {
+ f_status_t fl_string_compare_except_trim(const f_string_t string1, const f_string_t string2, const f_array_length_t length1, const f_array_length_t length2, const f_array_lengths_t except1, const f_array_lengths_t except2) {
return private_fl_string_compare_except_trim(string1, string2, 0, 0, length1, length2, except1, except2);
}
#endif // _di_fl_string_compare_except_trim_
#ifndef _di_fl_string_compare_trim_
- f_status_t fl_string_compare_trim(const f_string_t string1, const f_string_t string2, const f_string_length_t length1, const f_string_length_t length2) {
+ f_status_t fl_string_compare_trim(const f_string_t string1, const f_string_t string2, const f_array_length_t length1, const f_array_length_t length2) {
return private_fl_string_compare_trim(string1, string2, 0, 0, length1, length2);
}
#endif // _di_fl_string_compare_trim_
#endif // _di_fl_string_dynamic_compare_
#ifndef _di_fl_string_dynamic_compare_except_
- f_status_t fl_string_dynamic_compare_except(const f_string_static_t string1, const f_string_static_t string2, const f_string_lengths_t except1, const f_string_lengths_t except2) {
+ f_status_t fl_string_dynamic_compare_except(const f_string_static_t string1, const f_string_static_t string2, const f_array_lengths_t except1, const f_array_lengths_t except2) {
return private_fl_string_compare_except(string1.string, string2.string, 0, 0, string1.used, string2.used, except1, except2);
}
#endif // _di_fl_string_dynamic_compare_except_
#ifndef _di_fl_string_dynamic_compare_except_string_
- f_status_t fl_string_dynamic_compare_except_string(const f_string_t string1, const f_string_static_t string2, const f_string_length_t length1, const f_string_lengths_t except1, const f_string_lengths_t except2) {
+ f_status_t fl_string_dynamic_compare_except_string(const f_string_t string1, const f_string_static_t string2, const f_array_length_t length1, const f_array_lengths_t except1, const f_array_lengths_t except2) {
return private_fl_string_compare_except(string1, string2.string, 0, 0, length1, string2.used, except1, except2);
}
#endif // _di_fl_string_dynamic_compare_except_string_
#ifndef _di_fl_string_dynamic_compare_except_trim_
- f_status_t fl_string_dynamic_compare_except_trim(const f_string_static_t string1, const f_string_static_t string2, const f_string_lengths_t except1, const f_string_lengths_t except2) {
+ f_status_t fl_string_dynamic_compare_except_trim(const f_string_static_t string1, const f_string_static_t string2, const f_array_lengths_t except1, const f_array_lengths_t except2) {
return private_fl_string_compare_except_trim(string1.string, string2.string, 0, 0, string1.used, string2.used, except1, except2);
}
#endif // _di_fl_string_dynamic_compare_except_trim_
#ifndef _di_fl_string_dynamic_compare_except_trim_string_
- f_status_t fl_string_dynamic_compare_except_trim_string(const f_string_t string1, const f_string_static_t string2, const f_string_length_t length1, const f_string_lengths_t except1, const f_string_lengths_t except2) {
+ f_status_t fl_string_dynamic_compare_except_trim_string(const f_string_t string1, const f_string_static_t string2, const f_array_length_t length1, const f_array_lengths_t except1, const f_array_lengths_t except2) {
return private_fl_string_compare_except_trim(string1, string2.string, 0, 0, length1, string2.used, except1, except2);
}
#endif // _di_fl_string_dynamic_compare_except_trim_string_
#ifndef _di_fl_string_dynamic_compare_string_
- f_status_t fl_string_dynamic_compare_string(const f_string_t string1, const f_string_static_t string2, const f_string_length_t length1) {
+ f_status_t fl_string_dynamic_compare_string(const f_string_t string1, const f_string_static_t string2, const f_array_length_t length1) {
return private_fl_string_compare(string1, string2.string, 0, 0, length1, string2.used);
}
#endif // _di_fl_string_dynamic_compare_string_
#endif // _di_fl_string_dynamic_compare_trim_
#ifndef _di_fl_string_dynamic_compare_trim_string_
- f_status_t fl_string_dynamic_compare_trim_string(const f_string_t string1, const f_string_static_t string2, const f_string_length_t length1) {
+ f_status_t fl_string_dynamic_compare_trim_string(const f_string_t string1, const f_string_static_t string2, const f_array_length_t length1) {
return private_fl_string_compare_trim(string1, string2.string, 0, 0, length1, string2.used);
}
#endif // _di_fl_string_dynamic_compare_trim_string_
#endif // _di_fl_string_dynamic_partial_compare_dynamic_
#ifndef _di_fl_string_dynamic_partial_compare_string_
- f_status_t fl_string_dynamic_partial_compare_string(const f_string_t string1, const f_string_static_t string2, const f_string_length_t length1, const f_string_range_t range2) {
+ f_status_t fl_string_dynamic_partial_compare_string(const f_string_t string1, const f_string_static_t string2, const f_array_length_t length1, const f_string_range_t range2) {
#ifndef _di_level_1_parameter_checking_
if (string2.used <= range2.stop) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
#endif // _di_fl_string_dynamic_partial_compare_string_
#ifndef _di_fl_string_dynamic_partial_compare_except_
- f_status_t fl_string_dynamic_partial_compare_except(const f_string_static_t string1, const f_string_static_t string2, const f_string_range_t range1, const f_string_range_t range2, const f_string_lengths_t except1, const f_string_lengths_t except2) {
+ f_status_t fl_string_dynamic_partial_compare_except(const f_string_static_t string1, const f_string_static_t string2, const f_string_range_t range1, const f_string_range_t range2, const f_array_lengths_t except1, const f_array_lengths_t except2) {
#ifndef _di_level_1_parameter_checking_
if (string1.used <= range1.stop) return F_status_set_error(F_parameter);
if (string2.used <= range2.stop) return F_status_set_error(F_parameter);
#endif // _di_fl_string_dynamic_partial_compare_except_
#ifndef _di_fl_string_dynamic_partial_compare_except_dynamic_
- f_status_t fl_string_dynamic_partial_compare_except_dynamic(const f_string_static_t string1, const f_string_static_t string2, const f_string_range_t range2, const f_string_lengths_t except1, const f_string_lengths_t except2) {
+ f_status_t fl_string_dynamic_partial_compare_except_dynamic(const f_string_static_t string1, const f_string_static_t string2, const f_string_range_t range2, const f_array_lengths_t except1, const f_array_lengths_t except2) {
#ifndef _di_level_1_parameter_checking_
if (string2.used <= range2.stop) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
#endif // _di_fl_string_dynamic_partial_compare_except_dynamic_
#ifndef _di_fl_string_dynamic_partial_compare_except_string_
- f_status_t fl_string_dynamic_partial_compare_except_string(const f_string_t string1, const f_string_static_t string2, const f_string_length_t length1, const f_string_range_t range2, const f_string_lengths_t except1, const f_string_lengths_t except2) {
+ f_status_t fl_string_dynamic_partial_compare_except_string(const f_string_t string1, const f_string_static_t string2, const f_array_length_t length1, const f_string_range_t range2, const f_array_lengths_t except1, const f_array_lengths_t except2) {
#ifndef _di_level_1_parameter_checking_
if (string2.used <= range2.stop) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
#endif // _di_fl_string_dynamic_partial_compare_except_string_
#ifndef _di_fl_string_dynamic_partial_compare_except_trim_
- f_status_t fl_string_dynamic_partial_compare_except_trim(const f_string_static_t string1, const f_string_static_t string2, const f_string_range_t range1, const f_string_range_t range2, const f_string_lengths_t except1, const f_string_lengths_t except2) {
+ f_status_t fl_string_dynamic_partial_compare_except_trim(const f_string_static_t string1, const f_string_static_t string2, const f_string_range_t range1, const f_string_range_t range2, const f_array_lengths_t except1, const f_array_lengths_t except2) {
#ifndef _di_level_1_parameter_checking_
if (string1.used <= range1.stop) return F_status_set_error(F_parameter);
if (string2.used <= range2.stop) return F_status_set_error(F_parameter);
#endif // _di_fl_string_dynamic_partial_compare_except_trim_
#ifndef _di_fl_string_dynamic_partial_compare_except_trim_dynamic_
- f_status_t fl_string_dynamic_partial_compare_except_trim_dynamic(const f_string_static_t string1, const f_string_static_t string2, const f_string_range_t range2, const f_string_lengths_t except1, const f_string_lengths_t except2) {
+ f_status_t fl_string_dynamic_partial_compare_except_trim_dynamic(const f_string_static_t string1, const f_string_static_t string2, const f_string_range_t range2, const f_array_lengths_t except1, const f_array_lengths_t except2) {
#ifndef _di_level_1_parameter_checking_
if (string2.used <= range2.stop) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
#endif // _di_fl_string_dynamic_partial_compare_except_trim_dynamic_
#ifndef _di_fl_string_dynamic_partial_compare_except_trim_string_
- f_status_t fl_string_dynamic_partial_compare_except_trim_string(const f_string_t string1, const f_string_static_t string2, const f_string_length_t length1, const f_string_range_t range2, const f_string_lengths_t except1, const f_string_lengths_t except2) {
+ f_status_t fl_string_dynamic_partial_compare_except_trim_string(const f_string_t string1, const f_string_static_t string2, const f_array_length_t length1, const f_string_range_t range2, const f_array_lengths_t except1, const f_array_lengths_t except2) {
#ifndef _di_level_1_parameter_checking_
if (string2.used <= range2.stop) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
#endif // _di_fl_string_dynamic_partial_compare_trim_dynamic_
#ifndef _di_fl_string_dynamic_partial_compare_trim_string_
- f_status_t fl_string_dynamic_partial_compare_trim_string(const f_string_t string1, const f_string_static_t string2, const f_string_length_t length1, const f_string_range_t range2) {
+ f_status_t fl_string_dynamic_partial_compare_trim_string(const f_string_t string1, const f_string_static_t string2, const f_array_length_t length1, const f_string_range_t range2) {
#ifndef _di_level_1_parameter_checking_
if (string2.used <= range2.stop) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
if (!source.used) return F_data_not_eos;
- f_string_length_t begin = range.start;
- f_string_length_t end = range.stop;
+ f_array_length_t begin = range.start;
+ f_array_length_t end = range.stop;
const f_status_t status = private_fl_string_rip_find_range(source.string, &begin, &end);
if (!source.used) return F_data_not_eos;
- f_string_length_t begin = range.start;
- f_string_length_t end = range.stop;
+ f_array_length_t begin = range.start;
+ f_array_length_t end = range.stop;
const f_status_t status = private_fl_string_rip_find_range(source.string, &begin, &end);
unsigned short width = 0;
- f_string_length_t width_max = 0;
+ f_array_length_t width_max = 0;
while (range->start <= range->stop) {
width_max = (range->stop - range->start) + 1;
f_status_t status = F_none;
unsigned short width = 0;
- f_string_length_t width_max = (range->stop - range->start) + 1;
+ f_array_length_t width_max = (range->stop - range->start) + 1;
while (string[range->start] == placeholder || (status = f_utf_is_graph(string + range->start, width_max)) == F_false) {
f_status_t status = F_none;
unsigned short width = 0;
- f_string_length_t width_max = (range->stop - range->start) + 1;
+ f_array_length_t width_max = (range->stop - range->start) + 1;
while (string[range->start] == placeholder || (status = f_utf_is_whitespace(string + range->start, width_max)) == F_false) {
if (F_status_is_error(status)) return status;
unsigned short width = 0;
- f_string_length_t width_max = 0;
+ f_array_length_t width_max = 0;
while (range->start <= range->stop) {
width_max = (range->stop - range->start) + 1;
#endif // _di_fl_string_dynamic_seek_to_utf_character_
#ifndef _di_fl_string_rip_
- f_status_t fl_string_rip(const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination) {
+ f_status_t fl_string_rip(const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
if (!length) return F_data_not_eos;
- f_string_length_t begin = 0;
- f_string_length_t end = length - 1;
+ f_array_length_t begin = 0;
+ f_array_length_t end = length - 1;
const f_status_t status = private_fl_string_rip_find_range(source, &begin, &end);
#endif // _di_fl_string_rip_
#ifndef _di_fl_string_rip_nulless_
- f_status_t fl_string_rip_nulless(const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination) {
+ f_status_t fl_string_rip_nulless(const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
if (!length) return F_data_not_eos;
- f_string_length_t begin = 0;
- f_string_length_t end = length - 1;
+ f_array_length_t begin = 0;
+ f_array_length_t end = length - 1;
const f_status_t status = private_fl_string_rip_find_range(source, &begin, &end);
unsigned short width = 0;
- f_string_length_t width_max = (range->stop - range->start) + 1;
+ f_array_length_t width_max = (range->stop - range->start) + 1;
for (; range->start <= range->stop; range->start += width) {
width_max = (range->stop - range->start) + 1;
f_status_t status = F_none;
unsigned short width = 0;
- f_string_length_t width_max = (range->stop - range->start) + 1;
+ f_array_length_t width_max = (range->stop - range->start) + 1;
while (string[range->start] == placeholder || (status = f_utf_is_graph(string + range->start, width_max)) == F_false) {
if (F_status_is_error(status)) return status;
f_status_t status = F_none;
unsigned short width = 0;
- f_string_length_t width_max = (range->stop - range->start) + 1;
+ f_array_length_t width_max = (range->stop - range->start) + 1;
while (string[range->start] == placeholder || (status = f_utf_is_whitespace(string + range->start, width_max)) == F_false) {
if (F_status_is_error(status)) {
unsigned short width = 0;
- f_string_length_t width_max = 0;
+ f_array_length_t width_max = 0;
for (; range->start <= range->stop; range->start += width) {
width_max = (range->stop - range->start) + 1;
* F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_fl_string_compare_
- extern f_status_t fl_string_compare(const f_string_t string1, const f_string_t string2, const f_string_length_t length1, const f_string_length_t length2);
+ extern f_status_t fl_string_compare(const f_string_t string1, const f_string_t string2, const f_array_length_t length1, const f_array_length_t length2);
#endif // _di_fl_string_compare_
/**
* F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_fl_string_compare_except_
- extern f_status_t fl_string_compare_except(const f_string_t string1, const f_string_t string2, const f_string_length_t length1, const f_string_length_t length2, const f_string_lengths_t except1, const f_string_lengths_t except2);
+ extern f_status_t fl_string_compare_except(const f_string_t string1, const f_string_t string2, const f_array_length_t length1, const f_array_length_t length2, const f_array_lengths_t except1, const f_array_lengths_t except2);
#endif // _di_fl_string_compare_except_
/**
* @see f_utf_is_whitespace()
*/
#ifndef _di_fl_string_compare_except_trim_
- extern f_status_t fl_string_compare_except_trim(const f_string_t string1, const f_string_t string2, const f_string_length_t length1, const f_string_length_t length2, const f_string_lengths_t except1, const f_string_lengths_t except2);
+ extern f_status_t fl_string_compare_except_trim(const f_string_t string1, const f_string_t string2, const f_array_length_t length1, const f_array_length_t length2, const f_array_lengths_t except1, const f_array_lengths_t except2);
#endif // _di_fl_string_compare_except_trim_
/**
* @see f_utf_is_whitespace()
*/
#ifndef _di_fl_string_compare_trim_
- extern f_status_t fl_string_compare_trim(const f_string_t string1, const f_string_t string2, const f_string_length_t length1, const f_string_length_t length2);
+ extern f_status_t fl_string_compare_trim(const f_string_t string1, const f_string_t string2, const f_array_length_t length1, const f_array_length_t length2);
#endif // _di_fl_string_compare_trim_
/**
* F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_fl_string_dynamic_compare_except_
- extern f_status_t fl_string_dynamic_compare_except(const f_string_static_t string1, const f_string_static_t string2, const f_string_lengths_t except1, const f_string_lengths_t except2);
+ extern f_status_t fl_string_dynamic_compare_except(const f_string_static_t string1, const f_string_static_t string2, const f_array_lengths_t except1, const f_array_lengths_t except2);
#endif // _di_fl_string_dynamic_compare_except_
/**
* @see f_utf_is_whitespace()
*/
#ifndef _di_fl_string_dynamic_compare_except_string_
- extern f_status_t fl_string_dynamic_compare_except_string(const f_string_t string1, const f_string_static_t string2, const f_string_length_t length1, const f_string_lengths_t except1, const f_string_lengths_t except2);
+ extern f_status_t fl_string_dynamic_compare_except_string(const f_string_t string1, const f_string_static_t string2, const f_array_length_t length1, const f_array_lengths_t except1, const f_array_lengths_t except2);
#endif // _di_fl_string_dynamic_compare_except_string_
/**
* @see f_utf_is_whitespace()
*/
#ifndef _di_fl_string_dynamic_compare_except_trim_
- extern f_status_t fl_string_dynamic_compare_except_trim(const f_string_static_t string1, const f_string_static_t string2, const f_string_lengths_t except1, const f_string_lengths_t except2);
+ extern f_status_t fl_string_dynamic_compare_except_trim(const f_string_static_t string1, const f_string_static_t string2, const f_array_lengths_t except1, const f_array_lengths_t except2);
#endif // _di_fl_string_dynamic_compare_except_trim_
/**
* @see f_utf_is_whitespace()
*/
#ifndef _di_fl_string_dynamic_compare_except_trim_string_
- extern f_status_t fl_string_dynamic_compare_except_trim_string(const f_string_t string1, const f_string_static_t string2, const f_string_length_t length1, const f_string_lengths_t except1, const f_string_lengths_t except2);
+ extern f_status_t fl_string_dynamic_compare_except_trim_string(const f_string_t string1, const f_string_static_t string2, const f_array_length_t length1, const f_array_lengths_t except1, const f_array_lengths_t except2);
#endif // _di_fl_string_dynamic_compare_except_trim_string_
/**
* @see f_utf_is_whitespace()
*/
#ifndef _di_fl_string_dynamic_compare_string_
- extern f_status_t fl_string_dynamic_compare_string(const f_string_t string1, const f_string_static_t string2, const f_string_length_t length1);
+ extern f_status_t fl_string_dynamic_compare_string(const f_string_t string1, const f_string_static_t string2, const f_array_length_t length1);
#endif // _di_fl_string_dynamic_compare_string_
/**
* @see f_utf_is_whitespace()
*/
#ifndef _di_fl_string_dynamic_compare_trim_string_
- extern f_status_t fl_string_dynamic_compare_trim_string(const f_string_t string1, const f_string_static_t string2, const f_string_length_t length1);
+ extern f_status_t fl_string_dynamic_compare_trim_string(const f_string_t string1, const f_string_static_t string2, const f_array_length_t length1);
#endif // _di_fl_string_dynamic_compare_trim_string_
/**
* F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_fl_string_dynamic_partial_compare_except_
- extern f_status_t fl_string_dynamic_partial_compare_except(const f_string_static_t string1, const f_string_static_t string2, const f_string_range_t range1, const f_string_range_t range2, const f_string_lengths_t except1, const f_string_lengths_t except2);
+ extern f_status_t fl_string_dynamic_partial_compare_except(const f_string_static_t string1, const f_string_static_t string2, const f_string_range_t range1, const f_string_range_t range2, const f_array_lengths_t except1, const f_array_lengths_t except2);
#endif // _di_fl_string_dynamic_partial_compare_except_
/**
* F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_fl_string_dynamic_partial_compare_except_dynamic_
- extern f_status_t fl_string_dynamic_partial_compare_except_dynamic(const f_string_static_t string1, const f_string_static_t string2, const f_string_range_t range2, const f_string_lengths_t except1, const f_string_lengths_t except2);
+ extern f_status_t fl_string_dynamic_partial_compare_except_dynamic(const f_string_static_t string1, const f_string_static_t string2, const f_string_range_t range2, const f_array_lengths_t except1, const f_array_lengths_t except2);
#endif // _di_fl_string_dynamic_partial_compare_except_dynamic_
/**
* F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_fl_string_dynamic_partial_compare_except_string_
- extern f_status_t fl_string_dynamic_partial_compare_except_string(const f_string_t string1, const f_string_static_t string2, const f_string_length_t length1, const f_string_range_t range2, const f_string_lengths_t except1, const f_string_lengths_t except2);
+ extern f_status_t fl_string_dynamic_partial_compare_except_string(const f_string_t string1, const f_string_static_t string2, const f_array_length_t length1, const f_string_range_t range2, const f_array_lengths_t except1, const f_array_lengths_t except2);
#endif // _di_fl_string_dynamic_partial_compare_except_string_
/**
* @see f_utf_is_whitespace()
*/
#ifndef _di_fl_string_dynamic_partial_compare_except_trim_
- extern f_status_t fl_string_dynamic_partial_compare_except_trim(const f_string_static_t string1, const f_string_static_t string2, const f_string_range_t range1, const f_string_range_t range2, const f_string_lengths_t except1, const f_string_lengths_t except2);
+ extern f_status_t fl_string_dynamic_partial_compare_except_trim(const f_string_static_t string1, const f_string_static_t string2, const f_string_range_t range1, const f_string_range_t range2, const f_array_lengths_t except1, const f_array_lengths_t except2);
#endif // _di_fl_string_dynamic_partial_compare_except_trim_
/**
* @see f_utf_is_whitespace()
*/
#ifndef _di_fl_string_dynamic_partial_compare_except_trim_dynamic_
- extern f_status_t fl_string_dynamic_partial_compare_except_trim_dynamic(const f_string_static_t string1, const f_string_static_t string2, const f_string_range_t range2, const f_string_lengths_t except1, const f_string_lengths_t except2);
+ extern f_status_t fl_string_dynamic_partial_compare_except_trim_dynamic(const f_string_static_t string1, const f_string_static_t string2, const f_string_range_t range2, const f_array_lengths_t except1, const f_array_lengths_t except2);
#endif // _di_fl_string_dynamic_partial_compare_except_trim_dynamic_
/**
* @see f_utf_is_whitespace()
*/
#ifndef _di_fl_string_dynamic_partial_compare_except_trim_string_
- extern f_status_t fl_string_dynamic_partial_compare_except_trim_string(const f_string_t string1, const f_string_static_t string2, const f_string_length_t length1, const f_string_range_t range2, const f_string_lengths_t except1, const f_string_lengths_t except2);
+ extern f_status_t fl_string_dynamic_partial_compare_except_trim_string(const f_string_t string1, const f_string_static_t string2, const f_array_length_t length1, const f_string_range_t range2, const f_array_lengths_t except1, const f_array_lengths_t except2);
#endif // _di_fl_string_dynamic_partial_compare_except_trim_string_
/**
* F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_fl_string_dynamic_partial_compare_string_
- extern f_status_t fl_string_dynamic_partial_compare_string(const f_string_t string1, const f_string_static_t string2, const f_string_length_t length1, const f_string_range_t range2);
+ extern f_status_t fl_string_dynamic_partial_compare_string(const f_string_t string1, const f_string_static_t string2, const f_array_length_t length1, const f_string_range_t range2);
#endif // _di_fl_string_dynamic_partial_compare_string_
/**
* @see f_utf_is_whitespace()
*/
#ifndef _di_fl_string_dynamic_partial_compare_trim_string_
- extern f_status_t fl_string_dynamic_partial_compare_trim_string(const f_string_t string1, const f_string_static_t string2, const f_string_length_t length1, const f_string_range_t range2);
+ extern f_status_t fl_string_dynamic_partial_compare_trim_string(const f_string_t string1, const f_string_static_t string2, const f_array_length_t length1, const f_string_range_t range2);
#endif // _di_fl_string_dynamic_partial_compare_trim_string_
/**
* @see f_utf_is_whitespace()
*/
#ifndef _di_fl_string_rip_
- extern f_status_t fl_string_rip(const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination);
+ extern f_status_t fl_string_rip(const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination);
#endif // _di_fl_string_rip_
/**
* @see f_utf_is_whitespace()
*/
#ifndef _di_fl_string_rip_nulless_
- extern f_status_t fl_string_rip_nulless(const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination);
+ extern f_status_t fl_string_rip_nulless(const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination);
#endif // _di_fl_string_rip_nulless_
/**
#endif
#if !defined(_di_fl_utf_string_compare_) || !defined(_di_fl_utf_string_dynamic_compare_) || !defined(_di_fl_utf_string_dynamic_partial_compare_)
- f_status_t private_fl_utf_string_compare(const f_utf_string_t string1, const f_utf_string_t string2, const f_string_length_t offset1, const f_string_length_t offset2, const f_string_length_t stop1, const f_string_length_t stop2) {
- f_string_length_t i1 = offset1;
- f_string_length_t i2 = offset2;
+ f_status_t private_fl_utf_string_compare(const f_utf_string_t string1, const f_utf_string_t string2, const f_array_length_t offset1, const f_array_length_t offset2, const f_array_length_t stop1, const f_array_length_t stop2) {
+ f_array_length_t i1 = offset1;
+ f_array_length_t i2 = offset2;
for (; i1 < stop1 && i2 < stop2; i1++, i2++) {
#endif // !defined(_di_fl_utf_string_compare_) || !defined(_di_fl_utf_string_dynamic_compare_) || !defined(_di_fl_utf_string_dynamic_partial_compare_)
#if !defined(_di_fl_utf_string_compare_trim_) || !defined(_di_fl_utf_string_dynamic_compare_trim_) || !defined(_di_fl_utf_string_dynamic_partial_compare_trim_)
- f_status_t private_fl_utf_string_compare_trim(const f_utf_string_t string1, const f_utf_string_t string2, const f_string_length_t offset1, const f_string_length_t offset2, const f_string_length_t stop1, const f_string_length_t stop2) {
- f_string_length_t i1 = offset1;
- f_string_length_t i2 = offset2;
+ f_status_t private_fl_utf_string_compare_trim(const f_utf_string_t string1, const f_utf_string_t string2, const f_array_length_t offset1, const f_array_length_t offset2, const f_array_length_t stop1, const f_array_length_t stop2) {
+ f_array_length_t i1 = offset1;
+ f_array_length_t i2 = offset2;
f_status_t status = F_none;
if (status == F_false) break;
} // for
- f_string_length_t last1 = i1;
- f_string_length_t last2 = i2;
+ f_array_length_t last1 = i1;
+ f_array_length_t last2 = i2;
{
// size1 and size2 are to represent to total number of characters after trim.
- f_string_length_t size1 = 0;
- f_string_length_t size2 = 0;
+ f_array_length_t size1 = 0;
+ f_array_length_t size2 = 0;
// determine where the last non-whitespace is in string1.
- for (f_string_length_t j = i1; j < stop1; j++) {
+ for (f_array_length_t j = i1; j < stop1; j++) {
// skip past NULL in string1.
while (j < stop1 && !string1[j]) j++;
} // for
// determine where the last non-whitespace is in string2.
- for (f_string_length_t j = i2; j < stop2; j++) {
+ for (f_array_length_t j = i2; j < stop2; j++) {
// skip past NULL in string2.
while (j < stop2 && !string2[j]) j++;
#endif // !defined(_di_fl_utf_string_compare_trim_) || !defined(_di_fl_utf_string_dynamic_compare_trim_) || !defined(_di_fl_utf_string_dynamic_partial_compare_trim_)
#if !defined(_di_fl_utf_string_rip_) || !defined(_di_fl_utf_string_dynamic_rip_) || !defined(_di_fl_utf_string_rip_nulless_) || !defined(_di_fl_utf_string_dynamic_rip_nulless_)
- f_status_t private_fl_utf_string_rip_find_range(const f_utf_string_t source, f_string_length_t *start, f_string_length_t *stop) {
+ f_status_t private_fl_utf_string_rip_find_range(const f_utf_string_t source, f_array_length_t *start, f_array_length_t *stop) {
f_status_t status = F_none;
* @see fl_utf_string_dynamic_partial_compare()
*/
#if !defined(_di_fl_utfl_string_compare_) || !defined(_di_fl_utfl_string_dynamic_compare_) || !defined(_di_fl_utfl_string_dynamic_partial_compare_)
- extern f_status_t private_fl_utf_string_compare(const f_utf_string_t string1, const f_utf_string_t string2, const f_string_length_t offset1, const f_string_length_t offset2, const f_string_length_t stop1, const f_string_length_t stop2) f_gcc_attribute_visibility_internal;
+ extern f_status_t private_fl_utf_string_compare(const f_utf_string_t string1, const f_utf_string_t string2, const f_array_length_t offset1, const f_array_length_t offset2, const f_array_length_t stop1, const f_array_length_t stop2) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_fl_utfl_string_compare_) || !defined(_di_fl_utfl_string_dynamic_compare_) || !defined(_di_fl_utfl_string_dynamic_partial_compare_)
/**
* @see fl_utf_string_dynamic_partial_compare_trim()
*/
#if !defined(_di_fl_utf_string_compare_trim_) || !defined(_di_fl_utf_string_dynamic_compare_trim_) || !defined(_di_fl_utf_string_dynamic_partial_compare_trim_)
- extern f_status_t private_fl_utf_string_compare_trim(const f_utf_string_t string1, const f_utf_string_t string2, const f_string_length_t offset1, const f_string_length_t offset2, const f_string_length_t stop1, const f_string_length_t stop2) f_gcc_attribute_visibility_internal;
+ extern f_status_t private_fl_utf_string_compare_trim(const f_utf_string_t string1, const f_utf_string_t string2, const f_array_length_t offset1, const f_array_length_t offset2, const f_array_length_t stop1, const f_array_length_t stop2) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_fl_utf_string_compare_trim_) || !defined(_di_fl_utf_string_dynamic_compare_trim_) || !defined(_di_fl_utf_string_dynamic_partial_compare_trim_)
/**
* @see fl_utf_string_rip()
*/
#if !defined(_di_fl_utf_string_rip_) || !defined(_di_fl_utf_string_dynamic_rip_) || !defined(_di_fl_utf_string_rip_nulless_) || !defined(_di_fl_utf_string_dynamic_rip_nulless_)
- extern f_status_t private_fl_utf_string_rip_find_range(const f_utf_string_t source, f_string_length_t *start, f_string_length_t *stop) f_gcc_attribute_visibility_internal;
+ extern f_status_t private_fl_utf_string_rip_find_range(const f_utf_string_t source, f_array_length_t *start, f_array_length_t *stop) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_fl_utf_string_rip_) || !defined(_di_fl_utf_string_dynamic_rip_) || !defined(_di_fl_utf_string_rip_nulless_) || !defined(_di_fl_utf_string_dynamic_rip_nulless_)
#ifdef __cplusplus
#endif
#ifndef _di_fl_utf_string_compare_
- f_status_t fl_utf_string_compare(const f_utf_string_t string1, const f_utf_string_t string2, const f_string_length_t length1, const f_string_length_t length2) {
+ f_status_t fl_utf_string_compare(const f_utf_string_t string1, const f_utf_string_t string2, const f_array_length_t length1, const f_array_length_t length2) {
return private_fl_utf_string_compare(string1, string2, 0, 0, length1, length2);
}
#endif // _di_fl_utf_string_compare_
#ifndef _di_fl_utf_string_compare_trim_
- f_status_t fl_utf_string_compare_trim(const f_utf_string_t string1, const f_utf_string_t string2, const f_string_length_t length1, const f_string_length_t length2) {
+ f_status_t fl_utf_string_compare_trim(const f_utf_string_t string1, const f_utf_string_t string2, const f_array_length_t length1, const f_array_length_t length2) {
return private_fl_utf_string_compare_trim(string1, string2, 0, 0, length1, length2);
}
#endif // _di_fl_utf_string_compare_trim_
#endif // _di_fl_utf_string_dynamic_seek_to_char_
#ifndef _di_fl_utf_string_rip_
- f_status_t fl_utf_string_rip(const f_utf_string_t source, const f_string_length_t length, f_utf_string_dynamic_t *destination) {
+ f_status_t fl_utf_string_rip(const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
if (!length) return F_data_not_eos;
- f_string_length_t begin = 0;
- f_string_length_t end = length - 1;
+ f_array_length_t begin = 0;
+ f_array_length_t end = length - 1;
f_status_t status = private_fl_utf_string_rip_find_range(source, &begin, &end);
#endif // _di_fl_utf_string_rip_
#ifndef _di_fl_utf_string_rip_nulless_
- f_status_t fl_utf_string_rip_nulless(const f_utf_string_t source, const f_string_length_t length, f_utf_string_dynamic_t *destination) {
+ f_status_t fl_utf_string_rip_nulless(const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
if (!length) return F_data_not_eos;
- f_string_length_t begin = 0;
- f_string_length_t end = length - 1;
+ f_array_length_t begin = 0;
+ f_array_length_t end = length - 1;
f_status_t status = private_fl_utf_string_rip_find_range(source, &begin, &end);
* F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_fl_utf_string_compare_
- extern f_status_t fl_utf_string_compare(const f_utf_string_t string1, const f_utf_string_t string2, const f_string_length_t length1, const f_string_length_t length2);
+ extern f_status_t fl_utf_string_compare(const f_utf_string_t string1, const f_utf_string_t string2, const f_array_length_t length1, const f_array_length_t length2);
#endif // _di_fl_utf_string_compare_
/**
* @see f_utf_character_is_whitespace()
*/
#ifndef _di_fl_utf_string_compare_trim_
- extern f_status_t fl_utf_string_compare_trim(const f_utf_string_t string1, const f_utf_string_t string2, const f_string_length_t length1, const f_string_length_t length2);
+ extern f_status_t fl_utf_string_compare_trim(const f_utf_string_t string1, const f_utf_string_t string2, const f_array_length_t length1, const f_array_length_t length2);
#endif // _di_fl_utf_string_compare_trim_
/**
* @see f_utf_character_is_whitespace()
*/
#ifndef _di_fl_utf_string_rip_
- extern f_status_t fl_utf_string_rip(const f_utf_string_t source, const f_string_length_t length, f_utf_string_dynamic_t *destination);
+ extern f_status_t fl_utf_string_rip(const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination);
#endif // _di_fl_utf_string_rip_
/**
* @see f_utf_character_is_whitespace()
*/
#ifndef _di_fl_utf_string_rip_nulless_
- extern f_status_t fl_utf_string_rip_nulless(const f_utf_string_t source, const f_string_length_t length, f_utf_string_dynamic_t *destination);
+ extern f_status_t fl_utf_string_rip_nulless(const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination);
#endif // _di_fl_utf_string_rip_nulless_
/**
#if !defined(_di_fl_utf_file_read_) || !defined(_di_fl_utf_file_read_until_) || !defined(_di_fl_utf_file_read_range_)
void private_fl_utf_file_process_read_buffer(const char *buffer_read, const ssize_t size_read, f_utf_string_dynamic_t *buffer, char buffer_char[], uint8_t *width, int8_t *width_last) {
f_utf_character_t character = 0;
- f_string_length_t i = 0;
+ f_array_length_t i = 0;
uint8_t increment_by = 0;
for (; i < size_read; i += increment_by) {
#endif // !defined(_di_fl_utf_file_read_) || !defined(_di_fl_utf_file_read_until_) || !defined(_di_fl_utf_file_read_range_)
#if !defined(_di_fl_utf_file_write_) || !defined(_di_fl_utf_file_write_until_) || !defined(fl_utf_file_write_range)
- f_status_t private_fl_utf_file_write_until(const f_file_t file, const f_utf_string_t string, const f_string_length_t total, f_string_length_t *written) {
+ f_status_t private_fl_utf_file_write_until(const f_file_t file, const f_utf_string_t string, const f_array_length_t total, f_array_length_t *written) {
*written = 0;
f_status_t status = F_none;
- f_string_length_t write_size = file.size_write > 4 ? file.size_write : 4;
- f_string_length_t write_max = total;
- f_string_length_t i = 0;
+ f_array_length_t write_size = file.size_write > 4 ? file.size_write : 4;
+ f_array_length_t write_max = total;
+ f_array_length_t i = 0;
if (write_size > write_max) {
write_size = write_max;
}
- f_string_length_t last = 0;
- f_string_length_t used = 0;
+ f_array_length_t last = 0;
+ f_array_length_t used = 0;
ssize_t size_write = 0;
uint8_t buffer_write[write_size];
* @see fl_utf_file_write_until()
*/
#if !defined(_di_fl_utf_file_write_) || !defined(_di_fl_utf_file_write_until_) || !defined(_di_fl_utf_file_write_range_)
- extern f_status_t private_fl_utf_file_write_until(const f_file_t file, const f_utf_string_t string, const f_string_length_t total, f_string_length_t *written) f_gcc_attribute_visibility_internal;
+ extern f_status_t private_fl_utf_file_write_until(const f_file_t file, const f_utf_string_t string, const f_array_length_t total, f_array_length_t *written) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_fl_utf_file_write_) || !defined(_di_fl_utf_file_write_until_) || !defined(_di_fl_utf_file_write_range_)
#ifdef __cplusplus
while ((size_read = read(file.id, buffer_read, file.size_read)) > 0) {
if (buffer->used + size_read > buffer->size) {
- if (buffer->size + size_read > f_string_length_t_size) {
+ if (buffer->size + size_read > f_array_length_t_size) {
return F_status_set_error(F_string_too_large);
}
if ((size_read = read(file.id, buffer_read, file.size_read)) > 0) {
if (buffer->used + size_read > buffer->size) {
- if (buffer->size + size_read > f_string_length_t_size) {
+ if (buffer->size + size_read > f_array_length_t_size) {
return F_status_set_error(F_string_too_large);
}
#endif // _di_fl_utf_file_read_block_
#ifndef _di_fl_utf_file_read_until_
- f_status_t fl_utf_file_read_until(const f_file_t file, const f_string_length_t total, f_utf_string_dynamic_t *buffer) {
+ f_status_t fl_utf_file_read_until(const f_file_t file, const f_array_length_t total, f_utf_string_dynamic_t *buffer) {
#ifndef _di_level_1_parameter_checking_
if (!file.size_read) return F_status_set_error(F_parameter);
if (buffer->used > buffer->size) return F_status_set_error(F_parameter);
uint8_t width = 0;
int8_t width_last = -1;
- f_string_length_t buffer_size = file.size_read;
- f_string_length_t buffer_count = 0;
+ f_array_length_t buffer_size = file.size_read;
+ f_array_length_t buffer_count = 0;
if (total < buffer_size) {
buffer_size = total;
while (buffer_count < total && (size_read = read(file.id, buffer_read, buffer_size)) > 0) {
if (buffer->used + size_read > buffer->size) {
- if (buffer->size + size_read > f_string_length_t_size) {
+ if (buffer->size + size_read > f_array_length_t_size) {
return F_status_set_error(F_string_too_large);
}
#endif // _di_fl_utf_file_read_until_
#ifndef _di_fl_utf_file_write_
- f_status_t fl_utf_file_write(const f_file_t file, const f_utf_string_static_t buffer, f_string_length_t *written) {
+ f_status_t fl_utf_file_write(const f_file_t file, const f_utf_string_static_t buffer, f_array_length_t *written) {
#ifndef _di_level_0_parameter_checking_
if (!file.size_write) return F_status_set_error(F_parameter);
if (buffer.used > buffer.size) return F_status_set_error(F_parameter);
#endif // _di_fl_utf_file_write_
#ifndef _di_fl_utf_file_write_block_
- f_status_t fl_utf_file_write_block(const f_file_t file, const f_utf_string_static_t buffer, f_string_length_t *written) {
+ f_status_t fl_utf_file_write_block(const f_file_t file, const f_utf_string_static_t buffer, f_array_length_t *written) {
#ifndef _di_level_0_parameter_checking_
if (!file.size_write) return F_status_set_error(F_parameter);
if (buffer.used > buffer.size) return F_status_set_error(F_parameter);
return F_data_not;
}
- f_string_length_t write_max = file.size_write;
+ f_array_length_t write_max = file.size_write;
if (write_max > buffer.used) {
write_max = buffer.used;
#endif // _di_fl_utf_file_write_block_
#ifndef _di_fl_utf_file_write_until_
- f_status_t fl_utf_file_write_until(const f_file_t file, const f_utf_string_static_t buffer, const f_string_length_t total, f_string_length_t *written) {
+ f_status_t fl_utf_file_write_until(const f_file_t file, const f_utf_string_static_t buffer, const f_array_length_t total, f_array_length_t *written) {
#ifndef _di_level_0_parameter_checking_
if (!file.size_write) return F_status_set_error(F_parameter);
if (buffer.used > buffer.size) return F_status_set_error(F_parameter);
return F_data_not;
}
- f_string_length_t write_max = file.size_write;
+ f_array_length_t write_max = file.size_write;
if (write_max > buffer.used) {
write_max = buffer.used;
#endif // _di_fl_utf_file_write_until_
#ifndef _di_fl_utf_file_write_range_
- f_status_t fl_utf_file_write_range(const f_file_t file, const f_utf_string_static_t buffer, const f_utf_string_range_t range, f_string_length_t *written) {
+ f_status_t fl_utf_file_write_range(const f_file_t file, const f_utf_string_static_t buffer, const f_utf_string_range_t range, f_array_length_t *written) {
#ifndef _di_level_0_parameter_checking_
if (!file.size_write) return F_status_set_error(F_parameter);
if (buffer.used > buffer.size) return F_status_set_error(F_parameter);
return F_data_not;
}
- const f_string_length_t total = (range.stop - range.start) + 1;
- f_string_length_t write_max = total;
+ const f_array_length_t total = (range.stop - range.start) + 1;
+ f_array_length_t write_max = total;
if (write_max > buffer.used) {
write_max = buffer.used;
* @see read()
*/
#ifndef _di_fl_utf_file_read_until_
- extern f_status_t fl_utf_file_read_until(const f_file_t file, const f_string_length_t total, f_utf_string_dynamic_t *buffer);
+ extern f_status_t fl_utf_file_read_until(const f_file_t file, const f_array_length_t total, f_utf_string_dynamic_t *buffer);
#endif // _di_fl_utf_file_read_until_
/**
* @see write()
*/
#ifndef _di_fl_utf_file_write_
- extern f_status_t fl_utf_file_write(const f_file_t file, const f_utf_string_static_t buffer, f_string_length_t *written);
+ extern f_status_t fl_utf_file_write(const f_file_t file, const f_utf_string_static_t buffer, f_array_length_t *written);
#endif // _di_fl_utf_file_write_
/**
* @see write()
*/
#ifndef _di_fl_utf_file_write_block_
- extern f_status_t fl_utf_file_write_block(const f_file_t file, const f_utf_string_static_t buffer, f_string_length_t *written);
+ extern f_status_t fl_utf_file_write_block(const f_file_t file, const f_utf_string_static_t buffer, f_array_length_t *written);
#endif // _di_fl_utf_file_write_block_
/**
* @see write()
*/
#ifndef _di_fl_utf_file_write_until_
- extern f_status_t fl_utf_file_write_until(const f_file_t file, const f_utf_string_static_t buffer, const f_string_length_t total, f_string_length_t *written);
+ extern f_status_t fl_utf_file_write_until(const f_file_t file, const f_utf_string_static_t buffer, const f_array_length_t total, f_array_length_t *written);
#endif // _di_fl_utf_file_write_until_
/**
* @see write()
*/
#ifndef _di_fl_utf_file_write_range_
- extern f_status_t fl_utf_file_write_range(const f_file_t file, const f_utf_string_static_t buffer, const f_utf_string_range_t range, f_string_length_t *written);
+ extern f_status_t fl_utf_file_write_range(const f_file_t file, const f_utf_string_static_t buffer, const f_utf_string_range_t range, f_array_length_t *written);
#endif // _di_fl_utf_file_write_range_
#ifdef __cplusplus
}
}
- f_string_length_t length = 0;
+ f_array_length_t length = 0;
for (f_array_length_t i = 0; i < control_group.groups.used; ++i) {
#endif
#ifndef _di_fll_execute_arguments_add_
- f_status_t fll_execute_arguments_add(const f_string_t source, const f_string_length_t length, f_string_dynamics_t *arguments) {
+ f_status_t fll_execute_arguments_add(const f_string_t source, const f_array_length_t length, f_string_dynamics_t *arguments) {
#ifndef _di_level_2_parameter_checking_
if (!arguments) return F_status_set_error(F_parameter);
#endif // _di_level_2_parameter_checking_
#endif // _di_fll_execute_arguments_add_
#ifndef _di_fll_execute_arguments_add_parameter_
- f_status_t fll_execute_arguments_add_parameter(const f_string_t prefix, const f_string_length_t prefix_length, const f_string_t name, const f_string_length_t name_length, const f_string_t value, const f_string_length_t value_length, f_string_dynamics_t *arguments) {
+ f_status_t fll_execute_arguments_add_parameter(const f_string_t prefix, const f_array_length_t prefix_length, const f_string_t name, const f_array_length_t name_length, const f_string_t value, const f_array_length_t value_length, f_string_dynamics_t *arguments) {
#ifndef _di_level_2_parameter_checking_
if (!arguments) return F_status_set_error(F_parameter);
#endif // _di_level_2_parameter_checking_
#endif // _di_fll_execute_arguments_add_parameter_
#ifndef _di_fll_execute_arguments_add_parameter_set_
- f_status_t fll_execute_arguments_add_parameter_set(const f_string_t prefix[], const f_string_length_t prefix_length[], const f_string_t name[], const f_string_length_t name_length[], const f_string_t value[], const f_string_length_t value_length[], const f_array_length_t size, f_string_dynamics_t *arguments) {
+ f_status_t fll_execute_arguments_add_parameter_set(const f_string_t prefix[], const f_array_length_t prefix_length[], const f_string_t name[], const f_array_length_t name_length[], const f_string_t value[], const f_array_length_t value_length[], const f_array_length_t size, f_string_dynamics_t *arguments) {
#ifndef _di_level_2_parameter_checking_
if (!arguments) return F_status_set_error(F_parameter);
#endif // _di_level_2_parameter_checking_
#endif // _di_fll_execute_arguments_add_parameter_set_
#ifndef _di_fll_execute_arguments_add_set_
- f_status_t fll_execute_arguments_add_set(const f_string_t source[], const f_string_length_t length[], const f_array_length_t size, f_string_dynamics_t *arguments) {
+ f_status_t fll_execute_arguments_add_set(const f_string_t source[], const f_array_length_t length[], const f_array_length_t size, f_string_dynamics_t *arguments) {
#ifndef _di_level_2_parameter_checking_
if (!arguments) return F_status_set_error(F_parameter);
#endif // _di_level_2_parameter_checking_
f_string_t fixed_arguments[arguments.used + 2];
const f_string_t last_slash = strrchr(program ? program : arguments.array[0].string, f_path_separator_s[0]);
- const f_string_length_t name_size = last_slash ? strnlen(last_slash, f_path_length_max) : strnlen(program ? program : arguments.array[0].string, f_path_length_max);
+ const f_array_length_t name_size = last_slash ? strnlen(last_slash, f_path_length_max) : strnlen(program ? program : arguments.array[0].string, f_path_length_max);
char program_name[name_size + 1];
f_string_t fixed_arguments[arguments.used + 2];
const f_string_t last_slash = strrchr(program ? program : arguments.array[0].string, f_path_separator_s[0]);
- const f_string_length_t name_size = last_slash ? strnlen(last_slash, f_path_length_max) : strnlen(program ? program : arguments.array[0].string, f_path_length_max);
+ const f_array_length_t name_size = last_slash ? strnlen(last_slash, f_path_length_max) : strnlen(program ? program : arguments.array[0].string, f_path_length_max);
char program_name[name_size + 1];
* @see f_string_dynamics_increase()
*/
#ifndef _di_fll_execute_arguments_add_
- extern f_status_t fll_execute_arguments_add(const f_string_t source, const f_string_length_t length, f_string_dynamics_t *arguments);
+ extern f_status_t fll_execute_arguments_add(const f_string_t source, const f_array_length_t length, f_string_dynamics_t *arguments);
#endif // _di_fll_execute_arguments_add_
/**
* @see f_string_dynamics_increase()
*/
#ifndef _di_fll_execute_arguments_add_parameter_
- extern f_status_t fll_execute_arguments_add_parameter(const f_string_t prefix, const f_string_length_t prefix_length, const f_string_t name, const f_string_length_t name_length, const f_string_t value, const f_string_length_t value_length, f_string_dynamics_t *arguments);
+ extern f_status_t fll_execute_arguments_add_parameter(const f_string_t prefix, const f_array_length_t prefix_length, const f_string_t name, const f_array_length_t name_length, const f_string_t value, const f_array_length_t value_length, f_string_dynamics_t *arguments);
#endif // _di_fll_execute_arguments_add_parameter_
/**
* @see f_string_dynamics_increase()
*/
#ifndef _di_fll_execute_arguments_add_parameter_set_
- extern f_status_t fll_execute_arguments_add_parameter_set(const f_string_t prefix[], const f_string_length_t prefix_length[], const f_string_t name[], const f_string_length_t name_length[], const f_string_t value[], const f_string_length_t value_length[], const f_array_length_t size, f_string_dynamics_t *arguments);
+ extern f_status_t fll_execute_arguments_add_parameter_set(const f_string_t prefix[], const f_array_length_t prefix_length[], const f_string_t name[], const f_array_length_t name_length[], const f_string_t value[], const f_array_length_t value_length[], const f_array_length_t size, f_string_dynamics_t *arguments);
#endif // _di_fll_execute_arguments_add_parameter_set_
/**
* @see f_string_dynamics_increase()
*/
#ifndef _di_fll_execute_arguments_add_set_
- extern f_status_t fll_execute_arguments_add_set(const f_string_t source[], const f_string_length_t length[], const f_array_length_t size, f_string_dynamics_t *arguments);
+ extern f_status_t fll_execute_arguments_add_set(const f_string_t source[], const f_array_length_t length[], const f_array_length_t size, f_string_dynamics_t *arguments);
#endif // _di_fll_execute_arguments_add_set_
/**
#endif
#if !defined(_di_fll_execute_arguments_add_) || !defined(_di_fll_execute_arguments_add_set_) || !defined(_di_fll_execute_arguments_dynamic_add_) || !defined(_di_fll_execute_arguments_dynamic_add_set_)
- f_status_t private_fll_execute_arguments_add(const f_string_t source, const f_string_length_t length, f_string_dynamics_t *arguments) {
+ f_status_t private_fll_execute_arguments_add(const f_string_t source, const f_array_length_t length, f_string_dynamics_t *arguments) {
f_status_t status = f_string_dynamics_increase(arguments);
if (F_status_is_error(status)) return status;
#endif // !defined(_di_fll_execute_arguments_add_) || !defined(_di_fll_execute_arguments_add_set_) || !defined(_di_fll_execute_arguments_dynamic_add_) || !defined(_di_fll_execute_arguments_dynamic_add_set_)
#if !defined(_di_fll_execute_arguments_add_parameter_) || !defined(_di_fll_execute_arguments_add_parameter_set_) || !defined(_di_fll_execute_arguments_dynamic_add_parameter_) || !defined(_di_fll_execute_arguments_dynamic_add_parameter_set_)
- f_status_t private_fll_execute_arguments_add_parameter(const f_string_t prefix, const f_string_length_t prefix_length, const f_string_t name, const f_string_length_t name_length, const f_string_t value, const f_string_length_t value_length, f_string_dynamics_t *arguments) {
+ f_status_t private_fll_execute_arguments_add_parameter(const f_string_t prefix, const f_array_length_t prefix_length, const f_string_t name, const f_array_length_t name_length, const f_string_t value, const f_array_length_t value_length, f_string_dynamics_t *arguments) {
f_status_t status = f_string_dynamics_increase(arguments);
if (F_status_is_error(status)) return status;
#endif // !defined(_di_fll_execute_program_)
#if !defined(_di_fll_execute_program_)
- void private_fll_execute_path_arguments_fixate(const f_string_t program_path, const f_string_statics_t arguments, const bool fixated_is, const f_string_length_t name_size, char program_name[], f_string_t fixed_arguments[]) {
+ void private_fll_execute_path_arguments_fixate(const f_string_t program_path, const f_string_statics_t arguments, const bool fixated_is, const f_array_length_t name_size, char program_name[], f_string_t fixed_arguments[]) {
memcpy(program_name, program_path, name_size);
program_name[name_size] = 0;
fixed_arguments[0] = 0;
}
- f_string_length_t i = 0;
+ f_array_length_t i = 0;
if (fixated_is) {
for (i = 1; i < arguments.used; ++i) {
* @see fll_execute_arguments_dynamic_add_set()
*/
#if !defined(_di_fll_execute_arguments_add_) || !defined(_di_fll_execute_arguments_add_set_) || !defined(_di_fll_execute_arguments_dynamic_add_) || !defined(_di_fll_execute_arguments_dynamic_add_set_)
- extern f_status_t private_fll_execute_arguments_add(const f_string_t source, const f_string_length_t length, f_string_dynamics_t *arguments) f_gcc_attribute_visibility_internal;
+ extern f_status_t private_fll_execute_arguments_add(const f_string_t source, const f_array_length_t length, f_string_dynamics_t *arguments) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_fll_execute_arguments_add_) || !defined(_di_fll_execute_arguments_add_set_) || !defined(_di_fll_execute_arguments_dynamic_add_) || !defined(_di_fll_execute_arguments_dynamic_add_set_)
/**
* @see fll_execute_arguments_dynamic_add_parameter_set()
*/
#if !defined(_di_fll_execute_arguments_add_parameter_) || !defined(_di_fll_execute_arguments_add_parameter_set_) || !defined(_di_fll_execute_arguments_dynamic_add_parameter_) || !defined(_di_fll_execute_arguments_dynamic_add_parameter_set_)
- extern f_status_t private_fll_execute_arguments_add_parameter(const f_string_t prefix, const f_string_length_t prefix_length, const f_string_t name, const f_string_length_t name_length, const f_string_t value, const f_string_length_t value_length, f_string_dynamics_t *arguments) f_gcc_attribute_visibility_internal;
+ extern f_status_t private_fll_execute_arguments_add_parameter(const f_string_t prefix, const f_array_length_t prefix_length, const f_string_t name, const f_array_length_t name_length, const f_string_t value, const f_array_length_t value_length, f_string_dynamics_t *arguments) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_fll_execute_arguments_add_parameter_) || !defined(_di_fll_execute_arguments_add_parameter_set_) || !defined(_di_fll_execute_arguments_dynamic_add_parameter_) || !defined(_di_fll_execute_arguments_dynamic_add_parameter_set_)
/**
* @see fll_execute_program()
*/
#if !defined(_di_fll_execute_program_)
- extern void private_fll_execute_path_arguments_fixate(const f_string_t program_path, const f_string_statics_t arguments, const bool fixated_is, const f_string_length_t name_size, char program_name[], f_string_t fixed_arguments[]) f_gcc_attribute_visibility_internal;
+ extern void private_fll_execute_path_arguments_fixate(const f_string_t program_path, const f_string_statics_t arguments, const bool fixated_is, const f_array_length_t name_size, char program_name[], f_string_t fixed_arguments[]) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_fll_execute_program_)
#ifdef __cplusplus
#endif // _di_fll_file_mode_set_all_
#ifndef _di_fll_file_move_
- f_status_t fll_file_move(const f_string_t source, const f_string_t destination, const f_string_length_t source_length, const f_string_length_t destination_length, const fl_directory_recurse_t recurse) {
+ f_status_t fll_file_move(const f_string_t source, const f_string_t destination, const f_array_length_t source_length, const f_array_length_t destination_length, const fl_directory_recurse_t recurse) {
#ifndef _di_level_2_parameter_checking_
if (!source) return F_status_set_error(F_parameter);
if (!destination) return F_status_set_error(F_parameter);
* @see fl_directory_clone()
*/
#ifndef _di_fll_file_move_
- extern f_status_t fll_file_move(const f_string_t source, const f_string_t destination, const f_string_length_t source_length, const f_string_length_t destination_length, const fl_directory_recurse_t recurse);
+ extern f_status_t fll_file_move(const f_string_t source, const f_string_t destination, const f_array_length_t source_length, const f_array_length_t destination_length, const fl_directory_recurse_t recurse);
#endif // _di_fll_file_move_
/**
status = F_none;
- const f_string_length_t path_length = strnlen(path, f_path_length_max);
+ const f_array_length_t path_length = strnlen(path, f_path_length_max);
{
f_string_dynamics_t * const list[] = {
for (j = 0; F_status_is_fine(status) && j < list[i]->used; j++) {
- const f_string_length_t length = path_length + list[i]->array[j].used + 1;
+ const f_array_length_t length = path_length + list[i]->array[j].used + 1;
char path_sub[length + 1];
for (f_array_length_t i = 0; F_status_is_fine(status) && i < listing.directory.used; i++) {
- const f_string_length_t length = path_length + listing.directory.array[i].used + 1;
+ const f_array_length_t length = path_length + listing.directory.array[i].used + 1;
char path_sub[length + 1];
status = F_none;
- const f_string_length_t path_length = strnlen(path, f_path_length_max);
+ const f_array_length_t path_length = strnlen(path, f_path_length_max);
{
f_string_dynamics_t * const list[] = {
for (j = 0; F_status_is_fine(status) && j < list[i]->used; j++) {
- const f_string_length_t length = path_length + list[i]->array[j].used + 1;
+ const f_array_length_t length = path_length + list[i]->array[j].used + 1;
char path_sub[length + 1];
for (f_array_length_t i = 0; F_status_is_fine(status) && i < listing.directory.used; i++) {
- const f_string_length_t length = path_length + listing.directory.array[i].used + 1;
+ const f_array_length_t length = path_length + listing.directory.array[i].used + 1;
char path_sub[length + 1];
#endif // _di_level_2_parameter_checking_
{
- f_string_length_t seeked = 0;
+ f_array_length_t seeked = 0;
if (F_status_is_error(f_file_seek(file->id, SEEK_SET, 0, &seeked))) {
return F_status_set_error(F_file_seek);
#endif // _di_fll_fss_identify_file_
#ifndef _di_fll_fss_snatch_
- f_status_t fll_fss_snatch(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_t names[], const f_string_length_t lengths[], const f_string_length_t size, f_string_dynamic_t *values[], f_array_length_t *indexs[]) {
+ f_status_t fll_fss_snatch(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_t names[], const f_array_length_t lengths[], const f_array_length_t size, f_string_dynamic_t *values[], f_array_length_t *indexs[]) {
#ifndef _di_level_2_parameter_checking_
if (!size) return F_status_set_error(F_parameter);
if (objects.used != contents.used) return F_status_set_error(F_parameter);
if (!contents.used) return F_data_not;
f_status_t status = F_none;
- f_string_length_t length_object = 0;
+ f_array_length_t length_object = 0;
f_array_length_t i = 0;
f_array_length_t j = 0;
#endif // _di_fll_fss_snatch_
#ifndef _di_fll_fss_snatch_apart_
- f_status_t fll_fss_snatch_apart(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_t names[], const f_string_length_t lengths[], const f_string_length_t size, f_string_dynamics_t *values[], f_array_lengths_t *indexs[]) {
+ f_status_t fll_fss_snatch_apart(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_t names[], const f_array_length_t lengths[], const f_array_length_t size, f_string_dynamics_t *values[], f_array_lengths_t *indexs[]) {
#ifndef _di_level_2_parameter_checking_
if (!size) return F_status_set_error(F_parameter);
if (objects.used != contents.used) return F_status_set_error(F_parameter);
if (!contents.used) return F_data_not;
f_status_t status = F_none;
- f_string_length_t length_object = 0;
+ f_array_length_t length_object = 0;
f_string_dynamics_t *value = 0;
f_fss_content_t *content = 0;
#endif // _di_fll_fss_snatch_apart_
#ifndef _di_fll_fss_snatch_map_
- f_status_t fll_fss_snatch_map(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_t names[], const f_string_length_t lengths[], const f_string_length_t size, f_string_maps_t *values[], f_array_lengths_t *indexs[]) {
+ f_status_t fll_fss_snatch_map(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_t names[], const f_array_length_t lengths[], const f_array_length_t size, f_string_maps_t *values[], f_array_lengths_t *indexs[]) {
#ifndef _di_level_2_parameter_checking_
if (!size) return F_status_set_error(F_parameter);
if (objects.used != contents.used) return F_status_set_error(F_parameter);
if (!contents.used) return F_data_not;
f_status_t status = F_none;
- f_string_length_t length_name = 0;
+ f_array_length_t length_name = 0;
f_string_dynamic_t name = f_string_dynamic_t_initialize;
f_array_length_t i = 0;
#endif // _di_fll_fss_snatch_map_
#ifndef _di_fll_fss_snatch_map_apart_
- f_status_t fll_fss_snatch_map_apart(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_t names[], const f_string_length_t lengths[], const f_string_length_t size, f_string_map_multis_t *values[], f_array_lengths_t *indexs[]) {
+ f_status_t fll_fss_snatch_map_apart(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_t names[], const f_array_length_t lengths[], const f_array_length_t size, f_string_map_multis_t *values[], f_array_lengths_t *indexs[]) {
#ifndef _di_level_2_parameter_checking_
if (!size) return F_status_set_error(F_parameter);
if (objects.used != contents.used) return F_status_set_error(F_parameter);
if (!contents.used) return F_data_not;
f_status_t status = F_none;
- f_string_length_t length_object = 0;
+ f_array_length_t length_object = 0;
f_array_length_t i = 0;
f_array_length_t j = 0;
#endif // _di_fll_fss_snatch_map_apart_
#ifndef _di_fll_fss_snatch_map_mash_
- f_status_t fll_fss_snatch_map_mash(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_t names[], const f_string_length_t lengths[], const f_string_length_t size, const f_string_t glue, const f_string_length_t glue_length, f_string_maps_t *values[], f_array_lengths_t *indexs[]) {
+ f_status_t fll_fss_snatch_map_mash(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_t names[], const f_array_length_t lengths[], const f_array_length_t size, const f_string_t glue, const f_array_length_t glue_length, f_string_maps_t *values[], f_array_lengths_t *indexs[]) {
#ifndef _di_level_2_parameter_checking_
if (!size) return F_status_set_error(F_parameter);
if (objects.used != contents.used) return F_status_set_error(F_parameter);
if (!contents.used) return F_data_not;
f_status_t status = F_none;
- f_string_length_t length_object = 0;
+ f_array_length_t length_object = 0;
f_array_length_t i = 0;
f_array_length_t j = 0;
#endif // _di_fll_fss_snatch_map_mash_
#ifndef _di_fll_fss_snatch_map_mash_apart_
- f_status_t fll_fss_snatch_map_mash_apart(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_t names[], const f_string_length_t lengths[], const f_string_length_t size, const f_string_t glue, const f_string_length_t glue_length, f_string_map_multis_t *values[], f_array_lengths_t *indexs[]) {
+ f_status_t fll_fss_snatch_map_mash_apart(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_t names[], const f_array_length_t lengths[], const f_array_length_t size, const f_string_t glue, const f_array_length_t glue_length, f_string_map_multis_t *values[], f_array_lengths_t *indexs[]) {
#ifndef _di_level_2_parameter_checking_
if (!size) return F_status_set_error(F_parameter);
if (objects.used != contents.used) return F_status_set_error(F_parameter);
if (!contents.used) return F_data_not;
f_status_t status = F_none;
- f_string_length_t length_name = 0;
+ f_array_length_t length_name = 0;
f_string_dynamic_t name = f_string_dynamic_t_initialize;
f_array_length_t i = 0;
#endif // _di_fll_fss_snatch_map_mash_apart_
#ifndef _di_fll_fss_snatch_map_together_
- f_status_t fll_fss_snatch_map_together(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_t names[], const f_string_length_t lengths[], const f_string_length_t size, const f_string_t glue, const f_string_length_t glue_length, f_string_maps_t *values[], f_array_lengths_t *indexs[]) {
+ f_status_t fll_fss_snatch_map_together(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_t names[], const f_array_length_t lengths[], const f_array_length_t size, const f_string_t glue, const f_array_length_t glue_length, f_string_maps_t *values[], f_array_lengths_t *indexs[]) {
#ifndef _di_level_2_parameter_checking_
if (!size) return F_status_set_error(F_parameter);
if (objects.used != contents.used) return F_status_set_error(F_parameter);
if (!contents.used) return F_data_not;
f_status_t status = F_none;
- f_string_length_t length_name = 0;
+ f_array_length_t length_name = 0;
f_string_dynamic_t name = f_string_dynamic_t_initialize;
f_array_length_t i = 0;
#endif // _di_fll_fss_snatch_map_together_
#ifndef _di_fll_fss_snatch_mash_
- f_status_t fll_fss_snatch_mash(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_t names[], const f_string_length_t lengths[], const f_string_length_t size, const f_string_t glue, const f_string_length_t glue_length, f_string_dynamic_t *values[], f_array_length_t *indexs[]) {
+ f_status_t fll_fss_snatch_mash(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_t names[], const f_array_length_t lengths[], const f_array_length_t size, const f_string_t glue, const f_array_length_t glue_length, f_string_dynamic_t *values[], f_array_length_t *indexs[]) {
#ifndef _di_level_2_parameter_checking_
if (!size) return F_status_set_error(F_parameter);
if (objects.used != contents.used) return F_status_set_error(F_parameter);
if (!contents.used) return F_data_not;
f_status_t status = F_none;
- f_string_length_t length_object = 0;
+ f_array_length_t length_object = 0;
f_array_length_t i = 0;
f_array_length_t j = 0;
#endif // _di_fll_fss_snatch_mash_
#ifndef _di_fll_fss_snatch_mash_apart_
- f_status_t fll_fss_snatch_mash_apart(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_t names[], const f_string_length_t lengths[], const f_string_length_t size, const f_string_t glue, const f_string_length_t glue_length, f_string_dynamics_t *values[], f_array_lengths_t *indexs[]) {
+ f_status_t fll_fss_snatch_mash_apart(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_t names[], const f_array_length_t lengths[], const f_array_length_t size, const f_string_t glue, const f_array_length_t glue_length, f_string_dynamics_t *values[], f_array_lengths_t *indexs[]) {
#ifndef _di_level_2_parameter_checking_
if (!size) return F_status_set_error(F_parameter);
if (objects.used != contents.used) return F_status_set_error(F_parameter);
if (!contents.used) return F_data_not;
f_status_t status = F_none;
- f_string_length_t length_object = 0;
+ f_array_length_t length_object = 0;
f_array_length_t i = 0;
f_array_length_t j = 0;
#endif // _di_fll_fss_snatch_mash_apart_
#ifndef _di_fll_fss_snatch_together_
- f_status_t fll_fss_snatch_together(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_t names[], const f_string_length_t lengths[], const f_string_length_t size, const f_string_t glue, const f_string_length_t glue_length, f_string_dynamic_t *values[], f_array_length_t *indexs[]) {
+ f_status_t fll_fss_snatch_together(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_t names[], const f_array_length_t lengths[], const f_array_length_t size, const f_string_t glue, const f_array_length_t glue_length, f_string_dynamic_t *values[], f_array_length_t *indexs[]) {
#ifndef _di_level_2_parameter_checking_
if (!size) return F_status_set_error(F_parameter);
if (objects.used != contents.used) return F_status_set_error(F_parameter);
if (!contents.used) return F_data_not;
f_status_t status = F_none;
- f_string_length_t length_object = 0;
+ f_array_length_t length_object = 0;
f_array_length_t i = 0;
f_array_length_t j = 0;
* @see fl_string_compare_trim()
*/
#ifndef _di_fll_fss_snatch_
- extern f_status_t fll_fss_snatch(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_t names[], const f_string_length_t lengths[], const f_string_length_t size, f_string_dynamic_t *values[], f_array_length_t *indexs[]);
+ extern f_status_t fll_fss_snatch(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_t names[], const f_array_length_t lengths[], const f_array_length_t size, f_string_dynamic_t *values[], f_array_length_t *indexs[]);
#endif // _di_fll_fss_snatch_
/**
* @see fl_string_compare_trim()
*/
#ifndef _di_fll_fss_snatch_apart_
- extern f_status_t fll_fss_snatch_apart(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_t names[], const f_string_length_t lengths[], const f_string_length_t size, f_string_dynamics_t *values[], f_array_lengths_t *indexs[]);
+ extern f_status_t fll_fss_snatch_apart(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_t names[], const f_array_length_t lengths[], const f_array_length_t size, f_string_dynamics_t *values[], f_array_lengths_t *indexs[]);
#endif // _di_fll_fss_snatch_apart_
/**
* @see fl_string_compare_trim()
*/
#ifndef _di_fll_fss_snatch_map_
- extern f_status_t fll_fss_snatch_map(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_t names[], const f_string_length_t lengths[], const f_string_length_t size, f_string_maps_t *values[], f_array_lengths_t *indexs[]);
+ extern f_status_t fll_fss_snatch_map(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_t names[], const f_array_length_t lengths[], const f_array_length_t size, f_string_maps_t *values[], f_array_lengths_t *indexs[]);
#endif // _di_fll_fss_snatch_map_
/**
* @see fl_string_compare_trim()
*/
#ifndef _di_fll_fss_snatch_map_apart_
- extern f_status_t fll_fss_snatch_map_apart(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_t names[], const f_string_length_t lengths[], const f_string_length_t size, f_string_map_multis_t *values[], f_array_lengths_t *indexs[]);
+ extern f_status_t fll_fss_snatch_map_apart(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_t names[], const f_array_length_t lengths[], const f_array_length_t size, f_string_map_multis_t *values[], f_array_lengths_t *indexs[]);
#endif // _di_fll_fss_snatch_map_apart_
/**
* Errors (with error bit) from: f_string_dynamic_partial_mash_nulless().
*/
#ifndef _di_fll_fss_snatch_map_mash_
- extern f_status_t fll_fss_snatch_map_mash(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_t names[], const f_string_length_t lengths[], const f_string_length_t size, const f_string_t glue, const f_string_length_t glue_length, f_string_maps_t *values[], f_array_lengths_t *indexs[]);
+ extern f_status_t fll_fss_snatch_map_mash(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_t names[], const f_array_length_t lengths[], const f_array_length_t size, const f_string_t glue, const f_array_length_t glue_length, f_string_maps_t *values[], f_array_lengths_t *indexs[]);
#endif // _di_fll_fss_snatch_map_mash_
/**
* @see fl_string_compare_trim()
*/
#ifndef _di_fll_fss_snatch_map_mash_apart_
- extern f_status_t fll_fss_snatch_map_mash_apart(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_t names[], const f_string_length_t lengths[], const f_string_length_t size, const f_string_t glue, const f_string_length_t glue_length, f_string_map_multis_t *values[], f_array_lengths_t *indexs[]);
+ extern f_status_t fll_fss_snatch_map_mash_apart(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_t names[], const f_array_length_t lengths[], const f_array_length_t size, const f_string_t glue, const f_array_length_t glue_length, f_string_map_multis_t *values[], f_array_lengths_t *indexs[]);
#endif // _di_fll_fss_snatch_map_mash_apart_
/**
* @see fl_string_compare_trim()
*/
#ifndef _di_fll_fss_snatch_map_together_
- extern f_status_t fll_fss_snatch_map_together(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_t names[], const f_string_length_t lengths[], const f_string_length_t size, const f_string_t glue, const f_string_length_t glue_length, f_string_maps_t *values[], f_array_lengths_t *indexs[]);
+ extern f_status_t fll_fss_snatch_map_together(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_t names[], const f_array_length_t lengths[], const f_array_length_t size, const f_string_t glue, const f_array_length_t glue_length, f_string_maps_t *values[], f_array_lengths_t *indexs[]);
#endif // _di_fll_fss_snatch_map_together_
/**
* Errors (with error bit) from: f_string_dynamic_partial_mash_nulless().
*/
#ifndef _di_fll_fss_snatch_mash_
- extern f_status_t fll_fss_snatch_mash(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_t names[], const f_string_length_t lengths[], const f_string_length_t size, const f_string_t glue, const f_string_length_t glue_length, f_string_dynamic_t *values[], f_array_length_t *indexs[]);
+ extern f_status_t fll_fss_snatch_mash(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_t names[], const f_array_length_t lengths[], const f_array_length_t size, const f_string_t glue, const f_array_length_t glue_length, f_string_dynamic_t *values[], f_array_length_t *indexs[]);
#endif // _di_fll_fss_snatch_mash_
/**
* @see fl_string_compare_trim()
*/
#ifndef _di_fll_fss_snatch_mash_apart_
- extern f_status_t fll_fss_snatch_mash_apart(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_t names[], const f_string_length_t lengths[], const f_string_length_t size, const f_string_t glue, const f_string_length_t glue_length, f_string_dynamics_t *values[], f_array_lengths_t *indexs[]);
+ extern f_status_t fll_fss_snatch_mash_apart(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_t names[], const f_array_length_t lengths[], const f_array_length_t size, const f_string_t glue, const f_array_length_t glue_length, f_string_dynamics_t *values[], f_array_lengths_t *indexs[]);
#endif // _di_fll_fss_snatch_mash_apart_
/**
* @see fl_string_compare_trim()
*/
#ifndef _di_fll_fss_snatch_together_
- extern f_status_t fll_fss_snatch_together(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_t names[], const f_string_length_t lengths[], const f_string_length_t size, const f_string_t glue, const f_string_length_t glue_length, f_string_dynamic_t *values[], f_array_length_t *indexs[]);
+ extern f_status_t fll_fss_snatch_together(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_t names[], const f_array_length_t lengths[], const f_array_length_t size, const f_string_t glue, const f_array_length_t glue_length, f_string_dynamic_t *values[], f_array_length_t *indexs[]);
#endif // _di_fll_fss_snatch_together_
#ifdef __cplusplus
f_status_t status = F_none;
f_status_t status2 = F_none;
- f_string_length_t initial_used = objects->used;
+ f_array_length_t initial_used = objects->used;
bool found_data = F_false;
if (objects_quoted) {
objects_quoted->used++;
}
- } while (range->start < f_string_length_t_size);
+ } while (range->start < f_array_length_t_size);
return F_status_is_error(F_number_overflow);
}
f_status_t status = F_none;
f_status_t status2 = F_none;
- f_string_length_t initial_used = objects->used;
+ f_array_length_t initial_used = objects->used;
bool found_data = F_false;
objects->used++;
contents->used++;
- } while (range->start < f_string_length_t_size);
+ } while (range->start < f_array_length_t_size);
return F_status_is_error(F_number_overflow);
}
f_status_t status = F_none;
f_status_t status2 = F_none;
- f_string_length_t initial_used = 0;
+ f_array_length_t initial_used = 0;
bool found_data = F_false;
return F_none_stop;
}
- } while (range->start < f_string_length_t_size);
+ } while (range->start < f_array_length_t_size);
return F_status_is_error(F_number_overflow);
}
f_status_t status = F_none;
f_status_t status2 = F_none;
- f_string_length_t initial_used = objects->used;
+ f_array_length_t initial_used = objects->used;
bool found_data = F_false;
if (contents_quoted) {
contents_quoted->used++;
}
- } while (range->start < f_string_length_t_size);
+ } while (range->start < f_array_length_t_size);
return F_status_is_error(F_number_overflow);
}
f_status_t status = F_none;
f_status_t status2 = F_none;
- f_string_length_t initial_used = objects->used;
+ f_array_length_t initial_used = objects->used;
bool found_data = F_false;
objects->used++;
contents->used++;
- } while (range->start < f_string_length_t_size);
+ } while (range->start < f_array_length_t_size);
return F_status_is_error(F_number_overflow);
}
#endif // _di_level_2_parameter_checking_
f_status_t status = F_none;
- const f_string_length_t length = strlen(string);
+ const f_array_length_t length = strlen(string);
if (!length) {
return F_data_not;
#if !defined(_di_fll_fss_identify_) || !defined(_di_fll_fss_identify_file_)
f_status_t private_fll_fss_identify(const f_string_static_t buffer, f_fss_header_t *header) {
- register f_string_length_t i = 0;
+ register f_array_length_t i = 0;
if (buffer.used < 10) {
// "# fss-0000" is always at least 10 characters.
if (F_status_is_error(status)) return status;
}
- f_string_length_t i = 0;
- f_string_length_t j = 0;
- f_string_length_t delimits = 0;
+ f_array_length_t i = 0;
+ f_array_length_t j = 0;
+ f_array_length_t delimits = 0;
for (; i < content.used; i++) {
if (F_status_is_error(status)) return status;
}
- f_string_length_t i = 0;
- f_string_length_t j = 0;
- f_string_length_t delimits = 0;
+ f_array_length_t i = 0;
+ f_array_length_t j = 0;
+ f_array_length_t delimits = 0;
- const f_string_length_t used = unescaped->used;
+ const f_array_length_t used = unescaped->used;
for (; i < content.used; i++) {
#endif // _di_level_2_parameter_checking_
f_status_t status = F_none;
- f_string_length_t at = 0;
+ f_array_length_t at = 0;
uint8_t previous_1 = f_path_separator_s[0];
uint8_t previous_2 = 0;
- f_string_length_t size_chunk = 0;
- f_string_length_t position = 0;
+ f_array_length_t size_chunk = 0;
+ f_array_length_t position = 0;
canonical->used = 0;
* This does not check if the path exists or not.
* This processes the relative parts: './', '../', and extra '/'.
* This does not process symbolic links.
- * This has a max size of f_string_length_t_size.
+ * This has a max size of f_array_length_t_size.
*
* @param path
* The source path to determine what the canonical path is.
#endif // _di_fll_program_print_version_
#ifndef _di_fll_program_parameter_process_
- f_status_t fll_program_parameter_process(const f_console_arguments_t arguments, f_console_parameters_t parameters, const f_console_parameter_ids_t choices, const bool right, f_string_lengths_t *remaining, f_color_context_t *context) {
+ f_status_t fll_program_parameter_process(const f_console_arguments_t arguments, f_console_parameters_t parameters, const f_console_parameter_ids_t choices, const bool right, f_array_lengths_t *remaining, f_color_context_t *context) {
f_status_t status = F_none;
status = f_console_parameter_process(arguments, parameters, remaining);
f_status_t status = F_none;
- f_string_length_t length = 0;
- const f_string_length_t start = destination->used;
+ f_array_length_t length = 0;
+ const f_array_length_t start = destination->used;
- for (f_string_length_t i = 0; i < values.used; i++) {
+ for (f_array_length_t i = 0; i < values.used; i++) {
- length = strnlen(argv[values.array[i]], f_console_length_size);
+ length = strnlen(argv[values.array[i]], f_console_parameter_size);
if (length > 0) {
f_string_dynamic_t ripped = f_string_dynamic_t_initialize;
#endif // _di_fll_program_parameter_additional_append_
#ifndef _di_fll_program_parameter_additional_mash_
- f_status_t fll_program_parameter_additional_mash(const f_string_t glue, const f_string_length_t glue_length, const f_string_t *argv, const f_array_lengths_t values, f_string_dynamic_t *destination) {
+ f_status_t fll_program_parameter_additional_mash(const f_string_t glue, const f_array_length_t glue_length, const f_string_t *argv, const f_array_lengths_t values, f_string_dynamic_t *destination) {
#ifndef _di_level_2_parameter_checking_
if (!argv) return F_status_set_error(F_parameter);
if (glue_length < 1) return F_status_set_error(F_parameter);
f_status_t status = F_none;
- f_string_length_t length = 0;
- const f_string_length_t start = destination->used;
+ f_array_length_t length = 0;
+ const f_array_length_t start = destination->used;
- for (f_string_length_t i = 0; i < values.used; i++) {
+ for (f_array_length_t i = 0; i < values.used; i++) {
- length = strnlen(argv[values.array[i]], f_console_length_size);
+ length = strnlen(argv[values.array[i]], f_console_parameter_size);
if (length > 0) {
status = f_string_mash(glue, glue_length, argv[values.array[i]], length, destination);
#endif // _di_level_2_parameter_checking_
f_status_t status = F_none;
- f_string_length_t length = 0;
- const f_string_length_t start = destination->used;
+ f_array_length_t length = 0;
+ const f_array_length_t start = destination->used;
- for (f_string_length_t i = 0; i < values.used; i++) {
+ for (f_array_length_t i = 0; i < values.used; i++) {
- length = strnlen(argv[values.array[i]], f_console_length_size);
+ length = strnlen(argv[values.array[i]], f_console_parameter_size);
if (length > 0) {
f_string_dynamic_t ripped = f_string_dynamic_t_initialize;
#endif // _di_fll_program_parameter_additional_rip_
#ifndef _di_fll_program_parameter_additional_rip_mash_
- f_status_t fll_program_parameter_additional_rip_mash(const f_string_t glue, const f_string_length_t glue_length, const f_string_t *argv, const f_array_lengths_t values, f_string_dynamic_t *destination) {
+ f_status_t fll_program_parameter_additional_rip_mash(const f_string_t glue, const f_array_length_t glue_length, const f_string_t *argv, const f_array_lengths_t values, f_string_dynamic_t *destination) {
#ifndef _di_level_2_parameter_checking_
if (!argv) return F_status_set_error(F_parameter);
if (glue_length < 1) return F_status_set_error(F_parameter);
f_status_t status = F_none;
- f_string_length_t length = 0;
- const f_string_length_t start = destination->used;
+ f_array_length_t length = 0;
+ const f_array_length_t start = destination->used;
f_string_dynamic_t ripped = f_string_dynamic_t_initialize;
- for (f_string_length_t i = 0; i < values.used; i++) {
+ for (f_array_length_t i = 0; i < values.used; i++) {
- length = strnlen(argv[values.array[i]], f_console_length_size);
+ length = strnlen(argv[values.array[i]], f_console_parameter_size);
if (length > 0) {
status = fl_string_rip(argv[values.array[i]], length, &ripped);
* @see fl_color_load_context()
*/
#ifndef _di_fll_program_parameter_process_
- extern f_status_t fll_program_parameter_process(const f_console_arguments_t arguments, f_console_parameters_t parameters, const f_console_parameter_ids_t choices, const bool right, f_string_lengths_t *remaining, f_color_context_t *context);
+ extern f_status_t fll_program_parameter_process(const f_console_arguments_t arguments, f_console_parameters_t parameters, const f_console_parameter_ids_t choices, const bool right, f_array_lengths_t *remaining, f_color_context_t *context);
#endif // _di_fll_program_parameter_process_
/**
* @see f_string_mash()
*/
#ifndef _di_fll_program_parameter_additional_mash_
- extern f_status_t fll_program_parameter_additional_mash(const f_string_t glue, const f_string_length_t glue_length, const f_string_t *argv, const f_array_lengths_t values, f_string_dynamic_t *destination);
+ extern f_status_t fll_program_parameter_additional_mash(const f_string_t glue, const f_array_length_t glue_length, const f_string_t *argv, const f_array_lengths_t values, f_string_dynamic_t *destination);
#endif // _di_fll_program_parameter_additional_mash_
/**
* @see fl_string_rip()
*/
#ifndef _di_fll_program_parameter_additional_rip_mash_
- extern f_status_t fll_program_parameter_additional_rip_mash(const f_string_t glue, const f_string_length_t glue_length, const f_string_t *argv, const f_array_lengths_t values, f_string_dynamic_t *destination);
+ extern f_status_t fll_program_parameter_additional_rip_mash(const f_string_t glue, const f_array_length_t glue_length, const f_string_t *argv, const f_array_lengths_t values, f_string_dynamic_t *destination);
#endif // _di_fll_program_parameter_additional_rip_mash_
#ifdef __cplusplus
#endif // _di_level_2_parameter_checking_
f_status_t status = F_none;
- const f_string_length_t length = strlen(string);
+ const f_array_length_t length = strlen(string);
if (!length) {
return F_data_not;
return F_status_set_error(status);
}
else if (data->parameters[byte_dump_parameter_width].result == f_console_result_additional) {
- const f_string_length_t index = data->parameters[byte_dump_parameter_width].values.array[data->parameters[byte_dump_parameter_width].values.used - 1];
+ const f_array_length_t index = data->parameters[byte_dump_parameter_width].values.array[data->parameters[byte_dump_parameter_width].values.used - 1];
const f_string_range_t range = f_macro_string_range_t_initialize(strlen(arguments.argv[index]));
f_number_unsigned_t number = 0;
return F_status_set_error(status);
}
else if (data->parameters[byte_dump_parameter_first].result == f_console_result_additional) {
- const f_string_length_t index = data->parameters[byte_dump_parameter_first].values.array[data->parameters[byte_dump_parameter_first].values.used - 1];
+ const f_array_length_t index = data->parameters[byte_dump_parameter_first].values.array[data->parameters[byte_dump_parameter_first].values.used - 1];
const f_string_range_t range = f_macro_string_range_t_initialize(strlen(arguments.argv[index]));
f_number_unsigned_t number = 0;
return F_status_set_error(status);
}
else if (data->parameters[byte_dump_parameter_last].result == f_console_result_additional) {
- const f_string_length_t index = data->parameters[byte_dump_parameter_last].values.array[data->parameters[byte_dump_parameter_last].values.used - 1];
+ const f_array_length_t index = data->parameters[byte_dump_parameter_last].values.array[data->parameters[byte_dump_parameter_last].values.used - 1];
const f_string_range_t range = f_macro_string_range_t_initialize(strlen(arguments.argv[index]));
f_number_unsigned_t number = 0;
#ifndef _di_byte_dump_delete_data_
f_status_t byte_dump_delete_data(byte_dump_data_t *data) {
- for (f_string_length_t i = 0; i < byte_dump_total_parameters; i++) {
- f_macro_string_lengths_t_delete_simple(data->parameters[i].locations);
- f_macro_string_lengths_t_delete_simple(data->parameters[i].locations_sub);
- f_macro_string_lengths_t_delete_simple(data->parameters[i].values);
+ for (f_array_length_t i = 0; i < byte_dump_total_parameters; i++) {
+ f_macro_array_lengths_t_delete_simple(data->parameters[i].locations);
+ f_macro_array_lengths_t_delete_simple(data->parameters[i].locations_sub);
+ f_macro_array_lengths_t_delete_simple(data->parameters[i].values);
} // for
- f_macro_string_lengths_t_delete_simple(data->remaining);
+ f_macro_array_lengths_t_delete_simple(data->remaining);
f_macro_color_context_t_delete_simple(data->context);
typedef struct {
f_console_parameter_t parameters[byte_dump_total_parameters];
- f_string_lengths_t remaining;
+ f_array_lengths_t remaining;
bool process_pipe;
f_file_t output;
#define byte_dump_data_t_initialize \
{ \
byte_dump_console_parameter_t_initialize, \
- f_string_lengths_t_initialize, \
+ f_array_lengths_t_initialize, \
F_false, \
f_macro_file_t_initialize2(f_type_output, f_type_descriptor_output, f_file_flag_write_only), \
fll_error_print_t_initialize, \
// Store the current character data until it can be printed.
f_utf_string_dynamic_t characters = f_utf_string_dynamic_t_initialize;
f_utf_character_t character_array[data.width];
- f_string_length_t character_current = 0;
+ f_array_length_t character_current = 0;
// The row starts based on the first byte starting point and how many columns of bytes are displayed per row.
if (data.first > 0) {
bool reset = F_false;
- f_string_length_t character_current = characters.used - 1;
+ f_array_length_t character_current = characters.used - 1;
if (byte_current == 1) {
byte = f_macro_utf_character_t_to_char_1(characters.string[character_current]);
#ifndef _di_control_delete_data_
f_status_t control_delete_data(control_data_t *data) {
- for (f_string_length_t i = 0; i < control_total_parameters; i++) {
- f_macro_string_lengths_t_delete_simple(data->parameters[i].locations);
- f_macro_string_lengths_t_delete_simple(data->parameters[i].locations_sub);
- f_macro_string_lengths_t_delete_simple(data->parameters[i].values);
+ for (f_array_length_t i = 0; i < control_total_parameters; i++) {
+ f_macro_array_lengths_t_delete_simple(data->parameters[i].locations);
+ f_macro_array_lengths_t_delete_simple(data->parameters[i].locations_sub);
+ f_macro_array_lengths_t_delete_simple(data->parameters[i].values);
} // for
- f_macro_string_lengths_t_delete_simple(data->remaining);
+ f_macro_array_lengths_t_delete_simple(data->remaining);
f_macro_color_context_t_delete_simple(data->context);
typedef struct {
f_console_parameter_t parameters[control_total_parameters];
- f_string_lengths_t remaining;
+ f_array_lengths_t remaining;
bool process_pipe;
f_file_t output;
#define control_data_initialize \
{ \
control_console_parameter_t_initialize, \
- f_string_lengths_t_initialize, \
+ f_array_lengths_t_initialize, \
F_false, \
f_macro_file_t_initialize2(f_type_output, f_type_descriptor_output, f_file_flag_write_only), \
fll_error_print_t_initialize, \
{
f_array_length_t locations[operations_length];
f_array_length_t locations_length = 0;
- f_string_length_t i = 0;
- f_string_length_t j = 0;
- f_string_length_t k = 0;
+ f_array_length_t i = 0;
+ f_array_length_t j = 0;
+ f_array_length_t k = 0;
for (; i < data->parameters[fake_parameter_operation_build].locations.used; i++, locations_length++) {
#ifndef _di_fake_delete_data_
f_status_t fake_delete_data(fake_data_t *data) {
- for (f_string_length_t i = 0; i < fake_total_parameters; i++) {
- f_macro_string_lengths_t_delete_simple(data->parameters[i].locations);
- f_macro_string_lengths_t_delete_simple(data->parameters[i].locations_sub);
- f_macro_string_lengths_t_delete_simple(data->parameters[i].values);
+ for (f_array_length_t i = 0; i < fake_total_parameters; i++) {
+ f_macro_array_lengths_t_delete_simple(data->parameters[i].locations);
+ f_macro_array_lengths_t_delete_simple(data->parameters[i].locations_sub);
+ f_macro_array_lengths_t_delete_simple(data->parameters[i].values);
} // for
- f_macro_string_lengths_t_delete_simple(data->remaining);
+ f_macro_array_lengths_t_delete_simple(data->remaining);
f_macro_string_dynamics_t_delete_simple(data->define);
f_macro_string_dynamic_t_delete_simple(data->fakefile);
typedef struct {
f_console_parameter_t parameters[fake_total_parameters];
- f_string_lengths_t remaining;
+ f_array_lengths_t remaining;
bool process_pipe;
f_file_t output;
#define fake_data_t_initialize \
{ \
fake_console_parameter_t_initialize, \
- f_string_lengths_t_initialize, \
+ f_array_lengths_t_initialize, \
F_false, \
f_macro_file_t_initialize2(f_type_output, f_type_descriptor_output, f_file_flag_write_only), \
fll_error_print_t_initialize, \
void fake_build_arguments_standard_add(const fake_data_t data, const fake_build_data_t data_build, const bool is_shared, const bool is_library, f_string_dynamics_t *arguments, f_status_t *status) {
if (F_status_is_error(*status)) return;
- f_string_length_t build_libraries_length = fake_build_parameter_library_link_path_length + data.path_build_libraries_shared.used;
+ f_array_length_t build_libraries_length = fake_build_parameter_library_link_path_length + data.path_build_libraries_shared.used;
char build_libraries[build_libraries_length + 1];
build_libraries[build_libraries_length] = 0;
- f_string_length_t build_includes_length = fake_build_parameter_library_include_length + data.path_build_includes.used;
+ f_array_length_t build_includes_length = fake_build_parameter_library_include_length + data.path_build_includes.used;
char build_includes[build_includes_length + 1];
build_includes,
};
- const f_string_length_t lengths[] = {
+ const f_array_length_t lengths[] = {
build_libraries_length,
build_includes_length,
};
} // for
if (data.path_work.used > 0) {
- f_string_length_t length = 0;
+ f_array_length_t length = 0;
if (F_status_is_error_not(*status)) {
length = fake_build_parameter_library_include_length + data.path_work_includes.used;
}
if (data.define.used) {
- f_string_length_t length = 0;
+ f_array_length_t length = 0;
f_array_length_t i = 0;
for (; i < data.define.used && F_status_is_error_not(*status); i++) {
} // for
}
else {
- f_string_length_t length = 0;
+ f_array_length_t length = 0;
f_array_length_t i = 0;
for (; i < data_build.setting.defines_all.used && F_status_is_error_not(*status); i++) {
#endif // _di_fake_build_arguments_standard_add_
#ifndef _di_fake_build_copy_
- void fake_build_copy(const fake_data_t data, const f_mode_t mode, const f_string_t label, const f_string_static_t source, const f_string_static_t destination, const f_string_statics_t files, const f_string_static_t file_stage, const f_string_length_t preserve, f_status_t *status) {
+ void fake_build_copy(const fake_data_t data, const f_mode_t mode, const f_string_t label, const f_string_static_t source, const f_string_static_t destination, const f_string_statics_t files, const f_string_static_t file_stage, const f_array_length_t preserve, f_status_t *status) {
if (F_status_is_error(*status) || f_file_exists(file_stage.string) == F_true || *status == F_child) return;
if (fake_signal_received(data)) {
if (F_status_is_error(*status)) {
if (data.error.verbosity == f_console_verbosity_verbose) {
- for (f_string_length_t j = 0; j < failures.used; j++) {
+ for (f_array_length_t j = 0; j < failures.used; j++) {
fake_print_error_build_operation_file(data, F_status_set_fine(*status), "fl_directory_copy", "copy directory", "to", path_source.string, destination_directory.string, F_true);
} // for
}
f_string_static_t path_headers = f_string_static_t_initialize;
- f_string_length_t directory_headers_length = data.path_build_includes.used + data_build.setting.path_headers.used;
+ f_array_length_t directory_headers_length = data.path_build_includes.used + data_build.setting.path_headers.used;
char directory_headers[directory_headers_length + 1];
f_console_symbol_short_enable_s,
};
- const f_string_length_t parameters_prefix_length[] = {
+ const f_array_length_t parameters_prefix_length[] = {
f_console_symbol_short_enable_length,
f_console_symbol_short_enable_length,
f_console_symbol_short_enable_length,
fake_short_path_work,
};
- const f_string_length_t parameters_name_length[] = {
+ const f_array_length_t parameters_name_length[] = {
fake_short_define_length,
fake_short_process_length,
fake_short_settings_length,
data.path_work.string,
};
- const f_string_length_t parameters_value_length[] = {
+ const f_array_length_t parameters_value_length[] = {
defines.used,
data.process.used,
data.settings.used,
return status;
}
- f_string_length_t i = name->used;
+ f_array_length_t i = name->used;
for (; i > 0; i--) {
if (name->string[i] == f_path_extension_separator[0]) {
path_sources = &data_build.setting.path_sources;
}
- f_string_length_t source_length = 0;
+ f_array_length_t source_length = 0;
for (f_array_length_t i = 0; i < data_build.setting.build_sources_library.used; i++) {
}
}
- f_string_length_t parameter_file_name_length = fake_build_parameter_library_name_prefix_length;
- f_string_length_t parameter_file_name_major_length = fake_build_parameter_library_name_prefix_length;
- f_string_length_t parameter_file_name_minor_length = fake_build_parameter_library_name_prefix_length;
- f_string_length_t parameter_file_name_micro_length = fake_build_parameter_library_name_prefix_length;
+ f_array_length_t parameter_file_name_length = fake_build_parameter_library_name_prefix_length;
+ f_array_length_t parameter_file_name_major_length = fake_build_parameter_library_name_prefix_length;
+ f_array_length_t parameter_file_name_minor_length = fake_build_parameter_library_name_prefix_length;
+ f_array_length_t parameter_file_name_micro_length = fake_build_parameter_library_name_prefix_length;
parameter_file_name_micro_length += data_build.setting.project_name.used + fake_build_parameter_library_name_suffix_shared_length;
parameter_file_name_length = parameter_file_name_micro_length;
parameter_file_name_micro[parameter_file_name_micro_length] = 0;
{
- f_string_length_t parameter_file_path_length = data.path_build_libraries_shared.used + parameter_file_name_micro_length;
+ f_array_length_t parameter_file_path_length = data.path_build_libraries_shared.used + parameter_file_name_micro_length;
char parameter_file_path[parameter_file_path_length + 1];
parameter_file_path[parameter_file_path_length] = 0;
- f_string_length_t parameter_linker_length = fake_build_parameter_library_shared_prefix_length;
+ f_array_length_t parameter_linker_length = fake_build_parameter_library_shared_prefix_length;
if (data_build.setting.version_target == fake_build_version_type_major) {
parameter_linker_length += parameter_file_name_major_length;
parameter_file_path,
};
- const f_string_length_t lengths[] = {
+ const f_array_length_t lengths[] = {
fake_build_parameter_library_shared_length,
parameter_linker_length,
fake_build_parameter_library_output_length,
}
if (data_build.setting.version_target != fake_build_version_type_micro) {
- f_string_length_t parameter_file_path_length = data.path_build_libraries_shared.used;
+ f_array_length_t parameter_file_path_length = data.path_build_libraries_shared.used;
if (data_build.setting.version_target == fake_build_version_type_major) {
parameter_file_path_length += parameter_file_name_major_length;
}
if (F_status_is_error_not(*status)) {
- f_string_length_t parameter_file_path_length = data.path_build_libraries_shared.used + parameter_file_name_length;
+ f_array_length_t parameter_file_path_length = data.path_build_libraries_shared.used + parameter_file_name_length;
char parameter_file_path[parameter_file_path_length + 1];
*status = fll_execute_arguments_add(fake_build_parameter_object_link_arguments, fake_build_parameter_object_link_arguments_length, &arguments);
if (F_status_is_error_not(*status)) {
- f_string_length_t destination_length = data.path_build_libraries_static.used + fake_build_parameter_library_name_prefix_length;
+ f_array_length_t destination_length = data.path_build_libraries_static.used + fake_build_parameter_library_name_prefix_length;
destination_length += data_build.setting.project_name.used + fake_build_parameter_library_name_suffix_static_length;
char destination[destination_length + 1];
}
if (F_status_is_error_not(*status)) {
- f_string_length_t source_length = 0;
+ f_array_length_t source_length = 0;
for (f_array_length_t i = 0; i < data_build.setting.build_sources_library.used; i++) {
source_path.used = 0;
f_path_present_working_s
};
- const f_string_length_t variables_length[] = {
+ const f_array_length_t variables_length[] = {
f_path_environment_length,
f_path_present_working_length
};
fake_build_setting_name_version_target,
};
- const f_string_length_t settings_length[] = {
+ const f_array_length_t settings_length[] = {
fake_build_setting_name_build_compiler_length,
fake_build_setting_name_build_indexer_length,
fake_build_setting_name_build_language_length,
f_string_dynamic_t settings_mode_name_dynamic[fake_build_setting_total];
f_string_t settings_mode_names[fake_build_setting_total];
- f_string_length_t setting_mode_lengths[fake_build_setting_total];
+ f_array_length_t setting_mode_lengths[fake_build_setting_total];
const f_string_dynamics_t *modes = &setting->modes_default;
bool found = F_false;
memset(&settings_mode_name_dynamic, 0, sizeof(f_string_dynamic_t) * fake_build_setting_total);
memset(&settings_mode_names, 0, sizeof(f_string_t) * fake_build_setting_total);
- memset(&setting_mode_lengths, 0, sizeof(f_string_length_t) * fake_build_setting_total);
+ memset(&setting_mode_lengths, 0, sizeof(f_array_length_t) * fake_build_setting_total);
for (j = 0; j < fake_build_setting_total; j++) {
fake_build_setting_default_version,
};
- const f_string_length_t lengths[] = {
+ const f_array_length_t lengths[] = {
fake_build_setting_default_version_length,
fake_build_setting_default_version_length,
fake_build_setting_default_version_length,
fake_build_stage_sources_settings,
};
- const f_string_length_t lengths[] = {
+ const f_array_length_t lengths[] = {
fake_build_stage_libraries_script_length,
fake_build_stage_libraries_shared_length,
fake_build_stage_libraries_static_length,
f_string_dynamic_t file_name = f_string_dynamic_t_initialize;
f_string_dynamic_t destination_path = f_string_dynamic_t_initialize;
f_string_dynamics_t arguments = f_string_dynamics_t_initialize;
- f_string_length_t source_length = 0;
- f_string_length_t destination_length = 0;
+ f_array_length_t source_length = 0;
+ f_array_length_t destination_length = 0;
const f_string_static_t *path_sources = &data.path_sources;
destination,
};
- const f_string_length_t lengths[] = {
+ const f_array_length_t lengths[] = {
source_length,
fake_build_parameter_object_compile_length,
fake_build_parameter_object_static_length,
path_sources = &data_build.setting.path_sources;
}
- const f_string_length_t path_sources_base_length = path_sources->used;
+ const f_array_length_t path_sources_base_length = path_sources->used;
f_string_static_t path_headers = f_string_static_t_initialize;
- f_string_length_t directory_headers_length = data->path_build_includes.used + data_build.setting.path_headers.used;
+ f_array_length_t directory_headers_length = data->path_build_includes.used + data_build.setting.path_headers.used;
char directory_headers[directory_headers_length + 1];
path_sources = &data_build.setting.path_sources;
}
- f_string_length_t source_length = 0;
+ f_array_length_t source_length = 0;
for (f_array_length_t i = 0; i < data_build.setting.build_sources_program.used; i++) {
source_length = path_sources->used + data_build.setting.build_sources_program.array[i].used;
}
if (F_status_is_error_not(*status)) {
- f_string_length_t parameter_file_name_path_length = data.path_build_programs_shared.used + data_build.setting.project_name.used;
+ f_array_length_t parameter_file_name_path_length = data.path_build_programs_shared.used + data_build.setting.project_name.used;
char parameter_file_name_path[parameter_file_name_path_length + 1];
parameter_file_name_path,
};
- const f_string_length_t lengths[] = {
+ const f_array_length_t lengths[] = {
fake_build_parameter_library_output_length,
parameter_file_name_path_length,
};
// if project-specific library sources exist, then the -lproject_name needs to be added to the arguments.
if (F_status_is_error_not(*status) && data_build.setting.build_sources_library.used > 0) {
- f_string_length_t link_project_library_length = fake_build_parameter_library_link_file_length + data_build.setting.project_name.used;
+ f_array_length_t link_project_library_length = fake_build_parameter_library_link_file_length + data_build.setting.project_name.used;
char link_project_library[link_project_library_length + 1];
path_sources = &data_build.setting.path_sources;
}
- f_string_length_t source_length = 0;
+ f_array_length_t source_length = 0;
for (f_array_length_t i = 0; i < data_build.setting.build_sources_program.used; i++) {
if (!data_build.setting.build_sources_program.array[i].used) continue;
}
if (F_status_is_error_not(*status)) {
- f_string_length_t source_library_length = data.path_build_libraries_static.used + fake_build_parameter_library_name_prefix_length + data_build.setting.project_name.used + fake_build_parameter_library_name_suffix_static_length;
+ f_array_length_t source_library_length = data.path_build_libraries_static.used + fake_build_parameter_library_name_prefix_length + data_build.setting.project_name.used + fake_build_parameter_library_name_suffix_static_length;
char source_library[source_library_length + 1];
source_library[source_library_length] = 0;
- f_string_length_t parameter_file_name_path_length = data.path_build_programs_static.used + data_build.setting.project_name.used;
+ f_array_length_t parameter_file_name_path_length = data.path_build_programs_static.used + data_build.setting.project_name.used;
char parameter_file_name_path[parameter_file_name_path_length + 1];
parameter_file_name_path,
};
- const f_string_length_t lengths[] = {
+ const f_array_length_t lengths[] = {
source_library_length,
fake_build_parameter_library_static_length,
fake_build_parameter_library_output_length,
* Status codes (with error bit) are returned on any problem.
*/
#ifndef _di_fake_build_copy_
- extern void fake_build_copy(const fake_data_t data, const f_mode_t mode, const f_string_t label, const f_string_static_t source, const f_string_static_t destination, const f_string_statics_t files, const f_string_static_t file_stage, const f_string_length_t preserve, f_status_t *status) f_gcc_attribute_visibility_internal;
+ extern void fake_build_copy(const fake_data_t data, const f_mode_t mode, const f_string_t label, const f_string_static_t source, const f_string_static_t destination, const f_string_statics_t files, const f_string_static_t file_stage, const f_array_length_t preserve, f_status_t *status) f_gcc_attribute_visibility_internal;
#endif // _di_fake_build_copy_
/**
if (status == F_true) {
{
- f_string_length_t size_file = 0;
+ f_array_length_t size_file = 0;
name_function = "f_file_size";
status = f_file_size(path_file, F_true, &size_file);
fake_path_part_script,
};
- const f_string_length_t parameters_length[] = {
+ const f_array_length_t parameters_length[] = {
fake_path_part_documents_length,
fake_path_part_includes_length,
fake_path_part_libraries_length,
fake_file_readme,
};
- const f_string_length_t parameters_length[] = {
+ const f_array_length_t parameters_length[] = {
fake_path_part_script_length,
fake_path_part_shared_length,
fake_path_part_static_length,
fake_path_part_programs,
};
- const f_string_length_t parameters_length[] = {
+ const f_array_length_t parameters_length[] = {
fake_path_part_includes_length,
fake_path_part_libraries_length,
fake_path_part_programs_length,
fake_path_part_static,
};
- const f_string_length_t parameters_length[] = {
+ const f_array_length_t parameters_length[] = {
fake_path_part_script_length,
fake_path_part_shared_length,
fake_path_part_static_length,
fake_default_settings,
};
- const f_string_length_t parameter_default_lengths[] = {
+ const f_array_length_t parameter_default_lengths[] = {
fake_default_fakefile_length,
fake_default_process_length,
fake_default_settings_length,
return F_status_set_error(F_parameter);
}
- f_string_length_t location = data->parameters[parameters_id[i]].values.array[0];
- f_string_length_t length = strnlen(arguments.argv[location], f_console_length_size);
+ f_array_length_t location = data->parameters[parameters_id[i]].values.array[0];
+ f_array_length_t length = strnlen(arguments.argv[location], f_console_parameter_size);
if (length > 0) {
if (parameters_validate_word[i]) {
- f_string_length_t j = 0;
- f_string_length_t width_max = 0;
+ f_array_length_t j = 0;
+ f_array_length_t width_max = 0;
for (j = 0; j < length; j++) {
width_max = length - j;
fake_default_path_work,
};
- const f_string_length_t parameter_default_lengths[] = {
+ const f_array_length_t parameter_default_lengths[] = {
fake_default_path_build_length,
fake_default_path_data_length,
fake_default_path_sources_length,
}
f_array_length_t i = 0;
- f_string_length_t j = 0;
- f_string_length_t width_max = 0;
+ f_array_length_t j = 0;
+ f_array_length_t width_max = 0;
for (; i < data->define.used; i++) {
}
f_array_length_t i = 0;
- f_string_length_t j = 0;
- f_string_length_t width_max = 0;
+ f_array_length_t j = 0;
+ f_array_length_t width_max = 0;
for (; i < data->mode.used; i++) {
fake_default_path_work,
};
- const f_string_length_t parameter_default_lengths[] = {
+ const f_array_length_t parameter_default_lengths[] = {
fake_default_path_build_length,
fake_default_path_data_length,
fake_default_path_work_length,
fake_make_setting_parameter,
};
- const f_string_length_t settings_length[] = {
+ const f_array_length_t settings_length[] = {
fake_make_setting_define_length,
fake_make_setting_parameter_length,
};
f_status_t status = F_none;
f_mode_t mode = f_mode_t_initialize;
- f_string_lengths_t section_stack = f_string_lengths_t_initialize;
+ f_array_lengths_t section_stack = f_array_lengths_t_initialize;
fake_make_data_t data_make = fake_make_data_t_initialize;
status = f_string_dynamics_increase(&data_make.path.stack);
f_file_stream_close(F_true, &data_make.path.top);
- f_macro_string_lengths_t_delete_simple(section_stack);
+ f_macro_array_lengths_t_delete_simple(section_stack);
fake_macro_make_data_t_delete_simple(data_make);
// signal is set with error code only to prevent further execution above, return without the error bit set.
f_array_length_t used_arguments = 0;
- f_string_length_t previous = 0;
+ f_array_length_t previous = 0;
const f_string_t reserved_name[] = {
fake_make_parameter_variable_build,
fake_make_parameter_variable_work,
};
- const f_string_length_t reserved_length[] = {
+ const f_array_length_t reserved_length[] = {
fake_make_parameter_variable_build_length,
fake_make_parameter_variable_color_length,
fake_make_parameter_variable_data_length,
fake_build_setting_name_version_target,
};
- const f_string_length_t uint8_length[] = {
+ const f_array_length_t uint8_length[] = {
fake_build_setting_name_build_language_length,
fake_build_setting_name_version_target_length,
};
fake_build_setting_name_search_static,
};
- const f_string_length_t bool_length[] = {
+ const f_array_length_t bool_length[] = {
fake_build_setting_name_build_script_length,
fake_build_setting_name_build_shared_length,
fake_build_setting_name_build_static_length,
fake_build_setting_name_version_minor,
};
- const f_string_length_t dynamic_length[] = {
+ const f_array_length_t dynamic_length[] = {
fake_build_setting_name_build_compiler_length,
fake_build_setting_name_build_indexer_length,
fake_build_setting_name_path_headers_length,
fake_build_setting_name_modes_default,
};
- const f_string_length_t dynamics_length[] = {
+ const f_array_length_t dynamics_length[] = {
fake_build_setting_name_build_libraries_length,
fake_build_setting_name_build_sources_headers_length,
fake_build_setting_name_build_sources_library_length,
#endif // _di_fake_make_operate_expand_environment_
#ifndef _di_fake_make_operate_section_
- int fake_make_operate_section(const f_array_length_t id_section, fake_data_t *data, fake_make_data_t *data_make, f_string_lengths_t *section_stack, f_status_t *status) {
+ int fake_make_operate_section(const f_array_length_t id_section, fake_data_t *data, fake_make_data_t *data_make, f_array_lengths_t *section_stack, f_status_t *status) {
if (F_status_is_error(*status) || *status == F_child) return data->child;
if (fake_signal_received(*data)) {
// add the operation id to the operation stack.
if (section_stack->used + 1 > section_stack->size) {
- f_macro_string_lengths_t_increase_by((*status), (*section_stack), f_memory_default_allocation_step);
+ f_macro_array_lengths_t_increase_by((*status), (*section_stack), f_memory_default_allocation_step);
if (F_status_is_error(*status)) {
- fll_error_print(data_make->error, F_status_set_fine(*status), "f_macro_string_lengths_t_increase_by", F_true);
+ fll_error_print(data_make->error, F_status_set_fine(*status), "f_macro_array_lengths_t_increase_by", F_true);
return 0;
}
}
-
section_stack->array[section_stack->used] = id_section;
section_stack->used++;
#endif // _di_fake_make_operate_section_
#ifndef _di_fake_make_operate_process_
- int fake_make_operate_process(const f_string_range_t section_name, const uint8_t operation, const f_string_static_t operation_name, const f_string_dynamics_t arguments, const bool success, uint8_t *operation_if, fake_data_t *data, fake_make_data_t *data_make, f_string_lengths_t *section_stack, f_status_t *status) {
+ int fake_make_operate_process(const f_string_range_t section_name, const uint8_t operation, const f_string_static_t operation_name, const f_string_dynamics_t arguments, const bool success, uint8_t *operation_if, fake_data_t *data, fake_make_data_t *data_make, f_array_lengths_t *section_stack, f_status_t *status) {
if (*status == F_child) return data->child;
if (operation == fake_make_operation_type_index) {
fl_directory_recurse_t recurse = fl_directory_recurse_t_initialize;
- f_string_length_t destination_length = 0;
+ f_array_length_t destination_length = 0;
if (data->error.verbosity == f_console_verbosity_verbose) {
recurse.output = data->output;
fl_directory_recurse_t recurse = fl_directory_recurse_t_initialize;
- f_string_length_t destination_length = 0;
+ f_array_length_t destination_length = 0;
f_mode_t mode = f_mode_t_initialize;
}
f_array_length_t i = 2;
- f_string_length_t j = 0;
+ f_array_length_t j = 0;
bool missed = F_true;
*operation_if = fake_make_operation_if_type_true_next;
bool is_negative_left = F_false;
bool is_negative_right = F_false;
- f_string_length_t i = 1;
+ f_array_length_t i = 1;
const uint8_t type_if = *operation_if;
fl_directory_recurse_t recurse = fl_directory_recurse_t_initialize;
- f_string_length_t destination_length = 0;
+ f_array_length_t destination_length = 0;
if (data->error.verbosity == f_console_verbosity_verbose) {
recurse.output = data->output;
#endif // _di_fake_make_operate_process_run_
#ifndef _di_fake_make_operate_validate_
- void fake_make_operate_validate(const fake_data_t data, const f_string_range_t section_name, const f_array_length_t operation, const f_string_static_t operation_name, const f_string_dynamics_t arguments, uint8_t *operation_if, fake_make_data_t *data_make, f_string_lengths_t *section_stack, f_status_t *status) {
+ void fake_make_operate_validate(const fake_data_t data, const f_string_range_t section_name, const f_array_length_t operation, const f_string_static_t operation_name, const f_string_dynamics_t arguments, uint8_t *operation_if, fake_make_data_t *data_make, f_array_lengths_t *section_stack, f_status_t *status) {
if (F_status_is_error(*status)) return;
if (operation == fake_make_operation_type_index || operation == fake_make_operation_type_run || operation == fake_make_operation_type_shell) {
fake_make_operation_argument_if_success,
};
- const f_string_length_t if_type_lengths[] = {
+ const f_array_length_t if_type_lengths[] = {
fake_make_operation_argument_if_defined_length,
fake_make_operation_argument_if_equal_length,
fake_make_operation_argument_if_equal_not_length,
1,
};
- f_string_length_t i = 0;
+ f_array_length_t i = 0;
for (; i < 14; i++) {
return F_false;
}
- for (f_string_length_t i = 0; i < name.used; i++) {
+ for (f_array_length_t i = 0; i < name.used; i++) {
if (!(isalnum(name.string[i]) || name.string[i] == '_')) {
return F_false;
* This generally is only needed when F_child is returned, where this holds the return status of the child process.
*/
#ifndef _di_fake_make_operate_section_
- int fake_make_operate_section(const f_array_length_t id_section, fake_data_t *data, fake_make_data_t *data_make, f_string_lengths_t *section_stack, f_status_t *status) f_gcc_attribute_visibility_internal;
+ int fake_make_operate_section(const f_array_length_t id_section, fake_data_t *data, fake_make_data_t *data_make, f_array_lengths_t *section_stack, f_status_t *status) f_gcc_attribute_visibility_internal;
#endif // _di_fake_make_operate_section_
/**
* This generally is only needed when F_child is returned, where this holds the return status of the child process.
*/
#ifndef _di_fake_make_operate_process_
- extern int fake_make_operate_process(const f_string_range_t section_name, const uint8_t operation, const f_string_static_t operation_name, const f_string_dynamics_t arguments, const bool success, uint8_t *operation_if, fake_data_t *data, fake_make_data_t *data_make, f_string_lengths_t *section_stack, f_status_t *status) f_gcc_attribute_visibility_internal;
+ extern int fake_make_operate_process(const f_string_range_t section_name, const uint8_t operation, const f_string_static_t operation_name, const f_string_dynamics_t arguments, const bool success, uint8_t *operation_if, fake_data_t *data, fake_make_data_t *data_make, f_array_lengths_t *section_stack, f_status_t *status) f_gcc_attribute_visibility_internal;
#endif // _di_fake_make_operate_process_
/**
* Status codes (with error bit) are returned on any problem.
*/
#ifndef _di_fake_make_operate_validate_
- extern void fake_make_operate_validate(const fake_data_t data, const f_string_range_t section_name, const f_array_length_t operation, const f_string_static_t operation_name, const f_string_dynamics_t arguments, uint8_t *operation_if, fake_make_data_t *data_make, f_string_lengths_t *section_stack, f_status_t *status) f_gcc_attribute_visibility_internal;
+ extern void fake_make_operate_validate(const fake_data_t data, const f_string_range_t section_name, const f_array_length_t operation, const f_string_static_t operation_name, const f_string_dynamics_t arguments, uint8_t *operation_if, fake_make_data_t *data_make, f_array_lengths_t *section_stack, f_status_t *status) f_gcc_attribute_visibility_internal;
#endif // _di_fake_make_operate_validate_
/**
void fake_print_message_section_operation_failed(const fake_data_t data, const fll_error_print_t error, const f_string_static_t buffer, const f_string_range_t section_name, const f_string_range_t operation_name) {
if (data.error.verbosity == f_console_verbosity_quiet || !error.to.stream) return;
- f_string_length_t line = 1;
+ f_array_length_t line = 1;
f_fss_count_lines(buffer, operation_name.start, &line);
void fake_print_message_section_operation_stack_max(const fake_data_t data, fll_error_print_t error, const f_string_static_t buffer, const f_string_range_t section_name, const f_string_range_t operation_name, const f_array_length_t stack_max) {
if (data.error.verbosity == f_console_verbosity_quiet || !error.to.stream) return;
- f_string_length_t line = 1;
+ f_array_length_t line = 1;
f_fss_count_lines(buffer, operation_name.start, &line);
void fake_print_message_section_operation_unknown(const fake_data_t data, const fll_error_print_t error, const f_string_static_t buffer, const f_string_range_t section_name, const f_string_range_t operation_name) {
if (data.error.verbosity == f_console_verbosity_quiet || !error.to.stream) return;
- f_string_length_t line = 1;
+ f_array_length_t line = 1;
f_fss_count_lines(buffer, operation_name.start, &line);
show_mangle = F_false;
show_ports = F_false;
- f_string_length_t counter = 0;
+ f_array_length_t counter = 0;
for (; counter < data->remaining.used; counter++) {
fl_color_print(data->error.to.stream, data->context.set.error, "%sFailed to perform requested %s operation:%c", fll_error_print_error, firewall_tool_iptables, f_string_eol_s[0]);
fprintf(f_type_error, " ");
- f_string_length_t i = 0;
+ f_array_length_t i = 0;
fl_color_print_code(f_type_error, data->context.error);
// remove "lo" (loopback) from the device listing
{
- f_string_length_t i = 0;
+ f_array_length_t i = 0;
for (; i < data->devices.used; i++) {
if (fl_string_compare((f_string_t) firewall_device_loop, data->devices.array[i].string, firewall_device_loop_length + 1, data->devices.array[i].used) == F_equal_to) {
{
f_array_length_t i = 0;
- f_string_length_t length = 0;
+ f_array_length_t length = 0;
for (; i < local.chain_objects.used; i++) {
length = local.chain_objects.array[i].stop - local.chain_objects.array[i].start + 1;
#ifndef _di_firewall_delete_data_
f_status_t firewall_delete_data(firewall_data_t *data) {
- for (f_string_length_t i = 0; i < firewall_total_parameters; i++) {
- f_macro_string_lengths_t_delete_simple(data->parameters[i].locations);
- f_macro_string_lengths_t_delete_simple(data->parameters[i].locations_sub);
- f_macro_string_lengths_t_delete_simple(data->parameters[i].values);
+ for (f_array_length_t i = 0; i < firewall_total_parameters; i++) {
+ f_macro_array_lengths_t_delete_simple(data->parameters[i].locations);
+ f_macro_array_lengths_t_delete_simple(data->parameters[i].locations_sub);
+ f_macro_array_lengths_t_delete_simple(data->parameters[i].values);
} // for
f_macro_string_dynamics_t_delete_simple(data->chains);
- f_macro_string_lengths_t_delete_simple(data->remaining);
+ f_macro_array_lengths_t_delete_simple(data->remaining);
f_macro_string_dynamics_t_delete_simple(data->devices);
f_macro_color_context_t_delete_simple(data->context);
typedef struct {
f_console_parameter_t parameters[firewall_total_parameters];
- f_string_lengths_t remaining;
+ f_array_lengths_t remaining;
bool process_pipe;
f_file_t output;
#define firewall_data_t_initialize \
{ \
firewall_console_parameter_t_initialize, \
- f_string_lengths_t_initialize, \
+ f_array_lengths_t_initialize, \
F_false, \
f_macro_file_t_initialize2(f_type_output, f_type_descriptor_output, f_file_flag_write_only), \
fll_error_print_t_initialize, \
f_status_t firewall_perform_commands(const firewall_local_data_t local, const firewall_data_t data) {
f_status_t status = F_none;
- f_string_length_t i = 0;
+ f_array_length_t i = 0;
f_string_dynamics_t arguments = f_string_dynamics_t_initialize;
f_string_dynamic_t argument = f_string_dynamic_t_initialize;
int return_code = 0;
- f_string_length_t length = 0;
+ f_array_length_t length = 0;
bool invalid = F_false;
bool is_ip_list = F_false;
f_string_dynamic_t ip_list = f_string_dynamic_t_initialize;
f_array_length_t r = 0;
f_string_t current_tool = firewall_tool_iptables;
- f_string_length_t current_tool_length = firewall_tool_iptables_length;
+ f_array_length_t current_tool_length = firewall_tool_iptables_length;
- f_string_length_t direction = firewall_direction_none_id;
+ f_array_length_t direction = firewall_direction_none_id;
f_string_dynamic_t device = f_string_dynamic_t_initialize;
- f_string_length_t action = firewall_action_append_id;
+ f_array_length_t action = firewall_action_append_id;
f_string_dynamic_t protocol = f_string_dynamic_t_initialize;
if (local.is_global) {
// last up is the "rule"
if ((!is_ip_list && local.rule_contents.array[i].used > 0) || (is_ip_list && local.rule_contents.array[i].used > 1)) {
- f_string_length_t subcounter = 0;
+ f_array_length_t subcounter = 0;
if (is_ip_list) {
// skip past the chain
}
if (F_status_is_error_not(status)) {
- f_string_length_t buffer_counter = 0;
- f_string_length_t ip_length = 0;
+ f_array_length_t buffer_counter = 0;
+ f_array_length_t ip_length = 0;
f_string_dynamic_t ip_list_action = f_string_dynamic_t_initialize;
if (ip_list_direction) {
fl_color_print_code(f_type_debug, data.context.warning);
fprintf(f_type_debug, "%s ", current_tool);
- for (f_string_length_t i = 0; i < arguments.used; i++) {
+ for (f_array_length_t i = 0; i < arguments.used; i++) {
fprintf(f_type_debug, "%.*s ", arguments.array[i].used, arguments.array[i].string);
} // for
fl_color_print_code(f_type_error, data.context.error);
fprintf(f_type_error, "%s ", current_tool);
- for (f_string_length_t i = 0; i < arguments.used; i++) {
+ for (f_array_length_t i = 0; i < arguments.used; i++) {
fprintf(f_type_error, "%.*s ", arguments.array[i].used, arguments.array[i].string);
} // for
fl_color_print_code(f_type_debug, data.context.warning);
fprintf(f_type_debug, "%s ", current_tool);
- for (f_string_length_t i = 0; i < arguments.used; i++) {
+ for (f_array_length_t i = 0; i < arguments.used; i++) {
fprintf(f_type_debug, "%.*s ", arguments.array[i].used, arguments.array[i].string);
} // for
fl_color_print_code(f_type_error, data.context.error);
fprintf(f_type_error, "%s ", current_tool);
- for (f_string_length_t i = 0; i < arguments.used; i++) {
+ for (f_array_length_t i = 0; i < arguments.used; i++) {
fprintf(f_type_error, "%.*s ", arguments.array[i].used, arguments.array[i].string);
} // for
f_array_length_t i = 0;
f_array_length_t j = 0;
- f_string_length_t length = 0;
+ f_array_length_t length = 0;
f_string_range_t range = f_string_range_t_initialize;
f_string_dynamics_t arguments = f_string_dynamics_t_initialize;
fl_color_print_code(f_type_debug, data->context.warning);
fprintf(f_type_debug, "%s ", firewall_tool_iptables);
- for (f_string_length_t i = 0; i < arguments.used; i++) {
+ for (f_array_length_t i = 0; i < arguments.used; i++) {
fprintf(f_type_debug, "%.*s ", arguments.array[i].used, arguments.array[i].string);
} // for
fl_color_print_code(f_type_debug, data->context.warning);
fprintf(f_type_debug, "%s ", firewall_tool_ip6tables);
- for (f_string_length_t i = 0; i < arguments.used; i++) {
+ for (f_array_length_t i = 0; i < arguments.used; i++) {
fprintf(f_type_debug, "%.*s ", arguments.array[i].used, arguments.array[i].string);
} // for
fprintf(f_type_error, "%s ", firewall_tool_ip6tables);
}
- for (f_string_length_t i = 0; i < arguments.used; i++) {
+ for (f_array_length_t i = 0; i < arguments.used; i++) {
fprintf(f_type_error, "%.*s ", arguments.array[i].used, arguments.array[i].string);
} // for
const f_string_t tools[2] = { firewall_tool_iptables, firewall_tool_ip6tables };
f_status_t status = F_none;
- for (f_string_length_t i = 0; i < 2; i++) {
+ for (f_array_length_t i = 0; i < 2; i++) {
f_string_dynamics_t arguments = f_string_dynamics_t_initialize;
f_string_dynamic_t argument[1] = f_string_dynamic_t_initialize;
int return_code = 0;
fl_color_print_code(f_type_debug, data.context.warning);
fprintf(f_type_debug, "%s ", tools[i]);
- for (f_string_length_t i = 0; i < arguments.used; i++) {
+ for (f_array_length_t i = 0; i < arguments.used; i++) {
fprintf(f_type_debug, "%.*s ", arguments.array[i].used, arguments.array[i].string);
} // for
fl_color_print_code(f_type_error, data.context.error);
fprintf(f_type_error, "%s ", tools[i]);
- for (f_string_length_t i = 0; i < arguments.used; i++) {
+ for (f_array_length_t i = 0; i < arguments.used; i++) {
fprintf(f_type_error, "%.*s ", arguments.array[i].used, arguments.array[i].string);
} // for
}
} // for
- for (f_string_length_t i = 0; i < 2; i++) {
+ for (f_array_length_t i = 0; i < 2; i++) {
f_string_dynamics_t arguments = f_string_dynamics_t_initialize;
f_string_dynamic_t argument[1] = f_string_dynamic_t_initialize;
int return_code = 0;
fl_color_print_code(f_type_debug, data.context.warning);
fprintf(f_type_debug, "%s ", tools[i]);
- for (f_string_length_t j = 0; j < arguments.used; j++) {
+ for (f_array_length_t j = 0; j < arguments.used; j++) {
fprintf(f_type_debug, "%.*s ", arguments.array[j].used, arguments.array[j].string);
} // for
fl_color_print_code(f_type_error, data.context.error);
fprintf(f_type_error, "%s ", tools[i]);
- for (f_string_length_t j = 0; j < arguments.used; j++) {
+ for (f_array_length_t j = 0; j < arguments.used; j++) {
fprintf(f_type_error, "%.*s ", arguments.array[j].used, arguments.array[j].string);
} // for
const f_string_t chains[3] = { firewall_chain_input, firewall_chain_output, firewall_chain_forward };
const f_string_t tools[2] = { firewall_tool_iptables, firewall_tool_ip6tables };
- const f_string_length_t lengths[3] = { firewall_chain_input_length, firewall_chain_output_length, firewall_chain_forward_length };
+ const f_array_length_t lengths[3] = { firewall_chain_input_length, firewall_chain_output_length, firewall_chain_forward_length };
f_status_t status = F_none;
- for (f_string_length_t i = 0; i < 3; i++) {
+ for (f_array_length_t i = 0; i < 3; i++) {
f_string_dynamics_t arguments = f_string_dynamics_t_initialize;
f_string_dynamic_t argument[3];
arguments.array[1].size = arguments.array[1].used;
arguments.array[2].size = arguments.array[2].used;
- for (f_string_length_t j = 0; j < 2; j++) {
+ for (f_array_length_t j = 0; j < 2; j++) {
int return_code = 0;
// print command when debugging.
fl_color_print_code(f_type_debug, data.context.warning);
fprintf(f_type_debug, "%s ", tools[j]);
- for (f_string_length_t k = 0; k < arguments.used; k++) {
+ for (f_array_length_t k = 0; k < arguments.used; k++) {
fprintf(f_type_debug, "%.*s ", arguments.array[k].used, arguments.array[k].string);
} // for
fl_color_print_code(f_type_error, data.context.error);
fprintf(f_type_error, "%s ", tools[j]);
- for (f_string_length_t k = 0; k < arguments.used; k++) {
+ for (f_array_length_t k = 0; k < arguments.used; k++) {
fprintf(f_type_error, "%.*s ", arguments.array[k].used, arguments.array[k].string);
} // for
status = F_status_set_error(F_parameter);
}
else if (data->parameters[fss_basic_list_read_parameter_delimit].result == f_console_result_additional) {
- const f_string_length_t location = data->parameters[fss_basic_list_read_parameter_delimit].values.array[0];
- f_string_length_t length = strnlen(arguments.argv[location], f_console_length_size);
+ const f_array_length_t location = data->parameters[fss_basic_list_read_parameter_delimit].values.array[0];
+ f_array_length_t length = strnlen(arguments.argv[location], f_console_parameter_size);
if (length == 0) {
fl_color_print(data->error.to.stream, data->context.set.error, "%sThe value for the parameter '", fll_error_print_error);
f_fss_delimits_t delimits = f_fss_delimits_t_initialize;
f_fss_comments_t comments = f_fss_comments_t_initialize;
- f_string_length_t original_size = data->quantity.total;
+ f_array_length_t original_size = data->quantity.total;
if (F_status_is_error_not(status)) {
status = fss_basic_list_read_main_preprocess_depth(arguments, *data, &depths);
#ifndef _di_fss_basic_list_read_delete_data_
f_status_t fss_basic_list_read_delete_data(fss_basic_list_read_data_t *data) {
- for (f_string_length_t i = 0; i < fss_basic_list_read_total_parameters; i++) {
- f_macro_string_lengths_t_delete_simple(data->parameters[i].locations);
- f_macro_string_lengths_t_delete_simple(data->parameters[i].locations_sub);
- f_macro_string_lengths_t_delete_simple(data->parameters[i].values);
+ for (f_array_length_t i = 0; i < fss_basic_list_read_total_parameters; i++) {
+ f_macro_array_lengths_t_delete_simple(data->parameters[i].locations);
+ f_macro_array_lengths_t_delete_simple(data->parameters[i].locations_sub);
+ f_macro_array_lengths_t_delete_simple(data->parameters[i].values);
} // for
f_macro_fss_contents_t_delete_simple(data->contents);
f_macro_fss_objects_t_delete_simple(data->objects);
f_macro_string_dynamic_t_delete_simple(data->buffer);
- f_macro_string_lengths_t_delete_simple(data->remaining);
+ f_macro_array_lengths_t_delete_simple(data->remaining);
f_macro_color_context_t_delete_simple(data->context);
typedef struct {
f_console_parameter_t parameters[fss_basic_list_read_total_parameters];
- f_string_lengths_t remaining;
+ f_array_lengths_t remaining;
bool process_pipe;
f_file_t output;
f_string_quantity_t quantity;
uint8_t delimit_mode;
- f_string_length_t delimit_depth;
+ f_array_length_t delimit_depth;
f_color_context_t context;
} fss_basic_list_read_data_t;
#define fss_basic_list_read_data_t_initialize \
{ \
fss_basic_list_read_console_parameter_t_initialize, \
- f_string_lengths_t_initialize, \
+ f_array_lengths_t_initialize, \
F_false, \
f_macro_file_t_initialize2(f_type_output, f_type_descriptor_output, f_file_flag_write_only), \
fll_error_print_t_initialize, \
if (status_code == F_memory_not) {
fl_color_print(data.error.to.stream, data.context.set.error, "%sUnable to allocate memory.%c", fll_error_print_error, f_string_eol_s[0]);
}
- else if (status_code == f_string_length_t_size) {
+ else if (status_code == f_array_length_t_size) {
fl_color_print(data.error.to.stream, data.context.set.error, "%sUnable to process '", fll_error_print_error);
fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_list_read_long_trim);
fl_color_print(data.error.to.stream, data.context.set.error, "' because the maximum buffer size was reached.%c", f_string_eol_s[0]);
f_status_t fss_basic_list_read_main_process_file(const f_console_arguments_t arguments, fss_basic_list_read_data_t *data, const f_string_t filename, const fss_basic_list_read_depths_t depths, f_fss_delimits_t *delimits, f_fss_comments_t *comments) {
f_status_t status = F_none;
- const f_string_lengths_t except_none = f_string_lengths_t_initialize;
+ const f_array_lengths_t except_none = f_array_lengths_t_initialize;
bool delimited = F_true;
// for this standard, delimits would always be applied, except for when delimit_depth is greater than 0.
return F_none;
}
- f_status_t (*print_object)(FILE *, const f_string_static_t, const f_string_range_t, const f_string_lengths_t) = &f_print_except_dynamic_partial;
+ f_status_t (*print_object)(FILE *, const f_string_static_t, const f_string_range_t, const f_array_lengths_t) = &f_print_except_dynamic_partial;
if (data->parameters[fss_basic_list_read_parameter_trim].result == f_console_result_found) {
print_object = &fl_print_trim_except_dynamic_partial;
*/
#ifndef _di_fss_basic_list_read_depth_t_
typedef struct {
- f_string_length_t depth;
+ f_array_length_t depth;
f_array_length_t index_at;
f_array_length_t index_name;
status = F_status_set_error(F_parameter);
}
else {
- const f_string_length_t location = data->parameters[fss_basic_list_write_parameter_file].values.array[0];
+ const f_array_length_t location = data->parameters[fss_basic_list_write_parameter_file].values.array[0];
output.id = -1;
output.stream = 0;
status = F_status_set_error(F_parameter);
}
else if (data->parameters[fss_basic_list_write_parameter_prepend].result == f_console_result_additional) {
- const f_string_length_t index = data->parameters[fss_basic_list_write_parameter_prepend].values.array[data->parameters[fss_basic_list_write_parameter_prepend].values.used - 1];
- const f_string_length_t length = strnlen(arguments.argv[index], f_console_length_size);
+ const f_array_length_t index = data->parameters[fss_basic_list_write_parameter_prepend].values.array[data->parameters[fss_basic_list_write_parameter_prepend].values.used - 1];
+ const f_array_length_t length = strnlen(arguments.argv[index], f_console_parameter_size);
if (length) {
f_string_range_t range = f_macro_string_range_t_initialize(length);
for (f_array_length_t i = 0; i < data->parameters[fss_basic_list_write_parameter_object].values.used; i++) {
object.string = arguments.argv[data->parameters[fss_basic_list_write_parameter_object].values.array[i]];
- object.used = strnlen(object.string, f_console_length_size);
+ object.used = strnlen(object.string, f_console_parameter_size);
object.size = object.used;
status = fss_basic_list_write_process(*data, output, quote, &object, 0, &buffer);
for (f_array_length_t i = 0; i < data->parameters[fss_basic_list_write_parameter_content].values.used; i++) {
content.string = arguments.argv[data->parameters[fss_basic_list_write_parameter_content].values.array[i]];
- content.used = strnlen(content.string, f_console_length_size);
+ content.used = strnlen(content.string, f_console_parameter_size);
content.size = content.used;
status = fss_basic_list_write_process(*data, output, quote, 0, &content, &buffer);
for (f_array_length_t i = 0; i < data->parameters[fss_basic_list_write_parameter_object].values.used; i++) {
object.string = arguments.argv[data->parameters[fss_basic_list_write_parameter_object].values.array[i]];
- object.used = strnlen(object.string, f_console_length_size);
+ object.used = strnlen(object.string, f_console_parameter_size);
object.size = object.used;
content.string = arguments.argv[data->parameters[fss_basic_list_write_parameter_content].values.array[i]];
- content.used = strnlen(content.string, f_console_length_size);
+ content.used = strnlen(content.string, f_console_parameter_size);
content.size = content.used;
status = fss_basic_list_write_process(*data, output, quote, &object, &content, &buffer);
#ifndef _di_fss_basic_list_write_delete_data_
f_status_t fss_basic_list_write_delete_data(fss_basic_list_write_data_t *data) {
- for (f_string_length_t i = 0; i < fss_basic_list_write_total_parameters; i++) {
- f_macro_string_lengths_t_delete_simple(data->parameters[i].locations);
- f_macro_string_lengths_t_delete_simple(data->parameters[i].locations_sub);
- f_macro_string_lengths_t_delete_simple(data->parameters[i].values);
+ for (f_array_length_t i = 0; i < fss_basic_list_write_total_parameters; i++) {
+ f_macro_array_lengths_t_delete_simple(data->parameters[i].locations);
+ f_macro_array_lengths_t_delete_simple(data->parameters[i].locations_sub);
+ f_macro_array_lengths_t_delete_simple(data->parameters[i].values);
} // for
- f_macro_string_lengths_t_delete_simple(data->remaining);
+ f_macro_array_lengths_t_delete_simple(data->remaining);
f_macro_color_context_t_delete_simple(data->context);
typedef struct {
f_console_parameter_t parameters[fss_basic_list_write_total_parameters];
- f_string_lengths_t remaining;
+ f_array_lengths_t remaining;
bool process_pipe;
f_file_t output;
#define fss_basic_list_write_data_t_initialize \
{ \
fss_basic_list_write_console_parameter_t_initialize, \
- f_string_lengths_t_initialize, \
+ f_array_lengths_t_initialize, \
F_false, \
f_macro_file_t_initialize2(f_type_output, f_type_descriptor_output, f_file_flag_write_only), \
fll_error_print_t_initialize, \
input.id = f_type_descriptor_input;
input.size_read = 2048;
- f_string_length_t total = 0;
- f_string_length_t previous = 0;
+ f_array_length_t total = 0;
+ f_array_length_t previous = 0;
f_string_range_t range = f_string_range_t_initialize;
f_string_dynamic_t block = f_string_dynamic_t_initialize;
status = F_status_set_error(F_parameter);
}
else if (data->parameters[fss_basic_read_parameter_delimit].result == f_console_result_additional) {
- const f_string_length_t location = data->parameters[fss_basic_read_parameter_delimit].values.array[0];
- f_string_length_t length = strnlen(arguments.argv[location], f_console_length_size);
+ const f_array_length_t location = data->parameters[fss_basic_read_parameter_delimit].values.array[0];
+ f_array_length_t length = strnlen(arguments.argv[location], f_console_parameter_size);
if (length == 0) {
fl_color_print(data->error.to.stream, data->context.set.error, "%sThe value for the parameter '", fll_error_print_error);
f_fss_delimits_t delimits = f_fss_delimits_t_initialize;
- f_string_length_t original_size = data->quantity.total;
+ f_array_length_t original_size = data->quantity.total;
if (F_status_is_error_not(status)) {
status = fss_basic_read_main_preprocess_depth(arguments, *data, &depths);
#ifndef _di_fss_basic_read_delete_data_
f_status_t fss_basic_read_delete_data(fss_basic_read_data_t *data) {
- for (f_string_length_t i = 0; i < fss_basic_read_total_parameters; i++) {
- f_macro_string_lengths_t_delete_simple(data->parameters[i].locations);
- f_macro_string_lengths_t_delete_simple(data->parameters[i].locations_sub);
- f_macro_string_lengths_t_delete_simple(data->parameters[i].values);
+ for (f_array_length_t i = 0; i < fss_basic_read_total_parameters; i++) {
+ f_macro_array_lengths_t_delete_simple(data->parameters[i].locations);
+ f_macro_array_lengths_t_delete_simple(data->parameters[i].locations_sub);
+ f_macro_array_lengths_t_delete_simple(data->parameters[i].values);
} // for
f_macro_fss_contents_t_delete_simple(data->contents);
f_macro_fss_objects_t_delete_simple(data->objects);
f_macro_string_dynamic_t_delete_simple(data->buffer);
- f_macro_string_lengths_t_delete_simple(data->remaining);
+ f_macro_array_lengths_t_delete_simple(data->remaining);
f_macro_color_context_t_delete_simple(data->context);
typedef struct {
f_console_parameter_t parameters[fss_basic_read_total_parameters];
- f_string_lengths_t remaining;
+ f_array_lengths_t remaining;
bool process_pipe;
f_file_t output;
f_string_quantity_t quantity;
uint8_t delimit_mode;
- f_string_length_t delimit_depth;
+ f_array_length_t delimit_depth;
f_color_context_t context;
} fss_basic_read_data_t;
#define fss_basic_read_data_t_initialize \
{ \
fss_basic_read_console_parameter_t_initialize, \
- f_string_lengths_t_initialize, \
+ f_array_lengths_t_initialize, \
F_false, \
f_macro_file_t_initialize2(f_type_output, f_type_descriptor_output, f_file_flag_write_only), \
fll_error_print_t_initialize, \
if (status_code == F_memory_not) {
fl_color_print(data.error.to.stream, data.context.set.error, "%sUnable to allocate memory.%c", fll_error_print_error, f_string_eol_s[0]);
}
- else if (status_code == f_string_length_t_size) {
+ else if (status_code == f_array_length_t_size) {
fl_color_print(data.error.to.stream, data.context.set.error, "%sUnable to process '", fll_error_print_error);
fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_basic_read_long_trim);
fl_color_print(data.error.to.stream, data.context.set.error, "' because the maximum buffer size was reached.%c", f_string_eol_s[0]);
f_status_t fss_basic_read_main_process_file(const f_console_arguments_t arguments, fss_basic_read_data_t *data, const f_string_t filename, const fss_basic_read_depths_t depths, f_fss_delimits_t *delimits) {
f_status_t status = F_none;
- const f_string_lengths_t except_none = f_string_lengths_t_initialize;
+ const f_array_lengths_t except_none = f_array_lengths_t_initialize;
bool delimited = F_true;
// for this standard, delimits would always be applied, except for when delimit_depth is greater than 0.
f_number_unsigned_t select = 0;
if (data->parameters[fss_basic_read_parameter_select].result == f_console_result_additional) {
- const f_string_length_t index = data->parameters[fss_basic_read_parameter_select].values.array[data->parameters[fss_basic_read_parameter_select].values.used - 1];
+ const f_array_length_t index = data->parameters[fss_basic_read_parameter_select].values.array[data->parameters[fss_basic_read_parameter_select].values.used - 1];
const f_string_range_t range = f_macro_string_range_t_initialize(strlen(arguments.argv[index]));
status = fl_conversion_string_to_number_unsigned(arguments.argv[index], &select, range);
return F_none;
}
- f_status_t (*print_object)(FILE *, const f_string_static_t, const f_string_range_t, const f_string_lengths_t) = &f_print_except_dynamic_partial;
+ f_status_t (*print_object)(FILE *, const f_string_static_t, const f_string_range_t, const f_array_lengths_t) = &f_print_except_dynamic_partial;
if (data->parameters[fss_basic_read_parameter_trim].result == f_console_result_found) {
print_object = &fl_print_trim_except_dynamic_partial;
}
if (data->parameters[fss_basic_read_parameter_total].result == f_console_result_found) {
- f_string_length_t total = 0;
+ f_array_length_t total = 0;
for (i = 0; i < data->objects.used; i++) {
if (!names[i]) continue;
*/
#ifndef _di_fss_basic_read_depth_t_
typedef struct {
- f_string_length_t depth;
+ f_array_length_t depth;
f_array_length_t index_at;
f_array_length_t index_name;
status = F_status_set_error(F_parameter);
}
else {
- const f_string_length_t location = data->parameters[fss_basic_write_parameter_file].values.array[0];
+ const f_array_length_t location = data->parameters[fss_basic_write_parameter_file].values.array[0];
output.id = -1;
output.stream = 0;
status = F_status_set_error(F_parameter);
}
else if (data->parameters[fss_basic_write_parameter_prepend].result == f_console_result_additional) {
- const f_string_length_t index = data->parameters[fss_basic_write_parameter_prepend].values.array[data->parameters[fss_basic_write_parameter_prepend].values.used - 1];
- const f_string_length_t length = strnlen(arguments.argv[index], f_console_length_size);
+ const f_array_length_t index = data->parameters[fss_basic_write_parameter_prepend].values.array[data->parameters[fss_basic_write_parameter_prepend].values.used - 1];
+ const f_array_length_t length = strnlen(arguments.argv[index], f_console_parameter_size);
// Even though this standard does not utilize this parameter, provide the validation for consistency.
if (length) {
for (f_array_length_t i = 0; i < data->parameters[fss_basic_write_parameter_object].values.used; i++) {
object.string = arguments.argv[data->parameters[fss_basic_write_parameter_object].values.array[i]];
- object.used = strnlen(object.string, f_console_length_size);
+ object.used = strnlen(object.string, f_console_parameter_size);
object.size = object.used;
status = fss_basic_write_process(*data, output, quote, &object, 0, &buffer);
for (f_array_length_t i = 0; i < data->parameters[fss_basic_write_parameter_content].values.used; i++) {
content.string = arguments.argv[data->parameters[fss_basic_write_parameter_content].values.array[i]];
- content.used = strnlen(content.string, f_console_length_size);
+ content.used = strnlen(content.string, f_console_parameter_size);
content.size = content.used;
status = fss_basic_write_process(*data, output, quote, 0, &content, &buffer);
for (f_array_length_t i = 0; i < data->parameters[fss_basic_write_parameter_object].values.used; i++) {
object.string = arguments.argv[data->parameters[fss_basic_write_parameter_object].values.array[i]];
- object.used = strnlen(object.string, f_console_length_size);
+ object.used = strnlen(object.string, f_console_parameter_size);
object.size = object.used;
content.string = arguments.argv[data->parameters[fss_basic_write_parameter_content].values.array[i]];
- content.used = strnlen(content.string, f_console_length_size);
+ content.used = strnlen(content.string, f_console_parameter_size);
content.size = content.used;
status = fss_basic_write_process(*data, output, quote, &object, &content, &buffer);
#ifndef _di_fss_basic_write_delete_data_
f_status_t fss_basic_write_delete_data(fss_basic_write_data_t *data) {
- for (f_string_length_t i = 0; i < fss_basic_write_total_parameters; i++) {
- f_macro_string_lengths_t_delete_simple(data->parameters[i].locations);
- f_macro_string_lengths_t_delete_simple(data->parameters[i].locations_sub);
- f_macro_string_lengths_t_delete_simple(data->parameters[i].values);
+ for (f_array_length_t i = 0; i < fss_basic_write_total_parameters; i++) {
+ f_macro_array_lengths_t_delete_simple(data->parameters[i].locations);
+ f_macro_array_lengths_t_delete_simple(data->parameters[i].locations_sub);
+ f_macro_array_lengths_t_delete_simple(data->parameters[i].values);
} // for
- f_macro_string_lengths_t_delete_simple(data->remaining);
+ f_macro_array_lengths_t_delete_simple(data->remaining);
f_macro_color_context_t_delete_simple(data->context);
typedef struct {
f_console_parameter_t parameters[fss_basic_write_total_parameters];
- f_string_lengths_t remaining;
+ f_array_lengths_t remaining;
bool process_pipe;
f_file_t output;
#define fss_basic_write_data_t_initialize \
{ \
fss_basic_write_console_parameter_t_initialize, \
- f_string_lengths_t_initialize, \
+ f_array_lengths_t_initialize, \
F_false, \
f_macro_file_t_initialize2(f_type_output, f_type_descriptor_output, f_file_flag_write_only), \
fll_error_print_t_initialize, \
input.id = f_type_descriptor_input;
input.size_read = 2048;
- f_string_length_t total = 0;
- f_string_length_t previous = 0;
+ f_array_length_t total = 0;
+ f_array_length_t previous = 0;
f_string_range_t range = f_string_range_t_initialize;
f_string_dynamic_t block = f_string_dynamic_t_initialize;
status = F_status_set_error(F_parameter);
}
else if (data->parameters[fss_embedded_list_read_parameter_delimit].result == f_console_result_additional) {
- const f_string_length_t location = data->parameters[fss_embedded_list_read_parameter_delimit].values.array[0];
- f_string_length_t length = strnlen(arguments.argv[location], f_console_length_size);
+ const f_array_length_t location = data->parameters[fss_embedded_list_read_parameter_delimit].values.array[0];
+ f_array_length_t length = strnlen(arguments.argv[location], f_console_parameter_size);
if (length == 0) {
fl_color_print(data->error.to.stream, data->context.set.error, "%sThe value for the parameter '", fll_error_print_error);
f_fss_delimits_t contents_delimits = f_fss_delimits_t_initialize;
f_fss_comments_t comments = f_fss_comments_t_initialize;
- f_string_length_t original_size = data->quantity.total;
+ f_array_length_t original_size = data->quantity.total;
if (F_status_is_error_not(status)) {
status = fss_embedded_list_read_main_preprocess_depth(arguments, *data, &depths);
#ifndef _di_fss_embedded_list_read_delete_data_
f_status_t fss_embedded_list_read_delete_data(fss_embedded_list_read_data_t *data) {
- for (f_string_length_t i = 0; i < fss_embedded_list_read_total_parameters; i++) {
- f_macro_string_lengths_t_delete_simple(data->parameters[i].locations);
- f_macro_string_lengths_t_delete_simple(data->parameters[i].locations_sub);
- f_macro_string_lengths_t_delete_simple(data->parameters[i].values);
+ for (f_array_length_t i = 0; i < fss_embedded_list_read_total_parameters; i++) {
+ f_macro_array_lengths_t_delete_simple(data->parameters[i].locations);
+ f_macro_array_lengths_t_delete_simple(data->parameters[i].locations_sub);
+ f_macro_array_lengths_t_delete_simple(data->parameters[i].values);
} // for
f_macro_fss_nest_t_delete_simple(data->nest);
f_macro_string_dynamic_t_delete_simple(data->buffer);
- f_macro_string_lengths_t_delete_simple(data->remaining);
+ f_macro_array_lengths_t_delete_simple(data->remaining);
f_macro_color_context_t_delete_simple(data->context);
typedef struct {
f_console_parameter_t parameters[fss_embedded_list_read_total_parameters];
- f_string_lengths_t remaining;
+ f_array_lengths_t remaining;
bool process_pipe;
f_file_t output;
f_string_quantity_t quantity;
uint8_t delimit_mode;
- f_string_length_t delimit_depth;
+ f_array_length_t delimit_depth;
f_color_context_t context;
} fss_embedded_list_read_data_t;
#define fss_embedded_list_read_data_t_initialize \
{ \
fss_embedded_list_read_console_parameter_t_initialize, \
- f_string_lengths_t_initialize, \
+ f_array_lengths_t_initialize, \
F_false, \
f_macro_file_t_initialize2(f_type_output, f_type_descriptor_output, f_file_flag_write_only), \
fll_error_print_t_initialize, \
depths->array[depths->used].value_name.used = 0;
if (data.parameters[fss_embedded_list_read_parameter_trim].result == f_console_result_found) {
- status = fl_string_rip(arguments.argv[values_order[i]], strnlen(arguments.argv[values_order[i]], f_console_length_size), &depths->array[depths->used].value_name);
+ status = fl_string_rip(arguments.argv[values_order[i]], strnlen(arguments.argv[values_order[i]], f_console_parameter_size), &depths->array[depths->used].value_name);
if (F_status_is_error(status)) {
fll_error_print(data.error, F_status_set_fine(status), "fl_string_rip", F_true);
}
}
else {
- status = f_string_append(arguments.argv[values_order[i]], strnlen(arguments.argv[values_order[i]], f_console_length_size), &depths->array[depths->used].value_name);
+ status = f_string_append(arguments.argv[values_order[i]], strnlen(arguments.argv[values_order[i]], f_console_parameter_size), &depths->array[depths->used].value_name);
if (F_status_is_error(status)) {
fll_error_print(data.error, F_status_set_fine(status), "f_string_append", F_true);
f_number_unsigned_t select = 0;
if (data->parameters[fss_embedded_list_read_parameter_select].result == f_console_result_additional) {
- const f_string_length_t index = data->parameters[fss_embedded_list_read_parameter_select].values.array[data->parameters[fss_embedded_list_read_parameter_select].values.used - 1];
+ const f_array_length_t index = data->parameters[fss_embedded_list_read_parameter_select].values.array[data->parameters[fss_embedded_list_read_parameter_select].values.used - 1];
const f_string_range_t range = f_macro_string_range_t_initialize(strlen(arguments.argv[index]));
status = fl_conversion_string_to_number_unsigned(arguments.argv[index], &select, range);
}
if (depths.array[depths_index].index_name || depths.array[depths_index].index_at) {
- const f_string_lengths_t except_none = f_string_lengths_t_initialize;
+ const f_array_lengths_t except_none = f_array_lengths_t_initialize;
f_array_length_t i = 0;
f_array_length_t j = 0;
return F_none;
}
- f_status_t (*print_object)(FILE *, const f_string_static_t, const f_string_range_t, const f_string_lengths_t) = &f_print_except_dynamic_partial;
+ f_status_t (*print_object)(FILE *, const f_string_static_t, const f_string_range_t, const f_array_lengths_t) = &f_print_except_dynamic_partial;
if (data->parameters[fss_embedded_list_read_parameter_trim].result == f_console_result_found) {
print_object = &fl_print_trim_except_dynamic_partial;
}
}
- const f_string_length_t original_objects_used = objects_delimits->used;
- const f_string_length_t original_contents_used = contents_delimits->used;
+ const f_array_length_t original_objects_used = objects_delimits->used;
+ const f_array_length_t original_contents_used = contents_delimits->used;
- f_string_length_t original_objects_delimits[original_objects_used];
- f_string_length_t original_contents_delimits[original_contents_used];
+ f_array_length_t original_objects_delimits[original_objects_used];
+ f_array_length_t original_contents_delimits[original_contents_used];
- memcpy(&original_objects_delimits, objects_delimits->array, original_objects_used * sizeof(f_string_length_t));
- memcpy(&original_contents_delimits, contents_delimits->array, original_contents_used * sizeof(f_string_length_t));
+ memcpy(&original_objects_delimits, objects_delimits->array, original_objects_used * sizeof(f_array_length_t));
+ memcpy(&original_contents_delimits, contents_delimits->array, original_contents_used * sizeof(f_array_length_t));
objects_delimits->used = 0;
contents_delimits->used = 0;
#endif // _di_fss_embedded_list_read_process_delimits_
#ifndef _di_fss_embedded_list_read_process_delimits_contents_
- void fss_embedded_list_read_process_delimits_contents(const fss_embedded_list_read_data_t data, const f_string_length_t depth, const f_string_length_t original_delimits[], const f_string_length_t original_used, f_fss_delimits_t *delimits) {
+ void fss_embedded_list_read_process_delimits_contents(const fss_embedded_list_read_data_t data, const f_array_length_t depth, const f_array_length_t original_delimits[], const f_array_length_t original_used, f_fss_delimits_t *delimits) {
if (!original_used) return;
#endif // _di_fss_embedded_list_read_process_delimits_contents_
#ifndef _di_fss_embedded_list_read_process_delimits_objects_
- void fss_embedded_list_read_process_delimits_objects(const fss_embedded_list_read_data_t data, const f_string_length_t depth, const f_string_length_t original_delimits[], const f_string_length_t original_used, f_fss_delimits_t *delimits) {
+ void fss_embedded_list_read_process_delimits_objects(const fss_embedded_list_read_data_t data, const f_array_length_t depth, const f_array_length_t original_delimits[], const f_array_length_t original_used, f_fss_delimits_t *delimits) {
if (!original_used) return;
#endif // _di_fss_embedded_list_read_process_delimits_objects_
#ifndef _di_fss_embedded_list_read_process_delimits_within_greater_
- f_status_t fss_embedded_list_read_process_delimits_within_greater(const fss_embedded_list_read_data_t data, const f_string_length_t depth, const f_string_length_t location) {
+ f_status_t fss_embedded_list_read_process_delimits_within_greater(const fss_embedded_list_read_data_t data, const f_array_length_t depth, const f_array_length_t location) {
if (depth + 1 >= data.nest.used) return F_false;
f_fss_items_t *items = 0;
- f_string_length_t i = 0;
- f_string_length_t j = 0;
+ f_array_length_t i = 0;
+ f_array_length_t j = 0;
- for (f_string_length_t d = depth + 1; d < data.nest.used; ++d) {
+ for (f_array_length_t d = depth + 1; d < data.nest.used; ++d) {
items = &data.nest.depth[d];
for (i = 0; i < items->used; ++i) {
*/
#ifndef _di_fss_embedded_list_read_depth_t_
typedef struct {
- f_string_length_t depth;
+ f_array_length_t depth;
f_array_length_t index_at;
f_array_length_t index_name;
* @see fss_embedded_list_read_process_delimits()
*/
#ifndef _di_fss_embedded_list_read_process_delimits_contents_
- extern void fss_embedded_list_read_process_delimits_contents(const fss_embedded_list_read_data_t data, const f_string_length_t depth, const f_string_length_t original_delimits[], const f_string_length_t original_used, f_fss_delimits_t *delimits) f_gcc_attribute_visibility_internal;
+ extern void fss_embedded_list_read_process_delimits_contents(const fss_embedded_list_read_data_t data, const f_array_length_t depth, const f_array_length_t original_delimits[], const f_array_length_t original_used, f_fss_delimits_t *delimits) f_gcc_attribute_visibility_internal;
#endif // _di_fss_embedded_list_read_process_delimits_contents_
/**
* @see fss_embedded_list_read_process_delimits()
*/
#ifndef _di_fss_embedded_list_read_process_delimits_objects_
- extern void fss_embedded_list_read_process_delimits_objects(const fss_embedded_list_read_data_t data, const f_string_length_t depth, const f_string_length_t original_delimits[], const f_string_length_t original_used, f_fss_delimits_t *delimits) f_gcc_attribute_visibility_internal;
+ extern void fss_embedded_list_read_process_delimits_objects(const fss_embedded_list_read_data_t data, const f_array_length_t depth, const f_array_length_t original_delimits[], const f_array_length_t original_used, f_fss_delimits_t *delimits) f_gcc_attribute_visibility_internal;
#endif // _di_fss_embedded_list_read_process_delimits_objects_
/**
* @see fss_embedded_list_read_process_delimits_contents()
*/
#ifndef _di_fss_embedded_list_read_process_delimits_within_greater_
- extern f_status_t fss_embedded_list_read_process_delimits_within_greater(const fss_embedded_list_read_data_t data, const f_string_length_t depth, const f_string_length_t location) f_gcc_attribute_visibility_internal;
+ extern f_status_t fss_embedded_list_read_process_delimits_within_greater(const fss_embedded_list_read_data_t data, const f_array_length_t depth, const f_array_length_t location) f_gcc_attribute_visibility_internal;
#endif // _di_fss_embedded_list_read_process_delimits_within_greater_
#ifdef __cplusplus
status = F_status_set_error(F_parameter);
}
else {
- const f_string_length_t location = data->parameters[fss_embedded_list_write_parameter_file].values.array[0];
+ const f_array_length_t location = data->parameters[fss_embedded_list_write_parameter_file].values.array[0];
output.id = -1;
output.stream = 0;
status = F_status_set_error(F_parameter);
}
else if (data->parameters[fss_embedded_list_write_parameter_prepend].result == f_console_result_additional) {
- const f_string_length_t index = data->parameters[fss_embedded_list_write_parameter_prepend].values.array[data->parameters[fss_embedded_list_write_parameter_prepend].values.used - 1];
- const f_string_length_t length = strnlen(arguments.argv[index], f_console_length_size);
+ const f_array_length_t index = data->parameters[fss_embedded_list_write_parameter_prepend].values.array[data->parameters[fss_embedded_list_write_parameter_prepend].values.used - 1];
+ const f_array_length_t length = strnlen(arguments.argv[index], f_console_parameter_size);
if (length) {
f_string_range_t range = f_macro_string_range_t_initialize(length);
for (f_array_length_t i = 0; i < data->parameters[fss_embedded_list_write_parameter_object].values.used; i++) {
object.string = arguments.argv[data->parameters[fss_embedded_list_write_parameter_object].values.array[i]];
- object.used = strnlen(object.string, f_console_length_size);
+ object.used = strnlen(object.string, f_console_parameter_size);
object.size = object.used;
status = fss_embedded_list_write_process(*data, output, quote, &object, 0, 0, &buffer);
if (F_status_is_error(status)) break;
content.string = arguments.argv[data->parameters[fss_embedded_list_write_parameter_content].values.array[i]];
- content.used = strnlen(content.string, f_console_length_size);
+ content.used = strnlen(content.string, f_console_parameter_size);
content.size = content.used;
status = fss_embedded_list_write_process(*data, output, quote, 0, &content, &ignore, &buffer);
if (F_status_is_error(status)) break;
object.string = arguments.argv[data->parameters[fss_embedded_list_write_parameter_object].values.array[i]];
- object.used = strnlen(object.string, f_console_length_size);
+ object.used = strnlen(object.string, f_console_parameter_size);
object.size = object.used;
content.string = arguments.argv[data->parameters[fss_embedded_list_write_parameter_content].values.array[i]];
- content.used = strnlen(content.string, f_console_length_size);
+ content.used = strnlen(content.string, f_console_parameter_size);
content.size = content.used;
status = fss_embedded_list_write_process(*data, output, quote, &object, &content, &ignore, &buffer);
#ifndef _di_fss_embedded_list_write_delete_data_
f_status_t fss_embedded_list_write_delete_data(fss_embedded_list_write_data_t *data) {
- for (f_string_length_t i = 0; i < fss_embedded_list_write_total_parameters; i++) {
- f_macro_string_lengths_t_delete_simple(data->parameters[i].locations);
- f_macro_string_lengths_t_delete_simple(data->parameters[i].locations_sub);
- f_macro_string_lengths_t_delete_simple(data->parameters[i].values);
+ for (f_array_length_t i = 0; i < fss_embedded_list_write_total_parameters; i++) {
+ f_macro_array_lengths_t_delete_simple(data->parameters[i].locations);
+ f_macro_array_lengths_t_delete_simple(data->parameters[i].locations_sub);
+ f_macro_array_lengths_t_delete_simple(data->parameters[i].values);
} // for
- f_macro_string_lengths_t_delete_simple(data->remaining);
+ f_macro_array_lengths_t_delete_simple(data->remaining);
f_macro_color_context_t_delete_simple(data->context);
typedef struct {
f_console_parameter_t parameters[fss_embedded_list_write_total_parameters];
- f_string_lengths_t remaining;
+ f_array_lengths_t remaining;
bool process_pipe;
f_file_t output;
#define fss_embedded_list_write_data_t_initialize \
{ \
fss_embedded_list_write_console_parameter_t_initialize, \
- f_string_lengths_t_initialize, \
+ f_array_lengths_t_initialize, \
F_false, \
f_macro_file_t_initialize2(f_type_output, f_type_descriptor_output, f_file_flag_write_only), \
fll_error_print_t_initialize, \
input.id = f_type_descriptor_input;
input.size_read = 2048;
- f_string_length_t total = 0;
- f_string_length_t previous = 0;
+ f_array_length_t total = 0;
+ f_array_length_t previous = 0;
f_string_range_t range = f_string_range_t_initialize;
f_string_range_t range_ignore = f_string_range_t_initialize;
index = data.parameters[fss_embedded_list_write_parameter_ignore].values.array[i * 2];
range.start = 0;
- range.stop = strnlen(arguments.argv[index], f_console_length_size) - 1;
+ range.stop = strnlen(arguments.argv[index], f_console_parameter_size) - 1;
// allow and ignore the positive sign.
if (range.stop > 0 && arguments.argv[index][0] == '+') {
index = data.parameters[fss_embedded_list_write_parameter_ignore].values.array[(i * 2) + 1];
range.start = 0;
- range.stop = strnlen(arguments.argv[index], f_console_length_size) - 1;
+ range.stop = strnlen(arguments.argv[index], f_console_parameter_size) - 1;
// allow and ignore the positive sign.
if (range.stop > 0 && arguments.argv[index][0] == '+') {
status = F_status_set_error(F_parameter);
}
else if (data->parameters[fss_extended_list_read_parameter_delimit].result == f_console_result_additional) {
- const f_string_length_t location = data->parameters[fss_extended_list_read_parameter_delimit].values.array[0];
- f_string_length_t length = strnlen(arguments.argv[location], f_console_length_size);
+ const f_array_length_t location = data->parameters[fss_extended_list_read_parameter_delimit].values.array[0];
+ f_array_length_t length = strnlen(arguments.argv[location], f_console_parameter_size);
if (length == 0) {
fl_color_print(data->error.to.stream, data->context.set.error, "%sThe value for the parameter '", fll_error_print_error);
f_fss_delimits_t delimits = f_fss_delimits_t_initialize;
f_fss_comments_t comments = f_fss_comments_t_initialize;
- f_string_length_t original_size = data->quantity.total;
+ f_array_length_t original_size = data->quantity.total;
if (F_status_is_error_not(status)) {
status = fss_extended_list_read_main_preprocess_depth(arguments, *data, &depths);
#ifndef _di_fss_extended_list_read_delete_data_
f_status_t fss_extended_list_read_delete_data(fss_extended_list_read_data_t *data) {
- for (f_string_length_t i = 0; i < fss_extended_list_read_total_parameters; i++) {
- f_macro_string_lengths_t_delete_simple(data->parameters[i].locations);
- f_macro_string_lengths_t_delete_simple(data->parameters[i].locations_sub);
- f_macro_string_lengths_t_delete_simple(data->parameters[i].values);
+ for (f_array_length_t i = 0; i < fss_extended_list_read_total_parameters; i++) {
+ f_macro_array_lengths_t_delete_simple(data->parameters[i].locations);
+ f_macro_array_lengths_t_delete_simple(data->parameters[i].locations_sub);
+ f_macro_array_lengths_t_delete_simple(data->parameters[i].values);
} // for
f_macro_fss_contents_t_delete_simple(data->contents);
f_macro_fss_objects_t_delete_simple(data->objects);
f_macro_string_dynamic_t_delete_simple(data->buffer);
- f_macro_string_lengths_t_delete_simple(data->remaining);
+ f_macro_array_lengths_t_delete_simple(data->remaining);
f_macro_color_context_t_delete_simple(data->context);
typedef struct {
f_console_parameter_t parameters[fss_extended_list_read_total_parameters];
- f_string_lengths_t remaining;
+ f_array_lengths_t remaining;
bool process_pipe;
f_file_t output;
f_string_quantity_t quantity;
uint8_t delimit_mode;
- f_string_length_t delimit_depth;
+ f_array_length_t delimit_depth;
f_color_context_t context;
} fss_extended_list_read_data_t;
#define fss_extended_list_read_data_t_initialize \
{ \
fss_extended_list_read_console_parameter_t_initialize, \
- f_string_lengths_t_initialize, \
+ f_array_lengths_t_initialize, \
F_false, \
f_macro_file_t_initialize2(f_type_output, f_type_descriptor_output, f_file_flag_write_only), \
fll_error_print_t_initialize, \
if (status_code == F_memory_not) {
fl_color_print(data.error.to.stream, data.context.set.error, "%sUnable to allocate memory.%c", fll_error_print_error, f_string_eol_s[0]);
}
- else if (status_code == f_string_length_t_size) {
+ else if (status_code == f_array_length_t_size) {
fl_color_print(data.error.to.stream, data.context.set.error, "%sUnable to process '", fll_error_print_error);
fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_list_read_long_trim);
fl_color_print(data.error.to.stream, data.context.set.error, "' because the maximum buffer size was reached.%c", f_string_eol_s[0]);
f_status_t fss_extended_list_read_main_process_file(const f_console_arguments_t arguments, fss_extended_list_read_data_t *data, const f_string_t filename, const fss_extended_list_read_depths_t depths, f_fss_delimits_t *delimits, f_fss_comments_t *comments) {
f_status_t status = F_none;
- const f_string_lengths_t except_none = f_string_lengths_t_initialize;
+ const f_array_lengths_t except_none = f_array_lengths_t_initialize;
bool delimited = F_true;
// for this standard, delimits would always be applied, except for when delimit_depth is greater than 0.
return F_none;
}
- f_status_t (*print_object)(FILE *, const f_string_static_t, const f_string_range_t, const f_string_lengths_t) = &f_print_except_dynamic_partial;
+ f_status_t (*print_object)(FILE *, const f_string_static_t, const f_string_range_t, const f_array_lengths_t) = &f_print_except_dynamic_partial;
if (data->parameters[fss_extended_list_read_parameter_trim].result == f_console_result_found) {
print_object = &fl_print_trim_except_dynamic_partial;
*/
#ifndef _di_fss_extended_list_read_depth_t_
typedef struct {
- f_string_length_t depth;
+ f_array_length_t depth;
f_array_length_t index_at;
f_array_length_t index_name;
status = F_status_set_error(F_parameter);
}
else {
- const f_string_length_t location = data->parameters[fss_extended_list_write_parameter_file].values.array[0];
+ const f_array_length_t location = data->parameters[fss_extended_list_write_parameter_file].values.array[0];
output.id = -1;
output.stream = 0;
status = F_status_set_error(F_parameter);
}
else if (data->parameters[fss_extended_list_write_parameter_prepend].result == f_console_result_additional) {
- const f_string_length_t index = data->parameters[fss_extended_list_write_parameter_prepend].values.array[data->parameters[fss_extended_list_write_parameter_prepend].values.used - 1];
- const f_string_length_t length = strnlen(arguments.argv[index], f_console_length_size);
+ const f_array_length_t index = data->parameters[fss_extended_list_write_parameter_prepend].values.array[data->parameters[fss_extended_list_write_parameter_prepend].values.used - 1];
+ const f_array_length_t length = strnlen(arguments.argv[index], f_console_parameter_size);
if (length) {
f_string_range_t range = f_macro_string_range_t_initialize(length);
for (f_array_length_t i = 0; i < data->parameters[fss_extended_list_write_parameter_object].values.used; i++) {
object.string = arguments.argv[data->parameters[fss_extended_list_write_parameter_object].values.array[i]];
- object.used = strnlen(object.string, f_console_length_size);
+ object.used = strnlen(object.string, f_console_parameter_size);
object.size = object.used;
status = fss_extended_list_write_process(*data, output, quote, &object, 0, 0, &buffer);
if (F_status_is_error(status)) break;
content.string = arguments.argv[data->parameters[fss_extended_list_write_parameter_content].values.array[i]];
- content.used = strnlen(content.string, f_console_length_size);
+ content.used = strnlen(content.string, f_console_parameter_size);
content.size = content.used;
status = fss_extended_list_write_process(*data, output, quote, 0, &content, &ignore, &buffer);
if (F_status_is_error(status)) break;
object.string = arguments.argv[data->parameters[fss_extended_list_write_parameter_object].values.array[i]];
- object.used = strnlen(object.string, f_console_length_size);
+ object.used = strnlen(object.string, f_console_parameter_size);
object.size = object.used;
content.string = arguments.argv[data->parameters[fss_extended_list_write_parameter_content].values.array[i]];
- content.used = strnlen(content.string, f_console_length_size);
+ content.used = strnlen(content.string, f_console_parameter_size);
content.size = content.used;
status = fss_extended_list_write_process(*data, output, quote, &object, &content, &ignore, &buffer);
#ifndef _di_fss_extended_list_write_delete_data_
f_status_t fss_extended_list_write_delete_data(fss_extended_list_write_data_t *data) {
- for (f_string_length_t i = 0; i < fss_extended_list_write_total_parameters; i++) {
- f_macro_string_lengths_t_delete_simple(data->parameters[i].locations);
- f_macro_string_lengths_t_delete_simple(data->parameters[i].locations_sub);
- f_macro_string_lengths_t_delete_simple(data->parameters[i].values);
+ for (f_array_length_t i = 0; i < fss_extended_list_write_total_parameters; i++) {
+ f_macro_array_lengths_t_delete_simple(data->parameters[i].locations);
+ f_macro_array_lengths_t_delete_simple(data->parameters[i].locations_sub);
+ f_macro_array_lengths_t_delete_simple(data->parameters[i].values);
} // for
- f_macro_string_lengths_t_delete_simple(data->remaining);
+ f_macro_array_lengths_t_delete_simple(data->remaining);
f_macro_color_context_t_delete_simple(data->context);
typedef struct {
f_console_parameter_t parameters[fss_extended_list_write_total_parameters];
- f_string_lengths_t remaining;
+ f_array_lengths_t remaining;
bool process_pipe;
f_file_t output;
#define fss_extended_list_write_data_t_initialize \
{ \
fss_extended_list_write_console_parameter_t_initialize, \
- f_string_lengths_t_initialize, \
+ f_array_lengths_t_initialize, \
F_false, \
f_macro_file_t_initialize2(f_type_output, f_type_descriptor_output, f_file_flag_write_only), \
fll_error_print_t_initialize, \
input.id = f_type_descriptor_input;
input.size_read = 2048;
- f_string_length_t total = 0;
- f_string_length_t previous = 0;
+ f_array_length_t total = 0;
+ f_array_length_t previous = 0;
f_string_range_t range = f_string_range_t_initialize;
f_string_range_t range_ignore = f_string_range_t_initialize;
index = data.parameters[fss_extended_list_write_parameter_ignore].values.array[i * 2];
range.start = 0;
- range.stop = strnlen(arguments.argv[index], f_console_length_size) - 1;
+ range.stop = strnlen(arguments.argv[index], f_console_parameter_size) - 1;
// allow and ignore the positive sign.
if (range.stop > 0 && arguments.argv[index][0] == '+') {
index = data.parameters[fss_extended_list_write_parameter_ignore].values.array[(i * 2) + 1];
range.start = 0;
- range.stop = strnlen(arguments.argv[index], f_console_length_size) - 1;
+ range.stop = strnlen(arguments.argv[index], f_console_parameter_size) - 1;
// allow and ignore the positive sign.
if (range.stop > 0 && arguments.argv[index][0] == '+') {
status = F_status_set_error(F_parameter);
}
else if (data->parameters[fss_extended_read_parameter_delimit].result == f_console_result_additional) {
- const f_string_length_t location = data->parameters[fss_extended_read_parameter_delimit].values.array[0];
- f_string_length_t length = strnlen(arguments.argv[location], f_console_length_size);
+ const f_array_length_t location = data->parameters[fss_extended_read_parameter_delimit].values.array[0];
+ f_array_length_t length = strnlen(arguments.argv[location], f_console_parameter_size);
if (length == 0) {
fl_color_print(data->error.to.stream, data->context.set.error, "%sThe value for the parameter '", fll_error_print_error);
f_fss_delimits_t objects_delimits = f_fss_delimits_t_initialize;
f_fss_delimits_t contents_delimits = f_fss_delimits_t_initialize;
- f_string_length_t original_size = data->quantity.total;
+ f_array_length_t original_size = data->quantity.total;
if (F_status_is_error_not(status)) {
status = fss_extended_read_main_preprocess_depth(arguments, *data, &depths);
#ifndef _di_fss_extended_read_delete_data_
f_status_t fss_extended_read_delete_data(fss_extended_read_data_t *data) {
- for (f_string_length_t i = 0; i < fss_extended_read_total_parameters; i++) {
- f_macro_string_lengths_t_delete_simple(data->parameters[i].locations);
- f_macro_string_lengths_t_delete_simple(data->parameters[i].locations_sub);
- f_macro_string_lengths_t_delete_simple(data->parameters[i].values);
+ for (f_array_length_t i = 0; i < fss_extended_read_total_parameters; i++) {
+ f_macro_array_lengths_t_delete_simple(data->parameters[i].locations);
+ f_macro_array_lengths_t_delete_simple(data->parameters[i].locations_sub);
+ f_macro_array_lengths_t_delete_simple(data->parameters[i].values);
} // for
f_macro_fss_contents_t_delete_simple(data->contents);
f_macro_fss_objects_t_delete_simple(data->objects);
f_macro_string_dynamic_t_delete_simple(data->buffer);
- f_macro_string_lengths_t_delete_simple(data->remaining);
+ f_macro_array_lengths_t_delete_simple(data->remaining);
f_macro_color_context_t_delete_simple(data->context);
typedef struct {
f_console_parameter_t parameters[fss_extended_read_total_parameters];
- f_string_lengths_t remaining;
+ f_array_lengths_t remaining;
bool process_pipe;
f_file_t output;
f_string_quantity_t quantity;
uint8_t delimit_mode;
- f_string_length_t delimit_depth;
+ f_array_length_t delimit_depth;
f_color_context_t context;
} fss_extended_read_data_t;
#define fss_extended_read_data_t_initialize \
{ \
fss_extended_read_console_parameter_t_initialize, \
- f_string_lengths_t_initialize, \
+ f_array_lengths_t_initialize, \
F_false, \
f_macro_file_t_initialize2(f_type_output, f_type_descriptor_output, f_file_flag_write_only), \
fll_error_print_t_initialize, \
#endif
#ifndef _di_fss_extended_read_is_delimited_at_depth_
- f_status_t fss_extended_read_is_delimited_at_depth(const fss_extended_read_data_t data, const f_string_length_t depth) {
+ f_status_t fss_extended_read_is_delimited_at_depth(const fss_extended_read_data_t data, const f_array_length_t depth) {
if (data.delimit_mode == fss_extended_read_delimit_mode_none) {
return F_false;
if (status_code == F_memory_not) {
fl_color_print(data.error.to.stream, data.context.set.error, "%sUnable to allocate memory.%c", fll_error_print_error, f_string_eol_s[0]);
}
- else if (status_code == f_string_length_t_size) {
+ else if (status_code == f_array_length_t_size) {
fl_color_print(data.error.to.stream, data.context.set.error, "%sUnable to process '", fll_error_print_error);
fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable_s, fss_extended_read_long_trim);
fl_color_print(data.error.to.stream, data.context.set.error, "' because the maximum buffer size was reached.%c", f_string_eol_s[0]);
f_status_t fss_extended_read_main_process_file(const f_console_arguments_t arguments, fss_extended_read_data_t *data, const f_string_t filename, const fss_extended_read_depths_t depths, f_fss_delimits_t *objects_delimits, f_fss_delimits_t *contents_delimits) {
f_status_t status = F_none;
- const f_string_lengths_t except_none = f_string_lengths_t_initialize;
+ const f_array_lengths_t except_none = f_array_lengths_t_initialize;
bool object_delimited = F_true;
bool content_delimited = F_true;
return F_none;
}
- f_status_t (*print_object)(FILE *, const f_string_static_t, const f_string_range_t, const f_string_lengths_t) = &f_print_except_dynamic_partial;
+ f_status_t (*print_object)(FILE *, const f_string_static_t, const f_string_range_t, const f_array_lengths_t) = &f_print_except_dynamic_partial;
if (data->parameters[fss_extended_read_parameter_trim].result == f_console_result_found) {
print_object = &fl_print_trim_except_dynamic_partial;
*/
#ifndef _di_fss_extended_read_depth_t_
typedef struct {
- f_string_length_t depth;
+ f_array_length_t depth;
f_array_length_t index_at;
f_array_length_t index_name;
* F_false if not delimited.
*/
#ifndef _di_fss_extended_read_is_delimited_at_depth_
- extern f_status_t fss_extended_read_is_delimited_at_depth(const fss_extended_read_data_t data, const f_string_length_t depth) f_gcc_attribute_visibility_internal;
+ extern f_status_t fss_extended_read_is_delimited_at_depth(const fss_extended_read_data_t data, const f_array_length_t depth) f_gcc_attribute_visibility_internal;
#endif // _di_fss_extended_read_is_delimited_at_depth_
/**
status = F_status_set_error(F_parameter);
}
else {
- const f_string_length_t location = data->parameters[fss_extended_write_parameter_file].values.array[0];
+ const f_array_length_t location = data->parameters[fss_extended_write_parameter_file].values.array[0];
output.id = -1;
output.stream = 0;
status = F_status_set_error(F_parameter);
}
else if (data->parameters[fss_extended_write_parameter_prepend].result == f_console_result_additional) {
- const f_string_length_t index = data->parameters[fss_extended_write_parameter_prepend].values.array[data->parameters[fss_extended_write_parameter_prepend].values.used - 1];
- const f_string_length_t length = strnlen(arguments.argv[index], f_console_length_size);
+ const f_array_length_t index = data->parameters[fss_extended_write_parameter_prepend].values.array[data->parameters[fss_extended_write_parameter_prepend].values.used - 1];
+ const f_array_length_t length = strnlen(arguments.argv[index], f_console_parameter_size);
// Even though this standard does not utilize this parameter, provide the validation for consistency.
if (length) {
for (f_array_length_t i = 0; i < data->parameters[fss_extended_write_parameter_object].values.used; i++) {
object.string = arguments.argv[data->parameters[fss_extended_write_parameter_object].values.array[i]];
- object.used = strnlen(object.string, f_console_length_size);
+ object.used = strnlen(object.string, f_console_parameter_size);
object.size = object.used;
status = fss_extended_write_process(*data, output, quote, &object, 0, &buffer);
for (; i < data->parameters[fss_extended_write_parameter_content].values.used; i++) {
contents.array[contents.used].string = arguments.argv[data->parameters[fss_extended_write_parameter_content].values.array[i]];
- contents.array[contents.used].used = strnlen(contents.array[contents.used].string, f_console_length_size);
+ contents.array[contents.used].used = strnlen(contents.array[contents.used].string, f_console_parameter_size);
contents.array[contents.used].size = contents.array[contents.used].used;
contents.used++;
} // for
}
object.string = arguments.argv[data->parameters[fss_extended_write_parameter_object].values.array[i]];
- object.used = strnlen(object.string, f_console_length_size);
+ object.used = strnlen(object.string, f_console_parameter_size);
object.size = object.used;
contents.used = 0;
contents.array[contents.used].used = 0;
}
- status = f_string_append(arguments.argv[data->parameters[fss_extended_write_parameter_content].values.array[j]], strnlen(arguments.argv[data->parameters[fss_extended_write_parameter_content].values.array[j]], f_console_length_size), &contents.array[contents.used]);
+ status = f_string_append(arguments.argv[data->parameters[fss_extended_write_parameter_content].values.array[j]], strnlen(arguments.argv[data->parameters[fss_extended_write_parameter_content].values.array[j]], f_console_parameter_size), &contents.array[contents.used]);
if (F_status_is_error(status)) {
fll_error_print(data->error, F_status_set_fine(status), "f_string_append", F_true);
#ifndef _di_fss_extended_write_delete_data_
f_status_t fss_extended_write_delete_data(fss_extended_write_data_t *data) {
- for (f_string_length_t i = 0; i < fss_extended_write_total_parameters; i++) {
- f_macro_string_lengths_t_delete_simple(data->parameters[i].locations);
- f_macro_string_lengths_t_delete_simple(data->parameters[i].locations_sub);
- f_macro_string_lengths_t_delete_simple(data->parameters[i].values);
+ for (f_array_length_t i = 0; i < fss_extended_write_total_parameters; i++) {
+ f_macro_array_lengths_t_delete_simple(data->parameters[i].locations);
+ f_macro_array_lengths_t_delete_simple(data->parameters[i].locations_sub);
+ f_macro_array_lengths_t_delete_simple(data->parameters[i].values);
} // for
- f_macro_string_lengths_t_delete_simple(data->remaining);
+ f_macro_array_lengths_t_delete_simple(data->remaining);
f_macro_color_context_t_delete_simple(data->context);
typedef struct {
f_console_parameter_t parameters[fss_extended_write_total_parameters];
- f_string_lengths_t remaining;
+ f_array_lengths_t remaining;
bool process_pipe;
f_file_t output;
#define fss_extended_write_data_t_initialize \
{ \
fss_extended_write_console_parameter_t_initialize, \
- f_string_lengths_t_initialize, \
+ f_array_lengths_t_initialize, \
F_false, \
f_macro_file_t_initialize2(f_type_output, f_type_descriptor_output, f_file_flag_write_only), \
fll_error_print_t_initialize, \
f_array_length_t i = 0;
- f_string_length_t total = 0;
- f_string_length_t previous = 0;
+ f_array_length_t total = 0;
+ f_array_length_t previous = 0;
f_string_range_t range = f_string_range_t_initialize;
f_string_dynamic_t block = f_string_dynamic_t_initialize;
#ifndef _di_fss_status_code_delete_data_
f_status_t fss_status_code_delete_data(fss_status_code_data_t *data) {
- for (f_string_length_t i = 0; i < fss_status_code_total_parameters; i++) {
- f_macro_string_lengths_t_delete_simple(data->parameters[i].locations);
- f_macro_string_lengths_t_delete_simple(data->parameters[i].locations_sub);
- f_macro_string_lengths_t_delete_simple(data->parameters[i].values);
+ for (f_array_length_t i = 0; i < fss_status_code_total_parameters; i++) {
+ f_macro_array_lengths_t_delete_simple(data->parameters[i].locations);
+ f_macro_array_lengths_t_delete_simple(data->parameters[i].locations_sub);
+ f_macro_array_lengths_t_delete_simple(data->parameters[i].values);
} // for
- f_macro_string_lengths_t_delete_simple(data->remaining);
+ f_macro_array_lengths_t_delete_simple(data->remaining);
f_macro_color_context_t_delete_simple(data->context);
typedef struct {
f_console_parameter_t parameters[fss_status_code_total_parameters];
- f_string_lengths_t remaining;
+ f_array_lengths_t remaining;
bool process_pipe;
f_file_t output;
#define fss_status_code_data_t_initialize \
{ \
fss_status_code_console_parameter_t_initialize, \
- f_string_lengths_t_initialize, \
+ f_array_lengths_t_initialize, \
F_false, \
f_macro_file_t_initialize2(f_type_output, f_type_descriptor_output, f_file_flag_write_only), \
fll_error_print_t_initialize, \
status = F_status_set_error(F_parameter);
}
else if (data->parameters[iki_read_parameter_at].result == f_console_result_additional) {
- const f_string_length_t index = data->parameters[iki_read_parameter_at].values.array[data->parameters[iki_read_parameter_at].values.used - 1];
+ const f_array_length_t index = data->parameters[iki_read_parameter_at].values.array[data->parameters[iki_read_parameter_at].values.used - 1];
const f_string_range_t range = f_macro_string_range_t_initialize(strlen(arguments.argv[index]));
f_number_unsigned_t number = 0;
status = F_status_set_error(F_parameter);
}
else if (data->parameters[iki_read_parameter_line].result == f_console_result_additional) {
- const f_string_length_t index = data->parameters[iki_read_parameter_line].values.array[data->parameters[iki_read_parameter_line].values.used - 1];
+ const f_array_length_t index = data->parameters[iki_read_parameter_line].values.array[data->parameters[iki_read_parameter_line].values.used - 1];
const f_string_range_t range = f_macro_string_range_t_initialize(strlen(arguments.argv[index]));
f_number_unsigned_t number = 0;
}
if (F_status_is_fine(status) && data->remaining.used > 0) {
- f_string_length_t i = 0;
- f_string_length_t total = 0;
+ f_array_length_t i = 0;
+ f_array_length_t total = 0;
f_file_t file = f_file_t_initialize;
for (; i < data->remaining.used; i++) {
#ifndef _di_iki_read_delete_data_
f_status_t iki_read_delete_data(iki_read_data_t *data) {
- for (f_string_length_t i = 0; i < iki_read_total_parameters; i++) {
- f_macro_string_lengths_t_delete_simple(data->parameters[i].locations);
- f_macro_string_lengths_t_delete_simple(data->parameters[i].locations_sub);
- f_macro_string_lengths_t_delete_simple(data->parameters[i].values);
+ for (f_array_length_t i = 0; i < iki_read_total_parameters; i++) {
+ f_macro_array_lengths_t_delete_simple(data->parameters[i].locations);
+ f_macro_array_lengths_t_delete_simple(data->parameters[i].locations_sub);
+ f_macro_array_lengths_t_delete_simple(data->parameters[i].values);
} // for
- f_macro_string_lengths_t_delete_simple(data->remaining);
+ f_macro_array_lengths_t_delete_simple(data->remaining);
f_macro_string_dynamic_t_delete_simple(data->buffer);
f_macro_color_context_t_delete_simple(data->context);
typedef struct {
f_console_parameter_t parameters[iki_read_total_parameters];
- f_string_lengths_t remaining;
+ f_array_lengths_t remaining;
bool process_pipe;
f_file_t output;
#define iki_read_data_t_initialize \
{ \
iki_read_console_parameter_t_initialize, \
- f_string_lengths_t_initialize, \
+ f_array_lengths_t_initialize, \
F_false, \
f_macro_file_t_initialize2(f_type_output, f_type_descriptor_output, f_file_flag_write_only), \
fll_error_print_t_initialize, \
f_status_t iki_read_process_at(const f_console_arguments_t arguments, const f_string_t file_name, iki_read_data_t *data, f_string_range_t *range) {
if (data->parameters[iki_read_parameter_line].result != f_console_result_additional) return F_false;
- f_string_length_t line = 0;
+ f_array_length_t line = 0;
range->start = 0;
if (data->line > 0) {
}
else if (ranges->used) {
f_array_length_t i = 0;
- f_string_length_t j = 0;
+ f_array_length_t j = 0;
for (; i < ranges->used; i++) {
if (data->parameters[iki_read_parameter_name].result == f_console_result_additional) {
f_array_length_t i = 0;
f_array_length_t j = 0;
- f_string_length_t length_argument = 0;
+ f_array_length_t length_argument = 0;
for (f_array_length_t index = 0; i < data->parameters[iki_read_parameter_name].values.used; i++) {
index = data->parameters[iki_read_parameter_name].values.array[i];
- length_argument = strnlen(arguments.argv[index], f_console_length_size);
+ length_argument = strnlen(arguments.argv[index], f_console_parameter_size);
for (j = 0, name_missed = F_true; j < names.used; j++) {
}
{
- f_string_length_t i = buffer_range.start;
+ f_array_length_t i = buffer_range.start;
f_array_length_t j = 0;
f_array_length_t k = 0;
f_array_length_t index = 0;
f_array_length_t index_2 = 0;
- f_string_length_t length = 0;
+ f_array_length_t length = 0;
f_console_parameter_t *parameter = &data->parameters[iki_read_parameter_substitute];
for (; i < parameter->values.used; i += 3) {
index = parameter->values.array[i];
- length = strnlen(arguments.argv[index], f_console_length_size);
+ length = strnlen(arguments.argv[index], f_console_parameter_size);
for (j = 0; j < vocabulary->used; j++) {
index = parameter->values.array[i + 1];
index_2 = substitutionss[j].used;
substitutionss[j].array[index_2].replace.string = arguments.argv[index];
- substitutionss[j].array[index_2].replace.used = strnlen(arguments.argv[index], f_console_length_size);
+ substitutionss[j].array[index_2].replace.used = strnlen(arguments.argv[index], f_console_parameter_size);
substitutionss[j].array[index_2].replace.size = substitutionss[j].array[index_2].replace.used;
index = parameter->values.array[i + 2];
substitutionss[j].array[index_2].with.string = arguments.argv[index];
- substitutionss[j].array[index_2].with.used = strnlen(arguments.argv[index], f_console_length_size);
+ substitutionss[j].array[index_2].with.used = strnlen(arguments.argv[index], f_console_parameter_size);
substitutionss[j].array[index_2].with.size = substitutionss[j].array[index_2].with.used;
substitutionss[j].used++;
#endif // _di_iki_read_substitutions_identify_
#ifndef _di_iki_read_substitutions_print_
- void iki_read_substitutions_print(const iki_read_data_t data, const f_iki_variable_t variable, const f_iki_content_t content, const f_string_ranges_t ranges, const iki_read_substitutions_t substitutions, const f_string_length_t index, const bool content_only) {
+ void iki_read_substitutions_print(const iki_read_data_t data, const f_iki_variable_t variable, const f_iki_content_t content, const f_string_ranges_t ranges, const iki_read_substitutions_t substitutions, const f_array_length_t index, const bool content_only) {
f_status_t status = F_none;
- f_string_length_t i = 0;
+ f_array_length_t i = 0;
f_string_range_t range = f_string_range_t_initialize;
range.start = 0;
* Set to FALSE to print the entire variable when printing substituted text.
*/
#ifndef _di_iki_read_substitutions_print_
- extern void iki_read_substitutions_print(const iki_read_data_t data, const f_iki_variable_t variable, const f_iki_content_t content, const f_string_ranges_t ranges, const iki_read_substitutions_t substitutions, const f_string_length_t index, const bool content_only) f_gcc_attribute_visibility_internal;
+ extern void iki_read_substitutions_print(const iki_read_data_t data, const f_iki_variable_t variable, const f_iki_content_t content, const f_string_ranges_t ranges, const iki_read_substitutions_t substitutions, const f_array_length_t index, const bool content_only) f_gcc_attribute_visibility_internal;
#endif // _di_iki_read_substitutions_print_
#ifdef __cplusplus
status = F_status_set_error(F_parameter);
}
else {
- const f_string_length_t location = data->parameters[iki_write_parameter_file].values.array[0];
+ const f_array_length_t location = data->parameters[iki_write_parameter_file].values.array[0];
output.id = -1;
output.stream = 0;
bool object_ended = F_false;
- f_string_length_t previous = 0;
+ f_array_length_t previous = 0;
f_string_range_t range = f_string_range_t_initialize;
range.start = 0;
for (f_array_length_t i = 0; i < data->parameters[iki_write_parameter_object].values.used; i++) {
object.string = arguments.argv[data->parameters[iki_write_parameter_object].values.array[i]];
- object.used = strnlen(object.string, f_console_length_size);
+ object.used = strnlen(object.string, f_console_parameter_size);
object.size = object.used;
content.string = arguments.argv[data->parameters[iki_write_parameter_content].values.array[i]];
- content.used = strnlen(content.string, f_console_length_size);
+ content.used = strnlen(content.string, f_console_parameter_size);
content.size = content.used;
status = iki_write_process(*data, output, object, content, quote, &escaped);
#ifndef _di_iki_write_delete_data_
f_status_t iki_write_delete_data(iki_write_data_t *data) {
- for (f_string_length_t i = 0; i < iki_write_total_parameters; i++) {
- f_macro_string_lengths_t_delete_simple(data->parameters[i].locations);
- f_macro_string_lengths_t_delete_simple(data->parameters[i].locations_sub);
- f_macro_string_lengths_t_delete_simple(data->parameters[i].values);
+ for (f_array_length_t i = 0; i < iki_write_total_parameters; i++) {
+ f_macro_array_lengths_t_delete_simple(data->parameters[i].locations);
+ f_macro_array_lengths_t_delete_simple(data->parameters[i].locations_sub);
+ f_macro_array_lengths_t_delete_simple(data->parameters[i].values);
} // for
- f_macro_string_lengths_t_delete_simple(data->remaining);
+ f_macro_array_lengths_t_delete_simple(data->remaining);
f_macro_string_dynamic_t_delete_simple(data->buffer);
f_macro_color_context_t_delete_simple(data->context);
typedef struct {
f_console_parameter_t parameters[iki_write_total_parameters];
- f_string_lengths_t remaining;
+ f_array_lengths_t remaining;
bool process_pipe;
f_file_t output;
#define iki_write_data_t_initialize \
{ \
iki_write_console_parameter_t_initialize, \
- f_string_lengths_t_initialize, \
+ f_array_lengths_t_initialize, \
F_false, \
f_macro_file_t_initialize2(f_type_output, f_type_descriptor_output, f_file_flag_write_only), \
fll_error_print_t_initialize, \
#ifndef _di_init_delete_data_
f_status_t init_delete_data(init_data_t *data) {
- for (f_string_length_t i = 0; i < init_total_parameters; i++) {
- f_macro_string_lengths_t_delete_simple(data->parameters[i].locations);
- f_macro_string_lengths_t_delete_simple(data->parameters[i].locations_sub);
- f_macro_string_lengths_t_delete_simple(data->parameters[i].values);
+ for (f_array_length_t i = 0; i < init_total_parameters; i++) {
+ f_macro_array_lengths_t_delete_simple(data->parameters[i].locations);
+ f_macro_array_lengths_t_delete_simple(data->parameters[i].locations_sub);
+ f_macro_array_lengths_t_delete_simple(data->parameters[i].values);
} // for
- f_macro_string_lengths_t_delete_simple(data->remaining);
+ f_macro_array_lengths_t_delete_simple(data->remaining);
f_macro_string_dynamic_t_delete_simple(data->setting_kernel.root);
f_macro_string_dynamic_t_delete_simple(data->setting_kernel.root_group);
typedef struct {
f_console_parameter_t parameters[init_total_parameters];
- f_string_lengths_t remaining;
+ f_array_lengths_t remaining;
f_file_t output;
fll_error_print_t error;
#define init_data_initialize \
{ \
init_console_parameter_t_initialize, \
- f_string_lengths_t_initialize, \
+ f_array_lengths_t_initialize, \
f_macro_file_t_initialize2(f_type_output, f_type_descriptor_output, f_file_flag_write_only), \
fll_error_print_t_initialize, \
0, \
init_string_verbosity,
};
- const f_string_length_t parameter_length[] = {
+ const f_array_length_t parameter_length[] = {
init_string_color_length,
init_string_failsafe_length,
init_string_mode_length,
}
{
- f_string_length_t i = 0;
- f_string_length_t j = 0;
+ f_array_length_t i = 0;
+ f_array_length_t j = 0;
for (; i < variable.used; ++i) {
#ifndef _di_status_code_delete_data_
f_status_t status_code_delete_data(status_code_data_t *data) {
- for (f_string_length_t i = 0; i < status_code_total_parameters; i++) {
- f_macro_string_lengths_t_delete_simple(data->parameters[i].locations);
- f_macro_string_lengths_t_delete_simple(data->parameters[i].locations_sub);
- f_macro_string_lengths_t_delete_simple(data->parameters[i].values);
+ for (f_array_length_t i = 0; i < status_code_total_parameters; i++) {
+ f_macro_array_lengths_t_delete_simple(data->parameters[i].locations);
+ f_macro_array_lengths_t_delete_simple(data->parameters[i].locations_sub);
+ f_macro_array_lengths_t_delete_simple(data->parameters[i].values);
} // for
- f_macro_string_lengths_t_delete_simple(data->remaining);
+ f_macro_array_lengths_t_delete_simple(data->remaining);
f_macro_color_context_t_delete_simple(data->context);
typedef struct {
f_console_parameter_t parameters[status_code_total_parameters];
- f_string_lengths_t remaining;
+ f_array_lengths_t remaining;
bool process_pipe;
f_file_t output;
#define status_code_data_t_initialize \
{ \
status_code_console_parameter_t_initialize, \
- f_string_lengths_t_initialize, \
+ f_array_lengths_t_initialize, \
F_false, \
f_macro_file_t_initialize2(f_type_output, f_type_descriptor_output, f_file_flag_write_only), \
fll_error_print_t_initialize, \