Change the behavior so that fewer arguments are needed for color printing.
This introduces a structure where the color codes are now in sets of "before" and "after".
This set of two color codes are now passed to the color print functions, thereby reducing the number of arguments needed.
#define f_color_mode_light 3
#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_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_t;
-
- #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_t_
- typedef struct {
- const int8_t *error;
- const int8_t *message;
- const int8_t *warning;
- const int8_t *strong_error;
- const int8_t *strong_message;
- const int8_t *strong_warning;
- } f_color_standard_io_t;
-
- #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'.
- * command = color for a specific command, such as '-h'.
- * comment = not quite important text, but still should be seen.
- * emphasize = make sure something stands out to emphasize it.
- * standard = the normal text color.
- * syntax = color for syntax, such as '[' and '<'.
- * title = name printed.
- * topic = topic such as 'Usage'.
- * version = version printed.
- */
-#ifndef _di_f_color_help_t_
- typedef struct {
- const int8_t *alert;
- const int8_t *command;
- const int8_t *comment;
- const int8_t *emphasize;
- const int8_t *standard;
- const int8_t *syntax;
- const int8_t *title;
- const int8_t *topic;
- const int8_t *version;
- } f_color_help_t;
-
- #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_t_
typedef struct {
const int8_t *begin;
#define f_color_format_t_initialize_linux { "\033[", "m", ";" }
#define f_color_format_t_initialize_xterminal { "\033[", "m", ";" }
+
+ #define f_macro_color_format_t_clear(format) \
+ format.begin = 0; \
+ format.end = 0; \
+ format.medium = 0;
+
+ #define f_macro_color_format_t_set_linux(format) \
+ format.begin = "\033["; \
+ format.end = "m"; \
+ format.medium = ";";
+
+ #define f_macro_color_format_t_set_xterminal(format) \
+ format.begin = "\033["; \
+ format.end = "m"; \
+ format.medium = ";";
#endif // _di_f_color_format_t_
/**
#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" }
+
+ #define f_macro_color_t_clear(color) \
+ color.reset = 0; \
+ color.bold = 0; \
+ color.underline = 0; \
+ color.blink = 0; \
+ color.reverse = 0; \
+ color.conceal = 0; \
+ color.black = 0; \
+ color.red = 0; \
+ color.green = 0; \
+ color.yellow = 0; \
+ color.blue = 0; \
+ color.purple = 0; \
+ color.teal = 0; \
+ color.white = 0; \
+ color.black_bg = 0; \
+ color.red_bg = 0; \
+ color.green_bg = 0; \
+ color.yellow_bg = 0; \
+ color.blue_bg = 0; \
+ color.purple_bg = 0; \
+ color.teal_bg = 0; \
+ color.white_bg = 0; \
+ color.bright_black = 0; \
+ color.bright_red = 0; \
+ color.bright_green = 0; \
+ color.bright_yellow = 0; \
+ color.bright_blue = 0; \
+ color.bright_purple = 0; \
+ color.bright_teal = 0; \
+ color.bright_white = 0; \
+ color.bright_black_bg = 0; \
+ color.bright_red_bg = 0; \
+ color.bright_green_bg = 0; \
+ color.bright_yellow_bg = 0; \
+ color.bright_blue_bg = 0; \
+ color.bright_purple_bg = 0; \
+ color.bright_teal_bg = 0; \
+ color.bright_white_bg = 0;
+
+ #define f_macro_color_t_set_linux(color) \
+ color.reset = "0"; \
+ color.bold = "1"; \
+ color.underline = "4"; \
+ color.blink = "5"; \
+ color.reverse = "7"; \
+ color.conceal = "8"; \
+ color.black = "30"; \
+ color.red = "31"; \
+ color.green = "32"; \
+ color.yellow = "33"; \
+ color.blue = "34"; \
+ color.purple = "35"; \
+ color.teal = "36"; \
+ color.white = "37"; \
+ color.black_bg = "40"; \
+ color.red_bg = "41"; \
+ color.green_bg = "42"; \
+ color.yellow_bg = "43"; \
+ color.blue_bg = "44"; \
+ color.purple_bg = "45"; \
+ color.teal_bg = "46"; \
+ color.white_bg = "47"; \
+ color.bright_black = "30"; \
+ color.bright_red = "31"; \
+ color.bright_green = "32"; \
+ color.bright_yellow = "33"; \
+ color.bright_blue = "34"; \
+ color.bright_purple = "35"; \
+ color.bright_teal = "36"; \
+ color.bright_white = "37"; \
+ color.bright_black_bg = "40"; \
+ color.bright_red_bg = "41"; \
+ color.bright_green_bg = "42"; \
+ color.bright_yellow_bg = "43"; \
+ color.bright_blue_bg = "44"; \
+ color.bright_purple_bg = "45"; \
+ color.bright_teal_bg = "46"; \
+ color.bright_white_bg = "47";
+
+ #define f_macro_color_t_set_xterminal(color) \
+ color.reset = "0"; \
+ color.bold = "1"; \
+ color.underline = "4"; \
+ color.blink = "5"; \
+ color.reverse = "7"; \
+ color.conceal = "8"; \
+ color.black = "30"; \
+ color.red = "31"; \
+ color.green = "32"; \
+ color.yellow = "33"; \
+ color.blue = "34"; \
+ color.purple = "35"; \
+ color.teal = "36"; \
+ color.white = "37"; \
+ color.black_bg = "40"; \
+ color.red_bg = "41"; \
+ color.green_bg = "42"; \
+ color.yellow_bg = "43"; \
+ color.blue_bg = "44"; \
+ color.purple_bg = "45"; \
+ color.teal_bg = "46"; \
+ color.white_bg = "47"; \
+ color.bright_black = "90"; \
+ color.bright_red = "91"; \
+ color.bright_green = "92"; \
+ color.bright_yellow = "93"; \
+ color.bright_blue = "94"; \
+ color.bright_purple= "95"; \
+ color.bright_teal = "96"; \
+ color.bright_white = "97"; \
+ color.bright_black_bg = "100"; \
+ color.bright_red_bg = "101"; \
+ color.bright_green_bg = "102"; \
+ color.bright_yellow_bg = "103"; \
+ color.bright_blue_bg = "104"; \
+ color.bright_purple_bg = "105"; \
+ color.bright_teal_bg = "106"; \
+ color.bright_white_bg = "107";
#endif // _di_f_color_t_
/**
- * Provide global default global instances of f_color_t structures.
+ * Provide a set of two colors, a before and an after.
*
- * Supported instances:
- * - f_color_format_linux: ideal for linux console.
- * - f_color_format_xterminal: ideal for linux x-terminal.
+ * This is intended to be used for printing, such that the printed code is prefixed with the "before" and postfixed with the "after".
+ *
+ * before: A pointer to the dynamic string representing the before color to assign, set to NULL to disable.
+ * after: A pointer to the dynamic string representing the after color to assign, set to NULL to disable.
*/
-#ifndef _di_f_color_default_
- 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;
+#ifndef _di_f_color_set_t_
+ typedef struct {
+ const f_string_dynamic_t *before;
+ const f_string_dynamic_t *after;
+ } f_color_set_t;
+
+ #define f_color_set_t_initialize { 0, 0 }
+
+ #define f_macro_color_set_t_clear(set) \
+ set.before = 0; \
+ set.after = 0;
+#endif // _di_f_color_set_t_
+
+/**
+ * Provide a set of color contexts.
+ *
+ * This is intended to be used for printing, such that the printed code is prefixed with the "before" and postfixed with the "after", for each context.
+ *
+ * warning: Color context associated with "warning".
+ * error: Color context associated with "error".
+ * title: Color context associated with "title".
+ * notable: Color context associated with "notable".
+ * important: Color context associated with "important".
+ * standout: Color context associated with "standout".
+ * normal: Color context associated with "normal".
+ * normal_reset: Color context associated with "normal_reset".
+ */
+#ifndef _di_f_color_set_context_t_
+ typedef struct {
+ f_color_set_t warning;
+ f_color_set_t error;
+ f_color_set_t title;
+ f_color_set_t notable;
+ f_color_set_t important;
+ f_color_set_t standout;
+ f_color_set_t normal;
+ f_color_set_t normal_reset;
+ } f_color_set_context_t;
+
+ #define f_color_set_context_t_initialize { f_color_set_t_initialize, f_color_set_t_initialize, f_color_set_t_initialize, f_color_set_t_initialize, f_color_set_t_initialize, f_color_set_t_initialize, f_color_set_t_initialize, f_color_set_t_initialize }
+
+ #define f_macro_color_set_context_t_clear(set) \
+ f_macro_color_set_t_clear(set.warning); \
+ f_macro_color_set_t_clear(set.error); \
+ f_macro_color_set_t_clear(set.title); \
+ f_macro_color_set_t_clear(set.notable); \
+ f_macro_color_set_t_clear(set.important); \
+ f_macro_color_set_t_clear(set.standout); \
+ f_macro_color_set_t_clear(set.normal); \
+ f_macro_color_set_t_clear(set.normal_reset);
+
+#endif // _di_f_color_set_context_t_
+
+/**
+ * Provide a color context structure.
+ *
+ * This is intended to be used for printing, and this provides a management structure for all color context related data.
+ *
+ * list: A list of colors, each with their specific color code string.
+ * format: The color code formatting strings.
+ * mode: A code representing the color mode.
+ * set: A collection of color context sets for direct use in color printing.
+ * warning: Color context associated with "warning".
+ * error: Color context associated with "error".
+ * title: Color context associated with "title".
+ * notable: Color context associated with "notable".
+ * important: Color context associated with "important".
+ * standout: Color context associated with "standout".
+ * normal: Color context associated with "normal".
+ * normal_reset: Color context associated with "normal_reset".
+ */
+#ifndef _di_f_color_context_t_
+ typedef struct {
+ f_color_t list;
+ f_color_format_t format;
+ f_color_mode_t mode;
+ f_color_set_context_t set;
+ 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;
+ } f_color_context_t;
+
+ #define f_color_context_t_initialize { f_color_t_initialize_linux, f_color_format_t_initialize_linux, f_color_mode_none, f_color_set_context_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 f_macro_color_context_t_clear(context) \
+ f_macro_color_t_clear(context.list); \
+ f_macro_color_format_t_clear(context.format); \
+ context.mode = f_color_mode_none; \
+ f_macro_color_set_context_t_clear(context.set); \
+ f_macro_string_dynamic_t_clear(context.error); \
+ f_macro_string_dynamic_t_clear(context.title); \
+ f_macro_string_dynamic_t_clear(context.notable); \
+ f_macro_string_dynamic_t_clear(context.important); \
+ f_macro_string_dynamic_t_clear(context.standout); \
+ f_macro_string_dynamic_t_clear(context.normal); \
+ f_macro_string_dynamic_t_clear(context.normal_reset);
+
+ #define f_macro_color_context_t_new(status, context) \
+ f_macro_string_dynamic_t_new(status, context.reset, f_color_max_size + 1); \
+ if (F_status_is_error_not(status)) f_macro_string_dynamic_t_new(status, context.warning, f_color_max_size + 1); \
+ if (F_status_is_error_not(status)) f_macro_string_dynamic_t_new(status, context.error, f_color_max_size + 1); \
+ if (F_status_is_error_not(status)) f_macro_string_dynamic_t_new(status, context.title, f_color_max_size + 1); \
+ if (F_status_is_error_not(status)) f_macro_string_dynamic_t_new(status, context.notable, f_color_max_size + 1); \
+ if (F_status_is_error_not(status)) f_macro_string_dynamic_t_new(status, context.important, f_color_max_size + 1); \
+ if (F_status_is_error_not(status)) f_macro_string_dynamic_t_new(status, context.standout, f_color_max_size + 1); \
+ if (F_status_is_error_not(status)) f_macro_string_dynamic_t_new(status, context.normal, f_color_max_size + 1); \
+ if (F_status_is_error_not(status)) f_macro_string_dynamic_t_new(status, context.normal_reset, f_color_max_size + 1);
+
+ #define f_macro_color_context_t_delete(status, context) \
+ f_macro_string_dynamic_t_delete(status, context.reset); \
+ if (F_status_is_error_not(status)) f_macro_string_dynamic_t_delete(status, context.warning); \
+ if (F_status_is_error_not(status)) f_macro_string_dynamic_t_delete(status, context.error); \
+ if (F_status_is_error_not(status)) f_macro_string_dynamic_t_delete(status, context.title); \
+ if (F_status_is_error_not(status)) f_macro_string_dynamic_t_delete(status, context.notable); \
+ if (F_status_is_error_not(status)) f_macro_string_dynamic_t_delete(status, context.important); \
+ if (F_status_is_error_not(status)) f_macro_string_dynamic_t_delete(status, context.standout); \
+ if (F_status_is_error_not(status)) f_macro_string_dynamic_t_delete(status, context.normal); \
+ if (F_status_is_error_not(status)) f_macro_string_dynamic_t_delete(status, context.normal_reset); \
+ if (F_status_is_error_not(status)) f_macro_color_context_t_clear(context);
+
+ #define f_macro_color_context_t_destroy(status, context, size) \
+ f_macro_string_dynamic_t_destroy(status, context.reset); \
+ if (F_status_is_error_not(status)) f_macro_string_dynamic_t_destroy(status, context.warning, size); \
+ if (F_status_is_error_not(status)) f_macro_string_dynamic_t_destroy(status, context.error, size); \
+ if (F_status_is_error_not(status)) f_macro_string_dynamic_t_destroy(status, context.title, size); \
+ if (F_status_is_error_not(status)) f_macro_string_dynamic_t_destroy(status, context.notable, size); \
+ if (F_status_is_error_not(status)) f_macro_string_dynamic_t_destroy(status, context.important, size); \
+ if (F_status_is_error_not(status)) f_macro_string_dynamic_t_destroy(status, context.standout, size); \
+ if (F_status_is_error_not(status)) f_macro_string_dynamic_t_destroy(status, context.normal); \
+ if (F_status_is_error_not(status)) f_macro_string_dynamic_t_destroy(status, context.normal_reset); \
+ if (F_status_is_error_not(status)) f_macro_color_context_t_clear(context);
+
+ #define f_macro_color_context_t_delete_simple(context) \
+ f_macro_string_dynamic_t_delete_simple(context.reset); \
+ f_macro_string_dynamic_t_delete_simple(context.warning); \
+ f_macro_string_dynamic_t_delete_simple(context.error); \
+ f_macro_string_dynamic_t_delete_simple(context.title); \
+ f_macro_string_dynamic_t_delete_simple(context.notable); \
+ f_macro_string_dynamic_t_delete_simple(context.important); \
+ f_macro_string_dynamic_t_delete_simple(context.standout); \
+ f_macro_string_dynamic_t_delete_simple(context.normal); \
+ f_macro_string_dynamic_t_delete_simple(context.normal_reset); \
+ f_macro_color_context_t_clear(context);
- 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_
+ #define f_macro_color_context_t_destroy_simple(context, size) \
+ f_macro_string_dynamic_t_destroy_simple(context.reset); \
+ f_macro_string_dynamic_t_destroy_simple(context.warning, size); \
+ f_macro_string_dynamic_t_destroy_simple(context.error, size); \
+ f_macro_string_dynamic_t_destroy_simple(context.title, size); \
+ f_macro_string_dynamic_t_destroy_simple(context.notable, size); \
+ f_macro_string_dynamic_t_destroy_simple(context.important, size); \
+ f_macro_string_dynamic_t_destroy_simple(context.standout, size); \
+ f_macro_string_dynamic_t_destroy_simple(context.normal); \
+ f_macro_string_dynamic_t_destroy_simple(context.normal_reset); \
+ f_macro_color_context_t_clear(context);
+#endif // _di_fl_color_context_t_
#ifdef __cplusplus
} // extern "C"
* F_false if the character in the buffer is not a graph character.
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors from (with error bit): f_utf_is_graph().
+ * Errors (with error bit) from: f_utf_is_graph().
*
* @see f_utf_is_graph()
*/
* F_false if the character in the buffer is not a space character.
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors from (with error bit): f_utf_is_control().
- * Errors from (with error bit): f_utf_is_whitespace().
+ * Errors (with error bit) from: f_utf_is_control().
+ * Errors (with error bit) from: f_utf_is_whitespace().
*
* @see f_utf_is_control()
* @see f_utf_is_whitespace()
* F_false if the character in the buffer is not a space character.
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors from (with error bit): f_utf_is_control().
- * Errors from (with error bit): f_utf_is_whitespace().
+ * Errors (with error bit) from: f_utf_is_control().
+ * Errors (with error bit) from: f_utf_is_whitespace().
*
* @see f_utf_is_zero_width()
*/
* F_incomplete_utf_stop (with error bit) if unable to get entire UTF-8 sequence due to stop point reached.
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors from (with error bit): f_utf_is_control().
- * Errors from (with error bit): f_utf_is_whitespace().
- * Errors from (with error bit): f_utf_is_zero_width().
+ * Errors (with error bit) from: f_utf_is_control().
+ * Errors (with error bit) from: f_utf_is_whitespace().
+ * Errors (with error bit) from: f_utf_is_zero_width().
*
* @see f_utf_is_control()
* @see f_utf_is_whitespace()
* F_incomplete_utf_stop (with error bit) if unable to get entire UTF-8 sequence due to stop point reached.
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors from (with error bit): f_utf_is_graph().
- * Errors from (with error bit): f_utf_is_zero_width().
+ * Errors (with error bit) from: f_utf_is_graph().
+ * Errors (with error bit) from: f_utf_is_zero_width().
*
* @see f_utf_is_graph()
* @see f_utf_is_zero_width()
* F_false on success and string is not a valid object name.
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors from (with error bit): f_utf_is_word().
+ * Errors (with error bit) from: f_utf_is_word().
*/
#ifndef _di_f_iki_object_is_
extern f_return_status f_iki_object_is(const f_string_static_t object);
* F_false on success and string is not a valid object name.
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors from (with error bit): f_utf_is_word().
+ * Errors (with error bit) from: f_utf_is_word().
*/
#ifndef _di_f_iki_object_partial_is_
extern f_return_status f_iki_object_partial_is(const f_string_static_t object, const f_string_range_t range);
#endif // _di_f_array_t_length_printf_
/**
- * define the basic string type.
+ * Define the basic string type.
+ *
+ * Dynamic allocation macros are provided, but it is recommended to utilize the f_string_dynamic_t for dynamic allocation.
*/
#ifndef _di_f_string_t_
typedef char *f_string_t;
#endif // _di_fl_color_save_
#ifndef _di_fl_color_print_
- 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, ...) {
+ f_return_status fl_color_print(FILE *file, const f_color_set_t set, const f_string_t string, ...) {
#ifndef _di_level_1_parameter_checking_
if (file == 0) return F_status_set_error(F_parameter);
if (string == 0) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- if (start_color.used) {
- f_status_t status = f_print_dynamic(file, start_color);
+ if (set.before) {
+ f_status_t status = f_print_dynamic(file, *set.before);
if (F_status_is_error(status)) return status;
}
va_end(ap);
- if (end_color.used) {
- f_status_t status = f_print_dynamic(file, end_color);
+ if (set.after) {
+ f_status_t status = f_print_dynamic(file, *set.after);
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_t start_color, const f_string_static_t extra_color, const f_string_static_t end_color, const f_string_t string, ...) {
+ f_return_status fl_color_print2(FILE *file, const f_color_set_t set, const f_color_set_t extra, const f_string_t string, ...) {
#ifndef _di_level_1_parameter_checking_
if (file == 0) return F_status_set_error(F_parameter);
if (string == 0) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- if (start_color.used) {
- f_status_t status = f_print_dynamic(file, start_color);
+ f_status_t status = F_none;
+
+ if (set.before) {
+ status = f_print_dynamic(file, *set.before);
if (F_status_is_error(status)) return status;
+ }
- status = f_print_dynamic(file, extra_color);
+ if (extra.before) {
+ status = f_print_dynamic(file, *extra.before);
if (F_status_is_error(status)) return status;
}
va_end(ap);
- if (end_color.used) {
- f_status_t status = f_print_dynamic(file, end_color);
+ if (set.after) {
+ status = f_print_dynamic(file, *set.after);
+ if (F_status_is_error(status)) return status;
+ }
+
+ if (extra.after) {
+ status = f_print_dynamic(file, *extra.after);
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_t start_color, const f_string_static_t end_color, const f_string_t string, ...) {
+ f_return_status fl_color_print_line(FILE *file, const f_color_set_t set, const f_string_t string, ...) {
#ifndef _di_level_1_parameter_checking_
if (file == 0) return F_status_set_error(F_parameter);
if (string == 0) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- if (start_color.used) {
- f_status_t status = f_print_dynamic(file, start_color);
+ if (set.before) {
+ f_status_t status = f_print_dynamic(file, *set.before);
if (F_status_is_error(status)) return status;
}
va_end(ap);
- if (end_color.used) {
- f_status_t status = f_print_dynamic(file, end_color);
+ if (set.after) {
+ f_status_t status = f_print_dynamic(file, *set.after);
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_t start_color, const f_string_static_t extra_color, const f_string_static_t end_color, const f_string_t string, ...) {
+ f_return_status fl_color_print2_line(FILE *file, const f_color_set_t set, const f_color_set_t extra, const f_string_t string, ...) {
#ifndef _di_level_1_parameter_checking_
if (file == 0) return F_status_set_error(F_parameter);
if (string == 0) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- if (start_color.used) {
- f_status_t status = f_print_dynamic(file, start_color);
+ f_status_t status = F_none;
+
+ if (set.before) {
+ status = f_print_dynamic(file, *set.before);
if (F_status_is_error(status)) return status;
+ }
- status = f_print_dynamic(file, extra_color);
+ if (extra.before) {
+ status = f_print_dynamic(file, *extra.before);
if (F_status_is_error(status)) return status;
}
va_end(ap);
- if (end_color.used) {
- f_status_t status = f_print_dynamic(file, end_color);
+ if (set.after) {
+ status = f_print_dynamic(file, *set.after);
+ if (F_status_is_error(status)) return status;
+ }
+
+ if (extra.after) {
+ status = f_print_dynamic(file, *extra.after);
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_t *context, const bool use_light_colors) {
+ f_return_status fl_color_load_context(f_color_context_t *context, const bool use_light_colors) {
#ifndef _di_level_1_parameter_checking_
if (context == 0) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
int8_t *environment = getenv("TERM");
if (!environment || strncmp(environment, "linux", 6) == 0) {
- context->color_list = f_color_linux;
+ f_macro_color_t_set_linux(context->list);
}
else {
- context->color_list = f_color_xterminal;
+ f_macro_color_t_set_xterminal(context->list);
}
}
- // load the colors
+ status = fl_macro_color_save_1(&context->reset, context->format, context->list.reset);
+
+ if (F_status_is_error_not(status)) {
+ status = fl_macro_color_save_1(&context->warning, context->format, context->list.yellow);
+ }
+
+ if (F_status_is_error_not(status)) {
+ status = fl_macro_color_save_2(&context->error, context->format, context->list.bold, context->list.red);
+ }
+
+ if (F_status_is_error_not(status)) {
+ status = fl_macro_color_save_1(&context->notable, context->format, context->list.bold);
+ }
+
+ if (F_status_is_error_not(status)) {
+ status = fl_macro_color_save_1(&context->standout, context->format, context->list.purple);
+ }
+
if (use_light_colors) {
- status = fl_macro_color_save_1(&context->reset, context->color_format, context->color_list.reset);
+ if (F_status_is_error_not(status)) {
+ status = fl_macro_color_save_2(&context->title, context->format, context->list.bold, context->list.blue);
+ }
- if (F_status_is_error_not(status)) status = fl_macro_color_save_1(&context->warning, context->color_format, context->color_list.yellow);
- if (F_status_is_error_not(status)) status = fl_macro_color_save_2(&context->error, context->color_format, context->color_list.bold, context->color_list.red);
- if (F_status_is_error_not(status)) status = fl_macro_color_save_2(&context->title, context->color_format, context->color_list.bold, context->color_list.blue);
- if (F_status_is_error_not(status)) status = fl_macro_color_save_1(&context->notable, context->color_format, context->color_list.bold);
- if (F_status_is_error_not(status)) status = fl_macro_color_save_1(&context->important, context->color_format, context->color_list.blue);
- if (F_status_is_error_not(status)) status = fl_macro_color_save_1(&context->standout, context->color_format, context->color_list.purple);
+ if (F_status_is_error_not(status)) {
+ status = fl_macro_color_save_1(&context->important, context->format, context->list.blue);
+ }
- context->mode = f_color_mode_light;
+ if (F_status_is_error_not(status)) {
+ context->mode = f_color_mode_light;
+ }
+
+ if (F_status_is_error_not(status)) {
+ status = fl_macro_color_save_1(&context->standout, context->format, context->list.purple);
+ }
}
else {
- status = fl_macro_color_save_1(&context->reset, context->color_format, context->color_list.reset);
+ if (F_status_is_error_not(status)) {
+ status = fl_macro_color_save_2(&context->title, context->format, context->list.bold, context->list.yellow);
+ }
+
+ if (F_status_is_error_not(status)) {
+ status = fl_macro_color_save_2(&context->important, context->format, context->list.bold, context->list.green);
+ }
+
+ if (F_status_is_error_not(status)) {
+ context->mode = f_color_mode_dark;
+ }
+
+ if (F_status_is_error_not(status)) {
+ status = fl_macro_color_save_1(&context->standout, context->format, context->list.green);
+ }
+ }
+
+ if (F_status_is_error_not(status)) {
+ context->set.warning.before = &context->warning;
+ context->set.warning.after = &context->reset;
+
+ context->set.error.before = &context->error;
+ context->set.error.after = &context->reset;
+
+ context->set.title.before = &context->title;
+ context->set.title.after = &context->reset;
+
+ context->set.notable.before = &context->notable;
+ context->set.notable.after = &context->reset;
+
+ context->set.important.before = &context->important;
+ context->set.important.after = &context->reset;
+
+ context->set.standout.before = &context->standout;
+ context->set.standout.after = &context->reset;
+
+ context->set.normal.before = &context->normal;
+ context->set.normal.after = &context->reset;
- if (F_status_is_error_not(status)) status = fl_macro_color_save_1(&context->warning, context->color_format, context->color_list.yellow);
- if (F_status_is_error_not(status)) status = fl_macro_color_save_2(&context->error, context->color_format, context->color_list.bold, context->color_list.red);
- if (F_status_is_error_not(status)) status = fl_macro_color_save_2(&context->title, context->color_format, context->color_list.bold, context->color_list.yellow);
- if (F_status_is_error_not(status)) status = fl_macro_color_save_1(&context->notable, context->color_format, context->color_list.bold);
- if (F_status_is_error_not(status)) status = fl_macro_color_save_2(&context->important, context->color_format, context->color_list.bold, context->color_list.green);
- if (F_status_is_error_not(status)) status = fl_macro_color_save_1(&context->standout, context->color_format, context->color_list.green);
+ context->set.warning.before = &context->warning;
+ context->set.warning.after = &context->reset;
- context->mode = f_color_mode_dark;
+ context->set.normal_reset.before = &context->normal_reset;
+ context->set.normal_reset.after = &context->reset;
}
return status;
extern "C" {
#endif
-#ifndef _di_fl_color_context_t_
- typedef struct {
- 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_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_t_new(status, color_context) \
- f_macro_string_dynamic_t_new(status, color_context.reset, f_color_max_size + 1); \
- if (F_status_is_error_not(status)) f_macro_string_dynamic_t_resize(status, color_context.warning, f_color_max_size + 1); \
- if (F_status_is_error_not(status)) f_macro_string_dynamic_t_resize(status, color_context.error, f_color_max_size + 1); \
- if (F_status_is_error_not(status)) f_macro_string_dynamic_t_resize(status, color_context.title, f_color_max_size + 1); \
- if (F_status_is_error_not(status)) f_macro_string_dynamic_t_resize(status, color_context.notable, f_color_max_size + 1); \
- if (F_status_is_error_not(status)) f_macro_string_dynamic_t_resize(status, color_context.important, f_color_max_size + 1); \
- if (F_status_is_error_not(status)) f_macro_string_dynamic_t_resize(status, color_context.standout, f_color_max_size + 1); \
- if (F_status_is_error_not(status)) f_macro_string_dynamic_t_resize(status, color_context.normal, f_color_max_size + 1); \
- if (F_status_is_error_not(status)) f_macro_string_dynamic_t_resize(status, color_context.normal_reset, f_color_max_size + 1);
-
- #define fl_macro_color_context_t_delete(status, color_context) \
- f_macro_string_dynamic_t_delete(status, color_context.reset); \
- if (F_status_is_error_not(status)) f_macro_string_dynamic_t_delete(status, color_context.warning); \
- if (F_status_is_error_not(status)) f_macro_string_dynamic_t_delete(status, color_context.error); \
- if (F_status_is_error_not(status)) f_macro_string_dynamic_t_delete(status, color_context.title); \
- if (F_status_is_error_not(status)) f_macro_string_dynamic_t_delete(status, color_context.notable); \
- if (F_status_is_error_not(status)) f_macro_string_dynamic_t_delete(status, color_context.important); \
- if (F_status_is_error_not(status)) f_macro_string_dynamic_t_delete(status, color_context.standout); \
- if (F_status_is_error_not(status)) f_macro_string_dynamic_t_delete(status, color_context.normal); \
- if (F_status_is_error_not(status)) f_macro_string_dynamic_t_delete(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_error_not(status)) f_macro_string_dynamic_t_destroy(status, color_context.warning, size); \
- if (F_status_is_error_not(status)) f_macro_string_dynamic_t_destroy(status, color_context.error, size); \
- if (F_status_is_error_not(status)) f_macro_string_dynamic_t_destroy(status, color_context.title, size); \
- if (F_status_is_error_not(status)) f_macro_string_dynamic_t_destroy(status, color_context.notable, size); \
- if (F_status_is_error_not(status)) f_macro_string_dynamic_t_destroy(status, color_context.important, size); \
- if (F_status_is_error_not(status)) f_macro_string_dynamic_t_destroy(status, color_context.standout, size); \
- if (F_status_is_error_not(status)) f_macro_string_dynamic_t_destroy(status, color_context.normal); \
- if (F_status_is_error_not(status)) f_macro_string_dynamic_t_destroy(status, 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_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_t_resize(status, color_context) \
- f_macro_string_dynamic_t_resize(status, color_context.reset, f_color_max_size + 1); \
- if (F_status_is_error_not(status)) f_macro_string_dynamic_t_resize(status, color_context.warning, f_color_max_size + 1); \
- if (F_status_is_error_not(status)) f_macro_string_dynamic_t_resize(status, color_context.error, f_color_max_size + 1); \
- if (F_status_is_error_not(status)) f_macro_string_dynamic_t_resize(status, color_context.title, f_color_max_size + 1); \
- if (F_status_is_error_not(status)) f_macro_string_dynamic_t_resize(status, color_context.notable, f_color_max_size + 1); \
- if (F_status_is_error_not(status)) f_macro_string_dynamic_t_resize(status, color_context.important, f_color_max_size + 1); \
- if (F_status_is_error_not(status)) f_macro_string_dynamic_t_resize(status, color_context.standout, f_color_max_size + 1); \
- if (F_status_is_error_not(status)) f_macro_string_dynamic_t_resize(status, color_context.normal, f_color_max_size + 1); \
- if (F_status_is_error_not(status)) f_macro_string_dynamic_t_resize(status, color_context.normal_reset, f_color_max_size + 1);
-
- #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_error_not(status)) f_macro_string_dynamic_t_resize(status, color_context.warning, f_color_max_size + 1); \
- if (F_status_is_error_not(status)) f_macro_string_dynamic_t_resize(status, color_context.error, f_color_max_size + 1); \
- if (F_status_is_error_not(status)) f_macro_string_dynamic_t_resize(status, color_context.title, f_color_max_size + 1); \
- if (F_status_is_error_not(status)) f_macro_string_dynamic_t_resize(status, color_context.notable, f_color_max_size + 1); \
- if (F_status_is_error_not(status)) f_macro_string_dynamic_t_resize(status, color_context.important, f_color_max_size + 1); \
- if (F_status_is_error_not(status)) f_macro_string_dynamic_t_resize(status, color_context.standout, f_color_max_size + 1); \
- if (F_status_is_error_not(status)) f_macro_string_dynamic_t_resize(status, color_context.normal, f_color_max_size + 1); \
- if (F_status_is_error_not(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.
*
*
* @param file
* The file or standard io.
- * @param format
- * The color format parts.
- * @param start_color
- * The color code to place at the beginning of the string, set to 0 to disable.
- * @param stop_color
- * The color code to place at the end of the string, set to 0 to disable.
+ * @param set
+ * The color set used for printing.
* @param string
* The string to print to the file or standard io.
* @param ...
* F_none on success.
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors from (with error bit): f_print_dynamic().
+ * Errors (with error bit) from: f_print_dynamic().
*/
#ifndef _di_fl_color_print_
- 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, ...);
+ extern f_return_status fl_color_print(FILE *file, const f_color_set_t set, const f_string_t string, ...);
#endif // _di_fl_color_print_
/**
*
* @param file
* The file or standard io.
- * @param format
- * The color format parts.
- * @param start_color
- * The color code to place at the beginning of the string, set to 0 to disable.
- * @param extra_color
- * The color code to place immediately following the start_color, set to 0 to disable.
- * @param stop_color
- * The color code to place at the end of the string, set to 0 to disable.
+ * @param set
+ * The color set used for printing.
+ * @param extra
+ * The a second color set used for printing, which gets appended after set.before and set.after, respectively.
* @param string
* The string to print to the file or standard io.
* @param ...
* F_none on success.
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors from (with error bit): f_print_dynamic().
+ * Errors (with error bit) from: f_print_dynamic().
*/
#ifndef _di_fl_color_print2_
- 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, ...);
+ extern f_return_status fl_color_print2(FILE *file, const f_color_set_t set, const f_color_set_t extra, const f_string_t string, ...);
#endif // _di_fl_color_print2_
/**
*
* @param file
* The file or standard io.
- * @param format
- * The color format parts.
- * @param start_color
- * The color code to place at the beginning of the string, set to 0 to disable.
- * @param stop_color
- * The color code to place at the end of the string, set to 0 to disable.
+ * @param set
+ * The color set used for printing.
* @param string
* The string to print to the file or standard io.
* @param ...
* F_none on success.
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors from (with error bit): f_print_dynamic().
+ * Errors (with error bit) from: f_print_dynamic().
*/
#ifndef _di_fl_color_print_line_
- 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, ...);
+ extern f_return_status fl_color_print_line(FILE *file, const f_color_set_t set, const f_string_t string, ...);
#endif // _di_fl_color_print_line_
/**
*
* @param file
* The file or standard io.
- * @param format
- * The color format parts.
- * @param start_color
- * The color code to place at the beginning of the string, set to 0 to disable.
- * @param extra_color
- * The color code to place immediately following the start_color, set to 0 to disable.
- * @param stop_color
- * The color code to place at the end of the string, set to 0 to disable.
+ * @param set
+ * The color set used for printing.
+ * @param extra
+ * The a second color set used for printing, which gets appended after set.before and set.after, respectively.
* @param string
* The string to print to the file or standard io.
* @param ...
* F_none on success.
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors from (with error bit): f_print_dynamic().
+ * Errors (with error bit) from: f_print_dynamic().
*/
#ifndef _di_fl_color_print2_line_
- 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, ...);
+ extern f_return_status fl_color_print2_line(FILE *file, const f_color_set_t set, const f_color_set_t extra, const f_string_t string, ...);
#endif // _di_fl_color_print2_line_
/**
* F_none on success.
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors from (with error bit): f_print_dynamic().
+ * Errors (with error bit) from: f_print_dynamic().
*/
#ifndef _di_fl_color_print_code_
extern f_return_status fl_color_print_code(FILE *file, const f_string_static_t color);
* This will handle the difference betweem xorg terminals and linux consoles.
* If you wish to use non-standard colors either redefine this function or don't use it.
*
+ * The default/fallback behavior is f_color_xterminal.
+ *
* @param context
* The color context the load the color codes into.
* @param use_light_colors
* Set to F_true to use colors for light backgrounds.
- * Set to F_false to use colors forr dark backgrounds.
+ * Set to F_false to use colors for dark backgrounds.
*
* @return
* F_none on success.
* 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_t *context, const bool use_light_colors);
+ extern f_return_status fl_color_load_context(f_color_context_t *context, const bool use_light_colors);
#endif // _di_fl_color_load_context_
#ifdef __cplusplus
* F_none on success.
* F_failure (with error bit) for any other failure, failures might be populated with individual status codes.
*
- * Errors from (with error bit): f_directory_create().
- * Errors from (with error bit): f_directory_exists().
- * Errors from (with error bit): f_file_mode_set().
- * Errors from (with error bit): f_file_role_change().
- * Errors from (with error bit): f_file_stat().
+ * Errors (with error bit) from: f_directory_create().
+ * Errors (with error bit) from: f_directory_exists().
+ * Errors (with error bit) from: f_file_mode_set().
+ * Errors (with error bit) from: f_file_role_change().
+ * Errors (with error bit) from: f_file_stat().
*
* @see f_file_clone()
*/
* F_none on success.
* F_failure (with error bit) for any other failure, failures might be populated with individual status codes.
*
- * Errors from (with error bit): f_directory_exists().
+ * Errors (with error bit) from: f_directory_exists().
*
* @see f_file_clone()
*/
* F_none on success.
* F_failure (with error bit) for any other failure, failures might be populated with individual status codes.
*
- * Errors from (with error bit): f_directory_create().
- * Errors from (with error bit): f_directory_exists().
- * Errors from (with error bit): f_file_mode_set().
- * Errors from (with error bit): f_file_role_change().
- * Errors from (with error bit): f_file_stat().
+ * Errors (with error bit) from: f_directory_create().
+ * Errors (with error bit) from: f_directory_exists().
+ * Errors (with error bit) from: f_file_mode_set().
+ * Errors (with error bit) from: f_file_role_change().
+ * Errors (with error bit) from: f_file_stat().
*
* @see f_file_copy()
*/
* F_none on success.
* F_failure (with error bit) for any other failure, failures might be populated with individual status codes.
*
- * Errors from (with error bit): f_directory_exists().
+ * Errors (with error bit) from: f_directory_exists().
*
* @see f_file_copy()
*/
* F_parameter (with error bit) if a parameter is invalid.
* F_string_too_large (with error bit) if appended string length is too large to store in the buffer.
*
- * Errors from (with error bit): f_utf_is_control().
+ * Errors (with error bit) from: f_utf_is_control().
*/
#ifndef _di_fl_directory_path_push_
extern f_return_status fl_directory_path_push(const f_string_t source, f_string_length_t length, f_string_dynamic_t *destination);
* F_parameter (with error bit) if a parameter is invalid.
* F_string_too_large (with error bit) if appended string length is too large to store in the buffer.
*
- * Errors from (with error bit): f_utf_is_control().
+ * Errors (with error bit) from: f_utf_is_control().
*/
#ifndef _di_fl_directory_path_push_dynamic_
extern f_return_status fl_directory_path_push_dynamic(const f_string_static_t source, f_string_dynamic_t *destination);
* F_parameter (with error bit) if a parameter is invalid.
* F_string_too_large (with error bit) if appended string length is too large to store in the buffer.
*
- * Errors from (with error bit): f_utf_is_control().
+ * Errors (with error bit) from: f_utf_is_control().
*
* @see fl_directory_path_push()
* @see fl_directory_path_push_dynamic()
* F_parameter (with error bit) if a parameter is invalid.
* F_utf (with error bit) is returned on failure to read/process a UTF-8 character.
*
- * Errors from (with error bit): f_utf_buffer_increment().
- * Errors from (with error bit): f_fss_is_graph().
- * Errors from (with error bit): f_fss_is_space().
- * Errors from (with error bit): f_fss_skip_past_space().
+ * Errors (with error bit) from: f_utf_buffer_increment().
+ * Errors (with error bit) from: f_fss_is_graph().
+ * Errors (with error bit) from: f_fss_is_space().
+ * Errors (with error bit) from: f_fss_skip_past_space().
*/
#ifndef _di_fl_fss_basic_object_read_
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);
* F_parameter (with error bit) if a parameter is invalid.
* F_utf (with error bit) is returned on failure to read/process a UTF-8 character.
*
- * Errors from (with error bit): f_utf_buffer_increment().
- * Errors from (with error bit): f_fss_is_graph().
- * Errors from (with error bit): f_fss_is_space().
- * Errors from (with error bit): f_fss_skip_past_space().
+ * Errors (with error bit) from: f_utf_buffer_increment().
+ * Errors (with error bit) from: f_fss_is_graph().
+ * Errors (with error bit) from: f_fss_is_space().
+ * Errors (with error bit) from: f_fss_skip_past_space().
*/
#ifndef _di_fl_fss_basic_content_read_
extern f_return_status fl_fss_basic_content_read(f_string_dynamic_t *buffer, f_string_range_t *range, f_fss_content_t *found);
* F_parameter (with error bit) if a parameter is invalid.
* F_utf (with error bit) is returned on failure to read/process a UTF-8 character.
*
- * Errors from (with error bit): f_utf_buffer_increment().
+ * Errors (with error bit) from: f_utf_buffer_increment().
*/
#ifndef _di_fl_fss_basic_object_write_
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);
* F_parameter (with error bit) if a parameter is invalid.
* F_utf (with error bit) is returned on failure to read/process a UTF-8 character.
*
- * Errors from (with error bit): f_utf_buffer_increment().
+ * Errors (with error bit) from: f_utf_buffer_increment().
*/
#ifndef _di_fl_fss_basic_content_write_
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);
* F_parameter (with error bit) if a parameter is invalid.
* F_utf (with error bit) is returned on failure to read/process a UTF-8 character.
*
- * Errors from (with error bit): f_utf_buffer_increment().
- * Errors from (with error bit): f_fss_is_graph().
- * Errors from (with error bit): f_fss_is_space().
- * Errors from (with error bit): f_fss_skip_past_space().
+ * Errors (with error bit) from: f_utf_buffer_increment().
+ * Errors (with error bit) from: f_fss_is_graph().
+ * Errors (with error bit) from: f_fss_is_space().
+ * Errors (with error bit) from: 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_t *buffer, f_string_range_t *range, f_fss_object_t *found);
* F_parameter (with error bit) if a parameter is invalid.
* F_utf (with error bit) is returned on failure to read/process a UTF-8 character.
*
- * Errors from (with error bit): f_utf_buffer_increment().
- * Errors from (with error bit): f_fss_is_graph().
- * Errors from (with error bit): f_fss_is_space().
- * Errors from (with error bit): f_fss_skip_past_space().
+ * Errors (with error bit) from: f_utf_buffer_increment().
+ * Errors (with error bit) from: f_fss_is_graph().
+ * Errors (with error bit) from: f_fss_is_space().
+ * Errors (with error bit) from: 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_t *buffer, f_string_range_t *range, f_fss_content_t *found);
* F_parameter (with error bit) if a parameter is invalid.
* F_utf (with error bit) is returned on failure to read/process a UTF-8 character.
*
- * Errors from (with error bit): f_utf_buffer_increment().
+ * Errors (with error bit) from: 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_t object, f_string_range_t *range, f_string_dynamic_t *destination);
* F_parameter (with error bit) if a parameter is invalid.
* F_utf (with error bit) is returned on failure to read/process a UTF-8 character.
*
- * Errors from (with error bit): f_utf_buffer_increment().
+ * Errors (with error bit) from: 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_t content, f_string_range_t *range, f_string_dynamic_t *destination);
* F_parameter (with error bit) if a parameter is invalid.
* F_utf (with error bit) is returned on failure to read/process a UTF-8 character.
*
- * Errors from (with error bit): f_utf_buffer_increment().
- * Errors from (with error bit): f_fss_is_graph().
- * Errors from (with error bit): f_fss_is_space().
- * Errors from (with error bit): f_fss_skip_past_space().
+ * Errors (with error bit) from: f_utf_buffer_increment().
+ * Errors (with error bit) from: f_fss_is_graph().
+ * Errors (with error bit) from: f_fss_is_space().
+ * Errors (with error bit) from: f_fss_skip_past_space().
*/
#ifndef _di_fl_fss_extended_object_read_
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);
* F_parameter (with error bit) if a parameter is invalid.
* F_utf (with error bit) is returned on failure to read/process a UTF-8 character.
*
- * Errors from (with error bit): f_utf_buffer_increment().
- * Errors from (with error bit): f_fss_is_graph().
- * Errors from (with error bit): f_fss_is_space().
- * Errors from (with error bit): f_fss_skip_past_space().
+ * Errors (with error bit) from: f_utf_buffer_increment().
+ * Errors (with error bit) from: f_fss_is_graph().
+ * Errors (with error bit) from: f_fss_is_space().
+ * Errors (with error bit) from: f_fss_skip_past_space().
*/
#ifndef _di_fl_fss_extended_content_read_
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);
* F_parameter (with error bit) if a parameter is invalid.
* F_utf (with error bit) is returned on failure to read/process a UTF-8 character.
*
- * Errors from (with error bit): f_utf_buffer_increment().
+ * Errors (with error bit) from: f_utf_buffer_increment().
*/
#ifndef _di_fl_fss_extended_object_write_
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);
* F_parameter (with error bit) if a parameter is invalid.
* F_utf (with error bit) is returned on failure to read/process a UTF-8 character.
*
- * Errors from (with error bit): f_utf_buffer_increment().
+ * Errors (with error bit) from: f_utf_buffer_increment().
*/
#ifndef _di_fl_fss_extended_content_write_
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);
* F_parameter (with error bit) if a parameter is invalid.
* F_utf (with error bit) is returned on failure to read/process a UTF-8 character.
*
- * Errors from (with error bit): f_utf_buffer_increment().
- * Errors from (with error bit): f_fss_is_graph().
- * Errors from (with error bit): f_fss_is_space().
- * Errors from (with error bit): f_fss_skip_past_space().
+ * Errors (with error bit) from: f_utf_buffer_increment().
+ * Errors (with error bit) from: f_fss_is_graph().
+ * Errors (with error bit) from: f_fss_is_space().
+ * Errors (with error bit) from: 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_t *buffer, f_string_range_t *range, f_fss_object_t *found);
* F_parameter (with error bit) if a parameter is invalid.
* F_utf (with error bit) is returned on failure to read/process a UTF-8 character.
*
- * Errors from (with error bit): f_utf_buffer_increment().
- * Errors from (with error bit): f_fss_is_graph().
- * Errors from (with error bit): f_fss_is_space().
- * Errors from (with error bit): f_fss_skip_past_space().
+ * Errors (with error bit) from: f_utf_buffer_increment().
+ * Errors (with error bit) from: f_fss_is_graph().
+ * Errors (with error bit) from: f_fss_is_space().
+ * Errors (with error bit) from: 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_t *buffer, f_string_range_t *range, f_fss_nest_t *found);
* F_parameter (with error bit) if a parameter is invalid.
* F_utf (with error bit) is returned on failure to read/process a UTF-8 character.
*
- * Errors from (with error bit): f_utf_buffer_increment().
+ * Errors (with error bit) from: 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_t object, f_string_range_t *range, f_string_dynamic_t *destination);
* F_parameter (with error bit) if a parameter is invalid.
* F_utf (with error bit) is returned on failure to read/process a UTF-8 character.
*
- * Errors from (with error bit): f_utf_buffer_increment().
+ * Errors (with error bit) from: 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_t content, f_string_range_t *range, f_string_dynamic_t *destination);
* F_parameter (with error bit) if a parameter is invalid.
* F_utf (with error bit) is returned on failure to read/process a UTF-8 character.
*
- * Errors from (with error bit): f_utf_buffer_increment().
- * Errors from (with error bit): f_fss_is_graph().
- * Errors from (with error bit): f_fss_is_space().
- * Errors from (with error bit): f_fss_skip_past_space().
+ * Errors (with error bit) from: f_utf_buffer_increment().
+ * Errors (with error bit) from: f_fss_is_graph().
+ * Errors (with error bit) from: f_fss_is_space().
+ * Errors (with error bit) from: f_fss_skip_past_space().
*
* @see fl_fss_basic_object_read()
* @see fl_fss_extended_object_read()
* F_parameter (with error bit) if a parameter is invalid.
* F_utf (with error bit) is returned on failure to read/process a UTF-8 character.
*
- * Errors from (with error bit): f_utf_buffer_increment().
+ * Errors (with error bit) from: f_utf_buffer_increment().
*
* @see fl_fss_basic_object_write()
* @see fl_fss_extended_object_write()
* F_parameter (with error bit) if a parameter is invalid.
* F_utf (with error bit) if character is an invalid UTF-8 character.
*
- * Errors from (with error bit): f_utf_is_whitespace().
+ * Errors (with error bit) from: f_utf_is_whitespace().
*/
#ifndef _di_fl_print_trim_string_
extern f_return_status fl_print_trim_string(FILE *output, const f_string_t string, const f_string_length_t length);
* F_parameter (with error bit) if a parameter is invalid.
* F_utf (with error bit) if character is an invalid UTF-8 character.
*
- * Errors from (with error bit): f_utf_is_whitespace().
+ * Errors (with error bit) from: 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_t buffer);
* F_parameter (with error bit) if a parameter is invalid.
* F_utf (with error bit) if character is an invalid UTF-8 character.
*
- * Errors from (with error bit): f_utf_is_whitespace().
+ * Errors (with error bit) from: 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_t buffer, const f_string_range_t range);
* F_parameter (with error bit) if a parameter is invalid.
* F_utf (with error bit) if character is an invalid UTF-8 character.
*
- * Errors from (with error bit): f_utf_character_is_whitespace().
+ * Errors (with error bit) from: 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_t string, const f_utf_string_length_t length);
* F_parameter (with error bit) if a parameter is invalid.
* F_utf (with error bit) if character is an invalid UTF-8 character.
*
- * Errors from (with error bit): f_utf_character_is_whitespace().
+ * Errors (with error bit) from: 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_t buffer);
* F_parameter (with error bit) if a parameter is invalid.
* F_utf (with error bit) if character is an invalid UTF-8 character.
*
- * Errors from (with error bit): f_utf_character_is_whitespace().
+ * Errors (with error bit) from: 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_t buffer, const f_utf_string_range_t range);
* F_equal_to_not when both strings do not equal.
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors from (with error bit): f_utf_is_whitespace().
+ * Errors (with error bit) from: f_utf_is_whitespace().
*
* @see f_utf_is_whitespace()
*/
* F_equal_to_not when both strings do not equal.
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors from (with error bit): f_utf_is_whitespace().
+ * Errors (with error bit) from: f_utf_is_whitespace().
*
* @see f_utf_is_whitespace()
*/
* F_equal_to_not when both strings do not equal.
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors from (with error bit): f_utf_is_whitespace().
+ * Errors (with error bit) from: f_utf_is_whitespace().
*
* @see f_utf_is_whitespace()
*/
* F_equal_to_not when both strings do not equal.
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors from (with error bit): f_utf_is_whitespace().
+ * Errors (with error bit) from: f_utf_is_whitespace().
*
* @see f_utf_is_whitespace()
*/
* F_equal_to_not when both strings do not equal.
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors from (with error bit): f_utf_is_whitespace().
+ * Errors (with error bit) from: f_utf_is_whitespace().
*
* @see f_utf_is_whitespace()
*/
* F_equal_to_not when both strings do not equal.
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors from (with error bit): f_utf_is_whitespace().
+ * Errors (with error bit) from: f_utf_is_whitespace().
*
* @see f_utf_is_whitespace()
*/
* F_equal_to_not when both strings do not equal.
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors from (with error bit): f_utf_is_whitespace().
+ * Errors (with error bit) from: f_utf_is_whitespace().
*
* @see f_utf_is_whitespace()
*/
* F_parameter (with error bit) if a parameter is invalid.
* F_utf (with error bit) if character is an invalid UTF-8 character.
*
- * Errors from (with error bit): f_utf_char_to_character().
+ * Errors (with error bit) from: f_utf_char_to_character().
*
* @see f_utf_char_to_character()
*/
* F_memory_reallocation (with error bit) on memory reallocation error.
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors from (with error bit): f_utf_is_graph().
+ * Errors (with error bit) from: f_utf_is_graph().
*
* @see f_utf_is_graph()
*/
* F_memory_reallocation (with error bit) on memory reallocation error.
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors from (with error bit): f_utf_is_graph().
+ * Errors (with error bit) from: f_utf_is_graph().
*
* @see f_utf_is_graph()
*/
* F_parameter (with error bit) if a parameter is invalid.
* F_utf (with error bit) if character is an invalid UTF-8 character.
*
- * Errors from (with error bit): f_utf_char_to_character().
+ * Errors (with error bit) from: f_utf_char_to_character().
*
* @see f_utf_char_to_character()
*/
* F_memory_reallocation (with error bit) on memory reallocation error.
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors from (with error bit): f_utf_is_whitespace().
+ * Errors (with error bit) from: f_utf_is_whitespace().
*
* @see f_utf_is_whitespace()
*/
* F_memory_reallocation (with error bit) on memory reallocation error.
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors from (with error bit): f_utf_is_whitespace().
+ * Errors (with error bit) from: f_utf_is_whitespace().
*
* @see f_utf_is_whitespace()
*/
* F_parameter (with error bit) if a parameter is invalid.
* F_utf (with error bit) if character is an invalid UTF-8 character.
*
- * Errors from (with error bit): f_utf_char_to_character().
+ * Errors (with error bit) from: f_utf_char_to_character().
*
* @see f_utf_char_to_character()
*/
* F_memory_reallocation (with error bit) on memory reallocation error.
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors from (with error bit): f_utf_is_graph().
+ * Errors (with error bit) from: f_utf_is_graph().
*
* @see f_utf_is_graph()
*/
* F_memory_reallocation (with error bit) on memory reallocation error.
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors from (with error bit): f_utf_is_whitespace().
+ * Errors (with error bit) from: f_utf_is_whitespace().
*
* @see f_utf_is_whitespace()
*/
* F_parameter (with error bit) if a parameter is invalid.
* F_utf (with error bit) if character is an invalid UTF-8 character.
*
- * Errors from (with error bit): f_utf_char_to_character().
+ * Errors (with error bit) from: f_utf_char_to_character().
*
* @see f_utf_char_to_character()
*/
* F_equal_to_not when both strings do not equal.
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors from (with error bit): f_utf_character_is_whitespace().
+ * Errors (with error bit) from: f_utf_character_is_whitespace().
*
* @see f_utf_character_is_whitespace()
*/
* F_parameter (with error bit) if a parameter is invalid.
* F_utf (with error bit) if a character in the string is an invalid UTF-8 character.
*
- * Errors from (with error bit): f_utf_character_is_whitespace().
+ * Errors (with error bit) from: f_utf_character_is_whitespace().
*
* @see f_utf_character_is_whitespace()
*/
* F_equal_to_not when both strings do not equal.
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors from (with error bit): f_utf_character_is_whitespace().
+ * Errors (with error bit) from: f_utf_character_is_whitespace().
*
* @see f_utf_character_is_whitespace()
*/
* F_parameter (with error bit) if a parameter is invalid
* F_utf (with error bit) if a character in the buffer is an invalid UTF-8 character.
*
- * Errors from (with error bit): f_utf_character_is_graph().
+ * Errors (with error bit) from: f_utf_character_is_graph().
*
* @see f_utf_character_is_graph()
*/
* F_parameter (with error bit) if a parameter is invalid.
* F_utf (with error bit) if a character in the buffer is an invalid UTF-8 character.
*
- * Errors from (with error bit): f_utf_character_is_graph().
+ * Errors (with error bit) from: f_utf_character_is_graph().
*
* @see f_utf_character_is_graph()
*/
* F_memory_reallocation (with error bit) on memory reallocation error.
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors from (with error bit): f_utf_character_is_whitespace().
+ * Errors (with error bit) from: f_utf_character_is_whitespace().
*
* @see f_utf_character_is_whitespace()
*/
* F_memory_reallocation (with error bit) on memory reallocation error.
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors from (with error bit): f_utf_character_is_whitespace().
+ * Errors (with error bit) from: f_utf_character_is_whitespace().
*
* @see f_utf_character_is_whitespace()
*/
* F_parameter (with error bit) if a parameter is invalid.
* F_utf (with error bit) if a character in the string is an invalid UTF-8 character.
*
- * Errors from (with error bit): f_utf_character_is_graph().
+ * Errors (with error bit) from: f_utf_character_is_graph().
*
* @see f_utf_character_is_graph()
*/
* F_parameter (with error bit) if a parameter is invalid.
* F_utf (with error bit) if a character in the string is an invalid UTF-8 character.
*
- * Errors from (with error bit): f_utf_character_is_graph().
+ * Errors (with error bit) from: f_utf_character_is_graph().
*
* @see f_utf_character_is_graph()
*/
#endif
#ifndef _di_fll_file_error_print_
- 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) {
+ f_return_status fll_file_error_print(FILE *file, const f_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.");
+ fl_color_print_line(file, context.set.error, "CRITICAL ERROR: Unable to allocate memory.");
}
else if (status == F_file_closed) {
- fl_color_print(file, context.error, context.reset, "INTERNAL ERROR: The file '");
- fl_color_print(file, context.notable, context.reset, "%s", file_name);
- fl_color_print_line(file, context.error, context.reset, "' is no longer open.");
+ fl_color_print(file, context.set.error, "INTERNAL ERROR: The file '");
+ fl_color_print(file, context.set.notable, "%s", file_name);
+ fl_color_print_line(file, context.set.error, "' is no longer open.");
}
else if (status == F_file_seek) {
- fl_color_print(file, context.error, context.reset, "ERROR: A seek error occurred while accessing the file '");
- fl_color_print(file, context.notable, context.reset, "%s", file_name);
- fl_color_print_line(file, context.error, context.reset, "'.");
+ fl_color_print(file, context.set.error, "ERROR: A seek error occurred while accessing the file '");
+ fl_color_print(file, context.set.notable, "%s", file_name);
+ fl_color_print_line(file, context.set.error, "'.");
}
else if (status == F_file_read) {
- fl_color_print(file, context.error, context.reset, "ERROR: A read error occurred while accessing the file '");
- fl_color_print(file, context.notable, context.reset, "%s", file_name);
- fl_color_print_line(file, context.error, context.reset, "'.");
+ fl_color_print(file, context.set.error, "ERROR: A read error occurred while accessing the file '");
+ fl_color_print(file, context.set.notable, "%s", file_name);
+ fl_color_print_line(file, context.set.error, "'.");
}
else if (status == F_file_found_not) {
- fl_color_print(file, context.error, context.reset, "ERROR: Unable to find the file '");
- fl_color_print(file, context.notable, context.reset, "%s", file_name);
- fl_color_print_line(file, context.error, context.reset, "'.");
+ fl_color_print(file, context.set.error, "ERROR: Unable to find the file '");
+ fl_color_print(file, context.set.notable, "%s", file_name);
+ fl_color_print_line(file, context.set.error, "'.");
}
else if (status == F_file_open) {
- fl_color_print(file, context.error, context.reset, "ERROR: Unable to open the file '");
- fl_color_print(file, context.notable, context.reset, "%s", file_name);
- fl_color_print_line(file, context.error, context.reset, "'.");
+ fl_color_print(file, context.set.error, "ERROR: Unable to open the file '");
+ fl_color_print(file, context.set.notable, "%s", file_name);
+ fl_color_print_line(file, context.set.error, "'.");
}
else if (status == F_file_descriptor) {
- fl_color_print(file, context.error, context.reset, "ERROR: File descriptor error while trying to open the file '");
- fl_color_print(file, context.notable, context.reset, "%s", file_name);
- fl_color_print_line(file, context.error, context.reset, "'.");
+ fl_color_print(file, context.set.error, "ERROR: File descriptor error while trying to open the file '");
+ fl_color_print(file, context.set.notable, "%s", file_name);
+ fl_color_print_line(file, context.set.error, "'.");
}
else if (status == F_parameter) {
- fl_color_print(file, context.error, context.reset, "INTERNAL ERROR: Invalid parameter when calling ");
- fl_color_print(file, context.notable, context.reset, "%s()", function_name);
- fl_color_print_line(file, context.error, context.reset, ".");
+ fl_color_print(file, context.set.error, "INTERNAL ERROR: Invalid parameter when calling ");
+ fl_color_print(file, context.set.notable, "%s()", function_name);
+ fl_color_print_line(file, context.set.error, ".");
}
else if (status == F_number_overflow) {
- fl_color_print(file, context.error, context.reset, "ERROR: Integer overflow while trying to buffer the file '");
- fl_color_print(file, context.notable, context.reset, "%s", file_name);
- fl_color_print_line(file, context.error, context.reset, "'.");
+ fl_color_print(file, context.set.error, "ERROR: Integer overflow while trying to buffer the file '");
+ fl_color_print(file, context.set.notable, "%s", file_name);
+ fl_color_print_line(file, context.set.error, "'.");
}
else if (status == F_number_underflow) {
- fl_color_print(file, context.error, context.reset, "ERROR: Integer underflow while trying to buffer the file '");
- fl_color_print(file, context.notable, context.reset, "%s", file_name);
- fl_color_print_line(file, context.error, context.reset, "'.");
+ fl_color_print(file, context.set.error, "ERROR: Integer underflow while trying to buffer the file '");
+ fl_color_print(file, context.set.notable, "%s", file_name);
+ fl_color_print_line(file, context.set.error, "'.");
}
else {
return F_false;
* 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_t context, const f_string_t function_name, const f_string_t file_name, const f_status_t status);
+ extern f_return_status fll_file_error_print(FILE *file, const f_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_
/**
* F_space_not (with error bit) if filesystem is out of space (or filesystem quota is reached).
* F_failure (with error bit) for any other error, failures might be populated with individual status codes.
*
- * Errors from (with error bit): f_directory_remove_custom().
- * Errors from (with error bit): f_file_is().
- * Errors from (with error bit): f_file_remove().
- * Errors from (with error bit): f_file_rename().
- * Errors from (with error bit): fl_directory_clone().
+ * Errors (with error bit) from: f_directory_remove_custom().
+ * Errors (with error bit) from: f_file_is().
+ * Errors (with error bit) from: f_file_remove().
+ * Errors (with error bit) from: f_file_rename().
+ * Errors (with error bit) from: fl_directory_clone().
*
* @see f_directory_remove()
* @see f_directory_remove_custom()
* FL_fss_accepted_invalid (with warning bit) if header is technically invalid but can be identified.
* FL_fss_header_not (with error bit) if the an error occurred prior to identifying a valid header.
*
- * Errors from (with error bit): fl_conversion_string_to_hexidecimal_unsigned().
+ * Errors (with error bit) from: fl_conversion_string_to_hexidecimal_unsigned().
*/
#ifndef _di_fll_fss_identify_
extern f_return_status fll_fss_identify(const f_string_static_t buffer, f_fss_header_t *header);
* F_parameter (with error bit) if a parameter is invalid.
* FL_fss_header_not (with error bit) if the an error occurred prior to identifying a valid header.
*
- * Errors from (with error bit): fl_conversion_string_to_hexidecimal_unsigned().
- * Errors from (with error bit): f_file_read_until().
- * Errors from (with error bit): f_file_seek().
+ * Errors (with error bit) from: fl_conversion_string_to_hexidecimal_unsigned().
+ * Errors (with error bit) from: f_file_read_until().
+ * Errors (with error bit) from: f_file_seek().
*
* @see f_file_read_until()
*/
* F_data_not when there is no buffer, objects or contents to process.
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors from (with error bit): fl_string_compare_trim().
- * Errors from (with error bit): fl_string_dynamic_partial_append_nulless().
+ * Errors (with error bit) from: fl_string_compare_trim().
+ * Errors (with error bit) from: fl_string_dynamic_partial_append_nulless().
*
* @see fl_string_compare_trim()
* @see fl_string_dynamic_partial_append_nulless()
* F_data_not when there is no buffer, objects or contents to process.
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors from (with error bit): fl_string_compare_trim().
- * Errors from (with error bit): fl_string_dynamic_partial_append_nulless().
+ * Errors (with error bit) from: fl_string_compare_trim().
+ * Errors (with error bit) from: fl_string_dynamic_partial_append_nulless().
*
* @see fl_string_compare_trim()
* @see fl_string_dynamic_partial_append_nulless()
* F_data_not when there is no buffer, objects or contents to process.
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors from (with error bit): fl_string_compare_trim().
- * Errors from (with error bit): fl_string_dynamic_partial_append_nulless().
+ * Errors (with error bit) from: fl_string_compare_trim().
+ * Errors (with error bit) from: fl_string_dynamic_partial_append_nulless().
*
* @see fl_string_compare_trim()
* @see fl_string_dynamic_partial_append_nulless()
* F_data_not when there is no buffer, objects or contents to process.
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors from (with error bit): fl_string_compare_trim().
- * Errors from (with error bit): fl_string_dynamic_partial_append_nulless().
+ * Errors (with error bit) from: fl_string_compare_trim().
+ * Errors (with error bit) from: fl_string_dynamic_partial_append_nulless().
*
* @see fl_string_compare_trim()
* @see fl_string_dynamic_partial_append_nulless()
* F_data_not when there is no buffer, objects or contents to process.
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors from (with error bit): fl_string_compare_trim().
- * Errors from (with error bit): fl_string_dynamic_partial_mash_nulless().
+ * Errors (with error bit) from: fl_string_compare_trim().
+ * Errors (with error bit) from: 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_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_t names[], const f_string_length_t lengths[], const f_string_length_t size, const f_string_t glue, const f_string_length_t glue_length, f_string_maps_t *values[], f_array_lengths_t *indexs[]);
* F_data_not when there is no buffer, objects or contents to process.
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors from (with error bit): fl_string_compare_trim().
- * Errors from (with error bit): fl_string_dynamic_partial_append_nulless().
+ * Errors (with error bit) from: fl_string_compare_trim().
+ * Errors (with error bit) from: fl_string_dynamic_partial_append_nulless().
*
* @see fl_string_compare_trim()
* @see fl_string_dynamic_partial_mash_nulless()
* F_data_not when there is no buffer, objects or contents to process.
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors from (with error bit): fl_string_compare_trim().
- * Errors from (with error bit): fl_string_dynamic_partial_append_nulless().
+ * Errors (with error bit) from: fl_string_compare_trim().
+ * Errors (with error bit) from: fl_string_dynamic_partial_append_nulless().
*
* @see fl_string_compare_trim()
* @see fl_string_dynamic_partial_mash_nulless()
* F_data_not when there is no buffer, objects or contents to process.
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors from (with error bit): fl_string_compare_trim().
- * Errors from (with error bit): fl_string_dynamic_partial_mash_nulless().
+ * Errors (with error bit) from: fl_string_compare_trim().
+ * Errors (with error bit) from: fl_string_dynamic_partial_mash_nulless().
*/
#ifndef _di_fll_fss_snatch_mash_
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[]);
* F_data_not when there is no buffer, objects or contents to process.
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors from (with error bit): fl_string_compare_trim().
- * Errors from (with error bit): fl_string_dynamic_partial_append_nulless().
+ * Errors (with error bit) from: fl_string_compare_trim().
+ * Errors (with error bit) from: fl_string_dynamic_partial_append_nulless().
*
* @see fl_string_compare_trim()
* @see fl_string_dynamic_partial_mash_nulless()
* F_data_not when there is no buffer, objects or contents to process.
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors from (with error bit): fl_string_compare_trim().
- * Errors from (with error bit): fl_string_dynamic_partial_mash_nulless().
+ * Errors (with error bit) from: fl_string_compare_trim().
+ * Errors (with error bit) from: fl_string_dynamic_partial_mash_nulless().
*
* @see fl_string_compare_trim()
* @see fl_string_dynamic_partial_append_nulless()
* F_none on success.
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors from (with error bit): fl_status_to_string().
+ * Errors (with error bit) from: fl_status_to_string().
*
* @see fl_status_to_string()
*/
* FL_fss_accepted_invalid (with warning bit) if header is technically invalid but can be identified.
* FL_fss_header_not (with error bit) if the an error occurred prior to identifying a valid header.
*
- * Errors from (with error bit): fl_conversion_string_to_hexidecimal_unsigned().
+ * Errors (with error bit) from: fl_conversion_string_to_hexidecimal_unsigned().
*
* @see fll_fss_identify()
* @see fll_fss_identify_file()
* F_none on success.
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors from (with error bit): f_macro_string_dynamic_t_resize().
- * Errors from (with error bit): fl_string_dynamic_size_increase().
+ * Errors (with error bit) from: f_macro_string_dynamic_t_resize().
+ * Errors (with error bit) from: fl_string_dynamic_size_increase().
*/
#ifndef _di_fll_iki_content_escape_
extern f_return_status fll_iki_content_escape(const f_string_static_t content, const uint8_t quote, f_string_dynamic_t *escaped);
* F_none on success.
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors from (with error bit): f_macro_string_dynamic_t_resize().
- * Errors from (with error bit): fl_string_dynamic_size_increase().
+ * Errors (with error bit) from: f_macro_string_dynamic_t_resize().
+ * Errors (with error bit) from: fl_string_dynamic_size_increase().
*/
#ifndef _di_fll_iki_content_partial_escape_
extern f_return_status fll_iki_content_partial_escape(const f_string_static_t content, const f_string_range_t range, const uint8_t quote, f_string_dynamic_t *escaped);
* F_parameter (with error bit) if a parameter is invalid.
* F_syntax (with error bit) if the given string is invalid, such as having an undelimited quote.
*
- * Errors from (with error bit): f_macro_string_dynamic_t_resize().
- * Errors from (with error bit): fl_string_dynamic_size_increase().
+ * Errors (with error bit) from: f_macro_string_dynamic_t_resize().
+ * Errors (with error bit) from: fl_string_dynamic_size_increase().
*/
#ifndef _di_fll_iki_content_escape_un_
extern f_return_status fll_iki_content_escape_un(const f_string_static_t content, const uint8_t quote, f_string_dynamic_t *unescaped);
* F_parameter (with error bit) if a parameter is invalid.
* F_syntax (with error bit) if the given string is invalid, such as having an undelimited quote.
*
- * Errors from (with error bit): f_macro_string_dynamic_t_resize().
- * Errors from (with error bit): fl_string_dynamic_size_increase().
+ * Errors (with error bit) from: f_macro_string_dynamic_t_resize().
+ * Errors (with error bit) from: fl_string_dynamic_size_increase().
*/
#ifndef _di_fll_iki_content_partial_escape_un_
extern f_return_status fll_iki_content_partial_escape_un(const f_string_static_t content, const f_string_range_t range, const uint8_t quote, f_string_dynamic_t *unescaped);
* F_none on success.
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors from (with error bit): f_macro_string_dynamic_t_resize().
- * Errors from (with error bit): fl_string_dynamic_size_increase().
+ * Errors (with error bit) from: f_macro_string_dynamic_t_resize().
+ * Errors (with error bit) from: fl_string_dynamic_size_increase().
*/
#if !defined(_di_fll_iki_content_escape_) || !defined(_di_fll_iki_content_partial_escape_)
extern f_return_status private_fll_iki_content_partial_escape(const f_string_static_t content, const f_string_range_t range, const uint8_t quote, f_string_dynamic_t *escaped) f_gcc_attribute_visibility_internal;
* F_parameter (with error bit) if a parameter is invalid.
* F_syntax (with error bit) if the given string is invalid, such as having an undelimited quote.
*
- * Errors from (with error bit): f_macro_string_dynamic_t_resize().
- * Errors from (with error bit): fl_string_dynamic_size_increase().
+ * Errors (with error bit) from: f_macro_string_dynamic_t_resize().
+ * Errors (with error bit) from: fl_string_dynamic_size_increase().
*/
#if !defined(_di_fll_iki_content_escape_un_) || !defined(_di_fll_iki_content_partial_escape_un_)
extern f_return_status private_fll_iki_content_partial_escape_un(const f_string_static_t content, const f_string_range_t range, const uint8_t quote, f_string_dynamic_t *unescaped) f_gcc_attribute_visibility_internal;
#endif
#ifndef _di_fll_program_print_help_header_
- 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_return_status fll_program_print_help_header(const f_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);
+ status = fl_color_print(f_type_output, context.set.title, " %s", name);
if (F_status_is_error(status)) return status;
printf("%c", f_string_eol[0]);
- status = fl_color_print(f_type_output, context.notable, context.reset, " Version %s", version);
+ status = fl_color_print(f_type_output, context.set.notable, " Version %s", version);
if (F_status_is_error(status)) return status;
printf("%c%c", f_string_eol[0], f_string_eol[0]);
- status = fl_color_print(f_type_output, context.important, context.reset, " Available Options: ");
+ status = fl_color_print(f_type_output, context.set.important, " Available Options: ");
if (F_status_is_error(status)) return status;
return F_none;
#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_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_return_status fll_program_print_help_option(const f_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);
- status = fl_color_print(f_type_output, context.standout, context.reset, option_short);
+ status = fl_color_print(f_type_output, context.set.standout, option_short);
if (F_status_is_error(status)) return status;
printf(", %s", symbol_long);
- status = fl_color_print(f_type_output, context.standout, context.reset, option_long);
+ status = fl_color_print(f_type_output, context.set.standout, option_long);
if (F_status_is_error(status)) return status;
printf(" %s", description);
#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_t context, const f_string_t option_long, const f_string_t symbol_long, const f_string_t description) {
+ f_return_status fll_program_print_help_option_long(const f_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);
- status = fl_color_print(f_type_output, context.standout, context.reset, option_long);
+ status = fl_color_print(f_type_output, context.set.standout, option_long);
if (F_status_is_error(status)) return status;
printf(" %s", description);
#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_t context, const f_string_t option_other, const f_string_t description) {
+ f_return_status fll_program_print_help_option_other(const f_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);
+ fl_color_print(f_type_output, context.set.standout, option_other);
printf(" %s", description);
#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_t context, const f_string_t name, const f_string_t parameters) {
+ f_return_status fll_program_print_help_usage(const f_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:");
+ status = fl_color_print(f_type_output, context.set.important, " Usage:");
if (F_status_is_error(status)) return status;
printf("%c ", f_string_eol[0]);
- status = fl_color_print(f_type_output, context.standout, context.reset, name);
+ status = fl_color_print(f_type_output, context.set.standout, name);
if (F_status_is_error(status)) return status;
printf(" ");
- status = fl_color_print(f_type_output, context.notable, context.reset, "[");
+ status = fl_color_print(f_type_output, context.set.notable, "[");
if (F_status_is_error(status)) return status;
printf(" options ");
- status = fl_color_print(f_type_output, context.notable, context.reset, "]");
+ status = fl_color_print(f_type_output, context.set.notable, "]");
if (F_status_is_error(status)) return status;
if (parameters[0] != '\0') {
printf(" ");
- status = fl_color_print(f_type_output, context.notable, context.reset, "[");
+ status = fl_color_print(f_type_output, context.set.notable, "[");
if (F_status_is_error(status)) return status;
printf(" %s ", parameters);
- status = fl_color_print(f_type_output, context.notable, context.reset, "]");
+ status = fl_color_print(f_type_output, context.set.notable, "]");
if (F_status_is_error(status)) return status;
}
#endif // _di_fll_program_print_version_
#ifndef _di_fll_program_parameter_process_
- 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_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, f_color_context_t *context) {
f_status_t status = F_none;
status = f_console_parameter_process(arguments, parameters, remaining);
status = F_status_set_fine(status);
if (status == F_data_not) {
- fl_color_print_line(f_type_error, context->error, context->reset, "ERROR: One of the parameters you passed requires an additional parameter that you did not pass.");
+ fl_color_print_line(f_type_error, context->set.error, "ERROR: One of the parameters you passed requires an additional parameter that you did not pass.");
// @todo there is a way to identify which parameter is incorrect
// to do this, one must look for any "has_additional" and then see if the "additional" location is set to 0
// nothing can be 0 as that represents the program name, unless argv[] is improperly created
}
else if (status == F_memory_allocation || status == F_memory_reallocation) {
- 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, "f_console_parameter_process");
- fl_color_print_line(f_type_error, context->error, context->reset, ").");
+ fl_color_print(f_type_error, context->set.error, "CRITICAL ERROR: Unable to allocate memory while calling ");
+ fl_color_print(f_type_error, context->set.notable, "f_console_parameter_process");
+ fl_color_print_line(f_type_error, context->set.error, ").");
}
else if (status == F_utf) {
- fl_color_print(f_type_error, context->error, context->reset, "ENCODING ERROR: Invalid UTF-8 character in parameter when calling ");
- fl_color_print(f_type_error, context->notable, context->reset, "f_console_parameter_process()");
- fl_color_print_line(f_type_error, context->error, context->reset, ".");
+ fl_color_print(f_type_error, context->set.error, "ENCODING ERROR: Invalid UTF-8 character in parameter when calling ");
+ fl_color_print(f_type_error, context->set.notable, "f_console_parameter_process()");
+ fl_color_print_line(f_type_error, context->set.error, ".");
}
else if (status == F_parameter) {
- fl_color_print(f_type_error, context->error, context->reset, "INTERNAL ERROR: Invalid parameter when calling ");
- fl_color_print(f_type_error, context->notable, context->reset, "f_console_parameter_process()");
- fl_color_print_line(f_type_error, context->error, context->reset, ".");
+ fl_color_print(f_type_error, context->set.error, "INTERNAL ERROR: Invalid parameter when calling ");
+ fl_color_print(f_type_error, context->set.notable, "f_console_parameter_process()");
+ fl_color_print_line(f_type_error, context->set.error, ".");
}
else {
- fl_color_print(f_type_error, context->error, context->reset, "INTERNAL ERROR: An unhandled error (");
- fl_color_print(f_type_error, context->notable, context->reset, "%u", status);
- fl_color_print(f_type_error, context->error, context->reset, ") has occurred while calling ");
- fl_color_print(f_type_error, context->notable, context->reset, "f_console_parameter_process()");
- fl_color_print_line(f_type_error, context->error, context->reset, ".");
+ fl_color_print(f_type_error, context->set.error, "INTERNAL ERROR: An unhandled error (");
+ fl_color_print(f_type_error, context->set.notable, "%u", status);
+ fl_color_print(f_type_error, context->set.error, ") has occurred while calling ");
+ fl_color_print(f_type_error, context->set.notable, "f_console_parameter_process()");
+ fl_color_print_line(f_type_error, context->set.error, ".");
}
return F_status_set_error(status);
status = F_status_set_fine(status);
if (status == F_memory_allocation || status == F_memory_reallocation) {
- 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, "%s", function);
- fl_color_print_line(f_type_error, context->error, context->reset, ").");
+ fl_color_print(f_type_error, context->set.error, "CRITICAL ERROR: Unable to allocate memory while calling ");
+ fl_color_print(f_type_error, context->set.notable, "%s", function);
+ fl_color_print_line(f_type_error, context->set.error, ").");
}
else if (status == F_parameter) {
- fl_color_print(f_type_error, context->error, context->reset, "INTERNAL ERROR: Invalid parameter when calling ");
- fl_color_print(f_type_error, context->notable, context->reset, "%s", function);
- fl_color_print_line(f_type_error, context->error, context->reset, "().");
+ fl_color_print(f_type_error, context->set.error, "INTERNAL ERROR: Invalid parameter when calling ");
+ fl_color_print(f_type_error, context->set.notable, "%s", function);
+ fl_color_print_line(f_type_error, context->set.error, "().");
}
else {
- fl_color_print(f_type_error, context->error, context->reset, "INTERNAL ERROR: An unhandled error (");
- fl_color_print(f_type_error, context->notable, context->reset, "%u", status);
- fl_color_print(f_type_error, context->error, context->reset, ") has occurred while calling ");
- fl_color_print(f_type_error, context->notable, context->reset, "%s", function);
- fl_color_print_line(f_type_error, context->error, context->reset, "().");
+ fl_color_print(f_type_error, context->set.error, "INTERNAL ERROR: An unhandled error (");
+ fl_color_print(f_type_error, context->set.notable, "%u", status);
+ fl_color_print(f_type_error, context->set.error, ") has occurred while calling ");
+ fl_color_print(f_type_error, context->set.notable, "%s", function);
+ fl_color_print_line(f_type_error, context->set.error, "().");
}
return F_status_set_error(status);
if (decision != choices.id[0]) {
f_status_t allocation_status = F_none;
- fl_macro_color_context_t_new(allocation_status, (*context));
+ f_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_t_new");
- fl_color_print_line(f_type_error, context->error, context->reset, "().");
+ fl_color_print(f_type_error, context->set.error, "CRITICAL ERROR: Unable to allocate memory while calling ");
+ fl_color_print(f_type_error, context->set.notable, "f_macro_color_context_t_new");
+ fl_color_print_line(f_type_error, context->set.error, "().");
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_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_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, f_color_context_t *context) {
f_status_t status = F_none;
status = f_console_parameter_process(arguments, parameters, remaining);
if (decision != choices.id[0]) {
f_status_t allocation_status = F_none;
- fl_macro_color_context_t_new(allocation_status, (*context));
+ f_macro_color_context_t_new(allocation_status, (*context));
if (F_status_is_error(allocation_status)) return allocation_status;
* @return
* F_none on success.
*
- * Errors from (with error bit): fl_color_print().
+ * Errors (with error bit) from: fl_color_print().
*
* @param fl_color_print()
*/
#ifndef _di_fll_program_print_help_header_
- 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);
+ extern f_return_status fll_program_print_help_header(const f_color_context_t context, const f_string_t name, const f_string_t version);
#endif // _di_fll_program_print_help_header_
/**
* @return
* F_none on success.
*
- * Errors from (with error bit): fl_color_print().
+ * Errors (with error bit) from: fl_color_print().
*
* @param fl_color_print()
*/
#ifndef _di_fll_program_print_help_option_
- 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);
+ extern f_return_status fll_program_print_help_option(const f_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_
/**
* @return
* F_none on success.
*
- * Errors from (with error bit): fl_color_print().
+ * Errors (with error bit) from: fl_color_print().
*
* @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_t context, const f_string_t option_long, const f_string_t symbol_long, const f_string_t description);
+ extern f_return_status fll_program_print_help_option_long(const f_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_
/**
* @return
* F_none on success.
*
- * Errors from (with error bit): fl_color_print().
+ * Errors (with error bit) from: fl_color_print().
*
* @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_t context, const f_string_t option_other, const f_string_t description);
+ extern f_return_status fll_program_print_help_option_other(const f_color_context_t context, const f_string_t option_other, const f_string_t description);
#endif // _di_fll_program_print_help_option_other_
/**
* @return
* F_none on success.
*
- * Errors from (with error bit): fl_color_print().
+ * Errors (with error bit) from: fl_color_print().
*
* @param fl_color_print()
*/
#ifndef _di_fll_program_print_help_usage_
- 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);
+ extern f_return_status fll_program_print_help_usage(const f_color_context_t context, const f_string_t name, const f_string_t parameters);
#endif // _di_fll_program_print_help_usage_
/**
* F_memory_reallocation (with error bit) on memory reallocation error.
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors from (with error bit): f_console_parameter_prioritize_left().
- * Errors from (with error bit): f_console_parameter_prioritize_right().
- * Errors from (with error bit): f_console_parameter_process().
- * Errors from (with error bit): fl_color_load_context().
+ * Errors (with error bit) from: f_console_parameter_prioritize_left().
+ * Errors (with error bit) from: f_console_parameter_prioritize_right().
+ * Errors (with error bit) from: f_console_parameter_process().
+ * Errors (with error bit) from: fl_color_load_context().
*
* @see f_console_parameter_prioritize_left()
* @see f_console_parameter_prioritize_right()
* @see fl_color_load_context()
*/
#ifndef _di_fll_program_parameter_process_
- 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);
+ 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, f_color_context_t *context);
#endif // _di_fll_program_parameter_process_
/**
* Perform basic parameter loading, including initialization of color context but does not print errors.
* F_memory_reallocation (with error bit) on memory reallocation error.
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors from (with error bit): f_console_parameter_prioritize_left().
- * Errors from (with error bit): f_console_parameter_prioritize_right().
- * Errors from (with error bit): f_console_parameter_process().
- * Errors from (with error bit): fl_color_load_context().
+ * Errors (with error bit) from: f_console_parameter_prioritize_left().
+ * Errors (with error bit) from: f_console_parameter_prioritize_right().
+ * Errors (with error bit) from: f_console_parameter_process().
+ * Errors (with error bit) from: fl_color_load_context().
*
* @see f_console_parameter_prioritize_left()
* @see f_console_parameter_prioritize_right()
* @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_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);
+ 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, f_color_context_t *context);
#endif // _di_fll_program_parameter_process_quietly_
/**
* F_memory_reallocation (with error bit) on memory reallocation error.
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors from (with error bit): fl_string_append().
+ * Errors (with error bit) from: fl_string_append().
*
* @see fl_string_append()
*/
* F_parameter (with error bit) if a parameter is invalid.
* F_string_too_large (with error bit) if the combined string is too large.
*
- * Errors from (with error bit): fl_string_mash().
+ * Errors (with error bit) from: fl_string_mash().
*
* @see fl_string_mash()
*/
* F_memory_reallocation (with error bit) on memory reallocation error.
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors from (with error bit): fl_string_rip().
+ * Errors (with error bit) from: fl_string_rip().
*
* @see fl_string_rip()
*/
* F_parameter (with error bit) if a parameter is invalid.
* F_string_too_large (with error bit) if the combined string is too large.
*
- * Errors from (with error bit): fl_string_dynamic_mash().
- * Errors from (with error bit): fl_string_rip().
+ * Errors (with error bit) from: fl_string_dynamic_mash().
+ * Errors (with error bit) from: fl_string_rip().
*
* @see fl_string_dynamic_mash()
* @see fl_string_rip()
#endif
#ifndef _di_byte_dump_print_help_
- f_return_status byte_dump_print_help(const fl_color_context_t context) {
+ f_return_status byte_dump_print_help(const f_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.");
fll_program_print_help_usage(context, byte_dump_name, "filename(s)");
printf(" When using the ");
- fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, byte_dump_long_text);
+ fl_color_print(f_type_output, context.set.notable, "%s%s", f_console_symbol_long_enable, byte_dump_long_text);
printf(" option, some UTF-8 characters may be replaced by your instance and cause display alignment issues.");
printf("%c%c", f_string_eol[0], f_string_eol[0]);
printf(" Special UTF-8 characters and non-spacing UTF-8 characters may be replaced with a space (or a placeholder when the ");
- fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, byte_dump_long_placeholder);
+ fl_color_print(f_type_output, context.set.notable, "%s%s", f_console_symbol_long_enable, byte_dump_long_placeholder);
printf(" option is used).");
printf("%c%c", f_string_eol[0], f_string_eol[0]);
printf("%c%c", f_string_eol[0], f_string_eol[0]);
printf(" When ");
- fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, byte_dump_long_last);
+ fl_color_print(f_type_output, context.set.notable, "%s%s", f_console_symbol_long_enable, byte_dump_long_last);
printf(" is used, any UTF-8 sequences will still be printed in full should any part is found within the requested range.");
printf("%c%c", f_string_eol[0], f_string_eol[0]);
}
else if (data->remaining.used > 0 || data->process_pipe) {
if (data->parameters[byte_dump_parameter_width].result == f_console_result_found) {
- 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_width);
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "' was specified, but no value was given.");
+ fl_color_print(f_type_error, data->context.set.error, "ERROR: The parameter '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, byte_dump_long_width);
+ fl_color_print_line(f_type_error, data->context.set.error, "' was specified, but no value was given.");
byte_dump_delete_data(data);
return F_status_set_error(status);
status = fl_conversion_string_to_number_unsigned(arguments.argv[index], &number, range);
if (F_status_is_error(status) || number < 1 || number >= 0xfb) {
- 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_width);
- fl_color_print(f_type_error, data->context.error, data->context.reset, "' value can only be a number 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, "251");
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, ".");
+ fl_color_print(f_type_error, data->context.set.error, "ERROR: The parameter '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, byte_dump_long_width);
+ fl_color_print(f_type_error, data->context.set.error, "' value can only be a number between ");
+ fl_color_print(f_type_error, data->context.set.notable, "0");
+ fl_color_print(f_type_error, data->context.set.error, " and ");
+ fl_color_print(f_type_error, data->context.set.notable, "251");
+ fl_color_print_line(f_type_error, data->context.set.error, ".");
byte_dump_delete_data(data);
return F_status_set_error(status);
}
if (data->parameters[byte_dump_parameter_first].result == f_console_result_found) {
- 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_line(f_type_error, data->context.error, data->context.reset, "' was specified, but no value was given.");
+ fl_color_print(f_type_error, data->context.set.error, "ERROR: The parameter '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, byte_dump_long_first);
+ fl_color_print_line(f_type_error, data->context.set.error, "' was specified, but no value was given.");
byte_dump_delete_data(data);
return F_status_set_error(status);
status = fl_conversion_string_to_number_unsigned(arguments.argv[index], &number, range);
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_number_t_size_unsigned);
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, ".");
+ fl_color_print(f_type_error, data->context.set.error, "ERROR: The parameter '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, byte_dump_long_first);
+ fl_color_print(f_type_error, data->context.set.error, "' value can only be a number (inclusively) between ");
+ fl_color_print(f_type_error, data->context.set.notable, "0");
+ fl_color_print(f_type_error, data->context.set.error, " and ");
+ fl_color_print(f_type_error, data->context.set.notable, "%llu", f_number_t_size_unsigned);
+ fl_color_print_line(f_type_error, data->context.set.error, ".");
byte_dump_delete_data(data);
return F_status_set_error(status);
}
if (data->parameters[byte_dump_parameter_last].result == f_console_result_found) {
- 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_line(f_type_error, data->context.error, data->context.reset, "' was specified, but no value was given.");
+ fl_color_print(f_type_error, data->context.set.error, "ERROR: The parameter '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, byte_dump_long_last);
+ fl_color_print_line(f_type_error, data->context.set.error, "' was specified, but no value was given.");
byte_dump_delete_data(data);
return F_status_set_error(status);
status = fl_conversion_string_to_number_unsigned(arguments.argv[index], &number, range);
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_number_t_size_unsigned);
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, ".");
+ fl_color_print(f_type_error, data->context.set.error, "ERROR: The parameter '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, byte_dump_long_last);
+ fl_color_print(f_type_error, data->context.set.error, "' value can only be a number (inclusively) between ");
+ fl_color_print(f_type_error, data->context.set.notable, "0");
+ fl_color_print(f_type_error, data->context.set.error, " and ");
+ fl_color_print(f_type_error, data->context.set.notable, "%llu", f_number_t_size_unsigned);
+ fl_color_print_line(f_type_error, data->context.set.error, ".");
byte_dump_delete_data(data);
return F_status_set_error(status);
if (data->parameters[byte_dump_parameter_first].result == f_console_result_additional && data->parameters[byte_dump_parameter_last].result == f_console_result_additional) {
if (data->first > data->last) {
- 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 cannot be greater than 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_line(f_type_error, data->context.error, data->context.reset, "' value.");
+ fl_color_print(f_type_error, data->context.set.error, "ERROR: The parameter '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, byte_dump_long_first);
+ fl_color_print(f_type_error, data->context.set.error, "' value cannot be greater than the parameter '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, byte_dump_long_last);
+ fl_color_print_line(f_type_error, data->context.set.error, "' value.");
byte_dump_delete_data(data);
return F_status_set_error(status);
file.id = f_type_descriptor_input;
printf("%c", f_string_eol[0]);
- fl_color_print(f_type_output, data->context.title, data->context.reset, "Piped Byte Dump: (in ");
+ fl_color_print(f_type_output, data->context.set.title, "Piped Byte Dump: (in ");
if (data->mode == byte_dump_mode_hexidecimal) {
- fl_color_print(f_type_output, data->context.title, data->context.reset, "Hexidecimal");
+ fl_color_print(f_type_output, data->context.set.title, "Hexidecimal");
}
else if (data->mode == byte_dump_mode_duodecimal) {
- fl_color_print(f_type_output, data->context.title, data->context.reset, "Duodecimal");
+ fl_color_print(f_type_output, data->context.set.title, "Duodecimal");
}
else if (data->mode == byte_dump_mode_octal) {
- fl_color_print(f_type_output, data->context.title, data->context.reset, "Octal");
+ fl_color_print(f_type_output, data->context.set.title, "Octal");
}
else if (data->mode == byte_dump_mode_binary) {
- fl_color_print(f_type_output, data->context.title, data->context.reset, "Binary");
+ fl_color_print(f_type_output, data->context.set.title, "Binary");
}
else if (data->mode == byte_dump_mode_decimal) {
- fl_color_print(f_type_output, data->context.title, data->context.reset, "Decimal");
+ fl_color_print(f_type_output, data->context.set.title, "Decimal");
}
- fl_color_print_line(f_type_output, data->context.title, data->context.reset, ")");
+ fl_color_print_line(f_type_output, data->context.set.title, ")");
status = byte_dump_file(*data, "-", file);
}
printf("%c", f_string_eol[0]);
- fl_color_print(f_type_output, data->context.title, data->context.reset, "Byte Dump of: ");
- fl_color_print(f_type_output, data->context.notable, data->context.reset, "%s", arguments.argv[data->remaining.array[counter]]);
- fl_color_print(f_type_output, data->context.title, data->context.reset, " (in ");
+ fl_color_print(f_type_output, data->context.set.title, "Byte Dump of: ");
+ fl_color_print(f_type_output, data->context.set.notable, "%s", arguments.argv[data->remaining.array[counter]]);
+ fl_color_print(f_type_output, data->context.set.title, " (in ");
if (data->mode == byte_dump_mode_hexidecimal) {
- fl_color_print(f_type_output, data->context.title, data->context.reset, "Hexidecimal");
+ fl_color_print(f_type_output, data->context.set.title, "Hexidecimal");
}
else if (data->mode == byte_dump_mode_duodecimal) {
- fl_color_print(f_type_output, data->context.title, data->context.reset, "Duodecimal");
+ fl_color_print(f_type_output, data->context.set.title, "Duodecimal");
}
else if (data->mode == byte_dump_mode_octal) {
- fl_color_print(f_type_output, data->context.title, data->context.reset, "Octal");
+ fl_color_print(f_type_output, data->context.set.title, "Octal");
}
else if (data->mode == byte_dump_mode_binary) {
- fl_color_print(f_type_output, data->context.title, data->context.reset, "Binary");
+ fl_color_print(f_type_output, data->context.set.title, "Binary");
}
else if (data->mode == byte_dump_mode_decimal) {
- fl_color_print(f_type_output, data->context.title, data->context.reset, "Decimal");
+ fl_color_print(f_type_output, data->context.set.title, "Decimal");
}
- fl_color_print_line(f_type_output, data->context.title, data->context.reset, ")");
+ fl_color_print_line(f_type_output, data->context.set.title, ")");
status = byte_dump_file(*data, arguments.argv[data->remaining.array[counter]], file);
}
}
else {
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "ERROR: You failed to specify one or more filenames.");
+ fl_color_print_line(f_type_error, data->context.set.error, "ERROR: You failed to specify one or more filenames.");
status = F_status_set_error(F_parameter);
}
} // for
f_macro_string_lengths_t_delete_simple(data->remaining);
- fl_macro_color_context_t_delete_simple(data->context);
+ f_macro_color_context_t_delete_simple(data->context);
return F_none;
}
uint8_t mode;
uint8_t presentation;
- fl_color_context_t context;
+ f_color_context_t context;
} byte_dump_data_t;
#define byte_dump_data_t_initialize \
8, \
byte_dump_mode_hexidecimal, \
byte_dump_presentation_normal, \
- fl_color_context_t_initialize, \
+ f_color_context_t_initialize, \
}
#endif // _di_byte_dump_data_t_
* F_none on success.
*/
#ifndef _di_byte_dump_print_help_
- extern f_return_status byte_dump_print_help(const fl_color_context_t context);
+ extern f_return_status byte_dump_print_help(const f_color_context_t context);
#endif // _di_byte_dump_print_help_
/**
fflush(f_type_output);
if (found_invalid_utf) {
- fl_color_print(f_type_error, data.context.error, data.context.reset, "Invalid UTF-8 codes were detected for file '");
- fl_color_print(f_type_error, data.context.notable, data.context.reset, "%s", file_name);
- fl_color_print_line(f_type_error, data.context.error, data.context.reset, "'.");
+ fl_color_print(f_type_error, data.context.set.error, "Invalid UTF-8 codes were detected for file '");
+ fl_color_print(f_type_error, data.context.set.notable, "%s", file_name);
+ fl_color_print_line(f_type_error, data.context.set.error, "'.");
printf("%c", f_string_eol[0]);
}
if (size < 0) {
// @todo: determine what the error from read() is and display it.
- fl_color_print(f_type_error, data.context.error, data.context.reset, "ERROR: read() failed for '");
- fl_color_print(f_type_error, data.context.notable, data.context.reset, "%s", file_name);
- fl_color_print_line(f_type_error, data.context.error, data.context.reset, "'.");
+ fl_color_print(f_type_error, data.context.set.error, "ERROR: read() failed for '");
+ fl_color_print(f_type_error, data.context.set.notable, "%s", file_name);
+ fl_color_print_line(f_type_error, data.context.set.error, "'.");
printf("%c", f_string_eol[0]);
status = F_status_set_error(F_failure);
}
}
if (cell->column == 0) {
- fl_color_print(f_type_output, data.context.notable, data.context.reset, "%016X ", (uint64_t) cell->row);
+ fl_color_print(f_type_output, data.context.set.notable, "%016X ", (uint64_t) cell->row);
if (*offset > 0) {
uint8_t offset_to_print = *offset;
if (cell->column < data.width) {
if (data.mode == byte_dump_mode_hexidecimal) {
if (invalid[character_current]) {
- fl_color_print(f_type_output, data.context.error, data.context.reset, " %02x", (uint8_t) byte);
+ fl_color_print(f_type_output, data.context.set.error, " %02x", (uint8_t) byte);
}
else {
printf(" %02x", (uint8_t) byte);
}
else if (data.mode == byte_dump_mode_octal) {
if (invalid[character_current]) {
- fl_color_print(f_type_output, data.context.error, data.context.reset, " %03o", (uint8_t) byte);
+ fl_color_print(f_type_output, data.context.set.error, " %03o", (uint8_t) byte);
}
else {
printf(" %03o", (uint8_t) byte);
binary_string[7] = (byte & 0x01) ? '1' : '0';
if (invalid[character_current]) {
- fl_color_print(f_type_output, data.context.error, data.context.reset, " %s", binary_string);
+ fl_color_print(f_type_output, data.context.set.error, " %s", binary_string);
}
else {
printf(" %s", binary_string);
}
else if (data.mode == byte_dump_mode_decimal) {
if (invalid[character_current]) {
- fl_color_print(f_type_output, data.context.error, data.context.reset, " %3d", (uint8_t) byte);
+ fl_color_print(f_type_output, data.context.set.error, " %3d", (uint8_t) byte);
}
else {
printf(" %3d", (uint8_t) byte);
uint8_t width_utf = 0;
bool printed = F_false;
- fl_color_print(f_type_output, data.context.notable, data.context.reset, " %s ", byte_dump_character_wall);
+ fl_color_print(f_type_output, data.context.set.notable, " %s ", byte_dump_character_wall);
if (*offset > 0) {
}
while (*offset > 0 && j < data.width) {
- fl_color_print(f_type_output, data.context.warning, data.context.reset, "%s", placeholder);
+ fl_color_print(f_type_output, data.context.set.warning, "%s", placeholder);
(*offset)--;
j++;
} // while
if (data.parameters[byte_dump_parameter_placeholder].result == f_console_result_found) {
for (; j < previous->bytes && j < data.width; j++) {
if (previous->invalid) {
- fl_color_print(f_type_output, data.context.error, data.context.reset, "%s", byte_dump_character_placeholder);
+ fl_color_print(f_type_output, data.context.set.error, "%s", byte_dump_character_placeholder);
}
else if (data.parameters[byte_dump_parameter_classic].result == f_console_result_found) {
printf(".");
}
else {
- fl_color_print(f_type_output, data.context.warning, data.context.reset, "%s", byte_dump_character_placeholder);
+ fl_color_print(f_type_output, data.context.set.warning, "%s", byte_dump_character_placeholder);
}
} // for
}
width_utf = f_macro_utf_byte_width_is(output);
if (invalid[i]) {
- fl_color_print(f_type_output, data.context.error, data.context.reset, "%s", byte_dump_character_incomplete);
+ fl_color_print(f_type_output, data.context.set.error, "%s", byte_dump_character_incomplete);
}
else if (output >= 0 && output <= 32 || output == 127) {
if (data.presentation == byte_dump_presentation_normal) {
if (output == 0) {
- fl_color_print2(f_type_output, data.context.notable, data.context.warning, data.context.reset, "%s", byte_dump_sequence_null);
+ fl_color_print2(f_type_output, data.context.set.notable, data.context.set.warning, "%s", byte_dump_sequence_null);
}
else if (output == 1) {
- fl_color_print2(f_type_output, data.context.notable, data.context.warning, data.context.reset, "%s", byte_dump_sequence_start_of_header);
+ fl_color_print2(f_type_output, data.context.set.notable, data.context.set.warning, "%s", byte_dump_sequence_start_of_header);
}
else if (output == 2) {
- fl_color_print2(f_type_output, data.context.notable, data.context.warning, data.context.reset, "%s", byte_dump_sequence_start_of_text);
+ fl_color_print2(f_type_output, data.context.set.notable, data.context.set.warning, "%s", byte_dump_sequence_start_of_text);
}
else if (output == 3) {
- fl_color_print2(f_type_output, data.context.notable, data.context.warning, data.context.reset, "%s", byte_dump_sequence_end_of_text);
+ fl_color_print2(f_type_output, data.context.set.notable, data.context.set.warning, "%s", byte_dump_sequence_end_of_text);
}
else if (output == 4) {
- fl_color_print2(f_type_output, data.context.notable, data.context.warning, data.context.reset, "%s", byte_dump_sequence_end_of_transmission);
+ fl_color_print2(f_type_output, data.context.set.notable, data.context.set.warning, "%s", byte_dump_sequence_end_of_transmission);
}
else if (output == 5) {
- fl_color_print2(f_type_output, data.context.notable, data.context.warning, data.context.reset, "%s", byte_dump_sequence_end_of_enquiry);
+ fl_color_print2(f_type_output, data.context.set.notable, data.context.set.warning, "%s", byte_dump_sequence_end_of_enquiry);
}
else if (output == 6) {
- fl_color_print2(f_type_output, data.context.notable, data.context.warning, data.context.reset, "%s", byte_dump_sequence_acknowledge);
+ fl_color_print2(f_type_output, data.context.set.notable, data.context.set.warning, "%s", byte_dump_sequence_acknowledge);
}
else if (output == 7) {
- fl_color_print2(f_type_output, data.context.notable, data.context.warning, data.context.reset, "%s", byte_dump_sequence_bell);
+ fl_color_print2(f_type_output, data.context.set.notable, data.context.set.warning, "%s", byte_dump_sequence_bell);
}
else if (output == 8) {
- fl_color_print2(f_type_output, data.context.notable, data.context.warning, data.context.reset, "%s", byte_dump_sequence_backspace);
+ fl_color_print2(f_type_output, data.context.set.notable, data.context.set.warning, "%s", byte_dump_sequence_backspace);
}
else if (output == 9) {
- fl_color_print2(f_type_output, data.context.notable, data.context.warning, data.context.reset, "%s", byte_dump_sequence_tab);
+ fl_color_print2(f_type_output, data.context.set.notable, data.context.set.warning, "%s", byte_dump_sequence_tab);
}
else if (output == 10) {
- fl_color_print2(f_type_output, data.context.notable, data.context.warning, data.context.reset, "%s", byte_dump_sequence_new_line);
+ fl_color_print2(f_type_output, data.context.set.notable, data.context.set.warning, "%s", byte_dump_sequence_new_line);
}
else if (output == 11) {
- fl_color_print2(f_type_output, data.context.notable, data.context.warning, data.context.reset, "%s", byte_dump_sequence_tab_vertical);
+ fl_color_print2(f_type_output, data.context.set.notable, data.context.set.warning, "%s", byte_dump_sequence_tab_vertical);
}
else if (output == 12) {
- fl_color_print2(f_type_output, data.context.notable, data.context.warning, data.context.reset, "%s", byte_dump_sequence_form_feed);
+ fl_color_print2(f_type_output, data.context.set.notable, data.context.set.warning, "%s", byte_dump_sequence_form_feed);
}
else if (output == 13) {
- fl_color_print2(f_type_output, data.context.notable, data.context.warning, data.context.reset, "%s", byte_dump_sequence_carriage_return);
+ fl_color_print2(f_type_output, data.context.set.notable, data.context.set.warning, "%s", byte_dump_sequence_carriage_return);
}
else if (output == 14) {
- fl_color_print2(f_type_output, data.context.notable, data.context.warning, data.context.reset, "%s", byte_dump_sequence_shift_out);
+ fl_color_print2(f_type_output, data.context.set.notable, data.context.set.warning, "%s", byte_dump_sequence_shift_out);
}
else if (output == 15) {
- fl_color_print2(f_type_output, data.context.notable, data.context.warning, data.context.reset, "%s", byte_dump_sequence_shift_in);
+ fl_color_print2(f_type_output, data.context.set.notable, data.context.set.warning, "%s", byte_dump_sequence_shift_in);
}
else if (output == 16) {
- fl_color_print2(f_type_output, data.context.notable, data.context.warning, data.context.reset, "%s", byte_dump_sequence_data_link_escape);
+ fl_color_print2(f_type_output, data.context.set.notable, data.context.set.warning, "%s", byte_dump_sequence_data_link_escape);
}
else if (output == 17) {
- fl_color_print2(f_type_output, data.context.notable, data.context.warning, data.context.reset, "%s", byte_dump_sequence_device_control_1);
+ fl_color_print2(f_type_output, data.context.set.notable, data.context.set.warning, "%s", byte_dump_sequence_device_control_1);
}
else if (output == 18) {
- fl_color_print2(f_type_output, data.context.notable, data.context.warning, data.context.reset, "%s", byte_dump_sequence_device_control_2);
+ fl_color_print2(f_type_output, data.context.set.notable, data.context.set.warning, "%s", byte_dump_sequence_device_control_2);
}
else if (output == 19) {
- fl_color_print2(f_type_output, data.context.notable, data.context.warning, data.context.reset, "%s", byte_dump_sequence_device_control_3);
+ fl_color_print2(f_type_output, data.context.set.notable, data.context.set.warning, "%s", byte_dump_sequence_device_control_3);
}
else if (output == 20) {
- fl_color_print2(f_type_output, data.context.notable, data.context.warning, data.context.reset, "%s", byte_dump_sequence_device_control_4);
+ fl_color_print2(f_type_output, data.context.set.notable, data.context.set.warning, "%s", byte_dump_sequence_device_control_4);
}
else if (output == 21) {
- fl_color_print2(f_type_output, data.context.notable, data.context.warning, data.context.reset, "%s", byte_dump_sequence_negative_acknowledge);
+ fl_color_print2(f_type_output, data.context.set.notable, data.context.set.warning, "%s", byte_dump_sequence_negative_acknowledge);
}
else if (output == 22) {
- fl_color_print2(f_type_output, data.context.notable, data.context.warning, data.context.reset, "%s", byte_dump_sequence_synchronous_idle);
+ fl_color_print2(f_type_output, data.context.set.notable, data.context.set.warning, "%s", byte_dump_sequence_synchronous_idle);
}
else if (output == 23) {
- fl_color_print2(f_type_output, data.context.notable, data.context.warning, data.context.reset, "%s", byte_dump_sequence_end_of_transmission_block);
+ fl_color_print2(f_type_output, data.context.set.notable, data.context.set.warning, "%s", byte_dump_sequence_end_of_transmission_block);
}
else if (output == 24) {
- fl_color_print2(f_type_output, data.context.notable, data.context.warning, data.context.reset, "%s", byte_dump_sequence_cancel);
+ fl_color_print2(f_type_output, data.context.set.notable, data.context.set.warning, "%s", byte_dump_sequence_cancel);
}
else if (output == 25) {
- fl_color_print2(f_type_output, data.context.notable, data.context.warning, data.context.reset, "%s", byte_dump_sequence_end_of_medium);
+ fl_color_print2(f_type_output, data.context.set.notable, data.context.set.warning, "%s", byte_dump_sequence_end_of_medium);
}
else if (output == 26) {
- fl_color_print2(f_type_output, data.context.notable, data.context.warning, data.context.reset, "%s", byte_dump_sequence_substitute);
+ fl_color_print2(f_type_output, data.context.set.notable, data.context.set.warning, "%s", byte_dump_sequence_substitute);
}
else if (output == 27) {
- fl_color_print2(f_type_output, data.context.notable, data.context.warning, data.context.reset, "%s", byte_dump_sequence_escape);
+ fl_color_print2(f_type_output, data.context.set.notable, data.context.set.warning, "%s", byte_dump_sequence_escape);
}
else if (output == 28) {
- fl_color_print2(f_type_output, data.context.notable, data.context.warning, data.context.reset, "%s", byte_dump_sequence_file_separator);
+ fl_color_print2(f_type_output, data.context.set.notable, data.context.set.warning, "%s", byte_dump_sequence_file_separator);
}
else if (output == 29) {
- fl_color_print2(f_type_output, data.context.notable, data.context.warning, data.context.reset, "%s", byte_dump_sequence_group_separator);
+ fl_color_print2(f_type_output, data.context.set.notable, data.context.set.warning, "%s", byte_dump_sequence_group_separator);
}
else if (output == 30) {
- fl_color_print2(f_type_output, data.context.notable, data.context.warning, data.context.reset, "%s", byte_dump_sequence_record_separator);
+ fl_color_print2(f_type_output, data.context.set.notable, data.context.set.warning, "%s", byte_dump_sequence_record_separator);
}
else if (output == 31) {
- fl_color_print2(f_type_output, data.context.notable, data.context.warning, data.context.reset, "%s", byte_dump_sequence_unit_separator);
+ fl_color_print2(f_type_output, data.context.set.notable, data.context.set.warning, "%s", byte_dump_sequence_unit_separator);
}
else if (output == 32) {
- fl_color_print2(f_type_output, data.context.notable, data.context.warning, data.context.reset, "%s", byte_dump_sequence_space);
+ fl_color_print2(f_type_output, data.context.set.notable, data.context.set.warning, "%s", byte_dump_sequence_space);
}
else if (output == 127) {
- fl_color_print2(f_type_output, data.context.notable, data.context.warning, data.context.reset, "%s", byte_dump_sequence_delete);
+ fl_color_print2(f_type_output, data.context.set.notable, data.context.set.warning, "%s", byte_dump_sequence_delete);
}
}
else if (data.presentation == byte_dump_presentation_simple) {
printf(".");
}
else {
- fl_color_print2(f_type_output, data.context.notable, data.context.warning, data.context.reset, "%s", byte_dump_sequence_space);
+ fl_color_print2(f_type_output, data.context.set.notable, data.context.set.warning, "%s", byte_dump_sequence_space);
}
}
else if (f_utf_character_is_zero_width(characters.string[i]) == F_true) {
printf(".");
}
else if (data.parameters[byte_dump_parameter_placeholder].result == f_console_result_found) {
- fl_color_print(f_type_output, data.context.warning, data.context.reset, "%s", byte_dump_character_placeholder);
+ fl_color_print(f_type_output, data.context.set.warning, "%s", byte_dump_character_placeholder);
}
else {
printf(" ");
else if (f_utf_character_is_control(characters.string[i]) == F_true) {
// print a space (or '.') for control characters.
if (data.presentation == byte_dump_presentation_classic) {
- fl_color_print(f_type_output, data.context.warning, data.context.reset, ".");
+ fl_color_print(f_type_output, data.context.set.warning, ".");
}
else {
printf(" ");
else if (width_utf == 1) {
// print invalid placeholder for invalid UTF-8 widths.
if (invalid[i]) {
- fl_color_print(f_type_output, data.context.error, data.context.reset, "%s", byte_dump_character_incomplete);
+ fl_color_print(f_type_output, data.context.set.error, "%s", byte_dump_character_incomplete);
}
else {
- fl_color_print(f_type_output, data.context.warning, data.context.reset, "%s", byte_dump_character_incomplete);
+ fl_color_print(f_type_output, data.context.set.warning, "%s", byte_dump_character_incomplete);
}
}
else if (width_utf > 0) {
if (width_utf > 1 && j + 1 < data.width) {
if (data.parameters[byte_dump_parameter_placeholder].result == f_console_result_found) {
if (invalid[i]) {
- fl_color_print(f_type_output, data.context.error, data.context.reset, "%s", byte_dump_character_placeholder);
+ fl_color_print(f_type_output, data.context.set.error, "%s", byte_dump_character_placeholder);
}
else if (data.parameters[byte_dump_parameter_classic].result == f_console_result_found) {
printf(".");
}
else {
- fl_color_print(f_type_output, data.context.warning, data.context.reset, "%s", byte_dump_character_placeholder);
+ fl_color_print(f_type_output, data.context.set.warning, "%s", byte_dump_character_placeholder);
}
}
else {
if (width_utf > 2 && j + 1 < data.width) {
if (data.parameters[byte_dump_parameter_placeholder].result == f_console_result_found) {
if (invalid[i]) {
- fl_color_print(f_type_output, data.context.error, data.context.reset, "%s", byte_dump_character_placeholder);
+ fl_color_print(f_type_output, data.context.set.error, "%s", byte_dump_character_placeholder);
}
else if (data.parameters[byte_dump_parameter_classic].result == f_console_result_found) {
printf(".");
}
else {
- fl_color_print(f_type_output, data.context.warning, data.context.reset, "%s", byte_dump_character_placeholder);
+ fl_color_print(f_type_output, data.context.set.warning, "%s", byte_dump_character_placeholder);
}
}
else {
if (width_utf > 3 && j + 1 < data.width) {
if (data.parameters[byte_dump_parameter_placeholder].result == f_console_result_found) {
if (invalid[i]) {
- fl_color_print(f_type_output, data.context.error, data.context.reset, "%s", byte_dump_character_placeholder);
+ fl_color_print(f_type_output, data.context.set.error, "%s", byte_dump_character_placeholder);
}
else if (data.parameters[byte_dump_parameter_classic].result == f_console_result_found) {
printf(".");
}
else {
- fl_color_print(f_type_output, data.context.warning, data.context.reset, "%s", byte_dump_character_placeholder);
+ fl_color_print(f_type_output, data.context.set.warning, "%s", byte_dump_character_placeholder);
}
}
else {
if (data.parameters[byte_dump_parameter_placeholder].result == f_console_result_found) {
for (; j < data.width; j++) {
if (invalid[j]) {
- fl_color_print(f_type_output, data.context.error, data.context.reset, "%s", byte_dump_character_placeholder);
+ fl_color_print(f_type_output, data.context.set.error, "%s", byte_dump_character_placeholder);
}
else if (data.parameters[byte_dump_parameter_classic].result == f_console_result_found) {
printf(".");
}
else {
- fl_color_print(f_type_output, data.context.warning, data.context.reset, "%s", byte_dump_character_placeholder);
+ fl_color_print(f_type_output, data.context.set.warning, "%s", byte_dump_character_placeholder);
}
} // for
}
} // for
}
- fl_color_print(f_type_output, data.context.notable, data.context.reset, " |");
+ fl_color_print(f_type_output, data.context.set.notable, " |");
printf("%c", f_string_eol[0]);
}
#endif // _di_byte_dump_file_
#ifndef _di_byte_dump_print_file_error_
- 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) {
+ void byte_dump_print_file_error(const f_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);
- fl_color_print_line(f_type_error, context.error, context.reset, "'.");
+ fl_color_print(f_type_error, context.set.error, "ERROR: Failed to find file '");
+ fl_color_print(f_type_error, context.set.notable, "%s", file_name);
+ fl_color_print_line(f_type_error, context.set.error, "'.");
return;
}
if (status == F_parameter) {
- fl_color_print(f_type_error, context.error, context.reset, "INTERNAL ERROR: Invalid parameter when calling ", function, file_name);
- fl_color_print(f_type_error, context.notable, context.reset, "%s", function);
- fl_color_print(f_type_error, context.error, context.reset, "() for the file '");
- fl_color_print(f_type_error, context.notable, context.reset, "%s", file_name);
- fl_color_print_line(f_type_error, context.error, context.reset, "'.");
+ fl_color_print(f_type_error, context.set.error, "INTERNAL ERROR: Invalid parameter when calling ", function, file_name);
+ fl_color_print(f_type_error, context.set.notable, "%s", function);
+ fl_color_print(f_type_error, context.set.error, "() for the file '");
+ fl_color_print(f_type_error, context.set.notable, "%s", file_name);
+ fl_color_print_line(f_type_error, context.set.error, "'.");
return;
}
if (status == F_name) {
- fl_color_print(f_type_error, context.error, context.reset, "ERROR: Invalid filename '");
- fl_color_print(f_type_error, context.notable, context.reset, "%s", file_name);
- fl_color_print_line(f_type_error, context.error, context.reset, "'.");
+ fl_color_print(f_type_error, context.set.error, "ERROR: Invalid filename '");
+ fl_color_print(f_type_error, context.set.notable, "%s", file_name);
+ fl_color_print_line(f_type_error, context.set.error, "'.");
return;
}
if (status == F_memory_out) {
- fl_color_print(f_type_error, context.error, context.reset, "CRITICAL ERROR: Unable to allocate memory, while trying to access file '");
- fl_color_print(f_type_error, context.notable, context.reset, "%s", file_name);
- fl_color_print_line(f_type_error, context.error, context.reset, "'.");
+ fl_color_print(f_type_error, context.set.error, "CRITICAL ERROR: Unable to allocate memory, while trying to access file '");
+ fl_color_print(f_type_error, context.set.notable, "%s", file_name);
+ fl_color_print_line(f_type_error, context.set.error, "'.");
return;
}
if (status == F_number_overflow) {
- fl_color_print(f_type_error, context.error, context.reset, "ERROR: Overflow while trying to access file '");
- fl_color_print(f_type_error, context.notable, context.reset, "%s", file_name);
- fl_color_print_line(f_type_error, context.error, context.reset, "'.");
+ fl_color_print(f_type_error, context.set.error, "ERROR: Overflow while trying to access file '");
+ fl_color_print(f_type_error, context.set.notable, "%s", file_name);
+ fl_color_print_line(f_type_error, context.set.error, "'.");
return;
}
if (status == F_directory) {
- fl_color_print(f_type_error, context.error, context.reset, "ERROR: Invalid directory while trying to access file '");
- fl_color_print(f_type_error, context.notable, context.reset, "%s", file_name);
- fl_color_print_line(f_type_error, context.error, context.reset, "'.");
+ fl_color_print(f_type_error, context.set.error, "ERROR: Invalid directory while trying to access file '");
+ fl_color_print(f_type_error, context.set.notable, "%s", file_name);
+ fl_color_print_line(f_type_error, context.set.error, "'.");
return;
}
if (status == F_access_denied) {
- fl_color_print(f_type_error, context.error, context.reset, "ERROR: Access denied while trying to access file '");
- fl_color_print(f_type_error, context.notable, context.reset, "%s", file_name);
- fl_color_print_line(f_type_error, context.error, context.reset, "'.");
+ fl_color_print(f_type_error, context.set.error, "ERROR: Access denied while trying to access file '");
+ fl_color_print(f_type_error, context.set.notable, "%s", file_name);
+ fl_color_print_line(f_type_error, context.set.error, "'.");
return;
}
if (status == F_loop) {
- fl_color_print(f_type_error, context.error, context.reset, "ERROR: Loop while trying to access file '");
- fl_color_print(f_type_error, context.notable, context.reset, "%s", file_name);
- fl_color_print_line(f_type_error, context.error, context.reset, "'.");
+ fl_color_print(f_type_error, context.set.error, "ERROR: Loop while trying to access file '");
+ fl_color_print(f_type_error, context.set.notable, "%s", file_name);
+ fl_color_print_line(f_type_error, context.set.error, "'.");
return;
}
- fl_color_print(f_type_error, context.error, context.reset, "UNKNOWN ERROR: (");
- fl_color_print(f_type_error, context.notable, context.reset, "%llu", status);
- fl_color_print(f_type_error, context.error, context.reset, ") occurred for file '");
- fl_color_print(f_type_error, context.notable, context.reset, "%s", file_name);
- fl_color_print_line(f_type_error, context.error, context.reset, "'.");
+ fl_color_print(f_type_error, context.set.error, "UNKNOWN ERROR: (");
+ fl_color_print(f_type_error, context.set.notable, "%llu", status);
+ fl_color_print(f_type_error, context.set.error, ") occurred for file '");
+ fl_color_print(f_type_error, context.set.notable, "%s", file_name);
+ fl_color_print_line(f_type_error, context.set.error, "'.");
}
#endif // _di_byte_dump_print_file_error_
* 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_t context, const f_string_t function, const f_string_t file_name, const f_status_t status) f_gcc_attribute_visibility_internal;
+ extern void byte_dump_print_file_error(const f_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_t context) {
+ f_return_status fake_print_help(const f_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.");
printf("%c%c", f_string_eol[0], f_string_eol[0]);
- fl_color_print(f_type_output, context.important, context.reset, " Special Options: ");
+ fl_color_print(f_type_output, context.set.important, " Special Options: ");
fll_program_print_help_option_long(context, fake_long_documents_disabled, f_console_symbol_long_enable, " Forcibly do not build documents files.");
fll_program_print_help_option_long(context, fake_long_documents_enabled, f_console_symbol_long_enable, " Forcibly do build documents files.");
printf("%c%c", f_string_eol[0], f_string_eol[0]);
- fl_color_print(f_type_output, context.important, context.reset, " Operations: ");
+ fl_color_print(f_type_output, context.set.important, " Operations: ");
fll_program_print_help_option_other(context, fake_other_operation_build, " Build or compile the code based on build settings file.");
fll_program_print_help_option_other(context, fake_other_operation_clean, " Delete all build files.");
fll_program_print_help_usage(context, fake_name, "operation");
printf(" When performing the ");
- fl_color_print(f_type_output, context.notable, context.reset, "%s", fake_other_operation_build);
+ fl_color_print(f_type_output, context.set.notable, "%s", fake_other_operation_build);
printf(" operation, the ");
- fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fake_long_mode);
+ fl_color_print(f_type_output, context.set.notable, "%s%s", f_console_symbol_long_enable, fake_long_mode);
printf(" parameter specifies a name (limited to alpha-numeric, underscore, and dash) to be used in addition to the global.");
printf("%c", f_string_eol[0]);
printf(" For example, when a ");
- fl_color_print(f_type_output, context.notable, context.reset, "%s", fake_long_mode);
+ fl_color_print(f_type_output, context.set.notable, "%s", fake_long_mode);
printf(" of 'fll_monolithic' is specified, build libaries from both 'build_libraries' and 'build_libraries-fll_monolithic' are used (but not 'build_libraries-fll_level').");
printf("%c%c", f_string_eol[0], f_string_eol[0]);
printf(" When specifying the ");
- fl_color_print(f_type_output, context.notable, context.reset, "%s", fake_long_fakefile);
+ fl_color_print(f_type_output, context.set.notable, "%s", fake_long_fakefile);
printf(" or the ");
- fl_color_print(f_type_output, context.notable, context.reset, "%s", fake_long_settings);
+ fl_color_print(f_type_output, context.set.notable, "%s", fake_long_settings);
printf(" parameters, the filenames are relative to the data build directory, unless a path is used.");
printf("%c", f_string_eol[0]);
printf(" For example, with '");
- fl_color_print(f_type_output, context.notable, context.reset, "%s%s my_fakefile", f_console_symbol_long_enable, fake_long_fakefile);
+ fl_color_print(f_type_output, context.set.notable, "%s%s my_fakefile", f_console_symbol_long_enable, fake_long_fakefile);
printf("' the fakefile at '");
- fl_color_print(f_type_output, context.notable, context.reset, "./%s%smy_fakefile", fake_default_path_data, fake_default_path_build);
+ fl_color_print(f_type_output, context.set.notable, "./%s%smy_fakefile", fake_default_path_data, fake_default_path_build);
printf(" would be used, however with '");
- fl_color_print(f_type_output, context.notable, context.reset, "%s%s ./my_fakefile", f_console_symbol_long_enable, fake_long_fakefile);
+ fl_color_print(f_type_output, context.set.notable, "%s%s ./my_fakefile", f_console_symbol_long_enable, fake_long_fakefile);
printf("' the fakefile at '");
- fl_color_print(f_type_output, context.notable, context.reset, "./my_fakefile", fake_default_path_data, fake_default_path_build);
+ fl_color_print(f_type_output, context.set.notable, "./my_fakefile", fake_default_path_data, fake_default_path_build);
printf(" would be used.");
printf("%c%c", f_string_eol[0], f_string_eol[0]);
else if (F_status_is_error(status)) {
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 operation '");
- fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s", operations_name);
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "' failed.");
+ fl_color_print(f_type_error, data->context.set.error, "ERROR: The operation '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s", operations_name);
+ fl_color_print_line(f_type_error, data->context.set.error, "' failed.");
}
break;
else {
if (data->verbosity != fake_verbosity_quiet) {
fprintf(f_type_error, "%c", f_string_eol[0]);
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "ERROR: You failed to specify an operation.");
+ fl_color_print_line(f_type_error, data->context.set.error, "ERROR: You failed to specify an operation.");
fprintf(f_type_error, "%c", f_string_eol[0]);
}
f_macro_string_dynamic_t_delete_simple(data->file_documents_readme);
- fl_macro_color_context_t_delete_simple(data->context);
+ f_macro_color_context_t_delete_simple(data->context);
return F_none;
}
f_string_dynamic_t file_documents_readme;
- fl_color_context_t context;
+ f_color_context_t context;
} fake_data_t;
#define fake_data_t_initialize \
f_string_dynamic_t_initialize, \
f_string_dynamic_t_initialize, \
f_string_dynamic_t_initialize, \
- fl_color_context_t_initialize, \
+ f_color_context_t_initialize, \
}
#endif // _di_fake_data_t_
* F_none on success.
*/
#ifndef _di_fake_print_help_
- extern f_return_status fake_print_help(const fl_color_context_t context);
+ extern f_return_status fake_print_help(const f_color_context_t context);
#endif // _di_fake_print_help_
/**
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);
+ fl_color_print_line(f_type_output, data.context.set.important, "Copying %s.", label);
}
f_macro_string_dynamic_t_new(*status, path_source, source.used);
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, "Creating base build directories.");
+ fl_color_print_line(f_type_output, data.context.set.important, "Creating base build directories.");
}
for (uint8_t i = 0; i < 15; i++) {
if (F_status_set_fine(*status) == F_failure) {
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: Failed to execute script: ");
- fl_color_print(f_type_error, data.context.notable, data.context.reset, "%s", path.string);
- fl_color_print_line(f_type_error, data.context.error, data.context.reset, ".");
+ fl_color_print(f_type_error, data.context.set.error, "ERROR: Failed to execute script: ");
+ fl_color_print(f_type_error, data.context.set.notable, "%s", path.string);
+ fl_color_print_line(f_type_error, data.context.set.error, ".");
}
}
else {
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, "Compiling shared library.");
+ fl_color_print_line(f_type_output, data.context.set.important, "Compiling shared library.");
}
f_string_dynamics_t arguments = f_string_dynamics_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, "Compiling static library.");
+ fl_color_print_line(f_type_output, data.context.set.important, "Compiling static library.");
}
f_string_dynamic_t file_name = f_string_dynamic_t_initialize;
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(f_type_error, data.context.notable, data.context.reset, "%s", fake_build_setting_name_environment);
- fl_color_print(f_type_error, data.context.error, data.context.reset, "' of setting file '");
- fl_color_print(f_type_error, data.context.notable, data.context.reset, "%s", data.file_data_build_settings.string);
- fl_color_print_line(f_type_error, data.context.error, data.context.reset, "' is too large.");
+ fl_color_print(f_type_error, data.context.set.error, "ERROR: The values for the setting '");
+ fl_color_print(f_type_error, data.context.set.notable, "%s", fake_build_setting_name_environment);
+ fl_color_print(f_type_error, data.context.set.error, "' of setting file '");
+ fl_color_print(f_type_error, data.context.set.notable, "%s", data.file_data_build_settings.string);
+ fl_color_print_line(f_type_error, data.context.set.error, "' is too large.");
}
f_macro_string_dynamic_t_delete_simple(part);
for (uint8_t i = 0; i < 1; i++) {
if (settings[i]->used == 0) {
fprintf(f_type_error, "%c", f_string_eol[0]);
- fl_color_print(f_type_error, data.context.error, data.context.reset, "ERROR: The setting '");
- fl_color_print(f_type_error, data.context.notable, data.context.reset, "%s", names[i]);
- fl_color_print(f_type_error, data.context.error, data.context.reset, "' is required but is not specified in the settings file '");
- fl_color_print(f_type_error, data.context.notable, data.context.reset, "%s", setting_file.used ? path_file : data.file_data_build_settings.string);
- fl_color_print_line(f_type_error, data.context.error, data.context.reset, "'.");
+ fl_color_print(f_type_error, data.context.set.error, "ERROR: The setting '");
+ fl_color_print(f_type_error, data.context.set.notable, "%s", names[i]);
+ fl_color_print(f_type_error, data.context.set.error, "' is required but is not specified in the settings file '");
+ fl_color_print(f_type_error, data.context.set.notable, "%s", setting_file.used ? path_file : data.file_data_build_settings.string);
+ fl_color_print_line(f_type_error, data.context.set.error, "'.");
failed = F_true;
}
if (found == F_false) {
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 specified mode '");
- fl_color_print(f_type_error, data.context.notable, data.context.reset, "%s", modes->array[i].string);
- fl_color_print(f_type_error, data.context.error, data.context.reset, "' is not a valid mode, according to '");
- fl_color_print(f_type_error, data.context.notable, data.context.reset, "%s", path_file);
- fl_color_print_line(f_type_error, data.context.error, data.context.reset, "'.");
+ fl_color_print(f_type_error, data.context.set.error, "ERROR: The specified mode '");
+ fl_color_print(f_type_error, data.context.set.notable, "%s", modes->array[i].string);
+ fl_color_print(f_type_error, data.context.set.error, "' is not a valid mode, according to '");
+ fl_color_print(f_type_error, data.context.set.notable, "%s", path_file);
+ fl_color_print_line(f_type_error, data.context.set.error, "'.");
}
error_printed = F_true;
if (data.verbosity != fake_verbosity_quiet) {
// @todo update FSS functions to return which setting index the problem happened on.
fprintf(f_type_error, "%c", f_string_eol[0]);
- fl_color_print(f_type_error, data.context.error, data.context.reset, "ERROR: A setting in the build setting file '");
- fl_color_print(f_type_error, data.context.notable, data.context.reset, "%s", path_file);
- fl_color_print_line(f_type_error, data.context.error, data.context.reset, "' is too long.");
+ fl_color_print(f_type_error, data.context.set.error, "ERROR: A setting in the build setting file '");
+ fl_color_print(f_type_error, data.context.set.notable, "%s", path_file);
+ fl_color_print_line(f_type_error, data.context.set.error, "' is too long.");
}
}
else if (!error_printed) {
if (settings_single_source[i]->used > 1) {
if (data.verbosity == fake_verbosity_verbose) {
fprintf(f_type_warning, "%c", f_string_eol[0]);
- fl_color_print(f_type_warning, data.context.warning, data.context.reset, "WARNING: the setting '");
- fl_color_print(f_type_warning, data.context.notable, data.context.reset, "%s", settings_single_name[i]);
- fl_color_print(f_type_warning, data.context.warning, data.context.reset, "' in the file '");
- fl_color_print(f_type_warning, data.context.notable, data.context.reset, "%s", path_file);
- fl_color_print(f_type_warning, data.context.warning, data.context.reset, "' may only have a single property, only using the first: '");
- fl_color_print(f_type_warning, data.context.notable, data.context.reset, "%s", settings_single_source[i]->array[0].string);
- fl_color_print_line(f_type_warning, data.context.warning, data.context.reset, "'.");
+ fl_color_print(f_type_warning, data.context.set.warning, "WARNING: the setting '");
+ fl_color_print(f_type_warning, data.context.set.notable, "%s", settings_single_name[i]);
+ fl_color_print(f_type_warning, data.context.set.warning, "' in the file '");
+ fl_color_print(f_type_warning, data.context.set.notable, "%s", path_file);
+ fl_color_print(f_type_warning, data.context.set.warning, "' may only have a single property, only using the first: '");
+ fl_color_print(f_type_warning, data.context.set.notable, "%s", settings_single_source[i]->array[0].string);
+ fl_color_print_line(f_type_warning, data.context.set.warning, "'.");
}
}
if (data.verbosity == fake_verbosity_verbose) {
fprintf(f_type_warning, "%c", f_string_eol[0]);
- fl_color_print(f_type_warning, data.context.warning, data.context.reset, "WARNING: the setting '");
- fl_color_print(f_type_warning, data.context.notable, data.context.reset, "%s", settings_single_name[i]);
- fl_color_print(f_type_warning, data.context.warning, data.context.reset, "' in the file '");
- fl_color_print(f_type_warning, data.context.notable, data.context.reset, "%s", path_file);
- fl_color_print(f_type_warning, data.context.warning, data.context.reset, "' may be either '");
- fl_color_print(f_type_warning, data.context.notable, data.context.reset, "%s", fake_common_setting_bool_yes);
- fl_color_print(f_type_warning, data.context.warning, data.context.reset, "' or '");
- fl_color_print(f_type_warning, data.context.notable, data.context.reset, "%s", fake_common_setting_bool_no);
- fl_color_print(f_type_warning, data.context.warning, data.context.reset, "', defaulting to '");
- fl_color_print(f_type_warning, data.context.notable, data.context.reset, "%s", fake_common_setting_bool_yes);
- fl_color_print_line(f_type_warning, data.context.warning, data.context.reset, "'.");
+ fl_color_print(f_type_warning, data.context.set.warning, "WARNING: the setting '");
+ fl_color_print(f_type_warning, data.context.set.notable, "%s", settings_single_name[i]);
+ fl_color_print(f_type_warning, data.context.set.warning, "' in the file '");
+ fl_color_print(f_type_warning, data.context.set.notable, "%s", path_file);
+ fl_color_print(f_type_warning, data.context.set.warning, "' may be either '");
+ fl_color_print(f_type_warning, data.context.set.notable, "%s", fake_common_setting_bool_yes);
+ fl_color_print(f_type_warning, data.context.set.warning, "' or '");
+ fl_color_print(f_type_warning, data.context.set.notable, "%s", fake_common_setting_bool_no);
+ fl_color_print(f_type_warning, data.context.set.warning, "', defaulting to '");
+ fl_color_print(f_type_warning, data.context.set.notable, "%s", fake_common_setting_bool_yes);
+ fl_color_print_line(f_type_warning, data.context.set.warning, "'.");
}
}
}
if (data.verbosity == fake_verbosity_verbose) {
fprintf(f_type_warning, "%c", f_string_eol[0]);
- fl_color_print(f_type_warning, data.context.warning, data.context.reset, "WARNING: the setting '");
- fl_color_print(f_type_warning, data.context.notable, data.context.reset, "%s", settings_single_name[i]);
- fl_color_print(f_type_warning, data.context.warning, data.context.reset, "' in the file '");
- fl_color_print(f_type_warning, data.context.notable, data.context.reset, "%s", path_file);
- fl_color_print(f_type_warning, data.context.warning, data.context.reset, "' may only be one of '");
- fl_color_print(f_type_warning, data.context.notable, data.context.reset, "%s", fake_build_language_bash);
- fl_color_print(f_type_warning, data.context.warning, data.context.reset, "', '");
- fl_color_print(f_type_warning, data.context.notable, data.context.reset, "%s", fake_build_language_c);
- fl_color_print(f_type_warning, data.context.warning, data.context.reset, "', or '");
- fl_color_print(f_type_warning, data.context.notable, data.context.reset, "%s", fake_build_language_cpp);
- fl_color_print(f_type_warning, data.context.warning, data.context.reset, "', defaulting to '");
- fl_color_print(f_type_warning, data.context.notable, data.context.reset, "%s", fake_build_language_c);
- fl_color_print_line(f_type_warning, data.context.warning, data.context.reset, "'.");
+ fl_color_print(f_type_warning, data.context.set.warning, "WARNING: the setting '");
+ fl_color_print(f_type_warning, data.context.set.notable, "%s", settings_single_name[i]);
+ fl_color_print(f_type_warning, data.context.set.warning, "' in the file '");
+ fl_color_print(f_type_warning, data.context.set.notable, "%s", path_file);
+ fl_color_print(f_type_warning, data.context.set.warning, "' may only be one of '");
+ fl_color_print(f_type_warning, data.context.set.notable, "%s", fake_build_language_bash);
+ fl_color_print(f_type_warning, data.context.set.warning, "', '");
+ fl_color_print(f_type_warning, data.context.set.notable, "%s", fake_build_language_c);
+ fl_color_print(f_type_warning, data.context.set.warning, "', or '");
+ fl_color_print(f_type_warning, data.context.set.notable, "%s", fake_build_language_cpp);
+ fl_color_print(f_type_warning, data.context.set.warning, "', defaulting to '");
+ fl_color_print(f_type_warning, data.context.set.notable, "%s", fake_build_language_c);
+ fl_color_print_line(f_type_warning, data.context.set.warning, "'.");
}
}
}
if (data.verbosity == fake_verbosity_verbose) {
fprintf(f_type_warning, "%c", f_string_eol[0]);
- fl_color_print(f_type_warning, data.context.warning, data.context.reset, "WARNING: the setting '");
- fl_color_print(f_type_warning, data.context.notable, data.context.reset, "%s", settings_single_name[i]);
- fl_color_print(f_type_warning, data.context.warning, data.context.reset, "' in the file '");
- fl_color_print(f_type_warning, data.context.notable, data.context.reset, "%s", path_file);
- fl_color_print(f_type_warning, data.context.warning, data.context.reset, "' may only be one of '");
- fl_color_print(f_type_warning, data.context.notable, data.context.reset, "%s", fake_build_version_major);
- fl_color_print(f_type_warning, data.context.warning, data.context.reset, "', '");
- fl_color_print(f_type_warning, data.context.notable, data.context.reset, "%s", fake_build_version_minor);
- fl_color_print(f_type_warning, data.context.warning, data.context.reset, "', or '");
- fl_color_print(f_type_warning, data.context.notable, data.context.reset, "%s", fake_build_version_micro);
- fl_color_print(f_type_warning, data.context.warning, data.context.reset, "', defaulting to '");
- fl_color_print(f_type_warning, data.context.notable, data.context.reset, "%s", fake_build_version_major);
- fl_color_print_line(f_type_warning, data.context.warning, data.context.reset, "'.");
+ fl_color_print(f_type_warning, data.context.set.warning, "WARNING: the setting '");
+ fl_color_print(f_type_warning, data.context.set.notable, "%s", settings_single_name[i]);
+ fl_color_print(f_type_warning, data.context.set.warning, "' in the file '");
+ fl_color_print(f_type_warning, data.context.set.notable, "%s", path_file);
+ fl_color_print(f_type_warning, data.context.set.warning, "' may only be one of '");
+ fl_color_print(f_type_warning, data.context.set.notable, "%s", fake_build_version_major);
+ fl_color_print(f_type_warning, data.context.set.warning, "', '");
+ fl_color_print(f_type_warning, data.context.set.notable, "%s", fake_build_version_minor);
+ fl_color_print(f_type_warning, data.context.set.warning, "', or '");
+ fl_color_print(f_type_warning, data.context.set.notable, "%s", fake_build_version_micro);
+ fl_color_print(f_type_warning, data.context.set.warning, "', defaulting to '");
+ fl_color_print(f_type_warning, data.context.set.notable, "%s", fake_build_version_major);
+ fl_color_print_line(f_type_warning, data.context.set.warning, "'.");
}
}
}
if (data.verbosity == fake_verbosity_verbose) {
fprintf(f_type_warning, "%c", f_string_eol[0]);
- fl_color_print(f_type_warning, data.context.error, data.context.reset, "WARNING: the parameters '");
- fl_color_print(f_type_warning, data.context.notable, data.context.reset, "%s%s", f_console_symbol_long_enable, fake_long_shared_disabled);
- fl_color_print(f_type_warning, data.context.error, data.context.reset, "' and '");
- fl_color_print(f_type_warning, data.context.notable, data.context.reset, "%s%s", f_console_symbol_long_enable, fake_long_shared_enabled);
- fl_color_print(f_type_warning, data.context.error, data.context.reset, "' contradict, defaulting to '");
+ fl_color_print(f_type_warning, data.context.set.error, "WARNING: the parameters '");
+ fl_color_print(f_type_warning, data.context.set.notable, "%s%s", f_console_symbol_long_enable, fake_long_shared_disabled);
+ fl_color_print(f_type_warning, data.context.set.error, "' and '");
+ fl_color_print(f_type_warning, data.context.set.notable, "%s%s", f_console_symbol_long_enable, fake_long_shared_enabled);
+ fl_color_print(f_type_warning, data.context.set.error, "' contradict, defaulting to '");
if (setting->build_shared) {
- fl_color_print(f_type_warning, data.context.notable, data.context.reset, "%s%s", f_console_symbol_long_enable, fake_long_shared_enabled);
+ fl_color_print(f_type_warning, data.context.set.notable, "%s%s", f_console_symbol_long_enable, fake_long_shared_enabled);
}
else {
- fl_color_print(f_type_warning, data.context.notable, data.context.reset, "%s%s", f_console_symbol_long_enable, fake_long_shared_disabled);
+ fl_color_print(f_type_warning, data.context.set.notable, "%s%s", f_console_symbol_long_enable, fake_long_shared_disabled);
}
- fl_color_print_line(f_type_warning, data.context.error, data.context.reset, "'.");
+ fl_color_print_line(f_type_warning, data.context.set.error, "'.");
}
}
else {
if (data.verbosity == fake_verbosity_verbose) {
fprintf(f_type_warning, "%c", f_string_eol[0]);
- fl_color_print(f_type_warning, data.context.error, data.context.reset, "WARNING: the parameters '");
- fl_color_print(f_type_warning, data.context.notable, data.context.reset, "%s%s", f_console_symbol_long_enable, fake_long_static_disabled);
- fl_color_print(f_type_warning, data.context.error, data.context.reset, "' and '");
- fl_color_print(f_type_warning, data.context.notable, data.context.reset, "%s%s", f_console_symbol_long_enable, fake_long_static_enabled);
- fl_color_print(f_type_warning, data.context.error, data.context.reset, "' contradict, defaulting to '");
+ fl_color_print(f_type_warning, data.context.set.error, "WARNING: the parameters '");
+ fl_color_print(f_type_warning, data.context.set.notable, "%s%s", f_console_symbol_long_enable, fake_long_static_disabled);
+ fl_color_print(f_type_warning, data.context.set.error, "' and '");
+ fl_color_print(f_type_warning, data.context.set.notable, "%s%s", f_console_symbol_long_enable, fake_long_static_enabled);
+ fl_color_print(f_type_warning, data.context.set.error, "' contradict, defaulting to '");
if (setting->build_static) {
- fl_color_print(f_type_warning, data.context.notable, data.context.reset, "%s%s", f_console_symbol_long_enable, fake_long_static_enabled);
+ fl_color_print(f_type_warning, data.context.set.notable, "%s%s", f_console_symbol_long_enable, fake_long_static_enabled);
}
else {
- fl_color_print(f_type_warning, data.context.notable, data.context.reset, "%s%s", f_console_symbol_long_enable, fake_long_static_disabled);
+ fl_color_print(f_type_warning, data.context.set.notable, "%s%s", f_console_symbol_long_enable, fake_long_static_disabled);
}
- fl_color_print_line(f_type_warning, data.context.error, data.context.reset, "'.");
+ fl_color_print_line(f_type_warning, data.context.set.error, "'.");
}
}
else {
if (setting->build_shared == F_false && setting->build_static == F_false) {
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 build settings '");
- fl_color_print(f_type_error, data.context.notable, data.context.reset, "%s", fake_build_setting_name_build_shared);
- 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, "%s", fake_build_setting_name_build_static);
- fl_color_print(f_type_error, data.context.error, data.context.reset, "' cannot both be false when using the language '");
+ fl_color_print(f_type_error, data.context.set.error, "ERROR: The build settings '");
+ fl_color_print(f_type_error, data.context.set.notable, "%s", fake_build_setting_name_build_shared);
+ fl_color_print(f_type_error, data.context.set.error, "' and '");
+ fl_color_print(f_type_error, data.context.set.notable, "%s", fake_build_setting_name_build_static);
+ fl_color_print(f_type_error, data.context.set.error, "' cannot both be false when using the language '");
if (setting->build_language == fake_build_language_type_c) {
- fl_color_print(f_type_error, data.context.notable, data.context.reset, "%s", fake_build_language_c);
+ fl_color_print(f_type_error, data.context.set.notable, "%s", fake_build_language_c);
}
else {
- fl_color_print(f_type_error, data.context.notable, data.context.reset, "%s", fake_build_language_cpp);
+ fl_color_print(f_type_error, data.context.set.notable, "%s", fake_build_language_cpp);
}
- fl_color_print_line(f_type_error, data.context.error, data.context.reset, "'.");
+ fl_color_print_line(f_type_error, data.context.set.error, "'.");
}
*status = F_status_set_error(F_failure);
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, "Compiling static objects.");
+ fl_color_print_line(f_type_output, data.context.set.important, "Compiling static objects.");
}
f_string_dynamic_t file_name = f_string_dynamic_t_initialize;
if (*status == F_false) {
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 path '");
- fl_color_print(f_type_error, data.context.notable, data.context.reset, "%s", destination_path.string);
- fl_color_print_line(f_type_error, data.context.error, data.context.reset, "' exists but is not a directory.");
+ fl_color_print(f_type_error, data.context.set.error, "ERROR: The path '");
+ fl_color_print(f_type_error, data.context.set.notable, "%s", destination_path.string);
+ fl_color_print_line(f_type_error, data.context.set.error, "' exists but is not a directory.");
}
*status = F_status_set_error(F_failure);
if (F_status_is_error(*status)) {
if (F_status_set_fine(*status) == F_file_found_not) {
fprintf(f_type_error, "%c", f_string_eol[0]);
- fl_color_print(f_type_error, data.context.error, data.context.reset, "ERROR: The path '");
- fl_color_print(f_type_error, data.context.notable, data.context.reset, "%s", destination_path.string);
- fl_color_print_line(f_type_error, data.context.error, data.context.reset, "' could not be created, a parent directory does not exist.");
+ fl_color_print(f_type_error, data.context.set.error, "ERROR: The path '");
+ fl_color_print(f_type_error, data.context.set.notable, "%s", destination_path.string);
+ fl_color_print_line(f_type_error, data.context.set.error, "' could not be created, a parent directory does not exist.");
}
else {
fake_print_error_file(data, F_status_set_fine(*status), "f_directory_create", destination_path.string, "create", F_false, F_true);
if (F_status_is_fine(status)) {
if (data.verbosity != fake_verbosity_quiet) {
printf("%c", f_string_eol[0]);
- fl_color_print(f_type_output, data.context.important, data.context.reset, "Building project%c", data_build.setting.project_name.used ? ' ' : 0);
+ fl_color_print(f_type_output, data.context.set.important, "Building project%c", data_build.setting.project_name.used ? ' ' : 0);
if (data_build.setting.project_name.used) {
fl_color_print_code(f_type_output, data.context.notable);
fl_color_print_code(f_type_output, data.context.reset);
}
- fl_color_print_line(f_type_output, data.context.important, data.context.reset, ".");
+ fl_color_print_line(f_type_output, data.context.set.important, ".");
}
}
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, "Compiling shared program.");
+ fl_color_print_line(f_type_output, data.context.set.important, "Compiling shared program.");
}
f_string_dynamics_t arguments = f_string_dynamics_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, "Compiling static program.");
+ fl_color_print_line(f_type_output, data.context.set.important, "Compiling static program.");
}
f_string_dynamics_t arguments = f_string_dynamics_t_initialize;
if (data.verbosity != fake_verbosity_quiet) {
printf("%c", f_string_eol[0]);
- fl_color_print(f_type_output, data.context.important, data.context.reset, "Deleting all files within build directory '");
- fl_color_print(f_type_output, data.context.notable, data.context.reset, "%s", data.path_build.string);
- fl_color_print_line(f_type_output, data.context.important, data.context.reset, "'.");
+ fl_color_print(f_type_output, data.context.set.important, "Deleting all files within build directory '");
+ fl_color_print(f_type_output, data.context.set.notable, "%s", data.path_build.string);
+ fl_color_print_line(f_type_output, data.context.set.important, "'.");
}
if (fake_signal_received(data)) {
if (F_status_set_fine(*status) == F_file_found_not) {
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: Failed to find program '");
- fl_color_print(f_type_error, data.context.notable, data.context.reset, "%s", program.used ? program.string : "");
- fl_color_print_line(f_type_error, data.context.error, data.context.reset, "' for executing.");
+ fl_color_print(f_type_error, data.context.set.error, "ERROR: Failed to find program '");
+ fl_color_print(f_type_error, data.context.set.notable, "%s", program.used ? program.string : "");
+ fl_color_print_line(f_type_error, data.context.set.error, "' for executing.");
}
}
else {
if (F_status_is_error(status)) {
if (fake_print_error(*data, F_status_set_fine(status), "f_utf_is_word_dash_plus", 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 process the parameter '");
- fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fake_long_process);
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "'.");
+ fl_color_print(f_type_error, data->context.set.error, "ERROR: Failed to process the parameter '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fake_long_process);
+ fl_color_print_line(f_type_error, data->context.set.error, "'.");
}
return status;
if (status == F_false) {
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 '");
- fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fake_long_process);
- fl_color_print(f_type_error, data->context.error, data->context.reset, "' parameters value '");
- fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s", arguments.argv[location]);
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "' contains non-word, non-dash, and non-plus characters.");
+ fl_color_print(f_type_error, data->context.set.error, "ERROR: The '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fake_long_process);
+ fl_color_print(f_type_error, data->context.set.error, "' parameters value '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s", arguments.argv[location]);
+ fl_color_print_line(f_type_error, data->context.set.error, "' contains non-word, non-dash, and non-plus characters.");
}
return F_status_set_error(F_parameter);
if (status == F_status_set_error(F_string_too_large)) {
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 parameter '");
- fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, parameters_name[i]);
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "' is too long.");
+ fl_color_print(f_type_error, data->context.set.error, "ERROR: The parameter '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, parameters_name[i]);
+ fl_color_print_line(f_type_error, data->context.set.error, "' is too long.");
}
}
else {
if (length == 0 || status == F_data_not) {
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 parameter '");
- fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, parameters_name[i]);
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "' must not be empty and must not contain only whitespace.");
+ fl_color_print(f_type_error, data->context.set.error, "ERROR: The parameter '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, parameters_name[i]);
+ fl_color_print_line(f_type_error, data->context.set.error, "' must not be empty and must not contain only whitespace.");
}
}
}
if (F_status_is_error(status)) {
if (fake_print_error(*data, F_status_set_fine(status), "fl_console_parameter_to_string_dynamic_directory", 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 process parameter '");
- fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, parameters_name[i]);
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "'.");
+ fl_color_print(f_type_error, data->context.set.error, "ERROR: Failed to process parameter '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, parameters_name[i]);
+ fl_color_print_line(f_type_error, data->context.set.error, "'.");
}
return status;
if (F_status_is_error(status)) {
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]);
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "'.");
+ fl_color_print(f_type_error, data->context.set.error, "ERROR: Failed to load default for the parameter '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, parameters_name[i]);
+ fl_color_print_line(f_type_error, data->context.set.error, "'.");
}
return status;
if (F_status_is_error(status)) {
if (fake_print_error(*data, F_status_set_fine(status), "fll_program_parameter_additional_rip", 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 process the parameter '");
- fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fake_long_define);
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "'.");
+ fl_color_print(f_type_error, data->context.set.error, "ERROR: Failed to process the parameter '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fake_long_define);
+ fl_color_print_line(f_type_error, data->context.set.error, "'.");
}
return status;
if (F_status_is_error(status)) {
if (fake_print_error(*data, F_status_set_fine(status), "f_utf_is_word", 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 process the parameter '");
- fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fake_long_define);
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "'.");
+ fl_color_print(f_type_error, data->context.set.error, "ERROR: Failed to process the parameter '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fake_long_define);
+ fl_color_print_line(f_type_error, data->context.set.error, "'.");
}
return status;
if (status == F_false) {
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 '");
- fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fake_long_define);
- fl_color_print(f_type_error, data->context.error, data->context.reset, "' parameters value '");
- fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s", data->define.array[i].string);
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "' contains non-word characters.");
+ fl_color_print(f_type_error, data->context.set.error, "ERROR: The '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fake_long_define);
+ fl_color_print(f_type_error, data->context.set.error, "' parameters value '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s", data->define.array[i].string);
+ fl_color_print_line(f_type_error, data->context.set.error, "' contains non-word characters.");
}
return F_status_set_error(F_parameter);
if (F_status_is_error(status)) {
if (fake_print_error(*data, F_status_set_fine(status), "fll_program_parameter_additional_rip", 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 process the parameter '");
- fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fake_long_mode);
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "'.");
+ fl_color_print(f_type_error, data->context.set.error, "ERROR: Failed to process the parameter '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fake_long_mode);
+ fl_color_print_line(f_type_error, data->context.set.error, "'.");
}
return status;
if (F_status_is_error(status)) {
if (fake_print_error(*data, F_status_set_fine(status), "f_utf_is_word_dash_plus", 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 process the parameter '");
- fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fake_long_mode);
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "'.");
+ fl_color_print(f_type_error, data->context.set.error, "ERROR: Failed to process the parameter '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fake_long_mode);
+ fl_color_print_line(f_type_error, data->context.set.error, "'.");
}
return status;
if (status == F_false) {
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 '");
- fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fake_long_mode);
- fl_color_print(f_type_error, data->context.error, data->context.reset, "' parameters value '");
- fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s", data->mode.array[i].string);
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "' contains non-word, non-dash, and non-plus characters.");
+ fl_color_print(f_type_error, data->context.set.error, "ERROR: The '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fake_long_mode);
+ fl_color_print(f_type_error, data->context.set.error, "' parameters value '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s", data->mode.array[i].string);
+ fl_color_print_line(f_type_error, data->context.set.error, "' contains non-word, non-dash, and non-plus characters.");
}
return F_status_set_error(F_parameter);
if (data.verbosity != fake_verbosity_quiet) {
fprintf(f_type_error, "%c", f_string_eol[0]);
- fl_color_print_line(f_type_error, data.context.error, data.context.reset, "ALERT: An appropriate exit signal has been received, now aborting.");
+ fl_color_print_line(f_type_error, data.context.set.error, "ALERT: An appropriate exit signal has been received, now aborting.");
}
return F_true;
}
else if (parameters_required[i]) {
fprintf(f_type_error, "%c", f_string_eol[0]);
- fl_color_print(f_type_error, data.context.error, data.context.reset, "ERROR: No valid path for the (required) directory parameter '");
- fl_color_print(f_type_error, data.context.notable, data.context.reset, "%s%s", f_console_symbol_long_enable, parameters_name[i]);
- fl_color_print_line(f_type_error, data.context.error, data.context.reset, "' was found.");
+ fl_color_print(f_type_error, data.context.set.error, "ERROR: No valid path for the (required) directory parameter '");
+ fl_color_print(f_type_error, data.context.set.notable, "%s%s", f_console_symbol_long_enable, parameters_name[i]);
+ fl_color_print_line(f_type_error, data.context.set.error, "' was found.");
return F_status_set_error(F_directory_found_not);
}
else if (status == F_exist_not) {
if (data.verbosity != fake_verbosity_quiet) {
fprintf(print.to, "%c", f_string_eol[0]);
- fl_color_print(print.to, print.context, data.context.reset, "%s: The group name '", print.prefix);
- fl_color_print(print.to, data.context.notable, data.context.reset, "%s", buffer.string);
- fl_color_print_line(print.to, print.context, data.context.reset, "' was not found.");
+ fl_color_print(print.to, print.context, "%s: The group name '", print.prefix);
+ fl_color_print(print.to, data.context.set.notable, "%s", buffer.string);
+ fl_color_print_line(print.to, print.context, "' was not found.");
}
return F_status_set_error(F_failure);
else if (number > f_type_size_32_unsigned) {
if (data.verbosity != fake_verbosity_quiet) {
fprintf(print.to, "%c", f_string_eol[0]);
- fl_color_print(print.to, print.context, data.context.reset, "%s: The number '", print.prefix);
- fl_color_print(print.to, data.context.notable, data.context.reset, "%llu", number);
- fl_color_print_line(print.to, print.context, data.context.reset, "' is too large.");
+ fl_color_print(print.to, print.context, "%s: The number '", print.prefix);
+ fl_color_print(print.to, data.context.set.notable, "%llu", number);
+ fl_color_print_line(print.to, print.context, "' is too large.");
}
}
if (data.verbosity != fake_verbosity_quiet) {
if (F_status_set_fine(status) == F_syntax) {
fprintf(print.to, "%c", f_string_eol[0]);
- fl_color_print(print.to, print.context, data.context.reset, "%s: The mode '", print.prefix);
- fl_color_print(print.to, data.context.notable, data.context.reset, "%s", buffer.string);
- fl_color_print_line(print.to, print.context, data.context.reset, "' is invalid.");
+ fl_color_print(print.to, print.context, "%s: The mode '", print.prefix);
+ fl_color_print(print.to, data.context.set.notable, "%s", buffer.string);
+ fl_color_print_line(print.to, print.context, "' is invalid.");
}
else {
fake_print_message(data, status, "f_file_mode_from_string", F_true, print);
else if (status == F_exist_not) {
if (data.verbosity != fake_verbosity_quiet) {
fprintf(print.to, "%c", f_string_eol[0]);
- fl_color_print(print.to, print.context, data.context.reset, "%s: The user name '", print.prefix);
- fl_color_print(print.to, data.context.notable, data.context.reset, "%s", buffer.string);
- fl_color_print_line(print.to, print.context, data.context.reset, "' was not found.");
+ fl_color_print(print.to, print.context, "%s: The user name '", print.prefix);
+ fl_color_print(print.to, data.context.set.notable, "%s", buffer.string);
+ fl_color_print_line(print.to, print.context, "' was not found.");
}
return F_status_set_error(F_failure);
else if (number > f_type_size_32_unsigned) {
if (data.verbosity != fake_verbosity_quiet) {
fprintf(print.to, "%c", f_string_eol[0]);
- fl_color_print(print.to, print.context, data.context.reset, "%s: The number '", print.prefix);
- fl_color_print(print.to, data.context.notable, data.context.reset, "%llu", number);
- fl_color_print_line(print.to, print.context, data.context.reset, "' is too large.");
+ fl_color_print(print.to, print.context, "%s: The number '", print.prefix);
+ fl_color_print(print.to, data.context.set.notable, "%llu", number);
+ fl_color_print_line(print.to, print.context, "' is too large.");
}
}
if (!data_make->buffer.used) {
if (data.verbosity == fake_verbosity_verbose) {
fprintf(f_type_error, "%c", f_string_eol[0]);
- fl_color_print(f_type_warning, data.context.warning, data.context.reset, "WARNING: the fakefile '");
- fl_color_print(f_type_warning, data.context.notable, data.context.reset, "%s", data.file_data_build_fakefile.string);
- fl_color_print(f_type_warning, data.context.warning, data.context.reset, "' is empty.");
+ fl_color_print(f_type_warning, data.context.set.warning, "WARNING: the fakefile '");
+ fl_color_print(f_type_warning, data.context.set.notable, "%s", data.file_data_build_fakefile.string);
+ fl_color_print(f_type_warning, data.context.set.warning, "' is empty.");
}
return;
if (missing_main) {
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 fakefile '");
- fl_color_print(f_type_error, data.context.notable, data.context.reset, "%s", data.file_data_build_fakefile.string);
- fl_color_print(f_type_error, data.context.error, data.context.reset, "' is missing the required '");
- fl_color_print(f_type_error, data.context.notable, data.context.reset, "%s", fake_make_section_main);
- fl_color_print_line(f_type_error, data.context.error, data.context.reset, "' object.");
+ fl_color_print(f_type_error, data.context.set.error, "ERROR: The fakefile '");
+ fl_color_print(f_type_error, data.context.set.notable, "%s", data.file_data_build_fakefile.string);
+ fl_color_print(f_type_error, data.context.set.error, "' is missing the required '");
+ fl_color_print(f_type_error, data.context.set.notable, "%s", fake_make_section_main);
+ fl_color_print_line(f_type_error, data.context.set.error, "' object.");
}
*status = F_status_set_error(F_failure);
}
else if (data.verbosity == fake_verbosity_verbose) {
fprintf(f_type_warning, "%c", f_string_eol[0]);
- fl_color_print(f_type_warning, data.context.warning, data.context.reset, "WARNING: The environment name '");
- fl_color_print(f_type_warning, data.context.notable, data.context.reset, "%s", name_define.string);
- fl_color_print_line(f_type_warning, data.context.warning, data.context.reset, "' is already added.");
+ fl_color_print(f_type_warning, data.context.set.warning, "WARNING: The environment name '");
+ fl_color_print(f_type_warning, data.context.set.notable, "%s", name_define.string);
+ fl_color_print_line(f_type_warning, data.context.set.warning, "' is already added.");
}
}
else if (data.verbosity == fake_verbosity_verbose) {
fprintf(f_type_warning, "%c", f_string_eol[0]);
- fl_color_print(f_type_warning, data.context.warning, data.context.reset, "WARNING: The environment name '");
- fl_color_print(f_type_warning, data.context.notable, data.context.reset, "%s", name_define.string);
- fl_color_print_line(f_type_warning, data.context.warning, data.context.reset, "' is invalid, ignoring.");
+ fl_color_print(f_type_warning, data.context.set.warning, "WARNING: The environment name '");
+ fl_color_print(f_type_warning, data.context.set.notable, "%s", name_define.string);
+ fl_color_print_line(f_type_warning, data.context.set.warning, "' is invalid, ignoring.");
}
name_define.used = 0;
else {
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: Invalid characters in the define setting name '");
+ fl_color_print(f_type_error, data.context.set.error, "ERROR: Invalid characters in the define setting name '");
fl_color_print_code(f_type_error, data.context.notable);
f_print_dynamic(f_type_error, define.array[i].name);
fl_color_print_code(f_type_error, data.context.reset);
- fl_color_print_line(f_type_error, data.context.error, data.context.reset, "', only alpha-numeric ASCII characters and underscore (without a leading digit) is allowed.");
+ fl_color_print_line(f_type_error, data.context.set.error, "', only alpha-numeric ASCII characters and underscore (without a leading digit) is allowed.");
}
*status = F_status_set_error(F_failure);
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.");
+ fl_color_print_line(f_type_output, data.context.set.important, "Making project.");
}
f_status_t status = F_none;
if (data_make.setting_make.fail == fake_make_operation_fail_type_exit) {
data_make.print.prefix = fake_make_print_error;
- data_make.print.context = data.context.error;
+ data_make.print.context = data.context.set.error;
data_make.print.to = f_type_error;
}
else if (data_make.setting_make.fail == fake_make_operation_fail_type_warn) {
data_make.print.prefix = fake_make_print_warning;
- data_make.print.context = data.context.warning;
+ data_make.print.context = data.context.set.warning;
data_make.print.to = f_type_warning;
}
else {
if (F_status_is_error(status_path) && data.verbosity == fake_verbosity_verbose) {
fprintf(f_type_warning, "%c", f_string_eol[0]);
- fl_color_print(f_type_warning, data.context.warning, data.context.reset, "WARNING: Failed change back to orignal path '");
- fl_color_print(f_type_warning, data.context.notable, data.context.reset, "%s", data_make.path.stack.array[0].string);
- fl_color_print(f_type_warning, data.context.warning, data.context.reset, "', status code = ");
- fl_color_print(f_type_warning, data.context.notable, data.context.reset, "%llu", F_status_set_fine(status_path));
- fl_color_print_line(f_type_warning, data.context.warning, data.context.reset, ".");
+ fl_color_print(f_type_warning, data.context.set.warning, "WARNING: Failed change back to orignal path '");
+ fl_color_print(f_type_warning, data.context.set.notable, "%s", data_make.path.stack.array[0].string);
+ fl_color_print(f_type_warning, data.context.set.warning, "', status code = ");
+ fl_color_print(f_type_warning, data.context.set.notable, "%llu", F_status_set_fine(status_path));
+ fl_color_print_line(f_type_warning, data.context.set.warning, ".");
}
}
if (data.verbosity != fake_verbosity_quiet) {
printf("%c", f_string_eol[0]);
- fl_color_print(f_type_output, data.context.important, data.context.reset, "Processing Section '");
+ fl_color_print(f_type_output, data.context.set.important, "Processing Section '");
fl_color_print_code(f_type_output, data.context.notable);
f_print_dynamic_partial(f_type_output, data_make->buffer, section->name);
fl_color_print_code(f_type_output, data.context.reset);
- fl_color_print_line(f_type_output, data.context.important, data.context.reset, "'.");
+ fl_color_print_line(f_type_output, data.context.set.important, "'.");
}
if (!section->objects.used) {
if (F_status_set_fine(*status) == F_signal_abort && section_stack->used == 0) {
data_make->setting_make.fail = fake_make_operation_fail_type_exit;
data_make->print.prefix = fake_make_print_error;
- data_make->print.context = data.context.error;
+ data_make->print.context = data.context.set.error;
data_make->print.to = f_type_error;
}
}
fprintf(data_make->print.to, "%c", f_string_eol[0]);
- fl_color_print(data_make->print.to, data_make->print.context, data.context.reset, "%s: Incomplete '", data_make->print.prefix);
- fl_color_print(data_make->print.to, data.context.notable, data.context.reset, "%s", type_name);
- fl_color_print_line(data_make->print.to, data_make->print.context, data.context.reset, "' at end of section.");
+ fl_color_print(data_make->print.to, data_make->print.context, "%s: Incomplete '", data_make->print.prefix);
+ fl_color_print(data_make->print.to, data.context.set.notable, "%s", type_name);
+ fl_color_print_line(data_make->print.to, data_make->print.context, "' at end of section.");
}
fake_print_message_section_operation_failed(data, data_make->buffer, section->name, section->objects.array[section->objects.used - 1], data_make->print);
if (F_status_set_fine(*status) == F_file_found_not) {
if (data.verbosity == fake_verbosity_verbose) {
fprintf(f_type_warning, "%c", f_string_eol[0]);
- fl_color_print(f_type_warning, data.context.warning, data.context.reset, "WARNING: the file '");
- fl_color_print(f_type_warning, data.context.notable, data.context.reset, "%s", arguments.array[i].string);
- fl_color_print_line(f_type_warning, data.context.warning, data.context.reset, "' was not found.");
+ fl_color_print(f_type_warning, data.context.set.warning, "WARNING: the file '");
+ fl_color_print(f_type_warning, data.context.set.notable, "%s", arguments.array[i].string);
+ fl_color_print_line(f_type_warning, data.context.set.warning, "' was not found.");
}
*status = F_none;
// forcing exit forces fail mode.
data_make->setting_make.fail = fake_make_operation_fail_type_exit;
data_make->print.prefix = fake_make_print_error;
- data_make->print.context = data.context.error;
+ data_make->print.context = data.context.set.error;
data_make->print.to = f_type_error;
}
else {
if (fl_string_dynamic_compare_string(fake_make_operation_argument_exit, arguments.array[0], fake_make_operation_argument_exit_length) == F_equal_to) {
data_make->setting_make.fail = fake_make_operation_fail_type_exit;
data_make->print.prefix = fake_make_print_error;
- data_make->print.context = data.context.error;
+ data_make->print.context = data.context.set.error;
data_make->print.to = f_type_error;
}
else if (fl_string_dynamic_compare_string(fake_make_operation_argument_warn, arguments.array[0], fake_make_operation_argument_warn_length) == F_equal_to) {
data_make->setting_make.fail = fake_make_operation_fail_type_warn;
data_make->print.prefix = fake_make_print_warning;
- data_make->print.context = data.context.warning;
+ data_make->print.context = data.context.set.warning;
data_make->print.to = f_type_warning;
}
else if (fl_string_dynamic_compare_string(fake_make_operation_argument_ignore, arguments.array[0], fake_make_operation_argument_ignore_length) == F_equal_to) {
printf("%c", f_string_eol[0]);
if ((i == 1 && number_left > f_number_t_size_unsigned) || (i > 1 && number_right > 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_number_t_size_unsigned, f_number_t_size_unsigned);
+ fl_color_print(data_make->print.to, data_make->print.context, "%s: The number '", data_make->print.prefix);
+ fl_color_print(data_make->print.to, data.context.set.notable, "%c%s", arguments.array[i].string);
+ fl_color_print_line(data_make->print.to, data_make->print.context, "' 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);
- fl_color_print(data_make->print.to, data.context.notable, data.context.reset, "%s", arguments.array[i].string);
- fl_color_print_line(data_make->print.to, data_make->print.context, data.context.reset, "'.");
+ fl_color_print(data_make->print.to, data_make->print.context, "%s: Invalid or unsupported number provided '", data_make->print.prefix);
+ fl_color_print(data_make->print.to, data.context.set.notable, "%s", arguments.array[i].string);
+ fl_color_print_line(data_make->print.to, data_make->print.context, "'.");
}
}
}
if (F_status_set_fine(status) == F_file_found_not) {
if (data.verbosity != fake_verbosity_quiet && data_make->print.to) {
fprintf(data_make->print.to, "%c", f_string_eol[0]);
- fl_color_print(data_make->print.to, data_make->print.context, data.context.reset, "%s: Failed to find program '", data_make->print.prefix);
- fl_color_print(data_make->print.to, data.context.notable, data.context.reset, "%s", program.string);
- fl_color_print_line(data_make->print.to, data_make->print.context, data.context.reset, "' for executing.");
+ fl_color_print(data_make->print.to, data_make->print.context, "%s: Failed to find program '", data_make->print.prefix);
+ fl_color_print(data_make->print.to, data.context.set.notable, "%s", program.string);
+ fl_color_print_line(data_make->print.to, data_make->print.context, "' for executing.");
}
}
else if (F_status_set_fine(status) != F_failure) {
if (data.verbosity != fake_verbosity_quiet && data_make->print.to) {
fprintf(data_make->print.to, "%c", f_string_eol[0]);
- fl_color_print(data_make->print.to, data_make->print.context, data.context.reset, "%s: Failed with return code '", data_make->print.prefix);
- fl_color_print(data_make->print.to, data.context.notable, data.context.reset, "%s", data_make->setting_make.parameter.array[0].value.array[0].string);
- fl_color_print_line(data_make->print.to, data_make->print.context, data.context.reset, "'.");
+ fl_color_print(data_make->print.to, data_make->print.context, "%s: Failed with return code '", data_make->print.prefix);
+ fl_color_print(data_make->print.to, data.context.set.notable, "%s", data_make->setting_make.parameter.array[0].value.array[0].string);
+ fl_color_print_line(data_make->print.to, data_make->print.context, "'.");
}
if (data_make->setting_make.fail == fake_make_operation_fail_type_exit) {
if (arguments.used == 0) {
if (data.verbosity != fake_verbosity_quiet && data_make->print.to) {
printf("%c", f_string_eol[0]);
- fl_color_print_line(data_make->print.to, data_make->print.context, data.context.reset, "%s: Requires more arguments.", data_make->print.prefix);
+ fl_color_print_line(data_make->print.to, data_make->print.context, "%s: Requires more arguments.", data_make->print.prefix);
}
*status = F_status_set_error(F_failure);
if (data.verbosity != fake_verbosity_quiet && data_make->print.to) {
fprintf(data_make->print.to, "%c", f_string_eol[0]);
- fl_color_print(data_make->print.to, data_make->print.context, data.context.reset, "%s: No indexer has been specified, cannot perform '", data_make->print.prefix);
- fl_color_print(data_make->print.to, data.context.notable, data.context.reset, fake_make_operation_index);
- fl_color_print_line(data_make->print.to, data_make->print.context, data.context.reset, "' section operation.");
+ fl_color_print(data_make->print.to, data_make->print.context, "%s: No indexer has been specified, cannot perform '", data_make->print.prefix);
+ fl_color_print(data_make->print.to, data.context.set.notable, fake_make_operation_index);
+ fl_color_print_line(data_make->print.to, data_make->print.context, "' section operation.");
}
*status = F_status_set_error(F_failure);
if (arguments.used > 1) {
if (data.verbosity != fake_verbosity_quiet && data_make->print.to) {
printf("%c", f_string_eol[0]);
- fl_color_print_line(data_make->print.to, data_make->print.context, data.context.reset, "%s: Has too many arguments.", data_make->print.prefix);
+ fl_color_print_line(data_make->print.to, data_make->print.context, "%s: Has too many arguments.", data_make->print.prefix);
}
*status = F_status_set_error(F_failure);
if (data.verbosity != fake_verbosity_quiet && data_make->print.to) {
printf("%c", f_string_eol[0]);
- fl_color_print(data_make->print.to, data_make->print.context, data.context.reset, "%s: Unsupported break type '", data_make->print.prefix);
- fl_color_print(data_make->print.to, data.context.notable, data.context.reset, "%s", arguments.array[0].string);
- fl_color_print_line(data_make->print.to, data_make->print.context, data.context.reset, "'.");
+ fl_color_print(data_make->print.to, data_make->print.context, "%s: Unsupported break type '", data_make->print.prefix);
+ fl_color_print(data_make->print.to, data.context.set.notable, "%s", arguments.array[0].string);
+ fl_color_print_line(data_make->print.to, data_make->print.context, "'.");
}
*status = F_status_set_error(F_failure);
if (arguments.used > 1) {
if (data.verbosity != fake_verbosity_quiet && data_make->print.to) {
printf("%c", f_string_eol[0]);
- fl_color_print_line(data_make->print.to, data_make->print.context, data.context.reset, "%s: Has too many arguments.", data_make->print.prefix);
+ fl_color_print_line(data_make->print.to, data_make->print.context, "%s: Has too many arguments.", data_make->print.prefix);
}
*status = F_status_set_error(F_failure);
if (status_file == F_file_found_not) {
if (data.verbosity != fake_verbosity_quiet && data_make->print.to) {
printf("%c", f_string_eol[0]);
- fl_color_print(data_make->print.to, data_make->print.context, data.context.reset, "%s: Failed to find file '", data_make->print.prefix);
- fl_color_print(data_make->print.to, data.context.notable, data.context.reset, "%s", path_file);
- fl_color_print_line(data_make->print.to, data_make->print.context, data.context.reset, "'.");
+ fl_color_print(data_make->print.to, data_make->print.context, "%s: Failed to find file '", data_make->print.prefix);
+ fl_color_print(data_make->print.to, data.context.set.notable, "%s", path_file);
+ fl_color_print_line(data_make->print.to, data_make->print.context, "'.");
}
*status = F_status_set_error(status_file);
else if (!status_file) {
if (data.verbosity != fake_verbosity_quiet && data_make->print.to) {
printf("%c", f_string_eol[0]);
- fl_color_print(data_make->print.to, data_make->print.context, data.context.reset, "%s: The file '", data_make->print.prefix);
- fl_color_print(data_make->print.to, data.context.notable, data.context.reset, "%s", path_file);
- fl_color_print_line(data_make->print.to, data_make->print.context, data.context.reset, "' must be a regular file.");
+ fl_color_print(data_make->print.to, data_make->print.context, "%s: The file '", data_make->print.prefix);
+ fl_color_print(data_make->print.to, data.context.set.notable, "%s", path_file);
+ fl_color_print_line(data_make->print.to, data_make->print.context, "' must be a regular file.");
}
*status = F_status_set_error(F_failure);
else {
if (data.verbosity != fake_verbosity_quiet && data_make->print.to) {
printf("%c", f_string_eol[0]);
- fl_color_print_line(data_make->print.to, data_make->print.context, data.context.reset, "%s: Filename argument must not be an empty string.", data_make->print.prefix);
+ fl_color_print_line(data_make->print.to, data_make->print.context, "%s: Filename argument must not be an empty string.", data_make->print.prefix);
}
*status = F_status_set_error(F_failure);
if (arguments.used) {
if (data.verbosity != fake_verbosity_quiet && data_make->print.to) {
printf("%c", f_string_eol[0]);
- fl_color_print_line(data_make->print.to, data_make->print.context, data.context.reset, "%s: Has too many arguments.", data_make->print.prefix);
+ fl_color_print_line(data_make->print.to, data_make->print.context, "%s: Has too many arguments.", data_make->print.prefix);
}
*status = F_status_set_error(F_failure);
if (data.verbosity != fake_verbosity_quiet && data_make->print.to) {
printf("%c", f_string_eol[0]);
- fl_color_print_line(data_make->print.to, data_make->print.context, data.context.reset, "%s: Must not attempt to pop project root off of path stack.", data_make->print.prefix);
+ fl_color_print_line(data_make->print.to, data_make->print.context, "%s: Must not attempt to pop project root off of path stack.", data_make->print.prefix);
}
*status = F_status_set_error(F_failure);
if (f_file_exists(arguments.array[i].string) != F_true) {
if (data.verbosity != fake_verbosity_quiet && data_make->print.to) {
printf("%c", f_string_eol[0]);
- fl_color_print(data_make->print.to, data_make->print.context, data.context.reset, "%s: Failed to find file '", data_make->print.prefix);
- fl_color_print(data_make->print.to, data.context.notable, data.context.reset, "%s", arguments.array[i].string);
- fl_color_print_line(data_make->print.to, data_make->print.context, data.context.reset, "'.");
+ fl_color_print(data_make->print.to, data_make->print.context, "%s: Failed to find file '", data_make->print.prefix);
+ fl_color_print(data_make->print.to, data.context.set.notable, "%s", arguments.array[i].string);
+ fl_color_print_line(data_make->print.to, data_make->print.context, "'.");
}
*status = F_status_set_error(F_failure);
if (status_file == F_false || status_file == F_file_found_not) {
if (data.verbosity != fake_verbosity_quiet && data_make->print.to) {
printf("%c", f_string_eol[0]);
- fl_color_print(data_make->print.to, data_make->print.context, data.context.reset, "%s: The last file '", data_make->print.prefix);
- fl_color_print(data_make->print.to, data.context.notable, data.context.reset, "%s", arguments.array[arguments.used - 1].string);
- fl_color_print_line(data_make->print.to, data_make->print.context, data.context.reset, "' must be a valid directory.");
+ fl_color_print(data_make->print.to, data_make->print.context, "%s: The last file '", data_make->print.prefix);
+ fl_color_print(data_make->print.to, data.context.set.notable, "%s", arguments.array[arguments.used - 1].string);
+ fl_color_print_line(data_make->print.to, data_make->print.context, "' must be a valid directory.");
}
*status = F_status_set_error(F_failure);
if (status_file == F_false) {
if (data.verbosity != fake_verbosity_quiet && data_make->print.to) {
printf("%c", f_string_eol[0]);
- fl_color_print(data_make->print.to, data_make->print.context, data.context.reset, "%s: The last file '", data_make->print.prefix);
- fl_color_print(data_make->print.to, data.context.notable, data.context.reset, "%s", arguments.array[arguments.used - 1].string);
- fl_color_print_line(data_make->print.to, data_make->print.context, data.context.reset, "' must be a valid directory.");
+ fl_color_print(data_make->print.to, data_make->print.context, "%s: The last file '", data_make->print.prefix);
+ fl_color_print(data_make->print.to, data.context.set.notable, "%s", arguments.array[arguments.used - 1].string);
+ fl_color_print_line(data_make->print.to, data_make->print.context, "' must be a valid directory.");
}
*status = F_status_set_error(F_failure);
else {
if (data.verbosity != fake_verbosity_quiet && data_make->print.to) {
printf("%c", f_string_eol[0]);
- fl_color_print_line(data_make->print.to, data_make->print.context, data.context.reset, "%s: Requires more arguments.", data_make->print.prefix);
+ fl_color_print_line(data_make->print.to, data_make->print.context, "%s: Requires more arguments.", data_make->print.prefix);
}
*status = F_status_set_error(F_failure);
if (arguments.used == 0) {
if (data.verbosity != fake_verbosity_quiet && data_make->print.to) {
printf("%c", f_string_eol[0]);
- fl_color_print_line(data_make->print.to, data_make->print.context, data.context.reset, "%s: Requires more arguments.", data_make->print.prefix);
+ fl_color_print_line(data_make->print.to, data_make->print.context, "%s: Requires more arguments.", data_make->print.prefix);
}
*status = F_status_set_error(F_failure);
else if (data_make->setting_build.build_compiler.used) {
if (data.verbosity != fake_verbosity_quiet && data_make->print.to) {
fprintf(data_make->print.to, "%c", f_string_eol[0]);
- fl_color_print(data_make->print.to, data_make->print.context, data.context.reset, "%s: No compiler has been specified, cannot perform '", data_make->print.prefix);
- fl_color_print(data_make->print.to, data.context.notable, data.context.reset, fake_make_operation_compile);
- fl_color_print_line(data_make->print.to, data_make->print.context, data.context.reset, "' section operation.");
+ fl_color_print(data_make->print.to, data_make->print.context, "%s: No compiler has been specified, cannot perform '", data_make->print.prefix);
+ fl_color_print(data_make->print.to, data.context.set.notable, fake_make_operation_compile);
+ fl_color_print_line(data_make->print.to, data_make->print.context, "' section operation.");
}
*status = F_status_set_error(F_failure);
if (f_file_exists(arguments.array[i].string) != F_true) {
if (data.verbosity != fake_verbosity_quiet && data_make->print.to) {
printf("%c", f_string_eol[0]);
- fl_color_print(data_make->print.to, data_make->print.context, data.context.reset, "%s: Failed to find file '", data_make->print.prefix);
- fl_color_print(data_make->print.to, data.context.notable, data.context.reset, "%s", arguments.array[i].string);
- fl_color_print_line(data_make->print.to, data_make->print.context, data.context.reset, "'.");
+ fl_color_print(data_make->print.to, data_make->print.context, "%s: Failed to find file '", data_make->print.prefix);
+ fl_color_print(data_make->print.to, data.context.set.notable, "%s", arguments.array[i].string);
+ fl_color_print_line(data_make->print.to, data_make->print.context, "'.");
}
*status = F_status_set_error(F_failure);
if (status_file == F_false || status_file == F_file_found_not) {
if (data.verbosity != fake_verbosity_quiet && data_make->print.to) {
printf("%c", f_string_eol[0]);
- fl_color_print(data_make->print.to, data_make->print.context, data.context.reset, "%s: The last file '", data_make->print.prefix);
- fl_color_print(data_make->print.to, data.context.notable, data.context.reset, "%s", arguments.array[arguments.used - 1].string);
- fl_color_print_line(data_make->print.to, data_make->print.context, data.context.reset, "' must be a valid directory.");
+ fl_color_print(data_make->print.to, data_make->print.context, "%s: The last file '", data_make->print.prefix);
+ fl_color_print(data_make->print.to, data.context.set.notable, "%s", arguments.array[arguments.used - 1].string);
+ fl_color_print_line(data_make->print.to, data_make->print.context, "' must be a valid directory.");
}
*status = F_status_set_error(F_failure);
if (status_file == F_false) {
if (data.verbosity != fake_verbosity_quiet && data_make->print.to) {
printf("%c", f_string_eol[0]);
- fl_color_print(data_make->print.to, data_make->print.context, data.context.reset, "%s: The last file '", data_make->print.prefix);
- fl_color_print(data_make->print.to, data.context.notable, data.context.reset, "%s", arguments.array[arguments.used - 1].string);
- fl_color_print_line(data_make->print.to, data_make->print.context, data.context.reset, "' must be a valid directory.");
+ fl_color_print(data_make->print.to, data_make->print.context, "%s: The last file '", data_make->print.prefix);
+ fl_color_print(data_make->print.to, data.context.set.notable, "%s", arguments.array[arguments.used - 1].string);
+ fl_color_print_line(data_make->print.to, data_make->print.context, "' must be a valid directory.");
}
*status = F_status_set_error(F_failure);
else {
if (data.verbosity != fake_verbosity_quiet && data_make->print.to) {
printf("%c", f_string_eol[0]);
- fl_color_print_line(data_make->print.to, data_make->print.context, data.context.reset, "%s: Requires more arguments.", data_make->print.prefix);
+ fl_color_print_line(data_make->print.to, data_make->print.context, "%s: Requires more arguments.", data_make->print.prefix);
}
*status = F_status_set_error(F_failure);
else {
if (data.verbosity != fake_verbosity_quiet && data_make->print.to) {
printf("%c", f_string_eol[0]);
- fl_color_print_line(data_make->print.to, data_make->print.context, data.context.reset, "%s: Requires more arguments.", data_make->print.prefix);
+ fl_color_print_line(data_make->print.to, data_make->print.context, "%s: Requires more arguments.", data_make->print.prefix);
}
*status = F_status_set_error(F_failure);
if (*status == F_none) {
if (data.verbosity != fake_verbosity_quiet && data_make->print.to) {
printf("%c", f_string_eol[0]);
- fl_color_print_line(data_make->print.to, data_make->print.context, data.context.reset, "%s: Define name must not be an empty string.", data_make->print.prefix);
+ fl_color_print_line(data_make->print.to, data_make->print.context, "%s: Define name must not be an empty string.", data_make->print.prefix);
}
*status = F_status_set_error(F_failure);
else if (*status == F_false) {
if (data.verbosity != fake_verbosity_quiet && data_make->print.to) {
fprintf(data_make->print.to, "%c", f_string_eol[0]);
- fl_color_print(data_make->print.to, data_make->print.context, data.context.reset, "%s: Invalid characters in the define setting name '", data_make->print.prefix);
+ fl_color_print(data_make->print.to, data_make->print.context, "%s: Invalid characters in the define setting name '", data_make->print.prefix);
fl_color_print_code(data_make->print.to, data.context.notable);
f_print_dynamic(data_make->print.to, arguments.array[0]);
fl_color_print_code(data_make->print.to, data.context.reset);
- fl_color_print_line(data_make->print.to, data_make->print.context, data.context.reset, "', only alpha-numeric ASCII characters and underscore (without a leading digit) is allowed.");
+ fl_color_print_line(data_make->print.to, data_make->print.context, "', only alpha-numeric ASCII characters and underscore (without a leading digit) is allowed.");
}
*status = F_status_set_error(F_failure);
else {
if (data.verbosity != fake_verbosity_quiet && data_make->print.to) {
printf("%c", f_string_eol[0]);
- fl_color_print_line(data_make->print.to, data_make->print.context, data.context.reset, "%s: Requires more arguments.", data_make->print.prefix);
+ fl_color_print_line(data_make->print.to, data_make->print.context, "%s: Requires more arguments.", data_make->print.prefix);
}
*status = F_status_set_error(F_failure);
if (*operation_if == fake_make_operation_if_type_else_true || *operation_if == fake_make_operation_if_type_else_false) {
if (data.verbosity != fake_verbosity_quiet && data_make->print.to) {
printf("%c", f_string_eol[0]);
- fl_color_print(data_make->print.to, data_make->print.context, data.context.reset, "%s: Must not be used after another '", data_make->print.prefix);
- fl_color_print(data_make->print.to, data.context.notable, data.context.reset, "else");
- fl_color_print_line(data_make->print.to, data_make->print.context, data.context.reset, "' section operation.");
+ fl_color_print(data_make->print.to, data_make->print.context, "%s: Must not be used after another '", data_make->print.prefix);
+ fl_color_print(data_make->print.to, data.context.set.notable, "else");
+ fl_color_print_line(data_make->print.to, data_make->print.context, "' section operation.");
}
*status = F_status_set_error(F_failure);
if (*operation_if == fake_make_operation_if_type_true || *operation_if == fake_make_operation_if_type_false || *operation_if == fake_make_operation_if_type_false_always) {
if (data.verbosity != fake_verbosity_quiet && data_make->print.to) {
printf("%c", f_string_eol[0]);
- fl_color_print(data_make->print.to, data_make->print.context, data.context.reset, "%s: Must not be used inside an ", data_make->print.prefix);
- fl_color_print(data_make->print.to, data.context.notable, data.context.reset, "if");
- fl_color_print_line(data_make->print.to, data_make->print.context, data.context.reset, "' section operation.");
+ fl_color_print(data_make->print.to, data_make->print.context, "%s: Must not be used inside an ", data_make->print.prefix);
+ fl_color_print(data_make->print.to, data.context.set.notable, "if");
+ fl_color_print_line(data_make->print.to, data_make->print.context, "' section operation.");
}
*status = F_status_set_error(F_failure);
if (*operation_if != fake_make_operation_if_type_else_true_next && *operation_if != fake_make_operation_if_type_else_false_next && *operation_if != fake_make_operation_if_type_else_false_next_always) {
if (data.verbosity != fake_verbosity_quiet && data_make->print.to) {
printf("%c", f_string_eol[0]);
- fl_color_print_line(data_make->print.to, data_make->print.context, data.context.reset, "%s: Has no preceding if condition.", data_make->print.prefix);
+ fl_color_print_line(data_make->print.to, data_make->print.context, "%s: Has no preceding if condition.", data_make->print.prefix);
}
*status = F_status_set_error(F_failure);
if (arguments.used) {
if (data.verbosity != fake_verbosity_quiet && data_make->print.to) {
printf("%c", f_string_eol[0]);
- fl_color_print_line(data_make->print.to, data_make->print.context, data.context.reset, "%s: Has too many arguments.", data_make->print.prefix);
+ fl_color_print_line(data_make->print.to, data_make->print.context, "%s: Has too many arguments.", data_make->print.prefix);
}
*status = F_status_set_error(F_failure);
if (arguments.used > 1) {
if (data.verbosity != fake_verbosity_quiet && data_make->print.to) {
printf("%c", f_string_eol[0]);
- fl_color_print_line(data_make->print.to, data_make->print.context, data.context.reset, "%s: Has too many arguments.", data_make->print.prefix);
+ fl_color_print_line(data_make->print.to, data_make->print.context, "%s: Has too many arguments.", data_make->print.prefix);
}
*status = F_status_set_error(F_failure);
if (data.verbosity != fake_verbosity_quiet && data_make->print.to) {
printf("%c", f_string_eol[0]);
- fl_color_print(data_make->print.to, data_make->print.context, data.context.reset, "%s: Unsupported exit type '", data_make->print.prefix);
- fl_color_print(data_make->print.to, data.context.notable, data.context.reset, "%s", arguments.array[0].string);
- fl_color_print_line(data_make->print.to, data_make->print.context, data.context.reset, "'.");
+ fl_color_print(data_make->print.to, data_make->print.context, "%s: Unsupported exit type '", data_make->print.prefix);
+ fl_color_print(data_make->print.to, data.context.set.notable, "%s", arguments.array[0].string);
+ fl_color_print_line(data_make->print.to, data_make->print.context, "'.");
}
*status = F_status_set_error(F_failure);
if (data.verbosity != fake_verbosity_quiet && data_make->print.to) {
printf("%c", f_string_eol[0]);
- fl_color_print(data_make->print.to, data_make->print.context, data.context.reset, "%s: Unsupported fail type '", data_make->print.prefix);
- fl_color_print(data_make->print.to, data.context.notable, data.context.reset, "%s", arguments.array[0].string);
- fl_color_print_line(data_make->print.to, data_make->print.context, data.context.reset, "'.");
+ fl_color_print(data_make->print.to, data_make->print.context, "%s: Unsupported fail type '", data_make->print.prefix);
+ fl_color_print(data_make->print.to, data.context.set.notable, "%s", arguments.array[0].string);
+ fl_color_print_line(data_make->print.to, data_make->print.context, "'.");
}
*status = F_status_set_error(F_failure);
else {
if (data.verbosity != fake_verbosity_quiet && data_make->print.to) {
printf("%c", f_string_eol[0]);
- fl_color_print_line(data_make->print.to, data_make->print.context, data.context.reset, "%s: Requires more arguments.", data_make->print.prefix);
+ fl_color_print_line(data_make->print.to, data_make->print.context, "%s: Requires more arguments.", data_make->print.prefix);
}
*status = F_status_set_error(F_failure);
if (status_file == F_file_found_not) {
if (data.verbosity != fake_verbosity_quiet && data_make->print.to) {
printf("%c", f_string_eol[0]);
- fl_color_print(data_make->print.to, data_make->print.context, data.context.reset, "%s: Failed to find file '", data_make->print.prefix);
- fl_color_print(data_make->print.to, data.context.notable, data.context.reset, "%s", arguments.array[i].string);
- fl_color_print_line(data_make->print.to, data_make->print.context, data.context.reset, "'.");
+ fl_color_print(data_make->print.to, data_make->print.context, "%s: Failed to find file '", data_make->print.prefix);
+ fl_color_print(data_make->print.to, data.context.set.notable, "%s", arguments.array[i].string);
+ fl_color_print_line(data_make->print.to, data_make->print.context, "'.");
}
*status = F_status_set_error(status_file);
if (data.verbosity != fake_verbosity_quiet && data_make->print.to) {
printf("%c", f_string_eol[0]);
- fl_color_print_line(data_make->print.to, data_make->print.context, data.context.reset, "%s: Requires more arguments.", data_make->print.prefix);
+ fl_color_print_line(data_make->print.to, data_make->print.context, "%s: Requires more arguments.", data_make->print.prefix);
}
*status = F_status_set_error(F_failure);
if (*operation_if == fake_make_operation_if_type_true || *operation_if == fake_make_operation_if_type_false || *operation_if == fake_make_operation_if_type_false_always) {
if (data.verbosity != fake_verbosity_quiet && data_make->print.to) {
printf("%c", f_string_eol[0]);
- fl_color_print(data_make->print.to, data_make->print.context, data.context.reset, "%s: Must not be used after another '", data_make->print.prefix);
- fl_color_print(data_make->print.to, data.context.notable, data.context.reset, "if");
- fl_color_print_line(data_make->print.to, data_make->print.context, data.context.reset, "' section operation.");
+ fl_color_print(data_make->print.to, data_make->print.context, "%s: Must not be used after another '", data_make->print.prefix);
+ fl_color_print(data_make->print.to, data.context.set.notable, "if");
+ fl_color_print_line(data_make->print.to, data_make->print.context, "' section operation.");
}
*status = F_status_set_error(F_failure);
if (i == 14) {
if (data.verbosity != fake_verbosity_quiet && data_make->print.to) {
printf("%c", f_string_eol[0]);
- fl_color_print(data_make->print.to, data_make->print.context, data.context.reset, "%s: Unsupported if type '", data_make->print.prefix);
- fl_color_print(data_make->print.to, data.context.notable, data.context.reset, "%s", arguments.array[0].string);
- fl_color_print_line(data_make->print.to, data_make->print.context, data.context.reset, "'.");
+ fl_color_print(data_make->print.to, data_make->print.context, "%s: Unsupported if type '", data_make->print.prefix);
+ fl_color_print(data_make->print.to, data.context.set.notable, "%s", arguments.array[0].string);
+ fl_color_print_line(data_make->print.to, data_make->print.context, "'.");
}
*status = F_status_set_error(F_failure);
if (arguments.used > if_type_minimum[i]) {
if (data.verbosity != fake_verbosity_quiet && data_make->print.to) {
printf("%c", f_string_eol[0]);
- fl_color_print_line(data_make->print.to, data_make->print.context, data.context.reset, "%s: Has too many arguments.", data_make->print.prefix);
+ fl_color_print_line(data_make->print.to, data_make->print.context, "%s: Has too many arguments.", data_make->print.prefix);
}
*status = F_status_set_error(F_failure);
if (fl_string_dynamic_compare_string(fake_make_operation_argument_has, arguments.array[1], fake_make_operation_argument_has_length) == F_equal_to_not) {
if (data.verbosity != fake_verbosity_quiet && data_make->print.to) {
printf("%c", f_string_eol[0]);
- fl_color_print(data_make->print.to, data_make->print.context, data.context.reset, "%s: Unsupported mode type '", data_make->print.prefix);
- fl_color_print(data_make->print.to, data.context.notable, data.context.reset, "%s", arguments.array[1].string);
- fl_color_print_line(data_make->print.to, data_make->print.context, data.context.reset, "'.");
+ fl_color_print(data_make->print.to, data_make->print.context, "%s: Unsupported mode type '", data_make->print.prefix);
+ fl_color_print(data_make->print.to, data.context.set.notable, "%s", arguments.array[1].string);
+ fl_color_print_line(data_make->print.to, data_make->print.context, "'.");
}
*status = F_status_set_error(F_failure);
else {
if (data.verbosity != fake_verbosity_quiet && data_make->print.to) {
printf("%c", f_string_eol[0]);
- fl_color_print(data_make->print.to, data_make->print.context, data.context.reset, "%s: Unsupported file type '", data_make->print.prefix);
- fl_color_print(data_make->print.to, data.context.notable, data.context.reset, "%s", arguments.array[i].string);
- fl_color_print_line(data_make->print.to, data_make->print.context, data.context.reset, "'.");
+ fl_color_print(data_make->print.to, data_make->print.context, "%s: Unsupported file type '", data_make->print.prefix);
+ fl_color_print(data_make->print.to, data.context.set.notable, "%s", arguments.array[i].string);
+ fl_color_print_line(data_make->print.to, data_make->print.context, "'.");
}
type_file |= 0x80;
if (fl_string_dynamic_compare_string(fake_make_operation_argument_parameter, arguments.array[1], fake_make_operation_argument_parameter_length) == F_equal_to_not) {
if (data.verbosity != fake_verbosity_quiet && data_make->print.to) {
printf("%c", f_string_eol[0]);
- fl_color_print(data_make->print.to, data_make->print.context, data.context.reset, "%s: Unsupported define type '", data_make->print.prefix);
- fl_color_print(data_make->print.to, data.context.notable, data.context.reset, "%s", arguments.array[1].string);
- fl_color_print_line(data_make->print.to, data_make->print.context, data.context.reset, "'.");
+ fl_color_print(data_make->print.to, data_make->print.context, "%s: Unsupported define type '", data_make->print.prefix);
+ fl_color_print(data_make->print.to, data.context.set.notable, "%s", arguments.array[1].string);
+ fl_color_print_line(data_make->print.to, data_make->print.context, "'.");
}
*status = F_status_set_error(F_failure);
if (arguments.used < 3) {
if (data.verbosity != fake_verbosity_quiet && data_make->print.to) {
printf("%c", f_string_eol[0]);
- fl_color_print_line(data_make->print.to, data_make->print.context, data.context.reset, "%s: Requires more arguments.", data_make->print.prefix);
+ fl_color_print_line(data_make->print.to, data_make->print.context, "%s: Requires more arguments.", data_make->print.prefix);
}
*status = F_status_set_error(F_failure);
if (arguments.used < 3) {
if (data.verbosity != fake_verbosity_quiet && data_make->print.to) {
printf("%c", f_string_eol[0]);
- fl_color_print_line(data_make->print.to, data_make->print.context, data.context.reset, "%s: Requires more arguments.", data_make->print.prefix);
+ fl_color_print_line(data_make->print.to, data_make->print.context, "%s: Requires more arguments.", data_make->print.prefix);
}
*status = F_status_set_error(F_failure);
printf("%c", f_string_eol[0]);
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_number_t_size_unsigned, f_number_t_size_unsigned);
+ fl_color_print(data_make->print.to, data_make->print.context, "%s: The number '", data_make->print.prefix);
+ fl_color_print(data_make->print.to, data.context.set.notable, "%c%s", arguments.array[i].string);
+ fl_color_print_line(data_make->print.to, data_make->print.context, "' 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);
- fl_color_print(data_make->print.to, data.context.notable, data.context.reset, "%s", arguments.array[i].string);
- fl_color_print_line(data_make->print.to, data_make->print.context, data.context.reset, "'.");
+ fl_color_print(data_make->print.to, data_make->print.context, "%s: Invalid or unsupported number provided '", data_make->print.prefix);
+ fl_color_print(data_make->print.to, data.context.set.notable, "%s", arguments.array[i].string);
+ fl_color_print_line(data_make->print.to, data_make->print.context, "'.");
}
}
}
if (data.verbosity != fake_verbosity_quiet && data_make->print.to) {
printf("%c", f_string_eol[0]);
- fl_color_print_line(data_make->print.to, data_make->print.context, data.context.reset, "%s: Requires more arguments.", data_make->print.prefix);
+ fl_color_print_line(data_make->print.to, data_make->print.context, "%s: Requires more arguments.", data_make->print.prefix);
}
*status = F_status_set_error(F_failure);
if (arguments.used > 2) {
if (data.verbosity != fake_verbosity_quiet && data_make->print.to) {
printf("%c", f_string_eol[0]);
- fl_color_print_line(data_make->print.to, data_make->print.context, data.context.reset, "%s: Has too many arguments.", data_make->print.prefix);
+ fl_color_print_line(data_make->print.to, data_make->print.context, "%s: Has too many arguments.", data_make->print.prefix);
}
*status = F_status_set_error(F_failure);
else {
if (data.verbosity != fake_verbosity_quiet && data_make->print.to) {
printf("%c", f_string_eol[0]);
- fl_color_print_line(data_make->print.to, data_make->print.context, data.context.reset, "%s: Requires more arguments.", data_make->print.prefix);
+ fl_color_print_line(data_make->print.to, data_make->print.context, "%s: Requires more arguments.", data_make->print.prefix);
}
*status = F_status_set_error(F_failure);
if (f_file_exists(arguments.array[i].string) != F_true) {
if (data.verbosity != fake_verbosity_quiet && data_make->print.to) {
printf("%c", f_string_eol[0]);
- fl_color_print(data_make->print.to, data_make->print.context, data.context.reset, "%s: Failed to find file '", data_make->print.prefix);
- fl_color_print(data_make->print.to, data.context.notable, data.context.reset, "%s", arguments.array[i].string);
- fl_color_print_line(data_make->print.to, data_make->print.context, data.context.reset, "'.");
+ fl_color_print(data_make->print.to, data_make->print.context, "%s: Failed to find file '", data_make->print.prefix);
+ fl_color_print(data_make->print.to, data.context.set.notable, "%s", arguments.array[i].string);
+ fl_color_print_line(data_make->print.to, data_make->print.context, "'.");
}
*status = F_status_set_error(F_failure);
if (status_file == F_false || status_file == F_file_found_not) {
if (data.verbosity != fake_verbosity_quiet && data_make->print.to) {
printf("%c", f_string_eol[0]);
- fl_color_print(data_make->print.to, data_make->print.context, data.context.reset, "%s: The last file '", data_make->print.prefix);
- fl_color_print(data_make->print.to, data.context.notable, data.context.reset, "%s", arguments.array[arguments.used - 1].string);
- fl_color_print_line(data_make->print.to, data_make->print.context, data.context.reset, "' must be a valid directory.");
+ fl_color_print(data_make->print.to, data_make->print.context, "%s: The last file '", data_make->print.prefix);
+ fl_color_print(data_make->print.to, data.context.set.notable, "%s", arguments.array[arguments.used - 1].string);
+ fl_color_print_line(data_make->print.to, data_make->print.context, "' must be a valid directory.");
}
*status = F_status_set_error(F_failure);
if (status_file == F_false) {
if (data.verbosity != fake_verbosity_quiet && data_make->print.to) {
printf("%c", f_string_eol[0]);
- fl_color_print(data_make->print.to, data_make->print.context, data.context.reset, "%s: The last file '", data_make->print.prefix);
- fl_color_print(data_make->print.to, data.context.notable, data.context.reset, "%s", arguments.array[arguments.used - 1].string);
- fl_color_print_line(data_make->print.to, data_make->print.context, data.context.reset, "' must be a valid directory.");
+ fl_color_print(data_make->print.to, data_make->print.context, "%s: The last file '", data_make->print.prefix);
+ fl_color_print(data_make->print.to, data.context.set.notable, "%s", arguments.array[arguments.used - 1].string);
+ fl_color_print_line(data_make->print.to, data_make->print.context, "' must be a valid directory.");
}
*status = F_status_set_error(F_failure);
else {
if (data.verbosity != fake_verbosity_quiet && data_make->print.to) {
printf("%c", f_string_eol[0]);
- fl_color_print_line(data_make->print.to, data_make->print.context, data.context.reset, "%s: Requires more arguments.", data_make->print.prefix);
+ fl_color_print_line(data_make->print.to, data_make->print.context, "%s: Requires more arguments.", data_make->print.prefix);
}
*status = F_status_set_error(F_failure);
if (arguments.used > 1) {
if (data.verbosity != fake_verbosity_quiet && data_make->print.to) {
printf("%c", f_string_eol[0]);
- fl_color_print_line(data_make->print.to, data_make->print.context, data.context.reset, "%s: Has too many arguments.", data_make->print.prefix);
+ fl_color_print_line(data_make->print.to, data_make->print.context, "%s: Has too many arguments.", data_make->print.prefix);
}
*status = F_status_set_error(F_failure);
if (id_section == data_make->fakefile.used) {
printf("%c", f_string_eol[0]);
- fl_color_print(data_make->print.to, data_make->print.context, data.context.reset, "%s: No operation section named '", data_make->print.prefix);
- fl_color_print(data_make->print.to, data.context.notable, data.context.reset, "%s", arguments.array[0].string);
- fl_color_print_line(data_make->print.to, data_make->print.context, data.context.reset, "' was found.");
+ fl_color_print(data_make->print.to, data_make->print.context, "%s: No operation section named '", data_make->print.prefix);
+ fl_color_print(data_make->print.to, data.context.set.notable, "%s", arguments.array[0].string);
+ fl_color_print_line(data_make->print.to, data_make->print.context, "' was found.");
}
else {
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);
+ fl_color_print(data_make->print.to, data_make->print.context, "%s: The section operation '", data_make->print.prefix);
fl_color_print_code(data_make->print.to, data.context.notable);
f_print_dynamic_partial(data_make->print.to, data_make->buffer, data_make->fakefile.array[id_section].name);
fl_color_print_code(data_make->print.to, data.context.reset);
- fl_color_print_line(data_make->print.to, data_make->print.context, data.context.reset, "' is already in the operation stack, recursion is not allowed.");
+ fl_color_print_line(data_make->print.to, data_make->print.context, "' is already in the operation stack, recursion is not allowed.");
*status = F_status_set_error(F_failure);
break;
else {
if (data.verbosity != fake_verbosity_quiet && data_make->print.to) {
printf("%c", f_string_eol[0]);
- fl_color_print_line(data_make->print.to, data_make->print.context, data.context.reset, "%s: Requires more arguments.", data_make->print.prefix);
+ fl_color_print_line(data_make->print.to, data_make->print.context, "%s: Requires more arguments.", data_make->print.prefix);
}
*status = F_status_set_error(F_failure);
if (arguments.used > 1) {
if (data.verbosity != fake_verbosity_quiet && data_make->print.to) {
printf("%c", f_string_eol[0]);
- fl_color_print_line(data_make->print.to, data_make->print.context, data.context.reset, "%s: Has too many arguments.", data_make->print.prefix);
+ fl_color_print_line(data_make->print.to, data_make->print.context, "%s: Has too many arguments.", data_make->print.prefix);
}
*status = F_status_set_error(F_failure);
if (status_file == F_file_found_not) {
if (data.verbosity != fake_verbosity_quiet && data_make->print.to) {
printf("%c", f_string_eol[0]);
- fl_color_print(data_make->print.to, data_make->print.context, data.context.reset, "%s: Failed to find file '", data_make->print.prefix);
- fl_color_print(data_make->print.to, data.context.notable, data.context.reset, "%s", arguments.array[0].string);
- fl_color_print_line(data_make->print.to, data_make->print.context, data.context.reset, "'.");
+ fl_color_print(data_make->print.to, data_make->print.context, "%s: Failed to find file '", data_make->print.prefix);
+ fl_color_print(data_make->print.to, data.context.set.notable, "%s", arguments.array[0].string);
+ fl_color_print_line(data_make->print.to, data_make->print.context, "'.");
}
*status = F_status_set_error(status_file);
else if (!status_file) {
if (data.verbosity != fake_verbosity_quiet && data_make->print.to) {
printf("%c", f_string_eol[0]);
- fl_color_print(data_make->print.to, data_make->print.context, data.context.reset, "%s: The file '", data_make->print.prefix);
- fl_color_print(data_make->print.to, data.context.notable, data.context.reset, "%s", arguments.array[0].string);
- fl_color_print_line(data_make->print.to, data_make->print.context, data.context.reset, "' must be a directory file.");
+ fl_color_print(data_make->print.to, data_make->print.context, "%s: The file '", data_make->print.prefix);
+ fl_color_print(data_make->print.to, data.context.set.notable, "%s", arguments.array[0].string);
+ fl_color_print_line(data_make->print.to, data_make->print.context, "' must be a directory file.");
}
*status = F_status_set_error(F_failure);
else {
if (data.verbosity != fake_verbosity_quiet && data_make->print.to) {
printf("%c", f_string_eol[0]);
- fl_color_print_line(data_make->print.to, data_make->print.context, data.context.reset, "%s: Filename argument must not be an empty string.", data_make->print.prefix);
+ fl_color_print_line(data_make->print.to, data_make->print.context, "%s: Filename argument must not be an empty string.", data_make->print.prefix);
}
}
}
else {
if (data.verbosity != fake_verbosity_quiet && data_make->print.to) {
printf("%c", f_string_eol[0]);
- fl_color_print_line(data_make->print.to, data_make->print.context, data.context.reset, "%s: Requires more arguments.", data_make->print.prefix);
+ fl_color_print_line(data_make->print.to, data_make->print.context, "%s: Requires more arguments.", data_make->print.prefix);
}
*status = F_status_set_error(F_failure);
if (data.verbosity != fake_verbosity_quiet && data_make->print.to) {
printf("%c", f_string_eol[0]);
- fl_color_print(data_make->print.to, data_make->print.context, data.context.reset, "%s: Unsupported file type '", data_make->print.prefix);
- fl_color_print(data_make->print.to, data.context.notable, data.context.reset, "%s", arguments.array[0].string);
- fl_color_print_line(data_make->print.to, data_make->print.context, data.context.reset, "'.");
+ fl_color_print(data_make->print.to, data_make->print.context, "%s: Unsupported file type '", data_make->print.prefix);
+ fl_color_print(data_make->print.to, data.context.set.notable, "%s", arguments.array[0].string);
+ fl_color_print_line(data_make->print.to, data_make->print.context, "'.");
}
*status = F_status_set_error(F_failure);
else {
if (data.verbosity != fake_verbosity_quiet && data_make->print.to) {
printf("%c", f_string_eol[0]);
- fl_color_print_line(data_make->print.to, data_make->print.context, data.context.reset, "%s: Requires more arguments.", data_make->print.prefix);
+ fl_color_print_line(data_make->print.to, data_make->print.context, "%s: Requires more arguments.", data_make->print.prefix);
}
*status = F_status_set_error(F_failure);
#ifndef _di_fake_make_print_t_
typedef struct {
const char *prefix;
- f_string_static_t context;
+ f_color_set_t context;
FILE *to;
} fake_make_print_t;
#define fake_make_print_t_initialize { \
0, \
- f_string_static_t_initialize, \
+ f_color_set_t_initialize, \
0, \
}
#ifndef _di_fake_print_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);
+ const fake_make_print_t print = fake_macro_make_print_t_initialize(fake_make_print_error, data.context.set.error, f_type_error);
return fake_print_message(data, status, function, fallback, print);
}
if (status == F_file_found_not) {
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: Failed to find '");
+ fl_color_print(f_type_error, data.context.set.error, "ERROR: Failed to find '");
if (f_file_exists(source) == F_true) {
- fl_color_print(f_type_error, data.context.notable, data.context.reset, "%s", destination);
+ fl_color_print(f_type_error, data.context.set.notable, "%s", destination);
}
else {
- fl_color_print(f_type_error, data.context.notable, data.context.reset, "%s", source);
+ fl_color_print(f_type_error, data.context.set.notable, "%s", source);
}
- fl_color_print(f_type_error, data.context.error, data.context.reset, "' while trying to %s '", operation);
- fl_color_print(f_type_error, data.context.notable, data.context.reset, "%s", source);
+ fl_color_print(f_type_error, data.context.set.error, "' while trying to %s '", operation);
+ fl_color_print(f_type_error, data.context.set.notable, "%s", source);
if (destination) {
- fl_color_print(f_type_error, data.context.error, data.context.reset, "' %s '", how);
- fl_color_print(f_type_error, data.context.notable, data.context.reset, "%s", destination);
+ fl_color_print(f_type_error, data.context.set.error, "' %s '", how);
+ fl_color_print(f_type_error, data.context.set.notable, "%s", destination);
}
- fl_color_print_line(f_type_error, data.context.error, data.context.reset, "'.");
+ fl_color_print_line(f_type_error, data.context.set.error, "'.");
}
return F_false;
if (status == F_parameter) {
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, "INTERNAL ERROR: Invalid parameter when calling ");
- fl_color_print(f_type_error, data.context.notable, data.context.reset, "%s", function);
- fl_color_print(f_type_error, data.context.error, data.context.reset, "() to %s '", operation);
- fl_color_print(f_type_error, data.context.notable, data.context.reset, "%s", source);
+ fl_color_print(f_type_error, data.context.set.error, "INTERNAL ERROR: Invalid parameter when calling ");
+ fl_color_print(f_type_error, data.context.set.notable, "%s", function);
+ fl_color_print(f_type_error, data.context.set.error, "() to %s '", operation);
+ fl_color_print(f_type_error, data.context.set.notable, "%s", source);
if (destination) {
- fl_color_print(f_type_error, data.context.error, data.context.reset, "' %s '", how);
- fl_color_print(f_type_error, data.context.notable, data.context.reset, "%s", destination);
+ fl_color_print(f_type_error, data.context.set.error, "' %s '", how);
+ fl_color_print(f_type_error, data.context.set.notable, "%s", destination);
}
- fl_color_print_line(f_type_error, data.context.error, data.context.reset, "'.");
+ fl_color_print_line(f_type_error, data.context.set.error, "'.");
}
return F_false;
if (status == F_name) {
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: Invalid name for '");
- fl_color_print(f_type_error, data.context.notable, data.context.reset, "%s", source);
+ fl_color_print(f_type_error, data.context.set.error, "ERROR: Invalid name for '");
+ fl_color_print(f_type_error, data.context.set.notable, "%s", source);
if (destination) {
- fl_color_print(f_type_error, data.context.error, data.context.reset, "' or '");
- fl_color_print(f_type_error, data.context.notable, data.context.reset, "%s", destination);
+ fl_color_print(f_type_error, data.context.set.error, "' or '");
+ fl_color_print(f_type_error, data.context.set.notable, "%s", destination);
}
- fl_color_print_line(f_type_error, data.context.error, data.context.reset, "'.");
+ fl_color_print_line(f_type_error, data.context.set.error, "'.");
}
return F_false;
if (status == F_memory_out) {
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, "CRITICAL ERROR: Unable to allocate memory, while trying to %s '", operation);
- fl_color_print(f_type_error, data.context.notable, data.context.reset, "%s", source);
+ fl_color_print(f_type_error, data.context.set.error, "CRITICAL ERROR: Unable to allocate memory, while trying to %s '", operation);
+ fl_color_print(f_type_error, data.context.set.notable, "%s", source);
if (destination) {
- fl_color_print(f_type_error, data.context.error, data.context.reset, "' %s '", how);
- fl_color_print(f_type_error, data.context.notable, data.context.reset, "%s", destination);
+ fl_color_print(f_type_error, data.context.set.error, "' %s '", how);
+ fl_color_print(f_type_error, data.context.set.notable, "%s", destination);
}
- fl_color_print_line(f_type_error, data.context.error, data.context.reset, "'.");
+ fl_color_print_line(f_type_error, data.context.set.error, "'.");
}
return F_false;
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: Overflow while trying to %s '", operation);
- fl_color_print(f_type_error, data.context.notable, data.context.reset, "%s", source);
+ fl_color_print(f_type_error, data.context.set.error, "ERROR: Overflow while trying to %s '", operation);
+ fl_color_print(f_type_error, data.context.set.notable, "%s", source);
if (destination) {
- fl_color_print(f_type_error, data.context.error, data.context.reset, "' %s '", how);
- fl_color_print(f_type_error, data.context.notable, data.context.reset, "%s", destination);
+ fl_color_print(f_type_error, data.context.set.error, "' %s '", how);
+ fl_color_print(f_type_error, data.context.set.notable, "%s", destination);
}
- fl_color_print_line(f_type_error, data.context.error, data.context.reset, "'.");
+ fl_color_print_line(f_type_error, data.context.set.error, "'.");
}
return F_false;
if (status == F_directory) {
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: Invalid directory while trying to %s '", operation);
- fl_color_print(f_type_error, data.context.notable, data.context.reset, "%s", source);
+ fl_color_print(f_type_error, data.context.set.error, "ERROR: Invalid directory while trying to %s '", operation);
+ fl_color_print(f_type_error, data.context.set.notable, "%s", source);
if (destination) {
- fl_color_print(f_type_error, data.context.error, data.context.reset, "' %s '", how);
- fl_color_print(f_type_error, data.context.notable, data.context.reset, "%s", destination);
+ fl_color_print(f_type_error, data.context.set.error, "' %s '", how);
+ fl_color_print(f_type_error, data.context.set.notable, "%s", destination);
}
- fl_color_print_line(f_type_error, data.context.error, data.context.reset, "'.");
+ fl_color_print_line(f_type_error, data.context.set.error, "'.");
}
return F_false;
if (status == F_access_denied) {
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: Access denied while trying to %s '", operation);
- fl_color_print(f_type_error, data.context.notable, data.context.reset, "%s", source);
+ fl_color_print(f_type_error, data.context.set.error, "ERROR: Access denied while trying to %s '", operation);
+ fl_color_print(f_type_error, data.context.set.notable, "%s", source);
if (destination) {
- fl_color_print(f_type_error, data.context.error, data.context.reset, "' %s '", how);
- fl_color_print(f_type_error, data.context.notable, data.context.reset, "%s", destination);
+ fl_color_print(f_type_error, data.context.set.error, "' %s '", how);
+ fl_color_print(f_type_error, data.context.set.notable, "%s", destination);
}
- fl_color_print_line(f_type_error, data.context.error, data.context.reset, "'.");
+ fl_color_print_line(f_type_error, data.context.set.error, "'.");
}
return F_false;
if (status == F_loop) {
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: Loop while trying to %s '", operation);
- fl_color_print(f_type_error, data.context.notable, data.context.reset, "%s", source);
+ fl_color_print(f_type_error, data.context.set.error, "ERROR: Loop while trying to %s '", operation);
+ fl_color_print(f_type_error, data.context.set.notable, "%s", source);
if (destination) {
- fl_color_print(f_type_error, data.context.error, data.context.reset, "' %s '", how);
- fl_color_print(f_type_error, data.context.notable, data.context.reset, "%s", destination);
+ fl_color_print(f_type_error, data.context.set.error, "' %s '", how);
+ fl_color_print(f_type_error, data.context.set.notable, "%s", destination);
}
- fl_color_print_line(f_type_error, data.context.error, data.context.reset, "'.");
+ fl_color_print_line(f_type_error, data.context.set.error, "'.");
}
return F_false;
if (status == F_prohibited) {
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: Prohibited by system while trying to %s '", operation);
- fl_color_print(f_type_error, data.context.notable, data.context.reset, "%s", source);
+ fl_color_print(f_type_error, data.context.set.error, "ERROR: Prohibited by system while trying to %s '", operation);
+ fl_color_print(f_type_error, data.context.set.notable, "%s", source);
if (destination) {
- fl_color_print(f_type_error, data.context.error, data.context.reset, "' %s '", how);
- fl_color_print(f_type_error, data.context.notable, data.context.reset, "%s", destination);
+ fl_color_print(f_type_error, data.context.set.error, "' %s '", how);
+ fl_color_print(f_type_error, data.context.set.notable, "%s", destination);
}
- fl_color_print_line(f_type_error, data.context.error, data.context.reset, "'.");
+ fl_color_print_line(f_type_error, data.context.set.error, "'.");
}
return F_false;
if (status == F_directory_found_not) {
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: Failed to %s '", operation);
- fl_color_print(f_type_error, data.context.notable, data.context.reset, "%s", source);
+ fl_color_print(f_type_error, data.context.set.error, "ERROR: Failed to %s '", operation);
+ fl_color_print(f_type_error, data.context.set.notable, "%s", source);
if (destination) {
- fl_color_print(f_type_error, data.context.error, data.context.reset, "' %s '", how);
- fl_color_print(f_type_error, data.context.notable, data.context.reset, "%s", destination);
+ fl_color_print(f_type_error, data.context.set.error, "' %s '", how);
+ fl_color_print(f_type_error, data.context.set.notable, "%s", destination);
}
- fl_color_print_line(f_type_error, data.context.error, data.context.reset, "' due to an invalid directory in the path.");
+ fl_color_print_line(f_type_error, data.context.set.error, "' due to an invalid directory in the path.");
}
return F_false;
if (status == F_failure) {
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: Failed to %s '", operation);
- fl_color_print(f_type_error, data.context.notable, data.context.reset, "%s", source);
+ fl_color_print(f_type_error, data.context.set.error, "ERROR: Failed to %s '", operation);
+ fl_color_print(f_type_error, data.context.set.notable, "%s", source);
if (destination) {
- fl_color_print(f_type_error, data.context.error, data.context.reset, "' %s '", how);
- fl_color_print(f_type_error, data.context.notable, data.context.reset, "%s", destination);
+ fl_color_print(f_type_error, data.context.set.error, "' %s '", how);
+ fl_color_print(f_type_error, data.context.set.notable, "%s", destination);
}
- fl_color_print_line(f_type_error, data.context.error, data.context.reset, "'.");
+ fl_color_print_line(f_type_error, data.context.set.error, "'.");
}
return F_false;
if (fake_print_error(data, status, function, F_false) == F_unknown && fallback && 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, "UNKNOWN ERROR: (");
- fl_color_print(f_type_error, data.context.notable, data.context.reset, "%llu", status);
- fl_color_print(f_type_error, data.context.error, data.context.reset, ") occurred while trying to %s '", operation);
- fl_color_print(f_type_error, data.context.notable, data.context.reset, "%s", source);
+ fl_color_print(f_type_error, data.context.set.error, "UNKNOWN ERROR: (");
+ fl_color_print(f_type_error, data.context.set.notable, "%llu", status);
+ fl_color_print(f_type_error, data.context.set.error, ") occurred while trying to %s '", operation);
+ fl_color_print(f_type_error, data.context.set.notable, "%s", source);
if (destination) {
- fl_color_print(f_type_error, data.context.error, data.context.reset, "' %s '", how);
- fl_color_print(f_type_error, data.context.notable, data.context.reset, "%s", destination);
+ fl_color_print(f_type_error, data.context.set.error, "' %s '", how);
+ fl_color_print(f_type_error, data.context.set.notable, "%s", destination);
}
- fl_color_print_line(f_type_error, data.context.error, data.context.reset, "'.");
+ fl_color_print_line(f_type_error, data.context.set.error, "'.");
}
return F_true;
#ifndef _di_fake_print_error_file_
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);
+ const fake_make_print_t print = fake_macro_make_print_t_initialize(fake_make_print_error, data.context.set.error, f_type_error);
return fake_print_message_file(data, status, function, name, operation, is_file, fallback, print);
}
if (status == F_file_found_not) {
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, "ENCODING ERROR: error occurred on invalid UTF-8 character at stop position (at ");
- fl_color_print(f_type_error, data.context.notable, data.context.reset, "%d", range.start);
- fl_color_print(f_type_error, data.context.error, data.context.reset, " of setting file '");
- fl_color_print(f_type_error, data.context.notable, data.context.reset, "%s", path_file);
- fl_color_print_line(f_type_error, data.context.error, data.context.reset, "').");
+ fl_color_print(f_type_error, data.context.set.error, "ENCODING ERROR: error occurred on invalid UTF-8 character at stop position (at ");
+ fl_color_print(f_type_error, data.context.set.notable, "%d", range.start);
+ fl_color_print(f_type_error, data.context.set.error, " of setting file '");
+ fl_color_print(f_type_error, data.context.set.notable, "%s", path_file);
+ fl_color_print_line(f_type_error, data.context.set.error, "').");
}
return F_false;
if (status == F_status_set_error(F_incomplete_utf_stop)) {
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, "ENCODING ERROR: error occurred on invalid UTF-8 character at end of string (at ");
- fl_color_print(f_type_error, data.context.notable, data.context.reset, "%d", range.start);
- fl_color_print(f_type_error, data.context.error, data.context.reset, " of setting file '");
- fl_color_print(f_type_error, data.context.notable, data.context.reset, "%s", path_file);
- fl_color_print_line(f_type_error, data.context.error, data.context.reset, "').");
+ fl_color_print(f_type_error, data.context.set.error, "ENCODING ERROR: error occurred on invalid UTF-8 character at end of string (at ");
+ fl_color_print(f_type_error, data.context.set.notable, "%d", range.start);
+ fl_color_print(f_type_error, data.context.set.error, " of setting file '");
+ fl_color_print(f_type_error, data.context.set.notable, "%s", path_file);
+ fl_color_print_line(f_type_error, data.context.set.error, "').");
}
return F_false;
if (fake_print_error(data, status, function, F_false) == F_unknown && fallback && 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, "UNKNOWN ERROR: (");
- fl_color_print(f_type_error, data.context.notable, data.context.reset, "%llu", status);
- fl_color_print(f_type_error, data.context.error, data.context.reset, ") in function ");
- fl_color_print(f_type_error, data.context.notable, data.context.reset, "%s", function);
- fl_color_print_line(f_type_error, data.context.error, data.context.reset, "().");
+ fl_color_print(f_type_error, data.context.set.error, "UNKNOWN ERROR: (");
+ fl_color_print(f_type_error, data.context.set.notable, "%llu", status);
+ fl_color_print(f_type_error, data.context.set.error, ") in function ");
+ fl_color_print(f_type_error, data.context.set.notable, "%s", function);
+ fl_color_print_line(f_type_error, data.context.set.error, "().");
}
return F_true;
fprintf(f_type_error, "%c", f_string_eol[0]);
- 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, parameter);
+ fl_color_print(f_type_error, data.context.set.error, "ERROR: The parameter '");
+ fl_color_print(f_type_error, data.context.set.notable, "%s%s", f_console_symbol_long_enable, parameter);
- fl_color_print_line(f_type_error, data.context.error, data.context.reset, "' was specified, but no value was given.");
+ fl_color_print_line(f_type_error, data.context.set.error, "' was specified, but no value was given.");
}
#endif // _di_fake_print_error_parameter_missing_value_
fprintf(f_type_error, "%c", f_string_eol[0]);
- 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, parameter);
+ fl_color_print(f_type_error, data.context.set.error, "ERROR: The parameter '");
+ fl_color_print(f_type_error, data.context.set.notable, "%s%s", f_console_symbol_long_enable, parameter);
- fl_color_print_line(f_type_error, data.context.error, data.context.reset, "' specified too many times.");
+ fl_color_print_line(f_type_error, data.context.set.error, "' specified too many times.");
}
#endif // _di_fake_print_error_parameter_too_many_
if (status == F_parameter) {
if (data.verbosity != fake_verbosity_quiet) {
fprintf(print.to, "%c", f_string_eol[0]);
- fl_color_print(print.to, print.context, data.context.reset, "%s: Invalid parameter", print.prefix);
+ fl_color_print(print.to, print.context, "%s: Invalid parameter", print.prefix);
if (function) {
- fl_color_print(print.to, print.context, data.context.reset, " when calling function ");
- fl_color_print(print.to, data.context.notable, data.context.reset, "%s", function);
- fl_color_print_line(print.to, print.context, data.context.reset, "().");
+ fl_color_print(print.to, print.context, " when calling function ");
+ fl_color_print(print.to, data.context.set.notable, "%s", function);
+ fl_color_print_line(print.to, print.context, "().");
}
else {
- fl_color_print_line(print.to, print.context, data.context.reset, ".");
+ fl_color_print_line(print.to, print.context, ".");
}
}
if (status == F_memory_allocation || status == F_memory_reallocation) {
if (data.verbosity != fake_verbosity_quiet) {
fprintf(print.to, "%c", f_string_eol[0]);
- fl_color_print(print.to, print.context, data.context.reset, "%s: Unable to allocate memory", print.prefix);
+ fl_color_print(print.to, print.context, "%s: Unable to allocate memory", print.prefix);
if (function) {
- fl_color_print(print.to, print.context, data.context.reset, " in function ");
- fl_color_print(print.to, data.context.notable, data.context.reset, "%s", function);
- fl_color_print_line(print.to, print.context, data.context.reset, "().");
+ fl_color_print(print.to, print.context, " in function ");
+ fl_color_print(print.to, data.context.set.notable, "%s", function);
+ fl_color_print_line(print.to, print.context, "().");
}
else {
- fl_color_print_line(print.to, print.context, data.context.reset, ".");
+ fl_color_print_line(print.to, print.context, ".");
}
}
if (fallback && data.verbosity != fake_verbosity_quiet) {
fprintf(print.to, "%c", f_string_eol[0]);
- fl_color_print(print.to, print.context, data.context.reset, "UNKNOWN %s: (", print.prefix);
- fl_color_print(print.to, data.context.notable, data.context.reset, "%llu", status);
- fl_color_print(print.to, print.context, data.context.reset, ")");
+ fl_color_print(print.to, print.context, "UNKNOWN %s: (", print.prefix);
+ fl_color_print(print.to, data.context.set.notable, "%llu", status);
+ fl_color_print(print.to, print.context, ")");
if (function) {
- fl_color_print(print.to, print.context, data.context.reset, " in function ");
- fl_color_print(print.to, data.context.notable, data.context.reset, "%s", function);
- fl_color_print_line(print.to, print.context, data.context.reset, "().");
+ fl_color_print(print.to, print.context, " in function ");
+ fl_color_print(print.to, data.context.set.notable, "%s", function);
+ fl_color_print_line(print.to, print.context, "().");
}
else {
- fl_color_print_line(print.to, print.context, data.context.reset, ".");
+ fl_color_print_line(print.to, print.context, ".");
}
}
if (status == F_file_found_not) {
if (data.verbosity != fake_verbosity_quiet) {
fprintf(print.to, "%c", f_string_eol[0]);
- fl_color_print(print.to, print.context, data.context.reset, "%s: Failed to find %s '", print.prefix, file_or_directory);
- fl_color_print(print.to, data.context.notable, data.context.reset, "%s", name);
- fl_color_print_line(print.to, print.context, data.context.reset, "'.");
+ fl_color_print(print.to, print.context, "%s: Failed to find %s '", print.prefix, file_or_directory);
+ fl_color_print(print.to, data.context.set.notable, "%s", name);
+ fl_color_print_line(print.to, print.context, "'.");
}
return F_false;
if (status == F_file_found) {
if (data.verbosity != fake_verbosity_quiet) {
fprintf(print.to, "%c", f_string_eol[0]);
- fl_color_print(print.to, print.context, data.context.reset, "%s: The %s '", print.prefix, file_or_directory);
- fl_color_print(print.to, data.context.notable, data.context.reset, "%s", name);
- fl_color_print_line(print.to, print.context, data.context.reset, "' already exists.");
+ fl_color_print(print.to, print.context, "%s: The %s '", print.prefix, file_or_directory);
+ fl_color_print(print.to, data.context.set.notable, "%s", name);
+ fl_color_print_line(print.to, print.context, "' already exists.");
}
return F_false;
if (status == F_directory_empty_not) {
if (data.verbosity != fake_verbosity_quiet) {
fprintf(print.to, "%c", f_string_eol[0]);
- fl_color_print(print.to, print.context, data.context.reset, "%s: The %s '", print.prefix, file_or_directory);
- fl_color_print(print.to, data.context.notable, data.context.reset, "%s", name);
- fl_color_print_line(print.to, print.context, data.context.reset, "' is not empty.");
+ fl_color_print(print.to, print.context, "%s: The %s '", print.prefix, file_or_directory);
+ fl_color_print(print.to, data.context.set.notable, "%s", name);
+ fl_color_print_line(print.to, print.context, "' is not empty.");
}
return F_false;
if (status == F_parameter) {
if (data.verbosity != fake_verbosity_quiet) {
fprintf(print.to, "%c", f_string_eol[0]);
- fl_color_print(print.to, print.context, data.context.reset, "INTERNAL %s: Invalid parameter when calling ", print.prefix);
- fl_color_print(print.to, data.context.notable, data.context.reset, "%s", function);
- fl_color_print(print.to, print.context, data.context.reset, "() for the %s '", file_or_directory);
- fl_color_print(print.to, data.context.notable, data.context.reset, "%s", name);
- fl_color_print_line(print.to, print.context, data.context.reset, "'.");
+ fl_color_print(print.to, print.context, "INTERNAL %s: Invalid parameter when calling ", print.prefix);
+ fl_color_print(print.to, data.context.set.notable, "%s", function);
+ fl_color_print(print.to, print.context, "() for the %s '", file_or_directory);
+ fl_color_print(print.to, data.context.set.notable, "%s", name);
+ fl_color_print_line(print.to, print.context, "'.");
}
return F_false;
if (status == F_name) {
if (data.verbosity != fake_verbosity_quiet) {
fprintf(print.to, "%c", f_string_eol[0]);
- fl_color_print(print.to, print.context, data.context.reset, "%s: Invalid %s name '", print.prefix, file_or_directory);
- fl_color_print(print.to, data.context.notable, data.context.reset, "%s", name);
- fl_color_print_line(print.to, print.context, data.context.reset, "'.");
+ fl_color_print(print.to, print.context, "%s: Invalid %s name '", print.prefix, file_or_directory);
+ fl_color_print(print.to, data.context.set.notable, "%s", name);
+ fl_color_print_line(print.to, print.context, "'.");
}
return F_false;
if (status == F_memory_out) {
if (data.verbosity != fake_verbosity_quiet) {
fprintf(print.to, "%c", f_string_eol[0]);
- fl_color_print(print.to, print.context, data.context.reset, "CRITICAL %s: Unable to allocate memory, while trying to %s %s '", print.prefix, operation, file_or_directory);
- fl_color_print(print.to, data.context.notable, data.context.reset, "%s", name);
- fl_color_print_line(print.to, print.context, data.context.reset, "'.");
+ fl_color_print(print.to, print.context, "CRITICAL %s: Unable to allocate memory, while trying to %s %s '", print.prefix, operation, file_or_directory);
+ fl_color_print(print.to, data.context.set.notable, "%s", name);
+ fl_color_print_line(print.to, print.context, "'.");
}
return F_false;
if (status == F_number_overflow) {
if (data.verbosity != fake_verbosity_quiet) {
fprintf(print.to, "%c", f_string_eol[0]);
- fl_color_print(print.to, print.context, data.context.reset, "%s: Overflow while trying to %s %s '", print.prefix, operation, file_or_directory);
- fl_color_print(print.to, data.context.notable, data.context.reset, "%s", name);
- fl_color_print_line(print.to, print.context, data.context.reset, "'.");
+ fl_color_print(print.to, print.context, "%s: Overflow while trying to %s %s '", print.prefix, operation, file_or_directory);
+ fl_color_print(print.to, data.context.set.notable, "%s", name);
+ fl_color_print_line(print.to, print.context, "'.");
}
return F_false;
if (status == F_directory) {
if (data.verbosity != fake_verbosity_quiet) {
fprintf(print.to, "%c", f_string_eol[0]);
- fl_color_print(print.to, print.context, data.context.reset, "%s: Invalid directory while trying to %s %s '", print.prefix, operation, file_or_directory);
- fl_color_print(print.to, data.context.notable, data.context.reset, "%s", name);
- fl_color_print_line(print.to, print.context, data.context.reset, "'.");
+ fl_color_print(print.to, print.context, "%s: Invalid directory while trying to %s %s '", print.prefix, operation, file_or_directory);
+ fl_color_print(print.to, data.context.set.notable, "%s", name);
+ fl_color_print_line(print.to, print.context, "'.");
}
return F_false;
if (status == F_access_denied) {
if (data.verbosity != fake_verbosity_quiet) {
fprintf(print.to, "%c", f_string_eol[0]);
- fl_color_print(print.to, print.context, data.context.reset, "%s: Access denied while trying to %s %s '", print.prefix, operation, file_or_directory);
- fl_color_print(print.to, data.context.notable, data.context.reset, "%s", name);
- fl_color_print_line(print.to, print.context, data.context.reset, "'.");
+ fl_color_print(print.to, print.context, "%s: Access denied while trying to %s %s '", print.prefix, operation, file_or_directory);
+ fl_color_print(print.to, data.context.set.notable, "%s", name);
+ fl_color_print_line(print.to, print.context, "'.");
}
return F_false;
if (status == F_loop) {
if (data.verbosity != fake_verbosity_quiet) {
fprintf(print.to, "%c", f_string_eol[0]);
- fl_color_print(print.to, print.context, data.context.reset, "%s: Loop while trying to %s %s '", print.prefix, operation, file_or_directory);
- fl_color_print(print.to, data.context.notable, data.context.reset, "%s", name);
- fl_color_print_line(print.to, print.context, data.context.reset, "'.");
+ fl_color_print(print.to, print.context, "%s: Loop while trying to %s %s '", print.prefix, operation, file_or_directory);
+ fl_color_print(print.to, data.context.set.notable, "%s", name);
+ fl_color_print_line(print.to, print.context, "'.");
}
return F_false;
if (status == F_prohibited) {
if (data.verbosity != fake_verbosity_quiet) {
fprintf(print.to, "%c", f_string_eol[0]);
- fl_color_print(print.to, print.context, data.context.reset, "%s: Prohibited by system while trying to %s %s '", print.prefix, operation, file_or_directory);
- fl_color_print(print.to, data.context.notable, data.context.reset, "%s", name);
- fl_color_print_line(print.to, print.context, data.context.reset, "'.");
+ fl_color_print(print.to, print.context, "%s: Prohibited by system while trying to %s %s '", print.prefix, operation, file_or_directory);
+ fl_color_print(print.to, data.context.set.notable, "%s", name);
+ fl_color_print_line(print.to, print.context, "'.");
}
return F_false;
if (status == F_access_owner) {
if (data.verbosity != fake_verbosity_quiet) {
fprintf(print.to, "%c", f_string_eol[0]);
- fl_color_print(print.to, print.context, data.context.reset, "%s: Currrent user is not allowed to use the given owner while trying to %s %s '", print.prefix, operation, file_or_directory);
- fl_color_print(print.to, data.context.notable, data.context.reset, "%s", name);
- fl_color_print_line(print.to, print.context, data.context.reset, "'.");
+ fl_color_print(print.to, print.context, "%s: Currrent user is not allowed to use the given owner while trying to %s %s '", print.prefix, operation, file_or_directory);
+ fl_color_print(print.to, data.context.set.notable, "%s", name);
+ fl_color_print_line(print.to, print.context, "'.");
}
return F_false;
if (status == F_access_group) {
if (data.verbosity != fake_verbosity_quiet) {
fprintf(print.to, "%c", f_string_eol[0]);
- fl_color_print(print.to, print.context, data.context.reset, "%s: Currrent user is not allowed to use the given group while trying to %s %s '", print.prefix, operation, file_or_directory);
- fl_color_print(print.to, data.context.notable, data.context.reset, "%s", name);
- fl_color_print_line(print.to, print.context, data.context.reset, "'.");
+ fl_color_print(print.to, print.context, "%s: Currrent user is not allowed to use the given group while trying to %s %s '", print.prefix, operation, file_or_directory);
+ fl_color_print(print.to, data.context.set.notable, "%s", name);
+ fl_color_print_line(print.to, print.context, "'.");
}
return F_false;
if (status == F_directory_found_not) {
if (data.verbosity != fake_verbosity_quiet) {
fprintf(print.to, "%c", f_string_eol[0]);
- fl_color_print(print.to, print.context, data.context.reset, "%s: Failed to %s %s '", print.prefix, operation, file_or_directory);
- fl_color_print(print.to, data.context.notable, data.context.reset, "%s", name);
- fl_color_print_line(print.to, print.context, data.context.reset, "' due to an invalid directory in the path.");
+ fl_color_print(print.to, print.context, "%s: Failed to %s %s '", print.prefix, operation, file_or_directory);
+ fl_color_print(print.to, data.context.set.notable, "%s", name);
+ fl_color_print_line(print.to, print.context, "' due to an invalid directory in the path.");
}
return F_false;
if (status == F_directory_found_not) {
if (data.verbosity != fake_verbosity_quiet) {
fprintf(print.to, "%c", f_string_eol[0]);
- fl_color_print(print.to, print.context, data.context.reset, "%s: Failed to %s %s '", print.prefix, operation, file_or_directory);
- fl_color_print(print.to, data.context.notable, data.context.reset, "%s", name);
- fl_color_print_line(print.to, print.context, data.context.reset, "' due to an invalid directory in the path.");
+ fl_color_print(print.to, print.context, "%s: Failed to %s %s '", print.prefix, operation, file_or_directory);
+ fl_color_print(print.to, data.context.set.notable, "%s", name);
+ fl_color_print_line(print.to, print.context, "' due to an invalid directory in the path.");
}
return F_false;
if (status == F_failure) {
if (data.verbosity != fake_verbosity_quiet) {
fprintf(print.to, "%c", f_string_eol[0]);
- fl_color_print(print.to, print.context, data.context.reset, "%s: Failed to %s %s '", print.prefix, operation, file_or_directory);
- fl_color_print(print.to, data.context.notable, data.context.reset, "%s", name);
- fl_color_print_line(print.to, print.context, data.context.reset, "'.");
+ fl_color_print(print.to, print.context, "%s: Failed to %s %s '", print.prefix, operation, file_or_directory);
+ fl_color_print(print.to, data.context.set.notable, "%s", name);
+ fl_color_print_line(print.to, print.context, "'.");
}
return F_false;
if (fake_print_error(data, status, function, F_false) == F_unknown && fallback && data.verbosity != fake_verbosity_quiet) {
fprintf(print.to, "%c", f_string_eol[0]);
- fl_color_print(print.to, print.context, data.context.reset, "UNKNOWN %s: (", print.prefix);
- fl_color_print(print.to, data.context.notable, data.context.reset, "%llu", status);
- fl_color_print(print.to, print.context, data.context.reset, ") occurred while trying to %s %s '", operation, file_or_directory);
- fl_color_print(print.to, data.context.notable, data.context.reset, "%s", name);
- fl_color_print_line(print.to, print.context, data.context.reset, "'.");
+ fl_color_print(print.to, print.context, "UNKNOWN %s: (", print.prefix);
+ fl_color_print(print.to, data.context.set.notable, "%llu", status);
+ fl_color_print(print.to, print.context, ") occurred while trying to %s %s '", operation, file_or_directory);
+ fl_color_print(print.to, data.context.set.notable, "%s", name);
+ fl_color_print_line(print.to, print.context, "'.");
}
return F_true;
f_fss_count_lines(buffer, operation_name.start, &line);
fprintf(print.to, "%c", f_string_eol[0]);
- fl_color_print(print.to, print.context, data.context.reset, "%s: The section operation '", print.prefix);
+ fl_color_print(print.to, print.context, "%s: The section operation '", print.prefix);
fl_color_print_code(print.to, data.context.notable);
f_print_dynamic_partial(print.to, buffer, operation_name);
fl_color_print_code(print.to, data.context.reset);
- fl_color_print(print.to, print.context, data.context.reset, "' from section '");
+ fl_color_print(print.to, print.context, "' from section '");
fl_color_print_code(print.to, data.context.notable);
f_print_dynamic_partial(print.to, buffer, section_name);
fl_color_print_code(print.to, data.context.reset);
- fl_color_print(print.to, print.context, data.context.reset, "' on line ");
- fl_color_print(print.to, data.context.notable, data.context.reset, "%llu", line);
- fl_color_print_line(print.to, print.context, data.context.reset, " failed.");
+ fl_color_print(print.to, print.context, "' on line ");
+ fl_color_print(print.to, data.context.set.notable, "%llu", line);
+ fl_color_print_line(print.to, print.context, " failed.");
}
#endif // _di_fake_print_message_section_operation_failed_
if (F_status_set_fine(status) == F_false) {
fprintf(print.to, "%c", f_string_eol[0]);
- fl_color_print(print.to, print.context, data.context.reset, "%s: The path '", print.prefix);
- fl_color_print(print.to, data.context.notable, data.context.reset, "%s", path);
- fl_color_print_line(print.to, print.context, data.context.reset, "' is outside the project root.");
+ fl_color_print(print.to, print.context, "%s: The path '", print.prefix);
+ fl_color_print(print.to, data.context.set.notable, "%s", path);
+ fl_color_print_line(print.to, print.context, "' is outside the project root.");
}
else {
fake_print_error_file(data, status, function, path, "determine real path of", F_true, F_true);
if (status == F_buffer_too_large) {
fprintf(print.to, "%c", f_string_eol[0]);
- fl_color_print(print.to, print.context, data.context.reset, "%s: Maximum stack size reached while processing path '", print.prefix);
- fl_color_print(print.to, data.context.notable, data.context.reset, "%s", path);
- fl_color_print(print.to, print.context, data.context.reset, "'");
+ fl_color_print(print.to, print.context, "%s: Maximum stack size reached while processing path '", print.prefix);
+ fl_color_print(print.to, data.context.set.notable, "%s", path);
+ fl_color_print(print.to, print.context, "'");
if (function) {
- fl_color_print(print.to, print.context, data.context.reset, " while calling ");
- fl_color_print(print.to, data.context.notable, data.context.reset, "%s", function);
- fl_color_print(print.to, print.context, data.context.reset, "()");
+ fl_color_print(print.to, print.context, " while calling ");
+ fl_color_print(print.to, data.context.set.notable, "%s", function);
+ fl_color_print(print.to, print.context, "()");
}
- fl_color_print_line(print.to, print.context, data.context.reset, ".");
+ fl_color_print_line(print.to, print.context, ".");
}
else {
fake_print_message_file(data, status, function, path, "change path to", F_false, F_true, print);
f_fss_count_lines(buffer, operation_name.start, &line);
fprintf(print.to, "%c", f_string_eol[0]);
- fl_color_print(print.to, print.context, data.context.reset, "%s: The section operation '", print.prefix);
+ fl_color_print(print.to, print.context, "%s: The section operation '", print.prefix);
fl_color_print_code(print.to, data.context.notable);
f_print_dynamic_partial(print.to, buffer, operation_name);
fl_color_print_code(print.to, data.context.reset);
- fl_color_print(print.to, print.context, data.context.reset, "' from section '");
+ fl_color_print(print.to, print.context, "' from section '");
fl_color_print_code(print.to, data.context.notable);
f_print_dynamic_partial(print.to, buffer, section_name);
fl_color_print_code(print.to, data.context.reset);
- fl_color_print(print.to, print.context, data.context.reset, "' on line ");
- fl_color_print(print.to, data.context.notable, data.context.reset, "%llu", line);
- fl_color_print(print.to, print.context, data.context.reset, " cannot be processed because the max stack depth of ");
- fl_color_print(print.to, data.context.notable, data.context.reset, "%llu", stack_max);
- fl_color_print_line(print.to, print.context, data.context.reset, " has been reached.");
+ fl_color_print(print.to, print.context, "' on line ");
+ fl_color_print(print.to, data.context.set.notable, "%llu", line);
+ fl_color_print(print.to, print.context, " cannot be processed because the max stack depth of ");
+ fl_color_print(print.to, data.context.set.notable, "%llu", stack_max);
+ fl_color_print_line(print.to, print.context, " has been reached.");
}
#endif // _di_fake_print_message_section_operation_stack_max_
f_fss_count_lines(buffer, operation_name.start, &line);
fprintf(print.to, "%c", f_string_eol[0]);
- fl_color_print(print.to, print.context, data.context.reset, "%s: The section operation '", print.prefix);
+ fl_color_print(print.to, print.context, "%s: The section operation '", print.prefix);
fl_color_print_code(print.to, data.context.notable);
f_print_dynamic_partial(print.to, buffer, operation_name);
fl_color_print_code(print.to, data.context.reset);
- fl_color_print(print.to, print.context, data.context.reset, "' from section '");
+ fl_color_print(print.to, print.context, "' from section '");
fl_color_print_code(print.to, data.context.notable);
f_print_dynamic_partial(print.to, buffer, section_name);
fl_color_print_code(print.to, data.context.reset);
- fl_color_print(print.to, print.context, data.context.reset, "' on line ");
- fl_color_print(print.to, data.context.notable, data.context.reset, "%llu", line);
- fl_color_print_line(print.to, print.context, data.context.reset, " is not a known operation name.");
+ fl_color_print(print.to, print.context, "' on line ");
+ fl_color_print(print.to, data.context.set.notable, "%llu", line);
+ fl_color_print_line(print.to, print.context, " is not a known operation name.");
}
#endif // _di_fake_print_message_section_operation_unknown_
fprintf(f_type_error, "%c", f_string_eol[0]);
- fl_color_print(f_type_warning, data.context.warning, data.context.reset, "WARNING: the fakefile '");
- fl_color_print(f_type_warning, data.context.notable, data.context.reset, "%s", path_file);
- fl_color_print(f_type_warning, data.context.warning, data.context.reset, "' has empty content for the '");
- fl_color_print(f_type_warning, data.context.notable, data.context.reset, "%s", settings_name);
- fl_color_print(f_type_warning, data.context.warning, data.context.reset, "' object '");
+ fl_color_print(f_type_warning, data.context.set.warning, "WARNING: the fakefile '");
+ fl_color_print(f_type_warning, data.context.set.notable, "%s", path_file);
+ fl_color_print(f_type_warning, data.context.set.warning, "' has empty content for the '");
+ fl_color_print(f_type_warning, data.context.set.notable, "%s", settings_name);
+ fl_color_print(f_type_warning, data.context.set.warning, "' object '");
fl_color_print_code(f_type_warning, data.context.notable);
f_print_dynamic_partial(f_type_warning, buffer, range_object);
fl_color_print_code(f_type_warning, data.context.reset);
- fl_color_print_line(f_type_warning, data.context.warning, data.context.reset, "'.");
+ fl_color_print_line(f_type_warning, data.context.set.warning, "'.");
}
#endif // _di_fake_print_warning_settings_content_empty_
fprintf(f_type_error, "%c", f_string_eol[0]);
- fl_color_print(f_type_warning, data.context.warning, data.context.reset, "WARNING: the fakefile '");
- fl_color_print(f_type_warning, data.context.notable, data.context.reset, "%s", path_file);
- fl_color_print(f_type_warning, data.context.warning, data.context.reset, "' has an invalid content '");
+ fl_color_print(f_type_warning, data.context.set.warning, "WARNING: the fakefile '");
+ fl_color_print(f_type_warning, data.context.set.notable, "%s", path_file);
+ fl_color_print(f_type_warning, data.context.set.warning, "' has an invalid content '");
fl_color_print_code(f_type_warning, data.context.notable);
f_print_dynamic_partial(f_type_warning, buffer, range_content);
fl_color_print_code(f_type_warning, data.context.reset);
- fl_color_print(f_type_warning, data.context.warning, data.context.reset, "' for the '");
- fl_color_print(f_type_warning, data.context.notable, data.context.reset, "%s", settings_name);
- fl_color_print(f_type_warning, data.context.warning, data.context.reset, "' object '");
+ fl_color_print(f_type_warning, data.context.set.warning, "' for the '");
+ fl_color_print(f_type_warning, data.context.set.notable, "%s", settings_name);
+ fl_color_print(f_type_warning, data.context.set.warning, "' object '");
fl_color_print_code(f_type_warning, data.context.notable);
f_print_dynamic_partial(f_type_warning, buffer, range_object);
fl_color_print_code(f_type_warning, data.context.reset);
- fl_color_print_line(f_type_warning, data.context.warning, data.context.reset, "'.");
+ fl_color_print_line(f_type_warning, data.context.set.warning, "'.");
}
#endif // _di_fake_print_warning_settings_content_invalid_
fprintf(f_type_error, "%c", f_string_eol[0]);
- fl_color_print(f_type_warning, data.context.warning, data.context.reset, "WARNING: the setting '");
- fl_color_print(f_type_warning, data.context.notable, data.context.reset, "%s", name_object);
- fl_color_print(f_type_warning, data.context.warning, data.context.reset, "' in the file '");
- fl_color_print(f_type_warning, data.context.notable, data.context.reset, "%s", path_file);
+ fl_color_print(f_type_warning, data.context.set.warning, "WARNING: the setting '");
+ fl_color_print(f_type_warning, data.context.set.notable, "%s", name_object);
+ fl_color_print(f_type_warning, data.context.set.warning, "' in the file '");
+ fl_color_print(f_type_warning, data.context.set.notable, "%s", path_file);
- fl_color_print_line(f_type_warning, data.context.warning, data.context.reset, "' may only have a single property, only using the first.");
+ fl_color_print_line(f_type_warning, data.context.set.warning, "' may only have a single property, only using the first.");
}
#endif // _di_fake_print_warning_settings_content_multiple_
fprintf(f_type_error, "%c", f_string_eol[0]);
- fl_color_print(f_type_warning, data.context.warning, data.context.reset, "WARNING: the %s object '", label);
- fl_color_print(f_type_warning, data.context.notable, data.context.reset, "%s", name_object);
- fl_color_print(f_type_warning, data.context.warning, data.context.reset, "' in the file '");
- fl_color_print(f_type_warning, data.context.notable, data.context.reset, "%s", path_file);
+ fl_color_print(f_type_warning, data.context.set.warning, "WARNING: the %s object '", label);
+ fl_color_print(f_type_warning, data.context.set.notable, "%s", name_object);
+ fl_color_print(f_type_warning, data.context.set.warning, "' in the file '");
+ fl_color_print(f_type_warning, data.context.set.notable, "%s", path_file);
- fl_color_print_line(f_type_warning, data.context.warning, data.context.reset, "' may only be specified once, only using the first.");
+ fl_color_print_line(f_type_warning, data.context.set.warning, "' may only be specified once, only using the first.");
}
#endif // _di_fake_print_warning_settings_object_multiple_
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, "Generating skeleton structure.");
+ fl_color_print_line(f_type_output, data.context.set.important, "Generating skeleton structure.");
}
{
if (status == F_false) {
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 path '");
- fl_color_print(f_type_error, data.context.notable, data.context.reset, "%s", path.string);
- fl_color_print_line(f_type_error, data.context.error, data.context.reset, "' exists but is not a directory.");
+ fl_color_print(f_type_error, data.context.set.error, "ERROR: The path '");
+ fl_color_print(f_type_error, data.context.set.notable, "%s", path.string);
+ fl_color_print_line(f_type_error, data.context.set.error, "' exists but is not a directory.");
}
return F_status_set_warning(F_failure);
if (F_status_is_error(status)) {
if (F_status_set_fine(status) == F_file_found_not) {
fprintf(f_type_error, "%c", f_string_eol[0]);
- fl_color_print(f_type_error, data.context.error, data.context.reset, "ERROR: The path '");
- fl_color_print(f_type_error, data.context.notable, data.context.reset, "%s", path.string);
- fl_color_print_line(f_type_error, data.context.error, data.context.reset, "' could not be created, a parent directory does not exist.");
+ fl_color_print(f_type_error, data.context.set.error, "ERROR: The path '");
+ fl_color_print(f_type_error, data.context.set.notable, "%s", path.string);
+ fl_color_print_line(f_type_error, data.context.set.error, "' could not be created, a parent directory does not exist.");
}
else {
fake_print_error_file(data, F_status_set_fine(status), "f_directory_create", path.string, "create", F_false, F_true);
if (F_status_is_error(status)) {
if (F_status_set_fine(status) == F_file_found_not) {
fprintf(f_type_error, "%c", f_string_eol[0]);
- fl_color_print(f_type_error, data.context.error, data.context.reset, "ERROR: The file '");
- fl_color_print(f_type_error, data.context.notable, data.context.reset, "%s", path.string);
- fl_color_print_line(f_type_error, data.context.error, data.context.reset, "' could not be created, a parent directory does not exist.");
+ fl_color_print(f_type_error, data.context.set.error, "ERROR: The file '");
+ fl_color_print(f_type_error, data.context.set.notable, "%s", path.string);
+ fl_color_print_line(f_type_error, data.context.set.error, "' could not be created, a parent directory does not exist.");
}
else {
fake_print_error_file(data, F_status_set_fine(status), "f_file_create", path.string, "create", F_true, F_true);
#endif
#ifndef _di_firewall_print_help_
- f_return_status firewall_print_help(const fl_color_context_t context) {
+ f_return_status firewall_print_help(const f_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 // _en_firewall_debug_
printf("%c%c", f_string_eol[0], f_string_eol[0]);
- fl_color_print(f_type_output, context.important, context.reset, " Available Commands: ");
+ fl_color_print(f_type_output, context.set.important, " Available Commands: ");
printf("%c ", f_string_eol[0]);
- fl_color_print(f_type_output, context.standout, context.reset, firewall_command_start);
+ fl_color_print(f_type_output, context.set.standout, firewall_command_start);
printf(" Turn on the firewall");
printf("%c ", f_string_eol[0]);
- fl_color_print(f_type_output, context.standout, context.reset, firewall_command_stop);
+ fl_color_print(f_type_output, context.set.standout, firewall_command_stop);
printf(" Turn off the firewall");
printf("%c ", f_string_eol[0]);
- fl_color_print(f_type_output, context.standout, context.reset, firewall_command_restart);
+ fl_color_print(f_type_output, context.set.standout, firewall_command_restart);
printf(" Turn off and then turn on the firewall");
printf("%c ", f_string_eol[0]);
- fl_color_print(f_type_output, context.standout, context.reset, firewall_command_lock);
+ fl_color_print(f_type_output, context.set.standout, firewall_command_lock);
printf(" Prevent all communication");
printf("%c ", f_string_eol[0]);
- fl_color_print(f_type_output, context.standout, context.reset, firewall_command_show);
+ fl_color_print(f_type_output, context.set.standout, firewall_command_show);
printf(" Show active firewall settings");
fll_program_print_help_usage(context, firewall_name, "command");
if (strncmp("nat", arguments.argv[data->remaining.array[counter]], 4) != 0) {
if (strncmp("mangle", arguments.argv[data->remaining.array[counter]], 7) != 0) {
if (strncmp("ports", arguments.argv[data->remaining.array[counter]], 6) != 0) {
- fl_color_print_line(f_type_warning, data->context.warning, data->context.reset, "WARNING: '%s' is not a valid show option", arguments.argv[data->remaining.array[counter]]);
+ fl_color_print_line(f_type_warning, data->context.set.warning, "WARNING: '%s' is not a valid show option", arguments.argv[data->remaining.array[counter]]);
}
else {
show_ports = F_true;
f_macro_string_dynamics_resize(status, parameters, 7);
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_line(f_type_error, data->context.set.error, "CRITICAL ERROR: Unable to allocate memory.");
firewall_delete_local_data(&local);
firewall_delete_data(data);
return status;
}
if (show_nat) {
- fl_color_print(f_type_output, data->context.standout, data->context.reset, "=========================== ");
- fl_color_print(f_type_output, data->context.title, data->context.reset, "NAT");
- fl_color_print_line(f_type_output, data->context.standout, data->context.reset, " ============================");
+ fl_color_print(f_type_output, data->context.set.standout, "=========================== ");
+ fl_color_print(f_type_output, data->context.set.title, "NAT");
+ fl_color_print_line(f_type_output, data->context.set.standout, " ============================");
fflush(f_type_output);
parameters.used = 6;
}
if (F_status_is_error_not(status) && show_mangle) {
- fl_color_print(f_type_output, data->context.standout, data->context.reset, "========================== ");
- fl_color_print(f_type_output, data->context.title, data->context.reset, "MANGLE");
- fl_color_print_line(f_type_output, data->context.standout, data->context.reset, " ==========================");
+ fl_color_print(f_type_output, data->context.set.standout, "========================== ");
+ fl_color_print(f_type_output, data->context.set.title, "MANGLE");
+ fl_color_print_line(f_type_output, data->context.set.standout, " ==========================");
fflush(f_type_output);
parameters.used = 6;
}
if (F_status_is_error_not(status) && show_ports) {
- fl_color_print(f_type_output, data->context.standout, data->context.reset, "========================== ");
- fl_color_print(f_type_output, data->context.title, data->context.reset, "FILTER");
- fl_color_print_line(f_type_output, data->context.standout, data->context.reset, " ==========================");
+ fl_color_print(f_type_output, data->context.set.standout, "========================== ");
+ fl_color_print(f_type_output, data->context.set.title, "FILTER");
+ fl_color_print_line(f_type_output, data->context.set.standout, " ==========================");
fflush(f_type_output);
parameters.used = 4;
status = F_status_set_fine(status);
if (status == F_memory_allocation || status == F_memory_reallocation) {
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "CRITICAL ERROR: Unable to allocate memory.");
+ fl_color_print_line(f_type_error, data->context.set.error, "CRITICAL ERROR: Unable to allocate memory.");
}
else {
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "ERROR: Failed to perform requested %s operation:", firewall_tool_iptables);
+ fl_color_print_line(f_type_error, data->context.set.error, "ERROR: Failed to perform requested %s operation:", firewall_tool_iptables);
fprintf(f_type_error, " ");
f_string_length_t i = 0;
status = F_status_set_fine(status);
if (status == F_memory_allocation || status == F_memory_reallocation) {
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "CRITICAL ERROR: Unable to allocate memory.");
+ fl_color_print_line(f_type_error, data->context.set.error, "CRITICAL ERROR: Unable to allocate memory.");
}
else if (status == F_data_not) {
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "ERROR: Could not find any network devices");
+ fl_color_print_line(f_type_error, data->context.set.error, "ERROR: Could not find any network devices");
}
else if (status == F_failure) {
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "ERROR: Failed to read the device directory '%s'", network_devices);
+ fl_color_print_line(f_type_error, data->context.set.error, "ERROR: Failed to read the device directory '%s'", network_devices);
}
firewall_delete_local_data(&local);
return status;
}
else {
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "ERROR: Failed to perform lock request because the lock instructions are missing from: %s.", network_path firewall_file_other);
+ fl_color_print_line(f_type_error, data->context.set.error, "ERROR: Failed to perform lock request because the lock instructions are missing from: %s.", network_path firewall_file_other);
firewall_delete_local_data(&local);
firewall_delete_data(data);
}
}
else {
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "ERROR: Failed to perform stop request because the lock instructions are missing from: %s.", network_path firewall_file_other);
+ fl_color_print_line(f_type_error, data->context.set.error, "ERROR: Failed to perform stop request because the lock instructions are missing from: %s.", network_path firewall_file_other);
firewall_delete_local_data(&local);
firewall_delete_data(data);
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.");
+ fl_color_print_line(f_type_error, data->context.set.error, "CRITICAL ERROR: Unable to allocate memory.");
firewall_delete_local_data(&local);
firewall_delete_data(data);
return status;
firewall_delete_local_data(&local);
}
else {
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "ERROR: You did not pass a command");
+ fl_color_print_line(f_type_error, data->context.set.error, "ERROR: You did not pass a command");
status = F_status_set_error(F_parameter);
}
}
f_macro_string_lengths_t_delete_simple(data->remaining);
f_macro_string_dynamics_t_delete_simple(data->devices);
- fl_macro_color_context_t_delete_simple(data->context);
+ f_macro_color_context_t_delete_simple(data->context);
return F_none;
}
bool process_pipe;
f_string_dynamics_t devices;
- fl_color_context_t context;
+ f_color_context_t context;
} firewall_data_t;
#define firewall_data_t_initialize \
f_string_lengths_t_initialize, \
F_false, \
f_string_dynamics_t_initialize, \
- fl_color_context_t_initialize, \
+ f_color_context_t_initialize, \
}
#endif // _di_firewall_data_t_
* F_none on success.
*/
#ifndef _di_firewall_print_help_
- extern f_return_status firewall_print_help(const fl_color_context_t context);
+ extern f_return_status firewall_print_help(const f_color_context_t context);
#endif // _di_firewall_print_help_
/**
fprintf(f_type_warning, "\n");
}
else {
- fl_color_print_line(f_type_warning, data.context.warning, data.context.reset, "WARNING: At line %i, the object has no content", i);
+ fl_color_print_line(f_type_warning, data.context.set.warning, "WARNING: At line %i, the object has no content", i);
}
continue;
status = F_status_set_fine(status);
if (status == F_parameter) {
- fl_color_print_line(f_type_error, data.context.error, data.context.reset, "INTERNAL ERROR: Invalid parameter when calling f_file_open()");
+ fl_color_print_line(f_type_error, data.context.set.error, "INTERNAL ERROR: Invalid parameter when calling f_file_open()");
}
else if (status == F_file_found_not) {
// the file does not have to exist
- fl_color_print_line(f_type_warning, data.context.warning, data.context.reset, "WARNING: Cannot find the file '%.*s'", file_path.used, file_path.string);
+ fl_color_print_line(f_type_warning, data.context.set.warning, "WARNING: Cannot find the file '%.*s'", file_path.used, file_path.string);
status = F_none;
}
else if (status == F_file_open) {
- fl_color_print_line(f_type_error, data.context.error, data.context.reset, "ERROR: Unable to open the file '%.*s'", file_path.used, file_path.string);
+ fl_color_print_line(f_type_error, data.context.set.error, "ERROR: Unable to open the file '%.*s'", file_path.used, file_path.string);
}
else if (status == F_file_descriptor) {
- fl_color_print_line(f_type_error, data.context.error, data.context.reset, "ERROR: File descriptor error while trying to open the file '%.*s'", file_path.used, file_path.string);
+ fl_color_print_line(f_type_error, data.context.set.error, "ERROR: File descriptor error while trying to open the file '%.*s'", file_path.used, file_path.string);
}
else if (status == F_memory_allocation || status == F_memory_reallocation) {
- fl_color_print_line(f_type_error, data.context.error, data.context.reset, "CRITICAL ERROR: Unable to allocate memory.");
+ fl_color_print_line(f_type_error, data.context.set.error, "CRITICAL ERROR: Unable to allocate memory.");
}
else {
- 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);
+ fl_color_print_line(f_type_error, data.context.set.error, "INTERNAL ERROR: An unhandled error (%u) has occurred while calling f_file_open()", status);
}
if (status != F_file_found_not) {
status = F_status_set_fine(status);
if (status == F_parameter) {
- fl_color_print_line(f_type_error, data.context.error, data.context.reset, "INTERNAL ERROR: Invalid parameter when calling f_file_read()");
+ fl_color_print_line(f_type_error, data.context.set.error, "INTERNAL ERROR: Invalid parameter when calling f_file_read()");
}
else if (status == F_number_overflow) {
- fl_color_print_line(f_type_error, data.context.error, data.context.reset, "ERROR: Integer overflow while trying to buffer the file '%.*s'", file_path.used, file_path.string);
+ fl_color_print_line(f_type_error, data.context.set.error, "ERROR: Integer overflow while trying to buffer the file '%.*s'", file_path.used, file_path.string);
}
else if (status == F_file_closed) {
- fl_color_print_line(f_type_error, data.context.error, data.context.reset, "INTERNAL ERROR: The file '%.*s' is no longer open", file_path.used, file_path.string);
+ fl_color_print_line(f_type_error, data.context.set.error, "INTERNAL ERROR: The file '%.*s' is no longer open", file_path.used, file_path.string);
}
else if (status == F_file_seek) {
- fl_color_print_line(f_type_error, data.context.error, data.context.reset, "ERROR: A seek error occurred while accessing the file '%.*s'", file_path.used, file_path.string);
+ fl_color_print_line(f_type_error, data.context.set.error, "ERROR: A seek error occurred while accessing the file '%.*s'", file_path.used, file_path.string);
}
else if (status == F_file_read) {
- fl_color_print_line(f_type_error, data.context.error, data.context.reset, "ERROR: A read error occurred while accessing the file '%.*s'", file_path.used, file_path.string);
+ fl_color_print_line(f_type_error, data.context.set.error, "ERROR: A read error occurred while accessing the file '%.*s'", file_path.used, file_path.string);
}
else if (status == F_memory_allocation || status == F_memory_reallocation) {
- fl_color_print_line(f_type_error, data.context.error, data.context.reset, "CRITICAL ERROR: Unable to allocate memory.");
+ fl_color_print_line(f_type_error, data.context.set.error, "CRITICAL ERROR: Unable to allocate memory.");
}
else {
- 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_read()", status);
+ fl_color_print_line(f_type_error, data.context.set.error, "INTERNAL ERROR: An unhandled error (%u) has occurred while calling f_file_read()", status);
}
status = F_status_set_error(status);
status = F_status_set_fine(status);
if (status == F_parameter) {
- fl_color_print_line(f_type_error, data.context.error, data.context.reset, "INTERNAL ERROR: Invalid parameter when calling fll_fss_basic_read() for the file '%.*s'", file_path.used, file_path.string);
+ fl_color_print_line(f_type_error, data.context.set.error, "INTERNAL ERROR: Invalid parameter when calling fll_fss_basic_read() for the file '%.*s'", file_path.used, file_path.string);
}
else if (status == F_data_not_eos || status == F_data_not || status == F_data_not_stop) {
// empty files are to be silently ignored
}
else if (status == F_memory_allocation || status == F_memory_reallocation) {
- fl_color_print_line(f_type_error, data.context.error, data.context.reset, "CRITICAL ERROR: Unable to allocate memory.");
+ fl_color_print_line(f_type_error, data.context.set.error, "CRITICAL ERROR: Unable to allocate memory.");
}
else {
- 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_read() for the file '%.*s'", status, file_path.used, file_path.string);
+ fl_color_print_line(f_type_error, data.context.set.error, "INTERNAL ERROR: An unhandled error (%u) has occurred while calling fll_fss_basic_read() for the file '%.*s'", status, file_path.used, file_path.string);
}
status = F_status_set_error(status);
}
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_line(f_type_error, data.context.set.error, "CRITICAL ERROR: Unable to allocate memory.");
f_macro_string_dynamic_t_delete_simple(ip_list_action);
}
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_line(f_type_error, data.context.set.error, "CRITICAL ERROR: Unable to allocate memory.");
break;
}
status = fll_execute_program((f_string_t) current_tool, arguments, 0, &return_code);
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_line(f_type_error, data.context.set.error, "ERROR: Failed to perform requested %s operation:", current_tool);
fprintf(f_type_error, " ");
fl_color_print_code(f_type_error, data.context.error);
break;
}
else if (status == F_parameter) {
- fl_color_print_line(f_type_error, data.context.error, data.context.reset, "INTERNAL ERROR: Invalid parameter when calling fll_execute_program()");
+ fl_color_print_line(f_type_error, data.context.set.error, "INTERNAL ERROR: Invalid parameter when calling fll_execute_program()");
// remove ip_argument from arguments string.
f_macro_string_dynamic_t_delete_simple(arguments.array[arguments.used]);
status = fll_execute_program(current_tool, arguments, 0, &return_code);
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_line(f_type_error, data.context.set.error, "ERROR: Failed to perform requested %s operation:", current_tool);
fprintf(f_type_error, " ");
fl_color_print_code(f_type_error, data.context.error);
break;
}
else if (status == F_parameter) {
- fl_color_print_line(f_type_error, data.context.error, data.context.reset, "INTERNAL ERROR: Invalid parameter when calling fll_execute_program()");
+ fl_color_print_line(f_type_error, data.context.set.error, "INTERNAL ERROR: Invalid parameter when calling fll_execute_program()");
break;
}
}
if (status == F_failure) {
if (tool == firewall_program_iptables) {
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "ERROR: Failed to perform requested %s operation:", firewall_tool_iptables);
+ fl_color_print_line(f_type_error, data->context.set.error, "ERROR: Failed to perform requested %s operation:", firewall_tool_iptables);
}
else if (tool == firewall_program_ip6tables) {
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "ERROR: Failed to perform requested %s operation:", firewall_tool_ip6tables);
+ fl_color_print_line(f_type_error, data->context.set.error, "ERROR: Failed to perform requested %s operation:", firewall_tool_ip6tables);
}
fprintf(f_type_error, " ");
fprintf(f_type_error, "\n");
}
else if (status == F_parameter) {
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "INTERNAL ERROR: Invalid parameter when calling fll_execute_program()");
+ fl_color_print_line(f_type_error, data->context.set.error, "INTERNAL ERROR: Invalid parameter when calling fll_execute_program()");
}
else {
- 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);
+ fl_color_print_line(f_type_error, data->context.set.error, "INTERNAL ERROR: An unhandled error (%u) has occurred while calling fll_execute_program()", status);
}
f_macro_string_dynamics_t_delete_simple(arguments);
status = F_status_set_fine(status);
if (status == F_failure) {
- fl_color_print_line(f_type_error, data.context.error, data.context.reset, "ERROR: Failed to perform requested %s operation:", tools[i]);
+ fl_color_print_line(f_type_error, data.context.set.error, "ERROR: Failed to perform requested %s operation:", tools[i]);
fprintf(f_type_error, " ");
fl_color_print_code(f_type_error, data.context.error);
fprintf(f_type_error, "\n");
}
else if (status == F_parameter) {
- fl_color_print_line(f_type_error, data.context.error, data.context.reset, "INTERNAL ERROR: Invalid parameter when calling fll_execute_program()");
+ fl_color_print_line(f_type_error, data.context.set.error, "INTERNAL ERROR: Invalid parameter when calling fll_execute_program()");
}
else {
- 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);
+ fl_color_print_line(f_type_error, data.context.set.error, "INTERNAL ERROR: An unhandled error (%u) has occurred while calling fll_execute_program()", status);
}
return status;
status = F_status_set_fine(status);
if (status == F_failure) {
- fl_color_print_line(f_type_error, data.context.error, data.context.reset, "ERROR: Failed to perform requested %s operation:", tools[i]);
+ fl_color_print_line(f_type_error, data.context.set.error, "ERROR: Failed to perform requested %s operation:", tools[i]);
fprintf(f_type_error, " ");
fl_color_print_code(f_type_error, data.context.error);
fprintf(f_type_error, "\n");
}
else if (status == F_parameter) {
- fl_color_print_line(f_type_error, data.context.error, data.context.reset, "INTERNAL ERROR: Invalid parameter when calling fll_execute_program()");
+ fl_color_print_line(f_type_error, data.context.set.error, "INTERNAL ERROR: Invalid parameter when calling fll_execute_program()");
}
else {
- 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);
+ fl_color_print_line(f_type_error, data.context.set.error, "INTERNAL ERROR: An unhandled error (%u) has occurred while calling fll_execute_program()", status);
}
return status;
status = F_status_set_fine(status);
if (status == F_failure) {
- fl_color_print_line(f_type_error, data.context.error, data.context.reset, "ERROR: Failed to perform requested %s operation:", tools[j]);
+ fl_color_print_line(f_type_error, data.context.set.error, "ERROR: Failed to perform requested %s operation:", tools[j]);
fprintf(f_type_error, " ");
fl_color_print_code(f_type_error, data.context.error);
fprintf(f_type_error, "\n");
}
else if (status == F_parameter) {
- fl_color_print_line(f_type_error, data.context.error, data.context.reset, "INTERNAL ERROR: Invalid parameter when calling fll_execute_program()");
+ fl_color_print_line(f_type_error, data.context.set.error, "INTERNAL ERROR: Invalid parameter when calling fll_execute_program()");
}
else {
- 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);
+ fl_color_print_line(f_type_error, data.context.set.error, "INTERNAL ERROR: An unhandled error (%u) has occurred while calling fll_execute_program()", status);
}
return status;
if (optional) {
if (status == F_parameter) {
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "INTERNAL ERROR: Invalid parameter when calling f_file_open().");
+ fl_color_print_line(f_type_error, data->context.set.error, "INTERNAL ERROR: Invalid parameter when calling f_file_open().");
}
else if (status != F_file_found_not && status != F_file_open && status != F_file_descriptor) {
- 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);
+ fl_color_print_line(f_type_error, data->context.set.error, "INTERNAL ERROR: An unhandled error (%u) has occurred while calling f_file_open().", status);
}
} else {
if (status == F_parameter) {
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "INTERNAL ERROR: Invalid parameter when calling f_file_open().");
+ fl_color_print_line(f_type_error, data->context.set.error, "INTERNAL ERROR: Invalid parameter when calling f_file_open().");
}
else if (status == F_file_found_not) {
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "ERROR: Unable to find the file '%s'.", filename);
+ fl_color_print_line(f_type_error, data->context.set.error, "ERROR: Unable to find the file '%s'.", filename);
}
else if (status == F_file_open) {
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "ERROR: Unable to open the file '%s'.", filename);
+ fl_color_print_line(f_type_error, data->context.set.error, "ERROR: Unable to open the file '%s'.", filename);
}
else if (status == F_file_descriptor) {
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "ERROR: File descriptor error while trying to open the file '%s'.", filename);
+ fl_color_print_line(f_type_error, data->context.set.error, "ERROR: File descriptor error while trying to open the file '%s'.", filename);
}
else {
- 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);
+ fl_color_print_line(f_type_error, data->context.set.error, "INTERNAL ERROR: An unhandled error (%u) has occurred while calling f_file_open().", status);
}
}
status = F_status_set_fine(status);
if (status == F_parameter) {
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "INTERNAL ERROR: Invalid parameter when calling f_file_read().");
+ fl_color_print_line(f_type_error, data->context.set.error, "INTERNAL ERROR: Invalid parameter when calling f_file_read().");
}
else if (status == F_number_overflow) {
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "ERROR: Integer overflow while trying to buffer the file '%s'.", filename);
+ fl_color_print_line(f_type_error, data->context.set.error, "ERROR: Integer overflow while trying to buffer the file '%s'.", filename);
}
else if (status == F_file_closed) {
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "INTERNAL ERROR: The file '%s' is no longer open.", filename);
+ fl_color_print_line(f_type_error, data->context.set.error, "INTERNAL ERROR: The file '%s' is no longer open.", filename);
}
else if (status == F_file_seek) {
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "ERROR: A seek error occurred while accessing the file '%s'.", filename);
+ fl_color_print_line(f_type_error, data->context.set.error, "ERROR: A seek error occurred while accessing the file '%s'.", filename);
}
else if (status == F_file_read) {
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "ERROR: A read error occurred while accessing the file '%s'.", filename);
+ fl_color_print_line(f_type_error, data->context.set.error, "ERROR: A read error occurred while accessing the file '%s'.", filename);
}
else if (status == F_memory_allocation || status == F_memory_reallocation) {
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "CRITICAL ERROR: Unable to allocate memory.");
+ fl_color_print_line(f_type_error, data->context.set.error, "CRITICAL ERROR: Unable to allocate memory.");
}
else {
- 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_read().", status);
+ fl_color_print_line(f_type_error, data->context.set.error, "INTERNAL ERROR: An unhandled error (%u) has occurred while calling f_file_read().", status);
}
return status;
status = F_status_set_fine(status);
if (status == F_parameter) {
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "INTERNAL ERROR: Invalid parameter when calling fll_fss_basic_list_read() for the file '%s'.", filename);
+ fl_color_print_line(f_type_error, data->context.set.error, "INTERNAL ERROR: Invalid parameter when calling fll_fss_basic_list_read() for the file '%s'.", filename);
}
else if (status == F_data_not_eos || status == F_data_not || status == F_data_not_stop) {
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "ERROR: No relevant data was found within the file '%s'.", filename);
+ fl_color_print_line(f_type_error, data->context.set.error, "ERROR: No relevant data was found within the file '%s'.", filename);
}
else if (status == F_memory_allocation || status == F_memory_reallocation) {
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "CRITICAL ERROR: Unable to allocate memory.");
+ fl_color_print_line(f_type_error, data->context.set.error, "CRITICAL ERROR: Unable to allocate memory.");
}
else {
- 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, filename);
+ fl_color_print_line(f_type_error, data->context.set.error, "INTERNAL ERROR: An unhandled error (%u) has occurred while calling fll_fss_basic_list_read() for the file '%s'.", status, filename);
}
return status;
status = F_status_set_fine(status);
if (status == F_memory_allocation || status == F_memory_reallocation) {
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "CRITICAL ERROR: Unable to allocate memory.");
+ fl_color_print_line(f_type_error, data->context.set.error, "CRITICAL ERROR: Unable to allocate memory.");
}
else if (status == F_failure) {
// the error message has already been displayed.
}
else {
- 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);
+ fl_color_print_line(f_type_error, data->context.set.error, "INTERNAL ERROR: An unhandled error (%u) has occurred while calling firewall_perform_commands().", status);
}
f_macro_fss_objects_t_delete_simple(local->rule_objects);
(structure.array[index].stop - structure.array[index].start) + 1
// TODO: temporarily added, convert this to a function below.
-// TODO: also report: fl_color_print_line(f_type_error, data.context.error, data.context.reset, "CRITICAL ERROR: Unable to allocate memory.");
+// TODO: also report: fl_color_print_line(f_type_error, data.context.set.error, "CRITICAL ERROR: Unable to allocate memory.");
#define firewall_macro_append_argument_to_arguments(status, arguments, argument) \
if (arguments.used == arguments.size) { \
f_macro_string_dynamics_resize(status, arguments, arguments.used + firewall_default_allocation_step); \
#endif
#ifndef _di_fss_basic_list_read_print_help_
- f_return_status fss_basic_list_read_print_help(const fl_color_context_t context) {
+ f_return_status fss_basic_list_read_print_help(const f_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.");
fll_program_print_help_usage(context, fss_basic_list_read_name, "filename(s)");
- fl_color_print(f_type_output, context.important, context.reset, " Notes:");
+ fl_color_print(f_type_output, context.set.important, " Notes:");
printf("%c", f_string_eol[0], f_string_eol[0]);
printf("%c", f_string_eol[0]);
printf(" When using the ");
- fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_depth);
+ fl_color_print(f_type_output, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_depth);
printf(" option, an order of operations is enforced on the parameters.%c", f_string_eol[0]);
printf(" When this order of operations is in effect, parameters to the right of a depth parameter are influenced by that depth parameter:%c", f_string_eol[0]);
printf(" ");
- fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_at);
+ fl_color_print(f_type_output, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_at);
printf(": An object index at the specified depth.%c", f_string_eol[0]);
printf(" ");
- fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_depth);
+ fl_color_print(f_type_output, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_depth);
printf(": A new depth within the specified depth, indexed from the root.%c", f_string_eol[0]);
printf(" ");
- fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_name);
+ fl_color_print(f_type_output, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_name);
printf(": An object name at the specified depth.%c", f_string_eol[0]);
printf("%c", f_string_eol[0]);
printf(" The parameter ");
- fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_depth);
+ fl_color_print(f_type_output, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_depth);
printf(" must be in numeric order, but values in between may be skipped.%c", f_string_eol[0]);
printf(" ('-d 0 -a 1 -d 2 -a 2' would specify index 1 at depth 0, any index at depth 1, and index 2 at depth 2.)%c", f_string_eol[0]);
printf(" ('-d 2 -a 1 -d 0 -a 2' would be invalid because depth 2 is before depth 1.)%c", f_string_eol[0]);
printf("%c", f_string_eol[0]);
printf(" The parameter ");
- fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_select);
+ fl_color_print(f_type_output, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_select);
printf(" selects a content index at a given depth.%c", f_string_eol[0]);
printf(" (This parameter is not synonymous with the depth parameter and does not relate to nested content).%c", f_string_eol[0]);
printf("%c", f_string_eol[0]);
printf(" Specify both ");
- fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_object);
+ fl_color_print(f_type_output, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_object);
printf(" and the ");
- fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_total);
+ fl_color_print(f_type_output, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_total);
printf(" parameters to get the total objects.%c", f_string_eol[0]);
printf("%c", f_string_eol[0]);
printf(" When both ");
- fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_at);
+ fl_color_print(f_type_output, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_at);
printf(" and ");
- fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_name);
+ fl_color_print(f_type_output, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_name);
printf(" parameters are specified (at the same depth), the ");
- fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_at);
+ fl_color_print(f_type_output, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_at);
printf(" parameter value will be treated as a position relative to the specified ");
- fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_name);
+ fl_color_print(f_type_output, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_name);
printf(" parameter value.%c", f_string_eol[0]);
printf("%c", f_string_eol[0]);
printf(" This program may support parameters, such as ");
- fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_depth);
+ fl_color_print(f_type_output, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_depth);
printf(" or ");
- fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_select);
+ fl_color_print(f_type_output, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_select);
printf(", even if not supported by the standard.%c", f_string_eol[0]);
printf(" This is done to help ensure consistency for scripting.%c", f_string_eol[0]);
printf("%c", f_string_eol[0]);
printf(" For parameters like ");
- fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_depth);
+ fl_color_print(f_type_output, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_depth);
printf(", if the standard doesn't support nested content, then only a depth of 0 would be valid.%c", f_string_eol[0]);
printf(" For parameters like ");
- fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_select);
+ fl_color_print(f_type_output, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_select);
printf(", if the standard doesn't support multiple content groups, then only a select of 0 would be valid.%c", f_string_eol[0]);
printf("%c", f_string_eol[0]);
printf(" The parameter ");
- fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_trim);
+ fl_color_print(f_type_output, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_trim);
printf(" will remove leading and trailing whitespaces when selecting objects or when printing objects.%c", f_string_eol[0]);
printf("%c", f_string_eol[0]);
}
else if (data->remaining.used > 0 || data->process_pipe) {
if (data->parameters[fss_basic_list_read_parameter_at].result == f_console_result_found) {
- 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, fss_basic_list_read_long_at);
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "' requires a positive number.");
+ fl_color_print(f_type_error, data->context.set.error, "ERROR: The parameter '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_at);
+ fl_color_print_line(f_type_error, data->context.set.error, "' requires a positive number.");
fss_basic_list_read_delete_data(data);
return F_status_set_error(F_parameter);
}
if (data->parameters[fss_basic_list_read_parameter_depth].result == f_console_result_found) {
- 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, fss_basic_list_read_long_depth);
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "' requires a positive number.");
+ fl_color_print(f_type_error, data->context.set.error, "ERROR: The parameter '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_depth);
+ fl_color_print_line(f_type_error, data->context.set.error, "' requires a positive number.");
fss_basic_list_read_delete_data(data);
return F_status_set_error(F_parameter);
}
if (data->parameters[fss_basic_list_read_parameter_line].result == f_console_result_found) {
- 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, fss_basic_list_read_long_line);
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "' requires a positive number.");
+ fl_color_print(f_type_error, data->context.set.error, "ERROR: The parameter '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_line);
+ fl_color_print_line(f_type_error, data->context.set.error, "' requires a positive number.");
fss_basic_list_read_delete_data(data);
return F_status_set_error(F_parameter);
}
if (data->parameters[fss_basic_list_read_parameter_name].result == f_console_result_found) {
- 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, fss_basic_list_read_long_name);
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "' requires a string.");
+ fl_color_print(f_type_error, data->context.set.error, "ERROR: The parameter '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_name);
+ fl_color_print_line(f_type_error, data->context.set.error, "' requires a string.");
fss_basic_list_read_delete_data(data);
return F_status_set_error(F_parameter);
}
if (data->parameters[fss_basic_list_read_parameter_select].result == f_console_result_found) {
- 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, fss_basic_list_read_long_select);
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "' requires a positive number.");
+ fl_color_print(f_type_error, data->context.set.error, "ERROR: The parameter '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_select);
+ fl_color_print_line(f_type_error, data->context.set.error, "' requires a positive number.");
fss_basic_list_read_delete_data(data);
return F_status_set_error(F_parameter);
if (data->parameters[fss_basic_list_read_parameter_object].result == f_console_result_found) {
if (data->parameters[fss_basic_list_read_parameter_line].result == f_console_result_additional) {
- fl_color_print(f_type_error, data->context.error, data->context.reset, "ERROR: Cannot specify the '");
- fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_object);
- fl_color_print(f_type_error, data->context.error, data->context.reset, "' parameter with the '");
- fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_line);
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "' parameter.");
+ fl_color_print(f_type_error, data->context.set.error, "ERROR: Cannot specify the '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_object);
+ fl_color_print(f_type_error, data->context.set.error, "' parameter with the '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_line);
+ fl_color_print_line(f_type_error, data->context.set.error, "' parameter.");
fss_basic_list_read_delete_data(data);
return F_status_set_error(F_parameter);
}
if (data->parameters[fss_basic_list_read_parameter_select].result == f_console_result_additional) {
- fl_color_print(f_type_error, data->context.error, data->context.reset, "ERROR: Cannot specify the '");
- fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_object);
- fl_color_print(f_type_error, data->context.error, data->context.reset, "' parameter with the '");
- 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.");
+ fl_color_print(f_type_error, data->context.set.error, "ERROR: Cannot specify the '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_object);
+ fl_color_print(f_type_error, data->context.set.error, "' parameter with the '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_select);
+ fl_color_print_line(f_type_error, data->context.set.error, "' parameter.");
fss_basic_list_read_delete_data(data);
return F_status_set_error(F_parameter);
if (data->parameters[fss_basic_list_read_parameter_line].result == f_console_result_additional) {
if (data->parameters[fss_basic_list_read_parameter_total].result == f_console_result_found) {
- fl_color_print(f_type_error, data->context.error, data->context.reset, "ERROR: Cannot specify the '");
- fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_line);
- fl_color_print(f_type_error, data->context.error, data->context.reset, "' parameter with the '");
- fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_total);
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "' parameter.");
+ fl_color_print(f_type_error, data->context.set.error, "ERROR: Cannot specify the '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_line);
+ fl_color_print(f_type_error, data->context.set.error, "' parameter with the '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_total);
+ fl_color_print_line(f_type_error, data->context.set.error, "' parameter.");
fss_basic_list_read_delete_data(data);
return F_status_set_error(F_parameter);
}
if (data->parameters[fss_basic_list_read_parameter_select].result == f_console_result_found) {
- fl_color_print(f_type_error, data->context.error, data->context.reset, "ERROR: The '");
- 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.");
+ fl_color_print(f_type_error, data->context.set.error, "ERROR: The '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_select);
+ fl_color_print_line(f_type_error, data->context.set.error, "' parameter requires a positive number.");
macro_fss_basic_list_read_depths_t_delete_simple(depths);
fss_basic_list_read_delete_data(data);
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.");
+ fl_color_print_line(f_type_error, data->context.set.error, "ERROR: You failed to specify one or more files.");
status = F_status_set_error(F_parameter);
}
f_macro_string_dynamic_t_delete_simple(data->buffer);
f_macro_string_lengths_t_delete_simple(data->remaining);
- fl_macro_color_context_t_delete_simple(data->context);
+ f_macro_color_context_t_delete_simple(data->context);
return F_none;
}
f_string_lengths_t remaining;
bool process_pipe;
- fl_color_context_t context;
+ f_color_context_t context;
} fss_basic_list_read_data_t;
#define fss_basic_list_read_data_t_initialize \
f_string_quantity_t_initialize, \
f_string_lengths_t_initialize, \
F_false, \
- fl_color_context_t_initialize, \
+ f_color_context_t_initialize, \
}
#endif // _di_fss_basic_list_read_data_t_
* 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_t context);
+ extern f_return_status fss_basic_list_read_print_help(const f_color_context_t context);
#endif // _di_fss_basic_list_read_print_help_
/**
#endif
#ifndef _di_fss_basic_list_read_print_file_error_
- 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) {
+ void fss_basic_list_read_print_file_error(const f_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 (");
- fl_color_print(f_type_error, context.notable, context.reset, "%llu", status);
- fl_color_print(f_type_error, context.error, context.reset, ") has occurred while calling ");
- fl_color_print(f_type_error, context.notable, context.reset, "%s()", function_name);
- fl_color_print_line(f_type_error, context.error, context.reset, ".");
+ fl_color_print(f_type_error, context.set.error, "INTERNAL ERROR: An unhandled error (");
+ fl_color_print(f_type_error, context.set.notable, "%llu", status);
+ fl_color_print(f_type_error, context.set.error, ") has occurred while calling ");
+ fl_color_print(f_type_error, context.set.notable, "%s()", function_name);
+ fl_color_print_line(f_type_error, context.set.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_t context, const f_string_t function_name, const f_string_t parameter_name, const f_string_t argument, const f_status_t status) {
+ void fss_basic_list_read_print_number_argument_error(const f_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 ");
- fl_color_print(f_type_error, context.notable, context.reset, "%s()", function_name);
- fl_color_print_line(f_type_error, context.error, context.reset, ".");
+ fl_color_print(f_type_error, context.set.error, "INTERNAL ERROR: Invalid parameter when calling ");
+ fl_color_print(f_type_error, context.set.notable, "%s()", function_name);
+ fl_color_print_line(f_type_error, context.set.error, ".");
}
else if (status == F_number) {
- fl_color_print(f_type_error, context.error, context.reset, "ERROR: The argument '");
- fl_color_print(f_type_error, context.notable, context.reset, "%s", argument);
- fl_color_print(f_type_error, context.error, context.reset, "' is not a valid number for the parameter '");
- fl_color_print(f_type_error, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, parameter_name);
- fl_color_print_line(f_type_error, context.error, context.reset, "'.");
+ fl_color_print(f_type_error, context.set.error, "ERROR: The argument '");
+ fl_color_print(f_type_error, context.set.notable, "%s", argument);
+ fl_color_print(f_type_error, context.set.error, "' is not a valid number for the parameter '");
+ fl_color_print(f_type_error, context.set.notable, "%s%s", f_console_symbol_long_enable, parameter_name);
+ fl_color_print_line(f_type_error, context.set.error, "'.");
}
else if (status == F_number_underflow) {
- fl_color_print(f_type_error, context.error, context.reset, "ERROR: The argument '");
- fl_color_print(f_type_error, context.notable, context.reset, "%s", argument);
- fl_color_print(f_type_error, context.error, context.reset, "' is too small for the parameter '");
- fl_color_print(f_type_error, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, parameter_name);
- fl_color_print_line(f_type_error, context.error, context.reset, "'.");
+ fl_color_print(f_type_error, context.set.error, "ERROR: The argument '");
+ fl_color_print(f_type_error, context.set.notable, "%s", argument);
+ fl_color_print(f_type_error, context.set.error, "' is too small for the parameter '");
+ fl_color_print(f_type_error, context.set.notable, "%s%s", f_console_symbol_long_enable, parameter_name);
+ fl_color_print_line(f_type_error, context.set.error, "'.");
}
else if (status == F_number_overflow) {
- fl_color_print(f_type_error, context.error, context.reset, "ERROR: The argument '");
- fl_color_print(f_type_error, context.notable, context.reset, "%s", argument);
- fl_color_print(f_type_error, context.error, context.reset, "' is too large for the parameter '");
- fl_color_print(f_type_error, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, parameter_name);
- fl_color_print_line(f_type_error, context.error, context.reset, "'.");
+ fl_color_print(f_type_error, context.set.error, "ERROR: The argument '");
+ fl_color_print(f_type_error, context.set.notable, "%s", argument);
+ fl_color_print(f_type_error, context.set.error, "' is too large for the parameter '");
+ fl_color_print(f_type_error, context.set.notable, "%s%s", f_console_symbol_long_enable, parameter_name);
+ fl_color_print_line(f_type_error, context.set.error, "'.");
}
else if (status == F_number_negative) {
- fl_color_print(f_type_error, context.error, context.reset, "ERROR: The argument '");
- fl_color_print(f_type_error, context.notable, context.reset, "%s", argument);
- fl_color_print(f_type_error, context.error, context.reset, "' is negative, which is not allowed for the parameter '");
- fl_color_print(f_type_error, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, parameter_name);
- fl_color_print_line(f_type_error, context.error, context.reset, "'.");
+ fl_color_print(f_type_error, context.set.error, "ERROR: The argument '");
+ fl_color_print(f_type_error, context.set.notable, "%s", argument);
+ fl_color_print(f_type_error, context.set.error, "' is negative, which is not allowed for the parameter '");
+ fl_color_print(f_type_error, context.set.notable, "%s%s", f_console_symbol_long_enable, parameter_name);
+ fl_color_print_line(f_type_error, context.set.error, "'.");
}
else if (status == F_number_positive) {
- fl_color_print(f_type_error, context.error, context.reset, "ERROR: The argument '");
- fl_color_print(f_type_error, context.notable, context.reset, "%s", argument);
- fl_color_print(f_type_error, context.error, context.reset, "' contains a '");
- fl_color_print(f_type_error, context.notable, context.reset, "+");
- fl_color_print(f_type_error, context.error, context.reset, "', which is not allowed for the parameter '");
- fl_color_print(f_type_error, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, parameter_name);
- fl_color_print_line(f_type_error, context.error, context.reset, "'.");
+ fl_color_print(f_type_error, context.set.error, "ERROR: The argument '");
+ fl_color_print(f_type_error, context.set.notable, "%s", argument);
+ fl_color_print(f_type_error, context.set.error, "' contains a '");
+ fl_color_print(f_type_error, context.set.notable, "+");
+ fl_color_print(f_type_error, context.set.error, "', which is not allowed for the parameter '");
+ fl_color_print(f_type_error, context.set.notable, "%s%s", f_console_symbol_long_enable, parameter_name);
+ fl_color_print_line(f_type_error, context.set.error, "'.");
}
else if (status == F_data_not) {
- fl_color_print(f_type_error, context.error, context.reset, "ERROR: The parameter '");
- fl_color_print(f_type_error, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, parameter_name);
- fl_color_print_line(f_type_error, context.error, context.reset, "' must not be an empty string.");
+ fl_color_print(f_type_error, context.set.error, "ERROR: The parameter '");
+ fl_color_print(f_type_error, context.set.notable, "%s%s", f_console_symbol_long_enable, parameter_name);
+ fl_color_print_line(f_type_error, context.set.error, "' must not be an empty string.");
}
else {
- fl_color_print(f_type_error, context.error, context.reset, "INTERNAL ERROR: An unhandled error (");
- fl_color_print(f_type_error, context.notable, context.reset, "%llu", status);
- fl_color_print(f_type_error, context.error, context.reset, ") has occurred while calling ");
- fl_color_print(f_type_error, context.notable, context.reset, "%s()", function_name);
- fl_color_print(f_type_error, context.error, context.reset, "' for the parameter '");
- fl_color_print(f_type_error, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, parameter_name);
- fl_color_print(f_type_error, context.error, context.reset, "' with the value '");
- fl_color_print(f_type_error, context.notable, context.reset, "%s", argument);
- fl_color_print_line(f_type_error, context.error, context.reset, "'.");
+ fl_color_print(f_type_error, context.set.error, "INTERNAL ERROR: An unhandled error (");
+ fl_color_print(f_type_error, context.set.notable, "%llu", status);
+ fl_color_print(f_type_error, context.set.error, ") has occurred while calling ");
+ fl_color_print(f_type_error, context.set.notable, "%s()", function_name);
+ fl_color_print(f_type_error, context.set.error, "' for the parameter '");
+ fl_color_print(f_type_error, context.set.notable, "%s%s", f_console_symbol_long_enable, parameter_name);
+ fl_color_print(f_type_error, context.set.error, "' with the value '");
+ fl_color_print(f_type_error, context.set.notable, "%s", argument);
+ fl_color_print_line(f_type_error, context.set.error, "'.");
}
}
#endif // _di_fss_basic_list_read_print_number_argument_error_
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.");
+ fl_color_print_line(f_type_error, data.context.set.error, "CRITICAL ERROR: Unable to allocate memory.");
return 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.");
+ fl_color_print_line(f_type_error, data.context.set.error, "CRITICAL ERROR: Unable to allocate memory.");
}
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.");
+ fl_color_print(f_type_error, data.context.set.error, "ERROR: Unable to process '");
+ fl_color_print(f_type_error, data.context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_trim);
+ fl_color_print_line(f_type_error, data.context.set.error, "' because the maximum buffer size was reached.");
}
else {
f_string_t function = "fl_string_append";
function = "fl_string_rip";
}
- fl_color_print(f_type_error, data.context.error, data.context.reset, "INTERNAL ERROR: An unhandled error (");
- fl_color_print(f_type_error, data.context.notable, data.context.reset, "%u", status_code);
- fl_color_print(f_type_error, data.context.error, data.context.reset, ") has occurred while calling ");
- fl_color_print(f_type_error, data.context.notable, data.context.reset, "%s()", function);
- fl_color_print_line(f_type_error, data.context.error, data.context.reset, ".");
+ fl_color_print(f_type_error, data.context.set.error, "INTERNAL ERROR: An unhandled error (");
+ fl_color_print(f_type_error, data.context.set.notable, "%u", status_code);
+ fl_color_print(f_type_error, data.context.set.error, ") has occurred while calling ");
+ fl_color_print(f_type_error, data.context.set.notable, "%s()", function);
+ fl_color_print_line(f_type_error, data.context.set.error, ".");
}
return status;
}
if (depths->array[i].value_name.used == 0) {
- fl_color_print(f_type_error, data.context.error, data.context.reset, "ERROR: The '");
- fl_color_print(f_type_error, data.context.notable, data.context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_name);
- fl_color_print_line(f_type_error, data.context.error, data.context.reset, "' must not be an empty string.");
+ fl_color_print(f_type_error, data.context.set.error, "ERROR: The '");
+ fl_color_print(f_type_error, data.context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_name);
+ fl_color_print_line(f_type_error, data.context.set.error, "' must not be an empty string.");
return F_status_set_error(F_parameter);
}
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);
- fl_color_print(f_type_error, data.context.error, data.context.reset, "' may only be specified once for the parameter '");
- fl_color_print(f_type_error, data.context.notable, data.context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_depth);
- fl_color_print_line(f_type_error, data.context.error, data.context.reset, "'.");
+ fl_color_print(f_type_error, data.context.set.error, "ERROR: The value '");
+ fl_color_print(f_type_error, data.context.set.notable, "%llu", depths->array[i].depth);
+ fl_color_print(f_type_error, data.context.set.error, "' may only be specified once for the parameter '");
+ fl_color_print(f_type_error, data.context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_depth);
+ fl_color_print_line(f_type_error, data.context.set.error, "'.");
return F_status_set_error(F_parameter);
}
else if (depths->array[i].depth > depths->array[j].depth) {
- 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, fss_basic_list_read_long_depth);
- fl_color_print(f_type_error, data.context.error, data.context.reset, "' may not have the value '");
- fl_color_print(f_type_error, data.context.notable, data.context.reset, "%llu", depths->array[i].depth);
- fl_color_print(f_type_error, data.context.error, data.context.reset, "' before the value '");
- fl_color_print(f_type_error, data.context.notable, data.context.reset, "%llu", depths->array[j].depth);
- fl_color_print_line(f_type_error, data.context.error, data.context.reset, "'.");
+ fl_color_print(f_type_error, data.context.set.error, "ERROR: The parameter '");
+ fl_color_print(f_type_error, data.context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_depth);
+ fl_color_print(f_type_error, data.context.set.error, "' may not have the value '");
+ fl_color_print(f_type_error, data.context.set.notable, "%llu", depths->array[i].depth);
+ fl_color_print(f_type_error, data.context.set.error, "' before the value '");
+ fl_color_print(f_type_error, data.context.set.notable, "%llu", depths->array[j].depth);
+ fl_color_print_line(f_type_error, data.context.set.error, "'.");
return F_status_set_error(F_parameter);
}
status = F_status_set_fine(status);
if (status == F_parameter) {
- fl_color_print(f_type_error, data->context.error, data->context.reset, "INTERNAL ERROR: Invalid parameter when calling ");
- fl_color_print(f_type_error, data->context.notable, data->context.reset, "fll_fss_basic_list_read()");
- fl_color_print(f_type_error, data->context.error, data->context.reset, " for the file '");
- fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s", filename);
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "'.");
+ fl_color_print(f_type_error, data->context.set.error, "INTERNAL ERROR: Invalid parameter when calling ");
+ fl_color_print(f_type_error, data->context.set.notable, "fll_fss_basic_list_read()");
+ fl_color_print(f_type_error, data->context.set.error, " for the file '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s", filename);
+ fl_color_print_line(f_type_error, data->context.set.error, "'.");
}
else if (status == F_memory_allocation || status == F_memory_reallocation) {
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "CRITICAL ERROR: Unable to allocate memory.");
+ fl_color_print_line(f_type_error, data->context.set.error, "CRITICAL ERROR: Unable to allocate memory.");
}
else if (status == F_incomplete_utf_stop) {
- fl_color_print(f_type_error, data->context.error, data->context.reset, "ENCODING ERROR: Error occurred on invalid UTF-8 character at stop position (at ");
- fl_color_print(f_type_error, data->context.notable, data->context.reset, "%d", input.start);
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, ").");
+ fl_color_print(f_type_error, data->context.set.error, "ENCODING ERROR: Error occurred on invalid UTF-8 character at stop position (at ");
+ fl_color_print(f_type_error, data->context.set.notable, "%d", input.start);
+ fl_color_print_line(f_type_error, data->context.set.error, ").");
}
else if (status == F_incomplete_utf_eos) {
- fl_color_print(f_type_error, data->context.error, data->context.reset, "ENCODING ERROR: Error occurred on invalid UTF-8 character at end of string (at ");
- fl_color_print(f_type_error, data->context.notable, data->context.reset, "%d", input.start);
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, ").");
+ fl_color_print(f_type_error, data->context.set.error, "ENCODING ERROR: Error occurred on invalid UTF-8 character at end of string (at ");
+ fl_color_print(f_type_error, data->context.set.notable, "%d", input.start);
+ fl_color_print_line(f_type_error, data->context.set.error, ").");
}
else {
- fl_color_print(f_type_error, data->context.error, data->context.reset, "INTERNAL ERROR: An unhandled error (");
- fl_color_print(f_type_error, data->context.notable, data->context.reset, "%u", status);
- fl_color_print(f_type_error, data->context.error, data->context.reset, ") has occurred while calling ");
- fl_color_print(f_type_error, data->context.notable, data->context.reset, "fll_fss_basic_list_read()");
- fl_color_print(f_type_error, data->context.error, data->context.reset, " for the file '");
- fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s", filename);
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "'.");
+ fl_color_print(f_type_error, data->context.set.error, "INTERNAL ERROR: An unhandled error (");
+ fl_color_print(f_type_error, data->context.set.notable, "%u", status);
+ fl_color_print(f_type_error, data->context.set.error, ") has occurred while calling ");
+ fl_color_print(f_type_error, data->context.set.notable, "fll_fss_basic_list_read()");
+ fl_color_print(f_type_error, data->context.set.error, " for the file '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s", filename);
+ fl_color_print_line(f_type_error, data->context.set.error, "'.");
}
return F_status_set_error(status);
* 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_t context, const f_string_t function_name, const f_string_t file_name, const f_status_t status) f_gcc_attribute_visibility_internal;
+ extern void fss_basic_list_read_print_file_error(const f_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_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;
+ extern void fss_basic_list_read_print_number_argument_error(const f_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_
/**
#endif
#ifndef _di_fss_basic_list_write_print_help_
- f_return_status fss_basic_list_write_print_help(const fl_color_context_t context) {
+ f_return_status fss_basic_list_write_print_help(const f_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.");
status = F_status_set_fine(status);
if (status == F_parameter) {
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "INTERNAL ERROR: Invalid parameter when calling f_file_open()");
+ fl_color_print_line(f_type_error, data->context.set.error, "INTERNAL ERROR: Invalid parameter when calling f_file_open()");
}
else if (status == F_file_found_not) {
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "ERROR: Unable to find the file '%s'", "-");
+ fl_color_print_line(f_type_error, data->context.set.error, "ERROR: Unable to find the file '%s'", "-");
}
else if (status == F_file_open) {
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "ERROR: Unable to open the file '%s'", "-");
+ fl_color_print_line(f_type_error, data->context.set.error, "ERROR: Unable to open the file '%s'", "-");
}
else if (status == F_file_descriptor) {
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "ERROR: File descriptor error while trying to open the file '%s'", "-");
+ fl_color_print_line(f_type_error, data->context.set.error, "ERROR: File descriptor error while trying to open the file '%s'", "-");
}
else {
- 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);
+ fl_color_print_line(f_type_error, data->context.set.error, "INTERNAL ERROR: An unhandled error (%u) has occurred while calling f_file_open()", status);
}
f_macro_string_dynamic_t_delete_simple(buffer);
f_file_close(&output.id);
if (status == F_parameter) {
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "INTERNAL ERROR: Invalid parameter when calling f_file_open()");
+ fl_color_print_line(f_type_error, data->context.set.error, "INTERNAL ERROR: Invalid parameter when calling f_file_open()");
}
else if (status == F_file_found_not) {
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "ERROR: Unable to find the file '%s'", arguments.argv[data->parameters[fss_basic_list_write_parameter_file].additional.array[0]]);
+ fl_color_print_line(f_type_error, data->context.set.error, "ERROR: Unable to find the file '%s'", arguments.argv[data->parameters[fss_basic_list_write_parameter_file].additional.array[0]]);
}
else if (status == F_file_open) {
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "ERROR: Unable to open the file '%s'", arguments.argv[data->parameters[fss_basic_list_write_parameter_file].additional.array[0]]);
+ fl_color_print_line(f_type_error, data->context.set.error, "ERROR: Unable to open the file '%s'", arguments.argv[data->parameters[fss_basic_list_write_parameter_file].additional.array[0]]);
}
else if (status == F_file_descriptor) {
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "ERROR: File descriptor error while trying to open the file '%s'", arguments.argv[data->parameters[fss_basic_list_write_parameter_file].additional.array[0]]);
+ fl_color_print_line(f_type_error, data->context.set.error, "ERROR: File descriptor error while trying to open the file '%s'", arguments.argv[data->parameters[fss_basic_list_write_parameter_file].additional.array[0]]);
}
else {
- 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);
+ fl_color_print_line(f_type_error, data->context.set.error, "INTERNAL ERROR: An unhandled error (%u) has occurred while calling f_file_open()", status);
}
f_macro_string_dynamic_t_delete_simple(buffer);
status = F_status_set_fine(status);
if (status == F_parameter) {
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "INTERNAL ERROR: Invalid parameter when calling f_file_write()");
+ fl_color_print_line(f_type_error, data->context.set.error, "INTERNAL ERROR: Invalid parameter when calling f_file_write()");
}
else if (status == F_file_write) {
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "ERROR: Unable to write to the file '%s'", arguments.argv[data->parameters[fss_basic_list_write_parameter_file].additional.array[0]]);
+ fl_color_print_line(f_type_error, data->context.set.error, "ERROR: Unable to write to the file '%s'", arguments.argv[data->parameters[fss_basic_list_write_parameter_file].additional.array[0]]);
}
else {
- 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);
+ fl_color_print_line(f_type_error, data->context.set.error, "INTERNAL ERROR: An unhandled error (%u) has occurred while calling f_file_write()", status);
}
f_macro_string_dynamic_t_delete_simple(buffer);
} // while
f_macro_string_lengths_t_delete_simple(data->remaining);
- fl_macro_color_context_t_delete_simple(data->context);
+ f_macro_color_context_t_delete_simple(data->context);
return F_none;
}
f_string_lengths_t remaining;
bool process_pipe;
- fl_color_context_t context;
+ f_color_context_t context;
} fss_basic_list_write_data_t;
#define fss_basic_list_write_data_t_initialize \
fss_basic_list_write_console_parameter_t_initialize, \
f_string_lengths_t_initialize, \
F_false, \
- fl_color_context_t_initialize, \
+ f_color_context_t_initialize, \
}
#endif // _di_fss_basic_list_write_data_t_
* 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_t context);
+ extern f_return_status fss_basic_list_write_print_help(const f_color_context_t context);
#endif // _di_fss_basic_list_write_print_help_
/**
#endif
#ifndef _di_fss_basic_read_print_help_
- f_return_status fss_basic_read_print_help(const fl_color_context_t context) {
+ f_return_status fss_basic_read_print_help(const f_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.");
fll_program_print_help_usage(context, fss_basic_read_name, "filename(s)");
- fl_color_print(f_type_output, context.important, context.reset, " Notes:");
+ fl_color_print(f_type_output, context.set.important, " Notes:");
printf("%c", f_string_eol[0], f_string_eol[0]);
printf("%c", f_string_eol[0]);
printf(" When using the ");
- fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_depth);
+ fl_color_print(f_type_output, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_depth);
printf(" option, an order of operations is enforced on the parameters.%c", f_string_eol[0]);
printf(" When this order of operations is in effect, parameters to the right of a depth parameter are influenced by that depth parameter:%c", f_string_eol[0]);
printf(" ");
- fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_at);
+ fl_color_print(f_type_output, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_at);
printf(": An object index at the specified depth.%c", f_string_eol[0]);
printf(" ");
- fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_depth);
+ fl_color_print(f_type_output, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_depth);
printf(": A new depth within the specified depth, indexed from the root.%c", f_string_eol[0]);
printf(" ");
- fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_name);
+ fl_color_print(f_type_output, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_name);
printf(": An object name at the specified depth.%c", f_string_eol[0]);
printf("%c", f_string_eol[0]);
printf(" The parameter ");
- fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_depth);
+ fl_color_print(f_type_output, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_depth);
printf(" must be in numeric order, but values in between may be skipped.%c", f_string_eol[0]);
printf(" ('-d 0 -a 1 -d 2 -a 2' would specify index 1 at depth 0, any index at depth 1, and index 2 at depth 2.)%c", f_string_eol[0]);
printf(" ('-d 2 -a 1 -d 0 -a 2' would be invalid because depth 2 is before depth 1.)%c", f_string_eol[0]);
printf("%c", f_string_eol[0]);
printf(" The parameter ");
- fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_select);
+ fl_color_print(f_type_output, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_select);
printf(" selects a content index at a given depth.%c", f_string_eol[0]);
printf(" (This parameter is not synonymous with the depth parameter and does not relate to nested content).%c", f_string_eol[0]);
printf("%c", f_string_eol[0]);
printf(" Specify both ");
- fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_object);
+ fl_color_print(f_type_output, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_object);
printf(" and the ");
- fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_total);
+ fl_color_print(f_type_output, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_total);
printf(" parameters to get the total objects.%c", f_string_eol[0]);
printf("%c", f_string_eol[0]);
printf(" When both ");
- fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_at);
+ fl_color_print(f_type_output, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_at);
printf(" and ");
- fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_name);
+ fl_color_print(f_type_output, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_name);
printf(" parameters are specified (at the same depth), the ");
- fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_at);
+ fl_color_print(f_type_output, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_at);
printf(" parameter value will be treated as a position relative to the specified ");
- fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_name);
+ fl_color_print(f_type_output, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_name);
printf(" parameter value.%c", f_string_eol[0]);
printf("%c", f_string_eol[0]);
printf(" This program may support parameters, such as ");
- fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_depth);
+ fl_color_print(f_type_output, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_depth);
printf(" or ");
- fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_select);
+ fl_color_print(f_type_output, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_select);
printf(", even if not supported by the standard.%c", f_string_eol[0]);
printf(" This is done to help ensure consistency for scripting.%c", f_string_eol[0]);
printf("%c", f_string_eol[0]);
printf(" For parameters like ");
- fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_depth);
+ fl_color_print(f_type_output, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_depth);
printf(", if the standard doesn't support nested content, then only a depth of 0 would be valid.%c", f_string_eol[0]);
printf(" For parameters like ");
- fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_select);
+ fl_color_print(f_type_output, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_select);
printf(", if the standard doesn't support multiple content groups, then only a select of 0 would be valid.%c", f_string_eol[0]);
printf("%c", f_string_eol[0]);
printf(" The parameter ");
- fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_trim);
+ fl_color_print(f_type_output, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_trim);
printf(" will remove leading and trailing whitespaces when selecting objects or when printing objects.%c", f_string_eol[0]);
printf("%c", f_string_eol[0]);
}
else if (data->remaining.used > 0 || data->process_pipe) {
if (data->parameters[fss_basic_read_parameter_at].result == f_console_result_found) {
- 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, fss_basic_read_long_at);
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "' requires a positive number.");
+ fl_color_print(f_type_error, data->context.set.error, "ERROR: The parameter '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_at);
+ fl_color_print_line(f_type_error, data->context.set.error, "' requires a positive number.");
fss_basic_read_delete_data(data);
return F_status_set_error(F_parameter);
}
if (data->parameters[fss_basic_read_parameter_depth].result == f_console_result_found) {
- 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, fss_basic_read_long_depth);
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "' requires a positive number.");
+ fl_color_print(f_type_error, data->context.set.error, "ERROR: The parameter '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_depth);
+ fl_color_print_line(f_type_error, data->context.set.error, "' requires a positive number.");
fss_basic_read_delete_data(data);
return F_status_set_error(F_parameter);
}
if (data->parameters[fss_basic_read_parameter_line].result == f_console_result_found) {
- 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, fss_basic_read_long_line);
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "' requires a positive number.");
+ fl_color_print(f_type_error, data->context.set.error, "ERROR: The parameter '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_line);
+ fl_color_print_line(f_type_error, data->context.set.error, "' requires a positive number.");
fss_basic_read_delete_data(data);
return F_status_set_error(F_parameter);
}
if (data->parameters[fss_basic_read_parameter_name].result == f_console_result_found) {
- 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, fss_basic_read_long_name);
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "' requires a string.");
+ fl_color_print(f_type_error, data->context.set.error, "ERROR: The parameter '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_name);
+ fl_color_print_line(f_type_error, data->context.set.error, "' requires a string.");
fss_basic_read_delete_data(data);
return F_status_set_error(F_parameter);
}
if (data->parameters[fss_basic_read_parameter_select].result == f_console_result_found) {
- 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, fss_basic_read_long_select);
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "' requires a positive number.");
+ fl_color_print(f_type_error, data->context.set.error, "ERROR: The parameter '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_select);
+ fl_color_print_line(f_type_error, data->context.set.error, "' requires a positive number.");
fss_basic_read_delete_data(data);
return F_status_set_error(F_parameter);
if (data->parameters[fss_basic_read_parameter_object].result == f_console_result_found) {
if (data->parameters[fss_basic_read_parameter_line].result == f_console_result_additional) {
- fl_color_print(f_type_error, data->context.error, data->context.reset, "ERROR: Cannot specify the '");
- fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_object);
- fl_color_print(f_type_error, data->context.error, data->context.reset, "' parameter with the '");
- fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_line);
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "' parameter.");
+ fl_color_print(f_type_error, data->context.set.error, "ERROR: Cannot specify the '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_object);
+ fl_color_print(f_type_error, data->context.set.error, "' parameter with the '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_line);
+ fl_color_print_line(f_type_error, data->context.set.error, "' parameter.");
fss_basic_read_delete_data(data);
return F_status_set_error(F_parameter);
}
if (data->parameters[fss_basic_read_parameter_select].result == f_console_result_additional) {
- fl_color_print(f_type_error, data->context.error, data->context.reset, "ERROR: Cannot specify the '");
- fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_object);
- fl_color_print(f_type_error, data->context.error, data->context.reset, "' parameter with the '");
- 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.");
+ fl_color_print(f_type_error, data->context.set.error, "ERROR: Cannot specify the '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_object);
+ fl_color_print(f_type_error, data->context.set.error, "' parameter with the '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_select);
+ fl_color_print_line(f_type_error, data->context.set.error, "' parameter.");
fss_basic_read_delete_data(data);
return F_status_set_error(F_parameter);
if (data->parameters[fss_basic_read_parameter_line].result == f_console_result_additional) {
if (data->parameters[fss_basic_read_parameter_total].result == f_console_result_found) {
- fl_color_print(f_type_error, data->context.error, data->context.reset, "ERROR: Cannot specify the '");
- fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_line);
- fl_color_print(f_type_error, data->context.error, data->context.reset, "' parameter with the '");
- fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_total);
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "' parameter.");
+ fl_color_print(f_type_error, data->context.set.error, "ERROR: Cannot specify the '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_line);
+ fl_color_print(f_type_error, data->context.set.error, "' parameter with the '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_total);
+ fl_color_print_line(f_type_error, data->context.set.error, "' parameter.");
fss_basic_read_delete_data(data);
return F_status_set_error(F_parameter);
}
if (data->parameters[fss_basic_read_parameter_select].result == f_console_result_found) {
- fl_color_print(f_type_error, data->context.error, data->context.reset, "ERROR: The '");
- 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.");
+ fl_color_print(f_type_error, data->context.set.error, "ERROR: The '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_select);
+ fl_color_print_line(f_type_error, data->context.set.error, "' parameter requires a positive number.");
macro_fss_basic_read_depths_t_delete_simple(depths);
fss_basic_read_delete_data(data);
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.");
+ fl_color_print_line(f_type_error, data->context.set.error, "ERROR: You failed to specify one or more files.");
status = F_status_set_error(F_parameter);
}
f_macro_string_dynamic_t_delete_simple(data->buffer);
f_macro_string_lengths_t_delete_simple(data->remaining);
- fl_macro_color_context_t_delete_simple(data->context);
+ f_macro_color_context_t_delete_simple(data->context);
return F_none;
}
f_string_lengths_t remaining;
bool process_pipe;
- fl_color_context_t context;
+ f_color_context_t context;
} fss_basic_read_data_t;
#define fss_basic_read_data_t_initialize \
f_string_quantity_t_initialize, \
f_string_lengths_t_initialize, \
F_false, \
- fl_color_context_t_initialize, \
+ f_color_context_t_initialize, \
}
#endif // _di_fss_basic_read_data_t_
* F_none on success.
*/
#ifndef _di_fss_basic_read_print_help_
- extern f_return_status fss_basic_read_print_help(const fl_color_context_t context);
+ extern f_return_status fss_basic_read_print_help(const f_color_context_t context);
#endif // _di_fss_basic_read_print_help_
/**
#endif
#ifndef _di_fss_basic_read_print_file_error_
- 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) {
+ void fss_basic_read_print_file_error(const f_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 (");
- fl_color_print(f_type_error, context.notable, context.reset, "%llu", status);
- fl_color_print(f_type_error, context.error, context.reset, ") has occurred while calling ");
- fl_color_print(f_type_error, context.notable, context.reset, "%s()", function_name);
- fl_color_print_line(f_type_error, context.error, context.reset, ".");
+ fl_color_print(f_type_error, context.set.error, "INTERNAL ERROR: An unhandled error (");
+ fl_color_print(f_type_error, context.set.notable, "%llu", status);
+ fl_color_print(f_type_error, context.set.error, ") has occurred while calling ");
+ fl_color_print(f_type_error, context.set.notable, "%s()", function_name);
+ fl_color_print_line(f_type_error, context.set.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_t context, const f_string_t function_name, const f_string_t parameter_name, const f_string_t argument, const f_status_t status) {
+ void fss_basic_read_print_number_argument_error(const f_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 ");
- fl_color_print(f_type_error, context.notable, context.reset, "%s()", function_name);
- fl_color_print_line(f_type_error, context.error, context.reset, ".");
+ fl_color_print(f_type_error, context.set.error, "INTERNAL ERROR: Invalid parameter when calling ");
+ fl_color_print(f_type_error, context.set.notable, "%s()", function_name);
+ fl_color_print_line(f_type_error, context.set.error, ".");
}
else if (status == F_number) {
- fl_color_print(f_type_error, context.error, context.reset, "ERROR: The argument '");
- fl_color_print(f_type_error, context.notable, context.reset, "%s", argument);
- fl_color_print(f_type_error, context.error, context.reset, "' is not a valid number for the parameter '");
- fl_color_print(f_type_error, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, parameter_name);
- fl_color_print_line(f_type_error, context.error, context.reset, "'.");
+ fl_color_print(f_type_error, context.set.error, "ERROR: The argument '");
+ fl_color_print(f_type_error, context.set.notable, "%s", argument);
+ fl_color_print(f_type_error, context.set.error, "' is not a valid number for the parameter '");
+ fl_color_print(f_type_error, context.set.notable, "%s%s", f_console_symbol_long_enable, parameter_name);
+ fl_color_print_line(f_type_error, context.set.error, "'.");
}
else if (status == F_number_underflow) {
- fl_color_print(f_type_error, context.error, context.reset, "ERROR: The argument '");
- fl_color_print(f_type_error, context.notable, context.reset, "%s", argument);
- fl_color_print(f_type_error, context.error, context.reset, "' is too small for the parameter '");
- fl_color_print(f_type_error, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, parameter_name);
- fl_color_print_line(f_type_error, context.error, context.reset, "'.");
+ fl_color_print(f_type_error, context.set.error, "ERROR: The argument '");
+ fl_color_print(f_type_error, context.set.notable, "%s", argument);
+ fl_color_print(f_type_error, context.set.error, "' is too small for the parameter '");
+ fl_color_print(f_type_error, context.set.notable, "%s%s", f_console_symbol_long_enable, parameter_name);
+ fl_color_print_line(f_type_error, context.set.error, "'.");
}
else if (status == F_number_overflow) {
- fl_color_print(f_type_error, context.error, context.reset, "ERROR: The argument '");
- fl_color_print(f_type_error, context.notable, context.reset, "%s", argument);
- fl_color_print(f_type_error, context.error, context.reset, "' is too large for the parameter '");
- fl_color_print(f_type_error, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, parameter_name);
- fl_color_print_line(f_type_error, context.error, context.reset, "'.");
+ fl_color_print(f_type_error, context.set.error, "ERROR: The argument '");
+ fl_color_print(f_type_error, context.set.notable, "%s", argument);
+ fl_color_print(f_type_error, context.set.error, "' is too large for the parameter '");
+ fl_color_print(f_type_error, context.set.notable, "%s%s", f_console_symbol_long_enable, parameter_name);
+ fl_color_print_line(f_type_error, context.set.error, "'.");
}
else if (status == F_number_negative) {
- fl_color_print(f_type_error, context.error, context.reset, "ERROR: The argument '");
- fl_color_print(f_type_error, context.notable, context.reset, "%s", argument);
- fl_color_print(f_type_error, context.error, context.reset, "' is negative, which is not allowed for the parameter '");
- fl_color_print(f_type_error, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, parameter_name);
- fl_color_print_line(f_type_error, context.error, context.reset, "'.");
+ fl_color_print(f_type_error, context.set.error, "ERROR: The argument '");
+ fl_color_print(f_type_error, context.set.notable, "%s", argument);
+ fl_color_print(f_type_error, context.set.error, "' is negative, which is not allowed for the parameter '");
+ fl_color_print(f_type_error, context.set.notable, "%s%s", f_console_symbol_long_enable, parameter_name);
+ fl_color_print_line(f_type_error, context.set.error, "'.");
}
else if (status == F_number_positive) {
- fl_color_print(f_type_error, context.error, context.reset, "ERROR: The argument '");
- fl_color_print(f_type_error, context.notable, context.reset, "%s", argument);
- fl_color_print(f_type_error, context.error, context.reset, "' contains a '");
- fl_color_print(f_type_error, context.notable, context.reset, "+");
- fl_color_print(f_type_error, context.error, context.reset, "', which is not allowed for the parameter '");
- fl_color_print(f_type_error, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, parameter_name);
- fl_color_print_line(f_type_error, context.error, context.reset, "'.");
+ fl_color_print(f_type_error, context.set.error, "ERROR: The argument '");
+ fl_color_print(f_type_error, context.set.notable, "%s", argument);
+ fl_color_print(f_type_error, context.set.error, "' contains a '");
+ fl_color_print(f_type_error, context.set.notable, "+");
+ fl_color_print(f_type_error, context.set.error, "', which is not allowed for the parameter '");
+ fl_color_print(f_type_error, context.set.notable, "%s%s", f_console_symbol_long_enable, parameter_name);
+ fl_color_print_line(f_type_error, context.set.error, "'.");
}
else if (status == F_data_not) {
- fl_color_print(f_type_error, context.error, context.reset, "ERROR: The parameter '");
- fl_color_print(f_type_error, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, parameter_name);
- fl_color_print_line(f_type_error, context.error, context.reset, "' must not be an empty string.");
+ fl_color_print(f_type_error, context.set.error, "ERROR: The parameter '");
+ fl_color_print(f_type_error, context.set.notable, "%s%s", f_console_symbol_long_enable, parameter_name);
+ fl_color_print_line(f_type_error, context.set.error, "' must not be an empty string.");
}
else {
- fl_color_print(f_type_error, context.error, context.reset, "INTERNAL ERROR: An unhandled error (");
- fl_color_print(f_type_error, context.notable, context.reset, "%llu", status);
- fl_color_print(f_type_error, context.error, context.reset, ") has occurred while calling ");
- fl_color_print(f_type_error, context.notable, context.reset, "%s()", function_name);
- fl_color_print(f_type_error, context.error, context.reset, "' for the parameter '");
- fl_color_print(f_type_error, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, parameter_name);
- fl_color_print(f_type_error, context.error, context.reset, "' with the value '");
- fl_color_print(f_type_error, context.notable, context.reset, "%s", argument);
- fl_color_print_line(f_type_error, context.error, context.reset, "'.");
+ fl_color_print(f_type_error, context.set.error, "INTERNAL ERROR: An unhandled error (");
+ fl_color_print(f_type_error, context.set.notable, "%llu", status);
+ fl_color_print(f_type_error, context.set.error, ") has occurred while calling ");
+ fl_color_print(f_type_error, context.set.notable, "%s()", function_name);
+ fl_color_print(f_type_error, context.set.error, "' for the parameter '");
+ fl_color_print(f_type_error, context.set.notable, "%s%s", f_console_symbol_long_enable, parameter_name);
+ fl_color_print(f_type_error, context.set.error, "' with the value '");
+ fl_color_print(f_type_error, context.set.notable, "%s", argument);
+ fl_color_print_line(f_type_error, context.set.error, "'.");
}
}
#endif // _di_fss_basic_read_print_number_argument_error_
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.");
+ fl_color_print_line(f_type_error, data.context.set.error, "CRITICAL ERROR: Unable to allocate memory.");
return 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.");
+ fl_color_print_line(f_type_error, data.context.set.error, "CRITICAL ERROR: Unable to allocate memory.");
}
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.");
+ fl_color_print(f_type_error, data.context.set.error, "ERROR: Unable to process '");
+ fl_color_print(f_type_error, data.context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_trim);
+ fl_color_print_line(f_type_error, data.context.set.error, "' because the maximum buffer size was reached.");
}
else {
f_string_t function = "fl_string_append";
function = "fl_string_rip";
}
- fl_color_print(f_type_error, data.context.error, data.context.reset, "INTERNAL ERROR: An unhandled error (");
- fl_color_print(f_type_error, data.context.notable, data.context.reset, "%u", status_code);
- fl_color_print(f_type_error, data.context.error, data.context.reset, ") has occurred while calling ");
- fl_color_print(f_type_error, data.context.notable, data.context.reset, "%s()", function);
- fl_color_print_line(f_type_error, data.context.error, data.context.reset, ".");
+ fl_color_print(f_type_error, data.context.set.error, "INTERNAL ERROR: An unhandled error (");
+ fl_color_print(f_type_error, data.context.set.notable, "%u", status_code);
+ fl_color_print(f_type_error, data.context.set.error, ") has occurred while calling ");
+ fl_color_print(f_type_error, data.context.set.notable, "%s()", function);
+ fl_color_print_line(f_type_error, data.context.set.error, ".");
}
return status;
}
if (depths->array[i].value_name.used == 0) {
- fl_color_print(f_type_error, data.context.error, data.context.reset, "ERROR: The '");
- fl_color_print(f_type_error, data.context.notable, data.context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_name);
- fl_color_print_line(f_type_error, data.context.error, data.context.reset, "' must not be an empty string.");
+ fl_color_print(f_type_error, data.context.set.error, "ERROR: The '");
+ fl_color_print(f_type_error, data.context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_name);
+ fl_color_print_line(f_type_error, data.context.set.error, "' must not be an empty string.");
return F_status_set_error(F_parameter);
}
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);
- fl_color_print(f_type_error, data.context.error, data.context.reset, "' may only be specified once for the parameter '");
- fl_color_print(f_type_error, data.context.notable, data.context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_depth);
- fl_color_print_line(f_type_error, data.context.error, data.context.reset, "'.");
+ fl_color_print(f_type_error, data.context.set.error, "ERROR: The value '");
+ fl_color_print(f_type_error, data.context.set.notable, "%llu", depths->array[i].depth);
+ fl_color_print(f_type_error, data.context.set.error, "' may only be specified once for the parameter '");
+ fl_color_print(f_type_error, data.context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_depth);
+ fl_color_print_line(f_type_error, data.context.set.error, "'.");
return F_status_set_error(F_parameter);
}
else if (depths->array[i].depth > depths->array[j].depth) {
- 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, fss_basic_read_long_depth);
- fl_color_print(f_type_error, data.context.error, data.context.reset, "' may not have the value '");
- fl_color_print(f_type_error, data.context.notable, data.context.reset, "%llu", depths->array[i].depth);
- fl_color_print(f_type_error, data.context.error, data.context.reset, "' before the value '");
- fl_color_print(f_type_error, data.context.notable, data.context.reset, "%llu", depths->array[j].depth);
- fl_color_print_line(f_type_error, data.context.error, data.context.reset, "'.");
+ fl_color_print(f_type_error, data.context.set.error, "ERROR: The parameter '");
+ fl_color_print(f_type_error, data.context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_depth);
+ fl_color_print(f_type_error, data.context.set.error, "' may not have the value '");
+ fl_color_print(f_type_error, data.context.set.notable, "%llu", depths->array[i].depth);
+ fl_color_print(f_type_error, data.context.set.error, "' before the value '");
+ fl_color_print(f_type_error, data.context.set.notable, "%llu", depths->array[j].depth);
+ fl_color_print_line(f_type_error, data.context.set.error, "'.");
return F_status_set_error(F_parameter);
}
status = F_status_set_fine(status);
if (status == F_parameter) {
- fl_color_print(f_type_error, data->context.error, data->context.reset, "INTERNAL ERROR: Invalid parameter when calling ");
- fl_color_print(f_type_error, data->context.notable, data->context.reset, "fll_fss_basic_list_read()");
- fl_color_print(f_type_error, data->context.error, data->context.reset, " for the file '");
- fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s", filename);
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "'.");
+ fl_color_print(f_type_error, data->context.set.error, "INTERNAL ERROR: Invalid parameter when calling ");
+ fl_color_print(f_type_error, data->context.set.notable, "fll_fss_basic_list_read()");
+ fl_color_print(f_type_error, data->context.set.error, " for the file '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s", filename);
+ fl_color_print_line(f_type_error, data->context.set.error, "'.");
}
else if (status == F_memory_allocation || status == F_memory_reallocation) {
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "CRITICAL ERROR: Unable to allocate memory.");
+ fl_color_print_line(f_type_error, data->context.set.error, "CRITICAL ERROR: Unable to allocate memory.");
}
else if (status == F_incomplete_utf_stop) {
- fl_color_print(f_type_error, data->context.error, data->context.reset, "ENCODING ERROR: Error occurred on invalid UTF-8 character at stop position (at ");
- fl_color_print(f_type_error, data->context.notable, data->context.reset, "%d", input.start);
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, ").");
+ fl_color_print(f_type_error, data->context.set.error, "ENCODING ERROR: Error occurred on invalid UTF-8 character at stop position (at ");
+ fl_color_print(f_type_error, data->context.set.notable, "%d", input.start);
+ fl_color_print_line(f_type_error, data->context.set.error, ").");
}
else if (status == F_incomplete_utf_eos) {
- fl_color_print(f_type_error, data->context.error, data->context.reset, "ENCODING ERROR: Error occurred on invalid UTF-8 character at end of string (at ");
- fl_color_print(f_type_error, data->context.notable, data->context.reset, "%d", input.start);
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, ").");
+ fl_color_print(f_type_error, data->context.set.error, "ENCODING ERROR: Error occurred on invalid UTF-8 character at end of string (at ");
+ fl_color_print(f_type_error, data->context.set.notable, "%d", input.start);
+ fl_color_print_line(f_type_error, data->context.set.error, ").");
}
else {
- fl_color_print(f_type_error, data->context.error, data->context.reset, "INTERNAL ERROR: An unhandled error (");
- fl_color_print(f_type_error, data->context.notable, data->context.reset, "%u", status);
- fl_color_print(f_type_error, data->context.error, data->context.reset, ") has occurred while calling ");
- fl_color_print(f_type_error, data->context.notable, data->context.reset, "fll_fss_basic_list_read()");
- fl_color_print(f_type_error, data->context.error, data->context.reset, " for the file '");
- fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s", filename);
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "'.");
+ fl_color_print(f_type_error, data->context.set.error, "INTERNAL ERROR: An unhandled error (");
+ fl_color_print(f_type_error, data->context.set.notable, "%u", status);
+ fl_color_print(f_type_error, data->context.set.error, ") has occurred while calling ");
+ fl_color_print(f_type_error, data->context.set.notable, "fll_fss_basic_list_read()");
+ fl_color_print(f_type_error, data->context.set.error, " for the file '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s", filename);
+ fl_color_print_line(f_type_error, data->context.set.error, "'.");
}
return F_status_set_error(status);
* 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_t context, const f_string_t function_name, const f_string_t file_name, const f_status_t status) f_gcc_attribute_visibility_internal;
+ extern void fss_basic_read_print_file_error(const f_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_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;
+ extern void fss_basic_read_print_number_argument_error(const f_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_
/**
#endif
#ifndef _di_fss_basic_write_print_help_
- f_return_status fss_basic_write_print_help(const fl_color_context_t context) {
+ f_return_status fss_basic_write_print_help(const f_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.");
status = F_status_set_fine(status);
if (status == F_parameter) {
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "INTERNAL ERROR: Invalid parameter when calling f_file_open()");
+ fl_color_print_line(f_type_error, data->context.set.error, "INTERNAL ERROR: Invalid parameter when calling f_file_open()");
}
else if (status == F_file_found_not) {
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "ERROR: Unable to find the file '%s'", "-");
+ fl_color_print_line(f_type_error, data->context.set.error, "ERROR: Unable to find the file '%s'", "-");
}
else if (status == F_file_open) {
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "ERROR: Unable to open the file '%s'", "-");
+ fl_color_print_line(f_type_error, data->context.set.error, "ERROR: Unable to open the file '%s'", "-");
}
else if (status == F_file_descriptor) {
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "ERROR: File descriptor error while trying to open the file '%s'", "-");
+ fl_color_print_line(f_type_error, data->context.set.error, "ERROR: File descriptor error while trying to open the file '%s'", "-");
}
else {
- 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);
+ fl_color_print_line(f_type_error, data->context.set.error, "INTERNAL ERROR: An unhandled error (%u) has occurred while calling f_file_open()", status);
}
f_macro_string_dynamic_t_delete_simple(input);
f_file_close(&output.id);
if (status == F_parameter) {
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "INTERNAL ERROR: Invalid parameter when calling f_file_open()");
+ fl_color_print_line(f_type_error, data->context.set.error, "INTERNAL ERROR: Invalid parameter when calling f_file_open()");
}
else if (status == F_file_found_not) {
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "ERROR: Unable to find the file '%s'", arguments.argv[data->parameters[fss_basic_write_parameter_file].additional.array[0]]);
+ fl_color_print_line(f_type_error, data->context.set.error, "ERROR: Unable to find the file '%s'", arguments.argv[data->parameters[fss_basic_write_parameter_file].additional.array[0]]);
}
else if (status == F_file_open) {
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "ERROR: Unable to open the file '%s'", arguments.argv[data->parameters[fss_basic_write_parameter_file].additional.array[0]]);
+ fl_color_print_line(f_type_error, data->context.set.error, "ERROR: Unable to open the file '%s'", arguments.argv[data->parameters[fss_basic_write_parameter_file].additional.array[0]]);
}
else if (status == F_file_descriptor) {
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "ERROR: File descriptor error while trying to open the file '%s'", arguments.argv[data->parameters[fss_basic_write_parameter_file].additional.array[0]]);
+ fl_color_print_line(f_type_error, data->context.set.error, "ERROR: File descriptor error while trying to open the file '%s'", arguments.argv[data->parameters[fss_basic_write_parameter_file].additional.array[0]]);
}
else {
- 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);
+ fl_color_print_line(f_type_error, data->context.set.error, "INTERNAL ERROR: An unhandled error (%u) has occurred while calling f_file_open()", status);
}
f_macro_string_dynamic_t_delete_simple(buffer);
status = F_status_set_fine(status);
if (status == F_parameter) {
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "INTERNAL ERROR: Invalid parameter when calling f_file_write()");
+ fl_color_print_line(f_type_error, data->context.set.error, "INTERNAL ERROR: Invalid parameter when calling f_file_write()");
}
else if (status == F_file_write) {
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "ERROR: Unable to write to the file '%s'", arguments.argv[data->parameters[fss_basic_write_parameter_file].additional.array[0]]);
+ fl_color_print_line(f_type_error, data->context.set.error, "ERROR: Unable to write to the file '%s'", arguments.argv[data->parameters[fss_basic_write_parameter_file].additional.array[0]]);
}
else {
- 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);
+ fl_color_print_line(f_type_error, data->context.set.error, "INTERNAL ERROR: An unhandled error (%u) has occurred while calling f_file_write()", status);
}
f_macro_string_dynamic_t_delete_simple(buffer);
} // for
f_macro_string_lengths_t_delete_simple(data->remaining);
- fl_macro_color_context_t_delete_simple(data->context);
+ f_macro_color_context_t_delete_simple(data->context);
return F_none;
}
f_string_lengths_t remaining;
bool process_pipe;
- fl_color_context_t context;
+ f_color_context_t context;
} fss_basic_write_data;
#define fss_basic_write_data_initialize \
fss_basic_write_console_parameter_t_initialize, \
f_string_lengths_t_initialize, \
F_false, \
- fl_color_context_t_initialize, \
+ f_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_t context);
+ extern f_return_status fss_basic_write_print_help(const f_color_context_t context);
#endif // _di_fss_basic_write_print_help_
/**
#endif
#ifndef _di_fss_extended_list_read_print_help_
- f_return_status fss_extended_list_read_print_help(const fl_color_context_t context) {
+ f_return_status fss_extended_list_read_print_help(const f_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.");
fll_program_print_help_usage(context, fss_extended_list_read_name, "filename(s)");
- fl_color_print(f_type_output, context.important, context.reset, " Notes:");
+ fl_color_print(f_type_output, context.set.important, " Notes:");
printf("%c", f_string_eol[0], f_string_eol[0]);
printf("%c", f_string_eol[0]);
printf(" When using the ");
- fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_depth);
+ fl_color_print(f_type_output, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_depth);
printf(" option, an order of operations is enforced on the parameters.%c", f_string_eol[0]);
printf(" When this order of operations is in effect, parameters to the right of a depth parameter are influenced by that depth parameter:%c", f_string_eol[0]);
printf(" ");
- fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_at);
+ fl_color_print(f_type_output, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_at);
printf(": An object index at the specified depth.%c", f_string_eol[0]);
printf(" ");
- fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_depth);
+ fl_color_print(f_type_output, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_depth);
printf(": A new depth within the specified depth, indexed from the root.%c", f_string_eol[0]);
printf(" ");
- fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_name);
+ fl_color_print(f_type_output, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_name);
printf(": An object name at the specified depth.%c", f_string_eol[0]);
printf("%c", f_string_eol[0]);
printf(" The parameter ");
- fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_depth);
+ fl_color_print(f_type_output, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_depth);
printf(" must be in numeric order, but values in between may be skipped.%c", f_string_eol[0]);
printf(" ('-d 0 -a 1 -d 2 -a 2' would specify index 1 at depth 0, any index at depth 1, and index 2 at depth 2.)%c", f_string_eol[0]);
printf(" ('-d 2 -a 1 -d 0 -a 2' would be invalid because depth 2 is before depth 1.)%c", f_string_eol[0]);
printf("%c", f_string_eol[0]);
printf(" The parameter ");
- fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_select);
+ fl_color_print(f_type_output, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_select);
printf(" selects a content index at a given depth.%c", f_string_eol[0]);
printf(" (This parameter is not synonymous with the depth parameter and does not relate to nested content).%c", f_string_eol[0]);
printf("%c", f_string_eol[0]);
printf(" Specify both ");
- fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_object);
+ fl_color_print(f_type_output, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_object);
printf(" and the ");
- fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_total);
+ fl_color_print(f_type_output, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_total);
printf(" parameters to get the total objects.%c", f_string_eol[0]);
printf("%c", f_string_eol[0]);
printf(" When both ");
- fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_at);
+ fl_color_print(f_type_output, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_at);
printf(" and ");
- fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_name);
+ fl_color_print(f_type_output, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_name);
printf(" parameters are specified (at the same depth), the ");
- fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_at);
+ fl_color_print(f_type_output, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_at);
printf(" parameter value will be treated as a position relative to the specified ");
- fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_name);
+ fl_color_print(f_type_output, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_name);
printf(" parameter value.%c", f_string_eol[0]);
printf("%c", f_string_eol[0]);
printf(" This program may support parameters, such as ");
- fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_depth);
+ fl_color_print(f_type_output, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_depth);
printf(" or ");
- fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_select);
+ fl_color_print(f_type_output, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_select);
printf(", even if not supported by the standard.%c", f_string_eol[0]);
printf(" This is done to help ensure consistency for scripting.%c", f_string_eol[0]);
printf("%c", f_string_eol[0]);
printf(" For parameters like ");
- fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_depth);
+ fl_color_print(f_type_output, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_depth);
printf(", if the standard doesn't support nested content, then only a depth of 0 would be valid.%c", f_string_eol[0]);
printf(" For parameters like ");
- fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_select);
+ fl_color_print(f_type_output, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_select);
printf(", if the standard doesn't support multiple content groups, then only a select of 0 would be valid.%c", f_string_eol[0]);
printf("%c", f_string_eol[0]);
printf(" The parameter ");
- fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_trim);
+ fl_color_print(f_type_output, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_trim);
printf(" will remove leading and trailing whitespaces when selecting objects or when printing objects.%c", f_string_eol[0]);
printf("%c", f_string_eol[0]);
}
else if (data->remaining.used > 0 || data->process_pipe) {
if (data->parameters[fss_extended_list_read_parameter_at].result == f_console_result_found) {
- 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, fss_extended_list_read_long_at);
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "' requires a positive number.");
+ fl_color_print(f_type_error, data->context.set.error, "ERROR: The parameter '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_at);
+ fl_color_print_line(f_type_error, data->context.set.error, "' requires a positive number.");
fss_extended_list_read_delete_data(data);
return F_status_set_error(F_parameter);
}
if (data->parameters[fss_extended_list_read_parameter_depth].result == f_console_result_found) {
- 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, fss_extended_list_read_long_depth);
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "' requires a positive number.");
+ fl_color_print(f_type_error, data->context.set.error, "ERROR: The parameter '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_depth);
+ fl_color_print_line(f_type_error, data->context.set.error, "' requires a positive number.");
fss_extended_list_read_delete_data(data);
return F_status_set_error(F_parameter);
}
if (data->parameters[fss_extended_list_read_parameter_line].result == f_console_result_found) {
- 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, fss_extended_list_read_long_line);
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "' requires a positive number.");
+ fl_color_print(f_type_error, data->context.set.error, "ERROR: The parameter '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_line);
+ fl_color_print_line(f_type_error, data->context.set.error, "' requires a positive number.");
fss_extended_list_read_delete_data(data);
return F_status_set_error(F_parameter);
}
if (data->parameters[fss_extended_list_read_parameter_name].result == f_console_result_found) {
- 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, fss_extended_list_read_long_name);
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "' requires a string.");
+ fl_color_print(f_type_error, data->context.set.error, "ERROR: The parameter '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_name);
+ fl_color_print_line(f_type_error, data->context.set.error, "' requires a string.");
fss_extended_list_read_delete_data(data);
return F_status_set_error(F_parameter);
}
if (data->parameters[fss_extended_list_read_parameter_select].result == f_console_result_found) {
- 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, fss_extended_list_read_long_select);
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "' requires a positive number.");
+ fl_color_print(f_type_error, data->context.set.error, "ERROR: The parameter '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_select);
+ fl_color_print_line(f_type_error, data->context.set.error, "' requires a positive number.");
fss_extended_list_read_delete_data(data);
return F_status_set_error(F_parameter);
if (data->parameters[fss_extended_list_read_parameter_object].result == f_console_result_found) {
if (data->parameters[fss_extended_list_read_parameter_line].result == f_console_result_additional) {
- fl_color_print(f_type_error, data->context.error, data->context.reset, "ERROR: Cannot specify the '");
- fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_object);
- fl_color_print(f_type_error, data->context.error, data->context.reset, "' parameter with the '");
- fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_line);
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "' parameter.");
+ fl_color_print(f_type_error, data->context.set.error, "ERROR: Cannot specify the '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_object);
+ fl_color_print(f_type_error, data->context.set.error, "' parameter with the '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_line);
+ fl_color_print_line(f_type_error, data->context.set.error, "' parameter.");
fss_extended_list_read_delete_data(data);
return F_status_set_error(F_parameter);
}
if (data->parameters[fss_extended_list_read_parameter_select].result == f_console_result_additional) {
- fl_color_print(f_type_error, data->context.error, data->context.reset, "ERROR: Cannot specify the '");
- fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_object);
- fl_color_print(f_type_error, data->context.error, data->context.reset, "' parameter with the '");
- 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.");
+ fl_color_print(f_type_error, data->context.set.error, "ERROR: Cannot specify the '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_object);
+ fl_color_print(f_type_error, data->context.set.error, "' parameter with the '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_select);
+ fl_color_print_line(f_type_error, data->context.set.error, "' parameter.");
fss_extended_list_read_delete_data(data);
return F_status_set_error(F_parameter);
if (data->parameters[fss_extended_list_read_parameter_line].result == f_console_result_additional) {
if (data->parameters[fss_extended_list_read_parameter_total].result == f_console_result_found) {
- fl_color_print(f_type_error, data->context.error, data->context.reset, "ERROR: Cannot specify the '");
- fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_line);
- fl_color_print(f_type_error, data->context.error, data->context.reset, "' parameter with the '");
- fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_total);
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "' parameter.");
+ fl_color_print(f_type_error, data->context.set.error, "ERROR: Cannot specify the '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_line);
+ fl_color_print(f_type_error, data->context.set.error, "' parameter with the '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_total);
+ fl_color_print_line(f_type_error, data->context.set.error, "' parameter.");
fss_extended_list_read_delete_data(data);
return F_status_set_error(F_parameter);
}
if (data->parameters[fss_extended_list_read_parameter_select].result == f_console_result_found) {
- fl_color_print(f_type_error, data->context.error, data->context.reset, "ERROR: The '");
- 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.");
+ fl_color_print(f_type_error, data->context.set.error, "ERROR: The '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_select);
+ fl_color_print_line(f_type_error, data->context.set.error, "' parameter requires a positive number.");
macro_fss_extended_list_read_depths_t_delete_simple(depths);
fss_extended_list_read_delete_data(data);
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.");
+ fl_color_print_line(f_type_error, data->context.set.error, "ERROR: You failed to specify one or more files.");
status = F_status_set_error(F_parameter);
}
f_macro_string_dynamic_t_delete_simple(data->buffer);
f_macro_string_lengths_t_delete_simple(data->remaining);
- fl_macro_color_context_t_delete_simple(data->context);
+ f_macro_color_context_t_delete_simple(data->context);
return F_none;
}
f_string_lengths_t remaining;
bool process_pipe;
- fl_color_context_t context;
+ f_color_context_t context;
} fss_extended_list_read_data_t;
#define fss_extended_list_read_data_t_initialize \
f_string_quantity_t_initialize, \
f_string_lengths_t_initialize, \
F_false, \
- fl_color_context_t_initialize, \
+ f_color_context_t_initialize, \
}
#endif // _di_fss_extended_list_read_data_t_
* 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_t context);
+ extern f_return_status fss_extended_list_read_print_help(const f_color_context_t context);
#endif // _di_fss_extended_list_read_print_help_
/**
#endif
#ifndef _di_fss_extended_list_read_print_file_error_
- 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) {
+ void fss_extended_list_read_print_file_error(const f_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 (");
- fl_color_print(f_type_error, context.notable, context.reset, "%llu", status);
- fl_color_print(f_type_error, context.error, context.reset, ") has occurred while calling ");
- fl_color_print(f_type_error, context.notable, context.reset, "%s()", function_name);
- fl_color_print_line(f_type_error, context.error, context.reset, ".");
+ fl_color_print(f_type_error, context.set.error, "INTERNAL ERROR: An unhandled error (");
+ fl_color_print(f_type_error, context.set.notable, "%llu", status);
+ fl_color_print(f_type_error, context.set.error, ") has occurred while calling ");
+ fl_color_print(f_type_error, context.set.notable, "%s()", function_name);
+ fl_color_print_line(f_type_error, context.set.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_t context, const f_string_t function_name, const f_string_t parameter_name, const f_string_t argument, const f_status_t status) {
+ void fss_extended_list_read_print_number_argument_error(const f_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 ");
- fl_color_print(f_type_error, context.notable, context.reset, "%s()", function_name);
- fl_color_print_line(f_type_error, context.error, context.reset, ".");
+ fl_color_print(f_type_error, context.set.error, "INTERNAL ERROR: Invalid parameter when calling ");
+ fl_color_print(f_type_error, context.set.notable, "%s()", function_name);
+ fl_color_print_line(f_type_error, context.set.error, ".");
}
else if (status == F_number) {
- fl_color_print(f_type_error, context.error, context.reset, "ERROR: The argument '");
- fl_color_print(f_type_error, context.notable, context.reset, "%s", argument);
- fl_color_print(f_type_error, context.error, context.reset, "' is not a valid number for the parameter '");
- fl_color_print(f_type_error, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, parameter_name);
- fl_color_print_line(f_type_error, context.error, context.reset, "'.");
+ fl_color_print(f_type_error, context.set.error, "ERROR: The argument '");
+ fl_color_print(f_type_error, context.set.notable, "%s", argument);
+ fl_color_print(f_type_error, context.set.error, "' is not a valid number for the parameter '");
+ fl_color_print(f_type_error, context.set.notable, "%s%s", f_console_symbol_long_enable, parameter_name);
+ fl_color_print_line(f_type_error, context.set.error, "'.");
}
else if (status == F_number_underflow) {
- fl_color_print(f_type_error, context.error, context.reset, "ERROR: The argument '");
- fl_color_print(f_type_error, context.notable, context.reset, "%s", argument);
- fl_color_print(f_type_error, context.error, context.reset, "' is too small for the parameter '");
- fl_color_print(f_type_error, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, parameter_name);
- fl_color_print_line(f_type_error, context.error, context.reset, "'.");
+ fl_color_print(f_type_error, context.set.error, "ERROR: The argument '");
+ fl_color_print(f_type_error, context.set.notable, "%s", argument);
+ fl_color_print(f_type_error, context.set.error, "' is too small for the parameter '");
+ fl_color_print(f_type_error, context.set.notable, "%s%s", f_console_symbol_long_enable, parameter_name);
+ fl_color_print_line(f_type_error, context.set.error, "'.");
}
else if (status == F_number_overflow) {
- fl_color_print(f_type_error, context.error, context.reset, "ERROR: The argument '");
- fl_color_print(f_type_error, context.notable, context.reset, "%s", argument);
- fl_color_print(f_type_error, context.error, context.reset, "' is too large for the parameter '");
- fl_color_print(f_type_error, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, parameter_name);
- fl_color_print_line(f_type_error, context.error, context.reset, "'.");
+ fl_color_print(f_type_error, context.set.error, "ERROR: The argument '");
+ fl_color_print(f_type_error, context.set.notable, "%s", argument);
+ fl_color_print(f_type_error, context.set.error, "' is too large for the parameter '");
+ fl_color_print(f_type_error, context.set.notable, "%s%s", f_console_symbol_long_enable, parameter_name);
+ fl_color_print_line(f_type_error, context.set.error, "'.");
}
else if (status == F_number_negative) {
- fl_color_print(f_type_error, context.error, context.reset, "ERROR: The argument '");
- fl_color_print(f_type_error, context.notable, context.reset, "%s", argument);
- fl_color_print(f_type_error, context.error, context.reset, "' is negative, which is not allowed for the parameter '");
- fl_color_print(f_type_error, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, parameter_name);
- fl_color_print_line(f_type_error, context.error, context.reset, "'.");
+ fl_color_print(f_type_error, context.set.error, "ERROR: The argument '");
+ fl_color_print(f_type_error, context.set.notable, "%s", argument);
+ fl_color_print(f_type_error, context.set.error, "' is negative, which is not allowed for the parameter '");
+ fl_color_print(f_type_error, context.set.notable, "%s%s", f_console_symbol_long_enable, parameter_name);
+ fl_color_print_line(f_type_error, context.set.error, "'.");
}
else if (status == F_number_positive) {
- fl_color_print(f_type_error, context.error, context.reset, "ERROR: The argument '");
- fl_color_print(f_type_error, context.notable, context.reset, "%s", argument);
- fl_color_print(f_type_error, context.error, context.reset, "' contains a '");
- fl_color_print(f_type_error, context.notable, context.reset, "+");
- fl_color_print(f_type_error, context.error, context.reset, "', which is not allowed for the parameter '");
- fl_color_print(f_type_error, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, parameter_name);
- fl_color_print_line(f_type_error, context.error, context.reset, "'.");
+ fl_color_print(f_type_error, context.set.error, "ERROR: The argument '");
+ fl_color_print(f_type_error, context.set.notable, "%s", argument);
+ fl_color_print(f_type_error, context.set.error, "' contains a '");
+ fl_color_print(f_type_error, context.set.notable, "+");
+ fl_color_print(f_type_error, context.set.error, "', which is not allowed for the parameter '");
+ fl_color_print(f_type_error, context.set.notable, "%s%s", f_console_symbol_long_enable, parameter_name);
+ fl_color_print_line(f_type_error, context.set.error, "'.");
}
else if (status == F_data_not) {
- fl_color_print(f_type_error, context.error, context.reset, "ERROR: The parameter '");
- fl_color_print(f_type_error, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, parameter_name);
- fl_color_print_line(f_type_error, context.error, context.reset, "' must not be an empty string.");
+ fl_color_print(f_type_error, context.set.error, "ERROR: The parameter '");
+ fl_color_print(f_type_error, context.set.notable, "%s%s", f_console_symbol_long_enable, parameter_name);
+ fl_color_print_line(f_type_error, context.set.error, "' must not be an empty string.");
}
else {
- fl_color_print(f_type_error, context.error, context.reset, "INTERNAL ERROR: An unhandled error (");
- fl_color_print(f_type_error, context.notable, context.reset, "%llu", status);
- fl_color_print(f_type_error, context.error, context.reset, ") has occurred while calling ");
- fl_color_print(f_type_error, context.notable, context.reset, "%s()", function_name);
- fl_color_print(f_type_error, context.error, context.reset, "' for the parameter '");
- fl_color_print(f_type_error, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, parameter_name);
- fl_color_print(f_type_error, context.error, context.reset, "' with the value '");
- fl_color_print(f_type_error, context.notable, context.reset, "%s", argument);
- fl_color_print_line(f_type_error, context.error, context.reset, "'.");
+ fl_color_print(f_type_error, context.set.error, "INTERNAL ERROR: An unhandled error (");
+ fl_color_print(f_type_error, context.set.notable, "%llu", status);
+ fl_color_print(f_type_error, context.set.error, ") has occurred while calling ");
+ fl_color_print(f_type_error, context.set.notable, "%s()", function_name);
+ fl_color_print(f_type_error, context.set.error, "' for the parameter '");
+ fl_color_print(f_type_error, context.set.notable, "%s%s", f_console_symbol_long_enable, parameter_name);
+ fl_color_print(f_type_error, context.set.error, "' with the value '");
+ fl_color_print(f_type_error, context.set.notable, "%s", argument);
+ fl_color_print_line(f_type_error, context.set.error, "'.");
}
}
#endif // _di_fss_extended_list_read_print_number_argument_error_
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.");
+ fl_color_print_line(f_type_error, data.context.set.error, "CRITICAL ERROR: Unable to allocate memory.");
return 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.");
+ fl_color_print_line(f_type_error, data.context.set.error, "CRITICAL ERROR: Unable to allocate memory.");
}
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.");
+ fl_color_print(f_type_error, data.context.set.error, "ERROR: Unable to process '");
+ fl_color_print(f_type_error, data.context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_trim);
+ fl_color_print_line(f_type_error, data.context.set.error, "' because the maximum buffer size was reached.");
}
else {
f_string_t function = "fl_string_append";
function = "fl_string_rip";
}
- fl_color_print(f_type_error, data.context.error, data.context.reset, "INTERNAL ERROR: An unhandled error (");
- fl_color_print(f_type_error, data.context.notable, data.context.reset, "%u", status_code);
- fl_color_print(f_type_error, data.context.error, data.context.reset, ") has occurred while calling ");
- fl_color_print(f_type_error, data.context.notable, data.context.reset, "%s()", function);
- fl_color_print_line(f_type_error, data.context.error, data.context.reset, ".");
+ fl_color_print(f_type_error, data.context.set.error, "INTERNAL ERROR: An unhandled error (");
+ fl_color_print(f_type_error, data.context.set.notable, "%u", status_code);
+ fl_color_print(f_type_error, data.context.set.error, ") has occurred while calling ");
+ fl_color_print(f_type_error, data.context.set.notable, "%s()", function);
+ fl_color_print_line(f_type_error, data.context.set.error, ".");
}
return status;
}
if (depths->array[i].value_name.used == 0) {
- fl_color_print(f_type_error, data.context.error, data.context.reset, "ERROR: The '");
- fl_color_print(f_type_error, data.context.notable, data.context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_name);
- fl_color_print_line(f_type_error, data.context.error, data.context.reset, "' must not be an empty string.");
+ fl_color_print(f_type_error, data.context.set.error, "ERROR: The '");
+ fl_color_print(f_type_error, data.context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_name);
+ fl_color_print_line(f_type_error, data.context.set.error, "' must not be an empty string.");
return F_status_set_error(F_parameter);
}
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);
- fl_color_print(f_type_error, data.context.error, data.context.reset, "' may only be specified once for the parameter '");
- fl_color_print(f_type_error, data.context.notable, data.context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_depth);
- fl_color_print_line(f_type_error, data.context.error, data.context.reset, "'.");
+ fl_color_print(f_type_error, data.context.set.error, "ERROR: The value '");
+ fl_color_print(f_type_error, data.context.set.notable, "%llu", depths->array[i].depth);
+ fl_color_print(f_type_error, data.context.set.error, "' may only be specified once for the parameter '");
+ fl_color_print(f_type_error, data.context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_depth);
+ fl_color_print_line(f_type_error, data.context.set.error, "'.");
return F_status_set_error(F_parameter);
}
else if (depths->array[i].depth > depths->array[j].depth) {
- 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, fss_extended_list_read_long_depth);
- fl_color_print(f_type_error, data.context.error, data.context.reset, "' may not have the value '");
- fl_color_print(f_type_error, data.context.notable, data.context.reset, "%llu", depths->array[i].depth);
- fl_color_print(f_type_error, data.context.error, data.context.reset, "' before the value '");
- fl_color_print(f_type_error, data.context.notable, data.context.reset, "%llu", depths->array[j].depth);
- fl_color_print_line(f_type_error, data.context.error, data.context.reset, "'.");
+ fl_color_print(f_type_error, data.context.set.error, "ERROR: The parameter '");
+ fl_color_print(f_type_error, data.context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_depth);
+ fl_color_print(f_type_error, data.context.set.error, "' may not have the value '");
+ fl_color_print(f_type_error, data.context.set.notable, "%llu", depths->array[i].depth);
+ fl_color_print(f_type_error, data.context.set.error, "' before the value '");
+ fl_color_print(f_type_error, data.context.set.notable, "%llu", depths->array[j].depth);
+ fl_color_print_line(f_type_error, data.context.set.error, "'.");
return F_status_set_error(F_parameter);
}
status = F_status_set_fine(status);
if (status == F_parameter) {
- fl_color_print(f_type_error, data->context.error, data->context.reset, "INTERNAL ERROR: Invalid parameter when calling ");
- fl_color_print(f_type_error, data->context.notable, data->context.reset, "fll_fss_extended_list_read()");
- fl_color_print(f_type_error, data->context.error, data->context.reset, " for the file '");
- fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s", filename);
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "'.");
+ fl_color_print(f_type_error, data->context.set.error, "INTERNAL ERROR: Invalid parameter when calling ");
+ fl_color_print(f_type_error, data->context.set.notable, "fll_fss_extended_list_read()");
+ fl_color_print(f_type_error, data->context.set.error, " for the file '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s", filename);
+ fl_color_print_line(f_type_error, data->context.set.error, "'.");
}
else if (status == F_memory_allocation || status == F_memory_reallocation) {
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "CRITICAL ERROR: Unable to allocate memory.");
+ fl_color_print_line(f_type_error, data->context.set.error, "CRITICAL ERROR: Unable to allocate memory.");
}
else if (status == F_incomplete_utf_stop) {
- fl_color_print(f_type_error, data->context.error, data->context.reset, "ENCODING ERROR: Error occurred on invalid UTF-8 character at stop position (at ");
- fl_color_print(f_type_error, data->context.notable, data->context.reset, "%d", input.start);
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, ").");
+ fl_color_print(f_type_error, data->context.set.error, "ENCODING ERROR: Error occurred on invalid UTF-8 character at stop position (at ");
+ fl_color_print(f_type_error, data->context.set.notable, "%d", input.start);
+ fl_color_print_line(f_type_error, data->context.set.error, ").");
}
else if (status == F_incomplete_utf_eos) {
- fl_color_print(f_type_error, data->context.error, data->context.reset, "ENCODING ERROR: Error occurred on invalid UTF-8 character at end of string (at ");
- fl_color_print(f_type_error, data->context.notable, data->context.reset, "%d", input.start);
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, ").");
+ fl_color_print(f_type_error, data->context.set.error, "ENCODING ERROR: Error occurred on invalid UTF-8 character at end of string (at ");
+ fl_color_print(f_type_error, data->context.set.notable, "%d", input.start);
+ fl_color_print_line(f_type_error, data->context.set.error, ").");
}
else {
- fl_color_print(f_type_error, data->context.error, data->context.reset, "INTERNAL ERROR: An unhandled error (");
- fl_color_print(f_type_error, data->context.notable, data->context.reset, "%u", status);
- fl_color_print(f_type_error, data->context.error, data->context.reset, ") has occurred while calling ");
- fl_color_print(f_type_error, data->context.notable, data->context.reset, "fll_fss_extended_list_read()");
- fl_color_print(f_type_error, data->context.error, data->context.reset, " for the file '");
- fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s", filename);
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "'.");
+ fl_color_print(f_type_error, data->context.set.error, "INTERNAL ERROR: An unhandled error (");
+ fl_color_print(f_type_error, data->context.set.notable, "%u", status);
+ fl_color_print(f_type_error, data->context.set.error, ") has occurred while calling ");
+ fl_color_print(f_type_error, data->context.set.notable, "fll_fss_extended_list_read()");
+ fl_color_print(f_type_error, data->context.set.error, " for the file '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s", filename);
+ fl_color_print_line(f_type_error, data->context.set.error, "'.");
}
return F_status_set_error(status);
* 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_t context, const f_string_t function_name, const f_string_t file_name, const f_status_t status) f_gcc_attribute_visibility_internal;
+ extern void fss_extended_list_read_print_file_error(const f_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_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;
+ extern void fss_extended_list_read_print_number_argument_error(const f_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_
/**
#endif
#ifndef _di_fss_extended_read_print_help_
- f_return_status fss_extended_read_print_help(const fl_color_context_t context) {
+ f_return_status fss_extended_read_print_help(const f_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.");
fll_program_print_help_usage(context, fss_extended_read_name, "filename(s)");
- fl_color_print(f_type_output, context.important, context.reset, " Notes:");
+ fl_color_print(f_type_output, context.set.important, " Notes:");
printf("%c", f_string_eol[0], f_string_eol[0]);
printf("%c", f_string_eol[0]);
printf(" When using the ");
- fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_depth);
+ fl_color_print(f_type_output, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_depth);
printf(" option, an order of operations is enforced on the parameters.%c", f_string_eol[0]);
printf(" When this order of operations is in effect, parameters to the right of a depth parameter are influenced by that depth parameter:%c", f_string_eol[0]);
printf(" ");
- fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_at);
+ fl_color_print(f_type_output, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_at);
printf(": An object index at the specified depth.%c", f_string_eol[0]);
printf(" ");
- fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_depth);
+ fl_color_print(f_type_output, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_depth);
printf(": A new depth within the specified depth, indexed from the root.%c", f_string_eol[0]);
printf(" ");
- fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_name);
+ fl_color_print(f_type_output, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_name);
printf(": An object name at the specified depth.%c", f_string_eol[0]);
printf("%c", f_string_eol[0]);
printf(" The parameter ");
- fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_depth);
+ fl_color_print(f_type_output, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_depth);
printf(" must be in numeric order, but values in between may be skipped.%c", f_string_eol[0]);
printf(" ('-d 0 -a 1 -d 2 -a 2' would specify index 1 at depth 0, any index at depth 1, and index 2 at depth 2.)%c", f_string_eol[0]);
printf(" ('-d 2 -a 1 -d 0 -a 2' would be invalid because depth 2 is before depth 1.)%c", f_string_eol[0]);
printf("%c", f_string_eol[0]);
printf(" The parameter ");
- fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_select);
+ fl_color_print(f_type_output, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_select);
printf(" selects a content index at a given depth.%c", f_string_eol[0]);
printf(" (This parameter is not synonymous with the depth parameter and does not relate to nested content).%c", f_string_eol[0]);
printf("%c", f_string_eol[0]);
printf(" Specify both ");
- fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_object);
+ fl_color_print(f_type_output, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_object);
printf(" and the ");
- fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_total);
+ fl_color_print(f_type_output, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_total);
printf(" parameters to get the total objects.%c", f_string_eol[0]);
printf("%c", f_string_eol[0]);
printf(" When both ");
- fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_at);
+ fl_color_print(f_type_output, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_at);
printf(" and ");
- fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_name);
+ fl_color_print(f_type_output, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_name);
printf(" parameters are specified (at the same depth), the ");
- fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_at);
+ fl_color_print(f_type_output, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_at);
printf(" parameter value will be treated as a position relative to the specified ");
- fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_name);
+ fl_color_print(f_type_output, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_name);
printf(" parameter value.%c", f_string_eol[0]);
printf("%c", f_string_eol[0]);
printf(" This program may support parameters, such as ");
- fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_depth);
+ fl_color_print(f_type_output, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_depth);
printf(" or ");
- fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_select);
+ fl_color_print(f_type_output, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_select);
printf(", even if not supported by the standard.%c", f_string_eol[0]);
printf(" This is done to help ensure consistency for scripting.%c", f_string_eol[0]);
printf("%c", f_string_eol[0]);
printf(" For parameters like ");
- fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_depth);
+ fl_color_print(f_type_output, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_depth);
printf(", if the standard doesn't support nested content, then only a depth of 0 would be valid.%c", f_string_eol[0]);
printf(" For parameters like ");
- fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_select);
+ fl_color_print(f_type_output, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_select);
printf(", if the standard doesn't support multiple content groups, then only a select of 0 would be valid.%c", f_string_eol[0]);
printf("%c", f_string_eol[0]);
printf(" The parameter ");
- fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_trim);
+ fl_color_print(f_type_output, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_trim);
printf(" will remove leading and trailing whitespaces when selecting objects or when printing objects.%c", f_string_eol[0]);
printf("%c", f_string_eol[0]);
}
else if (data->remaining.used > 0 || data->process_pipe) {
if (data->parameters[fss_extended_read_parameter_at].result == f_console_result_found) {
- 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, fss_extended_read_long_at);
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "' requires a positive number.");
+ fl_color_print(f_type_error, data->context.set.error, "ERROR: The parameter '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_at);
+ fl_color_print_line(f_type_error, data->context.set.error, "' requires a positive number.");
fss_extended_read_delete_data(data);
return F_status_set_error(F_parameter);
}
if (data->parameters[fss_extended_read_parameter_depth].result == f_console_result_found) {
- 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, fss_extended_read_long_depth);
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "' requires a positive number.");
+ fl_color_print(f_type_error, data->context.set.error, "ERROR: The parameter '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_depth);
+ fl_color_print_line(f_type_error, data->context.set.error, "' requires a positive number.");
fss_extended_read_delete_data(data);
return F_status_set_error(F_parameter);
}
if (data->parameters[fss_extended_read_parameter_line].result == f_console_result_found) {
- 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, fss_extended_read_long_line);
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "' requires a positive number.");
+ fl_color_print(f_type_error, data->context.set.error, "ERROR: The parameter '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_line);
+ fl_color_print_line(f_type_error, data->context.set.error, "' requires a positive number.");
fss_extended_read_delete_data(data);
return F_status_set_error(F_parameter);
}
if (data->parameters[fss_extended_read_parameter_name].result == f_console_result_found) {
- 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, fss_extended_read_long_name);
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "' requires a string.");
+ fl_color_print(f_type_error, data->context.set.error, "ERROR: The parameter '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_name);
+ fl_color_print_line(f_type_error, data->context.set.error, "' requires a string.");
fss_extended_read_delete_data(data);
return F_status_set_error(F_parameter);
}
if (data->parameters[fss_extended_read_parameter_select].result == f_console_result_found) {
- 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, fss_extended_read_long_select);
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "' requires a positive number.");
+ fl_color_print(f_type_error, data->context.set.error, "ERROR: The parameter '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_select);
+ fl_color_print_line(f_type_error, data->context.set.error, "' requires a positive number.");
fss_extended_read_delete_data(data);
return F_status_set_error(F_parameter);
if (data->parameters[fss_extended_read_parameter_object].result == f_console_result_found) {
if (data->parameters[fss_extended_read_parameter_line].result == f_console_result_additional) {
- fl_color_print(f_type_error, data->context.error, data->context.reset, "ERROR: Cannot specify the '");
- fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_object);
- fl_color_print(f_type_error, data->context.error, data->context.reset, "' parameter with the '");
- fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_line);
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "' parameter.");
+ fl_color_print(f_type_error, data->context.set.error, "ERROR: Cannot specify the '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_object);
+ fl_color_print(f_type_error, data->context.set.error, "' parameter with the '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_line);
+ fl_color_print_line(f_type_error, data->context.set.error, "' parameter.");
fss_extended_read_delete_data(data);
return F_status_set_error(F_parameter);
}
if (data->parameters[fss_extended_read_parameter_select].result == f_console_result_additional) {
- fl_color_print(f_type_error, data->context.error, data->context.reset, "ERROR: Cannot specify the '");
- fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_object);
- fl_color_print(f_type_error, data->context.error, data->context.reset, "' parameter with the '");
- 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.");
+ fl_color_print(f_type_error, data->context.set.error, "ERROR: Cannot specify the '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_object);
+ fl_color_print(f_type_error, data->context.set.error, "' parameter with the '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_select);
+ fl_color_print_line(f_type_error, data->context.set.error, "' parameter.");
fss_extended_read_delete_data(data);
return F_status_set_error(F_parameter);
if (data->parameters[fss_extended_read_parameter_line].result == f_console_result_additional) {
if (data->parameters[fss_extended_read_parameter_total].result == f_console_result_found) {
- fl_color_print(f_type_error, data->context.error, data->context.reset, "ERROR: Cannot specify the '");
- fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_line);
- fl_color_print(f_type_error, data->context.error, data->context.reset, "' parameter with the '");
- fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_total);
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "' parameter.");
+ fl_color_print(f_type_error, data->context.set.error, "ERROR: Cannot specify the '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_line);
+ fl_color_print(f_type_error, data->context.set.error, "' parameter with the '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_total);
+ fl_color_print_line(f_type_error, data->context.set.error, "' parameter.");
fss_extended_read_delete_data(data);
return F_status_set_error(F_parameter);
}
if (data->parameters[fss_extended_read_parameter_select].result == f_console_result_found) {
- fl_color_print(f_type_error, data->context.error, data->context.reset, "ERROR: The '");
- 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.");
+ fl_color_print(f_type_error, data->context.set.error, "ERROR: The '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_select);
+ fl_color_print_line(f_type_error, data->context.set.error, "' parameter requires a positive number.");
macro_fss_extended_read_depths_t_delete_simple(depths);
fss_extended_read_delete_data(data);
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.");
+ fl_color_print_line(f_type_error, data->context.set.error, "ERROR: You failed to specify one or more files.");
status = F_status_set_error(F_parameter);
}
f_macro_string_dynamic_t_delete_simple(data->buffer);
f_macro_string_lengths_t_delete_simple(data->remaining);
- fl_macro_color_context_t_delete_simple(data->context);
+ f_macro_color_context_t_delete_simple(data->context);
return F_none;
}
f_string_lengths_t remaining;
bool process_pipe;
- fl_color_context_t context;
+ f_color_context_t context;
} fss_extended_read_data_t;
#define fss_extended_read_data_initialize \
f_string_quantity_t_initialize, \
f_string_lengths_t_initialize, \
F_false, \
- fl_color_context_t_initialize, \
+ f_color_context_t_initialize, \
}
#endif // _di_fss_extended_read_data_t_
* F_none on success.
*/
#ifndef _di_fss_extended_read_print_help_
- extern f_return_status fss_extended_read_print_help(const fl_color_context_t context);
+ extern f_return_status fss_extended_read_print_help(const f_color_context_t context);
#endif // _di_fss_extended_read_print_help_
/**
#endif
#ifndef _di_fss_extended_read_print_file_error_
- 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) {
+ void fss_extended_read_print_file_error(const f_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 (");
- fl_color_print(f_type_error, context.notable, context.reset, "%llu", status);
- fl_color_print(f_type_error, context.error, context.reset, ") has occurred while calling ");
- fl_color_print(f_type_error, context.notable, context.reset, "%s()", function_name);
- fl_color_print_line(f_type_error, context.error, context.reset, ".");
+ fl_color_print(f_type_error, context.set.error, "INTERNAL ERROR: An unhandled error (");
+ fl_color_print(f_type_error, context.set.notable, "%llu", status);
+ fl_color_print(f_type_error, context.set.error, ") has occurred while calling ");
+ fl_color_print(f_type_error, context.set.notable, "%s()", function_name);
+ fl_color_print_line(f_type_error, context.set.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_t context, const f_string_t function_name, const f_string_t parameter_name, const f_string_t argument, const f_status_t status) {
+ void fss_extended_read_print_number_argument_error(const f_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 ");
- fl_color_print(f_type_error, context.notable, context.reset, "%s()", function_name);
- fl_color_print_line(f_type_error, context.error, context.reset, ".");
+ fl_color_print(f_type_error, context.set.error, "INTERNAL ERROR: Invalid parameter when calling ");
+ fl_color_print(f_type_error, context.set.notable, "%s()", function_name);
+ fl_color_print_line(f_type_error, context.set.error, ".");
}
else if (status == F_number) {
- fl_color_print(f_type_error, context.error, context.reset, "ERROR: The argument '");
- fl_color_print(f_type_error, context.notable, context.reset, "%s", argument);
- fl_color_print(f_type_error, context.error, context.reset, "' is not a valid number for the parameter '");
- fl_color_print(f_type_error, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, parameter_name);
- fl_color_print_line(f_type_error, context.error, context.reset, "'.");
+ fl_color_print(f_type_error, context.set.error, "ERROR: The argument '");
+ fl_color_print(f_type_error, context.set.notable, "%s", argument);
+ fl_color_print(f_type_error, context.set.error, "' is not a valid number for the parameter '");
+ fl_color_print(f_type_error, context.set.notable, "%s%s", f_console_symbol_long_enable, parameter_name);
+ fl_color_print_line(f_type_error, context.set.error, "'.");
}
else if (status == F_number_underflow) {
- fl_color_print(f_type_error, context.error, context.reset, "ERROR: The argument '");
- fl_color_print(f_type_error, context.notable, context.reset, "%s", argument);
- fl_color_print(f_type_error, context.error, context.reset, "' is too small for the parameter '");
- fl_color_print(f_type_error, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, parameter_name);
- fl_color_print_line(f_type_error, context.error, context.reset, "'.");
+ fl_color_print(f_type_error, context.set.error, "ERROR: The argument '");
+ fl_color_print(f_type_error, context.set.notable, "%s", argument);
+ fl_color_print(f_type_error, context.set.error, "' is too small for the parameter '");
+ fl_color_print(f_type_error, context.set.notable, "%s%s", f_console_symbol_long_enable, parameter_name);
+ fl_color_print_line(f_type_error, context.set.error, "'.");
}
else if (status == F_number_overflow) {
- fl_color_print(f_type_error, context.error, context.reset, "ERROR: The argument '");
- fl_color_print(f_type_error, context.notable, context.reset, "%s", argument);
- fl_color_print(f_type_error, context.error, context.reset, "' is too large for the parameter '");
- fl_color_print(f_type_error, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, parameter_name);
- fl_color_print_line(f_type_error, context.error, context.reset, "'.");
+ fl_color_print(f_type_error, context.set.error, "ERROR: The argument '");
+ fl_color_print(f_type_error, context.set.notable, "%s", argument);
+ fl_color_print(f_type_error, context.set.error, "' is too large for the parameter '");
+ fl_color_print(f_type_error, context.set.notable, "%s%s", f_console_symbol_long_enable, parameter_name);
+ fl_color_print_line(f_type_error, context.set.error, "'.");
}
else if (status == F_number_negative) {
- fl_color_print(f_type_error, context.error, context.reset, "ERROR: The argument '");
- fl_color_print(f_type_error, context.notable, context.reset, "%s", argument);
- fl_color_print(f_type_error, context.error, context.reset, "' is negative, which is not allowed for the parameter '");
- fl_color_print(f_type_error, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, parameter_name);
- fl_color_print_line(f_type_error, context.error, context.reset, "'.");
+ fl_color_print(f_type_error, context.set.error, "ERROR: The argument '");
+ fl_color_print(f_type_error, context.set.notable, "%s", argument);
+ fl_color_print(f_type_error, context.set.error, "' is negative, which is not allowed for the parameter '");
+ fl_color_print(f_type_error, context.set.notable, "%s%s", f_console_symbol_long_enable, parameter_name);
+ fl_color_print_line(f_type_error, context.set.error, "'.");
}
else if (status == F_number_positive) {
- fl_color_print(f_type_error, context.error, context.reset, "ERROR: The argument '");
- fl_color_print(f_type_error, context.notable, context.reset, "%s", argument);
- fl_color_print(f_type_error, context.error, context.reset, "' contains a '");
- fl_color_print(f_type_error, context.notable, context.reset, "+");
- fl_color_print(f_type_error, context.error, context.reset, "', which is not allowed for the parameter '");
- fl_color_print(f_type_error, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, parameter_name);
- fl_color_print_line(f_type_error, context.error, context.reset, "'.");
+ fl_color_print(f_type_error, context.set.error, "ERROR: The argument '");
+ fl_color_print(f_type_error, context.set.notable, "%s", argument);
+ fl_color_print(f_type_error, context.set.error, "' contains a '");
+ fl_color_print(f_type_error, context.set.notable, "+");
+ fl_color_print(f_type_error, context.set.error, "', which is not allowed for the parameter '");
+ fl_color_print(f_type_error, context.set.notable, "%s%s", f_console_symbol_long_enable, parameter_name);
+ fl_color_print_line(f_type_error, context.set.error, "'.");
}
else if (status == F_data_not) {
- fl_color_print(f_type_error, context.error, context.reset, "ERROR: The parameter '");
- fl_color_print(f_type_error, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, parameter_name);
- fl_color_print_line(f_type_error, context.error, context.reset, "' must not be an empty string.");
+ fl_color_print(f_type_error, context.set.error, "ERROR: The parameter '");
+ fl_color_print(f_type_error, context.set.notable, "%s%s", f_console_symbol_long_enable, parameter_name);
+ fl_color_print_line(f_type_error, context.set.error, "' must not be an empty string.");
}
else {
- fl_color_print(f_type_error, context.error, context.reset, "INTERNAL ERROR: An unhandled error (");
- fl_color_print(f_type_error, context.notable, context.reset, "%llu", status);
- fl_color_print(f_type_error, context.error, context.reset, ") has occurred while calling ");
- fl_color_print(f_type_error, context.notable, context.reset, "%s()", function_name);
- fl_color_print(f_type_error, context.error, context.reset, "' for the parameter '");
- fl_color_print(f_type_error, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, parameter_name);
- fl_color_print(f_type_error, context.error, context.reset, "' with the value '");
- fl_color_print(f_type_error, context.notable, context.reset, "%s", argument);
- fl_color_print_line(f_type_error, context.error, context.reset, "'.");
+ fl_color_print(f_type_error, context.set.error, "INTERNAL ERROR: An unhandled error (");
+ fl_color_print(f_type_error, context.set.notable, "%llu", status);
+ fl_color_print(f_type_error, context.set.error, ") has occurred while calling ");
+ fl_color_print(f_type_error, context.set.notable, "%s()", function_name);
+ fl_color_print(f_type_error, context.set.error, "' for the parameter '");
+ fl_color_print(f_type_error, context.set.notable, "%s%s", f_console_symbol_long_enable, parameter_name);
+ fl_color_print(f_type_error, context.set.error, "' with the value '");
+ fl_color_print(f_type_error, context.set.notable, "%s", argument);
+ fl_color_print_line(f_type_error, context.set.error, "'.");
}
}
#endif // _di_fss_extended_read_print_number_argument_error_
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.");
+ fl_color_print_line(f_type_error, data.context.set.error, "CRITICAL ERROR: Unable to allocate memory.");
return 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.");
+ fl_color_print_line(f_type_error, data.context.set.error, "CRITICAL ERROR: Unable to allocate memory.");
}
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.");
+ fl_color_print(f_type_error, data.context.set.error, "ERROR: Unable to process '");
+ fl_color_print(f_type_error, data.context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_trim);
+ fl_color_print_line(f_type_error, data.context.set.error, "' because the maximum buffer size was reached.");
}
else {
f_string_t function = "fl_string_append";
function = "fl_string_rip";
}
- fl_color_print(f_type_error, data.context.error, data.context.reset, "INTERNAL ERROR: An unhandled error (");
- fl_color_print(f_type_error, data.context.notable, data.context.reset, "%u", status_code);
- fl_color_print(f_type_error, data.context.error, data.context.reset, ") has occurred while calling ");
- fl_color_print(f_type_error, data.context.notable, data.context.reset, "%s()", function);
- fl_color_print_line(f_type_error, data.context.error, data.context.reset, ".");
+ fl_color_print(f_type_error, data.context.set.error, "INTERNAL ERROR: An unhandled error (");
+ fl_color_print(f_type_error, data.context.set.notable, "%u", status_code);
+ fl_color_print(f_type_error, data.context.set.error, ") has occurred while calling ");
+ fl_color_print(f_type_error, data.context.set.notable, "%s()", function);
+ fl_color_print_line(f_type_error, data.context.set.error, ".");
}
return status;
}
if (depths->array[i].value_name.used == 0) {
- fl_color_print(f_type_error, data.context.error, data.context.reset, "ERROR: The '");
- fl_color_print(f_type_error, data.context.notable, data.context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_name);
- fl_color_print_line(f_type_error, data.context.error, data.context.reset, "' must not be an empty string.");
+ fl_color_print(f_type_error, data.context.set.error, "ERROR: The '");
+ fl_color_print(f_type_error, data.context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_name);
+ fl_color_print_line(f_type_error, data.context.set.error, "' must not be an empty string.");
return F_status_set_error(F_parameter);
}
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);
- fl_color_print(f_type_error, data.context.error, data.context.reset, "' may only be specified once for the parameter '");
- fl_color_print(f_type_error, data.context.notable, data.context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_depth);
- fl_color_print_line(f_type_error, data.context.error, data.context.reset, "'.");
+ fl_color_print(f_type_error, data.context.set.error, "ERROR: The value '");
+ fl_color_print(f_type_error, data.context.set.notable, "%llu", depths->array[i].depth);
+ fl_color_print(f_type_error, data.context.set.error, "' may only be specified once for the parameter '");
+ fl_color_print(f_type_error, data.context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_depth);
+ fl_color_print_line(f_type_error, data.context.set.error, "'.");
return F_status_set_error(F_parameter);
}
else if (depths->array[i].depth > depths->array[j].depth) {
- 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, fss_extended_read_long_depth);
- fl_color_print(f_type_error, data.context.error, data.context.reset, "' may not have the value '");
- fl_color_print(f_type_error, data.context.notable, data.context.reset, "%llu", depths->array[i].depth);
- fl_color_print(f_type_error, data.context.error, data.context.reset, "' before the value '");
- fl_color_print(f_type_error, data.context.notable, data.context.reset, "%llu", depths->array[j].depth);
- fl_color_print_line(f_type_error, data.context.error, data.context.reset, "'.");
+ fl_color_print(f_type_error, data.context.set.error, "ERROR: The parameter '");
+ fl_color_print(f_type_error, data.context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_depth);
+ fl_color_print(f_type_error, data.context.set.error, "' may not have the value '");
+ fl_color_print(f_type_error, data.context.set.notable, "%llu", depths->array[i].depth);
+ fl_color_print(f_type_error, data.context.set.error, "' before the value '");
+ fl_color_print(f_type_error, data.context.set.notable, "%llu", depths->array[j].depth);
+ fl_color_print_line(f_type_error, data.context.set.error, "'.");
return F_status_set_error(F_parameter);
}
status = F_status_set_fine(status);
if (status == F_parameter) {
- fl_color_print(f_type_error, data->context.error, data->context.reset, "INTERNAL ERROR: Invalid parameter when calling ");
- fl_color_print(f_type_error, data->context.notable, data->context.reset, "fll_fss_extended_read()");
- fl_color_print(f_type_error, data->context.error, data->context.reset, " for the file '");
- fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s", filename);
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "'.");
+ fl_color_print(f_type_error, data->context.set.error, "INTERNAL ERROR: Invalid parameter when calling ");
+ fl_color_print(f_type_error, data->context.set.notable, "fll_fss_extended_read()");
+ fl_color_print(f_type_error, data->context.set.error, " for the file '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s", filename);
+ fl_color_print_line(f_type_error, data->context.set.error, "'.");
}
else if (status == F_memory_allocation || status == F_memory_reallocation) {
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "CRITICAL ERROR: Unable to allocate memory.");
+ fl_color_print_line(f_type_error, data->context.set.error, "CRITICAL ERROR: Unable to allocate memory.");
}
else if (status == F_incomplete_utf_stop) {
- fl_color_print(f_type_error, data->context.error, data->context.reset, "ENCODING ERROR: Error occurred on invalid UTF-8 character at stop position (at ");
- fl_color_print(f_type_error, data->context.notable, data->context.reset, "%d", input.start);
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, ").");
+ fl_color_print(f_type_error, data->context.set.error, "ENCODING ERROR: Error occurred on invalid UTF-8 character at stop position (at ");
+ fl_color_print(f_type_error, data->context.set.notable, "%d", input.start);
+ fl_color_print_line(f_type_error, data->context.set.error, ").");
}
else if (status == F_incomplete_utf_eos) {
- fl_color_print(f_type_error, data->context.error, data->context.reset, "ENCODING ERROR: Error occurred on invalid UTF-8 character at end of string (at ");
- fl_color_print(f_type_error, data->context.notable, data->context.reset, "%d", input.start);
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, ").");
+ fl_color_print(f_type_error, data->context.set.error, "ENCODING ERROR: Error occurred on invalid UTF-8 character at end of string (at ");
+ fl_color_print(f_type_error, data->context.set.notable, "%d", input.start);
+ fl_color_print_line(f_type_error, data->context.set.error, ").");
}
else {
- fl_color_print(f_type_error, data->context.error, data->context.reset, "INTERNAL ERROR: An unhandled error (");
- fl_color_print(f_type_error, data->context.notable, data->context.reset, "%u", status);
- fl_color_print(f_type_error, data->context.error, data->context.reset, ") has occurred while calling ");
- fl_color_print(f_type_error, data->context.notable, data->context.reset, "fll_fss_extended_read()");
- fl_color_print(f_type_error, data->context.error, data->context.reset, " for the file '");
- fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s", filename);
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "'.");
+ fl_color_print(f_type_error, data->context.set.error, "INTERNAL ERROR: An unhandled error (");
+ fl_color_print(f_type_error, data->context.set.notable, "%u", status);
+ fl_color_print(f_type_error, data->context.set.error, ") has occurred while calling ");
+ fl_color_print(f_type_error, data->context.set.notable, "fll_fss_extended_read()");
+ fl_color_print(f_type_error, data->context.set.error, " for the file '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s", filename);
+ fl_color_print_line(f_type_error, data->context.set.error, "'.");
}
return F_status_set_error(status);
* 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_t context, const f_string_t function_name, const f_string_t file_name, const f_status_t status) f_gcc_attribute_visibility_internal;
+ extern void fss_extended_read_print_file_error(const f_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_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;
+ extern void fss_extended_read_print_number_argument_error(const f_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_
/**
#endif
#ifndef _di_fss_extended_write_print_help_
- f_return_status fss_extended_write_print_help(const fl_color_context_t context) {
+ f_return_status fss_extended_write_print_help(const f_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.");
status = F_status_set_fine(status);
if (status == F_parameter) {
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "INTERNAL ERROR: Invalid parameter when calling f_file_open()");
+ fl_color_print_line(f_type_error, data->context.set.error, "INTERNAL ERROR: Invalid parameter when calling f_file_open()");
}
else if (status == F_file_found_not) {
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "ERROR: Unable to find the file '%s'", "-");
+ fl_color_print_line(f_type_error, data->context.set.error, "ERROR: Unable to find the file '%s'", "-");
}
else if (status == F_file_open) {
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "ERROR: Unable to open the file '%s'", "-");
+ fl_color_print_line(f_type_error, data->context.set.error, "ERROR: Unable to open the file '%s'", "-");
}
else if (status == F_file_descriptor) {
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "ERROR: File descriptor error while trying to open the file '%s'", "-");
+ fl_color_print_line(f_type_error, data->context.set.error, "ERROR: File descriptor error while trying to open the file '%s'", "-");
}
else {
- 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);
+ fl_color_print_line(f_type_error, data->context.set.error, "INTERNAL ERROR: An unhandled error (%u) has occurred while calling f_file_open()", status);
}
f_macro_string_dynamic_t_delete_simple(input);
f_file_close(&output.id);
if (status == F_parameter) {
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "INTERNAL ERROR: Invalid parameter when calling f_file_open()");
+ fl_color_print_line(f_type_error, data->context.set.error, "INTERNAL ERROR: Invalid parameter when calling f_file_open()");
}
else if (status == F_file_found_not) {
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "ERROR: Unable to find the file '%s'", arguments.argv[data->parameters[fss_extended_write_parameter_file].additional.array[0]]);
+ fl_color_print_line(f_type_error, data->context.set.error, "ERROR: Unable to find the file '%s'", arguments.argv[data->parameters[fss_extended_write_parameter_file].additional.array[0]]);
}
else if (status == F_file_open) {
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "ERROR: Unable to open the file '%s'", arguments.argv[data->parameters[fss_extended_write_parameter_file].additional.array[0]]);
+ fl_color_print_line(f_type_error, data->context.set.error, "ERROR: Unable to open the file '%s'", arguments.argv[data->parameters[fss_extended_write_parameter_file].additional.array[0]]);
}
else if (status == F_file_descriptor) {
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "ERROR: File descriptor error while trying to open the file '%s'", arguments.argv[data->parameters[fss_extended_write_parameter_file].additional.array[0]]);
+ fl_color_print_line(f_type_error, data->context.set.error, "ERROR: File descriptor error while trying to open the file '%s'", arguments.argv[data->parameters[fss_extended_write_parameter_file].additional.array[0]]);
}
else {
- 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);
+ fl_color_print_line(f_type_error, data->context.set.error, "INTERNAL ERROR: An unhandled error (%u) has occurred while calling f_file_open()", status);
}
f_macro_string_dynamic_t_delete_simple(buffer);
status = F_status_set_fine(status);
if (status == F_parameter) {
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "INTERNAL ERROR: Invalid parameter when calling f_file_write()");
+ fl_color_print_line(f_type_error, data->context.set.error, "INTERNAL ERROR: Invalid parameter when calling f_file_write()");
}
else if (status == F_file_write) {
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "ERROR: Unable to write to the file '%s'", arguments.argv[data->parameters[fss_extended_write_parameter_file].additional.array[0]]);
+ fl_color_print_line(f_type_error, data->context.set.error, "ERROR: Unable to write to the file '%s'", arguments.argv[data->parameters[fss_extended_write_parameter_file].additional.array[0]]);
}
else {
- 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);
+ fl_color_print_line(f_type_error, data->context.set.error, "INTERNAL ERROR: An unhandled error (%u) has occurred while calling f_file_write()", status);
}
f_macro_string_dynamic_t_delete_simple(buffer);
} // for
f_macro_string_lengths_t_delete_simple(data->remaining);
- fl_macro_color_context_t_delete_simple(data->context);
+ f_macro_color_context_t_delete_simple(data->context);
return F_none;
}
f_string_lengths_t remaining;
bool process_pipe;
- fl_color_context_t context;
+ f_color_context_t context;
} fss_extended_write_data_t;
#define fss_extended_write_data_t_initialize \
fss_extended_write_console_parameter_t_initialize, \
f_string_lengths_t_initialize, \
F_false, \
- fl_color_context_t_initialize, \
+ f_color_context_t_initialize, \
}
#endif // _di_fss_extended_write_data_t_
* F_none on success.
*/
#ifndef _di_fss_extended_write_print_help_
- extern f_return_status fss_extended_write_print_help(const fl_color_context_t context);
+ extern f_return_status fss_extended_write_print_help(const f_color_context_t context);
#endif // _di_fss_extended_write_print_help_
/**
#endif
#ifndef _di_fss_status_code_print_help_
- f_return_status fss_status_code_print_help(const fl_color_context_t context) {
+ f_return_status fss_status_code_print_help(const f_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.");
if (data->parameters[fss_status_code_parameter_is_error].result == f_console_result_found) {
if (data->parameters[fss_status_code_parameter_is_warning].result == f_console_result_found) {
- 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, fss_status_code_long_is_error);
- fl_color_print(f_type_error, data->context.error, data->context.reset, "' cannot be used with the parameter ");
- fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_status_code_long_is_warning);
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, ".");
+ fl_color_print(f_type_error, data->context.set.error, "ERROR: The parameter '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_status_code_long_is_error);
+ fl_color_print(f_type_error, data->context.set.error, "' cannot be used with the parameter ");
+ fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_status_code_long_is_warning);
+ fl_color_print_line(f_type_error, data->context.set.error, ".");
fss_status_code_delete_data(data);
return F_status_set_error(status);
}
else if (data->parameters[fss_status_code_parameter_is_fine].result == f_console_result_found) {
- 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, fss_status_code_long_is_error);
- fl_color_print(f_type_error, data->context.error, data->context.reset, "' cannot be used with the parameter ");
- fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_status_code_long_is_fine);
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, ".");
+ fl_color_print(f_type_error, data->context.set.error, "ERROR: The parameter '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_status_code_long_is_error);
+ fl_color_print(f_type_error, data->context.set.error, "' cannot be used with the parameter ");
+ fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_status_code_long_is_fine);
+ fl_color_print_line(f_type_error, data->context.set.error, ".");
fss_status_code_delete_data(data);
return F_status_set_error(status);
}
}
else if (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) {
- 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, fss_status_code_long_is_warning);
- fl_color_print(f_type_error, data->context.error, data->context.reset, "' cannot be used with the parameter ");
- fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_status_code_long_is_fine);
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, ".");
+ fl_color_print(f_type_error, data->context.set.error, "ERROR: The parameter '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_status_code_long_is_warning);
+ fl_color_print(f_type_error, data->context.set.error, "' cannot be used with the parameter ");
+ fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_status_code_long_is_fine);
+ fl_color_print_line(f_type_error, data->context.set.error, ".");
fss_status_code_delete_data(data);
return F_status_set_error(status);
}
if (data->remaining.used == 0 && !data->process_pipe) {
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "ERROR: You failed to specify an error code.");
+ fl_color_print_line(f_type_error, data->context.set.error, "ERROR: You failed to specify an error code.");
fss_status_code_delete_data(data);
return F_status_set_error(F_parameter);
} // while
f_macro_string_lengths_t_delete_simple(data->remaining);
- fl_macro_color_context_t_delete_simple(data->context);
+ f_macro_color_context_t_delete_simple(data->context);
return F_none;
}
f_string_lengths_t remaining;
bool process_pipe;
- fl_color_context_t context;
+ f_color_context_t context;
} fss_status_code_data_t;
#define fss_status_code_data_t_initialize \
fss_status_code_console_parameter_t_initialize, \
f_string_lengths_t_initialize, \
F_false, \
- fl_color_context_t_initialize, \
+ f_color_context_t_initialize, \
}
#endif // _di_fss_status_code_data_t_
* F_none on success.
*/
#ifndef _di_fss_status_code_print_help_
- extern f_return_status fss_status_code_print_help(const fl_color_context_t context);
+ extern f_return_status fss_status_code_print_help(const f_color_context_t context);
#endif // _di_fss_status_code_print_help_
/**
status = fl_conversion_string_to_number_unsigned(value, &number, range);
if (status == F_none) {
- fl_color_print_line(f_type_output, data.context.error, data.context.reset, "invalid name");
+ fl_color_print_line(f_type_output, data.context.set.error, "invalid name");
return F_status_set_error(F_parameter);
}
if (status == F_data_not || F_status_set_fine(status) == F_parameter) {
- fl_color_print_line(f_type_output, data.context.error, data.context.reset, "invalid data");
+ fl_color_print_line(f_type_output, data.context.set.error, "invalid data");
return status;
}
if (F_status_is_error(status)) {
if (F_status_set_fine(status) == F_data) {
- fl_color_print_line(f_type_output, data.context.error, data.context.reset, "unknown name");
+ fl_color_print_line(f_type_output, data.context.set.error, "unknown name");
}
else {
- fl_color_print_line(f_type_output, data.context.error, data.context.reset, "failed to convert");
+ fl_color_print_line(f_type_output, data.context.set.error, "failed to convert");
}
return status;
}
if (status == F_data) {
- fl_color_print_line(f_type_output, data.context.warning, data.context.reset, "unknown code");
+ fl_color_print_line(f_type_output, data.context.set.warning, "unknown code");
return F_none;
}
if (F_status_is_error(status)) {
if (F_status_set_fine(status) == F_data) {
- fl_color_print_line(f_type_output, data.context.error, data.context.reset, "unknown code");
+ fl_color_print_line(f_type_output, data.context.set.error, "unknown code");
}
else {
- fl_color_print_line(f_type_output, data.context.error, data.context.reset, "failed to convert");
+ fl_color_print_line(f_type_output, data.context.set.error, "failed to convert");
}
return status;
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");
+ fl_color_print_line(f_type_output, data.context.set.error, "out of range");
return status;
}
if (F_status_is_error(status)) {
if (F_status_set_fine(status) == F_number_negative) {
- fl_color_print_line(f_type_output, data.context.error, data.context.reset, "out of range");
+ fl_color_print_line(f_type_output, data.context.set.error, "out of range");
}
else {
- fl_color_print_line(f_type_output, data.context.error, data.context.reset, "invalid number");
+ fl_color_print_line(f_type_output, data.context.set.error, "invalid number");
}
return status;
* F_number_overflow (with error bit) on integer overflow.
* F_incomplete_utf (with error bit) if an incomplete UTF-8 fragment is found.
*
- * Errors from (with error bit): fss_status_code_convert_number().
+ * Errors (with error bit) from: fss_status_code_convert_number().
*
* @see fss_status_code_convert_number()
*/
* F_none on success.
* F_data_not if string is empty.
*
- * Errors from (with error bit): fl_console_parameter_to_number_unsigned().
- * Errors from (with error bit): fll_fss_status_from_string().
+ * Errors (with error bit) from: fl_console_parameter_to_number_unsigned().
+ * Errors (with error bit) from: fll_fss_status_from_string().
*
* @see fl_console_parameter_to_number_unsigned()
* @see fll_fss_status_from_string()
* F_number_overflow (with error bit) on integer overflow.
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors from (with error bit): fll_fss_status_from_string().
- * Errors from (with error bit): fss_status_code_convert_number().
+ * Errors (with error bit) from: fll_fss_status_from_string().
+ * Errors (with error bit) from: fss_status_code_convert_number().
*
* @see fll_fss_status_from_string()
* @see fss_status_code_convert_number()
* F_number_overflow (with error bit) on integer overflow.
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors from (with error bit): fl_console_parameter_to_number_unsigned().
+ * Errors (with error bit) from: fl_console_parameter_to_number_unsigned().
*
* @see fl_console_parameter_to_number_unsigned()
*/
#endif
#ifndef _di_iki_read_print_help_
- f_return_status iki_read_print_help(const fl_color_context_t context) {
+ f_return_status iki_read_print_help(const f_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.");
fll_program_print_help_usage(context, iki_read_name, "filename(s)");
- fl_color_print(f_type_output, context.important, context.reset, " Notes:");
+ fl_color_print(f_type_output, context.set.important, " Notes:");
printf("%c", f_string_eol[0], f_string_eol[0]);
printf("%c", f_string_eol[0]);
printf(" The ");
- fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, iki_read_long_substitute);
+ fl_color_print(f_type_output, context.set.notable, "%s%s", f_console_symbol_long_enable, iki_read_long_substitute);
printf(" option, requires 3 additional parameters: ");
- fl_color_print(f_type_output, context.notable, context.reset, "<");
+ fl_color_print(f_type_output, context.set.notable, "<");
printf("%s", iki_read_substitution_vocabulary);
- fl_color_print(f_type_output, context.notable, context.reset, ">");
+ fl_color_print(f_type_output, context.set.notable, ">");
printf(" ");
- fl_color_print(f_type_output, context.notable, context.reset, "<");
+ fl_color_print(f_type_output, context.set.notable, "<");
printf("%s", iki_read_substitution_replace);
- fl_color_print(f_type_output, context.notable, context.reset, ">");
+ fl_color_print(f_type_output, context.set.notable, ">");
printf(" ");
- fl_color_print(f_type_output, context.notable, context.reset, "<");
+ fl_color_print(f_type_output, context.set.notable, "<");
printf("%s", iki_read_substitution_with);
- fl_color_print(f_type_output, context.notable, context.reset, ">");
+ fl_color_print(f_type_output, context.set.notable, ">");
printf(".%c", f_string_eol[0]);
- fl_color_print(f_type_output, context.notable, context.reset, " %s", iki_read_substitution_vocabulary);
+ fl_color_print(f_type_output, context.set.notable, " %s", iki_read_substitution_vocabulary);
printf(": The name of the vocabulary whose content is to be substituted.%c", f_string_eol[0]);
- fl_color_print(f_type_output, context.notable, context.reset, " %s", iki_read_substitution_replace);
+ fl_color_print(f_type_output, context.set.notable, " %s", iki_read_substitution_replace);
printf(": The content matching this exact string will be substituted.%c", f_string_eol[0]);
- fl_color_print(f_type_output, context.notable, context.reset, " %s", iki_read_substitution_with);
+ fl_color_print(f_type_output, context.set.notable, " %s", iki_read_substitution_with);
printf(": The new string to use as the substitute.%c", f_string_eol[0]);
printf("%c", f_string_eol[0]);
if (data->parameters[iki_read_parameter_verbose].result == f_console_result_found) {
if (data->parameters[iki_read_parameter_quiet].result == f_console_result_found) {
fprintf(f_type_error, "%c", f_string_eol[0]);
- fl_color_print(f_type_error, data->context.error, data->context.reset, "ERROR: Cannot specify the '");
- fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, f_console_standard_long_verbose);
- fl_color_print(f_type_error, data->context.error, data->context.reset, "' parameter with the '");
- fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, f_console_standard_long_quiet);
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "' parameter.");
+ fl_color_print(f_type_error, data->context.set.error, "ERROR: Cannot specify the '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, f_console_standard_long_verbose);
+ fl_color_print(f_type_error, data->context.set.error, "' parameter with the '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, f_console_standard_long_quiet);
+ fl_color_print_line(f_type_error, data->context.set.error, "' parameter.");
status = F_status_set_error(F_parameter);
}
if (data->parameters[iki_read_parameter_at].result == f_console_result_found) {
if (data->verbosity != iki_read_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 parameter '");
- fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, iki_read_long_at);
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "' requires a positive number.");
+ fl_color_print(f_type_error, data->context.set.error, "ERROR: The parameter '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, iki_read_long_at);
+ fl_color_print_line(f_type_error, data->context.set.error, "' requires a positive number.");
}
status = F_status_set_error(F_parameter);
if (data->parameters[iki_read_parameter_total].result == f_console_result_found) {
if (data->verbosity != iki_read_verbosity_quiet) {
fprintf(f_type_error, "%c", f_string_eol[0]);
- fl_color_print(f_type_error, data->context.error, data->context.reset, "ERROR: Cannot specify the '");
- fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, iki_read_long_at);
- fl_color_print(f_type_error, data->context.error, data->context.reset, "' parameter with the '");
- fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, iki_read_long_total);
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "' parameter.");
+ fl_color_print(f_type_error, data->context.set.error, "ERROR: Cannot specify the '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, iki_read_long_at);
+ fl_color_print(f_type_error, data->context.set.error, "' parameter with the '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, iki_read_long_total);
+ fl_color_print_line(f_type_error, data->context.set.error, "' parameter.");
}
status = F_status_set_error(F_parameter);
if (data->parameters[iki_read_parameter_line].result == f_console_result_found) {
if (data->verbosity != iki_read_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 parameter '");
- fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, iki_read_long_line);
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "' requires a positive number.");
+ fl_color_print(f_type_error, data->context.set.error, "ERROR: The parameter '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, iki_read_long_line);
+ fl_color_print_line(f_type_error, data->context.set.error, "' requires a positive number.");
}
status = F_status_set_error(F_parameter);
if (data->parameters[iki_read_parameter_name].result == f_console_result_found) {
if (data->verbosity != iki_read_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 parameter '");
- fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, iki_read_long_name);
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "' requires a string.");
+ fl_color_print(f_type_error, data->context.set.error, "ERROR: The parameter '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, iki_read_long_name);
+ fl_color_print_line(f_type_error, data->context.set.error, "' requires a string.");
}
status = F_status_set_error(F_parameter);
if (data->parameters[iki_read_parameter_substitute].result == f_console_result_found || data->parameters[iki_read_parameter_substitute].additional.used % 3 != 0) {
if (data->verbosity != iki_read_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 parameter '");
- fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, iki_read_long_substitute);
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "' requires 3 strings.");
+ fl_color_print(f_type_error, data->context.set.error, "ERROR: The parameter '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, iki_read_long_substitute);
+ fl_color_print_line(f_type_error, data->context.set.error, "' requires 3 strings.");
}
status = F_status_set_error(F_parameter);
if (data->parameters[iki_read_parameter_total].result == f_console_result_found) {
if (data->verbosity != iki_read_verbosity_quiet) {
fprintf(f_type_error, "%c", f_string_eol[0]);
- fl_color_print(f_type_error, data->context.error, data->context.reset, "ERROR: Cannot specify the '");
- fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, iki_read_long_substitute);
- fl_color_print(f_type_error, data->context.error, data->context.reset, "' parameter with the '");
- fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, iki_read_long_total);
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "' parameter.");
+ fl_color_print(f_type_error, data->context.set.error, "ERROR: Cannot specify the '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, iki_read_long_substitute);
+ fl_color_print(f_type_error, data->context.set.error, "' parameter with the '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, iki_read_long_total);
+ fl_color_print_line(f_type_error, data->context.set.error, "' parameter.");
}
status = F_status_set_error(F_parameter);
if (data->parameters[iki_read_parameter_object].result == f_console_result_found) {
if (data->verbosity != iki_read_verbosity_quiet) {
fprintf(f_type_error, "%c", f_string_eol[0]);
- fl_color_print(f_type_error, data->context.error, data->context.reset, "ERROR: Cannot specify the '");
- fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, iki_read_long_literal);
- fl_color_print(f_type_error, data->context.error, data->context.reset, "' parameter with the '");
- fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, iki_read_long_object);
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "' parameter.");
+ fl_color_print(f_type_error, data->context.set.error, "ERROR: Cannot specify the '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, iki_read_long_literal);
+ fl_color_print(f_type_error, data->context.set.error, "' parameter with the '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, iki_read_long_object);
+ fl_color_print_line(f_type_error, data->context.set.error, "' parameter.");
}
status = F_status_set_error(F_parameter);
if (data->parameters[iki_read_parameter_content].result == f_console_result_found) {
if (data->verbosity != iki_read_verbosity_quiet) {
fprintf(f_type_error, "%c", f_string_eol[0]);
- fl_color_print(f_type_error, data->context.error, data->context.reset, "ERROR: Cannot specify the '");
- fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, iki_read_long_literal);
- fl_color_print(f_type_error, data->context.error, data->context.reset, "' parameter with the '");
- fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, iki_read_long_content);
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "' parameter.");
+ fl_color_print(f_type_error, data->context.set.error, "ERROR: Cannot specify the '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, iki_read_long_literal);
+ fl_color_print(f_type_error, data->context.set.error, "' parameter with the '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, iki_read_long_content);
+ fl_color_print_line(f_type_error, data->context.set.error, "' parameter.");
}
status = F_status_set_error(F_parameter);
if (data->parameters[iki_read_parameter_total].result == f_console_result_found) {
if (data->verbosity != iki_read_verbosity_quiet) {
fprintf(f_type_error, "%c", f_string_eol[0]);
- fl_color_print(f_type_error, data->context.error, data->context.reset, "ERROR: Cannot specify the '");
- fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, iki_read_long_literal);
- fl_color_print(f_type_error, data->context.error, data->context.reset, "' parameter with the '");
- fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, iki_read_long_total);
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "' parameter.");
+ fl_color_print(f_type_error, data->context.set.error, "ERROR: Cannot specify the '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, iki_read_long_literal);
+ fl_color_print(f_type_error, data->context.set.error, "' parameter with the '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, iki_read_long_total);
+ fl_color_print_line(f_type_error, data->context.set.error, "' parameter.");
}
status = F_status_set_error(F_parameter);
if (data->parameters[iki_read_parameter_content].result == f_console_result_found) {
if (data->verbosity != iki_read_verbosity_quiet) {
fprintf(f_type_error, "%c", f_string_eol[0]);
- fl_color_print(f_type_error, data->context.error, data->context.reset, "ERROR: Cannot specify the '");
- fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, iki_read_long_object);
- fl_color_print(f_type_error, data->context.error, data->context.reset, "' parameter with the '");
- fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, iki_read_long_content);
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "' parameter.");
+ fl_color_print(f_type_error, data->context.set.error, "ERROR: Cannot specify the '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, iki_read_long_object);
+ fl_color_print(f_type_error, data->context.set.error, "' parameter with the '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, iki_read_long_content);
+ fl_color_print_line(f_type_error, data->context.set.error, "' parameter.");
}
status = F_status_set_error(F_parameter);
if (data->parameters[iki_read_parameter_total].result == f_console_result_found) {
if (data->verbosity != iki_read_verbosity_quiet) {
fprintf(f_type_error, "%c", f_string_eol[0]);
- fl_color_print(f_type_error, data->context.error, data->context.reset, "ERROR: Cannot specify the '");
- fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, iki_read_long_object);
- fl_color_print(f_type_error, data->context.error, data->context.reset, "' parameter with the '");
- fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, iki_read_long_total);
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "' parameter.");
+ fl_color_print(f_type_error, data->context.set.error, "ERROR: Cannot specify the '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, iki_read_long_object);
+ fl_color_print(f_type_error, data->context.set.error, "' parameter with the '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, iki_read_long_total);
+ fl_color_print_line(f_type_error, data->context.set.error, "' parameter.");
}
status = F_status_set_error(F_parameter);
if (data->parameters[iki_read_parameter_total].result == f_console_result_found) {
if (data->verbosity != iki_read_verbosity_quiet) {
fprintf(f_type_error, "%c", f_string_eol[0]);
- fl_color_print(f_type_error, data->context.error, data->context.reset, "ERROR: Cannot specify the '");
- fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, iki_read_long_whole);
- fl_color_print(f_type_error, data->context.error, data->context.reset, "' parameter with the '");
- fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, iki_read_long_total);
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "' parameter.");
+ fl_color_print(f_type_error, data->context.set.error, "ERROR: Cannot specify the '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, iki_read_long_whole);
+ fl_color_print(f_type_error, data->context.set.error, "' parameter with the '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, iki_read_long_total);
+ fl_color_print_line(f_type_error, data->context.set.error, "' parameter.");
}
status = F_status_set_error(F_parameter);
else {
if (data->verbosity != iki_read_verbosity_quiet) {
fprintf(f_type_error, "%c", f_string_eol[0]);
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "ERROR: you failed to specify one or more files.");
+ fl_color_print_line(f_type_error, data->context.set.error, "ERROR: you failed to specify one or more files.");
}
status = F_status_set_error(F_parameter);
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);
+ f_macro_color_context_t_delete_simple(data->context);
return F_none;
}
iki_read_substitutions_t replacements;
- fl_color_context_t context;
+ f_color_context_t context;
} iki_read_data_t;
#define iki_read_data_t_initialize \
0, \
f_string_dynamic_t_initialize, \
iki_read_substitutions_t_initialize, \
- fl_color_context_t_initialize, \
+ f_color_context_t_initialize, \
}
#endif // _di_iki_read_data_t_
* F_none on success.
*/
#ifndef _di_iki_read_print_help_
- extern f_return_status iki_read_print_help(const fl_color_context_t context);
+ extern f_return_status iki_read_print_help(const f_color_context_t context);
#endif // _di_iki_read_print_help_
/**
#endif
#ifndef _di_iki_read_print_error_
- 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_return_status iki_read_print_error(const f_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) {
fprintf(f_type_error, "%c", f_string_eol[0]);
- fl_color_print(f_type_error, context.error, context.reset, "ERROR: Invalid parameter when calling function ");
- fl_color_print(f_type_error, context.notable, context.reset, "%s", function);
- fl_color_print_line(f_type_error, context.error, context.reset, "().");
+ fl_color_print(f_type_error, context.set.error, "ERROR: Invalid parameter when calling function ");
+ fl_color_print(f_type_error, context.set.notable, "%s", function);
+ fl_color_print_line(f_type_error, context.set.error, "().");
}
return F_none;
if (status == F_memory_allocation || status == F_memory_reallocation) {
if (verbosity != iki_read_verbosity_quiet) {
fprintf(f_type_error, "%c", f_string_eol[0]);
- fl_color_print(f_type_error, context.error, context.reset, "ERROR: Unable to allocate memory in function ");
- fl_color_print(f_type_error, context.notable, context.reset, "%s", function);
- fl_color_print_line(f_type_error, context.error, context.reset, "().");
+ fl_color_print(f_type_error, context.set.error, "ERROR: Unable to allocate memory in function ");
+ fl_color_print(f_type_error, context.set.notable, "%s", function);
+ fl_color_print_line(f_type_error, context.set.error, "().");
}
return F_none;
if (status == F_buffer_too_large) {
if (verbosity != iki_read_verbosity_quiet) {
fprintf(f_type_error, "%c", f_string_eol[0]);
- fl_color_print(f_type_error, context.error, context.reset, "ERROR: Maximum buffer limit reached while processing ");
- fl_color_print(f_type_error, context.notable, context.reset, "%s", function);
- fl_color_print_line(f_type_error, context.error, context.reset, "().");
+ fl_color_print(f_type_error, context.set.error, "ERROR: Maximum buffer limit reached while processing ");
+ fl_color_print(f_type_error, context.set.notable, "%s", function);
+ fl_color_print_line(f_type_error, context.set.error, "().");
}
return F_none;
if (status == F_string_too_large) {
if (verbosity != iki_read_verbosity_quiet) {
fprintf(f_type_error, "%c", f_string_eol[0]);
- fl_color_print(f_type_error, context.error, context.reset, "ERROR: Maximum string limit reached while processing ");
- fl_color_print(f_type_error, context.notable, context.reset, "%s", function);
- fl_color_print_line(f_type_error, context.error, context.reset, "().");
+ fl_color_print(f_type_error, context.set.error, "ERROR: Maximum string limit reached while processing ");
+ fl_color_print(f_type_error, context.set.notable, "%s", function);
+ fl_color_print_line(f_type_error, context.set.error, "().");
}
return F_none;
if (fallback && verbosity != iki_read_verbosity_quiet) {
fprintf(f_type_error, "%c", f_string_eol[0]);
- fl_color_print(f_type_error, context.error, context.reset, "UNKNOWN ERROR: (");
- fl_color_print(f_type_error, context.notable, context.reset, "%llu", status);
- fl_color_print(f_type_error, context.error, context.reset, ") in function ");
- fl_color_print(f_type_error, context.notable, context.reset, "%s", function);
- fl_color_print_line(f_type_error, context.error, context.reset, "().");
+ fl_color_print(f_type_error, context.set.error, "UNKNOWN ERROR: (");
+ fl_color_print(f_type_error, context.set.notable, "%llu", status);
+ fl_color_print(f_type_error, context.set.error, ") in function ");
+ fl_color_print(f_type_error, context.set.notable, "%s", function);
+ fl_color_print_line(f_type_error, context.set.error, "().");
}
return F_unknown;
#endif // _di_iki_read_print_error_
#ifndef _di_iki_read_print_error_file_
- 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) {
+ bool iki_read_print_error_file(const f_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) {
fprintf(f_type_error, "%c", f_string_eol[0]);
- fl_color_print(f_type_error, context.error, context.reset, "ERROR: Failed to find %s '", file_or_directory);
- fl_color_print(f_type_error, context.notable, context.reset, "%s", name);
- fl_color_print_line(f_type_error, context.error, context.reset, "'.");
+ fl_color_print(f_type_error, context.set.error, "ERROR: Failed to find %s '", file_or_directory);
+ fl_color_print(f_type_error, context.set.notable, "%s", name);
+ fl_color_print_line(f_type_error, context.set.error, "'.");
}
return F_false;
if (status == F_file_found) {
if (verbosity != iki_read_verbosity_quiet) {
fprintf(f_type_error, "%c", f_string_eol[0]);
- fl_color_print(f_type_error, context.error, context.reset, "ERROR: The %s '", file_or_directory);
- fl_color_print(f_type_error, context.notable, context.reset, "%s", name);
- fl_color_print_line(f_type_error, context.error, context.reset, "' already exists.");
+ fl_color_print(f_type_error, context.set.error, "ERROR: The %s '", file_or_directory);
+ fl_color_print(f_type_error, context.set.notable, "%s", name);
+ fl_color_print_line(f_type_error, context.set.error, "' already exists.");
}
return F_false;
if (status == F_parameter) {
if (verbosity != iki_read_verbosity_quiet) {
fprintf(f_type_error, "%c", f_string_eol[0]);
- fl_color_print(f_type_error, context.error, context.reset, "INTERNAL ERROR: Invalid parameter when calling ");
- fl_color_print(f_type_error, context.notable, context.reset, "%s", function);
- fl_color_print(f_type_error, context.error, context.reset, "() for the %s '", file_or_directory);
- fl_color_print(f_type_error, context.notable, context.reset, "%s", name);
- fl_color_print_line(f_type_error, context.error, context.reset, "'.");
+ fl_color_print(f_type_error, context.set.error, "INTERNAL ERROR: Invalid parameter when calling ");
+ fl_color_print(f_type_error, context.set.notable, "%s", function);
+ fl_color_print(f_type_error, context.set.error, "() for the %s '", file_or_directory);
+ fl_color_print(f_type_error, context.set.notable, "%s", name);
+ fl_color_print_line(f_type_error, context.set.error, "'.");
}
return F_false;
if (status == F_name) {
if (verbosity != iki_read_verbosity_quiet) {
fprintf(f_type_error, "%c", f_string_eol[0]);
- fl_color_print(f_type_error, context.error, context.reset, "ERROR: Invalid %s name '", file_or_directory);
- fl_color_print(f_type_error, context.notable, context.reset, "%s", name);
- fl_color_print_line(f_type_error, context.error, context.reset, "'.");
+ fl_color_print(f_type_error, context.set.error, "ERROR: Invalid %s name '", file_or_directory);
+ fl_color_print(f_type_error, context.set.notable, "%s", name);
+ fl_color_print_line(f_type_error, context.set.error, "'.");
}
return F_false;
if (status == F_memory_out) {
if (verbosity != iki_read_verbosity_quiet) {
fprintf(f_type_error, "%c", f_string_eol[0]);
- fl_color_print(f_type_error, context.error, context.reset, "CRITICAL ERROR: Unable to allocate memory, while trying to %s %s '", operation, file_or_directory);
- fl_color_print(f_type_error, context.notable, context.reset, "%s", name);
- fl_color_print_line(f_type_error, context.error, context.reset, "'.");
+ fl_color_print(f_type_error, context.set.error, "CRITICAL ERROR: Unable to allocate memory, while trying to %s %s '", operation, file_or_directory);
+ fl_color_print(f_type_error, context.set.notable, "%s", name);
+ fl_color_print_line(f_type_error, context.set.error, "'.");
}
return F_false;
if (status == F_number_overflow) {
if (verbosity != iki_read_verbosity_quiet) {
fprintf(f_type_error, "%c", f_string_eol[0]);
- fl_color_print(f_type_error, context.error, context.reset, "ERROR: Overflow while trying to %s %s '", operation, file_or_directory);
- fl_color_print(f_type_error, context.notable, context.reset, "%s", name);
- fl_color_print_line(f_type_error, context.error, context.reset, "'.");
+ fl_color_print(f_type_error, context.set.error, "ERROR: Overflow while trying to %s %s '", operation, file_or_directory);
+ fl_color_print(f_type_error, context.set.notable, "%s", name);
+ fl_color_print_line(f_type_error, context.set.error, "'.");
}
return F_false;
if (status == F_directory) {
if (verbosity != iki_read_verbosity_quiet) {
fprintf(f_type_error, "%c", f_string_eol[0]);
- fl_color_print(f_type_error, context.error, context.reset, "ERROR: Invalid directory while trying to %s %s '", operation, file_or_directory);
- fl_color_print(f_type_error, context.notable, context.reset, "%s", name);
- fl_color_print_line(f_type_error, context.error, context.reset, "'.");
+ fl_color_print(f_type_error, context.set.error, "ERROR: Invalid directory while trying to %s %s '", operation, file_or_directory);
+ fl_color_print(f_type_error, context.set.notable, "%s", name);
+ fl_color_print_line(f_type_error, context.set.error, "'.");
}
return F_false;
if (status == F_access_denied) {
if (verbosity != iki_read_verbosity_quiet) {
fprintf(f_type_error, "%c", f_string_eol[0]);
- fl_color_print(f_type_error, context.error, context.reset, "ERROR: Access denied while trying to %s %s '", operation, file_or_directory);
- fl_color_print(f_type_error, context.notable, context.reset, "%s", name);
- fl_color_print_line(f_type_error, context.error, context.reset, "'.");
+ fl_color_print(f_type_error, context.set.error, "ERROR: Access denied while trying to %s %s '", operation, file_or_directory);
+ fl_color_print(f_type_error, context.set.notable, "%s", name);
+ fl_color_print_line(f_type_error, context.set.error, "'.");
}
return F_false;
if (status == F_loop) {
if (verbosity != iki_read_verbosity_quiet) {
fprintf(f_type_error, "%c", f_string_eol[0]);
- fl_color_print(f_type_error, context.error, context.reset, "ERROR: Loop while trying to %s %s '", operation, file_or_directory);
- fl_color_print(f_type_error, context.notable, context.reset, "%s", name);
- fl_color_print_line(f_type_error, context.error, context.reset, "'.");
+ fl_color_print(f_type_error, context.set.error, "ERROR: Loop while trying to %s %s '", operation, file_or_directory);
+ fl_color_print(f_type_error, context.set.notable, "%s", name);
+ fl_color_print_line(f_type_error, context.set.error, "'.");
}
return F_false;
if (status == F_prohibited) {
if (verbosity != iki_read_verbosity_quiet) {
fprintf(f_type_error, "%c", f_string_eol[0]);
- fl_color_print(f_type_error, context.error, context.reset, "ERROR: Prohibited by system while trying to %s %s '", operation, file_or_directory);
- fl_color_print(f_type_error, context.notable, context.reset, "%s", name);
- fl_color_print_line(f_type_error, context.error, context.reset, "'.");
+ fl_color_print(f_type_error, context.set.error, "ERROR: Prohibited by system while trying to %s %s '", operation, file_or_directory);
+ fl_color_print(f_type_error, context.set.notable, "%s", name);
+ fl_color_print_line(f_type_error, context.set.error, "'.");
}
return F_false;
if (status == F_directory_found_not) {
if (verbosity != iki_read_verbosity_quiet) {
fprintf(f_type_error, "%c", f_string_eol[0]);
- fl_color_print(f_type_error, context.error, context.reset, "ERROR: Failed to %s %s '", operation, file_or_directory);
- fl_color_print(f_type_error, context.notable, context.reset, "%s", name);
- fl_color_print_line(f_type_error, context.error, context.reset, "' due to an invalid directory in the path.");
+ fl_color_print(f_type_error, context.set.error, "ERROR: Failed to %s %s '", operation, file_or_directory);
+ fl_color_print(f_type_error, context.set.notable, "%s", name);
+ fl_color_print_line(f_type_error, context.set.error, "' due to an invalid directory in the path.");
}
return F_false;
if (status == F_directory_found_not) {
if (verbosity != iki_read_verbosity_quiet) {
fprintf(f_type_error, "%c", f_string_eol[0]);
- fl_color_print(f_type_error, context.error, context.reset, "ERROR: Failed to %s %s '", operation, file_or_directory);
- fl_color_print(f_type_error, context.notable, context.reset, "%s", name);
- fl_color_print_line(f_type_error, context.error, context.reset, "' due to an invalid directory in the path.");
+ fl_color_print(f_type_error, context.set.error, "ERROR: Failed to %s %s '", operation, file_or_directory);
+ fl_color_print(f_type_error, context.set.notable, "%s", name);
+ fl_color_print_line(f_type_error, context.set.error, "' due to an invalid directory in the path.");
}
return F_false;
if (status == F_failure) {
if (verbosity != iki_read_verbosity_quiet) {
fprintf(f_type_error, "%c", f_string_eol[0]);
- fl_color_print(f_type_error, context.error, context.reset, "ERROR: Failed to %s %s '", operation, file_or_directory);
- fl_color_print(f_type_error, context.notable, context.reset, "%s", name);
- fl_color_print_line(f_type_error, context.error, context.reset, "'.");
+ fl_color_print(f_type_error, context.set.error, "ERROR: Failed to %s %s '", operation, file_or_directory);
+ fl_color_print(f_type_error, context.set.notable, "%s", name);
+ fl_color_print_line(f_type_error, context.set.error, "'.");
}
return F_false;
if (iki_read_print_error(context, verbosity, status, function, F_false) == F_unknown && fallback && verbosity != iki_read_verbosity_quiet) {
fprintf(f_type_error, "%c", f_string_eol[0]);
- fl_color_print(f_type_error, context.error, context.reset, "UNKNOWN ERROR: (");
- fl_color_print(f_type_error, context.notable, context.reset, "%llu", status);
- fl_color_print(f_type_error, context.error, context.reset, ") occurred while trying to %s %s '", operation, file_or_directory);
- fl_color_print(f_type_error, context.notable, context.reset, "%s", name);
- fl_color_print_line(f_type_error, context.error, context.reset, "'.");
+ fl_color_print(f_type_error, context.set.error, "UNKNOWN ERROR: (");
+ fl_color_print(f_type_error, context.set.notable, "%llu", status);
+ fl_color_print(f_type_error, context.set.error, ") occurred while trying to %s %s '", operation, file_or_directory);
+ fl_color_print(f_type_error, context.set.notable, "%s", name);
+ fl_color_print_line(f_type_error, context.set.error, "'.");
}
return F_true;
#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_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) {
+ void iki_read_print_error_number_argument(const f_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]);
if (status == F_parameter) {
- fl_color_print(f_type_error, context.error, context.reset, "INTERNAL ERROR: Invalid parameter when calling ");
- fl_color_print(f_type_error, context.notable, context.reset, "%s()", function);
- fl_color_print_line(f_type_error, context.error, context.reset, ".");
+ fl_color_print(f_type_error, context.set.error, "INTERNAL ERROR: Invalid parameter when calling ");
+ fl_color_print(f_type_error, context.set.notable, "%s()", function);
+ fl_color_print_line(f_type_error, context.set.error, ".");
}
else if (status == F_number) {
- fl_color_print(f_type_error, context.error, context.reset, "ERROR: The argument '");
- fl_color_print(f_type_error, context.notable, context.reset, "%s", argument);
- fl_color_print(f_type_error, context.error, context.reset, "' is not a valid number for the parameter '");
- fl_color_print(f_type_error, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, parameter);
- fl_color_print_line(f_type_error, context.error, context.reset, "'.");
+ fl_color_print(f_type_error, context.set.error, "ERROR: The argument '");
+ fl_color_print(f_type_error, context.set.notable, "%s", argument);
+ fl_color_print(f_type_error, context.set.error, "' is not a valid number for the parameter '");
+ fl_color_print(f_type_error, context.set.notable, "%s%s", f_console_symbol_long_enable, parameter);
+ fl_color_print_line(f_type_error, context.set.error, "'.");
}
else if (status == F_number_underflow) {
- fl_color_print(f_type_error, context.error, context.reset, "ERROR: The argument '");
- fl_color_print(f_type_error, context.notable, context.reset, "%s", argument);
- fl_color_print(f_type_error, context.error, context.reset, "' is too small for the parameter '");
- fl_color_print(f_type_error, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, parameter);
- fl_color_print_line(f_type_error, context.error, context.reset, "'.");
+ fl_color_print(f_type_error, context.set.error, "ERROR: The argument '");
+ fl_color_print(f_type_error, context.set.notable, "%s", argument);
+ fl_color_print(f_type_error, context.set.error, "' is too small for the parameter '");
+ fl_color_print(f_type_error, context.set.notable, "%s%s", f_console_symbol_long_enable, parameter);
+ fl_color_print_line(f_type_error, context.set.error, "'.");
}
else if (status == F_number_overflow) {
- fl_color_print(f_type_error, context.error, context.reset, "ERROR: The argument '");
- fl_color_print(f_type_error, context.notable, context.reset, "%s", argument);
- fl_color_print(f_type_error, context.error, context.reset, "' is too large for the parameter '");
- fl_color_print(f_type_error, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, parameter);
- fl_color_print_line(f_type_error, context.error, context.reset, "'.");
+ fl_color_print(f_type_error, context.set.error, "ERROR: The argument '");
+ fl_color_print(f_type_error, context.set.notable, "%s", argument);
+ fl_color_print(f_type_error, context.set.error, "' is too large for the parameter '");
+ fl_color_print(f_type_error, context.set.notable, "%s%s", f_console_symbol_long_enable, parameter);
+ fl_color_print_line(f_type_error, context.set.error, "'.");
}
else if (status == F_number_negative) {
- fl_color_print(f_type_error, context.error, context.reset, "ERROR: The argument '");
- fl_color_print(f_type_error, context.notable, context.reset, "%s", argument);
- fl_color_print(f_type_error, context.error, context.reset, "' is negative, which is not allowed for the parameter '");
- fl_color_print(f_type_error, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, parameter);
- fl_color_print_line(f_type_error, context.error, context.reset, "'.");
+ fl_color_print(f_type_error, context.set.error, "ERROR: The argument '");
+ fl_color_print(f_type_error, context.set.notable, "%s", argument);
+ fl_color_print(f_type_error, context.set.error, "' is negative, which is not allowed for the parameter '");
+ fl_color_print(f_type_error, context.set.notable, "%s%s", f_console_symbol_long_enable, parameter);
+ fl_color_print_line(f_type_error, context.set.error, "'.");
}
else if (status == F_number_positive) {
- fl_color_print(f_type_error, context.error, context.reset, "ERROR: The argument '");
- fl_color_print(f_type_error, context.notable, context.reset, "%s", argument);
- fl_color_print(f_type_error, context.error, context.reset, "' contains a '");
- fl_color_print(f_type_error, context.notable, context.reset, "+");
- fl_color_print(f_type_error, context.error, context.reset, "', which is not allowed for the parameter '");
- fl_color_print(f_type_error, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, parameter);
- fl_color_print_line(f_type_error, context.error, context.reset, "'.");
+ fl_color_print(f_type_error, context.set.error, "ERROR: The argument '");
+ fl_color_print(f_type_error, context.set.notable, "%s", argument);
+ fl_color_print(f_type_error, context.set.error, "' contains a '");
+ fl_color_print(f_type_error, context.set.notable, "+");
+ fl_color_print(f_type_error, context.set.error, "', which is not allowed for the parameter '");
+ fl_color_print(f_type_error, context.set.notable, "%s%s", f_console_symbol_long_enable, parameter);
+ fl_color_print_line(f_type_error, context.set.error, "'.");
}
else if (status == F_data_not) {
- fl_color_print(f_type_error, context.error, context.reset, "ERROR: The parameter '");
- fl_color_print(f_type_error, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, parameter);
- fl_color_print_line(f_type_error, context.error, context.reset, "' must not be an empty string.");
+ fl_color_print(f_type_error, context.set.error, "ERROR: The parameter '");
+ fl_color_print(f_type_error, context.set.notable, "%s%s", f_console_symbol_long_enable, parameter);
+ fl_color_print_line(f_type_error, context.set.error, "' must not be an empty string.");
}
else {
- fl_color_print(f_type_error, context.error, context.reset, "UNKNOWN ERROR: (");
- fl_color_print(f_type_error, context.notable, context.reset, "%llu", status);
- fl_color_print(f_type_error, context.error, context.reset, ") has occurred while calling ");
- fl_color_print(f_type_error, context.notable, context.reset, "%s()", function);
- fl_color_print(f_type_error, context.error, context.reset, "' for the parameter '");
- fl_color_print(f_type_error, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, parameter);
- fl_color_print(f_type_error, context.error, context.reset, "' with the value '");
- fl_color_print(f_type_error, context.notable, context.reset, "%s", argument);
- fl_color_print_line(f_type_error, context.error, context.reset, "'.");
+ fl_color_print(f_type_error, context.set.error, "UNKNOWN ERROR: (");
+ fl_color_print(f_type_error, context.set.notable, "%llu", status);
+ fl_color_print(f_type_error, context.set.error, ") has occurred while calling ");
+ fl_color_print(f_type_error, context.set.notable, "%s()", function);
+ fl_color_print(f_type_error, context.set.error, "' for the parameter '");
+ fl_color_print(f_type_error, context.set.notable, "%s%s", f_console_symbol_long_enable, parameter);
+ fl_color_print(f_type_error, context.set.error, "' with the value '");
+ fl_color_print(f_type_error, context.set.notable, "%s", argument);
+ fl_color_print_line(f_type_error, context.set.error, "'.");
}
}
#endif // _di_iki_read_print_error_number_argument_
* 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_t context, const uint8_t verbosity, const f_status_t status, const f_string_t function, const bool fallback) f_gcc_attribute_visibility_internal;
+ extern f_return_status iki_read_print_error(const f_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_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;
+ extern bool iki_read_print_error_file(const f_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_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;
+ extern void iki_read_print_error_number_argument(const f_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_
/**
#endif
#ifndef _di_iki_write_print_help_
- f_return_status iki_write_print_help(const fl_color_context_t context) {
+ f_return_status iki_write_print_help(const f_color_context_t context) {
fll_program_print_help_header(context, iki_write_name_long, iki_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.");
fll_program_print_help_usage(context, iki_write_name, "filename(s)");
- fl_color_print(f_type_output, context.important, context.reset, " Notes:");
+ fl_color_print(f_type_output, context.set.important, " Notes:");
printf("%c", f_string_eol[0], f_string_eol[0]);
printf(" This program will accept object and content strings to generate an IKI string, such as: ");
- fl_color_print(f_type_output, context.notable, context.reset, "object:\"content\"");
+ fl_color_print(f_type_output, context.set.notable, "object:\"content\"");
printf(".%c", f_string_eol[0]);
printf(" Each object must have a content (and each content must have an object).%c", f_string_eol[0]);
if (data->parameters[iki_write_parameter_verbose].result == f_console_result_found) {
if (data->parameters[iki_write_parameter_quiet].result == f_console_result_found) {
fprintf(f_type_error, "%c", f_string_eol[0]);
- fl_color_print(f_type_error, data->context.error, data->context.reset, "ERROR: Cannot specify the '");
- fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, f_console_standard_long_verbose);
- fl_color_print(f_type_error, data->context.error, data->context.reset, "' parameter with the '");
- fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, f_console_standard_long_quiet);
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "' parameter.");
+ fl_color_print(f_type_error, data->context.set.error, "ERROR: Cannot specify the '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, f_console_standard_long_verbose);
+ fl_color_print(f_type_error, data->context.set.error, "' parameter with the '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, f_console_standard_long_quiet);
+ fl_color_print_line(f_type_error, data->context.set.error, "' parameter.");
status = F_status_set_error(F_parameter);
}
if (data->parameters[iki_write_parameter_file].result == f_console_result_additional) {
if (data->parameters[iki_write_parameter_file].additional.used > 1) {
if (data->verbosity != iki_write_verbosity_quiet) {
- 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, iki_write_long_file);
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "' may only be specified once.");
+ fl_color_print(f_type_error, data->context.set.error, "ERROR: The parameter '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, iki_write_long_file);
+ fl_color_print_line(f_type_error, data->context.set.error, "' may only be specified once.");
}
status = F_status_set_error(F_parameter);
}
else if (data->parameters[iki_write_parameter_file].result == f_console_result_found) {
if (data->verbosity != iki_write_verbosity_quiet) {
- 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, iki_write_long_file);
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "' was specified, but no value was given.");
+ fl_color_print(f_type_error, data->context.set.error, "ERROR: The parameter '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, iki_write_long_file);
+ fl_color_print_line(f_type_error, data->context.set.error, "' was specified, but no value was given.");
}
status = F_status_set_error(F_parameter);
if (F_status_is_fine(status) && data->parameters[iki_write_parameter_object].result == f_console_result_found) {
if (data->verbosity != iki_write_verbosity_quiet) {
- 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, iki_write_long_object);
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "' was specified, but no value was given.");
+ fl_color_print(f_type_error, data->context.set.error, "ERROR: The parameter '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, iki_write_long_object);
+ fl_color_print_line(f_type_error, data->context.set.error, "' was specified, but no value was given.");
}
status = F_status_set_error(F_parameter);
if (F_status_is_fine(status) && data->parameters[iki_write_parameter_content].result == f_console_result_found) {
if (data->verbosity != iki_write_verbosity_quiet) {
- 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, iki_write_long_content);
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "' was specified, but no value was given.");
+ fl_color_print(f_type_error, data->context.set.error, "ERROR: The parameter '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, iki_write_long_content);
+ fl_color_print_line(f_type_error, data->context.set.error, "' was specified, but no value was given.");
}
status = F_status_set_error(F_parameter);
if (data->parameters[iki_write_parameter_object].result != f_console_result_additional && data->parameters[iki_write_parameter_content].result != f_console_result_additional) {
if (data->verbosity != iki_write_verbosity_quiet) {
fprintf(f_type_error, "%c", f_string_eol[0]);
- fl_color_print(f_type_error, data->context.error, data->context.reset, "ERROR: No data provided, either pipe the data or use the '");
- fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, iki_write_long_object);
- fl_color_print(f_type_error, data->context.error, data->context.reset, "' and the '");
- fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, iki_write_long_content);
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "' parameters.");
+ fl_color_print(f_type_error, data->context.set.error, "ERROR: No data provided, either pipe the data or use the '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, iki_write_long_object);
+ fl_color_print(f_type_error, data->context.set.error, "' and the '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, iki_write_long_content);
+ fl_color_print_line(f_type_error, data->context.set.error, "' parameters.");
}
status = F_status_set_error(F_parameter);
if (F_status_is_fine(status)) {
if (data->parameters[iki_write_parameter_object].additional.used != data->parameters[iki_write_parameter_content].additional.used) {
if (data->verbosity != iki_write_verbosity_quiet) {
- fl_color_print(f_type_error, data->context.error, data->context.reset, "ERROR: The parameters '");
- fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, iki_write_long_content);
- 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, "%s%s", f_console_symbol_long_enable, iki_write_long_object);
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "' must be specified the same number of times.");
+ fl_color_print(f_type_error, data->context.set.error, "ERROR: The parameters '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, iki_write_long_content);
+ fl_color_print(f_type_error, data->context.set.error, "' and '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, iki_write_long_object);
+ fl_color_print_line(f_type_error, data->context.set.error, "' must be specified the same number of times.");
}
status = F_status_set_error(F_parameter);
if (!buffer.used) {
if (data->verbosity != iki_write_verbosity_quiet) {
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "ERROR: The pipe has no content.");
+ fl_color_print_line(f_type_error, data->context.set.error, "ERROR: The pipe has no content.");
}
status = F_status_set_error(F_parameter);
if (object_ended && previous == range.start) {
if (data->verbosity != iki_write_verbosity_quiet) {
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "ERROR: The pipe has incorrectly placed newlines.");
+ fl_color_print_line(f_type_error, data->context.set.error, "ERROR: The pipe has incorrectly placed newlines.");
}
status = F_status_set_error(F_parameter);
if (F_status_is_fine(status) && object_ended) {
if (data->verbosity != iki_write_verbosity_quiet) {
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "ERROR: The pipe has an object without content.");
+ fl_color_print_line(f_type_error, data->context.set.error, "ERROR: The pipe has an object without content.");
}
status = F_status_set_error(F_parameter);
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);
+ f_macro_color_context_t_delete_simple(data->context);
return F_none;
}
f_string_dynamic_t buffer;
- fl_color_context_t context;
+ f_color_context_t context;
} iki_write_data_t;
#define iki_write_data_t_initialize \
F_false, \
0, \
f_string_dynamic_t_initialize, \
- fl_color_context_t_initialize, \
+ f_color_context_t_initialize, \
}
#endif // _di_iki_write_data_t_
* F_none on success.
*/
#ifndef _di_iki_write_print_help_
- extern f_return_status iki_write_print_help(const fl_color_context_t context);
+ extern f_return_status iki_write_print_help(const f_color_context_t context);
#endif // _di_iki_write_print_help_
/**
#endif
#ifndef _di_iki_write_print_error_
- f_return_status iki_write_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_return_status iki_write_print_error(const f_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_write_verbosity_quiet) {
fprintf(f_type_error, "%c", f_string_eol[0]);
- fl_color_print(f_type_error, context.error, context.reset, "ERROR: Invalid parameter when calling function ");
- fl_color_print(f_type_error, context.notable, context.reset, "%s", function);
- fl_color_print_line(f_type_error, context.error, context.reset, "().");
+ fl_color_print(f_type_error, context.set.error, "ERROR: Invalid parameter when calling function ");
+ fl_color_print(f_type_error, context.set.notable, "%s", function);
+ fl_color_print_line(f_type_error, context.set.error, "().");
}
return F_none;
if (status == F_memory_allocation || status == F_memory_reallocation) {
if (verbosity != iki_write_verbosity_quiet) {
fprintf(f_type_error, "%c", f_string_eol[0]);
- fl_color_print(f_type_error, context.error, context.reset, "ERROR: Unable to allocate memory in function ");
- fl_color_print(f_type_error, context.notable, context.reset, "%s", function);
- fl_color_print_line(f_type_error, context.error, context.reset, "().");
+ fl_color_print(f_type_error, context.set.error, "ERROR: Unable to allocate memory in function ");
+ fl_color_print(f_type_error, context.set.notable, "%s", function);
+ fl_color_print_line(f_type_error, context.set.error, "().");
}
return F_none;
if (status == F_buffer_too_large) {
if (verbosity != iki_write_verbosity_quiet) {
fprintf(f_type_error, "%c", f_string_eol[0]);
- fl_color_print(f_type_error, context.error, context.reset, "ERROR: Maximum buffer limit reached while processing ");
- fl_color_print(f_type_error, context.notable, context.reset, "%s", function);
- fl_color_print_line(f_type_error, context.error, context.reset, "().");
+ fl_color_print(f_type_error, context.set.error, "ERROR: Maximum buffer limit reached while processing ");
+ fl_color_print(f_type_error, context.set.notable, "%s", function);
+ fl_color_print_line(f_type_error, context.set.error, "().");
}
return F_none;
if (status == F_string_too_large) {
if (verbosity != iki_write_verbosity_quiet) {
fprintf(f_type_error, "%c", f_string_eol[0]);
- fl_color_print(f_type_error, context.error, context.reset, "ERROR: Maximum string limit reached while processing ");
- fl_color_print(f_type_error, context.notable, context.reset, "%s", function);
- fl_color_print_line(f_type_error, context.error, context.reset, "().");
+ fl_color_print(f_type_error, context.set.error, "ERROR: Maximum string limit reached while processing ");
+ fl_color_print(f_type_error, context.set.notable, "%s", function);
+ fl_color_print_line(f_type_error, context.set.error, "().");
}
return F_none;
if (fallback && verbosity != iki_write_verbosity_quiet) {
fprintf(f_type_error, "%c", f_string_eol[0]);
- fl_color_print(f_type_error, context.error, context.reset, "UNKNOWN ERROR: (");
- fl_color_print(f_type_error, context.notable, context.reset, "%llu", status);
- fl_color_print(f_type_error, context.error, context.reset, ") in function ");
- fl_color_print(f_type_error, context.notable, context.reset, "%s", function);
- fl_color_print_line(f_type_error, context.error, context.reset, "().");
+ fl_color_print(f_type_error, context.set.error, "UNKNOWN ERROR: (");
+ fl_color_print(f_type_error, context.set.notable, "%llu", status);
+ fl_color_print(f_type_error, context.set.error, ") in function ");
+ fl_color_print(f_type_error, context.set.notable, "%s", function);
+ fl_color_print_line(f_type_error, context.set.error, "().");
}
return F_unknown;
#endif // _di_iki_write_print_error_
#ifndef _di_iki_write_print_error_file_
- bool iki_write_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 uint8_t type, const bool fallback) {
+ bool iki_write_print_error_file(const f_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 uint8_t type, const bool fallback) {
f_string_t type_name = "file";
if (type == 1) {
if (status == F_file_found_not) {
if (verbosity != iki_write_verbosity_quiet) {
fprintf(f_type_error, "%c", f_string_eol[0]);
- fl_color_print(f_type_error, context.error, context.reset, "ERROR: Failed to find %s '", type_name);
- fl_color_print(f_type_error, context.notable, context.reset, "%s", name);
- fl_color_print_line(f_type_error, context.error, context.reset, "'.");
+ fl_color_print(f_type_error, context.set.error, "ERROR: Failed to find %s '", type_name);
+ fl_color_print(f_type_error, context.set.notable, "%s", name);
+ fl_color_print_line(f_type_error, context.set.error, "'.");
}
return F_false;
if (status == F_file_closed) {
if (verbosity != iki_write_verbosity_quiet) {
- fl_color_print(f_type_error, context.error, context.reset, "INTERNAL ERROR: The %s '", type_name);
- fl_color_print(f_type_error, context.notable, context.reset, "%s", name);
- fl_color_print_line(f_type_error, context.error, context.reset, "' is no longer open.");
+ fl_color_print(f_type_error, context.set.error, "INTERNAL ERROR: The %s '", type_name);
+ fl_color_print(f_type_error, context.set.notable, "%s", name);
+ fl_color_print_line(f_type_error, context.set.error, "' is no longer open.");
}
return F_false;
if (status == F_file_seek) {
if (verbosity != iki_write_verbosity_quiet) {
- fl_color_print(f_type_error, context.error, context.reset, "ERROR: A seek error occurred while accessing the file '");
- fl_color_print(f_type_error, context.notable, context.reset, "%s", name);
- fl_color_print_line(f_type_error, context.error, context.reset, "'.");
+ fl_color_print(f_type_error, context.set.error, "ERROR: A seek error occurred while accessing the file '");
+ fl_color_print(f_type_error, context.set.notable, "%s", name);
+ fl_color_print_line(f_type_error, context.set.error, "'.");
}
return F_false;
if (status == F_file_read) {
if (verbosity != iki_write_verbosity_quiet) {
- fl_color_print(f_type_error, context.error, context.reset, "ERROR: A read error occurred while accessing the file '");
- fl_color_print(f_type_error, context.notable, context.reset, "%s", name);
- fl_color_print_line(f_type_error, context.error, context.reset, "'.");
+ fl_color_print(f_type_error, context.set.error, "ERROR: A read error occurred while accessing the file '");
+ fl_color_print(f_type_error, context.set.notable, "%s", name);
+ fl_color_print_line(f_type_error, context.set.error, "'.");
}
return F_false;
if (status == F_file_found) {
if (verbosity != iki_write_verbosity_quiet) {
fprintf(f_type_error, "%c", f_string_eol[0]);
- fl_color_print(f_type_error, context.error, context.reset, "ERROR: The %s '", type_name);
- fl_color_print(f_type_error, context.notable, context.reset, "%s", name);
- fl_color_print_line(f_type_error, context.error, context.reset, "' already exists.");
+ fl_color_print(f_type_error, context.set.error, "ERROR: The %s '", type_name);
+ fl_color_print(f_type_error, context.set.notable, "%s", name);
+ fl_color_print_line(f_type_error, context.set.error, "' already exists.");
}
return F_false;
if (status == F_parameter) {
if (verbosity != iki_write_verbosity_quiet) {
fprintf(f_type_error, "%c", f_string_eol[0]);
- fl_color_print(f_type_error, context.error, context.reset, "INTERNAL ERROR: Invalid parameter when calling ");
- fl_color_print(f_type_error, context.notable, context.reset, "%s", function);
- fl_color_print(f_type_error, context.error, context.reset, "() for the %s '", type_name);
- fl_color_print(f_type_error, context.notable, context.reset, "%s", name);
- fl_color_print_line(f_type_error, context.error, context.reset, "'.");
+ fl_color_print(f_type_error, context.set.error, "INTERNAL ERROR: Invalid parameter when calling ");
+ fl_color_print(f_type_error, context.set.notable, "%s", function);
+ fl_color_print(f_type_error, context.set.error, "() for the %s '", type_name);
+ fl_color_print(f_type_error, context.set.notable, "%s", name);
+ fl_color_print_line(f_type_error, context.set.error, "'.");
}
return F_false;
if (status == F_name) {
if (verbosity != iki_write_verbosity_quiet) {
fprintf(f_type_error, "%c", f_string_eol[0]);
- fl_color_print(f_type_error, context.error, context.reset, "ERROR: Invalid %s name '", type_name);
- fl_color_print(f_type_error, context.notable, context.reset, "%s", name);
- fl_color_print_line(f_type_error, context.error, context.reset, "'.");
+ fl_color_print(f_type_error, context.set.error, "ERROR: Invalid %s name '", type_name);
+ fl_color_print(f_type_error, context.set.notable, "%s", name);
+ fl_color_print_line(f_type_error, context.set.error, "'.");
}
return F_false;
if (status == F_memory_out) {
if (verbosity != iki_write_verbosity_quiet) {
fprintf(f_type_error, "%c", f_string_eol[0]);
- fl_color_print(f_type_error, context.error, context.reset, "CRITICAL ERROR: Unable to allocate memory, while trying to %s %s '", operation, type_name);
- fl_color_print(f_type_error, context.notable, context.reset, "%s", name);
- fl_color_print_line(f_type_error, context.error, context.reset, "'.");
+ fl_color_print(f_type_error, context.set.error, "CRITICAL ERROR: Unable to allocate memory, while trying to %s %s '", operation, type_name);
+ fl_color_print(f_type_error, context.set.notable, "%s", name);
+ fl_color_print_line(f_type_error, context.set.error, "'.");
}
return F_false;
if (status == F_number_overflow) {
if (verbosity != iki_write_verbosity_quiet) {
fprintf(f_type_error, "%c", f_string_eol[0]);
- fl_color_print(f_type_error, context.error, context.reset, "ERROR: Overflow while trying to %s %s '", operation, type_name);
- fl_color_print(f_type_error, context.notable, context.reset, "%s", name);
- fl_color_print_line(f_type_error, context.error, context.reset, "'.");
+ fl_color_print(f_type_error, context.set.error, "ERROR: Overflow while trying to %s %s '", operation, type_name);
+ fl_color_print(f_type_error, context.set.notable, "%s", name);
+ fl_color_print_line(f_type_error, context.set.error, "'.");
}
return F_false;
if (status == F_directory) {
if (verbosity != iki_write_verbosity_quiet) {
fprintf(f_type_error, "%c", f_string_eol[0]);
- fl_color_print(f_type_error, context.error, context.reset, "ERROR: Invalid directory while trying to %s %s '", operation, type_name);
- fl_color_print(f_type_error, context.notable, context.reset, "%s", name);
- fl_color_print_line(f_type_error, context.error, context.reset, "'.");
+ fl_color_print(f_type_error, context.set.error, "ERROR: Invalid directory while trying to %s %s '", operation, type_name);
+ fl_color_print(f_type_error, context.set.notable, "%s", name);
+ fl_color_print_line(f_type_error, context.set.error, "'.");
}
return F_false;
if (status == F_access_denied) {
if (verbosity != iki_write_verbosity_quiet) {
fprintf(f_type_error, "%c", f_string_eol[0]);
- fl_color_print(f_type_error, context.error, context.reset, "ERROR: Access denied while trying to %s %s '", operation, type_name);
- fl_color_print(f_type_error, context.notable, context.reset, "%s", name);
- fl_color_print_line(f_type_error, context.error, context.reset, "'.");
+ fl_color_print(f_type_error, context.set.error, "ERROR: Access denied while trying to %s %s '", operation, type_name);
+ fl_color_print(f_type_error, context.set.notable, "%s", name);
+ fl_color_print_line(f_type_error, context.set.error, "'.");
}
return F_false;
if (status == F_loop) {
if (verbosity != iki_write_verbosity_quiet) {
fprintf(f_type_error, "%c", f_string_eol[0]);
- fl_color_print(f_type_error, context.error, context.reset, "ERROR: Loop while trying to %s %s '", operation, type_name);
- fl_color_print(f_type_error, context.notable, context.reset, "%s", name);
- fl_color_print_line(f_type_error, context.error, context.reset, "'.");
+ fl_color_print(f_type_error, context.set.error, "ERROR: Loop while trying to %s %s '", operation, type_name);
+ fl_color_print(f_type_error, context.set.notable, "%s", name);
+ fl_color_print_line(f_type_error, context.set.error, "'.");
}
return F_false;
if (status == F_prohibited) {
if (verbosity != iki_write_verbosity_quiet) {
fprintf(f_type_error, "%c", f_string_eol[0]);
- fl_color_print(f_type_error, context.error, context.reset, "ERROR: Prohibited by system while trying to %s %s '", operation, type_name);
- fl_color_print(f_type_error, context.notable, context.reset, "%s", name);
- fl_color_print_line(f_type_error, context.error, context.reset, "'.");
+ fl_color_print(f_type_error, context.set.error, "ERROR: Prohibited by system while trying to %s %s '", operation, type_name);
+ fl_color_print(f_type_error, context.set.notable, "%s", name);
+ fl_color_print_line(f_type_error, context.set.error, "'.");
}
return F_false;
if (status == F_directory_found_not) {
if (verbosity != iki_write_verbosity_quiet) {
fprintf(f_type_error, "%c", f_string_eol[0]);
- fl_color_print(f_type_error, context.error, context.reset, "ERROR: Failed to %s %s '", operation, type_name);
- fl_color_print(f_type_error, context.notable, context.reset, "%s", name);
- fl_color_print_line(f_type_error, context.error, context.reset, "' due to an invalid directory in the path.");
+ fl_color_print(f_type_error, context.set.error, "ERROR: Failed to %s %s '", operation, type_name);
+ fl_color_print(f_type_error, context.set.notable, "%s", name);
+ fl_color_print_line(f_type_error, context.set.error, "' due to an invalid directory in the path.");
}
return F_false;
if (status == F_directory_found_not) {
if (verbosity != iki_write_verbosity_quiet) {
fprintf(f_type_error, "%c", f_string_eol[0]);
- fl_color_print(f_type_error, context.error, context.reset, "ERROR: Failed to %s %s '", operation, type_name);
- fl_color_print(f_type_error, context.notable, context.reset, "%s", name);
- fl_color_print_line(f_type_error, context.error, context.reset, "' due to an invalid directory in the path.");
+ fl_color_print(f_type_error, context.set.error, "ERROR: Failed to %s %s '", operation, type_name);
+ fl_color_print(f_type_error, context.set.notable, "%s", name);
+ fl_color_print_line(f_type_error, context.set.error, "' due to an invalid directory in the path.");
}
return F_false;
if (status == F_failure) {
if (verbosity != iki_write_verbosity_quiet) {
fprintf(f_type_error, "%c", f_string_eol[0]);
- fl_color_print(f_type_error, context.error, context.reset, "ERROR: Failed to %s %s '", operation, type_name);
- fl_color_print(f_type_error, context.notable, context.reset, "%s", name);
- fl_color_print_line(f_type_error, context.error, context.reset, "'.");
+ fl_color_print(f_type_error, context.set.error, "ERROR: Failed to %s %s '", operation, type_name);
+ fl_color_print(f_type_error, context.set.notable, "%s", name);
+ fl_color_print_line(f_type_error, context.set.error, "'.");
}
return F_false;
if (iki_write_print_error(context, verbosity, status, function, F_false) == F_unknown && fallback && verbosity != iki_write_verbosity_quiet) {
fprintf(f_type_error, "%c", f_string_eol[0]);
- fl_color_print(f_type_error, context.error, context.reset, "UNKNOWN ERROR: (");
- fl_color_print(f_type_error, context.notable, context.reset, "%llu", status);
- fl_color_print(f_type_error, context.error, context.reset, ") occurred while trying to %s %s '", operation, type_name);
- fl_color_print(f_type_error, context.notable, context.reset, "%s", name);
- fl_color_print_line(f_type_error, context.error, context.reset, "'.");
+ fl_color_print(f_type_error, context.set.error, "UNKNOWN ERROR: (");
+ fl_color_print(f_type_error, context.set.notable, "%llu", status);
+ fl_color_print(f_type_error, context.set.error, ") occurred while trying to %s %s '", operation, type_name);
+ fl_color_print(f_type_error, context.set.notable, "%s", name);
+ fl_color_print_line(f_type_error, context.set.error, "'.");
}
return F_true;
if (!object.used) {
if (data.verbosity != iki_write_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 object is missing, it must not have a length of ");
- fl_color_print(f_type_error, data.context.notable, data.context.reset, "0");
- fl_color_print_line(f_type_error, data.context.error, data.context.reset, ".");
+ fl_color_print(f_type_error, data.context.set.error, "ERROR: The object is missing, it must not have a length of ");
+ fl_color_print(f_type_error, data.context.set.notable, "0");
+ fl_color_print_line(f_type_error, data.context.set.error, ".");
}
return F_status_set_error(F_failure);
if (status == F_false) {
if (data.verbosity != iki_write_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 object '");
+ fl_color_print(f_type_error, data.context.set.error, "ERROR: The object '");
fl_color_print_code(f_type_error, data.context.notable);
f_print_dynamic(f_type_error, object);
fl_color_print_code(f_type_error, data.context.reset);
- fl_color_print_line(f_type_error, data.context.error, data.context.reset, "' is not a valid IKI object.");
+ fl_color_print_line(f_type_error, data.context.set.error, "' is not a valid IKI object.");
}
return F_status_set_error(F_failure);
* F_unknown is returned if the status code has no print message.
*/
#ifndef _di_iki_write_print_error_
- extern f_return_status iki_write_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;
+ extern f_return_status iki_write_print_error(const f_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_write_print_error_
/**
* F_false is returned on successful print of known errors.
*/
#ifndef _di_iki_write_print_error_file_
- extern bool iki_write_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 uint8_t type, const bool fallback) f_gcc_attribute_visibility_internal;
+ extern bool iki_write_print_error_file(const f_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 uint8_t type, const bool fallback) f_gcc_attribute_visibility_internal;
#endif // _di_iki_write_print_error_file_
/**
#endif // _di_init_print_version_
#ifndef _di_init_print_help_
- f_return_status init_print_help(const fl_color_context_t context) {
+ f_return_status init_print_help(const f_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.");
pid_t pid_services = clone(init_handler_child_services, stack_memory.services + init_stack_size_small_services, init_flags_clone, stack_memory.services);
if (pid_services < 0) {
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "ERROR: Failed to clone services process (errno = %i).", errno);
+ fl_color_print_line(f_type_error, data->context.set.error, "ERROR: Failed to clone services process (errno = %i).", errno);
}
pid_t pid_control_file = clone(init_handler_child_control_file, stack_memory.control_file + init_stack_size_control_file, init_flags_clone, stack_memory.control_file);
if (pid_control_file < 0) {
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "ERROR: Failed to clone control via file process (errno = %i).", errno);
+ fl_color_print_line(f_type_error, data->context.set.error, "ERROR: Failed to clone control via file process (errno = %i).", errno);
}
*/
continue;
}
else if (errno != EINTR) {
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "ERROR: sigwaitinfo() failed (errno = %i).", errno);
+ fl_color_print_line(f_type_error, data->context.set.error, "ERROR: sigwaitinfo() failed (errno = %i).", errno);
signal_problem_count++;
if (signal_problem_count > problem_count_max_signal_size) {
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "ERROR: Max signal problem count has been reached, sleeping for a period of time.", errno);
+ fl_color_print_line(f_type_error, data->context.set.error, "ERROR: Max signal problem count has been reached, sleeping for a period of time.", errno);
sleep(init_panic_signal_sleep_seconds);
signal_problem_count = 0;
}
f_string_lengths_t remaining;
bool process_pipe;
- fl_color_context_t context;
+ f_color_context_t context;
} init_data_t;
#define init_data_initialize \
init_console_parameter_t_initialize, \
f_string_lengths_t_initialize, \
F_false, \
- fl_color_context_t_initialize, \
+ f_color_context_t_initialize, \
}
typedef struct {
* F_none on success.
*/
#ifndef _di_init_print_help_
- extern f_return_status init_print_help(const fl_color_context_t context);
+ extern f_return_status init_print_help(const f_color_context_t context);
#endif // _di_init_print_help_
/**
if (optional) {
if (status == F_parameter) {
- fl_color_print_line(f_type_error, data.context.error, data.context.reset, "INTERNAL ERROR: Invalid parameter when calling f_file_open().");
+ fl_color_print_line(f_type_error, data.context.set.error, "INTERNAL ERROR: Invalid parameter when calling f_file_open().");
} else if (status != F_file_found_not && status != F_file_open && status != F_file_descriptor) {
- 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);
+ fl_color_print_line(f_type_error, data.context.set.error, "INTERNAL ERROR: An unhandled error (%u) has occurred while calling f_file_open().", status);
}
} else {
if (status == F_parameter) {
- fl_color_print_line(f_type_error, data.context.error, data.context.reset, "INTERNAL ERROR: Invalid parameter when calling f_file_open().");
+ fl_color_print_line(f_type_error, data.context.set.error, "INTERNAL ERROR: Invalid parameter when calling f_file_open().");
} else if (status == F_file_found_not) {
- fl_color_print_line(f_type_error, data.context.error, data.context.reset, "ERROR: Unable to find the file '%s'.", filename);
+ fl_color_print_line(f_type_error, data.context.set.error, "ERROR: Unable to find the file '%s'.", filename);
} else if (status == F_file_open) {
- fl_color_print_line(f_type_error, data.context.error, data.context.reset, "ERROR: Unable to open the file '%s'.", filename);
+ fl_color_print_line(f_type_error, data.context.set.error, "ERROR: Unable to open the file '%s'.", filename);
} else if (status == F_file_descriptor) {
- fl_color_print_line(f_type_error, data.context.error, data.context.reset, "ERROR: File descriptor error while trying to open the file '%s'.", filename);
+ fl_color_print_line(f_type_error, data.context.set.error, "ERROR: File descriptor error while trying to open the file '%s'.", filename);
} else {
- 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);
+ fl_color_print_line(f_type_error, data.context.set.error, "INTERNAL ERROR: An unhandled error (%u) has occurred while calling f_file_open().", status);
}
}
status = F_status_set_fine(status);
if (status == F_parameter) {
- fl_color_print_line(f_type_error, data.context.error, data.context.reset, "INTERNAL ERROR: Invalid parameter when calling f_file_read_until().");
+ fl_color_print_line(f_type_error, data.context.set.error, "INTERNAL ERROR: Invalid parameter when calling f_file_read_until().");
} else if (status == F_number_overflow) {
- fl_color_print_line(f_type_error, data.context.error, data.context.reset, "ERROR: Integer overflow while trying to buffer the file '%s'.", filename);
+ fl_color_print_line(f_type_error, data.context.set.error, "ERROR: Integer overflow while trying to buffer the file '%s'.", filename);
} else if (status == F_file_closed) {
- fl_color_print_line(f_type_error, data.context.error, data.context.reset, "INTERNAL ERROR: The file '%s' is no longer open.", filename);
+ fl_color_print_line(f_type_error, data.context.set.error, "INTERNAL ERROR: The file '%s' is no longer open.", filename);
} else if (status == F_file_seek) {
- fl_color_print_line(f_type_error, data.context.error, data.context.reset, "ERROR: A seek error occurred while accessing the file '%s'.", filename);
+ fl_color_print_line(f_type_error, data.context.set.error, "ERROR: A seek error occurred while accessing the file '%s'.", filename);
} else if (status == F_file_read) {
- fl_color_print_line(f_type_error, data.context.error, data.context.reset, "ERROR: A read error occurred while accessing the file '%s'.", filename);
+ fl_color_print_line(f_type_error, data.context.set.error, "ERROR: A read error occurred while accessing the file '%s'.", filename);
} else if (status == F_memory_allocation || status == F_memory_reallocation) {
- fl_color_print_line(f_type_error, data.context.error, data.context.reset, "CRITICAL ERROR: Unable to allocate memory.");
+ fl_color_print_line(f_type_error, data.context.set.error, "CRITICAL ERROR: Unable to allocate memory.");
} else {
- 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_read_until().", status);
+ fl_color_print_line(f_type_error, data.context.set.error, "INTERNAL ERROR: An unhandled error (%u) has occurred while calling f_file_read_until().", status);
}
return F_status_set_error(status);
status = F_status_set_fine(status);
if (status == F_parameter) {
- fl_color_print_line(f_type_error, data.context.error, data.context.reset, "INTERNAL ERROR: Invalid parameter when calling fll_fss_basic_list_read() for the file '%s'.", filename);
+ fl_color_print_line(f_type_error, data.context.set.error, "INTERNAL ERROR: Invalid parameter when calling fll_fss_basic_list_read() for the file '%s'.", filename);
} else if (status == F_data_not_eos || status == F_data_not || status == F_data_not_stop) {
- fl_color_print_line(f_type_error, data.context.error, data.context.reset, "ERROR: No relevant data was found within the file '%s'.", filename);
+ fl_color_print_line(f_type_error, data.context.set.error, "ERROR: No relevant data was found within the file '%s'.", filename);
} else if (status == F_memory_allocation || status == F_memory_reallocation) {
- fl_color_print_line(f_type_error, data.context.error, data.context.reset, "CRITICAL ERROR: Unable to allocate memory.");
+ fl_color_print_line(f_type_error, data.context.set.error, "CRITICAL ERROR: Unable to allocate memory.");
} else {
- 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, filename);
+ fl_color_print_line(f_type_error, data.context.set.error, "INTERNAL ERROR: An unhandled error (%u) has occurred while calling fll_fss_basic_list_read() for the file '%s'.", status, filename);
}
return F_status_set_error(status);
status = F_status_set_fine(status);
if (status == F_memory_allocation || status == F_memory_reallocation) {
- fl_color_print_line(f_type_error, data.context.error, data.context.reset, "CRITICAL ERROR: Unable to allocate memory.");
+ fl_color_print_line(f_type_error, data.context.set.error, "CRITICAL ERROR: Unable to allocate memory.");
} else if (status == F_failure) {
// the error message has already been displayed.
} else {
- 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);
+ fl_color_print_line(f_type_error, data.context.set.error, "INTERNAL ERROR: An unhandled error (%u) has occurred while calling firewall_perform_commands().", status);
}
f_macro_fss_objects_t_delete_simple(local->rule_objects);
status = F_status_set_fine(status);
if (status == F_parameter) {
- fl_color_print_line(f_type_error, data.context.error, data.context.reset, "INTERNAL ERROR: Invalid parameter when calling fll_fss_basic_list_read() for the file '%s'.", init_rule_core_file);
+ fl_color_print_line(f_type_error, data.context.set.error, "INTERNAL ERROR: Invalid parameter when calling fll_fss_basic_list_read() for the file '%s'.", init_rule_core_file);
} else if (status == F_data_not_eos || status == F_data_not || status == F_data_not_stop) {
- fl_color_print_line(f_type_error, data.context.error, data.context.reset, "ERROR: No relevant data was found within the file '%s'.", init_rule_core_file);
+ fl_color_print_line(f_type_error, data.context.set.error, "ERROR: No relevant data was found within the file '%s'.", init_rule_core_file);
} else if (status == F_memory_allocation || status == F_memory_reallocation) {
- fl_color_print_line(f_type_error, data.context.error, data.context.reset, "CRITICAL ERROR: Unable to allocate memory.");
+ fl_color_print_line(f_type_error, data.context.set.error, "CRITICAL ERROR: Unable to allocate memory.");
} else {
- 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);
+ fl_color_print_line(f_type_error, data.context.set.error, "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_t_delete(buffer);
if (F_status_is_error(status_process)) {
if (status == F_memory_allocation || status == F_memory_reallocation) {
- fl_color_print_line(f_type_error, data.context.error, data.context.reset, "CRITICAL ERROR: Unable to allocate memory.");
+ fl_color_print_line(f_type_error, data.context.set.error, "CRITICAL ERROR: Unable to allocate memory.");
}
else {
- fl_color_print_line(f_type_error, data.context.error, data.context.reset, "INTERNAL ERROR: An unhandled error (%u) has occurred while calling init_load_main_rule().", status);
+ fl_color_print_line(f_type_error, data.context.set.error, "INTERNAL ERROR: An unhandled error (%u) has occurred while calling init_load_main_rule().", status);
}
// @todo: init_delete_data((*data));
status = F_status_set_fine(status);
if (status == F_memory_allocation || status == F_memory_reallocation) {
- fl_color_print_line(f_type_error, data.context.error, context.reset, "CRITICAL ERROR: Unable to allocate memory.");
+ fl_color_print_line(f_type_error, data.context.set.error, "CRITICAL ERROR: Unable to allocate memory.");
} else if (status == F_failure) {
// the error message has already been displayed.
} else {
- 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);
+ fl_color_print_line(f_type_error, data.context.set.error, "INTERNAL ERROR: An unhandled error (%u) has occurred while calling firewall_perform_commands().", status);
}
f_macro_fss_objects_t_delete_simple((*rule_objects));
}
else {
if (status == F_memory_allocation || status == F_memory_reallocation) {
- fl_color_print_line(f_type_error, context.error, context.reset, "CRITICAL ERROR: Unable to allocate memory.");
+ fl_color_print_line(f_type_error, context.set.error, "CRITICAL ERROR: Unable to allocate memory.");
}
else {
- fl_color_print_line(f_type_error, context.error, context.reset, "INTERNAL ERROR: An unhandled error (%u) has occurred while calling init_load_main_rule().", status);
+ fl_color_print_line(f_type_error, context.set.error, "INTERNAL ERROR: An unhandled error (%u) has occurred while calling init_load_main_rule().", status);
}
}
status = fl_conversion_string_to_number_unsigned(value, &number, range);
if (status == F_none) {
- fl_color_print_line(f_type_output, data.context.error, data.context.reset, "invalid name");
+ fl_color_print_line(f_type_output, data.context.set.error, "invalid name");
return F_status_set_error(F_parameter);
}
if (status == F_data_not || F_status_set_fine(status) == F_parameter) {
- fl_color_print_line(f_type_output, data.context.error, data.context.reset, "invalid data");
+ fl_color_print_line(f_type_output, data.context.set.error, "invalid data");
return status;
}
if (F_status_is_error(status)) {
if (F_status_set_fine(status) == F_data) {
- fl_color_print_line(f_type_output, data.context.error, data.context.reset, "unknown name");
+ fl_color_print_line(f_type_output, data.context.set.error, "unknown name");
}
else {
- fl_color_print_line(f_type_output, data.context.error, data.context.reset, "failed to convert");
+ fl_color_print_line(f_type_output, data.context.set.error, "failed to convert");
}
return status;
}
if (status == F_data) {
- fl_color_print_line(f_type_output, data.context.warning, data.context.reset, "unknown code");
+ fl_color_print_line(f_type_output, data.context.set.warning, "unknown code");
return F_none;
}
if (F_status_is_error(status)) {
if (F_status_set_fine(status) == F_data) {
- fl_color_print_line(f_type_output, data.context.error, data.context.reset, "unknown code");
+ fl_color_print_line(f_type_output, data.context.set.error, "unknown code");
}
else {
- fl_color_print_line(f_type_output, data.context.error, data.context.reset, "failed to convert");
+ fl_color_print_line(f_type_output, data.context.set.error, "failed to convert");
}
return status;
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");
+ fl_color_print_line(f_type_output, data.context.set.error, "out of range");
return status;
}
if (F_status_is_error(status)) {
if (F_status_set_fine(status) == F_number_negative) {
- fl_color_print_line(f_type_output, data.context.error, data.context.reset, "out of range");
+ fl_color_print_line(f_type_output, data.context.set.error, "out of range");
}
else {
- fl_color_print_line(f_type_output, data.context.error, data.context.reset, "invalid number");
+ fl_color_print_line(f_type_output, data.context.set.error, "invalid number");
}
return status;
* F_number_overflow (with error bit) on integer overflow.
* F_incomplete_utf (with error bit) if an incomplete UTF-8 fragment is found.
*
- * Errors from (with error bit): fss_status_code_convert_number().
+ * Errors (with error bit) from: fss_status_code_convert_number().
*
* @see fss_status_code_convert_number()
*/
* F_none on success.
* F_data_not if string is empty.
*
- * Errors from (with error bit): fl_console_parameter_to_number_unsigned().
- * Errors from (with error bit): fll_fss_status_from_string().
+ * Errors (with error bit) from: fl_console_parameter_to_number_unsigned().
+ * Errors (with error bit) from: fll_fss_status_from_string().
*
* @see fl_console_parameter_to_number_unsigned()
* @see fll_fss_status_from_string()
* F_number_overflow (with error bit) on integer overflow.
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors from (with error bit): fll_fss_status_from_string().
- * Errors from (with error bit): fss_status_code_convert_number().
+ * Errors (with error bit) from: fll_fss_status_from_string().
+ * Errors (with error bit) from: fss_status_code_convert_number().
*
* @see fll_fss_status_from_string()
* @see fss_status_code_convert_number()
* F_number_overflow (with error bit) on integer overflow.
* F_parameter (with error bit) if a parameter is invalid.
*
- * Errors from (with error bit): fl_console_parameter_to_number_unsigned().
+ * Errors (with error bit) from: fl_console_parameter_to_number_unsigned().
*
* @see fl_console_parameter_to_number_unsigned()
*/
#endif
#ifndef _di_status_code_print_help_
- f_return_status status_code_print_help(const fl_color_context_t context) {
+ f_return_status status_code_print_help(const f_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.");
if (data->parameters[status_code_parameter_is_error].result == f_console_result_found) {
if (data->parameters[status_code_parameter_is_warning].result == f_console_result_found) {
- 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, status_code_long_is_error);
- fl_color_print(f_type_error, data->context.error, data->context.reset, "' cannot be used with the parameter ");
- fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, status_code_long_is_warning);
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, ".");
+ fl_color_print(f_type_error, data->context.set.error, "ERROR: The parameter '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, status_code_long_is_error);
+ fl_color_print(f_type_error, data->context.set.error, "' cannot be used with the parameter ");
+ fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, status_code_long_is_warning);
+ fl_color_print_line(f_type_error, data->context.set.error, ".");
status_code_delete_data(data);
return F_status_set_error(status);
}
else if (data->parameters[status_code_parameter_is_fine].result == f_console_result_found) {
- 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, status_code_long_is_error);
- fl_color_print(f_type_error, data->context.error, data->context.reset, "' cannot be used with the parameter ");
- fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, status_code_long_is_fine);
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, ".");
+ fl_color_print(f_type_error, data->context.set.error, "ERROR: The parameter '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, status_code_long_is_error);
+ fl_color_print(f_type_error, data->context.set.error, "' cannot be used with the parameter ");
+ fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, status_code_long_is_fine);
+ fl_color_print_line(f_type_error, data->context.set.error, ".");
status_code_delete_data(data);
return F_status_set_error(status);
}
}
else if (data->parameters[status_code_parameter_is_warning].result == f_console_result_found && data->parameters[status_code_parameter_is_fine].result == f_console_result_found) {
- 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, status_code_long_is_warning);
- fl_color_print(f_type_error, data->context.error, data->context.reset, "' cannot be used with the parameter ");
- fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, status_code_long_is_fine);
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, ".");
+ fl_color_print(f_type_error, data->context.set.error, "ERROR: The parameter '");
+ fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, status_code_long_is_warning);
+ fl_color_print(f_type_error, data->context.set.error, "' cannot be used with the parameter ");
+ fl_color_print(f_type_error, data->context.set.notable, "%s%s", f_console_symbol_long_enable, status_code_long_is_fine);
+ fl_color_print_line(f_type_error, data->context.set.error, ".");
status_code_delete_data(data);
return F_status_set_error(status);
}
if (data->remaining.used == 0 && !data->process_pipe) {
- fl_color_print_line(f_type_error, data->context.error, data->context.reset, "ERROR: You failed to specify a status code.");
+ fl_color_print_line(f_type_error, data->context.set.error, "ERROR: You failed to specify a status code.");
status_code_delete_data(data);
return F_status_set_error(F_parameter);
} // while
f_macro_string_lengths_t_delete_simple(data->remaining);
- fl_macro_color_context_t_delete_simple(data->context);
+ f_macro_color_context_t_delete_simple(data->context);
return F_none;
}
f_string_lengths_t remaining;
bool process_pipe;
- fl_color_context_t context;
+ f_color_context_t context;
} status_code_data_t;
#define status_code_data_t_initialize \
status_code_console_parameter_t_initialize, \
f_string_lengths_t_initialize, \
F_false, \
- fl_color_context_t_initialize, \
+ f_color_context_t_initialize, \
}
#endif // _di_status_code_data_t_
* F_none on success.
*/
#ifndef _di_status_code_print_help_
- extern f_return_status status_code_print_help(const fl_color_context_t context);
+ extern f_return_status status_code_print_help(const f_color_context_t context);
#endif // _di_status_code_print_help_
/**