After using uint8_t and similar, I have decided to adopt the '_t' notation for types.
This helps further reduce the possibility of naming conflicts.
With this change a function, for example, for file mode could be 'f_file_mode' whereas a type for file mode would be 'f_file_mode_t'.
This further allows me to change the design of the *int*_t types used as an array.
Such as renaming 'f_uint8_tss' to 'f_uint8ss_t'.
#endif
#ifndef _di_f_account_id_group_by_name_
- f_return_status f_account_id_group_by_name(const f_string name, gid_t *id) {
- f_status status = F_none;
+ f_return_status f_account_id_group_by_name(const f_string_t name, gid_t *id) {
+ f_status_t status = F_none;
const size_t length_max = sysconf(_SC_GETPW_R_SIZE_MAX);
#endif // _di_f_account_id_group_by_name_
#ifndef _di_f_account_id_user_by_name_
- f_return_status f_account_id_user_by_name(const f_string name, uid_t *id) {
- f_status status = F_none;
+ f_return_status f_account_id_user_by_name(const f_string_t name, uid_t *id) {
+ f_status_t status = F_none;
const size_t length_max = sysconf(_SC_GETPW_R_SIZE_MAX);
* @see getgrnam_r()
*/
#ifndef _di_f_account_id_group_by_name_
- extern f_return_status f_account_id_group_by_name(const f_string name, gid_t *id);
+ extern f_return_status f_account_id_group_by_name(const f_string_t name, gid_t *id);
#endif // _di_f_account_id_group_by_name_
/**
* @see getpwnam_r()
*/
#ifndef _di_f_account_id_user_by_name_
- extern f_return_status f_account_id_user_by_name(const f_string name, uid_t *id);
+ extern f_return_status f_account_id_user_by_name(const f_string_t name, uid_t *id);
#endif // _di_f_account_id_user_by_name_
#ifdef __cplusplus
#define f_color_max_size 7
#endif // _di_f_color_max_size_
-#ifndef _di_f_color_types_
- typedef uint8_t f_color_code;
+#ifndef _di_f_color_types_t_
+ typedef uint8_t f_color_code_t;
#define f_color_code_none 0
#define f_color_code_linux 1
#define f_color_code_xterminal 2
-#endif // _di_f_color_types_
+#endif // _di_f_color_types_t_
/**
* Specify color modes.
* The f_color_mode_none define designates that there is no assigned mode (the mode is undefined).
* The f_color_mode_no_color define designates that the color mode is set to no color (disable colors).
*/
-#ifndef _di_f_color_mode_
- typedef uint8_t f_color_mode;
+#ifndef _di_f_color_mode_t_
+ typedef uint8_t f_color_mode_t;
#define f_color_mode_none 0
#define f_color_mode_no_color 1
#define f_color_mode_dark 2
#define f_color_mode_light 3
-#endif // _di_f_color_mode_
+#endif // _di_f_color_mode_t_
/**
* The purpose behind these data types are not to dynamically allocate data.
* instead, they are intended to only point to existing data, so these should neither be allocated nor deallocated.
*/
-#ifndef _di_f_color_control_
+#ifndef _di_f_color_control_t_
typedef struct {
const int8_t *blink;
const int8_t *bold;
const int8_t *conceal;
const int8_t *reverse;
const int8_t *underline;
- } f_color_control;
+ } f_color_control_t;
- #define f_color_control_names_initialize { "blink", "bold", "conceal", "reverse", "underline" }
-#endif // _di_f_color_control_
+ #define f_color_control_t_initialize_names { "blink", "bold", "conceal", "reverse", "underline" }
+#endif // _di_f_color_control_t_
/**
* strong represents emphasis.
*/
-#ifndef _di_f_color_standard_io_
+#ifndef _di_f_color_standard_io_t_
typedef struct {
const int8_t *error;
const int8_t *message;
const int8_t *strong_error;
const int8_t *strong_message;
const int8_t *strong_warning;
- } f_color_standard_io;
+ } f_color_standard_io_t;
- #define f_color_standard_io_names_initialize { "error", "message", "warning", "strong_error", "strong_message", "strong_warning" }
-#endif // _di_f_color_standard_io_
+ #define f_color_standard_io_t_initialize_names { "error", "message", "warning", "strong_error", "strong_message", "strong_warning" }
+#endif // _di_f_color_standard_io_t_
/**
* alert = some form of alert such as 'Not Implemented Yet'.
* topic = topic such as 'Usage'.
* version = version printed.
*/
-#ifndef _di_f_color_help_
+#ifndef _di_f_color_help_t_
typedef struct {
const int8_t *alert;
const int8_t *command;
const int8_t *title;
const int8_t *topic;
const int8_t *version;
- } f_color_help;
+ } f_color_help_t;
- #define f_color_help_names_initialize { "alert", "command", "comment", "emphasize", "standard", "syntax", "title", "topic", "version" }
-#endif // _di_f_color_help_
+ #define f_color_help_t_initialize_names { "alert", "command", "comment", "emphasize", "standard", "syntax", "title", "topic", "version" }
+#endif // _di_f_color_help_t_
-#ifndef _di_f_color_format_
+#ifndef _di_f_color_format_t_
typedef struct {
const int8_t *begin;
const int8_t *end;
const int8_t *medium;
- } f_color_format;
+ } f_color_format_t;
- #define f_color_format_initialize_linux { "\033[", "m", ";" }
- #define f_color_format_initialize_xterminal { "\033[", "m", ";" }
-#endif // _di_f_color_format_
+ #define f_color_format_t_initialize_linux { "\033[", "m", ";" }
+ #define f_color_format_t_initialize_xterminal { "\033[", "m", ";" }
+#endif // _di_f_color_format_t_
/**
* A structure containing all supported color codes.
* Different system will support a different set.
*
* Custom initializers are provided for common defaults:
- * - f_color_initialize_linux: ideal for linux console.
- * - f_color_initialize_xterminal: ideal for linux x-terminal.
+ * - f_color_t_initialize_linux: ideal for linux console.
+ * - f_color_t_initialize_xterminal: ideal for linux x-terminal.
*/
-#ifndef _di_f_color_
+#ifndef _di_f_color_t_
typedef struct {
const int8_t *reset;
const int8_t *bold;
const int8_t *bright_purple_bg;
const int8_t *bright_teal_bg;
const int8_t *bright_white_bg;
- } f_color;
+ } f_color_t;
- #define f_color_initialize_linux { "0", "1", "4", "5", "7", "8", "30", "31", "32", "33", "34", "35", "36", "37", "40", "41", "42", "43", "44", "45", "46", "47", "30", "31", "32", "33", "34", "35", "36", "37", "40", "41", "42", "43", "44", "45", "46", "47" }
- #define f_color_initialize_xterminal { "0", "1", "4", "5", "7", "8", "30", "31", "32", "33", "34", "35", "36", "37", "40", "41", "42", "43", "44", "45", "46", "47", "90", "91", "92", "93", "94", "95", "96", "97", "100", "101", "102", "103", "104", "105", "106", "107" }
-#endif // _di_f_color_
+ #define f_color_t_initialize_linux { "0", "1", "4", "5", "7", "8", "30", "31", "32", "33", "34", "35", "36", "37", "40", "41", "42", "43", "44", "45", "46", "47", "30", "31", "32", "33", "34", "35", "36", "37", "40", "41", "42", "43", "44", "45", "46", "47" }
+ #define f_color_t_initialize_xterminal { "0", "1", "4", "5", "7", "8", "30", "31", "32", "33", "34", "35", "36", "37", "40", "41", "42", "43", "44", "45", "46", "47", "90", "91", "92", "93", "94", "95", "96", "97", "100", "101", "102", "103", "104", "105", "106", "107" }
+#endif // _di_f_color_t_
/**
- * Provide global default global instances of f_color structures.
+ * Provide global default global instances of f_color_t structures.
*
* Supported instances:
* - f_color_format_linux: ideal for linux console.
* - f_color_format_xterminal: ideal for linux x-terminal.
*/
#ifndef _di_f_color_default_
- static const f_color_format f_color_format_linux = f_color_format_initialize_linux;
- static const f_color_format f_color_format_xterminal = f_color_format_initialize_xterminal;
+ static const f_color_format_t f_color_format_linux = f_color_format_t_initialize_linux;
+ static const f_color_format_t f_color_format_xterminal = f_color_format_t_initialize_xterminal;
- static const f_color f_color_linux = f_color_initialize_linux;
- static const f_color f_color_xterminal = f_color_initialize_xterminal;
+ static const f_color_t f_color_linux = f_color_t_initialize_linux;
+ static const f_color_t f_color_xterminal = f_color_t_initialize_xterminal;
#endif // _di_f_color_default_
#ifdef __cplusplus
#endif
#ifndef _di_f_console_identify_
- f_return_status f_console_identify(const f_string input, f_console_id *result) {
+ f_return_status f_console_identify(const f_string_t input, f_console_id_t *result) {
#ifndef _di_level_0_parameter_checking_
if (result == 0) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_f
- const f_string_length length = strnlen(input, 3);
+ const f_string_length_t length = strnlen(input, 3);
if (length == 0) {
*result = f_console_none;
#endif // _di_f_console_identify_
#ifndef _di_f_console_parameter_process_
- f_return_status f_console_parameter_process(const f_console_arguments arguments, f_console_parameters parameters, f_string_lengths *remaining) {
+ f_return_status f_console_parameter_process(const f_console_arguments_t arguments, f_console_parameters_t parameters, f_string_lengths_t *remaining) {
#ifndef _di_level_0_parameter_checking_
if (remaining == 0) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- f_status status = F_none;
- f_console_id result = 0;
+ f_status_t status = F_none;
+ f_console_id_t result = 0;
bool found = F_false;
unsigned long location = 1; // Parameter 0 represents the program name so skip it.
- f_string_length sub_location = 0;
- f_string_length increment_by = 0;
- f_string_length string_length = 0;
- f_array_length i = 0;
+ f_string_length_t sub_location = 0;
+ f_string_length_t increment_by = 0;
+ f_string_length_t string_length = 0;
+ f_array_length_t i = 0;
uint8_t console_short = f_console_none;
uint8_t console_long = f_console_none;
uint8_t console_type = f_console_type_normal;
- f_string_lengths needs_additional = f_string_lengths_initialize;
+ f_string_lengths_t needs_additional = f_string_lengths_t_initialize;
uint8_t width = 0;
i = needs_additional.array[0];
if (parameters.parameter[i].additional.used == parameters.parameter[i].additional.size) {
- f_macro_string_lengths_resize(status, parameters.parameter[i].additional, parameters.parameter[i].additional.size + f_console_default_allocation_step);
+ f_macro_string_lengths_t_resize(status, parameters.parameter[i].additional, parameters.parameter[i].additional.size + f_console_default_allocation_step);
if (F_status_is_error(status)) {
- f_macro_string_lengths_delete_simple(needs_additional);
+ f_macro_string_lengths_t_delete_simple(needs_additional);
return status;
}
}
needs_additional.used--;
// Pop the matched parameter off of the top of the needs_additional array.
- for (f_string_length i = 0; i < needs_additional.used; i++) {
+ for (f_string_length_t i = 0; i < needs_additional.used; i++) {
needs_additional.array[i] = needs_additional.array[i + 1];
} // for
if (arguments.argv[location][sub_location] != *parameters.parameter[i].symbol_short) continue;
if (width > 0) {
- f_utf_character character_argument_utf = 0;
- f_utf_character character_console_utf = 0;
+ f_utf_character_t character_argument_utf = 0;
+ f_utf_character_t character_console_utf = 0;
- f_number_unsigned width_max = string_length - sub_location;
+ f_number_unsigned_t width_max = string_length - sub_location;
status = f_utf_char_to_character(arguments.argv[location] + sub_location, width_max, &character_argument_utf);
if (status != F_none) {
- f_macro_string_lengths_delete_simple(needs_additional);
+ f_macro_string_lengths_t_delete_simple(needs_additional);
return status;
}
width_max = strlen(parameters.parameter[i].symbol_short);
- status = f_utf_char_to_character((f_string) parameters.parameter[i].symbol_short, width_max, &character_console_utf);
+ status = f_utf_char_to_character((f_string_t) parameters.parameter[i].symbol_short, width_max, &character_console_utf);
if (status != F_none) {
- f_macro_string_lengths_delete_simple(needs_additional);
+ f_macro_string_lengths_t_delete_simple(needs_additional);
return status;
}
}
if (parameters.parameter[i].locations.used == parameters.parameter[i].locations.size) {
- f_macro_string_lengths_resize(status, parameters.parameter[i].locations, parameters.parameter[i].locations.size + f_console_default_allocation_step);
+ f_macro_string_lengths_t_resize(status, parameters.parameter[i].locations, parameters.parameter[i].locations.size + f_console_default_allocation_step);
if (F_status_is_error(status)) {
- f_macro_string_lengths_delete_simple(needs_additional);
+ f_macro_string_lengths_t_delete_simple(needs_additional);
return status;
}
}
if (parameters.parameter[i].has_additional) {
if (needs_additional.used + parameters.parameter[i].has_additional > needs_additional.size) {
- f_macro_string_lengths_resize(status, needs_additional, needs_additional.used + parameters.parameter[i].has_additional);
+ f_macro_string_lengths_t_resize(status, needs_additional, needs_additional.used + parameters.parameter[i].has_additional);
if (F_status_is_error(status)) {
- f_macro_string_lengths_delete_simple(needs_additional);
+ f_macro_string_lengths_t_delete_simple(needs_additional);
return status;
}
}
- for (f_array_length additional = 0; additional < parameters.parameter[i].has_additional; additional++) {
+ for (f_array_length_t additional = 0; additional < parameters.parameter[i].has_additional; additional++) {
needs_additional.array[needs_additional.used] = i;
needs_additional.used++;
} // for
if (strncmp(arguments.argv[location], parameters.parameter[i].symbol_other, string_length + 1) != 0) continue;
if (parameters.parameter[i].locations.used == parameters.parameter[i].locations.size) {
- f_macro_string_lengths_resize(status, parameters.parameter[i].locations, parameters.parameter[i].locations.size + f_console_default_allocation_step);
+ f_macro_string_lengths_t_resize(status, parameters.parameter[i].locations, parameters.parameter[i].locations.size + f_console_default_allocation_step);
if (F_status_is_error(status)) {
- f_macro_string_lengths_delete_simple(needs_additional);
+ f_macro_string_lengths_t_delete_simple(needs_additional);
return status;
}
}
if (parameters.parameter[i].has_additional) {
if (needs_additional.used + parameters.parameter[i].has_additional > needs_additional.size) {
- f_macro_string_lengths_resize(status, needs_additional, needs_additional.used + parameters.parameter[i].has_additional);
+ f_macro_string_lengths_t_resize(status, needs_additional, needs_additional.used + parameters.parameter[i].has_additional);
if (F_status_is_error(status)) {
- f_macro_string_lengths_delete_simple(needs_additional);
+ f_macro_string_lengths_t_delete_simple(needs_additional);
return status;
}
}
- for (f_array_length additional = 0; additional < parameters.parameter[i].has_additional; additional++) {
+ for (f_array_length_t additional = 0; additional < parameters.parameter[i].has_additional; additional++) {
needs_additional.array[needs_additional.used] = i;
needs_additional.used++;
} // for
if (!found) {
// populate list of remaining parameters.parameter not associated with anything.
if (remaining->used == remaining->size) {
- f_macro_memory_structure_macro_increment(status, (*remaining), 1, f_console_default_allocation_step, f_macro_string_lengths_resize, F_buffer_too_large);
+ f_macro_memory_structure_macro_increment(status, (*remaining), 1, f_console_default_allocation_step, f_macro_string_lengths_t_resize, F_buffer_too_large);
if (F_status_is_error(status)) {
- f_macro_string_lengths_delete_simple(needs_additional);
+ f_macro_string_lengths_t_delete_simple(needs_additional);
return status;
}
}
status = F_none;
}
- f_macro_string_lengths_delete_simple(needs_additional);
+ f_macro_string_lengths_t_delete_simple(needs_additional);
return status;
}
#endif // _di_f_console_parameter_process_
#ifndef _di_f_console_parameter_prioritize_left_
- f_return_status f_console_parameter_prioritize_left(const f_console_parameters parameters, const f_console_parameter_ids choices, f_console_parameter_id *decision) {
+ f_return_status f_console_parameter_prioritize_left(const f_console_parameters_t parameters, const f_console_parameter_ids_t choices, f_console_parameter_id_t *decision) {
#ifndef _di_level_0_parameter_checking_
if (decision == 0) return F_status_set_error(F_parameter);
if (choices.id == 0) return F_status_set_error(F_parameter);
if (choices.used == 0) return F_data_not;
if (parameters.used == 0) return F_data_not;
- f_array_length location = 0;
- f_array_length location_sub = 0;
- f_console_parameter_id priority = 0;
+ f_array_length_t location = 0;
+ f_array_length_t location_sub = 0;
+ f_console_parameter_id_t priority = 0;
- for (f_array_length i = 0; i < choices.used; i++) {
+ for (f_array_length_t i = 0; i < choices.used; i++) {
if (choices.id[i] > parameters.used) return F_status_set_error(F_parameter);
if (parameters.parameter[choices.id[i]].result == f_console_result_found) {
#endif // _di_f_console_parameter_prioritize_left_
#ifndef _di_f_console_parameter_prioritize_right_
- f_return_status f_console_parameter_prioritize_right(const f_console_parameters parameters, const f_console_parameter_ids choices, f_console_parameter_id *decision) {
+ f_return_status f_console_parameter_prioritize_right(const f_console_parameters_t parameters, const f_console_parameter_ids_t choices, f_console_parameter_id_t *decision) {
#ifndef _di_level_0_parameter_checking_
if (decision == 0) return F_status_set_error(F_parameter);
if (choices.id == 0) return F_status_set_error(F_parameter);
if (choices.used == 0) return F_data_not;
if (parameters.used == 0) return F_data_not;
- f_array_length location = 0;
- f_array_length location_sub = 0;
- f_console_parameter_id priority = 0;
+ f_array_length_t location = 0;
+ f_array_length_t location_sub = 0;
+ f_console_parameter_id_t priority = 0;
- for (f_array_length i = 0; i < choices.used; i++) {
+ for (f_array_length_t i = 0; i < choices.used; i++) {
if (choices.id[i] > parameters.used) return F_status_set_error(F_parameter);
if (parameters.parameter[choices.id[i]].result == f_console_result_found) {
* The maximum size for a single parameter.
*/
#ifndef _di_f_console_length_size_
- #define f_console_length_size f_string_length_size
+ #define f_console_length_size f_string_length_t_size
#endif // _di_f_console_length_size_
/**
* - inverse: parameters using plus sign, such as '++version'.
* - other: parameters using neither minus nor plus sign, such as 'build'.
*/
-#ifndef _di_f_console_types_
- typedef uint16_t f_console_id;
+#ifndef _di_f_console_types_t_
+ typedef uint16_t f_console_id_t;
enum {
f_console_result_none = 1,
f_console_type_inverse,
f_console_type_other,
};
-#endif // _di_f_console_types_
+#endif // _di_f_console_types_t_
/**
* Provide a structure for describing console parameters for the console processing functions to use.
* - locations: All locations within argv where this parameter is found (order is preserved).
* - additional: An array of locations representing where in the argv[] the additional arguments are found.
*/
-#ifndef _di_f_console_parameter_
+#ifndef _di_f_console_parameter_t_
typedef struct {
const int8_t *symbol_short;
const int8_t *symbol_long;
uint8_t result;
uint8_t total;
- f_string_length location;
- f_string_length location_sub;
- f_string_lengths locations;
- f_string_lengths additional;
- } f_console_parameter;
+ f_string_length_t location;
+ f_string_length_t location_sub;
+ f_string_lengths_t locations;
+ f_string_lengths_t additional;
+ } f_console_parameter_t;
- #define f_console_parameter_initialize(symbol_short, symbol_long, symbol_other, has_additional, type_value) { symbol_short, symbol_long, symbol_other, has_additional, type_value, f_console_result_none, 0, 0, 0, f_string_lengths_initialize, f_string_lengths_initialize }
-#endif // _di_f_console_parameter_
+ #define f_console_parameter_t_initialize(symbol_short, symbol_long, symbol_other, has_additional, type_value) { symbol_short, symbol_long, symbol_other, has_additional, type_value, f_console_result_none, 0, 0, 0, f_string_lengths_t_initialize, f_string_lengths_t_initialize }
+#endif // _di_f_console_parameter_t_
/**
* Provide a helper structure for references and processing parameters.
*
* Designed for passing this to a function as a single argument.
*
- * parameter: Intended to be populated with an array of f_console_parameter_id whose size is defined by the "used" property.
+ * parameter: Intended to be populated with an array of f_console_parameter_id_t whose size is defined by the "used" property.
* This is not intended to be dynamically allocated, so there is no "size" property.
* order:
*/
-#ifndef _di_f_console_parameters_
+#ifndef _di_f_console_parameters_t_
typedef struct {
- f_console_parameter *parameter;
+ f_console_parameter_t *parameter;
- f_array_length used;
- } f_console_parameters;
+ f_array_length_t used;
+ } f_console_parameters_t;
- #define f_console_parameters_initialize { 0, 0 }
-#endif // _di_f_console_parameters_
+ #define f_console_parameters_t_initialize { 0, 0 }
+#endif // _di_f_console_parameters_t_
/**
* Provide a helper structure for references and processing standard C main() arguments.
*
- * The f_console_parameter_id is designed to be used for the enums to represent a any given parameter by the ID.
+ * The f_console_parameter_id_t is designed to be used for the enums to represent a any given parameter by the ID.
*
- * The f_console_parameter_ids is designed for passing this to a function as a single argument.
- * The "id" property is intended to be populated with an aray of f_console_parameter_id whose size is defined by the "used" property.
- * This follows the idea of f_string_dynamic and has a "used" instead of length, but because this is not intended to be dynamically allocated there is no "size" property.
+ * The f_console_parameter_ids_t is designed for passing this to a function as a single argument.
+ * The "id" property is intended to be populated with an aray of f_console_parameter_id_t whose size is defined by the "used" property.
+ * This follows the idea of f_string_dynamic_t and has a "used" instead of length, but because this is not intended to be dynamically allocated there is no "size" property.
*/
-#ifndef _di_f_console_parameter_id_
- typedef uint16_t f_console_parameter_id;
+#ifndef _di_f_console_parameter_id_t_
+ typedef uint16_t f_console_parameter_id_t;
typedef struct {
- f_console_parameter_id *id;
+ f_console_parameter_id_t *id;
- f_array_length used;
- } f_console_parameter_ids;
+ f_array_length_t used;
+ } f_console_parameter_ids_t;
- #define f_console_parameter_ids_initialize { 0, 0 }
-#endif // _di_f_console_parameter_id_
+ #define f_console_parameter_ids_t_initialize { 0, 0 }
+#endif // _di_f_console_parameter_id_t_
/**
* Provide a helper structure for referencing the argc and argv standard main arguments.
*
* No structure initializer is provided due to the use of constant properties.
*/
-#ifndef _di_f_console_arguments_
+#ifndef _di_f_console_arguments_t_
typedef struct {
- const f_number_unsigned argc;
+ const f_number_unsigned_t argc;
- const f_string *argv;
- } f_console_arguments;
-#endif // _di_f_console_arguments_
+ const f_string_t *argv;
+ } f_console_arguments_t;
+#endif // _di_f_console_arguments_t_
/**
* Determine the type code the given input parameter represents.
* F_memory_reallocation (with error bit) on memory reallocation error.
*/
#ifndef _di_f_console_identify_
- extern f_return_status f_console_identify(const f_string input, f_console_id *result);
+ extern f_return_status f_console_identify(const f_string_t input, f_console_id_t *result);
#endif // _di_f_console_identify_
/**
* F_memory_reallocation (with error bit) on memory reallocation error.
*/
#ifndef _di_f_console_parameter_process_
- extern f_return_status f_console_parameter_process(const f_console_arguments arguments, f_console_parameters parameters, f_string_lengths *remaining);
+ extern f_return_status f_console_parameter_process(const f_console_arguments_t arguments, f_console_parameters_t parameters, f_string_lengths_t *remaining);
#endif // _di_f_console_parameter_process_
/**
* F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_f_console_parameter_prioritize_left_
- extern f_return_status f_console_parameter_prioritize_left(const f_console_parameters parameters, const f_console_parameter_ids choices, f_console_parameter_id *decision);
+ extern f_return_status f_console_parameter_prioritize_left(const f_console_parameters_t parameters, const f_console_parameter_ids_t choices, f_console_parameter_id_t *decision);
#endif // _di_f_console_parameter_prioritize_left_
/**
* F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_f_console_parameter_prioritize_right_
- extern f_return_status f_console_parameter_prioritize_right(const f_console_parameters parameters, const f_console_parameter_ids choices, f_console_parameter_id *decision);
+ extern f_return_status f_console_parameter_prioritize_right(const f_console_parameters_t parameters, const f_console_parameter_ids_t choices, f_console_parameter_id_t *decision);
#endif // _di_f_console_parameter_prioritize_right_
#ifdef __cplusplus
#endif // _di_f_conversion_character_is_octal_
#ifndef _di_f_conversion_character_to_binary_
- f_return_status f_conversion_character_to_binary(const int8_t character, f_number_unsigned *number) {
+ f_return_status f_conversion_character_to_binary(const int8_t character, f_number_unsigned_t *number) {
#ifndef _di_level_0_parameter_checking_
if (number == 0) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_conversion_character_to_binary_
#ifndef _di_f_conversion_character_to_decimal_
- f_return_status f_conversion_character_to_decimal(const int8_t character, f_number_unsigned *number) {
+ f_return_status f_conversion_character_to_decimal(const int8_t character, f_number_unsigned_t *number) {
#ifndef _di_level_0_parameter_checking_
if (number == 0) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_conversion_character_to_decimal_
#ifndef _di_f_conversion_character_to_duodecimal_
- f_return_status f_conversion_character_to_duodecimal(const int8_t character, f_number_unsigned *decimal) {
+ f_return_status f_conversion_character_to_duodecimal(const int8_t character, f_number_unsigned_t *decimal) {
#ifndef _di_level_0_parameter_checking_
if (decimal == 0) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_conversion_character_to_duodecimal_
#ifndef _di_f_conversion_character_to_hexidecimal_
- f_return_status f_conversion_character_to_hexidecimal(const int8_t character, f_number_unsigned *decimal) {
+ f_return_status f_conversion_character_to_hexidecimal(const int8_t character, f_number_unsigned_t *decimal) {
#ifndef _di_level_0_parameter_checking_
if (decimal == 0) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_conversion_character_to_hexidecimal_
#ifndef _di_f_conversion_character_to_octal_
- f_return_status f_conversion_character_to_octal(const int8_t character, f_number_unsigned *number) {
+ f_return_status f_conversion_character_to_octal(const int8_t character, f_number_unsigned_t *number) {
#ifndef _di_level_0_parameter_checking_
if (number == 0) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_conversion_character_to_octal_
#ifndef _di_f_conversion_number_signed_to_string_
- f_return_status f_conversion_number_signed_to_string(const f_number_signed number, const uint8_t base, f_string_dynamic *destination) {
+ f_return_status f_conversion_number_signed_to_string(const f_number_signed_t number, const uint8_t base, f_string_dynamic_t *destination) {
#ifndef _di_level_0_parameter_checking_
if (destination == 0) return F_status_set_error(F_parameter);
if (base < 2 || base > 16) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- f_status status = F_none;
+ f_status_t status = F_none;
if (number == 0) {
- f_macro_string_dynamic_resize(status, (*destination), destination->used + 2);
+ f_macro_string_dynamic_t_resize(status, (*destination), destination->used + 2);
if (F_status_is_error(status)) return status;
destination->string[destination->used] = '0';
}
bool negative = F_false;
- f_number_unsigned current = number;
+ f_number_unsigned_t current = number;
if (number < 0) {
current = 0 - number;
negative = F_true;
}
- f_string_length total = 0;
+ f_string_length_t total = 0;
- for (register f_number_signed work = current; work; total++) {
+ for (register f_number_signed_t work = current; work; total++) {
work /= base;
} // for
if (negative) {
- f_macro_string_dynamic_resize(status, (*destination), destination->used + total + 2);
+ f_macro_string_dynamic_t_resize(status, (*destination), destination->used + total + 2);
}
else {
- f_macro_string_dynamic_resize(status, (*destination), destination->used + total + 1);
+ f_macro_string_dynamic_t_resize(status, (*destination), destination->used + total + 1);
}
if (F_status_is_error(status)) return status;
- f_number_unsigned work = 0;
- f_number_unsigned power = 1;
+ f_number_unsigned_t work = 0;
+ f_number_unsigned_t power = 1;
if (negative) {
destination->string[destination->used] = '-';
#endif // _di_f_conversion_decimal_signed_to_string_
#ifndef _di_f_conversion_number_unsigned_to_string_
- f_return_status f_conversion_number_unsigned_to_string(const f_number_unsigned number, const uint8_t base, f_string_dynamic *destination) {
+ f_return_status f_conversion_number_unsigned_to_string(const f_number_unsigned_t number, const uint8_t base, f_string_dynamic_t *destination) {
#ifndef _di_level_0_parameter_checking_
if (destination == 0) return F_status_set_error(F_parameter);
if (base < 2 || base > 16) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- f_status status = F_none;
+ f_status_t status = F_none;
if (number == 0) {
- f_macro_string_dynamic_resize(status, (*destination), destination->used + 2);
+ f_macro_string_dynamic_t_resize(status, (*destination), destination->used + 2);
if (F_status_is_error(status)) return status;
destination->string[destination->used] = '0';
return F_none;
}
- f_string_length total = 0;
+ f_string_length_t total = 0;
- for (register f_number_unsigned work = number; work; total++) {
+ for (register f_number_unsigned_t work = number; work; total++) {
work /= base;
} // for
- f_macro_string_dynamic_resize(status, (*destination), destination->used + total + 1);
+ f_macro_string_dynamic_t_resize(status, (*destination), destination->used + total + 1);
if (F_status_is_error(status)) return status;
- f_number_unsigned current = number;
- f_number_unsigned work = 0;
- f_number_unsigned power = 1;
+ f_number_unsigned_t current = number;
+ f_number_unsigned_t work = 0;
+ f_number_unsigned_t power = 1;
for (register uint8_t i = 1; i < total; i++) {
power *= base;
*
* 64-bit is the designed default.
*/
-#ifndef _di_f_type_number_64_
+#ifndef _di_f_type_number_64_t_
#define f_conversion_scale_binary_unsigned 64
#define f_conversion_scale_binary_signed 63
#define f_conversion_scale_hexidecimal_unsigned 15
#define f_conversion_scale_hexidecimal_signed 15
-#endif // _di_f_type_number_64_
+#endif // _di_f_type_number_64_t_
-#ifdef _en_f_type_number_32_
+#ifdef _en_f_type_number_32_t_
#define f_conversion_scale_binary_unsigned 32
#define f_conversion_scale_binary_signed 31
#define f_conversion_scale_hexidecimal_unsigned 7
#define f_conversion_scale_hexidecimal_signed 7
-#endif // _en_f_type_number_32_
+#endif // _en_f_type_number_32_t_
-#ifdef _en_f_type_number_128_
+#ifdef _en_f_type_number_128_t_
#define f_conversion_scale_binary_unsigned 128
#define f_conversion_scale_binary_signed 127
#define f_conversion_scale_hexidecimal_unsigned 31
#define f_conversion_scale_hexidecimal_signed 31
-#endif // _en_f_type_number_128_
+#endif // _en_f_type_number_128_t_
/**
* Convert a single character into the binary digit that it represents.
* F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_f_conversion_character_to_binary_
- extern f_return_status f_conversion_character_to_binary(const int8_t character, f_number_unsigned *number);
+ extern f_return_status f_conversion_character_to_binary(const int8_t character, f_number_unsigned_t *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_return_status f_conversion_character_to_decimal(const int8_t character, f_number_unsigned *number);
+ extern f_return_status f_conversion_character_to_decimal(const int8_t character, f_number_unsigned_t *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_return_status f_conversion_character_to_duodecimal(const int8_t character, f_number_unsigned *number);
+ extern f_return_status f_conversion_character_to_duodecimal(const int8_t character, f_number_unsigned_t *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_return_status f_conversion_character_to_hexidecimal(const int8_t character, f_number_unsigned *number);
+ extern f_return_status f_conversion_character_to_hexidecimal(const int8_t character, f_number_unsigned_t *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_return_status f_conversion_character_to_octal(const int8_t character, f_number_unsigned *number);
+ extern f_return_status f_conversion_character_to_octal(const int8_t character, f_number_unsigned_t *number);
#endif // _di_f_conversion_character_to_octal_
/**
* F_memory_reallocation (with error bit) on memory reallocation error.
*/
#ifndef _di_f_conversion_number_signed_to_string_
- extern f_return_status f_conversion_number_signed_to_string(const f_number_signed number, const uint8_t base, f_string_dynamic *destination);
+ extern f_return_status f_conversion_number_signed_to_string(const f_number_signed_t number, const uint8_t base, f_string_dynamic_t *destination);
#endif // _di_f_conversion_number_signed_to_string_
/**
* F_memory_reallocation (with error bit) on memory reallocation error.
*/
#ifndef _di_f_conversion_number_unsigned_to_string_
- extern f_return_status f_conversion_number_unsigned_to_string(const f_number_unsigned number, const uint8_t base, f_string_dynamic *destination);
+ extern f_return_status f_conversion_number_unsigned_to_string(const f_number_unsigned_t number, const uint8_t base, f_string_dynamic_t *destination);
#endif // _di_f_conversion_number_unsigned_to_string_
#ifdef __cplusplus
#endif
#ifndef _di_f_directory_create_
- f_return_status f_directory_create(const f_string path, const mode_t mode) {
+ f_return_status f_directory_create(const f_string_t path, const mode_t mode) {
return private_f_directory_create(path, mode);
}
#endif // _di_f_directory_create_
#ifndef _di_f_directory_create_at_
- f_return_status f_directory_create_at(const int at_id, const f_string path, const mode_t mode) {
+ f_return_status f_directory_create_at(const int at_id, const f_string_t path, const mode_t mode) {
#ifndef _di_level_0_parameter_checking_
if (at_id <= 0) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_directory_create_at_
#ifndef _di_f_directory_exists_
- f_return_status f_directory_exists(const f_string path) {
+ f_return_status f_directory_exists(const f_string_t path) {
struct stat file_stat;
memset(&file_stat, 0, sizeof(struct stat));
#endif // _di_f_directory_exists_
#ifndef _di_f_directory_exists_at_
- f_return_status f_directory_exists_at(const int at_id, const f_string path, const int flag) {
+ f_return_status f_directory_exists_at(const int at_id, const f_string_t path, const int flag) {
struct stat file_stat;
memset(&file_stat, 0, sizeof(struct stat));
#endif // _di_f_directory_exists_at_
#ifndef _di_f_directory_is_
- f_return_status f_directory_is(const f_string path) {
+ f_return_status f_directory_is(const f_string_t path) {
struct stat file_stat;
memset(&file_stat, AT_SYMLINK_NOFOLLOW, sizeof(struct stat));
#endif // _di_f_directory_is_
#ifndef _di_f_directory_is_at_
- f_return_status f_directory_is_at(const int at_id, const f_string path, const int flag) {
+ f_return_status f_directory_is_at(const int at_id, const f_string_t path, const int flag) {
struct stat file_stat;
memset(&file_stat, 0, sizeof(struct stat));
#endif // _di_f_directory_is_at_
#ifndef _di_f_directory_list_
- f_return_status f_directory_list(const f_string path, int (*filter)(const struct dirent *), int (*sort)(const struct dirent **, const struct dirent **), f_string_dynamics *names) {
+ f_return_status f_directory_list(const f_string_t path, int (*filter)(const struct dirent *), int (*sort)(const struct dirent **, const struct dirent **), f_string_dynamics_t *names) {
#ifndef _di_level_0_parameter_checking_
if (names == 0) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
struct dirent **listing = 0;
size_t i = 0;
- f_string_length size = 0;
- f_status status = F_none;
+ f_string_length_t size = 0;
+ f_status_t status = F_none;
const size_t length = scandir(path, &listing, filter, sort);
if (F_status_is_error(status)) break;
}
- f_macro_string_dynamic_new(status, names->array[names->used], size);
+ f_macro_string_dynamic_t_new(status, names->array[names->used], size);
if (F_status_is_error(status)) break;
memcpy(names->array[names->used].string, listing[i]->d_name, size);
#endif // _di_f_directory_list_
#ifndef _di_f_directory_open_
- f_return_status f_directory_open(const f_string path, const bool dereference, int *id) {
+ f_return_status f_directory_open(const f_string_t path, const bool dereference, int *id) {
#ifndef _di_level_0_parameter_checking_
if (id == 0) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_directory_open_
#ifndef _di_f_directory_open_at_
- f_return_status f_directory_open_at(const int at_id, const f_string path, const bool dereference, int *id) {
+ f_return_status f_directory_open_at(const int at_id, const f_string_t path, const bool dereference, int *id) {
#ifndef _di_level_0_parameter_checking_
if (at_id <= 0) return F_status_set_error(F_parameter);
if (id == 0) return F_status_set_error(F_parameter);
#endif // _di_f_directory_open_at_
#ifndef _di_f_directory_remove_
- f_return_status f_directory_remove(const f_string path, const int recursion_max, const bool preserve) {
+ f_return_status f_directory_remove(const f_string_t path, const int recursion_max, const bool preserve) {
#ifndef _di_level_0_parameter_checking_
if (recursion_max < 0) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_directory_remove_
#ifndef _di_f_directory_remove_custom_
- f_return_status f_directory_remove_custom(const f_string path, const int recursion_max, const bool preserve, int (*custom) (const char *, const struct stat *, int, struct FTW *)) {
+ f_return_status f_directory_remove_custom(const f_string_t path, const int recursion_max, const bool preserve, int (*custom) (const char *, const struct stat *, int, struct FTW *)) {
#ifndef _di_level_0_parameter_checking_
if (recursion_max < 0) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_directory_remove_custom_
#ifndef _di_f_directory_touch_
- f_return_status f_directory_touch(const f_string path, const mode_t mode) {
+ f_return_status f_directory_touch(const f_string_t path, const mode_t mode) {
#ifndef _di_level_0_parameter_checking_
if (path == 0) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- f_status status = F_none;
+ f_status_t status = F_none;
struct stat file_stat;
memset(&file_stat, 0, sizeof(struct stat));
#endif // _di_f_directory_touch_
#ifndef _di_f_directory_touch_at_
- f_return_status f_directory_touch_at(const int at_id, const f_string path, const mode_t mode, const int flag) {
+ f_return_status f_directory_touch_at(const int at_id, const f_string_t path, const mode_t mode, const int flag) {
#ifndef _di_level_0_parameter_checking_
if (path == 0) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- f_status status = F_none;
+ f_status_t status = F_none;
struct stat file_stat;
memset(&file_stat, 0, sizeof(struct stat));
* @see mkdir()
*/
#ifndef _di_f_directory_create_
- extern f_return_status f_directory_create(const f_string path, const mode_t mode);
+ extern f_return_status f_directory_create(const f_string_t path, const mode_t mode);
#endif // _di_f_directory_create_
/**
* @see mkdirat()
*/
#ifndef _di_f_directory_create_at_
- extern f_return_status f_directory_create_at(const int at_id, const f_string path, const mode_t mode);
+ extern f_return_status f_directory_create_at(const int at_id, const f_string_t path, const mode_t mode);
#endif // _di_f_directory_create_at_
/**
* @see stat()
*/
#ifndef _di_f_directory_exists_
- extern f_return_status f_directory_exists(const f_string path);
+ extern f_return_status f_directory_exists(const f_string_t path);
#endif // _di_f_directory_exists_
/**
* @see fstatat()
*/
#ifndef _di_f_directory_exists_at_
- extern f_return_status f_directory_exists_at(const int at_id, const f_string path, const int flag);
+ extern f_return_status f_directory_exists_at(const int at_id, const f_string_t path, const int flag);
#endif // _di_f_directory_exists_at_
/**
* @see stat()
*/
#ifndef _di_f_directory_is_
- extern f_return_status f_directory_is(const f_string path);
+ extern f_return_status f_directory_is(const f_string_t path);
#endif // _di_f_directory_is_
/**
* @see fstatat()
*/
#ifndef _di_f_directory_is_at_
- extern f_return_status f_directory_is_at(const int at_id, const f_string path, const int flag);
+ extern f_return_status f_directory_is_at(const int at_id, const f_string_t path, const int flag);
#endif // _di_f_directory_is_at_
/**
* @see versionsort()
*/
#ifndef _di_f_directory_list_
- extern f_return_status f_directory_list(const f_string path, int (*filter)(const struct dirent *), int (*sort)(const struct dirent **, const struct dirent **), f_string_dynamics *names);
+ extern f_return_status f_directory_list(const f_string_t path, int (*filter)(const struct dirent *), int (*sort)(const struct dirent **, const struct dirent **), f_string_dynamics_t *names);
#endif // _di_f_directory_list_
/**
* @see open()
*/
#ifndef _di_f_directory_open_
- extern f_return_status f_directory_open(const f_string path, const bool dereference, int *id);
+ extern f_return_status f_directory_open(const f_string_t path, const bool dereference, int *id);
#endif // _di_f_directory_open_
/**
* @see openat()
*/
#ifndef _di_f_directory_open_at_
- extern f_return_status f_directory_open_at(const int at_id, const f_string path, const bool dereference, int *id);
+ extern f_return_status f_directory_open_at(const int at_id, const f_string_t path, const bool dereference, int *id);
#endif // _di_f_directory_open_at_
/**
* @see remove()
*/
#ifndef _di_f_directory_remove_
- extern f_return_status f_directory_remove(const f_string path, const int recursion_max, const bool preserve);
+ extern f_return_status f_directory_remove(const f_string_t path, const int recursion_max, const bool preserve);
#endif // _di_f_directory_remove_
/**
* @see remove()
*/
#ifndef _di_f_directory_remove_custom_
- extern f_return_status f_directory_remove_custom(const f_string path, const int recursion_max, const bool preserve, int (*custom) (const char *, const struct stat *, int, struct FTW *));
+ extern f_return_status f_directory_remove_custom(const f_string_t path, const int recursion_max, const bool preserve, int (*custom) (const char *, const struct stat *, int, struct FTW *));
#endif // _di_f_directory_remove_custom_
/**
* @see utimensat()
*/
#ifndef _di_f_directory_touch_
- extern f_return_status f_directory_touch(const f_string path, const mode_t mode);
+ extern f_return_status f_directory_touch(const f_string_t path, const mode_t mode);
#endif // _di_f_directory_touch_
/**
* @see utimensat()
*/
#ifndef _di_f_directory_touch_at_
- extern f_return_status f_directory_touch_at(const int at_id, const f_string path, const mode_t mode, const int flag);
+ extern f_return_status f_directory_touch_at(const int at_id, const f_string_t path, const mode_t mode, const int flag);
#endif // _di_f_directory_touch_at_
#ifdef __cplusplus
*
* Each property represents a set of paths grouped by directory entity file type.
*/
-#ifndef _di_f_directory_listing_
+#ifndef _di_f_directory_listing_t_
typedef struct {
- f_string_dynamics block; // S_IFBLK
- f_string_dynamics character; // S_IFCHR
- f_string_dynamics directory; // S_IFDIR
- f_string_dynamics regular; // S_IFREG
- f_string_dynamics link; // S_IFLNK
- f_string_dynamics fifo; // S_IFIFO
- f_string_dynamics socket; // S_IFSOCK
- f_string_dynamics unknown;
- } f_directory_listing;
-
- #define f_directory_listing_initialize { \
- f_string_dynamics_initialize, \
- f_string_dynamics_initialize, \
- f_string_dynamics_initialize, \
- f_string_dynamics_initialize, \
- f_string_dynamics_initialize, \
- f_string_dynamics_initialize, \
- f_string_dynamics_initialize, \
- f_string_dynamics_initialize, \
+ f_string_dynamics_t block; // S_IFBLK
+ f_string_dynamics_t character; // S_IFCHR
+ f_string_dynamics_t directory; // S_IFDIR
+ f_string_dynamics_t regular; // S_IFREG
+ f_string_dynamics_t link; // S_IFLNK
+ f_string_dynamics_t fifo; // S_IFIFO
+ f_string_dynamics_t socket; // S_IFSOCK
+ f_string_dynamics_t unknown;
+ } f_directory_listing_t;
+
+ #define f_directory_listing_t_initialize { \
+ f_string_dynamics_t_initialize, \
+ f_string_dynamics_t_initialize, \
+ f_string_dynamics_t_initialize, \
+ f_string_dynamics_t_initialize, \
+ f_string_dynamics_t_initialize, \
+ f_string_dynamics_t_initialize, \
+ f_string_dynamics_t_initialize, \
+ f_string_dynamics_t_initialize, \
}
- #define f_macro_directory_listing_delete(status, listing) \
- f_macro_string_dynamics_delete(status, listing.block) \
- if (F_status_is_not_error(status)) f_macro_string_dynamics_delete(status, listing.character) \
- if (F_status_is_not_error(status)) f_macro_string_dynamics_delete(status, listing.directory) \
- if (F_status_is_not_error(status)) f_macro_string_dynamics_delete(status, listing.regular) \
- if (F_status_is_not_error(status)) f_macro_string_dynamics_delete(status, listing.link) \
- if (F_status_is_not_error(status)) f_macro_string_dynamics_delete(status, listing.fifo) \
- if (F_status_is_not_error(status)) f_macro_string_dynamics_delete(status, listing.socket) \
- if (F_status_is_not_error(status)) f_macro_string_dynamics_delete(status, listing.unknown)
-
- #define f_macro_directory_listing_destroy(status, listing) \
- f_macro_string_dynamics_destroy(status, listing.block) \
- if (F_status_is_not_error(status)) f_macro_string_dynamics_destroy(status, listing.character) \
- if (F_status_is_not_error(status)) f_macro_string_dynamics_destroy(status, listing.directory) \
- if (F_status_is_not_error(status)) f_macro_string_dynamics_destroy(status, listing.regular) \
- if (F_status_is_not_error(status)) f_macro_string_dynamics_destroy(status, listing.link) \
- if (F_status_is_not_error(status)) f_macro_string_dynamics_destroy(status, listing.fifo) \
- if (F_status_is_not_error(status)) f_macro_string_dynamics_destroy(status, listing.socket) \
- if (F_status_is_not_error(status)) f_macro_string_dynamics_delete(status, listing.unknown)
-
- #define f_macro_directory_listing_delete_simple(listing) \
- f_macro_string_dynamics_delete_simple(listing.block) \
- f_macro_string_dynamics_delete_simple(listing.character) \
- f_macro_string_dynamics_delete_simple(listing.directory) \
- f_macro_string_dynamics_delete_simple(listing.regular) \
- f_macro_string_dynamics_delete_simple(listing.link) \
- f_macro_string_dynamics_delete_simple(listing.fifo) \
- f_macro_string_dynamics_delete_simple(listing.socket) \
- f_macro_string_dynamics_delete_simple(listing.unknown)
-
- #define f_macro_directory_listing_destroy_simple(listing) \
- f_macro_string_dynamics_destroy_simple(listing.block) \
- f_macro_string_dynamics_destroy_simple(listing.character) \
- f_macro_string_dynamics_destroy_simple(listing.directory) \
- f_macro_string_dynamics_destroy_simple(listing.regular) \
- f_macro_string_dynamics_destroy_simple(listing.link) \
- f_macro_string_dynamics_destroy_simple(listing.fifo) \
- f_macro_string_dynamics_destroy_simple(listing.socket) \
- f_macro_string_dynamics_destroy_simple(listing.unknown)
-#endif // _di_f_directory_listing_
+ #define f_macro_directory_listing_t_delete(status, listing) \
+ f_macro_string_dynamics_t_delete(status, listing.block) \
+ if (F_status_is_not_error(status)) f_macro_string_dynamics_t_delete(status, listing.character) \
+ if (F_status_is_not_error(status)) f_macro_string_dynamics_t_delete(status, listing.directory) \
+ if (F_status_is_not_error(status)) f_macro_string_dynamics_t_delete(status, listing.regular) \
+ if (F_status_is_not_error(status)) f_macro_string_dynamics_t_delete(status, listing.link) \
+ if (F_status_is_not_error(status)) f_macro_string_dynamics_t_delete(status, listing.fifo) \
+ if (F_status_is_not_error(status)) f_macro_string_dynamics_t_delete(status, listing.socket) \
+ if (F_status_is_not_error(status)) f_macro_string_dynamics_t_delete(status, listing.unknown)
+
+ #define f_macro_directory_listing_t_destroy(status, listing) \
+ f_macro_string_dynamics_t_destroy(status, listing.block) \
+ if (F_status_is_not_error(status)) f_macro_string_dynamics_t_destroy(status, listing.character) \
+ if (F_status_is_not_error(status)) f_macro_string_dynamics_t_destroy(status, listing.directory) \
+ if (F_status_is_not_error(status)) f_macro_string_dynamics_t_destroy(status, listing.regular) \
+ if (F_status_is_not_error(status)) f_macro_string_dynamics_t_destroy(status, listing.link) \
+ if (F_status_is_not_error(status)) f_macro_string_dynamics_t_destroy(status, listing.fifo) \
+ if (F_status_is_not_error(status)) f_macro_string_dynamics_t_destroy(status, listing.socket) \
+ if (F_status_is_not_error(status)) f_macro_string_dynamics_t_delete(status, listing.unknown)
+
+ #define f_macro_directory_listing_t_delete_simple(listing) \
+ f_macro_string_dynamics_t_delete_simple(listing.block) \
+ f_macro_string_dynamics_t_delete_simple(listing.character) \
+ f_macro_string_dynamics_t_delete_simple(listing.directory) \
+ f_macro_string_dynamics_t_delete_simple(listing.regular) \
+ f_macro_string_dynamics_t_delete_simple(listing.link) \
+ f_macro_string_dynamics_t_delete_simple(listing.fifo) \
+ f_macro_string_dynamics_t_delete_simple(listing.socket) \
+ f_macro_string_dynamics_t_delete_simple(listing.unknown)
+
+ #define f_macro_directory_listing_t_destroy_simple(listing) \
+ f_macro_string_dynamics_t_destroy_simple(listing.block) \
+ f_macro_string_dynamics_t_destroy_simple(listing.character) \
+ f_macro_string_dynamics_t_destroy_simple(listing.directory) \
+ f_macro_string_dynamics_t_destroy_simple(listing.regular) \
+ f_macro_string_dynamics_t_destroy_simple(listing.link) \
+ f_macro_string_dynamics_t_destroy_simple(listing.fifo) \
+ f_macro_string_dynamics_t_destroy_simple(listing.socket) \
+ f_macro_string_dynamics_t_destroy_simple(listing.unknown)
+#endif // _di_f_directory_listing_t_
/**
* An association of a path and a status code.
* status: the status code.
* path: the dynamically allocated path associated with the status code.
*/
-#ifndef _di_f_directory_status_
+#ifndef _di_f_directory_status_t_
typedef struct {
- f_status status;
- f_string_dynamic path;
- } f_directory_status;
+ f_status_t status;
+ f_string_dynamic_t path;
+ } f_directory_status_t;
- #define f_directory_status_initialize { 0, f_string_dynamic_initialize }
+ #define f_directory_status_t_initialize { 0, f_string_dynamic_t_initialize }
- #define f_macro_directory_status_clear(directory) \
+ #define f_macro_directory_status_t_clear(directory) \
directory.status = 0; \
- f_macro_string_dynamic_clear(directory.path);
+ f_macro_string_dynamic_t_clear(directory.path);
- #define f_macro_directory_status_new(status, statuses, length) f_macro_string_dynamic_new(status, statuses.path, length)
+ #define f_macro_directory_status_t_new(status, statuses, length) f_macro_string_dynamic_t_new(status, statuses.path, length)
- #define f_macro_directory_status_delete(status, statuses) f_macro_string_dynamic_delete(status, statuses.path)
- #define f_macro_directory_status_destroy(status, statuses) f_macro_string_dynamic_destroy(status, statuses.path)
+ #define f_macro_directory_status_t_delete(status, statuses) f_macro_string_dynamic_t_delete(status, statuses.path)
+ #define f_macro_directory_status_t_destroy(status, statuses) f_macro_string_dynamic_t_destroy(status, statuses.path)
- #define f_macro_directory_status_delete_simple(statuses) f_macro_string_dynamic_delete_simple(statuses.path)
- #define f_macro_directory_status_destroy_simple(statuses) f_macro_string_dynamic_destroy_simple(statuses.path)
+ #define f_macro_directory_status_t_delete_simple(statuses) f_macro_string_dynamic_t_delete_simple(statuses.path)
+ #define f_macro_directory_status_t_destroy_simple(statuses) f_macro_string_dynamic_t_destroy_simple(statuses.path)
- #define f_macro_directory_status_resize(status, statuses, new_length) f_macro_string_dynamic_resize(status, statuses.path, new_length)
- #define f_macro_directory_status_adjust(status, statuses, new_length) f_macro_string_dynamic_adjust(status, statuses.path, new_length)
-#endif // _di_f_directory_status_
+ #define f_macro_directory_status_t_resize(status, statuses, new_length) f_macro_string_dynamic_t_resize(status, statuses.path, new_length)
+ #define f_macro_directory_status_t_adjust(status, statuses, new_length) f_macro_string_dynamic_t_adjust(status, statuses.path, new_length)
+#endif // _di_f_directory_status_t_
/**
* An array of directory status.
* size: Total amount of allocated space.
* used: Total number of allocated spaces used.
*/
-#ifndef _di_f_directory_statuss_
+#ifndef _di_f_directory_statuss_t_
typedef struct {
- f_directory_status *array;
- f_array_length size;
- f_array_length used;
- } f_directory_statuss;
+ f_directory_status_t *array;
+ f_array_length_t size;
+ f_array_length_t used;
+ } f_directory_statuss_t;
- #define f_directory_statuss_initialize { 0, 0, 0 }
+ #define f_directory_statuss_t_initialize { 0, 0, 0 }
- #define f_macro_directory_statuss_clear(structures) f_macro_memory_structures_clear(structures)
+ #define f_macro_directory_statuss_t_clear(structures) f_macro_memory_structures_t_clear(structures)
- #define f_macro_directory_statuss_new(status, structures, length) f_macro_memory_structures_new(status, structures, f_directory_status, length)
+ #define f_macro_directory_statuss_t_new(status, structures, length) f_macro_memory_structures_t_new(status, structures, f_directory_status_t, length)
- #define f_macro_directory_statuss_delete(status, structures) \
+ #define f_macro_directory_statuss_t_delete(status, structures) \
status = F_none; \
structures.used = structures.size; \
while (structures.used > 0) { \
structures.used--; \
- f_macro_directory_status_delete(status, structures.array[structures.used]); \
+ f_macro_directory_status_t_delete(status, structures.array[structures.used]); \
if (status != F_none) break; \
} \
- if (status == F_none) status = f_memory_delete((void **) & structures.array, sizeof(f_directory_status), structures.size); \
+ if (status == F_none) status = f_memory_delete((void **) & structures.array, sizeof(f_directory_status_t), structures.size); \
if (status == F_none) structures.size = 0;
- #define f_macro_directory_statuss_destroy(status, structures) \
+ #define f_macro_directory_statuss_t_destroy(status, structures) \
status = F_none; \
structures.used = structures.size; \
while (structures.used > 0) { \
structures.used--; \
- f_macro_directory_status_destroy(status, structures.array[structures.used]); \
+ f_macro_directory_status_t_destroy(status, structures.array[structures.used]); \
if (status != F_none) break; \
} \
- if (status == F_none) status = f_memory_destroy((void **) & structures.array, sizeof(f_directory_status), structures.size); \
+ if (status == F_none) status = f_memory_destroy((void **) & structures.array, sizeof(f_directory_status_t), structures.size); \
if (status == F_none) structures.size = 0;
- #define f_macro_directory_statuss_delete_simple(structures) \
+ #define f_macro_directory_statuss_t_delete_simple(structures) \
structures.used = structures.size; \
while (structures.used > 0) { \
structures.used--; \
- f_macro_directory_status_delete_simple(structures.array[structures.used]); \
+ f_macro_directory_status_t_delete_simple(structures.array[structures.used]); \
} \
if (structures.used == 0) { \
- if (f_memory_delete((void **) & structures.array, sizeof(f_directory_status), structures.size)) { \
+ if (f_memory_delete((void **) & structures.array, sizeof(f_directory_status_t), structures.size)) { \
structures.size = 0; \
} \
}
- #define f_macro_directory_statuss_destroy_simple(structures) \
+ #define f_macro_directory_statuss_t_destroy_simple(structures) \
structures.used = structures.size; \
while (structures.used > 0) { \
structures.used--; \
- f_macro_directory_status_destroy_simple(structures.array[structures.used]); \
+ f_macro_directory_status_t_destroy_simple(structures.array[structures.used]); \
} \
if (structures.used == 0) { \
- if (f_memory_destroy((void **) & structures.array, sizeof(f_directory_status), structures.size)) { \
+ if (f_memory_destroy((void **) & structures.array, sizeof(f_directory_status_t), structures.size)) { \
structures.size = 0; \
} \
}
- #define f_macro_directory_statuss_resize(status, structures, new_length) \
+ #define f_macro_directory_statuss_t_resize(status, structures, new_length) \
status = F_none; \
if (new_length < structures.size) { \
- for (f_array_length _macro__i = structures.size - new_length; _macro__i < structures.size; _macro__i++) { \
- f_macro_directory_status_delete(status, structures.array[_macro__i]); \
+ for (f_array_length_t _macro__i = structures.size - new_length; _macro__i < structures.size; _macro__i++) { \
+ f_macro_directory_status_t_delete(status, structures.array[_macro__i]); \
if (status != F_none) break; \
} \
} \
- if (status == F_none) status = f_memory_resize((void **) & structures.array, sizeof(f_directory_status), structures.size, new_length); \
+ if (status == F_none) status = f_memory_resize((void **) & structures.array, sizeof(f_directory_status_t), structures.size, new_length); \
if (status == F_none) { \
if (new_length > structures.size) { \
- for (f_array_length _macro__i = structures.size; _macro__i < new_length; _macro__i++) { \
- memset(&structures.array[_macro__i], 0, sizeof(f_directory_status)); \
+ for (f_array_length_t _macro__i = structures.size; _macro__i < new_length; _macro__i++) { \
+ memset(&structures.array[_macro__i], 0, sizeof(f_directory_status_t)); \
} \
} \
structures.size = new_length; \
if (structures.used > structures.size) structures.used = new_length; \
}
- #define f_macro_directory_statuss_adjust(status, structures, new_length) \
+ #define f_macro_directory_statuss_t_adjust(status, structures, new_length) \
status = F_none; \
if (new_length < structures.size) { \
- for (f_array_length _macro__i = structures.size - new_length; _macro__i < structures.size; _macro__i++) { \
- f_macro_directory_status_destroy(status, structures.array[_macro__i]); \
+ for (f_array_length_t _macro__i = structures.size - new_length; _macro__i < structures.size; _macro__i++) { \
+ f_macro_directory_status_t_destroy(status, structures.array[_macro__i]); \
if (status != F_none) break; \
} \
} \
- if (status == F_none) status = f_memory_adjust((void **) & structures.array, sizeof(f_directory_status), structures.size, new_length); \
+ if (status == F_none) status = f_memory_adjust((void **) & structures.array, sizeof(f_directory_status_t), structures.size, new_length); \
if (status == F_none) { \
if (new_length > structures.size) { \
- for (f_array_length _macro__i = structures.size; _macro__i < new_length; _macro__i++) { \
- memset(&structures.array[_macro__i], 0, sizeof(f_directory_status)); \
+ for (f_array_length_t _macro__i = structures.size; _macro__i < new_length; _macro__i++) { \
+ memset(&structures.array[_macro__i], 0, sizeof(f_directory_status_t)); \
} \
} \
structures.size = new_length; \
if (structures.used > structures.size) structures.used = new_length; \
}
-#endif // _di_f_directory_statuss_
+#endif // _di_f_directory_statuss_t_
#ifdef __cplusplus
} // extern "C"
#endif
#if !defined(_di_f_directory_create_) || !defined(_di_f_directory_touch_)
- f_return_status private_f_directory_create(const f_string path, const mode_t mode) {
+ f_return_status private_f_directory_create(const f_string_t path, const mode_t mode) {
if (mkdir(path, mode) < 0) {
if (errno == EACCES) return F_status_set_error(F_access_denied);
#endif // !defined(_di_f_directory_create_) || !defined(_di_f_directory_touch_)
#if !defined(_di_f_directory_create_at_) || !defined(_di_f_directory_touch_at_)
- f_return_status private_f_directory_create_at(const int at_id, const f_string path, const mode_t mode) {
+ f_return_status private_f_directory_create_at(const int at_id, const f_string_t path, const mode_t mode) {
if (mkdirat(at_id, path, mode) < 0) {
if (errno == EACCES) return F_status_set_error(F_access_denied);
* @see f_directory_touch()
*/
#if !defined(_di_f_directory_create_) || !defined(_di_f_directory_touch_)
- extern f_return_status private_f_directory_create(const f_string path, const mode_t mode) f_gcc_attribute_visibility_internal;
+ extern f_return_status private_f_directory_create(const f_string_t path, const mode_t mode) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_f_directory_create_) || !defined(_di_f_directory_touch_)
/**
* @see f_directory_touch_at()
*/
#if !defined(_di_f_directory_create_at_) || !defined(_di_f_directory_touch_at_)
- extern f_return_status private_f_directory_create_at(const int at_id, const f_string path, const mode_t mode) f_gcc_attribute_visibility_internal;
+ extern f_return_status private_f_directory_create_at(const int at_id, const f_string_t path, const mode_t mode) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_f_directory_create_at_) || !defined(_di_f_directory_touch_at_)
/**
#endif // _di_f_environment_clear_
#ifndef _di_f_environment_get_
- f_return_status f_environment_get(const f_string name, f_string_dynamic *value) {
+ f_return_status f_environment_get(const f_string_t name, f_string_dynamic_t *value) {
return private_f_environment_get(name, value);
}
#endif // _di_f_environment_get_
#ifndef _di_f_environment_get_dynamic_
- f_return_status f_environment_get_dynamic(const f_string_static name, f_string_dynamic *value) {
+ f_return_status f_environment_get_dynamic(const f_string_static_t name, f_string_dynamic_t *value) {
#ifndef _di_level_0_parameter_checking_
if (name.used > name.size) return F_status_set_error(F_parameter);
if (value->used > value->size) return F_status_set_error(F_parameter);
#endif // _di_f_environment_get_dynamic_
#ifndef _di_f_environment_set_
- f_return_status f_environment_set(const f_string name, const f_string value, const bool replace) {
+ f_return_status f_environment_set(const f_string_t name, const f_string_t value, const bool replace) {
return private_f_environment_set(name, value, replace);
}
#endif // _di_f_environment_set_
#ifndef _di_f_environment_set_dynamic_
- f_return_status f_environment_set_dynamic(const f_string_static name, const f_string_static value, const bool replace) {
+ f_return_status f_environment_set_dynamic(const f_string_static_t name, const f_string_static_t value, const bool replace) {
#ifndef _di_level_0_parameter_checking_
if (name.used > name.size) return F_status_set_error(F_parameter);
if (value.used > value.size) return F_status_set_error(F_parameter);
#endif // _di_f_environment_set_dynamic_
#ifndef _di_f_environment_unset_
- f_return_status f_environment_unset(const f_string name) {
+ f_return_status f_environment_unset(const f_string_t name) {
return private_f_environment_unset(name);
}
#endif // _di_f_environment_unset_
#ifndef _di_f_environment_unset_
- f_return_status f_environment_unset_dynamic(const f_string_static name) {
+ f_return_status f_environment_unset_dynamic(const f_string_static_t name) {
#ifndef _di_level_0_parameter_checking_
if (name.used > name.size) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
* Environment related defines.
*/
#ifndef _di_f_environment_defines_
- #define f_environment_max_length f_string_length_size
+ #define f_environment_max_length f_string_length_t_size
#endif // _di_f_environment_defines_
/**
* @see getenv()
*/
#ifndef _di_f_environment_get_
- extern f_return_status f_environment_get(const f_string name, f_string_dynamic *value);
+ extern f_return_status f_environment_get(const f_string_t name, f_string_dynamic_t *value);
#endif // _di_f_environment_get_
/**
* @see getenv()
*/
#ifndef _di_f_environment_get_dynamic_
- extern f_return_status f_environment_get_dynamic(const f_string_static name, f_string_dynamic *value);
+ extern f_return_status f_environment_get_dynamic(const f_string_static_t name, f_string_dynamic_t *value);
#endif // _di_f_environment_get_dynamic_
/**
* @see setenv()
*/
#ifndef _di_f_environment_set_
- extern f_return_status f_environment_set(const f_string name, const f_string value, const bool replace);
+ extern f_return_status f_environment_set(const f_string_t name, const f_string_t value, const bool replace);
#endif // _di_f_environment_set_
/**
* @see setenv()
*/
#ifndef _di_f_environment_set_dynamic_
- extern f_return_status f_environment_set_dynamic(const f_string_static name, const f_string_static value, const bool replace);
+ extern f_return_status f_environment_set_dynamic(const f_string_static_t name, const f_string_static_t value, const bool replace);
#endif // _di_f_environment_set_dynamic_
/**
* @see unsetenv()
*/
#ifndef _di_f_environment_unset_
- extern f_return_status f_environment_unset(const f_string name);
+ extern f_return_status f_environment_unset(const f_string_t name);
#endif // _di_f_environment_unset_
/**
* @see unsetenv()
*/
#ifndef _di_f_environment_unset_dynamic_
- extern f_return_status f_environment_unset_dynamic(const f_string_static name);
+ extern f_return_status f_environment_unset_dynamic(const f_string_static_t name);
#endif // _di_f_environment_unset_dynamic_
#ifdef __cplusplus
#endif
#if !defined(_di_f_environment_get_) || !defined(_di_f_environment_get_dynamic_)
- f_return_status private_f_environment_get(const f_string name, f_string_dynamic *value) {
- const f_string result = getenv(name);
+ f_return_status private_f_environment_get(const f_string_t name, f_string_dynamic_t *value) {
+ const f_string_t result = getenv(name);
if (result == 0) {
return F_exist_not;
}
- const f_string_length size = strnlen(result, f_environment_max_length);
+ const f_string_length_t size = strnlen(result, f_environment_max_length);
if (size == 0) {
value->used = 0;
}
if (value->used + size > value->size) {
- f_status status = F_none;
+ f_status_t status = F_none;
- f_macro_string_dynamic_resize(status, (*value), size);
+ f_macro_string_dynamic_t_resize(status, (*value), size);
if (F_status_is_error(status)) return status;
}
#endif // !defined(_di_f_environment_get_) || !defined(_di_f_environment_get_dynamic_)
#if !defined(_di_f_environment_set_) || !defined(_di_f_environment_set_dynamic_)
- f_return_status private_f_environment_set(const f_string name, const f_string value, const bool replace) {
+ f_return_status private_f_environment_set(const f_string_t name, const f_string_t value, const bool replace) {
if (setenv(name, value, replace) < 0) {
if (errno == EINVAL) {
return F_status_set_error(F_invalid);
#endif // !defined(_di_f_environment_set_) || !defined(_di_f_environment_set_dynamic_)
#if !defined(_di_f_environment_unset_) || !defined(_di_f_environment_unset_dynamic_)
- f_return_status private_f_environment_unset(const f_string name) {
+ f_return_status private_f_environment_unset(const f_string_t name) {
if (unsetenv(name) < 0) {
if (errno == EINVAL) {
return F_status_set_error(F_invalid);
* @see f_environment_get_dynamic()
*/
#if !defined(_di_f_environment_get_) || !defined(_di_f_environment_get_dynamic_)
- extern f_return_status private_f_environment_get(const f_string name, f_string_dynamic *value) f_gcc_attribute_visibility_internal;
+ extern f_return_status private_f_environment_get(const f_string_t name, f_string_dynamic_t *value) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_f_environment_get_) || !defined(_di_f_environment_get_dynamic_)
/**
* @see f_environment_set_dynamic()
*/
#if !defined(_di_f_environment_set_) || !defined(_di_f_environment_set_dynamic_)
- extern f_return_status private_f_environment_set(const f_string name, const f_string value, const bool replace) f_gcc_attribute_visibility_internal;
+ extern f_return_status private_f_environment_set(const f_string_t name, const f_string_t value, const bool replace) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_f_environment_set_) || !defined(_di_f_environment_set_dynamic_)
/**
* @see f_environment_unset_dynamic()
*/
#if !defined(_di_f_environment_unset_) || !defined(_di_f_environment_unset_dynamic_)
- extern f_return_status private_f_environment_unset(const f_string name) f_gcc_attribute_visibility_internal;
+ extern f_return_status private_f_environment_unset(const f_string_t name) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_f_environment_unset_) || !defined(_di_f_environment_unset_dynamic_)
#ifdef __cplusplus
#endif
#ifndef _di_f_file_access_
- f_return_status f_file_access(const f_string path) {
+ f_return_status f_file_access(const f_string_t path) {
#ifndef _di_level_0_parameter_checking_
if (path == 0) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_file_access_
#ifndef _di_f_file_clone_
- f_return_status f_file_clone(const f_string source, const f_string destination, const bool role, const f_number_unsigned size_block, const bool exclusive) {
+ f_return_status f_file_clone(const f_string_t source, const f_string_t destination, const bool role, const f_number_unsigned_t size_block, const bool exclusive) {
#ifndef _di_level_0_parameter_checking_
if (source == 0) return F_status_set_error(F_parameter);
if (destination == 0) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- f_status status = F_none;
+ f_status_t status = F_none;
struct stat source_stat;
memset(&source_stat, 0, sizeof(struct stat));
#endif // _di_f_file_close_
#ifndef _di_f_file_copy_
- f_return_status f_file_copy(const f_string source, const f_string destination, const f_mode mode, const f_number_unsigned size_block, const bool exclusive) {
+ f_return_status f_file_copy(const f_string_t source, const f_string_t destination, const f_mode_t mode, const f_number_unsigned_t size_block, const bool exclusive) {
#ifndef _di_level_0_parameter_checking_
if (source == 0) return F_status_set_error(F_parameter);
if (destination == 0) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- f_status status = F_none;
+ f_status_t status = F_none;
struct stat source_stat;
memset(&source_stat, 0, sizeof(struct stat));
return F_none;
}
else if (f_macro_file_type_is_link(source_stat.st_mode)) {
- f_string_dynamic target = f_string_dynamic_initialize;
+ f_string_dynamic_t target = f_string_dynamic_t_initialize;
status = private_f_file_link_read(source, source_stat, &target);
if (F_status_is_error(status)) {
- f_macro_string_dynamic_delete_simple(target);
+ f_macro_string_dynamic_t_delete_simple(target);
return status;
}
status = private_f_file_link(target.string, destination);
- f_macro_string_dynamic_delete_simple(target);
+ f_macro_string_dynamic_t_delete_simple(target);
if (F_status_is_error(status)) {
if (F_status_set_fine(status) != F_file_found || exclusive) {
#endif // _di_f_file_copy_
#ifndef _di_f_file_create_
- f_return_status f_file_create(const f_string path, const mode_t mode, const bool exclusive) {
+ f_return_status f_file_create(const f_string_t path, const mode_t mode, const bool exclusive) {
#ifndef _di_level_0_parameter_checking_
if (path == 0) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_file_create_
#ifndef _di_f_file_create_at_
- f_return_status f_file_create_at(const int at_id, const f_string path, const mode_t mode, const bool exclusive) {
+ f_return_status f_file_create_at(const int at_id, const f_string_t path, const mode_t mode, const bool exclusive) {
#ifndef _di_level_0_parameter_checking_
if (path == 0) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_file_create_at_
#ifndef _di_f_file_create_device_
- f_return_status f_file_create_device(const f_string path, const mode_t mode, const unsigned int major, const unsigned int minor) {
+ f_return_status f_file_create_device(const f_string_t path, const mode_t mode, const unsigned int major, const unsigned int minor) {
#ifndef _di_level_0_parameter_checking_
if (path == 0) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_file_create_device_
#ifndef _di_f_file_create_device_at_
- f_return_status f_file_create_device_at(const int at_id, const f_string path, const mode_t mode, const unsigned int major, const unsigned int minor) {
+ f_return_status f_file_create_device_at(const int at_id, const f_string_t path, const mode_t mode, const unsigned int major, const unsigned int minor) {
#ifndef _di_level_0_parameter_checking_
if (path == 0) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_file_create_device_at_
#ifndef _di_f_file_create_fifo_
- f_return_status f_file_create_fifo(const f_string path, const mode_t mode) {
+ f_return_status f_file_create_fifo(const f_string_t path, const mode_t mode) {
#ifndef _di_level_0_parameter_checking_
if (path == 0) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_file_create_fifo_
#ifndef _di_f_file_create_fifo_at_
- f_return_status f_file_create_fifo_at(const int at_id, const f_string path, const mode_t mode) {
+ f_return_status f_file_create_fifo_at(const int at_id, const f_string_t path, const mode_t mode) {
#ifndef _di_level_0_parameter_checking_
if (path == 0) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_file_create_fifo_at_
#ifndef _di_f_file_create_node_
- f_return_status f_file_create_node(const f_string path, const mode_t mode, const dev_t device) {
+ f_return_status f_file_create_node(const f_string_t path, const mode_t mode, const dev_t device) {
#ifndef _di_level_0_parameter_checking_
if (path == 0) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_file_create_node_
#ifndef _di_f_file_create_node_at_
- f_return_status f_file_create_node_at(const int at_id, const f_string path, const mode_t mode, const dev_t device) {
+ f_return_status f_file_create_node_at(const int at_id, const f_string_t path, const mode_t mode, const dev_t device) {
#ifndef _di_level_0_parameter_checking_
if (path == 0) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_file_create_node_at_
#ifndef _di_f_file_exists_
- f_return_status f_file_exists(const f_string path) {
+ f_return_status f_file_exists(const f_string_t path) {
#ifndef _di_level_0_parameter_checking_
if (path == 0) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- f_status status = F_none;
+ f_status_t status = F_none;
struct stat file_stat;
memset(&file_stat, 0, sizeof(struct stat));
#endif // _di_f_file_exists_
#ifndef _di_f_file_exists_at_
- f_return_status f_file_exists_at(const int at_id, const f_string path, const int flag) {
+ f_return_status f_file_exists_at(const int at_id, const f_string_t path, const int flag) {
#ifndef _di_level_0_parameter_checking_
if (path == 0) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- f_status status = F_none;
+ f_status_t status = F_none;
struct stat file_stat;
memset(&file_stat, 0, sizeof(struct stat));
#endif // _di_f_file_flush_
#ifndef _di_f_file_is_
- f_return_status f_file_is(const f_string path, const int type) {
+ f_return_status f_file_is(const f_string_t path, const int type) {
#ifndef _di_level_0_parameter_checking_
if (path == 0) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_file_is_
#ifndef _di_f_file_is_at_
- f_return_status f_file_is_at(const int at_id, const f_string path, const int type, const int flag) {
+ f_return_status f_file_is_at(const int at_id, const f_string_t path, const int type, const int flag) {
#ifndef _di_level_0_parameter_checking_
if (path == 0) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_file_is_at_
#ifndef _di_f_file_link_
- f_return_status f_file_link(const f_string target, const f_string point) {
+ f_return_status f_file_link(const f_string_t target, const f_string_t point) {
#ifndef _di_level_0_parameter_checking_
if (target == 0) return F_status_set_error(F_parameter);
if (point == 0) return F_status_set_error(F_parameter);
#endif // _di_f_file_link_
#ifndef _di_f_file_link_at_
- f_return_status f_file_link_at(const int at_id, const f_string target, const f_string point) {
+ f_return_status f_file_link_at(const int at_id, const f_string_t target, const f_string_t point) {
#ifndef _di_level_0_parameter_checking_
if (target == 0) return F_status_set_error(F_parameter);
if (point == 0) return F_status_set_error(F_parameter);
#endif // _di_f_file_link_at_
#ifndef _di_f_file_link_hard_
- f_return_status f_file_link_hard(const f_string target, const f_string point) {
+ f_return_status f_file_link_hard(const f_string_t target, const f_string_t point) {
#ifndef _di_level_0_parameter_checking_
if (target == 0) return F_status_set_error(F_parameter);
if (point == 0) return F_status_set_error(F_parameter);
#endif // _di_f_file_link_hard_
#ifndef _di_f_file_link_hard_at_
- f_return_status f_file_link_hard_at(const int at_id_target, const int at_id_point, const f_string target, const f_string point, const int flag) {
+ f_return_status f_file_link_hard_at(const int at_id_target, const int at_id_point, const f_string_t target, const f_string_t point, const int flag) {
#ifndef _di_level_0_parameter_checking_
if (target == 0) return F_status_set_error(F_parameter);
if (point == 0) return F_status_set_error(F_parameter);
#endif // _di_f_file_link_hard_at_
#ifndef _di_f_file_link_read_
- f_return_status f_file_link_read(const f_string path, const struct stat link_stat, f_string_dynamic *target) {
+ f_return_status f_file_link_read(const f_string_t path, const struct stat link_stat, f_string_dynamic_t *target) {
#ifndef _di_level_0_parameter_checking_
if (path == 0) return F_status_set_error(F_parameter);
if (link_stat.st_size == 0) return F_status_set_error(F_parameter);
#endif // _di_f_file_link_read_
#ifndef _di_f_file_link_read_at_
- f_return_status f_file_link_read_at(const int at_id, const f_string path, const struct stat link_stat, f_string_dynamic *target) {
+ f_return_status f_file_link_read_at(const int at_id, const f_string_t path, const struct stat link_stat, f_string_dynamic_t *target) {
#ifndef _di_level_0_parameter_checking_
if (link_stat.st_size == 0) return F_status_set_error(F_parameter);
if (target == 0) return F_status_set_error(F_parameter);
#endif // _di_f_file_mode_determine_
#ifndef _di_f_file_mode_from_string_
- f_return_status f_file_mode_from_string(const f_string string, const mode_t umask, f_file_mode *mode, uint8_t *replace) {
+ f_return_status f_file_mode_from_string(const f_string_t string, const mode_t umask, f_file_mode *mode, uint8_t *replace) {
#ifndef _di_level_0_parameter_checking_
if (string == 0) return F_status_set_error(F_parameter);
if (string[0] == 0) return F_status_set_error(F_parameter);
mode_umask |= f_file_mode_block_world & f_file_mode_mask_bit_execute;
}
- for (f_string_length i = 0; syntax && string[i]; i++) {
+ for (f_string_length_t i = 0; syntax && string[i]; i++) {
switch (string[i]) {
case 'o':
// 1 = add, 2 = replace, 3 = subtract.
uint8_t how = 0;
- f_string_length i = 0;
+ f_string_length_t i = 0;
*replace = 0;
}
if (string[i]) {
- f_string_length j = 0;
+ f_string_length_t j = 0;
for (; string[i + j] && j < 4; j++) {
#endif // _di_f_file_mode_from_string_
#ifndef _di_f_file_mode_read_
- f_return_status f_file_mode_read(const f_string path, mode_t *mode) {
+ f_return_status f_file_mode_read(const f_string_t path, mode_t *mode) {
#ifndef _di_level_0_parameter_checking_
if (path == 0) return F_status_set_error(F_parameter);
if (mode == 0) return F_status_set_error(F_parameter);
memset(&stat_file, 0, sizeof(struct stat));
- f_status status = private_f_file_stat(path, F_true, &stat_file);
+ f_status_t status = private_f_file_stat(path, F_true, &stat_file);
if (F_status_is_error(status)) {
return status;
}
#endif // _di_f_file_mode_read_
#ifndef _di_f_file_mode_read_at_
- f_return_status f_file_mode_read_at(const int at_id, const f_string path, mode_t *mode) {
+ f_return_status f_file_mode_read_at(const int at_id, const f_string_t path, mode_t *mode) {
#ifndef _di_level_0_parameter_checking_
if (path == 0) return F_status_set_error(F_parameter);
if (mode == 0) return F_status_set_error(F_parameter);
memset(&stat_file, 0, sizeof(struct stat));
- f_status status = private_f_file_stat(path, F_true, &stat_file);
+ f_status_t status = private_f_file_stat(path, F_true, &stat_file);
if (F_status_is_error(status)) {
return status;
}
#endif // _di_f_file_mode_read_at_
#ifndef _di_f_file_mode_set_
- f_return_status f_file_mode_set(const f_string path, const mode_t mode) {
+ f_return_status f_file_mode_set(const f_string_t path, const mode_t mode) {
#ifndef _di_level_0_parameter_checking_
if (path == 0) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_file_mode_set_
#ifndef _di_f_file_mode_set_at_
- f_return_status f_file_mode_set_at(const int at_id, const f_string path, const mode_t mode) {
+ f_return_status f_file_mode_set_at(const int at_id, const f_string_t path, const mode_t mode) {
#ifndef _di_level_0_parameter_checking_
if (path == 0) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_file_mode_determine_
#ifndef _di_f_file_name_base_
- f_return_status f_file_name_base(const f_string path, const f_string_length length, f_string_dynamic *name_base) {
+ f_return_status f_file_name_base(const f_string_t path, const f_string_length_t length, f_string_dynamic_t *name_base) {
#ifndef _di_level_0_parameter_checking_
if (path == 0) return F_status_set_error(F_parameter);
if (name_base == 0) return F_status_set_error(F_parameter);
// POSIX basename() modifies the path, so protect it (and add a terminating NULL).
char path_argument[length + 1];
- f_string path_to_name;
+ f_string_t path_to_name;
memcpy(path_argument, path, length);
path_argument[length] = 0;
path_to_name = basename(path_argument);
- f_string_length size = strnlen(path_to_name, length);
+ f_string_length_t size = strnlen(path_to_name, length);
if (name_base->used + size > name_base->size) {
- if (name_base->used + size > f_string_length_size) {
+ if (name_base->used + size > f_string_length_t_size) {
return F_status_set_error(F_string_too_large);
}
- f_status status = F_none;
+ f_status_t status = F_none;
- f_macro_string_dynamic_resize(status, (*name_base), name_base->used + size);
+ f_macro_string_dynamic_t_resize(status, (*name_base), name_base->used + size);
if (F_status_is_error(status)) return status;
}
#endif // _di_f_file_name_base_
#ifndef _di_f_file_name_directory_
- f_return_status f_file_name_directory(const f_string path, const f_string_length length, f_string_dynamic *name_directory) {
+ f_return_status f_file_name_directory(const f_string_t path, const f_string_length_t length, f_string_dynamic_t *name_directory) {
#ifndef _di_level_0_parameter_checking_
if (path == 0) return F_status_set_error(F_parameter);
if (name_directory == 0) return F_status_set_error(F_parameter);
// POSIX dirname() modifies the path, so protect it (and add a terminating NULL).
char path_argument[length + 1];
- f_string path_to_name;
+ f_string_t path_to_name;
memcpy(path_argument, path, length);
path_argument[length] = 0;
path_to_name = dirname(path_argument);
- f_string_length size = strnlen(path_to_name, length);
+ f_string_length_t size = strnlen(path_to_name, length);
if (name_directory->used + size > name_directory->size) {
- if (name_directory->used + size > f_string_length_size) {
+ if (name_directory->used + size > f_string_length_t_size) {
return F_status_set_error(F_string_too_large);
}
- f_status status = F_none;
+ f_status_t status = F_none;
- f_macro_string_dynamic_resize(status, (*name_directory), name_directory->used + size);
+ f_macro_string_dynamic_t_resize(status, (*name_directory), name_directory->used + size);
if (F_status_is_error(status)) return status;
}
#endif // _di_f_file_name_directory_
#ifndef _di_f_file_open_
- f_return_status f_file_open(const f_string path, const mode_t mode, f_file *file) {
+ f_return_status f_file_open(const f_string_t path, const mode_t mode, f_file_t *file) {
#ifndef _di_level_0_parameter_checking_
if (path == 0) return F_status_set_error(F_parameter);
if (file == 0) return F_status_set_error(F_parameter);
#endif // _di_f_file_open_
#ifndef _di_f_file_open_at_
- f_return_status f_file_open_at(const int at_id, const f_string path, const mode_t mode, f_file *file) {
+ f_return_status f_file_open_at(const int at_id, const f_string_t path, const mode_t mode, f_file_t *file) {
#ifndef _di_level_0_parameter_checking_
if (file == 0) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_file_open_at_
#ifndef _di_f_file_read_
- f_return_status f_file_read(const f_file file, f_string_dynamic *buffer) {
+ f_return_status f_file_read(const f_file_t file, f_string_dynamic_t *buffer) {
#ifndef _di_level_0_parameter_checking_
if (file.size_read == 0) return F_status_set_error(F_parameter);
if (buffer->used > buffer->size) return F_status_set_error(F_parameter);
if (file.id < 0) return F_status_set_error(F_file);
if (file.id == 0) return F_status_set_error(F_file_closed);
- f_status status = F_none;
+ f_status_t status = F_none;
ssize_t size_read = 0;
char buffer_read[file.size_read];
while ((size_read = read(file.id, buffer_read, file.size_read)) > 0) {
if (buffer->used + size_read > buffer->size) {
- if (buffer->size + size_read > f_string_length_size) {
+ if (buffer->size + size_read > f_string_length_t_size) {
return F_status_set_error(F_string_too_large);
}
- f_macro_string_dynamic_resize(status, (*buffer), buffer->size + size_read);
+ f_macro_string_dynamic_t_resize(status, (*buffer), buffer->size + size_read);
if (F_status_is_error(status)) return status;
}
#endif // _di_f_file_read_
#ifndef _di_f_file_read_block_
- f_return_status f_file_read_block(const f_file file, f_string_dynamic *buffer) {
+ f_return_status f_file_read_block(const f_file_t file, f_string_dynamic_t *buffer) {
#ifndef _di_level_0_parameter_checking_
if (file.size_read == 0) return F_status_set_error(F_parameter);
if (buffer->used > buffer->size) return F_status_set_error(F_parameter);
if (file.id < 0) return F_status_set_error(F_file);
if (file.id == 0) return F_status_set_error(F_file_closed);
- f_status status = F_none;
+ f_status_t status = F_none;
ssize_t size_read = 0;
char buffer_read[file.size_read];
if ((size_read = read(file.id, buffer_read, file.size_read)) > 0) {
if (buffer->used + size_read > buffer->size) {
- if (buffer->size + size_read > f_string_length_size) {
+ if (buffer->size + size_read > f_string_length_t_size) {
return F_status_set_error(F_string_too_large);
}
- f_macro_string_dynamic_resize(status, (*buffer), buffer->size + size_read);
+ f_macro_string_dynamic_t_resize(status, (*buffer), buffer->size + size_read);
if (F_status_is_error(status)) return status;
}
#endif // _di_f_file_read_block_
#ifndef _di_f_file_read_until_
- f_return_status f_file_read_until(const f_file file, f_string_dynamic *buffer, const f_string_length total) {
+ f_return_status f_file_read_until(const f_file_t file, f_string_dynamic_t *buffer, const f_string_length_t total) {
#ifndef _di_level_0_parameter_checking_
if (file.size_read == 0) return F_status_set_error(F_parameter);
if (buffer->used > buffer->size) return F_status_set_error(F_parameter);
if (file.id < 0) return F_status_set_error(F_file);
if (file.id == 0) return F_status_set_error(F_file_closed);
- f_status status = F_none;
+ f_status_t status = F_none;
ssize_t size_read = 0;
- f_string_length buffer_size = file.size_read;
- f_string_length buffer_count = 0;
+ f_string_length_t buffer_size = file.size_read;
+ f_string_length_t buffer_count = 0;
if (total < buffer_size) {
buffer_size = total;
while (buffer_count < total && (size_read = read(file.id, buffer_read, buffer_size)) > 0) {
if (buffer->used + size_read > buffer->size) {
- if (buffer->size + size_read > f_string_length_size) {
+ if (buffer->size + size_read > f_string_length_t_size) {
return F_status_set_error(F_string_too_large);
}
- f_macro_string_dynamic_resize(status, (*buffer), buffer->size + size_read);
+ f_macro_string_dynamic_t_resize(status, (*buffer), buffer->size + size_read);
if (F_status_is_error(status)) return status;
}
#endif // _di_f_file_read_until_
#ifndef _di_f_file_remove_
- f_return_status f_file_remove(const f_string path) {
+ f_return_status f_file_remove(const f_string_t path) {
#ifndef _di_level_0_parameter_checking_
if (path == 0) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_file_remove_
#ifndef _di_f_file_remove_at_
- f_return_status f_file_remove_at(const int at_id, const f_string path, const int flag) {
+ f_return_status f_file_remove_at(const int at_id, const f_string_t path, const int flag) {
#ifndef _di_level_0_parameter_checking_
if (path == 0) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_file_remove_at_
#ifndef _di_f_file_role_change_
- f_return_status f_file_role_change(const f_string path, const uid_t uid, const gid_t gid, const bool dereference) {
+ f_return_status f_file_role_change(const f_string_t path, const uid_t uid, const gid_t gid, const bool dereference) {
#ifndef _di_level_0_parameter_checking_
if (path == 0) return F_status_set_error(F_parameter);
if (uid == -1 && gid == -1) return F_status_set_error(F_parameter);
#endif // _di_f_file_role_change_
#ifndef _di_f_file_role_change_at_
- f_return_status f_file_role_change_at(const int at_id, const f_string path, const uid_t uid, const gid_t gid, const int flag) {
+ f_return_status f_file_role_change_at(const int at_id, const f_string_t path, const uid_t uid, const gid_t gid, const int flag) {
#ifndef _di_level_0_parameter_checking_
if (path == 0) return F_status_set_error(F_parameter);
if (uid == -1 && gid == -1) return F_status_set_error(F_parameter);
#endif // _di_f_file_role_change_at_
#ifndef _di_f_file_seek_
- f_return_status f_file_seek(const int id, const int whence, const f_string_length offset, f_string_length *seeked) {
+ f_return_status f_file_seek(const int id, const int whence, const f_string_length_t offset, f_string_length_t *seeked) {
#ifndef _di_level_0_parameter_checking_
if (id <= 0) return F_status_set_error(F_parameter);
if (whence < 0) return F_status_set_error(F_parameter);
#endif // _di_f_file_seek_
#ifndef _di_f_file_size_
- f_return_status f_file_size(const f_string path, const bool dereference, f_string_length *size) {
+ f_return_status f_file_size(const f_string_t path, const bool dereference, f_string_length_t *size) {
#ifndef _di_level_0_parameter_checking_
if (path == 0) return F_status_set_error(F_parameter);
if (size == 0) return F_status_set_error(F_parameter);
memset(&file_stat, 0, sizeof(struct stat));
- f_status status = private_f_file_stat(path, dereference, &file_stat);
+ f_status_t status = private_f_file_stat(path, dereference, &file_stat);
if (F_status_is_error(status)) return status;
#endif // _di_f_file_size_
#ifndef _di_f_file_size_at_
- f_return_status f_file_size_at(const int at_id, const f_string path, const bool dereference, f_string_length *size) {
+ f_return_status f_file_size_at(const int at_id, const f_string_t path, const bool dereference, f_string_length_t *size) {
#ifndef _di_level_0_parameter_checking_
if (path == 0) return F_status_set_error(F_parameter);
if (at_id <= 0) return F_status_set_error(F_parameter);
memset(&file_stat, 0, sizeof(struct stat));
- f_status status = private_f_file_stat_at(at_id, path, dereference, &file_stat);
+ f_status_t status = private_f_file_stat_at(at_id, path, dereference, &file_stat);
if (F_status_is_error(status)) return status;
#endif // _di_f_file_size_at_
#ifndef _di_f_file_size_by_id_
- f_return_status f_file_size_by_id(const int id, f_string_length *size) {
+ f_return_status f_file_size_by_id(const int id, f_string_length_t *size) {
#ifndef _di_level_0_parameter_checking_
if (id <= 0) return F_status_set_error(F_parameter);
if (size == 0) return F_status_set_error(F_parameter);
memset(&file_stat, 0, sizeof(struct stat));
- f_status status = private_f_file_stat_by_id(id, &file_stat);
+ f_status_t status = private_f_file_stat_by_id(id, &file_stat);
if (F_status_is_error(status)) return status;
#endif // _di_f_file_size_by_id_
#ifndef _di_f_file_stat_
- f_return_status f_file_stat(const f_string path, const bool dereference, struct stat *file_stat) {
+ f_return_status f_file_stat(const f_string_t path, const bool dereference, struct stat *file_stat) {
#ifndef _di_level_0_parameter_checking_
if (path == 0) return F_status_set_error(F_parameter);
if (file_stat == 0) return F_status_set_error(F_parameter);
#endif // _di_f_file_stat_
#ifndef _di_f_file_stat_at_
- f_return_status f_file_stat_at(const int at_id, const f_string path, const int flag, struct stat *file_stat) {
+ f_return_status f_file_stat_at(const int at_id, const f_string_t path, const int flag, struct stat *file_stat) {
#ifndef _di_level_0_parameter_checking_
if (path == 0) return F_status_set_error(F_parameter);
if (at_id <= 0) return F_status_set_error(F_parameter);
#endif // _di_f_file_stat_by_id_
#ifndef _di_f_file_touch_
- f_return_status f_file_touch(const f_string path, const mode_t mode, const bool dereference) {
+ f_return_status f_file_touch(const f_string_t path, const mode_t mode, const bool dereference) {
#ifndef _di_level_0_parameter_checking_
if (path == 0) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- f_status status = F_none;
+ f_status_t status = F_none;
struct stat file_stat;
memset(&file_stat, 0, sizeof(struct stat));
#endif // _di_f_file_touch_
#ifndef _di_f_file_touch_at_
- f_return_status f_file_touch_at(const int at_id, const f_string path, const mode_t mode, const int flag) {
+ f_return_status f_file_touch_at(const int at_id, const f_string_t path, const mode_t mode, const int flag) {
#ifndef _di_level_0_parameter_checking_
if (path == 0) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- f_status status = F_none;
+ f_status_t status = F_none;
struct stat file_stat;
memset(&file_stat, 0, sizeof(struct stat));
#endif // _di_f_file_touch_at_
#ifndef _di_f_file_type_
- f_return_status f_file_type(const f_string path, int *type) {
+ f_return_status f_file_type(const f_string_t path, int *type) {
#ifndef _di_level_0_parameter_checking_
if (path == 0) return F_status_set_error(F_parameter);
if (type == 0) return F_status_set_error(F_parameter);
#endif // _di_f_file_type_
#ifndef _di_f_file_type_at_
- f_return_status f_file_type_at(const int at_id, const f_string path, const int flag, int *type) {
+ f_return_status f_file_type_at(const int at_id, const f_string_t path, const int flag, int *type) {
#ifndef _di_level_0_parameter_checking_
if (path == 0) return F_status_set_error(F_parameter);
if (type == 0) return F_status_set_error(F_parameter);
#endif // _di_f_file_type_at_
#ifndef _di_f_file_write_
- f_return_status f_file_write(const f_file file, const f_string_static buffer, f_string_length *written) {
+ f_return_status f_file_write(const f_file_t file, const f_string_static_t buffer, f_string_length_t *written) {
#ifndef _di_level_0_parameter_checking_
if (file.size_write == 0) return F_status_set_error(F_parameter);
if (buffer.used > buffer.size) return F_status_set_error(F_parameter);
return F_data_not;
}
- f_status status = F_none;
+ f_status_t status = F_none;
if (written) {
private_f_file_write_until(file, buffer.string, buffer.used, written);
if (status == F_none && *written == buffer.used) return F_none_eos;
}
else {
- f_string_length written_local = 0;
+ f_string_length_t written_local = 0;
private_f_file_write_until(file, buffer.string, buffer.used, &written_local);
#endif // _di_f_file_write_
#ifndef _di_f_file_write_block_
- f_return_status f_file_write_block(const f_file file, const f_string_static buffer, f_string_length *written) {
+ f_return_status f_file_write_block(const f_file_t file, const f_string_static_t buffer, f_string_length_t *written) {
#ifndef _di_level_0_parameter_checking_
if (file.size_write == 0) return F_status_set_error(F_parameter);
if (buffer.used > buffer.size) return F_status_set_error(F_parameter);
return F_data_not;
}
- f_string_length write_max = file.size_write;
+ f_string_length_t write_max = file.size_write;
if (write_max > buffer.used) {
write_max = buffer.used;
}
- f_status status = F_none;
+ f_status_t status = F_none;
if (written) {
private_f_file_write_until(file, buffer.string, write_max, written);
}
}
else {
- f_string_length written_local = 0;
+ f_string_length_t written_local = 0;
private_f_file_write_until(file, buffer.string, write_max, &written_local);
#endif // _di_f_file_write_block_
#ifndef _di_f_file_write_until_
- f_return_status f_file_write_until(const f_file file, const f_string_static buffer, const f_string_length total, f_string_length *written) {
+ f_return_status f_file_write_until(const f_file_t file, const f_string_static_t buffer, const f_string_length_t total, f_string_length_t *written) {
#ifndef _di_level_0_parameter_checking_
if (file.size_write == 0) return F_status_set_error(F_parameter);
if (buffer.used > buffer.size) return F_status_set_error(F_parameter);
return F_data_not;
}
- f_string_length write_max = file.size_write;
+ f_string_length_t write_max = file.size_write;
if (write_max > buffer.used) {
write_max = buffer.used;
}
- f_status status = F_none;
+ f_status_t status = F_none;
if (written) {
private_f_file_write_until(file, buffer.string, write_max, written);
}
}
else {
- f_string_length written_local = 0;
+ f_string_length_t written_local = 0;
private_f_file_write_until(file, buffer.string, buffer.used, &written_local);
#endif // _di_f_file_write_until_
#ifndef _di_f_file_write_range_
- f_return_status f_file_write_range(const f_file file, const f_string_static buffer, const f_string_range range, f_string_length *written) {
+ f_return_status f_file_write_range(const f_file_t file, const f_string_static_t buffer, const f_string_range_t range, f_string_length_t *written) {
#ifndef _di_level_0_parameter_checking_
if (file.size_write == 0) return F_status_set_error(F_parameter);
if (buffer.used > buffer.size) return F_status_set_error(F_parameter);
return F_data_not;
}
- const f_string_length total = (range.stop - range.start) + 1;
- f_string_length write_max = total;
+ const f_string_length_t total = (range.stop - range.start) + 1;
+ f_string_length_t write_max = total;
if (write_max > buffer.used) {
write_max = buffer.used;
}
- f_status status = F_none;
+ f_status_t status = F_none;
if (written) {
private_f_file_write_until(file, buffer.string + range.start, write_max, written);
}
}
else {
- f_string_length written_local = 0;
+ f_string_length_t written_local = 0;
private_f_file_write_until(file, buffer.string + range.start, write_max, &written_local);
* size_read: The default number of 1-byte characters to read at a time and is often used for the read buffer size.
* size_write: The default number of 1-byte characters to read at a time and is often used for the write buffer size.
*/
-#ifndef _di_f_file_
+#ifndef _di_f_file_t_
typedef struct {
int id;
int flag;
size_t size_read;
size_t size_write;
- } f_file;
+ } f_file_t;
- #define f_file_initialize { 0, f_file_flag_read_only, f_file_default_read_size, f_file_default_write_size }
+ #define f_file_t_initialize { 0, f_file_flag_read_only, f_file_default_read_size, f_file_default_write_size }
- #define f_macro_file_clear(file) \
+ #define f_macro_file_t_clear(file) \
file.id = 0; \
file.flag = 0; \
file.size_read = 0; \
file.size_write = 0;
- #define f_macro_file_reset(file) \
+ #define f_macro_file_t_reset(file) \
file.id = 0; \
file.flag = f_file_flag_read_only; \
file.size_read = f_file_default_read_size; \
file.size_write = f_file_default_write_size;
-#endif // _di_f_file_
+#endif // _di_f_file_t_
/**
* File AT_* define related functionality.
* @see access()
*/
#ifndef _di_f_file_access_
- extern f_return_status f_file_access(const f_string path);
+ extern f_return_status f_file_access(const f_string_t path);
#endif // _di_f_file_access_
/**
* F_failure (with error bit) for any other error.
*/
#ifndef _di_f_file_clone_
- extern f_return_status f_file_clone(const f_string source, const f_string destination, const bool role, const f_number_unsigned size_block, const bool exclusive);
+ extern f_return_status f_file_clone(const f_string_t source, const f_string_t destination, const bool role, const f_number_unsigned_t size_block, const bool exclusive);
#endif // _di_f_file_clone_
/**
* F_failure (with error bit) for any other error.
*/
#ifndef _di_f_file_copy_
- extern f_return_status f_file_copy(const f_string source, const f_string destination, const f_mode mode, const f_number_unsigned size_block, const bool exclusive);
+ extern f_return_status f_file_copy(const f_string_t source, const f_string_t destination, const f_mode_t mode, const f_number_unsigned_t size_block, const bool exclusive);
#endif // _di_f_file_copy_
/**
* @see open()
*/
#ifndef _di_f_file_create_
- extern f_return_status f_file_create(const f_string path, const mode_t mode, const bool exclusive);
+ extern f_return_status f_file_create(const f_string_t path, const mode_t mode, const bool exclusive);
#endif // _di_f_file_create_
/**
* @see openat()
*/
#ifndef _di_f_file_create_at_
- extern f_return_status f_file_create_at(const int at_id, const f_string path, const mode_t mode, const bool exclusive);
+ extern f_return_status f_file_create_at(const int at_id, const f_string_t path, const mode_t mode, const bool exclusive);
#endif // _di_f_file_create_at_
/**
* @see mknod()
*/
#ifndef _di_f_file_create_device_
- extern f_return_status f_file_create_device(const f_string path, const mode_t mode, const unsigned int major, const unsigned int minor);
+ extern f_return_status f_file_create_device(const f_string_t path, const mode_t mode, const unsigned int major, const unsigned int minor);
#endif // _di_f_file_create_device_
/**
* @see mknodat()
*/
#ifndef _di_f_file_create_device_at_
- extern f_return_status f_file_create_device_at(const int at_id, const f_string path, const mode_t mode, const unsigned int major, const unsigned int minor);
+ extern f_return_status f_file_create_device_at(const int at_id, const f_string_t path, const mode_t mode, const unsigned int major, const unsigned int minor);
#endif // _di_f_file_create_device_at_
/**
* @see mkfifo()
*/
#ifndef _di_f_file_create_fifo_
- extern f_return_status f_file_create_fifo(const f_string path, const mode_t mode);
+ extern f_return_status f_file_create_fifo(const f_string_t path, const mode_t mode);
#endif // _di_f_file_create_fifo_
/**
* @see mkfifoat()
*/
#ifndef _di_f_file_create_fifo_at_
- extern f_return_status f_file_create_fifo_at(const int at_id, const f_string path, const mode_t mode);
+ extern f_return_status f_file_create_fifo_at(const int at_id, const f_string_t path, const mode_t mode);
#endif // _di_f_file_create_fifo_at_
/**
* @see mknod()
*/
#ifndef _di_f_file_create_node_
- extern f_return_status f_file_create_node(const f_string path, const mode_t mode, const dev_t device);
+ extern f_return_status f_file_create_node(const f_string_t path, const mode_t mode, const dev_t device);
#endif // _di_f_file_create_node_
/**
* @see mknodat()
*/
#ifndef _di_f_file_create_node_at_
- extern f_return_status f_file_create_node_at(const int at_id, const f_string path, const mode_t mode, const dev_t device);
+ extern f_return_status f_file_create_node_at(const int at_id, const f_string_t path, const mode_t mode, const dev_t device);
#endif // _di_f_file_create_node_at_
/**
* @see stat()
*/
#ifndef _di_f_file_exists_
- extern f_return_status f_file_exists(const f_string path);
+ extern f_return_status f_file_exists(const f_string_t path);
#endif // _di_f_file_exists_
/**
* @see fstatat()
*/
#ifndef _di_f_file_exists_at_
- extern f_return_status f_file_exists_at(const int at_id, const f_string path, const int flag);
+ extern f_return_status f_file_exists_at(const int at_id, const f_string_t path, const int flag);
#endif // _di_f_file_exists_at_
/**
* @see stat()
*/
#ifndef _di_f_file_is_
- extern f_return_status f_file_is(const f_string path, const int type);
+ extern f_return_status f_file_is(const f_string_t path, const int type);
#endif // _di_f_file_is_
/**
* @see fstatat()
*/
#ifndef _di_f_file_is_at_
- extern f_return_status f_file_is_at(const int at_id, const f_string path, const int type, const int flag);
+ extern f_return_status f_file_is_at(const int at_id, const f_string_t path, const int type, const int flag);
#endif // _di_f_file_is_at_
/**
* @see symlink()
*/
#ifndef _di_f_file_link_
- extern f_return_status f_file_link(const f_string target, const f_string point);
+ extern f_return_status f_file_link(const f_string_t target, const f_string_t point);
#endif // _di_f_file_link_
/**
* @see symlinkat()
*/
#ifndef _di_f_file_link_at_
- extern f_return_status f_file_link_at(const int at_id, const f_string target, const f_string point);
+ extern f_return_status f_file_link_at(const int at_id, const f_string_t target, const f_string_t point);
#endif // _di_f_file_link_at_
/**
* @see link()
*/
#ifndef _di_f_file_link_hard_
- extern f_return_status f_file_link_hard(const f_string target, const f_string point);
+ extern f_return_status f_file_link_hard(const f_string_t target, const f_string_t point);
#endif // _di_f_file_link_hard_
/**
* @see linkat()
*/
#ifndef _di_f_file_link_hard_at_
- extern f_return_status f_file_link_hard_at(const int at_id_target, const int at_id_point, const f_string target, const f_string point, const int flag);
+ extern f_return_status f_file_link_hard_at(const int at_id_target, const int at_id_point, const f_string_t target, const f_string_t point, const int flag);
#endif // _di_f_file_link_hard_at_
/**
* @see readlink()
*/
#ifndef _di_f_file_link_read_
- extern f_return_status f_file_link_read(const f_string path, const struct stat link_stat, f_string_dynamic *target);
+ extern f_return_status f_file_link_read(const f_string_t path, const struct stat link_stat, f_string_dynamic_t *target);
#endif // _di_f_file_link_read_
/**
* @see readlinkat()
*/
#ifndef _di_f_file_link_read_at_
- extern f_return_status f_file_link_read_at(const int at_id, const f_string path, const struct stat link_stat, f_string_dynamic *target);
+ extern f_return_status f_file_link_read_at(const int at_id, const f_string_t path, const struct stat link_stat, f_string_dynamic_t *target);
#endif // _di_f_file_link_read_at_
/**
* @see private_f_file_mode_determine()
*/
#ifndef _di_f_file_mode_from_string_
- extern f_return_status f_file_mode_from_string(const f_string string, const mode_t umask, f_file_mode *mode, uint8_t *replace);
+ extern f_return_status f_file_mode_from_string(const f_string_t string, const mode_t umask, f_file_mode *mode, uint8_t *replace);
#endif // _di_f_file_mode_from_string_
/**
* @see fstat()
*/
#ifndef _di_f_file_mode_read_
- extern f_return_status f_file_mode_read(const f_string path, mode_t *mode);
+ extern f_return_status f_file_mode_read(const f_string_t path, mode_t *mode);
#endif // _di_f_file_mode_read_
/**
* @see fstatat()
*/
#ifndef _di_f_file_mode_read_at_
- extern f_return_status f_file_mode_read_at(const int at_id, const f_string path, mode_t *mode);
+ extern f_return_status f_file_mode_read_at(const int at_id, const f_string_t path, mode_t *mode);
#endif // _di_f_file_mode_read_at_
/**
* @see chmod()
*/
#ifndef _di_f_file_mode_set_
- extern f_return_status f_file_mode_set(const f_string path, const mode_t mode);
+ extern f_return_status f_file_mode_set(const f_string_t path, const mode_t mode);
#endif // _di_f_file_mode_set_
/**
* @see fchmodat()
*/
#ifndef _di_f_file_mode_set_at_
- extern f_return_status f_file_mode_set_at(const int at_id, const f_string path, const mode_t mode);
+ extern f_return_status f_file_mode_set_at(const int at_id, const f_string_t path, const mode_t mode);
#endif // _di_f_file_mode_set_at_
/**
* @see basename()
*/
#ifndef _di_f_file_name_base_
- extern f_return_status f_file_name_base(const f_string path, const f_string_length length, f_string_dynamic *name_base);
+ extern f_return_status f_file_name_base(const f_string_t path, const f_string_length_t length, f_string_dynamic_t *name_base);
#endif // _di_f_file_name_base_
/**
* @see dirname()
*/
#ifndef _di_f_file_name_directory_
- extern f_return_status f_file_name_directory(const f_string path, const f_string_length length, f_string_dynamic *name_directory);
+ extern f_return_status f_file_name_directory(const f_string_t path, const f_string_length_t length, f_string_dynamic_t *name_directory);
#endif // _di_f_file_name_directory_
/**
* @see open()
*/
#ifndef _di_f_file_open_
- extern f_return_status f_file_open(const f_string path, const mode_t mode, f_file *file);
+ extern f_return_status f_file_open(const f_string_t path, const mode_t mode, f_file_t *file);
#endif // _di_f_file_open_
/**
* @see openat()
*/
#ifndef _di_f_file_open_at_
- extern f_return_status f_file_open_at(const int at_id, const f_string path, const mode_t mode, f_file *file);
+ extern f_return_status f_file_open_at(const int at_id, const f_string_t path, const mode_t mode, f_file_t *file);
#endif // _di_f_file_open_at_
/**
* @see read()
*/
#ifndef _di_f_file_read_
- extern f_return_status f_file_read(const f_file file, f_string_dynamic *buffer);
+ extern f_return_status f_file_read(const f_file_t file, f_string_dynamic_t *buffer);
#endif // _di_f_file_read_
/**
* @see read()
*/
#ifndef _di_f_file_read_
- extern f_return_status f_file_read_block(const f_file file, f_string_dynamic *buffer);
+ extern f_return_status f_file_read_block(const f_file_t file, f_string_dynamic_t *buffer);
#endif // _di_f_file_read_
/**
* @see read()
*/
#ifndef _di_f_file_read_until_
- extern f_return_status f_file_read_until(const f_file file, f_string_dynamic *buffer, const f_string_length total);
+ extern f_return_status f_file_read_until(const f_file_t file, f_string_dynamic_t *buffer, const f_string_length_t total);
#endif // _di_f_file_read_until_
/**
* @see unlink()
*/
#ifndef _di_f_file_remove_
- extern f_return_status f_file_remove(const f_string path);
+ extern f_return_status f_file_remove(const f_string_t path);
#endif // _di_f_file_remove_
/**
* @see unlinkat()
*/
#ifndef _di_f_file_remove_at_
- extern f_return_status f_file_remove_at(const int at_id, const f_string path, const int flag);
+ extern f_return_status f_file_remove_at(const int at_id, const f_string_t path, const int flag);
#endif // _di_f_file_remove_at_
/**
* @see lchown()
*/
#ifndef _di_f_file_role_change_
- extern f_return_status f_file_role_change(const f_string path, const uid_t uid, const gid_t gid, const bool dereference);
+ extern f_return_status f_file_role_change(const f_string_t path, const uid_t uid, const gid_t gid, const bool dereference);
#endif // _di_f_file_role_change_
/**
* @see fchownat()
*/
#ifndef _di_f_file_role_change_at_
- extern f_return_status f_file_role_change_at(const int at_id, const f_string path, const uid_t uid, const gid_t gid, const int flag);
+ extern f_return_status f_file_role_change_at(const int at_id, const f_string_t path, const uid_t uid, const gid_t gid, const int flag);
#endif // _di_f_file_role_change_at_
/**
* @see lseek
*/
#ifndef _di_f_file_seek_
- extern f_return_status f_file_seek(const int id, const int whence, const f_string_length offset, f_string_length *seeked);
+ extern f_return_status f_file_seek(const int id, const int whence, const f_string_length_t offset, f_string_length_t *seeked);
#endif // _di_f_file_seek_
/**
* @see f_file_stat()
*/
#ifndef _di_f_file_size_
- extern f_return_status f_file_size(const f_string path, const bool dereference, f_string_length *size);
+ extern f_return_status f_file_size(const f_string_t path, const bool dereference, f_string_length_t *size);
#endif // _di_f_file_size_
/**
* @see f_file_stat_at()
*/
#ifndef _di_f_file_size_at_
- extern f_return_status f_file_size_at(const int at_id, const f_string path, const bool dereference, f_string_length *size);
+ extern f_return_status f_file_size_at(const int at_id, const f_string_t path, const bool dereference, f_string_length_t *size);
#endif // _di_f_file_size_at_
/**
* @see f_file_stat_by_id()
*/
#ifndef _di_f_file_size_by_id_
- extern f_return_status f_file_size_by_id(const int id, f_string_length *size);
+ extern f_return_status f_file_size_by_id(const int id, f_string_length_t *size);
#endif // _di_f_file_size_by_id_
/**
* @see stat()
*/
#ifndef _di_f_file_stat_
- extern f_return_status f_file_stat(const f_string path, const bool dereference, struct stat *file_stat);
+ extern f_return_status f_file_stat(const f_string_t path, const bool dereference, struct stat *file_stat);
#endif // _di_f_file_stat_
/**
* @see fstatat()
*/
#ifndef _di_f_file_stat_at_
- extern f_return_status f_file_stat_at(const int at_id, const f_string path, const int flag, struct stat *file_stat);
+ extern f_return_status f_file_stat_at(const int at_id, const f_string_t path, const int flag, struct stat *file_stat);
#endif // _di_f_file_stat_at_
/**
* @see utimensat()
*/
#ifndef _di_f_file_touch_
- extern f_return_status f_file_touch(const f_string path, const mode_t mode, const bool dereference);
+ extern f_return_status f_file_touch(const f_string_t path, const mode_t mode, const bool dereference);
#endif // _di_f_file_touch_
/**
* @see utimensat()
*/
#ifndef _di_f_file_touch_at_
- extern f_return_status f_file_touch_at(const int at_id, const f_string path, const mode_t mode, const int flag);
+ extern f_return_status f_file_touch_at(const int at_id, const f_string_t path, const mode_t mode, const int flag);
#endif // _di_f_file_touch_at_
/**
* @see stat()
*/
#ifndef _di_f_file_type_
- extern f_return_status f_file_type(const f_string path, int *type);
+ extern f_return_status f_file_type(const f_string_t path, int *type);
#endif // _di_f_file_type_
/**
* @see fstatat()
*/
#ifndef _di_f_file_type_at_
- extern f_return_status f_file_type_at(const int at_id, const f_string path, const int flag, int *type);
+ extern f_return_status f_file_type_at(const int at_id, const f_string_t path, const int flag, int *type);
#endif // _di_f_file_type_at_
/**
* @see write()
*/
#ifndef _di_f_file_write_
- extern f_return_status f_file_write(const f_file file, const f_string_static buffer, f_string_length *written);
+ extern f_return_status f_file_write(const f_file_t file, const f_string_static_t buffer, f_string_length_t *written);
#endif // _di_f_file_write_
/**
* @see write()
*/
#ifndef _di_f_file_write_block_
- extern f_return_status f_file_write_block(const f_file file, const f_string_static buffer, f_string_length *written);
+ extern f_return_status f_file_write_block(const f_file_t file, const f_string_static_t buffer, f_string_length_t *written);
#endif // _di_f_file_write_block_
/**
* @see write()
*/
#ifndef _di_f_file_write_until_
- extern f_return_status f_file_write_until(const f_file file, const f_string_static buffer, const f_string_length total, f_string_length *written);
+ extern f_return_status f_file_write_until(const f_file_t file, const f_string_static_t buffer, const f_string_length_t total, f_string_length_t *written);
#endif // _di_f_file_write_until_
/**
* @see write()
*/
#ifndef _di_f_file_write_range_
- extern f_return_status f_file_write_range(const f_file file, const f_string_static buffer, const f_string_range range, f_string_length *written);
+ extern f_return_status f_file_write_range(const f_file_t file, const f_string_static_t buffer, const f_string_range_t range, f_string_length_t *written);
#endif // _di_f_file_write_range_
#ifdef __cplusplus
#endif // !defined(_di_f_file_close_) || !defined(_di_f_file_copy_)
#if !defined(_di_f_file_copy_) || !defined(_di_f_file_clone_)
- f_return_status private_f_file_copy_content(const f_string source, const f_string destination, const f_number_unsigned size_block) {
- f_file file_source = f_file_initialize;
- f_file file_destination = f_file_initialize;
+ f_return_status private_f_file_copy_content(const f_string_t source, const f_string_t destination, const f_number_unsigned_t size_block) {
+ f_file_t file_source = f_file_t_initialize;
+ f_file_t file_destination = f_file_t_initialize;
file_source.flag = f_file_flag_read_only;
file_destination.flag = f_file_flag_write_only | f_file_flag_no_follow;
- f_status status = private_f_file_open(source, 0, &file_source);
+ f_status_t status = private_f_file_open(source, 0, &file_source);
if (F_status_is_error(status)) return status;
status = private_f_file_open(destination, 0, &file_destination);
#endif // !defined(_di_f_file_copy_) || !defined(_di_f_file_clone_)
#if !defined(_di_f_file_copy_at_) || !defined(_di_f_file_clone_at_)
- f_return_status private_f_file_copy_content_at(const int at_id, const f_string source, const f_string destination, const f_number_unsigned size_block) {
- f_file file_source = f_file_initialize;
- f_file file_destination = f_file_initialize;
+ f_return_status private_f_file_copy_content_at(const int at_id, const f_string_t source, const f_string_t destination, const f_number_unsigned_t size_block) {
+ f_file_t file_source = f_file_t_initialize;
+ f_file_t file_destination = f_file_t_initialize;
file_source.flag = f_file_flag_read_only;
file_destination.flag = f_file_flag_write_only | f_file_flag_no_follow;
- f_status status = private_f_file_open_at(at_id, source, 0, &file_source);
+ f_status_t status = private_f_file_open_at(at_id, source, 0, &file_source);
if (F_status_is_error(status)) return status;
status = private_f_file_open_at(at_id, destination, 0, &file_destination);
#endif // !defined(_di_f_file_copy_at_) || !defined(_di_f_file_clone_at_)
#if !defined(_di_f_file_create_) || !defined(_di_f_file_copy_)
- f_return_status private_f_file_create(const f_string path, const mode_t mode, const bool exclusive) {
- f_file file = f_file_initialize;
+ f_return_status private_f_file_create(const f_string_t path, const mode_t mode, const bool exclusive) {
+ f_file_t file = f_file_t_initialize;
file.flag = f_file_flag_close_execute | f_file_flag_create | f_file_flag_write_only;
file.flag |= f_file_flag_exclusive;
}
- f_status status = private_f_file_open(path, mode, &file);
+ f_status_t status = private_f_file_open(path, mode, &file);
if (file.id > 0) {
return private_f_file_close(&file.id);
#endif // !defined(_di_f_file_create_) || !defined(_di_f_file_copy_)
#if !defined(_di_f_file_create_at_) || !defined(_di_f_file_copy_at_)
- f_return_status private_f_file_create_at(const int at_id, const f_string path, const mode_t mode, const bool exclusive) {
- f_file file = f_file_initialize;
+ f_return_status private_f_file_create_at(const int at_id, const f_string_t path, const mode_t mode, const bool exclusive) {
+ f_file_t file = f_file_t_initialize;
file.flag = f_file_flag_close_execute | f_file_flag_create | f_file_flag_write_only;
file.flag |= f_file_flag_exclusive;
}
- f_status status = private_f_file_open_at(at_id, path, mode, &file);
+ f_status_t status = private_f_file_open_at(at_id, path, mode, &file);
if (file.id > 0) {
return private_f_file_close(&file.id);
#endif // !defined(_di_f_file_create_at_) || !defined(_di_f_file_copy_at_)
#if !defined(_di_f_file_copy_)
- f_return_status private_f_file_create_directory(const f_string path, const mode_t mode) {
+ f_return_status private_f_file_create_directory(const f_string_t path, const mode_t mode) {
if (mkdir(path, mode) < 0) {
if (errno == EACCES) return F_status_set_error(F_access_denied);
#endif // !defined(_di_f_file_copy_)
#if !defined(_di_f_file_copy_at_)
- f_return_status private_f_file_create_directory_at(const int at_id, const f_string path, const mode_t mode) {
+ f_return_status private_f_file_create_directory_at(const int at_id, const f_string_t path, const mode_t mode) {
if (mkdirat(at_id, path, mode) < 0) {
if (errno == EACCES) return F_status_set_error(F_access_denied);
#endif // !defined(_di_f_file_copy_at_)
#if !defined(_di_f_file_create_fifo_) || !defined(_di_f_file_copy_)
- f_return_status private_f_file_create_fifo(const f_string path, const mode_t mode) {
+ f_return_status private_f_file_create_fifo(const f_string_t path, const mode_t mode) {
if (mkfifo(path, mode) < 0) {
if (errno == EACCES) return F_status_set_error(F_access_denied);
#endif // !defined(_di_f_file_create_fifo_) || !defined(_di_f_file_copy_)
#if !defined(_di_f_file_create_fifo_at_) || !defined(_di_f_file_copy_at_)
- f_return_status private_f_file_create_fifo_at(const int at_id, const f_string path, const mode_t mode) {
+ f_return_status private_f_file_create_fifo_at(const int at_id, const f_string_t path, const mode_t mode) {
if (mkfifoat(at_id, path, mode) < 0) {
if (errno == EACCES) return F_status_set_error(F_access_denied);
#endif // !defined(_di_f_file_create_fifo_at_) || !defined(_di_f_file_copy_at_)
#if !defined(_di_f_file_create_device_) || !defined(_di_f_file_create_node_) || !defined(_di_f_file_copy_)
- f_return_status private_f_file_create_node(const f_string path, const mode_t mode, const dev_t device) {
+ f_return_status private_f_file_create_node(const f_string_t path, const mode_t mode, const dev_t device) {
if (mknod(path, mode, device) < 0) {
if (errno == EACCES) return F_status_set_error(F_access_denied);
#endif // !defined(_di_f_file_create_device_) || !defined(_di_f_file_create_node_) || !defined(_di_f_file_copy_)
#if !defined(_di_f_file_create_device_at_) || !defined(_di_f_file_create_node_at_) || !defined(_di_f_file_copy_at_)
- f_return_status private_f_file_create_node_at(const int at_id, const f_string path, const mode_t mode, const dev_t device) {
+ f_return_status private_f_file_create_node_at(const int at_id, const f_string_t path, const mode_t mode, const dev_t device) {
if (mknodat(at_id, path, mode, device) < 0) {
if (errno == EACCES) return F_status_set_error(F_access_denied);
#endif // !defined(_di_f_file_flush_) || !defined(_di_f_file_close_) || !defined(_di_f_file_copy_)
#if !defined(_di_f_file_link_) || !defined(_di_f_file_copy_)
- f_return_status private_f_file_link(const f_string target, const f_string point) {
+ f_return_status private_f_file_link(const f_string_t target, const f_string_t point) {
if (symlink(target, point) < 0) {
if (errno == EACCES) return F_status_set_error(F_access_denied);
#endif // !defined(_di_f_file_link_) || !defined(_di_f_file_copy_)
#if !defined(_di_f_file_link_at_) || !defined(_di_f_file_copy_at_)
- f_return_status private_f_file_link_at(const int at_id, const f_string target, const f_string point) {
+ f_return_status private_f_file_link_at(const int at_id, const f_string_t target, const f_string_t point) {
if (symlinkat(target, at_id, point) < 0) {
if (errno == EACCES) return F_status_set_error(F_access_denied);
#endif // !defined(_di_f_file_link_at_) || !defined(_di_f_file_copy_at_)
#if !defined(_di_f_file_link_read_) || !defined(_di_f_file_copy_)
- f_return_status private_f_file_link_read(const f_string path, const struct stat link_stat, f_string_dynamic *target) {
+ f_return_status private_f_file_link_read(const f_string_t path, const struct stat link_stat, f_string_dynamic_t *target) {
// create a NULL terminated string based on file stat.
if (link_stat.st_size + 1 > target->size) {
- if (link_stat.st_size + 1 > f_string_length_size) {
+ if (link_stat.st_size + 1 > f_string_length_t_size) {
return F_status_set_error(F_string_too_large);
}
- f_status status = F_none;
+ f_status_t status = F_none;
- f_macro_string_dynamic_resize(status, (*target), link_stat.st_size + 1);
+ f_macro_string_dynamic_t_resize(status, (*target), link_stat.st_size + 1);
if (F_status_is_error(status)) return status;
}
#endif // !defined(_di_f_file_link_read_) || !defined(_di_f_file_copy_)
#if !defined(_di_f_file_link_read_at_) || !defined(_di_f_file_copy_at_)
- f_return_status private_f_file_link_read_at(const int at_id, const f_string path, const struct stat link_stat, f_string_dynamic *target) {
+ f_return_status private_f_file_link_read_at(const int at_id, const f_string_t path, const struct stat link_stat, f_string_dynamic_t *target) {
// create a NULL terminated string based on file stat.
if (link_stat.st_size + 1 > target->size) {
- if (link_stat.st_size + 1 > f_string_length_size) {
+ if (link_stat.st_size + 1 > f_string_length_t_size) {
return F_status_set_error(F_string_too_large);
}
- f_status status = F_none;
+ f_status_t status = F_none;
- f_macro_string_dynamic_resize(status, (*target), link_stat.st_size + 1);
+ f_macro_string_dynamic_t_resize(status, (*target), link_stat.st_size + 1);
if (F_status_is_error(status)) return status;
}
#endif // !defined(_di_f_file_link_read_at_) || !defined(_di_f_file_copy_at_)
#if !defined(_di_f_file_mode_set_) || !defined(_di_f_file_copy_)
- f_return_status private_f_file_mode_set(const f_string path, const mode_t mode) {
+ f_return_status private_f_file_mode_set(const f_string_t path, const mode_t mode) {
if (chmod(path, mode) < 0) {
if (errno == EACCES) return F_status_set_error(F_access_denied);
#endif // !defined(_di_f_file_mode_set_) || !defined(_di_f_file_copy_)
#if !defined(_di_f_file_mode_set_at_) || !defined(_di_f_file_copy_at_)
- f_return_status private_f_file_mode_set_at(const int at_id, const f_string path, const mode_t mode) {
+ f_return_status private_f_file_mode_set_at(const int at_id, const f_string_t path, const mode_t mode) {
if (fchmodat(at_id, path, mode, 0) < 0) {
if (errno == EACCES) return F_status_set_error(F_access_denied);
#endif // !defined(_di_f_file_mode_set_at_) || !defined(_di_f_file_copy_at_)
#if !defined(_di_f_file_open_) || !defined(_di_f_file_copy_)
- f_return_status private_f_file_open(const f_string path, const mode_t mode, f_file *file) {
+ f_return_status private_f_file_open(const f_string_t path, const mode_t mode, f_file_t *file) {
if (mode == 0) {
file->id = open(path, file->flag);
}
#endif // !defined(_di_f_file_open_) || !defined(_di_f_file_copy_)
#if !defined(_di_f_file_open_at_) || !defined(_di_f_file_copy_at_)
- f_return_status private_f_file_open_at(const int at_id, const f_string path, const mode_t mode, f_file *file) {
+ f_return_status private_f_file_open_at(const int at_id, const f_string_t path, const mode_t mode, f_file_t *file) {
if (mode == 0) {
file->id = openat(at_id, path, file->flag);
}
#endif // !defined(_di_f_file_open_at_) || !defined(_di_f_file_copy_at_)
#if !defined(_di_f_file_role_change_) || !defined(_di_f_file_copy_)
- f_return_status private_f_file_role_change(const f_string path, const uid_t uid, const gid_t gid, const bool dereference) {
+ f_return_status private_f_file_role_change(const f_string_t path, const uid_t uid, const gid_t gid, const bool dereference) {
int result = 0;
if (dereference) {
#endif // !defined(_di_f_file_role_change_) || !defined(_di_f_file_copy_)
#if !defined(_di_f_file_role_change_at_) || !defined(_di_f_file_copy_at_)
- f_return_status private_f_file_role_change_at(const int at_id, const f_string path, const uid_t uid, const gid_t gid, const int flag) {
+ f_return_status private_f_file_role_change_at(const int at_id, const f_string_t path, const uid_t uid, const gid_t gid, const int flag) {
int result = 0;
if (uid != -1) {
#endif // !defined(_di_f_file_role_change_at_) || !defined(_di_f_file_copy_at_)
#if !defined(_di_f_file_stat_) || !defined(_di_f_file_copy_)
- f_return_status private_f_file_stat(const f_string path, const bool dereference, struct stat *file_stat) {
+ f_return_status private_f_file_stat(const f_string_t path, const bool dereference, struct stat *file_stat) {
if ((dereference ? stat(path, file_stat) : lstat(path, file_stat)) < 0) {
if (errno == ENAMETOOLONG) return F_status_set_error(F_name);
#endif // !defined(_di_f_file_stat_) || !defined(_di_f_file_copy_)
#if !defined(_di_f_file_stat_at_) || !defined(_di_f_file_copy_at_)
- f_return_status private_f_file_stat_at(const int at_id, const f_string path, const int flag, struct stat *file_stat) {
+ f_return_status private_f_file_stat_at(const int at_id, const f_string_t path, const int flag, struct stat *file_stat) {
if (fstatat(at_id, path, file_stat, flag) < 0) {
if (errno == ENAMETOOLONG) return F_status_set_error(F_name);
#endif // !defined(_di_f_file_stat_by_id_) || !defined(_di_f_file_size_by_id_)
#if !defined(f_file_write) || !defined(f_file_write_until) || !defined(f_file_write_range)
- f_return_status private_f_file_write_until(const f_file file, const f_string string, const f_string_length total, f_string_length *written) {
+ f_return_status private_f_file_write_until(const f_file_t file, const f_string_t string, const f_string_length_t total, f_string_length_t *written) {
*written = 0;
- f_status status = F_none;
- f_string_length write_size = file.size_write;
- f_string_length write_max = total;
+ f_status_t status = F_none;
+ f_string_length_t write_size = file.size_write;
+ f_string_length_t write_max = total;
ssize_t size_write = 0;
* @see f_file_clone()
*/
#if !defined(_di_f_file_copy_) || !defined(_di_f_file_clone_)
- extern f_return_status private_f_file_copy_content(const f_string source, const f_string destination, const f_number_unsigned size_block) f_gcc_attribute_visibility_internal;
+ extern f_return_status private_f_file_copy_content(const f_string_t source, const f_string_t destination, const f_number_unsigned_t size_block) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_f_file_copy_) || !defined(_di_f_file_clone_)
/**
* @see f_file_create()
*/
#if !defined(_di_f_file_create_) || !defined(_di_f_file_copy_)
- extern f_return_status private_f_file_create(const f_string path, const mode_t mode, const bool exclusive) f_gcc_attribute_visibility_internal;
+ extern f_return_status private_f_file_create(const f_string_t path, const mode_t mode, const bool exclusive) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_f_file_create_) || !defined(_di_f_file_copy_)
/**
* @see f_file_create_at()
*/
#if !defined(_di_f_file_create_at_)
- extern f_return_status private_f_file_create_at(const int at_id, const f_string path, const mode_t mode, const bool exclusive) f_gcc_attribute_visibility_internal;
+ extern f_return_status private_f_file_create_at(const int at_id, const f_string_t path, const mode_t mode, const bool exclusive) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_f_file_create_at_)
/**
* @see mkdir()
*/
#if !defined(_di_f_file_copy_)
- extern f_return_status private_f_file_create_directory(const f_string path, const mode_t mode) f_gcc_attribute_visibility_internal;
+ extern f_return_status private_f_file_create_directory(const f_string_t path, const mode_t mode) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_f_file_copy_)
/**
* @see mkdirat()
*/
#if !defined(_di_f_file_copy_at_)
- extern f_return_status private_f_file_create_directory_at(const int at_id, const f_string path, const mode_t mode) f_gcc_attribute_visibility_internal;
+ extern f_return_status private_f_file_create_directory_at(const int at_id, const f_string_t path, const mode_t mode) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_f_file_copy_at_)
/**
* @see mkfifo()
*/
#if !defined(_di_f_file_create_fifo_) || !defined(_di_f_file_copy_)
- extern f_return_status private_f_file_create_fifo(const f_string path, const mode_t mode) f_gcc_attribute_visibility_internal;
+ extern f_return_status private_f_file_create_fifo(const f_string_t path, const mode_t mode) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_f_file_create_fifo_) || !defined(_di_f_file_copy_)
/**
* @see mkfifoat()
*/
#if !defined(_di_f_file_create_fifo_at_) || !defined(_di_f_file_copy_at_)
- extern f_return_status private_f_file_create_fifo_at(const int at_id, const f_string path, const mode_t mode) f_gcc_attribute_visibility_internal;
+ extern f_return_status private_f_file_create_fifo_at(const int at_id, const f_string_t path, const mode_t mode) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_f_file_create_fifo_at_) || !defined(_di_f_file_copy_at_)
/**
* @see f_file_create_node()
*/
#if !defined(_di_f_file_create_device_) || !defined(_di_f_file_create_node_) || !defined(_di_f_file_copy_)
- extern f_return_status private_f_file_create_node(const f_string path, const mode_t mode, const dev_t device) f_gcc_attribute_visibility_internal;
+ extern f_return_status private_f_file_create_node(const f_string_t path, const mode_t mode, const dev_t device) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_f_file_create_device_) || !defined(_di_f_file_create_node_) || !defined(_di_f_file_copy_)
/**
* @see f_file_create_node_at()
*/
#if !defined(_di_f_file_create_device_at_) || !defined(_di_f_file_create_node_at_) || !defined(_di_f_file_copy_at_)
- extern f_return_status private_f_file_create_node_at(const int at_id, const f_string path, const mode_t mode, const dev_t device) f_gcc_attribute_visibility_internal;
+ extern f_return_status private_f_file_create_node_at(const int at_id, const f_string_t path, const mode_t mode, const dev_t device) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_f_file_create_device_at_) || !defined(_di_f_file_create_node_at_) || !defined(_di_f_file_copy_at_)
/**
* @see f_file_link()
*/
#if !defined(_di_f_file_link_) || !defined(_di_f_file_copy_)
- extern f_return_status private_f_file_link(const f_string target, const f_string point) f_gcc_attribute_visibility_internal;
+ extern f_return_status private_f_file_link(const f_string_t target, const f_string_t point) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_f_file_link_) || !defined(_di_f_file_copy_)
/**
* @see f_file_link_at()
*/
#if !defined(_di_f_file_link_at_)
- extern f_return_status private_f_file_link_at(const int at_id, const f_string target, const f_string point) f_gcc_attribute_visibility_internal;
+ extern f_return_status private_f_file_link_at(const int at_id, const f_string_t target, const f_string_t point) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_f_file_link_at_)
/**
* @see f_file_link_read()
*/
#if !defined(_di_f_file_link_read_) || !defined(_di_f_file_copy_)
- extern f_return_status private_f_file_link_read(const f_string path, const struct stat link_stat, f_string_dynamic *target) f_gcc_attribute_visibility_internal;
+ extern f_return_status private_f_file_link_read(const f_string_t path, const struct stat link_stat, f_string_dynamic_t *target) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_f_file_link_read_) || !defined(_di_f_file_copy_)
/**
* @see f_file_link_read_at()
*/
#if !defined(_di_f_file_link_read_at_) || !defined(_di_f_file_copy_at_)
- extern f_return_status private_f_file_link_read_at(const int at_id, const f_string path, const struct stat link_stat, f_string_dynamic *target) f_gcc_attribute_visibility_internal;
+ extern f_return_status private_f_file_link_read_at(const int at_id, const f_string_t path, const struct stat link_stat, f_string_dynamic_t *target) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_f_file_link_read_at_) || !defined(_di_f_file_copy_at_)
/**
* @see f_file_copy()
*/
#if !defined(_di_f_file_mode_set_) || !defined(_di_f_file_copy_)
- extern f_return_status private_f_file_mode_set(const f_string path, const mode_t mode) f_gcc_attribute_visibility_internal;
+ extern f_return_status private_f_file_mode_set(const f_string_t path, const mode_t mode) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_f_file_mode_set_) || !defined(_di_f_file_copy_)
/**
* @see f_file_mode_set_at()
*/
#if !defined(_di_f_file_mode_set_at_)
- extern f_return_status private_f_file_mode_set_at(const int at_id, const f_string path, const mode_t mode) f_gcc_attribute_visibility_internal;
+ extern f_return_status private_f_file_mode_set_at(const int at_id, const f_string_t path, const mode_t mode) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_f_file_mode_set_at_)
/**
* @see f_file_open()
*/
#if !defined(_di_f_file_open_) || !defined(_di_f_file_copy_)
- extern f_return_status private_f_file_open(const f_string path, const mode_t mode, f_file *file) f_gcc_attribute_visibility_internal;
+ extern f_return_status private_f_file_open(const f_string_t path, const mode_t mode, f_file_t *file) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_f_file_open_) || !defined(_di_f_file_copy_)
/**
* @see f_file_open_at()
*/
#if !defined(_di_f_file_open_at_)
- extern f_return_status private_f_file_open_at(const int at_id, const f_string path, const mode_t mode, f_file *file) f_gcc_attribute_visibility_internal;
+ extern f_return_status private_f_file_open_at(const int at_id, const f_string_t path, const mode_t mode, f_file_t *file) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_f_file_open_at_)
/**
* @see f_file_copy()
*/
#if !defined(_di_f_file_role_change_) || !defined(_di_f_file_copy_)
- extern f_return_status private_f_file_role_change(const f_string path, const uid_t uid, const gid_t gid, const bool dereference) f_gcc_attribute_visibility_internal;
+ extern f_return_status private_f_file_role_change(const f_string_t path, const uid_t uid, const gid_t gid, const bool dereference) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_f_file_role_change_) || !defined(_di_f_file_copy_)
/**
* @see f_file_role_change_at()
*/
#if !defined(_di_f_file_role_change_at_)
- extern f_return_status private_f_file_role_change_at(const int at_id, const f_string path, const uid_t uid, const gid_t gid, const int flag) f_gcc_attribute_visibility_internal;
+ extern f_return_status private_f_file_role_change_at(const int at_id, const f_string_t path, const uid_t uid, const gid_t gid, const int flag) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_f_file_role_change_at_)
/**
* @see f_file_touch()
*/
#if !defined(_di_f_file_stat_) || !defined(_di_f_file_copy_) || !defined(_di_f_file_exists_) || !defined(_di_f_file_touch_)
- extern f_return_status private_f_file_stat(const f_string file_name, const bool dereference, struct stat *file_stat) f_gcc_attribute_visibility_internal;
+ extern f_return_status private_f_file_stat(const f_string_t file_name, const bool dereference, struct stat *file_stat) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_f_file_stat_) || !defined(_di_f_file_copy_) || !defined(_di_f_file_exists_) || !defined(_di_f_file_touch_)
/**
* @see f_file_touch_at()
*/
#if !defined(_di_f_file_stat_at_) || !defined(_di_f_file_exists_at_) || !defined(_di_f_file_touch_at_)
- extern f_return_status private_f_file_stat_at(const int at_id, const f_string file_name, const int flag, struct stat *file_stat) f_gcc_attribute_visibility_internal;
+ extern f_return_status private_f_file_stat_at(const int at_id, const f_string_t file_name, const int flag, struct stat *file_stat) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_f_file_stat_at_) || !defined(_di_f_file_exists_at_) || !defined(_di_f_file_touch_at_)
/**
* @see f_file_write_until()
*/
#if !defined(f_file_write) || !defined(f_file_write_until) || !defined(f_file_write_range)
- extern f_return_status private_f_file_write_until(const f_file file, const f_string string, const f_string_length total, f_string_length *written) f_gcc_attribute_visibility_internal;
+ extern f_return_status private_f_file_write_until(const f_file_t file, const f_string_t string, const f_string_length_t total, f_string_length_t *written) f_gcc_attribute_visibility_internal;
#endif // !defined(f_file_write) || !defined(f_file_write_until) || !defined(f_file_write_range)
#ifdef __cplusplus
/**
* FSS-specific types.
*/
-#ifndef _di_f_fss_types_
+#ifndef _di_f_fss_types_t_
#define f_fss_comment '#'
#define f_fss_space ' '
#define f_fss_space_holder '_'
#define f_fss_type_header_part5 '-'
#define f_fss_type_header_close '\n'
- typedef unsigned long f_fss_id;
-#endif // _di_f_fss_types_
+ typedef unsigned long f_fss_id_t;
+#endif // _di_f_fss_types_t_
/**
* FSS-specific delimiters.
/**
* An array of string locations representing where a delimit was applied or is to be applied with respect to some string.
*/
-#ifndef _di_f_fss_delimits_
- typedef f_string_ranges f_fss_delimits;
+#ifndef _di_f_fss_delimits_t_
+ typedef f_string_ranges_t f_fss_delimits_t;
- #define f_fss_delimits_initialize f_string_ranges_initialize
+ #define f_fss_delimits_initialize f_string_ranges_t_initialize
- #define f_macro_fss_delimits_clear(delimits) f_macro_memory_structure_clear(delimits)
+ #define f_macro_fss_delimits_clear(delimits) f_macro_memory_structure_t_clear(delimits)
- #define f_macro_fss_delimits_new(status, delimits) f_macro_string_ranges_new(status, delimits)
- #define f_macro_fss_delimits_delete(status, delimits) f_macro_string_ranges_delete(status, delimits)
- #define f_macro_fss_delimits_destroy(status, delimits) f_macro_string_ranges_destroy(status, delimits)
+ #define f_macro_fss_delimits_new(status, delimits) f_macro_string_ranges_t_new(status, delimits)
+ #define f_macro_fss_delimits_delete(status, delimits) f_macro_string_ranges_t_delete(status, delimits)
+ #define f_macro_fss_delimits_destroy(status, delimits) f_macro_string_ranges_t_destroy(status, delimits)
- #define f_macro_fss_delimits_delete_simple(delimits) f_macro_string_ranges_delete_simple(delimits)
- #define f_macro_fss_delimits_destroy_simple(delimits) f_macro_string_ranges_destroy_simple(delimits)
+ #define f_macro_fss_delimits_delete_simple(delimits) f_macro_string_ranges_t_delete_simple(delimits)
+ #define f_macro_fss_delimits_destroy_simple(delimits) f_macro_string_ranges_t_destroy_simple(delimits)
- #define f_macro_fss_delimits_resize(status, delimits, new_length) f_macro_string_ranges_resize(status, delimits, new_length)
- #define f_macro_fss_delimits_adjust(status, delimits, new_length) f_macro_string_ranges_adjust(status, delimits, new_length)
-#endif // _di_f_fss_delimits_
+ #define f_macro_fss_delimits_resize(status, delimits, new_length) f_macro_string_ranges_t_resize(status, delimits, new_length)
+ #define f_macro_fss_delimits_adjust(status, delimits, new_length) f_macro_string_ranges_t_adjust(status, delimits, new_length)
+#endif // _di_f_fss_delimits_t_
/**
* Stores information about a particular fss file, otherwise known as its header.
* type: the kind of fss file is this.
* length: Total length of the header.
*/
-#ifndef _di_f_fss_header_
+#ifndef _di_f_fss_header_t_
typedef struct {
- f_fss_id type;
+ f_fss_id_t type;
- f_string_length length;
- } f_fss_header;
+ f_string_length_t length;
+ } f_fss_header_t;
#define f_fss_header_initialize { 0, 0 }
-#endif // _di_f_fss_header_
+#endif // _di_f_fss_header_t_
/**
* This holds an array of fss_headers.
* size: Total amount of allocated space.
* used: Total number of allocated spaces used.
*/
-#ifndef _di_f_fss_headers_
+#ifndef _di_f_fss_headers_t_
typedef struct {
- f_fss_header *array;
+ f_fss_header_t *array;
- f_string_length size;
- f_string_length used;
- } f_fss_headers;
+ f_string_length_t size;
+ f_string_length_t used;
+ } f_fss_headers_t;
#define f_fss_headers_initialize { 0, 0, 0 }
- #define f_macro_fss_headers_clear(headers) f_macro_memory_structure_clear(headers)
+ #define f_macro_fss_headers_clear(headers) f_macro_memory_structure_t_clear(headers)
- #define f_macro_fss_headers_new(status, headers, length) f_macro_memory_structure_new(status, headers, f_fss_header, length)
+ #define f_macro_fss_headers_new(status, headers, length) f_macro_memory_structure_t_new(status, headers, f_fss_header_t, length)
- #define f_macro_fss_headers_delete(status, headers) f_macro_memory_structure_delete(status, headers, f_fss_header)
- #define f_macro_fss_headers_destroy(status, headers) f_macro_memory_structure_destroy(status, headers, f_fss_header)
+ #define f_macro_fss_headers_delete(status, headers) f_macro_memory_structure_t_delete(status, headers, f_fss_header_t)
+ #define f_macro_fss_headers_destroy(status, headers) f_macro_memory_structure_t_destroy(status, headers, f_fss_header_t)
- #define f_macro_fss_headers_delete_simple(headers) f_macro_memory_structure_delete_simple(headers, f_fss_header)
- #define f_macro_fss_headers_destroy_simple(headers) f_macro_memory_structure_destroy_simple(headers, f_fss_header)
+ #define f_macro_fss_headers_delete_simple(headers) f_macro_memory_structure_t_delete_simple(headers, f_fss_header_t)
+ #define f_macro_fss_headers_destroy_simple(headers) f_macro_memory_structure_t_destroy_simple(headers, f_fss_header_t)
- #define f_macro_fss_headers_resize(status, headers, new_length) f_macro_memory_structure_resize(status, headers, f_fss_header, new_length)
- #define f_macro_fss_headers_adjust(status, headers, new_length) f_macro_memory_structure_adjust(status, headers, f_fss_header, new_length)
-#endif // _di_f_fss_headers_
+ #define f_macro_fss_headers_resize(status, headers, new_length) f_macro_memory_structure_t_resize(status, headers, f_fss_header_t, new_length)
+ #define f_macro_fss_headers_adjust(status, headers, new_length) f_macro_memory_structure_t_adjust(status, headers, f_fss_header_t, new_length)
+#endif // _di_f_fss_headers_t_
/**
* This is a range that represents an object.
*/
-#ifndef _di_fss_object_
- typedef f_string_range f_fss_object;
+#ifndef _di_fss_object_t_
+ typedef f_string_range_t f_fss_object_t;
- #define f_fss_object_initialize f_string_range_initialize
+ #define f_fss_object_t_initialize f_string_range_initialize
- #define f_macro_fss_object_clear(object) f_macro_string_range_clear(object)
-#endif // _di_fss_object_
+ #define f_macro_fss_object_t_clear(object) f_macro_string_range_clear(object)
+#endif // _di_fss_object_t_
/**
* This holds an array of fss_object.
* size: Total amount of allocated space.
* used: Total number of allocated spaces used.
*/
-#ifndef _di_fss_objects_
- typedef f_string_ranges f_fss_objects;
+#ifndef _di_fss_objects_t_
+ typedef f_string_ranges_t f_fss_objects_t;
- #define f_fss_objects_initialize f_string_ranges_initialize
+ #define f_fss_objects_t_initialize f_string_ranges_t_initialize
- #define f_macro_fss_objects_clear(objects) f_macro_string_ranges_clear(objects)
+ #define f_macro_fss_objects_t_clear(objects) f_macro_string_ranges_t_clear(objects)
- #define f_macro_fss_objects_new(status, objects, length) f_macro_string_ranges_new(status, objects, length)
+ #define f_macro_fss_objects_t_new(status, objects, length) f_macro_string_ranges_t_new(status, objects, length)
- #define f_macro_fss_objects_delete(status, objects) f_macro_string_ranges_delete(status, objects)
- #define f_macro_fss_objects_destroy(status, objects) f_macro_string_ranges_destroy(status, objects)
+ #define f_macro_fss_objects_t_delete(status, objects) f_macro_string_ranges_t_delete(status, objects)
+ #define f_macro_fss_objects_t_destroy(status, objects) f_macro_string_ranges_t_destroy(status, objects)
- #define f_macro_fss_objects_delete_simple(objects) f_macro_string_ranges_delete_simple(objects)
- #define f_macro_fss_objects_destroy_simple(objects) f_macro_string_ranges_destroy_simple(objects)
+ #define f_macro_fss_objects_t_delete_simple(objects) f_macro_string_ranges_t_delete_simple(objects)
+ #define f_macro_fss_objects_t_destroy_simple(objects) f_macro_string_ranges_t_destroy_simple(objects)
- #define f_macro_fss_objects_resize(status, objects, new_length) f_macro_string_ranges_resize(status, objects, new_length)
- #define f_macro_fss_objects_adjust(status, objects, new_length) f_macro_string_ranges_destroy(status, objects, new_length)
-#endif // _di_fss_objects_
+ #define f_macro_fss_objects_t_resize(status, objects, new_length) f_macro_string_ranges_t_resize(status, objects, new_length)
+ #define f_macro_fss_objects_t_adjust(status, objects, new_length) f_macro_string_ranges_t_destroy(status, objects, new_length)
+#endif // _di_fss_objects_t_
/**
* This holds an array of string ranges that represent the content.
* used: Total number of allocated spaces used.
*/
#ifndef _di_fss_content_
- typedef f_string_ranges f_fss_content;
+ typedef f_string_ranges_t f_fss_content_t;
- #define f_fss_content_initialize f_string_ranges_initialize
+ #define f_fss_content_t_initialize f_string_ranges_t_initialize
- #define f_macro_fss_content_clear(content) f_macro_string_ranges_clear(content)
+ #define f_macro_fss_content_t_clear(content) f_macro_string_ranges_t_clear(content)
- #define f_macro_fss_content_new(status, content, length) f_macro_string_ranges_new(status, content, length)
+ #define f_macro_fss_content_t_new(status, content, length) f_macro_string_ranges_t_new(status, content, length)
- #define f_macro_fss_content_delete(status, content) f_macro_string_ranges_delete(status, content)
- #define f_macro_fss_content_destroy(status, content) f_macro_string_ranges_destroy(status, content)
+ #define f_macro_fss_content_t_delete(status, content) f_macro_string_ranges_t_delete(status, content)
+ #define f_macro_fss_content_t_destroy(status, content) f_macro_string_ranges_t_destroy(status, content)
- #define f_macro_fss_content_delete_simple(content) f_macro_string_ranges_delete_simple(content)
- #define f_macro_fss_content_destroy_simple(content) f_macro_string_ranges_destroy_simple(content)
+ #define f_macro_fss_content_t_delete_simple(content) f_macro_string_ranges_t_delete_simple(content)
+ #define f_macro_fss_content_t_destroy_simple(content) f_macro_string_ranges_t_destroy_simple(content)
- #define f_macro_fss_content_resize(status, content, new_length) f_macro_string_ranges_resize(status, content, new_length)
- #define f_macro_fss_content_adjust(status, content, new_length) f_macro_string_ranges_adjust(status, content, new_length)
+ #define f_macro_fss_content_t_resize(status, content, new_length) f_macro_string_ranges_t_resize(status, content, new_length)
+ #define f_macro_fss_content_t_adjust(status, content, new_length) f_macro_string_ranges_t_adjust(status, content, new_length)
#endif // _di_fss_content_
/**
* size: Total amount of allocated space.
* used: Total number of allocated spaces used.
*/
-#ifndef _di_f_fss_contents_
- typedef f_string_rangess f_fss_contents;
+#ifndef _di_f_fss_contents_t_
+ typedef f_string_rangess_t f_fss_contents_t;
- #define f_fss_contents_initialize f_string_rangess_initialize
+ #define f_fss_contents_t_initialize f_string_rangess_t_initialize
- #define f_macro_fss_contents_clear(contents) f_macro_string_rangess_clear(contents)
+ #define f_macro_fss_contents_t_clear(contents) f_macro_string_rangess_t_clear(contents)
- #define f_macro_fss_contents_new(status, contents, length) f_macro_string_rangess_new(status, contents, length)
+ #define f_macro_fss_contents_t_new(status, contents, length) f_macro_string_rangess_t_new(status, contents, length)
- #define f_macro_fss_contents_delete(status, contents) f_macro_string_rangess_delete(status, contents)
- #define f_macro_fss_contents_destroy(status, contents) f_macro_string_rangess_destroy(status, contents)
+ #define f_macro_fss_contents_t_delete(status, contents) f_macro_string_rangess_t_delete(status, contents)
+ #define f_macro_fss_contents_t_destroy(status, contents) f_macro_string_rangess_t_destroy(status, contents)
- #define f_macro_fss_contents_delete_simple(contents) f_macro_string_rangess_delete_simple(contents)
- #define f_macro_fss_contents_destroy_simple(contents) f_macro_string_rangess_destroy_simple(contents)
+ #define f_macro_fss_contents_t_delete_simple(contents) f_macro_string_rangess_t_delete_simple(contents)
+ #define f_macro_fss_contents_t_destroy_simple(contents) f_macro_string_rangess_t_destroy_simple(contents)
- #define f_macro_fss_contents_resize(status, contents, new_length) f_macro_string_rangess_resize(status, contents, new_length)
- #define f_macro_fss_contents_adjust(status, contents, new_length) f_macro_string_rangess_adjust(status, contents, new_length)
-#endif // _di_f_fss_contents_
+ #define f_macro_fss_contents_t_resize(status, contents, new_length) f_macro_string_rangess_t_resize(status, contents, new_length)
+ #define f_macro_fss_contents_t_adjust(status, contents, new_length) f_macro_string_rangess_t_adjust(status, contents, new_length)
+#endif // _di_f_fss_contents_t_
#ifdef __cplusplus
} // extern "C"
* contents: The array of contents.
* quotedss: The array of quoted for each content.
*/
-#ifndef _di_f_fss_named_
+#ifndef _di_f_fss_named_t_
typedef struct {
- f_fss_object name;
+ f_fss_object_t name;
- f_fss_objects objects;
- f_fss_contents contents;
- f_fss_quotedss quotedss;
- } f_fss_named;
+ f_fss_objects_t objects;
+ f_fss_contents_t contents;
+ f_fss_quotedss_t quotedss;
+ } f_fss_named_t;
- #define f_fss_named_initialize { f_fss_object_initialize, f_fss_objects_initialize, f_fss_contents_initialize, f_fss_quotedss_initialize }
+ #define f_fss_named_t_initialize { f_fss_object_t_initialize, f_fss_objects_t_initialize, f_fss_contents_t_initialize, f_fss_quotedss_t_initialize }
- #define f_macro_fss_named_clear(set) \
- f_macro_fss_object_clear(set.object) \
- f_macro_fss_objects_clear(set.objects) \
- f_macro_fss_contents_clear(set.contents) \
- f_macro_fss_quotedss_clear(set.quotedss)
+ #define f_macro_fss_named_t_clear(set) \
+ f_macro_fss_object_t_clear(set.object) \
+ f_macro_fss_objects_t_clear(set.objects) \
+ f_macro_fss_contents_t_clear(set.contents) \
+ f_macro_fss_quotedss_t_clear(set.quotedss)
- #define f_macro_fss_named_new(status, set, length) \
- f_macro_fss_objects_new(status, set.objects, length) \
+ #define f_macro_fss_named_t_new(status, set, length) \
+ f_macro_fss_objects_t_new(status, set.objects, length) \
if (F_status_is_fine(status)) { \
- f_macro_fss_contents_new(status, set.contents, length) \
+ f_macro_fss_contents_t_new(status, set.contents, length) \
} \
if (F_status_is_fine(status)) { \
- f_macro_fss_quotedss_new(status, set.quotedss, length) \
+ f_macro_fss_quotedss_t_new(status, set.quotedss, length) \
}
- #define f_macro_fss_named_delete(status, set) \
- f_macro_fss_objects_delete(status, set.objects) \
+ #define f_macro_fss_named_t_delete(status, set) \
+ f_macro_fss_objects_t_delete(status, set.objects) \
if (F_status_is_fine(status)) { \
- f_macro_fss_contents_delete(status, set.contents) \
+ f_macro_fss_contents_t_delete(status, set.contents) \
} \
if (F_status_is_fine(status)) { \
- f_macro_fss_quotedss_delete(status, set.quotedss) \
+ f_macro_fss_quotedss_t_delete(status, set.quotedss) \
}
- #define f_macro_fss_named_destroy(status, set) \
- f_macro_fss_objects_destroy(status, set.objects) \
+ #define f_macro_fss_named_t_destroy(status, set) \
+ f_macro_fss_objects_t_destroy(status, set.objects) \
if (F_status_is_fine(status)) { \
- f_macro_fss_contents_destroy(status, set.contents) \
+ f_macro_fss_contents_t_destroy(status, set.contents) \
} \
if (F_status_is_fine(status)) { \
- f_macro_fss_quotedss_destroy(status, set.quotedss) \
+ f_macro_fss_quotedss_t_destroy(status, set.quotedss) \
}
- #define f_macro_fss_named_delete_simple(set) \
- f_macro_fss_objects_delete_simple(set.objects) \
- f_macro_fss_contents_delete_simple(set.contents) \
- f_macro_fss_quotedss_delete_simple(set.quotedss)
+ #define f_macro_fss_named_t_delete_simple(set) \
+ f_macro_fss_objects_t_delete_simple(set.objects) \
+ f_macro_fss_contents_t_delete_simple(set.contents) \
+ f_macro_fss_quotedss_t_delete_simple(set.quotedss)
- #define f_macro_fss_named_destroy_simple(set) \
- f_macro_fss_objects_destroy_simple(set.objects) \
- f_macro_fss_contents_destroy_simple(set.contents) \
- f_macro_fss_quotedss_destroy_simple(set.quotedss)
+ #define f_macro_fss_named_t_destroy_simple(set) \
+ f_macro_fss_objects_t_destroy_simple(set.objects) \
+ f_macro_fss_contents_t_destroy_simple(set.contents) \
+ f_macro_fss_quotedss_t_destroy_simple(set.quotedss)
- #define f_macro_fss_named_resize(status, set, new_length) \
- f_macro_fss_objects_resize(status, set.objects, new_length) \
+ #define f_macro_fss_named_t_resize(status, set, new_length) \
+ f_macro_fss_objects_t_resize(status, set.objects, new_length) \
if (F_status_is_fine(status)) { \
- f_macro_fss_contents_resize(status, set.contents, new_length) \
+ f_macro_fss_contents_t_resize(status, set.contents, new_length) \
} \
if (F_status_is_fine(status)) { \
- f_macro_fss_quotedss_resize(status, set.quotedss, new_length) \
+ f_macro_fss_quotedss_t_resize(status, set.quotedss, new_length) \
}
- #define f_macro_fss_named_adjust(status, set, new_length) \
- f_macro_fss_objects_adjust(status, set.objects, new_length) \
+ #define f_macro_fss_named_t_adjust(status, set, new_length) \
+ f_macro_fss_objects_t_adjust(status, set.objects, new_length) \
if (F_status_is_fine(status)) { \
- f_macro_fss_contents_adjust(status, set.contents, new_length) \
+ f_macro_fss_contents_t_adjust(status, set.contents, new_length) \
} \
if (F_status_is_fine(status)) { \
- f_macro_fss_quotedss_adjust(status, set.quotedss, new_length) \
+ f_macro_fss_quotedss_t_adjust(status, set.quotedss, new_length) \
}
-#endif // _di_f_fss_named_
+#endif // _di_f_fss_named_t_
/**
- * This holds an array of f_fss_named.
+ * This holds an array of f_fss_named_t.
*
- * array: an array of f_fss_named.
+ * array: an array of f_fss_named_t.
* size: Total amount of allocated space.
* used: Total number of allocated spaces used.
*/
-#ifndef _di_fss_nameds_
+#ifndef _di_fss_nameds_t_
typedef struct {
- f_fss_named *array;
+ f_fss_named_t *array;
- f_array_length size;
- f_array_length used;
- } f_fss_nameds;
+ f_array_length_t size;
+ f_array_length_t used;
+ } f_fss_nameds_t;
- #define f_fss_nameds_initialize { 0, 0, 0 }
+ #define f_fss_nameds_t_initialize { 0, 0, 0 }
/**
* Reset a fss content sets to 0 (clear all values).
*
* This does not deallocate memory, be certain that memory is not allocated before calling this to avoid potential memory leaks.
*
- * sets: the f_fss_nameds structure to operate on.
+ * sets: the f_fss_nameds_t structure to operate on.
*/
- #define f_macro_fss_nameds_clear(sets) \
+ #define f_macro_fss_nameds_t_clear(sets) \
sets.array = 0; \
sets.size = 0; \
sets.used = 0;
* This does not deallocate memory, be certain that memory is not allocated before calling this to avoid potential memory leaks.
*
* status: the status to return.
- * sets: the f_fss_nameds structure to operate on.
+ * sets: the f_fss_nameds_t structure to operate on.
* new_length: the new size of the array.
*/
- #define f_macro_fss_nameds_new(status, sets, length) \
+ #define f_macro_fss_nameds_t_new(status, sets, length) \
sets.array = 0; \
sets.size = 0; \
sets.used = 0; \
- status = f_memory_new((void **) & sets.array, sizeof(f_fss_named), length); \
+ status = f_memory_new((void **) & sets.array, sizeof(f_fss_named_t), length); \
if (status == F_none) { \
sets.size = length; \
sets.used = 0; \
* Delete a fss content sets.
*
* status: the status to return.
- * sets: the f_fss_nameds structure to operate on.
+ * sets: the f_fss_nameds_t structure to operate on.
*/
- #define f_macro_fss_nameds_delete(status, sets) \
+ #define f_macro_fss_nameds_t_delete(status, sets) \
status = F_none; \
sets.used = sets.size; \
while (sets.used > 0) { \
sets.used--; \
- f_macro_fss_named_delete(status, sets.array[sets.used]); \
+ f_macro_fss_named_t_delete(status, sets.array[sets.used]); \
if (status != F_none) break; \
} \
- if (status == F_none) status = f_memory_delete((void **) & sets.array, sizeof(f_fss_named), sets.size); \
+ if (status == F_none) status = f_memory_delete((void **) & sets.array, sizeof(f_fss_named_t), sets.size); \
if (status == F_none) sets.size = 0;
/**
* Destroy a fss content sets.
*
* status: the status to return.
- * sets: the f_fss_nameds structure to operate on.
+ * sets: the f_fss_nameds_t structure to operate on.
*/
- #define f_macro_fss_nameds_destroy(status, sets) \
+ #define f_macro_fss_nameds_t_destroy(status, sets) \
status = F_none; \
sets.used = sets.size; \
while (sets.used > 0) { \
sets.used--; \
- f_macro_fss_named_destroy(status, sets.array[sets.used]); \
+ f_macro_fss_named_t_destroy(status, sets.array[sets.used]); \
if (status != F_none) break; \
} \
- if (status == F_none) status = f_memory_destroy((void **) & sets.array, sizeof(f_fss_named), sets.size); \
+ if (status == F_none) status = f_memory_destroy((void **) & sets.array, sizeof(f_fss_named_t), sets.size); \
if (status == F_none) sets.size = 0;
/**
* Delete a fss content sets.
*
- * sets: the f_fss_nameds structure to operate on.
+ * sets: the f_fss_nameds_t structure to operate on.
*/
- #define f_macro_fss_nameds_delete_simple(sets) \
+ #define f_macro_fss_nameds_t_delete_simple(sets) \
sets.used = sets.size; \
while (sets.used > 0) { \
sets.used--; \
- f_macro_fss_named_delete_simple(sets.array[sets.used]); \
+ f_macro_fss_named_t_delete_simple(sets.array[sets.used]); \
if (sets.used == 0) { \
- if (f_memory_delete((void **) & sets.array, sizeof(f_fss_named), sets.size)) { \
+ if (f_memory_delete((void **) & sets.array, sizeof(f_fss_named_t), sets.size)) { \
sets.size = 0; \
} \
} \
/**
* Destroy a fss content sets.
*
- * sets: the f_fss_nameds structure to operate on.
+ * sets: the f_fss_nameds_t structure to operate on.
*/
- #define f_macro_fss_nameds_destroy_simple(sets) \
+ #define f_macro_fss_nameds_t_destroy_simple(sets) \
sets.used = sets.size; \
while (sets.used > 0) { \
sets.used--; \
- f_macro_fss_named_destroy_simple(sets.array[sets.used]); \
+ f_macro_fss_named_t_destroy_simple(sets.array[sets.used]); \
if (sets.used == 0) { \
- if (f_memory_destroy((void **) & sets.array, sizeof(f_fss_named), sets.size)) { \
+ if (f_memory_destroy((void **) & sets.array, sizeof(f_fss_named_t), sets.size)) { \
sets.size = 0; \
} \
} \
* Resize a fss content sets.
*
* status: the status to return.
- * sets: the f_fss_nameds structure to operate on.
+ * sets: the f_fss_nameds_t structure to operate on.
* new_length: the new size of the array.
*/
- #define f_macro_fss_nameds_resize(status, sets, new_length) \
+ #define f_macro_fss_nameds_t_resize(status, sets, new_length) \
status = F_none; \
if (new_length < sets.size) { \
- for (f_array_length _macro__i = sets.size - new_length; _macro__i < sets.size; _macro__i++) { \
- f_macro_fss_named_delete(status, sets.array[_macro__i]); \
+ for (f_array_length_t _macro__i = sets.size - new_length; _macro__i < sets.size; _macro__i++) { \
+ f_macro_fss_named_t_delete(status, sets.array[_macro__i]); \
if (status != F_none) break; \
} \
} \
- if (status == F_none) status = f_memory_resize((void **) & sets.array, sizeof(f_fss_named), sets.size, new_length); \
+ if (status == F_none) status = f_memory_resize((void **) & sets.array, sizeof(f_fss_named_t), sets.size, new_length); \
if (status == F_none) { \
if (new_length > sets.size) { \
- for (f_array_length _macro__i = sets.size; _macro__i < new_length; _macro__i++) { \
- memset(&sets.array[_macro__i], 0, sizeof(f_fss_named)); \
+ for (f_array_length_t _macro__i = sets.size; _macro__i < new_length; _macro__i++) { \
+ memset(&sets.array[_macro__i], 0, sizeof(f_fss_named_t)); \
} \
} \
sets.size = new_length; \
* Adjust a fss content sets.
*
* status: the status to return.
- * sets: the f_fss_nameds structure to operate on.
+ * sets: the f_fss_nameds_t structure to operate on.
* new_length: he new size of the array.
*/
- #define f_macro_fss_nameds_adjust(status, sets, new_length) \
+ #define f_macro_fss_nameds_t_adjust(status, sets, new_length) \
status = F_none; \
if (new_length < sets.size) { \
- for (f_array_length _macro__i = sets.size - new_length; _macro__i < sets.size; _macro__i++) { \
- f_macro_fss_named_destroy(status, sets.array[_macro__i]); \
+ for (f_array_length_t _macro__i = sets.size - new_length; _macro__i < sets.size; _macro__i++) { \
+ f_macro_fss_named_t_destroy(status, sets.array[_macro__i]); \
if (status != F_none) break; \
} \
} \
- if (status == F_none) status = f_memory_adjust((void **) & sets.array, sizeof(f_fss_named), sets.size, new_length); \
+ if (status == F_none) status = f_memory_adjust((void **) & sets.array, sizeof(f_fss_named_t), sets.size, new_length); \
if (status == F_none) { \
if (new_length > sets.size) { \
- for (f_array_length _macro__i = sets.size; _macro__i < new_length; _macro__i++) { \
- memset(&sets.array[_macro__i], 0, sizeof(f_fss_named)); \
+ for (f_array_length_t _macro__i = sets.size; _macro__i < new_length; _macro__i++) { \
+ memset(&sets.array[_macro__i], 0, sizeof(f_fss_named_t)); \
} \
} \
sets.size = new_length; \
if (sets.used > sets.size) sets.used = new_length; \
}
-#endif // _di_fss_nameds_
+#endif // _di_fss_nameds_t_
#ifdef __cplusplus
} // extern "C"
* content: The content associated with the object.
* parent: A location referencing a parrent object or content that this object content is nested under.
*/
-#ifndef _di_fss_item_
+#ifndef _di_fss_item_t_
typedef struct {
- f_fss_object object;
- f_fss_content content;
- f_array_length parent;
- } f_fss_item;
+ f_fss_object_t object;
+ f_fss_content_t content;
+ f_array_length_t parent;
+ } f_fss_item_t;
- #define f_fss_item_initialize { f_fss_object_initialize, f_fss_content_initialize, f_array_length_initialize }
+ #define f_fss_item_t_initialize { f_fss_object_t_initialize, f_fss_content_t_initialize, f_array_length_t_initialize }
/**
* Reset a fss item stucture to 0 (clear all values).
*
* This does not deallocate memory, be certain that memory is not allocated before calling this to avoid potential memory leaks.
*
- * item: the f_fss_item structure to operate on.
+ * item: the f_fss_item_t structure to operate on.
*/
- #define f_macro_fss_item_clear(item) \
+ #define f_macro_fss_item_t_clear(item) \
item.object.start = 1; \
item.object.stop = 0; \
- f_macro_fss_content_clear(item.content); \
+ f_macro_fss_content_t_clear(item.content); \
item.parent = 0;
/**
* type: the structure type.
* length: the new size of the array.
*/
- #define f_macro_fss_item_new(status, item, length) \
+ #define f_macro_fss_item_t_new(status, item, length) \
item.object.start = 1; \
item.object.stop = 0; \
- f_macro_fss_content_new(status, item.content, length) \
+ f_macro_fss_content_t_new(status, item.content, length) \
item.parent = 0;
/**
* Delete a fss item.
*
* status: the status to return.
- * item: the f_fss_item structure to operate on.
+ * item: the f_fss_item_t structure to operate on.
*/
- #define f_macro_fss_item_delete(status, item) \
- f_macro_fss_content_delete(status, item.content) \
+ #define f_macro_fss_item_t_delete(status, item) \
+ f_macro_fss_content_t_delete(status, item.content) \
if (status == F_none) { \
item.object.start = 1; \
item.object.stop = 0; \
* Destroy a fss item.
*
* status: the status to return.
- * item: the f_fss_item structure to operate on.
+ * item: the f_fss_item_t structure to operate on.
*/
- #define f_macro_fss_item_destroy(status, item) \
- f_macro_fss_content_destroy(status, item.content) \
+ #define f_macro_fss_item_t_destroy(status, item) \
+ f_macro_fss_content_t_destroy(status, item.content) \
if (status == F_none) { \
item.object.start = 1; \
item.object.stop = 0; \
/**
* Delete a fss item.
*
- * item: the f_fss_item structure to operate on.
+ * item: the f_fss_item_t structure to operate on.
*/
- #define f_macro_fss_item_delete_simple(item) \
- f_macro_fss_content_delete_simple(item.content); \
+ #define f_macro_fss_item_t_delete_simple(item) \
+ f_macro_fss_content_t_delete_simple(item.content); \
item.object.start = 1; \
item.object.stop = 0; \
item.parent = 0;
/**
* Destroy a fss item.
*
- * item: the f_fss_item structure to operate on.
+ * item: the f_fss_item_t structure to operate on.
*/
- #define f_macro_fss_item_destroy_simple(item) \
- f_macro_fss_content_destroy_simple(item.content); \
+ #define f_macro_fss_item_t_destroy_simple(item) \
+ f_macro_fss_content_t_destroy_simple(item.content); \
item.object.start = 1; \
item.object.stop = 0; \
item.parent = 0;
* Resize a fss item.
*
* status: the status to return.
- * item: the f_fss_item structure to operate on.
+ * item: the f_fss_item_t structure to operate on.
* new_length: the new size of the array.
*/
- #define f_macro_fss_item_resize(status, item, new_length) f_macro_fss_content_resize(status, item.content, new_length);
+ #define f_macro_fss_item_t_resize(status, item, new_length) f_macro_fss_content_t_resize(status, item.content, new_length);
/**
* Adjust a fss item.
*
* status: the status to return.
- * item: the f_fss_item structure to operate on.
+ * item: the f_fss_item_t structure to operate on.
* new_length: the new size of the array.
*/
- #define f_macro_fss_item_adjust(status, item, new_length) f_macro_fss_content_adjust(status, item.content, new_length);
+ #define f_macro_fss_item_t_adjust(status, item, new_length) f_macro_fss_content_t_adjust(status, item.content, new_length);
-#endif // _di_fss_item_
+#endif // _di_fss_item_t_
/**
* This holds an array of fss_item.
*
- * This is designed to be used as a part of f_fss_nest.
+ * This is designed to be used as a part of f_fss_nest_t.
*
* For example:
* object {
* size: Total amount of allocated space.
* used: Total number of allocated spaces used.
*/
-#ifndef _di_fss_items_
+#ifndef _di_fss_items_t_
typedef struct {
- f_fss_item *array;
+ f_fss_item_t *array;
- f_array_length size;
- f_array_length used;
- } f_fss_items;
+ f_array_length_t size;
+ f_array_length_t used;
+ } f_fss_items_t;
- #define f_fss_items_initialize { 0, 0, 0 }
+ #define f_fss_items_t_initialize { 0, 0, 0 }
/**
* Reset a fss items to 0 (clear all values).
*
* This does not deallocate memory, be certain that memory is not allocated before calling this to avoid potential memory leaks.
*
- * items: the f_fss_items structure to operate on.
+ * items: the f_fss_items_t structure to operate on.
*/
- #define f_macro_fss_items_clear(items) \
+ #define f_macro_fss_items_t_clear(items) \
items.array = 0; \
items.size = 0; \
items.used = 0;
* This does not deallocate memory, be certain that memory is not allocated before calling this to avoid potential memory leaks.
*
* status: the status to return.
- * items: the f_fss_items structure to operate on.
+ * items: the f_fss_items_t structure to operate on.
* new_length: the new size of the array.
*/
- #define f_macro_fss_items_new(status, items, length) \
+ #define f_macro_fss_items_t_new(status, items, length) \
items.array = 0; \
items.size = 0; \
items.used = 0; \
- status = f_memory_new((void **) & items.array, sizeof(f_fss_item), length); \
+ status = f_memory_new((void **) & items.array, sizeof(f_fss_item_t), length); \
if (status == F_none) { \
items.size = length; \
items.used = 0; \
* Delete a fss items.
*
* status: the status to return.
- * items: the f_fss_items structure to operate on.
+ * items: the f_fss_items_t structure to operate on.
*/
- #define f_macro_fss_items_delete(status, items) \
+ #define f_macro_fss_items_t_delete(status, items) \
status = F_none; \
items.used = items.size; \
while (items.used > 0) { \
items.used--; \
- f_macro_fss_item_delete(status, items.array[items.used]); \
+ f_macro_fss_item_t_delete(status, items.array[items.used]); \
if (status != F_none) break; \
} \
- if (status == F_none) status = f_memory_delete((void **) & items.array, sizeof(f_fss_item), items.size); \
+ if (status == F_none) status = f_memory_delete((void **) & items.array, sizeof(f_fss_item_t), items.size); \
if (status == F_none) items.size = 0;
/**
* Destroy a fss items.
*
* status: the status to return.
- * items: the f_fss_items structure to operate on.
+ * items: the f_fss_items_t structure to operate on.
*/
- #define f_macro_fss_items_destroy(status, items) \
+ #define f_macro_fss_items_t_destroy(status, items) \
status = F_none; \
items.used = items.size; \
while (items.used > 0) { \
items.used--; \
- f_macro_fss_item_destroy(status, items.array[items.used]); \
+ f_macro_fss_item_t_destroy(status, items.array[items.used]); \
if (status != F_none) break; \
} \
- if (status == F_none) status = f_memory_delete((void **) & items.array, sizeof(f_fss_item), items.size); \
+ if (status == F_none) status = f_memory_delete((void **) & items.array, sizeof(f_fss_item_t), items.size); \
if (status == F_none) items.size = 0;
/**
* Delete a fss items.
*
- * items: the f_fss_items structure to operate on.
+ * items: the f_fss_items_t structure to operate on.
*/
- #define f_macro_fss_items_delete_simple(items) \
+ #define f_macro_fss_items_t_delete_simple(items) \
items.used = items.size; \
while (items.used > 0) { \
items.used--; \
- f_macro_fss_item_delete_simple(items.array[items.used]); \
+ f_macro_fss_item_t_delete_simple(items.array[items.used]); \
if (items.used == 0) { \
- if (f_memory_delete((void **) & items.array, sizeof(f_fss_item), items.size)) { \
+ if (f_memory_delete((void **) & items.array, sizeof(f_fss_item_t), items.size)) { \
items.size = 0; \
} \
} \
/**
* Destroy a fss items.
*
- * items: the f_fss_items structure to operate on.
+ * items: the f_fss_items_t structure to operate on.
*/
- #define f_macro_fss_items_destroy_simple(items) \
+ #define f_macro_fss_items_t_destroy_simple(items) \
items.used = items.size; \
while (items.used > 0) { \
items.used--; \
- f_macro_fss_item_destroy_simple(status, items.array[items.used]); \
+ f_macro_fss_item_t_destroy_simple(status, items.array[items.used]); \
if (items.used == 0) { \
- if (f_memory_destroy((void **) & items.array, sizeof(f_fss_item), items.size)) { \
+ if (f_memory_destroy((void **) & items.array, sizeof(f_fss_item_t), items.size)) { \
items.size = 0; \
} \
} \
* Resize a fss items.
*
* status: the status to return.
- * items: the f_fss_items structure to operate on.
+ * items: the f_fss_items_t structure to operate on.
* new_length: the new size of the array.
*/
- #define f_macro_fss_items_resize(status, items, new_length) \
+ #define f_macro_fss_items_t_resize(status, items, new_length) \
status = F_none; \
if (new_length < items.size) { \
- for (f_array_length _macro__i = items.size - new_length; _macro__i < items.size; _macro__i++) { \
- f_macro_fss_item_delete(status, items.array[_macro__i]); \
+ for (f_array_length_t _macro__i = items.size - new_length; _macro__i < items.size; _macro__i++) { \
+ f_macro_fss_item_t_delete(status, items.array[_macro__i]); \
if (status != F_none) break; \
} \
} \
- if (status == F_none) status = f_memory_resize((void **) & items.array, sizeof(f_fss_item), items.size, new_length); \
+ if (status == F_none) status = f_memory_resize((void **) & items.array, sizeof(f_fss_item_t), items.size, new_length); \
if (status == F_none) { \
if (new_length > items.size) { \
- for (f_array_length _macro__i = items.size; _macro__i < new_length; _macro__i++) { \
- memset(&items.array[_macro__i], 0, sizeof(f_fss_item)); \
+ for (f_array_length_t _macro__i = items.size; _macro__i < new_length; _macro__i++) { \
+ memset(&items.array[_macro__i], 0, sizeof(f_fss_item_t)); \
} \
} \
items.size = new_length; \
* Adjust a fss items.
*
* status: the status to return.
- * items: the f_fss_items structure to operate on.
+ * items: the f_fss_items_t structure to operate on.
* new_length: the new size of the array.
*/
- #define f_macro_fss_items_adjust(status, items, new_length) \
+ #define f_macro_fss_items_t_adjust(status, items, new_length) \
status = F_none; \
if (new_length < items.size) { \
for (length_variable _macro__i = items.size - new_length; _macro__i < items.size; _macro__i++) { \
- f_macro_fss_item_destroy(status, items.array[_macro__i]); \
+ f_macro_fss_item_t_destroy(status, items.array[_macro__i]); \
if (status != F_none) break; \
} \
} \
- if (status == F_none) status = f_memory_adjust((void **) & items.array, sizeof(f_fss_item), items.size, new_length); \
+ if (status == F_none) status = f_memory_adjust((void **) & items.array, sizeof(f_fss_item_t), items.size, new_length); \
if (status == F_none) { \
if (new_length > items.size) { \
for (length_variable _macro__i = items.size; _macro__i < new_length; _macro__i++) { \
- memset(&items.array[_macro__i], 0, sizeof(f_fss_item)); \
+ memset(&items.array[_macro__i], 0, sizeof(f_fss_item_t)); \
} \
} \
items.size = new_length; \
if (items.used > items.size) items.used = new_length; \
}
-#endif // _di_fss_items_
+#endif // _di_fss_items_t_
/**
- * This holds an array of f_fss_items.
+ * This holds an array of f_fss_items_t.
*
* Each array row represents the nesting depth.
* The top-level will not have any parent, so "parent" must be ignored on anything at index 0.
* The parent identifier is expected to reference a position in the nesting depth immediately above it.
* @todo: consider instead of using a "parent", have setting set to 0 to represent no data.
*
- * depth: An array of f_fss_items, with each index representing the depth.
+ * depth: An array of f_fss_items_t, with each index representing the depth.
* size: Total amount of allocated space.
* used: Total number of allocated spaces used.
*/
-#ifndef _di_fss_nest_
+#ifndef _di_fss_nest_t_
typedef struct {
- f_fss_items *depth;
+ f_fss_items_t *depth;
- f_array_length size;
- f_array_length used;
- } f_fss_nest;
+ f_array_length_t size;
+ f_array_length_t used;
+ } f_fss_nest_t;
- #define f_fss_nest_initialize { 0, 0, 0 }
+ #define f_fss_nest_t_initialize { 0, 0, 0 }
/**
* Reset a fss content nest to 0 (clear all values).
*
* This does not deallocate memory, be certain that memory is not allocated before calling this to avoid potential memory leaks.
*
- * nest: the f_fss_nest structure to operate on.
+ * nest: the f_fss_nest_t structure to operate on.
*/
- #define f_macro_fss_nest_clear(nest) \
+ #define f_macro_fss_nest_t_clear(nest) \
nest.depth = 0; \
nest.size = 0; \
nest.used = 0;
* This does not deallocate memory, be certain that memory is not allocated before calling this to avoid potential memory leaks.
*
* status: the status to return.
- * nest: the f_fss_nest structure to operate on.
+ * nest: the f_fss_nest_t structure to operate on.
* new_length: the new size of the array.
*/
- #define f_macro_fss_nest_new(status, nest, length) \
+ #define f_macro_fss_nest_t_new(status, nest, length) \
nest.depth = 0; \
nest.size = 0; \
nest.used = 0; \
- status = f_memory_new((void **) & nest.depth, sizeof(f_fss_items), length); \
+ status = f_memory_new((void **) & nest.depth, sizeof(f_fss_items_t), length); \
if (status == F_none) { \
nest.size = length; \
nest.used = 0; \
* Delete a fss content nest.
*
* status: the status to return.
- * nest: the f_fss_nest structure to operate on.
+ * nest: the f_fss_nest_t structure to operate on.
*/
- #define f_macro_fss_nest_delete(status, nest) \
+ #define f_macro_fss_nest_t_delete(status, nest) \
status = F_none; \
nest.used = nest.size; \
while (nest.used > 0) { \
nest.used--; \
- f_macro_fss_items_delete(status, nest.depth[nest.used]); \
+ f_macro_fss_items_t_delete(status, nest.depth[nest.used]); \
if (status != F_none) break; \
} \
- if (status == F_none) status = f_memory_delete((void **) & nest.depth, sizeof(f_fss_items), nest.size); \
+ if (status == F_none) status = f_memory_delete((void **) & nest.depth, sizeof(f_fss_items_t), nest.size); \
if (status == F_none) nest.size = 0;
/**
* Destroy a fss content nest.
*
* status: the status to return.
- * nest: the f_fss_nest structure to operate on.
+ * nest: the f_fss_nest_t structure to operate on.
*/
- #define f_macro_fss_nest_destroy(status, nest) \
+ #define f_macro_fss_nest_t_destroy(status, nest) \
status = F_none; \
nest.used = nest.size; \
while (nest.used > 0) { \
nest.used--; \
- f_macro_fss_items_destroy(status, nest.depth[nest.used]); \
+ f_macro_fss_items_t_destroy(status, nest.depth[nest.used]); \
if (status != F_none) break; \
} \
- if (status == F_none) status = f_memory_delete((void **) & nest.depth, sizeof(f_fss_items), nest.size); \
+ if (status == F_none) status = f_memory_delete((void **) & nest.depth, sizeof(f_fss_items_t), nest.size); \
if (status == F_none) nest.size = 0;
/**
* Delete a fss content nest.
*
- * nest: the f_fss_nest structure to operate on.
+ * nest: the f_fss_nest_t structure to operate on.
*/
- #define f_macro_fss_nest_delete_simple(nest) \
+ #define f_macro_fss_nest_t_delete_simple(nest) \
nest.used = nest.size; \
while (nest.used > 0) { \
nest.used--; \
- f_macro_fss_items_delete_simple(nest.depth[nest.used]); \
+ f_macro_fss_items_t_delete_simple(nest.depth[nest.used]); \
if (nest.used == 0) { \
- if (f_memory_delete((void **) & nest.depth, sizeof(f_fss_items), nest.size)) { \
+ if (f_memory_delete((void **) & nest.depth, sizeof(f_fss_items_t), nest.size)) { \
nest.size = 0; \
} \
} \
/**
* Destroy a fss content nest.
*
- * nest: the f_fss_nest structure to operate on.
+ * nest: the f_fss_nest_t structure to operate on.
*/
- #define f_macro_fss_nest_destroy_simple(nest) \
+ #define f_macro_fss_nest_t_destroy_simple(nest) \
nest.used = nest.size; \
while (nest.used > 0) { \
nest.used--; \
- f_macro_fss_items_destroy_simple(nest.depth[nest.used]); \
+ f_macro_fss_items_t_destroy_simple(nest.depth[nest.used]); \
if (nest.used == 0) { \
- if (f_memory_destroy((void **) & nest.depth, sizeof(f_fss_items), nest.size)) { \
+ if (f_memory_destroy((void **) & nest.depth, sizeof(f_fss_items_t), nest.size)) { \
nest.size = 0; \
} \
} \
* Resize a fss content nest.
*
* status: the status to return.
- * nest: the f_fss_nest structure to operate on.
+ * nest: the f_fss_nest_t structure to operate on.
* new_length: the new size of the array.
*/
- #define f_macro_fss_nest_resize(status, nest, new_length) \
+ #define f_macro_fss_nest_t_resize(status, nest, new_length) \
status = F_none; \
if (new_length < nest.size) { \
- for (f_array_length _macro__i = nest.size - new_length; _macro__i < nest.size; _macro__i++) { \
- f_macro_fss_items_delete(status, nest.depth[_macro__i]); \
+ for (f_array_length_t _macro__i = nest.size - new_length; _macro__i < nest.size; _macro__i++) { \
+ f_macro_fss_items_t_delete(status, nest.depth[_macro__i]); \
if (status != F_none) break; \
} \
} \
- if (status == F_none) status = f_memory_resize((void **) & nest.depth, sizeof(f_fss_items), nest.size, new_length); \
+ if (status == F_none) status = f_memory_resize((void **) & nest.depth, sizeof(f_fss_items_t), nest.size, new_length); \
if (status == F_none) { \
if (new_length > nest.size) { \
- for (f_array_length _macro__i = nest.size; _macro__i < new_length; _macro__i++) { \
- memset(&nest.depth[_macro__i], 0, sizeof(f_fss_items)); \
+ for (f_array_length_t _macro__i = nest.size; _macro__i < new_length; _macro__i++) { \
+ memset(&nest.depth[_macro__i], 0, sizeof(f_fss_items_t)); \
} \
} \
nest.size = new_length; \
* Adjust a fss content nest.
*
* status: the status to return.
- * nest: the f_fss_nest structure to operate on.
+ * nest: the f_fss_nest_t structure to operate on.
* new_length: the new size of the array.
*/
- #define f_macro_fss_nest_adjust(status, nest, new_length) \
+ #define f_macro_fss_nest_t_adjust(status, nest, new_length) \
status = F_none; \
if (new_length < nest.size) { \
- for (f_array_length _macro__i = nest.size - new_length; _macro__i < nest.size; _macro__i++) { \
- f_macro_fss_items_destroy(status, nest.depth[_macro__i]); \
+ for (f_array_length_t _macro__i = nest.size - new_length; _macro__i < nest.size; _macro__i++) { \
+ f_macro_fss_items_t_destroy(status, nest.depth[_macro__i]); \
if (status != F_none) break; \
} \
} \
- if (status == F_none) status = f_memory_adjust((void **) & nest.depth, sizeof(f_fss_item), nest.size, new_length); \
+ if (status == F_none) status = f_memory_adjust((void **) & nest.depth, sizeof(f_fss_item_t), nest.size, new_length); \
if (status == F_none) { \
if (new_length > nest.size) { \
- for (f_array_length _macro__i = nest.size; _macro__i < new_length; _macro__i++) { \
- memset(&items.depth[_macro__i], 0, sizeof(f_fss_item)); \
+ for (f_array_length_t _macro__i = nest.size; _macro__i < new_length; _macro__i++) { \
+ memset(&items.depth[_macro__i], 0, sizeof(f_fss_item_t)); \
} \
} \
nest.size = new_length; \
if (nest.used > nest.size) nest.used = new_length; \
}
-#endif // _di_fss_nest_
+#endif // _di_fss_nest_t_
/**
- * This holds an array of f_fss_nest.
+ * This holds an array of f_fss_nest_t.
*
- * array: an array of f_fss_nest.
+ * array: an array of f_fss_nest_t.
* size: Total amount of allocated space.
* used: Total number of allocated spaces used.
*/
-#ifndef _di_fss_nests_
+#ifndef _di_fss_nests_t_
typedef struct {
- f_fss_nest *array;
+ f_fss_nest_t *array;
- f_array_length size;
- f_array_length used;
- } f_fss_nests;
+ f_array_length_t size;
+ f_array_length_t used;
+ } f_fss_nests_t;
- #define f_fss_nests_initialize { 0, 0, 0 }
+ #define f_fss_nests_t_initialize { 0, 0, 0 }
/**
* Reset a fss content nests to 0 (clear all values).
*
* This does not deallocate memory, be certain that memory is not allocated before calling this to avoid potential memory leaks.
*
- * nests: the f_fss_nests structure to operate on.
+ * nests: the f_fss_nests_t structure to operate on.
*/
- #define f_macro_fss_nests_clear(nests) \
+ #define f_macro_fss_nests_t_clear(nests) \
nests.array = 0; \
nests.size = 0; \
nests.used = 0;
* This does not deallocate memory, be certain that memory is not allocated before calling this to avoid potential memory leaks.
*
* status: the status to return.
- * nests: the f_fss_nests structure to operate on.
+ * nests: the f_fss_nests_t structure to operate on.
* new_length: the new size of the array.
*/
- #define f_macro_fss_nests_new(status, nests, length) \
+ #define f_macro_fss_nests_t_new(status, nests, length) \
nests.array = 0; \
nests.size = 0; \
nests.used = 0; \
- status = f_memory_new((void **) & nests.array, sizeof(f_fss_nest), length); \
+ status = f_memory_new((void **) & nests.array, sizeof(f_fss_nest_t), length); \
if (status == F_none) { \
nests.size = length; \
nests.used = 0; \
* Delete a fss content nests.
*
* status: the status to return.
- * nests: the f_fss_nests structure to operate on.
+ * nests: the f_fss_nests_t structure to operate on.
*/
- #define f_macro_fss_nests_delete(nests) \
+ #define f_macro_fss_nests_t_delete(nests) \
status = F_none; \
nests.used = nests.size; \
while (nests.used > 0) { \
nests.used--; \
- f_macro_fss_nest_delete(status, nests.array[nests.used]); \
+ f_macro_fss_nest_t_delete(status, nests.array[nests.used]); \
if (status != F_none) break; \
} \
- if (status == F_none) status = f_memory_delete((void **) & nests.array, sizeof(f_fss_nest), nests.size); \
+ if (status == F_none) status = f_memory_delete((void **) & nests.array, sizeof(f_fss_nest_t), nests.size); \
if (status == F_none) nests.size = 0;
/**
* Destroy a fss content nests.
*
* status: the status to return.
- * nests: the f_fss_nests structure to operate on.
+ * nests: the f_fss_nests_t structure to operate on.
*/
- #define f_macro_fss_nests_destroy(nests) \
+ #define f_macro_fss_nests_t_destroy(nests) \
status = F_none; \
nests.used = nests.size; \
while (nests.used > 0) { \
nests.used--; \
- f_macro_fss_nest_destroy(status, nests.array[nests.used]); \
+ f_macro_fss_nest_t_destroy(status, nests.array[nests.used]); \
if (status != F_none) break; \
} \
- if (status == F_none) status = f_memory_destroy((void **) & nests.array, sizeof(f_fss_nest), nests.size); \
+ if (status == F_none) status = f_memory_destroy((void **) & nests.array, sizeof(f_fss_nest_t), nests.size); \
if (status == F_none) nests.size = 0;
/**
* Delete a fss content nests.
*
- * nests: the f_fss_nests structure to operate on.
+ * nests: the f_fss_nests_t structure to operate on.
*/
- #define f_macro_fss_nests_delete_simple(nests) \
+ #define f_macro_fss_nests_t_delete_simple(nests) \
nests.used = nests.size; \
while (nests.used > 0) { \
nests.used--; \
- f_macro_fss_nest_delete_simple(nests.array[nests.used]); \
+ f_macro_fss_nest_t_delete_simple(nests.array[nests.used]); \
if (nests.used == 0) { \
- if (f_memory_delete((void **) & nests.array, sizeof(f_fss_nest), nests.size)) { \
+ if (f_memory_delete((void **) & nests.array, sizeof(f_fss_nest_t), nests.size)) { \
nests.size = 0; \
} \
} \
/**
* Destroy a fss content nests.
*
- * nests: the f_fss_nests structure to operate on.
+ * nests: the f_fss_nests_t structure to operate on.
*/
- #define f_macro_fss_nests_destroy_simple(nests) \
+ #define f_macro_fss_nests_t_destroy_simple(nests) \
nests.used = nests.size; \
while (nests.used > 0) { \
nests.used--; \
- f_macro_fss_nest_destroy_simple(nests.array[nests.used]); \
+ f_macro_fss_nest_t_destroy_simple(nests.array[nests.used]); \
if (nests.used == 0) { \
- if (f_memory_destroy((void **) & nests.array, sizeof(f_fss_nest), nests.size)) { \
+ if (f_memory_destroy((void **) & nests.array, sizeof(f_fss_nest_t), nests.size)) { \
nests.size = 0; \
} \
} \
* Resize a fss content nests.
*
* status: the status to return.
- * nests: the f_fss_nests structure to operate on.
+ * nests: the f_fss_nests_t structure to operate on.
* new_length: the new size of the array.
*/
- #define f_macro_fss_nests_resize(status, nests, new_length) \
+ #define f_macro_fss_nests_t_resize(status, nests, new_length) \
status = F_none; \
if (new_length < nests.size) { \
- for (f_array_length _macro__i = nests.size - new_length; _macro__i < nests.size; _macro__i++) { \
- f_macro_fss_nest_delete(status, nests.array[_macro__i]); \
+ for (f_array_length_t _macro__i = nests.size - new_length; _macro__i < nests.size; _macro__i++) { \
+ f_macro_fss_nest_t_delete(status, nests.array[_macro__i]); \
if (status != F_none) break; \
} \
} \
- if (status == F_none) status = f_memory_resize((void **) & nests.array, sizeof(f_fss_nest), nests.size, new_length); \
+ if (status == F_none) status = f_memory_resize((void **) & nests.array, sizeof(f_fss_nest_t), nests.size, new_length); \
if (status == F_none) { \
if (new_length > nests.size) { \
- for (f_array_length _macro__i = nests.size; _macro__i < new_length; _macro__i++) { \
- memset(&nests.array[_macro__i], 0, sizeof(f_fss_nest)); \
+ for (f_array_length_t _macro__i = nests.size; _macro__i < new_length; _macro__i++) { \
+ memset(&nests.array[_macro__i], 0, sizeof(f_fss_nest_t)); \
} \
} \
nests.size = new_length; \
* Adjust a fss content nests.
*
* status: the status to return.
- * nests: the f_fss_nests structure to operate on.
+ * nests: the f_fss_nests_t structure to operate on.
* new_length: he new size of the array.
*/
- #define f_macro_fss_nests_adjust(status, nests, new_length) \
+ #define f_macro_fss_nests_t_adjust(status, nests, new_length) \
status = F_none; \
if (new_length < nests.size) { \
- for (f_array_length _macro__i = nests.size - new_length; _macro__i < nests.size; _macro__i++) { \
- f_macro_fss_nest_destroy(status, nests.array[_macro__i]); \
+ for (f_array_length_t _macro__i = nests.size - new_length; _macro__i < nests.size; _macro__i++) { \
+ f_macro_fss_nest_t_destroy(status, nests.array[_macro__i]); \
if (status != F_none) break; \
} \
} \
- if (status == F_none) status = f_memory_adjust((void **) & nests.array, sizeof(f_fss_nest), nests.size, new_length); \
+ if (status == F_none) status = f_memory_adjust((void **) & nests.array, sizeof(f_fss_nest_t), nests.size, new_length); \
if (status == F_none) { \
if (new_length > nests.size) { \
- for (f_array_length _macro__i = nests.size; _macro__i < new_length; _macro__i++) { \
- memset(&nests.array[_macro__i], 0, sizeof(f_fss_nest)); \
+ for (f_array_length_t _macro__i = nests.size; _macro__i < new_length; _macro__i++) { \
+ memset(&nests.array[_macro__i], 0, sizeof(f_fss_nest_t)); \
} \
} \
nests.size = new_length; \
if (nests.used > nests.size) nests.used = new_length; \
}
-#endif // _di_fss_nests_
+#endif // _di_fss_nests_t_
#ifdef __cplusplus
} // extern "C"
/**
* Designate an fss quoted.
*/
-#ifndef _di_f_fss_quoted_
- typedef uint8_t f_fss_quoted;
-#endif // _di_f_fss_quoted_
+#ifndef _di_f_fss_quoted_t_
+ typedef uint8_t f_fss_quoted_t;
+#endif // _di_f_fss_quoted_t_
/**
- * An array of f_fss_quoted.
+ * An array of f_fss_quoted_t.
*
* array: the array of fss quoted.
* size: total amount of allocated space.
* used: total number of allocated spaces used.
*/
-#ifndef _di_f_fss_quoteds_
- typedef f_uint8_ts f_fss_quoteds;
+#ifndef _di_f_fss_quoteds_t_
+ typedef f_uint8s_t f_fss_quoteds_t;
- #define f_fss_quoteds_initialize f_uint8_ts_initialize
+ #define f_fss_quoteds_t_initialize f_uint8s_t_initialize
- #define f_macro_fss_quoteds_clear(quoteds) f_macro_uint8_ts_clear(quoteds)
+ #define f_macro_fss_quoteds_t_clear(quoteds) f_macro_uint8s_t_clear(quoteds)
- #define f_macro_fss_quoteds_new(status, quoteds, length) f_macro_uint8_ts_new(status, quoteds, length)
+ #define f_macro_fss_quoteds_t_new(status, quoteds, length) f_macro_uint8s_t_new(status, quoteds, length)
- #define f_macro_fss_quoteds_delete(status, quoteds) f_macro_uint8_ts_delete(status, quoteds)
- #define f_macro_fss_quoteds_destroy(status, quoteds) f_macro_uint8_ts_destroy(status, quoteds)
+ #define f_macro_fss_quoteds_t_delete(status, quoteds) f_macro_uint8s_t_delete(status, quoteds)
+ #define f_macro_fss_quoteds_t_destroy(status, quoteds) f_macro_uint8s_t_destroy(status, quoteds)
- #define f_macro_fss_quoteds_delete_simple(quoteds) f_macro_uint8_ts_delete_simple(quoteds)
- #define f_macro_fss_quoteds_destroy_simple(quoteds) f_macro_uint8_ts_destroy_simple(quoteds)
+ #define f_macro_fss_quoteds_t_delete_simple(quoteds) f_macro_uint8s_t_delete_simple(quoteds)
+ #define f_macro_fss_quoteds_t_destroy_simple(quoteds) f_macro_uint8s_t_destroy_simple(quoteds)
- #define f_macro_fss_quoteds_resize(status, quoteds, new_length) f_macro_uint8_ts_resize(status, quoteds, new_length)
- #define f_macro_fss_quoteds_adjust(status, quoteds, new_length) f_macro_uint8_ts_adjust(status, quoteds, new_length)
-#endif // _di_f_fss_quoteds_
+ #define f_macro_fss_quoteds_t_resize(status, quoteds, new_length) f_macro_uint8s_t_resize(status, quoteds, new_length)
+ #define f_macro_fss_quoteds_t_adjust(status, quoteds, new_length) f_macro_uint8s_t_adjust(status, quoteds, new_length)
+#endif // _di_f_fss_quoteds_t_
/**
- * An array of f_fss_quoteds.
+ * An array of f_fss_quoteds_t.
*
* array: the array of fss quoteds.
* size: total amount of allocated space.
* used: total number of allocated spaces used.
*/
-#ifndef _di_f_fss_quotedss_
- typedef f_uint8_tss f_fss_quotedss;
+#ifndef _di_f_fss_quotedss_t_
+ typedef f_uint8ss_t f_fss_quotedss_t;
- #define f_fss_quotedss_initialize f_uint8_tss_initialize
+ #define f_fss_quotedss_t_initialize f_uint8ss_t_initialize
- #define f_macro_fss_quotedss_clear(quotedss) f_macro_uint8_tss_clear(quotedss)
+ #define f_macro_fss_quotedss_t_clear(quotedss) f_macro_uint8ss_t_clear(quotedss)
- #define f_macro_fss_quotedss_new(status, quotedss, length) f_macro_uint8_tss_new(status, quotedss, length)
+ #define f_macro_fss_quotedss_t_new(status, quotedss, length) f_macro_uint8ss_t_new(status, quotedss, length)
- #define f_macro_fss_quotedss_delete(status, quotedss) f_macro_uint8_tss_delete(status, quotedss)
- #define f_macro_fss_quotedss_destroy(status, quotedss) f_macro_uint8_tss_destroy(status, quotedss)
+ #define f_macro_fss_quotedss_t_delete(status, quotedss) f_macro_uint8ss_t_delete(status, quotedss)
+ #define f_macro_fss_quotedss_t_destroy(status, quotedss) f_macro_uint8ss_t_destroy(status, quotedss)
- #define f_macro_fss_quotedss_delete_simple(quotedss) f_macro_uint8_tss_delete_simple(quotedss)
- #define f_macro_fss_quotedss_destroy_simple(quotedss) f_macro_uint8_tss_destroy_simple(quotedss)
+ #define f_macro_fss_quotedss_t_delete_simple(quotedss) f_macro_uint8ss_t_delete_simple(quotedss)
+ #define f_macro_fss_quotedss_t_destroy_simple(quotedss) f_macro_uint8ss_t_destroy_simple(quotedss)
- #define f_macro_fss_quotedss_resize(status, quotedss, new_length) f_macro_uint8_tss_resize(status, quotedss, new_length)
- #define f_macro_fss_quotedss_adjust(status, quotedss, new_length) f_macro_uint8_tss_adjust(status, quotedss, new_length)
-#endif // _di_f_fss_quotedss_
+ #define f_macro_fss_quotedss_t_resize(status, quotedss, new_length) f_macro_uint8ss_t_resize(status, quotedss, new_length)
+ #define f_macro_fss_quotedss_t_adjust(status, quotedss, new_length) f_macro_uint8ss_t_adjust(status, quotedss, new_length)
+#endif // _di_f_fss_quotedss_t_
#ifdef __cplusplus
} // extern "C"
* objects: the array of objects.
* contents: the array of contents.
*/
-#ifndef _di_f_fss_set_
+#ifndef _di_f_fss_set_t_
typedef struct {
- f_fss_objects objects;
- f_fss_contents contents;
- } f_fss_set;
+ f_fss_objects_t objects;
+ f_fss_contents_t contents;
+ } f_fss_set_t;
- #define f_fss_set_initialize { f_fss_objects_initialize, f_fss_contents_initialize }
+ #define f_fss_set_t_initialize { f_fss_objects_t_initialize, f_fss_contents_t_initialize }
- #define f_macro_fss_set_clear(set) \
- f_macro_fss_objects_clear(set.objects) \
- f_macro_fss_contents_clear(set.contents)
+ #define f_macro_fss_set_t_clear(set) \
+ f_macro_fss_objects_t_clear(set.objects) \
+ f_macro_fss_contents_t_clear(set.contents)
- #define f_macro_fss_set_new(status, set, length) \
- f_macro_fss_objects_new(status, set.objects, length) \
+ #define f_macro_fss_set_t_new(status, set, length) \
+ f_macro_fss_objects_t_new(status, set.objects, length) \
if (F_status_is_fine(status)) { \
- f_macro_fss_contents_new(status, set.contents, length) \
+ f_macro_fss_contents_t_new(status, set.contents, length) \
}
- #define f_macro_fss_set_delete(status, set) \
- f_macro_fss_objects_delete(status, set.objects) \
+ #define f_macro_fss_set_t_delete(status, set) \
+ f_macro_fss_objects_t_delete(status, set.objects) \
if (F_status_is_fine(status)) { \
- f_macro_fss_contents_delete(status, set.contents) \
+ f_macro_fss_contents_t_delete(status, set.contents) \
}
- #define f_macro_fss_set_destroy(status, set) \
- f_macro_fss_objects_destroy(status, set.objects) \
+ #define f_macro_fss_set_t_destroy(status, set) \
+ f_macro_fss_objects_t_destroy(status, set.objects) \
if (F_status_is_fine(status)) { \
- f_macro_fss_contents_destroy(status, set.contents) \
+ f_macro_fss_contents_t_destroy(status, set.contents) \
}
- #define f_macro_fss_set_delete_simple(set) \
- f_macro_fss_objects_delete_simple(set.objects) \
- f_macro_fss_contents_delete_simple(set.contents)
+ #define f_macro_fss_set_t_delete_simple(set) \
+ f_macro_fss_objects_t_delete_simple(set.objects) \
+ f_macro_fss_contents_t_delete_simple(set.contents)
- #define f_macro_fss_set_destroy_simple(set) \
- f_macro_fss_objects_destroy_simple(set.objects) \
- f_macro_fss_contents_destroy_simple(set.contents)
+ #define f_macro_fss_set_t_destroy_simple(set) \
+ f_macro_fss_objects_t_destroy_simple(set.objects) \
+ f_macro_fss_contents_t_destroy_simple(set.contents)
- #define f_macro_fss_set_resize(status, set, new_length) \
- f_macro_fss_objects_resize(status, set.objects, new_length) \
+ #define f_macro_fss_set_t_resize(status, set, new_length) \
+ f_macro_fss_objects_t_resize(status, set.objects, new_length) \
if (F_status_is_fine(status)) { \
- f_macro_fss_contents_resize(status, set.contents, new_length) \
+ f_macro_fss_contents_t_resize(status, set.contents, new_length) \
}
- #define f_macro_fss_set_adjust(status, set, new_length) \
- f_macro_fss_objects_resize(status, set.objects, new_length) \
+ #define f_macro_fss_set_t_adjust(status, set, new_length) \
+ f_macro_fss_objects_t_resize(status, set.objects, new_length) \
if (F_status_is_fine(status)) { \
- f_macro_fss_contents_resize(status, set.contents, new_length) \
+ f_macro_fss_contents_t_resize(status, set.contents, new_length) \
}
-#endif // _di_f_fss_set_
+#endif // _di_f_fss_set_t_
/**
- * This holds an array of f_fss_set.
+ * This holds an array of f_fss_set_t.
*
- * array: an array of f_fss_set.
+ * array: an array of f_fss_set_t.
* size: total amount of allocated space.
* used: total number of allocated spaces used.
*/
-#ifndef _di_fss_sets_
+#ifndef _di_f_fss_sets_t_
typedef struct {
- f_fss_set *array;
+ f_fss_set_t *array;
- f_array_length size;
- f_array_length used;
- } f_fss_sets;
+ f_array_length_t size;
+ f_array_length_t used;
+ } f_fss_sets_t;
- #define f_fss_sets_initialize { 0, 0, 0 }
+ #define f_fss_sets_t_initialize { 0, 0, 0 }
/**
* Reset a fss content sets to 0 (clear all values).
*
* This does not deallocate memory, be certain that memory is not allocated before calling this to avoid potential memory leaks.
*
- * sets: the f_fss_sets structure to operate on.
+ * sets: the f_fss_sets_t structure to operate on.
*/
- #define f_macro_fss_sets_clear(sets) \
+ #define f_macro_fss_sets_t_clear(sets) \
sets.array = 0; \
sets.size = 0; \
sets.used = 0;
* This does not deallocate memory, be certain that memory is not allocated before calling this to avoid potential memory leaks.
*
* status: the status to return.
- * sets: the f_fss_sets structure to operate on.
+ * sets: the f_fss_sets_t structure to operate on.
* new_length: the new size of the array.
*/
- #define f_macro_fss_sets_new(status, sets, length) \
+ #define f_macro_fss_sets_t_new(status, sets, length) \
sets.array = 0; \
sets.size = 0; \
sets.used = 0; \
- status = f_memory_new((void **) & sets.array, sizeof(f_fss_set), length); \
+ status = f_memory_new((void **) & sets.array, sizeof(f_fss_set_t), length); \
if (status == F_none) { \
sets.size = length; \
sets.used = 0; \
* Delete a fss content sets.
*
* status: the status to return.
- * sets: the f_fss_sets structure to operate on.
+ * sets: the f_fss_sets_t structure to operate on.
*/
- #define f_macro_fss_sets_delete(status, sets) \
+ #define f_macro_fss_sets_t_delete(status, sets) \
status = F_none; \
sets.used = sets.size; \
while (sets.used > 0) { \
sets.used--; \
- f_macro_fss_set_delete(status, sets.array[sets.used]); \
+ f_macro_fss_set_t_delete(status, sets.array[sets.used]); \
if (status != F_none) break; \
} \
- if (status == F_none) status = f_memory_delete((void **) & sets.array, sizeof(f_fss_set), sets.size); \
+ if (status == F_none) status = f_memory_delete((void **) & sets.array, sizeof(f_fss_set_t), sets.size); \
if (status == F_none) sets.size = 0;
/**
* Destroy a fss content sets.
*
* status: the status to return.
- * sets: the f_fss_sets structure to operate on.
+ * sets: the f_fss_sets_t structure to operate on.
*/
- #define f_macro_fss_sets_destroy(status, sets) \
+ #define f_macro_fss_sets_t_destroy(status, sets) \
status = F_none; \
sets.used = sets.size; \
while (sets.used > 0) { \
sets.used--; \
- f_macro_fss_set_destroy(status, sets.array[sets.used]); \
+ f_macro_fss_set_t_destroy(status, sets.array[sets.used]); \
if (status != F_none) break; \
} \
- if (status == F_none) status = f_memory_destroy((void **) & sets.array, sizeof(f_fss_set), sets.size); \
+ if (status == F_none) status = f_memory_destroy((void **) & sets.array, sizeof(f_fss_set_t), sets.size); \
if (status == F_none) sets.size = 0;
/**
* Delete a fss content sets.
*
- * sets: the f_fss_sets structure to operate on.
+ * sets: the f_fss_sets_t structure to operate on.
*/
- #define f_macro_fss_sets_delete_simple(sets) \
+ #define f_macro_fss_sets_t_delete_simple(sets) \
sets.used = sets.size; \
while (sets.used > 0) { \
sets.used--; \
- f_macro_fss_set_delete_simple(sets.array[sets.used]); \
+ f_macro_fss_set_t_delete_simple(sets.array[sets.used]); \
if (sets.used == 0) { \
- if (f_memory_delete((void **) & sets.array, sizeof(f_fss_set), sets.size)) { \
+ if (f_memory_delete((void **) & sets.array, sizeof(f_fss_set_t), sets.size)) { \
sets.size = 0; \
} \
} \
/**
* Destroy a fss content sets.
*
- * sets: the f_fss_sets structure to operate on.
+ * sets: the f_fss_sets_t structure to operate on.
*/
- #define f_macro_fss_sets_destroy_simple(sets) \
+ #define f_macro_fss_sets_t_destroy_simple(sets) \
sets.used = sets.size; \
while (sets.used > 0) { \
sets.used--; \
- f_macro_fss_set_destroy_simple(sets.array[sets.used]); \
+ f_macro_fss_set_t_destroy_simple(sets.array[sets.used]); \
if (sets.used == 0) { \
- if (f_memory_destroy((void **) & sets.array, sizeof(f_fss_set), sets.size)) { \
+ if (f_memory_destroy((void **) & sets.array, sizeof(f_fss_set_t), sets.size)) { \
sets.size = 0; \
} \
} \
* Resize a fss content sets.
*
* status: the status to return.
- * sets: the f_fss_sets structure to operate on.
+ * sets: the f_fss_sets_t structure to operate on.
* new_length: the new size of the array.
*/
- #define f_macro_fss_sets_resize(status, sets, new_length) \
+ #define f_macro_fss_sets_t_resize(status, sets, new_length) \
status = F_none; \
if (new_length < sets.size) { \
- for (f_array_length _macro__i = sets.size - new_length; _macro__i < sets.size; _macro__i++) { \
- f_macro_fss_set_delete(status, sets.array[_macro__i]); \
+ for (f_array_length_t _macro__i = sets.size - new_length; _macro__i < sets.size; _macro__i++) { \
+ f_macro_fss_set_t_delete(status, sets.array[_macro__i]); \
if (status != F_none) break; \
} \
} \
- if (status == F_none) status = f_memory_resize((void **) & sets.array, sizeof(f_fss_set), sets.size, new_length); \
+ if (status == F_none) status = f_memory_resize((void **) & sets.array, sizeof(f_fss_set_t), sets.size, new_length); \
if (status == F_none) { \
if (new_length > sets.size) { \
- for (f_array_length _macro__i = sets.size; _macro__i < new_length; _macro__i++) { \
- memset(&sets.array[_macro__i], 0, sizeof(f_fss_set)); \
+ for (f_array_length_t _macro__i = sets.size; _macro__i < new_length; _macro__i++) { \
+ memset(&sets.array[_macro__i], 0, sizeof(f_fss_set_t)); \
} \
} \
sets.size = new_length; \
* Adjust a fss content sets.
*
* status: the status to return.
- * sets: the f_fss_sets structure to operate on.
+ * sets: the f_fss_sets_t structure to operate on.
* new_length: he new size of the array.
*/
- #define f_macro_fss_sets_adjust(status, sets, new_length) \
+ #define f_macro_fss_sets_t_adjust(status, sets, new_length) \
status = F_none; \
if (new_length < sets.size) { \
- for (f_array_length _macro__i = sets.size - new_length; _macro__i < sets.size; _macro__i++) { \
- f_macro_fss_set_destroy(status, sets.array[_macro__i]); \
+ for (f_array_length_t _macro__i = sets.size - new_length; _macro__i < sets.size; _macro__i++) { \
+ f_macro_fss_set_t_destroy(status, sets.array[_macro__i]); \
if (status != F_none) break; \
} \
} \
- if (status == F_none) status = f_memory_adjust((void **) & sets.array, sizeof(f_fss_set), sets.size, new_length); \
+ if (status == F_none) status = f_memory_adjust((void **) & sets.array, sizeof(f_fss_set_t), sets.size, new_length); \
if (status == F_none) { \
if (new_length > sets.size) { \
- for (f_array_length _macro__i = sets.size; _macro__i < new_length; _macro__i++) { \
- memset(&sets.array[_macro__i], 0, sizeof(f_fss_set)); \
+ for (f_array_length_t _macro__i = sets.size; _macro__i < new_length; _macro__i++) { \
+ memset(&sets.array[_macro__i], 0, sizeof(f_fss_set_t)); \
} \
} \
sets.size = new_length; \
if (sets.used > sets.size) sets.used = new_length; \
}
-#endif // _di_fss_sets_
+#endif // _di_f_fss_sets_t_
/**
* This holds an fss object with a set of fss content, along with their quoted types.
* objects_quoted: the array of objects quoted types.
* contents_quoted: the array of contents quoted types.
*/
-#ifndef _di_f_fss_set_quoted_
+#ifndef _di_f_fss_set_quoted_t_
typedef struct {
- f_fss_objects objects;
- f_fss_contents contents;
+ f_fss_objects_t objects;
+ f_fss_contents_t contents;
- f_fss_quoteds objects_quoted;
- f_fss_quotedss contents_quoted;
- } f_fss_set_quoted;
+ f_fss_quoteds_t objects_quoted;
+ f_fss_quotedss_t contents_quoted;
+ } f_fss_set_quoted_t;
- #define f_fss_set_quoted_initialize { f_fss_objects_initialize, f_fss_contents_initialize, f_fss_quoteds_initialize, f_fss_quotedss_initialize }
+ #define f_fss_set_quoted_t_initialize { f_fss_objects_t_initialize, f_fss_contents_t_initialize, f_fss_quoteds_t_initialize, f_fss_quotedss_t_initialize }
- #define f_macro_fss_set_quoted_clear(set) \
- f_macro_fss_objects_clear(set.objects) \
- f_macro_fss_contents_clear(set.contents) \
- f_macro_fss_quoteds_clear(set.objects_quoted) \
- f_macro_fss_quotedss_clear(set.contents_quoted)
+ #define f_macro_fss_set_quoted_t_clear(set) \
+ f_macro_fss_objects_t_clear(set.objects) \
+ f_macro_fss_contents_t_clear(set.contents) \
+ f_macro_fss_quoteds_t_clear(set.objects_quoted) \
+ f_macro_fss_quotedss_t_clear(set.contents_quoted)
- #define f_macro_fss_set_quoted_new(status, set, length) \
- f_macro_fss_objects_new(status, set.objects, length) \
+ #define f_macro_fss_set_quoted_t_new(status, set, length) \
+ f_macro_fss_objects_t_new(status, set.objects, length) \
if (F_status_is_fine(status)) { \
- f_macro_fss_contents_new(status, set.contents, length) \
+ f_macro_fss_contents_t_new(status, set.contents, length) \
} \
if (F_status_is_fine(status)) { \
- f_macro_fss_quoteds_new(status, set.objects_quoted, length) \
+ f_macro_fss_quoteds_t_new(status, set.objects_quoted, length) \
} \
if (F_status_is_fine(status)) { \
- f_macro_fss_quotedss_new(status, set.contents_quoted, length) \
+ f_macro_fss_quotedss_t_new(status, set.contents_quoted, length) \
}
- #define f_macro_fss_set_quoted_delete(status, set) \
- f_macro_fss_objects_delete(status, set.objects) \
+ #define f_macro_fss_set_quoted_t_delete(status, set) \
+ f_macro_fss_objects_t_delete(status, set.objects) \
if (F_status_is_fine(status)) { \
- f_macro_fss_contents_delete(status, set.contents) \
+ f_macro_fss_contents_t_delete(status, set.contents) \
} \
if (F_status_is_fine(status)) { \
- f_macro_fss_quoteds_delete(status, set.objects_quoted) \
+ f_macro_fss_quoteds_t_delete(status, set.objects_quoted) \
} \
if (F_status_is_fine(status)) { \
- f_macro_fss_quotedss_delete(status, set.contents_quoted) \
+ f_macro_fss_quotedss_t_delete(status, set.contents_quoted) \
}
- #define f_macro_fss_set_quoted_destroy(status, set) \
- f_macro_fss_objects_destroy(status, set.objects) \
+ #define f_macro_fss_set_quoted_t_destroy(status, set) \
+ f_macro_fss_objects_t_destroy(status, set.objects) \
if (F_status_is_fine(status)) { \
- f_macro_fss_contents_destroy(status, set.contents) \
+ f_macro_fss_contents_t_destroy(status, set.contents) \
} \
if (F_status_is_fine(status)) { \
- f_macro_fss_quoteds_destroy(status, set.objects_quoted) \
+ f_macro_fss_quoteds_t_destroy(status, set.objects_quoted) \
} \
if (F_status_is_fine(status)) { \
- f_macro_fss_quotedss_destroy(status, set.contents_quoted) \
+ f_macro_fss_quotedss_t_destroy(status, set.contents_quoted) \
}
- #define f_macro_fss_set_quoted_delete_simple(set) \
- f_macro_fss_objects_delete_simple(set.objects) \
- f_macro_fss_contents_delete_simple(set.contents) \
- f_macro_fss_quoteds_delete_simple(set.objects_quoted) \
- f_macro_fss_quotedss_delete_simple(set.contents_quoted)
+ #define f_macro_fss_set_quoted_t_delete_simple(set) \
+ f_macro_fss_objects_t_delete_simple(set.objects) \
+ f_macro_fss_contents_t_delete_simple(set.contents) \
+ f_macro_fss_quoteds_t_delete_simple(set.objects_quoted) \
+ f_macro_fss_quotedss_t_delete_simple(set.contents_quoted)
- #define f_macro_fss_set_quoted_destroy_simple(set) \
- f_macro_fss_objects_destroy_simple(set.objects) \
- f_macro_fss_contents_destroy_simple(set.contents) \
- f_macro_fss_quoteds_destroy_simple(set.objects_quoted) \
- f_macro_fss_quotedss_destroy_simple(set.contents_quoted)
+ #define f_macro_fss_set_quoted_t_destroy_simple(set) \
+ f_macro_fss_objects_t_destroy_simple(set.objects) \
+ f_macro_fss_contents_t_destroy_simple(set.contents) \
+ f_macro_fss_quoteds_t_destroy_simple(set.objects_quoted) \
+ f_macro_fss_quotedss_t_destroy_simple(set.contents_quoted)
- #define f_macro_fss_set_quoted_resize(status, set, new_length) \
- f_macro_fss_objects_resize(status, set.objects, new_length) \
+ #define f_macro_fss_set_quoted_t_resize(status, set, new_length) \
+ f_macro_fss_objects_t_resize(status, set.objects, new_length) \
if (F_status_is_fine(status)) { \
- f_macro_fss_contents_resize(status, set.contents, new_length) \
+ f_macro_fss_contents_t_resize(status, set.contents, new_length) \
} \
if (F_status_is_fine(status)) { \
- f_macro_fss_quoteds_resize(status, set.objects_quoted, new_length) \
+ f_macro_fss_quoteds_t_resize(status, set.objects_quoted, new_length) \
} \
if (F_status_is_fine(status)) { \
- f_macro_fss_quotedss_resize(status, set.contents_quoted, new_length) \
+ f_macro_fss_quotedss_t_resize(status, set.contents_quoted, new_length) \
}
- #define f_macro_fss_set_quoted_adjust(status, set, new_length) \
- f_macro_fss_objects_resize(status, set.objects, new_length) \
+ #define f_macro_fss_set_quoted_t_adjust(status, set, new_length) \
+ f_macro_fss_objects_t_resize(status, set.objects, new_length) \
if (F_status_is_fine(status)) { \
- f_macro_fss_contents_resize(status, set.contents, new_length) \
+ f_macro_fss_contents_t_resize(status, set.contents, new_length) \
} \
if (F_status_is_fine(status)) { \
- f_macro_fss_quoteds_resize(status, set.objects_quoted, new_length) \
+ f_macro_fss_quoteds_t_resize(status, set.objects_quoted, new_length) \
} \
if (F_status_is_fine(status)) { \
- f_macro_fss_quotedss_resize(status, set.contents_quoted, new_length) \
+ f_macro_fss_quotedss_t_resize(status, set.contents_quoted, new_length) \
}
-#endif // _di_f_fss_set_quoted_
+#endif // _di_f_fss_set_quoted_t_
/**
- * This holds an array of f_fss_set_quoted.
+ * This holds an array of f_fss_set_quoted_t.
*
- * array: an array of f_fss_set_quoted.
+ * array: an array of f_fss_set_quoted_t.
* size: total amount of allocated space.
* used: total number of allocated spaces used.
*/
-#ifndef _di_fss_set_quoteds_
+#ifndef _di_fss_set_quoteds_t_
typedef struct {
- f_fss_set *array;
+ f_fss_set_t *array;
- f_array_length size;
- f_array_length used;
- } f_fss_set_quoteds;
+ f_array_length_t size;
+ f_array_length_t used;
+ } f_fss_set_quoteds_t;
- #define f_fss_set_quoteds_initialize { 0, 0, 0 }
+ #define f_fss_set_quoteds_t_initialize { 0, 0, 0 }
/**
* Reset a fss content sets to 0 (clear all values).
*
* This does not deallocate memory, be certain that memory is not allocated before calling this to avoid potential memory leaks.
*
- * sets: the f_fss_set_quoteds structure to operate on.
+ * sets: the f_fss_set_quoteds_t structure to operate on.
*/
- #define f_macro_fss_set_quoteds_clear(sets) \
+ #define f_macro_fss_set_quoteds_t_clear(sets) \
sets.array = 0; \
sets.size = 0; \
sets.used = 0;
* This does not deallocate memory, be certain that memory is not allocated before calling this to avoid potential memory leaks.
*
* status: the status to return.
- * sets: the f_fss_set_quoteds structure to operate on.
+ * sets: the f_fss_set_quoteds_t structure to operate on.
* new_length: the new size of the array.
*/
- #define f_macro_fss_set_quoteds_new(status, sets, length) \
+ #define f_macro_fss_set_quoteds_t_new(status, sets, length) \
sets.array = 0; \
sets.size = 0; \
sets.used = 0; \
- status = f_memory_new((void **) & sets.array, sizeof(f_fss_set_quoted), length); \
+ status = f_memory_new((void **) & sets.array, sizeof(f_fss_set_quoted_t), length); \
if (status == F_none) { \
sets.size = length; \
sets.used = 0; \
* Delete a fss content sets.
*
* status: the status to return.
- * sets: the f_fss_set_quoteds structure to operate on.
+ * sets: the f_fss_set_quoteds_t structure to operate on.
*/
- #define f_macro_fss_set_quoteds_delete(status, sets) \
+ #define f_macro_fss_set_quoteds_t_delete(status, sets) \
status = F_none; \
sets.used = sets.size; \
while (sets.used > 0) { \
sets.used--; \
- f_macro_fss_set_quoted_delete(status, sets.array[sets.used]); \
+ f_macro_fss_set_quoted_t_delete(status, sets.array[sets.used]); \
if (status != F_none) break; \
} \
- if (status == F_none) status = f_memory_delete((void **) & sets.array, sizeof(f_fss_set_quoted), sets.size); \
+ if (status == F_none) status = f_memory_delete((void **) & sets.array, sizeof(f_fss_set_quoted_t), sets.size); \
if (status == F_none) sets.size = 0;
/**
* Destroy a fss content sets.
*
* status: the status to return.
- * sets: the f_fss_set_quoteds structure to operate on.
+ * sets: the f_fss_set_quoteds_t structure to operate on.
*/
- #define f_macro_fss_set_quoteds_destroy(status, sets) \
+ #define f_macro_fss_set_quoteds_t_destroy(status, sets) \
status = F_none; \
sets.used = sets.size; \
while (sets.used > 0) { \
sets.used--; \
- f_macro_fss_set_quoted_destroy(status, sets.array[sets.used]); \
+ f_macro_fss_set_quoted_t_destroy(status, sets.array[sets.used]); \
if (status != F_none) break; \
} \
- if (status == F_none) status = f_memory_destroy((void **) & sets.array, sizeof(f_fss_set_quoted), sets.size); \
+ if (status == F_none) status = f_memory_destroy((void **) & sets.array, sizeof(f_fss_set_quoted_t), sets.size); \
if (status == F_none) sets.size = 0;
/**
* Delete a fss content sets.
*
- * sets: the f_fss_set_quoteds structure to operate on.
+ * sets: the f_fss_set_quoteds_t structure to operate on.
*/
- #define f_macro_fss_set_quoteds_delete_simple(sets) \
+ #define f_macro_fss_set_quoteds_t_delete_simple(sets) \
sets.used = sets.size; \
while (sets.used > 0) { \
sets.used--; \
- f_macro_fss_set_quoted_delete_simple(sets.array[sets.used]); \
+ f_macro_fss_set_quoted_t_delete_simple(sets.array[sets.used]); \
if (sets.used == 0) { \
- if (f_memory_delete((void **) & sets.array, sizeof(f_fss_set_quoted), sets.size)) { \
+ if (f_memory_delete((void **) & sets.array, sizeof(f_fss_set_quoted_t), sets.size)) { \
sets.size = 0; \
} \
} \
/**
* Destroy a fss content sets.
*
- * sets: the f_fss_set_quoteds structure to operate on.
+ * sets: the f_fss_set_quoteds_t structure to operate on.
*/
- #define f_macro_fss_set_quoteds_destroy_simple(sets) \
+ #define f_macro_fss_set_quoteds_t_destroy_simple(sets) \
sets.used = sets.size; \
while (sets.used > 0) { \
sets.used--; \
- f_macro_fss_set_quoted_destroy_simple(sets.array[sets.used]); \
+ f_macro_fss_set_quoted_t_destroy_simple(sets.array[sets.used]); \
if (sets.used == 0) { \
- if (f_memory_destroy((void **) & sets.array, sizeof(f_fss_set_quoted), sets.size)) { \
+ if (f_memory_destroy((void **) & sets.array, sizeof(f_fss_set_quoted_t), sets.size)) { \
sets.size = 0; \
} \
} \
* Resize a fss content sets.
*
* status: the status to return.
- * sets: the f_fss_set_quoteds structure to operate on.
+ * sets: the f_fss_set_quoteds_t structure to operate on.
* new_length: the new size of the array.
*/
- #define f_macro_fss_set_quoteds_resize(status, sets, new_length) \
+ #define f_macro_fss_set_quoteds_t_resize(status, sets, new_length) \
status = F_none; \
if (new_length < sets.size) { \
- for (f_array_length _macro__i = sets.size - new_length; _macro__i < sets.size; _macro__i++) { \
- f_macro_fss_set_quoted_delete(status, sets.array[_macro__i]); \
+ for (f_array_length_t _macro__i = sets.size - new_length; _macro__i < sets.size; _macro__i++) { \
+ f_macro_fss_set_quoted_t_delete(status, sets.array[_macro__i]); \
if (status != F_none) break; \
} \
} \
- if (status == F_none) status = f_memory_resize((void **) & sets.array, sizeof(f_fss_set_quoted), sets.size, new_length); \
+ if (status == F_none) status = f_memory_resize((void **) & sets.array, sizeof(f_fss_set_quoted_t), sets.size, new_length); \
if (status == F_none) { \
if (new_length > sets.size) { \
- for (f_array_length _macro__i = sets.size; _macro__i < new_length; _macro__i++) { \
- memset(&sets.array[_macro__i], 0, sizeof(f_fss_set_quoted)); \
+ for (f_array_length_t _macro__i = sets.size; _macro__i < new_length; _macro__i++) { \
+ memset(&sets.array[_macro__i], 0, sizeof(f_fss_set_quoted_t)); \
} \
} \
sets.size = new_length; \
* Adjust a fss content sets.
*
* status: the status to return.
- * sets: the f_fss_set_quoteds structure to operate on.
+ * sets: the f_fss_set_quoteds_t structure to operate on.
* new_length: he new size of the array.
*/
- #define f_macro_fss_set_quoteds_adjust(status, sets, new_length) \
+ #define f_macro_fss_set_quoteds_t_adjust(status, sets, new_length) \
status = F_none; \
if (new_length < sets.size) { \
- for (f_array_length _macro__i = sets.size - new_length; _macro__i < sets.size; _macro__i++) { \
- f_macro_fss_set_quoted_destroy(status, sets.array[_macro__i]); \
+ for (f_array_length_t _macro__i = sets.size - new_length; _macro__i < sets.size; _macro__i++) { \
+ f_macro_fss_set_quoted_t_destroy(status, sets.array[_macro__i]); \
if (status != F_none) break; \
} \
} \
- if (status == F_none) status = f_memory_adjust((void **) & sets.array, sizeof(f_fss_set_quoted), sets.size, new_length); \
+ if (status == F_none) status = f_memory_adjust((void **) & sets.array, sizeof(f_fss_set_quoted_t), sets.size, new_length); \
if (status == F_none) { \
if (new_length > sets.size) { \
- for (f_array_length _macro__i = sets.size; _macro__i < new_length; _macro__i++) { \
- memset(&sets.array[_macro__i], 0, sizeof(f_fss_set_quoted)); \
+ for (f_array_length_t _macro__i = sets.size; _macro__i < new_length; _macro__i++) { \
+ memset(&sets.array[_macro__i], 0, sizeof(f_fss_set_quoted_t)); \
} \
} \
sets.size = new_length; \
if (sets.used > sets.size) sets.used = new_length; \
}
-#endif // _di_fss_set_quoteds_
+#endif // _di_fss_set_quoteds_t_
#ifdef __cplusplus
} // extern "C"
#endif
#ifndef _di_f_fss_count_lines_
- f_return_status f_fss_count_lines(const f_string_static buffer, const f_string_length before, f_string_length *line) {
+ f_return_status f_fss_count_lines(const f_string_static_t buffer, const f_string_length_t before, f_string_length_t *line) {
#ifndef _di_level_0_parameter_checking_
if (buffer.used == 0) return F_status_set_error(F_parameter);
if (before >= buffer.used) return F_status_set_error(F_parameter);
if (line == 0) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- f_string_length i = before;
+ f_string_length_t i = before;
for (; i > 0; i--) {
if (buffer.string[i] == f_string_eol[0]) {
#endif // _di_f_fss_count_lines_
#ifndef _di_f_fss_count_lines_range_
- f_return_status f_fss_count_lines_range(const f_string_static buffer, const f_string_range range, const f_string_length before, f_string_length *line) {
+ f_return_status f_fss_count_lines_range(const f_string_static_t buffer, const f_string_range_t range, const f_string_length_t before, f_string_length_t *line) {
#ifndef _di_level_0_parameter_checking_
if (buffer.used == 0) return F_status_set_error(F_parameter);
if (range.start > range.stop) return F_status_set_error(F_parameter);
if (line == 0) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- f_string_length i = before;
+ f_string_length_t i = before;
for (; i > range.start; i--) {
if (buffer.string[i] == f_string_eol[0]) {
#endif // _di_f_fss_count_lines_range_
#ifndef _di_f_fss_is_graph_
- f_return_status f_fss_is_graph(const f_string_static buffer, const f_string_range range) {
+ f_return_status f_fss_is_graph(const f_string_static_t buffer, const f_string_range_t range) {
#ifndef _di_level_0_parameter_checking_
if (buffer.used == 0) return F_status_set_error(F_parameter);
if (range.start < 0) return F_status_set_error(F_parameter);
if (range.start >= buffer.used) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- f_string_length width_max = (range.stop - range.start) + 1;
+ f_string_length_t width_max = (range.stop - range.start) + 1;
if (width_max > buffer.used - range.start) {
width_max = buffer.used - range.start;
#endif // _di_f_fss_is_graph_
#ifndef _di_f_fss_is_space_
- f_return_status f_fss_is_space(const f_string_static buffer, const f_string_range range) {
+ f_return_status f_fss_is_space(const f_string_static_t buffer, const f_string_range_t range) {
#ifndef _di_level_0_parameter_checking_
if (buffer.used == 0) return F_status_set_error(F_parameter);
if (range.start < 0) return F_status_set_error(F_parameter);
if (range.start >= buffer.used) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- f_status status = F_none;
+ f_status_t status = F_none;
- f_string_length width_max = (range.stop - range.start) + 1;
+ f_string_length_t width_max = (range.stop - range.start) + 1;
if (width_max > buffer.used - range.start) {
width_max = buffer.used - range.start;
#endif // _di_f_fss_is_space_
#ifndef _di_f_fss_is_zero_width_
- f_return_status f_fss_is_zero_width(const f_string_static buffer, const f_string_range range) {
+ f_return_status f_fss_is_zero_width(const f_string_static_t buffer, const f_string_range_t range) {
#ifndef _di_level_0_parameter_checking_
if (buffer.used == 0) return F_status_set_error(F_parameter);
if (range.start < 0) return F_status_set_error(F_parameter);
if (range.start >= buffer.used) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- f_string_length width_max = (range.stop - range.start) + 1;
+ f_string_length_t width_max = (range.stop - range.start) + 1;
if (width_max > buffer.used - range.start) {
width_max = buffer.used - range.start;
#endif // _di_f_fss_is_zero_width_
#ifndef _di_f_fss_shift_delimiters_
- f_return_status f_fss_shift_delimiters(f_string_dynamic *buffer, const f_string_range range) {
+ f_return_status f_fss_shift_delimiters(f_string_dynamic_t *buffer, const f_string_range_t range) {
#ifndef _di_level_0_parameter_checking_
if (buffer->used == 0) return F_status_set_error(F_parameter);
if (range.start < 0) return F_status_set_error(F_parameter);
if (range.start >= buffer->used) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- f_string_length position = 0;
- f_string_length distance = 0;
+ f_string_length_t position = 0;
+ f_string_length_t distance = 0;
unsigned short utf_width = 0;
unsigned short i = 0;
#endif // _di_f_fss_shift_delimiters_
#ifndef _di_f_fss_skip_past_space_
- f_return_status f_fss_skip_past_space(const f_string_static buffer, f_string_range *range) {
+ f_return_status f_fss_skip_past_space(const f_string_static_t buffer, f_string_range_t *range) {
#ifndef _di_level_0_parameter_checking_
if (buffer.used == 0) return F_status_set_error(F_parameter);
if (range == 0) return F_status_set_error(F_parameter);
if (range->start >= buffer.used) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- f_status status = F_none;
+ f_status_t status = F_none;
uint8_t width = 0;
- f_string_length width_max = (range->stop - range->start) + 1;
+ f_string_length_t width_max = (range->stop - range->start) + 1;
if (width_max > buffer.used - range->start) {
width_max = buffer.used - range->start;
#endif // _di_f_fss_skip_past_space_
#ifndef _di_f_fss_skip_past_non_graph_
- f_return_status f_fss_skip_past_non_graph(const f_string_static buffer, f_string_range *range) {
+ f_return_status f_fss_skip_past_non_graph(const f_string_static_t buffer, f_string_range_t *range) {
#ifndef _di_level_0_parameter_checking_
if (buffer.used == 0) return F_status_set_error(F_parameter);
if (range == 0) return F_status_set_error(F_parameter);
if (range->start >= buffer.used) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- f_status status = F_none;
+ f_status_t status = F_none;
unsigned short width = 0;
- f_string_length width_max = (range->stop - range->start) + 1;
+ f_string_length_t width_max = (range->stop - range->start) + 1;
if (width_max > buffer.used - range->start) {
width_max = buffer.used - range->start;
status = f_utf_is_zero_width(buffer.string + range->start, width_max);
if (status == F_true) {
- f_string_length next_width_max = 0;
+ f_string_length_t next_width_max = 0;
- for (f_string_length next = range->start + 1; next < buffer.used && next <= range->stop; next += f_macro_utf_byte_width_is(buffer.string[next])) {
+ for (f_string_length_t next = range->start + 1; next < buffer.used && next <= range->stop; next += f_macro_utf_byte_width_is(buffer.string[next])) {
next_width_max = (range->stop - next) + 1;
status = f_utf_is_graph(buffer.string + next, width_max);
* F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_f_fss_count_lines_
- extern f_return_status f_fss_count_lines(const f_string_static buffer, const f_string_length before, f_string_length *line);
+ extern f_return_status f_fss_count_lines(const f_string_static_t buffer, const f_string_length_t before, f_string_length_t *line);
#endif // _di_f_fss_count_lines_
/**
* F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_f_fss_count_lines_range_
- extern f_return_status f_fss_count_lines_range(const f_string_static buffer, const f_string_range range, const f_string_length before, f_string_length *line);
+ extern f_return_status f_fss_count_lines_range(const f_string_static_t buffer, const f_string_range_t range, const f_string_length_t before, f_string_length_t *line);
#endif // _di_f_fss_count_lines_range_
/**
* @see f_utf_is_graph()
*/
#ifndef _di_f_fss_is_graph_
- extern f_return_status f_fss_is_graph(const f_string_static buffer, const f_string_range range);
+ extern f_return_status f_fss_is_graph(const f_string_static_t buffer, const f_string_range_t range);
#endif // _di_f_fss_is_graph_
/**
* @see f_utf_is_whitespace()
*/
#ifndef _di_f_fss_is_space_
- extern f_return_status f_fss_is_space(const f_string_static buffer, const f_string_range range);
+ extern f_return_status f_fss_is_space(const f_string_static_t buffer, const f_string_range_t range);
#endif // _di_f_fss_is_space_
/**
* @see f_utf_is_zero_width()
*/
#ifndef _di_f_fss_is_zero_width_
- extern f_return_status f_fss_is_zero_width(const f_string_static buffer, const f_string_range range);
+ extern f_return_status f_fss_is_zero_width(const f_string_static_t buffer, const f_string_range_t range);
#endif // _di_f_fss_is_zero_width_
/**
* F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_f_fss_shift_delimiters_
- extern f_return_status f_fss_shift_delimiters(f_string_dynamic *buffer, const f_string_range range);
+ extern f_return_status f_fss_shift_delimiters(f_string_dynamic_t *buffer, const f_string_range_t range);
#endif // _di_f_fss_shift_delimiters_
/**
* @see f_utf_is_zero_width()
*/
#ifndef _di_f_fss_skip_past_space_
- extern f_return_status f_fss_skip_past_space(const f_string_static buffer, f_string_range *range);
+ extern f_return_status f_fss_skip_past_space(const f_string_static_t buffer, f_string_range_t *range);
#endif // _di_f_fss_skip_past_space_
/**
* @see f_utf_is_zero_width()
*/
#ifndef _di_f_fss_skip_past_non_graph_
- extern f_return_status f_fss_skip_past_non_graph(const f_string_static buffer, f_string_range *range);
+ extern f_return_status f_fss_skip_past_non_graph(const f_string_static_t buffer, f_string_range_t *range);
#endif // _di_f_fss_skip_past_non_graph_
#ifdef __cplusplus
* size: Total amount of allocated space.
* used: Total number of allocated spaces used.
*/
-#ifndef _di_iki_variable_
- typedef f_string_ranges f_iki_variable;
+#ifndef _di_iki_variable_t_
+ typedef f_string_ranges_t f_iki_variable_t;
- #define f_iki_variable_initialize f_string_ranges_initialize
+ #define f_iki_variable_t_initialize f_string_ranges_t_initialize
- #define f_macro_iki_variable_clear(variable) f_macro_string_ranges_clear(variable)
+ #define f_macro_iki_variable_t_clear(variable) f_macro_string_ranges_t_clear(variable)
- #define f_macro_iki_variable_new(status, variable, length) f_macro_string_ranges_new(status, variable, length)
+ #define f_macro_iki_variable_t_new(status, variable, length) f_macro_string_ranges_t_new(status, variable, length)
- #define f_macro_iki_variable_delete(status, variable) f_macro_string_ranges_delete(status, variable)
- #define f_macro_iki_variable_destroy(status, variable) f_macro_string_ranges_destroy(status, variable)
+ #define f_macro_iki_variable_t_delete(status, variable) f_macro_string_ranges_t_delete(status, variable)
+ #define f_macro_iki_variable_t_destroy(status, variable) f_macro_string_ranges_t_destroy(status, variable)
- #define f_macro_iki_variable_delete_simple(variable) f_macro_string_ranges_delete_simple(variable)
- #define f_macro_iki_variable_destroy_simple(variable) f_macro_string_ranges_destroy_simple(variable)
+ #define f_macro_iki_variable_t_delete_simple(variable) f_macro_string_ranges_t_delete_simple(variable)
+ #define f_macro_iki_variable_t_destroy_simple(variable) f_macro_string_ranges_t_destroy_simple(variable)
- #define f_macro_iki_variable_resize(status, variable, new_length) f_macro_string_ranges_resize(status, variable, new_length)
- #define f_macro_iki_variable_adjust(status, variable, new_length) f_macro_string_ranges_destroy(status, variable, new_length)
-#endif // _di_iki_variable_
+ #define f_macro_iki_variable_t_resize(status, variable, new_length) f_macro_string_ranges_t_resize(status, variable, new_length)
+ #define f_macro_iki_variable_t_adjust(status, variable, new_length) f_macro_string_ranges_t_destroy(status, variable, new_length)
+#endif // _di_iki_variable_t_
/**
* This holds an array of string ranges that represent the vocabulary names.
* size: Total amount of allocated space.
* used: Total number of allocated spaces used.
*/
-#ifndef _di_iki_vocabulary_
- typedef f_string_ranges f_iki_vocabulary;
+#ifndef _di_iki_vocabulary_t_
+ typedef f_string_ranges_t f_iki_vocabulary_t;
- #define f_iki_vocabulary_initialize f_string_ranges_initialize
+ #define f_iki_vocabulary_t_initialize f_string_ranges_t_initialize
- #define f_macro_iki_vocabulary_clear(vocabulary) f_macro_string_ranges_clear(vocabulary)
+ #define f_macro_iki_vocabulary_t_clear(vocabulary) f_macro_string_ranges_t_clear(vocabulary)
- #define f_macro_iki_vocabulary_new(status, vocabulary, length) f_macro_string_ranges_new(status, vocabulary, length)
+ #define f_macro_iki_vocabulary_t_new(status, vocabulary, length) f_macro_string_ranges_t_new(status, vocabulary, length)
- #define f_macro_iki_vocabulary_delete(status, vocabulary) f_macro_string_ranges_delete(status, vocabulary)
- #define f_macro_iki_vocabulary_destroy(status, vocabulary) f_macro_string_ranges_destroy(status, vocabulary)
+ #define f_macro_iki_vocabulary_t_delete(status, vocabulary) f_macro_string_ranges_t_delete(status, vocabulary)
+ #define f_macro_iki_vocabulary_t_destroy(status, vocabulary) f_macro_string_ranges_t_destroy(status, vocabulary)
- #define f_macro_iki_vocabulary_delete_simple(vocabulary) f_macro_string_ranges_delete_simple(vocabulary)
- #define f_macro_iki_vocabulary_destroy_simple(vocabulary) f_macro_string_ranges_destroy_simple(vocabulary)
+ #define f_macro_iki_vocabulary_t_delete_simple(vocabulary) f_macro_string_ranges_t_delete_simple(vocabulary)
+ #define f_macro_iki_vocabulary_t_destroy_simple(vocabulary) f_macro_string_ranges_t_destroy_simple(vocabulary)
- #define f_macro_iki_vocabulary_resize(status, vocabulary, new_length) f_macro_string_ranges_resize(status, vocabulary, new_length)
- #define f_macro_iki_vocabulary_adjust(status, vocabulary, new_length) f_macro_string_ranges_destroy(status, vocabulary, new_length)
-#endif // _di_iki_vocabulary_
+ #define f_macro_iki_vocabulary_t_resize(status, vocabulary, new_length) f_macro_string_ranges_t_resize(status, vocabulary, new_length)
+ #define f_macro_iki_vocabulary_t_adjust(status, vocabulary, new_length) f_macro_string_ranges_t_destroy(status, vocabulary, new_length)
+#endif // _di_iki_vocabulary_t_
/**
- * This holds an array of f_iki_vocabulary.
+ * This holds an array of f_iki_vocabulary_t.
*
* array: The array of content.
* size: Total amount of allocated space.
* used: Total number of allocated spaces used.
*/
-#ifndef _di_iki_vocabularys_
- typedef f_string_rangess f_iki_vocabularys;
+#ifndef _di_iki_vocabularys_t_
+ typedef f_string_rangess_t f_iki_vocabularys_t;
- #define f_iki_vocabularys_initialize f_string_rangess_initialize
+ #define f_iki_vocabularys_t_initialize f_string_rangess_t_initialize
- #define f_macro_iki_vocabularys_clear(content) f_macro_string_rangess_clear(content)
+ #define f_macro_iki_vocabularys_t_clear(content) f_macro_string_rangess_t_clear(content)
- #define f_macro_iki_vocabularys_new(status, content, length) f_macro_string_rangess_new(status, content, length)
+ #define f_macro_iki_vocabularys_t_new(status, content, length) f_macro_string_rangess_t_new(status, content, length)
- #define f_macro_iki_vocabularys_delete(status, content) f_macro_string_rangess_delete(status, content)
- #define f_macro_iki_vocabularys_destroy(status, content) f_macro_string_rangess_destroy(status, content)
+ #define f_macro_iki_vocabularys_t_delete(status, content) f_macro_string_rangess_t_delete(status, content)
+ #define f_macro_iki_vocabularys_t_destroy(status, content) f_macro_string_rangess_t_destroy(status, content)
- #define f_macro_iki_vocabularys_delete_simple(content) f_macro_string_rangess_delete_simple(content)
- #define f_macro_iki_vocabularys_destroy_simple(content) f_macro_string_rangess_destroy_simple(content)
+ #define f_macro_iki_vocabularys_t_delete_simple(content) f_macro_string_rangess_t_delete_simple(content)
+ #define f_macro_iki_vocabularys_t_destroy_simple(content) f_macro_string_rangess_t_destroy_simple(content)
- #define f_macro_iki_vocabularys_resize(status, content, new_length) f_macro_string_rangess_resize(status, content, new_length)
- #define f_macro_iki_vocabularys_adjust(status, content, new_length) f_macro_string_rangess_adjust(status, content, new_length)
-#endif // _di_iki_vocabularys_
+ #define f_macro_iki_vocabularys_t_resize(status, content, new_length) f_macro_string_rangess_t_resize(status, content, new_length)
+ #define f_macro_iki_vocabularys_t_adjust(status, content, new_length) f_macro_string_rangess_t_adjust(status, content, new_length)
+#endif // _di_iki_vocabularys_t_
/**
* This holds an array of string ranges that represent the content.
* size: Total amount of allocated space.
* used: Total number of allocated spaces used.
*/
-#ifndef _di_iki_content_
- typedef f_string_ranges f_iki_content;
+#ifndef _di_iki_content_t_
+ typedef f_string_ranges_t f_iki_content_t;
- #define f_iki_content_initialize f_string_ranges_initialize
+ #define f_iki_content_t_initialize f_string_ranges_t_initialize
- #define f_macro_iki_content_clear(content) f_macro_string_ranges_clear(content)
+ #define f_macro_iki_content_t_clear(content) f_macro_string_ranges_t_clear(content)
- #define f_macro_iki_content_new(status, content, length) f_macro_string_ranges_new(status, content, length)
+ #define f_macro_iki_content_t_new(status, content, length) f_macro_string_ranges_t_new(status, content, length)
- #define f_macro_iki_content_delete(status, content) f_macro_string_ranges_delete(status, content)
- #define f_macro_iki_content_destroy(status, content) f_macro_string_ranges_destroy(status, content)
+ #define f_macro_iki_content_t_delete(status, content) f_macro_string_ranges_t_delete(status, content)
+ #define f_macro_iki_content_t_destroy(status, content) f_macro_string_ranges_t_destroy(status, content)
- #define f_macro_iki_content_delete_simple(content) f_macro_string_ranges_delete_simple(content)
- #define f_macro_iki_content_destroy_simple(content) f_macro_string_ranges_destroy_simple(content)
+ #define f_macro_iki_content_t_delete_simple(content) f_macro_string_ranges_t_delete_simple(content)
+ #define f_macro_iki_content_t_destroy_simple(content) f_macro_string_ranges_t_destroy_simple(content)
- #define f_macro_iki_content_resize(status, content, new_length) f_macro_string_ranges_resize(status, content, new_length)
- #define f_macro_iki_content_adjust(status, content, new_length) f_macro_string_ranges_adjust(status, content, new_length)
-#endif // _di_iki_content_
+ #define f_macro_iki_content_t_resize(status, content, new_length) f_macro_string_ranges_t_resize(status, content, new_length)
+ #define f_macro_iki_content_t_adjust(status, content, new_length) f_macro_string_ranges_t_adjust(status, content, new_length)
+#endif // _di_iki_content_t_
/**
- * This holds an array of f_iki_content.
+ * This holds an array of f_iki_content_t.
*
* array: The array of content.
* size: Total amount of allocated space.
* used: Total number of allocated spaces used.
*/
-#ifndef _di_iki_contents_
- typedef f_string_rangess f_iki_contents;
+#ifndef _di_iki_contents_t_
+ typedef f_string_rangess_t f_iki_contents_t;
- #define f_iki_contents_initialize f_string_rangess_initialize
+ #define f_iki_contents_t_initialize f_string_rangess_t_initialize
- #define f_macro_iki_contents_clear(content) f_macro_string_rangess_clear(content)
+ #define f_macro_iki_contents_t_clear(content) f_macro_string_rangess_t_clear(content)
- #define f_macro_iki_contents_new(status, content, length) f_macro_string_rangess_new(status, content, length)
+ #define f_macro_iki_contents_t_new(status, content, length) f_macro_string_rangess_t_new(status, content, length)
- #define f_macro_iki_contents_delete(status, content) f_macro_string_rangess_delete(status, content)
- #define f_macro_iki_contents_destroy(status, content) f_macro_string_rangess_destroy(status, content)
+ #define f_macro_iki_contents_t_delete(status, content) f_macro_string_rangess_t_delete(status, content)
+ #define f_macro_iki_contents_t_destroy(status, content) f_macro_string_rangess_t_destroy(status, content)
- #define f_macro_iki_contents_delete_simple(content) f_macro_string_rangess_delete_simple(content)
- #define f_macro_iki_contents_destroy_simple(content) f_macro_string_rangess_destroy_simple(content)
+ #define f_macro_iki_contents_t_delete_simple(content) f_macro_string_rangess_t_delete_simple(content)
+ #define f_macro_iki_contents_t_destroy_simple(content) f_macro_string_rangess_t_destroy_simple(content)
- #define f_macro_iki_contents_resize(status, content, new_length) f_macro_string_rangess_resize(status, content, new_length)
- #define f_macro_iki_contents_adjust(status, content, new_length) f_macro_string_rangess_adjust(status, content, new_length)
-#endif // _di_iki_contents_
+ #define f_macro_iki_contents_t_resize(status, content, new_length) f_macro_string_rangess_t_resize(status, content, new_length)
+ #define f_macro_iki_contents_t_adjust(status, content, new_length) f_macro_string_rangess_t_adjust(status, content, new_length)
+#endif // _di_iki_contents_t_
/**
* Provide a default allocation step.
#define f_macro_iki_allocate_delimits_if_necessary(status, delimits) \
status = F_none; \
if (delimits.used == delimits.size) { \
- if (delimits.used + f_iki_default_allocation_step > f_string_length_size) { \
- if (delimits.used == f_string_length_size) { \
+ if (delimits.used + f_iki_default_allocation_step > f_string_length_t_size) { \
+ if (delimits.used == f_string_length_t_size) { \
status = F_status_set_error(F_string_too_large); \
} \
else { \
- f_macro_string_lengths_resize(status, delimits, delimits.size + 1); \
+ f_macro_string_lengths_t_resize(status, delimits, delimits.size + 1); \
} \
} \
else { \
- f_macro_string_lengths_resize(status, delimits, delimits.size + f_iki_default_allocation_step); \
+ f_macro_string_lengths_t_resize(status, delimits, delimits.size + f_iki_default_allocation_step); \
} \
}
#endif // _di_f_macro_iki_allocate_delimits_if_necessary_
#define f_macro_iki_allocate_ranges_if_necessary(status, ranges) \
status = F_none; \
if (ranges.used == ranges.size) { \
- if (ranges.used + f_iki_default_allocation_step > f_string_length_size) { \
- if (ranges.used == f_string_length_size) { \
+ if (ranges.used + f_iki_default_allocation_step > f_string_length_t_size) { \
+ if (ranges.used == f_string_length_t_size) { \
status = F_status_set_error(F_string_too_large); \
} \
else { \
- f_macro_string_ranges_resize(status, ranges, ranges.size + 1); \
+ f_macro_string_ranges_t_resize(status, ranges, ranges.size + 1); \
} \
} \
else { \
- f_macro_string_ranges_resize(status, ranges, ranges.size + f_iki_default_allocation_step); \
+ f_macro_string_ranges_t_resize(status, ranges, ranges.size + f_iki_default_allocation_step); \
} \
}
#endif // _di_f_macro_iki_allocate_ranges_if_necessary_
#endif
#ifndef _di_f_iki_read_
- f_return_status f_iki_read(f_string_static *buffer, f_string_range *range, f_iki_variable *variable, f_iki_vocabulary *vocabulary, f_iki_content *content) {
+ f_return_status f_iki_read(f_string_static_t *buffer, f_string_range_t *range, f_iki_variable_t *variable, f_iki_vocabulary_t *vocabulary, f_iki_content_t *content) {
#ifndef _di_level_0_parameter_checking_
if (buffer == 0) return F_status_set_error(F_parameter);
if (buffer->used == 0) return F_status_set_error(F_parameter);
if (range->start >= buffer->used) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- f_status status = F_none;
+ f_status_t status = F_none;
- f_string_length width_max = 0;
+ f_string_length_t width_max = 0;
if (width_max > buffer->used - range->start) {
width_max = buffer->used - range->start;
return F_data_not_eos;
}
- f_string_range found_vocabulary = f_string_range_initialize;
- f_string_length found_content = 0;
+ f_string_range_t found_vocabulary = f_string_range_initialize;
+ f_string_length_t found_content = 0;
found_vocabulary.start = range->start;
- f_string_length vocabulary_slash_first = range->start;
+ f_string_length_t vocabulary_slash_first = range->start;
uint8_t quote = 0;
bool find_next = F_false;
// delimits must only be applied once a valid object is found.
- f_string_lengths delimits = f_string_lengths_initialize;
+ f_string_lengths_t delimits = f_string_lengths_t_initialize;
do {
// find the start and end of the vocabulary name.
if (range->start == found_vocabulary.start) {
status = f_utf_buffer_increment(*buffer, range, 1);
if (F_status_is_error(status)) {
- f_macro_string_lengths_delete(status, delimits);
+ f_macro_string_lengths_t_delete(status, delimits);
return status;
}
} while (F_status_is_fine(status) && buffer->string[range->start] == f_iki_syntax_placeholder);
if (F_status_is_error(status)) {
- f_macro_string_lengths_delete(status, delimits);
+ f_macro_string_lengths_t_delete(status, delimits);
return status;
}
// this is not a valid vocabulary name so seek until a non-word, non-dash, or non-plus character.
f_macro_iki_seek_word_dash_plus(status, buffer, range, width_max, F_false);
if (F_status_is_error(status)) {
- f_macro_string_lengths_delete(status, delimits);
+ f_macro_string_lengths_t_delete(status, delimits);
return status;
}
status = f_utf_buffer_increment(*buffer, range, 1);
if (F_status_is_error(status)) {
- f_macro_string_lengths_delete(status, delimits);
+ f_macro_string_lengths_t_delete(status, delimits);
return status;
}
} // while
status = f_utf_is_word_dash_plus(buffer->string + range->start, width_max, F_false);
if (F_status_is_error(status)) {
- f_macro_string_lengths_delete(status, delimits);
+ f_macro_string_lengths_t_delete(status, delimits);
return status;
}
f_macro_iki_seek_word_dash_plus(status, buffer, range, width_max, F_true);
if (F_status_is_error(status)) {
- f_macro_string_lengths_delete(status, delimits);
+ f_macro_string_lengths_t_delete(status, delimits);
return status;
}
else if (range->start > range->stop) {
- f_macro_string_lengths_delete(status, delimits);
+ f_macro_string_lengths_t_delete(status, delimits);
return F_data_not_stop;
}
else if (range->start >= buffer->used) {
- f_macro_string_lengths_delete(status, delimits);
+ f_macro_string_lengths_t_delete(status, delimits);
return F_data_not_eos;
}
status = f_utf_buffer_increment(*buffer, range, 1);
if (F_status_is_error(status)) {
- f_macro_string_lengths_delete(status, delimits);
+ f_macro_string_lengths_t_delete(status, delimits);
return status;
}
} // while
if (vocabulary_delimited) {
f_macro_iki_allocate_delimits_if_necessary(status, delimits);
if (F_status_is_error(status)) {
- f_macro_string_lengths_delete(status, delimits);
+ f_macro_string_lengths_t_delete(status, delimits);
return status;
}
}
if (F_status_is_error(status)) {
- f_macro_string_lengths_delete(status, delimits);
+ f_macro_string_lengths_t_delete(status, delimits);
return status;
}
content->array[content->used].stop = range->start - 1;
content->used++;
- for (f_array_length i = 0; i < delimits.used; i++) {
+ for (f_array_length_t i = 0; i < delimits.used; i++) {
buffer->string[delimits.array[i]] = f_iki_syntax_placeholder;
} // for
- f_macro_string_lengths_delete(status, delimits);
+ f_macro_string_lengths_t_delete(status, delimits);
if (F_status_is_error(status)) return status;
range->start++;
}
}
else if (buffer->string[range->start] == f_iki_syntax_slash) {
- f_string_length content_slash_first = range->start;
- f_array_length content_slash_total = 0;
+ f_string_length_t content_slash_first = range->start;
+ f_array_length_t content_slash_total = 0;
while (range->start <= range->stop && range->start < buffer->used) {
if (buffer->string[range->start] == f_iki_syntax_placeholder) {
}
if (buffer->string[range->start] == quote) {
- f_array_length content_slash_delimits = content_slash_total / 2;
- f_string_range content_range = f_string_range_initialize;
- f_array_length i = 0;
+ f_array_length_t content_slash_delimits = content_slash_total / 2;
+ f_string_range_t content_range = f_string_range_initialize;
+ f_array_length_t i = 0;
if (content_slash_total % 2) {
content_slash_delimits++;
}
if (delimits.used + content_slash_delimits > delimits.size) {
- if (delimits.used + content_slash_delimits > f_string_length_size) {
+ if (delimits.used + content_slash_delimits > f_string_length_t_size) {
status = F_status_set_error(F_string_too_large);
}
else {
- f_macro_string_lengths_resize(status, delimits, delimits.used + content_slash_delimits);
+ f_macro_string_lengths_t_resize(status, delimits, delimits.used + content_slash_delimits);
}
if (F_status_is_error(status)) {
- f_macro_string_lengths_delete(status, delimits);
+ f_macro_string_lengths_t_delete(status, delimits);
return status;
}
}
status = f_utf_buffer_increment(*buffer, (&content_range), 1);
if (F_status_is_error(status)) {
- f_macro_string_lengths_delete(status, delimits);
+ f_macro_string_lengths_t_delete(status, delimits);
return status;
}
} // while
if (vocabulary_delimited) {
f_macro_iki_allocate_delimits_if_necessary(status, delimits);
if (F_status_is_error(status)) {
- f_macro_string_lengths_delete(status, delimits);
+ f_macro_string_lengths_t_delete(status, delimits);
return status;
}
}
if (F_status_is_error(status)) {
- f_macro_string_lengths_delete(status, delimits);
+ f_macro_string_lengths_t_delete(status, delimits);
return status;
}
content->array[content->used].stop = range->start - 1;
content->used++;
- for (f_array_length i = 0; i < delimits.used; i++) {
+ for (f_array_length_t i = 0; i < delimits.used; i++) {
buffer->string[delimits.array[i]] = f_iki_syntax_placeholder;
} // for
- f_macro_string_lengths_delete(status, delimits);
+ f_macro_string_lengths_t_delete(status, delimits);
if (F_status_is_error(status)) return status;
range->start++;
status = f_utf_buffer_increment(*buffer, range, 1);
if (F_status_is_error(status)) {
- f_macro_string_lengths_delete(status, delimits);
+ f_macro_string_lengths_t_delete(status, delimits);
return status;
}
} // while
status = f_utf_buffer_increment(*buffer, range, 1);
if (F_status_is_error(status)) {
- f_macro_string_lengths_delete(status, delimits);
+ f_macro_string_lengths_t_delete(status, delimits);
return status;
}
} // while
}
} while (range->start <= range->stop && range->start < buffer->used);
- for (f_array_length i = 0; i < delimits.used; i++) {
+ for (f_array_length_t i = 0; i < delimits.used; i++) {
buffer->string[delimits.array[i]] = f_iki_syntax_placeholder;
} // for
- f_macro_string_lengths_delete(status, delimits);
+ f_macro_string_lengths_t_delete(status, delimits);
if (F_status_is_error(status)) return status;
if (range->start > range->stop) {
* F_string_too_large (with error bit) if a string length is too large to store in the buffer.
*/
#ifndef _di_f_iki_read_
- extern f_return_status f_iki_read(f_string_static *buffer, f_string_range *range, f_iki_variable *variable, f_iki_vocabulary *vocabulary, f_iki_content *content);
+ extern f_return_status f_iki_read(f_string_static_t *buffer, f_string_range_t *range, f_iki_variable_t *variable, f_iki_vocabulary_t *vocabulary, f_iki_content_t *content);
#endif // _di_f_iki_read_
#ifdef __cplusplus
* structure: the structure to operate on.
*/
#ifndef _di_f_macro_memory_structure_clear_
- #define f_macro_memory_structure_clear(structure) \
+ #define f_macro_memory_structure_t_clear(structure) \
structure.array = 0; \
structure.size = 0; \
structure.used = 0;
* length: the new size of the array.
*/
#ifndef _di_f_macro_memory_structure_new_
- #define f_macro_memory_structure_new(status, structure, type, length) \
- f_macro_memory_structure_clear(structure) \
+ #define f_macro_memory_structure_t_new(status, structure, type, length) \
+ f_macro_memory_structure_t_clear(structure) \
status = f_memory_new((void **) & structure.array, sizeof(type), length); \
if (status == F_none) { \
structure.size = length; \
* type: the structure type.
*/
#ifndef _di_f_macro_memory_structure_delete_
- #define f_macro_memory_structure_delete(status, structure, type) \
+ #define f_macro_memory_structure_t_delete(status, structure, type) \
status = f_memory_delete((void **) & structure.array, sizeof(type), structure.size); \
if (status == F_none) { \
structure.size = 0; \
* type: the structure type.
*/
#ifndef _di_f_macro_memory_structure_destroy_
- #define f_macro_memory_structure_destroy(status, structure, type) \
+ #define f_macro_memory_structure_t_destroy(status, structure, type) \
status = f_memory_destroy((void **) & structure.array, sizeof(type), structure.size); \
if (status == F_none) { \
structure.size = 0; \
* type: the structure type.
*/
#ifndef _di_f_macro_memory_structure_delete_simple_
- #define f_macro_memory_structure_delete_simple(structure, type) \
+ #define f_macro_memory_structure_t_delete_simple(structure, type) \
if (f_memory_delete((void **) & structure.array, sizeof(type), structure.size) == F_none) { \
structure.size = 0; \
structure.used = 0; \
* type: the structure type.
*/
#ifndef _di_f_macro_memory_structure_destroy_simple_
- #define f_macro_memory_structure_destroy_simple(structure, type) \
+ #define f_macro_memory_structure_t_destroy_simple(structure, type) \
if (f_memory_destroy((void **) & structure.array, sizeof(type), structure.size) == F_none) { \
structure.size = 0; \
structure.used = 0; \
* new_length: the new size of the array.
*/
#ifndef _di_f_macro_memory_structure_resize_
- #define f_macro_memory_structure_resize(status, structure, type, new_length) \
+ #define f_macro_memory_structure_t_resize(status, structure, type, new_length) \
status = f_memory_resize((void **) & structure.array, sizeof(type), structure.size, new_length); \
if (status == F_none) { \
structure.size = new_length; \
* new_length: the new size of the array.
*/
#ifndef _di_f_macro_memory_structure_adjust_
- #define f_macro_memory_structure_adjust(status, structure, type, new_length) \
+ #define f_macro_memory_structure_t_adjust(status, structure, type, new_length) \
status = f_memory_adjust((void **) & structure.array, sizeof(type), structure.size, new_length); \
if (status == F_none) { \
structure.size = new_length; \
* structures: the structures to operate on.
*/
#ifndef _di_f_macro_memory_structures_clear_
- #define f_macro_memory_structures_clear(structures) \
+ #define f_macro_memory_structures_t_clear(structures) \
structures.array = 0; \
structures.size = 0; \
structures.used = 0;
* new_length: the new size of the array.
*/
#ifndef _di_f_macro_memory_structures_new_
- #define f_macro_memory_structures_new(status, structures, type_structures, new_length) \
- f_macro_memory_structures_clear(structures) \
+ #define f_macro_memory_structures_t_new(status, structures, type_structures, new_length) \
+ f_macro_memory_structures_t_clear(structures) \
status = f_memory_new((void **) & structures.array, sizeof(type_structures), new_length); \
if (status == F_none) { \
structures.size = new_length; \
* type_stuctures: the structure type.
*/
#ifndef _di_f_macro_memory_structures_delete_
- #define f_macro_memory_structures_delete(status, structures, type_structure, type_structures) \
+ #define f_macro_memory_structures_t_delete(status, structures, type_structure, type_structures) \
status = F_none; \
structures.used = structures.size; \
while (structures.used > 0) { \
structures.used--; \
- f_macro_memory_structure_delete(status, structures.array[structures.used], type_structure); \
+ f_macro_memory_structure_t_delete(status, structures.array[structures.used], type_structure); \
if (status != F_none) break; \
} \
if (status == F_none) status = f_memory_delete((void **) & structures.array, sizeof(type_structures), structures.size); \
* type_stuctures: the structure type.
*/
#ifndef _di_f_macro_memory_structures_destroy_
- #define f_macro_memory_structures_destroy(status, structures, type_structure, type_structures) \
+ #define f_macro_memory_structures_t_destroy(status, structures, type_structure, type_structures) \
status = F_none; \
structures.used = structures.size; \
while (structures.used > 0) { \
structures.used--; \
- f_macro_memory_structure_destroy(status, structures.array[structures.used], type_structure); \
+ f_macro_memory_structure_t_destroy(status, structures.array[structures.used], type_structure); \
if (status != F_none) break; \
} \
if (status == F_none) status = f_memory_destroy((void **) & structures.array, sizeof(type_structures), structures.size); \
* type_stuctures: the structure type.
*/
#ifndef _di_f_macro_memory_structures_delete_simple_
- #define f_macro_memory_structures_delete_simple(structures, type_structure, type_structures) \
+ #define f_macro_memory_structures_t_delete_simple(structures, type_structure, type_structures) \
structures.used = structures.size; \
while (structures.used > 0) { \
structures.used--; \
- f_macro_memory_structure_delete_simple(structures.array[structures.used], type_structure); \
+ f_macro_memory_structure_t_delete_simple(structures.array[structures.used], type_structure); \
} \
if (structures.used == 0) { \
if (f_memory_delete((void **) & structures.array, sizeof(type_structures), structures.size)) { \
* type_stuctures: the structure type.
*/
#ifndef _di_f_macro_memory_structures_destroy_simple_
- #define f_macro_memory_structures_destroy_simple(structures, type_structure, type_structures) \
+ #define f_macro_memory_structures_t_destroy_simple(structures, type_structure, type_structures) \
structures.used = structures.size; \
while (structures.used > 0) { \
structures.used--; \
- f_macro_memory_structure_destroy_simple(structures.array[structures.used], type_structure); \
+ f_macro_memory_structure_t_destroy_simple(structures.array[structures.used], type_structure); \
} \
if (structures.used == 0) { \
if (f_memory_destroy((void **) & structures.array, sizeof(type_structures), structures.size)) { \
* length_variable: the data type of the length variable.
*/
#ifndef _di_f_macro_memory_structures_resize_
- #define f_macro_memory_structures_resize(status, structures, type_structure, type_structures, new_length, length_variable) \
+ #define f_macro_memory_structures_t_resize(status, structures, type_structure, type_structures, new_length, length_variable) \
status = F_none; \
if (new_length < structures.size) { \
for (length_variable _macro__i = structures.size - new_length; _macro__i < structures.size; _macro__i++) { \
- f_macro_memory_structure_delete(status, structures.array[_macro__i], type_structure); \
+ f_macro_memory_structure_t_delete(status, structures.array[_macro__i], type_structure); \
if (status != F_none) break; \
} \
} \
* length_variable: the data type of the length variable.
*/
#ifndef _di_f_macro_memory_structures_adjust_
- #define f_macro_memory_structures_adjust(status, structures, type_structure, type_structures, new_length, length_variable) \
+ #define f_macro_memory_structures_t_adjust(status, structures, type_structure, type_structures, new_length, length_variable) \
status = F_none; \
if (new_length < structures.size) { \
for (length_variable _macro__i = structures.size - new_length; _macro__i < structures.size; _macro__i++) { \
- f_macro_memory_structure_destroy(status, structures.array[_macro__i], type_structure); \
+ f_macro_memory_structure_t_destroy(status, structures.array[_macro__i], type_structure); \
if (status != F_none) break; \
} \
} \
* Provide a macro for calling other macros for incrementing a buffer.
*
* If the used + step is greater than size, then increase by step_default.
- * If step_default exceeds f_array_length_size, then attempt to increment by step.
- * If step exceeds f_array_length_size, set status to error_too_large.
+ * If step_default exceeds f_array_length_t_size, then attempt to increment by step.
+ * If step exceeds f_array_length_t_size, set status to error_too_large.
*
* Be sure to check size for error after calling this.
*
* step: the step to increase by, must be less than or equal to step_default.
* step_default: the default step to increase by if memory allows.
* macro_resize: the resize structure macro to call that excepts the exact arguments: (status, structure, new_length).
- * error_too_large: the error status to return when f_array_length_size would be exceeded.
+ * error_too_large: the error status to return when f_array_length_t_size would be exceeded.
*/
#ifndef _di_f_macro_memory_structure_macro_increment_
#define f_macro_memory_structure_macro_increment(status, structure, step, step_default, macro_resize, error_too_large) \
if (structure.used + step > structure.size) { \
- if (structure.used + step_default > f_array_length_size) { \
- if (structure.used + step > structure.size > f_array_length_size) { \
+ if (structure.used + step_default > f_array_length_t_size) { \
+ if (structure.used + step > structure.size > f_array_length_t_size) { \
status = F_status_set_error(error_too_large); \
} \
else { \
#endif
#ifndef _di_f_path_change_
- f_return_status f_path_change(const f_string path) {
+ f_return_status f_path_change(const f_string_t path) {
if (chdir(path) < 0) {
if (errno == EACCES) return F_status_set_error(F_access_denied);
#endif // _di_f_path_change_at_
#ifndef _di_f_path_current_
- f_return_status f_path_current(const bool real, f_string_dynamic *path) {
+ f_return_status f_path_current(const bool real, f_string_dynamic_t *path) {
#ifndef _di_level_0_parameter_checking_
if (path == 0) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
return private_f_path_real(buffer, path);
}
- const f_string_length length = strnlen(buffer, f_path_max);
+ const f_string_length_t length = strnlen(buffer, f_path_max);
if (length + 1 > path->size) {
- f_status status = F_none;
+ f_status_t status = F_none;
- f_macro_string_dynamic_new(status, (*path), length + 1);
+ f_macro_string_dynamic_t_new(status, (*path), length + 1);
if (F_status_is_error(status)) return status;
}
#endif // _di_f_path_current_
#ifndef _di_f_path_real_
- f_return_status f_path_real(const f_string path, f_string_dynamic *real) {
+ f_return_status f_path_real(const f_string_t path, f_string_dynamic_t *real) {
#ifndef _di_level_0_parameter_checking_
if (real == 0) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
* @see chdir()
*/
#ifndef _di_f_path_change_
- extern f_return_status f_path_change(const f_string path);
+ extern f_return_status f_path_change(const f_string_t path);
#endif // _di_f_path_change_
/**
* @see getcwd()
*/
#ifndef _di_f_path_current_
- extern f_return_status f_path_current(const bool real, f_string_dynamic *path);
+ extern f_return_status f_path_current(const bool real, f_string_dynamic_t *path);
#endif // _di_f_path_current_
/**
* @see realpath()
*/
#ifndef _di_f_path_real_
- extern f_return_status f_path_real(const f_string path, f_string_dynamic *real);
+ extern f_return_status f_path_real(const f_string_t path, f_string_dynamic_t *real);
#endif // _di_f_path_real_
#ifdef __cplusplus
#endif
#if !defined(_di_f_path_current_) || !defined(_di_f_path_real_)
- f_return_status private_f_path_real(const f_string path, f_string_dynamic *real) {
+ f_return_status private_f_path_real(const f_string_t path, f_string_dynamic_t *real) {
char buffer[f_path_max];
if (!realpath(path, buffer)) {
return F_status_set_error(F_failure);
}
- const f_string_length length = strnlen(buffer, f_path_max);
+ const f_string_length_t length = strnlen(buffer, f_path_max);
if (length + 1 > real->size) {
- f_status status = F_none;
+ f_status_t status = F_none;
- f_macro_string_dynamic_resize(status, (*real), length + 1);
+ f_macro_string_dynamic_t_resize(status, (*real), length + 1);
if (F_status_is_error(status)) return status;
}
* @see f_path_real()
*/
#if !defined(_di_f_path_current_) || !defined(_di_f_path_real_)
- extern f_return_status private_f_path_real(const f_string path, f_string_dynamic *real) f_gcc_attribute_visibility_internal;
+ extern f_return_status private_f_path_real(const f_string_t path, f_string_dynamic_t *real) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_f_path_current_) || !defined(_di_f_path_real_)
#ifdef __cplusplus
#endif
#ifndef _di_f_print_string_
- f_return_status f_print_string(FILE *output, const f_string string, const f_string_length length) {
+ f_return_status f_print_string(FILE *output, const f_string_t string, const f_string_length_t length) {
#ifndef _di_level_0_parameter_checking_
if (string == 0) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
if (length == 0) return F_data_not;
- register f_string_length i = 0;
+ register f_string_length_t i = 0;
for (; i < length; i++) {
if (string[i] != 0) {
#endif // _di_f_print_string_
#ifndef _di_f_print_string_dynamic_
- f_return_status f_print_string_dynamic(FILE *output, const f_string_static buffer) {
+ f_return_status f_print_string_dynamic(FILE *output, const f_string_static_t buffer) {
if (buffer.used == 0) return F_data_not;
- register f_string_length i = 0;
+ register f_string_length_t i = 0;
for (; i < buffer.used; i++) {
if (buffer.string[i] != 0) {
#endif // _di_f_print_string_dynamic_
#ifndef _di_f_print_string_dynamic_partial_
- f_return_status f_print_string_dynamic_partial(FILE *output, const f_string_static buffer, const f_string_range range) {
+ f_return_status f_print_string_dynamic_partial(FILE *output, const f_string_static_t buffer, const f_string_range_t range) {
#ifndef _di_level_0_parameter_checking_
if (range.start < 0) return F_status_set_error(F_parameter);
if (range.start > range.stop) return F_status_set_error(F_parameter);
if (buffer.used == 0) return F_data_not;
- register f_string_length i = range.start;
+ register f_string_length_t i = range.start;
for (; i <= range.stop; i++) {
if (buffer.string[i] != 0) {
* F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_f_print_string_
- extern f_return_status f_print_string(FILE *output, const f_string string, const f_string_length length);
+ extern f_return_status f_print_string(FILE *output, const f_string_t string, const f_string_length_t length);
#endif // _di_f_print_string_
/**
* F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_f_print_string_dynamic_
- extern f_return_status f_print_string_dynamic(FILE *output, const f_string_static buffer);
+ extern f_return_status f_print_string_dynamic(FILE *output, const f_string_static_t buffer);
#endif // _di_f_print_string_dynamic_
/**
* F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_f_print_string_dynamic_partial_
- extern f_return_status f_print_string_dynamic_partial(FILE *output, const f_string_static buffer, const f_string_range range);
+ extern f_return_status f_print_string_dynamic_partial(FILE *output, const f_string_static_t buffer, const f_string_range_t range);
#endif // _di_f_print_string_dynamic_partial_
#ifdef __cplusplus
#endif
#if !defined(_di_f_serialize_un_simple_find_) || !defined(_di_f_serialize_un_simple_get_)
- f_return_status private_f_serialize_un_simple_find(const f_string_static serialize, const f_array_length index, f_string_range *location) {
- f_status status = F_none;
+ f_return_status private_f_serialize_un_simple_find(const f_string_static_t serialize, const f_array_length_t index, f_string_range_t *location) {
+ f_status_t status = F_none;
- f_array_length i = 0;
- f_array_length start = 0;
- f_array_length current = 0;
+ f_array_length_t i = 0;
+ f_array_length_t start = 0;
+ f_array_length_t current = 0;
unsigned short width = 0;
* F_parameter (with error bit) if a parameter is invalid.
*/
#if !defined(_di_f_serialize_un_simple_find_) || !defined(_di_f_serialize_un_simple_get_)
- extern f_return_status private_f_serialize_un_simple_find(const f_string_static serialize, const f_array_length index, f_string_range *location) f_gcc_attribute_visibility_internal;
+ extern f_return_status private_f_serialize_un_simple_find(const f_string_static_t serialize, const f_array_length_t index, f_string_range_t *location) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_f_serialize_un_simple_find_) || !defined(_di_f_serialize_un_simple_get_)
#ifdef __cplusplus
#endif
#ifndef _di_f_serialize_simple_
- f_return_status f_serialize_simple(const f_string_static value, f_string_dynamic *serialize) {
+ f_return_status f_serialize_simple(const f_string_static_t value, f_string_dynamic_t *serialize) {
#ifndef _di_level_0_parameter_checking_
if (serialize == 0) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- f_status status = F_none;
+ f_status_t status = F_none;
if (serialize->used + value.used + 1 >= serialize->size) {
- f_macro_string_dynamic_resize(status, (*serialize), serialize->size + value.used + 1);
+ f_macro_string_dynamic_t_resize(status, (*serialize), serialize->size + value.used + 1);
if (F_status_is_error(status)) return status;
}
#endif // _di_f_serialize_simple_
#ifndef _di_f_serialize_un_simple_
- f_return_status f_serialize_un_simple(const f_string_static serialize, f_string_dynamics *strings) {
+ f_return_status f_serialize_un_simple(const f_string_static_t serialize, f_string_dynamics_t *strings) {
#ifndef _di_level_0_parameter_checking_
if (serialize.used == 0) return F_status_set_error(F_parameter);
if (strings == 0) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- f_status status = F_none;
+ f_status_t status = F_none;
- f_array_length i = 0;
- f_array_length start = 0;
+ f_array_length_t i = 0;
+ f_array_length_t start = 0;
uint8_t width = 0;
strings->used++;
}
else {
- f_string_length total;
+ f_string_length_t total;
if (i + 1 >= serialize.used) {
total = (i - start) + 1;
}
if (total > strings->array[strings->used].size) {
- f_macro_string_dynamic_new(status, strings->array[strings->used], total);
+ f_macro_string_dynamic_t_new(status, strings->array[strings->used], total);
if (F_status_is_error(status)) return status;
strings->array[strings->used].size = total;
#endif // _di_f_serialize_un_simple_
#ifndef _di_f_serialize_un_simple_map_
- f_return_status f_serialize_un_simple_map(const f_string_static serialize, f_string_ranges *locations) {
+ f_return_status f_serialize_un_simple_map(const f_string_static_t serialize, f_string_ranges_t *locations) {
#ifndef _di_level_0_parameter_checking_
if (serialize.used == 0) return F_status_set_error(F_parameter);
if (locations == 0) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- f_status status = F_none;
+ f_status_t status = F_none;
- f_array_length i = 0;
- f_array_length start = 0;
+ f_array_length_t i = 0;
+ f_array_length_t start = 0;
uint8_t width = 0;
width = f_macro_utf_byte_width(serialize.string[i]);
if (serialize.string[i] == f_serialize_simple_splitter || i + 1 >= serialize.used) {
- f_macro_memory_structure_macro_increment(status, (*locations), 1, f_serialize_default_allocation_step, f_macro_string_ranges_resize, F_buffer_too_large);
+ f_macro_memory_structure_macro_increment(status, (*locations), 1, f_serialize_default_allocation_step, f_macro_string_ranges_t_resize, F_buffer_too_large);
if (F_status_is_error(status)) return status;
if (start == i) {
#endif // _di_f_serialize_un_simple_map_
#ifndef _di_f_serialize_un_simple_find_
- f_return_status f_serialize_un_simple_find(const f_string_static serialize, const f_array_length index, f_string_range *range) {
+ f_return_status f_serialize_un_simple_find(const f_string_static_t serialize, const f_array_length_t index, f_string_range_t *range) {
#ifndef _di_level_0_parameter_checking_
if (serialize.used == 0) return F_status_set_error(F_parameter);
if (range == 0) return F_status_set_error(F_parameter);
#endif // _di_f_serialize_un_simple_find_
#ifndef _di_f_serialize_un_simple_get_
- f_return_status f_serialize_un_simple_get(const f_string_static serialize, const f_array_length index, f_string_dynamic *dynamic) {
+ f_return_status f_serialize_un_simple_get(const f_string_static_t serialize, const f_array_length_t index, f_string_dynamic_t *dynamic) {
#ifndef _di_level_0_parameter_checking_
if (serialize.used == 0) return F_status_set_error(F_parameter);
if (dynamic == 0) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- f_string_range range = f_string_range_initialize;
+ f_string_range_t range = f_string_range_initialize;
- f_status status = private_f_serialize_un_simple_find(serialize, index, &range);
+ f_status_t status = private_f_serialize_un_simple_find(serialize, index, &range);
if (F_status_is_error(status)) return status;
if (status == F_data_not_eos) {
return status;
}
- f_string_length total = (range.stop - range.start) + 1;
+ f_string_length_t total = (range.stop - range.start) + 1;
if (total >= dynamic->size) {
- f_status status_allocation = F_none;
+ f_status_t status_allocation = F_none;
- f_macro_string_dynamic_resize(status_allocation, (*dynamic), total);
+ f_macro_string_dynamic_t_resize(status_allocation, (*dynamic), total);
if (F_status_is_error(status_allocation)) return status_allocation;
}
* F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_f_serialize_simple_
- extern f_return_status f_serialize_simple(const f_string_static value, f_string_dynamic *serialize);
+ extern f_return_status f_serialize_simple(const f_string_static_t value, f_string_dynamic_t *serialize);
#endif // _di_f_serialize_simple_
/**
* F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_f_serialize_un_simple_
- extern f_return_status f_serialize_un_simple(const f_string_static serialize, f_string_dynamics *strings);
+ extern f_return_status f_serialize_un_simple(const f_string_static_t serialize, f_string_dynamics_t *strings);
#endif // _di_f_serialize_un_simple_
/**
* F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_f_serialize_un_simple_map_
- extern f_return_status f_serialize_un_simple_map(const f_string_static serialize, f_string_ranges *locations);
+ extern f_return_status f_serialize_un_simple_map(const f_string_static_t serialize, f_string_ranges_t *locations);
#endif // _di_f_serialize_un_simple_map_
/**
* F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_f_serialize_un_simple_find_
- extern f_return_status f_serialize_un_simple_find(const f_string_static serialize, const f_array_length index, f_string_range *location);
+ extern f_return_status f_serialize_un_simple_find(const f_string_static_t serialize, const f_array_length_t index, f_string_range_t *location);
#endif // _di_f_serialize_un_simple_find_
/**
* F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_f_serialize_un_simple_get_
- extern f_return_status f_serialize_un_simple_get(const f_string_static serialize, const f_array_length index, f_string_dynamic *dynamic);
+ extern f_return_status f_serialize_un_simple_get(const f_string_static_t serialize, const f_array_length_t index, f_string_dynamic_t *dynamic);
#endif // _di_f_serialize_un_simple_get_
#ifdef __cplusplus
#endif
#ifndef _di_f_socket_file_bind_
- f_return_status f_socket_file_bind(const f_string path, const int id, struct sockaddr_un *address) {
+ f_return_status f_socket_file_bind(const f_string_t path, const int id, struct sockaddr_un *address) {
memset(&address, 0, sizeof(struct sockaddr_un));
address->sun_family = AF_UNIX;
strncpy(address->sun_path, path, sizeof(address->sun_path) - 1);
* @see bind()
*/
#ifndef _di_f_socket_file_bind_
- extern f_return_status f_socket_file_bind(const f_string path, const int id, struct sockaddr_un *address);
+ extern f_return_status f_socket_file_bind(const f_string_t path, const int id, struct sockaddr_un *address);
#endif // _di_f_socket_file_bind_
/**
* Status masks.
*/
#ifndef _di_F_status_masks_
- // f_status is required to be exactly 16 bits, the first two high order bits represent error and warning respectively.
+ // 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
#define F_status_bit_signal 0xc000 // 1100 0000 0000 0000
#define F_status_bit_warning 0x4000 // 0100 0000 0000 0000
* size: Total amount of allocated space.
* used: Total number of allocated spaces used.
*/
-#ifndef _di_f_statuss_
+#ifndef _di_f_statuss_t_
typedef struct {
- f_status *array;
- f_array_length size;
- f_array_length used;
- } f_statuss;
+ f_status_t *array;
+ f_array_length_t size;
+ f_array_length_t used;
+ } f_statuss_t;
- #define f_statuss_initialize { 0, 0, 0 }
+ #define f_statuss_t_initialize { 0, 0, 0 }
- #define f_macro_statuss_clear(statuss) f_macro_memory_structure_clear(statuss)
+ #define f_macro_statuss_t_clear(statuss) f_macro_memory_structure_t_clear(statuss)
- #define f_macro_statuss_new(status, statuss, length) f_macro_memory_structure_new(status, statuss, f_status, length)
+ #define f_macro_statuss_t_new(status, statuss, length) f_macro_memory_structure_t_new(status, statuss, f_status_t, length)
- #define f_macro_statuss_delete(status, statuss) f_macro_memory_structure_delete(status, statuss, f_status)
- #define f_macro_statuss_destroy(status, statuss) f_macro_memory_structure_destroy(status, statuss, f_status)
+ #define f_macro_statuss_t_delete(status, statuss) f_macro_memory_structure_t_delete(status, statuss, f_status_t)
+ #define f_macro_statuss_t_destroy(status, statuss) f_macro_memory_structure_t_destroy(status, statuss, f_status_t)
- #define f_macro_statuss_delete_simple(statuss) f_macro_memory_structure_delete_simple(statuss, f_status)
- #define f_macro_statuss_destroy_simple(statuss) f_macro_memory_structure_destroy_simple(statuss, f_status)
+ #define f_macro_statuss_t_delete_simple(statuss) f_macro_memory_structure_t_delete_simple(statuss, f_status_t)
+ #define f_macro_statuss_t_destroy_simple(statuss) f_macro_memory_structure_t_destroy_simple(statuss, f_status_t)
- #define f_macro_statuss_resize(status, statuss, new_length) f_macro_memory_structure_resize(status, statuss, f_status, new_length)
- #define f_macro_statuss_adjust(status, statuss, new_length) f_macro_memory_structure_adjust(status, statuss, f_status, new_length)
-#endif // _di_f_statuss_
+ #define f_macro_statuss_t_resize(status, statuss, new_length) f_macro_memory_structure_t_resize(status, statuss, f_status_t, new_length)
+ #define f_macro_statuss_t_adjust(status, statuss, new_length) f_macro_memory_structure_t_adjust(status, statuss, f_status_t, new_length)
+#endif // _di_f_statuss_t_
/**
* An array of an array of status codes.
* size: total amount of allocated space.
* used: total number of allocated spaces used.
*/
-#ifndef _di_f_statusss_
+#ifndef _di_f_statusss_t_
typedef struct {
- f_statuss *array;
+ f_statuss_t *array;
- f_array_length size;
- f_array_length used;
- } f_statusss;
+ f_array_length_t size;
+ f_array_length_t used;
+ } f_statusss_t;
- #define f_statusss_initialize { 0, 0, 0 }
+ #define f_statusss_t_initialize { 0, 0, 0 }
- #define f_macro_statusss_clear(statusss) f_macro_memory_structures_clear(statusss)
+ #define f_macro_statusss_t_clear(statusss) f_macro_memory_structures_t_clear(statusss)
- #define f_macro_statusss_new(status, statusss, length) f_macro_memory_structures_new(status, statusss, f_status, f_statuss, length)
+ #define f_macro_statusss_t_new(status, statusss, length) f_macro_memory_structures_t_new(status, statusss, f_status_t, f_statuss_t, length)
- #define f_macro_statusss_delete(status, statusss) f_macro_memory_structures_delete(status, statusss, f_status, f_statuss)
- #define f_macro_statusss_destroy(status, statusss) f_macro_memory_structures_destroy(status, statusss, f_status, f_statuss)
+ #define f_macro_statusss_t_delete(status, statusss) f_macro_memory_structures_t_delete(status, statusss, f_status_t, f_statuss_t)
+ #define f_macro_statusss_t_destroy(status, statusss) f_macro_memory_structures_t_destroy(status, statusss, f_status_t, f_statuss_t)
- #define f_macro_statusss_delete_simple(statusss) f_macro_memory_structures_delete_simple(statusss, f_status, f_statuss)
- #define f_macro_statusss_destroy_simple(statusss) f_macro_memory_structures_destroy_simple(statusss, f_status, f_statuss)
+ #define f_macro_statusss_t_delete_simple(statusss) f_macro_memory_structures_t_delete_simple(statusss, f_status_t, f_statuss_t)
+ #define f_macro_statusss_t_destroy_simple(statusss) f_macro_memory_structures_t_destroy_simple(statusss, f_status_t, f_statuss_t)
- #define f_macro_statusss_resize(status, statusss, new_length) f_macro_memory_structures_resize(status, statusss, f_status, f_statuss, new_length, f_array_length)
- #define f_macro_statusss_adjust(status, statusss, new_length) f_macro_memory_structures_adjust(status, statusss, f_status, f_statuss, new_length, f_array_length)
-#endif // _di_f_statuss_
+ #define f_macro_statusss_t_resize(status, statusss, new_length) f_macro_memory_structures_t_resize(status, statusss, f_status_t, f_statuss_t, new_length, f_array_length_t)
+ #define f_macro_statusss_t_adjust(status, statusss, new_length) f_macro_memory_structures_t_adjust(status, statusss, f_status_t, f_statuss_t, new_length, f_array_length_t)
+#endif // _di_f_statuss_t_
#ifdef __cplusplus
} // extern "C"
*
* Provides string capabilities.
*
- * It is highly recommended that all string arrays are set to a max size of f_string_length_size.
- * Any calculations against the length (aka: string.used) can always perform (A < B) operators such that the B is f_string_length_size + 1 without integer overflow.
+ * It is highly recommended that all string arrays are set to a max size of f_string_length_t_size.
+ * Any calculations against the length (aka: string.used) can always perform (A < B) operators such that the B is f_string_length_t_size + 1 without integer overflow.
*/
#ifndef _F_string_h
#define _F_string_h
#define string_format_long_long_unsigned "%llu"
#endif // _di_string_format_pointers_
-#ifndef _di_f_array_length_printf_
+#ifndef _di_f_array_t_length_printf_
#define f_array_length_printf string_format_integer
#define f_array_length_short_printf string_format_short_integer
#define f_array_length_long_printf string_format_long_integer
-#endif // _di_f_array_length_printf_
+#endif // _di_f_array_t_length_printf_
/**
* define the basic string type.
*/
-#ifndef _di_f_string_
- typedef char *f_string;
+#ifndef _di_f_string_t_
+ typedef char *f_string_t;
- #define f_string_initialize 0
+ #define f_string_t_initialize 0
- #define f_macro_string_new(status, string, length) status = f_memory_new((void **) & string, sizeof(f_string), length)
- #define f_macro_string_delete(status, string, length) status = f_memory_delete((void **) & string, sizeof(f_string), length)
- #define f_macro_string_destroy(status, string, length) status = f_memory_destroy((void **) & string, sizeof(f_string), length)
+ #define f_macro_string_t_new(status, string, length) status = f_memory_new((void **) & string, sizeof(f_string_t), length)
+ #define f_macro_string_t_delete(status, string, length) status = f_memory_delete((void **) & string, sizeof(f_string_t), length)
+ #define f_macro_string_t_destroy(status, string, length) status = f_memory_destroy((void **) & string, sizeof(f_string_t), length)
- #define f_macro_string_delete_simple(string, length) f_memory_delete((void **) & string, sizeof(f_string), length)
- #define f_macro_string_destroy_simple(string, length) f_memory_destroy((void **) & string, sizeof(f_string), length)
+ #define f_macro_string_t_delete_simple(string, length) f_memory_delete((void **) & string, sizeof(f_string_t), length)
+ #define f_macro_string_t_destroy_simple(string, length) f_memory_destroy((void **) & string, sizeof(f_string_t), length)
- #define f_macro_string_resize(status, string, old_length, new_length) \
- status = f_memory_resize((void **) & string, sizeof(f_string), old_length, new_length)
+ #define f_macro_string_t_resize(status, string, old_length, new_length) \
+ status = f_memory_resize((void **) & string, sizeof(f_string_t), old_length, new_length)
- #define f_macro_string_adjust(status, string, old_length, new_length) \
- status = f_memory_adjust((void **) & string, sizeof(f_string), old_length, new_length)
-#endif // _di_f_string_
+ #define f_macro_string_t_adjust(status, string, old_length, new_length) \
+ status = f_memory_adjust((void **) & string, sizeof(f_string_t), old_length, new_length)
+#endif // _di_f_string_t_
-#ifndef _di_f_string_length_
- typedef f_number_unsigned f_string_length;
+#ifndef _di_f_string_length_t_
+ typedef f_number_unsigned_t f_string_length_t;
// string size is set to (size - 4) to compensate for UTF-8 4-byte character such that it can easily act as a (size - 1) regardless of UTF-8.
- #define f_string_length_size 0xfffffffffffffffb
- #define f_string_length_size_max f_type_number_size_max_unsigned
+ #define f_string_length_t_size 0xfffffffffffffffb
+ #define f_string_length_t_size_max f_number_t_size_max_unsigned
- #define f_string_length_printf string_format_long_integer
-#endif // _di_f_string_length_
+ #define f_string_length_t_printf string_format_long_integer
+#endif // _di_f_string_length_t_
/**
* A structure containing an array of string lengths.
* size: total amount of allocated space.
* used: total number of allocated spaces used.
*/
-#ifndef _di_f_string_lengths_
+#ifndef _di_f_string_lengths_t_
typedef struct {
- f_string_length *array;
+ f_string_length_t *array;
- f_array_length size;
- f_array_length used;
- } f_string_lengths;
+ f_array_length_t size;
+ f_array_length_t used;
+ } f_string_lengths_t;
- #define f_string_lengths_initialize { 0, 0, 0 }
+ #define f_string_lengths_t_initialize { 0, 0, 0 }
- #define f_macro_string_lengths_clear(lengths) f_macro_memory_structure_clear(lengths)
+ #define f_macro_string_lengths_t_clear(lengths) f_macro_memory_structure_t_clear(lengths)
- #define f_macro_string_lengths_new(status, lengths, length) f_macro_memory_structure_new(status, lengths, f_string_length, length)
+ #define f_macro_string_lengths_t_new(status, lengths, length) f_macro_memory_structure_t_new(status, lengths, f_string_length_t, length)
- #define f_macro_string_lengths_delete(status, lengths) f_macro_memory_structure_delete(status, lengths, f_string_length)
- #define f_macro_string_lengths_destroy(status, lengths) f_macro_memory_structure_destroy(status, lengths, f_string_length)
+ #define f_macro_string_lengths_t_delete(status, lengths) f_macro_memory_structure_t_delete(status, lengths, f_string_length_t)
+ #define f_macro_string_lengths_t_destroy(status, lengths) f_macro_memory_structure_t_destroy(status, lengths, f_string_length_t)
- #define f_macro_string_lengths_delete_simple(lengths) f_macro_memory_structure_delete_simple(lengths, f_string_length)
- #define f_macro_string_lengths_destroy_simple(lengths) f_macro_memory_structure_destroy_simple(lengths, f_string_length)
+ #define f_macro_string_lengths_t_delete_simple(lengths) f_macro_memory_structure_t_delete_simple(lengths, f_string_length_t)
+ #define f_macro_string_lengths_t_destroy_simple(lengths) f_macro_memory_structure_t_destroy_simple(lengths, f_string_length_t)
- #define f_macro_string_lengths_resize(status, lengths, new_length) f_macro_memory_structure_resize(status, lengths, f_string_length, new_length)
- #define f_macro_string_lengths_adjust(status, lengths, new_length) f_macro_memory_structure_adjust(status, lengths, f_string_length, new_length)
-#endif // _di_f_string_lengths_
+ #define f_macro_string_lengths_t_resize(status, lengths, new_length) f_macro_memory_structure_t_resize(status, lengths, f_string_length_t, new_length)
+ #define f_macro_string_lengths_t_adjust(status, lengths, new_length) f_macro_memory_structure_t_adjust(status, lengths, f_string_length_t, new_length)
+#endif // _di_f_string_lengths_t_
#ifdef __cplusplus
} // extern "C"
#endif
/**
- * A string that is analogous to f_string_dynamic but intended for static-only uses.
+ * A string that is analogous to f_string_dynamic_t but intended for static-only uses.
*
- * The f_string_static type should never be directly allocated or deallocated.
+ * The f_string_static_t type should never be directly allocated or deallocated.
*
- * A special f_macro_string_static_initialize() is provided for the special purpose of easily initialize a static string.
+ * A special f_macro_string_static_t_initialize() is provided for the special purpose of easily initialize a static string.
*
* string: the string.
* size: total amount of space available.
* used: total number of space used.
*/
-#ifndef _di_f_string_static_
+#ifndef _di_f_string_static_t_
typedef struct {
- f_string string;
+ f_string_t string;
- f_string_length size;
- f_string_length used;
- } f_string_static;
+ f_string_length_t size;
+ f_string_length_t used;
+ } f_string_static_t;
- #define f_string_static_initialize { 0, 0, 0 }
+ #define f_string_static_t_initialize { 0, 0, 0 }
- #define f_macro_string_static_clear(string_static) \
+ #define f_macro_string_static_t_clear(string_static) \
string_static.string = 0; \
string_static.size = 0; \
string_static.used = 0;
- #define f_macro_string_static_initialize(string, length) { string, length, length }
-#endif // _di_f_string_static_
+ #define f_macro_string_static_t_initialize(string, length) { string, length, length }
+#endif // _di_f_string_static_t_
/**
* A string that supports contains a size attribute to handle dynamic allocations and deallocations.
*
* Save the string size along with the string, so that strlen(..) commands can be avoided as much as possible.
*
- * This is a sub-type of f_string_static, allowing it to be passed into any f_string_static type.
- * It is recommended that f_string_static are not otherwise casted into f_string_dynamic to avoid potential memory allocation issues.
+ * This is a sub-type of f_string_static_t, allowing it to be passed into any f_string_static_t type.
+ * It is recommended that f_string_static_t are not otherwise casted into f_string_dynamic_t to avoid potential memory allocation issues.
*
* string: the string.
* size: total amount of allocated space.
* used: total number of allocated spaces used.
*/
-#ifndef _di_f_string_dynamic_
- typedef f_string_static f_string_dynamic;
+#ifndef _di_f_string_dynamic_t_
+ typedef f_string_static_t f_string_dynamic_t;
- #define f_string_dynamic_initialize f_string_static_initialize
+ #define f_string_dynamic_t_initialize f_string_static_t_initialize
- #define f_macro_string_dynamic_clear(dynamic) f_macro_string_static_clear(dynamic)
+ #define f_macro_string_dynamic_t_clear(dynamic) f_macro_string_static_t_clear(dynamic)
- #define f_macro_string_dynamic_new(status, dynamic, new_length) \
- f_macro_string_dynamic_clear(dynamic) \
- status = f_memory_new((void **) & dynamic.string, sizeof(f_string), new_length); \
+ #define f_macro_string_dynamic_t_new(status, dynamic, new_length) \
+ f_macro_string_dynamic_t_clear(dynamic) \
+ status = f_memory_new((void **) & dynamic.string, sizeof(f_string_t), new_length); \
if (status == F_none) { \
dynamic.size = new_length; \
dynamic.used = 0; \
}
- #define f_macro_string_dynamic_delete(status, dynamic) \
- status = f_memory_delete((void **) & dynamic.string, sizeof(f_string), dynamic.size); \
+ #define f_macro_string_dynamic_t_delete(status, dynamic) \
+ status = f_memory_delete((void **) & dynamic.string, sizeof(f_string_t), dynamic.size); \
if (status == F_none) { \
dynamic.size = 0; \
dynamic.used = 0; \
}
- #define f_macro_string_dynamic_destroy(status, dynamic) \
- status = f_memory_destroy((void **) & dynamic.string, sizeof(f_string), dynamic.size); \
+ #define f_macro_string_dynamic_t_destroy(status, dynamic) \
+ status = f_memory_destroy((void **) & dynamic.string, sizeof(f_string_t), dynamic.size); \
if (status == F_none) { \
dynamic.size = 0; \
dynamic.used = 0; \
}
- #define f_macro_string_dynamic_delete_simple(dynamic) \
- f_memory_delete((void **) & dynamic.string, sizeof(f_string), dynamic.size); \
+ #define f_macro_string_dynamic_t_delete_simple(dynamic) \
+ f_memory_delete((void **) & dynamic.string, sizeof(f_string_t), dynamic.size); \
dynamic.size = 0; \
dynamic.used = 0;
- #define f_macro_string_dynamic_destroy_simple(dynamic) \
- f_memory_destroy((void **) & dynamic.string, sizeof(f_string), dynamic.size); \
+ #define f_macro_string_dynamic_t_destroy_simple(dynamic) \
+ f_memory_destroy((void **) & dynamic.string, sizeof(f_string_t), dynamic.size); \
dynamic.size = 0; \
dynamic.used = 0;
- #define f_macro_string_dynamic_resize(status, dynamic, new_length) \
- status = f_memory_resize((void **) & dynamic.string, sizeof(f_string), dynamic.size, new_length); \
+ #define f_macro_string_dynamic_t_resize(status, dynamic, new_length) \
+ status = f_memory_resize((void **) & dynamic.string, sizeof(f_string_t), dynamic.size, new_length); \
if (status == F_none) { \
dynamic.size = new_length; \
if (dynamic.used > dynamic.size) dynamic.used = new_length; \
}
- #define f_macro_string_dynamic_adjust(status, dynamic, new_length) \
- status = f_memory_adjust((void **) & dynamic.string, sizeof(f_string), dynamic.size, new_length); \
+ #define f_macro_string_dynamic_t_adjust(status, dynamic, new_length) \
+ status = f_memory_adjust((void **) & dynamic.string, sizeof(f_string_t), dynamic.size, new_length); \
if (status == F_none) { \
dynamic.size = new_length; \
if (dynamic.used > dynamic.size) dynamic.used = new_length; \
}
-#endif // _di_f_string_dynamic_
+#endif // _di_f_string_dynamic_t_
/**
* An array of static strings.
* size: total amount of space available.
* used: total number of space used.
*/
-#ifndef _di_f_string_statics_
+#ifndef _di_f_string_statics_t_
typedef struct {
- f_string_static *array;
+ f_string_static_t *array;
- f_array_length size;
- f_array_length used;
- } f_string_statics;
+ f_array_length_t size;
+ f_array_length_t used;
+ } f_string_statics_t;
- #define f_string_statics_initialize { 0, 0, 0 }
+ #define f_string_statics_t_initialize { 0, 0, 0 }
- #define f_macro_string_statics_clear(statics) \
+ #define f_macro_string_statics_t_clear(statics) \
statics.array = 0; \
statics.size = 0; \
statics.used = 0;
-#endif // _di_f_string_statics_
+#endif // _di_f_string_statics_t_
/**
* An array of dynamic strings.
* size: total amount of allocated space.
* used: total number of allocated spaces used.
*/
-#ifndef _di_f_string_dynamics_
- typedef f_string_statics f_string_dynamics;
+#ifndef _di_f_string_dynamics_t_
+ typedef f_string_statics_t f_string_dynamics_t;
- #define f_string_dynamics_initialize f_string_statics_initialize
+ #define f_string_dynamics_t_initialize f_string_statics_t_initialize
- #define f_macro_string_dynamics_clear(dynamics) f_macro_string_statics_clear(dynamics)
+ #define f_macro_string_dynamics_clear(dynamics) f_macro_string_statics_t_clear(dynamics)
#define f_macro_string_dynamics_new(status, dynamics, length) \
f_macro_string_dynamics_clear(dynamics) \
- status = f_memory_new((void **) & dynamics.array, sizeof(f_string_dynamic), length); \
+ status = f_memory_new((void **) & dynamics.array, sizeof(f_string_dynamic_t), length); \
if (status == F_none) { \
dynamics.size = length; \
dynamics.used = 0; \
}
- #define f_macro_string_dynamics_delete(status, dynamics) \
+ #define f_macro_string_dynamics_t_delete(status, dynamics) \
status = F_none; \
dynamics.used = dynamics.size; \
while (dynamics.used > 0) { \
dynamics.used--; \
- f_macro_string_dynamic_delete(status, dynamics.array[dynamics.used]); \
+ f_macro_string_dynamic_t_delete(status, dynamics.array[dynamics.used]); \
if (status != F_none) break; \
} \
- if (status == F_none) status = f_memory_delete((void **) & dynamics.array, sizeof(f_string_dynamic), dynamics.size); \
+ if (status == F_none) status = f_memory_delete((void **) & dynamics.array, sizeof(f_string_dynamic_t), dynamics.size); \
if (status == F_none) dynamics.size = 0;
- #define f_macro_string_dynamics_destroy(status, dynamics) \
+ #define f_macro_string_dynamics_t_destroy(status, dynamics) \
status = F_none; \
dynamics.used = dynamics.size; \
while (dynamics.used > 0) { \
dynamics.used--; \
- f_macro_string_dynamic_destroy(status, dynamics.array[dynamics.used]); \
+ f_macro_string_dynamic_t_destroy(status, dynamics.array[dynamics.used]); \
if (status != F_none) break; \
} \
- if (status == F_none) status = f_memory_destroy((void **) & dynamics.array, sizeof(f_string_dynamic), dynamics.size); \
+ if (status == F_none) status = f_memory_destroy((void **) & dynamics.array, sizeof(f_string_dynamic_t), dynamics.size); \
if (status == F_none) dynamics.size = 0;
- #define f_macro_string_dynamics_delete_simple(dynamics) \
+ #define f_macro_string_dynamics_t_delete_simple(dynamics) \
dynamics.used = dynamics.size; \
while (dynamics.used > 0) { \
dynamics.used--; \
- f_macro_string_dynamic_delete_simple(dynamics.array[dynamics.used]); \
+ f_macro_string_dynamic_t_delete_simple(dynamics.array[dynamics.used]); \
if (dynamics.used == 0) { \
- if (f_memory_delete((void **) & dynamics.array, sizeof(f_string_dynamic), dynamics.size)) { \
+ if (f_memory_delete((void **) & dynamics.array, sizeof(f_string_dynamic_t), dynamics.size)) { \
dynamics.size = 0; \
} \
} \
}
- #define f_macro_string_dynamics_destroy_simple(dynamics) \
+ #define f_macro_string_dynamics_t_destroy_simple(dynamics) \
dynamics.used = dynamics.size; \
while (dynamics.used > 0) { \
dynamics.used--; \
- f_macro_string_dynamic_destroy_simple(dynamics.array[dynamics.used]); \
+ f_macro_string_dynamic_t_destroy_simple(dynamics.array[dynamics.used]); \
if (dynamics.used == 0) { \
- if (f_memory_destroy((void **) & dynamics.array, sizeof(f_string_dynamic), dynamics.size)) { \
+ if (f_memory_destroy((void **) & dynamics.array, sizeof(f_string_dynamic_t), dynamics.size)) { \
dynamics.size = 0; \
} \
} \
#define f_macro_string_dynamics_resize(status, dynamics, new_length) \
status = F_none; \
if (new_length < dynamics.size) { \
- for (f_array_length _macro__i = dynamics.size - new_length; _macro__i < dynamics.size; _macro__i++) { \
- f_macro_string_dynamic_delete(status, dynamics.array[_macro__i]); \
+ for (f_array_length_t _macro__i = dynamics.size - new_length; _macro__i < dynamics.size; _macro__i++) { \
+ f_macro_string_dynamic_t_delete(status, dynamics.array[_macro__i]); \
if (status != F_none) break; \
} \
} \
- if (status == F_none) status = f_memory_resize((void **) & dynamics.array, sizeof(f_string_dynamic), dynamics.size, new_length); \
+ if (status == F_none) status = f_memory_resize((void **) & dynamics.array, sizeof(f_string_dynamic_t), dynamics.size, new_length); \
if (status == F_none) { \
if (new_length > dynamics.size) { \
- for (f_array_length _macro__i = dynamics.size; _macro__i < new_length; _macro__i++) { \
- memset(&dynamics.array[_macro__i], 0, sizeof(f_string_dynamic)); \
+ for (f_array_length_t _macro__i = dynamics.size; _macro__i < new_length; _macro__i++) { \
+ memset(&dynamics.array[_macro__i], 0, sizeof(f_string_dynamic_t)); \
} \
} \
dynamics.size = new_length; \
#define f_macro_string_dynamics_adjust(status, dynamics, new_length) \
status = F_none; \
if (new_length < dynamics.size) { \
- for (f_array_length _macro__i = dynamics.size - new_length; _macro__i < dynamics.size; _macro__i++) { \
- f_macro_string_dynamic_destroy(status, dynamics.array[_macro__i], f_string_dynamic); \
+ for (f_array_length_t _macro__i = dynamics.size - new_length; _macro__i < dynamics.size; _macro__i++) { \
+ f_macro_string_dynamic_t_destroy(status, dynamics.array[_macro__i], f_string_dynamic_t); \
if (status != F_none) break; \
} \
} \
- if (status == F_none) status = f_memory_adjust((void **) & dynamics.array, sizeof(f_string_dynamic), dynamics.size, new_length); \
+ if (status == F_none) status = f_memory_adjust((void **) & dynamics.array, sizeof(f_string_dynamic_t), dynamics.size, new_length); \
if (status == F_none) { \
if (new_length > dynamics.size) { \
- for (f_array_length _macro__i = dynamics.size; _macro__i < new_length; _macro__i++) { \
- memset(&dynamics.array[_macro__i], 0, sizeof(f_string_dynamic)); \
+ for (f_array_length_t _macro__i = dynamics.size; _macro__i < new_length; _macro__i++) { \
+ memset(&dynamics.array[_macro__i], 0, sizeof(f_string_dynamic_t)); \
} \
} \
dynamics.size = new_length; \
if (dynamics.used > dynamics.size) dynamics.used = new_length; \
}
-#endif // _di_f_string_dynamics_
+#endif // _di_f_string_dynamics_t_
#ifdef __cplusplus
} // extern "C"
* name: A string representing the map name.
* value: A string representing the map value.
*/
-#ifndef _di_f_string_map_
+#ifndef _di_f_string_map_t_
typedef struct {
- f_string_dynamic name;
- f_string_dynamic value;
- } f_string_map;
+ f_string_dynamic_t name;
+ f_string_dynamic_t value;
+ } f_string_map_t;
- #define f_string_map_initialize { f_string_dynamic_initialize, f_string_dynamic_initialize }
+ #define f_string_map_t_initialize { f_string_dynamic_t_initialize, f_string_dynamic_t_initialize }
- #define f_macro_string_map_clear(map) \
+ #define f_macro_string_map_t_clear(map) \
map.array = 0; \
map.size = 0; \
map.used = 0;
- #define f_macro_string_map_delete(status, map) \
- f_macro_string_dynamic_delete(status, map.name) \
+ #define f_macro_string_map_t_delete(status, map) \
+ f_macro_string_dynamic_t_delete(status, map.name) \
if (status == F_none) { \
- f_macro_string_dynamic_delete(status, map.value) \
+ f_macro_string_dynamic_t_delete(status, map.value) \
}
- #define f_macro_string_map_destroy(status, map) \
- f_macro_string_dynamic_destroy(status, map.name) \
+ #define f_macro_string_map_t_destroy(status, map) \
+ f_macro_string_dynamic_t_destroy(status, map.name) \
if (status == F_none) { \
- f_macro_string_dynamic_destroy(status, map.value) \
+ f_macro_string_dynamic_t_destroy(status, map.value) \
}
- #define f_macro_string_map_delete_simple(map) \
- f_macro_string_dynamic_delete_simple(map.name) \
- f_macro_string_dynamic_delete_simple(map.value)
+ #define f_macro_string_map_t_delete_simple(map) \
+ f_macro_string_dynamic_t_delete_simple(map.name) \
+ f_macro_string_dynamic_t_delete_simple(map.value)
- #define f_macro_string_map_destroy_simple(map) \
- f_macro_string_dynamic_destroy_simple(map.name) \
- f_macro_string_dynamic_destroy_simple(map.value)
-#endif // _di_f_string_map_
+ #define f_macro_string_map_t_destroy_simple(map) \
+ f_macro_string_dynamic_t_destroy_simple(map.name) \
+ f_macro_string_dynamic_t_destroy_simple(map.value)
+#endif // _di_f_string_map_t_
/**
* An array of string maps.
* size: total amount of allocated space.
* used: total number of allocated spaces used.
*/
-#ifndef _di_f_string_maps_
+#ifndef _di_f_string_maps_t_
typedef struct {
- f_string_map *array;
+ f_string_map_t *array;
- f_array_length size;
- f_array_length used;
- } f_string_maps;
+ f_array_length_t size;
+ f_array_length_t used;
+ } f_string_maps_t;
- #define f_string_maps_initialize f_string_statics_initialize
+ #define f_string_maps_t_initialize f_string_statics_t_initialize
- #define f_macro_string_maps_clear(maps) \
+ #define f_macro_string_maps_t_clear(maps) \
maps.array = 0; \
maps.size = 0; \
maps.used = 0;
- #define f_macro_string_maps_new(status, maps, length) \
- f_macro_string_maps_clear(maps) \
- status = f_memory_new((void **) & maps.array, sizeof(f_string_map), length); \
+ #define f_macro_string_maps_t_new(status, maps, length) \
+ f_macro_string_maps_t_clear(maps) \
+ status = f_memory_new((void **) & maps.array, sizeof(f_string_map_t), length); \
if (status == F_none) { \
maps.size = length; \
maps.used = 0; \
}
- #define f_macro_string_maps_delete(status, maps) \
+ #define f_macro_string_maps_t_delete(status, maps) \
status = F_none; \
maps.used = maps.size; \
while (maps.used > 0) { \
maps.used--; \
- f_macro_string_map_delete(status, maps.array[maps.used]); \
+ f_macro_string_map_t_delete(status, maps.array[maps.used]); \
if (status != F_none) break; \
} \
- if (status == F_none) status = f_memory_delete((void **) & maps.array, sizeof(f_string_map), maps.size); \
+ if (status == F_none) status = f_memory_delete((void **) & maps.array, sizeof(f_string_map_t), maps.size); \
if (status == F_none) maps.size = 0;
- #define f_macro_string_maps_destroy(status, maps) \
+ #define f_macro_string_maps_t_destroy(status, maps) \
status = F_none; \
maps.used = maps.size; \
while (maps.used > 0) { \
maps.used--; \
- f_macro_string_map_destroy(status, maps.array[maps.used]); \
+ f_macro_string_map_t_destroy(status, maps.array[maps.used]); \
if (status != F_none) break; \
} \
- if (status == F_none) status = f_memory_destroy((void **) & maps.array, sizeof(f_string_map), maps.size); \
+ if (status == F_none) status = f_memory_destroy((void **) & maps.array, sizeof(f_string_map_t), maps.size); \
if (status == F_none) maps.size = 0;
- #define f_macro_string_maps_delete_simple(maps) \
+ #define f_macro_string_maps_t_delete_simple(maps) \
maps.used = maps.size; \
while (maps.used > 0) { \
maps.used--; \
- f_macro_string_map_delete_simple(maps.array[maps.used]); \
+ f_macro_string_map_t_delete_simple(maps.array[maps.used]); \
if (maps.used == 0) { \
- if (f_memory_delete((void **) & maps.array, sizeof(f_string_map), maps.size)) { \
+ if (f_memory_delete((void **) & maps.array, sizeof(f_string_map_t), maps.size)) { \
maps.size = 0; \
} \
} \
}
- #define f_macro_string_maps_destroy_simple(maps) \
+ #define f_macro_string_maps_t_destroy_simple(maps) \
maps.used = maps.size; \
while (maps.used > 0) { \
maps.used--; \
- f_macro_string_map_destroy_simple(maps.array[maps.used]); \
+ f_macro_string_map_t_destroy_simple(maps.array[maps.used]); \
if (maps.used == 0) { \
- if (f_memory_destroy((void **) & maps.array, sizeof(f_string_map), maps.size)) { \
+ if (f_memory_destroy((void **) & maps.array, sizeof(f_string_map_t), maps.size)) { \
maps.size = 0; \
} \
} \
}
- #define f_macro_string_maps_resize(status, maps, new_length) \
+ #define f_macro_string_maps_t_resize(status, maps, new_length) \
status = F_none; \
if (new_length < maps.size) { \
- for (f_array_length _macro__i = maps.size - new_length; _macro__i < maps.size; _macro__i++) { \
- f_macro_string_map_delete(status, maps.array[_macro__i]); \
+ for (f_array_length_t _macro__i = maps.size - new_length; _macro__i < maps.size; _macro__i++) { \
+ f_macro_string_map_t_delete(status, maps.array[_macro__i]); \
if (status != F_none) break; \
} \
} \
- if (status == F_none) status = f_memory_resize((void **) & maps.array, sizeof(f_string_map), maps.size, new_length); \
+ if (status == F_none) status = f_memory_resize((void **) & maps.array, sizeof(f_string_map_t), maps.size, new_length); \
if (status == F_none) { \
if (new_length > maps.size) { \
- for (f_array_length _macro__i = maps.size; _macro__i < new_length; _macro__i++) { \
- memset(&maps.array[_macro__i], 0, sizeof(f_string_map)); \
+ for (f_array_length_t _macro__i = maps.size; _macro__i < new_length; _macro__i++) { \
+ memset(&maps.array[_macro__i], 0, sizeof(f_string_map_t)); \
} \
} \
maps.size = new_length; \
if (maps.used > maps.size) maps.used = new_length; \
}
- #define f_macro_string_maps_adjust(status, maps, new_length) \
+ #define f_macro_string_maps_t_adjust(status, maps, new_length) \
status = F_none; \
if (new_length < maps.size) { \
- for (f_array_length _macro__i = maps.size - new_length; _macro__i < maps.size; _macro__i++) { \
- f_macro_string_map_destroy(status, maps.array[_macro__i], f_string_map); \
+ for (f_array_length_t _macro__i = maps.size - new_length; _macro__i < maps.size; _macro__i++) { \
+ f_macro_string_map_t_destroy(status, maps.array[_macro__i], f_string_map_t); \
if (status != F_none) break; \
} \
} \
- if (status == F_none) status = f_memory_adjust((void **) & maps.array, sizeof(f_string_map), maps.size, new_length); \
+ if (status == F_none) status = f_memory_adjust((void **) & maps.array, sizeof(f_string_map_t), maps.size, new_length); \
if (status == F_none) { \
if (new_length > maps.size) { \
- for (f_array_length _macro__i = maps.size; _macro__i < new_length; _macro__i++) { \
- memset(&maps.array[_macro__i], 0, sizeof(f_string_map)); \
+ for (f_array_length_t _macro__i = maps.size; _macro__i < new_length; _macro__i++) { \
+ memset(&maps.array[_macro__i], 0, sizeof(f_string_map_t)); \
} \
} \
maps.size = new_length; \
if (maps.used > maps.size) maps.used = new_length; \
}
-#endif // _di_f_string_maps_
+#endif // _di_f_string_maps_t_
/**
* A string map consisting of a name and multiple values.
* name: A string representing the map name.
* value: An array of strings representing the map value.
*/
-#ifndef _di_f_string_map_multi_
+#ifndef _di_f_string_map_multi_t_
typedef struct {
- f_string_dynamic name;
- f_string_dynamics value;
- } f_string_map_multi;
+ f_string_dynamic_t name;
+ f_string_dynamics_t value;
+ } f_string_map_multi_t;
- #define f_string_map_multi_initialize { f_string_dynamic_initialize, f_string_dynamics_initialize }
+ #define f_string_map_multi_t_initialize { f_string_dynamic_t_initialize, f_string_dynamics_t_initialize }
- #define f_macro_string_map_multi_clear(map) \
- f_macro_string_dynamic_clear(map.name) \
+ #define f_macro_string_map_multi_t_clear(map) \
+ f_macro_string_dynamic_t_clear(map.name) \
f_macro_string_dynamics_clear(map.value)
- #define f_macro_string_map_multi_delete(status, map) \
- f_macro_string_dynamic_delete(status, map.name) \
+ #define f_macro_string_map_multi_t_delete(status, map) \
+ f_macro_string_dynamic_t_delete(status, map.name) \
if (status == F_none) { \
- f_macro_string_dynamics_delete(status, map.value) \
+ f_macro_string_dynamics_t_delete(status, map.value) \
}
- #define f_macro_string_map_multi_destroy(status, map) \
- f_macro_string_dynamic_destroy(status, map.name) \
+ #define f_macro_string_map_multi_t_destroy(status, map) \
+ f_macro_string_dynamic_t_destroy(status, map.name) \
if (status == F_none) { \
- f_macro_string_dynamics_destroy(status, map.value) \
+ f_macro_string_dynamics_t_destroy(status, map.value) \
}
- #define f_macro_string_map_multi_delete_simple(map) \
- f_macro_string_dynamic_delete_simple(map.name) \
- f_macro_string_dynamics_delete_simple(map.value)
+ #define f_macro_string_map_multi_t_delete_simple(map) \
+ f_macro_string_dynamic_t_delete_simple(map.name) \
+ f_macro_string_dynamics_t_delete_simple(map.value)
- #define f_macro_string_map_multi_destroy_simple(map) \
- f_macro_string_dynamic_destroy_simple(map.name) \
- f_macro_string_dynamics_destroy_simple(map.value)
-#endif // _di_f_string_map_multi_
+ #define f_macro_string_map_multi_t_destroy_simple(map) \
+ f_macro_string_dynamic_t_destroy_simple(map.name) \
+ f_macro_string_dynamics_t_destroy_simple(map.value)
+#endif // _di_f_string_map_multi_t_
/**
* An array of string maps.
* size: total amount of allocated space.
* used: total number of allocated spaces used.
*/
-#ifndef _di_f_string_map_multis_
+#ifndef _di_f_string_map_multis_t_
typedef struct {
- f_string_map_multi *array;
+ f_string_map_multi_t *array;
- f_array_length size;
- f_array_length used;
- } f_string_map_multis;
+ f_array_length_t size;
+ f_array_length_t used;
+ } f_string_map_multis_t;
- #define f_string_map_multis_initialize f_string_statics_initialize
+ #define f_string_map_multis_t_initialize f_string_statics_t_initialize
- #define f_macro_string_map_multis_clear(maps) f_macro_string_statics_clear(maps)
+ #define f_macro_string_map_multis_t_clear(maps) f_macro_string_statics_t_clear(maps)
- #define f_macro_string_map_multis_new(status, maps, length) \
- f_macro_string_map_multis_clear(maps) \
- status = f_memory_new((void **) & maps.array, sizeof(f_string_map_multi), length); \
+ #define f_macro_string_map_multis_t_new(status, maps, length) \
+ f_macro_string_map_multis_t_clear(maps) \
+ status = f_memory_new((void **) & maps.array, sizeof(f_string_map_multi_t), length); \
if (status == F_none) { \
maps.size = length; \
maps.used = 0; \
}
- #define f_macro_string_map_multis_delete(status, maps) \
+ #define f_macro_string_map_multis_t_delete(status, maps) \
status = F_none; \
maps.used = maps.size; \
while (maps.used > 0) { \
maps.used--; \
- f_macro_string_map_multi_delete(status, maps.array[maps.used]); \
+ f_macro_string_map_multi_t_delete(status, maps.array[maps.used]); \
if (status != F_none) break; \
} \
- if (status == F_none) status = f_memory_delete((void **) & maps.array, sizeof(f_string_map_multi), maps.size); \
+ if (status == F_none) status = f_memory_delete((void **) & maps.array, sizeof(f_string_map_multi_t), maps.size); \
if (status == F_none) maps.size = 0;
- #define f_macro_string_map_multis_destroy(status, maps) \
+ #define f_macro_string_map_multis_t_destroy(status, maps) \
status = F_none; \
maps.used = maps.size; \
while (maps.used > 0) { \
maps.used--; \
- f_macro_string_map_multi_destroy(status, maps.array[maps.used]); \
+ f_macro_string_map_multi_t_destroy(status, maps.array[maps.used]); \
if (status != F_none) break; \
} \
- if (status == F_none) status = f_memory_destroy((void **) & maps.array, sizeof(f_string_map_multi), maps.size); \
+ if (status == F_none) status = f_memory_destroy((void **) & maps.array, sizeof(f_string_map_multi_t), maps.size); \
if (status == F_none) maps.size = 0;
- #define f_macro_string_map_multis_delete_simple(maps) \
+ #define f_macro_string_map_multis_t_delete_simple(maps) \
maps.used = maps.size; \
while (maps.used > 0) { \
maps.used--; \
- f_macro_string_map_multi_delete_simple(maps.array[maps.used]); \
+ f_macro_string_map_multi_t_delete_simple(maps.array[maps.used]); \
if (maps.used == 0) { \
- if (f_memory_delete((void **) & maps.array, sizeof(f_string_map_multi), maps.size)) { \
+ if (f_memory_delete((void **) & maps.array, sizeof(f_string_map_multi_t), maps.size)) { \
maps.size = 0; \
} \
} \
}
- #define f_macro_string_map_multis_destroy_simple(maps) \
+ #define f_macro_string_map_multis_t_destroy_simple(maps) \
maps.used = maps.size; \
while (maps.used > 0) { \
maps.used--; \
- f_macro_string_map_multi_destroy_simple(maps.array[maps.used]); \
+ f_macro_string_map_multi_t_destroy_simple(maps.array[maps.used]); \
if (maps.used == 0) { \
- if (f_memory_destroy((void **) & maps.array, sizeof(f_string_map_multi), maps.size)) { \
+ if (f_memory_destroy((void **) & maps.array, sizeof(f_string_map_multi_t), maps.size)) { \
maps.size = 0; \
} \
} \
}
- #define f_macro_string_map_multis_resize(status, maps, new_length) \
+ #define f_macro_string_map_multis_t_resize(status, maps, new_length) \
status = F_none; \
if (new_length < maps.size) { \
- for (f_array_length _macro__i = maps.size - new_length; _macro__i < maps.size; _macro__i++) { \
- f_macro_string_map_multi_delete(status, maps.array[_macro__i]); \
+ for (f_array_length_t _macro__i = maps.size - new_length; _macro__i < maps.size; _macro__i++) { \
+ f_macro_string_map_multi_t_delete(status, maps.array[_macro__i]); \
if (status != F_none) break; \
} \
} \
- if (status == F_none) status = f_memory_resize((void **) & maps.array, sizeof(f_string_map_multi), maps.size, new_length); \
+ if (status == F_none) status = f_memory_resize((void **) & maps.array, sizeof(f_string_map_multi_t), maps.size, new_length); \
if (status == F_none) { \
if (new_length > maps.size) { \
- for (f_array_length _macro__i = maps.size; _macro__i < new_length; _macro__i++) { \
- memset(&maps.array[_macro__i], 0, sizeof(f_string_map_multi)); \
+ for (f_array_length_t _macro__i = maps.size; _macro__i < new_length; _macro__i++) { \
+ memset(&maps.array[_macro__i], 0, sizeof(f_string_map_multi_t)); \
} \
} \
maps.size = new_length; \
if (maps.used > maps.size) maps.used = new_length; \
}
- #define f_macro_string_map_multis_adjust(status, maps, new_length) \
+ #define f_macro_string_map_multis_t_adjust(status, maps, new_length) \
status = F_none; \
if (new_length < maps.size) { \
- for (f_array_length _macro__i = maps.size - new_length; _macro__i < maps.size; _macro__i++) { \
- f_macro_string_map_multi_destroy(status, maps.array[_macro__i], f_string_map_multi); \
+ for (f_array_length_t _macro__i = maps.size - new_length; _macro__i < maps.size; _macro__i++) { \
+ f_macro_string_map_multi_t_destroy(status, maps.array[_macro__i], f_string_map_multi_t); \
if (status != F_none) break; \
} \
} \
- if (status == F_none) status = f_memory_adjust((void **) & maps.array, sizeof(f_string_map_multi), maps.size, new_length); \
+ if (status == F_none) status = f_memory_adjust((void **) & maps.array, sizeof(f_string_map_multi_t), maps.size, new_length); \
if (status == F_none) { \
if (new_length > maps.size) { \
- for (f_array_length _macro__i = maps.size; _macro__i < new_length; _macro__i++) { \
- memset(&maps.array[_macro__i], 0, sizeof(f_string_map_multi)); \
+ for (f_array_length_t _macro__i = maps.size; _macro__i < new_length; _macro__i++) { \
+ memset(&maps.array[_macro__i], 0, sizeof(f_string_map_multi_t)); \
} \
} \
maps.size = new_length; \
if (maps.used > maps.size) maps.used = new_length; \
}
-#endif // _di_f_string_map_multis_
+#endif // _di_f_string_map_multis_t_
#ifdef __cplusplus
} // extern "C"
/**
* Store string quantity.
*
- * Similar to f_string_range, except total is relative to start and is not an absolute stop position.
+ * Similar to f_string_range_t, except total is relative to start and is not an absolute stop position.
*
* Two common uses for when total is 0 is:
* 1) Exactly that, process a total of 0 strings bytes.
* start: The position where the string starts (based on some string/buffer).
* total: The total number of elements within that string/buffer the quantity represents.
*/
-#ifndef _di_f_string_quantity_
+#ifndef _di_f_string_quantity_t_
typedef struct {
- f_string_length start;
- f_string_length total;
- } f_string_quantity;
+ f_string_length_t start;
+ f_string_length_t total;
+ } f_string_quantity_t;
- #define f_string_quantity_initialize { 0, 0 }
-#endif // _di_f_string_quantity_
+ #define f_string_quantity_t_initialize { 0, 0 }
+#endif // _di_f_string_quantity_t_
/**
* An array of string quantities.
* size: total amount of allocated space.
* used: total number of allocated spaces used.
*/
-#ifndef _di_f_string_quantitys_
+#ifndef _di_f_string_quantitys_t_
typedef struct {
- f_string_quantity *array;
+ f_string_quantity_t *array;
- f_array_length size;
- f_array_length used;
- } f_string_quantitys;
+ f_array_length_t size;
+ f_array_length_t used;
+ } f_string_quantitys_t;
- #define f_string_quantitys_initialize {0, 0, 0}
+ #define f_string_quantitys_t_initialize {0, 0, 0}
- #define f_macro_string_quantitys_clear(quantitys) f_macro_memory_structure_clear(quantitys)
+ #define f_macro_string_quantitys_t_clear(quantitys) f_macro_memory_structure_t_clear(quantitys)
- #define f_macro_string_quantitys_new(status, quantitys, length) f_macro_memory_structure_new(status, quantitys, f_string_quantity, length)
+ #define f_macro_string_quantitys_t_new(status, quantitys, length) f_macro_memory_structure_t_new(status, quantitys, f_string_quantity_t, length)
- #define f_macro_string_quantitys_delete(status, quantitys) f_macro_memory_structure_delete(status, quantitys, f_string_quantity)
- #define f_macro_string_quantitys_destroy(status, quantitys) f_macro_memory_structure_destroy(status, quantitys, f_string_quantity)
+ #define f_macro_string_quantitys_t_delete(status, quantitys) f_macro_memory_structure_t_delete(status, quantitys, f_string_quantity_t)
+ #define f_macro_string_quantitys_t_destroy(status, quantitys) f_macro_memory_structure_t_destroy(status, quantitys, f_string_quantity_t)
- #define f_macro_string_quantitys_delete_simple(quantitys) f_macro_memory_structure_delete_simple(quantitys, f_string_quantity)
- #define f_macro_string_quantitys_destroy_simple(quantitys) f_macro_memory_structure_destroy_simple(quantitys, f_string_quantity)
+ #define f_macro_string_quantitys_t_delete_simple(quantitys) f_macro_memory_structure_t_delete_simple(quantitys, f_string_quantity_t)
+ #define f_macro_string_quantitys_t_destroy_simple(quantitys) f_macro_memory_structure_t_destroy_simple(quantitys, f_string_quantity_t)
- #define f_macro_string_quantitys_resize(status, quantitys, new_length) f_macro_memory_structure_resize(status, quantitys, f_string_quantity, new_length)
- #define f_macro_string_quantitys_adjust(status, quantitys, new_length) f_macro_memory_structure_adjust(status, quantitys, f_string_quantity, new_length)
-#endif // _di_f_string_quantitys_
+ #define f_macro_string_quantitys_t_resize(status, quantitys, new_length) f_macro_memory_structure_t_resize(status, quantitys, f_string_quantity_t, new_length)
+ #define f_macro_string_quantitys_t_adjust(status, quantitys, new_length) f_macro_memory_structure_t_adjust(status, quantitys, f_string_quantity_t, new_length)
+#endif // _di_f_string_quantitys_t_
#ifdef __cplusplus
} // extern "C"
* start: the start position.
* stop: the stop position.
*/
-#ifndef _di_f_string_range_
+#ifndef _di_f_string_range_t_
typedef struct {
- f_string_length start;
- f_string_length stop;
- } f_string_range;
+ f_string_length_t start;
+ f_string_length_t stop;
+ } f_string_range_t;
#define f_string_range_initialize { 1, 0 }
#define f_macro_string_range_clear(range) \
range.start = 1; \
range.stop = 0;
-#endif // _di_f_string_range_
+#endif // _di_f_string_range_t_
/**
* An array of string ranges.
* size: total amount of allocated space.
* used: total number of allocated spaces used.
*/
-#ifndef _di_f_string_ranges_
+#ifndef _di_f_string_ranges_t_
typedef struct {
- f_string_range *array;
+ f_string_range_t *array;
- f_array_length size;
- f_array_length used;
- } f_string_ranges;
+ f_array_length_t size;
+ f_array_length_t used;
+ } f_string_ranges_t;
- #define f_string_ranges_initialize {0, 0, 0}
+ #define f_string_ranges_t_initialize {0, 0, 0}
- #define f_macro_string_ranges_clear(ranges) f_macro_memory_structure_clear(ranges)
+ #define f_macro_string_ranges_t_clear(ranges) f_macro_memory_structure_t_clear(ranges)
- #define f_macro_string_ranges_new(status, ranges, length) f_macro_memory_structure_new(status, ranges, f_string_range, length)
+ #define f_macro_string_ranges_t_new(status, ranges, length) f_macro_memory_structure_t_new(status, ranges, f_string_range_t, length)
- #define f_macro_string_ranges_delete(status, ranges) f_macro_memory_structure_delete(status, ranges, f_string_range)
- #define f_macro_string_ranges_destroy(status, ranges) f_macro_memory_structure_destroy(status, ranges, f_string_range)
+ #define f_macro_string_ranges_t_delete(status, ranges) f_macro_memory_structure_t_delete(status, ranges, f_string_range_t)
+ #define f_macro_string_ranges_t_destroy(status, ranges) f_macro_memory_structure_t_destroy(status, ranges, f_string_range_t)
- #define f_macro_string_ranges_delete_simple(ranges) f_macro_memory_structure_delete_simple(ranges, f_string_range)
- #define f_macro_string_ranges_destroy_simple(ranges) f_macro_memory_structure_destroy_simple(ranges, f_string_range)
+ #define f_macro_string_ranges_t_delete_simple(ranges) f_macro_memory_structure_t_delete_simple(ranges, f_string_range_t)
+ #define f_macro_string_ranges_t_destroy_simple(ranges) f_macro_memory_structure_t_destroy_simple(ranges, f_string_range_t)
- #define f_macro_string_ranges_resize(status, ranges, new_length) f_macro_memory_structure_resize(status, ranges, f_string_range, new_length)
- #define f_macro_string_ranges_adjust(status, ranges, new_length) f_macro_memory_structure_adjust(status, ranges, f_string_range, new_length)
-#endif // _di_f_string_ranges_
+ #define f_macro_string_ranges_t_resize(status, ranges, new_length) f_macro_memory_structure_t_resize(status, ranges, f_string_range_t, new_length)
+ #define f_macro_string_ranges_t_adjust(status, ranges, new_length) f_macro_memory_structure_t_adjust(status, ranges, f_string_range_t, new_length)
+#endif // _di_f_string_ranges_t_
/**
- * This holds an array of f_string_ranges.
+ * This holds an array of f_string_ranges_t.
*
* array: The array of ranges arrays.
* size: Total amount of allocated space.
* used: Total number of allocated spaces used.
*/
-#ifndef _di_f_string_rangess_
+#ifndef _di_f_string_rangess_t_
typedef struct {
- f_string_ranges *array;
+ f_string_ranges_t *array;
- f_array_length size;
- f_array_length used;
- } f_string_rangess;
+ f_array_length_t size;
+ f_array_length_t used;
+ } f_string_rangess_t;
- #define f_string_rangess_initialize { 0, 0, 0 }
+ #define f_string_rangess_t_initialize { 0, 0, 0 }
- #define f_macro_string_rangess_clear(rangess) f_macro_memory_structures_clear(rangess)
+ #define f_macro_string_rangess_t_clear(rangess) f_macro_memory_structures_t_clear(rangess)
- #define f_macro_string_rangess_new(status, rangess, length) f_macro_memory_structures_new(status, rangess, f_string_ranges, length)
+ #define f_macro_string_rangess_t_new(status, rangess, length) f_macro_memory_structures_t_new(status, rangess, f_string_ranges_t, length)
- #define f_macro_string_rangess_delete(status, rangess) f_macro_memory_structures_delete(status, rangess, f_string_range, f_string_ranges)
- #define f_macro_string_rangess_destroy(status, rangess) f_macro_memory_structures_destroy(status, rangess, f_string_range, f_string_ranges)
+ #define f_macro_string_rangess_t_delete(status, rangess) f_macro_memory_structures_t_delete(status, rangess, f_string_range_t, f_string_ranges_t)
+ #define f_macro_string_rangess_t_destroy(status, rangess) f_macro_memory_structures_t_destroy(status, rangess, f_string_range_t, f_string_ranges_t)
- #define f_macro_string_rangess_delete_simple(rangess) f_macro_memory_structures_delete_simple(rangess, f_string_range, f_string_ranges)
- #define f_macro_string_rangess_destroy_simple(rangess) f_macro_memory_structures_destroy_simple(rangess, f_string_range, f_string_ranges)
+ #define f_macro_string_rangess_t_delete_simple(rangess) f_macro_memory_structures_t_delete_simple(rangess, f_string_range_t, f_string_ranges_t)
+ #define f_macro_string_rangess_t_destroy_simple(rangess) f_macro_memory_structures_t_destroy_simple(rangess, f_string_range_t, f_string_ranges_t)
- #define f_macro_string_rangess_resize(status, rangess, new_length) f_macro_memory_structures_resize(status, rangess, f_string_range, f_string_ranges, new_length, f_array_length)
- #define f_macro_string_rangess_adjust(status, rangess, new_length) f_macro_memory_structures_adjust(status, rangess, f_string_range, f_string_ranges, new_length, f_array_length)
-#endif // _di_f_string_rangess_
+ #define f_macro_string_rangess_t_resize(status, rangess, new_length) f_macro_memory_structures_t_resize(status, rangess, f_string_range_t, f_string_ranges_t, new_length, f_array_length_t)
+ #define f_macro_string_rangess_t_adjust(status, rangess, new_length) f_macro_memory_structures_t_adjust(status, rangess, f_string_range_t, f_string_ranges_t, new_length, f_array_length_t)
+#endif // _di_f_string_rangess_t_
#ifdef __cplusplus
} // extern "C"
/**
* Status type.
*/
-#ifndef _di_f_type_status_
- typedef uint16_t f_status;
+#ifndef _di_f_type_status_t_
+ typedef uint16_t f_status_t;
/**
* The c language gives warnings about return types of constants.
* Remove the const for c, but keep it for c++, which is only for function call declarations & prototypes.
- * Do not declare these for the return data types themselves, instead use f_status; only use these for function prototypes and declarations.
+ * Do not declare these for the return data types themselves, instead use f_status_t; only use these for function prototypes and declarations.
*/
#ifdef __cplusplus
- #define f_return_status const f_status
+ #define f_return_status const f_status_t
#else
- #define f_return_status f_status
+ #define f_return_status f_status_t
#endif // __cplusplus
-#endif // _di_f_type_status_
+#endif // _di_f_type_status_t_
/**
* Conditional 128-bit support.
* This should work in GCC, but other compilers this may not be available.
* When not supported, these will fallback to 64-bit.
*/
-#ifndef _di_f_type_int_128_
+#ifndef _di_f_type_int_128_t_
#ifdef __SIZEOF_INT128__
- typedef __int128_t f_int_128;
- typedef __uint128_t f_uint_128;
+ typedef __int128_t f_int_128_t;
+ typedef __uint128_t f_uint_128_t;
#else
- typedef int64_t f_int_128;
- typedef uint64_t f_uint_128;
+ typedef int64_t f_int_128_t;
+ typedef uint64_t f_uint_128_t;
#endif // __SIZEOF_INT128__
-#endif // _di_f_type_int_128_
+#endif // _di_f_type_int_128_t_
/**
* Defines the maximum size to be supported.
#define f_type_size_64_positive 0x7ffffffffffffffe
#define f_type_size_64_unsigned 0xfffffffffffffffe
- #ifndef _di_f_type_int_128_
+ #ifndef _di_f_type_int_128_t_
#define f_type_size_128_negative 0x7fffffffffffffffffffffff
#define f_type_size_128_positive 0x7ffffffffffffffffffffffe
#define f_type_size_128_unsigned 0xfffffffffffffffffffffffe
#define f_type_size_128_negative f_type_size_64_negative
#define f_type_size_128_positive f_type_size_64_positive
#define f_type_size_128_unsigned f_type_size_64_unsigned
- #endif // _di_f_type_int_128_
+ #endif // _di_f_type_int_128_t_
#define f_type_size_max_8_negative 0x80
#define f_type_size_max_8_positive 0x7f
#define f_type_size_max_64_positive 0x7fffffffffffffff
#define f_type_size_max_64_unsigned 0xffffffffffffffff
- #ifndef _di_f_type_int_128_
+ #ifndef _di_f_type_int_128_t_
#define f_type_size_max_128_negative 0x800000000000000000000000
#define f_type_size_max_128_positive 0x7fffffffffffffffffffffff
#define f_type_size_max_128_unsigned 0xffffffffffffffffffffffff
#define f_type_size_max_128_negative f_type_size_max_64_negative
#define f_type_size_max_128_positive f_type_size_max_64_positive
#define f_type_size_max_128_unsigned f_type_size_max_64_unsigned
- #endif // _di_f_type_int_128_
+ #endif // _di_f_type_int_128_t_
#endif // _di_f_type_sizes_
/**
*
* 64-bit is the designed default.
*/
-#ifndef _di_f_type_number_64_
- typedef int64_t f_number_signed;
- typedef uint64_t f_number_unsigned;
+#ifndef _di_f_type_number_64_t_
+ typedef int64_t f_number_signed_t;
+ typedef uint64_t f_number_unsigned_t;
- #define f_type_number_size_unsigned f_type_size_64_unsigned
- #define f_type_number_size_positive f_type_size_64_positive
- #define f_type_number_size_negative f_type_size_64_negative
+ #define f_number_t_size_unsigned f_type_size_64_unsigned
+ #define f_number_t_size_positive f_type_size_64_positive
+ #define f_number_t_size_negative f_type_size_64_negative
- #define f_type_number_size_max_unsigned f_type_size_max_64_unsigned
- #define f_type_number_size_max_positive f_type_size_max_64_positive
- #define f_type_number_size_max_negative f_type_size_max_64_negative
-#endif // _di_f_type_number_64_
+ #define f_number_t_size_max_unsigned f_type_size_max_64_unsigned
+ #define f_number_t_size_max_positive f_type_size_max_64_positive
+ #define f_number_t_size_max_negative f_type_size_max_64_negative
+#endif // _di_f_type_number_64_t_
-#ifdef _en_f_type_number_32_
- typedef int32_t f_number_signed;
- typedef uint32_t f_number_unsigned;
+#ifdef _en_f_type_number_32_t_
+ typedef int32_t f_number_signed_t;
+ typedef uint32_t f_number_unsigned_t;
- #define f_type_number_size_unsigned f_type_size_32_unsigned
- #define f_type_number_size_positive f_type_size_32_positive
- #define f_type_number_size_negative f_type_size_32_negative
+ #define f_number_t_size_unsigned f_type_size_32_unsigned
+ #define f_number_t_size_positive f_type_size_32_positive
+ #define f_number_t_size_negative f_type_size_32_negative
- #define f_type_number_size_max_unsigned f_type_size_max_32_unsigned
- #define f_type_number_size_max_positive f_type_size_max_32_positive
- #define f_type_number_size_max_negative f_type_size_max_32_negative
-#endif // _en_f_type_number_32_
+ #define f_number_t_size_max_unsigned f_type_size_max_32_unsigned
+ #define f_number_t_size_max_positive f_type_size_max_32_positive
+ #define f_number_t_size_max_negative f_type_size_max_32_negative
+#endif // _en_f_type_number_32_t_
-#ifdef _en_f_type_number_128_
- typedef f_int_128 f_number_signed;
- typedef f_uint_128 f_number_unsigned;
+#ifdef _en_f_type_number_128_t_
+ typedef f_int_128_t f_number_signed_t;
+ typedef f_uint_128_t f_number_unsigned_t;
- #define f_type_number_size_unsigned f_type_size_128_unsigned
- #define f_type_number_size_positive f_type_size_128_positive
- #define f_type_number_size_negative f_type_size_128_negative
+ #define f_number_t_size_unsigned f_type_size_128_unsigned
+ #define f_number_t_size_positive f_type_size_128_positive
+ #define f_number_t_size_negative f_type_size_128_negative
- #define f_type_number_size_max_unsigned f_type_size_max_128_unsigned
- #define f_type_number_size_max_positive f_type_size_max_128_positive
- #define f_type_number_size_max_negative f_type_size_max_128_negative
-#endif // _en_f_type_number_128_
+ #define f_number_t_size_max_unsigned f_type_size_max_128_unsigned
+ #define f_number_t_size_max_positive f_type_size_max_128_positive
+ #define f_number_t_size_max_negative f_type_size_max_128_negative
+#endif // _en_f_type_number_128_t_
/**
* Standard Input/Output types.
/**
* Defines a variable to be used by arrays.
*/
-#ifndef _di_f_array_
- typedef f_number_unsigned f_array_length;
+#ifndef _di_f_array_t_
+ typedef f_number_unsigned_t f_array_length_t;
- #define f_array_length_size f_type_number_size_unsigned
- #define f_array_length_size_max f_type_number_size_max_unsigned
-#endif // _di_f_array_
+ #define f_array_length_t_size f_number_t_size_unsigned
+ #define f_array_length_t_size_max f_number_t_size_max_unsigned
+#endif // _di_f_array_t_
/**
* A structure designating a row and column, just like a cell in a table.
* row: the row position.
* column: the column position.
*/
-#ifndef _di_f_cell_
+#ifndef _di_f_cell_t_
typedef struct {
- f_array_length row;
- f_array_length column;
- } f_cell;
+ f_array_length_t row;
+ f_array_length_t column;
+ } f_cell_t;
- #define f_cell_initialize { 0, 0 }
+ #define f_cell_t_initialize { 0, 0 }
- #define f_macro_cell_clear(cell) \
+ #define f_macro_cell_t_clear(cell) \
cell.row = 0; \
cell.column = 0;
-#endif // _di_f_cell_
+#endif // _di_f_cell_t_
/**
* GCC-specific features.
#define f_gcc_attribute_visibility_protected __attribute__((visibility("protected")))
#endif // _di_f_gcc_specific_
-
/**
* A structure representing a set of modes intended to be used by file or directory operations.
*/
-#ifndef _di_f_mode_
+#ifndef _di_f_mode_t_
typedef struct {
mode_t block; // S_IFBLK
mode_t character; // S_IFCHR
mode_t link; // S_IFLNK
mode_t socket; // S_IFSOCK
mode_t unknown;
- } f_mode;
+ } f_mode_t;
- #define f_mode_initialize { \
+ #define f_mode_t_initialize { \
0, \
0, \
0, \
0, \
}
- #define f_macro_mode_set_default(mode) \
+ #define f_macro_mode_t_set_default(mode) \
mode.block = f_file_mode_all_rw; \
mode.character = f_file_mode_all_rw; \
mode.directory = f_file_mode_all_rwx; \
mode.socket = f_file_mode_all_rw; \
mode.unknown = f_file_mode_all_rw;
- #define f_macro_mode_set_default_umask(mode, mask) \
+ #define f_macro_mode_t_set_default_umask(mode, mask) \
mode.block = f_file_mode_all_rw & ~mask; \
mode.character = f_file_mode_all_rw & ~mask; \
mode.directory = f_file_mode_all_rwx & ~mask; \
mode.socket = f_file_mode_all_rw & ~mask; \
mode.unknown = f_file_mode_all_rw & ~mask;
- #define f_macro_mode_set_all(mode, value) \
+ #define f_macro_mode_t_set_all(mode, value) \
mode.block = value; \
mode.character = value; \
mode.directory = value; \
mode.socket = value; \
mode.unknown = value;
- #define f_macro_mode_set_common(mode, value_directory, value_file, value_link) \
+ #define f_macro_mode_t_set_common(mode, value_directory, value_file, value_link) \
mode.directory = value_directory; \
mode.regular = value_file; \
mode.link = value_link;
- #define f_macro_mode_set_uncommon(mode, value_block, value_character, value_fifo, value_socket, value_unknown) \
+ #define f_macro_mode_t_set_uncommon(mode, value_block, value_character, value_fifo, value_socket, value_unknown) \
mode.block = value_block; \
mode.character = value_character; \
mode.fifo = value_fifo; \
* size: Total amount of allocated space.
* used: Total number of allocated spaces used.
*/
-#ifndef _di_f_array_lengths_
+#ifndef _di_f_array_t_lengths_t_
typedef struct {
- f_array_length *array;
+ f_array_length_t *array;
- f_array_length size;
- f_array_length used;
- } f_array_lengths;
+ f_array_length_t size;
+ f_array_length_t used;
+ } f_array_lengths_t;
- #define f_array_lengths_initialize { 0, 0, 0 }
+ #define f_array_lengths_t_initialize { 0, 0, 0 }
- #define f_macro_array_lengths_clear(lengths) f_macro_memory_structure_clear(lengths)
+ #define f_macro_array_lengths_t_clear(lengths) f_macro_memory_structure_t_clear(lengths)
- #define f_macro_array_lengths_new(status, lengths, length) f_macro_memory_structure_new(status, lengths, f_array_length, length)
+ #define f_macro_array_lengths_t_new(status, lengths, length) f_macro_memory_structure_t_new(status, lengths, f_array_length_t, length)
- #define f_macro_array_lengths_delete(status, lengths) f_macro_memory_structure_delete(status, lengths, f_array_length)
- #define f_macro_array_lengths_destroy(status, lengths) f_macro_memory_structure_destroy(status, lengths, f_array_length)
+ #define f_macro_array_lengths_t_delete(status, lengths) f_macro_memory_structure_t_delete(status, lengths, f_array_length_t)
+ #define f_macro_array_lengths_t_destroy(status, lengths) f_macro_memory_structure_t_destroy(status, lengths, f_array_length_t)
- #define f_macro_array_lengths_delete_simple(lengths) f_macro_memory_structure_delete_simple(lengths, f_array_length)
- #define f_macro_array_lengths_destroy_simple(lengths) f_macro_memory_structure_destroy_simple(lengths, f_array_length)
+ #define f_macro_array_lengths_t_delete_simple(lengths) f_macro_memory_structure_t_delete_simple(lengths, f_array_length_t)
+ #define f_macro_array_lengths_t_destroy_simple(lengths) f_macro_memory_structure_t_destroy_simple(lengths, f_array_length_t)
- #define f_macro_array_lengths_resize(status, lengths, new_length) f_macro_memory_structure_resize(status, lengths, f_array_length, new_length)
- #define f_macro_array_lengths_adjust(status, lengths, new_length) f_macro_memory_structure_adjust(status, lengths, f_array_length, new_length)
-#endif // _di_f_array_lengths_
+ #define f_macro_array_lengths_t_resize(status, lengths, new_length) f_macro_memory_structure_t_resize(status, lengths, f_array_length_t, new_length)
+ #define f_macro_array_lengths_t_adjust(status, lengths, new_length) f_macro_memory_structure_t_adjust(status, lengths, f_array_length_t, new_length)
+#endif // _di_f_array_t_lengths_t_
/**
* An array of an array of array lengths.
* size: total amount of allocated space.
* used: total number of allocated spaces used.
*/
-#ifndef _di_f_array_lengthss_
+#ifndef _di_f_array_t_lengthss_t_
typedef struct {
- f_array_lengths *array;
+ f_array_lengths_t *array;
- f_array_length size;
- f_array_length used;
- } f_array_lengthss;
+ f_array_length_t size;
+ f_array_length_t used;
+ } f_array_lengthss_t;
- #define f_array_lengthss_initialize { 0, 0, 0 }
+ #define f_array_lengthss_t_initialize { 0, 0, 0 }
- #define f_macro_array_lengthss_clear(lengths) f_macro_memory_structures_clear(lengths)
+ #define f_macro_array_lengthss_t_clear(lengths) f_macro_memory_structures_t_clear(lengths)
- #define f_macro_array_lengthss_new(status, lengths, length) f_macro_memory_structures_new(status, lengths, f_array_length, length)
+ #define f_macro_array_lengthss_t_new(status, lengths, length) f_macro_memory_structures_t_new(status, lengths, f_array_length_t, length)
- #define f_macro_array_lengthss_delete(status, lengths) f_macro_memory_structures_delete(status, lengths, f_array_length, f_array_lengths)
- #define f_macro_array_lengthss_destroy(status, lengths) f_macro_memory_structures_destroy(status, lengths, f_array_length, f_array_lengths)
+ #define f_macro_array_lengthss_t_delete(status, lengths) f_macro_memory_structures_t_delete(status, lengths, f_array_length_t, f_array_lengths_t)
+ #define f_macro_array_lengthss_t_destroy(status, lengths) f_macro_memory_structures_t_destroy(status, lengths, f_array_length_t, f_array_lengths_t)
- #define f_macro_array_lengthss_delete_simple(lengths) f_macro_memory_structures_delete_simple(lengths, f_array_length, f_array_lengths)
- #define f_macro_array_lengthss_destroy_simple(lengths) f_macro_memory_structures_destroy_simple(lengths, f_array_length, f_array_lengths)
+ #define f_macro_array_lengthss_t_delete_simple(lengths) f_macro_memory_structures_t_delete_simple(lengths, f_array_length_t, f_array_lengths_t)
+ #define f_macro_array_lengthss_t_destroy_simple(lengths) f_macro_memory_structures_t_destroy_simple(lengths, f_array_length_t, f_array_lengths_t)
- #define f_macro_array_lengthss_resize(status, lengths, new_length) f_macro_memory_structures_resize(status, lengths, f_array_length, f_array_lengths, new_length, f_array_length)
- #define f_macro_array_lengthss_adjust(status, lengths, new_length) f_macro_memory_structures_adjust(status, lengths, f_array_length, f_array_lengths, new_length, f_array_length)
-#endif // _di_f_array_lengthss_
+ #define f_macro_array_lengthss_t_resize(status, lengths, new_length) f_macro_memory_structures_t_resize(status, lengths, f_array_length_t, f_array_lengths_t, new_length, f_array_length_t)
+ #define f_macro_array_lengthss_t_adjust(status, lengths, new_length) f_macro_memory_structures_t_adjust(status, lengths, f_array_length_t, f_array_lengths_t, new_length, f_array_length_t)
+#endif // _di_f_array_t_lengthss_t_
/**
- * An array of f_cell.
+ * An array of f_cell_t.
*
- * array: the array of f_cell.
+ * array: the array of f_cell_t.
* size: total amount of allocated space.
* used: total number of allocated spaces used.
*/
-#ifndef _di_f_cells_
+#ifndef _di_f_cells_t_
typedef struct {
- f_cell *array;
+ f_cell_t *array;
- f_array_length size;
- f_array_length used;
- } f_cells;
+ f_array_length_t size;
+ f_array_length_t used;
+ } f_cells_t;
- #define f_cells_initialize {0, 0, 0}
+ #define f_cells_t_initialize {0, 0, 0}
- #define f_macro_cells_clear(ranges) f_macro_memory_structure_clear(ranges)
+ #define f_macro_cells_t_clear(ranges) f_macro_memory_structure_t_clear(ranges)
- #define f_macro_cells_new(status, ranges, length) f_macro_memory_structure_new(status, ranges, f_cell, length)
+ #define f_macro_cells_t_new(status, ranges, length) f_macro_memory_structure_t_new(status, ranges, f_cell_t, length)
- #define f_macro_cells_delete(status, ranges) f_macro_memory_structure_delete(status, ranges, f_cell)
- #define f_macro_cells_destroy(status, ranges) f_macro_memory_structure_destroy(status, ranges, f_cell)
+ #define f_macro_cells_t_delete(status, ranges) f_macro_memory_structure_t_delete(status, ranges, f_cell_t)
+ #define f_macro_cells_t_destroy(status, ranges) f_macro_memory_structure_t_destroy(status, ranges, f_cell_t)
- #define f_macro_cells_delete_simple(ranges) f_macro_memory_structure_delete_simple(ranges, f_cell)
- #define f_macro_cells_destroy_simple(ranges) f_macro_memory_structure_destroy_simple(ranges, f_cell)
+ #define f_macro_cells_t_delete_simple(ranges) f_macro_memory_structure_t_delete_simple(ranges, f_cell_t)
+ #define f_macro_cells_t_destroy_simple(ranges) f_macro_memory_structure_t_destroy_simple(ranges, f_cell_t)
- #define f_macro_cells_resize(status, ranges, new_length) f_macro_memory_structure_resize(status, ranges, f_cell, new_length)
- #define f_macro_cells_adjust(status, ranges, new_length) f_macro_memory_structure_adjust(status, ranges, f_cell, new_length)
-#endif // _di_f_cells_
+ #define f_macro_cells_t_resize(status, ranges, new_length) f_macro_memory_structure_t_resize(status, ranges, f_cell_t, new_length)
+ #define f_macro_cells_t_adjust(status, ranges, new_length) f_macro_memory_structure_t_adjust(status, ranges, f_cell_t, new_length)
+#endif // _di_f_cells_t_
/**
- * This holds an array of f_cells.
+ * This holds an array of f_cells_t.
*
- * array: The array of f_cell arrays.
+ * array: The array of f_cell_t arrays.
* size: Total amount of allocated space.
* used: Total number of allocated spaces used.
*/
-#ifndef _di_f_cellss_
+#ifndef _di_f_cellss_t_
typedef struct {
- f_cells *array;
+ f_cells_t *array;
- f_array_length size;
- f_array_length used;
- } f_cellss;
+ f_array_length_t size;
+ f_array_length_t used;
+ } f_cellss_t;
- #define f_cellss_initialize { 0, 0, 0 }
+ #define f_cellss_t_initialize { 0, 0, 0 }
- #define f_macro_cellss_clear(rangess) f_macro_memory_structures_clear(rangess)
+ #define f_macro_cellss_t_clear(rangess) f_macro_memory_structures_t_clear(rangess)
- #define f_macro_cellss_new(status, rangess, length) f_macro_memory_structures_new(status, rangess, f_cells, length)
+ #define f_macro_cellss_t_new(status, rangess, length) f_macro_memory_structures_t_new(status, rangess, f_cells_t, length)
- #define f_macro_cellss_delete(status, rangess) f_macro_memory_structures_delete(status, rangess, f_cell, f_cells)
- #define f_macro_cellss_destroy(status, rangess) f_macro_memory_structures_destroy(status, rangess, f_cell, f_cells)
+ #define f_macro_cellss_t_delete(status, rangess) f_macro_memory_structures_t_delete(status, rangess, f_cell_t, f_cells_t)
+ #define f_macro_cellss_t_destroy(status, rangess) f_macro_memory_structures_t_destroy(status, rangess, f_cell_t, f_cells_t)
- #define f_macro_cellss_delete_simple(rangess) f_macro_memory_structures_delete_simple(rangess, f_cell, f_cells)
- #define f_macro_cellss_destroy_simple(rangess) f_macro_memory_structures_destroy_simple(rangess, f_cell, f_cells)
+ #define f_macro_cellss_t_delete_simple(rangess) f_macro_memory_structures_t_delete_simple(rangess, f_cell_t, f_cells_t)
+ #define f_macro_cellss_t_destroy_simple(rangess) f_macro_memory_structures_t_destroy_simple(rangess, f_cell_t, f_cells_t)
- #define f_macro_cellss_resize(status, rangess, new_length) f_macro_memory_structures_resize(status, rangess, f_cell, f_cells, new_length, f_array_length)
- #define f_macro_cellss_adjust(status, rangess, new_length) f_macro_memory_structures_adjust(status, rangess, f_cell, f_cells, new_length, f_array_length)
-#endif // _di_f_cellss_
+ #define f_macro_cellss_t_resize(status, rangess, new_length) f_macro_memory_structures_t_resize(status, rangess, f_cell_t, f_cells_t, new_length, f_array_length_t)
+ #define f_macro_cellss_t_adjust(status, rangess, new_length) f_macro_memory_structures_t_adjust(status, rangess, f_cell_t, f_cells_t, new_length, f_array_length_t)
+#endif // _di_f_cellss_t_
/**
* An array of array int8_t.
* size: Total amount of allocated space.
* used: Total number of allocated spaces used.
*/
-#ifndef _di_f_array_int8_t_
+#ifndef _di_f_array_t_int8_t_
typedef struct {
int8_t *array;
- f_array_length size;
- f_array_length used;
- } f_int8_ts;
+ f_array_length_t size;
+ f_array_length_t used;
+ } f_int8s_t;
- #define f_int8_ts_initialize { 0, 0, 0 }
+ #define f_int8s_t_initialize { 0, 0, 0 }
- #define f_macro_int8_ts_clear(numbers) f_macro_memory_structure_clear(numbers)
+ #define f_macro_int8s_t_clear(numbers) f_macro_memory_structure_t_clear(numbers)
- #define f_macro_int8_ts_new(status, numbers, length) f_macro_memory_structure_new(status, numbers, int8_t, length)
+ #define f_macro_int8s_t_new(status, numbers, length) f_macro_memory_structure_t_new(status, numbers, int8_t, length)
- #define f_macro_int8_ts_delete(status, numbers) f_macro_memory_structure_delete(status, numbers, int8_t)
- #define f_macro_int8_ts_destroy(status, numbers) f_macro_memory_structure_destroy(status, numbers, int8_t)
+ #define f_macro_int8s_t_delete(status, numbers) f_macro_memory_structure_t_delete(status, numbers, int8_t)
+ #define f_macro_int8s_t_destroy(status, numbers) f_macro_memory_structure_t_destroy(status, numbers, int8_t)
- #define f_macro_int8_ts_delete_simple(numbers) f_macro_memory_structure_delete_simple(numbers, int8_t)
- #define f_macro_int8_ts_destroy_simple(numbers) f_macro_memory_structure_destroy_simple(numbers, int8_t)
+ #define f_macro_int8s_t_delete_simple(numbers) f_macro_memory_structure_t_delete_simple(numbers, int8_t)
+ #define f_macro_int8s_t_destroy_simple(numbers) f_macro_memory_structure_t_destroy_simple(numbers, int8_t)
- #define f_macro_int8_ts_resize(status, numbers, new_length) f_macro_memory_structure_resize(status, numbers, int8_t, new_length)
- #define f_macro_int8_ts_adjust(status, numbers, new_length) f_macro_memory_structure_adjust(status, numbers, int8_t, new_length)
-#endif // _di_int8_ts_
+ #define f_macro_int8s_t_resize(status, numbers, new_length) f_macro_memory_structure_t_resize(status, numbers, int8_t, new_length)
+ #define f_macro_int8s_t_adjust(status, numbers, new_length) f_macro_memory_structure_t_adjust(status, numbers, int8_t, new_length)
+#endif // _di_int8s_t_
/**
* An array of an array of array int8_t.
* size: total amount of allocated space.
* used: total number of allocated spaces used.
*/
-#ifndef _di_int8_tss_
+#ifndef _di_int8ss_t_
typedef struct {
- f_int8_ts *array;
+ f_int8s_t *array;
- f_array_length size;
- f_array_length used;
- } f_int8_tss;
+ f_array_length_t size;
+ f_array_length_t used;
+ } f_int8ss_t;
- #define f_int8_tss_initialize { 0, 0, 0 }
+ #define f_int8ss_t_initialize { 0, 0, 0 }
- #define f_macro_int8_tss_clear(numbers) f_macro_memory_structures_clear(numbers)
+ #define f_macro_int8ss_t_clear(numbers) f_macro_memory_structures_t_clear(numbers)
- #define f_macro_int8_tss_new(status, numbers, length) f_macro_memory_structures_new(status, numbers, int8_t, length)
+ #define f_macro_int8ss_t_new(status, numbers, length) f_macro_memory_structures_t_new(status, numbers, int8_t, length)
- #define f_macro_int8_tss_delete(status, numbers) f_macro_memory_structures_delete(status, numbers, int8_t, f_int8_ts)
- #define f_macro_int8_tss_destroy(status, numbers) f_macro_memory_structures_destroy(status, numbers, int8_t, f_int8_ts)
+ #define f_macro_int8ss_t_delete(status, numbers) f_macro_memory_structures_t_delete(status, numbers, int8_t, f_int8s_t)
+ #define f_macro_int8ss_t_destroy(status, numbers) f_macro_memory_structures_t_destroy(status, numbers, int8_t, f_int8s_t)
- #define f_macro_int8_tss_delete_simple(numbers) f_macro_memory_structures_delete_simple(numbers, int8_t, f_int8_ts)
- #define f_macro_int8_tss_destroy_simple(numbers) f_macro_memory_structures_destroy_simple(numbers, int8_t, f_int8_ts)
+ #define f_macro_int8ss_t_delete_simple(numbers) f_macro_memory_structures_t_delete_simple(numbers, int8_t, f_int8s_t)
+ #define f_macro_int8ss_t_destroy_simple(numbers) f_macro_memory_structures_t_destroy_simple(numbers, int8_t, f_int8s_t)
- #define f_macro_int8_tss_resize(status, numbers, new_length) f_macro_memory_structures_resize(status, numbers, int8_t, f_int8_ts, new_length, f_array_length)
- #define f_macro_int8_tss_adjust(status, numbers, new_length) f_macro_memory_structures_adjust(status, numbers, int8_t, f_int8_ts, new_length, f_array_length)
-#endif // _di_int8_tss_
+ #define f_macro_int8ss_t_resize(status, numbers, new_length) f_macro_memory_structures_t_resize(status, numbers, int8_t, f_int8s_t, new_length, f_array_length_t)
+ #define f_macro_int8ss_t_adjust(status, numbers, new_length) f_macro_memory_structures_t_adjust(status, numbers, int8_t, f_int8s_t, new_length, f_array_length_t)
+#endif // _di_int8ss_t_
/**
* An array of array uint8_t.
* size: Total amount of allocated space.
* used: Total number of allocated spaces used.
*/
-#ifndef _di_uint8_ts_
+#ifndef _di_uint8s_t_
typedef struct {
uint8_t *array;
- f_array_length size;
- f_array_length used;
- } f_uint8_ts;
+ f_array_length_t size;
+ f_array_length_t used;
+ } f_uint8s_t;
- #define f_uint8_ts_initialize { 0, 0, 0 }
+ #define f_uint8s_t_initialize { 0, 0, 0 }
- #define f_macro_uint8_ts_clear(numbers) f_macro_memory_structure_clear(numbers)
+ #define f_macro_uint8s_t_clear(numbers) f_macro_memory_structure_t_clear(numbers)
- #define f_macro_uint8_ts_new(status, numbers, length) f_macro_memory_structure_new(status, numbers, uint8_t, length)
+ #define f_macro_uint8s_t_new(status, numbers, length) f_macro_memory_structure_t_new(status, numbers, uint8_t, length)
- #define f_macro_uint8_ts_delete(status, numbers) f_macro_memory_structure_delete(status, numbers, uint8_t)
- #define f_macro_uint8_ts_destroy(status, numbers) f_macro_memory_structure_destroy(status, numbers, uint8_t)
+ #define f_macro_uint8s_t_delete(status, numbers) f_macro_memory_structure_t_delete(status, numbers, uint8_t)
+ #define f_macro_uint8s_t_destroy(status, numbers) f_macro_memory_structure_t_destroy(status, numbers, uint8_t)
- #define f_macro_uint8_ts_delete_simple(numbers) f_macro_memory_structure_delete_simple(numbers, uint8_t)
- #define f_macro_uint8_ts_destroy_simple(numbers) f_macro_memory_structure_destroy_simple(numbers, uint8_t)
+ #define f_macro_uint8s_t_delete_simple(numbers) f_macro_memory_structure_t_delete_simple(numbers, uint8_t)
+ #define f_macro_uint8s_t_destroy_simple(numbers) f_macro_memory_structure_t_destroy_simple(numbers, uint8_t)
- #define f_macro_uint8_ts_resize(status, numbers, new_length) f_macro_memory_structure_resize(status, numbers, uint8_t, new_length)
- #define f_macro_uint8_ts_adjust(status, numbers, new_length) f_macro_memory_structure_adjust(status, numbers, uint8_t, new_length)
-#endif // _di_uint8_ts_
+ #define f_macro_uint8s_t_resize(status, numbers, new_length) f_macro_memory_structure_t_resize(status, numbers, uint8_t, new_length)
+ #define f_macro_uint8s_t_adjust(status, numbers, new_length) f_macro_memory_structure_t_adjust(status, numbers, uint8_t, new_length)
+#endif // _di_uint8s_t_
/**
* An array of an array of array uint8_t.
* size: total amount of allocated space.
* used: total number of allocated spaces used.
*/
-#ifndef _di_uint8_tss_
+#ifndef _di_uint8ss_t_
typedef struct {
- f_uint8_ts *array;
+ f_uint8s_t *array;
- f_array_length size;
- f_array_length used;
- } f_uint8_tss;
+ f_array_length_t size;
+ f_array_length_t used;
+ } f_uint8ss_t;
- #define f_uint8_tss_initialize { 0, 0, 0 }
+ #define f_uint8ss_t_initialize { 0, 0, 0 }
- #define f_macro_uint8_tss_clear(numbers) f_macro_memory_structures_clear(numbers)
+ #define f_macro_uint8ss_t_clear(numbers) f_macro_memory_structures_t_clear(numbers)
- #define f_macro_uint8_tss_new(status, numbers, length) f_macro_memory_structures_new(status, numbers, uint8_t, length)
+ #define f_macro_uint8ss_t_new(status, numbers, length) f_macro_memory_structures_t_new(status, numbers, uint8_t, length)
- #define f_macro_uint8_tss_delete(status, numbers) f_macro_memory_structures_delete(status, numbers, uint8_t, f_uint8_ts)
- #define f_macro_uint8_tss_destroy(status, numbers) f_macro_memory_structures_destroy(status, numbers, uint8_t, f_uint8_ts)
+ #define f_macro_uint8ss_t_delete(status, numbers) f_macro_memory_structures_t_delete(status, numbers, uint8_t, f_uint8s_t)
+ #define f_macro_uint8ss_t_delete(status, numbers) f_macro_memory_structures_t_delete(status, numbers, uint8_t, f_uint8s_t)
+ #define f_macro_uint8ss_t_destroy(status, numbers) f_macro_memory_structures_t_destroy(status, numbers, uint8_t, f_uint8s_t)
- #define f_macro_uint8_tss_delete_simple(numbers) f_macro_memory_structures_delete_simple(numbers, uint8_t, f_uint8_ts)
- #define f_macro_uint8_tss_destroy_simple(numbers) f_macro_memory_structures_destroy_simple(numbers, uint8_t, f_uint8_ts)
+ #define f_macro_uint8ss_t_delete_simple(numbers) f_macro_memory_structures_t_delete_simple(numbers, uint8_t, f_uint8s_t)
+ #define f_macro_uint8ss_t_destroy_simple(numbers) f_macro_memory_structures_t_destroy_simple(numbers, uint8_t, f_uint8s_t)
- #define f_macro_uint8_tss_resize(status, numbers, new_length) f_macro_memory_structures_resize(status, numbers, uint8_t, f_uint8_ts, new_length, f_array_length)
- #define f_macro_uint8_tss_adjust(status, numbers, new_length) f_macro_memory_structures_adjust(status, numbers, uint8_t, f_uint8_ts, new_length, f_array_length)
-#endif // _di_uint8_tss_
+ #define f_macro_uint8ss_t_resize(status, numbers, new_length) f_macro_memory_structures_t_resize(status, numbers, uint8_t, f_uint8s_t, new_length, f_array_length_t)
+ #define f_macro_uint8ss_t_adjust(status, numbers, new_length) f_macro_memory_structures_t_adjust(status, numbers, uint8_t, f_uint8s_t, new_length, f_array_length_t)
+#endif // _di_uint8ss_t_
/**
* An array of array int16_t.
* size: Total amount of allocated space.
* used: Total number of allocated spaces used.
*/
-#ifndef _di_int16_ts_
+#ifndef _di_int16s_t_
typedef struct {
int16_t *array;
- f_array_length size;
- f_array_length used;
- } f_int16_ts;
+ f_array_length_t size;
+ f_array_length_t used;
+ } f_int16s_t;
- #define f_int16_ts_initialize { 0, 0, 0 }
+ #define f_int16s_t_initialize { 0, 0, 0 }
- #define f_macro_int16_ts_clear(numbers) f_macro_memory_structure_clear(numbers)
+ #define f_macro_int16s_t_clear(numbers) f_macro_memory_structure_t_clear(numbers)
- #define f_macro_int16_ts_new(status, numbers, length) f_macro_memory_structure_new(status, numbers, int16_t, length)
+ #define f_macro_int16s_t_new(status, numbers, length) f_macro_memory_structure_t_new(status, numbers, int16_t, length)
- #define f_macro_int16_ts_delete(status, numbers) f_macro_memory_structure_delete(status, numbers, int16_t)
- #define f_macro_int16_ts_destroy(status, numbers) f_macro_memory_structure_destroy(status, numbers, int16_t)
+ #define f_macro_int16s_t_delete(status, numbers) f_macro_memory_structure_t_delete(status, numbers, int16_t)
+ #define f_macro_int16s_t_destroy(status, numbers) f_macro_memory_structure_t_destroy(status, numbers, int16_t)
- #define f_macro_int16_ts_delete_simple(numbers) f_macro_memory_structure_delete_simple(numbers, int16_t)
- #define f_macro_int16_ts_destroy_simple(numbers) f_macro_memory_structure_destroy_simple(numbers, int16_t)
+ #define f_macro_int16s_t_delete_simple(numbers) f_macro_memory_structure_t_delete_simple(numbers, int16_t)
+ #define f_macro_int16s_t_destroy_simple(numbers) f_macro_memory_structure_t_destroy_simple(numbers, int16_t)
- #define f_macro_int16_ts_resize(status, numbers, new_length) f_macro_memory_structure_resize(status, numbers, int16_t, new_length)
- #define f_macro_int16_ts_adjust(status, numbers, new_length) f_macro_memory_structure_adjust(status, numbers, int16_t, new_length)
-#endif // _di_int16_ts_
+ #define f_macro_int16s_t_resize(status, numbers, new_length) f_macro_memory_structure_t_resize(status, numbers, int16_t, new_length)
+ #define f_macro_int16s_t_adjust(status, numbers, new_length) f_macro_memory_structure_t_adjust(status, numbers, int16_t, new_length)
+#endif // _di_int16s_t_
/**
* An array of an array of array int16_t.
* size: total amount of allocated space.
* used: total number of allocated spaces used.
*/
-#ifndef _di_int16_tss_
+#ifndef _di_int16ss_t_
typedef struct {
- f_int16_ts *array;
+ f_int16s_t *array;
- f_array_length size;
- f_array_length used;
- } f_int16_tss;
+ f_array_length_t size;
+ f_array_length_t used;
+ } f_int16ss_t;
- #define f_int16_tss_initialize { 0, 0, 0 }
+ #define f_int16ss_t_initialize { 0, 0, 0 }
- #define f_macro_int16_tss_clear(numbers) f_macro_memory_structures_clear(numbers)
+ #define f_macro_int16ss_t_clear(numbers) f_macro_memory_structures_t_clear(numbers)
- #define f_macro_int16_tss_new(status, numbers, length) f_macro_memory_structures_new(status, numbers, int16_t, length)
+ #define f_macro_int16ss_t_new(status, numbers, length) f_macro_memory_structures_t_new(status, numbers, int16_t, length)
- #define f_macro_int16_tss_delete(status, numbers) f_macro_memory_structures_delete(status, numbers, int16_t, f_int16_ts)
- #define f_macro_int16_tss_destroy(status, numbers) f_macro_memory_structures_destroy(status, numbers, int16_t, f_int16_ts)
+ #define f_macro_int16ss_t_delete(status, numbers) f_macro_memory_structures_t_delete(status, numbers, int16_t, f_int16s_t)
+ #define f_macro_int16ss_t_destroy(status, numbers) f_macro_memory_structures_t_destroy(status, numbers, int16_t, f_int16s_t)
- #define f_macro_int16_tss_delete_simple(numbers) f_macro_memory_structures_delete_simple(numbers, int16_t, f_int16_ts)
- #define f_macro_int16_tss_destroy_simple(numbers) f_macro_memory_structures_destroy_simple(numbers, int16_t, f_int16_ts)
+ #define f_macro_int16ss_t_delete_simple(numbers) f_macro_memory_structures_t_delete_simple(numbers, int16_t, f_int16s_t)
+ #define f_macro_int16ss_t_destroy_simple(numbers) f_macro_memory_structures_t_destroy_simple(numbers, int16_t, f_int16s_t)
- #define f_macro_int16_tss_resize(status, numbers, new_length) f_macro_memory_structures_resize(status, numbers, int16_t, f_int16_ts, new_length, f_array_length)
- #define f_macro_int16_tss_adjust(status, numbers, new_length) f_macro_memory_structures_adjust(status, numbers, int16_t, f_int16_ts, new_length, f_array_length)
-#endif // _di_int16_tss_
+ #define f_macro_int16ss_t_resize(status, numbers, new_length) f_macro_memory_structures_t_resize(status, numbers, int16_t, f_int16s_t, new_length, f_array_length_t)
+ #define f_macro_int16ss_t_adjust(status, numbers, new_length) f_macro_memory_structures_t_adjust(status, numbers, int16_t, f_int16s_t, new_length, f_array_length_t)
+#endif // _di_int16ss_t_
/**
* An array of array uint16_t.
* size: Total amount of allocated space.
* used: Total number of allocated spaces used.
*/
-#ifndef _di_uint16_ts_
+#ifndef _di_uint16s_t_
typedef struct {
uint16_t *array;
- f_array_length size;
- f_array_length used;
- } f_uint16_ts;
+ f_array_length_t size;
+ f_array_length_t used;
+ } f_uint16s_t;
- #define f_uint16_ts_initialize { 0, 0, 0 }
+ #define f_uint16s_t_initialize { 0, 0, 0 }
- #define f_macro_uint16_ts_clear(numbers) f_macro_memory_structure_clear(numbers)
+ #define f_macro_uint16s_t_clear(numbers) f_macro_memory_structure_t_clear(numbers)
- #define f_macro_uint16_ts_new(status, numbers, length) f_macro_memory_structure_new(status, numbers, uint16_t, length)
+ #define f_macro_uint16s_t_new(status, numbers, length) f_macro_memory_structure_t_new(status, numbers, uint16_t, length)
- #define f_macro_uint16_ts_delete(status, numbers) f_macro_memory_structure_delete(status, numbers, uint16_t)
- #define f_macro_uint16_ts_destroy(status, numbers) f_macro_memory_structure_destroy(status, numbers, uint16_t)
+ #define f_macro_uint16s_t_delete(status, numbers) f_macro_memory_structure_t_delete(status, numbers, uint16_t)
+ #define f_macro_uint16s_t_destroy(status, numbers) f_macro_memory_structure_t_destroy(status, numbers, uint16_t)
- #define f_macro_uint16_ts_delete_simple(numbers) f_macro_memory_structure_delete_simple(numbers, uint16_t)
- #define f_macro_uint16_ts_destroy_simple(numbers) f_macro_memory_structure_destroy_simple(numbers, uint16_t)
+ #define f_macro_uint16s_t_delete_simple(numbers) f_macro_memory_structure_t_delete_simple(numbers, uint16_t)
+ #define f_macro_uint16s_t_destroy_simple(numbers) f_macro_memory_structure_t_destroy_simple(numbers, uint16_t)
- #define f_macro_uint16_ts_resize(status, numbers, new_length) f_macro_memory_structure_resize(status, numbers, uint16_t, new_length)
- #define f_macro_uint16_ts_adjust(status, numbers, new_length) f_macro_memory_structure_adjust(status, numbers, uint16_t, new_length)
-#endif // _di_uint16_ts_
+ #define f_macro_uint16s_t_resize(status, numbers, new_length) f_macro_memory_structure_t_resize(status, numbers, uint16_t, new_length)
+ #define f_macro_uint16s_t_adjust(status, numbers, new_length) f_macro_memory_structure_t_adjust(status, numbers, uint16_t, new_length)
+#endif // _di_uint16s_t_
/**
* An array of an array of array uint16_t.
* size: total amount of allocated space.
* used: total number of allocated spaces used.
*/
-#ifndef _di_uint16_tss_
+#ifndef _di_uint16ss_t_
typedef struct {
- f_uint16_ts *array;
+ f_uint16s_t *array;
- f_array_length size;
- f_array_length used;
- } f_uint16_tss;
+ f_array_length_t size;
+ f_array_length_t used;
+ } f_uint16ss_t;
- #define f_uint16_tss_initialize { 0, 0, 0 }
+ #define f_uint16ss_t_initialize { 0, 0, 0 }
- #define f_macro_uint16_tss_clear(numbers) f_macro_memory_structures_clear(numbers)
+ #define f_macro_uint16ss_t_clear(numbers) f_macro_memory_structures_t_clear(numbers)
- #define f_macro_uint16_tss_new(status, numbers, length) f_macro_memory_structures_new(status, numbers, uint16_t, length)
+ #define f_macro_uint16ss_t_new(status, numbers, length) f_macro_memory_structures_t_new(status, numbers, uint16_t, length)
- #define f_macro_uint16_tss_delete(status, numbers) f_macro_memory_structures_delete(status, numbers, uint16_t, f_uint16_ts)
- #define f_macro_uint16_tss_destroy(status, numbers) f_macro_memory_structures_destroy(status, numbers, uint16_t, f_uint16_ts)
+ #define f_macro_uint16ss_t_delete(status, numbers) f_macro_memory_structures_t_delete(status, numbers, uint16_t, f_uint16s_t)
+ #define f_macro_uint16ss_t_destroy(status, numbers) f_macro_memory_structures_t_destroy(status, numbers, uint16_t, f_uint16s_t)
- #define f_macro_uint16_tss_delete_simple(numbers) f_macro_memory_structures_delete_simple(numbers, uint16_t, f_uint16_ts)
- #define f_macro_uint16_tss_destroy_simple(numbers) f_macro_memory_structures_destroy_simple(numbers, uint16_t, f_uint16_ts)
+ #define f_macro_uint16ss_t_delete_simple(numbers) f_macro_memory_structures_t_delete_simple(numbers, uint16_t, f_uint16s_t)
+ #define f_macro_uint16ss_t_destroy_simple(numbers) f_macro_memory_structures_t_destroy_simple(numbers, uint16_t, f_uint16s_t)
- #define f_macro_uint16_tss_resize(status, numbers, new_length) f_macro_memory_structures_resize(status, numbers, uint16_t, f_uint16_ts, new_length, f_array_length)
- #define f_macro_uint16_tss_adjust(status, numbers, new_length) f_macro_memory_structures_adjust(status, numbers, uint16_t, f_uint16_ts, new_length, f_array_length)
-#endif // _di_uint16_tss_
+ #define f_macro_uint16ss_t_resize(status, numbers, new_length) f_macro_memory_structures_t_resize(status, numbers, uint16_t, f_uint16s_t, new_length, f_array_length_t)
+ #define f_macro_uint16ss_t_adjust(status, numbers, new_length) f_macro_memory_structures_t_adjust(status, numbers, uint16_t, f_uint16s_t, new_length, f_array_length_t)
+#endif // _di_uint16ss_t_
/**
* An array of array int32_t.
* size: Total amount of allocated space.
* used: Total number of allocated spaces used.
*/
-#ifndef _di_int32_ts_
+#ifndef _di_int32s_t_
typedef struct {
int32_t *array;
- f_array_length size;
- f_array_length used;
- } f_int32_ts;
+ f_array_length_t size;
+ f_array_length_t used;
+ } f_int32s_t;
- #define f_int32_ts_initialize { 0, 0, 0 }
+ #define f_int32s_t_initialize { 0, 0, 0 }
- #define f_macro_int32_ts_clear(numbers) f_macro_memory_structure_clear(numbers)
+ #define f_macro_int32s_t_clear(numbers) f_macro_memory_structure_t_clear(numbers)
- #define f_macro_int32_ts_new(status, numbers, length) f_macro_memory_structure_new(status, numbers, int32_t, length)
+ #define f_macro_int32s_t_new(status, numbers, length) f_macro_memory_structure_t_new(status, numbers, int32_t, length)
- #define f_macro_int32_ts_delete(status, numbers) f_macro_memory_structure_delete(status, numbers, int32_t)
- #define f_macro_int32_ts_destroy(status, numbers) f_macro_memory_structure_destroy(status, numbers, int32_t)
+ #define f_macro_int32s_t_delete(status, numbers) f_macro_memory_structure_t_delete(status, numbers, int32_t)
+ #define f_macro_int32s_t_destroy(status, numbers) f_macro_memory_structure_t_destroy(status, numbers, int32_t)
- #define f_macro_int32_ts_delete_simple(numbers) f_macro_memory_structure_delete_simple(numbers, int32_t)
- #define f_macro_int32_ts_destroy_simple(numbers) f_macro_memory_structure_destroy_simple(numbers, int32_t)
+ #define f_macro_int32s_t_delete_simple(numbers) f_macro_memory_structure_t_delete_simple(numbers, int32_t)
+ #define f_macro_int32s_t_destroy_simple(numbers) f_macro_memory_structure_t_destroy_simple(numbers, int32_t)
- #define f_macro_int32_ts_resize(status, numbers, new_length) f_macro_memory_structure_resize(status, numbers, int32_t, new_length)
- #define f_macro_int32_ts_adjust(status, numbers, new_length) f_macro_memory_structure_adjust(status, numbers, int32_t, new_length)
-#endif // _di_int32_ts_
+ #define f_macro_int32s_t_resize(status, numbers, new_length) f_macro_memory_structure_t_resize(status, numbers, int32_t, new_length)
+ #define f_macro_int32s_t_adjust(status, numbers, new_length) f_macro_memory_structure_t_adjust(status, numbers, int32_t, new_length)
+#endif // _di_int32s_t_
/**
* An array of an array of array int32_t.
* size: total amount of allocated space.
* used: total number of allocated spaces used.
*/
-#ifndef _di_int32_tss_
+#ifndef _di_int32ss_t_
typedef struct {
- f_int32_ts *array;
+ f_int32s_t *array;
- f_array_length size;
- f_array_length used;
- } f_int32_tss;
+ f_array_length_t size;
+ f_array_length_t used;
+ } f_int32ss_t;
- #define f_int32_tss_initialize { 0, 0, 0 }
+ #define f_int32ss_t_initialize { 0, 0, 0 }
- #define f_macro_int32_tss_clear(numbers) f_macro_memory_structures_clear(numbers)
+ #define f_macro_int32ss_t_clear(numbers) f_macro_memory_structures_t_clear(numbers)
- #define f_macro_int32_tss_new(status, numbers, length) f_macro_memory_structures_new(status, numbers, int32_t, length)
+ #define f_macro_int32ss_t_new(status, numbers, length) f_macro_memory_structures_t_new(status, numbers, int32_t, length)
- #define f_macro_int32_tss_delete(status, numbers) f_macro_memory_structures_delete(status, numbers, int32_t, f_int32_ts)
- #define f_macro_int32_tss_destroy(status, numbers) f_macro_memory_structures_destroy(status, numbers, int32_t, f_int32_ts)
+ #define f_macro_int32ss_t_delete(status, numbers) f_macro_memory_structures_t_delete(status, numbers, int32_t, f_int32s_t)
+ #define f_macro_int32ss_t_destroy(status, numbers) f_macro_memory_structures_t_destroy(status, numbers, int32_t, f_int32s_t)
- #define f_macro_int32_tss_delete_simple(numbers) f_macro_memory_structures_delete_simple(numbers, int32_t, f_int32_ts)
- #define f_macro_int32_tss_destroy_simple(numbers) f_macro_memory_structures_destroy_simple(numbers, int32_t, f_int32_ts)
+ #define f_macro_int32ss_t_delete_simple(numbers) f_macro_memory_structures_t_delete_simple(numbers, int32_t, f_int32s_t)
+ #define f_macro_int32ss_t_destroy_simple(numbers) f_macro_memory_structures_t_destroy_simple(numbers, int32_t, f_int32s_t)
- #define f_macro_int32_tss_resize(status, numbers, new_length) f_macro_memory_structures_resize(status, numbers, int32_t, f_int32_ts, new_length, f_array_length)
- #define f_macro_int32_tss_adjust(status, numbers, new_length) f_macro_memory_structures_adjust(status, numbers, int32_t, f_int32_ts, new_length, f_array_length)
-#endif // _di_int32_tss_
+ #define f_macro_int32ss_t_resize(status, numbers, new_length) f_macro_memory_structures_t_resize(status, numbers, int32_t, f_int32s_t, new_length, f_array_length_t)
+ #define f_macro_int32ss_t_adjust(status, numbers, new_length) f_macro_memory_structures_t_adjust(status, numbers, int32_t, f_int32s_t, new_length, f_array_length_t)
+#endif // _di_int32ss_t_
/**
* An array of array uint32_t.
* size: Total amount of allocated space.
* used: Total number of allocated spaces used.
*/
-#ifndef _di_uint32_ts_
+#ifndef _di_uint32s_t_
typedef struct {
uint32_t *array;
- f_array_length size;
- f_array_length used;
- } f_uint32_ts;
+ f_array_length_t size;
+ f_array_length_t used;
+ } f_uint32s_t;
- #define f_uint32_ts_initialize { 0, 0, 0 }
+ #define f_uint32s_t_initialize { 0, 0, 0 }
- #define f_macro_uint32_ts_clear(numbers) f_macro_memory_structure_clear(numbers)
+ #define f_macro_uint32s_t_clear(numbers) f_macro_memory_structure_t_clear(numbers)
- #define f_macro_uint32_ts_new(status, numbers, length) f_macro_memory_structure_new(status, numbers, uint32_t, length)
+ #define f_macro_uint32s_t_new(status, numbers, length) f_macro_memory_structure_t_new(status, numbers, uint32_t, length)
- #define f_macro_uint32_ts_delete(status, numbers) f_macro_memory_structure_delete(status, numbers, uint32_t)
- #define f_macro_uint32_ts_destroy(status, numbers) f_macro_memory_structure_destroy(status, numbers, uint32_t)
+ #define f_macro_uint32s_t_delete(status, numbers) f_macro_memory_structure_t_delete(status, numbers, uint32_t)
+ #define f_macro_uint32s_t_destroy(status, numbers) f_macro_memory_structure_t_destroy(status, numbers, uint32_t)
- #define f_macro_uint32_ts_delete_simple(numbers) f_macro_memory_structure_delete_simple(numbers, uint32_t)
- #define f_macro_uint32_ts_destroy_simple(numbers) f_macro_memory_structure_destroy_simple(numbers, uint32_t)
+ #define f_macro_uint32s_t_delete_simple(numbers) f_macro_memory_structure_t_delete_simple(numbers, uint32_t)
+ #define f_macro_uint32s_t_destroy_simple(numbers) f_macro_memory_structure_t_destroy_simple(numbers, uint32_t)
- #define f_macro_uint32_ts_resize(status, numbers, new_length) f_macro_memory_structure_resize(status, numbers, uint32_t, new_length)
- #define f_macro_uint32_ts_adjust(status, numbers, new_length) f_macro_memory_structure_adjust(status, numbers, uint32_t, new_length)
-#endif // _di_uint32_ts_
+ #define f_macro_uint32s_t_resize(status, numbers, new_length) f_macro_memory_structure_t_resize(status, numbers, uint32_t, new_length)
+ #define f_macro_uint32s_t_adjust(status, numbers, new_length) f_macro_memory_structure_t_adjust(status, numbers, uint32_t, new_length)
+#endif // _di_uint32s_t_
/**
* An array of an array of array uint32_t.
* size: total amount of allocated space.
* used: total number of allocated spaces used.
*/
-#ifndef _di_uint32_tss_
+#ifndef _di_uint32ss_t_
typedef struct {
- f_uint32_ts *array;
+ f_uint32s_t *array;
- f_array_length size;
- f_array_length used;
- } f_uint32_tss;
+ f_array_length_t size;
+ f_array_length_t used;
+ } f_uint32ss_t;
- #define f_uint32_tss_initialize { 0, 0, 0 }
+ #define f_uint32ss_t_initialize { 0, 0, 0 }
- #define f_macro_uint32_tss_clear(numbers) f_macro_memory_structures_clear(numbers)
+ #define f_macro_uint32ss_t_clear(numbers) f_macro_memory_structures_t_clear(numbers)
- #define f_macro_uint32_tss_new(status, numbers, length) f_macro_memory_structures_new(status, numbers, uint32_t, length)
+ #define f_macro_uint32ss_t_new(status, numbers, length) f_macro_memory_structures_t_new(status, numbers, uint32_t, length)
- #define f_macro_uint32_tss_delete(status, numbers) f_macro_memory_structures_delete(status, numbers, uint32_t, f_uint32_ts)
- #define f_macro_uint32_tss_destroy(status, numbers) f_macro_memory_structures_destroy(status, numbers, uint32_t, f_uint32_ts)
+ #define f_macro_uint32ss_t_delete(status, numbers) f_macro_memory_structures_t_delete(status, numbers, uint32_t, f_uint32s_t)
+ #define f_macro_uint32ss_t_destroy(status, numbers) f_macro_memory_structures_t_destroy(status, numbers, uint32_t, f_uint32s_t)
- #define f_macro_uint32_tss_delete_simple(numbers) f_macro_memory_structures_delete_simple(numbers, uint32_t, f_uint32_ts)
- #define f_macro_uint32_tss_destroy_simple(numbers) f_macro_memory_structures_destroy_simple(numbers, uint32_t, f_uint32_ts)
+ #define f_macro_uint32ss_t_delete_simple(numbers) f_macro_memory_structures_t_delete_simple(numbers, uint32_t, f_uint32s_t)
+ #define f_macro_uint32ss_t_destroy_simple(numbers) f_macro_memory_structures_t_destroy_simple(numbers, uint32_t, f_uint32s_t)
- #define f_macro_uint32_tss_resize(status, numbers, new_length) f_macro_memory_structures_resize(status, numbers, uint32_t, f_uint32_ts, new_length, f_array_length)
- #define f_macro_uint32_tss_adjust(status, numbers, new_length) f_macro_memory_structures_adjust(status, numbers, uint32_t, f_uint32_ts, new_length, f_array_length)
-#endif // _di_uint32_tss_
+ #define f_macro_uint32ss_t_resize(status, numbers, new_length) f_macro_memory_structures_t_resize(status, numbers, uint32_t, f_uint32s_t, new_length, f_array_length_t)
+ #define f_macro_uint32ss_t_adjust(status, numbers, new_length) f_macro_memory_structures_t_adjust(status, numbers, uint32_t, f_uint32s_t, new_length, f_array_length_t)
+#endif // _di_uint32ss_t_
/**
* An array of array int64_t.
* size: Total amount of allocated space.
* used: Total number of allocated spaces used.
*/
-#ifndef _di_int64_ts_
+#ifndef _di_int64s_t_
typedef struct {
int64_t *array;
- f_array_length size;
- f_array_length used;
- } f_int64_ts;
+ f_array_length_t size;
+ f_array_length_t used;
+ } f_int64s_t;
#define f_int64_ts_initialize { 0, 0, 0 }
- #define f_macro_int64_ts_clear(numbers) f_macro_memory_structure_clear(numbers)
+ #define f_macro_int64_ts_clear(numbers) f_macro_memory_structure_t_clear(numbers)
- #define f_macro_int64_ts_new(status, numbers, length) f_macro_memory_structure_new(status, numbers, int64_t, length)
+ #define f_macro_int64_ts_new(status, numbers, length) f_macro_memory_structure_t_new(status, numbers, int64_t, length)
- #define f_macro_int64_ts_delete(status, numbers) f_macro_memory_structure_delete(status, numbers, int64_t)
- #define f_macro_int64_ts_destroy(status, numbers) f_macro_memory_structure_destroy(status, numbers, int64_t)
+ #define f_macro_int64_ts_delete(status, numbers) f_macro_memory_structure_t_delete(status, numbers, int64_t)
+ #define f_macro_int64_ts_destroy(status, numbers) f_macro_memory_structure_t_destroy(status, numbers, int64_t)
- #define f_macro_int64_ts_delete_simple(numbers) f_macro_memory_structure_delete_simple(numbers, int64_t)
- #define f_macro_int64_ts_destroy_simple(numbers) f_macro_memory_structure_destroy_simple(numbers, int64_t)
+ #define f_macro_int64_ts_delete_simple(numbers) f_macro_memory_structure_t_delete_simple(numbers, int64_t)
+ #define f_macro_int64_ts_destroy_simple(numbers) f_macro_memory_structure_t_destroy_simple(numbers, int64_t)
- #define f_macro_int64_ts_resize(status, numbers, new_length) f_macro_memory_structure_resize(status, numbers, int64_t, new_length)
- #define f_macro_int64_ts_adjust(status, numbers, new_length) f_macro_memory_structure_adjust(status, numbers, int64_t, new_length)
-#endif // _di_int64_ts_
+ #define f_macro_int64_ts_resize(status, numbers, new_length) f_macro_memory_structure_t_resize(status, numbers, int64_t, new_length)
+ #define f_macro_int64_ts_adjust(status, numbers, new_length) f_macro_memory_structure_t_adjust(status, numbers, int64_t, new_length)
+#endif // _di_int64s_t_
/**
* An array of an array of array int64_t.
* size: total amount of allocated space.
* used: total number of allocated spaces used.
*/
-#ifndef _di_int64_tss_
+#ifndef _di_int64ss_t_
typedef struct {
- f_int64_ts *array;
+ f_int64s_t *array;
- f_array_length size;
- f_array_length used;
- } f_int64_tss;
+ f_array_length_t size;
+ f_array_length_t used;
+ } f_int64ss_t;
- #define f_int64_tss_initialize { 0, 0, 0 }
+ #define f_int64ss_t_initialize { 0, 0, 0 }
- #define f_macro_int64_tss_clear(numbers) f_macro_memory_structures_clear(numbers)
+ #define f_macro_int64ss_t_clear(numbers) f_macro_memory_structures_t_clear(numbers)
- #define f_macro_int64_tss_new(status, numbers, length) f_macro_memory_structures_new(status, numbers, int64_t, length)
+ #define f_macro_int64ss_t_new(status, numbers, length) f_macro_memory_structures_t_new(status, numbers, int64_t, length)
- #define f_macro_int64_tss_delete(status, numbers) f_macro_memory_structures_delete(status, numbers, int64_t, f_int64_ts)
- #define f_macro_int64_tss_destroy(status, numbers) f_macro_memory_structures_destroy(status, numbers, int64_t, f_int64_ts)
+ #define f_macro_int64ss_t_delete(status, numbers) f_macro_memory_structures_t_delete(status, numbers, int64_t, f_int64s_t)
+ #define f_macro_int64ss_t_destroy(status, numbers) f_macro_memory_structures_t_destroy(status, numbers, int64_t, f_int64s_t)
- #define f_macro_int64_tss_delete_simple(numbers) f_macro_memory_structures_delete_simple(numbers, int64_t, f_int64_ts)
- #define f_macro_int64_tss_destroy_simple(numbers) f_macro_memory_structures_destroy_simple(numbers, int64_t, f_int64_ts)
+ #define f_macro_int64ss_t_delete_simple(numbers) f_macro_memory_structures_t_delete_simple(numbers, int64_t, f_int64s_t)
+ #define f_macro_int64ss_t_destroy_simple(numbers) f_macro_memory_structures_t_destroy_simple(numbers, int64_t, f_int64s_t)
- #define f_macro_int64_tss_resize(status, numbers, new_length) f_macro_memory_structures_resize(status, numbers, int64_t, f_int64_ts, new_length, f_array_length)
- #define f_macro_int64_tss_adjust(status, numbers, new_length) f_macro_memory_structures_adjust(status, numbers, int64_t, f_int64_ts, new_length, f_array_length)
-#endif // _di_int64_tss_
+ #define f_macro_int64ss_t_resize(status, numbers, new_length) f_macro_memory_structures_t_resize(status, numbers, int64_t, f_int64s_t, new_length, f_array_length_t)
+ #define f_macro_int64ss_t_adjust(status, numbers, new_length) f_macro_memory_structures_t_adjust(status, numbers, int64_t, f_int64s_t, new_length, f_array_length_t)
+#endif // _di_int64ss_t_
/**
* An array of array uint64_t.
* size: Total amount of allocated space.
* used: Total number of allocated spaces used.
*/
-#ifndef _di_uint64_ts_
+#ifndef _di_uint64s_t_
typedef struct {
uint64_t *array;
- f_array_length size;
- f_array_length used;
- } f_uint64_ts;
+ f_array_length_t size;
+ f_array_length_t used;
+ } f_uint64s_t;
- #define f_uint64_ts_initialize { 0, 0, 0 }
+ #define f_uint64s_t_initialize { 0, 0, 0 }
- #define f_macro_uint64_ts_clear(numbers) f_macro_memory_structure_clear(numbers)
+ #define f_macro_uint64s_t_clear(numbers) f_macro_memory_structure_t_clear(numbers)
- #define f_macro_uint64_ts_new(status, numbers, length) f_macro_memory_structure_new(status, numbers, uint64_t, length)
+ #define f_macro_uint64s_t_new(status, numbers, length) f_macro_memory_structure_t_new(status, numbers, uint64_t, length)
- #define f_macro_uint64_ts_delete(status, numbers) f_macro_memory_structure_delete(status, numbers, uint64_t)
- #define f_macro_uint64_ts_destroy(status, numbers) f_macro_memory_structure_destroy(status, numbers, uint64_t)
+ #define f_macro_uint64s_t_delete(status, numbers) f_macro_memory_structure_t_delete(status, numbers, uint64_t)
+ #define f_macro_uint64s_t_destroy(status, numbers) f_macro_memory_structure_t_destroy(status, numbers, uint64_t)
- #define f_macro_uint64_ts_delete_simple(numbers) f_macro_memory_structure_delete_simple(numbers, uint64_t)
- #define f_macro_uint64_ts_destroy_simple(numbers) f_macro_memory_structure_destroy_simple(numbers, uint64_t)
+ #define f_macro_uint64s_t_delete_simple(numbers) f_macro_memory_structure_t_delete_simple(numbers, uint64_t)
+ #define f_macro_uint64s_t_destroy_simple(numbers) f_macro_memory_structure_t_destroy_simple(numbers, uint64_t)
- #define f_macro_uint64_ts_resize(status, numbers, new_length) f_macro_memory_structure_resize(status, numbers, uint64_t, new_length)
- #define f_macro_uint64_ts_adjust(status, numbers, new_length) f_macro_memory_structure_adjust(status, numbers, uint64_t, new_length)
-#endif // _di_uint64_ts_
+ #define f_macro_uint64s_t_resize(status, numbers, new_length) f_macro_memory_structure_t_resize(status, numbers, uint64_t, new_length)
+ #define f_macro_uint64s_t_adjust(status, numbers, new_length) f_macro_memory_structure_t_adjust(status, numbers, uint64_t, new_length)
+#endif // _di_uint64s_t_
/**
* An array of an array of array uint64_t.
* size: total amount of allocated space.
* used: total number of allocated spaces used.
*/
-#ifndef _di_uint64_tss_
+#ifndef _di_uint64ss_t_
typedef struct {
- f_uint64_ts *array;
+ f_uint64s_t *array;
- f_array_length size;
- f_array_length used;
- } f_uint64_tss;
+ f_array_length_t size;
+ f_array_length_t used;
+ } f_uint64ss_t;
- #define f_uint64_tss_initialize { 0, 0, 0 }
+ #define f_uint64ss_t_initialize { 0, 0, 0 }
- #define f_macro_uint64_tss_clear(numbers) f_macro_memory_structures_clear(numbers)
+ #define f_macro_uint64ss_t_clear(numbers) f_macro_memory_structures_t_clear(numbers)
- #define f_macro_uint64_tss_new(status, numbers, length) f_macro_memory_structures_new(status, numbers, uint64_t, length)
+ #define f_macro_uint64ss_t_new(status, numbers, length) f_macro_memory_structures_t_new(status, numbers, uint64_t, length)
- #define f_macro_uint64_tss_delete(status, numbers) f_macro_memory_structures_delete(status, numbers, uint64_t, f_uint64_ts)
- #define f_macro_uint64_tss_destroy(status, numbers) f_macro_memory_structures_destroy(status, numbers, uint64_t, f_uint64_ts)
+ #define f_macro_uint64ss_t_delete(status, numbers) f_macro_memory_structures_t_delete(status, numbers, uint64_t, f_uint64s_t)
+ #define f_macro_uint64ss_t_destroy(status, numbers) f_macro_memory_structures_t_destroy(status, numbers, uint64_t, f_uint64s_t)
- #define f_macro_uint64_tss_delete_simple(numbers) f_macro_memory_structures_delete_simple(numbers, uint64_t, f_uint64_ts)
- #define f_macro_uint64_tss_destroy_simple(numbers) f_macro_memory_structures_destroy_simple(numbers, uint64_t, f_uint64_ts)
+ #define f_macro_uint64ss_t_delete_simple(numbers) f_macro_memory_structures_t_delete_simple(numbers, uint64_t, f_uint64s_t)
+ #define f_macro_uint64ss_t_destroy_simple(numbers) f_macro_memory_structures_t_destroy_simple(numbers, uint64_t, f_uint64s_t)
- #define f_macro_uint64_tss_resize(status, numbers, new_length) f_macro_memory_structures_resize(status, numbers, uint64_t, f_uint64_ts, new_length, f_array_length)
- #define f_macro_uint64_tss_adjust(status, numbers, new_length) f_macro_memory_structures_adjust(status, numbers, uint64_t, f_uint64_ts, new_length, f_array_length)
-#endif // _di_uint64_tss_
+ #define f_macro_uint64ss_t_resize(status, numbers, new_length) f_macro_memory_structures_t_resize(status, numbers, uint64_t, f_uint64s_t, new_length, f_array_length_t)
+ #define f_macro_uint64ss_t_adjust(status, numbers, new_length) f_macro_memory_structures_t_adjust(status, numbers, uint64_t, f_uint64s_t, new_length, f_array_length_t)
+#endif // _di_uint64ss_t_
#ifndef __SIZEOF_INT128__
/**
* size: Total amount of allocated space.
* used: Total number of allocated spaces used.
*/
- #ifndef _di_int128_ts_
+ #ifndef _di_int128s_t_
typedef struct {
__int128_t *array;
- f_array_length size;
- f_array_length used;
- } f_int128_ts;
+ f_array_length_t size;
+ f_array_length_t used;
+ } f_int128s_t;
#define f_int128_ts_initialize { 0, 0, 0 }
- #define f_macro_int128_ts_clear(numbers) f_macro_memory_structure_clear(numbers)
+ #define f_macro_int128_ts_clear(numbers) f_macro_memory_structure_t_clear(numbers)
- #define f_macro_int128_ts_new(status, numbers, length) f_macro_memory_structure_new(status, numbers, __int128_t, length)
+ #define f_macro_int128_ts_new(status, numbers, length) f_macro_memory_structure_t_new(status, numbers, __int128_t, length)
- #define f_macro_int128_ts_delete(status, numbers) f_macro_memory_structure_delete(status, numbers, __int128_t)
- #define f_macro_int128_ts_destroy(status, numbers) f_macro_memory_structure_destroy(status, numbers, __int128_t)
+ #define f_macro_int128_ts_delete(status, numbers) f_macro_memory_structure_t_delete(status, numbers, __int128_t)
+ #define f_macro_int128_ts_destroy(status, numbers) f_macro_memory_structure_t_destroy(status, numbers, __int128_t)
- #define f_macro_int128_ts_delete_simple(numbers) f_macro_memory_structure_delete_simple(numbers, __int128_t)
- #define f_macro_int128_ts_destroy_simple(numbers) f_macro_memory_structure_destroy_simple(numbers, __int128_t)
+ #define f_macro_int128_ts_delete_simple(numbers) f_macro_memory_structure_t_delete_simple(numbers, __int128_t)
+ #define f_macro_int128_ts_destroy_simple(numbers) f_macro_memory_structure_t_destroy_simple(numbers, __int128_t)
- #define f_macro_int128_ts_resize(status, numbers, new_length) f_macro_memory_structure_resize(status, numbers, __int128_t, new_length)
- #define f_macro_int128_ts_adjust(status, numbers, new_length) f_macro_memory_structure_adjust(status, numbers, __int128_t, new_length)
- #endif // _di_int128_ts_
+ #define f_macro_int128_ts_resize(status, numbers, new_length) f_macro_memory_structure_t_resize(status, numbers, __int128_t, new_length)
+ #define f_macro_int128_ts_adjust(status, numbers, new_length) f_macro_memory_structure_t_adjust(status, numbers, __int128_t, new_length)
+ #endif // _di_int128s_t_
/**
* An array of an array of array __int128_t.
* size: total amount of allocated space.
* used: total number of allocated spaces used.
*/
- #ifndef _di_int128_tss_
+ #ifndef _di_int128ss_t_
typedef struct {
- f_int128_ts *array;
+ f_int128s_t *array;
- f_array_length size;
- f_array_length used;
- } f_int128_tss;
+ f_array_length_t size;
+ f_array_length_t used;
+ } f_int128ss_t;
- #define f_int128_tss_initialize { 0, 0, 0 }
+ #define f_int128ss_t_initialize { 0, 0, 0 }
- #define f_macro_int128_tss_clear(numbers) f_macro_memory_structures_clear(numbers)
+ #define f_macro_int128ss_t_clear(numbers) f_macro_memory_structures_t_clear(numbers)
- #define f_macro_int128_tss_new(status, numbers, length) f_macro_memory_structures_new(status, numbers, __int128_t, length)
+ #define f_macro_int128ss_t_new(status, numbers, length) f_macro_memory_structures_t_new(status, numbers, __int128_t, length)
- #define f_macro_int128_tss_delete(status, numbers) f_macro_memory_structures_delete(status, numbers, __int128_t, f_int128_ts)
- #define f_macro_int128_tss_destroy(status, numbers) f_macro_memory_structures_destroy(status, numbers, __int128_t, f_int128_ts)
+ #define f_macro_int128ss_t_delete(status, numbers) f_macro_memory_structures_t_delete(status, numbers, __int128_t, f_int128s_t)
+ #define f_macro_int128ss_t_destroy(status, numbers) f_macro_memory_structures_t_destroy(status, numbers, __int128_t, f_int128s_t)
- #define f_macro_int128_tss_delete_simple(numbers) f_macro_memory_structures_delete_simple(numbers, __int128_t, f_int128_ts)
- #define f_macro_int128_tss_destroy_simple(numbers) f_macro_memory_structures_destroy_simple(numbers, __int128_t, f_int128_ts)
+ #define f_macro_int128ss_t_delete_simple(numbers) f_macro_memory_structures_t_delete_simple(numbers, __int128_t, f_int128s_t)
+ #define f_macro_int128ss_t_destroy_simple(numbers) f_macro_memory_structures_t_destroy_simple(numbers, __int128_t, f_int128s_t)
- #define f_macro_int128_tss_resize(status, numbers, new_length) f_macro_memory_structures_resize(status, numbers, __int128_t, f_int128_ts, new_length, f_array_length)
- #define f_macro_int128_tss_adjust(status, numbers, new_length) f_macro_memory_structures_adjust(status, numbers, __int128_t, f_int128_ts, new_length, f_array_length)
- #endif // _di_int128_tss_
+ #define f_macro_int128ss_t_resize(status, numbers, new_length) f_macro_memory_structures_t_resize(status, numbers, __int128_t, f_int128s_t, new_length, f_array_length_t)
+ #define f_macro_int128ss_t_adjust(status, numbers, new_length) f_macro_memory_structures_t_adjust(status, numbers, __int128_t, f_int128s_t, new_length, f_array_length_t)
+ #endif // _di_int128ss_t_
/**
* An array of array __uint128_t.
* size: Total amount of allocated space.
* used: Total number of allocated spaces used.
*/
- #ifndef _di_uint128_ts_
+ #ifndef _di_uint128s_t_
typedef struct {
__uint128_t *array;
- f_array_length size;
- f_array_length used;
- } f_uint128_ts;
+ f_array_length_t size;
+ f_array_length_t used;
+ } f_uint128s_t;
#define f_uint128_ts_initialize { 0, 0, 0 }
- #define f_macro_uint128_ts_clear(numbers) f_macro_memory_structure_clear(numbers)
+ #define f_macro_uint128_ts_clear(numbers) f_macro_memory_structure_t_clear(numbers)
- #define f_macro_uint128_ts_new(status, numbers, length) f_macro_memory_structure_new(status, numbers, __uint128_t, length)
+ #define f_macro_uint128_ts_new(status, numbers, length) f_macro_memory_structure_t_new(status, numbers, __uint128_t, length)
- #define f_macro_uint128_ts_delete(status, numbers) f_macro_memory_structure_delete(status, numbers, __uint128_t)
- #define f_macro_uint128_ts_destroy(status, numbers) f_macro_memory_structure_destroy(status, numbers, __uint128_t)
+ #define f_macro_uint128_ts_delete(status, numbers) f_macro_memory_structure_t_delete(status, numbers, __uint128_t)
+ #define f_macro_uint128_ts_destroy(status, numbers) f_macro_memory_structure_t_destroy(status, numbers, __uint128_t)
- #define f_macro_uint128_ts_delete_simple(numbers) f_macro_memory_structure_delete_simple(numbers, __uint128_t)
- #define f_macro_uint128_ts_destroy_simple(numbers) f_macro_memory_structure_destroy_simple(numbers, __uint128_t)
+ #define f_macro_uint128_ts_delete_simple(numbers) f_macro_memory_structure_t_delete_simple(numbers, __uint128_t)
+ #define f_macro_uint128_ts_destroy_simple(numbers) f_macro_memory_structure_t_destroy_simple(numbers, __uint128_t)
- #define f_macro_uint128_ts_resize(status, numbers, new_length) f_macro_memory_structure_resize(status, numbers, __uint128_t, new_length)
- #define f_macro_uint128_ts_adjust(status, numbers, new_length) f_macro_memory_structure_adjust(status, numbers, __uint128_t, new_length)
- #endif // _di_uint128_ts_
+ #define f_macro_uint128_ts_resize(status, numbers, new_length) f_macro_memory_structure_t_resize(status, numbers, __uint128_t, new_length)
+ #define f_macro_uint128_ts_adjust(status, numbers, new_length) f_macro_memory_structure_t_adjust(status, numbers, __uint128_t, new_length)
+ #endif // _di_uint128s_t_
/**
* An array of an array of array __uint128_t.
* size: total amount of allocated space.
* used: total number of allocated spaces used.
*/
- #ifndef _di_uint128_tss_
+ #ifndef _di_uint128ss_t_
typedef struct {
- f_uint128_ts *array;
+ f_uint128s_t *array;
- f_array_length size;
- f_array_length used;
- } f_uint128_tss;
+ f_array_length_t size;
+ f_array_length_t used;
+ } f_uint128ss_t;
- #define f_uint128_tss_initialize { 0, 0, 0 }
+ #define f_uint128ss_t_initialize { 0, 0, 0 }
- #define f_macro_uint128_tss_clear(numbers) f_macro_memory_structures_clear(numbers)
+ #define f_macro_uint128ss_t_clear(numbers) f_macro_memory_structures_t_clear(numbers)
- #define f_macro_uint128_tss_new(status, numbers, length) f_macro_memory_structures_new(status, numbers, __uint128_t, length)
+ #define f_macro_uint128ss_t_new(status, numbers, length) f_macro_memory_structures_t_new(status, numbers, __uint128_t, length)
- #define f_macro_uint128_tss_delete(status, numbers) f_macro_memory_structures_delete(status, numbers, __uint128_t, f_uint128_ts)
- #define f_macro_uint128_tss_destroy(status, numbers) f_macro_memory_structures_destroy(status, numbers, __uint128_t, f_uint128_ts)
+ #define f_macro_uint128ss_t_delete(status, numbers) f_macro_memory_structures_t_delete(status, numbers, __uint128_t, f_uint128s_t)
+ #define f_macro_uint128ss_t_destroy(status, numbers) f_macro_memory_structures_t_destroy(status, numbers, __uint128_t, f_uint128s_t)
- #define f_macro_uint128_tss_delete_simple(numbers) f_macro_memory_structures_delete_simple(numbers, __uint128_t, f_uint128_ts)
- #define f_macro_uint128_tss_destroy_simple(numbers) f_macro_memory_structures_destroy_simple(numbers, __uint128_t, f_uint128_ts)
+ #define f_macro_uint128ss_t_delete_simple(numbers) f_macro_memory_structures_t_delete_simple(numbers, __uint128_t, f_uint128s_t)
+ #define f_macro_uint128ss_t_destroy_simple(numbers) f_macro_memory_structures_t_destroy_simple(numbers, __uint128_t, f_uint128s_t)
- #define f_macro_uint128_tss_resize(status, numbers, new_length) f_macro_memory_structures_resize(status, numbers, __uint128_t, f_uint128_ts, new_length, f_array_length)
- #define f_macro_uint128_tss_adjust(status, numbers, new_length) f_macro_memory_structures_adjust(status, numbers, __uint128_t, f_uint128_ts, new_length, f_array_length)
- #endif // _di_uint128_tss_
+ #define f_macro_uint128ss_t_resize(status, numbers, new_length) f_macro_memory_structures_t_resize(status, numbers, __uint128_t, f_uint128s_t, new_length, f_array_length_t)
+ #define f_macro_uint128ss_t_adjust(status, numbers, new_length) f_macro_memory_structures_t_adjust(status, numbers, __uint128_t, f_uint128s_t, new_length, f_array_length_t)
+ #endif // _di_uint128ss_t_
#else
/**
* An array of array int64_t acting in place of __int128_t when 128 is not supported.
* size: Total amount of allocated space.
* used: Total number of allocated spaces used.
*/
- #ifndef _di_int128_ts_
+ #ifndef _di_int128s_t_
typedef struct {
int64_t *array;
- f_array_length size;
- f_array_length used;
- } f_int128_ts;
+ f_array_length_t size;
+ f_array_length_t used;
+ } f_int128s_t;
#define f_int128_ts_initialize { 0, 0, 0 }
- #define f_macro_int128_ts_clear(numbers) f_macro_memory_structure_clear(numbers)
+ #define f_macro_int128_ts_clear(numbers) f_macro_memory_structure_t_clear(numbers)
- #define f_macro_int128_ts_new(status, numbers, length) f_macro_memory_structure_new(status, numbers, int64_t, length)
+ #define f_macro_int128_ts_new(status, numbers, length) f_macro_memory_structure_t_new(status, numbers, int64_t, length)
- #define f_macro_int128_ts_delete(status, numbers) f_macro_memory_structure_delete(status, numbers, int64_t)
- #define f_macro_int128_ts_destroy(status, numbers) f_macro_memory_structure_destroy(status, numbers, int64_t)
+ #define f_macro_int128_ts_delete(status, numbers) f_macro_memory_structure_t_delete(status, numbers, int64_t)
+ #define f_macro_int128_ts_destroy(status, numbers) f_macro_memory_structure_t_destroy(status, numbers, int64_t)
- #define f_macro_int128_ts_delete_simple(numbers) f_macro_memory_structure_delete_simple(numbers, int64_t)
- #define f_macro_int128_ts_destroy_simple(numbers) f_macro_memory_structure_destroy_simple(numbers, int64_t)
+ #define f_macro_int128_ts_delete_simple(numbers) f_macro_memory_structure_t_delete_simple(numbers, int64_t)
+ #define f_macro_int128_ts_destroy_simple(numbers) f_macro_memory_structure_t_destroy_simple(numbers, int64_t)
- #define f_macro_int128_ts_resize(status, numbers, new_length) f_macro_memory_structure_resize(status, numbers, int64_t, new_length)
- #define f_macro_int128_ts_adjust(status, numbers, new_length) f_macro_memory_structure_adjust(status, numbers, int64_t, new_length)
- #endif // _di_int128_ts_
+ #define f_macro_int128_ts_resize(status, numbers, new_length) f_macro_memory_structure_t_resize(status, numbers, int64_t, new_length)
+ #define f_macro_int128_ts_adjust(status, numbers, new_length) f_macro_memory_structure_t_adjust(status, numbers, int64_t, new_length)
+ #endif // _di_int128s_t_
/**
* An array of an array of array int64_t acting in place of __int128_t when 128 is not supported.
* size: total amount of allocated space.
* used: total number of allocated spaces used.
*/
- #ifndef _di_int128_tss_
+ #ifndef _di_int128ss_t_
typedef struct {
- f_int128_ts *array;
+ f_int128s_t *array;
- f_array_length size;
- f_array_length used;
- } f_int128_tss;
+ f_array_length_t size;
+ f_array_length_t used;
+ } f_int128ss_t;
- #define f_int128_tss_initialize { 0, 0, 0 }
+ #define f_int128ss_t_initialize { 0, 0, 0 }
- #define f_macro_int128_tss_clear(numbers) f_macro_memory_structures_clear(numbers)
+ #define f_macro_int128ss_t_clear(numbers) f_macro_memory_structures_t_clear(numbers)
- #define f_macro_int128_tss_new(status, numbers, length) f_macro_memory_structures_new(status, numbers, int64_t, length)
+ #define f_macro_int128ss_t_new(status, numbers, length) f_macro_memory_structures_t_new(status, numbers, int64_t, length)
- #define f_macro_int128_tss_delete(status, numbers) f_macro_memory_structures_delete(status, numbers, int64_t, f_int128_ts)
- #define f_macro_int128_tss_destroy(status, numbers) f_macro_memory_structures_destroy(status, numbers, int64_t, f_int128_ts)
+ #define f_macro_int128ss_t_delete(status, numbers) f_macro_memory_structures_t_delete(status, numbers, int64_t, f_int128s_t)
+ #define f_macro_int128ss_t_destroy(status, numbers) f_macro_memory_structures_t_destroy(status, numbers, int64_t, f_int128s_t)
- #define f_macro_int128_tss_delete_simple(numbers) f_macro_memory_structures_delete_simple(numbers, int64_t, f_int128_ts)
- #define f_macro_int128_tss_destroy_simple(numbers) f_macro_memory_structures_destroy_simple(numbers, int64_t, f_int128_ts)
+ #define f_macro_int128ss_t_delete_simple(numbers) f_macro_memory_structures_t_delete_simple(numbers, int64_t, f_int128s_t)
+ #define f_macro_int128ss_t_destroy_simple(numbers) f_macro_memory_structures_t_destroy_simple(numbers, int64_t, f_int128s_t)
- #define f_macro_int128_tss_resize(status, numbers, new_length) f_macro_memory_structures_resize(status, numbers, int64_t, f_int128_ts, new_length, f_array_length)
- #define f_macro_int128_tss_adjust(status, numbers, new_length) f_macro_memory_structures_adjust(status, numbers, int64_t, f_int128_ts, new_length, f_array_length)
- #endif // _di_int128_tss_
+ #define f_macro_int128ss_t_resize(status, numbers, new_length) f_macro_memory_structures_t_resize(status, numbers, int64_t, f_int128s_t, new_length, f_array_length_t)
+ #define f_macro_int128ss_t_adjust(status, numbers, new_length) f_macro_memory_structures_t_adjust(status, numbers, int64_t, f_int128s_t, new_length, f_array_length_t)
+ #endif // _di_int128ss_t_
/**
* An array of array uint64_t acting in place of __uint128_t when 128 is not supported.
* size: Total amount of allocated space.
* used: Total number of allocated spaces used.
*/
- #ifndef _di_uint128_ts_
+ #ifndef _di_uint128s_t_
typedef struct {
uint64_t *array;
- f_array_length size;
- f_array_length used;
- } f_uint128_ts;
+ f_array_length_t size;
+ f_array_length_t used;
+ } f_uint128s_t;
#define f_uint128_ts_initialize { 0, 0, 0 }
- #define f_macro_uint128_ts_clear(numbers) f_macro_memory_structure_clear(numbers)
+ #define f_macro_uint128_ts_clear(numbers) f_macro_memory_structure_t_clear(numbers)
- #define f_macro_uint128_ts_new(status, numbers, length) f_macro_memory_structure_new(status, numbers, uint64_t, length)
+ #define f_macro_uint128_ts_new(status, numbers, length) f_macro_memory_structure_t_new(status, numbers, uint64_t, length)
- #define f_macro_uint128_ts_delete(status, numbers) f_macro_memory_structure_delete(status, numbers, uint64_t)
- #define f_macro_uint128_ts_destroy(status, numbers) f_macro_memory_structure_destroy(status, numbers, uint64_t)
+ #define f_macro_uint128_ts_delete(status, numbers) f_macro_memory_structure_t_delete(status, numbers, uint64_t)
+ #define f_macro_uint128_ts_destroy(status, numbers) f_macro_memory_structure_t_destroy(status, numbers, uint64_t)
- #define f_macro_uint128_ts_delete_simple(numbers) f_macro_memory_structure_delete_simple(numbers, uint64_t)
- #define f_macro_uint128_ts_destroy_simple(numbers) f_macro_memory_structure_destroy_simple(numbers, uint64_t)
+ #define f_macro_uint128_ts_delete_simple(numbers) f_macro_memory_structure_t_delete_simple(numbers, uint64_t)
+ #define f_macro_uint128_ts_destroy_simple(numbers) f_macro_memory_structure_t_destroy_simple(numbers, uint64_t)
- #define f_macro_uint128_ts_resize(status, numbers, new_length) f_macro_memory_structure_resize(status, numbers, uint64_t, new_length)
- #define f_macro_uint128_ts_adjust(status, numbers, new_length) f_macro_memory_structure_adjust(status, numbers, uint64_t, new_length)
- #endif // _di_uint128_ts_
+ #define f_macro_uint128_ts_resize(status, numbers, new_length) f_macro_memory_structure_t_resize(status, numbers, uint64_t, new_length)
+ #define f_macro_uint128_ts_adjust(status, numbers, new_length) f_macro_memory_structure_t_adjust(status, numbers, uint64_t, new_length)
+ #endif // _di_uint128s_t_
/**
* An array of an array of array uint64_t acting in place of __uint128_t when 128 is not supported.
* size: total amount of allocated space.
* used: total number of allocated spaces used.
*/
- #ifndef _di_uint128_tss_
+ #ifndef _di_uint128ss_t_
typedef struct {
- f_uint128_ts *array;
+ f_uint128s_t *array;
- f_array_length size;
- f_array_length used;
- } f_uint128_tss;
+ f_array_length_t size;
+ f_array_length_t used;
+ } f_uint128ss_t;
- #define f_uint128_tss_initialize { 0, 0, 0 }
+ #define f_uint128ss_t_initialize { 0, 0, 0 }
- #define f_macro_uint128_tss_clear(numbers) f_macro_memory_structures_clear(numbers)
+ #define f_macro_uint128ss_t_clear(numbers) f_macro_memory_structures_t_clear(numbers)
- #define f_macro_uint128_tss_new(status, numbers, length) f_macro_memory_structures_new(status, numbers, uint64_t, length)
+ #define f_macro_uint128ss_t_new(status, numbers, length) f_macro_memory_structures_t_new(status, numbers, uint64_t, length)
- #define f_macro_uint128_tss_delete(status, numbers) f_macro_memory_structures_delete(status, numbers, uint64_t, f_uint128_ts)
- #define f_macro_uint128_tss_destroy(status, numbers) f_macro_memory_structures_destroy(status, numbers, uint64_t, f_uint128_ts)
+ #define f_macro_uint128ss_t_delete(status, numbers) f_macro_memory_structures_t_delete(status, numbers, uint64_t, f_uint128s_t)
+ #define f_macro_uint128ss_t_destroy(status, numbers) f_macro_memory_structures_t_destroy(status, numbers, uint64_t, f_uint128s_t)
- #define f_macro_uint128_tss_delete_simple(numbers) f_macro_memory_structures_delete_simple(numbers, uint64_t, f_uint128_ts)
- #define f_macro_uint128_tss_destroy_simple(numbers) f_macro_memory_structures_destroy_simple(numbers, uint64_t, f_uint128_ts)
+ #define f_macro_uint128ss_t_delete_simple(numbers) f_macro_memory_structures_t_delete_simple(numbers, uint64_t, f_uint128s_t)
+ #define f_macro_uint128ss_t_destroy_simple(numbers) f_macro_memory_structures_t_destroy_simple(numbers, uint64_t, f_uint128s_t)
- #define f_macro_uint128_tss_resize(status, numbers, new_length) f_macro_memory_structures_resize(status, numbers, uint64_t, f_uint128_ts, new_length, f_array_length)
- #define f_macro_uint128_tss_adjust(status, numbers, new_length) f_macro_memory_structures_adjust(status, numbers, uint64_t, f_uint128_ts, new_length, f_array_length)
- #endif // _di_uint128_tss_
+ #define f_macro_uint128ss_t_resize(status, numbers, new_length) f_macro_memory_structures_t_resize(status, numbers, uint64_t, f_uint128s_t, new_length, f_array_length_t)
+ #define f_macro_uint128ss_t_adjust(status, numbers, new_length) f_macro_memory_structures_t_adjust(status, numbers, uint64_t, f_uint128s_t, new_length, f_array_length_t)
+ #endif // _di_uint128ss_t_
#endif // __SIZEOF_INT128__
#ifdef __cplusplus
#endif
#if !defined(_di_f_utf_character_is_alpha_) || !defined(_di_f_utf_is_alpha_)
- f_return_status private_f_utf_character_is_alpha(const f_utf_character character, const uint8_t width) {
+ f_return_status private_f_utf_character_is_alpha(const f_utf_character_t character, const uint8_t width) {
if (private_f_utf_character_is_zero_width(character, width)) {
return F_false;
#endif // !defined(_di_f_utf_character_is_alpha_) || !defined(_di_f_utf_is_alpha_)
#if !defined(_di_f_utf_character_is_alpha_digit_) || !defined(_di_f_utf_is_alpha_digit_)
- f_return_status private_f_utf_character_is_alpha_digit(const f_utf_character character, const uint8_t width) {
+ f_return_status private_f_utf_character_is_alpha_digit(const f_utf_character_t character, const uint8_t width) {
if (private_f_utf_character_is_digit(character, width)) {
return F_true;
#endif // !defined(_di_f_utf_character_is_alpha_digit_) || !defined(_di_f_utf_is_alpha_digit_)
#if !defined(_di_f_utf_character_is_alpha_numeric_) || !defined(_di_f_utf_is_alpha_numeric_)
- f_return_status private_f_utf_character_is_alpha_numeric(const f_utf_character character, const uint8_t width) {
+ f_return_status private_f_utf_character_is_alpha_numeric(const f_utf_character_t character, const uint8_t width) {
if (private_f_utf_character_is_numeric(character, width)) {
return F_true;
#endif // !defined(_di_f_utf_character_is_alpha_numeric_) || !defined(_di_f_utf_is_alpha_numeric_)
#if !defined(_di_f_utf_character_is_ascii_) || !defined(_di_f_utf_is_ascii_)
- f_return_status private_f_utf_character_is_ascii(const f_utf_character character, const uint8_t width) {
+ f_return_status private_f_utf_character_is_ascii(const f_utf_character_t character, const uint8_t width) {
if (width == 0) {
- const uint8_t byte_first = f_macro_utf_character_to_char_1(character);
+ const uint8_t byte_first = f_macro_utf_character_t_to_char_1(character);
if (byte_first >= 0x00 && byte_first <= 0x7f) {
return F_true;
#endif // !defined(_di_f_utf_character_is_ascii_) || !defined(_di_f_utf_is_ascii_)
#if !defined(_di_f_utf_character_is_combining_) || !defined(_di_f_utf_is_combining_)
- f_return_status private_f_utf_character_is_combining(const f_utf_character character, const uint8_t width) {
+ f_return_status private_f_utf_character_is_combining(const f_utf_character_t character, const uint8_t width) {
if (width == 2) {
#endif // !defined(_di_f_utf_character_is_combining_) || !defined(_di_f_utf_is_combining_)
#if !defined(_di_f_utf_character_is_control_) || !defined(_di_f_utf_is_control_)
- f_return_status private_f_utf_character_is_control(const f_utf_character character, const uint8_t width) {
+ f_return_status private_f_utf_character_is_control(const f_utf_character_t character, const uint8_t width) {
if (width == 2) {
#endif // !defined(_di_f_utf_character_is_control_) || !defined(_di_f_utf_is_control_)
#if !defined(_di_f_utf_character_is_control_picture_) || !defined(_di_f_utf_is_control_picture_)
- f_return_status private_f_utf_character_is_control_picture(const f_utf_character character, const uint8_t width) {
+ f_return_status private_f_utf_character_is_control_picture(const f_utf_character_t character, const uint8_t width) {
if (width == 3) {
// Control Pictures: U+2400 to U+2426.
#endif // !defined(_di_f_utf_character_is_control_picture_) || !defined(_di_f_utf_is_control_picture_)
#if !defined(_di_f_utf_character_is_digit_) || !defined(_di_f_utf_is_digit_)
- f_return_status private_f_utf_character_is_digit(const f_utf_character character, const uint8_t width) {
+ f_return_status private_f_utf_character_is_digit(const f_utf_character_t character, const uint8_t width) {
if (width == 2) {
uint16_t bytes = (uint16_t) ((character & 0xffff0000) >> 16);
}
// reduce the number of checks by grouping checks by first byte.
- const uint8_t byte_first = f_macro_utf_character_to_char_1(character);
+ const uint8_t byte_first = f_macro_utf_character_t_to_char_1(character);
if (width == 3) {
uint16_t bytes = (uint16_t) ((character & 0x00ffff00) >> 8);
}
// reduce the number of checks by grouping checks by first byte.
- const uint8_t byte_second = f_macro_utf_character_to_char_2(character);
+ const uint8_t byte_second = f_macro_utf_character_t_to_char_2(character);
if (width == 4) {
uint16_t bytes = (uint16_t) ((character & 0xffff0000) >> 16);
#endif // !defined(_di_f_utf_character_is_digit_) || !defined(_di_f_utf_is_digit_)
#if !defined(_di_f_utf_character_is_emoji_) || !defined(_di_f_utf_is_emoji_)
- f_return_status private_f_utf_character_is_emoji(const f_utf_character character, const uint8_t width) {
+ f_return_status private_f_utf_character_is_emoji(const f_utf_character_t character, const uint8_t width) {
// reduce the number of checks by grouping checks by first byte.
- const uint8_t byte_first = f_macro_utf_character_to_char_1(character);
+ const uint8_t byte_first = f_macro_utf_character_t_to_char_1(character);
if (width == 2) {
#endif // !defined(_di_f_utf_character_is_emoji_) || !defined(_di_f_utf_is_emoji_)
#if !defined(_di_f_utf_character_is_numeric_) || !defined(_di_f_utf_is_numeric_)
- f_return_status private_f_utf_character_is_numeric(const f_utf_character character, const uint8_t width) {
+ f_return_status private_f_utf_character_is_numeric(const f_utf_character_t character, const uint8_t width) {
if (private_f_utf_character_is_digit(character, width)) {
return F_true;
#endif // !defined(_di_f_utf_character_is_numeric_) || !defined(_di_f_utf_is_numeric_)
#if !defined(_di_f_utf_character_is_phonetic_) || !defined(_di_f_utf_is_phonetic_)
- f_return_status private_f_utf_character_is_phonetic(const f_utf_character character, const uint8_t width) {
+ f_return_status private_f_utf_character_is_phonetic(const f_utf_character_t character, const uint8_t width) {
if (width == 3) {
#endif // !defined(_di_f_utf_character_is_phonetic_) || !defined(_di_f_utf_is_phonetic_)
#if !defined(_di_f_utf_character_is_private_) || !defined(_di_f_utf_is_private_)
- f_return_status private_f_utf_character_is_private(const f_utf_character character, const uint8_t width) {
+ f_return_status private_f_utf_character_is_private(const f_utf_character_t character, const uint8_t width) {
if (width < 3) {
return F_false;
}
// reduce the number of checks by grouping checks by byte.
- const uint8_t byte_first = f_macro_utf_character_to_char_1(character);
- const uint8_t byte_second = f_macro_utf_character_to_char_2(character);
- const uint8_t byte_third = f_macro_utf_character_to_char_3(character);
+ const uint8_t byte_first = f_macro_utf_character_t_to_char_1(character);
+ const uint8_t byte_second = f_macro_utf_character_t_to_char_2(character);
+ const uint8_t byte_third = f_macro_utf_character_t_to_char_3(character);
if (width == 3) {
if (byte_first >= 0xe0 && byte_first <= 0xef) {
return F_false;
}
- const uint8_t byte_fourth = f_macro_utf_character_to_char_4(character);
+ const uint8_t byte_fourth = f_macro_utf_character_t_to_char_4(character);
if (width == 4) {
if (byte_first == 0xf3) {
#endif // !defined(_di_f_utf_character_is_private_) || !defined(_di_f_utf_is_private_)
#if !defined(_di_f_utf_character_is_punctuation_) || !defined(_di_f_utf_is_punctuation_)
- f_return_status private_f_utf_character_is_punctuation(const f_utf_character character, const uint8_t width) {
+ f_return_status private_f_utf_character_is_punctuation(const f_utf_character_t character, const uint8_t width) {
// reduce the number of checks by grouping checks by first byte.
- const uint8_t byte_first = f_macro_utf_character_to_char_1(character);
+ const uint8_t byte_first = f_macro_utf_character_t_to_char_1(character);
if (width == 2) {
}
}
else if (width == 4) {
- uint8_t byte_second = f_macro_utf_character_to_char_2(character);
+ uint8_t byte_second = f_macro_utf_character_t_to_char_2(character);
if (byte_first == 0xf0) {
if (byte_second == 0x90) {
#endif // !defined(_di_f_utf_character_is_punctuation_) || !defined(_di_f_utf_is_punctuation_)
#if !defined(_di_f_utf_character_is_symbol_) || !defined(_di_f_utf_is_symbol_)
- f_return_status private_f_utf_character_is_symbol(const f_utf_character character, const uint8_t width) {
+ f_return_status private_f_utf_character_is_symbol(const f_utf_character_t character, const uint8_t width) {
// reduce the number of checks by grouping checks by first byte.
- const uint8_t byte_first = f_macro_utf_character_to_char_1(character);
+ const uint8_t byte_first = f_macro_utf_character_t_to_char_1(character);
// @todo: handle all Unicode "symbol".
#endif // !defined(_di_f_utf_character_is_symbol_) || !defined(_di_f_utf_is_symbol_)
#if !defined(_di_f_utf_character_is_unassigned_) || !defined(_di_f_utf_is_unassigned_)
- f_return_status private_f_utf_character_is_unassigned(const f_utf_character character, const uint8_t width) {
+ f_return_status private_f_utf_character_is_unassigned(const f_utf_character_t character, const uint8_t width) {
// reduce the number of checks by grouping checks by first byte.
- const uint8_t byte_first = f_macro_utf_character_to_char_1(character);
+ const uint8_t byte_first = f_macro_utf_character_t_to_char_1(character);
// @todo: Basic Multilingual Plane
// @todo: handle all unassigned UTF-8 spaces.
#endif // !defined(_di_f_utf_character_is_unassigned_) || !defined(_di_f_utf_is_unassigned_)
#if !defined(_di_f_utf_character_is_valid_) || !defined(_di_f_utf_is_valid_)
- f_return_status private_f_utf_character_is_valid(const f_utf_character character, const uint8_t width) {
+ f_return_status private_f_utf_character_is_valid(const f_utf_character_t character, const uint8_t width) {
// reduce the number of checks by grouping checks by byte.
- const uint8_t byte_first = f_macro_utf_character_to_char_1(character);
+ const uint8_t byte_first = f_macro_utf_character_t_to_char_1(character);
if (width == 0) {
if (byte_first >= 0x00 && byte_first <= 0x7f) {
return F_false;
}
- const uint8_t byte_second = f_macro_utf_character_to_char_2(character);
+ const uint8_t byte_second = f_macro_utf_character_t_to_char_2(character);
if (width == 2) {
if (byte_first >= 0xc2 && byte_first <= 0xdf) {
return F_false;
}
- const uint8_t byte_third = f_macro_utf_character_to_char_3(character);
+ const uint8_t byte_third = f_macro_utf_character_t_to_char_3(character);
if (width == 3) {
if (byte_first == 0xe0) {
}
}
- const uint8_t byte_fourth = f_macro_utf_character_to_char_4(character);
+ const uint8_t byte_fourth = f_macro_utf_character_t_to_char_4(character);
if (width == 4) {
if (byte_first == 0xf0) {
#endif // !defined(_di_f_utf_character_is_valid_) || !defined(_di_f_utf_is_valid_)
#if !defined(_di_f_utf_character_is_whitespace_) || !defined(_di_f_utf_is_whitespace_)
- f_return_status private_f_utf_character_is_whitespace(const f_utf_character character, const uint8_t width) {
+ f_return_status private_f_utf_character_is_whitespace(const f_utf_character_t character, const uint8_t width) {
if (width == 2) {
else if (width == 3) {
// reduce the number of checks by grouping checks by first byte.
- const uint8_t byte_first = f_macro_utf_character_to_char_1(character);
+ const uint8_t byte_first = f_macro_utf_character_t_to_char_1(character);
if (byte_first == 0xe2) {
#endif // !defined(_di_f_utf_character_is_whitespace_) || !defined(_di_f_utf_is_whitespace_)
#if !defined(_di_f_utf_character_is_whitespace_modifier_) || !defined(_di_f_utf_is_whitespace_modifier_)
- f_return_status private_f_utf_character_is_whitespace_modifier(const f_utf_character character, const uint8_t width) {
+ f_return_status private_f_utf_character_is_whitespace_modifier(const f_utf_character_t character, const uint8_t width) {
if (width == 2) {
#endif // !defined(_di_f_utf_character_is_whitespace_modifier_) || !defined(_di_f_utf_is_whitespace_modifier_)
#if !defined(_di_f_utf_character_is_whitespace_other_) || !defined(_di_f_utf_is_whitespace_other_)
- f_return_status private_f_utf_character_is_whitespace_other(const f_utf_character character, const uint8_t width) {
+ f_return_status private_f_utf_character_is_whitespace_other(const f_utf_character_t character, const uint8_t width) {
// Ogham: U+1680 (isn't whitespace but is technically considered one: ( )).
if (character == 0xe19a8000) {
#endif // !defined(_di_f_utf_character_is_whitespace_other_) || !defined(_di_f_utf_is_whitespace_other_)
#if !defined(_di_f_utf_character_is_word_) || !defined(_di_f_utf_is_word_)
- f_return_status private_f_utf_character_is_word(const f_utf_character character, const uint8_t width, const bool strict) {
+ f_return_status private_f_utf_character_is_word(const f_utf_character_t character, const uint8_t width, const bool strict) {
if (private_f_utf_character_is_alpha_digit(character, width)) {
return F_true;
if (width == 3) {
// reduce the number of checks by grouping checks by first byte.
- const uint8_t byte_first = f_macro_utf_character_to_char_1(character);
+ const uint8_t byte_first = f_macro_utf_character_t_to_char_1(character);
if (byte_first == 0xe2) {
#endif // !defined(_di_f_utf_character_is_word_) || !defined(_di_f_utf_is_word_)
#if !defined(_di_f_utf_character_is_word_dash_) || !defined(_di_f_utf_is_word_dash_)
- f_return_status private_f_utf_character_is_word_dash(const f_utf_character character, const uint8_t width, const bool strict) {
+ f_return_status private_f_utf_character_is_word_dash(const f_utf_character_t character, const uint8_t width, const bool strict) {
if (private_f_utf_character_is_word(character, width, strict)) {
return F_true;
#endif // !defined(_di_f_utf_character_is_word_dash_) || !defined(_di_f_utf_is_word_dash_)
#if !defined(_di_f_utf_character_is_word_dash_plus_) || !defined(_di_f_utf_is_word_dash_plus_)
- f_return_status private_f_utf_character_is_word_dash_plus(const f_utf_character character, const uint8_t width, const bool strict) {
+ f_return_status private_f_utf_character_is_word_dash_plus(const f_utf_character_t character, const uint8_t width, const bool strict) {
if (private_f_utf_character_is_word_dash(character, width, strict)) {
return F_true;
#endif // !defined(_di_f_utf_character_is_word_dash_plus_) || !defined(_di_f_utf_is_word_dash_plus_)
#if !defined(_di_f_utf_character_is_zero_width_) || !defined(_di_f_utf_is_zero_width_)
- f_return_status private_f_utf_character_is_zero_width(const f_utf_character character, const uint8_t width) {
+ f_return_status private_f_utf_character_is_zero_width(const f_utf_character_t character, const uint8_t width) {
// reduce the number of checks by grouping checks by first byte.
- const uint8_t byte_first = f_macro_utf_character_to_char_1(character);
+ const uint8_t byte_first = f_macro_utf_character_t_to_char_1(character);
if (byte_first == 0xe1) {
* @see f_utf_is_alpha()
*/
#if !defined(_di_f_utf_character_is_alpha_) || !defined(_di_f_utf_is_alpha_)
- extern f_return_status private_f_utf_character_is_alpha(const f_utf_character character, const uint8_t width) f_gcc_attribute_visibility_internal;
+ extern f_return_status private_f_utf_character_is_alpha(const f_utf_character_t character, const uint8_t width) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_f_utf_character_is_alpha_) || !defined(_di_f_utf_is_alpha_)
/**
* @see f_utf_is_alpha_digit()
*/
#if !defined(_di_f_utf_character_is_alpha_digit_) || !defined(_di_f_utf_is_alpha_digit_)
- extern f_return_status private_f_utf_character_is_alpha_digit(const f_utf_character character, const uint8_t width) f_gcc_attribute_visibility_internal;
+ extern f_return_status private_f_utf_character_is_alpha_digit(const f_utf_character_t character, const uint8_t width) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_f_utf_character_is_alpha_digit_) || !defined(_di_f_utf_is_alpha_digit_)
/**
* @see f_utf_is_alpha_numeric()
*/
#if !defined(_di_f_utf_character_is_alpha_numeric_) || !defined(_di_f_utf_is_alpha_numeric_)
- extern f_return_status private_f_utf_character_is_alpha_numeric(const f_utf_character character, const uint8_t width) f_gcc_attribute_visibility_internal;
+ extern f_return_status private_f_utf_character_is_alpha_numeric(const f_utf_character_t character, const uint8_t width) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_f_utf_character_is_alpha_numeric_) || !defined(_di_f_utf_is_alpha_numeric_)
/**
* @see f_utf_is_ascii()
*/
#if !defined(_di_f_utf_character_is_ascii_) || !defined(_di_f_utf_is_ascii_)
- extern f_return_status private_f_utf_character_is_ascii(const f_utf_character character, const uint8_t width) f_gcc_attribute_visibility_internal;
+ extern f_return_status private_f_utf_character_is_ascii(const f_utf_character_t character, const uint8_t width) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_f_utf_character_is_ascii_) || !defined(_di_f_utf_is_ascii_)
/**
* @see f_utf_is_combining()
*/
#if !defined(_di_f_utf_character_is_combining_) || !defined(_di_f_utf_is_combining_)
- extern f_return_status private_f_utf_character_is_combining(const f_utf_character character, const uint8_t width) f_gcc_attribute_visibility_internal;
+ extern f_return_status private_f_utf_character_is_combining(const f_utf_character_t character, const uint8_t width) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_f_utf_character_is_combining_) || !defined(_di_f_utf_is_combining_)
/**
* @see f_utf_is_control()
*/
#if !defined(_di_f_utf_character_is_control_) || !defined(_di_f_utf_is_control_)
- extern f_return_status private_f_utf_character_is_control(const f_utf_character character, const uint8_t width) f_gcc_attribute_visibility_internal;
+ extern f_return_status private_f_utf_character_is_control(const f_utf_character_t character, const uint8_t width) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_f_utf_character_is_control_) || !defined(_di_f_utf_is_control_)
/**
* @see f_utf_is_control_picture()
*/
#if !defined(_di_f_utf_character_is_control_picture_) || !defined(_di_f_utf_is_control_picture_)
- extern f_return_status private_f_utf_character_is_control_picture(const f_utf_character character, const uint8_t width) f_gcc_attribute_visibility_internal;
+ extern f_return_status private_f_utf_character_is_control_picture(const f_utf_character_t character, const uint8_t width) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_f_utf_character_is_control_picture_) || !defined(_di_f_utf_is_control_picture_)
/**
* @see f_utf_is_digit()
*/
#if !defined(_di_f_utf_character_is_digit_) || !defined(_di_f_utf_is_digit_)
- extern f_return_status private_f_utf_character_is_digit(const f_utf_character character, const uint8_t width) f_gcc_attribute_visibility_internal;
+ extern f_return_status private_f_utf_character_is_digit(const f_utf_character_t character, const uint8_t width) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_f_utf_character_is_digit_) || !defined(_di_f_utf_is_digit_)
/**
* @see f_utf_is_emoji()
*/
#if !defined(_di_f_utf_character_is_emoji_) || !defined(_di_f_utf_is_emoji_)
- extern f_return_status private_f_utf_character_is_emoji(const f_utf_character character, const uint8_t width) f_gcc_attribute_visibility_internal;
+ extern f_return_status private_f_utf_character_is_emoji(const f_utf_character_t character, const uint8_t width) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_f_utf_character_is_emoji_) || !defined(_di_f_utf_is_emoji_)
/**
* @see f_utf_is_numeric()
*/
#if !defined(_di_f_utf_character_is_numeric_) || !defined(_di_f_utf_is_numeric_)
- extern f_return_status private_f_utf_character_is_numeric(const f_utf_character character, const uint8_t width) f_gcc_attribute_visibility_internal;
+ extern f_return_status private_f_utf_character_is_numeric(const f_utf_character_t character, const uint8_t width) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_f_utf_character_is_numeric_) || !defined(_di_f_utf_is_numeric_)
/**
* @see f_utf_is_phonetic()
*/
#if !defined(_di_f_utf_character_is_phonetic_) || !defined(_di_f_utf_is_phonetic_)
- extern f_return_status private_f_utf_character_is_phonetic(const f_utf_character character, const uint8_t width) f_gcc_attribute_visibility_internal;
+ extern f_return_status private_f_utf_character_is_phonetic(const f_utf_character_t character, const uint8_t width) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_f_utf_character_is_phonetic_) || !defined(_di_f_utf_is_phonetic_)
/**
* @see f_utf_is_private()
*/
#if !defined(_di_f_utf_character_is_private_) || !defined(_di_f_utf_is_private_)
- extern f_return_status private_f_utf_character_is_private(const f_utf_character character, const uint8_t width) f_gcc_attribute_visibility_internal;
+ extern f_return_status private_f_utf_character_is_private(const f_utf_character_t character, const uint8_t width) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_f_utf_character_is_private_) || !defined(_di_f_utf_is_private_)
/**
* @see f_utf_is_punctuation()
*/
#if !defined(_di_f_utf_character_is_punctuation_) || !defined(_di_f_utf_is_punctuation_)
- extern f_return_status private_f_utf_character_is_punctuation(const f_utf_character character, const uint8_t width) f_gcc_attribute_visibility_internal;
+ extern f_return_status private_f_utf_character_is_punctuation(const f_utf_character_t character, const uint8_t width) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_f_utf_character_is_punctuation_) || !defined(_di_f_utf_is_punctuation_)
/**
* @see f_utf_is_symbol()
*/
#if !defined(_di_f_utf_character_is_symbol_) || !defined(_di_f_utf_is_symbol_)
- extern f_return_status private_f_utf_character_is_symbol(const f_utf_character character, const uint8_t width) f_gcc_attribute_visibility_internal;
+ extern f_return_status private_f_utf_character_is_symbol(const f_utf_character_t character, const uint8_t width) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_f_utf_character_is_symbol_) || !defined(_di_f_utf_is_symbol_)
/**
* @see f_utf_is_unassigned()
*/
#if !defined(_di_f_utf_character_is_unassigned_) || !defined(_di_f_utf_is_unassigned_)
- extern f_return_status private_f_utf_character_is_unassigned(const f_utf_character character, const uint8_t width) f_gcc_attribute_visibility_internal;
+ extern f_return_status private_f_utf_character_is_unassigned(const f_utf_character_t character, const uint8_t width) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_f_utf_character_is_unassigned_) || !defined(_di_f_utf_is_unassigned_)
/**
* @see f_utf_is_valid()
*/
#if !defined(_di_f_utf_character_is_valid_) || !defined(_di_f_utf_is_valid_)
- extern f_return_status private_f_utf_character_is_valid(const f_utf_character character, const uint8_t width) f_gcc_attribute_visibility_internal;
+ extern f_return_status private_f_utf_character_is_valid(const f_utf_character_t character, const uint8_t width) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_f_utf_character_is_valid_) || !defined(_di_f_utf_is_valid_)
/**
* @see f_utf_is_whitespace()
*/
#if !defined(_di_f_utf_character_is_whitespace_) || !defined(_di_f_utf_is_whitespace_)
- extern f_return_status private_f_utf_character_is_whitespace(const f_utf_character character, const uint8_t width) f_gcc_attribute_visibility_internal;
+ extern f_return_status private_f_utf_character_is_whitespace(const f_utf_character_t character, const uint8_t width) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_f_utf_character_is_whitespace_) || !defined(_di_f_utf_is_whitespace_)
/**
* @see f_utf_is_whitespace_modifier()
*/
#if !defined(_di_f_utf_character_is_whitespace_modifier_) || !defined(_di_f_utf_is_whitespace_modifier_)
- extern f_return_status private_f_utf_character_is_whitespace_modifier(const f_utf_character character, const uint8_t width) f_gcc_attribute_visibility_internal;
+ extern f_return_status private_f_utf_character_is_whitespace_modifier(const f_utf_character_t character, const uint8_t width) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_f_utf_character_is_whitespace_modifier_) || !defined(_di_f_utf_is_whitespace_modifier_)
/**
* @see f_utf_is_whitespace_other()
*/
#if !defined(_di_f_utf_character_is_whitespace_other_) || !defined(_di_f_utf_is_whitespace_other_)
- extern f_return_status private_f_utf_character_is_whitespace_other(const f_utf_character character, const uint8_t width) f_gcc_attribute_visibility_internal;
+ extern f_return_status private_f_utf_character_is_whitespace_other(const f_utf_character_t character, const uint8_t width) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_f_utf_character_is_whitespace_other_) || !defined(_di_f_utf_is_whitespace_other_)
/**
* @see f_utf_is_word()
*/
#if !defined(_di_f_utf_character_is_word_) || !defined(_di_f_utf_is_word_)
- extern f_return_status private_f_utf_character_is_word(const f_utf_character character, const uint8_t width, const bool strict) f_gcc_attribute_visibility_internal;
+ extern f_return_status private_f_utf_character_is_word(const f_utf_character_t character, const uint8_t width, const bool strict) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_f_utf_character_is_word_) || !defined(_di_f_utf_is_word_)
/**
* @see f_utf_is_word_dash()
*/
#if !defined(_di_f_utf_character_is_word_dash_) || !defined(_di_f_utf_is_word_dash_)
- extern f_return_status private_f_utf_character_is_word_dash(const f_utf_character character, const uint8_t width, const bool strict) f_gcc_attribute_visibility_internal;
+ extern f_return_status private_f_utf_character_is_word_dash(const f_utf_character_t character, const uint8_t width, const bool strict) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_f_utf_character_is_word_dash_) || !defined(_di_f_utf_is_word_dash_)
/**
* @see f_utf_is_word_dash_plus()
*/
#if !defined(_di_f_utf_character_is_word_dash_plus_) || !defined(_di_f_utf_is_word_dash_plus_)
- extern f_return_status private_f_utf_character_is_word_dash_plus(const f_utf_character character, const uint8_t width, const bool strict) f_gcc_attribute_visibility_internal;
+ extern f_return_status private_f_utf_character_is_word_dash_plus(const f_utf_character_t character, const uint8_t width, const bool strict) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_f_utf_character_is_word_dash_plus_) || !defined(_di_f_utf_is_word_dash_plus_)
/**
* @see f_utf_is_zero_width()
*/
#if !defined(_di_f_utf_character_is_zero_width_) || !defined(_di_f_utf_is_zero_width_)
- extern f_return_status private_f_utf_character_is_zero_width(const f_utf_character character, const uint8_t width) f_gcc_attribute_visibility_internal;
+ extern f_return_status private_f_utf_character_is_zero_width(const f_utf_character_t character, const uint8_t width) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_f_utf_character_is_zero_width_) || !defined(_di_f_utf_is_zero_width_)
#ifdef __cplusplus
*
* The byte structure is intended to be read left to right.
*
- * The f_macro_utf_character_mask_byte_* are used to get the entire character set fo a given width.
+ * The f_macro_utf_character_t_mask_byte_* are used to get the entire character set fo a given width.
*
- * The f_macro_utf_character_mask_char_* are used to get a specific UTF-8 block as a single character range.
+ * The f_macro_utf_character_t_mask_char_* are used to get a specific UTF-8 block as a single character range.
*
- * The f_macro_utf_character_to_char_* are used to convert a f_utf_character into a int8_t, for a given 8-bit block.
+ * The f_macro_utf_character_t_to_char_* are used to convert a f_utf_character_t into a int8_t, for a given 8-bit block.
*
- * The f_macro_utf_character_from_char_* are used to convert a int8_t into part of a f_utf_character, for a given 8-bit block.
+ * The f_macro_utf_character_t_from_char_* are used to convert a int8_t into part of a f_utf_character_t, for a given 8-bit block.
*
- * The f_macro_utf_character_width is used to determine the width of the UTF-8 character based on f_macro_utf_byte_width.
- * The f_macro_utf_character_width_is is used to determine the width of the UTF-8 character based on f_macro_utf_byte_width_is.
+ * The f_macro_utf_character_t_width is used to determine the width of the UTF-8 character based on f_macro_utf_byte_width.
+ * The f_macro_utf_character_t_width_is is used to determine the width of the UTF-8 character based on f_macro_utf_byte_width_is.
*
* @see f_utf_is_big_endian()
*/
-#ifndef _di_f_utf_character_
- typedef uint32_t f_utf_character;
+#ifndef _di_f_utf_character_t_
+ typedef uint32_t f_utf_character_t;
#define f_utf_character_mask_byte_1 0xff000000 // 1111 1111, 0000 0000, 0000 0000, 0000 0000
#define f_utf_character_mask_byte_2 0xffff0000 // 1111 1111, 1111 1111, 0000 0000, 0000 0000
#define f_utf_character_mask_char_3 0x0000ff00 // 0000 0000, 0000 0000, 1111 1111, 0000 0000
#define f_utf_character_mask_char_4 0x000000ff // 0000 0000, 0000 0000, 0000 0000, 1111 1111
- #define f_macro_utf_character_to_char_1(character) (((character) & f_utf_character_mask_char_1) >> 24) // grab first byte.
- #define f_macro_utf_character_to_char_2(character) (((character) & f_utf_character_mask_char_2) >> 16) // grab second byte.
- #define f_macro_utf_character_to_char_3(character) (((character) & f_utf_character_mask_char_3) >> 8) // grab third byte.
- #define f_macro_utf_character_to_char_4(character) ((character) & f_utf_character_mask_char_4) // grab fourth byte.
+ #define f_macro_utf_character_t_to_char_1(character) (((character) & f_utf_character_mask_char_1) >> 24) // grab first byte.
+ #define f_macro_utf_character_t_to_char_2(character) (((character) & f_utf_character_mask_char_2) >> 16) // grab second byte.
+ #define f_macro_utf_character_t_to_char_3(character) (((character) & f_utf_character_mask_char_3) >> 8) // grab third byte.
+ #define f_macro_utf_character_t_to_char_4(character) ((character) & f_utf_character_mask_char_4) // grab fourth byte.
- #define f_macro_utf_character_from_char_1(character) (((character) << 24) & f_utf_character_mask_char_1) // shift to first byte.
- #define f_macro_utf_character_from_char_2(character) (((character) << 16) & f_utf_character_mask_char_2) // shift to second byte.
- #define f_macro_utf_character_from_char_3(character) (((character) << 8) & f_utf_character_mask_char_3) // shift to third byte.
- #define f_macro_utf_character_from_char_4(character) ((character) & f_utf_character_mask_char_4) // shift to fourth byte.
+ #define f_macro_utf_character_t_from_char_1(character) (((character) << 24) & f_utf_character_mask_char_1) // shift to first byte.
+ #define f_macro_utf_character_t_from_char_2(character) (((character) << 16) & f_utf_character_mask_char_2) // shift to second byte.
+ #define f_macro_utf_character_t_from_char_3(character) (((character) << 8) & f_utf_character_mask_char_3) // shift to third byte.
+ #define f_macro_utf_character_t_from_char_4(character) ((character) & f_utf_character_mask_char_4) // shift to fourth byte.
- #define f_macro_utf_character_width(character) (f_macro_utf_byte_width(f_macro_utf_character_to_char_1(character)))
- #define f_macro_utf_character_width_is(character) (f_macro_utf_byte_width_is(f_macro_utf_character_to_char_1(character)))
-#endif // _di_f_utf_character_
+ #define f_macro_utf_character_t_width(character) (f_macro_utf_byte_width(f_macro_utf_character_t_to_char_1(character)))
+ #define f_macro_utf_character_t_width_is(character) (f_macro_utf_byte_width_is(f_macro_utf_character_t_to_char_1(character)))
+#endif // _di_f_utf_character_t_
-#ifndef _di_f_utf_character_have_eol_
- #define f_utf_character_eol 0x0a000000 // 0000 1010, 0000 0000, 0000 0000, 0000 0000
-#endif // _di_f_utf_character_have_eol_
-
-#ifndef _di_f_utf_character_have_eos_
- #define f_utf_character_eos 0x00000000 // 0000 0000, 0000 0000, 0000 0000, 0000 0000
-#endif // _di_f_utf_character_have_eos_
-
-#ifndef _di_f_utf_character_have_placeholder_
- #define f_utf_character_placeholder 0x00000000 // 0000 0000, 0000 0000, 0000 0000, 0000 0000
-#endif // _di_f_utf_character_have_placeholder_
+#ifndef _di_f_utf_character_t_codes_
+ #define f_utf_character_t_eol 0x0a000000 // 0000 1010, 0000 0000, 0000 0000, 0000 0000
+ #define f_utf_character_t_eos 0x00000000 // 0000 0000, 0000 0000, 0000 0000, 0000 0000
+ #define f_utf_character_t_placeholder 0x00000000 // 0000 0000, 0000 0000, 0000 0000, 0000 0000
+#endif // _di_f_utf_character_t_codes_
/**
* Provide a UTF-8 characters set to 4-bits wide as a string.
*/
-#ifndef _di_f_utf_string_
- typedef f_utf_character *f_utf_string;
+#ifndef _di_f_utf_string_t_
+ typedef f_utf_character_t *f_utf_string_t;
- #define f_utf_string_max_size f_type_number_size_unsigned
- #define f_utf_string_initialize f_utf_character_eos
+ #define f_utf_string_t_size_max f_number_t_size_unsigned
+ #define f_utf_string_t_initialize f_utf_character_t_eos
- #define f_macro_utf_string_new(status, string, length) status = f_memory_new((void **) & string, sizeof(f_utf_string), length)
+ #define f_macro_utf_string_t_new(status, string, length) status = f_memory_new((void **) & string, sizeof(f_utf_string_t), length)
- #define f_macro_utf_string_delete(status, string, size) status = f_memory_delete((void **) & string, sizeof(f_utf_string), size)
- #define f_macro_utf_string_destroy(status, string, size) status = f_memory_destroy((void **) & string, sizeof(f_utf_string), size)
+ #define f_macro_utf_string_t_delete(status, string, size) status = f_memory_delete((void **) & string, sizeof(f_utf_string_t), size)
+ #define f_macro_utf_string_t_destroy(status, string, size) status = f_memory_destroy((void **) & string, sizeof(f_utf_string_t), size)
- #define f_macro_utf_string_resize(status, string, old_length, new_length) status = f_memory_resize((void **) & string, sizeof(f_utf_string), old_length, new_length)
- #define f_macro_utf_string_adjust(status, string, old_length, new_length) status = f_memory_adjust((void **) & string, sizeof(f_utf_string), old_length, new_length)
-#endif // _di_f_utf_string_
+ #define f_macro_utf_string_t_resize(status, string, old_length, new_length) status = f_memory_resize((void **) & string, sizeof(f_utf_string_t), old_length, new_length)
+ #define f_macro_utf_string_t_adjust(status, string, old_length, new_length) status = f_memory_adjust((void **) & string, sizeof(f_utf_string_t), old_length, new_length)
+#endif // _di_f_utf_string_t_
/**
* Provide a type specifically for UTF-8 strings.
*/
-#ifndef _di_f_utf_string_length_
- typedef f_number_unsigned f_utf_string_length;
+#ifndef _di_f_utf_string_length_t_
+ typedef f_number_unsigned_t f_utf_string_length_t;
- #define f_utf_string_length_size 0xfffffffffffffffe
- #define f_utf_string_length_size_max f_type_number_size_max_unsigned
+ #define f_utf_string_length_t_size 0xfffffffffffffffe
+ #define f_utf_string_length_t_size_max f_number_t_size_max_unsigned
- #define f_macro_utf_string_length_new(status, string, length) status = f_memory_new((void **) & string, sizeof(f_utf_string_length), length)
+ #define f_macro_utf_string_length_t_new(status, string, length) status = f_memory_new((void **) & string, sizeof(f_utf_string_length_t), length)
- #define f_macro_utf_string_length_delete(status, string, length) status = f_memory_delete((void **) & string, sizeof(f_utf_string_length), length)
- #define f_macro_utf_string_length_destroy(status, string, size) status = f_memory_destroy((f_void_P *) & string, sizeof(f_utf_string_length), size)
+ #define f_macro_utf_string_length_t_delete(status, string, length) status = f_memory_delete((void **) & string, sizeof(f_utf_string_length_t), length)
+ #define f_macro_utf_string_length_t_destroy(status, string, size) status = f_memory_destroy((f_void_P *) & string, sizeof(f_utf_string_length_t), size)
- #define f_macro_utf_string_length_resize(status, length, old_length, new_length) status = f_memory_resize((void **) & length, sizeof(f_utf_string_length), old_length, new_length)
- #define f_macro_utf_string_length_adjust(status, length, old_length, new_length) status = f_memory_adjust((void **) & length, sizeof(f_utf_string_length), old_length, new_length)
-#endif // _di_f_utf_string_length_
+ #define f_macro_utf_string_length_t_resize(status, length, old_length, new_length) status = f_memory_resize((void **) & length, sizeof(f_utf_string_length_t), old_length, new_length)
+ #define f_macro_utf_string_length_t_adjust(status, length, old_length, new_length) status = f_memory_adjust((void **) & length, sizeof(f_utf_string_length_t), old_length, new_length)
+#endif // _di_f_utf_string_length_t_
/**
* size: total amount of allocated space.
* used: total number of allocated spaces used.
*/
-#ifndef _di_f_utf_string_lengths_
+#ifndef _di_f_utf_string_lengths_t_
typedef struct {
- f_utf_string_length *array;
+ f_utf_string_length_t *array;
- f_array_length size;
- f_array_length used;
- } f_utf_string_lengths;
+ f_array_length_t size;
+ f_array_length_t used;
+ } f_utf_string_lengths_t;
- #define f_utf_string_lengths_initialize { 0, 0, 0 }
+ #define f_utf_string_lengths_t_initialize { 0, 0, 0 }
- #define f_macro_utf_string_lengths_clear(lengths) f_macro_memory_structure_clear(lengths)
+ #define f_macro_utf_string_lengths_t_clear(lengths) f_macro_memory_structure_t_clear(lengths)
- #define f_macro_utf_string_lengths_new(status, lengths, length) f_macro_memory_structure_new(status, lengths, f_utf_string_length, length)
+ #define f_macro_utf_string_lengths_t_new(status, lengths, length) f_macro_memory_structure_t_new(status, lengths, f_utf_string_length_t, length)
- #define f_macro_utf_string_lengths_delete(status, lengths) f_macro_memory_structure_delete(status, lengths, f_utf_string_length)
- #define f_macro_utf_string_lengths_destroy(status, lengths) f_macro_memory_structure_destroy(status, lengths, f_utf_string_length)
+ #define f_macro_utf_string_lengths_t_delete(status, lengths) f_macro_memory_structure_t_delete(status, lengths, f_utf_string_length_t)
+ #define f_macro_utf_string_lengths_t_destroy(status, lengths) f_macro_memory_structure_t_destroy(status, lengths, f_utf_string_length_t)
- #define f_macro_utf_string_lengths_resize(status, lengths, new_length) f_macro_memory_structure_resize(status, lengths, f_utf_string_length, new_length)
- #define f_macro_utf_string_lengths_adjust(status, lengths, new_length) f_macro_memory_structure_adjust(status, lengths, f_utf_string_length, new_length)
-#endif // _di_f_utf_string_lengths_
+ #define f_macro_utf_string_lengths_t_resize(status, lengths, new_length) f_macro_memory_structure_t_resize(status, lengths, f_utf_string_length_t, new_length)
+ #define f_macro_utf_string_lengths_t_adjust(status, lengths, new_length) f_macro_memory_structure_t_adjust(status, lengths, f_utf_string_length_t, new_length)
+#endif // _di_f_utf_string_lengths_t_
/**
* Designates a start and stop position that represents a sub-string inside of some parent string.
* use this to avoid resizing, restructuring, and reallocating the parent string to separate the sub-string.
*
- * A special f_macro_utf_string_range_initialize() is provided for the special purpose of easily initialize a static string range.
+ * A special f_macro_utf_string_range_t_initialize() is provided for the special purpose of easily initialize a static string range.
*/
-#ifndef _di_f_utf_string_range_
+#ifndef _di_f_utf_string_range_t_
typedef struct {
- f_utf_string_length start;
- f_utf_string_length stop;
- } f_utf_string_range;
+ f_utf_string_length_t start;
+ f_utf_string_length_t stop;
+ } f_utf_string_range_t;
- #define f_utf_string_range_initialize { 1, 0 }
+ #define f_utf_string_range_t_initialize { 1, 0 }
- #define f_macro_utf_string_range_initialize(length) { length ? 0 : 1, length ? length - 1 : 0 }
+ #define f_macro_utf_string_range_t_initialize(length) { length ? 0 : 1, length ? length - 1 : 0 }
- #define f_macro_utf_string_range_new(status, utf_string_range, length) status = f_memory_new((void **) & utf_string_range, sizeof(f_utf_string_range), length)
- #define f_macro_utf_string_range_delete(status, utf_string_range, size) status = f_memory_delete((void **) & utf_string_range, sizeof(f_utf_string_range), size)
- #define f_macro_utf_string_range_destroy(status, utf_string_range, size) status = f_memory_destroy((void **) & utf_string_range, sizeof(f_utf_string_range), size)
+ #define f_macro_utf_string_range_t_new(status, utf_string_range, length) status = f_memory_new((void **) & utf_string_range, sizeof(f_utf_string_range_t), length)
+ #define f_macro_utf_string_range_t_delete(status, utf_string_range, size) status = f_memory_delete((void **) & utf_string_range, sizeof(f_utf_string_range_t), size)
+ #define f_macro_utf_string_range_t_destroy(status, utf_string_range, size) status = f_memory_destroy((void **) & utf_string_range, sizeof(f_utf_string_range_t), size)
- #define f_macro_utf_string_range_resize(status, utf_string_range, old_length, new_length) \
- status = f_memory_resize((void **) & utf_string_range, sizeof(f_utf_string_range), old_length, new_length)
+ #define f_macro_utf_string_range_t_resize(status, utf_string_range, old_length, new_length) \
+ status = f_memory_resize((void **) & utf_string_range, sizeof(f_utf_string_range_t), old_length, new_length)
- #define f_macro_utf_string_range_adjust(status, utf_string_range, old_length, new_length) \
- status = f_memory_adjust((void **) & utf_string_range, sizeof(f_utf_string_range), old_length, new_length)
-#endif // _di_f_utf_string_range_
+ #define f_macro_utf_string_range_t_adjust(status, utf_string_range, old_length, new_length) \
+ status = f_memory_adjust((void **) & utf_string_range, sizeof(f_utf_string_range_t), old_length, new_length)
+#endif // _di_f_utf_string_range_t_
/**
* An array of string ranges.
* size: total amount of allocated space.
* used: total number of allocated spaces used.
*/
-#ifndef _di_f_utf_string_ranges_
+#ifndef _di_f_utf_string_ranges_t_
typedef struct {
- f_utf_string_range *array;
+ f_utf_string_range_t *array;
- f_array_length size;
- f_array_length used;
- } f_utf_string_ranges;
+ f_array_length_t size;
+ f_array_length_t used;
+ } f_utf_string_ranges_t;
- #define f_utf_string_ranges_initialize {0, 0, 0}
+ #define f_utf_string_ranges_t_initialize {0, 0, 0}
- #define f_clear_utf_string_ranges(ranges) f_macro_memory_structure_clear(ranges)
+ #define f_clear_utf_string_t_ranges(ranges) f_macro_memory_structure_t_clear(ranges)
- #define f_macro_utf_string_range_news(status, ranges, length) f_macro_memory_structure_new(status, ranges, f_utf_string_range, length)
+ #define f_macro_utf_string_range_t_news(status, ranges, length) f_macro_memory_structure_t_new(status, ranges, f_utf_string_range_t, length)
- #define f_macro_utf_string_range_deletes(status, ranges) f_macro_memory_structure_delete(status, ranges, f_utf_string_range)
- #define f_macro_utf_string_range_destroys(status, ranges) f_macro_memory_structure_destroy(status, ranges, f_utf_string_range)
+ #define f_macro_utf_string_range_t_deletes(status, ranges) f_macro_memory_structure_t_delete(status, ranges, f_utf_string_range_t)
+ #define f_macro_utf_string_range_t_destroys(status, ranges) f_macro_memory_structure_t_destroy(status, ranges, f_utf_string_range_t)
- #define f_macro_utf_string_range_resizes(status, ranges, new_length) f_macro_memory_structure_resize(status, ranges, f_utf_string_range, new_length)
- #define f_macro_utf_string_range_adjusts(status, ranges, new_length) f_macro_memory_structure_adjust(status, ranges, f_utf_string_range, new_length)
-#endif // _di_f_utf_string_ranges_
+ #define f_macro_utf_string_range_t_resizes(status, ranges, new_length) f_macro_memory_structure_t_resize(status, ranges, f_utf_string_range_t, new_length)
+ #define f_macro_utf_string_range_t_adjusts(status, ranges, new_length) f_macro_memory_structure_t_adjust(status, ranges, f_utf_string_range_t, new_length)
+#endif // _di_f_utf_string_ranges_t_
/**
* Store string quantity.
*
- * Similar to f_utf_string_range, except total is relative to start and is not an absolute stop position.
+ * Similar to f_utf_string_range_t, except total is relative to start and is not an absolute stop position.
*
* Two common uses for when total is 0 is:
* 1) Exactly that, process a total of 0 strings bytes.
* start: The position where the string starts (based on some string/buffer).
* total: The total number of elements within that string/buffer the quantity represents.
*/
-#ifndef _di_f_utf_string_quantity_
+#ifndef _di_f_utf_string_quantity_t_
typedef struct {
- f_utf_string_length start;
- f_utf_string_length total;
- } f_utf_string_quantity;
+ f_utf_string_length_t start;
+ f_utf_string_length_t total;
+ } f_utf_string_quantity_t;
- #define f_utf_string_quantity_initialize { 0, 0 }
-#endif // _di_f_utf_string_quantity_
+ #define f_utf_string_quantity_t_initialize { 0, 0 }
+#endif // _di_f_utf_string_quantity_t_
/**
* An array of string quantities.
* size: total amount of allocated space.
* used: total number of allocated spaces used.
*/
-#ifndef _di_f_utf_string_quantitys_
+#ifndef _di_f_utf_string_quantitys_t_
typedef struct {
- f_utf_string_quantity *array;
+ f_utf_string_quantity_t *array;
- f_array_length size;
- f_array_length used;
- } f_utf_string_quantitys;
+ f_array_length_t size;
+ f_array_length_t used;
+ } f_utf_string_quantitys_t;
- #define f_utf_string_quantitys_initialize {0, 0, 0}
+ #define f_utf_string_quantitys_t_initialize {0, 0, 0}
- #define f_macro_utf_string_quantitys_clear(quantitys) f_macro_memory_structure_clear(quantitys)
+ #define f_macro_utf_string_quantitys_t_clear(quantitys) f_macro_memory_structure_t_clear(quantitys)
- #define f_macro_utf_string_quantitys_new(status, quantitys, length) f_macro_memory_structure_new(status, quantitys, f_utf_string_quantity, length)
+ #define f_macro_utf_string_quantitys_t_new(status, quantitys, length) f_macro_memory_structure_t_new(status, quantitys, f_utf_string_quantity_t, length)
- #define f_macro_utf_string_quantitys_delete(status, quantitys) f_macro_memory_structure_delete(status, quantitys, f_utf_string_quantity)
- #define f_macro_utf_string_quantitys_destroy(status, quantitys) f_macro_memory_structure_destroy(status, quantitys, f_utf_string_quantity)
+ #define f_macro_utf_string_quantitys_t_delete(status, quantitys) f_macro_memory_structure_t_delete(status, quantitys, f_utf_string_quantity_t)
+ #define f_macro_utf_string_quantitys_t_destroy(status, quantitys) f_macro_memory_structure_t_destroy(status, quantitys, f_utf_string_quantity_t)
- #define f_macro_utf_string_quantitys_delete_simple(quantitys) f_macro_memory_structure_delete_simple(quantitys, f_utf_string_quantity)
- #define f_macro_utf_string_quantitys_destroy_simple(quantitys) f_macro_memory_structure_destroy_simple(quantitys, f_utf_string_quantity)
+ #define f_macro_utf_string_quantitys_t_delete_simple(quantitys) f_macro_memory_structure_t_delete_simple(quantitys, f_utf_string_quantity_t)
+ #define f_macro_utf_string_quantitys_t_destroy_simple(quantitys) f_macro_memory_structure_t_destroy_simple(quantitys, f_utf_string_quantity_t)
- #define f_macro_utf_string_quantitys_resize(status, quantitys, new_length) f_macro_memory_structure_resize(status, quantitys, f_utf_string_quantity, new_length)
- #define f_macro_utf_string_quantitys_adjust(status, quantitys, new_length) f_macro_memory_structure_adjust(status, quantitys, f_utf_string_quantity, new_length)
-#endif // _di_f_utf_string_quantitys_
+ #define f_macro_utf_string_quantitys_t_resize(status, quantitys, new_length) f_macro_memory_structure_t_resize(status, quantitys, f_utf_string_quantity_t, new_length)
+ #define f_macro_utf_string_quantitys_t_adjust(status, quantitys, new_length) f_macro_memory_structure_t_adjust(status, quantitys, f_utf_string_quantity_t, new_length)
+#endif // _di_f_utf_string_quantitys_t_
/**
- * A string that is analogous to f_utf_string_dynamic but intended for static-only uses.
+ * A string that is analogous to f_utf_string_dynamic_t but intended for static-only uses.
*
- * The f_utf_string_static type should never be directly allocated or deallocated.
+ * The f_utf_string_static_t type should never be directly allocated or deallocated.
*
- * A special f_macro_utf_string_static_initialize() is provided for the special purpose of easily initialize a static string.
+ * A special f_macro_utf_string_static_t_initialize() is provided for the special purpose of easily initialize a static string.
*
* string: the string.
* size: total amount of space available.
* used: total number of space used.
*/
-#ifndef _di_f_utf_string_static_
+#ifndef _di_f_utf_string_static_t_
typedef struct {
- f_utf_string string;
+ f_utf_string_t string;
- f_utf_string_length size;
- f_utf_string_length used;
- } f_utf_string_static;
+ f_utf_string_length_t size;
+ f_utf_string_length_t used;
+ } f_utf_string_static_t;
- #define f_utf_string_static_initialize { f_utf_string_initialize, 0, 0 }
+ #define f_utf_string_static_t_initialize { f_utf_string_t_initialize, 0, 0 }
- #define f_macro_utf_string_static_clear(string_static) \
+ #define f_macro_utf_string_static_t_clear(string_static) \
string_static.string = 0; \
string_static.size = 0; \
string_static.used = 0;
- #define f_macro_utf_string_static_initialize(string, length) { string, length, length }
-#endif // _di_f_string_static_
+ #define f_macro_utf_string_static_t_initialize(string, length) { string, length, length }
+#endif // _di_f_string_static_t_
/**
* A string that supports contains a size attribute to handle dynamic allocations and deallocations.
* size: total amount of allocated space.
* used: total number of allocated spaces used.
*/
-#ifndef _di_f_utf_string_dynamic_
- typedef f_utf_string_static f_utf_string_dynamic;
+#ifndef _di_f_utf_string_dynamic_t_
+ typedef f_utf_string_static_t f_utf_string_dynamic_t;
- #define f_utf_string_dynamic_initialize f_utf_string_static_initialize
+ #define f_utf_string_dynamic_t_initialize f_utf_string_static_t_initialize
- #define f_clear_utf_string_dynamic(dynamic) f_macro_utf_string_static_clear(dynamic)
+ #define f_clear_utf_string_dynamic_t(dynamic) f_macro_utf_string_static_t_clear(dynamic)
- #define f_macro_utf_string_dynamic_new(status, dynamic, new_length) \
- f_clear_utf_string_dynamic(dynamic) \
- status = f_memory_new((void **) & dynamic.string, sizeof(f_utf_string), new_length); \
+ #define f_macro_utf_string_dynamic_t_new(status, dynamic, new_length) \
+ f_clear_utf_string_dynamic_t(dynamic) \
+ status = f_memory_new((void **) & dynamic.string, sizeof(f_utf_string_t), new_length); \
if (status == F_none) { \
dynamic.size = new_length; \
dynamic.used = 0; \
}
- #define f_macro_utf_string_dynamic_delete(status, dynamic) \
- status = f_memory_delete((void **) & dynamic.string, sizeof(f_utf_string), dynamic.size); \
+ #define f_macro_utf_string_dynamic_t_delete(status, dynamic) \
+ status = f_memory_delete((void **) & dynamic.string, sizeof(f_utf_string_t), dynamic.size); \
if (status == F_none) { \
dynamic.size = 0; \
dynamic.used = 0; \
}
- #define f_macro_utf_string_dynamic_destroy(status, dynamic) \
- status = f_memory_destroy((void **) & dynamic.string, sizeof(f_utf_string), dynamic.size); \
+ #define f_macro_utf_string_dynamic_t_destroy(status, dynamic) \
+ status = f_memory_destroy((void **) & dynamic.string, sizeof(f_utf_string_t), dynamic.size); \
if (status == F_none) { \
dynamic.size = 0; \
dynamic.used = 0; \
}
- #define f_macro_utf_string_dynamic_delete_simple(dynamic) \
- f_memory_delete((void **) & dynamic.string, sizeof(f_utf_string), dynamic.size); \
+ #define f_macro_utf_string_dynamic_t_delete_simple(dynamic) \
+ f_memory_delete((void **) & dynamic.string, sizeof(f_utf_string_t), dynamic.size); \
dynamic.size = 0; \
dynamic.used = 0;
- #define f_macro_utf_string_dynamic_destroy_simple(dynamic) \
- f_memory_destroy((void **) & dynamic.string, sizeof(f_utf_string), dynamic.size); \
+ #define f_macro_utf_string_dynamic_t_destroy_simple(dynamic) \
+ f_memory_destroy((void **) & dynamic.string, sizeof(f_utf_string_t), dynamic.size); \
dynamic.size = 0; \
dynamic.used = 0;
- #define f_macro_utf_string_dynamic_resize(status, dynamic, new_length) \
- status = f_memory_resize((void **) & dynamic.string, sizeof(f_utf_string), dynamic.size, new_length); \
+ #define f_macro_utf_string_dynamic_t_resize(status, dynamic, new_length) \
+ status = f_memory_resize((void **) & dynamic.string, sizeof(f_utf_string_t), dynamic.size, new_length); \
if (status == F_none) { \
dynamic.size = new_length; \
if (dynamic.used > dynamic.size) dynamic.used = new_length; \
}
- #define f_macro_utf_string_dynamic_adjust(status, dynamic, new_length) \
- status = f_memory_adjust((void **) & dynamic.string, sizeof(f_utf_string), dynamic.size, new_length); \
+ #define f_macro_utf_string_dynamic_t_adjust(status, dynamic, new_length) \
+ status = f_memory_adjust((void **) & dynamic.string, sizeof(f_utf_string_t), dynamic.size, new_length); \
if (status == F_none) { \
dynamic.size = new_length; \
if (dynamic.used > dynamic.size) dynamic.used = new_length; \
}
-#endif // _di_f_utf_string_dynamic_
+#endif // _di_f_utf_string_dynamic_t_
/**
* An array of dynamic utf_strings.
* size: total amount of allocated space.
* used: total number of allocated spaces used.
*/
-#ifndef _di_f_utf_string_dynamics_
+#ifndef _di_f_utf_string_dynamics_t_
typedef struct {
- f_utf_string_dynamic *array;
+ f_utf_string_dynamic_t *array;
- f_utf_string_length size;
- f_utf_string_length used;
- } f_utf_string_dynamics;
+ f_utf_string_length_t size;
+ f_utf_string_length_t used;
+ } f_utf_string_dynamics_t;
- #define f_utf_string_dynamics_initialize { 0, 0, 0 }
+ #define f_utf_string_dynamics_t_initialize { 0, 0, 0 }
- #define f_clear_utf_string_dynamics(dynamics) \
+ #define f_clear_utf_string_dynamics_t(dynamics) \
dynamics.array = 0; \
dynamics.size = 0; \
dynamics.used = 0;
- #define f_macro_utf_string_dynamics_new(status, dynamics, length) \
+ #define f_macro_utf_string_dynamics_t_new(status, dynamics, length) \
dynamics.array = 0; \
dynamics.size = 0; \
dynamics.used = 0; \
- status = f_memory_new((void **) & dynamics.array, sizeof(f_utf_string_dynamic), length); \
+ status = f_memory_new((void **) & dynamics.array, sizeof(f_utf_string_dynamic_t), length); \
if (status == F_none) { \
dynamics.size = length; \
dynamics.used = 0; \
}
- #define f_macro_utf_string_dynamics_delete(status, dynamics) \
+ #define f_macro_utf_string_dynamics_t_delete(status, dynamics) \
status = F_none; \
while (dynamics.size > 0) { \
--dynamics.size; \
- f_macro_utf_string_dynamic_destroy(status, dynamics.array[dynamics.size]); \
+ f_macro_utf_string_dynamic_t_destroy(status, dynamics.array[dynamics.size]); \
if (status != F_none) break; \
} \
- if (status == F_none) status = f_memory_delete((void **) & dynamics.array, sizeof(f_utf_string_dynamic), dynamics.size); \
+ if (status == F_none) status = f_memory_delete((void **) & dynamics.array, sizeof(f_utf_string_dynamic_t), dynamics.size); \
if (status == F_none) dynamics.used = 0;
- #define f_macro_utf_string_dynamics_destroy(status, dynamics) \
+ #define f_macro_utf_string_dynamics_t_destroy(status, dynamics) \
status = F_none; \
while (dynamics.size > 0) { \
--dynamics.size; \
- f_macro_utf_string_dynamic_destroy(status, dynamics.array[dynamics.size]); \
+ f_macro_utf_string_dynamic_t_destroy(status, dynamics.array[dynamics.size]); \
if (status != F_none) break; \
} \
- if (status == F_none) status = f_memory_destroy((void **) & dynamics.array, sizeof(f_utf_string_dynamic), dynamics.size); \
+ if (status == F_none) status = f_memory_destroy((void **) & dynamics.array, sizeof(f_utf_string_dynamic_t), dynamics.size); \
if (status == F_none) dynamics.used = 0;
- #define f_macro_utf_string_dynamics_delete_simple(dynamics) \
+ #define f_macro_utf_string_dynamics_t_delete_simple(dynamics) \
dynamics.used = dynamics.size; \
while (dynamics.used > 0) { \
dynamics.used--; \
- f_macro_string_dynamic_delete_simple(dynamics.array[dynamics.used]); \
+ f_macro_string_dynamic_t_delete_simple(dynamics.array[dynamics.used]); \
if (dynamics.used == 0) { \
- if (f_memory_delete((void **) & dynamics.array, sizeof(f_utf_string_dynamic), dynamics.size)) { \
+ if (f_memory_delete((void **) & dynamics.array, sizeof(f_utf_string_dynamic_t), dynamics.size)) { \
dynamics.size = 0; \
} \
} \
}
- #define f_macro_utf_string_dynamics_destroy_simple(dynamics) \
+ #define f_macro_utf_string_dynamics_t_destroy_simple(dynamics) \
dynamics.used = dynamics.size; \
while (dynamics.used > 0) { \
dynamics.used--; \
- f_macro_string_dynamic_destroy_simple(dynamics.array[dynamics.used]); \
+ f_macro_string_dynamic_t_destroy_simple(dynamics.array[dynamics.used]); \
if (dynamics.used == 0) { \
- if (f_memory_destroy((void **) & dynamics.array, sizeof(f_utf_string_dynamic), dynamics.size)) { \
+ if (f_memory_destroy((void **) & dynamics.array, sizeof(f_utf_string_dynamic_t), dynamics.size)) { \
dynamics.size = 0; \
} \
} \
}
- #define f_macro_utf_string_dynamics_resize(status, dynamics, new_length) \
+ #define f_macro_utf_string_dynamics_t_resize(status, dynamics, new_length) \
status = F_none; \
if (new_length < dynamics.size) { \
- for (f_utf_string_length _macro__i = dynamics.size - new_length; _macro__i < dynamics.size; _macro__i++) { \
- f_macro_utf_string_dynamic_destroy(status, dynamics.array[_macro__i]); \
+ for (f_utf_string_length_t _macro__i = dynamics.size - new_length; _macro__i < dynamics.size; _macro__i++) { \
+ f_macro_utf_string_dynamic_t_destroy(status, dynamics.array[_macro__i]); \
if (status != F_none) break; \
} \
} \
- if (status == F_none) status = f_memory_resize((void **) & dynamics.array, sizeof(f_utf_string_dynamic), dynamics.size, new_length); \
+ if (status == F_none) status = f_memory_resize((void **) & dynamics.array, sizeof(f_utf_string_dynamic_t), dynamics.size, new_length); \
if (status == F_none) { \
if (new_length > dynamics.size) { \
- for (f_utf_string_length _macro__i = dynamics.size; _macro__i < new_length; _macro__i++) { \
- memset(&dynamics.array[_macro__i], 0, sizeof(f_utf_string_dynamic)); \
+ for (f_utf_string_length_t _macro__i = dynamics.size; _macro__i < new_length; _macro__i++) { \
+ memset(&dynamics.array[_macro__i], 0, sizeof(f_utf_string_dynamic_t)); \
} \
} \
dynamics.size = new_length; \
if (dynamics.used > dynamics.size) dynamics.used = new_length; \
}
- #define f_macro_utf_string_dynamics_adjust(status, dynamics, new_length) \
+ #define f_macro_utf_string_dynamics_t_adjust(status, dynamics, new_length) \
status = F_none; \
if (new_length < dynamics.size) { \
- for (f_utf_string_length _macro__i = dynamics.size - new_length; _macro__i < dynamics.size; _macro__i++) { \
- f_macro_utf_string_dynamic_destroy(status, dynamics.array[_macro__i], f_utf_string_dynamic); \
+ for (f_utf_string_length_t _macro__i = dynamics.size - new_length; _macro__i < dynamics.size; _macro__i++) { \
+ f_macro_utf_string_dynamic_t_destroy(status, dynamics.array[_macro__i], f_utf_string_dynamic_t); \
if (status != F_none) break; \
} \
} \
- if (status == F_none) status = f_memory_adjust((void **) & dynamics.array, sizeof(f_utf_string_dynamic), dynamics.size, new_length); \
+ if (status == F_none) status = f_memory_adjust((void **) & dynamics.array, sizeof(f_utf_string_dynamic_t), dynamics.size, new_length); \
if (status == F_none) { \
if (new_length > dynamics.size) { \
- for (f_utf_string_length _macro__i = dynamics.size; _macro__i < new_length; _macro__i++) { \
- memset(&dynamics.array[_macro__i], 0, sizeof(f_utf_string_dynamic)); \
+ for (f_utf_string_length_t _macro__i = dynamics.size; _macro__i < new_length; _macro__i++) { \
+ memset(&dynamics.array[_macro__i], 0, sizeof(f_utf_string_dynamic_t)); \
} \
} \
dynamics.size = new_length; \
if (dynamics.used > dynamics.size) dynamics.used = new_length; \
}
-#endif // _di_f_utf_string_dynamic_
+#endif // _di_f_utf_string_dynamic_t_
/**
* Define the UTF-8 general whitespace codes.
#endif
#ifndef _di_f_utf_buffer_decrement_
- f_return_status f_utf_buffer_decrement(const f_string_static buffer, f_string_range *range, const f_string_length step) {
+ f_return_status f_utf_buffer_decrement(const f_string_static_t buffer, f_string_range_t *range, const f_string_length_t step) {
#ifndef _di_level_0_parameter_checking_
if (range == 0) return F_status_set_error(F_parameter);
if (range->start > range->stop) return F_status_set_error(F_parameter);
if (buffer.used == 0) return F_data_not;
- f_string_length i = 0;
+ f_string_length_t i = 0;
uint8_t width = 0;
do {
#endif // _di_f_utf_buffer_decrement_
#ifndef _di_f_utf_buffer_increment_
- f_return_status f_utf_buffer_increment(const f_string_static buffer, f_string_range *range, const f_string_length step) {
+ f_return_status f_utf_buffer_increment(const f_string_static_t buffer, f_string_range_t *range, const f_string_length_t step) {
#ifndef _di_level_0_parameter_checking_
if (range == 0) return F_status_set_error(F_parameter);
if (range->start > range->stop) return F_status_set_error(F_parameter);
if (buffer.used == 0) return F_data_not;
- f_string_length i = 0;
+ f_string_length_t i = 0;
uint8_t width = 0;
do {
#endif // _di_f_utf_buffer_increment_
#ifndef _di_f_utf_character_is_
- f_return_status f_utf_character_is(const f_utf_character character) {
- const uint8_t width = f_macro_utf_character_width_is(character);
+ f_return_status f_utf_character_is(const f_utf_character_t character) {
+ const uint8_t width = f_macro_utf_character_t_width_is(character);
if (width == 0) {
return F_false;
#endif // _di_f_utf_character_is_
#ifndef _di_f_utf_character_is_alpha_
- f_return_status f_utf_character_is_alpha(const f_utf_character character) {
- const uint8_t width = f_macro_utf_character_width_is(character);
+ f_return_status f_utf_character_is_alpha(const f_utf_character_t character) {
+ const uint8_t width = f_macro_utf_character_t_width_is(character);
if (width == 0) {
- if (isalpha(f_macro_utf_character_to_char_1(character))) {
+ if (isalpha(f_macro_utf_character_t_to_char_1(character))) {
return F_true;
}
#endif // _di_f_utf_character_is_alpha_
#ifndef _di_f_utf_character_is_alpha_digit_
- f_return_status f_utf_character_is_alpha_digit(const f_utf_character character) {
- const uint8_t width = f_macro_utf_character_width_is(character);
+ f_return_status f_utf_character_is_alpha_digit(const f_utf_character_t character) {
+ const uint8_t width = f_macro_utf_character_t_width_is(character);
if (width == 0) {
- if (isalnum(f_macro_utf_character_to_char_1(character))) {
+ if (isalnum(f_macro_utf_character_t_to_char_1(character))) {
return F_true;
}
#endif // _di_f_utf_character_is_alpha_digit_
#ifndef _di_f_utf_character_is_alpha_numeric_
- f_return_status f_utf_character_is_alpha_numeric(const f_utf_character character) {
- const uint8_t width = f_macro_utf_character_width_is(character);
+ f_return_status f_utf_character_is_alpha_numeric(const f_utf_character_t character) {
+ const uint8_t width = f_macro_utf_character_t_width_is(character);
if (width == 0) {
- if (isalnum(f_macro_utf_character_to_char_1(character))) {
+ if (isalnum(f_macro_utf_character_t_to_char_1(character))) {
return F_true;
}
#endif // _di_f_utf_character_is_alpha_numeric_
#ifndef _di_f_utf_character_is_ascii_
- f_return_status f_utf_character_is_ascii(const f_utf_character character) {
- const uint8_t width = f_macro_utf_character_width_is(character);
+ f_return_status f_utf_character_is_ascii(const f_utf_character_t character) {
+ const uint8_t width = f_macro_utf_character_t_width_is(character);
if (width == 1) {
return F_status_is_error(F_utf);
#endif // _di_f_utf_character_is_ascii_
#ifndef _di_f_utf_character_is_combining_
- f_return_status f_utf_character_is_combining(const f_utf_character character) {
- const uint8_t width = f_macro_utf_character_width_is(character);
+ f_return_status f_utf_character_is_combining(const f_utf_character_t character) {
+ const uint8_t width = f_macro_utf_character_t_width_is(character);
if (width == 0) {
// There are no combining characters in ASCII.
#endif // _di_f_utf_character_is_combining_
#ifndef _di_f_utf_character_is_control_
- f_return_status f_utf_character_is_control(const f_utf_character character) {
- const uint8_t width = f_macro_utf_character_width_is(character);
+ f_return_status f_utf_character_is_control(const f_utf_character_t character) {
+ const uint8_t width = f_macro_utf_character_t_width_is(character);
if (width == 0) {
- if (iscntrl(f_macro_utf_character_to_char_1(character))) {
+ if (iscntrl(f_macro_utf_character_t_to_char_1(character))) {
return F_true;
}
#endif // _di_f_utf_character_is_control_
#ifndef _di_f_utf_character_is_control_picture_
- f_return_status f_utf_character_is_control_picture(const f_utf_character character) {
- const uint8_t width = f_macro_utf_character_width_is(character);
+ f_return_status f_utf_character_is_control_picture(const f_utf_character_t character) {
+ const uint8_t width = f_macro_utf_character_t_width_is(character);
if (width == 0) {
// There are no control picture characters in ASCII.
#endif // _di_f_utf_character_is_control_picture_
#ifndef _di_f_utf_character_is_digit_
- f_return_status f_utf_character_is_digit(const f_utf_character character) {
- const uint8_t width = f_macro_utf_character_width_is(character);
+ f_return_status f_utf_character_is_digit(const f_utf_character_t character) {
+ const uint8_t width = f_macro_utf_character_t_width_is(character);
if (width == 0) {
- if (isdigit(f_macro_utf_character_to_char_1(character))) {
+ if (isdigit(f_macro_utf_character_t_to_char_1(character))) {
return F_true;
}
#endif // _di_f_utf_character_is_digit_
#ifndef _di_f_utf_character_is_emoji_
- f_return_status f_utf_character_is_emoji(const f_utf_character character) {
- const uint8_t width = f_macro_utf_character_width_is(character);
+ f_return_status f_utf_character_is_emoji(const f_utf_character_t character) {
+ const uint8_t width = f_macro_utf_character_t_width_is(character);
if (width == 0) {
- if (isdigit(f_macro_utf_character_to_char_1(character))) {
+ if (isdigit(f_macro_utf_character_t_to_char_1(character))) {
return F_true;
}
#endif // _di_f_utf_character_is_emoji_
#ifndef _di_f_utf_character_is_fragment_
- f_return_status f_utf_character_is_fragment(const f_utf_character character) {
- const uint8_t width = f_macro_utf_character_width_is(character);
+ f_return_status f_utf_character_is_fragment(const f_utf_character_t character) {
+ const uint8_t width = f_macro_utf_character_t_width_is(character);
if (width == 1) return F_true;
#endif // _di_f_utf_character_is_fragment_
#ifndef _di_f_utf_character_is_graph_
- f_return_status f_utf_character_is_graph(const f_utf_character character) {
- const uint8_t width = f_macro_utf_character_width_is(character);
+ f_return_status f_utf_character_is_graph(const f_utf_character_t character) {
+ const uint8_t width = f_macro_utf_character_t_width_is(character);
if (width == 0) {
- if (isgraph(f_macro_utf_character_to_char_1(character))) {
+ if (isgraph(f_macro_utf_character_t_to_char_1(character))) {
return F_true;
}
#endif // _di_f_utf_character_is_graph_
#ifndef _di_f_utf_character_is_numeric_
- f_return_status f_utf_character_is_numeric(const f_utf_character character) {
- const uint8_t width = f_macro_utf_character_width_is(character);
+ f_return_status f_utf_character_is_numeric(const f_utf_character_t character) {
+ const uint8_t width = f_macro_utf_character_t_width_is(character);
if (width == 0) {
- if (isdigit(f_macro_utf_character_to_char_1(character))) {
+ if (isdigit(f_macro_utf_character_t_to_char_1(character))) {
return F_true;
}
#endif // _di_f_utf_character_is_numeric_
#ifndef _di_f_utf_character_is_phonetic_
- f_return_status f_utf_character_is_phonetic(const f_utf_character character) {
- const uint8_t width = f_macro_utf_character_width_is(character);
+ f_return_status f_utf_character_is_phonetic(const f_utf_character_t character) {
+ const uint8_t width = f_macro_utf_character_t_width_is(character);
if (width == 0) {
// There are no ASCII phonetic characters.
#endif // _di_f_utf_character_is_phonetic_
#ifndef _di_f_utf_character_is_private_
- f_return_status f_utf_character_is_private(const f_utf_character character) {
- const uint8_t width = f_macro_utf_character_width_is(character);
+ f_return_status f_utf_character_is_private(const f_utf_character_t character) {
+ const uint8_t width = f_macro_utf_character_t_width_is(character);
if (width == 0) {
// There are no ASCII private characters.
#endif // _di_f_utf_character_is_phonetic_
#ifndef _di_f_utf_character_is_punctuation_
- f_return_status f_utf_character_is_punctuation(const f_utf_character character) {
- const uint8_t width = f_macro_utf_character_width_is(character);
+ f_return_status f_utf_character_is_punctuation(const f_utf_character_t character) {
+ const uint8_t width = f_macro_utf_character_t_width_is(character);
if (width == 0) {
// ASCII: '!' to '#'.
#endif // _di_f_utf_character_is_punctuation_
#ifndef _di_f_utf_character_is_symbol_
- f_return_status f_utf_character_is_symbol(const f_utf_character character) {
- const uint8_t width = f_macro_utf_character_width_is(character);
+ f_return_status f_utf_character_is_symbol(const f_utf_character_t character) {
+ const uint8_t width = f_macro_utf_character_t_width_is(character);
if (width == 0) {
// ASCII: '$' or '+'.
#endif // _di_f_utf_character_is_symbol_
#ifndef _di_f_utf_character_is_unassigned_
- f_return_status f_utf_character_is_unassigned(const f_utf_character character) {
- const uint8_t width = f_macro_utf_character_width_is(character);
+ f_return_status f_utf_character_is_unassigned(const f_utf_character_t character) {
+ const uint8_t width = f_macro_utf_character_t_width_is(character);
if (width == 0 || width == 1) {
return F_false;
#endif // _di_f_utf_character_is_unassigned_
#ifndef _di_f_utf_character_is_valid_
- f_return_status f_utf_character_is_valid(const f_utf_character character) {
- const uint8_t width = f_macro_utf_character_width_is(character);
+ f_return_status f_utf_character_is_valid(const f_utf_character_t character) {
+ const uint8_t width = f_macro_utf_character_t_width_is(character);
if (width == 1) {
return F_false;
#endif // _di_f_utf_character_is_valid_
#ifndef _di_f_utf_character_is_whitespace_
- f_return_status f_utf_character_is_whitespace(const f_utf_character character) {
- const uint8_t width = f_macro_utf_character_width_is(character);
+ f_return_status f_utf_character_is_whitespace(const f_utf_character_t character) {
+ const uint8_t width = f_macro_utf_character_t_width_is(character);
if (width == 0) {
- if (isspace(f_macro_utf_character_to_char_1(character))) {
+ if (isspace(f_macro_utf_character_t_to_char_1(character))) {
return F_true;
}
#endif // _di_f_utf_character_is_whitespace_
#ifndef _di_f_utf_character_is_whitespace_modifier_
- f_return_status f_utf_character_is_whitespace_modifier(const f_utf_character character) {
- const uint8_t width = f_macro_utf_character_width_is(character);
+ f_return_status f_utf_character_is_whitespace_modifier(const f_utf_character_t character) {
+ const uint8_t width = f_macro_utf_character_t_width_is(character);
if (width == 0) {
// There are no ASCII whitespace modifiers.
#endif // _di_f_utf_character_is_whitespace_modifier_
#ifndef _di_f_utf_character_is_whitespace_other_
- f_return_status f_utf_character_is_whitespace_other(const f_utf_character character) {
- const uint8_t width = f_macro_utf_character_width_is(character);
+ f_return_status f_utf_character_is_whitespace_other(const f_utf_character_t character) {
+ const uint8_t width = f_macro_utf_character_t_width_is(character);
if (width == 0) {
// There are no ASCII whitespace other.
#endif // _di_f_utf_character_is_whitespace_other_
#ifndef _di_f_utf_character_is_word_
- f_return_status f_utf_character_is_word(const f_utf_character character, const bool strict) {
- const uint8_t width = f_macro_utf_character_width_is(character);
+ f_return_status f_utf_character_is_word(const f_utf_character_t character, const bool strict) {
+ const uint8_t width = f_macro_utf_character_t_width_is(character);
if (width == 0) {
- if (isalnum(f_macro_utf_character_to_char_1(character)) || character == '_') {
+ if (isalnum(f_macro_utf_character_t_to_char_1(character)) || character == '_') {
return F_true;
}
#endif // _di_f_utf_character_is_word_
#ifndef _di_f_utf_character_is_word_dash_
- f_return_status f_utf_character_is_word_dash(const f_utf_character character, const bool strict) {
- const uint8_t width = f_macro_utf_character_width_is(character);
+ f_return_status f_utf_character_is_word_dash(const f_utf_character_t character, const bool strict) {
+ const uint8_t width = f_macro_utf_character_t_width_is(character);
if (width == 0) {
- if (isalnum(f_macro_utf_character_to_char_1(character)) || character == '_' || character == '-') {
+ if (isalnum(f_macro_utf_character_t_to_char_1(character)) || character == '_' || character == '-') {
return F_true;
}
#endif // _di_f_utf_character_is_word_dash_
#ifndef _di_f_utf_character_is_word_dash_plus_
- f_return_status f_utf_character_is_word_dash_plus(const f_utf_character character, const bool strict) {
- const uint8_t width = f_macro_utf_character_width_is(character);
+ f_return_status f_utf_character_is_word_dash_plus(const f_utf_character_t character, const bool strict) {
+ const uint8_t width = f_macro_utf_character_t_width_is(character);
if (width == 0) {
- if (isalnum(f_macro_utf_character_to_char_1(character)) || character == '_' || character == '-' || character == '+') {
+ if (isalnum(f_macro_utf_character_t_to_char_1(character)) || character == '_' || character == '-' || character == '+') {
return F_true;
}
#endif // _di_f_utf_character_is_word_dash_plus_
#ifndef _di_f_utf_character_is_zero_width_
- f_return_status f_utf_character_is_zero_width(const f_utf_character character) {
- const uint8_t width = f_macro_utf_character_width_is(character);
+ f_return_status f_utf_character_is_zero_width(const f_utf_character_t character) {
+ const uint8_t width = f_macro_utf_character_t_width_is(character);
if (width == 0) {
- const uint8_t ascii = f_macro_utf_character_to_char_1(character);
+ const uint8_t ascii = f_macro_utf_character_t_to_char_1(character);
// These control characters are considered zero-width spaces.
if (ascii >= 0x00 && ascii <= 0x08) {
#endif // _di_f_utf_character_is_zero_width_
#ifndef _di_f_utf_character_to_char_
- f_return_status f_utf_character_to_char(const f_utf_character utf_character, f_string *character, f_string_length *width_max) {
+ f_return_status f_utf_character_to_char(const f_utf_character_t utf_character, f_string_t *character, f_string_length_t *width_max) {
#ifndef _di_level_0_parameter_checking_
if (utf_character == 0) return F_status_set_error(F_parameter);
if (width_max == 0 && *character != 0) return F_status_set_error(F_parameter);
if (width_max != 0 && *width_max > 4) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- f_status status = F_none;
+ f_status_t status = F_none;
- uint8_t width = f_macro_utf_character_width_is(utf_character);
+ uint8_t width = f_macro_utf_character_t_width_is(utf_character);
if (width_max == 0) {
- f_macro_string_new(status, *character, width);
+ f_macro_string_t_new(status, *character, width);
if (F_status_is_error(status)) return status;
uint32_t utf = 0;
if (width == 1) {
- utf = f_macro_utf_character_to_char_1(utf_character) << 24;
+ utf = f_macro_utf_character_t_to_char_1(utf_character) << 24;
}
else if (width == 2) {
- utf = (f_macro_utf_character_to_char_2(utf_character) << 24) | (f_macro_utf_character_to_char_1(utf_character) << 16);
+ utf = (f_macro_utf_character_t_to_char_2(utf_character) << 24) | (f_macro_utf_character_t_to_char_1(utf_character) << 16);
}
else if (width == 3) {
- utf = (f_macro_utf_character_to_char_3(utf_character) << 24) | (f_macro_utf_character_to_char_2(utf_character) << 16) | (f_macro_utf_character_to_char_1(utf_character) << 8);
+ utf = (f_macro_utf_character_t_to_char_3(utf_character) << 24) | (f_macro_utf_character_t_to_char_2(utf_character) << 16) | (f_macro_utf_character_t_to_char_1(utf_character) << 8);
}
else if (width == 4) {
- utf = (f_macro_utf_character_to_char_4(utf_character) << 24) | (f_macro_utf_character_to_char_3(utf_character) << 16) | (f_macro_utf_character_to_char_2(utf_character) << 8) | f_macro_utf_character_to_char_1(utf_character);
+ utf = (f_macro_utf_character_t_to_char_4(utf_character) << 24) | (f_macro_utf_character_t_to_char_3(utf_character) << 16) | (f_macro_utf_character_t_to_char_2(utf_character) << 8) | f_macro_utf_character_t_to_char_1(utf_character);
}
memcpy(*character, &utf, width);
#endif // _di_f_utf_is_big_endian_
#ifndef _di_f_utf_is_
- f_return_status f_utf_is(const f_string character, const f_string_length width_max) {
+ f_return_status f_utf_is(const f_string_t character, const f_string_length_t width_max) {
#ifndef _di_level_0_parameter_checking_
if (width_max < 1) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_utf_is_
#ifndef _di_f_utf_is_alpha_
- f_return_status f_utf_is_alpha(const f_string character, const f_string_length width_max) {
+ f_return_status f_utf_is_alpha(const f_string_t character, const f_string_length_t width_max) {
#ifndef _di_level_0_parameter_checking_
if (width_max < 1) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
return F_status_is_error(F_incomplete_utf);
}
- f_utf_character character_utf = 0;
+ f_utf_character_t character_utf = 0;
{
- f_status status = 0;
+ f_status_t status = 0;
status = f_utf_char_to_character(character, width_max, &character_utf);
#endif // _di_f_utf_is_alpha_
#ifndef _di_f_utf_is_alpha_digit_
- f_return_status f_utf_is_alpha_digit(const f_string character, const f_string_length width_max) {
+ f_return_status f_utf_is_alpha_digit(const f_string_t character, const f_string_length_t width_max) {
#ifndef _di_level_0_parameter_checking_
if (width_max < 1) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
return F_status_is_error(F_incomplete_utf);
}
- f_utf_character character_utf = 0;
+ f_utf_character_t character_utf = 0;
{
- f_status status = 0;
+ f_status_t status = 0;
status = f_utf_char_to_character(character, width_max, &character_utf);
#endif // _di_f_utf_is_alpha_digit_
#ifndef _di_f_utf_is_alpha_numeric_
- f_return_status f_utf_is_alpha_numeric(const f_string character, const f_string_length width_max) {
+ f_return_status f_utf_is_alpha_numeric(const f_string_t character, const f_string_length_t width_max) {
#ifndef _di_level_0_parameter_checking_
if (width_max < 1) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
return F_status_is_error(F_incomplete_utf);
}
- f_utf_character character_utf = 0;
+ f_utf_character_t character_utf = 0;
{
- f_status status = 0;
+ f_status_t status = 0;
status = f_utf_char_to_character(character, width_max, &character_utf);
#endif // _di_f_utf_is_alpha_numeric_
#ifndef _di_f_utf_is_ascii_
- f_return_status f_utf_is_ascii(const f_string character, const f_string_length width_max) {
+ f_return_status f_utf_is_ascii(const f_string_t character, const f_string_length_t width_max) {
#ifndef _di_level_0_parameter_checking_
if (width_max < 1) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
return F_status_is_error(F_incomplete_utf);
}
- f_utf_character character_utf = 0;
+ f_utf_character_t character_utf = 0;
{
- f_status status = 0;
+ f_status_t status = 0;
status = f_utf_char_to_character(character, width_max, &character_utf);
#endif // _di_f_utf_is_ascii_
#ifndef _di_f_utf_is_combining_
- f_return_status f_utf_is_combining(const f_string character, const f_string_length width_max) {
+ f_return_status f_utf_is_combining(const f_string_t character, const f_string_length_t width_max) {
#ifndef _di_level_0_parameter_checking_
if (width_max < 1) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
return F_status_is_error(F_incomplete_utf);
}
- f_utf_character character_utf = 0;
+ f_utf_character_t character_utf = 0;
{
- f_status status = 0;
+ f_status_t status = 0;
status = f_utf_char_to_character(character, width_max, &character_utf);
#endif // _di_f_utf_is_combining_
#ifndef _di_f_utf_is_control_
- f_return_status f_utf_is_control(const f_string character, const f_string_length width_max) {
+ f_return_status f_utf_is_control(const f_string_t character, const f_string_length_t width_max) {
#ifndef _di_level_0_parameter_checking_
if (width_max < 1) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
return F_status_is_error(F_incomplete_utf);
}
- f_utf_character character_utf = 0;
+ f_utf_character_t character_utf = 0;
{
- f_status status = 0;
+ f_status_t status = 0;
status = f_utf_char_to_character(character, width_max, &character_utf);
#endif // _di_f_utf_is_control_
#ifndef _di_f_utf_is_control_picture_
- f_return_status f_utf_is_control_picture(const f_string character, const f_string_length width_max) {
+ f_return_status f_utf_is_control_picture(const f_string_t character, const f_string_length_t width_max) {
#ifndef _di_level_0_parameter_checking_
if (width_max < 1) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
return F_status_is_error(F_incomplete_utf);
}
- f_utf_character character_utf = 0;
+ f_utf_character_t character_utf = 0;
{
- f_status status = 0;
+ f_status_t status = 0;
status = f_utf_char_to_character(character, width_max, &character_utf);
#endif // _di_f_utf_is_control_picture_
#ifndef _di_f_utf_is_digit_
- f_return_status f_utf_is_digit(const f_string character, const f_string_length width_max) {
+ f_return_status f_utf_is_digit(const f_string_t character, const f_string_length_t width_max) {
#ifndef _di_level_0_parameter_checking_
if (width_max < 1) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
return F_status_is_error(F_incomplete_utf);
}
- f_utf_character character_utf = 0;
+ f_utf_character_t character_utf = 0;
{
- f_status status = 0;
+ f_status_t status = 0;
status = f_utf_char_to_character(character, width_max, &character_utf);
#endif // _di_f_utf_is_digit_
#ifndef _di_f_utf_is_emoji_
- f_return_status f_utf_is_emoji(const f_string character, const f_string_length width_max) {
+ f_return_status f_utf_is_emoji(const f_string_t character, const f_string_length_t width_max) {
#ifndef _di_level_0_parameter_checking_
if (width_max < 1) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
return F_status_is_error(F_incomplete_utf);
}
- f_utf_character character_utf = 0;
+ f_utf_character_t character_utf = 0;
{
- f_status status = 0;
+ f_status_t status = 0;
status = f_utf_char_to_character(character, width_max, &character_utf);
#endif // _di_f_utf_is_emoji_
#ifndef _di_f_utf_is_fragment_
- f_return_status f_utf_is_fragment(const f_string character, const f_string_length width_max) {
+ f_return_status f_utf_is_fragment(const f_string_t character, const f_string_length_t width_max) {
#ifndef _di_level_0_parameter_checking_
if (width_max < 1) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_utf_is_fragment_
#ifndef _di_f_utf_is_graph_
- f_return_status f_utf_is_graph(const f_string character, const f_string_length width_max) {
+ f_return_status f_utf_is_graph(const f_string_t character, const f_string_length_t width_max) {
#ifndef _di_level_0_parameter_checking_
if (width_max < 1) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
return F_status_is_error(F_incomplete_utf);
}
- f_utf_character character_utf = 0;
+ f_utf_character_t character_utf = 0;
{
- f_status status = 0;
+ f_status_t status = 0;
status = f_utf_char_to_character(character, width_max, &character_utf);
#endif // _di_f_utf_is_graph_
#ifndef _di_f_utf_is_numeric_
- f_return_status f_utf_is_numeric(const f_string character, const f_string_length width_max) {
+ f_return_status f_utf_is_numeric(const f_string_t character, const f_string_length_t width_max) {
#ifndef _di_level_0_parameter_checking_
if (width_max < 1) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
return F_status_is_error(F_incomplete_utf);
}
- f_utf_character character_utf = 0;
+ f_utf_character_t character_utf = 0;
{
- f_status status = 0;
+ f_status_t status = 0;
status = f_utf_char_to_character(character, width_max, &character_utf);
#endif // _di_f_utf_is_numeric_
#ifndef _di_f_utf_is_phonetic_
- f_return_status f_utf_is_phonetic(const f_string character, const f_string_length width_max) {
+ f_return_status f_utf_is_phonetic(const f_string_t character, const f_string_length_t width_max) {
#ifndef _di_level_0_parameter_checking_
if (width_max < 1) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
return F_status_is_error(F_incomplete_utf);
}
- f_utf_character character_utf = 0;
+ f_utf_character_t character_utf = 0;
{
- f_status status = 0;
+ f_status_t status = 0;
status = f_utf_char_to_character(character, width_max, &character_utf);
#endif // _di_f_utf_is_phonetic_
#ifndef _di_f_utf_is_private_
- f_return_status f_utf_is_private(const f_string character, const f_string_length width_max) {
+ f_return_status f_utf_is_private(const f_string_t character, const f_string_length_t width_max) {
#ifndef _di_level_0_parameter_checking_
if (width_max < 1) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
return F_status_is_error(F_incomplete_utf);
}
- f_utf_character character_utf = 0;
+ f_utf_character_t character_utf = 0;
{
- f_status status = 0;
+ f_status_t status = 0;
status = f_utf_char_to_character(character, width_max, &character_utf);
#endif // _di_f_utf_is_private_
#ifndef _di_f_utf_is_punctuation_
- f_return_status f_utf_is_punctuation(const f_string character, const f_string_length width_max) {
+ f_return_status f_utf_is_punctuation(const f_string_t character, const f_string_length_t width_max) {
#ifndef _di_level_0_parameter_checking_
if (width_max < 1) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
return F_status_is_error(F_incomplete_utf);
}
- f_utf_character character_utf = 0;
+ f_utf_character_t character_utf = 0;
{
- f_status status = 0;
+ f_status_t status = 0;
status = f_utf_char_to_character(character, width_max, &character_utf);
#endif // _di_f_utf_is_punctuation_
#ifndef _di_f_utf_is_symbol_
- f_return_status f_utf_is_symbol(const f_string character, const f_string_length width_max) {
+ f_return_status f_utf_is_symbol(const f_string_t character, const f_string_length_t width_max) {
#ifndef _di_level_0_parameter_checking_
if (width_max < 1) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
return F_status_is_error(F_incomplete_utf);
}
- f_utf_character character_utf = 0;
+ f_utf_character_t character_utf = 0;
{
- f_status status = 0;
+ f_status_t status = 0;
status = f_utf_char_to_character(character, width_max, &character_utf);
#endif // _di_f_utf_is_symbol_
#ifndef _di_f_utf_is_unassigned_
- f_return_status f_utf_is_unassigned(const f_string character, const f_string_length width_max) {
+ f_return_status f_utf_is_unassigned(const f_string_t character, const f_string_length_t width_max) {
#ifndef _di_level_0_parameter_checking_
if (width_max < 1) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
return F_false;
}
- f_utf_character character_utf = 0;
+ f_utf_character_t character_utf = 0;
{
- f_status status = 0;
+ f_status_t status = 0;
status = f_utf_char_to_character(character, width_max, &character_utf);
#endif // _di_f_utf_is_unassigned_
#ifndef _di_f_utf_is_valid_
- f_return_status f_utf_is_valid(const f_string character, const f_string_length width_max) {
+ f_return_status f_utf_is_valid(const f_string_t character, const f_string_length_t width_max) {
#ifndef _di_level_0_parameter_checking_
if (width_max < 1) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
return F_false;
}
- f_utf_character character_utf = 0;
+ f_utf_character_t character_utf = 0;
{
- f_status status = 0;
+ f_status_t status = 0;
status = f_utf_char_to_character(character, width_max, &character_utf);
#endif // _di_f_utf_is_valid_
#ifndef _di_f_utf_is_whitespace_
- f_return_status f_utf_is_whitespace(const f_string character, const f_string_length width_max) {
+ f_return_status f_utf_is_whitespace(const f_string_t character, const f_string_length_t width_max) {
#ifndef _di_level_0_parameter_checking_
if (width_max < 1) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
return F_status_is_error(F_incomplete_utf);
}
- f_utf_character character_utf = 0;
+ f_utf_character_t character_utf = 0;
{
- f_status status = 0;
+ f_status_t status = 0;
status = f_utf_char_to_character(character, width_max, &character_utf);
#endif // _di_f_utf_is_whitespace_
#ifndef _di_f_utf_is_whitespace_modifier_
- f_return_status f_utf_is_whitespace_modifier(const f_string character, const f_string_length width_max) {
+ f_return_status f_utf_is_whitespace_modifier(const f_string_t character, const f_string_length_t width_max) {
#ifndef _di_level_0_parameter_checking_
if (width_max < 1) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
return F_status_is_error(F_incomplete_utf);
}
- f_utf_character character_utf = 0;
+ f_utf_character_t character_utf = 0;
{
- f_status status = 0;
+ f_status_t status = 0;
status = f_utf_char_to_character(character, width_max, &character_utf);
#endif // _di_f_utf_is_whitespace_modifier_
#ifndef _di_f_utf_is_whitespace_other_
- f_return_status f_utf_is_whitespace_other(const f_string character, const f_string_length width_max) {
+ f_return_status f_utf_is_whitespace_other(const f_string_t character, const f_string_length_t width_max) {
#ifndef _di_level_0_parameter_checking_
if (width_max < 1) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
return F_status_is_error(F_incomplete_utf);
}
- f_utf_character character_utf = 0;
+ f_utf_character_t character_utf = 0;
{
- f_status status = 0;
+ f_status_t status = 0;
status = f_utf_char_to_character(character, width_max, &character_utf);
#endif // _di_f_utf_is_whitespace_other_
#ifndef _di_f_utf_is_word_
- f_return_status f_utf_is_word(const f_string character, const f_string_length width_max, const bool strict) {
+ f_return_status f_utf_is_word(const f_string_t character, const f_string_length_t width_max, const bool strict) {
#ifndef _di_level_0_parameter_checking_
if (width_max < 1) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
return F_status_is_error(F_incomplete_utf);
}
- f_utf_character character_utf = 0;
+ f_utf_character_t character_utf = 0;
{
- f_status status = 0;
+ f_status_t status = 0;
status = f_utf_char_to_character(character, width_max, &character_utf);
#endif // _di_f_utf_is_word_
#ifndef _di_f_utf_is_word_dash_
- f_return_status f_utf_is_word_dash(const f_string character, const f_string_length width_max, const bool strict) {
+ f_return_status f_utf_is_word_dash(const f_string_t character, const f_string_length_t width_max, const bool strict) {
#ifndef _di_level_0_parameter_checking_
if (width_max < 1) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
return F_status_is_error(F_incomplete_utf);
}
- f_utf_character character_utf = 0;
+ f_utf_character_t character_utf = 0;
{
- f_status status = 0;
+ f_status_t status = 0;
status = f_utf_char_to_character(character, width_max, &character_utf);
#endif // _di_f_utf_is_word_dash_
#ifndef _di_f_utf_is_word_dash_plus_
- f_return_status f_utf_is_word_dash_plus(const f_string character, const f_string_length width_max, const bool strict) {
+ f_return_status f_utf_is_word_dash_plus(const f_string_t character, const f_string_length_t width_max, const bool strict) {
#ifndef _di_level_0_parameter_checking_
if (width_max < 1) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
return F_status_is_error(F_incomplete_utf);
}
- f_utf_character character_utf = 0;
+ f_utf_character_t character_utf = 0;
{
- f_status status = 0;
+ f_status_t status = 0;
status = f_utf_char_to_character(character, width_max, &character_utf);
#endif // _di_f_utf_is_word_dash_plus_
#ifndef _di_f_utf_is_zero_width_
- f_return_status f_utf_is_zero_width(const f_string character, const f_string_length width_max) {
+ f_return_status f_utf_is_zero_width(const f_string_t character, const f_string_length_t width_max) {
#ifndef _di_level_0_parameter_checking_
if (width_max < 1) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
return F_status_is_error(F_incomplete_utf);
}
- f_utf_character character_utf = 0;
+ f_utf_character_t character_utf = 0;
{
- f_status status = 0;
+ f_status_t status = 0;
status = f_utf_char_to_character(character, width_max, &character_utf);
#endif // _di_f_utf_is_zero_width_
#ifndef _di_f_utf_char_to_character_
- f_return_status f_utf_char_to_character(const f_string character, const f_string_length width_max, f_utf_character *character_utf) {
+ f_return_status f_utf_char_to_character(const f_string_t character, const f_string_length_t width_max, f_utf_character_t *character_utf) {
#ifndef _di_level_0_parameter_checking_
if (width_max < 1) return F_status_set_error(F_parameter);
if (character_utf == 0) return F_status_set_error(F_parameter);
const uint8_t width = f_macro_utf_byte_width_is(*character);
if (width == 0) {
- *character_utf = f_macro_utf_character_from_char_1(character[0]);
+ *character_utf = f_macro_utf_character_t_from_char_1(character[0]);
return F_none;
}
else if (width == 1) {
return F_status_set_error(F_failure);
}
- *character_utf = f_macro_utf_character_from_char_1(character[0]);
+ *character_utf = f_macro_utf_character_t_from_char_1(character[0]);
if (width < 2) {
return F_none;
}
- *character_utf |= f_macro_utf_character_from_char_2(character[1]);
+ *character_utf |= f_macro_utf_character_t_from_char_2(character[1]);
if (width == 2) {
return F_none;
}
- *character_utf |= f_macro_utf_character_from_char_3(character[2]);
+ *character_utf |= f_macro_utf_character_t_from_char_3(character[2]);
if (width == 3) {
return F_none;
}
- *character_utf |= f_macro_utf_character_from_char_4(character[3]);
+ *character_utf |= f_macro_utf_character_t_from_char_4(character[3]);
return F_none;
}
* F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_f_utf_buffer_decrement_
- extern f_return_status f_utf_buffer_decrement(const f_string_static buffer, f_string_range *range, const f_string_length step);
+ extern f_return_status f_utf_buffer_decrement(const f_string_static_t buffer, f_string_range_t *range, const f_string_length_t step);
#endif // _di_f_utf_buffer_decrement_
/**
* F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_f_utf_buffer_increment_
- extern f_return_status f_utf_buffer_increment(const f_string_static buffer, f_string_range *range, const f_string_length step);
+ extern f_return_status f_utf_buffer_increment(const f_string_static_t buffer, f_string_range_t *range, const f_string_length_t step);
#endif // _di_f_utf_buffer_increment_
/**
* @see f_utf_character_is_valid()
*/
#ifndef _di_f_utf_character_is_
- extern f_return_status f_utf_character_is(const f_utf_character character);
+ extern f_return_status f_utf_character_is(const f_utf_character_t character);
#endif // _di_f_utf_character_is_
/**
* @see isalpha()
*/
#ifndef _di_f_utf_character_is_alpha_
- extern f_return_status f_utf_character_is_alpha(const f_utf_character character);
+ extern f_return_status f_utf_character_is_alpha(const f_utf_character_t character);
#endif // _di_f_utf_character_is_alpha_
/**
* @see isalnum()
*/
#ifndef _di_f_utf_character_is_alpha_digit_
- extern f_return_status f_utf_character_is_alpha_digit(const f_utf_character character);
+ extern f_return_status f_utf_character_is_alpha_digit(const f_utf_character_t character);
#endif // _di_f_utf_character_is_alpha_digit_
/**
* @see isalnum()
*/
#ifndef _di_f_utf_character_is_alpha_numeric_
- extern f_return_status f_utf_character_is_alpha_numeric(const f_utf_character character);
+ extern f_return_status f_utf_character_is_alpha_numeric(const f_utf_character_t character);
#endif // _di_f_utf_character_is_alpha_numeric_
/**
* F_utf (with error bit) if character is an invalid UTF-8 character.
*/
#ifndef _di_f_utf_character_is_ascii_
- extern f_return_status f_utf_character_is_ascii(const f_utf_character character);
+ extern f_return_status f_utf_character_is_ascii(const f_utf_character_t character);
#endif // _di_f_utf_character_is_ascii_
/**
* F_utf (with error bit) if character is an invalid UTF-8 character.
*/
#ifndef _di_f_utf_character_is_combining_
- extern f_return_status f_utf_character_is_combining(const f_utf_character character);
+ extern f_return_status f_utf_character_is_combining(const f_utf_character_t character);
#endif // _di_f_utf_character_is_combining_
/**
* @see iscntrl()
*/
#ifndef _di_f_utf_character_is_control_
- extern f_return_status f_utf_character_is_control(const f_utf_character character);
+ extern f_return_status f_utf_character_is_control(const f_utf_character_t character);
#endif // _di_f_utf_character_is_control_
/**
* F_utf (with error bit) if character is an invalid UTF-8 character.
*/
#ifndef _di_f_utf_character_is_control_picture_
- extern f_return_status f_utf_character_is_control_picture(const f_utf_character character);
+ extern f_return_status f_utf_character_is_control_picture(const f_utf_character_t character);
#endif // _di_f_utf_character_is_control_picture_
/**
* @see isdigit()
*/
#ifndef _di_f_utf_character_is_digit_
- extern f_return_status f_utf_character_is_digit(const f_utf_character character);
+ extern f_return_status f_utf_character_is_digit(const f_utf_character_t character);
#endif // _di_f_utf_character_is_digit_
/**
* F_utf (with error bit) if character is an invalid UTF-8 character.
*/
#ifndef _di_f_utf_character_is_emoji_
- extern f_return_status f_utf_character_is_emoji(const f_utf_character character);
+ extern f_return_status f_utf_character_is_emoji(const f_utf_character_t character);
#endif // _di_f_utf_character_is_emoji_
/**
* @see f_utf_character_is_valid()
*/
#ifndef _di_f_utf_character_is_fragment_
- extern f_return_status f_utf_character_is_fragment(const f_utf_character character);
+ extern f_return_status f_utf_character_is_fragment(const f_utf_character_t character);
#endif // _di_f_utf_character_is_fragment_
/**
* @see isgraph()
*/
#ifndef _di_f_utf_character_is_graph_
- extern f_return_status f_utf_character_is_graph(const f_utf_character character);
+ extern f_return_status f_utf_character_is_graph(const f_utf_character_t character);
#endif // _di_f_utf_character_is_graph_
/**
* @see isdigit()
*/
#ifndef _di_f_utf_character_is_numeric_
- extern f_return_status f_utf_character_is_numeric(const f_utf_character character);
+ extern f_return_status f_utf_character_is_numeric(const f_utf_character_t character);
#endif // _di_f_utf_character_is_numeric_
/**
* F_utf (with error bit) if character is an invalid UTF-8 character.
*/
#ifndef _di_f_utf_character_is_phonetic_
- extern f_return_status f_utf_character_is_phonetic(const f_utf_character character);
+ extern f_return_status f_utf_character_is_phonetic(const f_utf_character_t character);
#endif // _di_f_utf_character_is_phonetic_
/**
* F_utf (with error bit) if character is an invalid UTF-8 character.
*/
#ifndef _di_f_utf_character_is_private_
- extern f_return_status f_utf_character_is_private(const f_utf_character character);
+ extern f_return_status f_utf_character_is_private(const f_utf_character_t character);
#endif // _di_f_utf_character_is_private_
/**
* F_utf (with error bit) if character is an invalid UTF-8 character.
*/
#ifndef _di_f_utf_character_is_punctuation_
- extern f_return_status f_utf_character_is_punctuation(const f_utf_character character);
+ extern f_return_status f_utf_character_is_punctuation(const f_utf_character_t character);
#endif // _di_f_utf_character_is_punctuation_
/**
* F_utf (with error bit) if character is an invalid UTF-8 character.
*/
#ifndef _di_f_utf_character_is_symbol_
- extern f_return_status f_utf_character_is_symbol(const f_utf_character character);
+ extern f_return_status f_utf_character_is_symbol(const f_utf_character_t character);
#endif // _di_f_utf_character_is_symbol_
/**
* @see f_utf_character_is_fragment()
*/
#ifndef _di_f_utf_character_is_unassigned_
- extern f_return_status f_utf_character_is_unassigned(const f_utf_character character);
+ extern f_return_status f_utf_character_is_unassigned(const f_utf_character_t character);
#endif // _di_f_utf_character_is_value_
/**
* @see f_utf_character_is_fragment()
*/
#ifndef _di_f_utf_character_is_valid_
- extern f_return_status f_utf_character_is_valid(const f_utf_character character);
+ extern f_return_status f_utf_character_is_valid(const f_utf_character_t character);
#endif // _di_f_utf_character_is_value_
/**
* @see isspace()
*/
#ifndef _di_f_utf_character_is_whitespace_
- extern f_return_status f_utf_character_is_whitespace(const f_utf_character character);
+ extern f_return_status f_utf_character_is_whitespace(const f_utf_character_t character);
#endif // _di_f_utf_character_is_whitespace_
/**
* F_utf (with error bit) if character is an invalid UTF-8 character.
*/
#ifndef _di_f_utf_character_is_whitespace_modifier_
- extern f_return_status f_utf_character_is_whitespace_modifier(const f_utf_character character);
+ extern f_return_status f_utf_character_is_whitespace_modifier(const f_utf_character_t character);
#endif // _di_f_utf_character_is_whitespace_modifier_
/**
* @see isspace()
*/
#ifndef _di_f_utf_character_is_whitespace_other_
- extern f_return_status f_utf_character_is_whitespace_other(const f_utf_character character);
+ extern f_return_status f_utf_character_is_whitespace_other(const f_utf_character_t character);
#endif // _di_f_utf_character_is_whitespace_other_
/**
* @see isalnum()
*/
#ifndef _di_f_utf_character_is_word_
- extern f_return_status f_utf_character_is_word(const f_utf_character character, const bool strict);
+ extern f_return_status f_utf_character_is_word(const f_utf_character_t character, const bool strict);
#endif // _di_f_utf_character_is_word_
/**
* @see isalnum()
*/
#ifndef _di_f_utf_character_is_word_dash_
- extern f_return_status f_utf_character_is_word_dash(const f_utf_character character, const bool strict);
+ extern f_return_status f_utf_character_is_word_dash(const f_utf_character_t character, const bool strict);
#endif // _di_f_utf_character_is_word_dash_
/**
* @see isalnum()
*/
#ifndef _di_f_utf_character_is_word_dash_plus_
- extern f_return_status f_utf_character_is_word_dash_plus(const f_utf_character character, const bool strict);
+ extern f_return_status f_utf_character_is_word_dash_plus(const f_utf_character_t character, const bool strict);
#endif // _di_f_utf_character_is_word_dash_plus_
/**
* F_utf (with error bit) if character is an invalid UTF-8 character.
*/
#ifndef _di_f_utf_character_is_zero_width_
- extern f_return_status f_utf_character_is_zero_width(const f_utf_character character);
+ extern f_return_status f_utf_character_is_zero_width(const f_utf_character_t character);
#endif // _di_f_utf_character_is_zero_width_
/**
- * Convert a specialized f_utf_character type to a int8_t, stored as a string (character buffer).
+ * Convert a specialized f_utf_character_t type to a int8_t, stored as a string (character buffer).
*
* This will also convert ASCII characters stored in the utf_character array.
*
* F_failure (with error bit) if width is not long enough to convert.
*/
#ifndef _di_f_utf_character_to_char_
- extern f_return_status f_utf_character_to_char(const f_utf_character utf_character, f_string *character, f_string_length *width_max);
+ extern f_return_status f_utf_character_to_char(const f_utf_character_t utf_character, f_string_t *character, f_string_length_t *width_max);
#endif // _di_f_utf_character_to_char_
/**
* F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_f_utf_is_
- extern f_return_status f_utf_is(const f_string character, const f_string_length width_max);
+ extern f_return_status f_utf_is(const f_string_t character, const f_string_length_t width_max);
#endif // _di_f_utf_is_
/**
* @see isalpha()
*/
#ifndef _di_f_utf_is_alpha_
- extern f_return_status f_utf_is_alpha(const f_string character, const f_string_length width_max);
+ extern f_return_status f_utf_is_alpha(const f_string_t character, const f_string_length_t width_max);
#endif // _di_f_utf_is_alpha_
/**
* @see isalnum()
*/
#ifndef _di_f_utf_is_alpha_digit_
- extern f_return_status f_utf_is_alpha_digit(const f_string character, const f_string_length width_max);
+ extern f_return_status f_utf_is_alpha_digit(const f_string_t character, const f_string_length_t width_max);
#endif // _di_f_utf_is_alpha_digit_
/**
* @see isalnum()
*/
#ifndef _di_f_utf_is_alpha_numeric_
- extern f_return_status f_utf_is_alpha_numeric(const f_string character, const f_string_length width_max);
+ extern f_return_status f_utf_is_alpha_numeric(const f_string_t character, const f_string_length_t width_max);
#endif // _di_f_utf_is_alpha_numeric_
/**
* F_incomplete_utf (with error bit) if character is an incomplete UTF-8 fragment.
*/
#ifndef _di_f_utf_is_ascii_
- extern f_return_status f_utf_is_ascii(const f_string character, const f_string_length width_max);
+ extern f_return_status f_utf_is_ascii(const f_string_t character, const f_string_length_t width_max);
#endif // _di_f_utf_is_ascii_
/**
* F_incomplete_utf (with error bit) if character is an incomplete UTF-8 fragment.
*/
#ifndef _di_f_utf_is_combining_
- extern f_return_status f_utf_is_combining(const f_string character, const f_string_length width_max);
+ extern f_return_status f_utf_is_combining(const f_string_t character, const f_string_length_t width_max);
#endif // _di_f_utf_is_combining_
/**
* @see iscntrl()
*/
#ifndef _di_f_utf_is_control_
- extern f_return_status f_utf_is_control(const f_string character, const f_string_length width_max);
+ extern f_return_status f_utf_is_control(const f_string_t character, const f_string_length_t width_max);
#endif // _di_f_utf_is_control_
/**
* F_incomplete_utf (with error bit) if character is an incomplete UTF-8 fragment.
*/
#ifndef _di_f_utf_is_control_picture_
- extern f_return_status f_utf_is_control_picture(const f_string character, const f_string_length width_max);
+ extern f_return_status f_utf_is_control_picture(const f_string_t character, const f_string_length_t width_max);
#endif // _di_f_utf_is_control_picture_
/**
* @see isdigit()
*/
#ifndef _di_f_utf_is_digit_
- extern f_return_status f_utf_is_digit(const f_string character, const f_string_length width_max);
+ extern f_return_status f_utf_is_digit(const f_string_t character, const f_string_length_t width_max);
#endif // _di_f_utf_is_digit_
/**
* F_incomplete_utf (with error bit) if character is an incomplete UTF-8 fragment.
*/
#ifndef _di_f_utf_is_emoji_
- extern f_return_status f_utf_is_emoji(const f_string character, const f_string_length width_max);
+ extern f_return_status f_utf_is_emoji(const f_string_t character, const f_string_length_t width_max);
#endif // _di_f_utf_is_emoji_
/**
* F_false if not a UTF-8 character.
*/
#ifndef _di_f_utf_is_fragment_
- extern f_return_status f_utf_is_fragment(const f_string character, const f_string_length width_max);
+ extern f_return_status f_utf_is_fragment(const f_string_t character, const f_string_length_t width_max);
#endif // _di_f_utf_is_fragment_
/**
* @see isgraph()
*/
#ifndef _di_f_utf_is_graph_
- extern f_return_status f_utf_is_graph(const f_string character, const f_string_length width_max);
+ extern f_return_status f_utf_is_graph(const f_string_t character, const f_string_length_t width_max);
#endif // _di_f_utf_is_graph_
/**
* @see isdigit()
*/
#ifndef _di_f_utf_is_numeric_
- extern f_return_status f_utf_is_numeric(const f_string character, const f_string_length width_max);
+ extern f_return_status f_utf_is_numeric(const f_string_t character, const f_string_length_t width_max);
#endif // _di_f_utf_is_numeric_
/**
* F_incomplete_utf (with error bit) if character is an incomplete UTF-8 fragment.
*/
#ifndef _di_f_utf_is_phonetic_
- extern f_return_status f_utf_is_phonetic(const f_string character, const f_string_length width_max);
+ extern f_return_status f_utf_is_phonetic(const f_string_t character, const f_string_length_t width_max);
#endif // _di_f_utf_is_phonetic_
/**
* F_incomplete_utf (with error bit) if character is an incomplete UTF-8 fragment.
*/
#ifndef _di_f_utf_is_private_
- extern f_return_status f_utf_is_private(const f_string character, const f_string_length width_max);
+ extern f_return_status f_utf_is_private(const f_string_t character, const f_string_length_t width_max);
#endif // _di_f_utf_is_private_
/**
* F_incomplete_utf (with error bit) if character is an incomplete UTF-8 fragment.
*/
#ifndef _di_f_utf_is_punctuation_
- extern f_return_status f_utf_is_punctuation(const f_string character, const f_string_length width_max);
+ extern f_return_status f_utf_is_punctuation(const f_string_t character, const f_string_length_t width_max);
#endif // _di_f_utf_is_punctuation_
/**
* F_incomplete_utf (with error bit) if character is an incomplete UTF-8 fragment.
*/
#ifndef _di_f_utf_is_symbol_
- extern f_return_status f_utf_is_symbol(const f_string character, const f_string_length width_max);
+ extern f_return_status f_utf_is_symbol(const f_string_t character, const f_string_length_t width_max);
#endif // _di_f_utf_is_symbol_
/**
* F_parameter (with error bit) if a parameter is inunassigned.
*/
#ifndef _di_f_utf_is_unassigned_
- extern f_return_status f_utf_is_unassigned(const f_string character, const f_string_length width_max);
+ extern f_return_status f_utf_is_unassigned(const f_string_t character, const f_string_length_t width_max);
#endif // _di_f_utf_is_unassigned_
/**
* F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_f_utf_is_valid_
- extern f_return_status f_utf_is_valid(const f_string character, const f_string_length width_max);
+ extern f_return_status f_utf_is_valid(const f_string_t character, const f_string_length_t width_max);
#endif // _di_f_utf_is_valid_
/**
* @see isspace()
*/
#ifndef _di_f_utf_is_whitespace_
- extern f_return_status f_utf_is_whitespace(const f_string character, const f_string_length width_max);
+ extern f_return_status f_utf_is_whitespace(const f_string_t character, const f_string_length_t width_max);
#endif // _di_f_utf_is_whitespace_
/**
* F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_f_utf_is_whitespace_modifier_
- extern f_return_status f_utf_is_whitespace_modifier(const f_string character, const f_string_length width_max);
+ extern f_return_status f_utf_is_whitespace_modifier(const f_string_t character, const f_string_length_t width_max);
#endif // _di_f_utf_is_whitespace_modifier_
/**
* F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_f_utf_is_whitespace_other_
- extern f_return_status f_utf_is_whitespace_other(const f_string character, const f_string_length width_max);
+ extern f_return_status f_utf_is_whitespace_other(const f_string_t character, const f_string_length_t width_max);
#endif // _di_f_utf_is_whitespace_other_
/**
* @see isalnum()
*/
#ifndef _di_f_utf_is_word_
- extern f_return_status f_utf_is_word(const f_string character, const f_string_length width_max, const bool strict);
+ extern f_return_status f_utf_is_word(const f_string_t character, const f_string_length_t width_max, const bool strict);
#endif // _di_f_utf_is_word_
/**
* @see isalnum()
*/
#ifndef _di_f_utf_is_word_dash_
- extern f_return_status f_utf_is_word_dash(const f_string character, const f_string_length width_max, const bool strict);
+ extern f_return_status f_utf_is_word_dash(const f_string_t character, const f_string_length_t width_max, const bool strict);
#endif // _di_f_utf_is_word_dash_
/**
* @see isalnum()
*/
#ifndef _di_f_utf_is_word_dash_plus_
- extern f_return_status f_utf_is_word_dash_plus(const f_string character, const f_string_length width_max, const bool strict);
+ extern f_return_status f_utf_is_word_dash_plus(const f_string_t character, const f_string_length_t width_max, const bool strict);
#endif // _di_f_utf_is_word_dash_plus_
/**
* F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_f_utf_is_zero_width_
- extern f_return_status f_utf_is_zero_width(const f_string character, const f_string_length width_max);
+ extern f_return_status f_utf_is_zero_width(const f_string_t character, const f_string_length_t width_max);
#endif // _di_f_utf_is_zero_width_
/**
- * Convert an ASCII or UTF-8 character, stored as a string (character buffer), to the specialized f_utf_character type.
+ * Convert an ASCII or UTF-8 character, stored as a string (character buffer), to the specialized f_utf_character_t type.
*
* @param character
- * The character string to be converted to the f_utf_character type.
+ * The character string to be converted to the f_utf_character_t type.
* There must be enough space allocated to convert against, as limited by width_max.
* @param width_max
* The maximum width available for converting.
* Can be anything greater than 0.
* @param character_utf
- * The generated character of type f_utf_character.
+ * The generated character of type f_utf_character_t.
* This value may be cleared, even on error.
*
* @return
* F_utf (with error bit) if character is an invalid UTF-8 character.
*/
#ifndef _di_f_utf_char_to_character_
- extern f_return_status f_utf_char_to_character(const f_string character, const f_string_length width_max, f_utf_character *character_utf);
+ extern f_return_status f_utf_char_to_character(const f_string_t character, const f_string_length_t width_max, f_utf_character_t *character_utf);
#endif // _di_f_utf_char_to_character_
#ifdef __cplusplus
#endif
#ifndef _di_fl_color_set_
- f_return_status fl_color_set(FILE *file, const f_color_format format, const int8_t *color1, const int8_t *color2, const int8_t *color3, const int8_t *color4, const int8_t *color5) {
+ f_return_status fl_color_set(FILE *file, const f_color_format_t format, const int8_t *color1, const int8_t *color2, const int8_t *color3, const int8_t *color4, const int8_t *color5) {
#ifndef _di_level_1_parameter_checking_
if (file == 0) return F_status_set_error(F_parameter);
if (color1 == 0) return F_status_set_error(F_parameter);
#endif // _di_fl_color_set_
#ifndef _di_fl_color_save_
- f_return_status fl_color_save(f_string_dynamic *buffer, const f_color_format format, const int8_t *color1, const int8_t *color2, const int8_t *color3, const int8_t *color4, const int8_t *color5) {
+ f_return_status fl_color_save(f_string_dynamic_t *buffer, const f_color_format_t format, const int8_t *color1, const int8_t *color2, const int8_t *color3, const int8_t *color4, const int8_t *color5) {
#ifndef _di_level_1_parameter_checking_
if (buffer == 0) return F_status_set_error(F_parameter);
if (color1 == 0) return F_status_set_error(F_parameter);
if (color4 == 0 && color5 != 0) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- f_string_length string_size = strnlen(format.begin, f_color_max_size) + strnlen(format.end, f_color_max_size) + 1;
+ f_string_length_t string_size = strnlen(format.begin, f_color_max_size) + strnlen(format.end, f_color_max_size) + 1;
if (color2 == 0) string_size += strnlen(color1, f_color_max_size);
else if (color3 == 0) string_size += strnlen(color1, f_color_max_size) + strnlen(color2, f_color_max_size);
// make sure there is enough allocated space, if not, then allocate some more
if (buffer->size - buffer->used - 1 < string_size) {
- f_status status = F_none;
+ f_status_t status = F_none;
- f_macro_string_dynamic_resize(status, (*buffer), buffer->used + string_size + 1); // the additional 1 is the EOS
+ f_macro_string_dynamic_t_resize(status, (*buffer), buffer->used + string_size + 1); // the additional 1 is the EOS
if (F_status_is_error(status)) {
return status;
#endif // _di_fl_color_save_
#ifndef _di_fl_color_print_
- f_return_status fl_color_print(FILE *file, const f_string_static start_color, const f_string_static end_color, const f_string string, ...) {
+ f_return_status fl_color_print(FILE *file, const f_string_static_t start_color, const f_string_static_t end_color, const f_string_t string, ...) {
#ifndef _di_level_1_parameter_checking_
if (file == 0) return F_status_set_error(F_parameter);
if (string == 0) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
if (start_color.used) {
- f_status status = f_print_string_dynamic(file, start_color);
+ f_status_t status = f_print_string_dynamic(file, start_color);
if (F_status_is_error(status)) return status;
}
va_end(ap);
if (end_color.used) {
- f_status status = f_print_string_dynamic(file, end_color);
+ f_status_t status = f_print_string_dynamic(file, end_color);
if (F_status_is_error(status)) return status;
}
#endif // _di_fl_color_print_
#ifndef _di_fl_color_print2_
- f_return_status fl_color_print2(FILE *file, const f_string_static start_color, const f_string_static extra_color, const f_string_static end_color, const f_string string, ...) {
+ f_return_status fl_color_print2(FILE *file, const f_string_static_t start_color, const f_string_static_t extra_color, const f_string_static_t end_color, const f_string_t string, ...) {
#ifndef _di_level_1_parameter_checking_
if (file == 0) return F_status_set_error(F_parameter);
if (string == 0) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
if (start_color.used) {
- f_status status = f_print_string_dynamic(file, start_color);
+ f_status_t status = f_print_string_dynamic(file, start_color);
if (F_status_is_error(status)) return status;
status = f_print_string_dynamic(file, extra_color);
va_end(ap);
if (end_color.used) {
- f_status status = f_print_string_dynamic(file, end_color);
+ f_status_t status = f_print_string_dynamic(file, end_color);
if (F_status_is_error(status)) return status;
}
#endif // _di_fl_color_print2_
#ifndef _di_fl_color_print_line_
- f_return_status fl_color_print_line(FILE *file, const f_string_static start_color, const f_string_static end_color, const f_string string, ...) {
+ f_return_status fl_color_print_line(FILE *file, const f_string_static_t start_color, const f_string_static_t end_color, const f_string_t string, ...) {
#ifndef _di_level_1_parameter_checking_
if (file == 0) return F_status_set_error(F_parameter);
if (string == 0) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
if (start_color.used) {
- f_status status = f_print_string_dynamic(file, start_color);
+ f_status_t status = f_print_string_dynamic(file, start_color);
if (F_status_is_error(status)) return status;
}
va_end(ap);
if (end_color.used) {
- f_status status = f_print_string_dynamic(file, end_color);
+ f_status_t status = f_print_string_dynamic(file, end_color);
if (F_status_is_error(status)) return status;
}
#endif // _di_fl_color_print_line_
#ifndef _di_fl_color_print2_line_
- f_return_status fl_color_print2_line(FILE *file, const f_string_static start_color, const f_string_static extra_color, const f_string_static end_color, const f_string string, ...) {
+ f_return_status fl_color_print2_line(FILE *file, const f_string_static_t start_color, const f_string_static_t extra_color, const f_string_static_t end_color, const f_string_t string, ...) {
#ifndef _di_level_1_parameter_checking_
if (file == 0) return F_status_set_error(F_parameter);
if (string == 0) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
if (start_color.used) {
- f_status status = f_print_string_dynamic(file, start_color);
+ f_status_t status = f_print_string_dynamic(file, start_color);
if (F_status_is_error(status)) return status;
status = f_print_string_dynamic(file, extra_color);
va_end(ap);
if (end_color.used) {
- f_status status = f_print_string_dynamic(file, end_color);
+ f_status_t status = f_print_string_dynamic(file, end_color);
if (F_status_is_error(status)) return status;
}
#endif // _di_fl_color_print2_line_
#ifndef _di_fl_color_print_code_
- f_return_status fl_color_print_code(FILE *file, const f_string_static color) {
+ f_return_status fl_color_print_code(FILE *file, const f_string_static_t color) {
if (color.used) {
- f_status status = f_print_string_dynamic(file, color);
+ f_status_t status = f_print_string_dynamic(file, color);
if (F_status_is_error(status)) return status;
}
#endif // _di_fl_color_print_code_
#ifndef _di_fl_color_load_context_
- f_return_status fl_color_load_context(fl_color_context *context, const bool use_light_colors) {
+ f_return_status fl_color_load_context(fl_color_context_t *context, const bool use_light_colors) {
#ifndef _di_level_1_parameter_checking_
if (context == 0) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- f_status status = F_none;
+ f_status_t status = F_none;
// switch to the appropriate terminal color mode
{
extern "C" {
#endif
-#ifndef _di_fl_color_context_
+#ifndef _di_fl_color_context_t_
typedef struct {
- f_color color_list;
- f_color_format color_format;
- f_color_mode mode;
- f_string_dynamic reset;
- f_string_dynamic warning;
- f_string_dynamic error;
- f_string_dynamic title;
- f_string_dynamic notable;
- f_string_dynamic important;
- f_string_dynamic standout;
- f_string_dynamic normal;
- f_string_dynamic normal_reset;
- } fl_color_context;
+ f_color_t color_list;
+ f_color_format_t color_format;
+ f_color_mode_t mode;
+ f_string_dynamic_t reset;
+ f_string_dynamic_t warning;
+ f_string_dynamic_t error;
+ f_string_dynamic_t title;
+ f_string_dynamic_t notable;
+ f_string_dynamic_t important;
+ f_string_dynamic_t standout;
+ f_string_dynamic_t normal;
+ f_string_dynamic_t normal_reset;
+ } fl_color_context_t;
- #define fl_color_context_initialize { f_color_initialize_linux, f_color_format_initialize_linux, f_color_mode_none, f_string_dynamic_initialize, f_string_dynamic_initialize, f_string_dynamic_initialize, f_string_dynamic_initialize, f_string_dynamic_initialize, f_string_dynamic_initialize, f_string_dynamic_initialize, f_string_dynamic_initialize, f_string_dynamic_initialize }
+ #define fl_color_context_t_initialize { f_color_t_initialize_linux, f_color_format_t_initialize_linux, f_color_mode_none, f_string_dynamic_t_initialize, f_string_dynamic_t_initialize, f_string_dynamic_t_initialize, f_string_dynamic_t_initialize, f_string_dynamic_t_initialize, f_string_dynamic_t_initialize, f_string_dynamic_t_initialize, f_string_dynamic_t_initialize, f_string_dynamic_t_initialize }
- #define fl_macro_color_context_new(status, color_context) \
- f_macro_string_dynamic_new(status, color_context.reset, f_color_max_size + 1); \
- if (F_status_is_not_error(status)) f_macro_string_dynamic_resize(status, color_context.warning, f_color_max_size + 1); \
- if (F_status_is_not_error(status)) f_macro_string_dynamic_resize(status, color_context.error, f_color_max_size + 1); \
- if (F_status_is_not_error(status)) f_macro_string_dynamic_resize(status, color_context.title, f_color_max_size + 1); \
- if (F_status_is_not_error(status)) f_macro_string_dynamic_resize(status, color_context.notable, f_color_max_size + 1); \
- if (F_status_is_not_error(status)) f_macro_string_dynamic_resize(status, color_context.important, f_color_max_size + 1); \
- if (F_status_is_not_error(status)) f_macro_string_dynamic_resize(status, color_context.standout, f_color_max_size + 1); \
- if (F_status_is_not_error(status)) f_macro_string_dynamic_resize(status, color_context.normal, f_color_max_size + 1); \
- if (F_status_is_not_error(status)) f_macro_string_dynamic_resize(status, color_context.normal_reset, f_color_max_size + 1);
+ #define fl_macro_color_context_t_new(status, color_context) \
+ f_macro_string_dynamic_t_new(status, color_context.reset, f_color_max_size + 1); \
+ if (F_status_is_not_error(status)) f_macro_string_dynamic_t_resize(status, color_context.warning, f_color_max_size + 1); \
+ if (F_status_is_not_error(status)) f_macro_string_dynamic_t_resize(status, color_context.error, f_color_max_size + 1); \
+ if (F_status_is_not_error(status)) f_macro_string_dynamic_t_resize(status, color_context.title, f_color_max_size + 1); \
+ if (F_status_is_not_error(status)) f_macro_string_dynamic_t_resize(status, color_context.notable, f_color_max_size + 1); \
+ if (F_status_is_not_error(status)) f_macro_string_dynamic_t_resize(status, color_context.important, f_color_max_size + 1); \
+ if (F_status_is_not_error(status)) f_macro_string_dynamic_t_resize(status, color_context.standout, f_color_max_size + 1); \
+ if (F_status_is_not_error(status)) f_macro_string_dynamic_t_resize(status, color_context.normal, f_color_max_size + 1); \
+ if (F_status_is_not_error(status)) f_macro_string_dynamic_t_resize(status, color_context.normal_reset, f_color_max_size + 1);
- #define fl_macro_color_context_delete(status, color_context) \
- f_macro_string_dynamic_delete(status, color_context.reset); \
- if (F_status_is_not_error(status)) f_macro_string_dynamic_delete(status, color_context.warning); \
- if (F_status_is_not_error(status)) f_macro_string_dynamic_delete(status, color_context.error); \
- if (F_status_is_not_error(status)) f_macro_string_dynamic_delete(status, color_context.title); \
- if (F_status_is_not_error(status)) f_macro_string_dynamic_delete(status, color_context.notable); \
- if (F_status_is_not_error(status)) f_macro_string_dynamic_delete(status, color_context.important); \
- if (F_status_is_not_error(status)) f_macro_string_dynamic_delete(status, color_context.standout); \
- if (F_status_is_not_error(status)) f_macro_string_dynamic_delete(status, color_context.normal); \
- if (F_status_is_not_error(status)) f_macro_string_dynamic_delete(status, color_context.normal_reset);
+ #define fl_macro_color_context_t_delete(status, color_context) \
+ f_macro_string_dynamic_t_delete(status, color_context.reset); \
+ if (F_status_is_not_error(status)) f_macro_string_dynamic_t_delete(status, color_context.warning); \
+ if (F_status_is_not_error(status)) f_macro_string_dynamic_t_delete(status, color_context.error); \
+ if (F_status_is_not_error(status)) f_macro_string_dynamic_t_delete(status, color_context.title); \
+ if (F_status_is_not_error(status)) f_macro_string_dynamic_t_delete(status, color_context.notable); \
+ if (F_status_is_not_error(status)) f_macro_string_dynamic_t_delete(status, color_context.important); \
+ if (F_status_is_not_error(status)) f_macro_string_dynamic_t_delete(status, color_context.standout); \
+ if (F_status_is_not_error(status)) f_macro_string_dynamic_t_delete(status, color_context.normal); \
+ if (F_status_is_not_error(status)) f_macro_string_dynamic_t_delete(status, color_context.normal_reset);
- #define fl_macro_color_context_destroy(status, color_context, size) \
- f_macro_string_dynamic_destroy(status, color_context.reset); \
- if (F_status_is_not_error(status)) f_macro_string_dynamic_destroy(status, color_context.warning, size); \
- if (F_status_is_not_error(status)) f_macro_string_dynamic_destroy(status, color_context.error, size); \
- if (F_status_is_not_error(status)) f_macro_string_dynamic_destroy(status, color_context.title, size); \
- if (F_status_is_not_error(status)) f_macro_string_dynamic_destroy(status, color_context.notable, size); \
- if (F_status_is_not_error(status)) f_macro_string_dynamic_destroy(status, color_context.important, size); \
- if (F_status_is_not_error(status)) f_macro_string_dynamic_destroy(status, color_context.standout, size); \
- if (F_status_is_not_error(status)) f_macro_string_dynamic_destroy(status, color_context.normal); \
- if (F_status_is_not_error(status)) f_macro_string_dynamic_destroy(status, color_context.normal_reset);
+ #define fl_macro_color_context_t_destroy(status, color_context, size) \
+ f_macro_string_dynamic_t_destroy(status, color_context.reset); \
+ if (F_status_is_not_error(status)) f_macro_string_dynamic_t_destroy(status, color_context.warning, size); \
+ if (F_status_is_not_error(status)) f_macro_string_dynamic_t_destroy(status, color_context.error, size); \
+ if (F_status_is_not_error(status)) f_macro_string_dynamic_t_destroy(status, color_context.title, size); \
+ if (F_status_is_not_error(status)) f_macro_string_dynamic_t_destroy(status, color_context.notable, size); \
+ if (F_status_is_not_error(status)) f_macro_string_dynamic_t_destroy(status, color_context.important, size); \
+ if (F_status_is_not_error(status)) f_macro_string_dynamic_t_destroy(status, color_context.standout, size); \
+ if (F_status_is_not_error(status)) f_macro_string_dynamic_t_destroy(status, color_context.normal); \
+ if (F_status_is_not_error(status)) f_macro_string_dynamic_t_destroy(status, color_context.normal_reset);
- #define fl_macro_color_context_delete_simple(color_context) \
- f_macro_string_dynamic_delete_simple(color_context.reset); \
- f_macro_string_dynamic_delete_simple(color_context.warning); \
- f_macro_string_dynamic_delete_simple(color_context.error); \
- f_macro_string_dynamic_delete_simple(color_context.title); \
- f_macro_string_dynamic_delete_simple(color_context.notable); \
- f_macro_string_dynamic_delete_simple(color_context.important); \
- f_macro_string_dynamic_delete_simple(color_context.standout); \
- f_macro_string_dynamic_delete_simple(color_context.normal); \
- f_macro_string_dynamic_delete_simple(color_context.normal_reset);
+ #define fl_macro_color_context_t_delete_simple(color_context) \
+ f_macro_string_dynamic_t_delete_simple(color_context.reset); \
+ f_macro_string_dynamic_t_delete_simple(color_context.warning); \
+ f_macro_string_dynamic_t_delete_simple(color_context.error); \
+ f_macro_string_dynamic_t_delete_simple(color_context.title); \
+ f_macro_string_dynamic_t_delete_simple(color_context.notable); \
+ f_macro_string_dynamic_t_delete_simple(color_context.important); \
+ f_macro_string_dynamic_t_delete_simple(color_context.standout); \
+ f_macro_string_dynamic_t_delete_simple(color_context.normal); \
+ f_macro_string_dynamic_t_delete_simple(color_context.normal_reset);
- #define fl_macro_color_context_destroy_simple(color_context, size) \
- f_macro_string_dynamic_destroy_simple(color_context.reset); \
- f_macro_string_dynamic_destroy_simple(color_context.warning, size); \
- f_macro_string_dynamic_destroy_simple(color_context.error, size); \
- f_macro_string_dynamic_destroy_simple(color_context.title, size); \
- f_macro_string_dynamic_destroy_simple(color_context.notable, size); \
- f_macro_string_dynamic_destroy_simple(color_context.important, size); \
- f_macro_string_dynamic_destroy_simple(color_context.standout, size); \
- f_macro_string_dynamic_destroy_simple(color_context.normal); \
- f_macro_string_dynamic_destroy_simple(color_context.normal_reset);
+ #define fl_macro_color_context_t_destroy_simple(color_context, size) \
+ f_macro_string_dynamic_t_destroy_simple(color_context.reset); \
+ f_macro_string_dynamic_t_destroy_simple(color_context.warning, size); \
+ f_macro_string_dynamic_t_destroy_simple(color_context.error, size); \
+ f_macro_string_dynamic_t_destroy_simple(color_context.title, size); \
+ f_macro_string_dynamic_t_destroy_simple(color_context.notable, size); \
+ f_macro_string_dynamic_t_destroy_simple(color_context.important, size); \
+ f_macro_string_dynamic_t_destroy_simple(color_context.standout, size); \
+ f_macro_string_dynamic_t_destroy_simple(color_context.normal); \
+ f_macro_string_dynamic_t_destroy_simple(color_context.normal_reset);
- #define fl_macro_color_context_resize(status, color_context) \
- f_macro_string_dynamic_resize(status, color_context.reset, f_color_max_size + 1); \
- if (F_status_is_not_error(status)) f_macro_string_dynamic_resize(status, color_context.warning, f_color_max_size + 1); \
- if (F_status_is_not_error(status)) f_macro_string_dynamic_resize(status, color_context.error, f_color_max_size + 1); \
- if (F_status_is_not_error(status)) f_macro_string_dynamic_resize(status, color_context.title, f_color_max_size + 1); \
- if (F_status_is_not_error(status)) f_macro_string_dynamic_resize(status, color_context.notable, f_color_max_size + 1); \
- if (F_status_is_not_error(status)) f_macro_string_dynamic_resize(status, color_context.important, f_color_max_size + 1); \
- if (F_status_is_not_error(status)) f_macro_string_dynamic_resize(status, color_context.standout, f_color_max_size + 1); \
- if (F_status_is_not_error(status)) f_macro_string_dynamic_resize(status, color_context.normal, f_color_max_size + 1); \
- if (F_status_is_not_error(status)) f_macro_string_dynamic_resize(status, color_context.normal_reset, f_color_max_size + 1);
+ #define fl_macro_color_context_t_resize(status, color_context) \
+ f_macro_string_dynamic_t_resize(status, color_context.reset, f_color_max_size + 1); \
+ if (F_status_is_not_error(status)) f_macro_string_dynamic_t_resize(status, color_context.warning, f_color_max_size + 1); \
+ if (F_status_is_not_error(status)) f_macro_string_dynamic_t_resize(status, color_context.error, f_color_max_size + 1); \
+ if (F_status_is_not_error(status)) f_macro_string_dynamic_t_resize(status, color_context.title, f_color_max_size + 1); \
+ if (F_status_is_not_error(status)) f_macro_string_dynamic_t_resize(status, color_context.notable, f_color_max_size + 1); \
+ if (F_status_is_not_error(status)) f_macro_string_dynamic_t_resize(status, color_context.important, f_color_max_size + 1); \
+ if (F_status_is_not_error(status)) f_macro_string_dynamic_t_resize(status, color_context.standout, f_color_max_size + 1); \
+ if (F_status_is_not_error(status)) f_macro_string_dynamic_t_resize(status, color_context.normal, f_color_max_size + 1); \
+ if (F_status_is_not_error(status)) f_macro_string_dynamic_t_resize(status, color_context.normal_reset, f_color_max_size + 1);
- #define fl_macro_color_context_adjust(status, color_context) \
- f_macro_string_dynamic_adjust(status, color_context.reset, f_color_max_size + 1); \
- if (F_status_is_not_error(status)) f_macro_string_dynamic_resize(status, color_context.warning, f_color_max_size + 1); \
- if (F_status_is_not_error(status)) f_macro_string_dynamic_resize(status, color_context.error, f_color_max_size + 1); \
- if (F_status_is_not_error(status)) f_macro_string_dynamic_resize(status, color_context.title, f_color_max_size + 1); \
- if (F_status_is_not_error(status)) f_macro_string_dynamic_resize(status, color_context.notable, f_color_max_size + 1); \
- if (F_status_is_not_error(status)) f_macro_string_dynamic_resize(status, color_context.important, f_color_max_size + 1); \
- if (F_status_is_not_error(status)) f_macro_string_dynamic_resize(status, color_context.standout, f_color_max_size + 1); \
- if (F_status_is_not_error(status)) f_macro_string_dynamic_resize(status, color_context.normal, f_color_max_size + 1); \
- if (F_status_is_not_error(status)) f_macro_string_dynamic_resize(status, color_context.normal_reset, f_color_max_size + 1);
-#endif // _di_fl_color_context_
+ #define fl_macro_color_context_t_adjust(status, color_context) \
+ f_macro_string_dynamic_t_adjust(status, color_context.reset, f_color_max_size + 1); \
+ if (F_status_is_not_error(status)) f_macro_string_dynamic_t_resize(status, color_context.warning, f_color_max_size + 1); \
+ if (F_status_is_not_error(status)) f_macro_string_dynamic_t_resize(status, color_context.error, f_color_max_size + 1); \
+ if (F_status_is_not_error(status)) f_macro_string_dynamic_t_resize(status, color_context.title, f_color_max_size + 1); \
+ if (F_status_is_not_error(status)) f_macro_string_dynamic_t_resize(status, color_context.notable, f_color_max_size + 1); \
+ if (F_status_is_not_error(status)) f_macro_string_dynamic_t_resize(status, color_context.important, f_color_max_size + 1); \
+ if (F_status_is_not_error(status)) f_macro_string_dynamic_t_resize(status, color_context.standout, f_color_max_size + 1); \
+ if (F_status_is_not_error(status)) f_macro_string_dynamic_t_resize(status, color_context.normal, f_color_max_size + 1); \
+ if (F_status_is_not_error(status)) f_macro_string_dynamic_t_resize(status, color_context.normal_reset, f_color_max_size + 1);
+#endif // _di_fl_color_context_t_
/**
* Given some file or standard io, and push color information to that file or standard io.
* F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_fl_color_set_
- extern f_return_status fl_color_set(FILE *file, const f_color_format format, const int8_t *color1, const int8_t *color2, const int8_t *color3, const int8_t *color4, const int8_t *color5);
+ extern f_return_status fl_color_set(FILE *file, const f_color_format_t format, const int8_t *color1, const int8_t *color2, const int8_t *color3, const int8_t *color4, const int8_t *color5);
#define fl_macro_color_set_1(file, format, color1) fl_color_set(file, format, color1, 0, 0, 0, 0)
#define fl_macro_color_set_2(file, format, color1, color2) fl_color_set(file, format, color1, color2, 0, 0, 0)
* F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_fl_color_save_
- extern f_return_status fl_color_save(f_string_dynamic *buffer, const f_color_format format, const int8_t *color1, const int8_t *color2, const int8_t *color3, const int8_t *color4, const int8_t *color5);
+ extern f_return_status fl_color_save(f_string_dynamic_t *buffer, const f_color_format_t format, const int8_t *color1, const int8_t *color2, const int8_t *color3, const int8_t *color4, const int8_t *color5);
#define fl_macro_color_save_1(buffer, format, color1) fl_color_save(buffer, format, color1, 0, 0, 0, 0)
#define fl_macro_color_save_2(buffer, format, color1, color2) fl_color_save(buffer, format, color1, color2, 0, 0, 0)
* Errors from (with error bit): f_print_string_dynamic().
*/
#ifndef _di_fl_color_print_
- extern f_return_status fl_color_print(FILE *file, const f_string_static start_color, const f_string_static end_color, const f_string string, ...);
+ extern f_return_status fl_color_print(FILE *file, const f_string_static_t start_color, const f_string_static_t end_color, const f_string_t string, ...);
#endif // _di_fl_color_print_
/**
* Errors from (with error bit): f_print_string_dynamic().
*/
#ifndef _di_fl_color_print2_
- extern f_return_status fl_color_print2(FILE *file, const f_string_static start_color, const f_string_static extra_color, const f_string_static end_color, const f_string string, ...);
+ extern f_return_status fl_color_print2(FILE *file, const f_string_static_t start_color, const f_string_static_t extra_color, const f_string_static_t end_color, const f_string_t string, ...);
#endif // _di_fl_color_print2_
/**
* Errors from (with error bit): f_print_string_dynamic().
*/
#ifndef _di_fl_color_print_line_
- extern f_return_status fl_color_print_line(FILE *file, const f_string_static start_color, const f_string_static end_color, const f_string string, ...);
+ extern f_return_status fl_color_print_line(FILE *file, const f_string_static_t start_color, const f_string_static_t end_color, const f_string_t string, ...);
#endif // _di_fl_color_print_line_
/**
* Errors from (with error bit): f_print_string_dynamic().
*/
#ifndef _di_fl_color_print2_line_
- extern f_return_status fl_color_print2_line(FILE *file, const f_string_static start_color, const f_string_static extra_color, const f_string_static end_color, const f_string string, ...);
+ extern f_return_status fl_color_print2_line(FILE *file, const f_string_static_t start_color, const f_string_static_t extra_color, const f_string_static_t end_color, const f_string_t string, ...);
#endif // _di_fl_color_print2_line_
/**
* Errors from (with error bit): f_print_string_dynamic().
*/
#ifndef _di_fl_color_print_code_
- extern f_return_status fl_color_print_code(FILE *file, const f_string_static color);
+ extern f_return_status fl_color_print_code(FILE *file, const f_string_static_t color);
#endif // _di_fl_color_print_code_
/**
* F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_fl_color_load_context_
- extern f_return_status fl_color_load_context(fl_color_context *context, const bool use_light_colors);
+ extern f_return_status fl_color_load_context(fl_color_context_t *context, const bool use_light_colors);
#endif // _di_fl_color_load_context_
#ifdef __cplusplus
#endif
#ifndef _fl_console_parameter_to_string_dynamic_directory_
- f_return_status fl_console_parameter_to_string_dynamic_directory(const f_string argument, f_string_dynamic *directory) {
+ f_return_status fl_console_parameter_to_string_dynamic_directory(const f_string_t argument, f_string_dynamic_t *directory) {
#ifndef _di_level_1_parameter_checking_
if (argument == 0) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- f_status status = F_none;
- f_string_length length = strlen(argument);
+ f_status_t status = F_none;
+ f_string_length_t length = strlen(argument);
if (length == 0) {
directory->used = 0;
} // while
if (argument[0] == '/') {
- f_string_length begin = 1;
+ f_string_length_t begin = 1;
while (begin < length && argument[begin] == '/') {
begin++;
if (length > 0) {
length += 2;
- f_macro_string_dynamic_new(status, (*directory), length);
+ f_macro_string_dynamic_t_new(status, (*directory), length);
if (F_status_is_error(status)) return status;
memcpy(directory->string + 1, argument + begin, length - 2);
directory->string[length - 1] = '/';
}
else {
- f_macro_string_dynamic_new(status, (*directory), 1);
+ f_macro_string_dynamic_t_new(status, (*directory), 1);
if (F_status_is_error(status)) return status;
directory->used = 1;
}
}
else if (length > 3 && argument[0] == '.' && argument[1] == '.' && argument[2] == '/') {
- f_string_length begin = 3;
+ f_string_length_t begin = 3;
while (begin < length && argument[begin] == '/') {
begin++;
if (length > 0) {
length += 4;
- f_macro_string_dynamic_new(status, (*directory), length);
+ f_macro_string_dynamic_t_new(status, (*directory), length);
if (F_status_is_error(status)) return status;
memcpy(directory->string + 3, argument + begin, length - 4);
directory->string[length - 1] = '/';
}
else {
- f_macro_string_dynamic_new(status, (*directory), 3);
+ f_macro_string_dynamic_t_new(status, (*directory), 3);
if (F_status_is_error(status)) return status;
directory->used = 3;
}
}
else if (length > 2 && argument[0] == '.' && argument[1] == '/') {
- f_string_length begin = 2;
+ f_string_length_t begin = 2;
while (begin < length && argument[begin] == '/') {
begin++;
if (length > 0) {
length += 3;
- f_macro_string_dynamic_new(status, (*directory), length);
+ f_macro_string_dynamic_t_new(status, (*directory), length);
if (F_status_is_error(status)) return status;
memcpy(directory->string + 2, argument + begin, length - 3);
directory->string[length - 1] = '/';
}
else {
- f_macro_string_dynamic_new(status, (*directory), 2);
+ f_macro_string_dynamic_t_new(status, (*directory), 2);
if (F_status_is_error(status)) return status;
directory->used = 2;
else {
length++;
- f_macro_string_dynamic_new(status, (*directory), length);
+ f_macro_string_dynamic_t_new(status, (*directory), length);
if (F_status_is_error(status)) return status;
memcpy(directory->string, argument, length - 1);
}
}
else if (argument[0] != '/') {
- f_macro_string_dynamic_new(status, (*directory), 2);
+ f_macro_string_dynamic_t_new(status, (*directory), 2);
if (F_status_is_error(status)) return status;
memcpy(directory->string, argument, 2);
directory->string[1] = '/';
}
else {
- f_macro_string_dynamic_new(status, (*directory), 1);
+ f_macro_string_dynamic_t_new(status, (*directory), 1);
if (F_status_is_error(status)) return status;
memcpy(directory->string, argument, 1);
* F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _fl_console_parameter_to_string_dynamic_directory_
- extern f_return_status fl_console_parameter_to_string_dynamic_directory(const f_string argument, f_string_dynamic *directory);
+ extern f_return_status fl_console_parameter_to_string_dynamic_directory(const f_string_t argument, f_string_dynamic_t *directory);
#endif // _fl_console_parameter_to_string_dynamic_directory_
#ifdef __cplusplus
#endif
#ifndef _di_fl_conversion_string_to_binary_signed_
- f_return_status fl_conversion_string_to_binary_signed(const f_string string, f_number_signed *number, const f_string_range range, const bool negative) {
+ f_return_status fl_conversion_string_to_binary_signed(const f_string_t string, f_number_signed_t *number, const f_string_range_t range, const bool negative) {
#ifndef _di_level_1_parameter_checking_
if (string == 0) return F_status_set_error(F_parameter);
if (number == 0) return F_status_set_error(F_parameter);
}
uint8_t scale = 0;
- f_number_unsigned digit = 0;
- f_number_unsigned converted = 0;
+ f_number_unsigned_t digit = 0;
+ f_number_unsigned_t converted = 0;
- for (f_string_length i = range.start; i <= range.stop; i++) {
+ for (f_string_length_t i = range.start; i <= range.stop; i++) {
if (f_conversion_character_to_binary(string[i], &digit) == F_none) {
if (scale) {
scale++;
#endif // _di_fl_conversion_string_to_binary_signed_
#ifndef _di_fl_conversion_string_to_binary_unsigned_
- f_return_status fl_conversion_string_to_binary_unsigned(const f_string string, f_number_unsigned *number, const f_string_range range) {
+ f_return_status fl_conversion_string_to_binary_unsigned(const f_string_t string, f_number_unsigned_t *number, const f_string_range_t range) {
#ifndef _di_level_1_parameter_checking_
if (string == 0) return F_status_set_error(F_parameter);
if (number == 0) return F_status_set_error(F_parameter);
}
uint8_t scale = 0;
- f_number_unsigned digit = 0;
- f_number_unsigned converted = 0;
+ f_number_unsigned_t digit = 0;
+ f_number_unsigned_t converted = 0;
- for (f_string_length i = range.start; i <= range.stop; i++) {
+ for (f_string_length_t i = range.start; i <= range.stop; i++) {
if (f_conversion_character_to_binary(string[i], &digit) == F_none) {
if (scale) {
scale++;
#endif // _di_fl_conversion_string_to_binary_unsigned_
#ifndef _di_fl_conversion_string_to_decimal_signed_
- f_return_status fl_conversion_string_to_decimal_signed(const f_string string, f_number_signed *number, const f_string_range range, const bool negative) {
+ f_return_status fl_conversion_string_to_decimal_signed(const f_string_t string, f_number_signed_t *number, const f_string_range_t range, const bool negative) {
#ifndef _di_level_1_parameter_checking_
if (string == 0) return F_status_set_error(F_parameter);
if (number == 0) return F_status_set_error(F_parameter);
}
uint8_t scale = 0;
- f_number_unsigned digit = 0;
- f_number_unsigned converted = 0;
+ f_number_unsigned_t digit = 0;
+ f_number_unsigned_t converted = 0;
- for (f_string_length i = range.start; i <= range.stop; i++) {
+ for (f_string_length_t i = range.start; i <= range.stop; i++) {
if (f_conversion_character_to_decimal(string[i], &digit) == F_none) {
if (scale) {
if (negative) {
if (scale > f_conversion_scale_decimal_signed) {
- if ((converted * 10) - digit < f_type_number_size_negative || (converted * 10) - digit > converted) {
+ if ((converted * 10) - digit < f_number_t_size_negative || (converted * 10) - digit > converted) {
return F_status_set_error(F_number_underflow);
}
}
}
else {
if (scale > f_conversion_scale_decimal_signed) {
- if ((converted * 10) + digit > f_type_number_size_positive || (converted * 10) + digit < converted) {
+ if ((converted * 10) + digit > f_number_t_size_positive || (converted * 10) + digit < converted) {
return F_status_set_error(F_number_overflow);
}
}
#endif // _di_fl_conversion_string_to_decimal_signed_
#ifndef _di_fl_conversion_string_to_decimal_unsigned_
- f_return_status fl_conversion_string_to_decimal_unsigned(const f_string string, f_number_unsigned *number, const f_string_range range) {
+ f_return_status fl_conversion_string_to_decimal_unsigned(const f_string_t string, f_number_unsigned_t *number, const f_string_range_t range) {
#ifndef _di_level_1_parameter_checking_
if (string == 0) return F_status_set_error(F_parameter);
if (number == 0) return F_status_set_error(F_parameter);
}
uint8_t scale = 0;
- f_number_unsigned digit = 0;
- f_number_unsigned converted = 0;
+ f_number_unsigned_t digit = 0;
+ f_number_unsigned_t converted = 0;
- for (f_string_length i = range.start; i <= range.stop; i++) {
+ for (f_string_length_t i = range.start; i <= range.stop; i++) {
if (f_conversion_character_to_decimal(string[i], &digit) == F_none) {
if (scale) {
scale++;
if (scale > f_conversion_scale_decimal_unsigned) {
- if ((converted * 10) + digit > f_type_number_size_unsigned || (converted * 10) + digit < converted) {
+ if ((converted * 10) + digit > f_number_t_size_unsigned || (converted * 10) + digit < converted) {
return F_status_set_error(F_number_overflow);
}
}
#endif // _di_fl_conversion_string_to_decimal_unsigned_
#ifndef _di_fl_conversion_string_to_duodecimal_signed_
- f_return_status fl_conversion_string_to_duodecimal_signed(const f_string string, f_number_signed *number, const f_string_range range, const bool negative) {
+ f_return_status fl_conversion_string_to_duodecimal_signed(const f_string_t string, f_number_signed_t *number, const f_string_range_t range, const bool negative) {
#ifndef _di_level_1_parameter_checking_
if (string == 0) return F_status_set_error(F_parameter);
if (number == 0) return F_status_set_error(F_parameter);
}
uint8_t scale = 0;
- f_number_unsigned digit = 0;
- f_number_unsigned converted = 0;
+ f_number_unsigned_t digit = 0;
+ f_number_unsigned_t converted = 0;
- for (f_string_length i = range.start; i <= range.stop; i++) {
+ for (f_string_length_t i = range.start; i <= range.stop; i++) {
if (f_conversion_character_to_duodecimal(string[i], &digit) == F_none) {
if (scale) {
if (negative) {
if (scale > f_conversion_scale_duodecimal_signed) {
- if ((converted * 12) - digit < f_type_number_size_negative || (converted * 12) - digit > converted) {
+ if ((converted * 12) - digit < f_number_t_size_negative || (converted * 12) - digit > converted) {
return F_status_set_error(F_number_underflow);
}
}
}
else {
if (scale > f_conversion_scale_duodecimal_signed) {
- if ((converted * 12) + digit > f_type_number_size_positive || (converted * 12) + digit < converted) {
+ if ((converted * 12) + digit > f_number_t_size_positive || (converted * 12) + digit < converted) {
return F_status_set_error(F_number_overflow);
}
}
#endif // _di_fl_conversion_string_to_duodecimal_signed_
#ifndef _di_fl_conversion_string_to_duodecimal_unsigned_
- f_return_status fl_conversion_string_to_duodecimal_unsigned(const f_string string, f_number_unsigned *number, const f_string_range range) {
+ f_return_status fl_conversion_string_to_duodecimal_unsigned(const f_string_t string, f_number_unsigned_t *number, const f_string_range_t range) {
#ifndef _di_level_1_parameter_checking_
if (string == 0) return F_status_set_error(F_parameter);
if (number == 0) return F_status_set_error(F_parameter);
}
uint8_t scale = 0;
- f_number_unsigned digit = 0;
- f_number_unsigned converted = 0;
+ f_number_unsigned_t digit = 0;
+ f_number_unsigned_t converted = 0;
- for (f_string_length i = range.start; i <= range.stop; i++) {
+ for (f_string_length_t i = range.start; i <= range.stop; i++) {
if (f_conversion_character_to_duodecimal(string[i], &digit) == F_none) {
if (scale) {
scale++;
if (scale > f_conversion_scale_duodecimal_unsigned) {
- if ((converted * 12) + digit > f_type_number_size_unsigned || (converted * 12) + digit < converted) {
+ if ((converted * 12) + digit > f_number_t_size_unsigned || (converted * 12) + digit < converted) {
return F_status_set_error(F_number_overflow);
}
}
#endif // _di_fl_conversion_string_to_duodecimal_unsigned_
#ifndef _di_fl_conversion_string_to_hexidecimal_signed_
- f_return_status fl_conversion_string_to_hexidecimal_signed(const f_string string, f_number_signed *number, const f_string_range range, const bool negative) {
+ f_return_status fl_conversion_string_to_hexidecimal_signed(const f_string_t string, f_number_signed_t *number, const f_string_range_t range, const bool negative) {
#ifndef _di_level_1_parameter_checking_
if (string == 0) return F_status_set_error(F_parameter);
if (number == 0) return F_status_set_error(F_parameter);
}
uint8_t scale = 0;
- f_number_unsigned digit = 0;
- f_number_unsigned converted = 0;
+ f_number_unsigned_t digit = 0;
+ f_number_unsigned_t converted = 0;
- for (f_string_length i = range.start; i <= range.stop; i++) {
+ for (f_string_length_t i = range.start; i <= range.stop; i++) {
if (f_conversion_character_to_hexidecimal(string[i], &digit) == F_none) {
if (scale) {
if (negative) {
if (scale > f_conversion_scale_hexidecimal_signed) {
- if ((converted << 4) - digit < f_type_number_size_negative || (converted << 4) - digit > converted) {
+ if ((converted << 4) - digit < f_number_t_size_negative || (converted << 4) - digit > converted) {
return F_status_set_error(F_number_underflow);
}
}
}
else {
if (scale > f_conversion_scale_hexidecimal_signed) {
- if ((converted << 4) + digit > f_type_number_size_positive || (converted << 4) + digit < converted) {
+ if ((converted << 4) + digit > f_number_t_size_positive || (converted << 4) + digit < converted) {
return F_status_set_error(F_number_overflow);
}
}
#endif // _di_fl_conversion_string_to_hexidecimal_signed_
#ifndef _di_fl_conversion_string_to_hexidecimal_unsigned_
- f_return_status fl_conversion_string_to_hexidecimal_unsigned(const f_string string, f_number_unsigned *number, const f_string_range range) {
+ f_return_status fl_conversion_string_to_hexidecimal_unsigned(const f_string_t string, f_number_unsigned_t *number, const f_string_range_t range) {
#ifndef _di_level_1_parameter_checking_
if (string == 0) return F_status_set_error(F_parameter);
if (number == 0) return F_status_set_error(F_parameter);
}
uint8_t scale = 0;
- f_number_unsigned digit = 0;
- f_number_unsigned converted = 0;
+ f_number_unsigned_t digit = 0;
+ f_number_unsigned_t converted = 0;
- for (f_string_length i = range.start; i <= range.stop; i++) {
+ for (f_string_length_t i = range.start; i <= range.stop; i++) {
if (f_conversion_character_to_hexidecimal(string[i], &digit) == F_none) {
if (scale) {
scale++;
if (scale > f_conversion_scale_hexidecimal_unsigned) {
- if ((converted << 4) + digit > f_type_number_size_unsigned || (converted << 4) + digit < converted) {
+ if ((converted << 4) + digit > f_number_t_size_unsigned || (converted << 4) + digit < converted) {
return F_status_set_error(F_number_overflow);
}
}
#endif // _di_fl_conversion_string_to_hexidecimal_unsigned_
#ifndef _di_fl_conversion_string_to_octal_signed_
- f_return_status fl_conversion_string_to_octal_signed(const f_string string, f_number_signed *number, const f_string_range range, const bool negative) {
+ f_return_status fl_conversion_string_to_octal_signed(const f_string_t string, f_number_signed_t *number, const f_string_range_t range, const bool negative) {
#ifndef _di_level_1_parameter_checking_
if (string == 0) return F_status_set_error(F_parameter);
if (number == 0) return F_status_set_error(F_parameter);
}
uint8_t scale = 0;
- f_number_unsigned digit = 0;
- f_number_unsigned converted = 0;
+ f_number_unsigned_t digit = 0;
+ f_number_unsigned_t converted = 0;
- for (f_string_length i = range.start; i <= range.stop; i++) {
+ for (f_string_length_t i = range.start; i <= range.stop; i++) {
if (f_conversion_character_to_octal(string[i], &digit) == F_none) {
if (scale) {
if (negative) {
if (scale > f_conversion_scale_octal_signed) {
- if ((converted << 3) - digit < f_type_number_size_negative || (converted << 3) - digit > converted) {
+ if ((converted << 3) - digit < f_number_t_size_negative || (converted << 3) - digit > converted) {
return F_status_set_error(F_number_underflow);
}
}
}
else {
if (scale > f_conversion_scale_octal_signed) {
- if ((converted << 3) + digit > f_type_number_size_positive || (converted << 3) + digit < converted) {
+ if ((converted << 3) + digit > f_number_t_size_positive || (converted << 3) + digit < converted) {
return F_status_set_error(F_number_overflow);
}
}
#endif // _di_fl_conversion_string_to_octal_signed_
#ifndef _di_fl_conversion_string_to_octal_unsigned_
- f_return_status fl_conversion_string_to_octal_unsigned(const f_string string, f_number_unsigned *number, const f_string_range range) {
+ f_return_status fl_conversion_string_to_octal_unsigned(const f_string_t string, f_number_unsigned_t *number, const f_string_range_t range) {
#ifndef _di_level_1_parameter_checking_
if (string == 0) return F_status_set_error(F_parameter);
if (number == 0) return F_status_set_error(F_parameter);
}
uint8_t scale = 0;
- f_number_unsigned digit = 0;
- f_number_unsigned converted = 0;
+ f_number_unsigned_t digit = 0;
+ f_number_unsigned_t converted = 0;
- for (f_string_length i = range.start; i <= range.stop; i++) {
+ for (f_string_length_t i = range.start; i <= range.stop; i++) {
if (f_conversion_character_to_octal(string[i], &digit) == F_none) {
if (scale) {
scale++;
if (scale > f_conversion_scale_octal_unsigned) {
- if ((converted << 3) + digit > f_type_number_size_unsigned || (converted << 3) + digit < converted) {
+ if ((converted << 3) + digit > f_number_t_size_unsigned || (converted << 3) + digit < converted) {
return F_status_set_error(F_number_overflow);
}
}
#endif // _di_fl_conversion_string_to_octal_unsigned_
#ifndef _di_fl_conversion_string_to_number_signed_
- f_return_status fl_conversion_string_to_number_signed(const f_string string, f_number_signed *number, const f_string_range range) {
+ f_return_status fl_conversion_string_to_number_signed(const f_string_t string, f_number_signed_t *number, const f_string_range_t range) {
#ifndef _di_level_1_parameter_checking_
if (string == 0) return F_status_set_error(F_parameter);
if (number == 0) return F_status_set_error(F_parameter);
uint8_t width_max = 0;
uint8_t mode = 0;
int8_t vector = 0; // 0 for assumed positive, 1 for explicit positive, -1 for negative.
- f_string_length j = 0;
- f_string_length offset = 0;
- f_status status = F_none;
+ f_string_length_t j = 0;
+ f_string_length_t offset = 0;
+ f_status_t status = F_none;
- for (f_string_length i = range.start; i <= range.stop; i++) {
+ for (f_string_length_t i = range.start; i <= range.stop; i++) {
width = f_macro_utf_byte_width_is(string[i]);
if (width == 0) {
return F_status_set_error(F_number);
}
- f_string_range location_offset = f_string_range_initialize;
+ f_string_range_t location_offset = f_string_range_initialize;
location_offset.start = range.start + offset;
location_offset.stop = range.stop;
#endif // _di_fl_conversion_string_to_number_signed_
#ifndef _di_fl_conversion_string_to_number_unsigned_
- f_return_status fl_conversion_string_to_number_unsigned(const f_string string, f_number_unsigned *number, const f_string_range range) {
+ f_return_status fl_conversion_string_to_number_unsigned(const f_string_t string, f_number_unsigned_t *number, const f_string_range_t range) {
#ifndef _di_level_1_parameter_checking_
if (string == 0) return F_status_set_error(F_parameter);
if (number == 0) return F_status_set_error(F_parameter);
uint8_t width = 0;
uint8_t width_max = 0;
uint8_t mode = 0;
- f_string_length j = 0;
- f_string_length offset = 0;
- f_status status = F_none;
+ f_string_length_t j = 0;
+ f_string_length_t offset = 0;
+ f_status_t status = F_none;
int8_t sign_found = 0;
- for (f_string_length i = range.start; i <= range.stop; i++) {
+ for (f_string_length_t i = range.start; i <= range.stop; i++) {
width = f_macro_utf_byte_width_is(string[i]);
if (width == 0) {
return F_status_set_error(F_number);
}
- f_string_range location_offset = f_string_range_initialize;
+ f_string_range_t location_offset = f_string_range_initialize;
location_offset.start = range.start + offset;
location_offset.stop = range.stop;
#endif
/**
- * Convert a series of positive or negative binary number characters into a f_number_signed.
+ * Convert a series of positive or negative binary number characters into a f_number_signed_t.
*
* This will stop at one of the following: location.stop or a non-digit.
* This will ignore NULL values.
* F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_fl_conversion_string_to_binary_signed_
- extern f_return_status fl_conversion_string_to_binary_signed(const f_string string, f_number_signed *number, const f_string_range range, const bool negative);
+ extern f_return_status fl_conversion_string_to_binary_signed(const f_string_t string, f_number_signed_t *number, const f_string_range_t range, const bool negative);
#endif // _di_fl_conversion_string_to_binary_signed_
/**
- * Convert a series of positive binary number characters into a f_number_unsigned.
+ * Convert a series of positive binary number characters into a f_number_unsigned_t.
*
* This will stop at one of the following: range.stop or a non-digit.
* This will ignore NULL values.
* F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_fl_conversion_string_to_binary_unsigned_
- extern f_return_status fl_conversion_string_to_binary_unsigned(const f_string string, f_number_unsigned *number, const f_string_range range);
+ extern f_return_status fl_conversion_string_to_binary_unsigned(const f_string_t string, f_number_unsigned_t *number, const f_string_range_t range);
#endif // _di_fl_conversion_string_to_binary_unsigned_
/**
- * Convert a series of positive or negative decimal number characters into an f_number_signed.
+ * Convert a series of positive or negative decimal number characters into an f_number_signed_t.
*
* This will stop at one of the following: range.stop or a non-digit.
* This will ignore NULL values.
* F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_fl_conversion_string_to_decimal_signed_
- extern f_return_status fl_conversion_string_to_decimal_signed(const f_string string, f_number_signed *number, const f_string_range range, const bool negative);
+ extern f_return_status fl_conversion_string_to_decimal_signed(const f_string_t string, f_number_signed_t *number, const f_string_range_t range, const bool negative);
#endif // _di_fl_conversion_string_to_decimal_signed_
/**
- * Convert a series of positive decimal number characters into an f_number_unsigned.
+ * Convert a series of positive decimal number characters into an f_number_unsigned_t.
*
* This will stop at one of the following: range.stop or a non-digit.
* This will ignore NULL values.
* F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_fl_conversion_string_to_decimal_unsigned_
- extern f_return_status fl_conversion_string_to_decimal_unsigned(const f_string string, f_number_unsigned *number, const f_string_range range);
+ extern f_return_status fl_conversion_string_to_decimal_unsigned(const f_string_t string, f_number_unsigned_t *number, const f_string_range_t range);
#endif // _di_fl_conversion_string_to_decimal_unsigned_
/**
- * Convert a series of positive or negative duodecimal number characters into an f_number_signed.
+ * Convert a series of positive or negative duodecimal number characters into an f_number_signed_t.
*
* This will stop at one of the following: range.stop or a non-digit.
* This will ignore NULL values.
* F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_fl_conversion_string_to_duodecimal_signed_
- extern f_return_status fl_conversion_string_to_duodecimal_signed(const f_string string, f_number_signed *number, const f_string_range range, const bool negative);
+ extern f_return_status fl_conversion_string_to_duodecimal_signed(const f_string_t string, f_number_signed_t *number, const f_string_range_t range, const bool negative);
#endif // _di_fl_conversion_string_to_duodecimal_signed_
/**
- * Convert a series of positive duodecimal number characters into an f_number_unsigned.
+ * Convert a series of positive duodecimal number characters into an f_number_unsigned_t.
*
* This will stop at one of the following: range.stop or a non-digit.
* This will ignore NULL values.
* F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_fl_conversion_string_to_duodecimal_unsigned_
- extern f_return_status fl_conversion_string_to_duodecimal_unsigned(const f_string string, f_number_unsigned *number, const f_string_range range);
+ extern f_return_status fl_conversion_string_to_duodecimal_unsigned(const f_string_t string, f_number_unsigned_t *number, const f_string_range_t range);
#endif // _di_fl_conversion_string_to_duodecimal_unsigned_
/**
- * Convert a series of positive or negative hexidecimal number characters into an f_number_signed.
+ * Convert a series of positive or negative hexidecimal number characters into an f_number_signed_t.
*
* This will stop at one of the following: range.stop or a non-digit.
* This will ignore NULL values.
* F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_fl_conversion_string_to_hexidecimal_signed_
- extern f_return_status fl_conversion_string_to_hexidecimal_signed(const f_string string, f_number_signed *number, const f_string_range range, const bool negative);
+ extern f_return_status fl_conversion_string_to_hexidecimal_signed(const f_string_t string, f_number_signed_t *number, const f_string_range_t range, const bool negative);
#endif // _di_fl_conversion_string_to_hexidecimal_signed_
/**
- * Convert a series of positive hexidecimal number characters into an f_number_unsigned.
+ * Convert a series of positive hexidecimal number characters into an f_number_unsigned_t.
*
* This will stop at one of the following: range.stop or a non-digit.
* This will ignore NULL values.
* F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_fl_conversion_string_to_hexidecimal_unsigned_
- extern f_return_status fl_conversion_string_to_hexidecimal_unsigned(const f_string string, f_number_unsigned *number, const f_string_range range);
+ extern f_return_status fl_conversion_string_to_hexidecimal_unsigned(const f_string_t string, f_number_unsigned_t *number, const f_string_range_t range);
#endif // _di_fl_conversion_string_to_hexidecimal_unsigned_
/**
- * Convert a series of positive or negative octal number characters into an f_number_signed.
+ * Convert a series of positive or negative octal number characters into an f_number_signed_t.
*
* This will stop at one of the following: range.stop or a non-digit.
* This will ignore NULL values.
* F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_fl_conversion_string_to_octal_signed_
- extern f_return_status fl_conversion_string_to_octal_signed(const f_string string, f_number_signed *number, const f_string_range range, const bool negative);
+ extern f_return_status fl_conversion_string_to_octal_signed(const f_string_t string, f_number_signed_t *number, const f_string_range_t range, const bool negative);
#endif // _di_fl_conversion_string_to_octal_signed_
/**
- * Convert a series of positive octal number characters into an f_number_unsigned.
+ * Convert a series of positive octal number characters into an f_number_unsigned_t.
*
* This will stop at one of the following: range.stop or a non-digit.
* This will ignore NULL values.
* F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_fl_conversion_string_to_octal_unsigned_
- extern f_return_status fl_conversion_string_to_octal_unsigned(const f_string string, f_number_unsigned *number, const f_string_range range);
+ extern f_return_status fl_conversion_string_to_octal_unsigned(const f_string_t string, f_number_unsigned_t *number, const f_string_range_t range);
#endif // _di_fl_conversion_string_to_octal_unsigned_
/**
- * Convert a series of positive or negative number characters into an f_number_signed.
+ * Convert a series of positive or negative number characters into an f_number_signed_t.
*
* This will stop at one of the following: range.stop or a non-digit.
* This will ignore NULL values.
* @see strtoll()
*/
#ifndef _di_fl_conversion_string_to_number_signed_
- extern f_return_status fl_conversion_string_to_number_signed(const f_string string, f_number_signed *number, const f_string_range range);
+ extern f_return_status fl_conversion_string_to_number_signed(const f_string_t string, f_number_signed_t *number, const f_string_range_t range);
#endif // _di_fl_conversion_string_to_number_signed_
/**
- * Convert a series of positive number characters into an f_number_unsigned.
+ * Convert a series of positive number characters into an f_number_unsigned_t.
*
* This will stop at one of the following: range.stop or a non-digit.
* This will ignore NULL values.
* @see strtoull()
*/
#ifndef _di_fl_conversion_string_to_number_unsigned_
- extern f_return_status fl_conversion_string_to_number_unsigned(const f_string string, f_number_unsigned *number, const f_string_range range);
+ extern f_return_status fl_conversion_string_to_number_unsigned(const f_string_t string, f_number_unsigned_t *number, const f_string_range_t range);
#endif // _di_fl_conversion_string_to_number_unsigned_
#ifdef __cplusplus
#endif
#ifndef _di_fl_directory_clone_
- f_return_status fl_directory_clone(const f_string source, const f_string destination, const f_string_length source_length, const f_string_length destination_length, const bool role, const f_number_unsigned size_block, const bool exclusive, FILE *verbose, f_directory_statuss *failures) {
+ f_return_status fl_directory_clone(const f_string_t source, const f_string_t destination, const f_string_length_t source_length, const f_string_length_t destination_length, const bool role, const f_number_unsigned_t size_block, const bool exclusive, FILE *verbose, f_directory_statuss_t *failures) {
#ifndef _di_level_1_parameter_checking_
if (source) return F_status_set_error(F_parameter);
if (destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- f_status status = f_directory_exists(source);
+ f_status_t status = f_directory_exists(source);
if (F_status_is_error(status)) return status;
if (status == F_false) return F_status_set_error(F_directory);
fprintf(verbose, "Cloned '%s' to '%s'.%c", source, destination, f_string_eol[0]);
}
- f_string_static static_source = { source, source_length, source_length };
- f_string_static static_destination = { destination, destination_length, destination_length };
+ f_string_static_t static_source = { source, source_length, source_length };
+ f_string_static_t static_destination = { destination, destination_length, destination_length };
// do not allow null termination or trailing path separators in the string's length calculation.
{
- f_string_length i = source_length;
+ f_string_length_t i = source_length;
for (; i > 0; i--, static_source.used--) {
if (source[i - 1] == 0) continue;
#endif // _di_fl_directory_clone_
#ifndef _di_fl_directory_clone_content_
- f_return_status fl_directory_clone_content(const f_string source, const f_string destination, const f_string_length source_length, const f_string_length destination_length, const bool role, const f_number_unsigned size_block, const bool exclusive, FILE *verbose, f_directory_statuss *failures) {
+ f_return_status fl_directory_clone_content(const f_string_t source, const f_string_t destination, const f_string_length_t source_length, const f_string_length_t destination_length, const bool role, const f_number_unsigned_t size_block, const bool exclusive, FILE *verbose, f_directory_statuss_t *failures) {
#ifndef _di_level_1_parameter_checking_
if (source) return F_status_set_error(F_parameter);
if (destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- f_status status = f_directory_exists(source);
+ f_status_t status = f_directory_exists(source);
if (F_status_is_error(status)) return status;
if (status == F_false) return F_status_set_error(F_directory);
if (F_status_is_error(status)) return status;
if (status == F_false) return F_status_set_error(F_directory);
- f_string_static static_source = { source, source_length, source_length };
- f_string_static static_destination = { destination, destination_length, destination_length };
+ f_string_static_t static_source = { source, source_length, source_length };
+ f_string_static_t static_destination = { destination, destination_length, destination_length };
// do not allow null termination or trailing path separators in the string's length calculation.
{
- f_string_length i = source_length;
+ f_string_length_t i = source_length;
for (; i > 0; i--, static_source.used--) {
if (source[i - 1] == 0) continue;
#endif // _di_fl_directory_clone_content_
#ifndef _di_fl_directory_copy_
- f_return_status fl_directory_copy(const f_string source, const f_string destination, const f_string_length source_length, const f_string_length destination_length, const f_mode mode, const f_number_unsigned size_block, const bool exclusive, FILE *verbose, f_directory_statuss *failures) {
+ f_return_status fl_directory_copy(const f_string_t source, const f_string_t destination, const f_string_length_t source_length, const f_string_length_t destination_length, const f_mode_t mode, const f_number_unsigned_t size_block, const bool exclusive, FILE *verbose, f_directory_statuss_t *failures) {
#ifndef _di_level_1_parameter_checking_
if (source) return F_status_set_error(F_parameter);
if (destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- f_status status = f_directory_exists(source);
+ f_status_t status = f_directory_exists(source);
if (F_status_is_error(status)) return status;
if (status == F_false) return F_status_set_error(F_directory);
fprintf(verbose, "Copied '%s' to '%s'.%c", source, destination, f_string_eol[0]);
}
- f_string_static static_source = { source, source_length, source_length };
- f_string_static static_destination = { destination, destination_length, destination_length };
+ f_string_static_t static_source = { source, source_length, source_length };
+ f_string_static_t static_destination = { destination, destination_length, destination_length };
// do not allow null termination or trailing path separators in the string's length calculation.
{
- f_string_length i = source_length;
+ f_string_length_t i = source_length;
for (; i > 0; i--, static_source.used--) {
if (source[i - 1] == 0) continue;
#endif // _di_fl_directory_copy_
#ifndef _di_fl_directory_copy_content_
- f_return_status fl_directory_copy_content(const f_string source, const f_string destination, const f_string_length source_length, const f_string_length destination_length, const f_mode mode, const f_number_unsigned size_block, const bool exclusive, FILE *verbose, f_directory_statuss *failures) {
+ f_return_status fl_directory_copy_content(const f_string_t source, const f_string_t destination, const f_string_length_t source_length, const f_string_length_t destination_length, const f_mode_t mode, const f_number_unsigned_t size_block, const bool exclusive, FILE *verbose, f_directory_statuss_t *failures) {
#ifndef _di_level_1_parameter_checking_
if (source) return F_status_set_error(F_parameter);
if (destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- f_status status = f_directory_exists(source);
+ f_status_t status = f_directory_exists(source);
if (F_status_is_error(status)) return status;
if (status == F_false) return F_status_set_error(F_directory);
if (F_status_is_error(status)) return status;
if (status == F_false) return F_status_set_error(F_directory);
- f_string_static static_source = { source, source_length, source_length };
- f_string_static static_destination = { destination, destination_length, destination_length };
+ f_string_static_t static_source = { source, source_length, source_length };
+ f_string_static_t static_destination = { destination, destination_length, destination_length };
// do not allow null termination or trailing path separators in the string's length calculation.
{
- f_string_length i = source_length;
+ f_string_length_t i = source_length;
for (; i > 0; i--, static_source.used--) {
if (source[i - 1] == 0) continue;
#endif // _di_fl_directory_copy_content_
#ifndef _di_fl_directory_list_
- f_return_status fl_directory_list(const f_string path, int (*filter)(const struct dirent *), int (*sort)(const struct dirent **, const struct dirent **), const bool dereference, f_directory_listing *listing) {
+ f_return_status fl_directory_list(const f_string_t path, int (*filter)(const struct dirent *), int (*sort)(const struct dirent **, const struct dirent **), const bool dereference, f_directory_listing_t *listing) {
#ifndef _di_level_1_parameter_checking_
if (path) return F_status_set_error(F_parameter);
if (listing == 0) return F_status_set_error(F_parameter);
#endif // _di_fl_directory_list_
#ifndef _di_fl_directory_path_pop_
- f_return_status fl_directory_path_pop(f_string_static *path) {
+ f_return_status fl_directory_path_pop(f_string_static_t *path) {
#ifndef _di_level_0_parameter_checking_
if (path->used > path->size) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
const bool null_terminated = path->string[path->used] == 0;
bool first_nulless = F_false;
- f_string_length i = path->used - 1;
- f_string_length j = 0;
+ f_string_length_t i = path->used - 1;
+ f_string_length_t j = 0;
- f_status status = F_none;
+ f_status_t status = F_none;
for (; i > 0; i--) {
if (path->string[i] == 0) continue;
#endif // _di_fl_directory_path_pop_
#ifndef _di_fl_directory_path_push_
- f_return_status fl_directory_path_push(const f_string source, f_string_length length, f_string_dynamic *destination) {
+ f_return_status fl_directory_path_push(const f_string_t source, f_string_length_t length, f_string_dynamic_t *destination) {
#ifndef _di_level_0_parameter_checking_
if (source) return F_status_set_error(F_parameter);
if (destination->used > destination->size) return F_status_set_error(F_parameter);
#endif // _di_fl_directory_path_push_
#ifndef _di_fl_directory_path_push_dynamic_
- f_return_status fl_directory_path_push_dynamic(const f_string_static source, f_string_dynamic *destination) {
+ f_return_status fl_directory_path_push_dynamic(const f_string_static_t source, f_string_dynamic_t *destination) {
#ifndef _di_level_0_parameter_checking_
if (source.used > source.size) return F_status_set_error(F_parameter);
if (destination->used > destination->size) return F_status_set_error(F_parameter);
* @see f_file_clone()
*/
#ifndef _di_fl_directory_clone_
- extern f_return_status fl_directory_clone(const f_string source, const f_string destination, const f_string_length source_length, const f_string_length destination_length, const bool role, const f_number_unsigned size_block, const bool exclusive, FILE *verbose, f_directory_statuss *failures);
+ extern f_return_status fl_directory_clone(const f_string_t source, const f_string_t destination, const f_string_length_t source_length, const f_string_length_t destination_length, const bool role, const f_number_unsigned_t size_block, const bool exclusive, FILE *verbose, f_directory_statuss_t *failures);
#endif // _di_fl_directory_clone_
/**
* @see f_file_clone()
*/
#ifndef _di_fl_directory_clone_content_
- extern f_return_status fl_directory_clone_content(const f_string source, const f_string destination, const f_string_length source_length, const f_string_length destination_length, const bool role, const f_number_unsigned size_block, const bool exclusive, FILE *verbose, f_directory_statuss *failures);
+ extern f_return_status fl_directory_clone_content(const f_string_t source, const f_string_t destination, const f_string_length_t source_length, const f_string_length_t destination_length, const bool role, const f_number_unsigned_t size_block, const bool exclusive, FILE *verbose, f_directory_statuss_t *failures);
#endif // _di_fl_directory_clone_content_
/**
* @see f_file_copy()
*/
#ifndef _di_fl_directory_copy_
- extern f_return_status fl_directory_copy(const f_string source, const f_string destination, const f_string_length source_length, const f_string_length destination_length, const f_mode mode, const f_number_unsigned size_block, const bool exclusive, FILE *verbose, f_directory_statuss *failures);
+ extern f_return_status fl_directory_copy(const f_string_t source, const f_string_t destination, const f_string_length_t source_length, const f_string_length_t destination_length, const f_mode_t mode, const f_number_unsigned_t size_block, const bool exclusive, FILE *verbose, f_directory_statuss_t *failures);
#endif // _di_fl_directory_copy_
/**
* @see f_file_copy()
*/
#ifndef _di_fl_directory_copy_content_
- extern f_return_status fl_directory_copy_content(const f_string source, const f_string destination, const f_string_length source_length, const f_string_length destination_length, const f_mode mode, const f_number_unsigned size_block, const bool exclusive, FILE *verbose, f_directory_statuss *failures);
+ extern f_return_status fl_directory_copy_content(const f_string_t source, const f_string_t destination, const f_string_length_t source_length, const f_string_length_t destination_length, const f_mode_t mode, const f_number_unsigned_t size_block, const bool exclusive, FILE *verbose, f_directory_statuss_t *failures);
#endif // _di_fl_directory_copy_content_
/**
* @see versionsort()
*/
#ifndef _di_fl_directory_list_
- extern f_return_status fl_directory_list(const f_string path, int (*filter)(const struct dirent *), int (*sort)(const struct dirent **, const struct dirent **), const bool dereference, f_directory_listing *listing);
+ extern f_return_status fl_directory_list(const f_string_t path, int (*filter)(const struct dirent *), int (*sort)(const struct dirent **, const struct dirent **), const bool dereference, f_directory_listing_t *listing);
#endif // _di_fl_directory_list_
/**
* F_string_too_large (with error bit) if appended string length is too large to store in the buffer.
*/
#ifndef _di_fl_directory_path_pop_
- extern f_return_status fl_directory_path_pop(f_string_static *path);
+ extern f_return_status fl_directory_path_pop(f_string_static_t *path);
#endif // _di_fl_directory_path_pop_
/**
* Errors from (with error bit): f_utf_is_control().
*/
#ifndef _di_fl_directory_path_push_
- extern f_return_status fl_directory_path_push(const f_string source, f_string_length length, f_string_dynamic *destination);
+ extern f_return_status fl_directory_path_push(const f_string_t source, f_string_length_t length, f_string_dynamic_t *destination);
#endif // _di_fl_directory_path_push_
/**
* Errors from (with error bit): f_utf_is_control().
*/
#ifndef _di_fl_directory_path_push_dynamic_
- extern f_return_status fl_directory_path_push_dynamic(const f_string_static source, f_string_dynamic *destination);
+ extern f_return_status fl_directory_path_push_dynamic(const f_string_static_t source, f_string_dynamic_t *destination);
#endif // _di_fl_directory_path_push_dynamic_
#ifdef __cplusplus
#endif
#if !defined(_di_fl_directory_clone_)
- f_return_status private_fl_directory_clone(const f_string_static source, const f_string_static destination, const bool role, const f_number_unsigned size_block, const bool exclusive, FILE *verbose, f_directory_statuss *failures) {
- f_status status = F_none;
- f_directory_listing listing = f_directory_listing_initialize;
+ f_return_status private_fl_directory_clone(const f_string_static_t source, const f_string_static_t destination, const bool role, const f_number_unsigned_t size_block, const bool exclusive, FILE *verbose, f_directory_statuss_t *failures) {
+ f_status_t status = F_none;
+ f_directory_listing_t listing = f_directory_listing_t_initialize;
status = private_fl_directory_list(source.string, 0, 0, F_false, &listing);
if (F_status_is_error(status)) {
- f_macro_directory_listing_delete_simple(listing);
+ f_macro_directory_listing_t_delete_simple(listing);
return status;
}
status = F_none;
- f_array_length i = 0;
+ f_array_length_t i = 0;
int directory_fd = 0;
- f_string_length failures_used = failures ? failures->used : 0;
+ f_string_length_t failures_used = failures ? failures->used : 0;
for (; F_status_is_fine(status) && i < listing.block.used; i++) {
status = private_fl_directory_clone_file(listing.block.array[i], source, destination, role, size_block, exclusive, verbose, failures);
} // for
- f_macro_string_dynamics_delete_simple(listing.block);
+ f_macro_string_dynamics_t_delete_simple(listing.block);
for (i = 0; F_status_is_fine(status) && i < listing.character.used; i++) {
status = private_fl_directory_clone_file(listing.character.array[i], source, destination, role, size_block, exclusive, verbose, failures);
} // for
- f_macro_string_dynamics_delete_simple(listing.character);
+ f_macro_string_dynamics_t_delete_simple(listing.character);
for (i = 0; F_status_is_fine(status) && i < listing.regular.used; i++) {
status = private_fl_directory_clone_file(listing.regular.array[i], source, destination, role, size_block, exclusive, verbose, failures);
} // for
- f_macro_string_dynamics_delete_simple(listing.regular);
+ f_macro_string_dynamics_t_delete_simple(listing.regular);
for (i = 0; F_status_is_fine(status) && i < listing.link.used; i++) {
status = private_fl_directory_clone_file(listing.link.array[i], source, destination, role, size_block, exclusive, verbose, failures);
} // for
- f_macro_string_dynamics_delete_simple(listing.link);
+ f_macro_string_dynamics_t_delete_simple(listing.link);
for (i = 0; F_status_is_fine(status) && i < listing.socket.used; i++) {
status = private_fl_directory_clone_file(listing.socket.array[i], source, destination, role, size_block, exclusive, verbose, failures);
} // for
- f_macro_string_dynamics_delete_simple(listing.socket);
+ f_macro_string_dynamics_t_delete_simple(listing.socket);
for (i = 0; F_status_is_fine(status) && i < listing.unknown.used; i++) {
status = private_fl_directory_clone_file(listing.unknown.array[i], source, destination, role, size_block, exclusive, verbose, failures);
} // for
- f_macro_string_dynamics_delete_simple(listing.unknown);
+ f_macro_string_dynamics_t_delete_simple(listing.unknown);
for (i = 0; F_status_is_fine(status) && i < listing.directory.used; i++) {
- f_string_static source_sub = f_string_static_initialize;
- f_string_static destination_sub = f_string_static_initialize;
+ f_string_static_t source_sub = f_string_static_t_initialize;
+ f_string_static_t destination_sub = f_string_static_t_initialize;
source_sub.used = source.used + listing.directory.array[i].used + 1;
source_sub.size = source_sub.used;
status = private_fl_directory_clone(source_sub, destination_sub, role, size_block, exclusive, verbose, failures);
} // for
- f_macro_string_dynamics_delete_simple(listing.directory);
+ f_macro_string_dynamics_t_delete_simple(listing.directory);
if (F_status_is_error(status)) return status;
#endif // !defined(_di_fl_directory_clone_)
#if !defined(_di_fl_directory_clone_file_)
- f_return_status private_fl_directory_clone_file(const f_string_static file, const f_string_static source, const f_string_static destination, const bool role, const f_number_unsigned size_block, const bool exclusive, FILE *verbose, f_directory_statuss *failures) {
+ f_return_status private_fl_directory_clone_file(const f_string_static_t file, const f_string_static_t source, const f_string_static_t destination, const bool role, const f_number_unsigned_t size_block, const bool exclusive, FILE *verbose, f_directory_statuss_t *failures) {
char path_source[source.used + file.used + 2];
char path_destination[destination.used + file.used + 2];
path_destination[destination.used] = f_path_separator[0];
path_destination[destination.used + file.used + 1] = 0;
- f_status status = f_file_clone(path_source, path_destination, role, size_block, exclusive);
+ f_status_t status = f_file_clone(path_source, path_destination, role, size_block, exclusive);
if (F_status_is_error(status) || status == F_unsupported) {
if (status == F_status_set_error(F_memory_allocation) || status == F_status_set_error(F_memory_reallocation)) {
if (!failures) return F_failure;
- const f_status status_failure = status;
+ const f_status_t status_failure = status;
- f_macro_memory_structure_macro_increment(status, (*failures), 1, f_memory_default_allocation_step, f_macro_directory_statuss_resize, F_buffer_too_large);
+ f_macro_memory_structure_macro_increment(status, (*failures), 1, f_memory_default_allocation_step, f_macro_directory_statuss_t_resize, F_buffer_too_large);
if (F_status_is_error(status)) return status;
- f_directory_status failure = f_directory_status_initialize;
- f_string_length size = 0;
+ f_directory_status_t failure = f_directory_status_t_initialize;
+ f_string_length_t size = 0;
// identify if failure was because of source or destination.
struct stat source_stat;
status = f_file_stat(source.string, F_false, &source_stat);
if (F_status_is_error(status)) {
if (status == F_status_set_error(F_string_too_large)) {
- size = f_string_length_size - 1;
+ size = f_string_length_t_size - 1;
}
else {
size = source.used + file.used + 1;
}
- f_macro_directory_status_resize(status, failure, size + 1);
+ f_macro_directory_status_t_resize(status, failure, size + 1);
if (F_status_is_error(status)) return status;
memcpy(failure.path.string, path_source, size);
}
else {
if (status == F_status_set_error(F_string_too_large)) {
- size = f_string_length_size - 1;
+ size = f_string_length_t_size - 1;
}
else {
size = destination.used + file.used + 1;
}
- f_macro_directory_status_resize(status, failure, size + 1);
+ f_macro_directory_status_t_resize(status, failure, size + 1);
if (F_status_is_error(status)) return status;
memcpy(failure.path.string, path_destination, size);
#endif // !defined(_di_fl_directory_clone_file_)
#if !defined(_di_fl_directory_copy_)
- f_return_status private_fl_directory_copy(const f_string_static source, const f_string_static destination, const f_mode mode, const f_number_unsigned size_block, const bool exclusive, FILE *verbose, f_directory_statuss *failures) {
- f_status status = F_none;
- f_directory_listing listing = f_directory_listing_initialize;
+ f_return_status private_fl_directory_copy(const f_string_static_t source, const f_string_static_t destination, const f_mode_t mode, const f_number_unsigned_t size_block, const bool exclusive, FILE *verbose, f_directory_statuss_t *failures) {
+ f_status_t status = F_none;
+ f_directory_listing_t listing = f_directory_listing_t_initialize;
status = private_fl_directory_list(source.string, 0, 0, F_false, &listing);
if (F_status_is_error(status)) {
- f_macro_directory_listing_delete_simple(listing);
+ f_macro_directory_listing_t_delete_simple(listing);
return status;
}
status = F_none;
- f_array_length i = 0;
+ f_array_length_t i = 0;
int directory_fd = 0;
- f_string_length failures_used = failures ? failures->used : 0;
+ f_string_length_t failures_used = failures ? failures->used : 0;
for (; F_status_is_fine(status) && i < listing.block.used; i++) {
status = private_fl_directory_copy_file(listing.block.array[i], source, destination, mode, size_block, exclusive, verbose, failures);
} // for
- f_macro_string_dynamics_delete_simple(listing.block);
+ f_macro_string_dynamics_t_delete_simple(listing.block);
for (i = 0; F_status_is_fine(status) && i < listing.character.used; i++) {
status = private_fl_directory_copy_file(listing.character.array[i], source, destination, mode, size_block, exclusive, verbose, failures);
} // for
- f_macro_string_dynamics_delete_simple(listing.character);
+ f_macro_string_dynamics_t_delete_simple(listing.character);
for (i = 0; F_status_is_fine(status) && i < listing.fifo.used; i++) {
status = private_fl_directory_copy_file(listing.fifo.array[i], source, destination, mode, size_block, exclusive, verbose, failures);
} // for
- f_macro_string_dynamics_delete_simple(listing.fifo);
+ f_macro_string_dynamics_t_delete_simple(listing.fifo);
for (i = 0; F_status_is_fine(status) && i < listing.regular.used; i++) {
status = private_fl_directory_copy_file(listing.regular.array[i], source, destination, mode, size_block, exclusive, verbose, failures);
} // for
- f_macro_string_dynamics_delete_simple(listing.regular);
+ f_macro_string_dynamics_t_delete_simple(listing.regular);
for (i = 0; F_status_is_fine(status) && i < listing.link.used; i++) {
status = private_fl_directory_copy_file(listing.link.array[i], source, destination, mode, size_block, exclusive, verbose, failures);
} // for
- f_macro_string_dynamics_delete_simple(listing.link);
+ f_macro_string_dynamics_t_delete_simple(listing.link);
for (i = 0; F_status_is_fine(status) && i < listing.socket.used; i++) {
status = private_fl_directory_copy_file(listing.socket.array[i], source, destination, mode, size_block, exclusive, verbose, failures);
} // for
- f_macro_string_dynamics_delete_simple(listing.socket);
+ f_macro_string_dynamics_t_delete_simple(listing.socket);
for (i = 0; F_status_is_fine(status) && i < listing.unknown.used; i++) {
status = private_fl_directory_copy_file(listing.unknown.array[i], source, destination, mode, size_block, exclusive, verbose, failures);
} // for
- f_macro_string_dynamics_delete_simple(listing.unknown);
+ f_macro_string_dynamics_t_delete_simple(listing.unknown);
for (i = 0; F_status_is_fine(status) && i < listing.directory.used; i++) {
- f_string_static source_sub = f_string_static_initialize;
- f_string_static destination_sub = f_string_static_initialize;
+ f_string_static_t source_sub = f_string_static_t_initialize;
+ f_string_static_t destination_sub = f_string_static_t_initialize;
source_sub.used = source.used + listing.directory.array[i].used + 1;
source_sub.size = source_sub.used;
status = private_fl_directory_copy(source_sub, destination_sub, mode, size_block, exclusive, verbose, failures);
} // for
- f_macro_string_dynamics_delete_simple(listing.directory);
+ f_macro_string_dynamics_t_delete_simple(listing.directory);
if (F_status_is_error(status)) return status;
#endif // !defined(_di_fl_directory_copy_)
#if !defined(_di_fl_directory_copy_file_)
- f_return_status private_fl_directory_copy_file(const f_string_static file, const f_string_static source, const f_string_static destination, const f_mode mode, const f_number_unsigned size_block, const bool exclusive, FILE *verbose, f_directory_statuss *failures) {
+ f_return_status private_fl_directory_copy_file(const f_string_static_t file, const f_string_static_t source, const f_string_static_t destination, const f_mode_t mode, const f_number_unsigned_t size_block, const bool exclusive, FILE *verbose, f_directory_statuss_t *failures) {
char path_source[source.used + file.used + 2];
char path_destination[destination.used + file.used + 2];
path_destination[destination.used] = f_path_separator[0];
path_destination[destination.used + file.used + 1] = 0;
- f_status status = f_file_copy(path_source, path_destination, mode, size_block, exclusive);
+ f_status_t status = f_file_copy(path_source, path_destination, mode, size_block, exclusive);
if (F_status_is_error(status) || status == F_unsupported) {
if (status == F_status_set_error(F_memory_allocation) || status == F_status_set_error(F_memory_reallocation)) {
if (!failures) return F_failure;
- const f_status status_failure = status;
+ const f_status_t status_failure = status;
- f_macro_memory_structure_macro_increment(status, (*failures), 1, f_memory_default_allocation_step, f_macro_directory_statuss_resize, F_buffer_too_large);
+ f_macro_memory_structure_macro_increment(status, (*failures), 1, f_memory_default_allocation_step, f_macro_directory_statuss_t_resize, F_buffer_too_large);
if (F_status_is_error(status)) return status;
- f_directory_status failure = f_directory_status_initialize;
- f_string_length size = 0;
+ f_directory_status_t failure = f_directory_status_t_initialize;
+ f_string_length_t size = 0;
// identify if failure was because of source or destination.
struct stat source_stat;
status = f_file_stat(source.string, F_false, &source_stat);
if (F_status_is_error(status)) {
if (status == F_status_set_error(F_string_too_large)) {
- size = f_string_length_size - 1;
+ size = f_string_length_t_size - 1;
}
else {
size = source.used + file.used + 1;
}
- f_macro_directory_status_resize(status, failure, size + 1);
+ f_macro_directory_status_t_resize(status, failure, size + 1);
if (F_status_is_error(status)) return status;
memcpy(failure.path.string, path_source, size);
}
else {
if (status == F_status_set_error(F_string_too_large)) {
- size = f_string_length_size - 1;
+ size = f_string_length_t_size - 1;
}
else {
size = destination.used + file.used + 1;
}
- f_macro_directory_status_resize(status, failure, size + 1);
+ f_macro_directory_status_t_resize(status, failure, size + 1);
if (F_status_is_error(status)) return status;
memcpy(failure.path.string, path_destination, size);
#endif // !defined(_di_fl_directory_copy_file_)
#if !defined(_di_fl_directory_list_)
- f_return_status private_fl_directory_list(const f_string path, int (*filter)(const struct dirent *), int (*sort)(const struct dirent **, const struct dirent **), const bool dereference, f_directory_listing *listing) {
+ f_return_status private_fl_directory_list(const f_string_t path, int (*filter)(const struct dirent *), int (*sort)(const struct dirent **, const struct dirent **), const bool dereference, f_directory_listing_t *listing) {
struct dirent **entity = 0;
- f_string_length size = 0;
- f_status status = F_none;
+ f_string_length_t size = 0;
+ f_status_t status = F_none;
DIR *parent = opendir(path);
else return F_status_set_error(F_failure);
}
- f_string_dynamics *names = 0;
- f_string_length total = 0;
+ f_string_dynamics_t *names = 0;
+ f_string_length_t total = 0;
struct stat file_stat;
int mode = 0;
size_t i = 0;
if (F_status_is_error(status)) break;
}
- f_macro_string_dynamic_new(status, names->array[names->used], size);
+ f_macro_string_dynamic_t_new(status, names->array[names->used], size);
if (F_status_is_error(status)) break;
if (names->array[names->used].used > 0 && names->array[names->used].string[names->array[names->used].used - 1] != 0) {
- if (names->array[names->used].used == f_string_length_size) {
+ if (names->array[names->used].used == f_string_length_t_size) {
status = F_status_set_error(F_string_too_large);
break;
}
total = names->array[names->used].used + 1;
if (total > names->array[names->used].size) {
- f_status status = F_none;
+ f_status_t status = F_none;
f_macro_string_dynamics_resize(status, (*names), total);
if (F_status_is_error(status)) break;
#endif // !defined(_di_fl_directory_list_)
#if !defined(_di_fl_directory_path_push_) || !defined(_di_fl_directory_path_push_dynamic_)
- f_return_status private_fl_directory_path_push(const f_string source, const f_string_length length, f_string_dynamic *destination) {
+ f_return_status private_fl_directory_path_push(const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination) {
bool terminated_null = F_false;
bool separator_prepend = F_false;
bool separator_append = F_false;
- f_string_length total = 0;
- f_string_length start = 0;
- f_string_length length_truncated = length;
- f_status status = F_none;
+ f_string_length_t total = 0;
+ f_string_length_t start = 0;
+ f_string_length_t length_truncated = length;
+ f_status_t status = F_none;
{
- f_string_length i = 0;
- f_string_length j = 0;
+ f_string_length_t i = 0;
+ f_string_length_t j = 0;
if (destination->used > 0) {
if (destination->string[destination->used - 1] == 0) {
total += length_truncated - start;
if (destination->used + total > destination->size) {
- if (destination->used + total > f_string_length_size) {
+ if (destination->used + total > f_string_length_t_size) {
return F_status_set_error(F_string_too_large);
}
- f_macro_string_dynamic_resize(status, (*destination), destination->used + total);
+ f_macro_string_dynamic_t_resize(status, (*destination), destination->used + total);
if (F_status_is_error(status)) return status;
}
}
* @see fl_directory_clone()
*/
#if !defined(_di_fl_directory_clone_)
- extern f_return_status private_fl_directory_clone(const f_string_static source, const f_string_static destination, const bool role, const f_number_unsigned size_block, const bool exclusive, FILE *verbose, f_directory_statuss *failures) f_gcc_attribute_visibility_internal;
+ extern f_return_status private_fl_directory_clone(const f_string_static_t source, const f_string_static_t destination, const bool role, const f_number_unsigned_t size_block, const bool exclusive, FILE *verbose, f_directory_statuss_t *failures) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_fl_directory_clone_)
/**
* @see fl_directory_clone()
*/
#if !defined(_di_fl_directory_clone_file_)
- extern f_return_status private_fl_directory_clone_file(const f_string_static file, const f_string_static source, const f_string_static destination, const bool role, const f_number_unsigned size_block, const bool exclusive, FILE *verbose, f_directory_statuss *failures) f_gcc_attribute_visibility_internal;
+ extern f_return_status private_fl_directory_clone_file(const f_string_static_t file, const f_string_static_t source, const f_string_static_t destination, const bool role, const f_number_unsigned_t size_block, const bool exclusive, FILE *verbose, f_directory_statuss_t *failures) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_fl_directory_clone_file_)
/**
* @see fl_directory_copy()
*/
#if !defined(_di_fl_directory_copy_)
- extern f_return_status private_fl_directory_copy(const f_string_static source, const f_string_static destination, const f_mode mode, const f_number_unsigned size_block, const bool exclusive, FILE *verbose, f_directory_statuss *failures) f_gcc_attribute_visibility_internal;
+ extern f_return_status private_fl_directory_copy(const f_string_static_t source, const f_string_static_t destination, const f_mode_t mode, const f_number_unsigned_t size_block, const bool exclusive, FILE *verbose, f_directory_statuss_t *failures) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_fl_directory_copy_)
/**
* @see fl_directory_copy()
*/
#if !defined(_di_fl_directory_copy_file_)
- extern f_return_status private_fl_directory_copy_file(const f_string_static file, const f_string_static source, const f_string_static destination, const f_mode mode, const f_number_unsigned size_block, const bool exclusive, FILE *verbose, f_directory_statuss *failures) f_gcc_attribute_visibility_internal;
+ extern f_return_status private_fl_directory_copy_file(const f_string_static_t file, const f_string_static_t source, const f_string_static_t destination, const f_mode_t mode, const f_number_unsigned_t size_block, const bool exclusive, FILE *verbose, f_directory_statuss_t *failures) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_fl_directory_copy_file_)
/**
* @see fl_directory_list()
*/
#if !defined(_di_fl_directory_list_)
- extern f_return_status private_fl_directory_list(const f_string path, int (*filter)(const struct dirent *), int (*sort)(const struct dirent **, const struct dirent **), const bool dereference, f_directory_listing *listing) f_gcc_attribute_visibility_internal;
+ extern f_return_status private_fl_directory_list(const f_string_t path, int (*filter)(const struct dirent *), int (*sort)(const struct dirent **, const struct dirent **), const bool dereference, f_directory_listing_t *listing) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_fl_directory_list_)
/**
* @see fl_directory_path_push_dynamic()
*/
#if !defined(_di_fl_directory_path_push_) || !defined(_di_fl_directory_path_push_dynamic_)
- extern f_return_status private_fl_directory_path_push(const f_string source, const f_string_length length, f_string_dynamic *destination) f_gcc_attribute_visibility_internal;
+ extern f_return_status private_fl_directory_path_push(const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_fl_directory_path_push_) || !defined(_di_fl_directory_path_push_dynamic_)
#ifdef __cplusplus
#endif
#ifndef _di_fl_environment_path_explode_
- f_return_status fl_environment_path_explode(const f_string path, f_string_dynamics *paths) {
+ f_return_status fl_environment_path_explode(const f_string_t path, f_string_dynamics_t *paths) {
#ifndef _di_level_0_parameter_checking_
if (paths == 0) return F_status_set_error(F_parameter);
if (paths->used > paths->size) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- f_status status = F_none;
- const f_string_length length = strnlen(path, PATH_MAX);
+ f_status_t status = F_none;
+ const f_string_length_t length = strnlen(path, PATH_MAX);
if (length == 0) {
// When PATH is "", this is actually a valid search path for PWD.
f_macro_memory_structure_macro_increment(status, (*paths), 1, f_memory_default_allocation_step, f_macro_string_dynamics_resize, F_buffer_too_large);
if (F_status_is_error(status)) return status;
- f_macro_string_dynamic_clear(paths->array[paths->used]);
+ f_macro_string_dynamic_t_clear(paths->array[paths->used]);
paths->used++;
return F_none;
}
- f_string_length i = length;
- f_string_length first = 0;
- f_string_length total = 0;
+ f_string_length_t i = length;
+ f_string_length_t first = 0;
+ f_string_length_t total = 0;
for (i = 0; i <= length; i++) {
if (i == length || path[i] == f_path_separator_variable[0]) {
if (F_status_is_error(status)) return status;
if (i == 0) {
- f_macro_string_dynamic_clear(paths->array[paths->used]);
+ f_macro_string_dynamic_t_clear(paths->array[paths->used]);
paths->used++;
first = 1;
continue;
}
- f_string_dynamic part = f_string_dynamic_initialize;
+ f_string_dynamic_t part = f_string_dynamic_t_initialize;
total = i - first;
if (total > 0) {
if (path[i - 1] == f_path_separator[0]) {
- f_macro_string_dynamic_new(status, part, total);
+ f_macro_string_dynamic_t_new(status, part, total);
if (F_status_is_error(status)) return status;
part.used = total;
}
else {
- f_macro_string_dynamic_new(status, part, total + 1);
+ f_macro_string_dynamic_t_new(status, part, total + 1);
if (F_status_is_error(status)) return status;
part.string[total] = f_path_separator[0];
#endif // _di_fl_environment_path_explode_
#ifndef _di_fl_environment_path_explode_dynamic_
- f_return_status fl_environment_path_explode_dynamic(const f_string_static path, f_string_dynamics *paths) {
+ f_return_status fl_environment_path_explode_dynamic(const f_string_static_t path, f_string_dynamics_t *paths) {
#ifndef _di_level_0_parameter_checking_
if (path.used > path.size) return F_status_set_error(F_parameter);
if (paths == 0) return F_status_set_error(F_parameter);
if (paths->used > paths->size) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- f_status status = F_none;
+ f_status_t status = F_none;
if (path.used == 0) {
// When PATH is "", this is actually a valid search path for PWD.
f_macro_memory_structure_macro_increment(status, (*paths), 1, f_memory_default_allocation_step, f_macro_string_dynamics_resize, F_buffer_too_large);
if (F_status_is_error(status)) return status;
- f_macro_string_dynamic_clear(paths->array[paths->used]);
+ f_macro_string_dynamic_t_clear(paths->array[paths->used]);
paths->used++;
return F_none;
}
- f_string_length i = 0;
- f_string_length j = 0;
- f_string_length first = 0;
- f_string_length total = 0;
+ f_string_length_t i = 0;
+ f_string_length_t j = 0;
+ f_string_length_t first = 0;
+ f_string_length_t total = 0;
- f_string_dynamic part = f_string_dynamic_initialize;
+ f_string_dynamic_t part = f_string_dynamic_t_initialize;
for (i = 0; i <= path.used; i++) {
if (i == path.used || path.string[i] == f_path_separator_variable[0]) {
if (F_status_is_error(status)) return status;
if (i == 0) {
- f_macro_string_dynamic_clear(paths->array[paths->used]);
+ f_macro_string_dynamic_t_clear(paths->array[paths->used]);
paths->used++;
first = 1;
total = i - first;
if (total > 0) {
- f_macro_string_dynamic_new(status, part, total);
+ f_macro_string_dynamic_t_new(status, part, total);
if (F_status_is_error(status)) return status;
for (j = 0; j < total; j++) {
} // for
if (part.string[part.used - 1] != f_path_separator[0]) {
- f_macro_string_dynamic_resize(status, part, total + 1);
+ f_macro_string_dynamic_t_resize(status, part, total + 1);
if (F_status_is_error(status)) return status;
part.string[part.used] = f_path_separator[0];
#endif // _di_fl_environment_path_explode_dynamic_
#ifndef _di_fl_environment_path_explode_reverse_
- f_return_status fl_environment_path_explode_reverse(const f_string path, f_string_dynamics *paths) {
+ f_return_status fl_environment_path_explode_reverse(const f_string_t path, f_string_dynamics_t *paths) {
#ifndef _di_level_0_parameter_checking_
if (paths == 0) return F_status_set_error(F_parameter);
if (paths->used > paths->size) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- f_status status = F_none;
- const f_string_length length = strnlen(path, PATH_MAX);
+ f_status_t status = F_none;
+ const f_string_length_t length = strnlen(path, PATH_MAX);
if (length == 0) {
// When PATH is "", this is actually a valid search path for PWD.
return F_none;
}
- f_string_length i = length;
- f_string_length j = length;
- f_string_length last = length;
- f_string_length total = 0;
+ f_string_length_t i = length;
+ f_string_length_t j = length;
+ f_string_length_t last = length;
+ f_string_length_t total = 0;
- f_string_dynamic part = f_string_dynamic_initialize;
+ f_string_dynamic_t part = f_string_dynamic_t_initialize;
for (; i > 0; i--) {
j--;
if (total > 0) {
if (path[j + total] == f_path_separator[0]) {
- f_macro_string_dynamic_new(status, part, total);
+ f_macro_string_dynamic_t_new(status, part, total);
if (F_status_is_error(status)) return status;
part.used = total;
}
else {
- f_macro_string_dynamic_new(status, part, total + 1);
+ f_macro_string_dynamic_t_new(status, part, total + 1);
if (F_status_is_error(status)) return status;
part.string[total] = f_path_separator[0];
if (total > 0) {
if (path[last - 1] == f_path_separator[0]) {
- f_macro_string_dynamic_new(status, part, total);
+ f_macro_string_dynamic_t_new(status, part, total);
if (F_status_is_error(status)) return status;
part.used = total;
}
else {
- f_macro_string_dynamic_new(status, part, total + 1);
+ f_macro_string_dynamic_t_new(status, part, total + 1);
if (F_status_is_error(status)) return status;
part.used = total + 1;
#endif // _di_fl_environment_path_explode_reverse_
#ifndef _di_fl_environment_path_explode_reverse_dynamic_
- f_return_status fl_environment_path_explode_reverse_dynamic(const f_string_static path, f_string_dynamics *paths) {
+ f_return_status fl_environment_path_explode_reverse_dynamic(const f_string_static_t path, f_string_dynamics_t *paths) {
#ifndef _di_level_0_parameter_checking_
if (path.used > path.size) return F_status_set_error(F_parameter);
if (paths == 0) return F_status_set_error(F_parameter);
if (paths->used > paths->size) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- f_status status = F_none;
+ f_status_t status = F_none;
if (path.used == 0) {
// When PATH is "", this is actually a valid search path for PWD.
f_macro_memory_structure_macro_increment(status, (*paths), 1, f_memory_default_allocation_step, f_macro_string_dynamics_resize, F_buffer_too_large);
if (F_status_is_error(status)) return status;
- f_macro_string_dynamic_clear(paths->array[paths->used]);
+ f_macro_string_dynamic_t_clear(paths->array[paths->used]);
paths->used++;
return F_none;
}
- f_string_length i = path.used;
- f_string_length j = path.used;
- f_string_length k = 0;
- f_string_length last = path.used;
- f_string_length total = 0;
+ f_string_length_t i = path.used;
+ f_string_length_t j = path.used;
+ f_string_length_t k = 0;
+ f_string_length_t last = path.used;
+ f_string_length_t total = 0;
- f_string_dynamic part = f_string_dynamic_initialize;
+ f_string_dynamic_t part = f_string_dynamic_t_initialize;
for (; i > 0; i--) {
j--;
total = last - i;
if (total > 0) {
- f_macro_string_dynamic_new(status, part, total);
+ f_macro_string_dynamic_t_new(status, part, total);
if (F_status_is_error(status)) return status;
for (k = 0; k < total; k++) {
} // for
if (part.string[part.used - 1] != f_path_separator[0]) {
- f_macro_string_dynamic_resize(status, part, total + 1);
+ f_macro_string_dynamic_t_resize(status, part, total + 1);
if (F_status_is_error(status)) return status;
part.string[part.used] = f_path_separator[0];
// when j = 0, the total is actually the entire length to max.
total = last - j;
- f_macro_string_dynamic_new(status, part, total);
+ f_macro_string_dynamic_t_new(status, part, total);
if (F_status_is_error(status)) return status;
for (k = 0; k < total; k++) {
} // for
if (part.string[part.used - 1] != f_path_separator[0]) {
- f_macro_string_dynamic_resize(status, part, total + 1);
+ f_macro_string_dynamic_t_resize(status, part, total + 1);
if (F_status_is_error(status)) return status;
part.string[part.used - 1] = f_path_separator[0];
* F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_fl_environment_path_explode_
- extern f_return_status fl_environment_path_explode(const f_string path, f_string_dynamics *paths);
+ extern f_return_status fl_environment_path_explode(const f_string_t path, f_string_dynamics_t *paths);
#endif // _di_fl_environment_path_explode_
/**
* F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_fl_environment_path_explode_dynamic_
- extern f_return_status fl_environment_path_explode_dynamic(const f_string_static path, f_string_dynamics *paths);
+ extern f_return_status fl_environment_path_explode_dynamic(const f_string_static_t path, f_string_dynamics_t *paths);
#endif // _di_fl_environment_path_explode_dynamic_
/**
* F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_fl_environment_path_explode_reverse_
- extern f_return_status fl_environment_path_explode_reverse(const f_string path, f_string_dynamics *paths);
+ extern f_return_status fl_environment_path_explode_reverse(const f_string_t path, f_string_dynamics_t *paths);
#endif // _di_fl_environment_path_explode_reverse_
/**
* F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_fl_environment_path_explode_reverse_dynamic_
- extern f_return_status fl_environment_path_explode_reverse_dynamic(const f_string_static path, f_string_dynamics *paths);
+ extern f_return_status fl_environment_path_explode_reverse_dynamic(const f_string_static_t path, f_string_dynamics_t *paths);
#endif // _di_fl_environment_path_explode_reverse_dynamic_
#ifdef __cplusplus
#endif
#ifndef _di_fl_fss_basic_object_read_
- f_return_status fl_fss_basic_object_read(f_string_dynamic *buffer, f_string_range *range, f_fss_object *found, f_fss_quoted *quoted) {
+ f_return_status fl_fss_basic_object_read(f_string_dynamic_t *buffer, f_string_range_t *range, f_fss_object_t *found, f_fss_quoted_t *quoted) {
#ifndef _di_level_1_parameter_checking_
if (buffer == 0) return F_status_set_error(F_parameter);
if (buffer->used == 0) return F_status_set_error(F_parameter);
if (range->start >= buffer->used) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- f_status status = F_none;
- f_string_lengths delimits = f_string_lengths_initialize;
+ f_status_t status = F_none;
+ f_string_lengths_t delimits = f_string_lengths_t_initialize;
status = private_fl_fss_basic_object_read(buffer, range, found, quoted, &delimits);
if (F_status_is_error(status)) {
- f_macro_string_lengths_delete_simple(delimits);
+ f_macro_string_lengths_t_delete_simple(delimits);
return status;
}
if (status == FL_fss_found_object_not || status == F_data_not || status == F_data_not_eos || status == F_data_not_stop) {
- f_macro_string_lengths_delete_simple(delimits);
+ f_macro_string_lengths_t_delete_simple(delimits);
return status;
}
#endif // _di_fl_fss_basic_object_read_
#ifndef _di_fl_fss_basic_content_read_
- f_return_status fl_fss_basic_content_read(f_string_dynamic *buffer, f_string_range *range, f_fss_content *found) {
+ f_return_status fl_fss_basic_content_read(f_string_dynamic_t *buffer, f_string_range_t *range, f_fss_content_t *found) {
#ifndef _di_level_1_parameter_checking_
if (buffer == 0) return F_status_set_error(F_parameter);
if (buffer->used == 0) return F_status_set_error(F_parameter);
if (range->start >= buffer->used) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- f_status status = F_none;
+ f_status_t status = F_none;
// delimits must only be applied once a valid object is found.
- f_string_lengths delimits = f_string_lengths_initialize;
+ f_string_lengths_t delimits = f_string_lengths_t_initialize;
status = f_fss_skip_past_space(*buffer, range);
if (F_status_is_error(status)) return status;
#endif // _di_fl_fss_basic_content_read_
#ifndef _di_fl_fss_basic_object_write_
- f_return_status fl_fss_basic_object_write(const f_string_static object, const f_fss_quoted quoted, f_string_range *range, f_string_dynamic *destination) {
+ f_return_status fl_fss_basic_object_write(const f_string_static_t object, const f_fss_quoted_t quoted, f_string_range_t *range, f_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (destination == 0) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
#endif // _di_fl_fss_basic_object_write_
#ifndef _di_fl_fss_basic_content_write_
- f_return_status fl_fss_basic_content_write(const f_string_static content, f_string_range *range, f_string_dynamic *destination) {
+ f_return_status fl_fss_basic_content_write(const f_string_static_t content, f_string_range_t *range, f_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (destination == 0) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- f_status status = F_none;
+ f_status_t status = F_none;
fl_macro_fss_skip_past_delimit_placeholders(content, (*range));
if (range->start > range->stop) return F_data_not_stop;
else if (range->start >= content.used) return F_data_not_eos;
- f_string_range input_position = f_string_range_initialize;
- f_string_range buffer_position = f_string_range_initialize;
+ f_string_range_t input_position = f_string_range_initialize;
+ f_string_range_t buffer_position = f_string_range_initialize;
// ensure that there is room for the terminating newline.
- f_string_length size_allocate = destination->used + content.used + 1 + f_fss_default_allocation_step_string;
+ f_string_length_t size_allocate = destination->used + content.used + 1 + f_fss_default_allocation_step_string;
buffer_position.start = destination->used;
buffer_position.stop = destination->used;
if (size_allocate > destination->size) {
- f_macro_string_dynamic_resize(status, (*destination), size_allocate);
+ f_macro_string_dynamic_t_resize(status, (*destination), size_allocate);
if (F_status_is_error(status)) return status;
}
* Errors from (with error bit): f_fss_skip_past_space().
*/
#ifndef _di_fl_fss_basic_object_read_
- extern f_return_status fl_fss_basic_object_read(f_string_dynamic *buffer, f_string_range *range, f_fss_object *found, f_fss_quoted *quoted);
+ extern f_return_status fl_fss_basic_object_read(f_string_dynamic_t *buffer, f_string_range_t *range, f_fss_object_t *found, f_fss_quoted_t *quoted);
#endif // _di_fl_fss_basic_object_read_
/**
* Errors from (with error bit): f_fss_skip_past_space().
*/
#ifndef _di_fl_fss_basic_content_read_
- extern f_return_status fl_fss_basic_content_read(f_string_dynamic *buffer, f_string_range *range, f_fss_content *found);
+ extern f_return_status fl_fss_basic_content_read(f_string_dynamic_t *buffer, f_string_range_t *range, f_fss_content_t *found);
#endif // _di_fl_fss_basic_content_read_
/**
* Errors from (with error bit): f_utf_buffer_increment().
*/
#ifndef _di_fl_fss_basic_object_write_
- extern f_return_status fl_fss_basic_object_write(const f_string_static object, const f_fss_quoted quoted, f_string_range *range, f_string_dynamic *destination);
+ extern f_return_status fl_fss_basic_object_write(const f_string_static_t object, const f_fss_quoted_t quoted, f_string_range_t *range, f_string_dynamic_t *destination);
#endif // _di_fl_fss_basic_object_write_
/**
* Errors from (with error bit): f_utf_buffer_increment().
*/
#ifndef _di_fl_fss_basic_content_write_
- extern f_return_status fl_fss_basic_content_write(const f_string_static content, f_string_range *range, f_string_dynamic *destination);
+ extern f_return_status fl_fss_basic_content_write(const f_string_static_t content, f_string_range_t *range, f_string_dynamic_t *destination);
#endif // _di_fl_fss_basic_content_write_
#ifdef __cplusplus
#endif
#ifndef _di_fl_fss_basic_list_object_read_
- f_return_status fl_fss_basic_list_object_read(f_string_dynamic *buffer, f_string_range *range, f_fss_object *found) {
+ f_return_status fl_fss_basic_list_object_read(f_string_dynamic_t *buffer, f_string_range_t *range, f_fss_object_t *found) {
#ifndef _di_level_1_parameter_checking_
if (buffer == 0) return F_status_set_error(F_parameter);
if (buffer->used == 0) return F_status_set_error(F_parameter);
if (range->start >= buffer->used) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- f_status status = F_none;
+ f_status_t status = F_none;
// delimits must only be applied once a valid object is found.
- f_string_lengths delimits = f_string_lengths_initialize;
+ f_string_lengths_t delimits = f_string_lengths_t_initialize;
status = f_fss_skip_past_space(*buffer, range);
if (F_status_is_error(status)) return status;
// identify where the object ends.
while (range->start < buffer->used && range->start <= range->stop && buffer->string[range->start] != f_string_eol[0]) {
if (buffer->string[range->start] == f_fss_delimit_slash) {
- f_string_length first_slash = range->start;
- f_string_length slash_count = 1;
+ f_string_length_t first_slash = range->start;
+ f_string_length_t slash_count = 1;
status = f_utf_buffer_increment(*buffer, range, 1);
if (F_status_is_error(status)) return status;
fl_macro_fss_object_return_on_overflow((*buffer), (*range), (*found), delimits, F_data_not_eos, F_data_not_stop);
if (buffer->string[range->start] == f_fss_basic_list_open) {
- f_string_length stop_point = range->start - 1;
+ f_string_length_t stop_point = range->start - 1;
status = f_utf_buffer_increment(*buffer, range, 1);
if (F_status_is_error(status)) return status;
fl_macro_fss_object_return_on_overflow((*buffer), (*range), (*found), delimits, F_data_not_eos, F_data_not_stop);
if (buffer->string[range->start] == f_string_eol[0]) {
- f_string_length start = range->start;
+ f_string_length_t start = range->start;
range->start = first_slash;
if (delimits.used + (slash_count / 2) >= delimits.size) {
- f_macro_string_lengths_resize(status, delimits, delimits.size + (slash_count / 2) + f_fss_default_allocation_step);
+ f_macro_string_lengths_t_resize(status, delimits, delimits.size + (slash_count / 2) + f_fss_default_allocation_step);
if (F_status_is_error(status)) {
- f_macro_string_lengths_delete_simple(delimits);
+ f_macro_string_lengths_t_delete_simple(delimits);
return status;
}
}
continue;
}
else if (buffer->string[range->start] == f_fss_basic_list_open) {
- f_string_length stop_point = range->start - 1;
+ f_string_length_t stop_point = range->start - 1;
status = f_utf_buffer_increment(*buffer, range, 1);
if (F_status_is_error(status)) return status;
#endif // _di_fl_fss_basic_list_object_read_
#ifndef _di_fl_fss_basic_list_content_read_
- f_return_status fl_fss_basic_list_content_read(f_string_dynamic *buffer, f_string_range *range, f_fss_content *found) {
+ f_return_status fl_fss_basic_list_content_read(f_string_dynamic_t *buffer, f_string_range_t *range, f_fss_content_t *found) {
#ifndef _di_level_1_parameter_checking_
if (buffer == 0) return F_status_set_error(F_parameter);
if (buffer->used == 0) return F_status_set_error(F_parameter);
if (range->start >= buffer->used) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- f_status status = F_none;
+ f_status_t status = F_none;
// delimits must only be applied once a valid object is found.
- f_string_lengths delimits = f_string_lengths_initialize;
+ f_string_lengths_t delimits = f_string_lengths_t_initialize;
fl_macro_fss_skip_past_delimit_placeholders((*buffer), (*range));
fl_macro_fss_content_return_on_overflow((*buffer), (*range), (*found), delimits, F_none_eos, F_none_stop)
fl_macro_fss_allocate_content_if_necessary((*found), delimits);
found->array[found->used].start = range->start;
- f_string_length last_newline = range->start;
+ f_string_length_t last_newline = range->start;
bool found_newline = F_false;
// identify where the content ends.
}
if (buffer->string[range->start] == f_fss_delimit_slash) {
- f_string_length first_slash = range->start;
- f_string_length slash_count = 1;
+ f_string_length_t first_slash = range->start;
+ f_string_length_t slash_count = 1;
status = f_utf_buffer_increment(*buffer, range, 1);
if (F_status_is_error(status)) return status;
}
if (buffer->string[range->start] == f_fss_basic_list_open) {
- f_string_length stop_point = range->start - 1;
+ f_string_length_t stop_point = range->start - 1;
status = f_utf_buffer_increment(*buffer, range, 1);
if (F_status_is_error(status)) return status;
}
if (buffer->string[range->start] == f_string_eol[0]) {
- f_string_length start = range->start;
+ f_string_length_t start = range->start;
range->start = first_slash;
}
if (delimits.used + (slash_count / 2) >= delimits.size) {
- f_macro_string_lengths_resize(status, delimits, delimits.size + (slash_count / 2) + f_fss_default_allocation_step);
+ f_macro_string_lengths_t_resize(status, delimits, delimits.size + (slash_count / 2) + f_fss_default_allocation_step);
if (F_status_is_error(status)) {
- f_macro_string_lengths_delete_simple(delimits);
+ f_macro_string_lengths_t_delete_simple(delimits);
return status;
}
}
#endif // _di_fl_fss_basic_list_content_read_
#ifndef _di_fl_fss_basic_list_object_write_
- f_return_status fl_fss_basic_list_object_write(const f_string_static object, f_string_range *range, f_string_dynamic *destination) {
+ f_return_status fl_fss_basic_list_object_write(const f_string_static_t object, f_string_range_t *range, f_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (destination == 0) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- f_status status = F_none;
+ f_status_t status = F_none;
- f_string_range buffer_position = f_string_range_initialize;
- f_string_length start_position = f_string_initialize;
- f_string_length size_allocate = 0;
- f_string_length start_buffer = 0;
+ f_string_range_t buffer_position = f_string_range_initialize;
+ f_string_length_t start_position = f_string_t_initialize;
+ f_string_length_t size_allocate = 0;
+ f_string_length_t start_buffer = 0;
fl_macro_fss_skip_past_delimit_placeholders(object, (*range))
size_allocate = destination->used + (range->stop - range->start) + 2 + f_fss_default_allocation_step_string;
if (size_allocate > destination->size) {
- f_macro_string_dynamic_resize(status, (*destination), size_allocate);
+ f_macro_string_dynamic_t_resize(status, (*destination), size_allocate);
if (F_status_is_error(status)) return status;
}
while (range->start <= range->stop && range->start < object.used) {
if (object.string[range->start] == f_fss_delimit_slash) {
- f_string_length slash_count = 1;
+ f_string_length_t slash_count = 1;
destination->string[buffer_position.stop] = object.string[range->start];
buffer_position.stop++;
size_allocate += slash_count;
if (size_allocate > destination->size) {
- f_macro_string_dynamic_resize(status, (*destination), size_allocate + f_fss_default_allocation_step_string);
+ f_macro_string_dynamic_t_resize(status, (*destination), size_allocate + f_fss_default_allocation_step_string);
if (F_status_is_error(status)) return status;
}
#endif // _di_fl_fss_basic_list_object_write_
#ifndef _di_fl_fss_basic_list_content_write_
- f_return_status fl_fss_basic_list_content_write(const f_string_static content, f_string_range *range, f_string_dynamic *destination) {
+ f_return_status fl_fss_basic_list_content_write(const f_string_static_t content, f_string_range_t *range, f_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (destination == 0) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- f_status status = F_none;
+ f_status_t status = F_none;
bool is_comment = F_false;
bool has_graph = F_false;
- f_string_range buffer_position = f_string_range_initialize;
- f_string_length start_position = f_string_initialize;
- f_string_length size_allocate = 0;
+ f_string_range_t buffer_position = f_string_range_initialize;
+ f_string_length_t start_position = f_string_t_initialize;
+ f_string_length_t size_allocate = 0;
fl_macro_fss_skip_past_delimit_placeholders(content, (*range))
size_allocate = destination->used + (range->stop - range->start) + 2 + f_fss_default_allocation_step_string;
if (size_allocate > destination->size) {
- f_macro_string_dynamic_resize(status, (*destination), size_allocate);
+ f_macro_string_dynamic_t_resize(status, (*destination), size_allocate);
if (F_status_is_error(status)) return status;
}
while (range->start <= range->stop && range->start < content.used) {
if (content.string[range->start] == f_fss_delimit_slash && !is_comment) {
- f_string_length slash_count = 1;
+ f_string_length_t slash_count = 1;
destination->string[buffer_position.stop] = content.string[range->start];
buffer_position.stop++;
} // while
if (content.string[range->start] == f_fss_basic_list_open) {
- f_string_length start = range->start;
+ f_string_length_t start = range->start;
status = f_utf_buffer_increment(content, range, 1);
if (F_status_is_error(status)) return status;
size_allocate += slash_count + 1;
if (size_allocate > destination->size) {
- f_macro_string_dynamic_resize(status, (*destination), size_allocate + f_fss_default_allocation_step_string);
+ f_macro_string_dynamic_t_resize(status, (*destination), size_allocate + f_fss_default_allocation_step_string);
if (F_status_is_error(status)) return status;
}
}
}
else if (content.string[range->start] == f_fss_basic_list_open && !is_comment) {
- f_string_length start = range->start;
+ f_string_length_t start = range->start;
has_graph = F_true;
size_allocate++;
if (size_allocate > destination->size) {
- f_macro_string_dynamic_resize(status, (*destination), size_allocate + f_fss_default_allocation_step_string);
+ f_macro_string_dynamic_t_resize(status, (*destination), size_allocate + f_fss_default_allocation_step_string);
if (F_status_is_error(status)) return status;
}
* Errors from (with error bit): f_fss_skip_past_space().
*/
#ifndef _di_fl_fss_basic_list_object_read_
- extern f_return_status fl_fss_basic_list_object_read(f_string_dynamic *buffer, f_string_range *range, f_fss_object *found);
+ extern f_return_status fl_fss_basic_list_object_read(f_string_dynamic_t *buffer, f_string_range_t *range, f_fss_object_t *found);
#endif // _di_fl_fss_basic_list_object_read_
/**
* Errors from (with error bit): f_fss_skip_past_space().
*/
#ifndef _di_fl_fss_basic_list_content_read_
- extern f_return_status fl_fss_basic_list_content_read(f_string_dynamic *buffer, f_string_range *range, f_fss_content *found);
+ extern f_return_status fl_fss_basic_list_content_read(f_string_dynamic_t *buffer, f_string_range_t *range, f_fss_content_t *found);
#endif // _di_fl_fss_basic_list_content_read_
/**
* Errors from (with error bit): f_utf_buffer_increment().
*/
#ifndef _di_fl_fss_basic_list_object_write_
- extern f_return_status fl_fss_basic_list_object_write(const f_string_static object, f_string_range *range, f_string_dynamic *destination);
+ extern f_return_status fl_fss_basic_list_object_write(const f_string_static_t object, f_string_range_t *range, f_string_dynamic_t *destination);
#endif // _di_fl_fss_basic_list_object_write_
/**
* Errors from (with error bit): f_utf_buffer_increment().
*/
#ifndef _di_fl_fss_basic_list_content_write_
- extern f_return_status fl_fss_basic_list_content_write(const f_string_static content, f_string_range *range, f_string_dynamic *destination);
+ extern f_return_status fl_fss_basic_list_content_write(const f_string_static_t content, f_string_range_t *range, f_string_dynamic_t *destination);
#endif // _di_fl_fss_basic_list_content_write_
#ifdef __cplusplus
#endif
#ifndef _di_fl_fss_extended_object_read_
- f_return_status fl_fss_extended_object_read(f_string_dynamic *buffer, f_string_range *range, f_fss_object *found, f_fss_quoted *quoted) {
+ f_return_status fl_fss_extended_object_read(f_string_dynamic_t *buffer, f_string_range_t *range, f_fss_object_t *found, f_fss_quoted_t *quoted) {
#ifndef _di_level_1_parameter_checking_
if (buffer == 0) return F_status_set_error(F_parameter);
if (buffer->used == 0) return F_status_set_error(F_parameter);
if (range->start >= buffer->used) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- f_status status = F_none;
- f_string_lengths delimits = f_string_lengths_initialize;
+ f_status_t status = F_none;
+ f_string_lengths_t delimits = f_string_lengths_t_initialize;
status = private_fl_fss_basic_object_read(buffer, range, found, quoted, &delimits);
if (F_status_is_error(status)) {
- f_macro_string_lengths_delete_simple(delimits);
+ f_macro_string_lengths_t_delete_simple(delimits);
return status;
}
if (status == FL_fss_found_object_not || status == F_data_not || status == F_data_not_eos || status == F_data_not_stop) {
- f_macro_string_lengths_delete_simple(delimits);
+ f_macro_string_lengths_t_delete_simple(delimits);
return status;
}
#endif // _di_fl_fss_extended_object_read_
#ifndef _di_fl_fss_extended_content_read_
- f_return_status fl_fss_extended_content_read(f_string_dynamic *buffer, f_string_range *range, f_fss_content *found, f_fss_quoteds *quoteds) {
+ f_return_status fl_fss_extended_content_read(f_string_dynamic_t *buffer, f_string_range_t *range, f_fss_content_t *found, f_fss_quoteds_t *quoteds) {
#ifndef _di_level_1_parameter_checking_
if (buffer == 0) return F_status_set_error(F_parameter);
if (buffer->used == 0) return F_status_set_error(F_parameter);
if (range->start >= buffer->used) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- f_status status = F_none;
- f_status status_allocate = F_none;
+ f_status_t status = F_none;
+ f_status_t status_allocate = F_none;
status = f_fss_skip_past_space(*buffer, range);
if (F_status_is_error(status)) return status;
return F_data_not_stop;
}
- f_string_lengths delimits = f_string_lengths_initialize;
+ f_string_lengths_t delimits = f_string_lengths_t_initialize;
uint8_t content_found = 0;
while (range->start <= range->stop && range->start < buffer->used) {
- f_string_range content_partial = f_string_range_initialize;
- f_fss_quoted quoted = 0;
+ f_string_range_t content_partial = f_string_range_initialize;
+ f_fss_quoted_t quoted = 0;
status = private_fl_fss_basic_object_read(buffer, range, &content_partial, "ed, &delimits);
if (status == FL_fss_found_object || status == FL_fss_found_object_content_not) {
if (found->used == found->size) {
if (found->used + f_fss_default_allocation_step > found->size) {
- if (found->used == f_array_length_size) {
- f_macro_string_lengths_delete_simple(delimits);
+ if (found->used == f_array_length_t_size) {
+ f_macro_string_lengths_t_delete_simple(delimits);
return F_status_set_error(F_buffer_too_large);
}
else {
- f_macro_fss_content_resize(status_allocate, (*found), found->size + f_fss_default_allocation_step);
+ f_macro_fss_content_t_resize(status_allocate, (*found), found->size + f_fss_default_allocation_step);
}
}
else {
- f_macro_fss_content_resize(status_allocate, (*found), found->size + f_fss_default_allocation_step);
+ f_macro_fss_content_t_resize(status_allocate, (*found), found->size + f_fss_default_allocation_step);
}
if (F_status_is_error(status_allocate)) return status_allocate;
if (quoteds) {
- f_macro_fss_quoteds_resize(status_allocate, (*quoteds), found->size);
+ f_macro_fss_quoteds_t_resize(status_allocate, (*quoteds), found->size);
if (F_status_is_error(status_allocate)) return status_allocate;
}
}
break;
}
else if (F_status_is_error(status)) {
- f_macro_string_lengths_delete_simple(delimits);
+ f_macro_string_lengths_t_delete_simple(delimits);
return status;
}
} // while
#endif // _di_fl_fss_extended_content_read_
#ifndef _di_fl_fss_extended_object_write_
-f_return_status fl_fss_extended_object_write(const f_string_static object, const f_fss_quoted quoted, f_string_range *range, f_string_dynamic *destination) {
+f_return_status fl_fss_extended_object_write(const f_string_static_t object, const f_fss_quoted_t quoted, f_string_range_t *range, f_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (destination == 0) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
#endif // _di_fl_fss_extended_object_write_
#ifndef _di_fl_fss_extended_content_write_
- f_return_status fl_fss_extended_content_write(const f_string_static content, const f_fss_quoted quoted, f_string_range *range, f_string_dynamic *destination) {
+ f_return_status fl_fss_extended_content_write(const f_string_static_t content, const f_fss_quoted_t quoted, f_string_range_t *range, f_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (destination == 0) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
* Errors from (with error bit): f_fss_skip_past_space().
*/
#ifndef _di_fl_fss_extended_object_read_
- extern f_return_status fl_fss_extended_object_read(f_string_dynamic *buffer, f_string_range *range, f_fss_object *found, f_fss_quoted *quoted);
+ extern f_return_status fl_fss_extended_object_read(f_string_dynamic_t *buffer, f_string_range_t *range, f_fss_object_t *found, f_fss_quoted_t *quoted);
#endif // _di_fl_fss_extended_object_read_
/**
* Errors from (with error bit): f_fss_skip_past_space().
*/
#ifndef _di_fl_fss_extended_content_read_
- extern f_return_status fl_fss_extended_content_read(f_string_dynamic *buffer, f_string_range *range, f_fss_content *found, f_fss_quoteds *quoteds);
+ extern f_return_status fl_fss_extended_content_read(f_string_dynamic_t *buffer, f_string_range_t *range, f_fss_content_t *found, f_fss_quoteds_t *quoteds);
#endif // _di_fl_fss_extended_content_read_
/**
* Errors from (with error bit): f_utf_buffer_increment().
*/
#ifndef _di_fl_fss_extended_object_write_
- extern f_return_status fl_fss_extended_object_write(const f_string_static object, const f_fss_quoted quoted, f_string_range *range, f_string_dynamic *destination);
+ extern f_return_status fl_fss_extended_object_write(const f_string_static_t object, const f_fss_quoted_t quoted, f_string_range_t *range, f_string_dynamic_t *destination);
#endif // _di_fl_fss_extended_object_write_
/**
* Errors from (with error bit): f_utf_buffer_increment().
*/
#ifndef _di_fl_fss_extended_content_write_
- extern f_return_status fl_fss_extended_content_write(const f_string_static content, const f_fss_quoted quoted, f_string_range *range, f_string_dynamic *destination);
+ extern f_return_status fl_fss_extended_content_write(const f_string_static_t content, const f_fss_quoted_t quoted, f_string_range_t *range, f_string_dynamic_t *destination);
#endif // _di_fl_fss_extended_content_write_
#ifdef __cplusplus
#endif
#ifndef _di_fl_fss_extended_list_object_read_
- f_return_status fl_fss_extended_list_object_read(f_string_dynamic *buffer, f_string_range *range, f_fss_object *found) {
+ f_return_status fl_fss_extended_list_object_read(f_string_dynamic_t *buffer, f_string_range_t *range, f_fss_object_t *found) {
#ifndef _di_level_1_parameter_checking_
if (buffer == 0) return F_status_set_error(F_parameter);
if (buffer->used == 0) return F_status_set_error(F_parameter);
if (range->start >= buffer->used) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- f_status status = F_none;
+ f_status_t status = F_none;
// delimits must only be applied once a valid object is found.
- f_string_lengths delimits = f_string_lengths_initialize;
+ f_string_lengths_t delimits = f_string_lengths_t_initialize;
status = f_fss_skip_past_space(*buffer, range);
if (F_status_is_error(status)) return status;
// identify where the object ends.
while (range->start < buffer->used && range->start <= range->stop && buffer->string[range->start] != f_string_eol[0]) {
if (buffer->string[range->start] == f_fss_delimit_slash) {
- f_string_length first_slash = range->start;
- f_string_length slash_count = 1;
+ f_string_length_t first_slash = range->start;
+ f_string_length_t slash_count = 1;
status = f_utf_buffer_increment(*buffer, range, 1);
if (F_status_is_error(status)) return status;
fl_macro_fss_object_return_on_overflow((*buffer), (*range), (*found), delimits, F_data_not_eos, F_data_not_stop);
if (buffer->string[range->start] == f_fss_extended_list_open) {
- f_string_length stop_point = range->start - 1;
+ f_string_length_t stop_point = range->start - 1;
status = f_utf_buffer_increment(*buffer, range, 1);
if (F_status_is_error(status)) return status;
fl_macro_fss_object_return_on_overflow((*buffer), (*range), (*found), delimits, F_data_not_eos, F_data_not_stop);
if (buffer->string[range->start] == f_string_eol[0]) {
- f_string_length start = range->start;
+ f_string_length_t start = range->start;
range->start = first_slash;
if (delimits.used + (slash_count / 2) >= delimits.size) {
- f_macro_string_lengths_resize(status, delimits, delimits.size + (slash_count / 2) + f_fss_default_allocation_step);
+ f_macro_string_lengths_t_resize(status, delimits, delimits.size + (slash_count / 2) + f_fss_default_allocation_step);
if (F_status_is_error(status)) {
- f_macro_string_lengths_delete_simple(delimits);
+ f_macro_string_lengths_t_delete_simple(delimits);
return status;
}
}
continue;
}
else if (buffer->string[range->start] == f_fss_extended_list_open) {
- f_string_length stop_point = range->start - 1;
+ f_string_length_t stop_point = range->start - 1;
status = f_utf_buffer_increment(*buffer, range, 1);
if (F_status_is_error(status)) return status;
#endif // _di_fl_fss_extended_list_object_read_
#ifndef _di_fl_fss_extended_list_content_read_
- f_return_status fl_fss_extended_list_content_read(f_string_dynamic *buffer, f_string_range *range, f_fss_nest *found) {
+ f_return_status fl_fss_extended_list_content_read(f_string_dynamic_t *buffer, f_string_range_t *range, f_fss_nest_t *found) {
#ifndef _di_level_1_parameter_checking_
if (buffer == 0) return F_status_set_error(F_parameter);
if (buffer->used == 0) return F_status_set_error(F_parameter);
if (range->start >= buffer->used) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- f_status status = F_none;
+ f_status_t status = F_none;
// delimits must only be applied once a valid object is found.
- f_string_lengths delimits = f_string_lengths_initialize;
- f_string_lengths positions_start = f_string_lengths_initialize;
- f_fss_objects objects = f_fss_objects_initialize;
+ f_string_lengths_t delimits = f_string_lengths_t_initialize;
+ f_string_lengths_t positions_start = f_string_lengths_t_initialize;
+ f_fss_objects_t objects = f_fss_objects_t_initialize;
fl_macro_fss_skip_past_delimit_placeholders((*buffer), (*range));
fl_macro_fss_nest_return_on_overflow((*buffer), (*range), (*found), positions_start, delimits, objects, F_none_eos, F_none_stop)
if (found->used + 1 >= found->size) {
- f_macro_fss_nest_resize(status, (*found), found->size + f_fss_default_allocation_step + 1);
+ f_macro_fss_nest_t_resize(status, (*found), found->size + f_fss_default_allocation_step + 1);
if (F_status_is_error(status)) {
- f_macro_string_lengths_delete_simple(delimits);
+ f_macro_string_lengths_t_delete_simple(delimits);
return status;
}
}
- f_array_length depth = 0;
- f_string_length position_previous = range->start;
- f_string_length line_start = range->start;
- f_string_length last_newline = range->start;
+ f_array_length_t depth = 0;
+ f_string_length_t position_previous = range->start;
+ f_string_length_t line_start = range->start;
+ f_string_length_t last_newline = range->start;
- f_macro_string_lengths_new(status, positions_start, f_fss_default_allocation_step);
+ f_macro_string_lengths_t_new(status, positions_start, f_fss_default_allocation_step);
if (F_status_is_error(status)) {
- f_macro_string_lengths_delete_simple(delimits);
+ f_macro_string_lengths_t_delete_simple(delimits);
return status;
}
- f_macro_fss_objects_new(status, objects, f_fss_default_allocation_step);
+ f_macro_fss_objects_t_new(status, objects, f_fss_default_allocation_step);
if (F_status_is_error(status)) {
- f_macro_string_lengths_delete_simple(positions_start);
- f_macro_string_lengths_delete_simple(delimits);
+ f_macro_string_lengths_t_delete_simple(positions_start);
+ f_macro_string_lengths_t_delete_simple(delimits);
return status;
}
}
if (buffer->string[range->start] == f_fss_delimit_slash) {
- f_string_length slash_first = range->start;
- f_string_length slash_last = range->start;
- f_string_length slash_count = 1;
+ f_string_length_t slash_first = range->start;
+ f_string_length_t slash_last = range->start;
+ f_string_length_t slash_count = 1;
position_previous = range->start;
status = f_utf_buffer_increment(*buffer, range, 1);
if (F_status_is_error(status)) {
- f_macro_string_lengths_delete_simple(delimits);
- f_macro_string_lengths_delete_simple(positions_start);
- f_macro_fss_objects_delete_simple(objects);
+ f_macro_string_lengths_t_delete_simple(delimits);
+ f_macro_string_lengths_t_delete_simple(positions_start);
+ f_macro_fss_objects_t_delete_simple(objects);
return status;
}
status = f_utf_buffer_increment(*buffer, range, 1);
if (F_status_is_error(status)) {
- f_macro_string_lengths_delete_simple(delimits);
- f_macro_string_lengths_delete_simple(positions_start);
- f_macro_fss_objects_delete_simple(objects);
+ f_macro_string_lengths_t_delete_simple(delimits);
+ f_macro_string_lengths_t_delete_simple(positions_start);
+ f_macro_fss_objects_t_delete_simple(objects);
return status;
}
line_start = range->start;
}
else if (buffer->string[range->start] == f_fss_extended_list_open || buffer->string[range->start] == f_fss_extended_list_close) {
- f_string_length before_list_open = position_previous;
+ f_string_length_t before_list_open = position_previous;
bool is_open = F_false;
if (buffer->string[range->start] == f_fss_extended_list_open) {
}
if (F_status_is_error(status)) {
- f_macro_string_lengths_delete_simple(delimits);
- f_macro_string_lengths_delete_simple(positions_start);
- f_macro_fss_objects_delete_simple(objects);
+ f_macro_string_lengths_t_delete_simple(delimits);
+ f_macro_string_lengths_t_delete_simple(positions_start);
+ f_macro_fss_objects_t_delete_simple(objects);
return status;
}
position_previous = range->start;
status = f_utf_buffer_increment(*buffer, range, 1);
if (F_status_is_error(status)) {
- f_macro_string_lengths_delete_simple(delimits);
- f_macro_string_lengths_delete_simple(positions_start);
- f_macro_fss_objects_delete_simple(objects);
+ f_macro_string_lengths_t_delete_simple(delimits);
+ f_macro_string_lengths_t_delete_simple(positions_start);
+ f_macro_fss_objects_t_delete_simple(objects);
return status;
}
range->start = slash_first;
if (delimits.used + (slash_count / 2) >= delimits.size) {
- f_macro_string_lengths_resize(status, delimits, delimits.size + (slash_count / 2) + f_fss_default_allocation_step);
+ f_macro_string_lengths_t_resize(status, delimits, delimits.size + (slash_count / 2) + f_fss_default_allocation_step);
if (F_status_is_error(status)) {
range->start = last_newline;
- f_macro_string_lengths_delete_simple(delimits);
- f_macro_string_lengths_delete_simple(positions_start);
- f_macro_fss_objects_delete_simple(objects);
+ f_macro_string_lengths_t_delete_simple(delimits);
+ f_macro_string_lengths_t_delete_simple(positions_start);
+ f_macro_fss_objects_t_delete_simple(objects);
return status;
}
depth++;
if (depth > positions_start.size) {
- f_macro_string_lengths_resize(status, positions_start, positions_start.size + f_fss_default_allocation_step);
+ f_macro_string_lengths_t_resize(status, positions_start, positions_start.size + f_fss_default_allocation_step);
if (F_status_is_error(status)) {
range->start = last_newline;
- f_macro_string_lengths_delete_simple(delimits);
- f_macro_string_lengths_delete_simple(positions_start);
- f_macro_fss_objects_delete_simple(objects);
+ f_macro_string_lengths_t_delete_simple(delimits);
+ f_macro_string_lengths_t_delete_simple(positions_start);
+ f_macro_fss_objects_t_delete_simple(objects);
return status;
}
}
else {
if (delimits.used + 1 >= delimits.size) {
- f_macro_string_lengths_resize(status, delimits, delimits.size + f_fss_default_allocation_step);
+ f_macro_string_lengths_t_resize(status, delimits, delimits.size + f_fss_default_allocation_step);
if (F_status_is_error(status)) {
range->start = last_newline;
- f_macro_string_lengths_delete_simple(delimits);
- f_macro_string_lengths_delete_simple(positions_start);
- f_macro_fss_objects_delete_simple(objects);
+ f_macro_string_lengths_t_delete_simple(delimits);
+ f_macro_string_lengths_t_delete_simple(positions_start);
+ f_macro_fss_objects_t_delete_simple(objects);
return status;
}
}
}
else if (buffer->string[range->start] == f_fss_extended_list_open) {
- f_string_length before_list_open = position_previous;
+ f_string_length_t before_list_open = position_previous;
position_previous = range->start;
status = f_utf_buffer_increment(*buffer, range, 1);
if (F_status_is_error(status)) {
- f_macro_string_lengths_delete_simple(delimits);
- f_macro_string_lengths_delete_simple(positions_start);
- f_macro_fss_objects_delete_simple(objects);
+ f_macro_string_lengths_t_delete_simple(delimits);
+ f_macro_string_lengths_t_delete_simple(positions_start);
+ f_macro_fss_objects_t_delete_simple(objects);
return status;
}
}
if (F_status_is_error(status)) {
- f_macro_string_lengths_delete_simple(delimits);
- f_macro_string_lengths_delete_simple(positions_start);
- f_macro_fss_objects_delete_simple(objects);
+ f_macro_string_lengths_t_delete_simple(delimits);
+ f_macro_string_lengths_t_delete_simple(positions_start);
+ f_macro_fss_objects_t_delete_simple(objects);
return status;
}
position_previous = range->start;
status = f_utf_buffer_increment(*buffer, range, 1);
if (F_status_is_error(status)) {
- f_macro_string_lengths_delete_simple(delimits);
- f_macro_string_lengths_delete_simple(positions_start);
- f_macro_fss_objects_delete_simple(objects);
+ f_macro_string_lengths_t_delete_simple(delimits);
+ f_macro_string_lengths_t_delete_simple(positions_start);
+ f_macro_fss_objects_t_delete_simple(objects);
return status;
}
depth++;
if (depth >= positions_start.size) {
- f_macro_string_lengths_resize(status, positions_start, positions_start.size + f_fss_default_allocation_step);
+ f_macro_string_lengths_t_resize(status, positions_start, positions_start.size + f_fss_default_allocation_step);
if (F_status_is_error(status)) {
- f_macro_string_lengths_delete_simple(delimits);
- f_macro_string_lengths_delete_simple(positions_start);
- f_macro_fss_objects_delete_simple(objects);
+ f_macro_string_lengths_t_delete_simple(delimits);
+ f_macro_string_lengths_t_delete_simple(positions_start);
+ f_macro_fss_objects_t_delete_simple(objects);
return status;
}
- f_macro_fss_objects_resize(status, objects, objects.size + f_fss_default_allocation_step);
+ f_macro_fss_objects_t_resize(status, objects, objects.size + f_fss_default_allocation_step);
if (F_status_is_error(status)) {
- f_macro_string_lengths_delete_simple(delimits);
- f_macro_string_lengths_delete_simple(positions_start);
- f_macro_fss_objects_delete_simple(objects);
+ f_macro_string_lengths_t_delete_simple(delimits);
+ f_macro_string_lengths_t_delete_simple(positions_start);
+ f_macro_fss_objects_t_delete_simple(objects);
return status;
}
position_previous = range->start;
status = f_utf_buffer_increment(*buffer, range, 1);
if (F_status_is_error(status)) {
- f_macro_string_lengths_delete_simple(delimits);
- f_macro_string_lengths_delete_simple(positions_start);
- f_macro_fss_objects_delete_simple(objects);
+ f_macro_string_lengths_t_delete_simple(delimits);
+ f_macro_string_lengths_t_delete_simple(positions_start);
+ f_macro_fss_objects_t_delete_simple(objects);
return status;
}
position_previous = range->start;
status = f_utf_buffer_increment(*buffer, range, 1);
if (F_status_is_error(status)) {
- f_macro_string_lengths_delete_simple(delimits);
- f_macro_string_lengths_delete_simple(positions_start);
- f_macro_fss_objects_delete_simple(objects);
+ f_macro_string_lengths_t_delete_simple(delimits);
+ f_macro_string_lengths_t_delete_simple(positions_start);
+ f_macro_fss_objects_t_delete_simple(objects);
return status;
}
}
if (F_status_is_error(status)) {
- f_macro_string_lengths_delete_simple(delimits);
- f_macro_string_lengths_delete_simple(positions_start);
- f_macro_fss_objects_delete_simple(objects);
+ f_macro_string_lengths_t_delete_simple(delimits);
+ f_macro_string_lengths_t_delete_simple(positions_start);
+ f_macro_fss_objects_t_delete_simple(objects);
return status;
}
if (buffer->string[range->start] == f_string_eol[0]) {
if (depth + 1 >= found->size) {
- f_macro_fss_nest_resize(status, (*found), found->size + f_fss_default_allocation_step);
+ f_macro_fss_nest_t_resize(status, (*found), found->size + f_fss_default_allocation_step);
if (F_status_is_error(status)) {
- f_macro_string_lengths_delete_simple(delimits);
- f_macro_string_lengths_delete_simple(positions_start);
- f_macro_fss_objects_delete_simple(objects);
+ f_macro_string_lengths_t_delete_simple(delimits);
+ f_macro_string_lengths_t_delete_simple(positions_start);
+ f_macro_fss_objects_t_delete_simple(objects);
return status;
}
}
if (found->depth[depth].used == found->depth[depth].size) {
- f_macro_fss_items_resize(status, found->depth[depth], found->depth[depth].size + f_fss_default_allocation_step);
+ f_macro_fss_items_t_resize(status, found->depth[depth], found->depth[depth].size + f_fss_default_allocation_step);
if (F_status_is_error(status)) {
- f_macro_string_lengths_delete_simple(delimits);
- f_macro_string_lengths_delete_simple(positions_start);
- f_macro_fss_objects_delete_simple(objects);
+ f_macro_string_lengths_t_delete_simple(delimits);
+ f_macro_string_lengths_t_delete_simple(positions_start);
+ f_macro_fss_objects_t_delete_simple(objects);
return status;
}
}
- f_array_length position = found->depth[depth].used;
+ f_array_length_t position = found->depth[depth].used;
if (found->depth[depth].array[position].content.size != 1) {
- f_macro_fss_content_resize(status, found->depth[depth].array[position].content, 1);
+ f_macro_fss_content_t_resize(status, found->depth[depth].array[position].content, 1);
if (F_status_is_error(status)) {
- f_macro_string_lengths_delete_simple(delimits);
- f_macro_string_lengths_delete_simple(positions_start);
- f_macro_fss_objects_delete_simple(objects);
+ f_macro_string_lengths_t_delete_simple(delimits);
+ f_macro_string_lengths_t_delete_simple(positions_start);
+ f_macro_fss_objects_t_delete_simple(objects);
return status;
}
if (depth == 0) {
status = f_utf_buffer_increment(*buffer, range, 1);
if (F_status_is_error(status)) {
- f_macro_string_lengths_delete_simple(delimits);
- f_macro_string_lengths_delete_simple(positions_start);
- f_macro_fss_objects_delete_simple(objects);
+ f_macro_string_lengths_t_delete_simple(delimits);
+ f_macro_string_lengths_t_delete_simple(positions_start);
+ f_macro_fss_objects_t_delete_simple(objects);
return status;
}
fl_macro_fss_apply_delimit_placeholders((*buffer), delimits);
fl_macro_fss_nest_delimited_return_on_overflow((*buffer), (*range), (*found), delimits, positions_start, objects, F_none_eos, F_none_stop)
- f_macro_string_lengths_delete_simple(delimits);
- f_macro_string_lengths_delete_simple(positions_start);
- f_macro_fss_objects_delete_simple(objects);
+ f_macro_string_lengths_t_delete_simple(delimits);
+ f_macro_string_lengths_t_delete_simple(positions_start);
+ f_macro_fss_objects_t_delete_simple(objects);
return FL_fss_found_content;
}
position_previous = range->start;
status = f_utf_buffer_increment(*buffer, range, 1);
if (F_status_is_error(status)) {
- f_macro_string_lengths_delete_simple(delimits);
- f_macro_string_lengths_delete_simple(positions_start);
- f_macro_fss_objects_delete_simple(objects);
+ f_macro_string_lengths_t_delete_simple(delimits);
+ f_macro_string_lengths_t_delete_simple(positions_start);
+ f_macro_fss_objects_t_delete_simple(objects);
return status;
}
position_previous = range->start;
status = f_utf_buffer_increment(*buffer, range, 1);
if (F_status_is_error(status)) {
- f_macro_string_lengths_delete_simple(delimits);
- f_macro_string_lengths_delete_simple(positions_start);
- f_macro_fss_objects_delete_simple(objects);
+ f_macro_string_lengths_t_delete_simple(delimits);
+ f_macro_string_lengths_t_delete_simple(positions_start);
+ f_macro_fss_objects_t_delete_simple(objects);
return status;
}
position_previous = range->start;
status = f_utf_buffer_increment(*buffer, range, 1);
if (F_status_is_error(status)) {
- f_macro_string_lengths_delete_simple(delimits);
- f_macro_string_lengths_delete_simple(positions_start);
- f_macro_fss_objects_delete_simple(objects);
+ f_macro_string_lengths_t_delete_simple(delimits);
+ f_macro_string_lengths_t_delete_simple(positions_start);
+ f_macro_fss_objects_t_delete_simple(objects);
return status;
}
} // while
- f_macro_string_lengths_delete_simple(delimits);
- f_macro_string_lengths_delete_simple(positions_start);
- f_macro_fss_objects_delete_simple(objects);
+ f_macro_string_lengths_t_delete_simple(delimits);
+ f_macro_string_lengths_t_delete_simple(positions_start);
+ f_macro_fss_objects_t_delete_simple(objects);
if (range->start > range->stop) {
if (depth == 0) return F_status_set_error(F_unterminated_stop);
#endif // _di_fl_fss_extended_list_content_read_
#ifndef _di_fl_fss_extended_list_object_write_
- f_return_status fl_fss_extended_list_object_write(const f_string_static object, f_string_range *range, f_string_dynamic *destination) {
+ f_return_status fl_fss_extended_list_object_write(const f_string_static_t object, f_string_range_t *range, f_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (destination == 0) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- f_status status = F_none;
+ f_status_t status = F_none;
- f_string_range buffer_position = f_string_range_initialize;
- f_string_length start_position = f_string_initialize;
- f_string_length size_allocate = 0;
- f_string_length start_buffer = 0;
+ f_string_range_t buffer_position = f_string_range_initialize;
+ f_string_length_t start_position = f_string_t_initialize;
+ f_string_length_t size_allocate = 0;
+ f_string_length_t start_buffer = 0;
fl_macro_fss_skip_past_delimit_placeholders(object, (*range))
size_allocate = destination->used + (range->stop - range->start) + 2 + f_fss_default_allocation_step_string;
if (size_allocate > destination->size) {
- f_macro_string_dynamic_resize(status, (*destination), size_allocate);
+ f_macro_string_dynamic_t_resize(status, (*destination), size_allocate);
if (F_status_is_error(status)) return status;
}
while (range->start <= range->stop && range->start < object.used) {
if (object.string[range->start] == f_fss_delimit_slash) {
- f_string_length slash_count = 1;
+ f_string_length_t slash_count = 1;
destination->string[buffer_position.stop] = object.string[range->start];
buffer_position.stop++;
size_allocate += slash_count;
if (size_allocate > destination->size) {
- f_macro_string_dynamic_resize(status, (*destination), size_allocate + f_fss_default_allocation_step_string);
+ f_macro_string_dynamic_t_resize(status, (*destination), size_allocate + f_fss_default_allocation_step_string);
if (F_status_is_error(status)) return status;
}
#endif // _di_fl_fss_extended_list_object_write_
#ifndef _di_fl_fss_extended_list_content_write_
- f_return_status fl_fss_extended_list_content_write(const f_string_static content, f_string_range *range, f_string_dynamic *destination) {
+ f_return_status fl_fss_extended_list_content_write(const f_string_static_t content, f_string_range_t *range, f_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (destination == 0) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
// @todo
/*
- f_status status = F_none;
+ f_status_t status = F_none;
bool is_comment = F_false;
bool has_graph = F_false;
- f_string_range buffer_position = f_string_range_initialize;
- f_string_length start_position = f_string_initialize;
- f_string_length size_allocate = 0;
+ f_string_range_t buffer_position = f_string_range_initialize;
+ f_string_length_t start_position = f_string_t_initialize;
+ f_string_length_t size_allocate = 0;
fl_macro_fss_skip_past_delimit_placeholders(content, (*range))
size_allocate = destination->used + (range->stop - range->start) + 2 + f_fss_default_allocation_step_string;
if (size_allocate > destination->size) {
- f_macro_string_dynamic_resize(status, (*destination), size_allocate);
+ f_macro_string_dynamic_t_resize(status, (*destination), size_allocate);
if (F_status_is_error(status)) return status;
}
while (range->start <= range->stop && range->start < content.used) {
if (content.string[range->start] == f_fss_delimit_slash && !is_comment) {
- f_string_length slash_count = 1;
+ f_string_length_t slash_count = 1;
destination->string[buffer_position.stop] = content.string[range->start];
buffer_position.stop++;
} // while
if (content.string[range->start] == f_fss_extended_list_open) {
- f_string_length start = range->start;
+ f_string_length_t start = range->start;
status = f_utf_buffer_increment(content, range, 1);
if (F_status_is_error(status)) return status;
size_allocate += slash_count + 1;
if (size_allocate > destination->size) {
- f_macro_string_dynamic_resize(status, (*destination), size_allocate + f_fss_default_allocation_step_string);
+ f_macro_string_dynamic_t_resize(status, (*destination), size_allocate + f_fss_default_allocation_step_string);
if (F_status_is_error(status)) return status;
}
}
}
else if (content.string[range->start] == f_fss_extended_list_open && !is_comment) {
- f_string_length start = range->start;
+ f_string_length_t start = range->start;
has_graph = F_true;
size_allocate++;
if (size_allocate > destination->size) {
- f_macro_string_dynamic_resize(status, (*destination), size_allocate + f_fss_default_allocation_step_string);
+ f_macro_string_dynamic_t_resize(status, (*destination), size_allocate + f_fss_default_allocation_step_string);
if (F_status_is_error(status)) return status;
}
* Errors from (with error bit): f_fss_skip_past_space().
*/
#ifndef _di_fl_fss_extended_list_object_read_
- extern f_return_status fl_fss_extended_list_object_read(f_string_dynamic *buffer, f_string_range *range, f_fss_object *found);
+ extern f_return_status fl_fss_extended_list_object_read(f_string_dynamic_t *buffer, f_string_range_t *range, f_fss_object_t *found);
#endif // _di_fl_fss_extended_list_object_read_
/**
* Errors from (with error bit): f_fss_skip_past_space().
*/
#ifndef _di_fl_fss_extended_list_content_read_
- extern f_return_status fl_fss_extended_list_content_read(f_string_dynamic *buffer, f_string_range *range, f_fss_nest *found);
+ extern f_return_status fl_fss_extended_list_content_read(f_string_dynamic_t *buffer, f_string_range_t *range, f_fss_nest_t *found);
#endif // _di_fl_fss_extended_list_content_read_
/**
* Errors from (with error bit): f_utf_buffer_increment().
*/
#ifndef _di_fl_fss_extended_list_object_write_
- extern f_return_status fl_fss_extended_list_object_write(const f_string_static object, f_string_range *range, f_string_dynamic *destination);
+ extern f_return_status fl_fss_extended_list_object_write(const f_string_static_t object, f_string_range_t *range, f_string_dynamic_t *destination);
#endif // _di_fl_fss_extended_list_object_write_
/**
* Errors from (with error bit): f_utf_buffer_increment().
*/
#ifndef _di_fl_fss_extended_list_content_write_
- extern f_return_status fl_fss_extended_list_content_write(const f_string_static content, f_string_range *range, f_string_dynamic *destination);
+ extern f_return_status fl_fss_extended_list_content_write(const f_string_static_t content, f_string_range_t *range, f_string_dynamic_t *destination);
#endif // _di_fl_fss_extended_list_content_write_
#ifdef __cplusplus
// TODO: check if character to be replaced is UTF and apply placeholder to entire width.
#ifndef _di_fl_macro_fss_apply_delimit_placeholders_
#define fl_macro_fss_apply_delimit_placeholders(buffer, delimits) \
- for (f_array_length i = 0; i < delimits.used; i++) { \
+ for (f_array_length_t i = 0; i < delimits.used; i++) { \
buffer.string[delimits.array[i]] = f_fss_delimit_placeholder; \
} \
\
- f_macro_string_lengths_delete_simple(delimits);
+ f_macro_string_lengths_t_delete_simple(delimits);
#endif // _di_fl_macro_fss_apply_delimit_placeholders_
#ifndef _di_fl_macro_fss_skip_past_delimit_placeholders_
#ifndef _di_fl_macro_fss_object_return_on_overflow_
#define fl_macro_fss_object_return_on_overflow(buffer, range, found, delimits, eos_status, stop_status) \
if (range.start >= buffer.used) { \
- f_macro_string_lengths_delete_simple(delimits); \
+ f_macro_string_lengths_t_delete_simple(delimits); \
\
found.stop = buffer.used - 1; \
return eos_status; \
} \
else if (range.start > range.stop) { \
- f_macro_string_lengths_delete_simple(delimits); \
+ f_macro_string_lengths_t_delete_simple(delimits); \
\
found.stop = range.stop; \
return stop_status; \
#ifndef _di_fl_macro_fss_object_delimited_return_on_overflow_
#define fl_macro_fss_object_delimited_return_on_overflow(buffer, range, found, delimits, eos_status, stop_status) \
if (range.start >= buffer.used) { \
- for (f_array_length i = 0; i < delimits.used; i++) { \
+ for (f_array_length_t i = 0; i < delimits.used; i++) { \
buffer.string[delimits.array[i]] = f_fss_delimit_placeholder; \
} \
- f_macro_string_lengths_delete_simple(delimits); \
+ f_macro_string_lengths_t_delete_simple(delimits); \
\
found.stop = buffer.used - 1; \
return eos_status; \
} \
else if (range.start > range.stop) { \
- for (f_array_length i = 0; i < delimits.used; i++) { \
+ for (f_array_length_t i = 0; i < delimits.used; i++) { \
buffer.string[delimits.array[i]] = f_fss_delimit_placeholder; \
i++; \
} \
- f_macro_string_lengths_delete_simple(delimits); \
+ f_macro_string_lengths_t_delete_simple(delimits); \
\
found.stop = range.stop; \
return stop_status; \
#ifndef _di_fl_macro_fss_content_return_on_overflow_
#define fl_macro_fss_content_return_on_overflow(buffer, range, found, delimits, eos_status, stop_status) \
if (range.start >= buffer.used) { \
- f_macro_string_lengths_delete_simple(delimits); \
+ f_macro_string_lengths_t_delete_simple(delimits); \
\
found.array[found.used].stop = buffer.used - 1; \
return eos_status; \
} \
else if (range.start > range.stop) { \
- f_macro_string_lengths_delete_simple(delimits); \
+ f_macro_string_lengths_t_delete_simple(delimits); \
\
found.array[found.used].stop = range.stop; \
return stop_status; \
#ifndef _di_fl_macro_fss_content_delimited_return_on_overflow_
#define fl_macro_fss_content_delimited_return_on_overflow(buffer, range, found, delimits, eos_status, stop_status) \
if (range.start >= buffer.used) { \
- for (f_array_length i = 0; i < delimits.used; i++) { \
+ for (f_array_length_t i = 0; i < delimits.used; i++) { \
buffer.string[delimits.array[i]] = f_fss_delimit_placeholder; \
} \
- f_macro_string_lengths_delete_simple(delimits); \
+ f_macro_string_lengths_t_delete_simple(delimits); \
\
found.array[found.used].stop = buffer.used - 1; \
return eos_status; \
} \
else if (range.start > range.stop) { \
- for (f_array_length i = 0; i < delimits.used; i++) { \
+ for (f_array_length_t i = 0; i < delimits.used; i++) { \
buffer.string[delimits.array[i]] = f_fss_delimit_placeholder; \
} \
- f_macro_string_lengths_delete_simple(delimits); \
+ f_macro_string_lengths_t_delete_simple(delimits); \
\
found.array[found.used].stop = range.stop; \
return stop_status; \
#ifndef _di_fl_macro_fss_allocate_content_if_necessary_
#define fl_macro_fss_allocate_content_if_necessary(content, delimits) \
if (content.used == content.size) { \
- f_status status = F_none; \
+ f_status_t status = F_none; \
\
- f_macro_fss_content_resize(status, content, content.size + f_fss_default_allocation_step); \
+ f_macro_fss_content_t_resize(status, content, content.size + f_fss_default_allocation_step); \
if (F_status_is_error(status)) { \
- f_macro_string_lengths_delete_simple(delimits); \
+ f_macro_string_lengths_t_delete_simple(delimits); \
\
return status; \
} \
#ifndef _di_fl_macro_fss_nest_return_on_overflow_
#define fl_macro_fss_nest_return_on_overflow(buffer, range, found, delimits, positions, objects, eos_status, stop_status) \
if (range.start >= buffer.used) { \
- f_macro_string_lengths_delete_simple(delimits); \
- f_macro_string_lengths_delete_simple(positions); \
- f_macro_fss_objects_delete_simple(objects); \
+ f_macro_string_lengths_t_delete_simple(delimits); \
+ f_macro_string_lengths_t_delete_simple(positions); \
+ f_macro_fss_objects_t_delete_simple(objects); \
\
return eos_status; \
} \
else if (range.start > range.stop) { \
- f_macro_string_lengths_delete_simple(delimits); \
- f_macro_string_lengths_delete_simple(positions); \
- f_macro_fss_objects_delete_simple(objects); \
+ f_macro_string_lengths_t_delete_simple(delimits); \
+ f_macro_string_lengths_t_delete_simple(positions); \
+ f_macro_fss_objects_t_delete_simple(objects); \
\
return stop_status; \
}
#ifndef _di_fl_macro_fss_nest_delimited_return_on_overflow_
#define fl_macro_fss_nest_delimited_return_on_overflow(buffer, range, found, delimits, positions, objects, eos_status, stop_status) \
if (range.start >= buffer.used) { \
- for (f_array_length i = 0; i < delimits.used; i++) { \
+ for (f_array_length_t i = 0; i < delimits.used; i++) { \
buffer.string[delimits.array[i]] = f_fss_delimit_placeholder; \
} \
- f_macro_string_lengths_delete_simple(delimits); \
- f_macro_string_lengths_delete_simple(positions); \
- f_macro_fss_objects_delete_simple(objects); \
+ f_macro_string_lengths_t_delete_simple(delimits); \
+ f_macro_string_lengths_t_delete_simple(positions); \
+ f_macro_fss_objects_t_delete_simple(objects); \
\
return eos_status; \
} \
else if (range.start > range.stop) { \
- for (f_array_length i = 0; i < delimits.used; i++) { \
+ for (f_array_length_t i = 0; i < delimits.used; i++) { \
buffer.string[delimits.array[i]] = f_fss_delimit_placeholder; \
} \
- f_macro_string_lengths_delete_simple(delimits); \
- f_macro_string_lengths_delete_simple(positions); \
- f_macro_fss_objects_delete_simple(objects); \
+ f_macro_string_lengths_t_delete_simple(delimits); \
+ f_macro_string_lengths_t_delete_simple(positions); \
+ f_macro_fss_objects_t_delete_simple(objects); \
\
return stop_status; \
}
while (buffer.string[range.start] != f_string_eol[0]) { \
range.start++; \
if (range.start >= buffer.used) { \
- f_macro_string_lengths_delete_simple(delimits); \
+ f_macro_string_lengths_t_delete_simple(delimits); \
\
return eos_status; \
} \
if (range.start > range.stop) { \
- f_macro_string_lengths_delete_simple(delimits); \
+ f_macro_string_lengths_t_delete_simple(delimits); \
\
return stop_status; \
} \
while (buffer.string[range.start] != f_string_eol[0]) { \
range.start++; \
if (range.start >= buffer.used) { \
- for (f_array_length i = 0; i < delimits.used; i++) { \
+ for (f_array_length_t i = 0; i < delimits.used; i++) { \
buffer.string[delimits.array[i]] = f_fss_delimit_placeholder; \
} \
- f_macro_string_lengths_delete_simple(delimits); \
+ f_macro_string_lengths_t_delete_simple(delimits); \
\
return eos_status; \
} \
if (range.start > range.stop) { \
- for (f_array_length i = 0; i < delimits.used; i++) { \
+ for (f_array_length_t i = 0; i < delimits.used; i++) { \
buffer.string[delimits.array[i]] = f_fss_delimit_placeholder; \
} \
- f_macro_string_lengths_delete_simple(delimits); \
+ f_macro_string_lengths_t_delete_simple(delimits); \
\
return stop_status; \
} \
while (buffer.string[range.start] != f_string_eol[0]) { \
range.start++; \
if (range.start >= buffer.used) { \
- f_macro_string_lengths_delete_simple(delimits); \
+ f_macro_string_lengths_t_delete_simple(delimits); \
\
found.array[found.used].stop = range.stop; \
return eos_status; \
} \
if (range.start > range.stop) { \
- f_macro_string_lengths_delete_simple(delimits); \
+ f_macro_string_lengths_t_delete_simple(delimits); \
\
found.array[found.used].stop = range.stop; \
return stop_status; \
while (buffer.string[range.start] != f_string_eol[0]) { \
range.start++; \
if (range.start >= buffer.used) { \
- for (f_array_length i = 0; i < delimits.used; i++) { \
+ for (f_array_length_t i = 0; i < delimits.used; i++) { \
buffer.string[delimits.array[i]] = f_fss_delimit_placeholder; \
} \
- f_macro_string_lengths_delete_simple(delimits); \
+ f_macro_string_lengths_t_delete_simple(delimits); \
\
found.array[found.used].stop = range.stop; \
return eos_status; \
} \
if (range.start > range.stop) { \
- for (f_array_length i = 0; i < delimits.used; i++) { \
+ for (f_array_length_t i = 0; i < delimits.used; i++) { \
buffer.string[delimits.array[i]] = f_fss_delimit_placeholder; \
} \
- f_macro_string_lengths_delete_simple(delimits); \
+ f_macro_string_lengths_t_delete_simple(delimits); \
\
found.array[found.used].stop = range.stop; \
return stop_status; \
#endif
#if !defined(_di_fl_fss_basic_object_read_) || !defined(_di_fl_fss_extended_object_read_) || !defined(_di_fl_fss_extended_content_read_)
- f_return_status private_fl_fss_basic_object_read(f_string_dynamic *buffer, f_string_range *range, f_fss_object *found, f_fss_quoted *quoted, f_string_lengths *delimits) {
- f_status status = F_none;
+ f_return_status private_fl_fss_basic_object_read(f_string_dynamic_t *buffer, f_string_range_t *range, f_fss_object_t *found, f_fss_quoted_t *quoted, f_string_lengths_t *delimits) {
+ f_status_t status = F_none;
status = f_fss_skip_past_space(*buffer, range);
if (F_status_is_error(status)) return status;
}
// delimits must only be applied once a valid object is found->
- const f_string_length delimit_initial = delimits->used;
+ const f_string_length_t delimit_initial = delimits->used;
// handle quoted support.
int8_t quote = 0;
// identify where the object begins.
if (buffer->string[range->start] == f_fss_delimit_slash) {
- f_string_length first_slash = range->start;
+ f_string_length_t first_slash = range->start;
found->start = range->start;
// only the first slash before a quoted needs to be escaped (or not) as once there is a slash before a quoted, this cannot ever be a quote object.
// this simplifies the number of slashes needed.
if (delimits->used == delimits->size) {
- if (delimits->size + f_fss_default_allocation_step > f_array_length_size) {
- if (delimits->size + 1 > f_array_length_size) {
+ if (delimits->size + f_fss_default_allocation_step > f_array_length_t_size) {
+ if (delimits->size + 1 > f_array_length_t_size) {
return F_status_set_error(F_buffer_too_large);
}
- f_macro_string_lengths_resize(status, (*delimits), delimits->size + 1);
+ f_macro_string_lengths_t_resize(status, (*delimits), delimits->size + 1);
if (F_status_is_error(status)) return status;
}
else {
- f_macro_string_lengths_resize(status, (*delimits), delimits->size + f_fss_default_allocation_step);
+ f_macro_string_lengths_t_resize(status, (*delimits), delimits->size + f_fss_default_allocation_step);
if (F_status_is_error(status)) return status;
}
}
while (range->start <= range->stop && range->start < buffer->used) {
if (buffer->string[range->start] == f_fss_delimit_slash) {
- f_string_length first_slash = range->start;
- f_string_length slash_count = 1;
+ f_string_length_t first_slash = range->start;
+ f_string_length_t slash_count = 1;
status = f_utf_buffer_increment(*buffer, range, 1);
if (F_status_is_error(status)) return status;
}
if (buffer->string[range->start] == quote) {
- f_string_length location = range->start;
+ f_string_length_t location = range->start;
// check to see if there is a whitespace, EOS, or EOL after the quoted, if not, then this is not a closing quoted and delimits do not apply.
if (range->start + 1 <= range->stop && range->start + 1 < buffer->used) {
if (slash_count % 2 == 0) {
if (delimits->used + (slash_count / 2) >= delimits->size) {
- if (delimits->used + (slash_count / 2) >= f_array_length_size) {
+ if (delimits->used + (slash_count / 2) >= f_array_length_t_size) {
return F_status_set_error(F_buffer_too_large);
}
- f_macro_string_lengths_resize(status, (*delimits), delimits->size + (slash_count / 2));
+ f_macro_string_lengths_t_resize(status, (*delimits), delimits->size + (slash_count / 2));
if (F_status_is_error(status)) return status;
}
}
else {
if (delimits->used + (slash_count / 2) >= delimits->size) {
- if (delimits->used + (slash_count / 2) >= f_array_length_size) {
+ if (delimits->used + (slash_count / 2) >= f_array_length_t_size) {
return F_status_set_error(F_buffer_too_large);
}
- f_macro_string_lengths_resize(status, (*delimits), delimits->size + (slash_count / 2) + 1);
+ f_macro_string_lengths_t_resize(status, (*delimits), delimits->size + (slash_count / 2) + 1);
if (F_status_is_error(status)) return status;
}
else if (buffer->string[range->start] == quote) {
// check to see if there is a whitespace, EOS, or EOL after the quoted, if not, then this is not a closing quoted.
{
- f_string_length location = range->start;
+ f_string_length_t location = range->start;
if (range->start + 1 <= range->stop && range->start + 1 < buffer->used) {
range->start++;
#endif // !defined(_di_fl_fss_basic_object_read_) || !defined(_di_fl_fss_extended_object_read_)
#if !defined(_di_fl_fss_basic_object_write_) || !defined(_di_fl_fss_extended_object_write_)
- f_return_status private_fl_fss_basic_object_write(const f_string_static object, const f_fss_quoted quoted, f_string_range *range, f_string_dynamic *destination) {
- f_status status = F_none;
+ f_return_status private_fl_fss_basic_object_write(const f_string_static_t object, const f_fss_quoted_t quoted, f_string_range_t *range, f_string_dynamic_t *destination) {
+ f_status_t status = F_none;
fl_macro_fss_skip_past_delimit_placeholders(object, (*range));
else if (range->start >= object.used) return F_data_not_eos;
// ensure that there is room for the start and stop quotes or a slash delimit and the object open character.
- f_string_length size_allocate = destination->used + (range->stop - range->start) + 3 + f_fss_default_allocation_step_string;
+ f_string_length_t size_allocate = destination->used + (range->stop - range->start) + 3 + f_fss_default_allocation_step_string;
if (size_allocate > destination->size) {
- f_macro_string_dynamic_resize(status, (*destination), size_allocate);
+ f_macro_string_dynamic_t_resize(status, (*destination), size_allocate);
if (F_status_is_error(status)) return status;
}
- const f_string_length position_start = range->start;
+ const f_string_length_t position_start = range->start;
- f_string_range destination_position = f_string_range_initialize;
+ f_string_range_t destination_position = f_string_range_initialize;
destination_position.start = destination->used;
destination_position.stop = destination->used;
size_allocate++;
if (size_allocate > destination->size) {
- f_macro_string_dynamic_resize(status, (*destination), size_allocate + f_fss_default_allocation_step_string);
+ f_macro_string_dynamic_t_resize(status, (*destination), size_allocate + f_fss_default_allocation_step_string);
if (F_status_is_error(status)) return status;
}
size_allocate++;
if (size_allocate > destination->size) {
- f_macro_string_dynamic_resize(status, (*destination), size_allocate + f_fss_default_allocation_step_string);
+ f_macro_string_dynamic_t_resize(status, (*destination), size_allocate + f_fss_default_allocation_step_string);
if (F_status_is_error(status)) return status;
}
if (quote) {
if (object.string[range->start] == f_fss_delimit_slash) {
- f_string_range next = *range;
- f_string_length slashes = 1;
+ f_string_range_t next = *range;
+ f_string_length_t slashes = 1;
bool must_delimit = F_false;
}
if (must_delimit) {
- for (f_string_length i = 0; i < slashes; i++) {
+ for (f_string_length_t i = 0; i < slashes; i++) {
destination->string[destination_position.stop] = f_fss_delimit_slash;
destination_position.stop++;
} // for
size_allocate++;
if (size_allocate > destination->size) {
- f_macro_string_dynamic_resize(status, (*destination), size_allocate + f_fss_default_allocation_step_string);
+ f_macro_string_dynamic_t_resize(status, (*destination), size_allocate + f_fss_default_allocation_step_string);
if (F_status_is_error(status)) return status;
}
}
}
else if (object.string[range->start] == destination->string[destination_position.start]) {
- f_string_range next = *range;
+ f_string_range_t next = *range;
bool must_delimit = F_false;
status = f_utf_buffer_increment(object, &next, 1);
size_allocate++;
if (size_allocate > destination->size) {
- f_macro_string_dynamic_resize(status, (*destination), size_allocate + f_fss_default_allocation_step_string);
+ f_macro_string_dynamic_t_resize(status, (*destination), size_allocate + f_fss_default_allocation_step_string);
if (F_status_is_error(status)) return status;
}
size_allocate++;
if (size_allocate > destination->size) {
- f_macro_string_dynamic_resize(status, (*destination), size_allocate + f_fss_default_allocation_step_string);
+ f_macro_string_dynamic_t_resize(status, (*destination), size_allocate + f_fss_default_allocation_step_string);
if (F_status_is_error(status)) return status;
}
size_allocate++;
if (size_allocate > destination->size) {
- f_macro_string_dynamic_resize(status, (*destination), size_allocate + f_fss_default_allocation_step_string);
+ f_macro_string_dynamic_t_resize(status, (*destination), size_allocate + f_fss_default_allocation_step_string);
if (F_status_is_error(status)) return status;
}
size_allocate++;
if (size_allocate > destination->size) {
- f_macro_string_dynamic_resize(status, (*destination), size_allocate + f_fss_default_allocation_step_string);
+ f_macro_string_dynamic_t_resize(status, (*destination), size_allocate + f_fss_default_allocation_step_string);
if (F_status_is_error(status)) return status;
}
* @see fl_fss_extended_object_read()
*/
#if !defined(_di_fl_fss_basic_object_read_) || !defined(_di_fl_fss_extended_object_read_) || !defined(_di_fl_fss_extended_content_read_)
- extern f_return_status private_fl_fss_basic_object_read(f_string_dynamic *buffer, f_string_range *range, f_fss_object *found, f_fss_quoted *quoted, f_string_lengths *delimits) f_gcc_attribute_visibility_internal;
+ extern f_return_status private_fl_fss_basic_object_read(f_string_dynamic_t *buffer, f_string_range_t *range, f_fss_object_t *found, f_fss_quoted_t *quoted, f_string_lengths_t *delimits) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_fl_fss_basic_object_read_) || !defined(_di_fl_fss_extended_object_read_) || !defined(_di_fl_fss_extended_content_read_)
/**
* @see fl_fss_extended_object_write()
*/
#if !defined(fl_fss_basic_object_write) || !defined(fl_fss_extended_object_write)
- extern f_return_status private_fl_fss_basic_object_write(const f_string_static object, const f_fss_quoted quoted, f_string_range *range, f_string_dynamic *destination) f_gcc_attribute_visibility_internal;
+ extern f_return_status private_fl_fss_basic_object_write(const f_string_static_t object, const f_fss_quoted_t quoted, f_string_range_t *range, f_string_dynamic_t *destination) f_gcc_attribute_visibility_internal;
#endif // !defined(fl_fss_basic_object_write) || !defined(fl_fss_extended_object_write)
#ifdef __cplusplus
#endif
#ifndef _di_fl_iki_read_
- f_return_status fl_iki_read(f_string_static *buffer, f_string_range *range, f_iki_variable *variable, f_iki_vocabulary *vocabulary, f_iki_content *content) {
- f_status status = F_none;
+ f_return_status fl_iki_read(f_string_static_t *buffer, f_string_range_t *range, f_iki_variable_t *variable, f_iki_vocabulary_t *vocabulary, f_iki_content_t *content) {
+ f_status_t status = F_none;
do {
status = f_iki_read(buffer, range, variable, vocabulary, content);
* F_string_too_large (with error bit) if a string length is too large to store in the buffer.
*/
#ifndef _di_fl_iki_read_
- extern f_return_status fl_iki_read(f_string_static *buffer, f_string_range *range, f_iki_variable *variable, f_iki_vocabulary *vocabulary, f_iki_content *content);
+ extern f_return_status fl_iki_read(f_string_static_t *buffer, f_string_range_t *range, f_iki_variable_t *variable, f_iki_vocabulary_t *vocabulary, f_iki_content_t *content);
#endif // _di_fl_iki_read_
#ifdef __cplusplus
#endif
#ifndef _di_fl_print_trim_string_
- f_return_status fl_print_trim_string(FILE *output, const f_string string, const f_string_length length) {
+ f_return_status fl_print_trim_string(FILE *output, const f_string_t string, const f_string_length_t length) {
#ifndef _di_level_1_parameter_checking_
if (string == 0) return F_status_set_error(F_parameter);
if (length < 1) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- register f_string_length i = 0;
- f_status status = F_none;
+ register f_string_length_t i = 0;
+ f_status_t status = F_none;
uint8_t width_max = 0;
for (; i < length; i += f_macro_utf_byte_width(string[i])) {
}
if (status == F_true) {
- f_string_length j = i + f_macro_utf_byte_width(string[i]);
+ f_string_length_t j = i + f_macro_utf_byte_width(string[i]);
if (j == length) return F_none;
#endif // _di_fl_print_trim_string_
#ifndef _di_fl_print_trim_string_dynamic_
- f_return_status fl_print_trim_string_dynamic(FILE *output, const f_string_static buffer) {
+ f_return_status fl_print_trim_string_dynamic(FILE *output, const f_string_static_t buffer) {
#ifndef _di_level_1_parameter_checking_
if (buffer.used == 0) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- register f_string_length i = 0;
- f_status status = F_none;
+ register f_string_length_t i = 0;
+ f_status_t status = F_none;
uint8_t width_max = 0;
for (; i < buffer.used; i += f_macro_utf_byte_width(buffer.string[i])) {
}
if (status == F_true) {
- f_string_length j = i + f_macro_utf_byte_width(buffer.string[i]);
+ f_string_length_t j = i + f_macro_utf_byte_width(buffer.string[i]);
if (j == buffer.used) return F_none;
#endif // _di_fl_print_trim_string_dynamic_
#ifndef _di_fl_print_trim_string_dynamic_partial_
- f_return_status fl_print_trim_string_dynamic_partial(FILE *output, const f_string_static buffer, const f_string_range range) {
+ f_return_status fl_print_trim_string_dynamic_partial(FILE *output, const f_string_static_t buffer, const f_string_range_t range) {
#ifndef _di_level_1_parameter_checking_
if (range.start < 0) return F_status_set_error(F_parameter);
if (range.stop < range.start) return F_status_set_error(F_parameter);
if (range.stop >= buffer.used) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- register f_string_length i = range.start;
- f_status status = F_none;
+ register f_string_length_t i = range.start;
+ f_status_t status = F_none;
uint8_t width_max = 0;
}
if (status == F_true) {
- f_string_length j = i + width_i;
+ f_string_length_t j = i + width_i;
if (j == range.stop) return F_none;
#endif // _di_fl_print_trim_string_dynamic_partial_
#ifndef _di_fl_print_trim_utf_string_
- f_return_status fl_print_trim_utf_string(FILE *output, const f_utf_string string, const f_utf_string_length length) {
+ f_return_status fl_print_trim_utf_string(FILE *output, const f_utf_string_t string, const f_utf_string_length_t length) {
#ifndef _di_level_1_parameter_checking_
if (string == 0) return F_status_set_error(F_parameter);
if (length < 1) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- register f_string_length i = 0;
- f_status status = F_none;
+ register f_string_length_t i = 0;
+ f_status_t status = F_none;
for (; i < length; i++) {
status = f_utf_character_is_whitespace(string[i]);
}
if (status == F_true) {
- f_string_length j = i + 1;
+ f_string_length_t j = i + 1;
if (j == length) return F_none;
#endif // _di_fl_print_trim_utf_string_
#ifndef _di_fl_print_trim_utf_string_dynamic_
- f_return_status fl_print_trim_utf_string_dynamic(FILE *output, const f_utf_string_static buffer) {
+ f_return_status fl_print_trim_utf_string_dynamic(FILE *output, const f_utf_string_static_t buffer) {
#ifndef _di_level_1_parameter_checking_
if (buffer.used == 0) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- register f_utf_string_length i = 0;
- f_status status = F_none;
+ register f_utf_string_length_t i = 0;
+ f_status_t status = F_none;
for (; i < buffer.used; i++) {
status = f_utf_character_is_whitespace(buffer.string[i]);
}
if (status == F_true) {
- f_string_length j = i + 1;
+ f_string_length_t j = i + 1;
if (j == buffer.used) return F_none;
#endif // _di_fl_print_trim_utf_string_dynamic_
#ifndef _di_fl_print_trim_utf_string_dynamic_partial_
- f_return_status fl_print_trim_utf_string_dynamic_partial(FILE *output, const f_utf_string_static buffer, const f_utf_string_range range) {
+ f_return_status fl_print_trim_utf_string_dynamic_partial(FILE *output, const f_utf_string_static_t buffer, const f_utf_string_range_t range) {
#ifndef _di_level_1_parameter_checking_
if (range.start < 0) return F_status_set_error(F_parameter);
if (range.stop < range.start) return F_status_set_error(F_parameter);
if (range.stop >= buffer.used) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- register f_string_length i = range.start;
- f_status status = F_none;
+ register f_string_length_t i = range.start;
+ f_status_t status = F_none;
for (; i <= range.stop; i++) {
status = f_utf_character_is_whitespace(buffer.string[i]);
}
if (status == F_true) {
- f_string_length j = i + 1;
+ f_string_length_t j = i + 1;
if (j == range.stop) return F_none;
* Errors from (with error bit): f_utf_is_whitespace().
*/
#ifndef _di_fl_print_trim_string_
- extern f_return_status fl_print_trim_string(FILE *output, const f_string string, const f_string_length length);
+ extern f_return_status fl_print_trim_string(FILE *output, const f_string_t string, const f_string_length_t length);
#endif // _di_fl_print_trim_string_
/**
* Errors from (with error bit): f_utf_is_whitespace().
*/
#ifndef _di_fl_print_trim_string_dynamic_
- extern f_return_status fl_print_trim_string_dynamic(FILE *output, const f_string_static buffer);
+ extern f_return_status fl_print_trim_string_dynamic(FILE *output, const f_string_static_t buffer);
#endif // _di_fl_print_trim_string_dynamic_
/**
* Errors from (with error bit): f_utf_is_whitespace().
*/
#ifndef _di_fl_print_trim_string_dynamic_partial_
- extern f_return_status fl_print_trim_string_dynamic_partial(FILE *output, const f_string_static buffer, const f_string_range range);
+ extern f_return_status fl_print_trim_string_dynamic_partial(FILE *output, const f_string_static_t buffer, const f_string_range_t range);
#endif // _di_fl_print_trim_string_dynamic_partial_
/**
* Errors from (with error bit): f_utf_character_is_whitespace().
*/
#ifndef _di_fl_print_trim_utf_string_
- extern f_return_status fl_print_trim_utf_string(FILE *output, const f_utf_string string, const f_utf_string_length length);
+ extern f_return_status fl_print_trim_utf_string(FILE *output, const f_utf_string_t string, const f_utf_string_length_t length);
#endif // _di_fl_print_trim_utf_string_
/**
* Errors from (with error bit): f_utf_character_is_whitespace().
*/
#ifndef _di_fl_print_trim_utf_string_dynamic_
- extern f_return_status fl_print_trim_utf_string_dynamic(FILE *output, const f_utf_string_static buffer);
+ extern f_return_status fl_print_trim_utf_string_dynamic(FILE *output, const f_utf_string_static_t buffer);
#endif // _di_fl_print_trim_utf_string_dynamic_
/**
* Errors from (with error bit): f_utf_character_is_whitespace().
*/
#ifndef _di_fl_print_trim_utf_string_dynamic_partial_
- extern f_return_status fl_print_trim_utf_string_dynamic_partial(FILE *output, const f_utf_string_static buffer, const f_utf_string_range range);
+ extern f_return_status fl_print_trim_utf_string_dynamic_partial(FILE *output, const f_utf_string_static_t buffer, const f_utf_string_range_t range);
#endif // _di_fl_print_trim_utf_string_dynamic_partial_
#ifdef __cplusplus
#endif
#ifndef _di_fl_status_to_string_
- f_return_status fl_status_to_string(const f_status code, f_string *string) {
+ f_return_status fl_status_to_string(const f_status_t code, f_string_t *string) {
#ifndef _di_level_1_parameter_checking_
if (string == 0) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- f_status unmasked_code = F_status_set_fine(code);
+ f_status_t unmasked_code = F_status_set_fine(code);
switch (unmasked_code) {
#ifndef _di_F_status_boolean_
* F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_fl_status_to_string_
- extern f_return_status fl_status_to_string(const f_status code, f_string *string);
+ extern f_return_status fl_status_to_string(const f_status_t code, f_string_t *string);
#endif // _di_fl_status_to_string_
#ifdef __cplusplus
#endif
#if !defined(_di_fl_string_append_) || !defined(_di_fl_string_dynamic_append_) || !defined(_di_fl_string_append_mash_) || !defined(_di_fl_string_dynamic_mash_)
- f_return_status private_fl_string_append(const f_string source, const f_string_length length, f_string_dynamic *destination) {
+ f_return_status private_fl_string_append(const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination) {
- if (destination->used + length > f_string_length_size) return F_status_set_error(F_string_too_large);
+ if (destination->used + length > f_string_length_t_size) return F_status_set_error(F_string_too_large);
- f_status status = F_none;
+ f_status_t status = F_none;
- const f_string_length total = destination->used + length;
+ const f_string_length_t total = destination->used + length;
if (total > destination->size) {
- f_macro_string_dynamic_resize(status, (*destination), total);
+ f_macro_string_dynamic_t_resize(status, (*destination), total);
if (F_status_is_error(status)) return status;
}
#endif // !defined(_di_fl_string_append_) || !defined(_di_fl_string_dynamic_append_) || !defined(_di_fl_string_append_mash_) || !defined(_di_fl_string_dynamic_mash_)
#if !defined(_di_fl_string_append_nulless_) || !defined(_di_fl_string_dynamic_append_nulless_) || !defined(_di_fl_string_mash_nulless_) || !defined(_di_fl_string_dynamic_mash_nulless_)
- f_return_status private_fl_string_append_nulless(const f_string source, const f_string_length length, f_string_dynamic *destination) {
+ f_return_status private_fl_string_append_nulless(const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination) {
- if (destination->used + length > f_string_length_size) return F_status_set_error(F_string_too_large);
+ if (destination->used + length > f_string_length_t_size) return F_status_set_error(F_string_too_large);
- f_status status = F_none;
+ f_status_t status = F_none;
- f_string_length first = 0;
+ f_string_length_t first = 0;
- for (f_string_length i = 0; i <= length; i++) {
+ for (f_string_length_t i = 0; i <= length; i++) {
if (i == length) {
if (i > first) {
- f_string_length size = i - first;
+ f_string_length_t size = i - first;
- if (destination->used + size > f_string_length_size) return F_status_set_error(F_string_too_large);
+ if (destination->used + size > f_string_length_t_size) return F_status_set_error(F_string_too_large);
- f_string_length total = destination->used + size;
+ f_string_length_t total = destination->used + size;
if (total > destination->size) {
- f_macro_string_dynamic_resize(status, (*destination), total);
+ f_macro_string_dynamic_t_resize(status, (*destination), total);
if (F_status_is_error(status)) return status;
}
if (source[i] == 0) {
if (i > 0) {
if (i > first) {
- f_string_length size = i - first;
+ f_string_length_t size = i - first;
- if (destination->used + size > f_string_length_size) return F_status_set_error(F_string_too_large);
+ if (destination->used + size > f_string_length_t_size) return F_status_set_error(F_string_too_large);
- f_string_length total = destination->used + size;
+ f_string_length_t total = destination->used + size;
if (total > destination->size) {
- f_macro_string_dynamic_resize(status, (*destination), total);
+ f_macro_string_dynamic_t_resize(status, (*destination), total);
if (F_status_is_error(status)) return status;
}
#endif // !defined(_di_fl_string_append_nulless_) || !defined(_di_fl_string_dynamic_append_nulless_) || !defined(_di_fl_string_mash_nulless_) || !defined(_di_fl_string_dynamic_mash_nulless_)
#if !defined(_di_fl_string_compare_) || !defined(_di_fl_string_dynamic_compare_) || !defined(_di_fl_string_dynamic_partial_compare_)
- f_return_status private_fl_string_compare(const f_string string1, const f_string string2, const f_string_length offset1, const f_string_length offset2, const f_string_length stop1, const f_string_length stop2) {
- f_string_length i1 = offset1;
- f_string_length i2 = offset2;
+ f_return_status private_fl_string_compare(const f_string_t string1, const f_string_t string2, const f_string_length_t offset1, const f_string_length_t offset2, const f_string_length_t stop1, const f_string_length_t stop2) {
+ f_string_length_t i1 = offset1;
+ f_string_length_t i2 = offset2;
for (; i1 < stop1 && i2 < stop2; i1++, i2++) {
// skip past NULL in string1.
#endif // !defined(_di_fl_string_compare_) || !defined(_di_fl_string_dynamic_compare_) || !defined(_di_fl_string_dynamic_partial_compare_)
#if !defined(_di_fl_string_compare_trim_) || !defined(_di_fl_string_dynamic_compare_trim_) || !defined(_di_fl_string_dynamic_partial_compare_trim_)
- f_return_status private_fl_string_compare_trim(const f_string string1, const f_string string2, const f_string_length offset1, const f_string_length offset2, const f_string_length stop1, const f_string_length stop2) {
- f_string_length i1 = offset1;
- f_string_length i2 = offset2;
+ f_return_status private_fl_string_compare_trim(const f_string_t string1, const f_string_t string2, const f_string_length_t offset1, const f_string_length_t offset2, const f_string_length_t stop1, const f_string_length_t stop2) {
+ f_string_length_t i1 = offset1;
+ f_string_length_t i2 = offset2;
uint8_t width = 0;
uint8_t width_max = 0;
- f_status status = F_none;
+ f_status_t status = F_none;
// skip past leading whitespace in string1.
for (; i1 < stop1; i1 += width) {
width = f_macro_utf_byte_width(string2[i2]);
} // for
- f_string_length last1 = i1;
- f_string_length last2 = i2;
+ f_string_length_t last1 = i1;
+ f_string_length_t last2 = i2;
{
// size1 and size2 are to represent to total number of characters after trim.
- f_string_length size1 = 0;
- f_string_length size2 = 0;
+ f_string_length_t size1 = 0;
+ f_string_length_t size2 = 0;
// determine where the last non-whitespace is in string1.
- for (f_string_length j = i1; j < stop1; j += width) {
+ for (f_string_length_t j = i1; j < stop1; j += width) {
// skip past NULL in string1.
while (j < stop1 && string1[j] == 0) j++;
if (j == stop1) break;
} // for
// determine where the last non-whitespace is in string2.
- for (f_string_length j = i2; j < stop2; j += width) {
+ for (f_string_length_t j = i2; j < stop2; j += width) {
// skip past NULL in string2.
while (j < stop2 && string2[j] == 0) j++;
if (j == stop2) break;
#endif // !defined(_di_fl_string_compare_trim_) || !defined(_di_fl_string_dynamic_compare_trim_) || !defined(_di_fl_string_dynamic_partial_compare_trim_)
#if !defined(_di_fl_string_prepend_) || !defined(_di_fl_string_dynamic_prepend_) || !defined(_di_fl_string_append_mish_) || !defined(_di_fl_string_dynamic_mish_)
- f_return_status private_fl_string_prepend(const f_string source, const f_string_length length, f_string_dynamic *destination) {
+ f_return_status private_fl_string_prepend(const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination) {
- if (destination->used + length > f_string_length_size) {
+ if (destination->used + length > f_string_length_t_size) {
return F_status_set_error(F_string_too_large);
}
- f_status status = F_none;
+ f_status_t status = F_none;
- const f_string_length total = destination->used + length;
+ const f_string_length_t total = destination->used + length;
if (total > destination->size) {
- f_macro_string_dynamic_resize(status, (*destination), total);
+ f_macro_string_dynamic_t_resize(status, (*destination), total);
if (F_status_is_error(status)) return status;
}
#endif // !defined(_di_fl_string_prepend_) || !defined(_di_fl_string_dynamic_prepend_)
#if !defined(_di_fl_string_prepend_nulless_) || !defined(_di_fl_string_dynamic_prepend_nulless_)
- f_return_status private_fl_string_prepend_nulless(const f_string source, const f_string_length length, f_string_dynamic *destination) {
+ f_return_status private_fl_string_prepend_nulless(const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination) {
- if (destination->used + length > f_string_length_size) {
+ if (destination->used + length > f_string_length_t_size) {
return F_status_set_error(F_string_too_large);
}
- f_status status = F_none;
+ f_status_t status = F_none;
- f_string_length first = 0;
- f_string_length offset = 0;
+ f_string_length_t first = 0;
+ f_string_length_t offset = 0;
- for (f_string_length i = 0; i <= length; i++) {
+ for (f_string_length_t i = 0; i <= length; i++) {
if (i == length) {
if (i > first) {
- const f_string_length size = i - first;
+ const f_string_length_t size = i - first;
- if (destination->used + size > f_string_length_size) {
+ if (destination->used + size > f_string_length_t_size) {
return F_status_set_error(F_string_too_large);
}
- const f_string_length total = destination->used + size;
+ const f_string_length_t total = destination->used + size;
if (total > destination->size) {
- f_macro_string_dynamic_resize(status, (*destination), total);
+ f_macro_string_dynamic_t_resize(status, (*destination), total);
if (F_status_is_error(status)) return status;
}
if (source[i] == 0) {
if (i > 0) {
if (i > first) {
- const f_string_length size = i - first;
+ const f_string_length_t size = i - first;
- if (destination->used + size > f_string_length_size) {
+ if (destination->used + size > f_string_length_t_size) {
return F_status_set_error(F_string_too_large);
}
- const f_string_length total = destination->used + size;
+ const f_string_length_t total = destination->used + size;
if (total > destination->size) {
- f_macro_string_dynamic_resize(status, (*destination), total);
+ f_macro_string_dynamic_t_resize(status, (*destination), total);
if (F_status_is_error(status)) return status;
}
#endif // !defined(_di_fl_string_prepend_) || !defined(_di_fl_string_dynamic_prepend_) || !defined(_di_fl_string_append_mish_) || !defined(_di_fl_string_dynamic_mish_)
#if !defined(_di_fl_string_rip_) || !defined(_di_fl_string_dynamic_rip_) || !defined(_di_fl_string_rip_nulless_) || !defined(_di_fl_string_dynamic_rip_nulless_)
- f_return_status private_fl_string_rip_find_range(const f_string source, f_string_length *start, f_string_length *stop) {
- const f_string_length stop_original = *stop;
+ f_return_status private_fl_string_rip_find_range(const f_string_t source, f_string_length_t *start, f_string_length_t *stop) {
+ const f_string_length_t stop_original = *stop;
- f_status status = F_none;
+ f_status_t status = F_none;
uint8_t width = 0;
* @see fl_string_dynamic_mash()
*/
#if !defined(_di_fl_string_append_) || !defined(_di_fl_string_dynamic_append_) || !defined(_di_fl_string_append_mash_) || !defined(_di_fl_string_dynamic_mash_)
- extern f_return_status private_fl_string_append(const f_string source, const f_string_length length, f_string_dynamic *destination) f_gcc_attribute_visibility_internal;
+ extern f_return_status private_fl_string_append(const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_fl_string_append_) || !defined(_di_fl_string_dynamic_append_) || !defined(_di_fl_string_append_mash_) || !defined(_di_fl_string_dynamic_mash_)
/**
* @see fl_string_dynamic_mash_nulless()
*/
#if !defined(_di_fl_string_append_nulless_) || !defined(_di_fl_string_dynamic_append_nulless_) || !defined(_di_fl_string_mash_nulless_) || !defined(_di_fl_string_dynamic_mash_nulless_)
- extern f_return_status private_fl_string_append_nulless(const f_string source, const f_string_length length, f_string_dynamic *destination) f_gcc_attribute_visibility_internal;
+ extern f_return_status private_fl_string_append_nulless(const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_fl_string_append_nulless_) || !defined(_di_fl_string_dynamic_append_nulless_) || !defined(_di_fl_string_mash_nulless_) || !defined(_di_fl_string_dynamic_mash_nulless_)
/**
* @see fl_string_dynamic_partial_compare()
*/
#if !defined(_di_fl_string_compare_) || !defined(_di_fl_string_dynamic_compare_) || !defined(_di_fl_string_dynamic_partial_compare_)
- extern f_return_status private_fl_string_compare(const f_string string1, const f_string string2, const f_string_length offset1, const f_string_length offset2, const f_string_length stop1, const f_string_length stop2) f_gcc_attribute_visibility_internal;
+ extern f_return_status private_fl_string_compare(const f_string_t string1, const f_string_t string2, const f_string_length_t offset1, const f_string_length_t offset2, const f_string_length_t stop1, const f_string_length_t stop2) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_fl_string_compare_) || !defined(_di_fl_string_dynamic_compare_) || !defined(_di_fl_string_dynamic_partial_compare_)
/**
* @see fl_string_dynamic_partial_compare_trim()
*/
#if !defined(_di_fl_string_compare_trim_) || !defined(_di_fl_string_dynamic_compare_trim_) || !defined(_di_fl_string_dynamic_partial_compare_trim_)
- extern f_return_status private_fl_string_compare_trim(const f_string string1, const f_string string2, const f_string_length offset1, const f_string_length offset2, const f_string_length stop1, const f_string_length stop2) f_gcc_attribute_visibility_internal;
+ extern f_return_status private_fl_string_compare_trim(const f_string_t string1, const f_string_t string2, const f_string_length_t offset1, const f_string_length_t offset2, const f_string_length_t stop1, const f_string_length_t stop2) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_fl_string_compare_trim_) || !defined(_di_fl_string_dynamic_compare_trim_) || !defined(_di_fl_string_dynamic_partial_compare_trim_)
/**
* @see fl_string_dynamic_prepend()
*/
#if !defined(_di_fl_string_prepend_) || !defined(_di_fl_string_dynamic_prepend_) || !defined(_di_fl_string_append_mish_) || !defined(_di_fl_string_dynamic_mish_)
- extern f_return_status private_fl_string_prepend(const f_string source, const f_string_length length, f_string_dynamic *destination) f_gcc_attribute_visibility_internal;
+ extern f_return_status private_fl_string_prepend(const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_fl_string_prepend_) || !defined(_di_fl_string_dynamic_prepend_) || !defined(_di_fl_string_append_mish_) || !defined(_di_fl_string_dynamic_mish_)
/**
* @see fl_string_dynamic_prepend_nulless()
*/
#if !defined(_di_fl_string_prepend_nulless_) || !defined(_di_fl_string_dynamic_prepend_nulless_) || !defined(_di_fl_string_append_mish_) || !defined(_di_fl_string_dynamic_mish_)
- extern f_return_status private_fl_string_prepend_nulless(const f_string source, f_string_length length, f_string_dynamic *destination) f_gcc_attribute_visibility_internal;
+ extern f_return_status private_fl_string_prepend_nulless(const f_string_t source, f_string_length_t length, f_string_dynamic_t *destination) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_fl_string_prepend_nulless_) || !defined(_di_fl_string_dynamic_prepend_nulless_) || !defined(_di_fl_string_append_mish_) || !defined(_di_fl_string_dynamic_mish_)
/**
* @see fl_string_rip()
*/
#if !defined(_di_fl_string_rip_) || !defined(_di_fl_string_dynamic_rip_) || !defined(_di_fl_string_rip_nulless_) || !defined(_di_fl_string_dynamic_rip_nulless_)
- extern f_return_status private_fl_string_rip_find_range(const f_string source, f_string_length *start, f_string_length *stop) f_gcc_attribute_visibility_internal;
+ extern f_return_status private_fl_string_rip_find_range(const f_string_t source, f_string_length_t *start, f_string_length_t *stop) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_fl_string_rip_) || !defined(_di_fl_string_dynamic_rip_) || !defined(_di_fl_string_rip_nulless_) || !defined(_di_fl_string_dynamic_rip_nulless_)
#ifdef __cplusplus
#endif
#ifndef _di_fl_string_append_
- f_return_status fl_string_append(const f_string source, const f_string_length length, f_string_dynamic *destination) {
+ f_return_status fl_string_append(const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (destination == 0) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
#endif // _di_fl_string_append_
#ifndef _di_fl_string_append_assure_
- f_return_status fl_string_append_assure(const f_string source, const f_string_length length, f_string_dynamic *destination) {
+ f_return_status fl_string_append_assure(const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (destination == 0) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
if (length == 0) return F_data_not_eos;
if (destination->used < length) return private_fl_string_append(source, length, destination);
- f_string_length i = 1;
- f_string_length j = 1;
+ f_string_length_t i = 1;
+ f_string_length_t j = 1;
while (i <= length && j <= destination->used) {
if (source[length - i] == 0) {
#endif // _di_fl_string_append_assure_
#ifndef _di_fl_string_append_assure_nulless_
- f_return_status fl_string_append_assure_nulless(const f_string source, const f_string_length length, f_string_dynamic *destination) {
+ f_return_status fl_string_append_assure_nulless(const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (destination == 0) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
return private_fl_string_append_nulless(source, length, destination);
}
- f_string_length i = 1;
- f_string_length j = 1;
+ f_string_length_t i = 1;
+ f_string_length_t j = 1;
while (i <= length && j <= destination->used) {
if (source[length - i] == 0) {
#endif // _di_fl_string_append_assure_nulless_
#ifndef _di_fl_string_append_nulless_
- f_return_status fl_string_append_nulless(const f_string source, const f_string_length length, f_string_dynamic *destination) {
+ f_return_status fl_string_append_nulless(const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (destination == 0) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
#endif // _di_fl_string_append_nulless_
#ifndef _di_fl_string_compare_
- f_return_status fl_string_compare(const f_string string1, const f_string string2, const f_string_length length1, const f_string_length length2) {
+ f_return_status fl_string_compare(const f_string_t string1, const f_string_t string2, const f_string_length_t length1, const f_string_length_t length2) {
return private_fl_string_compare(string1, string2, 0, 0, length1, length2);
}
#endif // _di_fl_string_compare_
#ifndef _di_fl_string_compare_trim_
- f_return_status fl_string_compare_trim(const f_string string1, const f_string string2, const f_string_length length1, const f_string_length length2) {
+ f_return_status fl_string_compare_trim(const f_string_t string1, const f_string_t string2, const f_string_length_t length1, const f_string_length_t length2) {
return private_fl_string_compare_trim(string1, string2, 0, 0, length1, length2);
}
#endif // _di_fl_string_compare_trim_
#ifndef _di_fl_string_dynamic_append_
- f_return_status fl_string_dynamic_append(const f_string_static source, f_string_dynamic *destination) {
+ f_return_status fl_string_dynamic_append(const f_string_static_t source, f_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (destination == 0) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
#endif // _di_fl_string_dynamic_append_
#ifndef _di_fl_string_dynamic_append_assure_
- f_return_status fl_string_dynamic_append_assure(const f_string_static source, f_string_dynamic *destination) {
+ f_return_status fl_string_dynamic_append_assure(const f_string_static_t source, f_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (destination == 0) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
return private_fl_string_append(source.string, source.used, destination);
}
- f_string_length i = 1;
- f_string_length j = 1;
+ f_string_length_t i = 1;
+ f_string_length_t j = 1;
while (i <= source.used && j <= destination->used) {
if (source.string[source.used - i] == 0) {
#endif // _di_fl_string_dynamic_append_assure_
#ifndef _di_fl_string_dynamic_append_assure_nulless_
- f_return_status fl_string_dynamic_append_assure_nulless(const f_string_static source, f_string_dynamic *destination) {
+ f_return_status fl_string_dynamic_append_assure_nulless(const f_string_static_t source, f_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (destination == 0) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
return private_fl_string_append_nulless(source.string, source.used, destination);
}
- f_string_length i = 1;
- f_string_length j = 1;
+ f_string_length_t i = 1;
+ f_string_length_t j = 1;
while (i <= source.used && j <= destination->used) {
if (source.string[source.used - i] == 0) {
#endif // _di_fl_string_dynamic_append_assure_nulless_
#ifndef _di_fl_string_dynamic_append_nulless_
- f_return_status fl_string_dynamic_append_nulless(const f_string_static source, f_string_dynamic *destination) {
+ f_return_status fl_string_dynamic_append_nulless(const f_string_static_t source, f_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (destination == 0) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
#endif // _di_fl_string_dynamic_append_nulless_
#ifndef _di_fl_string_dynamic_compare_
- f_return_status fl_string_dynamic_compare(const f_string_static string1, const f_string_static string2) {
+ f_return_status fl_string_dynamic_compare(const f_string_static_t string1, const f_string_static_t string2) {
return private_fl_string_compare(string1.string, string2.string, 0, 0, string1.used, string2.used);
}
#endif // _di_fl_string_dynamic_compare_
#ifndef _di_fl_string_dynamic_compare_string_
- f_return_status fl_string_dynamic_compare_string(const f_string string1, const f_string_static string2, const f_string_length length1) {
+ f_return_status fl_string_dynamic_compare_string(const f_string_t string1, const f_string_static_t string2, const f_string_length_t length1) {
return private_fl_string_compare(string1, string2.string, 0, 0, length1, string2.used);
}
#endif // _di_fl_string_dynamic_compare_string_
#ifndef _di_fl_string_dynamic_compare_trim_
- f_return_status fl_string_dynamic_compare_trim(const f_string_static string1, const f_string_static string2) {
+ f_return_status fl_string_dynamic_compare_trim(const f_string_static_t string1, const f_string_static_t string2) {
return private_fl_string_compare_trim(string1.string, string2.string, 0, 0, string1.used, string2.used);
}
#endif // _di_fl_string_dynamic_compare_trim_
#ifndef _di_fl_string_dynamic_compare_trim_string_
- f_return_status fl_string_dynamic_compare_trim_string(const f_string string1, const f_string_static string2, const f_string_length length1) {
+ f_return_status fl_string_dynamic_compare_trim_string(const f_string_t string1, const f_string_static_t string2, const f_string_length_t length1) {
return private_fl_string_compare_trim(string1, string2.string, 0, 0, length1, string2.used);
}
#endif // _di_fl_string_dynamic_compare_trim_string_
#ifndef _di_fl_string_dynamic_mash_
- f_return_status fl_string_dynamic_mash(const f_string glue, const f_string_length glue_length, const f_string_static source, f_string_dynamic *destination) {
+ f_return_status fl_string_dynamic_mash(const f_string_t glue, const f_string_length_t glue_length, const f_string_static_t source, f_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (destination == 0) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
if (source.used == 0) return F_data_not_eos;
if (glue_length && destination->used) {
- const f_status status = private_fl_string_append(glue, glue_length, destination);
+ const f_status_t status = private_fl_string_append(glue, glue_length, destination);
if (F_status_is_error(status)) return status;
}
#endif // _di_fl_string_dynamic_mash_
#ifndef _di_fl_string_dynamic_mash_nulless_
- f_return_status fl_string_dynamic_mash_nulless(const f_string glue, const f_string_length glue_length, const f_string_static source, f_string_dynamic *destination) {
+ f_return_status fl_string_dynamic_mash_nulless(const f_string_t glue, const f_string_length_t glue_length, const f_string_static_t source, f_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (destination == 0) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
if (source.used == 0) return F_data_not_eos;
if (glue_length && destination->used) {
- const f_status status = private_fl_string_append_nulless(glue, glue_length, destination);
+ const f_status_t status = private_fl_string_append_nulless(glue, glue_length, destination);
if (F_status_is_error(status)) return status;
}
#endif // _di_fl_string_dynamic_mash_nulless_
#ifndef _di_fl_string_dynamic_mish_
- f_return_status fl_string_dynamic_mish(const f_string glue, const f_string_length glue_length, const f_string_static source, f_string_dynamic *destination) {
+ f_return_status fl_string_dynamic_mish(const f_string_t glue, const f_string_length_t glue_length, const f_string_static_t source, f_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (destination == 0) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
if (source.used == 0) return F_data_not_eos;
if (glue_length && destination->used) {
- const f_status status = private_fl_string_prepend(glue, glue_length, destination);
+ const f_status_t status = private_fl_string_prepend(glue, glue_length, destination);
if (F_status_is_error(status)) return status;
}
#endif // _di_fl_string_dynamic_mish_
#ifndef _di_fl_string_dynamic_mish_nulless_
- f_return_status fl_string_dynamic_mish_nulless(const f_string glue, const f_string_length glue_length, const f_string_static source, f_string_dynamic *destination) {
+ f_return_status fl_string_dynamic_mish_nulless(const f_string_t glue, const f_string_length_t glue_length, const f_string_static_t source, f_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (destination == 0) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
if (source.used == 0) return F_data_not_eos;
if (glue_length && destination->used) {
- const f_status status = private_fl_string_prepend_nulless(glue, glue_length, destination);
+ const f_status_t status = private_fl_string_prepend_nulless(glue, glue_length, destination);
if (F_status_is_error(status)) return status;
}
#endif // _di_fl_string_dynamic_mish_nulless_
#ifndef _di_fl_string_dynamic_partial_append_
- f_return_status fl_string_dynamic_partial_append(const f_string_static source, const f_string_range range, f_string_dynamic *destination) {
+ f_return_status fl_string_dynamic_partial_append(const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (source.used <= range.stop) return F_status_set_error(F_parameter);
if (destination == 0) return F_status_set_error(F_parameter);
#endif // _di_fl_string_dynamic_partial_append_
#ifndef _di_fl_string_dynamic_partial_append_assure_
- f_return_status fl_string_dynamic_partial_append_assure(const f_string_static source, const f_string_range range, f_string_dynamic *destination) {
+ f_return_status fl_string_dynamic_partial_append_assure(const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (source.used <= range.stop) return F_status_set_error(F_parameter);
if (destination == 0) return F_status_set_error(F_parameter);
if (source.used == 0) return F_data_not_eos;
if (range.start > range.stop) return F_data_not_stop;
- const f_string_length length = (range.stop - range.start) + 1;
+ const f_string_length_t length = (range.stop - range.start) + 1;
if (destination->used < length) {
return private_fl_string_append(source.string + range.start, length, destination);
}
- f_string_length i = 1;
- f_string_length j = 1;
+ f_string_length_t i = 1;
+ f_string_length_t j = 1;
while (i <= length && j <= destination->used) {
if (source.string[range.stop - i] == 0) {
#endif // _di_fl_string_dynamic_partial_append_assure_
#ifndef _di_fl_string_dynamic_partial_append_assure_nulless_
- f_return_status fl_string_dynamic_partial_append_assure_nulless(const f_string_static source, const f_string_range range, f_string_dynamic *destination) {
+ f_return_status fl_string_dynamic_partial_append_assure_nulless(const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (source.used <= range.stop) return F_status_set_error(F_parameter);
if (destination == 0) return F_status_set_error(F_parameter);
if (source.used == 0) return F_data_not_eos;
if (range.start > range.stop) return F_data_not_stop;
- const f_string_length length = (range.stop - range.start) + 1;
+ const f_string_length_t length = (range.stop - range.start) + 1;
if (destination->used < length) {
return private_fl_string_append_nulless(source.string + range.start, length, destination);
}
- f_string_length i = 1;
- f_string_length j = 1;
+ f_string_length_t i = 1;
+ f_string_length_t j = 1;
while (i <= length && j <= destination->used) {
if (source.string[range.stop - i] == 0) {
#endif // _di_fl_string_dynamic_append_assure_nulless_
#ifndef _di_fl_string_dynamic_partial_append_nulless_
- f_return_status fl_string_dynamic_partial_append_nulless(const f_string_static source, const f_string_range range, f_string_dynamic *destination) {
+ f_return_status fl_string_dynamic_partial_append_nulless(const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (source.used <= range.stop) return F_status_set_error(F_parameter);
if (destination == 0) return F_status_set_error(F_parameter);
#endif // _di_fl_string_dynamic_partial_append_nulless_
#ifndef _di_fl_string_dynamic_partial_compare_
- f_return_status fl_string_dynamic_partial_compare(const f_string_static string1, const f_string_static string2, const f_string_range range1, const f_string_range range2) {
+ f_return_status fl_string_dynamic_partial_compare(const f_string_static_t string1, const f_string_static_t string2, const f_string_range_t range1, const f_string_range_t range2) {
#ifndef _di_level_1_parameter_checking_
if (string1.used <= range1.stop) return F_status_set_error(F_parameter);
if (string2.used <= range2.stop) return F_status_set_error(F_parameter);
#endif // _di_fl_string_dynamic_partial_compare_
#ifndef _di_fl_string_dynamic_partial_compare_dynamic_
- f_return_status fl_string_dynamic_partial_compare_dynamic(const f_string_static string1, const f_string_static string2, const f_string_range range2) {
+ f_return_status fl_string_dynamic_partial_compare_dynamic(const f_string_static_t string1, const f_string_static_t string2, const f_string_range_t range2) {
#ifndef _di_level_1_parameter_checking_
if (string2.used <= range2.stop) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
#endif // _di_fl_string_dynamic_partial_compare_dynamic_
#ifndef _di_fl_string_dynamic_partial_compare_string_
- f_return_status fl_string_dynamic_partial_compare_string(const f_string string1, const f_string_static string2, const f_string_length length1, const f_string_range range2) {
+ f_return_status fl_string_dynamic_partial_compare_string(const f_string_t string1, const f_string_static_t string2, const f_string_length_t length1, const f_string_range_t range2) {
#ifndef _di_level_1_parameter_checking_
if (string2.used <= range2.stop) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
#endif // _di_fl_string_dynamic_partial_compare_string_
#ifndef _di_fl_string_dynamic_partial_compare_trim_
- f_return_status fl_string_dynamic_partial_compare_trim(const f_string_static string1, const f_string_static string2, const f_string_range range1, const f_string_range range2) {
+ f_return_status fl_string_dynamic_partial_compare_trim(const f_string_static_t string1, const f_string_static_t string2, const f_string_range_t range1, const f_string_range_t range2) {
#ifndef _di_level_1_parameter_checking_
if (string1.used <= range1.stop) return F_status_set_error(F_parameter);
if (string2.used <= range2.stop) return F_status_set_error(F_parameter);
#endif // _di_fl_string_dynamic_partial_compare_trim_
#ifndef _di_fl_string_dynamic_partial_compare_trim_dynamic_
- f_return_status fl_string_dynamic_partial_compare_trim_dynamic(const f_string_static string1, const f_string_static string2, const f_string_range range2) {
+ f_return_status fl_string_dynamic_partial_compare_trim_dynamic(const f_string_static_t string1, const f_string_static_t string2, const f_string_range_t range2) {
#ifndef _di_level_1_parameter_checking_
if (string2.used <= range2.stop) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
#endif // _di_fl_string_dynamic_partial_compare_trim_dynamic_
#ifndef _di_fl_string_dynamic_partial_compare_trim_string_
- f_return_status fl_string_dynamic_partial_compare_trim_string(const f_string string1, const f_string_static string2, const f_string_length length1, const f_string_range range2) {
+ f_return_status fl_string_dynamic_partial_compare_trim_string(const f_string_t string1, const f_string_static_t string2, const f_string_length_t length1, const f_string_range_t range2) {
#ifndef _di_level_1_parameter_checking_
if (string2.used <= range2.stop) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
#endif // _di_fl_string_dynamic_partial_compare_trim_string_
#ifndef _di_fl_string_dynamic_partial_mash_
- f_return_status fl_string_dynamic_partial_mash(const f_string glue, const f_string_length glue_length, const f_string_static source, const f_string_range range, f_string_dynamic *destination) {
+ f_return_status fl_string_dynamic_partial_mash(const f_string_t glue, const f_string_length_t glue_length, const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (source.used <= range.stop) return F_status_set_error(F_parameter);
if (destination == 0) return F_status_set_error(F_parameter);
if (range.start > range.stop) return F_data_not_stop;
if (glue_length && destination->used) {
- f_status status = private_fl_string_append(glue, glue_length, destination);
+ f_status_t status = private_fl_string_append(glue, glue_length, destination);
if (F_status_is_error(status)) return status;
}
#endif // _di_fl_string_dynamic_partial_mash_
#ifndef _di_fl_string_dynamic_partial_mash_nulless_
- f_return_status fl_string_dynamic_partial_mash_nulless(const f_string glue, const f_string_length glue_length, const f_string_static source, const f_string_range range, f_string_dynamic *destination) {
+ f_return_status fl_string_dynamic_partial_mash_nulless(const f_string_t glue, const f_string_length_t glue_length, const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (source.used <= range.stop) return F_status_set_error(F_parameter);
if (destination == 0) return F_status_set_error(F_parameter);
if (range.start > range.stop) return F_data_not_stop;
if (glue_length && destination->used) {
- f_status status = private_fl_string_append_nulless(glue, glue_length, destination);
+ f_status_t status = private_fl_string_append_nulless(glue, glue_length, destination);
if (F_status_is_error(status)) return status;
}
#endif // _di_fl_string_dynamic_partial_mash_nulless_
#ifndef _di_fl_string_dynamic_partial_mish_
- f_return_status fl_string_partial_dynamic_mish(const f_string glue, const f_string_length glue_length, const f_string_static source, const f_string_range range, f_string_dynamic *destination) {
+ f_return_status fl_string_partial_dynamic_mish(const f_string_t glue, const f_string_length_t glue_length, const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (source.used <= range.stop) return F_status_set_error(F_parameter);
if (destination == 0) return F_status_set_error(F_parameter);
if (range.start > range.stop) return F_data_not_stop;
if (glue_length && destination->used) {
- f_status status = private_fl_string_prepend(glue, glue_length, destination);
+ f_status_t status = private_fl_string_prepend(glue, glue_length, destination);
if (F_status_is_error(status)) return status;
}
#endif // _di_fl_string_dynamic_partial_mish_
#ifndef _di_fl_string_dynamic_partial_mish_nulless_
- f_return_status fl_string_dynamic_partial_mish_nulless(const f_string glue, const f_string_length glue_length, const f_string_static source, const f_string_range range, f_string_dynamic *destination) {
+ f_return_status fl_string_dynamic_partial_mish_nulless(const f_string_t glue, const f_string_length_t glue_length, const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (source.used <= range.stop) return F_status_set_error(F_parameter);
if (destination == 0) return F_status_set_error(F_parameter);
if (range.start > range.stop) return F_data_not_stop;
if (glue_length && destination->used) {
- f_status status = private_fl_string_prepend_nulless(glue, glue_length, destination);
+ f_status_t status = private_fl_string_prepend_nulless(glue, glue_length, destination);
if (F_status_is_error(status)) return status;
}
#endif // _di_fl_string_dynamic_partial_mish_nulless_
#ifndef _di_fl_string_dynamic_partial_prepend_
- f_return_status fl_string_dynamic_partial_prepend(const f_string_static source, const f_string_range range, f_string_dynamic *destination) {
+ f_return_status fl_string_dynamic_partial_prepend(const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (source.used <= range.stop) return F_status_set_error(F_parameter);
if (destination == 0) return F_status_set_error(F_parameter);
#endif // _di_fl_string_dynamic_partial_prepend_
#ifndef _di_fl_string_dynamic_partial_prepend_assure_
- f_return_status fl_string_dynamic_partial_prepend_assure(const f_string_static source, const f_string_range range, f_string_dynamic *destination) {
+ f_return_status fl_string_dynamic_partial_prepend_assure(const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (source.used <= range.stop) return F_status_set_error(F_parameter);
if (destination == 0) return F_status_set_error(F_parameter);
if (source.used == 0) return F_data_not_eos;
if (range.start > range.stop) return F_data_not_stop;
- const f_string_length length = (range.stop - range.start) + 1;
+ const f_string_length_t length = (range.stop - range.start) + 1;
if (destination->used < length) {
return private_fl_string_prepend(source.string + range.start, length, destination);
}
- f_string_length i = 0;
- f_string_length j = 0;
+ f_string_length_t i = 0;
+ f_string_length_t j = 0;
while (i < length && j < destination->used) {
if (source.string[i + range.start] == 0) {
#endif // _di_fl_string_dynamic_partial_prepend_assure_
#ifndef _di_fl_string_dynamic_partial_prepend_assure_nulless_
- f_return_status fl_string_dynamic_partial_prepend_assure_nulless(const f_string_static source, const f_string_range range, f_string_dynamic *destination) {
+ f_return_status fl_string_dynamic_partial_prepend_assure_nulless(const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (source.used <= range.stop) return F_status_set_error(F_parameter);
if (destination == 0) return F_status_set_error(F_parameter);
if (source.used == 0) return F_data_not_eos;
if (range.start > range.stop) return F_data_not_stop;
- const f_string_length length = (range.stop - range.start) + 1;
+ const f_string_length_t length = (range.stop - range.start) + 1;
if (destination->used < length) {
return private_fl_string_prepend_nulless(source.string + range.start, length, destination);
}
- f_string_length i = 0;
- f_string_length j = 0;
+ f_string_length_t i = 0;
+ f_string_length_t j = 0;
while (i < length && j < destination->used) {
if (source.string[i + range.start] == 0) {
#endif // _di_fl_string_dynamic_partial_prepend_assure_nulless
#ifndef _di_fl_string_dynamic_partial_prepend_nulless_
- f_return_status fl_string_dynamic_partial_prepend_nulless(const f_string_static source, const f_string_range range, f_string_dynamic *destination) {
+ f_return_status fl_string_dynamic_partial_prepend_nulless(const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (source.used <= range.stop) return F_status_set_error(F_parameter);
if (destination == 0) return F_status_set_error(F_parameter);
#endif // _di_fl_string_dynamic_partial_prepend_nulless
#ifndef _di_fl_string_dynamic_prepend_
- f_return_status fl_string_dynamic_prepend(const f_string_static source, f_string_dynamic *destination) {
+ f_return_status fl_string_dynamic_prepend(const f_string_static_t source, f_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (destination == 0) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
#endif // _di_fl_string_dynamic_prepend_
#ifndef _di_fl_string_dynamic_prepend_assure_
- f_return_status fl_string_dynamic_prepend_assure(const f_string_static source, f_string_dynamic *destination) {
+ f_return_status fl_string_dynamic_prepend_assure(const f_string_static_t source, f_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (destination == 0) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
return private_fl_string_prepend(source.string, source.used, destination);
}
- f_string_length i = 0;
- f_string_length j = 0;
+ f_string_length_t i = 0;
+ f_string_length_t j = 0;
while (i < source.used && j < destination->used) {
if (source.string[i] == 0) {
#endif // _di_fl_string_dynamic_prepend_assure_
#ifndef _di_fl_string_dynamic_prepend_assure_nulless_
- f_return_status fl_string_dynamic_prepend_assure_nulless(const f_string_static source, f_string_dynamic *destination) {
+ f_return_status fl_string_dynamic_prepend_assure_nulless(const f_string_static_t source, f_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (destination == 0) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
return private_fl_string_prepend_nulless(source.string, source.used, destination);
}
- f_string_length i = 0;
- f_string_length j = 0;
+ f_string_length_t i = 0;
+ f_string_length_t j = 0;
while (i < source.used && j < destination->used) {
if (source.string[i] == 0) {
#endif // _di_fl_string_dynamic_prepend_assure_nulless_
#ifndef _di_fl_string_dynamic_prepend_nulless_
- f_return_status fl_string_dynamic_prepend_nulless(const f_string_static source, f_string_dynamic *destination) {
+ f_return_status fl_string_dynamic_prepend_nulless(const f_string_static_t source, f_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (destination == 0) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
#endif // _di_fl_string_dynamic_prepend_nulless_
#ifndef _di_fl_string_dynamic_size_decrease_
- f_return_status fl_string_dynamic_size_decrease(const f_string_length length, f_string_dynamic *string) {
+ f_return_status fl_string_dynamic_size_decrease(const f_string_length_t length, f_string_dynamic_t *string) {
#ifndef _di_level_1_parameter_checking_
if (length == 0) return F_status_set_error(F_parameter);
if (string == 0) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- f_status status = F_none;
+ f_status_t status = F_none;
if (string->used - length > 0) {
- f_macro_string_dynamic_resize(status, (*string), string->size - length);
+ f_macro_string_dynamic_t_resize(status, (*string), string->size - length);
}
else if (string->used - length <= 0) {
- f_macro_string_dynamic_delete(status, (*string));
+ f_macro_string_dynamic_t_delete(status, (*string));
}
return status;
#endif // _di_fl_string_dynamic_size_decrease_
#ifndef _di_fl_string_dynamic_size_increase_
- f_return_status fl_string_dynamic_size_increase(const f_string_length length, f_string_dynamic *string) {
+ f_return_status fl_string_dynamic_size_increase(const f_string_length_t length, f_string_dynamic_t *string) {
#ifndef _di_level_1_parameter_checking_
if (length == 0) return F_status_set_error(F_parameter);
if (string == 0) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- f_status status = F_none;
+ f_status_t status = F_none;
if (string->used + length > string->size) {
- if (string->used + length > f_string_length_size) {
- if (string->used == f_string_length_size) {
+ if (string->used + length > f_string_length_t_size) {
+ if (string->used == f_string_length_t_size) {
status = F_status_set_error(F_string_too_large);
}
else {
- f_macro_string_dynamic_resize(status, (*string), f_string_length_size);
+ f_macro_string_dynamic_t_resize(status, (*string), f_string_length_t_size);
}
}
else {
- f_macro_string_dynamic_resize(status, (*string), string->size + length);
+ f_macro_string_dynamic_t_resize(status, (*string), string->size + length);
}
}
#endif // _di_fl_string_dynamic_size_increase_
#ifndef _di_fl_string_dynamics_size_decrease_
- f_return_status fl_string_dynamics_size_decrease(const f_array_length length, f_string_dynamics *strings) {
+ f_return_status fl_string_dynamics_size_decrease(const f_array_length_t length, f_string_dynamics_t *strings) {
#ifndef _di_level_1_parameter_checking_
if (length == 0) return F_status_set_error(F_parameter);
if (strings == 0) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- f_status status = F_none;
+ f_status_t status = F_none;
if (strings->used - length > 0) {
f_macro_string_dynamics_resize(status, (*strings), strings->size - length);
}
else if (strings->used - length <= 0) {
- f_macro_string_dynamics_delete(status, (*strings));
+ f_macro_string_dynamics_t_delete(status, (*strings));
}
return status;
#endif // _di_fl_string_dynamics_size_decrease_
#ifndef _di_fl_string_dynamics_size_increase_
- f_return_status fl_string_dynamics_size_increase(const f_array_length length, f_string_dynamics *strings) {
+ f_return_status fl_string_dynamics_size_increase(const f_array_length_t length, f_string_dynamics_t *strings) {
#ifndef _di_level_1_parameter_checking_
if (length == 0) return F_status_set_error(F_parameter);
if (strings == 0) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- f_status status = F_none;
+ f_status_t status = F_none;
if (strings->used + length > strings->size) {
- if (strings->used + length > f_array_length_size) {
- if (strings->used == f_array_length_size) {
+ if (strings->used + length > f_array_length_t_size) {
+ if (strings->used == f_array_length_t_size) {
status = F_status_set_error(F_string_too_large);
}
else {
- f_macro_string_dynamics_resize(status, (*strings), f_array_length_size);
+ f_macro_string_dynamics_resize(status, (*strings), f_array_length_t_size);
}
}
else {
#endif // _di_fl_string_dynamics_size_increase_
#ifndef _di_fl_string_dynamic_rip_
- f_return_status fl_string_dynamic_rip(const f_string_static source, const f_string_range range, f_string_dynamic *destination) {
+ f_return_status fl_string_dynamic_rip(const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (source.used <= range.start) return F_status_set_error(F_parameter);
if (source.used <= range.stop) return F_status_set_error(F_parameter);
#endif // _di_fl_string_dynamic_rip_
#ifndef _di_fl_string_dynamic_rip_nulless_
- f_return_status fl_string_dynamic_rip_nulless(const f_string_static source, const f_string_range range, f_string_dynamic *destination) {
+ f_return_status fl_string_dynamic_rip_nulless(const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (source.used <= range.start) return F_status_set_error(F_parameter);
if (source.used <= range.stop) return F_status_set_error(F_parameter);
#endif // _di_fl_string_dynamic_rip_nulless_
#ifndef _di_fl_string_dynamic_seek_line_to_
- f_return_status fl_string_dynamic_seek_line_to(const f_string_static buffer, f_string_range *range, const int8_t seek_to_this) {
+ f_return_status fl_string_dynamic_seek_line_to(const f_string_static_t buffer, f_string_range_t *range, const int8_t seek_to_this) {
#ifndef _di_level_1_parameter_checking_
if (range == 0) return F_status_set_error(F_parameter);
if (buffer.used <= range->start) return F_status_set_error(F_parameter);
#endif // _di_fl_string_dynamic_seek_line_to_
#ifndef _di_fl_string_dynamic_seek_line_to_utf_character_
- f_return_status fl_string_dynamic_seek_line_to_utf_character(const f_string_static buffer, f_string_range *range, const f_utf_character seek_to_this) {
+ f_return_status fl_string_dynamic_seek_line_to_utf_character(const f_string_static_t buffer, f_string_range_t *range, const f_utf_character_t seek_to_this) {
#ifndef _di_level_1_parameter_checking_
if (range == 0) return F_status_set_error(F_parameter);
if (buffer.used <= range->start) return F_status_set_error(F_parameter);
if (buffer.used == 0) return F_data_not_eos;
if (range->start > range->stop) return F_data_not_stop;
- const unsigned short seek_width = f_macro_utf_character_width(seek_to_this);
+ const unsigned short seek_width = f_macro_utf_character_t_width(seek_to_this);
- f_status status = F_none;
+ f_status_t status = F_none;
unsigned short width = 0;
- f_string_length width_max = 0;
+ f_string_length_t width_max = 0;
while (range->start < buffer.used) {
width_max = (range->stop - range->start) + 1;
if (range->start + width > range->stop) return F_status_set_error(F_incomplete_utf_stop);
if (width == seek_width) {
- f_utf_character character = 0;
+ f_utf_character_t character = 0;
status = f_utf_char_to_character(buffer.string + range->start, width_max, &character);
if (F_status_is_error(status)) return status;
#endif // _di_fl_string_dynamic_seek_line_to_utf_character_
#ifndef _di_fl_string_dynamic_seek_line_until_graph_
- f_return_status fl_string_dynamic_seek_line_until_graph(const f_string_static buffer, f_string_range *range, const int8_t placeholder) {
+ f_return_status fl_string_dynamic_seek_line_until_graph(const f_string_static_t buffer, f_string_range_t *range, const int8_t placeholder) {
#ifndef _di_level_1_parameter_checking_
if (range == 0) return F_status_set_error(F_parameter);
if (buffer.used <= range->start) return F_status_set_error(F_parameter);
if (buffer.used == 0) return F_data_not_eos;
if (range->start > range->stop) return F_data_not_stop;
- f_status status = F_none;
+ f_status_t status = F_none;
unsigned short width = 0;
- f_string_length width_max = (range->stop - range->start) + 1;
+ f_string_length_t width_max = (range->stop - range->start) + 1;
if (width_max > buffer.used - range->start) {
width_max = buffer.used - range->start;
#endif // _di_fl_string_dynamic_seek_line_until_graph_
#ifndef _di_fl_string_dynamic_seek_line_until_non_graph_
- f_return_status fl_string_dynamic_seek_line_until_non_graph(const f_string_static buffer, f_string_range *range, const int8_t placeholder) {
+ f_return_status fl_string_dynamic_seek_line_until_non_graph(const f_string_static_t buffer, f_string_range_t *range, const int8_t placeholder) {
#ifndef _di_level_1_parameter_checking_
if (range == 0) return F_status_set_error(F_parameter);
if (buffer.used <= range->start) return F_status_set_error(F_parameter);
if (buffer.used == 0) return F_data_not_eos;
if (range->start > range->stop) return F_data_not_stop;
- f_status status = F_none;
+ f_status_t status = F_none;
unsigned short width = 0;
- f_string_length width_max = (range->stop - range->start) + 1;
+ f_string_length_t width_max = (range->stop - range->start) + 1;
if (width_max > buffer.used - range->start) {
width_max = buffer.used - range->start;
#endif // _di_fl_string_dynamic_seek_line_until_non_graph_
#ifndef _di_fl_string_dynamic_seek_to_
- f_return_status fl_string_dynamic_seek_to(const f_string_static buffer, f_string_range *range, const int8_t seek_to_this) {
+ f_return_status fl_string_dynamic_seek_to(const f_string_static_t buffer, f_string_range_t *range, const int8_t seek_to_this) {
#ifndef _di_level_1_parameter_checking_
if (range == 0) return F_status_set_error(F_parameter);
if (buffer.used <= range->start) return F_status_set_error(F_parameter);
#endif // _di_fl_string_dynamic_seek_to_
#ifndef _di_fl_string_dynamic_seek_to_utf_character_
- f_return_status fl_string_dynamic_seek_to_utf_character(const f_string_static buffer, f_string_range *range, const f_utf_character seek_to_this) {
+ f_return_status fl_string_dynamic_seek_to_utf_character(const f_string_static_t buffer, f_string_range_t *range, const f_utf_character_t seek_to_this) {
#ifndef _di_level_1_parameter_checking_
if (range == 0) return F_status_set_error(F_parameter);
if (buffer.used <= range->start) return F_status_set_error(F_parameter);
if (buffer.used == 0) return F_data_not_eos;
if (range->start > range->stop) return F_data_not_stop;
- const unsigned short seek_width = f_macro_utf_character_width(seek_to_this);
+ const unsigned short seek_width = f_macro_utf_character_t_width(seek_to_this);
- f_status status = F_none;
+ f_status_t status = F_none;
unsigned short width = 0;
- f_string_length width_max = 0;
+ f_string_length_t width_max = 0;
while (range->start < buffer.used) {
width_max = (range->stop - range->start) + 1;
if (range->start + width > range->stop) return F_status_set_error(F_incomplete_utf_stop);
if (width == seek_width) {
- f_utf_character character = 0;
+ f_utf_character_t character = 0;
status = f_utf_char_to_character(buffer.string + range->start, width_max, &character);
if (F_status_is_error(status)) return status;
#endif // _di_fl_string_dynamic_seek_to_utf_character_
#ifndef _di_fl_string_dynamic_terminate_
- f_return_status fl_string_dynamic_terminate(f_string_dynamic *destination) {
+ f_return_status fl_string_dynamic_terminate(f_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (destination == 0) return F_status_set_error(F_parameter);
if (destination->used > destination->size) return F_status_set_error(F_parameter);
if (destination->used && destination->string[destination->used - 1] == 0) return F_none;
- if (destination->used == f_string_length_size) return F_status_set_error(F_string_too_large);
+ if (destination->used == f_string_length_t_size) return F_status_set_error(F_string_too_large);
- const f_string_length total = destination->used + 1;
+ const f_string_length_t total = destination->used + 1;
if (total > destination->size) {
- f_status status = F_none;
+ f_status_t status = F_none;
- f_macro_string_dynamic_resize(status, (*destination), total);
+ f_macro_string_dynamic_t_resize(status, (*destination), total);
if (F_status_is_error(status)) return status;
}
#endif // _di_fl_string_dynamic_terminate_
#ifndef _di_fl_string_dynamic_terminate_after_
- f_return_status fl_string_dynamic_terminate_after(f_string_dynamic *destination) {
+ f_return_status fl_string_dynamic_terminate_after(f_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (destination == 0) return F_status_set_error(F_parameter);
if (destination->used > destination->size) return F_status_set_error(F_parameter);
} // for
}
- if (destination->used == f_string_length_size) return F_status_set_error(F_string_too_large);
+ if (destination->used == f_string_length_t_size) return F_status_set_error(F_string_too_large);
- const f_string_length total = destination->used + 1;
+ const f_string_length_t total = destination->used + 1;
if (total > destination->size) {
- f_status status = F_none;
+ f_status_t status = F_none;
- f_macro_string_dynamic_resize(status, (*destination), total);
+ f_macro_string_dynamic_t_resize(status, (*destination), total);
if (F_status_is_error(status)) return status;
}
#endif // _di_fl_string_dynamic_terminate_after_
#ifndef _di_fl_string_lengths_size_decrease_
- f_return_status fl_string_lengths_size_decrease(const f_array_length length, f_string_lengths *lengths) {
+ f_return_status fl_string_lengths_size_decrease(const f_array_length_t length, f_string_lengths_t *lengths) {
#ifndef _di_level_1_parameter_checking_
if (length == 0) return F_status_set_error(F_parameter);
if (lengths == 0) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- f_status status = F_none;
+ f_status_t status = F_none;
if (lengths->used - length > 0) {
- f_macro_string_lengths_resize(status, (*lengths), lengths->size - length);
+ f_macro_string_lengths_t_resize(status, (*lengths), lengths->size - length);
}
else if (lengths->used - length <= 0) {
- f_macro_string_lengths_delete(status, (*lengths));
+ f_macro_string_lengths_t_delete(status, (*lengths));
}
return status;
#endif // _di_fl_string_lengths_size_decrease_
#ifndef _di_fl_string_lengths_size_increase_
- f_return_status fl_string_lengths_size_increase(const f_array_length length, f_string_lengths *lengths) {
+ f_return_status fl_string_lengths_size_increase(const f_array_length_t length, f_string_lengths_t *lengths) {
#ifndef _di_level_1_parameter_checking_
if (length == 0) return F_status_set_error(F_parameter);
if (lengths == 0) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- f_status status = F_none;
+ f_status_t status = F_none;
if (lengths->used + length > lengths->size) {
- if (lengths->used + length > f_array_length_size) {
- if (lengths->used == f_array_length_size) {
+ if (lengths->used + length > f_array_length_t_size) {
+ if (lengths->used == f_array_length_t_size) {
status = F_status_set_error(F_string_too_large);
}
else {
- f_macro_string_lengths_resize(status, (*lengths), f_array_length_size);
+ f_macro_string_lengths_t_resize(status, (*lengths), f_array_length_t_size);
}
}
else {
- f_macro_string_lengths_resize(status, (*lengths), lengths->size + length);
+ f_macro_string_lengths_t_resize(status, (*lengths), lengths->size + length);
}
}
#endif // _di_fl_string_lengths_size_increase_
#ifndef _di_fl_string_mash_
- f_return_status fl_string_mash(const f_string glue, const f_string_length glue_length, const f_string source, const f_string_length length, f_string_dynamic *destination) {
+ f_return_status fl_string_mash(const f_string_t glue, const f_string_length_t glue_length, const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (destination == 0) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
if (length == 0) return F_data_not_eos;
if (glue_length && destination->used) {
- f_status status = private_fl_string_append(glue, glue_length, destination);
+ f_status_t status = private_fl_string_append(glue, glue_length, destination);
if (F_status_is_error(status)) return status;
}
#endif // _di_fl_string_mash_
#ifndef _di_fl_string_mash_nulless_
- f_return_status fl_string_mash_nulless(const f_string glue, const f_string_length glue_length, const f_string source, const f_string_length length, f_string_dynamic *destination) {
+ f_return_status fl_string_mash_nulless(const f_string_t glue, const f_string_length_t glue_length, const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (destination == 0) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
if (length == 0) return F_data_not_eos;
if (glue_length && destination->used) {
- f_status status = private_fl_string_append_nulless(glue, glue_length, destination);
+ f_status_t status = private_fl_string_append_nulless(glue, glue_length, destination);
if (F_status_is_error(status)) return status;
}
#endif // _di_fl_string_mash_nulless_
#ifndef _di_fl_string_mish_
- f_return_status fl_string_mish(const f_string glue, const f_string_length glue_length, const f_string source, const f_string_length length, f_string_dynamic *destination) {
+ f_return_status fl_string_mish(const f_string_t glue, const f_string_length_t glue_length, const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (destination == 0) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
if (length == 0) return F_data_not_eos;
if (glue_length && destination->used) {
- f_status status = private_fl_string_prepend(glue, glue_length, destination);
+ f_status_t status = private_fl_string_prepend(glue, glue_length, destination);
if (F_status_is_error(status)) return status;
}
#endif // _di_fl_string_mish_
#ifndef _di_fl_string_mish_nulless_
- f_return_status fl_string_mish_nulless(const f_string glue, const f_string_length glue_length, const f_string source, const f_string_length length, f_string_dynamic *destination) {
+ f_return_status fl_string_mish_nulless(const f_string_t glue, const f_string_length_t glue_length, const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (destination == 0) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
if (length == 0) return F_data_not_eos;
if (glue_length && destination->used) {
- f_status status = private_fl_string_prepend_nulless(glue, glue_length, destination);
+ f_status_t status = private_fl_string_prepend_nulless(glue, glue_length, destination);
if (F_status_is_error(status)) return status;
}
#endif // _di_fl_string_mish_nulless_
#ifndef _di_fl_string_prepend_
- f_return_status fl_string_prepend(const f_string source, const f_string_length length, f_string_dynamic *destination) {
+ f_return_status fl_string_prepend(const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (destination == 0) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
#endif // _di_fl_string_prepend_
#ifndef _di_fl_string_prepend_assure_
- f_return_status fl_string_prepend_assure(const f_string source, const f_string_length length, f_string_dynamic *destination) {
+ f_return_status fl_string_prepend_assure(const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (destination == 0) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
if (length == 0) return F_data_not_eos;
if (destination->used < length) return private_fl_string_prepend(source, length, destination);
- f_string_length i = 0;
- f_string_length j = 0;
+ f_string_length_t i = 0;
+ f_string_length_t j = 0;
while (i < length && j < destination->used) {
if (source[i] == 0) {
#endif // _di_fl_string_prepend_assure_
#ifndef _di_fl_string_prepend_assure_nulless_
- f_return_status fl_string_prepend_assure_nulless(const f_string source, const f_string_length length, f_string_dynamic *destination) {
+ f_return_status fl_string_prepend_assure_nulless(const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (destination == 0) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
if (length == 0) return F_data_not_eos;
if (destination->used < length) return private_fl_string_prepend_nulless(source, length, destination);
- f_string_length i = 0;
- f_string_length j = 0;
+ f_string_length_t i = 0;
+ f_string_length_t j = 0;
while (i < length && j < destination->used) {
if (source[i] == 0) {
#endif // _di_fl_string_prepend_assure_nulless_
#ifndef _di_fl_string_prepend_nulless_
- f_return_status fl_string_prepend_nulless(const f_string source, const f_string_length length, f_string_dynamic *destination) {
+ f_return_status fl_string_prepend_nulless(const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (destination == 0) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
#endif // _di_fl_string_prepend_nulless_
#ifndef _di_fl_string_rip_
- f_return_status fl_string_rip(const f_string source, const f_string_length length, f_string_dynamic *destination) {
+ f_return_status fl_string_rip(const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (destination == 0) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
if (length == 0) return F_data_not_eos;
- f_string_length begin = 0;
- f_string_length end = length - 1;
+ f_string_length_t begin = 0;
+ f_string_length_t end = length - 1;
- f_status status = private_fl_string_rip_find_range(source, &begin, &end);
+ f_status_t status = private_fl_string_rip_find_range(source, &begin, &end);
if (F_status_is_error(status)) return status;
if (status == F_data_not) return status;
#endif // _di_fl_string_rip_
#ifndef _di_fl_string_rip_nulless_
- f_return_status fl_string_rip_nulless(const f_string source, const f_string_length length, f_string_dynamic *destination) {
+ f_return_status fl_string_rip_nulless(const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (destination == 0) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
if (length == 0) return F_data_not_eos;
- f_string_length begin = 0;
- f_string_length end = length - 1;
+ f_string_length_t begin = 0;
+ f_string_length_t end = length - 1;
- f_status status = private_fl_string_rip_find_range(source, &begin, &end);
+ f_status_t status = private_fl_string_rip_find_range(source, &begin, &end);
if (F_status_is_error(status)) return status;
if (status == F_data_not) return status;
#endif // _di_fl_string_rip_nulless_
#ifndef _di_fl_string_seek_line_to_
- f_return_status fl_string_seek_line_to(const f_string string, const int8_t seek_to, f_string_range *range) {
+ f_return_status fl_string_seek_line_to(const f_string_t string, const int8_t seek_to, f_string_range_t *range) {
#ifndef _di_level_1_parameter_checking_
if (range == 0) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
#endif // _di_fl_string_seek_line_to_
#ifndef _di_fl_string_seek_line_to_utf_character_
- f_return_status fl_string_seek_line_to_utf_character(const f_string string, const f_utf_character seek_to, f_string_range *range) {
+ f_return_status fl_string_seek_line_to_utf_character(const f_string_t string, const f_utf_character_t seek_to, f_string_range_t *range) {
#ifndef _di_level_1_parameter_checking_
if (range == 0) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
if (range->start > range->stop) return F_data_not_stop;
- const unsigned short seek_width = f_macro_utf_character_width(seek_to);
+ const unsigned short seek_width = f_macro_utf_character_t_width(seek_to);
- f_status status = F_none;
+ f_status_t status = F_none;
unsigned short width = 0;
- f_string_length width_max = (range->stop - range->start) + 1;
+ f_string_length_t width_max = (range->stop - range->start) + 1;
for (; range->start <= range->stop; range->start += width) {
width_max = (range->stop - range->start) + 1;
if (range->start + width > range->stop) return F_status_set_error(F_incomplete_utf_eos);
if (width == seek_width) {
- f_utf_character character = 0;
+ f_utf_character_t character = 0;
status = f_utf_char_to_character(string + range->start, width_max, &character);
if (F_status_is_error(status)) return status;
#endif // _di_fl_string_seek_line_to_utf_character_
#ifndef _di_fl_string_seek_line_until_graph_
- f_return_status fl_string_seek_line_until_graph(const f_string string, const int8_t placeholder, f_string_range *range) {
+ f_return_status fl_string_seek_line_until_graph(const f_string_t string, const int8_t placeholder, f_string_range_t *range) {
#ifndef _di_level_1_parameter_checking_
if (range == 0) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
if (range->start > range->stop) return F_data_not_stop;
- f_status status = F_none;
+ f_status_t status = F_none;
unsigned short width = 0;
- f_string_length width_max = (range->stop - range->start) + 1;
+ f_string_length_t width_max = (range->stop - range->start) + 1;
while (string[range->start] == placeholder || (status = f_utf_is_graph(string + range->start, width_max)) == F_false) {
if (F_status_is_error(status)) return status;
#endif // _di_fl_string_seek_line_until_graph_
#ifndef _di_fl_string_seek_line_until_non_graph_
- f_return_status fl_string_seek_line_until_non_graph(const f_string string, const int8_t placeholder, f_string_range *range) {
+ f_return_status fl_string_seek_line_until_non_graph(const f_string_t string, const int8_t placeholder, f_string_range_t *range) {
#ifndef _di_level_1_parameter_checking_
if (range == 0) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
if (range->start > range->stop) return F_data_not_stop;
- f_status status = F_none;
+ f_status_t status = F_none;
unsigned short width = 0;
- f_string_length width_max = (range->stop - range->start) + 1;
+ f_string_length_t width_max = (range->stop - range->start) + 1;
while (string[range->start] == placeholder || (status = f_utf_is_whitespace(string + range->start, width_max)) == F_false) {
if (F_status_is_error(status)) {
#endif // _di_fl_string_seek_line_until_non_graph_
#ifndef _di_fl_string_seek_to_
- f_return_status fl_string_seek_to(const f_string string, const int8_t seek_to, f_string_range *range) {
+ f_return_status fl_string_seek_to(const f_string_t string, const int8_t seek_to, f_string_range_t *range) {
#ifndef _di_level_1_parameter_checking_
if (range == 0) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
#endif // _di_fl_string_seek_to_
#ifndef _di_fl_string_seek_to_utf_character_
- f_return_status fl_string_seek_to_utf_character(const f_string string, const f_utf_character seek_to, f_string_range *range) {
+ f_return_status fl_string_seek_to_utf_character(const f_string_t string, const f_utf_character_t seek_to, f_string_range_t *range) {
#ifndef _di_level_1_parameter_checking_
if (range == 0) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
if (range->start > range->stop) return F_data_not_stop;
- const unsigned short seek_width = f_macro_utf_character_width(seek_to);
+ const unsigned short seek_width = f_macro_utf_character_t_width(seek_to);
- f_status status = F_none;
+ f_status_t status = F_none;
unsigned short width = 0;
- f_string_length width_max = 0;
+ f_string_length_t width_max = 0;
for (; range->start <= range->stop; range->start += width) {
width_max = (range->stop - range->start) + 1;
if (range->start + width > range->stop) return F_status_set_error(F_incomplete_utf_stop);
if (width == seek_width) {
- f_utf_character character = 0;
+ f_utf_character_t character = 0;
status = f_utf_char_to_character(string + range->start, width_max, &character);
if (F_status_is_error(status)) return status;
*
* Provides basic string manipulation and processing capabilities.
*
- * UTF-8 is handled within these functions via normal string characters (f_string).
- * Unlike f_utf_string, these f_string base functions do not force padding of ASCII or UTF-8 characters.
- * With f_string, a 1-byte wide ASCII character is stored as 1 byte and a 4-byte wide UTF-8 character is stored as 4 bytes.
+ * UTF-8 is handled within these functions via normal string characters (f_string_t).
+ * Unlike f_utf_string_t, these f_string_t base functions do not force padding of ASCII or UTF-8 characters.
+ * With f_string_t, a 1-byte wide ASCII character is stored as 1 byte and a 4-byte wide UTF-8 character is stored as 4 bytes.
*
- * This shortens the size of the string at the cost of complexity vs f_utf_string.
+ * This shortens the size of the string at the cost of complexity vs f_utf_string_t.
*
* Because of the variable width, it is generally unsafe to ignore invalid UTF-8 sequences.
* Invalid UTF-8 will be generally result in an error.
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_fl_string_append_
- extern f_return_status fl_string_append(const f_string source, const f_string_length length, f_string_dynamic *destination);
+ extern f_return_status fl_string_append(const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination);
#endif // _di_fl_string_append_
/**
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_fl_string_append_assure_
- extern f_return_status fl_string_append_assure(const f_string source, const f_string_length length, f_string_dynamic *destination);
+ extern f_return_status fl_string_append_assure(const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination);
#endif // _di_fl_string_append_assure_
/**
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_fl_string_append_assure_nulless_
- extern f_return_status fl_string_append_assure_nulless(const f_string source, const f_string_length length, f_string_dynamic *destination);
+ extern f_return_status fl_string_append_assure_nulless(const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination);
#endif // _di_fl_string_append_assure_nulless_
/**
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_fl_string_append_nulless_
- extern f_return_status fl_string_append_nulless(const f_string source, const f_string_length length, f_string_dynamic *destination);
+ extern f_return_status fl_string_append_nulless(const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination);
#endif // _di_fl_string_append_nulless_
/**
* F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_fl_string_compare_
- extern f_return_status fl_string_compare(const f_string string1, const f_string string2, const f_string_length length1, const f_string_length length2);
+ extern f_return_status fl_string_compare(const f_string_t string1, const f_string_t string2, const f_string_length_t length1, const f_string_length_t length2);
#endif // _di_fl_string_compare_
/**
* @see f_utf_is_whitespace()
*/
#ifndef _di_fl_string_compare_trim_
- extern f_return_status fl_string_compare_trim(const f_string string1, const f_string string2, const f_string_length length1, const f_string_length length2);
+ extern f_return_status fl_string_compare_trim(const f_string_t string1, const f_string_t string2, const f_string_length_t length1, const f_string_length_t length2);
#endif // _di_fl_string_compare_trim_
/**
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_fl_string_dynamic_append_
- extern f_return_status fl_string_dynamic_append(const f_string_static source, f_string_dynamic *destination);
+ extern f_return_status fl_string_dynamic_append(const f_string_static_t source, f_string_dynamic_t *destination);
#endif // _di_fl_string_dynamic_append_
/**
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_fl_string_dynamic_append_assure_
- extern f_return_status fl_string_dynamic_append_assure(const f_string_static source, f_string_dynamic *destination);
+ extern f_return_status fl_string_dynamic_append_assure(const f_string_static_t source, f_string_dynamic_t *destination);
#endif // _di_fl_string_dynamic_append_assure_
/**
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_fl_string_dynamic_append_assure_nulless_
- extern f_return_status fl_string_dynamic_append_assure_nulless(const f_string_static source, f_string_dynamic *destination);
+ extern f_return_status fl_string_dynamic_append_assure_nulless(const f_string_static_t source, f_string_dynamic_t *destination);
#endif // _di_fl_string_dynamic_append_assure_nulless_
/**
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_fl_string_dynamic_append_nulless_
- extern f_return_status fl_string_dynamic_append_nulless(const f_string_static source, f_string_dynamic *destination);
+ extern f_return_status fl_string_dynamic_append_nulless(const f_string_static_t source, f_string_dynamic_t *destination);
#endif // _di_fl_string_dynamic_append_nulless_
/**
* F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_fl_string_dynamic_compare_
- extern f_return_status fl_string_dynamic_compare(const f_string_static string1, const f_string_static string2);
+ extern f_return_status fl_string_dynamic_compare(const f_string_static_t string1, const f_string_static_t string2);
#endif // _di_fl_string_dynamic_compare_
/**
* @see f_utf_is_whitespace()
*/
#ifndef _di_fl_string_dynamic_compare_string_
- extern f_return_status fl_string_dynamic_compare_string(const f_string string1, const f_string_static string2, const f_string_length length1);
+ extern f_return_status fl_string_dynamic_compare_string(const f_string_t string1, const f_string_static_t string2, const f_string_length_t length1);
#endif // _di_fl_string_dynamic_compare_string_
/**
* @see f_utf_is_whitespace()
*/
#ifndef _di_fl_string_dynamic_compare_trim_
- extern f_return_status fl_string_dynamic_compare_trim(const f_string_static string1, const f_string_static string2);
+ extern f_return_status fl_string_dynamic_compare_trim(const f_string_static_t string1, const f_string_static_t string2);
#endif // _di_fl_string_dynamic_compare_trim_
/**
* @see f_utf_is_whitespace()
*/
#ifndef _di_fl_string_dynamic_compare_trim_string_
- extern f_return_status fl_string_dynamic_compare_trim_string(const f_string string1, const f_string_static string2, const f_string_length length1);
+ extern f_return_status fl_string_dynamic_compare_trim_string(const f_string_t string1, const f_string_static_t string2, const f_string_length_t length1);
#endif // _di_fl_string_dynamic_compare_trim_string_
/**
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_fl_string_dynamic_mash_
- extern f_return_status fl_string_dynamic_mash(const f_string glue, const f_string_length glue_length, const f_string_static source, f_string_dynamic *destination);
+ extern f_return_status fl_string_dynamic_mash(const f_string_t glue, const f_string_length_t glue_length, const f_string_static_t source, f_string_dynamic_t *destination);
#endif // _di_fl_string_dynamic_mash_
/**
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_fl_string_dynamic_mash_nulless_
- extern f_return_status fl_string_dynamic_mash_nulless(const f_string glue, const f_string_length glue_length, const f_string_static source, f_string_dynamic *destination);
+ extern f_return_status fl_string_dynamic_mash_nulless(const f_string_t glue, const f_string_length_t glue_length, const f_string_static_t source, f_string_dynamic_t *destination);
#endif // _di_fl_string_dynamic_mash_nulless_
/**
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_fl_string_dynamic_mish_
- extern f_return_status fl_string_dynamic_mish(const f_string glue, const f_string_length glue_length, const f_string_static source, f_string_dynamic *destination);
+ extern f_return_status fl_string_dynamic_mish(const f_string_t glue, const f_string_length_t glue_length, const f_string_static_t source, f_string_dynamic_t *destination);
#endif // _di_fl_string_dynamic_mish_
/**
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_fl_string_dynamic_mish_nulless_
- extern f_return_status fl_string_dynamic_mish_nulless(const f_string glue, const f_string_length glue_length, const f_string_static source, f_string_dynamic *destination);
+ extern f_return_status fl_string_dynamic_mish_nulless(const f_string_t glue, const f_string_length_t glue_length, const f_string_static_t source, f_string_dynamic_t *destination);
#endif // _di_fl_string_dynamic_mish_nulless_
/**
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_fl_string_dynamic_partial_append_
- extern f_return_status fl_string_dynamic_partial_append(const f_string_static source, const f_string_range range, f_string_dynamic *destination);
+ extern f_return_status fl_string_dynamic_partial_append(const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination);
#endif // _di_fl_string_dynamic_partial_append_
/**
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_fl_string_dynamic_partial_append_assure_
- extern f_return_status fl_string_dynamic_partial_append_assure(const f_string_static source, const f_string_range range, f_string_dynamic *destination);
+ extern f_return_status fl_string_dynamic_partial_append_assure(const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination);
#endif // _di_fl_string_dynamic_partial_append_assure_
/**
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_fl_string_dynamic_partial_append_assure_nulless_
- extern f_return_status fl_string_dynamic_partial_append_assure_nulless(const f_string_static source, const f_string_range range, f_string_dynamic *destination);
+ extern f_return_status fl_string_dynamic_partial_append_assure_nulless(const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination);
#endif // _di_fl_string_dynamic_partial_append_assure_nulless_
/**
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_fl_string_dynamic_partial_append_nulless_
- extern f_return_status fl_string_dynamic_partial_append_nulless(const f_string_static source, const f_string_range range, f_string_dynamic *destination);
+ extern f_return_status fl_string_dynamic_partial_append_nulless(const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination);
#endif // _di_fl_string_dynamic_partial_append_nulless_
/**
* F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_fl_string_dynamic_partial_compare_
- extern f_return_status fl_string_dynamic_partial_compare(const f_string_static string1, const f_string_static string2, const f_string_range range1, const f_string_range range2);
+ extern f_return_status fl_string_dynamic_partial_compare(const f_string_static_t string1, const f_string_static_t string2, const f_string_range_t range1, const f_string_range_t range2);
#endif // _di_fl_string_dynamic_partial_compare_
/**
* F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_fl_string_dynamic_partial_compare_dynamic_
- extern f_return_status fl_string_dynamic_partial_compare_dynamic(const f_string_static string1, const f_string_static string2, const f_string_range range2);
+ extern f_return_status fl_string_dynamic_partial_compare_dynamic(const f_string_static_t string1, const f_string_static_t string2, const f_string_range_t range2);
#endif // _di_fl_string_dynamic_partial_compare_dynamic_
/**
* F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_fl_string_dynamic_partial_compare_string_
- extern f_return_status fl_string_dynamic_partial_compare_string(const f_string string1, const f_string_static string2, const f_string_length length1, const f_string_range range2);
+ extern f_return_status fl_string_dynamic_partial_compare_string(const f_string_t string1, const f_string_static_t string2, const f_string_length_t length1, const f_string_range_t range2);
#endif // _di_fl_string_dynamic_partial_compare_string_
/**
* @see f_utf_is_whitespace()
*/
#ifndef _di_fl_string_dynamic_partial_compare_trim_dynamic_
- extern f_return_status fl_string_dynamic_partial_compare_trim_dynamic(const f_string_static string1, const f_string_static string2, const f_string_range range2);
+ extern f_return_status fl_string_dynamic_partial_compare_trim_dynamic(const f_string_static_t string1, const f_string_static_t string2, const f_string_range_t range2);
#endif // _di_fl_string_dynamic_partial_compare_trim_dynamic_
/**
* @see f_utf_is_whitespace()
*/
#ifndef _di_fl_string_dynamic_partial_compare_trim_string_
- extern f_return_status fl_string_dynamic_partial_compare_trim_string(const f_string string1, const f_string_static string2, const f_string_length length1, const f_string_range range2);
+ extern f_return_status fl_string_dynamic_partial_compare_trim_string(const f_string_t string1, const f_string_static_t string2, const f_string_length_t length1, const f_string_range_t range2);
#endif // _di_fl_string_dynamic_partial_compare_trim_string_
/**
* @see f_utf_is_whitespace()
*/
#ifndef _di_fl_string_dynamic_partial_compare_trim_
- extern f_return_status fl_string_dynamic_partial_compare_trim(const f_string_static string1, const f_string_static string2, const f_string_range range1, const f_string_range range2);
+ extern f_return_status fl_string_dynamic_partial_compare_trim(const f_string_static_t string1, const f_string_static_t string2, const f_string_range_t range1, const f_string_range_t range2);
#endif // _di_fl_string_dynamic_partial_compare_trim_
/**
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_fl_string_dynamic_partial_mash_
- extern f_return_status fl_string_dynamic_partial_mash(const f_string glue, const f_string_length glue_length, const f_string_static source, const f_string_range range, f_string_dynamic *destination);
+ extern f_return_status fl_string_dynamic_partial_mash(const f_string_t glue, const f_string_length_t glue_length, const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination);
#endif // _di_fl_string_dynamic_partial_mash_
/**
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_fl_string_dynamic_partial_mash_nulless_
- extern f_return_status fl_string_dynamic_partial_mash_nulless(const f_string glue, const f_string_length glue_length, const f_string_static source, const f_string_range range, f_string_dynamic *destination);
+ extern f_return_status fl_string_dynamic_partial_mash_nulless(const f_string_t glue, const f_string_length_t glue_length, const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination);
#endif // _di_fl_string_dynamic_partial_mash_nulless_
/**
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_fl_string_dynamic_partial_mish_
- extern f_return_status fl_string_dynamic_partial_mish(const f_string glue, const f_string_length glue_length, const f_string_static source, const f_string_range range, f_string_dynamic *destination);
+ extern f_return_status fl_string_dynamic_partial_mish(const f_string_t glue, const f_string_length_t glue_length, const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination);
#endif // _di_fl_string_dynamic_partial_mish_
/**
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_fl_string_dynamic_partial_mish_nulless_
- extern f_return_status fl_string_dynamic_partial_mish_nulless(const f_string glue, const f_string_length glue_length, const f_string_static source, const f_string_range range, f_string_dynamic *destination);
+ extern f_return_status fl_string_dynamic_partial_mish_nulless(const f_string_t glue, const f_string_length_t glue_length, const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination);
#endif // _di_fl_string_dynamic_partial_mish_nulless_
/**
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_fl_string_dynamic_partial_prepend_
- extern f_return_status fl_string_dynamic_partial_prepend(const f_string_static source, const f_string_range range, f_string_dynamic *destination);
+ extern f_return_status fl_string_dynamic_partial_prepend(const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination);
#endif // _di_fl_string_dynamic_partial_prepend_
/**
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_fl_string_dynamic_partial_prepend_assure_
- extern f_return_status fl_string_dynamic_partial_prepend_assure(const f_string_static source, const f_string_range range, f_string_dynamic *destination);
+ extern f_return_status fl_string_dynamic_partial_prepend_assure(const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination);
#endif // _di_fl_string_dynamic_partial_prepend_assure_
/**
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_fl_string_dynamic_partial_prepend_assure_nulless_
- extern f_return_status fl_string_dynamic_partial_prepend_assure_nulless(const f_string_static source, const f_string_range range, f_string_dynamic *destination);
+ extern f_return_status fl_string_dynamic_partial_prepend_assure_nulless(const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination);
#endif // _di_fl_string_dynamic_partial_prepend_assure_nulless_
/**
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_fl_string_dynamic_partial_prepend_nulless_
- extern f_return_status fl_string_dynamic_partial_prepend_nulless(const f_string_static source, const f_string_range range, f_string_dynamic *destination);
+ extern f_return_status fl_string_dynamic_partial_prepend_nulless(const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination);
#endif // _di_fl_string_dynamic_partial_prepend_nulless_
/**
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_fl_string_dynamic_prepend_
- extern f_return_status fl_string_dynamic_prepend(const f_string_static source, f_string_dynamic *destination);
+ extern f_return_status fl_string_dynamic_prepend(const f_string_static_t source, f_string_dynamic_t *destination);
#endif // _di_fl_string_dynamic_prepend_
/**
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_fl_string_dynamic_prepend_assure_
- extern f_return_status fl_string_dynamic_prepend_assure(const f_string_static source, f_string_dynamic *destination);
+ extern f_return_status fl_string_dynamic_prepend_assure(const f_string_static_t source, f_string_dynamic_t *destination);
#endif // _di_fl_string_dynamic_prepend_assure_
/**
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_fl_string_dynamic_prepend_assure_nulless_
- extern f_return_status fl_string_dynamic_prepend_assure_nulless(const f_string_static source, f_string_dynamic *destination);
+ extern f_return_status fl_string_dynamic_prepend_assure_nulless(const f_string_static_t source, f_string_dynamic_t *destination);
#endif // _di_fl_string_dynamic_prepend_assure_nulless_
/**
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_fl_string_dynamic_prepend_nulless_
- extern f_return_status fl_string_dynamic_prepend_nulless(const f_string_static source, f_string_dynamic *destination);
+ extern f_return_status fl_string_dynamic_prepend_nulless(const f_string_static_t source, f_string_dynamic_t *destination);
#endif // _di_fl_string_dynamic_prepend_nulless_
/**
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_fl_string_dynamic_size_decrease_
- extern f_return_status fl_string_dynamic_size_decrease(const f_string_length length, f_string_dynamic *string);
+ extern f_return_status fl_string_dynamic_size_decrease(const f_string_length_t length, f_string_dynamic_t *string);
#endif // _di_fl_string_dynamic_size_decrease_
/**
* Resize the dynamic string to a larger size.
*
* This will resize making the string larger based on the given length.
- * If the given length is too large for the buffer, then attempt to set max buffer size (f_string_length_size).
+ * If the given length is too large for the buffer, then attempt to set max buffer size (f_string_length_t_size).
* If already set to the maximum buffer size, then the resize will fail.
*
* @param length
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_fl_string_dynamic_size_increase_
- extern f_return_status fl_string_dynamic_size_increase(const f_string_length length, f_string_dynamic *string);
+ extern f_return_status fl_string_dynamic_size_increase(const f_string_length_t length, f_string_dynamic_t *string);
#endif // _di_fl_string_dynamic_size_increase_
/**
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_fl_string_dynamics_size_decrease_
- extern f_return_status fl_string_dynamics_size_decrease(const f_array_length length, f_string_dynamics *strings);
+ extern f_return_status fl_string_dynamics_size_decrease(const f_array_length_t length, f_string_dynamics_t *strings);
#endif // _di_fl_string_dynamics_size_decrease_
/**
* Resize the array of dynamic strings to a larger size.
*
* This will resize making the string larger based on the given length.
- * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_size).
+ * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size).
* If already set to the maximum buffer size, then the resize will fail.
*
* @param length
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_fl_string_dynamics_size_increase_
- extern f_return_status fl_string_dynamics_size_increase(const f_array_length length, f_string_dynamics *strings);
+ extern f_return_status fl_string_dynamics_size_increase(const f_array_length_t length, f_string_dynamics_t *strings);
#endif // _di_fl_string_dynamics_size_increase_
/**
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_fl_string_dynamic_rip_
- extern f_return_status fl_string_dynamic_rip(const f_string_static source, const f_string_range range, f_string_dynamic *destination);
+ extern f_return_status fl_string_dynamic_rip(const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination);
#endif // _di_fl_string_dynamic_rip_
/**
* F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_fl_string_dynamic_rip_nulless_
- extern f_return_status fl_string_dynamic_rip_nulless(const f_string_static source, const f_string_range range, f_string_dynamic *destination);
+ extern f_return_status fl_string_dynamic_rip_nulless(const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination);
#endif // _di_fl_string_dynamic_rip_nulless_
/**
* F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_fl_string_dynamic_seek_line_to_
- extern f_return_status fl_string_dynamic_seek_line_to(const f_string_static buffer, f_string_range *range, const int8_t seek_to_this);
+ extern f_return_status fl_string_dynamic_seek_line_to(const f_string_static_t buffer, f_string_range_t *range, const int8_t seek_to_this);
#endif // _di_fl_string_dynamic_seek_line_to_
/**
* @see f_utf_char_to_character()
*/
#ifndef _di_fl_string_dynamic_seek_line_to_utf_character_
- extern f_return_status fl_string_dynamic_seek_line_to_utf_character(const f_string_static buffer, f_string_range *range, const f_utf_character seek_to_this);
+ extern f_return_status fl_string_dynamic_seek_line_to_utf_character(const f_string_static_t buffer, f_string_range_t *range, const f_utf_character_t seek_to_this);
#endif // _di_fl_string_dynamic_seek_line_to_utf_character_
/**
* @see f_utf_is_graph()
*/
#ifndef _di_fl_string_dynamic_seek_line_until_graph_
- extern f_return_status fl_string_dynamic_seek_line_until_graph(const f_string_static buffer, f_string_range *range, const int8_t placeholder);
+ extern f_return_status fl_string_dynamic_seek_line_until_graph(const f_string_static_t buffer, f_string_range_t *range, const int8_t placeholder);
#endif // _di_fl_string_dynamic_seek_line_until_graph_
/**
* @see f_utf_is_graph()
*/
#ifndef _di_fl_string_dynamic_seek_line_until_non_graph_
- extern f_return_status fl_string_dynamic_seek_line_until_non_graph(const f_string_static buffer, f_string_range *range, const int8_t placeholder);
+ extern f_return_status fl_string_dynamic_seek_line_until_non_graph(const f_string_static_t buffer, f_string_range_t *range, const int8_t placeholder);
#endif // _di_fl_string_dynamic_seek_line_until_non_graph_
/**
* F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_fl_string_dynamic_seek_to_
- extern f_return_status fl_string_dynamic_seek_to(const f_string_static buffer, f_string_range *range, const int8_t seek_to_this);
+ extern f_return_status fl_string_dynamic_seek_to(const f_string_static_t buffer, f_string_range_t *range, const int8_t seek_to_this);
#endif // _di_fl_string_dynamic_seek_to_
/**
* @see f_utf_char_to_character()
*/
#ifndef _di_fl_string_dynamic_seek_to_utf_character_
- extern f_return_status fl_string_dynamic_seek_to_utf_character(const f_string_static buffer, f_string_range *range, const f_utf_character seek_to_this);
+ extern f_return_status fl_string_dynamic_seek_to_utf_character(const f_string_static_t buffer, f_string_range_t *range, const f_utf_character_t seek_to_this);
#endif // _di_fl_string_dynamic_seek_to_utf_character_
/**
* F_string_too_large (with error bit) if string is too large to fit into the buffer.
*/
#ifndef _di_fl_string_dynamic_terminate_
- extern f_return_status fl_string_dynamic_terminate(f_string_dynamic *destination);
+ extern f_return_status fl_string_dynamic_terminate(f_string_dynamic_t *destination);
#endif // _di_fl_string_dynamic_terminate_
/**
* F_string_too_large (with error bit) if string is too large to fit into the buffer.
*/
#ifndef _di_fl_string_dynamic_terminate_after_
- extern f_return_status fl_string_dynamic_terminate_after(f_string_dynamic *destination);
+ extern f_return_status fl_string_dynamic_terminate_after(f_string_dynamic_t *destination);
#endif // _di_fl_string_dynamic_terminate_after_
/**
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_fl_string_lengths_size_decrease_
- extern f_return_status fl_string_length_size_decrease(const f_array_length length, f_string_lengths *lengths);
+ extern f_return_status fl_string_length_size_decrease(const f_array_length_t length, f_string_lengths_t *lengths);
#endif // _di_fl_string_lengths_size_decrease_
/**
* Resize the array of string lengths to a larger size.
*
* This will resize making the string larger based on the given length.
- * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_size).
+ * If the given length is too large for the buffer, then attempt to set max buffer size (f_array_length_t_size).
* If already set to the maximum buffer size, then the resize will fail.
*
* @param length
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_fl_string_lengths_size_increase_
- extern f_return_status fl_string_lengths_size_increase(const f_array_length length, f_string_lengths *lengths);
+ extern f_return_status fl_string_lengths_size_increase(const f_array_length_t length, f_string_lengths_t *lengths);
#endif // _di_fl_string_lengths_size_increase_
/**
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_fl_string_mash_
- extern f_return_status fl_string_mash(const f_string glue, const f_string_length glue_length, const f_string source, const f_string_length length, f_string_dynamic *destination);
+ extern f_return_status fl_string_mash(const f_string_t glue, const f_string_length_t glue_length, const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination);
#endif // _di_fl_string_mash_
/**
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_fl_string_mash_nulless_
- extern f_return_status fl_string_mash_nulless(const f_string glue, const f_string_length glue_length, const f_string source, const f_string_length length, f_string_dynamic *destination);
+ extern f_return_status fl_string_mash_nulless(const f_string_t glue, const f_string_length_t glue_length, const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination);
#endif // _di_fl_string_mash_nulless_
/**
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_fl_string_mish_
- extern f_return_status fl_string_mish(const f_string glue, const f_string_length glue_length, const f_string source, const f_string_length length, f_string_dynamic *destination);
+ extern f_return_status fl_string_mish(const f_string_t glue, const f_string_length_t glue_length, const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination);
#endif // _di_fl_string_mish_
/**
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_fl_string_mish_nulless_
- extern f_return_status fl_string_mish_nulless(const f_string glue, const f_string_length glue_length, const f_string source, const f_string_length length, f_string_dynamic *destination);
+ extern f_return_status fl_string_mish_nulless(const f_string_t glue, const f_string_length_t glue_length, const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination);
#endif // _di_fl_string_mish_nulless_
/**
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_fl_string_prepend_
- extern f_return_status fl_string_prepend(const f_string source, const f_string_length length, f_string_dynamic *destination);
+ extern f_return_status fl_string_prepend(const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination);
#endif // _di_fl_string_prepend_
/**
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_fl_string_prepend_assure_
- extern f_return_status fl_string_prepend_assure(const f_string source, const f_string_length length, f_string_dynamic *destination);
+ extern f_return_status fl_string_prepend_assure(const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination);
#endif // _di_fl_string_prepend_assure_
/**
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_fl_string_prepend_assure_nulless_
- extern f_return_status fl_string_prepend_assure_nulless(const f_string source, const f_string_length length, f_string_dynamic *destination);
+ extern f_return_status fl_string_prepend_assure_nulless(const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination);
#endif // _di_fl_string_prepend_assure_nulless_
/**
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_fl_string_prepend_nulless_
- extern f_return_status fl_string_prepend_nulless(const f_string source, const f_string_length length, f_string_dynamic *destination);
+ extern f_return_status fl_string_prepend_nulless(const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination);
#endif // _di_fl_string_prepend_nulless_
/**
* @see f_utf_is_whitespace()
*/
#ifndef _di_fl_string_rip_
- extern f_return_status fl_string_rip(const f_string source, const f_string_length length, f_string_dynamic *destination);
+ extern f_return_status fl_string_rip(const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination);
#endif // _di_fl_string_rip_
/**
* @see f_utf_is_whitespace()
*/
#ifndef _di_fl_string_rip_nulless_
- extern f_return_status fl_string_rip_nulless(const f_string source, const f_string_length length, f_string_dynamic *destination);
+ extern f_return_status fl_string_rip_nulless(const f_string_t source, const f_string_length_t length, f_string_dynamic_t *destination);
#endif // _di_fl_string_rip_nulless_
/**
* F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_fl_string_seek_line_to_
- extern f_return_status fl_string_seek_line_to(const f_string string, const int8_t seek_to, f_string_range *range);
+ extern f_return_status fl_string_seek_line_to(const f_string_t string, const int8_t seek_to, f_string_range_t *range);
#endif // _di_fl_string_seek_line_to_
/**
* @see f_utf_char_to_character()
*/
#ifndef _di_fl_string_seek_line_to_utf_character_
- extern f_return_status fl_string_seek_line_to_utf_character(const f_string string, const f_utf_character seek_to, f_string_range *range);
+ extern f_return_status fl_string_seek_line_to_utf_character(const f_string_t string, const f_utf_character_t seek_to, f_string_range_t *range);
#endif // _di_fl_string_seek_line_to_utf_character_
/**
* @see f_utf_is_graph()
*/
#ifndef _di_fl_string_seek_line_until_graph_
- extern f_return_status fl_string_seek_line_until_graph(const f_string string, const int8_t placeholder, f_string_range *range);
+ extern f_return_status fl_string_seek_line_until_graph(const f_string_t string, const int8_t placeholder, f_string_range_t *range);
#endif // _di_fl_string_seek_line_until_graph_
/**
* @see f_utf_is_whitespace()
*/
#ifndef _di_fl_string_seek_line_until_non_graph_
- extern f_return_status fl_string_seek_line_until_non_graph(const f_string string, const int8_t placeholder, f_string_range *range);
+ extern f_return_status fl_string_seek_line_until_non_graph(const f_string_t string, const int8_t placeholder, f_string_range_t *range);
#endif // _di_fl_string_seek_line_until_non_graph_
/**
* F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_fl_string_seek_to_
- extern f_return_status fl_string_seek_to(const f_string string, const int8_t seek_to, f_string_range *range);
+ extern f_return_status fl_string_seek_to(const f_string_t string, const int8_t seek_to, f_string_range_t *range);
#endif // _di_fl_string_seek_to_
/**
* @see f_utf_char_to_character()
*/
#ifndef _di_fl_string_seek_to_utf_character_
- extern f_return_status fl_string_seek_to_utf_character(const f_string string, const f_utf_character seek_to, f_string_range *range);
+ extern f_return_status fl_string_seek_to_utf_character(const f_string_t string, const f_utf_character_t seek_to, f_string_range_t *range);
#endif // _di_fl_string_seek_to_utf_character_
#ifdef __cplusplus
#endif
#if !defined(_di_fl_utf_string_append_) || !defined(_di_fl_utf_string_dynamic_append_) || !defined(_di_fl_utf_string_append_mash_) || !defined(_di_fl_utf_string_dynamic_mash_)
- f_return_status private_fl_utf_string_append(const f_utf_string source, const f_utf_string_length length, f_utf_string_dynamic *destination) {
+ f_return_status private_fl_utf_string_append(const f_utf_string_t source, const f_utf_string_length_t length, f_utf_string_dynamic_t *destination) {
- if (destination->used + length > f_utf_string_max_size) return F_status_set_error(F_string_too_large);
+ if (destination->used + length > f_utf_string_t_size_max) return F_status_set_error(F_string_too_large);
- f_status status = F_none;
+ f_status_t status = F_none;
- const f_utf_string_length total = destination->used + length;
+ const f_utf_string_length_t total = destination->used + length;
if (total > destination->size) {
- f_macro_string_dynamic_resize(status, (*destination), total);
+ f_macro_string_dynamic_t_resize(status, (*destination), total);
if (F_status_is_error(status)) return status;
}
#endif // !defined(_di_fl_utf_string_append_) || !defined(_di_fl_utf_string_dynamic_append_) || !defined(_di_fl_utf_string_append_mash_) || !defined(_di_fl_utf_string_dynamic_mash_)
#if !defined(_di_fl_utf_string_append_nulless_) || !defined(_di_fl_utf_string_dynamic_append_nulless_) || !defined(_di_fl_utf_string_mash_nulless_) || !defined(_di_fl_utf_string_dynamic_mash_nulless_)
- f_return_status private_fl_utf_string_append_nulless(const f_utf_string source, const f_utf_string_length length, f_utf_string_dynamic *destination) {
+ f_return_status private_fl_utf_string_append_nulless(const f_utf_string_t source, const f_utf_string_length_t length, f_utf_string_dynamic_t *destination) {
- if (destination->used + length > f_utf_string_max_size) return F_status_set_error(F_string_too_large);
+ if (destination->used + length > f_utf_string_t_size_max) return F_status_set_error(F_string_too_large);
- f_status status = F_none;
+ f_status_t status = F_none;
- f_utf_string_length first = 0;
+ f_utf_string_length_t first = 0;
- for (f_utf_string_length i = 0; i <= length; i++) {
+ for (f_utf_string_length_t i = 0; i <= length; i++) {
if (i == length) {
if (i > first) {
- f_utf_string_length size = i - first;
+ f_utf_string_length_t size = i - first;
- if (destination->used + size > f_utf_string_max_size) return F_status_set_error(F_string_too_large);
+ if (destination->used + size > f_utf_string_t_size_max) return F_status_set_error(F_string_too_large);
- f_utf_string_length total = destination->used + size;
+ f_utf_string_length_t total = destination->used + size;
if (total > destination->size) {
- f_macro_string_dynamic_resize(status, (*destination), total);
+ f_macro_string_dynamic_t_resize(status, (*destination), total);
if (F_status_is_error(status)) return status;
}
break;
}
- if (source[i] == f_utf_character_eos) {
+ if (source[i] == f_utf_character_t_eos) {
if (i > 0) {
if (i > first) {
- f_utf_string_length size = i - first;
+ f_utf_string_length_t size = i - first;
- if (destination->used + size > f_utf_string_max_size) return F_status_set_error(F_string_too_large);
+ if (destination->used + size > f_utf_string_t_size_max) return F_status_set_error(F_string_too_large);
- f_utf_string_length total = destination->used + size;
+ f_utf_string_length_t total = destination->used + size;
if (total > destination->size) {
- f_macro_string_dynamic_resize(status, (*destination), total);
+ f_macro_string_dynamic_t_resize(status, (*destination), total);
if (F_status_is_error(status)) return status;
}
}
}
- while (i + 1 < length && source[i + 1] == f_utf_character_eos) {
+ while (i + 1 < length && source[i + 1] == f_utf_character_t_eos) {
i++;
} // while
#endif // !defined(_di_fl_utf_string_append_nulless_) || !defined(_di_fl_utf_string_dynamic_append_nulless_) || !defined(_di_fl_utf_string_mash_nulless_) || !defined(_di_fl_utf_string_dynamic_mash_nulless_)
#if !defined(_di_fl_utf_string_compare_) || !defined(_di_fl_utf_string_dynamic_compare_) || !defined(_di_fl_utf_string_dynamic_partial_compare_)
- f_return_status private_fl_utf_string_compare(const f_utf_string string1, const f_utf_string string2, const f_utf_string_length offset1, const f_utf_string_length offset2, const f_utf_string_length stop1, const f_utf_string_length stop2) {
- f_utf_string_length i1 = offset1;
- f_utf_string_length i2 = offset2;
+ f_return_status private_fl_utf_string_compare(const f_utf_string_t string1, const f_utf_string_t string2, const f_utf_string_length_t offset1, const f_utf_string_length_t offset2, const f_utf_string_length_t stop1, const f_utf_string_length_t stop2) {
+ f_utf_string_length_t i1 = offset1;
+ f_utf_string_length_t i2 = offset2;
for (; i1 < stop1 && i2 < stop2; i1++, i2++) {
// skip past NULL in string1.
#endif // !defined(_di_fl_utf_string_compare_) || !defined(_di_fl_utf_string_dynamic_compare_) || !defined(_di_fl_utf_string_dynamic_partial_compare_)
#if !defined(_di_fl_utf_string_compare_trim_) || !defined(_di_fl_utf_string_dynamic_compare_trim_) || !defined(_di_fl_utf_string_dynamic_partial_compare_trim_)
- f_return_status private_fl_utf_string_compare_trim(const f_utf_string string1, const f_utf_string string2, const f_utf_string_length offset1, const f_utf_string_length offset2, const f_utf_string_length stop1, const f_utf_string_length stop2) {
- f_utf_string_length i1 = offset1;
- f_utf_string_length i2 = offset2;
+ f_return_status private_fl_utf_string_compare_trim(const f_utf_string_t string1, const f_utf_string_t string2, const f_utf_string_length_t offset1, const f_utf_string_length_t offset2, const f_utf_string_length_t stop1, const f_utf_string_length_t stop2) {
+ f_utf_string_length_t i1 = offset1;
+ f_utf_string_length_t i2 = offset2;
- f_status status = F_none;
+ f_status_t status = F_none;
// skip past leading whitespace in string1.
for (; i1 < stop1; i1++) {
if (status == F_false) break;
} // for
- f_utf_string_length last1 = i1;
- f_utf_string_length last2 = i2;
+ f_utf_string_length_t last1 = i1;
+ f_utf_string_length_t last2 = i2;
{
// size1 and size2 are to represent to total number of characters after trim.
- f_utf_string_length size1 = 0;
- f_utf_string_length size2 = 0;
+ f_utf_string_length_t size1 = 0;
+ f_utf_string_length_t size2 = 0;
// determine where the last non-whitespace is in string1.
- for (f_utf_string_length j = i1; j < stop1; j++) {
+ for (f_utf_string_length_t j = i1; j < stop1; j++) {
// skip past NULL in string1.
while (j < stop1 && string1[j] == 0) j++;
if (j == stop1) break;
} // for
// determine where the last non-whitespace is in string2.
- for (f_utf_string_length j = i2; j < stop2; j++) {
+ for (f_utf_string_length_t j = i2; j < stop2; j++) {
// skip past NULL in string2.
while (j < stop2 && string2[j] == 0) j++;
if (j == stop2) break;
#endif // !defined(_di_fl_utf_string_compare_trim_) || !defined(_di_fl_utf_string_dynamic_compare_trim_) || !defined(_di_fl_utf_string_dynamic_partial_compare_trim_)
#if !defined(_di_fl_utf_string_prepend_) || !defined(_di_fl_utf_string_dynamic_prepend_)
- f_return_status private_fl_utf_string_prepend(const f_utf_string source, const f_utf_string_length length, f_utf_string_dynamic *destination) {
+ f_return_status private_fl_utf_string_prepend(const f_utf_string_t source, const f_utf_string_length_t length, f_utf_string_dynamic_t *destination) {
- if (destination->used + length > f_utf_string_max_size) {
+ if (destination->used + length > f_utf_string_t_size_max) {
return F_status_set_error(F_string_too_large);
}
- f_status status = F_none;
+ f_status_t status = F_none;
- const f_utf_string_length total = destination->used + length;
+ const f_utf_string_length_t total = destination->used + length;
if (total > destination->size) {
- f_macro_string_dynamic_resize(status, (*destination), total);
+ f_macro_string_dynamic_t_resize(status, (*destination), total);
if (F_status_is_error(status)) return status;
}
#endif // !defined(_di_fl_utf_string_prepend_) || !defined(_di_fl_utf_string_dynamic_prepend_)
#if !defined(_di_fl_utf_string_prepend_nulless_) || !defined(_di_fl_utf_string_dynamic_prepend_nulless_)
- f_return_status private_fl_utf_string_prepend_nulless(const f_utf_string source, const f_utf_string_length length, f_utf_string_dynamic *destination) {
+ f_return_status private_fl_utf_string_prepend_nulless(const f_utf_string_t source, const f_utf_string_length_t length, f_utf_string_dynamic_t *destination) {
- if (destination->used + length > f_utf_string_max_size) {
+ if (destination->used + length > f_utf_string_t_size_max) {
return F_status_set_error(F_string_too_large);
}
- f_status status = F_none;
+ f_status_t status = F_none;
- f_utf_string_length first = 0;
- f_utf_string_length offset = 0;
+ f_utf_string_length_t first = 0;
+ f_utf_string_length_t offset = 0;
- for (f_utf_string_length i = 0; i <= length; i++) {
+ for (f_utf_string_length_t i = 0; i <= length; i++) {
if (i == length) {
if (i > first) {
- const f_utf_string_length size = i - first;
+ const f_utf_string_length_t size = i - first;
- if (destination->used + size > f_utf_string_max_size) {
+ if (destination->used + size > f_utf_string_t_size_max) {
return F_status_set_error(F_string_too_large);
}
- const f_utf_string_length total = destination->used + size;
+ const f_utf_string_length_t total = destination->used + size;
if (total > destination->size) {
- f_macro_string_dynamic_resize(status, (*destination), total);
+ f_macro_string_dynamic_t_resize(status, (*destination), total);
if (F_status_is_error(status)) return status;
}
break;
}
- if (source[i] == f_utf_character_eos) {
+ if (source[i] == f_utf_character_t_eos) {
if (i > 0) {
if (i > first) {
- const f_utf_string_length size = i - first;
+ const f_utf_string_length_t size = i - first;
- if (destination->used + size > f_utf_string_max_size) {
+ if (destination->used + size > f_utf_string_t_size_max) {
return F_status_set_error(F_string_too_large);
}
- const f_utf_string_length total = destination->used + size;
+ const f_utf_string_length_t total = destination->used + size;
if (total > destination->size) {
- f_macro_string_dynamic_resize(status, (*destination), total);
+ f_macro_string_dynamic_t_resize(status, (*destination), total);
if (F_status_is_error(status)) return status;
}
}
}
- while (i + 1 < length && source[i + 1] == f_utf_character_eos) {
+ while (i + 1 < length && source[i + 1] == f_utf_character_t_eos) {
i++;
} // while
#endif // !defined(_di_fl_utf_string_prepend_nulless_) || !defined(_di_fl_utf_string_dynamic_prepend_nulless_)
#if !defined(_di_fl_utf_string_rip_) || !defined(_di_fl_utf_string_dynamic_rip_) || !defined(_di_fl_utf_string_rip_nulless_) || !defined(_di_fl_utf_string_dynamic_rip_nulless_)
- f_return_status private_fl_utf_string_rip_find_range(const f_utf_string source, f_utf_string_length *start, f_utf_string_length *stop) {
+ f_return_status private_fl_utf_string_rip_find_range(const f_utf_string_t source, f_utf_string_length_t *start, f_utf_string_length_t *stop) {
- f_status status = F_none;
+ f_status_t status = F_none;
// skip past leading whitespace.
for (; *start <= *stop; (*start)++) {
* @see fl_utf_string_dynamic_mash()
*/
#if !defined(_di_fl_utf_string_append_) || !defined(_di_fl_utf_string_dynamic_append_) || !defined(_di_fl_utf_string_append_mash_) || !defined(_di_fl_utf_string_dynamic_mash_)
- extern f_return_status private_fl_utf_string_append(const f_utf_string source, const f_utf_string_length length, f_utf_string_dynamic *destination) f_gcc_attribute_visibility_internal;
+ extern f_return_status private_fl_utf_string_append(const f_utf_string_t source, const f_utf_string_length_t length, f_utf_string_dynamic_t *destination) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_fl_utf_string_append_) || !defined(_di_fl_utf_string_dynamic_append_) || !defined(_di_fl_utf_string_append_mash_) || !defined(_di_fl_utf_string_dynamic_mash_)
/**
* @see fl_utf_string_dynamic_mash_nulless()
*/
#if !defined(_di_fl_utf_string_append_nulless_) || !defined(_di_fl_utf_string_dynamic_append_nulless_) || !defined(_di_fl_utf_string_mash_nulless_) || !defined(_di_fl_utf_string_dynamic_mash_nulless_)
- extern f_return_status private_fl_utf_string_append_nulless(const f_utf_string source, const f_utf_string_length length, f_utf_string_dynamic *destination) f_gcc_attribute_visibility_internal;
+ extern f_return_status private_fl_utf_string_append_nulless(const f_utf_string_t source, const f_utf_string_length_t length, f_utf_string_dynamic_t *destination) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_fl_utf_string_append_nulless_) || !defined(_di_fl_utf_string_dynamic_append_nulless_) || !defined(_di_fl_utf_string_mash_nulless_) || !defined(_di_fl_utf_string_dynamic_mash_nulless_)
/**
* @see fl_utf_string_dynamic_partial_compare()
*/
#if !defined(_di_fl_utf_string_compare_) || !defined(_di_fl_utf_string_dynamic_compare_) || !defined(_di_fl_utf_string_dynamic_partial_compare_)
- extern f_return_status private_fl_utf_string_compare(const f_utf_string string1, const f_utf_string string2, const f_utf_string_length offset1, const f_utf_string_length offset2, const f_utf_string_length stop1, const f_utf_string_length stop2) f_gcc_attribute_visibility_internal;
+ extern f_return_status private_fl_utf_string_compare(const f_utf_string_t string1, const f_utf_string_t string2, const f_utf_string_length_t offset1, const f_utf_string_length_t offset2, const f_utf_string_length_t stop1, const f_utf_string_length_t stop2) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_fl_utf_string_compare_) || !defined(_di_fl_utf_string_dynamic_compare_) || !defined(_di_fl_utf_string_dynamic_partial_compare_)
/**
* @see fl_utf_string_dynamic_partial_compare_trim()
*/
#if !defined(_di_fl_utf_string_compare_trim_) || !defined(_di_fl_utf_string_dynamic_compare_trim_) || !defined(_di_fl_utf_string_dynamic_partial_compare_trim_)
- extern f_return_status private_fl_utf_string_compare_trim(const f_utf_string string1, const f_utf_string string2, const f_utf_string_length offset1, const f_utf_string_length offset2, const f_utf_string_length stop1, const f_utf_string_length stop2) f_gcc_attribute_visibility_internal;
+ extern f_return_status private_fl_utf_string_compare_trim(const f_utf_string_t string1, const f_utf_string_t string2, const f_utf_string_length_t offset1, const f_utf_string_length_t offset2, const f_utf_string_length_t stop1, const f_utf_string_length_t stop2) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_fl_utf_string_compare_trim_) || !defined(_di_fl_utf_string_dynamic_compare_trim_) || !defined(_di_fl_utf_string_dynamic_partial_compare_trim_)
/**
* @see fl_utf_string_dynamic_prepend()
*/
#if !defined(_di_fl_utf_string_prepend_) || !defined(_di_fl_utf_string_dynamic_prepend_) || !defined(_di_fl_utf_string_append_mish_) || !defined(_di_fl_utf_string_dynamic_mish_)
- extern f_return_status private_fl_utf_string_prepend(const f_utf_string source, const f_utf_string_length length, f_utf_string_dynamic *destination) f_gcc_attribute_visibility_internal;
+ extern f_return_status private_fl_utf_string_prepend(const f_utf_string_t source, const f_utf_string_length_t length, f_utf_string_dynamic_t *destination) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_fl_utf_string_prepend_) || !defined(_di_fl_utf_string_dynamic_prepend_) || !defined(_di_fl_utf_string_append_mish_) || !defined(_di_fl_utf_string_dynamic_mish_)
/**
* @see fl_utf_string_dynamic_prepend_nulless()
*/
#if !defined(_di_fl_utf_string_prepend_nulless_) || !defined(_di_fl_utf_string_dynamic_prepend_nulless_) || !defined(_di_fl_utf_string_append_mish_) || !defined(_di_fl_utf_string_dynamic_mish_)
- extern f_return_status private_fl_utf_string_prepend_nulless(const f_utf_string source, f_utf_string_length length, f_utf_string_dynamic *destination) f_gcc_attribute_visibility_internal;
+ extern f_return_status private_fl_utf_string_prepend_nulless(const f_utf_string_t source, f_utf_string_length_t length, f_utf_string_dynamic_t *destination) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_fl_utf_string_prepend_nulless_) || !defined(_di_fl_utf_string_dynamic_prepend_nulless_) || !defined(_di_fl_utf_string_append_mish_) || !defined(_di_fl_utf_string_dynamic_mish_)
/**
* @see fl_utf_string_rip()
*/
#if !defined(_di_fl_utf_string_rip_) || !defined(_di_fl_utf_string_dynamic_rip_) || !defined(_di_fl_utf_string_rip_nulless_) || !defined(_di_fl_utf_string_dynamic_rip_nulless_)
- extern f_return_status private_fl_utf_string_rip_find_range(const f_utf_string source, f_utf_string_length *start, f_utf_string_length *stop) f_gcc_attribute_visibility_internal;
+ extern f_return_status private_fl_utf_string_rip_find_range(const f_utf_string_t source, f_utf_string_length_t *start, f_utf_string_length_t *stop) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_fl_utf_string_rip_) || !defined(_di_fl_utf_string_dynamic_rip_) || !defined(_di_fl_utf_string_rip_nulless_) || !defined(_di_fl_utf_string_dynamic_rip_nulless_)
#ifdef __cplusplus
#endif
#ifndef _di_fl_utf_string_append_
- f_return_status fl_utf_string_append(const f_utf_string source, const f_utf_string_length length, f_utf_string_dynamic *destination) {
+ f_return_status fl_utf_string_append(const f_utf_string_t source, const f_utf_string_length_t length, f_utf_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (destination == 0) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
#endif // _di_fl_utf_string_append_
#ifndef _di_fl_utf_string_append_assure_
- f_return_status fl_utf_string_append_assure(const f_utf_string source, const f_utf_string_length length, f_utf_string_dynamic *destination) {
+ f_return_status fl_utf_string_append_assure(const f_utf_string_t source, const f_utf_string_length_t length, f_utf_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (destination == 0) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
return private_fl_utf_string_append(source, length, destination);
}
- f_utf_string_length i = 1;
- f_utf_string_length j = 1;
+ f_utf_string_length_t i = 1;
+ f_utf_string_length_t j = 1;
while (i <= length && j <= destination->used) {
- if (source[length - i] == f_utf_character_eos) {
+ if (source[length - i] == f_utf_character_t_eos) {
i++;
continue;
}
- if (destination->string[destination->used - j] == f_utf_character_eos) {
+ if (destination->string[destination->used - j] == f_utf_character_t_eos) {
j++;
continue;
}
#endif // _di_fl_utf_string_append_assure_
#ifndef _di_fl_utf_string_append_assure_nulless_
- f_return_status fl_utf_string_append_assure_nulless(const f_utf_string source, const f_utf_string_length length, f_utf_string_dynamic *destination) {
+ f_return_status fl_utf_string_append_assure_nulless(const f_utf_string_t source, const f_utf_string_length_t length, f_utf_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (destination == 0) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
return private_fl_utf_string_append_nulless(source, length, destination);
}
- f_utf_string_length i = 1;
- f_utf_string_length j = 1;
+ f_utf_string_length_t i = 1;
+ f_utf_string_length_t j = 1;
while (i <= length && j <= destination->used) {
- if (source[length - i] == f_utf_character_eos) {
+ if (source[length - i] == f_utf_character_t_eos) {
i++;
continue;
}
- if (destination->string[destination->used - j] == f_utf_character_eos) {
+ if (destination->string[destination->used - j] == f_utf_character_t_eos) {
j++;
continue;
}
#endif // _di_fl_utf_string_append_assure_nulless_
#ifndef _di_fl_utf_string_append_nulless_
- f_return_status fl_utf_string_append_nulless(const f_utf_string source, const f_utf_string_length length, f_utf_string_dynamic *destination) {
+ f_return_status fl_utf_string_append_nulless(const f_utf_string_t source, const f_utf_string_length_t length, f_utf_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (destination == 0) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
#endif // _di_fl_utf_string_append_nulless_
#ifndef _di_fl_utf_string_compare_
- f_return_status fl_utf_string_compare(const f_utf_string string1, const f_utf_string string2, const f_utf_string_length length1, const f_utf_string_length length2) {
+ f_return_status fl_utf_string_compare(const f_utf_string_t string1, const f_utf_string_t string2, const f_utf_string_length_t length1, const f_utf_string_length_t length2) {
return private_fl_utf_string_compare(string1, string2, 0, 0, length1, length2);
}
#endif // _di_fl_utf_string_compare_
#ifndef _di_fl_utf_string_compare_trim_
- f_return_status fl_utf_string_compare_trim(const f_utf_string string1, const f_utf_string string2, const f_utf_string_length length1, const f_utf_string_length length2) {
+ f_return_status fl_utf_string_compare_trim(const f_utf_string_t string1, const f_utf_string_t string2, const f_utf_string_length_t length1, const f_utf_string_length_t length2) {
return private_fl_utf_string_compare_trim(string1, string2, 0, 0, length1, length2);
}
#endif // _di_fl_utf_string_compare_trim_
#ifndef _di_fl_utf_string_dynamic_append_
- f_return_status fl_utf_string_dynamic_append(const f_utf_string_static source, f_utf_string_dynamic *destination) {
+ f_return_status fl_utf_string_dynamic_append(const f_utf_string_static_t source, f_utf_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (destination == 0) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
#endif // _di_fl_utf_string_dynamic_append_
#ifndef _di_fl_utf_string_dynamic_append_assure_
- f_return_status fl_utf_string_dynamic_append_assure(const f_utf_string_static source, f_utf_string_dynamic *destination) {
+ f_return_status fl_utf_string_dynamic_append_assure(const f_utf_string_static_t source, f_utf_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (destination == 0) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
return private_fl_utf_string_append(source.string, source.used, destination);
}
- f_utf_string_length i = 1;
- f_utf_string_length j = 1;
+ f_utf_string_length_t i = 1;
+ f_utf_string_length_t j = 1;
while (i <= source.used && j <= destination->used) {
- if (source.string[source.used - i] == f_utf_character_eos) {
+ if (source.string[source.used - i] == f_utf_character_t_eos) {
i++;
continue;
}
- if (destination->string[destination->used - j] == f_utf_character_eos) {
+ if (destination->string[destination->used - j] == f_utf_character_t_eos) {
j++;
continue;
}
#endif // _di_fl_utf_string_dynamic_append_assure_
#ifndef _di_fl_utf_string_dynamic_append_assure_nulless_
- f_return_status fl_utf_string_dynamic_append_assure_nulless(const f_utf_string_static source, f_utf_string_dynamic *destination) {
+ f_return_status fl_utf_string_dynamic_append_assure_nulless(const f_utf_string_static_t source, f_utf_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (destination == 0) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
return private_fl_utf_string_append_nulless(source.string, source.used, destination);
}
- f_utf_string_length i = 1;
- f_utf_string_length j = 1;
+ f_utf_string_length_t i = 1;
+ f_utf_string_length_t j = 1;
while (i <= source.used && j <= destination->used) {
- if (source.string[source.used - i] == f_utf_character_eos) {
+ if (source.string[source.used - i] == f_utf_character_t_eos) {
i++;
continue;
}
- if (destination->string[destination->used - j] == f_utf_character_eos) {
+ if (destination->string[destination->used - j] == f_utf_character_t_eos) {
j++;
continue;
}
#endif // _di_fl_utf_string_dynamic_append_assure_nulless_
#ifndef _di_fl_utf_string_dynamic_append_nulless_
- f_return_status fl_utf_string_dynamic_append_nulless(const f_utf_string_static source, f_utf_string_dynamic *destination) {
+ f_return_status fl_utf_string_dynamic_append_nulless(const f_utf_string_static_t source, f_utf_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (destination == 0) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
#endif // _di_fl_utf_string_dynamic_append_nulless_
#ifndef _di_fl_utf_string_dynamic_compare_
- f_return_status fl_utf_string_dynamic_compare(const f_utf_string_static string1, const f_utf_string_static string2) {
+ f_return_status fl_utf_string_dynamic_compare(const f_utf_string_static_t string1, const f_utf_string_static_t string2) {
return private_fl_utf_string_compare(string1.string, string2.string, 0, 0, string1.used, string2.used);
}
#endif // _di_fl_utf_string_dynamic_compare_
#ifndef _di_f_utf_string_dynamic_compare_trim_
- f_return_status f_utf_string_dynamic_compare_trim(const f_utf_string_static string1, const f_utf_string_static string2) {
+ f_return_status f_utf_string_dynamic_compare_trim(const f_utf_string_static_t string1, const f_utf_string_static_t string2) {
return private_fl_utf_string_compare_trim(string1.string, string2.string, 0, 0, string1.used, string2.used);
}
#endif // _di_f_utf_string_dynamic_compare_trim_
#ifndef _di_fl_utf_string_dynamic_mash_
- f_return_status fl_utf_string_dynamic_mash(const f_utf_string glue, const f_utf_string_length glue_length, const f_utf_string_static source, f_utf_string_dynamic *destination) {
+ f_return_status fl_utf_string_dynamic_mash(const f_utf_string_t glue, const f_utf_string_length_t glue_length, const f_utf_string_static_t source, f_utf_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (destination == 0) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
if (source.used == 0) return F_data_not_eos;
if (glue_length > 0 && destination->used > 0) {
- const f_status status = private_fl_utf_string_append(glue, glue_length, destination);
+ const f_status_t status = private_fl_utf_string_append(glue, glue_length, destination);
if (F_status_is_error(status)) return status;
}
#endif // _di_fl_utf_string_dynamic_mash_
#ifndef _di_fl_utf_string_dynamic_mash_nulless_
- f_return_status fl_utf_string_dynamic_mash_nulless(const f_utf_string glue, const f_utf_string_length glue_length, const f_utf_string_static source, f_utf_string_dynamic *destination) {
+ f_return_status fl_utf_string_dynamic_mash_nulless(const f_utf_string_t glue, const f_utf_string_length_t glue_length, const f_utf_string_static_t source, f_utf_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (destination == 0) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
if (source.used == 0) return F_data_not_eos;
if (glue_length > 0 && destination->used > 0) {
- const f_status status = private_fl_utf_string_append_nulless(glue, glue_length, destination);
+ const f_status_t status = private_fl_utf_string_append_nulless(glue, glue_length, destination);
if (F_status_is_error(status)) return status;
}
#endif // _di_fl_utf_string_dynamic_mash_nulless_
#ifndef _di_fl_utf_string_dynamic_mish_
- f_return_status fl_utf_string_dynamic_mish(const f_utf_string glue, const f_utf_string_length glue_length, const f_utf_string_static source, f_utf_string_dynamic *destination) {
+ f_return_status fl_utf_string_dynamic_mish(const f_utf_string_t glue, const f_utf_string_length_t glue_length, const f_utf_string_static_t source, f_utf_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (destination == 0) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
if (source.used == 0) return F_data_not_eos;
if (glue_length > 0 && destination->used > 0) {
- const f_status status = private_fl_utf_string_prepend(glue, glue_length, destination);
+ const f_status_t status = private_fl_utf_string_prepend(glue, glue_length, destination);
if (F_status_is_error(status)) return status;
}
#endif // _di_fl_utf_string_dynamic_mish_
#ifndef _di_fl_utf_string_dynamic_mish_nulless_
- f_return_status fl_utf_string_dynamic_mish_nulless(const f_utf_string glue, const f_utf_string_length glue_length, const f_utf_string_static source, f_utf_string_dynamic *destination) {
+ f_return_status fl_utf_string_dynamic_mish_nulless(const f_utf_string_t glue, const f_utf_string_length_t glue_length, const f_utf_string_static_t source, f_utf_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (destination == 0) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
if (source.used == 0) return F_data_not_eos;
if (glue_length > 0 && destination->used > 0) {
- const f_status status = private_fl_utf_string_prepend_nulless(glue, glue_length, destination);
+ const f_status_t status = private_fl_utf_string_prepend_nulless(glue, glue_length, destination);
if (F_status_is_error(status)) return status;
}
#endif // _di_fl_utf_string_dynamic_mish_nulless_
#ifndef _di_fl_utf_string_dynamic_partial_append_
- f_return_status fl_utf_string_dynamic_partial_append(const f_utf_string_static source, const f_utf_string_range range, f_utf_string_dynamic *destination) {
+ f_return_status fl_utf_string_dynamic_partial_append(const f_utf_string_static_t source, const f_utf_string_range_t range, f_utf_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (source.used <= range.stop) return F_status_set_error(F_parameter);
if (destination == 0) return F_status_set_error(F_parameter);
#endif // _di_fl_utf_string_dynamic_partial_append_
#ifndef _di_fl_utf_string_dynamic_partial_append_assure_
- f_return_status fl_utf_string_dynamic_partial_append_assure(const f_utf_string_static source, const f_utf_string_range range, f_utf_string_dynamic *destination) {
+ f_return_status fl_utf_string_dynamic_partial_append_assure(const f_utf_string_static_t source, const f_utf_string_range_t range, f_utf_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (source.used <= range.stop) return F_status_set_error(F_parameter);
if (destination == 0) return F_status_set_error(F_parameter);
if (source.used == 0) return F_data_not_eos;
if (range.start > range.stop) return F_data_not_stop;
- const f_utf_string_length length = (range.stop - range.start) + 1;
+ const f_utf_string_length_t length = (range.stop - range.start) + 1;
if (destination->used < length) {
return private_fl_utf_string_append(source.string + range.start, length, destination);
}
- f_utf_string_length i = 1;
- f_utf_string_length j = 1;
+ f_utf_string_length_t i = 1;
+ f_utf_string_length_t j = 1;
while (i <= length && j <= destination->used) {
- if (source.string[range.stop - i] == f_utf_character_eos) {
+ if (source.string[range.stop - i] == f_utf_character_t_eos) {
i++;
continue;
}
- if (destination->string[destination->used - j] == f_utf_character_eos) {
+ if (destination->string[destination->used - j] == f_utf_character_t_eos) {
j++;
continue;
}
#endif // _di_fl_utf_string_dynamic_partial_append_assure_
#ifndef _di_fl_utf_string_dynamic_partial_append_assure_nulless_
- f_return_status fl_utf_string_dynamic_partial_append_assure_nulless(const f_utf_string_static source, const f_utf_string_range range, f_utf_string_dynamic *destination) {
+ f_return_status fl_utf_string_dynamic_partial_append_assure_nulless(const f_utf_string_static_t source, const f_utf_string_range_t range, f_utf_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (source.used <= range.stop) return F_status_set_error(F_parameter);
if (destination == 0) return F_status_set_error(F_parameter);
if (source.used == 0) return F_data_not_eos;
if (range.start > range.stop) return F_data_not_stop;
- const f_utf_string_length length = (range.stop - range.start) + 1;
+ const f_utf_string_length_t length = (range.stop - range.start) + 1;
if (destination->used < length) {
return private_fl_utf_string_append_nulless(source.string + range.start, length, destination);
}
- f_utf_string_length i = 1;
- f_utf_string_length j = 1;
+ f_utf_string_length_t i = 1;
+ f_utf_string_length_t j = 1;
while (i <= length && j <= destination->used) {
- if (source.string[range.stop - i] == f_utf_character_eos) {
+ if (source.string[range.stop - i] == f_utf_character_t_eos) {
i++;
continue;
}
- if (destination->string[destination->used - j] == f_utf_character_eos) {
+ if (destination->string[destination->used - j] == f_utf_character_t_eos) {
j++;
continue;
}
#endif // _di_fl_utf_string_dynamic_partial_append_assure_nulless_
#ifndef _di_fl_utf_string_dynamic_partial_append_nulless_
- f_return_status fl_utf_string_dynamic_partial_append_nulless(const f_utf_string_static source, const f_utf_string_range range, f_utf_string_dynamic *destination) {
+ f_return_status fl_utf_string_dynamic_partial_append_nulless(const f_utf_string_static_t source, const f_utf_string_range_t range, f_utf_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (source.used <= range.stop) return F_status_set_error(F_parameter);
if (destination == 0) return F_status_set_error(F_parameter);
#endif // _di_fl_utf_string_dynamic_partial_append_nulless_
#ifndef _di_fl_utf_string_dynamic_partial_compare_
- f_return_status fl_utf_string_dynamic_partial_compare(const f_utf_string_static string1, const f_utf_string_static string2, const f_utf_string_range range1, const f_utf_string_range range2) {
+ f_return_status fl_utf_string_dynamic_partial_compare(const f_utf_string_static_t string1, const f_utf_string_static_t string2, const f_utf_string_range_t range1, const f_utf_string_range_t range2) {
#ifndef _di_level_1_parameter_checking_
if (string1.used <= range1.stop) return F_status_set_error(F_parameter);
if (string2.used <= range2.stop) return F_status_set_error(F_parameter);
#endif // _di_fl_utf_string_dynamic_partial_compare_
#ifndef _di_fl_utf_string_dynamic_partial_compare_trim_
- f_return_status fl_utf_string_dynamic_partial_comparetrim(const f_utf_string_static string1, const f_utf_string_static string2, const f_utf_string_range range1, const f_utf_string_range range2) {
+ f_return_status fl_utf_string_dynamic_partial_comparetrim(const f_utf_string_static_t string1, const f_utf_string_static_t string2, const f_utf_string_range_t range1, const f_utf_string_range_t range2) {
#ifndef _di_level_1_parameter_checking_
if (string1.used <= range1.stop) return F_status_set_error(F_parameter);
if (string2.used <= range2.stop) return F_status_set_error(F_parameter);
#endif // _di_fl_utf_string_dynamic_partial_compare_trim_
#ifndef _di_fl_utf_string_dynamic_partial_mash_
- f_return_status fl_utf_string_dynamic_partial_mash(const f_utf_string glue, const f_utf_string_length glue_length, const f_utf_string_static source, const f_utf_string_range range, f_utf_string_dynamic *destination) {
+ f_return_status fl_utf_string_dynamic_partial_mash(const f_utf_string_t glue, const f_utf_string_length_t glue_length, const f_utf_string_static_t source, const f_utf_string_range_t range, f_utf_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (source.used <= range.stop) return F_status_set_error(F_parameter);
if (destination == 0) return F_status_set_error(F_parameter);
if (range.start > range.stop) return F_data_not_stop;
if (glue_length > 0 && destination->used > 0) {
- f_status status = private_fl_utf_string_append(glue, glue_length, destination);
+ f_status_t status = private_fl_utf_string_append(glue, glue_length, destination);
if (F_status_is_error(status)) return status;
}
#endif // _di_fl_utf_string_dynamic_partial_mash_
#ifndef _di_fl_utf_string_dynamic_partial_mash_nulless_
- f_return_status fl_utf_string_dynamic_partial_mash_nulless(const f_utf_string glue, const f_utf_string_length glue_length, const f_utf_string_static source, const f_utf_string_range range, f_utf_string_dynamic *destination) {
+ f_return_status fl_utf_string_dynamic_partial_mash_nulless(const f_utf_string_t glue, const f_utf_string_length_t glue_length, const f_utf_string_static_t source, const f_utf_string_range_t range, f_utf_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (source.used <= range.stop) return F_status_set_error(F_parameter);
if (destination == 0) return F_status_set_error(F_parameter);
if (range.start > range.stop) return F_data_not_stop;
if (glue_length > 0 && destination->used > 0) {
- f_status status = private_fl_utf_string_append_nulless(glue, glue_length, destination);
+ f_status_t status = private_fl_utf_string_append_nulless(glue, glue_length, destination);
if (F_status_is_error(status)) return status;
}
#endif // _di_fl_utf_string_dynamic_partial_mash_nulless_
#ifndef _di_fl_utf_string_dynamic_partial_mish_
- f_return_status fl_utf_string_dynamic_partial_mish(const f_utf_string glue, const f_utf_string_length glue_length, const f_utf_string_static source, const f_utf_string_range range, f_utf_string_dynamic *destination) {
+ f_return_status fl_utf_string_dynamic_partial_mish(const f_utf_string_t glue, const f_utf_string_length_t glue_length, const f_utf_string_static_t source, const f_utf_string_range_t range, f_utf_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (source.used <= range.stop) return F_status_set_error(F_parameter);
if (destination == 0) return F_status_set_error(F_parameter);
if (range.start > range.stop) return F_data_not_stop;
if (glue_length > 0 && destination->used > 0) {
- f_status status = private_fl_utf_string_prepend(glue, glue_length, destination);
+ f_status_t status = private_fl_utf_string_prepend(glue, glue_length, destination);
if (F_status_is_error(status)) return status;
}
#endif // _di_fl_utf_string_dynamic_partial_mish_
#ifndef _di_fl_utf_string_dynamic_partial_mish_nulless_
- f_return_status fl_utf_string_dynamic_partial_mish_nulless(const f_utf_string glue, const f_utf_string_length glue_length, const f_utf_string_static source, const f_utf_string_range range, f_utf_string_dynamic *destination) {
+ f_return_status fl_utf_string_dynamic_partial_mish_nulless(const f_utf_string_t glue, const f_utf_string_length_t glue_length, const f_utf_string_static_t source, const f_utf_string_range_t range, f_utf_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (source.used <= range.stop) return F_status_set_error(F_parameter);
if (destination == 0) return F_status_set_error(F_parameter);
if (range.start > range.stop) return F_data_not_stop;
if (glue_length > 0 && destination->used > 0) {
- f_status status = private_fl_utf_string_prepend_nulless(glue, glue_length, destination);
+ f_status_t status = private_fl_utf_string_prepend_nulless(glue, glue_length, destination);
if (F_status_is_error(status)) return status;
}
#endif // _di_fl_utf_string_dynamic_partial_mish_nulless_
#ifndef _di_fl_utf_string_dynamic_partial_prepend_
- f_return_status fl_utf_string_dynamic_partial_prepend(const f_utf_string_static source, const f_utf_string_range range, f_utf_string_dynamic *destination) {
+ f_return_status fl_utf_string_dynamic_partial_prepend(const f_utf_string_static_t source, const f_utf_string_range_t range, f_utf_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (source.used <= range.stop) return F_status_set_error(F_parameter);
if (destination == 0) return F_status_set_error(F_parameter);
#endif // _di_fl_utf_string_dynamic_partial_prepend_
#ifndef _di_fl_utf_string_dynamic_partial_prepend_assure_
- f_return_status fl_utf_string_dynamic_partial_prepend_assure(const f_utf_string_static source, const f_utf_string_range range, f_utf_string_dynamic *destination) {
+ f_return_status fl_utf_string_dynamic_partial_prepend_assure(const f_utf_string_static_t source, const f_utf_string_range_t range, f_utf_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (source.used <= range.stop) return F_status_set_error(F_parameter);
if (destination == 0) return F_status_set_error(F_parameter);
if (source.used == 0) return F_data_not_eos;
if (range.start > range.stop) return F_data_not_stop;
- const f_utf_string_length length = (range.stop - range.start) + 1;
+ const f_utf_string_length_t length = (range.stop - range.start) + 1;
if (destination->used < length) {
return private_fl_utf_string_prepend(source.string + range.start, length, destination);
}
- f_utf_string_length i = 0;
- f_utf_string_length j = 0;
+ f_utf_string_length_t i = 0;
+ f_utf_string_length_t j = 0;
while (i < length && j < destination->used) {
- if (source.string[i + range.start] == f_utf_character_eos) {
+ if (source.string[i + range.start] == f_utf_character_t_eos) {
i++;
continue;
}
- if (destination->string[j] == f_utf_character_eos) {
+ if (destination->string[j] == f_utf_character_t_eos) {
j++;
continue;
}
#endif // _di_fl_utf_string_dynamic_partial_prepend_assure_
#ifndef _di_fl_utf_string_dynamic_partial_prepend_assure_nulless_
- f_return_status fl_utf_string_dynamic_partial_prepend_assure_nulless(const f_utf_string_static source, const f_utf_string_range range, f_utf_string_dynamic *destination) {
+ f_return_status fl_utf_string_dynamic_partial_prepend_assure_nulless(const f_utf_string_static_t source, const f_utf_string_range_t range, f_utf_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (source.used <= range.stop) return F_status_set_error(F_parameter);
if (destination == 0) return F_status_set_error(F_parameter);
if (source.used == 0) return F_data_not_eos;
if (range.start > range.stop) return F_data_not_stop;
- const f_utf_string_length length = (range.stop - range.start) + 1;
+ const f_utf_string_length_t length = (range.stop - range.start) + 1;
if (destination->used < length) {
return private_fl_utf_string_prepend_nulless(source.string + range.start, length, destination);
}
- f_utf_string_length i = 0;
- f_utf_string_length j = 0;
+ f_utf_string_length_t i = 0;
+ f_utf_string_length_t j = 0;
while (i < length && j < destination->used) {
- if (source.string[i + range.start] == f_utf_character_eos) {
+ if (source.string[i + range.start] == f_utf_character_t_eos) {
i++;
continue;
}
- if (destination->string[j] == f_utf_character_eos) {
+ if (destination->string[j] == f_utf_character_t_eos) {
j++;
continue;
}
#endif // _di_fl_utf_string_dynamic_partial_prepend_assure_nulless_
#ifndef _di_fl_utf_string_dynamic_partial_prepend_nulless_
- f_return_status fl_utf_string_dynamic_partial_prepend_nulless(const f_utf_string_static source, const f_utf_string_range range, f_utf_string_dynamic *destination) {
+ f_return_status fl_utf_string_dynamic_partial_prepend_nulless(const f_utf_string_static_t source, const f_utf_string_range_t range, f_utf_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (source.used <= range.stop) return F_status_set_error(F_parameter);
if (destination == 0) return F_status_set_error(F_parameter);
#endif // _di_fl_utf_string_dynamic_partial_prepend_nulless_
#ifndef _di_fl_utf_string_dynamic_prepend_
- f_return_status fl_utf_string_dynamic_prepend(const f_utf_string_static source, f_utf_string_dynamic *destination) {
+ f_return_status fl_utf_string_dynamic_prepend(const f_utf_string_static_t source, f_utf_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (destination == 0) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
#endif // _di_fl_utf_string_dynamic_prepend_
#ifndef _di_fl_utf_string_dynamic_prepend_assure_
- f_return_status fl_utf_string_dynamic_prepend_assure(const f_utf_string_static source, f_utf_string_dynamic *destination) {
+ f_return_status fl_utf_string_dynamic_prepend_assure(const f_utf_string_static_t source, f_utf_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (destination == 0) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
return private_fl_utf_string_prepend(source.string, source.used, destination);
}
- f_utf_string_length i = 0;
- f_utf_string_length j = 0;
+ f_utf_string_length_t i = 0;
+ f_utf_string_length_t j = 0;
while (i < source.used && j < destination->used) {
- if (source.string[i] == f_utf_character_eos) {
+ if (source.string[i] == f_utf_character_t_eos) {
i++;
continue;
}
- if (destination->string[j] == f_utf_character_eos) {
+ if (destination->string[j] == f_utf_character_t_eos) {
j++;
continue;
}
#endif // _di_fl_utf_string_dynamic_prepend_assure_
#ifndef _di_fl_utf_string_dynamic_prepend_assure_nulless_
- f_return_status fl_utf_string_dynamic_prepend_assure_nulless(const f_utf_string_static source, f_utf_string_dynamic *destination) {
+ f_return_status fl_utf_string_dynamic_prepend_assure_nulless(const f_utf_string_static_t source, f_utf_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (destination == 0) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
return private_fl_utf_string_prepend_nulless(source.string, source.used, destination);
}
- f_utf_string_length i = 0;
- f_utf_string_length j = 0;
+ f_utf_string_length_t i = 0;
+ f_utf_string_length_t j = 0;
while (i < source.used && j < destination->used) {
- if (source.string[i] == f_utf_character_eos) {
+ if (source.string[i] == f_utf_character_t_eos) {
i++;
continue;
}
- if (destination->string[j] == f_utf_character_eos) {
+ if (destination->string[j] == f_utf_character_t_eos) {
j++;
continue;
}
#endif // _di_fl_utf_string_dynamic_prepend_assure_nulless_
#ifndef _di_fl_utf_string_dynamic_prepend_nulless_
- f_return_status fl_utf_string_dynamic_prepend_nulless(const f_utf_string_static source, f_utf_string_dynamic *destination) {
+ f_return_status fl_utf_string_dynamic_prepend_nulless(const f_utf_string_static_t source, f_utf_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (destination == 0) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
#endif // _di_fl_utf_string_dynamic_prepend_nulless_
#ifndef _di_fl_utf_string_dynamic_rip_
- f_return_status fl_utf_string_dynamic_rip(const f_utf_string_static source, const f_utf_string_range range, f_utf_string_dynamic *destination) {
+ f_return_status fl_utf_string_dynamic_rip(const f_utf_string_static_t source, const f_utf_string_range_t range, f_utf_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (source.used <= range.start) return F_status_set_error(F_parameter);
if (source.used <= range.stop) return F_status_set_error(F_parameter);
#endif // _di_fl_utf_string_dynamic_rip_
#ifndef _di_fl_utf_string_dynamic_rip_nulless_
- f_return_status fl_utf_string_dynamic_rip_nulless(const f_utf_string_static source, const f_utf_string_range range, f_utf_string_dynamic *destination) {
+ f_return_status fl_utf_string_dynamic_rip_nulless(const f_utf_string_static_t source, const f_utf_string_range_t range, f_utf_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (source.used <= range.start) return F_status_set_error(F_parameter);
if (source.used <= range.stop) return F_status_set_error(F_parameter);
#endif // _di_fl_utf_string_dynamic_rip_nulless_
#ifndef _di_fl_utf_string_dynamic_seek_line_to_
- f_return_status fl_utf_string_dynamic_seek_line_to(const f_utf_string_static buffer, f_utf_string_range *range, const f_utf_character seek_to_this) {
+ f_return_status fl_utf_string_dynamic_seek_line_to(const f_utf_string_static_t buffer, f_utf_string_range_t *range, const f_utf_character_t seek_to_this) {
#ifndef _di_level_1_parameter_checking_
if (range == 0) return F_status_set_error(F_parameter);
if (buffer.used <= range->start) return F_status_set_error(F_parameter);
if (buffer.used == 0) return F_data_not_eos;
if (range->start > range->stop) return F_data_not_stop;
- if (f_macro_utf_character_width_is(buffer.string[range->start]) == 1) {
+ if (f_macro_utf_character_t_width_is(buffer.string[range->start]) == 1) {
return F_status_set_error(F_utf);
}
while (buffer.string[range->start] != seek_to_this) {
- if (buffer.string[range->start] == f_utf_character_eol) return F_none_eol;
+ if (buffer.string[range->start] == f_utf_character_t_eol) return F_none_eol;
range->start++;
- if (f_macro_utf_character_width_is(buffer.string[range->start]) == 1) return F_status_set_error(F_utf);
+ if (f_macro_utf_character_t_width_is(buffer.string[range->start]) == 1) return F_status_set_error(F_utf);
if (range->start >= buffer.used) return F_none_eos;
if (range->start > range->stop) return F_none_stop;
#endif // _di_fl_utf_string_dynamic_seek_line_to_
#ifndef _di_fl_utf_string_dynamic_seek_line_to_char_
- f_return_status fl_utf_string_dynamic_seek_line_to_char(const f_utf_string_static buffer, f_utf_string_range *range, const int8_t seek_to_this) {
+ f_return_status fl_utf_string_dynamic_seek_line_to_char(const f_utf_string_static_t buffer, f_utf_string_range_t *range, const int8_t seek_to_this) {
#ifndef _di_level_1_parameter_checking_
if (range == 0) return F_status_set_error(F_parameter);
if (buffer.used <= range->start) return F_status_set_error(F_parameter);
if (buffer.used == 0) return F_data_not_eos;
if (range->start > range->stop) return F_data_not_stop;
- f_utf_character seek_to_character = seek_to_this << 24;
+ f_utf_character_t seek_to_character = seek_to_this << 24;
- if (f_macro_utf_character_width_is(buffer.string[range->start]) == 1) {
+ if (f_macro_utf_character_t_width_is(buffer.string[range->start]) == 1) {
return F_status_set_error(F_utf);
}
while (buffer.string[range->start] != seek_to_character) {
- if (buffer.string[range->start] == f_utf_character_eol) return F_none_eol;
+ if (buffer.string[range->start] == f_utf_character_t_eol) return F_none_eol;
range->start++;
- if (f_macro_utf_character_width_is(buffer.string[range->start]) == 1) {
+ if (f_macro_utf_character_t_width_is(buffer.string[range->start]) == 1) {
return F_status_set_error(F_utf);
}
#endif // _di_fl_utf_string_dynamic_seek_line_to_character_
#ifndef _di_fl_utf_string_dynamic_seek_line_until_graph_
- f_return_status fl_utf_string_dynamic_seek_line_until_graph(const f_utf_string_static buffer, f_utf_string_range *range, const f_utf_character placeholder) {
+ f_return_status fl_utf_string_dynamic_seek_line_until_graph(const f_utf_string_static_t buffer, f_utf_string_range_t *range, const f_utf_character_t placeholder) {
#ifndef _di_level_1_parameter_checking_
if (range == 0) return F_status_set_error(F_parameter);
if (buffer.used <= range->start) return F_status_set_error(F_parameter);
if (buffer.used == 0) return F_data_not_eos;
if (range->start > range->stop) return F_data_not_stop;
- f_status status = F_none;
+ f_status_t status = F_none;
- if (f_macro_utf_character_width_is(buffer.string[range->start]) == 1) {
+ if (f_macro_utf_character_t_width_is(buffer.string[range->start]) == 1) {
return F_status_set_error(F_utf);
}
while (buffer.string[range->start] == placeholder || (status = f_utf_character_is_graph(buffer.string[range->start])) == F_false) {
if (F_status_is_error(status)) return status;
- if (buffer.string[range->start] == f_utf_character_eol) return F_none_eol;
+ if (buffer.string[range->start] == f_utf_character_t_eol) return F_none_eol;
range->start++;
- if (f_macro_utf_character_width_is(buffer.string[range->start]) == 1) {
+ if (f_macro_utf_character_t_width_is(buffer.string[range->start]) == 1) {
return F_status_set_error(F_utf);
}
#endif // _di_fl_utf_string_dynamic_seek_line_until_graph_
#ifndef _di_fl_utf_string_dynamic_seek_line_until_non_graph_
- f_return_status fl_utf_string_dynamic_seek_line_until_non_graph(const f_utf_string_static buffer, f_utf_string_range *range, const f_utf_character placeholder) {
+ f_return_status fl_utf_string_dynamic_seek_line_until_non_graph(const f_utf_string_static_t buffer, f_utf_string_range_t *range, const f_utf_character_t placeholder) {
#ifndef _di_level_1_parameter_checking_
if (range == 0) return F_status_set_error(F_parameter);
if (buffer.used <= range->start) return F_status_set_error(F_parameter);
if (buffer.used == 0) return F_data_not_eos;
if (range->start > range->stop) return F_data_not_stop;
- f_status status = F_none;
+ f_status_t status = F_none;
- if (f_macro_utf_character_width_is(buffer.string[range->start]) == 1) {
+ if (f_macro_utf_character_t_width_is(buffer.string[range->start]) == 1) {
return F_status_set_error(F_utf);
}
while (buffer.string[range->start] == placeholder || (status = f_utf_character_is_whitespace(buffer.string[range->start])) == F_false) {
if (F_status_is_error(status)) return status;
- if (buffer.string[range->start] == f_utf_character_eol) return F_none_eol;
+ if (buffer.string[range->start] == f_utf_character_t_eol) return F_none_eol;
range->start++;
- if (f_macro_utf_character_width_is(buffer.string[range->start]) == 1) {
+ if (f_macro_utf_character_t_width_is(buffer.string[range->start]) == 1) {
return F_status_set_error(F_utf);
}
#endif // _di_fl_utf_string_dynamic_seek_line_until_non_graph_
#ifndef _di_fl_utf_string_dynamic_seek_to_
- f_return_status fl_utf_string_dynamic_seek_to(const f_utf_string_static buffer, f_utf_string_range *range, const f_utf_character seek_to_this) {
+ f_return_status fl_utf_string_dynamic_seek_to(const f_utf_string_static_t buffer, f_utf_string_range_t *range, const f_utf_character_t seek_to_this) {
#ifndef _di_level_1_parameter_checking_
if (range == 0) return F_status_set_error(F_parameter);
if (buffer.used <= range->start) return F_status_set_error(F_parameter);
if (buffer.used == 0) return F_data_not_eos;
if (range->start > range->stop) return F_data_not_stop;
- if (f_macro_utf_character_width_is(buffer.string[range->start]) == 1) {
+ if (f_macro_utf_character_t_width_is(buffer.string[range->start]) == 1) {
return F_status_set_error(F_utf);
}
while (buffer.string[range->start] != seek_to_this) {
range->start++;
- if (f_macro_utf_character_width_is(buffer.string[range->start]) == 1) {
+ if (f_macro_utf_character_t_width_is(buffer.string[range->start]) == 1) {
return F_status_set_error(F_utf);
}
#endif // _di_fl_utf_string_dynamic_seek_to_
#ifndef _di_fl_utf_string_dynamic_seek_to_char_
- f_return_status fl_utf_string_dynamic_seek_to_char(const f_utf_string_static buffer, f_utf_string_range *range, const int8_t seek_to_this) {
+ f_return_status fl_utf_string_dynamic_seek_to_char(const f_utf_string_static_t buffer, f_utf_string_range_t *range, const int8_t seek_to_this) {
#ifndef _di_level_1_parameter_checking_
if (range == 0) return F_status_set_error(F_parameter);
if (buffer.used <= range->start) return F_status_set_error(F_parameter);
if (buffer.used == 0) return F_data_not_eos;
if (range->start > range->stop) return F_data_not_stop;
- f_utf_character seek_to_character = seek_to_this << 24;
+ f_utf_character_t seek_to_character = seek_to_this << 24;
- if (f_macro_utf_character_width_is(buffer.string[range->start]) == 1) {
+ if (f_macro_utf_character_t_width_is(buffer.string[range->start]) == 1) {
return F_status_set_error(F_utf);
}
while (buffer.string[range->start] != seek_to_character) {
range->start++;
- if (f_macro_utf_character_width_is(buffer.string[range->start]) == 1) {
+ if (f_macro_utf_character_t_width_is(buffer.string[range->start]) == 1) {
return F_status_set_error(F_utf);
}
#endif // _di_fl_utf_string_dynamic_seek_to_char_
#ifndef _di_fl_utf_string_dynamic_terminate_
- f_return_status fl_utf_string_dynamic_terminate(f_utf_string_dynamic *destination) {
+ f_return_status fl_utf_string_dynamic_terminate(f_utf_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (destination == 0) return F_status_set_error(F_parameter);
if (destination->used > destination->size) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- if (destination->used > 0 && destination->string[destination->used - 1] == f_utf_character_eos) {
+ if (destination->used > 0 && destination->string[destination->used - 1] == f_utf_character_t_eos) {
return F_none;
}
- if (destination->used == f_utf_string_length_size) {
+ if (destination->used == f_utf_string_length_t_size) {
return F_status_set_error(F_string_too_large);
}
- const f_utf_string_length total = destination->used + 1;
+ const f_utf_string_length_t total = destination->used + 1;
if (total > destination->size) {
- f_status status = F_none;
+ f_status_t status = F_none;
- f_macro_string_dynamic_resize(status, (*destination), total);
+ f_macro_string_dynamic_t_resize(status, (*destination), total);
if (F_status_is_error(status)) return status;
}
- destination->string[destination->used] = f_utf_character_eos;
+ destination->string[destination->used] = f_utf_character_t_eos;
destination->used = total;
return F_none;
#endif // _di_fl_utf_string_dynamic_terminate_
#ifndef _di_fl_utf_string_dynamic_terminate_after_
- f_return_status fl_utf_string_dynamic_terminate_after(f_utf_string_dynamic *destination) {
+ f_return_status fl_utf_string_dynamic_terminate_after(f_utf_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (destination == 0) return F_status_set_error(F_parameter);
if (destination->used > destination->size) return F_status_set_error(F_parameter);
} // for
}
- if (destination->used == f_utf_string_length_size) {
+ if (destination->used == f_utf_string_length_t_size) {
return F_status_set_error(F_string_too_large);
}
- const f_utf_string_length total = destination->used + 1;
+ const f_utf_string_length_t total = destination->used + 1;
if (total > destination->size) {
- f_status status = F_none;
+ f_status_t status = F_none;
- f_macro_string_dynamic_resize(status, (*destination), total);
+ f_macro_string_dynamic_t_resize(status, (*destination), total);
if (F_status_is_error(status)) return status;
}
#endif // _di_fl_utf_string_dynamic_terminate_after_
#ifndef _di_fl_utf_string_mash_
- f_return_status fl_utf_string_mash(const f_utf_string glue, const f_utf_string_length glue_length, const f_utf_string source, const f_utf_string_length length, f_utf_string_dynamic *destination) {
+ f_return_status fl_utf_string_mash(const f_utf_string_t glue, const f_utf_string_length_t glue_length, const f_utf_string_t source, const f_utf_string_length_t length, f_utf_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (destination == 0) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
if (length == 0) return F_data_not_eos;
if (glue_length > 0 && destination->used > 0) {
- f_status status = private_fl_utf_string_append(glue, glue_length, destination);
+ f_status_t status = private_fl_utf_string_append(glue, glue_length, destination);
if (F_status_is_error(status)) return status;
}
#endif // _di_fl_utf_string_mash_
#ifndef _di_fl_utf_string_mash_nulless_
- f_return_status fl_utf_string_mash_nulless(const f_utf_string glue, const f_utf_string_length glue_length, const f_utf_string source, const f_utf_string_length length, f_utf_string_dynamic *destination) {
+ f_return_status fl_utf_string_mash_nulless(const f_utf_string_t glue, const f_utf_string_length_t glue_length, const f_utf_string_t source, const f_utf_string_length_t length, f_utf_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (destination == 0) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
if (length == 0) return F_data_not_eos;
if (glue_length > 0 && destination->used > 0) {
- f_status status = private_fl_utf_string_append_nulless(glue, glue_length, destination);
+ f_status_t status = private_fl_utf_string_append_nulless(glue, glue_length, destination);
if (F_status_is_error(status)) return status;
}
#endif // _di_fl_utf_string_mash_nulless_
#ifndef _di_fl_utf_string_mish_
- f_return_status fl_utf_string_mish(const f_utf_string glue, const f_utf_string_length glue_length, const f_utf_string source, const f_utf_string_length length, f_utf_string_dynamic *destination) {
+ f_return_status fl_utf_string_mish(const f_utf_string_t glue, const f_utf_string_length_t glue_length, const f_utf_string_t source, const f_utf_string_length_t length, f_utf_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (destination == 0) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
if (length == 0) return F_data_not_eos;
if (glue_length > 0 && destination->used > 0) {
- f_status status = private_fl_utf_string_prepend(glue, glue_length, destination);
+ f_status_t status = private_fl_utf_string_prepend(glue, glue_length, destination);
if (F_status_is_error(status)) return status;
}
#endif // _di_fl_utf_string_mish_
#ifndef _di_fl_utf_string_mish_nulless_
- f_return_status fl_utf_string_mish_nulless(const f_utf_string glue, const f_utf_string_length glue_length, const f_utf_string source, const f_utf_string_length length, f_utf_string_dynamic *destination) {
+ f_return_status fl_utf_string_mish_nulless(const f_utf_string_t glue, const f_utf_string_length_t glue_length, const f_utf_string_t source, const f_utf_string_length_t length, f_utf_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (destination == 0) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
if (length == 0) return F_data_not_eos;
if (glue_length > 0 && destination->used > 0) {
- f_status status = private_fl_utf_string_prepend_nulless(glue, glue_length, destination);
+ f_status_t status = private_fl_utf_string_prepend_nulless(glue, glue_length, destination);
if (F_status_is_error(status)) return status;
}
#endif // _di_fl_utf_string_mish_nulless_
#ifndef _di_fl_utf_string_prepend_
- f_return_status fl_utf_string_prepend(const f_utf_string source, const f_utf_string_length length, f_utf_string_dynamic *destination) {
+ f_return_status fl_utf_string_prepend(const f_utf_string_t source, const f_utf_string_length_t length, f_utf_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (destination == 0) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
#endif // _di_fl_utf_string_prepend_
#ifndef _di_fl_utf_string_prepend_assure_
- f_return_status fl_utf_string_prepend_assure(const f_utf_string source, const f_utf_string_length length, f_utf_string_dynamic *destination) {
+ f_return_status fl_utf_string_prepend_assure(const f_utf_string_t source, const f_utf_string_length_t length, f_utf_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (destination == 0) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
return private_fl_utf_string_prepend(source, length, destination);
}
- f_utf_string_length i = 0;
- f_utf_string_length j = 0;
+ f_utf_string_length_t i = 0;
+ f_utf_string_length_t j = 0;
while (i < length && j < destination->used) {
- if (source[i] == f_utf_character_eos) {
+ if (source[i] == f_utf_character_t_eos) {
i++;
continue;
}
- if (destination->string[j] == f_utf_character_eos) {
+ if (destination->string[j] == f_utf_character_t_eos) {
j++;
continue;
}
#endif // _di_fl_utf_string_prepend_assure_
#ifndef _di_fl_utf_string_prepend_assure_nulless_
- f_return_status fl_utf_string_prepend_assure_nulless(const f_utf_string source, const f_utf_string_length length, f_utf_string_dynamic *destination) {
+ f_return_status fl_utf_string_prepend_assure_nulless(const f_utf_string_t source, const f_utf_string_length_t length, f_utf_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (destination == 0) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
return private_fl_utf_string_prepend_nulless(source, length, destination);
}
- f_utf_string_length i = 0;
- f_utf_string_length j = 0;
+ f_utf_string_length_t i = 0;
+ f_utf_string_length_t j = 0;
while (i < length && j < destination->used) {
- if (source[i] == f_utf_character_eos) {
+ if (source[i] == f_utf_character_t_eos) {
i++;
continue;
}
- if (destination->string[j] == f_utf_character_eos) {
+ if (destination->string[j] == f_utf_character_t_eos) {
j++;
continue;
}
#endif // _di_fl_utf_string_prepend_assure_nulless_
#ifndef _di_fl_utf_string_prepend_nulless_
- f_return_status fl_utf_string_prepend_nulless(const f_utf_string source, const f_utf_string_length length, f_utf_string_dynamic *destination) {
+ f_return_status fl_utf_string_prepend_nulless(const f_utf_string_t source, const f_utf_string_length_t length, f_utf_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (destination == 0) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
#endif // _di_fl_utf_string_prepend_nulless_
#ifndef _di_fl_utf_string_rip_
- f_return_status fl_utf_string_rip(const f_utf_string source, const f_utf_string_length length, f_utf_string_dynamic *destination) {
+ f_return_status fl_utf_string_rip(const f_utf_string_t source, const f_utf_string_length_t length, f_utf_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (destination == 0) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
if (length == 0) return F_data_not_eos;
- f_utf_string_length begin = 0;
- f_utf_string_length end = length - 1;
+ f_utf_string_length_t begin = 0;
+ f_utf_string_length_t end = length - 1;
- f_status status = private_fl_utf_string_rip_find_range(source, &begin, &end);
+ f_status_t status = private_fl_utf_string_rip_find_range(source, &begin, &end);
if (F_status_is_error(status)) return status;
if (status == F_data_not) return status;
#endif // _di_fl_utf_string_rip_
#ifndef _di_fl_utf_string_rip_nulless_
- f_return_status fl_utf_string_rip_nulless(const f_utf_string source, const f_utf_string_length length, f_utf_string_dynamic *destination) {
+ f_return_status fl_utf_string_rip_nulless(const f_utf_string_t source, const f_utf_string_length_t length, f_utf_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
if (destination == 0) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
if (length == 0) return F_data_not_eos;
- f_utf_string_length begin = 0;
- f_utf_string_length end = length - 1;
+ f_utf_string_length_t begin = 0;
+ f_utf_string_length_t end = length - 1;
- f_status status = private_fl_utf_string_rip_find_range(source, &begin, &end);
+ f_status_t status = private_fl_utf_string_rip_find_range(source, &begin, &end);
if (F_status_is_error(status)) return status;
if (status == F_data_not) return status;
#endif // _di_fl_utf_string_rip_nulless_
#ifndef _di_fl_utf_string_seek_line_to_
- f_return_status fl_utf_string_seek_line_to(const f_utf_string string, f_utf_string_range *range, const f_utf_character seek_to_this) {
+ f_return_status fl_utf_string_seek_line_to(const f_utf_string_t string, f_utf_string_range_t *range, const f_utf_character_t seek_to_this) {
#ifndef _di_level_1_parameter_checking_
if (range == 0) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
if (range->start > range->stop) return F_data_not_stop;
- if (f_macro_utf_character_width_is(string[range->start]) == 1) {
+ if (f_macro_utf_character_t_width_is(string[range->start]) == 1) {
return F_status_set_error(F_utf);
}
while (string[range->start] != seek_to_this) {
- if (string[range->start] == f_utf_character_eol) return F_none_eol;
+ if (string[range->start] == f_utf_character_t_eol) return F_none_eol;
range->start++;
- if (f_macro_utf_character_width_is(string[range->start]) == 1) {
+ if (f_macro_utf_character_t_width_is(string[range->start]) == 1) {
return F_status_set_error(F_utf);
}
#endif // _di_fl_utf_string_seek_line_to_
#ifndef _di_fl_utf_string_seek_line_to_char_
- f_return_status fl_utf_string_seek_line_to_char(const f_utf_string string, f_utf_string_range *range, const int8_t seek_to_this) {
+ f_return_status fl_utf_string_seek_line_to_char(const f_utf_string_t string, f_utf_string_range_t *range, const int8_t seek_to_this) {
#ifndef _di_level_1_parameter_checking_
if (range == 0) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
if (range->start > range->stop) return F_data_not_stop;
- f_utf_character seek_to_character = seek_to_this << 24;
+ f_utf_character_t seek_to_character = seek_to_this << 24;
for (; range->start <= range->stop; range->start++) {
- if (f_macro_utf_character_width_is(string[range->start]) == 1) {
+ if (f_macro_utf_character_t_width_is(string[range->start]) == 1) {
return F_status_set_error(F_utf);
}
- if (string[range->start] == f_utf_character_eol) return F_none_eol;
+ if (string[range->start] == f_utf_character_t_eol) return F_none_eol;
if (string[range->start] == seek_to_character) return F_none;
} // for
#endif // _di_fl_utf_string_seek_line_to_char_
#ifndef _di_fl_utf_string_seek_line_until_graph_
- f_return_status fl_utf_string_seek_line_until_graph(const f_utf_string string, f_utf_string_range *range, const f_utf_character placeholder) {
+ f_return_status fl_utf_string_seek_line_until_graph(const f_utf_string_t string, f_utf_string_range_t *range, const f_utf_character_t placeholder) {
#ifndef _di_level_1_parameter_checking_
if (range == 0) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
if (range->start > range->stop) return F_data_not_stop;
- f_status status = F_none;
+ f_status_t status = F_none;
- if (f_macro_utf_character_width_is(string[range->start]) == 1) {
+ if (f_macro_utf_character_t_width_is(string[range->start]) == 1) {
return F_status_set_error(F_utf);
}
while (string[range->start] == placeholder || (status = f_utf_character_is_graph(string[range->start])) == F_false) {
if (F_status_is_error(status)) return status;
- if (string[range->start] == f_utf_character_eol) return F_none_eol;
+ if (string[range->start] == f_utf_character_t_eol) return F_none_eol;
range->start++;
- if (f_macro_utf_character_width_is(string[range->start]) == 1) {
+ if (f_macro_utf_character_t_width_is(string[range->start]) == 1) {
return F_status_set_error(F_utf);
}
#endif // _di_fl_utf_string_seek_line_until_graph_
#ifndef _di_fl_utf_string_seek_line_until_non_graph_
- f_return_status fl_utf_string_seek_line_until_non_graph(const f_utf_string string, f_utf_string_range *range, const f_utf_character placeholder) {
+ f_return_status fl_utf_string_seek_line_until_non_graph(const f_utf_string_t string, f_utf_string_range_t *range, const f_utf_character_t placeholder) {
#ifndef _di_level_1_parameter_checking_
if (range == 0) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
if (range->start > range->stop) return F_data_not_stop;
- f_status status = F_none;
+ f_status_t status = F_none;
- if (f_macro_utf_character_width_is(string[range->start]) == 1) return F_status_set_error(F_utf);
+ if (f_macro_utf_character_t_width_is(string[range->start]) == 1) return F_status_set_error(F_utf);
while (string[range->start] == placeholder || (status = f_utf_character_is_graph(string[range->start])) == F_true) {
if (F_status_is_error(status)) return status;
- if (string[range->start] == f_utf_character_eol) return F_none_eol;
+ if (string[range->start] == f_utf_character_t_eol) return F_none_eol;
range->start++;
- if (f_macro_utf_character_width_is(string[range->start]) == 1) {
+ if (f_macro_utf_character_t_width_is(string[range->start]) == 1) {
return F_status_set_error(F_utf);
}
#endif // _di_fl_utf_string_seek_line_until_non_graph_
#ifndef _di_fl_utf_string_seek_to_
- f_return_status fl_utf_string_seek_to(const f_utf_string string, f_utf_string_range *range, const f_utf_character seek_to_this) {
+ f_return_status fl_utf_string_seek_to(const f_utf_string_t string, f_utf_string_range_t *range, const f_utf_character_t seek_to_this) {
#ifndef _di_level_1_parameter_checking_
if (range == 0) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
if (range->start > range->stop) return F_data_not_stop;
- if (f_macro_utf_character_width_is(string[range->start]) == 1) {
+ if (f_macro_utf_character_t_width_is(string[range->start]) == 1) {
return F_status_set_error(F_utf);
}
while (string[range->start] != seek_to_this) {
range->start++;
- if (f_macro_utf_character_width_is(string[range->start]) == 1) {
+ if (f_macro_utf_character_t_width_is(string[range->start]) == 1) {
return F_status_set_error(F_utf);
}
#endif // _di_fl_utf_string_seek_to_
#ifndef _di_fl_utf_string_seek_to_char_
- f_return_status fl_utf_string_seek_to_char(const f_utf_string string, f_utf_string_range *range, const int8_t seek_to_this) {
+ f_return_status fl_utf_string_seek_to_char(const f_utf_string_t string, f_utf_string_range_t *range, const int8_t seek_to_this) {
#ifndef _di_level_1_parameter_checking_
if (range == 0) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
if (range->start > range->stop) return F_data_not_stop;
- const f_utf_character seek_to_character = seek_to_this << 24;
+ const f_utf_character_t seek_to_character = seek_to_this << 24;
- if (f_macro_utf_character_width_is(string[0]) == 1) {
+ if (f_macro_utf_character_t_width_is(string[0]) == 1) {
return F_status_set_error(F_utf);
}
range->start++;
- if (f_macro_utf_character_width_is(string[range->start]) == 1) {
+ if (f_macro_utf_character_t_width_is(string[range->start]) == 1) {
return F_status_set_error(F_utf);
}
} // while
*
* Provides UTF-8 character manipulation and processing capabilities.
*
- * UTF-8 is handled within these functions via padded string characters (f_utf_string).
- * Unlike f_string, these f_utf_string base functions force padding of ASCII or UTF-8 characters.
- * With f_utf_string, a 1-byte wide ASCII character is stored as 4 bytes and a 4-byte wide UTF-8 character is stored as 4 bytes.
+ * UTF-8 is handled within these functions via padded string characters (f_utf_string_t).
+ * Unlike f_string_t, these f_utf_string_t base functions force padding of ASCII or UTF-8 characters.
+ * With f_utf_string_t, a 1-byte wide ASCII character is stored as 4 bytes and a 4-byte wide UTF-8 character is stored as 4 bytes.
*
- * This simplifies traversing the strings at the cost of size vs f_string.
+ * This simplifies traversing the strings at the cost of size vs f_string_t.
*
* Because of the set width, it is generally safe to ignore invalid UTF-8 sequences.
* Invalid UTF-8 will be generally ignored here, where reasonably possible.
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_fl_utf_string_append_
- extern f_return_status fl_utf_string_append(const f_utf_string source, const f_utf_string_length length, f_utf_string_dynamic *destination);
+ extern f_return_status fl_utf_string_append(const f_utf_string_t source, const f_utf_string_length_t length, f_utf_string_dynamic_t *destination);
#endif // _di_fl_utf_string_append_
/**
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_fl_utf_string_append_assure_
- extern f_return_status fl_utf_string_append_assure(const f_utf_string source, const f_utf_string_length length, f_utf_string_dynamic *destination);
+ extern f_return_status fl_utf_string_append_assure(const f_utf_string_t source, const f_utf_string_length_t length, f_utf_string_dynamic_t *destination);
#endif // _di_fl_utf_string_append_assure_
/**
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_fl_utf_string_append_assure_nulless_
- extern f_return_status fl_utf_string_append_assure_nulless(const f_utf_string source, const f_utf_string_length length, f_utf_string_dynamic *destination);
+ extern f_return_status fl_utf_string_append_assure_nulless(const f_utf_string_t source, const f_utf_string_length_t length, f_utf_string_dynamic_t *destination);
#endif // _di_fl_utf_string_append_assure_nulless_
/**
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_fl_utf_string_append_nulless_
- extern f_return_status fl_utf_string_append_nulless(const f_utf_string source, const f_utf_string_length length, f_utf_string_dynamic *destination);
+ extern f_return_status fl_utf_string_append_nulless(const f_utf_string_t source, const f_utf_string_length_t length, f_utf_string_dynamic_t *destination);
#endif // _di_fl_utf_string_append_nulless_
/**
* F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_fl_utf_string_compare_
- extern f_return_status fl_utf_string_compare(const f_utf_string string1, const f_utf_string string2, const f_utf_string_length length1, const f_utf_string_length length2);
+ extern f_return_status fl_utf_string_compare(const f_utf_string_t string1, const f_utf_string_t string2, const f_utf_string_length_t length1, const f_utf_string_length_t length2);
#endif // _di_fl_utf_string_compare_
/**
* @see f_utf_character_is_whitespace()
*/
#ifndef _di_fl_utf_string_compare_trim_
- extern f_return_status fl_utf_string_compare_trim(const f_utf_string string1, const f_utf_string string2, const f_utf_string_length length1, const f_utf_string_length length2);
+ extern f_return_status fl_utf_string_compare_trim(const f_utf_string_t string1, const f_utf_string_t string2, const f_utf_string_length_t length1, const f_utf_string_length_t length2);
#endif // _di_fl_utf_string_compare_trim_
/**
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_fl_utf_string_dynamic_append_
- extern f_return_status fl_utf_string_dynamic_append(const f_utf_string_static source, f_utf_string_dynamic *destination);
+ extern f_return_status fl_utf_string_dynamic_append(const f_utf_string_static_t source, f_utf_string_dynamic_t *destination);
#endif // _di_fl_utf_string_dynamic_append_
/**
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_fl_utf_string_dynamic_append_assure_
- extern f_return_status fl_utf_string_dynamic_append_assure(const f_utf_string_static source, f_utf_string_dynamic *destination);
+ extern f_return_status fl_utf_string_dynamic_append_assure(const f_utf_string_static_t source, f_utf_string_dynamic_t *destination);
#endif // _di_fl_utf_string_dynamic_append_assure_
/**
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_fl_utf_string_dynamic_append_assure_nulless_
- extern f_return_status fl_utf_string_dynamic_append_assure_nulless(const f_utf_string_static source, f_utf_string_dynamic *destination);
+ extern f_return_status fl_utf_string_dynamic_append_assure_nulless(const f_utf_string_static_t source, f_utf_string_dynamic_t *destination);
#endif // _di_fl_utf_string_dynamic_append_assure_nulless_
/**
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_fl_utf_string_dynamic_append_nulless_
- extern f_return_status fl_utf_string_dynamic_append_nulless(const f_utf_string_static source, f_utf_string_dynamic *destination);
+ extern f_return_status fl_utf_string_dynamic_append_nulless(const f_utf_string_static_t source, f_utf_string_dynamic_t *destination);
#endif // _di_fl_utf_string_dynamic_append_nulless_
/**
* F_utf (with error bit) if a character in the string is an invalid UTF-8 character.
*/
#ifndef _di_fl_utf_string_dynamic_compare_
- extern f_return_status fl_utf_string_dynamic_compare(const f_utf_string_static string1, const f_utf_string_static string2);
+ extern f_return_status fl_utf_string_dynamic_compare(const f_utf_string_static_t string1, const f_utf_string_static_t string2);
#endif // _di_fl_utf_string_dynamic_compare_
/**
* @see f_utf_character_is_whitespace()
*/
#ifndef _di_f_utf_string_dynamic_compare_trim_
- extern f_return_status f_utf_string_dynamic_compare_trim(const f_utf_string_static string1, const f_utf_string_static string2);
+ extern f_return_status f_utf_string_dynamic_compare_trim(const f_utf_string_static_t string1, const f_utf_string_static_t string2);
#endif // _di_f_utf_string_dynamic_compare_trim_
/**
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_fl_utf_string_dynamic_mash_
- extern f_return_status fl_utf_string_dynamic_mash(const f_utf_string glue, const f_utf_string_length glue_length, const f_utf_string_static source, f_utf_string_dynamic *destination);
+ extern f_return_status fl_utf_string_dynamic_mash(const f_utf_string_t glue, const f_utf_string_length_t glue_length, const f_utf_string_static_t source, f_utf_string_dynamic_t *destination);
#endif // _di_fl_utf_string_dynamic_mash_
/**
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_fl_utf_string_dynamic_mash_nulless_
- extern f_return_status fl_utf_string_dynamic_mash_nulless(const f_utf_string glue, const f_utf_string_length glue_length, const f_utf_string_static source, f_utf_string_dynamic *destination);
+ extern f_return_status fl_utf_string_dynamic_mash_nulless(const f_utf_string_t glue, const f_utf_string_length_t glue_length, const f_utf_string_static_t source, f_utf_string_dynamic_t *destination);
#endif // _di_fl_utf_string_dynamic_mash_nulless_
/**
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_fl_utf_string_dynamic_mish_
- extern f_return_status fl_utf_string_dynamic_mish(const f_utf_string glue, const f_utf_string_length glue_length, const f_utf_string_static source, f_utf_string_dynamic *destination);
+ extern f_return_status fl_utf_string_dynamic_mish(const f_utf_string_t glue, const f_utf_string_length_t glue_length, const f_utf_string_static_t source, f_utf_string_dynamic_t *destination);
#endif // _di_fl_utf_string_dynamic_mish_
/**
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_fl_utf_string_dynamic_mish_nulless_
- extern f_return_status fl_utf_string_dynamic_mish_nulless(const f_utf_string glue, const f_utf_string_length glue_length, const f_utf_string_static source, f_utf_string_dynamic *destination);
+ extern f_return_status fl_utf_string_dynamic_mish_nulless(const f_utf_string_t glue, const f_utf_string_length_t glue_length, const f_utf_string_static_t source, f_utf_string_dynamic_t *destination);
#endif // _di_fl_utf_string_dynamic_mish_nulless_
/**
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_fl_utf_string_dynamic_partial_append_
- extern f_return_status fl_utf_string_dynamic_partial_append(const f_utf_string_static source, const f_utf_string_range range, f_utf_string_dynamic *destination);
+ extern f_return_status fl_utf_string_dynamic_partial_append(const f_utf_string_static_t source, const f_utf_string_range_t range, f_utf_string_dynamic_t *destination);
#endif // _di_fl_utf_string_dynamic_partial_append_
/**
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_fl_utf_string_dynamic_partial_append_assure_
- extern f_return_status fl_utf_string_dynamic_partial_append_assure(const f_utf_string_static source, const f_utf_string_range range, f_utf_string_dynamic *destination);
+ extern f_return_status fl_utf_string_dynamic_partial_append_assure(const f_utf_string_static_t source, const f_utf_string_range_t range, f_utf_string_dynamic_t *destination);
#endif // _di_fl_utf_string_dynamic_partial_append_assure_
/**
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_fl_utf_string_dynamic_partial_append_assure_nulless_
- extern f_return_status fl_utf_string_dynamic_partial_append_assure_nulless(const f_utf_string_static source, const f_utf_string_range range, f_utf_string_dynamic *destination);
+ extern f_return_status fl_utf_string_dynamic_partial_append_assure_nulless(const f_utf_string_static_t source, const f_utf_string_range_t range, f_utf_string_dynamic_t *destination);
#endif // _di_fl_utf_string_dynamic_partial_append_assure_nulless_
/**
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_fl_utf_string_dynamic_partial_append_nulless_
- extern f_return_status fl_utf_string_dynamic_partial_append_nulless(const f_utf_string_static source, const f_utf_string_range range, f_utf_string_dynamic *destination);
+ extern f_return_status fl_utf_string_dynamic_partial_append_nulless(const f_utf_string_static_t source, const f_utf_string_range_t range, f_utf_string_dynamic_t *destination);
#endif // _di_fl_utf_string_dynamic_partial_append_nulless_
/**
* F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_fl_utf_string_dynamic_partial_compare_
- extern f_return_status fl_utf_string_dynamic_partial_compare(const f_utf_string_static string1, const f_utf_string_static string2, const f_utf_string_range range1, const f_utf_string_range range2);
+ extern f_return_status fl_utf_string_dynamic_partial_compare(const f_utf_string_static_t string1, const f_utf_string_static_t string2, const f_utf_string_range_t range1, const f_utf_string_range_t range2);
#endif // _di_fl_utf_string_dynamic_partial_compare_
/**
* @see f_utf_character_is_whitespace()
*/
#ifndef _di_fl_utf_string_dynamic_partial_compare_trim_
- extern f_return_status fl_utf_string_dynamic_partial_compare_trim(const f_utf_string_static string1, const f_utf_string_static string2, const f_utf_string_range range1, const f_utf_string_range range2);
+ extern f_return_status fl_utf_string_dynamic_partial_compare_trim(const f_utf_string_static_t string1, const f_utf_string_static_t string2, const f_utf_string_range_t range1, const f_utf_string_range_t range2);
#endif // _di_fl_utf_string_dynamic_partial_compare_trim_
/**
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_fl_utf_string_dynamic_partial_mash_
- extern f_return_status fl_utf_string_dynamic_partial_mash(const f_utf_string glue, const f_utf_string_length glue_length, const f_utf_string_static source, const f_utf_string_range range, f_utf_string_dynamic *destination);
+ extern f_return_status fl_utf_string_dynamic_partial_mash(const f_utf_string_t glue, const f_utf_string_length_t glue_length, const f_utf_string_static_t source, const f_utf_string_range_t range, f_utf_string_dynamic_t *destination);
#endif // _di_fl_utf_string_dynamic_partial_mash_
/**
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_fl_utf_string_dynamic_partial_mash_nulless_
- extern f_return_status fl_utf_string_dynamic_partial_mash_nulless(const f_utf_string glue, const f_utf_string_length glue_length, const f_utf_string_static source, const f_utf_string_range range, f_utf_string_dynamic *destination);
+ extern f_return_status fl_utf_string_dynamic_partial_mash_nulless(const f_utf_string_t glue, const f_utf_string_length_t glue_length, const f_utf_string_static_t source, const f_utf_string_range_t range, f_utf_string_dynamic_t *destination);
#endif // _di_fl_utf_string_dynamic_partial_mash_nulless_
/**
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_fl_utf_string_dynamic_partial_mish_
- extern f_return_status fl_utf_string_dynamic_partial_mish(const f_utf_string glue, const f_utf_string_length glue_length, const f_utf_string_static source, const f_utf_string_range range, f_utf_string_dynamic *destination);
+ extern f_return_status fl_utf_string_dynamic_partial_mish(const f_utf_string_t glue, const f_utf_string_length_t glue_length, const f_utf_string_static_t source, const f_utf_string_range_t range, f_utf_string_dynamic_t *destination);
#endif // _di_fl_utf_string_dynamic_partial_mish_
/**
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_fl_utf_string_dynamic_partial_mish_nulless_
- extern f_return_status fl_utf_string_dynamic_partial_mish_nulless(const f_utf_string glue, const f_utf_string_length glue_length, const f_utf_string_static source, const f_utf_string_range range, f_utf_string_dynamic *destination);
+ extern f_return_status fl_utf_string_dynamic_partial_mish_nulless(const f_utf_string_t glue, const f_utf_string_length_t glue_length, const f_utf_string_static_t source, const f_utf_string_range_t range, f_utf_string_dynamic_t *destination);
#endif // _di_fl_utf_string_dynamic_partial_mish_nulless_
/**
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_fl_utf_string_dynamic_partial_prepend_
- extern f_return_status fl_utf_string_dynamic_partial_prepend(const f_utf_string_static source, const f_utf_string_range range, f_utf_string_dynamic *destination);
+ extern f_return_status fl_utf_string_dynamic_partial_prepend(const f_utf_string_static_t source, const f_utf_string_range_t range, f_utf_string_dynamic_t *destination);
#endif // _di_fl_utf_string_dynamic_partial_prepend_
/**
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_fl_utf_string_dynamic_partial_prepend_assure_
- extern f_return_status fl_utf_string_dynamic_partial_prepend_assure(const f_utf_string_static source, const f_utf_string_range range, f_utf_string_dynamic *destination);
+ extern f_return_status fl_utf_string_dynamic_partial_prepend_assure(const f_utf_string_static_t source, const f_utf_string_range_t range, f_utf_string_dynamic_t *destination);
#endif // _di_fl_utf_string_dynamic_partial_prepend_assure_
/**
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_fl_utf_string_dynamic_partial_prepend_assure_nulless_
- extern f_return_status fl_utf_string_dynamic_partial_prepend_assure_nulless(const f_utf_string_static source, const f_utf_string_range range, f_utf_string_dynamic *destination);
+ extern f_return_status fl_utf_string_dynamic_partial_prepend_assure_nulless(const f_utf_string_static_t source, const f_utf_string_range_t range, f_utf_string_dynamic_t *destination);
#endif // _di_fl_utf_string_dynamic_partial_prepend_assure_nulless_
/**
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_fl_utf_string_dynamic_partial_prepend_nulless_
- extern f_return_status fl_utf_string_dynamic_partial_prepend_nulless(const f_utf_string_static source, const f_utf_string_range range, f_utf_string_dynamic *destination);
+ extern f_return_status fl_utf_string_dynamic_partial_prepend_nulless(const f_utf_string_static_t source, const f_utf_string_range_t range, f_utf_string_dynamic_t *destination);
#endif // _di_fl_utf_string_dynamic_partial_prepend_nulless_
/**
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_fl_utf_string_dynamic_prepend_
- extern f_return_status fl_utf_string_dynamic_prepend(const f_utf_string_static source, f_utf_string_dynamic *destination);
+ extern f_return_status fl_utf_string_dynamic_prepend(const f_utf_string_static_t source, f_utf_string_dynamic_t *destination);
#endif // _di_fl_utf_string_dynamic_prepend_
/**
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_fl_utf_string_dynamic_prepend_assure_
- extern f_return_status fl_utf_string_dynamic_prepend_assure(const f_utf_string_static source, f_utf_string_dynamic *destination);
+ extern f_return_status fl_utf_string_dynamic_prepend_assure(const f_utf_string_static_t source, f_utf_string_dynamic_t *destination);
#endif // _di_fl_utf_string_dynamic_prepend_assure_
/**
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_fl_utf_string_dynamic_prepend_assure_nulless_
- extern f_return_status fl_utf_string_dynamic_prepend_assure_nulless(const f_utf_string_static source, f_utf_string_dynamic *destination);
+ extern f_return_status fl_utf_string_dynamic_prepend_assure_nulless(const f_utf_string_static_t source, f_utf_string_dynamic_t *destination);
#endif // _di_fl_utf_string_dynamic_prepend_assure_nulless_
/**
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_fl_utf_string_dynamic_prepend_nulless_
- extern f_return_status fl_utf_string_dynamic_prepend_nulless(const f_utf_string_static source, f_utf_string_dynamic *destination);
+ extern f_return_status fl_utf_string_dynamic_prepend_nulless(const f_utf_string_static_t source, f_utf_string_dynamic_t *destination);
#endif // _di_fl_utf_string_dynamic_prepend_nulless_
/**
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_fl_utf_string_dynamic_rip_
- extern f_return_status fl_utf_string_dynamic_rip(const f_utf_string_static source, const f_utf_string_range range, f_utf_string_dynamic *destination);
+ extern f_return_status fl_utf_string_dynamic_rip(const f_utf_string_static_t source, const f_utf_string_range_t range, f_utf_string_dynamic_t *destination);
#endif // _di_fl_utf_string_dynamic_rip_
/**
* F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_fl_utf_string_dynamic_rip_nulless_
- extern f_return_status fl_utf_string_dynamic_rip_nulless(const f_utf_string_static source, const f_utf_string_range range, f_utf_string_dynamic *destination);
+ extern f_return_status fl_utf_string_dynamic_rip_nulless(const f_utf_string_static_t source, const f_utf_string_range_t range, f_utf_string_dynamic_t *destination);
#endif // _di_fl_utf_string_dynamic_rip_nulless_
/**
* 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_
- extern f_return_status fl_utf_string_dynamic_seek_line_to(const f_utf_string_static buffer, f_utf_string_range *range, const f_utf_character seek_to_this);
+ extern f_return_status fl_utf_string_dynamic_seek_line_to(const f_utf_string_static_t buffer, f_utf_string_range_t *range, const f_utf_character_t seek_to_this);
#endif // _di_fl_utf_string_dynamic_seek_line_to_
/**
* 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_return_status fl_utf_string_dynamic_seek_line_to_char(const f_utf_string_static buffer, f_utf_string_range *range, const int8_t seek_to_this);
+ extern f_return_status fl_utf_string_dynamic_seek_line_to_char(const f_utf_string_static_t buffer, f_utf_string_range_t *range, const int8_t seek_to_this);
#endif // _di_fl_utf_string_seek_line_to_char_
/**
* @see f_utf_character_is_graph()
*/
#ifndef _di_fl_utf_string_dynamic_seek_line_until_graph_
- extern f_return_status fl_utf_string_dynamic_seek_line_until_graph(const f_utf_string_static buffer, f_utf_string_range *range, const f_utf_character placeholder);
+ extern f_return_status fl_utf_string_dynamic_seek_line_until_graph(const f_utf_string_static_t buffer, f_utf_string_range_t *range, const f_utf_character_t placeholder);
#endif // _di_fl_utf_string_dynamic_seek_line_until_graph_
/**
* @see f_utf_character_is_graph()
*/
#ifndef _di_fl_utf_string_dynamic_seek_line_until_non_graph_
- extern f_return_status fl_utf_string_dynamic_seek_line_until_non_graph(const f_utf_string_static buffer, f_utf_string_range *range, const f_utf_character placeholder);
+ extern f_return_status fl_utf_string_dynamic_seek_line_until_non_graph(const f_utf_string_static_t buffer, f_utf_string_range_t *range, const f_utf_character_t placeholder);
#endif // _di_fl_utf_string_dynamic_seek_line_until_non_graph_
/**
* F_utf (with error bit) if a character in the buffer is an invalid UTF-8 character.
*/
#ifndef _di_fl_utf_string_dynamic_seek_to_
- extern f_return_status fl_utf_string_dynamic_seek_to(const f_utf_string_static buffer, f_utf_string_range *range, const f_utf_character seek_to_this);
+ extern f_return_status fl_utf_string_dynamic_seek_to(const f_utf_string_static_t buffer, f_utf_string_range_t *range, const f_utf_character_t seek_to_this);
#endif // _di_fl_utf_string_dynamic_seek_to_
/**
* F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_fl_utf_string_dynamic_seek_to_char_
- extern f_return_status fl_utf_string_dynamic_seek_to_char(const f_utf_string_static buffer, f_utf_string_range *range, const int8_t seek_to_this);
+ extern f_return_status fl_utf_string_dynamic_seek_to_char(const f_utf_string_static_t buffer, f_utf_string_range_t *range, const int8_t seek_to_this);
#endif // _di_fl_utf_string_dynamic_seek_to_char_
/**
* F_utf (with error bit) if character is an invalid UTF-8 character.
*/
#ifndef _di_fl_utf_string_dynamic_seek_to_utf_character_
- extern f_return_status fl_utf_string_dynamic_seek_to_utf_character(const f_utf_string_static buffer, f_utf_string_range *range, const f_utf_character seek_to_this);
+ extern f_return_status fl_utf_string_dynamic_seek_to_utf_character(const f_utf_string_static_t buffer, f_utf_string_range_t *range, const f_utf_character_t seek_to_this);
#endif // _di_fl_utf_string_dynamic_seek_to_utf_character_
/**
* F_string_too_large (with error bit) if string is too large to fit into the buffer.
*/
#ifndef _di_fl_utf_string_dynamic_terminate_
- extern f_return_status fl_utf_string_dynamic_terminate(f_utf_string_dynamic *destination);
+ extern f_return_status fl_utf_string_dynamic_terminate(f_utf_string_dynamic_t *destination);
#endif // _di_fl_utf_string_dynamic_terminate_
/**
* F_string_too_large (with error bit) if string is too large to fit into the buffer.
*/
#ifndef _di_fl_utf_string_dynamic_terminate_after_
- extern f_return_status fl_utf_string_dynamic_terminate_after(f_utf_string_dynamic *destination);
+ extern f_return_status fl_utf_string_dynamic_terminate_after(f_utf_string_dynamic_t *destination);
#endif // _di_fl_utf_string_dynamic_terminate_after_
/**
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_fl_utf_string_mash_
- extern f_return_status fl_utf_string_mash(const f_utf_string glue, const f_utf_string_length glue_length, const f_utf_string source, const f_utf_string_length length, f_utf_string_dynamic *destination);
+ extern f_return_status fl_utf_string_mash(const f_utf_string_t glue, const f_utf_string_length_t glue_length, const f_utf_string_t source, const f_utf_string_length_t length, f_utf_string_dynamic_t *destination);
#endif // _di_fl_utf_string_mash_
/**
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_fl_utf_string_mash_nulless_
- extern f_return_status fl_utf_string_mash_nulless(const f_utf_string glue, const f_utf_string_length glue_length, const f_utf_string source, const f_utf_string_length length, f_utf_string_dynamic *destination);
+ extern f_return_status fl_utf_string_mash_nulless(const f_utf_string_t glue, const f_utf_string_length_t glue_length, const f_utf_string_t source, const f_utf_string_length_t length, f_utf_string_dynamic_t *destination);
#endif // _di_fl_utf_string_mash_nulless_
/**
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_fl_utf_string_mish_
- extern f_return_status fl_utf_string_mish(const f_utf_string glue, const f_utf_string_length glue_length, const f_utf_string source, const f_utf_string_length length, f_utf_string_dynamic *destination);
+ extern f_return_status fl_utf_string_mish(const f_utf_string_t glue, const f_utf_string_length_t glue_length, const f_utf_string_t source, const f_utf_string_length_t length, f_utf_string_dynamic_t *destination);
#endif // _di_fl_utf_string_mish_
/**
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_fl_utf_string_mish_nulless_
- extern f_return_status fl_utf_string_mish_nulless(const f_utf_string glue, const f_utf_string_length glue_length, const f_utf_string source, const f_utf_string_length length, f_utf_string_dynamic *destination);
+ extern f_return_status fl_utf_string_mish_nulless(const f_utf_string_t glue, const f_utf_string_length_t glue_length, const f_utf_string_t source, const f_utf_string_length_t length, f_utf_string_dynamic_t *destination);
#endif // _di_fl_utf_string_mish_nulless_
/**
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_fl_utf_string_prepend_
- extern f_return_status fl_utf_string_prepend(const f_utf_string source, const f_utf_string_length length, f_utf_string_dynamic *destination);
+ extern f_return_status fl_utf_string_prepend(const f_utf_string_t source, const f_utf_string_length_t length, f_utf_string_dynamic_t *destination);
#endif // _di_fl_utf_string_prepend_
/**
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_fl_utf_string_prepend_assure_
- extern f_return_status fl_utf_string_prepend_assure(const f_utf_string source, const f_utf_string_length length, f_utf_string_dynamic *destination);
+ extern f_return_status fl_utf_string_prepend_assure(const f_utf_string_t source, const f_utf_string_length_t length, f_utf_string_dynamic_t *destination);
#endif // _di_fl_utf_string_prepend_assure_
/**
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_fl_utf_string_prepend_assure_nulless_
- extern f_return_status fl_utf_string_prepend_assure_nulless(const f_utf_string source, const f_utf_string_length length, f_utf_string_dynamic *destination);
+ extern f_return_status fl_utf_string_prepend_assure_nulless(const f_utf_string_t source, const f_utf_string_length_t length, f_utf_string_dynamic_t *destination);
#endif // _di_fl_utf_string_prepend_assure_nulless_
/**
* F_string_too_large (with error bit) if the combined string is too large.
*/
#ifndef _di_fl_utf_string_prepend_nulless_
- extern f_return_status fl_utf_string_prepend_nulless(const f_utf_string source, const f_utf_string_length length, f_utf_string_dynamic *destination);
+ extern f_return_status fl_utf_string_prepend_nulless(const f_utf_string_t source, const f_utf_string_length_t length, f_utf_string_dynamic_t *destination);
#endif // _di_fl_utf_string_prepend_nulless_
/**
* @see f_utf_character_is_whitespace()
*/
#ifndef _di_fl_utf_string_rip_
- extern f_return_status fl_utf_string_rip(const f_utf_string source, const f_utf_string_length length, f_utf_string_dynamic *destination);
+ extern f_return_status fl_utf_string_rip(const f_utf_string_t source, const f_utf_string_length_t length, f_utf_string_dynamic_t *destination);
#endif // _di_fl_utf_string_rip_
/**
* @see f_utf_character_is_whitespace()
*/
#ifndef _di_fl_utf_string_rip_nulless_
- extern f_return_status fl_utf_string_rip_nulless(const f_utf_string source, const f_utf_string_length length, f_utf_string_dynamic *destination);
+ extern f_return_status fl_utf_string_rip_nulless(const f_utf_string_t source, const f_utf_string_length_t length, f_utf_string_dynamic_t *destination);
#endif // _di_fl_utf_string_rip_nulless_
/**
* F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_fl_utf_string_seek_line_to_
- extern f_return_status fl_utf_string_seek_line_to(const f_utf_string string, f_utf_string_range *range, const f_utf_character seek_to_this);
+ extern f_return_status fl_utf_string_seek_line_to(const f_utf_string_t string, f_utf_string_range_t *range, const f_utf_character_t seek_to_this);
#endif // _di_fl_utf_string_seek_line_to_
/**
* 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_return_status fl_utf_string_seek_line_to_char(const f_utf_string string, f_utf_string_range *range, const int8_t seek_to_this);
+ extern f_return_status fl_utf_string_seek_line_to_char(const f_utf_string_t string, f_utf_string_range_t *range, const int8_t seek_to_this);
#endif // _di_fl_utf_string_seek_line_to_char_
/**
* @see f_utf_character_is_graph()
*/
#ifndef _di_fl_utf_string_seek_line_until_graph_
- extern f_return_status fl_utf_string_seek_line_until_graph(const f_utf_string string, f_utf_string_range *range, const f_utf_character placeholder);
+ extern f_return_status fl_utf_string_seek_line_until_graph(const f_utf_string_t string, f_utf_string_range_t *range, const f_utf_character_t placeholder);
#endif // _di_fl_utf_string_seek_line_until_graph_
/**
* @see f_utf_character_is_graph()
*/
#ifndef _di_fl_utf_string_seek_line_until_non_graph_
- extern f_return_status fl_utf_string_seek_line_until_non_graph(const f_utf_string string, f_utf_string_range *range, const f_utf_character placeholder);
+ extern f_return_status fl_utf_string_seek_line_until_non_graph(const f_utf_string_t string, f_utf_string_range_t *range, const f_utf_character_t placeholder);
#endif // _di_fl_utf_string_seek_line_until_non_graph_
/**
* F_utf (with error bit) if a character in the buffer is an invalid UTF-8 character.
*/
#ifndef _di_fl_utf_string_seek_to_
- extern f_return_status fl_utf_string_seek_to(const f_utf_string string, f_utf_string_range *range, const f_utf_character seek_to_this);
+ extern f_return_status fl_utf_string_seek_to(const f_utf_string_t string, f_utf_string_range_t *range, const f_utf_character_t seek_to_this);
#endif // _di_fl_utf_string_seek_to_
/**
* 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_return_status fl_utf_string_seek_to_char(const f_utf_string string, f_utf_string_range *range, const int8_t seek_to_this);
+ extern f_return_status fl_utf_string_seek_to_char(const f_utf_string_t string, f_utf_string_range_t *range, const int8_t seek_to_this);
#endif // _di_fl_utf_string__seek_to_character_
#ifdef __cplusplus
#endif
#if !defined(fl_utf_file_read) || !defined(fl_utf_file_read_until) || !defined(fl_utf_file_read_range)
- void private_fl_utf_file_process_read_buffer(const char *buffer_read, const ssize_t size_read, f_utf_string_dynamic *buffer, char buffer_char[], uint8_t *width, int8_t *width_last) {
- f_utf_character character = 0;
- f_string_length i = 0;
+ void private_fl_utf_file_process_read_buffer(const char *buffer_read, const ssize_t size_read, f_utf_string_dynamic_t *buffer, char buffer_char[], uint8_t *width, int8_t *width_last) {
+ f_utf_character_t character = 0;
+ f_string_length_t i = 0;
uint8_t increment_by = 0;
for (; i < size_read; i += increment_by) {
}
if (*width_last == *width) {
- buffer->string[buffer->used] = f_macro_utf_character_from_char_1((buffer_char[0]));
+ buffer->string[buffer->used] = f_macro_utf_character_t_from_char_1((buffer_char[0]));
if (*width > 1) {
- buffer->string[buffer->used] |= f_macro_utf_character_from_char_2((buffer_char[1]));
+ buffer->string[buffer->used] |= f_macro_utf_character_t_from_char_2((buffer_char[1]));
if (*width > 2) {
- buffer->string[buffer->used] |= f_macro_utf_character_from_char_3((buffer_char[2]));
+ buffer->string[buffer->used] |= f_macro_utf_character_t_from_char_3((buffer_char[2]));
if (*width > 3) {
- buffer->string[buffer->used] |= f_macro_utf_character_from_char_4((buffer_char[3]));
+ buffer->string[buffer->used] |= f_macro_utf_character_t_from_char_4((buffer_char[3]));
}
}
}
#endif // !defined(fl_utf_file_read) || !defined(fl_utf_file_read_until) || !defined(fl_utf_file_read_range)
#if !defined(fl_utf_file_write) || !defined(fl_utf_file_write_until) || !defined(fl_utf_file_write_range)
- f_return_status private_fl_utf_file_write_until(const f_file file, const f_utf_string string, const f_utf_string_length total, f_utf_string_length *written) {
+ f_return_status private_fl_utf_file_write_until(const f_file_t file, const f_utf_string_t string, const f_utf_string_length_t total, f_utf_string_length_t *written) {
*written = 0;
- f_status status = F_none;
- f_utf_string_length write_size = file.size_write > 4 ? file.size_write : 4;
- f_utf_string_length write_max = total;
- f_utf_string_length i = 0;
+ f_status_t status = F_none;
+ f_utf_string_length_t write_size = file.size_write > 4 ? file.size_write : 4;
+ f_utf_string_length_t write_max = total;
+ f_utf_string_length_t i = 0;
if (write_size > write_max) {
write_size = write_max;
}
- f_string_length last = 0;
- f_string_length used = 0;
+ f_string_length_t last = 0;
+ f_string_length_t used = 0;
ssize_t size_write = 0;
uint8_t buffer_write[write_size];
for (i = 0, used = 0; used < write_size && *written + i < write_max; i++, used += width) {
if (width_written < width) {
if (width_written < 2) {
- buffer_write[used] = f_macro_utf_character_to_char_2(string[*written + i]);
+ buffer_write[used] = f_macro_utf_character_t_to_char_2(string[*written + i]);
width_written++;
used++;
}
if (width > 2 && width_written < 3) {
- buffer_write[used + 1] = f_macro_utf_character_to_char_3(string[*written + i]);
+ buffer_write[used + 1] = f_macro_utf_character_t_to_char_3(string[*written + i]);
width_written++;
used++;
}
if (width == 4 && width_written < 4) {
- buffer_write[used + 2] = f_macro_utf_character_to_char_4(string[*written + i]);
+ buffer_write[used + 2] = f_macro_utf_character_t_to_char_4(string[*written + i]);
width_written++;
used++;
}
width = 0;
}
else {
- width = f_macro_utf_character_width(string[*written + i]);
+ width = f_macro_utf_character_t_width(string[*written + i]);
width_written = width;
if (*written + width > write_max) {
return F_incomplete_utf_stop;
}
- buffer_write[used] = f_macro_utf_character_to_char_1(string[*written + i]);
+ buffer_write[used] = f_macro_utf_character_t_to_char_1(string[*written + i]);
if (width > 1) {
if (used == write_size) {
break;
}
- buffer_write[used + 1] = f_macro_utf_character_to_char_2(string[*written + i]);
+ buffer_write[used + 1] = f_macro_utf_character_t_to_char_2(string[*written + i]);
if (width > 2) {
if (used + 2 > write_size) {
break;
}
- buffer_write[used + 2] = f_macro_utf_character_to_char_3(string[*written + i]);
+ buffer_write[used + 2] = f_macro_utf_character_t_to_char_3(string[*written + i]);
if (width == 4) {
if (used + 3 > write_size) {
break;
}
- buffer_write[used + 3] = f_macro_utf_character_to_char_4(string[*written + i]);
+ buffer_write[used + 3] = f_macro_utf_character_t_to_char_4(string[*written + i]);
}
}
}
* @see fl_utf_file_read_until()
*/
#if !defined(fl_utf_file_read) || !defined(fl_utf_file_read_until) || !defined(fl_utf_file_read_range)
- void private_fl_utf_file_process_read_buffer(const char *buffer_read, const ssize_t size_read, f_utf_string_dynamic *buffer, char buffer_char[], uint8_t *width, int8_t *width_last) f_gcc_attribute_visibility_internal;
+ void private_fl_utf_file_process_read_buffer(const char *buffer_read, const ssize_t size_read, f_utf_string_dynamic_t *buffer, char buffer_char[], uint8_t *width, int8_t *width_last) f_gcc_attribute_visibility_internal;
#endif // !defined(fl_utf_file_read) || !defined(fl_utf_file_read_until) || !defined(fl_utf_file_read_range)
/**
* @see fl_utf_file_write_until()
*/
#if !defined(fl_utf_file_write) || !defined(fl_utf_file_write_until) || !defined(fl_utf_file_write_range)
- extern f_return_status private_fl_utf_file_write_until(const f_file file, const f_utf_string string, const f_utf_string_length total, f_utf_string_length *written) f_gcc_attribute_visibility_internal;
+ extern f_return_status private_fl_utf_file_write_until(const f_file_t file, const f_utf_string_t string, const f_utf_string_length_t total, f_utf_string_length_t *written) f_gcc_attribute_visibility_internal;
#endif // !defined(fl_utf_file_write) || !defined(fl_utf_file_write_until) || !defined(fl_utf_file_write_range)
#ifdef __cplusplus
#endif
#ifndef _di_fl_utf_file_read_
- f_return_status fl_utf_file_read(const f_file file, f_utf_string_dynamic *buffer) {
+ f_return_status fl_utf_file_read(const f_file_t file, f_utf_string_dynamic_t *buffer) {
#ifndef _di_level_1_parameter_checking_
if (file.size_read == 0) return F_status_set_error(F_parameter);
if (buffer->used > buffer->size) return F_status_set_error(F_parameter);
if (file.id < 0) return F_status_set_error(F_file);
if (file.id == 0) return F_status_set_error(F_file_closed);
- f_status status = F_none;
+ f_status_t status = F_none;
ssize_t size_read = 0;
uint8_t width = 0;
while ((size_read = read(file.id, buffer_read, file.size_read)) > 0) {
if (buffer->used + size_read > buffer->size) {
- if (buffer->size + size_read > f_utf_string_length_size) {
+ if (buffer->size + size_read > f_utf_string_length_t_size) {
return F_status_set_error(F_string_too_large);
}
- f_macro_string_dynamic_resize(status, (*buffer), buffer->size + size_read);
+ f_macro_string_dynamic_t_resize(status, (*buffer), buffer->size + size_read);
if (F_status_is_error(status)) return status;
}
#endif // _di_fl_utf_file_read_
#ifndef _di_fl_utf_file_read_block_
- f_return_status fl_utf_file_read_block(const f_file file, f_utf_string_dynamic *buffer) {
+ f_return_status fl_utf_file_read_block(const f_file_t file, f_utf_string_dynamic_t *buffer) {
#ifndef _di_level_1_parameter_checking_
if (file.size_read == 0) return F_status_set_error(F_parameter);
if (buffer->used > buffer->size) return F_status_set_error(F_parameter);
if (file.id < 0) return F_status_set_error(F_file);
if (file.id == 0) return F_status_set_error(F_file_closed);
- f_status status = F_none;
+ f_status_t status = F_none;
ssize_t size_read = 0;
uint8_t width = 0;
if ((size_read = read(file.id, buffer_read, file.size_read)) > 0) {
if (buffer->used + size_read > buffer->size) {
- if (buffer->size + size_read > f_string_length_size) {
+ if (buffer->size + size_read > f_string_length_t_size) {
return F_status_set_error(F_string_too_large);
}
- f_macro_string_dynamic_resize(status, (*buffer), buffer->size + size_read);
+ f_macro_string_dynamic_t_resize(status, (*buffer), buffer->size + size_read);
if (F_status_is_error(status)) return status;
}
#endif // _di_fl_utf_file_read_block_
#ifndef _di_fl_utf_file_read_until_
- f_return_status fl_utf_file_read_until(const f_file file, f_utf_string_dynamic *buffer, const f_utf_string_length total) {
+ f_return_status fl_utf_file_read_until(const f_file_t file, f_utf_string_dynamic_t *buffer, const f_utf_string_length_t total) {
#ifndef _di_level_1_parameter_checking_
if (file.size_read == 0) return F_status_set_error(F_parameter);
if (buffer->used > buffer->size) return F_status_set_error(F_parameter);
if (file.id < 0) return F_status_set_error(F_file);
if (file.id == 0) return F_status_set_error(F_file_closed);
- f_status status = F_none;
+ f_status_t status = F_none;
ssize_t size_read = 0;
uint8_t width = 0;
int8_t width_last = -1;
- f_utf_string_length buffer_size = file.size_read;
- f_utf_string_length buffer_count = 0;
+ f_utf_string_length_t buffer_size = file.size_read;
+ f_utf_string_length_t buffer_count = 0;
if (total < buffer_size) {
buffer_size = total;
while (buffer_count < total && (size_read = read(file.id, buffer_read, buffer_size)) > 0) {
if (buffer->used + size_read > buffer->size) {
- if (buffer->size + size_read > f_string_length_size) {
+ if (buffer->size + size_read > f_string_length_t_size) {
return F_status_set_error(F_string_too_large);
}
- f_macro_string_dynamic_resize(status, (*buffer), buffer->size + size_read);
+ f_macro_string_dynamic_t_resize(status, (*buffer), buffer->size + size_read);
if (F_status_is_error(status)) return status;
}
#endif // _di_fl_utf_file_read_until_
#ifndef _di_fl_utf_file_write_
- f_return_status fl_utf_file_write(const f_file file, const f_utf_string_static buffer, f_utf_string_length *written) {
+ f_return_status fl_utf_file_write(const f_file_t file, const f_utf_string_static_t buffer, f_utf_string_length_t *written) {
#ifndef _di_level_0_parameter_checking_
if (file.size_write == 0) return F_status_set_error(F_parameter);
if (buffer.used > buffer.size) return F_status_set_error(F_parameter);
return F_data_not;
}
- const f_status status = private_fl_utf_file_write_until(file, buffer.string, buffer.used, written);
+ const f_status_t status = private_fl_utf_file_write_until(file, buffer.string, buffer.used, written);
if (F_status_is_error(status)) return F_status_set_error(status);
if (status == F_none && *written == buffer.used) return F_none_eos;
#endif // _di_fl_utf_file_write_
#ifndef _di_fl_utf_file_write_block_
- f_return_status fl_utf_file_write_block(const f_file file, const f_utf_string_static buffer, f_utf_string_length *written) {
+ f_return_status fl_utf_file_write_block(const f_file_t file, const f_utf_string_static_t buffer, f_utf_string_length_t *written) {
#ifndef _di_level_0_parameter_checking_
if (file.size_write == 0) return F_status_set_error(F_parameter);
if (buffer.used > buffer.size) return F_status_set_error(F_parameter);
return F_data_not;
}
- f_utf_string_length write_max = file.size_write;
+ f_utf_string_length_t write_max = file.size_write;
if (write_max > buffer.used) {
write_max = buffer.used;
}
- const f_status status = private_fl_utf_file_write_until(file, buffer.string, write_max, written);
+ const f_status_t status = private_fl_utf_file_write_until(file, buffer.string, write_max, written);
if (F_status_is_error(status)) return F_status_set_error(status);
if (status == F_none && *written == buffer.used) return F_none_eos;
#endif // _di_fl_utf_file_write_block_
#ifndef _di_fl_utf_file_write_until_
- f_return_status fl_utf_file_write_until(const f_file file, const f_utf_string_static buffer, const f_utf_string_length total, f_utf_string_length *written) {
+ f_return_status fl_utf_file_write_until(const f_file_t file, const f_utf_string_static_t buffer, const f_utf_string_length_t total, f_utf_string_length_t *written) {
#ifndef _di_level_0_parameter_checking_
if (file.size_write == 0) return F_status_set_error(F_parameter);
if (buffer.used > buffer.size) return F_status_set_error(F_parameter);
return F_data_not;
}
- f_utf_string_length write_max = file.size_write;
+ f_utf_string_length_t write_max = file.size_write;
if (write_max > buffer.used) {
write_max = buffer.used;
}
- const f_status status = private_fl_utf_file_write_until(file, buffer.string, write_max, written);
+ const f_status_t status = private_fl_utf_file_write_until(file, buffer.string, write_max, written);
if (F_status_is_error(status)) return F_status_set_error(status);
if (status == F_none && *written == buffer.used) return F_none_eos;
#endif // _di_fl_utf_file_write_until_
#ifndef _di_fl_utf_file_write_range_
- f_return_status fl_utf_file_write_range(const f_file file, const f_utf_string_static buffer, const f_utf_string_range range, f_utf_string_length *written) {
+ f_return_status fl_utf_file_write_range(const f_file_t file, const f_utf_string_static_t buffer, const f_utf_string_range_t range, f_utf_string_length_t *written) {
#ifndef _di_level_0_parameter_checking_
if (file.size_write == 0) return F_status_set_error(F_parameter);
if (buffer.used > buffer.size) return F_status_set_error(F_parameter);
return F_data_not;
}
- const f_utf_string_length total = (range.stop - range.start) + 1;
- f_utf_string_length write_max = total;
+ const f_utf_string_length_t total = (range.stop - range.start) + 1;
+ f_utf_string_length_t write_max = total;
if (write_max > buffer.used) {
write_max = buffer.used;
}
- const f_status status = private_fl_utf_file_write_until(file, buffer.string + range.start, write_max, written);
+ const f_status_t status = private_fl_utf_file_write_until(file, buffer.string + range.start, write_max, written);
if (F_status_is_error(status)) return F_status_set_error(status);
if (status == F_none) {
* @see read()
*/
#ifndef _di_fl_utf_file_read_
- extern f_return_status fl_utf_file_read(const f_file file, f_utf_string_dynamic *buffer);
+ extern f_return_status fl_utf_file_read(const f_file_t file, f_utf_string_dynamic_t *buffer);
#endif // _di_fl_utf_file_read_
/**
* @see read()
*/
#ifndef _di_fl_utf_file_read_block_
- extern f_return_status fl_utf_file_read_block(const f_file file, f_utf_string_dynamic *buffer);
+ extern f_return_status fl_utf_file_read_block(const f_file_t file, f_utf_string_dynamic_t *buffer);
#endif // _di_fl_utf_file_read_block_
/**
* @see read
*/
#ifndef _di_fl_utf_file_read_until_
- extern f_return_status fl_utf_file_read_until(const f_file file, f_utf_string_dynamic *buffer, const f_utf_string_length total);
+ extern f_return_status fl_utf_file_read_until(const f_file_t file, f_utf_string_dynamic_t *buffer, const f_utf_string_length_t total);
#endif // _di_fl_utf_file_read_until_
/**
* @see write()
*/
#ifndef _di_fl_utf_file_write_
- extern f_return_status fl_utf_file_write(const f_file file, const f_utf_string_static buffer, f_utf_string_length *written);
+ extern f_return_status fl_utf_file_write(const f_file_t file, const f_utf_string_static_t buffer, f_utf_string_length_t *written);
#endif // _di_fl_utf_file_write_
/**
* @see write()
*/
#ifndef _di_fl_utf_file_write_block_
- extern f_return_status fl_utf_file_write_block(const f_file file, const f_utf_string_static buffer, f_utf_string_length *written);
+ extern f_return_status fl_utf_file_write_block(const f_file_t file, const f_utf_string_static_t buffer, f_utf_string_length_t *written);
#endif // _di_fl_utf_file_write_block_
/**
* @see write()
*/
#ifndef _di_fl_utf_file_write_until_
- extern f_return_status fl_utf_file_write_until(const f_file file, const f_utf_string_static buffer, const f_utf_string_length total, f_utf_string_length *written);
+ extern f_return_status fl_utf_file_write_until(const f_file_t file, const f_utf_string_static_t buffer, const f_utf_string_length_t total, f_utf_string_length_t *written);
#endif // _di_fl_utf_file_write_until_
/**
* @see write()
*/
#ifndef _di_fl_utf_file_write_range_
- extern f_return_status fl_utf_file_write_range(const f_file file, const f_utf_string_static buffer, const f_utf_string_range range, f_utf_string_length *written);
+ extern f_return_status fl_utf_file_write_range(const f_file_t file, const f_utf_string_static_t buffer, const f_utf_string_range_t range, f_utf_string_length_t *written);
#endif // _di_fl_utf_file_write_range_
#ifdef __cplusplus
# fss-0000
f_type
-f_status
+f_status_t
f_memory
-f_string
+f_string_t
f_utf
-f_file
+f_file_t
#endif
#ifndef _di_fll_execute_arguments_add_
- f_return_status fll_execute_arguments_add(const f_string source, const f_string_length length, f_string_dynamics *arguments) {
+ f_return_status fll_execute_arguments_add(const f_string_t source, const f_string_length_t length, f_string_dynamics_t *arguments) {
#ifndef _di_level_2_parameter_checking_
if (arguments == 0) return F_status_set_error(F_parameter);
if (arguments->used > arguments->size) return F_status_set_error(F_parameter);
if (length == 0) return F_data_not;
- f_status status = F_none;
+ f_status_t status = F_none;
status = private_fll_execute_arguments_add(source, length, arguments);
#endif // _di_fll_execute_arguments_add_
#ifndef _di_fll_execute_arguments_add_parameter_
- f_return_status fll_execute_arguments_add_parameter(const f_string prefix, const f_string_length prefix_length, const f_string name, const f_string_length name_length, const f_string value, const f_string_length value_length, f_string_dynamics *arguments) {
+ f_return_status fll_execute_arguments_add_parameter(const f_string_t prefix, const f_string_length_t prefix_length, const f_string_t name, const f_string_length_t name_length, const f_string_t value, const f_string_length_t value_length, f_string_dynamics_t *arguments) {
#ifndef _di_level_2_parameter_checking_
if (arguments == 0) return F_status_set_error(F_parameter);
if (arguments->used > arguments->size) return F_status_set_error(F_parameter);
if (name_length == 0) return F_data_not;
if (value_length == 0) return F_data_not;
- f_status status = F_none;
+ f_status_t status = F_none;
status = private_fll_execute_arguments_add_parameter(prefix, prefix_length, name, name_length, value, value_length, arguments);
#endif // _di_fll_execute_arguments_add_parameter_
#ifndef _di_fll_execute_arguments_add_parameter_set_
- f_return_status fll_execute_arguments_add_parameter_set(const f_string prefix[], const f_string_length prefix_length[], const f_string name[], const f_string_length name_length[], const f_string value[], const f_string_length value_length[], const f_array_length size, f_string_dynamics *arguments) {
+ f_return_status fll_execute_arguments_add_parameter_set(const f_string_t prefix[], const f_string_length_t prefix_length[], const f_string_t name[], const f_string_length_t name_length[], const f_string_t value[], const f_string_length_t value_length[], const f_array_length_t size, f_string_dynamics_t *arguments) {
#ifndef _di_level_2_parameter_checking_
if (arguments == 0) return F_status_set_error(F_parameter);
if (arguments->used > arguments->size) return F_status_set_error(F_parameter);
if (size == 0) return F_data_not;
- f_status status = F_none;
+ f_status_t status = F_none;
- for (f_array_length i = 0; i < size; i++) {
+ for (f_array_length_t i = 0; i < size; i++) {
if (name_length[i] == 0) continue;
if (value_length[i] == 0) continue;
#endif // _di_fll_execute_arguments_add_parameter_set_
#ifndef _di_fll_execute_arguments_add_set_
- f_return_status fll_execute_arguments_add_set(const f_string source[], const f_string_length length[], const f_array_length size, f_string_dynamics *arguments) {
+ f_return_status fll_execute_arguments_add_set(const f_string_t source[], const f_string_length_t length[], const f_array_length_t size, f_string_dynamics_t *arguments) {
#ifndef _di_level_2_parameter_checking_
if (arguments == 0) return F_status_set_error(F_parameter);
if (arguments->used > arguments->size) return F_status_set_error(F_parameter);
if (size == 0) return F_data_not;
- f_status status = F_none;
+ f_status_t status = F_none;
- for (f_array_length i = 0; i < size; i++) {
+ for (f_array_length_t i = 0; i < size; i++) {
if (length[i] == 0) continue;
status = private_fll_execute_arguments_add(source[i], length[i], arguments);
#endif // _di_fll_execute_arguments_add_set_
#ifndef _di_fll_execute_arguments_dynamic_add_
- f_return_status fll_execute_arguments_dynamic_add(const f_string_static source, f_string_dynamics *arguments) {
+ f_return_status fll_execute_arguments_dynamic_add(const f_string_static_t source, f_string_dynamics_t *arguments) {
#ifndef _di_level_2_parameter_checking_
if (source.used > source.size) return F_status_set_error(F_parameter);
if (arguments == 0) return F_status_set_error(F_parameter);
if (source.used == 0) return F_data_not;
- f_status status = F_none;
+ f_status_t status = F_none;
status = private_fll_execute_arguments_add(source.string, source.used, arguments);
#endif // _di_fll_execute_arguments_dynamic_add_
#ifndef _di_fll_execute_arguments_dynamic_add_parameter_
- f_return_status fll_execute_arguments_dynamic_add_parameter(const f_string_static prefix, const f_string_static name, const f_string_static value, f_string_dynamics *arguments) {
+ f_return_status fll_execute_arguments_dynamic_add_parameter(const f_string_static_t prefix, const f_string_static_t name, const f_string_static_t value, f_string_dynamics_t *arguments) {
#ifndef _di_level_2_parameter_checking_
if (prefix.used > prefix.size) return F_status_set_error(F_parameter);
if (name.used > name.size) return F_status_set_error(F_parameter);
if (name.used == 0) return F_data_not;
if (value.used == 0) return F_data_not;
- f_status status = F_none;
+ f_status_t status = F_none;
status = private_fll_execute_arguments_add_parameter(prefix.string, prefix.used, name.string, name.used, value.string, value.used, arguments);
#endif // _di_fll_execute_arguments_dynamic_add_parameter_
#ifndef _di_fll_execute_arguments_dynamic_add_parameter_set_
- f_return_status fll_execute_arguments_dynamic_add_parameter_set(const f_string_static prefix[], const f_string_static name[], const f_string_static value[], const f_array_length size, f_string_dynamics *arguments) {
+ f_return_status fll_execute_arguments_dynamic_add_parameter_set(const f_string_static_t prefix[], const f_string_static_t name[], const f_string_static_t value[], const f_array_length_t size, f_string_dynamics_t *arguments) {
#ifndef _di_level_2_parameter_checking_
if (arguments == 0) return F_status_set_error(F_parameter);
if (arguments->used > arguments->size) return F_status_set_error(F_parameter);
if (size == 0) return F_data_not;
- f_status status = F_none;
+ f_status_t status = F_none;
- for (f_array_length i = 0; i < size; i++) {
+ for (f_array_length_t i = 0; i < size; i++) {
if (prefix[i].used > prefix[i].size) continue;
if (name[i].used == 0) continue;
if (name[i].used > name[i].size) continue;
#endif // _di_fll_execute_arguments_dynamic_add_parameter_set_
#ifndef _di_fll_execute_arguments_dynamic_add_set_
- f_return_status fll_execute_arguments_dynamic_add_set(const f_string_static source[], const f_array_length size, f_string_dynamics *arguments) {
+ f_return_status fll_execute_arguments_dynamic_add_set(const f_string_static_t source[], const f_array_length_t size, f_string_dynamics_t *arguments) {
#ifndef _di_level_2_parameter_checking_
if (arguments == 0) return F_status_set_error(F_parameter);
if (arguments->used > arguments->size) return F_status_set_error(F_parameter);
if (size == 0) return F_data_not;
- f_status status = F_none;
+ f_status_t status = F_none;
- for (f_array_length i = 0; i < size; i++) {
+ for (f_array_length_t i = 0; i < size; i++) {
if (source[i].used == 0) continue;
if (source[i].used > source[i].size) continue;
#endif // _di_fll_execute_arguments_dynamic_add_set_
#ifndef _di_fll_execute_path_
- f_return_status fll_execute_path(const f_string program_path, const f_string_statics arguments, int *result) {
+ f_return_status fll_execute_path(const f_string_t program_path, const f_string_statics_t arguments, int *result) {
#ifndef _di_level_2_parameter_checking_
if (result == 0) return F_status_set_error(F_parameter);
if (arguments.used > arguments.size) return F_status_set_error(F_parameter);
#endif // _di_level_2_parameter_checking_
// create a string array that is compatible with execv() calls.
- f_string fixed_arguments[arguments.used + 2];
+ f_string_t fixed_arguments[arguments.used + 2];
- f_string last_slash = f_string_initialize;
- f_string program_name = f_string_initialize;
+ f_string_t last_slash = f_string_t_initialize;
+ f_string_t program_name = f_string_t_initialize;
- f_string_length name_size = 0;
+ f_string_length_t name_size = 0;
- f_status status = F_none;
+ f_status_t status = F_none;
- memset(&fixed_arguments, 0, sizeof(f_string) * (arguments.used + 2));
+ memset(&fixed_arguments, 0, sizeof(f_string_t) * (arguments.used + 2));
last_slash = strrchr(program_path, '/');
name_size = strnlen(program_path, f_path_max);
if (name_size > 1) {
- f_macro_string_new(status, program_name, name_size + 1);
+ f_macro_string_t_new(status, program_name, name_size + 1);
if (F_status_is_error(status)) return status;
name_size = strnlen(last_slash, f_path_max);
if (name_size > 1) {
- f_macro_string_new(status, program_name, name_size + 1);
+ f_macro_string_t_new(status, program_name, name_size + 1);
if (F_status_is_error(status)) return status;
fixed_arguments[0] = program_name;
}
- for (f_string_length i = 0; i < arguments.used; i++) {
- f_macro_string_new(status, fixed_arguments[i + 1], arguments.array[i].used + 1);
+ for (f_string_length_t i = 0; i < arguments.used; i++) {
+ f_macro_string_t_new(status, fixed_arguments[i + 1], arguments.array[i].used + 1);
if (F_status_is_error(status)) {
- if (name_size > 0) f_macro_string_delete_simple(program_name, name_size);
+ if (name_size > 0) f_macro_string_t_delete_simple(program_name, name_size);
- for (f_string_length j = 0; j < i; j++) {
- f_macro_string_delete_simple(fixed_arguments[i + 1], arguments.array[j].used + 1);
+ for (f_string_length_t j = 0; j < i; j++) {
+ f_macro_string_t_delete_simple(fixed_arguments[i + 1], arguments.array[j].used + 1);
} // for
return status;
status = f_file_exists(program_path);
if (F_status_is_error(status)) {
- if (name_size > 0) f_macro_string_delete_simple(program_name, name_size);
+ if (name_size > 0) f_macro_string_t_delete_simple(program_name, name_size);
- for (f_string_length i = 0; i < arguments.used; i++) {
- f_macro_string_delete_simple(fixed_arguments[i + 1], arguments.array[i].used + 1);
+ for (f_string_length_t i = 0; i < arguments.used; i++) {
+ f_macro_string_t_delete_simple(fixed_arguments[i + 1], arguments.array[i].used + 1);
} // for
return status;
}
else if (status == F_false) {
- if (name_size > 0) f_macro_string_delete_simple(program_name, name_size);
+ if (name_size > 0) f_macro_string_t_delete_simple(program_name, name_size);
- for (f_string_length i = 0; i < arguments.used; i++) {
- f_macro_string_delete_simple(fixed_arguments[i + 1], arguments.array[i].used + 1);
+ for (f_string_length_t i = 0; i < arguments.used; i++) {
+ f_macro_string_t_delete_simple(fixed_arguments[i + 1], arguments.array[i].used + 1);
} // for
return F_status_set_error(F_file_found_not);
process_id = fork();
if (process_id < 0) {
- if (name_size > 0) f_macro_string_delete_simple(program_name, name_size);
+ if (name_size > 0) f_macro_string_t_delete_simple(program_name, name_size);
- for (f_string_length i = 0; i < arguments.used; i++) {
- f_macro_string_delete_simple(fixed_arguments[i + 1], arguments.array[i].used + 1);
+ for (f_string_length_t i = 0; i < arguments.used; i++) {
+ f_macro_string_t_delete_simple(fixed_arguments[i + 1], arguments.array[i].used + 1);
} // for
return F_status_set_error(F_fork);
// have the parent wait for the child process to finish
waitpid(process_id, result, 0);
- if (name_size > 0) f_macro_string_delete_simple(program_name, name_size);
+ if (name_size > 0) f_macro_string_t_delete_simple(program_name, name_size);
- for (f_string_length i = 0; i < arguments.used; i++) {
- f_macro_string_delete_simple(fixed_arguments[i + 1], arguments.array[i].used + 1);
+ for (f_string_length_t i = 0; i < arguments.used; i++) {
+ f_macro_string_t_delete_simple(fixed_arguments[i + 1], arguments.array[i].used + 1);
} // for
if (result != 0 && *result != 0) return F_status_set_error(F_failure);
#endif // _di_fll_execute_path_
#ifndef _di_fll_execute_path_environment_
- f_return_status fll_execute_path_environment(const f_string program_path, const f_string_statics arguments, const f_string_statics names, const f_string_statics values, int *result) {
+ f_return_status fll_execute_path_environment(const f_string_t program_path, const f_string_statics_t arguments, const f_string_statics_t names, const f_string_statics_t values, int *result) {
#ifndef _di_level_2_parameter_checking_
if (result == 0) return F_status_set_error(F_parameter);
if (arguments.used > arguments.size) return F_status_set_error(F_parameter);
#endif // _di_level_2_parameter_checking_
// create a string array that is compatible with execv() calls.
- f_string fixed_arguments[arguments.used + 2];
+ f_string_t fixed_arguments[arguments.used + 2];
- f_string last_slash = f_string_initialize;
- f_string program_name = f_string_initialize;
+ f_string_t last_slash = f_string_t_initialize;
+ f_string_t program_name = f_string_t_initialize;
- f_string_length name_size = 0;
+ f_string_length_t name_size = 0;
- f_status status = F_none;
+ f_status_t status = F_none;
- memset(&fixed_arguments, 0, sizeof(f_string) * (arguments.used + 2));
+ memset(&fixed_arguments, 0, sizeof(f_string_t) * (arguments.used + 2));
last_slash = strrchr(program_path, '/');
name_size = strnlen(program_path, f_path_max);
if (name_size > 1) {
- f_macro_string_new(status, program_name, name_size + 1);
+ f_macro_string_t_new(status, program_name, name_size + 1);
if (F_status_is_error(status)) return status;
name_size = strnlen(last_slash, f_path_max);
if (name_size > 1) {
- f_macro_string_new(status, program_name, name_size + 1);
+ f_macro_string_t_new(status, program_name, name_size + 1);
if (F_status_is_error(status)) return status;
fixed_arguments[0] = program_name;
}
- for (f_string_length i = 0; i < arguments.used; i++) {
- f_macro_string_new(status, fixed_arguments[i + 1], arguments.array[i].used + 1);
+ for (f_string_length_t i = 0; i < arguments.used; i++) {
+ f_macro_string_t_new(status, fixed_arguments[i + 1], arguments.array[i].used + 1);
if (F_status_is_error(status)) {
- if (name_size > 0) f_macro_string_delete_simple(program_name, name_size);
+ if (name_size > 0) f_macro_string_t_delete_simple(program_name, name_size);
- for (f_string_length j = 0; j < i; j++) {
- f_macro_string_delete_simple(fixed_arguments[i + 1], arguments.array[j].used + 1);
+ for (f_string_length_t j = 0; j < i; j++) {
+ f_macro_string_t_delete_simple(fixed_arguments[i + 1], arguments.array[j].used + 1);
} // for
return status;
status = f_file_exists(program_path);
if (F_status_is_error(status)) {
- if (name_size > 0) f_macro_string_delete_simple(program_name, name_size);
+ if (name_size > 0) f_macro_string_t_delete_simple(program_name, name_size);
- for (f_string_length i = 0; i < arguments.used; i++) {
- f_macro_string_delete_simple(fixed_arguments[i + 1], arguments.array[i].used + 1);
+ for (f_string_length_t i = 0; i < arguments.used; i++) {
+ f_macro_string_t_delete_simple(fixed_arguments[i + 1], arguments.array[i].used + 1);
} // for
return status;
}
else if (status == F_false) {
- if (name_size > 0) f_macro_string_delete_simple(program_name, name_size);
+ if (name_size > 0) f_macro_string_t_delete_simple(program_name, name_size);
- for (f_string_length i = 0; i < arguments.used; i++) {
- f_macro_string_delete_simple(fixed_arguments[i + 1], arguments.array[i].used + 1);
+ for (f_string_length_t i = 0; i < arguments.used; i++) {
+ f_macro_string_t_delete_simple(fixed_arguments[i + 1], arguments.array[i].used + 1);
} // for
return F_status_set_error(F_file_found_not);
process_id = fork();
if (process_id < 0) {
- if (name_size > 0) f_macro_string_delete_simple(program_name, name_size);
+ if (name_size > 0) f_macro_string_t_delete_simple(program_name, name_size);
- for (f_string_length i = 0; i < arguments.used; i++) {
- f_macro_string_delete_simple(fixed_arguments[i + 1], arguments.array[i].used + 1);
+ for (f_string_length_t i = 0; i < arguments.used; i++) {
+ f_macro_string_t_delete_simple(fixed_arguments[i + 1], arguments.array[i].used + 1);
} // for
return F_status_set_error(F_fork);
if (process_id == 0) {
clearenv();
- for (f_array_length i = 0; i < names.used; i++) {
+ for (f_array_length_t i = 0; i < names.used; i++) {
f_environment_set_dynamic(names.array[i], values.array[i], F_true);
} // for
// have the parent wait for the child process to finish
waitpid(process_id, result, 0);
- if (name_size > 0) f_macro_string_delete_simple(program_name, name_size);
+ if (name_size > 0) f_macro_string_t_delete_simple(program_name, name_size);
- for (f_string_length i = 0; i < arguments.used; i++) {
- f_macro_string_delete_simple(fixed_arguments[i + 1], arguments.array[i].used + 1);
+ for (f_string_length_t i = 0; i < arguments.used; i++) {
+ f_macro_string_t_delete_simple(fixed_arguments[i + 1], arguments.array[i].used + 1);
} // for
if (result != 0 && *result != 0) return F_status_set_error(F_failure);
#endif // _di_fll_execute_path_environment_
#ifndef _di_fll_execute_program_
- f_return_status fll_execute_program(const f_string program_name, const f_string_statics arguments, int *result) {
+ f_return_status fll_execute_program(const f_string_t program_name, const f_string_statics_t arguments, int *result) {
#ifndef _di_level_2_parameter_checking_
if (result == 0) return F_status_set_error(F_parameter);
if (arguments.used > arguments.size) return F_status_set_error(F_parameter);
#endif // _di_level_2_parameter_checking_
// create a string array that is compatible with execv() calls.
- f_string fixed_arguments[arguments.used + 2];
+ f_string_t fixed_arguments[arguments.used + 2];
- memset(&fixed_arguments, 0, sizeof(f_string) * (arguments.used + 2));
+ memset(&fixed_arguments, 0, sizeof(f_string_t) * (arguments.used + 2));
fixed_arguments[0] = program_name;
- f_status status = F_none;
- f_array_length i = 0;
+ f_status_t status = F_none;
+ f_array_length_t i = 0;
for (; i < arguments.used; i++) {
- f_macro_string_new(status, fixed_arguments[i + 1], arguments.array[i].used + 1);
+ f_macro_string_t_new(status, fixed_arguments[i + 1], arguments.array[i].used + 1);
if (F_status_is_error(status)) {
- for (f_array_length j = 0; j < i; j++) {
- f_macro_string_delete_simple(fixed_arguments[j + 1], arguments.array[j].used + 1);
+ for (f_array_length_t j = 0; j < i; j++) {
+ f_macro_string_t_delete_simple(fixed_arguments[j + 1], arguments.array[j].used + 1);
} // for
return status;
if (process_id < 0) {
for (i = 0; i < arguments.used; i++) {
- f_macro_string_delete_simple(fixed_arguments[i + 1], arguments.array[i].used + 1);
+ f_macro_string_t_delete_simple(fixed_arguments[i + 1], arguments.array[i].used + 1);
} // for
return F_status_set_error(F_fork);
execvp(program_name, fixed_arguments);
for (i = 0; i < arguments.used; i++) {
- f_macro_string_delete_simple(fixed_arguments[i + 1], arguments.array[i].used + 1);
+ f_macro_string_t_delete_simple(fixed_arguments[i + 1], arguments.array[i].used + 1);
} // for
// according to manpages, calling _exit() is safer and should be called here instead of exit()
}
for (i = 0; i < arguments.used; i++) {
- f_macro_string_delete_simple(fixed_arguments[i + 1], arguments.array[i].used + 1);
+ f_macro_string_t_delete_simple(fixed_arguments[i + 1], arguments.array[i].used + 1);
} // for
// have the parent wait for the child process to finish
#endif // _di_fll_execute_program_
#ifndef _di_fll_execute_program_environment_
- f_return_status fll_execute_program_environment(const f_string program_name, const f_string_statics arguments, const f_string_statics names, const f_string_statics values, int *result) {
+ f_return_status fll_execute_program_environment(const f_string_t program_name, const f_string_statics_t arguments, const f_string_statics_t names, const f_string_statics_t values, int *result) {
#ifndef _di_level_2_parameter_checking_
if (result == 0) return F_status_set_error(F_parameter);
if (arguments.used > arguments.size) return F_status_set_error(F_parameter);
#endif // _di_level_2_parameter_checking_
// create a string array that is compatible with execv() calls.
- f_string fixed_arguments[arguments.used + 2];
+ f_string_t fixed_arguments[arguments.used + 2];
- memset(&fixed_arguments, 0, sizeof(f_string) * (arguments.used + 2));
+ memset(&fixed_arguments, 0, sizeof(f_string_t) * (arguments.used + 2));
fixed_arguments[0] = program_name;
- f_status status = F_none;
- f_array_length i = 0;
+ f_status_t status = F_none;
+ f_array_length_t i = 0;
for (; i < arguments.used; i++) {
- f_macro_string_new(status, fixed_arguments[i + 1], arguments.array[i].used + 1);
+ f_macro_string_t_new(status, fixed_arguments[i + 1], arguments.array[i].used + 1);
if (F_status_is_error(status)) {
- for (f_array_length j = 0; j < i; j++) {
- f_macro_string_delete_simple(fixed_arguments[j + 1], arguments.array[j].used + 1);
+ for (f_array_length_t j = 0; j < i; j++) {
+ f_macro_string_t_delete_simple(fixed_arguments[j + 1], arguments.array[j].used + 1);
} // for
return status;
// insert the required array terminated
fixed_arguments[arguments.used + 2] = 0;
- f_string_dynamic path = f_string_dynamic_initialize;
- f_string_dynamics paths = f_string_dynamics_initialize;
+ f_string_dynamic_t path = f_string_dynamic_t_initialize;
+ f_string_dynamics_t paths = f_string_dynamics_t_initialize;
status = f_environment_get("PATH", &path);
if (F_status_is_error(status)) {
for (i = 0; i < arguments.used; i++) {
- f_macro_string_delete_simple(fixed_arguments[i + 1], arguments.array[i].used + 1);
+ f_macro_string_t_delete_simple(fixed_arguments[i + 1], arguments.array[i].used + 1);
} // for
- f_macro_string_dynamic_delete_simple(path);
- f_macro_string_dynamics_delete_simple(paths);
+ f_macro_string_dynamic_t_delete_simple(path);
+ f_macro_string_dynamics_t_delete_simple(paths);
return status;
}
- f_macro_string_dynamic_delete(status, path);
+ f_macro_string_dynamic_t_delete(status, path);
if (F_status_is_error(status)) {
for (i = 0; i < arguments.used; i++) {
- f_macro_string_delete_simple(fixed_arguments[i + 1], arguments.array[i].used + 1);
+ f_macro_string_t_delete_simple(fixed_arguments[i + 1], arguments.array[i].used + 1);
} // for
- f_macro_string_dynamics_delete_simple(paths);
+ f_macro_string_dynamics_t_delete_simple(paths);
return status;
}
- const f_string_length program_name_length = strnlen(program_name, f_path_max);
- f_string_dynamic *found = 0;
+ const f_string_length_t program_name_length = strnlen(program_name, f_path_max);
+ f_string_dynamic_t *found = 0;
for (i = 0; i < paths.used; i++) {
status = fl_string_append(program_name, program_name_length, &paths.array[i]);
if (F_status_is_error(status)) {
for (i = 0; i < arguments.used; i++) {
- f_macro_string_delete_simple(fixed_arguments[i + 1], arguments.array[i].used + 1);
+ f_macro_string_t_delete_simple(fixed_arguments[i + 1], arguments.array[i].used + 1);
} // for
- f_macro_string_dynamics_delete_simple(paths);
+ f_macro_string_dynamics_t_delete_simple(paths);
return status;
}
} // for
if (found == 0) {
for (i = 0; i < arguments.used; i++) {
- f_macro_string_delete_simple(fixed_arguments[i + 1], arguments.array[i].used + 1);
+ f_macro_string_t_delete_simple(fixed_arguments[i + 1], arguments.array[i].used + 1);
} // for
- f_macro_string_dynamics_delete_simple(paths);
+ f_macro_string_dynamics_t_delete_simple(paths);
return F_status_set_error(F_file_found_not);
}
memcpy(&program_path, found->string, found->used);
- f_macro_string_dynamics_delete(status, paths);
+ f_macro_string_dynamics_t_delete(status, paths);
if (F_status_is_error(status)) {
for (i = 0; i < arguments.used; i++) {
- f_macro_string_delete_simple(fixed_arguments[i + 1], arguments.array[i].used + 1);
+ f_macro_string_t_delete_simple(fixed_arguments[i + 1], arguments.array[i].used + 1);
} // for
return status;
if (process_id < 0) {
for (i = 0; i < arguments.used; i++) {
- f_macro_string_delete_simple(fixed_arguments[i + 1], arguments.array[i].used + 1);
+ f_macro_string_t_delete_simple(fixed_arguments[i + 1], arguments.array[i].used + 1);
} // for
return F_status_set_error(F_fork);
execvp(program_path, fixed_arguments);
for (i = 0; i < arguments.used; i++) {
- f_macro_string_delete_simple(fixed_arguments[i + 1], arguments.array[i].used + 1);
+ f_macro_string_t_delete_simple(fixed_arguments[i + 1], arguments.array[i].used + 1);
} // for
// according to manpages, calling _exit() is safer and should be called here instead of exit()
}
for (i = 0; i < arguments.used; i++) {
- f_macro_string_delete_simple(fixed_arguments[i + 1], arguments.array[i].used + 1);
+ f_macro_string_t_delete_simple(fixed_arguments[i + 1], arguments.array[i].used + 1);
} // for
// have the parent wait for the child process to finish
* F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_fll_execute_arguments_add_
- extern f_return_status fll_execute_arguments_add(const f_string source, const f_string_length length, f_string_dynamics *arguments);
+ extern f_return_status fll_execute_arguments_add(const f_string_t source, const f_string_length_t length, f_string_dynamics_t *arguments);
#endif // _di_fll_execute_arguments_add_
/**
* Add parameters as arguments to the execution arguments array.
* F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_fll_execute_arguments_add_parameter_
- extern f_return_status fll_execute_arguments_add_parameter(const f_string prefix, const f_string_length prefix_length, const f_string name, const f_string_length name_length, const f_string value, const f_string_length value_length, f_string_dynamics *arguments);
+ extern f_return_status fll_execute_arguments_add_parameter(const f_string_t prefix, const f_string_length_t prefix_length, const f_string_t name, const f_string_length_t name_length, const f_string_t value, const f_string_length_t value_length, f_string_dynamics_t *arguments);
#endif // _di_fll_execute_arguments_add_parameter_
/**
* F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_fll_execute_arguments_add_parameter_set_
- extern f_return_status fll_execute_arguments_add_parameter_set(const f_string prefix[], const f_string_length prefix_length[], const f_string name[], const f_string_length name_length[], const f_string value[], const f_string_length value_length[], const f_array_length size, f_string_dynamics *arguments);
+ extern f_return_status fll_execute_arguments_add_parameter_set(const f_string_t prefix[], const f_string_length_t prefix_length[], const f_string_t name[], const f_string_length_t name_length[], const f_string_t value[], const f_string_length_t value_length[], const f_array_length_t size, f_string_dynamics_t *arguments);
#endif // _di_fll_execute_arguments_add_parameter_set_
/**
* F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_fll_execute_arguments_add_set_
- extern f_return_status fll_execute_arguments_add_set(const f_string source[], const f_string_length length[], const f_array_length size, f_string_dynamics *arguments);
+ extern f_return_status fll_execute_arguments_add_set(const f_string_t source[], const f_string_length_t length[], const f_array_length_t size, f_string_dynamics_t *arguments);
#endif // _di_fll_execute_arguments_add_set_
/**
* F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_fll_execute_arguments_dynamic_add_
- extern f_return_status fll_execute_arguments_dynamic_add(const f_string_static source, f_string_dynamics *arguments);
+ extern f_return_status fll_execute_arguments_dynamic_add(const f_string_static_t source, f_string_dynamics_t *arguments);
#endif // _di_fll_execute_arguments_dynamic_add_
/**
* F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_fll_execute_arguments_dynamic_add_parameter_
- extern f_return_status fll_execute_arguments_dynamic_add_parameter(const f_string_static prefix, const f_string_static name, const f_string_static value, f_string_dynamics *arguments);
+ extern f_return_status fll_execute_arguments_dynamic_add_parameter(const f_string_static_t prefix, const f_string_static_t name, const f_string_static_t value, f_string_dynamics_t *arguments);
#endif // _di_fll_execute_arguments_dynamic_add_parameter_
/**
* F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_fll_execute_arguments_dynamic_add_parameter_set_
- extern f_return_status fll_execute_arguments_dynamic_add_parameter_set(const f_string_static prefix[], const f_string_static name[], const f_string_static value[], const f_array_length size, f_string_dynamics *arguments);
+ extern f_return_status fll_execute_arguments_dynamic_add_parameter_set(const f_string_static_t prefix[], const f_string_static_t name[], const f_string_static_t value[], const f_array_length_t size, f_string_dynamics_t *arguments);
#endif // _di_fll_execute_arguments_dynamic_add_parameter_set_
/**
* F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_fll_execute_arguments_dynamic_add_set_
- extern f_return_status fll_execute_arguments_dynamic_add_set(const f_string_static source[], const f_array_length size, f_string_dynamics *arguments);
+ extern f_return_status fll_execute_arguments_dynamic_add_set(const f_string_static_t source[], const f_array_length_t size, f_string_dynamics_t *arguments);
#endif // _di_fll_execute_arguments_dynamic_add_set_
/**
* @see execv()
*/
#ifndef _di_fll_execute_path_
- extern f_return_status fll_execute_path(const f_string program_path, const f_string_statics arguments, int *result);
+ extern f_return_status fll_execute_path(const f_string_t program_path, const f_string_statics_t arguments, int *result);
#endif // _di_fll_execute_path_
/**
* @see execv()
*/
#ifndef _di_fll_execute_path_environment_
- f_return_status fll_execute_path_environment(const f_string program_path, const f_string_statics arguments, const f_string_statics names, const f_string_statics values, int *result);
+ f_return_status fll_execute_path_environment(const f_string_t program_path, const f_string_statics_t arguments, const f_string_statics_t names, const f_string_statics_t values, int *result);
#endif // _di_fll_execute_path_environment_
/**
* @see execvp()
*/
#ifndef _di_fll_execute_program_
- extern f_return_status fll_execute_program(const f_string program_name, const f_string_statics arguments, int *result);
+ extern f_return_status fll_execute_program(const f_string_t program_name, const f_string_statics_t arguments, int *result);
#endif // _di_fll_execute_program_
/**
* @see execvpe()
*/
#ifndef _di_fll_execute_program_environment_
- extern f_return_status fll_execute_program_environment(const f_string program_name, const f_string_statics arguments, const f_string_statics names, const f_string_statics values, int *result);
+ extern f_return_status fll_execute_program_environment(const f_string_t program_name, const f_string_statics_t arguments, const f_string_statics_t names, const f_string_statics_t values, int *result);
#endif // _di_fll_execute_program_environment_
#ifdef __cplusplus
#endif
#if !defined(_di_fll_execute_arguments_add_) || !defined(_di_fll_execute_arguments_add_set_) || !defined(_di_fll_execute_arguments_dynamic_add_) || !defined(_di_fll_execute_arguments_dynamic_add_set_)
- f_return_status private_fll_execute_arguments_add(const f_string source, const f_string_length length, f_string_dynamics *arguments) {
- f_status status = F_none;
+ f_return_status private_fll_execute_arguments_add(const f_string_t source, const f_string_length_t length, f_string_dynamics_t *arguments) {
+ f_status_t status = F_none;
if (arguments->used == arguments->size) {
- if (arguments->size + f_memory_default_allocation_step > f_array_length_size) {
- if (arguments->size + 1 > f_array_length_size) return F_buffer_too_large;
+ if (arguments->size + f_memory_default_allocation_step > f_array_length_t_size) {
+ if (arguments->size + 1 > f_array_length_t_size) return F_buffer_too_large;
f_macro_string_dynamics_resize(status, (*arguments), arguments->size + 1);
}
else {
if (F_status_is_error(status)) return status;
}
- f_string_dynamic argument = f_string_dynamic_initialize;
+ f_string_dynamic_t argument = f_string_dynamic_t_initialize;
status = fl_string_append(source, length, &argument);
if (F_status_is_error(status)) {
- f_macro_string_dynamic_delete_simple(argument);
+ f_macro_string_dynamic_t_delete_simple(argument);
return status;
}
status = fl_string_dynamic_terminate(&argument);
if (F_status_is_error(status)) {
- f_macro_string_dynamic_delete_simple(argument);
+ f_macro_string_dynamic_t_delete_simple(argument);
return status;
}
#endif // !defined(_di_fll_execute_arguments_add_) || !defined(_di_fll_execute_arguments_add_set_) || !defined(_di_fll_execute_arguments_dynamic_add_) || !defined(_di_fll_execute_arguments_dynamic_add_set_)
#if !defined(_di_fll_execute_arguments_add_parameter_) || !defined(_di_fll_execute_arguments_add_parameter_set_) || !defined(_di_fll_execute_arguments_dynamic_add_parameter_) || !defined(_di_fll_execute_arguments_dynamic_add_parameter_set_)
- f_return_status private_fll_execute_arguments_add_parameter(const f_string prefix, const f_string_length prefix_length, const f_string name, const f_string_length name_length, const f_string value, const f_string_length value_length, f_string_dynamics *arguments) {
- f_status status = F_none;
+ f_return_status private_fll_execute_arguments_add_parameter(const f_string_t prefix, const f_string_length_t prefix_length, const f_string_t name, const f_string_length_t name_length, const f_string_t value, const f_string_length_t value_length, f_string_dynamics_t *arguments) {
+ f_status_t status = F_none;
if (arguments->used + 1 >= arguments->size) {
- if (arguments->size + f_memory_default_allocation_step > f_array_length_size) {
- if (arguments->size + 2 > f_array_length_size) return F_buffer_too_large;
+ if (arguments->size + f_memory_default_allocation_step > f_array_length_t_size) {
+ if (arguments->size + 2 > f_array_length_t_size) return F_buffer_too_large;
f_macro_string_dynamics_resize(status, (*arguments), arguments->size + 2);
}
else {
if (F_status_is_error(status)) return status;
}
- f_string_dynamic argument = f_string_dynamic_initialize;
+ f_string_dynamic_t argument = f_string_dynamic_t_initialize;
if (prefix_length > 0) {
status = fl_string_append(prefix, prefix_length, &argument);
if (F_status_is_error(status)) {
- f_macro_string_dynamic_delete_simple(argument);
+ f_macro_string_dynamic_t_delete_simple(argument);
return status;
}
}
status = fl_string_append(name, name_length, &argument);
if (F_status_is_error(status)) {
- f_macro_string_dynamic_delete_simple(argument);
+ f_macro_string_dynamic_t_delete_simple(argument);
return status;
}
status = fl_string_dynamic_terminate(&argument);
if (F_status_is_error(status)) {
- f_macro_string_dynamic_delete_simple(argument);
+ f_macro_string_dynamic_t_delete_simple(argument);
return status;
}
arguments->array[arguments->used].size = argument.size;
arguments->used++;
- f_macro_string_dynamic_clear(argument);
+ f_macro_string_dynamic_t_clear(argument);
status = fl_string_append(value, value_length, &argument);
if (F_status_is_error(status)) {
- f_macro_string_dynamic_delete_simple(argument);
+ f_macro_string_dynamic_t_delete_simple(argument);
return status;
}
status = fl_string_dynamic_terminate(&argument);
if (F_status_is_error(status)) {
- f_macro_string_dynamic_delete_simple(argument);
+ f_macro_string_dynamic_t_delete_simple(argument);
return status;
}
* @see fll_execute_arguments_dynamic_add_set()
*/
#if !defined(_di_fll_execute_arguments_add_) || !defined(_di_fll_execute_arguments_add_set_) || !defined(_di_fll_execute_arguments_dynamic_add_) || !defined(_di_fll_execute_arguments_dynamic_add_set_)
- extern f_return_status private_fll_execute_arguments_add(const f_string source, const f_string_length length, f_string_dynamics *arguments) f_gcc_attribute_visibility_internal;
+ extern f_return_status private_fll_execute_arguments_add(const f_string_t source, const f_string_length_t length, f_string_dynamics_t *arguments) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_fll_execute_arguments_add_) || !defined(_di_fll_execute_arguments_add_set_) || !defined(_di_fll_execute_arguments_dynamic_add_) || !defined(_di_fll_execute_arguments_dynamic_add_set_)
/**
* @see fll_execute_arguments_dynamic_add_parameter_set()
*/
#if !defined(_di_fll_execute_arguments_add_parameter_) || !defined(_di_fll_execute_arguments_add_parameter_set_) || !defined(_di_fll_execute_arguments_dynamic_add_parameter_) || !defined(_di_fll_execute_arguments_dynamic_add_parameter_set_)
- extern f_return_status private_fll_execute_arguments_add_parameter(const f_string prefix, const f_string_length prefix_length, const f_string name, const f_string_length name_length, const f_string value, const f_string_length value_length, f_string_dynamics *arguments) f_gcc_attribute_visibility_internal;
+ extern f_return_status private_fll_execute_arguments_add_parameter(const f_string_t prefix, const f_string_length_t prefix_length, const f_string_t name, const f_string_length_t name_length, const f_string_t value, const f_string_length_t value_length, f_string_dynamics_t *arguments) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_fll_execute_arguments_add_parameter_) || !defined(_di_fll_execute_arguments_add_parameter_set_) || !defined(_di_fll_execute_arguments_dynamic_add_parameter_) || !defined(_di_fll_execute_arguments_dynamic_add_parameter_set_)
#ifdef __cplusplus
#endif
#ifndef _di_fll_file_error_print_
- f_return_status fll_file_error_print(FILE *file, const fl_color_context context, const f_string function_name, const f_string file_name, const f_status status) {
+ f_return_status fll_file_error_print(FILE *file, const fl_color_context_t context, const f_string_t function_name, const f_string_t file_name, const f_status_t status) {
if (status == F_memory_allocation || status == F_memory_reallocation) {
fl_color_print_line(file, context.error, context.reset, "CRITICAL ERROR: Unable to allocate memory.");
* F_false if no error message was printed.
*/
#ifndef _di_fll_file_error_print_
- extern f_return_status fll_file_error_print(FILE *file, const fl_color_context context, const f_string function_name, const f_string file_name, const f_status status);
+ extern f_return_status fll_file_error_print(FILE *file, const fl_color_context_t context, const f_string_t function_name, const f_string_t file_name, const f_status_t status);
#endif // _di_fll_file_error_print_
#ifdef __cplusplus
#endif
#ifndef _di_fll_fss_identify_
- f_return_status fll_fss_identify(const f_string_static buffer, f_fss_header *header) {
+ f_return_status fll_fss_identify(const f_string_static_t buffer, f_fss_header_t *header) {
#ifndef _di_level_2_parameter_checking_
if (header == 0) return F_status_set_error(F_parameter);
if (buffer.used == 0) return F_status_set_error(F_parameter);
#endif // _di_fll_fss_identify_
#ifndef _di_fll_fss_identify_file_
- f_return_status fll_fss_identify_file(f_file *file, f_fss_header *header) {
+ f_return_status fll_fss_identify_file(f_file_t *file, f_fss_header_t *header) {
#ifndef _di_level_2_parameter_checking_
if (file == 0) return F_status_set_error(F_parameter);
if (header == 0) return F_status_set_error(F_parameter);
#endif // _di_level_2_parameter_checking_
{
- f_string_length seeked = 0;
+ f_string_length_t seeked = 0;
if (F_status_is_error(f_file_seek(file->id, SEEK_SET, 0, &seeked))) {
return F_status_set_error(F_file_seek);
}
}
- f_status status = F_none;
- f_string_dynamic buffer = f_string_dynamic_initialize;
+ f_status_t status = F_none;
+ f_string_dynamic_t buffer = f_string_dynamic_t_initialize;
- f_macro_string_dynamic_resize(status, buffer, f_fss_max_header_length + 1);
+ f_macro_string_dynamic_t_resize(status, buffer, f_fss_max_header_length + 1);
if (F_status_is_error(status)) return status;
status = f_file_read_until(*file, &buffer, f_fss_max_header_length + 1);
#endif // _di_fll_fss_identify_file_
#ifndef _di_fll_fss_snatch_
- f_return_status fll_fss_snatch(const f_string_static buffer, const f_fss_objects objects, const f_fss_contents contents, const f_string names[], const f_string_length lengths[], const f_string_length size, f_string_dynamic *values[], f_array_length *indexs[]) {
+ f_return_status fll_fss_snatch(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_t names[], const f_string_length_t lengths[], const f_string_length_t size, f_string_dynamic_t *values[], f_array_length_t *indexs[]) {
#ifndef _di_level_2_parameter_checking_
if (size == 0) return F_status_set_error(F_parameter);
if (objects.used != contents.used) return F_status_set_error(F_parameter);
if (objects.used == 0) return F_data_not;
if (contents.used == 0) return F_data_not;
- f_status status = F_none;
- f_string_length length_object = 0;
+ f_status_t status = F_none;
+ f_string_length_t length_object = 0;
- f_array_length i = 0;
- f_array_length j = 0;
- f_array_length k = 0;
+ f_array_length_t i = 0;
+ f_array_length_t j = 0;
+ f_array_length_t k = 0;
bool matched[size];
#endif // _di_fll_fss_snatch_
#ifndef _di_fll_fss_snatch_apart_
- f_return_status fll_fss_snatch_apart(const f_string_static buffer, const f_fss_objects objects, const f_fss_contents contents, const f_string names[], const f_string_length lengths[], const f_string_length size, f_string_dynamics *values[], f_array_lengths *indexs[]) {
+ f_return_status fll_fss_snatch_apart(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_t names[], const f_string_length_t lengths[], const f_string_length_t size, f_string_dynamics_t *values[], f_array_lengths_t *indexs[]) {
#ifndef _di_level_2_parameter_checking_
if (size == 0) return F_status_set_error(F_parameter);
if (objects.used != contents.used) return F_status_set_error(F_parameter);
if (objects.used == 0) return F_data_not;
if (contents.used == 0) return F_data_not;
- f_status status = F_none;
- f_string_length length_object = 0;
- f_string_dynamics *value = 0;
- f_fss_content *content = 0;
+ f_status_t status = F_none;
+ f_string_length_t length_object = 0;
+ f_string_dynamics_t *value = 0;
+ f_fss_content_t *content = 0;
- f_array_length i = 0;
- f_array_length j = 0;
- f_array_length k = 0;
+ f_array_length_t i = 0;
+ f_array_length_t j = 0;
+ f_array_length_t k = 0;
for (; i < objects.used; i++) {
length_object = (objects.array[i].stop - objects.array[i].start) + 1;
content = &contents.array[i];
if (values[j]->used + contents.array[i].used > values[j]->size) {
- if (values[j]->used + contents.array[i].used > f_array_length_size) {
+ if (values[j]->used + contents.array[i].used > f_array_length_t_size) {
return F_status_set_error(F_buffer_too_large);
}
if (F_status_is_error(status)) return status;
if (indexs) {
- f_macro_array_lengths_resize(status, (*indexs[j]), (indexs[j]->used + content->used));
+ f_macro_array_lengths_t_resize(status, (*indexs[j]), (indexs[j]->used + content->used));
if (F_status_is_error(status)) return status;
}
}
#endif // _di_fll_fss_snatch_apart_
#ifndef _di_fll_fss_snatch_map_
- f_return_status fll_fss_snatch_map(const f_string_static buffer, const f_fss_objects objects, const f_fss_contents contents, const f_string names[], const f_string_length lengths[], const f_string_length size, f_string_maps *values[], f_array_lengths *indexs[]) {
+ f_return_status fll_fss_snatch_map(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_t names[], const f_string_length_t lengths[], const f_string_length_t size, f_string_maps_t *values[], f_array_lengths_t *indexs[]) {
#ifndef _di_level_2_parameter_checking_
if (size == 0) return F_status_set_error(F_parameter);
if (objects.used != contents.used) return F_status_set_error(F_parameter);
if (objects.used == 0) return F_data_not;
if (contents.used == 0) return F_data_not;
- f_status status = F_none;
- f_string_length length_name = 0;
- f_string_dynamic name = f_string_dynamic_initialize;
+ f_status_t status = F_none;
+ f_string_length_t length_name = 0;
+ f_string_dynamic_t name = f_string_dynamic_t_initialize;
- f_array_length i = 0;
- f_array_length j = 0;
- f_array_length k = 0;
+ f_array_length_t i = 0;
+ f_array_length_t j = 0;
+ f_array_length_t k = 0;
bool matched = F_false;
- f_string_map *map = 0;
+ f_string_map_t *map = 0;
for (; i < objects.used; i++) {
if (!contents.array[i].used) continue;
status = fl_string_dynamic_partial_append_nulless(buffer, contents.array[i].array[0], &name);
if (F_status_is_error(status)) {
- f_macro_string_dynamic_delete_simple(name);
+ f_macro_string_dynamic_t_delete_simple(name);
return status;
}
status = fl_string_compare_trim(buffer.string + contents.array[i].array[0].start, values[j]->array[k].name.string, length_name, values[j]->array[k].name.used);
if (F_status_is_error(status)) {
- f_macro_string_dynamic_delete_simple(name);
+ f_macro_string_dynamic_t_delete_simple(name);
return status;
}
if (status == F_equal_to) {
matched = F_true;
- f_macro_string_dynamic_delete_simple(name);
+ f_macro_string_dynamic_t_delete_simple(name);
break;
}
} // for
}
if (values[j]->used == values[j]->size) {
- if (values[j]->used + f_fss_default_allocation_step > f_array_length_size) {
- if (values[j]->used == f_array_length_size) {
- f_macro_string_dynamic_delete_simple(name);
+ if (values[j]->used + f_fss_default_allocation_step > f_array_length_t_size) {
+ if (values[j]->used == f_array_length_t_size) {
+ f_macro_string_dynamic_t_delete_simple(name);
return F_status_set_error(F_buffer_too_large);
}
- f_macro_string_maps_resize(status, (*values[j]), values[j]->used + 1);
+ f_macro_string_maps_t_resize(status, (*values[j]), values[j]->used + 1);
if (F_status_is_error(status)) {
- f_macro_string_dynamic_delete_simple(name);
+ f_macro_string_dynamic_t_delete_simple(name);
return status;
}
if (indexs) {
- f_macro_array_lengths_resize(status, (*indexs[j]), indexs[j]->used + 1);
+ f_macro_array_lengths_t_resize(status, (*indexs[j]), indexs[j]->used + 1);
if (F_status_is_error(status)) return status;
}
}
else {
- f_macro_string_maps_resize(status, (*values[j]), values[j]->used + f_fss_default_allocation_step);
+ f_macro_string_maps_t_resize(status, (*values[j]), values[j]->used + f_fss_default_allocation_step);
if (F_status_is_error(status)) {
- f_macro_string_dynamic_delete_simple(name);
+ f_macro_string_dynamic_t_delete_simple(name);
return status;
}
if (indexs) {
- f_macro_array_lengths_resize(status, (*indexs[j]), indexs[j]->used + f_fss_default_allocation_step);
+ f_macro_array_lengths_t_resize(status, (*indexs[j]), indexs[j]->used + f_fss_default_allocation_step);
if (F_status_is_error(status)) return status;
}
}
if (contents.array[i].used > 1) {
status = fl_string_dynamic_partial_append_nulless(buffer, contents.array[i].array[1], &map->value);
if (F_status_is_error(status)) {
- f_macro_string_dynamic_delete_simple(name);
+ f_macro_string_dynamic_t_delete_simple(name);
return status;
}
}
indexs[j]->used++;
}
- f_macro_string_dynamic_clear(name);
+ f_macro_string_dynamic_t_clear(name);
} // for
} // for
- f_macro_string_dynamic_delete_simple(name);
+ f_macro_string_dynamic_t_delete_simple(name);
return F_none;
}
#endif // _di_fll_fss_snatch_map_
#ifndef _di_fll_fss_snatch_map_apart_
- f_return_status fll_fss_snatch_map_apart(const f_string_static buffer, const f_fss_objects objects, const f_fss_contents contents, const f_string names[], const f_string_length lengths[], const f_string_length size, f_string_map_multis *values[], f_array_lengths *indexs[]) {
+ f_return_status fll_fss_snatch_map_apart(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_t names[], const f_string_length_t lengths[], const f_string_length_t size, f_string_map_multis_t *values[], f_array_lengths_t *indexs[]) {
#ifndef _di_level_2_parameter_checking_
if (size == 0) return F_status_set_error(F_parameter);
if (objects.used != contents.used) return F_status_set_error(F_parameter);
if (objects.used == 0) return F_data_not;
if (contents.used == 0) return F_data_not;
- f_status status = F_none;
- f_string_length length_object = 0;
+ f_status_t status = F_none;
+ f_string_length_t length_object = 0;
- f_array_length i = 0;
- f_array_length j = 0;
- f_array_length k = 0;
+ f_array_length_t i = 0;
+ f_array_length_t j = 0;
+ f_array_length_t k = 0;
- f_string_map_multi *map_multi = 0;
+ f_string_map_multi_t *map_multi = 0;
for (; i < objects.used; i++) {
if (!contents.array[i].used) continue;
if (status == F_equal_to_not) continue;
if (values[j]->used == values[j]->size) {
- if (values[j]->used + f_fss_default_allocation_step > f_array_length_size) {
- if (values[j]->used == f_array_length_size) {
+ if (values[j]->used + f_fss_default_allocation_step > f_array_length_t_size) {
+ if (values[j]->used == f_array_length_t_size) {
return F_status_set_error(F_buffer_too_large);
}
- f_macro_string_map_multis_resize(status, (*values[j]), values[j]->used + 1);
+ f_macro_string_map_multis_t_resize(status, (*values[j]), values[j]->used + 1);
if (F_status_is_error(status)) return status;
if (indexs) {
- f_macro_array_lengths_resize(status, (*indexs[j]), indexs[j]->used + 1);
+ f_macro_array_lengths_t_resize(status, (*indexs[j]), indexs[j]->used + 1);
if (F_status_is_error(status)) return status;
}
}
else {
- f_macro_string_map_multis_resize(status, (*values[j]), values[j]->used + f_fss_default_allocation_step);
+ f_macro_string_map_multis_t_resize(status, (*values[j]), values[j]->used + f_fss_default_allocation_step);
if (F_status_is_error(status)) return status;
if (indexs) {
- f_macro_array_lengths_resize(status, (*indexs[j]), indexs[j]->used + f_fss_default_allocation_step);
+ f_macro_array_lengths_t_resize(status, (*indexs[j]), indexs[j]->used + f_fss_default_allocation_step);
if (F_status_is_error(status)) return status;
}
}
if (contents.array[i].used > 1) {
if (map_multi->value.used + contents.array[i].used - 1 > map_multi->value.size) {
- if (map_multi->value.used + contents.array[i].used - 1 > f_array_length_size) return F_status_set_error(F_buffer_too_large);
+ if (map_multi->value.used + contents.array[i].used - 1 > f_array_length_t_size) return F_status_set_error(F_buffer_too_large);
f_macro_string_dynamics_resize(status, map_multi->value, map_multi->value.used + contents.array[i].used - 1);
if (F_status_is_error(status)) return status;
#endif // _di_fll_fss_snatch_map_apart_
#ifndef _di_fll_fss_snatch_map_mash_
- f_return_status fll_fss_snatch_map_mash(const f_string_static buffer, const f_fss_objects objects, const f_fss_contents contents, const f_string names[], const f_string_length lengths[], const f_string_length size, const f_string glue, const f_string_length glue_length, f_string_maps *values[], f_array_lengths *indexs[]) {
+ f_return_status fll_fss_snatch_map_mash(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_t names[], const f_string_length_t lengths[], const f_string_length_t size, const f_string_t glue, const f_string_length_t glue_length, f_string_maps_t *values[], f_array_lengths_t *indexs[]) {
#ifndef _di_level_2_parameter_checking_
if (size == 0) return F_status_set_error(F_parameter);
if (objects.used != contents.used) return F_status_set_error(F_parameter);
if (objects.used == 0) return F_data_not;
if (contents.used == 0) return F_data_not;
- f_status status = F_none;
- f_string_length length_object = 0;
+ f_status_t status = F_none;
+ f_string_length_t length_object = 0;
- f_array_length i = 0;
- f_array_length j = 0;
- f_array_length k = 0;
+ f_array_length_t i = 0;
+ f_array_length_t j = 0;
+ f_array_length_t k = 0;
- f_string_map *map = 0;
+ f_string_map_t *map = 0;
for (; i < objects.used; i++) {
if (!contents.array[i].used) continue;
if (status == F_equal_to_not) continue;
if (values[j]->used == values[j]->size) {
- if (values[j]->used + f_fss_default_allocation_step > f_array_length_size) {
- if (values[j]->used == f_array_length_size) {
+ if (values[j]->used + f_fss_default_allocation_step > f_array_length_t_size) {
+ if (values[j]->used == f_array_length_t_size) {
return F_status_set_error(F_buffer_too_large);
}
- f_macro_string_maps_resize(status, (*values[j]), values[j]->used + 1);
+ f_macro_string_maps_t_resize(status, (*values[j]), values[j]->used + 1);
if (F_status_is_error(status)) return status;
if (indexs) {
- f_macro_array_lengths_resize(status, (*indexs[j]), indexs[j]->used + 1);
+ f_macro_array_lengths_t_resize(status, (*indexs[j]), indexs[j]->used + 1);
if (F_status_is_error(status)) return status;
}
}
else {
- f_macro_string_maps_resize(status, (*values[j]), values[j]->used + f_fss_default_allocation_step);
+ f_macro_string_maps_t_resize(status, (*values[j]), values[j]->used + f_fss_default_allocation_step);
if (F_status_is_error(status)) return status;
if (indexs) {
- f_macro_array_lengths_resize(status, (*indexs[j]), indexs[j]->used + f_fss_default_allocation_step);
+ f_macro_array_lengths_t_resize(status, (*indexs[j]), indexs[j]->used + f_fss_default_allocation_step);
if (F_status_is_error(status)) return status;
}
}
#endif // _di_fll_fss_snatch_map_mash_
#ifndef _di_fll_fss_snatch_map_mash_apart_
- f_return_status fll_fss_snatch_map_mash_apart(const f_string_static buffer, const f_fss_objects objects, const f_fss_contents contents, const f_string names[], const f_string_length lengths[], const f_string_length size, const f_string glue, const f_string_length glue_length, f_string_map_multis *values[], f_array_lengths *indexs[]) {
+ f_return_status fll_fss_snatch_map_mash_apart(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_t names[], const f_string_length_t lengths[], const f_string_length_t size, const f_string_t glue, const f_string_length_t glue_length, f_string_map_multis_t *values[], f_array_lengths_t *indexs[]) {
#ifndef _di_level_2_parameter_checking_
if (size == 0) return F_status_set_error(F_parameter);
if (objects.used != contents.used) return F_status_set_error(F_parameter);
if (objects.used == 0) return F_data_not;
if (contents.used == 0) return F_data_not;
- f_status status = F_none;
- f_string_length length_name = 0;
- f_string_dynamic name = f_string_dynamic_initialize;
+ f_status_t status = F_none;
+ f_string_length_t length_name = 0;
+ f_string_dynamic_t name = f_string_dynamic_t_initialize;
- f_array_length i = 0;
- f_array_length j = 0;
- f_array_length k = 0;
+ f_array_length_t i = 0;
+ f_array_length_t j = 0;
+ f_array_length_t k = 0;
bool matched = F_false;
- f_string_map_multi *map_multi = 0;
+ f_string_map_multi_t *map_multi = 0;
for (; i < objects.used; i++) {
if (!contents.array[i].used) continue;
status = fl_string_dynamic_partial_append_nulless(buffer, contents.array[i].array[0], &name);
if (F_status_is_error(status)) {
- f_macro_string_dynamic_delete_simple(name);
+ f_macro_string_dynamic_t_delete_simple(name);
return status;
}
status = fl_string_compare_trim(buffer.string + contents.array[i].array[0].start, values[j]->array[k].name.string, length_name, values[j]->array[k].name.used);
if (F_status_is_error(status)) {
- f_macro_string_dynamic_delete_simple(name);
+ f_macro_string_dynamic_t_delete_simple(name);
return status;
}
}
else {
if (values[j]->used == values[j]->size) {
- if (values[j]->used + f_fss_default_allocation_step > f_array_length_size) {
- if (values[j]->used == f_array_length_size) {
+ if (values[j]->used + f_fss_default_allocation_step > f_array_length_t_size) {
+ if (values[j]->used == f_array_length_t_size) {
return F_status_set_error(F_buffer_too_large);
}
- f_macro_string_map_multis_resize(status, (*values[j]), values[j]->used + 1);
+ f_macro_string_map_multis_t_resize(status, (*values[j]), values[j]->used + 1);
if (F_status_is_error(status)) return status;
if (indexs) {
- f_macro_array_lengths_resize(status, (*indexs[j]), indexs[j]->used + 1);
+ f_macro_array_lengths_t_resize(status, (*indexs[j]), indexs[j]->used + 1);
if (F_status_is_error(status)) return status;
}
}
else {
- f_macro_string_map_multis_resize(status, (*values[j]), values[j]->used + f_fss_default_allocation_step);
+ f_macro_string_map_multis_t_resize(status, (*values[j]), values[j]->used + f_fss_default_allocation_step);
if (F_status_is_error(status)) return status;
if (indexs) {
- f_macro_array_lengths_resize(status, (*indexs[j]), indexs[j]->used + f_fss_default_allocation_step);
+ f_macro_array_lengths_t_resize(status, (*indexs[j]), indexs[j]->used + f_fss_default_allocation_step);
if (F_status_is_error(status)) return status;
}
}
indexs[j]->used++;
}
- f_macro_string_dynamic_clear(name);
+ f_macro_string_dynamic_t_clear(name);
if (contents.array[i].used == 1) continue;
}
if (map_multi->value.used == map_multi->value.size) {
- if (map_multi->value.used == f_array_length_size) {
+ if (map_multi->value.used == f_array_length_t_size) {
return F_status_set_error(F_buffer_too_large);
}
} // for
} // for
- f_macro_string_dynamic_delete_simple(name);
+ f_macro_string_dynamic_t_delete_simple(name);
return F_none;
}
#endif // _di_fll_fss_snatch_map_mash_apart_
#ifndef _di_fll_fss_snatch_map_together_
- f_return_status fll_fss_snatch_map_together(const f_string_static buffer, const f_fss_objects objects, const f_fss_contents contents, const f_string names[], const f_string_length lengths[], const f_string_length size, const f_string glue, const f_string_length glue_length, f_string_maps *values[], f_array_lengths *indexs[]) {
+ f_return_status fll_fss_snatch_map_together(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_t names[], const f_string_length_t lengths[], const f_string_length_t size, const f_string_t glue, const f_string_length_t glue_length, f_string_maps_t *values[], f_array_lengths_t *indexs[]) {
#ifndef _di_level_2_parameter_checking_
if (size == 0) return F_status_set_error(F_parameter);
if (objects.used != contents.used) return F_status_set_error(F_parameter);
if (objects.used == 0) return F_data_not;
if (contents.used == 0) return F_data_not;
- f_status status = F_none;
- f_string_length length_name = 0;
- f_string_dynamic name = f_string_dynamic_initialize;
+ f_status_t status = F_none;
+ f_string_length_t length_name = 0;
+ f_string_dynamic_t name = f_string_dynamic_t_initialize;
- f_array_length i = 0;
- f_array_length j = 0;
- f_array_length k = 0;
+ f_array_length_t i = 0;
+ f_array_length_t j = 0;
+ f_array_length_t k = 0;
bool matched = F_false;
- f_string_map *map = 0;
+ f_string_map_t *map = 0;
for (; i < objects.used; i++) {
if (!contents.array[i].used) continue;
status = fl_string_dynamic_partial_append_nulless(buffer, contents.array[i].array[0], &name);
if (F_status_is_error(status)) {
- f_macro_string_dynamic_delete_simple(name);
+ f_macro_string_dynamic_t_delete_simple(name);
return status;
}
status = fl_string_compare_trim(buffer.string + contents.array[i].array[0].start, values[j]->array[k].name.string, length_name, values[j]->array[k].name.used);
if (F_status_is_error(status)) {
- f_macro_string_dynamic_delete_simple(name);
+ f_macro_string_dynamic_t_delete_simple(name);
return status;
}
if (status == F_equal_to) {
matched = F_true;
- f_macro_string_dynamic_delete_simple(name);
+ f_macro_string_dynamic_t_delete_simple(name);
break;
}
} // for
}
else {
if (values[j]->used == values[j]->size) {
- if (values[j]->used + f_fss_default_allocation_step > f_array_length_size) {
- if (values[j]->used == f_array_length_size) {
- f_macro_string_dynamic_delete_simple(name);
+ if (values[j]->used + f_fss_default_allocation_step > f_array_length_t_size) {
+ if (values[j]->used == f_array_length_t_size) {
+ f_macro_string_dynamic_t_delete_simple(name);
return F_status_set_error(F_buffer_too_large);
}
- f_macro_string_maps_resize(status, (*values[j]), values[j]->used + 1);
+ f_macro_string_maps_t_resize(status, (*values[j]), values[j]->used + 1);
if (F_status_is_error(status)) {
- f_macro_string_dynamic_delete_simple(name);
+ f_macro_string_dynamic_t_delete_simple(name);
return status;
}
if (indexs) {
- f_macro_array_lengths_resize(status, (*indexs[j]), indexs[j]->used + 1);
+ f_macro_array_lengths_t_resize(status, (*indexs[j]), indexs[j]->used + 1);
if (F_status_is_error(status)) return status;
}
}
else {
- f_macro_string_maps_resize(status, (*values[j]), values[j]->used + f_fss_default_allocation_step);
+ f_macro_string_maps_t_resize(status, (*values[j]), values[j]->used + f_fss_default_allocation_step);
if (F_status_is_error(status)) {
- f_macro_string_dynamic_delete_simple(name);
+ f_macro_string_dynamic_t_delete_simple(name);
return status;
}
if (indexs) {
- f_macro_array_lengths_resize(status, (*indexs[j]), indexs[j]->used + f_fss_default_allocation_step);
+ f_macro_array_lengths_t_resize(status, (*indexs[j]), indexs[j]->used + f_fss_default_allocation_step);
if (F_status_is_error(status)) return status;
}
}
indexs[j]->used++;
}
- f_macro_string_dynamic_clear(name);
+ f_macro_string_dynamic_t_clear(name);
}
if (contents.array[i].used > 1) {
status = fl_string_dynamic_partial_mash_nulless(glue, glue_length, buffer, contents.array[i].array[1], &map->value);
if (F_status_is_error(status)) {
- f_macro_string_dynamic_delete_simple(name);
+ f_macro_string_dynamic_t_delete_simple(name);
return status;
}
}
} // for
} // for
- f_macro_string_dynamic_delete_simple(name);
+ f_macro_string_dynamic_t_delete_simple(name);
return F_none;
}
#endif // _di_fll_fss_snatch_map_together_
#ifndef _di_fll_fss_snatch_mash_
- f_return_status fll_fss_snatch_mash(const f_string_static buffer, const f_fss_objects objects, const f_fss_contents contents, const f_string names[], const f_string_length lengths[], const f_string_length size, const f_string glue, const f_string_length glue_length, f_string_dynamic *values[], f_array_length *indexs[]) {
+ f_return_status fll_fss_snatch_mash(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_t names[], const f_string_length_t lengths[], const f_string_length_t size, const f_string_t glue, const f_string_length_t glue_length, f_string_dynamic_t *values[], f_array_length_t *indexs[]) {
#ifndef _di_level_2_parameter_checking_
if (size == 0) return F_status_set_error(F_parameter);
if (objects.used != contents.used) return F_status_set_error(F_parameter);
if (objects.used == 0) return F_data_not;
if (contents.used == 0) return F_data_not;
- f_status status = F_none;
- f_string_length length_object = 0;
+ f_status_t status = F_none;
+ f_string_length_t length_object = 0;
- f_array_length i = 0;
- f_array_length j = 0;
- f_array_length k = 0;
+ f_array_length_t i = 0;
+ f_array_length_t j = 0;
+ f_array_length_t k = 0;
bool matched[size];
#endif // _di_fll_fss_snatch_mash_
#ifndef _di_fll_fss_snatch_mash_apart_
- f_return_status fll_fss_snatch_mash_apart(const f_string_static buffer, const f_fss_objects objects, const f_fss_contents contents, const f_string names[], const f_string_length lengths[], const f_string_length size, const f_string glue, const f_string_length glue_length, f_string_dynamics *values[], f_array_lengths *indexs[]) {
+ f_return_status fll_fss_snatch_mash_apart(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_t names[], const f_string_length_t lengths[], const f_string_length_t size, const f_string_t glue, const f_string_length_t glue_length, f_string_dynamics_t *values[], f_array_lengths_t *indexs[]) {
#ifndef _di_level_2_parameter_checking_
if (size == 0) return F_status_set_error(F_parameter);
if (objects.used != contents.used) return F_status_set_error(F_parameter);
if (objects.used == 0) return F_data_not;
if (contents.used == 0) return F_data_not;
- f_status status = F_none;
- f_string_length length_object = 0;
+ f_status_t status = F_none;
+ f_string_length_t length_object = 0;
- f_array_length i = 0;
- f_array_length j = 0;
- f_array_length k = 0;
+ f_array_length_t i = 0;
+ f_array_length_t j = 0;
+ f_array_length_t k = 0;
for (; i < objects.used; i++) {
length_object = (objects.array[i].stop - objects.array[i].start) + 1;
if (status == F_equal_to_not) continue;
if (values[j]->used == values[j]->size) {
- if (values[j]->used + f_fss_default_allocation_step > f_array_length_size) {
- if (values[j]->used == f_array_length_size) {
+ if (values[j]->used + f_fss_default_allocation_step > f_array_length_t_size) {
+ if (values[j]->used == f_array_length_t_size) {
return F_status_set_error(F_buffer_too_large);
}
if (F_status_is_error(status)) return status;
if (indexs) {
- f_macro_array_lengths_resize(status, (*indexs[j]), indexs[j]->used + 1);
+ f_macro_array_lengths_t_resize(status, (*indexs[j]), indexs[j]->used + 1);
if (F_status_is_error(status)) return status;
}
}
if (F_status_is_error(status)) return status;
if (indexs) {
- f_macro_array_lengths_resize(status, (*indexs[j]), indexs[j]->used + f_fss_default_allocation_step);
+ f_macro_array_lengths_t_resize(status, (*indexs[j]), indexs[j]->used + f_fss_default_allocation_step);
if (F_status_is_error(status)) return status;
}
}
#endif // _di_fll_fss_snatch_mash_apart_
#ifndef _di_fll_fss_snatch_together_
- f_return_status fll_fss_snatch_together(const f_string_static buffer, const f_fss_objects objects, const f_fss_contents contents, const f_string names[], const f_string_length lengths[], const f_string_length size, const f_string glue, const f_string_length glue_length, f_string_dynamic *values[], f_array_length *indexs[]) {
+ f_return_status fll_fss_snatch_together(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_t names[], const f_string_length_t lengths[], const f_string_length_t size, const f_string_t glue, const f_string_length_t glue_length, f_string_dynamic_t *values[], f_array_length_t *indexs[]) {
#ifndef _di_level_2_parameter_checking_
if (size == 0) return F_status_set_error(F_parameter);
if (objects.used != contents.used) return F_status_set_error(F_parameter);
if (objects.used == 0) return F_data_not;
if (contents.used == 0) return F_data_not;
- f_status status = F_none;
- f_string_length length_object = 0;
+ f_status_t status = F_none;
+ f_string_length_t length_object = 0;
- f_array_length i = 0;
- f_array_length j = 0;
- f_array_length k = 0;
+ f_array_length_t i = 0;
+ f_array_length_t j = 0;
+ f_array_length_t k = 0;
for (; i < objects.used; i++) {
length_object = (objects.array[i].stop - objects.array[i].start) + 1;
* Errors from (with error bit): fl_conversion_string_to_hexidecimal_unsigned().
*/
#ifndef _di_fll_fss_identify_
- extern f_return_status fll_fss_identify(const f_string_static buffer, f_fss_header *header);
+ extern f_return_status fll_fss_identify(const f_string_static_t buffer, f_fss_header_t *header);
#endif // _di_fll_fss_identify_
/**
* @see f_file_read_until()
*/
#ifndef _di_fll_fss_identify_file_
- extern f_return_status fll_fss_identify_file(f_file *file, f_fss_header *header);
+ extern f_return_status fll_fss_identify_file(f_file_t *file, f_fss_header_t *header);
#endif // _di_fll_fss_identify_file_
/**
* @see fl_string_dynamic_partial_append_nulless()
*/
#ifndef _di_fll_fss_snatch_
- extern f_return_status fll_fss_snatch(const f_string_static buffer, const f_fss_objects objects, const f_fss_contents contents, const f_string names[], const f_string_length lengths[], const f_string_length size, f_string_dynamic *values[], f_array_length *indexs[]);
+ extern f_return_status fll_fss_snatch(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_t names[], const f_string_length_t lengths[], const f_string_length_t size, f_string_dynamic_t *values[], f_array_length_t *indexs[]);
#endif // _di_fll_fss_snatch_
/**
* @see fl_string_dynamic_partial_append_nulless()
*/
#ifndef _di_fll_fss_snatch_apart_
- extern f_return_status fll_fss_snatch_apart(const f_string_static buffer, const f_fss_objects objects, const f_fss_contents contents, const f_string names[], const f_string_length lengths[], const f_string_length size, f_string_dynamics *values[], f_array_lengths *indexs[]);
+ extern f_return_status fll_fss_snatch_apart(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_t names[], const f_string_length_t lengths[], const f_string_length_t size, f_string_dynamics_t *values[], f_array_lengths_t *indexs[]);
#endif // _di_fll_fss_snatch_apart_
/**
* @see fl_string_dynamic_partial_append_nulless()
*/
#ifndef _di_fll_fss_snatch_map_
- extern f_return_status fll_fss_snatch_map(const f_string_static buffer, const f_fss_objects objects, const f_fss_contents contents, const f_string names[], const f_string_length lengths[], const f_string_length size, f_string_maps *values[], f_array_lengths *indexs[]);
+ extern f_return_status fll_fss_snatch_map(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_t names[], const f_string_length_t lengths[], const f_string_length_t size, f_string_maps_t *values[], f_array_lengths_t *indexs[]);
#endif // _di_fll_fss_snatch_map_
/**
* @see fl_string_dynamic_partial_append_nulless()
*/
#ifndef _di_fll_fss_snatch_map_apart_
- extern f_return_status fll_fss_snatch_map_apart(const f_string_static buffer, const f_fss_objects objects, const f_fss_contents contents, const f_string names[], const f_string_length lengths[], const f_string_length size, f_string_map_multis *values[], f_array_lengths *indexs[]);
+ extern f_return_status fll_fss_snatch_map_apart(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_t names[], const f_string_length_t lengths[], const f_string_length_t size, f_string_map_multis_t *values[], f_array_lengths_t *indexs[]);
#endif // _di_fll_fss_snatch_map_apart_
/**
* Errors from (with error bit): fl_string_dynamic_partial_mash_nulless().
*/
#ifndef _di_fll_fss_snatch_map_mash_
- extern f_return_status fll_fss_snatch_map_mash(const f_string_static buffer, const f_fss_objects objects, const f_fss_contents contents, const f_string names[], const f_string_length lengths[], const f_string_length size, const f_string glue, const f_string_length glue_length, f_string_maps *values[], f_array_lengths *indexs[]);
+ extern f_return_status fll_fss_snatch_map_mash(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_t names[], const f_string_length_t lengths[], const f_string_length_t size, const f_string_t glue, const f_string_length_t glue_length, f_string_maps_t *values[], f_array_lengths_t *indexs[]);
#endif // _di_fll_fss_snatch_map_mash_
/**
* @see fl_string_dynamic_partial_mash_nulless()
*/
#ifndef _di_fll_fss_snatch_map_mash_apart_
- extern f_return_status fll_fss_snatch_map_mash_apart(const f_string_static buffer, const f_fss_objects objects, const f_fss_contents contents, const f_string names[], const f_string_length lengths[], const f_string_length size, const f_string glue, const f_string_length glue_length, f_string_map_multis *values[], f_array_lengths *indexs[]);
+ extern f_return_status fll_fss_snatch_map_mash_apart(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_t names[], const f_string_length_t lengths[], const f_string_length_t size, const f_string_t glue, const f_string_length_t glue_length, f_string_map_multis_t *values[], f_array_lengths_t *indexs[]);
#endif // _di_fll_fss_snatch_map_mash_apart_
/**
* @see fl_string_dynamic_partial_mash_nulless()
*/
#ifndef _di_fll_fss_snatch_map_together_
- extern f_return_status fll_fss_snatch_map_together(const f_string_static buffer, const f_fss_objects objects, const f_fss_contents contents, const f_string names[], const f_string_length lengths[], const f_string_length size, const f_string glue, const f_string_length glue_length, f_string_maps *values[], f_array_lengths *indexs[]);
+ extern f_return_status fll_fss_snatch_map_together(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_t names[], const f_string_length_t lengths[], const f_string_length_t size, const f_string_t glue, const f_string_length_t glue_length, f_string_maps_t *values[], f_array_lengths_t *indexs[]);
#endif // _di_fll_fss_snatch_map_together_
/**
* Errors from (with error bit): fl_string_dynamic_partial_mash_nulless().
*/
#ifndef _di_fll_fss_snatch_mash_
- extern f_return_status fll_fss_snatch_mash(const f_string_static buffer, const f_fss_objects objects, const f_fss_contents contents, const f_string names[], const f_string_length lengths[], const f_string_length size, const f_string glue, const f_string_length glue_length, f_string_dynamic *values[], f_array_length *indexs[]);
+ extern f_return_status fll_fss_snatch_mash(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_t names[], const f_string_length_t lengths[], const f_string_length_t size, const f_string_t glue, const f_string_length_t glue_length, f_string_dynamic_t *values[], f_array_length_t *indexs[]);
#endif // _di_fll_fss_snatch_mash_
/**
* @see fl_string_dynamic_partial_mash_nulless()
*/
#ifndef _di_fll_fss_snatch_mash_apart_
- extern f_return_status fll_fss_snatch_mash_apart(const f_string_static buffer, const f_fss_objects objects, const f_fss_contents contents, const f_string names[], const f_string_length lengths[], const f_string_length size, const f_string glue, const f_string_length glue_length, f_string_dynamics *values[], f_array_lengths *indexs[]);
+ extern f_return_status fll_fss_snatch_mash_apart(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_t names[], const f_string_length_t lengths[], const f_string_length_t size, const f_string_t glue, const f_string_length_t glue_length, f_string_dynamics_t *values[], f_array_lengths_t *indexs[]);
#endif // _di_fll_fss_snatch_mash_apart_
/**
* @see fl_string_dynamic_partial_append_nulless()
*/
#ifndef _di_fll_fss_snatch_together_
- extern f_return_status fll_fss_snatch_together(const f_string_static buffer, const f_fss_objects objects, const f_fss_contents contents, const f_string names[], const f_string_length lengths[], const f_string_length size, const f_string glue, const f_string_length glue_length, f_string_dynamic *values[], f_array_length *indexs[]);
+ extern f_return_status fll_fss_snatch_together(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_t names[], const f_string_length_t lengths[], const f_string_length_t size, const f_string_t glue, const f_string_length_t glue_length, f_string_dynamic_t *values[], f_array_length_t *indexs[]);
#endif // _di_fll_fss_snatch_together_
#ifdef __cplusplus
#endif
#ifndef _di_fll_fss_basic_read_
- f_return_status fll_fss_basic_read(f_string_dynamic *buffer, f_string_range *range, f_fss_objects *objects, f_fss_contents *contents, f_fss_quoteds *quoted_objects) {
+ f_return_status fll_fss_basic_read(f_string_dynamic_t *buffer, f_string_range_t *range, f_fss_objects_t *objects, f_fss_contents_t *contents, f_fss_quoteds_t *quoted_objects) {
#ifndef _di_level_2_parameter_checking_
if (buffer == 0) return F_status_set_error(F_parameter);
if (range == 0) return F_status_set_error(F_parameter);
if (contents == 0) return F_status_set_error(F_parameter);
#endif // _di_level_2_parameter_checking_
- f_status status = F_none;
- f_status status2 = F_none;
- f_string_length initial_used = objects->used;
+ f_status_t status = F_none;
+ f_status_t status2 = F_none;
+ f_string_length_t initial_used = objects->used;
bool found_data = F_false;
- f_fss_quoted *quoted_object = 0;
+ f_fss_quoted_t *quoted_object = 0;
do {
if (objects->used == objects->size) {
- f_macro_fss_objects_resize(status2, (*objects), objects->used + f_fss_default_allocation_step);
+ f_macro_fss_objects_t_resize(status2, (*objects), objects->used + f_fss_default_allocation_step);
if (F_status_is_error(status2)) return status2;
- f_macro_fss_contents_resize(status2, (*contents), contents->used + f_fss_default_allocation_step);
+ f_macro_fss_contents_t_resize(status2, (*contents), contents->used + f_fss_default_allocation_step);
if (F_status_is_error(status2)) return status2;
if (quoted_objects) {
- f_macro_fss_quoteds_resize(status2, (*quoted_objects), quoted_objects->used + f_fss_default_allocation_step);
+ f_macro_fss_quoteds_t_resize(status2, (*quoted_objects), quoted_objects->used + f_fss_default_allocation_step);
if (F_status_is_error(status2)) return status2;
}
}
}
if (contents->array[contents->used].used == contents->array[contents->used].size) {
- f_macro_fss_content_resize(status2, contents->array[contents->used], contents->array[contents->used].size + f_fss_default_allocation_step);
+ f_macro_fss_content_t_resize(status2, contents->array[contents->used], contents->array[contents->used].size + f_fss_default_allocation_step);
if (F_status_is_error(status2)) return status2;
}
found_data = F_true;
if (contents->array[contents->used].used == contents->array[contents->used].size) {
- f_macro_fss_content_resize(status2, contents->array[contents->used], contents->array[contents->used].size + f_fss_default_allocation_step);
+ f_macro_fss_content_t_resize(status2, contents->array[contents->used], contents->array[contents->used].size + f_fss_default_allocation_step);
if (F_status_is_error(status2)) return status2;
}
if (quoted_objects) {
quoted_objects->used++;
}
- } while (range->start < f_string_length_size);
+ } while (range->start < f_string_length_t_size);
return F_status_is_error(F_number_overflow);
}
#endif // _di_fll_fss_basic_read_
#ifndef _di_fll_fss_basic_write_
- f_return_status fll_fss_basic_write(const f_string_static object, const f_string_statics contents, f_string_dynamic *destination) {
+ f_return_status fll_fss_basic_write(const f_string_static_t object, const f_string_statics_t contents, f_string_dynamic_t *destination) {
#ifndef _di_level_2_parameter_checking_
if (destination == 0) return F_status_set_error(F_parameter);
if (contents.used > contents.size) return F_status_set_error(F_parameter);
#endif // _di_level_2_parameter_checking_
- f_status status = 0;
- f_array_length current = 0;
- f_string_range range = f_macro_string_range_initialize(object.used);
+ f_status_t status = 0;
+ f_array_length_t current = 0;
+ f_string_range_t range = f_macro_string_range_initialize(object.used);
status = fl_fss_basic_object_write(object, 0, &range, destination);
* F_utf (with error bit) is returned on failure to read/process a UTF-8 character.
*/
#ifndef _di_fll_fss_basic_read_
- extern f_return_status fll_fss_basic_read(f_string_dynamic *buffer, f_string_range *range, f_fss_objects *objects, f_fss_contents *contents, f_fss_quoteds *quoted_objects);
+ extern f_return_status fll_fss_basic_read(f_string_dynamic_t *buffer, f_string_range_t *range, f_fss_objects_t *objects, f_fss_contents_t *contents, f_fss_quoteds_t *quoted_objects);
#endif // _di_fll_fss_basic_read_
/**
* F_utf (with error bit) is returned on failure to read/process a UTF-8 character.
*/
#ifndef _di_fll_fss_basic_write_
- extern f_return_status fll_fss_basic_write(const f_string_static object, const f_string_statics contents, f_string_dynamic *buffer);
+ extern f_return_status fll_fss_basic_write(const f_string_static_t object, const f_string_statics_t contents, f_string_dynamic_t *buffer);
#endif // _di_fll_fss_basic_write_
#ifdef __cplusplus
#endif
#ifndef _di_fll_fss_basic_list_read_
- f_return_status fll_fss_basic_list_read(f_string_dynamic *buffer, f_string_range *range, f_fss_objects *objects, f_fss_contents *contents) {
+ f_return_status fll_fss_basic_list_read(f_string_dynamic_t *buffer, f_string_range_t *range, f_fss_objects_t *objects, f_fss_contents_t *contents) {
#ifndef _di_level_2_parameter_checking_
if (buffer == 0) return F_status_set_error(F_parameter);
if (range == 0) return F_status_set_error(F_parameter);
if (contents == 0) return F_status_set_error(F_parameter);
#endif // _di_level_2_parameter_checking_
- f_status status = F_none;
- f_status status2 = F_none;
- f_string_length initial_used = objects->used;
+ f_status_t status = F_none;
+ f_status_t status2 = F_none;
+ f_string_length_t initial_used = objects->used;
bool found_data = F_false;
do {
if (objects->used == objects->size) {
- f_macro_fss_objects_resize(status2, (*objects), objects->used + f_fss_default_allocation_step);
+ f_macro_fss_objects_t_resize(status2, (*objects), objects->used + f_fss_default_allocation_step);
if (F_status_is_error(status)) {
return status;
}
- f_macro_fss_contents_resize(status2, (*contents), contents->used + f_fss_default_allocation_step);
+ f_macro_fss_contents_t_resize(status2, (*contents), contents->used + f_fss_default_allocation_step);
if (F_status_is_error(status)) {
return status;
objects->used++;
if (contents->array[contents->used].used == contents->array[contents->used].size) {
- f_macro_fss_content_resize(status2, contents->array[contents->used], contents->array[contents->used].size + f_fss_default_allocation_step);
+ f_macro_fss_content_t_resize(status2, contents->array[contents->used], contents->array[contents->used].size + f_fss_default_allocation_step);
if (F_status_is_error(status2)) return status2;
}
found_data = F_true;
if (contents->array[contents->used].used == contents->array[contents->used].size) {
- f_macro_fss_content_resize(status2, contents->array[contents->used], contents->array[contents->used].size + f_fss_default_allocation_step);
+ f_macro_fss_content_t_resize(status2, contents->array[contents->used], contents->array[contents->used].size + f_fss_default_allocation_step);
if (F_status_is_error(status2)) return status2;
}
objects->used++;
contents->used++;
- } while (range->start < f_string_length_size);
+ } while (range->start < f_string_length_t_size);
return F_status_is_error(F_number_overflow);
}
#endif // _di_fll_fss_basic_list_read_
#ifndef _di_fll_fss_basic_list_write_
- f_return_status fll_fss_basic_list_write(const f_string_static object, const f_string_statics contents, f_string_dynamic *buffer) {
+ f_return_status fll_fss_basic_list_write(const f_string_static_t object, const f_string_statics_t contents, f_string_dynamic_t *buffer) {
#ifndef _di_level_2_parameter_checking_
if (buffer == 0) return F_status_set_error(F_parameter);
if (contents.used > contents.size) return F_status_set_error(F_parameter);
#endif // _di_level_2_parameter_checking_
- f_status status = 0;
- f_array_length current = 0;
- f_string_range range = f_string_range_initialize;
+ f_status_t status = 0;
+ f_array_length_t current = 0;
+ f_string_range_t range = f_string_range_initialize;
range.start = 0;
range.stop = object.used - 1;
* F_utf (with error bit) is returned on failure to read/process a UTF-8 character.
*/
#ifndef _di_fll_fss_basic_list_read_
- extern f_return_status fll_fss_basic_list_read(f_string_dynamic *buffer, f_string_range *range, f_fss_objects *objects, f_fss_contents *contents);
+ extern f_return_status fll_fss_basic_list_read(f_string_dynamic_t *buffer, f_string_range_t *range, f_fss_objects_t *objects, f_fss_contents_t *contents);
#endif // _di_fll_fss_basic_list_read_
/**
* F_utf (with error bit) is returned on failure to read/process a UTF-8 character.
*/
#ifndef _di_fll_fss_basic_list_write_
- extern f_return_status fll_fss_basic_list_write(const f_string_static object, const f_string_statics contents, f_string_dynamic *buffer);
+ extern f_return_status fll_fss_basic_list_write(const f_string_static_t object, const f_string_statics_t contents, f_string_dynamic_t *buffer);
#endif // _di_fll_fss_basic_list_write_
#ifdef __cplusplus
#endif
#ifndef _di_fll_fss_extended_read_
- f_return_status fll_fss_extended_read(f_string_dynamic *buffer, f_string_range *range, f_fss_objects *objects, f_fss_contents *contents, f_fss_quoteds *quoted_objects, f_fss_quotedss *quoted_contents) {
+ f_return_status fll_fss_extended_read(f_string_dynamic_t *buffer, f_string_range_t *range, f_fss_objects_t *objects, f_fss_contents_t *contents, f_fss_quoteds_t *quoted_objects, f_fss_quotedss_t *quoted_contents) {
#ifndef _di_level_2_parameter_checking_
if (buffer == 0) return F_status_set_error(F_parameter);
if (range == 0) return F_status_set_error(F_parameter);
if (contents == 0) return F_status_set_error(F_parameter);
#endif // _di_level_2_parameter_checking_
- f_status status = F_none;
- f_status status2 = F_none;
- f_string_length initial_used = objects->used;
+ f_status_t status = F_none;
+ f_status_t status2 = F_none;
+ f_string_length_t initial_used = objects->used;
bool found_data = F_false;
- f_fss_quoted *quoted_object = 0;
- f_fss_quoteds *quoted_content = 0;
+ f_fss_quoted_t *quoted_object = 0;
+ f_fss_quoteds_t *quoted_content = 0;
do {
if (objects->used == objects->size) {
- f_macro_fss_objects_resize(status2, (*objects), objects->used + f_fss_default_allocation_step);
+ f_macro_fss_objects_t_resize(status2, (*objects), objects->used + f_fss_default_allocation_step);
if (F_status_is_error(status2)) return status2;
- f_macro_fss_contents_resize(status2, (*contents), contents->used + f_fss_default_allocation_step);
+ f_macro_fss_contents_t_resize(status2, (*contents), contents->used + f_fss_default_allocation_step);
if (F_status_is_error(status2)) return status2;
if (quoted_objects) {
- f_macro_fss_quoteds_resize(status2, (*quoted_objects), quoted_objects->used + f_fss_default_allocation_step);
+ f_macro_fss_quoteds_t_resize(status2, (*quoted_objects), quoted_objects->used + f_fss_default_allocation_step);
if (F_status_is_error(status2)) return status2;
}
if (quoted_contents) {
- f_macro_fss_quotedss_resize(status2, (*quoted_contents), quoted_contents->used + f_fss_default_allocation_step);
+ f_macro_fss_quotedss_t_resize(status2, (*quoted_contents), quoted_contents->used + f_fss_default_allocation_step);
if (F_status_is_error(status2)) return status2;
}
}
}
if (contents->array[contents->used].used == contents->array[contents->used].size) {
- f_macro_fss_content_resize(status2, contents->array[contents->used], contents->array[contents->used].size + f_fss_default_allocation_step);
+ f_macro_fss_content_t_resize(status2, contents->array[contents->used], contents->array[contents->used].size + f_fss_default_allocation_step);
if (F_status_is_error(status2)) return status2;
}
found_data = F_true;
if (contents->array[contents->used].used == contents->array[contents->used].size) {
- f_macro_fss_content_resize(status2, contents->array[contents->used], contents->array[contents->used].size + f_fss_default_allocation_step);
+ f_macro_fss_content_t_resize(status2, contents->array[contents->used], contents->array[contents->used].size + f_fss_default_allocation_step);
if (F_status_is_error(status2)) return status2;
}
if (quoted_contents) {
quoted_contents->used++;
}
- } while (range->start < f_string_length_size);
+ } while (range->start < f_string_length_t_size);
return F_status_is_error(F_number_overflow);
}
#endif // _di_fll_fss_extended_read_
#ifndef _di_fll_fss_extended_write_
- f_return_status fll_fss_extended_write(const f_string_static object, const f_string_statics contents, f_string_dynamic *buffer) {
+ f_return_status fll_fss_extended_write(const f_string_static_t object, const f_string_statics_t contents, f_string_dynamic_t *buffer) {
#ifndef _di_level_2_parameter_checking_
if (buffer == 0) return F_status_set_error(F_parameter);
if (contents.used > contents.size) return F_status_set_error(F_parameter);
#endif // _di_level_2_parameter_checking_
- f_status status = 0;
- f_array_length current = 0;
- f_string_range range = f_macro_string_range_initialize(object.used);
+ f_status_t status = 0;
+ f_array_length_t current = 0;
+ f_string_range_t range = f_macro_string_range_initialize(object.used);
status = fl_fss_extended_object_write(object, 0, &range, buffer);
* F_number_overflow (with error bit) if the maximimum buffer size is reached.
*/
#ifndef _di_fll_fss_extended_read_
- extern f_return_status fll_fss_extended_read(f_string_dynamic *buffer, f_string_range *range, f_fss_objects *objects, f_fss_contents *contents, f_fss_quoteds *quoted_objects, f_fss_quotedss *quoted_contents);
+ extern f_return_status fll_fss_extended_read(f_string_dynamic_t *buffer, f_string_range_t *range, f_fss_objects_t *objects, f_fss_contents_t *contents, f_fss_quoteds_t *quoted_objects, f_fss_quotedss_t *quoted_contents);
#endif // _di_fll_fss_extended_read_
/**
* F_utf (with error bit) is returned on failure to read/process a UTF-8 character.
*/
#ifndef _di_fll_fss_extended_write_
- extern f_return_status fll_fss_extended_write(const f_string_static object, const f_string_statics contents, f_string_dynamic *buffer);
+ extern f_return_status fll_fss_extended_write(const f_string_static_t object, const f_string_statics_t contents, f_string_dynamic_t *buffer);
#endif // _di_fll_fss_extended_write_
#ifdef __cplusplus
#endif
#ifndef _di_fll_fss_extended_list_read_
- f_return_status fll_fss_extended_list_read(f_string_dynamic *buffer, f_string_range *range, f_fss_nest *nest) {
+ f_return_status fll_fss_extended_list_read(f_string_dynamic_t *buffer, f_string_range_t *range, f_fss_nest_t *nest) {
#ifndef _di_level_3_parameter_checking_
if (buffer == 0) return F_status_set_error(F_parameter);
if (range == 0) return F_status_set_error(F_parameter);
if (nest == 0) return F_status_set_error(F_parameter);
#endif // _di_level_3_parameter_checking_
- f_status status = F_none;
- f_status status2 = F_none;
- f_string_length initial_used = 0;
+ f_status_t status = F_none;
+ f_status_t status2 = F_none;
+ f_string_length_t initial_used = 0;
bool found_data = F_false;
if (nest->used == 0) {
- f_macro_fss_nest_resize(status2, (*nest), f_fss_default_allocation_step);
+ f_macro_fss_nest_t_resize(status2, (*nest), f_fss_default_allocation_step);
if (F_status_is_error(status2)) return status2;
}
else {
do {
do {
if (nest->depth[0].used == nest->depth[0].size) {
- f_macro_fss_items_resize(status2, nest->depth[0], nest->depth[0].used + f_fss_default_allocation_step);
+ f_macro_fss_items_t_resize(status2, nest->depth[0], nest->depth[0].used + f_fss_default_allocation_step);
if (F_status_is_error(status)) return status;
}
return F_none_stop;
}
- } while (range->start < f_string_length_size);
+ } while (range->start < f_string_length_t_size);
return F_status_is_error(F_number_overflow);
}
/*
#ifndef _di_fll_fss_extended_list_write_
- f_return_status fll_fss_extended_list_write(const f_string_static object, const f_string_statics contents, f_string_dynamic *buffer) {
+ f_return_status fll_fss_extended_list_write(const f_string_static_t object, const f_string_statics_t contents, f_string_dynamic_t *buffer) {
#ifndef _di_level_3_parameter_checking_
if (buffer == 0) return F_status_set_error(F_parameter);
if (contents.used > contents.size) return F_status_set_error(F_parameter);
#endif // _di_level_3_parameter_checking_
- f_status status = 0;
- f_array_length current = 0;
- f_string_range range = f_string_range_initialize;
+ f_status_t status = 0;
+ f_array_length_t current = 0;
+ f_string_range_t range = f_string_range_initialize;
range.start = 0;
range.stop = object.used - 1;
* FL_fss_found_object_content_not on success and object was found but no content was found (start location is at end of object).
*/
#ifndef _di_fll_fss_extended_list_read_
- extern f_return_status fll_fss_extended_list_read(f_string_dynamic *buffer, f_string_range *range, f_fss_nest *nest);
+ extern f_return_status fll_fss_extended_list_read(f_string_dynamic_t *buffer, f_string_range_t *range, f_fss_nest_t *nest);
#endif // _di_fll_fss_extended_list_read_
/**
* F_utf (with error bit) is returned on failure to read/process a UTF-8 character.
*/
#ifndef _di_fll_fss_extended_list_write_
- //extern f_return_status fll_fss_extended_list_write(const f_string_static object, const f_string_statics contents, f_string_dynamic *buffer);
+ //extern f_return_status fll_fss_extended_list_write(const f_string_static_t object, const f_string_statics_t contents, f_string_dynamic_t *buffer);
#endif // _di_fll_fss_extended_list_write_
#ifdef __cplusplus
#endif
#ifndef _di_fll_fss_status_from_string_
- f_return_status fll_fss_status_from_string(const f_string string, f_status *code) {
+ f_return_status fll_fss_status_from_string(const f_string_t string, f_status_t *code) {
#ifndef _di_level_1_parameter_checking_
if (code == 0) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- f_status status = F_none;
- const f_string_length length = strlen(string);
+ f_status_t status = F_none;
+ const f_string_length_t length = strlen(string);
if (length == 0) {
return F_data_not;
#endif // _di_fll_fss_status_from_string_
#ifndef _di_fll_fss_status_to_string_
- f_return_status fll_fss_status_to_string(const f_status code, f_string *string) {
+ f_return_status fll_fss_status_to_string(const f_status_t code, f_string_t *string) {
#ifndef _di_level_2_parameter_checking_
if (string == 0) return F_status_set_error(F_parameter);
#endif // _di_level_2_parameter_checking_
- const f_status unmasked_code = F_status_set_fine(code);
+ const f_status_t unmasked_code = F_status_set_fine(code);
switch (unmasked_code) {
#ifndef _di_fll_fss_status_error_
#endif // _di_fll_status_to_string_
#ifndef _di_fll_fss_status_is_error_
- f_return_status fll_fss_status_is_error(const f_status code) {
+ f_return_status fll_fss_status_is_error(const f_status_t code) {
if (fll_fss_status_is_fine(code) == F_true) {
return F_false;
}
#endif // _di_fll_fss_status_is_error_
#ifndef _di_fll_fss_status_is_warning_
- f_return_status fll_fss_status_is_warning(const f_status code) {
+ f_return_status fll_fss_status_is_warning(const f_status_t code) {
switch (code) {
#ifndef _di_fll_fss_status_basic_
case F_data_not:
#endif // _di_fll_fss_status_is_warning_
#ifndef _di_fll_fss_status_is_fine_
- f_return_status fll_fss_status_is_fine(const f_status code) {
+ f_return_status fll_fss_status_is_fine(const f_status_t code) {
switch (code) {
#ifndef _di_fll_fss_status_booleans_
case F_false:
* @see fll_status_from_string
*/
#ifndef _di_fll_fss_status_from_string_
- extern f_return_status fll_fss_status_from_string(const f_string string, f_status *code);
+ extern f_return_status fll_fss_status_from_string(const f_string_t string, f_status_t *code);
#endif // _di_fll_fss_status_to_string_
/**
* @see fl_status_to_string()
*/
#ifndef _di_fll_fss_status_to_string_
- extern f_return_status fll_fss_status_to_string(const f_status code, f_string *string);
+ extern f_return_status fll_fss_status_to_string(const f_status_t code, f_string_t *string);
#endif // _di_fll_status_to_string_
/**
* F_false otherwise.
*/
#ifndef _di_fll_fss_status_is_error_
- extern f_return_status fll_fss_status_is_error(const f_status code);
+ extern f_return_status fll_fss_status_is_error(const f_status_t code);
#endif // _di_fll_fss_status_is_error_
/**
* F_false otherwise.
*/
#ifndef _di_fll_fss_status_is_warning_
- extern f_return_status fll_fss_status_is_warning(const f_status code);
+ extern f_return_status fll_fss_status_is_warning(const f_status_t code);
#endif // _di_fll_fss_status_is_warning_
/**
* F_false otherwise.
*/
#ifndef _di_fll_fss_status_is_fine_
- extern f_return_status fll_fss_status_is_fine(const f_status code);
+ extern f_return_status fll_fss_status_is_fine(const f_status_t code);
#endif // _di_fll_fss_status_is_fine_
#ifdef __cplusplus
#endif
#if !defined(_di_fll_fss_identify_) || !defined(_di_fll_fss_identify_file_)
- f_return_status private_fll_fss_identify(const f_string_static buffer, f_fss_header *header) {
- register f_string_length i = 0;
+ f_return_status private_fll_fss_identify(const f_string_static_t buffer, f_fss_header_t *header) {
+ register f_string_length_t i = 0;
if (buffer.used < 10) {
// "# fss-0000" is always at least 10 characters.
if (f_conversion_character_is_hexidecimal(buffer.string[i]) == F_true) {
i++;
- f_string_range range = f_string_range_initialize;
+ f_string_range_t range = f_string_range_initialize;
range.start = i - 4;
range.stop = i;
// 1: A possibly valid header type was found, now convert it into its proper format and save the header type.
- const f_status status = fl_conversion_string_to_hexidecimal_unsigned(buffer.string, &header->type, range);
+ const f_status_t status = fl_conversion_string_to_hexidecimal_unsigned(buffer.string, &header->type, range);
if (F_status_is_error(status)) return status;
if (status == F_none) {
// @todo this needs to be changed to support sub-headers (maybe something like FL_fss_accepted_additional).
i++;
- f_string_range range = f_string_range_initialize;
+ f_string_range_t range = f_string_range_initialize;
range.start = i - 4;
range.stop = i;
- const f_status status = fl_conversion_string_to_hexidecimal_unsigned(buffer.string, &header->type, range);
+ const f_status_t status = fl_conversion_string_to_hexidecimal_unsigned(buffer.string, &header->type, range);
if (F_status_is_error(status)) return status;
header->length = i + 1;
* @see fll_fss_identify_file()
*/
#if !defined(_di_fll_fss_identify_) || !defined(_di_fll_fss_identify_file_)
- extern f_return_status private_fll_fss_identify(const f_string_static buffer, f_fss_header *header) f_gcc_attribute_visibility_internal;
+ extern f_return_status private_fll_fss_identify(const f_string_static_t buffer, f_fss_header_t *header) f_gcc_attribute_visibility_internal;
#endif // !defined(_di_fll_fss_identify_) || !defined(_di_fll_fss_identify_file_)
#ifdef __cplusplus
#endif
#ifndef _di_fll_path_canonical_
- f_return_status fll_path_canonical(const f_string path, f_string_dynamic *canonical) {
+ f_return_status fll_path_canonical(const f_string_t path, f_string_dynamic_t *canonical) {
#ifndef _di_level_2_parameter_checking_
if (canonical == 0) return F_status_set_error(F_parameter);
#endif // _di_level_2_parameter_checking_
- f_status status = F_none;
- f_string_length at = 0;
+ f_status_t status = F_none;
+ f_string_length_t at = 0;
uint8_t previous_1 = '/';
uint8_t previous_2 = 0;
- f_string_length size_chunk = 0;
- f_string_length position = 0;
+ f_string_length_t size_chunk = 0;
+ f_string_length_t position = 0;
canonical->used = 0;
* This does not check if the path exists or not.
* This processes the relative parts: './', '../', and extra '/'.
* This does not process symbolic links.
- * This has a max size of f_string_length_size.
+ * This has a max size of f_string_length_t_size.
*
* @param path
* The source path to determine what the canonical path is.
* F_none on success.
*/
#ifndef _di_fll_path_canonical_
- extern f_return_status fll_path_canonical(const f_string path, f_string_dynamic *canonical);
+ extern f_return_status fll_path_canonical(const f_string_t path, f_string_dynamic_t *canonical);
#endif // _di_fll_path_canonical_
#ifdef __cplusplus
#endif
#ifndef _di_fll_program_print_help_header_
- f_return_status fll_program_print_help_header(const fl_color_context context, const f_string name, const f_string version) {
- f_status status = F_none;
+ f_return_status fll_program_print_help_header(const fl_color_context_t context, const f_string_t name, const f_string_t version) {
+ f_status_t status = F_none;
printf("%c", f_string_eol[0]);
status = fl_color_print(f_type_output, context.title, context.reset, " %s", name);
#endif // _di_fll_program_print_help_header_
#ifndef _di_fll_program_print_help_option_
- f_return_status fll_program_print_help_option(const fl_color_context context, const f_string option_short, const f_string option_long, const f_string symbol_short, const f_string symbol_long, const f_string description) {
- f_status status = F_none;
+ f_return_status fll_program_print_help_option(const fl_color_context_t context, const f_string_t option_short, const f_string_t option_long, const f_string_t symbol_short, const f_string_t symbol_long, const f_string_t description) {
+ f_status_t status = F_none;
printf("%c", f_string_eol[0]);
printf(" %s", symbol_short);
#endif // _di_fll_program_print_help_option_
#ifndef _di_fll_program_print_help_option_long_
- f_return_status fll_program_print_help_option_long(const fl_color_context context, const f_string option_long, const f_string symbol_long, const f_string description) {
- f_status status = F_none;
+ f_return_status fll_program_print_help_option_long(const fl_color_context_t context, const f_string_t option_long, const f_string_t symbol_long, const f_string_t description) {
+ f_status_t status = F_none;
printf("%c", f_string_eol[0]);
printf(" %s", symbol_long);
#endif // _di_fll_program_print_help_option_long_
#ifndef _di_fll_program_print_help_option_other_
- f_return_status fll_program_print_help_option_other(const fl_color_context context, const f_string option_other, const f_string description) {
+ f_return_status fll_program_print_help_option_other(const fl_color_context_t context, const f_string_t option_other, const f_string_t description) {
printf("%c ", f_string_eol[0]);
fl_color_print(f_type_output, context.standout, context.reset, option_other);
#endif // _di_fll_program_print_help_option_other_
#ifndef _di_fll_program_print_help_usage_
- f_return_status fll_program_print_help_usage(const fl_color_context context, const f_string name, const f_string parameters) {
- f_status status = F_none;
+ f_return_status fll_program_print_help_usage(const fl_color_context_t context, const f_string_t name, const f_string_t parameters) {
+ f_status_t status = F_none;
printf("%c%c", f_string_eol[0], f_string_eol[0]);
status = fl_color_print(f_type_output, context.important, context.reset, " Usage:");
#endif // _di_fll_program_print_help_usage_
#ifndef _di_fll_program_print_version_
- f_return_status fll_program_print_version(const f_string version) {
+ f_return_status fll_program_print_version(const f_string_t version) {
printf("%s%c", version, f_string_eol[0]);
return F_none;
#endif // _di_fll_program_print_version_
#ifndef _di_fll_program_parameter_process_
- f_return_status fll_program_parameter_process(const f_console_arguments arguments, f_console_parameters parameters, const f_console_parameter_ids choices, const bool right, f_string_lengths *remaining, fl_color_context *context) {
- f_status status = F_none;
+ f_return_status fll_program_parameter_process(const f_console_arguments_t arguments, f_console_parameters_t parameters, const f_console_parameter_ids_t choices, const bool right, f_string_lengths_t *remaining, fl_color_context_t *context) {
+ f_status_t status = F_none;
status = f_console_parameter_process(arguments, parameters, remaining);
return F_status_set_error(status);
}
- f_console_parameter_id decision = choices.id[2];
+ f_console_parameter_id_t decision = choices.id[2];
- f_string function;
+ f_string_t function;
if (right) {
function = "f_console_parameter_prioritize_right";
// load colors unless told not to.
if (decision != choices.id[0]) {
- f_status allocation_status = F_none;
+ f_status_t allocation_status = F_none;
- fl_macro_color_context_new(allocation_status, (*context));
+ fl_macro_color_context_t_new(allocation_status, (*context));
if (F_status_is_error(allocation_status)) {
fl_color_print(f_type_error, context->error, context->reset, "CRITICAL ERROR: Unable to allocate memory while calling ");
- fl_color_print(f_type_error, context->notable, context->reset, "fl_macro_color_context_new");
+ fl_color_print(f_type_error, context->notable, context->reset, "fl_macro_color_context_t_new");
fl_color_print_line(f_type_error, context->error, context->reset, "().");
return allocation_status;
#endif // _di_fll_program_parameter_process_
#ifndef _di_fll_program_parameter_process_quietly_
- f_return_status fll_program_parameter_process_quietly(const f_console_arguments arguments, f_console_parameters parameters, const f_console_parameter_ids choices, const bool right, f_string_lengths *remaining, fl_color_context *context) {
- f_status status = F_none;
+ f_return_status fll_program_parameter_process_quietly(const f_console_arguments_t arguments, f_console_parameters_t parameters, const f_console_parameter_ids_t choices, const bool right, f_string_lengths_t *remaining, fl_color_context_t *context) {
+ f_status_t status = F_none;
status = f_console_parameter_process(arguments, parameters, remaining);
if (F_status_is_error(status)) return status;
- f_console_parameter_id decision = choices.id[2];
+ f_console_parameter_id_t decision = choices.id[2];
if (right) {
status = f_console_parameter_prioritize_right(parameters, choices, &decision);
// load colors unless told not to.
if (decision != choices.id[0]) {
- f_status allocation_status = F_none;
+ f_status_t allocation_status = F_none;
- fl_macro_color_context_new(allocation_status, (*context));
+ fl_macro_color_context_t_new(allocation_status, (*context));
if (F_status_is_error(allocation_status)) return allocation_status;
#endif // _di_fll_program_parameter_process_quietly_
#ifndef _di_fll_program_parameter_additional_append_
- f_return_status fll_program_parameter_additional_append(const f_string *argv, const f_string_lengths additional, f_string_dynamics *destination) {
+ f_return_status fll_program_parameter_additional_append(const f_string_t *argv, const f_string_lengths_t additional, f_string_dynamics_t *destination) {
#ifndef _di_level_2_parameter_checking_
if (argv == 0) return F_status_set_error(F_parameter);
if (destination == 0) return F_status_set_error(F_parameter);
#endif // _di_level_2_parameter_checking_
- f_status status = F_none;
+ f_status_t status = F_none;
- f_string_length length = 0;
- const f_string_length start = destination->used;
+ f_string_length_t length = 0;
+ const f_string_length_t start = destination->used;
- for (f_string_length i = 0; i < additional.used; i++) {
+ for (f_string_length_t i = 0; i < additional.used; i++) {
length = strnlen(argv[additional.array[i]], f_console_length_size);
if (length > 0) {
- f_string_dynamic ripped = f_string_dynamic_initialize;
+ f_string_dynamic_t ripped = f_string_dynamic_t_initialize;
status = fl_string_append(argv[additional.array[i]], length, &ripped);
if (F_status_is_error(status)) return status;
#endif // _di_fll_program_parameter_additional_append_
#ifndef _di_fll_program_parameter_additional_mash_
- f_return_status fll_program_parameter_additional_mash(const f_string glue, const f_string_length glue_length, const f_string *argv, const f_string_lengths additional, f_string_dynamic *destination) {
+ f_return_status fll_program_parameter_additional_mash(const f_string_t glue, const f_string_length_t glue_length, const f_string_t *argv, const f_string_lengths_t additional, f_string_dynamic_t *destination) {
#ifndef _di_level_2_parameter_checking_
if (argv == 0) return F_status_set_error(F_parameter);
if (glue_length < 1) return F_status_set_error(F_parameter);
if (destination == 0) return F_status_set_error(F_parameter);
#endif // _di_level_2_parameter_checking_
- f_status status = F_none;
+ f_status_t status = F_none;
- f_string_length length = 0;
- const f_string_length start = destination->used;
+ f_string_length_t length = 0;
+ const f_string_length_t start = destination->used;
- for (f_string_length i = 0; i < additional.used; i++) {
+ for (f_string_length_t i = 0; i < additional.used; i++) {
length = strnlen(argv[additional.array[i]], f_console_length_size);
if (length > 0) {
#endif // _di_fll_program_parameter_additional_mash_
#ifndef _di_fll_program_parameter_additional_rip_
- f_return_status fll_program_parameter_additional_rip(const f_string *argv, const f_string_lengths additional, f_string_dynamics *destination) {
+ f_return_status fll_program_parameter_additional_rip(const f_string_t *argv, const f_string_lengths_t additional, f_string_dynamics_t *destination) {
#ifndef _di_level_2_parameter_checking_
if (argv == 0) return F_status_set_error(F_parameter);
if (destination == 0) return F_status_set_error(F_parameter);
#endif // _di_level_2_parameter_checking_
- f_status status = F_none;
- f_string_length length = 0;
- const f_string_length start = destination->used;
+ f_status_t status = F_none;
+ f_string_length_t length = 0;
+ const f_string_length_t start = destination->used;
- for (f_string_length i = 0; i < additional.used; i++) {
+ for (f_string_length_t i = 0; i < additional.used; i++) {
length = strnlen(argv[additional.array[i]], f_console_length_size);
if (length > 0) {
- f_string_dynamic ripped = f_string_dynamic_initialize;
+ f_string_dynamic_t ripped = f_string_dynamic_t_initialize;
status = fl_string_rip(argv[additional.array[i]], length, &ripped);
if (F_status_is_error(status)) return status;
#endif // _di_fll_program_parameter_additional_rip_
#ifndef _di_fll_program_parameter_additional_rip_mash_
- f_return_status fll_program_parameter_additional_rip_mash(const f_string glue, const f_string_length glue_length, const f_string *argv, const f_string_lengths additional, f_string_dynamic *destination) {
+ f_return_status fll_program_parameter_additional_rip_mash(const f_string_t glue, const f_string_length_t glue_length, const f_string_t *argv, const f_string_lengths_t additional, f_string_dynamic_t *destination) {
#ifndef _di_level_2_parameter_checking_
if (argv == 0) return F_status_set_error(F_parameter);
if (glue_length < 1) return F_status_set_error(F_parameter);
if (destination == 0) return F_status_set_error(F_parameter);
#endif // _di_level_2_parameter_checking_
- f_status status = F_none;
+ f_status_t status = F_none;
- f_string_length length = 0;
- const f_string_length start = destination->used;
- f_string_dynamic ripped = f_string_dynamic_initialize;
+ f_string_length_t length = 0;
+ const f_string_length_t start = destination->used;
+ f_string_dynamic_t ripped = f_string_dynamic_t_initialize;
- for (f_string_length i = 0; i < additional.used; i++) {
+ for (f_string_length_t i = 0; i < additional.used; i++) {
length = strnlen(argv[additional.array[i]], f_console_length_size);
if (length > 0) {
status = fl_string_rip(argv[additional.array[i]], length, &ripped);
if (F_status_is_error(status)) {
- f_macro_string_dynamic_delete_simple(ripped);
+ f_macro_string_dynamic_t_delete_simple(ripped);
return status;
}
status = fl_string_dynamic_mash(glue, glue_length, ripped, destination);
if (F_status_is_error(status)) {
- f_macro_string_dynamic_delete_simple(ripped);
+ f_macro_string_dynamic_t_delete_simple(ripped);
return F_status_set_error(F_string_too_large);
}
}
} // for
if (ripped.size) {
- f_macro_string_dynamic_delete(status, ripped);
+ f_macro_string_dynamic_t_delete(status, ripped);
}
if (status == F_none && start == destination->used) {
* @param fl_color_print()
*/
#ifndef _di_fll_program_print_help_header_
- extern f_return_status fll_program_print_help_header(const fl_color_context context, const f_string name, const f_string version);
+ extern f_return_status fll_program_print_help_header(const fl_color_context_t context, const f_string_t name, const f_string_t version);
#endif // _di_fll_program_print_help_header_
/**
* @param fl_color_print()
*/
#ifndef _di_fll_program_print_help_option_
- extern f_return_status fll_program_print_help_option(const fl_color_context context, const f_string option_short, const f_string option_long, const f_string symbol_short, const f_string symbol_long, const f_string description);
+ extern f_return_status fll_program_print_help_option(const fl_color_context_t context, const f_string_t option_short, const f_string_t option_long, const f_string_t symbol_short, const f_string_t symbol_long, const f_string_t description);
#endif // _di_fll_program_print_help_option_
/**
* @param fl_color_print()
*/
#ifndef _di_fll_program_print_help_option_long_
- extern f_return_status fll_program_print_help_option_long(const fl_color_context context, const f_string option_long, const f_string symbol_long, const f_string description);
+ extern f_return_status fll_program_print_help_option_long(const fl_color_context_t context, const f_string_t option_long, const f_string_t symbol_long, const f_string_t description);
#endif // _di_fll_program_print_help_option_long_
/**
* @param fl_color_print()
*/
#ifndef _di_fll_program_print_help_option_other_
- extern f_return_status fll_program_print_help_option_other(const fl_color_context context, const f_string option_other, const f_string description);
+ extern f_return_status fll_program_print_help_option_other(const fl_color_context_t context, const f_string_t option_other, const f_string_t description);
#endif // _di_fll_program_print_help_option_other_
/**
* @param fl_color_print()
*/
#ifndef _di_fll_program_print_help_usage_
- extern f_return_status fll_program_print_help_usage(const fl_color_context context, const f_string name, const f_string parameters);
+ extern f_return_status fll_program_print_help_usage(const fl_color_context_t context, const f_string_t name, const f_string_t parameters);
#endif // _di_fll_program_print_help_usage_
/**
* F_none on success.
*/
#ifndef _di_fll_program_print_version_
- extern f_return_status fll_program_print_version(const f_string version);
+ extern f_return_status fll_program_print_version(const f_string_t version);
#endif // _di_fll_program_print_version_
/**
* @see fl_color_load_context()
*/
#ifndef _di_fll_program_parameter_process_
- extern f_return_status fll_program_parameter_process(const f_console_arguments arguments, f_console_parameters parameters, const f_console_parameter_ids choices, const bool right, f_string_lengths *remaining, fl_color_context *context);
+ extern f_return_status fll_program_parameter_process(const f_console_arguments_t arguments, f_console_parameters_t parameters, const f_console_parameter_ids_t choices, const bool right, f_string_lengths_t *remaining, fl_color_context_t *context);
#endif // _di_fll_program_parameter_process_
/**
* Perform basic parameter loading, including initialization of color context but does not print errors.
* @see fl_color_load_context()
*/
#ifndef _di_fll_program_parameter_process_quietly_
- extern f_return_status fll_program_parameter_process_quietly(const f_console_arguments arguments, f_console_parameters parameters, const f_console_parameter_ids choices, const bool right, f_string_lengths *remaining, fl_color_context *context);
+ extern f_return_status fll_program_parameter_process_quietly(const f_console_arguments_t arguments, f_console_parameters_t parameters, const f_console_parameter_ids_t choices, const bool right, f_string_lengths_t *remaining, fl_color_context_t *context);
#endif // _di_fll_program_parameter_process_quietly_
/**
* @see fl_string_append()
*/
#ifndef _di_fll_program_parameter_additional_append_
- extern f_return_status fll_program_parameter_additional_append(const f_string *argv, const f_string_lengths additional, f_string_dynamics *destination);
+ extern f_return_status fll_program_parameter_additional_append(const f_string_t *argv, const f_string_lengths_t additional, f_string_dynamics_t *destination);
#endif // _di_fll_program_parameter_additional_append_
/**
* @see fl_string_mash()
*/
#ifndef _di_fll_program_parameter_additional_mash_
- extern f_return_status fll_program_parameter_additional_mash(const f_string glue, const f_string_length glue_length, const f_string *argv, const f_string_lengths additional, f_string_dynamic *destination);
+ extern f_return_status fll_program_parameter_additional_mash(const f_string_t glue, const f_string_length_t glue_length, const f_string_t *argv, const f_string_lengths_t additional, f_string_dynamic_t *destination);
#endif // _di_fll_program_parameter_additional_mash_
/**
* @see fl_string_rip()
*/
#ifndef _di_fll_program_parameter_additional_rip_
- extern f_return_status fll_program_parameter_additional_rip(const f_string *argv, const f_string_lengths additional, f_string_dynamics *destination);
+ extern f_return_status fll_program_parameter_additional_rip(const f_string_t *argv, const f_string_lengths_t additional, f_string_dynamics_t *destination);
#endif // _di_fll_program_parameter_additional_rip_
/**
* @see fl_string_rip()
*/
#ifndef _di_fll_program_parameter_additional_rip_mash_
- extern f_return_status fll_program_parameter_additional_rip_mash(const f_string glue, const f_string_length glue_length, const f_string *argv, const f_string_lengths additional, f_string_dynamic *destination);
+ extern f_return_status fll_program_parameter_additional_rip_mash(const f_string_t glue, const f_string_length_t glue_length, const f_string_t *argv, const f_string_lengths_t additional, f_string_dynamic_t *destination);
#endif // _di_fll_program_parameter_additional_rip_mash_
#ifdef __cplusplus
#endif
#ifndef _di_fll_status_from_string_
- f_return_status fll_status_from_string(const f_string string, f_status *code) {
+ f_return_status fll_status_from_string(const f_string_t string, f_status_t *code) {
#ifndef _di_level_1_parameter_checking_
if (code == 0) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- f_status status = F_none;
- const f_string_length length = strlen(string);
+ f_status_t status = F_none;
+ const f_string_length_t length = strlen(string);
if (length == 0) {
return F_data_not;
* F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_fll_status_from_string_
- extern f_return_status fll_status_from_string(const f_string string, f_status *code);
+ extern f_return_status fll_status_from_string(const f_string_t string, f_status_t *code);
#endif // _di_fll_status_to_string_
#ifdef __cplusplus
#endif
#ifndef _di_byte_dump_print_help_
- f_return_status byte_dump_print_help(const fl_color_context context) {
+ f_return_status byte_dump_print_help(const fl_color_context_t context) {
fll_program_print_help_header(context, byte_dump_name_long, byte_dump_version);
fll_program_print_help_option(context, f_console_standard_short_help, f_console_standard_long_help, f_console_symbol_short_enable, f_console_symbol_long_enable, " Print this help message.");
#endif // _di_byte_dump_print_help_
#ifndef _di_byte_dump_main_
- f_return_status byte_dump_main(const f_console_arguments arguments, byte_dump_data *data) {
- f_status status = F_none;
+ f_return_status byte_dump_main(const f_console_arguments_t arguments, byte_dump_data_t *data) {
+ f_status_t status = F_none;
{
- f_console_parameters parameters = { data->parameters, byte_dump_total_parameters };
- f_console_parameter_ids choices = f_console_parameter_ids_initialize;
+ f_console_parameters_t parameters = { data->parameters, byte_dump_total_parameters };
+ f_console_parameter_ids_t choices = f_console_parameter_ids_t_initialize;
// Identify priority of color parameters.
{
- f_console_parameter_id ids[3] = { byte_dump_parameter_no_color, byte_dump_parameter_light, byte_dump_parameter_dark };
+ f_console_parameter_id_t ids[3] = { byte_dump_parameter_no_color, byte_dump_parameter_light, byte_dump_parameter_dark };
choices.id = ids;
choices.used = 3;
// Identify priority of mode parameters.
{
- f_console_parameter_id ids[5] = { byte_dump_parameter_hexidecimal, byte_dump_parameter_duodecimal, byte_dump_parameter_octal, byte_dump_parameter_binary, byte_dump_parameter_decimal };
- f_console_parameter_id choice = byte_dump_parameter_hexidecimal;
+ f_console_parameter_id_t ids[5] = { byte_dump_parameter_hexidecimal, byte_dump_parameter_duodecimal, byte_dump_parameter_octal, byte_dump_parameter_binary, byte_dump_parameter_decimal };
+ f_console_parameter_id_t choice = byte_dump_parameter_hexidecimal;
choices.id = ids;
choices.used = 5;
// Identify priority of presentation parameters.
{
- f_console_parameter_id ids[3] = { byte_dump_parameter_normal, byte_dump_parameter_simple, byte_dump_parameter_classic };
- f_console_parameter_id choice = byte_dump_parameter_normal;
+ f_console_parameter_id_t ids[3] = { byte_dump_parameter_normal, byte_dump_parameter_simple, byte_dump_parameter_classic };
+ f_console_parameter_id_t choice = byte_dump_parameter_normal;
choices.id = ids;
choices.used = 3;
return F_status_set_error(status);
}
else if (data->parameters[byte_dump_parameter_width].result == f_console_result_additional) {
- const f_string_length index = data->parameters[byte_dump_parameter_width].additional.array[data->parameters[byte_dump_parameter_width].additional.used - 1];
- const f_string_range range = f_macro_string_range_initialize(strlen(arguments.argv[index]));
+ const f_string_length_t index = data->parameters[byte_dump_parameter_width].additional.array[data->parameters[byte_dump_parameter_width].additional.used - 1];
+ const f_string_range_t range = f_macro_string_range_initialize(strlen(arguments.argv[index]));
- f_number_unsigned number = 0;
+ f_number_unsigned_t number = 0;
status = fl_conversion_string_to_number_unsigned(arguments.argv[index], &number, range);
if (F_status_is_error(status) || number < 1 || number >= 0xfb) {
return F_status_set_error(status);
}
else if (data->parameters[byte_dump_parameter_first].result == f_console_result_additional) {
- const f_string_length index = data->parameters[byte_dump_parameter_first].additional.array[data->parameters[byte_dump_parameter_first].additional.used - 1];
- const f_string_range range = f_macro_string_range_initialize(strlen(arguments.argv[index]));
+ const f_string_length_t index = data->parameters[byte_dump_parameter_first].additional.array[data->parameters[byte_dump_parameter_first].additional.used - 1];
+ const f_string_range_t range = f_macro_string_range_initialize(strlen(arguments.argv[index]));
- f_number_unsigned number = 0;
+ f_number_unsigned_t number = 0;
status = fl_conversion_string_to_number_unsigned(arguments.argv[index], &number, range);
- if (F_status_is_error(status) || number > f_type_number_size_unsigned) {
+ if (F_status_is_error(status) || number > f_number_t_size_unsigned) {
fl_color_print(f_type_error, data->context.error, data->context.reset, "ERROR: The parameter '");
fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, byte_dump_long_first);
fl_color_print(f_type_error, data->context.error, data->context.reset, "' value can only be a number (inclusively) between ");
fl_color_print(f_type_error, data->context.notable, data->context.reset, "0");
fl_color_print(f_type_error, data->context.error, data->context.reset, " and ");
- fl_color_print(f_type_error, data->context.notable, data->context.reset, "%llu", f_type_number_size_unsigned);
+ fl_color_print(f_type_error, data->context.notable, data->context.reset, "%llu", f_number_t_size_unsigned);
fl_color_print_line(f_type_error, data->context.error, data->context.reset, ".");
byte_dump_delete_data(data);
return F_status_set_error(status);
}
else if (data->parameters[byte_dump_parameter_last].result == f_console_result_additional) {
- const f_string_length index = data->parameters[byte_dump_parameter_last].additional.array[data->parameters[byte_dump_parameter_last].additional.used - 1];
- const f_string_range range = f_macro_string_range_initialize(strlen(arguments.argv[index]));
+ const f_string_length_t index = data->parameters[byte_dump_parameter_last].additional.array[data->parameters[byte_dump_parameter_last].additional.used - 1];
+ const f_string_range_t range = f_macro_string_range_initialize(strlen(arguments.argv[index]));
- f_number_unsigned number = 0;
+ f_number_unsigned_t number = 0;
status = fl_conversion_string_to_number_unsigned(arguments.argv[index], &number, range);
- if (F_status_is_error(status) || number < 0 || number > f_type_number_size_unsigned) {
+ if (F_status_is_error(status) || number < 0 || number > f_number_t_size_unsigned) {
fl_color_print(f_type_error, data->context.error, data->context.reset, "ERROR: The parameter '");
fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, byte_dump_long_last);
fl_color_print(f_type_error, data->context.error, data->context.reset, "' value can only be a number (inclusively) between ");
fl_color_print(f_type_error, data->context.notable, data->context.reset, "0");
fl_color_print(f_type_error, data->context.error, data->context.reset, " and ");
- fl_color_print(f_type_error, data->context.notable, data->context.reset, "%llu", f_type_number_size_unsigned);
+ fl_color_print(f_type_error, data->context.notable, data->context.reset, "%llu", f_number_t_size_unsigned);
fl_color_print_line(f_type_error, data->context.error, data->context.reset, ".");
byte_dump_delete_data(data);
}
if (data->process_pipe) {
- f_file file = f_file_initialize;
+ f_file_t file = f_file_t_initialize;
file.id = f_type_descriptor_input;
if (data->remaining.used > 0) {
// pre-process remaining arguments to ensure that they all files exist before processing.
{
- f_status missing_files = F_none;
+ f_status_t missing_files = F_none;
- for (f_array_length counter = 0; counter < data->remaining.used; counter++) {
+ for (f_array_length_t counter = 0; counter < data->remaining.used; counter++) {
status = f_file_exists(arguments.argv[data->remaining.array[counter]]);
if (status == F_false || F_status_is_error(status)) {
if (missing_files == F_none) {
}
}
- for (f_array_length counter = 0; counter < data->remaining.used; counter++) {
- f_file file = f_file_initialize;
+ for (f_array_length_t counter = 0; counter < data->remaining.used; counter++) {
+ f_file_t file = f_file_t_initialize;
status = f_file_open(arguments.argv[data->remaining.array[counter]], 0, &file);
if (F_status_is_error(status)) {
#endif // _di_byte_dump_main_
#ifndef _di_byte_dump_delete_data_
- f_return_status byte_dump_delete_data(byte_dump_data *data) {
+ f_return_status byte_dump_delete_data(byte_dump_data_t *data) {
- for (f_string_length i = 0; i < byte_dump_total_parameters; i++) {
- f_macro_string_lengths_delete_simple(data->parameters[i].locations);
- f_macro_string_lengths_delete_simple(data->parameters[i].additional);
+ for (f_string_length_t i = 0; i < byte_dump_total_parameters; i++) {
+ f_macro_string_lengths_t_delete_simple(data->parameters[i].locations);
+ f_macro_string_lengths_t_delete_simple(data->parameters[i].additional);
} // for
- f_macro_string_lengths_delete_simple(data->remaining);
- fl_macro_color_context_delete_simple(data->context);
+ f_macro_string_lengths_t_delete_simple(data->remaining);
+ fl_macro_color_context_t_delete_simple(data->context);
return F_none;
}
byte_dump_parameter_classic,
};
- #define byte_dump_console_parameter_initialize \
+ #define byte_dump_console_parameter_t_initialize \
{ \
- f_console_parameter_initialize(f_console_standard_short_help, f_console_standard_long_help, 0, 0, f_console_type_normal), \
- f_console_parameter_initialize(f_console_standard_short_light, f_console_standard_long_light, 0, 0, f_console_type_inverse), \
- f_console_parameter_initialize(f_console_standard_short_dark, f_console_standard_long_dark, 0, 0, f_console_type_inverse), \
- f_console_parameter_initialize(f_console_standard_short_no_color, f_console_standard_long_no_color, 0, 0, f_console_type_inverse), \
- f_console_parameter_initialize(f_console_standard_short_version, f_console_standard_long_version, 0, 0, f_console_type_inverse), \
- f_console_parameter_initialize(byte_dump_short_binary, byte_dump_long_binary, 0, 0, f_console_type_normal), \
- f_console_parameter_initialize(byte_dump_short_decimal, byte_dump_long_decimal, 0, 0, f_console_type_normal), \
- f_console_parameter_initialize(byte_dump_short_duodecimal, byte_dump_long_duodecimal, 0, 0, f_console_type_normal), \
- f_console_parameter_initialize(byte_dump_short_hexidecimal, byte_dump_long_hexidecimal, 0, 0, f_console_type_normal), \
- f_console_parameter_initialize(byte_dump_short_octal, byte_dump_long_octal, 0, 0, f_console_type_normal), \
- f_console_parameter_initialize(byte_dump_short_first, byte_dump_long_first, 0, 1, f_console_type_normal), \
- f_console_parameter_initialize(byte_dump_short_last, byte_dump_long_last, 0, 1, f_console_type_normal), \
- f_console_parameter_initialize(byte_dump_short_width, byte_dump_long_width, 0, 1, f_console_type_normal), \
- f_console_parameter_initialize(byte_dump_short_text, byte_dump_long_text, 0, 0, f_console_type_normal), \
- f_console_parameter_initialize(byte_dump_short_placeholder, byte_dump_long_placeholder, 0, 0, f_console_type_normal), \
- f_console_parameter_initialize(0, byte_dump_long_normal, 0, 0, f_console_type_normal), \
- f_console_parameter_initialize(0, byte_dump_long_simple, 0, 0, f_console_type_normal), \
- f_console_parameter_initialize(0, byte_dump_long_classic, 0, 0, f_console_type_normal), \
+ f_console_parameter_t_initialize(f_console_standard_short_help, f_console_standard_long_help, 0, 0, f_console_type_normal), \
+ f_console_parameter_t_initialize(f_console_standard_short_light, f_console_standard_long_light, 0, 0, f_console_type_inverse), \
+ f_console_parameter_t_initialize(f_console_standard_short_dark, f_console_standard_long_dark, 0, 0, f_console_type_inverse), \
+ f_console_parameter_t_initialize(f_console_standard_short_no_color, f_console_standard_long_no_color, 0, 0, f_console_type_inverse), \
+ f_console_parameter_t_initialize(f_console_standard_short_version, f_console_standard_long_version, 0, 0, f_console_type_inverse), \
+ f_console_parameter_t_initialize(byte_dump_short_binary, byte_dump_long_binary, 0, 0, f_console_type_normal), \
+ f_console_parameter_t_initialize(byte_dump_short_decimal, byte_dump_long_decimal, 0, 0, f_console_type_normal), \
+ f_console_parameter_t_initialize(byte_dump_short_duodecimal, byte_dump_long_duodecimal, 0, 0, f_console_type_normal), \
+ f_console_parameter_t_initialize(byte_dump_short_hexidecimal, byte_dump_long_hexidecimal, 0, 0, f_console_type_normal), \
+ f_console_parameter_t_initialize(byte_dump_short_octal, byte_dump_long_octal, 0, 0, f_console_type_normal), \
+ f_console_parameter_t_initialize(byte_dump_short_first, byte_dump_long_first, 0, 1, f_console_type_normal), \
+ f_console_parameter_t_initialize(byte_dump_short_last, byte_dump_long_last, 0, 1, f_console_type_normal), \
+ f_console_parameter_t_initialize(byte_dump_short_width, byte_dump_long_width, 0, 1, f_console_type_normal), \
+ f_console_parameter_t_initialize(byte_dump_short_text, byte_dump_long_text, 0, 0, f_console_type_normal), \
+ f_console_parameter_t_initialize(byte_dump_short_placeholder, byte_dump_long_placeholder, 0, 0, f_console_type_normal), \
+ f_console_parameter_t_initialize(0, byte_dump_long_normal, 0, 0, f_console_type_normal), \
+ f_console_parameter_t_initialize(0, byte_dump_long_simple, 0, 0, f_console_type_normal), \
+ f_console_parameter_t_initialize(0, byte_dump_long_classic, 0, 0, f_console_type_normal), \
}
#define byte_dump_total_parameters 18
#endif // _di_byte_dump_defines_
-#ifndef _di_byte_dump_data_
+#ifndef _di_byte_dump_data_t_
typedef struct {
- f_console_parameter parameters[byte_dump_total_parameters];
+ f_console_parameter_t parameters[byte_dump_total_parameters];
- f_string_lengths remaining;
+ f_string_lengths_t remaining;
bool process_pipe;
uint64_t first;
uint8_t mode;
uint8_t presentation;
- fl_color_context context;
- } byte_dump_data;
+ fl_color_context_t context;
+ } byte_dump_data_t;
- #define byte_dump_data_initialize \
+ #define byte_dump_data_t_initialize \
{ \
- byte_dump_console_parameter_initialize, \
- f_string_lengths_initialize, \
+ byte_dump_console_parameter_t_initialize, \
+ f_string_lengths_t_initialize, \
F_false, \
0, \
0, \
8, \
byte_dump_mode_hexidecimal, \
byte_dump_presentation_normal, \
- fl_color_context_initialize, \
+ fl_color_context_t_initialize, \
}
-#endif // _di_byte_dump_data_
+#endif // _di_byte_dump_data_t_
/**
* Print help to standard output.
* F_none on success.
*/
#ifndef _di_byte_dump_print_help_
- extern f_return_status byte_dump_print_help(const fl_color_context context);
+ extern f_return_status byte_dump_print_help(const fl_color_context_t context);
#endif // _di_byte_dump_print_help_
/**
* @see byte_dump_delete_data()
*/
#ifndef _di_byte_dump_main_
- extern f_return_status byte_dump_main(const f_console_arguments arguments, byte_dump_data *data);
+ extern f_return_status byte_dump_main(const f_console_arguments_t arguments, byte_dump_data_t *data);
#endif // _di_byte_dump_main_
/**
* @see byte_dump_main()
*/
#ifndef _di_byte_dump_delete_data_
- extern f_return_status byte_dump_delete_data(byte_dump_data *data);
+ extern f_return_status byte_dump_delete_data(byte_dump_data_t *data);
#endif // _di_byte_dump_delete_data_
#ifdef __cplusplus
#include "byte_dump.h"
-int main(const unsigned long argc, const f_string *argv) {
- const f_console_arguments arguments = { argc, argv };
- byte_dump_data data = byte_dump_data_initialize;
+int main(const unsigned long argc, const f_string_t *argv) {
+ const f_console_arguments_t arguments = { argc, argv };
+ byte_dump_data_t data = byte_dump_data_t_initialize;
if (f_pipe_input_exists()) {
data.process_pipe = F_true;
}
- f_status status = byte_dump_main(arguments, &data);
+ f_status_t status = byte_dump_main(arguments, &data);
if (F_status_is_error(status)) {
return 1;
#endif
#ifndef _di_byte_dump_file_
- f_return_status byte_dump_file(const byte_dump_data data, const f_string file_name, f_file file) {
- f_status status = F_none;
+ f_return_status byte_dump_file(const byte_dump_data_t data, const f_string_t file_name, f_file_t file) {
+ f_status_t status = F_none;
uint64_t position = 0;
uint8_t size = 0;
int8_t width_current = 0;
int8_t width_count = 0;
- byte_dump_cell cell = byte_dump_cell_initialize;
- byte_dump_previous previous = byte_dump_previous_initialize;
+ byte_dump_cell_t cell = byte_dump_cell_t_initialize;
+ byte_dump_previous_t previous = byte_dump_previous_t_initialize;
bool character_reset = 0;
bool found_invalid_utf = F_false;
// Store the current character data until it can be printed.
- f_utf_string_dynamic characters = f_utf_string_dynamic_initialize;
- f_utf_character character_array[data.width];
- f_utf_string_length character_current = 0;
+ f_utf_string_dynamic_t characters = f_utf_string_dynamic_t_initialize;
+ f_utf_character_t character_array[data.width];
+ f_utf_string_length_t character_current = 0;
// The row starts based on the first byte starting point and how many columns of bytes are displayed per row.
if (data.first > 0) {
offset = data.first % data.width;
}
- memset(&character_array, 0, sizeof(f_utf_character) * data.width);
+ memset(&character_array, 0, sizeof(f_utf_character_t) * data.width);
characters.string = character_array;
characters.used = 0;
characters.size = data.width;
// When width_count == 0, then this is that start of a new character sequence.
if (width_count == 0) {
- characters.string[character_current] = f_macro_utf_character_from_char_1(byte);
+ characters.string[character_current] = f_macro_utf_character_t_from_char_1(byte);
width_count = 1;
// The first character in a UTF-8 sequence cannot have a width of 1.
width_current = f_macro_utf_byte_width_is(byte);
if (width_count == 1) {
- characters.string[character_current] |= f_macro_utf_character_from_char_2(byte);
+ characters.string[character_current] |= f_macro_utf_character_t_from_char_2(byte);
}
else if (width_count == 2) {
- characters.string[character_current] |= f_macro_utf_character_from_char_3(byte);
+ characters.string[character_current] |= f_macro_utf_character_t_from_char_3(byte);
}
else if (width_count == 3) {
- characters.string[character_current] |= f_macro_utf_character_from_char_4(byte);
+ characters.string[character_current] |= f_macro_utf_character_t_from_char_4(byte);
}
width_count++;
#endif // _di_byte_dump_file_
#ifndef _di_byte_dump_print_character_fragment_
- bool byte_dump_print_character_fragment(const byte_dump_data data, const f_utf_string_static characters, const uint8_t invalid[], const int8_t width_utf, const int8_t byte_current, byte_dump_previous *previous, byte_dump_cell *cell, uint8_t *offset) {
+ bool byte_dump_print_character_fragment(const byte_dump_data_t data, const f_utf_string_static_t characters, const uint8_t invalid[], const int8_t width_utf, const int8_t byte_current, byte_dump_previous_t *previous, byte_dump_cell_t *cell, uint8_t *offset) {
uint8_t byte = 0;
bool reset = F_false;
- f_utf_string_length character_current = characters.used - 1;
+ f_utf_string_length_t character_current = characters.used - 1;
if (byte_current == 1) {
- byte = f_macro_utf_character_to_char_1(characters.string[character_current]);
+ byte = f_macro_utf_character_t_to_char_1(characters.string[character_current]);
}
else if (byte_current == 2) {
- byte = f_macro_utf_character_to_char_2(characters.string[character_current]);
+ byte = f_macro_utf_character_t_to_char_2(characters.string[character_current]);
}
else if (byte_current == 3) {
- byte = f_macro_utf_character_to_char_3(characters.string[character_current]);
+ byte = f_macro_utf_character_t_to_char_3(characters.string[character_current]);
}
else if (byte_current == 4) {
- byte = f_macro_utf_character_to_char_4(characters.string[character_current]);
+ byte = f_macro_utf_character_t_to_char_4(characters.string[character_current]);
}
if (cell->column == 0) {
#endif // _di_byte_dump_print_character_fragment_
#ifndef _di_byte_dump_print_text_
- void byte_dump_print_text(const byte_dump_data data, const f_utf_string_static characters, const uint8_t invalid[], byte_dump_previous *previous, uint8_t *offset) {
+ void byte_dump_print_text(const byte_dump_data_t data, const f_utf_string_static_t characters, const uint8_t invalid[], byte_dump_previous_t *previous, uint8_t *offset) {
uint8_t j = 0;
uint8_t output = 0;
uint8_t width_utf = 0;
} // while
}
else {
- f_string placeholder = " ";
+ f_string_t placeholder = " ";
if (data.parameters[byte_dump_parameter_placeholder].result == f_console_result_found) {
placeholder = byte_dump_character_placeholder;
}
for (uint8_t i = 0; i < characters.used && j < data.width; i++, j++) {
- output = f_macro_utf_character_to_char_1(characters.string[i]);
+ output = f_macro_utf_character_t_to_char_1(characters.string[i]);
width_utf = f_macro_utf_byte_width_is(output);
if (invalid[i]) {
printf("%c", (uint8_t) output);
if (width_utf > 1) {
- output = f_macro_utf_character_to_char_2(characters.string[i]);
+ output = f_macro_utf_character_t_to_char_2(characters.string[i]);
printf("%c", (uint8_t) output);
if (width_utf > 2) {
- output = f_macro_utf_character_to_char_3(characters.string[i]);
+ output = f_macro_utf_character_t_to_char_3(characters.string[i]);
printf("%c", (uint8_t) output);
if (width_utf > 3) {
- output = f_macro_utf_character_to_char_4(characters.string[i]);
+ output = f_macro_utf_character_t_to_char_4(characters.string[i]);
printf("%c", (uint8_t) output);
}
}
#endif // _di_byte_dump_file_
#ifndef _di_byte_dump_print_file_error_
- void byte_dump_print_file_error(const fl_color_context context, const f_string function, const f_string file_name, const f_status status) {
+ void byte_dump_print_file_error(const fl_color_context_t context, const f_string_t function, const f_string_t file_name, const f_status_t status) {
if (status == F_false) {
fl_color_print(f_type_error, context.error, context.reset, "ERROR: Failed to find file '");
fl_color_print(f_type_error, context.notable, context.reset, "%s", file_name);
* column: The column position associated with the character cell.
* row: The row position associated with the character cell.
*/
-#ifndef _di_byte_dump_cell_
+#ifndef _di_byte_dump_cell_t_
typedef struct {
uint8_t column;
uint64_t row;
- } byte_dump_cell;
+ } byte_dump_cell_t;
- #define byte_dump_cell_initialize \
+ #define byte_dump_cell_t_initialize \
{ \
0, \
0, \
}
-#endif // _di_byte_dump_cell_
+#endif // _di_byte_dump_cell_t_
/**
* A data structure for character data that overflowed from a previous line.
* invalid: The specific invalid value provided representing the overflowed bytes.
* This is used to print the placeholders.
*/
-#ifndef _di_byte_dump_previous_
+#ifndef _di_byte_dump_previous_t_
typedef struct {
uint8_t bytes;
uint8_t invalid;
- } byte_dump_previous;
+ } byte_dump_previous_t;
- #define byte_dump_previous_initialize \
+ #define byte_dump_previous_t_initialize \
{ \
0, \
0, \
* F_failure (with error bit) on failure, usually when read() fails.
*/
#ifndef _di_byte_dump_file_
- extern f_return_status byte_dump_file(const byte_dump_data data, const f_string file_name, f_file file) f_gcc_attribute_visibility_internal;
+ extern f_return_status byte_dump_file(const byte_dump_data_t data, const f_string_t file_name, f_file_t file) f_gcc_attribute_visibility_internal;
#endif // _di_byte_dump_file_
/**
* @see byte_dump_print_text()
*/
#ifndef _di_byte_dump_print_character_fragment_
- extern bool byte_dump_print_character_fragment(const byte_dump_data data, const f_utf_string_static characters, const uint8_t invalid[], const int8_t width_utf, const int8_t byte_current, byte_dump_previous *previous, byte_dump_cell *cell, uint8_t *offset) f_gcc_attribute_visibility_internal;
+ extern bool byte_dump_print_character_fragment(const byte_dump_data_t data, const f_utf_string_static_t characters, const uint8_t invalid[], const int8_t width_utf, const int8_t byte_current, byte_dump_previous_t *previous, byte_dump_cell_t *cell, uint8_t *offset) f_gcc_attribute_visibility_internal;
#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(const byte_dump_data data, const f_utf_string_static characters, const uint8_t invalid[], byte_dump_previous *previous, uint8_t *offset) f_gcc_attribute_visibility_internal;
+ extern void byte_dump_print_text(const byte_dump_data_t data, const f_utf_string_static_t characters, const uint8_t invalid[], byte_dump_previous_t *previous, uint8_t *offset) f_gcc_attribute_visibility_internal;
#endif // _di_byte_dump_print_text_
/**
* F_false if error has not been printed.
*/
#ifndef _di_byte_dump_print_file_error_
- extern void byte_dump_print_file_error(const fl_color_context context, const f_string function, const f_string file_name, const f_status status) f_gcc_attribute_visibility_internal;
+ extern void byte_dump_print_file_error(const fl_color_context_t context, const f_string_t function, const f_string_t file_name, const f_status_t status) f_gcc_attribute_visibility_internal;
#endif // _di_byte_dump_print_file_error_
#ifdef __cplusplus
#endif
#ifndef _di_fake_print_help_
- f_return_status fake_print_help(const fl_color_context context) {
+ f_return_status fake_print_help(const fl_color_context_t context) {
fll_program_print_help_header(context, fake_name_long, fake_version);
fll_program_print_help_option(context, f_console_standard_short_help, f_console_standard_long_help, f_console_symbol_short_enable, f_console_symbol_long_enable, " Print this help message.");
#endif // _di_fake_print_help_
#ifndef _di_fake_main_
- f_return_status fake_main(const f_console_arguments arguments, fake_data *data) {
- f_status status = F_none;
+ f_return_status fake_main(const f_console_arguments_t arguments, fake_data_t *data) {
+ f_status_t status = F_none;
uint8_t operations[fake_operations_total];
- f_string operations_name[fake_operations_total];
+ f_string_t operations_name[fake_operations_total];
memset(&operations, 0, sizeof(uint8_t) * fake_operations_total);
- memset(&operations_name, 0, sizeof(f_string) * fake_operations_total);
+ memset(&operations_name, 0, sizeof(f_string_t) * fake_operations_total);
{
- f_console_parameters parameters = { data->parameters, fake_total_parameters };
+ f_console_parameters_t parameters = { data->parameters, fake_total_parameters };
// Load all parameters and identify priority of color parameters.
{
- f_console_parameter_id ids[3] = { fake_parameter_no_color, fake_parameter_light, fake_parameter_dark };
- f_console_parameter_ids choices = f_console_parameter_ids_initialize;
+ f_console_parameter_id_t ids[3] = { fake_parameter_no_color, fake_parameter_light, fake_parameter_dark };
+ f_console_parameter_ids_t choices = f_console_parameter_ids_t_initialize;
choices.id = ids;
choices.used = 3;
// Identify priority of verbosity related parameters.
{
- f_console_parameter_id ids[3] = { fake_parameter_quiet, fake_parameter_verbose, fake_parameter_debug };
- f_console_parameter_ids choices = f_console_parameter_ids_initialize;
- f_console_parameter_id choice = 0;
+ f_console_parameter_id_t ids[3] = { fake_parameter_quiet, fake_parameter_verbose, fake_parameter_debug };
+ f_console_parameter_ids_t choices = f_console_parameter_ids_t_initialize;
+ f_console_parameter_id_t choice = 0;
choices.id = ids;
choices.used = 3;
#endif // _di_fake_main_
#ifndef _di_fake_delete_data_
- f_return_status fake_delete_data(fake_data *data) {
+ f_return_status fake_delete_data(fake_data_t *data) {
- for (f_string_length i = 0; i < fake_total_parameters; i++) {
- f_macro_string_lengths_delete_simple(data->parameters[i].locations);
- f_macro_string_lengths_delete_simple(data->parameters[i].additional);
+ for (f_string_length_t i = 0; i < fake_total_parameters; i++) {
+ f_macro_string_lengths_t_delete_simple(data->parameters[i].locations);
+ f_macro_string_lengths_t_delete_simple(data->parameters[i].additional);
} // for
- f_macro_string_lengths_delete_simple(data->remaining);
-
- f_macro_string_dynamics_delete_simple(data->define);
- f_macro_string_dynamics_delete_simple(data->mode);
- f_macro_string_dynamic_delete_simple(data->process);
- f_macro_string_dynamic_delete_simple(data->settings);
-
- f_macro_string_dynamic_delete_simple(data->path_build);
- f_macro_string_dynamic_delete_simple(data->path_build_documents);
- f_macro_string_dynamic_delete_simple(data->path_build_includes);
- f_macro_string_dynamic_delete_simple(data->path_build_libraries);
- f_macro_string_dynamic_delete_simple(data->path_build_libraries_script);
- f_macro_string_dynamic_delete_simple(data->path_build_libraries_shared);
- f_macro_string_dynamic_delete_simple(data->path_build_libraries_static);
- f_macro_string_dynamic_delete_simple(data->path_build_objects);
- f_macro_string_dynamic_delete_simple(data->path_build_programs);
- f_macro_string_dynamic_delete_simple(data->path_build_programs_script);
- f_macro_string_dynamic_delete_simple(data->path_build_programs_shared);
- f_macro_string_dynamic_delete_simple(data->path_build_programs_static);
- f_macro_string_dynamic_delete_simple(data->path_build_settings);
- f_macro_string_dynamic_delete_simple(data->path_build_stage);
- f_macro_string_dynamic_delete_simple(data->path_work);
-
- f_macro_string_dynamic_delete_simple(data->path_data);
- f_macro_string_dynamic_delete_simple(data->path_data_build);
-
- f_macro_string_dynamic_delete_simple(data->path_data_settings);
-
- f_macro_string_dynamic_delete_simple(data->path_documents);
-
- f_macro_string_dynamic_delete_simple(data->path_licenses);
-
- f_macro_string_dynamic_delete_simple(data->path_sources);
- f_macro_string_dynamic_delete_simple(data->path_sources_bash);
- f_macro_string_dynamic_delete_simple(data->path_sources_c);
- f_macro_string_dynamic_delete_simple(data->path_sources_cpp);
- f_macro_string_dynamic_delete_simple(data->path_sources_script);
-
- f_macro_string_dynamic_delete_simple(data->path_work);
- f_macro_string_dynamic_delete_simple(data->path_work_includes);
- f_macro_string_dynamic_delete_simple(data->path_work_libraries);
- f_macro_string_dynamic_delete_simple(data->path_work_libraries_script);
- f_macro_string_dynamic_delete_simple(data->path_work_libraries_shared);
- f_macro_string_dynamic_delete_simple(data->path_work_libraries_static);
- f_macro_string_dynamic_delete_simple(data->path_work_programs);
- f_macro_string_dynamic_delete_simple(data->path_work_programs_script);
- f_macro_string_dynamic_delete_simple(data->path_work_programs_shared);
- f_macro_string_dynamic_delete_simple(data->path_work_programs_static);
-
- f_macro_string_dynamic_delete_simple(data->file_data_build_defines);
- f_macro_string_dynamic_delete_simple(data->file_data_build_dependencies);
- f_macro_string_dynamic_delete_simple(data->file_data_build_fakefile);
- f_macro_string_dynamic_delete_simple(data->file_data_build_settings);
-
- f_macro_string_dynamic_delete_simple(data->file_documents_readme);
-
- fl_macro_color_context_delete_simple(data->context);
+ f_macro_string_lengths_t_delete_simple(data->remaining);
+
+ f_macro_string_dynamics_t_delete_simple(data->define);
+ f_macro_string_dynamics_t_delete_simple(data->mode);
+ f_macro_string_dynamic_t_delete_simple(data->process);
+ f_macro_string_dynamic_t_delete_simple(data->settings);
+
+ f_macro_string_dynamic_t_delete_simple(data->path_build);
+ f_macro_string_dynamic_t_delete_simple(data->path_build_documents);
+ f_macro_string_dynamic_t_delete_simple(data->path_build_includes);
+ f_macro_string_dynamic_t_delete_simple(data->path_build_libraries);
+ f_macro_string_dynamic_t_delete_simple(data->path_build_libraries_script);
+ f_macro_string_dynamic_t_delete_simple(data->path_build_libraries_shared);
+ f_macro_string_dynamic_t_delete_simple(data->path_build_libraries_static);
+ f_macro_string_dynamic_t_delete_simple(data->path_build_objects);
+ f_macro_string_dynamic_t_delete_simple(data->path_build_programs);
+ f_macro_string_dynamic_t_delete_simple(data->path_build_programs_script);
+ f_macro_string_dynamic_t_delete_simple(data->path_build_programs_shared);
+ f_macro_string_dynamic_t_delete_simple(data->path_build_programs_static);
+ f_macro_string_dynamic_t_delete_simple(data->path_build_settings);
+ f_macro_string_dynamic_t_delete_simple(data->path_build_stage);
+ f_macro_string_dynamic_t_delete_simple(data->path_work);
+
+ f_macro_string_dynamic_t_delete_simple(data->path_data);
+ f_macro_string_dynamic_t_delete_simple(data->path_data_build);
+
+ f_macro_string_dynamic_t_delete_simple(data->path_data_settings);
+
+ f_macro_string_dynamic_t_delete_simple(data->path_documents);
+
+ f_macro_string_dynamic_t_delete_simple(data->path_licenses);
+
+ f_macro_string_dynamic_t_delete_simple(data->path_sources);
+ f_macro_string_dynamic_t_delete_simple(data->path_sources_bash);
+ f_macro_string_dynamic_t_delete_simple(data->path_sources_c);
+ f_macro_string_dynamic_t_delete_simple(data->path_sources_cpp);
+ f_macro_string_dynamic_t_delete_simple(data->path_sources_script);
+
+ f_macro_string_dynamic_t_delete_simple(data->path_work);
+ f_macro_string_dynamic_t_delete_simple(data->path_work_includes);
+ f_macro_string_dynamic_t_delete_simple(data->path_work_libraries);
+ f_macro_string_dynamic_t_delete_simple(data->path_work_libraries_script);
+ f_macro_string_dynamic_t_delete_simple(data->path_work_libraries_shared);
+ f_macro_string_dynamic_t_delete_simple(data->path_work_libraries_static);
+ f_macro_string_dynamic_t_delete_simple(data->path_work_programs);
+ f_macro_string_dynamic_t_delete_simple(data->path_work_programs_script);
+ f_macro_string_dynamic_t_delete_simple(data->path_work_programs_shared);
+ f_macro_string_dynamic_t_delete_simple(data->path_work_programs_static);
+
+ f_macro_string_dynamic_t_delete_simple(data->file_data_build_defines);
+ f_macro_string_dynamic_t_delete_simple(data->file_data_build_dependencies);
+ f_macro_string_dynamic_t_delete_simple(data->file_data_build_fakefile);
+ f_macro_string_dynamic_t_delete_simple(data->file_data_build_settings);
+
+ f_macro_string_dynamic_t_delete_simple(data->file_documents_readme);
+
+ fl_macro_color_context_t_delete_simple(data->context);
return F_none;
}
fake_parameter_operation_skeleton,
};
- #define fake_console_parameter_initialize \
+ #define fake_console_parameter_t_initialize \
{ \
- f_console_parameter_initialize(f_console_standard_short_help, f_console_standard_long_help, 0, 0, f_console_type_normal), \
- f_console_parameter_initialize(f_console_standard_short_light, f_console_standard_long_light, 0, 0, f_console_type_inverse), \
- f_console_parameter_initialize(f_console_standard_short_dark, f_console_standard_long_dark, 0, 0, f_console_type_inverse), \
- f_console_parameter_initialize(f_console_standard_short_debug, f_console_standard_long_debug, 0, 0, f_console_type_inverse), \
- f_console_parameter_initialize(f_console_standard_short_no_color, f_console_standard_long_no_color, 0, 0, f_console_type_inverse), \
- f_console_parameter_initialize(f_console_standard_short_quiet, f_console_standard_long_quiet, 0, 0, f_console_type_inverse), \
- f_console_parameter_initialize(f_console_standard_short_verbose, f_console_standard_long_verbose, 0, 0, f_console_type_inverse), \
- f_console_parameter_initialize(f_console_standard_short_version, f_console_standard_long_version, 0, 0, f_console_type_inverse), \
- f_console_parameter_initialize(fake_short_define, fake_long_define, 0, 1, f_console_type_normal), \
- f_console_parameter_initialize(fake_short_mode, fake_long_mode, 0, 1, f_console_type_normal), \
- f_console_parameter_initialize(fake_short_process, fake_long_process, 0, 1, f_console_type_normal), \
- f_console_parameter_initialize(fake_short_settings, fake_long_settings, 0, 1, f_console_type_normal), \
- f_console_parameter_initialize(fake_short_path_build, fake_long_path_build, 0, 1, f_console_type_normal), \
- f_console_parameter_initialize(fake_short_path_data, fake_long_path_data, 0, 1, f_console_type_normal), \
- f_console_parameter_initialize(fake_short_path_sources, fake_long_path_sources, 0, 1, f_console_type_normal), \
- f_console_parameter_initialize(fake_short_path_work, fake_long_path_work, 0, 1, f_console_type_normal), \
- f_console_parameter_initialize(0, fake_long_documents_disabled, 0, 0, f_console_type_normal), \
- f_console_parameter_initialize(0, fake_long_documents_enabled, 0, 0, f_console_type_normal), \
- f_console_parameter_initialize(0, fake_long_shared_disabled, 0, 0, f_console_type_normal), \
- f_console_parameter_initialize(0, fake_long_shared_enabled, 0, 0, f_console_type_normal), \
- f_console_parameter_initialize(0, fake_long_static_disabled, 0, 0, f_console_type_normal), \
- f_console_parameter_initialize(0, fake_long_static_enabled, 0, 0, f_console_type_normal), \
- f_console_parameter_initialize(0, 0, fake_other_operation_build, 0, f_console_type_other), \
- f_console_parameter_initialize(0, 0, fake_other_operation_clean, 0, f_console_type_other), \
- f_console_parameter_initialize(0, 0, fake_other_operation_make, 0, f_console_type_other), \
- f_console_parameter_initialize(0, 0, fake_other_operation_skeleton, 0, f_console_type_other), \
+ f_console_parameter_t_initialize(f_console_standard_short_help, f_console_standard_long_help, 0, 0, f_console_type_normal), \
+ f_console_parameter_t_initialize(f_console_standard_short_light, f_console_standard_long_light, 0, 0, f_console_type_inverse), \
+ f_console_parameter_t_initialize(f_console_standard_short_dark, f_console_standard_long_dark, 0, 0, f_console_type_inverse), \
+ f_console_parameter_t_initialize(f_console_standard_short_debug, f_console_standard_long_debug, 0, 0, f_console_type_inverse), \
+ f_console_parameter_t_initialize(f_console_standard_short_no_color, f_console_standard_long_no_color, 0, 0, f_console_type_inverse), \
+ f_console_parameter_t_initialize(f_console_standard_short_quiet, f_console_standard_long_quiet, 0, 0, f_console_type_inverse), \
+ f_console_parameter_t_initialize(f_console_standard_short_verbose, f_console_standard_long_verbose, 0, 0, f_console_type_inverse), \
+ f_console_parameter_t_initialize(f_console_standard_short_version, f_console_standard_long_version, 0, 0, f_console_type_inverse), \
+ f_console_parameter_t_initialize(fake_short_define, fake_long_define, 0, 1, f_console_type_normal), \
+ f_console_parameter_t_initialize(fake_short_mode, fake_long_mode, 0, 1, f_console_type_normal), \
+ f_console_parameter_t_initialize(fake_short_process, fake_long_process, 0, 1, f_console_type_normal), \
+ f_console_parameter_t_initialize(fake_short_settings, fake_long_settings, 0, 1, f_console_type_normal), \
+ f_console_parameter_t_initialize(fake_short_path_build, fake_long_path_build, 0, 1, f_console_type_normal), \
+ f_console_parameter_t_initialize(fake_short_path_data, fake_long_path_data, 0, 1, f_console_type_normal), \
+ f_console_parameter_t_initialize(fake_short_path_sources, fake_long_path_sources, 0, 1, f_console_type_normal), \
+ f_console_parameter_t_initialize(fake_short_path_work, fake_long_path_work, 0, 1, f_console_type_normal), \
+ f_console_parameter_t_initialize(0, fake_long_documents_disabled, 0, 0, f_console_type_normal), \
+ f_console_parameter_t_initialize(0, fake_long_documents_enabled, 0, 0, f_console_type_normal), \
+ f_console_parameter_t_initialize(0, fake_long_shared_disabled, 0, 0, f_console_type_normal), \
+ f_console_parameter_t_initialize(0, fake_long_shared_enabled, 0, 0, f_console_type_normal), \
+ f_console_parameter_t_initialize(0, fake_long_static_disabled, 0, 0, f_console_type_normal), \
+ f_console_parameter_t_initialize(0, fake_long_static_enabled, 0, 0, f_console_type_normal), \
+ f_console_parameter_t_initialize(0, 0, fake_other_operation_build, 0, f_console_type_other), \
+ f_console_parameter_t_initialize(0, 0, fake_other_operation_clean, 0, f_console_type_other), \
+ f_console_parameter_t_initialize(0, 0, fake_other_operation_make, 0, f_console_type_other), \
+ f_console_parameter_t_initialize(0, 0, fake_other_operation_skeleton, 0, f_console_type_other), \
}
#define fake_total_parameters 26
#endif // _di_fake_defines_
-#ifndef _di_fake_data_
+#ifndef _di_fake_data_t_
typedef struct {
- f_console_parameter parameters[fake_total_parameters];
+ f_console_parameter_t parameters[fake_total_parameters];
- f_string_lengths remaining;
+ f_string_lengths_t remaining;
bool process_pipe;
mode_t umask;
uint8_t operation;
uint8_t verbosity;
- f_string_dynamics define;
- f_string_dynamics mode;
- f_string_dynamic process;
- f_string_dynamic settings;
-
- f_string_dynamic path_build;
- f_string_dynamic path_build_documents;
- f_string_dynamic path_build_includes;
- f_string_dynamic path_build_libraries;
- f_string_dynamic path_build_libraries_script;
- f_string_dynamic path_build_libraries_shared;
- f_string_dynamic path_build_libraries_static;
- f_string_dynamic path_build_objects;
- f_string_dynamic path_build_programs;
- f_string_dynamic path_build_programs_script;
- f_string_dynamic path_build_programs_shared;
- f_string_dynamic path_build_programs_static;
- f_string_dynamic path_build_settings;
- f_string_dynamic path_build_stage;
-
- f_string_dynamic path_data;
- f_string_dynamic path_data_build;
- f_string_dynamic path_data_settings;
-
- f_string_dynamic path_documents;
-
- f_string_dynamic path_licenses;
-
- f_string_dynamic path_sources;
- f_string_dynamic path_sources_bash;
- f_string_dynamic path_sources_c;
- f_string_dynamic path_sources_cpp;
- f_string_dynamic path_sources_script;
-
- f_string_dynamic path_work;
- f_string_dynamic path_work_includes;
- f_string_dynamic path_work_libraries;
- f_string_dynamic path_work_libraries_script;
- f_string_dynamic path_work_libraries_shared;
- f_string_dynamic path_work_libraries_static;
- f_string_dynamic path_work_programs;
- f_string_dynamic path_work_programs_script;
- f_string_dynamic path_work_programs_shared;
- f_string_dynamic path_work_programs_static;
-
- f_string_dynamic file_data_build_defines;
- f_string_dynamic file_data_build_dependencies;
- f_string_dynamic file_data_build_fakefile;
- f_string_dynamic file_data_build_settings;
-
- f_string_dynamic file_documents_readme;
-
- fl_color_context context;
- } fake_data;
-
- #define fake_data_initialize \
+ f_string_dynamics_t define;
+ f_string_dynamics_t mode;
+ f_string_dynamic_t process;
+ f_string_dynamic_t settings;
+
+ f_string_dynamic_t path_build;
+ f_string_dynamic_t path_build_documents;
+ f_string_dynamic_t path_build_includes;
+ f_string_dynamic_t path_build_libraries;
+ f_string_dynamic_t path_build_libraries_script;
+ f_string_dynamic_t path_build_libraries_shared;
+ f_string_dynamic_t path_build_libraries_static;
+ f_string_dynamic_t path_build_objects;
+ f_string_dynamic_t path_build_programs;
+ f_string_dynamic_t path_build_programs_script;
+ f_string_dynamic_t path_build_programs_shared;
+ f_string_dynamic_t path_build_programs_static;
+ f_string_dynamic_t path_build_settings;
+ f_string_dynamic_t path_build_stage;
+
+ f_string_dynamic_t path_data;
+ f_string_dynamic_t path_data_build;
+ f_string_dynamic_t path_data_settings;
+
+ f_string_dynamic_t path_documents;
+
+ f_string_dynamic_t path_licenses;
+
+ f_string_dynamic_t path_sources;
+ f_string_dynamic_t path_sources_bash;
+ f_string_dynamic_t path_sources_c;
+ f_string_dynamic_t path_sources_cpp;
+ f_string_dynamic_t path_sources_script;
+
+ f_string_dynamic_t path_work;
+ f_string_dynamic_t path_work_includes;
+ f_string_dynamic_t path_work_libraries;
+ f_string_dynamic_t path_work_libraries_script;
+ f_string_dynamic_t path_work_libraries_shared;
+ f_string_dynamic_t path_work_libraries_static;
+ f_string_dynamic_t path_work_programs;
+ f_string_dynamic_t path_work_programs_script;
+ f_string_dynamic_t path_work_programs_shared;
+ f_string_dynamic_t path_work_programs_static;
+
+ f_string_dynamic_t file_data_build_defines;
+ f_string_dynamic_t file_data_build_dependencies;
+ f_string_dynamic_t file_data_build_fakefile;
+ f_string_dynamic_t file_data_build_settings;
+
+ f_string_dynamic_t file_documents_readme;
+
+ fl_color_context_t context;
+ } fake_data_t;
+
+ #define fake_data_t_initialize \
{ \
- fake_console_parameter_initialize, \
- f_string_lengths_initialize, \
+ fake_console_parameter_t_initialize, \
+ f_string_lengths_t_initialize, \
F_false, \
0, \
0, \
fake_verbosity_normal, \
- f_string_dynamics_initialize, \
- f_string_dynamics_initialize, \
- f_string_dynamic_initialize, \
- f_string_dynamic_initialize, \
- f_string_dynamic_initialize, \
- f_string_dynamic_initialize, \
- f_string_dynamic_initialize, \
- f_string_dynamic_initialize, \
- f_string_dynamic_initialize, \
- f_string_dynamic_initialize, \
- f_string_dynamic_initialize, \
- f_string_dynamic_initialize, \
- f_string_dynamic_initialize, \
- f_string_dynamic_initialize, \
- f_string_dynamic_initialize, \
- f_string_dynamic_initialize, \
- f_string_dynamic_initialize, \
- f_string_dynamic_initialize, \
- f_string_dynamic_initialize, \
- f_string_dynamic_initialize, \
- f_string_dynamic_initialize, \
- f_string_dynamic_initialize, \
- f_string_dynamic_initialize, \
- f_string_dynamic_initialize, \
- f_string_dynamic_initialize, \
- f_string_dynamic_initialize, \
- f_string_dynamic_initialize, \
- f_string_dynamic_initialize, \
- f_string_dynamic_initialize, \
- f_string_dynamic_initialize, \
- f_string_dynamic_initialize, \
- f_string_dynamic_initialize, \
- f_string_dynamic_initialize, \
- f_string_dynamic_initialize, \
- f_string_dynamic_initialize, \
- f_string_dynamic_initialize, \
- f_string_dynamic_initialize, \
- f_string_dynamic_initialize, \
- f_string_dynamic_initialize, \
- f_string_dynamic_initialize, \
- f_string_dynamic_initialize, \
- f_string_dynamic_initialize, \
- f_string_dynamic_initialize, \
- fl_color_context_initialize, \
+ f_string_dynamics_t_initialize, \
+ f_string_dynamics_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ fl_color_context_t_initialize, \
}
-#endif // _di_fake_data_
+#endif // _di_fake_data_t_
/**
* Print help to standard output.
* F_none on success.
*/
#ifndef _di_fake_print_help_
- extern f_return_status fake_print_help(const fl_color_context context);
+ extern f_return_status fake_print_help(const fl_color_context_t context);
#endif // _di_fake_print_help_
/**
* @see fake_delete_data()
*/
#ifndef _di_fake_main_
- extern f_return_status fake_main(const f_console_arguments arguments, fake_data *data);
+ extern f_return_status fake_main(const f_console_arguments_t arguments, fake_data_t *data);
#endif // _di_fake_main_
/**
* @see fake_main()
*/
#ifndef _di_fake_delete_data_
- extern f_return_status fake_delete_data(fake_data *data);
+ extern f_return_status fake_delete_data(fake_data_t *data);
#endif // _di_fake_delete_data_
#ifdef __cplusplus
#include "fake.h"
-int main(const unsigned long argc, const f_string *argv) {
- const f_console_arguments arguments = { argc, argv };
- fake_data data = fake_data_initialize;
+int main(const unsigned long argc, const f_string_t *argv) {
+ const f_console_arguments_t arguments = { argc, argv };
+ fake_data_t data = fake_data_t_initialize;
// @fixme: bad design in POSIX where there is no get umask without setting it.
data.umask = umask(0);
// restore umask.
umask(data.umask);
- f_status status = fake_main(arguments, &data);
+ f_status_t status = fake_main(arguments, &data);
if (F_status_is_error(status)) {
return 1;
#endif
#ifndef _di_fake_build_arguments_standard_add_
- void fake_build_arguments_standard_add(const fake_data data, const fake_build_data data_build, const bool is_shared, const bool is_library, f_string_dynamics *arguments, f_status *status) {
+ void fake_build_arguments_standard_add(const fake_data_t data, const fake_build_data_t data_build, const bool is_shared, const bool is_library, f_string_dynamics_t *arguments, f_status_t *status) {
if (F_status_is_error(*status)) return;
- f_string_length build_libraries_length = fake_build_parameter_library_link_path_length + data.path_build_libraries_shared.used;
+ f_string_length_t build_libraries_length = fake_build_parameter_library_link_path_length + data.path_build_libraries_shared.used;
char build_libraries[build_libraries_length + 1];
memcpy(build_libraries + fake_build_parameter_library_link_path_length, data.path_build_libraries_static.string, data.path_build_libraries_static.used);
}
- f_string_length build_includes_length = fake_build_parameter_library_include_length + data.path_build_includes.used;
+ f_string_length_t build_includes_length = fake_build_parameter_library_include_length + data.path_build_includes.used;
char build_includes[build_includes_length + 1];
memcpy(build_includes, fake_build_parameter_library_include, fake_build_parameter_library_include_length);
memcpy(build_includes + fake_build_parameter_library_include_length, data.path_build_includes.string, data.path_build_includes.used);
- const f_string values[] = {
+ const f_string_t values[] = {
build_libraries,
build_includes,
};
- const f_string_length lengths[] = {
+ const f_string_length_t lengths[] = {
build_libraries_length,
build_includes_length,
};
} // for
if (data.path_work.used > 0) {
- f_string_length length = 0;
+ f_string_length_t length = 0;
if (F_status_is_fine(*status)) {
length = fake_build_parameter_library_include_length + data.path_work_includes.used;
}
if (F_status_is_fine(*status)) {
- for (f_array_length i = 0; i < data_build.setting.build_libraries.used; i++) {
+ for (f_array_length_t i = 0; i < data_build.setting.build_libraries.used; i++) {
*status = fll_execute_arguments_add(data_build.setting.build_libraries.array[i].string, data_build.setting.build_libraries.array[i].used, arguments);
if (F_status_is_error(*status)) break;
} // for
}
- for (f_array_length i = 0; i < data_build.setting.flags_all.used && F_status_is_fine(*status); i++) {
+ for (f_array_length_t i = 0; i < data_build.setting.flags_all.used && F_status_is_fine(*status); i++) {
*status = fll_execute_arguments_add(data_build.setting.flags_all.array[i].string, data_build.setting.flags_all.array[i].used, arguments);
if (F_status_is_error(*status)) break;
} // for
- for (f_array_length i = 0; i < data_build.setting.flags_shared.used && F_status_is_fine(*status); i++) {
+ for (f_array_length_t i = 0; i < data_build.setting.flags_shared.used && F_status_is_fine(*status); i++) {
*status = fll_execute_arguments_add(data_build.setting.flags_shared.array[i].string, data_build.setting.flags_shared.array[i].used, arguments);
if (F_status_is_error(*status)) break;
} // for
if (is_library) {
- for (f_array_length j = 0; j < data_build.setting.flags_library.used && F_status_is_fine(*status); j++) {
+ for (f_array_length_t j = 0; j < data_build.setting.flags_library.used && F_status_is_fine(*status); j++) {
*status = fll_execute_arguments_add(data_build.setting.flags_library.array[j].string, data_build.setting.flags_library.array[j].used, arguments);
if (F_status_is_error(*status)) break;
} // for
}
else {
- for (f_array_length i = 0; i < data_build.setting.flags_program.used && F_status_is_fine(*status); i++) {
+ for (f_array_length_t i = 0; i < data_build.setting.flags_program.used && F_status_is_fine(*status); i++) {
*status = fll_execute_arguments_add(data_build.setting.flags_program.array[i].string, data_build.setting.flags_program.array[i].used, arguments);
if (F_status_is_error(*status)) break;
} // for
}
if (data.define.used) {
- f_string_length length = 0;
- f_array_length i = 0;
+ f_string_length_t length = 0;
+ f_array_length_t i = 0;
for (; i < data.define.used && F_status_is_fine(*status); i++) {
length = fake_build_parameter_define_prefix_length + data.define.array[i].used;
} // for
}
else {
- f_string_length length = 0;
- f_array_length i = 0;
+ f_string_length_t length = 0;
+ f_array_length_t i = 0;
for (; i < data_build.setting.defines_all.used && F_status_is_fine(*status); i++) {
length = fake_build_parameter_define_prefix_length + data_build.setting.defines_all.array[i].used;
#endif // _di_fake_build_arguments_standard_add_
#ifndef _di_fake_build_copy_
- void fake_build_copy(const fake_data data, const f_mode mode, const f_string label, const f_string_static source, const f_string_static destination, const f_string_statics files, const f_string_static file_stage, f_status *status) {
+ void fake_build_copy(const fake_data_t data, const f_mode_t mode, const f_string_t label, const f_string_static_t source, const f_string_static_t destination, const f_string_statics_t files, const f_string_static_t file_stage, f_status_t *status) {
if (F_status_is_error(*status) || f_file_exists(file_stage.string) == F_true) return;
- f_directory_statuss failures = f_directory_statuss_initialize;
- f_string_dynamic path_source = f_string_dynamic_initialize;
- f_string_dynamic destination_file = f_string_dynamic_initialize;
+ f_directory_statuss_t failures = f_directory_statuss_t_initialize;
+ f_string_dynamic_t path_source = f_string_dynamic_t_initialize;
+ f_string_dynamic_t destination_file = f_string_dynamic_t_initialize;
if (data.verbosity != fake_verbosity_quiet) {
printf("%c", f_string_eol[0]);
fl_color_print_line(f_type_output, data.context.important, data.context.reset, "Copying %s.", label);
}
- f_macro_string_dynamic_new(*status, path_source, source.used);
+ f_macro_string_dynamic_t_new(*status, path_source, source.used);
if (F_status_is_error(*status)) {
- fake_print_error(data, F_status_set_fine(*status), "f_macro_string_dynamic_new", F_true);
+ fake_print_error(data, F_status_set_fine(*status), "f_macro_string_dynamic_t_new", F_true);
- f_macro_string_dynamic_delete_simple(path_source);
+ f_macro_string_dynamic_t_delete_simple(path_source);
return;
}
memcpy(path_source.string, source.string, source.used);
- for (f_array_length i = 0; i < files.used; i++) {
+ for (f_array_length_t i = 0; i < files.used; i++) {
if (files.array[i].used == 0) continue;
path_source.used = source.used;
if (F_status_is_error(*status)) {
if (data.verbosity == fake_verbosity_verbose) {
- for (f_string_length j = 0; j < failures.used; j++) {
+ for (f_string_length_t j = 0; j < failures.used; j++) {
fake_print_error_build_operation_file(data, F_status_set_fine(*status), "fl_directory_copy_content", "copy contents of", "to", path_source.string, destination.string, F_true);
} // for
*status = F_none;
} // for
- f_macro_directory_statuss_delete_simple(failures);
- f_macro_string_dynamic_delete_simple(path_source);
- f_macro_string_dynamic_delete_simple(destination_file);
+ f_macro_directory_statuss_t_delete_simple(failures);
+ f_macro_string_dynamic_t_delete_simple(path_source);
+ f_macro_string_dynamic_t_delete_simple(destination_file);
if (F_status_is_fine(*status)) {
fake_build_touch(data, file_stage, status);
#endif // _di_fake_build_copy_
#ifndef _di_fake_build_skeleton_
- void fake_build_skeleton(const fake_data data, const fake_build_data data_build, const mode_t mode, const f_string_static file_stage, f_status *status) {
+ void fake_build_skeleton(const fake_data_t data, const fake_build_data_t data_build, const mode_t mode, const f_string_static_t file_stage, f_status_t *status) {
if (F_status_is_error(*status) || f_file_exists(file_stage.string) == F_true) return;
- f_string_static path_headers = f_string_static_initialize;
- f_string_length directory_headers_length = data.path_build_includes.used + data_build.setting.path_headers.used;
+ f_string_static_t path_headers = f_string_static_t_initialize;
+ f_string_length_t directory_headers_length = data.path_build_includes.used + data_build.setting.path_headers.used;
char directory_headers[directory_headers_length + 1];
path_headers.size = directory_headers_length + 1;
}
- const f_string_static *directorys[] = {
+ const f_string_static_t *directorys[] = {
&data.path_build,
&data.path_build_documents,
&data.path_build_includes,
#endif // _di_fake_build_skeleton_
#ifndef _di_fake_build_execute_process_script_
- void fake_build_execute_process_script(const fake_data data, const fake_build_data data_build, const f_string_static process_script, const f_string_static file_stage, f_status *status) {
+ void fake_build_execute_process_script(const fake_data_t data, const fake_build_data_t data_build, const f_string_static_t process_script, const f_string_static_t file_stage, f_status_t *status) {
if (F_status_is_error(*status) || f_file_exists(file_stage.string) == F_true) return;
if (process_script.used == 0) return;
- f_string_dynamics arguments = f_string_dynamics_initialize;
+ f_string_dynamics_t arguments = f_string_dynamics_t_initialize;
*status = fll_execute_arguments_add(fake_other_operation_build, fake_other_operation_build_length, &arguments);
if (F_status_is_error(*status)) {
fake_print_error(data, F_status_set_fine(*status), "fll_execute_arguments_add", F_true);
- f_macro_string_dynamics_delete_simple(arguments);
+ f_macro_string_dynamics_t_delete_simple(arguments);
return;
}
{
- f_string_dynamic defines = f_string_dynamic_initialize;
+ f_string_dynamic_t defines = f_string_dynamic_t_initialize;
if (data.define.used) {
- for (f_array_length i = 0; i < data.define.used; i++) {
+ for (f_array_length_t i = 0; i < data.define.used; i++) {
*status = fl_string_dynamic_mash(" ", 1, data.define.array[i], &defines);
if (F_status_is_error(*status)) {
if (F_status_is_error(*status)) {
fake_print_error(data, F_status_set_fine(*status), "fl_string_dynamic_mash", F_true);
- f_macro_string_dynamic_delete_simple(defines);
- f_macro_string_dynamics_delete_simple(arguments);
+ f_macro_string_dynamic_t_delete_simple(defines);
+ f_macro_string_dynamics_t_delete_simple(arguments);
return;
}
if (F_status_is_error(*status)) {
fake_print_error(data, F_status_set_fine(*status), "fl_string_dynamic_terminate_after", F_true);
- f_macro_string_dynamic_delete_simple(defines);
- f_macro_string_dynamics_delete_simple(arguments);
+ f_macro_string_dynamic_t_delete_simple(defines);
+ f_macro_string_dynamics_t_delete_simple(arguments);
return;
}
}
- const f_string parameters_prefix[] = {
+ const f_string_t parameters_prefix[] = {
f_console_symbol_short_enable,
f_console_symbol_short_enable,
f_console_symbol_short_enable,
f_console_symbol_short_enable,
};
- const f_string_length parameters_prefix_length[] = {
+ const f_string_length_t parameters_prefix_length[] = {
f_console_symbol_short_enable_length,
f_console_symbol_short_enable_length,
f_console_symbol_short_enable_length,
f_console_symbol_short_enable_length,
};
- const f_string parameters_name[] = {
+ const f_string_t parameters_name[] = {
fake_short_define,
fake_short_process,
fake_short_settings,
fake_short_path_work,
};
- const f_string_length parameters_name_length[] = {
+ const f_string_length_t parameters_name_length[] = {
fake_short_define_length,
fake_short_process_length,
fake_short_settings_length,
fake_short_path_work_length,
};
- const f_string parameters_value[] = {
+ const f_string_t parameters_value[] = {
defines.string,
data.process.string,
data.settings.string,
data.path_work.string,
};
- const f_string_length parameters_value_length[] = {
+ const f_string_length_t parameters_value_length[] = {
defines.used,
data.process.used,
data.settings.used,
*status = fll_execute_arguments_add_parameter_set(parameters_prefix, parameters_prefix_length, parameters_name, parameters_name_length, parameters_value, parameters_value_length, 7, &arguments);
- f_macro_string_dynamic_delete_simple(defines);
+ f_macro_string_dynamic_t_delete_simple(defines);
if (F_status_is_error(*status)) {
fake_print_error(data, F_status_set_fine(*status), "fll_execute_arguments_add_parameter_set", F_true);
- f_macro_string_dynamics_delete_simple(arguments);
+ f_macro_string_dynamics_t_delete_simple(arguments);
return;
}
}
- f_string_dynamic path = f_string_dynamic_initialize;
- f_string function = 0;
+ f_string_dynamic_t path = f_string_dynamic_t_initialize;
+ f_string_t function = 0;
{
function = "fl_string_dynamic_append_nulless";
if (F_status_is_error(*status)) {
fake_print_error(data, F_status_set_fine(*status), function, F_true);
- f_macro_string_dynamic_delete_simple(path);
- f_macro_string_dynamics_delete_simple(arguments);
+ f_macro_string_dynamic_t_delete_simple(path);
+ f_macro_string_dynamics_t_delete_simple(arguments);
return;
}
}
*status = fll_execute_path_environment(path.string, arguments, data_build.environment.names, data_build.environment.values, &result);
- f_macro_string_dynamics_delete_simple(arguments);
+ f_macro_string_dynamics_t_delete_simple(arguments);
}
if (F_status_is_error(*status)) {
fake_build_touch(data, file_stage, status);
}
- f_macro_string_dynamic_delete_simple(path);
+ f_macro_string_dynamic_t_delete_simple(path);
}
#endif // _di_fake_build_execute_process_script_
#ifndef _di_fake_build_get_file_name_without_extension_
- f_return_status fake_build_get_file_name_without_extension(const fake_data data, const f_string_static path, f_string_dynamic *name) {
+ f_return_status fake_build_get_file_name_without_extension(const fake_data_t data, const f_string_static_t path, f_string_dynamic_t *name) {
name->used = 0;
if (path.used == 0) return F_none;
- f_status status = f_file_name_base(path.string, path.used, name);
+ f_status_t status = f_file_name_base(path.string, path.used, name);
if (F_status_is_error(status)) {
fake_print_error(data, F_status_set_fine(status), "f_file_name_base", F_true);
return status;
}
- f_string_length i = name->used;
+ f_string_length_t i = name->used;
for (; i > 0; i--) {
if (name->string[i] == f_path_extension_separator[0]) {
#endif // _di_fake_build_get_file_name_without_extension_
#ifndef _di_fake_build_libraries_script_
- void fake_build_libraries_script(const fake_data data, const fake_build_data data_build, const f_mode mode, const f_string_static file_stage, f_status *status) {
+ void fake_build_libraries_script(const fake_data_t data, const fake_build_data_t data_build, const f_mode_t mode, const f_string_static_t file_stage, f_status_t *status) {
if (F_status_is_error(*status) || f_file_exists(file_stage.string) == F_true) return;
// @todo needs to perform some sort of regex replace on the library scripts.
#endif // _di_fake_build_libraries_script_
#ifndef _di_fake_build_library_shared_
- void fake_build_library_shared(const fake_data data, const fake_build_data data_build, const f_mode mode, const f_string_static file_stage, f_status *status) {
+ void fake_build_library_shared(const fake_data_t data, const fake_build_data_t data_build, const f_mode_t mode, const f_string_static_t file_stage, f_status_t *status) {
if (F_status_is_error(*status) || f_file_exists(file_stage.string) == F_true) return;
if (!data_build.setting.build_sources_library.used) return;
fl_color_print_line(f_type_output, data.context.important, data.context.reset, "Compiling shared library.");
}
- f_string_dynamics arguments = f_string_dynamics_initialize;
+ f_string_dynamics_t arguments = f_string_dynamics_t_initialize;
{
- const f_string_static *path_sources = &data.path_sources_c;
+ const f_string_static_t *path_sources = &data.path_sources_c;
if (data_build.setting.build_language == fake_build_language_type_cpp) {
path_sources = &data.path_sources_cpp;
}
- f_string_length source_length = 0;
+ f_string_length_t source_length = 0;
- for (f_array_length i = 0; i < data_build.setting.build_sources_library.used; i++) {
+ for (f_array_length_t i = 0; i < data_build.setting.build_sources_library.used; i++) {
source_length = path_sources->used + data_build.setting.build_sources_library.array[i].used;
char source[source_length + 1];
if (F_status_is_error(*status)) {
fake_print_error(data, F_status_set_fine(*status), "fll_execute_arguments_add", F_true);
- f_macro_string_dynamics_delete_simple(arguments);
+ f_macro_string_dynamics_t_delete_simple(arguments);
return;
}
}
- f_string_length parameter_file_name_length = fake_build_parameter_library_name_prefix_length;
- f_string_length parameter_file_name_major_length = fake_build_parameter_library_name_prefix_length;
- f_string_length parameter_file_name_minor_length = fake_build_parameter_library_name_prefix_length;
- f_string_length parameter_file_name_micro_length = fake_build_parameter_library_name_prefix_length;
+ f_string_length_t parameter_file_name_length = fake_build_parameter_library_name_prefix_length;
+ f_string_length_t parameter_file_name_major_length = fake_build_parameter_library_name_prefix_length;
+ f_string_length_t parameter_file_name_minor_length = fake_build_parameter_library_name_prefix_length;
+ f_string_length_t parameter_file_name_micro_length = fake_build_parameter_library_name_prefix_length;
parameter_file_name_micro_length += data_build.setting.project_name.used + fake_build_parameter_library_name_suffix_shared_length;
parameter_file_name_length = parameter_file_name_micro_length;
parameter_file_name_micro[parameter_file_name_micro_length] = 0;
{
- f_string_length parameter_file_path_length = data.path_build_libraries_shared.used + parameter_file_name_micro_length;
+ f_string_length_t parameter_file_path_length = data.path_build_libraries_shared.used + parameter_file_name_micro_length;
char parameter_file_path[parameter_file_path_length + 1];
parameter_file_path[parameter_file_path_length] = 0;
- f_string_length parameter_linker_length = fake_build_parameter_library_shared_prefix_length;
+ f_string_length_t parameter_linker_length = fake_build_parameter_library_shared_prefix_length;
if (data_build.setting.version_target == fake_build_version_type_major) {
parameter_linker_length += parameter_file_name_major_length;
parameter_linker[parameter_linker_length] = 0;
- const f_string values[] = {
+ const f_string_t values[] = {
fake_build_parameter_library_shared,
parameter_linker,
fake_build_parameter_library_output,
parameter_file_path,
};
- const f_string_length lengths[] = {
+ const f_string_length_t lengths[] = {
fake_build_parameter_library_shared_length,
parameter_linker_length,
fake_build_parameter_library_output_length,
if (F_status_is_error(*status)) {
fake_print_error(data, F_status_set_fine(*status), "fll_execute_arguments_add", F_true);
- f_macro_string_dynamics_delete_simple(arguments);
+ f_macro_string_dynamics_t_delete_simple(arguments);
return;
}
}
fake_execute(data, data_build.environment, data_build.setting.build_compiler, arguments, status);
- f_macro_string_dynamics_delete_simple(arguments);
+ f_macro_string_dynamics_t_delete_simple(arguments);
if (F_status_is_error(*status)) return;
if (data_build.setting.version_target != fake_build_version_type_micro) {
- f_string_length parameter_file_path_length = data.path_build_libraries_shared.used;
+ f_string_length_t parameter_file_path_length = data.path_build_libraries_shared.used;
if (data_build.setting.version_target == fake_build_version_type_major) {
parameter_file_path_length += parameter_file_name_major_length;
}
if (F_status_is_fine(*status)) {
- f_string_length parameter_file_path_length = data.path_build_libraries_shared.used + parameter_file_name_length;
+ f_string_length_t parameter_file_path_length = data.path_build_libraries_shared.used + parameter_file_name_length;
char parameter_file_path[parameter_file_path_length + 1];
#endif // _di_fake_build_library_shared_
#ifndef _di_fake_build_library_static_
- void fake_build_library_static(const fake_data data, const fake_build_data data_build, const f_mode mode, const f_string_static file_stage, f_status *status) {
+ void fake_build_library_static(const fake_data_t data, const fake_build_data_t data_build, const f_mode_t mode, const f_string_static_t file_stage, f_status_t *status) {
if (F_status_is_error(*status) || f_file_exists(file_stage.string) == F_true) return;
if (!data_build.setting.build_sources_library.used) return;
fl_color_print_line(f_type_output, data.context.important, data.context.reset, "Compiling static library.");
}
- f_string_dynamic file_name = f_string_dynamic_initialize;
- f_string_dynamic source_path = f_string_dynamic_initialize;
- f_string_dynamics arguments = f_string_dynamics_initialize;
+ f_string_dynamic_t file_name = f_string_dynamic_t_initialize;
+ f_string_dynamic_t source_path = f_string_dynamic_t_initialize;
+ f_string_dynamics_t arguments = f_string_dynamics_t_initialize;
*status = fll_execute_arguments_add(fake_build_parameter_object_link_arguments, fake_build_parameter_object_link_arguments_length, &arguments);
if (F_status_is_fine(*status)) {
- f_string_length destination_length = data.path_build_libraries_static.used + fake_build_parameter_library_name_prefix_length;
+ f_string_length_t destination_length = data.path_build_libraries_static.used + fake_build_parameter_library_name_prefix_length;
destination_length += data_build.setting.project_name.used + fake_build_parameter_library_name_suffix_static_length;
char destination[destination_length + 1];
}
if (F_status_is_fine(*status)) {
- f_string_length source_length = 0;
+ f_string_length_t source_length = 0;
- for (f_array_length i = 0; i < data_build.setting.build_sources_library.used; i++) {
+ for (f_array_length_t i = 0; i < data_build.setting.build_sources_library.used; i++) {
source_path.used = 0;
*status = fake_build_get_file_name_without_extension(data, data_build.setting.build_sources_library.array[i], &file_name);
if (F_status_is_error(*status)) {
fake_print_error(data, F_status_set_fine(*status), "fake_build_get_file_name_without_extension", F_true);
- f_macro_string_dynamic_delete_simple(file_name);
- f_macro_string_dynamic_delete_simple(source_path);
- f_macro_string_dynamics_delete_simple(arguments);
+ f_macro_string_dynamic_t_delete_simple(file_name);
+ f_macro_string_dynamic_t_delete_simple(source_path);
+ f_macro_string_dynamics_t_delete_simple(arguments);
return;
}
if (F_status_is_error(*status)) {
fake_print_error(data, F_status_set_fine(*status), "fll_execute_arguments_add", F_true);
- f_macro_string_dynamic_delete_simple(file_name);
- f_macro_string_dynamic_delete_simple(source_path);
- f_macro_string_dynamics_delete_simple(arguments);
+ f_macro_string_dynamic_t_delete_simple(file_name);
+ f_macro_string_dynamic_t_delete_simple(source_path);
+ f_macro_string_dynamics_t_delete_simple(arguments);
return;
}
}
fake_execute(data, data_build.environment, data_build.setting.build_linker, arguments, status);
- f_macro_string_dynamic_delete_simple(file_name);
- f_macro_string_dynamic_delete_simple(source_path);
- f_macro_string_dynamics_delete_simple(arguments);
+ f_macro_string_dynamic_t_delete_simple(file_name);
+ f_macro_string_dynamic_t_delete_simple(source_path);
+ f_macro_string_dynamics_t_delete_simple(arguments);
if (F_status_is_fine(*status)) {
fake_build_touch(data, file_stage, status);
#endif // _di_fake_build_library_static_
#ifndef _di_fake_build_load_environment_
- void fake_build_load_environment(const fake_data data, const fake_build_data data_build, fake_environment *environment, f_status *status) {
+ void fake_build_load_environment(const fake_data_t data, const fake_build_data_t data_build, fake_environment_t *environment, f_status_t *status) {
if (F_status_is_error(*status)) return;
- f_string_dynamics names = f_string_dynamics_initialize;
+ f_string_dynamics_t names = f_string_dynamics_t_initialize;
{
// add the guaranteed environment variables.
- const f_string variables_name[] = {
+ const f_string_t variables_name[] = {
f_path_environment,
f_path_present_working
};
- const f_string_length variables_length[] = {
+ const f_string_length_t variables_length[] = {
f_path_environment_length,
f_path_present_working_length
};
if (F_status_is_error(*status)) {
fake_print_error(data, F_status_set_fine(*status), "f_macro_string_dynamics_new", F_true);
- f_macro_string_dynamics_delete_simple(names);
+ f_macro_string_dynamics_t_delete_simple(names);
return;
}
- f_string_dynamic part = f_string_dynamic_initialize;
+ f_string_dynamic_t part = f_string_dynamic_t_initialize;
for (uint8_t i = 0; i < 2; i++) {
*status = fl_string_append(variables_name[i], variables_length[i], &part);
names.array[names.used].size = part.size;
names.used++;
- f_macro_string_dynamic_clear(part);
+ f_macro_string_dynamic_t_clear(part);
} // for
if (F_status_is_not_error(*status)) {
if (names.used + data_build.setting.environment.used > names.size) {
- if (names.used + data_build.setting.environment.used > f_array_length_size) {
+ if (names.used + data_build.setting.environment.used > f_array_length_t_size) {
if (data.verbosity != fake_verbosity_quiet) {
fprintf(f_type_error, "%c", f_string_eol[0]);
fl_color_print(f_type_error, data.context.error, data.context.reset, "ERROR: The values for the setting '");
fl_color_print_line(f_type_error, data.context.error, data.context.reset, "' is too large.");
}
- f_macro_string_dynamic_delete_simple(part);
- f_macro_string_dynamics_delete_simple(names);
+ f_macro_string_dynamic_t_delete_simple(part);
+ f_macro_string_dynamics_t_delete_simple(names);
*status = F_status_set_error(F_buffer_too_large);
return;
}
if (F_status_is_error(*status)) {
fake_print_error(data, F_status_set_fine(*status), "f_macro_string_dynamics_resize", F_true);
- f_macro_string_dynamic_delete_simple(part);
- f_macro_string_dynamics_delete_simple(names);
+ f_macro_string_dynamic_t_delete_simple(part);
+ f_macro_string_dynamics_t_delete_simple(names);
return;
}
}
- for (f_string_length i = 0; i < data_build.setting.environment.used; i++) {
+ for (f_string_length_t i = 0; i < data_build.setting.environment.used; i++) {
*status = fl_string_dynamic_append_nulless(data_build.setting.environment.array[i], &part);
if (F_status_is_error(*status)) break;
names.array[names.used].size = part.size;
names.used++;
- f_macro_string_dynamic_clear(part);
+ f_macro_string_dynamic_t_clear(part);
} // for
}
- f_macro_string_dynamic_delete_simple(part);
+ f_macro_string_dynamic_t_delete_simple(part);
if (F_status_is_error(*status)) {
fake_print_error(data, F_status_set_fine(*status), "fl_string_append", F_true);
- f_macro_string_dynamics_delete_simple(names);
+ f_macro_string_dynamics_t_delete_simple(names);
return;
}
}
- f_string function = f_string_initialize;
- f_string_dynamic variable_name = f_string_dynamic_initialize;
- f_string_dynamic variable_value = f_string_dynamic_initialize;
+ f_string_t function = f_string_t_initialize;
+ f_string_dynamic_t variable_name = f_string_dynamic_t_initialize;
+ f_string_dynamic_t variable_value = f_string_dynamic_t_initialize;
- for (f_string_length i = 0; i < names.used; i++) {
+ for (f_string_length_t i = 0; i < names.used; i++) {
*status = f_environment_get_dynamic(names.array[i], &variable_value);
if (F_status_is_error(*status)) {
if (F_status_set_fine(*status) == F_memory_reallocation) {
}
if (F_status_is_not_error(*status) && environment->names.used + 1 > environment->names.size) {
- if (environment->names.size + f_memory_default_allocation_step > f_array_length_size) {
- if (environment->names.size + 1 > f_array_length_size) {
+ if (environment->names.size + f_memory_default_allocation_step > f_array_length_t_size) {
+ if (environment->names.size + 1 > f_array_length_t_size) {
*status = F_status_set_error(F_buffer_too_large);
}
else {
environment->values.array[environment->values.used].size = variable_value.size;
environment->values.used++;
- f_macro_string_dynamic_clear(variable_name);
- f_macro_string_dynamic_clear(variable_value);
+ f_macro_string_dynamic_t_clear(variable_name);
+ f_macro_string_dynamic_t_clear(variable_value);
} // for
- f_macro_string_dynamics_delete_simple(names);
- f_macro_string_dynamic_delete_simple(variable_name);
- f_macro_string_dynamic_delete_simple(variable_value);
+ f_macro_string_dynamics_t_delete_simple(names);
+ f_macro_string_dynamic_t_delete_simple(variable_name);
+ f_macro_string_dynamic_t_delete_simple(variable_value);
if (F_status_is_error(*status)) {
fake_print_error(data, *status, function, F_true);
#endif // _di_fake_build_load_environment_
#ifndef _di_fake_build_load_setting_
- void fake_build_load_setting(const fake_data data, fake_build_setting *setting, f_status *status) {
+ void fake_build_load_setting(const fake_data_t data, fake_build_setting_t *setting, f_status_t *status) {
if (F_status_is_error(*status)) return;
{
- f_string_dynamic buffer = f_string_dynamic_initialize;
+ f_string_dynamic_t buffer = f_string_dynamic_t_initialize;
- f_fss_objects objects = f_fss_objects_initialize;
- f_fss_contents contents = f_fss_contents_initialize;
+ f_fss_objects_t objects = f_fss_objects_t_initialize;
+ f_fss_contents_t contents = f_fss_contents_t_initialize;
*status = fake_file_buffer(data, data.file_data_build_settings.string, &buffer);
if (F_status_is_error(*status)) return;
- f_string_range range = f_macro_string_range_initialize(buffer.used);
+ f_string_range_t range = f_macro_string_range_initialize(buffer.used);
*status = fll_fss_extended_read(&buffer, &range, &objects, &contents, 0, 0);
if (F_status_is_error(*status)) {
fake_build_load_setting_process(data, data.file_data_build_settings.string, buffer, objects, contents, setting, status);
- f_macro_string_dynamic_delete_simple(buffer);
- f_macro_fss_objects_delete_simple(objects);
- f_macro_fss_contents_delete_simple(contents);
+ f_macro_string_dynamic_t_delete_simple(buffer);
+ f_macro_fss_objects_t_delete_simple(objects);
+ f_macro_fss_contents_t_delete_simple(contents);
}
// error when required settings are not specified.
if (F_status_is_not_error(*status)) {
bool failed = F_false;
- f_string_static *settings[] = {
+ f_string_static_t *settings[] = {
&setting->project_name,
};
- f_string names[] = {
+ f_string_t names[] = {
fake_build_setting_name_project_name,
};
#endif // _di_fake_build_load_setting_
#ifndef _di_fake_build_load_setting_process_
- void fake_build_load_setting_process(const fake_data data, const f_string path_file, const f_string_static buffer, const f_fss_objects objects, const f_fss_contents contents, fake_build_setting *setting, f_status *status) {
+ void fake_build_load_setting_process(const fake_data_t data, const f_string_t path_file, const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, fake_build_setting_t *setting, f_status_t *status) {
if (F_status_is_error(*status) && buffer.used) return;
bool error_printed = F_false;
- const f_string settings_name[] = {
+ const f_string_t settings_name[] = {
fake_build_setting_name_build_compiler,
fake_build_setting_name_build_language,
fake_build_setting_name_build_libraries,
fake_build_setting_name_version_target,
};
- const f_string_length settings_length[] = {
+ const f_string_length_t settings_length[] = {
fake_build_setting_name_build_compiler_length,
fake_build_setting_name_build_language_length,
fake_build_setting_name_build_libraries_length,
fake_build_setting_name_version_target_length,
};
- f_string_dynamics build_compiler = f_string_dynamics_initialize;
- f_string_dynamics build_language = f_string_dynamics_initialize;
- f_string_dynamics build_linker = f_string_dynamics_initialize;
- f_string_dynamics build_script = f_string_dynamics_initialize;
- f_string_dynamics build_shared = f_string_dynamics_initialize;
- f_string_dynamics build_static = f_string_dynamics_initialize;
- f_string_dynamics path_headers = f_string_dynamics_initialize;
- f_string_dynamics path_language = f_string_dynamics_initialize;
- f_string_dynamics path_library_script = f_string_dynamics_initialize;
- f_string_dynamics path_library_shared = f_string_dynamics_initialize;
- f_string_dynamics path_library_static = f_string_dynamics_initialize;
- f_string_dynamics path_program_script = f_string_dynamics_initialize;
- f_string_dynamics path_program_shared = f_string_dynamics_initialize;
- f_string_dynamics path_program_static = f_string_dynamics_initialize;
- f_string_dynamics process_post = f_string_dynamics_initialize;
- f_string_dynamics process_pre = f_string_dynamics_initialize;
- f_string_dynamics project_name = f_string_dynamics_initialize;
- f_string_dynamics search_exclusive = f_string_dynamics_initialize;
- f_string_dynamics search_shared = f_string_dynamics_initialize;
- f_string_dynamics search_static = f_string_dynamics_initialize;
- f_string_dynamics version_major = f_string_dynamics_initialize;
- f_string_dynamics version_micro = f_string_dynamics_initialize;
- f_string_dynamics version_minor = f_string_dynamics_initialize;
- f_string_dynamics version_target = f_string_dynamics_initialize;
-
- f_string_dynamics *settings_value[] = {
+ f_string_dynamics_t build_compiler = f_string_dynamics_t_initialize;
+ f_string_dynamics_t build_language = f_string_dynamics_t_initialize;
+ f_string_dynamics_t build_linker = f_string_dynamics_t_initialize;
+ f_string_dynamics_t build_script = f_string_dynamics_t_initialize;
+ f_string_dynamics_t build_shared = f_string_dynamics_t_initialize;
+ f_string_dynamics_t build_static = f_string_dynamics_t_initialize;
+ f_string_dynamics_t path_headers = f_string_dynamics_t_initialize;
+ f_string_dynamics_t path_language = f_string_dynamics_t_initialize;
+ f_string_dynamics_t path_library_script = f_string_dynamics_t_initialize;
+ f_string_dynamics_t path_library_shared = f_string_dynamics_t_initialize;
+ f_string_dynamics_t path_library_static = f_string_dynamics_t_initialize;
+ f_string_dynamics_t path_program_script = f_string_dynamics_t_initialize;
+ f_string_dynamics_t path_program_shared = f_string_dynamics_t_initialize;
+ f_string_dynamics_t path_program_static = f_string_dynamics_t_initialize;
+ f_string_dynamics_t process_post = f_string_dynamics_t_initialize;
+ f_string_dynamics_t process_pre = f_string_dynamics_t_initialize;
+ f_string_dynamics_t project_name = f_string_dynamics_t_initialize;
+ f_string_dynamics_t search_exclusive = f_string_dynamics_t_initialize;
+ f_string_dynamics_t search_shared = f_string_dynamics_t_initialize;
+ f_string_dynamics_t search_static = f_string_dynamics_t_initialize;
+ f_string_dynamics_t version_major = f_string_dynamics_t_initialize;
+ f_string_dynamics_t version_micro = f_string_dynamics_t_initialize;
+ f_string_dynamics_t version_minor = f_string_dynamics_t_initialize;
+ f_string_dynamics_t version_target = f_string_dynamics_t_initialize;
+
+ f_string_dynamics_t *settings_value[] = {
&build_compiler,
&build_language,
&setting->build_libraries,
&version_target,
};
- f_string function = "fll_fss_snatch_apart";
+ f_string_t function = "fll_fss_snatch_apart";
*status = fll_fss_snatch_apart(buffer, objects, contents, settings_name, settings_length, fake_build_setting_total, settings_value, 0);
if (*status == F_none) {
- f_string_dynamic settings_mode_name_dynamic[fake_build_setting_total];
- f_string settings_mode_names[fake_build_setting_total];
- f_string_length setting_mode_lengths[fake_build_setting_total];
+ f_string_dynamic_t settings_mode_name_dynamic[fake_build_setting_total];
+ f_string_t settings_mode_names[fake_build_setting_total];
+ f_string_length_t setting_mode_lengths[fake_build_setting_total];
- const f_string_dynamics *modes = &setting->modes_default;
+ const f_string_dynamics_t *modes = &setting->modes_default;
bool found = F_false;
- f_array_length i = 0;
- f_array_length j = 0;
+ f_array_length_t i = 0;
+ f_array_length_t j = 0;
// if any mode is specified, the entire defaults is replaced.
if (data.mode.used > 0) {
break;
}
- memset(&settings_mode_name_dynamic, 0, sizeof(f_string_dynamic) * fake_build_setting_total);
- memset(&settings_mode_names, 0, sizeof(f_string) * fake_build_setting_total);
- memset(&setting_mode_lengths, 0, sizeof(f_string_length) * fake_build_setting_total);
+ memset(&settings_mode_name_dynamic, 0, sizeof(f_string_dynamic_t) * fake_build_setting_total);
+ memset(&settings_mode_names, 0, sizeof(f_string_t) * fake_build_setting_total);
+ memset(&setting_mode_lengths, 0, sizeof(f_string_length_t) * fake_build_setting_total);
for (j = 0; j < fake_build_setting_total; j++) {
setting_mode_lengths[j] = settings_length[j] + 1 + modes->array[i].used;
- f_macro_string_dynamic_new(*status, settings_mode_name_dynamic[j], setting_mode_lengths[j]);
+ f_macro_string_dynamic_t_new(*status, settings_mode_name_dynamic[j], setting_mode_lengths[j]);
if (F_status_is_error(*status)) {
- function = "f_macro_string_dynamic_new";
+ function = "f_macro_string_dynamic_t_new";
break;
}
}
for (j = 0; j < fake_build_setting_total; j++) {
- f_macro_string_dynamic_delete_simple(settings_mode_name_dynamic[j]);
+ f_macro_string_dynamic_t_delete_simple(settings_mode_name_dynamic[j]);
} // for
if (F_status_is_error(*status)) break;
}
}
else {
- const f_string settings_single_name[] = {
+ const f_string_t settings_single_name[] = {
fake_build_setting_name_build_compiler,
fake_build_setting_name_build_language,
fake_build_setting_name_build_linker,
fake_build_setting_name_version_target,
};
- const f_string_statics *settings_single_source[] = {
+ const f_string_statics_t *settings_single_source[] = {
&build_compiler,
&build_language,
&build_linker,
&setting->search_static,
};
- f_string_dynamic *settings_single_destination[] = {
+ f_string_dynamic_t *settings_single_destination[] = {
&setting->build_compiler,
0,
&setting->build_linker,
5,
};
- for (f_array_length i = 0; i < 24; i++) {
+ for (f_array_length_t i = 0; i < 24; i++) {
if (settings_single_source[i]->used == 0) continue;
if (settings_single_source[i]->used > 1) {
} // for
}
- f_macro_string_dynamics_delete_simple(build_compiler);
- f_macro_string_dynamics_delete_simple(build_language);
- f_macro_string_dynamics_delete_simple(build_linker);
- f_macro_string_dynamics_delete_simple(build_script);
- f_macro_string_dynamics_delete_simple(build_shared);
- f_macro_string_dynamics_delete_simple(build_static);
- f_macro_string_dynamics_delete_simple(path_headers);
- f_macro_string_dynamics_delete_simple(path_language);
- f_macro_string_dynamics_delete_simple(path_library_script);
- f_macro_string_dynamics_delete_simple(path_library_shared);
- f_macro_string_dynamics_delete_simple(path_library_static);
- f_macro_string_dynamics_delete_simple(path_program_script);
- f_macro_string_dynamics_delete_simple(path_program_shared);
- f_macro_string_dynamics_delete_simple(path_program_static);
- f_macro_string_dynamics_delete_simple(process_post);
- f_macro_string_dynamics_delete_simple(process_pre);
- f_macro_string_dynamics_delete_simple(project_name);
- f_macro_string_dynamics_delete_simple(search_exclusive);
- f_macro_string_dynamics_delete_simple(search_shared);
- f_macro_string_dynamics_delete_simple(search_static);
- f_macro_string_dynamics_delete_simple(version_major);
- f_macro_string_dynamics_delete_simple(version_micro);
- f_macro_string_dynamics_delete_simple(version_minor);
- f_macro_string_dynamics_delete_simple(version_target);
+ f_macro_string_dynamics_t_delete_simple(build_compiler);
+ f_macro_string_dynamics_t_delete_simple(build_language);
+ f_macro_string_dynamics_t_delete_simple(build_linker);
+ f_macro_string_dynamics_t_delete_simple(build_script);
+ f_macro_string_dynamics_t_delete_simple(build_shared);
+ f_macro_string_dynamics_t_delete_simple(build_static);
+ f_macro_string_dynamics_t_delete_simple(path_headers);
+ f_macro_string_dynamics_t_delete_simple(path_language);
+ f_macro_string_dynamics_t_delete_simple(path_library_script);
+ f_macro_string_dynamics_t_delete_simple(path_library_shared);
+ f_macro_string_dynamics_t_delete_simple(path_library_static);
+ f_macro_string_dynamics_t_delete_simple(path_program_script);
+ f_macro_string_dynamics_t_delete_simple(path_program_shared);
+ f_macro_string_dynamics_t_delete_simple(path_program_static);
+ f_macro_string_dynamics_t_delete_simple(process_post);
+ f_macro_string_dynamics_t_delete_simple(process_pre);
+ f_macro_string_dynamics_t_delete_simple(project_name);
+ f_macro_string_dynamics_t_delete_simple(search_exclusive);
+ f_macro_string_dynamics_t_delete_simple(search_shared);
+ f_macro_string_dynamics_t_delete_simple(search_static);
+ f_macro_string_dynamics_t_delete_simple(version_major);
+ f_macro_string_dynamics_t_delete_simple(version_micro);
+ f_macro_string_dynamics_t_delete_simple(version_minor);
+ f_macro_string_dynamics_t_delete_simple(version_target);
}
#endif // _di_fake_build_load_setting_process_
#ifndef _di_fake_build_load_setting_defaults_
- void fake_build_load_setting_defaults(const fake_data data, fake_build_setting *setting, f_status *status) {
+ void fake_build_load_setting_defaults(const fake_data_t data, fake_build_setting_t *setting, f_status_t *status) {
if (F_status_is_error(*status)) return;
{
- f_string sources[] = {
+ f_string_t sources[] = {
fake_build_setting_default_version,
fake_build_setting_default_version,
fake_build_setting_default_version,
};
- f_string_length lengths[] = {
+ f_string_length_t lengths[] = {
fake_build_setting_default_version_length,
fake_build_setting_default_version_length,
fake_build_setting_default_version_length,
};
- f_string_dynamic *destinations[] = {
+ f_string_dynamic_t *destinations[] = {
&setting->version_major,
&setting->version_minor,
&setting->version_micro,
#endif // _di_fake_build_load_setting_defaults_
#ifndef _di_fake_build_load_stage_
- void fake_build_load_stage(const fake_data data, fake_build_stage *stage, f_status *status) {
+ void fake_build_load_stage(const fake_data_t data, fake_build_stage_t *stage, f_status_t *status) {
if (F_status_is_error(*status)) return;
- const f_string names[] = {
+ const f_string_t names[] = {
fake_build_stage_libraries_script,
fake_build_stage_libraries_shared,
fake_build_stage_libraries_static,
fake_build_stage_sources_settings,
};
- const f_string_length lengths[] = {
+ const f_string_length_t lengths[] = {
fake_build_stage_libraries_script_length,
fake_build_stage_libraries_shared_length,
fake_build_stage_libraries_static_length,
fake_build_stage_sources_settings_length,
};
- f_string_dynamic *values[] = {
+ f_string_dynamic_t *values[] = {
&stage->file_libraries_script,
&stage->file_libraries_shared,
&stage->file_libraries_static,
#endif // _di_fake_build_load_stage_
#ifndef _di_fake_build_objects_static_
- void fake_build_objects_static(const fake_data data, const fake_build_data data_build, const f_mode mode, const f_string_static file_stage, f_status *status) {
+ void fake_build_objects_static(const fake_data_t data, const fake_build_data_t data_build, const f_mode_t mode, const f_string_static_t file_stage, f_status_t *status) {
if (F_status_is_error(*status) || f_file_exists(file_stage.string) == F_true) return;
if (!data_build.setting.build_sources_library.used) return;
fl_color_print_line(f_type_output, data.context.important, data.context.reset, "Compiling static objects.");
}
- f_string_dynamic file_name = f_string_dynamic_initialize;
- f_string_dynamic destination_path = f_string_dynamic_initialize;
- f_string_dynamics arguments = f_string_dynamics_initialize;
- f_string_length source_length = 0;
- f_string_length destination_length = 0;
+ f_string_dynamic_t file_name = f_string_dynamic_t_initialize;
+ f_string_dynamic_t destination_path = f_string_dynamic_t_initialize;
+ f_string_dynamics_t arguments = f_string_dynamics_t_initialize;
+ f_string_length_t source_length = 0;
+ f_string_length_t destination_length = 0;
- const f_string_static *path_sources = &data.path_sources_c;
+ const f_string_static_t *path_sources = &data.path_sources_c;
if (data_build.setting.build_language == fake_build_language_type_cpp) {
path_sources = &data.path_sources_cpp;
}
- for (f_array_length i = 0; i < data_build.setting.build_sources_library.used; i++) {
+ for (f_array_length_t i = 0; i < data_build.setting.build_sources_library.used; i++) {
file_name.used = 0;
destination_path.used = 0;
if (F_status_is_error(*status)) {
fake_print_error(data, F_status_set_fine(*status), "fake_build_get_file_name_without_extension", F_true);
- f_macro_string_dynamic_delete_simple(file_name);
- f_macro_string_dynamic_delete_simple(destination_path);
- f_macro_string_dynamics_delete_simple(arguments);
+ f_macro_string_dynamic_t_delete_simple(file_name);
+ f_macro_string_dynamic_t_delete_simple(destination_path);
+ f_macro_string_dynamics_t_delete_simple(arguments);
return;
}
destination[destination_length] = 0;
- const f_string values[] = {
+ const f_string_t values[] = {
source,
fake_build_parameter_object_compile,
fake_build_parameter_object_static,
destination,
};
- const f_string_length lengths[] = {
+ const f_string_length_t lengths[] = {
source_length,
fake_build_parameter_object_compile_length,
fake_build_parameter_object_static_length,
fake_execute(data, data_build.environment, data_build.setting.build_compiler, arguments, status);
if (F_status_is_error(*status)) break;
- f_macro_string_dynamics_delete_simple(arguments);
+ f_macro_string_dynamics_t_delete_simple(arguments);
} // for
- f_macro_string_dynamic_delete_simple(file_name);
- f_macro_string_dynamic_delete_simple(destination_path);
- f_macro_string_dynamics_delete_simple(arguments);
+ f_macro_string_dynamic_t_delete_simple(file_name);
+ f_macro_string_dynamic_t_delete_simple(destination_path);
+ f_macro_string_dynamics_t_delete_simple(arguments);
if (F_status_is_fine(*status)) {
fake_build_touch(data, file_stage, status);
#endif // _di_fake_build_objects_static_
#ifndef _di_fake_build_operate_
- f_return_status fake_build_operate(const fake_data data) {
+ f_return_status fake_build_operate(const fake_data_t data) {
if (data.verbosity != fake_verbosity_quiet) {
printf("%c", f_string_eol[0]);
fl_color_print_line(f_type_output, data.context.important, data.context.reset, "Building project.");
}
- f_status status = F_none;
- f_mode mode = f_mode_initialize;
+ f_status_t status = F_none;
+ f_mode_t mode = f_mode_t_initialize;
- fake_build_data data_build = fake_build_data_initialize;
- fake_build_stage stage = fake_build_stage_initialize;
+ fake_build_data_t data_build = fake_build_data_t_initialize;
+ fake_build_stage_t stage = fake_build_stage_t_initialize;
- f_macro_mode_set_default_umask(mode, data.umask);
+ f_macro_mode_t_set_default_umask(mode, data.umask);
fake_build_load_setting(data, &data_build.setting, &status);
}
else {
if (data_build.setting.build_sources_headers.used) {
- const f_string_static *path_sources = &data.path_sources_c;
+ const f_string_static_t *path_sources = &data.path_sources_c;
if (data_build.setting.build_language == fake_build_language_type_cpp) {
path_sources = &data.path_sources_cpp;
}
- f_string_static path_headers = f_string_static_initialize;
- f_string_length directory_headers_length = data.path_build_includes.used + data_build.setting.path_headers.used;
+ f_string_static_t path_headers = f_string_static_t_initialize;
+ f_string_length_t directory_headers_length = data.path_build_includes.used + data_build.setting.path_headers.used;
char directory_headers[directory_headers_length + 1];
fake_build_execute_process_script(data, data_build, data_build.setting.process_post, stage.file_process_post, &status);
fake_macro_build_data_delete_simple(data_build);
- fake_macro_build_stage_delete_simple(stage);
+ fake_macro_build_stage_t_delete_simple(stage);
return status;
}
#endif // _di_fake_build_operate_
#ifndef _di_fake_build_programs_script_
- void fake_build_programs_script(const fake_data data, const fake_build_data data_build, const f_mode mode, const f_string_static file_stage, f_status *status) {
+ void fake_build_programs_script(const fake_data_t data, const fake_build_data_t data_build, const f_mode_t mode, const f_string_static_t file_stage, f_status_t *status) {
if (F_status_is_error(*status) || f_file_exists(file_stage.string) == F_true) return;
// @todo needs to perform some sort of regex replace on the program scripts.
#endif // _di_fake_build_programs_script_
#ifndef _di_fake_build_program_shared_
- void fake_build_program_shared(const fake_data data, const fake_build_data data_build, const f_mode mode, const f_string_static file_stage, f_status *status) {
+ void fake_build_program_shared(const fake_data_t data, const fake_build_data_t data_build, const f_mode_t mode, const f_string_static_t file_stage, f_status_t *status) {
if (F_status_is_error(*status) || f_file_exists(file_stage.string) == F_true) return;
if (!data_build.setting.build_sources_program.used) return;
fl_color_print_line(f_type_output, data.context.important, data.context.reset, "Compiling shared program.");
}
- f_string_dynamics arguments = f_string_dynamics_initialize;
+ f_string_dynamics_t arguments = f_string_dynamics_t_initialize;
{
- const f_string_static *path_sources = &data.path_sources_c;
+ const f_string_static_t *path_sources = &data.path_sources_c;
if (data_build.setting.build_language == fake_build_language_type_cpp) {
path_sources = &data.path_sources_cpp;
}
- f_string_length source_length = 0;
+ f_string_length_t source_length = 0;
- for (f_array_length i = 0; i < data_build.setting.build_sources_program.used; i++) {
+ for (f_array_length_t i = 0; i < data_build.setting.build_sources_program.used; i++) {
source_length = path_sources->used + data_build.setting.build_sources_program.array[i].used;
char source[source_length + 1];
}
if (F_status_is_fine(*status)) {
- f_string_length parameter_file_name_path_length = data.path_build_programs_shared.used + data_build.setting.project_name.used;
+ f_string_length_t parameter_file_name_path_length = data.path_build_programs_shared.used + data_build.setting.project_name.used;
char parameter_file_name_path[parameter_file_name_path_length + 1];
memcpy(parameter_file_name_path + data.path_build_programs_shared.used, data_build.setting.project_name.string, data_build.setting.project_name.used);
parameter_file_name_path[parameter_file_name_path_length] = 0;
- const f_string values[] = {
+ const f_string_t values[] = {
fake_build_parameter_library_output,
parameter_file_name_path,
};
- const f_string_length lengths[] = {
+ const f_string_length_t lengths[] = {
fake_build_parameter_library_output_length,
parameter_file_name_path_length,
};
// if project-specific library sources exist, then the -lproject_name needs to be added to the arguments.
if (F_status_is_fine(*status) && data_build.setting.build_sources_library.used > 0) {
- f_string_length link_project_library_length = fake_build_parameter_library_link_file_length + data_build.setting.project_name.used;
+ f_string_length_t link_project_library_length = fake_build_parameter_library_link_file_length + data_build.setting.project_name.used;
char link_project_library[link_project_library_length + 1];
if (F_status_is_error(*status)) {
fake_print_error(data, F_status_set_fine(*status), "fll_execute_arguments_add", F_true);
- f_macro_string_dynamics_delete_simple(arguments);
+ f_macro_string_dynamics_t_delete_simple(arguments);
return;
}
fake_execute(data, data_build.environment, data_build.setting.build_compiler, arguments, status);
- f_macro_string_dynamics_delete_simple(arguments);
+ f_macro_string_dynamics_t_delete_simple(arguments);
if (F_status_is_fine(*status)) {
fake_build_touch(data, file_stage, status);
#endif // _di_fake_build_program_shared_
#ifndef _di_fake_build_program_static_
- void fake_build_program_static(const fake_data data, const fake_build_data data_build, const f_mode mode, const f_string_static file_stage, f_status *status) {
+ void fake_build_program_static(const fake_data_t data, const fake_build_data_t data_build, const f_mode_t mode, const f_string_static_t file_stage, f_status_t *status) {
if (F_status_is_error(*status) || f_file_exists(file_stage.string) == F_true) return;
if (!data_build.setting.build_sources_program.used) return;
fl_color_print_line(f_type_output, data.context.important, data.context.reset, "Compiling static program.");
}
- f_string_dynamics arguments = f_string_dynamics_initialize;
+ f_string_dynamics_t arguments = f_string_dynamics_t_initialize;
{
- const f_string_static *path_sources = &data.path_sources_c;
+ const f_string_static_t *path_sources = &data.path_sources_c;
if (data_build.setting.build_language == fake_build_language_type_cpp) {
path_sources = &data.path_sources_cpp;
}
- f_string_length source_length = 0;
+ f_string_length_t source_length = 0;
- for (f_array_length i = 0; i < data_build.setting.build_sources_program.used; i++) {
+ for (f_array_length_t i = 0; i < data_build.setting.build_sources_program.used; i++) {
if (!data_build.setting.build_sources_program.array[i].used) continue;
source_length = path_sources->used + data_build.setting.build_sources_program.array[i].used;
}
if (F_status_is_fine(*status)) {
- f_string_length source_library_length = data.path_build_libraries_static.used + fake_build_parameter_library_name_prefix_length + data_build.setting.project_name.used + fake_build_parameter_library_name_suffix_static_length;
+ f_string_length_t source_library_length = data.path_build_libraries_static.used + fake_build_parameter_library_name_prefix_length + data_build.setting.project_name.used + fake_build_parameter_library_name_suffix_static_length;
char source_library[source_library_length + 1];
source_library[source_library_length] = 0;
- f_string_length parameter_file_name_path_length = data.path_build_programs_static.used + data_build.setting.project_name.used;
+ f_string_length_t parameter_file_name_path_length = data.path_build_programs_static.used + data_build.setting.project_name.used;
char parameter_file_name_path[parameter_file_name_path_length + 1];
memcpy(parameter_file_name_path + data.path_build_programs_static.used, data_build.setting.project_name.string, data_build.setting.project_name.used);
parameter_file_name_path[parameter_file_name_path_length] = 0;
- const f_string values[] = {
+ const f_string_t values[] = {
source_library,
fake_build_parameter_library_static,
fake_build_parameter_library_output,
parameter_file_name_path,
};
- const f_string_length lengths[] = {
+ const f_string_length_t lengths[] = {
source_library_length,
fake_build_parameter_library_static_length,
fake_build_parameter_library_output_length,
if (F_status_is_error(*status)) {
fake_print_error(data, F_status_set_fine(*status), "fll_execute_arguments_add", F_true);
- f_macro_string_dynamics_delete_simple(arguments);
+ f_macro_string_dynamics_t_delete_simple(arguments);
return;
}
fake_execute(data, data_build.environment, data_build.setting.build_compiler, arguments, status);
- f_macro_string_dynamics_delete_simple(arguments);
+ f_macro_string_dynamics_t_delete_simple(arguments);
if (F_status_is_fine(*status)) {
fake_build_touch(data, file_stage, status);
#endif // _di_fake_build_program_static_
#ifndef _di_fake_build_touch_
- void fake_build_touch(const fake_data data, const f_string_dynamic file, f_status *status) {
+ void fake_build_touch(const fake_data_t data, const f_string_dynamic_t file, f_status_t *status) {
if (F_status_is_error(*status)) return;
- f_mode mode = f_mode_initialize;
+ f_mode_t mode = f_mode_t_initialize;
- f_macro_mode_set_default_umask(mode, data.umask);
+ f_macro_mode_t_set_default_umask(mode, data.umask);
*status = f_file_touch(file.string, mode.regular, F_false);
extern "C" {
#endif
-#ifndef _di_fake_build_setting_
+#ifndef _di_fake_build_setting_t_
typedef struct {
uint8_t build_language;
bool search_shared;
bool search_static;
- f_string_dynamic build_compiler;
- f_string_dynamic build_linker;
- f_string_dynamic path_headers;
- f_string_dynamic path_language;
- f_string_dynamic path_library_script;
- f_string_dynamic path_library_shared;
- f_string_dynamic path_library_static;
- f_string_dynamic path_program_script;
- f_string_dynamic path_program_shared;
- f_string_dynamic path_program_static;
- f_string_dynamic process_post;
- f_string_dynamic process_pre;
- f_string_dynamic project_name;
- f_string_dynamic version_major;
- f_string_dynamic version_micro;
- f_string_dynamic version_minor;
-
- f_string_dynamics build_libraries;
- f_string_dynamics build_sources_headers;
- f_string_dynamics build_sources_library;
- f_string_dynamics build_sources_program;
- f_string_dynamics build_sources_setting;
- f_string_dynamics build_sources_script;
- f_string_dynamics defines_all;
- f_string_dynamics defines_shared;
- f_string_dynamics defines_static;
- f_string_dynamics environment;
- f_string_dynamics flags_all;
- f_string_dynamics flags_library;
- f_string_dynamics flags_program;
- f_string_dynamics flags_shared;
- f_string_dynamics flags_static;
- f_string_dynamics modes;
- f_string_dynamics modes_default;
- } fake_build_setting;
-
- #define fake_build_setting_initialize { \
+ f_string_dynamic_t build_compiler;
+ f_string_dynamic_t build_linker;
+ f_string_dynamic_t path_headers;
+ f_string_dynamic_t path_language;
+ f_string_dynamic_t path_library_script;
+ f_string_dynamic_t path_library_shared;
+ f_string_dynamic_t path_library_static;
+ f_string_dynamic_t path_program_script;
+ f_string_dynamic_t path_program_shared;
+ f_string_dynamic_t path_program_static;
+ f_string_dynamic_t process_post;
+ f_string_dynamic_t process_pre;
+ f_string_dynamic_t project_name;
+ f_string_dynamic_t version_major;
+ f_string_dynamic_t version_micro;
+ f_string_dynamic_t version_minor;
+
+ f_string_dynamics_t build_libraries;
+ f_string_dynamics_t build_sources_headers;
+ f_string_dynamics_t build_sources_library;
+ f_string_dynamics_t build_sources_program;
+ f_string_dynamics_t build_sources_setting;
+ f_string_dynamics_t build_sources_script;
+ f_string_dynamics_t defines_all;
+ f_string_dynamics_t defines_shared;
+ f_string_dynamics_t defines_static;
+ f_string_dynamics_t environment;
+ f_string_dynamics_t flags_all;
+ f_string_dynamics_t flags_library;
+ f_string_dynamics_t flags_program;
+ f_string_dynamics_t flags_shared;
+ f_string_dynamics_t flags_static;
+ f_string_dynamics_t modes;
+ f_string_dynamics_t modes_default;
+ } fake_build_setting_t;
+
+ #define fake_build_setting_t_initialize { \
0, \
0, \
F_true, \
F_true, \
F_true, \
F_true, \
- f_string_dynamic_initialize, \
- f_string_dynamic_initialize, \
- f_string_dynamic_initialize, \
- f_string_dynamic_initialize, \
- f_string_dynamic_initialize, \
- f_string_dynamic_initialize, \
- f_string_dynamic_initialize, \
- f_string_dynamic_initialize, \
- f_string_dynamic_initialize, \
- f_string_dynamic_initialize, \
- f_string_dynamic_initialize, \
- f_string_dynamic_initialize, \
- f_string_dynamic_initialize, \
- f_string_dynamic_initialize, \
- f_string_dynamic_initialize, \
- f_string_dynamic_initialize, \
- f_string_dynamics_initialize, \
- f_string_dynamics_initialize, \
- f_string_dynamics_initialize, \
- f_string_dynamics_initialize, \
- f_string_dynamics_initialize, \
- f_string_dynamics_initialize, \
- f_string_dynamics_initialize, \
- f_string_dynamics_initialize, \
- f_string_dynamics_initialize, \
- f_string_dynamics_initialize, \
- f_string_dynamics_initialize, \
- f_string_dynamics_initialize, \
- f_string_dynamics_initialize, \
- f_string_dynamics_initialize, \
- f_string_dynamics_initialize, \
- f_string_dynamics_initialize, \
- f_string_dynamics_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamics_t_initialize, \
+ f_string_dynamics_t_initialize, \
+ f_string_dynamics_t_initialize, \
+ f_string_dynamics_t_initialize, \
+ f_string_dynamics_t_initialize, \
+ f_string_dynamics_t_initialize, \
+ f_string_dynamics_t_initialize, \
+ f_string_dynamics_t_initialize, \
+ f_string_dynamics_t_initialize, \
+ f_string_dynamics_t_initialize, \
+ f_string_dynamics_t_initialize, \
+ f_string_dynamics_t_initialize, \
+ f_string_dynamics_t_initialize, \
+ f_string_dynamics_t_initialize, \
+ f_string_dynamics_t_initialize, \
+ f_string_dynamics_t_initialize, \
+ f_string_dynamics_t_initialize, \
}
- #define fake_macro_build_setting_delete_simple(setting) \
- f_macro_string_dynamic_delete_simple(setting.build_compiler) \
- f_macro_string_dynamic_delete_simple(setting.build_linker) \
- f_macro_string_dynamic_delete_simple(setting.path_headers) \
- f_macro_string_dynamic_delete_simple(setting.path_language) \
- f_macro_string_dynamic_delete_simple(setting.path_library_script) \
- f_macro_string_dynamic_delete_simple(setting.path_library_shared) \
- f_macro_string_dynamic_delete_simple(setting.path_library_static) \
- f_macro_string_dynamic_delete_simple(setting.path_program_script) \
- f_macro_string_dynamic_delete_simple(setting.path_program_shared) \
- f_macro_string_dynamic_delete_simple(setting.path_program_static) \
- f_macro_string_dynamic_delete_simple(setting.process_post) \
- f_macro_string_dynamic_delete_simple(setting.process_pre) \
- f_macro_string_dynamic_delete_simple(setting.project_name) \
- f_macro_string_dynamic_delete_simple(setting.version_major) \
- f_macro_string_dynamic_delete_simple(setting.version_micro) \
- f_macro_string_dynamic_delete_simple(setting.version_minor) \
- f_macro_string_dynamics_delete_simple(setting.build_libraries) \
- f_macro_string_dynamics_delete_simple(setting.build_sources_headers) \
- f_macro_string_dynamics_delete_simple(setting.build_sources_library) \
- f_macro_string_dynamics_delete_simple(setting.build_sources_program) \
- f_macro_string_dynamics_delete_simple(setting.build_sources_setting) \
- f_macro_string_dynamics_delete_simple(setting.build_sources_script) \
- f_macro_string_dynamics_delete_simple(setting.defines_all) \
- f_macro_string_dynamics_delete_simple(setting.defines_shared) \
- f_macro_string_dynamics_delete_simple(setting.defines_static) \
- f_macro_string_dynamics_delete_simple(setting.environment) \
- f_macro_string_dynamics_delete_simple(setting.flags_all) \
- f_macro_string_dynamics_delete_simple(setting.flags_library) \
- f_macro_string_dynamics_delete_simple(setting.flags_program) \
- f_macro_string_dynamics_delete_simple(setting.flags_shared) \
- f_macro_string_dynamics_delete_simple(setting.flags_static) \
- f_macro_string_dynamics_delete_simple(setting.modes) \
- f_macro_string_dynamics_delete_simple(setting.modes_default)
+ #define fake_macro_build_setting_t_delete_simple(setting) \
+ f_macro_string_dynamic_t_delete_simple(setting.build_compiler) \
+ f_macro_string_dynamic_t_delete_simple(setting.build_linker) \
+ f_macro_string_dynamic_t_delete_simple(setting.path_headers) \
+ f_macro_string_dynamic_t_delete_simple(setting.path_language) \
+ f_macro_string_dynamic_t_delete_simple(setting.path_library_script) \
+ f_macro_string_dynamic_t_delete_simple(setting.path_library_shared) \
+ f_macro_string_dynamic_t_delete_simple(setting.path_library_static) \
+ f_macro_string_dynamic_t_delete_simple(setting.path_program_script) \
+ f_macro_string_dynamic_t_delete_simple(setting.path_program_shared) \
+ f_macro_string_dynamic_t_delete_simple(setting.path_program_static) \
+ f_macro_string_dynamic_t_delete_simple(setting.process_post) \
+ f_macro_string_dynamic_t_delete_simple(setting.process_pre) \
+ f_macro_string_dynamic_t_delete_simple(setting.project_name) \
+ f_macro_string_dynamic_t_delete_simple(setting.version_major) \
+ f_macro_string_dynamic_t_delete_simple(setting.version_micro) \
+ f_macro_string_dynamic_t_delete_simple(setting.version_minor) \
+ f_macro_string_dynamics_t_delete_simple(setting.build_libraries) \
+ f_macro_string_dynamics_t_delete_simple(setting.build_sources_headers) \
+ f_macro_string_dynamics_t_delete_simple(setting.build_sources_library) \
+ f_macro_string_dynamics_t_delete_simple(setting.build_sources_program) \
+ f_macro_string_dynamics_t_delete_simple(setting.build_sources_setting) \
+ f_macro_string_dynamics_t_delete_simple(setting.build_sources_script) \
+ f_macro_string_dynamics_t_delete_simple(setting.defines_all) \
+ f_macro_string_dynamics_t_delete_simple(setting.defines_shared) \
+ f_macro_string_dynamics_t_delete_simple(setting.defines_static) \
+ f_macro_string_dynamics_t_delete_simple(setting.environment) \
+ f_macro_string_dynamics_t_delete_simple(setting.flags_all) \
+ f_macro_string_dynamics_t_delete_simple(setting.flags_library) \
+ f_macro_string_dynamics_t_delete_simple(setting.flags_program) \
+ f_macro_string_dynamics_t_delete_simple(setting.flags_shared) \
+ f_macro_string_dynamics_t_delete_simple(setting.flags_static) \
+ f_macro_string_dynamics_t_delete_simple(setting.modes) \
+ f_macro_string_dynamics_t_delete_simple(setting.modes_default)
#define fake_build_setting_name_build_compiler "build_compiler"
#define fake_build_setting_name_build_language "build_language"
#define fake_build_setting_default_version "0"
#define fake_build_setting_default_version_length 1
-#endif // _di_fake_build_setting_
+#endif // _di_fake_build_setting_t_
-#ifndef _di_fake_build_stage_
+#ifndef _di_fake_build_stage_t_
typedef struct {
- f_string_dynamic file_libraries_script;
- f_string_dynamic file_libraries_shared;
- f_string_dynamic file_libraries_static;
- f_string_dynamic file_objects_static;
- f_string_dynamic file_process_post;
- f_string_dynamic file_process_pre;
- f_string_dynamic file_programs_script;
- f_string_dynamic file_programs_shared;
- f_string_dynamic file_programs_static;
- f_string_dynamic file_skeleton;
- f_string_dynamic file_sources_headers;
- f_string_dynamic file_sources_script;
- f_string_dynamic file_sources_settings;
- } fake_build_stage;
-
- #define fake_build_stage_initialize { \
- f_string_dynamic_initialize, \
- f_string_dynamic_initialize, \
- f_string_dynamic_initialize, \
- f_string_dynamic_initialize, \
- f_string_dynamic_initialize, \
- f_string_dynamic_initialize, \
- f_string_dynamic_initialize, \
- f_string_dynamic_initialize, \
- f_string_dynamic_initialize, \
- f_string_dynamic_initialize, \
- f_string_dynamic_initialize, \
- f_string_dynamic_initialize, \
- f_string_dynamic_initialize, \
+ f_string_dynamic_t file_libraries_script;
+ f_string_dynamic_t file_libraries_shared;
+ f_string_dynamic_t file_libraries_static;
+ f_string_dynamic_t file_objects_static;
+ f_string_dynamic_t file_process_post;
+ f_string_dynamic_t file_process_pre;
+ f_string_dynamic_t file_programs_script;
+ f_string_dynamic_t file_programs_shared;
+ f_string_dynamic_t file_programs_static;
+ f_string_dynamic_t file_skeleton;
+ f_string_dynamic_t file_sources_headers;
+ f_string_dynamic_t file_sources_script;
+ f_string_dynamic_t file_sources_settings;
+ } fake_build_stage_t;
+
+ #define fake_build_stage_t_initialize { \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
}
#define fake_build_stage_total 13
- #define fake_macro_build_stage_delete_simple(stage) \
- f_macro_string_dynamic_delete_simple(stage.file_libraries_script) \
- f_macro_string_dynamic_delete_simple(stage.file_libraries_shared) \
- f_macro_string_dynamic_delete_simple(stage.file_libraries_static) \
- f_macro_string_dynamic_delete_simple(stage.file_objects_static) \
- f_macro_string_dynamic_delete_simple(stage.file_process_post) \
- f_macro_string_dynamic_delete_simple(stage.file_process_pre) \
- f_macro_string_dynamic_delete_simple(stage.file_programs_script) \
- f_macro_string_dynamic_delete_simple(stage.file_programs_shared) \
- f_macro_string_dynamic_delete_simple(stage.file_programs_static) \
- f_macro_string_dynamic_delete_simple(stage.file_skeleton) \
- f_macro_string_dynamic_delete_simple(stage.file_sources_headers) \
- f_macro_string_dynamic_delete_simple(stage.file_sources_script) \
- f_macro_string_dynamic_delete_simple(stage.file_sources_settings)
+ #define fake_macro_build_stage_t_delete_simple(stage) \
+ f_macro_string_dynamic_t_delete_simple(stage.file_libraries_script) \
+ f_macro_string_dynamic_t_delete_simple(stage.file_libraries_shared) \
+ f_macro_string_dynamic_t_delete_simple(stage.file_libraries_static) \
+ f_macro_string_dynamic_t_delete_simple(stage.file_objects_static) \
+ f_macro_string_dynamic_t_delete_simple(stage.file_process_post) \
+ f_macro_string_dynamic_t_delete_simple(stage.file_process_pre) \
+ f_macro_string_dynamic_t_delete_simple(stage.file_programs_script) \
+ f_macro_string_dynamic_t_delete_simple(stage.file_programs_shared) \
+ f_macro_string_dynamic_t_delete_simple(stage.file_programs_static) \
+ f_macro_string_dynamic_t_delete_simple(stage.file_skeleton) \
+ f_macro_string_dynamic_t_delete_simple(stage.file_sources_headers) \
+ f_macro_string_dynamic_t_delete_simple(stage.file_sources_script) \
+ f_macro_string_dynamic_t_delete_simple(stage.file_sources_settings)
#define fake_build_stage_libraries_script "libraries_script.built"
#define fake_build_stage_libraries_shared "libraries_shared.built"
#define fake_build_stage_sources_headers_length 21
#define fake_build_stage_sources_script_length 20
#define fake_build_stage_sources_settings_length 22
-#endif // _di_fake_build_stage_
+#endif // _di_fake_build_stage_t_
-#ifndef _di_fake_build_data_
+#ifndef _di_fake_build_data_t_
typedef struct {
- fake_build_setting setting;
- fake_environment environment;
- } fake_build_data;
+ fake_build_setting_t setting;
+ fake_environment_t environment;
+ } fake_build_data_t;
- #define fake_build_data_initialize { \
- fake_build_setting_initialize, \
- fake_environment_initialize, \
+ #define fake_build_data_t_initialize { \
+ fake_build_setting_t_initialize, \
+ fake_environment_t_initialize, \
}
#define fake_macro_build_data_delete_simple(build) \
- fake_macro_build_setting_delete_simple(build.setting) \
- fake_macro_environment_delete_simple(build.environment)
-#endif // _di_fake_build_data_
+ fake_macro_build_setting_t_delete_simple(build.setting) \
+ fake_macro_environment_t_delete_simple(build.environment)
+#endif // _di_fake_build_data_t_
#ifndef _di_fake_build_parameter_
* @see fll_execute_arguments_add()
*/
#ifndef _di_fake_build_arguments_standard_add_
- extern void fake_build_arguments_standard_add(const fake_data data, const fake_build_data data_build, const bool is_shared, const bool is_library, f_string_dynamics *arguments, f_status *status) f_gcc_attribute_visibility_internal;
+ extern void fake_build_arguments_standard_add(const fake_data_t data, const fake_build_data_t data_build, const bool is_shared, const bool is_library, f_string_dynamics_t *arguments, f_status_t *status) f_gcc_attribute_visibility_internal;
#endif // _di_fake_build_arguments_standard_add_
/**
* Status codes (with error bit) are returned on any problem.
*/
#ifndef _di_fake_build_copy_
- extern void fake_build_copy(const fake_data data, const f_mode mode, const f_string label, const f_string_static source, const f_string_static destination, const f_string_statics files, const f_string_static file_stage, f_status *status) f_gcc_attribute_visibility_internal;
+ extern void fake_build_copy(const fake_data_t data, const f_mode_t mode, const f_string_t label, const f_string_static_t source, const f_string_static_t destination, const f_string_statics_t files, const f_string_static_t file_stage, f_status_t *status) f_gcc_attribute_visibility_internal;
#endif // _di_fake_build_copy_
/**
* Status codes (with error bit) are returned on any problem.
*/
#ifndef _di_fake_build_skeleton_
- extern void fake_build_skeleton(const fake_data data, const fake_build_data data_build, const mode_t mode, const f_string_static file_stage, f_status *status) f_gcc_attribute_visibility_internal;
+ extern void fake_build_skeleton(const fake_data_t data, const fake_build_data_t data_build, const mode_t mode, const f_string_static_t file_stage, f_status_t *status) f_gcc_attribute_visibility_internal;
#endif // _di_fake_build_skeleton_
/**
* Status codes (with error bit) are returned on any problem.
*/
#ifndef _di_fake_build_execute_process_script_
- extern void fake_build_execute_process_script(const fake_data data, const fake_build_data data_build, const f_string_static process_script, const f_string_static file_stage, f_status *status) f_gcc_attribute_visibility_internal;
+ extern void fake_build_execute_process_script(const fake_data_t data, const fake_build_data_t data_build, const f_string_static_t process_script, const f_string_static_t file_stage, f_status_t *status) f_gcc_attribute_visibility_internal;
#endif // _di_fake_build_execute_process_script_
/**
* Status codes (with error bit) are returned on any problem.
*/
#ifndef _di_fake_build_get_file_name_without_extension_
- extern f_return_status fake_build_get_file_name_without_extension(const fake_data data, const f_string_static path, f_string_dynamic *name);
+ extern f_return_status fake_build_get_file_name_without_extension(const fake_data_t data, const f_string_static_t path, f_string_dynamic_t *name);
#endif // _di_fake_build_get_file_name_without_extension_
/**
* Status codes (with error bit) are returned on any problem.
*/
#ifndef _di_fake_build_libraries_script_
- extern void fake_build_libraries_script(const fake_data data, const fake_build_data data_build, const f_mode mode, const f_string_static file_stage, f_status *status) f_gcc_attribute_visibility_internal;
+ extern void fake_build_libraries_script(const fake_data_t data, const fake_build_data_t data_build, const f_mode_t mode, const f_string_static_t file_stage, f_status_t *status) f_gcc_attribute_visibility_internal;
#endif // _di_fake_build_libraries_script_
/**
* Status codes (with error bit) are returned on any problem.
*/
#ifndef _di_fake_build_library_shared_
- extern void fake_build_library_shared(const fake_data data, const fake_build_data data_build, const f_mode mode, const f_string_static file_stage, f_status *status) f_gcc_attribute_visibility_internal;
+ extern void fake_build_library_shared(const fake_data_t data, const fake_build_data_t data_build, const f_mode_t mode, const f_string_static_t file_stage, f_status_t *status) f_gcc_attribute_visibility_internal;
#endif // _di_fake_build_library_shared_
/**
* Status codes (with error bit) are returned on any problem.
*/
#ifndef _di_fake_build_library_static_
- extern void fake_build_library_static(const fake_data data, const fake_build_data data_build, const f_mode mode, const f_string_static file_stage, f_status *status) f_gcc_attribute_visibility_internal;
+ extern void fake_build_library_static(const fake_data_t data, const fake_build_data_t data_build, const f_mode_t mode, const f_string_static_t file_stage, f_status_t *status) f_gcc_attribute_visibility_internal;
#endif // _di_fake_build_library_static_
/**
* Status codes (with error bit) are returned on any problem.
*/
#ifndef _di_fake_build_load_setting_
- extern void fake_build_load_setting(const fake_data data, fake_build_setting *setting, f_status *status) f_gcc_attribute_visibility_internal;
+ extern void fake_build_load_setting(const fake_data_t data, fake_build_setting_t *setting, f_status_t *status) f_gcc_attribute_visibility_internal;
#endif // _di_fake_build_load_setting_
/**
* Status codes (with error bit) are returned on any problem.
*/
#ifndef _di_fake_build_load_setting_defaults_
- extern void fake_build_load_setting_defaults(const fake_data data, fake_build_setting *setting, f_status *status) f_gcc_attribute_visibility_internal;
+ extern void fake_build_load_setting_defaults(const fake_data_t data, fake_build_setting_t *setting, f_status_t *status) f_gcc_attribute_visibility_internal;
#endif // _di_fake_build_load_setting_defaults_
/**
* Status codes (with error bit) are returned on any problem.
*/
#ifndef _di_fake_build_load_setting_process_
- extern void fake_build_load_setting_process(const fake_data data, const f_string path_file, const f_string_static buffer, const f_fss_objects objects, const f_fss_contents contents, fake_build_setting *setting, f_status *status) f_gcc_attribute_visibility_internal;
+ extern void fake_build_load_setting_process(const fake_data_t data, const f_string_t path_file, const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, fake_build_setting_t *setting, f_status_t *status) f_gcc_attribute_visibility_internal;
#endif // _di_fake_build_load_setting_process_
/**
* Status codes (with error bit) are returned on any problem.
*/
#ifndef _di_fake_build_load_environment_
- extern void fake_build_load_environment(const fake_data data, const fake_build_data data_build, fake_environment *environment, f_status *status) f_gcc_attribute_visibility_internal;
+ extern void fake_build_load_environment(const fake_data_t data, const fake_build_data_t data_build, fake_environment_t *environment, f_status_t *status) f_gcc_attribute_visibility_internal;
#endif // _di_fake_build_load_environment_
/**
* Status codes (with error bit) are returned on any problem.
*/
#ifndef _di_fake_build_load_stage_
- extern void fake_build_load_stage(const fake_data data, fake_build_stage *stage, f_status *status) f_gcc_attribute_visibility_internal;
+ extern void fake_build_load_stage(const fake_data_t data, fake_build_stage_t *stage, f_status_t *status) f_gcc_attribute_visibility_internal;
#endif // _di_fake_build_load_stage_
/**
* Status codes (with error bit) are returned on any problem.
*/
#ifndef _di_fake_build_objects_static_
- extern void fake_build_objects_static(const fake_data data, const fake_build_data data_build, const f_mode mode, const f_string_static file_stage, f_status *status) f_gcc_attribute_visibility_internal;
+ extern void fake_build_objects_static(const fake_data_t data, const fake_build_data_t data_build, const f_mode_t mode, const f_string_static_t file_stage, f_status_t *status) f_gcc_attribute_visibility_internal;
#endif // _di_fake_build_objects_static_
/**
* Status codes (with error bit) are returned on any problem.
*/
#ifndef _di_fake_build_operate_
- extern f_return_status fake_build_operate(const fake_data data) f_gcc_attribute_visibility_internal;
+ extern f_return_status fake_build_operate(const fake_data_t data) f_gcc_attribute_visibility_internal;
#endif // _di_fake_build_operate_
/**
* Status codes (with error bit) are returned on any problem.
*/
#ifndef _di_fake_build_programs_script_
- extern void fake_build_programs_script(const fake_data data, const fake_build_data data_build, const f_mode mode, const f_string_static file_stage, f_status *status) f_gcc_attribute_visibility_internal;
+ extern void fake_build_programs_script(const fake_data_t data, const fake_build_data_t data_build, const f_mode_t mode, const f_string_static_t file_stage, f_status_t *status) f_gcc_attribute_visibility_internal;
#endif // _di_fake_build_programs_script_
/**
* Status codes (with error bit) are returned on any problem.
*/
#ifndef _di_fake_build_program_shared_
- extern void fake_build_program_shared(const fake_data data, const fake_build_data data_build, const f_mode mode, const f_string_static file_stage, f_status *status) f_gcc_attribute_visibility_internal;
+ extern void fake_build_program_shared(const fake_data_t data, const fake_build_data_t data_build, const f_mode_t mode, const f_string_static_t file_stage, f_status_t *status) f_gcc_attribute_visibility_internal;
#endif // _di_fake_build_program_shared_
/**
* Status codes (with error bit) are returned on any problem.
*/
#ifndef _di_fake_build_program_static_
- extern void fake_build_program_static(const fake_data data, const fake_build_data data_build, const f_mode mode, const f_string_static file_stage, f_status *status) f_gcc_attribute_visibility_internal;
+ extern void fake_build_program_static(const fake_data_t data, const fake_build_data_t data_build, const f_mode_t mode, const f_string_static_t file_stage, f_status_t *status) f_gcc_attribute_visibility_internal;
#endif // _di_fake_build_program_static_
/**
* @see f_file_touch()
*/
#ifndef _di_fake_build_touch_
- extern void fake_build_touch(const fake_data data, const f_string_dynamic file, f_status *status) f_gcc_attribute_visibility_internal;
+ extern void fake_build_touch(const fake_data_t data, const f_string_dynamic_t file, f_status_t *status) f_gcc_attribute_visibility_internal;
#endif // _di_fake_build_touch_
#ifdef __cplusplus
#endif
#ifndef _di_fake_clean_operate_
- f_return_status fake_clean_operate(const fake_data data) {
- f_status status = F_none;
+ f_return_status fake_clean_operate(const fake_data_t data) {
+ f_status_t status = F_none;
if (data.verbosity != fake_verbosity_quiet) {
printf("%c", f_string_eol[0]);
* Status codes (with error bit) are returned on any problem.
*/
#ifndef _di_fake_clean_operate_
- extern f_return_status fake_clean_operate(const fake_data data) f_gcc_attribute_visibility_internal;
+ extern f_return_status fake_clean_operate(const fake_data_t data) f_gcc_attribute_visibility_internal;
#endif // _di_fake_clean_operate_
/**
#endif
#ifndef _di_fake_execute_
- void fake_execute(const fake_data data, const fake_environment environment, const f_string_static program, const f_string_statics arguments, f_status *status) {
+ void fake_execute(const fake_data_t data, const fake_environment_t environment, const f_string_static_t program, const f_string_statics_t arguments, f_status_t *status) {
if (F_status_is_error(*status)) return;
if (data.verbosity == fake_verbosity_verbose) {
printf("%s", program.string);
- for (f_array_length i = 0; i < arguments.used; i++) {
+ for (f_array_length_t i = 0; i < arguments.used; i++) {
if (arguments.array[i].used == 0) continue;
printf(" %s", arguments.array[i].string);
#endif // _di_fake_execute_
#ifndef _di_fake_file_buffer_
- f_return_status fake_file_buffer(const fake_data data, const f_string path_file, f_string_dynamic *buffer) {
- f_file file = f_file_initialize;
- f_string name_function = "f_file_exists";
- f_status status = F_none;
+ f_return_status fake_file_buffer(const fake_data_t data, const f_string_t path_file, f_string_dynamic_t *buffer) {
+ f_file_t file = f_file_t_initialize;
+ f_string_t name_function = "f_file_exists";
+ f_status_t status = F_none;
status = f_file_exists(data.file_data_build_settings.string);
if (status == F_true) {
{
- f_string_length size_file = 0;
+ f_string_length_t size_file = 0;
name_function = "f_file_size";
status = f_file_size(path_file, F_true, &size_file);
size_file = fake_common_initial_buffer_max;
}
- f_macro_string_dynamic_new((status), (*buffer), size_file);
+ f_macro_string_dynamic_t_new((status), (*buffer), size_file);
if (F_status_is_error(status)) {
fake_print_error_file(data, F_status_set_fine(status), name_function, path_file, "allocate buffer size for", F_true, F_true);
- f_macro_string_dynamic_delete_simple((*buffer));
+ f_macro_string_dynamic_t_delete_simple((*buffer));
return status;
}
}
if (F_status_is_error(status)) {
fake_print_error_file(data, F_status_set_fine(status), name_function, path_file, "read", F_true, F_true);
- f_macro_string_dynamic_delete_simple((*buffer));
+ f_macro_string_dynamic_t_delete_simple((*buffer));
}
return status;
#endif // _di_fake_file_buffer_
#ifndef _di_fake_path_generate_
- f_return_status fake_path_generate(fake_data *data) {
- f_status status = F_none;
+ f_return_status fake_path_generate(fake_data_t *data) {
+ f_status_t status = F_none;
uint8_t i = 0;
{
- const f_string_dynamic *parameters_source[] = {
+ const f_string_dynamic_t *parameters_source[] = {
&data->path_build,
&data->path_data,
&data->path_sources,
4,
};
- f_string_dynamic *parameters_value_0[] = {
+ f_string_dynamic_t *parameters_value_0[] = {
&data->path_build_documents,
&data->path_build_includes,
&data->path_build_libraries,
&data->path_build_stage,
};
- f_string_dynamic *parameters_value_1[] = {
+ f_string_dynamic_t *parameters_value_1[] = {
&data->path_data_build,
&data->path_data_settings,
};
- f_string_dynamic *parameters_value_2[] = {
+ f_string_dynamic_t *parameters_value_2[] = {
&data->path_sources_bash,
&data->path_sources_c,
&data->path_sources_cpp,
&data->path_sources_script,
};
- f_string_dynamic **parameters_value[] = {
+ f_string_dynamic_t **parameters_value[] = {
parameters_value_0,
parameters_value_1,
parameters_value_2,
}
{
- const f_string parameters_source[] = {
+ const f_string_t parameters_source[] = {
fake_path_part_documents,
fake_path_part_includes,
fake_path_part_libraries,
fake_path_part_script,
};
- const f_string_length parameters_length[] = {
+ const f_string_length_t parameters_length[] = {
fake_path_part_documents_length,
fake_path_part_includes_length,
fake_path_part_libraries_length,
fake_path_part_script_length,
};
- f_string_dynamic *parameters_value[] = {
+ f_string_dynamic_t *parameters_value[] = {
&data->path_build_documents,
&data->path_build_includes,
&data->path_build_libraries,
}
{
- const f_string_dynamic *parameters_source[] = {
+ const f_string_dynamic_t *parameters_source[] = {
&data->path_build_libraries,
&data->path_build_programs,
&data->path_data_build,
1,
};
- f_string_dynamic *parameters_value_0[] = {
+ f_string_dynamic_t *parameters_value_0[] = {
&data->path_build_libraries_script,
&data->path_build_libraries_shared,
&data->path_build_libraries_static,
};
- f_string_dynamic *parameters_value_1[] = {
+ f_string_dynamic_t *parameters_value_1[] = {
&data->path_build_programs_script,
&data->path_build_programs_shared,
&data->path_build_programs_static,
};
- f_string_dynamic *parameters_value_2[] = {
+ f_string_dynamic_t *parameters_value_2[] = {
&data->file_data_build_defines,
&data->file_data_build_dependencies,
&data->file_data_build_fakefile,
&data->file_data_build_settings,
};
- f_string_dynamic *parameters_value_3[] = {
+ f_string_dynamic_t *parameters_value_3[] = {
&data->file_documents_readme,
};
- f_string_dynamic **parameters_value[] = {
+ f_string_dynamic_t **parameters_value[] = {
parameters_value_0,
parameters_value_1,
parameters_value_2,
}
{
- const f_string parameters_source[] = {
+ const f_string_t parameters_source[] = {
fake_path_part_script,
fake_path_part_shared,
fake_path_part_static,
fake_file_readme,
};
- const f_string_length parameters_length[] = {
+ const f_string_length_t parameters_length[] = {
fake_path_part_script_length,
fake_path_part_shared_length,
fake_path_part_static_length,
fake_file_readme_length,
};
- f_string_dynamic *parameters_value[] = {
+ f_string_dynamic_t *parameters_value[] = {
&data->path_build_libraries_script,
&data->path_build_libraries_shared,
&data->path_build_libraries_static,
if (data->path_work.used > 0) {
{
- f_string_dynamic *parameters_value[] = {
+ f_string_dynamic_t *parameters_value[] = {
&data->path_work_includes,
&data->path_work_libraries,
&data->path_work_programs,
}
{
- const f_string parameters_source[] = {
+ const f_string_t parameters_source[] = {
fake_path_part_includes,
fake_path_part_libraries,
fake_path_part_programs,
};
- const f_string_length parameters_length[] = {
+ const f_string_length_t parameters_length[] = {
fake_path_part_includes_length,
fake_path_part_libraries_length,
fake_path_part_programs_length,
};
- f_string_dynamic *parameters_value[] = {
+ f_string_dynamic_t *parameters_value[] = {
&data->path_work_includes,
&data->path_work_libraries,
&data->path_work_programs,
}
{
- const f_string_dynamic *parameters_source[] = {
+ const f_string_dynamic_t *parameters_source[] = {
&data->path_work_libraries,
&data->path_work_programs,
};
3,
};
- f_string_dynamic *parameters_value_0[] = {
+ f_string_dynamic_t *parameters_value_0[] = {
&data->path_work_libraries_script,
&data->path_work_libraries_shared,
&data->path_work_libraries_static,
};
- f_string_dynamic *parameters_value_1[] = {
+ f_string_dynamic_t *parameters_value_1[] = {
&data->path_work_programs_script,
&data->path_work_programs_shared,
&data->path_work_programs_static,
};
- f_string_dynamic **parameters_value[] = {
+ f_string_dynamic_t **parameters_value[] = {
parameters_value_0,
parameters_value_1,
};
}
{
- const f_string parameters_source[] = {
+ const f_string_t parameters_source[] = {
fake_path_part_script,
fake_path_part_shared,
fake_path_part_static,
fake_path_part_static,
};
- const f_string_length parameters_length[] = {
+ const f_string_length_t parameters_length[] = {
fake_path_part_script_length,
fake_path_part_shared_length,
fake_path_part_static_length,
fake_path_part_static_length,
};
- f_string_dynamic *parameters_value[] = {
+ f_string_dynamic_t *parameters_value[] = {
&data->path_work_libraries_script,
&data->path_work_libraries_shared,
&data->path_work_libraries_static,
}
{
- f_string_dynamic *parameters_value[] = {
+ f_string_dynamic_t *parameters_value[] = {
&data->path_build_documents,
&data->path_build_includes,
&data->path_build_libraries,
#endif // _di_fake_path_generate_
#ifndef _di_fake_path_generate_string_dynamic_
- f_return_status fake_path_generate_string_dynamic(fake_data *data, const f_string_dynamic source, f_string_dynamic *destination[], const uint8_t length) {
- f_status status = F_none;
+ f_return_status fake_path_generate_string_dynamic(fake_data_t *data, const f_string_dynamic_t source, f_string_dynamic_t *destination[], const uint8_t length) {
+ f_status_t status = F_none;
for (uint8_t i = 0; i < length; i++) {
status = fl_string_dynamic_append_nulless(source, destination[i]);
#endif // _di_fake_path_generate_string_dynamic_
#ifndef _di_fake_process_console_parameters_
- f_return_status fake_process_console_parameters(const f_console_arguments arguments, fake_data *data) {
- f_status status = F_none;
+ f_return_status fake_process_console_parameters(const f_console_arguments_t arguments, fake_data_t *data) {
+ f_status_t status = F_none;
// @todo move as many of the inline error printing code into more general functions where possible to provide more accurate error reporting.
fake_parameter_operation_skeleton,
};
- const f_string parameters_name[] = {
+ const f_string_t parameters_name[] = {
fake_other_operation_build,
fake_other_operation_clean,
fake_other_operation_make,
fake_parameter_settings,
};
- const f_string parameters_name[] = {
+ const f_string_t parameters_name[] = {
fake_long_process,
fake_long_settings,
};
- const f_string parameter_defaults[] = {
+ const f_string_t parameter_defaults[] = {
fake_default_process,
fake_default_settings,
};
- const f_string_length parameter_default_lengths[] = {
+ const f_string_length_t parameter_default_lengths[] = {
fake_default_process_length,
fake_default_settings_length,
};
- f_string_dynamic *parameters_value[] = {
+ f_string_dynamic_t *parameters_value[] = {
&data->process,
&data->settings,
};
return F_status_set_error(F_parameter);
}
- f_string_length location = data->parameters[parameters_id[i]].additional.array[0];
- f_string_length length = strnlen(arguments.argv[location], f_console_length_size);
+ f_string_length_t location = data->parameters[parameters_id[i]].additional.array[0];
+ f_string_length_t length = strnlen(arguments.argv[location], f_console_length_size);
if (length > 0) {
if (parameters_validate_word[i]) {
- f_string_length j = 0;
- f_string_length width_max = 0;
+ f_string_length_t j = 0;
+ f_string_length_t width_max = 0;
for (j = 0; j < length; j++) {
width_max = length - j;
}
}
else if (parameter_default_lengths[i] > 0) {
- f_macro_string_dynamic_resize(status, (*parameters_value[i]), parameter_default_lengths[i]);
+ f_macro_string_dynamic_t_resize(status, (*parameters_value[i]), parameter_default_lengths[i]);
if (F_status_is_error(status)) {
- fake_print_error(*data, F_status_set_fine(status), "f_macro_string_dynamic_resize", F_true);
+ fake_print_error(*data, F_status_set_fine(status), "f_macro_string_dynamic_t_resize", F_true);
return status;
}
fake_parameter_path_work,
};
- const f_string parameters_name[] = {
+ const f_string_t parameters_name[] = {
fake_long_path_build,
fake_long_path_data,
fake_long_path_sources,
fake_long_path_work,
};
- const f_string parameter_defaults[] = {
+ const f_string_t parameter_defaults[] = {
fake_default_path_build,
fake_default_path_data,
fake_default_path_sources,
fake_default_path_work,
};
- const f_string_length parameter_default_lengths[] = {
+ const f_string_length_t parameter_default_lengths[] = {
fake_default_path_build_length,
fake_default_path_data_length,
fake_default_path_sources_length,
fake_default_path_work_length,
};
- f_string_dynamic *parameters_value[] = {
+ f_string_dynamic_t *parameters_value[] = {
&data->path_build,
&data->path_data,
&data->path_sources,
}
}
else if (parameter_default_lengths[i] > 0) {
- f_macro_string_dynamic_new(status, (*parameters_value[i]), parameter_default_lengths[i]);
+ f_macro_string_dynamic_t_new(status, (*parameters_value[i]), parameter_default_lengths[i]);
if (F_status_is_error(status)) {
- if (fake_print_error(*data, F_status_set_fine(status), "f_macro_string_dynamic_new", F_false) == F_unknown && data->verbosity != fake_verbosity_quiet) {
+ if (fake_print_error(*data, F_status_set_fine(status), "f_macro_string_dynamic_t_new", F_false) == F_unknown && data->verbosity != fake_verbosity_quiet) {
fprintf(f_type_error, "%c", f_string_eol[0]);
fl_color_print(f_type_error, data->context.error, data->context.reset, "ERROR: Failed to load default for the parameter '");
fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, parameters_name[i]);
return status;
}
- f_array_length i = 0;
- f_string_length j = 0;
- f_string_length width_max = 0;
+ f_array_length_t i = 0;
+ f_string_length_t j = 0;
+ f_string_length_t width_max = 0;
for (; i < data->define.used; i++) {
for (j = 0; j < data->define.array[i].used; j++) {
return status;
}
- f_array_length i = 0;
- f_string_length j = 0;
- f_string_length width_max = 0;
+ f_array_length_t i = 0;
+ f_string_length_t j = 0;
+ f_string_length_t width_max = 0;
for (; i < data->mode.used; i++) {
for (j = 0; j < data->mode.array[i].used; j++) {
#endif // _di_fake_process_console_parameters_
#ifndef _di_fake_validate_directories_
- f_return_status fake_validate_parameter_directories(const f_console_arguments arguments, const fake_data data) {
- const f_string parameters_name[] = {
+ f_return_status fake_validate_parameter_directories(const f_console_arguments_t arguments, const fake_data_t data) {
+ const f_string_t parameters_name[] = {
fake_long_path_build,
fake_long_path_data,
fake_long_path_sources,
fake_long_path_work,
};
- const f_string parameter_defaults[] = {
+ const f_string_t parameter_defaults[] = {
fake_default_path_build,
fake_default_path_data,
fake_default_path_sources,
fake_default_path_work,
};
- const f_string_length parameter_default_lengths[] = {
+ const f_string_length_t parameter_default_lengths[] = {
fake_default_path_build_length,
fake_default_path_data_length,
fake_default_path_sources_length,
fake_default_path_work_length,
};
- const f_string_dynamic *parameters_value[] = {
+ const f_string_dynamic_t *parameters_value[] = {
&data.path_build,
&data.path_data,
&data.path_sources,
};
struct stat directory_stat;
- f_status status = F_none;
+ f_status_t status = F_none;
for (uint8_t i = 0; i < 4; i++) {
if (parameters_value[i]->used > 0) {
#define fake_common_setting_bool_no_length 2
#endif // _di_fake_common_
-#ifndef _di_fake_environment_
+#ifndef _di_fake_environment_t_
typedef struct {
- f_string_dynamics names;
- f_string_dynamics values;
- } fake_environment;
+ f_string_dynamics_t names;
+ f_string_dynamics_t values;
+ } fake_environment_t;
- #define fake_environment_initialize { \
- f_string_dynamics_initialize, \
- f_string_dynamics_initialize, \
+ #define fake_environment_t_initialize { \
+ f_string_dynamics_t_initialize, \
+ f_string_dynamics_t_initialize, \
}
- #define fake_macro_environment_delete_simple(environment) \
- f_macro_string_dynamics_delete_simple(environment.names) \
- f_macro_string_dynamics_delete_simple(environment.values)
-#endif // _di_fake_environment_
+ #define fake_macro_environment_t_delete_simple(environment) \
+ f_macro_string_dynamics_t_delete_simple(environment.names) \
+ f_macro_string_dynamics_t_delete_simple(environment.values)
+#endif // _di_fake_environment_t_
/**
* Execute the given command and arguments.
* The return status.
*/
#ifndef _di_fake_execute_
- extern void fake_execute(const fake_data data, const fake_environment environment, const f_string_static program, const f_string_statics arguments, f_status *status) f_gcc_attribute_visibility_internal;
+ extern void fake_execute(const fake_data_t data, const fake_environment_t environment, const f_string_static_t program, const f_string_statics_t arguments, f_status_t *status) f_gcc_attribute_visibility_internal;
#endif // _di_fake_execute_
/**
* Status codes (with error bit) are returned on any problem.
*/
#ifndef _di_fake_file_buffer_
- extern f_return_status fake_file_buffer(const fake_data data, const f_string path_file, f_string_dynamic *buffer) f_gcc_attribute_visibility_internal;
+ extern f_return_status fake_file_buffer(const fake_data_t data, const f_string_t path_file, f_string_dynamic_t *buffer) f_gcc_attribute_visibility_internal;
#endif // _di_fake_file_buffer_
/**
* Status codes (with error bit) are returned on any problem.
*/
#ifndef _di_fake_path_generate_
- extern f_return_status fake_path_generate(fake_data *data) f_gcc_attribute_visibility_internal;
+ extern f_return_status fake_path_generate(fake_data_t *data) f_gcc_attribute_visibility_internal;
#endif // _di_fake_path_generate_
/**
* Status codes (with error bit) are returned on any problem.
*/
#ifndef _di_fake_path_generate_string_dynamic_
- extern f_return_status fake_path_generate_string_dynamic(fake_data *data, const f_string_dynamic source, f_string_dynamic *destination[], const uint8_t size) f_gcc_attribute_visibility_internal;
+ extern f_return_status fake_path_generate_string_dynamic(fake_data_t *data, const f_string_dynamic_t source, f_string_dynamic_t *destination[], const uint8_t size) f_gcc_attribute_visibility_internal;
#endif // _di_fake_path_generate_string_dynamic_
/**
* Status codes (with error bit) are returned on any problem.
*/
#ifndef _di_fake_process_console_parameters_
- extern f_return_status fake_process_console_parameters(const f_console_arguments arguments, fake_data *data) f_gcc_attribute_visibility_internal;
+ extern f_return_status fake_process_console_parameters(const f_console_arguments_t arguments, fake_data_t *data) f_gcc_attribute_visibility_internal;
#endif // _di_validate_console_parameters_
/**
* Status codes (with error bit) are returned on any problem.
*/
#ifndef _di_fake_validate_parameter_directories_
- extern f_return_status fake_validate_parameter_directories(const f_console_arguments arguments, const fake_data data) f_gcc_attribute_visibility_internal;
+ extern f_return_status fake_validate_parameter_directories(const f_console_arguments_t arguments, const fake_data_t data) f_gcc_attribute_visibility_internal;
#endif // _di_fake_validate_parameter_directories_
#ifdef __cplusplus
#endif
#ifndef _di_fake_make_assure_inside_project_
- f_return_status fake_make_assure_inside_project(const fake_data data, const f_string_static path, fake_make_data *data_make) {
+ f_return_status fake_make_assure_inside_project(const fake_data_t data, const f_string_static_t path, fake_make_data_t *data_make) {
data_make->path_cache.used = 0;
- f_status status = fll_path_canonical(path.string, &data_make->path_cache);
+ f_status_t status = fll_path_canonical(path.string, &data_make->path_cache);
if (F_status_is_error(status)) return status;
if (data_make->path_cache.used < data_make->path.stack.array[0].used) {
return F_status_set_error(F_false);
}
- const f_string_range range = f_macro_string_range_initialize(data_make->path.stack.array[0].used);
+ const f_string_range_t range = f_macro_string_range_initialize(data_make->path.stack.array[0].used);
if (range.start <= range.stop) {
status = fl_string_dynamic_partial_compare(data_make->path.stack.array[0], data_make->path_cache, range, range);
#endif // _di_fake_make_assure_inside_project_
#ifndef _di_fake_make_get_id_group_
- f_return_status fake_make_get_id_group(const fake_data data, const fake_make_print print, const f_string_static buffer, gid_t *id) {
- const f_string_range range = f_macro_string_range_initialize(buffer.used);
+ f_return_status fake_make_get_id_group(const fake_data_t data, const fake_make_print_t print, const f_string_static_t buffer, gid_t *id) {
+ const f_string_range_t range = f_macro_string_range_initialize(buffer.used);
- f_number_unsigned number = 0;
+ f_number_unsigned_t number = 0;
- f_status status = fl_conversion_string_to_number_unsigned(buffer.string, &number, range);
+ f_status_t status = fl_conversion_string_to_number_unsigned(buffer.string, &number, range);
if (F_status_is_error(status)) {
status = F_status_set_fine(status);
#endif // _di_fake_make_get_id_group_
#ifndef _di_fake_make_get_id_mode_
- f_return_status fake_make_get_id_mode(const fake_data data, const fake_make_print print, const f_string_static buffer, f_file_mode *mode, uint8_t *replace) {
+ f_return_status fake_make_get_id_mode(const fake_data_t data, const fake_make_print_t print, const f_string_static_t buffer, f_file_mode *mode, uint8_t *replace) {
if (!buffer.used) {
fake_print_message(data, F_parameter, "fake_make_get_id_mode", F_true, print);
return F_status_set_error(F_parameter);
}
- f_status status = f_file_mode_from_string(buffer.string, data.umask, mode, replace);
+ f_status_t status = f_file_mode_from_string(buffer.string, data.umask, mode, replace);
if (F_status_is_error(status)) {
if (data.verbosity != fake_verbosity_quiet) {
#endif // _di_fake_make_get_id_mode_
#ifndef _di_fake_make_get_id_owner_
- f_return_status fake_make_get_id_owner(const fake_data data, const fake_make_print print, const f_string_static buffer, uid_t *id) {
- const f_string_range range = f_macro_string_range_initialize(buffer.used);
+ f_return_status fake_make_get_id_owner(const fake_data_t data, const fake_make_print_t print, const f_string_static_t buffer, uid_t *id) {
+ const f_string_range_t range = f_macro_string_range_initialize(buffer.used);
- f_number_unsigned number = 0;
+ f_number_unsigned_t number = 0;
- f_status status = fl_conversion_string_to_number_unsigned(buffer.string, &number, range);
+ f_status_t status = fl_conversion_string_to_number_unsigned(buffer.string, &number, range);
if (F_status_is_error(status)) {
status = F_status_set_fine(status);
#endif // _di_fake_make_get_id_owner_
#ifndef _di_fake_make_load_fakefile_
- void fake_make_load_fakefile(const fake_data data, fake_make_data *data_make, f_status *status) {
+ void fake_make_load_fakefile(const fake_data_t data, fake_make_data_t *data_make, f_status_t *status) {
if (F_status_is_error(*status)) return;
*status = fake_file_buffer(data, data.file_data_build_fakefile.string, &data_make->buffer);
return;
}
- f_fss_objects list_objects = f_fss_objects_initialize;
- f_fss_contents list_contents = f_fss_contents_initialize;
+ f_fss_objects_t list_objects = f_fss_objects_t_initialize;
+ f_fss_contents_t list_contents = f_fss_contents_t_initialize;
{
- f_string_range range = f_macro_string_range_initialize(data_make->buffer.used);
+ f_string_range_t range = f_macro_string_range_initialize(data_make->buffer.used);
*status = fll_fss_basic_list_read(&data_make->buffer, &range, &list_objects, &list_contents);
if (F_status_is_error(*status)) {
fake_print_error_fss(data, *status, "fll_fss_basic_list_read", data.file_data_build_fakefile.string, range, F_true);
- f_macro_fss_objects_delete_simple(list_objects);
- f_macro_fss_contents_delete_simple(list_contents);
+ f_macro_fss_objects_t_delete_simple(list_objects);
+ f_macro_fss_contents_t_delete_simple(list_contents);
return;
}
}
bool missing_main = F_true;
bool missing_settings = F_true;
- f_fss_set settings = f_fss_set_initialize;
+ f_fss_set_t settings = f_fss_set_t_initialize;
- const f_string_static name_settings = f_macro_string_static_initialize(fake_make_section_settings, fake_make_section_settings_length);
- const f_string_static name_main = f_macro_string_static_initialize(fake_make_section_main, fake_make_section_main_length);
+ const f_string_static_t name_settings = f_macro_string_static_t_initialize(fake_make_section_settings, fake_make_section_settings_length);
+ const f_string_static_t name_main = f_macro_string_static_t_initialize(fake_make_section_main, fake_make_section_main_length);
- const f_string_range name_settings_range = f_macro_string_range_initialize(fake_make_section_settings_length);
- const f_string_range name_main_range = f_macro_string_range_initialize(fake_make_section_main_length);
+ const f_string_range_t name_settings_range = f_macro_string_range_initialize(fake_make_section_settings_length);
+ const f_string_range_t name_main_range = f_macro_string_range_initialize(fake_make_section_main_length);
- f_macro_fss_nameds_new((*status), data_make->fakefile, list_objects.used);
+ f_macro_fss_nameds_t_new((*status), data_make->fakefile, list_objects.used);
if (F_status_is_error(*status)) {
- fake_print_error(data, F_status_set_fine(*status), "f_macro_fss_nameds_new", F_true);
+ fake_print_error(data, F_status_set_fine(*status), "f_macro_fss_nameds_t_new", F_true);
- f_macro_fss_set_delete_simple(settings);
- f_macro_fss_objects_delete_simple(list_objects);
- f_macro_fss_contents_delete_simple(list_contents);
+ f_macro_fss_set_t_delete_simple(settings);
+ f_macro_fss_objects_t_delete_simple(list_objects);
+ f_macro_fss_contents_t_delete_simple(list_contents);
return;
}
{
- f_string_range content_range = f_string_range_initialize;
+ f_string_range_t content_range = f_string_range_initialize;
- for (f_array_length i = 0; i < list_objects.used; i++) {
+ for (f_array_length_t i = 0; i < list_objects.used; i++) {
if (fl_string_dynamic_partial_compare(name_settings, data_make->buffer, name_settings_range, list_objects.array[i]) == F_equal_to) {
if (!missing_settings) {
fake_print_warning_settings_object_multiple(data, data.file_data_build_fakefile.string, "list", name_settings.string);
if (F_status_is_error(*status)) {
fake_print_error_fss(data, *status, "fll_fss_extended_read", data.file_data_build_fakefile.string, content_range, F_true);
- f_macro_fss_set_delete_simple(settings);
- f_macro_fss_objects_delete_simple(list_objects);
- f_macro_fss_contents_delete_simple(list_contents);
+ f_macro_fss_set_t_delete_simple(settings);
+ f_macro_fss_objects_t_delete_simple(list_objects);
+ f_macro_fss_contents_t_delete_simple(list_contents);
return;
}
if (F_status_is_error(*status)) {
fake_print_error_fss(data, *status, "fll_fss_extended_read", data.file_data_build_fakefile.string, content_range, F_true);
- f_macro_fss_set_delete_simple(settings);
- f_macro_fss_objects_delete_simple(list_objects);
- f_macro_fss_contents_delete_simple(list_contents);
+ f_macro_fss_set_t_delete_simple(settings);
+ f_macro_fss_objects_t_delete_simple(list_objects);
+ f_macro_fss_contents_t_delete_simple(list_contents);
return;
}
} // for
}
- f_macro_fss_objects_delete_simple(list_objects);
- f_macro_fss_contents_delete_simple(list_contents);
+ f_macro_fss_objects_t_delete_simple(list_objects);
+ f_macro_fss_contents_t_delete_simple(list_contents);
if (missing_main) {
if (data.verbosity != fake_verbosity_quiet) {
*status = F_status_set_error(F_failure);
- f_macro_fss_set_delete_simple(settings);
+ f_macro_fss_set_t_delete_simple(settings);
return;
}
// always have the parameter variable "return" map at index 0 and pre-initialized.
{
- f_string function_name = "f_macro_string_map_multis_new";
+ f_string_t function_name = "f_macro_string_map_multis_t_new";
- f_macro_string_map_multis_new(*status, data_make->setting_make.parameter, f_memory_default_allocation_step);
+ f_macro_string_map_multis_t_new(*status, data_make->setting_make.parameter, f_memory_default_allocation_step);
if (F_status_is_fine(*status)) {
data_make->setting_make.parameter.used = 1;
if (F_status_is_error(*status)) {
fake_print_error(data, *status, function_name, F_true);
- f_macro_fss_set_delete_simple(settings);
+ f_macro_fss_set_t_delete_simple(settings);
return;
}
}
- f_string_range *range_compiler = 0;
- f_string_range *range_linker = 0;
+ f_string_range_t *range_compiler = 0;
+ f_string_range_t *range_linker = 0;
data_make->setting_make.parameter.array[0].value.used = 1;
data_make->setting_make.load_build = F_true;
bool unmatched_fail = F_true;
bool unmatched_load = F_true;
- for (f_array_length i = 0; i < settings.objects.used; i++) {
+ for (f_array_length_t i = 0; i < settings.objects.used; i++) {
if (fl_string_dynamic_partial_compare_string(fake_make_setting_compiler, data_make->buffer, fake_make_setting_compiler_length, settings.objects.array[i]) == F_equal_to) {
if (range_compiler) {
fake_print_warning_settings_content_multiple(data, data.file_data_build_fakefile.string, fake_make_setting_compiler);
}
}
else if (fl_string_dynamic_partial_compare_string(fake_make_setting_environment, data_make->buffer, fake_make_setting_environment_length, settings.objects.array[i]) == F_equal_to) {
- f_string_dynamic name_define = f_string_dynamic_initialize;
+ f_string_dynamic_t name_define = f_string_dynamic_t_initialize;
- f_array_length j = 0;
- f_array_length k = 0;
+ f_array_length_t j = 0;
+ f_array_length_t k = 0;
for (; j < settings.contents.array[i].used; j++) {
if (F_status_is_error(*status)) {
fake_print_error(data, *status, "fl_string_dynamic_partial_append_nulless", F_true);
- f_macro_string_dynamic_delete_simple(name_define);
- f_macro_fss_set_delete_simple(settings);
+ f_macro_string_dynamic_t_delete_simple(name_define);
+ f_macro_fss_set_t_delete_simple(settings);
return;
}
if (F_status_is_error(*status)) {
fake_print_error(data, *status, "fl_string_dynamic_terminate_after", F_true);
- f_macro_string_dynamic_delete_simple(name_define);
- f_macro_fss_set_delete_simple(settings);
+ f_macro_string_dynamic_t_delete_simple(name_define);
+ f_macro_fss_set_t_delete_simple(settings);
return;
}
if (F_status_is_error(*status)) {
fake_print_error(data, *status, "fl_string_lengths_size_increase", F_true);
- f_macro_string_dynamic_delete_simple(name_define);
- f_macro_fss_set_delete_simple(settings);
+ f_macro_string_dynamic_t_delete_simple(name_define);
+ f_macro_fss_set_t_delete_simple(settings);
return;
}
}
if (F_status_is_error(*status)) {
fake_print_error(data, *status, "fl_string_dynamic_append", F_true);
- f_macro_string_dynamic_delete_simple(name_define);
- f_macro_fss_set_delete_simple(settings);
+ f_macro_string_dynamic_t_delete_simple(name_define);
+ f_macro_fss_set_t_delete_simple(settings);
return;
}
} // for
*status = F_none;
- f_macro_string_dynamic_delete_simple(name_define);
+ f_macro_string_dynamic_t_delete_simple(name_define);
}
else if (fl_string_dynamic_partial_compare_string(fake_make_setting_fail, data_make->buffer, fake_make_setting_fail_length, settings.objects.array[i]) == F_equal_to) {
if (unmatched_fail) {
if (settings.contents.array[i].used) {
if (fl_string_dynamic_partial_compare_string(fake_make_setting_return, data_make->buffer, fake_make_setting_return_length, settings.contents.array[i].array[0]) == F_equal_to) {
if (settings.contents.array[i].used > 1) {
- f_string function_name = 0;
+ f_string_t function_name = 0;
// each define replaces the previous define.
data_make->setting_make.parameter.array[0].value.array[0].used = 0;
- for (f_array_length j = 1; j < settings.contents.array[i].used; j++) {
+ for (f_array_length_t j = 1; j < settings.contents.array[i].used; j++) {
function_name = "fl_string_dynamic_partial_append_nulless";
*status = fl_string_dynamic_partial_append_nulless(data_make->buffer, settings.contents.array[i].array[j], &data_make->setting_make.parameter.array[0].value.array[0]);
if (F_status_is_error(*status)) {
fake_print_error(data, *status, function_name, F_true);
- f_macro_fss_set_delete_simple(settings);
+ f_macro_fss_set_t_delete_simple(settings);
return;
}
} // for
if (F_status_is_error(*status)) {
fake_print_error(data, *status, "fake_build_load_setting", F_true);
- f_macro_fss_set_delete_simple(settings);
+ f_macro_fss_set_t_delete_simple(settings);
return;
}
}
if (F_status_is_error(*status)) {
fake_print_error(data, *status, "fl_string_dynamic_partial_append", F_true);
- f_macro_fss_set_delete_simple(settings);
+ f_macro_fss_set_t_delete_simple(settings);
return;
}
- f_string_map_multis define = f_string_map_multis_initialize;
+ f_string_map_multis_t define = f_string_map_multis_t_initialize;
fake_build_load_setting_process(data, data.file_data_build_fakefile.string, data_make->buffer, settings.objects, settings.contents, &data_make->setting_build, status);
if (F_status_is_not_error(*status) && settings.objects.used) {
- const f_string settings_name[] = {
+ const f_string_t settings_name[] = {
fake_make_setting_define,
fake_make_setting_parameter,
};
- const f_string_length settings_length[] = {
+ const f_string_length_t settings_length[] = {
fake_make_setting_define_length,
fake_make_setting_parameter_length,
};
- f_string_map_multis *settings_value[] = {
+ f_string_map_multis_t *settings_value[] = {
&define,
&data_make->setting_make.parameter,
};
if (F_status_is_error(*status)) {
fake_print_error(data, F_status_set_fine(*status), "fll_fss_snatch_map_apart", F_true);
- f_macro_string_map_multis_delete_simple(define);
- f_macro_fss_set_delete_simple(settings);
+ f_macro_string_map_multis_t_delete_simple(define);
+ f_macro_fss_set_t_delete_simple(settings);
return;
}
}
if (define.used) {
- f_status status_validate = F_none;
- f_string_dynamic combined = f_string_dynamic_initialize;
+ f_status_t status_validate = F_none;
+ f_string_dynamic_t combined = f_string_dynamic_t_initialize;
- for (f_array_length i = 0; i < define.used; i++) {
+ for (f_array_length_t i = 0; i < define.used; i++) {
status_validate = fake_make_operate_validate_define_name(define.array[i].name);
if (status_validate) {
combined.used = 0;
- for (f_array_length j = 0; j < define.array[i].value.used; j++) {
+ for (f_array_length_t j = 0; j < define.array[i].value.used; j++) {
*status = fl_string_dynamic_mash(" ", 1, define.array[i].value.array[j], &combined);
if (F_status_is_error(*status)) {
fake_print_error(data, *status, "fl_string_dynamic_mash_nulless", F_true);
}
} // for
- f_macro_string_dynamic_delete_simple(combined);
+ f_macro_string_dynamic_t_delete_simple(combined);
}
- f_macro_string_map_multis_delete_simple(define);
- f_macro_fss_set_delete_simple(settings);
+ f_macro_string_map_multis_t_delete_simple(define);
+ f_macro_fss_set_t_delete_simple(settings);
}
}
#endif // _di_fake_make_load_fakefile_
#ifndef _di_fake_make_operate_
- f_return_status fake_make_operate(const fake_data data) {
+ f_return_status fake_make_operate(const fake_data_t data) {
if (data.verbosity != fake_verbosity_quiet) {
printf("%c", f_string_eol[0]);
fl_color_print_line(f_type_output, data.context.important, data.context.reset, "Making project.");
}
- f_status status = F_none;
- f_mode mode = f_mode_initialize;
+ f_status_t status = F_none;
+ f_mode_t mode = f_mode_t_initialize;
- f_string_lengths section_stack = f_string_lengths_initialize;
- fake_make_data data_make = fake_make_data_initialize;
+ f_string_lengths_t section_stack = f_string_lengths_t_initialize;
+ fake_make_data_t data_make = fake_make_data_t_initialize;
f_macro_string_dynamics_new(status, data_make.path.stack, f_memory_default_allocation_step);
if (F_status_is_error(status)) {
if (F_status_is_error(status)) {
fake_print_error(data, F_status_set_fine(status), "f_path_current", F_true);
- fake_macro_make_data_delete_simple(data_make);
+ fake_macro_make_data_t_delete_simple(data_make);
return status;
}
if (F_status_is_error(status)) {
fake_print_error(data, F_status_set_fine(status), "f_directory_open", F_true);
- fake_macro_make_data_delete_simple(data_make);
+ fake_macro_make_data_t_delete_simple(data_make);
return status;
}
data_make.path.stack.used = 1;
- f_macro_mode_set_default_umask(mode, data.umask);
+ f_macro_mode_t_set_default_umask(mode, data.umask);
fake_make_load_fakefile(data, &data_make, &status);
}
{
- f_status status_path = f_path_change_at(data_make.path.top);
+ f_status_t status_path = f_path_change_at(data_make.path.top);
if (F_status_is_error(status_path) && data.verbosity == fake_verbosity_verbose) {
fprintf(f_type_warning, "%c", f_string_eol[0]);
f_file_close(&data_make.path.top);
- f_macro_string_lengths_delete_simple(section_stack);
- fake_macro_make_data_delete_simple(data_make);
+ f_macro_string_lengths_t_delete_simple(section_stack);
+ fake_macro_make_data_t_delete_simple(data_make);
return status;
}
#endif // _di_fake_make_operate_
#ifndef _di_fake_make_operate_expand_
- void fake_make_operate_expand(const fake_data data, const f_string_range section_name, const f_array_length operation, const f_string_static operation_name, const f_fss_content content, const f_fss_quoteds quoteds, fake_make_data *data_make, f_string_dynamics *arguments, f_status *status) {
+ void fake_make_operate_expand(const fake_data_t data, const f_string_range_t section_name, const f_array_length_t operation, const f_string_static_t operation_name, const f_fss_content_t content, const f_fss_quoteds_t quoteds, fake_make_data_t *data_make, f_string_dynamics_t *arguments, f_status_t *status) {
if (F_status_is_error(*status)) return;
if (content.used == 0) return;
}
}
- const f_string_static vocabulary_define = f_macro_string_static_initialize(iki_vocabulary_0002_define, iki_vocabulary_0002_define_length);
- const f_string_static vocabulary_parameter = f_macro_string_static_initialize(iki_vocabulary_0002_parameter, iki_vocabulary_0002_parameter_length);
+ const f_string_static_t vocabulary_define = f_macro_string_static_t_initialize(iki_vocabulary_0002_define, iki_vocabulary_0002_define_length);
+ const f_string_static_t vocabulary_parameter = f_macro_string_static_t_initialize(iki_vocabulary_0002_parameter, iki_vocabulary_0002_parameter_length);
- const f_string_range range_define = f_macro_string_range_initialize(iki_vocabulary_0002_define_length);
- const f_string_range range_parameter = f_macro_string_range_initialize(iki_vocabulary_0002_parameter_length);
+ const f_string_range_t range_define = f_macro_string_range_initialize(iki_vocabulary_0002_define_length);
+ const f_string_range_t range_parameter = f_macro_string_range_initialize(iki_vocabulary_0002_parameter_length);
- f_iki_variable iki_variable = f_iki_variable_initialize;
- f_iki_vocabulary iki_vocabulary = f_iki_vocabulary_initialize;
- f_iki_content iki_content = f_iki_content_initialize;
+ f_iki_variable_t iki_variable = f_iki_variable_t_initialize;
+ f_iki_vocabulary_t iki_vocabulary = f_iki_vocabulary_t_initialize;
+ f_iki_content_t iki_content = f_iki_content_t_initialize;
- f_string_range range = f_string_range_initialize;
- f_string_map_multis *parameter = &data_make->setting_make.parameter;
+ f_string_range_t range = f_string_range_initialize;
+ f_string_map_multis_t *parameter = &data_make->setting_make.parameter;
bool unmatched = F_true;
bool parameter_is = F_false;
bool define_is = F_false;
- f_array_length i = 0;
- f_array_length j = 0;
- f_array_length k = 0;
- f_array_length l = 0;
+ f_array_length_t i = 0;
+ f_array_length_t j = 0;
+ f_array_length_t k = 0;
+ f_array_length_t l = 0;
- f_array_length used_arguments = 0;
+ f_array_length_t used_arguments = 0;
- f_string_length previous = 0;
+ f_string_length_t previous = 0;
for (; i < content.used; i++) {
arguments->used++;
}
- f_macro_iki_variable_delete_simple(iki_variable);
- f_macro_iki_vocabulary_delete_simple(iki_vocabulary);
- f_macro_iki_content_delete_simple(iki_content);
+ f_macro_iki_variable_t_delete_simple(iki_variable);
+ f_macro_iki_vocabulary_t_delete_simple(iki_vocabulary);
+ f_macro_iki_content_t_delete_simple(iki_content);
} // for
- f_macro_iki_variable_delete_simple(iki_variable);
- f_macro_iki_vocabulary_delete_simple(iki_vocabulary);
- f_macro_iki_content_delete_simple(iki_content);
+ f_macro_iki_variable_t_delete_simple(iki_variable);
+ f_macro_iki_vocabulary_t_delete_simple(iki_vocabulary);
+ f_macro_iki_content_t_delete_simple(iki_content);
}
#endif // _di_fake_make_operate_expand_
#ifndef _di_fake_make_operate_expand_build_
- f_return_status fake_make_operate_expand_build(const fake_data data, const f_fss_quoted quoted, const f_string_range range_name, fake_make_data *data_make, f_string_dynamics *arguments) {
- f_status status = F_none;
- f_string_dynamic value = f_string_dynamic_initialize;
+ f_return_status fake_make_operate_expand_build(const fake_data_t data, const f_fss_quoted_t quoted, const f_string_range_t range_name, fake_make_data_t *data_make, f_string_dynamics_t *arguments) {
+ f_status_t status = F_none;
+ f_string_dynamic_t value = f_string_dynamic_t_initialize;
bool unmatched = F_true;
{
- const f_string uint8_name[] = {
+ const f_string_t uint8_name[] = {
fake_build_setting_name_build_language,
fake_build_setting_name_version_target,
};
- const f_string_length uint8_length[] = {
+ const f_string_length_t uint8_length[] = {
fake_build_setting_name_build_language_length,
fake_build_setting_name_version_target_length,
};
}
if (unmatched) {
- const f_string bool_name[] = {
+ const f_string_t bool_name[] = {
fake_build_setting_name_build_script,
fake_build_setting_name_build_shared,
fake_build_setting_name_build_static,
fake_build_setting_name_search_static,
};
- const f_string_length bool_length[] = {
+ const f_string_length_t bool_length[] = {
fake_build_setting_name_build_script_length,
fake_build_setting_name_build_shared_length,
fake_build_setting_name_build_static_length,
}
if (unmatched) {
- const f_string dynamic_name[] = {
+ const f_string_t dynamic_name[] = {
fake_build_setting_name_build_compiler,
fake_build_setting_name_build_linker,
fake_build_setting_name_path_headers,
fake_build_setting_name_version_minor,
};
- const f_string_length dynamic_length[] = {
+ const f_string_length_t dynamic_length[] = {
fake_build_setting_name_build_compiler_length,
fake_build_setting_name_build_linker_length,
fake_build_setting_name_path_headers_length,
fake_build_setting_name_version_minor_length,
};
- const f_string_dynamic dynamic_value[] = {
+ const f_string_dynamic_t dynamic_value[] = {
data_make->setting_build.build_compiler,
data_make->setting_build.build_linker,
data_make->setting_build.path_headers,
}
if (unmatched) {
- const f_string dynamics_name[] = {
+ const f_string_t dynamics_name[] = {
fake_build_setting_name_build_libraries,
fake_build_setting_name_build_sources_headers,
fake_build_setting_name_build_sources_library,
fake_build_setting_name_modes_default,
};
- const f_string_length dynamics_length[] = {
+ const f_string_length_t dynamics_length[] = {
fake_build_setting_name_build_libraries_length,
fake_build_setting_name_build_sources_headers_length,
fake_build_setting_name_build_sources_library_length,
fake_build_setting_name_modes_default_length,
};
- const f_string_dynamics dynamics_value[] = {
+ const f_string_dynamics_t dynamics_value[] = {
data_make->setting_build.build_libraries,
data_make->setting_build.build_sources_headers,
data_make->setting_build.build_sources_library,
if (status == F_equal_to) {
unmatched = F_false;
- for (f_array_length j = 0; j < dynamics_value[i].used; j++) {
+ for (f_array_length_t j = 0; j < dynamics_value[i].used; j++) {
status = fl_string_dynamic_mash(" ", 1, dynamics_value[i].array[j], &value);
if (F_status_is_error(status)) {
break;
}
if (F_status_is_error(status)) {
- f_macro_string_dynamic_delete_simple(value);
+ f_macro_string_dynamic_t_delete_simple(value);
return status;
}
if (unmatched) {
- f_macro_string_dynamic_delete_simple(value);
+ f_macro_string_dynamic_t_delete_simple(value);
return F_false;
}
}
}
- f_macro_string_dynamic_delete_simple(value);
+ f_macro_string_dynamic_t_delete_simple(value);
if (F_status_is_fine(status)) {
return F_true;
#endif // _di_fake_make_operate_expand_build_
#ifndef _di_fake_make_operate_expand_environment_
- f_return_status fake_make_operate_expand_environment(const fake_data data, const f_fss_quoted quoted, const f_string_range range_name, fake_make_data *data_make, f_string_dynamics *arguments) {
- f_status status = F_none;
- f_string_dynamic value = f_string_dynamic_initialize;
+ f_return_status fake_make_operate_expand_environment(const fake_data_t data, const f_fss_quoted_t quoted, const f_string_range_t range_name, fake_make_data_t *data_make, f_string_dynamics_t *arguments) {
+ f_status_t status = F_none;
+ f_string_dynamic_t value = f_string_dynamic_t_initialize;
bool unmatched = F_false;
{
- f_string_dynamic name = f_string_dynamic_initialize;
+ f_string_dynamic_t name = f_string_dynamic_t_initialize;
status = fl_string_dynamic_partial_append_nulless(data_make->buffer, range_name, &name);
if (F_status_is_error(status)) return status;
status = f_environment_get(name.string, &value);
- f_macro_string_dynamic_delete_simple(name);
+ f_macro_string_dynamic_t_delete_simple(name);
}
if (F_status_is_error(status)) {
- f_macro_string_dynamic_delete_simple(value);
+ f_macro_string_dynamic_t_delete_simple(value);
return status;
}
else if (status == F_exist_not) {
- f_macro_string_dynamic_delete_simple(value);
+ f_macro_string_dynamic_t_delete_simple(value);
return F_false;
}
}
}
- f_macro_string_dynamic_delete_simple(value);
+ f_macro_string_dynamic_t_delete_simple(value);
if (F_status_is_fine(status)) {
return F_true;
#endif // _di_fake_make_operate_expand_environment_
#ifndef _di_fake_make_operate_section_
- void fake_make_operate_section(const fake_data data, const f_array_length id_section, fake_make_data *data_make, f_string_lengths *section_stack, f_status *status) {
+ void fake_make_operate_section(const fake_data_t data, const f_array_length_t id_section, fake_make_data_t *data_make, f_string_lengths_t *section_stack, f_status_t *status) {
if (F_status_is_error(*status)) return;
if (id_section > data_make->fakefile.used) {
section_stack->array[section_stack->used] = id_section;
section_stack->used++;
- const f_fss_named *section = &data_make->fakefile.array[id_section];
+ const f_fss_named_t *section = &data_make->fakefile.array[id_section];
if (data.verbosity != fake_verbosity_quiet) {
printf("%c", f_string_eol[0]);
return;
}
- const f_string_static operations_name[] = {
- f_macro_string_static_initialize(fake_make_operation_archive, fake_make_operation_archive_length),
- f_macro_string_static_initialize(fake_make_operation_break, fake_make_operation_break_length),
- f_macro_string_static_initialize(fake_make_operation_build, fake_make_operation_build_length),
- f_macro_string_static_initialize(fake_make_operation_clean, fake_make_operation_clean_length),
- f_macro_string_static_initialize(fake_make_operation_compile, fake_make_operation_compile_length),
- f_macro_string_static_initialize(fake_make_operation_define, fake_make_operation_define_length),
- f_macro_string_static_initialize(fake_make_operation_delete, fake_make_operation_delete_length),
- f_macro_string_static_initialize(fake_make_operation_deletes, fake_make_operation_deletes_length),
- f_macro_string_static_initialize(fake_make_operation_else, fake_make_operation_else_length),
- f_macro_string_static_initialize(fake_make_operation_exit, fake_make_operation_exit_length),
- f_macro_string_static_initialize(fake_make_operation_fail, fake_make_operation_fail_length),
- f_macro_string_static_initialize(fake_make_operation_group, fake_make_operation_group_length),
- f_macro_string_static_initialize(fake_make_operation_groups, fake_make_operation_groups_length),
- f_macro_string_static_initialize(fake_make_operation_if, fake_make_operation_if_length),
- f_macro_string_static_initialize(fake_make_operation_link, fake_make_operation_link_length),
- f_macro_string_static_initialize(fake_make_operation_mode, fake_make_operation_mode_length),
- f_macro_string_static_initialize(fake_make_operation_modes, fake_make_operation_modes_length),
- f_macro_string_static_initialize(fake_make_operation_operate, fake_make_operation_operate_length),
- f_macro_string_static_initialize(fake_make_operation_owner, fake_make_operation_owner_length),
- f_macro_string_static_initialize(fake_make_operation_owners, fake_make_operation_owners_length),
- f_macro_string_static_initialize(fake_make_operation_pop, fake_make_operation_pop_length),
- f_macro_string_static_initialize(fake_make_operation_print, fake_make_operation_print_length),
- f_macro_string_static_initialize(fake_make_operation_run, fake_make_operation_run_length),
- f_macro_string_static_initialize(fake_make_operation_shell, fake_make_operation_shell_length),
- f_macro_string_static_initialize(fake_make_operation_skeleton, fake_make_operation_skeleton_length),
- f_macro_string_static_initialize(fake_make_operation_to, fake_make_operation_to_length),
- f_macro_string_static_initialize(fake_make_operation_top, fake_make_operation_top_length),
- f_macro_string_static_initialize(fake_make_operation_touch, fake_make_operation_touch_length),
+ const f_string_static_t operations_name[] = {
+ f_macro_string_static_t_initialize(fake_make_operation_archive, fake_make_operation_archive_length),
+ f_macro_string_static_t_initialize(fake_make_operation_break, fake_make_operation_break_length),
+ f_macro_string_static_t_initialize(fake_make_operation_build, fake_make_operation_build_length),
+ f_macro_string_static_t_initialize(fake_make_operation_clean, fake_make_operation_clean_length),
+ f_macro_string_static_t_initialize(fake_make_operation_compile, fake_make_operation_compile_length),
+ f_macro_string_static_t_initialize(fake_make_operation_define, fake_make_operation_define_length),
+ f_macro_string_static_t_initialize(fake_make_operation_delete, fake_make_operation_delete_length),
+ f_macro_string_static_t_initialize(fake_make_operation_deletes, fake_make_operation_deletes_length),
+ f_macro_string_static_t_initialize(fake_make_operation_else, fake_make_operation_else_length),
+ f_macro_string_static_t_initialize(fake_make_operation_exit, fake_make_operation_exit_length),
+ f_macro_string_static_t_initialize(fake_make_operation_fail, fake_make_operation_fail_length),
+ f_macro_string_static_t_initialize(fake_make_operation_group, fake_make_operation_group_length),
+ f_macro_string_static_t_initialize(fake_make_operation_groups, fake_make_operation_groups_length),
+ f_macro_string_static_t_initialize(fake_make_operation_if, fake_make_operation_if_length),
+ f_macro_string_static_t_initialize(fake_make_operation_link, fake_make_operation_link_length),
+ f_macro_string_static_t_initialize(fake_make_operation_mode, fake_make_operation_mode_length),
+ f_macro_string_static_t_initialize(fake_make_operation_modes, fake_make_operation_modes_length),
+ f_macro_string_static_t_initialize(fake_make_operation_operate, fake_make_operation_operate_length),
+ f_macro_string_static_t_initialize(fake_make_operation_owner, fake_make_operation_owner_length),
+ f_macro_string_static_t_initialize(fake_make_operation_owners, fake_make_operation_owners_length),
+ f_macro_string_static_t_initialize(fake_make_operation_pop, fake_make_operation_pop_length),
+ f_macro_string_static_t_initialize(fake_make_operation_print, fake_make_operation_print_length),
+ f_macro_string_static_t_initialize(fake_make_operation_run, fake_make_operation_run_length),
+ f_macro_string_static_t_initialize(fake_make_operation_shell, fake_make_operation_shell_length),
+ f_macro_string_static_t_initialize(fake_make_operation_skeleton, fake_make_operation_skeleton_length),
+ f_macro_string_static_t_initialize(fake_make_operation_to, fake_make_operation_to_length),
+ f_macro_string_static_t_initialize(fake_make_operation_top, fake_make_operation_top_length),
+ f_macro_string_static_t_initialize(fake_make_operation_touch, fake_make_operation_touch_length),
};
- const f_string_range operations_range[] = {
+ const f_string_range_t operations_range[] = {
f_macro_string_range_initialize(fake_make_operation_archive_length),
f_macro_string_range_initialize(fake_make_operation_break_length),
f_macro_string_range_initialize(fake_make_operation_build_length),
bool success = F_true;
- const f_string_static *operation_name = 0;
+ const f_string_static_t *operation_name = 0;
- f_string_dynamics arguments[section->objects.used];
+ f_string_dynamics_t arguments[section->objects.used];
- f_array_length i = 0;
- f_array_length j = 0;
+ f_array_length_t i = 0;
+ f_array_length_t j = 0;
memset(operations, 0, sizeof(uint8_t) * section->objects.used);
- memset(arguments, 0, sizeof(f_string_dynamics) * section->objects.used);
+ memset(arguments, 0, sizeof(f_string_dynamics_t) * section->objects.used);
for (i = 0; i < section->objects.used; i++, *status = F_none) {
operation = 0;
}
for (i = 0; i < section->objects.used; i++) {
- f_macro_string_dynamics_delete_simple(arguments[i]);
+ f_macro_string_dynamics_t_delete_simple(arguments[i]);
} // for
section_stack->used--;
#endif // _di_fake_make_operate_section_
#ifndef _di_fake_make_operate_process_
- void fake_make_operate_process(const fake_data data, const f_string_range section_name, const uint8_t operation, const f_string_static operation_name, const f_string_dynamics arguments, const bool success, uint8_t *operation_if, fake_make_data *data_make, f_string_lengths *section_stack, f_status *status) {
+ void fake_make_operate_process(const fake_data_t data, const f_string_range_t section_name, const uint8_t operation, const f_string_static_t operation_name, const f_string_dynamics_t arguments, const bool success, uint8_t *operation_if, fake_make_data_t *data_make, f_string_lengths_t *section_stack, f_status_t *status) {
if (operation == fake_make_operation_type_archive) {
if (!arguments.used) {
const int recursion_max = operation == fake_make_operation_type_delete ? 0 : f_directory_descriptors_max;
struct stat file_stat;
- for (f_array_length i = 0; i < arguments.used; i++) {
+ for (f_array_length_t i = 0; i < arguments.used; i++) {
memset(&file_stat, 0, sizeof(struct stat));
*status = f_file_stat(arguments.array[i].string, F_false, &file_stat);
*status = fake_make_get_id_group(data, data_make->print, arguments.array[0], &id);
if (F_status_is_error(*status)) return;
- for (f_array_length i = 1; i < arguments.used; i++) {
+ for (f_array_length_t i = 1; i < arguments.used; i++) {
*status = f_file_role_change(arguments.array[i].string, -1, id, F_false);
if (F_status_is_error(*status)) {
*status = fake_make_get_id_group(data, data_make->print, arguments.array[0], &id);
if (F_status_is_error(*status)) return;
- for (f_array_length i = 1; i < arguments.used; i++) {
+ for (f_array_length_t i = 1; i < arguments.used; i++) {
// @todo: recursive.
*status = f_file_role_change(arguments.array[i].string, -1, id, F_false);
mode_t mode_file = 0;
- for (f_array_length i = 2; i < arguments.used; i++, mode_file = 0) {
+ for (f_array_length_t i = 2; i < arguments.used; i++, mode_file = 0) {
*status = f_file_mode_read(arguments.array[i].string, &mode_file);
if (F_status_is_error(*status)) {
mode_t mode = 0;
mode_t mode_file = 0;
- for (f_array_length i = 1; i < arguments.used; i++) {
+ for (f_array_length_t i = 1; i < arguments.used; i++) {
mode = 0;
*status = f_file_mode_read(arguments.array[i].string, &mode_file);
mode_t mode = 0;
mode_t mode_file = 0;
- for (f_array_length i = 1; i < arguments.used; i++) {
+ for (f_array_length_t i = 1; i < arguments.used; i++) {
// @todo recursive.
mode = 0;
return;
}
- f_array_length id_section = 0;
+ f_array_length_t id_section = 0;
for (; id_section < data_make->fakefile.used; id_section++) {
if (fl_string_dynamic_partial_compare_string(arguments.array[0].string, data_make->buffer, arguments.array[0].used, data_make->fakefile.array[id_section].name) == F_equal_to) {
*status = fake_make_get_id_owner(data, data_make->print, arguments.array[0], &id);
if (F_status_is_error(*status)) return;
- for (f_array_length i = 1; i < arguments.used; i++) {
+ for (f_array_length_t i = 1; i < arguments.used; i++) {
*status = f_file_role_change(arguments.array[i].string, id, -1, F_false);
if (F_status_is_error(*status)) {
fake_print_message_file(data, F_status_set_fine(*status), "f_file_role_change", arguments.array[i].string, "change owner of", F_true, F_true, data_make->print);
*status = fake_make_get_id_owner(data, data_make->print, arguments.array[0], &id);
if (F_status_is_error(*status)) return;
- for (f_array_length i = 1; i < arguments.used; i++) {
+ for (f_array_length_t i = 1; i < arguments.used; i++) {
// @todo recursive.
*status = f_file_role_change(arguments.array[i].string, id, -1, F_false);
if (F_status_is_error(*status)) {
}
if (operation == fake_make_operation_type_pop) {
- f_macro_string_dynamic_delete_simple(data_make->path.stack.array[data_make->path.stack.used - 1]);
+ f_macro_string_dynamic_t_delete_simple(data_make->path.stack.array[data_make->path.stack.used - 1]);
data_make->path.stack.used--;
}
if (operation == fake_make_operation_type_print) {
- for (f_array_length i = 0; i < arguments.used; i++) {
+ for (f_array_length_t i = 0; i < arguments.used; i++) {
f_print_string_dynamic(f_type_output, arguments.array[i]);
if (i + 1 < arguments.used) {
}
// clear stack, except for the project root.
- for (f_array_length i = 1; i < data_make->path.stack.used; i++) {
- f_macro_string_dynamic_delete_simple(data_make->path.stack.array[i]);
+ for (f_array_length_t i = 1; i < data_make->path.stack.used; i++) {
+ f_macro_string_dynamic_t_delete_simple(data_make->path.stack.array[i]);
} // for
data_make->path.stack.used = 1;
return;
}
- f_mode mode = f_mode_initialize;
+ f_mode_t mode = f_mode_t_initialize;
- f_macro_mode_set_default_umask(mode, data.umask);
+ f_macro_mode_t_set_default_umask(mode, data.umask);
- for (f_array_length i = 1; i < arguments.used; i++) {
+ for (f_array_length_t i = 1; i < arguments.used; i++) {
if (fl_string_dynamic_compare_string(fake_make_operation_argument_file, arguments.array[0], fake_make_operation_argument_file_length) == F_equal_to) {
*status = f_file_touch(arguments.array[i].string, mode.regular, F_false);
#endif // _di_fake_make_operate_process_
#ifndef _di_fake_make_operate_process_execute_
- f_return_status fake_make_operate_process_execute(const fake_data data, const f_string_static program, const f_string_statics arguments, const bool as_shell, fake_make_data *data_make) {
- f_status status = F_none;
+ f_return_status fake_make_operate_process_execute(const fake_data_t data, const f_string_static_t program, const f_string_statics_t arguments, const bool as_shell, fake_make_data_t *data_make) {
+ f_status_t status = F_none;
// reset the environment.
- for (f_array_length i = 0; i < data_make->environment.names.used; i++) {
+ for (f_array_length_t i = 0; i < data_make->environment.names.used; i++) {
data_make->environment.names.array[i].used = 0;
data_make->environment.values.array[i].used = 0;
} // for
data_make->environment.values.used = 0;
// load all environment variables found.
- for (f_array_length i = 0; i < data_make->setting_build.environment.used; i++) {
+ for (f_array_length_t i = 0; i < data_make->setting_build.environment.used; i++) {
// pre-allocate name and value if necessary.
if (data_make->environment.names.used + 1 > data_make->environment.names.size) {
if (data.verbosity == fake_verbosity_verbose) {
printf("%s", program.string);
- for (f_array_length i = 0; i < arguments.used; i++) {
+ for (f_array_length_t i = 0; i < arguments.used; i++) {
if (arguments.array[i].used == 0) continue;
printf(" %s", arguments.array[i].string);
#endif // _di_fake_make_operate_process_execute_
#ifndef _di_fake_make_operate_process_return_
- void fake_make_operate_process_return(const fake_data data, const int return_code, fake_make_data *data_make, f_status *status) {
- f_status status2 = F_none;
+ void fake_make_operate_process_return(const fake_data_t data, const int return_code, fake_make_data_t *data_make, f_status_t *status) {
+ f_status_t status2 = F_none;
data_make->setting_make.parameter.array[0].value.array[0].used = 0;
}
else {
if (return_code) {
- f_string_dynamic number = f_string_dynamic_initialize;
+ f_string_dynamic_t number = f_string_dynamic_t_initialize;
status2 = f_conversion_number_signed_to_string(return_code, 10, &number);
if (F_status_is_error(status2)) {
fake_print_message(data, F_status_set_fine(*status), "f_conversion_number_signed_to_string", F_true, data_make->print);
- f_macro_string_dynamic_delete_simple(number);
+ f_macro_string_dynamic_t_delete_simple(number);
return;
}
status2 = fl_string_dynamic_append(number, &data_make->setting_make.parameter.array[0].value.array[0]);
- f_macro_string_dynamic_delete_simple(number);
+ f_macro_string_dynamic_t_delete_simple(number);
}
else {
status2 = fl_string_append("0", 1, &data_make->setting_make.parameter.array[0].value.array[0]);
#endif // _di_fake_make_operate_process_return_
#ifndef _di_fake_make_operate_process_run_
- f_return_status fake_make_operate_process_run(const fake_data data, const f_string_statics arguments, const bool as_shell, fake_make_data *data_make) {
- const f_string_static *program = &arguments.array[0];
+ f_return_status fake_make_operate_process_run(const fake_data_t data, const f_string_statics_t arguments, const bool as_shell, fake_make_data_t *data_make) {
+ const f_string_static_t *program = &arguments.array[0];
- f_status status = F_none;
- f_string_dynamics args = f_string_dynamics_initialize;
+ f_status_t status = F_none;
+ f_string_dynamics_t args = f_string_dynamics_t_initialize;
if (arguments.used > 1) {
f_macro_string_dynamics_new(status, args, arguments.used - 1);
return status;
}
- for (f_array_length i = 0; i < args.size; i++) {
+ for (f_array_length_t i = 0; i < args.size; i++) {
status = fl_string_dynamic_append(arguments.array[i + 1], &args.array[i]);
if (F_status_is_error(status)) {
fake_print_message(data, F_status_set_fine(status), "fl_string_dynamic_append", F_true, data_make->print);
- f_macro_string_dynamics_delete_simple(args);
+ f_macro_string_dynamics_t_delete_simple(args);
return status;
}
if (F_status_is_error(status)) {
fake_print_message(data, F_status_set_fine(status), "fl_string_dynamic_terminate", F_true, data_make->print);
- f_macro_string_dynamics_delete_simple(args);
+ f_macro_string_dynamics_t_delete_simple(args);
return status;
}
status = fake_make_operate_process_execute(data, *program, args, as_shell, data_make);
- f_macro_string_dynamics_delete_simple(args);
+ f_macro_string_dynamics_t_delete_simple(args);
return status;
}
#endif // _di_fake_make_operate_process_run_
#ifndef _di_fake_make_operate_validate_
- void fake_make_operate_validate(const fake_data data, const f_string_range section_name, const f_array_length operation, const f_string_static operation_name, const f_string_dynamics arguments, uint8_t *operation_if, fake_make_data *data_make, f_string_lengths *section_stack, f_status *status) {
+ void fake_make_operate_validate(const fake_data_t data, const f_string_range_t section_name, const f_array_length_t operation, const f_string_static_t operation_name, const f_string_dynamics_t arguments, uint8_t *operation_if, fake_make_data_t *data_make, f_string_lengths_t *section_stack, f_status_t *status) {
if (F_status_is_error(*status)) return;
if (operation == fake_make_operation_type_archive || operation == fake_make_operation_type_run || operation == fake_make_operation_type_shell) {
}
else if (arguments.used) {
if (arguments.array[0].used) {
- f_status status_file = f_file_is(arguments.array[0].string, f_file_type_regular);
+ f_status_t status_file = f_file_is(arguments.array[0].string, f_file_type_regular);
if (status_file == F_file_found_not) {
if (data.verbosity != fake_verbosity_quiet && data_make->print.to) {
if (operation == fake_make_operation_type_delete || operation == fake_make_operation_type_deletes) {
if (arguments.used) {
- for (f_array_length i = 0; i < arguments.used; i++) {
+ for (f_array_length_t i = 0; i < arguments.used; i++) {
*status = fake_make_assure_inside_project(data, arguments.array[i], data_make);
if (F_status_is_error(*status)) {
if (operation == fake_make_operation_type_group || operation == fake_make_operation_type_groups || operation == fake_make_operation_type_mode || operation == fake_make_operation_type_modes || operation == fake_make_operation_type_owner || operation == fake_make_operation_type_owners) {
if (arguments.used > 1) {
- f_status status_file = F_none;
+ f_status_t status_file = F_none;
- for (f_array_length i = 1; i < arguments.used; i++) {
+ for (f_array_length_t i = 1; i < arguments.used; i++) {
status_file = f_file_is(arguments.array[i].string, f_file_type_regular);
if (status_file == F_file_found_not) {
}
if (arguments.used > 0) {
- const f_string if_type_strings[] = {
+ const f_string_t if_type_strings[] = {
fake_make_operation_argument_if_defined,
fake_make_operation_argument_if_equal,
fake_make_operation_argument_if_equal_not,
fake_make_operation_argument_if_success,
};
- const f_string_length if_type_lengths[] = {
+ const f_string_length_t if_type_lengths[] = {
fake_make_operation_argument_if_defined_length,
fake_make_operation_argument_if_equal_length,
fake_make_operation_argument_if_equal_not_length,
1,
};
- f_string_length i = 0;
+ f_string_length_t i = 0;
for (; i < 14; i++) {
if (fl_string_dynamic_compare_string(if_type_strings[i], arguments.array[0], if_type_lengths[i]) == F_equal_to) {
}
if (i < arguments.used) {
- for (f_status status_file = F_none; i < arguments.used; i++) {
+ for (f_status_t status_file = F_none; i < arguments.used; i++) {
status_file = fake_make_assure_inside_project(data, arguments.array[i], data_make);
if (F_status_is_error(status_file)) {
}
if (*operation_if == fake_make_operation_if_type_if_greater || *operation_if == fake_make_operation_if_type_if_greater_equal || *operation_if == fake_make_operation_if_type_if_less || *operation_if == fake_make_operation_if_type_if_less_equal) {
- f_status status_number = F_none;
- f_string_range range = f_string_range_initialize;
- f_number_unsigned number = 0;
+ f_status_t status_number = F_none;
+ f_string_range_t range = f_string_range_initialize;
+ f_number_unsigned_t number = 0;
bool is_negative = F_false;
// @fixme there needs to handle converting numbers with decimals (like 1.01), perhaps operate on them as strings or provide a special processor.
if (data.verbosity != fake_verbosity_quiet && data_make->print.to) {
printf("%c", f_string_eol[0]);
- if (number > f_type_number_size_unsigned) {
+ if (number > f_number_t_size_unsigned) {
fl_color_print(data_make->print.to, data_make->print.context, data.context.reset, "%s: The number '", data_make->print.prefix);
fl_color_print(data_make->print.to, data.context.notable, data.context.reset, "%c%s", arguments.array[i].string);
- fl_color_print_line(data_make->print.to, data_make->print.context, data.context.reset, "' may only be between the ranges -%llu to %llu.", f_type_number_size_unsigned, f_type_number_size_unsigned);
+ fl_color_print_line(data_make->print.to, data_make->print.context, data.context.reset, "' may only be between the ranges -%llu to %llu.", f_number_t_size_unsigned, f_number_t_size_unsigned);
}
else {
fl_color_print(data_make->print.to, data_make->print.context, data.context.reset, "%s: Invalid or unsupported number provided '", data_make->print.prefix);
*status = F_status_set_error(F_failure);
}
else if (arguments.used == 1) {
- f_array_length id_section = 0;
+ f_array_length_t id_section = 0;
for (; id_section < data_make->fakefile.used; id_section++) {
if (fl_string_dynamic_partial_compare_string(arguments.array[0].string, data_make->buffer, arguments.array[0].used, data_make->fakefile.array[id_section].name) == F_equal_to) {
fl_color_print_line(data_make->print.to, data_make->print.context, data.context.reset, "' was found.");
}
else {
- for (f_array_length i = 0; i < section_stack->used; i++) {
+ for (f_array_length_t i = 0; i < section_stack->used; i++) {
if (section_stack->array[i] == id_section) {
printf("%c", f_string_eol[0]);
fl_color_print(data_make->print.to, data_make->print.context, data.context.reset, "%s: The section operation '", data_make->print.prefix);
}
else if (arguments.used) {
if (arguments.array[0].used) {
- f_status status_file = f_file_is(arguments.array[0].string, f_file_type_directory);
+ f_status_t status_file = f_file_is(arguments.array[0].string, f_file_type_directory);
if (status_file == F_file_found_not) {
if (data.verbosity != fake_verbosity_quiet && data_make->print.to) {
}
}
- for (f_array_length i = 1; i < arguments.used; i++) {
+ for (f_array_length_t i = 1; i < arguments.used; i++) {
*status = fake_make_assure_inside_project(data, arguments.array[i], data_make);
if (F_status_is_error(*status)) {
// @todo warning
#endif // _di_fake_make_operate_validate_
#ifndef _di_fake_make_operate_validate_define_name_
- f_return_status fake_make_operate_validate_define_name(const f_string_static name) {
+ f_return_status fake_make_operate_validate_define_name(const f_string_static_t name) {
if (!name.used) return F_none;
if (!(isalpha(name.string[0]) || name.string[0] == '_')) {
return F_false;
}
- for (f_string_length i = 0; i < name.used; i++) {
+ for (f_string_length_t i = 0; i < name.used; i++) {
if (!(isalnum(name.string[i]) || name.string[i] == '_')) {
return F_false;
}
#endif // _di_fake_make_operate_validate_define_name_
#ifndef _di_fake_make_path_relative_
- f_return_status fake_make_path_relative(const fake_data data, const f_string_static path, fake_make_data *data_make) {
+ f_return_status fake_make_path_relative(const fake_data_t data, const f_string_static_t path, fake_make_data_t *data_make) {
data_make->path_cache.used = 0;
if (!path.used || path.used == data_make->path.stack.array[0].used) {
return F_status_set_error(F_failure);
}
- f_string_range range = f_string_range_initialize;
+ f_string_range_t range = f_string_range_initialize;
range.start = data_make->path.stack.array[0].used + 1;
range.stop = range.start + (path.used - range.start) - 1;
- f_status status = fl_string_dynamic_partial_append(path, range, &data_make->path_cache);
+ f_status_t status = fl_string_dynamic_partial_append(path, range, &data_make->path_cache);
if (F_status_is_error(status)) return status;
status = fl_string_dynamic_terminate(&data_make->path_cache);
#define fake_make_section_stack_max 8192 // maximum stack call depth.
#endif // _di_fake_make_section_
-#ifndef _di_fake_make_setting_
+#ifndef _di_fake_make_setting_t_
typedef struct {
bool load_build;
uint8_t fail;
- f_string_map_multis parameter;
- } fake_make_setting;
+ f_string_map_multis_t parameter;
+ } fake_make_setting_t;
- #define fake_make_setting_initialize { \
+ #define fake_make_setting_t_initialize { \
0, \
0, \
- f_string_map_multis_initialize, \
+ f_string_map_multis_t_initialize, \
}
- #define fake_macro_make_setting_delete_simple(setting) \
- f_macro_string_map_multis_delete_simple(setting.parameter)
+ #define fake_macro_make_setting_t_delete_simple(setting) \
+ f_macro_string_map_multis_t_delete_simple(setting.parameter)
#define fake_make_setting_compiler "compiler"
#define fake_make_setting_define "define"
#define fake_make_setting_load_build_length 10
#define fake_make_setting_parameter_length 9
#define fake_make_setting_return_length 6
-#endif // _di_fake_make_setting_
+#endif // _di_fake_make_setting_t_
#ifndef _di_fake_make_operation_
#define fake_make_operation_archive "archive"
#endif // _di_fake_make_operation_
// @todo each one of these should be made available to be passed to the program as "$parameter_define[X]" for multi-value (define) or "$parameter_no_color" for single-value (no_color).
-#ifndef _di_fake_make_parameter_
+#ifndef _di_fake_make_parameter_t_
#define fake_make_parameter_variable_build "build"
#define fake_make_parameter_variable_dark "dark"
#define fake_make_parameter_variable_data "data"
#define fake_make_file_parameter_variable_work_length 4
typedef struct {
- f_string_dynamics build;
- f_string_dynamics dark;
- f_string_dynamics data;
- f_string_dynamics define;
- f_string_dynamics light;
- f_string_dynamics mode;
- f_string_dynamics no_color;
- f_string_dynamics process;
- f_string_dynamics quiet;
- f_string_dynamics settings;
- f_string_dynamics sources;
- f_string_dynamics verbose;
- f_string_dynamics work;
- } fake_make_parameter;
-
- #define fake_make_parameter_initialize { \
- f_string_dynamics_initialize, \
- f_string_dynamics_initialize, \
- f_string_dynamics_initialize, \
- f_string_dynamics_initialize, \
- f_string_dynamics_initialize, \
- f_string_dynamics_initialize, \
- f_string_dynamics_initialize, \
- f_string_dynamics_initialize, \
- f_string_dynamics_initialize, \
- f_string_dynamics_initialize, \
- f_string_dynamics_initialize, \
- f_string_dynamics_initialize, \
- f_string_dynamics_initialize, \
+ f_string_dynamics_t build;
+ f_string_dynamics_t dark;
+ f_string_dynamics_t data;
+ f_string_dynamics_t define;
+ f_string_dynamics_t light;
+ f_string_dynamics_t mode;
+ f_string_dynamics_t no_color;
+ f_string_dynamics_t process;
+ f_string_dynamics_t quiet;
+ f_string_dynamics_t settings;
+ f_string_dynamics_t sources;
+ f_string_dynamics_t verbose;
+ f_string_dynamics_t work;
+ } fake_make_parameter_t;
+
+ #define fake_make_parameter_t_initialize { \
+ f_string_dynamics_t_initialize, \
+ f_string_dynamics_t_initialize, \
+ f_string_dynamics_t_initialize, \
+ f_string_dynamics_t_initialize, \
+ f_string_dynamics_t_initialize, \
+ f_string_dynamics_t_initialize, \
+ f_string_dynamics_t_initialize, \
+ f_string_dynamics_t_initialize, \
+ f_string_dynamics_t_initialize, \
+ f_string_dynamics_t_initialize, \
+ f_string_dynamics_t_initialize, \
+ f_string_dynamics_t_initialize, \
+ f_string_dynamics_t_initialize, \
}
#define fake_macro_make_parameter_delete_simple(parameter) \
- f_macro_string_dynamics_delete_simple(parameter.build) \
- f_macro_string_dynamics_delete_simple(parameter.dark) \
- f_macro_string_dynamics_delete_simple(parameter.data) \
- f_macro_string_dynamics_delete_simple(parameter.define) \
- f_macro_string_dynamics_delete_simple(parameter.light) \
- f_macro_string_dynamics_delete_simple(parameter.mode) \
- f_macro_string_dynamics_delete_simple(parameter.no_color) \
- f_macro_string_dynamics_delete_simple(parameter.process) \
- f_macro_string_dynamics_delete_simple(parameter.quiet) \
- f_macro_string_dynamics_delete_simple(parameter.settings) \
- f_macro_string_dynamics_delete_simple(parameter.sources) \
- f_macro_string_dynamics_delete_simple(parameter.verbose) \
- f_macro_string_dynamics_delete_simple(parameter.work)
-#endif // _di_fake_make_parameter_
-
-#ifndef _di_fake_make_path_
+ f_macro_string_dynamics_t_delete_simple(parameter.build) \
+ f_macro_string_dynamics_t_delete_simple(parameter.dark) \
+ f_macro_string_dynamics_t_delete_simple(parameter.data) \
+ f_macro_string_dynamics_t_delete_simple(parameter.define) \
+ f_macro_string_dynamics_t_delete_simple(parameter.light) \
+ f_macro_string_dynamics_t_delete_simple(parameter.mode) \
+ f_macro_string_dynamics_t_delete_simple(parameter.no_color) \
+ f_macro_string_dynamics_t_delete_simple(parameter.process) \
+ f_macro_string_dynamics_t_delete_simple(parameter.quiet) \
+ f_macro_string_dynamics_t_delete_simple(parameter.settings) \
+ f_macro_string_dynamics_t_delete_simple(parameter.sources) \
+ f_macro_string_dynamics_t_delete_simple(parameter.verbose) \
+ f_macro_string_dynamics_t_delete_simple(parameter.work)
+#endif // _di_fake_make_parameter_t_
+
+#ifndef _di_fake_make_path_t_
typedef struct {
int top;
int current;
- f_string_dynamics stack;
- } fake_make_path;
+ f_string_dynamics_t stack;
+ } fake_make_path_t;
- #define fake_make_path_initialize { \
+ #define fake_make_path_t_initialize { \
0, \
0, \
- f_string_dynamics_initialize, \
+ f_string_dynamics_t_initialize, \
}
#define fake_macro_make_path_delete_simple(path) \
- f_macro_string_dynamics_delete_simple(path.stack)
-#endif // _di_fake_make_path_
+ f_macro_string_dynamics_t_delete_simple(path.stack)
+#endif // _di_fake_make_path_t_
-#ifndef _di_fake_make_print_
+#ifndef _di_fake_make_print_t_
typedef struct {
const char *prefix;
- f_string_static context;
+ f_string_static_t context;
FILE *to;
- } fake_make_print;
+ } fake_make_print_t;
- #define fake_make_print_initialize { \
+ #define fake_make_print_t_initialize { \
0, \
- f_string_static_initialize, \
+ f_string_static_t_initialize, \
0, \
}
- #define fake_macro_make_print_initialize(prefix, context, to) { prefix, context, to }
+ #define fake_macro_make_print_t_initialize(prefix, context, to) { prefix, context, to }
#define fake_make_print_error "ERROR"
#define fake_make_print_warning "WARNING"
#define fake_make_print_error_length 5
#define fake_make_print_warning_length 7
-#endif // _di_fake_make_print_
+#endif // _di_fake_make_print_t_
-#ifndef _di_fake_make_data_
+#ifndef _di_fake_make_data_t_
typedef struct {
- fake_build_setting setting_build;
- fake_make_setting setting_make;
+ fake_build_setting_t setting_build;
+ fake_make_setting_t setting_make;
- fake_environment environment;
+ fake_environment_t environment;
- fake_make_parameter parameter;
- fake_make_path path;
- fake_make_print print;
+ fake_make_parameter_t parameter;
+ fake_make_path_t path;
+ fake_make_print_t print;
- f_fss_nameds fakefile;
+ f_fss_nameds_t fakefile;
- f_string_dynamic buffer;
- f_string_dynamic path_cache;
+ f_string_dynamic_t buffer;
+ f_string_dynamic_t path_cache;
- f_array_length main;
- } fake_make_data;
+ f_array_length_t main;
+ } fake_make_data_t;
- #define fake_make_data_initialize { \
- fake_build_setting_initialize, \
- fake_make_setting_initialize, \
- fake_environment_initialize, \
- fake_make_parameter_initialize, \
- fake_make_path_initialize, \
- fake_make_print_initialize, \
- f_fss_nameds_initialize, \
- f_string_dynamic_initialize, \
- f_string_dynamic_initialize, \
+ #define fake_make_data_t_initialize { \
+ fake_build_setting_t_initialize, \
+ fake_make_setting_t_initialize, \
+ fake_environment_t_initialize, \
+ fake_make_parameter_t_initialize, \
+ fake_make_path_t_initialize, \
+ fake_make_print_t_initialize, \
+ f_fss_nameds_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
0, \
}
- #define fake_macro_make_data_delete_simple(data) \
- fake_macro_build_setting_delete_simple(data.setting_build) \
- fake_macro_make_setting_delete_simple(data.setting_make) \
- fake_macro_environment_delete_simple(data.environment) \
+ #define fake_macro_make_data_t_delete_simple(data) \
+ fake_macro_build_setting_t_delete_simple(data.setting_build) \
+ fake_macro_make_setting_t_delete_simple(data.setting_make) \
+ fake_macro_environment_t_delete_simple(data.environment) \
fake_macro_make_parameter_delete_simple(data.parameter) \
fake_macro_make_path_delete_simple(data.path) \
- f_macro_fss_nameds_delete_simple(data.fakefile) \
- f_macro_string_dynamic_delete_simple(data.buffer) \
- f_macro_string_dynamic_delete_simple(data.path_cache)
-#endif // _di_fake_make_data_
+ f_macro_fss_nameds_t_delete_simple(data.fakefile) \
+ f_macro_string_dynamic_t_delete_simple(data.buffer) \
+ f_macro_string_dynamic_t_delete_simple(data.path_cache)
+#endif // _di_fake_make_data_t_
/**
* Assure that a path is within the project root path.
* Status codes (with error bit) are returned on any problem.
*/
#ifndef _di_fake_make_assure_inside_project_
- extern f_return_status fake_make_assure_inside_project(const fake_data data, const f_string_static path, fake_make_data *data_make) f_gcc_attribute_visibility_internal;
+ extern f_return_status fake_make_assure_inside_project(const fake_data_t data, const f_string_static_t path, fake_make_data_t *data_make) f_gcc_attribute_visibility_internal;
#endif // _di_fake_make_assure_inside_project_
/**
* Status codes (with error bit) are returned on any problem.
*/
#ifndef _di_fake_make_get_id_group_
- f_return_status fake_make_get_id_group(const fake_data data, const fake_make_print print, const f_string_static buffer, gid_t *id) f_gcc_attribute_visibility_internal;
+ f_return_status fake_make_get_id_group(const fake_data_t data, const fake_make_print_t print, const f_string_static_t buffer, gid_t *id) f_gcc_attribute_visibility_internal;
#endif // _di_fake_make_get_id_group_
/**
* Status codes (with error bit) are returned on any problem.
*/
#ifndef _di_fake_make_get_id_mode_
- f_return_status fake_make_get_id_mode(const fake_data data, const fake_make_print print, const f_string_static buffer, f_file_mode *mode, uint8_t *replace) f_gcc_attribute_visibility_internal;
+ f_return_status fake_make_get_id_mode(const fake_data_t data, const fake_make_print_t print, const f_string_static_t buffer, f_file_mode *mode, uint8_t *replace) f_gcc_attribute_visibility_internal;
#endif // _di_fake_make_get_id_mode_
/**
* Status codes (with error bit) are returned on any problem.
*/
#ifndef _di_fake_make_get_id_owner_
- f_return_status fake_make_get_id_owner(const fake_data data, const fake_make_print print, const f_string_static buffer, uid_t *id) f_gcc_attribute_visibility_internal;
+ f_return_status fake_make_get_id_owner(const fake_data_t data, const fake_make_print_t print, const f_string_static_t buffer, uid_t *id) f_gcc_attribute_visibility_internal;
#endif // _di_fake_make_get_id_owner_
/**
* @see fake_build_load_setting()
*/
#ifndef _di_fake_make_load_fakefile_
- extern void fake_make_load_fakefile(const fake_data data, fake_make_data *data_make, f_status *status) f_gcc_attribute_visibility_internal;
+ extern void fake_make_load_fakefile(const fake_data_t data, fake_make_data_t *data_make, f_status_t *status) f_gcc_attribute_visibility_internal;
#endif // _di_fake_make_load_fakefile_
/**
* Status codes (with error bit) are returned on any problem.
*/
#ifndef _di_fake_make_operate_
- extern f_return_status fake_make_operate(const fake_data data) f_gcc_attribute_visibility_internal;
+ extern f_return_status fake_make_operate(const fake_data_t data) f_gcc_attribute_visibility_internal;
#endif // _di_fake_make_operate_
/**
* Status codes (with error bit) are returned on any problem.
*/
#ifndef _di_fake_make_operate_expand_
- extern void fake_make_operate_expand(const fake_data data, const f_string_range section_name, const f_array_length operation, const f_string_static operation_name, const f_fss_content content, const f_fss_quoteds quoteds, fake_make_data *data_make, f_string_dynamics *arguments, f_status *status) f_gcc_attribute_visibility_internal;
+ extern void fake_make_operate_expand(const fake_data_t data, const f_string_range_t section_name, const f_array_length_t operation, const f_string_static_t operation_name, const f_fss_content_t content, const f_fss_quoteds_t quoteds, fake_make_data_t *data_make, f_string_dynamics_t *arguments, f_status_t *status) f_gcc_attribute_visibility_internal;
#endif // _di_fake_make_operate_expand_
/**
* Status codes (with error bit) are returned on any problem.
*/
#ifndef _di_fake_make_operate_expand_environment_
- extern f_return_status fake_make_operate_expand_environment(const fake_data data, const f_fss_quoted quoted, const f_string_range range_name, fake_make_data *data_make, f_string_dynamics *arguments) f_gcc_attribute_visibility_internal;
+ extern f_return_status fake_make_operate_expand_environment(const fake_data_t data, const f_fss_quoted_t quoted, const f_string_range_t range_name, fake_make_data_t *data_make, f_string_dynamics_t *arguments) f_gcc_attribute_visibility_internal;
#endif // _di_fake_make_operate_expand_environment_
/**
* Status codes (with error bit) are returned on any problem.
*/
#ifndef _di_fake_make_operate_expand_build_
- extern f_return_status fake_make_operate_expand_build(const fake_data data, const f_fss_quoted quoted, const f_string_range range_name, fake_make_data *data_make, f_string_dynamics *arguments) f_gcc_attribute_visibility_internal;
+ extern f_return_status fake_make_operate_expand_build(const fake_data_t data, const f_fss_quoted_t quoted, const f_string_range_t range_name, fake_make_data_t *data_make, f_string_dynamics_t *arguments) f_gcc_attribute_visibility_internal;
#endif // _di_fake_make_operate_expand_build_
/**
* F_recurse (with error bit set) is returned if unable to recurse to another operation section (usually max stack depth reached).
*/
#ifndef _di_fake_make_operate_section_
- void fake_make_operate_section(const fake_data data, const f_array_length id_section, fake_make_data *data_make, f_string_lengths *section_stack, f_status *status) f_gcc_attribute_visibility_internal;
+ void fake_make_operate_section(const fake_data_t data, const f_array_length_t id_section, fake_make_data_t *data_make, f_string_lengths_t *section_stack, f_status_t *status) f_gcc_attribute_visibility_internal;
#endif // _di_fake_make_operate_section_
/**
* Status codes (with error bit) are returned on any problem.
*/
#ifndef _di_fake_make_operate_process_
- extern void fake_make_operate_process(const fake_data data, const f_string_range section_name, const uint8_t operation, const f_string_static operation_name, const f_string_dynamics arguments, const bool success, uint8_t *operation_if, fake_make_data *data_make, f_string_lengths *section_stack, f_status *status) f_gcc_attribute_visibility_internal;
+ extern void fake_make_operate_process(const fake_data_t data, const f_string_range_t section_name, const uint8_t operation, const f_string_static_t operation_name, const f_string_dynamics_t arguments, const bool success, uint8_t *operation_if, fake_make_data_t *data_make, f_string_lengths_t *section_stack, f_status_t *status) f_gcc_attribute_visibility_internal;
#endif // _di_fake_make_operate_process_
/**
* Status codes (with error bit) are returned on any problem.
*/
#ifndef _di_fake_make_operate_process_execute_
- extern f_return_status fake_make_operate_process_execute(const fake_data data, const f_string_static program, const f_string_statics arguments, const bool as_shell, fake_make_data *data_make) f_gcc_attribute_visibility_internal;
+ extern f_return_status fake_make_operate_process_execute(const fake_data_t data, const f_string_static_t program, const f_string_statics_t arguments, const bool as_shell, fake_make_data_t *data_make) f_gcc_attribute_visibility_internal;
#endif // _di_fake_make_operate_process_execute_
/**
* Status codes (with error bit) are returned on any problem.
*/
#ifndef _di_fake_make_operate_process_return_
- extern void fake_make_operate_process_return(const fake_data data, const int return_code, fake_make_data *data_make, f_status *status) f_gcc_attribute_visibility_internal;
+ extern void fake_make_operate_process_return(const fake_data_t data, const int return_code, fake_make_data_t *data_make, f_status_t *status) f_gcc_attribute_visibility_internal;
#endif // _di_fake_make_operate_process_return_
/**
* Status codes (with error bit) are returned on any problem.
*/
#ifndef _di_fake_make_operate_process_run_
- extern f_return_status fake_make_operate_process_run(const fake_data data, const f_string_statics arguments, const bool as_shell, fake_make_data *data_make) f_gcc_attribute_visibility_internal;
+ extern f_return_status fake_make_operate_process_run(const fake_data_t data, const f_string_statics_t arguments, const bool as_shell, fake_make_data_t *data_make) f_gcc_attribute_visibility_internal;
#endif // _di_fake_make_operate_process_run_
/**
* Status codes (with error bit) are returned on any problem.
*/
#ifndef _di_fake_make_operate_validate_
- extern void fake_make_operate_validate(const fake_data data, const f_string_range section_name, const f_array_length operation, const f_string_static operation_name, const f_string_dynamics arguments, uint8_t *operation_if, fake_make_data *data_make, f_string_lengths *section_stack, f_status *status) f_gcc_attribute_visibility_internal;
+ extern void fake_make_operate_validate(const fake_data_t data, const f_string_range_t section_name, const f_array_length_t operation, const f_string_static_t operation_name, const f_string_dynamics_t arguments, uint8_t *operation_if, fake_make_data_t *data_make, f_string_lengths_t *section_stack, f_status_t *status) f_gcc_attribute_visibility_internal;
#endif // _di_fake_make_operate_validate_
/**
* F_none if there is no string to validate (used = 0).
*/
#ifndef _di_fake_make_operate_validate_define_name_
- extern f_return_status fake_make_operate_validate_define_name(const f_string_static name) f_gcc_attribute_visibility_internal;
+ extern f_return_status fake_make_operate_validate_define_name(const f_string_static_t name) f_gcc_attribute_visibility_internal;
#endif // _di_fake_make_operate_validate_define_name_
/**
* Status codes (with error bit) are returned on any problem.
*/
#ifndef _di_fake_make_path_relative_
- extern f_return_status fake_make_path_relative(const fake_data data, const f_string_static path, fake_make_data *data_make) f_gcc_attribute_visibility_internal;
+ extern f_return_status fake_make_path_relative(const fake_data_t data, const f_string_static_t path, fake_make_data_t *data_make) f_gcc_attribute_visibility_internal;
#endif // _di_fake_make_path_relative_
#ifdef __cplusplus
#endif
#ifndef _di_fake_print_error_
- f_return_status fake_print_error(const fake_data data, const f_status status, const f_string function, const bool fallback) {
- const fake_make_print print = fake_macro_make_print_initialize(fake_make_print_error, data.context.error, f_type_error);
+ f_return_status fake_print_error(const fake_data_t data, const f_status_t status, const f_string_t function, const bool fallback) {
+ const fake_make_print_t print = fake_macro_make_print_t_initialize(fake_make_print_error, data.context.error, f_type_error);
return fake_print_message(data, status, function, fallback, print);
}
#endif // _di_fake_print_error_
#ifndef _di_fake_print_error_build_operation_file_
- bool fake_print_error_build_operation_file(const fake_data data, const f_status status, const f_string function, const f_string operation, const f_string how, const f_string source, const f_string destination, const bool fallback) {
+ bool fake_print_error_build_operation_file(const fake_data_t data, const f_status_t status, const f_string_t function, const f_string_t operation, const f_string_t how, const f_string_t source, const f_string_t destination, const bool fallback) {
if (status == F_file_found_not) {
if (data.verbosity != fake_verbosity_quiet) {
#endif // _di_fake_print_error_build_operation_file_
#ifndef _di_fake_print_error_file_
- bool fake_print_error_file(const fake_data data, const f_status status, const f_string function, const f_string name, const f_string operation, const bool is_file, const bool fallback) {
- const fake_make_print print = fake_macro_make_print_initialize(fake_make_print_error, data.context.error, f_type_error);
+ bool fake_print_error_file(const fake_data_t data, const f_status_t status, const f_string_t function, const f_string_t name, const f_string_t operation, const bool is_file, const bool fallback) {
+ const fake_make_print_t print = fake_macro_make_print_t_initialize(fake_make_print_error, data.context.error, f_type_error);
return fake_print_message_file(data, status, function, name, operation, is_file, fallback, print);
}
#endif // _di_fake_print_error_file_
#ifndef _di_fake_print_error_fss
- bool fake_print_error_fss(const fake_data data, const f_status status, const f_string function, const f_string path_file, const f_string_range range, const bool fallback) {
+ bool fake_print_error_fss(const fake_data_t data, const f_status_t status, const f_string_t function, const f_string_t path_file, const f_string_range_t range, const bool fallback) {
if (status == F_file_found_not) {
if (data.verbosity != fake_verbosity_quiet) {
#endif // _di_fake_print_error_fss
#ifndef _di_fake_print_error_parameter_missing_value_
- void fake_print_error_parameter_missing_value(const fake_data data, const f_string parameter) {
+ void fake_print_error_parameter_missing_value(const fake_data_t data, const f_string_t parameter) {
if (data.verbosity == fake_verbosity_quiet) return;
fprintf(f_type_error, "%c", f_string_eol[0]);
#endif // _di_fake_print_error_parameter_missing_value_
#ifndef _di_fake_print_error_parameter_too_many_
- void fake_print_error_parameter_too_many(const fake_data data, const f_string parameter) {
+ void fake_print_error_parameter_too_many(const fake_data_t data, const f_string_t parameter) {
if (data.verbosity == fake_verbosity_quiet) return;
fprintf(f_type_error, "%c", f_string_eol[0]);
#endif // _di_fake_print_error_parameter_too_many_
#ifndef _di_fake_print_message_
- f_return_status fake_print_message(const fake_data data, const f_status status, const f_string function, const bool fallback, const fake_make_print print) {
+ f_return_status fake_print_message(const fake_data_t data, const f_status_t status, const f_string_t function, const bool fallback, const fake_make_print_t print) {
if (status == F_parameter) {
if (data.verbosity != fake_verbosity_quiet) {
#endif // _di_fake_print_message_
#ifndef _di_fake_print_message_file_
- bool fake_print_message_file(const fake_data data, const f_status status, const f_string function, const f_string name, const f_string operation, const bool is_file, const bool fallback, const fake_make_print print) {
- const f_string file_or_directory = is_file ? "file" : "directory";
+ bool fake_print_message_file(const fake_data_t data, const f_status_t status, const f_string_t function, const f_string_t name, const f_string_t operation, const bool is_file, const bool fallback, const fake_make_print_t print) {
+ const f_string_t file_or_directory = is_file ? "file" : "directory";
if (status == F_file_found_not) {
if (data.verbosity != fake_verbosity_quiet) {
#endif // _di_fake_print_message_file_
#ifndef _di_fake_print_message_section_operation_failed_
- void fake_print_message_section_operation_failed(const fake_data data, const f_string_static buffer, const f_string_range section_name, const f_string_range operation_name, const fake_make_print print) {
+ void fake_print_message_section_operation_failed(const fake_data_t data, const f_string_static_t buffer, const f_string_range_t section_name, const f_string_range_t operation_name, const fake_make_print_t print) {
if (data.verbosity == fake_verbosity_quiet || !print.to) return;
- f_string_length line = 1;
+ f_string_length_t line = 1;
f_fss_count_lines(buffer, operation_name.start, &line);
#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(const fake_data data, const f_status status, const f_string function, const f_string path, const fake_make_print print) {
+ void fake_print_message_section_operation_path_outside(const fake_data_t data, const f_status_t status, const f_string_t function, const f_string_t path, const fake_make_print_t print) {
if (data.verbosity == fake_verbosity_quiet || !print.to) return;
if (F_status_set_fine(status) == F_false) {
#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(const fake_data data, const f_status status, const f_string function, const f_string path, const fake_make_print print) {
+ void fake_print_message_section_operation_path_stack_max(const fake_data_t data, const f_status_t status, const f_string_t function, const f_string_t path, const fake_make_print_t print) {
if (data.verbosity == fake_verbosity_quiet || !print.to) return;
if (status == F_buffer_too_large) {
#endif // _di_fake_print_message_section_operation_path_stack_max_
#ifndef _di_fake_print_message_section_operation_stack_max_
- void fake_print_message_section_operation_stack_max(const fake_data data, const f_string_static buffer, const f_string_range section_name, const f_string_range operation_name, const f_array_length stack_max, const fake_make_print print) {
+ void fake_print_message_section_operation_stack_max(const fake_data_t data, const f_string_static_t buffer, const f_string_range_t section_name, const f_string_range_t operation_name, const f_array_length_t stack_max, const fake_make_print_t print) {
if (data.verbosity == fake_verbosity_quiet || !print.to) return;
- f_string_length line = 1;
+ f_string_length_t line = 1;
f_fss_count_lines(buffer, operation_name.start, &line);
#endif // _di_fake_print_message_section_operation_stack_max_
#ifndef _di_fake_print_message_section_operation_unknown_
- void fake_print_message_section_operation_unknown(const fake_data data, const f_string_static buffer, const f_string_range section_name, const f_string_range operation_name, const fake_make_print print) {
+ void fake_print_message_section_operation_unknown(const fake_data_t data, const f_string_static_t buffer, const f_string_range_t section_name, const f_string_range_t operation_name, const fake_make_print_t print) {
if (data.verbosity == fake_verbosity_quiet || !print.to) return;
- f_string_length line = 1;
+ f_string_length_t line = 1;
f_fss_count_lines(buffer, operation_name.start, &line);
#endif // _di_fake_print_message_section_operation_unknown_
#ifndef _di_fake_print_warning_settings_content_empty_
- void fake_print_warning_settings_content_empty(const fake_data data, const f_string path_file, const f_string_dynamic buffer, const f_string_range range_object, const f_string settings_name) {
+ void fake_print_warning_settings_content_empty(const fake_data_t data, const f_string_t path_file, const f_string_dynamic_t buffer, const f_string_range_t range_object, const f_string_t settings_name) {
if (data.verbosity == fake_verbosity_quiet) return;
fprintf(f_type_error, "%c", f_string_eol[0]);
#endif // _di_fake_print_warning_settings_content_empty_
#ifndef _di_fake_print_warning_settings_content_invalid_
- void fake_print_warning_settings_content_invalid(const fake_data data, const f_string path_file, const f_string_dynamic buffer, const f_string_range range_object, const f_string_range range_content, const f_string settings_name) {
+ void fake_print_warning_settings_content_invalid(const fake_data_t data, const f_string_t path_file, const f_string_dynamic_t buffer, const f_string_range_t range_object, const f_string_range_t range_content, const f_string_t settings_name) {
if (data.verbosity == fake_verbosity_quiet) return;
fprintf(f_type_error, "%c", f_string_eol[0]);
#endif // _di_fake_print_warning_settings_content_invalid_
#ifndef _di_fake_print_warning_settings_content_multiple_
- void fake_print_warning_settings_content_multiple(const fake_data data, const f_string path_file, const f_string name_object) {
+ void fake_print_warning_settings_content_multiple(const fake_data_t data, const f_string_t path_file, const f_string_t name_object) {
if (data.verbosity != fake_verbosity_verbose) return;
fprintf(f_type_error, "%c", f_string_eol[0]);
#endif // _di_fake_print_warning_settings_content_multiple_
#ifndef _di_fake_print_warning_settings_object_multiple_
- void fake_print_warning_settings_object_multiple(const fake_data data, const f_string path_file, const f_string label, const f_string name_object) {
+ void fake_print_warning_settings_object_multiple(const fake_data_t data, const f_string_t path_file, const f_string_t label, const f_string_t name_object) {
if (data.verbosity != fake_verbosity_verbose) return;
fprintf(f_type_error, "%c", f_string_eol[0]);
* F_unknown is returned if the status code has no print message.
*/
#ifndef _di_fake_print_error_
- extern f_return_status fake_print_error(const fake_data data, const f_status status, const f_string function, const bool fallback) f_gcc_attribute_visibility_internal;
+ extern f_return_status fake_print_error(const fake_data_t data, const f_status_t status, const f_string_t function, const bool fallback) f_gcc_attribute_visibility_internal;
#endif // _di_fake_print_error_
/**
* F_false is returned on successful print of known errors.
*/
#ifndef _di_fake_print_error_operation_file_
- extern bool fake_print_error_build_operation_file(const fake_data data, const f_status status, const f_string function, const f_string operation, const f_string source, const f_string destination, const f_string how, const bool fallback) f_gcc_attribute_visibility_internal;
+ extern bool fake_print_error_build_operation_file(const fake_data_t data, const f_status_t status, const f_string_t function, const f_string_t operation, const f_string_t source, const f_string_t destination, const f_string_t how, const bool fallback) f_gcc_attribute_visibility_internal;
#endif // _di_fake_print_error_operation_file_
/**
* F_false is returned on successful print of known errors.
*/
#ifndef _di_fake_print_error_file_
- extern bool fake_print_error_file(const fake_data data, const f_status status, const f_string function, const f_string name, const f_string operation, const bool is_file, const bool fallback) f_gcc_attribute_visibility_internal;
+ extern bool fake_print_error_file(const fake_data_t data, const f_status_t status, const f_string_t function, const f_string_t name, const f_string_t operation, const bool is_file, const bool fallback) f_gcc_attribute_visibility_internal;
#endif // _di_fake_print_error_file_
/**
* F_false is returned on successful print of known errors.
*/
#ifndef _di_fake_print_error_fss_
- extern bool fake_print_error_fss(const fake_data data, const f_status status, const f_string function, const f_string path_file, const f_string_range range, const bool fallback) f_gcc_attribute_visibility_internal;
+ extern bool fake_print_error_fss(const fake_data_t data, const f_status_t status, const f_string_t function, const f_string_t path_file, const f_string_range_t range, const bool fallback) f_gcc_attribute_visibility_internal;
#endif // _di_fake_print_error_fss_
/**
* The parameter name.
*/
#ifndef _di_fake_print_error_parameter_missing_value_
- extern void fake_print_error_parameter_missing_value(const fake_data data, const f_string parameter) f_gcc_attribute_visibility_internal;
+ extern void fake_print_error_parameter_missing_value(const fake_data_t data, const f_string_t parameter) f_gcc_attribute_visibility_internal;
#endif // _di_fake_print_error_parameter_missing_value_
/**
* The parameter name.
*/
#ifndef _di_fake_print_error_parameter_too_many_
- extern void fake_print_error_parameter_too_many(const fake_data data, const f_string parameter) f_gcc_attribute_visibility_internal;
+ extern void fake_print_error_parameter_too_many(const fake_data_t data, const f_string_t parameter) f_gcc_attribute_visibility_internal;
#endif // _di_fake_print_error_parameter_too_many_
/**
* F_unknown is returned if the status code has no print message.
*/
#ifndef _di_fake_print_message_
- extern f_return_status fake_print_message(const fake_data data, const f_status status, const f_string function, const bool fallback, const fake_make_print print) f_gcc_attribute_visibility_internal;
+ extern f_return_status fake_print_message(const fake_data_t data, const f_status_t status, const f_string_t function, const bool fallback, const fake_make_print_t print) f_gcc_attribute_visibility_internal;
#endif // _di_fake_print_message_
/**
* F_false is returned on successful print of known errors.
*/
#ifndef _di_fake_print_message_file_
- extern bool fake_print_message_file(const fake_data data, const f_status status, const f_string function, const f_string name, const f_string operation, const bool is_file, const bool fallback, const fake_make_print print) f_gcc_attribute_visibility_internal;
+ extern bool fake_print_message_file(const fake_data_t data, const f_status_t status, const f_string_t function, const f_string_t name, const f_string_t operation, const bool is_file, const bool fallback, const fake_make_print_t print) f_gcc_attribute_visibility_internal;
#endif // _di_fake_print_message_file_
/**
* Designates how the section error/warning should be printed.
*/
#ifndef _di_fake_print_message_section_operation_failed_
- extern void fake_print_message_section_operation_failed(const fake_data data, const f_string_static buffer, const f_string_range section_name, const f_string_range operation_name, const fake_make_print print) f_gcc_attribute_visibility_internal;
+ extern void fake_print_message_section_operation_failed(const fake_data_t data, const f_string_static_t buffer, const f_string_range_t section_name, const f_string_range_t operation_name, const fake_make_print_t print) f_gcc_attribute_visibility_internal;
#endif // _di_fake_print_message_section_operation_failed_
/**
* Designates how the section error/warning should be printed.
*/
#ifndef _di_fake_print_message_section_operation_path_outside_
- extern void fake_print_message_section_operation_path_outside(const fake_data data, const f_status status, const f_string function, const f_string path, const fake_make_print print) f_gcc_attribute_visibility_internal;
+ extern void fake_print_message_section_operation_path_outside(const fake_data_t data, const f_status_t status, const f_string_t function, const f_string_t path, const fake_make_print_t print) f_gcc_attribute_visibility_internal;
#endif // _fake_print_message_section_operation_path_outside_
/**
* Designates how the section error/warning should be printed.
*/
#ifndef _di_fake_print_message_section_operation_path_stack_max_
- extern void fake_print_message_section_operation_path_stack_max(const fake_data data, const f_status status, const f_string function, const f_string path, const fake_make_print print) f_gcc_attribute_visibility_internal;
+ extern void fake_print_message_section_operation_path_stack_max(const fake_data_t data, const f_status_t status, const f_string_t function, const f_string_t path, const fake_make_print_t print) f_gcc_attribute_visibility_internal;
#endif // _di_fake_print_message_section_operation_path_stack_max_
/**
* Designates how the section error/warning should be printed.
*/
#ifndef _di_fake_print_message_section_operation_stack_max_
- extern void fake_print_message_section_operation_stack_max(const fake_data data, const f_string_static buffer, const f_string_range section_name, const f_string_range operation_name, const f_array_length stack_max, const fake_make_print print) f_gcc_attribute_visibility_internal;
+ extern void fake_print_message_section_operation_stack_max(const fake_data_t data, const f_string_static_t buffer, const f_string_range_t section_name, const f_string_range_t operation_name, const f_array_length_t stack_max, const fake_make_print_t print) f_gcc_attribute_visibility_internal;
#endif // _di_fake_print_message_section_operation_stack_max_
/**
* Designates how the section error/warning should be printed.
*/
#ifndef _di_fake_print_message_section_operation_unknown_
- extern void fake_print_message_section_operation_unknown(const fake_data data, const f_string_static buffer, const f_string_range section_name, const f_string_range operation_name, const fake_make_print print) f_gcc_attribute_visibility_internal;
+ extern void fake_print_message_section_operation_unknown(const fake_data_t data, const f_string_static_t buffer, const f_string_range_t section_name, const f_string_range_t operation_name, const fake_make_print_t print) f_gcc_attribute_visibility_internal;
#endif // _di_fake_print_message_section_operation_unknown_
/**
* The name of the setting that has an invalid value.
*/
#ifndef _di_fake_print_warning_settings_content_empty_
- extern void fake_print_warning_settings_content_empty(const fake_data data, const f_string path_file, const f_string_dynamic buffer, const f_string_range range_object, const f_string settings_name) f_gcc_attribute_visibility_internal;
+ extern void fake_print_warning_settings_content_empty(const fake_data_t data, const f_string_t path_file, const f_string_dynamic_t buffer, const f_string_range_t range_object, const f_string_t settings_name) f_gcc_attribute_visibility_internal;
#endif // _di_fake_print_warning_settings_content_empty_
/**
* Designates how the section error/warning should be printed.
*/
#ifndef _di_fake_print_warning_settings_content_invalid_
- extern void fake_print_warning_settings_content_invalid(const fake_data data, const f_string path_file, const f_string_dynamic buffer, const f_string_range range_object, const f_string_range range_content, const f_string settings_name) f_gcc_attribute_visibility_internal;
+ extern void fake_print_warning_settings_content_invalid(const fake_data_t data, const f_string_t path_file, const f_string_dynamic_t buffer, const f_string_range_t range_object, const f_string_range_t range_content, const f_string_t settings_name) f_gcc_attribute_visibility_internal;
#endif // _di_fake_print_warning_settings_content_invalid_
/**
* The name of the object.
*/
#ifndef _di_fake_print_warning_settings_content_multiple_
- extern void fake_print_warning_settings_content_multiple(const fake_data data, const f_string path_file, const f_string name_object) f_gcc_attribute_visibility_internal;
+ extern void fake_print_warning_settings_content_multiple(const fake_data_t data, const f_string_t path_file, const f_string_t name_object) f_gcc_attribute_visibility_internal;
#endif // _di_fake_print_warning_settings_content_multiple_
/**
* The name of the object.
*/
#ifndef _di_fake_print_warning_settings_object_multiple_
- extern void fake_print_warning_settings_object_multiple(const fake_data data, const f_string path_file, const f_string label, const f_string name_object) f_gcc_attribute_visibility_internal;
+ extern void fake_print_warning_settings_object_multiple(const fake_data_t data, const f_string_t path_file, const f_string_t label, const f_string_t name_object) f_gcc_attribute_visibility_internal;
#endif // _di_fake_print_warning_settings_object_multiple_
#ifdef __cplusplus
#endif
#ifndef _di_fake_skeleton_operate_
- f_return_status fake_skeleton_operate(const fake_data data) {
- f_status status = F_none;
+ f_return_status fake_skeleton_operate(const fake_data_t data) {
+ f_status_t status = F_none;
if (data.verbosity != fake_verbosity_quiet) {
printf("%c", f_string_eol[0]);
}
{
- const f_string_dynamic *parameters_value[] = {
+ const f_string_dynamic_t *parameters_value[] = {
&data.path_build,
&data.path_data,
&data.path_data_build,
} // for
}
- f_string_dynamic file_data_build_process_post = f_string_dynamic_initialize;
- f_string_dynamic file_data_build_process_pre = f_string_dynamic_initialize;
- f_string_dynamic content = f_string_dynamic_initialize;
+ f_string_dynamic_t file_data_build_process_post = f_string_dynamic_t_initialize;
+ f_string_dynamic_t file_data_build_process_pre = f_string_dynamic_t_initialize;
+ f_string_dynamic_t content = f_string_dynamic_t_initialize;
if (F_status_is_not_error(status)) {
content.string = fake_make_skeleton_content_defines;
}
if (F_status_is_error(status)) {
- f_macro_string_dynamic_delete_simple(file_data_build_process_post);
- f_macro_string_dynamic_delete_simple(file_data_build_process_pre);
+ f_macro_string_dynamic_t_delete_simple(file_data_build_process_post);
+ f_macro_string_dynamic_t_delete_simple(file_data_build_process_pre);
return status;
}
#endif // _di_fake_skeleton_operate_
#ifndef _di_fake_skeleton_operate_directory_create_
- f_return_status fake_skeleton_operate_directory_create(const fake_data data, const f_string_dynamic path) {
- f_status status = F_none;
+ f_return_status fake_skeleton_operate_directory_create(const fake_data_t data, const f_string_dynamic_t path) {
+ f_status_t status = F_none;
if (path.used == 0) return F_none;
#endif // _di_fake_skeleton_operate_directory_create_
#ifndef _di_fake_skeleton_operate_file_create_
- f_return_status fake_skeleton_operate_file_create(const fake_data data, const f_string_dynamic path, const bool executable, const f_string_static content) {
- f_status status = F_none;
+ f_return_status fake_skeleton_operate_file_create(const fake_data_t data, const f_string_dynamic_t path, const bool executable, const f_string_static_t content) {
+ f_status_t status = F_none;
if (path.used == 0) return F_none;
}
if (content.used) {
- f_file file = f_file_initialize;
+ f_file_t file = f_file_t_initialize;
file.flag = f_file_flag_append_wo;
file.size_write = content.used;
* Status codes (with error bit) are returned on any problem.
*/
#ifndef _di_fake_skeleton_operate_
- extern f_return_status fake_skeleton_operate(const fake_data data) f_gcc_attribute_visibility_internal;
+ extern f_return_status fake_skeleton_operate(const fake_data_t data) f_gcc_attribute_visibility_internal;
#endif // _di_fake_skeleton_operate_
/**
* Status codes (with error bit) are returned on any problem.
*/
#ifndef _di_fake_skeleton_operate_directory_create_
- extern f_return_status fake_skeleton_operate_directory_create(const fake_data data, const f_string_dynamic path) f_gcc_attribute_visibility_internal;
+ extern f_return_status fake_skeleton_operate_directory_create(const fake_data_t data, const f_string_dynamic_t path) f_gcc_attribute_visibility_internal;
#endif // _di_fake_skeleton_operate_directory_create_
/**
* Status codes (with error bit) are returned on any problem.
*/
#ifndef _di_fake_skeleton_operate_file_create_
- extern f_return_status fake_skeleton_operate_file_create(const fake_data data, const f_string_dynamic path, const bool executable, const f_string_static content) f_gcc_attribute_visibility_internal;
+ extern f_return_status fake_skeleton_operate_file_create(const fake_data_t data, const f_string_dynamic_t path, const bool executable, const f_string_static_t content) f_gcc_attribute_visibility_internal;
#endif // _di_fake_skeleton_operate_file_create_
#ifdef __cplusplus
# fss-0000
f_type
-f_status
+f_status_t
f_memory
-f_string
+f_string_t
f_utf
f_account
-f_color
+f_color_t
f_console
f_conversion
f_directory
f_environment
f_fss
-f_file
+f_file_t
f_iki
f_path
f_print
#endif
#ifndef _di_firewall_print_help_
- f_return_status firewall_print_help(const fl_color_context context) {
+ f_return_status firewall_print_help(const fl_color_context_t context) {
fll_program_print_help_header(context, firewall_name_long, firewall_version);
fll_program_print_help_option(context, f_console_standard_short_help, f_console_standard_long_help, f_console_symbol_short_enable, f_console_symbol_long_enable, " Print this help message.");
#endif // _di_firewall_print_help_
#ifndef _di_firewall_main_
- f_return_status firewall_main(const f_console_arguments arguments, firewall_data *data) {
- f_status status = F_none;
+ f_return_status firewall_main(const f_console_arguments_t arguments, firewall_data_t *data) {
+ f_status_t status = F_none;
{
- f_console_parameters parameters = { data->parameters, firewall_total_parameters };
- f_console_parameter_id ids[3] = { firewall_parameter_no_color, firewall_parameter_light, firewall_parameter_dark };
- f_console_parameter_ids choices = { ids, 3 };
+ f_console_parameters_t parameters = { data->parameters, firewall_total_parameters };
+ f_console_parameter_id_t ids[3] = { firewall_parameter_no_color, firewall_parameter_light, firewall_parameter_dark };
+ f_console_parameter_ids_t choices = { ids, 3 };
status = fll_program_parameter_process(arguments, parameters, choices, F_true, &data->remaining, &data->context);
}
if (found_command) {
- firewall_local_data local = firewall_local_data_initialize;
- firewall_reserved_chains reserved = firewall_reserved_chains_initialize;
- f_string_range input = f_string_range_initialize;
+ firewall_local_data_t local = firewall_local_data_t_initialize;
+ firewall_reserved_chains_t reserved = firewall_reserved_chains_t_initialize;
+ f_string_range_t input = f_string_range_initialize;
if (command == firewall_parameter_command_show) {
// Warning: these are hardcoded print commands (I am not certain how I am going to implement external 'show' rules as the default-firewall setting file is the wrong place to put this)
bool show_mangle = F_true;
bool show_ports = F_true;
- f_string_dynamics parameters = f_string_dynamics_initialize;
+ f_string_dynamics_t parameters = f_string_dynamics_t_initialize;
int results = 0;
if (data->remaining.used > 0) {
show_mangle = F_false;
show_ports = F_false;
- f_string_length counter = 0;
+ f_string_length_t counter = 0;
for (; counter < data->remaining.used; counter++) {
if (strncmp("nat", arguments.argv[data->remaining.array[counter]], 4) != 0) {
parameters.used = 6;
- parameters.array[0].string = (f_string) "-x";
- parameters.array[1].string = (f_string) "-v";
- parameters.array[2].string = (f_string) "-t";
- parameters.array[3].string = (f_string) "nat";
- parameters.array[4].string = (f_string) "--numeric";
- parameters.array[5].string = (f_string) "--list";
+ parameters.array[0].string = (f_string_t) "-x";
+ parameters.array[1].string = (f_string_t) "-v";
+ parameters.array[2].string = (f_string_t) "-t";
+ parameters.array[3].string = (f_string_t) "nat";
+ parameters.array[4].string = (f_string_t) "--numeric";
+ parameters.array[5].string = (f_string_t) "--list";
parameters.array[0].used = 2;
parameters.array[1].used = 2;
parameters.array[4].used = 9;
parameters.array[5].used = 6;
- status = fll_execute_program((f_string) firewall_tool_iptables, parameters, &results);
+ status = fll_execute_program((f_string_t) firewall_tool_iptables, parameters, &results);
fprintf(f_type_output, "\n");
fflush(f_type_output);
parameters.used = 6;
- parameters.array[0].string = (f_string) "-x";
- parameters.array[1].string = (f_string) "-v";
- parameters.array[2].string = (f_string) "-t";
- parameters.array[3].string = (f_string) "mangle";
- parameters.array[4].string = (f_string) "--numeric";
- parameters.array[5].string = (f_string) "--list";
+ parameters.array[0].string = (f_string_t) "-x";
+ parameters.array[1].string = (f_string_t) "-v";
+ parameters.array[2].string = (f_string_t) "-t";
+ parameters.array[3].string = (f_string_t) "mangle";
+ parameters.array[4].string = (f_string_t) "--numeric";
+ parameters.array[5].string = (f_string_t) "--list";
parameters.array[0].used = 2;
parameters.array[1].used = 2;
parameters.array[4].used = 9;
parameters.array[5].used = 6;
- status = fll_execute_program((f_string) firewall_tool_iptables, parameters, &results);
+ status = fll_execute_program((f_string_t) firewall_tool_iptables, parameters, &results);
fprintf(f_type_output, "\n");
fflush(f_type_output);
parameters.used = 4;
- parameters.array[0].string = (f_string) "-x";
- parameters.array[1].string = (f_string) "-v";
- parameters.array[2].string = (f_string) "--numeric";
- parameters.array[3].string = (f_string) "--list";
+ parameters.array[0].string = (f_string_t) "-x";
+ parameters.array[1].string = (f_string_t) "-v";
+ parameters.array[2].string = (f_string_t) "--numeric";
+ parameters.array[3].string = (f_string_t) "--list";
parameters.array[0].used = 2;
parameters.array[1].used = 2;
parameters.array[2].used = 9;
parameters.array[3].used = 6;
- status = fll_execute_program((f_string) firewall_tool_iptables, parameters, &results);
+ status = fll_execute_program((f_string_t) firewall_tool_iptables, parameters, &results);
fprintf(f_type_output, "\n");
fflush(f_type_output);
fl_color_print_line(f_type_error, data->context.error, data->context.reset, "ERROR: Failed to perform requested %s operation:", firewall_tool_iptables);
fprintf(f_type_error, " ");
- f_string_length i = 0;
+ f_string_length_t i = 0;
fl_color_print_code(f_type_error, data->context.error);
parameters.array[5].used = 0;
parameters.array[6].used = 0;
- f_macro_string_dynamics_delete_simple( parameters);
+ f_macro_string_dynamics_t_delete_simple( parameters);
firewall_delete_local_data(&local);
firewall_delete_data(data);
return status;
}
// load all network devices
- status = f_directory_list((f_string) network_devices, 0, alphasort, &data->devices);
+ status = f_directory_list((f_string_t) network_devices, 0, alphasort, &data->devices);
if (F_status_is_error(status)) {
status = F_status_set_fine(status);
// remove "lo" (loopback) from the device listing
{
- f_string_length i = 0;
+ f_string_length_t i = 0;
for (; i < data->devices.used; i++) {
- if (fl_string_compare((f_string) firewall_device_loop, data->devices.array[i].string, firewall_device_loop_length + 1, data->devices.array[i].used) == F_equal_to) {
- f_string_dynamic swap_string = data->devices.array[i];
+ if (fl_string_compare((f_string_t) firewall_device_loop, data->devices.array[i].string, firewall_device_loop_length + 1, data->devices.array[i].used) == F_equal_to) {
+ f_string_dynamic_t swap_string = data->devices.array[i];
data->devices.used--;
}
{
- f_array_length i = 0;
- f_string_length length = 0;
+ f_array_length_t i = 0;
+ f_string_length_t length = 0;
for (; i < local.chain_objects.used; i++) {
length = local.chain_objects.array[i].stop - local.chain_objects.array[i].start + 1;
- if (!reserved.has_stop && fl_string_compare((f_string) firewall_group_stop, local.buffer.string + local.chain_objects.array[i].start, firewall_group_stop_length, length) == F_equal_to) {
+ if (!reserved.has_stop && fl_string_compare((f_string_t) firewall_group_stop, local.buffer.string + local.chain_objects.array[i].start, firewall_group_stop_length, length) == F_equal_to) {
reserved.stop_at = i;
reserved.has_stop = F_true;
}
- else if (!reserved.has_lock && fl_string_compare((f_string) firewall_group_lock, local.buffer.string + local.chain_objects.array[i].start, firewall_group_lock_length, length) == F_equal_to) {
+ else if (!reserved.has_lock && fl_string_compare((f_string_t) firewall_group_lock, local.buffer.string + local.chain_objects.array[i].start, firewall_group_lock_length, length) == F_equal_to) {
reserved.lock_at = i;
reserved.has_lock = F_true;
}
return status;
}
- f_array_length i = 0;
+ f_array_length_t i = 0;
local.is_global = F_true;
local.is_stop = F_false;
local.device = i;
{
- f_string_dynamic file_path = f_string_dynamic_initialize;
+ f_string_dynamic_t file_path = f_string_dynamic_t_initialize;
- f_macro_string_dynamic_resize(status, file_path, network_path_length + data->devices.array[i].used + firewall_file_suffix_length + 1);
+ f_macro_string_dynamic_t_resize(status, file_path, network_path_length + data->devices.array[i].used + firewall_file_suffix_length + 1);
if (F_status_is_error(status)) {
fl_color_print_line(f_type_error, data->context.error, data->context.reset, "CRITICAL ERROR: Unable to allocate memory.");
status = firewall_buffer_rules(file_path.string, F_true, &local, data);
- f_macro_string_dynamic_delete_simple(file_path);
+ f_macro_string_dynamic_t_delete_simple(file_path);
}
if (F_status_is_error(status)) {
return status;
}
- f_array_length j = 0;
+ f_array_length_t j = 0;
local.is_global = F_false;
local.is_stop = F_false;
status = firewall_create_custom_chains(&reserved, &local, data);
if (F_status_is_error(status)) {
- f_status status2 = F_none;
+ f_status_t status2 = F_none;
firewall_macro_delete_fss_buffers(status2, local.buffer, local.chain_objects, local.chain_contents)
firewall_delete_data(data);
#endif // _di_firewall_main_
#ifndef _di_firewall_delete_data_
- f_return_status firewall_delete_data(firewall_data *data) {
- f_string_length i = 0;
+ f_return_status firewall_delete_data(firewall_data_t *data) {
+ f_string_length_t i = 0;
while (i < firewall_total_parameters) {
- f_macro_string_lengths_delete_simple(data->parameters[i].locations);
- f_macro_string_lengths_delete_simple(data->parameters[i].additional);
+ f_macro_string_lengths_t_delete_simple(data->parameters[i].locations);
+ f_macro_string_lengths_t_delete_simple(data->parameters[i].additional);
i++;
} // while
- f_macro_string_dynamics_delete_simple(data->chains);
- f_macro_string_lengths_delete_simple(data->remaining);
- f_macro_string_dynamics_delete_simple(data->devices);
+ f_macro_string_dynamics_t_delete_simple(data->chains);
+ f_macro_string_lengths_t_delete_simple(data->remaining);
+ f_macro_string_dynamics_t_delete_simple(data->devices);
- fl_macro_color_context_delete_simple(data->context);
+ fl_macro_color_context_t_delete_simple(data->context);
return F_none;
}
};
#ifdef _en_firewall_debug_
- #define f_console_parameter_initialize_firewall \
+ #define firewall_console_parameter_t_initialize \
{ \
- f_console_parameter_initialize(f_console_standard_short_help, f_console_standard_long_help, 0, F_false, f_console_type_normal), \
- f_console_parameter_initialize(f_console_standard_short_light, f_console_standard_long_light, 0, F_false, f_console_type_inverse), \
- f_console_parameter_initialize(f_console_standard_short_dark, f_console_standard_long_dark, 0, F_false, f_console_type_inverse), \
- f_console_parameter_initialize(f_console_standard_short_no_color, f_console_standard_long_no_color, 0, F_false, f_console_type_inverse), \
- f_console_parameter_initialize(f_console_standard_short_version, f_console_standard_long_version, 0, F_false, f_console_type_inverse), \
- f_console_parameter_initialize(f_console_standard_short_debug, f_console_standard_long_debug, 0, F_false, f_console_type_inverse), \
- f_console_parameter_initialize(0, 0, firewall_command_start, F_false, f_console_type_other), \
- f_console_parameter_initialize(0, 0, firewall_command_stop, F_false, f_console_type_other), \
- f_console_parameter_initialize(0, 0, firewall_command_restart, F_false, f_console_type_other), \
- f_console_parameter_initialize(0, 0, firewall_command_lock, F_false, f_console_type_other), \
- f_console_parameter_initialize(0, 0, firewall_command_show, F_false, f_console_type_other), \
+ f_console_parameter_t_initialize(f_console_standard_short_help, f_console_standard_long_help, 0, F_false, f_console_type_normal), \
+ f_console_parameter_t_initialize(f_console_standard_short_light, f_console_standard_long_light, 0, F_false, f_console_type_inverse), \
+ f_console_parameter_t_initialize(f_console_standard_short_dark, f_console_standard_long_dark, 0, F_false, f_console_type_inverse), \
+ f_console_parameter_t_initialize(f_console_standard_short_no_color, f_console_standard_long_no_color, 0, F_false, f_console_type_inverse), \
+ f_console_parameter_t_initialize(f_console_standard_short_version, f_console_standard_long_version, 0, F_false, f_console_type_inverse), \
+ f_console_parameter_t_initialize(f_console_standard_short_debug, f_console_standard_long_debug, 0, F_false, f_console_type_inverse), \
+ f_console_parameter_t_initialize(0, 0, firewall_command_start, F_false, f_console_type_other), \
+ f_console_parameter_t_initialize(0, 0, firewall_command_stop, F_false, f_console_type_other), \
+ f_console_parameter_t_initialize(0, 0, firewall_command_restart, F_false, f_console_type_other), \
+ f_console_parameter_t_initialize(0, 0, firewall_command_lock, F_false, f_console_type_other), \
+ f_console_parameter_t_initialize(0, 0, firewall_command_show, F_false, f_console_type_other), \
}
#define firewall_total_parameters 11
#else
- #define f_console_parameter_initialize_firewall \
+ #define firewall_console_parameter_t_initialize \
{ \
- f_console_parameter_initialize(f_console_standard_short_help, f_console_standard_long_help, 0, F_false, f_console_type_normal), \
- f_console_parameter_initialize(f_console_standard_short_light, f_console_standard_long_light, 0, F_false, f_console_type_inverse), \
- f_console_parameter_initialize(f_console_standard_short_dark, f_console_standard_long_dark, 0, F_false, f_console_type_inverse), \
- f_console_parameter_initialize(f_console_standard_short_no_color, f_console_standard_long_no_color, 0, F_false, f_console_type_inverse), \
- f_console_parameter_initialize(f_console_standard_short_version, f_console_standard_long_version, 0, F_false, f_console_type_inverse), \
- f_console_parameter_initialize(0, 0, firewall_command_start, F_false, f_console_type_other), \
- f_console_parameter_initialize(0, 0, firewall_command_stop, F_false, f_console_type_other), \
- f_console_parameter_initialize(0, 0, firewall_command_restart, F_false, f_console_type_other), \
- f_console_parameter_initialize(0, 0, firewall_command_lock, F_false, f_console_type_other), \
- f_console_parameter_initialize(0, 0, firewall_command_show, F_false, f_console_type_other), \
+ f_console_parameter_t_initialize(f_console_standard_short_help, f_console_standard_long_help, 0, F_false, f_console_type_normal), \
+ f_console_parameter_t_initialize(f_console_standard_short_light, f_console_standard_long_light, 0, F_false, f_console_type_inverse), \
+ f_console_parameter_t_initialize(f_console_standard_short_dark, f_console_standard_long_dark, 0, F_false, f_console_type_inverse), \
+ f_console_parameter_t_initialize(f_console_standard_short_no_color, f_console_standard_long_no_color, 0, F_false, f_console_type_inverse), \
+ f_console_parameter_t_initialize(f_console_standard_short_version, f_console_standard_long_version, 0, F_false, f_console_type_inverse), \
+ f_console_parameter_t_initialize(0, 0, firewall_command_start, F_false, f_console_type_other), \
+ f_console_parameter_t_initialize(0, 0, firewall_command_stop, F_false, f_console_type_other), \
+ f_console_parameter_t_initialize(0, 0, firewall_command_restart, F_false, f_console_type_other), \
+ f_console_parameter_t_initialize(0, 0, firewall_command_lock, F_false, f_console_type_other), \
+ f_console_parameter_t_initialize(0, 0, firewall_command_show, F_false, f_console_type_other), \
}
#define firewall_total_parameters 10
#endif // _en_firewall_debug_
#endif // _di_firewall_defines_
-#ifndef _di_firewall_data_
+#ifndef _di_firewall_data_t_
typedef struct {
- f_console_parameter parameters[firewall_total_parameters];
+ f_console_parameter_t parameters[firewall_total_parameters];
- f_string_dynamics chains;
- f_string_lengths remaining;
+ f_string_dynamics_t chains;
+ f_string_lengths_t remaining;
bool process_pipe;
- f_string_dynamics devices;
+ f_string_dynamics_t devices;
- fl_color_context context;
- } firewall_data;
+ fl_color_context_t context;
+ } firewall_data_t;
- #define firewall_data_initialize \
+ #define firewall_data_t_initialize \
{ \
- f_console_parameter_initialize_firewall, \
- f_string_dynamics_initialize, \
- f_string_lengths_initialize, \
+ firewall_console_parameter_t_initialize, \
+ f_string_dynamics_t_initialize, \
+ f_string_lengths_t_initialize, \
F_false, \
- f_string_dynamics_initialize, \
- fl_color_context_initialize, \
+ f_string_dynamics_t_initialize, \
+ fl_color_context_t_initialize, \
}
-#endif // _di_firewall_data_
+#endif // _di_firewall_data_t_
/**
* Print help to standard output.
* F_none on success.
*/
#ifndef _di_firewall_print_help_
- extern f_return_status firewall_print_help(const fl_color_context context);
+ extern f_return_status firewall_print_help(const fl_color_context_t context);
#endif // _di_firewall_print_help_
/**
* @see firewall_delete_data()
*/
#ifndef _di_firewall_main_
- extern f_return_status firewall_main(const f_console_arguments arguments, firewall_data *data);
+ extern f_return_status firewall_main(const f_console_arguments_t arguments, firewall_data_t *data);
#endif // _di_firewall_main_
/**
* @see firewall_main()
*/
#ifndef _di_firewall_delete_data_
- extern f_return_status firewall_delete_data(firewall_data *data);
+ extern f_return_status firewall_delete_data(firewall_data_t *data);
#endif // _di_firewall_delete_data_
#ifdef __cplusplus
#include "firewall.h"
-int main(const int argc, const f_string *argv) {
- const f_console_arguments arguments = { argc, argv };
- firewall_data data = firewall_data_initialize;
+int main(const int argc, const f_string_t *argv) {
+ const f_console_arguments_t arguments = { argc, argv };
+ firewall_data_t data = firewall_data_t_initialize;
if (f_pipe_input_exists()) {
data.process_pipe = F_true;
}
- f_status status = firewall_main(arguments, &data);
+ f_status_t status = firewall_main(arguments, &data);
if (F_status_is_error(status)) {
return 1;
extern "C" {
#endif
-f_return_status firewall_perform_commands(const firewall_local_data local, const firewall_data data) {
- f_status status = F_none;
+f_return_status firewall_perform_commands(const firewall_local_data_t local, const firewall_data_t data) {
+ f_status_t status = F_none;
- f_string_length i = 0;
- f_string_dynamics arguments = f_string_dynamics_initialize;
- f_string_dynamic argument = f_string_dynamic_initialize;
+ f_string_length_t i = 0;
+ f_string_dynamics_t arguments = f_string_dynamics_t_initialize;
+ f_string_dynamic_t argument = f_string_dynamic_t_initialize;
int results = 0;
- f_string_length length = 0;
+ f_string_length_t length = 0;
bool invalid = F_false;
bool is_ip_list = F_false;
- f_string_dynamic ip_list = f_string_dynamic_initialize;
+ f_string_dynamic_t ip_list = f_string_dynamic_t_initialize;
// iptables command arguments
bool device_all = F_false;
uint8_t tool = firewall_program_ip46tables;
uint8_t chain = firewall_chain_none_id;
- f_array_length repeat = 2;
- f_array_length r = 0;
+ f_array_length_t repeat = 2;
+ f_array_length_t r = 0;
- f_string current_tool = firewall_tool_iptables;
- f_string_length current_tool_length = firewall_tool_iptables_length;
+ f_string_t current_tool = firewall_tool_iptables;
+ f_string_length_t current_tool_length = firewall_tool_iptables_length;
- f_string_length direction = firewall_direction_none_id;
- f_string_dynamic device = f_string_dynamic_initialize;
- f_string_length action = firewall_action_append_id;
- f_string_dynamic protocol = f_string_dynamic_initialize;
+ f_string_length_t direction = firewall_direction_none_id;
+ f_string_dynamic_t device = f_string_dynamic_t_initialize;
+ f_string_length_t action = firewall_action_append_id;
+ f_string_dynamic_t protocol = f_string_dynamic_t_initialize;
if (local.is_global) {
device_all = F_true;
}
else {
if (data.devices.array[local.device].used > 0) {
- f_macro_string_dynamic_new(status, device, data.devices.array[local.device].used);
+ f_macro_string_dynamic_t_new(status, device, data.devices.array[local.device].used);
if (F_status_is_error(status)) {
- f_macro_string_dynamic_delete_simple(device);
+ f_macro_string_dynamic_t_delete_simple(device);
return status;
}
is_ip_list = F_false;
ip_list_direction = F_false;
- f_macro_string_dynamic_delete_simple(ip_list);
+ f_macro_string_dynamic_t_delete_simple(ip_list);
// process chain rule
- if (length >= firewall_chain_length && fl_string_compare(local.buffer.string + local.rule_objects.array[i].start, (f_string) firewall_chain, length, firewall_chain_length) == F_equal_to) {
+ if (length >= firewall_chain_length && fl_string_compare(local.buffer.string + local.rule_objects.array[i].start, (f_string_t) firewall_chain, length, firewall_chain_length) == F_equal_to) {
if (chain == firewall_chain_custom_id) {
// custom chains can only apply to themselves, so silently ignore chain commands specified within a custom chain.
fprintf(f_type_warning, "WARNING: At line %i, the chain option is meaningle ss inside of a custom chain.", i);
if (firewall_macro_rule_contents_has_incorrect_items(i, 1)) {
invalid = F_true;
}
- else if (length >= firewall_chain_input_length && fl_string_compare(local.buffer.string + local.rule_contents.array[i].array[0].start, (f_string) firewall_chain_input, length, firewall_chain_input_length) == F_equal_to) {
+ else if (length >= firewall_chain_input_length && fl_string_compare(local.buffer.string + local.rule_contents.array[i].array[0].start, (f_string_t) firewall_chain_input, length, firewall_chain_input_length) == F_equal_to) {
chain = firewall_chain_input_id;
}
- else if (length >= firewall_chain_output_length && fl_string_compare(local.buffer.string + local.rule_contents.array[i].array[0].start, (f_string) firewall_chain_output, length, firewall_chain_output_length) == F_equal_to) {
+ else if (length >= firewall_chain_output_length && fl_string_compare(local.buffer.string + local.rule_contents.array[i].array[0].start, (f_string_t) firewall_chain_output, length, firewall_chain_output_length) == F_equal_to) {
chain = firewall_chain_output_id;
}
- else if (length >= firewall_chain_forward_length && fl_string_compare(local.buffer.string + local.rule_contents.array[i].array[0].start, (f_string) firewall_chain_forward, length, firewall_chain_forward_length) == F_equal_to) {
+ else if (length >= firewall_chain_forward_length && fl_string_compare(local.buffer.string + local.rule_contents.array[i].array[0].start, (f_string_t) firewall_chain_forward, length, firewall_chain_forward_length) == F_equal_to) {
chain = firewall_chain_forward_id;
}
- else if (length >= firewall_chain_postrouting_length && fl_string_compare(local.buffer.string + local.rule_contents.array[i].array[0].start, (f_string) firewall_chain_postrouting, length, firewall_chain_postrouting_length) == F_equal_to) {
+ else if (length >= firewall_chain_postrouting_length && fl_string_compare(local.buffer.string + local.rule_contents.array[i].array[0].start, (f_string_t) firewall_chain_postrouting, length, firewall_chain_postrouting_length) == F_equal_to) {
chain = firewall_chain_postrouting_id;
}
- else if (length >= firewall_chain_prerouting_length && fl_string_compare(local.buffer.string + local.rule_contents.array[i].array[0].start, (f_string) firewall_chain_prerouting, length, firewall_chain_prerouting_length) == F_equal_to) {
+ else if (length >= firewall_chain_prerouting_length && fl_string_compare(local.buffer.string + local.rule_contents.array[i].array[0].start, (f_string_t) firewall_chain_prerouting, length, firewall_chain_prerouting_length) == F_equal_to) {
chain = firewall_chain_prerouting_id;
}
- else if (length >= firewall_chain_none_length && fl_string_compare(local.buffer.string + local.rule_contents.array[i].array[0].start, (f_string) firewall_chain_none, length, firewall_chain_none_length) == F_equal_to) {
+ else if (length >= firewall_chain_none_length && fl_string_compare(local.buffer.string + local.rule_contents.array[i].array[0].start, (f_string_t) firewall_chain_none, length, firewall_chain_none_length) == F_equal_to) {
chain = firewall_chain_none_id;
}
else {
if (!invalid) continue;
}
// process direction rule
- else if (length >= firewall_direction_length && fl_string_compare(local.buffer.string + local.rule_objects.array[i].start, (f_string) firewall_direction, length, firewall_direction_length) == F_equal_to) {
+ else if (length >= firewall_direction_length && fl_string_compare(local.buffer.string + local.rule_objects.array[i].start, (f_string_t) firewall_direction, length, firewall_direction_length) == F_equal_to) {
length = firewall_macro_structure_size(local.rule_contents.array[i], 0);
if (firewall_macro_rule_contents_has_incorrect_items(i, 1)) {
invalid = F_true;
}
- else if (length >= firewall_direction_input_length && fl_string_compare(local.buffer.string + local.rule_contents.array[i].array[0].start, (f_string) firewall_direction_input, length, firewall_direction_input_length) == F_equal_to) {
+ else if (length >= firewall_direction_input_length && fl_string_compare(local.buffer.string + local.rule_contents.array[i].array[0].start, (f_string_t) firewall_direction_input, length, firewall_direction_input_length) == F_equal_to) {
direction = firewall_direction_input_id;
}
- else if (length >= firewall_direction_output_length && fl_string_compare(local.buffer.string + local.rule_contents.array[i].array[0].start, (f_string) firewall_direction_output, length, firewall_direction_output_length) == F_equal_to) {
+ else if (length >= firewall_direction_output_length && fl_string_compare(local.buffer.string + local.rule_contents.array[i].array[0].start, (f_string_t) firewall_direction_output, length, firewall_direction_output_length) == F_equal_to) {
direction = firewall_direction_output_id;
}
- else if (length >= firewall_direction_none_length && fl_string_compare(local.buffer.string + local.rule_contents.array[i].array[0].start, (f_string) firewall_direction_none, length, firewall_direction_none_length) == F_equal_to) {
+ else if (length >= firewall_direction_none_length && fl_string_compare(local.buffer.string + local.rule_contents.array[i].array[0].start, (f_string_t) firewall_direction_none, length, firewall_direction_none_length) == F_equal_to) {
direction = firewall_direction_none_id;
}
else {
if (!invalid) continue;
}
// process device rule.
- else if (length >= firewall_device_length && fl_string_compare(local.buffer.string + local.rule_objects.array[i].start, (f_string) firewall_device, length, firewall_device_length) == F_equal_to) {
+ else if (length >= firewall_device_length && fl_string_compare(local.buffer.string + local.rule_objects.array[i].start, (f_string_t) firewall_device, length, firewall_device_length) == F_equal_to) {
length = firewall_macro_structure_size(local.rule_contents.array[i], 0);
if (firewall_macro_rule_contents_has_incorrect_items(i, 1)) {
invalid = F_true;
}
- else if (length >= firewall_device_all_length && fl_string_compare(local.buffer.string + local.rule_contents.array[i].array[0].start, (f_string) firewall_device_all, length, firewall_device_all_length) == F_equal_to) {
- f_macro_string_dynamic_delete_simple(device);
+ else if (length >= firewall_device_all_length && fl_string_compare(local.buffer.string + local.rule_contents.array[i].array[0].start, (f_string_t) firewall_device_all, length, firewall_device_all_length) == F_equal_to) {
+ f_macro_string_dynamic_t_delete_simple(device);
device_all = F_true;
continue;
}
- else if (length >= firewall_device_this_length && fl_string_compare(local.buffer.string + local.rule_contents.array[i].array[0].start, (f_string) firewall_device_this, length, firewall_device_this_length) == F_equal_to) {
+ else if (length >= firewall_device_this_length && fl_string_compare(local.buffer.string + local.rule_contents.array[i].array[0].start, (f_string_t) firewall_device_this, length, firewall_device_this_length) == F_equal_to) {
if (data.devices.array[local.device].used > 0) {
if (data.devices.array[local.device].used > device.size) {
- f_macro_string_dynamic_resize(status, device, data.devices.array[local.device].used);
+ f_macro_string_dynamic_t_resize(status, device, data.devices.array[local.device].used);
if (F_status_is_error(status)) break;
}
device.used = data.devices.array[local.device].used;
}
else {
- f_macro_string_dynamic_delete_simple(device);
+ f_macro_string_dynamic_t_delete_simple(device);
}
device_all = F_false;
if (!invalid) {
if (length > 0) {
if (length > device.size) {
- f_macro_string_dynamic_resize(status, device, length);
+ f_macro_string_dynamic_t_resize(status, device, length);
if (F_status_is_error(status)) break;
}
device.used = length;
}
else {
- f_macro_string_dynamic_delete_simple(device);
+ f_macro_string_dynamic_t_delete_simple(device);
}
device_all = F_false;
}
}
// process action rule.
- else if (length >= firewall_action_length && fl_string_compare(local.buffer.string + local.rule_objects.array[i].start, (f_string) firewall_action, length, firewall_action_length) == F_equal_to) {
+ else if (length >= firewall_action_length && fl_string_compare(local.buffer.string + local.rule_objects.array[i].start, (f_string_t) firewall_action, length, firewall_action_length) == F_equal_to) {
length = firewall_macro_structure_size(local.rule_contents.array[i], 0);
if (firewall_macro_rule_contents_has_incorrect_items(i, 1)) {
invalid = F_true;
}
- else if (length >= firewall_action_append_length && fl_string_compare(local.buffer.string + local.rule_contents.array[i].array[0].start, (f_string) firewall_action_append, length, firewall_action_append_length) == F_equal_to) {
+ else if (length >= firewall_action_append_length && fl_string_compare(local.buffer.string + local.rule_contents.array[i].array[0].start, (f_string_t) firewall_action_append, length, firewall_action_append_length) == F_equal_to) {
action = firewall_action_append_id;
}
- else if (length >= firewall_action_insert_length && fl_string_compare(local.buffer.string + local.rule_contents.array[i].array[0].start, (f_string) firewall_action_insert, length, firewall_action_insert_length) == F_equal_to) {
+ else if (length >= firewall_action_insert_length && fl_string_compare(local.buffer.string + local.rule_contents.array[i].array[0].start, (f_string_t) firewall_action_insert, length, firewall_action_insert_length) == F_equal_to) {
action = firewall_action_insert_id;
}
- else if (length >= firewall_action_policy_length && fl_string_compare(local.buffer.string + local.rule_contents.array[i].array[0].start, (f_string) firewall_action_policy, length, firewall_action_policy_length) == F_equal_to) {
+ else if (length >= firewall_action_policy_length && fl_string_compare(local.buffer.string + local.rule_contents.array[i].array[0].start, (f_string_t) firewall_action_policy, length, firewall_action_policy_length) == F_equal_to) {
action = firewall_action_policy_id;
}
- else if (length >= firewall_action_none_length && fl_string_compare(local.buffer.string + local.rule_contents.array[i].array[0].start, (f_string) firewall_action_none, length, firewall_action_none_length) == F_equal_to) {
+ else if (length >= firewall_action_none_length && fl_string_compare(local.buffer.string + local.rule_contents.array[i].array[0].start, (f_string_t) firewall_action_none, length, firewall_action_none_length) == F_equal_to) {
action = firewall_action_none_id;
}
else {
if (!invalid) continue;
}
// process ip_list rule.
- else if (length >= firewall_ip_list_length && fl_string_compare(local.buffer.string + local.rule_objects.array[i].start, (f_string) firewall_ip_list, length, firewall_ip_list_length) == F_equal_to) {
+ else if (length >= firewall_ip_list_length && fl_string_compare(local.buffer.string + local.rule_objects.array[i].start, (f_string_t) firewall_ip_list, length, firewall_ip_list_length) == F_equal_to) {
length = firewall_macro_structure_size(local.rule_contents.array[i], 0);
is_ip_list = F_true;
- if (length >= firewall_ip_list_source_length && fl_string_compare(local.buffer.string + local.rule_contents.array[i].array[0].start, (f_string) firewall_ip_list_source, length, firewall_ip_list_source_length) == F_equal_to) {
+ if (length >= firewall_ip_list_source_length && fl_string_compare(local.buffer.string + local.rule_contents.array[i].array[0].start, (f_string_t) firewall_ip_list_source, length, firewall_ip_list_source_length) == F_equal_to) {
ip_list_direction = F_false;
}
- else if (length >= firewall_ip_list_destination_length && fl_string_compare(local.buffer.string + local.rule_contents.array[i].array[0].start, (f_string) firewall_ip_list_destination, length, firewall_ip_list_destination_length) == F_equal_to) {
+ else if (length >= firewall_ip_list_destination_length && fl_string_compare(local.buffer.string + local.rule_contents.array[i].array[0].start, (f_string_t) firewall_ip_list_destination, length, firewall_ip_list_destination_length) == F_equal_to) {
ip_list_direction = F_true;
}
else {
invalid = F_true;
}
}
- else if (length >= firewall_protocol_length && fl_string_compare(local.buffer.string + local.rule_objects.array[i].start, (f_string) firewall_protocol, length, firewall_protocol_length) == F_equal_to) {
+ else if (length >= firewall_protocol_length && fl_string_compare(local.buffer.string + local.rule_objects.array[i].start, (f_string_t) firewall_protocol, length, firewall_protocol_length) == F_equal_to) {
length = firewall_macro_structure_size(local.rule_contents.array[i], 0);
if (firewall_macro_rule_contents_has_incorrect_items(i, 1)) {
invalid = F_true;
}
else {
- if (fl_string_compare(local.buffer.string + local.rule_contents.array[i].array[0].start, (f_string) firewall_protocol_none, length, firewall_protocol_none_length) == F_equal_to) {
+ if (fl_string_compare(local.buffer.string + local.rule_contents.array[i].array[0].start, (f_string_t) firewall_protocol_none, length, firewall_protocol_none_length) == F_equal_to) {
use_protocol = F_false;
}
else if (length > 0) {
- f_macro_string_dynamic_delete_simple(protocol);
- f_macro_string_dynamic_new(status, protocol, length);
+ f_macro_string_dynamic_t_delete_simple(protocol);
+ f_macro_string_dynamic_t_new(status, protocol, length);
if (F_status_is_error(status)) break;
}
}
// process tool rule.
- else if (length >= firewall_tool_length && fl_string_compare(local.buffer.string + local.rule_objects.array[i].start, (f_string) firewall_tool, length, firewall_tool_length) == F_equal_to) {
+ else if (length >= firewall_tool_length && fl_string_compare(local.buffer.string + local.rule_objects.array[i].start, (f_string_t) firewall_tool, length, firewall_tool_length) == F_equal_to) {
length = firewall_macro_structure_size(local.rule_contents.array[i], 0);
if (firewall_macro_rule_contents_has_incorrect_items(i, 1)) {
invalid = F_true;
}
else {
- if (fl_string_compare(local.buffer.string + local.rule_contents.array[i].array[0].start, (f_string) firewall_tool_iptables, length, firewall_tool_iptables_length) == F_equal_to) {
+ if (fl_string_compare(local.buffer.string + local.rule_contents.array[i].array[0].start, (f_string_t) firewall_tool_iptables, length, firewall_tool_iptables_length) == F_equal_to) {
tool = firewall_program_iptables;
current_tool = firewall_tool_iptables;
current_tool_length = firewall_tool_iptables_length;
repeat = 1;
}
- else if (fl_string_compare(local.buffer.string + local.rule_contents.array[i].array[0].start, (f_string) firewall_tool_ip6tables, length, firewall_tool_ip6tables_length) == F_equal_to) {
+ else if (fl_string_compare(local.buffer.string + local.rule_contents.array[i].array[0].start, (f_string_t) firewall_tool_ip6tables, length, firewall_tool_ip6tables_length) == F_equal_to) {
tool = firewall_program_ip6tables;
current_tool = firewall_tool_ip6tables;
current_tool_length = firewall_tool_ip6tables_length;
repeat = 1;
}
- else if (fl_string_compare(local.buffer.string + local.rule_contents.array[i].array[0].start, (f_string) firewall_tool_ip46tables, length, firewall_tool_ip46tables_length) == F_equal_to) {
+ else if (fl_string_compare(local.buffer.string + local.rule_contents.array[i].array[0].start, (f_string_t) firewall_tool_ip46tables, length, firewall_tool_ip46tables_length) == F_equal_to) {
tool = firewall_program_ip46tables;
current_tool = firewall_tool_iptables;
current_tool_length = firewall_tool_iptables_length;
}
}
// process rule rule, if the remaining rule does not match as firewall_rule, then it is an invalid rule.
- else if (length < firewall_rule_length || fl_string_compare(local.buffer.string + local.rule_objects.array[i].start, (f_string) firewall_rule, length, firewall_rule_length) == F_equal_to_not) {
+ else if (length < firewall_rule_length || fl_string_compare(local.buffer.string + local.rule_objects.array[i].start, (f_string_t) firewall_rule, length, firewall_rule_length) == F_equal_to_not) {
if (length > 0) {
fl_color_print_code(f_type_warning, data.context.warning);
fprintf(f_type_warning, "WARNING: At line %i, the object '", i);
for (r = repeat; r > 0; r--) {
// first add the program name
- f_macro_string_dynamics_delete_simple(arguments);
+ f_macro_string_dynamics_t_delete_simple(arguments);
f_macro_string_dynamics_new(status, arguments, firewall_default_allocation_step);
if (F_status_is_error(status)) break;
}
}
- f_macro_string_dynamic_delete_simple(argument);
+ f_macro_string_dynamic_t_delete_simple(argument);
if (F_status_is_error(status)) break;
// process the action when a non-none chain is specified.
if (chain != firewall_chain_none_id && action != firewall_action_none_id) {
if (action == firewall_action_append_id) {
- f_macro_string_dynamic_new(status, argument, firewall_action_append_command_length);
+ f_macro_string_dynamic_t_new(status, argument, firewall_action_append_command_length);
if (F_status_is_error(status)) break;
argument.used = firewall_action_append_command_length;
}
else if (action == firewall_action_insert_id) {
- f_macro_string_dynamic_new(status, argument, firewall_action_insert_command_length);
+ f_macro_string_dynamic_t_new(status, argument, firewall_action_insert_command_length);
if (F_status_is_error(status)) break;
argument.used = firewall_action_insert_command_length;
}
else if (action == firewall_action_policy_id) {
- f_macro_string_dynamic_new(status, argument, firewall_action_policy_command_length);
+ f_macro_string_dynamic_t_new(status, argument, firewall_action_policy_command_length);
if (F_status_is_error(status)) break;
if (argument.used > 0) {
firewall_macro_append_argument_to_arguments(status, arguments, argument)
if (F_status_is_error(status)) {
- f_macro_string_dynamic_delete_simple(argument);
+ f_macro_string_dynamic_t_delete_simple(argument);
break;
}
// process the chain, which is required by the action.
if (chain == firewall_chain_custom_id) {
if (data.chains.array[local.chain_ids.array[local.chain]].used > 0) {
- f_macro_string_dynamic_new(status, argument, data.chains.array[local.chain_ids.array[local.chain]].used);
+ f_macro_string_dynamic_t_new(status, argument, data.chains.array[local.chain_ids.array[local.chain]].used);
if (F_status_is_error(status)) break;
}
}
else if (chain == firewall_chain_forward_id) {
- f_macro_string_dynamic_new(status, argument, firewall_chain_forward_length);
+ f_macro_string_dynamic_t_new(status, argument, firewall_chain_forward_length);
if (F_status_is_error(status)) break;
argument.used = firewall_chain_forward_length;
}
else if (chain == firewall_chain_postrouting_id) {
- f_macro_string_dynamic_new(status, argument, firewall_chain_postrouting_length);
+ f_macro_string_dynamic_t_new(status, argument, firewall_chain_postrouting_length);
if (F_status_is_error(status)) break;
argument.used += firewall_chain_postrouting_length;
}
else if (chain == firewall_chain_prerouting_id) {
- f_macro_string_dynamic_new(status, argument, firewall_chain_prerouting_length);
+ f_macro_string_dynamic_t_new(status, argument, firewall_chain_prerouting_length);
if (F_status_is_error(status)) break;
argument.used = firewall_chain_prerouting_length;
}
else if (chain == firewall_chain_input_id) {
- f_macro_string_dynamic_new(status, argument, firewall_chain_input_length);
+ f_macro_string_dynamic_t_new(status, argument, firewall_chain_input_length);
if (F_status_is_error(status)) break;
argument.used = firewall_chain_input_length;
}
else if (chain == firewall_chain_output_id) {
- f_macro_string_dynamic_new(status, argument, firewall_chain_output_length);
+ f_macro_string_dynamic_t_new(status, argument, firewall_chain_output_length);
if (F_status_is_error(status)) break;
// add the device if and only if a non-none direction is specified.
if (device.used > 0 && (direction == firewall_direction_input_id || direction == firewall_direction_output_id)) {
- if (length < firewall_device_all_length || fl_string_compare(local.buffer.string + local.rule_contents.array[i].array[0].start, (f_string) firewall_device_all, length, firewall_device_all_length) == F_equal_to_not) {
+ if (length < firewall_device_all_length || fl_string_compare(local.buffer.string + local.rule_contents.array[i].array[0].start, (f_string_t) firewall_device_all, length, firewall_device_all_length) == F_equal_to_not) {
if (direction == firewall_direction_input_id) {
- f_macro_string_dynamic_new(status, argument, firewall_device_input_command_length);
+ f_macro_string_dynamic_t_new(status, argument, firewall_device_input_command_length);
if (F_status_is_error(status)) break;
firewall_macro_concat_string(argument.string, firewall_device_input_command, firewall_device_input_command_length);
argument.used = firewall_device_input_command_length;
}
else if (direction == firewall_direction_output_id) {
- f_macro_string_dynamic_new(status, argument, firewall_device_output_command_length);
+ f_macro_string_dynamic_t_new(status, argument, firewall_device_output_command_length);
if (F_status_is_error(status)) break;
firewall_macro_concat_string(argument.string, firewall_device_output_command, firewall_device_output_command_length);
// add the device.
if (device.used > 0) {
- f_macro_string_dynamic_new(status, argument, device.used);
+ f_macro_string_dynamic_t_new(status, argument, device.used);
if (F_status_is_error(status)) break;
}
if (use_protocol) {
- f_macro_string_dynamic_new(status, argument, firewall_protocol_command_length);
+ f_macro_string_dynamic_t_new(status, argument, firewall_protocol_command_length);
if (F_status_is_error(status)) break;
}
if (protocol.used > 0) {
- f_macro_string_dynamic_new(status, argument, protocol.used);
+ f_macro_string_dynamic_t_new(status, argument, protocol.used);
if (F_status_is_error(status)) break;
// last up is the "rule"
if ((!is_ip_list && local.rule_contents.array[i].used > 0) || (is_ip_list && local.rule_contents.array[i].used > 1)) {
- f_string_length subcounter = 0;
+ f_string_length_t subcounter = 0;
if (is_ip_list) {
// skip past the chain
length = firewall_macro_structure_size(local.rule_contents.array[i], subcounter);
if (length > 0) {
- f_macro_string_dynamic_new(status, ip_list, length);
+ f_macro_string_dynamic_t_new(status, ip_list, length);
if (F_status_is_error(status)) {
// prevent the loop below from being processed.
length = firewall_macro_structure_size(local.rule_contents.array[i], subcounter);
if (length > 0) {
- f_macro_string_dynamic_new(status, argument, length);
+ f_macro_string_dynamic_t_new(status, argument, length);
if (F_status_is_error(status)) break;
// now execute the generated commands.
if (arguments.used > 1) {
if (is_ip_list) {
- f_file file = f_file_initialize;
- f_string_dynamic file_path = f_string_dynamic_initialize;
- f_string_dynamic local_buffer = f_string_dynamic_initialize;
+ f_file_t file = f_file_t_initialize;
+ f_string_dynamic_t file_path = f_string_dynamic_t_initialize;
+ f_string_dynamic_t local_buffer = f_string_dynamic_t_initialize;
- f_fss_objects basic_objects = f_fss_objects_initialize;
- f_fss_contents basic_contents = f_fss_objects_initialize;
+ f_fss_objects_t basic_objects = f_fss_objects_t_initialize;
+ f_fss_contents_t basic_contents = f_fss_objects_t_initialize;
- f_macro_string_dynamic_new(status, file_path, network_path_length + ip_list.used + firewall_default_allocation_step);
+ f_macro_string_dynamic_t_new(status, file_path, network_path_length + ip_list.used + firewall_default_allocation_step);
if (status == F_none) {
firewall_macro_concat_string(file_path.string, network_path, network_path_length);
}
else {
{
- f_string_range input = f_string_range_initialize;
+ f_string_range_t input = f_string_range_initialize;
input.stop = local_buffer.used - 1;
status = F_status_set_error(status);
}
else {
- f_string_length buffer_counter = 0;
- f_string_length ip_length = 0;
- f_string_dynamic ip_list_action = f_string_dynamic_initialize;
+ f_string_length_t buffer_counter = 0;
+ f_string_length_t ip_length = 0;
+ f_string_dynamic_t ip_list_action = f_string_dynamic_t_initialize;
if (ip_list_direction) {
- f_macro_string_dynamic_resize(status, ip_list_action, firewall_ip_list_destination_action_length);
+ f_macro_string_dynamic_t_resize(status, ip_list_action, firewall_ip_list_destination_action_length);
if (F_status_is_error(status)) break;
ip_list_action.used = firewall_ip_list_destination_action_length;
}
else {
- f_macro_string_dynamic_resize(status, ip_list_action, firewall_ip_list_source_action_length);
+ f_macro_string_dynamic_t_resize(status, ip_list_action, firewall_ip_list_source_action_length);
if (F_status_is_error(status)) break;
if (F_status_is_error(status)) {
fl_color_print_line(f_type_error, data.context.error, data.context.reset, "CRITICAL ERROR: Unable to allocate memory.");
- f_macro_string_dynamic_delete_simple(ip_list_action);
+ f_macro_string_dynamic_t_delete_simple(ip_list_action);
}
else {
- f_string_dynamic ip_argument = f_string_dynamic_initialize;
+ f_string_dynamic_t ip_argument = f_string_dynamic_t_initialize;
firewall_macro_append_argument_to_arguments(status, arguments, ip_list_action)
if (F_status_is_error(status)) {
- f_macro_string_dynamic_delete_simple(ip_argument);
+ f_macro_string_dynamic_t_delete_simple(ip_argument);
break;
}
for (; buffer_counter < basic_objects.used; buffer_counter++) {
ip_length = firewall_macro_structure_size(basic_objects, buffer_counter);
- f_macro_string_dynamic_new(status, ip_argument, ip_length);
+ f_macro_string_dynamic_t_new(status, ip_argument, ip_length);
if (F_status_is_error(status)) {
fl_color_print_line(f_type_error, data.context.error, data.context.reset, "CRITICAL ERROR: Unable to allocate memory.");
fl_color_print_code(f_type_debug, data.context.warning);
fprintf(f_type_debug, "%s ", current_tool);
- for (f_string_length i = 0; i < arguments.used; i++) {
+ for (f_string_length_t i = 0; i < arguments.used; i++) {
fprintf(f_type_debug, "%.*s ", arguments.array[i].used, arguments.array[i].string);
} // for
}
#endif // _en_firewall_debug_
- status = fll_execute_program((f_string) current_tool, arguments, &results);
+ status = fll_execute_program((f_string_t) current_tool, arguments, &results);
if (status == F_failure) {
fl_color_print_line(f_type_error, data.context.error, data.context.reset, "ERROR: Failed to perform requested %s operation:", current_tool);
fl_color_print_code(f_type_error, data.context.error);
fprintf(f_type_error, "%s ", current_tool);
- for (f_string_length i = 0; i < arguments.used; i++) {
+ for (f_string_length_t i = 0; i < arguments.used; i++) {
fprintf(f_type_error, "%.*s ", arguments.array[i].used, arguments.array[i].string);
} // for
fprintf(f_type_error, "\n");
// remove ip_argument from arguments string.
- f_macro_string_dynamic_delete_simple(arguments.array[arguments.used]);
+ f_macro_string_dynamic_t_delete_simple(arguments.array[arguments.used]);
arguments.used--;
break;
fl_color_print_line(f_type_error, data.context.error, data.context.reset, "INTERNAL ERROR: Invalid parameter when calling fll_execute_program()");
// remove ip_argument from arguments string.
- f_macro_string_dynamic_delete_simple(arguments.array[arguments.used]);
+ f_macro_string_dynamic_t_delete_simple(arguments.array[arguments.used]);
arguments.used--;
break;
}
// remove ip_argument from arguments string.
- f_macro_string_dynamic_delete_simple(arguments.array[arguments.used]);
+ f_macro_string_dynamic_t_delete_simple(arguments.array[arguments.used]);
arguments.used--;
} // for
- f_macro_string_dynamic_delete_simple(ip_argument);
+ f_macro_string_dynamic_t_delete_simple(ip_argument);
// remove ip_list_action from arguments string.
- f_macro_string_dynamic_delete_simple(arguments.array[arguments.used]);
+ f_macro_string_dynamic_t_delete_simple(arguments.array[arguments.used]);
arguments.used--;
}
}
}
}
- f_macro_string_dynamic_delete_simple(local_buffer);
- f_macro_string_dynamic_delete_simple(file_path);
- f_macro_fss_objects_delete_simple(basic_objects);
- f_macro_fss_contents_delete_simple(basic_contents);
+ f_macro_string_dynamic_t_delete_simple(local_buffer);
+ f_macro_string_dynamic_t_delete_simple(file_path);
+ f_macro_fss_objects_t_delete_simple(basic_objects);
+ f_macro_fss_contents_t_delete_simple(basic_contents);
if (status == F_failure || status == F_parameter) break;
}
fl_color_print_code(f_type_debug, data.context.warning);
fprintf(f_type_debug, "%s ", current_tool);
- for (f_string_length i = 0; i < arguments.used; i++) {
+ for (f_string_length_t i = 0; i < arguments.used; i++) {
fprintf(f_type_debug, "%.*s ", arguments.array[i].used, arguments.array[i].string);
} // for
fl_color_print_code(f_type_error, data.context.error);
fprintf(f_type_error, "%s ", current_tool);
- for (f_string_length i = 0; i < arguments.used; i++) {
+ for (f_string_length_t i = 0; i < arguments.used; i++) {
fprintf(f_type_error, "%.*s ", arguments.array[i].used, arguments.array[i].string);
} // for
} // for
} // for
- f_macro_string_dynamic_delete_simple(ip_list);
- f_macro_string_dynamic_delete_simple(argument);
- f_macro_string_dynamics_delete_simple(arguments);
- f_macro_string_dynamic_delete_simple(device);
- f_macro_string_dynamic_delete_simple(protocol);
+ f_macro_string_dynamic_t_delete_simple(ip_list);
+ f_macro_string_dynamic_t_delete_simple(argument);
+ f_macro_string_dynamics_t_delete_simple(arguments);
+ f_macro_string_dynamic_t_delete_simple(device);
+ f_macro_string_dynamic_t_delete_simple(protocol);
return status;
}
-f_return_status firewall_create_custom_chains(firewall_reserved_chains *reserved, firewall_local_data *local, firewall_data *data) {
- f_status status = F_none;
+f_return_status firewall_create_custom_chains(firewall_reserved_chains_t *reserved, firewall_local_data_t *local, firewall_data_t *data) {
+ f_status_t status = F_none;
uint8_t tool = firewall_program_iptables;
bool new_chain = F_false;
bool create_chain = F_false;
int results = 0;
- f_array_length i = 0;
- f_array_length j = 0;
+ f_array_length_t i = 0;
+ f_array_length_t j = 0;
- f_string_length length = 0;
- f_string_range range = f_string_range_initialize;
- f_string_dynamics arguments = f_string_dynamics_initialize;
+ f_string_length_t length = 0;
+ f_string_range_t range = f_string_range_initialize;
+ f_string_dynamics_t arguments = f_string_dynamics_t_initialize;
- f_string_dynamic fixed_string = f_string_dynamic_initialize;
+ f_string_dynamic_t fixed_string = f_string_dynamic_t_initialize;
- f_macro_array_lengths_delete_simple(local->chain_ids);
- f_macro_array_lengths_new(status, local->chain_ids, local->chain_objects.used);
+ f_macro_array_lengths_t_delete_simple(local->chain_ids);
+ f_macro_array_lengths_t_new(status, local->chain_ids, local->chain_objects.used);
if (F_status_is_error(status)) {
return status;
return status;
}
- f_macro_string_dynamic_new(status, arguments.array[0], firewall_chain_create_command_length);
+ f_macro_string_dynamic_t_new(status, arguments.array[0], firewall_chain_create_command_length);
if (F_status_is_error(status)) {
- f_macro_string_dynamics_delete_simple(arguments);
+ f_macro_string_dynamics_t_delete_simple(arguments);
return status;
}
arguments.array[0].used = firewall_chain_create_command_length;
- f_macro_string_dynamic_new(status, arguments.array[1], firewall_default_allocation_step);
+ f_macro_string_dynamic_t_new(status, arguments.array[1], firewall_default_allocation_step);
if (F_status_is_error(status)) {
arguments.used = 1;
- f_macro_string_dynamics_delete_simple(arguments);
+ f_macro_string_dynamics_t_delete_simple(arguments);
return status;
}
new_chain = F_false;
}
- f_macro_string_dynamic_clear(fixed_string);
+ f_macro_string_dynamic_t_clear(fixed_string);
if (new_chain) {
while (j < data->chains.used) {
f_macro_string_dynamics_resize(status, data->chains, data->chains.used + firewall_default_allocation_step);
if (F_status_is_error(status)) {
- f_macro_string_dynamics_delete_simple(arguments);
+ f_macro_string_dynamics_t_delete_simple(arguments);
return status;
}
arguments.array[1].used = 0;
if (length > arguments.array[1].size) {
- f_macro_string_dynamic_resize(status, arguments.array[1], length);
+ f_macro_string_dynamic_t_resize(status, arguments.array[1], length);
if (F_status_is_error(status)) {
- f_macro_string_dynamics_delete_simple(arguments);
+ f_macro_string_dynamics_t_delete_simple(arguments);
return status;
}
}
- f_macro_string_dynamic_new(status, data->chains.array[data->chains.used], length);
+ f_macro_string_dynamic_t_new(status, data->chains.array[data->chains.used], length);
if (F_status_is_error(status)) {
- f_macro_string_dynamics_delete_simple(arguments);
+ f_macro_string_dynamics_t_delete_simple(arguments);
return status;
}
fl_color_print_code(f_type_debug, data->context.warning);
fprintf(f_type_debug, "%s ", firewall_tool_iptables);
- for (f_string_length i = 0; i < arguments.used; i++) {
+ for (f_string_length_t i = 0; i < arguments.used; i++) {
fprintf(f_type_debug, "%.*s ", arguments.array[i].used, arguments.array[i].string);
} // for
#endif // _en_firewall_debug_
tool = firewall_program_iptables;
- status = fll_execute_program((f_string) firewall_tool_iptables, arguments, &results);
+ status = fll_execute_program((f_string_t) firewall_tool_iptables, arguments, &results);
if (F_status_is_not_error(status)) {
// print command when debugging.
fl_color_print_code(f_type_debug, data->context.warning);
fprintf(f_type_debug, "%s ", firewall_tool_ip6tables);
- for (f_string_length i = 0; i < arguments.used; i++) {
+ for (f_string_length_t i = 0; i < arguments.used; i++) {
fprintf(f_type_debug, "%.*s ", arguments.array[i].used, arguments.array[i].string);
} // for
#endif // _en_firewall_debug_
tool = firewall_program_ip6tables;
- status = fll_execute_program((f_string) firewall_tool_ip6tables, arguments, &results);
+ status = fll_execute_program((f_string_t) firewall_tool_ip6tables, arguments, &results);
}
if (F_status_is_error(status)) {
fprintf(f_type_error, "%s ", firewall_tool_ip6tables);
}
- for (f_string_length i = 0; i < arguments.used; i++) {
+ for (f_string_length_t i = 0; i < arguments.used; i++) {
fprintf(f_type_error, "%.*s ", arguments.array[i].used, arguments.array[i].string);
} // for
fl_color_print_line(f_type_error, data->context.error, data->context.reset, "INTERNAL ERROR: An unhandled error (%u) has occurred while calling fll_execute_program()", status);
}
- f_macro_string_dynamics_delete_simple(arguments);
+ f_macro_string_dynamics_t_delete_simple(arguments);
return status;
}
}
i++;
} // while
- f_macro_string_dynamics_delete_simple(arguments);
+ f_macro_string_dynamics_t_delete_simple(arguments);
return status;
}
-f_return_status firewall_delete_chains(const firewall_data data) {
- const f_string tools[2] = { firewall_tool_iptables, firewall_tool_ip6tables };
- f_status status = F_none;
+f_return_status firewall_delete_chains(const firewall_data_t data) {
+ const f_string_t tools[2] = { firewall_tool_iptables, firewall_tool_ip6tables };
+ f_status_t status = F_none;
- for (f_string_length i = 0; i < 2; i++) {
- f_string_dynamics arguments = f_string_dynamics_initialize;
- f_string_dynamic argument[1] = f_string_dynamic_initialize;
+ for (f_string_length_t i = 0; i < 2; i++) {
+ f_string_dynamics_t arguments = f_string_dynamics_t_initialize;
+ f_string_dynamic_t argument[1] = f_string_dynamic_t_initialize;
int results = 0;
- argument[0].string = (f_string) "-F";
+ argument[0].string = (f_string_t) "-F";
argument[0].size = 2;
argument[0].used = 2;
fl_color_print_code(f_type_debug, data.context.warning);
fprintf(f_type_debug, "%s ", tools[i]);
- for (f_string_length i = 0; i < arguments.used; i++) {
+ for (f_string_length_t i = 0; i < arguments.used; i++) {
fprintf(f_type_debug, "%.*s ", arguments.array[i].used, arguments.array[i].string);
} // for
fl_color_print_code(f_type_error, data.context.error);
fprintf(f_type_error, "%s ", tools[i]);
- for (f_string_length i = 0; i < arguments.used; i++) {
+ for (f_string_length_t i = 0; i < arguments.used; i++) {
fprintf(f_type_error, "%.*s ", arguments.array[i].used, arguments.array[i].string);
} // for
}
} // for
- for (f_string_length i = 0; i < 2; i++) {
- f_string_dynamics arguments = f_string_dynamics_initialize;
- f_string_dynamic argument[1] = f_string_dynamic_initialize;
+ for (f_string_length_t i = 0; i < 2; i++) {
+ f_string_dynamics_t arguments = f_string_dynamics_t_initialize;
+ f_string_dynamic_t argument[1] = f_string_dynamic_t_initialize;
int results = 0;
- argument[0].string = (f_string) firewall_chain_delete_command;
+ argument[0].string = (f_string_t) firewall_chain_delete_command;
argument[0].size = firewall_chain_delete_command_length;
argument[0].used = firewall_chain_delete_command_length;
fl_color_print_code(f_type_debug, data.context.warning);
fprintf(f_type_debug, "%s ", tools[i]);
- for (f_string_length j = 0; j < arguments.used; j++) {
+ for (f_string_length_t j = 0; j < arguments.used; j++) {
fprintf(f_type_debug, "%.*s ", arguments.array[j].used, arguments.array[j].string);
} // for
fl_color_print_code(f_type_error, data.context.error);
fprintf(f_type_error, "%s ", tools[i]);
- for (f_string_length j = 0; j < arguments.used; j++) {
+ for (f_string_length_t j = 0; j < arguments.used; j++) {
fprintf(f_type_error, "%.*s ", arguments.array[j].used, arguments.array[j].string);
} // for
return status;
}
-f_return_status firewall_default_lock(const firewall_data data) {
- const f_string chains[3] = { firewall_chain_input, firewall_chain_output, firewall_chain_forward };
- const f_string tools[2] = { firewall_tool_iptables, firewall_tool_ip6tables };
+f_return_status firewall_default_lock(const firewall_data_t data) {
+ const f_string_t chains[3] = { firewall_chain_input, firewall_chain_output, firewall_chain_forward };
+ const f_string_t tools[2] = { firewall_tool_iptables, firewall_tool_ip6tables };
- const f_string_length lengths[3] = { firewall_chain_input_length, firewall_chain_output_length, firewall_chain_forward_length };
+ const f_string_length_t lengths[3] = { firewall_chain_input_length, firewall_chain_output_length, firewall_chain_forward_length };
- f_status status = F_none;
+ f_status_t status = F_none;
- for (f_string_length i = 0; i < 3; i++) {
- f_string_dynamics arguments = f_string_dynamics_initialize;
- f_string_dynamic argument[3];
+ for (f_string_length_t i = 0; i < 3; i++) {
+ f_string_dynamics_t arguments = f_string_dynamics_t_initialize;
+ f_string_dynamic_t argument[3];
arguments.array = argument;
arguments.used = 3;
arguments.size = arguments.used;
- arguments.array[0].string = (f_string) firewall_action_policy_command;
- arguments.array[1].string = (f_string) chains[i];
- arguments.array[2].string = (f_string) "DROP";
+ arguments.array[0].string = (f_string_t) firewall_action_policy_command;
+ arguments.array[1].string = (f_string_t) chains[i];
+ arguments.array[2].string = (f_string_t) "DROP";
arguments.array[0].used = firewall_action_append_command_length;
arguments.array[1].used = lengths[i];
arguments.array[1].size = arguments.array[1].used;
arguments.array[2].size = arguments.array[2].used;
- for (f_string_length j = 0; j < 2; j++) {
+ for (f_string_length_t j = 0; j < 2; j++) {
int results = 0;
// print command when debugging.
fl_color_print_code(f_type_debug, data.context.warning);
fprintf(f_type_debug, "%s ", tools[j]);
- for (f_string_length k = 0; k < arguments.used; k++) {
+ for (f_string_length_t k = 0; k < arguments.used; k++) {
fprintf(f_type_debug, "%.*s ", arguments.array[k].used, arguments.array[k].string);
} // for
fl_color_print_code(f_type_error, data.context.error);
fprintf(f_type_error, "%s ", tools[j]);
- for (f_string_length k = 0; k < arguments.used; k++) {
+ for (f_string_length_t k = 0; k < arguments.used; k++) {
fprintf(f_type_error, "%.*s ", arguments.array[k].used, arguments.array[k].string);
} // for
return status;
}
-f_return_status firewall_buffer_rules(const f_string filename, const bool optional, firewall_local_data *local, firewall_data *data) {
- f_file file = f_file_initialize;
- f_status status = F_none;
+f_return_status firewall_buffer_rules(const f_string_t filename, const bool optional, firewall_local_data_t *local, firewall_data_t *data) {
+ f_file_t file = f_file_t_initialize;
+ f_status_t status = F_none;
status = f_file_open(filename, 0, &file);
return status;
}
else {
- f_string_range input = f_string_range_initialize;
+ f_string_range_t input = f_string_range_initialize;
input.stop = local->buffer.used - 1;
return status;
}
-f_return_status firewall_process_rules(f_string_range *range, firewall_local_data *local, firewall_data *data) {
- f_status status = F_none;
+f_return_status firewall_process_rules(f_string_range_t *range, firewall_local_data_t *local, firewall_data_t *data) {
+ f_status_t status = F_none;
status = fll_fss_extended_read(&local->buffer, range, &local->rule_objects, &local->rule_contents, 0, 0);
fl_color_print_line(f_type_error, data->context.error, data->context.reset, "INTERNAL ERROR: An unhandled error (%u) has occurred while calling firewall_perform_commands().", status);
}
- f_macro_fss_objects_delete_simple(local->rule_objects);
- f_macro_fss_contents_delete_simple(local->rule_contents);
+ f_macro_fss_objects_t_delete_simple(local->rule_objects);
+ f_macro_fss_contents_t_delete_simple(local->rule_contents);
return status;
}
}
- f_macro_fss_objects_delete_simple(local->rule_objects);
- f_macro_fss_contents_delete_simple(local->rule_contents);
+ f_macro_fss_objects_t_delete_simple(local->rule_objects);
+ f_macro_fss_contents_t_delete_simple(local->rule_contents);
return status;
}
-f_return_status firewall_delete_local_data(firewall_local_data *local) {
- f_status status = F_none;
+f_return_status firewall_delete_local_data(firewall_local_data_t *local) {
+ f_status_t status = F_none;
local->is_global = F_true;
local->is_main = F_false;
local->device = 0;
local->chain = 0;
- f_macro_string_dynamic_delete_simple(local->buffer);
- f_macro_array_lengths_delete_simple(local->chain_ids);
- f_macro_fss_objects_delete_simple(local->chain_objects);
- f_macro_fss_contents_delete_simple(local->chain_contents);
- f_macro_fss_objects_delete_simple(local->rule_objects);
- f_macro_fss_contents_delete_simple(local->rule_contents);
+ f_macro_string_dynamic_t_delete_simple(local->buffer);
+ f_macro_array_lengths_t_delete_simple(local->chain_ids);
+ f_macro_fss_objects_t_delete_simple(local->chain_objects);
+ f_macro_fss_contents_t_delete_simple(local->chain_contents);
+ f_macro_fss_objects_t_delete_simple(local->rule_objects);
+ f_macro_fss_contents_t_delete_simple(local->rule_contents);
return F_none;
}
bool is_stop;
bool is_lock;
- f_array_length device;
-
- f_string_dynamic buffer;
- f_array_length chain;
- f_array_lengths chain_ids;
- f_fss_objects chain_objects;
- f_fss_contents chain_contents;
- f_fss_objects rule_objects;
- f_fss_contents rule_contents;
-} firewall_local_data;
-
-#define firewall_local_data_initialize \
+ f_array_length_t device;
+
+ f_string_dynamic_t buffer;
+ f_array_length_t chain;
+ f_array_lengths_t chain_ids;
+ f_fss_objects_t chain_objects;
+ f_fss_contents_t chain_contents;
+ f_fss_objects_t rule_objects;
+ f_fss_contents_t rule_contents;
+} firewall_local_data_t;
+
+#define firewall_local_data_t_initialize \
{ \
F_true, \
F_false, \
F_false, \
F_false, \
0, \
- f_string_dynamic_initialize, \
+ f_string_dynamic_t_initialize, \
0, \
- f_array_lengths_initialize, \
- f_fss_objects_initialize, \
- f_fss_contents_initialize, \
- f_fss_objects_initialize, \
- f_fss_contents_initialize, \
+ f_array_lengths_t_initialize, \
+ f_fss_objects_t_initialize, \
+ f_fss_contents_t_initialize, \
+ f_fss_objects_t_initialize, \
+ f_fss_contents_t_initialize, \
}
typedef struct {
bool has_stop;
bool has_lock;
- f_array_length main_at;
- f_array_length stop_at;
- f_array_length lock_at;
-} firewall_reserved_chains;
+ f_array_length_t main_at;
+ f_array_length_t stop_at;
+ f_array_length_t lock_at;
+} firewall_reserved_chains_t;
-#define firewall_reserved_chains_initialize \
+#define firewall_reserved_chains_t_initialize \
{ \
F_false, \
F_false, \
}
#define firewall_macro_delete_fss_buffers(status, buffer, objects, contents) \
- f_macro_string_dynamic_delete(status, buffer); \
- f_macro_fss_objects_delete(status, objects); \
- f_macro_fss_contents_delete(status, contents);
+ f_macro_string_dynamic_t_delete(status, buffer); \
+ f_macro_fss_objects_t_delete(status, objects); \
+ f_macro_fss_contents_t_delete(status, contents);
#define firewall_macro_concat_string(destination, source, length) \
memcpy((void *)(destination), source, length);
arguments.array[arguments.used].used = argument.used; \
arguments.used++; \
\
- f_macro_string_dynamic_clear(argument);
+ f_macro_string_dynamic_t_clear(argument);
/**
* Perform commands.
*
* Status codes (with error bit) are returned on any problem.
*/
-f_return_status firewall_perform_commands(const firewall_local_data local, const firewall_data data) f_gcc_attribute_visibility_internal;
+f_return_status firewall_perform_commands(const firewall_local_data_t local, const firewall_data_t data) f_gcc_attribute_visibility_internal;
/**
* Create custom chains.
*
* Status codes (with error bit) are returned on any problem.
*/
-f_return_status firewall_create_custom_chains(firewall_reserved_chains *reserved, firewall_local_data *local, firewall_data *data) f_gcc_attribute_visibility_internal;
+f_return_status firewall_create_custom_chains(firewall_reserved_chains_t *reserved, firewall_local_data_t *local, firewall_data_t *data) f_gcc_attribute_visibility_internal;
/**
* Deallocate chains.
*
* Status codes (with error bit) are returned on any problem.
*/
-f_return_status firewall_delete_chains(const firewall_data data) f_gcc_attribute_visibility_internal;
+f_return_status firewall_delete_chains(const firewall_data_t data) f_gcc_attribute_visibility_internal;
/**
* Lock the firewall.
*
* Status codes (with error bit) are returned on any problem.
*/
-f_return_status firewall_default_lock(const firewall_data data) f_gcc_attribute_visibility_internal;
+f_return_status firewall_default_lock(const firewall_data_t data) f_gcc_attribute_visibility_internal;
/**
* Buffer firewall rules.
*
* Status codes (with error bit) are returned on any problem.
*/
-f_return_status firewall_buffer_rules(const f_string filename, const bool optional, firewall_local_data *local, firewall_data *data) f_gcc_attribute_visibility_internal;
+f_return_status firewall_buffer_rules(const f_string_t filename, const bool optional, firewall_local_data_t *local, firewall_data_t *data) f_gcc_attribute_visibility_internal;
/**
* Process buffered rules.
*
* Status codes (with error bit) are returned on any problem.
*/
-f_return_status firewall_process_rules(f_string_range *range, firewall_local_data *local, firewall_data *data) f_gcc_attribute_visibility_internal;
+f_return_status firewall_process_rules(f_string_range_t *range, firewall_local_data_t *local, firewall_data_t *data) f_gcc_attribute_visibility_internal;
/**
* Delete allocated data.
*
* Status codes (with error bit) are returned on any problem.
*/
-f_return_status firewall_delete_local_data(firewall_local_data *local) f_gcc_attribute_visibility_internal;
+f_return_status firewall_delete_local_data(firewall_local_data_t *local) f_gcc_attribute_visibility_internal;
#ifdef __cplusplus
} // extern "C"
#endif
#ifndef _di_fss_basic_list_read_print_help_
- f_return_status fss_basic_list_read_print_help(const fl_color_context context) {
+ f_return_status fss_basic_list_read_print_help(const fl_color_context_t context) {
fll_program_print_help_header(context, fss_basic_list_read_name_long, fss_basic_list_read_version);
fll_program_print_help_option(context, f_console_standard_short_help, f_console_standard_long_help, f_console_symbol_short_enable, f_console_symbol_long_enable, " Print this help message.");
#endif // _di_fss_basic_list_read_print_help_
#ifndef _di_fss_basic_list_read_main_
- f_return_status fss_basic_list_read_main(const f_console_arguments arguments, fss_basic_list_read_data *data) {
- f_status status = F_none;
+ f_return_status fss_basic_list_read_main(const f_console_arguments_t arguments, fss_basic_list_read_data_t *data) {
+ f_status_t status = F_none;
{
- f_console_parameters parameters = { data->parameters, fss_basic_list_read_total_parameters };
- f_console_parameter_id ids[3] = { fss_basic_list_read_parameter_no_color, fss_basic_list_read_parameter_light, fss_basic_list_read_parameter_dark };
- f_console_parameter_ids choices = { ids, 3 };
+ f_console_parameters_t parameters = { data->parameters, fss_basic_list_read_total_parameters };
+ f_console_parameter_id_t ids[3] = { fss_basic_list_read_parameter_no_color, fss_basic_list_read_parameter_light, fss_basic_list_read_parameter_dark };
+ f_console_parameter_ids_t choices = { ids, 3 };
status = fll_program_parameter_process(arguments, parameters, choices, F_true, &data->remaining, &data->context);
}
}
- fss_basic_list_read_depths depths = fss_basic_list_read_depths_initialize;
+ fss_basic_list_read_depths_t depths = fss_basic_list_read_depths_t_initialize;
- f_string_length counter = 0;
- f_string_length original_size = data->quantity.total;
+ f_string_length_t counter = 0;
+ f_string_length_t original_size = data->quantity.total;
status = fss_basic_list_read_main_preprocess_depth(arguments, *data, &depths);
if (F_status_is_error(status)) {
- macro_fss_basic_list_read_depths_delete_simple(depths);
+ macro_fss_basic_list_read_depths_t_delete_simple(depths);
fss_basic_list_read_delete_data(data);
return status;
}
// This standard does not support nesting, so any depth greater than 0 can be predicted without processing the file.
if (depths.array[0].depth > 0) {
- macro_fss_basic_list_read_depths_delete_simple(depths);
+ macro_fss_basic_list_read_depths_t_delete_simple(depths);
if (data->parameters[fss_basic_list_read_parameter_total].result == f_console_result_found) {
fprintf(f_type_output, "0%c", f_string_eol[0]);
fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_select);
fl_color_print_line(f_type_error, data->context.error, data->context.reset, "' parameter requires a positive number.");
- macro_fss_basic_list_read_depths_delete_simple(depths);
+ macro_fss_basic_list_read_depths_t_delete_simple(depths);
fss_basic_list_read_delete_data(data);
return F_status_set_error(F_parameter);
}
if (data->process_pipe) {
- f_file file = f_file_initialize;
+ f_file_t file = f_file_t_initialize;
file.id = f_type_descriptor_input;
if (F_status_is_error(status)) {
fss_basic_list_read_print_file_error(data->context, "f_file_read", "-", F_status_set_fine(status));
- macro_fss_basic_list_read_depths_delete_simple(depths);
+ macro_fss_basic_list_read_depths_t_delete_simple(depths);
fss_basic_list_read_delete_data(data);
return status;
}
status = fss_basic_list_read_main_process_file(arguments, data, "-", depths);
if (F_status_is_error(status)) {
- macro_fss_basic_list_read_depths_delete_simple(depths);
+ macro_fss_basic_list_read_depths_t_delete_simple(depths);
fss_basic_list_read_delete_data(data);
return status;
}
// Clear buffers before continuing.
- f_macro_fss_contents_delete_simple(data->contents);
- f_macro_fss_objects_delete_simple(data->objects);
- f_macro_string_dynamic_delete_simple(data->buffer);
+ f_macro_fss_contents_t_delete_simple(data->contents);
+ f_macro_fss_objects_t_delete_simple(data->objects);
+ f_macro_string_dynamic_t_delete_simple(data->buffer);
}
if (data->remaining.used > 0) {
for (; counter < data->remaining.used; counter++) {
- f_file file = f_file_initialize;
+ f_file_t file = f_file_t_initialize;
status = f_file_open(arguments.argv[data->remaining.array[counter]], 0, &file);
if (F_status_is_error(status)) {
fss_basic_list_read_print_file_error(data->context, "f_file_open", arguments.argv[data->remaining.array[counter]], F_status_set_fine(status));
- macro_fss_basic_list_read_depths_delete_simple(depths);
+ macro_fss_basic_list_read_depths_t_delete_simple(depths);
fss_basic_list_read_delete_data(data);
return status;
}
f_file_close(&file.id);
- macro_fss_basic_list_read_depths_delete_simple(depths);
+ macro_fss_basic_list_read_depths_t_delete_simple(depths);
fss_basic_list_read_delete_data(data);
return status;
}
if (F_status_is_error(status)) {
fss_basic_list_read_print_file_error(data->context, "f_file_read_until", arguments.argv[data->remaining.array[counter]], F_status_set_fine(status));
- macro_fss_basic_list_read_depths_delete_simple(depths);
+ macro_fss_basic_list_read_depths_t_delete_simple(depths);
fss_basic_list_read_delete_data(data);
return status;
}
status = fss_basic_list_read_main_process_file(arguments, data, arguments.argv[data->remaining.array[counter]], depths);
if (F_status_is_error(status)) {
- macro_fss_basic_list_read_depths_delete_simple(depths);
+ macro_fss_basic_list_read_depths_t_delete_simple(depths);
fss_basic_list_read_delete_data(data);
return status;
}
// Clear buffers before repeating the loop.
- f_macro_fss_contents_delete_simple(data->contents);
- f_macro_fss_objects_delete_simple(data->objects);
- f_macro_string_dynamic_delete_simple(data->buffer);
+ f_macro_fss_contents_t_delete_simple(data->contents);
+ f_macro_fss_objects_t_delete_simple(data->objects);
+ f_macro_string_dynamic_t_delete_simple(data->buffer);
} // for
}
- macro_fss_basic_list_read_depths_delete_simple(depths);
+ macro_fss_basic_list_read_depths_t_delete_simple(depths);
}
else {
fl_color_print_line(f_type_error, data->context.error, data->context.reset, "ERROR: You failed to specify one or more files.");
#endif // _di_fss_basic_list_read_main_
#ifndef _di_fss_basic_list_read_delete_data_
- f_return_status fss_basic_list_read_delete_data(fss_basic_list_read_data *data) {
- f_status status = F_none;
- f_string_length i = 0;
+ f_return_status fss_basic_list_read_delete_data(fss_basic_list_read_data_t *data) {
+ f_status_t status = F_none;
+ f_string_length_t i = 0;
while (i < fss_basic_list_read_total_parameters) {
- f_macro_string_lengths_delete_simple(data->parameters[i].locations);
- f_macro_string_lengths_delete_simple(data->parameters[i].additional);
+ f_macro_string_lengths_t_delete_simple(data->parameters[i].locations);
+ f_macro_string_lengths_t_delete_simple(data->parameters[i].additional);
i++;
} // while
- f_macro_fss_contents_delete_simple(data->contents);
- f_macro_fss_objects_delete_simple(data->objects);
- f_macro_string_dynamic_delete_simple(data->buffer);
- f_macro_string_lengths_delete_simple(data->remaining);
+ f_macro_fss_contents_t_delete_simple(data->contents);
+ f_macro_fss_objects_t_delete_simple(data->objects);
+ f_macro_string_dynamic_t_delete_simple(data->buffer);
+ f_macro_string_lengths_t_delete_simple(data->remaining);
- fl_macro_color_context_delete_simple(data->context);
+ fl_macro_color_context_t_delete_simple(data->context);
return F_none;
}
*
* This is the FSS Basic List Read program
* This program utilizes the Featureless Linux Library.
- * This program processes files or other input in fss format and stores the results in the fss_basic_list_read_data.
+ * This program processes files or other input in fss format and stores the results in the fss_basic_list_read_data_t.
*
* This processes in accordance to the FSS-0002 Basic List specification.
*/
fss_basic_list_read_parameter_trim,
};
- #define f_console_parameter_initialize_fss_basic_list_read \
+ #define fss_basic_list_read_console_parameter_t_initialize \
{ \
- f_console_parameter_initialize(f_console_standard_short_help, f_console_standard_long_help, 0, F_false, f_console_type_normal), \
- f_console_parameter_initialize(f_console_standard_short_light, f_console_standard_long_light, 0, F_false, f_console_type_inverse), \
- f_console_parameter_initialize(f_console_standard_short_dark, f_console_standard_long_dark, 0, F_false, f_console_type_inverse), \
- f_console_parameter_initialize(f_console_standard_short_no_color, f_console_standard_long_no_color, 0, F_false, f_console_type_inverse), \
- f_console_parameter_initialize(f_console_standard_short_version, f_console_standard_long_version, 0, F_false, f_console_type_inverse), \
- f_console_parameter_initialize(fss_basic_list_read_short_at, fss_basic_list_read_long_at, 0, F_true, f_console_type_normal), \
- f_console_parameter_initialize(fss_basic_list_read_short_depth, fss_basic_list_read_long_depth, 0, F_true, f_console_type_normal), \
- f_console_parameter_initialize(fss_basic_list_read_short_empty, fss_basic_list_read_long_empty, 0, F_false, f_console_type_normal), \
- f_console_parameter_initialize(fss_basic_list_read_short_line, fss_basic_list_read_long_line, 0, F_true, f_console_type_normal), \
- f_console_parameter_initialize(fss_basic_list_read_short_name, fss_basic_list_read_long_name, 0, F_true, f_console_type_normal), \
- f_console_parameter_initialize(fss_basic_list_read_short_object, fss_basic_list_read_long_object, 0, F_false, f_console_type_normal), \
- f_console_parameter_initialize(fss_basic_list_read_short_select, fss_basic_list_read_long_select, 0, F_true, f_console_type_normal), \
- f_console_parameter_initialize(fss_basic_list_read_short_total, fss_basic_list_read_long_total, 0, F_false, f_console_type_normal), \
- f_console_parameter_initialize(fss_basic_list_read_short_trim, fss_basic_list_read_long_trim, 0, F_false, f_console_type_normal), \
+ f_console_parameter_t_initialize(f_console_standard_short_help, f_console_standard_long_help, 0, F_false, f_console_type_normal), \
+ f_console_parameter_t_initialize(f_console_standard_short_light, f_console_standard_long_light, 0, F_false, f_console_type_inverse), \
+ f_console_parameter_t_initialize(f_console_standard_short_dark, f_console_standard_long_dark, 0, F_false, f_console_type_inverse), \
+ f_console_parameter_t_initialize(f_console_standard_short_no_color, f_console_standard_long_no_color, 0, F_false, f_console_type_inverse), \
+ f_console_parameter_t_initialize(f_console_standard_short_version, f_console_standard_long_version, 0, F_false, f_console_type_inverse), \
+ f_console_parameter_t_initialize(fss_basic_list_read_short_at, fss_basic_list_read_long_at, 0, F_true, f_console_type_normal), \
+ f_console_parameter_t_initialize(fss_basic_list_read_short_depth, fss_basic_list_read_long_depth, 0, F_true, f_console_type_normal), \
+ f_console_parameter_t_initialize(fss_basic_list_read_short_empty, fss_basic_list_read_long_empty, 0, F_false, f_console_type_normal), \
+ f_console_parameter_t_initialize(fss_basic_list_read_short_line, fss_basic_list_read_long_line, 0, F_true, f_console_type_normal), \
+ f_console_parameter_t_initialize(fss_basic_list_read_short_name, fss_basic_list_read_long_name, 0, F_true, f_console_type_normal), \
+ f_console_parameter_t_initialize(fss_basic_list_read_short_object, fss_basic_list_read_long_object, 0, F_false, f_console_type_normal), \
+ f_console_parameter_t_initialize(fss_basic_list_read_short_select, fss_basic_list_read_long_select, 0, F_true, f_console_type_normal), \
+ f_console_parameter_t_initialize(fss_basic_list_read_short_total, fss_basic_list_read_long_total, 0, F_false, f_console_type_normal), \
+ f_console_parameter_t_initialize(fss_basic_list_read_short_trim, fss_basic_list_read_long_trim, 0, F_false, f_console_type_normal), \
}
#define fss_basic_list_read_total_parameters 14
#endif // _di_fss_basic_list_read_defines_
-#ifndef _di_fss_basic_list_read_data_
+#ifndef _di_fss_basic_list_read_data_t_
typedef struct {
- f_console_parameter parameters[fss_basic_list_read_total_parameters];
+ f_console_parameter_t parameters[fss_basic_list_read_total_parameters];
- f_string_dynamic buffer;
- f_fss_objects objects;
- f_fss_contents contents;
- f_string_quantity quantity;
- f_string_lengths remaining;
+ f_string_dynamic_t buffer;
+ f_fss_objects_t objects;
+ f_fss_contents_t contents;
+ f_string_quantity_t quantity;
+ f_string_lengths_t remaining;
bool process_pipe;
- fl_color_context context;
- } fss_basic_list_read_data;
+ fl_color_context_t context;
+ } fss_basic_list_read_data_t;
- #define fss_basic_list_read_data_initialize \
+ #define fss_basic_list_read_data_t_initialize \
{ \
- f_console_parameter_initialize_fss_basic_list_read, \
- f_string_dynamic_initialize, \
- f_fss_objects_initialize, \
- f_fss_contents_initialize, \
- f_string_quantity_initialize, \
- f_string_lengths_initialize, \
+ fss_basic_list_read_console_parameter_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_fss_objects_t_initialize, \
+ f_fss_contents_t_initialize, \
+ f_string_quantity_t_initialize, \
+ f_string_lengths_t_initialize, \
F_false, \
- fl_color_context_initialize, \
+ fl_color_context_t_initialize, \
}
-#endif // _di_fss_basic_list_read_data_
+#endif // _di_fss_basic_list_read_data_t_
/**
* Print help to standard output.
* F_none on success.
*/
#ifndef _di_fss_basic_list_read_print_help_
- extern f_return_status fss_basic_list_read_print_help(const fl_color_context context);
+ extern f_return_status fss_basic_list_read_print_help(const fl_color_context_t context);
#endif // _di_fss_basic_list_read_print_help_
/**
* @see fss_basic_list_read_delete_data()
*/
#ifndef _di_fss_basic_list_read_main_
- extern f_return_status fss_basic_list_read_main(const f_console_arguments arguments, fss_basic_list_read_data *data);
+ extern f_return_status fss_basic_list_read_main(const f_console_arguments_t arguments, fss_basic_list_read_data_t *data);
#endif // _di_fss_basic_list_read_main_
/**
* @see fss_basic_list_read_main()
*/
#ifndef _di_fss_basic_list_read_delete_data_
- extern f_return_status fss_basic_list_read_delete_data(fss_basic_list_read_data *data);
+ extern f_return_status fss_basic_list_read_delete_data(fss_basic_list_read_data_t *data);
#endif // _di_fss_basic_list_read_delete_data_
#ifdef __cplusplus
#include "fss_basic_list_read.h"
-int main(const unsigned long argc, const f_string *argv) {
- const f_console_arguments arguments = { argc, argv };
- fss_basic_list_read_data data = fss_basic_list_read_data_initialize;
+int main(const unsigned long argc, const f_string_t *argv) {
+ const f_console_arguments_t arguments = { argc, argv };
+ fss_basic_list_read_data_t data = fss_basic_list_read_data_t_initialize;
if (f_pipe_input_exists()) {
data.process_pipe = F_true;
}
- f_status status = fss_basic_list_read_main(arguments, &data);
+ f_status_t status = fss_basic_list_read_main(arguments, &data);
if (F_status_is_error(status)) {
return 1;
#endif
#ifndef _di_fss_basic_list_read_print_file_error_
- void fss_basic_list_read_print_file_error(const fl_color_context context, const f_string function_name, const f_string file_name, const f_status status) {
+ void fss_basic_list_read_print_file_error(const fl_color_context_t context, const f_string_t function_name, const f_string_t file_name, const f_status_t status) {
if (fll_file_error_print(f_type_error, context, function_name, file_name, status) == F_false) {
fl_color_print(f_type_error, context.error, context.reset, "INTERNAL ERROR: An unhandled error (");
#endif // _di_fss_basic_list_read_print_file_error_
#ifndef _di_fss_basic_list_read_print_number_argument_error_
- void fss_basic_list_read_print_number_argument_error(const fl_color_context context, const f_string function_name, const f_string parameter_name, const f_string argument, const f_status status) {
+ void fss_basic_list_read_print_number_argument_error(const fl_color_context_t context, const f_string_t function_name, const f_string_t parameter_name, const f_string_t argument, const f_status_t status) {
if (status == F_parameter) {
fl_color_print(f_type_error, context.error, context.reset, "INTERNAL ERROR: Invalid parameter when calling ");
#endif // _di_fss_basic_list_read_print_number_argument_error_
#ifndef _di_fss_basic_list_read_main_preprocess_depth_
- f_return_status fss_basic_list_read_main_preprocess_depth(const f_console_arguments arguments, const fss_basic_list_read_data data, fss_basic_list_read_depths *depths) {
- f_status status = F_none;
+ f_return_status fss_basic_list_read_main_preprocess_depth(const f_console_arguments_t arguments, const fss_basic_list_read_data_t data, fss_basic_list_read_depths_t *depths) {
+ f_status_t status = F_none;
{
- f_array_length depth_size = 1;
+ f_array_length_t depth_size = 1;
if (data.parameters[fss_basic_list_read_parameter_depth].result == f_console_result_additional) {
depth_size = data.parameters[fss_basic_list_read_parameter_depth].additional.used;
}
- macro_fss_basic_list_read_depths_new(status, (*depths), depth_size);
+ macro_fss_basic_list_read_depths_t_new(status, (*depths), depth_size);
if (F_status_is_error(status)) {
fl_color_print_line(f_type_error, data.context.error, data.context.reset, "CRITICAL ERROR: Unable to allocate memory.");
return status;
depths->used = depth_size;
}
- f_array_length position_depth = 0;
- f_array_length position_at = 0;
- f_array_length position_name = 0;
+ f_array_length_t position_depth = 0;
+ f_array_length_t position_at = 0;
+ f_array_length_t position_name = 0;
- for (f_array_length i = 0; i < depths->used; i++) {
+ for (f_array_length_t i = 0; i < depths->used; i++) {
depths->array[i].depth = 0;
depths->array[i].index_at = 0;
depths->array[i].index_name = 0;
depths->array[i].value_at = 0;
- f_macro_string_dynamic_clear(depths->array[i].value_name);
+ f_macro_string_dynamic_t_clear(depths->array[i].value_name);
if (data.parameters[fss_basic_list_read_parameter_depth].additional.used == 0) {
position_depth = 0;
else {
position_depth = data.parameters[fss_basic_list_read_parameter_depth].additional.array[i];
- const f_string_range range = f_macro_string_range_initialize(strlen(arguments.argv[position_depth]));
+ const f_string_range_t range = f_macro_string_range_initialize(strlen(arguments.argv[position_depth]));
status = fl_conversion_string_to_number_unsigned(arguments.argv[position_depth], &depths->array[i].depth, range);
if (F_status_is_error(status)) {
depths->array[i].index_at = data.parameters[fss_basic_list_read_parameter_at].additional.array[position_at];
- const f_string_range range = f_macro_string_range_initialize(strlen(arguments.argv[depths->array[i].index_at]));
+ const f_string_range_t range = f_macro_string_range_initialize(strlen(arguments.argv[depths->array[i].index_at]));
status = fl_conversion_string_to_number_unsigned(arguments.argv[depths->array[i].index_at], &depths->array[i].value_at, range);
if (F_status_is_error(status)) {
}
if (F_status_is_error(status)) {
- f_status status_code = F_status_set_fine(status);
+ f_status_t status_code = F_status_set_fine(status);
// @todo: move error printing into common function.
if (status_code == F_memory_allocation || status_code == F_memory_reallocation) {
fl_color_print_line(f_type_error, data.context.error, data.context.reset, "CRITICAL ERROR: Unable to allocate memory.");
}
- else if (status_code == f_string_length_size) {
+ else if (status_code == f_string_length_t_size) {
fl_color_print(f_type_error, data.context.error, data.context.reset, "ERROR: Unable to process '");
fl_color_print(f_type_error, data.context.notable, data.context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_trim);
fl_color_print_line(f_type_error, data.context.error, data.context.reset, "' because the maximum buffer size was reached.");
}
else {
- f_string function = "fl_string_append";
+ f_string_t function = "fl_string_append";
if (data.parameters[fss_basic_list_read_parameter_trim].result == f_console_result_found) {
function = "fl_string_rip";
}
} // for
- for (f_array_length i = 0; i < depths->used; i++) {
- for (f_array_length j = i + 1; j < depths->used; j++) {
+ for (f_array_length_t i = 0; i < depths->used; i++) {
+ for (f_array_length_t j = i + 1; j < depths->used; j++) {
if (depths->array[i].depth == depths->array[j].depth) {
fl_color_print(f_type_error, data.context.error, data.context.reset, "ERROR: The value '");
fl_color_print(f_type_error, data.context.notable, data.context.reset, "%llu", depths->array[i].depth);
#endif // _di_fss_basic_list_read_main_preprocess_depth_
#ifndef _di_fss_basic_list_read_main_process_file_
- f_return_status fss_basic_list_read_main_process_file(const f_console_arguments arguments, fss_basic_list_read_data *data, const f_string filename, const fss_basic_list_read_depths depths) {
- f_status status = F_none;
+ f_return_status fss_basic_list_read_main_process_file(const f_console_arguments_t arguments, fss_basic_list_read_data_t *data, const f_string_t filename, const fss_basic_list_read_depths_t depths) {
+ f_status_t status = F_none;
{
- f_string_range input = f_string_range_initialize;
+ f_string_range_t input = f_string_range_initialize;
input.start = 0;
input.stop = data->buffer.used - 1;
}
else if (status == F_data_not_stop || status == F_data_not_eos) {
// Clear buffers, then attempt the next file.
- f_macro_fss_contents_delete_simple(data->contents);
- f_macro_fss_objects_delete_simple(data->objects);
- f_macro_string_dynamic_delete_simple(data->buffer);
+ f_macro_fss_contents_t_delete_simple(data->contents);
+ f_macro_fss_objects_t_delete_simple(data->objects);
+ f_macro_string_dynamic_t_delete_simple(data->buffer);
return F_status_set_warning(status);
}
}
- f_string_length select = 0;
+ f_string_length_t select = 0;
if (data->parameters[fss_basic_list_read_parameter_select].result == f_console_result_additional) {
- const f_string_length index = data->parameters[fss_basic_list_read_parameter_select].additional.array[data->parameters[fss_basic_list_read_parameter_select].additional.used - 1];
- const f_string_range range = f_macro_string_range_initialize(strlen(arguments.argv[index]));
+ const f_string_length_t index = data->parameters[fss_basic_list_read_parameter_select].additional.array[data->parameters[fss_basic_list_read_parameter_select].additional.used - 1];
+ const f_string_range_t range = f_macro_string_range_initialize(strlen(arguments.argv[index]));
status = fl_conversion_string_to_number_unsigned(arguments.argv[index], &select, range);
if (F_status_is_error(status)) {
}
}
- f_string_length line = 0;
+ f_string_length_t line = 0;
if (data->parameters[fss_basic_list_read_parameter_line].result == f_console_result_additional) {
- const f_string_length index = data->parameters[fss_basic_list_read_parameter_line].additional.array[data->parameters[fss_basic_list_read_parameter_line].additional.used - 1];
- const f_string_range range = f_macro_string_range_initialize(strlen(arguments.argv[index]));
+ const f_string_length_t index = data->parameters[fss_basic_list_read_parameter_line].additional.array[data->parameters[fss_basic_list_read_parameter_line].additional.used - 1];
+ const f_string_range_t range = f_macro_string_range_initialize(strlen(arguments.argv[index]));
status = fl_conversion_string_to_number_unsigned(arguments.argv[index], &line, range);
if (F_status_is_error(status)) {
if (depths.array[0].index_name > 0) {
memset(names, 0, sizeof(bool) * data->objects.used);
- f_string_length name_length = 0;
+ f_string_length_t name_length = 0;
if (data->parameters[fss_basic_list_read_parameter_trim].result == f_console_result_found) {
- for (f_string_length i = 0; i < data->objects.used; i++) {
+ for (f_string_length_t i = 0; i < data->objects.used; i++) {
name_length = (data->objects.array[i].stop - data->objects.array[i].start) + 1;
if (name_length == depths.array[0].value_name.used) {
} // for
}
else {
- for (f_string_length i = 0; i < data->objects.used; i++) {
+ for (f_string_length_t i = 0; i < data->objects.used; i++) {
name_length = (data->objects.array[i].stop - data->objects.array[i].start) + 1;
if (name_length == depths.array[0].value_name.used) {
}
}
else if (depths.array[0].index_name > 0) {
- f_string_length total = 0;
+ f_string_length_t total = 0;
- for (f_string_length i = 0; i < data->objects.used; i++) {
+ for (f_string_length_t i = 0; i < data->objects.used; i++) {
if (names[i] == 0) continue;
total++;
return F_none;
}
- f_return_status (*print_object)(FILE *, const f_string_static, const f_string_range) = &f_print_string_dynamic_partial;
+ f_return_status (*print_object)(FILE *, const f_string_static_t, const f_string_range_t) = &f_print_string_dynamic_partial;
if (data->parameters[fss_basic_list_read_parameter_trim].result == f_console_result_found) {
print_object = &fl_print_trim_string_dynamic_partial;
}
if (depths.array[0].index_at > 0) {
- f_array_length at = 0;
- f_array_length i = 0;
+ f_array_length_t at = 0;
+ f_array_length_t i = 0;
for (; i < data->objects.used; i++) {
if (names[i]) {
return F_none;
}
- for (f_string_length i = 0; i < data->objects.used; i++) {
+ for (f_string_length_t i = 0; i < data->objects.used; i++) {
if (names[i] == 0) continue;
print_object(f_type_output, data->buffer, data->objects.array[i]);
return F_none;
}
- f_array_length at = 0;
- f_array_length i = 0;
+ f_array_length_t at = 0;
+ f_array_length_t i = 0;
for (; i < data->objects.used; i++) {
if (names[i]) {
fprintf(f_type_output, "0%c", f_string_eol[0]);
}
else {
- f_string_length total = 1;
+ f_string_length_t total = 1;
- for (f_string_length j = data->contents.array[i].array[0].start; j <= data->contents.array[i].array[0].stop; j++) {
+ for (f_string_length_t j = data->contents.array[i].array[0].start; j <= data->contents.array[i].array[0].stop; j++) {
if (data->buffer.string[j] == 0) continue;
if (data->buffer.string[j] == f_string_eol[0]) {
}
}
else {
- f_string_length i = data->contents.array[i].array[0].start;
+ f_string_length_t i = data->contents.array[i].array[0].start;
if (line == 0) {
for (; i <= data->contents.array[i].array[0].stop; i++) {
} // for
}
else {
- f_string_length line_current = 0;
+ f_string_length_t line_current = 0;
for (; i <= data->contents.array[i].array[0].stop; i++) {
if (data->buffer.string[i] == 0) continue;
}
if (data->parameters[fss_basic_list_read_parameter_total].result == f_console_result_found) {
- f_string_length total = 0;
+ f_string_length_t total = 0;
- for (f_string_length i = 0; i < data->objects.used; i++) {
+ for (f_string_length_t i = 0; i < data->objects.used; i++) {
if (!names[i]) continue;
if (data->contents.array[i].used == 0) {
continue;
}
- for (f_string_length j = data->contents.array[i].array[0].start; j <= data->contents.array[i].array[0].stop; j++) {
+ for (f_string_length_t j = data->contents.array[i].array[0].start; j <= data->contents.array[i].array[0].stop; j++) {
if (data->buffer.string[j] == 0) continue;
if (data->buffer.string[j] == f_string_eol[0]) {
}
if (data->parameters[fss_basic_list_read_parameter_line].result == f_console_result_additional) {
- f_string_length line_current = 0;
- f_string_length i = 0;
- f_string_length j = 0;
+ f_string_length_t line_current = 0;
+ f_string_length_t i = 0;
+ f_string_length_t j = 0;
for (; i < data->contents.used; i++) {
if (!names[i]) {
return F_none;
}
- for (f_string_length i = 0; i < data->contents.used; i++) {
+ for (f_string_length_t i = 0; i < data->contents.used; i++) {
if (!names[i]) {
continue;
}
* value_at: the value of the "--at" parameter, already processed and ready to use, only when index_at > 0.
* value_name: the value of the "--name" parameter, already processed and ready to use, only when index_name > 0.
*/
-#ifndef _di_fss_basic_list_read_depth_
+#ifndef _di_fss_basic_list_read_depth_t_
typedef struct {
- f_string_length depth;
+ f_string_length_t depth;
- f_array_length index_at;
- f_array_length index_name;
+ f_array_length_t index_at;
+ f_array_length_t index_name;
- f_number_unsigned value_at;
- f_string_dynamic value_name;
- } fss_basic_list_read_depth;
+ f_number_unsigned_t value_at;
+ f_string_dynamic_t value_name;
+ } fss_basic_list_read_depth_t;
- #define fss_basic_list_read_depth_initialize \
+ #define fss_basic_list_read_depth_t_initialize \
{ \
0, \
0, \
0, \
0, \
- f_string_dynamic_initialize, \
+ f_string_dynamic_t_initialize, \
}
- #define macro_fss_basic_list_read_depth_clear(structure) \
+ #define macro_fss_basic_list_read_depth_t_clear(structure) \
structure.depth = 0; \
structure.index_at = 0; \
structure.index_name = 0; \
structure.value_at = 0; \
- f_macro_string_dynamic_clear(structure.value_name)
+ f_macro_string_dynamic_t_clear(structure.value_name)
- #define macro_fss_basic_list_read_depth_delete(status, structure) f_macro_string_dynamic_delete(status, structure.value_name)
- #define macro_fss_basic_list_read_depth_destroy(status, structure) f_macro_string_dynamic_destroy(status, structure.value_name)
+ #define macro_fss_basic_list_read_depth_t_delete(status, structure) f_macro_string_dynamic_t_delete(status, structure.value_name)
+ #define macro_fss_basic_list_read_depth_t_destroy(status, structure) f_macro_string_dynamic_t_destroy(status, structure.value_name)
- #define macro_fss_basic_list_read_depth_delete_simple(structure) f_macro_string_dynamic_delete_simple(structure.value_name)
- #define macro_fss_basic_list_read_depth_destroy_simple(structure) f_macro_string_dynamic_destroy_simple(structure.value_name)
-#endif // _di_fss_basic_list_read_depth_
+ #define macro_fss_basic_list_read_depth_t_delete_simple(structure) f_macro_string_dynamic_t_delete_simple(structure.value_name)
+ #define macro_fss_basic_list_read_depth_t_destroy_simple(structure) f_macro_string_dynamic_t_destroy_simple(structure.value_name)
+#endif // _di_fss_basic_list_read_depth_t_
/**
* An array of depth parameters.
* size: total amount of allocated space.
* used: total number of allocated spaces used.
*/
-#ifndef _di_fss_basic_list_read_depths_
+#ifndef _di_fss_basic_list_read_depths_t_
typedef struct {
- fss_basic_list_read_depth *array;
+ fss_basic_list_read_depth_t *array;
- f_array_length size;
- f_array_length used;
- } fss_basic_list_read_depths;
+ f_array_length_t size;
+ f_array_length_t used;
+ } fss_basic_list_read_depths_t;
- #define fss_basic_list_read_depths_initialize { 0, 0, 0 }
+ #define fss_basic_list_read_depths_t_initialize { 0, 0, 0 }
- #define macro_fss_basic_list_read_depths_clear(depths) f_macro_memory_structure_clear(depths)
+ #define macro_fss_basic_list_read_depths_t_clear(depths) f_macro_memory_structure_t_clear(depths)
- #define macro_fss_basic_list_read_depths_new(status, depths, length) f_macro_memory_structure_new(status, depths, fss_basic_list_read_depth, length)
+ #define macro_fss_basic_list_read_depths_t_new(status, depths, length) f_macro_memory_structure_t_new(status, depths, fss_basic_list_read_depth_t, length)
- #define macro_fss_basic_list_read_depths_delete(status, depths) \
+ #define macro_fss_basic_list_read_depths_t_delete(status, depths) \
status = F_none; \
depths.used = depths.size; \
while (depths.used > 0) { \
depths.used--; \
- macro_fss_basic_list_read_depth_delete(status, depths.array[depths.used]); \
+ macro_fss_basic_list_read_depth_t_delete(status, depths.array[depths.used]); \
if (status != F_none) break; \
} \
- if (status == F_none) f_macro_memory_structure_delete(depths, fss_basic_list_read_depth)
+ if (status == F_none) f_macro_memory_structure_t_delete(depths, fss_basic_list_read_depth_t)
- #define macro_fss_basic_list_read_depths_destroy(status, depths) \
+ #define macro_fss_basic_list_read_depths_t_destroy(status, depths) \
status = F_none; \
depths.used = depths.size; \
while (depths.used > 0) { \
depths.used--; \
- macro_fss_basic_list_read_depth_destroy(status, depths.array[depths.used]); \
+ macro_fss_basic_list_read_depth_t_destroy(status, depths.array[depths.used]); \
if (status != F_none) break; \
} \
- if (status == F_none) f_macro_memory_structure_destroy(depths, fss_basic_list_read_depth)
+ if (status == F_none) f_macro_memory_structure_t_destroy(depths, fss_basic_list_read_depth_t)
- #define macro_fss_basic_list_read_depths_delete_simple(depths) \
+ #define macro_fss_basic_list_read_depths_t_delete_simple(depths) \
depths.used = depths.size; \
while (depths.used > 0) { \
depths.used--; \
- macro_fss_basic_list_read_depth_delete_simple(depths.array[depths.used]); \
+ macro_fss_basic_list_read_depth_t_delete_simple(depths.array[depths.used]); \
} \
- if (depths.used == 0) f_macro_memory_structure_delete_simple(depths, fss_basic_list_read_depth)
+ if (depths.used == 0) f_macro_memory_structure_t_delete_simple(depths, fss_basic_list_read_depth_t)
- #define macro_fss_basic_list_read_depths_destroy_simple(depths) \
+ #define macro_fss_basic_list_read_depths_t_destroy_simple(depths) \
depths.used = depths.size; \
while (depths.used > 0) { \
depths.used--; \
- macro_fss_basic_list_read_depth_destroy_simple(depths.array[depths.used]); \
+ macro_fss_basic_list_read_depth_t_destroy_simple(depths.array[depths.used]); \
} \
- if (depths.used == 0) f_macro_memory_structure_destroy_simple(depths, fss_basic_list_read_depth)
+ if (depths.used == 0) f_macro_memory_structure_t_destroy_simple(depths, fss_basic_list_read_depth_t)
- #define macro_fss_basic_list_read_depths_resize(status, depths, new_length) \
+ #define macro_fss_basic_list_read_depths_t_resize(status, depths, new_length) \
status = F_none; \
if (new_length < depths.size) { \
- f_array_length i = depths.size - new_length; \
+ f_array_length_t i = depths.size - new_length; \
for (; i < depths.size; i++) { \
- macro_fss_basic_list_read_depth_delete(status, depths.array[i]); \
+ macro_fss_basic_list_read_depth_t_delete(status, depths.array[i]); \
if (status != F_none) break; \
} \
} \
- if (status == F_none) status = f_memory_resize((void **) & depths.array, sizeof(fss_basic_list_read_depth), depths.size, new_length); \
+ if (status == F_none) status = f_memory_resize((void **) & depths.array, sizeof(fss_basic_list_read_depth_t), depths.size, new_length); \
if (status == F_none) { \
if (new_length > depths.size) { \
- f_array_length i = depths.size; \
+ f_array_length_t i = depths.size; \
for (; i < new_length; i++) { \
- memset(&depths.array[i], 0, sizeof(fss_basic_list_read_depth)); \
+ memset(&depths.array[i], 0, sizeof(fss_basic_list_read_depth_t)); \
} \
} \
depths.size = new_length; \
if (depths.used > depths.size) depths.used = new_length; \
}
- #define macro_fss_basic_list_read_depths_adjust(status, depths, new_length) \
+ #define macro_fss_basic_list_read_depths_t_adjust(status, depths, new_length) \
status = F_none; \
if (new_length < depths.size) { \
- f_array_length i = depths.size - new_length; \
+ f_array_length_t i = depths.size - new_length; \
for (; i < depths.size; i++) { \
- macro_fss_basic_list_read_depth_delete(status, depths.array[i]); \
+ macro_fss_basic_list_read_depth_t_delete(status, depths.array[i]); \
if (status != F_none) break; \
} \
} \
- if (status == F_none) status = f_memory_adjust((void **) & depths.array, sizeof(fss_basic_list_read_depth), depths.size, new_length); \
+ if (status == F_none) status = f_memory_adjust((void **) & depths.array, sizeof(fss_basic_list_read_depth_t), depths.size, new_length); \
if (status == F_none) { \
if (new_length > depths.size) { \
- f_array_length i = depths.size; \
+ f_array_length_t i = depths.size; \
for (; i < new_length; i++) { \
- memset(&depths.array[i], 0, sizeof(fss_basic_list_read_depth)); \
+ memset(&depths.array[i], 0, sizeof(fss_basic_list_read_depth_t)); \
} \
} \
depths.size = new_length; \
if (depths.used > depths.size) depths.used = new_length; \
}
-#endif // _di_fss_basic_list_read_depths_
+#endif // _di_fss_basic_list_read_depths_t_
/**
* Print file error messages.
* The status code representing the error.
*/
#ifndef _di_fss_basic_list_read_print_file_error_
- extern void fss_basic_list_read_print_file_error(const fl_color_context context, const f_string function_name, const f_string file_name, const f_status status) f_gcc_attribute_visibility_internal;
+ extern void fss_basic_list_read_print_file_error(const fl_color_context_t context, const f_string_t function_name, const f_string_t file_name, const f_status_t status) f_gcc_attribute_visibility_internal;
#endif // _di_fss_basic_list_read_print_file_error_
/**
* The status code representing the error.
*/
#ifndef _di_fss_basic_list_read_print_number_argument_error_
- extern void fss_basic_list_read_print_number_argument_error(const fl_color_context context, const f_string function_name, const f_string parameter_name, const f_string argument, const f_status status) f_gcc_attribute_visibility_internal;
+ extern void fss_basic_list_read_print_number_argument_error(const fl_color_context_t context, const f_string_t function_name, const f_string_t parameter_name, const f_string_t argument, const f_status_t status) f_gcc_attribute_visibility_internal;
#endif // _di_fss_basic_list_read_print_number_argument_error_
/**
* F_none on success.
*/
#ifndef _di_fss_basic_list_read_main_preprocess_depth_
- extern f_return_status fss_basic_list_read_main_preprocess_depth(const f_console_arguments arguments, const fss_basic_list_read_data data, fss_basic_list_read_depths *depths) f_gcc_attribute_visibility_internal;
+ extern f_return_status fss_basic_list_read_main_preprocess_depth(const f_console_arguments_t arguments, const fss_basic_list_read_data_t data, fss_basic_list_read_depths_t *depths) f_gcc_attribute_visibility_internal;
#endif // _di_fss_basic_list_read_main_preprocess_depth_
/**
* @see fss_basic_list_read_main_preprocess_depth()
*/
#ifndef _di_fss_basic_list_read_main_process_file_
- extern f_return_status fss_basic_list_read_main_process_file(const f_console_arguments arguments, fss_basic_list_read_data *data, const f_string file_name, const fss_basic_list_read_depths depths) f_gcc_attribute_visibility_internal;
+ extern f_return_status fss_basic_list_read_main_process_file(const f_console_arguments_t arguments, fss_basic_list_read_data_t *data, const f_string_t file_name, const fss_basic_list_read_depths_t depths) f_gcc_attribute_visibility_internal;
#endif // _di_fss_basic_list_read_main_process_file_
#ifdef __cplusplus
#endif
#ifndef _di_fss_basic_list_write_print_help_
- f_return_status fss_basic_list_write_print_help(const fl_color_context context) {
+ f_return_status fss_basic_list_write_print_help(const fl_color_context_t context) {
fll_program_print_help_header(context, fss_basic_list_write_name_long, fss_basic_list_write_version);
fll_program_print_help_option(context, f_console_standard_short_help, f_console_standard_long_help, f_console_symbol_short_enable, f_console_symbol_long_enable, " Print this help message.");
#endif // _di_fss_basic_list_write_print_help_
#ifndef _di_fss_basic_list_write_main_
- f_return_status fss_basic_list_write_main(const f_console_arguments arguments, fss_basic_list_write_data *data) {
- f_status status = F_none;
+ f_return_status fss_basic_list_write_main(const f_console_arguments_t arguments, fss_basic_list_write_data_t *data) {
+ f_status_t status = F_none;
{
- f_console_parameters parameters = { data->parameters, fss_basic_list_write_total_parameters };
- f_console_parameter_id ids[3] = { fss_basic_list_write_parameter_no_color, fss_basic_list_write_parameter_light, fss_basic_list_write_parameter_dark };
- f_console_parameter_ids choices = { ids, 3 };
+ f_console_parameters_t parameters = { data->parameters, fss_basic_list_write_total_parameters };
+ f_console_parameter_id_t ids[3] = { fss_basic_list_write_parameter_no_color, fss_basic_list_write_parameter_light, fss_basic_list_write_parameter_dark };
+ f_console_parameter_ids_t choices = { ids, 3 };
status = fll_program_parameter_process(arguments, parameters, choices, F_true, &data->remaining, &data->context);
if (F_status_is_error(status)) {
fll_program_print_version(fss_basic_list_write_version);
}
else {
- f_array_length counter = 0;
+ f_array_length_t counter = 0;
bool object = (data->parameters[fss_basic_list_write_parameter_object].result == f_console_result_found);
- f_string_dynamic buffer = f_string_dynamic_initialize;
- f_string_range range = f_string_range_initialize;
+ f_string_dynamic_t buffer = f_string_dynamic_t_initialize;
+ f_string_range_t range = f_string_range_initialize;
if (data->process_pipe) {
- f_file file = f_file_initialize;
- f_string_dynamic input = f_string_dynamic_initialize;
+ f_file_t file = f_file_t_initialize;
+ f_string_dynamic_t input = f_string_dynamic_t_initialize;
file.id = f_type_descriptor_input;
fl_color_print_line(f_type_error, data->context.error, data->context.reset, "INTERNAL ERROR: An unhandled error (%u) has occurred while calling f_file_open()", status);
}
- f_macro_string_dynamic_delete_simple(buffer);
- f_macro_string_dynamic_delete_simple(input);
+ f_macro_string_dynamic_t_delete_simple(buffer);
+ f_macro_string_dynamic_t_delete_simple(input);
fss_basic_list_write_delete_data(data);
return F_status_set_error(status);
}
status = fl_fss_basic_list_object_write(input, &range, &buffer);
if (F_status_is_error(status) || status == F_data_not_stop || status == F_data_not_eos || status == F_data_not_eol) {
- f_macro_string_dynamic_delete_simple(buffer);
- f_macro_string_dynamic_delete_simple(input);
+ f_macro_string_dynamic_t_delete_simple(buffer);
+ f_macro_string_dynamic_t_delete_simple(input);
fss_basic_list_write_delete_data(data);
return F_status_set_error(status);
}
status = fl_fss_basic_list_content_write(input, &range, &buffer);
if (F_status_is_error(status) || status == F_data_not_stop || status == F_data_not_eos || status == F_data_not_eol) {
- f_macro_string_dynamic_delete_simple(buffer);
- f_macro_string_dynamic_delete_simple(input);
+ f_macro_string_dynamic_t_delete_simple(buffer);
+ f_macro_string_dynamic_t_delete_simple(input);
fss_basic_list_write_delete_data(data);
return F_status_set_error(status);
}
}
}
- f_macro_string_dynamic_delete_simple(input);
+ f_macro_string_dynamic_t_delete_simple(input);
}
else if (data->parameters[fss_basic_list_write_parameter_string].result == f_console_result_additional) {
- f_string_dynamic input = f_string_dynamic_initialize;
+ f_string_dynamic_t input = f_string_dynamic_t_initialize;
input.string = arguments.argv[data->parameters[fss_basic_list_write_parameter_string].additional.array[0]];
input.used = strlen(input.string);
status = fl_fss_basic_list_object_write(input, &range, &buffer);
if (F_status_is_error(status) || status == F_data_not_stop || status == F_data_not_eos || status == F_data_not_eol) {
- f_macro_string_dynamic_delete_simple(buffer);
+ f_macro_string_dynamic_t_delete_simple(buffer);
fss_basic_list_write_delete_data(data);
return F_status_set_error(status);
}
status = fl_fss_basic_list_content_write(input, &range, &buffer);
if (F_status_is_error(status) || status == F_data_not_stop || status == F_data_not_eos || status == F_data_not_eol) {
- f_macro_string_dynamic_delete_simple(buffer);
+ f_macro_string_dynamic_t_delete_simple(buffer);
fss_basic_list_write_delete_data(data);
return F_status_set_error(status);
}
}
if (data->parameters[fss_basic_list_write_parameter_file].result == f_console_result_additional) {
- f_file output = f_file_initialize;
+ f_file_t output = f_file_t_initialize;
output.flag = f_file_flag_append_wo;
fl_color_print_line(f_type_error, data->context.error, data->context.reset, "INTERNAL ERROR: An unhandled error (%u) has occurred while calling f_file_open()", status);
}
- f_macro_string_dynamic_delete_simple(buffer);
+ f_macro_string_dynamic_t_delete_simple(buffer);
fss_basic_list_write_delete_data(data);
return F_status_set_error(status);
}
fl_color_print_line(f_type_error, data->context.error, data->context.reset, "INTERNAL ERROR: An unhandled error (%u) has occurred while calling f_file_write()", status);
}
- f_macro_string_dynamic_delete_simple(buffer);
+ f_macro_string_dynamic_t_delete_simple(buffer);
fss_basic_list_write_delete_data(data);
return F_status_set_error(status);
}
f_print_string_dynamic(f_type_output, buffer);
}
- f_macro_string_dynamic_delete_simple(buffer);
+ f_macro_string_dynamic_t_delete_simple(buffer);
}
fss_basic_list_write_delete_data(data);
#endif // _di_fss_basic_list_write_main_
#ifndef _di_fss_basic_list_write_delete_data_
- f_return_status fss_basic_list_write_delete_data(fss_basic_list_write_data *data) {
- f_string_length i = 0;
+ f_return_status fss_basic_list_write_delete_data(fss_basic_list_write_data_t *data) {
+ f_string_length_t i = 0;
while (i < fss_basic_list_write_total_parameters) {
- f_macro_string_lengths_delete_simple(data->parameters[i].locations);
- f_macro_string_lengths_delete_simple(data->parameters[i].additional);
+ f_macro_string_lengths_t_delete_simple(data->parameters[i].locations);
+ f_macro_string_lengths_t_delete_simple(data->parameters[i].additional);
i++;
} // while
- f_macro_string_lengths_delete_simple(data->remaining);
- fl_macro_color_context_delete_simple(data->context);
+ f_macro_string_lengths_t_delete_simple(data->remaining);
+ fl_macro_color_context_t_delete_simple(data->context);
return F_none;
}
fss_basic_list_write_parameter_string,
};
- #define f_console_parameter_initialize_fss_basic_list_write \
+ #define fss_basic_list_write_console_parameter_t_initialize \
{ \
- f_console_parameter_initialize(f_console_standard_short_help, f_console_standard_long_help, 0, F_false, f_console_type_normal), \
- f_console_parameter_initialize(f_console_standard_short_light, f_console_standard_long_light, 0, F_false, f_console_type_inverse), \
- f_console_parameter_initialize(f_console_standard_short_dark, f_console_standard_long_dark, 0, F_false, f_console_type_inverse), \
- f_console_parameter_initialize(f_console_standard_short_no_color, f_console_standard_long_no_color, 0, F_false, f_console_type_inverse), \
- f_console_parameter_initialize(f_console_standard_short_version, f_console_standard_long_version, 0, F_false, f_console_type_inverse), \
- f_console_parameter_initialize(fss_basic_list_write_short_file, fss_basic_list_write_long_file, 0, F_true, f_console_type_normal), \
- f_console_parameter_initialize(fss_basic_list_write_short_object, fss_basic_list_write_long_object, 0, F_false, f_console_type_normal), \
- f_console_parameter_initialize(fss_basic_list_write_short_partial, fss_basic_list_write_long_partial, 0, F_true, f_console_type_normal), \
- f_console_parameter_initialize(fss_basic_list_write_short_string, fss_basic_list_write_long_string, 0, F_true, f_console_type_normal), \
+ f_console_parameter_t_initialize(f_console_standard_short_help, f_console_standard_long_help, 0, F_false, f_console_type_normal), \
+ f_console_parameter_t_initialize(f_console_standard_short_light, f_console_standard_long_light, 0, F_false, f_console_type_inverse), \
+ f_console_parameter_t_initialize(f_console_standard_short_dark, f_console_standard_long_dark, 0, F_false, f_console_type_inverse), \
+ f_console_parameter_t_initialize(f_console_standard_short_no_color, f_console_standard_long_no_color, 0, F_false, f_console_type_inverse), \
+ f_console_parameter_t_initialize(f_console_standard_short_version, f_console_standard_long_version, 0, F_false, f_console_type_inverse), \
+ f_console_parameter_t_initialize(fss_basic_list_write_short_file, fss_basic_list_write_long_file, 0, F_true, f_console_type_normal), \
+ f_console_parameter_t_initialize(fss_basic_list_write_short_object, fss_basic_list_write_long_object, 0, F_false, f_console_type_normal), \
+ f_console_parameter_t_initialize(fss_basic_list_write_short_partial, fss_basic_list_write_long_partial, 0, F_true, f_console_type_normal), \
+ f_console_parameter_t_initialize(fss_basic_list_write_short_string, fss_basic_list_write_long_string, 0, F_true, f_console_type_normal), \
}
#define fss_basic_list_write_total_parameters 9
#endif // _di_fss_basic_list_write_defines_
-#ifndef _di_fss_basic_list_write_data_
+#ifndef _di_fss_basic_list_write_data_t_
typedef struct {
- f_console_parameter parameters[fss_basic_list_write_total_parameters];
+ f_console_parameter_t parameters[fss_basic_list_write_total_parameters];
- f_string_lengths remaining;
+ f_string_lengths_t remaining;
bool process_pipe;
- fl_color_context context;
- } fss_basic_list_write_data;
+ fl_color_context_t context;
+ } fss_basic_list_write_data_t;
- #define fss_basic_list_write_data_initialize \
+ #define fss_basic_list_write_data_t_initialize \
{ \
- f_console_parameter_initialize_fss_basic_list_write, \
- f_string_lengths_initialize, \
+ fss_basic_list_write_console_parameter_t_initialize, \
+ f_string_lengths_t_initialize, \
F_false, \
- fl_color_context_initialize, \
+ fl_color_context_t_initialize, \
}
-#endif // _di_fss_basic_list_write_data_
+#endif // _di_fss_basic_list_write_data_t_
/**
* Print help to standard output.
* F_none on success.
*/
#ifndef _di_fss_basic_list_write_print_help_
- extern f_return_status fss_basic_list_write_print_help(const fl_color_context context);
+ extern f_return_status fss_basic_list_write_print_help(const fl_color_context_t context);
#endif // _di_fss_basic_list_write_print_help_
/**
* @see fss_basic_list_write_delete_data()
*/
#ifndef _di_fss_basic_list_write_main_
- extern f_return_status fss_basic_list_write_main(const f_console_arguments arguments, fss_basic_list_write_data *data);
+ extern f_return_status fss_basic_list_write_main(const f_console_arguments_t arguments, fss_basic_list_write_data_t *data);
#endif // _di_fss_basic_list_write_main_
/**
* @see fss_basic_list_write_main()
*/
#ifndef _di_fss_basic_list_write_delete_data_
- extern f_return_status fss_basic_list_write_delete_data(fss_basic_list_write_data *data);
+ extern f_return_status fss_basic_list_write_delete_data(fss_basic_list_write_data_t *data);
#endif // _di_fss_basic_list_write_delete_data_
#ifdef __cplusplus
#include "fss_basic_list_write.h"
-int main(const unsigned long argc, const f_string *argv) {
- const f_console_arguments arguments = { argc, argv };
- fss_basic_list_write_data data = fss_basic_list_write_data_initialize;
+int main(const unsigned long argc, const f_string_t *argv) {
+ const f_console_arguments_t arguments = { argc, argv };
+ fss_basic_list_write_data_t data = fss_basic_list_write_data_t_initialize;
if (f_pipe_input_exists()) {
data.process_pipe = F_true;
}
- f_status status = fss_basic_list_write_main(arguments, &data);
+ f_status_t status = fss_basic_list_write_main(arguments, &data);
if (F_status_is_error(status)) {
return 1;
#endif
#ifndef _di_fss_basic_read_print_help_
- f_return_status fss_basic_read_print_help(const fl_color_context context) {
+ f_return_status fss_basic_read_print_help(const fl_color_context_t context) {
fll_program_print_help_header(context, fss_basic_read_name_long, fss_basic_read_version);
fll_program_print_help_option(context, f_console_standard_short_help, f_console_standard_long_help, f_console_symbol_short_enable, f_console_symbol_long_enable, " Print this help message.");
#endif // _di_fss_basic_read_print_help_
#ifndef _di_fss_basic_read_main_
- f_return_status fss_basic_read_main(const f_console_arguments arguments, fss_basic_read_data *data) {
- f_status status = F_none;
+ f_return_status fss_basic_read_main(const f_console_arguments_t arguments, fss_basic_read_data_t *data) {
+ f_status_t status = F_none;
{
- f_console_parameters parameters = { data->parameters, fss_basic_read_total_parameters };
- f_console_parameter_id ids[3] = { fss_basic_read_parameter_no_color, fss_basic_read_parameter_light, fss_basic_read_parameter_dark };
- f_console_parameter_ids choices = { ids, 3 };
+ f_console_parameters_t parameters = { data->parameters, fss_basic_read_total_parameters };
+ f_console_parameter_id_t ids[3] = { fss_basic_read_parameter_no_color, fss_basic_read_parameter_light, fss_basic_read_parameter_dark };
+ f_console_parameter_ids_t choices = { ids, 3 };
status = fll_program_parameter_process(arguments, parameters, choices, F_true, &data->remaining, &data->context);
}
}
- fss_basic_read_depths depths = fss_basic_read_depths_initialize;
+ fss_basic_read_depths_t depths = fss_basic_read_depths_t_initialize;
- f_string_length counter = 0;
- f_string_length original_size = data->quantity.total;
+ f_string_length_t counter = 0;
+ f_string_length_t original_size = data->quantity.total;
status = fss_basic_read_main_preprocess_depth(arguments, *data, &depths);
if (F_status_is_error(status)) {
- macro_fss_basic_read_depths_delete_simple(depths);
+ macro_fss_basic_read_depths_t_delete_simple(depths);
fss_basic_read_delete_data(data);
return status;
}
// This standard does not support nesting, so any depth greater than 0 can be predicted without processing the file.
if (depths.array[0].depth > 0) {
- macro_fss_basic_read_depths_delete_simple(depths);
+ macro_fss_basic_read_depths_t_delete_simple(depths);
if (data->parameters[fss_basic_read_parameter_total].result == f_console_result_found) {
fprintf(f_type_output, "0%c", f_string_eol[0]);
fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_select);
fl_color_print_line(f_type_error, data->context.error, data->context.reset, "' parameter requires a positive number.");
- macro_fss_basic_read_depths_delete_simple(depths);
+ macro_fss_basic_read_depths_t_delete_simple(depths);
fss_basic_read_delete_data(data);
return F_status_set_error(F_parameter);
}
if (data->process_pipe) {
- f_file file = f_file_initialize;
+ f_file_t file = f_file_t_initialize;
file.id = f_type_descriptor_input;
if (F_status_is_error(status)) {
fss_basic_read_print_file_error(data->context, "f_file_read", "-", F_status_set_fine(status));
- macro_fss_basic_read_depths_delete_simple(depths);
+ macro_fss_basic_read_depths_t_delete_simple(depths);
fss_basic_read_delete_data(data);
return status;
}
status = fss_basic_read_main_process_file(arguments, data, "-", depths);
if (F_status_is_error(status)) {
- macro_fss_basic_read_depths_delete_simple(depths);
+ macro_fss_basic_read_depths_t_delete_simple(depths);
fss_basic_read_delete_data(data);
return status;
}
// Clear buffers before continuing.
- f_macro_fss_contents_delete_simple(data->contents);
- f_macro_fss_objects_delete_simple(data->objects);
- f_macro_string_dynamic_delete_simple(data->buffer);
+ f_macro_fss_contents_t_delete_simple(data->contents);
+ f_macro_fss_objects_t_delete_simple(data->objects);
+ f_macro_string_dynamic_t_delete_simple(data->buffer);
}
if (data->remaining.used > 0) {
for (; counter < data->remaining.used; counter++) {
- f_file file = f_file_initialize;
+ f_file_t file = f_file_t_initialize;
status = f_file_open(arguments.argv[data->remaining.array[counter]], 0, &file);
if (F_status_is_error(status)) {
fss_basic_read_print_file_error(data->context, "f_file_open", arguments.argv[data->remaining.array[counter]], F_status_set_fine(status));
- macro_fss_basic_read_depths_delete_simple(depths);
+ macro_fss_basic_read_depths_t_delete_simple(depths);
fss_basic_read_delete_data(data);
return status;
}
f_file_close(&file.id);
- macro_fss_basic_read_depths_delete_simple(depths);
+ macro_fss_basic_read_depths_t_delete_simple(depths);
fss_basic_read_delete_data(data);
return status;
}
if (F_status_is_error(status)) {
fss_basic_read_print_file_error(data->context, "f_file_read_until", arguments.argv[data->remaining.array[counter]], F_status_set_fine(status));
- macro_fss_basic_read_depths_delete_simple(depths);
+ macro_fss_basic_read_depths_t_delete_simple(depths);
fss_basic_read_delete_data(data);
return status;
}
status = fss_basic_read_main_process_file(arguments, data, arguments.argv[data->remaining.array[counter]], depths);
if (F_status_is_error(status)) {
- macro_fss_basic_read_depths_delete_simple(depths);
+ macro_fss_basic_read_depths_t_delete_simple(depths);
fss_basic_read_delete_data(data);
return status;
}
// Clear buffers before repeating the loop.
- f_macro_fss_contents_delete_simple(data->contents);
- f_macro_fss_objects_delete_simple(data->objects);
- f_macro_string_dynamic_delete_simple(data->buffer);
+ f_macro_fss_contents_t_delete_simple(data->contents);
+ f_macro_fss_objects_t_delete_simple(data->objects);
+ f_macro_string_dynamic_t_delete_simple(data->buffer);
} // for
}
- macro_fss_basic_read_depths_delete_simple(depths);
+ macro_fss_basic_read_depths_t_delete_simple(depths);
}
else {
fl_color_print_line(f_type_error, data->context.error, data->context.reset, "ERROR: You failed to specify one or more files.");
#endif // _di_fss_basic_read_main_
#ifndef _di_fss_basic_read_delete_data_
- f_return_status fss_basic_read_delete_data(fss_basic_read_data *data) {
- f_status status = F_none;
- f_string_length i = 0;
+ f_return_status fss_basic_read_delete_data(fss_basic_read_data_t *data) {
+ f_status_t status = F_none;
+ f_string_length_t i = 0;
while (i < fss_basic_read_total_parameters) {
- f_macro_string_lengths_delete_simple(data->parameters[i].locations);
- f_macro_string_lengths_delete_simple(data->parameters[i].additional);
+ f_macro_string_lengths_t_delete_simple(data->parameters[i].locations);
+ f_macro_string_lengths_t_delete_simple(data->parameters[i].additional);
i++;
} // while
- f_macro_fss_contents_delete_simple(data->contents);
- f_macro_fss_objects_delete_simple(data->objects);
- f_macro_string_dynamic_delete_simple(data->buffer);
- f_macro_string_lengths_delete_simple(data->remaining);
+ f_macro_fss_contents_t_delete_simple(data->contents);
+ f_macro_fss_objects_t_delete_simple(data->objects);
+ f_macro_string_dynamic_t_delete_simple(data->buffer);
+ f_macro_string_lengths_t_delete_simple(data->remaining);
- fl_macro_color_context_delete_simple(data->context);
+ fl_macro_color_context_t_delete_simple(data->context);
return F_none;
}
*
* This is the FSS Basic Read program
* This program utilizes the Featureless Linux Library.
- * This program processes files or other input in fss format and stores the results in the fss_basic_read_data.
+ * This program processes files or other input in fss format and stores the results in the fss_basic_read_data_t.
*
* This processes in accordance to the FSS-0000 Basic specification.
*/
fss_basic_read_parameter_trim,
};
- #define f_console_parameter_initialize_fss_basic_read \
+ #define fss_basic_read_console_parameter_t_initialize \
{ \
- f_console_parameter_initialize(f_console_standard_short_help, f_console_standard_long_help, 0, F_false, f_console_type_normal), \
- f_console_parameter_initialize(f_console_standard_short_light, f_console_standard_long_light, 0, F_false, f_console_type_inverse), \
- f_console_parameter_initialize(f_console_standard_short_dark, f_console_standard_long_dark, 0, F_false, f_console_type_inverse), \
- f_console_parameter_initialize(f_console_standard_short_no_color, f_console_standard_long_no_color, 0, F_false, f_console_type_inverse), \
- f_console_parameter_initialize(f_console_standard_short_version, f_console_standard_long_version, 0, F_false, f_console_type_inverse), \
- f_console_parameter_initialize(fss_basic_read_short_at, fss_basic_read_long_at, 0, F_true, f_console_type_normal), \
- f_console_parameter_initialize(fss_basic_read_short_depth, fss_basic_read_long_depth, 0, F_true, f_console_type_normal), \
- f_console_parameter_initialize(fss_basic_read_short_empty, fss_basic_read_long_empty, 0, F_false, f_console_type_normal), \
- f_console_parameter_initialize(fss_basic_read_short_line, fss_basic_read_long_line, 0, F_true, f_console_type_normal), \
- f_console_parameter_initialize(fss_basic_read_short_name, fss_basic_read_long_name, 0, F_true, f_console_type_normal), \
- f_console_parameter_initialize(fss_basic_read_short_object, fss_basic_read_long_object, 0, F_false, f_console_type_normal), \
- f_console_parameter_initialize(fss_basic_read_short_select, fss_basic_read_long_select, 0, F_true, f_console_type_normal), \
- f_console_parameter_initialize(fss_basic_read_short_total, fss_basic_read_long_total, 0, F_false, f_console_type_normal), \
- f_console_parameter_initialize(fss_basic_read_short_trim, fss_basic_read_long_trim, 0, F_false, f_console_type_normal), \
+ f_console_parameter_t_initialize(f_console_standard_short_help, f_console_standard_long_help, 0, F_false, f_console_type_normal), \
+ f_console_parameter_t_initialize(f_console_standard_short_light, f_console_standard_long_light, 0, F_false, f_console_type_inverse), \
+ f_console_parameter_t_initialize(f_console_standard_short_dark, f_console_standard_long_dark, 0, F_false, f_console_type_inverse), \
+ f_console_parameter_t_initialize(f_console_standard_short_no_color, f_console_standard_long_no_color, 0, F_false, f_console_type_inverse), \
+ f_console_parameter_t_initialize(f_console_standard_short_version, f_console_standard_long_version, 0, F_false, f_console_type_inverse), \
+ f_console_parameter_t_initialize(fss_basic_read_short_at, fss_basic_read_long_at, 0, F_true, f_console_type_normal), \
+ f_console_parameter_t_initialize(fss_basic_read_short_depth, fss_basic_read_long_depth, 0, F_true, f_console_type_normal), \
+ f_console_parameter_t_initialize(fss_basic_read_short_empty, fss_basic_read_long_empty, 0, F_false, f_console_type_normal), \
+ f_console_parameter_t_initialize(fss_basic_read_short_line, fss_basic_read_long_line, 0, F_true, f_console_type_normal), \
+ f_console_parameter_t_initialize(fss_basic_read_short_name, fss_basic_read_long_name, 0, F_true, f_console_type_normal), \
+ f_console_parameter_t_initialize(fss_basic_read_short_object, fss_basic_read_long_object, 0, F_false, f_console_type_normal), \
+ f_console_parameter_t_initialize(fss_basic_read_short_select, fss_basic_read_long_select, 0, F_true, f_console_type_normal), \
+ f_console_parameter_t_initialize(fss_basic_read_short_total, fss_basic_read_long_total, 0, F_false, f_console_type_normal), \
+ f_console_parameter_t_initialize(fss_basic_read_short_trim, fss_basic_read_long_trim, 0, F_false, f_console_type_normal), \
}
#define fss_basic_read_total_parameters 14
#endif // _di_fss_basic_read_defines_
-#ifndef _di_fss_basic_read_data_
+#ifndef _di_fss_basic_read_data_t_
typedef struct {
- f_console_parameter parameters[fss_basic_read_total_parameters];
+ f_console_parameter_t parameters[fss_basic_read_total_parameters];
- f_string_dynamic buffer;
- f_fss_objects objects;
- f_fss_contents contents;
- f_string_quantity quantity;
- f_string_lengths remaining;
+ f_string_dynamic_t buffer;
+ f_fss_objects_t objects;
+ f_fss_contents_t contents;
+ f_string_quantity_t quantity;
+ f_string_lengths_t remaining;
bool process_pipe;
- fl_color_context context;
- } fss_basic_read_data;
+ fl_color_context_t context;
+ } fss_basic_read_data_t;
- #define fss_basic_read_data_initialize \
+ #define fss_basic_read_data_t_initialize \
{ \
- f_console_parameter_initialize_fss_basic_read, \
- f_string_dynamic_initialize, \
- f_fss_objects_initialize, \
- f_fss_contents_initialize, \
- f_string_quantity_initialize, \
- f_string_lengths_initialize, \
+ fss_basic_read_console_parameter_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_fss_objects_t_initialize, \
+ f_fss_contents_t_initialize, \
+ f_string_quantity_t_initialize, \
+ f_string_lengths_t_initialize, \
F_false, \
- fl_color_context_initialize, \
+ fl_color_context_t_initialize, \
}
-#endif // _di_fss_basic_read_data_
+#endif // _di_fss_basic_read_data_t_
/**
* Print help to standard output.
* F_none on success.
*/
#ifndef _di_fss_basic_read_print_help_
- extern f_return_status fss_basic_read_print_help(const fl_color_context context);
+ extern f_return_status fss_basic_read_print_help(const fl_color_context_t context);
#endif // _di_fss_basic_read_print_help_
/**
* @see fss_basic_read_delete_data()
*/
#ifndef _di_fss_basic_read_main_
- extern f_return_status fss_basic_read_main(const f_console_arguments arguments, fss_basic_read_data *data);
+ extern f_return_status fss_basic_read_main(const f_console_arguments_t arguments, fss_basic_read_data_t *data);
#endif // _di_fss_basic_read_main_
/**
* @see fss_basic_read_main()
*/
#ifndef _di_fss_basic_read_delete_data_
- extern f_return_status fss_basic_read_delete_data(fss_basic_read_data *data);
+ extern f_return_status fss_basic_read_delete_data(fss_basic_read_data_t *data);
#endif // _di_fss_basic_read_delete_data_
#ifdef __cplusplus
#include "fss_basic_read.h"
-int main(const unsigned long argc, const f_string *argv) {
- const f_console_arguments arguments = { argc, argv };
- fss_basic_read_data data = fss_basic_read_data_initialize;
+int main(const unsigned long argc, const f_string_t *argv) {
+ const f_console_arguments_t arguments = { argc, argv };
+ fss_basic_read_data_t data = fss_basic_read_data_t_initialize;
if (f_pipe_input_exists()) {
data.process_pipe = F_true;
}
- f_status status = fss_basic_read_main(arguments, &data);
+ f_status_t status = fss_basic_read_main(arguments, &data);
if (F_status_is_error(status)) {
return 1;
#endif
#ifndef _di_fss_basic_read_print_file_error_
- void fss_basic_read_print_file_error(const fl_color_context context, const f_string function_name, const f_string file_name, const f_status status) {
+ void fss_basic_read_print_file_error(const fl_color_context_t context, const f_string_t function_name, const f_string_t file_name, const f_status_t status) {
if (fll_file_error_print(f_type_error, context, function_name, file_name, status) == F_false) {
fl_color_print(f_type_error, context.error, context.reset, "INTERNAL ERROR: An unhandled error (");
#endif // _di_fss_basic_read_print_file_error_
#ifndef _di_fss_basic_read_print_number_argument_error_
- void fss_basic_read_print_number_argument_error(const fl_color_context context, const f_string function_name, const f_string parameter_name, const f_string argument, const f_status status) {
+ void fss_basic_read_print_number_argument_error(const fl_color_context_t context, const f_string_t function_name, const f_string_t parameter_name, const f_string_t argument, const f_status_t status) {
if (status == F_parameter) {
fl_color_print(f_type_error, context.error, context.reset, "INTERNAL ERROR: Invalid parameter when calling ");
#endif // _di_fss_basic_read_print_number_argument_error_
#ifndef _di_fss_basic_read_main_preprocess_depth_
- f_return_status fss_basic_read_main_preprocess_depth(const f_console_arguments arguments, const fss_basic_read_data data, fss_basic_read_depths *depths) {
- f_status status = F_none;
+ f_return_status fss_basic_read_main_preprocess_depth(const f_console_arguments_t arguments, const fss_basic_read_data_t data, fss_basic_read_depths_t *depths) {
+ f_status_t status = F_none;
{
- f_array_length depth_size = 1;
+ f_array_length_t depth_size = 1;
if (data.parameters[fss_basic_read_parameter_depth].result == f_console_result_additional) {
depth_size = data.parameters[fss_basic_read_parameter_depth].additional.used;
}
- macro_fss_basic_read_depths_new(status, (*depths), depth_size);
+ macro_fss_basic_read_depths_t_new(status, (*depths), depth_size);
if (F_status_is_error(status)) {
fl_color_print_line(f_type_error, data.context.error, data.context.reset, "CRITICAL ERROR: Unable to allocate memory.");
return status;
depths->used = depth_size;
}
- f_array_length position_depth = 0;
- f_array_length position_at = 0;
- f_array_length position_name = 0;
+ f_array_length_t position_depth = 0;
+ f_array_length_t position_at = 0;
+ f_array_length_t position_name = 0;
- for (f_array_length i = 0; i < depths->used; i++) {
+ for (f_array_length_t i = 0; i < depths->used; i++) {
depths->array[i].depth = 0;
depths->array[i].index_at = 0;
depths->array[i].index_name = 0;
depths->array[i].value_at = 0;
- f_macro_string_dynamic_clear(depths->array[i].value_name);
+ f_macro_string_dynamic_t_clear(depths->array[i].value_name);
if (data.parameters[fss_basic_read_parameter_depth].additional.used == 0) {
position_depth = 0;
else {
position_depth = data.parameters[fss_basic_read_parameter_depth].additional.array[i];
- const f_string_range range = f_macro_string_range_initialize(strlen(arguments.argv[position_depth]));
+ const f_string_range_t range = f_macro_string_range_initialize(strlen(arguments.argv[position_depth]));
status = fl_conversion_string_to_number_unsigned(arguments.argv[position_depth], &depths->array[i].depth, range);
if (F_status_is_error(status)) {
depths->array[i].index_at = data.parameters[fss_basic_read_parameter_at].additional.array[position_at];
- const f_string_range range = f_macro_string_range_initialize(strlen(arguments.argv[depths->array[i].index_at]));
+ const f_string_range_t range = f_macro_string_range_initialize(strlen(arguments.argv[depths->array[i].index_at]));
status = fl_conversion_string_to_number_unsigned(arguments.argv[depths->array[i].index_at], &depths->array[i].value_at, range);
if (F_status_is_error(status)) {
}
if (F_status_is_error(status)) {
- f_status status_code = F_status_set_fine(status);
+ f_status_t status_code = F_status_set_fine(status);
// @todo: move error printing into common function.
if (status_code == F_memory_allocation || status_code == F_memory_reallocation) {
fl_color_print_line(f_type_error, data.context.error, data.context.reset, "CRITICAL ERROR: Unable to allocate memory.");
}
- else if (status_code == f_string_length_size) {
+ else if (status_code == f_string_length_t_size) {
fl_color_print(f_type_error, data.context.error, data.context.reset, "ERROR: Unable to process '");
fl_color_print(f_type_error, data.context.notable, data.context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_trim);
fl_color_print_line(f_type_error, data.context.error, data.context.reset, "' because the maximum buffer size was reached.");
}
else {
- f_string function = "fl_string_append";
+ f_string_t function = "fl_string_append";
if (data.parameters[fss_basic_read_parameter_trim].result == f_console_result_found) {
function = "fl_string_rip";
}
} // for
- for (f_array_length i = 0; i < depths->used; i++) {
- for (f_array_length j = i + 1; j < depths->used; j++) {
+ for (f_array_length_t i = 0; i < depths->used; i++) {
+ for (f_array_length_t j = i + 1; j < depths->used; j++) {
if (depths->array[i].depth == depths->array[j].depth) {
fl_color_print(f_type_error, data.context.error, data.context.reset, "ERROR: The value '");
fl_color_print(f_type_error, data.context.notable, data.context.reset, "%llu", depths->array[i].depth);
#endif // _di_fss_basic_read_main_preprocess_depth_
#ifndef _di_fss_basic_read_main_process_file_
- f_return_status fss_basic_read_main_process_file(const f_console_arguments arguments, fss_basic_read_data *data, const f_string filename, const fss_basic_read_depths depths) {
- f_status status = F_none;
+ f_return_status fss_basic_read_main_process_file(const f_console_arguments_t arguments, fss_basic_read_data_t *data, const f_string_t filename, const fss_basic_read_depths_t depths) {
+ f_status_t status = F_none;
{
- f_string_range input = f_string_range_initialize;
+ f_string_range_t input = f_string_range_initialize;
input.start = 0;
input.stop = data->buffer.used - 1;
}
else if (status == F_data_not_stop || status == F_data_not_eos) {
// Clear buffers, then attempt the next file.
- f_macro_fss_contents_delete_simple(data->contents);
- f_macro_fss_objects_delete_simple(data->objects);
- f_macro_string_dynamic_delete_simple(data->buffer);
+ f_macro_fss_contents_t_delete_simple(data->contents);
+ f_macro_fss_objects_t_delete_simple(data->objects);
+ f_macro_string_dynamic_t_delete_simple(data->buffer);
return F_status_set_warning(status);
}
}
- f_string_length select = 0;
+ f_string_length_t select = 0;
if (data->parameters[fss_basic_read_parameter_select].result == f_console_result_additional) {
- const f_string_length index = data->parameters[fss_basic_read_parameter_select].additional.array[data->parameters[fss_basic_read_parameter_select].additional.used - 1];
- const f_string_range range = f_macro_string_range_initialize(strlen(arguments.argv[index]));
+ const f_string_length_t index = data->parameters[fss_basic_read_parameter_select].additional.array[data->parameters[fss_basic_read_parameter_select].additional.used - 1];
+ const f_string_range_t range = f_macro_string_range_initialize(strlen(arguments.argv[index]));
status = fl_conversion_string_to_number_unsigned(arguments.argv[index], &select, range);
if (F_status_is_error(status)) {
}
}
- f_string_length line = 0;
+ f_string_length_t line = 0;
if (data->parameters[fss_basic_read_parameter_line].result == f_console_result_additional) {
- const f_string_length index = data->parameters[fss_basic_read_parameter_line].additional.array[data->parameters[fss_basic_read_parameter_line].additional.used - 1];
- const f_string_range range = f_macro_string_range_initialize(strlen(arguments.argv[index]));
+ const f_string_length_t index = data->parameters[fss_basic_read_parameter_line].additional.array[data->parameters[fss_basic_read_parameter_line].additional.used - 1];
+ const f_string_range_t range = f_macro_string_range_initialize(strlen(arguments.argv[index]));
status = fl_conversion_string_to_number_unsigned(arguments.argv[index], &line, range);
if (F_status_is_error(status)) {
if (depths.array[0].index_name > 0) {
memset(names, 0, sizeof(bool) * data->objects.used);
- f_string_length name_length = 0;
+ f_string_length_t name_length = 0;
if (data->parameters[fss_basic_read_parameter_trim].result == f_console_result_found) {
- for (f_string_length i = 0; i < data->objects.used; i++) {
+ for (f_string_length_t i = 0; i < data->objects.used; i++) {
name_length = (data->objects.array[i].stop - data->objects.array[i].start) + 1;
if (name_length == depths.array[0].value_name.used) {
} // for
}
else {
- for (f_string_length i = 0; i < data->objects.used; i++) {
+ for (f_string_length_t i = 0; i < data->objects.used; i++) {
name_length = (data->objects.array[i].stop - data->objects.array[i].start) + 1;
if (name_length == depths.array[0].value_name.used) {
}
}
else if (depths.array[0].index_name > 0) {
- f_string_length total = 0;
+ f_string_length_t total = 0;
- for (f_string_length i = 0; i < data->objects.used; i++) {
+ for (f_string_length_t i = 0; i < data->objects.used; i++) {
if (names[i] == 0) continue;
total++;
return F_none;
}
- f_return_status (*print_object)(FILE *, const f_string_static, const f_string_range) = &f_print_string_dynamic_partial;
+ f_return_status (*print_object)(FILE *, const f_string_static_t, const f_string_range_t) = &f_print_string_dynamic_partial;
if (data->parameters[fss_basic_read_parameter_trim].result == f_console_result_found) {
print_object = &fl_print_trim_string_dynamic_partial;
}
if (depths.array[0].index_at > 0) {
- f_array_length at = 0;
- f_array_length i = 0;
+ f_array_length_t at = 0;
+ f_array_length_t i = 0;
for (; i < data->objects.used; i++) {
if (names[i]) {
return F_none;
}
- for (f_array_length i = 0; i < data->objects.used; i++) {
+ for (f_array_length_t i = 0; i < data->objects.used; i++) {
if (names[i] == 0) continue;
print_object(f_type_output, data->buffer, data->objects.array[i]);
}
}
- f_array_length at = 0;
- f_array_length i = 0;
+ f_array_length_t at = 0;
+ f_array_length_t i = 0;
for (; i < data->objects.used; i++) {
if (names[i]) {
}
if (data->parameters[fss_basic_read_parameter_total].result == f_console_result_found) {
- f_string_length total = 0;
+ f_string_length_t total = 0;
- for (f_string_length i = 0; i < data->objects.used; i++) {
+ for (f_string_length_t i = 0; i < data->objects.used; i++) {
if (!names[i]) {
continue;
}
}
if (data->parameters[fss_basic_read_parameter_line].result == f_console_result_additional) {
- f_string_length line_current = 0;
+ f_string_length_t line_current = 0;
- for (f_string_length i = 0; i < data->contents.used; i++) {
+ for (f_string_length_t i = 0; i < data->contents.used; i++) {
if (!names[i]) {
continue;
}
return F_none;
}
- for (f_string_length i = 0; i < data->contents.used; i++) {
+ for (f_string_length_t i = 0; i < data->contents.used; i++) {
if (!names[i]) {
continue;
}
* value_at: the value of the "--at" parameter, already processed and ready to use, only when index_at > 0.
* value_name: the value of the "--name" parameter, already processed and ready to use, only when index_name > 0.
*/
-#ifndef _di_fss_basic_read_depth_
+#ifndef _di_fss_basic_read_depth_t_
typedef struct {
- f_string_length depth;
+ f_string_length_t depth;
- f_array_length index_at;
- f_array_length index_name;
+ f_array_length_t index_at;
+ f_array_length_t index_name;
- f_number_unsigned value_at;
- f_string_dynamic value_name;
- } fss_basic_read_depth;
+ f_number_unsigned_t value_at;
+ f_string_dynamic_t value_name;
+ } fss_basic_read_depth_t;
- #define fss_basic_read_depth_initialize \
+ #define fss_basic_read_depth_t_initialize \
{ \
0, \
0, \
0, \
0, \
- f_string_dynamic_initialize, \
+ f_string_dynamic_t_initialize, \
}
- #define macro_fss_basic_read_depth_clear(structure) \
+ #define macro_fss_basic_read_depth_t_clear(structure) \
structure.depth = 0; \
structure.index_at = 0; \
structure.index_name = 0; \
structure.value_at = 0; \
- f_macro_string_dynamic_clear(structure.value_name)
+ f_macro_string_dynamic_t_clear(structure.value_name)
- #define macro_fss_basic_read_depth_delete(status, structure) f_macro_string_dynamic_delete(status, structure.value_name)
- #define macro_fss_basic_read_depth_destroy(status, structure) f_macro_string_dynamic_destroy(status, structure.value_name)
+ #define macro_fss_basic_read_depth_t_delete(status, structure) f_macro_string_dynamic_t_delete(status, structure.value_name)
+ #define macro_fss_basic_read_depth_t_destroy(status, structure) f_macro_string_dynamic_t_destroy(status, structure.value_name)
- #define macro_fss_basic_read_depth_delete_simple(structure) f_macro_string_dynamic_delete_simple(structure.value_name)
- #define macro_fss_basic_read_depth_destroy_simple(structure) f_macro_string_dynamic_destroy_simple(structure.value_name)
-#endif // _di_fss_basic_read_depth_
+ #define macro_fss_basic_read_depth_t_delete_simple(structure) f_macro_string_dynamic_t_delete_simple(structure.value_name)
+ #define macro_fss_basic_read_depth_t_destroy_simple(structure) f_macro_string_dynamic_t_destroy_simple(structure.value_name)
+#endif // _di_fss_basic_read_depth_t_
/**
* An array of depth parameters.
* size: total amount of allocated space.
* used: total number of allocated spaces used.
*/
-#ifndef _di_fss_basic_read_depths_
+#ifndef _di_fss_basic_read_depths_t_
typedef struct {
- fss_basic_read_depth *array;
+ fss_basic_read_depth_t *array;
- f_array_length size;
- f_array_length used;
- } fss_basic_read_depths;
+ f_array_length_t size;
+ f_array_length_t used;
+ } fss_basic_read_depths_t;
- #define fss_basic_read_depths_initialize { 0, 0, 0 }
+ #define fss_basic_read_depths_t_initialize { 0, 0, 0 }
- #define macro_fss_basic_read_depths_clear(depths) f_macro_memory_structure_clear(depths)
+ #define macro_fss_basic_read_depths_t_clear(depths) f_macro_memory_structure_t_clear(depths)
- #define macro_fss_basic_read_depths_new(status, depths, length) f_macro_memory_structure_new(status, depths, fss_basic_read_depth, length)
+ #define macro_fss_basic_read_depths_t_new(status, depths, length) f_macro_memory_structure_t_new(status, depths, fss_basic_read_depth_t, length)
- #define macro_fss_basic_read_depths_delete(status, depths) \
+ #define macro_fss_basic_read_depths_t_delete(status, depths) \
status = F_none; \
depths.used = depths.size; \
while (depths.used > 0) { \
depths.used--; \
- macro_fss_basic_read_depth_delete(status, depths.array[depths.used]); \
+ macro_fss_basic_read_depth_t_delete(status, depths.array[depths.used]); \
if (status != F_none) break; \
} \
- if (status == F_none) f_macro_memory_structure_delete(depths, fss_basic_read_depth)
+ if (status == F_none) f_macro_memory_structure_t_delete(depths, fss_basic_read_depth_t)
- #define macro_fss_basic_read_depths_destroy(status, depths) \
+ #define macro_fss_basic_read_depths_t_destroy(status, depths) \
status = F_none; \
depths.used = depths.size; \
while (depths.used > 0) { \
depths.used--; \
- macro_fss_basic_read_depth_destroy(status, depths.array[depths.used]); \
+ macro_fss_basic_read_depth_t_destroy(status, depths.array[depths.used]); \
if (status != F_none) break; \
} \
- if (status == F_none) f_macro_memory_structure_destroy(depths, fss_basic_read_depth)
+ if (status == F_none) f_macro_memory_structure_t_destroy(depths, fss_basic_read_depth_t)
- #define macro_fss_basic_read_depths_delete_simple(depths) \
+ #define macro_fss_basic_read_depths_t_delete_simple(depths) \
depths.used = depths.size; \
while (depths.used > 0) { \
depths.used--; \
- macro_fss_basic_read_depth_delete_simple(depths.array[depths.used]); \
+ macro_fss_basic_read_depth_t_delete_simple(depths.array[depths.used]); \
} \
- if (depths.used == 0) f_macro_memory_structure_delete_simple(depths, fss_basic_read_depth)
+ if (depths.used == 0) f_macro_memory_structure_t_delete_simple(depths, fss_basic_read_depth_t)
- #define macro_fss_basic_read_depths_destroy_simple(depths) \
+ #define macro_fss_basic_read_depths_t_destroy_simple(depths) \
depths.used = depths.size; \
while (depths.used > 0) { \
depths.used--; \
- macro_fss_basic_read_depth_destroy_simple(depths.array[depths.used]); \
+ macro_fss_basic_read_depth_t_destroy_simple(depths.array[depths.used]); \
} \
- if (depths.used == 0) f_macro_memory_structure_destroy_simple(depths, fss_basic_read_depth)
+ if (depths.used == 0) f_macro_memory_structure_t_destroy_simple(depths, fss_basic_read_depth_t)
- #define macro_fss_basic_read_depths_resize(status, depths, new_length) \
+ #define macro_fss_basic_read_depths_t_resize(status, depths, new_length) \
status = F_none; \
if (new_length < depths.size) { \
- f_array_length i = depths.size - new_length; \
+ f_array_length_t i = depths.size - new_length; \
for (; i < depths.size; i++) { \
- macro_fss_basic_read_depth_delete(status, depths.array[i]); \
+ macro_fss_basic_read_depth_t_delete(status, depths.array[i]); \
if (status != F_none) break; \
} \
} \
- if (status == F_none) status = f_memory_resize((void **) & depths.array, sizeof(fss_basic_read_depth), depths.size, new_length); \
+ if (status == F_none) status = f_memory_resize((void **) & depths.array, sizeof(fss_basic_read_depth_t), depths.size, new_length); \
if (status == F_none) { \
if (new_length > depths.size) { \
- f_array_length i = depths.size; \
+ f_array_length_t i = depths.size; \
for (; i < new_length; i++) { \
- memset(&depths.array[i], 0, sizeof(fss_basic_read_depth)); \
+ memset(&depths.array[i], 0, sizeof(fss_basic_read_depth_t)); \
} \
} \
depths.size = new_length; \
if (depths.used > depths.size) depths.used = new_length; \
}
- #define macro_fss_basic_read_depths_adjust(status, depths, new_length) \
+ #define macro_fss_basic_read_depths_t_adjust(status, depths, new_length) \
status = F_none; \
if (new_length < depths.size) { \
- f_array_length i = depths.size - new_length; \
+ f_array_length_t i = depths.size - new_length; \
for (; i < depths.size; i++) { \
- macro_fss_basic_read_depth_delete(status, depths.array[i]); \
+ macro_fss_basic_read_depth_t_delete(status, depths.array[i]); \
if (status != F_none) break; \
} \
} \
- if (status == F_none) status = f_memory_adjust((void **) & depths.array, sizeof(fss_basic_read_depth), depths.size, new_length); \
+ if (status == F_none) status = f_memory_adjust((void **) & depths.array, sizeof(fss_basic_read_depth_t), depths.size, new_length); \
if (status == F_none) { \
if (new_length > depths.size) { \
- f_array_length i = depths.size; \
+ f_array_length_t i = depths.size; \
for (; i < new_length; i++) { \
- memset(&depths.array[i], 0, sizeof(fss_basic_read_depth)); \
+ memset(&depths.array[i], 0, sizeof(fss_basic_read_depth_t)); \
} \
} \
depths.size = new_length; \
if (depths.used > depths.size) depths.used = new_length; \
}
-#endif // _di_fss_basic_read_depths_
+#endif // _di_fss_basic_read_depths_t_
/**
* Print file error messages.
* The status code representing the error.
*/
#ifndef _di_fss_basic_read_print_file_error_
- extern void fss_basic_read_print_file_error(const fl_color_context context, const f_string function_name, const f_string file_name, const f_status status) f_gcc_attribute_visibility_internal;
+ extern void fss_basic_read_print_file_error(const fl_color_context_t context, const f_string_t function_name, const f_string_t file_name, const f_status_t status) f_gcc_attribute_visibility_internal;
#endif // _di_fss_basic_read_print_file_error_
/**
* The status code representing the error.
*/
#ifndef _di_fss_basic_read_print_number_argument_error_
- extern void fss_basic_read_print_number_argument_error(const fl_color_context context, const f_string function_name, const f_string parameter_name, const f_string argument, const f_status status) f_gcc_attribute_visibility_internal;
+ extern void fss_basic_read_print_number_argument_error(const fl_color_context_t context, const f_string_t function_name, const f_string_t parameter_name, const f_string_t argument, const f_status_t status) f_gcc_attribute_visibility_internal;
#endif // _di_fss_basic_read_print_number_argument_error_
/**
* F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_fss_basic_read_main_preprocess_depth_
- extern f_return_status fss_basic_read_main_preprocess_depth(const f_console_arguments arguments, const fss_basic_read_data data, fss_basic_read_depths *depths) f_gcc_attribute_visibility_internal;
+ extern f_return_status fss_basic_read_main_preprocess_depth(const f_console_arguments_t arguments, const fss_basic_read_data_t data, fss_basic_read_depths_t *depths) f_gcc_attribute_visibility_internal;
#endif // _di_fss_basic_read_main_preprocess_depth_
/**
* @see fss_basic_read_main_preprocess_depth()
*/
#ifndef _di_fss_basic_read_main_process_file_
- extern f_return_status fss_basic_read_main_process_file(const f_console_arguments arguments, fss_basic_read_data *data, const f_string file_name, const fss_basic_read_depths depths) f_gcc_attribute_visibility_internal;
+ extern f_return_status fss_basic_read_main_process_file(const f_console_arguments_t arguments, fss_basic_read_data_t *data, const f_string_t file_name, const fss_basic_read_depths_t depths) f_gcc_attribute_visibility_internal;
#endif // _di_fss_basic_read_main_process_file_
#ifdef __cplusplus
#endif
#ifndef _di_fss_basic_write_print_help_
- f_return_status fss_basic_write_print_help(const fl_color_context context) {
+ f_return_status fss_basic_write_print_help(const fl_color_context_t context) {
fll_program_print_help_header(context, fss_basic_write_name_long, fss_basic_write_version);
fll_program_print_help_option(context, f_console_standard_short_help, f_console_standard_long_help, f_console_symbol_short_enable, f_console_symbol_long_enable, " Print this help message.");
#endif // _di_fss_basic_write_print_help_
#ifndef _di_fss_basic_write_main_
- f_return_status fss_basic_write_main(const f_console_arguments arguments, fss_basic_write_data *data) {
- f_status status = F_none;
+ f_return_status fss_basic_write_main(const f_console_arguments_t arguments, fss_basic_write_data *data) {
+ f_status_t status = F_none;
{
- f_console_parameters parameters = { data->parameters, fss_basic_write_total_parameters };
- f_console_parameter_id ids[3] = { fss_basic_write_parameter_no_color, fss_basic_write_parameter_light, fss_basic_write_parameter_dark };
- f_console_parameter_ids choices = { ids, 3 };
+ f_console_parameters_t parameters = { data->parameters, fss_basic_write_total_parameters };
+ f_console_parameter_id_t ids[3] = { fss_basic_write_parameter_no_color, fss_basic_write_parameter_light, fss_basic_write_parameter_dark };
+ f_console_parameter_ids_t choices = { ids, 3 };
status = fll_program_parameter_process(arguments, parameters, choices, F_true, &data->remaining, &data->context);
if (F_status_is_error(status)) {
fll_program_print_version(fss_basic_write_version);
}
else {
- f_array_length counter = 0;
+ f_array_length_t counter = 0;
bool object = (data->parameters[fss_basic_write_parameter_object].result == f_console_result_found);
- f_string_dynamic buffer = f_string_dynamic_initialize;
- f_string_range range = f_string_range_initialize;
+ f_string_dynamic_t buffer = f_string_dynamic_t_initialize;
+ f_string_range_t range = f_string_range_initialize;
if (data->process_pipe) {
- f_file file = f_file_initialize;
- f_string_dynamic input = f_string_dynamic_initialize;
+ f_file_t file = f_file_t_initialize;
+ f_string_dynamic_t input = f_string_dynamic_t_initialize;
file.id = f_type_descriptor_input;
fl_color_print_line(f_type_error, data->context.error, data->context.reset, "INTERNAL ERROR: An unhandled error (%u) has occurred while calling f_file_open()", status);
}
- f_macro_string_dynamic_delete_simple(input);
+ f_macro_string_dynamic_t_delete_simple(input);
fss_basic_write_delete_data(data);
return F_status_set_error(status);
}
status = fl_fss_basic_object_write(input, 0, &range, &buffer);
if (F_status_is_error(status) || status == F_data_not_stop || status == F_data_not_eos) {
- f_macro_string_dynamic_delete_simple(buffer);
- f_macro_string_dynamic_delete_simple(input);
+ f_macro_string_dynamic_t_delete_simple(buffer);
+ f_macro_string_dynamic_t_delete_simple(input);
fss_basic_write_delete_data(data);
return F_status_set_error(status);
}
status = fl_fss_basic_content_write(input, &range, &buffer);
if (F_status_is_error(status) || status == F_data_not_stop || status == F_data_not_eos) {
- f_macro_string_dynamic_delete_simple(buffer);
- f_macro_string_dynamic_delete_simple(input);
+ f_macro_string_dynamic_t_delete_simple(buffer);
+ f_macro_string_dynamic_t_delete_simple(input);
fss_basic_write_delete_data(data);
return F_status_set_error(status);
}
}
}
- f_macro_string_dynamic_delete_simple(input);
+ f_macro_string_dynamic_t_delete_simple(input);
}
else if (data->parameters[fss_basic_write_parameter_string].result == f_console_result_additional) {
- f_string_dynamic input = f_string_dynamic_initialize;
+ f_string_dynamic_t input = f_string_dynamic_t_initialize;
input.string = arguments.argv[data->parameters[fss_basic_write_parameter_string].additional.array[0]];
input.used = strnlen(input.string, f_console_length_size);
status = fl_fss_basic_object_write(input, 0, &range, &buffer);
if (F_status_is_error(status) || status == F_data_not_stop || status == F_data_not_eos) {
- f_macro_string_dynamic_delete_simple(buffer);
+ f_macro_string_dynamic_t_delete_simple(buffer);
fss_basic_write_delete_data(data);
return F_status_set_error(status);
}
status = fl_fss_basic_content_write(input, &range, &buffer);
if (F_status_is_error(status) || status == F_data_not_stop || status == F_data_not_eos) {
- f_macro_string_dynamic_delete_simple(buffer);
+ f_macro_string_dynamic_t_delete_simple(buffer);
fss_basic_write_delete_data(data);
return F_status_set_error(status);
}
}
if (data->parameters[fss_basic_write_parameter_file].result == f_console_result_additional) {
- f_file output = f_file_initialize;
+ f_file_t output = f_file_t_initialize;
output.flag = f_file_flag_append_wo;
fl_color_print_line(f_type_error, data->context.error, data->context.reset, "INTERNAL ERROR: An unhandled error (%u) has occurred while calling f_file_open()", status);
}
- f_macro_string_dynamic_delete_simple(buffer);
+ f_macro_string_dynamic_t_delete_simple(buffer);
fss_basic_write_delete_data(data);
return status;
}
fl_color_print_line(f_type_error, data->context.error, data->context.reset, "INTERNAL ERROR: An unhandled error (%u) has occurred while calling f_file_write()", status);
}
- f_macro_string_dynamic_delete_simple(buffer);
+ f_macro_string_dynamic_t_delete_simple(buffer);
fss_basic_write_delete_data(data);
return F_status_set_error(status);
}
f_print_string_dynamic(f_type_output, buffer);
}
- f_macro_string_dynamic_delete_simple(buffer);
+ f_macro_string_dynamic_t_delete_simple(buffer);
}
fss_basic_write_delete_data(data);
#ifndef _di_fss_basic_write_delete_data_
f_return_status fss_basic_write_delete_data(fss_basic_write_data *data) {
- f_status status = F_none;
+ f_status_t status = F_none;
- for (f_string_length i = 0; i < fss_basic_write_total_parameters; i++) {
- f_macro_string_lengths_delete_simple(data->parameters[i].locations);
- f_macro_string_lengths_delete_simple(data->parameters[i].additional);
+ for (f_string_length_t i = 0; i < fss_basic_write_total_parameters; i++) {
+ f_macro_string_lengths_t_delete_simple(data->parameters[i].locations);
+ f_macro_string_lengths_t_delete_simple(data->parameters[i].additional);
} // for
- f_macro_string_lengths_delete_simple(data->remaining);
- fl_macro_color_context_delete_simple(data->context);
+ f_macro_string_lengths_t_delete_simple(data->remaining);
+ fl_macro_color_context_t_delete_simple(data->context);
return F_none;
}
fss_basic_write_parameter_string,
};
- #define f_console_parameter_initialize_fss_basic_write \
+ #define fss_basic_write_console_parameter_t_initialize \
{ \
- f_console_parameter_initialize(f_console_standard_short_help, f_console_standard_long_help, 0, F_false, f_console_type_normal), \
- f_console_parameter_initialize(f_console_standard_short_light, f_console_standard_long_light, 0, F_false, f_console_type_inverse), \
- f_console_parameter_initialize(f_console_standard_short_dark, f_console_standard_long_dark, 0, F_false, f_console_type_inverse), \
- f_console_parameter_initialize(f_console_standard_short_no_color, f_console_standard_long_no_color, 0, F_false, f_console_type_inverse), \
- f_console_parameter_initialize(f_console_standard_short_version, f_console_standard_long_version, 0, F_false, f_console_type_inverse), \
- f_console_parameter_initialize(fss_basic_write_short_file, fss_basic_write_long_file, 0, F_true, f_console_type_normal), \
- f_console_parameter_initialize(fss_basic_write_short_object, fss_basic_write_long_object, 0, F_false, f_console_type_normal), \
- f_console_parameter_initialize(fss_basic_write_short_partial, fss_basic_write_long_partial, 0, F_true, f_console_type_normal), \
- f_console_parameter_initialize(fss_basic_write_short_string, fss_basic_write_long_string, 0, F_true, f_console_type_normal), \
+ f_console_parameter_t_initialize(f_console_standard_short_help, f_console_standard_long_help, 0, F_false, f_console_type_normal), \
+ f_console_parameter_t_initialize(f_console_standard_short_light, f_console_standard_long_light, 0, F_false, f_console_type_inverse), \
+ f_console_parameter_t_initialize(f_console_standard_short_dark, f_console_standard_long_dark, 0, F_false, f_console_type_inverse), \
+ f_console_parameter_t_initialize(f_console_standard_short_no_color, f_console_standard_long_no_color, 0, F_false, f_console_type_inverse), \
+ f_console_parameter_t_initialize(f_console_standard_short_version, f_console_standard_long_version, 0, F_false, f_console_type_inverse), \
+ f_console_parameter_t_initialize(fss_basic_write_short_file, fss_basic_write_long_file, 0, F_true, f_console_type_normal), \
+ f_console_parameter_t_initialize(fss_basic_write_short_object, fss_basic_write_long_object, 0, F_false, f_console_type_normal), \
+ f_console_parameter_t_initialize(fss_basic_write_short_partial, fss_basic_write_long_partial, 0, F_true, f_console_type_normal), \
+ f_console_parameter_t_initialize(fss_basic_write_short_string, fss_basic_write_long_string, 0, F_true, f_console_type_normal), \
}
#define fss_basic_write_total_parameters 9
#ifndef _di_fss_basic_write_data_
typedef struct {
- f_console_parameter parameters[fss_basic_write_total_parameters];
+ f_console_parameter_t parameters[fss_basic_write_total_parameters];
- f_string_lengths remaining;
+ f_string_lengths_t remaining;
bool process_pipe;
- fl_color_context context;
+ fl_color_context_t context;
} fss_basic_write_data;
#define fss_basic_write_data_initialize \
{ \
- f_console_parameter_initialize_fss_basic_write, \
- f_string_lengths_initialize, \
+ fss_basic_write_console_parameter_t_initialize, \
+ f_string_lengths_t_initialize, \
F_false, \
- fl_color_context_initialize, \
+ fl_color_context_t_initialize, \
}
#endif // _di_fss_basic_write_data_
* F_none on success.
*/
#ifndef _di_fss_basic_write_print_help_
- extern f_return_status fss_basic_write_print_help(const fl_color_context context);
+ extern f_return_status fss_basic_write_print_help(const fl_color_context_t context);
#endif // _di_fss_basic_write_print_help_
/**
* @see fss_basic_write_delete_data()
*/
#ifndef _di_fss_basic_write_main_
- extern f_return_status fss_basic_write_main(const f_console_arguments arguments, fss_basic_write_data *data);
+ extern f_return_status fss_basic_write_main(const f_console_arguments_t arguments, fss_basic_write_data *data);
#endif // _di_fss_basic_write_main_
/**
#include "fss_basic_write.h"
-int main(const unsigned long argc, const f_string *argv) {
- const f_console_arguments arguments = { argc, argv };
+int main(const unsigned long argc, const f_string_t *argv) {
+ const f_console_arguments_t arguments = { argc, argv };
fss_basic_write_data data = fss_basic_write_data_initialize;
- f_status status = fss_basic_write_main(arguments, &data);
+ f_status_t status = fss_basic_write_main(arguments, &data);
if (F_status_is_error(status)) {
return 1;
#endif
#ifndef _di_fss_extended_list_read_print_help_
- f_return_status fss_extended_list_read_print_help(const fl_color_context context) {
+ f_return_status fss_extended_list_read_print_help(const fl_color_context_t context) {
fll_program_print_help_header(context, fss_extended_list_read_name_long, fss_extended_list_read_version);
fll_program_print_help_option(context, f_console_standard_short_help, f_console_standard_long_help, f_console_symbol_short_enable, f_console_symbol_long_enable, " Print this help message.");
#endif // _di_fss_extended_list_read_print_help_
#ifndef _di_fss_extended_list_read_main_
- f_return_status fss_extended_list_read_main(const f_console_arguments arguments, fss_extended_list_read_data *data) {
- f_status status = F_none;
+ f_return_status fss_extended_list_read_main(const f_console_arguments_t arguments, fss_extended_list_read_data_t *data) {
+ f_status_t status = F_none;
{
- f_console_parameters parameters = { data->parameters, fss_extended_list_read_total_parameters };
- f_console_parameter_id ids[3] = { fss_extended_list_read_parameter_no_color, fss_extended_list_read_parameter_light, fss_extended_list_read_parameter_dark };
- f_console_parameter_ids choices = { ids, 3 };
+ f_console_parameters_t parameters = { data->parameters, fss_extended_list_read_total_parameters };
+ f_console_parameter_id_t ids[3] = { fss_extended_list_read_parameter_no_color, fss_extended_list_read_parameter_light, fss_extended_list_read_parameter_dark };
+ f_console_parameter_ids_t choices = { ids, 3 };
status = fll_program_parameter_process(arguments, parameters, choices, F_true, &data->remaining, &data->context);
}
}
- fss_extended_list_read_depths depths = fss_extended_list_read_depths_initialize;
+ fss_extended_list_read_depths_t depths = fss_extended_list_read_depths_t_initialize;
- f_string_length counter = 0;
- f_string_length original_size = data->quantity.total;
+ f_string_length_t counter = 0;
+ f_string_length_t original_size = data->quantity.total;
status = fss_extended_list_read_main_preprocess_depth(arguments, *data, &depths);
if (F_status_is_error(status)) {
- macro_fss_extended_list_read_depths_delete_simple(depths);
+ macro_fss_extended_list_read_depths_t_delete_simple(depths);
fss_extended_list_read_delete_data(data);
return status;
}
fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_select);
fl_color_print_line(f_type_error, data->context.error, data->context.reset, "' parameter requires a positive number.");
- macro_fss_extended_list_read_depths_delete_simple(depths);
+ macro_fss_extended_list_read_depths_t_delete_simple(depths);
fss_extended_list_read_delete_data(data);
return F_status_set_error(F_parameter);
}
if (data->process_pipe) {
- f_file file = f_file_initialize;
+ f_file_t file = f_file_t_initialize;
file.id = f_type_descriptor_input;
if (F_status_is_error(status)) {
fss_extended_list_read_print_file_error(data->context, "f_file_read", "-", F_status_set_fine(status));
- macro_fss_extended_list_read_depths_delete_simple(depths);
+ macro_fss_extended_list_read_depths_t_delete_simple(depths);
fss_extended_list_read_delete_data(data);
return status;
}
status = fss_extended_list_read_main_process_file(arguments, data, "-", depths);
if (F_status_is_error(status)) {
- macro_fss_extended_list_read_depths_delete_simple(depths);
+ macro_fss_extended_list_read_depths_t_delete_simple(depths);
fss_extended_list_read_delete_data(data);
return status;
}
// Clear buffers before continuing.
- f_macro_fss_nest_delete_simple(data->nest);
- f_macro_string_dynamic_delete_simple(data->buffer);
+ f_macro_fss_nest_t_delete_simple(data->nest);
+ f_macro_string_dynamic_t_delete_simple(data->buffer);
}
if (data->remaining.used > 0) {
for (; counter < data->remaining.used; counter++) {
- f_file file = f_file_initialize;
+ f_file_t file = f_file_t_initialize;
status = f_file_open(arguments.argv[data->remaining.array[counter]], 0, &file);
if (F_status_is_error(status)) {
fss_extended_list_read_print_file_error(data->context, "f_file_open", arguments.argv[data->remaining.array[counter]], F_status_set_fine(status));
- macro_fss_extended_list_read_depths_delete_simple(depths);
+ macro_fss_extended_list_read_depths_t_delete_simple(depths);
fss_extended_list_read_delete_data(data);
return status;
}
f_file_close(&file.id);
- macro_fss_extended_list_read_depths_delete_simple(depths);
+ macro_fss_extended_list_read_depths_t_delete_simple(depths);
fss_extended_list_read_delete_data(data);
return status;
}
if (F_status_is_error(status)) {
fss_extended_list_read_print_file_error(data->context, "f_file_read_until", arguments.argv[data->remaining.array[counter]], F_status_set_fine(status));
- macro_fss_extended_list_read_depths_delete_simple(depths);
+ macro_fss_extended_list_read_depths_t_delete_simple(depths);
fss_extended_list_read_delete_data(data);
return status;
}
status = fss_extended_list_read_main_process_file(arguments, data, arguments.argv[data->remaining.array[counter]], depths);
if (F_status_is_error(status)) {
- macro_fss_extended_list_read_depths_delete_simple(depths);
+ macro_fss_extended_list_read_depths_t_delete_simple(depths);
fss_extended_list_read_delete_data(data);
return status;
}
// Clear buffers before repeating the loop.
- f_macro_fss_nest_delete_simple(data->nest);
- f_macro_string_dynamic_delete_simple(data->buffer);
+ f_macro_fss_nest_t_delete_simple(data->nest);
+ f_macro_string_dynamic_t_delete_simple(data->buffer);
} // for
}
- macro_fss_extended_list_read_depths_delete_simple(depths);
+ macro_fss_extended_list_read_depths_t_delete_simple(depths);
}
else {
fl_color_print_line(f_type_error, data->context.error, data->context.reset, "ERROR: You failed to specify one or more files.");
#endif // _di_fss_extended_list_read_main_
#ifndef _di_fss_extended_list_read_delete_data_
- f_return_status fss_extended_list_read_delete_data(fss_extended_list_read_data *data) {
- f_status status = F_none;
- f_string_length i = 0;
+ f_return_status fss_extended_list_read_delete_data(fss_extended_list_read_data_t *data) {
+ f_status_t status = F_none;
+ f_string_length_t i = 0;
while (i < fss_extended_list_read_total_parameters) {
- f_macro_string_lengths_delete_simple(data->parameters[i].locations);
- f_macro_string_lengths_delete_simple(data->parameters[i].additional);
+ f_macro_string_lengths_t_delete_simple(data->parameters[i].locations);
+ f_macro_string_lengths_t_delete_simple(data->parameters[i].additional);
i++;
} // while
- f_macro_fss_nest_delete_simple(data->nest);
+ f_macro_fss_nest_t_delete_simple(data->nest);
- f_macro_string_dynamic_delete_simple(data->buffer);
- f_macro_string_lengths_delete_simple(data->remaining);
+ f_macro_string_dynamic_t_delete_simple(data->buffer);
+ f_macro_string_lengths_t_delete_simple(data->remaining);
- fl_macro_color_context_delete_simple(data->context);
+ fl_macro_color_context_t_delete_simple(data->context);
return F_none;
}
*
* This is the FSS Basic List Read program
* This program utilizes the Featureless Linux Library.
- * This program processes files or other input in fss format and stores the results in the fss_extended_list_read_data.
+ * This program processes files or other input in fss format and stores the results in the fss_extended_list_read_data_t.
*
* This processes in accordance to the FSS-0003 Extended List specification.
*/
fss_extended_list_read_parameter_trim,
};
- #define f_console_parameter_initialize_fss_extended_list_read \
+ #define fss_extended_list_read_console_parameter_t_initialize \
{ \
- f_console_parameter_initialize(f_console_standard_short_help, f_console_standard_long_help, 0, F_false, f_console_type_normal), \
- f_console_parameter_initialize(f_console_standard_short_light, f_console_standard_long_light, 0, F_false, f_console_type_inverse), \
- f_console_parameter_initialize(f_console_standard_short_dark, f_console_standard_long_dark, 0, F_false, f_console_type_inverse), \
- f_console_parameter_initialize(f_console_standard_short_no_color, f_console_standard_long_no_color, 0, F_false, f_console_type_inverse), \
- f_console_parameter_initialize(f_console_standard_short_version, f_console_standard_long_version, 0, F_false, f_console_type_inverse), \
- f_console_parameter_initialize(fss_extended_list_read_short_at, fss_extended_list_read_long_at, 0, F_true, f_console_type_normal), \
- f_console_parameter_initialize(fss_extended_list_read_short_depth, fss_extended_list_read_long_depth, 0, F_true, f_console_type_normal), \
- f_console_parameter_initialize(fss_extended_list_read_short_empty, fss_extended_list_read_long_empty, 0, F_false, f_console_type_normal), \
- f_console_parameter_initialize(fss_extended_list_read_short_line, fss_extended_list_read_long_line, 0, F_true, f_console_type_normal), \
- f_console_parameter_initialize(fss_extended_list_read_short_name, fss_extended_list_read_long_name, 0, F_true, f_console_type_normal), \
- f_console_parameter_initialize(fss_extended_list_read_short_object, fss_extended_list_read_long_object, 0, F_false, f_console_type_normal), \
- f_console_parameter_initialize(fss_extended_list_read_short_select, fss_extended_list_read_long_select, 0, F_true, f_console_type_normal), \
- f_console_parameter_initialize(fss_extended_list_read_short_total, fss_extended_list_read_long_total, 0, F_false, f_console_type_normal), \
- f_console_parameter_initialize(fss_extended_list_read_short_trim, fss_extended_list_read_long_trim, 0, F_false, f_console_type_normal), \
+ f_console_parameter_t_initialize(f_console_standard_short_help, f_console_standard_long_help, 0, F_false, f_console_type_normal), \
+ f_console_parameter_t_initialize(f_console_standard_short_light, f_console_standard_long_light, 0, F_false, f_console_type_inverse), \
+ f_console_parameter_t_initialize(f_console_standard_short_dark, f_console_standard_long_dark, 0, F_false, f_console_type_inverse), \
+ f_console_parameter_t_initialize(f_console_standard_short_no_color, f_console_standard_long_no_color, 0, F_false, f_console_type_inverse), \
+ f_console_parameter_t_initialize(f_console_standard_short_version, f_console_standard_long_version, 0, F_false, f_console_type_inverse), \
+ f_console_parameter_t_initialize(fss_extended_list_read_short_at, fss_extended_list_read_long_at, 0, F_true, f_console_type_normal), \
+ f_console_parameter_t_initialize(fss_extended_list_read_short_depth, fss_extended_list_read_long_depth, 0, F_true, f_console_type_normal), \
+ f_console_parameter_t_initialize(fss_extended_list_read_short_empty, fss_extended_list_read_long_empty, 0, F_false, f_console_type_normal), \
+ f_console_parameter_t_initialize(fss_extended_list_read_short_line, fss_extended_list_read_long_line, 0, F_true, f_console_type_normal), \
+ f_console_parameter_t_initialize(fss_extended_list_read_short_name, fss_extended_list_read_long_name, 0, F_true, f_console_type_normal), \
+ f_console_parameter_t_initialize(fss_extended_list_read_short_object, fss_extended_list_read_long_object, 0, F_false, f_console_type_normal), \
+ f_console_parameter_t_initialize(fss_extended_list_read_short_select, fss_extended_list_read_long_select, 0, F_true, f_console_type_normal), \
+ f_console_parameter_t_initialize(fss_extended_list_read_short_total, fss_extended_list_read_long_total, 0, F_false, f_console_type_normal), \
+ f_console_parameter_t_initialize(fss_extended_list_read_short_trim, fss_extended_list_read_long_trim, 0, F_false, f_console_type_normal), \
}
#define fss_extended_list_read_total_parameters 14
#endif // _di_fss_extended_list_read_defines_
-#ifndef _di_fss_extended_list_read_data_
+#ifndef _di_fss_extended_list_read_data_t_
typedef struct {
- f_console_parameter parameters[fss_extended_list_read_total_parameters];
+ f_console_parameter_t parameters[fss_extended_list_read_total_parameters];
- f_string_dynamic buffer;
- f_fss_nest nest;
- f_string_quantity quantity;
- f_string_lengths remaining;
+ f_string_dynamic_t buffer;
+ f_fss_nest_t nest;
+ f_string_quantity_t quantity;
+ f_string_lengths_t remaining;
bool process_pipe;
- fl_color_context context;
- } fss_extended_list_read_data;
+ fl_color_context_t context;
+ } fss_extended_list_read_data_t;
- #define fss_extended_list_read_data_initialize \
+ #define fss_extended_list_read_data_t_initialize \
{ \
- f_console_parameter_initialize_fss_extended_list_read, \
- f_string_dynamic_initialize, \
- f_fss_nest_initialize, \
- f_string_quantity_initialize, \
- f_string_lengths_initialize, \
+ fss_extended_list_read_console_parameter_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_fss_nest_t_initialize, \
+ f_string_quantity_t_initialize, \
+ f_string_lengths_t_initialize, \
F_false, \
- fl_color_context_initialize, \
+ fl_color_context_t_initialize, \
}
-#endif // _di_fss_extended_list_read_data_
+#endif // _di_fss_extended_list_read_data_t_
/**
* Print help to standard output.
* F_none on success.
*/
#ifndef _di_fss_extended_list_read_print_help_
- extern f_return_status fss_extended_list_read_print_help(const fl_color_context context);
+ extern f_return_status fss_extended_list_read_print_help(const fl_color_context_t context);
#endif // _di_fss_extended_list_read_print_help_
/**
* @see fss_extended_list_read_delete_data()
*/
#ifndef _di_fss_extended_list_read_main_
- extern f_return_status fss_extended_list_read_main(const f_console_arguments arguments, fss_extended_list_read_data *data);
+ extern f_return_status fss_extended_list_read_main(const f_console_arguments_t arguments, fss_extended_list_read_data_t *data);
#endif // _di_fss_extended_list_read_main_
/**
* @see fss_extended_list_read_main()
*/
#ifndef _di_fss_extended_list_read_delete_data_
- extern f_return_status fss_extended_list_read_delete_data(fss_extended_list_read_data *data);
+ extern f_return_status fss_extended_list_read_delete_data(fss_extended_list_read_data_t *data);
#endif // _di_fss_extended_list_read_delete_data_
#ifdef __cplusplus
#include "fss_extended_list_read.h"
-int main(const unsigned long argc, const f_string *argv) {
- const f_console_arguments arguments = { argc, argv };
- fss_extended_list_read_data data = fss_extended_list_read_data_initialize;
+int main(const unsigned long argc, const f_string_t *argv) {
+ const f_console_arguments_t arguments = { argc, argv };
+ fss_extended_list_read_data_t data = fss_extended_list_read_data_t_initialize;
if (f_pipe_input_exists()) {
data.process_pipe = F_true;
}
- f_status status = fss_extended_list_read_main(arguments, &data);
+ f_status_t status = fss_extended_list_read_main(arguments, &data);
if (F_status_is_error(status)) {
return 1;
#endif
#ifndef _di_fss_extended_list_read_print_file_error_
- void fss_extended_list_read_print_file_error(const fl_color_context context, const f_string function_name, const f_string file_name, const f_status status) {
+ void fss_extended_list_read_print_file_error(const fl_color_context_t context, const f_string_t function_name, const f_string_t file_name, const f_status_t status) {
if (fll_file_error_print(f_type_error, context, function_name, file_name, status) == F_false) {
fl_color_print(f_type_error, context.error, context.reset, "INTERNAL ERROR: An unhandled error (");
#endif // _di_fss_extended_list_read_print_file_error_
#ifndef _di_fss_extended_list_read_print_number_argument_error_
- void fss_extended_list_read_print_number_argument_error(const fl_color_context context, const f_string function_name, const f_string parameter_name, const f_string argument, const f_status status) {
+ void fss_extended_list_read_print_number_argument_error(const fl_color_context_t context, const f_string_t function_name, const f_string_t parameter_name, const f_string_t argument, const f_status_t status) {
if (status == F_parameter) {
fl_color_print(f_type_error, context.error, context.reset, "INTERNAL ERROR: Invalid parameter when calling ");
#endif // _di_fss_extended_list_read_print_number_argument_error_
#ifndef _di_fss_extended_list_read_main_preprocess_depth_
- f_return_status fss_extended_list_read_main_preprocess_depth(const f_console_arguments arguments, const fss_extended_list_read_data data, fss_extended_list_read_depths *depths) {
- f_status status = F_none;
+ f_return_status fss_extended_list_read_main_preprocess_depth(const f_console_arguments_t arguments, const fss_extended_list_read_data_t data, fss_extended_list_read_depths_t *depths) {
+ f_status_t status = F_none;
{
- f_array_length depth_size = 1;
+ f_array_length_t depth_size = 1;
if (data.parameters[fss_extended_list_read_parameter_depth].result == f_console_result_additional) {
depth_size = data.parameters[fss_extended_list_read_parameter_depth].additional.used;
}
- macro_fss_extended_list_read_depths_new(status, (*depths), depth_size);
+ macro_fss_extended_list_read_depths_t_new(status, (*depths), depth_size);
if (F_status_is_error(status)) {
fl_color_print_line(f_type_error, data.context.error, data.context.reset, "CRITICAL ERROR: Unable to allocate memory.");
return status;
depths->used = depth_size;
}
- f_array_length position_depth = 0;
- f_array_length position_at = 0;
- f_array_length position_name = 0;
+ f_array_length_t position_depth = 0;
+ f_array_length_t position_at = 0;
+ f_array_length_t position_name = 0;
- for (f_array_length i = 0; i < depths->used; i++) {
+ for (f_array_length_t i = 0; i < depths->used; i++) {
depths->array[i].depth = 0;
depths->array[i].index_at = 0;
depths->array[i].index_name = 0;
depths->array[i].value_at = 0;
- f_macro_string_dynamic_clear(depths->array[i].value_name);
+ f_macro_string_dynamic_t_clear(depths->array[i].value_name);
if (data.parameters[fss_extended_list_read_parameter_depth].additional.used == 0) {
position_depth = 0;
else {
position_depth = data.parameters[fss_extended_list_read_parameter_depth].additional.array[i];
- const f_string_range range = f_macro_string_range_initialize(strlen(arguments.argv[position_depth]));
+ const f_string_range_t range = f_macro_string_range_initialize(strlen(arguments.argv[position_depth]));
status = fl_conversion_string_to_number_unsigned(arguments.argv[position_depth], &depths->array[i].depth, range);
if (F_status_is_error(status)) {
depths->array[i].index_at = data.parameters[fss_extended_list_read_parameter_at].additional.array[position_at];
- const f_string_range range = f_macro_string_range_initialize(strlen(arguments.argv[depths->array[i].index_at]));
+ const f_string_range_t range = f_macro_string_range_initialize(strlen(arguments.argv[depths->array[i].index_at]));
status = fl_conversion_string_to_number_unsigned(arguments.argv[depths->array[i].index_at], &depths->array[i].value_at, range);
if (F_status_is_error(status)) {
}
if (F_status_is_error(status)) {
- f_status status_code = F_status_set_fine(status);
+ f_status_t status_code = F_status_set_fine(status);
// @todo: move error printing into common function.
if (status_code == F_memory_allocation || status_code == F_memory_reallocation) {
fl_color_print_line(f_type_error, data.context.error, data.context.reset, "CRITICAL ERROR: Unable to allocate memory.");
}
- else if (status_code == f_string_length_size) {
+ else if (status_code == f_string_length_t_size) {
fl_color_print(f_type_error, data.context.error, data.context.reset, "ERROR: Unable to process '");
fl_color_print(f_type_error, data.context.notable, data.context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_trim);
fl_color_print_line(f_type_error, data.context.error, data.context.reset, "' because the maximum buffer size was reached.");
}
else {
- f_string function = "fl_string_append";
+ f_string_t function = "fl_string_append";
if (data.parameters[fss_extended_list_read_parameter_trim].result == f_console_result_found) {
function = "fl_string_rip";
}
} // for
- for (f_array_length i = 0; i < depths->used; i++) {
- for (f_array_length j = i + 1; j < depths->used; j++) {
+ for (f_array_length_t i = 0; i < depths->used; i++) {
+ for (f_array_length_t j = i + 1; j < depths->used; j++) {
if (depths->array[i].depth == depths->array[j].depth) {
fl_color_print(f_type_error, data.context.error, data.context.reset, "ERROR: The value '");
fl_color_print(f_type_error, data.context.notable, data.context.reset, "%llu", depths->array[i].depth);
#endif // _di_fss_extended_list_read_main_preprocess_depth_
#ifndef _di_fss_extended_list_read_main_process_file_
- f_return_status fss_extended_list_read_main_process_file(const f_console_arguments arguments, fss_extended_list_read_data *data, const f_string filename, const fss_extended_list_read_depths depths) {
- f_status status = F_none;
+ f_return_status fss_extended_list_read_main_process_file(const f_console_arguments_t arguments, fss_extended_list_read_data_t *data, const f_string_t filename, const fss_extended_list_read_depths_t depths) {
+ f_status_t status = F_none;
{
- f_string_range input = f_string_range_initialize;
+ f_string_range_t input = f_string_range_initialize;
input.start = 0;
input.stop = data->buffer.used - 1;
}
else if (status == F_data_not_stop || status == F_data_not_eos) {
// Clear buffers, then attempt the next file.
- f_macro_fss_nest_delete_simple(data->nest);
- f_macro_string_dynamic_delete_simple(data->buffer);
+ f_macro_fss_nest_t_delete_simple(data->nest);
+ f_macro_string_dynamic_t_delete_simple(data->buffer);
return F_status_set_warning(status);
}
}
{
- f_string_length select = 0;
+ f_string_length_t select = 0;
if (data->parameters[fss_extended_list_read_parameter_select].result == f_console_result_additional) {
- const f_string_length index = data->parameters[fss_extended_list_read_parameter_select].additional.array[data->parameters[fss_extended_list_read_parameter_select].additional.used - 1];
- const f_string_range range = f_macro_string_range_initialize(strlen(arguments.argv[index]));
+ const f_string_length_t index = data->parameters[fss_extended_list_read_parameter_select].additional.array[data->parameters[fss_extended_list_read_parameter_select].additional.used - 1];
+ const f_string_range_t range = f_macro_string_range_initialize(strlen(arguments.argv[index]));
status = fl_conversion_string_to_number_unsigned(arguments.argv[index], &select, range);
if (F_status_is_error(status)) {
}
}
- f_string_length line = 0;
+ f_string_length_t line = 0;
if (data->parameters[fss_extended_list_read_parameter_line].result == f_console_result_additional) {
- const f_string_length index = data->parameters[fss_extended_list_read_parameter_line].additional.array[data->parameters[fss_extended_list_read_parameter_line].additional.used - 1];
- const f_string_range range = f_macro_string_range_initialize(strlen(arguments.argv[index]));
+ const f_string_length_t index = data->parameters[fss_extended_list_read_parameter_line].additional.array[data->parameters[fss_extended_list_read_parameter_line].additional.used - 1];
+ const f_string_range_t range = f_macro_string_range_initialize(strlen(arguments.argv[index]));
- f_number_unsigned number = 0;
+ f_number_unsigned_t number = 0;
status = fl_conversion_string_to_number_unsigned(arguments.argv[index], &number, range);
if (F_status_is_error(status)) {
#endif // _di_fss_extended_list_read_main_process_file_
#ifndef _di_fss_extended_list_read_main_process_for_depth_
- f_return_status fss_extended_list_read_main_process_for_depth(const f_console_arguments arguments, fss_extended_list_read_data *data, const f_string filename, const fss_extended_list_read_depth depth_setting, const f_string_length line) {
- f_status status = F_none;
+ f_return_status fss_extended_list_read_main_process_for_depth(const f_console_arguments_t arguments, fss_extended_list_read_data_t *data, const f_string_t filename, const fss_extended_list_read_depth_t depth_setting, const f_string_length_t line) {
+ f_status_t status = F_none;
- f_fss_items *items = &data->nest.depth[depth_setting.depth];
+ f_fss_items_t *items = &data->nest.depth[depth_setting.depth];
bool names[items->used];
if (depth_setting.index_name > 0) {
memset(names, 0, sizeof(bool) * items->used);
- f_string_range value_range = f_string_range_initialize;
+ f_string_range_t value_range = f_string_range_initialize;
value_range.stop = depth_setting.value_name.used - 1;
if (data->parameters[fss_extended_list_read_parameter_trim].result == f_console_result_found) {
- for (f_string_length i = 0; i < items->used; i++) {
+ for (f_string_length_t i = 0; i < items->used; i++) {
if (fl_string_dynamic_partial_compare_trim(data->buffer, depth_setting.value_name, items->array[i].object, value_range) == F_equal_to) {
names[i] = 1;
}
} // for
}
else {
- for (f_string_length i = 0; i < items->used; i++) {
+ for (f_string_length_t i = 0; i < items->used; i++) {
if (fl_string_dynamic_partial_compare(data->buffer, depth_setting.value_name, items->array[i].object, value_range) == F_equal_to) {
names[i] = 1;
}
return F_none;
}
else if (depth_setting.index_name > 0) {
- f_string_length total = 0;
+ f_string_length_t total = 0;
- for (f_string_length i = 0; i < items->used; i++) {
+ for (f_string_length_t i = 0; i < items->used; i++) {
if (names[i] == 0) continue;
total++;
return F_none;
}
- f_return_status (*print_object)(FILE *, const f_string_static, const f_string_range) = &f_print_string_dynamic_partial;
+ f_return_status (*print_object)(FILE *, const f_string_static_t, const f_string_range_t) = &f_print_string_dynamic_partial;
if (data->parameters[fss_extended_list_read_parameter_trim].result == f_console_result_found) {
print_object = &fl_print_trim_string_dynamic_partial;
return F_none;
}
- for (f_array_length i = 0; i < items->used; i++) {
+ for (f_array_length_t i = 0; i < items->used; i++) {
if (names[i]) {
print_object(f_type_output, data->buffer, items->array[i].object);
fprintf(f_type_output, "%c", f_string_eol[0]);
return F_none;
}
- f_array_length at = 0;
- f_array_length i = 0;
+ f_array_length_t at = 0;
+ f_array_length_t i = 0;
for (; i < items->used; i++) {
if (names[i]) {
fprintf(f_type_output, "0%c", f_string_eol[0]);
}
else {
- f_string_length total = 1;
+ f_string_length_t total = 1;
- for (f_string_length j = items->array[i].content.array[0].start; j <= items->array[i].content.array[0].stop; j++) {
+ for (f_string_length_t j = items->array[i].content.array[0].start; j <= items->array[i].content.array[0].stop; j++) {
if (data->buffer.string[j] == 0) continue;
if (data->buffer.string[j] == f_string_eol[0]) {
}
}
else {
- f_string_length i = items->array[i].content.array[0].start;
+ f_string_length_t i = items->array[i].content.array[0].start;
if (line == 0) {
for (; i <= items->array[i].content.array[0].stop; i++) {
} // for
}
else {
- f_string_length line_current = 0;
+ f_string_length_t line_current = 0;
for (; i <= items->array[i].content.array[0].stop; i++) {
if (data->buffer.string[i] == 0) continue;
}
if (data->parameters[fss_extended_list_read_parameter_total].result == f_console_result_found) {
- f_string_length total = 0;
+ f_string_length_t total = 0;
- for (f_string_length i = 0; i < items->used; i++) {
+ for (f_string_length_t i = 0; i < items->used; i++) {
if (!names[i]) continue;
if (items->array[i].content.used == 0) {
continue;
}
- for (f_string_length j = items->array[i].content.array[0].start; j <= items->array[i].content.array[0].stop; j++) {
+ for (f_string_length_t j = items->array[i].content.array[0].start; j <= items->array[i].content.array[0].stop; j++) {
if (data->buffer.string[j] == 0) continue;
if (data->buffer.string[j] == f_string_eol[0]) {
}
if (data->parameters[fss_extended_list_read_parameter_line].result == f_console_result_additional) {
- f_string_length line_current = 0;
- f_string_length i = 0;
- f_string_length j = 0;
+ f_string_length_t line_current = 0;
+ f_string_length_t i = 0;
+ f_string_length_t j = 0;
for (; i < items->used; i++) {
if (!names[i]) {
return F_none;
}
- for (f_string_length i = 0; i < items->used; i++) {
+ for (f_string_length_t i = 0; i < items->used; i++) {
if (!names[i]) {
continue;
}
* value_at: the value of the "--at" parameter, already processed and ready to use, only when index_at > 0.
* value_name: the value of the "--name" parameter, already processed and ready to use, only when index_name > 0.
*/
-#ifndef _di_fss_extended_list_read_depth_
+#ifndef _di_fss_extended_list_read_depth_t_
typedef struct {
- f_string_length depth;
+ f_string_length_t depth;
- f_array_length index_at;
- f_array_length index_name;
+ f_array_length_t index_at;
+ f_array_length_t index_name;
- f_number_unsigned value_at;
- f_string_dynamic value_name;
- } fss_extended_list_read_depth;
+ f_number_unsigned_t value_at;
+ f_string_dynamic_t value_name;
+ } fss_extended_list_read_depth_t;
- #define fss_extended_list_read_depth_initialize \
+ #define fss_extended_list_read_depth_t_initialize \
{ \
0, \
0, \
0, \
0, \
- f_string_dynamic_initialize, \
+ f_string_dynamic_t_initialize, \
}
- #define macro_fss_extended_list_read_depth_clear(structure) \
+ #define macro_fss_extended_list_read_depth_t_clear(structure) \
structure.depth = 0; \
structure.index_at = 0; \
structure.index_name = 0; \
structure.value_at = 0; \
- f_macro_string_dynamic_clear(structure.value_name)
+ f_macro_string_dynamic_t_clear(structure.value_name)
- #define macro_fss_extended_list_read_depth_delete(status, structure) f_macro_string_dynamic_delete(status, structure.value_name)
- #define macro_fss_extended_list_read_depth_destroy(status, structure) f_macro_string_dynamic_destroy(status, structure.value_name)
+ #define macro_fss_extended_list_read_depth_t_delete(status, structure) f_macro_string_dynamic_t_delete(status, structure.value_name)
+ #define macro_fss_extended_list_read_depth_t_destroy(status, structure) f_macro_string_dynamic_t_destroy(status, structure.value_name)
- #define macro_fss_extended_list_read_depth_delete_simple(structure) f_macro_string_dynamic_delete_simple(structure.value_name)
- #define macro_fss_extended_list_read_depth_destroy_simple(structure) f_macro_string_dynamic_destroy_simple(structure.value_name)
-#endif // _di_fss_extended_list_read_depth_
+ #define macro_fss_extended_list_read_depth_t_delete_simple(structure) f_macro_string_dynamic_t_delete_simple(structure.value_name)
+ #define macro_fss_extended_list_read_depth_t_destroy_simple(structure) f_macro_string_dynamic_t_destroy_simple(structure.value_name)
+#endif // _di_fss_extended_list_read_depth_t_
/**
* An array of depth parameters.
* size: total amount of allocated space.
* used: total number of allocated spaces used.
*/
-#ifndef _di_fss_extended_list_read_depths_
+#ifndef _di_fss_extended_list_read_depths_t_
typedef struct {
- fss_extended_list_read_depth *array;
+ fss_extended_list_read_depth_t *array;
- f_array_length size;
- f_array_length used;
- } fss_extended_list_read_depths;
+ f_array_length_t size;
+ f_array_length_t used;
+ } fss_extended_list_read_depths_t;
- #define fss_extended_list_read_depths_initialize { 0, 0, 0 }
+ #define fss_extended_list_read_depths_t_initialize { 0, 0, 0 }
- #define macro_fss_extended_list_read_depths_clear(depths) f_macro_memory_structure_clear(depths)
+ #define macro_fss_extended_list_read_depths_t_clear(depths) f_macro_memory_structure_t_clear(depths)
- #define macro_fss_extended_list_read_depths_new(status, depths, length) f_macro_memory_structure_new(status, depths, fss_extended_list_read_depth, length)
+ #define macro_fss_extended_list_read_depths_t_new(status, depths, length) f_macro_memory_structure_t_new(status, depths, fss_extended_list_read_depth_t, length)
- #define macro_fss_extended_list_read_depths_delete(status, depths) \
+ #define macro_fss_extended_list_read_depths_t_delete(status, depths) \
status = F_none; \
depths.used = depths.size; \
while (depths.used > 0) { \
depths.used--; \
- macro_fss_extended_list_read_depth_delete(status, depths.array[depths.used]); \
+ macro_fss_extended_list_read_depth_t_delete(status, depths.array[depths.used]); \
if (status != F_none) break; \
} \
- if (status == F_none) f_macro_memory_structure_delete(depths, fss_extended_list_read_depth)
+ if (status == F_none) f_macro_memory_structure_t_delete(depths, fss_extended_list_read_depth_t)
- #define macro_fss_extended_list_read_depths_destroy(status, depths) \
+ #define macro_fss_extended_list_read_depths_t_destroy(status, depths) \
status = F_none; \
depths.used = depths.size; \
while (depths.used > 0) { \
depths.used--; \
- macro_fss_extended_list_read_depth_destroy(status, depths.array[depths.used]); \
+ macro_fss_extended_list_read_depth_t_destroy(status, depths.array[depths.used]); \
if (status != F_none) break; \
} \
- if (status == F_none) f_macro_memory_structure_destroy(depths, fss_extended_list_read_depth)
+ if (status == F_none) f_macro_memory_structure_t_destroy(depths, fss_extended_list_read_depth_t)
- #define macro_fss_extended_list_read_depths_delete_simple(depths) \
+ #define macro_fss_extended_list_read_depths_t_delete_simple(depths) \
depths.used = depths.size; \
while (depths.used > 0) { \
depths.used--; \
- macro_fss_extended_list_read_depth_delete_simple(depths.array[depths.used]); \
+ macro_fss_extended_list_read_depth_t_delete_simple(depths.array[depths.used]); \
} \
- if (depths.used == 0) f_macro_memory_structure_delete_simple(depths, fss_extended_list_read_depth)
+ if (depths.used == 0) f_macro_memory_structure_t_delete_simple(depths, fss_extended_list_read_depth_t)
- #define macro_fss_extended_list_read_depths_destroy_simple(depths) \
+ #define macro_fss_extended_list_read_depths_t_destroy_simple(depths) \
depths.used = depths.size; \
while (depths.used > 0) { \
depths.used--; \
- macro_fss_extended_list_read_depth_destroy_simple(depths.array[depths.used]); \
+ macro_fss_extended_list_read_depth_t_destroy_simple(depths.array[depths.used]); \
} \
- if (depths.used == 0) f_macro_memory_structure_destroy_simple(depths, fss_extended_list_read_depth)
+ if (depths.used == 0) f_macro_memory_structure_t_destroy_simple(depths, fss_extended_list_read_depth_t)
- #define macro_fss_extended_list_read_depths_resize(status, depths, new_length) \
+ #define macro_fss_extended_list_read_t_depths_resize(status, depths, new_length) \
status = F_none; \
if (new_length < depths.size) { \
- f_array_length i = depths.size - new_length; \
+ f_array_length_t i = depths.size - new_length; \
for (; i < depths.size; i++) { \
- macro_fss_extended_list_read_depth_delete(status, depths.array[i]); \
+ macro_fss_extended_list_read_depth_t_delete(status, depths.array[i]); \
if (status != F_none) break; \
} \
} \
- if (status == F_none) status = f_memory_resize((void **) & depths.array, sizeof(fss_extended_list_read_depth), depths.size, new_length); \
+ if (status == F_none) status = f_memory_resize((void **) & depths.array, sizeof(fss_extended_list_read_depth_t), depths.size, new_length); \
if (status == F_none) { \
if (new_length > depths.size) { \
- f_array_length i = depths.size; \
+ f_array_length_t i = depths.size; \
for (; i < new_length; i++) { \
- memset(&depths.array[i], 0, sizeof(fss_extended_list_read_depth)); \
+ memset(&depths.array[i], 0, sizeof(fss_extended_list_read_depth_t)); \
} \
} \
depths.size = new_length; \
if (depths.used > depths.size) depths.used = new_length; \
}
- #define macro_fss_extended_list_read_depths_adjust(status, depths, new_length) \
+ #define macro_fss_extended_list_read_depths_t_adjust(status, depths, new_length) \
status = F_none; \
if (new_length < depths.size) { \
- f_array_length i = depths.size - new_length; \
+ f_array_length_t i = depths.size - new_length; \
for (; i < depths.size; i++) { \
- macro_fss_extended_list_read_depth_delete(status, depths.array[i]); \
+ macro_fss_extended_list_read_depth_t_delete(status, depths.array[i]); \
if (status != F_none) break; \
} \
} \
- if (status == F_none) status = f_memory_adjust((void **) & depths.array, sizeof(fss_extended_list_read_depth), depths.size, new_length); \
+ if (status == F_none) status = f_memory_adjust((void **) & depths.array, sizeof(fss_extended_list_read_depth_t), depths.size, new_length); \
if (status == F_none) { \
if (new_length > depths.size) { \
- f_array_length i = depths.size; \
+ f_array_length_t i = depths.size; \
for (; i < new_length; i++) { \
- memset(&depths.array[i], 0, sizeof(fss_extended_list_read_depth)); \
+ memset(&depths.array[i], 0, sizeof(fss_extended_list_read_depth_t)); \
} \
} \
depths.size = new_length; \
if (depths.used > depths.size) depths.used = new_length; \
}
-#endif // _di_fss_extended_list_read_depths_
+#endif // _di_fss_extended_list_read_depths_t_
/**
* Print file error messages.
* The status code representing the error.
*/
#ifndef _di_fss_extended_list_read_print_file_error_
- extern void fss_extended_list_read_print_file_error(const fl_color_context context, const f_string function_name, const f_string file_name, const f_status status) f_gcc_attribute_visibility_internal;
+ extern void fss_extended_list_read_print_file_error(const fl_color_context_t context, const f_string_t function_name, const f_string_t file_name, const f_status_t status) f_gcc_attribute_visibility_internal;
#endif // _di_fss_extended_list_read_print_file_error_
/**
* The status code representing the error.
*/
#ifndef _di_fss_extended_list_read_print_number_argument_error_
- extern void fss_extended_list_read_print_number_argument_error(const fl_color_context context, const f_string function_name, const f_string parameter_name, const f_string argument, const f_status status) f_gcc_attribute_visibility_internal;
+ extern void fss_extended_list_read_print_number_argument_error(const fl_color_context_t context, const f_string_t function_name, const f_string_t parameter_name, const f_string_t argument, const f_status_t status) f_gcc_attribute_visibility_internal;
#endif // _di_fss_extended_list_read_print_number_argument_error_
/**
* F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_fss_extended_list_read_main_preprocess_depth_
- extern f_return_status fss_extended_list_read_main_preprocess_depth(const f_console_arguments arguments, const fss_extended_list_read_data data, fss_extended_list_read_depths *depths) f_gcc_attribute_visibility_internal;
+ extern f_return_status fss_extended_list_read_main_preprocess_depth(const f_console_arguments_t arguments, const fss_extended_list_read_data_t data, fss_extended_list_read_depths_t *depths) f_gcc_attribute_visibility_internal;
#endif // _di_fss_extended_list_read_main_preprocess_depth_
/**
* @see fss_extended_list_read_main_process_for_depth()
*/
#ifndef _di_fss_extended_list_read_main_process_file_
- extern f_return_status fss_extended_list_read_main_process_file(const f_console_arguments arguments, fss_extended_list_read_data *data, const f_string file_name, const fss_extended_list_read_depths depths) f_gcc_attribute_visibility_internal;
+ extern f_return_status fss_extended_list_read_main_process_file(const f_console_arguments_t arguments, fss_extended_list_read_data_t *data, const f_string_t file_name, const fss_extended_list_read_depths_t depths) f_gcc_attribute_visibility_internal;
#endif // _di_fss_extended_list_read_main_process_file_
/**
* @see fss_extended_list_read_main_process_file()
*/
#ifndef _di_fss_extended_list_read_main_process_for_depth_
- extern f_return_status fss_extended_list_read_main_process_for_depth(const f_console_arguments arguments, fss_extended_list_read_data *data, const f_string filename, const fss_extended_list_read_depth depth_setting, const f_string_length line) f_gcc_attribute_visibility_internal;
+ extern f_return_status fss_extended_list_read_main_process_for_depth(const f_console_arguments_t arguments, fss_extended_list_read_data_t *data, const f_string_t filename, const fss_extended_list_read_depth_t depth_setting, const f_string_length_t line) f_gcc_attribute_visibility_internal;
#endif // _di_fss_extended_list_read_main_process_for_depth_
#ifdef __cplusplus
#endif
#ifndef _di_fss_extended_read_print_help_
- f_return_status fss_extended_read_print_help(const fl_color_context context) {
+ f_return_status fss_extended_read_print_help(const fl_color_context_t context) {
fll_program_print_help_header(context, fss_extended_read_name_long, fss_extended_read_version);
fll_program_print_help_option(context, f_console_standard_short_help, f_console_standard_long_help, f_console_symbol_short_enable, f_console_symbol_long_enable, " Print this help message.");
#endif // _di_fss_extended_read_print_help_
#ifndef _di_fss_extended_read_main_
- f_return_status fss_extended_read_main(const f_console_arguments arguments, fss_extended_read_data *data) {
- f_status status = F_none;
+ f_return_status fss_extended_read_main(const f_console_arguments_t arguments, fss_extended_read_data_t *data) {
+ f_status_t status = F_none;
{
- f_console_parameters parameters = { data->parameters, fss_extended_read_total_parameters };
- f_console_parameter_id ids[3] = { fss_extended_read_parameter_no_color, fss_extended_read_parameter_light, fss_extended_read_parameter_dark };
- f_console_parameter_ids choices = { ids, 3 };
+ f_console_parameters_t parameters = { data->parameters, fss_extended_read_total_parameters };
+ f_console_parameter_id_t ids[3] = { fss_extended_read_parameter_no_color, fss_extended_read_parameter_light, fss_extended_read_parameter_dark };
+ f_console_parameter_ids_t choices = { ids, 3 };
status = fll_program_parameter_process(arguments, parameters, choices, F_true, &data->remaining, &data->context);
}
}
- fss_extended_read_depths depths = fss_extended_read_depths_initialize;
+ fss_extended_read_depths_t depths = fss_extended_read_depths_t_initialize;
- f_string_length counter = 0;
- f_string_length original_size = data->quantity.total;
+ f_string_length_t counter = 0;
+ f_string_length_t original_size = data->quantity.total;
status = fss_extended_read_main_preprocess_depth(arguments, *data, &depths);
if (F_status_is_error(status)) {
- macro_fss_extended_read_depths_delete_simple(depths);
+ macro_fss_extended_read_depths_t_delete_simple(depths);
fss_extended_read_delete_data(data);
return status;
}
// This standard does not support nesting, so any depth greater than 0 can be predicted without processing the file.
if (depths.array[0].depth > 0) {
- macro_fss_extended_read_depths_delete_simple(depths);
+ macro_fss_extended_read_depths_t_delete_simple(depths);
if (data->parameters[fss_extended_read_parameter_total].result == f_console_result_found) {
fprintf(f_type_output, "0%c", f_string_eol[0]);
fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_select);
fl_color_print_line(f_type_error, data->context.error, data->context.reset, "' parameter requires a positive number.");
- macro_fss_extended_read_depths_delete_simple(depths);
+ macro_fss_extended_read_depths_t_delete_simple(depths);
fss_extended_read_delete_data(data);
return F_status_set_error(F_parameter);
}
if (data->process_pipe) {
- f_file file = f_file_initialize;
+ f_file_t file = f_file_t_initialize;
file.id = f_type_descriptor_input;
if (F_status_is_error(status)) {
fss_extended_read_print_file_error(data->context, "f_file_read", "-", F_status_set_fine(status));
- macro_fss_extended_read_depths_delete_simple(depths);
+ macro_fss_extended_read_depths_t_delete_simple(depths);
fss_extended_read_delete_data(data);
return status;
}
status = fss_extended_read_main_process_file(arguments, data, "-", depths);
if (F_status_is_error(status)) {
- macro_fss_extended_read_depths_delete_simple(depths);
+ macro_fss_extended_read_depths_t_delete_simple(depths);
fss_extended_read_delete_data(data);
return status;
}
// Clear buffers before continuing.
- f_macro_fss_contents_delete_simple(data->contents);
- f_macro_fss_objects_delete_simple(data->objects);
- f_macro_string_dynamic_delete_simple(data->buffer);
+ f_macro_fss_contents_t_delete_simple(data->contents);
+ f_macro_fss_objects_t_delete_simple(data->objects);
+ f_macro_string_dynamic_t_delete_simple(data->buffer);
}
if (data->remaining.used > 0) {
for (; counter < data->remaining.used; counter++) {
- f_file file = f_file_initialize;
+ f_file_t file = f_file_t_initialize;
status = f_file_open(arguments.argv[data->remaining.array[counter]], 0, &file);
if (F_status_is_error(status)) {
fss_extended_read_print_file_error(data->context, "f_file_open", arguments.argv[data->remaining.array[counter]], F_status_set_fine(status));
- macro_fss_extended_read_depths_delete_simple(depths);
+ macro_fss_extended_read_depths_t_delete_simple(depths);
fss_extended_read_delete_data(data);
return status;
}
f_file_close(&file.id);
- macro_fss_extended_read_depths_delete_simple(depths);
+ macro_fss_extended_read_depths_t_delete_simple(depths);
fss_extended_read_delete_data(data);
return status;
}
if (F_status_is_error(status)) {
fss_extended_read_print_file_error(data->context, "f_file_read_until", arguments.argv[data->remaining.array[counter]], F_status_set_fine(status));
- macro_fss_extended_read_depths_delete_simple(depths);
+ macro_fss_extended_read_depths_t_delete_simple(depths);
fss_extended_read_delete_data(data);
return status;
}
status = fss_extended_read_main_process_file(arguments, data, arguments.argv[data->remaining.array[counter]], depths);
if (F_status_is_error(status)) {
- macro_fss_extended_read_depths_delete_simple(depths);
+ macro_fss_extended_read_depths_t_delete_simple(depths);
fss_extended_read_delete_data(data);
return status;
}
// Clear buffers before repeating the loop.
- f_macro_fss_contents_delete_simple(data->contents);
- f_macro_fss_objects_delete_simple(data->objects);
- f_macro_string_dynamic_delete_simple(data->buffer);
+ f_macro_fss_contents_t_delete_simple(data->contents);
+ f_macro_fss_objects_t_delete_simple(data->objects);
+ f_macro_string_dynamic_t_delete_simple(data->buffer);
} // for
}
- macro_fss_extended_read_depths_delete_simple(depths);
+ macro_fss_extended_read_depths_t_delete_simple(depths);
}
else {
fl_color_print_line(f_type_error, data->context.error, data->context.reset, "ERROR: You failed to specify one or more files.");
#endif // _di_fss_extended_read_main_
#ifndef _di_fss_extended_read_delete_data_
- f_return_status fss_extended_read_delete_data(fss_extended_read_data *data) {
- f_status status = F_none;
- f_string_length i = 0;
+ f_return_status fss_extended_read_delete_data(fss_extended_read_data_t *data) {
+ f_status_t status = F_none;
+ f_string_length_t i = 0;
while (i < fss_extended_read_total_parameters) {
- f_macro_string_lengths_delete_simple(data->parameters[i].locations);
- f_macro_string_lengths_delete_simple(data->parameters[i].additional);
+ f_macro_string_lengths_t_delete_simple(data->parameters[i].locations);
+ f_macro_string_lengths_t_delete_simple(data->parameters[i].additional);
i++;
} // while
- f_macro_fss_contents_delete_simple(data->contents);
- f_macro_fss_objects_delete_simple(data->objects);
- f_macro_string_dynamic_delete_simple(data->buffer);
- f_macro_string_lengths_delete_simple(data->remaining);
+ f_macro_fss_contents_t_delete_simple(data->contents);
+ f_macro_fss_objects_t_delete_simple(data->objects);
+ f_macro_string_dynamic_t_delete_simple(data->buffer);
+ f_macro_string_lengths_t_delete_simple(data->remaining);
- fl_macro_color_context_delete_simple(data->context);
+ fl_macro_color_context_t_delete_simple(data->context);
return F_none;
}
*
* This is the FSS Basic Read program
* This program utilizes the Featureless Linux Library.
- * This program processes files or other input in fss format and stores the results in the fss_extended_read_data.
+ * This program processes files or other input in fss format and stores the results in the fss_extended_read_data_t.
*
* This processes in accordance to the FSS-0001 Extended specification.
*/
fss_extended_read_parameter_trim,
};
- #define f_console_parameter_initialize_fss_extended_read \
+ #define fss_extended_read_console_parameter_t_initialize \
{ \
- f_console_parameter_initialize(f_console_standard_short_help, f_console_standard_long_help, 0, F_false, f_console_type_normal), \
- f_console_parameter_initialize(f_console_standard_short_light, f_console_standard_long_light, 0, F_false, f_console_type_inverse), \
- f_console_parameter_initialize(f_console_standard_short_dark, f_console_standard_long_dark, 0, F_false, f_console_type_inverse), \
- f_console_parameter_initialize(f_console_standard_short_no_color, f_console_standard_long_no_color, 0, F_false, f_console_type_inverse), \
- f_console_parameter_initialize(f_console_standard_short_version, f_console_standard_long_version, 0, F_false, f_console_type_inverse), \
- f_console_parameter_initialize(fss_extended_read_short_at, fss_extended_read_long_at, 0, F_true, f_console_type_normal), \
- f_console_parameter_initialize(fss_extended_read_short_depth, fss_extended_read_long_depth, 0, F_true, f_console_type_normal), \
- f_console_parameter_initialize(fss_extended_read_short_empty, fss_extended_read_long_empty, 0, F_false, f_console_type_normal), \
- f_console_parameter_initialize(fss_extended_read_short_line, fss_extended_read_long_line, 0, F_true, f_console_type_normal), \
- f_console_parameter_initialize(fss_extended_read_short_name, fss_extended_read_long_name, 0, F_true, f_console_type_normal), \
- f_console_parameter_initialize(fss_extended_read_short_object, fss_extended_read_long_object, 0, F_false, f_console_type_normal), \
- f_console_parameter_initialize(fss_extended_read_short_select, fss_extended_read_long_select, 0, F_true, f_console_type_normal), \
- f_console_parameter_initialize(fss_extended_read_short_total, fss_extended_read_long_total, 0, F_false, f_console_type_normal), \
- f_console_parameter_initialize(fss_extended_read_short_trim, fss_extended_read_long_trim, 0, F_false, f_console_type_normal), \
+ f_console_parameter_t_initialize(f_console_standard_short_help, f_console_standard_long_help, 0, F_false, f_console_type_normal), \
+ f_console_parameter_t_initialize(f_console_standard_short_light, f_console_standard_long_light, 0, F_false, f_console_type_inverse), \
+ f_console_parameter_t_initialize(f_console_standard_short_dark, f_console_standard_long_dark, 0, F_false, f_console_type_inverse), \
+ f_console_parameter_t_initialize(f_console_standard_short_no_color, f_console_standard_long_no_color, 0, F_false, f_console_type_inverse), \
+ f_console_parameter_t_initialize(f_console_standard_short_version, f_console_standard_long_version, 0, F_false, f_console_type_inverse), \
+ f_console_parameter_t_initialize(fss_extended_read_short_at, fss_extended_read_long_at, 0, F_true, f_console_type_normal), \
+ f_console_parameter_t_initialize(fss_extended_read_short_depth, fss_extended_read_long_depth, 0, F_true, f_console_type_normal), \
+ f_console_parameter_t_initialize(fss_extended_read_short_empty, fss_extended_read_long_empty, 0, F_false, f_console_type_normal), \
+ f_console_parameter_t_initialize(fss_extended_read_short_line, fss_extended_read_long_line, 0, F_true, f_console_type_normal), \
+ f_console_parameter_t_initialize(fss_extended_read_short_name, fss_extended_read_long_name, 0, F_true, f_console_type_normal), \
+ f_console_parameter_t_initialize(fss_extended_read_short_object, fss_extended_read_long_object, 0, F_false, f_console_type_normal), \
+ f_console_parameter_t_initialize(fss_extended_read_short_select, fss_extended_read_long_select, 0, F_true, f_console_type_normal), \
+ f_console_parameter_t_initialize(fss_extended_read_short_total, fss_extended_read_long_total, 0, F_false, f_console_type_normal), \
+ f_console_parameter_t_initialize(fss_extended_read_short_trim, fss_extended_read_long_trim, 0, F_false, f_console_type_normal), \
}
#define fss_extended_read_total_parameters 14
#endif // _di_fss_extended_read_defines_
-#ifndef _di_fss_extended_read_data_
+#ifndef _di_fss_extended_read_data_t_
typedef struct {
- f_console_parameter parameters[fss_extended_read_total_parameters];
+ f_console_parameter_t parameters[fss_extended_read_total_parameters];
- f_string_dynamic buffer;
- f_fss_objects objects;
- f_fss_contents contents;
- f_string_quantity quantity;
- f_string_lengths remaining;
+ f_string_dynamic_t buffer;
+ f_fss_objects_t objects;
+ f_fss_contents_t contents;
+ f_string_quantity_t quantity;
+ f_string_lengths_t remaining;
bool process_pipe;
- fl_color_context context;
- } fss_extended_read_data;
+ fl_color_context_t context;
+ } fss_extended_read_data_t;
#define fss_extended_read_data_initialize \
{ \
- f_console_parameter_initialize_fss_extended_read, \
- f_string_dynamic_initialize, \
- f_fss_objects_initialize, \
- f_fss_contents_initialize, \
- f_string_quantity_initialize, \
- f_string_lengths_initialize, \
+ fss_extended_read_console_parameter_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_fss_objects_t_initialize, \
+ f_fss_contents_t_initialize, \
+ f_string_quantity_t_initialize, \
+ f_string_lengths_t_initialize, \
F_false, \
- fl_color_context_initialize, \
+ fl_color_context_t_initialize, \
}
-#endif // _di_fss_extended_read_data_
+#endif // _di_fss_extended_read_data_t_
/**
* Print help to standard output.
* F_none on success.
*/
#ifndef _di_fss_extended_read_print_help_
- extern f_return_status fss_extended_read_print_help(const fl_color_context context);
+ extern f_return_status fss_extended_read_print_help(const fl_color_context_t context);
#endif // _di_fss_extended_read_print_help_
/**
* @see fss_extended_read_delete_data()
*/
#ifndef _di_fss_extended_read_main_
- extern f_return_status fss_extended_read_main(const f_console_arguments arguments, fss_extended_read_data *data);
+ extern f_return_status fss_extended_read_main(const f_console_arguments_t arguments, fss_extended_read_data_t *data);
#endif // _di_fss_extended_read_main_
/**
* @see fss_extended_read_main()
*/
#ifndef _di_fss_extended_read_delete_data_
- extern f_return_status fss_extended_read_delete_data(fss_extended_read_data *data);
+ extern f_return_status fss_extended_read_delete_data(fss_extended_read_data_t *data);
#endif // _di_fss_extended_read_delete_data_
#ifdef __cplusplus
#include "fss_extended_read.h"
-int main(const unsigned long argc, const f_string *argv) {
- const f_console_arguments arguments = { argc, argv };
- fss_extended_read_data data = fss_extended_read_data_initialize;
+int main(const unsigned long argc, const f_string_t *argv) {
+ const f_console_arguments_t arguments = { argc, argv };
+ fss_extended_read_data_t data = fss_extended_read_data_initialize;
if (f_pipe_input_exists()) {
data.process_pipe = F_true;
}
- f_status status = fss_extended_read_main(arguments, &data);
+ f_status_t status = fss_extended_read_main(arguments, &data);
if (F_status_is_error(status)) {
return 1;
#endif
#ifndef _di_fss_extended_read_print_file_error_
- void fss_extended_read_print_file_error(const fl_color_context context, const f_string function_name, const f_string file_name, const f_status status) {
+ void fss_extended_read_print_file_error(const fl_color_context_t context, const f_string_t function_name, const f_string_t file_name, const f_status_t status) {
if (fll_file_error_print(f_type_error, context, function_name, file_name, status) == F_false) {
fl_color_print(f_type_error, context.error, context.reset, "INTERNAL ERROR: An unhandled error (");
#endif // _di_fss_extended_read_print_file_error_
#ifndef _di_fss_extended_read_print_number_argument_error_
- void fss_extended_read_print_number_argument_error(const fl_color_context context, const f_string function_name, const f_string parameter_name, const f_string argument, const f_status status) {
+ void fss_extended_read_print_number_argument_error(const fl_color_context_t context, const f_string_t function_name, const f_string_t parameter_name, const f_string_t argument, const f_status_t status) {
if (status == F_parameter) {
fl_color_print(f_type_error, context.error, context.reset, "INTERNAL ERROR: Invalid parameter when calling ");
#endif // _di_fss_extended_read_print_number_argument_error_
#ifndef _di_fss_extended_read_main_preprocess_depth_
- f_return_status fss_extended_read_main_preprocess_depth(const f_console_arguments arguments, const fss_extended_read_data data, fss_extended_read_depths *depths) {
- f_status status = F_none;
+ f_return_status fss_extended_read_main_preprocess_depth(const f_console_arguments_t arguments, const fss_extended_read_data_t data, fss_extended_read_depths_t *depths) {
+ f_status_t status = F_none;
{
- f_array_length depth_size = 1;
+ f_array_length_t depth_size = 1;
if (data.parameters[fss_extended_read_parameter_depth].result == f_console_result_additional) {
depth_size = data.parameters[fss_extended_read_parameter_depth].additional.used;
}
- macro_fss_extended_read_depths_new(status, (*depths), depth_size);
+ macro_fss_extended_read_depths_t_new(status, (*depths), depth_size);
if (F_status_is_error(status)) {
fl_color_print_line(f_type_error, data.context.error, data.context.reset, "CRITICAL ERROR: Unable to allocate memory.");
return status;
depths->used = depth_size;
}
- f_array_length position_depth = 0;
- f_array_length position_at = 0;
- f_array_length position_name = 0;
+ f_array_length_t position_depth = 0;
+ f_array_length_t position_at = 0;
+ f_array_length_t position_name = 0;
- for (f_array_length i = 0; i < depths->used; i++) {
+ for (f_array_length_t i = 0; i < depths->used; i++) {
depths->array[i].depth = 0;
depths->array[i].index_at = 0;
depths->array[i].index_name = 0;
depths->array[i].value_at = 0;
- f_macro_string_dynamic_clear(depths->array[i].value_name);
+ f_macro_string_dynamic_t_clear(depths->array[i].value_name);
if (data.parameters[fss_extended_read_parameter_depth].additional.used == 0) {
position_depth = 0;
else {
position_depth = data.parameters[fss_extended_read_parameter_depth].additional.array[i];
- const f_string_range range = f_macro_string_range_initialize(strlen(arguments.argv[position_depth]));
+ const f_string_range_t range = f_macro_string_range_initialize(strlen(arguments.argv[position_depth]));
status = fl_conversion_string_to_number_unsigned(arguments.argv[position_depth], &depths->array[i].depth, range);
if (F_status_is_error(status)) {
depths->array[i].index_at = data.parameters[fss_extended_read_parameter_at].additional.array[position_at];
- const f_string_range range = f_macro_string_range_initialize(strlen(arguments.argv[depths->array[i].index_at]));
+ const f_string_range_t range = f_macro_string_range_initialize(strlen(arguments.argv[depths->array[i].index_at]));
status = fl_conversion_string_to_number_unsigned(arguments.argv[depths->array[i].index_at], &depths->array[i].value_at, range);
if (F_status_is_error(status)) {
}
if (F_status_is_error(status)) {
- f_status status_code = F_status_set_fine(status);
+ f_status_t status_code = F_status_set_fine(status);
// @todo: move error printing into common function.
if (status_code == F_memory_allocation || status_code == F_memory_reallocation) {
fl_color_print_line(f_type_error, data.context.error, data.context.reset, "CRITICAL ERROR: Unable to allocate memory.");
}
- else if (status_code == f_string_length_size) {
+ else if (status_code == f_string_length_t_size) {
fl_color_print(f_type_error, data.context.error, data.context.reset, "ERROR: Unable to process '");
fl_color_print(f_type_error, data.context.notable, data.context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_trim);
fl_color_print_line(f_type_error, data.context.error, data.context.reset, "' because the maximum buffer size was reached.");
}
else {
- f_string function = "fl_string_append";
+ f_string_t function = "fl_string_append";
if (data.parameters[fss_extended_read_parameter_trim].result == f_console_result_found) {
function = "fl_string_rip";
}
} // for
- for (f_array_length i = 0; i < depths->used; i++) {
- for (f_array_length j = i + 1; j < depths->used; j++) {
+ for (f_array_length_t i = 0; i < depths->used; i++) {
+ for (f_array_length_t j = i + 1; j < depths->used; j++) {
if (depths->array[i].depth == depths->array[j].depth) {
fl_color_print(f_type_error, data.context.error, data.context.reset, "ERROR: The value '");
fl_color_print(f_type_error, data.context.notable, data.context.reset, "%llu", depths->array[i].depth);
#endif // _di_fss_extended_read_main_preprocess_depth_
#ifndef _di_fss_extended_read_main_process_file_
- f_return_status fss_extended_read_main_process_file(const f_console_arguments arguments, fss_extended_read_data *data, const f_string filename, const fss_extended_read_depths depths) {
- f_status status = F_none;
+ f_return_status fss_extended_read_main_process_file(const f_console_arguments_t arguments, fss_extended_read_data_t *data, const f_string_t filename, const fss_extended_read_depths_t depths) {
+ f_status_t status = F_none;
{
- f_string_range input = f_string_range_initialize;
+ f_string_range_t input = f_string_range_initialize;
input.start = 0;
input.stop = data->buffer.used - 1;
}
else if (status == F_data_not_stop || status == F_data_not_eos) {
// Clear buffers, then attempt the next file.
- f_macro_fss_contents_delete_simple(data->contents);
- f_macro_fss_objects_delete_simple(data->objects);
- f_macro_string_dynamic_delete_simple(data->buffer);
+ f_macro_fss_contents_t_delete_simple(data->contents);
+ f_macro_fss_objects_t_delete_simple(data->objects);
+ f_macro_string_dynamic_t_delete_simple(data->buffer);
return F_status_set_warning(status);
}
}
- f_string_length select = 0;
+ f_string_length_t select = 0;
if (data->parameters[fss_extended_read_parameter_select].result == f_console_result_additional) {
- const f_string_length index = data->parameters[fss_extended_read_parameter_select].additional.array[data->parameters[fss_extended_read_parameter_select].additional.used - 1];
- const f_string_range range = f_macro_string_range_initialize(strlen(arguments.argv[index]));
+ const f_string_length_t index = data->parameters[fss_extended_read_parameter_select].additional.array[data->parameters[fss_extended_read_parameter_select].additional.used - 1];
+ const f_string_range_t range = f_macro_string_range_initialize(strlen(arguments.argv[index]));
status = fl_conversion_string_to_number_unsigned(arguments.argv[index], &select, range);
if (F_status_is_error(status)) {
}
}
- f_string_length line = 0;
+ f_string_length_t line = 0;
if (data->parameters[fss_extended_read_parameter_line].result == f_console_result_additional) {
- const f_string_length index = data->parameters[fss_extended_read_parameter_line].additional.array[data->parameters[fss_extended_read_parameter_line].additional.used - 1];
- const f_string_range range = f_macro_string_range_initialize(strlen(arguments.argv[index]));
+ const f_string_length_t index = data->parameters[fss_extended_read_parameter_line].additional.array[data->parameters[fss_extended_read_parameter_line].additional.used - 1];
+ const f_string_range_t range = f_macro_string_range_initialize(strlen(arguments.argv[index]));
status = fl_conversion_string_to_number_unsigned(arguments.argv[index], &line, range);
if (F_status_is_error(status)) {
if (depths.array[0].index_name > 0) {
memset(names, 0, sizeof(bool) * data->objects.used);
- f_string_length name_length = 0;
+ f_string_length_t name_length = 0;
if (data->parameters[fss_extended_read_parameter_trim].result == f_console_result_found) {
- for (f_string_length i = 0; i < data->objects.used; i++) {
+ for (f_string_length_t i = 0; i < data->objects.used; i++) {
name_length = (data->objects.array[i].stop - data->objects.array[i].start) + 1;
if (name_length == depths.array[0].value_name.used) {
} // for
}
else {
- for (f_string_length i = 0; i < data->objects.used; i++) {
+ for (f_string_length_t i = 0; i < data->objects.used; i++) {
name_length = (data->objects.array[i].stop - data->objects.array[i].start) + 1;
if (name_length == depths.array[0].value_name.used) {
}
}
else if (depths.array[0].index_name > 0) {
- f_string_length total = 0;
+ f_string_length_t total = 0;
- for (f_string_length i = 0; i < data->objects.used; i++) {
+ for (f_string_length_t i = 0; i < data->objects.used; i++) {
if (names[i] == 0) continue;
total++;
return F_none;
}
- f_return_status (*print_object)(FILE *, const f_string_static, const f_string_range) = &f_print_string_dynamic_partial;
+ f_return_status (*print_object)(FILE *, const f_string_static_t, const f_string_range_t) = &f_print_string_dynamic_partial;
if (data->parameters[fss_extended_read_parameter_trim].result == f_console_result_found) {
print_object = &fl_print_trim_string_dynamic_partial;
}
if (depths.array[0].index_at > 0) {
- f_array_length at = 0;
- f_array_length i = 0;
+ f_array_length_t at = 0;
+ f_array_length_t i = 0;
for (; i < data->objects.used; i++) {
if (names[i]) {
return F_none;
}
- for (f_string_length i = 0; i < data->objects.used; i++) {
+ for (f_string_length_t i = 0; i < data->objects.used; i++) {
if (names[i] == 0) continue;
print_object(f_type_output, data->buffer, data->objects.array[i]);
return F_none;
}
- f_array_length at = 0;
- f_array_length i = 0;
+ f_array_length_t at = 0;
+ f_array_length_t i = 0;
for (; i < data->objects.used; i++) {
if (names[i]) {
if (data->parameters[fss_extended_read_parameter_line].result == f_console_result_additional) {
if (line == 0) {
if (data->contents.array[i].used > 0) {
- f_string_length j = 0;
+ f_string_length_t j = 0;
if (data->parameters[fss_extended_read_parameter_select].result == f_console_result_additional) {
if (select < data->contents.array[i].used) {
}
if (data->contents.array[i].used > 0) {
- f_string_length j = 0;
+ f_string_length_t j = 0;
if (data->parameters[fss_extended_read_parameter_select].result == f_console_result_additional) {
if (select < data->contents.array[i].used) {
}
if (data->parameters[fss_extended_read_parameter_total].result == f_console_result_found) {
- f_string_length total = 0;
+ f_string_length_t total = 0;
- for (f_string_length i = 0; i < data->objects.used; i++) {
+ for (f_string_length_t i = 0; i < data->objects.used; i++) {
if (!names[i]) {
continue;
}
}
if (data->parameters[fss_extended_read_parameter_line].result == f_console_result_additional) {
- f_string_length line_current = 0;
- f_string_length i = 0;
- f_string_length j = 0;
+ f_string_length_t line_current = 0;
+ f_string_length_t i = 0;
+ f_string_length_t j = 0;
for (; i < data->contents.used; i++) {
if (!names[i]) {
return F_none;
}
- f_string_length i = 0;
- f_string_length j = 0;
+ f_string_length_t i = 0;
+ f_string_length_t j = 0;
for (; i < data->contents.used; i++) {
if (!names[i]) {
* value_at: the value of the "--at" parameter, already processed and ready to use, only when index_at > 0.
* value_name: the value of the "--name" parameter, already processed and ready to use, only when index_name > 0.
*/
-#ifndef _di_fss_extended_read_depth_
+#ifndef _di_fss_extended_read_depth_t_
typedef struct {
- f_string_length depth;
+ f_string_length_t depth;
- f_array_length index_at;
- f_array_length index_name;
+ f_array_length_t index_at;
+ f_array_length_t index_name;
- f_number_unsigned value_at;
- f_string_dynamic value_name;
- } fss_extended_read_depth;
+ f_number_unsigned_t value_at;
+ f_string_dynamic_t value_name;
+ } fss_extended_read_depth_t;
- #define fss_extended_read_depth_initialize \
+ #define fss_extended_read_depth_t_initialize \
{ \
0, \
0, \
0, \
0, \
- f_string_dynamic_initialize, \
+ f_string_dynamic_t_initialize, \
}
- #define macro_fss_extended_read_depth_clear(structure) \
+ #define macro_fss_extended_read_depth_t_clear(structure) \
structure.depth = 0; \
structure.index_at = 0; \
structure.index_name = 0; \
structure.value_at = 0; \
- f_macro_string_dynamic_clear(structure.value_name)
+ f_macro_string_dynamic_t_clear(structure.value_name)
- #define macro_fss_extended_read_depth_delete(status, structure) f_macro_string_dynamic_delete(status, structure.value_name)
- #define macro_fss_extended_read_depth_destroy(status, structure) f_macro_string_dynamic_destroy(status, structure.value_name)
+ #define macro_fss_extended_read_depth_t_delete(status, structure) f_macro_string_dynamic_t_delete(status, structure.value_name)
+ #define macro_fss_extended_read_depth_t_destroy(status, structure) f_macro_string_dynamic_t_destroy(status, structure.value_name)
- #define macro_fss_extended_read_depth_delete_simple(structure) f_macro_string_dynamic_delete_simple(structure.value_name)
- #define macro_fss_extended_read_depth_destroy_simple(structure) f_macro_string_dynamic_destroy_simple(structure.value_name)
-#endif // _di_fss_extended_read_depth_
+ #define macro_fss_extended_read_depth_t_delete_simple(structure) f_macro_string_dynamic_t_delete_simple(structure.value_name)
+ #define macro_fss_extended_read_depth_t_destroy_simple(structure) f_macro_string_dynamic_t_destroy_simple(structure.value_name)
+#endif // _di_fss_extended_read_depth_t_
/**
* An array of depth parameters.
* size: total amount of allocated space.
* used: total number of allocated spaces used.
*/
-#ifndef _di_fss_extended_read_depths_
+#ifndef _di_fss_extended_read_depths_t_
typedef struct {
- fss_extended_read_depth *array;
+ fss_extended_read_depth_t *array;
- f_array_length size;
- f_array_length used;
- } fss_extended_read_depths;
+ f_array_length_t size;
+ f_array_length_t used;
+ } fss_extended_read_depths_t;
- #define fss_extended_read_depths_initialize { 0, 0, 0 }
+ #define fss_extended_read_depths_t_initialize { 0, 0, 0 }
- #define macro_fss_extended_read_depths_clear(depths) f_macro_memory_structure_clear(depths)
+ #define macro_fss_extended_read_depths_t_clear(depths) f_macro_memory_structure_t_clear(depths)
- #define macro_fss_extended_read_depths_new(status, depths, length) f_macro_memory_structure_new(status, depths, fss_extended_read_depth, length)
+ #define macro_fss_extended_read_depths_t_new(status, depths, length) f_macro_memory_structure_t_new(status, depths, fss_extended_read_depth_t, length)
- #define macro_fss_extended_read_depths_delete(status, depths) \
+ #define macro_fss_extended_read_depths_t_delete(status, depths) \
status = F_none; \
depths.used = depths.size; \
while (depths.used > 0) { \
depths.used--; \
- macro_fss_extended_read_depth_delete(status, depths.array[depths.used]); \
+ macro_fss_extended_read_depth_t_delete(status, depths.array[depths.used]); \
if (status != F_none) break; \
} \
- if (status == F_none) f_macro_memory_structure_delete(depths, fss_extended_read_depth)
+ if (status == F_none) f_macro_memory_structure_t_delete(depths, fss_extended_read_depth_t)
- #define macro_fss_extended_read_depths_destroy(status, depths) \
+ #define macro_fss_extended_read_depths_t_destroy(status, depths) \
status = F_none; \
depths.used = depths.size; \
while (depths.used > 0) { \
depths.used--; \
- macro_fss_extended_read_depth_destroy(status, depths.array[depths.used]); \
+ macro_fss_extended_read_depth_t_destroy(status, depths.array[depths.used]); \
if (status != F_none) break; \
} \
- if (status == F_none) f_macro_memory_structure_destroy(depths, fss_extended_read_depth)
+ if (status == F_none) f_macro_memory_structure_t_destroy(depths, fss_extended_read_depth_t)
- #define macro_fss_extended_read_depths_delete_simple(depths) \
+ #define macro_fss_extended_read_depths_t_delete_simple(depths) \
depths.used = depths.size; \
while (depths.used > 0) { \
depths.used--; \
- macro_fss_extended_read_depth_delete_simple(depths.array[depths.used]); \
+ macro_fss_extended_read_depth_t_delete_simple(depths.array[depths.used]); \
} \
- if (depths.used == 0) f_macro_memory_structure_delete_simple(depths, fss_extended_read_depth)
+ if (depths.used == 0) f_macro_memory_structure_t_delete_simple(depths, fss_extended_read_depth_t)
- #define macro_fss_extended_read_depths_destroy_simple(depths) \
+ #define macro_fss_extended_read_depths_t_destroy_simple(depths) \
depths.used = depths.size; \
while (depths.used > 0) { \
depths.used--; \
- macro_fss_extended_read_depth_destroy_simple(depths.array[depths.used]); \
+ macro_fss_extended_read_depth_t_destroy_simple(depths.array[depths.used]); \
} \
- if (depths.used == 0) f_macro_memory_structure_destroy_simple(depths, fss_extended_read_depth)
+ if (depths.used == 0) f_macro_memory_structure_t_destroy_simple(depths, fss_extended_read_depth_t)
- #define macro_fss_extended_read_depths_resize(status, depths, new_length) \
+ #define macro_fss_extended_read_depths_t_resize(status, depths, new_length) \
status = F_none; \
if (new_length < depths.size) { \
- f_array_length i = depths.size - new_length; \
+ f_array_length_t i = depths.size - new_length; \
for (; i < depths.size; i++) { \
- macro_fss_extended_read_depth_delete(status, depths.array[i]); \
+ macro_fss_extended_read_depth_t_delete(status, depths.array[i]); \
if (status != F_none) break; \
} \
} \
- if (status == F_none) status = f_memory_resize((void **) & depths.array, sizeof(fss_extended_read_depth), depths.size, new_length); \
+ if (status == F_none) status = f_memory_resize((void **) & depths.array, sizeof(fss_extended_read_depth_t), depths.size, new_length); \
if (status == F_none) { \
if (new_length > depths.size) { \
- f_array_length i = depths.size; \
+ f_array_length_t i = depths.size; \
for (; i < new_length; i++) { \
- memset(&depths.array[i], 0, sizeof(fss_extended_read_depth)); \
+ memset(&depths.array[i], 0, sizeof(fss_extended_read_depth_t)); \
} \
} \
depths.size = new_length; \
if (depths.used > depths.size) depths.used = new_length; \
}
- #define macro_fss_extended_read_depths_adjust(status, depths, new_length) \
+ #define macro_fss_extended_read_depths_t_adjust(status, depths, new_length) \
status = F_none; \
if (new_length < depths.size) { \
- f_array_length i = depths.size - new_length; \
+ f_array_length_t i = depths.size - new_length; \
for (; i < depths.size; i++) { \
- macro_fss_extended_read_depth_delete(status, depths.array[i]); \
+ macro_fss_extended_read_depth_t_delete(status, depths.array[i]); \
if (status != F_none) break; \
} \
} \
- if (status == F_none) status = f_memory_adjust((void **) & depths.array, sizeof(fss_extended_read_depth), depths.size, new_length); \
+ if (status == F_none) status = f_memory_adjust((void **) & depths.array, sizeof(fss_extended_read_depth_t), depths.size, new_length); \
if (status == F_none) { \
if (new_length > depths.size) { \
- f_array_length i = depths.size; \
+ f_array_length_t i = depths.size; \
for (; i < new_length; i++) { \
- memset(&depths.array[i], 0, sizeof(fss_extended_read_depth)); \
+ memset(&depths.array[i], 0, sizeof(fss_extended_read_depth_t)); \
} \
} \
depths.size = new_length; \
if (depths.used > depths.size) depths.used = new_length; \
}
-#endif // _di_fss_extended_read_depths_
+#endif // _di_fss_extended_read_depths_t_
/**
* Print file error messages.
* The status code representing the error.
*/
#ifndef _di_fss_extended_read_print_file_error_
- extern void fss_extended_read_print_file_error(const fl_color_context context, const f_string function_name, const f_string file_name, const f_status status) f_gcc_attribute_visibility_internal;
+ extern void fss_extended_read_print_file_error(const fl_color_context_t context, const f_string_t function_name, const f_string_t file_name, const f_status_t status) f_gcc_attribute_visibility_internal;
#endif // _di_fss_extended_read_print_file_error_
/**
* The status code representing the error.
*/
#ifndef _di_fss_extended_read_print_number_argument_error_
- extern void fss_extended_read_print_number_argument_error(const fl_color_context context, const f_string function_name, const f_string parameter_name, const f_string argument, const f_status status) f_gcc_attribute_visibility_internal;
+ extern void fss_extended_read_print_number_argument_error(const fl_color_context_t context, const f_string_t function_name, const f_string_t parameter_name, const f_string_t argument, const f_status_t status) f_gcc_attribute_visibility_internal;
#endif // _di_fss_extended_read_print_number_argument_error_
/**
* F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_fss_extended_read_main_preprocess_depth_
- extern f_return_status fss_extended_read_main_preprocess_depth(const f_console_arguments arguments, const fss_extended_read_data data, fss_extended_read_depths *depths) f_gcc_attribute_visibility_internal;
+ extern f_return_status fss_extended_read_main_preprocess_depth(const f_console_arguments_t arguments, const fss_extended_read_data_t data, fss_extended_read_depths_t *depths) f_gcc_attribute_visibility_internal;
#endif // _di_fss_extended_read_main_preprocess_depth_
/**
* @see fss_extended_read_main_preprocess_depth()
*/
#ifndef _di_fss_extended_read_main_process_file_
- extern f_return_status fss_extended_read_main_process_file(const f_console_arguments arguments, fss_extended_read_data *data, const f_string file_name, const fss_extended_read_depths depths) f_gcc_attribute_visibility_internal;
+ extern f_return_status fss_extended_read_main_process_file(const f_console_arguments_t arguments, fss_extended_read_data_t *data, const f_string_t file_name, const fss_extended_read_depths_t depths) f_gcc_attribute_visibility_internal;
#endif // _di_fss_extended_read_main_process_file_
#ifdef __cplusplus
#endif
#ifndef _di_fss_extended_write_print_help_
- f_return_status fss_extended_write_print_help(const fl_color_context context) {
+ f_return_status fss_extended_write_print_help(const fl_color_context_t context) {
fll_program_print_help_header(context, fss_extended_write_name_long, fss_extended_write_version);
fll_program_print_help_option(context, f_console_standard_short_help, f_console_standard_long_help, f_console_symbol_short_enable, f_console_symbol_long_enable, " Print this help message.");
#endif // _di_fss_extended_write_print_help_
#ifndef _di_fss_extended_write_main_
- f_return_status fss_extended_write_main(const f_console_arguments arguments, fss_extended_write_data *data) {
- f_status status = F_none;
+ f_return_status fss_extended_write_main(const f_console_arguments_t arguments, fss_extended_write_data_t *data) {
+ f_status_t status = F_none;
{
- f_console_parameters parameters = { data->parameters, fss_extended_write_total_parameters };
- f_console_parameter_id ids[3] = { fss_extended_write_parameter_no_color, fss_extended_write_parameter_light, fss_extended_write_parameter_dark };
- f_console_parameter_ids choices = { ids, 3 };
+ f_console_parameters_t parameters = { data->parameters, fss_extended_write_total_parameters };
+ f_console_parameter_id_t ids[3] = { fss_extended_write_parameter_no_color, fss_extended_write_parameter_light, fss_extended_write_parameter_dark };
+ f_console_parameter_ids_t choices = { ids, 3 };
status = fll_program_parameter_process(arguments, parameters, choices, F_true, &data->remaining, &data->context);
if (F_status_is_error(status)) {
fll_program_print_version(fss_extended_write_version);
}
else {
- f_array_length counter = 0;
+ f_array_length_t counter = 0;
bool object = (data->parameters[fss_extended_write_parameter_object].result == f_console_result_found);
- f_string_dynamic buffer = f_string_dynamic_initialize;
- f_string_range range = f_string_range_initialize;
+ f_string_dynamic_t buffer = f_string_dynamic_t_initialize;
+ f_string_range_t range = f_string_range_initialize;
if (data->process_pipe) {
- f_file file = f_file_initialize;
- f_string_dynamic input = f_string_dynamic_initialize;
+ f_file_t file = f_file_t_initialize;
+ f_string_dynamic_t input = f_string_dynamic_t_initialize;
file.id = f_type_descriptor_input;
fl_color_print_line(f_type_error, data->context.error, data->context.reset, "INTERNAL ERROR: An unhandled error (%u) has occurred while calling f_file_open()", status);
}
- f_macro_string_dynamic_delete_simple(input);
+ f_macro_string_dynamic_t_delete_simple(input);
fss_extended_write_delete_data(data);
return F_status_set_error(status);
}
status = fl_fss_extended_object_write(input, 0, &range, &buffer);
if (F_status_is_error(status) || status == F_data_not_stop || status == F_data_not_eos) {
- f_macro_string_dynamic_delete_simple(buffer);
- f_macro_string_dynamic_delete_simple(input);
+ f_macro_string_dynamic_t_delete_simple(buffer);
+ f_macro_string_dynamic_t_delete_simple(input);
fss_extended_write_delete_data(data);
return F_status_set_error(status);
}
status = fl_fss_extended_content_write(input, 0, &range, &buffer);
if (F_status_is_error(status) || status == F_data_not_stop || status == F_data_not_eos) {
- f_macro_string_dynamic_delete_simple(buffer);
- f_macro_string_dynamic_delete_simple(input);
+ f_macro_string_dynamic_t_delete_simple(buffer);
+ f_macro_string_dynamic_t_delete_simple(input);
fss_extended_write_delete_data(data);
return F_status_set_error(status);
}
if (data->parameters[fss_extended_write_parameter_partial].result == f_console_result_none) {
if (buffer.used == buffer.size) {
- f_macro_string_dynamic_resize(status, buffer, buffer.used + f_fss_default_allocation_step_string);
+ f_macro_string_dynamic_t_resize(status, buffer, buffer.used + f_fss_default_allocation_step_string);
if (F_status_is_error(status)) {
- f_macro_string_dynamic_delete_simple(buffer);
- f_macro_string_dynamic_delete_simple(input);
+ f_macro_string_dynamic_t_delete_simple(buffer);
+ f_macro_string_dynamic_t_delete_simple(input);
fss_extended_write_delete_data(data);
return status;
}
}
}
- f_macro_string_dynamic_delete_simple(input);
+ f_macro_string_dynamic_t_delete_simple(input);
}
else if (data->parameters[fss_extended_write_parameter_string].result == f_console_result_additional) {
- const f_console_parameter *parameter = &data->parameters[fss_extended_write_parameter_string];
- f_string_dynamic input = f_string_dynamic_initialize;
+ const f_console_parameter_t *parameter = &data->parameters[fss_extended_write_parameter_string];
+ f_string_dynamic_t input = f_string_dynamic_t_initialize;
if (object) {
input.string = arguments.argv[parameter->additional.array[0]];
status = fl_fss_extended_object_write(input, 0, &range, &buffer);
if (F_status_is_error(status) || status == F_data_not_stop || status == F_data_not_eos) {
- f_macro_string_dynamic_delete_simple(buffer);
+ f_macro_string_dynamic_t_delete_simple(buffer);
fss_extended_write_delete_data(data);
return F_status_set_error(status);
}
}
}
else {
- for (f_string_length i = 0; i < parameter->additional.used; i++) {
+ for (f_string_length_t i = 0; i < parameter->additional.used; i++) {
input.string = arguments.argv[parameter->additional.array[i]];
input.used = strnlen(input.string, f_console_length_size);
status = fl_fss_extended_content_write(input, 0, &range, &buffer);
if (F_status_is_error(status) || status == F_data_not_stop || status == F_data_not_eos) {
- f_macro_string_dynamic_delete_simple(buffer);
+ f_macro_string_dynamic_t_delete_simple(buffer);
fss_extended_write_delete_data(data);
return F_status_set_error(status);
}
if (data->parameters[fss_extended_write_parameter_partial].result == f_console_result_none) {
if (buffer.used == buffer.size) {
- f_macro_string_dynamic_resize(status, buffer, buffer.used + f_fss_default_allocation_step_string);
+ f_macro_string_dynamic_t_resize(status, buffer, buffer.used + f_fss_default_allocation_step_string);
if (F_status_is_error(status)) {
- f_macro_string_dynamic_delete_simple(buffer);
+ f_macro_string_dynamic_t_delete_simple(buffer);
fss_extended_write_delete_data(data);
return status;
}
}
if (data->parameters[fss_extended_write_parameter_file].result == f_console_result_additional) {
- f_file output = f_file_initialize;
+ f_file_t output = f_file_t_initialize;
output.flag = f_file_flag_append_wo;
fl_color_print_line(f_type_error, data->context.error, data->context.reset, "INTERNAL ERROR: An unhandled error (%u) has occurred while calling f_file_open()", status);
}
- f_macro_string_dynamic_delete_simple(buffer);
+ f_macro_string_dynamic_t_delete_simple(buffer);
fss_extended_write_delete_data(data);
return status;
}
fl_color_print_line(f_type_error, data->context.error, data->context.reset, "INTERNAL ERROR: An unhandled error (%u) has occurred while calling f_file_write()", status);
}
- f_macro_string_dynamic_delete_simple(buffer);
+ f_macro_string_dynamic_t_delete_simple(buffer);
fss_extended_write_delete_data(data);
return F_status_set_error(status);
}
f_print_string_dynamic(f_type_output, buffer);
}
- f_macro_string_dynamic_delete_simple(buffer);
+ f_macro_string_dynamic_t_delete_simple(buffer);
}
fss_extended_write_delete_data(data);
#endif // _di_fss_extended_write_main_
#ifndef _di_fss_extended_write_delete_data_
- f_return_status fss_extended_write_delete_data(fss_extended_write_data *data) {
- f_status status = F_none;
+ f_return_status fss_extended_write_delete_data(fss_extended_write_data_t *data) {
+ f_status_t status = F_none;
- for (f_string_length i = 0; i < fss_extended_write_total_parameters; i++) {
- f_macro_string_lengths_delete_simple(data->parameters[i].locations);
- f_macro_string_lengths_delete_simple(data->parameters[i].additional);
+ for (f_string_length_t i = 0; i < fss_extended_write_total_parameters; i++) {
+ f_macro_string_lengths_t_delete_simple(data->parameters[i].locations);
+ f_macro_string_lengths_t_delete_simple(data->parameters[i].additional);
} // for
- f_macro_string_lengths_delete_simple(data->remaining);
- fl_macro_color_context_delete_simple(data->context);
+ f_macro_string_lengths_t_delete_simple(data->remaining);
+ fl_macro_color_context_t_delete_simple(data->context);
return F_none;
}
fss_extended_write_parameter_string,
};
- #define f_console_parameter_initialize_fss_extended_write \
+ #define fss_extended_write_console_parameter_t_initialize \
{ \
- f_console_parameter_initialize(f_console_standard_short_help, f_console_standard_long_help, 0, F_false, f_console_type_normal), \
- f_console_parameter_initialize(f_console_standard_short_light, f_console_standard_long_light, 0, F_false, f_console_type_inverse), \
- f_console_parameter_initialize(f_console_standard_short_dark, f_console_standard_long_dark, 0, F_false, f_console_type_inverse), \
- f_console_parameter_initialize(f_console_standard_short_no_color, f_console_standard_long_no_color, 0, F_false, f_console_type_inverse), \
- f_console_parameter_initialize(f_console_standard_short_version, f_console_standard_long_version, 0, F_false, f_console_type_inverse), \
- f_console_parameter_initialize(fss_extended_write_short_file, fss_extended_write_long_file, 0, F_true, f_console_type_normal), \
- f_console_parameter_initialize(fss_extended_write_short_object, fss_extended_write_long_object, 0, F_false, f_console_type_normal), \
- f_console_parameter_initialize(fss_extended_write_short_partial, fss_extended_write_long_partial, 0, F_false, f_console_type_normal), \
- f_console_parameter_initialize(fss_extended_write_short_string, fss_extended_write_long_string, 0, F_true, f_console_type_normal), \
+ f_console_parameter_t_initialize(f_console_standard_short_help, f_console_standard_long_help, 0, F_false, f_console_type_normal), \
+ f_console_parameter_t_initialize(f_console_standard_short_light, f_console_standard_long_light, 0, F_false, f_console_type_inverse), \
+ f_console_parameter_t_initialize(f_console_standard_short_dark, f_console_standard_long_dark, 0, F_false, f_console_type_inverse), \
+ f_console_parameter_t_initialize(f_console_standard_short_no_color, f_console_standard_long_no_color, 0, F_false, f_console_type_inverse), \
+ f_console_parameter_t_initialize(f_console_standard_short_version, f_console_standard_long_version, 0, F_false, f_console_type_inverse), \
+ f_console_parameter_t_initialize(fss_extended_write_short_file, fss_extended_write_long_file, 0, F_true, f_console_type_normal), \
+ f_console_parameter_t_initialize(fss_extended_write_short_object, fss_extended_write_long_object, 0, F_false, f_console_type_normal), \
+ f_console_parameter_t_initialize(fss_extended_write_short_partial, fss_extended_write_long_partial, 0, F_false, f_console_type_normal), \
+ f_console_parameter_t_initialize(fss_extended_write_short_string, fss_extended_write_long_string, 0, F_true, f_console_type_normal), \
}
#define fss_extended_write_total_parameters 9
#endif // _di_fss_extended_write_defines_
-#ifndef _di_fss_extended_write_data_
+#ifndef _di_fss_extended_write_data_t_
typedef struct {
- f_console_parameter parameters[fss_extended_write_total_parameters];
+ f_console_parameter_t parameters[fss_extended_write_total_parameters];
- f_string_lengths remaining;
+ f_string_lengths_t remaining;
bool process_pipe;
- fl_color_context context;
- } fss_extended_write_data;
+ fl_color_context_t context;
+ } fss_extended_write_data_t;
- #define fss_extended_write_data_initialize \
+ #define fss_extended_write_data_t_initialize \
{ \
- f_console_parameter_initialize_fss_extended_write, \
- f_string_lengths_initialize, \
+ fss_extended_write_console_parameter_t_initialize, \
+ f_string_lengths_t_initialize, \
F_false, \
- fl_color_context_initialize, \
+ fl_color_context_t_initialize, \
}
-#endif // _di_fss_extended_write_data_
+#endif // _di_fss_extended_write_data_t_
/**
* Print help to standard output.
* F_none on success.
*/
#ifndef _di_fss_extended_write_print_help_
- extern f_return_status fss_extended_write_print_help(const fl_color_context context);
+ extern f_return_status fss_extended_write_print_help(const fl_color_context_t context);
#endif // _di_fss_extended_write_print_help_
/**
* @see fss_extended_write_delete_data()
*/
#ifndef _di_fss_extended_write_main_
- extern f_return_status fss_extended_write_main(const f_console_arguments arguments, fss_extended_write_data *data);
+ extern f_return_status fss_extended_write_main(const f_console_arguments_t arguments, fss_extended_write_data_t *data);
#endif // _di_fss_extended_write_main_
/**
* @see fss_extended_write_main()
*/
#ifndef _di_fss_extended_write_delete_data_
- extern f_return_status fss_extended_write_delete_data(fss_extended_write_data *data);
+ extern f_return_status fss_extended_write_delete_data(fss_extended_write_data_t *data);
#endif // _di_fss_extended_write_delete_data_
#ifdef __cplusplus
#include "fss_extended_write.h"
-int main(const unsigned long argc, const f_string *argv) {
- const f_console_arguments arguments = { argc, argv };
- fss_extended_write_data data = fss_extended_write_data_initialize;
+int main(const unsigned long argc, const f_string_t *argv) {
+ const f_console_arguments_t arguments = { argc, argv };
+ fss_extended_write_data_t data = fss_extended_write_data_t_initialize;
if (f_pipe_input_exists()) {
data.process_pipe = F_true;
}
- f_status status = fss_extended_write_main(arguments, &data);
+ f_status_t status = fss_extended_write_main(arguments, &data);
if (F_status_is_error(status)) {
return 1;
#endif
#ifndef _di_fss_status_code_print_help_
- f_return_status fss_status_code_print_help(const fl_color_context context) {
+ f_return_status fss_status_code_print_help(const fl_color_context_t context) {
fll_program_print_help_header(context, fss_status_code_name_long, fss_status_code_version);
fll_program_print_help_option(context, f_console_standard_short_help, f_console_standard_long_help, f_console_symbol_short_enable, f_console_symbol_long_enable, " Print this help message.");
#endif // _di_fss_status_code_print_help_
#ifndef _di_fss_status_code_main_
- f_return_status fss_status_code_main(const f_console_arguments arguments, fss_status_code_data *data) {
- f_status status = F_none;
+ f_return_status fss_status_code_main(const f_console_arguments_t arguments, fss_status_code_data_t *data) {
+ f_status_t status = F_none;
{
- f_console_parameters parameters = { data->parameters, fss_status_code_total_parameters };
- f_console_parameter_id ids[3] = { fss_status_code_parameter_no_color, fss_status_code_parameter_light, fss_status_code_parameter_dark };
- f_console_parameter_ids choices = { ids, 3 };
+ f_console_parameters_t parameters = { data->parameters, fss_status_code_total_parameters };
+ f_console_parameter_id_t ids[3] = { fss_status_code_parameter_no_color, fss_status_code_parameter_light, fss_status_code_parameter_dark };
+ f_console_parameter_ids_t choices = { ids, 3 };
status = fll_program_parameter_process(arguments, parameters, choices, F_true, &data->remaining, &data->context);
return F_status_set_error(F_parameter);
}
- f_status status2 = F_none;
+ f_status_t status2 = F_none;
if (data->parameters[fss_status_code_parameter_is_error].result == f_console_result_found || data->parameters[fss_status_code_parameter_is_warning].result == f_console_result_found || data->parameters[fss_status_code_parameter_is_fine].result == f_console_result_found) {
if (data->process_pipe) {
}
if (data->remaining.used > 0) {
- for (f_array_length i = 0; i < data->remaining.used; i++) {
+ for (f_array_length_t i = 0; i < data->remaining.used; i++) {
status2 = fss_status_code_process_check(*data, arguments.argv[data->remaining.array[i]]);
if (F_status_is_error(status2) && status == F_none) {
}
if (data->remaining.used > 0) {
- for (f_array_length i = 0; i < data->remaining.used; i++) {
+ for (f_array_length_t i = 0; i < data->remaining.used; i++) {
status2 = fss_status_code_process_number(*data, arguments.argv[data->remaining.array[i]]);
if (F_status_is_error(status2) && status == F_none) {
}
if (data->remaining.used > 0) {
- for (f_array_length i = 0; i < data->remaining.used; i++) {
+ for (f_array_length_t i = 0; i < data->remaining.used; i++) {
status2 = fss_status_code_process_normal(*data, arguments.argv[data->remaining.array[i]]);
if (F_status_is_error(status2) && status == F_none) {
#endif // _di_fss_status_code_main_
#ifndef _di_fss_status_code_delete_data_
- f_return_status fss_status_code_delete_data(fss_status_code_data *data) {
- f_string_length i = 0;
+ f_return_status fss_status_code_delete_data(fss_status_code_data_t *data) {
+ f_string_length_t i = 0;
while (i < fss_status_code_total_parameters) {
- f_macro_string_lengths_delete_simple(data->parameters[i].locations);
- f_macro_string_lengths_delete_simple(data->parameters[i].additional);
+ f_macro_string_lengths_t_delete_simple(data->parameters[i].locations);
+ f_macro_string_lengths_t_delete_simple(data->parameters[i].additional);
i++;
} // while
- f_macro_string_lengths_delete_simple(data->remaining);
- fl_macro_color_context_delete_simple(data->context);
+ f_macro_string_lengths_t_delete_simple(data->remaining);
+ fl_macro_color_context_t_delete_simple(data->context);
return F_none;
}
fss_status_code_parameter_number,
};
- #define f_console_parameter_initialize_fss_status_code \
+ #define fss_status_code_console_parameter_t_initialize \
{ \
- f_console_parameter_initialize(f_console_standard_short_help, f_console_standard_long_help, 0, F_false, f_console_type_normal), \
- f_console_parameter_initialize(f_console_standard_short_light, f_console_standard_long_light, 0, F_false, f_console_type_inverse), \
- f_console_parameter_initialize(f_console_standard_short_dark, f_console_standard_long_dark, 0, F_false, f_console_type_inverse), \
- f_console_parameter_initialize(f_console_standard_short_no_color, f_console_standard_long_no_color, 0, F_false, f_console_type_inverse), \
- f_console_parameter_initialize(f_console_standard_short_version, f_console_standard_long_version, 0, F_false, f_console_type_inverse), \
- f_console_parameter_initialize(fss_status_code_short_is_fine, fss_status_code_long_is_fine, 0, F_false, f_console_type_normal), \
- f_console_parameter_initialize(fss_status_code_short_is_warning, fss_status_code_long_is_warning, 0, F_false, f_console_type_normal), \
- f_console_parameter_initialize(fss_status_code_short_is_error, fss_status_code_long_is_error, 0, F_false, f_console_type_normal), \
- f_console_parameter_initialize(fss_status_code_short_number, fss_status_code_long_number, 0, F_false, f_console_type_normal), \
+ f_console_parameter_t_initialize(f_console_standard_short_help, f_console_standard_long_help, 0, F_false, f_console_type_normal), \
+ f_console_parameter_t_initialize(f_console_standard_short_light, f_console_standard_long_light, 0, F_false, f_console_type_inverse), \
+ f_console_parameter_t_initialize(f_console_standard_short_dark, f_console_standard_long_dark, 0, F_false, f_console_type_inverse), \
+ f_console_parameter_t_initialize(f_console_standard_short_no_color, f_console_standard_long_no_color, 0, F_false, f_console_type_inverse), \
+ f_console_parameter_t_initialize(f_console_standard_short_version, f_console_standard_long_version, 0, F_false, f_console_type_inverse), \
+ f_console_parameter_t_initialize(fss_status_code_short_is_fine, fss_status_code_long_is_fine, 0, F_false, f_console_type_normal), \
+ f_console_parameter_t_initialize(fss_status_code_short_is_warning, fss_status_code_long_is_warning, 0, F_false, f_console_type_normal), \
+ f_console_parameter_t_initialize(fss_status_code_short_is_error, fss_status_code_long_is_error, 0, F_false, f_console_type_normal), \
+ f_console_parameter_t_initialize(fss_status_code_short_number, fss_status_code_long_number, 0, F_false, f_console_type_normal), \
}
#define fss_status_code_total_parameters 9
#endif // _di_fss_status_code_defines_
-#ifndef _di_fss_status_code_data_
+#ifndef _di_fss_status_code_data_t_
typedef struct {
- f_console_parameter parameters[fss_status_code_total_parameters];
+ f_console_parameter_t parameters[fss_status_code_total_parameters];
- f_string_lengths remaining;
+ f_string_lengths_t remaining;
bool process_pipe;
- fl_color_context context;
- } fss_status_code_data;
+ fl_color_context_t context;
+ } fss_status_code_data_t;
- #define fss_status_code_data_initialize \
+ #define fss_status_code_data_t_initialize \
{ \
- f_console_parameter_initialize_fss_status_code, \
- f_string_lengths_initialize, \
+ fss_status_code_console_parameter_t_initialize, \
+ f_string_lengths_t_initialize, \
F_false, \
- fl_color_context_initialize, \
+ fl_color_context_t_initialize, \
}
-#endif // _di_fss_status_code_data_
+#endif // _di_fss_status_code_data_t_
/**
* Print help to standard output.
* F_none on success.
*/
#ifndef _di_fss_status_code_print_help_
- extern f_return_status fss_status_code_print_help(const fl_color_context context);
+ extern f_return_status fss_status_code_print_help(const fl_color_context_t context);
#endif // _di_fss_status_code_print_help_
/**
* @see fss_status_code_delete_data()
*/
#ifndef _di_fss_status_code_main_
- extern f_return_status fss_status_code_main(const f_console_arguments arguments, fss_status_code_data *data);
+ extern f_return_status fss_status_code_main(const f_console_arguments_t arguments, fss_status_code_data_t *data);
#endif // _di_fss_status_code_main_
/**
* @see fss_status_code_main()
*/
#ifndef _di_fss_status_code_delete_data_
- extern f_return_status fss_status_code_delete_data(fss_status_code_data *data);
+ extern f_return_status fss_status_code_delete_data(fss_status_code_data_t *data);
#endif // _di_fss_status_code_delete_data_
#ifdef __cplusplus
#include "fss_status_code.h"
-int main(const unsigned long argc, const f_string *argv) {
- const f_console_arguments arguments = { argc, argv };
- fss_status_code_data data = fss_status_code_data_initialize;
+int main(const unsigned long argc, const f_string_t *argv) {
+ const f_console_arguments_t arguments = { argc, argv };
+ fss_status_code_data_t data = fss_status_code_data_t_initialize;
if (f_pipe_input_exists()) {
data.process_pipe = F_true;
}
- f_status status = fss_status_code_main(arguments, &data);
+ f_status_t status = fss_status_code_main(arguments, &data);
if (F_status_is_error(status) || status == F_false) {
return 1;
#endif
#ifndef _di_fss_status_code_process_check_
- f_return_status fss_status_code_process_check(const fss_status_code_data data, const f_string value) {
- f_number_unsigned number = 0;
- f_status status = fss_status_code_convert_number(data, value, &number);
+ f_return_status fss_status_code_process_check(const fss_status_code_data_t data, const f_string_t value) {
+ f_number_unsigned_t number = 0;
+ f_status_t status = fss_status_code_convert_number(data, value, &number);
if (F_status_is_error(status)) {
return status;
#endif // _di_fss_status_code_process_check_
#ifndef _di_fss_status_code_process_number_
- f_return_status fss_status_code_process_number(const fss_status_code_data data, const f_string value) {
- f_status status = F_none;
+ f_return_status fss_status_code_process_number(const fss_status_code_data_t data, const f_string_t value) {
+ f_status_t status = F_none;
{
- const f_string_range range = f_macro_string_range_initialize(strlen(value));
+ const f_string_range_t range = f_macro_string_range_initialize(strlen(value));
- f_number_unsigned number = 0;
+ f_number_unsigned_t number = 0;
status = fl_conversion_string_to_number_unsigned(value, &number, range);
}
}
- f_status code = F_none;
+ f_status_t code = F_none;
status = fll_fss_status_from_string(value, &code);
#endif // _di_fss_status_code_process_number_
#ifndef _di_fss_status_code_process_normal_
- f_return_status fss_status_code_process_normal(const fss_status_code_data data, const f_string value) {
- f_number_unsigned number = 0;
- f_status status = fss_status_code_convert_number(data, value, &number);
+ f_return_status fss_status_code_process_normal(const fss_status_code_data_t data, const f_string_t value) {
+ f_number_unsigned_t number = 0;
+ f_status_t status = fss_status_code_convert_number(data, value, &number);
if (F_status_is_error(status)) {
return status;
}
- const f_status code = (f_status) number;
- f_string string = 0;
+ const f_status_t code = (f_status_t) number;
+ f_string_t string = 0;
status = fll_fss_status_to_string(code, &string);
#endif // _di_fss_status_code_process_normal_
#ifndef _di_fss_status_code_convert_number_
- f_return_status fss_status_code_convert_number(const fss_status_code_data data, const f_string value, f_number_unsigned *number) {
- const f_string_range range = f_macro_string_range_initialize(strlen(value));
+ f_return_status fss_status_code_convert_number(const fss_status_code_data_t data, const f_string_t value, f_number_unsigned_t *number) {
+ const f_string_range_t range = f_macro_string_range_initialize(strlen(value));
- f_status status = fl_conversion_string_to_number_unsigned(value, number, range);
+ f_status_t status = fl_conversion_string_to_number_unsigned(value, number, range);
if (*number > F_status_size_max_with_signal) {
fl_color_print_line(f_type_output, data.context.error, data.context.reset, "out of range");
* @see fss_status_code_convert_number()
*/
#ifndef _di_fss_status_code_process_check_
- extern f_return_status fss_status_code_process_check(const fss_status_code_data data, const f_string value) f_gcc_attribute_visibility_internal;
+ extern f_return_status fss_status_code_process_check(const fss_status_code_data_t data, const f_string_t value) f_gcc_attribute_visibility_internal;
#endif // _di_fss_status_code_process_check_
/**
* @see fll_fss_status_from_string()
*/
#ifndef _di_fss_status_code_process_number_
- extern f_return_status fss_status_code_process_number(const fss_status_code_data data, const f_string value) f_gcc_attribute_visibility_internal;
+ extern f_return_status fss_status_code_process_number(const fss_status_code_data_t data, const f_string_t value) f_gcc_attribute_visibility_internal;
#endif // _di_fss_status_code_process_number_
/**
* @see fss_status_code_convert_number()
*/
#ifndef _di_fss_status_code_process_normal_
- extern f_return_status fss_status_code_process_normal(const fss_status_code_data data, const f_string value) f_gcc_attribute_visibility_internal;
+ extern f_return_status fss_status_code_process_normal(const fss_status_code_data_t data, const f_string_t value) f_gcc_attribute_visibility_internal;
#endif // _di_fss_status_code_process_normal_
/**
* @see fl_console_parameter_to_number_unsigned()
*/
#ifndef _di_fss_status_code_convert_number_
- extern f_return_status fss_status_code_convert_number(const fss_status_code_data data, const f_string value, f_number_unsigned *number) f_gcc_attribute_visibility_internal;
+ extern f_return_status fss_status_code_convert_number(const fss_status_code_data_t data, const f_string_t value, f_number_unsigned_t *number) f_gcc_attribute_visibility_internal;
#endif // _di_fss_status_code_convert_number_
#ifdef __cplusplus
#endif
#ifndef _di_iki_read_print_help_
- f_return_status iki_read_print_help(const fl_color_context context) {
+ f_return_status iki_read_print_help(const fl_color_context_t context) {
fll_program_print_help_header(context, iki_read_name_long, iki_read_version);
fll_program_print_help_option(context, f_console_standard_short_help, f_console_standard_long_help, f_console_symbol_short_enable, f_console_symbol_long_enable, " Print this help message.");
#endif // _di_iki_read_print_help_
#ifndef _di_iki_read_main_
- f_return_status iki_read_main(const f_console_arguments arguments, iki_read_data *data) {
- f_status status = F_none;
+ f_return_status iki_read_main(const f_console_arguments_t arguments, iki_read_data_t *data) {
+ f_status_t status = F_none;
{
- f_console_parameters parameters = { data->parameters, iki_read_total_parameters };
- f_console_parameter_id ids[3] = { iki_read_parameter_no_color, iki_read_parameter_light, iki_read_parameter_dark };
- f_console_parameter_ids choices = { ids, 3 };
+ f_console_parameters_t parameters = { data->parameters, iki_read_total_parameters };
+ f_console_parameter_id_t ids[3] = { iki_read_parameter_no_color, iki_read_parameter_light, iki_read_parameter_dark };
+ f_console_parameter_ids_t choices = { ids, 3 };
status = fll_program_parameter_process(arguments, parameters, choices, F_true, &data->remaining, &data->context);
if (F_status_is_error(status)) {
status = F_status_set_error(F_parameter);
}
else if (data->parameters[iki_read_parameter_at].result == f_console_result_additional) {
- const f_string_length index = data->parameters[iki_read_parameter_at].additional.array[data->parameters[iki_read_parameter_at].additional.used - 1];
- const f_string_range range = f_macro_string_range_initialize(strlen(arguments.argv[index]));
+ const f_string_length_t index = data->parameters[iki_read_parameter_at].additional.array[data->parameters[iki_read_parameter_at].additional.used - 1];
+ const f_string_range_t range = f_macro_string_range_initialize(strlen(arguments.argv[index]));
- f_number_unsigned number = 0;
+ f_number_unsigned_t number = 0;
status = fl_conversion_string_to_number_unsigned(arguments.argv[index], &number, range);
if (F_status_is_error(status)) {
status = F_status_set_error(F_parameter);
}
else if (data->parameters[iki_read_parameter_line].result == f_console_result_additional) {
- const f_string_length index = data->parameters[iki_read_parameter_line].additional.array[data->parameters[iki_read_parameter_line].additional.used - 1];
- const f_string_range range = f_macro_string_range_initialize(strlen(arguments.argv[index]));
+ const f_string_length_t index = data->parameters[iki_read_parameter_line].additional.array[data->parameters[iki_read_parameter_line].additional.used - 1];
+ const f_string_range_t range = f_macro_string_range_initialize(strlen(arguments.argv[index]));
- f_number_unsigned number = 0;
+ f_number_unsigned_t number = 0;
status = fl_conversion_string_to_number_unsigned(arguments.argv[index], &number, range);
if (F_status_is_error(status)) {
}
if (data->process_pipe) {
- f_file file = f_file_initialize;
+ f_file_t file = f_file_t_initialize;
file.id = f_type_descriptor_input;
}
// Clear buffers before continuing.
- f_macro_string_dynamic_delete_simple(data->buffer);
+ f_macro_string_dynamic_t_delete_simple(data->buffer);
}
if (F_status_is_fine(status) && data->remaining.used > 0) {
- f_string_length i = 0;
- f_string_length total = 0;
- f_file file = f_file_initialize;
+ f_string_length_t i = 0;
+ f_string_length_t total = 0;
+ f_file_t file = f_file_t_initialize;
for (; i < data->remaining.used; i++) {
- f_macro_file_reset(file);
+ f_macro_file_t_reset(file);
total = 0;
status = f_file_open(arguments.argv[data->remaining.array[i]], 0, &file);
if (F_status_is_error(status)) break;
// Clear buffers before repeating the loop.
- f_macro_string_dynamic_delete_simple(data->buffer);
+ f_macro_string_dynamic_t_delete_simple(data->buffer);
} // for
}
}
#endif // _di_iki_read_main_
#ifndef _di_iki_read_delete_data_
- f_return_status iki_read_delete_data(iki_read_data *data) {
- f_status status = F_none;
- f_string_length i = 0;
+ f_return_status iki_read_delete_data(iki_read_data_t *data) {
+ f_status_t status = F_none;
+ f_string_length_t i = 0;
while (i < iki_read_total_parameters) {
- f_macro_string_lengths_delete_simple(data->parameters[i].locations);
- f_macro_string_lengths_delete_simple(data->parameters[i].additional);
+ f_macro_string_lengths_t_delete_simple(data->parameters[i].locations);
+ f_macro_string_lengths_t_delete_simple(data->parameters[i].additional);
i++;
} // while
- f_macro_string_lengths_delete_simple(data->remaining);
- f_macro_string_dynamic_delete_simple(data->buffer);
- fl_macro_color_context_delete_simple(data->context);
+ f_macro_string_lengths_t_delete_simple(data->remaining);
+ f_macro_string_dynamic_t_delete_simple(data->buffer);
+ fl_macro_color_context_t_delete_simple(data->context);
return F_none;
}
*
* This is the FSS Basic Read program
* This program utilizes the Featureless Linux Library.
- * This program processes files or other input in fss format and stores the results in the iki_read_data.
+ * This program processes files or other input in fss format and stores the results in the iki_read_data_t.
*
* This processes in accordance to the FSS-0000 Basic specification.
*/
iki_read_parameter_total,
};
- #define f_console_parameter_initialize_iki_read \
+ #define iki_read_console_parameter_t_initialize \
{ \
- f_console_parameter_initialize(f_console_standard_short_help, f_console_standard_long_help, 0, 0, f_console_type_normal), \
- f_console_parameter_initialize(f_console_standard_short_light, f_console_standard_long_light, 0, 0, f_console_type_inverse), \
- f_console_parameter_initialize(f_console_standard_short_dark, f_console_standard_long_dark, 0, 0, f_console_type_inverse), \
- f_console_parameter_initialize(f_console_standard_short_no_color, f_console_standard_long_no_color, 0, 0, f_console_type_inverse), \
- f_console_parameter_initialize(f_console_standard_short_quiet, f_console_standard_long_quiet, 0, 0, f_console_type_inverse), \
- f_console_parameter_initialize(f_console_standard_short_verbose, f_console_standard_long_verbose, 0, 0, f_console_type_inverse), \
- f_console_parameter_initialize(f_console_standard_short_version, f_console_standard_long_version, 0, 0, f_console_type_inverse), \
- f_console_parameter_initialize(iki_read_short_at, iki_read_long_at, 0, 1, f_console_type_normal), \
- f_console_parameter_initialize(iki_read_short_line, iki_read_long_line, 0, 1, f_console_type_normal), \
- f_console_parameter_initialize(iki_read_short_literal, iki_read_long_literal, 0, 0, f_console_type_normal), \
- f_console_parameter_initialize(iki_read_short_name, iki_read_long_name, 0, 1, f_console_type_normal), \
- f_console_parameter_initialize(iki_read_short_object, iki_read_long_object, 0, 0, f_console_type_normal), \
- f_console_parameter_initialize(iki_read_short_whole, iki_read_long_whole, 0, 0, f_console_type_normal), \
- f_console_parameter_initialize(iki_read_short_substitute, iki_read_long_substitute, 0, 3, f_console_type_normal), \
- f_console_parameter_initialize(iki_read_short_total, iki_read_long_total, 0, 0, f_console_type_normal), \
+ f_console_parameter_t_initialize(f_console_standard_short_help, f_console_standard_long_help, 0, 0, f_console_type_normal), \
+ f_console_parameter_t_initialize(f_console_standard_short_light, f_console_standard_long_light, 0, 0, f_console_type_inverse), \
+ f_console_parameter_t_initialize(f_console_standard_short_dark, f_console_standard_long_dark, 0, 0, f_console_type_inverse), \
+ f_console_parameter_t_initialize(f_console_standard_short_no_color, f_console_standard_long_no_color, 0, 0, f_console_type_inverse), \
+ f_console_parameter_t_initialize(f_console_standard_short_quiet, f_console_standard_long_quiet, 0, 0, f_console_type_inverse), \
+ f_console_parameter_t_initialize(f_console_standard_short_verbose, f_console_standard_long_verbose, 0, 0, f_console_type_inverse), \
+ f_console_parameter_t_initialize(f_console_standard_short_version, f_console_standard_long_version, 0, 0, f_console_type_inverse), \
+ f_console_parameter_t_initialize(iki_read_short_at, iki_read_long_at, 0, 1, f_console_type_normal), \
+ f_console_parameter_t_initialize(iki_read_short_line, iki_read_long_line, 0, 1, f_console_type_normal), \
+ f_console_parameter_t_initialize(iki_read_short_literal, iki_read_long_literal, 0, 0, f_console_type_normal), \
+ f_console_parameter_t_initialize(iki_read_short_name, iki_read_long_name, 0, 1, f_console_type_normal), \
+ f_console_parameter_t_initialize(iki_read_short_object, iki_read_long_object, 0, 0, f_console_type_normal), \
+ f_console_parameter_t_initialize(iki_read_short_whole, iki_read_long_whole, 0, 0, f_console_type_normal), \
+ f_console_parameter_t_initialize(iki_read_short_substitute, iki_read_long_substitute, 0, 3, f_console_type_normal), \
+ f_console_parameter_t_initialize(iki_read_short_total, iki_read_long_total, 0, 0, f_console_type_normal), \
}
#define iki_read_total_parameters 15
#endif // _di_iki_read_defines_
-#ifndef _di_iki_read_substitution_
+#ifndef _di_iki_read_substitution_t_
#define iki_read_substitution_vocabulary "vocabulary"
#define iki_read_substitution_replace "replace"
#define iki_read_substitution_with "with"
typedef struct {
- f_string_static replace;
- f_string_static with;
- } iki_read_substitution;
+ f_string_static_t replace;
+ f_string_static_t with;
+ } iki_read_substitution_t;
- #define iki_read_substitution_initialize \
+ #define iki_read_substitution_t_initialize \
{ \
- f_string_static_initialize, \
- f_string_static_initialize, \
+ f_string_static_t_initialize, \
+ f_string_static_t_initialize, \
}
- #define macro_iki_read_substitution_initialize(replace, with) \
+ #define macro_iki_read_substitution_t_initialize(replace, with) \
{ \
- f_macro_string_static_initialize(replace), \
- f_macro_string_static_initialize(with), \
+ f_macro_string_static_t_initialize(replace), \
+ f_macro_string_static_t_initialize(with), \
}
-#endif // _di_iki_read_substitution_
+#endif // _di_iki_read_substitution_t_
-#ifndef _di_iki_read_substitutions_
+#ifndef _di_iki_read_substitutions_t_
typedef struct {
- iki_read_substitution *array;
+ iki_read_substitution_t *array;
- f_array_length size;
- f_array_length used;
- } iki_read_substitutions;
+ f_array_length_t size;
+ f_array_length_t used;
+ } iki_read_substitutions_t;
- #define iki_read_substitutions_initialize {0, 0, 0}
+ #define iki_read_substitutions_t_initialize {0, 0, 0}
- #define macro_iki_read_substitutions_clear(replacements) f_macro_memory_structure_clear(replacements)
+ #define macro_iki_read_substitutions_t_clear(replacements) f_macro_memory_structure_t_clear(replacements)
- #define macro_iki_read_substitutions_new(status, replacements, length) f_macro_memory_structure_new(status, replacements, iki_read_substitution, length)
+ #define macro_iki_read_substitutions_t_new(status, replacements, length) f_macro_memory_structure_t_new(status, replacements, iki_read_substitution_t, length)
- #define macro_iki_read_substitutions_delete_simple(replacements) \
+ #define macro_iki_read_substitutions_t_delete_simple(replacements) \
replacements.used = replacements.size; \
while (replacements.used > 0) { \
replacements.used--; \
} \
- if (replacements.used == 0) f_macro_memory_structure_delete_simple(replacements, iki_read_substitution)
+ if (replacements.used == 0) f_macro_memory_structure_t_delete_simple(replacements, iki_read_substitution_t)
- #define macro_iki_read_substitutions_destroy_simple(replacements) \
+ #define macro_iki_read_substitutions_t_destroy_simple(replacements) \
replacements.used = replacements.size; \
while (replacements.used > 0) { \
replacements.used--; \
} \
- if (replacements.used == 0) f_macro_memory_structure_destroy_simple(replacements, iki_read_substitution)
+ if (replacements.used == 0) f_macro_memory_structure_t_destroy_simple(replacements, iki_read_substitution_t)
- #define macro_iki_read_substitutions_resize(status, replacements, new_length) \
+ #define macro_iki_read_substitutions_t_resize(status, replacements, new_length) \
status = F_none; \
if (new_length < replacements.size) { \
- f_array_length i = replacements.size - new_length; \
+ f_array_length_t i = replacements.size - new_length; \
for (; i < replacements.size; i++) { \
if (status != F_none) break; \
} \
} \
- if (status == F_none) status = f_memory_resize((void **) & replacements.array, sizeof(iki_read_substitution), replacements.size, new_length); \
+ if (status == F_none) status = f_memory_resize((void **) & replacements.array, sizeof(iki_read_substitution_t), replacements.size, new_length); \
if (status == F_none) { \
if (new_length > replacements.size) { \
- f_array_length i = replacements.size; \
+ f_array_length_t i = replacements.size; \
for (; i < new_length; i++) { \
- memset(&replacements.array[i], 0, sizeof(iki_read_substitution)); \
+ memset(&replacements.array[i], 0, sizeof(iki_read_substitution_t)); \
} \
} \
replacements.size = new_length; \
if (replacements.used > replacements.size) replacements.used = new_length; \
}
- #define macro_iki_read_substitutions_adjust(status, replacements, new_length) \
+ #define macro_iki_read_substitutions_t_adjust(status, replacements, new_length) \
status = F_none; \
if (new_length < replacements.size) { \
- f_array_length i = replacements.size - new_length; \
+ f_array_length_t i = replacements.size - new_length; \
for (; i < replacements.size; i++) { \
if (status != F_none) break; \
} \
} \
- if (status == F_none) status = f_memory_adjust((void **) & replacements.array, sizeof(iki_read_substitution), replacements.size, new_length); \
+ if (status == F_none) status = f_memory_adjust((void **) & replacements.array, sizeof(iki_read_substitution_t), replacements.size, new_length); \
if (status == F_none) { \
if (new_length > replacements.size) { \
- f_array_length i = replacements.size; \
+ f_array_length_t i = replacements.size; \
for (; i < new_length; i++) { \
- memset(&replacements.array[i], 0, sizeof(iki_read_substitution)); \
+ memset(&replacements.array[i], 0, sizeof(iki_read_substitution_t)); \
} \
} \
replacements.size = new_length; \
if (replacements.used > replacements.size) replacements.used = new_length; \
}
-#endif // _di_iki_read_substitutions_
+#endif // _di_iki_read_substitutions_t_
-#ifndef _di_iki_read_data_
+#ifndef _di_iki_read_data_t_
typedef struct {
- f_console_parameter parameters[iki_read_total_parameters];
+ f_console_parameter_t parameters[iki_read_total_parameters];
- f_string_lengths remaining;
+ f_string_lengths_t remaining;
bool process_pipe;
- f_number_unsigned at;
- f_number_unsigned line;
+ f_number_unsigned_t at;
+ f_number_unsigned_t line;
uint8_t mode;
uint8_t verbosity;
- f_string_dynamic buffer;
+ f_string_dynamic_t buffer;
- iki_read_substitutions replacements;
+ iki_read_substitutions_t replacements;
- fl_color_context context;
- } iki_read_data;
+ fl_color_context_t context;
+ } iki_read_data_t;
- #define iki_read_data_initialize \
+ #define iki_read_data_t_initialize \
{ \
- f_console_parameter_initialize_iki_read, \
- f_string_lengths_initialize, \
+ iki_read_console_parameter_t_initialize, \
+ f_string_lengths_t_initialize, \
F_false, \
0, \
0, \
0, \
0, \
- f_string_dynamic_initialize, \
- iki_read_substitutions_initialize, \
- fl_color_context_initialize, \
+ f_string_dynamic_t_initialize, \
+ iki_read_substitutions_t_initialize, \
+ fl_color_context_t_initialize, \
}
-#endif // _di_iki_read_data_
+#endif // _di_iki_read_data_t_
/**
* Print help to standard output.
* F_none on success.
*/
#ifndef _di_iki_read_print_help_
- extern f_return_status iki_read_print_help(const fl_color_context context);
+ extern f_return_status iki_read_print_help(const fl_color_context_t context);
#endif // _di_iki_read_print_help_
/**
* @see iki_read_delete_data()
*/
#ifndef _di_iki_read_main_
- extern f_return_status iki_read_main(const f_console_arguments arguments, iki_read_data *data);
+ extern f_return_status iki_read_main(const f_console_arguments_t arguments, iki_read_data_t *data);
#endif // _di_iki_read_main_
/**
* @see iki_read_main()
*/
#ifndef _di_iki_read_delete_data_
- extern f_return_status iki_read_delete_data(iki_read_data *data);
+ extern f_return_status iki_read_delete_data(iki_read_data_t *data);
#endif // _di_iki_read_delete_data_
#ifdef __cplusplus
#include "iki_read.h"
-int main(const unsigned long argc, const f_string *argv) {
- const f_console_arguments arguments = { argc, argv };
- iki_read_data data = iki_read_data_initialize;
+int main(const unsigned long argc, const f_string_t *argv) {
+ const f_console_arguments_t arguments = { argc, argv };
+ iki_read_data_t data = iki_read_data_t_initialize;
if (f_pipe_input_exists()) {
data.process_pipe = F_true;
}
- f_status status = iki_read_main(arguments, &data);
+ f_status_t status = iki_read_main(arguments, &data);
if (F_status_is_error(status)) {
return 1;
#endif
#ifndef _di_iki_read_print_error_
- f_return_status iki_read_print_error(const fl_color_context context, const uint8_t verbosity, const f_status status, const f_string function, const bool fallback) {
+ f_return_status iki_read_print_error(const fl_color_context_t context, const uint8_t verbosity, const f_status_t status, const f_string_t function, const bool fallback) {
if (status == F_parameter) {
if (verbosity != iki_read_verbosity_quiet) {
#endif // _di_iki_read_print_error_
#ifndef _di_iki_read_print_error_file_
- bool iki_read_print_error_file(const fl_color_context context, const uint8_t verbosity, const f_status status, const f_string function, const f_string name, const f_string operation, const bool is_file, const bool fallback) {
- const f_string file_or_directory = is_file ? "file" : "directory";
+ bool iki_read_print_error_file(const fl_color_context_t context, const uint8_t verbosity, const f_status_t status, const f_string_t function, const f_string_t name, const f_string_t operation, const bool is_file, const bool fallback) {
+ const f_string_t file_or_directory = is_file ? "file" : "directory";
if (status == F_file_found_not) {
if (verbosity != iki_read_verbosity_quiet) {
#endif // _di_iki_read_print_error_file_
#ifndef _di_iki_read_print_error_number_argument_
- void iki_read_print_error_number_argument(const fl_color_context context, const uint8_t verbosity, const f_status status, const f_string function, const f_string parameter, const f_string argument) {
+ void iki_read_print_error_number_argument(const fl_color_context_t context, const uint8_t verbosity, const f_status_t status, const f_string_t function, const f_string_t parameter, const f_string_t argument) {
if (verbosity == iki_read_verbosity_quiet) return;
fprintf(f_type_error, "%c", f_string_eol[0]);
#endif // _di_iki_read_print_error_number_argument_
#ifndef _di_iki_read_process_at_
- f_return_status iki_read_process_at(const f_console_arguments arguments, const f_string file_name, iki_read_data *data, f_string_range *range) {
+ f_return_status iki_read_process_at(const f_console_arguments_t arguments, const f_string_t file_name, iki_read_data_t *data, f_string_range_t *range) {
if (data->parameters[iki_read_parameter_line].result != f_console_result_additional) return F_false;
- f_string_length line = 0;
+ f_string_length_t line = 0;
range->start = 0;
if (data->line > 0) {
#endif // _di_iki_read_process_at_
#ifndef _di_iki_read_process_buffer_
- f_return_status iki_read_process_buffer(const f_console_arguments arguments, const f_string file_name, iki_read_data *data) {
- f_status status = F_none;
+ f_return_status iki_read_process_buffer(const f_console_arguments_t arguments, const f_string_t file_name, iki_read_data_t *data) {
+ f_status_t status = F_none;
- f_iki_variable variable = f_iki_variable_initialize;
- f_iki_vocabulary vocabulary = f_iki_vocabulary_initialize;
- f_iki_content content = f_iki_content_initialize;
+ f_iki_variable_t variable = f_iki_variable_t_initialize;
+ f_iki_vocabulary_t vocabulary = f_iki_vocabulary_t_initialize;
+ f_iki_content_t content = f_iki_content_t_initialize;
if (data->parameters[iki_read_parameter_whole].result == f_console_result_found) {
- f_string_range buffer_range = f_macro_string_range_initialize(data->buffer.used);
+ f_string_range_t buffer_range = f_macro_string_range_initialize(data->buffer.used);
status = iki_read_process_at(arguments, file_name, data, &buffer_range);
status = iki_read_process_buffer_total(arguments, file_name, data, &variable, &vocabulary, &content);
}
else {
- f_string_range buffer_range = f_macro_string_range_initialize(data->buffer.used);
+ f_string_range_t buffer_range = f_macro_string_range_initialize(data->buffer.used);
status = iki_read_process_at(arguments, file_name, data, &buffer_range);
}
}
- f_macro_iki_variable_delete_simple(variable);
- f_macro_iki_vocabulary_delete_simple(vocabulary);
- f_macro_iki_content_delete_simple(content);
+ f_macro_iki_variable_t_delete_simple(variable);
+ f_macro_iki_vocabulary_t_delete_simple(vocabulary);
+ f_macro_iki_content_t_delete_simple(content);
return status;
}
#endif // _di_iki_read_process_buffer_
#ifndef _di_iki_read_process_buffer_ranges_
- f_return_status iki_read_process_buffer_ranges(const f_console_arguments arguments, const f_string file_name, iki_read_data *data, f_string_range *buffer_range, f_iki_variable *variable, f_iki_vocabulary *vocabulary, f_iki_content *content, f_string_ranges *ranges) {
- f_status status = F_none;
+ f_return_status iki_read_process_buffer_ranges(const f_console_arguments_t arguments, const f_string_t file_name, iki_read_data_t *data, f_string_range_t *buffer_range, f_iki_variable_t *variable, f_iki_vocabulary_t *vocabulary, f_iki_content_t *content, f_string_ranges_t *ranges) {
+ f_status_t status = F_none;
bool unmatched = F_true;
const bool content_only = data->mode == iki_read_mode_content;
- iki_read_substitutions substitutionss[variable->used];
+ iki_read_substitutions_t substitutionss[variable->used];
- memset(substitutionss, 0, sizeof(iki_read_substitutions) * variable->used);
+ memset(substitutionss, 0, sizeof(iki_read_substitutions_t) * variable->used);
if (data->mode == iki_read_mode_literal || data->mode == iki_read_mode_content) {
status = iki_read_substitutions_identify(arguments, file_name, data, vocabulary, substitutionss);
if (F_status_is_error(status)) {
iki_read_print_error(data->context, data->verbosity, F_status_set_fine(status), "iki_read_substitutions_identify", F_true);
- for (f_array_length i = 0; i < variable->used; i++) {
- macro_iki_read_substitutions_delete_simple(substitutionss[i]);
+ for (f_array_length_t i = 0; i < variable->used; i++) {
+ macro_iki_read_substitutions_t_delete_simple(substitutionss[i]);
} // for
return status;
}
if (data->parameters[iki_read_parameter_name].result == f_console_result_additional) {
- f_string_dynamic name = f_string_dynamic_initialize;
+ f_string_dynamic_t name = f_string_dynamic_t_initialize;
- f_array_length index = 0;
- f_array_length i = 0;
- f_array_length j = 0;
+ f_array_length_t index = 0;
+ f_array_length_t i = 0;
+ f_array_length_t j = 0;
buffer_range->start = 0;
for (; i < data->parameters[iki_read_parameter_name].additional.used; i++) {
if (F_status_is_error(status)) {
iki_read_print_error(data->context, data->verbosity, F_status_set_fine(status), "fl_string_append_nulless", F_true);
- for (f_array_length i = 0; i < variable->used; i++) {
- macro_iki_read_substitutions_delete_simple(substitutionss[i]);
+ for (f_array_length_t i = 0; i < variable->used; i++) {
+ macro_iki_read_substitutions_t_delete_simple(substitutionss[i]);
} // for
- f_macro_string_dynamic_delete_simple(name);
+ f_macro_string_dynamic_t_delete_simple(name);
return status;
}
} // for
} // for
- f_macro_string_dynamic_delete_simple(name);
+ f_macro_string_dynamic_t_delete_simple(name);
if (unmatched) status = F_data_not;
else status = F_none;
}
else if (ranges->used) {
- f_array_length i = 0;
- f_string_length j = 0;
+ f_array_length_t i = 0;
+ f_string_length_t j = 0;
for (; i < ranges->used; i++) {
status = F_data_not;
}
- for (f_array_length i = 0; i < variable->used; i++) {
- macro_iki_read_substitutions_delete_simple(substitutionss[i]);
+ for (f_array_length_t i = 0; i < variable->used; i++) {
+ macro_iki_read_substitutions_t_delete_simple(substitutionss[i]);
} // for
return status;
#endif // _di_iki_read_process_buffer_ranges_
#ifndef _di_iki_read_process_buffer_ranges_whole_
- f_return_status iki_read_process_buffer_ranges_whole(const f_console_arguments arguments, const f_string file_name, const f_string_range buffer_range, iki_read_data *data, f_iki_variable *variable, f_iki_vocabulary *vocabulary, f_iki_content *content, f_string_ranges *ranges) {
- f_status status = F_none;
- f_string_range range = buffer_range;
+ f_return_status iki_read_process_buffer_ranges_whole(const f_console_arguments_t arguments, const f_string_t file_name, const f_string_range_t buffer_range, iki_read_data_t *data, f_iki_variable_t *variable, f_iki_vocabulary_t *vocabulary, f_iki_content_t *content, f_string_ranges_t *ranges) {
+ f_status_t status = F_none;
+ f_string_range_t range = buffer_range;
status = fl_iki_read(&data->buffer, &range, variable, vocabulary, content);
if (F_status_is_error(status)) {
const bool content_only = data->mode == iki_read_mode_content;
- iki_read_substitutions substitutionss[variable->used];
+ iki_read_substitutions_t substitutionss[variable->used];
- memset(substitutionss, 0, sizeof(iki_read_substitutions) * variable->used);
+ memset(substitutionss, 0, sizeof(iki_read_substitutions_t) * variable->used);
if (data->mode == iki_read_mode_literal || data->mode == iki_read_mode_content) {
status = iki_read_substitutions_identify(arguments, file_name, data, vocabulary, substitutionss);
if (F_status_is_error(status)) {
iki_read_print_error(data->context, data->verbosity, F_status_set_fine(status), "iki_read_substitutions_identify", F_true);
- for (f_array_length i = 0; i < variable->used; i++) {
- macro_iki_read_substitutions_delete_simple(substitutionss[i]);
+ for (f_array_length_t i = 0; i < variable->used; i++) {
+ macro_iki_read_substitutions_t_delete_simple(substitutionss[i]);
} // for
return status;
}
}
- f_string_dynamics names = f_string_dynamics_initialize;
- f_string_range name_range = f_string_range_initialize;
- f_string_range substitution_range = f_string_range_initialize;
+ f_string_dynamics_t names = f_string_dynamics_t_initialize;
+ f_string_range_t name_range = f_string_range_initialize;
+ f_string_range_t substitution_range = f_string_range_initialize;
bool name_missed = F_true;
substitution_range.start = 0;
if (data->parameters[iki_read_parameter_name].result == f_console_result_additional) {
- f_array_length i = 0;
- f_array_length j = 0;
- f_string_length length_argument = 0;
+ f_array_length_t i = 0;
+ f_array_length_t j = 0;
+ f_string_length_t length_argument = 0;
- for (f_array_length index = 0; i < data->parameters[iki_read_parameter_name].additional.used; i++) {
+ for (f_array_length_t index = 0; i < data->parameters[iki_read_parameter_name].additional.used; i++) {
index = data->parameters[iki_read_parameter_name].additional.array[i];
length_argument = strnlen(arguments.argv[index], f_console_length_size);
if (F_status_is_error(status)) {
for (i = 0; i < variable->used; i++) {
- macro_iki_read_substitutions_delete_simple(substitutionss[i]);
+ macro_iki_read_substitutions_t_delete_simple(substitutionss[i]);
} // for
- f_macro_string_dynamics_delete_simple(names);
+ f_macro_string_dynamics_t_delete_simple(names);
return status;
}
}
{
- f_string_length i = buffer_range.start;
- f_array_length j = 0;
- f_array_length k = 0;
+ f_string_length_t i = buffer_range.start;
+ f_array_length_t j = 0;
+ f_array_length_t k = 0;
range = buffer_range;
name_range.start = 0;
}
}
- for (f_array_length i = 0; i < variable->used; i++) {
- macro_iki_read_substitutions_delete_simple(substitutionss[i]);
+ for (f_array_length_t i = 0; i < variable->used; i++) {
+ macro_iki_read_substitutions_t_delete_simple(substitutionss[i]);
} // for
- f_macro_string_dynamics_delete_simple(names);
+ f_macro_string_dynamics_t_delete_simple(names);
return F_none;
}
#endif // _di_iki_read_process_buffer_ranges_whole_
#ifndef _di_iki_read_process_buffer_total_
- f_return_status iki_read_process_buffer_total(const f_console_arguments arguments, const f_string file_name, iki_read_data *data, f_iki_variable *variable, f_iki_vocabulary *vocabulary, f_iki_content *content) {
- f_status status = F_none;
- f_string_range range = f_macro_string_range_initialize(data->buffer.used);
+ f_return_status iki_read_process_buffer_total(const f_console_arguments_t arguments, const f_string_t file_name, iki_read_data_t *data, f_iki_variable_t *variable, f_iki_vocabulary_t *vocabulary, f_iki_content_t *content) {
+ f_status_t status = F_none;
+ f_string_range_t range = f_macro_string_range_initialize(data->buffer.used);
status = iki_read_process_at(arguments, file_name, data, &range);
return status;
}
- f_array_length total = 0;
+ f_array_length_t total = 0;
if (data->parameters[iki_read_parameter_name].result == f_console_result_additional) {
- f_string_dynamic name = f_string_dynamic_initialize;
+ f_string_dynamic_t name = f_string_dynamic_t_initialize;
- f_array_length index = 0;
- f_array_length i = 0;
- f_array_length j = 0;
+ f_array_length_t index = 0;
+ f_array_length_t i = 0;
+ f_array_length_t j = 0;
range.start = 0;
if (F_status_is_error(status)) {
iki_read_print_error(data->context, data->verbosity, F_status_set_fine(status), "fl_string_append_nulless", F_true);
- f_macro_string_dynamic_delete_simple(name);
+ f_macro_string_dynamic_t_delete_simple(name);
return status;
}
} // for
} // for
- f_macro_string_dynamic_delete_simple(name);
+ f_macro_string_dynamic_t_delete_simple(name);
}
else {
total = variable->used;
#endif // _di_iki_read_process_buffer_total_
#ifndef _di_iki_read_substitutions_identify_
- f_return_status iki_read_substitutions_identify(const f_console_arguments arguments, const f_string file_name, iki_read_data *data, f_iki_vocabulary *vocabulary, iki_read_substitutions *substitutionss) {
+ f_return_status iki_read_substitutions_identify(const f_console_arguments_t arguments, const f_string_t file_name, iki_read_data_t *data, f_iki_vocabulary_t *vocabulary, iki_read_substitutions_t *substitutionss) {
if (data->parameters[iki_read_parameter_substitute].result != f_console_result_additional) return F_none;
- f_status status = F_none;
+ f_status_t status = F_none;
- f_array_length i = 0;
- f_array_length j = 0;
+ f_array_length_t i = 0;
+ f_array_length_t j = 0;
- f_array_length index = 0;
- f_array_length index_2 = 0;
+ f_array_length_t index = 0;
+ f_array_length_t index_2 = 0;
- f_string_length length = 0;
+ f_string_length_t length = 0;
- f_console_parameter *parameter = &data->parameters[iki_read_parameter_substitute];
+ f_console_parameter_t *parameter = &data->parameters[iki_read_parameter_substitute];
for (; i < parameter->additional.used; i += 3) {
index = parameter->additional.array[i];
status = fl_string_compare(arguments.argv[index], data->buffer.string + vocabulary->array[j].start, length, (vocabulary->array[j].stop - vocabulary->array[j].start) + 1);
if (status == F_equal_to) {
- f_macro_memory_structure_macro_increment(status, substitutionss[j], 1, f_iki_default_allocation_step, macro_iki_read_substitutions_resize, F_buffer_too_large);
+ f_macro_memory_structure_macro_increment(status, substitutionss[j], 1, f_iki_default_allocation_step, macro_iki_read_substitutions_t_resize, F_buffer_too_large);
if (F_status_is_error(status)) return status;
index = parameter->additional.array[i + 1];
#endif // _di_iki_read_substitutions_identify_
#ifndef _di_iki_read_substitutions_print_
- void iki_read_substitutions_print(const iki_read_data data, const f_iki_variable variable, const f_iki_content content, const f_string_ranges ranges, const iki_read_substitutions substitutions, const f_string_length index, const bool content_only) {
- f_status status = F_none;
+ void iki_read_substitutions_print(const iki_read_data_t data, const f_iki_variable_t variable, const f_iki_content_t content, const f_string_ranges_t ranges, const iki_read_substitutions_t substitutions, const f_string_length_t index, const bool content_only) {
+ f_status_t status = F_none;
- f_string_length i = 0;
- f_string_range range = f_string_range_initialize;
+ f_string_length_t i = 0;
+ f_string_range_t range = f_string_range_initialize;
range.start = 0;
* F_unknown is returned if the status code has no print message.
*/
#ifndef _di_iki_read_print_error_
- extern f_return_status iki_read_print_error(const fl_color_context context, const uint8_t verbosity, const f_status status, const f_string function, const bool fallback) f_gcc_attribute_visibility_internal;
+ extern f_return_status iki_read_print_error(const fl_color_context_t context, const uint8_t verbosity, const f_status_t status, const f_string_t function, const bool fallback) f_gcc_attribute_visibility_internal;
#endif // _di_iki_read_print_error_
/**
* F_false is returned on successful print of known errors.
*/
#ifndef _di_iki_read_print_error_file_
- extern bool iki_read_print_error_file(const fl_color_context context, const uint8_t verbosity, const f_status status, const f_string function, const f_string name, const f_string operation, const bool is_file, const bool fallback) f_gcc_attribute_visibility_internal;
+ extern bool iki_read_print_error_file(const fl_color_context_t context, const uint8_t verbosity, const f_status_t status, const f_string_t function, const f_string_t name, const f_string_t operation, const bool is_file, const bool fallback) f_gcc_attribute_visibility_internal;
#endif // _di_iki_read_print_error_file_
/**
* F_false is returned on successful print of known errors.
*/
#ifndef _di_iki_read_print_error_number_argument_
- extern void iki_read_print_error_number_argument(const fl_color_context context, const uint8_t verbosity, const f_status status, const f_string function, const f_string parameter, const f_string argument) f_gcc_attribute_visibility_internal;
+ extern void iki_read_print_error_number_argument(const fl_color_context_t context, const uint8_t verbosity, const f_status_t status, const f_string_t function, const f_string_t parameter, const f_string_t argument) f_gcc_attribute_visibility_internal;
#endif // _di_iki_read_print_error_number_argument_
/**
* Status codes (with error bit) are returned on any problem.
*/
#ifndef _di_iki_read_process_at_
- extern f_return_status iki_read_process_at(const f_console_arguments arguments, const f_string file_name, iki_read_data *data, f_string_range *range) f_gcc_attribute_visibility_internal;
+ extern f_return_status iki_read_process_at(const f_console_arguments_t arguments, const f_string_t file_name, iki_read_data_t *data, f_string_range_t *range) f_gcc_attribute_visibility_internal;
#endif // _di_iki_read_process_at_
/**
* Status codes (with error bit) are returned on any problem.
*/
#ifndef _di_iki_read_process_buffer_
- extern f_return_status iki_read_process_buffer(const f_console_arguments arguments, const f_string file_name, iki_read_data *data) f_gcc_attribute_visibility_internal;
+ extern f_return_status iki_read_process_buffer(const f_console_arguments_t arguments, const f_string_t file_name, iki_read_data_t *data) f_gcc_attribute_visibility_internal;
#endif // _di_iki_read_process_buffer_
/**
* Status codes (with error bit) are returned on any problem.
*/
#ifndef _di_iki_read_process_buffer_ranges_
- extern f_return_status iki_read_process_buffer_ranges(const f_console_arguments arguments, const f_string file_name, iki_read_data *data, f_string_range *buffer_range, f_iki_variable *variable, f_iki_vocabulary *vocabulary, f_iki_content *content, f_string_ranges *ranges) f_gcc_attribute_visibility_internal;
+ extern f_return_status iki_read_process_buffer_ranges(const f_console_arguments_t arguments, const f_string_t file_name, iki_read_data_t *data, f_string_range_t *buffer_range, f_iki_variable_t *variable, f_iki_vocabulary_t *vocabulary, f_iki_content_t *content, f_string_ranges_t *ranges) f_gcc_attribute_visibility_internal;
#endif // _di_iki_read_process_buffer_ranges_
/**
* Status codes (with error bit) are returned on any problem.
*/
#ifndef _di_iki_read_process_buffer_ranges_whole_
- extern f_return_status iki_read_process_buffer_ranges_whole(const f_console_arguments arguments, const f_string file_name, const f_string_range buffer_range, iki_read_data *data, f_iki_variable *variable, f_iki_vocabulary *vocabulary, f_iki_content *content, f_string_ranges *ranges) f_gcc_attribute_visibility_internal;
+ extern f_return_status iki_read_process_buffer_ranges_whole(const f_console_arguments_t arguments, const f_string_t file_name, const f_string_range_t buffer_range, iki_read_data_t *data, f_iki_variable_t *variable, f_iki_vocabulary_t *vocabulary, f_iki_content_t *content, f_string_ranges_t *ranges) f_gcc_attribute_visibility_internal;
#endif // _di_iki_read_process_buffer_ranges_whole_
/**
* Status codes (with error bit) are returned on any problem.
*/
#ifndef _di_iki_read_process_buffer_total_
- extern f_return_status iki_read_process_buffer_total(const f_console_arguments arguments, const f_string file_name, iki_read_data *data, f_iki_variable *variable, f_iki_vocabulary *vocabulary, f_iki_content *content) f_gcc_attribute_visibility_internal;
+ extern f_return_status iki_read_process_buffer_total(const f_console_arguments_t arguments, const f_string_t file_name, iki_read_data_t *data, f_iki_variable_t *variable, f_iki_vocabulary_t *vocabulary, f_iki_content_t *content) f_gcc_attribute_visibility_internal;
#endif // _di_iki_read_process_buffer_total_
/**
* Status codes (with error bit) are returned on any problem.
*/
#ifndef _di_iki_read_substitutions_identify_
- extern f_return_status iki_read_substitutions_identify(const f_console_arguments arguments, const f_string file_name, iki_read_data *data, f_iki_vocabulary *vocabulary, iki_read_substitutions *substitutionss) f_gcc_attribute_visibility_internal;
+ extern f_return_status iki_read_substitutions_identify(const f_console_arguments_t arguments, const f_string_t file_name, iki_read_data_t *data, f_iki_vocabulary_t *vocabulary, iki_read_substitutions_t *substitutionss) f_gcc_attribute_visibility_internal;
#endif // _di_iki_read_substitutions_identify_
/**
* Set to FALSE to print the entire variable when printing substituted text.
*/
#ifndef _di_iki_read_substitutions_print_
- extern void iki_read_substitutions_print(const iki_read_data data, const f_iki_variable variable, const f_iki_content content, const f_string_ranges ranges, const iki_read_substitutions substitutions, const f_string_length index, const bool content_only) f_gcc_attribute_visibility_internal;
+ extern void iki_read_substitutions_print(const iki_read_data_t data, const f_iki_variable_t variable, const f_iki_content_t content, const f_string_ranges_t ranges, const iki_read_substitutions_t substitutions, const f_string_length_t index, const bool content_only) f_gcc_attribute_visibility_internal;
#endif // _di_iki_read_substitutions_print_
#ifdef __cplusplus
# fss-0000
f_type
-f_status
+f_status_t
f_memory
-f_string
+f_string_t
f_utf
-f_color
+f_color_t
f_console
f_conversion
-f_file
+f_file_t
f_iki
f_pipe
f_print
// version printed may be used by scripts, so this will only print the version number and a newline, no extra information or colors
#ifndef _di_init_print_version_
- f_return_status init_print_version(const init_data data) {
+ f_return_status init_print_version(const init_data_t data) {
printf("%s\n", init_version);
return F_none;
#endif // _di_init_print_version_
#ifndef _di_init_print_help_
- f_return_status init_print_help(const fl_color_context context) {
+ f_return_status init_print_help(const fl_color_context_t context) {
fll_program_print_help_header(context, init_name_long, init_version);
fll_program_print_help_option(context, f_console_standard_short_help, f_console_standard_long_help, f_console_symbol_short_enable, f_console_symbol_long_enable, " Print this help message.");
#endif // _di_init_print_help_
#ifndef _di_init_main_
- f_return_status init_main(const f_console_arguments arguments, init_data *data) {
- f_status status = F_none;
+ f_return_status init_main(const f_console_arguments_t arguments, init_data_t *data) {
+ f_status_t status = F_none;
int8_t run_level[init_kernel_runlevel_buffer];
memset(run_level, 0, init_kernel_runlevel_buffer);
unsigned short do_socket_port = F_false;
{
- f_console_parameters parameters = { data->parameters, init_total_parameters };
- f_console_parameter_id ids[3] = { init_parameter_no_color, init_parameter_light, init_parameter_dark };
- f_console_parameter_ids choices = { ids, 3 };
+ f_console_parameters_t parameters = { data->parameters, init_total_parameters };
+ f_console_parameter_id_t ids[3] = { init_parameter_no_color, init_parameter_light, init_parameter_dark };
+ f_console_parameter_ids_t choices = { ids, 3 };
status = fll_program_parameter_process(arguments, parameters, choices, F_true, &data->remaining, &data->context);
};
#ifdef _en_init_debug_
- #define f_console_parameter_initialize_init \
+ #define init_console_parameter_t_initialize \
{ \
- f_console_parameter_initialize(f_console_standard_short_help, f_console_standard_long_help, 0, F_false, f_console_type_normal), \
- f_console_parameter_initialize(f_console_standard_short_light, f_console_standard_long_light, 0, F_false, f_console_type_inverse), \
- f_console_parameter_initialize(f_console_standard_short_dark, f_console_standard_long_dark, 0, F_false, f_console_type_inverse), \
- f_console_parameter_initialize(f_console_standard_short_no_color, f_console_standard_long_no_color, 0, F_false, f_console_type_inverse), \
- f_console_parameter_initialize(f_console_standard_short_version, f_console_standard_long_version, 0, F_false, f_console_type_inverse), \
- f_console_parameter_initialize(f_console_standard_short_debug, f_console_standard_long_debug, 0, F_false, f_console_type_inverse), \
- f_console_parameter_initialize(init_parameter_runlevel_short_name, init_parameter_runlevel_long_name, 0, F_true, f_console_type_normal), \
- f_console_parameter_initialize(init_parameter_no_prepare_short_name, init_parameter_no_prepare_long_name, 0, F_true, f_console_type_normal), \
+ f_console_parameter_t_initialize(f_console_standard_short_help, f_console_standard_long_help, 0, F_false, f_console_type_normal), \
+ f_console_parameter_t_initialize(f_console_standard_short_light, f_console_standard_long_light, 0, F_false, f_console_type_inverse), \
+ f_console_parameter_t_initialize(f_console_standard_short_dark, f_console_standard_long_dark, 0, F_false, f_console_type_inverse), \
+ f_console_parameter_t_initialize(f_console_standard_short_no_color, f_console_standard_long_no_color, 0, F_false, f_console_type_inverse), \
+ f_console_parameter_t_initialize(f_console_standard_short_version, f_console_standard_long_version, 0, F_false, f_console_type_inverse), \
+ f_console_parameter_t_initialize(f_console_standard_short_debug, f_console_standard_long_debug, 0, F_false, f_console_type_inverse), \
+ f_console_parameter_t_initialize(init_parameter_runlevel_short_name, init_parameter_runlevel_long_name, 0, F_true, f_console_type_normal), \
+ f_console_parameter_t_initialize(init_parameter_no_prepare_short_name, init_parameter_no_prepare_long_name, 0, F_true, f_console_type_normal), \
}
#define init_total_parameters 8
#else
- #define f_console_parameter_initialize_init \
+ #define init_console_parameter_t_initialize \
{ \
- f_console_parameter_initialize(f_console_standard_short_help, f_console_standard_long_help, 0, F_false, f_console_type_normal), \
- f_console_parameter_initialize(f_console_standard_short_light, f_console_standard_long_light, 0, F_false, f_console_type_inverse), \
- f_console_parameter_initialize(f_console_standard_short_dark, f_console_standard_long_dark, 0, F_false, f_console_type_inverse), \
- f_console_parameter_initialize(f_console_standard_short_no_color, f_console_standard_long_no_color, 0, F_false, f_console_type_inverse), \
- f_console_parameter_initialize(f_console_standard_short_version, f_console_standard_long_version, 0, F_false, f_console_type_inverse), \
- f_console_parameter_initialize(init_parameter_runlevel_short_name, init_parameter_runlevel_long_name, 0, F_true, f_console_type_normal), \
- f_console_parameter_initialize(init_parameter_no_prepare_short_name, init_parameter_no_prepare_long_name, 0, F_true, f_console_type_normal), \
+ f_console_parameter_t_initialize(f_console_standard_short_help, f_console_standard_long_help, 0, F_false, f_console_type_normal), \
+ f_console_parameter_t_initialize(f_console_standard_short_light, f_console_standard_long_light, 0, F_false, f_console_type_inverse), \
+ f_console_parameter_t_initialize(f_console_standard_short_dark, f_console_standard_long_dark, 0, F_false, f_console_type_inverse), \
+ f_console_parameter_t_initialize(f_console_standard_short_no_color, f_console_standard_long_no_color, 0, F_false, f_console_type_inverse), \
+ f_console_parameter_t_initialize(f_console_standard_short_version, f_console_standard_long_version, 0, F_false, f_console_type_inverse), \
+ f_console_parameter_t_initialize(init_parameter_runlevel_short_name, init_parameter_runlevel_long_name, 0, F_true, f_console_type_normal), \
+ f_console_parameter_t_initialize(init_parameter_no_prepare_short_name, init_parameter_no_prepare_long_name, 0, F_true, f_console_type_normal), \
}
#define init_total_parameters 7
#endif // _en_init_debug_
#endif // _di_init_defines_
-#ifndef _di_init_data_
+#ifndef _di_init_data_t_
typedef struct {
- f_console_parameter parameters[init_total_parameters];
+ f_console_parameter_t parameters[init_total_parameters];
- f_string_lengths remaining;
+ f_string_lengths_t remaining;
bool process_pipe;
- fl_color_context context;
- } init_data;
+ fl_color_context_t context;
+ } init_data_t;
#define init_data_initialize \
{ \
- f_console_parameter_initialize_init, \
- f_string_lengths_initialize, \
+ init_console_parameter_t_initialize, \
+ f_string_lengths_t_initialize, \
F_false, \
- fl_color_context_initialize, \
+ fl_color_context_t_initialize, \
}
typedef struct {
uint8_t todo_placeholder;
- } init_data_thread_control;
+ } init_data_thread_control_t;
- #define init_data_thread_control_initialize \
+ #define init_data_thread_control_t_initialize \
{ \
0 \
}
typedef struct {
uint8_t todo_placeholder;
- } init_data_thread_service;
+ } init_data_thread_service_t;
- #define init_data_thread_service_initialize \
+ #define init_data_thread_service_t_initialize \
{ \
0 \
}
typedef struct {
uint8_t todo_placeholder;
- } init_data_thread_socket_file;
+ } init_data_thread_socket_file_t;
- #define init_data_thread_socket_file_initialize \
+ #define init_data_thread_socket_file_t_initialize \
{ \
0 \
}
typedef struct {
uint8_t todo_placeholder;
- } init_data_thread_socket_port;
+ } init_data_thread_socket_port_t;
- #define init_data_thread_socket_port_initialize \
+ #define init_data_thread_socket_port_t_initialize \
{ \
0 \
}
-#endif // _di_init_data_
+#endif // _di_init_data_t_
#ifndef _di_init_print_version_
- extern f_return_status init_print_version(const init_data data);
+ extern f_return_status init_print_version(const init_data_t data);
#endif // _di_init_print_version_
/**
* F_none on success.
*/
#ifndef _di_init_print_help_
- extern f_return_status init_print_help(const fl_color_context context);
+ extern f_return_status init_print_help(const fl_color_context_t context);
#endif // _di_init_print_help_
/**
* Status codes (with error bit) are returned on any problem.
*/
#ifndef _di_init_main_
- extern f_return_status init_main(const f_console_arguments arguments, init_data *data);
+ extern f_return_status init_main(const f_console_arguments_t arguments, init_data_t *data);
#endif // _di_init_main_
/**
* Status codes (with error bit) are returned on any problem.
*/
#ifndef _di_init_main_
- extern f_return_status init_thread_control(const init_data *data);
+ extern f_return_status init_thread_control(const init_data_t *data);
#endif // _di_init_main_
#ifdef __cplusplus
#include "init.h"
-int main(const unsigned long argc, const f_string *argv) {
- const f_console_arguments arguments = { argc, argv };
- init_data data = init_data_initialize;
+int main(const unsigned long argc, const f_string_t *argv) {
+ const f_console_arguments_t arguments = { argc, argv };
+ init_data_t data = init_data_initialize;
if (f_pipe_input_exists()) {
data.process_pipe = F_true;
}
- f_status status = init_main(arguments, &data);
+ f_status_t status = init_main(arguments, &data);
if (F_status_is_error(status)) {
return 1;
#include "private-init.h"
/*
#ifndef _di_init_rule_buffer_
- f_return_status init_rule_buffer(const init_data data, const f_string filename, f_string_dynamic *buffer, f_fss_objects *objects, f_fss_contents *contents) {
- f_file file = f_file_initialize;
- f_status status = F_none;
- f_string_quantity quantity = f_string_quantity_initialize;
+ f_return_status init_rule_buffer(const init_data_t data, const f_string_t filename, f_string_dynamic_t *buffer, f_fss_objects_t *objects, f_fss_contents_t *contents) {
+ f_file_t file = f_file_t_initialize;
+ f_status_t status = F_none;
+ f_string_quantity_t quantity = f_string_quantity_t_initialize;
status = f_file_open(filename, 0, 0, &file);
return F_status_set_error(status);
}
- f_macro_file_reset_position(quantity, file)
+ f_macro_file_t_reset_position(quantity, file)
fflush(stdout);
status = f_file_read_until(file, buffer, quantity);
return F_status_set_error(status);
} else {
- f_string_range input = f_string_range_initialize;
+ f_string_range_t input = f_string_range_initialize;
input.stop = buffer->used - 1;
#endif // _di_init_rule_buffer_
#ifndef _di_init_rules_process_main_
- f_return_status init_rules_process_main(const init_data data, const f_string filename, f_string_dynamic *buffer, f_fss_objects *objects, f_fss_contents *contents) {
- f_status status = F_none;
+ f_return_status init_rules_process_main(const init_data_t data, const f_string_t filename, f_string_dynamic_t *buffer, f_fss_objects_t *objects, f_fss_contents_t *contents) {
+ f_status_t status = F_none;
// @todo: resume replacing code below.
status = fll_fss_extended_read(&buffer, input, &local->rule_objects, &local->rule_contents, 0, 0);
fl_color_print_line(f_type_error, data.context.error, data.context.reset, "INTERNAL ERROR: An unhandled error (%u) has occurred while calling firewall_perform_commands().", status);
}
- f_macro_fss_objects_delete_simple(local->rule_objects);
- f_macro_fss_contents_delete_simple(local->rule_contents);
+ f_macro_fss_objects_t_delete_simple(local->rule_objects);
+ f_macro_fss_contents_t_delete_simple(local->rule_contents);
return F_status_set_error(status);
}
}
- f_macro_fss_objects_delete_simple(local->rule_objects);
- f_macro_fss_contents_delete_simple(local->rule_contents);
+ f_macro_fss_objects_t_delete_simple(local->rule_objects);
+ f_macro_fss_contents_t_delete_simple(local->rule_contents);
return status;
}
#endif // _init_rules_process_main_
#ifndef _di_init_delete_stack_memory_
f_return_status init_delete_stack_memory(init_stack_memory *stack_memory) {
- f_status status = F_none;
+ f_status_t status = F_none;
if (stack_memory->services > 0) {
if (munmap(stack_memory->services, 0) >= 0) {
#ifndef _di_init_prepare_system_
f_return_status init_prepare_system(int8_t *run_level) {
- f_status status = F_none;
+ f_status_t status = F_none;
f_stat stat;
memset(&stat, 0, sizeof(f_stat));
// attempt to load kernel command line, but do not stop on failure.
if (run_level > 0 && run_level[0] != 0) {
f_file_p kernel_command_line_file = 0;
- f_string kernel_command_line_string = f_string_initialize;
+ f_string_t kernel_command_line_string = f_string_t_initialize;
size_t kernel_command_line_length = 0;
kernel_command_line_file = fopen(init_kernel_command_line, "ro");
}
if (kernel_command_line_string) {
- f_status status_free = F_none;
- f_macro_string_delete(status_free, kernel_command_line_string, string_length);
+ f_status_t status_free = F_none;
+ f_macro_string_t_delete(status_free, kernel_command_line_string, string_length);
}
}
#ifndef _di_init_prepare_system_
f_return_status init_prepare_system() {
- f_status status = F_none;
+ f_status_t status = F_none;
f_stat stat;
memset(&stat, 0, sizeof(f_stat));
#endif // _di_init_prepare_init_
#ifndef _di_init_process_main_rule_
- f_return_status init_process_main_rule(const init_data data, f_string_dynamic *buffer, init_data *settings) {
- f_status status = F_none;
- f_string_dynamic buffer = f_string_dynamic_initialize;
- f_string_range range = f_string_range_initialize;
- f_fss_objects objects = f_fss_objects_initialize;
- f_fss_contents contents = f_fss_contents_initialize;
- f_string_length position = 0;
+ f_return_status init_process_main_rule(const init_data_t data, f_string_dynamic_t *buffer, init_data_t *settings) {
+ f_status_t status = F_none;
+ f_string_dynamic_t buffer = f_string_dynamic_t_initialize;
+ f_string_range_t range = f_string_range_initialize;
+ f_fss_objects_t objects = f_fss_objects_t_initialize;
+ f_fss_contents_t contents = f_fss_contents_t_initialize;
+ f_string_length_t position = 0;
// load the main file into memory.
status = init_rule_buffer(&data, init_rule_core_file, &buffer, &objects, &contents);
fl_color_print_line(f_type_error, data.context.error, data.context.reset, "INTERNAL ERROR: An unhandled error (%u) has occurred while calling fll_fss_basic_list_read() for the file '%s'.", status, init_rule_core_file);
}
- f_macro_string_dynamic_delete(buffer);
- f_macro_fss_objects_delete(objects);
- f_macro_fss_contents_delete(contents);
+ f_macro_string_dynamic_t_delete(buffer);
+ f_macro_fss_objects_t_delete(objects);
+ f_macro_fss_contents_t_delete(contents);
return status;
}
/*
- f_status status = F_none;
+ f_status_t status = F_none;
status = fll_fss_extended_read(buffer, location, objects, contents, 0, 0);
fl_color_print_line(f_type_error, data.context.error, data.context.reset, "INTERNAL ERROR: An unhandled error (%u) has occurred while calling firewall_perform_commands().", status);
}
- f_macro_fss_objects_delete_simple((*rule_objects));
- f_macro_fss_contents_delete_simple((*rule_contents));
+ f_macro_fss_objects_t_delete_simple((*rule_objects));
+ f_macro_fss_contents_t_delete_simple((*rule_contents));
return F_status_set_error(status);
}
}
}
}
- f_macro_fss_objects_delete_simple((*rule_objects));
- f_macro_fss_contents_delete_simple((*rule_contents));
+ f_macro_fss_objects_t_delete_simple((*rule_objects));
+ f_macro_fss_contents_t_delete_simple((*rule_contents));
*/
/*
- f_macro_string_dynamic_delete(buffer);
- f_macro_fss_objects_delete(objects);
- f_macro_fss_contents_delete(contents);
+ f_macro_string_dynamic_t_delete(buffer);
+ f_macro_fss_objects_t_delete(objects);
+ f_macro_fss_contents_t_delete(contents);
return status;
}
#endif // _di_init_process_main_rule_
#ifndef _di_init_rule_
// rule [directory] [filename (no-extension)] [require] [last] [asynchronous] = execute a rule located in [directory][filename].rule.
typedef struct {
- f_string_dynamic name;
- f_string_dynamic directory;
- f_string_dynamic file;
+ f_string_dynamic_t name;
+ f_string_dynamic_t directory;
+ f_string_dynamic_t file;
bool require;
bool asynchronous;
} init_rule;
#define init_rule_initialize \
{ \
- f_string_dynamic_initialize, \
- f_string_dynamic_initialize, \
- f_string_dynamic_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
+ f_string_dynamic_t_initialize, \
F_false, \
F_false, \
}
#define delete_init_rule(status, rule) \
- f_macro_string_dynamic_delete(status, rule.name); \
+ f_macro_string_dynamic_t_delete(status, rule.name); \
if (status == F_none) { \
- f_macro_string_dynamic_delete(status, rule.directory); \
+ f_macro_string_dynamic_t_delete(status, rule.directory); \
} \
if (status == F_none) { \
- f_macro_string_dynamic_delete(status, rule.address); \
+ f_macro_string_dynamic_t_delete(status, rule.address); \
} \
if (status == F_none) { \
rule.require = 0; \
}
#define destroy_init_rule(status, rule) \
- f_macro_string_dynamic_destroy(status, rule.name); \
+ f_macro_string_dynamic_t_destroy(status, rule.name); \
if (status == F_none) { \
- f_macro_string_dynamic_destroy(status, rule.directory); \
+ f_macro_string_dynamic_t_destroy(status, rule.directory); \
} \
if (status == F_none) { \
- f_macro_string_dynamic_destroy(status, rule.address); \
+ f_macro_string_dynamic_t_destroy(status, rule.address); \
} \
if (status == F_none) { \
rule.require = 0; \
rule.asynchronous = 0; \
}
-#endif // _di_init_data_
+#endif // _di_init_data_t_
// an array of dynamic strings
#ifndef _di_init_rules_
typedef struct {
init_rule *array; // the array of init_rule
- f_string_length size; // total amount of allocated space
- f_string_length used; // total number of allocated spaces used
+ f_string_length_t size; // total amount of allocated space
+ f_string_length_t used; // total number of allocated spaces used
} init_rules;
#define init_rules_initialize { 0, 0, 0 }
#define f_init_rules_resize(status, rules, new_length) \
status = F_none; \
if (new_length < rules.size) { \
- f_string_length i = rules.size - new_length; \
+ f_string_length_t i = rules.size - new_length; \
for (; i < rules.size; i++) { \
delete_init_rule(status, rules.array[i]); \
if (status != F_none) break; \
if (status == F_none) status = f_memory_resize((void **) & rules.array, sizeof(init_rule), rules.size, new_length); \
if (status == F_none) { \
if (new_length > rules.size) { \
- f_string_length i = rules.size; \
+ f_string_length_t i = rules.size; \
for (; i < new_length; i++) { \
- memset(&rules.array[i], 0, sizeof(f_string)); \
+ memset(&rules.array[i], 0, sizeof(f_string_t)); \
} \
} \
rules.size = new_length; \
#define f_init_rules_adjust(status, rules, new_length) \
status = F_none; \
if (new_length < rules.size) { \
- f_string_length i = rules.size - new_length; \
+ f_string_length_t i = rules.size - new_length; \
for (; i < rules.size; i++) { \
destroy_init_rule(status, rules.array[i]); \
if (status != F_none) break; \
if (status == F_none) status = f_memory_adjust((void **) & rules.array, sizeof(init_rule), rules.size, new_length); \
if (status == F_none) { \
if (new_length > rules.size) { \
- f_string_length i = rules.size; \
+ f_string_length_t i = rules.size; \
for (; i < new_length; i++) { \
memset(&rules.array[i], 0, sizeof(init_rule)); \
} \
#ifndef _di_init_category_
// category [name] = execute rules in the specified list called [name].
typedef struct {
- f_string_dynamic name;
+ f_string_dynamic_t name;
init_rule last;
} init_category;
#define init_category_initialize \
{ \
- f_string_dynamic_initialize, \
+ f_string_dynamic_t_initialize, \
init_rule_initialize, \
}
#define delete_init_category(status, category) \
- f_macro_string_dynamic_delete(status, category.name); \
+ f_macro_string_dynamic_t_delete(status, category.name); \
if (status == F_none) { \
delete_init_rule(status, category.last); \
}
#define destroy_init_category(status, category) \
- f_macro_string_dynamic_destroy(status, category.name); \
+ f_macro_string_dynamic_t_destroy(status, category.name); \
if (status == F_none) { \
destroy_init_rule(status, category.last); \
}
typedef struct {
init_category *array; // the array of init_category
- f_string_length size; // total amount of allocated space
- f_string_length used; // total number of allocated spaces used
+ f_string_length_t size; // total amount of allocated space
+ f_string_length_t used; // total number of allocated spaces used
} init_categorys;
#define init_categorys_initialize { 0, 0, 0 }
#define f_init_categorys_resize(status, categorys, new_length) \
status = F_none; \
if (new_length < categorys.size) { \
- f_string_length i = categorys.size - new_length; \
+ f_string_length_t i = categorys.size - new_length; \
for (; i < categorys.size; i++) { \
delete_init_category(status, categorys.array[i]); \
if (status != F_none) break; \
if (status == F_none) status = f_memory_resize((void **) & categorys.array, sizeof(init_category), categorys.size, new_length); \
if (status == F_none) { \
if (new_length > categorys.size) { \
- f_string_length i = categorys.size; \
+ f_string_length_t i = categorys.size; \
for (; i < new_length; i++) { \
- memset(&categorys.array[i], 0, sizeof(f_string)); \
+ memset(&categorys.array[i], 0, sizeof(f_string_t)); \
} \
} \
categorys.size = new_length; \
#define f_init_categorys_adjust(status, categorys, new_length) \
status = F_none; \
if (new_length < categorys.size) { \
- f_string_length i = categorys.size - new_length; \
+ f_string_length_t i = categorys.size - new_length; \
for (; i < categorys.size; i++) { \
destroy_init_category(status, categorys.array[i]); \
if (status != F_none) break; \
if (status == F_none) status = f_memory_adjust((void **) & categorys.array, sizeof(init_category), categorys.size, new_length); \
if (status == F_none) { \
if (new_length > categorys.size) { \
- f_string_length i = categorys.size; \
+ f_string_length_t i = categorys.size; \
for (; i < new_length; i++) { \
memset(&categorys.array[i], 0, sizeof(init_category)); \
} \
#ifndef _di_init_setting_
typedef struct {
- f_string socket_file;
+ f_string_t socket_file;
unsigned int socket_port;
unsigned int socket_id_target;
unsigned int socket_id_client;
#define init_setting_initialize \
{ \
- f_string_initialize, \
+ f_string_t_initialize, \
0, \
0, \
0, \
void *login_file;
void *login_port;
- init_data data;
+ init_data_t data;
init_setting setting;
} init_stack_memory;
#define init_path_processes_mounts init_paths_processes "mounts"
/*
#ifndef _di_init_rule_buffer_
- f_return_status init_rule_buffer(const init_data data, const f_string filename, f_string_dynamic *buffer, f_fss_objects *objects, f_fss_contents *contents) f_gcc_attribute_visibility_internal;
+ f_return_status init_rule_buffer(const init_data_t data, const f_string_t filename, f_string_dynamic_t *buffer, f_fss_objects_t *objects, f_fss_contents_t *contents) f_gcc_attribute_visibility_internal;
#endif // _di_init_rule_buffer_
#ifndef _di_init_handler_chif_string_dynamic_initializeld_services_
#endif // _di_init_prepare_init_
#ifndef _di_init_process_main_rule_
- f_return_status init_process_main_rule(const init_data data, f_string_dynamic *buffer, init_setting *setting) f_gcc_attribute_visibility_internal;
+ f_return_status init_process_main_rule(const init_data_t data, f_string_dynamic_t *buffer, init_setting *setting) f_gcc_attribute_visibility_internal;
#endif // _di_init_process_main_rule_
*/
#include "status_code.h"
-int main(const unsigned long argc, const f_string *argv) {
- const f_console_arguments arguments = { argc, argv };
- status_code_data data = status_code_data_initialize;
+int main(const unsigned long argc, const f_string_t *argv) {
+ const f_console_arguments_t arguments = { argc, argv };
+ status_code_data_t data = status_code_data_t_initialize;
if (f_pipe_input_exists()) {
data.process_pipe = F_true;
}
- f_status status = status_code_main(arguments, &data);
+ f_status_t status = status_code_main(arguments, &data);
if (F_status_is_error(status) || status == F_false) {
return 1;
#endif
#ifndef _di_status_code_process_check_
- f_return_status status_code_process_check(const status_code_data data, const f_string value) {
- f_number_unsigned number = 0;
- f_status status = status_code_convert_number(data, value, &number);
+ f_return_status status_code_process_check(const status_code_data_t data, const f_string_t value) {
+ f_number_unsigned_t number = 0;
+ f_status_t status = status_code_convert_number(data, value, &number);
if (F_status_is_error(status)) {
return status;
#endif // _di_status_code_process_check_
#ifndef _di_status_code_process_number_
- f_return_status status_code_process_number(const status_code_data data, const f_string value) {
- f_status status = F_none;
+ f_return_status status_code_process_number(const status_code_data_t data, const f_string_t value) {
+ f_status_t status = F_none;
{
- const f_string_range range = f_macro_string_range_initialize(strlen(value));
+ const f_string_range_t range = f_macro_string_range_initialize(strlen(value));
- f_number_unsigned number = 0;
+ f_number_unsigned_t number = 0;
status = fl_conversion_string_to_number_unsigned(value, &number, range);
}
}
- f_status code = F_none;
+ f_status_t code = F_none;
status = fll_status_from_string(value, &code);
#endif // _di_status_code_process_number_
#ifndef _di_status_code_process_normal_
- f_return_status status_code_process_normal(const status_code_data data, const f_string value) {
- f_number_unsigned number = 0;
- f_status status = status_code_convert_number(data, value, &number);
+ f_return_status status_code_process_normal(const status_code_data_t data, const f_string_t value) {
+ f_number_unsigned_t number = 0;
+ f_status_t status = status_code_convert_number(data, value, &number);
if (F_status_is_error(status)) {
return status;
}
- const f_status code = (f_status) number;
- f_string string = 0;
+ const f_status_t code = (f_status_t) number;
+ f_string_t string = 0;
status = fl_status_to_string(code, &string);
#endif // _di_status_code_process_normal_
#ifndef _di_status_code_convert_number_
- f_return_status status_code_convert_number(const status_code_data data, const f_string value, f_number_unsigned *number) {
- const f_string_range range = f_macro_string_range_initialize(strlen(value));
+ f_return_status status_code_convert_number(const status_code_data_t data, const f_string_t value, f_number_unsigned_t *number) {
+ const f_string_range_t range = f_macro_string_range_initialize(strlen(value));
- f_status status = fl_conversion_string_to_number_unsigned(value, number, range);
+ f_status_t status = fl_conversion_string_to_number_unsigned(value, number, range);
if (*number > F_status_size_max_with_signal) {
fl_color_print_line(f_type_output, data.context.error, data.context.reset, "out of range");
* @see fss_status_code_convert_number()
*/
#ifndef _di_status_code_process_check_
- extern f_return_status status_code_process_check(const status_code_data data, const f_string value) f_gcc_attribute_visibility_internal;
+ extern f_return_status status_code_process_check(const status_code_data_t data, const f_string_t value) f_gcc_attribute_visibility_internal;
#endif // _di_status_code_process_check_
/**
* @see fll_fss_status_from_string()
*/
#ifndef _di_status_code_process_number_
- extern f_return_status status_code_process_number(const status_code_data data, const f_string value) f_gcc_attribute_visibility_internal;
+ extern f_return_status status_code_process_number(const status_code_data_t data, const f_string_t value) f_gcc_attribute_visibility_internal;
#endif // _di_status_code_process_number_
/**
* @see fss_status_code_convert_number()
*/
#ifndef _di_status_code_process_normal_
- extern f_return_status status_code_process_normal(const status_code_data data, const f_string value) f_gcc_attribute_visibility_internal;
+ extern f_return_status status_code_process_normal(const status_code_data_t data, const f_string_t value) f_gcc_attribute_visibility_internal;
#endif // _di_status_code_process_normal_
/**
* @see fl_console_parameter_to_number_unsigned()
*/
#ifndef _di_status_code_convert_number_
- extern f_return_status status_code_convert_number(const status_code_data data, const f_string value, f_number_unsigned *number) f_gcc_attribute_visibility_internal;
+ extern f_return_status status_code_convert_number(const status_code_data_t data, const f_string_t value, f_number_unsigned_t *number) f_gcc_attribute_visibility_internal;
#endif // _di_status_code_convert_number_
#ifdef __cplusplus
#endif
#ifndef _di_status_code_print_help_
- f_return_status status_code_print_help(const fl_color_context context) {
+ f_return_status status_code_print_help(const fl_color_context_t context) {
fll_program_print_help_header(context, status_code_name_long, status_code_version);
fll_program_print_help_option(context, f_console_standard_short_help, f_console_standard_long_help, f_console_symbol_short_enable, f_console_symbol_long_enable, " Print this help message.");
#endif // _di_status_code_print_help_
#ifndef _di_status_code_main_
- f_return_status status_code_main(const f_console_arguments arguments, status_code_data *data) {
- f_status status = F_none;
+ f_return_status status_code_main(const f_console_arguments_t arguments, status_code_data_t *data) {
+ f_status_t status = F_none;
{
- f_console_parameters parameters = { data->parameters, status_code_total_parameters };
- f_console_parameter_id ids[3] = { status_code_parameter_no_color, status_code_parameter_light, status_code_parameter_dark };
- f_console_parameter_ids choices = { ids, 3 };
+ f_console_parameters_t parameters = { data->parameters, status_code_total_parameters };
+ f_console_parameter_id_t ids[3] = { status_code_parameter_no_color, status_code_parameter_light, status_code_parameter_dark };
+ f_console_parameter_ids_t choices = { ids, 3 };
status = fll_program_parameter_process(arguments, parameters, choices, F_true, &data->remaining, &data->context);
return F_status_set_error(F_parameter);
}
- f_status status2 = F_none;
+ f_status_t status2 = F_none;
if (data->parameters[status_code_parameter_is_error].result == f_console_result_found || data->parameters[status_code_parameter_is_warning].result == f_console_result_found || data->parameters[status_code_parameter_is_fine].result == f_console_result_found) {
if (data->process_pipe) {
}
if (data->remaining.used > 0) {
- for (f_array_length i = 0; i < data->remaining.used; i++) {
+ for (f_array_length_t i = 0; i < data->remaining.used; i++) {
status2 = status_code_process_check(*data, arguments.argv[data->remaining.array[i]]);
if (F_status_is_error(status2) && status == F_none) {
}
if (data->remaining.used > 0) {
- for (f_array_length i = 0; i < data->remaining.used; i++) {
+ for (f_array_length_t i = 0; i < data->remaining.used; i++) {
status2 = status_code_process_number(*data, arguments.argv[data->remaining.array[i]]);
if (F_status_is_error(status2) && status == F_none) {
}
if (data->remaining.used > 0) {
- for (f_array_length i = 0; i < data->remaining.used; i++) {
+ for (f_array_length_t i = 0; i < data->remaining.used; i++) {
status2 = status_code_process_normal(*data, arguments.argv[data->remaining.array[i]]);
if (F_status_is_error(status2) && status == F_none) {
#endif // _di_status_code_main_
#ifndef _di_status_code_delete_data_
- f_return_status status_code_delete_data(status_code_data *data) {
- f_string_length i = 0;
+ f_return_status status_code_delete_data(status_code_data_t *data) {
+ f_string_length_t i = 0;
while (i < status_code_total_parameters) {
- f_macro_string_lengths_delete_simple(data->parameters[i].locations);
- f_macro_string_lengths_delete_simple(data->parameters[i].additional);
+ f_macro_string_lengths_t_delete_simple(data->parameters[i].locations);
+ f_macro_string_lengths_t_delete_simple(data->parameters[i].additional);
i++;
} // while
- f_macro_string_lengths_delete_simple(data->remaining);
- fl_macro_color_context_delete_simple(data->context);
+ f_macro_string_lengths_t_delete_simple(data->remaining);
+ fl_macro_color_context_t_delete_simple(data->context);
return F_none;
}
status_code_parameter_number,
};
- #define f_console_parameter_initialize_status_code \
+ #define status_code_console_parameter_t_initialize \
{ \
- f_console_parameter_initialize(f_console_standard_short_help, f_console_standard_long_help, 0, F_false, f_console_type_normal), \
- f_console_parameter_initialize(f_console_standard_short_light, f_console_standard_long_light, 0, F_false, f_console_type_inverse), \
- f_console_parameter_initialize(f_console_standard_short_dark, f_console_standard_long_dark, 0, F_false, f_console_type_inverse), \
- f_console_parameter_initialize(f_console_standard_short_no_color, f_console_standard_long_no_color, 0, F_false, f_console_type_inverse), \
- f_console_parameter_initialize(f_console_standard_short_version, f_console_standard_long_version, 0, F_false, f_console_type_inverse), \
- f_console_parameter_initialize(status_code_short_is_fine, status_code_long_is_fine, 0, F_false, f_console_type_normal), \
- f_console_parameter_initialize(status_code_short_is_warning, status_code_long_is_warning, 0, F_false, f_console_type_normal), \
- f_console_parameter_initialize(status_code_short_is_error, status_code_long_is_error, 0, F_false, f_console_type_normal), \
- f_console_parameter_initialize(status_code_short_number, status_code_long_number, 0, F_false, f_console_type_normal), \
+ f_console_parameter_t_initialize(f_console_standard_short_help, f_console_standard_long_help, 0, F_false, f_console_type_normal), \
+ f_console_parameter_t_initialize(f_console_standard_short_light, f_console_standard_long_light, 0, F_false, f_console_type_inverse), \
+ f_console_parameter_t_initialize(f_console_standard_short_dark, f_console_standard_long_dark, 0, F_false, f_console_type_inverse), \
+ f_console_parameter_t_initialize(f_console_standard_short_no_color, f_console_standard_long_no_color, 0, F_false, f_console_type_inverse), \
+ f_console_parameter_t_initialize(f_console_standard_short_version, f_console_standard_long_version, 0, F_false, f_console_type_inverse), \
+ f_console_parameter_t_initialize(status_code_short_is_fine, status_code_long_is_fine, 0, F_false, f_console_type_normal), \
+ f_console_parameter_t_initialize(status_code_short_is_warning, status_code_long_is_warning, 0, F_false, f_console_type_normal), \
+ f_console_parameter_t_initialize(status_code_short_is_error, status_code_long_is_error, 0, F_false, f_console_type_normal), \
+ f_console_parameter_t_initialize(status_code_short_number, status_code_long_number, 0, F_false, f_console_type_normal), \
}
#define status_code_total_parameters 9
#endif // _di_status_code_defines_
-#ifndef _di_status_code_data_
+#ifndef _di_status_code_data_t_
typedef struct {
- f_console_parameter parameters[status_code_total_parameters];
+ f_console_parameter_t parameters[status_code_total_parameters];
- f_string_lengths remaining;
+ f_string_lengths_t remaining;
bool process_pipe;
- fl_color_context context;
- } status_code_data;
+ fl_color_context_t context;
+ } status_code_data_t;
- #define status_code_data_initialize \
+ #define status_code_data_t_initialize \
{ \
- f_console_parameter_initialize_status_code, \
- f_string_lengths_initialize, \
+ status_code_console_parameter_t_initialize, \
+ f_string_lengths_t_initialize, \
F_false, \
- fl_color_context_initialize, \
+ fl_color_context_t_initialize, \
}
-#endif // _di_status_code_data_
+#endif // _di_status_code_data_t_
/**
* Print help to standard output.
* F_none on success.
*/
#ifndef _di_status_code_print_help_
- extern f_return_status status_code_print_help(const fl_color_context context);
+ extern f_return_status status_code_print_help(const fl_color_context_t context);
#endif // _di_status_code_print_help_
/**
* @see status_code_delete_data()
*/
#ifndef _di_status_code_main_
- extern f_return_status status_code_main(const f_console_arguments arguments, status_code_data *data);
+ extern f_return_status status_code_main(const f_console_arguments_t arguments, status_code_data_t *data);
#endif // _di_status_code_main_
/**
* @see status_code_main()
*/
#ifndef _di_status_code_delete_data_
- extern f_return_status status_code_delete_data(status_code_data *data);
+ extern f_return_status status_code_delete_data(status_code_data_t *data);
#endif // _di_status_code_delete_data_
#ifdef __cplusplus