There are a lot more changes that I realized.
changing 'char' to 'unsigned char' will be for the next development release after the upcoming stable release.
Introduce the f_char_t type to allow for easier switching from 'char' to 'unsigned char'.
In all places that us 'unsigned char', just switch to 'char'.
Move the directory '..' and '.' into static strings.
// Must be set to 0 to avoid problems due to the design of getpwuid()/getpwuid_r().
errno = 0;
- unsigned char buffer[length];
+ char buffer[length];
const int result = getpwuid_r(id, &password, buffer, length, &pointer);
if (result) {
length = F_account_pwd_length_fallback_second_d;
- unsigned char buffer[F_account_pwd_length_fallback_second_d];
+ char buffer[F_account_pwd_length_fallback_second_d];
const int result = getpwuid_r(id, &password, buffer, length, &pointer);
// Must be set to 0 to avoid problems due to the design of getpwnam()/getpwnam_r().
errno = 0;
- unsigned char buffer[length];
+ char buffer[length];
const int result = getpwnam_r(name.string, &password, buffer, length, &pointer);
if (result) {
length = F_account_pwd_length_fallback_second_d;
- unsigned char buffer[F_account_pwd_length_fallback_second_d];
+ char buffer[F_account_pwd_length_fallback_second_d];
const int result = getpwnam_r(name.string, &password, buffer, length, &pointer);
// Must be set to 0 to avoid problems due to the design of getgrnam()/getgrnam_r().
errno = 0;
- unsigned char buffer[length];
+ char buffer[length];
int result = getgrnam_r(name.string, &group_data, buffer, length, &pointer);
if (result) {
length = F_account_pwd_length_fallback_second_d;
- unsigned char buffer[F_account_pwd_length_fallback_second_d];
+ char buffer[F_account_pwd_length_fallback_second_d];
const int result = getgrnam_r(name.string, &group_data, buffer, length, &pointer);
// Must be set to 0 to avoid problems due to the design of getpwuid()/getpwuid_r().
errno = 0;
- unsigned char buffer[length];
+ char buffer[length];
const int result = getgrgid_r(id, &group_data, buffer, length, &pointer);
if (result) {
const f_array_length_t name_length = strnlen(group_data.gr_name, length);
- macro_f_string_dynamic_t_resize(status, (*name), name_length + 1);
+ status = f_string_dynamic_resize(name_length + 1, name);
if (F_status_is_error(status)) return status;
- memcpy(name->string, group_data.gr_name, sizeof(unsigned char) * name_length);
+ memcpy(name->string, group_data.gr_name, sizeof(f_char_t) * name_length);
name->string[name_length] = 0;
name->used = name_length;
length = F_account_pwd_length_fallback_second_d;
- unsigned char buffer[F_account_pwd_length_fallback_second_d];
+ char buffer[F_account_pwd_length_fallback_second_d];
const int result = getgrgid_r(id, &group_data, buffer, length, &pointer);
const f_array_length_t name_length = strnlen(group_data.gr_name, length);
- macro_f_string_dynamic_t_resize(status, (*name), name_length + 1);
+ status = f_string_dynamic_resize(name_length + 1, name);
if (F_status_is_error(status)) return status;
- memcpy(name->string, group_data.gr_name, sizeof(unsigned char) * name_length);
+ memcpy(name->string, group_data.gr_name, sizeof(f_char_t) * name_length);
name->string[name_length] = 0;
name->used = name_length;
// Must be set to 0 to avoid problems due to the design of getpwnam()/getpwnam_r().
errno = 0;
- unsigned char buffer[length];
+ char buffer[length];
const int result = getpwnam_r(name.string, &password, buffer, length, &pointer);
if (result) {
length = F_account_pwd_length_fallback_second_d;
- unsigned char buffer[F_account_pwd_length_fallback_second_d];
+ char buffer[F_account_pwd_length_fallback_second_d];
const int result = getpwnam_r(name.string, &password, buffer, length, &pointer);
// Must be set to 0 to avoid problems due to the design of getpwuid()/getpwuid_r().
errno = 0;
- unsigned char buffer[length];
+ char buffer[length];
const int result = getpwuid_r(id, &password, buffer, length, &pointer);
if (result) {
const f_array_length_t name_length = strnlen(password.pw_name, length);
- macro_f_string_dynamic_t_resize(status, (*name), name_length + 1);
+ status = f_string_dynamic_resize(name_length + 1, name);
if (F_status_is_error(status)) return status;
- memcpy(name->string, password.pw_name, sizeof(unsigned char) * name_length);
+ memcpy(name->string, password.pw_name, sizeof(f_char_t) * name_length);
name->string[name_length] = 0;
name->used = name_length;
length = F_account_pwd_length_fallback_second_d;
- unsigned char buffer[F_account_pwd_length_fallback_second_d];
+ char buffer[F_account_pwd_length_fallback_second_d];
const int result = getpwuid_r(id, &password, buffer, length, &pointer);
const f_array_length_t name_length = strnlen(password.pw_name, length);
- macro_f_string_dynamic_t_resize(status, (*name), name_length + 1);
+ status = f_string_dynamic_resize(name_length + 1, name);
if (F_status_is_error(status)) return status;
- memcpy(name->string, password.pw_name, sizeof(unsigned char) * name_length);
+ memcpy(name->string, password.pw_name, sizeof(f_char_t) * name_length);
name->string[name_length] = 0;
name->used = name_length;
status = f_string_dynamic_resize(string_length + 1, &account->home);
if (F_status_is_error(status)) return status;
- memcpy(account->home.string, password.pw_dir, sizeof(unsigned char) * string_length);
+ memcpy(account->home.string, password.pw_dir, sizeof(f_char_t) * string_length);
account->home.string[string_length] = 0;
account->home.used = string_length;
status = f_string_dynamic_resize(string_length + 1, &account->label);
if (F_status_is_error(status)) return status;
- memcpy(account->label.string, password.pw_gecos, sizeof(unsigned char) * string_length);
+ memcpy(account->label.string, password.pw_gecos, sizeof(f_char_t) * string_length);
account->label.string[string_length] = 0;
account->label.used = string_length;
status = f_string_dynamic_resize(string_length + 1, &account->name);
if (F_status_is_error(status)) return status;
- memcpy(account->name.string, password.pw_name, sizeof(unsigned char) * string_length);
+ memcpy(account->name.string, password.pw_name, sizeof(f_char_t) * string_length);
account->name.string[string_length] = 0;
account->name.used = string_length;
status = f_string_dynamic_resize(string_length + 1, &account->password);
if (F_status_is_error(status)) return status;
- memcpy(account->password.string, password.pw_passwd, sizeof(unsigned char) * string_length);
+ memcpy(account->password.string, password.pw_passwd, sizeof(f_char_t) * string_length);
account->password.string[string_length] = 0;
account->password.used = string_length;
status = f_string_dynamic_resize(string_length + 1, &account->shell);
if (F_status_is_error(status)) return status;
- memcpy(account->shell.string, password.pw_shell, sizeof(unsigned char) * string_length);
+ memcpy(account->shell.string, password.pw_shell, sizeof(f_char_t) * string_length);
account->shell.string[string_length] = 0;
account->shell.used = string_length;
if (!name) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- unsigned char *result = cap_to_name(code);
+ char *result = cap_to_name(code);
if (result) {
const f_array_length_t length = strlen(result);
}
}
- memcpy(name->string + name->used, result, sizeof(unsigned char) * length);
+ memcpy(name->string + name->used, result, sizeof(char) * length);
name->used += length;
name->string[name->used] = 0;
ssize_t length = 0;
- unsigned char *result = cap_to_text(capability, &length);
+ char *result = cap_to_text(capability, &length);
if (result) {
if (text->used + length + 1 > text->size) {
}
}
- memcpy(text->string + text->used, result, sizeof(unsigned char) * length);
+ memcpy(text->string + text->used, result, sizeof(char) * length);
text->used += length;
text->string[text->used] = 0;
// Switch to the appropriate terminal color mode.
{
- unsigned char *environment = getenv(f_color_terminal_name_s.string);
+ char *environment = getenv(f_color_terminal_name_s.string);
if (!environment || strncmp(environment, f_color_terminal_value_linux_s.string, f_color_terminal_value_linux_s.used) == 0) {
macro_f_color_t_set_linux(context->list);
if (F_status_is_error(status)) return status;
if (format.begin.used) {
- memcpy(buffer->string + buffer->used, format.begin.string, sizeof(unsigned char) * format.begin.used);
+ memcpy(buffer->string + buffer->used, format.begin.string, sizeof(f_char_t) * format.begin.used);
buffer->used += format.begin.used;
}
if (color1.used) {
- memcpy(buffer->string + buffer->used, color1.string, sizeof(unsigned char) * color1.used);
+ memcpy(buffer->string + buffer->used, color1.string, sizeof(f_char_t) * color1.used);
buffer->used += color1.used;
}
if (format.end.used) {
- memcpy(buffer->string + buffer->used, format.end.string, sizeof(unsigned char) * format.end.used);
+ memcpy(buffer->string + buffer->used, format.end.string, sizeof(f_char_t) * format.end.used);
buffer->used += format.end.used;
}
if (F_status_is_error(status)) return status;
if (format.begin.used) {
- memcpy(buffer->string + buffer->used, format.begin.string, sizeof(unsigned char) * format.begin.used);
+ memcpy(buffer->string + buffer->used, format.begin.string, sizeof(f_char_t) * format.begin.used);
buffer->used += format.begin.used;
}
if (color1.used) {
- memcpy(buffer->string + buffer->used, color1.string, sizeof(unsigned char) * color1.used);
+ memcpy(buffer->string + buffer->used, color1.string, sizeof(f_char_t) * color1.used);
buffer->used += color1.used;
}
if (format.medium.used) {
- memcpy(buffer->string + buffer->used, format.medium.string, sizeof(unsigned char) * format.medium.used);
+ memcpy(buffer->string + buffer->used, format.medium.string, sizeof(f_char_t) * format.medium.used);
buffer->used += format.medium.used;
}
if (color2.used) {
- memcpy(buffer->string + buffer->used, color2.string, sizeof(unsigned char) * color2.used);
+ memcpy(buffer->string + buffer->used, color2.string, sizeof(f_char_t) * color2.used);
buffer->used += color2.used;
}
if (format.end.used) {
- memcpy(buffer->string + buffer->used, format.end.string, sizeof(unsigned char) * format.end.used);
+ memcpy(buffer->string + buffer->used, format.end.string, sizeof(f_char_t) * format.end.used);
buffer->used += format.end.used;
}
if (F_status_is_error(status)) return status;
if (format.begin.used) {
- memcpy(buffer->string + buffer->used, format.begin.string, sizeof(unsigned char) * format.begin.used);
+ memcpy(buffer->string + buffer->used, format.begin.string, sizeof(f_char_t) * format.begin.used);
buffer->used += format.begin.used;
}
if (color1.used) {
- memcpy(buffer->string + buffer->used, color1.string, sizeof(unsigned char) * color1.used);
+ memcpy(buffer->string + buffer->used, color1.string, sizeof(f_char_t) * color1.used);
buffer->used += color1.used;
}
if (format.medium.used) {
- memcpy(buffer->string + buffer->used, format.medium.string, sizeof(unsigned char) * format.medium.used);
+ memcpy(buffer->string + buffer->used, format.medium.string, sizeof(f_char_t) * format.medium.used);
buffer->used += format.medium.used;
}
if (color2.used) {
- memcpy(buffer->string + buffer->used, color2.string, sizeof(unsigned char) * color2.used);
+ memcpy(buffer->string + buffer->used, color2.string, sizeof(f_char_t) * color2.used);
buffer->used += color2.used;
}
if (format.medium.used) {
- memcpy(buffer->string + buffer->used, format.medium.string, sizeof(unsigned char) * format.medium.used);
+ memcpy(buffer->string + buffer->used, format.medium.string, sizeof(f_char_t) * format.medium.used);
buffer->used += format.medium.used;
}
if (color3.used) {
- memcpy(buffer->string + buffer->used, color3.string, sizeof(unsigned char) * color3.used);
+ memcpy(buffer->string + buffer->used, color3.string, sizeof(f_char_t) * color3.used);
buffer->used += color3.used;
}
if (format.end.used) {
- memcpy(buffer->string + buffer->used, format.end.string, sizeof(unsigned char) * format.end.used);
+ memcpy(buffer->string + buffer->used, format.end.string, sizeof(f_char_t) * format.end.used);
buffer->used += format.end.used;
}
if (F_status_is_error(status)) return status;
if (format.begin.used) {
- memcpy(buffer->string + buffer->used, format.begin.string, sizeof(unsigned char) * format.begin.used);
+ memcpy(buffer->string + buffer->used, format.begin.string, sizeof(f_char_t) * format.begin.used);
buffer->used += format.begin.used;
}
if (color1.used) {
- memcpy(buffer->string + buffer->used, color1.string, sizeof(unsigned char) * color1.used);
+ memcpy(buffer->string + buffer->used, color1.string, sizeof(f_char_t) * color1.used);
buffer->used += color1.used;
}
if (format.medium.used) {
- memcpy(buffer->string + buffer->used, format.medium.string, sizeof(unsigned char) * format.medium.used);
+ memcpy(buffer->string + buffer->used, format.medium.string, sizeof(f_char_t) * format.medium.used);
buffer->used += format.medium.used;
}
if (color2.used) {
- memcpy(buffer->string + buffer->used, color2.string, sizeof(unsigned char) * color2.used);
+ memcpy(buffer->string + buffer->used, color2.string, sizeof(f_char_t) * color2.used);
buffer->used += color2.used;
}
if (format.medium.used) {
- memcpy(buffer->string + buffer->used, format.medium.string, sizeof(unsigned char) * format.medium.used);
+ memcpy(buffer->string + buffer->used, format.medium.string, sizeof(f_char_t) * format.medium.used);
buffer->used += format.medium.used;
}
if (color3.used) {
- memcpy(buffer->string + buffer->used, color3.string, sizeof(unsigned char) * color3.used);
+ memcpy(buffer->string + buffer->used, color3.string, sizeof(f_char_t) * color3.used);
buffer->used += color3.used;
}
if (format.medium.used) {
- memcpy(buffer->string + buffer->used, format.medium.string, sizeof(unsigned char) * format.medium.used);
+ memcpy(buffer->string + buffer->used, format.medium.string, sizeof(f_char_t) * format.medium.used);
buffer->used += format.medium.used;
}
if (color4.used) {
- memcpy(buffer->string + buffer->used, color4.string, sizeof(unsigned char) * color4.used);
+ memcpy(buffer->string + buffer->used, color4.string, sizeof(f_char_t) * color4.used);
buffer->used += color4.used;
}
if (format.end.used) {
- memcpy(buffer->string + buffer->used, format.end.string, sizeof(unsigned char) * format.end.used);
+ memcpy(buffer->string + buffer->used, format.end.string, sizeof(f_char_t) * format.end.used);
buffer->used += format.end.used;
}
if (F_status_is_error(status)) return status;
if (format.begin.used) {
- memcpy(buffer->string + buffer->used, format.begin.string, sizeof(unsigned char) * format.begin.used);
+ memcpy(buffer->string + buffer->used, format.begin.string, sizeof(f_char_t) * format.begin.used);
buffer->used += format.begin.used;
}
if (color1.used) {
- memcpy(buffer->string + buffer->used, color1.string, sizeof(unsigned char) * color1.used);
+ memcpy(buffer->string + buffer->used, color1.string, sizeof(f_char_t) * color1.used);
buffer->used += color1.used;
}
if (format.medium.used) {
- memcpy(buffer->string + buffer->used, format.medium.string, sizeof(unsigned char) * format.medium.used);
+ memcpy(buffer->string + buffer->used, format.medium.string, sizeof(f_char_t) * format.medium.used);
buffer->used += format.medium.used;
}
if (color2.used) {
- memcpy(buffer->string + buffer->used, color2.string, sizeof(unsigned char) * color2.used);
+ memcpy(buffer->string + buffer->used, color2.string, sizeof(f_char_t) * color2.used);
buffer->used += color2.used;
}
if (format.medium.used) {
- memcpy(buffer->string + buffer->used, format.medium.string, sizeof(unsigned char) * format.medium.used);
+ memcpy(buffer->string + buffer->used, format.medium.string, sizeof(f_char_t) * format.medium.used);
buffer->used += format.medium.used;
}
if (color3.used) {
- memcpy(buffer->string + buffer->used, color3.string, sizeof(unsigned char) * color3.used);
+ memcpy(buffer->string + buffer->used, color3.string, sizeof(f_char_t) * color3.used);
buffer->used += color3.used;
}
if (format.medium.used) {
- memcpy(buffer->string + buffer->used, format.medium.string, sizeof(unsigned char) * format.medium.used);
+ memcpy(buffer->string + buffer->used, format.medium.string, sizeof(f_char_t) * format.medium.used);
buffer->used += format.medium.used;
}
if (color4.used) {
- memcpy(buffer->string + buffer->used, color4.string, sizeof(unsigned char) * color4.used);
+ memcpy(buffer->string + buffer->used, color4.string, sizeof(f_char_t) * color4.used);
buffer->used += color4.used;
}
if (format.medium.used) {
- memcpy(buffer->string + buffer->used, format.medium.string, sizeof(unsigned char) * format.medium.used);
+ memcpy(buffer->string + buffer->used, format.medium.string, sizeof(f_char_t) * format.medium.used);
buffer->used += format.medium.used;
}
if (color5.used) {
- memcpy(buffer->string + buffer->used, color5.string, sizeof(unsigned char) * color5.used);
+ memcpy(buffer->string + buffer->used, color5.string, sizeof(f_char_t) * color5.used);
buffer->used += color5.used;
}
if (format.end.used) {
- memcpy(buffer->string + buffer->used, format.end.string, sizeof(unsigned char) * format.end.used);
+ memcpy(buffer->string + buffer->used, format.end.string, sizeof(f_char_t) * format.end.used);
buffer->used += format.end.used;
}
* - xterminal: X-Terminal color code set.
*/
#ifndef _di_f_color_code_t_
- typedef unsigned char f_color_code_t;
+ typedef f_char_t f_color_code_t;
#define F_color_code_none_d 0
#define F_color_code_linux_d 1
#endif
#ifndef _di_f_console_standard_s_
- const f_string_static_t f_console_standard_short_dark_s = macro_f_string_static_t_initialize(F_console_standard_short_dark_s, 0, F_console_standard_short_dark_s_length);
- const f_string_static_t f_console_standard_short_debug_s = macro_f_string_static_t_initialize(F_console_standard_short_debug_s, 0, F_console_standard_short_debug_s_length);
- const f_string_static_t f_console_standard_short_help_s = macro_f_string_static_t_initialize(F_console_standard_short_help_s, 0, F_console_standard_short_help_s_length);
- const f_string_static_t f_console_standard_short_light_s = macro_f_string_static_t_initialize(F_console_standard_short_light_s, 0, F_console_standard_short_light_s_length);
- const f_string_static_t f_console_standard_short_no_color_s = macro_f_string_static_t_initialize(F_console_standard_short_no_color_s, 0, F_console_standard_short_no_color_s_length);
- const f_string_static_t f_console_standard_short_normal_s = macro_f_string_static_t_initialize(F_console_standard_short_normal_s, 0, F_console_standard_short_normal_s_length);
- const f_string_static_t f_console_standard_short_quiet_s = macro_f_string_static_t_initialize(F_console_standard_short_quiet_s, 0, F_console_standard_short_quiet_s_length);
- const f_string_static_t f_console_standard_short_status_in_s = macro_f_string_static_t_initialize(F_console_standard_short_status_in_s, 0, F_console_standard_short_status_in_s_length);
- const f_string_static_t f_console_standard_short_status_out_s = macro_f_string_static_t_initialize(F_console_standard_short_status_out_s, 0, F_console_standard_short_status_out_s_length);
- const f_string_static_t f_console_standard_short_verbose_s = macro_f_string_static_t_initialize(F_console_standard_short_verbose_s, 0, F_console_standard_short_verbose_s_length);
- const f_string_static_t f_console_standard_short_version_s = macro_f_string_static_t_initialize(F_console_standard_short_version_s, 0, F_console_standard_short_version_s_length);
-
- const f_string_static_t f_console_standard_long_dark_s = macro_f_string_static_t_initialize(F_console_standard_long_dark_s, 0, F_console_standard_long_dark_s_length);
- const f_string_static_t f_console_standard_long_debug_s = macro_f_string_static_t_initialize(F_console_standard_long_debug_s, 0, F_console_standard_long_debug_s_length);
- const f_string_static_t f_console_standard_long_help_s = macro_f_string_static_t_initialize(F_console_standard_long_help_s, 0, F_console_standard_long_help_s_length);
- const f_string_static_t f_console_standard_long_light_s = macro_f_string_static_t_initialize(F_console_standard_long_light_s, 0, F_console_standard_long_light_s_length);
- const f_string_static_t f_console_standard_long_no_color_s = macro_f_string_static_t_initialize(F_console_standard_long_no_color_s, 0, F_console_standard_long_no_color_s_length);
- const f_string_static_t f_console_standard_long_normal_s = macro_f_string_static_t_initialize(F_console_standard_long_normal_s, 0, F_console_standard_long_normal_s_length);
- const f_string_static_t f_console_standard_long_quiet_s = macro_f_string_static_t_initialize(F_console_standard_long_quiet_s, 0, F_console_standard_long_quiet_s_length);
- const f_string_static_t f_console_standard_long_status_in_s = macro_f_string_static_t_initialize(F_console_standard_long_status_in_s, 0, F_console_standard_long_status_in_s_length);
- const f_string_static_t f_console_standard_long_status_out_s = macro_f_string_static_t_initialize(F_console_standard_long_status_out_s, 0, F_console_standard_long_status_out_s_length);
- const f_string_static_t f_console_standard_long_verbose_s = macro_f_string_static_t_initialize(F_console_standard_long_verbose_s, 0, F_console_standard_long_verbose_s_length);
- const f_string_static_t f_console_standard_long_version_s = macro_f_string_static_t_initialize(F_console_standard_long_version_s, 0, F_console_standard_long_version_s_length);
+ const f_string_static_t f_console_standard_short_dark_s = macro_f_string_static_t_initialize((f_string_t)F_console_standard_short_dark_s, 0, F_console_standard_short_dark_s_length);
+ const f_string_static_t f_console_standard_short_debug_s = macro_f_string_static_t_initialize((f_string_t)F_console_standard_short_debug_s, 0, F_console_standard_short_debug_s_length);
+ const f_string_static_t f_console_standard_short_help_s = macro_f_string_static_t_initialize((f_string_t)F_console_standard_short_help_s, 0, F_console_standard_short_help_s_length);
+ const f_string_static_t f_console_standard_short_light_s = macro_f_string_static_t_initialize((f_string_t)F_console_standard_short_light_s, 0, F_console_standard_short_light_s_length);
+ const f_string_static_t f_console_standard_short_no_color_s = macro_f_string_static_t_initialize((f_string_t)F_console_standard_short_no_color_s, 0, F_console_standard_short_no_color_s_length);
+ const f_string_static_t f_console_standard_short_normal_s = macro_f_string_static_t_initialize((f_string_t)F_console_standard_short_normal_s, 0, F_console_standard_short_normal_s_length);
+ const f_string_static_t f_console_standard_short_quiet_s = macro_f_string_static_t_initialize((f_string_t)F_console_standard_short_quiet_s, 0, F_console_standard_short_quiet_s_length);
+ const f_string_static_t f_console_standard_short_status_in_s = macro_f_string_static_t_initialize((f_string_t)F_console_standard_short_status_in_s, 0, F_console_standard_short_status_in_s_length);
+ const f_string_static_t f_console_standard_short_status_out_s = macro_f_string_static_t_initialize((f_string_t)F_console_standard_short_status_out_s, 0, F_console_standard_short_status_out_s_length);
+ const f_string_static_t f_console_standard_short_verbose_s = macro_f_string_static_t_initialize((f_string_t)F_console_standard_short_verbose_s, 0, F_console_standard_short_verbose_s_length);
+ const f_string_static_t f_console_standard_short_version_s = macro_f_string_static_t_initialize((f_string_t)F_console_standard_short_version_s, 0, F_console_standard_short_version_s_length);
+
+ const f_string_static_t f_console_standard_long_dark_s = macro_f_string_static_t_initialize((f_string_t)F_console_standard_long_dark_s, 0, F_console_standard_long_dark_s_length);
+ const f_string_static_t f_console_standard_long_debug_s = macro_f_string_static_t_initialize((f_string_t)F_console_standard_long_debug_s, 0, F_console_standard_long_debug_s_length);
+ const f_string_static_t f_console_standard_long_help_s = macro_f_string_static_t_initialize((f_string_t)F_console_standard_long_help_s, 0, F_console_standard_long_help_s_length);
+ const f_string_static_t f_console_standard_long_light_s = macro_f_string_static_t_initialize((f_string_t)F_console_standard_long_light_s, 0, F_console_standard_long_light_s_length);
+ const f_string_static_t f_console_standard_long_no_color_s = macro_f_string_static_t_initialize((f_string_t)F_console_standard_long_no_color_s, 0, F_console_standard_long_no_color_s_length);
+ const f_string_static_t f_console_standard_long_normal_s = macro_f_string_static_t_initialize((f_string_t)F_console_standard_long_normal_s, 0, F_console_standard_long_normal_s_length);
+ const f_string_static_t f_console_standard_long_quiet_s = macro_f_string_static_t_initialize((f_string_t)F_console_standard_long_quiet_s, 0, F_console_standard_long_quiet_s_length);
+ const f_string_static_t f_console_standard_long_status_in_s = macro_f_string_static_t_initialize((f_string_t)F_console_standard_long_status_in_s, 0, F_console_standard_long_status_in_s_length);
+ const f_string_static_t f_console_standard_long_status_out_s = macro_f_string_static_t_initialize((f_string_t)F_console_standard_long_status_out_s, 0, F_console_standard_long_status_out_s_length);
+ const f_string_static_t f_console_standard_long_verbose_s = macro_f_string_static_t_initialize((f_string_t)F_console_standard_long_verbose_s, 0, F_console_standard_long_verbose_s_length);
+ const f_string_static_t f_console_standard_long_version_s = macro_f_string_static_t_initialize((f_string_t)F_console_standard_long_version_s, 0, F_console_standard_long_version_s_length);
#endif // _di_f_console_standard_s_
#ifndef _di_f_console_symbol_s_
- const f_string_static_t f_console_symbol_short_enable_s = macro_f_string_static_t_initialize(F_console_symbol_short_enable_s, 0, F_console_symbol_short_enable_s_length);
- const f_string_static_t f_console_symbol_short_disable_s = macro_f_string_static_t_initialize(F_console_symbol_short_disable_s, 0, F_console_symbol_short_disable_s_length);
+ const f_string_static_t f_console_symbol_short_enable_s = macro_f_string_static_t_initialize((f_string_t)F_console_symbol_short_enable_s, 0, F_console_symbol_short_enable_s_length);
+ const f_string_static_t f_console_symbol_short_disable_s = macro_f_string_static_t_initialize((f_string_t)F_console_symbol_short_disable_s, 0, F_console_symbol_short_disable_s_length);
- const f_string_static_t f_console_symbol_long_enable_s = macro_f_string_static_t_initialize(F_console_symbol_long_enable_s, 0, F_console_symbol_long_enable_s_length);
- const f_string_static_t f_console_symbol_long_disable_s = macro_f_string_static_t_initialize(F_console_symbol_long_disable_s, 0, F_console_symbol_long_disable_s_length);
+ const f_string_static_t f_console_symbol_long_enable_s = macro_f_string_static_t_initialize((f_string_t)F_console_symbol_long_enable_s, 0, F_console_symbol_long_enable_s_length);
+ const f_string_static_t f_console_symbol_long_disable_s = macro_f_string_static_t_initialize((f_string_t)F_console_symbol_long_disable_s, 0, F_console_symbol_long_disable_s_length);
#endif // _di_f_console_symbol_s_
#ifndef _di_f_console_parameters_delete_
*/
#ifndef _di_f_console_parameter_t_
typedef struct {
- const unsigned char *symbol_short;
- const unsigned char *symbol_long;
- const unsigned char *symbol_other;
+ const f_string_t symbol_short;
+ const f_string_t symbol_long;
+ const f_string_t symbol_other;
const uint8_t values_total;
const uint8_t type;
*
* This is intended to only store the argc and argv and should not be treated as dynamic.
*
- * No structure initializer is provided due to the use of constant properties.
+ * macro_f_console_arguments_t_initialize() initializes the structure.
*/
#ifndef _di_f_console_arguments_t_
typedef struct {
{
char buffer[maps.array[i].name.used + 1];
- memcpy(buffer, maps.array[i].name.string, maps.array[i].name.used);
+ memcpy(buffer, maps.array[i].name.string, sizeof(f_char_t) * maps.array[i].name.used);
buffer[maps.array[i].name.used] = 0;
assert_string_equal(buffer, names[i]);
{
char buffer[maps.array[i].value.used + 1];
- memcpy(buffer, maps.array[i].value.string, maps.array[i].value.used);
+ memcpy(buffer, maps.array[i].value.string, sizeof(f_char_t) * maps.array[i].value.used);
buffer[maps.array[i].value.used] = 0;
assert_string_equal(buffer, values[i]);
#endif
#ifndef _di_f_conversion_character_is_binary_
- f_status_t f_conversion_character_is_binary(const unsigned char character) {
+ f_status_t f_conversion_character_is_binary(const f_char_t character) {
if (character == 0x30 || character == 0x31) {
return F_true;
#endif // _di_f_conversion_character_is_binary_
#ifndef _di_f_conversion_character_is_decimal_
- f_status_t f_conversion_character_is_decimal(const unsigned char character) {
+ f_status_t f_conversion_character_is_decimal(const f_char_t character) {
if (character > 0x2f && character < 0x3a) {
return F_true;
#endif // _di_f_conversion_character_is_decimal_
#ifndef _di_f_conversion_character_is_duodecimal_
- f_status_t f_conversion_character_is_duodecimal(const unsigned char character) {
+ f_status_t f_conversion_character_is_duodecimal(const f_char_t character) {
if (character > 0x2f && character < 0x3a) {
return F_true;
#endif // _di_f_conversion_character_is_duodecimal_
#ifndef _di_f_conversion_character_is_hexidecimal_
- f_status_t f_conversion_character_is_hexidecimal(const unsigned char character) {
+ f_status_t f_conversion_character_is_hexidecimal(const f_char_t character) {
if (character > 0x2f && character < 0x3a) {
return F_true;
#endif // _di_f_conversion_character_is_hexidecimal_
#ifndef _di_f_conversion_character_is_octal_
- f_status_t f_conversion_character_is_octal(const unsigned char character) {
+ f_status_t f_conversion_character_is_octal(const f_char_t character) {
if (character > 0x2f && character < 0x38) {
return F_true;
#endif // _di_f_conversion_character_is_octal_
#ifndef _di_f_conversion_character_to_binary_
- f_status_t f_conversion_character_to_binary(const unsigned char character, uint8_t * const number) {
+ f_status_t f_conversion_character_to_binary(const f_char_t character, uint8_t * const number) {
#ifndef _di_level_0_parameter_checking_
if (!number) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_conversion_character_to_binary_
#ifndef _di_f_conversion_character_to_decimal_
- f_status_t f_conversion_character_to_decimal(const unsigned char character, uint8_t * const number) {
+ f_status_t f_conversion_character_to_decimal(const f_char_t character, uint8_t * const number) {
#ifndef _di_level_0_parameter_checking_
if (!number) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_conversion_character_to_decimal_
#ifndef _di_f_conversion_character_to_duodecimal_
- f_status_t f_conversion_character_to_duodecimal(const unsigned char character, uint8_t * const number) {
+ f_status_t f_conversion_character_to_duodecimal(const f_char_t character, uint8_t * const number) {
#ifndef _di_level_0_parameter_checking_
if (!number) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_conversion_character_to_duodecimal_
#ifndef _di_f_conversion_character_to_hexidecimal_
- f_status_t f_conversion_character_to_hexidecimal(const unsigned char character, uint8_t * const number) {
+ f_status_t f_conversion_character_to_hexidecimal(const f_char_t character, uint8_t * const number) {
#ifndef _di_level_0_parameter_checking_
if (!number) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_conversion_character_to_hexidecimal_
#ifndef _di_f_conversion_character_to_octal_
- f_status_t f_conversion_character_to_octal(const unsigned char character, uint8_t * const number) {
+ f_status_t f_conversion_character_to_octal(const f_char_t character, uint8_t * const number) {
#ifndef _di_level_0_parameter_checking_
if (!number) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
* F_false if character is not a binary.
*/
#ifndef _di_f_conversion_character_is_binary_
- extern f_status_t f_conversion_character_is_binary(const unsigned char character);
+ extern f_status_t f_conversion_character_is_binary(const f_char_t character);
#endif // _di_f_conversion_character_is_binary_
/**
* F_false if character is not a decimal.
*/
#ifndef _di_f_conversion_character_is_decimal_
- extern f_status_t f_conversion_character_is_decimal(const unsigned char character);
+ extern f_status_t f_conversion_character_is_decimal(const f_char_t character);
#endif // _di_f_conversion_character_is_decimal_
/**
* F_false if character is not a duodecimal.
*/
#ifndef _di_f_conversion_character_is_duodecimal_
- extern f_status_t f_conversion_character_is_duodecimal(const unsigned char character);
+ extern f_status_t f_conversion_character_is_duodecimal(const f_char_t character);
#endif // _di_f_conversion_character_is_duodecimal_
/**
* F_false if character is not a hexidecimal.
*/
#ifndef _di_f_conversion_character_is_hexidecimal_
- extern f_status_t f_conversion_character_is_hexidecimal(const unsigned char character);
+ extern f_status_t f_conversion_character_is_hexidecimal(const f_char_t character);
#endif // _di_f_conversion_character_is_hexidecimal_
/**
* F_false if character is not an octal.
*/
#ifndef _di_f_conversion_character_is_octal_
- extern f_status_t f_conversion_character_is_octal(const unsigned char character);
+ extern f_status_t f_conversion_character_is_octal(const f_char_t character);
#endif // _di_f_conversion_character_is_octal_
/**
* F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_f_conversion_character_to_binary_
- extern f_status_t f_conversion_character_to_binary(const unsigned char character, uint8_t * const number);
+ extern f_status_t f_conversion_character_to_binary(const f_char_t character, uint8_t * const number);
#endif // _di_f_conversion_character_to_binary_
/**
* F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_f_conversion_character_to_decimal_
- extern f_status_t f_conversion_character_to_decimal(const unsigned char character, uint8_t * const number);
+ extern f_status_t f_conversion_character_to_decimal(const f_char_t character, uint8_t * const number);
#endif // _di_f_conversion_character_to_decimal_
/**
* F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_f_conversion_character_to_duodecimal_
- extern f_status_t f_conversion_character_to_duodecimal(const unsigned char character, uint8_t * const number);
+ extern f_status_t f_conversion_character_to_duodecimal(const f_char_t character, uint8_t * const number);
#endif // _di_f_conversion_character_to_duodecimal_
/**
* F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_f_conversion_character_to_hexidecimal_
- extern f_status_t f_conversion_character_to_hexidecimal(const unsigned char character, uint8_t * const number);
+ extern f_status_t f_conversion_character_to_hexidecimal(const f_char_t character, uint8_t * const number);
#endif // _di_f_conversion_character_to_hexidecimal_
/**
* F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_f_conversion_character_to_octal_
- extern f_status_t f_conversion_character_to_octal(const unsigned char character, uint8_t * const number);
+ extern f_status_t f_conversion_character_to_octal(const f_char_t character, uint8_t * const number);
#endif // _di_f_conversion_character_to_octal_
/**
f_number_unsigned_t current = number;
f_number_unsigned_t work = 0;
- for (unsigned char c = 0; digits; --digits) {
+ for (f_char_t c = 0; digits; --digits) {
work = current / power;
current -= work * power;
return F_status_set_error(F_output);
}
- unsigned char c = 0;
+ f_char_t c = 0;
switch (data.base) {
case 2:
f_number_unsigned_t current = number;
f_number_unsigned_t work = 0;
- for (unsigned char c = 0; digits; --digits) {
+ for (f_char_t c = 0; digits; --digits) {
work = current / power;
current -= work * power;
#endif // !defined(_di_f_conversion_number_signed_to_string_) || !defined(_di_f_conversion_number_unsigned_to_string_)
#if !defined(_di_f_conversion_number_signed_to_string_) || !defined(_di_f_conversion_number_unsigned_to_string_)
- void private_f_conversion_digit_to_string_pad(const f_conversion_data_t data, const unsigned char pad, int total, f_string_dynamic_t * const destination) {
+ void private_f_conversion_digit_to_string_pad(const f_conversion_data_t data, const f_char_t pad, int total, f_string_dynamic_t * const destination) {
for (; total; --total) {
destination->string[destination->used++] = pad;
if (data.flag & F_conversion_data_flag_base_prepend_d) {
destination->string[destination->used++] = f_string_ascii_0_s.string[0];
- unsigned char c = 0;
+ f_char_t c = 0;
switch (data.base) {
case 2:
* @see f_conversion_number_unsigned_to_string()
*/
#if !defined(_di_f_conversion_number_signed_to_string_) || !defined(_di_f_conversion_number_unsigned_to_string_)
- extern void private_f_conversion_digit_to_string_pad(const f_conversion_data_t data, const unsigned char pad, int total, f_string_dynamic_t * const destination) F_attribute_visibility_internal_d;
+ extern void private_f_conversion_digit_to_string_pad(const f_conversion_data_t data, const f_char_t pad, int total, f_string_dynamic_t * const destination) F_attribute_visibility_internal_d;
#endif // !defined(_di_f_conversion_number_signed_to_string_) || !defined(_di_f_conversion_number_unsigned_to_string_)
/**
}
destination.used = 0;
- memset(destination.string, 0, destination.size);
+ memset(destination.string, 0, sizeof(f_char_t) * destination.size);
{
const f_conversion_data_t data = macro_f_conversion_data_t_initialize(2, F_conversion_data_flag_base_prepend_d | F_conversion_data_flag_base_upper_d, 0);
}
destination.used = 0;
- memset(destination.string, 0, destination.size);
+ memset(destination.string, 0, sizeof(f_char_t) * destination.size);
{
const f_conversion_data_t data = macro_f_conversion_data_t_initialize(8, F_conversion_data_flag_base_prepend_d, 0);
}
destination.used = 0;
- memset(destination.string, 0, destination.size);
+ memset(destination.string, 0, sizeof(f_char_t) * destination.size);
{
const f_conversion_data_t data = macro_f_conversion_data_t_initialize(8, F_conversion_data_flag_base_prepend_d | F_conversion_data_flag_base_upper_d, 0);
}
destination.used = 0;
- memset(destination.string, 0, destination.size);
+ memset(destination.string, 0, sizeof(f_char_t) * destination.size);
{
const f_conversion_data_t data = macro_f_conversion_data_t_initialize(10, F_conversion_data_flag_base_prepend_d, 0);
}
destination.used = 0;
- memset(destination.string, 0, destination.size);
+ memset(destination.string, 0, sizeof(f_char_t) * destination.size);
{
const f_conversion_data_t data = macro_f_conversion_data_t_initialize(10, F_conversion_data_flag_base_prepend_d | F_conversion_data_flag_base_upper_d, 0);
}
destination.used = 0;
- memset(destination.string, 0, destination.size);
+ memset(destination.string, 0, sizeof(f_char_t) * destination.size);
{
const f_conversion_data_t data = macro_f_conversion_data_t_initialize(12, F_conversion_data_flag_base_prepend_d, 0);
}
destination.used = 0;
- memset(destination.string, 0, destination.size);
+ memset(destination.string, 0, sizeof(f_char_t) * destination.size);
{
const f_conversion_data_t data = macro_f_conversion_data_t_initialize(12, F_conversion_data_flag_base_prepend_d | F_conversion_data_flag_base_upper_d, 0);
}
destination.used = 0;
- memset(destination.string, 0, destination.size);
+ memset(destination.string, 0, sizeof(f_char_t) * destination.size);
{
const f_conversion_data_t data = macro_f_conversion_data_t_initialize(16, F_conversion_data_flag_base_prepend_d, 0);
}
destination.used = 0;
- memset(destination.string, 0, destination.size);
+ memset(destination.string, 0, sizeof(f_char_t) * destination.size);
{
const f_conversion_data_t data = macro_f_conversion_data_t_initialize(16, F_conversion_data_flag_base_prepend_d | F_conversion_data_flag_base_upper_d, 0);
}
destination.used = 0;
- memset(destination.string, 0, destination.size);
+ memset(destination.string, 0, sizeof(f_char_t) * destination.size);
{
const f_conversion_data_t data = macro_f_conversion_data_t_initialize(10, 0, 1);
}
destination.used = 0;
- memset(destination.string, 0, destination.size);
+ memset(destination.string, 0, sizeof(f_char_t) * destination.size);
{
const f_conversion_data_t data = macro_f_conversion_data_t_initialize(10, F_conversion_data_flag_zeros_leading_d, 1);
}
destination.used = 0;
- memset(destination.string, 0, destination.size);
+ memset(destination.string, 0, sizeof(f_char_t) * destination.size);
{
const f_conversion_data_t data = macro_f_conversion_data_t_initialize(10, 0, 2);
}
destination.used = 0;
- memset(destination.string, 0, destination.size);
+ memset(destination.string, 0, sizeof(f_char_t) * destination.size);
{
const f_conversion_data_t data = macro_f_conversion_data_t_initialize(10, F_conversion_data_flag_zeros_leading_d, 2);
}
destination.used = 0;
- memset(destination.string, 0, destination.size);
+ memset(destination.string, 0, sizeof(f_char_t) * destination.size);
{
const f_conversion_data_t data = macro_f_conversion_data_t_initialize(10, F_conversion_data_flag_sign_pad_d, 0);
}
destination.used = 0;
- memset(destination.string, 0, destination.size);
+ memset(destination.string, 0, sizeof(f_char_t) * destination.size);
{
const f_conversion_data_t data = macro_f_conversion_data_t_initialize(10, F_conversion_data_flag_sign_pad_d, 1);
}
destination.used = 0;
- memset(destination.string, 0, destination.size);
+ memset(destination.string, 0, sizeof(f_char_t) * destination.size);
{
const f_conversion_data_t data = macro_f_conversion_data_t_initialize(10, F_conversion_data_flag_sign_always_d, 0);
}
destination.used = 0;
- memset(destination.string, 0, destination.size);
+ memset(destination.string, 0, sizeof(f_char_t) * destination.size);
{
const f_conversion_data_t data = macro_f_conversion_data_t_initialize(10, F_conversion_data_flag_sign_always_d, 1);
}
destination.used = 0;
- memset(destination.string, 0, destination.size);
+ memset(destination.string, 0, sizeof(f_char_t) * destination.size);
{
const f_conversion_data_t data = macro_f_conversion_data_t_initialize(10, F_conversion_data_flag_sign_always_d | F_conversion_data_flag_zeros_leading_d, 2);
}
destination.used = 0;
- memset(destination.string, 0, destination.size);
+ memset(destination.string, 0, sizeof(f_char_t) * destination.size);
{
const f_conversion_data_t data = macro_f_conversion_data_t_initialize(2, F_conversion_data_flag_base_prepend_d | F_conversion_data_flag_base_upper_d, 0);
}
destination.used = 0;
- memset(destination.string, 0, destination.size);
+ memset(destination.string, 0, sizeof(f_char_t) * destination.size);
{
const f_conversion_data_t data = macro_f_conversion_data_t_initialize(8, F_conversion_data_flag_base_prepend_d, 0);
}
destination.used = 0;
- memset(destination.string, 0, destination.size);
+ memset(destination.string, 0, sizeof(f_char_t) * destination.size);
{
const f_conversion_data_t data = macro_f_conversion_data_t_initialize(8, F_conversion_data_flag_base_prepend_d | F_conversion_data_flag_base_upper_d, 0);
}
destination.used = 0;
- memset(destination.string, 0, destination.size);
+ memset(destination.string, 0, sizeof(f_char_t) * destination.size);
{
const f_conversion_data_t data = macro_f_conversion_data_t_initialize(10, F_conversion_data_flag_base_prepend_d, 0);
}
destination.used = 0;
- memset(destination.string, 0, destination.size);
+ memset(destination.string, 0, sizeof(f_char_t) * destination.size);
{
const f_conversion_data_t data = macro_f_conversion_data_t_initialize(10, F_conversion_data_flag_base_prepend_d | F_conversion_data_flag_base_upper_d, 0);
}
destination.used = 0;
- memset(destination.string, 0, destination.size);
+ memset(destination.string, 0, sizeof(f_char_t) * destination.size);
{
const f_conversion_data_t data = macro_f_conversion_data_t_initialize(12, F_conversion_data_flag_base_prepend_d, 0);
}
destination.used = 0;
- memset(destination.string, 0, destination.size);
+ memset(destination.string, 0, sizeof(f_char_t) * destination.size);
{
const f_conversion_data_t data = macro_f_conversion_data_t_initialize(12, F_conversion_data_flag_base_prepend_d | F_conversion_data_flag_base_upper_d, 0);
}
destination.used = 0;
- memset(destination.string, 0, destination.size);
+ memset(destination.string, 0, sizeof(f_char_t) * destination.size);
{
const f_conversion_data_t data = macro_f_conversion_data_t_initialize(16, F_conversion_data_flag_base_prepend_d, 0);
}
destination.used = 0;
- memset(destination.string, 0, destination.size);
+ memset(destination.string, 0, sizeof(f_char_t) * destination.size);
{
const f_conversion_data_t data = macro_f_conversion_data_t_initialize(16, F_conversion_data_flag_base_prepend_d | F_conversion_data_flag_base_upper_d, 0);
}
destination.used = 0;
- memset(destination.string, 0, destination.size);
+ memset(destination.string, 0, sizeof(f_char_t) * destination.size);
{
const f_conversion_data_t data = macro_f_conversion_data_t_initialize(10, 0, 1);
}
destination.used = 0;
- memset(destination.string, 0, destination.size);
+ memset(destination.string, 0, sizeof(f_char_t) * destination.size);
{
const f_conversion_data_t data = macro_f_conversion_data_t_initialize(10, F_conversion_data_flag_zeros_leading_d, 1);
}
destination.used = 0;
- memset(destination.string, 0, destination.size);
+ memset(destination.string, 0, sizeof(f_char_t) * destination.size);
{
const f_conversion_data_t data = macro_f_conversion_data_t_initialize(10, 0, 2);
}
destination.used = 0;
- memset(destination.string, 0, destination.size);
+ memset(destination.string, 0, sizeof(f_char_t) * destination.size);
{
const f_conversion_data_t data = macro_f_conversion_data_t_initialize(10, F_conversion_data_flag_zeros_leading_d, 2);
}
destination.used = 0;
- memset(destination.string, 0, destination.size);
+ memset(destination.string, 0, sizeof(f_char_t) * destination.size);
{
const f_conversion_data_t data = macro_f_conversion_data_t_initialize(10, F_conversion_data_flag_sign_pad_d, 0);
}
destination.used = 0;
- memset(destination.string, 0, destination.size);
+ memset(destination.string, 0, sizeof(f_char_t) * destination.size);
{
const f_conversion_data_t data = macro_f_conversion_data_t_initialize(10, F_conversion_data_flag_sign_pad_d, 1);
}
destination.used = 0;
- memset(destination.string, 0, destination.size);
+ memset(destination.string, 0, sizeof(f_char_t) * destination.size);
{
const f_conversion_data_t data = macro_f_conversion_data_t_initialize(10, F_conversion_data_flag_sign_always_d, 0);
}
destination.used = 0;
- memset(destination.string, 0, destination.size);
+ memset(destination.string, 0, sizeof(f_char_t) * destination.size);
{
const f_conversion_data_t data = macro_f_conversion_data_t_initialize(10, F_conversion_data_flag_sign_always_d, 1);
}
destination.used = 0;
- memset(destination.string, 0, destination.size);
+ memset(destination.string, 0, sizeof(f_char_t) * destination.size);
{
const f_conversion_data_t data = macro_f_conversion_data_t_initialize(10, F_conversion_data_flag_sign_always_d | F_conversion_data_flag_zeros_leading_d, 2);
size = strnlen(listing[i]->d_name, F_directory_name_max_d);
// There is no reason to include "." and ".." in the directory listing.
- if (!strncmp(listing[i]->d_name, "..", 3) || !strncmp(listing[i]->d_name, ".", 2)) {
- f_memory_delete(size, sizeof(unsigned char *), (void **) & listing[i]);
+ if (!strncmp(listing[i]->d_name, f_directory_back_s.string, f_directory_back_s.used + 1) || !strncmp(listing[i]->d_name, f_directory_current_s.string, f_directory_current_s.used + 1)) {
+ f_memory_delete(size, sizeof(f_string_t), (void **) & listing[i]);
continue;
}
status = f_string_dynamic_increase_by(size, &names->array[names->used]);
if (F_status_is_error(status)) break;
- memcpy(names->array[names->used].string, listing[i]->d_name, sizeof(unsigned char) * size);
+ memcpy(names->array[names->used].string, listing[i]->d_name, sizeof(f_char_t) * size);
names->array[names->used++].used = size;
- f_memory_delete(size, sizeof(unsigned char *), (void **) & listing[i]);
+ f_memory_delete(size, sizeof(f_string_t), (void **) & listing[i]);
} // for
for (; i < length; ++i) {
- f_memory_delete(size, sizeof(unsigned char *), (void **) & listing[i]);
+ f_memory_delete(size, sizeof(f_string_t), (void **) & listing[i]);
} // for
f_memory_delete(1, sizeof(struct dirent *), (void **) & listing);
int result = 0;
if (depth_max) {
- result = nftw((char *) path.string, private_f_directory_remove_recursively, depth_max, FTW_DEPTH | FTW_PHYS);
+ result = nftw(path.string, private_f_directory_remove_recursively, depth_max, FTW_DEPTH | FTW_PHYS);
if (result == 0 && !preserve) {
result = remove(path.string);
int result = 0;
if (depth_max) {
- result = nftw((char *) path.string, custom, depth_max, FTW_DEPTH | FTW_PHYS);
+ result = nftw(path.string, custom, depth_max, FTW_DEPTH | FTW_PHYS);
if (result == 0 && !preserve) {
result = remove(path.string);
--- /dev/null
+#include "../directory.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef _di_f_directory_string_
+ const f_string_static_t f_directory_back_s = macro_f_string_static_t_initialize(F_directory_back_s, 0, F_directory_back_s_length);
+ const f_string_static_t f_directory_current_s = macro_f_string_static_t_initialize(F_directory_current_s, 0, F_directory_current_s_length);
+#endif // _di_f_directory_string_
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
extern "C" {
#endif
+#ifndef _di_f_directory_string_
+ #define F_directory_back_s ".."
+ #define F_directory_current_s "."
+
+ #define F_directory_back_s_length 2
+ #define F_directory_current_s_length 1
+
+ extern const f_string_static_t f_directory_back_s;
+ extern const f_string_static_t f_directory_current_s;
+#endif // _di_f_directory_string_
+
/**
* Directory AT_* define related functionality.
*/
build_objects_program
build_objects_program_shared
build_objects_program_static
-build_sources_library directory.c private-directory.c
+build_sources_library directory.c private-directory.c directory/common.c
build_sources_library_shared
build_sources_library_static
build_sources_object
return F_data_not;
}
- const f_string_t result = getenv(name.string);
+ const char *result = getenv(name.string);
if (!result) {
return F_exist_not;
const f_status_t status = f_string_dynamic_increase_by(size + 1, value);
if (F_status_is_error(status)) return status;
- memcpy(value->string + value->used, result, sizeof(unsigned char) * size);
+ memcpy(value->string + value->used, result, sizeof(char) * size);
value->used += size;
value->string[value->used] = 0;
* Warning: F_execute and F_execute_not are F_status_t status codes and are not F_execute_codes.
* The F_execute_off is the execute code equivalent of F_execute_not.
*/
-#ifndef _di_F_execute_codes_
+#ifndef _di_f_execute_codes_
enum {
F_execute_none = 0,
F_execute_access,
// Required.
F_execute_code_last,
}; // enum
-#endif // _di_F_execute_codes_
+#endif // _di_f_execute_codes_
/**
* A structure representing a scheduler and its parameters for execution.
}
// POSIX basename() modifies the path, so protect it (and add a terminating NULL).
- unsigned char path_argument[path.used + 1];
+ char path_argument[path.used + 1];
f_string_t path_to_name;
- memcpy(path_argument, path.string, sizeof(unsigned char) * path.used);
+ memcpy(path_argument, path.string, sizeof(f_char_t) * path.used);
path_argument[path.used] = 0;
- path_to_name = basename(path_argument);
+ path_to_name = (f_string_t) basename(path_argument);
const f_array_length_t size = strnlen(path_to_name, path.used);
const f_status_t status = f_string_dynamic_increase_by(size + 1, name_base);
if (F_status_is_error(status)) return status;
- memcpy(name_base->string + name_base->used, path_to_name, sizeof(unsigned char) * size);
+ memcpy(name_base->string + name_base->used, path_to_name, sizeof(f_char_t) * size);
name_base->used += size;
name_base->string[name_base->used] = 0;
}
// POSIX dirname() modifies the path, so protect it (and add a terminating NULL).
- unsigned char path_argument[path.used + 1];
+ char path_argument[path.used + 1];
f_string_t path_to_name;
- memcpy(path_argument, path.string, sizeof(unsigned char) * path.used);
+ memcpy(path_argument, path.string, sizeof(f_char_t) * path.used);
path_argument[path.used] = 0;
- path_to_name = dirname(path_argument);
+ path_to_name = (f_string_t) dirname(path_argument);
const f_array_length_t size = strnlen(path_to_name, path.used);
if (F_status_is_error(status)) return status;
}
- memcpy(name_directory->string + name_directory->used, path_to_name, sizeof(unsigned char) * size);
+ memcpy(name_directory->string + name_directory->used, path_to_name, sizeof(f_char_t) * size);
name_directory->used += size;
name_directory->string[name_directory->used] = 0;
ssize_t size_read = 0;
ssize_t size_write = 0;
- unsigned char *buffer[size_block];
+ f_char_t buffer[size_block];
- memset(buffer, 0, sizeof(unsigned char) * size_block);
+ memset(buffer, 0, sizeof(f_char_t) * size_block);
while ((size_read = read(file_source.id, buffer, size_block)) > 0) {
ssize_t size_read = 0;
ssize_t size_write = 0;
- unsigned char *buffer[size_block];
+ f_char_t buffer[size_block];
- memset(buffer, 0, sizeof(unsigned char) * size_block);
+ memset(buffer, 0, sizeof(f_char_t) * size_block);
while ((size_read = read(file_source.id, buffer, size_block)) > 0) {
return F_status_set_error(F_string_too_large);
}
- f_status_t status = F_none;
-
- macro_f_string_dynamic_t_resize(status, (*target), link_stat.st_size + 1);
+ const f_status_t status = f_string_dynamic_resize(link_stat.st_size + 1, target);
if (F_status_is_error(status)) return status;
}
- memset(target->string, 0, sizeof(unsigned char) * (target->used + 1));
+ memset(target->string, 0, sizeof(f_char_t) * (target->used + 1));
target->used = link_stat.st_size;
return F_status_set_error(F_string_too_large);
}
- f_status_t status = F_none;
-
- macro_f_string_dynamic_t_resize(status, (*target), link_stat.st_size + 1);
+ const f_status_t status = f_string_dynamic_resize(link_stat.st_size + 1, target);
if (F_status_is_error(status)) return status;
}
- memset(target->string, 0, sizeof(unsigned char) * (target->used + 1));
+ memset(target->string, 0, sizeof(f_char_t) * (target->used + 1));
target->used = link_stat.st_size;
#endif // !defined(_di_f_file_stat_by_id_) || !defined(_di_f_file_size_by_id_)
#if !defined(_di_f_file_stream_descriptor_) || !defined(_di_f_file_stream_open_) || !defined(_di_f_file_stream_reopen_)
- const unsigned char *private_f_file_stream_open_mode_determine(const int flag) {
+ const f_string_t private_f_file_stream_open_mode_determine(const int flag) {
if (flag & F_file_flag_read_write_d) {
if (flag & F_file_flag_truncate_d) {
* @see f_file_stream_reopen()
*/
#if !defined(_di_f_file_stream_descriptor_) || !defined(_di_f_file_stream_open_) || !defined(_di_f_file_stream_reopen_)
- extern const unsigned char *private_f_file_stream_open_mode_determine(const int flag) F_attribute_visibility_internal_d;
+ extern const f_string_t private_f_file_stream_open_mode_determine(const int flag) F_attribute_visibility_internal_d;
#endif // !defined(_di_f_file_stream_descriptor_) || !defined(_di_f_file_stream_open_) || !defined(_di_f_file_stream_reopen_)
/**
enum {
F_fss_status_code_first = F_status_code_last + 1,
- #ifndef _di_F_fss_status_error_
+ #ifndef _di_f_fss_status_error_
F_fss_format,
F_fss_format_eos,
- #endif // _di_F_fss_status_error_
+ #endif // _di_f_fss_status_error_
- #ifndef _di_F_fss_status_warning_
+ #ifndef _di_f_fss_status_warning_
F_fss_accepted_invalid,
F_fss_accepted_invalid_eos,
- #endif // _di_F_fss_status_warning_
+ #endif // _di_f_fss_status_warning_
- #ifndef _di_F_fss_status_success_
+ #ifndef _di_f_fss_status_success_
F_fss_found_content,
F_fss_found_object,
F_fss_found_object_content_not,
F_fss_found_content_not,
F_fss_found_object_not,
- #endif // _di_F_fss_status_success_
+ #endif // _di_f_fss_status_success_
- #ifndef _di_F_fss_status_codes_
+ #ifndef _di_f_fss_status_codes_
F_fss_found_comment,
- #endif // _di_F_fss_status_codes_
+ #endif // _di_f_fss_status_codes_
F_fss_status_code_last,
}; // enum
#endif // !defined(_di_f_iki_datas_append_) || !defined(_di_f_iki_datas_decrease_by_) || !defined(_di_f_iki_datas_increase_) || !defined(_di_f_iki_datas_increase_by_) || !defined(_di_f_iki_datas_resize_)
#if !defined(_di_f_iki_content_is_) || !defined(_di_f_iki_content_partial_is_)
- f_status_t private_f_iki_content_partial_is(const f_string_t buffer, const f_array_length_t length, const unsigned char quote) {
+ f_status_t private_f_iki_content_partial_is(const f_string_t buffer, const f_array_length_t length, const f_char_t quote) {
f_array_length_t delimits = 0;
* @see f_iki_content_partial_is()
*/
#if !defined(_di_f_iki_content_is_) || !defined(_di_f_iki_content_partial_is_)
- extern f_status_t private_f_iki_content_partial_is(const f_string_t buffer, const f_array_length_t length, const unsigned char quote) F_attribute_visibility_internal_d;
+ extern f_status_t private_f_iki_content_partial_is(const f_string_t buffer, const f_array_length_t length, const f_char_t quote) F_attribute_visibility_internal_d;
#endif // !defined(_di_f_iki_content_is_) || !defined(_di_f_iki_content_partial_is_)
/**
if (!path) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- unsigned char buffer[F_path_length_max_d];
+ char buffer[F_path_length_max_d];
if (!getcwd(buffer, F_path_length_max_d)) {
if (errno == EACCES) return F_status_set_error(F_access_denied);
if (F_status_is_error(status)) return status;
}
- memcpy(path->string, buffer, sizeof(unsigned char) * length);
+ memcpy(path->string, buffer, sizeof(char) * length);
path->string[length] = 0;
path->used = length;
} // while
// Use memcpy() to take advantage of its optimized copy behaviors whenever possible.
- memcpy(directory->string + directory->used, argument.string + i, sizeof(unsigned char) * (j - i));
+ memcpy(directory->string + directory->used, argument.string + i, sizeof(f_char_t) * (j - i));
directory->used += j - i;
i = j;
#endif
#if !defined(_di_f_path_current_) || !defined(_di_f_path_real_)
- f_status_t private_f_path_real(const f_string_t path, f_string_dynamic_t * const real) {
+ f_status_t private_f_path_real(const char *path, f_string_dynamic_t * const real) {
char buffer[F_path_length_max_d];
if (F_status_is_error(status)) return status;
}
- memcpy(real->string, buffer, sizeof(unsigned char) * length);
+ memcpy(real->string, buffer, sizeof(char) * length);
real->string[length] = 0;
real->used = length;
* @see f_path_real()
*/
#if !defined(_di_f_path_current_) || !defined(_di_f_path_real_)
- extern f_status_t private_f_path_real(const f_string_t path, f_string_dynamic_t * const real) F_attribute_visibility_internal_d;
+ extern f_status_t private_f_path_real(const char *path, f_string_dynamic_t * const real) F_attribute_visibility_internal_d;
#endif // !defined(_di_f_path_current_) || !defined(_di_f_path_real_)
#ifdef __cplusplus
#endif // _di_f_print_
#ifndef _di_f_print_character_
- f_status_t f_print_character(const unsigned char character, FILE * const output) {
+ f_status_t f_print_character(const f_char_t character, FILE * const output) {
#ifndef _di_level_0_parameter_checking_
if (!output) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_print_character_
#ifndef _di_f_print_character_safely_
- f_status_t f_print_character_safely(const unsigned char character, FILE * const output) {
+ f_status_t f_print_character_safely(const f_char_t character, FILE * const output) {
#ifndef _di_level_0_parameter_checking_
if (!output) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_print_character_safely_
#ifndef _di_f_print_character_safely_get_
- const f_string_static_t f_print_character_safely_get(const unsigned char character) {
+ const f_string_static_t f_print_character_safely_get(const f_char_t character) {
return private_f_print_character_safely_get(character);
}
* @see fwrite_unlocked()
*/
#ifndef _di_f_print_character_
- extern f_status_t f_print_character(const unsigned char character, FILE * const output);
+ extern f_status_t f_print_character(const f_char_t character, FILE * const output);
#endif // _di_f_print_character_
/**
* @see fwrite_unlocked()
*/
#ifndef _di_f_print_character_safely_
- extern f_status_t f_print_character_safely(const unsigned char character, FILE * const output);
+ extern f_status_t f_print_character_safely(const f_char_t character, FILE * const output);
#endif // _di_f_print_character_safely_
/**
* A string with a non-zero used length is returned are NULL terminated (after the used length).
*/
#ifndef _di_f_print_character_safely_get_
- extern const f_string_static_t f_print_character_safely_get(const unsigned char character);
+ extern const f_string_static_t f_print_character_safely_get(const f_char_t character);
#endif // _di_f_print_character_safely_get_
/**
for (register f_array_length_t i = 0; i < length; ) {
- total = strnlen(string + i, length - i);
+ total = strnlen((string + i), length - i);
if (total) {
if (total > F_print_write_max_d) {
#endif // !defined(_di_f_print_to_) || !defined(_di_f_print_dynamic_to_) || !defined(_di_f_print_dynamic_partial_to_)
#if !defined(_di_f_print_to_character_safely_) || !defined(_di_f_print_to_safely_) || !defined(_di_f_print_to_safely_dynamic_) || !defined(_di_f_print_to_safely_dynamic_partial_) || !defined(_di_f_print_to_safely_terminated_) || !defined(_di_f_print_to_except_safely_) || !defined(_di_f_print_to_except_dynamic_safely_) || !defined(_di_f_print_to_except_dynamic_partial_safely_) || !defined(_di_f_print_to_except_in_safely_) || !defined(_di_f_print_to_except_in_dynamic_safely_) || !defined(_di_f_print_to_except_in_dynamic_partial_safely_)
- f_status_t private_f_print_to_character_safely(const unsigned char character, const int id) {
+ f_status_t private_f_print_to_character_safely(const f_char_t character, const int id) {
if (character == 0x7f) {
if (write(id, f_print_sequence_delete_s.string, f_print_sequence_delete_s.used) != -1) {
for (register f_array_length_t i = 0; i < length; ) {
- total = strnlen(string + i, length - i);
+ total = strnlen((string + i), length - i);
if (total) {
if (total > F_print_write_max_d) {
* @see f_print_to_except_in_dynamic_partial_safely()
*/
#if !defined(_di_f_print_to_character_safely_) || !defined(_di_f_print_to_safely_) || !defined(_di_f_print_to_safely_dynamic_) || !defined(_di_f_print_to_safely_dynamic_partial_) || !defined(_di_f_print_to_safely_terminated_) || !defined(_di_f_print_to_except_safely_) || !defined(_di_f_print_to_except_dynamic_safely_) || !defined(_di_f_print_to_except_dynamic_partial_safely_) || !defined(_di_f_print_to_except_in_safely_) || !defined(_di_f_print_to_except_in_dynamic_safely_) || !defined(_di_f_print_to_except_in_dynamic_partial_safely_)
- extern f_status_t private_f_print_to_character_safely(const unsigned char character, const int id) F_attribute_visibility_internal_d;
+ extern f_status_t private_f_print_to_character_safely(const f_char_t character, const int id) F_attribute_visibility_internal_d;
#endif // !defined(_di_f_print_to_character_safely_) || !defined(_di_f_print_to_safely_) || !defined(_di_f_print_to_safely_dynamic_) || !defined(_di_f_print_to_safely_dynamic_partial_) || !defined(_di_f_print_to_safely_terminated_) || !defined(_di_f_print_to_except_safely_) || !defined(_di_f_print_to_except_dynamic_safely_) || !defined(_di_f_print_to_except_dynamic_partial_safely_) || !defined(_di_f_print_to_except_in_safely_) || !defined(_di_f_print_to_except_in_dynamic_safely_) || !defined(_di_f_print_to_except_in_dynamic_partial_safely_)
/**
#endif // _di_f_print_to_
#ifndef _di_f_print_to_character_
- f_status_t f_print_to_character(const unsigned char character, const int id) {
+ f_status_t f_print_to_character(const f_char_t character, const int id) {
#ifndef _di_level_0_parameter_checking_
if (id == -1) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_print_to_character_
#ifndef _di_f_print_to_character_safely_
- f_status_t f_print_to_character_safely(const unsigned char character, const int id) {
+ f_status_t f_print_to_character_safely(const f_char_t character, const int id) {
#ifndef _di_level_0_parameter_checking_
if (id == -1) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
* @see write()
*/
#ifndef _di_f_print_to_character_
- extern f_status_t f_print_to_character(const unsigned char character, const int id);
+ extern f_status_t f_print_to_character(const f_char_t character, const int id);
#endif // _di_f_print_to_character_
/**
* @see write()
*/
#ifndef _di_f_print_to_character_safely_
- extern f_status_t f_print_to_character_safely(const unsigned char character, const int id);
+ extern f_status_t f_print_to_character_safely(const f_char_t character, const int id);
#endif // _di_f_print_to_character_safely_
/**
for (register f_array_length_t i = 0; i < length; ) {
- total = strnlen(string + i, length - i);
+ total = strnlen((string + i), length - i);
if (total) {
if (total > F_print_write_max_d) {
#endif // !defined(_di_f_print_) || !defined(_di_f_print_dynamic_) || !defined(_di_f_print_dynamic_partial_)
#if !defined(_di_f_print_character_safely_get_) || !defined(_di_f_print_dynamic_partial_safely_) || !defined(_di_f_print_dynamic_safely_) || !defined(_di_f_print_except_dynamic_partial_safely_) || !defined(_di_f_print_except_dynamic_safely_) || !defined(_di_f_print_except_in_dynamic_safely_) || !defined(_di_f_print_except_in_dynamic_partial_safely_) || !defined(_di_f_print_except_in_safely_) || !defined(_di_f_print_except_safely_) || !defined(_di_f_print_safely_) || !defined(_di_f_print_safely_terminated_) || !defined(_di_f_print_to_dynamic_partial_safely_) || !defined(_di_f_print_to_dynamic_safely_) || !defined(_di_f_print_to_except_dynamic_partial_safely_) || !defined(_di_f_print_to_except_dynamic_safely_) || !defined(_di_f_print_to_except_in_dynamic_safely_) || !defined(_di_f_print_to_except_in_dynamic_partial_safely_) || !defined(_di_f_print_to_except_in_safely_) || !defined(_di_f_print_to_except_safely_) || !defined(_di_f_print_to_safely_)
- const f_string_static_t private_f_print_character_safely_get(const unsigned char character) {
+ const f_string_static_t private_f_print_character_safely_get(const f_char_t character) {
if (character == 0x7f) {
return f_print_sequence_delete_s;
* @see f_print_except_in_dynamic_partial_safely()
*/
#if !defined(_di_f_print_character_safely_) || !defined(_di_f_print_safely_) || !defined(_di_f_print_safely_dynamic_) || !defined(_di_f_print_safely_dynamic_partial_) || !defined(_di_f_print_safely_terminated_) || !defined(_di_f_print_except_safely_) || !defined(_di_f_print_except_dynamic_safely_) || !defined(_di_f_print_except_dynamic_partial_safely_) || !defined(_di_f_print_except_in_safely_) || !defined(_di_f_print_except_in_dynamic_safely_) || !defined(_di_f_print_except_in_dynamic_partial_safely_)
- extern f_status_t private_f_print_character_safely(const unsigned char character, FILE * const output) F_attribute_visibility_internal_d;
+ extern f_status_t private_f_print_character_safely(const f_char_t character, FILE * const output) F_attribute_visibility_internal_d;
#endif // !defined(_di_f_print_character_safely_) || !defined(_di_f_print_safely_) || !defined(_di_f_print_safely_dynamic_) || !defined(_di_f_print_safely_dynamic_partial_) || !defined(_di_f_print_safely_terminated_) || !defined(_di_f_print_except_safely_) || !defined(_di_f_print_except_dynamic_safely_) || !defined(_di_f_print_except_dynamic_partial_safely_) || !defined(_di_f_print_except_in_safely_) || !defined(_di_f_print_except_in_dynamic_safely_) || !defined(_di_f_print_except_in_dynamic_partial_safely_)
/**
* @see f_print_to_safely()
*/
#if !defined(_di_f_print_character_safely_get_) || !defined(_di_f_print_dynamic_partial_safely_) || !defined(_di_f_print_dynamic_safely_) || !defined(_di_f_print_except_dynamic_partial_safely_) || !defined(_di_f_print_except_dynamic_safely_) || !defined(_di_f_print_except_in_dynamic_safely_) || !defined(_di_f_print_except_in_dynamic_partial_safely_) || !defined(_di_f_print_except_in_safely_) || !defined(_di_f_print_except_safely_) || !defined(_di_f_print_safely_) || !defined(_di_f_print_safely_terminated_) || !defined(_di_f_print_to_dynamic_partial_safely_) || !defined(_di_f_print_to_dynamic_safely_) || !defined(_di_f_print_to_except_dynamic_partial_safely_) || !defined(_di_f_print_to_except_dynamic_safely_) || !defined(_di_f_print_to_except_in_dynamic_safely_) || !defined(_di_f_print_to_except_in_dynamic_partial_safely_) || !defined(_di_f_print_to_except_in_safely_) || !defined(_di_f_print_to_except_safely_) || !defined(_di_f_print_to_safely_)
- extern const f_string_static_t private_f_print_character_safely_get(const unsigned char character) F_attribute_visibility_internal_d;
+ extern const f_string_static_t private_f_print_character_safely_get(const f_char_t character) F_attribute_visibility_internal_d;
#endif // !defined(_di_f_print_character_safely_get_) || !defined(_di_f_print_dynamic_partial_safely_) || !defined(_di_f_print_dynamic_safely_) || !defined(_di_f_print_except_dynamic_partial_safely_) || !defined(_di_f_print_except_dynamic_safely_) || !defined(_di_f_print_except_in_dynamic_safely_) || !defined(_di_f_print_except_in_dynamic_partial_safely_) || !defined(_di_f_print_except_in_safely_) || !defined(_di_f_print_except_safely_) || !defined(_di_f_print_safely_) || !defined(_di_f_print_safely_terminated_) || !defined(_di_f_print_to_dynamic_partial_safely_) || !defined(_di_f_print_to_dynamic_safely_) || !defined(_di_f_print_to_except_dynamic_partial_safely_) || !defined(_di_f_print_to_except_dynamic_safely_) || !defined(_di_f_print_to_except_in_dynamic_safely_) || !defined(_di_f_print_to_except_in_dynamic_partial_safely_) || !defined(_di_f_print_to_except_in_safely_) || !defined(_di_f_print_to_except_safely_) || !defined(_di_f_print_to_safely_)
/**
f_status_t status = F_none;
if (serialize->used + value.used + 1 >= serialize->size) {
- macro_f_string_dynamic_t_resize(status, (*serialize), serialize->size + value.used + 1);
+ status = f_string_dynamic_resize(serialize->size + value.used + 1, serialize);
if (F_status_is_error(status)) return status;
}
if (!serialize->used) {
- memcpy(serialize->string + serialize->used, value.string, sizeof(unsigned char) * value.used);
+ memcpy(serialize->string + serialize->used, value.string, sizeof(f_char_t) * value.used);
serialize->used += value.used;
}
else {
- memcpy(serialize->string + serialize->used, f_serialize_simple_splitter_s.string, sizeof(unsigned char) * f_serialize_simple_splitter_s.used);
- memcpy(serialize->string + serialize->used + f_serialize_simple_splitter_s.used, value.string, sizeof(unsigned char) * value.used);
+ memcpy(serialize->string + serialize->used, f_serialize_simple_splitter_s.string, sizeof(f_char_t) * f_serialize_simple_splitter_s.used);
+ memcpy(serialize->string + serialize->used + f_serialize_simple_splitter_s.used, value.string, sizeof(f_char_t) * value.used);
serialize->used += value.used + 1;
}
if (total > strings->array[strings->used].size) {
macro_f_string_dynamic_t_clear(strings->array[strings->used])
- macro_f_string_dynamic_t_resize(status, strings->array[strings->used], total)
+
+ status = f_string_dynamic_resize(total, &strings->array[strings->used]);
if (F_status_is_error(status)) return status;
strings->array[strings->used].size = total;
}
- memcpy(strings->array[strings->used].string, serialize.string + start, sizeof(unsigned char) * total);
+ memcpy(strings->array[strings->used].string, serialize.string + start, sizeof(f_char_t) * total);
strings->array[strings->used].used = total;
++strings->used;
f_array_length_t total = (range.stop - range.start) + 1;
if (total >= dynamic->size) {
- f_status_t status_allocation = F_none;
-
- macro_f_string_dynamic_t_resize(status_allocation, (*dynamic), total);
+ const f_status_t status_allocation = f_string_dynamic_resize(total, dynamic);
if (F_status_is_error(status_allocation)) return status_allocation;
}
- memcpy(dynamic->string, serialize.string + range.start, sizeof(unsigned char) * total);
+ memcpy(dynamic->string, serialize.string + range.start, sizeof(f_char_t) * total);
dynamic->used = total;
return status;
/**
* Status masks.
*/
-#ifndef _di_F_status_masks_
+#ifndef _di_f_status_masks_
// f_status_t is required to be exactly 16 bits, the first two high order bits represent error and warning respectively.
#define F_status_bit_error 0x8000 // 1000 0000 0000 0000
// Maximum size of the status code.
#define F_status_size_max 0x3fff
#define F_status_size_max_with_signal 0x10000
-#endif // _di_F_status_masks_
+#endif // _di_f_status_masks_
/**
* All standard/core status codes.
* 5) F_status_code_last, this is intended to designate the last code provided by level_0 status project.
* All code sets started by another project (such as FSS status codes) must start at this number + 1 with a code start map.
*/
-#ifndef _di_F_status_codes_
+#ifndef _di_f_status_codes_
enum {
- #ifndef _di_F_status_boolean_
+ #ifndef _di_f_status_boolean_
F_false = 0,
F_true,
- #endif // _di_F_status_boolean_
+ #endif // _di_f_status_boolean_
- #ifndef _di_F_status_signal_
+ #ifndef _di_f_status_signal_
F_signal_hangup = 1,
F_signal_interrupt,
F_signal_quit,
F_signal_reserved_62,
F_signal_reserved_63,
F_signal_reserved_64,
- #endif // _di_F_status_signal_
+ #endif // _di_f_status_signal_
// Start at 197 to allow compatibility with the reserved bash return codes (keep in mind fss return codes can be larger than 255).
- #ifndef _di_F_status_basic_
+ #ifndef _di_f_status_basic_
F_none = 197,
F_abort,
F_abort_not,
F_write,
F_write_not,
F_write_only,
- #endif // _di_F_status_basic_
+ #endif // _di_f_status_basic_
- #ifndef _di_F_status_array_
+ #ifndef _di_f_status_array_
F_array,
F_array_not,
F_array_too_large,
F_array_too_small,
- #endif // _di_F_status_array_
+ #endif // _di_f_status_array_
- #ifndef _di_F_status_available_
+ #ifndef _di_f_status_available_
F_available,
F_available_not,
F_available_not_address,
F_available_not_port,
F_available_not_process,
F_available_not_socket,
- #endif // _di_F_status_available_
+ #endif // _di_f_status_available_
- #ifndef _di_F_status_busy_
+ #ifndef _di_f_status_busy_
F_busy,
F_busy_address,
F_busy_buffer,
F_busy_port,
F_busy_process,
F_busy_socket,
- #endif // _di_F_status_busy_
+ #endif // _di_f_status_busy_
- #ifndef _di_F_status_network_
+ #ifndef _di_f_status_network_
F_network,
F_network_busy,
F_network_busy_not,
F_network_server_not,
F_network_time,
F_network_time_not,
- #endif // _di_F_status_network_
+ #endif // _di_f_status_network_
- #ifndef _di_F_status_number_
+ #ifndef _di_f_status_number_
F_number,
F_number_decimal,
F_number_decimal_not,
F_number_whole_not,
F_number_zero,
F_number_zero_not,
- #endif // _di_F_status_number_
+ #endif // _di_f_status_number_
- #ifndef _di_F_status_buffer_
+ #ifndef _di_f_status_buffer_
F_buffer,
F_buffer_not,
F_buffer_overflow,
F_terminated_not_nest_eos,
F_terminated_not_nest_stop,
F_terminated_not_stop,
- #endif // _di_F_status_buffer_
+ #endif // _di_f_status_buffer_
- #ifndef _di_F_status_process_
+ #ifndef _di_f_status_process_
F_process,
F_process_not,
F_process_too_many,
- #endif // _di_F_status_process_
+ #endif // _di_f_status_process_
- #ifndef _di_F_status_file_
+ #ifndef _di_f_status_file_
F_file,
F_file_close,
F_file_closed,
F_file_utf,
F_file_utf_not,
F_file_write,
- #endif // _di_F_status_file_
+ #endif // _di_f_status_file_
- #ifndef _di_F_status_filesystem_
+ #ifndef _di_f_status_filesystem_
F_filesystem,
F_filesystem_not,
F_filesystem_quota_block,
F_filesystem_quota_reached,
- #endif // _di_F_status_filesystem_
+ #endif // _di_f_status_filesystem_
- #ifndef _di_F_status_directory_
+ #ifndef _di_f_status_directory_
F_directory,
F_directory_close,
F_directory_closed,
F_directory_utf,
F_directory_utf_not,
F_directory_write,
- #endif // _di_F_status_directory_
+ #endif // _di_f_status_directory_
- #ifndef _di_F_status_socket_
+ #ifndef _di_f_status_socket_
F_socket,
F_socket_client,
F_socket_not,
F_socket_receive,
F_socket_send,
F_socket_target,
- #endif // _di_F_status_socket_
+ #endif // _di_f_status_socket_
- #ifndef _di_F_status_compare_
+ #ifndef _di_f_status_compare_
F_equal_to,
F_equal_to_not,
F_than_greater,
F_than_less,
- #endif // _di_F_status_compare_
+ #endif // _di_f_status_compare_
- #ifndef _di_F_status_access_
+ #ifndef _di_f_status_access_
F_access,
F_access_denied,
F_access_denied_execute,
F_access_mode,
F_access_not,
F_access_owner,
- #endif // _di_F_status_access_
+ #endif // _di_f_status_access_
- #ifndef _di_F_status_terminal_
+ #ifndef _di_f_status_terminal_
F_terminal,
F_terminal_access,
F_terminal_known,
F_terminal_valid,
F_terminal_valid_not,
F_terminal_write,
- #endif // _di_F_status_terminal_
+ #endif // _di_f_status_terminal_
// Required.
F_status_code_last,
}; // enum
-#endif // _di_F_status_codes_
+#endif // _di_f_status_codes_
#ifdef __cplusplus
} // extern "C"
extern "C" {
#endif
-#ifndef _di_F_status_string_
- #ifndef _di_F_status_boolean_
+#ifndef _di_f_status_string_
+ #ifndef _di_f_status_boolean_
const f_string_static_t f_status_false_s = macro_f_string_static_t_initialize(F_status_false_s, 0, F_status_false_s_length);
const f_string_static_t f_status_true_s = macro_f_string_static_t_initialize(F_status_true_s, 0, F_status_true_s_length);
- #endif // _di_F_status_boolean_
+ #endif // _di_f_status_boolean_
- #ifndef _di_F_status_signal_
+ #ifndef _di_f_status_signal_
const f_string_static_t f_status_signal_hangup_s = macro_f_string_static_t_initialize(F_status_signal_hangup_s, 0, F_status_signal_hangup_s_length);
const f_string_static_t f_status_signal_interrupt_s = macro_f_string_static_t_initialize(F_status_signal_interrupt_s, 0, F_status_signal_interrupt_s_length);
const f_string_static_t f_status_signal_quit_s = macro_f_string_static_t_initialize(F_status_signal_quit_s, 0, F_status_signal_quit_s_length);
const f_string_static_t f_status_signal_reserved_62_s = macro_f_string_static_t_initialize(F_status_signal_reserved_62_s, 0, F_status_signal_reserved_62_s_length);
const f_string_static_t f_status_signal_reserved_63_s = macro_f_string_static_t_initialize(F_status_signal_reserved_63_s, 0, F_status_signal_reserved_63_s_length);
const f_string_static_t f_status_signal_reserved_64_s = macro_f_string_static_t_initialize(F_status_signal_reserved_64_s, 0, F_status_signal_reserved_64_s_length);
- #endif // _di_F_status_signal_
+ #endif // _di_f_status_signal_
- #ifndef _di_F_status_basic_
+ #ifndef _di_f_status_basic_
const f_string_static_t f_status_none_s = macro_f_string_static_t_initialize(F_status_none_s, 0, F_status_none_s_length);
const f_string_static_t f_status_abort_s = macro_f_string_static_t_initialize(F_status_abort_s, 0, F_status_abort_s_length);
const f_string_static_t f_status_abort_not_s = macro_f_string_static_t_initialize(F_status_abort_not_s, 0, F_status_abort_not_s_length);
const f_string_static_t f_status_write_s = macro_f_string_static_t_initialize(F_status_write_s, 0, F_status_write_s_length);
const f_string_static_t f_status_write_not_s = macro_f_string_static_t_initialize(F_status_write_not_s, 0, F_status_write_not_s_length);
const f_string_static_t f_status_write_only_s = macro_f_string_static_t_initialize(F_status_write_only_s, 0, F_status_write_only_s_length);
- #endif // _di_F_status_basic_
+ #endif // _di_f_status_basic_
- #ifndef _di_F_status_array_
+ #ifndef _di_f_status_array_
const f_string_static_t f_status_array_s = macro_f_string_static_t_initialize(F_status_array_s, 0, F_status_array_s_length);
const f_string_static_t f_status_array_not_s = macro_f_string_static_t_initialize(F_status_array_not_s, 0, F_status_array_not_s_length);
const f_string_static_t f_status_array_too_large_s = macro_f_string_static_t_initialize(F_status_array_too_large_s, 0, F_status_array_too_large_s_length);
const f_string_static_t f_status_array_too_small_s = macro_f_string_static_t_initialize(F_status_array_too_small_s, 0, F_status_array_too_small_s_length);
- #endif // _di_F_status_array_
+ #endif // _di_f_status_array_
- #ifndef _di_F_status_available_
+ #ifndef _di_f_status_available_
const f_string_static_t f_status_available_s = macro_f_string_static_t_initialize(F_status_available_s, 0, F_status_available_s_length);
const f_string_static_t f_status_available_not_s = macro_f_string_static_t_initialize(F_status_available_not_s, 0, F_status_available_not_s_length);
const f_string_static_t f_status_available_not_address_s = macro_f_string_static_t_initialize(F_status_available_not_address_s, 0, F_status_available_not_address_s_length);
const f_string_static_t f_status_available_not_port_s = macro_f_string_static_t_initialize(F_status_available_not_port_s, 0, F_status_available_not_port_s_length);
const f_string_static_t f_status_available_not_process_s = macro_f_string_static_t_initialize(F_status_available_not_process_s, 0, F_status_available_not_process_s_length);
const f_string_static_t f_status_available_not_socket_s = macro_f_string_static_t_initialize(F_status_available_not_socket_s, 0, F_status_available_not_socket_s_length);
- #endif // _di_F_status_available_
+ #endif // _di_f_status_available_
- #ifndef _di_F_status_busy_
+ #ifndef _di_f_status_busy_
const f_string_static_t f_status_busy_s = macro_f_string_static_t_initialize(F_status_busy_s, 0, F_status_busy_s_length);
const f_string_static_t f_status_busy_address_s = macro_f_string_static_t_initialize(F_status_busy_address_s, 0, F_status_busy_address_s_length);
const f_string_static_t f_status_busy_buffer_s = macro_f_string_static_t_initialize(F_status_busy_buffer_s, 0, F_status_busy_buffer_s_length);
const f_string_static_t f_status_busy_port_s = macro_f_string_static_t_initialize(F_status_busy_port_s, 0, F_status_busy_port_s_length);
const f_string_static_t f_status_busy_process_s = macro_f_string_static_t_initialize(F_status_busy_process_s, 0, F_status_busy_process_s_length);
const f_string_static_t f_status_busy_socket_s = macro_f_string_static_t_initialize(F_status_busy_socket_s, 0, F_status_busy_socket_s_length);
- #endif // _di_F_status_busy_
+ #endif // _di_f_status_busy_
- #ifndef _di_F_status_network_
+ #ifndef _di_f_status_network_
const f_string_static_t f_status_network_s = macro_f_string_static_t_initialize(F_status_network_s, 0, F_status_network_s_length);
const f_string_static_t f_status_network_busy_s = macro_f_string_static_t_initialize(F_status_network_busy_s, 0, F_status_network_busy_s_length);
const f_string_static_t f_status_network_busy_not_s = macro_f_string_static_t_initialize(F_status_network_busy_not_s, 0, F_status_network_busy_not_s_length);
const f_string_static_t f_status_network_server_not_s = macro_f_string_static_t_initialize(F_status_network_server_not_s, 0, F_status_network_server_not_s_length);
const f_string_static_t f_status_network_time_s = macro_f_string_static_t_initialize(F_status_network_time_s, 0, F_status_network_time_s_length);
const f_string_static_t f_status_network_time_not_s = macro_f_string_static_t_initialize(F_status_network_time_not_s, 0, F_status_network_time_not_s_length);
- #endif // _di_F_status_network_
+ #endif // _di_f_status_network_
- #ifndef _di_F_status_number_
+ #ifndef _di_f_status_number_
const f_string_static_t f_status_number_s = macro_f_string_static_t_initialize(F_status_number_s, 0, F_status_number_s_length);
const f_string_static_t f_status_number_decimal_s = macro_f_string_static_t_initialize(F_status_number_decimal_s, 0, F_status_number_decimal_s_length);
const f_string_static_t f_status_number_decimal_not_s = macro_f_string_static_t_initialize(F_status_number_decimal_not_s, 0, F_status_number_decimal_not_s_length);
const f_string_static_t f_status_number_whole_not_s = macro_f_string_static_t_initialize(F_status_number_whole_not_s, 0, F_status_number_whole_not_s_length);
const f_string_static_t f_status_number_zero_s = macro_f_string_static_t_initialize(F_status_number_zero_s, 0, F_status_number_zero_s_length);
const f_string_static_t f_status_number_zero_not_s = macro_f_string_static_t_initialize(F_status_number_zero_not_s, 0, F_status_number_zero_not_s_length);
- #endif // _di_F_status_number_
+ #endif // _di_f_status_number_
- #ifndef _di_F_status_buffer_
+ #ifndef _di_f_status_buffer_
const f_string_static_t f_status_buffer_s = macro_f_string_static_t_initialize(F_status_buffer_s, 0, F_status_buffer_s_length);
const f_string_static_t f_status_buffer_not_s = macro_f_string_static_t_initialize(F_status_buffer_not_s, 0, F_status_buffer_not_s_length);
const f_string_static_t f_status_buffer_overflow_s = macro_f_string_static_t_initialize(F_status_buffer_overflow_s, 0, F_status_buffer_overflow_s_length);
const f_string_static_t f_status_terminated_not_nest_eol_s = macro_f_string_static_t_initialize(F_status_terminated_not_nest_eol_s, 0, F_status_terminated_not_nest_eol_s_length);
const f_string_static_t f_status_terminated_not_nest_eos_s = macro_f_string_static_t_initialize(F_status_terminated_not_nest_eos_s, 0, F_status_terminated_not_nest_eos_s_length);
const f_string_static_t f_status_terminated_not_nest_stop_s = macro_f_string_static_t_initialize(F_status_terminated_not_nest_stop_s, 0, F_status_terminated_not_nest_stop_s_length);
- #endif // _di_F_status_buffer_
+ #endif // _di_f_status_buffer_
- #ifndef _di_F_status_process_
+ #ifndef _di_f_status_process_
const f_string_static_t f_status_process_s = macro_f_string_static_t_initialize(F_status_process_s, 0, F_status_process_s_length);
const f_string_static_t f_status_process_not_s = macro_f_string_static_t_initialize(F_status_process_not_s, 0, F_status_process_not_s_length);
const f_string_static_t f_status_process_too_many_s = macro_f_string_static_t_initialize(F_status_process_too_many_s, 0, F_status_process_too_many_s_length);
- #endif // _di_F_status_process_
+ #endif // _di_f_status_process_
- #ifndef _di_F_status_file_
+ #ifndef _di_f_status_file_
const f_string_static_t f_status_file_s = macro_f_string_static_t_initialize(F_status_file_s, 0, F_status_file_s_length);
const f_string_static_t f_status_file_close_s = macro_f_string_static_t_initialize(F_status_file_close_s, 0, F_status_file_close_s_length);
const f_string_static_t f_status_file_closed_s = macro_f_string_static_t_initialize(F_status_file_closed_s, 0, F_status_file_closed_s_length);
const f_string_static_t f_status_file_utf_s = macro_f_string_static_t_initialize(F_status_file_utf_s, 0, F_status_file_utf_s_length);
const f_string_static_t f_status_file_utf_not_s = macro_f_string_static_t_initialize(F_status_file_utf_not_s, 0, F_status_file_utf_not_s_length);
const f_string_static_t f_status_file_write_s = macro_f_string_static_t_initialize(F_status_file_write_s, 0, F_status_file_write_s_length);
- #endif // _di_F_status_file_
+ #endif // _di_f_status_file_
- #ifndef _di_F_status_filesystem_
+ #ifndef _di_f_status_filesystem_
const f_string_static_t f_status_filesystem_s = macro_f_string_static_t_initialize(F_status_filesystem_s, 0, F_status_filesystem_s_length);
const f_string_static_t f_status_filesystem_not_s = macro_f_string_static_t_initialize(F_status_filesystem_not_s, 0, F_status_filesystem_not_s_length);
const f_string_static_t f_status_filesystem_quota_block_s = macro_f_string_static_t_initialize(F_status_filesystem_quota_block_s, 0, F_status_filesystem_quota_block_s_length);
const f_string_static_t f_status_filesystem_quota_reached_s = macro_f_string_static_t_initialize(F_status_filesystem_quota_reached_s, 0, F_status_filesystem_quota_reached_s_length);
- #endif // _di_F_status_filesystem_
+ #endif // _di_f_status_filesystem_
- #ifndef _di_F_status_directory_
+ #ifndef _di_f_status_directory_
const f_string_static_t f_status_directory_s = macro_f_string_static_t_initialize(F_status_directory_s, 0, F_status_directory_s_length);
const f_string_static_t f_status_directory_close_s = macro_f_string_static_t_initialize(F_status_directory_close_s, 0, F_status_directory_close_s_length);
const f_string_static_t f_status_directory_closed_s = macro_f_string_static_t_initialize(F_status_directory_closed_s, 0, F_status_directory_closed_s_length);
const f_string_static_t f_status_directory_utf_s = macro_f_string_static_t_initialize(F_status_directory_utf_s, 0, F_status_directory_utf_s_length);
const f_string_static_t f_status_directory_utf_not_s = macro_f_string_static_t_initialize(F_status_directory_utf_not_s, 0, F_status_directory_utf_not_s_length);
const f_string_static_t f_status_directory_write_s = macro_f_string_static_t_initialize(F_status_directory_write_s, 0, F_status_directory_write_s_length);
- #endif // _di_F_status_directory_
+ #endif // _di_f_status_directory_
- #ifndef _di_F_status_socket_
+ #ifndef _di_f_status_socket_
const f_string_static_t f_status_socket_s = macro_f_string_static_t_initialize(F_status_socket_s, 0, F_status_socket_s_length);
const f_string_static_t f_status_socket_client_s = macro_f_string_static_t_initialize(F_status_socket_client_s, 0, F_status_socket_client_s_length);
const f_string_static_t f_status_socket_not_s = macro_f_string_static_t_initialize(F_status_socket_not_s, 0, F_status_socket_not_s_length);
const f_string_static_t f_status_socket_receive_s = macro_f_string_static_t_initialize(F_status_socket_receive_s, 0, F_status_socket_receive_s_length);
const f_string_static_t f_status_socket_send_s = macro_f_string_static_t_initialize(F_status_socket_send_s, 0, F_status_socket_send_s_length);
const f_string_static_t f_status_socket_target_s = macro_f_string_static_t_initialize(F_status_socket_target_s, 0, F_status_socket_target_s_length);
- #endif // _di_F_status_socket_
+ #endif // _di_f_status_socket_
- #ifndef _di_F_status_compare_
+ #ifndef _di_f_status_compare_
const f_string_static_t f_status_equal_to_s = macro_f_string_static_t_initialize(F_status_equal_to_s, 0, F_status_equal_to_s_length);
const f_string_static_t f_status_equal_to_not_s = macro_f_string_static_t_initialize(F_status_equal_to_not_s, 0, F_status_equal_to_not_s_length);
const f_string_static_t f_status_than_greater_s = macro_f_string_static_t_initialize(F_status_than_greater_s, 0, F_status_than_greater_s_length);
const f_string_static_t f_status_than_less_s = macro_f_string_static_t_initialize(F_status_than_less_s, 0, F_status_than_less_s_length);
- #endif // _di_F_status_compare_
+ #endif // _di_f_status_compare_
- #ifndef _di_F_status_access_
+ #ifndef _di_f_status_access_
const f_string_static_t f_status_access_s = macro_f_string_static_t_initialize(F_status_access_s, 0, F_status_access_s_length);
const f_string_static_t f_status_access_denied_s = macro_f_string_static_t_initialize(F_status_access_denied_s, 0, F_status_access_denied_s_length);
const f_string_static_t f_status_access_denied_user_s = macro_f_string_static_t_initialize(F_status_access_denied_user_s, 0, F_status_access_denied_user_s_length);
const f_string_static_t f_status_access_mode_s = macro_f_string_static_t_initialize(F_status_access_mode_s, 0, F_status_access_mode_s_length);
const f_string_static_t f_status_access_not_s = macro_f_string_static_t_initialize(F_status_access_not_s, 0, F_status_access_not_s_length);
const f_string_static_t f_status_access_owner_s = macro_f_string_static_t_initialize(F_status_access_owner_s, 0, F_status_access_owner_s_length);
- #endif // _di_F_status_access_
+ #endif // _di_f_status_access_
- #ifndef _di_F_status_terminal_
+ #ifndef _di_f_status_terminal_
const f_string_static_t f_status_terminal_s = macro_f_string_static_t_initialize(F_status_terminal_s, 0, F_status_terminal_s_length);
const f_string_static_t f_status_terminal_access_s = macro_f_string_static_t_initialize(F_status_terminal_access_s, 0, F_status_terminal_access_s_length);
const f_string_static_t f_status_terminal_known_s = macro_f_string_static_t_initialize(F_status_terminal_known_s, 0, F_status_terminal_known_s_length);
const f_string_static_t f_status_terminal_valid_s = macro_f_string_static_t_initialize(F_status_terminal_valid_s, 0, F_status_terminal_valid_s_length);
const f_string_static_t f_status_terminal_valid_not_s = macro_f_string_static_t_initialize(F_status_terminal_valid_not_s, 0, F_status_terminal_valid_not_s_length);
const f_string_static_t f_status_terminal_write_s = macro_f_string_static_t_initialize(F_status_terminal_write_s, 0, F_status_terminal_write_s_length);
- #endif // _di_F_status_terminal_
+ #endif // _di_f_status_terminal_
const f_string_static_t f_status_status_code_last_s = macro_f_string_static_t_initialize(F_status_status_code_last_s, 0, F_status_status_code_last_s_length);
-#endif // _di_F_status_string_
+#endif // _di_f_status_string_
#ifndef _di_f_status_string_to_
f_status_t f_status_string_to(const f_status_t code, f_string_static_t * const name) {
f_status_t unmasked_code = F_status_set_fine(code);
switch (unmasked_code) {
- #ifndef _di_F_status_boolean_
+ #ifndef _di_f_status_boolean_
case F_false:
*name = f_status_false_s;
break;
case F_true:
*name = f_status_true_s;
break;
- #endif // _di_F_status_boolean_
+ #endif // _di_f_status_boolean_
- #ifndef _di_F_status_signal_
+ #ifndef _di_f_status_signal_
// F_signal_hangup is not used because it has the same code as F_true.
case F_signal_interrupt:
case F_signal_reserved_64:
*name = f_status_signal_reserved_64_s;
break;
- #endif // _di_F_status_signal_
+ #endif // _di_f_status_signal_
- #ifndef _di_F_status_basic_
+ #ifndef _di_f_status_basic_
case F_none:
*name = f_status_none_s;
break;
case F_write_only:
*name = f_status_write_only_s;
break;
- #endif // _di_F_status_basic_
+ #endif // _di_f_status_basic_
- #ifndef _di_F_status_array_
+ #ifndef _di_f_status_array_
case F_array:
*name = f_status_array_s;
break;
case F_array_too_small:
*name = f_status_array_too_small_s;
break;
- #endif // _di_F_status_array_
+ #endif // _di_f_status_array_
- #ifndef _di_F_status_available_
+ #ifndef _di_f_status_available_
case F_available:
*name = f_status_available_s;
break;
case F_available_not_socket:
*name = f_status_available_not_socket_s;
break;
- #endif // _di_F_status_available_
+ #endif // _di_f_status_available_
- #ifndef _di_F_status_busy_
+ #ifndef _di_f_status_busy_
case F_busy:
*name = f_status_busy_s;
break;
case F_busy_socket:
*name = f_status_busy_socket_s;
break;
- #endif // _di_F_status_busy_
+ #endif // _di_f_status_busy_
- #ifndef _di_F_status_network_
+ #ifndef _di_f_status_network_
case F_network:
*name = f_status_network_s;
break;
case F_network_time_not:
*name = f_status_network_time_not_s;
break;
- #endif // _di_F_status_network_
+ #endif // _di_f_status_network_
- #ifndef _di_F_status_number_
+ #ifndef _di_f_status_number_
case F_number:
*name = f_status_number_s;
break;
case F_number_zero_not:
*name = f_status_number_zero_not_s;
break;
- #endif // _di_F_status_number_
+ #endif // _di_f_status_number_
- #ifndef _di_F_status_buffers_
+ #ifndef _di_f_status_buffers_
case F_buffer:
*name = f_status_buffer_s;
break;
case F_terminated_not_stop:
*name = f_status_terminated_not_stop_s;
break;
- #endif // _di_F_status_buffers_
+ #endif // _di_f_status_buffers_
- #ifndef _di_F_status_process_
+ #ifndef _di_f_status_process_
case F_process:
*name = f_status_process_s;
break;
case F_process_too_many:
*name = f_status_process_too_many_s;
break;
- #endif // _di_F_status_process_
+ #endif // _di_f_status_process_
- #ifndef _di_F_status_file_
+ #ifndef _di_f_status_file_
case F_file:
*name = f_status_file_s;
break;
case F_file_write:
*name = f_status_file_write_s;
break;
- #endif // _di_F_status_file_
+ #endif // _di_f_status_file_
- #ifndef _di_F_status_filesystem_
+ #ifndef _di_f_status_filesystem_
case F_filesystem:
*name = f_status_filesystem_s;
break;
case F_filesystem_quota_reached:
*name = f_status_filesystem_quota_reached_s;
break;
- #endif // _di_F_status_filesystem_
+ #endif // _di_f_status_filesystem_
- #ifndef _di_F_status_directory_
+ #ifndef _di_f_status_directory_
case F_directory:
*name = f_status_directory_s;
break;
case F_directory_write:
*name = f_status_directory_utf_not_s;
break;
- #endif // _di_F_status_directory_
+ #endif // _di_f_status_directory_
- #ifndef _di_F_status_socket_
+ #ifndef _di_f_status_socket_
case F_socket:
*name = f_status_socket_s;
break;
case F_socket_target:
*name = f_status_socket_target_s;
break;
- #endif // _di_F_status_socket_
+ #endif // _di_f_status_socket_
- #ifndef _di_F_error_compare_
+ #ifndef _di_f_error_compare_
case F_equal_to:
*name = f_status_equal_to_s;
break;
case F_than_less:
*name = f_status_than_less_s;
break;
- #endif // _di_F_status_compare_
+ #endif // _di_f_status_compare_
- #ifndef _di_F_status_access_
+ #ifndef _di_f_status_access_
case F_access:
*name = f_status_access_s;
break;
case F_access_owner:
*name = f_status_access_owner_s;
break;
- #endif // _di_F_status_access_
+ #endif // _di_f_status_access_
- #ifndef _di_F_status_terminal_
+ #ifndef _di_f_status_terminal_
case F_terminal:
*name = f_status_terminal_s;
break;
case F_terminal_write:
*name = f_status_terminal_write_s;
break;
- #endif // _di_F_status_terminal_
+ #endif // _di_f_status_terminal_
case F_status_code_last:
*name = f_status_status_code_last_s;
extern "C" {
#endif
-#ifndef _di_F_status_string_
- #ifndef _di_F_status_boolean_
+#ifndef _di_f_status_string_
+ #ifndef _di_f_status_boolean_
#define F_status_false_s "F_false"
#define F_status_true_s "F_true"
extern const f_string_static_t f_status_false_s;
extern const f_string_static_t f_status_true_s;
- #endif // _di_F_status_boolean_
+ #endif // _di_f_status_boolean_
- #ifndef _di_F_status_signal_
+ #ifndef _di_f_status_signal_
#define F_status_signal_hangup_s "F_signal_hangup"
#define F_status_signal_interrupt_s "F_signal_interrupt"
#define F_status_signal_quit_s "F_signal_quit"
extern const f_string_static_t f_status_signal_reserved_62_s;
extern const f_string_static_t f_status_signal_reserved_63_s;
extern const f_string_static_t f_status_signal_reserved_64_s;
- #endif // _di_F_status_signal_
+ #endif // _di_f_status_signal_
- #ifndef _di_F_status_basic_
+ #ifndef _di_f_status_basic_
#define F_status_none_s "F_none"
#define F_status_abort_s "F_abort"
#define F_status_abort_not_s "F_abort_not"
extern const f_string_static_t f_status_write_s;
extern const f_string_static_t f_status_write_not_s;
extern const f_string_static_t f_status_write_only_s;
- #endif // _di_F_status_basic_
+ #endif // _di_f_status_basic_
- #ifndef _di_F_status_array_
+ #ifndef _di_f_status_array_
#define F_status_array_s "F_array"
#define F_status_array_not_s "F_array_not"
#define F_status_array_too_large_s "F_array_too_large"
extern const f_string_static_t f_status_array_not_s;
extern const f_string_static_t f_status_array_too_large_s;
extern const f_string_static_t f_status_array_too_small_s;
- #endif // _di_F_status_array_
+ #endif // _di_f_status_array_
- #ifndef _di_F_status_available_
+ #ifndef _di_f_status_available_
#define F_status_available_s "F_available"
#define F_status_available_not_s "F_available_not"
#define F_status_available_not_address_s "F_available_not_address"
extern const f_string_static_t f_status_available_not_port_s;
extern const f_string_static_t f_status_available_not_process_s;
extern const f_string_static_t f_status_available_not_socket_s;
- #endif // _di_F_status_available_
+ #endif // _di_f_status_available_
- #ifndef _di_F_status_busy_
+ #ifndef _di_f_status_busy_
#define F_status_busy_s "F_busy"
#define F_status_busy_address_s "F_busy_address"
#define F_status_busy_buffer_s "F_busy_buffer"
extern const f_string_static_t f_status_busy_port_s;
extern const f_string_static_t f_status_busy_process_s;
extern const f_string_static_t f_status_busy_socket_s;
- #endif // _di_F_status_busy_
+ #endif // _di_f_status_busy_
- #ifndef _di_F_status_network_
+ #ifndef _di_f_status_network_
#define F_status_network_s "F_network"
#define F_status_network_busy_s "F_network_busy"
#define F_status_network_busy_not_s "F_network_busy_not"
extern const f_string_static_t f_status_network_server_not_s;
extern const f_string_static_t f_status_network_time_s;
extern const f_string_static_t f_status_network_time_not_s;
- #endif // _di_F_status_network_
+ #endif // _di_f_status_network_
- #ifndef _di_F_status_number_
+ #ifndef _di_f_status_number_
#define F_status_number_s "F_number"
#define F_status_number_decimal_s "F_number_decimal"
#define F_status_number_decimal_not_s "F_number_decimal_not"
extern const f_string_static_t f_status_number_whole_not_s;
extern const f_string_static_t f_status_number_zero_s;
extern const f_string_static_t f_status_number_zero_not_s;
- #endif // _di_F_status_number_
+ #endif // _di_f_status_number_
- #ifndef _di_F_status_buffer_
+ #ifndef _di_f_status_buffer_
#define F_status_buffer_s "F_buffer"
#define F_status_buffer_not_s "F_buffer_not"
#define F_status_buffer_overflow_s "F_buffer_overflow"
extern const f_string_static_t f_status_terminated_not_nest_eol_s;
extern const f_string_static_t f_status_terminated_not_nest_eos_s;
extern const f_string_static_t f_status_terminated_not_nest_stop_s;
- #endif // _di_F_status_buffer_
+ #endif // _di_f_status_buffer_
- #ifndef _di_F_status_process_
+ #ifndef _di_f_status_process_
#define F_status_process_s "F_process"
#define F_status_process_not_s "F_process_not"
#define F_status_process_too_many_s "F_process_too_many"
extern const f_string_static_t f_status_process_s;
extern const f_string_static_t f_status_process_not_s;
extern const f_string_static_t f_status_process_too_many_s;
- #endif // _di_F_status_process_
+ #endif // _di_f_status_process_
- #ifndef _di_F_status_file_
+ #ifndef _di_f_status_file_
#define F_status_file_s "F_file"
#define F_status_file_close_s "F_file_close"
#define F_status_file_closed_s "F_file_closed"
extern const f_string_static_t f_status_file_utf_s;
extern const f_string_static_t f_status_file_utf_not_s;
extern const f_string_static_t f_status_file_write_s;
- #endif // _di_F_status_file_
+ #endif // _di_f_status_file_
- #ifndef _di_F_status_filesystem_
+ #ifndef _di_f_status_filesystem_
#define F_status_filesystem_s "F_filesystem"
#define F_status_filesystem_not_s "F_filesystem_not"
#define F_status_filesystem_quota_block_s "F_filesystem_quota_block"
extern const f_string_static_t f_status_filesystem_not_s;
extern const f_string_static_t f_status_filesystem_quota_block_s;
extern const f_string_static_t f_status_filesystem_quota_reached_s;
- #endif // _di_F_status_filesystem_
+ #endif // _di_f_status_filesystem_
- #ifndef _di_F_status_directory_
+ #ifndef _di_f_status_directory_
#define F_status_directory_s "F_directory"
#define F_status_directory_close_s "F_directory_close"
#define F_status_directory_closed_s "F_directory_closed"
extern const f_string_static_t f_status_directory_utf_s;
extern const f_string_static_t f_status_directory_utf_not_s;
extern const f_string_static_t f_status_directory_write_s;
- #endif // _di_F_status_directory_
+ #endif // _di_f_status_directory_
- #ifndef _di_F_status_socket_
+ #ifndef _di_f_status_socket_
#define F_status_socket_s "F_socket"
#define F_status_socket_client_s "F_socket_client"
#define F_status_socket_not_s "F_socket_not"
extern const f_string_static_t f_status_socket_receive_s;
extern const f_string_static_t f_status_socket_send_s;
extern const f_string_static_t f_status_socket_target_s;
- #endif // _di_F_status_socket_
+ #endif // _di_f_status_socket_
- #ifndef _di_F_status_compare_
+ #ifndef _di_f_status_compare_
#define F_status_equal_to_s "F_equal_to"
#define F_status_equal_to_not_s "F_equal_to_not"
#define F_status_than_greater_s "F_than_greater"
extern const f_string_static_t f_status_equal_to_not_s;
extern const f_string_static_t f_status_than_greater_s;
extern const f_string_static_t f_status_than_less_s;
- #endif // _di_F_status_compare_
+ #endif // _di_f_status_compare_
- #ifndef _di_F_status_access_
+ #ifndef _di_f_status_access_
#define F_status_access_s "F_access"
#define F_status_access_denied_s "F_access_denied"
#define F_status_access_denied_user_s "F_access_denied_user"
extern const f_string_static_t f_status_access_mode_s;
extern const f_string_static_t f_status_access_not_s;
extern const f_string_static_t f_status_access_owner_s;
- #endif // _di_F_status_access_
+ #endif // _di_f_status_access_
- #ifndef _di_F_status_terminal_
+ #ifndef _di_f_status_terminal_
#define F_status_terminal_s "F_terminal"
#define F_status_terminal_access_s "F_terminal_access"
#define F_status_terminal_known_s "F_terminal_known"
extern const f_string_static_t f_status_terminal_valid_s;
extern const f_string_static_t f_status_terminal_valid_not_s;
extern const f_string_static_t f_status_terminal_write_s;
- #endif // _di_F_status_terminal_
+ #endif // _di_f_status_terminal_
#define F_status_status_code_last_s "F_status_code_last"
#define F_status_status_code_last_s_length 18
extern const f_string_static_t f_status_status_code_last_s;
-#endif // _di_F_status_string_
+#endif // _di_f_status_string_
/**
* Convert status codes to their string representation.
if (F_status_is_error(status)) return status;
}
- memcpy(destination->string + destination->used, source, sizeof(unsigned char) * length);
+ memcpy(destination->string + destination->used, source, sizeof(f_char_t) * length);
destination->used += length;
destination->string[destination->used] = 0;
if (i && i > first) {
size = i - first;
- memcpy(destination->string + destination->used, source + first, sizeof(unsigned char) * size);
+ memcpy(destination->string + destination->used, source + first, sizeof(f_char_t) * size);
destination->used += size;
}
if (i > first) {
size = i - first;
- memcpy(destination->string + destination->used, source + first, sizeof(unsigned char) * size);
+ memcpy(destination->string + destination->used, source + first, sizeof(f_char_t) * size);
destination->used += size;
}
#if !defined(_di_f_string_dynamic_adjust_) || !defined(_di_f_string_dynamic_decimate_by_) || !defined(_di_f_string_dynamics_adjust_) || !defined(_di_f_string_dynamics_append_) || !defined(_di_f_string_dynamics_decimate_by_) || !defined(_di_f_string_map_multis_adjust_) || !defined(_di_f_string_map_multis_append_) || !defined(_di_f_string_triples_adjust_) || !defined(_di_f_string_triples_decimate_by_)
f_status_t private_f_string_dynamic_adjust(const f_array_length_t length, f_string_dynamic_t * const dynamic) {
- f_status_t status = f_memory_adjust(dynamic->size, length, sizeof(unsigned char), (void **) & dynamic->string);
+ f_status_t status = f_memory_adjust(dynamic->size, length, sizeof(f_char_t), (void **) & dynamic->string);
if (F_status_is_error_not(status)) {
dynamic->size = length;
#if !defined(_di_f_string_append_) || !defined(_di_f_string_append_assure_) || !defined(_di_f_string_append_mash_) || !defined(_di_f_string_append_nulless_) || !defined(_di_f_string_dynamic_append_) || !defined(_di_f_string_dynamic_append_assure_) || !defined(_di_f_string_dynamic_append_nulless_) || !defined(_di_f_string_dynamic_decrease_by_) || !defined(_di_f_string_dynamic_increase_) || !defined(_di_f_string_dynamic_increase_by_) || !defined(_di_f_string_dynamic_mash_) || !defined(_di_f_string_dynamic_mash_nulless_) || !defined(f_string_dynamic_partial_append) || !defined(_di_f_string_dynamic_partial_append_assure_) || !defined(_di_f_string_dynamic_partial_mash_) || !defined(_di_f_string_dynamic_prepend_) || !defined(_di_f_string_dynamic_prepend_nulless_) || !defined(_di_f_string_dynamic_terminate_) || !defined(_di_f_string_dynamic_terminate_after_) || !defined(_di_f_string_dynamics_append_) || !defined(_di_f_string_map_multis_append_) || !defined(_di_f_string_mash_nulless_) || !defined(_di_f_string_mash_) || !defined(_di_f_string_maps_append_) || !defined(_di_f_string_prepend_) || !defined(_di_f_string_prepend_nulless_) || !defined(_di_f_string_triples_append_)
f_status_t private_f_string_dynamic_resize(const f_array_length_t length, f_string_dynamic_t * const dynamic) {
- const f_status_t status = f_memory_resize(dynamic->size, length, sizeof(unsigned char), (void **) & dynamic->string);
+ const f_status_t status = f_memory_resize(dynamic->size, length, sizeof(f_char_t), (void **) & dynamic->string);
if (F_status_is_error_not(status)) {
dynamic->size = length;
if (destination->used) {
memmove(destination->string + length, destination->string, destination->used);
- memcpy(destination->string, source, sizeof(unsigned char) * length);
+ memcpy(destination->string, source, sizeof(f_char_t) * length);
}
else {
- memcpy(destination->string, source, sizeof(unsigned char) * length);
+ memcpy(destination->string, source, sizeof(f_char_t) * length);
}
destination->used += length;
}
memmove(destination->string + offset + size, destination->string + offset, destination->used - offset);
- memcpy(destination->string + offset, source + first, sizeof(unsigned char) * size);
+ memcpy(destination->string + offset, source + first, sizeof(f_char_t) * size);
destination->used += size;
offset += size;
* therefore this gets defined here.
*/
#ifdef _en_BUG_strnlen_
- extern size_t strnlen(const unsigned char * const string, size_t max_length);
+ extern size_t strnlen(const char * const string, size_t max_length);
#endif // _en_BUG_strnlen_
/**
+ * Define the basic character type.
+ */
+#ifndef _di_f_char_t_
+ typedef char f_char_t;
+
+ #define f_char_t_initialize 0
+
+ #define macro_f_char_t_initialize(character) character
+
+ #define macro_f_char_t_clear(character) character = 0;
+#endif // _di_f_char_t_
+
+/**
* Define the basic string type.
*
* Dynamic allocation macros are provided, but it is recommended to utilize the f_string_dynamic_t for dynamic allocation.
*
* The ideal length for a string is F_array_length_t_size_d, which generally defaults to 2^64 (unsigned).
* However, the libc/POSIX appears to limit this to 2^63 (signed).
+ *
* F_string_t_size_d is provided to help safely navigate this.
+ * sizeof(f_char_t) is provided to get the size of an individual character within the string and not the string itself (aka, not the character pointer).
*/
#ifndef _di_f_string_t_
- typedef unsigned char *f_string_t;
+ typedef f_char_t *f_string_t;
#define f_string_t_initialize 0
* When "f_string_constant_t * xxx" is passed to a function, then "xxx" can be changed.
*/
#ifndef _di_f_string_constant_t_
- typedef const unsigned char *f_string_constant_t;
+ typedef const f_char_t *f_string_constant_t;
#define f_string_constant_t_initialize 0
#endif // _di_f_string_dynamic_seek_line_
#ifndef _di_f_string_dynamic_seek_line_to_
- f_status_t f_string_dynamic_seek_line_to(const f_string_static_t buffer, const unsigned char seek_to_this, f_string_range_t * const range) {
+ f_status_t f_string_dynamic_seek_line_to(const f_string_static_t buffer, const f_char_t seek_to_this, f_string_range_t * const range) {
#ifndef _di_level_0_parameter_checking_
if (!range) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_string_dynamic_seek_line_to_
#ifndef _di_f_string_dynamic_seek_to_
- f_status_t f_string_dynamic_seek_to(const f_string_static_t buffer, const unsigned char seek_to_this, f_string_range_t * const range) {
+ f_status_t f_string_dynamic_seek_to(const f_string_static_t buffer, const f_char_t seek_to_this, f_string_range_t * const range) {
#ifndef _di_level_0_parameter_checking_
if (!range) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
* Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_string_dynamic_seek_line_to_
- extern f_status_t f_string_dynamic_seek_line_to(const f_string_static_t buffer, const unsigned char seek_to_this, f_string_range_t * const range);
+ extern f_status_t f_string_dynamic_seek_line_to(const f_string_static_t buffer, const f_char_t seek_to_this, f_string_range_t * const range);
#endif // _di_f_string_dynamic_seek_line_to_
/**
* Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_string_dynamic_seek_to_
- extern f_status_t f_string_dynamic_seek_to(const f_string_static_t buffer, const unsigned char seek_to_this, f_string_range_t * const range);
+ extern f_status_t f_string_dynamic_seek_to(const f_string_static_t buffer, const f_char_t seek_to_this, f_string_range_t * const range);
#endif // _di_f_string_dynamic_seek_to_
/**
*
* The f_string_static_t type should never be directly allocated or deallocated.
*
- * A special macro_f_string_static_t_initialize2() is provided for the special purpose of easily initialize a static string with an identical used and size.
* A special macro_f_string_static_t_initialize() is provided for the special purpose of easily initialize a static string.
+ * A special macro_f_string_static_t_initialize2() is provided for the special purpose of easily initialize a static string with an identical used and size.
*
* string: The string.
* size: Total amount of space available.
*/
#ifndef _di_f_fll_id_t_
typedef struct {
- unsigned char name[64];
+ char name[64];
uint16_t type;
uint8_t used;
return F_status_set_error(F_failure);
}
- memcpy(*character, &utf, sizeof(unsigned char) * macro_f_utf_character_t_width_is(utf_character));
+ memcpy(*character, &utf, sizeof(f_char_t) * macro_f_utf_character_t_width_is(utf_character));
#else
- memcpy(*character, &utf_character, sizeof(unsigned char) * macro_f_utf_character_t_width_is(utf_character));
+ memcpy(*character, &utf_character, sizeof(f_char_t) * macro_f_utf_character_t_width_is(utf_character));
#endif // __BYTE_ORDER == __LITTLE_ENDIAN
return F_none;
#if __BYTE_ORDER == __LITTLE_ENDIAN
uint32_t utf = macro_f_utf_character_t_to_char_1(utf_character) << 24;
- memcpy(*character, &utf, sizeof(unsigned char));
+ memcpy(*character, &utf, sizeof(f_char_t));
#else
- memcpy(*character, &utf_character, sizeof(unsigned char));
+ memcpy(*character, &utf_character, sizeof(f_char_t));
#endif // __BYTE_ORDER == __LITTLE_ENDIAN
return F_none;
#endif // _di_f_utf_string_dynamic_seek_line_
#ifndef _di_f_utf_string_dynamic_seek_line_to_
- f_status_t f_utf_string_dynamic_seek_line_to(const f_utf_string_static_t buffer, const unsigned char seek_to_this, f_string_range_t *range) {
+ f_status_t f_utf_string_dynamic_seek_line_to(const f_utf_string_static_t buffer, const f_char_t seek_to_this, f_string_range_t *range) {
#ifndef _di_level_0_parameter_checking_
if (!range) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_utf_string_dynamic_seek_line_to_
#ifndef _di_f_utf_string_dynamic_seek_to_
- f_status_t f_utf_string_dynamic_seek_to(const f_utf_string_static_t buffer, const unsigned char seek_to_this, f_string_range_t *range) {
+ f_status_t f_utf_string_dynamic_seek_to(const f_utf_string_static_t buffer, const f_char_t seek_to_this, f_string_range_t *range) {
#ifndef _di_level_0_parameter_checking_
if (!range) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
* Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_utf_string_dynamic_seek_line_to_
- extern f_status_t f_utf_string_dynamic_seek_line_to(const f_utf_string_static_t buffer, const unsigned char seek_to_this, f_string_range_t *range);
+ extern f_status_t f_utf_string_dynamic_seek_line_to(const f_utf_string_static_t buffer, const f_char_t seek_to_this, f_string_range_t *range);
#endif // _di_f_utf_string_dynamic_seek_line_to_
/**
* Errors (with error bit) from: f_memory_resize().
*/
#ifndef _di_f_utf_string_dynamic_seek_to_
- extern f_status_t f_utf_string_dynamic_seek_to(const f_utf_string_static_t buffer, const unsigned char seek_to_this, f_string_range_t *range);
+ extern f_status_t f_utf_string_dynamic_seek_to(const f_utf_string_static_t buffer, const f_char_t seek_to_this, f_string_range_t *range);
#endif // _di_f_utf_string_dynamic_seek_to_
/**
if (F_status_is_error(status)) return status;
}
- memcpy(destination->string + destination->used, source, sizeof(unsigned char) * length);
+ memcpy(destination->string + destination->used, source, sizeof(f_char_t) * length);
destination->used = destination->used + length;
return F_none;
if (F_status_is_error(status)) return status;
}
- memcpy(destination->string + destination->used, source + first, sizeof(unsigned char) * size);
+ memcpy(destination->string + destination->used, source + first, sizeof(f_char_t) * size);
destination->used = destination->used + size;
}
if (F_status_is_error(status)) return status;
}
- memcpy(destination->string + destination->used, source + first, sizeof(unsigned char) * size);
+ memcpy(destination->string + destination->used, source + first, sizeof(f_char_t) * size);
destination->used = destination->used + size;
}
if (destination->used) {
memmove(destination->string + length, destination->string, destination->used);
- memcpy(destination->string, source, sizeof(unsigned char) * length);
+ memcpy(destination->string, source, sizeof(f_char_t) * length);
}
else {
- memcpy(destination->string, source, sizeof(unsigned char) * length);
+ memcpy(destination->string, source, sizeof(f_char_t) * length);
}
destination->used = destination->used + length;
}
memmove(destination->string + offset + size, destination->string + offset, destination->used - offset);
- memcpy(destination->string + offset, source + first, sizeof(unsigned char) * size);
+ memcpy(destination->string + offset, source + first, sizeof(f_char_t) * size);
destination->used = destination->used + size;
offset += size;
}
memmove(destination->string + offset + size, destination->string + offset, destination->used - offset);
- memcpy(destination->string + offset, source + first, sizeof(unsigned char) * size);
+ memcpy(destination->string + offset, source + first, sizeof(f_char_t) * size);
destination->used = destination->used + size;
offset += size;
path.used = control_group.path.used + control_group.groups.array[i].used + F_control_group_path_system_suffix_s_length;
- unsigned char path_string[path.used + 1];
+ f_char_t path_string[path.used + 1];
path.string = path_string;
if (control_group.path.used) {
- memcpy(path.string, control_group.path.string, sizeof(unsigned char) * control_group.path.used);
+ memcpy(path.string, control_group.path.string, sizeof(f_char_t) * control_group.path.used);
}
- memcpy(path.string + control_group.path.used, control_group.groups.array[i].string, sizeof(unsigned char) * control_group.groups.array[i].used);
- memcpy(path.string + control_group.path.used + F_control_group_path_system_default_s_length, F_control_group_path_system_suffix_s, sizeof(unsigned char) * F_control_group_path_system_suffix_s_length);
+ memcpy(path.string + control_group.path.used, control_group.groups.array[i].string, sizeof(f_char_t) * control_group.groups.array[i].used);
+ memcpy(path.string + control_group.path.used + F_control_group_path_system_default_s_length, F_control_group_path_system_suffix_s, sizeof(f_char_t) * F_control_group_path_system_suffix_s_length);
path.string[path.used] = 0;
f_array_length_t at_path = 0;
f_string_static_t tree = f_string_static_t_initialize;
- unsigned char tree_string[path.used + 1];
+ f_char_t tree_string[path.used + 1];
tree.string = tree_string;
tree.used = path.used;
tree_string[path.used] = 0;
for (; at_path < path.used; ++at_path) {
if (at_path && path.string[at_path] == f_path_separator_s.string[0]) {
- memcpy(tree.string, path.string + at_tree, sizeof(unsigned char) * (at_path - at_tree));
+ memcpy(tree.string, path.string + at_tree, sizeof(f_char_t) * (at_path - at_tree));
tree.string[at_path - at_tree] = 0;
status = f_directory_exists(tree);
destination_sub.used = destination.used + listing.directory.array[i].used + 1;
destination_sub.size = destination_sub.used;
- unsigned char path_source_sub[source_sub.used + 1];
- unsigned char path_destination_sub[destination_sub.used + 1];
+ f_char_t path_source_sub[source_sub.used + 1];
+ f_char_t path_destination_sub[destination_sub.used + 1];
- memcpy(path_source_sub, source.string, sizeof(unsigned char) * source.used);
- memcpy(path_source_sub + source.used + 1, listing.directory.array[i].string, sizeof(unsigned char) * listing.directory.array[i].used);
+ memcpy(path_source_sub, source.string, sizeof(f_char_t) * source.used);
+ memcpy(path_source_sub + source.used + 1, listing.directory.array[i].string, sizeof(f_char_t) * listing.directory.array[i].used);
- memcpy(path_destination_sub, destination.string, sizeof(unsigned char) * destination.used);
- memcpy(path_destination_sub + destination.used + 1, listing.directory.array[i].string, sizeof(unsigned char) * listing.directory.array[i].used);
+ memcpy(path_destination_sub, destination.string, sizeof(f_char_t) * destination.used);
+ memcpy(path_destination_sub + destination.used + 1, listing.directory.array[i].string, sizeof(f_char_t) * listing.directory.array[i].used);
path_source_sub[source.used] = f_path_separator_s.string[0];
path_source_sub[source_sub.used] = 0;
path_source.used = source.used + file.used + 2;
path_destination.used = destination.used + file.used + 2;
- unsigned char path_source_string[path_source.used];
- unsigned char path_destination_string[path_destination.used];
+ f_char_t path_source_string[path_source.used];
+ f_char_t path_destination_string[path_destination.used];
path_source.string = path_source_string;
path_destination.string = path_destination_string;
- memcpy(path_source_string, source.string, sizeof(unsigned char) * source.used);
- memcpy(path_source_string + source.used + 1, file.string, sizeof(unsigned char) * file.used);
+ memcpy(path_source_string, source.string, sizeof(f_char_t) * source.used);
+ memcpy(path_source_string + source.used + 1, file.string, sizeof(f_char_t) * file.used);
path_source_string[source.used] = f_path_separator_s.string[0];
path_source_string[source.used + file.used + 1] = 0;
- memcpy(path_destination_string, destination.string, sizeof(unsigned char) * destination.used);
- memcpy(path_destination_string + destination.used + 1, file.string, sizeof(unsigned char) * file.used);
+ memcpy(path_destination_string, destination.string, sizeof(f_char_t) * destination.used);
+ memcpy(path_destination_string + destination.used + 1, file.string, sizeof(f_char_t) * file.used);
path_destination_string[destination.used] = f_path_separator_s.string[0];
path_destination_string[destination.used + file.used + 1] = 0;
macro_f_directory_status_t_resize(status, failure, size + 1);
if (F_status_is_error(status)) return status;
- memcpy(failure.path.string, path_source.string, sizeof(unsigned char) * size);
+ memcpy(failure.path.string, path_source.string, sizeof(f_char_t) * size);
failure.path.string[size] = 0;
}
else {
macro_f_directory_status_t_resize(status, failure, size + 1);
if (F_status_is_error(status)) return status;
- memcpy(failure.path.string, path_destination.string, sizeof(unsigned char) * size);
+ memcpy(failure.path.string, path_destination.string, sizeof(f_char_t) * size);
failure.path.string[size] = 0;
}
destination_sub.used = destination.used + listing.directory.array[i].used + 1;
destination_sub.size = destination_sub.used;
- unsigned char path_source_sub[source_sub.used + 1];
- unsigned char path_destination_sub[destination_sub.used + 1];
+ f_char_t path_source_sub[source_sub.used + 1];
+ f_char_t path_destination_sub[destination_sub.used + 1];
- memcpy(path_source_sub, source.string, sizeof(unsigned char) * source.used);
- memcpy(path_source_sub + source.used + 1, listing.directory.array[i].string, sizeof(unsigned char) * listing.directory.array[i].used);
+ memcpy(path_source_sub, source.string, sizeof(f_char_t) * source.used);
+ memcpy(path_source_sub + source.used + 1, listing.directory.array[i].string, sizeof(f_char_t) * listing.directory.array[i].used);
memcpy(path_destination_sub, destination.string, destination.used);
- memcpy(path_destination_sub + destination.used + 1, listing.directory.array[i].string, sizeof(unsigned char) * listing.directory.array[i].used);
+ memcpy(path_destination_sub + destination.used + 1, listing.directory.array[i].string, sizeof(f_char_t) * listing.directory.array[i].used);
path_source_sub[source.used] = f_path_separator_s.string[0];
path_source_sub[source_sub.used] = 0;
path_source.used = source.used + file.used + 2;
path_destination.used = destination.used + file.used + 2;
- unsigned char path_source_string[path_source.used];
- unsigned char path_destination_string[path_destination.used];
+ f_char_t path_source_string[path_source.used];
+ f_char_t path_destination_string[path_destination.used];
path_source.string = path_source_string;
path_destination.string = path_destination_string;
- memcpy(path_source_string, source.string, sizeof(unsigned char) * source.used);
- memcpy(path_source_string + source.used + 1, file.string, sizeof(unsigned char) * file.used);
+ memcpy(path_source_string, source.string, sizeof(f_char_t) * source.used);
+ memcpy(path_source_string + source.used + 1, file.string, sizeof(f_char_t) * file.used);
path_source_string[source.used] = f_path_separator_s.string[0];
path_source_string[source.used + file.used + 1] = 0;
- memcpy(path_destination_string, destination.string, sizeof(unsigned char) * destination.used);
- memcpy(path_destination_string + destination.used + 1, file.string, sizeof(unsigned char) * file.used);
+ memcpy(path_destination_string, destination.string, sizeof(f_char_t) * destination.used);
+ memcpy(path_destination_string + destination.used + 1, file.string, sizeof(f_char_t) * file.used);
path_destination_string[destination.used] = f_path_separator_s.string[0];
path_destination_string[destination.used + file.used + 1] = 0;
macro_f_directory_status_t_resize(status, failure, size + 1);
if (F_status_is_error(status)) return status;
- memcpy(failure.path.string, path_source.string, sizeof(unsigned char) * size);
+ memcpy(failure.path.string, path_source.string, sizeof(f_char_t) * size);
failure.path.string[size] = 0;
}
else {
macro_f_directory_status_t_resize(status, failure, size + 1);
if (F_status_is_error(status)) return status;
- memcpy(failure.path.string, path_destination.string, sizeof(unsigned char) * size);
+ memcpy(failure.path.string, path_destination.string, sizeof(f_char_t) * size);
failure.path.string[size] = 0;
}
for (; i < length; ++i) {
- name_directory.string = entity[i]->d_name;
+ name_directory.string = (f_string_t) entity[i]->d_name;
name_directory.used = strnlen(name_directory.string, F_directory_name_max_d);
// There is no reason to include "." and ".." in the directory listing.
if (!strncmp(name_directory.string, "..", 3) || !strncmp(name_directory.string, ".", 2)) {
- f_memory_resize(1, 0, sizeof(unsigned char *), (void **) & entity[i]);
+ f_memory_resize(1, 0, sizeof(f_string_t), (void **) & entity[i]);
continue;
}
status = f_string_dynamic_increase_by(name_directory.used, &names->array[names->used]);
if (F_status_is_error(status)) break;
- memcpy(names->array[names->used].string, name_directory.string, sizeof(unsigned char) * name_directory.used);
+ memcpy(names->array[names->used].string, name_directory.string, sizeof(f_char_t) * name_directory.used);
names->array[names->used++].used = name_directory.used;
- f_memory_resize(1, 0, sizeof(unsigned char *), (void **) & entity[i]);
+ f_memory_resize(1, 0, sizeof(f_char_t *), (void **) & entity[i]);
} // for
closedir(parent);
for (; i < length; ++i) {
- f_memory_resize(1, 0, sizeof(unsigned char *), (void **) & entity[i]);
+ f_memory_resize(1, 0, sizeof(f_char_t *), (void **) & entity[i]);
} // for
f_memory_resize(1, 0, sizeof(struct dirent *), (void **) & entity);
return F_status_set_error(F_string_too_large);
}
- macro_f_string_dynamic_t_resize(status, (*destination), destination->used + total);
+ status = f_string_dynamic_resize(destination->used + total, destination);
if (F_status_is_error(status)) return status;
}
}
}
if (length_truncated - start > 0) {
- memcpy(destination->string + destination->used, source.string + start, sizeof(unsigned char) * (length_truncated - start));
+ memcpy(destination->string + destination->used, source.string + start, sizeof(f_char_t) * (length_truncated - start));
}
destination->used += total;
paths->array[paths->used].used = 0;
if (total) {
- unsigned char buffer[total + 1];
+ char buffer[total + 1];
for (j = first, k = 0; j < i; ++j) {
if (!path.string[j]) continue;
- buffer[k++] = path.string[j];
+ buffer[k++] = (char) path.string[j];
} // for
// Guarantee a trailing directory separator.
status = f_string_dynamic_increase_by(k, &paths->array[paths->used]);
if (F_status_is_error(status)) return status;
- memcpy(paths->array[paths->used].string, buffer, sizeof(unsigned char) * k);
+ memcpy(paths->array[paths->used].string, buffer, sizeof(f_char_t) * k);
paths->array[paths->used++].used = k;
}
paths->array[paths->used].used = 0;
if (total) {
- unsigned char buffer[total];
+ char buffer[total];
for (j = 0, k = 0; j < total; ++j) {
if (!path.string[r + j + 1]) continue;
- buffer[k++] = path.string[r + j + 1];
+ buffer[k++] = (char) path.string[r + j + 1];
} // for
// Guarantee a trailing directory separator.
status = f_string_dynamic_increase_by(k, &paths->array[paths->used]);
if (F_status_is_error(status)) return status;
- memcpy(paths->array[paths->used].string, buffer, sizeof(unsigned char) * k);
+ memcpy(paths->array[paths->used].string, buffer, sizeof(f_char_t) * k);
paths->array[paths->used++].used = k;
}
f_array_length_t i = 0;
uint8_t width = 0;
- const unsigned char quote_char = quoted == f_fss_quote_type_double_e ? f_string_ascii_quote_double_s.string[0] : f_string_ascii_quote_single_s.string[0];
+ const f_char_t quote_char = quoted == f_fss_quote_type_double_e ? f_string_ascii_quote_double_s.string[0] : f_string_ascii_quote_single_s.string[0];
// If there are any spaces, then this will be quoted so find the first non-placeholder character.
for (; destination_range.start < destination->used; ++destination_range.start) {
}
// Handle quoted support.
- unsigned char quote_found = 0;
+ f_char_t quote_found = 0;
if (quoted) {
*quoted = 0;
f_array_length_t item_total = 0;
f_array_length_t i = 0;
- const unsigned char quote_char = quoted == f_fss_quote_type_double_e ? f_string_ascii_quote_double_s.string[0] : f_string_ascii_quote_single_s.string[0];
+ const f_char_t quote_char = quoted == f_fss_quote_type_double_e ? f_string_ascii_quote_double_s.string[0] : f_string_ascii_quote_single_s.string[0];
// Use placeholders for potential quote and potential delimited quote to avoid doing things such as memmove().
destination->string[destination->used++] = f_fss_delimit_placeholder_s.string[0];
}
else if (*string < 0x56) {
if (*string == f_string_ascii_C_s.string[0]) {
- unsigned char value[1] = { (unsigned char) va_arg(apl, int) };
+ f_char_t value[1] = { (f_char_t) va_arg(apl, int) };
*status = f_print_safely(value, 1, stream);
}
else if (*string < 0x72) {
if (*string == f_string_ascii_c_s.string[0]) {
- const unsigned char value = (unsigned char) va_arg(apl, uint32_t);
+ const f_char_t value = (f_char_t) va_arg(apl, uint32_t);
if (!fputc_unlocked(value, stream)) {
*status = F_status_set_error(F_output);
}
else if (type == f_print_format_type_double_32_e || type == f_print_format_type_double_64_e) {
unsigned int f = 0;
- unsigned char format[33];
- unsigned char buffer[129];
+ char format[33];
+ f_char_t buffer[129];
- memset(format, 0, sizeof(unsigned char) * 33);
- memset(buffer, 0, sizeof(unsigned char) * 129);
+ memset(format, 0, sizeof(char) * 33);
+ memset(buffer, 0, sizeof(f_char_t) * 129);
- format[f++] = f_string_ascii_percent_s.string[0];
+ format[f++] = (char) f_string_ascii_percent_s.string[0];
if (flag & F_print_format_flag_sign_always_d) {
- format[f++] = f_string_ascii_plus_s.string[0];
+ format[f++] = (char) f_string_ascii_plus_s.string[0];
}
else if (flag & F_print_format_flag_sign_pad_d) {
- format[f++] = f_string_ascii_space_s.string[0];
+ format[f++] = (char) f_string_ascii_space_s.string[0];
}
if (flag & F_print_format_flag_align_left_d) {
- format[f++] = f_string_ascii_minus_s.string[0];
+ format[f++] = (char) f_string_ascii_minus_s.string[0];
}
if (flag & F_print_format_flag_zeros_leading_d) {
- format[f++] = f_string_ascii_0_s.string[0];
+ format[f++] = (char) f_string_ascii_0_s.string[0];
}
if (flag & F_print_format_flag_width_d) {
- format[f++] = f_string_ascii_asterisk_s.string[0];
+ format[f++] = (char) f_string_ascii_asterisk_s.string[0];
}
if (flag & F_print_format_flag_precision_d) {
- format[f++] = f_string_ascii_period_s.string[0];
- format[f++] = f_string_ascii_asterisk_s.string[0];
+ format[f++] = (char) f_string_ascii_period_s.string[0];
+ format[f++] = (char) f_string_ascii_asterisk_s.string[0];
}
if (flag & F_print_format_flag_exponent_d) {
if (flag & F_print_format_flag_exponent_upper_d) {
- format[f++] = f_string_ascii_E_s.string[0];
+ format[f++] = (char) f_string_ascii_E_s.string[0];
}
else {
- format[f++] = f_string_ascii_e_s.string[0];
+ format[f++] = (char) f_string_ascii_e_s.string[0];
}
}
else if (flag & F_print_format_flag_exponent_either_d) {
if (flag & F_print_format_flag_exponent_upper_d) {
- format[f++] = f_string_ascii_G_s.string[0];
+ format[f++] = (char) f_string_ascii_G_s.string[0];
}
else {
- format[f++] = f_string_ascii_g_s.string[0];
+ format[f++] = (char) f_string_ascii_g_s.string[0];
}
}
else {
- format[f++] = f_string_ascii_f_s.string[0];
+ format[f++] = (char) f_string_ascii_f_s.string[0];
}
if (type == f_print_format_type_double_32_e) {
{
f_array_length_t j = 0;
- unsigned char number[5] = { 0, 0, 0, 0, 0 };
+ f_char_t number[5] = { 0, 0, 0, 0, 0 };
for (++range->start; range->start <= range->stop && j < 4; ++range->start, ++j) {
#endif // _di_fl_utf_string_dynamic_rip_nulless_
#ifndef _di_fl_utf_string_dynamic_seek_line_to_char_
- f_status_t fl_utf_string_dynamic_seek_line_to_char(const f_utf_string_static_t buffer, f_string_range_t * const range, const unsigned char seek_to_this) {
+ f_status_t fl_utf_string_dynamic_seek_line_to_char(const f_utf_string_static_t buffer, f_string_range_t * const range, const f_char_t seek_to_this) {
#ifndef _di_level_1_parameter_checking_
if (!range) return F_status_set_error(F_parameter);
if (buffer.used <= range->start) return F_status_set_error(F_parameter);
#endif // _di_fl_utf_string_dynamic_seek_line_until_graph_non_
#ifndef _di_fl_utf_string_dynamic_seek_to_char_
- f_status_t fl_utf_string_dynamic_seek_to_char(const f_utf_string_static_t buffer, f_string_range_t * const range, const unsigned char seek_to_this) {
+ f_status_t fl_utf_string_dynamic_seek_to_char(const f_utf_string_static_t buffer, f_string_range_t * const range, const f_char_t seek_to_this) {
#ifndef _di_level_1_parameter_checking_
if (!range) return F_status_set_error(F_parameter);
if (buffer.used <= range->start) return F_status_set_error(F_parameter);
#endif // _di_fl_utf_string_rip_nulless_
#ifndef _di_fl_utf_string_seek_line_to_char_
- f_status_t fl_utf_string_seek_line_to_char(const f_utf_string_t string, f_string_range_t * const range, const unsigned char seek_to_this) {
+ f_status_t fl_utf_string_seek_line_to_char(const f_utf_string_t string, f_string_range_t * const range, const f_char_t seek_to_this) {
#ifndef _di_level_1_parameter_checking_
if (!range) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
#endif // _di_fl_utf_string_seek_line_until_graph_non_
#ifndef _di_fl_utf_string_seek_to_char_
- f_status_t fl_utf_string_seek_to_char(const f_utf_string_t string, f_string_range_t * const range, const unsigned char seek_to_this) {
+ f_status_t fl_utf_string_seek_to_char(const f_utf_string_t string, f_string_range_t * const range, const f_char_t seek_to_this) {
#ifndef _di_level_1_parameter_checking_
if (!range) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
* F_utf (with error bit) if a character in the buffer is an invalid UTF-8 character.
*/
#ifndef _di_fl_utf_string_dynamic_seek_line_to_char_
- extern f_status_t fl_utf_string_dynamic_seek_line_to_char(const f_utf_string_static_t buffer, f_string_range_t * const range, const unsigned char seek_to_this);
+ extern f_status_t fl_utf_string_dynamic_seek_line_to_char(const f_utf_string_static_t buffer, f_string_range_t * const range, const f_char_t seek_to_this);
#endif // _di_fl_utf_string_dynamic_seek_line_to_char_
/**
* F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_fl_utf_string_dynamic_seek_to_char_
- extern f_status_t fl_utf_string_dynamic_seek_to_char(const f_utf_string_static_t buffer, f_string_range_t * const range, const unsigned char seek_to_this);
+ extern f_status_t fl_utf_string_dynamic_seek_to_char(const f_utf_string_static_t buffer, f_string_range_t * const range, const f_char_t seek_to_this);
#endif // _di_fl_utf_string_dynamic_seek_to_char_
/**
* F_utf (with error bit) if a character in the buffer is an invalid UTF-8 character.
*/
#ifndef _di_fl_utf_string_seek_line_to_char_
- extern f_status_t fl_utf_string_seek_line_to_char(const f_utf_string_t string, f_string_range_t * const range, const unsigned char seek_to_this);
+ extern f_status_t fl_utf_string_seek_line_to_char(const f_utf_string_t string, f_string_range_t * const range, const f_char_t seek_to_this);
#endif // _di_fl_utf_string_seek_line_to_char_
/**
* F_utf (with error bit) if a character in the buffer is an invalid UTF-8 character.
*/
#ifndef _di_fl_utf_string_seek_to_character_
- extern f_status_t fl_utf_string_seek_to_char(const f_utf_string_t string, f_string_range_t * const range, const unsigned char seek_to_this);
+ extern f_status_t fl_utf_string_seek_to_char(const f_utf_string_t string, f_string_range_t * const range, const f_char_t seek_to_this);
#endif // _di_fl_utf_string__seek_to_character_
#ifdef __cplusplus
#endif
#if !defined(_di_fl_utf_file_read_) || !defined(_di_fl_utf_file_read_until_) || !defined(_di_fl_utf_file_read_range_)
- void private_fl_utf_file_process_read_buffer(const f_string_t buffer_read, const ssize_t size_read, f_utf_string_dynamic_t * const buffer, unsigned char buffer_char[], uint8_t * const width, int8_t * const width_last) {
+ void private_fl_utf_file_process_read_buffer(const f_string_t buffer_read, const ssize_t size_read, f_utf_string_dynamic_t * const buffer, f_char_t buffer_char[], uint8_t * const width, int8_t * const width_last) {
uint8_t increment_by = 0;
// @todo this needs to identify an invalid UTF-8 string before writing and return an error if invalid.
do {
- memset(buffer_write, 0, sizeof(unsigned char) * write_size);
+ memset(buffer_write, 0, sizeof(f_char_t) * write_size);
for (i = 0, used = 0; used < write_size && *written + i < write_max; ++i, used += width) {
* @see fl_utf_file_read_until()
*/
#if !defined(_di_fl_utf_file_read_) || !defined(_di_fl_utf_file_read_until_) || !defined(_di_fl_utf_file_read_range_)
- extern void private_fl_utf_file_process_read_buffer(const f_string_t buffer_read, const ssize_t size_read, f_utf_string_dynamic_t * const buffer, unsigned char buffer_char[], uint8_t * const width, int8_t * const width_last) F_attribute_visibility_internal_d;
+ extern void private_fl_utf_file_process_read_buffer(const f_string_t buffer_read, const ssize_t size_read, f_utf_string_dynamic_t * const buffer, f_char_t buffer_char[], uint8_t * const width, int8_t * const width_last) F_attribute_visibility_internal_d;
#endif // !defined(_di_fl_utf_file_read_) || !defined(_di_fl_utf_file_read_until_) || !defined(_di_fl_utf_file_read_range_)
/**
uint8_t width = 0;
int8_t width_last = -1;
- unsigned char buffer_read[file.size_read];
- unsigned char buffer_char[4] = { 0, 0, 0, 0 };
+ f_char_t buffer_read[file.size_read];
+ f_char_t buffer_char[4] = { 0, 0, 0, 0 };
memset(&buffer_read, 0, sizeof(file.size_read));
uint8_t width = 0;
int8_t width_last = -1;
- unsigned char buffer_read[file.size_read];
- unsigned char buffer_char[4] = { 0, 0, 0, 0 };
+ f_char_t buffer_read[file.size_read];
+ f_char_t buffer_char[4] = { 0, 0, 0, 0 };
memset(&buffer_read, 0, sizeof(file.size_read));
buffer_size = total;
}
- unsigned char buffer_read[buffer_size];
- unsigned char buffer_char[4] = { 0, 0, 0, 0 };
+ f_char_t buffer_read[buffer_size];
+ f_char_t buffer_char[4] = { 0, 0, 0, 0 };
memset(&buffer_read, 0, sizeof(buffer_size));
path.used = control_group.path.used + control_group.groups.array[i].used;
- unsigned char path_string[path.used + 1];
+ f_char_t path_string[path.used + 1];
path.string = path_string;
if (control_group.path.used) {
- memcpy(path.string, control_group.path.string, sizeof(unsigned char) * control_group.path.used);
+ memcpy(path.string, control_group.path.string, sizeof(f_char_t) * control_group.path.used);
}
- memcpy(path.string + control_group.path.used, control_group.groups.array[i].string, sizeof(unsigned char) * control_group.groups.array[i].used);
+ memcpy(path.string + control_group.path.used, control_group.groups.array[i].string, sizeof(f_char_t) * control_group.groups.array[i].used);
path.string[path.used] = 0;
status = fl_directory_create(path, F_file_mode_all_rwx_d);
#endif
#ifndef _di_fll_error_print_
- f_status_t fll_error_print(const fl_print_t print, const f_status_t status, const f_string_t function, const bool fallback) {
+ f_status_t fll_error_print(const fl_print_t print, const f_status_t status, const char *function, const bool fallback) {
return private_fll_error_print(print, status, function, fallback);
}
#endif // _di_fll_error_print_
#ifndef _di_fll_error_file_print_
- f_status_t fll_error_file_print(const fl_print_t print, const f_status_t status, const f_string_t function, const bool fallback, const f_string_static_t name, const f_string_static_t operation, const uint8_t type) {
+ f_status_t fll_error_file_print(const fl_print_t print, const f_status_t status, const char *function, const bool fallback, const f_string_static_t name, const f_string_static_t operation, const uint8_t type) {
f_string_static_t type_name = fll_error_file_type_file_s;
#endif // _di_fll_error_file_print_
#ifndef _di_fll_error_parameter_integer_print_
- f_status_t fll_error_parameter_integer_print(const fl_print_t print, const f_status_t status, const f_string_t function, const bool fallback, const f_string_static_t parameter, const f_string_static_t argument) {
+ f_status_t fll_error_parameter_integer_print(const fl_print_t print, const f_status_t status, const char *function, const bool fallback, const f_string_static_t parameter, const f_string_static_t argument) {
if (status == F_data_not) {
if (print.verbosity != f_console_verbosity_quiet_e) {
* F_true is returned if the status code is unknown.
*/
#ifndef _di_fll_error_print_
- extern f_status_t fll_error_print(const fl_print_t print, const f_status_t status, const f_string_t function, const bool fallback);
+ extern f_status_t fll_error_print(const fl_print_t print, const f_status_t status, const char *function, const bool fallback);
#endif // _di_fll_error_print_
/**
* F_false is returned on successful print of known errors.
*/
#ifndef _di_fll_error_file_print_
- extern f_status_t fll_error_file_print(const fl_print_t print, const f_status_t status, const f_string_t function, const bool fallback, const f_string_static_t name, const f_string_static_t operation, const uint8_t type);
+ extern f_status_t fll_error_file_print(const fl_print_t print, const f_status_t status, const char *function, const bool fallback, const f_string_static_t name, const f_string_static_t operation, const uint8_t type);
#endif // _di_fll_error_file_print_
/**
* F_false is returned on successful print of known errors.
*/
#ifndef _di_fll_error_parameter_integer_print_
- extern f_status_t fll_error_parameter_integer_print(const fl_print_t print, const f_status_t status, const f_string_t function, const bool fallback, const f_string_static_t parameter, const f_string_static_t argument);
+ extern f_status_t fll_error_parameter_integer_print(const fl_print_t print, const f_status_t status, const char *function, const bool fallback, const f_string_static_t parameter, const f_string_static_t argument);
#endif // _di_fll_error_parameter_integer_print_
#ifdef __cplusplus
#endif
#if !defined(_di_fll_error_print_) || !defined(_di_fll_error_file_print_) || !defined(_di_fll_error_number_print_)
- f_status_t private_fll_error_print(const fl_print_t print, const f_status_t status, const f_string_t function, const bool fallback) {
+ f_status_t private_fll_error_print(const fl_print_t print, const f_status_t status, const char *function, const bool fallback) {
if (status == F_access_denied) {
if (print.verbosity != f_console_verbosity_quiet_e) {
#endif // !defined(_di_fll_error_print_) || !defined(_di_fll_error_file_print_) || !defined(_di_fll_error_number_print_)
#if !defined(_di_fll_error_print_) || !defined(_di_fll_error_file_print_) || !defined(_di_fll_error_number_print_)
- void private_fll_error_print_function(const fl_print_t print, const f_string_t function) {
+ void private_fll_error_print_function(const fl_print_t print, const char *function) {
if (function) {
fl_print_format(" when calling function%] ", print.to.stream, print.context);
* @see fll_error_file_print()
*/
#if !defined(_di_fll_error_print_) || !defined(_di_fll_error_file_print_) || !defined(_di_fll_error_number_print_)
- extern f_status_t private_fll_error_print(const fl_print_t print, const f_status_t status, const f_string_t function, const bool fallback) F_attribute_visibility_internal_d;
+ extern f_status_t private_fll_error_print(const fl_print_t print, const f_status_t status, const char *function, const bool fallback) F_attribute_visibility_internal_d;
#endif // !defined(_di_fll_error_print_) || !defined(_di_fll_error_file_print_) || !defined(_di_fll_error_number_print_)
/**
* @see fll_error_file_print()
*/
#if !defined(_di_fll_error_print_) || !defined(_di_fll_error_file_print_) || !defined(_di_fll_error_number_print_)
- void private_fll_error_print_function(const fl_print_t print, const f_string_t function) F_attribute_visibility_internal_d;
+ void private_fll_error_print_function(const fl_print_t print, const char *function) F_attribute_visibility_internal_d;
#endif // !defined(_di_fll_error_print_) || !defined(_di_fll_error_file_print_) || !defined(_di_fll_error_number_print_)
#ifdef __cplusplus
f_string_t fixed_arguments[arguments.used + 2];
f_string_static_t program_name = f_string_static_t_initialize;
- const f_string_t last_slash = strrchr(program.used ? program.string : arguments.array[0].string, f_path_separator_s.string[0]);
+ const f_string_t last_slash = (f_string_t) strrchr((program.used ? program.string : arguments.array[0].string), (char) f_path_separator_s.string[0]);
if (last_slash) {
- program_name.used = strnlen(last_slash + 1, F_path_length_max_d);
+ program_name.used = strnlen((last_slash + 1), F_path_length_max_d);
}
else {
program_name.used = program.used ? program.used : arguments.array[0].used;
}
- unsigned char program_name_string[program_name.used + 1];
+ f_char_t program_name_string[program_name.used + 1];
program_name.string = program_name_string;
private_fll_execute_path_arguments_fixate(program.used ? program : arguments.array[0], arguments, last_slash, !program.used, program_name, fixed_arguments);
}
}
- unsigned char program_path[found->used + 1];
+ f_char_t program_path[found->used + 1];
program_path[found->used] = 0;
- memcpy(&program_path, found->string, sizeof(unsigned char) * found->used);
+ memcpy(&program_path, found->string, sizeof(f_char_t) * found->used);
f_string_dynamics_resize(0, &paths);
}
if (last_slash) {
- code = execv(program.used ? program.string : arguments.array[0].string, (char **) fixed_arguments);
+ code = execv((program.used ? program.string : arguments.array[0].string), (char **) fixed_arguments);
}
else {
- code = execvp(program.used ? program.string : arguments.array[0].string, (char **) fixed_arguments);
+ code = execvp((program.used ? program.string : arguments.array[0].string), (char **) fixed_arguments);
}
}
f_string_t fixed_arguments[arguments.used + 2];
f_string_static_t program_name = f_string_static_t_initialize;
- const f_string_t last_slash = strrchr(program.used ? program.string : arguments.array[0].string, f_path_separator_s.string[0]);
+ const f_string_t last_slash = (f_string_t) strrchr((program.used ? program.string : arguments.array[0].string), (char) f_path_separator_s.string[0]);
if (last_slash) {
- program_name.used = strnlen(last_slash + 1, F_path_length_max_d);
+ program_name.used = strnlen((last_slash + 1), F_path_length_max_d);
}
else {
program_name.used = program.used ? program.used : arguments.array[0].used;
}
- unsigned char program_name_string[program_name.used + 1];
+ f_char_t program_name_string[program_name.used + 1];
program_name.string = program_name_string;
private_fll_execute_path_arguments_fixate(program.used ? program : arguments.array[0], arguments, last_slash, !program.used, program_name, fixed_arguments);
}
}
- unsigned char program_path[found->used + 1];
+ f_char_t program_path[found->used + 1];
program_path[found->used] = 0;
- memcpy(&program_path, found->string, sizeof(unsigned char) * found->used);
+ memcpy(&program_path, found->string, sizeof(f_char_t) * found->used);
program_name.string = program_path;
program_name.used = found->used;
#if !defined(_di_fll_execute_program_)
void private_fll_execute_path_arguments_fixate(const f_string_static_t program_path, const f_string_statics_t arguments, const f_string_t last_slash, const bool fixated_is, f_string_static_t program_name, f_string_t fixed_arguments[]) {
- memset(program_name.string, 0, sizeof(unsigned char) * (program_name.used + 1));
+ memset(program_name.string, 0, sizeof(f_char_t) * (program_name.used + 1));
memset(fixed_arguments, 0, sizeof(f_string_t) * (arguments.used + 2));
- memcpy(program_name.string, last_slash ? last_slash + 1 : program_path.string, sizeof(unsigned char) * program_name.used);
+ memcpy(program_name.string, last_slash ? last_slash + 1 : program_path.string, sizeof(f_char_t) * program_name.used);
if (program_name.used) {
fixed_arguments[0] = program_name.string;
path_sub.used = path.used + list[i]->array[j].used + 1;
- unsigned char path_sub_string[path_sub.used + 1];
+ f_char_t path_sub_string[path_sub.used + 1];
path_sub.string = path_sub_string;
- memcpy(path_sub.string, path.string, sizeof(unsigned char) * path.used);
- memcpy(path_sub.string + path.used + 1, list[i]->array[j].string, sizeof(unsigned char) * list[i]->array[j].used);
+ memcpy(path_sub.string, path.string, sizeof(f_char_t) * path.used);
+ memcpy(path_sub.string + path.used + 1, list[i]->array[j].string, sizeof(f_char_t) * list[i]->array[j].used);
path_sub.string[path.used] = f_path_separator_s.string[0];
path_sub.string[path_sub.used] = 0;
path_sub.used = path.used + listing.directory.array[i].used + 1;
- unsigned char path_sub_string[path_sub.used + 1];
+ f_char_t path_sub_string[path_sub.used + 1];
path_sub.string = path_sub_string;
- memcpy(path_sub.string, path.string, sizeof(unsigned char) * path.used);
- memcpy(path_sub.string + path.used + 1, listing.directory.array[i].string, sizeof(unsigned char) * listing.directory.array[i].used);
+ memcpy(path_sub.string, path.string, sizeof(f_char_t) * path.used);
+ memcpy(path_sub.string + path.used + 1, listing.directory.array[i].string, sizeof(f_char_t) * listing.directory.array[i].used);
path_sub.string[path.used] = f_path_separator_s.string[0];
path_sub.string[path_sub.used] = 0;
path_sub.used = path.used + list[i]->array[j].used + 1;
- unsigned char path_sub_string[path_sub.used + 1];
+ f_char_t path_sub_string[path_sub.used + 1];
path_sub.string = path_sub_string;
- memcpy(path_sub.string, path.string, sizeof(unsigned char) * path.used);
- memcpy(path_sub.string + path.used + 1, list[i]->array[j].string, sizeof(unsigned char) * list[i]->array[j].used);
+ memcpy(path_sub.string, path.string, sizeof(f_char_t) * path.used);
+ memcpy(path_sub.string + path.used + 1, list[i]->array[j].string, sizeof(f_char_t) * list[i]->array[j].used);
path_sub.string[path.used] = f_path_separator_s.string[0];
path_sub.string[path_sub.used] = 0;
path_sub.used = path.used + listing.directory.array[i].used + 1;
- unsigned char path_sub_string[path_sub.used + 1];
+ f_char_t path_sub_string[path_sub.used + 1];
path_sub.string = path_sub_string;
- memcpy(path_sub.string, path.string, sizeof(unsigned char) * path.used);
- memcpy(path_sub.string + path.used + 1, listing.directory.array[i].string, sizeof(unsigned char) * listing.directory.array[i].used);
+ memcpy(path_sub.string, path.string, sizeof(f_char_t) * path.used);
+ memcpy(path_sub.string + path.used + 1, listing.directory.array[i].string, sizeof(f_char_t) * listing.directory.array[i].used);
path_sub.string[path.used] = f_path_separator_s.string[0];
path_sub.string[path_sub.used] = 0;
}
}
- memcpy(destination->string + destination->used + i, content.string + i, sizeof(unsigned char) * F_fss_default_block_size_normal_d);
+ memcpy(destination->string + destination->used + i, content.string + i, sizeof(f_char_t) * F_fss_default_block_size_normal_d);
} // for
if (i < content.used) {
- memcpy(destination->string + destination->used + i, content.string + i, sizeof(unsigned char) * (content.used - i));
+ memcpy(destination->string + destination->used + i, content.string + i, sizeof(f_char_t) * (content.used - i));
}
destination->used += content.used;
*
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors (with error bit) from: macro_f_string_dynamic_t_resize().
+ * Errors (with error bit) from: f_string_dynamic_resize().
* Errors (with error bit) from: f_string_dynamic_increase_by().
+ *
+ * @see f_string_dynamic_resize()
+ * @see f_string_dynamic_increase_by()
*/
#ifndef _di_fll_iki_content_escape_
extern f_status_t fll_iki_content_escape(const f_string_static_t content, const f_string_static_t quote, f_string_dynamic_t * const escaped);
*
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors (with error bit) from: macro_f_string_dynamic_t_resize().
+ * Errors (with error bit) from: f_string_dynamic_resize().
* Errors (with error bit) from: f_string_dynamic_increase_by().
+ *
+ * @see f_string_dynamic_resize()
+ * @see f_string_dynamic_increase_by()
*/
#ifndef _di_fll_iki_content_partial_escape_
extern f_status_t fll_iki_content_partial_escape(const f_string_static_t content, const f_string_range_t range, const f_string_static_t quote, f_string_dynamic_t * const escaped);
* F_parameter (with error bit) if a parameter is invalid.
* F_syntax (with error bit) if the given string is invalid, such as having an undelimited quote.
*
- * Errors (with error bit) from: macro_f_string_dynamic_t_resize().
+ * Errors (with error bit) from: f_string_dynamic_resize().
* Errors (with error bit) from: f_string_dynamic_increase_by().
+ *
+ * @see f_string_dynamic_resize()
+ * @see f_string_dynamic_increase_by()
*/
#ifndef _di_fll_iki_content_partial_unescape_
extern f_status_t fll_iki_content_partial_unescape(const f_string_static_t content, const f_string_range_t range, const f_string_static_t quote, f_string_dynamic_t * const unescaped);
* F_parameter (with error bit) if a parameter is invalid.
* F_syntax (with error bit) if the given string is invalid, such as having an undelimited quote.
*
- * Errors (with error bit) from: macro_f_string_dynamic_t_resize().
+ * Errors (with error bit) from: f_string_dynamic_resize().
* Errors (with error bit) from: f_string_dynamic_increase_by().
+ *
+ * @see f_string_dynamic_resize()
+ * @see f_string_dynamic_increase_by()
*/
#ifndef _di_fll_iki_content_unescape_
extern f_status_t fll_iki_content_unescape(const f_string_static_t content, const f_string_static_t quote, f_string_dynamic_t * const unescaped);
#endif
#if !defined(_di_fll_iki_content_escape_) || !defined(_di_fll_iki_content_partial_escape_)
- f_status_t private_fll_iki_content_partial_escape(const f_string_static_t content, const f_string_range_t range, const unsigned char quote, f_string_dynamic_t * const escaped) {
+ f_status_t private_fll_iki_content_partial_escape(const f_string_static_t content, const f_string_range_t range, const f_char_t quote, f_string_dynamic_t * const escaped) {
f_status_t status = F_none;
// Ensure escaped is at least the same size as content.
if (content.used > escaped->size) {
- macro_f_string_dynamic_t_resize(status, (*escaped), content.used);
+ status = f_string_dynamic_resize(content.used, escaped);
if (F_status_is_error(status)) return status;
}
#endif // !defined(_di_fll_iki_content_escape_) || !defined(_di_fll_iki_content_partial_escape_)
#if !defined(_di_fll_iki_content_unescape_) || !defined(_di_fll_iki_content_partial_unescape_)
- f_status_t private_fll_iki_content_partial_unescape(const f_string_static_t content, const f_string_range_t range, const unsigned char quote, f_string_dynamic_t * const unescaped) {
+ f_status_t private_fll_iki_content_partial_unescape(const f_string_static_t content, const f_string_range_t range, const f_char_t quote, f_string_dynamic_t * const unescaped) {
f_status_t status = F_none;
// Ensure escaped is at least the same size as content.
if (content.used > unescaped->size) {
- macro_f_string_dynamic_t_resize(status, (*unescaped), content.used);
+ status = f_string_dynamic_resize(content.used, unescaped);
if (F_status_is_error(status)) return status;
}
*
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors (with error bit) from: macro_f_string_dynamic_t_resize().
+ * Errors (with error bit) from: f_string_dynamic_resize().
* Errors (with error bit) from: f_string_dynamic_increase_by().
+ *
+ * @see f_string_dynamic_resize()
+ * @see f_string_dynamic_increase_by()
*/
#if !defined(_di_fll_iki_content_escape_) || !defined(_di_fll_iki_content_partial_escape_)
- extern f_status_t private_fll_iki_content_partial_escape(const f_string_static_t content, const f_string_range_t range, const unsigned char quote, f_string_dynamic_t * const escaped) F_attribute_visibility_internal_d;
+ extern f_status_t private_fll_iki_content_partial_escape(const f_string_static_t content, const f_string_range_t range, const f_char_t quote, f_string_dynamic_t * const escaped) F_attribute_visibility_internal_d;
#endif // !defined(_di_fll_iki_content_escape_) || !defined(_di_fll_iki_content_partial_escape_)
/**
* F_parameter (with error bit) if a parameter is invalid.
* F_syntax (with error bit) if the given string is invalid, such as having an undelimited quote.
*
- * Errors (with error bit) from: macro_f_string_dynamic_t_resize().
+ * Errors (with error bit) from: f_string_dynamic_resize().
* Errors (with error bit) from: f_string_dynamic_increase_by().
+ *
+ * @see f_string_dynamic_resize()
+ * @see f_string_dynamic_increase_by()
*/
#if !defined(_di_fll_iki_content_unescape_) || !defined(_di_fll_iki_content_partial_unescape_)
- extern f_status_t private_fll_iki_content_partial_unescape(const f_string_static_t content, const f_string_range_t range, const unsigned char quote, f_string_dynamic_t * const unescaped) F_attribute_visibility_internal_d;
+ extern f_status_t private_fll_iki_content_partial_unescape(const f_string_static_t content, const f_string_range_t range, const f_char_t quote, f_string_dynamic_t * const unescaped) F_attribute_visibility_internal_d;
#endif // !defined(_di_fll_iki_content_unescape_) || !defined(_di_fll_iki_content_partial_unescape_)
#ifdef __cplusplus
#endif // _di_fll_print_
#ifndef _di_fll_print_character_
- f_status_t fll_print_character(const unsigned char character, FILE * const output) {
+ f_status_t fll_print_character(const f_char_t character, FILE * const output) {
flockfile(output);
#endif // _di_fll_print_character_
#ifndef _di_fll_print_character_safely_
- f_status_t fll_print_character_safely(const unsigned char character, FILE * const output) {
+ f_status_t fll_print_character_safely(const f_char_t character, FILE * const output) {
flockfile(output);
* @see f_print_character()
*/
#ifndef _di_fll_print_character_
- extern f_status_t fll_print_character(const unsigned char character, FILE * const output);
+ extern f_status_t fll_print_character(const f_char_t character, FILE * const output);
#endif // _di_fll_print_character_
/**
* @see f_print_character_safely()
*/
#ifndef _di_fll_print_character_safely_
- extern f_status_t fll_print_character_safely(const unsigned char character, FILE * const output);
+ extern f_status_t fll_print_character_safely(const f_char_t character, FILE * const output);
#endif // _di_fll_print_character_safely_
/**
#endif // _di_fll_program_print_help_header_
#ifndef _di_fll_program_print_help_option_
- f_status_t fll_program_print_help_option(const f_file_t output, const f_color_context_t context, const f_string_static_t option_short, const f_string_static_t option_long, const f_string_static_t symbol_short, const f_string_static_t symbol_long, const f_string_t description) {
+ f_status_t fll_program_print_help_option(const f_file_t output, const f_color_context_t context, const f_string_static_t option_short, const f_string_static_t option_long, const f_string_static_t symbol_short, const f_string_static_t symbol_long, const char *description) {
fl_print_format("%r %Q%[%Q%]", output.stream, f_string_eol_s, symbol_short, context.set.standout, option_short, context.set.standout);
fl_print_format(", %Q%[%Q%] %S", output.stream, symbol_long, context.set.standout, option_long, context.set.standout, description);
#endif // _di_fll_program_print_help_option_
#ifndef _di_fll_program_print_help_option_long_
- f_status_t fll_program_print_help_option_long(const f_file_t output, const f_color_context_t context, const f_string_static_t option_long, const f_string_static_t symbol_long, const f_string_t description) {
+ f_status_t fll_program_print_help_option_long(const f_file_t output, const f_color_context_t context, const f_string_static_t option_long, const f_string_static_t symbol_long, const char *description) {
fl_print_format("%r %Q%[%Q%] %S", output.stream, f_string_eol_s, symbol_long, context.set.standout, option_long, context.set.standout, description);
#endif // _di_fll_program_print_help_option_long_
#ifndef _di_fll_program_print_help_option_other_
- f_status_t fll_program_print_help_option_other(const f_file_t output, const f_color_context_t context, const f_string_static_t option_other, const f_string_t description) {
+ f_status_t fll_program_print_help_option_other(const f_file_t output, const f_color_context_t context, const f_string_static_t option_other, const char *description) {
fl_print_format("%r %[%Q%] %S", output.stream, f_string_eol_s, context.set.standout, option_other, context.set.standout, description);
* @see fl_print_format()
*/
#ifndef _di_fll_program_print_help_option_
- extern f_status_t fll_program_print_help_option(const f_file_t output, const f_color_context_t context, const f_string_static_t option_short, const f_string_static_t option_long, const f_string_static_t symbol_short, const f_string_static_t symbol_long, const f_string_t description);
+ extern f_status_t fll_program_print_help_option(const f_file_t output, const f_color_context_t context, const f_string_static_t option_short, const f_string_static_t option_long, const f_string_static_t symbol_short, const f_string_static_t symbol_long, const char *description);
#endif // _di_fll_program_print_help_option_
/**
* @see fl_print_format()
*/
#ifndef _di_fll_program_print_help_option_long_
- extern f_status_t fll_program_print_help_option_long(const f_file_t output, const f_color_context_t context, const f_string_static_t option_long, const f_string_static_t symbol_long, const f_string_t description);
+ extern f_status_t fll_program_print_help_option_long(const f_file_t output, const f_color_context_t context, const f_string_static_t option_long, const f_string_static_t symbol_long, const char *description);
#endif // _di_fll_program_print_help_option_long_
/**
* @see fl_print_format()
*/
#ifndef _di_fll_program_print_help_option_other_
- extern f_status_t fll_program_print_help_option_other(const f_file_t output, const f_color_context_t context, const f_string_static_t option_other, const f_string_t description);
+ extern f_status_t fll_program_print_help_option_other(const f_file_t output, const f_color_context_t context, const f_string_static_t option_other, const char *description);
#endif // _di_fll_program_print_help_option_other_
/**
return status;
}
- #ifndef _di_F_status_boolean_
+ #ifndef _di_f_status_boolean_
if (fl_string_dynamic_compare(name, f_status_false_s) == F_equal_to) {
*code = F_false;
return F_none;
}
- #endif // _di_F_status_boolean_
+ #endif // _di_f_status_boolean_
- #ifndef _di_F_status_signal_
+ #ifndef _di_f_status_signal_
if (fl_string_dynamic_compare(name, f_status_signal_hangup_s) == F_equal_to) {
*code = F_signal_hangup;
return F_none;
}
- #endif // _di_F_status_signal_
+ #endif // _di_f_status_signal_
- #ifndef _di_F_status_basic_
+ #ifndef _di_f_status_basic_
if (fl_string_dynamic_compare(name, f_status_none_s) == F_equal_to) {
*code = F_none;
return F_none;
}
- #endif // _di_F_status_basic_
+ #endif // _di_f_status_basic_
- #ifndef _di_F_status_array_
+ #ifndef _di_f_status_array_
if (fl_string_dynamic_compare(name, f_status_array_s) == F_equal_to) {
*code = F_array;
return F_none;
}
- #endif // _di_F_status_array_
+ #endif // _di_f_status_array_
- #ifndef _di_F_status_available_
+ #ifndef _di_f_status_available_
if (fl_string_dynamic_compare(name, f_status_available_s) == F_equal_to) {
*code = F_available;
return F_none;
}
- #endif // _di_F_status_available_
+ #endif // _di_f_status_available_
- #ifndef _di_F_status_busy_
+ #ifndef _di_f_status_busy_
if (fl_string_dynamic_compare(name, f_status_busy_s) == F_equal_to) {
*code = F_busy;
return F_none;
}
- #endif // _di_F_status_busy_
+ #endif // _di_f_status_busy_
- #ifndef _di_F_status_network_
+ #ifndef _di_f_status_network_
if (fl_string_dynamic_compare(name, f_status_network_s) == F_equal_to) {
*code = F_network;
return F_none;
}
- #endif // _di_F_status_network_
+ #endif // _di_f_status_network_
- #ifndef _di_F_status_number_
+ #ifndef _di_f_status_number_
if (fl_string_dynamic_compare(name, f_status_number_s) == F_equal_to) {
*code = F_number;
return F_none;
}
- #endif // _di_F_status_number_
+ #endif // _di_f_status_number_
- #ifndef _di_F_status_buffer_
+ #ifndef _di_f_status_buffer_
if (fl_string_dynamic_compare(name, f_status_buffer_s) == F_equal_to) {
*code = F_buffer;
return F_none;
}
- #endif // _di_F_status_buffer_
+ #endif // _di_f_status_buffer_
- #ifndef _di_F_status_process_
+ #ifndef _di_f_status_process_
if (fl_string_dynamic_compare(name, f_status_process_s) == F_equal_to) {
*code = F_process;
return F_none;
}
- #endif // _di_F_status_process_
+ #endif // _di_f_status_process_
- #ifndef _di_F_status_file_
+ #ifndef _di_f_status_file_
if (fl_string_dynamic_compare(name, f_status_file_s) == F_equal_to) {
*code = F_file;
return F_none;
}
- #endif // _di_F_status_file_
+ #endif // _di_f_status_file_
- #ifndef _di_F_status_filesystem_
+ #ifndef _di_f_status_filesystem_
if (fl_string_dynamic_compare(name, f_status_filesystem_s) == F_equal_to) {
*code = F_filesystem;
return F_none;
}
- #endif // _di_F_status_filesystem_
+ #endif // _di_f_status_filesystem_
- #ifndef _di_F_status_directory_
+ #ifndef _di_f_status_directory_
if (fl_string_dynamic_compare(name, f_status_directory_s) == F_equal_to) {
*code = F_directory;
return F_none;
}
- #endif // _di_F_status_directory_
+ #endif // _di_f_status_directory_
- #ifndef _di_F_status_socket_
+ #ifndef _di_f_status_socket_
if (fl_string_dynamic_compare(name, f_status_socket_s) == F_equal_to) {
*code = F_socket;
return F_none;
}
- #endif // _di_F_status_socket_
+ #endif // _di_f_status_socket_
- #ifndef _di_F_status_compare_
+ #ifndef _di_f_status_compare_
if (fl_string_dynamic_compare(name, f_status_equal_to_s) == F_equal_to) {
*code = F_equal_to;
return F_none;
}
- #endif // _di_F_status_compare_
+ #endif // _di_f_status_compare_
- #ifndef _di_F_status_access_
+ #ifndef _di_f_status_access_
if (fl_string_dynamic_compare(name, f_status_access_s) == F_equal_to) {
*code = F_access;
return F_none;
}
- #endif // _di_F_status_access_
+ #endif // _di_f_status_access_
- #ifndef _di_F_status_terminal_
+ #ifndef _di_f_status_terminal_
if (fl_string_dynamic_compare(name, f_status_terminal_s) == F_equal_to) {
*code = F_terminal;
return F_none;
}
- #endif // _di_F_status_terminal_
+ #endif // _di_f_status_terminal_
if (fl_string_dynamic_compare(name, f_status_status_code_last_s) == F_equal_to) {
*code = F_status_code_last;
int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
- const f_console_arguments_t arguments = { argc, argv, envp };
+ const f_console_arguments_t arguments = macro_f_console_arguments_t_initialize(argc, argv, envp);
byte_dump_main_t data = byte_dump_main_t_initialize;
if (f_pipe_input_exists()) {
f_status_t status = F_none;
uint64_t position = 0;
- unsigned char byte = 0;
- unsigned char offset = 0;
+ f_char_t byte = 0;
+ f_char_t offset = 0;
int byte_get = 0;
int8_t width_utf = -1;
byte_get = fseek(file.stream, main->first, SEEK_SET);
}
else {
- unsigned char skip[main->first];
+ f_char_t skip[main->first];
- byte_get = fread(skip, sizeof(unsigned char), main->first, file.stream);
+ byte_get = fread(skip, sizeof(f_char_t), main->first, file.stream);
}
}
characters.size = main->width;
// Record when a character is invalid.
- unsigned char invalid[main->width];
- memset(&invalid, 0, sizeof(unsigned char) * main->width);
+ f_char_t invalid[main->width];
+ memset(&invalid, 0, sizeof(f_char_t) * main->width);
if (byte_get >= 0) {
for (uint16_t signal_check = 0; ; ) {
if (byte_get < 0) break;
- byte = (unsigned char) byte_get;
+ byte = (f_char_t) byte_get;
// Storing the next character is designated by width_utf == -1.
if (width_utf == -1) {
if (character_reset) {
characters.used = 0;
character_reset = F_false;
- memset(&invalid, 0, sizeof(unsigned char) * main->width);
+ memset(&invalid, 0, sizeof(f_char_t) * main->width);
}
character_current = characters.used++;
#endif // _di_byte_dump_file_
#ifndef _di_byte_dump_print_character_fragment_
- bool byte_dump_print_character_fragment(byte_dump_main_t * const main, const f_utf_string_static_t characters, const unsigned char invalid[], const uint8_t width_utf, const unsigned char byte_current, byte_dump_previous_t *previous, byte_dump_cell_t *cell, unsigned char *offset) {
+ bool byte_dump_print_character_fragment(byte_dump_main_t * const main, const f_utf_string_static_t characters, const f_char_t invalid[], const uint8_t width_utf, const f_char_t byte_current, byte_dump_previous_t *previous, byte_dump_cell_t *cell, f_char_t *offset) {
- unsigned char byte = 0;
+ f_char_t byte = 0;
bool reset = F_false;
fl_print_format("%[%016_UL%] ", main->output.to.stream, main->context.set.notable, cell->row, main->context.set.notable);
if (*offset) {
- unsigned char offset_to_print = *offset;
+ f_char_t offset_to_print = *offset;
// Pad the buffer with spaces to hide any skipped bytes (skipped via --first).
while (offset_to_print && cell->column < main->width) {
#endif // _di_byte_dump_print_character_fragment_
#ifndef _di_byte_dump_print_text_
- void byte_dump_print_text(byte_dump_main_t * const main, const f_utf_string_static_t characters, const unsigned char invalid[], byte_dump_previous_t *previous, unsigned char *offset) {
+ void byte_dump_print_text(byte_dump_main_t * const main, const f_utf_string_static_t characters, const f_char_t invalid[], byte_dump_previous_t *previous, f_char_t *offset) {
- unsigned char c = 0;
+ f_char_t c = 0;
uint8_t at = 0;
uint8_t width_utf = 0;
bool print = F_true;
- unsigned char byte[5] = { 0, 0, 0, 0, 0 };
+ f_char_t byte[5] = { 0, 0, 0, 0, 0 };
fl_print_format(" %[%r%] ", main->output.to.stream, main->context.set.notable, byte_dump_character_wall_s, main->context.set.notable);
* @see byte_dump_print_text()
*/
#ifndef _di_byte_dump_print_character_fragment_
- extern bool byte_dump_print_character_fragment(byte_dump_main_t * const main, const f_utf_string_static_t characters, const unsigned char invalid[], const uint8_t width_utf, const unsigned char byte_current, byte_dump_previous_t *previous, byte_dump_cell_t *cell, unsigned char *offset) F_attribute_visibility_internal_d;
+ extern bool byte_dump_print_character_fragment(byte_dump_main_t * const main, const f_utf_string_static_t characters, const f_char_t invalid[], const uint8_t width_utf, const f_char_t byte_current, byte_dump_previous_t *previous, byte_dump_cell_t *cell, f_char_t *offset) F_attribute_visibility_internal_d;
#endif // _di_byte_dump_print_character_fragment_
/**
* Will be reduced to 0 once used.
*/
#ifndef _di_byte_dump_print_text_
- extern void byte_dump_print_text(byte_dump_main_t * const main, const f_utf_string_static_t characters, const unsigned char invalid[], byte_dump_previous_t *previous, unsigned char *offset) F_attribute_visibility_internal_d;
+ extern void byte_dump_print_text(byte_dump_main_t * const main, const f_utf_string_static_t characters, const f_char_t invalid[], byte_dump_previous_t *previous, f_char_t *offset) F_attribute_visibility_internal_d;
#endif // _di_byte_dump_print_text_
#ifdef __cplusplus
#ifndef _di_controller_control_respond_error_string_
f_status_t controller_control_respond_error_string(const controller_global_t * const global, controller_control_t * const control, const f_status_t status, const f_string_t message) {
- const f_string_static_t string = macro_f_string_static_t_initialize2(message, strlen((const char *) message));
+ const f_string_static_t string = macro_f_string_static_t_initialize2(message, strlen(message));
return controller_control_respond_error(global, control, status, string);
}
*/
int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
- const f_console_arguments_t arguments = { argc, argv, envp };
+ const f_console_arguments_t arguments = macro_f_console_arguments_t_initialize(argc, argv, envp);
fake_main_t data = fake_main_t_initialize;
fll_program_standard_setup(&data.signal);
}
}
- unsigned char parameter_file_name_string[parameter_file_name.used + 1];
- unsigned char parameter_file_name_major_string[parameter_file_name_major.used + 1];
- unsigned char parameter_file_name_minor_string[parameter_file_name_minor.used + 1];
- unsigned char parameter_file_name_micro_string[parameter_file_name_micro.used + 1];
- unsigned char parameter_file_name_nano_string[parameter_file_name_nano.used + 1];
+ f_char_t parameter_file_name_string[parameter_file_name.used + 1];
+ f_char_t parameter_file_name_major_string[parameter_file_name_major.used + 1];
+ f_char_t parameter_file_name_minor_string[parameter_file_name_minor.used + 1];
+ f_char_t parameter_file_name_micro_string[parameter_file_name_micro.used + 1];
+ f_char_t parameter_file_name_nano_string[parameter_file_name_nano.used + 1];
parameter_file_name.string = parameter_file_name_string;
parameter_file_name_major.string = parameter_file_name_major_string;
for (; i < strings_length; ++i) {
- memcpy(strings[i]->string, fake_build_parameter_library_name_prefix_s.string, sizeof(unsigned char) * fake_build_parameter_library_name_prefix_s.used);
+ memcpy(strings[i]->string, fake_build_parameter_library_name_prefix_s.string, sizeof(f_char_t) * fake_build_parameter_library_name_prefix_s.used);
strings[i]->used += fake_build_parameter_library_name_prefix_s.used;
} // for
for (i = 0; i < strings_length; ++i) {
- memcpy(strings[i]->string + strings[i]->used, data_build->setting.build_name.string, sizeof(unsigned char) * data_build->setting.build_name.used);
+ memcpy(strings[i]->string + strings[i]->used, data_build->setting.build_name.string, sizeof(f_char_t) * data_build->setting.build_name.used);
strings[i]->used += data_build->setting.build_name.used;
} // for
for (i = 0; i < strings_length; ++i) {
- memcpy(strings[i]->string + strings[i]->used, fake_build_parameter_library_name_suffix_shared_s.string, sizeof(unsigned char) * fake_build_parameter_library_name_suffix_shared_s.used);
+ memcpy(strings[i]->string + strings[i]->used, fake_build_parameter_library_name_suffix_shared_s.string, sizeof(f_char_t) * fake_build_parameter_library_name_suffix_shared_s.used);
strings[i]->used += fake_build_parameter_library_name_suffix_shared_s.used;
} // for
if (data_build->setting.version_major_prefix.used) {
for (i = 1; i < strings_length; ++i) {
- memcpy(strings[i]->string + strings[i]->used, data_build->setting.version_major_prefix.string, sizeof(unsigned char) * data_build->setting.version_major_prefix.used);
+ memcpy(strings[i]->string + strings[i]->used, data_build->setting.version_major_prefix.string, sizeof(f_char_t) * data_build->setting.version_major_prefix.used);
strings[i]->used += data_build->setting.version_major_prefix.used;
} // for
for (i = 1; i < strings_length; ++i) {
- memcpy(strings[i]->string + strings[i]->used, data_build->setting.version_major.string, sizeof(unsigned char) * data_build->setting.version_major.used);
+ memcpy(strings[i]->string + strings[i]->used, data_build->setting.version_major.string, sizeof(f_char_t) * data_build->setting.version_major.used);
strings[i]->used += data_build->setting.version_major.used;
} // for
if (data_build->setting.version_minor_prefix.used) {
for (i = 2; i < strings_length; ++i) {
- memcpy(strings[i]->string + strings[i]->used, data_build->setting.version_minor_prefix.string, sizeof(unsigned char) * data_build->setting.version_minor_prefix.used);
+ memcpy(strings[i]->string + strings[i]->used, data_build->setting.version_minor_prefix.string, sizeof(f_char_t) * data_build->setting.version_minor_prefix.used);
strings[i]->used += data_build->setting.version_minor_prefix.used;
} // for
for (i = 2; i < strings_length; ++i) {
- memcpy(strings[i]->string + strings[i]->used, data_build->setting.version_minor.string, sizeof(unsigned char) * data_build->setting.version_minor.used);
+ memcpy(strings[i]->string + strings[i]->used, data_build->setting.version_minor.string, sizeof(f_char_t) * data_build->setting.version_minor.used);
strings[i]->used += data_build->setting.version_minor.used;
} // for
if (data_build->setting.version_micro_prefix.used) {
for (i = 3; i < strings_length; ++i) {
- memcpy(strings[i]->string + strings[i]->used, data_build->setting.version_micro_prefix.string, sizeof(unsigned char) * data_build->setting.version_micro_prefix.used);
+ memcpy(strings[i]->string + strings[i]->used, data_build->setting.version_micro_prefix.string, sizeof(f_char_t) * data_build->setting.version_micro_prefix.used);
strings[i]->used += data_build->setting.version_micro_prefix.used;
} // for
for (i = 3; i < strings_length; ++i) {
- memcpy(strings[i]->string + strings[i]->used, data_build->setting.version_micro.string, sizeof(unsigned char) * data_build->setting.version_micro.used);
+ memcpy(strings[i]->string + strings[i]->used, data_build->setting.version_micro.string, sizeof(f_char_t) * data_build->setting.version_micro.used);
strings[i]->used += data_build->setting.version_micro.used;
} // for
if (data_build->setting.version_nano_prefix.used) {
for (i = 4; i < strings_length; ++i) {
- memcpy(strings[i]->string + strings[i]->used, data_build->setting.version_nano_prefix.string, sizeof(unsigned char) * data_build->setting.version_nano_prefix.used);
+ memcpy(strings[i]->string + strings[i]->used, data_build->setting.version_nano_prefix.string, sizeof(f_char_t) * data_build->setting.version_nano_prefix.used);
strings[i]->used += data_build->setting.version_nano_prefix.used;
} // for
for (i = 4; i < strings_length; ++i) {
- memcpy(strings[i]->string + strings[i]->used, data_build->setting.version_nano.string, sizeof(unsigned char) * data_build->setting.version_nano.used);
+ memcpy(strings[i]->string + strings[i]->used, data_build->setting.version_nano.string, sizeof(f_char_t) * data_build->setting.version_nano.used);
strings[i]->used += data_build->setting.version_nano.used;
} // for
parameter_linker.used += parameter_file_name_nano.used;
}
- unsigned char parameter_file_path_string[parameter_file_path.used + 1];
- unsigned char parameter_linker_string[parameter_linker.used + 1];
+ f_char_t parameter_file_path_string[parameter_file_path.used + 1];
+ f_char_t parameter_linker_string[parameter_linker.used + 1];
parameter_file_path.string = parameter_file_path_string;
parameter_linker.string = parameter_linker_string;
parameter_file_path_string[parameter_file_path.used] = 0;
parameter_linker_string[parameter_linker.used] = 0;
- memcpy(parameter_file_path_string, main->path_build_libraries_shared.string, sizeof(unsigned char) * main->path_build_libraries_shared.used);
- memcpy(parameter_linker_string, fake_build_parameter_library_shared_prefix_s.string, sizeof(unsigned char) * fake_build_parameter_library_shared_prefix_s.used);
+ memcpy(parameter_file_path_string, main->path_build_libraries_shared.string, sizeof(f_char_t) * main->path_build_libraries_shared.used);
+ memcpy(parameter_linker_string, fake_build_parameter_library_shared_prefix_s.string, sizeof(f_char_t) * fake_build_parameter_library_shared_prefix_s.used);
if (data_build->setting.version_file == fake_build_version_type_major_e) {
- memcpy(parameter_file_path_string + main->path_build_libraries_shared.used, parameter_file_name_major_string, sizeof(unsigned char) * parameter_file_name_major.used);
+ memcpy(parameter_file_path_string + main->path_build_libraries_shared.used, parameter_file_name_major_string, sizeof(f_char_t) * parameter_file_name_major.used);
}
else if (data_build->setting.version_file == fake_build_version_type_minor_e) {
- memcpy(parameter_file_path_string + main->path_build_libraries_shared.used, parameter_file_name_minor_string, sizeof(unsigned char) * parameter_file_name_minor.used);
+ memcpy(parameter_file_path_string + main->path_build_libraries_shared.used, parameter_file_name_minor_string, sizeof(f_char_t) * parameter_file_name_minor.used);
}
else if (data_build->setting.version_file == fake_build_version_type_micro_e) {
- memcpy(parameter_file_path_string + main->path_build_libraries_shared.used, parameter_file_name_micro_string, sizeof(unsigned char) * parameter_file_name_micro.used);
+ memcpy(parameter_file_path_string + main->path_build_libraries_shared.used, parameter_file_name_micro_string, sizeof(f_char_t) * parameter_file_name_micro.used);
}
else if (data_build->setting.version_file == fake_build_version_type_nano_e) {
- memcpy(parameter_file_path_string + main->path_build_libraries_shared.used, parameter_file_name_nano_string, sizeof(unsigned char) * parameter_file_name_nano.used);
+ memcpy(parameter_file_path_string + main->path_build_libraries_shared.used, parameter_file_name_nano_string, sizeof(f_char_t) * parameter_file_name_nano.used);
}
if (data_build->setting.version_target == fake_build_version_type_major_e) {
- memcpy(parameter_linker_string + fake_build_parameter_library_shared_prefix_s.used, parameter_file_name_major_string, sizeof(unsigned char) * parameter_file_name_major.used);
+ memcpy(parameter_linker_string + fake_build_parameter_library_shared_prefix_s.used, parameter_file_name_major_string, sizeof(f_char_t) * parameter_file_name_major.used);
}
else if (data_build->setting.version_target == fake_build_version_type_minor_e) {
- memcpy(parameter_linker_string + fake_build_parameter_library_shared_prefix_s.used, parameter_file_name_minor_string, sizeof(unsigned char) * parameter_file_name_minor.used);
+ memcpy(parameter_linker_string + fake_build_parameter_library_shared_prefix_s.used, parameter_file_name_minor_string, sizeof(f_char_t) * parameter_file_name_minor.used);
}
else if (data_build->setting.version_target == fake_build_version_type_micro_e) {
- memcpy(parameter_linker_string + fake_build_parameter_library_shared_prefix_s.used, parameter_file_name_micro_string, sizeof(unsigned char) * parameter_file_name_micro.used);
+ memcpy(parameter_linker_string + fake_build_parameter_library_shared_prefix_s.used, parameter_file_name_micro_string, sizeof(f_char_t) * parameter_file_name_micro.used);
}
else if (data_build->setting.version_target == fake_build_version_type_nano_e) {
- memcpy(parameter_linker_string + fake_build_parameter_library_shared_prefix_s.used, parameter_file_name_nano_string, sizeof(unsigned char) * parameter_file_name_nano.used);
+ memcpy(parameter_linker_string + fake_build_parameter_library_shared_prefix_s.used, parameter_file_name_nano_string, sizeof(f_char_t) * parameter_file_name_nano.used);
}
const f_string_static_t values[] = {
f_string_static_t parameter_file_path = f_string_static_t_initialize;
parameter_file_path.used = main->path_build_libraries_shared.used + parameter_file_name.used;
- unsigned char parameter_file_path_string[parameter_file_path.used + 1];
+ f_char_t parameter_file_path_string[parameter_file_path.used + 1];
parameter_file_path.string = parameter_file_path_string;
parameter_file_path_string[parameter_file_path.used] = 0;
- memcpy(parameter_file_path_string, main->path_build_libraries_shared.string, sizeof(unsigned char) * main->path_build_libraries_shared.used);
- memcpy(parameter_file_path_string + main->path_build_libraries_shared.used, parameter_file_name.string, sizeof(unsigned char) * parameter_file_name.used);
+ memcpy(parameter_file_path_string, main->path_build_libraries_shared.string, sizeof(f_char_t) * main->path_build_libraries_shared.used);
+ memcpy(parameter_file_path_string + main->path_build_libraries_shared.used, parameter_file_name.string, sizeof(f_char_t) * parameter_file_name.used);
*status = f_file_link(parameter_file_name_major, parameter_file_path);
{
parameter_file_path.used = main->path_build_libraries_shared.used + parameter_file_name_major.used;
- unsigned char parameter_file_path_string[parameter_file_path.used + 1];
+ f_char_t parameter_file_path_string[parameter_file_path.used + 1];
parameter_file_path.string = parameter_file_path_string;
parameter_file_path_string[parameter_file_path.used] = 0;
- memcpy(parameter_file_path_string, main->path_build_libraries_shared.string, sizeof(unsigned char) * main->path_build_libraries_shared.used);
- memcpy(parameter_file_path_string + main->path_build_libraries_shared.used, parameter_file_name_major.string, sizeof(unsigned char) * parameter_file_name_major.used);
+ memcpy(parameter_file_path_string, main->path_build_libraries_shared.string, sizeof(f_char_t) * main->path_build_libraries_shared.used);
+ memcpy(parameter_file_path_string + main->path_build_libraries_shared.used, parameter_file_name_major.string, sizeof(f_char_t) * parameter_file_name_major.used);
*status = f_file_link(parameter_file_name_minor, parameter_file_path);
{
parameter_file_path.used = main->path_build_libraries_shared.used + parameter_file_name_minor.used;
- unsigned char parameter_file_path_string[parameter_file_path.used + 1];
+ f_char_t parameter_file_path_string[parameter_file_path.used + 1];
parameter_file_path.string = parameter_file_path_string;
parameter_file_path_string[parameter_file_path.used] = 0;
- memcpy(parameter_file_path_string, main->path_build_libraries_shared.string, sizeof(unsigned char) * main->path_build_libraries_shared.used);
- memcpy(parameter_file_path_string + main->path_build_libraries_shared.used, parameter_file_name_minor.string, sizeof(unsigned char) * parameter_file_name_minor.used);
+ memcpy(parameter_file_path_string, main->path_build_libraries_shared.string, sizeof(f_char_t) * main->path_build_libraries_shared.used);
+ memcpy(parameter_file_path_string + main->path_build_libraries_shared.used, parameter_file_name_minor.string, sizeof(f_char_t) * parameter_file_name_minor.used);
*status = f_file_link(parameter_file_name_micro, parameter_file_path);
if (data_build->setting.version_file != fake_build_version_type_micro_e && parameter_file_name_micro.used) {
parameter_file_path.used = main->path_build_libraries_shared.used + parameter_file_name_micro.used;
- unsigned char parameter_file_path_string[parameter_file_path.used + 1];
+ f_char_t parameter_file_path_string[parameter_file_path.used + 1];
parameter_file_path.string = parameter_file_path_string;
parameter_file_path_string[parameter_file_path.used] = 0;
- memcpy(parameter_file_path_string, main->path_build_libraries_shared.string, sizeof(unsigned char) * main->path_build_libraries_shared.used);
- memcpy(parameter_file_path_string + main->path_build_libraries_shared.used, parameter_file_name_micro.string, sizeof(unsigned char) * parameter_file_name_micro.used);
+ memcpy(parameter_file_path_string, main->path_build_libraries_shared.string, sizeof(f_char_t) * main->path_build_libraries_shared.used);
+ memcpy(parameter_file_path_string + main->path_build_libraries_shared.used, parameter_file_name_micro.string, sizeof(f_char_t) * parameter_file_name_micro.used);
*status = f_file_link(parameter_file_name_nano, parameter_file_path);
destination.used = main->path_build_libraries_static.used + fake_build_parameter_library_name_prefix_s.used;
destination.used += data_build->setting.build_name.used + fake_build_parameter_library_name_suffix_static_s.used;
- unsigned char destination_string[destination.used + 1];
+ f_char_t destination_string[destination.used + 1];
destination.string = destination_string;
destination_string[destination.used] = 0;
destination.used = 0;
- memcpy(destination_string, main->path_build_libraries_static.string, sizeof(unsigned char) * main->path_build_libraries_static.used);
+ memcpy(destination_string, main->path_build_libraries_static.string, sizeof(f_char_t) * main->path_build_libraries_static.used);
destination.used += main->path_build_libraries_static.used;
- memcpy(destination_string + destination.used, fake_build_parameter_library_name_prefix_s.string, sizeof(unsigned char) * fake_build_parameter_library_name_prefix_s.used);
+ memcpy(destination_string + destination.used, fake_build_parameter_library_name_prefix_s.string, sizeof(f_char_t) * fake_build_parameter_library_name_prefix_s.used);
destination.used += fake_build_parameter_library_name_prefix_s.used;
- memcpy(destination_string + destination.used, data_build->setting.build_name.string, sizeof(unsigned char) * data_build->setting.build_name.used);
+ memcpy(destination_string + destination.used, data_build->setting.build_name.string, sizeof(f_char_t) * data_build->setting.build_name.used);
destination.used += data_build->setting.build_name.used;
- memcpy(destination_string + destination.used, fake_build_parameter_library_name_suffix_static_s.string, sizeof(unsigned char) * fake_build_parameter_library_name_suffix_static_s.used);
+ memcpy(destination_string + destination.used, fake_build_parameter_library_name_suffix_static_s.string, sizeof(f_char_t) * fake_build_parameter_library_name_suffix_static_s.used);
destination.used += fake_build_parameter_library_name_suffix_static_s.used;
*status = fll_execute_arguments_add(destination, &arguments);
source.used = main->path_build_objects.used + file_name.used + fake_build_parameter_object_name_suffix_s.used;
}
- unsigned char source_string[source.used + 1];
+ f_char_t source_string[source.used + 1];
source.string = source_string;
source_string[source.used] = 0;
if (source_path.used) {
- memcpy(source_string, source_path.string, sizeof(unsigned char) * source_path.used);
- memcpy(source_string + source_path.used, file_name.string, sizeof(unsigned char) * file_name.used);
- memcpy(source_string + source_path.used + file_name.used, fake_build_parameter_object_name_suffix_s.string, sizeof(unsigned char) * fake_build_parameter_object_name_suffix_s.used);
+ memcpy(source_string, source_path.string, sizeof(f_char_t) * source_path.used);
+ memcpy(source_string + source_path.used, file_name.string, sizeof(f_char_t) * file_name.used);
+ memcpy(source_string + source_path.used + file_name.used, fake_build_parameter_object_name_suffix_s.string, sizeof(f_char_t) * fake_build_parameter_object_name_suffix_s.used);
}
else {
- memcpy(source_string, main->path_build_objects.string, sizeof(unsigned char) * main->path_build_objects.used);
- memcpy(source_string + main->path_build_objects.used, file_name.string, sizeof(unsigned char) * file_name.used);
- memcpy(source_string + main->path_build_objects.used + file_name.used, fake_build_parameter_object_name_suffix_s.string, sizeof(unsigned char) * fake_build_parameter_object_name_suffix_s.used);
+ memcpy(source_string, main->path_build_objects.string, sizeof(f_char_t) * main->path_build_objects.used);
+ memcpy(source_string + main->path_build_objects.used, file_name.string, sizeof(f_char_t) * file_name.used);
+ memcpy(source_string + main->path_build_objects.used + file_name.used, fake_build_parameter_object_name_suffix_s.string, sizeof(f_char_t) * fake_build_parameter_object_name_suffix_s.used);
}
*status = fll_execute_arguments_add(source, &arguments);
f_string_static_t path_file = f_string_static_t_initialize;
path_file.used = main->path_data_build.used + setting_file.used;
- char path_file_string[path_file.used + 1];
+ f_char_t path_file_string[path_file.used + 1];
path_file.string = path_file_string;
path_file_string[path_file.used] = 0;
f_fss_contents_t contents = f_fss_contents_t_initialize;
if (setting_file.used) {
- memcpy(path_file_string, main->path_data_build.string, sizeof(unsigned char) * main->path_data_build.used);
- memcpy(path_file_string + main->path_data_build.used, setting_file.string, sizeof(unsigned char) * setting_file.used);
+ memcpy(path_file_string, main->path_data_build.string, sizeof(f_char_t) * main->path_data_build.used);
+ memcpy(path_file_string + main->path_data_build.used, setting_file.string, sizeof(f_char_t) * setting_file.used);
*status = fake_file_buffer(main, path_file, &buffer);
}
F_false,
};
- f_string_t function = "fll_fss_snatch_apart";
+ char *function = "fll_fss_snatch_apart";
*status = fll_fss_snatch_apart(buffer, objects, contents, settings_name, fake_build_setting_total_d, settings_value, settings_matches, 0);
f_string_static_t parameter_file_name_path = f_string_static_t_initialize;
parameter_file_name_path.used = main->path_build_objects_shared.used + data_build->setting.build_name.used + fake_build_parameter_object_name_suffix_s.used;
- unsigned char parameter_file_name_path_string[parameter_file_name_path.used + 1];
+ f_char_t parameter_file_name_path_string[parameter_file_name_path.used + 1];
parameter_file_name_path.string = parameter_file_name_path_string;
parameter_file_name_path_string[parameter_file_name_path.used] = 0;
- memcpy(parameter_file_name_path_string, main->path_build_objects_shared.string, sizeof(unsigned char) * main->path_build_objects_shared.used);
- memcpy(parameter_file_name_path_string + main->path_build_objects_shared.used, data_build->setting.build_name.string, sizeof(unsigned char) * data_build->setting.build_name.used);
- memcpy(parameter_file_name_path_string + main->path_build_objects_static.used + data_build->setting.build_name.used, fake_build_parameter_object_name_suffix_s.string, sizeof(unsigned char) * fake_build_parameter_object_name_suffix_s.used);
+ memcpy(parameter_file_name_path_string, main->path_build_objects_shared.string, sizeof(f_char_t) * main->path_build_objects_shared.used);
+ memcpy(parameter_file_name_path_string + main->path_build_objects_shared.used, data_build->setting.build_name.string, sizeof(f_char_t) * data_build->setting.build_name.used);
+ memcpy(parameter_file_name_path_string + main->path_build_objects_static.used + data_build->setting.build_name.used, fake_build_parameter_object_name_suffix_s.string, sizeof(f_char_t) * fake_build_parameter_object_name_suffix_s.used);
const f_string_static_t values[] = {
fake_build_parameter_object_compile_s,
f_string_static_t parameter_file_name_path = f_string_static_t_initialize;
parameter_file_name_path.used = main->path_build_objects_static.used + data_build->setting.build_name.used + fake_build_parameter_object_name_suffix_s.used;
- unsigned char parameter_file_name_path_string[parameter_file_name_path.used + 1];
+ f_char_t parameter_file_name_path_string[parameter_file_name_path.used + 1];
parameter_file_name_path.string = parameter_file_name_path_string;
parameter_file_name_path_string[parameter_file_name_path.used] = 0;
- memcpy(parameter_file_name_path_string, main->path_build_objects_static.string, sizeof(unsigned char) * main->path_build_objects_static.used);
- memcpy(parameter_file_name_path_string + main->path_build_objects_static.used, data_build->setting.build_name.string, sizeof(unsigned char) * data_build->setting.build_name.used);
- memcpy(parameter_file_name_path_string + main->path_build_objects_static.used + data_build->setting.build_name.used, fake_build_parameter_object_name_suffix_s.string, sizeof(unsigned char) * fake_build_parameter_object_name_suffix_s.used);
+ memcpy(parameter_file_name_path_string, main->path_build_objects_static.string, sizeof(f_char_t) * main->path_build_objects_static.used);
+ memcpy(parameter_file_name_path_string + main->path_build_objects_static.used, data_build->setting.build_name.string, sizeof(f_char_t) * data_build->setting.build_name.used);
+ memcpy(parameter_file_name_path_string + main->path_build_objects_static.used + data_build->setting.build_name.used, fake_build_parameter_object_name_suffix_s.string, sizeof(f_char_t) * fake_build_parameter_object_name_suffix_s.used);
const f_string_static_t values[] = {
fake_build_parameter_object_compile_s,
fake_build_path_source_length(main, data_build, &data_build->setting.path_sources, &source);
- char source_string[source.used + sources[i]->array[j].used + 1];
+ f_char_t source_string[source.used + sources[i]->array[j].used + 1];
source.string = source_string;
fake_build_path_source_string(main, data_build, &data_build->setting.path_sources, &source);
- memcpy(source_string + source.used, sources[i]->array[j].string, sizeof(unsigned char) * sources[i]->array[j].used);
+ memcpy(source_string + source.used, sources[i]->array[j].string, sizeof(f_char_t) * sources[i]->array[j].used);
source.used += sources[i]->array[j].used;
source.string[source.used] = 0;
destination.used = main->path_build_objects.used + file_name.used + fake_build_parameter_object_name_suffix_s.used;
}
- char destination_string[destination.used + 1];
+ f_char_t destination_string[destination.used + 1];
destination.string = destination_string;
destination_string[destination.used] = 0;
if (destination_path.used) {
- memcpy(destination_string, destination_path.string, sizeof(unsigned char) * destination_path.used);
- memcpy(destination_string + destination_path.used, file_name.string, sizeof(unsigned char) * file_name.used);
- memcpy(destination_string + destination_path.used + file_name.used, fake_build_parameter_object_name_suffix_s.string, sizeof(unsigned char) * fake_build_parameter_object_name_suffix_s.used);
+ memcpy(destination_string, destination_path.string, sizeof(f_char_t) * destination_path.used);
+ memcpy(destination_string + destination_path.used, file_name.string, sizeof(f_char_t) * file_name.used);
+ memcpy(destination_string + destination_path.used + file_name.used, fake_build_parameter_object_name_suffix_s.string, sizeof(f_char_t) * fake_build_parameter_object_name_suffix_s.used);
}
else {
- memcpy(destination_string, main->path_build_objects.string, sizeof(unsigned char) * main->path_build_objects.used);
- memcpy(destination_string + main->path_build_objects.used, file_name.string, sizeof(unsigned char) * file_name.used);
- memcpy(destination_string + main->path_build_objects.used + file_name.used, fake_build_parameter_object_name_suffix_s.string, sizeof(unsigned char) * fake_build_parameter_object_name_suffix_s.used);
+ memcpy(destination_string, main->path_build_objects.string, sizeof(f_char_t) * main->path_build_objects.used);
+ memcpy(destination_string + main->path_build_objects.used, file_name.string, sizeof(f_char_t) * file_name.used);
+ memcpy(destination_string + main->path_build_objects.used + file_name.used, fake_build_parameter_object_name_suffix_s.string, sizeof(f_char_t) * fake_build_parameter_object_name_suffix_s.used);
}
const f_string_static_t values[] = {
f_string_static_t parameter_file_name_path = f_string_static_t_initialize;
parameter_file_name_path.used = main->path_build_programs_shared.used + data_build->setting.build_name.used;
- unsigned char parameter_file_name_path_string[parameter_file_name_path.used + 1];
+ f_char_t parameter_file_name_path_string[parameter_file_name_path.used + 1];
parameter_file_name_path.string = parameter_file_name_path_string;
parameter_file_name_path_string[parameter_file_name_path.used] = 0;
- memcpy(parameter_file_name_path_string, main->path_build_programs_shared.string, sizeof(unsigned char) * main->path_build_programs_shared.used);
- memcpy(parameter_file_name_path_string + main->path_build_programs_shared.used, data_build->setting.build_name.string, sizeof(unsigned char) * data_build->setting.build_name.used);
+ memcpy(parameter_file_name_path_string, main->path_build_programs_shared.string, sizeof(f_char_t) * main->path_build_programs_shared.used);
+ memcpy(parameter_file_name_path_string + main->path_build_programs_shared.used, data_build->setting.build_name.string, sizeof(f_char_t) * data_build->setting.build_name.used);
const f_string_static_t values[] = {
fake_build_parameter_library_output_s,
f_string_static_t link_project_library = f_string_static_t_initialize;
link_project_library.used = fake_build_parameter_library_link_file_s.used + data_build->setting.build_name.used;
- unsigned char link_project_library_string[link_project_library.used + 1];
+ f_char_t link_project_library_string[link_project_library.used + 1];
link_project_library.string = link_project_library_string;
link_project_library_string[link_project_library.used] = 0;
- memcpy(link_project_library_string, fake_build_parameter_library_link_file_s.string, sizeof(unsigned char) * fake_build_parameter_library_link_file_s.used);
- memcpy(link_project_library_string + fake_build_parameter_library_link_file_s.used, data_build->setting.build_name.string, sizeof(unsigned char) * data_build->setting.build_name.used);
+ memcpy(link_project_library_string, fake_build_parameter_library_link_file_s.string, sizeof(f_char_t) * fake_build_parameter_library_link_file_s.used);
+ memcpy(link_project_library_string + fake_build_parameter_library_link_file_s.used, data_build->setting.build_name.string, sizeof(f_char_t) * data_build->setting.build_name.used);
*status = fll_execute_arguments_add(link_project_library, &arguments);
}
f_string_static_t source_library = f_string_static_t_initialize;
source_library.used = main->path_build_libraries_static.used + fake_build_parameter_library_name_prefix_s.used + data_build->setting.build_name.used + fake_build_parameter_library_name_suffix_static_s.used;
- unsigned char source_library_string[source_library.used + 1];
+ f_char_t source_library_string[source_library.used + 1];
source_library.string = source_library_string;
source_library_string[source_library.used] = 0;
source_library.used = 0;
// Only include the library if there are sources that would result in it being built.
if (data_build->setting.build_sources_library.used) {
- memcpy(source_library_string, main->path_build_libraries_static.string, sizeof(unsigned char) * main->path_build_libraries_static.used);
+ memcpy(source_library_string, main->path_build_libraries_static.string, sizeof(f_char_t) * main->path_build_libraries_static.used);
source_library.used += main->path_build_libraries_static.used;
- memcpy(source_library_string + source_library.used, fake_build_parameter_library_name_prefix_s.string, sizeof(unsigned char) * fake_build_parameter_library_name_prefix_s.used);
+ memcpy(source_library_string + source_library.used, fake_build_parameter_library_name_prefix_s.string, sizeof(f_char_t) * fake_build_parameter_library_name_prefix_s.used);
source_library.used += fake_build_parameter_library_name_prefix_s.used;
- memcpy(source_library_string + source_library.used, data_build->setting.build_name.string, sizeof(unsigned char) * data_build->setting.build_name.used);
+ memcpy(source_library_string + source_library.used, data_build->setting.build_name.string, sizeof(f_char_t) * data_build->setting.build_name.used);
source_library.used += data_build->setting.build_name.used;
- memcpy(source_library_string + source_library.used, fake_build_parameter_library_name_suffix_static_s.string, sizeof(unsigned char) * fake_build_parameter_library_name_suffix_static_s.used);
+ memcpy(source_library_string + source_library.used, fake_build_parameter_library_name_suffix_static_s.string, sizeof(f_char_t) * fake_build_parameter_library_name_suffix_static_s.used);
source_library.used += fake_build_parameter_library_name_suffix_static_s.used;
}
f_string_static_t parameter_file_name_path = f_string_static_t_initialize;
parameter_file_name_path.used = main->path_build_programs_static.used + data_build->setting.build_name.used;
- unsigned char parameter_file_name_path_string[parameter_file_name_path.used + 1];
+ f_char_t parameter_file_name_path_string[parameter_file_name_path.used + 1];
parameter_file_name_path.string = parameter_file_name_path_string;
parameter_file_name_path_string[parameter_file_name_path.used] = 0;
- memcpy(parameter_file_name_path_string, main->path_build_programs_static.string, sizeof(unsigned char) * main->path_build_programs_static.used);
- memcpy(parameter_file_name_path_string + main->path_build_programs_static.used, data_build->setting.build_name.string, sizeof(unsigned char) * data_build->setting.build_name.used);
+ memcpy(parameter_file_name_path_string, main->path_build_programs_static.string, sizeof(f_char_t) * main->path_build_programs_static.used);
+ memcpy(parameter_file_name_path_string + main->path_build_programs_static.used, data_build->setting.build_name.string, sizeof(f_char_t) * data_build->setting.build_name.used);
const f_string_static_t values[] = {
source_library,
f_string_static_t path_headers = f_string_static_t_initialize;
path_headers.used = main->path_build_includes.used + data_build->setting.path_headers.used;
- unsigned char path_headers_string[path_headers.used + 1];
+ f_char_t path_headers_string[path_headers.used + 1];
path_headers.string = path_headers_string;
if (data_build->setting.path_headers.used) {
- memcpy(path_headers_string, main->path_build_includes.string, sizeof(unsigned char) * main->path_build_includes.used);
- memcpy(path_headers_string + main->path_build_includes.used, data_build->setting.path_headers.string, sizeof(unsigned char) * data_build->setting.path_headers.used);
+ memcpy(path_headers_string, main->path_build_includes.string, sizeof(f_char_t) * main->path_build_includes.used);
+ memcpy(path_headers_string + main->path_build_includes.used, data_build->setting.path_headers.string, sizeof(f_char_t) * data_build->setting.path_headers.used);
}
else {
path_headers.used = 0;
{
f_array_length_t build_libraries_length = fake_build_parameter_library_link_path_s.used + main->path_build_libraries_shared.used;
- unsigned char build_libraries[build_libraries_length + 1];
+ f_char_t build_libraries[build_libraries_length + 1];
- memcpy(build_libraries, fake_build_parameter_library_link_path_s.string, sizeof(unsigned char) * fake_build_parameter_library_link_path_s.used);
+ memcpy(build_libraries, fake_build_parameter_library_link_path_s.string, sizeof(f_char_t) * fake_build_parameter_library_link_path_s.used);
if (is_shared) {
- memcpy(build_libraries + fake_build_parameter_library_link_path_s.used, main->path_build_libraries_shared.string, sizeof(unsigned char) * main->path_build_libraries_shared.used);
+ memcpy(build_libraries + fake_build_parameter_library_link_path_s.used, main->path_build_libraries_shared.string, sizeof(f_char_t) * main->path_build_libraries_shared.used);
}
else {
- memcpy(build_libraries + fake_build_parameter_library_link_path_s.used, main->path_build_libraries_static.string, sizeof(unsigned char) * main->path_build_libraries_static.used);
+ memcpy(build_libraries + fake_build_parameter_library_link_path_s.used, main->path_build_libraries_static.string, sizeof(f_char_t) * main->path_build_libraries_static.used);
}
build_libraries[build_libraries_length] = 0;
f_array_length_t build_includes_length = fake_build_parameter_library_include_s.used + main->path_build_includes.used;
- unsigned char build_includes[build_includes_length + 1];
+ f_char_t build_includes[build_includes_length + 1];
- memcpy(build_includes, fake_build_parameter_library_include_s.string, sizeof(unsigned char) * fake_build_parameter_library_include_s.used);
- memcpy(build_includes + fake_build_parameter_library_include_s.used, main->path_build_includes.string, sizeof(unsigned char) * main->path_build_includes.used);
+ memcpy(build_includes, fake_build_parameter_library_include_s.string, sizeof(f_char_t) * fake_build_parameter_library_include_s.used);
+ memcpy(build_includes + fake_build_parameter_library_include_s.used, main->path_build_includes.string, sizeof(f_char_t) * main->path_build_includes.used);
const f_string_static_t values[] = {
macro_f_string_static_t_initialize(build_libraries, 0, build_libraries_length),
if (F_status_is_error_not(*status)) {
buffer.used = fake_build_parameter_library_include_s.used + main->path_work_includes.used;
- unsigned char buffer_string[buffer.used + 1];
+ f_char_t buffer_string[buffer.used + 1];
buffer.string = buffer_string;
buffer_string[buffer.used] = 0;
- memcpy(buffer_string, fake_build_parameter_library_include_s.string, sizeof(unsigned char) * fake_build_parameter_library_include_s.used);
- memcpy(buffer_string + fake_build_parameter_library_include_s.used, main->path_work_includes.string, sizeof(unsigned char) * main->path_work_includes.used);
+ memcpy(buffer_string, fake_build_parameter_library_include_s.string, sizeof(f_char_t) * fake_build_parameter_library_include_s.used);
+ memcpy(buffer_string + fake_build_parameter_library_include_s.used, main->path_work_includes.string, sizeof(f_char_t) * main->path_work_includes.used);
*status = fll_execute_arguments_add(buffer, arguments);
}
if (data_build->setting.search_shared && (is_shared || !data_build->setting.search_exclusive) && F_status_is_error_not(*status)) {
buffer.used = fake_build_parameter_library_link_path_s.used + main->path_work_libraries_shared.used;
- unsigned char buffer_string[buffer.used + 1];
+ f_char_t buffer_string[buffer.used + 1];
buffer.string = buffer_string;
buffer_string[buffer.used] = 0;
- memcpy(buffer_string, fake_build_parameter_library_link_path_s.string, sizeof(unsigned char) * fake_build_parameter_library_link_path_s.used);
- memcpy(buffer_string + fake_build_parameter_library_link_path_s.used, main->path_work_libraries_shared.string, sizeof(unsigned char) * main->path_work_libraries_shared.used);
+ memcpy(buffer_string, fake_build_parameter_library_link_path_s.string, sizeof(f_char_t) * fake_build_parameter_library_link_path_s.used);
+ memcpy(buffer_string + fake_build_parameter_library_link_path_s.used, main->path_work_libraries_shared.string, sizeof(f_char_t) * main->path_work_libraries_shared.used);
*status = fll_execute_arguments_add(buffer, arguments);
}
if (data_build->setting.search_static && (!is_shared || !data_build->setting.search_exclusive) && F_status_is_error_not(*status)) {
buffer.used = fake_build_parameter_library_link_path_s.used + main->path_work_libraries_static.used;
- unsigned char buffer_string[buffer.used + 1];
+ f_char_t buffer_string[buffer.used + 1];
buffer.string = buffer_string;
buffer_string[buffer.used] = 0;
- memcpy(buffer_string, fake_build_parameter_library_link_path_s.string, sizeof(unsigned char) * fake_build_parameter_library_link_path_s.used);
- memcpy(buffer_string + fake_build_parameter_library_link_path_s.used, main->path_work_libraries_static.string, sizeof(unsigned char) * main->path_work_libraries_static.used);
+ memcpy(buffer_string, fake_build_parameter_library_link_path_s.string, sizeof(f_char_t) * fake_build_parameter_library_link_path_s.used);
+ memcpy(buffer_string + fake_build_parameter_library_link_path_s.used, main->path_work_libraries_static.string, sizeof(f_char_t) * main->path_work_libraries_static.used);
*status = fll_execute_arguments_add(buffer, arguments);
}
fll_print_format("%r%[Copying %Q.%]%r", main->output.to.stream, f_string_eol_s, main->context.set.important, label, main->context.set.important, f_string_eol_s);
}
- macro_f_string_dynamic_t_resize(*status, path_source, source.used);
+ *status = f_string_dynamic_resize(source.used, &path_source);
if (F_status_is_error(*status)) {
- fll_error_print(main->error, F_status_set_fine(*status), " macro_f_string_dynamic_t_resize", F_true);
+ fll_error_print(main->error, F_status_set_fine(*status), " f_string_dynamic_resize", F_true);
f_string_dynamic_resize(0, &path_source);
return;
}
- memcpy(path_source.string, source.string, sizeof(unsigned char) * source.used);
+ memcpy(path_source.string, source.string, sizeof(f_char_t) * source.used);
fl_directory_recurse_t recurse = fl_directory_recurse_t_initialize;
f_string_static_t argument = f_string_static_t_initialize;
argument.used = f_console_symbol_short_disable_s.used + f_console_standard_short_dark_s.used;
- unsigned char argument_string[argument.used + 1];
+ f_char_t argument_string[argument.used + 1];
argument.string = argument_string;
argument_string[argument.used] = 0;
- memcpy(argument_string, f_console_symbol_short_disable_s.string, sizeof(unsigned char) * f_console_symbol_short_disable_s.used);
+ memcpy(argument_string, f_console_symbol_short_disable_s.string, sizeof(f_char_t) * f_console_symbol_short_disable_s.used);
if (main->context.mode == F_color_mode_dark_d) {
- memcpy(argument_string + f_console_symbol_short_disable_s.used, f_console_standard_short_dark_s.string, sizeof(unsigned char) * f_console_standard_short_dark_s.used);
+ memcpy(argument_string + f_console_symbol_short_disable_s.used, f_console_standard_short_dark_s.string, sizeof(f_char_t) * f_console_standard_short_dark_s.used);
}
else if (main->context.mode == F_color_mode_light_d) {
- memcpy(argument_string + f_console_symbol_short_disable_s.used, f_console_standard_short_light_s.string, sizeof(unsigned char) * f_console_standard_short_light_s.used);
+ memcpy(argument_string + f_console_symbol_short_disable_s.used, f_console_standard_short_light_s.string, sizeof(f_char_t) * f_console_standard_short_light_s.used);
}
else if (main->context.mode == F_color_mode_no_color_d) {
- memcpy(argument_string + f_console_symbol_short_disable_s.used, f_console_standard_short_no_color_s.string, sizeof(unsigned char) * f_console_standard_short_no_color_s.used);
+ memcpy(argument_string + f_console_symbol_short_disable_s.used, f_console_standard_short_no_color_s.string, sizeof(f_char_t) * f_console_standard_short_no_color_s.used);
}
*status = fll_execute_arguments_add(argument, &arguments);
f_string_static_t argument = f_string_static_t_initialize;
argument.used = f_console_symbol_short_disable_s.used + f_console_standard_short_quiet_s.used;
- unsigned char argument_string[argument.used + 1];
+ f_char_t argument_string[argument.used + 1];
argument.string = argument_string;
argument_string[argument.used] = 0;
- memcpy(argument_string, f_console_symbol_short_disable_s.string, sizeof(unsigned char) * f_console_symbol_short_disable_s.used);
+ memcpy(argument_string, f_console_symbol_short_disable_s.string, sizeof(f_char_t) * f_console_symbol_short_disable_s.used);
if (main->context.mode == f_console_verbosity_quiet_e) {
- memcpy(argument_string + f_console_symbol_short_disable_s.used, f_console_standard_short_quiet_s.string, sizeof(unsigned char) * f_console_standard_short_quiet_s.used);
+ memcpy(argument_string + f_console_symbol_short_disable_s.used, f_console_standard_short_quiet_s.string, sizeof(f_char_t) * f_console_standard_short_quiet_s.used);
}
else if (main->context.mode == f_console_verbosity_verbose_e) {
- memcpy(argument_string + f_console_symbol_short_disable_s.used, f_console_standard_short_verbose_s.string, sizeof(unsigned char) * f_console_standard_short_verbose_s.used);
+ memcpy(argument_string + f_console_symbol_short_disable_s.used, f_console_standard_short_verbose_s.string, sizeof(f_char_t) * f_console_standard_short_verbose_s.used);
}
else if (main->context.mode == f_console_verbosity_debug_e) {
- memcpy(argument_string + f_console_symbol_short_disable_s.used, f_console_standard_short_debug_s.string, sizeof(unsigned char) * f_console_standard_short_debug_s.used);
+ memcpy(argument_string + f_console_symbol_short_disable_s.used, f_console_standard_short_debug_s.string, sizeof(f_char_t) * f_console_standard_short_debug_s.used);
}
*status = fll_execute_arguments_add(argument, &arguments);
source.used = path->used + sources[i]->array[j].used;
- unsigned char source_string[source.used + 1];
+ f_char_t source_string[source.used + 1];
source.string = source_string;
source_string[source.used] = 0;
- memcpy(source_string, path->string, sizeof(unsigned char) * path->used);
- memcpy(source_string + path->used, sources[i]->array[j].string, sizeof(unsigned char) * sources[i]->array[j].used);
+ memcpy(source_string, path->string, sizeof(f_char_t) * path->used);
+ memcpy(source_string + path->used, sources[i]->array[j].string, sizeof(f_char_t) * sources[i]->array[j].used);
status = fll_execute_arguments_add(source, arguments);
if (F_status_is_error(status)) return status;
fake_build_path_source_length(main, &data_build, &data_build.setting.path_sources, &source);
- unsigned char source_string[source.used + fake_path_part_script_s.used + 1];
+ f_char_t source_string[source.used + fake_path_part_script_s.used + 1];
source.string = source_string;
fake_build_path_source_string(main, &data_build, &data_build.setting.path_sources, &source);
- memcpy(source_string + source.used, fake_path_part_script_s.string, sizeof(unsigned char) * fake_path_part_script_s.used);
+ memcpy(source_string + source.used, fake_path_part_script_s.string, sizeof(f_char_t) * fake_path_part_script_s.used);
source.used += fake_path_part_script_s.used;
source.string[source.used] = 0;
fake_build_path_source_length(main, &data_build, &data_build.setting.path_sources, &source);
- unsigned char source_string[source.used + 1];
+ f_char_t source_string[source.used + 1];
source.string = source_string;
fake_build_path_source_string(main, &data_build, &data_build.setting.path_sources, &source);
f_string_static_t path_headers = f_string_static_t_initialize;
path_headers.used = main->path_build_includes.used + data_build.setting.path_headers.used;
- unsigned char path_headers_string[path_headers.used + 1];
+ f_char_t path_headers_string[path_headers.used + 1];
path_headers.string = path_headers_string;
- memcpy(path_headers_string, main->path_build_includes.string, sizeof(unsigned char) * main->path_build_includes.used);
+ memcpy(path_headers_string, main->path_build_includes.string, sizeof(f_char_t) * main->path_build_includes.used);
if (data_build.setting.path_headers.used) {
- memcpy(path_headers_string + main->path_build_includes.used, data_build.setting.path_headers.string, sizeof(unsigned char) * data_build.setting.path_headers.used);
+ memcpy(path_headers_string + main->path_build_includes.used, data_build.setting.path_headers.string, sizeof(f_char_t) * data_build.setting.path_headers.used);
}
path_headers_string[path_headers.used] = 0;
fake_build_path_source_length(main, &data_build, &data_build.setting.path_sources, &source);
- unsigned char source_string[source.used + fake_path_part_script_s.used + 1];
+ f_char_t source_string[source.used + fake_path_part_script_s.used + 1];
source.string = source_string;
fake_build_path_source_string(main, &data_build, &data_build.setting.path_sources, &source);
- memcpy(source_string + source.used, fake_path_part_script_s.string, sizeof(unsigned char) * fake_path_part_script_s.used);
+ memcpy(source_string + source.used, fake_path_part_script_s.string, sizeof(f_char_t) * fake_path_part_script_s.used);
source.used += fake_path_part_script_s.used;
source.string[source.used] = 0;
source->used = 0;
- memcpy(source->string, main->path_sources.string, sizeof(unsigned char) * main->path_sources.used);
+ memcpy(source->string, main->path_sources.string, sizeof(f_char_t) * main->path_sources.used);
source->used += main->path_sources.used;
- memcpy(source->string + source->used, setting_path_source->string, sizeof(unsigned char) * setting_path_source->used);
+ memcpy(source->string + source->used, setting_path_source->string, sizeof(f_char_t) * setting_path_source->used);
source->used += setting_path_source->used;
if (data_build->setting.has_path_standard) {
if (data_build->setting.build_language == fake_build_language_type_c_e) {
- memcpy(source->string + source->used, fake_build_language_c_s.string, sizeof(unsigned char) * fake_build_language_c_s.used);
+ memcpy(source->string + source->used, fake_build_language_c_s.string, sizeof(f_char_t) * fake_build_language_c_s.used);
source->used += fake_build_language_c_s.used;
}
else if (data_build->setting.build_language == fake_build_language_type_cpp_e) {
- memcpy(source->string + source->used, fake_build_language_cpp_s.string, sizeof(unsigned char) * fake_build_language_cpp_s.used);
+ memcpy(source->string + source->used, fake_build_language_cpp_s.string, sizeof(f_char_t) * fake_build_language_cpp_s.used);
source->used += fake_build_language_cpp_s.used;
}
else if (data_build->setting.build_language == fake_build_language_type_bash_e) {
- memcpy(source->string + source->used, fake_build_language_bash_s.string, sizeof(unsigned char) * fake_build_language_bash_s.used);
+ memcpy(source->string + source->used, fake_build_language_bash_s.string, sizeof(f_char_t) * fake_build_language_bash_s.used);
source->used += fake_build_language_bash_s.used;
}
- memcpy(source->string + source->used, f_path_separator_s.string, sizeof(unsigned char) * f_path_separator_s.used);
+ memcpy(source->string + source->used, f_path_separator_s.string, sizeof(f_char_t) * f_path_separator_s.used);
source->used += f_path_separator_s.used;
}
fake_build_path_source_length(main, data_build, &data_build->setting.path_sources, &source);
- unsigned char source_string[source.used + sources[i]->array[j].used + 1];
+ f_char_t source_string[source.used + sources[i]->array[j].used + 1];
source.string = source_string;
fake_build_path_source_string(main, data_build, &data_build->setting.path_sources, &source);
- memcpy(source_string + source.used, sources[i]->array[j].string, sizeof(unsigned char) * sources[i]->array[j].used);
+ memcpy(source_string + source.used, sources[i]->array[j].string, sizeof(f_char_t) * sources[i]->array[j].used);
source.used += sources[i]->array[j].used;
source.string[source.used] = 0;
source.used += generic->used;
}
- unsigned char source_string[source.used + 1];
+ f_char_t source_string[source.used + 1];
source.string = source_string;
fake_build_path_source_string(main, data_build, &data_build->setting.path_sources_object, &source);
if (specific->used) {
- memcpy(source_string + source.used, specific->string, sizeof(unsigned char) * specific->used);
+ memcpy(source_string + source.used, specific->string, sizeof(f_char_t) * specific->used);
source.used += specific->used;
}
else {
- memcpy(source_string + source.used, generic->string, sizeof(unsigned char) * generic->used);
+ memcpy(source_string + source.used, generic->string, sizeof(f_char_t) * generic->used);
source.used += generic->used;
}
if (F_status_set_fine(status) == F_file_found_not || F_status_set_fine(status) == F_directory) {
if (main->error.verbosity >= f_console_verbosity_verbose_e) {
- flockfile(main->warning.to.stream);
-
- f_print_terminated("The build directory '", main->warning.to.stream);
- fl_print_format("%[%Q%]", main->warning.to.stream, main->context.set.notable, main->path_build, main->context.set.notable);
- fl_print_format("' does not exist.%r", main->warning.to.stream, f_string_eol_s);
-
- funlockfile(main->warning.to.stream);
+ fll_print_format("The build directory '%[%Q%]' does not exist.%r", main->warning.to.stream, main->context.set.notable, main->path_build, main->context.set.notable, f_string_eol_s);
}
status = F_none;
f_status_t fake_file_buffer(fake_main_t * const main, const f_string_static_t path_file, f_string_dynamic_t * const buffer) {
f_file_t file = f_file_t_initialize;
- f_string_t name_function = "f_file_exists";
+ char *name_function = "f_file_exists";
f_status_t status = F_none;
if (fake_signal_received(main)) {
size_file = fake_common_initial_buffer_max_d;
}
- macro_f_string_dynamic_t_resize((status), (*buffer), size_file);
+ status = f_string_dynamic_resize(size_file, buffer);
if (F_status_is_error(status)) {
const f_string_static_t message = macro_f_string_static_t_initialize("allocate buffer size for", 0, 24);
// Always have the parameter variable "return" map at index 0 and be pre-initialized.
{
- f_string_t function_name = "macro_f_string_map_multis_t_resize";
+ char *function_name = "macro_f_string_map_multis_t_resize";
macro_f_string_map_multis_t_resize(*status, data_make->setting_make.parameter, fake_default_allocation_small_d);
if (!return_code) {
if (F_status_is_error(status)) {
- status = f_string_append("1", 1, &data_make->setting_make.parameter.array[0].value.array[0]);
+ status = f_string_dynamic_append(f_string_ascii_1_s, &data_make->setting_make.parameter.array[0].value.array[0]);
}
else {
- status = f_string_append("0", 1, &data_make->setting_make.parameter.array[0].value.array[0]);
+ status = f_string_dynamic_append(f_string_ascii_0_s, &data_make->setting_make.parameter.array[0].value.array[0]);
}
if (F_status_is_error(status)) {
- fll_error_print(data_make->error, F_status_set_fine(status), "f_string_append", F_true);
+ fll_error_print(data_make->error, F_status_set_fine(status), "f_string_dynamic_append", F_true);
}
return status;
f_string_dynamic_resize(0, &number);
}
else {
- status = f_string_append("0", 1, &data_make->setting_make.parameter.array[0].value.array[0]);
+ status = f_string_dynamic_append(f_string_ascii_0_s, &data_make->setting_make.parameter.array[0].value.array[0]);
}
if (F_status_is_error(status)) {
- fll_error_print(data_make->error, F_status_set_fine(status), "f_string_append", F_true);
+ fll_error_print(data_make->error, F_status_set_fine(status), "f_string_dynamic_append", F_true);
return status;
}
destination.used += arguments.array[i].used + 1;
}
- unsigned char destination_string[destination.used + 1];
+ f_char_t destination_string[destination.used + 1];
destination.string = destination_string;
destination_string[destination.used] = 0;
- memcpy(destination_string, arguments.array[total].string, sizeof(unsigned char) * arguments.array[total].used);
+ memcpy(destination_string, arguments.array[total].string, sizeof(f_char_t) * arguments.array[total].used);
if (existing) {
- memcpy(destination_string + arguments.array[total].used + 1, arguments.array[i].string, sizeof(unsigned char) * arguments.array[i].used);
+ memcpy(destination_string + arguments.array[total].used + 1, arguments.array[i].string, sizeof(f_char_t) * arguments.array[i].used);
destination_string[arguments.array[total].used] = f_path_separator_s.string[0];
}
destination.used += arguments.array[i].used + 1;
}
- unsigned char destination_string[destination.used + 1];
+ f_char_t destination_string[destination.used + 1];
destination.string = destination_string;
destination_string[destination.used] = 0;
- memcpy(destination_string, arguments.array[total].string, sizeof(unsigned char) * arguments.array[total].used);
+ memcpy(destination_string, arguments.array[total].string, sizeof(f_char_t) * arguments.array[total].used);
if (existing) {
- memcpy(destination_string + arguments.array[total].used + 1, arguments.array[i].string, sizeof(unsigned char) * arguments.array[i].used);
+ memcpy(destination_string + arguments.array[total].used + 1, arguments.array[i].string, sizeof(f_char_t) * arguments.array[i].used);
destination_string[arguments.array[total].used] = f_path_separator_s.string[0];
}
f_string_static_t path_file = f_string_static_t_initialize;
path_file.used = data_make->main->path_data_build.used + arguments.array[0].used;
- unsigned char path_file_string[path_file.used + 1];
+ f_char_t path_file_string[path_file.used + 1];
path_file.string = path_file_string;
path_file_string[path_file.used] = 0;
- memcpy(path_file_string, data_make->main->path_data_build.string, sizeof(unsigned char) * data_make->main->path_data_build.used);
- memcpy(path_file_string + data_make->main->path_data_build.used, arguments.array[0].string, sizeof(unsigned char) * arguments.array[0].used);
+ memcpy(path_file_string, data_make->main->path_data_build.string, sizeof(f_char_t) * data_make->main->path_data_build.used);
+ memcpy(path_file_string + data_make->main->path_data_build.used, arguments.array[0].string, sizeof(f_char_t) * arguments.array[0].used);
f_status_t status_file = f_file_is(path_file, F_file_type_regular_d, F_false);
#endif
#ifndef _di_fake_print_error_build_operation_file_
- bool fake_print_error_build_operation_file(fake_main_t * const main, const f_status_t status, const f_string_t function, const f_string_static_t operation, const f_string_static_t source, const f_string_static_t destination, const f_string_static_t how, const bool fallback) {
+ bool fake_print_error_build_operation_file(fake_main_t * const main, const f_status_t status, const char *function, const f_string_static_t operation, const f_string_static_t source, const f_string_static_t destination, const f_string_static_t how, const bool fallback) {
if (status == F_file_found_not) {
if (main->error.verbosity != f_console_verbosity_quiet_e) {
#endif // #ifndef _di_fake_print_error_build_operation_file_message_
#ifndef _di_fake_print_error_fss
- bool fake_print_error_fss(fake_main_t * const main, const f_status_t status, const f_string_t function, const f_string_static_t path_file, const f_string_range_t range, const bool fallback) {
+ bool fake_print_error_fss(fake_main_t * const main, const f_status_t status, const char *function, const f_string_static_t path_file, const f_string_range_t range, const bool fallback) {
if (status == F_file_found_not) {
if (main->error.verbosity != f_console_verbosity_quiet_e) {
#endif // _di_fake_print_message_section_operation_failed_
#ifndef _di_fake_print_message_section_operation_path_outside_
- void fake_print_message_section_operation_path_outside(fake_main_t * const main, const fl_print_t print, const f_status_t status, const f_string_t function, const f_string_static_t path) {
+ void fake_print_message_section_operation_path_outside(fake_main_t * const main, const fl_print_t print, const f_status_t status, const char *function, const f_string_static_t path) {
if (main->error.verbosity == f_console_verbosity_quiet_e || !print.to.stream) return;
#endif // _di_fake_print_message_section_operation_path_outside_
#ifndef _di_fake_print_message_section_operation_path_stack_max_
- void fake_print_message_section_operation_path_stack_max(fake_main_t * const main, fl_print_t print, const f_status_t status, const f_string_t function, const f_string_static_t path) {
+ void fake_print_message_section_operation_path_stack_max(fake_main_t * const main, fl_print_t print, const f_status_t status, const char *function, const f_string_static_t path) {
if (main->error.verbosity == f_console_verbosity_quiet_e || !print.to.stream) return;
* @see fake_print_error_build_operation_file_message();
*/
#ifndef _di_fake_print_error_operation_file_
- extern bool fake_print_error_build_operation_file(fake_main_t * const main, const f_status_t status, const f_string_t function, const f_string_static_t operation, const f_string_static_t source, const f_string_static_t destination, const f_string_static_t how, const bool fallback) F_attribute_visibility_internal_d;
+ extern bool fake_print_error_build_operation_file(fake_main_t * const main, const f_status_t status, const char *function, const f_string_static_t operation, const f_string_static_t source, const f_string_static_t destination, const f_string_static_t how, const bool fallback) F_attribute_visibility_internal_d;
#endif // _di_fake_print_error_operation_file_
/**
* @see fl_print_format()
*/
#ifndef _di_fake_print_error_fss_
- extern bool fake_print_error_fss(fake_main_t * const main, const f_status_t status, const f_string_t function, const f_string_static_t path_file, const f_string_range_t range, const bool fallback) F_attribute_visibility_internal_d;
+ extern bool fake_print_error_fss(fake_main_t * const main, const f_status_t status, const char *function, const f_string_static_t path_file, const f_string_range_t range, const bool fallback) F_attribute_visibility_internal_d;
#endif // _di_fake_print_error_fss_
/**
* @see fll_error_file_print()
*/
#ifndef _di_fake_print_message_section_operation_path_outside_
- extern void fake_print_message_section_operation_path_outside(fake_main_t * const main, const fl_print_t print, const f_status_t status, const f_string_t function, const f_string_static_t path) F_attribute_visibility_internal_d;
+ extern void fake_print_message_section_operation_path_outside(fake_main_t * const main, const fl_print_t print, const f_status_t status, const char *function, const f_string_static_t path) F_attribute_visibility_internal_d;
#endif // _fake_print_message_section_operation_path_outside_
/**
* @see fll_error_file_print()
*/
#ifndef _di_fake_print_message_section_operation_path_stack_max_
- extern void fake_print_message_section_operation_path_stack_max(fake_main_t * const main, fl_print_t error, const f_status_t status, const f_string_t function, const f_string_static_t path) F_attribute_visibility_internal_d;
+ extern void fake_print_message_section_operation_path_stack_max(fake_main_t * const main, fl_print_t error, const f_status_t status, const char *function, const f_string_static_t path) F_attribute_visibility_internal_d;
#endif // _di_fake_print_message_section_operation_path_stack_max_
/**
fake_skeleton_path_source_length(main, &fake_path_part_cpp_s, &sources_cpp);
fake_skeleton_path_source_length(main, &fake_path_part_script_s, &sources_script);
- unsigned char sources_string[sources.used + 1];
- unsigned char sources_bash_string[sources_bash.used + 1];
- unsigned char sources_c_string[sources_c.used + 1];
- unsigned char sources_cpp_string[sources_cpp.used + 1];
- unsigned char sources_script_string[sources_script.used + 1];
+ f_char_t sources_string[sources.used + 1];
+ f_char_t sources_bash_string[sources_bash.used + 1];
+ f_char_t sources_c_string[sources_c.used + 1];
+ f_char_t sources_cpp_string[sources_cpp.used + 1];
+ f_char_t sources_script_string[sources_script.used + 1];
sources.string = sources_string;
sources_bash.string = sources_bash_string;
source->used = 0;
- memcpy(source->string, main->path_sources.string, sizeof(unsigned char) * main->path_sources.used);
+ memcpy(source->string, main->path_sources.string, sizeof(f_char_t) * main->path_sources.used);
source->used += main->path_sources.used;
- memcpy(source->string, fake_default_path_sources_s.string, sizeof(unsigned char) * fake_default_path_sources_s.used);
+ memcpy(source->string, fake_default_path_sources_s.string, sizeof(f_char_t) * fake_default_path_sources_s.used);
source->used += fake_default_path_sources_s.used;
- memcpy(source->string + source->used, partial->string, sizeof(unsigned char) * partial->used);
+ memcpy(source->string + source->used, partial->string, sizeof(f_char_t) * partial->used);
source->used += partial->used;
source->string[source->used] = 0;
f_string_static_t path_file_other = f_string_static_t_initialize;
path_file_other.used = firewall_network_path_s.used + firewall_file_other_s.used;
- unsigned char path_file_other_string[path_file_other.used + 1];
+ f_char_t path_file_other_string[path_file_other.used + 1];
path_file_other.string = path_file_other_string;
path_file_other_string[path_file_other.used] = 0;
- memcpy(path_file_other_string, firewall_network_path_s.string, sizeof(unsigned char) * firewall_network_path_s.used);
- memcpy(path_file_other_string + firewall_network_path_s.used, firewall_file_other_s.string, sizeof(unsigned char) * firewall_file_other_s.used);
+ memcpy(path_file_other_string, firewall_network_path_s.string, sizeof(f_char_t) * firewall_network_path_s.used);
+ memcpy(path_file_other_string + firewall_network_path_s.used, firewall_file_other_s.string, sizeof(f_char_t) * firewall_file_other_s.used);
status = firewall_buffer_rules(main, path_file_other, F_false, &local);
f_string_static_t path_file_first = f_string_static_t_initialize;
path_file_first.used = firewall_network_path_s.used + firewall_file_first_s.used;
- unsigned char path_file_first_string[path_file_first.used + 1];
+ f_char_t path_file_first_string[path_file_first.used + 1];
path_file_first.string = path_file_first_string;
path_file_first_string[path_file_first.used] = 0;
- memcpy(path_file_first_string, firewall_network_path_s.string, sizeof(unsigned char) * firewall_network_path_s.used);
- memcpy(path_file_first_string + firewall_network_path_s.used, firewall_file_first_s.string, sizeof(unsigned char) * firewall_file_first_s.used);
+ memcpy(path_file_first_string, firewall_network_path_s.string, sizeof(f_char_t) * firewall_network_path_s.used);
+ memcpy(path_file_first_string + firewall_network_path_s.used, firewall_file_first_s.string, sizeof(f_char_t) * firewall_file_first_s.used);
status = firewall_buffer_rules(main, path_file_first, F_false, &local);
int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
- const f_console_arguments_t arguments = { argc, argv, envp };
+ const f_console_arguments_t arguments = macro_f_console_arguments_t_initialize(argc, argv, envp);
firewall_main_t data = firewall_main_t_initialize;
if (f_pipe_input_exists()) {
fll_print_format("%r%[%QUnable to allocate memory.%]%r", output.to.stream, f_string_eol_s, output.context, output.prefix, output.context, f_string_eol_s);
}
-void firewall_print_error_on_invalid_parameter(const fl_print_t output, const f_string_t function) {
+void firewall_print_error_on_invalid_parameter(const fl_print_t output, const char *function) {
if (output.verbosity == f_console_verbosity_quiet_e) return;
fll_print_format("%r%[%QInvalid parameter when calling %s().%]%r", output.to.stream, f_string_eol_s, output.context, output.prefix, function, output.context, f_string_eol_s);
}
-void firewall_print_error_on_invalid_parameter_for_file(const fl_print_t output, const f_string_t function, const f_string_static_t filename) {
+void firewall_print_error_on_invalid_parameter_for_file(const fl_print_t output, const char *function, const f_string_static_t filename) {
if (output.verbosity == f_console_verbosity_quiet_e) return;
funlockfile(output.to.stream);
}
-void firewall_print_error_on_unhandled(const fl_print_t output, const f_string_t function, const f_status_t status) {
+void firewall_print_error_on_unhandled(const fl_print_t output, const char *function, const f_status_t status) {
if (output.verbosity == f_console_verbosity_quiet_e) return;
fll_print_format("%r%[%QAn unhandled error (%ui) has occurred while calling %s().%]%r", output.to.stream, f_string_eol_s, output.context, output.prefix, status, function, output.context, f_string_eol_s);
}
-void firewall_print_error_on_unhandled_for_file(const fl_print_t output, const f_string_t function, const f_status_t status, const f_string_static_t filename) {
+void firewall_print_error_on_unhandled_for_file(const fl_print_t output, const char *function, const f_status_t status, const f_string_static_t filename) {
if (output.verbosity == f_console_verbosity_quiet_e) return;
* @param function
* The function that failed.
*/
-extern void firewall_print_error_on_invalid_parameter(const fl_print_t output, const f_string_t function) F_attribute_visibility_internal_d;
+extern void firewall_print_error_on_invalid_parameter(const fl_print_t output, const char *function) F_attribute_visibility_internal_d;
/**
* Print an invalid parameter error for the given function.
* @param filename
* The name of the file.
*/
-extern void firewall_print_error_on_invalid_parameter_for_file(const fl_print_t output, const f_string_t function, const f_string_static_t filename) F_attribute_visibility_internal_d;
+extern void firewall_print_error_on_invalid_parameter_for_file(const fl_print_t output, const char *function, const f_string_static_t filename) F_attribute_visibility_internal_d;
/**
* Print an error about the given operation failed.
* @param status
* The failure status code.
*/
-extern void firewall_print_error_on_unhandled(const fl_print_t output, const f_string_t function, const f_status_t status) F_attribute_visibility_internal_d;
+extern void firewall_print_error_on_unhandled(const fl_print_t output, const char *function, const f_status_t status) F_attribute_visibility_internal_d;
/**
* Print an unhandled error for the given function for some given file.
* @param filename
* The name of the file.
*/
-extern void firewall_print_error_on_unhandled_for_file(const fl_print_t output, const f_string_t function, const f_status_t status, const f_string_static_t filename) F_attribute_visibility_internal_d;
+extern void firewall_print_error_on_unhandled_for_file(const fl_print_t output, const char *function, const f_status_t status, const f_string_static_t filename) F_attribute_visibility_internal_d;
/**
* Print a message about a process signal being recieved, such as an interrupt signal.
else if (fl_string_dynamic_compare_string(local.buffer.string + local.rule_contents.array[i].array[0].start, firewall_device_this_s, length) == F_equal_to) {
if (main->devices.array[local.device].used > 0) {
if (main->devices.array[local.device].used > device.size) {
- macro_f_string_dynamic_t_resize(status, device, main->devices.array[local.device].used);
-
+ status = f_string_dynamic_resize(main->devices.array[local.device].used, &device);
if (F_status_is_error(status)) break;
}
- memcpy(device.string, main->devices.array[local.device].string, sizeof(unsigned char) * main->devices.array[local.device].used);
+ memcpy(device.string, main->devices.array[local.device].string, sizeof(f_char_t) * main->devices.array[local.device].used);
device.used = main->devices.array[local.device].used;
}
int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
- const f_console_arguments_t arguments = { argc, argv, envp };
+ const f_console_arguments_t arguments = macro_f_console_arguments_t_initialize(argc, argv, envp);
fll_program_data_t data = fll_program_data_t_initialize;
if (f_pipe_input_exists()) {
int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
- const f_console_arguments_t arguments = { argc, argv, envp };
+ const f_console_arguments_t arguments = macro_f_console_arguments_t_initialize(argc, argv, envp);
fll_program_data_t data = fll_program_data_t_initialize;
if (f_pipe_input_exists()) {
int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
- const f_console_arguments_t arguments = { argc, argv, envp };
+ const f_console_arguments_t arguments = macro_f_console_arguments_t_initialize(argc, argv, envp);
fss_embedded_list_read_main_t data = fss_embedded_list_read_main_t_initialize;
if (f_pipe_input_exists()) {
// Determine the linear order in which all of the three parameter values are to be applied.
if (values_total) {
- memset(values_order, 0, sizeof(unsigned char) * values_total);
+ memset(values_order, 0, sizeof(f_char_t) * values_total);
f_array_length_t k = 0;
f_array_length_t l = 0;
int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
- const f_console_arguments_t arguments = { argc, argv, envp };
+ const f_console_arguments_t arguments = macro_f_console_arguments_t_initialize(argc, argv, envp);
fll_program_data_t data = fll_program_data_t_initialize;
if (f_pipe_input_exists()) {
int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
- const f_console_arguments_t arguments = { argc, argv, envp };
+ const f_console_arguments_t arguments = macro_f_console_arguments_t_initialize(argc, argv, envp);
fll_program_data_t data = fll_program_data_t_initialize;
if (f_pipe_input_exists()) {
int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
- const f_console_arguments_t arguments = { argc, argv, envp };
+ const f_console_arguments_t arguments = macro_f_console_arguments_t_initialize(argc, argv, envp);
fll_program_data_t data = fll_program_data_t_initialize;
if (f_pipe_input_exists()) {
int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
- const f_console_arguments_t arguments = { argc, argv, envp };
+ const f_console_arguments_t arguments = macro_f_console_arguments_t_initialize(argc, argv, envp);
fll_program_data_t data = fll_program_data_t_initialize;
if (f_pipe_input_exists()) {
int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
- const f_console_arguments_t arguments = { argc, argv, envp };
+ const f_console_arguments_t arguments = macro_f_console_arguments_t_initialize(argc, argv, envp);
fll_program_data_t data = fll_program_data_t_initialize;
if (f_pipe_input_exists()) {
break;
}
- memcpy(content.string, block.string + range.start, sizeof(unsigned char) * total);
+ memcpy(content.string, block.string + range.start, sizeof(f_char_t) * total);
content.used += total;
}
break;
}
- memcpy(content.string, block.string, sizeof(unsigned char) * block.used);
+ memcpy(content.string, block.string, sizeof(f_char_t) * block.used);
content.used += block.used;
}
int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
- const f_console_arguments_t arguments = { argc, argv, envp };
+ const f_console_arguments_t arguments = macro_f_console_arguments_t_initialize(argc, argv, envp);
fll_program_data_t data = fll_program_data_t_initialize;
if (f_pipe_input_exists()) {
int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
- const f_console_arguments_t arguments = { argc, argv, envp };
+ const f_console_arguments_t arguments = macro_f_console_arguments_t_initialize(argc, argv, envp);
iki_read_main_t data = iki_read_main_t_initialize;
if (f_pipe_input_exists()) {
int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
- const f_console_arguments_t arguments = { argc, argv, envp };
+ const f_console_arguments_t arguments = macro_f_console_arguments_t_initialize(argc, argv, envp);
iki_write_main_t data = iki_write_main_t_initialize;
if (f_pipe_input_exists()) {
int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
- const f_console_arguments_t arguments = { argc, argv, envp };
+ const f_console_arguments_t arguments = macro_f_console_arguments_t_initialize(argc, argv, envp);
fll_program_data_t data = fll_program_data_t_initialize;
if (f_pipe_input_exists()) {
int main(const int argc, const f_string_t *argv, const f_string_t *envp) {
- const f_console_arguments_t arguments = { argc, argv, envp };
+ const f_console_arguments_t arguments = macro_f_console_arguments_t_initialize(argc, argv, envp);
fll_program_data_t data = fll_program_data_t_initialize;
if (f_pipe_input_exists()) {
f_array_length_t i = 0;
f_array_length_t j = 0;
- unsigned char block_character[4] = { 0, 0, 0, 0 };
+ f_char_t block_character[4] = { 0, 0, 0, 0 };
f_string_static_t character = macro_f_string_static_t_initialize2(block_character, 4);
do {
}
else if (data->main->parameters.array[utf8_parameter_verify_e].result == f_console_result_none_e) {
if (data->mode & utf8_mode_to_binary_d) {
- unsigned char byte[5] = { 0, 0, 0, 0, 0 };
+ f_char_t byte[5] = { 0, 0, 0, 0, 0 };
f_string_static_t character = macro_f_string_static_t_initialize2(byte, 5);
status = f_utf_unicode_from(codepoint, 4, &character.string);
f_array_length_t i = 0;
f_array_length_t j = 0;
- unsigned char block[4] = { 0, 0, 0, 0 };
+ f_char_t block[4] = { 0, 0, 0, 0 };
f_string_static_t character = macro_f_string_static_t_initialize2(block, 4);
do {