This is a better practice.
While a compiler nowadays might optimize x == 0, it is better practice to use !x to represent the logic and reasoning.
One should always be aware of simple performance optimizations and practices, even if it might just be compiled away, if the readability is not too difficult.
#ifndef _di_f_console_identify_
f_return_status f_console_identify(const f_string_t input, f_console_id_t *result) {
#ifndef _di_level_0_parameter_checking_
- if (result == 0) return F_status_set_error(F_parameter);
+ 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);
- if (length == 0) {
+ if (!length) {
*result = f_console_none;
return F_data_not;
}
#ifndef _di_f_console_parameter_process_
f_return_status f_console_parameter_process(const f_console_arguments_t arguments, f_console_parameters_t parameters, f_string_lengths_t *remaining) {
#ifndef _di_level_0_parameter_checking_
- if (remaining == 0) return F_status_set_error(F_parameter);
+ if (!remaining) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
f_status_t status = F_none;
}
if (result == console_short) {
- if (parameters.parameter[i].symbol_short == 0) continue;
+ if (!parameters.parameter[i].symbol_short) continue;
width = f_macro_utf_byte_width_is(arguments.argv[location][sub_location]);
if (width > 0) {
}
}
else if (result == console_long) {
- if (parameters.parameter[i].symbol_long == 0) {
+ if (!parameters.parameter[i].symbol_long) {
continue;
}
if (parameters.parameter[i].type != f_console_type_other) continue;
- if (parameters.parameter[i].symbol_other == 0) continue;
+ if (!parameters.parameter[i].symbol_other) continue;
if (strncmp(arguments.argv[location], parameters.parameter[i].symbol_other, string_length + 1) != 0) continue;
#ifndef _di_f_console_parameter_prioritize_left_
f_return_status f_console_parameter_prioritize_left(const f_console_parameters_t parameters, const f_console_parameter_ids_t choices, f_console_parameter_id_t *decision) {
#ifndef _di_level_0_parameter_checking_
- if (decision == 0) return F_status_set_error(F_parameter);
- if (choices.id == 0) return F_status_set_error(F_parameter);
+ if (!decision) return F_status_set_error(F_parameter);
+ if (!choices.id) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- if (choices.used == 0) return F_data_not;
- if (parameters.used == 0) return F_data_not;
+ if (!choices.used) return F_data_not;
+ if (!parameters.used) return F_data_not;
f_array_length_t location = 0;
f_array_length_t location_sub = 0;
} // for
// The first parameter location (argc = 0) is the program name, therefore if the location is 0, then no matches were found.
- if (location == 0) {
+ if (!location) {
return F_data_not;
}
#ifndef _di_f_console_parameter_prioritize_right_
f_return_status f_console_parameter_prioritize_right(const f_console_parameters_t parameters, const f_console_parameter_ids_t choices, f_console_parameter_id_t *decision) {
#ifndef _di_level_0_parameter_checking_
- if (decision == 0) return F_status_set_error(F_parameter);
- if (choices.id == 0) return F_status_set_error(F_parameter);
+ if (!decision) return F_status_set_error(F_parameter);
+ if (!choices.id) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- if (choices.used == 0) return F_data_not;
- if (parameters.used == 0) return F_data_not;
+ if (!choices.used) return F_data_not;
+ if (!parameters.used) return F_data_not;
f_array_length_t location = 0;
f_array_length_t location_sub = 0;
} // for
// The first parameter location (argc = 0) is the program name, therefore if the location is 0, then no matches were found.
- if (location == 0) {
+ if (!location) {
return F_data_not;
}
#ifndef _di_f_conversion_character_to_binary_
f_return_status f_conversion_character_to_binary(const int8_t character, f_number_unsigned_t *number) {
#ifndef _di_level_0_parameter_checking_
- if (number == 0) return F_status_set_error(F_parameter);
+ if (!number) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
switch (character) {
#ifndef _di_f_conversion_character_to_decimal_
f_return_status f_conversion_character_to_decimal(const int8_t character, f_number_unsigned_t *number) {
#ifndef _di_level_0_parameter_checking_
- if (number == 0) return F_status_set_error(F_parameter);
+ if (!number) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
switch (character) {
#ifndef _di_f_conversion_character_to_duodecimal_
f_return_status f_conversion_character_to_duodecimal(const int8_t character, f_number_unsigned_t *decimal) {
#ifndef _di_level_0_parameter_checking_
- if (decimal == 0) return F_status_set_error(F_parameter);
+ if (!decimal) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
switch (character) {
#ifndef _di_f_conversion_character_to_hexidecimal_
f_return_status f_conversion_character_to_hexidecimal(const int8_t character, f_number_unsigned_t *decimal) {
#ifndef _di_level_0_parameter_checking_
- if (decimal == 0) return F_status_set_error(F_parameter);
+ if (!decimal) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
switch (character) {
#ifndef _di_f_conversion_character_to_octal_
f_return_status f_conversion_character_to_octal(const int8_t character, f_number_unsigned_t *number) {
#ifndef _di_level_0_parameter_checking_
- if (number == 0) return F_status_set_error(F_parameter);
+ if (!number) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
switch (character) {
#ifndef _di_f_conversion_number_signed_to_string_
f_return_status f_conversion_number_signed_to_string(const f_number_signed_t number, const uint8_t base, f_string_dynamic_t *destination) {
#ifndef _di_level_0_parameter_checking_
- if (destination == 0) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
if (base < 2 || base > 16) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
f_status_t status = F_none;
- if (number == 0) {
+ if (!number) {
f_macro_string_dynamic_t_resize(status, (*destination), destination->used + 2);
if (F_status_is_error(status)) return status;
#ifndef _di_f_conversion_number_unsigned_to_string_
f_return_status f_conversion_number_unsigned_to_string(const f_number_unsigned_t number, const uint8_t base, f_string_dynamic_t *destination) {
#ifndef _di_level_0_parameter_checking_
- if (destination == 0) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
if (base < 2 || base > 16) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
f_status_t status = F_none;
- if (number == 0) {
+ if (!number) {
f_macro_string_dynamic_t_resize(status, (*destination), destination->used + 2);
if (F_status_is_error(status)) return status;
#ifndef _di_f_directory_list_
f_return_status f_directory_list(const f_string_t path, int (*filter)(const struct dirent *), int (*sort)(const struct dirent **, const struct dirent **), f_string_dynamics_t *names) {
#ifndef _di_level_0_parameter_checking_
- if (names == 0) return F_status_set_error(F_parameter);
+ if (!names) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
struct dirent **listing = 0;
size = strnlen(listing[i]->d_name, f_directory_name_max);
// There is no reason to include "." and ".." in the directory listing.
- if (strncmp(listing[i]->d_name, "..", 3) == 0 || strncmp(listing[i]->d_name, ".", 2) == 0) {
+ if (!strncmp(listing[i]->d_name, "..", 3) == 0 || strncmp(listing[i]->d_name, ".", 2)) {
f_memory_delete((void **) & listing[i], sizeof(char *), 1);
continue;
}
f_memory_delete((void **) & listing, sizeof(struct dirent *), 1);
if (F_status_is_error(status)) return status;
- if (length == 0) return F_data_not;
+ if (!length) return F_data_not;
return F_none;
}
#ifndef _di_f_directory_open_
f_return_status f_directory_open(const f_string_t path, const bool dereference, int *id) {
#ifndef _di_level_0_parameter_checking_
- if (id == 0) return F_status_set_error(F_parameter);
+ if (!id) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
int flag = f_directory_flag_directory | f_directory_flag_close_execute | f_directory_flag_path;
f_return_status f_directory_open_at(const int at_id, const f_string_t path, const bool dereference, int *id) {
#ifndef _di_level_0_parameter_checking_
if (at_id <= 0) return F_status_set_error(F_parameter);
- if (id == 0) return F_status_set_error(F_parameter);
+ if (!id) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
int flag = f_directory_flag_directory | f_directory_flag_close_execute | f_directory_flag_path;
#ifndef _di_f_directory_touch_
f_return_status f_directory_touch(const f_string_t path, const mode_t mode) {
#ifndef _di_level_0_parameter_checking_
- if (path == 0) return F_status_set_error(F_parameter);
+ if (!path) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
f_status_t status = F_none;
#ifndef _di_f_directory_touch_at_
f_return_status f_directory_touch_at(const int at_id, const f_string_t path, const mode_t mode, const int flag) {
#ifndef _di_level_0_parameter_checking_
- if (path == 0) return F_status_set_error(F_parameter);
+ if (!path) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
f_status_t status = F_none;
structures.used--; \
f_macro_directory_status_t_delete_simple(structures.array[structures.used]); \
} \
- if (structures.used == 0) { \
+ if (!structures.used) { \
if (f_memory_delete((void **) & structures.array, sizeof(f_directory_status_t), structures.size)) { \
structures.size = 0; \
} \
structures.used--; \
f_macro_directory_status_t_destroy_simple(structures.array[structures.used]); \
} \
- if (structures.used == 0) { \
+ if (!structures.used) { \
if (f_memory_destroy((void **) & structures.array, sizeof(f_directory_status_t), structures.size)) { \
structures.size = 0; \
} \
#if !defined(_di_f_directory_remove_)
int private_f_directory_remove_recursively(const char *path, const struct stat *file_stat, int type, struct FTW *entity) {
- if (entity->level == 0) return 0;
+ if (!entity->level) return 0;
return remove(path);
}
#endif // !defined(_di_f_directory_remove_)
#ifndef _di_f_environment_clear_
f_return_status f_environment_clear() {
- if (clearenv() == 0) {
+ if (!clearenv()) {
return F_none;
}
if (value->used > value->size) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- if (name.used == 0) return F_data_not;
+ if (!name.used) return F_data_not;
- if (name.string[name.used - 1] == 0) {
+ if (!name.string[name.used - 1]) {
return private_f_environment_get(name.string, value);
}
if (value.used > value.size) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- if (name.used == 0) return F_data_not;
+ if (!name.used) return F_data_not;
- if (name.string[name.used - 1] == 0) {
- if (value.used > 0 && value.string[value.used - 1] == 0) {
+ if (!name.string[name.used - 1]) {
+ if (value.used > 0 && !value.string[value.used - 1]) {
return private_f_environment_set(name.string, value.string, replace);
}
memcpy(&variable_name, name.string, name.used);
variable_name[name.used] = 0;
- if (value.used > 0 && value.string[value.used - 1] == 0) {
+ if (value.used > 0 && !value.string[value.used - 1]) {
return private_f_environment_set(variable_name, value.string, replace);
}
if (name.used > name.size) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- if (name.used == 0) return F_data_not;
+ if (!name.used) return F_data_not;
- if (name.string[name.used - 1] == 0) {
+ if (!name.string[name.used - 1]) {
return private_f_environment_unset(name.string);
}
f_return_status private_f_environment_get(const f_string_t name, f_string_dynamic_t *value) {
const f_string_t result = getenv(name);
- if (result == 0) {
+ if (!result) {
return F_exist_not;
}
const f_string_length_t size = strnlen(result, f_environment_max_length);
- if (size == 0) {
+ if (!size) {
value->used = 0;
}
else {
#ifndef _di_f_file_access_
f_return_status f_file_access(const f_string_t path) {
#ifndef _di_level_0_parameter_checking_
- if (path == 0) return F_status_set_error(F_parameter);
+ if (!path) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
if (access(path, F_OK)) {
#ifndef _di_f_file_clone_
f_return_status f_file_clone(const f_string_t source, const f_string_t destination, const bool role, const f_number_unsigned_t size_block, const bool exclusive) {
#ifndef _di_level_0_parameter_checking_
- if (source == 0) return F_status_set_error(F_parameter);
- if (destination == 0) return F_status_set_error(F_parameter);
+ if (!source) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
f_status_t status = F_none;
#ifndef _di_f_file_copy_
f_return_status f_file_copy(const f_string_t source, const f_string_t destination, const f_mode_t mode, const f_number_unsigned_t size_block, const bool exclusive) {
#ifndef _di_level_0_parameter_checking_
- if (source == 0) return F_status_set_error(F_parameter);
- if (destination == 0) return F_status_set_error(F_parameter);
+ if (!source) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
f_status_t status = F_none;
#ifndef _di_f_file_create_
f_return_status f_file_create(const f_string_t path, const mode_t mode, const bool exclusive) {
#ifndef _di_level_0_parameter_checking_
- if (path == 0) return F_status_set_error(F_parameter);
+ if (!path) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
return private_f_file_create(path, mode, exclusive);
#ifndef _di_f_file_create_at_
f_return_status f_file_create_at(const int at_id, const f_string_t path, const mode_t mode, const bool exclusive) {
#ifndef _di_level_0_parameter_checking_
- if (path == 0) return F_status_set_error(F_parameter);
+ if (!path) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
return private_f_file_create_at(at_id, path, mode, exclusive);
#ifndef _di_f_file_create_device_
f_return_status f_file_create_device(const f_string_t path, const mode_t mode, const unsigned int major, const unsigned int minor) {
#ifndef _di_level_0_parameter_checking_
- if (path == 0) return F_status_set_error(F_parameter);
+ if (!path) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#ifndef _di_f_file_create_device_at_
f_return_status f_file_create_device_at(const int at_id, const f_string_t path, const mode_t mode, const unsigned int major, const unsigned int minor) {
#ifndef _di_level_0_parameter_checking_
- if (path == 0) return F_status_set_error(F_parameter);
+ if (!path) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
if (!f_macro_file_type_is_fifo(mode) && !f_macro_file_type_is_character(mode) && !f_macro_file_type_is_block(mode)) {
#ifndef _di_f_file_create_fifo_
f_return_status f_file_create_fifo(const f_string_t path, const mode_t mode) {
#ifndef _di_level_0_parameter_checking_
- if (path == 0) return F_status_set_error(F_parameter);
+ if (!path) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
return private_f_file_create_fifo(path, mode);
#ifndef _di_f_file_create_fifo_at_
f_return_status f_file_create_fifo_at(const int at_id, const f_string_t path, const mode_t mode) {
#ifndef _di_level_0_parameter_checking_
- if (path == 0) return F_status_set_error(F_parameter);
+ if (!path) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
return private_f_file_create_fifo_at(at_id, path, mode);
#ifndef _di_f_file_create_node_
f_return_status f_file_create_node(const f_string_t path, const mode_t mode, const dev_t device) {
#ifndef _di_level_0_parameter_checking_
- if (path == 0) return F_status_set_error(F_parameter);
+ if (!path) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
if (!f_macro_file_type_is_fifo(mode) && !f_macro_file_type_is_character(mode) && !f_macro_file_type_is_block(mode)) {
#ifndef _di_f_file_create_node_at_
f_return_status f_file_create_node_at(const int at_id, const f_string_t path, const mode_t mode, const dev_t device) {
#ifndef _di_level_0_parameter_checking_
- if (path == 0) return F_status_set_error(F_parameter);
+ if (!path) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
if (!f_macro_file_type_is_fifo(mode) && !f_macro_file_type_is_character(mode) && !f_macro_file_type_is_block(mode)) {
#ifndef _di_f_file_exists_
f_return_status f_file_exists(const f_string_t path) {
#ifndef _di_level_0_parameter_checking_
- if (path == 0) return F_status_set_error(F_parameter);
+ if (!path) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
f_status_t status = F_none;
#ifndef _di_f_file_exists_at_
f_return_status f_file_exists_at(const int at_id, const f_string_t path, const int flag) {
#ifndef _di_level_0_parameter_checking_
- if (path == 0) return F_status_set_error(F_parameter);
+ if (!path) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
f_status_t status = F_none;
#ifndef _di_f_file_group_read_
f_return_status f_file_group_read(const f_string_t path, gid_t *group) {
#ifndef _di_level_0_parameter_checking_
- if (path == 0) return F_status_set_error(F_parameter);
- if (group == 0) return F_status_set_error(F_parameter);
+ if (!path) return F_status_set_error(F_parameter);
+ if (!group) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
struct stat stat_file;
#ifndef _di_f_file_is_
f_return_status f_file_is(const f_string_t path, const int type, const bool dereference) {
#ifndef _di_level_0_parameter_checking_
- if (path == 0) return F_status_set_error(F_parameter);
+ if (!path) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
struct stat file_stat;
#ifndef _di_f_file_is_at_
f_return_status f_file_is_at(const int at_id, const f_string_t path, const int type, const int flag) {
#ifndef _di_level_0_parameter_checking_
- if (path == 0) return F_status_set_error(F_parameter);
+ if (!path) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
struct stat file_stat;
#ifndef _di_f_file_link_
f_return_status f_file_link(const f_string_t target, const f_string_t point) {
#ifndef _di_level_0_parameter_checking_
- if (target == 0) return F_status_set_error(F_parameter);
- if (point == 0) return F_status_set_error(F_parameter);
+ if (!target) return F_status_set_error(F_parameter);
+ if (!point) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
return private_f_file_link(target, point);
#ifndef _di_f_file_link_at_
f_return_status f_file_link_at(const int at_id, const f_string_t target, const f_string_t point) {
#ifndef _di_level_0_parameter_checking_
- if (target == 0) return F_status_set_error(F_parameter);
- if (point == 0) return F_status_set_error(F_parameter);
+ if (!target) return F_status_set_error(F_parameter);
+ if (!point) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
return private_f_file_link_at(at_id, target, point);
#ifndef _di_f_file_link_hard_
f_return_status f_file_link_hard(const f_string_t target, const f_string_t point) {
#ifndef _di_level_0_parameter_checking_
- if (target == 0) return F_status_set_error(F_parameter);
- if (point == 0) return F_status_set_error(F_parameter);
+ if (!target) return F_status_set_error(F_parameter);
+ if (!point) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
if (link(target, point) < 0) {
#ifndef _di_f_file_link_hard_at_
f_return_status f_file_link_hard_at(const int at_id_target, const int at_id_point, const f_string_t target, const f_string_t point, const int flag) {
#ifndef _di_level_0_parameter_checking_
- if (target == 0) return F_status_set_error(F_parameter);
- if (point == 0) return F_status_set_error(F_parameter);
+ if (!target) return F_status_set_error(F_parameter);
+ if (!point) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
if (linkat(at_id_target, target, at_id_point, point, flag) < 0) {
#ifndef _di_f_file_link_read_
f_return_status f_file_link_read(const f_string_t path, const struct stat link_stat, f_string_dynamic_t *target) {
#ifndef _di_level_0_parameter_checking_
- if (path == 0) return F_status_set_error(F_parameter);
- if (link_stat.st_size == 0) return F_status_set_error(F_parameter);
- if (target == 0) return F_status_set_error(F_parameter);
+ if (!path) return F_status_set_error(F_parameter);
+ if (!link_stat.st_size) return F_status_set_error(F_parameter);
+ if (!target) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
return private_f_file_link_read(path, link_stat, target);
#ifndef _di_f_file_link_read_at_
f_return_status f_file_link_read_at(const int at_id, const f_string_t path, const struct stat link_stat, f_string_dynamic_t *target) {
#ifndef _di_level_0_parameter_checking_
- if (link_stat.st_size == 0) return F_status_set_error(F_parameter);
- if (target == 0) return F_status_set_error(F_parameter);
+ if (!link_stat.st_size) return F_status_set_error(F_parameter);
+ if (!target) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
return private_f_file_link_read_at(at_id, path, link_stat, target);
#ifndef _di_f_file_mode_determine_
f_return_status f_file_mode_determine(const mode_t mode_file, const f_file_mode_t mode_change, const uint8_t mode_replace, const bool directory_is, mode_t *mode) {
#ifndef _di_level_0_parameter_checking_
- if (mode == 0) return F_status_set_error(F_parameter);
+ if (!mode) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
f_file_mode_t change = mode_change & f_file_mode_t_block_special;
#ifndef _di_f_file_mode_from_string_
f_return_status f_file_mode_from_string(const f_string_t string, const mode_t umask, f_file_mode_t *mode, uint8_t *replace) {
#ifndef _di_level_0_parameter_checking_
- if (string == 0) return F_status_set_error(F_parameter);
- if (string[0] == 0) return F_status_set_error(F_parameter);
- if (mode == 0) return F_status_set_error(F_parameter);
- if (replace == 0) return F_status_set_error(F_parameter);
+ if (!string) return F_status_set_error(F_parameter);
+ if (!string[0]) return F_status_set_error(F_parameter);
+ if (!mode) return F_status_set_error(F_parameter);
+ if (!replace) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
uint8_t syntax = 0;
else if (how == 2) {
// if there are only '0's then the standard and setuid/setgid/sticky bits are to be replaced.
- if (*mode == 0) {
+ if (!*mode) {
*replace = f_file_mode_t_replace_standard | f_file_mode_t_replace_special;
}
}
#ifndef _di_f_file_mode_read_
f_return_status f_file_mode_read(const f_string_t path, mode_t *mode) {
#ifndef _di_level_0_parameter_checking_
- if (path == 0) return F_status_set_error(F_parameter);
- if (mode == 0) return F_status_set_error(F_parameter);
+ if (!path) return F_status_set_error(F_parameter);
+ if (!mode) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
struct stat stat_file;
#ifndef _di_f_file_mode_read_at_
f_return_status f_file_mode_read_at(const int at_id, const f_string_t path, mode_t *mode) {
#ifndef _di_level_0_parameter_checking_
- if (path == 0) return F_status_set_error(F_parameter);
- if (mode == 0) return F_status_set_error(F_parameter);
+ if (!path) return F_status_set_error(F_parameter);
+ if (!mode) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
struct stat stat_file;
#ifndef _di_f_file_mode_set_
f_return_status f_file_mode_set(const f_string_t path, const mode_t mode) {
#ifndef _di_level_0_parameter_checking_
- if (path == 0) return F_status_set_error(F_parameter);
+ if (!path) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
return private_f_file_mode_set(path, mode);
#ifndef _di_f_file_mode_set_at_
f_return_status f_file_mode_set_at(const int at_id, const f_string_t path, const mode_t mode) {
#ifndef _di_level_0_parameter_checking_
- if (path == 0) return F_status_set_error(F_parameter);
+ if (!path) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
return private_f_file_mode_set_at(at_id, path, mode);
#ifndef _di_f_file_mode_to_mode_
f_return_status f_file_mode_to_mode(const f_file_mode_t from, mode_t *to) {
#ifndef _di_level_0_parameter_checking_
- if (to == 0) return F_status_set_error(F_parameter);
+ if (!to) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
const f_file_mode_t add = from & f_file_mode_t_mask_how_add;
#ifndef _di_f_file_name_base_
f_return_status f_file_name_base(const f_string_t path, const f_string_length_t length, f_string_dynamic_t *name_base) {
#ifndef _di_level_0_parameter_checking_
- if (path == 0) return F_status_set_error(F_parameter);
- if (name_base == 0) return F_status_set_error(F_parameter);
+ if (!path) return F_status_set_error(F_parameter);
+ if (!name_base) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
// POSIX basename() modifies the path, so protect it (and add a terminating NULL).
#ifndef _di_f_file_name_directory_
f_return_status f_file_name_directory(const f_string_t path, const f_string_length_t length, f_string_dynamic_t *name_directory) {
#ifndef _di_level_0_parameter_checking_
- if (path == 0) return F_status_set_error(F_parameter);
- if (name_directory == 0) return F_status_set_error(F_parameter);
+ if (!path) return F_status_set_error(F_parameter);
+ if (!name_directory) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
// POSIX dirname() modifies the path, so protect it (and add a terminating NULL).
#ifndef _di_f_file_open_
f_return_status f_file_open(const f_string_t path, const mode_t mode, f_file_t *file) {
#ifndef _di_level_0_parameter_checking_
- if (path == 0) return F_status_set_error(F_parameter);
- if (file == 0) return F_status_set_error(F_parameter);
+ if (!path) return F_status_set_error(F_parameter);
+ if (!file) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
return private_f_file_open(path, mode, file);
#ifndef _di_f_file_open_at_
f_return_status f_file_open_at(const int at_id, const f_string_t path, const mode_t mode, f_file_t *file) {
#ifndef _di_level_0_parameter_checking_
- if (file == 0) return F_status_set_error(F_parameter);
+ if (!file) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
return private_f_file_open_at(at_id, path, mode, file);
#ifndef _di_f_file_owner_read_
f_return_status f_file_owner_read(const f_string_t path, uid_t *owner) {
#ifndef _di_level_0_parameter_checking_
- if (path == 0) return F_status_set_error(F_parameter);
- if (owner == 0) return F_status_set_error(F_parameter);
+ if (!path) return F_status_set_error(F_parameter);
+ if (!owner) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
struct stat stat_file;
#ifndef _di_f_file_read_
f_return_status f_file_read(const f_file_t file, f_string_dynamic_t *buffer) {
#ifndef _di_level_0_parameter_checking_
- if (file.size_read == 0) return F_status_set_error(F_parameter);
+ if (!file.size_read) return F_status_set_error(F_parameter);
if (buffer->used > buffer->size) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
buffer->used += size_read;
} // while
- if (size_read == 0) {
+ if (!size_read) {
return F_none_eof;
}
#ifndef _di_f_file_read_block_
f_return_status f_file_read_block(const f_file_t file, f_string_dynamic_t *buffer) {
#ifndef _di_level_0_parameter_checking_
- if (file.size_read == 0) return F_status_set_error(F_parameter);
+ if (!file.size_read) return F_status_set_error(F_parameter);
if (buffer->used > buffer->size) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
buffer->used += size_read;
}
- if (size_read == 0) {
+ if (!size_read) {
return F_none_eof;
}
#ifndef _di_f_file_read_until_
f_return_status f_file_read_until(const f_file_t file, const f_string_length_t total, f_string_dynamic_t *buffer) {
#ifndef _di_level_0_parameter_checking_
- if (file.size_read == 0) return F_status_set_error(F_parameter);
+ if (!file.size_read) return F_status_set_error(F_parameter);
if (buffer->used > buffer->size) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
buffer_count += size_read;
} // while
- if (size_read == 0) {
+ if (!size_read) {
return F_none_eof;
}
#ifndef _di_f_file_remove_
f_return_status f_file_remove(const f_string_t path) {
#ifndef _di_level_0_parameter_checking_
- if (path == 0) return F_status_set_error(F_parameter);
+ if (!path) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
if (unlink(path) < 0) {
#ifndef _di_f_file_remove_at_
f_return_status f_file_remove_at(const int at_id, const f_string_t path, const int flag) {
#ifndef _di_level_0_parameter_checking_
- if (path == 0) return F_status_set_error(F_parameter);
+ if (!path) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
if (unlinkat(at_id, path, flag) < 0) {
#ifndef _di_f_file_rename_
f_return_status f_file_rename(const f_string_t source, const f_string_t destination) {
#ifndef _di_level_0_parameter_checking_
- if (source == 0) return F_status_set_error(F_parameter);
- if (destination == 0) return F_status_set_error(F_parameter);
+ if (!source) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
if (rename(source, destination) < 0) {
#ifndef _di_f_file_rename_at_
f_return_status f_file_rename_at(const int at_id, const int to_id, const f_string_t source, const f_string_t destination) {
#ifndef _di_level_0_parameter_checking_
- if (source == 0) return F_status_set_error(F_parameter);
- if (destination == 0) return F_status_set_error(F_parameter);
+ if (!source) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
if (renameat(at_id, source, to_id, destination) < 0) {
#ifndef _di_f_file_role_change_
f_return_status f_file_role_change(const f_string_t path, const uid_t uid, const gid_t gid, const bool dereference) {
#ifndef _di_level_0_parameter_checking_
- if (path == 0) return F_status_set_error(F_parameter);
+ if (!path) return F_status_set_error(F_parameter);
if (uid == -1 && gid == -1) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#ifndef _di_f_file_role_change_at_
f_return_status f_file_role_change_at(const int at_id, const f_string_t path, const uid_t uid, const gid_t gid, const int flag) {
#ifndef _di_level_0_parameter_checking_
- if (path == 0) return F_status_set_error(F_parameter);
+ if (!path) return F_status_set_error(F_parameter);
if (uid == -1 && gid == -1) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#ifndef _di_f_file_size_
f_return_status f_file_size(const f_string_t path, const bool dereference, f_string_length_t *size) {
#ifndef _di_level_0_parameter_checking_
- if (path == 0) return F_status_set_error(F_parameter);
- if (size == 0) return F_status_set_error(F_parameter);
+ if (!path) return F_status_set_error(F_parameter);
+ if (!size) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
struct stat file_stat;
#ifndef _di_f_file_size_at_
f_return_status f_file_size_at(const int at_id, const f_string_t path, const bool dereference, f_string_length_t *size) {
#ifndef _di_level_0_parameter_checking_
- if (path == 0) return F_status_set_error(F_parameter);
+ if (!path) return F_status_set_error(F_parameter);
if (at_id <= 0) return F_status_set_error(F_parameter);
- if (size == 0) return F_status_set_error(F_parameter);
+ if (!size) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
struct stat file_stat;
f_return_status f_file_size_by_id(const int id, f_string_length_t *size) {
#ifndef _di_level_0_parameter_checking_
if (id <= 0) return F_status_set_error(F_parameter);
- if (size == 0) return F_status_set_error(F_parameter);
+ if (!size) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
struct stat file_stat;
#ifndef _di_f_file_stat_
f_return_status f_file_stat(const f_string_t path, const bool dereference, struct stat *file_stat) {
#ifndef _di_level_0_parameter_checking_
- if (path == 0) return F_status_set_error(F_parameter);
- if (file_stat == 0) return F_status_set_error(F_parameter);
+ if (!path) return F_status_set_error(F_parameter);
+ if (!file_stat) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
return private_f_file_stat(path, dereference, file_stat);
#ifndef _di_f_file_stat_at_
f_return_status f_file_stat_at(const int at_id, const f_string_t path, const int flag, struct stat *file_stat) {
#ifndef _di_level_0_parameter_checking_
- if (path == 0) return F_status_set_error(F_parameter);
+ if (!path) return F_status_set_error(F_parameter);
if (at_id <= 0) return F_status_set_error(F_parameter);
- if (file_stat == 0) return F_status_set_error(F_parameter);
+ if (!file_stat) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
return private_f_file_stat_at(at_id, path, flag, file_stat);
f_return_status f_file_stat_by_id(const int id, struct stat *file_stat) {
#ifndef _di_level_0_parameter_checking_
if (id <= 0) return F_status_set_error(F_parameter);
- if (file_stat == 0) return F_status_set_error(F_parameter);
+ if (!file_stat) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
return private_f_file_stat_by_id(id, file_stat);
#ifndef _di_f_file_touch_
f_return_status f_file_touch(const f_string_t path, const mode_t mode, const bool dereference) {
#ifndef _di_level_0_parameter_checking_
- if (path == 0) return F_status_set_error(F_parameter);
+ if (!path) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
f_status_t status = F_none;
#ifndef _di_f_file_touch_at_
f_return_status f_file_touch_at(const int at_id, const f_string_t path, const mode_t mode, const int flag) {
#ifndef _di_level_0_parameter_checking_
- if (path == 0) return F_status_set_error(F_parameter);
+ if (!path) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
f_status_t status = F_none;
#ifndef _di_f_file_type_
f_return_status f_file_type(const f_string_t path, int *type) {
#ifndef _di_level_0_parameter_checking_
- if (path == 0) return F_status_set_error(F_parameter);
- if (type == 0) return F_status_set_error(F_parameter);
+ if (!path) return F_status_set_error(F_parameter);
+ if (!type) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
struct stat file_stat;
#ifndef _di_f_file_type_at_
f_return_status f_file_type_at(const int at_id, const f_string_t path, const int flag, int *type) {
#ifndef _di_level_0_parameter_checking_
- if (path == 0) return F_status_set_error(F_parameter);
- if (type == 0) return F_status_set_error(F_parameter);
+ if (!path) return F_status_set_error(F_parameter);
+ if (!type) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
struct stat file_stat;
#ifndef _di_f_file_write_
f_return_status f_file_write(const f_file_t file, const f_string_static_t buffer, f_string_length_t *written) {
#ifndef _di_level_0_parameter_checking_
- if (file.size_write == 0) return F_status_set_error(F_parameter);
+ 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_level_0_parameter_checking_
if (file.id == -1) return F_status_set_error(F_file_closed);
- if (buffer.used == 0) {
+ if (!buffer.used) {
if (written) *written = 0;
return F_data_not;
}
#ifndef _di_f_file_write_block_
f_return_status f_file_write_block(const f_file_t file, const f_string_static_t buffer, f_string_length_t *written) {
#ifndef _di_level_0_parameter_checking_
- if (file.size_write == 0) return F_status_set_error(F_parameter);
+ 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_level_0_parameter_checking_
if (file.id == -1) return F_status_set_error(F_file_closed);
- if (buffer.used == 0) {
+ if (!buffer.used) {
if (written) *written = 0;
return F_data_not;
}
#ifndef _di_f_file_write_until_
f_return_status 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) {
#ifndef _di_level_0_parameter_checking_
- if (file.size_write == 0) return F_status_set_error(F_parameter);
+ 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_level_0_parameter_checking_
if (file.id == -1) return F_status_set_error(F_file_closed);
- if (buffer.used == 0 || total == 0) {
+ if (!buffer.used || !total) {
if (written) *written = 0;
return F_data_not;
}
#ifndef _di_f_file_write_range_
f_return_status 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) {
#ifndef _di_level_0_parameter_checking_
- if (file.size_write == 0) return F_status_set_error(F_parameter);
+ if (!file.size_write) return F_status_set_error(F_parameter);
if (buffer.used > buffer.size) return F_status_set_error(F_parameter);
if (range.stop < range.start) return F_status_set_error(F_parameter);
if (range.start >= buffer.used) return F_status_set_error(F_parameter);
if (file.id == -1) return F_status_set_error(F_file_closed);
- if (buffer.used == 0) {
+ if (!buffer.used) {
if (written) *written = 0;
return F_data_not;
}
#if !defined(_di_f_file_open_) || !defined(_di_f_file_copy_)
f_return_status private_f_file_open(const f_string_t path, const mode_t mode, f_file_t *file) {
- if (mode == 0) {
+ if (!mode) {
file->id = open(path, file->flag);
}
else {
#if !defined(_di_f_file_open_at_) || !defined(_di_f_file_copy_at_)
f_return_status private_f_file_open_at(const int at_id, const f_string_t path, const mode_t mode, f_file_t *file) {
- if (mode == 0) {
+ if (!mode) {
file->id = openat(at_id, path, file->flag);
}
else {
}
} // while
- if (size_write == 0) {
+ if (!size_write) {
return F_none_stop;
}
#ifndef _di_f_fss_count_lines_
f_return_status f_fss_count_lines(const f_string_static_t buffer, const f_string_length_t before, f_string_length_t *line) {
#ifndef _di_level_0_parameter_checking_
- if (buffer.used == 0) return F_status_set_error(F_parameter);
+ if (!buffer.used) return F_status_set_error(F_parameter);
if (before >= buffer.used) return F_status_set_error(F_parameter);
- if (line == 0) return F_status_set_error(F_parameter);
+ if (!line) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
f_string_length_t i = before;
#ifndef _di_f_fss_count_lines_range_
f_return_status 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) {
#ifndef _di_level_0_parameter_checking_
- if (buffer.used == 0) return F_status_set_error(F_parameter);
+ if (!buffer.used) return F_status_set_error(F_parameter);
if (range.start > range.stop) return F_status_set_error(F_parameter);
if (range.start >= buffer.used) return F_status_set_error(F_parameter);
if (before >= buffer.used) return F_status_set_error(F_parameter);
if (before > range.stop) return F_status_set_error(F_parameter);
- if (line == 0) return F_status_set_error(F_parameter);
+ if (!line) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
f_string_length_t i = before;
#ifndef _di_f_fss_is_graph_
f_return_status f_fss_is_graph(const f_string_static_t buffer, const f_string_range_t range) {
#ifndef _di_level_0_parameter_checking_
- if (buffer.used == 0) return F_status_set_error(F_parameter);
+ if (!buffer.used) return F_status_set_error(F_parameter);
if (range.start < 0) return F_status_set_error(F_parameter);
if (range.stop < range.start) return F_status_set_error(F_parameter);
if (range.start >= buffer.used) return F_status_set_error(F_parameter);
#ifndef _di_f_fss_is_space_
f_return_status f_fss_is_space(const f_string_static_t buffer, const f_string_range_t range) {
#ifndef _di_level_0_parameter_checking_
- if (buffer.used == 0) return F_status_set_error(F_parameter);
+ if (!buffer.used) return F_status_set_error(F_parameter);
if (range.start < 0) return F_status_set_error(F_parameter);
if (range.stop < range.start) return F_status_set_error(F_parameter);
if (range.start >= buffer.used) return F_status_set_error(F_parameter);
#ifndef _di_f_fss_is_zero_width_
f_return_status f_fss_is_zero_width(const f_string_static_t buffer, const f_string_range_t range) {
#ifndef _di_level_0_parameter_checking_
- if (buffer.used == 0) return F_status_set_error(F_parameter);
+ if (!buffer.used) return F_status_set_error(F_parameter);
if (range.start < 0) return F_status_set_error(F_parameter);
if (range.stop < range.start) return F_status_set_error(F_parameter);
if (range.start >= buffer.used) return F_status_set_error(F_parameter);
#ifndef _di_f_fss_shift_delimiters_
f_return_status f_fss_shift_delimiters(f_string_dynamic_t *buffer, const f_string_range_t range) {
#ifndef _di_level_0_parameter_checking_
- if (buffer->used == 0) return F_status_set_error(F_parameter);
+ if (!buffer->used) return F_status_set_error(F_parameter);
if (range.start < 0) return F_status_set_error(F_parameter);
if (range.stop < range.start) return F_status_set_error(F_parameter);
if (range.start >= buffer->used) return F_status_set_error(F_parameter);
#ifndef _di_f_fss_skip_past_space_
f_return_status f_fss_skip_past_space(const f_string_static_t buffer, f_string_range_t *range) {
#ifndef _di_level_0_parameter_checking_
- if (buffer.used == 0) return F_status_set_error(F_parameter);
- if (range == 0) return F_status_set_error(F_parameter);
+ if (!buffer.used) return F_status_set_error(F_parameter);
+ if (!range) return F_status_set_error(F_parameter);
if (range->start > range->stop) return F_status_set_error(F_parameter);
if (range->start >= buffer.used) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
width = f_macro_utf_byte_width_is(buffer.string[range->start]);
- if (width == 0) {
+ if (!width) {
width = 1;
}
// Do not operate on UTF-8 fragments that are not the first byte of the character.
#ifndef _di_f_fss_skip_past_non_graph_
f_return_status f_fss_skip_past_non_graph(const f_string_static_t buffer, f_string_range_t *range) {
#ifndef _di_level_0_parameter_checking_
- if (buffer.used == 0) return F_status_set_error(F_parameter);
- if (range == 0) return F_status_set_error(F_parameter);
+ if (!buffer.used) return F_status_set_error(F_parameter);
+ if (!range) return F_status_set_error(F_parameter);
if (range->start > range->stop) return F_status_set_error(F_parameter);
if (range->start >= buffer.used) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
width = f_macro_utf_byte_width_is(buffer.string[range->start]);
- if (width == 0) {
+ if (!width) {
width = 1;
}
// Do not operate on UTF-8 fragments that are not the first byte of the character.
while (sets.used > 0) { \
sets.used--; \
f_macro_fss_named_t_delete_simple(sets.array[sets.used]); \
- if (sets.used == 0) { \
+ if (!sets.used) { \
if (f_memory_delete((void **) & sets.array, sizeof(f_fss_named_t), sets.size)) { \
sets.size = 0; \
} \
while (sets.used > 0) { \
sets.used--; \
f_macro_fss_named_t_destroy_simple(sets.array[sets.used]); \
- if (sets.used == 0) { \
+ if (!sets.used) { \
if (f_memory_destroy((void **) & sets.array, sizeof(f_fss_named_t), sets.size)) { \
sets.size = 0; \
} \
while (items.used > 0) { \
items.used--; \
f_macro_fss_item_t_delete_simple(items.array[items.used]); \
- if (items.used == 0) { \
+ if (!items.used) { \
if (f_memory_delete((void **) & items.array, sizeof(f_fss_item_t), items.size)) { \
items.size = 0; \
} \
while (items.used > 0) { \
items.used--; \
f_macro_fss_item_t_destroy_simple(status, items.array[items.used]); \
- if (items.used == 0) { \
+ if (!items.used) { \
if (f_memory_destroy((void **) & items.array, sizeof(f_fss_item_t), items.size)) { \
items.size = 0; \
} \
while (nest.used > 0) { \
nest.used--; \
f_macro_fss_items_t_delete_simple(nest.depth[nest.used]); \
- if (nest.used == 0) { \
+ if (!nest.used) { \
if (f_memory_delete((void **) & nest.depth, sizeof(f_fss_items_t), nest.size)) { \
nest.size = 0; \
} \
while (nest.used > 0) { \
nest.used--; \
f_macro_fss_items_t_destroy_simple(nest.depth[nest.used]); \
- if (nest.used == 0) { \
+ if (!nest.used) { \
if (f_memory_destroy((void **) & nest.depth, sizeof(f_fss_items_t), nest.size)) { \
nest.size = 0; \
} \
while (nests.used > 0) { \
nests.used--; \
f_macro_fss_nest_t_delete_simple(nests.array[nests.used]); \
- if (nests.used == 0) { \
+ if (!nests.used) { \
if (f_memory_delete((void **) & nests.array, sizeof(f_fss_nest_t), nests.size)) { \
nests.size = 0; \
} \
while (nests.used > 0) { \
nests.used--; \
f_macro_fss_nest_t_destroy_simple(nests.array[nests.used]); \
- if (nests.used == 0) { \
+ if (!nests.used) { \
if (f_memory_destroy((void **) & nests.array, sizeof(f_fss_nest_t), nests.size)) { \
nests.size = 0; \
} \
while (sets.used > 0) { \
sets.used--; \
f_macro_fss_set_t_delete_simple(sets.array[sets.used]); \
- if (sets.used == 0) { \
+ if (!sets.used) { \
if (f_memory_delete((void **) & sets.array, sizeof(f_fss_set_t), sets.size)) { \
sets.size = 0; \
} \
while (sets.used > 0) { \
sets.used--; \
f_macro_fss_set_t_destroy_simple(sets.array[sets.used]); \
- if (sets.used == 0) { \
+ if (!sets.used) { \
if (f_memory_destroy((void **) & sets.array, sizeof(f_fss_set_t), sets.size)) { \
sets.size = 0; \
} \
while (sets.used > 0) { \
sets.used--; \
f_macro_fss_set_quoted_t_delete_simple(sets.array[sets.used]); \
- if (sets.used == 0) { \
+ if (!sets.used) { \
if (f_memory_delete((void **) & sets.array, sizeof(f_fss_set_quoted_t), sets.size)) { \
sets.size = 0; \
} \
while (sets.used > 0) { \
sets.used--; \
f_macro_fss_set_quoted_t_destroy_simple(sets.array[sets.used]); \
- if (sets.used == 0) { \
+ if (!sets.used) { \
if (f_memory_destroy((void **) & sets.array, sizeof(f_fss_set_quoted_t), sets.size)) { \
sets.size = 0; \
} \
#ifndef _di_f_iki_read_
f_return_status f_iki_read(f_string_static_t *buffer, f_string_range_t *range, f_iki_variable_t *variable, f_iki_vocabulary_t *vocabulary, f_iki_content_t *content) {
#ifndef _di_level_0_parameter_checking_
- if (buffer == 0) return F_status_set_error(F_parameter);
- if (buffer->used == 0) return F_status_set_error(F_parameter);
- if (range == 0) return F_status_set_error(F_parameter);
- if (variable == 0) return F_status_set_error(F_parameter);
- if (vocabulary == 0) return F_status_set_error(F_parameter);
- if (content == 0) return F_status_set_error(F_parameter);
+ if (!buffer) return F_status_set_error(F_parameter);
+ if (!buffer->used) return F_status_set_error(F_parameter);
+ if (!range) return F_status_set_error(F_parameter);
+ if (!variable) return F_status_set_error(F_parameter);
+ if (!vocabulary) return F_status_set_error(F_parameter);
+ if (!content) return F_status_set_error(F_parameter);
if (range->start > range->stop) return F_status_set_error(F_parameter);
if (range->start >= buffer->used) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
structures.used--; \
f_macro_memory_structure_t_delete_simple(structures.array[structures.used], type_structure); \
} \
- if (structures.used == 0) { \
+ if (!structures.used) { \
if (f_memory_delete((void **) & structures.array, sizeof(type_structures), structures.size)) { \
structures.size = 0; \
} \
structures.used--; \
f_macro_memory_structure_t_destroy_simple(structures.array[structures.used], type_structure); \
} \
- if (structures.used == 0) { \
+ if (!structures.used) { \
if (f_memory_destroy((void **) & structures.array, sizeof(type_structures), structures.size)) { \
structures.size = 0; \
} \
f_return_status f_memory_new(void **pointer, const f_memory_size_t type, const f_memory_length length) {
#ifndef _di_level_0_parameter_checking_
if (type <= 0) return F_status_set_error(F_parameter);
- if (pointer == 0) return F_status_set_error(F_parameter);
+ if (!pointer) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
// prevent double-allocations.
#if ! ( defined (_di_f_memory_delete_) || defined (_f_memory_FORCE_secure_memory_) )
f_return_status f_memory_delete(void **pointer, const f_memory_size_t type, const f_memory_length length) {
#ifndef _di_level_0_parameter_checking_
- if (pointer == 0) return F_status_set_error(F_parameter);
+ if (!pointer) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
// prevent double-frees.
- if (*pointer == 0) return F_none;
+ if (!*pointer) return F_none;
free(*pointer);
#ifndef _di_level_0_parameter_checking_
if (length < 0) return F_status_set_error(F_parameter);
if (type <= 0) return F_status_set_error(F_parameter);
- if (pointer == 0) return F_status_set_error(F_parameter);
+ if (!pointer) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
// prevent double-frees.
- if (*pointer == 0) return F_none;
+ if (!*pointer) return F_none;
if (length > 0) {
memset(*pointer, 0, type * length);
if (type <= 0) return F_status_set_error(F_parameter);
if (old_length < 0) return F_status_set_error(F_parameter);
if (new_length < 0) return F_status_set_error(F_parameter);
- if (pointer == 0) return F_status_set_error(F_parameter);
+ if (!pointer) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
// don't be wasteful.
if (type <= 0) return F_status_set_error(F_parameter);
if (old_length < 0) return F_status_set_error(F_parameter);
if (new_length < 0) return F_status_set_error(F_parameter);
- if (pointer == 0) return F_status_set_error(F_parameter);
+ if (!pointer) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
// don't be wasteful
#ifndef _di_f_path_current_
f_return_status f_path_current(const bool real, f_string_dynamic_t *path) {
#ifndef _di_level_0_parameter_checking_
- if (path == 0) return F_status_set_error(F_parameter);
+ if (!path) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
char buffer[f_path_max];
#ifndef _di_f_print_
f_return_status f_print(FILE *output, const f_string_t string, const f_string_length_t length) {
#ifndef _di_level_0_parameter_checking_
- if (output == 0) return F_status_set_error(F_parameter);
- if (string == 0) return F_status_set_error(F_parameter);
+ if (!output) return F_status_set_error(F_parameter);
+ if (!string) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
return private_f_print(output, string, length);
#ifndef _di_f_print_dynamic_
f_return_status f_print_dynamic(FILE *output, const f_string_static_t buffer) {
#ifndef _di_level_0_parameter_checking_
- if (output == 0) return F_status_set_error(F_parameter);
+ if (!output) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
return private_f_print(output, buffer.string, buffer.used);
#ifndef _di_f_print_dynamic_partial_
f_return_status f_print_dynamic_partial(FILE *output, const f_string_static_t buffer, const f_string_range_t range) {
#ifndef _di_level_0_parameter_checking_
- if (output == 0) return F_status_set_error(F_parameter);
+ if (!output) return F_status_set_error(F_parameter);
if (range.start < 0) return F_status_set_error(F_parameter);
if (range.start > range.stop) return F_status_set_error(F_parameter);
if (range.start >= buffer.used) return F_status_set_error(F_parameter);
#ifndef _di_f_print_to_
f_return_status f_print_to(const int id, const f_string_t string, const f_string_length_t length) {
#ifndef _di_level_0_parameter_checking_
- if (string == 0) return F_status_set_error(F_parameter);
+ if (!string) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
return private_f_print_to(id, string, length);
#if !defined(_di_f_print_) || !defined(_di_f_print_dynamic_) || !defined(_di_f_print_dynamic_partial_)
f_return_status private_f_print(FILE *output, const f_string_t string, const f_string_length_t length) {
- if (length == 0) return F_data_not;
+ if (!length) return F_data_not;
for (register f_string_length_t i = 0; i < length; ++i) {
if (!string[i]) continue;
#if !defined(_di_f_print_to_) || !defined(_di_f_print_dynamic_to_) || !defined(_di_f_print_dynamic_partial_to_)
f_return_status private_f_print_to(const int id, const f_string_t string, const f_string_length_t length) {
- if (length == 0) return F_data_not;
+ if (!length) return F_data_not;
for (register f_string_length_t i = 0; i < length; ++i) {
if (!string[i]) continue;
#ifndef _di_f_serialize_simple_
f_return_status f_serialize_simple(const f_string_static_t value, f_string_dynamic_t *serialize) {
#ifndef _di_level_0_parameter_checking_
- if (serialize == 0) return F_status_set_error(F_parameter);
+ if (!serialize) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
f_status_t status = F_none;
if (F_status_is_error(status)) return status;
}
- if (serialize->used == 0) {
+ if (!serialize->used) {
memcpy(serialize->string + serialize->used, value.string, value.used);
serialize->used += value.used;
}
#ifndef _di_f_serialize_un_simple_
f_return_status f_serialize_un_simple(const f_string_static_t serialize, f_string_dynamics_t *strings) {
#ifndef _di_level_0_parameter_checking_
- if (serialize.used == 0) return F_status_set_error(F_parameter);
- if (strings == 0) return F_status_set_error(F_parameter);
+ if (!serialize.used) return F_status_set_error(F_parameter);
+ if (!strings) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
f_status_t status = F_none;
#ifndef _di_f_serialize_un_simple_map_
f_return_status f_serialize_un_simple_map(const f_string_static_t serialize, f_string_ranges_t *locations) {
#ifndef _di_level_0_parameter_checking_
- if (serialize.used == 0) return F_status_set_error(F_parameter);
- if (locations == 0) return F_status_set_error(F_parameter);
+ if (!serialize.used) return F_status_set_error(F_parameter);
+ if (!locations) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
f_status_t status = F_none;
#ifndef _di_f_serialize_un_simple_find_
f_return_status f_serialize_un_simple_find(const f_string_static_t serialize, const f_array_length_t index, f_string_range_t *range) {
#ifndef _di_level_0_parameter_checking_
- if (serialize.used == 0) return F_status_set_error(F_parameter);
- if (range == 0) return F_status_set_error(F_parameter);
+ if (!serialize.used) return F_status_set_error(F_parameter);
+ if (!range) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
return private_f_serialize_un_simple_find(serialize, index, range);
#ifndef _di_f_serialize_un_simple_get_
f_return_status f_serialize_un_simple_get(const f_string_static_t serialize, const f_array_length_t index, f_string_dynamic_t *dynamic) {
#ifndef _di_level_0_parameter_checking_
- if (serialize.used == 0) return F_status_set_error(F_parameter);
- if (dynamic == 0) return F_status_set_error(F_parameter);
+ if (!serialize.used) return F_status_set_error(F_parameter);
+ if (!dynamic) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
f_string_range_t range = f_string_range_t_initialize;
while (dynamics.used > 0) { \
dynamics.used--; \
f_macro_string_dynamic_t_delete_simple(dynamics.array[dynamics.used]); \
- if (dynamics.used == 0) { \
+ if (!dynamics.used) { \
if (f_memory_delete((void **) & dynamics.array, sizeof(f_string_dynamic_t), dynamics.size)) { \
dynamics.size = 0; \
} \
while (dynamics.used > 0) { \
dynamics.used--; \
f_macro_string_dynamic_t_destroy_simple(dynamics.array[dynamics.used]); \
- if (dynamics.used == 0) { \
+ if (!dynamics.used) { \
if (f_memory_destroy((void **) & dynamics.array, sizeof(f_string_dynamic_t), dynamics.size)) { \
dynamics.size = 0; \
} \
while (maps.used > 0) { \
maps.used--; \
f_macro_string_map_t_delete_simple(maps.array[maps.used]); \
- if (maps.used == 0) { \
+ if (!maps.used) { \
if (f_memory_delete((void **) & maps.array, sizeof(f_string_map_t), maps.size)) { \
maps.size = 0; \
} \
while (maps.used > 0) { \
maps.used--; \
f_macro_string_map_t_destroy_simple(maps.array[maps.used]); \
- if (maps.used == 0) { \
+ if (!maps.used) { \
if (f_memory_destroy((void **) & maps.array, sizeof(f_string_map_t), maps.size)) { \
maps.size = 0; \
} \
while (maps.used > 0) { \
maps.used--; \
f_macro_string_map_multi_t_delete_simple(maps.array[maps.used]); \
- if (maps.used == 0) { \
+ if (!maps.used) { \
if (f_memory_delete((void **) & maps.array, sizeof(f_string_map_multi_t), maps.size)) { \
maps.size = 0; \
} \
while (maps.used > 0) { \
maps.used--; \
f_macro_string_map_multi_t_destroy_simple(maps.array[maps.used]); \
- if (maps.used == 0) { \
+ if (!maps.used) { \
if (f_memory_destroy((void **) & maps.array, sizeof(f_string_map_multi_t), maps.size)) { \
maps.size = 0; \
} \
#if !defined(_di_f_utf_character_is_ascii_) || !defined(_di_f_utf_is_ascii_)
f_return_status private_f_utf_character_is_ascii(const f_utf_character_t character, const uint8_t width) {
- if (width == 0) {
+ if (!width) {
const uint8_t byte_first = f_macro_utf_character_t_to_char_1(character);
if (byte_first >= 0x00 && byte_first <= 0x7f) {
// reduce the number of checks by grouping checks by byte.
const uint8_t byte_first = f_macro_utf_character_t_to_char_1(character);
- if (width == 0) {
+ if (!width) {
if (byte_first >= 0x00 && byte_first <= 0x7f) {
return F_true;
}
while (dynamics.used > 0) { \
dynamics.used--; \
f_macro_string_dynamic_t_delete_simple(dynamics.array[dynamics.used]); \
- if (dynamics.used == 0) { \
+ if (!dynamics.used) { \
if (f_memory_delete((void **) & dynamics.array, sizeof(f_utf_string_dynamic_t), dynamics.size)) { \
dynamics.size = 0; \
} \
while (dynamics.used > 0) { \
dynamics.used--; \
f_macro_string_dynamic_t_destroy_simple(dynamics.array[dynamics.used]); \
- if (dynamics.used == 0) { \
+ if (!dynamics.used) { \
if (f_memory_destroy((void **) & dynamics.array, sizeof(f_utf_string_dynamic_t), dynamics.size)) { \
dynamics.size = 0; \
} \
#ifndef _di_f_utf_buffer_decrement_
f_return_status f_utf_buffer_decrement(const f_string_static_t buffer, f_string_range_t *range, const f_string_length_t step) {
#ifndef _di_level_0_parameter_checking_
- if (range == 0) return F_status_set_error(F_parameter);
+ if (!range) return F_status_set_error(F_parameter);
if (range->start > range->stop) return F_status_set_error(F_parameter);
if (range->start >= buffer.used) return F_status_set_error(F_parameter);
if (step < 1) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- if (buffer.used == 0) return F_data_not;
+ if (!buffer.used) return F_data_not;
f_string_length_t i = 0;
uint8_t width = 0;
#ifndef _di_f_utf_buffer_increment_
f_return_status f_utf_buffer_increment(const f_string_static_t buffer, f_string_range_t *range, const f_string_length_t step) {
#ifndef _di_level_0_parameter_checking_
- if (range == 0) return F_status_set_error(F_parameter);
+ if (!range) return F_status_set_error(F_parameter);
if (range->start > range->stop) return F_status_set_error(F_parameter);
if (range->start >= buffer.used) return F_status_set_error(F_parameter);
if (step < 1) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- if (buffer.used == 0) return F_data_not;
+ if (!buffer.used) return F_data_not;
f_string_length_t i = 0;
uint8_t width = 0;
f_return_status f_utf_character_is(const f_utf_character_t character) {
const uint8_t width = f_macro_utf_character_t_width_is(character);
- if (width == 0) {
+ if (!width) {
return F_false;
}
f_return_status f_utf_character_is_alpha(const f_utf_character_t character) {
const uint8_t width = f_macro_utf_character_t_width_is(character);
- if (width == 0) {
+ if (!width) {
if (isalpha(f_macro_utf_character_t_to_char_1(character))) {
return F_true;
}
f_return_status f_utf_character_is_alpha_digit(const f_utf_character_t character) {
const uint8_t width = f_macro_utf_character_t_width_is(character);
- if (width == 0) {
+ if (!width) {
if (isalnum(f_macro_utf_character_t_to_char_1(character))) {
return F_true;
}
f_return_status f_utf_character_is_alpha_numeric(const f_utf_character_t character) {
const uint8_t width = f_macro_utf_character_t_width_is(character);
- if (width == 0) {
+ if (!width) {
if (isalnum(f_macro_utf_character_t_to_char_1(character))) {
return F_true;
}
f_return_status f_utf_character_is_combining(const f_utf_character_t character) {
const uint8_t width = f_macro_utf_character_t_width_is(character);
- if (width == 0) {
+ if (!width) {
// There are no combining characters in ASCII.
return F_false;
}
f_return_status f_utf_character_is_control(const f_utf_character_t character) {
const uint8_t width = f_macro_utf_character_t_width_is(character);
- if (width == 0) {
+ if (!width) {
if (iscntrl(f_macro_utf_character_t_to_char_1(character))) {
return F_true;
}
f_return_status f_utf_character_is_control_picture(const f_utf_character_t character) {
const uint8_t width = f_macro_utf_character_t_width_is(character);
- if (width == 0) {
+ if (!width) {
// There are no control picture characters in ASCII.
return F_false;
f_return_status f_utf_character_is_digit(const f_utf_character_t character) {
const uint8_t width = f_macro_utf_character_t_width_is(character);
- if (width == 0) {
+ if (!width) {
if (isdigit(f_macro_utf_character_t_to_char_1(character))) {
return F_true;
}
f_return_status f_utf_character_is_emoji(const f_utf_character_t character) {
const uint8_t width = f_macro_utf_character_t_width_is(character);
- if (width == 0) {
+ if (!width) {
if (isdigit(f_macro_utf_character_t_to_char_1(character))) {
return F_true;
}
f_return_status f_utf_character_is_graph(const f_utf_character_t character) {
const uint8_t width = f_macro_utf_character_t_width_is(character);
- if (width == 0) {
+ if (!width) {
if (isgraph(f_macro_utf_character_t_to_char_1(character))) {
return F_true;
}
f_return_status f_utf_character_is_numeric(const f_utf_character_t character) {
const uint8_t width = f_macro_utf_character_t_width_is(character);
- if (width == 0) {
+ if (!width) {
if (isdigit(f_macro_utf_character_t_to_char_1(character))) {
return F_true;
}
f_return_status f_utf_character_is_phonetic(const f_utf_character_t character) {
const uint8_t width = f_macro_utf_character_t_width_is(character);
- if (width == 0) {
+ if (!width) {
// There are no ASCII phonetic characters.
return F_false;
f_return_status f_utf_character_is_private(const f_utf_character_t character) {
const uint8_t width = f_macro_utf_character_t_width_is(character);
- if (width == 0) {
+ if (!width) {
// There are no ASCII private characters.
return F_false;
f_return_status f_utf_character_is_punctuation(const f_utf_character_t character) {
const uint8_t width = f_macro_utf_character_t_width_is(character);
- if (width == 0) {
+ if (!width) {
// ASCII: '!' to '#'.
if (character > 0x20000000 && character < 0x24000000) {
f_return_status f_utf_character_is_symbol(const f_utf_character_t character) {
const uint8_t width = f_macro_utf_character_t_width_is(character);
- if (width == 0) {
+ if (!width) {
// ASCII: '$' or '+'.
if (character == 0x24000000 || character == 0x2b000000) {
f_return_status f_utf_character_is_unassigned(const f_utf_character_t character) {
const uint8_t width = f_macro_utf_character_t_width_is(character);
- if (width == 0 || width == 1) {
+ if (!width || width == 1) {
return F_false;
}
f_return_status f_utf_character_is_whitespace(const f_utf_character_t character) {
const uint8_t width = f_macro_utf_character_t_width_is(character);
- if (width == 0) {
+ if (!width) {
if (isspace(f_macro_utf_character_t_to_char_1(character))) {
return F_true;
}
f_return_status f_utf_character_is_whitespace_modifier(const f_utf_character_t character) {
const uint8_t width = f_macro_utf_character_t_width_is(character);
- if (width == 0) {
+ if (!width) {
// There are no ASCII whitespace modifiers.
return F_false;
}
f_return_status f_utf_character_is_whitespace_other(const f_utf_character_t character) {
const uint8_t width = f_macro_utf_character_t_width_is(character);
- if (width == 0) {
+ if (!width) {
// There are no ASCII whitespace other.
return F_false;
f_return_status f_utf_character_is_word(const f_utf_character_t character, const bool strict) {
const uint8_t width = f_macro_utf_character_t_width_is(character);
- if (width == 0) {
+ if (!width) {
if (isalnum(f_macro_utf_character_t_to_char_1(character)) || character == '_') {
return F_true;
}
f_return_status f_utf_character_is_word_dash(const f_utf_character_t character, const bool strict) {
const uint8_t width = f_macro_utf_character_t_width_is(character);
- if (width == 0) {
+ if (!width) {
if (isalnum(f_macro_utf_character_t_to_char_1(character)) || character == '_' || character == '-') {
return F_true;
}
f_return_status f_utf_character_is_word_dash_plus(const f_utf_character_t character, const bool strict) {
const uint8_t width = f_macro_utf_character_t_width_is(character);
- if (width == 0) {
+ if (!width) {
if (isalnum(f_macro_utf_character_t_to_char_1(character)) || character == '_' || character == '-' || character == '+') {
return F_true;
}
f_return_status f_utf_character_is_zero_width(const f_utf_character_t character) {
const uint8_t width = f_macro_utf_character_t_width_is(character);
- if (width == 0) {
+ if (!width) {
const uint8_t ascii = f_macro_utf_character_t_to_char_1(character);
// These control characters are considered zero-width spaces.
#ifndef _di_f_utf_character_to_char_
f_return_status f_utf_character_to_char(const f_utf_character_t utf_character, f_string_t *character, f_string_length_t *width_max) {
#ifndef _di_level_0_parameter_checking_
- if (utf_character == 0) return F_status_set_error(F_parameter);
- if (width_max == 0 && *character != 0) return F_status_set_error(F_parameter);
- if (width_max != 0 && *character == 0) return F_status_set_error(F_parameter);
- if (width_max != 0 && *width_max > 4) return F_status_set_error(F_parameter);
+ if (!utf_character) return F_status_set_error(F_parameter);
+ if (!width_max && *character) return F_status_set_error(F_parameter);
+ if (width_max && !*character) return F_status_set_error(F_parameter);
+ if (width_max && *width_max > 4) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
f_status_t status = F_none;
uint8_t width = f_macro_utf_character_t_width_is(utf_character);
- if (width_max == 0) {
+ if (!width_max) {
f_macro_string_t_new(status, *character, width);
if (F_status_is_error(status)) return status;
const uint8_t width = f_macro_utf_byte_width_is(*character);
- if (width == 0) {
+ if (!width) {
return F_false;
}
const uint8_t width = f_macro_utf_byte_width_is(*character);
- if (width == 0) {
+ if (!width) {
if (isalpha(*character)) {
return F_true;
}
const uint8_t width = f_macro_utf_byte_width_is(*character);
- if (width == 0) {
+ if (!width) {
if (isalnum(*character)) {
return F_true;
}
const uint8_t width = f_macro_utf_byte_width_is(*character);
- if (width == 0) {
+ if (!width) {
if (isalnum(*character)) {
return F_true;
}
const uint8_t width = f_macro_utf_byte_width_is(*character);
// There are no ASCII combining characters.
- if (width == 0) {
+ if (!width) {
return F_false;
}
const uint8_t width = f_macro_utf_byte_width_is(*character);
- if (width == 0) {
+ if (!width) {
if (iscntrl(*character)) {
return F_true;
}
const uint8_t width = f_macro_utf_byte_width_is(*character);
// There are no ASCII control pictures.
- if (width == 0) {
+ if (!width) {
return F_false;
}
const uint8_t width = f_macro_utf_byte_width_is(*character);
- if (width == 0) {
+ if (!width) {
if (isdigit(*character)) {
return F_true;
}
const uint8_t width = f_macro_utf_byte_width_is(*character);
- if (width == 0) {
+ if (!width) {
if (isdigit(*character)) {
return F_true;
}
const uint8_t width = f_macro_utf_byte_width_is(*character);
- if (width == 0) {
+ if (!width) {
if (isgraph(*character)) {
return F_true;
}
const uint8_t width = f_macro_utf_byte_width_is(*character);
- if (width == 0) {
+ if (!width) {
if (isdigit(*character)) {
return F_true;
}
const uint8_t width = f_macro_utf_byte_width_is(*character);
- if (width == 0) {
+ if (!width) {
// There are no ASCII phonetic characters.
return F_false;
}
const uint8_t width = f_macro_utf_byte_width_is(*character);
- if (width == 0) {
+ if (!width) {
// There are no ASCII private characters.
return F_false;
}
const uint8_t width = f_macro_utf_byte_width_is(*character);
- if (width == 0) {
+ if (!width) {
// ASCII: '!' to '#'.
if (character[0] > 0x20 && character[0] < 0x24) {
const uint8_t width = f_macro_utf_byte_width_is(*character);
- if (width == 0) {
+ if (!width) {
// ASCII: '$' or '+'.
if (character[0] == 0x24 || character[0] == 0x2b) {
const uint8_t width = f_macro_utf_byte_width_is(*character);
- if (width == 0 || width == 1) {
+ if (!width || width == 1) {
return F_false;
}
const uint8_t width = f_macro_utf_byte_width_is(*character);
- if (width == 0) {
+ if (!width) {
if (isspace(*character)) {
return F_true;
}
const uint8_t width = f_macro_utf_byte_width_is(*character);
- if (width == 0) {
+ if (!width) {
// There are no ASCII whitespace modifiers.
return F_false;
const uint8_t width = f_macro_utf_byte_width_is(*character);
- if (width == 0) {
+ if (!width) {
// There are no ASCII whitespace other.
return F_false;
const uint8_t width = f_macro_utf_byte_width_is(*character);
- if (width == 0) {
+ if (!width) {
if (isalnum(*character) || *character == '_') {
return F_true;
}
const uint8_t width = f_macro_utf_byte_width_is(*character);
- if (width == 0) {
+ if (!width) {
if (isalnum(*character) || *character == '_' || *character == '-') {
return F_true;
}
const uint8_t width = f_macro_utf_byte_width_is(*character);
- if (width == 0) {
+ if (!width) {
if (isalnum(*character) || *character == '_' || *character == '-' || *character == '+') {
return F_true;
}
const uint8_t width = f_macro_utf_byte_width_is(*character);
- if (width == 0) {
+ if (!width) {
// These control characters are considered zero-width spaces.
if (*character >= 0x00 && *character <= 0x08) {
f_return_status f_utf_char_to_character(const f_string_t character, const f_string_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 == 0) return F_status_set_error(F_parameter);
+ if (!character_utf) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
const uint8_t width = f_macro_utf_byte_width_is(*character);
- if (width == 0) {
+ if (!width) {
*character_utf = f_macro_utf_character_t_from_char_1(character[0]);
return F_none;
}
#ifndef _di_fl_color_set_
f_return_status fl_color_set(FILE *file, const f_color_format_t format, const int8_t *color1, const int8_t *color2, const int8_t *color3, const int8_t *color4, const int8_t *color5) {
#ifndef _di_level_1_parameter_checking_
- if (file == 0) return F_status_set_error(F_parameter);
- if (color1 == 0) return F_status_set_error(F_parameter);
+ if (!file) return F_status_set_error(F_parameter);
+ if (!color1) return F_status_set_error(F_parameter);
// make sure all data is in the proper order
- if (color2 == 0 && (color3 != 0 || color4 != 0 || color5 != 0)) return F_status_set_error(F_parameter);
- if (color3 == 0 && (color4 != 0 || color5 != 0)) return F_status_set_error(F_parameter);
- if (color4 == 0 && color5 != 0) return F_status_set_error(F_parameter);
+ if (!color2 && (color3 != 0 || color4 != 0 || color5 != 0)) return F_status_set_error(F_parameter);
+ if (!color3 && (color4 != 0 || color5 != 0)) return F_status_set_error(F_parameter);
+ if (!color4 && color5 != 0) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- if (color2 == 0) fprintf(file, "%s%s%s", format.begin, color1, format.end);
- else if (color3 == 0) fprintf(file, "%s%s%s%s%s", format.begin, color1, format.medium, color2, format.end);
- else if (color4 == 0) fprintf(file, "%s%s%s%s%s%s%s", format.begin, color1, format.medium, color2, format.medium, color3, format.end);
- else if (color5 == 0) fprintf(file, "%s%s%s%s%s%s%s%s%s", format.begin, color1, format.medium, color2, format.medium, color3, format.medium, color4, format.end);
+ if (!color2) fprintf(file, "%s%s%s", format.begin, color1, format.end);
+ else if (!color3) fprintf(file, "%s%s%s%s%s", format.begin, color1, format.medium, color2, format.end);
+ else if (!color4) fprintf(file, "%s%s%s%s%s%s%s", format.begin, color1, format.medium, color2, format.medium, color3, format.end);
+ else if (!color5) fprintf(file, "%s%s%s%s%s%s%s%s%s", format.begin, color1, format.medium, color2, format.medium, color3, format.medium, color4, format.end);
else fprintf(file, "%s%s%s%s%s%s%s%s%s%s%s", format.begin, color1, format.medium, color2, format.medium, color3, format.medium, color4, format.medium, color5, format.end);
return F_none;
#ifndef _di_fl_color_save_
f_return_status fl_color_save(f_string_dynamic_t *buffer, const f_color_format_t format, const int8_t *color1, const int8_t *color2, const int8_t *color3, const int8_t *color4, const int8_t *color5) {
#ifndef _di_level_1_parameter_checking_
- if (buffer == 0) return F_status_set_error(F_parameter);
- if (color1 == 0) return F_status_set_error(F_parameter);
+ if (!buffer) return F_status_set_error(F_parameter);
+ if (!color1) return F_status_set_error(F_parameter);
// make sure all data is in the proper order
- if (color2 == 0 && (color3 != 0 || color4 != 0 || color5 != 0)) return F_status_set_error(F_parameter);
- if (color3 == 0 && (color4 != 0 || color5 != 0)) return F_status_set_error(F_parameter);
- if (color4 == 0 && color5 != 0) return F_status_set_error(F_parameter);
+ if (!color2 && (color3 != 0 || color4 != 0 || color5 != 0)) return F_status_set_error(F_parameter);
+ if (!color3 && (color4 != 0 || color5 != 0)) return F_status_set_error(F_parameter);
+ 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;
- if (color2 == 0) string_size += strnlen(color1, f_color_max_size);
- else if (color3 == 0) string_size += strnlen(color1, f_color_max_size) + strnlen(color2, f_color_max_size);
- else if (color4 == 0) string_size += strnlen(color1, f_color_max_size) + strnlen(color2, f_color_max_size) + strnlen(color3, f_color_max_size);
- else if (color5 == 0) string_size += strnlen(color1, f_color_max_size) + strnlen(color2, f_color_max_size) + strnlen(color3, f_color_max_size) + strnlen(color4, f_color_max_size);
+ 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);
+ else if (!color4) string_size += strnlen(color1, f_color_max_size) + strnlen(color2, f_color_max_size) + strnlen(color3, f_color_max_size);
+ else if (!color5) string_size += strnlen(color1, f_color_max_size) + strnlen(color2, f_color_max_size) + strnlen(color3, f_color_max_size) + strnlen(color4, f_color_max_size);
else string_size += strnlen(color1, f_color_max_size) + strnlen(color2, f_color_max_size) + strnlen(color3, f_color_max_size) + strnlen(color4, f_color_max_size) + strnlen(color5, f_color_max_size);
// make sure there is enough allocated space, if not, then allocate some more
}
}
- if (color2 == 0) {
+ if (!color2) {
strncat(buffer->string, format.begin, f_color_max_size);
strncat(buffer->string, color1, f_color_max_size);
strncat(buffer->string, format.end, f_color_max_size);
}
- else if (color3 == 0) {
+ else if (!color3) {
strncat(buffer->string, format.begin, f_color_max_size);
strncat(buffer->string, color1, f_color_max_size);
strncat(buffer->string, format.medium, f_color_max_size);
strncat(buffer->string, color2, f_color_max_size);
strncat(buffer->string, format.end, f_color_max_size);
}
- else if (color4 == 0) {
+ else if (!color4) {
strncat(buffer->string, format.begin, f_color_max_size);
strncat(buffer->string, color1, f_color_max_size);
strncat(buffer->string, format.medium, f_color_max_size);
strncat(buffer->string, color3, f_color_max_size);
strncat(buffer->string, format.end, f_color_max_size);
}
- else if (color5 == 0) {
+ else if (!color5) {
strncat(buffer->string, format.begin, f_color_max_size);
strncat(buffer->string, color1, f_color_max_size);
strncat(buffer->string, format.medium, f_color_max_size);
#ifndef _di_fl_color_print_
f_return_status fl_color_print(FILE *file, const f_color_set_t set, const f_string_t string, ...) {
#ifndef _di_level_1_parameter_checking_
- if (file == 0) return F_status_set_error(F_parameter);
- if (string == 0) return F_status_set_error(F_parameter);
+ if (!file) return F_status_set_error(F_parameter);
+ if (!string) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
if (set.before) {
#ifndef _di_fl_color_print2_
f_return_status fl_color_print2(FILE *file, const f_color_set_t set, const f_color_set_t extra, const f_string_t string, ...) {
#ifndef _di_level_1_parameter_checking_
- if (file == 0) return F_status_set_error(F_parameter);
- if (string == 0) return F_status_set_error(F_parameter);
+ if (!file) return F_status_set_error(F_parameter);
+ if (!string) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
f_status_t status = F_none;
#ifndef _di_fl_color_print_line_
f_return_status fl_color_print_line(FILE *file, const f_color_set_t set, const f_string_t string, ...) {
#ifndef _di_level_1_parameter_checking_
- if (file == 0) return F_status_set_error(F_parameter);
- if (string == 0) return F_status_set_error(F_parameter);
+ if (!file) return F_status_set_error(F_parameter);
+ if (!string) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
if (set.before) {
#ifndef _di_fl_color_print2_line_
f_return_status fl_color_print2_line(FILE *file, const f_color_set_t set, const f_color_set_t extra, const f_string_t string, ...) {
#ifndef _di_level_1_parameter_checking_
- if (file == 0) return F_status_set_error(F_parameter);
- if (string == 0) return F_status_set_error(F_parameter);
+ if (!file) return F_status_set_error(F_parameter);
+ if (!string) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
f_status_t status = F_none;
#ifndef _di_fl_color_load_context_
f_return_status fl_color_load_context(f_color_context_t *context, const bool use_light_colors) {
#ifndef _di_level_1_parameter_checking_
- if (context == 0) return F_status_set_error(F_parameter);
+ if (!context) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
f_status_t status = F_none;
#ifndef _fl_console_parameter_to_string_dynamic_directory_
f_return_status fl_console_parameter_to_string_dynamic_directory(const f_string_t argument, f_string_dynamic_t *directory) {
#ifndef _di_level_1_parameter_checking_
- if (argument == 0) return F_status_set_error(F_parameter);
+ if (!argument) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
f_status_t status = F_none;
f_string_length_t length = strlen(argument);
- if (length == 0) {
+ if (!length) {
directory->used = 0;
return F_none;
}
#ifndef _di_fl_conversion_string_to_binary_signed_
f_return_status fl_conversion_string_to_binary_signed(const f_string_t string, f_number_signed_t *number, const f_string_range_t range, const bool negative) {
#ifndef _di_level_1_parameter_checking_
- if (string == 0) return F_status_set_error(F_parameter);
- if (number == 0) return F_status_set_error(F_parameter);
+ if (!string) return F_status_set_error(F_parameter);
+ if (!number) return F_status_set_error(F_parameter);
if (range.start > range.stop) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- if (string[0] == 0) {
+ if (!string[0]) {
return F_data_not;
}
#ifndef _di_fl_conversion_string_to_binary_unsigned_
f_return_status fl_conversion_string_to_binary_unsigned(const f_string_t string, f_number_unsigned_t *number, const f_string_range_t range) {
#ifndef _di_level_1_parameter_checking_
- if (string == 0) return F_status_set_error(F_parameter);
- if (number == 0) return F_status_set_error(F_parameter);
+ if (!string) return F_status_set_error(F_parameter);
+ if (!number) return F_status_set_error(F_parameter);
if (range.start > range.stop) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- if (string[0] == 0) {
+ if (!string[0]) {
return F_data_not;
}
#ifndef _di_fl_conversion_string_to_decimal_signed_
f_return_status fl_conversion_string_to_decimal_signed(const f_string_t string, f_number_signed_t *number, const f_string_range_t range, const bool negative) {
#ifndef _di_level_1_parameter_checking_
- if (string == 0) return F_status_set_error(F_parameter);
- if (number == 0) return F_status_set_error(F_parameter);
+ if (!string) return F_status_set_error(F_parameter);
+ if (!number) return F_status_set_error(F_parameter);
if (range.start > range.stop) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- if (string[0] == 0) {
+ if (!string[0]) {
return F_data_not;
}
#ifndef _di_fl_conversion_string_to_decimal_unsigned_
f_return_status fl_conversion_string_to_decimal_unsigned(const f_string_t string, f_number_unsigned_t *number, const f_string_range_t range) {
#ifndef _di_level_1_parameter_checking_
- if (string == 0) return F_status_set_error(F_parameter);
- if (number == 0) return F_status_set_error(F_parameter);
+ if (!string) return F_status_set_error(F_parameter);
+ if (!number) return F_status_set_error(F_parameter);
if (range.start > range.stop) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- if (string[0] == 0) {
+ if (!string[0]) {
return F_data_not;
}
#ifndef _di_fl_conversion_string_to_duodecimal_signed_
f_return_status fl_conversion_string_to_duodecimal_signed(const f_string_t string, f_number_signed_t *number, const f_string_range_t range, const bool negative) {
#ifndef _di_level_1_parameter_checking_
- if (string == 0) return F_status_set_error(F_parameter);
- if (number == 0) return F_status_set_error(F_parameter);
+ if (!string) return F_status_set_error(F_parameter);
+ if (!number) return F_status_set_error(F_parameter);
if (range.start > range.stop) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- if (string[0] == 0) {
+ if (!string[0]) {
return F_data_not;
}
#ifndef _di_fl_conversion_string_to_duodecimal_unsigned_
f_return_status fl_conversion_string_to_duodecimal_unsigned(const f_string_t string, f_number_unsigned_t *number, const f_string_range_t range) {
#ifndef _di_level_1_parameter_checking_
- if (string == 0) return F_status_set_error(F_parameter);
- if (number == 0) return F_status_set_error(F_parameter);
+ if (!string) return F_status_set_error(F_parameter);
+ if (!number) return F_status_set_error(F_parameter);
if (range.start > range.stop) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- if (string[0] == 0) {
+ if (!string[0]) {
return F_data_not;
}
#ifndef _di_fl_conversion_string_to_hexidecimal_signed_
f_return_status fl_conversion_string_to_hexidecimal_signed(const f_string_t string, f_number_signed_t *number, const f_string_range_t range, const bool negative) {
#ifndef _di_level_1_parameter_checking_
- if (string == 0) return F_status_set_error(F_parameter);
- if (number == 0) return F_status_set_error(F_parameter);
+ if (!string) return F_status_set_error(F_parameter);
+ if (!number) return F_status_set_error(F_parameter);
if (range.start > range.stop) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- if (string[0] == 0) {
+ if (!string[0]) {
return F_data_not;
}
#ifndef _di_fl_conversion_string_to_hexidecimal_unsigned_
f_return_status fl_conversion_string_to_hexidecimal_unsigned(const f_string_t string, f_number_unsigned_t *number, const f_string_range_t range) {
#ifndef _di_level_1_parameter_checking_
- if (string == 0) return F_status_set_error(F_parameter);
- if (number == 0) return F_status_set_error(F_parameter);
+ if (!string) return F_status_set_error(F_parameter);
+ if (!number) return F_status_set_error(F_parameter);
if (range.start > range.stop) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- if (string[0] == 0) {
+ if (!string[0]) {
return F_data_not;
}
#ifndef _di_fl_conversion_string_to_octal_signed_
f_return_status fl_conversion_string_to_octal_signed(const f_string_t string, f_number_signed_t *number, const f_string_range_t range, const bool negative) {
#ifndef _di_level_1_parameter_checking_
- if (string == 0) return F_status_set_error(F_parameter);
- if (number == 0) return F_status_set_error(F_parameter);
+ if (!string) return F_status_set_error(F_parameter);
+ if (!number) return F_status_set_error(F_parameter);
if (range.start > range.stop) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- if (string[0] == 0) {
+ if (!string[0]) {
return F_data_not;
}
#ifndef _di_fl_conversion_string_to_octal_unsigned_
f_return_status fl_conversion_string_to_octal_unsigned(const f_string_t string, f_number_unsigned_t *number, const f_string_range_t range) {
#ifndef _di_level_1_parameter_checking_
- if (string == 0) return F_status_set_error(F_parameter);
- if (number == 0) return F_status_set_error(F_parameter);
+ if (!string) return F_status_set_error(F_parameter);
+ if (!number) return F_status_set_error(F_parameter);
if (range.start > range.stop) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- if (string[0] == 0) {
+ if (!string[0]) {
return F_data_not;
}
#ifndef _di_fl_conversion_string_to_number_signed_
f_return_status fl_conversion_string_to_number_signed(const f_string_t string, f_number_signed_t *number, const f_string_range_t range) {
#ifndef _di_level_1_parameter_checking_
- if (string == 0) return F_status_set_error(F_parameter);
- if (number == 0) return F_status_set_error(F_parameter);
+ if (!string) return F_status_set_error(F_parameter);
+ if (!number) return F_status_set_error(F_parameter);
if (range.start > range.stop) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- if (string[0] == 0) {
+ if (!string[0]) {
return F_data_not;
}
for (f_string_length_t i = range.start; i <= range.stop; i++) {
width = f_macro_utf_byte_width_is(string[i]);
- if (width == 0) {
+ if (!width) {
if (isspace(string[i])) {
- if (mode == 0 && vector == 0) {
+ if (!mode && !vector) {
offset++;
continue;
}
}
}
else {
- if (mode == 0 && vector == 0) {
+ if (!mode && !vector) {
width_max = (range.stop - i) + 1;
status = f_utf_is_whitespace(string + i, width_max);
// plus sign is only allowed as the first non-whitespace character.
if (string[i] == 0x2b) {
- if (mode == 0 && vector == 0) {
+ if (!mode && !vector) {
vector = 1;
offset++;
}
// negative sign is not allowed.
if (string[i] == 0x2d) {
- if (mode == 0 && vector == 0) {
+ if (!mode && !vector) {
vector = -1;
offset++;
}
return F_status_set_error(F_number);
} // for
- if (mode == 0) {
+ if (!mode) {
return F_status_set_error(F_number);
}
#ifndef _di_fl_conversion_string_to_number_unsigned_
f_return_status fl_conversion_string_to_number_unsigned(const f_string_t string, f_number_unsigned_t *number, const f_string_range_t range) {
#ifndef _di_level_1_parameter_checking_
- if (string == 0) return F_status_set_error(F_parameter);
- if (number == 0) return F_status_set_error(F_parameter);
+ if (!string) return F_status_set_error(F_parameter);
+ if (!number) return F_status_set_error(F_parameter);
if (range.start > range.stop) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- if (string[0] == 0) {
+ if (!string[0]) {
return F_data_not;
}
for (f_string_length_t i = range.start; i <= range.stop; i++) {
width = f_macro_utf_byte_width_is(string[i]);
- if (width == 0) {
+ if (!width) {
if (isspace(string[i])) {
- if (mode == 0) {
+ if (!mode) {
offset++;
continue;
}
}
}
else {
- if (mode == 0) {
+ if (!mode) {
width_max = (range.stop - i) + 1;
status = f_utf_is_whitespace(string + i, width_max);
return F_status_set_error(F_number);
} // for
- if (mode == 0) {
+ if (!mode) {
return F_status_set_error(F_number);
}
for (; i > 0; i--, static_source.used--) {
- if (source[i - 1] == 0) continue;
+ if (!source[i - 1]) continue;
if (source[i - 1] == f_path_separator[0]) continue;
break;
for (; i > 0; i--, static_destination.used--) {
- if (destination[i - 1] == 0) continue;
+ if (!destination[i - 1]) continue;
if (destination[i - 1] == f_path_separator[0]) continue;
break;
for (; i > 0; i--, static_source.used--) {
- if (source[i - 1] == 0) continue;
+ if (!source[i - 1]) continue;
if (source[i - 1] == f_path_separator[0]) continue;
break;
for (; i > 0; i--, static_destination.used--) {
- if (destination[i - 1] == 0) continue;
+ if (!destination[i - 1]) continue;
if (destination[i - 1] == f_path_separator[0]) continue;
break;
} // for
}
- if (recurse.depth_max == 0) {
+ if (!recurse.depth_max) {
return status;
}
- if (recurse.depth_max) {
- status = private_fl_directory_clone(static_source, static_destination, role, recurse, 1);
- }
+ status = private_fl_directory_clone(static_source, static_destination, role, recurse, 1);
if (status == F_none && recurse.output && recurse.verbose) {
recurse.verbose(recurse.output, source, destination);
for (; i > 0; i--, static_source.used--) {
- if (source[i - 1] == 0) continue;
+ if (!source[i - 1]) continue;
if (source[i - 1] == f_path_separator[0]) continue;
break;
for (; i > 0; i--, static_destination.used--) {
- if (destination[i - 1] == 0) continue;
+ if (!destination[i - 1]) continue;
if (destination[i - 1] == f_path_separator[0]) continue;
break;
for (; i > 0; i--, static_source.used--) {
- if (source[i - 1] == 0) continue;
+ if (!source[i - 1]) continue;
if (source[i - 1] == f_path_separator[0]) continue;
break;
for (; i > 0; i--, static_destination.used--) {
- if (destination[i - 1] == 0) continue;
+ if (!destination[i - 1]) continue;
if (destination[i - 1] == f_path_separator[0]) continue;
break;
if (path->used > path->size) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- if (path->used == 0) {
+ if (!path->used) {
return F_data_not;
}
for (; i > 0; i--) {
- if (path->string[i] == 0) continue;
+ if (!path->string[i]) continue;
status = f_utf_is_control(path->string + i, path->used - i);
if (status == F_true) continue;
first_nulless = F_true;
for (j = i; j > 0; j--) {
- if (path->string[j] == 0) continue;
+ if (!path->string[j]) continue;
status = f_utf_is_control(path->string + j, path->used - j);
if (status == F_true) continue;
if (destination->used > destination->size) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- if (length == 0) {
+ if (!length) {
return F_data_not;
}
if (destination->used > destination->size) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- if (source.used == 0) {
+ if (!source.used) {
return F_data_not;
}
DIR *parent = opendir(path);
- if (parent == 0) {
+ if (!parent) {
if (errno == ENOMEM) {
return F_status_set_error(F_memory_out);
}
size = strnlen(entity[i]->d_name, f_directory_name_max);
// There is no reason to include "." and ".." in the directory listing.
- if (strncmp(entity[i]->d_name, "..", 3) == 0 || strncmp(entity[i]->d_name, ".", 2) == 0) {
+ if (!strncmp(entity[i]->d_name, "..", 3) || !strncmp(entity[i]->d_name, ".", 2)) {
f_memory_delete((void **) & entity[i], sizeof(char *), 1);
continue;
}
f_memory_delete((void **) & entity, sizeof(struct dirent *), 1);
if (F_status_is_error(status)) return status;
- if (length == 0) return F_data_not;
+ if (!length) return F_data_not;
return F_none;
}
f_string_length_t j = 0;
if (destination->used > 0) {
- if (destination->string[destination->used - 1] == 0) {
+ if (!destination->string[destination->used - 1]) {
terminated_null = F_true;
total = 1;
}
for (i = destination->used - 1; i > 0; i--) {
- if (destination->string[i] == 0) continue;
+ if (!destination->string[i]) continue;
status = f_utf_is_control(destination->string + i, destination->used - i);
if (status == F_true) continue;
if (destination->string[i] == f_path_separator[0]) {
if (i - 1 > 0) {
for (j = i - 1; j > 0; j--) {
- if (destination->string[j] == 0) continue;
+ if (!destination->string[j]) continue;
status = f_utf_is_control(destination->string + j, destination->used - j);
if (status == F_true) continue;
break;
} // for
- if (destination->used > 0 && i == 0) {
+ if (destination->used > 0 && !i) {
if (destination->string[0] != 0 && destination->string[0] != f_path_separator[0]) {
separator_prepend = F_true;
total++;
}
for (i = length - 1; i > 0; i--) {
- if (source[i] == 0) continue;
+ if (!source[i]) continue;
status = f_utf_is_control(source + i, length - i);
if (status == F_true) continue;
if (i - 1 > 0) {
for (j = i - 1; j > 0; j--) {
- if (source[j] == 0) continue;
+ if (!source[j]) continue;
status = f_utf_is_control(source + j, length - j);
if (status == F_true) continue;
break;
} // for
- if (i == 0 && source[0] != f_path_separator[0]) {
+ if (!i && source[0] != f_path_separator[0]) {
separator_append = F_true;
total++;
}
for (i = 0; i < length_truncated; i++) {
- if (source[i] == 0) continue;
+ if (!source[i]) continue;
status = f_utf_is_control(source + i, length - i);
if (status == F_true) continue;
if (source[0] == f_path_separator[0]) {
if (i + 1 < length_truncated) {
for (j = i + 1; j < length_truncated; j++) {
- if (source[j] == 0) continue;
+ if (!source[j]) continue;
status = f_utf_is_control(source + j, length - j);
if (status == F_true) continue;
#ifndef _di_fl_environment_path_explode_
f_return_status fl_environment_path_explode(const f_string_t path, f_string_dynamics_t *paths) {
#ifndef _di_level_0_parameter_checking_
- if (paths == 0) return F_status_set_error(F_parameter);
+ if (!paths) return F_status_set_error(F_parameter);
if (paths->used > paths->size) 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);
- if (length == 0) {
+ if (!length) {
// When PATH is "", this is actually a valid search path for PWD.
// Append an equivalent representation of PWD (string used length is 0).
f_macro_memory_structure_macro_increment(status, (*paths), 1, f_memory_default_allocation_step, f_macro_string_dynamics_resize, F_buffer_too_large);
if (F_status_is_error(status)) return status;
- if (i == 0) {
+ if (!i) {
f_macro_string_dynamic_t_clear(paths->array[paths->used]);
paths->used++;
f_return_status fl_environment_path_explode_dynamic(const f_string_static_t path, f_string_dynamics_t *paths) {
#ifndef _di_level_0_parameter_checking_
if (path.used > path.size) return F_status_set_error(F_parameter);
- if (paths == 0) return F_status_set_error(F_parameter);
+ if (!paths) return F_status_set_error(F_parameter);
if (paths->used > paths->size) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
f_status_t status = F_none;
- if (path.used == 0) {
+ if (!path.used) {
// When PATH is "", this is actually a valid search path for PWD.
// Therefore append an equivalent representation of PWD (string used length is 0).
f_macro_memory_structure_macro_increment(status, (*paths), 1, f_memory_default_allocation_step, f_macro_string_dynamics_resize, F_buffer_too_large);
if (F_status_is_error(status)) return status;
- if (i == 0) {
+ if (!i) {
f_macro_string_dynamic_t_clear(paths->array[paths->used]);
paths->used++;
if (F_status_is_error(status)) return status;
for (j = 0; j < total; j++) {
- if (path.string[first + j] == 0) continue;
+ if (!path.string[first + j]) continue;
part.string[part.used] = path.string[first + j];
part.used++;
#ifndef _di_fl_environment_path_explode_reverse_
f_return_status fl_environment_path_explode_reverse(const f_string_t path, f_string_dynamics_t *paths) {
#ifndef _di_level_0_parameter_checking_
- if (paths == 0) return F_status_set_error(F_parameter);
+ if (!paths) return F_status_set_error(F_parameter);
if (paths->used > paths->size) 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);
- if (length == 0) {
+ if (!length) {
// When PATH is "", this is actually a valid search path for PWD.
// Therefore append an equivalent representation of PWD (string used length is 0).
for (; i > 0; i--) {
j--;
- if (j == 0 || path[j] == f_path_separator_variable[0]) {
+ if (!j || path[j] == f_path_separator_variable[0]) {
f_macro_memory_structure_macro_increment(status, (*paths), 1, f_memory_default_allocation_step, f_macro_string_dynamics_resize, F_buffer_too_large);
if (F_status_is_error(status)) return status;
last = j;
}
- else if (j == 0) {
+ else if (!j) {
// when j = 0, the total is actually the entire length to max.
total = last - j;
f_return_status fl_environment_path_explode_reverse_dynamic(const f_string_static_t path, f_string_dynamics_t *paths) {
#ifndef _di_level_0_parameter_checking_
if (path.used > path.size) return F_status_set_error(F_parameter);
- if (paths == 0) return F_status_set_error(F_parameter);
+ if (!paths) return F_status_set_error(F_parameter);
if (paths->used > paths->size) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
f_status_t status = F_none;
- if (path.used == 0) {
+ if (!path.used) {
// When PATH is "", this is actually a valid search path for PWD.
// Therefore append an equivalent representation of PWD (string used length is 0).
f_macro_memory_structure_macro_increment(status, (*paths), 1, f_memory_default_allocation_step, f_macro_string_dynamics_resize, F_buffer_too_large);
for (; i > 0; i--) {
j--;
- if (j == 0 || path.string[j] == f_path_separator_variable[0]) {
+ if (!j || path.string[j] == f_path_separator_variable[0]) {
f_macro_memory_structure_macro_increment(status, (*paths), 1, f_memory_default_allocation_step, f_macro_string_dynamics_resize, F_buffer_too_large);
if (F_status_is_error(status)) return status;
if (F_status_is_error(status)) return status;
for (k = 0; k < total; k++) {
- if (path.string[i + k] == 0) continue;
+ if (!path.string[i + k]) continue;
part.string[part.used] = path.string[i + k];
part.used++;
last = j;
}
- else if (j == 0) {
+ else if (!j) {
// when j = 0, the total is actually the entire length to max.
total = last - j;
if (F_status_is_error(status)) return status;
for (k = 0; k < total; k++) {
- if (path.string[i + k] == 0) continue;
+ if (!path.string[i + k]) continue;
part.string[part.used] = path.string[i + k];
part.used++;
#ifndef _di_fl_fss_basic_object_read_
f_return_status fl_fss_basic_object_read(f_string_dynamic_t *buffer, f_string_range_t *range, f_fss_object_t *found, f_fss_quoted_t *quoted) {
#ifndef _di_level_1_parameter_checking_
- if (buffer == 0) return F_status_set_error(F_parameter);
- if (buffer->used == 0) return F_status_set_error(F_parameter);
- if (range == 0) return F_status_set_error(F_parameter);
- if (found == 0) return F_status_set_error(F_parameter);
+ if (!buffer) return F_status_set_error(F_parameter);
+ if (!buffer->used ) return F_status_set_error(F_parameter);
+ if (!range) return F_status_set_error(F_parameter);
+ if (!found) return F_status_set_error(F_parameter);
if (range->start > range->stop) return F_status_set_error(F_parameter);
if (range->start >= buffer->used) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
#ifndef _di_fl_fss_basic_content_read_
f_return_status fl_fss_basic_content_read(f_string_dynamic_t *buffer, f_string_range_t *range, f_fss_content_t *found) {
#ifndef _di_level_1_parameter_checking_
- if (buffer == 0) return F_status_set_error(F_parameter);
- if (buffer->used == 0) return F_status_set_error(F_parameter);
- if (range == 0) return F_status_set_error(F_parameter);
- if (found == 0) return F_status_set_error(F_parameter);
+ if (!buffer) return F_status_set_error(F_parameter);
+ if (!buffer->used ) return F_status_set_error(F_parameter);
+ if (!range) return F_status_set_error(F_parameter);
+ if (!found) return F_status_set_error(F_parameter);
if (range->start > range->stop) return F_status_set_error(F_parameter);
if (range->start >= buffer->used) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
#ifndef _di_fl_fss_basic_object_write_
f_return_status fl_fss_basic_object_write(const f_string_static_t object, const f_fss_quoted_t quoted, f_string_range_t *range, f_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
- if (destination == 0) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
return private_fl_fss_basic_object_write(object, quoted, range, destination);
#ifndef _di_fl_fss_basic_content_write_
f_return_status fl_fss_basic_content_write(const f_string_static_t content, f_string_range_t *range, f_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
- if (destination == 0) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
f_status_t status = F_none;
#ifndef _di_fl_fss_basic_list_object_read_
f_return_status fl_fss_basic_list_object_read(f_string_dynamic_t *buffer, f_string_range_t *range, f_fss_object_t *found) {
#ifndef _di_level_1_parameter_checking_
- if (buffer == 0) return F_status_set_error(F_parameter);
- if (buffer->used == 0) return F_status_set_error(F_parameter);
- if (range == 0) return F_status_set_error(F_parameter);
- if (found == 0) return F_status_set_error(F_parameter);
+ if (!buffer) return F_status_set_error(F_parameter);
+ if (!buffer->used) return F_status_set_error(F_parameter);
+ if (!range) return F_status_set_error(F_parameter);
+ if (!found) return F_status_set_error(F_parameter);
if (range->start > range->stop) return F_status_set_error(F_parameter);
if (range->start >= buffer->used) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
#ifndef _di_fl_fss_basic_list_content_read_
f_return_status fl_fss_basic_list_content_read(f_string_dynamic_t *buffer, f_string_range_t *range, f_fss_content_t *found) {
#ifndef _di_level_1_parameter_checking_
- if (buffer == 0) return F_status_set_error(F_parameter);
- if (buffer->used == 0) return F_status_set_error(F_parameter);
- if (range == 0) return F_status_set_error(F_parameter);
- if (found == 0) return F_status_set_error(F_parameter);
+ if (!buffer) return F_status_set_error(F_parameter);
+ if (!buffer->used) return F_status_set_error(F_parameter);
+ if (!range) return F_status_set_error(F_parameter);
+ if (!found) return F_status_set_error(F_parameter);
if (range->start > range->stop) return F_status_set_error(F_parameter);
if (range->start >= buffer->used) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
#ifndef _di_fl_fss_basic_list_object_write_
f_return_status fl_fss_basic_list_object_write(const f_string_static_t object, f_string_range_t *range, f_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
- if (destination == 0) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
f_status_t status = F_none;
#ifndef _di_fl_fss_basic_list_content_write_
f_return_status fl_fss_basic_list_content_write(const f_string_static_t content, f_string_range_t *range, f_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
- if (destination == 0) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
f_status_t status = F_none;
#ifndef _di_fl_fss_extended_object_read_
f_return_status fl_fss_extended_object_read(f_string_dynamic_t *buffer, f_string_range_t *range, f_fss_object_t *found, f_fss_quoted_t *quoted) {
#ifndef _di_level_1_parameter_checking_
- if (buffer == 0) return F_status_set_error(F_parameter);
- if (buffer->used == 0) return F_status_set_error(F_parameter);
- if (range == 0) return F_status_set_error(F_parameter);
- if (found == 0) return F_status_set_error(F_parameter);
+ if (!buffer) return F_status_set_error(F_parameter);
+ if (!buffer->used) return F_status_set_error(F_parameter);
+ if (!range) return F_status_set_error(F_parameter);
+ if (!found) return F_status_set_error(F_parameter);
if (range->start > range->stop) return F_status_set_error(F_parameter);
if (range->start >= buffer->used) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
#ifndef _di_fl_fss_extended_content_read_
f_return_status fl_fss_extended_content_read(f_string_dynamic_t *buffer, f_string_range_t *range, f_fss_content_t *found, f_fss_quoteds_t *quoteds) {
#ifndef _di_level_1_parameter_checking_
- if (buffer == 0) return F_status_set_error(F_parameter);
- if (buffer->used == 0) return F_status_set_error(F_parameter);
- if (range == 0) return F_status_set_error(F_parameter);
- if (found == 0) return F_status_set_error(F_parameter);
+ if (!buffer) return F_status_set_error(F_parameter);
+ if (!buffer->used) return F_status_set_error(F_parameter);
+ if (!range) return F_status_set_error(F_parameter);
+ if (!found) return F_status_set_error(F_parameter);
if (range->start > range->stop) return F_status_set_error(F_parameter);
if (range->start >= buffer->used) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
#ifndef _di_fl_fss_extended_object_write_
f_return_status fl_fss_extended_object_write(const f_string_static_t object, const f_fss_quoted_t quoted, f_string_range_t *range, f_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
- if (destination == 0) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
return private_fl_fss_basic_object_write(object, quoted, range, destination);
#ifndef _di_fl_fss_extended_content_write_
f_return_status fl_fss_extended_content_write(const f_string_static_t content, const f_fss_quoted_t quoted, f_string_range_t *range, f_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
- if (destination == 0) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
// this operates exactly like an object, syntax-wise, so just use the object write.
#ifndef _di_fl_fss_extended_list_object_read_
f_return_status fl_fss_extended_list_object_read(f_string_dynamic_t *buffer, f_string_range_t *range, f_fss_object_t *found) {
#ifndef _di_level_1_parameter_checking_
- if (buffer == 0) return F_status_set_error(F_parameter);
- if (buffer->used == 0) return F_status_set_error(F_parameter);
- if (range == 0) return F_status_set_error(F_parameter);
- if (found == 0) return F_status_set_error(F_parameter);
+ if (!buffer) return F_status_set_error(F_parameter);
+ if (!buffer->used) return F_status_set_error(F_parameter);
+ if (!range) return F_status_set_error(F_parameter);
+ if (!found) return F_status_set_error(F_parameter);
if (range->start > range->stop) return F_status_set_error(F_parameter);
if (range->start >= buffer->used) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
#ifndef _di_fl_fss_extended_list_content_read_
f_return_status fl_fss_extended_list_content_read(f_string_dynamic_t *buffer, f_string_range_t *range, f_fss_nest_t *found) {
#ifndef _di_level_1_parameter_checking_
- if (buffer == 0) return F_status_set_error(F_parameter);
- if (buffer->used == 0) return F_status_set_error(F_parameter);
- if (range == 0) return F_status_set_error(F_parameter);
- if (found == 0) return F_status_set_error(F_parameter);
+ if (!buffer) return F_status_set_error(F_parameter);
+ if (!buffer->used) return F_status_set_error(F_parameter);
+ if (!range) return F_status_set_error(F_parameter);
+ if (!found) return F_status_set_error(F_parameter);
if (range->start > range->stop) return F_status_set_error(F_parameter);
if (range->start >= buffer->used) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
last_newline = range->start;
line_start = range->start + 1;
- if (depth == 0) {
+ if (!depth) {
status = f_utf_buffer_increment(*buffer, range, 1);
if (F_status_is_error(status)) {
f_macro_fss_objects_t_delete_simple(objects);
if (range->start > range->stop) {
- if (depth == 0) {
+ if (!depth) {
return F_status_set_error(F_unterminated_stop);
}
return F_status_set_error(F_unterminated_nest_stop);
}
- if (depth == 0) {
+ if (!depth) {
return F_status_set_error(F_unterminated_eos);
}
#ifndef _di_fl_fss_extended_list_object_write_
f_return_status fl_fss_extended_list_object_write(const f_string_static_t object, f_string_range_t *range, f_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
- if (destination == 0) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
f_status_t status = F_none;
#ifndef _di_fl_fss_extended_list_content_write_
f_return_status fl_fss_extended_list_content_write(const f_string_static_t content, f_string_range_t *range, f_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
- if (destination == 0) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
// @todo
}
// identify where the object ends.
- if (quote == 0) {
+ if (!quote) {
status = F_none;
while (range->start <= range->stop && range->start < buffer->used) {
#ifndef _di_fl_print_trim_string_
f_return_status fl_print_trim_string(FILE *output, const f_string_t string, const f_string_length_t length) {
#ifndef _di_level_1_parameter_checking_
- if (string == 0) return F_status_set_error(F_parameter);
+ if (!string) return F_status_set_error(F_parameter);
if (length < 1) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
} // for
for (; i < length; i += f_macro_utf_byte_width(string[i])) {
- if (string[i] == 0) continue;
+ if (!string[i]) continue;
width_max = (length - i) + 1;
status = f_utf_is_whitespace(string + i, width_max);
// all whitespaces found so far must be printed when a non-whitespace is found.
if (status == F_false) {
for (; i < j; i++) {
- if (string[i] == 0) continue;
+ if (!string[i]) continue;
- if (fputc(string[i], output) == 0) return F_status_set_error(F_output);
+ if (!fputc(string[i], output)) return F_status_set_error(F_output);
} // for
break;
if (status == F_true) break;
}
- if (fputc(string[i], output) == 0) return F_status_set_error(F_output);
+ if (!fputc(string[i], output)) return F_status_set_error(F_output);
} // for
return F_none;
#ifndef _di_fl_print_trim_string_dynamic_
f_return_status fl_print_trim_string_dynamic(FILE *output, const f_string_static_t buffer) {
#ifndef _di_level_1_parameter_checking_
- if (buffer.used == 0) return F_status_set_error(F_parameter);
+ if (!buffer.used) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
register f_string_length_t i = 0;
} // for
for (; i < buffer.used; i += f_macro_utf_byte_width(buffer.string[i])) {
- if (buffer.string[i] == 0) continue;
+ if (!buffer.string[i]) continue;
width_max = (buffer.used - i) + 1;
status = f_utf_is_whitespace(buffer.string + i, width_max);
// all whitespaces found so far must be printed when a non-whitespace is found.
if (status == F_false) {
for (; i < j; i++) {
- if (buffer.string[i] == 0) continue;
+ if (!buffer.string[i]) continue;
- if (fputc(buffer.string[i], output) == 0) return F_status_set_error(F_output);
+ if (!fputc(buffer.string[i], output)) return F_status_set_error(F_output);
} // for
break;
}
}
- if (fputc(buffer.string[i], output) == 0) return F_status_set_error(F_output);
+ if (!fputc(buffer.string[i], output)) return F_status_set_error(F_output);
} // for
return F_none;
#ifndef _di_level_1_parameter_checking_
if (range.start < 0) return F_status_set_error(F_parameter);
if (range.stop < range.start) return F_status_set_error(F_parameter);
- if (buffer.used == 0) return F_status_set_error(F_parameter);
+ if (!buffer.used) return F_status_set_error(F_parameter);
if (range.start >= buffer.used) return F_status_set_error(F_parameter);
if (range.stop >= buffer.used) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
} // for
for (uint8_t width_i = f_macro_utf_byte_width(buffer.string[i]); i <= range.stop; i += width_i) {
- if (buffer.string[i] == 0) {
+ if (!buffer.string[i]) {
width_i = 1;
continue;
}
// all whitespaces found so far must be printed when a non-whitespace is found.
if (status == F_false) {
for (; i <= j; i += width_i) {
- if (buffer.string[i] == 0) {
+ if (!buffer.string[i]) {
width_i = 1;
continue;
}
width_i = f_macro_utf_byte_width(buffer.string[i]);
for (uint8_t k = 0; k < width_i; k++) {
- if (fputc(buffer.string[i + k], output) == 0) return F_status_set_error(F_output);
+ if (!fputc(buffer.string[i + k], output)) return F_status_set_error(F_output);
} // for
} // for
}
for (uint8_t k = 0; k < width_i; k++) {
- if (fputc(buffer.string[i + k], output) == 0) return F_status_set_error(F_output);
+ if (!fputc(buffer.string[i + k], output)) return F_status_set_error(F_output);
} // for
} // for
#ifndef _di_fl_print_trim_utf_string_
f_return_status fl_print_trim_utf_string(FILE *output, const f_utf_string_t string, const f_utf_string_length_t length) {
#ifndef _di_level_1_parameter_checking_
- if (string == 0) return F_status_set_error(F_parameter);
+ if (!string) return F_status_set_error(F_parameter);
if (length < 1) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
} // for
for (; i < length; i++) {
- if (string[i] == 0) continue;
+ if (!string[i]) continue;
status = f_utf_character_is_whitespace(string[i]);
// all whitespaces found so far must be printed when a non-whitespace is found.
if (status == F_false) {
for (; i < j; i++) {
- if (string[i] == 0) continue;
+ if (!string[i]) continue;
- if (fputc(string[i], output) == 0) return F_status_set_error(F_output);
+ if (!fputc(string[i], output)) return F_status_set_error(F_output);
} // for
break;
if (status == F_true) break;
}
- if (fputc(string[i], output) == 0) return F_status_set_error(F_output);
+ if (!fputc(string[i], output)) return F_status_set_error(F_output);
} // for
return F_none;
#ifndef _di_fl_print_trim_utf_string_dynamic_
f_return_status fl_print_trim_utf_string_dynamic(FILE *output, const f_utf_string_static_t buffer) {
#ifndef _di_level_1_parameter_checking_
- if (buffer.used == 0) return F_status_set_error(F_parameter);
+ if (!buffer.used) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
register f_utf_string_length_t i = 0;
} // for
for (; i < buffer.used; i++) {
- if (buffer.string[i] == 0) continue;
+ if (!buffer.string[i]) continue;
status = f_utf_character_is_whitespace(buffer.string[i]);
// all whitespaces found so far must be printed when a non-whitespace is found.
if (status == F_false) {
for (; i < j; i++) {
- if (buffer.string[i] == 0) continue;
+ if (!buffer.string[i]) continue;
- if (fputc(buffer.string[i], output) == 0) return F_status_set_error(F_output);
+ if (!fputc(buffer.string[i], output)) return F_status_set_error(F_output);
} // for
break;
}
}
- if (fputc(buffer.string[i], output) == 0) return F_status_set_error(F_output);
+ if (!fputc(buffer.string[i], output)) return F_status_set_error(F_output);
} // for
return F_none;
#ifndef _di_level_1_parameter_checking_
if (range.start < 0) return F_status_set_error(F_parameter);
if (range.stop < range.start) return F_status_set_error(F_parameter);
- if (buffer.used == 0) return F_status_set_error(F_parameter);
+ if (!buffer.used) return F_status_set_error(F_parameter);
if (range.start >= buffer.used) return F_status_set_error(F_parameter);
if (range.stop >= buffer.used) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
} // for
for (; i <= range.stop; i++) {
- if (buffer.string[i] == 0) continue;
+ if (!buffer.string[i]) continue;
status = f_utf_character_is_whitespace(buffer.string[i]);
// all whitespaces found so far must be printed when a non-whitespace is found.
if (status == F_false) {
for (; i <= j; i++) {
- if (buffer.string[i] == 0) continue;
+ if (!buffer.string[i]) continue;
- if (fputc(buffer.string[i], output) == 0) return F_status_set_error(F_output);
+ if (!fputc(buffer.string[i], output)) return F_status_set_error(F_output);
} // for
break;
if (status == F_true) break;
}
- if (fputc(buffer.string[i], output) == 0) return F_status_set_error(F_output);
+ if (!fputc(buffer.string[i], output)) return F_status_set_error(F_output);
} // for
return F_none;
#ifndef _di_fl_status_to_string_
f_return_status fl_status_to_string(const f_status_t code, f_string_t *string) {
#ifndef _di_level_1_parameter_checking_
- if (string == 0) return F_status_set_error(F_parameter);
+ if (!string) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
f_status_t unmasked_code = F_status_set_fine(code);
break;
}
- if (source[i] == 0) {
+ if (!source[i]) {
if (i > 0) {
if (i > first) {
size = i - first;
}
}
- while (i + 1 < length && source[i + 1] == 0) {
+ while (i + 1 < length && !source[i + 1]) {
i++;
} // while
for (; i1 < stop1 && i2 < stop2; i1++, i2++) {
// skip past NULL in string1.
- while (i1 < stop1 && string1[i1] == 0) i1++;
+ while (i1 < stop1 && !string1[i1]) i1++;
if (i1 == stop1) break;
// skip past NULL in string2.
- while (i2 < stop2 && string2[i2] == 0) i2++;
+ while (i2 < stop2 && !string2[i2]) i2++;
if (i2 == stop2) break;
if (string1[i1] != string2[i2]) return F_equal_to_not;
for (; i1 < stop1; i1 += width) {
// skip past NULL in string1.
- while (i1 < stop1 && string1[i1] == 0) i1++;
+ while (i1 < stop1 && !string1[i1]) i1++;
if (i1 == stop1) break;
width_max = (stop1 - i1) + 1;
for (; i2 < stop2; i2 += width) {
// skip past NULL in string2.
- while (i2 < stop2 && string2[i2] == 0) i2++;
+ while (i2 < stop2 && !string2[i2]) i2++;
if (i2 == stop2) break;
width_max = (stop2 - i2) + 1;
for (f_string_length_t j = i1; j < stop1; j += width) {
// skip past NULL in string1.
- while (j < stop1 && string1[j] == 0) j++;
+ while (j < stop1 && !string1[j]) j++;
if (j == stop1) break;
width_max = (stop1 - j) + 1;
for (f_string_length_t j = i2; j < stop2; j += width) {
// skip past NULL in string2.
- while (j < stop2 && string2[j] == 0) j++;
+ while (j < stop2 && !string2[j]) j++;
if (j == stop2) break;
width_max = (stop2 - j) + 1;
for (; i1 < last1 && i2 < last2; i1++, i2++) {
// skip past NULL in string1.
- while (i1 < last1 && string1[i1] == 0) i1++;
+ while (i1 < last1 && !string1[i1]) i1++;
if (i1 == last1) break;
// skip past NULL in string2.
- while (i2 < last2 && string2[i2] == 0) i2++;
+ while (i2 < last2 && !string2[i2]) i2++;
if (i2 == last2) break;
if (string1[i1] != string2[i2]) return F_equal_to_not;
break;
}
- if (source[i] == 0) {
+ if (!source[i]) {
if (i > 0) {
if (i > first) {
size = i - first;
}
}
- while (i + 1 < length && source[i + 1] == 0) {
+ while (i + 1 < length && !source[i + 1]) {
i++;
} // while
for (; *start <= *stop; *start += width) {
// skip past NULL.
- while (*start < *stop && source[*start] == 0) (*start)++;
+ while (*start < *stop && !source[*start]) (*start)++;
if (*start > *stop) break;
status = f_utf_is_whitespace(source + *start, (*stop - *start) + 1);
for (; *stop > *start; (*stop)--) {
// skip past NULL.
- while (*stop > *start && source[*stop] == 0) (*stop)--;
+ while (*stop > *start && !source[*stop]) (*stop)--;
- if (source[*stop] == 0) continue;
+ if (!source[*stop]) continue;
if (*stop == *start) break;
// each UTF-8 character of width 1 is an incomplete part.
#ifndef _di_fl_string_append_
f_return_status fl_string_append(const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
- if (destination == 0) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- if (length == 0) return F_data_not_eos;
+ if (!length) return F_data_not_eos;
return private_fl_string_append(source, length, destination);
}
#ifndef _di_fl_string_append_assure_
f_return_status fl_string_append_assure(const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
- if (destination == 0) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- if (length == 0) return F_data_not_eos;
+ if (!length) return F_data_not_eos;
if (destination->used < length) return private_fl_string_append(source, length, destination);
f_string_length_t i = 1;
f_string_length_t j = 1;
while (i <= length && j <= destination->used) {
- if (source[length - i] == 0) {
+ if (!source[length - i]) {
i++;
continue;
}
- if (destination->string[destination->used - j] == 0) {
+ if (!destination->string[destination->used - j]) {
j++;
continue;
}
#ifndef _di_fl_string_append_assure_nulless_
f_return_status fl_string_append_assure_nulless(const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
- if (destination == 0) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- if (length == 0) return F_data_not_eos;
+ if (!length) return F_data_not_eos;
if (destination->used < length) {
return private_fl_string_append_nulless(source, length, destination);
f_string_length_t j = 1;
while (i <= length && j <= destination->used) {
- if (source[length - i] == 0) {
+ if (!source[length - i]) {
i++;
continue;
}
- if (destination->string[destination->used - j] == 0) {
+ if (!destination->string[destination->used - j]) {
j++;
continue;
}
#ifndef _di_fl_string_append_nulless_
f_return_status fl_string_append_nulless(const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
- if (destination == 0) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- if (length == 0) return F_data_not_eos;
+ if (!length) return F_data_not_eos;
return private_fl_string_append_nulless(source, length, destination);
}
#ifndef _di_fl_string_dynamic_append_
f_return_status fl_string_dynamic_append(const f_string_static_t source, f_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
- if (destination == 0) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- if (source.used == 0) return F_data_not_eos;
+ if (!source.used) return F_data_not_eos;
return private_fl_string_append(source.string, source.used, destination);
}
#ifndef _di_fl_string_dynamic_append_assure_
f_return_status fl_string_dynamic_append_assure(const f_string_static_t source, f_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
- if (destination == 0) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- if (source.used == 0) return F_data_not_eos;
+ if (!source.used) return F_data_not_eos;
if (destination->used < source.used) {
return private_fl_string_append(source.string, source.used, destination);
f_string_length_t j = 1;
while (i <= source.used && j <= destination->used) {
- if (source.string[source.used - i] == 0) {
+ if (!source.string[source.used - i]) {
i++;
continue;
}
- if (destination->string[destination->used - j] == 0) {
+ if (!destination->string[destination->used - j]) {
j++;
continue;
}
#ifndef _di_fl_string_dynamic_append_assure_nulless_
f_return_status fl_string_dynamic_append_assure_nulless(const f_string_static_t source, f_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
- if (destination == 0) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- if (source.used == 0) return F_data_not_eos;
+ if (!source.used) return F_data_not_eos;
if (destination->used < source.used) {
return private_fl_string_append_nulless(source.string, source.used, destination);
f_string_length_t j = 1;
while (i <= source.used && j <= destination->used) {
- if (source.string[source.used - i] == 0) {
+ if (!source.string[source.used - i]) {
i++;
continue;
}
- if (destination->string[destination->used - j] == 0) {
+ if (!destination->string[destination->used - j]) {
j++;
continue;
}
#ifndef _di_fl_string_dynamic_append_nulless_
f_return_status fl_string_dynamic_append_nulless(const f_string_static_t source, f_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
- if (destination == 0) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- if (source.used == 0) return F_data_not_eos;
+ if (!source.used) return F_data_not_eos;
return private_fl_string_append_nulless(source.string, source.used, destination);
}
#ifndef _di_fl_string_dynamic_mash_
f_return_status fl_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) {
#ifndef _di_level_1_parameter_checking_
- if (destination == 0) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- if (source.used == 0) return F_data_not_eos;
+ if (!source.used) return F_data_not_eos;
if (glue_length && destination->used) {
const f_status_t status = private_fl_string_append(glue, glue_length, destination);
#ifndef _di_fl_string_dynamic_mash_nulless_
f_return_status fl_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) {
#ifndef _di_level_1_parameter_checking_
- if (destination == 0) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- if (source.used == 0) return F_data_not_eos;
+ if (!source.used) return F_data_not_eos;
if (glue_length && destination->used) {
const f_status_t status = private_fl_string_append_nulless(glue, glue_length, destination);
#ifndef _di_fl_string_dynamic_mish_
f_return_status fl_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) {
#ifndef _di_level_1_parameter_checking_
- if (destination == 0) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- if (source.used == 0) return F_data_not_eos;
+ if (!source.used) return F_data_not_eos;
if (glue_length && destination->used) {
const f_status_t status = private_fl_string_prepend(glue, glue_length, destination);
#ifndef _di_fl_string_dynamic_mish_nulless_
f_return_status fl_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) {
#ifndef _di_level_1_parameter_checking_
- if (destination == 0) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- if (source.used == 0) return F_data_not_eos;
+ if (!source.used) return F_data_not_eos;
if (glue_length && destination->used) {
const f_status_t status = private_fl_string_prepend_nulless(glue, glue_length, destination);
f_return_status fl_string_dynamic_partial_append(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 == 0) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- if (source.used == 0) return F_data_not_eos;
+ if (!source.used) return F_data_not_eos;
if (range.start > range.stop) return F_data_not_stop;
return private_fl_string_append(source.string + range.start, (range.stop - range.start) + 1, destination);
f_return_status fl_string_dynamic_partial_append_assure(const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (source.used <= range.stop) return F_status_set_error(F_parameter);
- if (destination == 0) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- if (source.used == 0) return F_data_not_eos;
+ 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;
f_string_length_t j = 1;
while (i <= length && j <= destination->used) {
- if (source.string[range.stop - i] == 0) {
+ if (!source.string[range.stop - i]) {
i++;
continue;
}
- if (destination->string[destination->used - j] == 0) {
+ if (!destination->string[destination->used - j]) {
j++;
continue;
}
f_return_status fl_string_dynamic_partial_append_assure_nulless(const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (source.used <= range.stop) return F_status_set_error(F_parameter);
- if (destination == 0) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- if (source.used == 0) return F_data_not_eos;
+ 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;
f_string_length_t j = 1;
while (i <= length && j <= destination->used) {
- if (source.string[range.stop - i] == 0) {
+ if (!source.string[range.stop - i]) {
i++;
continue;
}
- if (destination->string[destination->used - j] == 0) {
+ if (!destination->string[destination->used - j]) {
j++;
continue;
}
f_return_status fl_string_dynamic_partial_append_nulless(const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (source.used <= range.stop) return F_status_set_error(F_parameter);
- if (destination == 0) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- if (source.used == 0) return F_data_not_eos;
+ if (!source.used) return F_data_not_eos;
if (range.start > range.stop) return F_data_not_stop;
return private_fl_string_append_nulless(source.string + range.start, (range.stop - range.start) + 1, destination);
f_return_status fl_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) {
#ifndef _di_level_1_parameter_checking_
if (source.used <= range.stop) return F_status_set_error(F_parameter);
- if (destination == 0) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- if (source.used == 0) return F_data_not_eos;
+ if (!source.used) return F_data_not_eos;
if (range.start > range.stop) return F_data_not_stop;
if (glue_length && destination->used) {
f_return_status fl_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) {
#ifndef _di_level_1_parameter_checking_
if (source.used <= range.stop) return F_status_set_error(F_parameter);
- if (destination == 0) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- if (source.used == 0) return F_data_not_eos;
+ if (!source.used) return F_data_not_eos;
if (range.start > range.stop) return F_data_not_stop;
if (glue_length && destination->used) {
f_return_status fl_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) {
#ifndef _di_level_1_parameter_checking_
if (source.used <= range.stop) return F_status_set_error(F_parameter);
- if (destination == 0) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- if (source.used == 0) return F_data_not_eos;
+ if (!source.used) return F_data_not_eos;
if (range.start > range.stop) return F_data_not_stop;
if (glue_length && destination->used) {
f_return_status fl_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) {
#ifndef _di_level_1_parameter_checking_
if (source.used <= range.stop) return F_status_set_error(F_parameter);
- if (destination == 0) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- if (source.used == 0) return F_data_not_eos;
+ if (!source.used) return F_data_not_eos;
if (range.start > range.stop) return F_data_not_stop;
if (glue_length && destination->used) {
f_return_status fl_string_dynamic_partial_prepend(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 == 0) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- if (source.used == 0) return F_data_not_eos;
+ if (!source.used) return F_data_not_eos;
if (range.start > range.stop) return F_data_not_stop;
return private_fl_string_prepend(source.string + range.start, (range.stop - range.start) + 1, destination);
f_return_status fl_string_dynamic_partial_prepend_assure(const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (source.used <= range.stop) return F_status_set_error(F_parameter);
- if (destination == 0) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- if (source.used == 0) return F_data_not_eos;
+ 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;
f_string_length_t j = 0;
while (i < length && j < destination->used) {
- if (source.string[i + range.start] == 0) {
+ if (!source.string[i + range.start]) {
i++;
continue;
}
- if (destination->string[j] == 0) {
+ if (!destination->string[j]) {
j++;
continue;
}
f_return_status fl_string_dynamic_partial_prepend_assure_nulless(const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (source.used <= range.stop) return F_status_set_error(F_parameter);
- if (destination == 0) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- if (source.used == 0) return F_data_not_eos;
+ 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;
f_string_length_t j = 0;
while (i < length && j < destination->used) {
- if (source.string[i + range.start] == 0) {
+ if (!source.string[i + range.start]) {
i++;
continue;
}
- if (destination->string[j] == 0) {
+ if (!destination->string[j]) {
j++;
continue;
}
f_return_status fl_string_dynamic_partial_prepend_nulless(const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (source.used <= range.stop) return F_status_set_error(F_parameter);
- if (destination == 0) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- if (source.used == 0) return F_data_not_eos;
+ if (!source.used) return F_data_not_eos;
if (range.start > range.stop) return F_data_not_stop;
return private_fl_string_prepend_nulless(source.string + range.start, (range.stop - range.start) + 1, destination);
#ifndef _di_fl_string_dynamic_prepend_
f_return_status fl_string_dynamic_prepend(const f_string_static_t source, f_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
- if (destination == 0) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- if (source.used == 0) return F_data_not_eos;
+ if (!source.used) return F_data_not_eos;
return private_fl_string_prepend(source.string, source.used, destination);
}
#ifndef _di_fl_string_dynamic_prepend_assure_
f_return_status fl_string_dynamic_prepend_assure(const f_string_static_t source, f_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
- if (destination == 0) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- if (source.used == 0) return F_data_not_eos;
+ if (!source.used) return F_data_not_eos;
if (destination->used < source.used) {
return private_fl_string_prepend(source.string, source.used, destination);
f_string_length_t j = 0;
while (i < source.used && j < destination->used) {
- if (source.string[i] == 0) {
+ if (!source.string[i]) {
i++;
continue;
}
- if (destination->string[j] == 0) {
+ if (!destination->string[j]) {
j++;
continue;
}
#ifndef _di_fl_string_dynamic_prepend_assure_nulless_
f_return_status fl_string_dynamic_prepend_assure_nulless(const f_string_static_t source, f_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
- if (destination == 0) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- if (source.used == 0) return F_data_not_eos;
+ if (!source.used) return F_data_not_eos;
if (destination->used < source.used) {
return private_fl_string_prepend_nulless(source.string, source.used, destination);
f_string_length_t j = 0;
while (i < source.used && j < destination->used) {
- if (source.string[i] == 0) {
+ if (!source.string[i]) {
i++;
continue;
}
- if (destination->string[j] == 0) {
+ if (!destination->string[j]) {
j++;
continue;
}
#ifndef _di_fl_string_dynamic_prepend_nulless_
f_return_status fl_string_dynamic_prepend_nulless(const f_string_static_t source, f_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
- if (destination == 0) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- if (source.used == 0) return F_data_not_eos;
+ if (!source.used) return F_data_not_eos;
return private_fl_string_prepend_nulless(source.string, source.used, destination);
}
#ifndef _di_level_1_parameter_checking_
if (source.used <= range.start) return F_status_set_error(F_parameter);
if (source.used <= range.stop) return F_status_set_error(F_parameter);
- if (destination == 0) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- if (source.used == 0) return F_data_not_eos;
+ if (!source.used) return F_data_not_eos;
if (range.start > range.stop) return F_data_not_stop;
return private_fl_string_append(source.string + range.start, (range.stop - range.start) + 1, destination);
#ifndef _di_level_1_parameter_checking_
if (source.used <= range.start) return F_status_set_error(F_parameter);
if (source.used <= range.stop) return F_status_set_error(F_parameter);
- if (destination == 0) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- if (source.used == 0) return F_data_not_eos;
+ if (!source.used) return F_data_not_eos;
if (range.start > range.stop) return F_data_not_stop;
return private_fl_string_append_nulless(source.string + range.start, (range.stop - range.start) + 1, destination);
#ifndef _di_fl_string_dynamic_size_decrease_
f_return_status fl_string_dynamic_size_decrease(const f_string_length_t length, f_string_dynamic_t *string) {
#ifndef _di_level_1_parameter_checking_
- if (length == 0) return F_status_set_error(F_parameter);
- if (string == 0) return F_status_set_error(F_parameter);
+ if (!length) return F_status_set_error(F_parameter);
+ if (!string) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
f_status_t status = F_none;
#ifndef _di_fl_string_dynamic_size_increase_
f_return_status fl_string_dynamic_size_increase(const f_string_length_t length, f_string_dynamic_t *string) {
#ifndef _di_level_1_parameter_checking_
- if (length == 0) return F_status_set_error(F_parameter);
- if (string == 0) return F_status_set_error(F_parameter);
+ if (!length) return F_status_set_error(F_parameter);
+ if (!string) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
return private_fl_string_dynamic_size_increase(length, string);
#ifndef _di_fl_string_dynamic_seek_line_
f_return_status fl_string_dynamic_seek_line(const f_string_t string, f_string_range_t *range) {
#ifndef _di_level_1_parameter_checking_
- if (range == 0) return F_status_set_error(F_parameter);
+ if (!range) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
if (!string) return F_data_not;
#ifndef _di_fl_string_dynamic_seek_line_to_
f_return_status fl_string_dynamic_seek_line_to(const f_string_t string, f_string_range_t *range, const int8_t seek_to_this) {
#ifndef _di_level_1_parameter_checking_
- if (range == 0) return F_status_set_error(F_parameter);
+ if (!range) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
if (!string) return F_data_not;
#ifndef _di_fl_string_dynamic_seek_line_to_utf_character_
f_return_status fl_string_dynamic_seek_line_to_utf_character(const f_string_t string, f_string_range_t *range, const f_utf_character_t seek_to_this) {
#ifndef _di_level_1_parameter_checking_
- if (range == 0) return F_status_set_error(F_parameter);
+ if (!range) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
if (!string) return F_data_not;
width_max = (range->stop - range->start) + 1;
width = f_macro_utf_byte_width_is(string[range->start]);
- if (width == 0) {
+ if (!width) {
width = 1;
if (string[range->start] == f_string_eol[0]) return F_none_eol;
#ifndef _di_fl_string_dynamic_seek_line_until_graph_
f_return_status fl_string_dynamic_seek_line_until_graph(const f_string_t string, f_string_range_t *range, const int8_t placeholder) {
#ifndef _di_level_1_parameter_checking_
- if (range == 0) return F_status_set_error(F_parameter);
+ if (!range) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
if (!string) return F_data_not;
width = f_macro_utf_byte_width_is(string[range->start]);
- if (width == 0) {
+ if (!width) {
width = 1;
}
// Do not operate on UTF-8 fragments that are not the first byte of the character.
#ifndef _di_fl_string_dynamic_seek_line_until_non_graph_
f_return_status fl_string_dynamic_seek_line_until_non_graph(const f_string_t string, f_string_range_t *range, const int8_t placeholder) {
#ifndef _di_level_1_parameter_checking_
- if (range == 0) return F_status_set_error(F_parameter);
+ if (!range) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
if (!string) return F_data_not;
width = f_macro_utf_byte_width_is(string[range->start]);
- if (width == 0) {
+ if (!width) {
width = 1;
}
// Do not operate on UTF-8 fragments that are not the first byte of the character.
#ifndef _di_fl_string_dynamic_seek_to_
f_return_status fl_string_dynamic_seek_to(const f_string_t string, f_string_range_t *range, const int8_t seek_to_this) {
#ifndef _di_level_1_parameter_checking_
- if (range == 0) return F_status_set_error(F_parameter);
+ if (!range) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
if (!string) return F_data_not;
#ifndef _di_fl_string_dynamic_seek_to_utf_character_
f_return_status fl_string_dynamic_seek_to_utf_character(const f_string_t string, f_string_range_t *range, const f_utf_character_t seek_to_this) {
#ifndef _di_level_1_parameter_checking_
- if (range == 0) return F_status_set_error(F_parameter);
+ if (!range) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
if (!string) return F_data_not;
width_max = (range->stop - range->start) + 1;
width = f_macro_utf_byte_width_is(string[range->start]);
- if (width == 0) {
+ if (!width) {
width = 1;
if (seek_width == width) {
#ifndef _di_fl_string_dynamic_terminate_
f_return_status fl_string_dynamic_terminate(f_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
- if (destination == 0) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
if (destination->used > destination->size) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- if (destination->used && destination->string[destination->used - 1] == 0) return F_none;
+ if (!destination->used && destination->string[destination->used - 1]) return F_none;
if (destination->used == f_string_length_t_size) return F_status_set_error(F_string_too_large);
#ifndef _di_fl_string_dynamic_terminate_after_
f_return_status fl_string_dynamic_terminate_after(f_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
- if (destination == 0) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
if (destination->used > destination->size) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
if (destination->used) {
for (; destination->used; destination->used--) {
- if (destination->string[destination->used - 1] == 0) continue;
+ if (!destination->string[destination->used - 1]) continue;
break;
} // for
}
#ifndef _di_fl_string_dynamics_size_decrease_
f_return_status fl_string_dynamics_size_decrease(const f_array_length_t length, f_string_dynamics_t *strings) {
#ifndef _di_level_1_parameter_checking_
- if (length == 0) return F_status_set_error(F_parameter);
- if (strings == 0) return F_status_set_error(F_parameter);
+ if (!length) return F_status_set_error(F_parameter);
+ if (!strings) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
f_status_t status = F_none;
#ifndef _di_fl_string_dynamics_size_increase_
f_return_status fl_string_dynamics_size_increase(const f_array_length_t length, f_string_dynamics_t *strings) {
#ifndef _di_level_1_parameter_checking_
- if (length == 0) return F_status_set_error(F_parameter);
- if (strings == 0) return F_status_set_error(F_parameter);
+ if (!length) return F_status_set_error(F_parameter);
+ if (!strings) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
f_status_t status = F_none;
#ifndef _di_fl_string_lengths_size_decrease_
f_return_status fl_string_lengths_size_decrease(const f_array_length_t length, f_string_lengths_t *lengths) {
#ifndef _di_level_1_parameter_checking_
- if (length == 0) return F_status_set_error(F_parameter);
- if (lengths == 0) return F_status_set_error(F_parameter);
+ if (!length) return F_status_set_error(F_parameter);
+ if (!lengths) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
f_status_t status = F_none;
#ifndef _di_fl_string_lengths_size_increase_
f_return_status fl_string_lengths_size_increase(const f_array_length_t length, f_string_lengths_t *lengths) {
#ifndef _di_level_1_parameter_checking_
- if (length == 0) return F_status_set_error(F_parameter);
- if (lengths == 0) return F_status_set_error(F_parameter);
+ if (!length) return F_status_set_error(F_parameter);
+ if (!lengths) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
f_status_t status = F_none;
#ifndef _di_fl_string_mash_
f_return_status fl_string_mash(const f_string_t glue, const f_string_length_t glue_length, const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
- if (destination == 0) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- if (length == 0) return F_data_not_eos;
+ if (!length) return F_data_not_eos;
if (glue_length && destination->used) {
f_status_t status = private_fl_string_append(glue, glue_length, destination);
#ifndef _di_fl_string_mash_nulless_
f_return_status fl_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) {
#ifndef _di_level_1_parameter_checking_
- if (destination == 0) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- if (length == 0) return F_data_not_eos;
+ if (!length) return F_data_not_eos;
if (glue_length && destination->used) {
f_status_t status = private_fl_string_append_nulless(glue, glue_length, destination);
#ifndef _di_fl_string_mish_
f_return_status fl_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) {
#ifndef _di_level_1_parameter_checking_
- if (destination == 0) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- if (length == 0) return F_data_not_eos;
+ if (!length) return F_data_not_eos;
if (glue_length && destination->used) {
f_status_t status = private_fl_string_prepend(glue, glue_length, destination);
#ifndef _di_fl_string_mish_nulless_
f_return_status fl_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) {
#ifndef _di_level_1_parameter_checking_
- if (destination == 0) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- if (length == 0) return F_data_not_eos;
+ if (!length) return F_data_not_eos;
if (glue_length && destination->used) {
f_status_t status = private_fl_string_prepend_nulless(glue, glue_length, destination);
#ifndef _di_fl_string_prepend_
f_return_status fl_string_prepend(const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
- if (destination == 0) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- if (length == 0) return F_data_not_eos;
+ if (!length) return F_data_not_eos;
return private_fl_string_prepend(source, length, destination);
}
#ifndef _di_fl_string_prepend_assure_
f_return_status fl_string_prepend_assure(const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
- if (destination == 0) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- if (length == 0) return F_data_not_eos;
+ if (!length) return F_data_not_eos;
if (destination->used < length) return private_fl_string_prepend(source, length, destination);
f_string_length_t i = 0;
f_string_length_t j = 0;
while (i < length && j < destination->used) {
- if (source[i] == 0) {
+ if (!source[i]) {
i++;
continue;
}
- if (destination->string[j] == 0) {
+ if (!destination->string[j]) {
j++;
continue;
}
#ifndef _di_fl_string_prepend_assure_nulless_
f_return_status fl_string_prepend_assure_nulless(const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
- if (destination == 0) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- if (length == 0) return F_data_not_eos;
+ if (!length) return F_data_not_eos;
if (destination->used < length) return private_fl_string_prepend_nulless(source, length, destination);
f_string_length_t i = 0;
f_string_length_t j = 0;
while (i < length && j < destination->used) {
- if (source[i] == 0) {
+ if (!source[i]) {
i++;
continue;
}
- if (destination->string[j] == 0) {
+ if (!destination->string[j]) {
j++;
continue;
}
#ifndef _di_fl_string_prepend_nulless_
f_return_status fl_string_prepend_nulless(const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
- if (destination == 0) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- if (length == 0) return F_data_not_eos;
+ if (!length) return F_data_not_eos;
return private_fl_string_prepend_nulless(source, length, destination);
}
#ifndef _di_fl_string_rip_
f_return_status fl_string_rip(const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
- if (destination == 0) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- if (length == 0) return F_data_not_eos;
+ if (!length) return F_data_not_eos;
f_string_length_t begin = 0;
f_string_length_t end = length - 1;
#ifndef _di_fl_string_rip_nulless_
f_return_status fl_string_rip_nulless(const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
- if (destination == 0) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- if (length == 0) return F_data_not_eos;
+ if (!length) return F_data_not_eos;
f_string_length_t begin = 0;
f_string_length_t end = length - 1;
#ifndef _di_fl_string_seek_line_to_
f_return_status fl_string_seek_line_to(const f_string_t string, const int8_t seek_to, f_string_range_t *range) {
#ifndef _di_level_1_parameter_checking_
- if (range == 0) return F_status_set_error(F_parameter);
+ if (!range) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
if (range->start > range->stop) return F_data_not_stop;
#ifndef _di_fl_string_seek_line_to_utf_character_
f_return_status fl_string_seek_line_to_utf_character(const f_string_t string, const f_utf_character_t seek_to, f_string_range_t *range) {
#ifndef _di_level_1_parameter_checking_
- if (range == 0) return F_status_set_error(F_parameter);
+ if (!range) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
if (range->start > range->stop) return F_data_not_stop;
width = f_macro_utf_byte_width_is(string[range->start]);
- if (width == 0) {
+ if (!width) {
width = 1;
if (string[range->start] == f_string_eol[0]) return F_none_eol;
#ifndef _di_fl_string_seek_line_until_graph_
f_return_status fl_string_seek_line_until_graph(const f_string_t string, const int8_t placeholder, f_string_range_t *range) {
#ifndef _di_level_1_parameter_checking_
- if (range == 0) return F_status_set_error(F_parameter);
+ if (!range) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
if (range->start > range->stop) return F_data_not_stop;
width = f_macro_utf_byte_width_is(string[range->start]);
- if (width == 0) {
+ if (!width) {
width = 1;
}
// Do not operate on UTF-8 fragments that are not the first byte of the character.
#ifndef _di_fl_string_seek_line_until_non_graph_
f_return_status fl_string_seek_line_until_non_graph(const f_string_t string, const int8_t placeholder, f_string_range_t *range) {
#ifndef _di_level_1_parameter_checking_
- if (range == 0) return F_status_set_error(F_parameter);
+ if (!range) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
if (range->start > range->stop) return F_data_not_stop;
width = f_macro_utf_byte_width_is(string[range->start]);
- if (width == 0) {
+ if (!width) {
width = 1;
}
// Do not operate on UTF-8 fragments that are not the first byte of the character.
#ifndef _di_fl_string_seek_to_
f_return_status fl_string_seek_to(const f_string_t string, const int8_t seek_to, f_string_range_t *range) {
#ifndef _di_level_1_parameter_checking_
- if (range == 0) return F_status_set_error(F_parameter);
+ if (!range) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
if (range->start > range->stop) return F_data_not_stop;
#ifndef _di_fl_string_seek_to_utf_character_
f_return_status fl_string_seek_to_utf_character(const f_string_t string, const f_utf_character_t seek_to, f_string_range_t *range) {
#ifndef _di_level_1_parameter_checking_
- if (range == 0) return F_status_set_error(F_parameter);
+ if (!range) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
if (range->start > range->stop) return F_data_not_stop;
width = f_macro_utf_byte_width_is(string[range->start]);
- if (width == 0) {
+ if (!width) {
width = 1;
if (seek_width == width) {
for (; i1 < stop1 && i2 < stop2; i1++, i2++) {
// skip past NULL in string1.
- while (i1 < stop1 && string1[i1] == 0) i1++;
+ while (i1 < stop1 && !string1[i1]) i1++;
if (i1 == stop1) break;
// skip past NULL in string2.
- while (i2 < stop2 && string2[i2] == 0) i2++;
+ while (i2 < stop2 && !string2[i2]) i2++;
if (i2 == stop2) break;
if (string1[i1] != string2[i2]) return F_equal_to_not;
for (; i1 < stop1; i1++) {
// skip past NULL in string1.
- while (i1 < stop1 && string1[i1] == 0) i1++;
+ while (i1 < stop1 && !string1[i1]) i1++;
if (i1 == stop1) break;
status = f_utf_character_is_whitespace(string1[i1]);
for (; i2 < stop2; i2++) {
// skip past NULL in string2.
- while (i2 < stop2 && string2[i2] == 0) i2++;
+ while (i2 < stop2 && !string2[i2]) i2++;
if (i2 == stop2) break;
status = f_utf_character_is_whitespace(string2[i2]);
for (f_utf_string_length_t j = i1; j < stop1; j++) {
// skip past NULL in string1.
- while (j < stop1 && string1[j] == 0) j++;
+ while (j < stop1 && !string1[j]) j++;
if (j == stop1) break;
status = f_utf_character_is_whitespace(string1[j]);
for (f_utf_string_length_t j = i2; j < stop2; j++) {
// skip past NULL in string2.
- while (j < stop2 && string2[j] == 0) j++;
+ while (j < stop2 && !string2[j]) j++;
if (j == stop2) break;
status = f_utf_character_is_whitespace(string2[j]);
for (; i1 < last1 && i2 < last2; i1++, i2++) {
// skip past NULL in string1.
- while (i1 < last1 && string1[i1] == 0) i1++;
+ while (i1 < last1 && !string1[i1]) i1++;
if (i1 == last1) break;
// skip past NULL in string2.
- while (i2 < last2 && string2[i2] == 0) i2++;
+ while (i2 < last2 && !string2[i2]) i2++;
if (i2 == last2) break;
if (string1[i1] != string2[i2]) return F_equal_to_not;
for (; *start <= *stop; (*start)++) {
// skip past NULL.
- while (*start < *stop && source[*start] == 0) (*start)++;
+ while (*start < *stop && !source[*start]) (*start)++;
if (*start > *stop) break;
status = f_utf_character_is_whitespace(source[*start]);
for (; *stop > *start; (*stop)--) {
// skip past NULL.
- while (*stop > *start && source[*stop] == 0) (*stop)--;
+ while (*stop > *start && !source[*stop]) (*stop)--;
- if (source[*stop] == 0) continue;
+ if (!source[*stop]) continue;
if (*stop == *start) break;
status = f_utf_character_is_whitespace(source[*stop]);
#ifndef _di_fl_utf_string_append_
f_return_status fl_utf_string_append(const f_utf_string_t source, const f_utf_string_length_t length, f_utf_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
- if (destination == 0) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- if (length == 0) return F_data_not_eos;
+ if (!length) return F_data_not_eos;
return private_fl_utf_string_append(source, length, destination);
}
#ifndef _di_fl_utf_string_append_assure_
f_return_status fl_utf_string_append_assure(const f_utf_string_t source, const f_utf_string_length_t length, f_utf_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
- if (destination == 0) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- if (length == 0) return F_data_not_eos;
+ if (!length) return F_data_not_eos;
if (destination->used < length) {
return private_fl_utf_string_append(source, length, destination);
#ifndef _di_fl_utf_string_append_assure_nulless_
f_return_status fl_utf_string_append_assure_nulless(const f_utf_string_t source, const f_utf_string_length_t length, f_utf_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
- if (destination == 0) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- if (length == 0) return F_data_not_eos;
+ if (!length) return F_data_not_eos;
if (destination->used < length) {
return private_fl_utf_string_append_nulless(source, length, destination);
#ifndef _di_fl_utf_string_append_nulless_
f_return_status fl_utf_string_append_nulless(const f_utf_string_t source, const f_utf_string_length_t length, f_utf_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
- if (destination == 0) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- if (length == 0) return F_data_not_eos;
+ if (!length) return F_data_not_eos;
return private_fl_utf_string_append_nulless(source, length, destination);
}
#ifndef _di_fl_utf_string_dynamic_append_
f_return_status fl_utf_string_dynamic_append(const f_utf_string_static_t source, f_utf_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
- if (destination == 0) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- if (source.used == 0) return F_data_not_eos;
+ if (!source.used) return F_data_not_eos;
return private_fl_utf_string_append(source.string, source.used, destination);
}
#ifndef _di_fl_utf_string_dynamic_append_assure_
f_return_status fl_utf_string_dynamic_append_assure(const f_utf_string_static_t source, f_utf_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
- if (destination == 0) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- if (source.used == 0) return F_data_not_eos;
+ if (!source.used) return F_data_not_eos;
if (destination->used < source.used) {
return private_fl_utf_string_append(source.string, source.used, destination);
#ifndef _di_fl_utf_string_dynamic_append_assure_nulless_
f_return_status fl_utf_string_dynamic_append_assure_nulless(const f_utf_string_static_t source, f_utf_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
- if (destination == 0) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- if (source.used == 0) return F_data_not_eos;
+ if (!source.used) return F_data_not_eos;
if (destination->used < source.used) {
return private_fl_utf_string_append_nulless(source.string, source.used, destination);
#ifndef _di_fl_utf_string_dynamic_append_nulless_
f_return_status fl_utf_string_dynamic_append_nulless(const f_utf_string_static_t source, f_utf_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
- if (destination == 0) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- if (source.used == 0) return F_data_not_eos;
+ if (!source.used) return F_data_not_eos;
return private_fl_utf_string_append_nulless(source.string, source.used, destination);
}
#ifndef _di_fl_utf_string_dynamic_mash_
f_return_status fl_utf_string_dynamic_mash(const f_utf_string_t glue, const f_utf_string_length_t glue_length, const f_utf_string_static_t source, f_utf_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
- if (destination == 0) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- if (source.used == 0) return F_data_not_eos;
+ if (!source.used) return F_data_not_eos;
if (glue_length > 0 && destination->used > 0) {
const f_status_t status = private_fl_utf_string_append(glue, glue_length, destination);
#ifndef _di_fl_utf_string_dynamic_mash_nulless_
f_return_status fl_utf_string_dynamic_mash_nulless(const f_utf_string_t glue, const f_utf_string_length_t glue_length, const f_utf_string_static_t source, f_utf_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
- if (destination == 0) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- if (source.used == 0) return F_data_not_eos;
+ if (!source.used) return F_data_not_eos;
if (glue_length > 0 && destination->used > 0) {
const f_status_t status = private_fl_utf_string_append_nulless(glue, glue_length, destination);
#ifndef _di_fl_utf_string_dynamic_mish_
f_return_status fl_utf_string_dynamic_mish(const f_utf_string_t glue, const f_utf_string_length_t glue_length, const f_utf_string_static_t source, f_utf_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
- if (destination == 0) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- if (source.used == 0) return F_data_not_eos;
+ if (!source.used) return F_data_not_eos;
if (glue_length > 0 && destination->used > 0) {
const f_status_t status = private_fl_utf_string_prepend(glue, glue_length, destination);
#ifndef _di_fl_utf_string_dynamic_mish_nulless_
f_return_status fl_utf_string_dynamic_mish_nulless(const f_utf_string_t glue, const f_utf_string_length_t glue_length, const f_utf_string_static_t source, f_utf_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
- if (destination == 0) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- if (source.used == 0) return F_data_not_eos;
+ if (!source.used) return F_data_not_eos;
if (glue_length > 0 && destination->used > 0) {
const f_status_t status = private_fl_utf_string_prepend_nulless(glue, glue_length, destination);
f_return_status fl_utf_string_dynamic_partial_append(const f_utf_string_static_t source, const f_utf_string_range_t range, f_utf_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (source.used <= range.stop) return F_status_set_error(F_parameter);
- if (destination == 0) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- if (source.used == 0) return F_data_not_eos;
+ if (!source.used) return F_data_not_eos;
if (range.start > range.stop) return F_data_not_stop;
return private_fl_utf_string_append(source.string + range.start, (range.stop - range.start) + 1, destination);
f_return_status fl_utf_string_dynamic_partial_append_assure(const f_utf_string_static_t source, const f_utf_string_range_t range, f_utf_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (source.used <= range.stop) return F_status_set_error(F_parameter);
- if (destination == 0) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- if (source.used == 0) return F_data_not_eos;
+ if (!source.used) return F_data_not_eos;
if (range.start > range.stop) return F_data_not_stop;
const f_utf_string_length_t length = (range.stop - range.start) + 1;
f_return_status fl_utf_string_dynamic_partial_append_assure_nulless(const f_utf_string_static_t source, const f_utf_string_range_t range, f_utf_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (source.used <= range.stop) return F_status_set_error(F_parameter);
- if (destination == 0) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- if (source.used == 0) return F_data_not_eos;
+ if (!source.used) return F_data_not_eos;
if (range.start > range.stop) return F_data_not_stop;
const f_utf_string_length_t length = (range.stop - range.start) + 1;
f_return_status fl_utf_string_dynamic_partial_append_nulless(const f_utf_string_static_t source, const f_utf_string_range_t range, f_utf_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (source.used <= range.stop) return F_status_set_error(F_parameter);
- if (destination == 0) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- if (source.used == 0) return F_data_not_eos;
+ if (!source.used) return F_data_not_eos;
if (range.start > range.stop) return F_data_not_stop;
return private_fl_utf_string_append_nulless(source.string + range.start, (range.stop - range.start) + 1, destination);
f_return_status fl_utf_string_dynamic_partial_mash(const f_utf_string_t glue, const f_utf_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) {
#ifndef _di_level_1_parameter_checking_
if (source.used <= range.stop) return F_status_set_error(F_parameter);
- if (destination == 0) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- if (source.used == 0) return F_data_not_eos;
+ if (!source.used) return F_data_not_eos;
if (range.start > range.stop) return F_data_not_stop;
if (glue_length > 0 && destination->used > 0) {
f_return_status fl_utf_string_dynamic_partial_mash_nulless(const f_utf_string_t glue, const f_utf_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) {
#ifndef _di_level_1_parameter_checking_
if (source.used <= range.stop) return F_status_set_error(F_parameter);
- if (destination == 0) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- if (source.used == 0) return F_data_not_eos;
+ if (!source.used) return F_data_not_eos;
if (range.start > range.stop) return F_data_not_stop;
if (glue_length > 0 && destination->used > 0) {
f_return_status fl_utf_string_dynamic_partial_mish(const f_utf_string_t glue, const f_utf_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) {
#ifndef _di_level_1_parameter_checking_
if (source.used <= range.stop) return F_status_set_error(F_parameter);
- if (destination == 0) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- if (source.used == 0) return F_data_not_eos;
+ if (!source.used) return F_data_not_eos;
if (range.start > range.stop) return F_data_not_stop;
if (glue_length > 0 && destination->used > 0) {
f_return_status fl_utf_string_dynamic_partial_mish_nulless(const f_utf_string_t glue, const f_utf_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) {
#ifndef _di_level_1_parameter_checking_
if (source.used <= range.stop) return F_status_set_error(F_parameter);
- if (destination == 0) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- if (source.used == 0) return F_data_not_eos;
+ if (!source.used) return F_data_not_eos;
if (range.start > range.stop) return F_data_not_stop;
if (glue_length > 0 && destination->used > 0) {
f_return_status fl_utf_string_dynamic_partial_prepend(const f_utf_string_static_t source, const f_utf_string_range_t range, f_utf_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (source.used <= range.stop) return F_status_set_error(F_parameter);
- if (destination == 0) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- if (source.used == 0) return F_data_not_eos;
+ if (!source.used) return F_data_not_eos;
if (range.start > range.stop) return F_data_not_stop;
return private_fl_utf_string_prepend(source.string + range.start, (range.stop - range.start) + 1, destination);
f_return_status fl_utf_string_dynamic_partial_prepend_assure(const f_utf_string_static_t source, const f_utf_string_range_t range, f_utf_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (source.used <= range.stop) return F_status_set_error(F_parameter);
- if (destination == 0) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- if (source.used == 0) return F_data_not_eos;
+ if (!source.used) return F_data_not_eos;
if (range.start > range.stop) return F_data_not_stop;
const f_utf_string_length_t length = (range.stop - range.start) + 1;
f_return_status fl_utf_string_dynamic_partial_prepend_assure_nulless(const f_utf_string_static_t source, const f_utf_string_range_t range, f_utf_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (source.used <= range.stop) return F_status_set_error(F_parameter);
- if (destination == 0) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- if (source.used == 0) return F_data_not_eos;
+ if (!source.used) return F_data_not_eos;
if (range.start > range.stop) return F_data_not_stop;
const f_utf_string_length_t length = (range.stop - range.start) + 1;
f_return_status fl_utf_string_dynamic_partial_prepend_nulless(const f_utf_string_static_t source, const f_utf_string_range_t range, f_utf_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (source.used <= range.stop) return F_status_set_error(F_parameter);
- if (destination == 0) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- if (source.used == 0) return F_data_not_eos;
+ if (!source.used) return F_data_not_eos;
if (range.start > range.stop) return F_data_not_stop;
return private_fl_utf_string_prepend_nulless(source.string + range.start, (range.stop - range.start) + 1, destination);
#ifndef _di_fl_utf_string_dynamic_prepend_
f_return_status fl_utf_string_dynamic_prepend(const f_utf_string_static_t source, f_utf_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
- if (destination == 0) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- if (source.used == 0) return F_data_not_eos;
+ if (!source.used) return F_data_not_eos;
return private_fl_utf_string_prepend(source.string, source.used, destination);
}
#ifndef _di_fl_utf_string_dynamic_prepend_assure_
f_return_status fl_utf_string_dynamic_prepend_assure(const f_utf_string_static_t source, f_utf_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
- if (destination == 0) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- if (source.used == 0) return F_data_not_eos;
+ if (!source.used) return F_data_not_eos;
if (destination->used < source.used) {
return private_fl_utf_string_prepend(source.string, source.used, destination);
#ifndef _di_fl_utf_string_dynamic_prepend_assure_nulless_
f_return_status fl_utf_string_dynamic_prepend_assure_nulless(const f_utf_string_static_t source, f_utf_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
- if (destination == 0) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- if (source.used == 0) return F_data_not_eos;
+ if (!source.used) return F_data_not_eos;
if (destination->used < source.used) {
return private_fl_utf_string_prepend_nulless(source.string, source.used, destination);
#ifndef _di_fl_utf_string_dynamic_prepend_nulless_
f_return_status fl_utf_string_dynamic_prepend_nulless(const f_utf_string_static_t source, f_utf_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
- if (destination == 0) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- if (source.used == 0) return F_data_not_eos;
+ if (!source.used) return F_data_not_eos;
return private_fl_utf_string_prepend_nulless(source.string, source.used, destination);
}
#ifndef _di_level_1_parameter_checking_
if (source.used <= range.start) return F_status_set_error(F_parameter);
if (source.used <= range.stop) return F_status_set_error(F_parameter);
- if (destination == 0) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- if (source.used == 0) return F_data_not_eos;
+ if (!source.used) return F_data_not_eos;
if (range.start > range.stop) return F_data_not_stop;
return private_fl_utf_string_append(source.string + range.start, (range.stop - range.start) + 1, destination);
#ifndef _di_level_1_parameter_checking_
if (source.used <= range.start) return F_status_set_error(F_parameter);
if (source.used <= range.stop) return F_status_set_error(F_parameter);
- if (destination == 0) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- if (source.used == 0) return F_data_not_eos;
+ if (!source.used) return F_data_not_eos;
if (range.start > range.stop) return F_data_not_stop;
return private_fl_utf_string_append_nulless(source.string + range.start, (range.stop - range.start) + 1, destination);
#ifndef _di_fl_utf_string_dynamic_seek_line_to_
f_return_status fl_utf_string_dynamic_seek_line_to(const f_utf_string_static_t buffer, f_utf_string_range_t *range, const f_utf_character_t seek_to_this) {
#ifndef _di_level_1_parameter_checking_
- if (range == 0) return F_status_set_error(F_parameter);
+ if (!range) return F_status_set_error(F_parameter);
if (buffer.used <= range->start) return F_status_set_error(F_parameter);
if (buffer.used <= range->stop) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- if (buffer.used == 0) return F_data_not_eos;
+ if (!buffer.used) return F_data_not_eos;
if (range->start > range->stop) return F_data_not_stop;
if (f_macro_utf_character_t_width_is(buffer.string[range->start]) == 1) {
#ifndef _di_fl_utf_string_dynamic_seek_line_to_char_
f_return_status fl_utf_string_dynamic_seek_line_to_char(const f_utf_string_static_t buffer, f_utf_string_range_t *range, const int8_t seek_to_this) {
#ifndef _di_level_1_parameter_checking_
- if (range == 0) return F_status_set_error(F_parameter);
+ if (!range) return F_status_set_error(F_parameter);
if (buffer.used <= range->start) return F_status_set_error(F_parameter);
if (buffer.used <= range->stop) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- if (buffer.used == 0) return F_data_not_eos;
+ if (!buffer.used) return F_data_not_eos;
if (range->start > range->stop) return F_data_not_stop;
f_utf_character_t seek_to_character = seek_to_this << 24;
#ifndef _di_fl_utf_string_dynamic_seek_line_until_graph_
f_return_status fl_utf_string_dynamic_seek_line_until_graph(const f_utf_string_static_t buffer, f_utf_string_range_t *range, const f_utf_character_t placeholder) {
#ifndef _di_level_1_parameter_checking_
- if (range == 0) return F_status_set_error(F_parameter);
+ if (!range) return F_status_set_error(F_parameter);
if (buffer.used <= range->start) return F_status_set_error(F_parameter);
if (buffer.used <= range->stop) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- if (buffer.used == 0) return F_data_not_eos;
+ if (!buffer.used) return F_data_not_eos;
if (range->start > range->stop) return F_data_not_stop;
f_status_t status = F_none;
#ifndef _di_fl_utf_string_dynamic_seek_line_until_non_graph_
f_return_status fl_utf_string_dynamic_seek_line_until_non_graph(const f_utf_string_static_t buffer, f_utf_string_range_t *range, const f_utf_character_t placeholder) {
#ifndef _di_level_1_parameter_checking_
- if (range == 0) return F_status_set_error(F_parameter);
+ if (!range) return F_status_set_error(F_parameter);
if (buffer.used <= range->start) return F_status_set_error(F_parameter);
if (buffer.used <= range->stop) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- if (buffer.used == 0) return F_data_not_eos;
+ if (!buffer.used) return F_data_not_eos;
if (range->start > range->stop) return F_data_not_stop;
f_status_t status = F_none;
#ifndef _di_fl_utf_string_dynamic_seek_to_
f_return_status fl_utf_string_dynamic_seek_to(const f_utf_string_static_t buffer, f_utf_string_range_t *range, const f_utf_character_t seek_to_this) {
#ifndef _di_level_1_parameter_checking_
- if (range == 0) return F_status_set_error(F_parameter);
+ if (!range) return F_status_set_error(F_parameter);
if (buffer.used <= range->start) return F_status_set_error(F_parameter);
if (buffer.used <= range->stop) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- if (buffer.used == 0) return F_data_not_eos;
+ if (!buffer.used) return F_data_not_eos;
if (range->start > range->stop) return F_data_not_stop;
if (f_macro_utf_character_t_width_is(buffer.string[range->start]) == 1) {
#ifndef _di_fl_utf_string_dynamic_seek_to_char_
f_return_status fl_utf_string_dynamic_seek_to_char(const f_utf_string_static_t buffer, f_utf_string_range_t *range, const int8_t seek_to_this) {
#ifndef _di_level_1_parameter_checking_
- if (range == 0) return F_status_set_error(F_parameter);
+ if (!range) return F_status_set_error(F_parameter);
if (buffer.used <= range->start) return F_status_set_error(F_parameter);
if (buffer.used <= range->stop) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- if (buffer.used == 0) return F_data_not_eos;
+ if (!buffer.used) return F_data_not_eos;
if (range->start > range->stop) return F_data_not_stop;
f_utf_character_t seek_to_character = seek_to_this << 24;
#ifndef _di_fl_utf_string_dynamic_terminate_
f_return_status fl_utf_string_dynamic_terminate(f_utf_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
- if (destination == 0) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
if (destination->used > destination->size) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
#ifndef _di_fl_utf_string_dynamic_terminate_after_
f_return_status fl_utf_string_dynamic_terminate_after(f_utf_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
- if (destination == 0) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
if (destination->used > destination->size) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
if (destination->used > 0) {
for (; destination->used > 0; destination->used--) {
-
- if (destination->string[destination->used - 1] == 0) continue;
+ if (!destination->string[destination->used - 1]) continue;
break;
} // for
}
#ifndef _di_fl_utf_string_mash_
f_return_status fl_utf_string_mash(const f_utf_string_t glue, const f_utf_string_length_t glue_length, const f_utf_string_t source, const f_utf_string_length_t length, f_utf_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
- if (destination == 0) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- if (length == 0) return F_data_not_eos;
+ if (!length) return F_data_not_eos;
if (glue_length > 0 && destination->used > 0) {
f_status_t status = private_fl_utf_string_append(glue, glue_length, destination);
#ifndef _di_fl_utf_string_mash_nulless_
f_return_status fl_utf_string_mash_nulless(const f_utf_string_t glue, const f_utf_string_length_t glue_length, const f_utf_string_t source, const f_utf_string_length_t length, f_utf_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
- if (destination == 0) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- if (length == 0) return F_data_not_eos;
+ if (!length) return F_data_not_eos;
if (glue_length > 0 && destination->used > 0) {
f_status_t status = private_fl_utf_string_append_nulless(glue, glue_length, destination);
#ifndef _di_fl_utf_string_mish_
f_return_status fl_utf_string_mish(const f_utf_string_t glue, const f_utf_string_length_t glue_length, const f_utf_string_t source, const f_utf_string_length_t length, f_utf_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
- if (destination == 0) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- if (length == 0) return F_data_not_eos;
+ if (!length) return F_data_not_eos;
if (glue_length > 0 && destination->used > 0) {
f_status_t status = private_fl_utf_string_prepend(glue, glue_length, destination);
#ifndef _di_fl_utf_string_mish_nulless_
f_return_status fl_utf_string_mish_nulless(const f_utf_string_t glue, const f_utf_string_length_t glue_length, const f_utf_string_t source, const f_utf_string_length_t length, f_utf_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
- if (destination == 0) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- if (length == 0) return F_data_not_eos;
+ if (!length) return F_data_not_eos;
if (glue_length > 0 && destination->used > 0) {
f_status_t status = private_fl_utf_string_prepend_nulless(glue, glue_length, destination);
#ifndef _di_fl_utf_string_prepend_
f_return_status fl_utf_string_prepend(const f_utf_string_t source, const f_utf_string_length_t length, f_utf_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
- if (destination == 0) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- if (length == 0) return F_data_not_eos;
+ if (!length) return F_data_not_eos;
return private_fl_utf_string_prepend(source, length, destination);
}
#ifndef _di_fl_utf_string_prepend_assure_
f_return_status fl_utf_string_prepend_assure(const f_utf_string_t source, const f_utf_string_length_t length, f_utf_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
- if (destination == 0) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- if (length == 0) return F_data_not_eos;
+ if (!length) return F_data_not_eos;
if (destination->used < length) {
return private_fl_utf_string_prepend(source, length, destination);
#ifndef _di_fl_utf_string_prepend_assure_nulless_
f_return_status fl_utf_string_prepend_assure_nulless(const f_utf_string_t source, const f_utf_string_length_t length, f_utf_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
- if (destination == 0) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- if (length == 0) return F_data_not_eos;
+ if (!length) return F_data_not_eos;
if (destination->used < length) {
return private_fl_utf_string_prepend_nulless(source, length, destination);
#ifndef _di_fl_utf_string_prepend_nulless_
f_return_status fl_utf_string_prepend_nulless(const f_utf_string_t source, const f_utf_string_length_t length, f_utf_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
- if (destination == 0) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- if (length == 0) return F_data_not_eos;
+ if (!length) return F_data_not_eos;
return private_fl_utf_string_prepend_nulless(source, length, destination);
}
#ifndef _di_fl_utf_string_rip_
f_return_status fl_utf_string_rip(const f_utf_string_t source, const f_utf_string_length_t length, f_utf_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
- if (destination == 0) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- if (length == 0) return F_data_not_eos;
+ if (!length) return F_data_not_eos;
f_utf_string_length_t begin = 0;
f_utf_string_length_t end = length - 1;
#ifndef _di_fl_utf_string_rip_nulless_
f_return_status fl_utf_string_rip_nulless(const f_utf_string_t source, const f_utf_string_length_t length, f_utf_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
- if (destination == 0) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- if (length == 0) return F_data_not_eos;
+ if (!length) return F_data_not_eos;
f_utf_string_length_t begin = 0;
f_utf_string_length_t end = length - 1;
#ifndef _di_fl_utf_string_seek_line_to_
f_return_status fl_utf_string_seek_line_to(const f_utf_string_t string, f_utf_string_range_t *range, const f_utf_character_t seek_to_this) {
#ifndef _di_level_1_parameter_checking_
- if (range == 0) return F_status_set_error(F_parameter);
+ if (!range) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
if (range->start > range->stop) return F_data_not_stop;
#ifndef _di_fl_utf_string_seek_line_to_char_
f_return_status fl_utf_string_seek_line_to_char(const f_utf_string_t string, f_utf_string_range_t *range, const int8_t seek_to_this) {
#ifndef _di_level_1_parameter_checking_
- if (range == 0) return F_status_set_error(F_parameter);
+ if (!range) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
if (range->start > range->stop) return F_data_not_stop;
#ifndef _di_fl_utf_string_seek_line_until_graph_
f_return_status fl_utf_string_seek_line_until_graph(const f_utf_string_t string, f_utf_string_range_t *range, const f_utf_character_t placeholder) {
#ifndef _di_level_1_parameter_checking_
- if (range == 0) return F_status_set_error(F_parameter);
+ if (!range) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
if (range->start > range->stop) return F_data_not_stop;
#ifndef _di_fl_utf_string_seek_line_until_non_graph_
f_return_status fl_utf_string_seek_line_until_non_graph(const f_utf_string_t string, f_utf_string_range_t *range, const f_utf_character_t placeholder) {
#ifndef _di_level_1_parameter_checking_
- if (range == 0) return F_status_set_error(F_parameter);
+ if (!range) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
if (range->start > range->stop) return F_data_not_stop;
#ifndef _di_fl_utf_string_seek_to_
f_return_status fl_utf_string_seek_to(const f_utf_string_t string, f_utf_string_range_t *range, const f_utf_character_t seek_to_this) {
#ifndef _di_level_1_parameter_checking_
- if (range == 0) return F_status_set_error(F_parameter);
+ if (!range) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
if (range->start > range->stop) return F_data_not_stop;
#ifndef _di_fl_utf_string_seek_to_char_
f_return_status fl_utf_string_seek_to_char(const f_utf_string_t string, f_utf_string_range_t *range, const int8_t seek_to_this) {
#ifndef _di_level_1_parameter_checking_
- if (range == 0) return F_status_set_error(F_parameter);
+ if (!range) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
if (range->start > range->stop) return F_data_not_stop;
for (; i < size_read; i += increment_by) {
increment_by = 0;
- if (*width == 0) {
+ if (!*width) {
*width = f_macro_utf_byte_width(buffer_read[i]);
*width_last = -1;
}
size_write = write(file.id, buffer_write, used);
- if (size_write == 0) {
+ if (!size_write) {
return F_none_stop;
}
#ifndef _di_fl_utf_file_read_
f_return_status fl_utf_file_read(const f_file_t file, f_utf_string_dynamic_t *buffer) {
#ifndef _di_level_1_parameter_checking_
- if (file.size_read == 0) return F_status_set_error(F_parameter);
+ if (!file.size_read) return F_status_set_error(F_parameter);
if (buffer->used > buffer->size) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
if (file.id < 0) return F_status_set_error(F_file);
- if (file.id == 0) return F_status_set_error(F_file_closed);
+ if (!file.id) return F_status_set_error(F_file_closed);
f_status_t status = F_none;
private_fl_utf_file_process_read_buffer(buffer_read, size_read, buffer, buffer_char, &width, &width_last);
} // while
- if (size_read == 0) {
+ if (!size_read) {
if (width != 0) {
return F_status_set_error(F_incomplete_utf_eof);
}
#ifndef _di_fl_utf_file_read_block_
f_return_status fl_utf_file_read_block(const f_file_t file, f_utf_string_dynamic_t *buffer) {
#ifndef _di_level_1_parameter_checking_
- if (file.size_read == 0) return F_status_set_error(F_parameter);
+ if (!file.size_read) return F_status_set_error(F_parameter);
if (buffer->used > buffer->size) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
if (file.id < 0) return F_status_set_error(F_file);
- if (file.id == 0) return F_status_set_error(F_file_closed);
+ if (!file.id) return F_status_set_error(F_file_closed);
f_status_t status = F_none;
private_fl_utf_file_process_read_buffer(buffer_read, size_read, buffer, buffer_char, &width, &width_last);
}
- if (size_read == 0) {
- if (width != 0) {
+ if (!size_read) {
+ if (width) {
return F_status_set_error(F_incomplete_utf_eof);
}
#ifndef _di_fl_utf_file_read_until_
f_return_status fl_utf_file_read_until(const f_file_t file, const f_utf_string_length_t total, f_utf_string_dynamic_t *buffer) {
#ifndef _di_level_1_parameter_checking_
- if (file.size_read == 0) return F_status_set_error(F_parameter);
+ if (!file.size_read) return F_status_set_error(F_parameter);
if (buffer->used > buffer->size) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
if (file.id < 0) return F_status_set_error(F_file);
- if (file.id == 0) return F_status_set_error(F_file_closed);
+ if (!file.id) return F_status_set_error(F_file_closed);
f_status_t status = F_none;
private_fl_utf_file_process_read_buffer(buffer_read, size_read, buffer, buffer_char, &width, &width_last);
} // while
- if (size_read == 0) {
+ if (!size_read) {
if (width != 0) {
return F_status_set_error(F_incomplete_utf_eof);
}
#ifndef _di_fl_utf_file_write_
f_return_status fl_utf_file_write(const f_file_t file, const f_utf_string_static_t buffer, f_utf_string_length_t *written) {
#ifndef _di_level_0_parameter_checking_
- if (file.size_write == 0) return F_status_set_error(F_parameter);
+ 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_level_0_parameter_checking_
if (file.id < 0) return F_status_set_error(F_file);
- if (file.id == 0) return F_status_set_error(F_file_closed);
+ if (!file.id) return F_status_set_error(F_file_closed);
- if (buffer.used == 0) {
+ if (!buffer.used) {
*written = 0;
return F_data_not;
}
#ifndef _di_fl_utf_file_write_block_
f_return_status fl_utf_file_write_block(const f_file_t file, const f_utf_string_static_t buffer, f_utf_string_length_t *written) {
#ifndef _di_level_0_parameter_checking_
- if (file.size_write == 0) return F_status_set_error(F_parameter);
+ 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_level_0_parameter_checking_
if (file.id < 0) return F_status_set_error(F_file);
- if (file.id == 0) return F_status_set_error(F_file_closed);
+ if (!file.id) return F_status_set_error(F_file_closed);
- if (buffer.used == 0) {
+ if (!buffer.used) {
*written = 0;
return F_data_not;
}
#ifndef _di_fl_utf_file_write_until_
f_return_status fl_utf_file_write_until(const f_file_t file, const f_utf_string_static_t buffer, const f_utf_string_length_t total, f_utf_string_length_t *written) {
#ifndef _di_level_0_parameter_checking_
- if (file.size_write == 0) return F_status_set_error(F_parameter);
+ 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_level_0_parameter_checking_
if (file.id < 0) return F_status_set_error(F_file);
- if (file.id == 0) return F_status_set_error(F_file_closed);
+ if (!file.id) return F_status_set_error(F_file_closed);
- if (buffer.used == 0 || total == 0) {
+ if (!buffer.used || !total) {
*written = 0;
return F_data_not;
}
#ifndef _di_fl_utf_file_write_range_
f_return_status 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_utf_string_length_t *written) {
#ifndef _di_level_0_parameter_checking_
- if (file.size_write == 0) return F_status_set_error(F_parameter);
+ if (!file.size_write) return F_status_set_error(F_parameter);
if (buffer.used > buffer.size) return F_status_set_error(F_parameter);
if (range.stop < range.start) return F_status_set_error(F_parameter);
if (range.start >= buffer.used) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
if (file.id < 0) return F_status_set_error(F_file);
- if (file.id == 0) return F_status_set_error(F_file_closed);
+ if (!file.id) return F_status_set_error(F_file_closed);
- if (buffer.used == 0) {
+ if (!buffer.used) {
*written = 0;
return F_data_not;
}
#ifndef _di_fll_execute_arguments_add_
f_return_status fll_execute_arguments_add(const f_string_t source, const f_string_length_t length, f_string_dynamics_t *arguments) {
#ifndef _di_level_2_parameter_checking_
- if (arguments == 0) return F_status_set_error(F_parameter);
+ if (!arguments) return F_status_set_error(F_parameter);
if (arguments->used > arguments->size) return F_status_set_error(F_parameter);
#endif // _di_level_2_parameter_checking_
- if (length == 0) return F_data_not;
+ if (!length) return F_data_not;
f_status_t status = F_none;
#ifndef _di_fll_execute_arguments_add_parameter_
f_return_status 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) {
#ifndef _di_level_2_parameter_checking_
- if (arguments == 0) return F_status_set_error(F_parameter);
+ if (!arguments) return F_status_set_error(F_parameter);
if (arguments->used > arguments->size) return F_status_set_error(F_parameter);
#endif // _di_level_2_parameter_checking_
- if (name_length == 0) return F_data_not;
- if (value_length == 0) return F_data_not;
+ if (!name_length) return F_data_not;
+ if (!value_length) return F_data_not;
f_status_t status = F_none;
#ifndef _di_fll_execute_arguments_add_parameter_set_
f_return_status 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) {
#ifndef _di_level_2_parameter_checking_
- if (arguments == 0) return F_status_set_error(F_parameter);
+ if (!arguments) return F_status_set_error(F_parameter);
if (arguments->used > arguments->size) return F_status_set_error(F_parameter);
#endif // _di_level_2_parameter_checking_
- if (size == 0) return F_data_not;
+ if (!size) return F_data_not;
f_status_t status = F_none;
for (f_array_length_t i = 0; i < size; i++) {
- if (name_length[i] == 0) continue;
- if (value_length[i] == 0) continue;
+ if (!name_length[i]) continue;
+ if (!value_length[i]) continue;
status = private_fll_execute_arguments_add_parameter(prefix[i], prefix_length[i], name[i], name_length[i], value[i], value_length[i], arguments);
if (F_status_is_error(status)) return status;
#ifndef _di_fll_execute_arguments_add_set_
f_return_status 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) {
#ifndef _di_level_2_parameter_checking_
- if (arguments == 0) return F_status_set_error(F_parameter);
+ if (!arguments) return F_status_set_error(F_parameter);
if (arguments->used > arguments->size) return F_status_set_error(F_parameter);
#endif // _di_level_2_parameter_checking_
- if (size == 0) return F_data_not;
+ if (!size) return F_data_not;
f_status_t status = F_none;
for (f_array_length_t i = 0; i < size; i++) {
- if (length[i] == 0) continue;
+ if (!length[i]) continue;
status = private_fll_execute_arguments_add(source[i], length[i], arguments);
if (F_status_is_error(status)) return status;
f_return_status fll_execute_arguments_dynamic_add(const f_string_static_t source, f_string_dynamics_t *arguments) {
#ifndef _di_level_2_parameter_checking_
if (source.used > source.size) return F_status_set_error(F_parameter);
- if (arguments == 0) return F_status_set_error(F_parameter);
+ if (!arguments) return F_status_set_error(F_parameter);
if (arguments->used > arguments->size) return F_status_set_error(F_parameter);
#endif // _di_level_2_parameter_checking_
- if (source.used == 0) return F_data_not;
+ if (!source.used) return F_data_not;
f_status_t status = F_none;
if (prefix.used > prefix.size) return F_status_set_error(F_parameter);
if (name.used > name.size) return F_status_set_error(F_parameter);
if (value.used > value.size) return F_status_set_error(F_parameter);
- if (arguments == 0) return F_status_set_error(F_parameter);
+ if (!arguments) return F_status_set_error(F_parameter);
if (arguments->used > arguments->size) return F_status_set_error(F_parameter);
#endif // _di_level_2_parameter_checking_
- if (name.used == 0) return F_data_not;
- if (value.used == 0) return F_data_not;
+ if (!name.used) return F_data_not;
+ if (!value.used) return F_data_not;
f_status_t status = F_none;
#ifndef _di_fll_execute_arguments_dynamic_add_parameter_set_
f_return_status fll_execute_arguments_dynamic_add_parameter_set(const f_string_static_t prefix[], const f_string_static_t name[], const f_string_static_t value[], const f_array_length_t size, f_string_dynamics_t *arguments) {
#ifndef _di_level_2_parameter_checking_
- if (arguments == 0) return F_status_set_error(F_parameter);
+ if (!arguments) return F_status_set_error(F_parameter);
if (arguments->used > arguments->size) return F_status_set_error(F_parameter);
#endif // _di_level_2_parameter_checking_
- if (size == 0) return F_data_not;
+ if (!size) return F_data_not;
f_status_t status = F_none;
for (f_array_length_t i = 0; i < size; i++) {
if (prefix[i].used > prefix[i].size) continue;
- if (name[i].used == 0) continue;
+ if (!name[i].used) continue;
if (name[i].used > name[i].size) continue;
- if (value[i].used == 0) continue;
+ if (!value[i].used) continue;
if (value[i].used > value[i].size) continue;
status = private_fll_execute_arguments_add_parameter(prefix[i].string, prefix[i].used, name[i].string, name[i].used, value[i].string, value[i].used, arguments);
#ifndef _di_fll_execute_arguments_dynamic_add_set_
f_return_status fll_execute_arguments_dynamic_add_set(const f_string_static_t source[], const f_array_length_t size, f_string_dynamics_t *arguments) {
#ifndef _di_level_2_parameter_checking_
- if (arguments == 0) return F_status_set_error(F_parameter);
+ if (!arguments) return F_status_set_error(F_parameter);
if (arguments->used > arguments->size) return F_status_set_error(F_parameter);
#endif // _di_level_2_parameter_checking_
- if (size == 0) return F_data_not;
+ if (!size) return F_data_not;
f_status_t status = F_none;
for (f_array_length_t i = 0; i < size; i++) {
- if (source[i].used == 0) continue;
+ if (!source[i].used) continue;
if (source[i].used > source[i].size) continue;
status = private_fll_execute_arguments_add(source[i].string, source[i].used, arguments);
#ifndef _di_fll_execute_path_
f_return_status fll_execute_path(const f_string_t program_path, const f_string_statics_t arguments, const f_signal_how_t *signals, int *result) {
#ifndef _di_level_2_parameter_checking_
- if (result == 0) return F_status_set_error(F_parameter);
+ if (!result) return F_status_set_error(F_parameter);
if (arguments.used > arguments.size) return F_status_set_error(F_parameter);
#endif // _di_level_2_parameter_checking_
last_slash = strrchr(program_path, '/');
- if (last_slash == 0) {
+ if (!last_slash) {
name_size = strnlen(program_path, f_path_max);
if (name_size > 1) {
}
}
- if (name_size == 0) {
+ if (!name_size) {
fixed_arguments[0] = 0;
}
else {
}
// child process.
- if (process_id == 0) {
+ if (!process_id) {
if (signals) {
f_signal_set_handle(SIG_BLOCK, &signals->block);
f_signal_set_handle(SIG_UNBLOCK, &signals->block_not);
#ifndef _di_fll_execute_path_environment_
f_return_status fll_execute_path_environment(const f_string_t program_path, const f_string_statics_t arguments, const f_signal_how_t *signals, const f_string_statics_t names, const f_string_statics_t values, int *result) {
#ifndef _di_level_2_parameter_checking_
- if (result == 0) return F_status_set_error(F_parameter);
+ if (!result) return F_status_set_error(F_parameter);
if (arguments.used > arguments.size) return F_status_set_error(F_parameter);
if (names.used > names.size) return F_status_set_error(F_parameter);
if (values.used > values.size) return F_status_set_error(F_parameter);
last_slash = strrchr(program_path, '/');
- if (last_slash == 0) {
+ if (!last_slash) {
name_size = strnlen(program_path, f_path_max);
if (name_size > 1) {
}
}
- if (name_size == 0) {
+ if (!name_size) {
fixed_arguments[0] = 0;
}
else {
}
// child process.
- if (process_id == 0) {
+ if (!process_id) {
if (signals) {
f_signal_set_handle(SIG_BLOCK, &signals->block);
f_signal_set_handle(SIG_UNBLOCK, &signals->block_not);
#ifndef _di_fll_execute_program_
f_return_status fll_execute_program(const f_string_t program_name, const f_string_statics_t arguments, const f_signal_how_t *signals, int *result) {
#ifndef _di_level_2_parameter_checking_
- if (result == 0) return F_status_set_error(F_parameter);
+ if (!result) return F_status_set_error(F_parameter);
if (arguments.used > arguments.size) return F_status_set_error(F_parameter);
#endif // _di_level_2_parameter_checking_
}
// child process.
- if (process_id == 0) {
+ if (!process_id) {
if (signals) {
f_signal_set_handle(SIG_BLOCK, &signals->block);
f_signal_set_handle(SIG_UNBLOCK, &signals->block_not);
#ifndef _di_fll_execute_program_environment_
f_return_status fll_execute_program_environment(const f_string_t program_name, const f_string_statics_t arguments, const f_signal_how_t *signals, const f_string_statics_t names, const f_string_statics_t values, int *result) {
#ifndef _di_level_2_parameter_checking_
- if (result == 0) return F_status_set_error(F_parameter);
+ if (!result) return F_status_set_error(F_parameter);
if (arguments.used > arguments.size) return F_status_set_error(F_parameter);
if (names.used > names.size) return F_status_set_error(F_parameter);
if (values.used > values.size) return F_status_set_error(F_parameter);
}
} // for
- if (found == 0) {
+ if (!found) {
f_macro_string_dynamics_t_delete_simple(paths);
return F_status_set_error(F_file_found_not);
}
}
// child process.
- if (process_id == 0) {
+ if (!process_id) {
if (signals) {
f_signal_set_handle(SIG_BLOCK, &signals->block);
f_signal_set_handle(SIG_UNBLOCK, &signals->block_not);
#ifndef _di_fll_fss_identify_
f_return_status fll_fss_identify(const f_string_static_t buffer, f_fss_header_t *header) {
#ifndef _di_level_2_parameter_checking_
- if (header == 0) return F_status_set_error(F_parameter);
- if (buffer.used == 0) return F_status_set_error(F_parameter);
+ if (!header) return F_status_set_error(F_parameter);
+ if (!buffer.used) return F_status_set_error(F_parameter);
#endif // _di_level_2_parameter_checking_
return private_fll_fss_identify(buffer, header);
#ifndef _di_fll_fss_identify_file_
f_return_status fll_fss_identify_file(f_file_t *file, f_fss_header_t *header) {
#ifndef _di_level_2_parameter_checking_
- if (file == 0) return F_status_set_error(F_parameter);
- if (header == 0) return F_status_set_error(F_parameter);
- if (file->id == 0) return F_status_set_error(F_file_closed);
+ if (!file) return F_status_set_error(F_parameter);
+ if (!header) return F_status_set_error(F_parameter);
+ if (!file->id) return F_status_set_error(F_file_closed);
if (file->id < 0) return F_status_set_error(F_file);
#endif // _di_level_2_parameter_checking_
#ifndef _di_fll_fss_snatch_
f_return_status 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[]) {
#ifndef _di_level_2_parameter_checking_
- if (size == 0) return F_status_set_error(F_parameter);
+ if (!size) return F_status_set_error(F_parameter);
if (objects.used != contents.used) return F_status_set_error(F_parameter);
- if (values == 0) return F_status_set_error(F_parameter);
+ if (!values) return F_status_set_error(F_parameter);
#endif // _di_level_2_parameter_checking_
- if (buffer.used == 0) return F_data_not;
- if (objects.used == 0) return F_data_not;
- if (contents.used == 0) return F_data_not;
+ if (!buffer.used) return F_data_not;
+ if (!objects.used) return F_data_not;
+ if (!contents.used) return F_data_not;
f_status_t status = F_none;
f_string_length_t length_object = 0;
#ifndef _di_fll_fss_snatch_apart_
f_return_status 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[]) {
#ifndef _di_level_2_parameter_checking_
- if (size == 0) return F_status_set_error(F_parameter);
+ if (!size) return F_status_set_error(F_parameter);
if (objects.used != contents.used) return F_status_set_error(F_parameter);
- if (values == 0) return F_status_set_error(F_parameter);
+ if (!values) return F_status_set_error(F_parameter);
#endif // _di_level_2_parameter_checking_
- if (buffer.used == 0) return F_data_not;
- if (objects.used == 0) return F_data_not;
- if (contents.used == 0) return F_data_not;
+ if (!buffer.used) return F_data_not;
+ if (!objects.used) return F_data_not;
+ if (!contents.used) return F_data_not;
f_status_t status = F_none;
f_string_length_t length_object = 0;
#ifndef _di_fll_fss_snatch_map_
f_return_status 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[]) {
#ifndef _di_level_2_parameter_checking_
- if (size == 0) return F_status_set_error(F_parameter);
+ if (!size) return F_status_set_error(F_parameter);
if (objects.used != contents.used) return F_status_set_error(F_parameter);
- if (values == 0) return F_status_set_error(F_parameter);
+ if (!values) return F_status_set_error(F_parameter);
#endif // _di_level_2_parameter_checking_
- if (buffer.used == 0) return F_data_not;
- if (objects.used == 0) return F_data_not;
- if (contents.used == 0) return F_data_not;
+ if (!buffer.used) return F_data_not;
+ if (!objects.used) return F_data_not;
+ if (!contents.used) return F_data_not;
f_status_t status = F_none;
f_string_length_t length_name = 0;
#ifndef _di_fll_fss_snatch_map_apart_
f_return_status 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[]) {
#ifndef _di_level_2_parameter_checking_
- if (size == 0) return F_status_set_error(F_parameter);
+ if (!size) return F_status_set_error(F_parameter);
if (objects.used != contents.used) return F_status_set_error(F_parameter);
- if (values == 0) return F_status_set_error(F_parameter);
+ if (!values) return F_status_set_error(F_parameter);
#endif // _di_level_2_parameter_checking_
- if (buffer.used == 0) return F_data_not;
- if (objects.used == 0) return F_data_not;
- if (contents.used == 0) return F_data_not;
+ if (!buffer.used) return F_data_not;
+ if (!objects.used) return F_data_not;
+ if (!contents.used) return F_data_not;
f_status_t status = F_none;
f_string_length_t length_object = 0;
#ifndef _di_fll_fss_snatch_map_mash_
f_return_status 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[]) {
#ifndef _di_level_2_parameter_checking_
- if (size == 0) return F_status_set_error(F_parameter);
+ if (!size) return F_status_set_error(F_parameter);
if (objects.used != contents.used) return F_status_set_error(F_parameter);
- if (values == 0) return F_status_set_error(F_parameter);
+ if (!values) return F_status_set_error(F_parameter);
#endif // _di_level_2_parameter_checking_
- if (buffer.used == 0) return F_data_not;
- if (objects.used == 0) return F_data_not;
- if (contents.used == 0) return F_data_not;
+ if (!buffer.used) return F_data_not;
+ if (!objects.used) return F_data_not;
+ if (!contents.used) return F_data_not;
f_status_t status = F_none;
f_string_length_t length_object = 0;
#ifndef _di_fll_fss_snatch_map_mash_apart_
f_return_status 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[]) {
#ifndef _di_level_2_parameter_checking_
- if (size == 0) return F_status_set_error(F_parameter);
+ if (!size) return F_status_set_error(F_parameter);
if (objects.used != contents.used) return F_status_set_error(F_parameter);
- if (values == 0) return F_status_set_error(F_parameter);
+ if (!values) return F_status_set_error(F_parameter);
#endif // _di_level_2_parameter_checking_
- if (buffer.used == 0) return F_data_not;
- if (objects.used == 0) return F_data_not;
- if (contents.used == 0) return F_data_not;
+ if (!buffer.used) return F_data_not;
+ if (!objects.used) return F_data_not;
+ if (!contents.used) return F_data_not;
f_status_t status = F_none;
f_string_length_t length_name = 0;
#ifndef _di_fll_fss_snatch_map_together_
f_return_status 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[]) {
#ifndef _di_level_2_parameter_checking_
- if (size == 0) return F_status_set_error(F_parameter);
+ if (!size) return F_status_set_error(F_parameter);
if (objects.used != contents.used) return F_status_set_error(F_parameter);
- if (values == 0) return F_status_set_error(F_parameter);
+ if (!values) return F_status_set_error(F_parameter);
#endif // _di_level_2_parameter_checking_
- if (buffer.used == 0) return F_data_not;
- if (objects.used == 0) return F_data_not;
- if (contents.used == 0) return F_data_not;
+ if (!buffer.used) return F_data_not;
+ if (!objects.used) return F_data_not;
+ if (!contents.used) return F_data_not;
f_status_t status = F_none;
f_string_length_t length_name = 0;
#ifndef _di_fll_fss_snatch_mash_
f_return_status 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[]) {
#ifndef _di_level_2_parameter_checking_
- if (size == 0) return F_status_set_error(F_parameter);
+ if (!size) return F_status_set_error(F_parameter);
if (objects.used != contents.used) return F_status_set_error(F_parameter);
- if (values == 0) return F_status_set_error(F_parameter);
+ if (!values) return F_status_set_error(F_parameter);
#endif // _di_level_2_parameter_checking_
- if (buffer.used == 0) return F_data_not;
- if (objects.used == 0) return F_data_not;
- if (contents.used == 0) return F_data_not;
+ if (!buffer.used) return F_data_not;
+ if (!objects.used) return F_data_not;
+ if (!contents.used) return F_data_not;
f_status_t status = F_none;
f_string_length_t length_object = 0;
#ifndef _di_fll_fss_snatch_mash_apart_
f_return_status 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[]) {
#ifndef _di_level_2_parameter_checking_
- if (size == 0) return F_status_set_error(F_parameter);
+ if (!size) return F_status_set_error(F_parameter);
if (objects.used != contents.used) return F_status_set_error(F_parameter);
- if (values == 0) return F_status_set_error(F_parameter);
+ if (!values) return F_status_set_error(F_parameter);
#endif // _di_level_2_parameter_checking_
- if (buffer.used == 0) return F_data_not;
- if (objects.used == 0) return F_data_not;
- if (contents.used == 0) return F_data_not;
+ if (!buffer.used) return F_data_not;
+ if (!objects.used) return F_data_not;
+ if (!contents.used) return F_data_not;
f_status_t status = F_none;
f_string_length_t length_object = 0;
#ifndef _di_fll_fss_snatch_together_
f_return_status 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[]) {
#ifndef _di_level_2_parameter_checking_
- if (size == 0) return F_status_set_error(F_parameter);
+ if (!size) return F_status_set_error(F_parameter);
if (objects.used != contents.used) return F_status_set_error(F_parameter);
- if (values == 0) return F_status_set_error(F_parameter);
+ if (!values) return F_status_set_error(F_parameter);
#endif // _di_level_2_parameter_checking_
- if (buffer.used == 0) return F_data_not;
- if (objects.used == 0) return F_data_not;
- if (contents.used == 0) return F_data_not;
+ if (!buffer.used) return F_data_not;
+ if (!objects.used) return F_data_not;
+ if (!contents.used) return F_data_not;
f_status_t status = F_none;
f_string_length_t length_object = 0;
#ifndef _di_fll_fss_basic_read_
f_return_status fll_fss_basic_read(f_string_dynamic_t *buffer, f_string_range_t *range, f_fss_objects_t *objects, f_fss_contents_t *contents, f_fss_quoteds_t *quoted_objects) {
#ifndef _di_level_2_parameter_checking_
- if (buffer == 0) return F_status_set_error(F_parameter);
- if (range == 0) return F_status_set_error(F_parameter);
- if (objects == 0) return F_status_set_error(F_parameter);
- if (contents == 0) return F_status_set_error(F_parameter);
+ if (!buffer) return F_status_set_error(F_parameter);
+ if (!range) return F_status_set_error(F_parameter);
+ if (!objects) return F_status_set_error(F_parameter);
+ if (!contents) return F_status_set_error(F_parameter);
#endif // _di_level_2_parameter_checking_
f_status_t status = F_none;
#ifndef _di_fll_fss_basic_write_
f_return_status fll_fss_basic_write(const f_string_static_t object, const f_string_statics_t contents, f_string_dynamic_t *destination) {
#ifndef _di_level_2_parameter_checking_
- if (destination == 0) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
if (contents.used > contents.size) return F_status_set_error(F_parameter);
#endif // _di_level_2_parameter_checking_
#ifndef _di_fll_fss_basic_list_read_
f_return_status fll_fss_basic_list_read(f_string_dynamic_t *buffer, f_string_range_t *range, f_fss_objects_t *objects, f_fss_contents_t *contents) {
#ifndef _di_level_2_parameter_checking_
- if (buffer == 0) return F_status_set_error(F_parameter);
- if (range == 0) return F_status_set_error(F_parameter);
- if (objects == 0) return F_status_set_error(F_parameter);
- if (contents == 0) return F_status_set_error(F_parameter);
+ if (!buffer) return F_status_set_error(F_parameter);
+ if (!range) return F_status_set_error(F_parameter);
+ if (!objects) return F_status_set_error(F_parameter);
+ if (!contents) return F_status_set_error(F_parameter);
#endif // _di_level_2_parameter_checking_
f_status_t status = F_none;
#ifndef _di_fll_fss_basic_list_write_
f_return_status fll_fss_basic_list_write(const f_string_static_t object, const f_string_statics_t contents, f_string_dynamic_t *buffer) {
#ifndef _di_level_2_parameter_checking_
- if (buffer == 0) return F_status_set_error(F_parameter);
+ if (!buffer) return F_status_set_error(F_parameter);
if (contents.used > contents.size) return F_status_set_error(F_parameter);
#endif // _di_level_2_parameter_checking_
#ifndef _di_fll_fss_extended_read_
f_return_status fll_fss_extended_read(f_string_dynamic_t *buffer, f_string_range_t *range, f_fss_objects_t *objects, f_fss_contents_t *contents, f_fss_quoteds_t *quoted_objects, f_fss_quotedss_t *quoted_contents) {
#ifndef _di_level_2_parameter_checking_
- if (buffer == 0) return F_status_set_error(F_parameter);
- if (range == 0) return F_status_set_error(F_parameter);
- if (objects == 0) return F_status_set_error(F_parameter);
- if (contents == 0) return F_status_set_error(F_parameter);
+ if (!buffer) return F_status_set_error(F_parameter);
+ if (!range) return F_status_set_error(F_parameter);
+ if (!objects) return F_status_set_error(F_parameter);
+ if (!contents) return F_status_set_error(F_parameter);
#endif // _di_level_2_parameter_checking_
f_status_t status = F_none;
#ifndef _di_fll_fss_extended_write_
f_return_status fll_fss_extended_write(const f_string_static_t object, const f_string_statics_t contents, f_string_dynamic_t *buffer) {
#ifndef _di_level_2_parameter_checking_
- if (buffer == 0) return F_status_set_error(F_parameter);
+ if (!buffer) return F_status_set_error(F_parameter);
if (contents.used > contents.size) return F_status_set_error(F_parameter);
#endif // _di_level_2_parameter_checking_
#ifndef _di_fll_fss_extended_list_read_
f_return_status fll_fss_extended_list_read(f_string_dynamic_t *buffer, f_string_range_t *range, f_fss_nest_t *nest) {
#ifndef _di_level_3_parameter_checking_
- if (buffer == 0) return F_status_set_error(F_parameter);
- if (range == 0) return F_status_set_error(F_parameter);
- if (nest == 0) return F_status_set_error(F_parameter);
+ if (!buffer) return F_status_set_error(F_parameter);
+ if (!range) return F_status_set_error(F_parameter);
+ if (!nest) return F_status_set_error(F_parameter);
#endif // _di_level_3_parameter_checking_
f_status_t status = F_none;
f_string_length_t initial_used = 0;
bool found_data = F_false;
- if (nest->used == 0) {
+ if (!nest->used) {
f_macro_fss_nest_t_resize(status2, (*nest), f_fss_default_allocation_step);
if (F_status_is_error(status2)) return status2;
}
#ifndef _di_fll_fss_extended_list_write_
f_return_status fll_fss_extended_list_write(const f_string_static_t object, const f_string_statics_t contents, f_string_dynamic_t *buffer) {
#ifndef _di_level_3_parameter_checking_
- if (buffer == 0) return F_status_set_error(F_parameter);
+ if (!buffer) return F_status_set_error(F_parameter);
if (contents.used > contents.size) return F_status_set_error(F_parameter);
#endif // _di_level_3_parameter_checking_
#ifndef _di_fll_fss_status_from_string_
f_return_status fll_fss_status_from_string(const f_string_t string, f_status_t *code) {
#ifndef _di_level_1_parameter_checking_
- if (code == 0) return F_status_set_error(F_parameter);
+ if (!code) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
f_status_t status = F_none;
const f_string_length_t length = strlen(string);
- if (length == 0) {
+ if (!length) {
return F_data_not;
}
#ifndef _di_fll_fss_status_to_string_
f_return_status fll_fss_status_to_string(const f_status_t code, f_string_t *string) {
#ifndef _di_level_2_parameter_checking_
- if (string == 0) return F_status_set_error(F_parameter);
+ if (!string) return F_status_set_error(F_parameter);
#endif // _di_level_2_parameter_checking_
const f_status_t unmasked_code = F_status_set_fine(code);
#ifndef _di_fll_path_canonical_
f_return_status fll_path_canonical(const f_string_t path, f_string_dynamic_t *canonical) {
#ifndef _di_level_2_parameter_checking_
- if (canonical == 0) return F_status_set_error(F_parameter);
+ if (!canonical) return F_status_set_error(F_parameter);
#endif // _di_level_2_parameter_checking_
f_status_t status = F_none;
#ifndef _di_fll_program_parameter_additional_append_
f_return_status fll_program_parameter_additional_append(const f_string_t *argv, const f_string_lengths_t additional, f_string_dynamics_t *destination) {
#ifndef _di_level_2_parameter_checking_
- if (argv == 0) return F_status_set_error(F_parameter);
- if (destination == 0) return F_status_set_error(F_parameter);
+ if (!argv) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_2_parameter_checking_
f_status_t status = F_none;
#ifndef _di_fll_program_parameter_additional_mash_
f_return_status fll_program_parameter_additional_mash(const f_string_t glue, const f_string_length_t glue_length, const f_string_t *argv, const f_string_lengths_t additional, f_string_dynamic_t *destination) {
#ifndef _di_level_2_parameter_checking_
- if (argv == 0) return F_status_set_error(F_parameter);
+ if (!argv) return F_status_set_error(F_parameter);
if (glue_length < 1) return F_status_set_error(F_parameter);
- if (destination == 0) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_2_parameter_checking_
f_status_t status = F_none;
#ifndef _di_fll_program_parameter_additional_rip_
f_return_status fll_program_parameter_additional_rip(const f_string_t *argv, const f_string_lengths_t additional, f_string_dynamics_t *destination) {
#ifndef _di_level_2_parameter_checking_
- if (argv == 0) return F_status_set_error(F_parameter);
- if (destination == 0) return F_status_set_error(F_parameter);
+ if (!argv) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_2_parameter_checking_
f_status_t status = F_none;
#ifndef _di_fll_program_parameter_additional_rip_mash_
f_return_status 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_string_lengths_t additional, f_string_dynamic_t *destination) {
#ifndef _di_level_2_parameter_checking_
- if (argv == 0) return F_status_set_error(F_parameter);
+ if (!argv) return F_status_set_error(F_parameter);
if (glue_length < 1) return F_status_set_error(F_parameter);
- if (destination == 0) return F_status_set_error(F_parameter);
+ if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_2_parameter_checking_
f_status_t status = F_none;
#ifndef _di_fll_status_from_string_
f_return_status fll_status_from_string(const f_string_t string, f_status_t *code) {
#ifndef _di_level_1_parameter_checking_
- if (code == 0) return F_status_set_error(F_parameter);
+ if (!code) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
f_status_t status = F_none;
const f_string_length_t length = strlen(string);
- if (length == 0) {
+ if (!length) {
return F_data_not;
}
}
// When width_count == 0, then this is that start of a new character sequence.
- if (width_count == 0) {
+ if (!width_count) {
characters.string[character_current] = f_macro_utf_character_t_from_char_1(byte);
width_count = 1;
byte = f_macro_utf_character_t_to_char_4(characters.string[character_current]);
}
- if (cell->column == 0) {
+ if (!cell->column) {
fl_color_print(f_type_output, data.context.set.notable, "%016X ", (uint64_t) cell->row);
if (*offset > 0) {
cell->column = 0;
cell->row++;
- if (bytes == 0) {
+ if (!bytes) {
previous->bytes = 0;
previous->invalid = 0;
}
}
else if (output >= 0 && output <= 32 || output == 127) {
if (data.presentation == byte_dump_presentation_normal) {
- if (output == 0) {
+ if (!output) {
fl_color_print2(f_type_output, data.context.set.notable, data.context.set.warning, "%s", byte_dump_sequence_null);
}
else if (output == 1) {
recurse.failures = &failures;
for (f_array_length_t i = 0; i < files.used; i++) {
- if (files.array[i].used == 0) continue;
+ if (!files.array[i].used) continue;
path_source.used = source.used;
for (uint8_t i = 0; i < 15; i++) {
- if (directorys[i]->used == 0) continue;
+ if (!directorys[i]->used) continue;
if (fake_signal_received(data)) {
*status = F_status_set_error(F_signal);
#ifndef _di_fake_build_execute_process_script_
void fake_build_execute_process_script(const fake_data_t data, const fake_build_data_t data_build, const f_string_static_t process_script, const f_string_static_t file_stage, f_status_t *status) {
if (F_status_is_error(*status) || f_file_exists(file_stage.string) == F_true) return;
- if (process_script.used == 0) return;
+ if (!process_script.used) return;
if (fake_signal_received(data)) {
*status = F_status_set_error(F_signal);
f_return_status fake_build_get_file_name_without_extension(const fake_data_t data, const f_string_static_t path, f_string_dynamic_t *name) {
name->used = 0;
- if (path.used == 0) return F_none;
+ if (!path.used) return F_none;
f_status_t status = f_file_name_base(path.string, path.used, name);
for (uint8_t i = 0; i < 1; i++) {
- if (settings[i]->used == 0) {
+ if (!settings[i]->used) {
fprintf(f_type_error, "%c", f_string_eol[0]);
fl_color_print(f_type_error, data.context.set.error, "ERROR: The setting '");
fl_color_print(f_type_error, data.context.set.notable, "%s", names[i]);
};
for (f_array_length_t i = 0; i < 26; i++) {
- if (settings_single_source[i]->used == 0) continue;
+ if (!settings_single_source[i]->used) continue;
if (settings_single_source[i]->used > 1) {
if (data.verbosity == fake_verbosity_verbose) {
#if !defined(_di_fake_clean_operate_)
int fake_clean_remove_recursively_verbosely(const char *path, const struct stat *file_stat, int type, struct FTW *entity) {
- if (entity->level == 0) return 0;
+ if (!entity->level) return 0;
- int result = remove(path);
+ const int result = remove(path);
- if (result == 0) {
+ if (!result) {
printf("Removed '%s'.%c", path, f_string_eol[0]);
}
printf("%s", program.string);
for (f_array_length_t i = 0; i < arguments.used; i++) {
- if (arguments.array[i].used == 0) continue;
+ if (!arguments.array[i].used) continue;
printf(" %s", arguments.array[i].string);
} // for
};
for (i = 0; i < 34; i++) {
- if (parameters_value[i]->used == 0) continue;
+ if (!parameters_value[i]->used) continue;
status = fl_string_dynamic_terminate_after(parameters_value[i]);
#ifndef _di_fake_make_operate_expand_
void fake_make_operate_expand(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_fss_content_t content, const f_fss_quoteds_t quoteds, fake_make_data_t *data_make, f_string_dynamics_t *arguments, f_status_t *status) {
if (F_status_is_error(*status)) return;
- if (content.used == 0) return;
+ if (!content.used) return;
// pre-allocate the known arguments size.
if (arguments->used + content.used > arguments->size) {
}
} // for
- if (operation == 0) {
+ if (!operation) {
fake_print_message_section_operation_unknown(data, data_make->buffer, section->name, section->objects.array[i], data_make->print);
*status = F_status_set_error(F_invalid);
success = F_false;
// break acts identical to fail when at the top of the stack.
- if (F_status_set_fine(*status) == F_signal_abort && section_stack->used == 0) {
+ if (F_status_set_fine(*status) == F_signal_abort && !section_stack->used) {
data_make->setting_make.fail = fake_make_operation_fail_type_exit;
data_make->print.prefix = fake_make_print_error;
data_make->print.context = data.context.set.error;
// F_signal_abort is used by the exit section operation.
if (F_status_set_fine(*status) == F_signal_quit) {
- if (section_stack->used == 0) {
+ if (!section_stack->used) {
*status = F_status_set_error(F_failure);
}
success = F_true;
// F_signal_abort is used by the exit section operation.
- if (section_stack->used == 0) {
+ if (!section_stack->used) {
*status = F_none;
}
printf("%s", program.string);
for (f_array_length_t i = 0; i < arguments.used; i++) {
- if (arguments.array[i].used == 0) continue;
+ if (!arguments.array[i].used) continue;
printf(" %s", arguments.array[i].string);
} // for
data_make->setting_make.parameter.array[0].value.array[0].used = 0;
- if (return_code == 0) {
+ if (!return_code) {
if (F_status_is_error(*status)) {
status2 = fl_string_append("1", 1, &data_make->setting_make.parameter.array[0].value.array[0]);
}
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) {
- if (arguments.used == 0) {
+ if (!arguments.used) {
if (data.verbosity != fake_verbosity_quiet && data_make->print.to) {
printf("%c", f_string_eol[0]);
fl_color_print_line(data_make->print.to, data_make->print.context, "%s: Requires more arguments.", data_make->print.prefix);
}
if (operation == fake_make_operation_type_compile) {
- if (arguments.used == 0) {
+ if (!arguments.used) {
if (data.verbosity != fake_verbosity_quiet && data_make->print.to) {
printf("%c", f_string_eol[0]);
fl_color_print_line(data_make->print.to, data_make->print.context, "%s: Requires more arguments.", data_make->print.prefix);
f_return_status fake_skeleton_operate_directory_create(const fake_data_t data, const f_string_dynamic_t path) {
f_status_t status = F_none;
- if (path.used == 0) return F_none;
+ if (!path.used) return F_none;
status = f_directory_exists(path.string);
f_return_status fake_skeleton_operate_file_create(const fake_data_t data, const f_string_dynamic_t path, const bool executable, const f_string_static_t content) {
f_status_t status = F_none;
- if (path.used == 0) return F_none;
+ if (!path.used) return F_none;
status = f_file_is(path.string, f_file_type_regular, F_false);
return status;
}
- if (data->quantity.total == 0) {
+ if (!data->quantity.total) {
status = f_file_size_by_id(file.id, &data->quantity.total);
if (F_status_is_error(status)) {
fss_basic_list_read_print_file_error(data->context, "f_file_size_by_id", arguments.argv[data->remaining.array[counter]], F_status_set_fine(status));
}
// Skip past empty files.
- if (data->quantity.total == 0) {
+ if (!data->quantity.total) {
f_file_close(&file.id);
continue;
}
f_macro_string_dynamic_t_clear(depths->array[i].value_name);
- if (data.parameters[fss_basic_list_read_parameter_depth].additional.used == 0) {
+ if (!data.parameters[fss_basic_list_read_parameter_depth].additional.used) {
position_depth = 0;
}
else {
return status;
}
- if (depths->array[i].value_name.used == 0) {
+ if (!depths->array[i].value_name.used) {
fl_color_print(f_type_error, data.context.set.error, "ERROR: The '");
fl_color_print(f_type_error, data.context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_name);
fl_color_print_line(f_type_error, data.context.set.error, "' must not be an empty string.");
f_string_length_t total = 0;
for (f_string_length_t i = 0; i < data->objects.used; i++) {
- if (names[i] == 0) continue;
+ if (!names[i]) continue;
total++;
} // for
}
for (f_string_length_t i = 0; i < data->objects.used; i++) {
- if (names[i] == 0) continue;
+ if (!names[i]) continue;
print_object(f_type_output, data->buffer, data->objects.array[i]);
fprintf(f_type_output, "%c", f_string_eol[0]);
f_array_length_t i = 0;
for (; i < data->objects.used; i++) {
+
if (names[i]) {
if (at == depths.array[0].value_at) {
if (data->parameters[fss_basic_list_read_parameter_total].result == f_console_result_found) {
- if (data->contents.array[i].used == 0) {
+ if (!data->contents.array[i].used) {
fprintf(f_type_output, "0%c", f_string_eol[0]);
}
else {
f_string_length_t total = 1;
for (f_string_length_t j = data->contents.array[i].array[0].start; j <= data->contents.array[i].array[0].stop; j++) {
- if (data->buffer.string[j] == 0) continue;
+ if (!data->buffer.string[j]) continue;
if (data->buffer.string[j] == f_string_eol[0]) {
total++;
}
if (data->parameters[fss_basic_list_read_parameter_line].result == f_console_result_additional) {
- if (data->contents.array[i].used == 0) {
- if (include_empty && line == 0) {
+ if (!data->contents.array[i].used) {
+ if (include_empty && !line) {
fprintf(f_type_output, "%c", f_string_eol[0]);
}
}
else {
f_string_length_t i = data->contents.array[i].array[0].start;
- if (line == 0) {
+ if (!line) {
for (; i <= data->contents.array[i].array[0].stop; i++) {
- if (data->buffer.string[i] == 0) continue;
+ if (!data->buffer.string[i]) continue;
if (data->buffer.string[i] == f_string_eol[0]) {
fprintf(f_type_output, "%c", f_string_eol[0]);
break;
f_string_length_t line_current = 0;
for (; i <= data->contents.array[i].array[0].stop; i++) {
- if (data->buffer.string[i] == 0) continue;
+ if (!data->buffer.string[i]) continue;
if (data->buffer.string[i] == f_string_eol[0]) {
line_current++;
i++;
for (; i <= data->contents.array[i].array[0].stop; i++) {
- if (data->buffer.string[i] == 0) continue;
+ if (!data->buffer.string[i]) continue;
if (data->buffer.string[i] == f_string_eol[0]) {
fprintf(f_type_output, "%c", f_string_eol[0]);
for (f_string_length_t i = 0; i < data->objects.used; i++) {
if (!names[i]) continue;
- if (data->contents.array[i].used == 0) {
+ if (!data->contents.array[i].used) {
if (include_empty) {
total++;
}
}
for (f_string_length_t j = data->contents.array[i].array[0].start; j <= data->contents.array[i].array[0].stop; j++) {
- if (data->buffer.string[j] == 0) continue;
+ if (!data->buffer.string[j]) continue;
if (data->buffer.string[j] == f_string_eol[0]) {
total++;
for (; i < data->contents.used; i++) {
if (!names[i]) continue;
- if (data->contents.array[i].used == 0) {
+ if (!data->contents.array[i].used) {
if (include_empty) {
if (line_current == line) {
fprintf(f_type_output, "%c", f_string_eol[0]);
if (j > data->contents.array[i].array[0].stop) continue;
for (; j <= data->contents.array[i].array[0].stop; j++) {
- if (data->buffer.string[j] == 0) continue;
+ if (!data->buffer.string[j]) continue;
if (data->buffer.string[j] == f_string_eol[0]) {
fprintf(f_type_output, "%c", f_string_eol[0]);
for (f_string_length_t i = 0; i < data->contents.used; i++) {
if (!names[i]) continue;
- if (data->contents.array[i].used == 0) {
+ if (!data->contents.array[i].used) {
if (include_empty) {
fprintf(f_type_output, "%c", f_string_eol[0]);
}
depths.used--; \
macro_fss_basic_list_read_depth_t_delete_simple(depths.array[depths.used]); \
} \
- if (depths.used == 0) f_macro_memory_structure_t_delete_simple(depths, fss_basic_list_read_depth_t)
+ if (!depths.used) f_macro_memory_structure_t_delete_simple(depths, fss_basic_list_read_depth_t)
#define macro_fss_basic_list_read_depths_t_destroy_simple(depths) \
depths.used = depths.size; \
depths.used--; \
macro_fss_basic_list_read_depth_t_destroy_simple(depths.array[depths.used]); \
} \
- if (depths.used == 0) f_macro_memory_structure_t_destroy_simple(depths, fss_basic_list_read_depth_t)
+ if (!depths.used) f_macro_memory_structure_t_destroy_simple(depths, fss_basic_list_read_depth_t)
#define macro_fss_basic_list_read_depths_t_resize(status, depths, new_length) \
status = F_none; \
return status;
}
- if (data->quantity.total == 0) {
+ if (!data->quantity.total) {
status = f_file_size_by_id(file.id, &data->quantity.total);
if (F_status_is_error(status)) {
}
// Skip past empty files.
- if (data->quantity.total == 0) {
+ if (!data->quantity.total) {
f_file_close(&file.id);
continue;
}
f_macro_string_dynamic_t_clear(depths->array[i].value_name);
- if (data.parameters[fss_basic_read_parameter_depth].additional.used == 0) {
+ if (!data.parameters[fss_basic_read_parameter_depth].additional.used) {
position_depth = 0;
}
else {
return status;
}
- if (depths->array[i].value_name.used == 0) {
+ if (!depths->array[i].value_name.used) {
fl_color_print(f_type_error, data.context.set.error, "ERROR: The '");
fl_color_print(f_type_error, data.context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_name);
fl_color_print_line(f_type_error, data.context.set.error, "' must not be an empty string.");
f_string_length_t total = 0;
for (f_string_length_t i = 0; i < data->objects.used; i++) {
- if (names[i] == 0) continue;
+ if (!names[i]) continue;
total++;
} // for
}
for (f_array_length_t i = 0; i < data->objects.used; i++) {
- if (names[i] == 0) continue;
+ if (!names[i]) continue;
print_object(f_type_output, data->buffer, data->objects.array[i]);
fprintf(f_type_output, "%c", f_string_eol[0]);
if (names[i]) {
if (at == depths.array[0].value_at) {
if (data->parameters[fss_basic_read_parameter_total].result == f_console_result_found) {
- if (data->contents.array[i].used == 0) {
+ if (!data->contents.array[i].used) {
fprintf(f_type_output, "0%c", f_string_eol[0]);
}
else {
for (f_string_length_t i = 0; i < data->objects.used; i++) {
if (!names[i]) continue;
- if (data->contents.array[i].used == 0 && !include_empty) {
+ if (!data->contents.array[i].used && !include_empty) {
continue;
}
for (f_string_length_t i = 0; i < data->contents.used; i++) {
if (!names[i]) continue;
- if (data->contents.array[i].used == 0) {
+ if (!data->contents.array[i].used) {
if (include_empty) {
if (line_current == line) {
fprintf(f_type_output, "%c", f_string_eol[0]);
for (f_string_length_t i = 0; i < data->contents.used; i++) {
if (!names[i]) continue;
- if (data->contents.array[i].used == 0) {
+ if (!data->contents.array[i].used) {
if (include_empty) {
fprintf(f_type_output, "%c", f_string_eol[0]);
}
depths.used--; \
macro_fss_basic_read_depth_t_delete_simple(depths.array[depths.used]); \
} \
- if (depths.used == 0) f_macro_memory_structure_t_delete_simple(depths, fss_basic_read_depth_t)
+ if (!depths.used) f_macro_memory_structure_t_delete_simple(depths, fss_basic_read_depth_t)
#define macro_fss_basic_read_depths_t_destroy_simple(depths) \
depths.used = depths.size; \
depths.used--; \
macro_fss_basic_read_depth_t_destroy_simple(depths.array[depths.used]); \
} \
- if (depths.used == 0) f_macro_memory_structure_t_destroy_simple(depths, fss_basic_read_depth_t)
+ if (!depths.used) f_macro_memory_structure_t_destroy_simple(depths, fss_basic_read_depth_t)
#define macro_fss_basic_read_depths_t_resize(status, depths, new_length) \
status = F_none; \
return status;
}
- if (data->quantity.total == 0) {
+ if (!data->quantity.total) {
status = f_file_size_by_id(file.id, &data->quantity.total);
if (F_status_is_error(status)) {
fss_extended_list_read_print_file_error(data->context, "f_file_size_by_id", arguments.argv[data->remaining.array[counter]], F_status_set_fine(status));
}
// Skip past empty files.
- if (data->quantity.total == 0) {
+ if (!data->quantity.total) {
f_file_close(&file.id);
continue;
}
f_macro_string_dynamic_t_clear(depths->array[i].value_name);
- if (data.parameters[fss_extended_list_read_parameter_depth].additional.used == 0) {
+ if (!data.parameters[fss_extended_list_read_parameter_depth].additional.used) {
position_depth = 0;
}
else {
return status;
}
- if (depths->array[i].value_name.used == 0) {
+ if (!depths->array[i].value_name.used) {
fl_color_print(f_type_error, data.context.set.error, "ERROR: The '");
fl_color_print(f_type_error, data.context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_name);
fl_color_print_line(f_type_error, data.context.set.error, "' must not be an empty string.");
f_string_length_t total = 0;
for (f_string_length_t i = 0; i < items->used; i++) {
- if (names[i] == 0) continue;
+ if (!names[i]) continue;
total++;
} // for
if (names[i]) {
if (at == depth_setting.value_at) {
if (data->parameters[fss_extended_list_read_parameter_total].result == f_console_result_found) {
- if (items->array[i].content.used == 0) {
+ if (!items->array[i].content.used) {
fprintf(f_type_output, "0%c", f_string_eol[0]);
}
else {
f_string_length_t total = 1;
for (f_string_length_t j = items->array[i].content.array[0].start; j <= items->array[i].content.array[0].stop; j++) {
- if (data->buffer.string[j] == 0) continue;
+ if (!data->buffer.string[j]) continue;
if (data->buffer.string[j] == f_string_eol[0]) {
total++;
}
if (data->parameters[fss_extended_list_read_parameter_line].result == f_console_result_additional) {
- if (items->array[i].content.used == 0) {
- if (include_empty && line == 0) {
+ if (!items->array[i].content.used) {
+ if (include_empty && !line) {
fprintf(f_type_output, "%c", f_string_eol[0]);
}
}
else {
f_string_length_t i = items->array[i].content.array[0].start;
- if (line == 0) {
+ if (!line) {
for (; i <= items->array[i].content.array[0].stop; i++) {
-
- if (data->buffer.string[i] == 0) continue;
+ if (!data->buffer.string[i]) continue;
if (data->buffer.string[i] == f_string_eol[0]) {
fprintf(f_type_output, "%c", f_string_eol[0]);
f_string_length_t line_current = 0;
for (; i <= items->array[i].content.array[0].stop; i++) {
- if (data->buffer.string[i] == 0) continue;
+ if (!data->buffer.string[i]) continue;
if (data->buffer.string[i] == f_string_eol[0]) {
line_current++;
i++;
for (; i <= items->array[i].content.array[0].stop; i++) {
-
- if (data->buffer.string[i] == 0) continue;
+ if (!data->buffer.string[i]) continue;
if (data->buffer.string[i] == f_string_eol[0]) {
fprintf(f_type_output, "%c", f_string_eol[0]);
for (f_string_length_t i = 0; i < items->used; i++) {
if (!names[i]) continue;
- if (items->array[i].content.used == 0) {
+ if (!items->array[i].content.used) {
if (include_empty) {
total++;
}
}
for (f_string_length_t j = items->array[i].content.array[0].start; j <= items->array[i].content.array[0].stop; j++) {
- if (data->buffer.string[j] == 0) continue;
+ if (!data->buffer.string[j]) continue;
if (data->buffer.string[j] == f_string_eol[0]) {
total++;
for (; i < items->used; i++) {
if (!names[i]) continue;
- if (items->array[i].content.used == 0) {
+ if (!items->array[i].content.used) {
if (include_empty) {
if (line_current == line) {
fprintf(f_type_output, "%c", f_string_eol[0]);
if (j > items->array[i].content.array[0].stop) continue;
for (; j <= items->array[i].content.array[0].stop; j++) {
- if (data->buffer.string[j] == 0) continue;
+ if (!data->buffer.string[j]) continue;
if (data->buffer.string[j] == f_string_eol[0]) {
fprintf(f_type_output, "%c", f_string_eol[0]);
for (f_string_length_t i = 0; i < items->used; i++) {
if (!names[i]) continue;
- if (items->array[i].content.used == 0) {
+ if (!items->array[i].content.used) {
if (include_empty) {
fprintf(f_type_output, "%c", f_string_eol[0]);
}
depths.used--; \
macro_fss_extended_list_read_depth_t_delete_simple(depths.array[depths.used]); \
} \
- if (depths.used == 0) f_macro_memory_structure_t_delete_simple(depths, fss_extended_list_read_depth_t)
+ if (!depths.used) f_macro_memory_structure_t_delete_simple(depths, fss_extended_list_read_depth_t)
#define macro_fss_extended_list_read_depths_t_destroy_simple(depths) \
depths.used = depths.size; \
depths.used--; \
macro_fss_extended_list_read_depth_t_destroy_simple(depths.array[depths.used]); \
} \
- if (depths.used == 0) f_macro_memory_structure_t_destroy_simple(depths, fss_extended_list_read_depth_t)
+ if (!depths.used) f_macro_memory_structure_t_destroy_simple(depths, fss_extended_list_read_depth_t)
#define macro_fss_extended_list_read_t_depths_resize(status, depths, new_length) \
status = F_none; \
return status;
}
- if (data->quantity.total == 0) {
+ if (!data->quantity.total) {
status = f_file_size_by_id(file.id, &data->quantity.total);
if (F_status_is_error(status)) {
}
// Skip past empty files.
- if (data->quantity.total == 0) {
+ if (!data->quantity.total) {
f_file_close(&file.id);
continue;
}
f_macro_string_dynamic_t_clear(depths->array[i].value_name);
- if (data.parameters[fss_extended_read_parameter_depth].additional.used == 0) {
+ if (!data.parameters[fss_extended_read_parameter_depth].additional.used) {
position_depth = 0;
}
else {
return status;
}
- if (depths->array[i].value_name.used == 0) {
+ if (!depths->array[i].value_name.used) {
fl_color_print(f_type_error, data.context.set.error, "ERROR: The '");
fl_color_print(f_type_error, data.context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_name);
fl_color_print_line(f_type_error, data.context.set.error, "' must not be an empty string.");
f_string_length_t total = 0;
for (f_string_length_t i = 0; i < data->objects.used; i++) {
- if (names[i] == 0) continue;
+ if (!names[i]) continue;
total++;
} // for
}
for (f_string_length_t i = 0; i < data->objects.used; i++) {
- if (names[i] == 0) continue;
+ if (!names[i]) continue;
print_object(f_type_output, data->buffer, data->objects.array[i]);
fprintf(f_type_output, "%c", f_string_eol[0]);
if (names[i]) {
if (at == depths.array[0].value_at) {
if (data->parameters[fss_extended_read_parameter_total].result == f_console_result_found) {
- if (data->contents.array[i].used == 0) {
+ if (!data->contents.array[i].used) {
fprintf(f_type_output, "0%c", f_string_eol[0]);
}
else {
}
if (data->parameters[fss_extended_read_parameter_line].result == f_console_result_additional) {
- if (line == 0) {
+ if (!line) {
if (data->contents.array[i].used > 0) {
f_string_length_t j = 0;
}
else if (include_empty) {
if (data->parameters[fss_extended_read_parameter_select].result == f_console_result_additional) {
- if (select == 0) {
+ if (!select) {
fprintf(f_type_output, "%c", f_string_eol[0]);
}
}
}
else if (include_empty) {
if (data->parameters[fss_extended_read_parameter_select].result == f_console_result_additional) {
- if (select == 0) {
+ if (!select) {
fprintf(f_type_output, "%c", f_string_eol[0]);
}
}
continue;
}
- if (data->contents.array[i].used == 0 && !include_empty) {
+ if (!data->contents.array[i].used && !include_empty) {
continue;
}
for (; i < data->contents.used; i++) {
if (!names[i]) continue;
- if (data->contents.array[i].used == 0) {
+ if (!data->contents.array[i].used) {
if (include_empty) {
if (line_current == line) {
fprintf(f_type_output, "%c", f_string_eol[0]);
for (; i < data->contents.used; i++) {
if (!names[i]) continue;
- if (data->contents.array[i].used == 0) {
- if (include_empty && select == 0) {
+ if (!data->contents.array[i].used) {
+ if (include_empty && !select) {
fprintf(f_type_output, "%c", f_string_eol[0]);
}
depths.used--; \
macro_fss_extended_read_depth_t_delete_simple(depths.array[depths.used]); \
} \
- if (depths.used == 0) f_macro_memory_structure_t_delete_simple(depths, fss_extended_read_depth_t)
+ if (!depths.used) f_macro_memory_structure_t_delete_simple(depths, fss_extended_read_depth_t)
#define macro_fss_extended_read_depths_t_destroy_simple(depths) \
depths.used = depths.size; \
depths.used--; \
macro_fss_extended_read_depth_t_destroy_simple(depths.array[depths.used]); \
} \
- if (depths.used == 0) f_macro_memory_structure_t_destroy_simple(depths, fss_extended_read_depth_t)
+ if (!depths.used) f_macro_memory_structure_t_destroy_simple(depths, fss_extended_read_depth_t)
#define macro_fss_extended_read_depths_t_resize(status, depths, new_length) \
status = F_none; \
}
// Skip past empty files.
- if (total == 0) {
+ if (!total) {
f_file_close(&file.id);
continue;
}
// ensure a newline is always put at the end of the program execution, unless in quiet mode.
if (data->verbosity != iki_read_verbosity_quiet) {
- if (F_status_is_error(status) || data->mode == 0) {
+ if (F_status_is_error(status) || !data->mode) {
fprintf(f_type_error, "%c", f_string_eol[0]);
}
}
while (replacements.used > 0) { \
replacements.used--; \
} \
- if (replacements.used == 0) f_macro_memory_structure_t_delete_simple(replacements, iki_read_substitution_t)
+ if (!replacements.used) f_macro_memory_structure_t_delete_simple(replacements, iki_read_substitution_t)
#define macro_iki_read_substitutions_t_destroy_simple(replacements) \
replacements.used = replacements.size; \
while (replacements.used > 0) { \
replacements.used--; \
} \
- if (replacements.used == 0) f_macro_memory_structure_t_destroy_simple(replacements, iki_read_substitution_t)
+ if (!replacements.used) f_macro_memory_structure_t_destroy_simple(replacements, iki_read_substitution_t)
#define macro_iki_read_substitutions_t_resize(status, replacements, new_length) \
status = F_none; \