#define f_color_set_t_initialize { 0, 0 }
+ #define f_macro_color_set_t_initialize(before, after) { before, after }
+
#define f_macro_color_set_t_clear(set) \
set.before = 0; \
set.after = 0;
#endif // _di_f_color_set_t_
/**
- * Set the context and notable to this to safely allow for fprintf uses when there is no color to be used.
+ * Provide a global (static) color set of global (static) empty strings.
*/
-#ifndef _di_f_color_set_string_null_s_
- const static f_string_static_t f_color_set_string_null_s = f_macro_string_static_t_initialize(f_string_empty_s, 0);
-#endif // _di_f_color_set_string_null_s_
+#ifndef _di_f_color_set_string_empty_s_
+ const static f_color_set_t f_color_set_empty_s = f_macro_color_set_t_initialize(&f_string_static_empty_s, &f_string_static_empty_s);
+#endif // _di_f_color_set_string_empty_s_
/**
* Provide a set of color contexts.
#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_initialize(warning, error, title, notable, important, standout, normal, normal_reset) { warning, error, title, notable, important, standout, normal, normal_reset }
+
#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); \
const static f_string_t f_string_placeholder_s = f_string_placeholder;
#endif // _di_f_string_has_placeholder_
+#ifndef _di_f_string_static_empty_s_
+ const static f_string_static_t f_string_static_empty_s = f_macro_string_static_t_initialize(f_string_empty_s, 0);
+#endif // _di_f_string_static_empty_s_
+
#ifdef __cplusplus
} // extern "C"
#endif
if (!string) return F_data_not;
if (range->start > range->stop) return F_data_not_stop;
- while (string[range->start] != f_string_eol[0]) {
+ while (string[range->start] != f_string_eol_s[0]) {
range->start++;
if (range->start > range->stop) return F_none_stop;
while (string[range->start] != seek_to_this) {
- if (string[range->start] == f_string_eol[0]) return F_none_eol;
+ if (string[range->start] == f_string_eol_s[0]) return F_none_eol;
range->start++;
if (!width) {
width = 1;
- if (string[range->start] == f_string_eol[0]) return F_none_eol;
+ if (string[range->start] == f_string_eol_s[0]) return F_none_eol;
if (seek_width == width) {
if (string[range->start] == seek_to_this) return F_none;
while (string[range->start] == placeholder || (status = f_utf_is_graph(string + range->start, width_max)) == F_false) {
if (F_status_is_error(status)) return status;
- if (string[range->start] == f_string_eol[0]) return F_none_eol;
+ if (string[range->start] == f_string_eol_s[0]) return F_none_eol;
width = f_macro_utf_byte_width_is(string[range->start]);
while (string[range->start] == placeholder || (status = f_utf_is_whitespace(string + range->start, width_max)) == F_false) {
if (F_status_is_error(status)) return status;
- if (string[range->start] == f_string_eol[0]) return F_none_eol;
+ if (string[range->start] == f_string_eol_s[0]) return F_none_eol;
width = f_macro_utf_byte_width_is(string[range->start]);
if (range->start > range->stop) return F_data_not_stop;
while (string[range->start] != seek_to) {
- if (string[range->start] == f_string_eol[0]) return F_none_eol;
+ if (string[range->start] == f_string_eol_s[0]) return F_none_eol;
range->start++;
if (!width) {
width = 1;
- if (string[range->start] == f_string_eol[0]) return F_none_eol;
+ if (string[range->start] == f_string_eol_s[0]) return F_none_eol;
if (seek_width == width) {
if (string[range->start] == seek_to) return F_none;
while (string[range->start] == placeholder || (status = f_utf_is_graph(string + range->start, width_max)) == F_false) {
if (F_status_is_error(status)) return status;
- if (string[range->start] == f_string_eol[0]) return F_none_eol;
+ if (string[range->start] == f_string_eol_s[0]) return F_none_eol;
width = f_macro_utf_byte_width_is(string[range->start]);
return status;
}
- if (string[range->start] == f_string_eol[0]) return F_none_eol;
+ if (string[range->start] == f_string_eol_s[0]) return F_none_eol;
width = f_macro_utf_byte_width_is(string[range->start]);
if (status == F_access_denied) {
if (error.verbosity != f_console_verbosity_quiet) {
- fprintf(error.to.stream, "%c", f_string_eol[0]);
- fprintf(error.to.stream, "%s%sAccess denied while trying to %s %s '", error.context.before->string, error.prefix ? error.prefix : f_string_empty_s, operation, type_name);
+ fprintf(error.to.stream, "%c", f_string_eol_s[0]);
+ fprintf(error.to.stream, "%s%sAccess denied while trying to %s %s '", error.context.before->string, error.prefix, operation, type_name);
fprintf(error.to.stream, "%s%s%s%s", error.context.after->string, error.notable.before->string, name, error.notable.after->string);
- fprintf(error.to.stream, "%s'.%s%c", error.context.before->string, error.context.after->string, f_string_eol[0]);
+ fprintf(error.to.stream, "%s'.%s%c", error.context.before->string, error.context.after->string, f_string_eol_s[0]);
}
return F_false;
if (status == F_access_group) {
if (error.verbosity != f_console_verbosity_quiet) {
- fprintf(error.to.stream, "%c", f_string_eol[0]);
- fprintf(error.to.stream, "%s%sCurrrent user is not allowed to use the given group while trying to %s %s '", error.context.before->string, error.prefix ? error.prefix : f_string_empty_s, operation, type_name);
+ fprintf(error.to.stream, "%c", f_string_eol_s[0]);
+ fprintf(error.to.stream, "%s%sCurrrent user is not allowed to use the given group while trying to %s %s '", error.context.before->string, error.prefix, operation, type_name);
fprintf(error.to.stream, "%s%s%s%s", error.context.after->string, error.notable.before->string, name, error.notable.after->string);
- fprintf(error.to.stream, "%s'.%s%c", error.context.before->string, error.context.after->string, f_string_eol[0]);
+ fprintf(error.to.stream, "%s'.%s%c", error.context.before->string, error.context.after->string, f_string_eol_s[0]);
}
return F_false;
if (status == F_access_owner) {
if (error.verbosity != f_console_verbosity_quiet) {
- fprintf(error.to.stream, "%c", f_string_eol[0]);
- fprintf(error.to.stream, "%s%sCurrrent user is not allowed to use the given owner while trying to %s %s '", error.context.before->string, error.prefix ? error.prefix : f_string_empty_s, operation, type_name);
+ fprintf(error.to.stream, "%c", f_string_eol_s[0]);
+ fprintf(error.to.stream, "%s%sCurrrent user is not allowed to use the given owner while trying to %s %s '", error.context.before->string, error.prefix, operation, type_name);
fprintf(error.to.stream, "%s%s%s%s", error.context.after->string, error.notable.before->string, name, error.notable.after->string);
- fprintf(error.to.stream, "%s'.%s%c", error.context.before->string, error.context.after->string, f_string_eol[0]);
+ fprintf(error.to.stream, "%s'.%s%c", error.context.before->string, error.context.after->string, f_string_eol_s[0]);
}
return F_false;
if (status == F_directory) {
if (error.verbosity != f_console_verbosity_quiet) {
- fprintf(error.to.stream, "%c", f_string_eol[0]);
- fprintf(error.to.stream, "%s%sInvalid directory while trying to %s %s '", error.context.before->string, error.prefix ? error.prefix : f_string_empty_s, operation, type_name);
+ fprintf(error.to.stream, "%c", f_string_eol_s[0]);
+ fprintf(error.to.stream, "%s%sInvalid directory while trying to %s %s '", error.context.before->string, error.prefix, operation, type_name);
fprintf(error.to.stream, "%s%s%s%s", error.context.after->string, error.notable.before->string, name, error.notable.after->string);
- fprintf(error.to.stream, "%s'.%s%c", error.context.before->string, error.context.after->string, f_string_eol[0]);
+ fprintf(error.to.stream, "%s'.%s%c", error.context.before->string, error.context.after->string, f_string_eol_s[0]);
}
return F_false;
if (status == F_directory_empty_not) {
if (error.verbosity != f_console_verbosity_quiet) {
- fprintf(error.to.stream, "%c", f_string_eol[0]);
- fprintf(error.to.stream, "%s%sThe %s '", error.context.before->string, error.prefix ? error.prefix : f_string_empty_s, type_name);
+ fprintf(error.to.stream, "%c", f_string_eol_s[0]);
+ fprintf(error.to.stream, "%s%sThe %s '", error.context.before->string, error.prefix, type_name);
fprintf(error.to.stream, "%s%s%s%s", error.context.after->string, error.notable.before->string, name, error.notable.after->string);
- fprintf(error.to.stream, "%s' is not empty.%s%c", error.context.before->string, error.context.after->string, f_string_eol[0]);
+ fprintf(error.to.stream, "%s' is not empty.%s%c", error.context.before->string, error.context.after->string, f_string_eol_s[0]);
}
return F_false;
if (status == F_file_closed) {
if (error.verbosity != f_console_verbosity_quiet) {
- fprintf(error.to.stream, "%c", f_string_eol[0]);
- fprintf(error.to.stream, "%s%sThe %s '", error.context.before->string, error.prefix ? error.prefix : f_string_empty_s, type_name);
+ fprintf(error.to.stream, "%c", f_string_eol_s[0]);
+ fprintf(error.to.stream, "%s%sThe %s '", error.context.before->string, error.prefix, type_name);
fprintf(error.to.stream, "%s%s%s%s", error.context.after->string, error.notable.before->string, name, error.notable.after->string);
- fprintf(error.to.stream, "%s' is not open.%s%c", error.context.before->string, error.context.after->string, f_string_eol[0]);
+ fprintf(error.to.stream, "%s' is not open.%s%c", error.context.before->string, error.context.after->string, f_string_eol_s[0]);
}
return F_false;
if (status == F_file_found) {
if (error.verbosity != f_console_verbosity_quiet) {
- fprintf(error.to.stream, "%c", f_string_eol[0]);
- fprintf(error.to.stream, "%s%sThe %s '", error.context.before->string, error.prefix ? error.prefix : f_string_empty_s, type_name);
+ fprintf(error.to.stream, "%c", f_string_eol_s[0]);
+ fprintf(error.to.stream, "%s%sThe %s '", error.context.before->string, error.prefix, type_name);
fprintf(error.to.stream, "%s%s%s%s", error.context.after->string, error.notable.before->string, name, error.notable.after->string);
- fprintf(error.to.stream, "%s' already exists.%s%c", error.context.before->string, error.context.after->string, f_string_eol[0]);
+ fprintf(error.to.stream, "%s' already exists.%s%c", error.context.before->string, error.context.after->string, f_string_eol_s[0]);
}
return F_false;
if (status == F_file_found_not) {
if (error.verbosity != f_console_verbosity_quiet) {
- fprintf(error.to.stream, "%c", f_string_eol[0]);
- fprintf(error.to.stream, "%s%sFailed to find %s '", error.context.before->string, error.prefix ? error.prefix : f_string_empty_s, type_name);
+ fprintf(error.to.stream, "%c", f_string_eol_s[0]);
+ fprintf(error.to.stream, "%s%sFailed to find %s '", error.context.before->string, error.prefix, type_name);
fprintf(error.to.stream, "%s%s%s%s", error.context.after->string, error.notable.before->string, name, error.notable.after->string);
- fprintf(error.to.stream, "%s'.%s%c", error.context.before->string, error.context.after->string, f_string_eol[0]);
+ fprintf(error.to.stream, "%s'.%s%c", error.context.before->string, error.context.after->string, f_string_eol_s[0]);
}
return F_false;
}
if (status == F_file_open) {
- fprintf(error.to.stream, "%s%sUnable to open the %s '", error.context.before->string, error.prefix ? error.prefix : f_string_empty_s, type_name);
+ fprintf(error.to.stream, "%s%sUnable to open the %s '", error.context.before->string, error.prefix, type_name);
fprintf(error.to.stream, "%s%s%s%s", error.context.after->string, error.notable.before->string, name, error.notable.after->string);
- fprintf(error.to.stream, "%s'.%s%c", error.context.before->string, error.context.after->string, f_string_eol[0]);
+ fprintf(error.to.stream, "%s'.%s%c", error.context.before->string, error.context.after->string, f_string_eol_s[0]);
return F_false;
}
if (status == F_file_descriptor) {
- fprintf(error.to.stream, "%s%sFile descriptor error while trying to open the %s '", error.context.before->string, error.prefix ? error.prefix : f_string_empty_s, type_name);
+ fprintf(error.to.stream, "%s%sFile descriptor error while trying to open the %s '", error.context.before->string, error.prefix, type_name);
fprintf(error.to.stream, "%s%s%s%s", error.context.after->string, error.notable.before->string, name, error.notable.after->string);
- fprintf(error.to.stream, "%c", f_string_eol[0]);
+ fprintf(error.to.stream, "%c", f_string_eol_s[0]);
return F_false;
}
if (status == F_number_underflow) {
- fprintf(error.to.stream, "%s%sInteger underflow while trying to buffer the %s '", error.context.before->string, error.prefix ? error.prefix : f_string_empty_s, type_name);
+ fprintf(error.to.stream, "%s%sInteger underflow while trying to buffer the %s '", error.context.before->string, error.prefix, type_name);
fprintf(error.to.stream, "%s%s%s%s", error.context.after->string, error.notable.before->string, name, error.notable.after->string);
- fprintf(error.to.stream, "%s'.%s%c", error.context.before->string, error.context.after->string, f_string_eol[0]);
+ fprintf(error.to.stream, "%s'.%s%c", error.context.before->string, error.context.after->string, f_string_eol_s[0]);
return F_false;
}
if (status == F_file_read) {
if (error.verbosity != f_console_verbosity_quiet) {
- fprintf(error.to.stream, "%c", f_string_eol[0]);
- fprintf(error.to.stream, "%s%sA read error occurred while accessing the %s '", error.context.before->string, error.prefix ? error.prefix : f_string_empty_s, type_name);
+ fprintf(error.to.stream, "%c", f_string_eol_s[0]);
+ fprintf(error.to.stream, "%s%sA read error occurred while accessing the %s '", error.context.before->string, error.prefix, type_name);
fprintf(error.to.stream, "%s%s%s%s", error.context.after->string, error.notable.before->string, name, error.notable.after->string);
- fprintf(error.to.stream, "%s'.%s%c", error.context.before->string, error.context.after->string, f_string_eol[0]);
+ fprintf(error.to.stream, "%s'.%s%c", error.context.before->string, error.context.after->string, f_string_eol_s[0]);
}
return F_false;
if (status == F_file_seek) {
if (error.verbosity != f_console_verbosity_quiet) {
- fprintf(error.to.stream, "%c", f_string_eol[0]);
- fprintf(error.to.stream, "%s%sA seek error occurred while accessing the %s '", error.context.before->string, error.prefix ? error.prefix : f_string_empty_s, type_name);
+ fprintf(error.to.stream, "%c", f_string_eol_s[0]);
+ fprintf(error.to.stream, "%s%sA seek error occurred while accessing the %s '", error.context.before->string, error.prefix, type_name);
fprintf(error.to.stream, "%s%s%s%s", error.context.after->string, error.notable.before->string, name, error.notable.after->string);
- fprintf(error.to.stream, "%s'.%s%c", error.context.before->string, error.context.after->string, f_string_eol[0]);
+ fprintf(error.to.stream, "%s'.%s%c", error.context.before->string, error.context.after->string, f_string_eol_s[0]);
}
return F_false;
if (status == F_loop) {
if (error.verbosity != f_console_verbosity_quiet) {
- fprintf(error.to.stream, "%c", f_string_eol[0]);
- fprintf(error.to.stream, "%s%sLoop while trying to %s %s '", error.context.before->string, error.prefix ? error.prefix : f_string_empty_s, operation, type_name);
+ fprintf(error.to.stream, "%c", f_string_eol_s[0]);
+ fprintf(error.to.stream, "%s%sLoop while trying to %s %s '", error.context.before->string, error.prefix, operation, type_name);
fprintf(error.to.stream, "%s%s%s%s", error.context.after->string, error.notable.before->string, name, error.notable.after->string);
- fprintf(error.to.stream, "%s'.%s%c", error.context.before->string, error.context.after->string, f_string_eol[0]);
+ fprintf(error.to.stream, "%s'.%s%c", error.context.before->string, error.context.after->string, f_string_eol_s[0]);
}
return F_false;
if (status == F_name) {
if (error.verbosity != f_console_verbosity_quiet) {
- fprintf(error.to.stream, "%c", f_string_eol[0]);
- fprintf(error.to.stream, "%s%sInvalid %s name '", error.context.before->string, error.prefix ? error.prefix : f_string_empty_s, type_name);
+ fprintf(error.to.stream, "%c", f_string_eol_s[0]);
+ fprintf(error.to.stream, "%s%sInvalid %s name '", error.context.before->string, error.prefix, type_name);
fprintf(error.to.stream, "%s%s%s%s", error.context.after->string, error.notable.before->string, name, error.notable.after->string);
- fprintf(error.to.stream, "%s'.%s%c", error.context.before->string, error.context.after->string, f_string_eol[0]);
+ fprintf(error.to.stream, "%s'.%s%c", error.context.before->string, error.context.after->string, f_string_eol_s[0]);
}
return F_false;
if (status == F_number_overflow) {
if (error.verbosity != f_console_verbosity_quiet) {
- fprintf(error.to.stream, "%c", f_string_eol[0]);
- fprintf(error.to.stream, "%s%sOverflow while trying to %s %s '", error.context.before->string, error.prefix ? error.prefix : f_string_empty_s, operation, type_name);
+ fprintf(error.to.stream, "%c", f_string_eol_s[0]);
+ fprintf(error.to.stream, "%s%sOverflow while trying to %s %s '", error.context.before->string, error.prefix, operation, type_name);
fprintf(error.to.stream, "%s%s%s%s", error.context.after->string, error.notable.before->string, name, error.notable.after->string);
- fprintf(error.to.stream, "%s'.%s%c", error.context.before->string, error.context.after->string, f_string_eol[0]);
+ fprintf(error.to.stream, "%s'.%s%c", error.context.before->string, error.context.after->string, f_string_eol_s[0]);
}
return F_false;
if (status == F_parameter) {
if (error.verbosity != f_console_verbosity_quiet) {
- fprintf(error.to.stream, "%c", f_string_eol[0]);
- fprintf(error.to.stream, "%s%sInvalid parameter", error.context.before->string, error.prefix ? error.prefix : f_string_empty_s);
+ fprintf(error.to.stream, "%c", f_string_eol_s[0]);
+ fprintf(error.to.stream, "%s%sInvalid parameter", error.context.before->string, error.prefix);
private_fll_error_print_function(error, function);
fprintf(error.to.stream, " for the %s '", type_name);
fprintf(error.to.stream, "%s%s%s%s", error.context.after->string, error.notable.before->string, name, error.notable.after->string);
- fprintf(error.to.stream, "%s'.%s%c", error.context.before->string, error.context.after->string, f_string_eol[0]);
+ fprintf(error.to.stream, "%s'.%s%c", error.context.before->string, error.context.after->string, f_string_eol_s[0]);
}
return F_false;
if (status == F_prohibited) {
if (error.verbosity != f_console_verbosity_quiet) {
- fprintf(error.to.stream, "%c", f_string_eol[0]);
- fprintf(error.to.stream, "%s%sProhibited by system while trying to %s %s '", error.context.before->string, error.prefix ? error.prefix : f_string_empty_s, operation, type_name);
+ fprintf(error.to.stream, "%c", f_string_eol_s[0]);
+ fprintf(error.to.stream, "%s%sProhibited by system while trying to %s %s '", error.context.before->string, error.prefix, operation, type_name);
fprintf(error.to.stream, "%s%s%s%s", error.context.after->string, error.notable.before->string, name, error.notable.after->string);
- fprintf(error.to.stream, "%s'.%s%c", error.context.before->string, error.context.after->string, f_string_eol[0]);
+ fprintf(error.to.stream, "%s'.%s%c", error.context.before->string, error.context.after->string, f_string_eol_s[0]);
}
return F_false;
if (type == fll_error_file_type_file) {
if (status == F_file_type_not_directory) {
if (error.verbosity != f_console_verbosity_quiet) {
- fprintf(error.to.stream, "%c", f_string_eol[0]);
- fprintf(error.to.stream, "%s%sInvalid or missing directory in path while trying to %s %s '", error.context.before->string, error.prefix ? error.prefix : f_string_empty_s, operation, type_name);
+ fprintf(error.to.stream, "%c", f_string_eol_s[0]);
+ fprintf(error.to.stream, "%s%sInvalid or missing directory in path while trying to %s %s '", error.context.before->string, error.prefix, operation, type_name);
fprintf(error.to.stream, "%s%s%s%s", error.context.after->string, error.notable.before->string, name, error.notable.after->string);
- fprintf(error.to.stream, "%s'.%s%c", error.context.before->string, error.context.after->string, f_string_eol[0]);
+ fprintf(error.to.stream, "%s'.%s%c", error.context.before->string, error.context.after->string, f_string_eol_s[0]);
}
return F_false;
if (type == fll_error_file_type_file || type == fll_error_file_type_directory) {
if (status == F_directory_found_not) {
if (error.verbosity != f_console_verbosity_quiet) {
- fprintf(error.to.stream, "%c", f_string_eol[0]);
- fprintf(error.to.stream, "%s%sFailed to %s %s '", error.context.before->string, error.prefix ? error.prefix : f_string_empty_s, operation, type_name);
+ fprintf(error.to.stream, "%c", f_string_eol_s[0]);
+ fprintf(error.to.stream, "%s%sFailed to %s %s '", error.context.before->string, error.prefix, operation, type_name);
fprintf(error.to.stream, "%s%s%s%s", error.context.after->string, error.notable.before->string, name, error.notable.after->string);
- fprintf(error.to.stream, "%s' due to an invalid directory in the path.%s%c", error.context.before->string, error.context.after->string, f_string_eol[0]);
+ fprintf(error.to.stream, "%s' due to an invalid directory in the path.%s%c", error.context.before->string, error.context.after->string, f_string_eol_s[0]);
}
return F_false;
if (type == fll_error_file_type_directory) {
if (status == F_failure) {
if (error.verbosity != f_console_verbosity_quiet) {
- fprintf(error.to.stream, "%c", f_string_eol[0]);
- fprintf(error.to.stream, "%s%sFailed to %s %s '", error.context.before->string, error.prefix ? error.prefix : f_string_empty_s, operation, type_name);
+ fprintf(error.to.stream, "%c", f_string_eol_s[0]);
+ fprintf(error.to.stream, "%s%sFailed to %s %s '", error.context.before->string, error.prefix, operation, type_name);
fprintf(error.to.stream, "%s%s%s%s", error.context.after->string, error.notable.before->string, name, error.notable.after->string);
- fprintf(error.to.stream, "%s'.%s%c", error.context.before->string, error.context.after->string, f_string_eol[0]);
+ fprintf(error.to.stream, "%s'.%s%c", error.context.before->string, error.context.after->string, f_string_eol_s[0]);
}
return F_false;
if (status == F_data_not) {
if (error.verbosity != f_console_verbosity_quiet) {
- fprintf(error.to.stream, "%c", f_string_eol[0]);
- fprintf(error.to.stream, "%s%sThe argument for the parameter '", error.context.before->string, error.prefix ? error.prefix : f_string_empty_s);
+ fprintf(error.to.stream, "%c", f_string_eol_s[0]);
+ fprintf(error.to.stream, "%s%sThe argument for the parameter '", error.context.before->string, error.prefix);
fprintf(error.to.stream, "%s%s%s%s", error.context.after->string, error.notable.before->string, parameter, error.notable.after->string);
- fprintf(error.to.stream, "%s' must not be an empty string.%s%c", error.context.before->string, error.context.after->string, f_string_eol[0]);
+ fprintf(error.to.stream, "%s' must not be an empty string.%s%c", error.context.before->string, error.context.after->string, f_string_eol_s[0]);
}
return F_false;
if (status == F_number) {
if (error.verbosity != f_console_verbosity_quiet) {
- fprintf(error.to.stream, "%c", f_string_eol[0]);
- fprintf(error.to.stream, "%s%sThe argument '", error.context.before->string, error.prefix ? error.prefix : f_string_empty_s);
+ fprintf(error.to.stream, "%c", f_string_eol_s[0]);
+ fprintf(error.to.stream, "%s%sThe argument '", error.context.before->string, error.prefix);
fprintf(error.to.stream, "%s%s%s%s", error.context.after->string, error.notable.before->string, argument, error.notable.after->string);
fprintf(error.to.stream, "%s' is not a valid number for the parameter '", error.context.before->string);
fprintf(error.to.stream, "%s%s%s%s", error.context.after->string, error.notable.before->string, parameter, error.notable.after->string);
- fprintf(error.to.stream, "%s'.%s%c", error.context.before->string, error.context.after->string, f_string_eol[0]);
+ fprintf(error.to.stream, "%s'.%s%c", error.context.before->string, error.context.after->string, f_string_eol_s[0]);
}
return F_false;
if (status == F_number_negative) {
if (error.verbosity != f_console_verbosity_quiet) {
- fprintf(error.to.stream, "%c", f_string_eol[0]);
- fprintf(error.to.stream, "%s%sThe argument '", error.context.before->string, error.prefix ? error.prefix : f_string_empty_s);
+ fprintf(error.to.stream, "%c", f_string_eol_s[0]);
+ fprintf(error.to.stream, "%s%sThe argument '", error.context.before->string, error.prefix);
fprintf(error.to.stream, "%s%s%s%s", error.context.after->string, error.notable.before->string, argument, error.notable.after->string);
fprintf(error.to.stream, "%s' is negative, which is not allowed for the parameter '", error.context.before->string);
fprintf(error.to.stream, "%s%s%s%s", error.context.after->string, error.notable.before->string, parameter, error.notable.after->string);
- fprintf(error.to.stream, "%s'.%s%c", error.context.before->string, error.context.after->string, f_string_eol[0]);
+ fprintf(error.to.stream, "%s'.%s%c", error.context.before->string, error.context.after->string, f_string_eol_s[0]);
}
return F_false;
if (status == F_number_overflow) {
if (error.verbosity != f_console_verbosity_quiet) {
- fprintf(error.to.stream, "%c", f_string_eol[0]);
- fprintf(error.to.stream, "%s%sThe argument '", error.context.before->string, error.prefix ? error.prefix : f_string_empty_s);
+ fprintf(error.to.stream, "%c", f_string_eol_s[0]);
+ fprintf(error.to.stream, "%s%sThe argument '", error.context.before->string, error.prefix);
fprintf(error.to.stream, "%s%s%s%s", error.context.after->string, error.notable.before->string, argument, error.notable.after->string);
fprintf(error.to.stream, "%s' is too large for the parameter '", error.context.before->string);
fprintf(error.to.stream, "%s%s%s%s", error.context.after->string, error.notable.before->string, parameter, error.notable.after->string);
- fprintf(error.to.stream, "%s'.%s%c", error.context.before->string, error.context.after->string, f_string_eol[0]);
+ fprintf(error.to.stream, "%s'.%s%c", error.context.before->string, error.context.after->string, f_string_eol_s[0]);
}
return F_false;
if (status == F_number_positive) {
if (error.verbosity != f_console_verbosity_quiet) {
- fprintf(error.to.stream, "%c", f_string_eol[0]);
- fprintf(error.to.stream, "%s%sThe argument '", error.context.before->string, error.prefix ? error.prefix : f_string_empty_s);
+ fprintf(error.to.stream, "%c", f_string_eol_s[0]);
+ fprintf(error.to.stream, "%s%sThe argument '", error.context.before->string, error.prefix);
fprintf(error.to.stream, "%s%s%s%s", error.context.after->string, error.notable.before->string, argument, error.notable.after->string);
fprintf(error.to.stream, "%s' is positive, which is not allowed for the parameter '", error.context.before->string);
fprintf(error.to.stream, "%s%s%s%s", error.context.after->string, error.notable.before->string, parameter, error.notable.after->string);
- fprintf(error.to.stream, "%s'.%s%c", error.context.before->string, error.context.after->string, f_string_eol[0]);
+ fprintf(error.to.stream, "%s'.%s%c", error.context.before->string, error.context.after->string, f_string_eol_s[0]);
}
return F_false;
if (status == F_number_underflow) {
if (error.verbosity != f_console_verbosity_quiet) {
- fprintf(error.to.stream, "%c", f_string_eol[0]);
- fprintf(error.to.stream, "%s%sThe argument '", error.context.before->string, error.prefix ? error.prefix : f_string_empty_s);
+ fprintf(error.to.stream, "%c", f_string_eol_s[0]);
+ fprintf(error.to.stream, "%s%sThe argument '", error.context.before->string, error.prefix);
fprintf(error.to.stream, "%s%s%s%s", error.context.after->string, error.notable.before->string, argument, error.notable.after->string);
fprintf(error.to.stream, "%s' is too small for the parameter '", error.context.before->string);
fprintf(error.to.stream, "%s%s%s%s", error.context.after->string, error.notable.before->string, parameter, error.notable.after->string);
- fprintf(error.to.stream, "%s'.%s%c", error.context.before->string, error.context.after->string, f_string_eol[0]);
+ fprintf(error.to.stream, "%s'.%s%c", error.context.before->string, error.context.after->string, f_string_eol_s[0]);
}
return F_false;
if (status == F_array_too_large) {
if (error.verbosity != f_console_verbosity_quiet) {
- fprintf(error.to.stream, "%c", f_string_eol[0]);
- fprintf(error.to.stream, "%s%sMaximum array length reached while processing ", error.context.before->string, error.prefix ? error.prefix : f_string_empty_s);
+ fprintf(error.to.stream, "%c", f_string_eol_s[0]);
+ fprintf(error.to.stream, "%s%sMaximum array length reached while processing ", error.context.before->string, error.prefix);
private_fll_error_print_function(error, function);
- fprintf(error.to.stream, ".%s%c", error.context.after->string, f_string_eol[0]);
+ fprintf(error.to.stream, ".%s%c", error.context.after->string, f_string_eol_s[0]);
}
return F_false;
if (status == F_buffer_too_large) {
if (error.verbosity != f_console_verbosity_quiet) {
- fprintf(error.to.stream, "%c", f_string_eol[0]);
- fprintf(error.to.stream, "%s%sMaximum buffer length reached while processing ", error.context.before->string, error.prefix ? error.prefix : f_string_empty_s);
+ fprintf(error.to.stream, "%c", f_string_eol_s[0]);
+ fprintf(error.to.stream, "%s%sMaximum buffer length reached while processing ", error.context.before->string, error.prefix);
private_fll_error_print_function(error, function);
- fprintf(error.to.stream, ".%s%c", error.context.after->string, f_string_eol[0]);
+ fprintf(error.to.stream, ".%s%c", error.context.after->string, f_string_eol_s[0]);
}
return F_false;
if (status == F_memory_allocation || status == F_memory_reallocation || status == F_memory_not) {
if (error.verbosity != f_console_verbosity_quiet) {
- fprintf(error.to.stream, "%c", f_string_eol[0]);
- fprintf(error.to.stream, "%s%sUnable to allocate memory in function ", error.context.before->string, error.prefix ? error.prefix : f_string_empty_s);
+ fprintf(error.to.stream, "%c", f_string_eol_s[0]);
+ fprintf(error.to.stream, "%s%sUnable to allocate memory in function ", error.context.before->string, error.prefix);
private_fll_error_print_function(error, function);
- fprintf(error.to.stream, ".%s%c", error.context.after->string, f_string_eol[0]);
+ fprintf(error.to.stream, ".%s%c", error.context.after->string, f_string_eol_s[0]);
}
return F_false;
if (status == F_parameter) {
if (error.verbosity != f_console_verbosity_quiet) {
- fprintf(error.to.stream, "%c", f_string_eol[0]);
- fprintf(error.to.stream, "%s%sInvalid parameter", error.context.before->string, error.prefix ? error.prefix : f_string_empty_s);
+ fprintf(error.to.stream, "%c", f_string_eol_s[0]);
+ fprintf(error.to.stream, "%s%sInvalid parameter", error.context.before->string, error.prefix);
private_fll_error_print_function(error, function);
- fprintf(error.to.stream, ".%s%c", error.context.after->string, f_string_eol[0]);
+ fprintf(error.to.stream, ".%s%c", error.context.after->string, f_string_eol_s[0]);
}
return F_false;
if (status == F_string_too_large) {
if (error.verbosity != f_console_verbosity_quiet) {
- fprintf(error.to.stream, "%c", f_string_eol[0]);
- fprintf(error.to.stream, "%s%sMaximum string length reached while processing ", error.context.before->string, error.prefix ? error.prefix : f_string_empty_s);
+ fprintf(error.to.stream, "%c", f_string_eol_s[0]);
+ fprintf(error.to.stream, "%s%sMaximum string length reached while processing ", error.context.before->string, error.prefix);
private_fll_error_print_function(error, function);
- fprintf(error.to.stream, ".%s%c", error.context.after->string, f_string_eol[0]);
+ fprintf(error.to.stream, ".%s%c", error.context.after->string, f_string_eol_s[0]);
}
return F_false;
if (status == F_utf) {
if (error.verbosity != f_console_verbosity_quiet) {
- fprintf(error.to.stream, "%c", f_string_eol[0]);
- fprintf(error.to.stream, "%s%sInvalid UTF-8 character while calling ", error.context.before->string, error.prefix ? error.prefix : f_string_empty_s);
+ fprintf(error.to.stream, "%c", f_string_eol_s[0]);
+ fprintf(error.to.stream, "%s%sInvalid UTF-8 character while calling ", error.context.before->string, error.prefix);
private_fll_error_print_function(error, function);
- fprintf(error.to.stream, ".%s%c", error.context.after->string, f_string_eol[0]);
+ fprintf(error.to.stream, ".%s%c", error.context.after->string, f_string_eol_s[0]);
}
return F_false;
if (status == F_complete_not_utf) {
if (error.verbosity != f_console_verbosity_quiet) {
- fprintf(error.to.stream, "%c", f_string_eol[0]);
- fprintf(error.to.stream, "%s%sInvalid (incomplete) UTF-8 character while calling ", error.context.before->string, error.prefix ? error.prefix : f_string_empty_s);
+ fprintf(error.to.stream, "%c", f_string_eol_s[0]);
+ fprintf(error.to.stream, "%s%sInvalid (incomplete) UTF-8 character while calling ", error.context.before->string, error.prefix);
private_fll_error_print_function(error, function);
- fprintf(error.to.stream, ".%s%c", error.context.after->string, f_string_eol[0]);
+ fprintf(error.to.stream, ".%s%c", error.context.after->string, f_string_eol_s[0]);
}
return F_false;
if (fallback && error.verbosity != f_console_verbosity_quiet) {
if (error.verbosity != f_console_verbosity_quiet) {
- fprintf(error.to.stream, "%c", f_string_eol[0]);
- fprintf(error.to.stream, "%s%s(", error.context.before->string, error.prefix ? error.prefix : f_string_empty_s);
+ fprintf(error.to.stream, "%c", f_string_eol_s[0]);
+ fprintf(error.to.stream, "%s%s(", error.context.before->string, error.prefix);
fprintf(error.to.stream, "%s%s%llu%s", error.context.after->string, error.notable.before->string, status, error.notable.after->string);
fprintf(error.to.stream, "%s)", error.context.before->string);
private_fll_error_print_function(error, function);
- fprintf(error.to.stream, ".%s%c", error.context.after->string, f_string_eol[0]);
+ fprintf(error.to.stream, ".%s%c", error.context.after->string, f_string_eol_s[0]);
}
}
#ifndef _di_fll_program_print_help_header_
f_return_status fll_program_print_help_header(const f_file_t file, const f_color_context_t context, const f_string_t name, const f_string_t version) {
- fprintf(file.stream, "%c", f_string_eol[0]);
+ fprintf(file.stream, "%c", f_string_eol_s[0]);
fl_color_print(file.stream, context.set.title, " %s", name);
- fprintf(file.stream, "%c", f_string_eol[0]);
+ fprintf(file.stream, "%c", f_string_eol_s[0]);
fl_color_print(file.stream, context.set.notable, " Version %s", version);
- fprintf(file.stream, "%c%c", f_string_eol[0], f_string_eol[0]);
+ fprintf(file.stream, "%c%c", f_string_eol_s[0], f_string_eol_s[0]);
fl_color_print(file.stream, context.set.important, " Available Options: ");
return F_none;
#ifndef _di_fll_program_print_help_option_
f_return_status fll_program_print_help_option(const f_file_t file, 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) {
- fprintf(file.stream, "%c %s", f_string_eol[0], symbol_short);
+ fprintf(file.stream, "%c %s", f_string_eol_s[0], symbol_short);
fl_color_print(file.stream, context.set.standout, option_short);
fprintf(file.stream, ", %s", symbol_long);
#ifndef _di_fll_program_print_help_option_long_
f_return_status fll_program_print_help_option_long(const f_file_t file, const f_color_context_t context, const f_string_t option_long, const f_string_t symbol_long, const f_string_t description) {
- fprintf(file.stream, "%c %s", f_string_eol[0], symbol_long);
+ fprintf(file.stream, "%c %s", f_string_eol_s[0], symbol_long);
fl_color_print(file.stream, context.set.standout, option_long);
fprintf(file.stream, " %s", description);
#ifndef _di_fll_program_print_help_option_other_
f_return_status fll_program_print_help_option_other(const f_file_t file, const f_color_context_t context, const f_string_t option_other, const f_string_t description) {
- fprintf(file.stream, "%c ", f_string_eol[0]);
+ fprintf(file.stream, "%c ", f_string_eol_s[0]);
fl_color_print(file.stream, context.set.standout, option_other);
fprintf(file.stream, " %s", description);
#ifndef _di_fll_program_print_help_usage_
f_return_status fll_program_print_help_usage(const f_file_t file, const f_color_context_t context, const f_string_t name, const f_string_t parameters) {
- fprintf(file.stream, "%c%c", f_string_eol[0], f_string_eol[0]);
+ fprintf(file.stream, "%c%c", f_string_eol_s[0], f_string_eol_s[0]);
fl_color_print(file.stream, context.set.important, " Usage:");
- fprintf(file.stream, "%c ", f_string_eol[0]);
+ fprintf(file.stream, "%c ", f_string_eol_s[0]);
fl_color_print(file.stream, context.set.standout, name);
fprintf(file.stream, " ");
fl_color_print(file.stream, context.set.notable, "]");
}
- fprintf(file.stream, "%c%c", f_string_eol[0], f_string_eol[0]);
+ fprintf(file.stream, "%c%c", f_string_eol_s[0], f_string_eol_s[0]);
return F_none;
}
#ifndef _di_fll_program_print_version_
f_return_status fll_program_print_version(const f_file_t file, const f_string_t version) {
- fprintf(file.stream, "%s%c", version, f_string_eol[0]);
+ fprintf(file.stream, "%s%c", version, f_string_eol_s[0]);
return F_none;
}
fll_program_print_help_option(output, context, f_console_standard_short_debug, f_console_standard_long_debug, f_console_symbol_short_disable, f_console_symbol_long_disable, " Enable debugging, inceasing verbosity beyond normal output.");
fll_program_print_help_option(output, context, f_console_standard_short_version, f_console_standard_long_version, f_console_symbol_short_disable, f_console_symbol_long_disable, " Print only the version number.");
- fprintf(output.stream, "%c", f_string_eol[0]);
+ fprintf(output.stream, "%c", f_string_eol_s[0]);
fll_program_print_help_option(output, context, byte_dump_short_binary, byte_dump_long_binary, f_console_symbol_short_enable, f_console_symbol_long_enable, " Display binary representation.");
fll_program_print_help_option(output, context, byte_dump_short_decimal, byte_dump_long_decimal, f_console_symbol_short_enable, f_console_symbol_long_enable, " Display decimal representation.");
fll_program_print_help_option(output, context, byte_dump_short_hexidecimal, byte_dump_long_hexidecimal, f_console_symbol_short_enable, f_console_symbol_long_enable, "Display hexadecimal representation.");
fll_program_print_help_option(output, context, byte_dump_short_octal, byte_dump_long_octal, f_console_symbol_short_enable, f_console_symbol_long_enable, " Display octal representation.");
- fprintf(output.stream, "%c", f_string_eol[0]);
+ fprintf(output.stream, "%c", f_string_eol_s[0]);
fll_program_print_help_option(output, context, byte_dump_short_first, byte_dump_long_first, f_console_symbol_short_enable, f_console_symbol_long_enable, " Start reading at this byte offset.");
fll_program_print_help_option(output, context, byte_dump_short_last, byte_dump_long_last, f_console_symbol_short_enable, f_console_symbol_long_enable, " Stop reading at this (inclusive) byte offset.");
fll_program_print_help_option(output, context, byte_dump_short_width, byte_dump_long_width, f_console_symbol_short_enable, f_console_symbol_long_enable, " Set number of columns of Bytes to display.");
- fprintf(output.stream, "%c", f_string_eol[0]);
+ fprintf(output.stream, "%c", f_string_eol_s[0]);
fll_program_print_help_option(output, context, byte_dump_short_text, byte_dump_long_text, f_console_symbol_short_enable, f_console_symbol_long_enable, " Include a column of text when displaying the bytes.");
fll_program_print_help_option(output, context, byte_dump_short_placeholder, byte_dump_long_placeholder, f_console_symbol_short_enable, f_console_symbol_long_enable, "Use a placeholder character instead of a space for placeholders.");
- fprintf(output.stream, "%c%c", f_string_eol[0], f_string_eol[0]);
+ fprintf(output.stream, "%c%c", f_string_eol_s[0], f_string_eol_s[0]);
fl_color_print(output.stream, context.set.important, " Special Options: ");
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, byte_dump_long_text);
fprintf(output.stream, " option, some UTF-8 characters may be replaced by your instance and cause display alignment issues.");
- fprintf(output.stream, "%c%c", f_string_eol[0], f_string_eol[0]);
+ fprintf(output.stream, "%c%c", f_string_eol_s[0], f_string_eol_s[0]);
fprintf(output.stream, " Special UTF-8 characters and non-spacing UTF-8 characters may be replaced with a space (or a placeholder when the ");
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, byte_dump_long_placeholder);
fprintf(output.stream, " option is used).");
- fprintf(output.stream, "%c%c", f_string_eol[0], f_string_eol[0]);
+ fprintf(output.stream, "%c%c", f_string_eol_s[0], f_string_eol_s[0]);
fprintf(output.stream, " UTF-8 \"Combining\" characters might have a space appended to allow a proper display but this may cause copy and paste issues.");
- fprintf(output.stream, "%c%c", f_string_eol[0], f_string_eol[0]);
+ fprintf(output.stream, "%c%c", f_string_eol_s[0], f_string_eol_s[0]);
fprintf(output.stream, " When ");
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, byte_dump_long_last);
fprintf(output.stream, " is used, any UTF-8 sequences will still be printed in full should any part is found within the requested range.");
- fprintf(output.stream, "%c%c", f_string_eol[0], f_string_eol[0]);
+ fprintf(output.stream, "%c%c", f_string_eol_s[0], f_string_eol_s[0]);
return F_none;
}
status = fll_program_parameter_process(arguments, parameters, choices, F_true, &data->remaining, &data->context);
- data->error.context = data->context.set.error;
- data->error.notable = data->context.set.notable;
+ if (data->context.set.error.before) {
+ data->error.context = data->context.set.error;
+ data->error.notable = data->context.set.notable;
+ }
+ else {
+ data->context.set.warning = f_color_set_empty_s;
+ data->context.set.error = f_color_set_empty_s;
+ data->context.set.title = f_color_set_empty_s;
+ data->context.set.notable = f_color_set_empty_s;
+ data->context.set.important = f_color_set_empty_s;
+ data->context.set.standout = f_color_set_empty_s;
+ data->context.set.normal = f_color_set_empty_s;
+ data->context.set.normal_reset = f_color_set_empty_s;
+
+ data->error.context = f_color_set_empty_s;
+ data->error.notable = f_color_set_empty_s;
+ }
if (F_status_is_error(status)) {
fll_error_print(data->error, F_status_set_fine(status), "f_console_parameter_prioritize_right", F_true);
if (data->parameters[byte_dump_parameter_width].result == f_console_result_found) {
fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, byte_dump_long_width);
- fl_color_print(data->error.to.stream, data->context.set.error, "' was specified, but no value was given.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' was specified, but no value was given.%c", f_string_eol_s[0]);
byte_dump_delete_data(data);
return F_status_set_error(status);
fl_color_print(data->error.to.stream, data->context.set.notable, "0");
fl_color_print(data->error.to.stream, data->context.set.error, " and ");
fl_color_print(data->error.to.stream, data->context.set.notable, "251");
- fl_color_print(data->error.to.stream, data->context.set.error, ".%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, ".%c", f_string_eol_s[0]);
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(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, byte_dump_long_first);
- fl_color_print(data->error.to.stream, data->context.set.error, "' was specified, but no value was given.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' was specified, but no value was given.%c", f_string_eol_s[0]);
byte_dump_delete_data(data);
return F_status_set_error(status);
fl_color_print(data->error.to.stream, data->context.set.notable, "0");
fl_color_print(data->error.to.stream, data->context.set.error, " and ");
fl_color_print(data->error.to.stream, data->context.set.notable, "%llu", f_number_t_size_unsigned);
- fl_color_print(data->error.to.stream, data->context.set.error, ".%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, ".%c", f_string_eol_s[0]);
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(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, byte_dump_long_last);
- fl_color_print(data->error.to.stream, data->context.set.error, "' was specified, but no value was given.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' was specified, but no value was given.%c", f_string_eol_s[0]);
byte_dump_delete_data(data);
return F_status_set_error(status);
fl_color_print(data->error.to.stream, data->context.set.notable, "0");
fl_color_print(data->error.to.stream, data->context.set.error, " and ");
fl_color_print(data->error.to.stream, data->context.set.notable, "%llu", f_number_t_size_unsigned);
- fl_color_print(data->error.to.stream, data->context.set.error, ".%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, ".%c", f_string_eol_s[0]);
byte_dump_delete_data(data);
return F_status_set_error(status);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, byte_dump_long_first);
fl_color_print(data->error.to.stream, data->context.set.error, "' value cannot be greater than the parameter '");
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, byte_dump_long_last);
- fl_color_print(data->error.to.stream, data->context.set.error, "' value.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' value.%c", f_string_eol_s[0]);
byte_dump_delete_data(data);
return F_status_set_error(status);
file.id = f_type_descriptor_input;
- printf("%c", f_string_eol[0]);
+ printf("%c", f_string_eol_s[0]);
fl_color_print(data->output.stream, data->context.set.title, "Piped Byte Dump: (in ");
if (data->mode == byte_dump_mode_hexidecimal) {
fl_color_print(data->output.stream, data->context.set.title, "Decimal");
}
- fl_color_print(data->output.stream, data->context.set.title, ")%c", f_string_eol[0]);
+ fl_color_print(data->output.stream, data->context.set.title, ")%c", f_string_eol_s[0]);
status = byte_dump_file(*data, "-", file);
return status;
}
- printf("%c", f_string_eol[0]);
+ printf("%c", f_string_eol_s[0]);
fl_color_print(data->output.stream, data->context.set.title, "Byte Dump of: ");
fl_color_print(data->output.stream, data->context.set.notable, "%s", arguments.argv[data->remaining.array[counter]]);
fl_color_print(data->output.stream, data->context.set.title, " (in ");
fl_color_print(data->output.stream, data->context.set.title, "Decimal");
}
- fl_color_print(data->output.stream, data->context.set.title, ")%c", f_string_eol[0]);
+ fl_color_print(data->output.stream, data->context.set.title, ")%c", f_string_eol_s[0]);
status = byte_dump_file(*data, arguments.argv[data->remaining.array[counter]], file);
}
}
else {
- fl_color_print(data->error.to.stream, data->context.set.error, "%sYou failed to specify one or more filenames.%c", fll_error_print_error, f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "%sYou failed to specify one or more filenames.%c", fll_error_print_error, f_string_eol_s[0]);
status = F_status_set_error(F_parameter);
}
byte_dump_print_text(data, characters, invalid, &previous, &offset);
}
else {
- fprintf(data.output.stream, "%c", f_string_eol[0]);
+ fprintf(data.output.stream, "%c", f_string_eol_s[0]);
}
}
- fprintf(data.output.stream, "%c", f_string_eol[0]);
+ fprintf(data.output.stream, "%c", f_string_eol_s[0]);
// make sure to flush standard out to help prevent standard error from causing poblems.
fflush(data.output.stream);
fl_color_print(data.error.to.stream, data.context.set.error, "Invalid UTF-8 codes were detected for file '");
fl_color_print(data.error.to.stream, data.context.set.notable, "%s", file_name);
fl_color_print(data.error.to.stream, data.context.set.error, "'.");
- fprintf(data.error.to.stream, "%c%c", f_string_eol[0], f_string_eol[0]);
+ fprintf(data.error.to.stream, "%c%c", f_string_eol_s[0], f_string_eol_s[0]);
}
if (size < 0) {
fl_color_print(data.error.to.stream, data.context.set.error, "%sread() failed for '", fll_error_print_error);
fl_color_print(data.error.to.stream, data.context.set.notable, "%s", file_name);
fl_color_print(data.error.to.stream, data.context.set.error, "'.");
- fprintf(data.error.to.stream, "%c%x", f_string_eol[0], f_string_eol[0]);
+ fprintf(data.error.to.stream, "%c%x", f_string_eol_s[0], f_string_eol_s[0]);
status = F_status_set_error(F_failure);
}
byte_dump_print_text(data, characters, invalid, previous, offset);
}
else {
- fprintf(data.output.stream, "%c", f_string_eol[0]);
+ fprintf(data.output.stream, "%c", f_string_eol_s[0]);
}
cell->column = 0;
}
fl_color_print(data.output.stream, data.context.set.notable, " |");
- fprintf(data.output.stream, "%c", f_string_eol[0]);
+ fprintf(data.output.stream, "%c", f_string_eol_s[0]);
}
#endif // _di_byte_dump_file_
data->warning.notable = data->context.set.notable;
}
else {
- data->context.set.warning.before = &f_color_set_string_null_s;
- data->context.set.warning.after = &f_color_set_string_null_s;
- data->context.set.error.before = &f_color_set_string_null_s;
- data->context.set.error.after = &f_color_set_string_null_s;
- data->context.set.title.before = &f_color_set_string_null_s;
- data->context.set.title.after = &f_color_set_string_null_s;
- data->context.set.notable.before = &f_color_set_string_null_s;
- data->context.set.notable.after = &f_color_set_string_null_s;
- data->context.set.important.before = &f_color_set_string_null_s;
- data->context.set.important.after = &f_color_set_string_null_s;
- data->context.set.standout.before = &f_color_set_string_null_s;
- data->context.set.standout.after = &f_color_set_string_null_s;
- data->context.set.normal.before = &f_color_set_string_null_s;
- data->context.set.normal.after = &f_color_set_string_null_s;
- data->context.set.normal_reset.before = &f_color_set_string_null_s;
- data->context.set.normal_reset.after = &f_color_set_string_null_s;
-
- data->error.context.before = &f_color_set_string_null_s;
- data->error.context.after = &f_color_set_string_null_s;
- data->error.notable.before = &f_color_set_string_null_s;
- data->error.notable.after = &f_color_set_string_null_s;
-
- data->warning.context.before = &f_color_set_string_null_s;
- data->warning.context.after = &f_color_set_string_null_s;
- data->warning.notable.before = &f_color_set_string_null_s;
- data->warning.notable.after = &f_color_set_string_null_s;
+ data->context.set.warning = f_color_set_empty_s;
+ data->context.set.error = f_color_set_empty_s;
+ data->context.set.title = f_color_set_empty_s;
+ data->context.set.notable = f_color_set_empty_s;
+ data->context.set.important = f_color_set_empty_s;
+ data->context.set.standout = f_color_set_empty_s;
+ data->context.set.normal = f_color_set_empty_s;
+ data->context.set.normal_reset = f_color_set_empty_s;
+
+ data->error.context = f_color_set_empty_s;
+ data->error.notable = f_color_set_empty_s;
+
+ data->warning.context = f_color_set_empty_s;
+ data->warning.notable = f_color_set_empty_s;
}
if (F_status_is_error(status)) {
if (data->error.verbosity != f_console_verbosity_quiet) {
fll_error_print(data->error, F_status_set_fine(status), "fll_program_parameter_process", F_true);
- fprintf(data->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data->error.to.stream, "%c", f_string_eol_s[0]);
}
control_delete_data(data);
// ensure a newline is always put at the end of the program execution, unless in quiet mode.
if (data->error.verbosity != f_console_verbosity_quiet) {
if (F_status_is_error(status)) {
- fprintf(data->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data->error.to.stream, "%c", f_string_eol_s[0]);
}
}
fprintf(output.stream, " operation and the ");
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, controller_long_validate);
fprintf(output.stream, " operation are specified, then additional information on each would be executed rule is printed.");
- fprintf(output.stream, "%c", f_string_eol[0]);
+ fprintf(output.stream, "%c", f_string_eol_s[0]);
return F_none;
}
data->warning.notable = data->context.set.notable;
}
else {
- data->context.set.warning.before = &f_color_set_string_null_s;
- data->context.set.warning.after = &f_color_set_string_null_s;
- data->context.set.error.before = &f_color_set_string_null_s;
- data->context.set.error.after = &f_color_set_string_null_s;
- data->context.set.title.before = &f_color_set_string_null_s;
- data->context.set.title.after = &f_color_set_string_null_s;
- data->context.set.notable.before = &f_color_set_string_null_s;
- data->context.set.notable.after = &f_color_set_string_null_s;
- data->context.set.important.before = &f_color_set_string_null_s;
- data->context.set.important.after = &f_color_set_string_null_s;
- data->context.set.standout.before = &f_color_set_string_null_s;
- data->context.set.standout.after = &f_color_set_string_null_s;
- data->context.set.normal.before = &f_color_set_string_null_s;
- data->context.set.normal.after = &f_color_set_string_null_s;
- data->context.set.normal_reset.before = &f_color_set_string_null_s;
- data->context.set.normal_reset.after = &f_color_set_string_null_s;
-
- data->error.context.before = &f_color_set_string_null_s;
- data->error.context.after = &f_color_set_string_null_s;
- data->error.notable.before = &f_color_set_string_null_s;
- data->error.notable.after = &f_color_set_string_null_s;
-
- data->warning.context.before = &f_color_set_string_null_s;
- data->warning.context.after = &f_color_set_string_null_s;
- data->warning.notable.before = &f_color_set_string_null_s;
- data->warning.notable.after = &f_color_set_string_null_s;
+ data->context.set.warning = f_color_set_empty_s;
+ data->context.set.error = f_color_set_empty_s;
+ data->context.set.title = f_color_set_empty_s;
+ data->context.set.notable = f_color_set_empty_s;
+ data->context.set.important = f_color_set_empty_s;
+ data->context.set.standout = f_color_set_empty_s;
+ data->context.set.normal = f_color_set_empty_s;
+ data->context.set.normal_reset = f_color_set_empty_s;
+
+ data->error.context = f_color_set_empty_s;
+ data->error.notable = f_color_set_empty_s;
+
+ data->warning.context = f_color_set_empty_s;
+ data->warning.notable = f_color_set_empty_s;
}
if (F_status_is_error(status)) {
fll_program_print_help_option(output, context, f_console_standard_short_debug, f_console_standard_long_debug, f_console_symbol_short_disable, f_console_symbol_long_disable, " Enable debugging, inceasing verbosity beyond normal output.");
fll_program_print_help_option(output, context, f_console_standard_short_version, f_console_standard_long_version, f_console_symbol_short_disable, f_console_symbol_long_disable, " Print only the version number.");
- fprintf(output.stream, "%c", f_string_eol[0]);
+ fprintf(output.stream, "%c", f_string_eol_s[0]);
fll_program_print_help_option(output, context, fake_short_define, fake_long_define, f_console_symbol_short_enable, f_console_symbol_long_enable, " Override defines from settings file with this define.");
fll_program_print_help_option(output, context, fake_short_fakefile, fake_long_fakefile, f_console_symbol_short_enable, f_console_symbol_long_enable, "Use this fakefile.");
fll_program_print_help_option(output, context, fake_short_process, fake_long_process, f_console_symbol_short_enable, f_console_symbol_long_enable, " Process name for storing build states.");
fll_program_print_help_option(output, context, fake_short_settings, fake_long_settings, f_console_symbol_short_enable, f_console_symbol_long_enable, "Use this settings file.");
- fprintf(output.stream, "%c", f_string_eol[0]);
+ fprintf(output.stream, "%c", f_string_eol_s[0]);
fll_program_print_help_option(output, context, fake_short_path_build, fake_long_path_build, f_console_symbol_short_enable, f_console_symbol_long_enable, " Specify a custom build directory.");
fll_program_print_help_option(output, context, fake_short_path_data, fake_long_path_data, f_console_symbol_short_enable, f_console_symbol_long_enable, " Specify a custom path to the data files.");
fll_program_print_help_option(output, context, fake_short_path_sources, fake_long_path_sources, f_console_symbol_short_enable, f_console_symbol_long_enable, " Specify a custom path to the source files.");
fll_program_print_help_option(output, context, fake_short_path_work, fake_long_path_work, f_console_symbol_short_enable, f_console_symbol_long_enable, " Use includes/libraries/programs from this directory instead of system.");
- fprintf(output.stream, "%c%c", f_string_eol[0], f_string_eol[0]);
+ fprintf(output.stream, "%c%c", f_string_eol_s[0], f_string_eol_s[0]);
fl_color_print(output.stream, context.set.important, " Special Options: ");
fll_program_print_help_option_long(output, context, fake_long_static_disabled, f_console_symbol_long_enable, "Forcibly do not build static files.");
fll_program_print_help_option_long(output, context, fake_long_static_enabled, f_console_symbol_long_enable, " Forcibly do build static files.");
- fprintf(output.stream, "%c%c", f_string_eol[0], f_string_eol[0]);
+ fprintf(output.stream, "%c%c", f_string_eol_s[0], f_string_eol_s[0]);
fl_color_print(output.stream, context.set.important, " Operations: ");
fprintf(output.stream, " operation, the ");
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fake_long_mode);
fprintf(output.stream, " parameter specifies a name (limited to alpha-numeric, underscore, and dash) to be used in addition to the global.");
- fprintf(output.stream, "%c", f_string_eol[0]);
+ fprintf(output.stream, "%c", f_string_eol_s[0]);
fprintf(output.stream, " For example, when a ");
fl_color_print(output.stream, context.set.notable, "%s", fake_long_mode);
fprintf(output.stream, " of 'fll_monolithic' is specified, build libaries from both 'build_libraries' and 'build_libraries-fll_monolithic' are used (but not 'build_libraries-fll_level').");
- fprintf(output.stream, "%c%c", f_string_eol[0], f_string_eol[0]);
+ fprintf(output.stream, "%c%c", f_string_eol_s[0], f_string_eol_s[0]);
fprintf(output.stream, " When specifying the ");
fl_color_print(output.stream, context.set.notable, "%s", fake_long_fakefile);
fprintf(output.stream, " or the ");
fl_color_print(output.stream, context.set.notable, "%s", fake_long_settings);
fprintf(output.stream, " parameters, the filenames are relative to the data build directory, unless a path is used.");
- fprintf(output.stream, "%c", f_string_eol[0]);
+ fprintf(output.stream, "%c", f_string_eol_s[0]);
fprintf(output.stream, " For example, with '");
fl_color_print(output.stream, context.set.notable, "%s%s my_fakefile", f_console_symbol_long_enable, fake_long_fakefile);
fl_color_print(output.stream, context.set.notable, "./my_fakefile", fake_default_path_data, fake_default_path_build);
fprintf(output.stream, " would be used.");
- fprintf(output.stream, "%c%c", f_string_eol[0], f_string_eol[0]);
+ fprintf(output.stream, "%c%c", f_string_eol_s[0], f_string_eol_s[0]);
return F_none;
}
status = fll_program_parameter_process(arguments, parameters, choices, F_true, &data->remaining, &data->context);
- data->error.context = data->context.set.error;
- data->error.notable = data->context.set.notable;
+ if (data->context.set.error.before) {
+ data->error.context = data->context.set.error;
+ data->error.notable = data->context.set.notable;
+ }
+ else {
+ data->context.set.warning = f_color_set_empty_s;
+ data->context.set.error = f_color_set_empty_s;
+ data->context.set.title = f_color_set_empty_s;
+ data->context.set.notable = f_color_set_empty_s;
+ data->context.set.important = f_color_set_empty_s;
+ data->context.set.standout = f_color_set_empty_s;
+ data->context.set.normal = f_color_set_empty_s;
+ data->context.set.normal_reset = f_color_set_empty_s;
+
+ data->error.context = f_color_set_empty_s;
+ data->error.notable = f_color_set_empty_s;
+ }
if (F_status_is_error(status)) {
fll_error_print(data->error, F_status_set_fine(status), "fll_program_parameter_process", F_true);
}
else if (F_status_is_error(status)) {
if (data->error.verbosity != f_console_verbosity_quiet) {
- fprintf(data->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data->error.to.stream, data->error.context, "%sThe operation '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->error.notable, "%s", operations_name);
- fl_color_print(data->error.to.stream, data->error.context, "' failed.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->error.context, "' failed.%c", f_string_eol_s[0]);
}
break;
// ensure a newline is always put at the end of the program execution, unless in quiet mode.
if (data->error.verbosity != f_console_verbosity_quiet) {
if (F_status_is_error(status) || status == F_signal) {
- fprintf(data->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data->error.to.stream, "%c", f_string_eol_s[0]);
}
else if (status != F_child) {
- fprintf(data->output.stream, "%cAll operations complete.%c%c", f_string_eol[0], f_string_eol[0], f_string_eol[0]);
+ fprintf(data->output.stream, "%cAll operations complete.%c%c", f_string_eol_s[0], f_string_eol_s[0], f_string_eol_s[0]);
}
}
}
else {
if (data->error.verbosity != f_console_verbosity_quiet) {
- fprintf(data->error.to.stream, "%c", f_string_eol[0]);
- fl_color_print(data->error.to.stream, data->error.context, "%sYou failed to specify an operation.%c", fll_error_print_error, f_string_eol[0]);
- fprintf(data->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data->error.to.stream, "%c", f_string_eol_s[0]);
+ fl_color_print(data->error.to.stream, data->error.context, "%sYou failed to specify an operation.%c", fll_error_print_error, f_string_eol_s[0]);
+ fprintf(data->error.to.stream, "%c", f_string_eol_s[0]);
}
status = F_status_set_error(F_parameter);
f_string_dynamic_t destination_directory = f_string_dynamic_t_initialize;
if (data.error.verbosity != f_console_verbosity_quiet) {
- fprintf(data.output.stream, "%c", f_string_eol[0]);
+ fprintf(data.output.stream, "%c", f_string_eol_s[0]);
fl_color_print(data.output.stream, data.context.set.important, "Copying %s.", label);
- fprintf(data.output.stream, "%c", f_string_eol[0]);
+ fprintf(data.output.stream, "%c", f_string_eol_s[0]);
}
f_macro_string_dynamic_t_new(*status, path_source, source.used);
}
if (data.error.verbosity == f_console_verbosity_verbose) {
- fprintf(data.output.stream, "Copied file '%s' to '%s'.%c", path_source.string, destination_file.string, f_string_eol[0]);
+ fprintf(data.output.stream, "Copied file '%s' to '%s'.%c", path_source.string, destination_file.string, f_string_eol_s[0]);
}
}
else if (F_status_is_error(*status)) {
};
if (data.error.verbosity != f_console_verbosity_quiet) {
- fprintf(data.output.stream, "%c", f_string_eol[0]);
+ fprintf(data.output.stream, "%c", f_string_eol_s[0]);
fl_color_print(data.output.stream, data.context.set.important, "Creating base build directories.");
- fprintf(data.output.stream, "%c", f_string_eol[0]);
+ fprintf(data.output.stream, "%c", f_string_eol_s[0]);
}
for (uint8_t i = 0; i < 15; i++) {
}
if (data.error.verbosity == f_console_verbosity_verbose) {
- fprintf(data.output.stream, "Created directory '%s'.%c", directorys[i]->string, f_string_eol[0]);
+ fprintf(data.output.stream, "Created directory '%s'.%c", directorys[i]->string, f_string_eol_s[0]);
}
} // for
if (F_status_is_error(*status)) {
if (F_status_set_fine(*status) == F_failure) {
if (data.error.verbosity != f_console_verbosity_quiet) {
- fprintf(data.error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data.error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data.error.to.stream, data.error.context, "%sFailed to execute script: ", data.error.prefix);
fl_color_print(data.error.to.stream, data.error.notable, "%s", path.string);
fl_color_print(data.error.to.stream, data.error.context, ".");
- fprintf(data.error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data.error.to.stream, "%c", f_string_eol_s[0]);
}
}
else {
if (!data_build.setting.build_sources_library.used) return 0;
if (data.error.verbosity != f_console_verbosity_quiet) {
- fprintf(data.output.stream, "%c", f_string_eol[0]);
+ fprintf(data.output.stream, "%c", f_string_eol_s[0]);
fl_color_print(data.output.stream, data.context.set.important, "Compiling shared library.");
- fprintf(data.output.stream, "%c", f_string_eol[0]);
+ fprintf(data.output.stream, "%c", f_string_eol_s[0]);
}
f_string_dynamics_t arguments = f_string_dynamics_t_initialize;
*status = f_file_link(parameter_file_name_micro, parameter_file_path);
if (F_status_is_error_not(*status) && data.error.verbosity == f_console_verbosity_verbose) {
- fprintf(data.output.stream, "Linked file '%s' to '%s'.%c", parameter_file_path, parameter_file_name_micro, f_string_eol[0]);
+ fprintf(data.output.stream, "Linked file '%s' to '%s'.%c", parameter_file_path, parameter_file_name_micro, f_string_eol_s[0]);
}
else if (F_status_is_error(*status)) {
if (F_status_set_fine(*status) == F_file_found) {
fprintf(data.output.stream, "%s", parameter_file_name_micro);
}
- fprintf(data.output.stream, "'.%c", f_string_eol[0]);
+ fprintf(data.output.stream, "'.%c", f_string_eol_s[0]);
}
else if (F_status_is_error(*status)) {
if (F_status_set_fine(*status) == F_file_found) {
if (!data_build.setting.build_sources_library.used) return 0;
if (data.error.verbosity != f_console_verbosity_quiet) {
- fprintf(data.output.stream, "%c", f_string_eol[0]);
+ fprintf(data.output.stream, "%c", f_string_eol_s[0]);
fl_color_print(data.output.stream, data.context.set.important, "Compiling static library.");
- fprintf(data.output.stream, "%c", f_string_eol[0]);
+ fprintf(data.output.stream, "%c", f_string_eol_s[0]);
}
f_string_dynamic_t file_name = f_string_dynamic_t_initialize;
if (environment->used + data_build.setting.environment.used > environment->size) {
if (environment->used + data_build.setting.environment.used > f_array_length_t_size) {
if (data.error.verbosity != f_console_verbosity_quiet) {
- fprintf(data.error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data.error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data.error.to.stream, data.context.set.error, "%sThe values for the setting '", fll_error_print_error);
fl_color_print(data.error.to.stream, data.context.set.notable, "%s", fake_build_setting_name_environment);
fl_color_print(data.error.to.stream, data.context.set.error, "' of setting file '");
fl_color_print(data.error.to.stream, data.context.set.notable, "%s", data.file_data_build_settings.string);
fl_color_print(data.error.to.stream, data.context.set.error, "' is too large.");
- fprintf(data.error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data.error.to.stream, "%c", f_string_eol_s[0]);
}
*status = F_status_set_error(F_array_too_large);
for (uint8_t i = 0; i < 1; i++) {
if (!settings[i]->used) {
- fprintf(data.error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data.error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data.error.to.stream, data.context.set.error, "%sThe setting '", fll_error_print_error);
fl_color_print(data.error.to.stream, data.context.set.notable, "%s", names[i]);
fl_color_print(data.error.to.stream, data.context.set.error, "' is required but is not specified in the settings file '");
fl_color_print(data.error.to.stream, data.context.set.notable, "%s", setting_file.used ? path_file : data.file_data_build_settings.string);
fl_color_print(data.error.to.stream, data.context.set.error, "'.");
- fprintf(data.error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data.error.to.stream, "%c", f_string_eol_s[0]);
failed = F_true;
}
if (found == F_false) {
if (data.error.verbosity != f_console_verbosity_quiet) {
- fprintf(data.error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data.error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data.error.to.stream, data.context.set.error, "%sThe specified mode '", fll_error_print_error);
fl_color_print(data.error.to.stream, data.context.set.notable, "%s", modes->array[i].string);
fl_color_print(data.error.to.stream, data.context.set.error, "' is not a valid mode, according to '");
fl_color_print(data.error.to.stream, data.context.set.notable, "%s", path_file);
fl_color_print(data.error.to.stream, data.context.set.error, "'.");
- fprintf(data.error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data.error.to.stream, "%c", f_string_eol_s[0]);
}
error_printed = F_true;
if (*status == F_status_set_error(F_string_too_large)) {
if (data.error.verbosity != f_console_verbosity_quiet) {
// @todo update FSS functions to return which setting index the problem happened on.
- fprintf(data.error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data.error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data.error.to.stream, data.context.set.error, "%sA setting in the build setting file '", fll_error_print_error);
fl_color_print(data.error.to.stream, data.context.set.notable, "%s", path_file);
fl_color_print(data.error.to.stream, data.context.set.error, "' is too long.");
- fprintf(data.error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data.error.to.stream, "%c", f_string_eol_s[0]);
}
}
else if (!error_printed) {
if (settings_single_source[i]->used > 1) {
if (data.error.verbosity == f_console_verbosity_verbose) {
- fprintf(data.output.stream, "%c", f_string_eol[0]);
+ fprintf(data.output.stream, "%c", f_string_eol_s[0]);
fl_color_print(data.output.stream, data.context.set.warning, "%sthe setting '", fll_error_print_warning);
fl_color_print(data.output.stream, data.context.set.notable, "%s", settings_single_name[i]);
fl_color_print(data.output.stream, data.context.set.warning, "' in the file '");
fl_color_print(data.output.stream, data.context.set.warning, "' may only have a single property, only using the first: '");
fl_color_print(data.output.stream, data.context.set.notable, "%s", settings_single_source[i]->array[0].string);
fl_color_print(data.output.stream, data.context.set.warning, "'.");
- fprintf(data.output.stream, "%c", f_string_eol[0]);
+ fprintf(data.output.stream, "%c", f_string_eol_s[0]);
}
}
*settings_single_bool[i] = F_true;
if (data.error.verbosity == f_console_verbosity_verbose) {
- fprintf(data.output.stream, "%c", f_string_eol[0]);
+ fprintf(data.output.stream, "%c", f_string_eol_s[0]);
fl_color_print(data.output.stream, data.context.set.warning, "%sthe setting '", fll_error_print_warning);
fl_color_print(data.output.stream, data.context.set.notable, "%s", settings_single_name[i]);
fl_color_print(data.output.stream, data.context.set.warning, "' in the file '");
fl_color_print(data.output.stream, data.context.set.warning, "', defaulting to '");
fl_color_print(data.output.stream, data.context.set.notable, "%s", fake_common_setting_bool_yes);
fl_color_print(data.output.stream, data.context.set.warning, "'.");
- fprintf(data.output.stream, "%c", f_string_eol[0]);
+ fprintf(data.output.stream, "%c", f_string_eol_s[0]);
}
}
}
*settings_single_language[i] = fake_build_language_type_c;
if (data.error.verbosity == f_console_verbosity_verbose) {
- fprintf(data.output.stream, "%c", f_string_eol[0]);
+ fprintf(data.output.stream, "%c", f_string_eol_s[0]);
fl_color_print(data.output.stream, data.context.set.warning, "%sthe setting '", fll_error_print_warning);
fl_color_print(data.output.stream, data.context.set.notable, "%s", settings_single_name[i]);
fl_color_print(data.output.stream, data.context.set.warning, "' in the file '");
fl_color_print(data.output.stream, data.context.set.warning, "', defaulting to '");
fl_color_print(data.output.stream, data.context.set.notable, "%s", fake_build_language_c);
fl_color_print(data.output.stream, data.context.set.warning, "'.");
- fprintf(data.output.stream, "%c", f_string_eol[0]);
+ fprintf(data.output.stream, "%c", f_string_eol_s[0]);
}
}
}
*settings_single_version[i] = fake_build_version_type_major;
if (data.error.verbosity == f_console_verbosity_verbose) {
- fprintf(data.output.stream, "%c", f_string_eol[0]);
+ fprintf(data.output.stream, "%c", f_string_eol_s[0]);
fl_color_print(data.output.stream, data.context.set.warning, "%sthe setting '", fll_error_print_warning);
fl_color_print(data.output.stream, data.context.set.notable, "%s", settings_single_name[i]);
fl_color_print(data.output.stream, data.context.set.warning, "' in the file '");
fl_color_print(data.output.stream, data.context.set.warning, "', defaulting to '");
fl_color_print(data.output.stream, data.context.set.notable, "%s", fake_build_version_major);
fl_color_print(data.output.stream, data.context.set.warning, "'.");
- fprintf(data.output.stream, "%c", f_string_eol[0]);
+ fprintf(data.output.stream, "%c", f_string_eol_s[0]);
}
}
}
}
if (data.error.verbosity == f_console_verbosity_verbose) {
- fprintf(data.output.stream, "%c", f_string_eol[0]);
+ fprintf(data.output.stream, "%c", f_string_eol_s[0]);
fl_color_print(data.output.stream, data.context.set.error, "%sthe parameters '", fll_error_print_warning);
fl_color_print(data.output.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable, fake_long_shared_disabled);
fl_color_print(data.output.stream, data.context.set.error, "' and '");
}
fl_color_print(data.output.stream, data.context.set.error, "'.");
- fprintf(data.output.stream, "%c", f_string_eol[0]);
+ fprintf(data.output.stream, "%c", f_string_eol_s[0]);
}
}
else {
}
if (data.error.verbosity == f_console_verbosity_verbose) {
- fprintf(data.output.stream, "%c", f_string_eol[0]);
+ fprintf(data.output.stream, "%c", f_string_eol_s[0]);
fl_color_print(data.output.stream, data.context.set.error, "%sthe parameters '", fll_error_print_warning);
fl_color_print(data.output.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable, fake_long_static_disabled);
fl_color_print(data.output.stream, data.context.set.error, "' and '");
}
fl_color_print(data.output.stream, data.context.set.error, "'.");
- fprintf(data.output.stream, "%c", f_string_eol[0]);
+ fprintf(data.output.stream, "%c", f_string_eol_s[0]);
}
}
else {
if (setting->build_language == fake_build_language_type_c || setting->build_language == fake_build_language_type_cpp) {
if (setting->build_shared == F_false && setting->build_static == F_false) {
if (data.error.verbosity != f_console_verbosity_quiet) {
- fprintf(data.error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data.error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data.error.to.stream, data.context.set.error, "%sThe build settings '", fll_error_print_error);
fl_color_print(data.error.to.stream, data.context.set.notable, "%s", fake_build_setting_name_build_shared);
fl_color_print(data.error.to.stream, data.context.set.error, "' and '");
}
fl_color_print(data.error.to.stream, data.context.set.error, "'.");
- fprintf(data.error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data.error.to.stream, "%c", f_string_eol_s[0]);
}
*status = F_status_set_error(F_failure);
if (!data_build.setting.build_sources_library.used) return 0;
if (data.error.verbosity != f_console_verbosity_quiet) {
- fprintf(data.output.stream, "%c", f_string_eol[0]);
+ fprintf(data.output.stream, "%c", f_string_eol_s[0]);
fl_color_print(data.output.stream, data.context.set.important, "Compiling static objects.");
- fprintf(data.output.stream, "%c", f_string_eol[0]);
+ fprintf(data.output.stream, "%c", f_string_eol_s[0]);
}
f_string_dynamic_t file_name = f_string_dynamic_t_initialize;
if (*status == F_false) {
if (data.error.verbosity != f_console_verbosity_quiet) {
- fprintf(data.error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data.error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data.error.to.stream, data.context.set.error, "%sThe path '", fll_error_print_error);
fl_color_print(data.error.to.stream, data.context.set.notable, "%s", destination_path.string);
fl_color_print(data.error.to.stream, data.context.set.error, "' exists but is not a directory.");
- fprintf(data.error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data.error.to.stream, "%c", f_string_eol_s[0]);
}
*status = F_status_set_error(F_failure);
if (F_status_is_error(*status)) {
if (F_status_set_fine(*status) == F_file_found_not) {
- fprintf(data.error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data.error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data.error.to.stream, data.context.set.error, "%sThe path '", fll_error_print_error);
fl_color_print(data.error.to.stream, data.context.set.notable, "%s", destination_path.string);
fl_color_print(data.error.to.stream, data.context.set.error, "' could not be created, a parent directory does not exist.");
- fprintf(data.error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data.error.to.stream, "%c", f_string_eol_s[0]);
}
else {
fll_error_file_print(data.error, F_status_set_fine(*status), "f_directory_create", F_true, destination_path.string, "create", fll_error_file_type_directory);
}
if (data.error.verbosity == f_console_verbosity_verbose) {
- fprintf(data.output.stream, "Directory '%s' created.%c", destination_path.string, f_string_eol[0]);
+ fprintf(data.output.stream, "Directory '%s' created.%c", destination_path.string, f_string_eol_s[0]);
}
}
else if (F_status_is_error(*status)) {
if (F_status_is_fine(status)) {
if (data->error.verbosity != f_console_verbosity_quiet) {
- fprintf(data->output.stream, "%c", f_string_eol[0]);
+ fprintf(data->output.stream, "%c", f_string_eol_s[0]);
fl_color_print(data->output.stream, data->context.set.important, "Building project%c", data_build.setting.project_name.used ? ' ' : 0);
if (data_build.setting.project_name.used) {
}
fl_color_print(data->output.stream, data->context.set.important, ".");
- fprintf(data->output.stream, "%c", f_string_eol[0]);
+ fprintf(data->output.stream, "%c", f_string_eol_s[0]);
}
}
if (!data_build.setting.build_sources_program.used) return 0;
if (data.error.verbosity != f_console_verbosity_quiet) {
- fprintf(data.output.stream, "%c", f_string_eol[0]);
+ fprintf(data.output.stream, "%c", f_string_eol_s[0]);
fl_color_print(data.output.stream, data.context.set.important, "Compiling shared program.");
- fprintf(data.output.stream, "%c", f_string_eol[0]);
+ fprintf(data.output.stream, "%c", f_string_eol_s[0]);
}
f_string_dynamics_t arguments = f_string_dynamics_t_initialize;
if (!data_build.setting.build_sources_program.used) return 0;
if (data.error.verbosity != f_console_verbosity_quiet) {
- fprintf(data.output.stream, "%c", f_string_eol[0]);
+ fprintf(data.output.stream, "%c", f_string_eol_s[0]);
fl_color_print(data.output.stream, data.context.set.important, "Compiling static program.");
- fprintf(data.output.stream, "%c", f_string_eol[0]);
+ fprintf(data.output.stream, "%c", f_string_eol_s[0]);
}
f_string_dynamics_t arguments = f_string_dynamics_t_initialize;
f_status_t status = F_none;
if (data.error.verbosity != f_console_verbosity_quiet) {
- fprintf(data.output.stream, "%c", f_string_eol[0]);
+ fprintf(data.output.stream, "%c", f_string_eol_s[0]);
fl_color_print(data.output.stream, data.context.set.important, "Deleting all files within build directory '");
fl_color_print(data.output.stream, data.context.set.notable, "%s", data.path_build.string);
- fl_color_print(data.output.stream, data.context.set.important, "'.%c", f_string_eol[0]);
+ fl_color_print(data.output.stream, data.context.set.important, "'.%c", f_string_eol_s[0]);
}
if (fake_signal_received(data)) {
if (F_status_set_fine(status) == F_file_found_not) {
if (data.error.verbosity == f_console_verbosity_verbose) {
- fprintf(data.output.stream, "The build directory '%s' does not exist.%c", data.path_build.string, f_string_eol[0]);
+ fprintf(data.output.stream, "The build directory '%s' does not exist.%c", data.path_build.string, f_string_eol_s[0]);
}
status = F_none;
if (!result) {
// @todo in order to get this working, the recursive function that calls this needs to be rewritten with more flexibility or provide a higher-level equivalent function.
- printf("Removed '%s'.%c", path, f_string_eol[0]);
+ printf("Removed '%s'.%c", path, f_string_eol_s[0]);
}
return result;
fprintf(data.output.stream, " %s", arguments.array[i].string);
} // for
- fprintf(data.output.stream, "%c", f_string_eol[0]);
+ fprintf(data.output.stream, "%c", f_string_eol_s[0]);
// flush to stdout before executing command.
fflush(data.output.stream);
if (F_status_set_fine(*status) == F_file_found_not) {
if (data.error.verbosity != f_console_verbosity_quiet) {
- fprintf(data.error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data.error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data.error.to.stream, data.context.set.error, "%sFailed to find program '", fll_error_print_error);
fl_color_print(data.error.to.stream, data.context.set.notable, "%s", program.used ? program.string : f_string_empty_s);
- fl_color_print(data.error.to.stream, data.context.set.error, "' for executing.%c", f_string_eol[0]);
+ fl_color_print(data.error.to.stream, data.context.set.error, "' for executing.%c", f_string_eol_s[0]);
}
}
else {
if (F_status_is_error(status)) {
if (fll_error_print(data->error, F_status_set_fine(status), "f_utf_is_word_dash_plus", F_false) == F_known_not && data->error.verbosity != f_console_verbosity_quiet) {
- fprintf(data->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data->error.to.stream, data->context.set.error, "%sFailed to process the parameter '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fake_long_process);
- fl_color_print(data->error.to.stream, data->context.set.error, "'.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "'.%c", f_string_eol_s[0]);
}
return status;
if (status == F_false) {
if (data->error.verbosity != f_console_verbosity_quiet) {
- fprintf(data->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data->error.to.stream, data->context.set.error, "%sThe '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fake_long_process);
fl_color_print(data->error.to.stream, data->context.set.error, "' parameters value '");
fl_color_print(data->error.to.stream, data->context.set.notable, "%s", arguments.argv[location]);
- fl_color_print(data->error.to.stream, data->context.set.error, "' contains non-word, non-dash, and non-plus characters.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' contains non-word, non-dash, and non-plus characters.%c", f_string_eol_s[0]);
}
return F_status_set_error(F_parameter);
if (F_status_is_error(status)) {
if (status == F_status_set_error(F_string_too_large)) {
if (data->error.verbosity != f_console_verbosity_quiet) {
- fprintf(data->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, parameters_name[i]);
- fl_color_print(data->error.to.stream, data->context.set.error, "' is too long.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' is too long.%c", f_string_eol_s[0]);
}
}
else {
if (length == 0 || status == F_data_not) {
if (data->error.verbosity != f_console_verbosity_quiet) {
- fprintf(data->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, parameters_name[i]);
- fl_color_print(data->error.to.stream, data->context.set.error, "' must not be empty and must not contain only whitespace.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' must not be empty and must not contain only whitespace.%c", f_string_eol_s[0]);
}
}
}
if (F_status_is_error(status)) {
if (fll_error_print(data->error, F_status_set_fine(status), "fl_console_parameter_to_string_dynamic_directory", F_false) == F_known_not && data->error.verbosity != f_console_verbosity_quiet) {
- fprintf(data->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data->error.to.stream, data->context.set.error, "%sFailed to process parameter '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, parameters_name[i]);
- fl_color_print(data->error.to.stream, data->context.set.error, "'.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "'.%c", f_string_eol_s[0]);
}
return status;
if (F_status_is_error(status)) {
if (fll_error_print(data->error, F_status_set_fine(status), "f_macro_string_dynamic_t_new", F_false) == F_known_not && data->error.verbosity != f_console_verbosity_quiet) {
- fprintf(data->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data->error.to.stream, data->context.set.error, "%sFailed to load default for the parameter '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, parameters_name[i]);
- fl_color_print(data->error.to.stream, data->context.set.error, "'.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "'.%c", f_string_eol_s[0]);
}
return status;
if (F_status_is_error(status)) {
if (fll_error_print(data->error, F_status_set_fine(status), "fll_program_parameter_additional_rip", F_false) == F_known_not && data->error.verbosity != f_console_verbosity_quiet) {
- fprintf(data->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data->error.to.stream, data->context.set.error, "%sFailed to process the parameter '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fake_long_define);
- fl_color_print(data->error.to.stream, data->context.set.error, "'.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "'.%c", f_string_eol_s[0]);
}
return status;
if (F_status_is_error(status)) {
if (fll_error_print(data->error, F_status_set_fine(status), "f_utf_is_word", F_false) == F_known_not && data->error.verbosity != f_console_verbosity_quiet) {
- fprintf(data->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data->error.to.stream, data->context.set.error, "%sFailed to process the parameter '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fake_long_define);
- fl_color_print(data->error.to.stream, data->context.set.error, "'.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "'.%c", f_string_eol_s[0]);
}
return status;
if (status == F_false) {
if (data->error.verbosity != f_console_verbosity_quiet) {
- fprintf(data->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data->error.to.stream, data->context.set.error, "%sThe '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fake_long_define);
fl_color_print(data->error.to.stream, data->context.set.error, "' parameters value '");
fl_color_print(data->error.to.stream, data->context.set.notable, "%s", data->define.array[i].string);
- fl_color_print(data->error.to.stream, data->context.set.error, "' contains non-word characters.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' contains non-word characters.%c", f_string_eol_s[0]);
}
return F_status_set_error(F_parameter);
if (F_status_is_error(status)) {
if (fll_error_print(data->error, F_status_set_fine(status), "fll_program_parameter_additional_rip", F_false) == F_known_not && data->error.verbosity != f_console_verbosity_quiet) {
- fprintf(data->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data->error.to.stream, data->context.set.error, "%sFailed to process the parameter '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fake_long_mode);
- fl_color_print(data->error.to.stream, data->context.set.error, "'.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "'.%c", f_string_eol_s[0]);
}
return status;
if (F_status_is_error(status)) {
if (fll_error_print(data->error, F_status_set_fine(status), "f_utf_is_word_dash_plus", F_false) == F_known_not && data->error.verbosity != f_console_verbosity_quiet) {
- fprintf(data->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data->error.to.stream, data->context.set.error, "%sFailed to process the parameter '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fake_long_mode);
- fl_color_print(data->error.to.stream, data->context.set.error, "'.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "'.%c", f_string_eol_s[0]);
}
return status;
if (status == F_false) {
if (data->error.verbosity != f_console_verbosity_quiet) {
- fprintf(data->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data->error.to.stream, data->context.set.error, "%sThe '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fake_long_mode);
fl_color_print(data->error.to.stream, data->context.set.error, "' parameters value '");
fl_color_print(data->error.to.stream, data->context.set.notable, "%s", data->mode.array[i].string);
- fl_color_print(data->error.to.stream, data->context.set.error, "' contains non-word, non-dash, and non-plus characters.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' contains non-word, non-dash, and non-plus characters.%c", f_string_eol_s[0]);
}
return F_status_set_error(F_parameter);
case F_signal_termination:
if (data.error.verbosity != f_console_verbosity_quiet) {
- fprintf(data.error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data.error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data.error.to.stream, data.context.set.error, "ALERT: An appropriate exit signal has been received, now aborting.");
- fprintf(data.error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data.error.to.stream, "%c", f_string_eol_s[0]);
}
return F_true;
}
}
else if (parameters_required[i]) {
- fprintf(data.error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data.error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data.error.to.stream, data.context.set.error, "%sNo valid path for the (required) directory parameter '", fll_error_print_error);
fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable, parameters_name[i]);
- fl_color_print(data.error.to.stream, data.context.set.error, "' was found.%c", f_string_eol[0]);
+ fl_color_print(data.error.to.stream, data.context.set.error, "' was found.%c", f_string_eol_s[0]);
return F_status_set_error(F_directory_found_not);
}
#ifndef _di_fake_verbose_print_clone_
void fake_verbose_print_clone(const f_file_t output, const f_string_t source, const f_string_t destination) {
- fprintf(output.stream, "Cloned '%s' to '%s'.%c", source, destination, f_string_eol[0]);
+ fprintf(output.stream, "Cloned '%s' to '%s'.%c", source, destination, f_string_eol_s[0]);
}
#endif // _di_fake_verbose_print_clone_
#ifndef _di_fake_verbose_print_copy_
void fake_verbose_print_copy(const f_file_t output, const f_string_t source, const f_string_t destination) {
- fprintf(output.stream, "Copied '%s' to '%s'.%c", source, destination, f_string_eol[0]);
+ fprintf(output.stream, "Copied '%s' to '%s'.%c", source, destination, f_string_eol_s[0]);
}
#endif // _di_fake_verbose_print_copy_
#ifndef _di_fake_verbose_print_move_
void fake_verbose_print_move(const f_file_t output, const f_string_t source, const f_string_t destination) {
- fprintf(output.stream, "Moved '%s' to '%s'.%c", source, destination, f_string_eol[0]);
+ fprintf(output.stream, "Moved '%s' to '%s'.%c", source, destination, f_string_eol_s[0]);
}
#endif // _di_fake_verbose_print_move_
}
else if (status == F_exist_not) {
if (data.error.verbosity != f_console_verbosity_quiet) {
- fprintf(error.to.stream, "%c", f_string_eol[0]);
+ fprintf(error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(error.to.stream, error.context, "%sThe group name '", error.prefix);
fl_color_print(error.to.stream, error.notable, "%s", buffer.string);
- fl_color_print(error.to.stream, error.context, "' was not found.%c", f_string_eol[0]);
+ fl_color_print(error.to.stream, error.context, "' was not found.%c", f_string_eol_s[0]);
}
return F_status_set_error(F_failure);
}
else if (number > f_type_size_32_unsigned) {
if (data.error.verbosity != f_console_verbosity_quiet) {
- fprintf(error.to.stream, "%c", f_string_eol[0]);
+ fprintf(error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(error.to.stream, error.context, "%sThe number '", error.prefix);
fl_color_print(error.to.stream, error.notable, "%llu", number);
- fl_color_print(error.to.stream, error.context, "' is too large.%c", f_string_eol[0]);
+ fl_color_print(error.to.stream, error.context, "' is too large.%c", f_string_eol_s[0]);
}
}
if (F_status_is_error(status)) {
if (data.error.verbosity != f_console_verbosity_quiet) {
if (F_status_set_fine(status) == F_syntax) {
- fprintf(error.to.stream, "%c", f_string_eol[0]);
+ fprintf(error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(error.to.stream, error.context, "%sThe mode '", error.prefix);
fl_color_print(error.to.stream, error.notable, "%s", buffer.string);
- fl_color_print(error.to.stream, error.context, "' is invalid.%c", f_string_eol[0]);
+ fl_color_print(error.to.stream, error.context, "' is invalid.%c", f_string_eol_s[0]);
}
else {
fll_error_print(error, status, "f_file_mode_from_string", F_true);
}
else if (status == F_exist_not) {
if (data.error.verbosity != f_console_verbosity_quiet) {
- fprintf(error.to.stream, "%c", f_string_eol[0]);
+ fprintf(error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(error.to.stream, error.context, "%sThe user '", error.prefix);
fl_color_print(error.to.stream, error.notable, "%s", buffer.string);
- fl_color_print(error.to.stream, error.context, "' was not found.%c", f_string_eol[0]);
+ fl_color_print(error.to.stream, error.context, "' was not found.%c", f_string_eol_s[0]);
}
return F_status_set_error(F_failure);
}
else if (number > f_type_size_32_unsigned) {
if (data.error.verbosity != f_console_verbosity_quiet) {
- fprintf(error.to.stream, "%c", f_string_eol[0]);
+ fprintf(error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(error.to.stream, error.context, "%sThe number '", error.prefix);
fl_color_print(error.to.stream, error.notable, "%llu", number);
- fl_color_print(error.to.stream, error.context, "' is too large.%c", f_string_eol[0]);
+ fl_color_print(error.to.stream, error.context, "' is too large.%c", f_string_eol_s[0]);
}
}
if (!data_make->buffer.used) {
if (data.error.verbosity == f_console_verbosity_verbose) {
- fprintf(data.output.stream, "%c", f_string_eol[0]);
+ fprintf(data.output.stream, "%c", f_string_eol_s[0]);
fl_color_print(data.output.stream, data.context.set.warning, "%sthe fakefile '", fll_error_print_warning);
fl_color_print(data.output.stream, data.context.set.notable, "%s", data.file_data_build_fakefile.string);
fl_color_print(data.output.stream, data.context.set.warning, "' is empty.");
if (missing_main) {
if (data.error.verbosity != f_console_verbosity_quiet) {
- fprintf(data.error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data.error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data.error.to.stream, data.error.context, "%sThe fakefile '", data.error.prefix);
fl_color_print(data.error.to.stream, data.error.notable, "%s", data.file_data_build_fakefile.string);
fl_color_print(data.error.to.stream, data.error.context, "' is missing the required '");
fl_color_print(data.error.to.stream, data.error.notable, "%s", fake_make_section_main);
- fl_color_print(data.error.to.stream, data.error.context, "' object.%c", f_string_eol[0]);
+ fl_color_print(data.error.to.stream, data.error.context, "' object.%c", f_string_eol_s[0]);
}
*status = F_status_set_error(F_failure);
data_make->setting_build.environment.used++;
}
else if (data.error.verbosity == f_console_verbosity_verbose) {
- fprintf(data.output.stream, "%c", f_string_eol[0]);
+ fprintf(data.output.stream, "%c", f_string_eol_s[0]);
fl_color_print(data.output.stream, data.context.set.warning, "%sThe environment name '", fll_error_print_warning);
fl_color_print(data.output.stream, data.context.set.notable, "%s", name_define.string);
- fl_color_print(data.output.stream, data.context.set.warning, "' is already added.%c", f_string_eol[0]);
+ fl_color_print(data.output.stream, data.context.set.warning, "' is already added.%c", f_string_eol_s[0]);
}
}
else if (data.error.verbosity == f_console_verbosity_verbose) {
- fprintf(data.output.stream, "%c", f_string_eol[0]);
+ fprintf(data.output.stream, "%c", f_string_eol_s[0]);
fl_color_print(data.output.stream, data.context.set.warning, "%sThe environment name '", fll_error_print_warning);
fl_color_print(data.output.stream, data.context.set.notable, "%s", name_define.string);
- fl_color_print(data.output.stream, data.context.set.warning, "' is invalid, ignoring.%c", f_string_eol[0]);
+ fl_color_print(data.output.stream, data.context.set.warning, "' is invalid, ignoring.%c", f_string_eol_s[0]);
}
name_define.used = 0;
}
else {
if (data.error.verbosity != f_console_verbosity_quiet) {
- fprintf(data.error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data.error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data.error.to.stream, data.context.set.error, "%sInvalid characters in the define setting name '", fll_error_print_error);
fl_color_print_code(data.error.to.stream, *data.error.notable.before);
f_print_dynamic(data.error.to.stream, define.array[i].name);
fl_color_print_code(data.error.to.stream, *data.error.notable.after);
- fl_color_print(data.error.to.stream, data.context.set.error, "', only alpha-numeric ASCII characters and underscore (without a leading digit) is %c", f_string_eol[0]);
+ fl_color_print(data.error.to.stream, data.context.set.error, "', only alpha-numeric ASCII characters and underscore (without a leading digit) is %c", f_string_eol_s[0]);
}
*status = F_status_set_error(F_failure);
}
if (data->error.verbosity != f_console_verbosity_quiet) {
- fprintf(data->output.stream, "%c", f_string_eol[0]);
- fl_color_print(data->output.stream, data->context.set.important, "Making project.%c", f_string_eol[0]);
+ fprintf(data->output.stream, "%c", f_string_eol_s[0]);
+ fl_color_print(data->output.stream, data->context.set.important, "Making project.%c", f_string_eol_s[0]);
}
f_status_t status = F_none;
f_status_t status_path = f_path_change_at(data_make.path.top.id);
if (F_status_is_error(status_path) && data->error.verbosity == f_console_verbosity_verbose) {
- fprintf(data->output.stream, "%c", f_string_eol[0]);
+ fprintf(data->output.stream, "%c", f_string_eol_s[0]);
fl_color_print(data->output.stream, data->context.set.warning, "%sFailed change back to orignal path '", fll_error_print_warning);
fl_color_print(data->output.stream, data->context.set.notable, "%s", data_make.path.stack.array[0].string);
fl_color_print(data->output.stream, data->context.set.warning, "', status code = ");
fl_color_print(data->output.stream, data->context.set.notable, "%llu", F_status_set_fine(status_path));
- fl_color_print(data->output.stream, data->context.set.warning, ".%c", f_string_eol[0]);
+ fl_color_print(data->output.stream, data->context.set.warning, ".%c", f_string_eol_s[0]);
}
}
const f_fss_named_t *section = &data_make->fakefile.array[id_section];
if (data->error.verbosity != f_console_verbosity_quiet) {
- fprintf(data->output.stream, "%c", f_string_eol[0]);
+ fprintf(data->output.stream, "%c", f_string_eol_s[0]);
fl_color_print(data->output.stream, data->context.set.important, "Processing Section '");
f_print_dynamic_partial(data->output.stream, data_make->buffer, section->name);
fl_color_print_code(data->output.stream, *data->context.set.notable.after);
- fl_color_print(data->output.stream, data->context.set.important, "'.%c", f_string_eol[0]);
+ fl_color_print(data->output.stream, data->context.set.important, "'.%c", f_string_eol_s[0]);
}
if (!section->objects.used) {
type_name = fake_make_operation_else;
}
- fprintf(data_make->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data_make->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data_make->error.to.stream, data_make->error.context, "%sIncomplete '", data_make->error.prefix);
fl_color_print(data_make->error.to.stream, data_make->error.notable, "%s", type_name);
- fl_color_print(data_make->error.to.stream, data_make->error.context, "' at end of section.%c", f_string_eol[0]);
+ fl_color_print(data_make->error.to.stream, data_make->error.context, "' at end of section.%c", f_string_eol_s[0]);
}
fake_print_message_section_operation_failed(*data, data_make->error, data_make->buffer, section->name, section->objects.array[section->objects.used - 1]);
if (data->error.verbosity == f_console_verbosity_verbose) {
fprintf(data->output.stream, "Breaking as '");
fl_color_print(data->output.stream, data->context.set.notable, "%s", arguments.used ? arguments.array[0].string : fake_make_operation_argument_success);
- fprintf(data->output.stream, "'.%c", f_string_eol[0]);
+ fprintf(data->output.stream, "'.%c", f_string_eol_s[0]);
}
return 0;
fl_color_print(data->output.stream, data->context.set.notable, "%s", arguments.array[i].string);
fprintf(data->output.stream, "' to '");
fl_color_print(data->output.stream, data->context.set.notable, "%s", destination);
- fprintf(data->output.stream, "'.%c", f_string_eol[0]);
+ fprintf(data->output.stream, "'.%c", f_string_eol_s[0]);
}
}
else if (F_status_is_error(status_file)) {
fl_color_print(data->output.stream, data->context.set.notable, "%s", arguments.array[i].string);
fprintf(data->output.stream, "' to '");
fl_color_print(data->output.stream, data->context.set.notable, "%s", destination);
- fprintf(data->output.stream, "'.%c", f_string_eol[0]);
+ fprintf(data->output.stream, "'.%c", f_string_eol_s[0]);
}
}
else if (F_status_is_error(status_file)) {
else if (data->error.verbosity == f_console_verbosity_verbose) {
fprintf(data->output.stream, "Defined environment variable '");
fl_color_print(data->output.stream, data->context.set.notable, "%s", arguments.array[0].string);
- fprintf(data->output.stream, "'.%c", f_string_eol[0]);
+ fprintf(data->output.stream, "'.%c", f_string_eol_s[0]);
}
return 0;
if (F_status_is_error(*status)) {
if (F_status_set_fine(*status) == F_file_found_not) {
if (data->error.verbosity == f_console_verbosity_verbose) {
- fprintf(data->output.stream, "%c", f_string_eol[0]);
+ fprintf(data->output.stream, "%c", f_string_eol_s[0]);
fl_color_print(data->output.stream, data->context.set.warning, "%sthe file '", fll_error_print_warning);
fl_color_print(data->output.stream, data->context.set.notable, "%s", arguments.array[i].string);
- fl_color_print(data->output.stream, data->context.set.warning, "' was not found.%c", f_string_eol[0]);
+ fl_color_print(data->output.stream, data->context.set.warning, "' was not found.%c", f_string_eol_s[0]);
}
*status = F_none;
if (data->error.verbosity == f_console_verbosity_verbose) {
fprintf(data->output.stream, "The directory '");
fl_color_print(data->output.stream, data->context.set.notable, "%s", arguments.array[i].string);
- fprintf(data->output.stream, "' does not exist.%c", f_string_eol[0]);
+ fprintf(data->output.stream, "' does not exist.%c", f_string_eol_s[0]);
}
*status = F_none;
else if (data->error.verbosity == f_console_verbosity_verbose) {
fprintf(data->output.stream, "Removed '");
fl_color_print(data->output.stream, data->context.set.notable, "%s", arguments.array[i].string);
- fprintf(data->output.stream, "'.%c", f_string_eol[0]);
+ fprintf(data->output.stream, "'.%c", f_string_eol_s[0]);
}
}
else {
if (data->error.verbosity == f_console_verbosity_verbose) {
fprintf(data->output.stream, "The file '");
fl_color_print(data->output.stream, data->context.set.notable, "%s", arguments.array[i].string);
- fprintf(data->output.stream, "' does not exist.%c", f_string_eol[0]);
+ fprintf(data->output.stream, "' does not exist.%c", f_string_eol_s[0]);
}
*status = F_none;
else if (data->error.verbosity == f_console_verbosity_verbose) {
fprintf(data->output.stream, "Removed '");
fl_color_print(data->output.stream, data->context.set.notable, "%s", arguments.array[i].string);
- fprintf(data->output.stream, "'.%c", f_string_eol[0]);
+ fprintf(data->output.stream, "'.%c", f_string_eol_s[0]);
}
}
} // for
if (data->error.verbosity == f_console_verbosity_verbose) {
fprintf(data->output.stream, "Exiting as '");
fl_color_print(data->output.stream, data->context.set.notable, "%s", arguments.used ? arguments.array[0].string : fake_make_operation_argument_success);
- fprintf(data->output.stream, "'.%c", f_string_eol[0]);
+ fprintf(data->output.stream, "'.%c", f_string_eol_s[0]);
}
return 0;
fl_color_print(data->output.stream, data->context.set.notable, "%s", fake_make_operation_argument_ignore);
}
- fprintf(data->output.stream, "'.%c", f_string_eol[0]);
+ fprintf(data->output.stream, "'.%c", f_string_eol_s[0]);
}
return 0;
fl_color_print(data->output.stream, data->context.set.notable, "%s", arguments.array[i].string);
fprintf(data->output.stream, "' to ");
fl_color_print(data->output.stream, data->context.set.notable, "%llu", id);
- fprintf(data->output.stream, ".%c", f_string_eol[0]);
+ fprintf(data->output.stream, ".%c", f_string_eol_s[0]);
}
} // for
fl_color_print(data->output.stream, data->context.set.notable, "%s", arguments.array[i].string);
fprintf(data->output.stream, "' to ");
fl_color_print(data->output.stream, data->context.set.notable, "%llu", id);
- fprintf(data->output.stream, ".%c", f_string_eol[0]);
+ fprintf(data->output.stream, ".%c", f_string_eol_s[0]);
}
} // for
*operation_if = fake_make_operation_if_type_false_always_next;
if (data->error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) {
- fprintf(data->output.stream, "%c", f_string_eol[0]);
+ fprintf(data->output.stream, "%c", f_string_eol_s[0]);
if ((i == 1 && number_left > f_number_t_size_unsigned) || (i > 1 && number_right > f_number_t_size_unsigned)) {
fl_color_print(data->error.to.stream, data_make->error.context, "%sThe number '", data_make->error.prefix);
fl_color_print(data->error.to.stream, data_make->error.notable, "%c%s", arguments.array[i].string);
- fl_color_print(data->error.to.stream, data_make->error.context, "' may only be between the ranges -%llu to %llu.%c", f_number_t_size_unsigned, f_number_t_size_unsigned, f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data_make->error.context, "' may only be between the ranges -%llu to %llu.%c", f_number_t_size_unsigned, f_number_t_size_unsigned, f_string_eol_s[0]);
}
else {
fl_color_print(data->error.to.stream, data_make->error.context, "%sInvalid or unsupported number provided '", data_make->error.prefix);
fl_color_print(data->error.to.stream, data_make->error.notable, "%s", arguments.array[i].string);
- fl_color_print(data->error.to.stream, data_make->error.context, "'.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data_make->error.context, "'.%c", f_string_eol_s[0]);
}
}
}
fl_color_print(data->error.to.stream, data->context.set.notable, "%s", arguments.array[1].string);
fprintf(data->output.stream, "' to '");
fl_color_print(data->error.to.stream, data->context.set.notable, "%s", arguments.array[0].string);
- fprintf(data->output.stream, "'.%c", f_string_eol[0]);
+ fprintf(data->output.stream, "'.%c", f_string_eol_s[0]);
}
return 0;
fl_color_print(data->error.to.stream, data->context.set.notable, "%s", arguments.array[i].string);
fprintf(data->output.stream, "' to ");
fl_color_print(data->error.to.stream, data->context.set.notable, "%#o", mode);
- fprintf(data->output.stream, ".%c", f_string_eol[0]);
+ fprintf(data->output.stream, ".%c", f_string_eol_s[0]);
}
} // for
fl_color_print(data->error.to.stream, data->context.set.notable, "%s", arguments.array[i].string);
fprintf(data->output.stream, "' to ");
fl_color_print(data->error.to.stream, data->context.set.notable, "%#o", mode);
- fprintf(data->output.stream, ".%c", f_string_eol[0]);
+ fprintf(data->output.stream, ".%c", f_string_eol_s[0]);
}
} // for
fl_color_print(data->error.to.stream, data->context.set.notable, "%s", arguments.array[i].string);
fprintf(data->output.stream, "' to ");
fl_color_print(data->error.to.stream, data->context.set.notable, "%d", id);
- fprintf(data->output.stream, ".%c", f_string_eol[0]);
+ fprintf(data->output.stream, ".%c", f_string_eol_s[0]);
}
} // for
fl_color_print(data->error.to.stream, data->context.set.notable, "%s", arguments.array[i].string);
fprintf(data->output.stream, "' to ");
fl_color_print(data->error.to.stream, data->context.set.notable, "%d", id);
- fprintf(data->output.stream, ".%c", f_string_eol[0]);
+ fprintf(data->output.stream, ".%c", f_string_eol_s[0]);
}
} // for
fl_color_print_code(data->output.stream, *data->context.set.notable.before);
f_print_dynamic(data->output.stream, data_make->path_cache);
fl_color_print_code(data->output.stream, *data->context.set.notable.after);
- fprintf(data->output.stream, "'.%c", f_string_eol[0]);
+ fprintf(data->output.stream, "'.%c", f_string_eol_s[0]);
}
return 0;
}
} // for
- fprintf(data->output.stream, "%c", f_string_eol[0]);
+ fprintf(data->output.stream, "%c", f_string_eol_s[0]);
return 0;
}
fl_color_print_code(data->output.stream, *data->context.set.notable.before);
f_print_dynamic(data->output.stream, data_make->path_cache);
fl_color_print_code(data->output.stream, *data->context.set.notable.after);
- fprintf(data->output.stream, "'.%c", f_string_eol[0]);
+ fprintf(data->output.stream, "'.%c", f_string_eol_s[0]);
}
data_make->path.stack.used++;
}
if (data->error.verbosity == f_console_verbosity_verbose) {
- fprintf(data->output.stream, "Changed to project path ''.%c", f_string_eol[0]);
+ fprintf(data->output.stream, "Changed to project path ''.%c", f_string_eol_s[0]);
}
// clear stack, except for the project root.
fl_color_print_code(data->output.stream, *data->context.set.notable.before);
f_print_dynamic(data->output.stream, arguments.array[i]);
fl_color_print_code(data->output.stream, *data->context.set.notable.after);
- fprintf(data->output.stream, "'.%c", f_string_eol[0]);
+ fprintf(data->output.stream, "'.%c", f_string_eol_s[0]);
}
} // for
fprintf(data.output.stream, " %s", arguments.array[i].string);
} // for
- fprintf(data.output.stream, "%c", f_string_eol[0]);
+ fprintf(data.output.stream, "%c", f_string_eol_s[0]);
// flush to stdout before executing command.
fflush(data.output.stream);
if (F_status_is_error(status)) {
if (F_status_set_fine(status) == F_file_found_not) {
if (data.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) {
- fprintf(data.error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data.error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data.error.to.stream, data_make->error.context, "%sFailed to find program '", data_make->error.prefix);
fl_color_print(data.error.to.stream, data_make->error.notable, "%s", program.string);
- fl_color_print(data.error.to.stream, data_make->error.context, "' for executing.%c", f_string_eol[0]);
+ fl_color_print(data.error.to.stream, data_make->error.context, "' for executing.%c", f_string_eol_s[0]);
}
}
else if (F_status_set_fine(status) != F_failure) {
}
if (data.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) {
- fprintf(data.error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data.error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data.error.to.stream, data_make->error.context, "%sFailed with return code '", data_make->error.prefix);
fl_color_print(data.error.to.stream, data_make->error.notable, "%s", data_make->setting_make.parameter.array[0].value.array[0].string);
- fl_color_print(data.error.to.stream, data_make->error.context, "'.%c", f_string_eol[0]);
+ fl_color_print(data.error.to.stream, data_make->error.context, "'.%c", f_string_eol_s[0]);
}
if (data_make->setting_make.fail == fake_make_operation_fail_type_exit) {
if (operation == fake_make_operation_type_index || operation == fake_make_operation_type_run || operation == fake_make_operation_type_shell) {
if (!arguments.used) {
if (data.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) {
- fprintf(data_make->error.to.stream, "%c", f_string_eol[0]);
- fl_color_print(data_make->error.to.stream, data_make->error.context, "%sRequires more arguments.%c", data_make->error.prefix, f_string_eol[0]);
+ fprintf(data_make->error.to.stream, "%c", f_string_eol_s[0]);
+ fl_color_print(data_make->error.to.stream, data_make->error.context, "%sRequires more arguments.%c", data_make->error.prefix, f_string_eol_s[0]);
}
*status = F_status_set_error(F_failure);
if (!data_make->setting_build.build_indexer.used) {
if (data.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) {
- fprintf(data_make->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data_make->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data_make->error.to.stream, data_make->error.context, "%sNo indexer has been specified, cannot perform '", data_make->error.prefix);
fl_color_print(data_make->error.to.stream, data_make->error.notable, fake_make_operation_index);
- fl_color_print(data_make->error.to.stream, data_make->error.context, "' section operation.%c", f_string_eol[0]);
+ fl_color_print(data_make->error.to.stream, data_make->error.context, "' section operation.%c", f_string_eol_s[0]);
}
*status = F_status_set_error(F_failure);
if (operation == fake_make_operation_type_break) {
if (arguments.used > 1) {
if (data.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) {
- fprintf(data_make->error.to.stream, "%c", f_string_eol[0]);
- fl_color_print(data_make->error.to.stream, data_make->error.context, "%sHas too many arguments.%c", data_make->error.prefix, f_string_eol[0]);
+ fprintf(data_make->error.to.stream, "%c", f_string_eol_s[0]);
+ fl_color_print(data_make->error.to.stream, data_make->error.context, "%sHas too many arguments.%c", data_make->error.prefix, f_string_eol_s[0]);
}
*status = F_status_set_error(F_failure);
if (fl_string_dynamic_compare_string(fake_make_operation_argument_failure, arguments.array[0], fake_make_operation_argument_failure_length) == F_equal_to_not) {
if (data.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) {
- fprintf(data_make->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data_make->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data_make->error.to.stream, data_make->error.context, "%sUnsupported break type '", data_make->error.prefix);
fl_color_print(data_make->error.to.stream, data_make->error.notable, "%s", arguments.array[0].string);
- fl_color_print(data_make->error.to.stream, data_make->error.context, "'.%c", f_string_eol[0]);
+ fl_color_print(data_make->error.to.stream, data_make->error.context, "'.%c", f_string_eol_s[0]);
}
*status = F_status_set_error(F_failure);
if (operation == fake_make_operation_type_build) {
if (arguments.used > 1) {
if (data.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) {
- fprintf(data_make->error.to.stream, "%c", f_string_eol[0]);
- fl_color_print(data_make->error.to.stream, data_make->error.context, "%sHas too many arguments.%c", data_make->error.prefix, f_string_eol[0]);
+ fprintf(data_make->error.to.stream, "%c", f_string_eol_s[0]);
+ fl_color_print(data_make->error.to.stream, data_make->error.context, "%sHas too many arguments.%c", data_make->error.prefix, f_string_eol_s[0]);
}
*status = F_status_set_error(F_failure);
if (status_file == F_file_found_not) {
if (data.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) {
- fprintf(data_make->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data_make->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data_make->error.to.stream, data_make->error.context, "%sFailed to find file '", data_make->error.prefix);
fl_color_print(data_make->error.to.stream, data_make->error.notable, "%s", path_file);
- fl_color_print(data_make->error.to.stream, data_make->error.context, "'.%c", f_string_eol[0]);
+ fl_color_print(data_make->error.to.stream, data_make->error.context, "'.%c", f_string_eol_s[0]);
}
*status = F_status_set_error(status_file);
}
else if (!status_file) {
if (data.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) {
- fprintf(data_make->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data_make->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data_make->error.to.stream, data_make->error.context, "%sThe file '", data_make->error.prefix);
fl_color_print(data_make->error.to.stream, data_make->error.notable, "%s", path_file);
- fl_color_print(data_make->error.to.stream, data_make->error.context, "' must be a regular file.%c", f_string_eol[0]);
+ fl_color_print(data_make->error.to.stream, data_make->error.context, "' must be a regular file.%c", f_string_eol_s[0]);
}
*status = F_status_set_error(F_failure);
}
else {
if (data.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) {
- fprintf(data_make->error.to.stream, "%c", f_string_eol[0]);
- fl_color_print(data_make->error.to.stream, data_make->error.context, "%sFilename argument must not be an empty string.%c", data_make->error.prefix, f_string_eol[0]);
+ fprintf(data_make->error.to.stream, "%c", f_string_eol_s[0]);
+ fl_color_print(data_make->error.to.stream, data_make->error.context, "%sFilename argument must not be an empty string.%c", data_make->error.prefix, f_string_eol_s[0]);
}
*status = F_status_set_error(F_failure);
if (operation == fake_make_operation_type_clean || operation == fake_make_operation_type_pop || operation == fake_make_operation_type_top || operation == fake_make_operation_type_skeleton) {
if (arguments.used) {
if (data.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) {
- fprintf(data_make->error.to.stream, "%c", f_string_eol[0]);
- fl_color_print(data_make->error.to.stream, data_make->error.context, "%sHas too many arguments.%c", data_make->error.prefix, f_string_eol[0]);
+ fprintf(data_make->error.to.stream, "%c", f_string_eol_s[0]);
+ fl_color_print(data_make->error.to.stream, data_make->error.context, "%sHas too many arguments.%c", data_make->error.prefix, f_string_eol_s[0]);
}
*status = F_status_set_error(F_failure);
if (data_make->path.stack.used == 1) {
if (data.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) {
- fprintf(data_make->error.to.stream, "%c", f_string_eol[0]);
- fl_color_print(data_make->error.to.stream, data_make->error.context, "%sMust not attempt to pop project root off of path stack.%c", data_make->error.prefix, f_string_eol[0]);
+ fprintf(data_make->error.to.stream, "%c", f_string_eol_s[0]);
+ fl_color_print(data_make->error.to.stream, data_make->error.context, "%sMust not attempt to pop project root off of path stack.%c", data_make->error.prefix, f_string_eol_s[0]);
}
*status = F_status_set_error(F_failure);
if (f_file_exists(arguments.array[i].string) != F_true) {
if (data.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) {
- fprintf(data_make->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data_make->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data_make->error.to.stream, data_make->error.context, "%sFailed to find file '", data_make->error.prefix);
fl_color_print(data_make->error.to.stream, data_make->error.notable, "%s", arguments.array[i].string);
- fl_color_print(data_make->error.to.stream, data_make->error.context, "'.%c", f_string_eol[0]);
+ fl_color_print(data_make->error.to.stream, data_make->error.context, "'.%c", f_string_eol_s[0]);
}
*status = F_status_set_error(F_failure);
if (status_file == F_false || status_file == F_file_found_not) {
if (data.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) {
- fprintf(data_make->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data_make->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data_make->error.to.stream, data_make->error.context, "%sThe last file '", data_make->error.prefix);
fl_color_print(data_make->error.to.stream, data_make->error.notable, "%s", arguments.array[arguments.used - 1].string);
- fl_color_print(data_make->error.to.stream, data_make->error.context, "' must be a valid directory.%c", f_string_eol[0]);
+ fl_color_print(data_make->error.to.stream, data_make->error.context, "' must be a valid directory.%c", f_string_eol_s[0]);
}
*status = F_status_set_error(F_failure);
if (status_file == F_false) {
if (data.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) {
- fprintf(data_make->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data_make->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data_make->error.to.stream, data_make->error.context, "%sThe last file '", data_make->error.prefix);
fl_color_print(data_make->error.to.stream, data_make->error.notable, "%s", arguments.array[1].string);
- fl_color_print(data_make->error.to.stream, data_make->error.context, "' must be a valid directory.%c", f_string_eol[0]);
+ fl_color_print(data_make->error.to.stream, data_make->error.context, "' must be a valid directory.%c", f_string_eol_s[0]);
}
*status = F_status_set_error(F_failure);
}
else {
if (data.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) {
- fprintf(data_make->error.to.stream, "%c", f_string_eol[0]);
- fl_color_print(data_make->error.to.stream, data_make->error.context, "%sRequires more arguments.%c", data_make->error.prefix, f_string_eol[0]);
+ fprintf(data_make->error.to.stream, "%c", f_string_eol_s[0]);
+ fl_color_print(data_make->error.to.stream, data_make->error.context, "%sRequires more arguments.%c", data_make->error.prefix, f_string_eol_s[0]);
}
*status = F_status_set_error(F_failure);
if (operation == fake_make_operation_type_compile) {
if (!arguments.used) {
if (data.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) {
- fprintf(data_make->error.to.stream, "%c", f_string_eol[0]);
- fl_color_print(data_make->error.to.stream, data_make->error.context, "%sRequires more arguments.%c", data_make->error.prefix, f_string_eol[0]);
+ fprintf(data_make->error.to.stream, "%c", f_string_eol_s[0]);
+ fl_color_print(data_make->error.to.stream, data_make->error.context, "%sRequires more arguments.%c", data_make->error.prefix, f_string_eol_s[0]);
}
*status = F_status_set_error(F_failure);
}
else if (data_make->setting_build.build_compiler.used) {
if (data.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) {
- fprintf(data_make->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data_make->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data_make->error.to.stream, data_make->error.context, "%sNo compiler has been specified, cannot perform '", data_make->error.prefix);
fl_color_print(data_make->error.to.stream, data_make->error.notable, fake_make_operation_compile);
- fl_color_print(data_make->error.to.stream, data_make->error.context, "' section operation.%c", f_string_eol[0]);
+ fl_color_print(data_make->error.to.stream, data_make->error.context, "' section operation.%c", f_string_eol_s[0]);
}
*status = F_status_set_error(F_failure);
if (f_file_exists(arguments.array[i].string) != F_true) {
if (data.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) {
- fprintf(data_make->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data_make->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data_make->error.to.stream, data_make->error.context, "%sFailed to find file '", data_make->error.prefix);
fl_color_print(data_make->error.to.stream, data_make->error.notable, "%s", arguments.array[i].string);
- fl_color_print(data_make->error.to.stream, data_make->error.context, "'.%c", f_string_eol[0]);
+ fl_color_print(data_make->error.to.stream, data_make->error.context, "'.%c", f_string_eol_s[0]);
}
*status = F_status_set_error(F_failure);
if (status_file == F_false || status_file == F_file_found_not) {
if (data.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) {
- fprintf(data_make->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data_make->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data_make->error.to.stream, data_make->error.context, "%sThe last file '", data_make->error.prefix);
fl_color_print(data_make->error.to.stream, data_make->error.notable, "%s", arguments.array[arguments.used - 1].string);
- fl_color_print(data_make->error.to.stream, data_make->error.context, "' must be a valid directory.%c", f_string_eol[0]);
+ fl_color_print(data_make->error.to.stream, data_make->error.context, "' must be a valid directory.%c", f_string_eol_s[0]);
}
*status = F_status_set_error(F_failure);
if (status_file == F_false) {
if (data.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) {
- fprintf(data_make->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data_make->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data_make->error.to.stream, data_make->error.context, "%sThe last file '", data_make->error.prefix);
fl_color_print(data_make->error.to.stream, data_make->error.notable, "%s", arguments.array[1].string);
- fl_color_print(data_make->error.to.stream, data_make->error.context, "' must be a valid directory.%c", f_string_eol[0]);
+ fl_color_print(data_make->error.to.stream, data_make->error.context, "' must be a valid directory.%c", f_string_eol_s[0]);
}
*status = F_status_set_error(F_failure);
}
else {
if (data.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) {
- fprintf(data_make->error.to.stream, "%c", f_string_eol[0]);
- fl_color_print(data_make->error.to.stream, data_make->error.context, "%sRequires more arguments.%c", data_make->error.prefix, f_string_eol[0]);
+ fprintf(data_make->error.to.stream, "%c", f_string_eol_s[0]);
+ fl_color_print(data_make->error.to.stream, data_make->error.context, "%sRequires more arguments.%c", data_make->error.prefix, f_string_eol_s[0]);
}
*status = F_status_set_error(F_failure);
}
else {
if (data.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) {
- fprintf(data_make->error.to.stream, "%c", f_string_eol[0]);
- fl_color_print(data_make->error.to.stream, data_make->error.context, "%sRequires more arguments.%c", data_make->error.prefix, f_string_eol[0]);
+ fprintf(data_make->error.to.stream, "%c", f_string_eol_s[0]);
+ fl_color_print(data_make->error.to.stream, data_make->error.context, "%sRequires more arguments.%c", data_make->error.prefix, f_string_eol_s[0]);
}
*status = F_status_set_error(F_failure);
if (*status == F_none) {
if (data.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) {
- fprintf(data_make->error.to.stream, "%c", f_string_eol[0]);
- fl_color_print(data_make->error.to.stream, data_make->error.context, "%sDefine name must not be an empty string.%c", data_make->error.prefix, f_string_eol[0]);
+ fprintf(data_make->error.to.stream, "%c", f_string_eol_s[0]);
+ fl_color_print(data_make->error.to.stream, data_make->error.context, "%sDefine name must not be an empty string.%c", data_make->error.prefix, f_string_eol_s[0]);
}
*status = F_status_set_error(F_failure);
}
else if (*status == F_false) {
if (data.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) {
- fprintf(data_make->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data_make->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data_make->error.to.stream, data_make->error.context, "%sInvalid characters in the define setting name '", data_make->error.prefix);
fl_color_print_code(data_make->error.to.stream, *data_make->error.notable.before);
f_print_dynamic(data_make->error.to.stream, arguments.array[0]);
fl_color_print_code(data_make->error.to.stream, *data_make->error.notable.after);
- fl_color_print(data_make->error.to.stream, data_make->error.context, "', only alpha-numeric ASCII characters and underscore (without a leading digit) is allowed.%c", f_string_eol[0]);
+ fl_color_print(data_make->error.to.stream, data_make->error.context, "', only alpha-numeric ASCII characters and underscore (without a leading digit) is allowed.%c", f_string_eol_s[0]);
}
*status = F_status_set_error(F_failure);
}
else {
if (data.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) {
- fprintf(data_make->error.to.stream, "%c", f_string_eol[0]);
- fl_color_print(data_make->error.to.stream, data_make->error.context, "%sRequires more arguments.%c", data_make->error.prefix, f_string_eol[0]);
+ fprintf(data_make->error.to.stream, "%c", f_string_eol_s[0]);
+ fl_color_print(data_make->error.to.stream, data_make->error.context, "%sRequires more arguments.%c", data_make->error.prefix, f_string_eol_s[0]);
}
*status = F_status_set_error(F_failure);
if (operation == fake_make_operation_type_else) {
if (*operation_if == fake_make_operation_if_type_else_true || *operation_if == fake_make_operation_if_type_else_false) {
if (data.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) {
- fprintf(data_make->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data_make->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data_make->error.to.stream, data_make->error.context, "%sMust not be used after another '", data_make->error.prefix);
fl_color_print(data_make->error.to.stream, data_make->error.notable, "else");
- fl_color_print(data_make->error.to.stream, data_make->error.context, "' section operation.%c", f_string_eol[0]);
+ fl_color_print(data_make->error.to.stream, data_make->error.context, "' section operation.%c", f_string_eol_s[0]);
}
*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.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) {
- fprintf(data_make->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data_make->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data_make->error.to.stream, data_make->error.context, "%sMust not be used inside an ", data_make->error.prefix);
fl_color_print(data_make->error.to.stream, data_make->error.notable, "if");
- fl_color_print(data_make->error.to.stream, data_make->error.context, "' section operation.%c", f_string_eol[0]);
+ fl_color_print(data_make->error.to.stream, data_make->error.context, "' section operation.%c", f_string_eol_s[0]);
}
*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.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) {
- fprintf(data_make->error.to.stream, "%c", f_string_eol[0]);
- fl_color_print(data_make->error.to.stream, data_make->error.context, "%sHas no preceding if condition.%c", data_make->error.prefix, f_string_eol[0]);
+ fprintf(data_make->error.to.stream, "%c", f_string_eol_s[0]);
+ fl_color_print(data_make->error.to.stream, data_make->error.context, "%sHas no preceding if condition.%c", data_make->error.prefix, f_string_eol_s[0]);
}
*status = F_status_set_error(F_failure);
if (arguments.used) {
if (data.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) {
- fprintf(data_make->error.to.stream, "%c", f_string_eol[0]);
- fl_color_print(data_make->error.to.stream, data_make->error.context, "%sHas too many arguments.%c", data_make->error.prefix, f_string_eol[0]);
+ fprintf(data_make->error.to.stream, "%c", f_string_eol_s[0]);
+ fl_color_print(data_make->error.to.stream, data_make->error.context, "%sHas too many arguments.%c", data_make->error.prefix, f_string_eol_s[0]);
}
*status = F_status_set_error(F_failure);
if (operation == fake_make_operation_type_exit) {
if (arguments.used > 1) {
if (data.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) {
- fprintf(data_make->error.to.stream, "%c", f_string_eol[0]);
- fl_color_print(data_make->error.to.stream, data_make->error.context, "%sHas too many arguments.%c", data_make->error.prefix, f_string_eol[0]);
+ fprintf(data_make->error.to.stream, "%c", f_string_eol_s[0]);
+ fl_color_print(data_make->error.to.stream, data_make->error.context, "%sHas too many arguments.%c", data_make->error.prefix, f_string_eol_s[0]);
}
*status = F_status_set_error(F_failure);
if (fl_string_dynamic_compare_string(fake_make_operation_argument_failure, arguments.array[0], fake_make_operation_argument_failure_length) == F_equal_to_not) {
if (data.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) {
- fprintf(data_make->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data_make->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data_make->error.to.stream, data_make->error.context, "%sUnsupported exit type '", data_make->error.prefix);
fl_color_print(data_make->error.to.stream, data_make->error.notable, "%s", arguments.array[0].string);
- fl_color_print(data_make->error.to.stream, data_make->error.context, "'.%c", f_string_eol[0]);
+ fl_color_print(data_make->error.to.stream, data_make->error.context, "'.%c", f_string_eol_s[0]);
}
*status = F_status_set_error(F_failure);
if (fl_string_dynamic_compare_string(fake_make_operation_argument_ignore, arguments.array[0], fake_make_operation_argument_ignore_length) == F_equal_to_not) {
if (data.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) {
- fprintf(data_make->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data_make->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data_make->error.to.stream, data_make->error.context, "%sUnsupported fail type '", data_make->error.prefix);
fl_color_print(data_make->error.to.stream, data_make->error.notable, "%s", arguments.array[0].string);
- fl_color_print(data_make->error.to.stream, data_make->error.context, "'.%c", f_string_eol[0]);
+ fl_color_print(data_make->error.to.stream, data_make->error.context, "'.%c", f_string_eol_s[0]);
}
*status = F_status_set_error(F_failure);
}
else {
if (data.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) {
- fprintf(data_make->error.to.stream, "%c", f_string_eol[0]);
- fl_color_print(data_make->error.to.stream, data_make->error.context, "%sRequires more arguments.%c", data_make->error.prefix, f_string_eol[0]);
+ fprintf(data_make->error.to.stream, "%c", f_string_eol_s[0]);
+ fl_color_print(data_make->error.to.stream, data_make->error.context, "%sRequires more arguments.%c", data_make->error.prefix, f_string_eol_s[0]);
}
*status = F_status_set_error(F_failure);
if (status_file == F_file_found_not) {
if (data.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) {
- fprintf(data_make->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data_make->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data_make->error.to.stream, data_make->error.context, "%sFailed to find file '", data_make->error.prefix);
fl_color_print(data_make->error.to.stream, data_make->error.notable, "%s", arguments.array[i].string);
- fl_color_print(data_make->error.to.stream, data_make->error.context, "'.%c", f_string_eol[0]);
+ fl_color_print(data_make->error.to.stream, data_make->error.context, "'.%c", f_string_eol_s[0]);
}
*status = F_status_set_error(status_file);
}
if (data.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) {
- fprintf(data_make->error.to.stream, "%c", f_string_eol[0]);
- fl_color_print(data_make->error.to.stream, data_make->error.context, "%sRequires more arguments.%c", data_make->error.prefix, f_string_eol[0]);
+ fprintf(data_make->error.to.stream, "%c", f_string_eol_s[0]);
+ fl_color_print(data_make->error.to.stream, data_make->error.context, "%sRequires more arguments.%c", data_make->error.prefix, f_string_eol_s[0]);
}
*status = F_status_set_error(F_failure);
if (operation == fake_make_operation_type_if) {
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.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) {
- fprintf(data_make->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data_make->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data_make->error.to.stream, data_make->error.context, "%sMust not be used after another '", data_make->error.prefix);
fl_color_print(data_make->error.to.stream, data_make->error.notable, "if");
- fl_color_print(data_make->error.to.stream, data_make->error.context, "' section operation.%c", f_string_eol[0]);
+ fl_color_print(data_make->error.to.stream, data_make->error.context, "' section operation.%c", f_string_eol_s[0]);
}
*status = F_status_set_error(F_failure);
if (i == 14) {
if (data.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) {
- fprintf(data_make->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data_make->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data_make->error.to.stream, data_make->error.context, "%sUnsupported if type '", data_make->error.prefix);
fl_color_print(data_make->error.to.stream, data_make->error.notable, "%s", arguments.array[0].string);
- fl_color_print(data_make->error.to.stream, data_make->error.context, "'.%c", f_string_eol[0]);
+ fl_color_print(data_make->error.to.stream, data_make->error.context, "'.%c", f_string_eol_s[0]);
}
*status = F_status_set_error(F_failure);
if (*operation_if == fake_make_operation_if_type_if_success || *operation_if == fake_make_operation_if_type_if_failure) {
if (arguments.used > if_type_minimum[i]) {
if (data.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) {
- fprintf(data_make->error.to.stream, "%c", f_string_eol[0]);
- fl_color_print(data_make->error.to.stream, data_make->error.context, "%sHas too many arguments.%c", data_make->error.prefix, f_string_eol[0]);
+ fprintf(data_make->error.to.stream, "%c", f_string_eol_s[0]);
+ fl_color_print(data_make->error.to.stream, data_make->error.context, "%sHas too many arguments.%c", data_make->error.prefix, f_string_eol_s[0]);
}
*status = F_status_set_error(F_failure);
if (fl_string_dynamic_compare_string(fake_make_operation_argument_is, arguments.array[1], fake_make_operation_argument_is_length) == F_equal_to_not) {
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.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) {
- fprintf(data_make->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data_make->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data_make->error.to.stream, data_make->error.context, "%sUnsupported mode type '", data_make->error.prefix);
fl_color_print(data_make->error.to.stream, data_make->error.notable, "%s", arguments.array[1].string);
- fl_color_print(data_make->error.to.stream, data_make->error.context, "'.%c", f_string_eol[0]);
+ fl_color_print(data_make->error.to.stream, data_make->error.context, "'.%c", f_string_eol_s[0]);
}
*status = F_status_set_error(F_failure);
}
else {
if (data.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) {
- fprintf(data_make->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data_make->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data_make->error.to.stream, data_make->error.context, "%sUnsupported file type '", data_make->error.prefix);
fl_color_print(data_make->error.to.stream, data_make->error.notable, "%s", arguments.array[i].string);
- fl_color_print(data_make->error.to.stream, data_make->error.context, "'.%c", f_string_eol[0]);
+ fl_color_print(data_make->error.to.stream, data_make->error.context, "'.%c", f_string_eol_s[0]);
}
type_file |= 0x80;
if (fl_string_dynamic_compare_string(fake_make_operation_argument_environment, arguments.array[1], fake_make_operation_argument_environment_length) == F_equal_to_not) {
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.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) {
- fprintf(data_make->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data_make->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data_make->error.to.stream, data_make->error.context, "%sUnsupported define type '", data_make->error.prefix);
fl_color_print(data_make->error.to.stream, data_make->error.notable, "%s", arguments.array[1].string);
- fl_color_print(data_make->error.to.stream, data_make->error.context, "'.%c", f_string_eol[0]);
+ fl_color_print(data_make->error.to.stream, data_make->error.context, "'.%c", f_string_eol_s[0]);
}
*status = F_status_set_error(F_failure);
if (*operation_if == fake_make_operation_if_type_if_equal || *operation_if == fake_make_operation_if_type_if_equal_not) {
if (arguments.used < 3) {
if (data.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) {
- fprintf(data_make->error.to.stream, "%c", f_string_eol[0]);
- fl_color_print(data_make->error.to.stream, data_make->error.context, "%sRequires more arguments.%c", data_make->error.prefix, f_string_eol[0]);
+ fprintf(data_make->error.to.stream, "%c", f_string_eol_s[0]);
+ fl_color_print(data_make->error.to.stream, data_make->error.context, "%sRequires more arguments.%c", data_make->error.prefix, f_string_eol_s[0]);
}
*status = F_status_set_error(F_failure);
if (*operation_if == fake_make_operation_if_type_if_greater || *operation_if == fake_make_operation_if_type_if_greater_equal || *operation_if == fake_make_operation_if_type_if_less || *operation_if == fake_make_operation_if_type_if_less_equal) {
if (arguments.used < 3) {
if (data.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) {
- fprintf(data_make->error.to.stream, "%c", f_string_eol[0]);
- fl_color_print(data_make->error.to.stream, data_make->error.context, "%sRequires more arguments.%c", data_make->error.prefix, f_string_eol[0]);
+ fprintf(data_make->error.to.stream, "%c", f_string_eol_s[0]);
+ fl_color_print(data_make->error.to.stream, data_make->error.context, "%sRequires more arguments.%c", data_make->error.prefix, f_string_eol_s[0]);
}
*status = F_status_set_error(F_failure);
*status = F_status_set_error(F_failure);
if (data.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) {
- fprintf(data_make->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data_make->error.to.stream, "%c", f_string_eol_s[0]);
if (number > f_number_t_size_unsigned) {
fl_color_print(data_make->error.to.stream, data_make->error.context, "%sThe number '", data_make->error.prefix);
fl_color_print(data_make->error.to.stream, data_make->error.notable, "%c%s", arguments.array[i].string);
- fl_color_print(data_make->error.to.stream, data_make->error.context, "' may only be between the ranges -%llu to %llu.%c", f_number_t_size_unsigned, f_number_t_size_unsigned, f_string_eol[0]);
+ fl_color_print(data_make->error.to.stream, data_make->error.context, "' may only be between the ranges -%llu to %llu.%c", f_number_t_size_unsigned, f_number_t_size_unsigned, f_string_eol_s[0]);
}
else {
fl_color_print(data_make->error.to.stream, data_make->error.context, "%sInvalid or unsupported number provided '", data_make->error.prefix);
fl_color_print(data_make->error.to.stream, data_make->error.notable, "%s", arguments.array[i].string);
- fl_color_print(data_make->error.to.stream, data_make->error.context, "'.%c", f_string_eol[0]);
+ fl_color_print(data_make->error.to.stream, data_make->error.context, "'.%c", f_string_eol_s[0]);
}
}
}
}
if (data.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) {
- fprintf(data_make->error.to.stream, "%c", f_string_eol[0]);
- fl_color_print(data_make->error.to.stream, data_make->error.context, "%sRequires more arguments.%c", data_make->error.prefix, f_string_eol[0]);
+ fprintf(data_make->error.to.stream, "%c", f_string_eol_s[0]);
+ fl_color_print(data_make->error.to.stream, data_make->error.context, "%sRequires more arguments.%c", data_make->error.prefix, f_string_eol_s[0]);
}
*status = F_status_set_error(F_failure);
if (operation == fake_make_operation_type_link) {
if (arguments.used > 2) {
if (data.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) {
- fprintf(data_make->error.to.stream, "%c", f_string_eol[0]);
- fl_color_print(data_make->error.to.stream, data_make->error.context, "%sHas too many arguments.%c", data_make->error.prefix, f_string_eol[0]);
+ fprintf(data_make->error.to.stream, "%c", f_string_eol_s[0]);
+ fl_color_print(data_make->error.to.stream, data_make->error.context, "%sHas too many arguments.%c", data_make->error.prefix, f_string_eol_s[0]);
}
*status = F_status_set_error(F_failure);
}
else {
if (data.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) {
- fprintf(data_make->error.to.stream, "%c", f_string_eol[0]);
- fl_color_print(data_make->error.to.stream, data_make->error.context, "%sRequires more arguments.%c", data_make->error.prefix, f_string_eol[0]);
+ fprintf(data_make->error.to.stream, "%c", f_string_eol_s[0]);
+ fl_color_print(data_make->error.to.stream, data_make->error.context, "%sRequires more arguments.%c", data_make->error.prefix, f_string_eol_s[0]);
}
*status = F_status_set_error(F_failure);
if (f_file_exists(arguments.array[i].string) != F_true) {
if (data.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) {
- fprintf(data_make->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data_make->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data_make->error.to.stream, data_make->error.context, "%sFailed to find file '", data_make->error.prefix);
fl_color_print(data_make->error.to.stream, data_make->error.notable, "%s", arguments.array[i].string);
- fl_color_print(data_make->error.to.stream, data_make->error.context, "'.%c", f_string_eol[0]);
+ fl_color_print(data_make->error.to.stream, data_make->error.context, "'.%c", f_string_eol_s[0]);
}
*status = F_status_set_error(F_failure);
if (status_file == F_false || status_file == F_file_found_not) {
if (data.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) {
- fprintf(data_make->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data_make->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data_make->error.to.stream, data_make->error.context, "%sThe last file '", data_make->error.prefix);
fl_color_print(data_make->error.to.stream, data_make->error.notable, "%s", arguments.array[arguments.used - 1].string);
- fl_color_print(data_make->error.to.stream, data_make->error.context, "' must be a valid directory.%c", f_string_eol[0]);
+ fl_color_print(data_make->error.to.stream, data_make->error.context, "' must be a valid directory.%c", f_string_eol_s[0]);
}
*status = F_status_set_error(F_failure);
if (status_file == F_false) {
if (data.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) {
- fprintf(data_make->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data_make->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data_make->error.to.stream, data_make->error.context, "%sThe last file '", data_make->error.prefix);
fl_color_print(data_make->error.to.stream, data_make->error.notable, "%s", arguments.array[1].string);
- fl_color_print(data_make->error.to.stream, data_make->error.context, "' must be a valid directory.%c", f_string_eol[0]);
+ fl_color_print(data_make->error.to.stream, data_make->error.context, "' must be a valid directory.%c", f_string_eol_s[0]);
}
*status = F_status_set_error(F_failure);
}
else {
if (data.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) {
- fprintf(data_make->error.to.stream, "%c", f_string_eol[0]);
- fl_color_print(data_make->error.to.stream, data_make->error.context, "%sRequires more arguments.%c", data_make->error.prefix, f_string_eol[0]);
+ fprintf(data_make->error.to.stream, "%c", f_string_eol_s[0]);
+ fl_color_print(data_make->error.to.stream, data_make->error.context, "%sRequires more arguments.%c", data_make->error.prefix, f_string_eol_s[0]);
}
*status = F_status_set_error(F_failure);
if (operation == fake_make_operation_type_operate) {
if (arguments.used > 1) {
if (data.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) {
- fprintf(data_make->error.to.stream, "%c", f_string_eol[0]);
- fl_color_print(data_make->error.to.stream, data_make->error.context, "%sHas too many arguments.%c", data_make->error.prefix, f_string_eol[0]);
+ fprintf(data_make->error.to.stream, "%c", f_string_eol_s[0]);
+ fl_color_print(data_make->error.to.stream, data_make->error.context, "%sHas too many arguments.%c", data_make->error.prefix, f_string_eol_s[0]);
}
*status = F_status_set_error(F_failure);
} // for
if (id_section == data_make->fakefile.used) {
- fprintf(data_make->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data_make->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data_make->error.to.stream, data_make->error.context, "%sNo operation section named '", data_make->error.prefix);
fl_color_print(data_make->error.to.stream, data_make->error.notable, "%s", arguments.array[0].string);
- fl_color_print(data_make->error.to.stream, data_make->error.context, "' was found.%c", f_string_eol[0]);
+ fl_color_print(data_make->error.to.stream, data_make->error.context, "' was found.%c", f_string_eol_s[0]);
}
else {
for (f_array_length_t i = 0; i < section_stack->used; i++) {
if (section_stack->array[i] == id_section) {
- fprintf(data_make->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data_make->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data_make->error.to.stream, data_make->error.context, "%sThe section operation '", data_make->error.prefix);
fl_color_print_code(data_make->error.to.stream, *data_make->error.notable.before);
f_print_dynamic_partial(data_make->error.to.stream, data_make->buffer, data_make->fakefile.array[id_section].name);
fl_color_print_code(data_make->error.to.stream, *data_make->error.notable.after);
- fl_color_print(data_make->error.to.stream, data_make->error.context, "' is already in the operation stack, recursion is not allowed.%c", f_string_eol[0]);
+ fl_color_print(data_make->error.to.stream, data_make->error.context, "' is already in the operation stack, recursion is not allowed.%c", f_string_eol_s[0]);
*status = F_status_set_error(F_failure);
break;
}
else {
if (data.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) {
- fprintf(data_make->error.to.stream, "%c", f_string_eol[0]);
- fl_color_print(data_make->error.to.stream, data_make->error.context, "%sRequires more arguments.%c", data_make->error.prefix, f_string_eol[0]);
+ fprintf(data_make->error.to.stream, "%c", f_string_eol_s[0]);
+ fl_color_print(data_make->error.to.stream, data_make->error.context, "%sRequires more arguments.%c", data_make->error.prefix, f_string_eol_s[0]);
}
*status = F_status_set_error(F_failure);
if (operation == fake_make_operation_type_to) {
if (arguments.used > 1) {
if (data.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) {
- fprintf(data_make->error.to.stream, "%c", f_string_eol[0]);
- fl_color_print(data_make->error.to.stream, data_make->error.context, "%sHas too many arguments.%c", data_make->error.prefix, f_string_eol[0]);
+ fprintf(data_make->error.to.stream, "%c", f_string_eol_s[0]);
+ fl_color_print(data_make->error.to.stream, data_make->error.context, "%sHas too many arguments.%c", data_make->error.prefix, f_string_eol_s[0]);
}
*status = F_status_set_error(F_failure);
if (status_file == F_file_found_not) {
if (data.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) {
- fprintf(data_make->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data_make->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data_make->error.to.stream, data_make->error.context, "%sFailed to find file '", data_make->error.prefix);
fl_color_print(data_make->error.to.stream, data_make->error.notable, "%s", arguments.array[0].string);
- fl_color_print(data_make->error.to.stream, data_make->error.context, "'.%c", f_string_eol[0]);
+ fl_color_print(data_make->error.to.stream, data_make->error.context, "'.%c", f_string_eol_s[0]);
}
*status = F_status_set_error(status_file);
}
else if (!status_file) {
if (data.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) {
- fprintf(data_make->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data_make->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data_make->error.to.stream, data_make->error.context, "%sThe file '", data_make->error.prefix);
fl_color_print(data_make->error.to.stream, data_make->error.notable, "%s", arguments.array[0].string);
- fl_color_print(data_make->error.to.stream, data_make->error.context, "' must be a directory file.%c", f_string_eol[0]);
+ fl_color_print(data_make->error.to.stream, data_make->error.context, "' must be a directory file.%c", f_string_eol_s[0]);
}
*status = F_status_set_error(F_failure);
}
else {
if (data.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) {
- fprintf(data_make->error.to.stream, "%c", f_string_eol[0]);
- fl_color_print(data_make->error.to.stream, data_make->error.context, "%sFilename argument must not be an empty string.%c", data_make->error.prefix, f_string_eol[0]);
+ fprintf(data_make->error.to.stream, "%c", f_string_eol_s[0]);
+ fl_color_print(data_make->error.to.stream, data_make->error.context, "%sFilename argument must not be an empty string.%c", data_make->error.prefix, f_string_eol_s[0]);
}
}
}
else {
if (data.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) {
- fprintf(data_make->error.to.stream, "%c", f_string_eol[0]);
- fl_color_print(data_make->error.to.stream, data_make->error.context, "%sRequires more arguments.%c", data_make->error.prefix, f_string_eol[0]);
+ fprintf(data_make->error.to.stream, "%c", f_string_eol_s[0]);
+ fl_color_print(data_make->error.to.stream, data_make->error.context, "%sRequires more arguments.%c", data_make->error.prefix, f_string_eol_s[0]);
}
*status = F_status_set_error(F_failure);
if (fl_string_dynamic_compare_string(fake_make_operation_argument_directory, arguments.array[0], fake_make_operation_argument_directory_length) == F_equal_to_not) {
if (data.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) {
- fprintf(data_make->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data_make->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data_make->error.to.stream, data_make->error.context, "%sUnsupported file type '", data_make->error.prefix);
fl_color_print(data_make->error.to.stream, data_make->error.notable, "%s", arguments.array[0].string);
- fl_color_print(data_make->error.to.stream, data_make->error.context, "'.%c", f_string_eol[0]);
+ fl_color_print(data_make->error.to.stream, data_make->error.context, "'.%c", f_string_eol_s[0]);
}
*status = F_status_set_error(F_failure);
}
else {
if (data.error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) {
- fprintf(data_make->error.to.stream, "%c", f_string_eol[0]);
- fl_color_print(data_make->error.to.stream, data_make->error.context, "%sRequires more arguments.%c", data_make->error.prefix, f_string_eol[0]);
+ fprintf(data_make->error.to.stream, "%c", f_string_eol_s[0]);
+ fl_color_print(data_make->error.to.stream, data_make->error.context, "%sRequires more arguments.%c", data_make->error.prefix, f_string_eol_s[0]);
}
*status = F_status_set_error(F_failure);
if (status == F_file_found_not) {
if (data.error.verbosity != f_console_verbosity_quiet) {
- fprintf(data.error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data.error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data.error.to.stream, data.context.set.error, "%sFailed to find '", fll_error_print_error);
if (f_file_exists(source) == F_true) {
fl_color_print(data.error.to.stream, data.context.set.notable, "%s", destination);
}
- fl_color_print(data.error.to.stream, data.context.set.error, "'.%c", f_string_eol[0]);
+ fl_color_print(data.error.to.stream, data.context.set.error, "'.%c", f_string_eol_s[0]);
}
return F_false;
if (status == F_parameter) {
if (data.error.verbosity != f_console_verbosity_quiet) {
- fprintf(data.error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data.error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data.error.to.stream, data.context.set.error, "%sInvalid parameter when calling ", fll_error_print_error);
fl_color_print(data.error.to.stream, data.context.set.notable, "%s", function);
fl_color_print(data.error.to.stream, data.context.set.error, "() to %s '", operation);
fl_color_print(data.error.to.stream, data.context.set.notable, "%s", destination);
}
- fl_color_print(data.error.to.stream, data.context.set.error, "'.%c", f_string_eol[0]);
+ fl_color_print(data.error.to.stream, data.context.set.error, "'.%c", f_string_eol_s[0]);
}
return F_false;
if (status == F_name) {
if (data.error.verbosity != f_console_verbosity_quiet) {
- fprintf(data.error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data.error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data.error.to.stream, data.context.set.error, "%sInvalid name for '", fll_error_print_error);
fl_color_print(data.error.to.stream, data.context.set.notable, "%s", source);
fl_color_print(data.error.to.stream, data.context.set.notable, "%s", destination);
}
- fl_color_print(data.error.to.stream, data.context.set.error, "'.%c", f_string_eol[0]);
+ fl_color_print(data.error.to.stream, data.context.set.error, "'.%c", f_string_eol_s[0]);
}
return F_false;
if (status == F_memory_not) {
if (data.error.verbosity != f_console_verbosity_quiet) {
- fprintf(data.error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data.error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data.error.to.stream, data.context.set.error, "%sUnable to allocate memory, while trying to %s '", fll_error_print_error, operation);
fl_color_print(data.error.to.stream, data.context.set.notable, "%s", source);
fl_color_print(data.error.to.stream, data.context.set.notable, "%s", destination);
}
- fl_color_print(data.error.to.stream, data.context.set.error, "'.%c", f_string_eol[0]);
+ fl_color_print(data.error.to.stream, data.context.set.error, "'.%c", f_string_eol_s[0]);
}
return F_false;
if (status == F_number_overflow) {
if (data.error.verbosity != f_console_verbosity_quiet) {
- fprintf(data.error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data.error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data.error.to.stream, data.context.set.error, "%sOverflow while trying to %s '", fll_error_print_error, operation);
fl_color_print(data.error.to.stream, data.context.set.notable, "%s", source);
fl_color_print(data.error.to.stream, data.context.set.notable, "%s", destination);
}
- fl_color_print(data.error.to.stream, data.context.set.error, "'.%c", f_string_eol[0]);
+ fl_color_print(data.error.to.stream, data.context.set.error, "'.%c", f_string_eol_s[0]);
}
return F_false;
if (status == F_directory) {
if (data.error.verbosity != f_console_verbosity_quiet) {
- fprintf(data.error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data.error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data.error.to.stream, data.context.set.error, "%sInvalid directory while trying to %s '", fll_error_print_error, operation);
fl_color_print(data.error.to.stream, data.context.set.notable, "%s", source);
fl_color_print(data.error.to.stream, data.context.set.notable, "%s", destination);
}
- fl_color_print(data.error.to.stream, data.context.set.error, "'.%c", f_string_eol[0]);
+ fl_color_print(data.error.to.stream, data.context.set.error, "'.%c", f_string_eol_s[0]);
}
return F_false;
if (status == F_access_denied) {
if (data.error.verbosity != f_console_verbosity_quiet) {
- fprintf(data.error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data.error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data.error.to.stream, data.context.set.error, "%sAccess denied while trying to %s '", fll_error_print_error, operation);
fl_color_print(data.error.to.stream, data.context.set.notable, "%s", source);
fl_color_print(data.error.to.stream, data.context.set.notable, "%s", destination);
}
- fl_color_print(data.error.to.stream, data.context.set.error, "'.%c", f_string_eol[0]);
+ fl_color_print(data.error.to.stream, data.context.set.error, "'.%c", f_string_eol_s[0]);
}
return F_false;
if (status == F_loop) {
if (data.error.verbosity != f_console_verbosity_quiet) {
- fprintf(data.error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data.error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data.error.to.stream, data.context.set.error, "%sLoop while trying to %s '", fll_error_print_error, operation);
fl_color_print(data.error.to.stream, data.context.set.notable, "%s", source);
fl_color_print(data.error.to.stream, data.context.set.notable, "%s", destination);
}
- fl_color_print(data.error.to.stream, data.context.set.error, "'.%c", f_string_eol[0]);
+ fl_color_print(data.error.to.stream, data.context.set.error, "'.%c", f_string_eol_s[0]);
}
return F_false;
if (status == F_prohibited) {
if (data.error.verbosity != f_console_verbosity_quiet) {
- fprintf(data.error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data.error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data.error.to.stream, data.context.set.error, "%sProhibited by system while trying to %s '", fll_error_print_error, operation);
fl_color_print(data.error.to.stream, data.context.set.notable, "%s", source);
fl_color_print(data.error.to.stream, data.context.set.notable, "%s", destination);
}
- fl_color_print(data.error.to.stream, data.context.set.error, "'.%c", f_string_eol[0]);
+ fl_color_print(data.error.to.stream, data.context.set.error, "'.%c", f_string_eol_s[0]);
}
return F_false;
if (status == F_directory_found_not) {
if (data.error.verbosity != f_console_verbosity_quiet) {
- fprintf(data.error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data.error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data.error.to.stream, data.context.set.error, "%sFailed to %s '", fll_error_print_error, operation);
fl_color_print(data.error.to.stream, data.context.set.notable, "%s", source);
fl_color_print(data.error.to.stream, data.context.set.notable, "%s", destination);
}
- fl_color_print(data.error.to.stream, data.context.set.error, "' due to an invalid directory in the path.%c", f_string_eol[0]);
+ fl_color_print(data.error.to.stream, data.context.set.error, "' due to an invalid directory in the path.%c", f_string_eol_s[0]);
}
return F_false;
if (status == F_failure) {
if (data.error.verbosity != f_console_verbosity_quiet) {
- fprintf(data.error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data.error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data.error.to.stream, data.context.set.error, "%sFailed to %s '", fll_error_print_error, operation);
fl_color_print(data.error.to.stream, data.context.set.notable, "%s", source);
fl_color_print(data.error.to.stream, data.context.set.notable, "%s", destination);
}
- fl_color_print(data.error.to.stream, data.context.set.error, "'.%c", f_string_eol[0]);
+ fl_color_print(data.error.to.stream, data.context.set.error, "'.%c", f_string_eol_s[0]);
}
return F_false;
}
if (fll_error_print(data.error, status, function, F_false) == F_known_not && fallback && data.error.verbosity != f_console_verbosity_quiet) {
- fprintf(data.error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data.error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data.error.to.stream, data.context.set.error, "UNKNOWN %s(", fll_error_print_error);
fl_color_print(data.error.to.stream, data.context.set.notable, "%llu", status);
fl_color_print(data.error.to.stream, data.context.set.error, ") occurred while trying to %s '", operation);
fl_color_print(data.error.to.stream, data.context.set.notable, "%s", destination);
}
- fl_color_print(data.error.to.stream, data.context.set.error, "'.%c", f_string_eol[0]);
+ fl_color_print(data.error.to.stream, data.context.set.error, "'.%c", f_string_eol_s[0]);
}
return F_true;
if (status == F_file_found_not) {
if (data.error.verbosity != f_console_verbosity_quiet) {
- fprintf(data.error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data.error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data.error.to.stream, data.context.set.error, "%serror occurred on invalid UTF-8 character at stop position (at ", fll_error_print_error);
fl_color_print(data.error.to.stream, data.context.set.notable, "%d", range.start);
fl_color_print(data.error.to.stream, data.context.set.error, " of setting file '");
fl_color_print(data.error.to.stream, data.context.set.notable, "%s", path_file);
- fl_color_print(data.error.to.stream, data.context.set.error, "').%c", f_string_eol[0]);
+ fl_color_print(data.error.to.stream, data.context.set.error, "').%c", f_string_eol_s[0]);
}
return F_false;
if (status == F_status_set_error(F_complete_not_utf_stop)) {
if (data.error.verbosity != f_console_verbosity_quiet) {
- fprintf(data.error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data.error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data.error.to.stream, data.context.set.error, "%serror occurred on invalid UTF-8 character at end of string (at ", fll_error_print_error);
fl_color_print(data.error.to.stream, data.context.set.notable, "%d", range.start);
fl_color_print(data.error.to.stream, data.context.set.error, " of setting file '");
fl_color_print(data.error.to.stream, data.context.set.notable, "%s", path_file);
- fl_color_print(data.error.to.stream, data.context.set.error, "').%c", f_string_eol[0]);
+ fl_color_print(data.error.to.stream, data.context.set.error, "').%c", f_string_eol_s[0]);
}
return F_false;
}
if (fll_error_print(data.error, status, function, F_false) == F_known_not && fallback && data.error.verbosity != f_console_verbosity_quiet) {
- fprintf(data.error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data.error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data.error.to.stream, data.context.set.error, "UNKNOWN %s(", fll_error_print_error);
fl_color_print(data.error.to.stream, data.context.set.notable, "%llu", status);
fl_color_print(data.error.to.stream, data.context.set.error, ") in function ");
fl_color_print(data.error.to.stream, data.context.set.notable, "%s", function);
- fl_color_print(data.error.to.stream, data.context.set.error, "().%c", f_string_eol[0]);
+ fl_color_print(data.error.to.stream, data.context.set.error, "().%c", f_string_eol_s[0]);
}
return F_true;
void fake_print_error_parameter_missing_value(const fake_data_t data, const f_string_t parameter) {
if (data.error.verbosity == f_console_verbosity_quiet) return;
- fprintf(data.error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data.error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data.error.to.stream, data.context.set.error, "%sThe parameter '", fll_error_print_error);
fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable, parameter);
- fl_color_print(data.error.to.stream, data.context.set.error, "' was specified, but no value was given.%c", f_string_eol[0]);
+ fl_color_print(data.error.to.stream, data.context.set.error, "' was specified, but no value was given.%c", f_string_eol_s[0]);
}
#endif // _di_fake_print_error_parameter_missing_value_
void fake_print_error_parameter_too_many(const fake_data_t data, const f_string_t parameter) {
if (data.error.verbosity == f_console_verbosity_quiet) return;
- fprintf(data.error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data.error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data.error.to.stream, data.context.set.error, "%sThe parameter '", fll_error_print_error);
fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable, parameter);
- fl_color_print(data.error.to.stream, data.context.set.error, "' specified too many times.%c", f_string_eol[0]);
+ fl_color_print(data.error.to.stream, data.context.set.error, "' specified too many times.%c", f_string_eol_s[0]);
}
#endif // _di_fake_print_error_parameter_too_many_
f_fss_count_lines(buffer, operation_name.start, &line);
- fprintf(error.to.stream, "%c", f_string_eol[0]);
+ fprintf(error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(error.to.stream, data.error.context, "%sThe section operation '", data.error.prefix);
fl_color_print_code(error.to.stream, data.context.notable);
fl_color_print(error.to.stream, data.error.context, "' on line ");
fl_color_print(error.to.stream, data.context.set.notable, "%llu", line);
- fl_color_print(error.to.stream, data.error.context, " failed.%c", f_string_eol[0]);
+ fl_color_print(error.to.stream, data.error.context, " failed.%c", f_string_eol_s[0]);
}
#endif // _di_fake_print_message_section_operation_failed_
if (data.error.verbosity == f_console_verbosity_quiet || !error.to.stream) return;
if (F_status_set_fine(status) == F_false) {
- fprintf(error.to.stream, "%c", f_string_eol[0]);
+ fprintf(error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(error.to.stream, data.error.context, "%sThe path '", data.error.prefix);
fl_color_print(error.to.stream, data.context.set.notable, "%s", path);
- fl_color_print(error.to.stream, data.error.context, "' is outside the project root.%c", f_string_eol[0]);
+ fl_color_print(error.to.stream, data.error.context, "' is outside the project root.%c", f_string_eol_s[0]);
}
else {
fll_error_file_print(data.error, F_status_set_fine(status), function, F_true, path, "determine real path of", fll_error_file_type_file);
if (data.error.verbosity == f_console_verbosity_quiet || !error.to.stream) return;
if (status == F_array_too_large) {
- fprintf(error.to.stream, "%c", f_string_eol[0]);
+ fprintf(error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(error.to.stream, data.error.context, "%s: Maximum stack size reached while processing path '", data.error.prefix);
fl_color_print(error.to.stream, data.context.set.notable, "%s", path);
fl_color_print(error.to.stream, data.error.context, "'");
fl_color_print(error.to.stream, data.error.context, "()");
}
- fl_color_print(error.to.stream, data.error.context, ".%c", f_string_eol[0]);
+ fl_color_print(error.to.stream, data.error.context, ".%c", f_string_eol_s[0]);
}
else {
fll_error_file_print(error, status, function, F_true, path, "change path to", fll_error_file_type_directory);
f_fss_count_lines(buffer, operation_name.start, &line);
- fprintf(error.to.stream, "%c", f_string_eol[0]);
+ fprintf(error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(error.to.stream, data.error.context, "The section operation '", data.error.prefix);
fl_color_print_code(error.to.stream, data.context.notable);
fl_color_print(error.to.stream, data.context.set.notable, "%llu", line);
fl_color_print(error.to.stream, data.error.context, " cannot be processed because the max stack depth of ");
fl_color_print(error.to.stream, data.context.set.notable, "%llu", stack_max);
- fl_color_print(error.to.stream, data.error.context, " has been reached.%c", f_string_eol[0]);
+ fl_color_print(error.to.stream, data.error.context, " has been reached.%c", f_string_eol_s[0]);
}
#endif // _di_fake_print_message_section_operation_stack_max_
f_fss_count_lines(buffer, operation_name.start, &line);
- fprintf(error.to.stream, "%c", f_string_eol[0]);
+ fprintf(error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(error.to.stream, data.error.context, "%sThe section operation '", data.error.prefix);
fl_color_print_code(error.to.stream, data.context.notable);
fl_color_print(error.to.stream, data.error.context, "' on line ");
fl_color_print(error.to.stream, data.context.set.notable, "%llu", line);
- fl_color_print(error.to.stream, data.error.context, " is not a known operation name.%c", f_string_eol[0]);
+ fl_color_print(error.to.stream, data.error.context, " is not a known operation name.%c", f_string_eol_s[0]);
}
#endif // _di_fake_print_message_section_operation_unknown_
void fake_print_warning_settings_content_empty(const fake_data_t data, const f_string_t path_file, const f_string_dynamic_t buffer, const f_string_range_t range_object, const f_string_t settings_name) {
if (data.error.verbosity == f_console_verbosity_quiet) return;
- fprintf(data.error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data.error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(f_type_warning, data.context.set.warning, "%sthe fakefile '", fll_error_print_warning);
fl_color_print(f_type_warning, data.context.set.notable, "%s", path_file);
f_print_dynamic_partial(f_type_warning, buffer, range_object);
fl_color_print_code(f_type_warning, data.context.reset);
- fl_color_print(f_type_warning, data.context.set.warning, "'.%c", f_string_eol[0]);
+ fl_color_print(f_type_warning, data.context.set.warning, "'.%c", f_string_eol_s[0]);
}
#endif // _di_fake_print_warning_settings_content_empty_
void fake_print_warning_settings_content_invalid(const fake_data_t data, const f_string_t path_file, const f_string_dynamic_t buffer, const f_string_range_t range_object, const f_string_range_t range_content, const f_string_t settings_name) {
if (data.error.verbosity == f_console_verbosity_quiet) return;
- fprintf(data.output.stream, "%c", f_string_eol[0]);
+ fprintf(data.output.stream, "%c", f_string_eol_s[0]);
fl_color_print(data.output.stream, data.context.set.warning, "%sthe fakefile '", fll_error_print_warning);
fl_color_print(data.output.stream, data.context.set.notable, "%s", path_file);
f_print_dynamic_partial(data.output.stream, buffer, range_object);
fl_color_print_code(data.output.stream, data.context.reset);
- fl_color_print(data.output.stream, data.context.set.warning, "'.%c", f_string_eol[0]);
+ fl_color_print(data.output.stream, data.context.set.warning, "'.%c", f_string_eol_s[0]);
}
#endif // _di_fake_print_warning_settings_content_invalid_
void fake_print_warning_settings_content_multiple(const fake_data_t data, const f_string_t path_file, const f_string_t name_object) {
if (data.error.verbosity != f_console_verbosity_verbose) return;
- fprintf(data.error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data.error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(f_type_warning, data.context.set.warning, "%sthe setting '", fll_error_print_warning);
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(f_type_warning, data.context.set.warning, "' may only have a single property, only using the first.%c", f_string_eol[0]);
+ fl_color_print(f_type_warning, data.context.set.warning, "' may only have a single property, only using the first.%c", f_string_eol_s[0]);
}
#endif // _di_fake_print_warning_settings_content_multiple_
void fake_print_warning_settings_object_multiple(const fake_data_t data, const f_string_t path_file, const f_string_t label, const f_string_t name_object) {
if (data.error.verbosity != f_console_verbosity_verbose) return;
- fprintf(data.error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data.error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(f_type_warning, data.context.set.warning, "%sthe %s object '", fll_error_print_warning, 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(f_type_warning, data.context.set.warning, "' may only be specified once, only using the first.%c", f_string_eol[0]);
+ fl_color_print(f_type_warning, data.context.set.warning, "' may only be specified once, only using the first.%c", f_string_eol_s[0]);
}
#endif // _di_fake_print_warning_settings_object_multiple_
f_status_t status = F_none;
if (data.error.verbosity != f_console_verbosity_quiet) {
- fprintf(data.output.stream, "%c", f_string_eol[0]);
- fl_color_print(data.output.stream, data.context.set.important, "Generating skeleton structure.%c", f_string_eol[0]);
+ fprintf(data.output.stream, "%c", f_string_eol_s[0]);
+ fl_color_print(data.output.stream, data.context.set.important, "Generating skeleton structure.%c", f_string_eol_s[0]);
}
{
if (status == F_true) {
if (data.error.verbosity == f_console_verbosity_verbose) {
- fprintf(data.output.stream, "Directory '%s' already exists.%c", path.string, f_string_eol[0]);
+ fprintf(data.output.stream, "Directory '%s' already exists.%c", path.string, f_string_eol_s[0]);
}
return F_none;
if (status == F_false) {
if (data.error.verbosity != f_console_verbosity_quiet) {
- fprintf(data.error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data.error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data.error.to.stream, data.context.set.error, "%sThe path '", fll_error_print_error);
fl_color_print(data.error.to.stream, data.context.set.notable, "%s", path.string);
- fl_color_print(data.error.to.stream, data.context.set.error, "' exists but is not a directory.%c", f_string_eol[0]);
+ fl_color_print(data.error.to.stream, data.context.set.error, "' exists but is not a directory.%c", f_string_eol_s[0]);
}
return F_status_set_warning(F_failure);
if (F_status_is_error(status)) {
if (F_status_set_fine(status) == F_file_found_not) {
- fprintf(data.error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data.error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data.error.to.stream, data.context.set.error, "%sThe path '", fll_error_print_error);
fl_color_print(data.error.to.stream, data.context.set.notable, "%s", path.string);
- fl_color_print(data.error.to.stream, data.context.set.error, "' could not be created, a parent directory does not exist.%c", f_string_eol[0]);
+ fl_color_print(data.error.to.stream, data.context.set.error, "' could not be created, a parent directory does not exist.%c", f_string_eol_s[0]);
}
else {
fll_error_file_print(data.error, F_status_set_fine(status), "f_directory_create", F_true, path.string, "create", fll_error_file_type_directory);
}
if (data.error.verbosity == f_console_verbosity_verbose) {
- fprintf(data.output.stream, "Directory '%s' created.%c", path.string, f_string_eol[0]);
+ fprintf(data.output.stream, "Directory '%s' created.%c", path.string, f_string_eol_s[0]);
}
}
else if (F_status_is_error(status)) {
if (status == F_true) {
if (data.error.verbosity == f_console_verbosity_verbose) {
- fprintf(data.output.stream, "File '%s' already exists.%c", path.string, f_string_eol[0]);
+ fprintf(data.output.stream, "File '%s' already exists.%c", path.string, f_string_eol_s[0]);
}
return F_none;
if (status == F_true) {
if (data.error.verbosity == f_console_verbosity_verbose) {
- fprintf(data.output.stream, "File '%s' already exists (as a symbolic link).%c", path.string, f_string_eol[0]);
+ fprintf(data.output.stream, "File '%s' already exists (as a symbolic link).%c", path.string, f_string_eol_s[0]);
}
return F_none;
if (status == F_false) {
if (data.error.verbosity == f_console_verbosity_verbose) {
- fprintf(data.output.stream, "File '%s' already exists but is not a regular file (or symbolic link).%c", path.string, f_string_eol[0]);
+ fprintf(data.output.stream, "File '%s' already exists but is not a regular file (or symbolic link).%c", path.string, f_string_eol_s[0]);
}
return F_status_set_warning(F_none);
if (F_status_is_error(status)) {
if (F_status_set_fine(status) == F_file_found_not) {
- fprintf(data.error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data.error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data.error.to.stream, data.context.set.error, "%sThe file '", fll_error_print_error);
fl_color_print(data.error.to.stream, data.context.set.notable, "%s", path.string);
- fl_color_print(data.error.to.stream, data.context.set.error, "' could not be created, a parent directory does not exist.%c", f_string_eol[0]);
+ fl_color_print(data.error.to.stream, data.context.set.error, "' could not be created, a parent directory does not exist.%c", f_string_eol_s[0]);
}
else {
fll_error_file_print(data.error, F_status_set_fine(status), "f_file_create", F_true, path.string, "create", fll_error_file_type_file);
}
if (data.error.verbosity == f_console_verbosity_verbose) {
- fprintf(data.output.stream, "File '%s' created.%c", path.string, f_string_eol[0]);
+ fprintf(data.output.stream, "File '%s' created.%c", path.string, f_string_eol_s[0]);
}
if (content.used) {
}
if (data.error.verbosity == f_console_verbosity_verbose) {
- fprintf(data.output.stream, "File '%s' pre-populated.%c", path.string, f_string_eol[0]);
+ fprintf(data.output.stream, "File '%s' pre-populated.%c", path.string, f_string_eol_s[0]);
}
f_file_stream_close(F_true, &file);
fll_program_print_help_option(output, context, f_console_standard_short_debug, f_console_standard_long_debug, f_console_symbol_short_disable, f_console_symbol_long_disable, " Enable debugging, inceasing verbosity beyond normal output.");
fll_program_print_help_option(output, context, f_console_standard_short_version, f_console_standard_long_version, f_console_symbol_short_disable, f_console_symbol_long_disable, " Print only the version number.");
- fprintf(output.stream, "%c%c", f_string_eol[0], f_string_eol[0]);
+ fprintf(output.stream, "%c%c", f_string_eol_s[0], f_string_eol_s[0]);
fl_color_print(output.stream, context.set.important, " Available Commands: ");
- fprintf(output.stream, "%c ", f_string_eol[0]);
+ fprintf(output.stream, "%c ", f_string_eol_s[0]);
fl_color_print(output.stream, context.set.standout, firewall_command_start);
fprintf(output.stream, " Turn on the firewall");
- fprintf(output.stream, "%c ", f_string_eol[0]);
+ fprintf(output.stream, "%c ", f_string_eol_s[0]);
fl_color_print(output.stream, context.set.standout, firewall_command_stop);
fprintf(output.stream, " Turn off the firewall");
- fprintf(output.stream, "%c ", f_string_eol[0]);
+ fprintf(output.stream, "%c ", f_string_eol_s[0]);
fl_color_print(output.stream, context.set.standout, firewall_command_restart);
fprintf(output.stream, " Turn off and then turn on the firewall");
- fprintf(output.stream, "%c ", f_string_eol[0]);
+ fprintf(output.stream, "%c ", f_string_eol_s[0]);
fl_color_print(output.stream, context.set.standout, firewall_command_lock);
fprintf(output.stream, " Prevent all communication");
- fprintf(output.stream, "%c ", f_string_eol[0]);
+ fprintf(output.stream, "%c ", f_string_eol_s[0]);
fl_color_print(output.stream, context.set.standout, firewall_command_show);
fprintf(output.stream, " Show active firewall settings");
status = fll_program_parameter_process(arguments, parameters, choices, F_true, &data->remaining, &data->context);
- data->error.context = data->context.set.error;
- data->error.notable = data->context.set.notable;
+ if (data->context.set.error.before) {
+ data->error.context = data->context.set.error;
+ data->error.notable = data->context.set.notable;
+ }
+ else {
+ data->context.set.warning = f_color_set_empty_s;
+ data->context.set.error = f_color_set_empty_s;
+ data->context.set.title = f_color_set_empty_s;
+ data->context.set.notable = f_color_set_empty_s;
+ data->context.set.important = f_color_set_empty_s;
+ data->context.set.standout = f_color_set_empty_s;
+ data->context.set.normal = f_color_set_empty_s;
+ data->context.set.normal_reset = f_color_set_empty_s;
+
+ data->error.context = f_color_set_empty_s;
+ data->error.notable = f_color_set_empty_s;
+ }
if (F_status_is_error(status)) {
firewall_delete_data(data);
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(f_type_warning, data->context.set.warning, "%s'%s' is not a valid show option%c", fll_error_print_warning, arguments.argv[data->remaining.array[counter]], f_string_eol[0]);
+ fl_color_print(f_type_warning, data->context.set.warning, "%s'%s' is not a valid show option%c", fll_error_print_warning, arguments.argv[data->remaining.array[counter]], f_string_eol_s[0]);
}
else {
show_ports = F_true;
f_macro_string_dynamics_t_resize(status, parameters, 7);
if (F_status_is_error(status)) {
- fl_color_print(data->error.to.stream, data->context.set.error, "%sUnable to allocate memory.%c", fll_error_print_error, f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "%sUnable to allocate memory.%c", fll_error_print_error, f_string_eol_s[0]);
firewall_delete_local_data(&local);
firewall_delete_data(data);
return status;
if (show_nat) {
fl_color_print(data->output.stream, data->context.set.standout, "=========================== ");
fl_color_print(data->output.stream, data->context.set.title, "NAT");
- fl_color_print(data->output.stream, data->context.set.standout, " ============================%c", f_string_eol[0]);
+ fl_color_print(data->output.stream, data->context.set.standout, " ============================%c", f_string_eol_s[0]);
fflush(data->output.stream);
parameters.used = 6;
if (F_status_is_error_not(status) && show_mangle) {
fl_color_print(data->output.stream, data->context.set.standout, "========================== ");
fl_color_print(data->output.stream, data->context.set.title, "MANGLE");
- fl_color_print(data->output.stream, data->context.set.standout, " ==========================%c", f_string_eol[0]);
+ fl_color_print(data->output.stream, data->context.set.standout, " ==========================%c", f_string_eol_s[0]);
fflush(data->output.stream);
parameters.used = 6;
if (F_status_is_error_not(status) && show_ports) {
fl_color_print(data->output.stream, data->context.set.standout, "========================== ");
fl_color_print(data->output.stream, data->context.set.title, "FILTER");
- fl_color_print(data->output.stream, data->context.set.standout, " ==========================%c", f_string_eol[0]);
+ fl_color_print(data->output.stream, data->context.set.standout, " ==========================%c", f_string_eol_s[0]);
fflush(data->output.stream);
parameters.used = 4;
status = F_status_set_fine(status);
if (status == F_memory_allocation || status == F_memory_reallocation) {
- fl_color_print(data->error.to.stream, data->context.set.error, "%sUnable to allocate memory.%c", fll_error_print_error, f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "%sUnable to allocate memory.%c", fll_error_print_error, f_string_eol_s[0]);
}
else {
- fl_color_print(data->error.to.stream, data->context.set.error, "%sFailed to perform requested %s operation:%c", fll_error_print_error, firewall_tool_iptables, f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "%sFailed to perform requested %s operation:%c", fll_error_print_error, firewall_tool_iptables, f_string_eol_s[0]);
fprintf(f_type_error, " ");
f_string_length_t i = 0;
status = F_status_set_fine(status);
if (status == F_memory_allocation || status == F_memory_reallocation) {
- fl_color_print(data->error.to.stream, data->context.set.error, "%sUnable to allocate memory.%c", fll_error_print_error, f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "%sUnable to allocate memory.%c", fll_error_print_error, f_string_eol_s[0]);
}
else if (status == F_data_not) {
- fl_color_print(data->error.to.stream, data->context.set.error, "%sCould not find any network devices%c", fll_error_print_error, f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "%sCould not find any network devices%c", fll_error_print_error, f_string_eol_s[0]);
}
else if (status == F_failure) {
- fl_color_print(data->error.to.stream, data->context.set.error, "%sFailed to read the device directory '%s'%c", fll_error_print_error, network_devices, f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "%sFailed to read the device directory '%s'%c", fll_error_print_error, network_devices, f_string_eol_s[0]);
}
firewall_delete_local_data(&local);
return status;
}
else {
- fl_color_print(data->error.to.stream, data->context.set.error, "%sFailed to perform lock request because the lock instructions are missing from: %s.%c", fll_error_print_error, network_path firewall_file_other, f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "%sFailed to perform lock request because the lock instructions are missing from: %s.%c", fll_error_print_error, network_path firewall_file_other, f_string_eol_s[0]);
firewall_delete_local_data(&local);
firewall_delete_data(data);
}
}
else {
- fl_color_print(data->error.to.stream, data->context.set.error, "%sFailed to perform stop request because the lock instructions are missing from: %s.", fll_error_print_error, network_path firewall_file_other, f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "%sFailed to perform stop request because the lock instructions are missing from: %s.", fll_error_print_error, network_path firewall_file_other, f_string_eol_s[0]);
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(data->error.to.stream, data->context.set.error, "%sUnable to allocate memory.%c", fll_error_print_error, f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "%sUnable to allocate memory.%c", fll_error_print_error, f_string_eol_s[0]);
firewall_delete_local_data(&local);
firewall_delete_data(data);
return status;
firewall_delete_local_data(&local);
}
else {
- fl_color_print(data->error.to.stream, data->context.set.error, "%sYou did not pass a command%c", fll_error_print_error, f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "%sYou did not pass a command%c", fll_error_print_error, f_string_eol_s[0]);
status = F_status_set_error(F_parameter);
}
fprintf(f_type_warning, "\n");
}
else {
- fl_color_print(f_type_warning, data.context.set.warning, "%sAt line %i, the object has no content%c", fll_error_print_warning, i, f_string_eol[0]);
+ fl_color_print(f_type_warning, data.context.set.warning, "%sAt line %i, the object has no content%c", fll_error_print_warning, i, f_string_eol_s[0]);
}
continue;
status = F_status_set_fine(status);
if (status == F_parameter) {
- fl_color_print(data.error.to.stream, data.context.set.error, "%sInvalid parameter when calling f_file_open()%c", fll_error_print_error, f_string_eol[0]);
+ fl_color_print(data.error.to.stream, data.context.set.error, "%sInvalid parameter when calling f_file_open()%c", fll_error_print_error, f_string_eol_s[0]);
}
else if (status == F_file_found_not) {
// the file does not have to exist
- fl_color_print(f_type_warning, data.context.set.warning, "%sCannot find the file '%.*s'%c", fll_error_print_warning, file_path.used, file_path.string, f_string_eol[0]);
+ fl_color_print(f_type_warning, data.context.set.warning, "%sCannot find the file '%.*s'%c", fll_error_print_warning, file_path.used, file_path.string, f_string_eol_s[0]);
status = F_none;
}
else if (status == F_file_open) {
- fl_color_print(data.error.to.stream, data.context.set.error, "%sUnable to open the file '%.*s'%c", fll_error_print_error, file_path.used, file_path.string, f_string_eol[0]);
+ fl_color_print(data.error.to.stream, data.context.set.error, "%sUnable to open the file '%.*s'%c", fll_error_print_error, file_path.used, file_path.string, f_string_eol_s[0]);
}
else if (status == F_file_descriptor) {
- fl_color_print(data.error.to.stream, data.context.set.error, "%sFile descriptor error while trying to open the file '%.*s'%c", fll_error_print_error, file_path.used, file_path.string, f_string_eol[0]);
+ fl_color_print(data.error.to.stream, data.context.set.error, "%sFile descriptor error while trying to open the file '%.*s'%c", fll_error_print_error, file_path.used, file_path.string, f_string_eol_s[0]);
}
else if (status == F_memory_allocation || status == F_memory_reallocation) {
- fl_color_print(data.error.to.stream, data.context.set.error, "%sUnable to allocate memory.%c", fll_error_print_error, f_string_eol[0]);
+ fl_color_print(data.error.to.stream, data.context.set.error, "%sUnable to allocate memory.%c", fll_error_print_error, f_string_eol_s[0]);
}
else {
- fl_color_print(data.error.to.stream, data.context.set.error, "%sAn unhandled error (%u) has occurred while calling f_file_open()%c", fll_error_print_error, status, f_string_eol[0]);
+ fl_color_print(data.error.to.stream, data.context.set.error, "%sAn unhandled error (%u) has occurred while calling f_file_open()%c", fll_error_print_error, status, f_string_eol_s[0]);
}
if (status != F_file_found_not) {
status = F_status_set_fine(status);
if (status == F_parameter) {
- fl_color_print(data.error.to.stream, data.context.set.error, "%sInvalid parameter when calling f_file_read()%c", fll_error_print_error, f_string_eol[0]);
+ fl_color_print(data.error.to.stream, data.context.set.error, "%sInvalid parameter when calling f_file_read()%c", fll_error_print_error, f_string_eol_s[0]);
}
else if (status == F_number_overflow) {
- fl_color_print(data.error.to.stream, data.context.set.error, "%sInteger overflow while trying to buffer the file '%.*s'%c", fll_error_print_error, file_path.used, file_path.string, f_string_eol[0]);
+ fl_color_print(data.error.to.stream, data.context.set.error, "%sInteger overflow while trying to buffer the file '%.*s'%c", fll_error_print_error, file_path.used, file_path.string, f_string_eol_s[0]);
}
else if (status == F_file_closed) {
- fl_color_print(data.error.to.stream, data.context.set.error, "%sThe file '%.*s' is no longer open%c", fll_error_print_error, file_path.used, file_path.string, f_string_eol[0]);
+ fl_color_print(data.error.to.stream, data.context.set.error, "%sThe file '%.*s' is no longer open%c", fll_error_print_error, file_path.used, file_path.string, f_string_eol_s[0]);
}
else if (status == F_file_seek) {
- fl_color_print(data.error.to.stream, data.context.set.error, "%sA seek error occurred while accessing the file '%.*s'%c", fll_error_print_error, file_path.used, file_path.string, f_string_eol[0]);
+ fl_color_print(data.error.to.stream, data.context.set.error, "%sA seek error occurred while accessing the file '%.*s'%c", fll_error_print_error, file_path.used, file_path.string, f_string_eol_s[0]);
}
else if (status == F_file_read) {
- fl_color_print(data.error.to.stream, data.context.set.error, "%sA read error occurred while accessing the file '%.*s'%c", fll_error_print_error, file_path.used, file_path.string, f_string_eol[0]);
+ fl_color_print(data.error.to.stream, data.context.set.error, "%sA read error occurred while accessing the file '%.*s'%c", fll_error_print_error, file_path.used, file_path.string, f_string_eol_s[0]);
}
else if (status == F_memory_allocation || status == F_memory_reallocation) {
- fl_color_print(data.error.to.stream, data.context.set.error, "%sUnable to allocate memory.%c", fll_error_print_error, f_string_eol[0]);
+ fl_color_print(data.error.to.stream, data.context.set.error, "%sUnable to allocate memory.%c", fll_error_print_error, f_string_eol_s[0]);
}
else {
- fl_color_print(data.error.to.stream, data.context.set.error, "%sAn unhandled error (%u) has occurred while calling f_file_read()%c", fll_error_print_error, status, f_string_eol[0]);
+ fl_color_print(data.error.to.stream, data.context.set.error, "%sAn unhandled error (%u) has occurred while calling f_file_read()%c", fll_error_print_error, status, f_string_eol_s[0]);
}
status = F_status_set_error(status);
status = F_status_set_fine(status);
if (status == F_parameter) {
- fl_color_print(data.error.to.stream, data.context.set.error, "%sInvalid parameter when calling fll_fss_basic_read() for the file '%.*s'%c", fll_error_print_error, file_path.used, file_path.string, f_string_eol[0]);
+ fl_color_print(data.error.to.stream, data.context.set.error, "%sInvalid parameter when calling fll_fss_basic_read() for the file '%.*s'%c", fll_error_print_error, file_path.used, file_path.string, f_string_eol_s[0]);
}
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(data.error.to.stream, data.context.set.error, "%sUnable to allocate memory.%c", fll_error_print_error, f_string_eol[0]);
+ fl_color_print(data.error.to.stream, data.context.set.error, "%sUnable to allocate memory.%c", fll_error_print_error, f_string_eol_s[0]);
}
else {
- fl_color_print(data.error.to.stream, data.context.set.error, "%sAn unhandled error (%u) has occurred while calling fll_fss_basic_read() for the file '%.*s'%c", fll_error_print_error, status, file_path.used, file_path.string, f_string_eol[0]);
+ fl_color_print(data.error.to.stream, data.context.set.error, "%sAn unhandled error (%u) has occurred while calling fll_fss_basic_read() for the file '%.*s'%c", fll_error_print_error, status, file_path.used, file_path.string, f_string_eol_s[0]);
}
status = F_status_set_error(status);
}
if (F_status_is_error(status)) {
- fl_color_print(data.error.to.stream, data.context.set.error, "%sUnable to allocate memory.%c", fll_error_print_error, f_string_eol[0]);
+ fl_color_print(data.error.to.stream, data.context.set.error, "%sUnable to allocate memory.%c", fll_error_print_error, f_string_eol_s[0]);
fl_string_dynamic_delete(&ip_list_action);
}
f_macro_string_dynamic_t_new(status, ip_argument, ip_length);
if (F_status_is_error(status)) {
- fl_color_print(data.error.to.stream, data.context.set.error, "%sUnable to allocate memory.%c", fll_error_print_error, f_string_eol[0]);
+ fl_color_print(data.error.to.stream, data.context.set.error, "%sUnable to allocate memory.%c", fll_error_print_error, f_string_eol_s[0]);
break;
}
}
if (status == F_failure) {
- fl_color_print(data.error.to.stream, data.context.set.error, "%sFailed to perform requested %s operation:%c", fll_error_print_error, current_tool, f_string_eol[0]);
+ fl_color_print(data.error.to.stream, data.context.set.error, "%sFailed to perform requested %s operation:%c", fll_error_print_error, current_tool, f_string_eol_s[0]);
fprintf(f_type_error, " ");
fl_color_print_code(f_type_error, data.context.error);
break;
}
else if (status == F_parameter) {
- fl_color_print(data.error.to.stream, data.context.set.error, "%sInvalid parameter when calling fll_execute_program()%c", fll_error_print_error, f_string_eol[0]);
+ fl_color_print(data.error.to.stream, data.context.set.error, "%sInvalid parameter when calling fll_execute_program()%c", fll_error_print_error, f_string_eol_s[0]);
// remove ip_argument from arguments string.
fl_string_dynamic_delete(&arguments.array[arguments.used]);
}
if (status == F_failure) {
- fl_color_print(data.error.to.stream, data.context.set.error, "%sFailed to perform requested %s operation:%c", fll_error_print_error, current_tool, f_string_eol[0]);
+ fl_color_print(data.error.to.stream, data.context.set.error, "%sFailed to perform requested %s operation:%c", fll_error_print_error, current_tool, f_string_eol_s[0]);
fprintf(f_type_error, " ");
fl_color_print_code(f_type_error, data.context.error);
break;
}
else if (status == F_parameter) {
- fl_color_print(data.error.to.stream, data.context.set.error, "%sInvalid parameter when calling fll_execute_program()%c", fll_error_print_error, f_string_eol[0]);
+ fl_color_print(data.error.to.stream, data.context.set.error, "%sInvalid parameter when calling fll_execute_program()%c", fll_error_print_error, f_string_eol_s[0]);
break;
}
}
if (status == F_failure) {
if (tool == firewall_program_iptables) {
- fl_color_print(data->error.to.stream, data->context.set.error, "%sFailed to perform requested %s operation:%c", fll_error_print_error, firewall_tool_iptables, f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "%sFailed to perform requested %s operation:%c", fll_error_print_error, firewall_tool_iptables, f_string_eol_s[0]);
}
else if (tool == firewall_program_ip6tables) {
- fl_color_print(data->error.to.stream, data->context.set.error, "%sFailed to perform requested %s operation:%c", fll_error_print_error, firewall_tool_ip6tables, f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "%sFailed to perform requested %s operation:%c", fll_error_print_error, firewall_tool_ip6tables, f_string_eol_s[0]);
}
fprintf(f_type_error, " ");
fprintf(f_type_error, "\n");
}
else if (status == F_parameter) {
- fl_color_print(data->error.to.stream, data->context.set.error, "%sInvalid parameter when calling fll_execute_program()%c", fll_error_print_error, f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "%sInvalid parameter when calling fll_execute_program()%c", fll_error_print_error, f_string_eol_s[0]);
}
else {
- fl_color_print(data->error.to.stream, data->context.set.error, "%sAn unhandled error (%u) has occurred while calling fll_execute_program()%c", fll_error_print_error, status, f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "%sAn unhandled error (%u) has occurred while calling fll_execute_program()%c", fll_error_print_error, status, f_string_eol_s[0]);
}
fl_string_dynamics_delete(&arguments);
status = F_status_set_fine(status);
if (status == F_failure) {
- fl_color_print(data.error.to.stream, data.context.set.error, "%sFailed to perform requested %s operation:%c", fll_error_print_error, tools[i], f_string_eol[0]);
+ fl_color_print(data.error.to.stream, data.context.set.error, "%sFailed to perform requested %s operation:%c", fll_error_print_error, tools[i], f_string_eol_s[0]);
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(data.error.to.stream, data.context.set.error, "%sInvalid parameter when calling fll_execute_program()%c", fll_error_print_error, f_string_eol[0]);
+ fl_color_print(data.error.to.stream, data.context.set.error, "%sInvalid parameter when calling fll_execute_program()%c", fll_error_print_error, f_string_eol_s[0]);
}
else {
- fl_color_print(data.error.to.stream, data.context.set.error, "%sAn unhandled error (%u) has occurred while calling fll_execute_program()%c", fll_error_print_error, status, f_string_eol[0]);
+ fl_color_print(data.error.to.stream, data.context.set.error, "%sAn unhandled error (%u) has occurred while calling fll_execute_program()%c", fll_error_print_error, status, f_string_eol_s[0]);
}
return status;
status = F_status_set_fine(status);
if (status == F_failure) {
- fl_color_print(data.error.to.stream, data.context.set.error, "%sFailed to perform requested %s operation:%c", fll_error_print_error, tools[i], f_string_eol[0]);
+ fl_color_print(data.error.to.stream, data.context.set.error, "%sFailed to perform requested %s operation:%c", fll_error_print_error, tools[i], f_string_eol_s[0]);
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(data.error.to.stream, data.context.set.error, "%sInvalid parameter when calling fll_execute_program()%c", fll_error_print_error, f_string_eol[0]);
+ fl_color_print(data.error.to.stream, data.context.set.error, "%sInvalid parameter when calling fll_execute_program()%c", fll_error_print_error, f_string_eol_s[0]);
}
else {
- fl_color_print(data.error.to.stream, data.context.set.error, "%sAn unhandled error (%u) has occurred while calling fll_execute_program()%c", fll_error_print_error, status, f_string_eol[0]);
+ fl_color_print(data.error.to.stream, data.context.set.error, "%sAn unhandled error (%u) has occurred while calling fll_execute_program()%c", fll_error_print_error, status, f_string_eol_s[0]);
}
return status;
status = F_status_set_fine(status);
if (status == F_failure) {
- fl_color_print(data.error.to.stream, data.context.set.error, "%sFailed to perform requested %s operation:%c", fll_error_print_error, tools[j], f_string_eol[0]);
+ fl_color_print(data.error.to.stream, data.context.set.error, "%sFailed to perform requested %s operation:%c", fll_error_print_error, tools[j], f_string_eol_s[0]);
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(data.error.to.stream, data.context.set.error, "%sInvalid parameter when calling fll_execute_program()%c", fll_error_print_error, f_string_eol[0]);
+ fl_color_print(data.error.to.stream, data.context.set.error, "%sInvalid parameter when calling fll_execute_program()%c", fll_error_print_error, f_string_eol_s[0]);
}
else {
- fl_color_print(data.error.to.stream, data.context.set.error, "%sAn unhandled error (%u) has occurred while calling fll_execute_program()%c", fll_error_print_error, status, f_string_eol[0]);
+ fl_color_print(data.error.to.stream, data.context.set.error, "%sAn unhandled error (%u) has occurred while calling fll_execute_program()%c", fll_error_print_error, status, f_string_eol_s[0]);
}
return status;
if (optional) {
if (status == F_parameter) {
- fl_color_print(data->error.to.stream, data->context.set.error, "%sInvalid parameter when calling f_file_open().%c", fll_error_print_error, f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "%sInvalid parameter when calling f_file_open().%c", fll_error_print_error, f_string_eol_s[0]);
}
else if (status != F_file_found_not && status != F_file_open && status != F_file_descriptor) {
- fl_color_print(data->error.to.stream, data->context.set.error, "%sAn unhandled error (%u) has occurred while calling f_file_open().%c", fll_error_print_error, status, f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "%sAn unhandled error (%u) has occurred while calling f_file_open().%c", fll_error_print_error, status, f_string_eol_s[0]);
}
} else {
if (status == F_parameter) {
- fl_color_print(data->error.to.stream, data->context.set.error, "%sInvalid parameter when calling f_file_open().%c", fll_error_print_error, f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "%sInvalid parameter when calling f_file_open().%c", fll_error_print_error, f_string_eol_s[0]);
}
else if (status == F_file_found_not) {
- fl_color_print(data->error.to.stream, data->context.set.error, "%sUnable to find the file '%s'.%c", fll_error_print_error, filename, f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "%sUnable to find the file '%s'.%c", fll_error_print_error, filename, f_string_eol_s[0]);
}
else if (status == F_file_open) {
- fl_color_print(data->error.to.stream, data->context.set.error, "%sUnable to open the file '%s'.%c", fll_error_print_error, filename, f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "%sUnable to open the file '%s'.%c", fll_error_print_error, filename, f_string_eol_s[0]);
}
else if (status == F_file_descriptor) {
- fl_color_print(data->error.to.stream, data->context.set.error, "%sFile descriptor error while trying to open the file '%s'.%c", fll_error_print_error, filename, f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "%sFile descriptor error while trying to open the file '%s'.%c", fll_error_print_error, filename, f_string_eol_s[0]);
}
else {
- fl_color_print(data->error.to.stream, data->context.set.error, "%sAn unhandled error (%u) has occurred while calling f_file_open().%c", fll_error_print_error, status, f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "%sAn unhandled error (%u) has occurred while calling f_file_open().%c", fll_error_print_error, status, f_string_eol_s[0]);
}
}
status = F_status_set_fine(status);
if (status == F_parameter) {
- fl_color_print(data->error.to.stream, data->context.set.error, "%sInvalid parameter when calling f_file_read().%c", fll_error_print_error, f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "%sInvalid parameter when calling f_file_read().%c", fll_error_print_error, f_string_eol_s[0]);
}
else if (status == F_number_overflow) {
- fl_color_print(data->error.to.stream, data->context.set.error, "%sInteger overflow while trying to buffer the file '%s'.%c", fll_error_print_error, filename, f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "%sInteger overflow while trying to buffer the file '%s'.%c", fll_error_print_error, filename, f_string_eol_s[0]);
}
else if (status == F_file_closed) {
- fl_color_print(data->error.to.stream, data->context.set.error, "%sThe file '%s' is no longer open.%c", fll_error_print_error, filename, f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "%sThe file '%s' is no longer open.%c", fll_error_print_error, filename, f_string_eol_s[0]);
}
else if (status == F_file_seek) {
- fl_color_print(data->error.to.stream, data->context.set.error, "%sA seek error occurred while accessing the file '%s'.%c", fll_error_print_error, filename, f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "%sA seek error occurred while accessing the file '%s'.%c", fll_error_print_error, filename, f_string_eol_s[0]);
}
else if (status == F_file_read) {
- fl_color_print(data->error.to.stream, data->context.set.error, "%sA read error occurred while accessing the file '%s'.%c", fll_error_print_error, filename, f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "%sA read error occurred while accessing the file '%s'.%c", fll_error_print_error, filename, f_string_eol_s[0]);
}
else if (status == F_memory_allocation || status == F_memory_reallocation) {
- fl_color_print(data->error.to.stream, data->context.set.error, "%sUnable to allocate memory.%c", fll_error_print_error, f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "%sUnable to allocate memory.%c", fll_error_print_error, f_string_eol_s[0]);
}
else {
- fl_color_print(data->error.to.stream, data->context.set.error, "%sAn unhandled error (%u) has occurred while calling f_file_read().%c", fll_error_print_error, status, f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "%sAn unhandled error (%u) has occurred while calling f_file_read().%c", fll_error_print_error, status, f_string_eol_s[0]);
}
return status;
status = F_status_set_fine(status);
if (status == F_parameter) {
- fl_color_print(data->error.to.stream, data->context.set.error, "%sInvalid parameter when calling fll_fss_basic_list_read() for the file '%s'.%c", fll_error_print_error, filename, f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "%sInvalid parameter when calling fll_fss_basic_list_read() for the file '%s'.%c", fll_error_print_error, filename, f_string_eol_s[0]);
}
else if (status == F_data_not_eos || status == F_data_not || status == F_data_not_stop) {
- fl_color_print(data->error.to.stream, data->context.set.error, "%sNo relevant data was found within the file '%s'.%c", fll_error_print_error, filename, f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "%sNo relevant data was found within the file '%s'.%c", fll_error_print_error, filename, f_string_eol_s[0]);
}
else if (status == F_memory_allocation || status == F_memory_reallocation) {
- fl_color_print(data->error.to.stream, data->context.set.error, "%sUnable to allocate memory.%c", fll_error_print_error, f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "%sUnable to allocate memory.%c", fll_error_print_error, f_string_eol_s[0]);
}
else {
- fl_color_print(data->error.to.stream, data->context.set.error, "%sAn unhandled error (%u) has occurred while calling fll_fss_basic_list_read() for the file '%s'.%c", fll_error_print_error, status, filename, f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "%sAn unhandled error (%u) has occurred while calling fll_fss_basic_list_read() for the file '%s'.%c", fll_error_print_error, status, filename, f_string_eol_s[0]);
}
}
else {
status = F_status_set_fine(status);
if (status == F_memory_allocation || status == F_memory_reallocation) {
- fl_color_print(data->error.to.stream, data->context.set.error, "%sUnable to allocate memory.%c", fll_error_print_error, f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "%sUnable to allocate memory.%c", fll_error_print_error, f_string_eol_s[0]);
}
else if (status == F_failure) {
// the error message has already been displayed.
}
else {
- fl_color_print(data->error.to.stream, data->context.set.error, "%sAn unhandled error (%u) has occurred while calling firewall_perform_commands().%c", fll_error_print_error, status, f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "%sAn unhandled error (%u) has occurred while calling firewall_perform_commands().%c", fll_error_print_error, status, f_string_eol_s[0]);
}
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(data.error.to.stream, data.context.set.error, "CRITICAL ERROR: Unable to allocate memory.%c", f_string_eol[0]);
+// TODO: also report: fl_color_print(data.error.to.stream, data.context.set.error, "CRITICAL ERROR: Unable to allocate memory.%c", f_string_eol_s[0]);
#define firewall_macro_append_argument_to_arguments(status, arguments, argument) \
if (arguments.used == arguments.size) { \
f_macro_string_dynamics_t_resize(status, arguments, arguments.used + firewall_default_allocation_step); \
fll_program_print_help_option(output, context, f_console_standard_short_debug, f_console_standard_long_debug, f_console_symbol_short_disable, f_console_symbol_long_disable, " Enable debugging, inceasing verbosity beyond normal output.");
fll_program_print_help_option(output, context, f_console_standard_short_version, f_console_standard_long_version, f_console_symbol_short_disable, f_console_symbol_long_disable, " Print only the version number.");
- fprintf(output.stream, "%c", f_string_eol[0]);
+ fprintf(output.stream, "%c", f_string_eol_s[0]);
fll_program_print_help_option(output, context, fss_basic_list_read_short_at, fss_basic_list_read_long_at, f_console_symbol_short_enable, f_console_symbol_long_enable, " Select object at this numeric index.");
fll_program_print_help_option(output, context, fss_basic_list_read_short_content, fss_basic_list_read_long_content, f_console_symbol_short_enable, f_console_symbol_long_enable, " Print the content (default).");
fl_color_print(output.stream, context.set.important, " Notes:");
- fprintf(output.stream, "%c", f_string_eol[0]);
+ fprintf(output.stream, "%c", f_string_eol_s[0]);
- fprintf(output.stream, " This program will print the content associated with the given object and content data based on the FSS-0002 Basic List standard.%c", f_string_eol[0]);
+ fprintf(output.stream, " This program will print the content associated with the given object and content data based on the FSS-0002 Basic List standard.%c", f_string_eol_s[0]);
- fprintf(output.stream, "%c", f_string_eol[0]);
+ fprintf(output.stream, "%c", f_string_eol_s[0]);
fprintf(output.stream, " When using the ");
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_depth);
- fprintf(output.stream, " option, an order of operations is enforced on the parameters.%c", f_string_eol[0]);
+ fprintf(output.stream, " option, an order of operations is enforced on the parameters.%c", f_string_eol_s[0]);
- fprintf(output.stream, " 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]);
+ fprintf(output.stream, " 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_s[0]);
fprintf(output.stream, " ");
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_at);
- fprintf(output.stream, ": An object index at the specified depth.%c", f_string_eol[0]);
+ fprintf(output.stream, ": An object index at the specified depth.%c", f_string_eol_s[0]);
fprintf(output.stream, " ");
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_depth);
- fprintf(output.stream, ": A new depth within the specified depth, indexed from the root.%c", f_string_eol[0]);
+ fprintf(output.stream, ": A new depth within the specified depth, indexed from the root.%c", f_string_eol_s[0]);
fprintf(output.stream, " ");
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_name);
- fprintf(output.stream, ": An object name at the specified depth.%c", f_string_eol[0]);
+ fprintf(output.stream, ": An object name at the specified depth.%c", f_string_eol_s[0]);
- fprintf(output.stream, "%c", f_string_eol[0]);
+ fprintf(output.stream, "%c", f_string_eol_s[0]);
fprintf(output.stream, " The parameter ");
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_depth);
- fprintf(output.stream, " must be in numeric order, but values in between may be skipped.%c", f_string_eol[0]);
- fprintf(output.stream, " ('-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]);
- fprintf(output.stream, " ('-d 2 -a 1 -d 0 -a 2' would be invalid because depth 2 is before depth 1.)%c", f_string_eol[0]);
+ fprintf(output.stream, " must be in numeric order, but values in between may be skipped.%c", f_string_eol_s[0]);
+ fprintf(output.stream, " ('-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_s[0]);
+ fprintf(output.stream, " ('-d 2 -a 1 -d 0 -a 2' would be invalid because depth 2 is before depth 1.)%c", f_string_eol_s[0]);
- fprintf(output.stream, "%c", f_string_eol[0]);
+ fprintf(output.stream, "%c", f_string_eol_s[0]);
fprintf(output.stream, " The parameter ");
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_select);
- fprintf(output.stream, " selects a content index at a given depth.%c", f_string_eol[0]);
- fprintf(output.stream, " (This parameter is not synonymous with the depth parameter and does not relate to nested content).%c", f_string_eol[0]);
+ fprintf(output.stream, " selects a content index at a given depth.%c", f_string_eol_s[0]);
+ fprintf(output.stream, " (This parameter is not synonymous with the depth parameter and does not relate to nested content).%c", f_string_eol_s[0]);
- fprintf(output.stream, "%c", f_string_eol[0]);
+ fprintf(output.stream, "%c", f_string_eol_s[0]);
fprintf(output.stream, " Specify both ");
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_object);
fprintf(output.stream, " and the ");
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_total);
- fprintf(output.stream, " parameters to get the total objects.%c", f_string_eol[0]);
+ fprintf(output.stream, " parameters to get the total objects.%c", f_string_eol_s[0]);
- fprintf(output.stream, "%c", f_string_eol[0]);
+ fprintf(output.stream, "%c", f_string_eol_s[0]);
fprintf(output.stream, " When both ");
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_at);
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_at);
fprintf(output.stream, " parameter value will be treated as a position relative to the specified ");
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_name);
- fprintf(output.stream, " parameter value.%c", f_string_eol[0]);
+ fprintf(output.stream, " parameter value.%c", f_string_eol_s[0]);
- fprintf(output.stream, "%c", f_string_eol[0]);
+ fprintf(output.stream, "%c", f_string_eol_s[0]);
fprintf(output.stream, " This program may support parameters, such as ");
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_depth);
fprintf(output.stream, " or ");
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_select);
- fprintf(output.stream, ", even if not supported by the standard.%c", f_string_eol[0]);
- fprintf(output.stream, " This is done to help ensure consistency for scripting.%c", f_string_eol[0]);
+ fprintf(output.stream, ", even if not supported by the standard.%c", f_string_eol_s[0]);
+ fprintf(output.stream, " This is done to help ensure consistency for scripting.%c", f_string_eol_s[0]);
- fprintf(output.stream, "%c", f_string_eol[0]);
+ fprintf(output.stream, "%c", f_string_eol_s[0]);
fprintf(output.stream, " For parameters like ");
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_depth);
- fprintf(output.stream, ", if the standard doesn't support nested content, then only a depth of 0 would be valid.%c", f_string_eol[0]);
+ fprintf(output.stream, ", if the standard doesn't support nested content, then only a depth of 0 would be valid.%c", f_string_eol_s[0]);
fprintf(output.stream, " For parameters like ");
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_select);
- fprintf(output.stream, ", if the standard doesn't support multiple content groups, then only a select of 0 would be valid.%c", f_string_eol[0]);
+ fprintf(output.stream, ", if the standard doesn't support multiple content groups, then only a select of 0 would be valid.%c", f_string_eol_s[0]);
- fprintf(output.stream, "%c", f_string_eol[0]);
+ fprintf(output.stream, "%c", f_string_eol_s[0]);
fprintf(output.stream, " The parameter ");
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_trim);
- fprintf(output.stream, " will remove leading and trailing whitespaces when selecting objects or when printing objects.%c", f_string_eol[0]);
+ fprintf(output.stream, " will remove leading and trailing whitespaces when selecting objects or when printing objects.%c", f_string_eol_s[0]);
- fprintf(output.stream, "%c", f_string_eol[0]);
+ fprintf(output.stream, "%c", f_string_eol_s[0]);
fprintf(output.stream, " When specifying both the ");
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_object);
fprintf(output.stream, " parameter and the ");
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_content);
- fprintf(output.stream, " parameter, the entire object and content are printed, including the formatting.%c", f_string_eol[0]);
- fprintf(output.stream, " Both the object and content printed are already escaped.%c", f_string_eol[0]);
- fprintf(output.stream, " Both the object and content are separated by an EOL.%c", f_string_eol[0]);
+ fprintf(output.stream, " parameter, the entire object and content are printed, including the formatting.%c", f_string_eol_s[0]);
+ fprintf(output.stream, " Both the object and content printed are already escaped.%c", f_string_eol_s[0]);
+ fprintf(output.stream, " Both the object and content are separated by an EOL.%c", f_string_eol_s[0]);
- fprintf(output.stream, "%c", f_string_eol[0]);
+ fprintf(output.stream, "%c", f_string_eol_s[0]);
fprintf(output.stream, " The parameter ");
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_delimit);
- fprintf(output.stream, " accepts the following:%c", f_string_eol[0]);
+ fprintf(output.stream, " accepts the following:%c", f_string_eol_s[0]);
fprintf(output.stream, " - ");
fl_color_print(output.stream, context.set.notable, "%s", fss_basic_list_read_delimit_mode_name_none);
- fprintf(output.stream, ": Do not apply delimits.%c", f_string_eol[0]);
+ fprintf(output.stream, ": Do not apply delimits.%c", f_string_eol_s[0]);
fprintf(output.stream, " - ");
fl_color_print(output.stream, context.set.notable, "%s", fss_basic_list_read_delimit_mode_name_all);
- fprintf(output.stream, ": (default) apply all delimits.%c", f_string_eol[0]);
- fprintf(output.stream, " - a number, 0 or greater: apply delimits for the specified depth.%c", f_string_eol[0]);
+ fprintf(output.stream, ": (default) apply all delimits.%c", f_string_eol_s[0]);
+ fprintf(output.stream, " - a number, 0 or greater: apply delimits for the specified depth.%c", f_string_eol_s[0]);
fprintf(output.stream, " - a number, 0 or greater, followed by a ");
fl_color_print(output.stream, context.set.notable, "%s", fss_basic_list_read_delimit_mode_name_greater);
- fprintf(output.stream, ": (such as '1+') apply delimits for the specified depth and any greater depth (numerically).%c", f_string_eol[0]);
+ fprintf(output.stream, ": (such as '1+') apply delimits for the specified depth and any greater depth (numerically).%c", f_string_eol_s[0]);
fprintf(output.stream, " - a number, 0 or greater, followed by a ");
fl_color_print(output.stream, context.set.notable, "%s", fss_basic_list_read_delimit_mode_name_lesser);
- fprintf(output.stream, ": (such as '1-') apply delimits for the specified depth and any lesser depth (numerically).%c", f_string_eol[0]);
+ fprintf(output.stream, ": (such as '1-') apply delimits for the specified depth and any lesser depth (numerically).%c", f_string_eol_s[0]);
- fprintf(output.stream, "%c", f_string_eol[0]);
+ fprintf(output.stream, "%c", f_string_eol_s[0]);
return F_none;
}
status = fll_program_parameter_process(arguments, parameters, choices, F_true, &data->remaining, &data->context);
- data->error.context = data->context.set.error;
- data->error.notable = data->context.set.notable;
+ if (data->context.set.error.before) {
+ data->error.context = data->context.set.error;
+ data->error.notable = data->context.set.notable;
+ }
+ else {
+ data->context.set.warning = f_color_set_empty_s;
+ data->context.set.error = f_color_set_empty_s;
+ data->context.set.title = f_color_set_empty_s;
+ data->context.set.notable = f_color_set_empty_s;
+ data->context.set.important = f_color_set_empty_s;
+ data->context.set.standout = f_color_set_empty_s;
+ data->context.set.normal = f_color_set_empty_s;
+ data->context.set.normal_reset = f_color_set_empty_s;
+
+ data->error.context = f_color_set_empty_s;
+ data->error.notable = f_color_set_empty_s;
+ }
if (F_status_is_error(status)) {
fss_basic_list_read_delete_data(data);
if (data->parameters[fss_basic_list_read_parameter_at].result == f_console_result_found) {
fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_at);
- fl_color_print(data->error.to.stream, data->context.set.error, "' requires a positive number.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' requires a positive number.%c", f_string_eol_s[0]);
status = F_status_set_error(F_parameter);
}
if (F_status_is_error_not(status) && data->parameters[fss_basic_list_read_parameter_depth].result == f_console_result_found) {
fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_depth);
- fl_color_print(data->error.to.stream, data->context.set.error, "' requires a positive number.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' requires a positive number.%c", f_string_eol_s[0]);
status = F_status_set_error(F_parameter);
}
if (F_status_is_error_not(status) && data->parameters[fss_basic_list_read_parameter_line].result == f_console_result_found) {
fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_line);
- fl_color_print(data->error.to.stream, data->context.set.error, "' requires a positive number.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' requires a positive number.%c", f_string_eol_s[0]);
status = F_status_set_error(F_parameter);
}
if (F_status_is_error_not(status) && data->parameters[fss_basic_list_read_parameter_name].result == f_console_result_found) {
fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_name);
- fl_color_print(data->error.to.stream, data->context.set.error, "' requires a string.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' requires a string.%c", f_string_eol_s[0]);
status = F_status_set_error(F_parameter);
}
if (F_status_is_error_not(status) && data->parameters[fss_basic_list_read_parameter_select].result == f_console_result_found) {
fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_select);
- fl_color_print(data->error.to.stream, data->context.set.error, "' requires a positive number.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' requires a positive number.%c", f_string_eol_s[0]);
status = F_status_set_error(F_parameter);
}
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_object);
fl_color_print(data->error.to.stream, data->context.set.error, "' parameter with the '");
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_line);
- fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol_s[0]);
status = F_status_set_error(F_parameter);
}
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_object);
fl_color_print(data->error.to.stream, data->context.set.error, "' parameter with the '");
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_select);
- fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol_s[0]);
status = F_status_set_error(F_parameter);
}
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_content);
fl_color_print(data->error.to.stream, data->context.set.error, "' parameter with the '");
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_total);
- fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol_s[0]);
status = F_status_set_error(F_parameter);
}
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_line);
fl_color_print(data->error.to.stream, data->context.set.error, "' parameter with the '");
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_total);
- fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol_s[0]);
status = F_status_set_error(F_parameter);
}
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_pipe);
fl_color_print(data->error.to.stream, data->context.set.error, "' parameter with the '");
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_total);
- fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol_s[0]);
status = F_status_set_error(F_parameter);
}
if (data->parameters[fss_basic_list_read_parameter_delimit].result == f_console_result_found) {
fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_delimit);
- fl_color_print(data->error.to.stream, data->context.set.error, "' requires a value.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' requires a value.%c", f_string_eol_s[0]);
status = F_status_set_error(F_parameter);
}
if (length == 0) {
fl_color_print(data->error.to.stream, data->context.set.error, "%sThe value for the parameter '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_delimit);
- fl_color_print(data->error.to.stream, data->context.set.error, "' must not be empty.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' must not be empty.%c", f_string_eol_s[0]);
status = F_status_set_error(F_parameter);
}
f_macro_fss_comments_t_delete_simple(comments);
if (data->parameters[fss_basic_list_read_parameter_total].result == f_console_result_found) {
- fprintf(data->output.stream, "0%c", f_string_eol[0]);
+ fprintf(data->output.stream, "0%c", f_string_eol_s[0]);
}
fss_basic_list_read_delete_data(data);
if (F_status_is_error_not(status) && data->parameters[fss_basic_list_read_parameter_select].result == f_console_result_found) {
fl_color_print(data->error.to.stream, data->context.set.error, "%sThe '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_select);
- fl_color_print(data->error.to.stream, data->context.set.error, "' parameter requires a positive number.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' parameter requires a positive number.%c", f_string_eol_s[0]);
status = F_status_set_error(F_parameter);
}
// Skip past empty files.
if (!data->quantity.total) {
if (data->parameters[fss_basic_list_read_parameter_total].result == f_console_result_found) {
- fprintf(data->output.stream, "0%c", f_string_eol[0]);
+ fprintf(data->output.stream, "0%c", f_string_eol_s[0]);
}
f_file_stream_close(F_true, &file);
f_macro_fss_comments_t_delete_simple(comments);
}
else {
- fl_color_print(data->error.to.stream, data->context.set.error, "%sYou failed to specify one or more files.%c", fll_error_print_error, f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "%sYou failed to specify one or more files.%c", fll_error_print_error, f_string_eol_s[0]);
status = F_status_set_error(F_parameter);
}
fss_basic_list_read_macro_depths_t_new(status, (*depths), depth_size);
if (F_status_is_error(status)) {
- fl_color_print(data.error.to.stream, data.context.set.error, "%sUnable to allocate memory.%c", fll_error_print_error, f_string_eol[0]);
+ fl_color_print(data.error.to.stream, data.context.set.error, "%sUnable to allocate memory.%c", fll_error_print_error, f_string_eol_s[0]);
return status;
}
// @todo: move error printing into common function.
if (status_code == F_memory_allocation || status_code == F_memory_reallocation) {
- fl_color_print(data.error.to.stream, data.context.set.error, "%sUnable to allocate memory.%c", fll_error_print_error, f_string_eol[0]);
+ fl_color_print(data.error.to.stream, data.context.set.error, "%sUnable to allocate memory.%c", fll_error_print_error, f_string_eol_s[0]);
}
else if (status_code == f_string_length_t_size) {
fl_color_print(data.error.to.stream, data.context.set.error, "%sUnable to process '", fll_error_print_error);
fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_trim);
- fl_color_print(data.error.to.stream, data.context.set.error, "' because the maximum buffer size was reached.%c", f_string_eol[0]);
+ fl_color_print(data.error.to.stream, data.context.set.error, "' because the maximum buffer size was reached.%c", f_string_eol_s[0]);
}
else {
f_string_t function = "fl_string_append";
fl_color_print(data.error.to.stream, data.context.set.notable, "%u", status_code);
fl_color_print(data.error.to.stream, data.context.set.error, ") has occurred while calling ");
fl_color_print(data.error.to.stream, data.context.set.notable, "%s()", function);
- fl_color_print(data.error.to.stream, data.context.set.error, ".%c", f_string_eol[0]);
+ fl_color_print(data.error.to.stream, data.context.set.error, ".%c", f_string_eol_s[0]);
}
return status;
if (!depths->array[i].value_name.used) {
fl_color_print(data.error.to.stream, data.context.set.error, "%sThe '", fll_error_print_error);
fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_name);
- fl_color_print(data.error.to.stream, data.context.set.error, "' must not be an empty string.%c", f_string_eol[0]);
+ fl_color_print(data.error.to.stream, data.context.set.error, "' must not be an empty string.%c", f_string_eol_s[0]);
return F_status_set_error(F_parameter);
}
fl_color_print(data.error.to.stream, data.context.set.notable, "%llu", depths->array[i].depth);
fl_color_print(data.error.to.stream, data.context.set.error, "' may only be specified once for the parameter '");
fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_depth);
- fl_color_print(data.error.to.stream, data.context.set.error, "'.%c", f_string_eol[0]);
+ fl_color_print(data.error.to.stream, data.context.set.error, "'.%c", f_string_eol_s[0]);
return F_status_set_error(F_parameter);
}
fl_color_print(data.error.to.stream, data.context.set.notable, "%llu", depths->array[i].depth);
fl_color_print(data.error.to.stream, data.context.set.error, "' before the value '");
fl_color_print(data.error.to.stream, data.context.set.notable, "%llu", depths->array[j].depth);
- fl_color_print(data.error.to.stream, data.context.set.error, "'.%c", f_string_eol[0]);
+ fl_color_print(data.error.to.stream, data.context.set.error, "'.%c", f_string_eol_s[0]);
return F_status_set_error(F_parameter);
}
fl_string_dynamic_delete(&data->buffer);
if (data->parameters[fss_basic_list_read_parameter_total].result == f_console_result_found) {
- fprintf(data->output.stream, "0%c", f_string_eol[0]);
+ fprintf(data->output.stream, "0%c", f_string_eol_s[0]);
return F_none;
}
if (data->parameters[fss_basic_list_read_parameter_total].result == f_console_result_found) {
if (depths.array[0].index_at > 0) {
if (depths.array[0].value_at < data->objects.used && names[depths.array[0].value_at]) {
- fprintf(data->output.stream, "1%c", f_string_eol[0]);
+ fprintf(data->output.stream, "1%c", f_string_eol_s[0]);
}
else {
- fprintf(data->output.stream, "0%c", f_string_eol[0]);
+ fprintf(data->output.stream, "0%c", f_string_eol_s[0]);
}
}
else if (depths.array[0].index_name > 0) {
total++;
} // for
- fprintf(data->output.stream, "%llu%c", total, f_string_eol[0]);
+ fprintf(data->output.stream, "%llu%c", total, f_string_eol_s[0]);
}
else {
- fprintf(data->output.stream, "%llu%c", data->objects.used, f_string_eol[0]);
+ fprintf(data->output.stream, "%llu%c", data->objects.used, f_string_eol_s[0]);
}
return F_none;
if (depths.array[0].index_at > 0) {
if (depths.array[0].value_at >= data->objects.used) {
if (names[depths.array[0].value_at] && data->parameters[fss_basic_list_read_parameter_total].result == f_console_result_found) {
- fprintf(data->output.stream, "0%c", f_string_eol[0]);
+ fprintf(data->output.stream, "0%c", f_string_eol_s[0]);
}
return F_none;
if (at == depths.array[0].value_at) {
if (data->parameters[fss_basic_list_read_parameter_total].result == f_console_result_found) {
if (!data->contents.array[i].used) {
- fprintf(data->output.stream, "0%c", f_string_eol[0]);
+ fprintf(data->output.stream, "0%c", f_string_eol_s[0]);
}
else {
total = 1;
for (j = data->contents.array[i].array[0].start; j <= data->contents.array[i].array[0].stop; j++) {
if (!data->buffer.string[j]) continue;
- if (data->buffer.string[j] == f_string_eol[0]) {
+ if (data->buffer.string[j] == f_string_eol_s[0]) {
total++;
}
} // for
- fprintf(data->output.stream, "%llu%c", total, f_string_eol[0]);
+ fprintf(data->output.stream, "%llu%c", total, f_string_eol_s[0]);
}
return F_none;
if (data->parameters[fss_basic_list_read_parameter_line].result == f_console_result_additional) {
if (!data->contents.array[i].used) {
if (include_empty && !line) {
- fprintf(data->output.stream, "%c", f_string_eol[0]);
+ fprintf(data->output.stream, "%c", f_string_eol_s[0]);
fss_basic_list_read_print_set_end(*data);
}
}
if (!line) {
for (; i <= data->contents.array[i].array[0].stop; i++) {
if (!data->buffer.string[i]) continue;
- if (data->buffer.string[i] == f_string_eol[0]) {
- fprintf(data->output.stream, "%c", f_string_eol[0]);
+ if (data->buffer.string[i] == f_string_eol_s[0]) {
+ fprintf(data->output.stream, "%c", f_string_eol_s[0]);
break;
}
for (; i <= data->contents.array[i].array[0].stop; i++) {
if (!data->buffer.string[i]) continue;
- if (data->buffer.string[i] == f_string_eol[0]) {
+ if (data->buffer.string[i] == f_string_eol_s[0]) {
line_current++;
if (line_current == line) {
for (; i <= data->contents.array[i].array[0].stop; i++) {
if (!data->buffer.string[i]) continue;
- if (data->buffer.string[i] == f_string_eol[0]) {
- fprintf(data->output.stream, "%c", f_string_eol[0]);
+ if (data->buffer.string[i] == f_string_eol_s[0]) {
+ fprintf(data->output.stream, "%c", f_string_eol_s[0]);
break;
}
fss_basic_list_read_print_set_end(*data);
}
else if (include_empty) {
- fprintf(data->output.stream, "%c", f_string_eol[0]);
+ fprintf(data->output.stream, "%c", f_string_eol_s[0]);
fss_basic_list_read_print_set_end(*data);
}
for (j = data->contents.array[i].array[0].start; j <= data->contents.array[i].array[0].stop; j++) {
if (!data->buffer.string[j]) continue;
- if (data->buffer.string[j] == f_string_eol[0]) {
+ if (data->buffer.string[j] == f_string_eol_s[0]) {
total++;
}
} // for
} // for
- fprintf(data->output.stream, "%llu%c", total, f_string_eol[0]);
+ fprintf(data->output.stream, "%llu%c", total, f_string_eol_s[0]);
return F_none;
}
if (!data->contents.array[i].used) {
if (include_empty) {
if (line_current == line) {
- fprintf(data->output.stream, "%c", f_string_eol[0]);
+ fprintf(data->output.stream, "%c", f_string_eol_s[0]);
fss_basic_list_read_print_set_end(*data);
break;
}
if (line_current != line) {
for (; j <= data->contents.array[i].array[0].stop; j++) {
- if (data->buffer.string[j] == f_string_eol[0]) {
+ if (data->buffer.string[j] == f_string_eol_s[0]) {
line_current++;
if (line_current == line) {
for (; j <= data->contents.array[i].array[0].stop; j++) {
if (!data->buffer.string[j]) continue;
- if (data->buffer.string[j] == f_string_eol[0]) {
- fprintf(data->output.stream, "%c", f_string_eol[0]);
+ if (data->buffer.string[j] == f_string_eol_s[0]) {
+ fprintf(data->output.stream, "%c", f_string_eol_s[0]);
break;
}
if (!data->contents.array[i].used) {
if (include_empty) {
- fprintf(data->output.stream, "%c", f_string_eol[0]);
+ fprintf(data->output.stream, "%c", f_string_eol_s[0]);
fss_basic_list_read_print_set_end(*data);
}
fll_program_print_help_option(output, context, f_console_standard_short_debug, f_console_standard_long_debug, f_console_symbol_short_disable, f_console_symbol_long_disable, " Enable debugging, inceasing verbosity beyond normal output.");
fll_program_print_help_option(output, context, f_console_standard_short_version, f_console_standard_long_version, f_console_symbol_short_disable, f_console_symbol_long_disable, " Print only the version number.");
- fprintf(output.stream, "%c", f_string_eol[0]);
+ fprintf(output.stream, "%c", f_string_eol_s[0]);
fll_program_print_help_option(output, context, fss_basic_list_write_short_file, fss_basic_list_write_long_file, f_console_symbol_short_enable, f_console_symbol_long_enable, " Specify a file to send output to.");
fll_program_print_help_option(output, context, fss_basic_list_write_short_content, fss_basic_list_write_long_content, f_console_symbol_short_enable, f_console_symbol_long_enable, "The Content to output.");
fl_color_print(output.stream, context.set.notable, "\\b");
fprintf(output.stream, "' (");
fl_color_print(output.stream, context.set.notable, "U+0008");
- fprintf(output.stream, ") to designate the start of a Content.%c", f_string_eol[0]);
+ fprintf(output.stream, ") to designate the start of a Content.%c", f_string_eol_s[0]);
fprintf(output.stream, " The pipe uses the Form Feed character '");
fl_color_print(output.stream, context.set.notable, "\\f");
fprintf(output.stream, "' (");
fl_color_print(output.stream, context.set.notable, "U+000C");
- fprintf(output.stream, ") to designate the end of the last Content.%c", f_string_eol[0]);
+ fprintf(output.stream, ") to designate the end of the last Content.%c", f_string_eol_s[0]);
fprintf(output.stream, " The pipe uses the Vertical Line character '");
fl_color_print(output.stream, context.set.notable, "\\v");
fprintf(output.stream, "' (");
fl_color_print(output.stream, context.set.notable, "U+000B");
- fprintf(output.stream, ") is used to ignore a content range, which does nothing in this program.%c", f_string_eol[0]);
+ fprintf(output.stream, ") is used to ignore a content range, which does nothing in this program.%c", f_string_eol_s[0]);
fprintf(output.stream, " For the pipe, an Object is terminated by either a Backspace character '");
fl_color_print(output.stream, context.set.notable, "\\b");
fl_color_print(output.stream, context.set.notable, "\\f");
fprintf(output.stream, "' (");
fl_color_print(output.stream, context.set.notable, "U+000C");
- fprintf(output.stream, ").%c", f_string_eol[0]);
+ fprintf(output.stream, ").%c", f_string_eol_s[0]);
- fprintf(output.stream, " The end of the pipe represents the end of any Object or Content.%c", f_string_eol[0]);
+ fprintf(output.stream, " The end of the pipe represents the end of any Object or Content.%c", f_string_eol_s[0]);
- fprintf(output.stream, "%c", f_string_eol[0]);
+ fprintf(output.stream, "%c", f_string_eol_s[0]);
fprintf(output.stream, " The FSS-0002 (Basic List) specification does not support quoted names, therefore the parameters '");
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_write_long_single);
fprintf(output.stream, "' and '");
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_write_long_double);
- fprintf(output.stream, "' do nothing.%c", f_string_eol[0]);
+ fprintf(output.stream, "' do nothing.%c", f_string_eol_s[0]);
- fprintf(output.stream, "%c", f_string_eol[0]);
+ fprintf(output.stream, "%c", f_string_eol_s[0]);
fprintf(output.stream, " This program does not use the parameter '");
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_write_long_ignore);
- fprintf(output.stream, "', which therefore does nothing.%c", f_string_eol[0]);
- fprintf(output.stream, " This parameter requires two values.%c", f_string_eol[0]);
+ fprintf(output.stream, "', which therefore does nothing.%c", f_string_eol_s[0]);
+ fprintf(output.stream, " This parameter requires two values.%c", f_string_eol_s[0]);
- fprintf(output.stream, "%c", f_string_eol[0]);
+ fprintf(output.stream, "%c", f_string_eol_s[0]);
return F_none;
}
status = fll_program_parameter_process(arguments, parameters, choices, F_true, &data->remaining, &data->context);
- data->error.context = data->context.set.error;
- data->error.notable = data->context.set.notable;
+ if (data->context.set.error.before) {
+ data->error.context = data->context.set.error;
+ data->error.notable = data->context.set.notable;
+ }
+ else {
+ data->context.set.warning = f_color_set_empty_s;
+ data->context.set.error = f_color_set_empty_s;
+ data->context.set.title = f_color_set_empty_s;
+ data->context.set.notable = f_color_set_empty_s;
+ data->context.set.important = f_color_set_empty_s;
+ data->context.set.standout = f_color_set_empty_s;
+ data->context.set.normal = f_color_set_empty_s;
+ data->context.set.normal_reset = f_color_set_empty_s;
+
+ data->error.context = f_color_set_empty_s;
+ data->error.notable = f_color_set_empty_s;
+ }
if (F_status_is_error(status)) {
fss_basic_list_write_delete_data(data);
if (data->parameters[fss_basic_list_write_parameter_file].result == f_console_result_additional) {
if (data->parameters[fss_basic_list_write_parameter_file].values.used > 1) {
if (data->error.verbosity != f_console_verbosity_quiet) {
- fprintf(data->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_write_long_file);
- fl_color_print(data->error.to.stream, data->context.set.error, "' may only be specified once.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' may only be specified once.%c", f_string_eol_s[0]);
}
status = F_status_set_error(F_parameter);
else if (data->parameters[fss_basic_list_write_parameter_content].locations.used && data->parameters[fss_basic_list_write_parameter_partial].locations.used) {
if (data->parameters[fss_basic_list_write_parameter_content].result == f_console_result_additional) {
if (data->error.verbosity != f_console_verbosity_quiet) {
- fprintf(data->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data->error.to.stream, data->context.set.error, "%sThe '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_write_long_partial);
fl_color_print(data->error.to.stream, data->context.set.error, "' parameter only allows either the '");
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_write_long_object);
fl_color_print(data->error.to.stream, data->context.set.error, "' parameter or the '");
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_write_long_content);
- fl_color_print(data->error.to.stream, data->context.set.error, "' parameter, but not both.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' parameter, but not both.%c", f_string_eol_s[0]);
}
status = F_status_set_error(F_parameter);
if (location_object > location_content || location_object == location_content && location_sub_object > location_sub_content) {
if (data->error.verbosity != f_console_verbosity_quiet) {
- fprintf(data->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data->error.to.stream, data->context.set.error, "%sEach ", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_write_long_object);
fl_color_print(data->error.to.stream, data->context.set.error, "' parameter must be specified before a '");
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_write_long_content);
- fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol_s[0]);
}
status = F_status_set_error(F_parameter);
}
else if (!data->process_pipe) {
if (data->error.verbosity != f_console_verbosity_quiet) {
- fprintf(data->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data->error.to.stream, data->context.set.error, "%sThis requires either piped data or the use of the '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_write_long_object);
fl_color_print(data->error.to.stream, data->context.set.error, "' parameter with the '");
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_write_long_content);
- fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol_s[0]);
}
status = F_status_set_error(F_parameter);
if (F_status_is_error_not(status) && data->process_pipe) {
if (data->parameters[fss_basic_list_write_parameter_partial].result == f_console_result_found) {
if (data->error.verbosity != f_console_verbosity_quiet) {
- fprintf(data->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data->error.to.stream, data->context.set.error, "%sThe '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_write_long_partial);
- fl_color_print(data->error.to.stream, data->context.set.error, "' parameter cannot be used when processing a pipe.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' parameter cannot be used when processing a pipe.%c", f_string_eol_s[0]);
}
status = F_status_set_error(F_parameter);
if (F_status_is_error_not(status)) {
if (data->parameters[fss_basic_list_write_parameter_prepend].result == f_console_result_found) {
if (data->error.verbosity != f_console_verbosity_quiet) {
- fprintf(data->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_write_long_prepend);
- fl_color_print(data->error.to.stream, data->context.set.error, "' was specified, but no value was given.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' was specified, but no value was given.%c", f_string_eol_s[0]);
}
status = F_status_set_error(F_parameter);
if (status == F_false) {
if (data->error.verbosity != f_console_verbosity_quiet) {
- fprintf(data->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data->error.to.stream, data->context.set.error, "%sThe value for the parameter '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_write_long_prepend);
- fl_color_print(data->error.to.stream, data->context.set.error, "' must only contain whitespace.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' must only contain whitespace.%c", f_string_eol_s[0]);
}
status = F_status_set_error(F_parameter);
}
else {
if (data->error.verbosity != f_console_verbosity_quiet) {
- fprintf(data->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data->error.to.stream, data->context.set.error, "%sThe value for the parameter '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_write_long_prepend);
- fl_color_print(data->error.to.stream, data->context.set.error, "' must not be an empty string.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' must not be an empty string.%c", f_string_eol_s[0]);
}
status = F_status_set_error(F_parameter);
if (F_status_is_error_not(status)) {
if (data->parameters[fss_basic_list_write_parameter_ignore].result == f_console_result_found) {
if (data->error.verbosity != f_console_verbosity_quiet) {
- fprintf(data->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_write_long_ignore);
- fl_color_print(data->error.to.stream, data->context.set.error, "' was specified, but no values were given.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' was specified, but no values were given.%c", f_string_eol_s[0]);
}
status = F_status_set_error(F_parameter);
const f_array_length_t total_arguments = data->parameters[fss_basic_list_write_parameter_ignore].values.used;
if (total_locations * 2 > total_arguments) {
- fprintf(data->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_write_long_ignore);
- fl_color_print(data->error.to.stream, data->context.set.error, "' requires two values.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' requires two values.%c", f_string_eol_s[0]);
status = F_status_set_error(F_parameter);
}
if (F_status_is_error(status)) {
if (data->error.verbosity != f_console_verbosity_quiet) {
- fprintf(data->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data->error.to.stream, data->context.set.error, "%sWhile processing the ", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "input pipe");
- fl_color_print(data->error.to.stream, data->context.set.error, ".%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, ".%c", f_string_eol_s[0]);
}
}
}
if (F_status_is_error(status)) {
if (data->error.verbosity != f_console_verbosity_quiet) {
- fprintf(data->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data->error.to.stream, data->context.set.error, "%sWhile processing the ", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "input arguments");
- fl_color_print(data->error.to.stream, data->context.set.error, ".%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, ".%c", f_string_eol_s[0]);
}
}
else if (data->error.verbosity != f_console_verbosity_quiet && data->parameters[fss_basic_list_write_parameter_file].result == f_console_result_none) {
// ensure there is always a newline at the end, unless in quiet mode.
- fprintf(data->output.stream, "%c", f_string_eol[0]);
+ fprintf(data->output.stream, "%c", f_string_eol_s[0]);
}
}
// ensure a newline is always put at the end of the program execution, unless in quiet mode.
if (data->error.verbosity != f_console_verbosity_quiet) {
if (F_status_is_error(status)) {
- fprintf(data->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data->error.to.stream, "%c", f_string_eol_s[0]);
}
}
return;
}
- fprintf(data.error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data.error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data.error.to.stream, data.context.set.error, "%sMust specify both the '", fll_error_print_error);
fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_write_long_object);
fl_color_print(data.error.to.stream, data.context.set.error, "' parameter and the '");
fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_write_long_content);
fl_color_print(data.error.to.stream, data.context.set.error, "' parameter the same number of times when not specifying the ");
fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_list_write_long_partial);
- fl_color_print(data.error.to.stream, data.context.set.error, "' parameter.%c", f_string_eol[0]);
+ fl_color_print(data.error.to.stream, data.context.set.error, "' parameter.%c", f_string_eol_s[0]);
}
#endif // _di_fss_basic_list_write_error_parameter_same_times_print_
return;
}
- fprintf(data.error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data.error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data.error.to.stream, data.context.set.error, "%sThis standard does not support end of line character '", fll_error_print_error);
fl_color_print(data.error.to.stream, data.context.set.notable, "\\n");
- fl_color_print(data.error.to.stream, data.context.set.error, "' in objects.%c", f_string_eol[0]);
+ fl_color_print(data.error.to.stream, data.context.set.error, "' in objects.%c", f_string_eol_s[0]);
}
#endif // _di_fss_basic_list_write_error_parameter_unsupported_eol_print_
return;
}
- fprintf(data.error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data.error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data.error.to.stream, data.context.set.error, "%sThe parameter '", fll_error_print_error);
fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", symbol, parameter);
- fl_color_print(data.error.to.stream, data.context.set.error, "' was specified, but no value was given.%c", f_string_eol[0]);
+ fl_color_print(data.error.to.stream, data.context.set.error, "' was specified, but no value was given.%c", f_string_eol_s[0]);
}
#endif // _di_fss_basic_list_write_error_parameter_value_missing_print_
if (block.string[range.start] == fss_basic_list_write_pipe_content_start) {
if (data.error.verbosity != f_console_verbosity_quiet) {
- fprintf(data.error.to.stream, "%c", f_string_eol[0]);
- fl_color_print(data.error.to.stream, data.context.set.error, "%sThis standard only supports one content per object.%c", fll_error_print_error, f_string_eol[0]);
+ fprintf(data.error.to.stream, "%c", f_string_eol_s[0]);
+ fl_color_print(data.error.to.stream, data.context.set.error, "%sThis standard only supports one content per object.%c", fll_error_print_error, f_string_eol_s[0]);
}
status = F_status_set_error(F_supported_not);
fll_program_print_help_option(output, context, f_console_standard_short_debug, f_console_standard_long_debug, f_console_symbol_short_disable, f_console_symbol_long_disable, " Enable debugging, inceasing verbosity beyond normal output.");
fll_program_print_help_option(output, context, f_console_standard_short_version, f_console_standard_long_version, f_console_symbol_short_disable, f_console_symbol_long_disable, " Print only the version number.");
- fprintf(output.stream, "%c", f_string_eol[0]);
+ fprintf(output.stream, "%c", f_string_eol_s[0]);
fll_program_print_help_option(output, context, fss_basic_read_short_at, fss_basic_read_long_at, f_console_symbol_short_enable, f_console_symbol_long_enable, " Select object at this numeric index.");
fll_program_print_help_option(output, context, fss_basic_read_short_content, fss_basic_read_long_content, f_console_symbol_short_enable, f_console_symbol_long_enable, " Print the content (default).");
fl_color_print(output.stream, context.set.important, " Notes:");
- fprintf(output.stream, "%c", f_string_eol[0]);
+ fprintf(output.stream, "%c", f_string_eol_s[0]);
- fprintf(output.stream, " This program will print the content associated with the given object and content data based on the FSS-0000 Basic standard.%c", f_string_eol[0]);
+ fprintf(output.stream, " This program will print the content associated with the given object and content data based on the FSS-0000 Basic standard.%c", f_string_eol_s[0]);
- fprintf(output.stream, "%c", f_string_eol[0]);
+ fprintf(output.stream, "%c", f_string_eol_s[0]);
fprintf(output.stream, " When using the ");
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_depth);
- fprintf(output.stream, " option, an order of operations is enforced on the parameters.%c", f_string_eol[0]);
+ fprintf(output.stream, " option, an order of operations is enforced on the parameters.%c", f_string_eol_s[0]);
- fprintf(output.stream, " 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]);
+ fprintf(output.stream, " 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_s[0]);
fprintf(output.stream, " ");
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_at);
- fprintf(output.stream, ": An object index at the specified depth.%c", f_string_eol[0]);
+ fprintf(output.stream, ": An object index at the specified depth.%c", f_string_eol_s[0]);
fprintf(output.stream, " ");
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_depth);
- fprintf(output.stream, ": A new depth within the specified depth, indexed from the root.%c", f_string_eol[0]);
+ fprintf(output.stream, ": A new depth within the specified depth, indexed from the root.%c", f_string_eol_s[0]);
fprintf(output.stream, " ");
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_name);
- fprintf(output.stream, ": An object name at the specified depth.%c", f_string_eol[0]);
+ fprintf(output.stream, ": An object name at the specified depth.%c", f_string_eol_s[0]);
- fprintf(output.stream, "%c", f_string_eol[0]);
+ fprintf(output.stream, "%c", f_string_eol_s[0]);
fprintf(output.stream, " The parameter ");
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_depth);
- fprintf(output.stream, " must be in numeric order, but values in between may be skipped.%c", f_string_eol[0]);
- fprintf(output.stream, " ('-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]);
- fprintf(output.stream, " ('-d 2 -a 1 -d 0 -a 2' would be invalid because depth 2 is before depth 1.)%c", f_string_eol[0]);
+ fprintf(output.stream, " must be in numeric order, but values in between may be skipped.%c", f_string_eol_s[0]);
+ fprintf(output.stream, " ('-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_s[0]);
+ fprintf(output.stream, " ('-d 2 -a 1 -d 0 -a 2' would be invalid because depth 2 is before depth 1.)%c", f_string_eol_s[0]);
- fprintf(output.stream, "%c", f_string_eol[0]);
+ fprintf(output.stream, "%c", f_string_eol_s[0]);
fprintf(output.stream, " The parameter ");
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_select);
- fprintf(output.stream, " selects a content index at a given depth.%c", f_string_eol[0]);
- fprintf(output.stream, " (This parameter is not synonymous with the depth parameter and does not relate to nested content).%c", f_string_eol[0]);
+ fprintf(output.stream, " selects a content index at a given depth.%c", f_string_eol_s[0]);
+ fprintf(output.stream, " (This parameter is not synonymous with the depth parameter and does not relate to nested content).%c", f_string_eol_s[0]);
- fprintf(output.stream, "%c", f_string_eol[0]);
+ fprintf(output.stream, "%c", f_string_eol_s[0]);
fprintf(output.stream, " Specify both ");
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_object);
fprintf(output.stream, " and the ");
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_total);
- fprintf(output.stream, " parameters to get the total objects.%c", f_string_eol[0]);
+ fprintf(output.stream, " parameters to get the total objects.%c", f_string_eol_s[0]);
- fprintf(output.stream, "%c", f_string_eol[0]);
+ fprintf(output.stream, "%c", f_string_eol_s[0]);
fprintf(output.stream, " When both ");
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_at);
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_at);
fprintf(output.stream, " parameter value will be treated as a position relative to the specified ");
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_name);
- fprintf(output.stream, " parameter value.%c", f_string_eol[0]);
+ fprintf(output.stream, " parameter value.%c", f_string_eol_s[0]);
- fprintf(output.stream, "%c", f_string_eol[0]);
+ fprintf(output.stream, "%c", f_string_eol_s[0]);
fprintf(output.stream, " This program may support parameters, such as ");
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_depth);
fprintf(output.stream, " or ");
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_select);
- fprintf(output.stream, ", even if not supported by the standard.%c", f_string_eol[0]);
- fprintf(output.stream, " This is done to help ensure consistency for scripting.%c", f_string_eol[0]);
+ fprintf(output.stream, ", even if not supported by the standard.%c", f_string_eol_s[0]);
+ fprintf(output.stream, " This is done to help ensure consistency for scripting.%c", f_string_eol_s[0]);
- fprintf(output.stream, "%c", f_string_eol[0]);
+ fprintf(output.stream, "%c", f_string_eol_s[0]);
fprintf(output.stream, " For parameters like ");
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_depth);
- fprintf(output.stream, ", if the standard doesn't support nested content, then only a depth of 0 would be valid.%c", f_string_eol[0]);
+ fprintf(output.stream, ", if the standard doesn't support nested content, then only a depth of 0 would be valid.%c", f_string_eol_s[0]);
fprintf(output.stream, " For parameters like ");
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_select);
- fprintf(output.stream, ", if the standard doesn't support multiple content groups, then only a select of 0 would be valid.%c", f_string_eol[0]);
+ fprintf(output.stream, ", if the standard doesn't support multiple content groups, then only a select of 0 would be valid.%c", f_string_eol_s[0]);
- fprintf(output.stream, "%c", f_string_eol[0]);
+ fprintf(output.stream, "%c", f_string_eol_s[0]);
fprintf(output.stream, " The parameter ");
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_trim);
- fprintf(output.stream, " will remove leading and trailing whitespaces when selecting objects or when printing objects.%c", f_string_eol[0]);
+ fprintf(output.stream, " will remove leading and trailing whitespaces when selecting objects or when printing objects.%c", f_string_eol_s[0]);
- fprintf(output.stream, "%c", f_string_eol[0]);
+ fprintf(output.stream, "%c", f_string_eol_s[0]);
fprintf(output.stream, " When specifying both the ");
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_object);
fprintf(output.stream, " parameter and the ");
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_content);
- fprintf(output.stream, " parameter, the entire object and content are printed, including the formatting.%c", f_string_eol[0]);
- fprintf(output.stream, " Both the object and content printed are already escaped.%c", f_string_eol[0]);
- fprintf(output.stream, " Both the object and content are separated by a space.%c", f_string_eol[0]);
+ fprintf(output.stream, " parameter, the entire object and content are printed, including the formatting.%c", f_string_eol_s[0]);
+ fprintf(output.stream, " Both the object and content printed are already escaped.%c", f_string_eol_s[0]);
+ fprintf(output.stream, " Both the object and content are separated by a space.%c", f_string_eol_s[0]);
- fprintf(output.stream, "%c", f_string_eol[0]);
+ fprintf(output.stream, "%c", f_string_eol_s[0]);
fprintf(output.stream, " The parameter ");
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_delimit);
- fprintf(output.stream, " accepts the following:%c", f_string_eol[0]);
+ fprintf(output.stream, " accepts the following:%c", f_string_eol_s[0]);
fprintf(output.stream, " - ");
fl_color_print(output.stream, context.set.notable, "%s", fss_basic_read_delimit_mode_name_none);
- fprintf(output.stream, ": Do not apply delimits.%c", f_string_eol[0]);
+ fprintf(output.stream, ": Do not apply delimits.%c", f_string_eol_s[0]);
fprintf(output.stream, " - ");
fl_color_print(output.stream, context.set.notable, "%s", fss_basic_read_delimit_mode_name_all);
- fprintf(output.stream, ": (default) apply all delimits.%c", f_string_eol[0]);
- fprintf(output.stream, " - a number, 0 or greater: apply delimits for the specified depth.%c", f_string_eol[0]);
+ fprintf(output.stream, ": (default) apply all delimits.%c", f_string_eol_s[0]);
+ fprintf(output.stream, " - a number, 0 or greater: apply delimits for the specified depth.%c", f_string_eol_s[0]);
fprintf(output.stream, " - a number, 0 or greater, followed by a ");
fl_color_print(output.stream, context.set.notable, "%s", fss_basic_read_delimit_mode_name_greater);
- fprintf(output.stream, ": (such as '1+') apply delimits for the specified depth and any greater depth (numerically).%c", f_string_eol[0]);
+ fprintf(output.stream, ": (such as '1+') apply delimits for the specified depth and any greater depth (numerically).%c", f_string_eol_s[0]);
fprintf(output.stream, " - a number, 0 or greater, followed by a ");
fl_color_print(output.stream, context.set.notable, "%s", fss_basic_read_delimit_mode_name_lesser);
- fprintf(output.stream, ": (such as '1-') apply delimits for the specified depth and any lesser depth (numerically).%c", f_string_eol[0]);
+ fprintf(output.stream, ": (such as '1-') apply delimits for the specified depth and any lesser depth (numerically).%c", f_string_eol_s[0]);
- fprintf(output.stream, "%c", f_string_eol[0]);
+ fprintf(output.stream, "%c", f_string_eol_s[0]);
return F_none;
}
status = fll_program_parameter_process(arguments, parameters, choices, F_true, &data->remaining, &data->context);
- data->error.context = data->context.set.error;
- data->error.notable = data->context.set.notable;
+ if (data->context.set.error.before) {
+ data->error.context = data->context.set.error;
+ data->error.notable = data->context.set.notable;
+ }
+ else {
+ data->context.set.warning = f_color_set_empty_s;
+ data->context.set.error = f_color_set_empty_s;
+ data->context.set.title = f_color_set_empty_s;
+ data->context.set.notable = f_color_set_empty_s;
+ data->context.set.important = f_color_set_empty_s;
+ data->context.set.standout = f_color_set_empty_s;
+ data->context.set.normal = f_color_set_empty_s;
+ data->context.set.normal_reset = f_color_set_empty_s;
+
+ data->error.context = f_color_set_empty_s;
+ data->error.notable = f_color_set_empty_s;
+ }
if (F_status_is_error(status)) {
fss_basic_read_delete_data(data);
if (data->parameters[fss_basic_read_parameter_at].result == f_console_result_found) {
fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_at);
- fl_color_print(data->error.to.stream, data->context.set.error, "' requires a positive number.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' requires a positive number.%c", f_string_eol_s[0]);
status = F_status_set_error(F_parameter);
}
if (F_status_is_error_not(status) && data->parameters[fss_basic_read_parameter_depth].result == f_console_result_found) {
fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_depth);
- fl_color_print(data->error.to.stream, data->context.set.error, "' requires a positive number.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' requires a positive number.%c", f_string_eol_s[0]);
status = F_status_set_error(F_parameter);
}
if (F_status_is_error_not(status) && data->parameters[fss_basic_read_parameter_line].result == f_console_result_found) {
fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_line);
- fl_color_print(data->error.to.stream, data->context.set.error, "' requires a positive number.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' requires a positive number.%c", f_string_eol_s[0]);
status = F_status_set_error(F_parameter);
}
if (F_status_is_error_not(status) && data->parameters[fss_basic_read_parameter_name].result == f_console_result_found) {
fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_name);
- fl_color_print(data->error.to.stream, data->context.set.error, "' requires a string.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' requires a string.%c", f_string_eol_s[0]);
status = F_status_set_error(F_parameter);
}
if (F_status_is_error_not(status) && data->parameters[fss_basic_read_parameter_select].result == f_console_result_found) {
fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_select);
- fl_color_print(data->error.to.stream, data->context.set.error, "' requires a positive number.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' requires a positive number.%c", f_string_eol_s[0]);
status = F_status_set_error(F_parameter);
}
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_object);
fl_color_print(data->error.to.stream, data->context.set.error, "' parameter with the '");
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_select);
- fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol_s[0]);
status = F_status_set_error(F_parameter);
}
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_content);
fl_color_print(data->error.to.stream, data->context.set.error, "' parameter with the '");
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_total);
- fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol_s[0]);
status = F_status_set_error(F_parameter);
}
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_line);
fl_color_print(data->error.to.stream, data->context.set.error, "' parameter with the '");
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_total);
- fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol_s[0]);
status = F_status_set_error(F_parameter);
}
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_pipe);
fl_color_print(data->error.to.stream, data->context.set.error, "' parameter with the '");
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_total);
- fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol_s[0]);
status = F_status_set_error(F_parameter);
}
if (data->parameters[fss_basic_read_parameter_delimit].result == f_console_result_found) {
fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_delimit);
- fl_color_print(data->error.to.stream, data->context.set.error, "' requires a value.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' requires a value.%c", f_string_eol_s[0]);
status = F_status_set_error(F_parameter);
}
if (length == 0) {
fl_color_print(data->error.to.stream, data->context.set.error, "%sThe value for the parameter '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_delimit);
- fl_color_print(data->error.to.stream, data->context.set.error, "' must not be empty.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' must not be empty.%c", f_string_eol_s[0]);
status = F_status_set_error(F_parameter);
}
f_macro_fss_delimits_t_delete_simple(delimits);
if (data->parameters[fss_basic_read_parameter_total].result == f_console_result_found) {
- fprintf(data->output.stream, "0%c", f_string_eol[0]);
+ fprintf(data->output.stream, "0%c", f_string_eol_s[0]);
}
fss_basic_read_delete_data(data);
if (F_status_is_error_not(status) && data->parameters[fss_basic_read_parameter_select].result == f_console_result_found) {
fl_color_print(data->error.to.stream, data->context.set.error, "%sThe '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_select);
- fl_color_print(data->error.to.stream, data->context.set.error, "' parameter requires a positive number.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' parameter requires a positive number.%c", f_string_eol_s[0]);
fss_basic_read_macro_depths_t_delete_simple(depths);
status = F_status_set_error(F_parameter);
// Skip past empty files.
if (!data->quantity.total) {
if (data->parameters[fss_basic_read_parameter_total].result == f_console_result_found) {
- fprintf(data->output.stream, "0%c", f_string_eol[0]);
+ fprintf(data->output.stream, "0%c", f_string_eol_s[0]);
}
f_file_stream_close(F_true, &file);
f_macro_fss_delimits_t_delete_simple(delimits);
}
else {
- fl_color_print(data->error.to.stream, data->context.set.error, "%sYou failed to specify one or more files.%c", fll_error_print_error, f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "%sYou failed to specify one or more files.%c", fll_error_print_error, f_string_eol_s[0]);
status = F_status_set_error(F_parameter);
}
fss_basic_read_macro_depths_t_new(status, (*depths), depth_size);
if (F_status_is_error(status)) {
- fl_color_print(data.error.to.stream, data.context.set.error, "%sUnable to allocate memory.%c", fll_error_print_error, f_string_eol[0]);
+ fl_color_print(data.error.to.stream, data.context.set.error, "%sUnable to allocate memory.%c", fll_error_print_error, f_string_eol_s[0]);
return status;
}
// @todo: move error printing into common function.
if (status_code == F_memory_allocation || status_code == F_memory_reallocation) {
- fl_color_print(data.error.to.stream, data.context.set.error, "%sUnable to allocate memory.%c", fll_error_print_error, f_string_eol[0]);
+ fl_color_print(data.error.to.stream, data.context.set.error, "%sUnable to allocate memory.%c", fll_error_print_error, f_string_eol_s[0]);
}
else if (status_code == f_string_length_t_size) {
fl_color_print(data.error.to.stream, data.context.set.error, "%sUnable to process '", fll_error_print_error);
fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_trim);
- fl_color_print(data.error.to.stream, data.context.set.error, "' because the maximum buffer size was reached.%c", f_string_eol[0]);
+ fl_color_print(data.error.to.stream, data.context.set.error, "' because the maximum buffer size was reached.%c", f_string_eol_s[0]);
}
else {
f_string_t function = "fl_string_append";
fl_color_print(data.error.to.stream, data.context.set.notable, "%u", status_code);
fl_color_print(data.error.to.stream, data.context.set.error, ") has occurred while calling ");
fl_color_print(data.error.to.stream, data.context.set.notable, "%s()", function);
- fl_color_print(data.error.to.stream, data.context.set.error, ".%c", f_string_eol[0]);
+ fl_color_print(data.error.to.stream, data.context.set.error, ".%c", f_string_eol_s[0]);
}
return status;
if (!depths->array[i].value_name.used) {
fl_color_print(data.error.to.stream, data.context.set.error, "%sThe '", fll_error_print_error);
fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_name);
- fl_color_print(data.error.to.stream, data.context.set.error, "' must not be an empty string.%c", f_string_eol[0]);
+ fl_color_print(data.error.to.stream, data.context.set.error, "' must not be an empty string.%c", f_string_eol_s[0]);
return F_status_set_error(F_parameter);
}
fl_color_print(data.error.to.stream, data.context.set.notable, "%llu", depths->array[i].depth);
fl_color_print(data.error.to.stream, data.context.set.error, "' may only be specified once for the parameter '");
fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_depth);
- fl_color_print(data.error.to.stream, data.context.set.error, "'.%c", f_string_eol[0]);
+ fl_color_print(data.error.to.stream, data.context.set.error, "'.%c", f_string_eol_s[0]);
return F_status_set_error(F_parameter);
}
fl_color_print(data.error.to.stream, data.context.set.notable, "%llu", depths->array[i].depth);
fl_color_print(data.error.to.stream, data.context.set.error, "' before the value '");
fl_color_print(data.error.to.stream, data.context.set.notable, "%llu", depths->array[j].depth);
- fl_color_print(data.error.to.stream, data.context.set.error, "'.%c", f_string_eol[0]);
+ fl_color_print(data.error.to.stream, data.context.set.error, "'.%c", f_string_eol_s[0]);
return F_status_set_error(F_parameter);
}
fl_string_dynamic_delete(&data->buffer);
if (data->parameters[fss_basic_read_parameter_total].result == f_console_result_found) {
- fprintf(data->output.stream, "0%c", f_string_eol[0]);
+ fprintf(data->output.stream, "0%c", f_string_eol_s[0]);
return F_none;
}
if (data->parameters[fss_basic_read_parameter_total].result == f_console_result_found) {
if (depths.array[0].index_at > 0) {
if (depths.array[0].value_at < data->objects.used && names[depths.array[0].value_at]) {
- fprintf(data->output.stream, "1%c", f_string_eol[0]);
+ fprintf(data->output.stream, "1%c", f_string_eol_s[0]);
}
else {
- fprintf(data->output.stream, "0%c", f_string_eol[0]);
+ fprintf(data->output.stream, "0%c", f_string_eol_s[0]);
}
}
else if (depths.array[0].index_name > 0) {
total++;
} // for
- fprintf(data->output.stream, "%llu%c", total, f_string_eol[0]);
+ fprintf(data->output.stream, "%llu%c", total, f_string_eol_s[0]);
}
else {
- fprintf(data->output.stream, "%llu%c", data->objects.used, f_string_eol[0]);
+ fprintf(data->output.stream, "%llu%c", data->objects.used, f_string_eol_s[0]);
}
return F_none;
if (depths.array[0].index_at > 0) {
if (depths.array[0].value_at >= data->objects.used) {
if (names[depths.array[0].value_at] && data->parameters[fss_basic_read_parameter_total].result == f_console_result_found) {
- fprintf(data->output.stream, "0%c", f_string_eol[0]);
+ fprintf(data->output.stream, "0%c", f_string_eol_s[0]);
}
return F_none;
if (at == depths.array[0].value_at) {
if (data->parameters[fss_basic_read_parameter_total].result == f_console_result_found) {
if (!data->contents.array[i].used) {
- fprintf(data->output.stream, "0%c", f_string_eol[0]);
+ fprintf(data->output.stream, "0%c", f_string_eol_s[0]);
}
else {
- fprintf(data->output.stream, "1%c", f_string_eol[0]);
+ fprintf(data->output.stream, "1%c", f_string_eol_s[0]);
}
}
else if (data->parameters[fss_basic_read_parameter_line].result == f_console_result_additional) {
total++;
} // for
- fprintf(data->output.stream, "%llu%c", total, f_string_eol[0]);
+ fprintf(data->output.stream, "%llu%c", total, f_string_eol_s[0]);
return F_none;
}
fll_program_print_help_option(output, context, f_console_standard_short_debug, f_console_standard_long_debug, f_console_symbol_short_disable, f_console_symbol_long_disable, " Enable debugging, inceasing verbosity beyond normal output.");
fll_program_print_help_option(output, context, f_console_standard_short_version, f_console_standard_long_version, f_console_symbol_short_disable, f_console_symbol_long_disable, " Print only the version number.");
- fprintf(output.stream, "%c", f_string_eol[0]);
+ fprintf(output.stream, "%c", f_string_eol_s[0]);
fll_program_print_help_option(output, context, fss_basic_write_short_file, fss_basic_write_long_file, f_console_symbol_short_enable, f_console_symbol_long_enable, " Specify a file to send output to.");
fll_program_print_help_option(output, context, fss_basic_write_short_content, fss_basic_write_long_content, f_console_symbol_short_enable, f_console_symbol_long_enable, "The Content to output.");
fl_color_print(output.stream, context.set.notable, "\\b");
fprintf(output.stream, "' (");
fl_color_print(output.stream, context.set.notable, "U+0008");
- fprintf(output.stream, ") to designate the start of a Content.%c", f_string_eol[0]);
+ fprintf(output.stream, ") to designate the start of a Content.%c", f_string_eol_s[0]);
fprintf(output.stream, " The pipe uses the Form Feed character '");
fl_color_print(output.stream, context.set.notable, "\\f");
fprintf(output.stream, "' (");
fl_color_print(output.stream, context.set.notable, "U+000C");
- fprintf(output.stream, ") to designate the end of the last Content.%c", f_string_eol[0]);
+ fprintf(output.stream, ") to designate the end of the last Content.%c", f_string_eol_s[0]);
fprintf(output.stream, " The pipe uses the Vertical Line character '");
fl_color_print(output.stream, context.set.notable, "\\v");
fprintf(output.stream, "' (");
fl_color_print(output.stream, context.set.notable, "U+000B");
- fprintf(output.stream, ") is used to ignore a content range, which does nothing in this program.%c", f_string_eol[0]);
+ fprintf(output.stream, ") is used to ignore a content range, which does nothing in this program.%c", f_string_eol_s[0]);
fprintf(output.stream, " For the pipe, an Object is terminated by either a Backspace character '");
fl_color_print(output.stream, context.set.notable, "\\b");
fl_color_print(output.stream, context.set.notable, "\\f");
fprintf(output.stream, "' (");
fl_color_print(output.stream, context.set.notable, "U+000C");
- fprintf(output.stream, ").%c", f_string_eol[0]);
+ fprintf(output.stream, ").%c", f_string_eol_s[0]);
- fprintf(output.stream, " The end of the pipe represents the end of any Object or Content.%c", f_string_eol[0]);
+ fprintf(output.stream, " The end of the pipe represents the end of any Object or Content.%c", f_string_eol_s[0]);
- fprintf(output.stream, "%c", f_string_eol[0]);
+ fprintf(output.stream, "%c", f_string_eol_s[0]);
fprintf(output.stream, " The FSS-0000 (Basic) specification does not support multi-line Content, therefore the parameter '");
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_write_long_prepend);
- fprintf(output.stream, "' does nothing.%c", f_string_eol[0]);
+ fprintf(output.stream, "' does nothing.%c", f_string_eol_s[0]);
- fprintf(output.stream, "%c", f_string_eol[0]);
+ fprintf(output.stream, "%c", f_string_eol_s[0]);
fprintf(output.stream, " This program does not use the parameter '");
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_write_long_ignore);
- fprintf(output.stream, "', which therefore does nothing.%c", f_string_eol[0]);
- fprintf(output.stream, " This parameter requires two values.%c", f_string_eol[0]);
+ fprintf(output.stream, "', which therefore does nothing.%c", f_string_eol_s[0]);
+ fprintf(output.stream, " This parameter requires two values.%c", f_string_eol_s[0]);
- fprintf(output.stream, "%c", f_string_eol[0]);
+ fprintf(output.stream, "%c", f_string_eol_s[0]);
return F_none;
}
status = fll_program_parameter_process(arguments, parameters, choices, F_true, &data->remaining, &data->context);
- data->error.context = data->context.set.error;
- data->error.notable = data->context.set.notable;
+ if (data->context.set.error.before) {
+ data->error.context = data->context.set.error;
+ data->error.notable = data->context.set.notable;
+ }
+ else {
+ data->context.set.warning = f_color_set_empty_s;
+ data->context.set.error = f_color_set_empty_s;
+ data->context.set.title = f_color_set_empty_s;
+ data->context.set.notable = f_color_set_empty_s;
+ data->context.set.important = f_color_set_empty_s;
+ data->context.set.standout = f_color_set_empty_s;
+ data->context.set.normal = f_color_set_empty_s;
+ data->context.set.normal_reset = f_color_set_empty_s;
+
+ data->error.context = f_color_set_empty_s;
+ data->error.notable = f_color_set_empty_s;
+ }
if (F_status_is_error(status)) {
fss_basic_write_delete_data(data);
if (data->parameters[fss_basic_write_parameter_file].result == f_console_result_additional) {
if (data->parameters[fss_basic_write_parameter_file].values.used > 1) {
if (data->error.verbosity != f_console_verbosity_quiet) {
- fprintf(data->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_write_long_file);
- fl_color_print(data->error.to.stream, data->context.set.error, "' may only be specified once.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' may only be specified once.%c", f_string_eol_s[0]);
}
status = F_status_set_error(F_parameter);
else if (data->parameters[fss_basic_write_parameter_content].locations.used && data->parameters[fss_basic_write_parameter_partial].locations.used) {
if (data->parameters[fss_basic_write_parameter_content].result == f_console_result_additional) {
if (data->error.verbosity != f_console_verbosity_quiet) {
- fprintf(data->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data->error.to.stream, data->context.set.error, "%sThe '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_write_long_partial);
fl_color_print(data->error.to.stream, data->context.set.error, "' parameter only allows either the '");
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_write_long_object);
fl_color_print(data->error.to.stream, data->context.set.error, "' parameter or the '");
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_write_long_content);
- fl_color_print(data->error.to.stream, data->context.set.error, "' parameter, but not both.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' parameter, but not both.%c", f_string_eol_s[0]);
}
status = F_status_set_error(F_parameter);
if (location_object > location_content || location_object == location_content && location_sub_object > location_sub_content) {
if (data->error.verbosity != f_console_verbosity_quiet) {
- fprintf(data->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data->error.to.stream, data->context.set.error, "%sEach ", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_write_long_object);
fl_color_print(data->error.to.stream, data->context.set.error, "' parameter must be specified before a '");
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_write_long_content);
- fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol_s[0]);
}
status = F_status_set_error(F_parameter);
}
else if (!data->process_pipe) {
if (data->error.verbosity != f_console_verbosity_quiet) {
- fprintf(data->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data->error.to.stream, data->context.set.error, "%sThis requires either piped data or the use of the '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_write_long_object);
fl_color_print(data->error.to.stream, data->context.set.error, "' parameter with the '");
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_write_long_content);
- fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol_s[0]);
}
status = F_status_set_error(F_parameter);
if (F_status_is_error_not(status) && data->process_pipe) {
if (data->parameters[fss_basic_write_parameter_partial].result == f_console_result_found) {
if (data->error.verbosity != f_console_verbosity_quiet) {
- fprintf(data->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data->error.to.stream, data->context.set.error, "%sThe '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_write_long_partial);
- fl_color_print(data->error.to.stream, data->context.set.error, "' parameter cannot be used when processing a pipe.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' parameter cannot be used when processing a pipe.%c", f_string_eol_s[0]);
}
status = F_status_set_error(F_parameter);
if (F_status_is_error_not(status)) {
if (data->parameters[fss_basic_write_parameter_prepend].result == f_console_result_found) {
if (data->error.verbosity != f_console_verbosity_quiet) {
- fprintf(data->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_write_long_prepend);
- fl_color_print(data->error.to.stream, data->context.set.error, "' was specified, but no value was given.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' was specified, but no value was given.%c", f_string_eol_s[0]);
}
status = F_status_set_error(F_parameter);
if (status == F_false) {
if (data->error.verbosity != f_console_verbosity_quiet) {
- fprintf(data->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data->error.to.stream, data->context.set.error, "%sThe value for the parameter '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_write_long_prepend);
- fl_color_print(data->error.to.stream, data->context.set.error, "' must only contain whitespace.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' must only contain whitespace.%c", f_string_eol_s[0]);
}
status = F_status_set_error(F_parameter);
}
else {
if (data->error.verbosity != f_console_verbosity_quiet) {
- fprintf(data->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data->error.to.stream, data->context.set.error, "%sThe value for the parameter '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_write_long_prepend);
- fl_color_print(data->error.to.stream, data->context.set.error, "' must not be an empty string.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' must not be an empty string.%c", f_string_eol_s[0]);
}
status = F_status_set_error(F_parameter);
if (F_status_is_error_not(status)) {
if (data->parameters[fss_basic_write_parameter_ignore].result == f_console_result_found) {
if (data->error.verbosity != f_console_verbosity_quiet) {
- fprintf(data->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_write_long_ignore);
- fl_color_print(data->error.to.stream, data->context.set.error, "' was specified, but no values were given.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' was specified, but no values were given.%c", f_string_eol_s[0]);
}
status = F_status_set_error(F_parameter);
const f_array_length_t total_arguments = data->parameters[fss_basic_write_parameter_ignore].values.used;
if (total_locations * 2 > total_arguments) {
- fprintf(data->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_write_long_ignore);
- fl_color_print(data->error.to.stream, data->context.set.error, "' requires two values.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' requires two values.%c", f_string_eol_s[0]);
status = F_status_set_error(F_parameter);
}
if (F_status_is_error(status)) {
if (data->error.verbosity != f_console_verbosity_quiet) {
- fprintf(data->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data->error.to.stream, data->context.set.error, "%sWhile processing the ", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "input pipe");
- fl_color_print(data->error.to.stream, data->context.set.error, ".%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, ".%c", f_string_eol_s[0]);
}
}
}
if (F_status_is_error(status)) {
if (data->error.verbosity != f_console_verbosity_quiet) {
- fprintf(data->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data->error.to.stream, data->context.set.error, "%sWhile processing the ", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "input arguments");
- fl_color_print(data->error.to.stream, data->context.set.error, ".%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, ".%c", f_string_eol_s[0]);
}
}
else if (data->error.verbosity != f_console_verbosity_quiet && data->parameters[fss_basic_write_parameter_file].result == f_console_result_none) {
// ensure there is always a newline at the end, unless in quiet mode.
- fprintf(data->output.stream, "%c", f_string_eol[0]);
+ fprintf(data->output.stream, "%c", f_string_eol_s[0]);
}
}
// ensure a newline is always put at the end of the program execution, unless in quiet mode.
if (data->error.verbosity != f_console_verbosity_quiet) {
if (F_status_is_error(status)) {
- fprintf(data->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data->error.to.stream, "%c", f_string_eol_s[0]);
}
}
return;
}
- fprintf(data.error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data.error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data.error.to.stream, data.context.set.error, "%sMust specify both the '", fll_error_print_error);
fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_write_long_object);
fl_color_print(data.error.to.stream, data.context.set.error, "' parameter and the '");
fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_write_long_content);
fl_color_print(data.error.to.stream, data.context.set.error, "' parameter the same number of times when not specifying the ");
fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable, fss_basic_write_long_partial);
- fl_color_print(data.error.to.stream, data.context.set.error, "' parameter.%c", f_string_eol[0]);
+ fl_color_print(data.error.to.stream, data.context.set.error, "' parameter.%c", f_string_eol_s[0]);
}
#endif // _di_fss_basic_write_error_parameter_same_times_print_
return;
}
- fprintf(data.error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data.error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data.error.to.stream, data.context.set.error, "%sThe parameter '", fll_error_print_error);
fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", symbol, parameter);
- fl_color_print(data.error.to.stream, data.context.set.error, "' was specified, but no value was given.%c", f_string_eol[0]);
+ fl_color_print(data.error.to.stream, data.context.set.error, "' was specified, but no value was given.%c", f_string_eol_s[0]);
}
#endif // _di_fss_basic_write_error_parameter_value_missing_print_
return;
}
- fprintf(data.error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data.error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data.error.to.stream, data.context.set.error, "%sThis standard does not support end of line character '", fll_error_print_error);
fl_color_print(data.error.to.stream, data.context.set.notable, "\\n");
- fl_color_print(data.error.to.stream, data.context.set.error, "'.%c", f_string_eol[0]);
+ fl_color_print(data.error.to.stream, data.context.set.error, "'.%c", f_string_eol_s[0]);
}
#endif // _di_fss_basic_write_error_parameter_unsupported_eol_print_
if (block.string[range.start] == fss_basic_write_pipe_content_start) {
if (data.error.verbosity != f_console_verbosity_quiet) {
- fprintf(data.error.to.stream, "%c", f_string_eol[0]);
- fl_color_print(data.error.to.stream, data.context.set.error, "%sThis standard only supports one content per object.%c", fll_error_print_error, f_string_eol[0]);
+ fprintf(data.error.to.stream, "%c", f_string_eol_s[0]);
+ fl_color_print(data.error.to.stream, data.context.set.error, "%sThis standard only supports one content per object.%c", fll_error_print_error, f_string_eol_s[0]);
}
status = F_status_set_error(F_supported_not);
fll_program_print_help_option(output, context, f_console_standard_short_debug, f_console_standard_long_debug, f_console_symbol_short_disable, f_console_symbol_long_disable, " Enable debugging, inceasing verbosity beyond normal output.");
fll_program_print_help_option(output, context, f_console_standard_short_version, f_console_standard_long_version, f_console_symbol_short_disable, f_console_symbol_long_disable, " Print only the version number.");
- fprintf(output.stream, "%c", f_string_eol[0]);
+ fprintf(output.stream, "%c", f_string_eol_s[0]);
fll_program_print_help_option(output, context, fss_embedded_list_read_short_at, fss_embedded_list_read_long_at, f_console_symbol_short_enable, f_console_symbol_long_enable, " Select object at this numeric index.");
fll_program_print_help_option(output, context, fss_embedded_list_read_short_content, fss_embedded_list_read_long_content, f_console_symbol_short_enable, f_console_symbol_long_enable, " Print the content (default).");
fl_color_print(output.stream, context.set.important, " Notes:");
- fprintf(output.stream, "%c", f_string_eol[0]);
+ fprintf(output.stream, "%c", f_string_eol_s[0]);
- fprintf(output.stream, " This program will print the content associated with the given object and content data based on the FSS-0002 Basic List standard.%c", f_string_eol[0]);
+ fprintf(output.stream, " This program will print the content associated with the given object and content data based on the FSS-0002 Basic List standard.%c", f_string_eol_s[0]);
- fprintf(output.stream, "%c", f_string_eol[0]);
+ fprintf(output.stream, "%c", f_string_eol_s[0]);
fprintf(output.stream, " When using the ");
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_read_long_depth);
- fprintf(output.stream, " option, an order of operations is enforced on the parameters.%c", f_string_eol[0]);
+ fprintf(output.stream, " option, an order of operations is enforced on the parameters.%c", f_string_eol_s[0]);
- fprintf(output.stream, " 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]);
+ fprintf(output.stream, " 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_s[0]);
fprintf(output.stream, " ");
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_read_long_at);
- fprintf(output.stream, ": An object index at the specified depth.%c", f_string_eol[0]);
+ fprintf(output.stream, ": An object index at the specified depth.%c", f_string_eol_s[0]);
fprintf(output.stream, " ");
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_read_long_depth);
- fprintf(output.stream, ": A new depth within the specified depth, indexed from the root.%c", f_string_eol[0]);
+ fprintf(output.stream, ": A new depth within the specified depth, indexed from the root.%c", f_string_eol_s[0]);
fprintf(output.stream, " ");
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_read_long_name);
- fprintf(output.stream, ": An object name at the specified depth.%c", f_string_eol[0]);
+ fprintf(output.stream, ": An object name at the specified depth.%c", f_string_eol_s[0]);
- fprintf(output.stream, "%c", f_string_eol[0]);
+ fprintf(output.stream, "%c", f_string_eol_s[0]);
fprintf(output.stream, " The parameter ");
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_read_long_depth);
- fprintf(output.stream, " must be in numeric order, but values in between may be skipped.%c", f_string_eol[0]);
- fprintf(output.stream, " ('-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]);
- fprintf(output.stream, " ('-d 2 -a 1 -d 0 -a 2' would be invalid because depth 2 is before depth 1.)%c", f_string_eol[0]);
+ fprintf(output.stream, " must be in numeric order, but values in between may be skipped.%c", f_string_eol_s[0]);
+ fprintf(output.stream, " ('-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_s[0]);
+ fprintf(output.stream, " ('-d 2 -a 1 -d 0 -a 2' would be invalid because depth 2 is before depth 1.)%c", f_string_eol_s[0]);
- fprintf(output.stream, "%c", f_string_eol[0]);
+ fprintf(output.stream, "%c", f_string_eol_s[0]);
fprintf(output.stream, " The parameter ");
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_read_long_select);
- fprintf(output.stream, " selects a content index at a given depth.%c", f_string_eol[0]);
- fprintf(output.stream, " (This parameter is not synonymous with the depth parameter and does not relate to nested content).%c", f_string_eol[0]);
+ fprintf(output.stream, " selects a content index at a given depth.%c", f_string_eol_s[0]);
+ fprintf(output.stream, " (This parameter is not synonymous with the depth parameter and does not relate to nested content).%c", f_string_eol_s[0]);
- fprintf(output.stream, "%c", f_string_eol[0]);
+ fprintf(output.stream, "%c", f_string_eol_s[0]);
fprintf(output.stream, " Specify both ");
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_read_long_object);
fprintf(output.stream, " and the ");
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_read_long_total);
- fprintf(output.stream, " parameters to get the total objects.%c", f_string_eol[0]);
+ fprintf(output.stream, " parameters to get the total objects.%c", f_string_eol_s[0]);
- fprintf(output.stream, "%c", f_string_eol[0]);
+ fprintf(output.stream, "%c", f_string_eol_s[0]);
fprintf(output.stream, " When both ");
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_read_long_at);
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_read_long_at);
fprintf(output.stream, " parameter value will be treated as a position relative to the specified ");
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_read_long_name);
- fprintf(output.stream, " parameter value.%c", f_string_eol[0]);
+ fprintf(output.stream, " parameter value.%c", f_string_eol_s[0]);
- fprintf(output.stream, "%c", f_string_eol[0]);
+ fprintf(output.stream, "%c", f_string_eol_s[0]);
fprintf(output.stream, " This program may support parameters, such as ");
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_read_long_depth);
fprintf(output.stream, " or ");
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_read_long_select);
- fprintf(output.stream, ", even if not supported by the standard.%c", f_string_eol[0]);
- fprintf(output.stream, " This is done to help ensure consistency for scripting.%c", f_string_eol[0]);
+ fprintf(output.stream, ", even if not supported by the standard.%c", f_string_eol_s[0]);
+ fprintf(output.stream, " This is done to help ensure consistency for scripting.%c", f_string_eol_s[0]);
- fprintf(output.stream, "%c", f_string_eol[0]);
+ fprintf(output.stream, "%c", f_string_eol_s[0]);
fprintf(output.stream, " For parameters like ");
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_read_long_depth);
- fprintf(output.stream, ", if the standard doesn't support nested content, then only a depth of 0 would be valid.%c", f_string_eol[0]);
+ fprintf(output.stream, ", if the standard doesn't support nested content, then only a depth of 0 would be valid.%c", f_string_eol_s[0]);
fprintf(output.stream, " For parameters like ");
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_read_long_select);
- fprintf(output.stream, ", if the standard doesn't support multiple content groups, then only a select of 0 would be valid.%c", f_string_eol[0]);
+ fprintf(output.stream, ", if the standard doesn't support multiple content groups, then only a select of 0 would be valid.%c", f_string_eol_s[0]);
- fprintf(output.stream, "%c", f_string_eol[0]);
+ fprintf(output.stream, "%c", f_string_eol_s[0]);
fprintf(output.stream, " The parameter ");
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_read_long_trim);
- fprintf(output.stream, " will remove leading and trailing whitespaces when selecting objects or when printing objects.%c", f_string_eol[0]);
+ fprintf(output.stream, " will remove leading and trailing whitespaces when selecting objects or when printing objects.%c", f_string_eol_s[0]);
- fprintf(output.stream, "%c", f_string_eol[0]);
+ fprintf(output.stream, "%c", f_string_eol_s[0]);
fprintf(output.stream, " When specifying both the ");
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_read_long_object);
fprintf(output.stream, " parameter and the ");
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_read_long_content);
- fprintf(output.stream, " parameter, the entire object and content are printed, including the formatting.%c", f_string_eol[0]);
- fprintf(output.stream, " Both the object and content printed are already escaped.%c", f_string_eol[0]);
- fprintf(output.stream, " Both the object and content are separated by an EOL.%c", f_string_eol[0]);
+ fprintf(output.stream, " parameter, the entire object and content are printed, including the formatting.%c", f_string_eol_s[0]);
+ fprintf(output.stream, " Both the object and content printed are already escaped.%c", f_string_eol_s[0]);
+ fprintf(output.stream, " Both the object and content are separated by an EOL.%c", f_string_eol_s[0]);
- fprintf(output.stream, "%c", f_string_eol[0]);
+ fprintf(output.stream, "%c", f_string_eol_s[0]);
fprintf(output.stream, " The parameter ");
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_read_long_delimit);
- fprintf(output.stream, " accepts the following:%c", f_string_eol[0]);
+ fprintf(output.stream, " accepts the following:%c", f_string_eol_s[0]);
fprintf(output.stream, " - ");
fl_color_print(output.stream, context.set.notable, "%s", fss_embedded_list_read_delimit_mode_name_none);
- fprintf(output.stream, ": Do not apply delimits.%c", f_string_eol[0]);
+ fprintf(output.stream, ": Do not apply delimits.%c", f_string_eol_s[0]);
fprintf(output.stream, " - ");
fl_color_print(output.stream, context.set.notable, "%s", fss_embedded_list_read_delimit_mode_name_all);
- fprintf(output.stream, ": (default) apply all delimits.%c", f_string_eol[0]);
- fprintf(output.stream, " - a number, 0 or greater: apply delimits for the specified depth.%c", f_string_eol[0]);
+ fprintf(output.stream, ": (default) apply all delimits.%c", f_string_eol_s[0]);
+ fprintf(output.stream, " - a number, 0 or greater: apply delimits for the specified depth.%c", f_string_eol_s[0]);
fprintf(output.stream, " - a number, 0 or greater, followed by a ");
fl_color_print(output.stream, context.set.notable, "%s", fss_embedded_list_read_delimit_mode_name_greater);
- fprintf(output.stream, ": (such as '1+') apply delimits for the specified depth and any greater depth (numerically).%c", f_string_eol[0]);
+ fprintf(output.stream, ": (such as '1+') apply delimits for the specified depth and any greater depth (numerically).%c", f_string_eol_s[0]);
fprintf(output.stream, " - a number, 0 or greater, followed by a ");
fl_color_print(output.stream, context.set.notable, "%s", fss_embedded_list_read_delimit_mode_name_lesser);
- fprintf(output.stream, ": (such as '1-') apply delimits for the specified depth and any lesser depth (numerically).%c", f_string_eol[0]);
+ fprintf(output.stream, ": (such as '1-') apply delimits for the specified depth and any lesser depth (numerically).%c", f_string_eol_s[0]);
- fprintf(output.stream, "%c", f_string_eol[0]);
+ fprintf(output.stream, "%c", f_string_eol_s[0]);
return F_none;
}
status = fll_program_parameter_process(arguments, parameters, choices, F_true, &data->remaining, &data->context);
- data->error.context = data->context.set.error;
- data->error.notable = data->context.set.notable;
+ if (data->context.set.error.before) {
+ data->error.context = data->context.set.error;
+ data->error.notable = data->context.set.notable;
+ }
+ else {
+ data->context.set.warning = f_color_set_empty_s;
+ data->context.set.error = f_color_set_empty_s;
+ data->context.set.title = f_color_set_empty_s;
+ data->context.set.notable = f_color_set_empty_s;
+ data->context.set.important = f_color_set_empty_s;
+ data->context.set.standout = f_color_set_empty_s;
+ data->context.set.normal = f_color_set_empty_s;
+ data->context.set.normal_reset = f_color_set_empty_s;
+
+ data->error.context = f_color_set_empty_s;
+ data->error.notable = f_color_set_empty_s;
+ }
if (F_status_is_error(status)) {
fss_embedded_list_read_delete_data(data);
if (data->parameters[fss_embedded_list_read_parameter_at].result == f_console_result_found) {
fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_read_long_at);
- fl_color_print(data->error.to.stream, data->context.set.error, "' requires a positive number.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' requires a positive number.%c", f_string_eol_s[0]);
status = F_status_set_error(F_parameter);
}
if (F_status_is_error_not(status) && data->parameters[fss_embedded_list_read_parameter_depth].result == f_console_result_found) {
fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_read_long_depth);
- fl_color_print(data->error.to.stream, data->context.set.error, "' requires a positive number.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' requires a positive number.%c", f_string_eol_s[0]);
status = F_status_set_error(F_parameter);
}
if (F_status_is_error_not(status) && data->parameters[fss_embedded_list_read_parameter_line].result == f_console_result_found) {
fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_read_long_line);
- fl_color_print(data->error.to.stream, data->context.set.error, "' requires a positive number.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' requires a positive number.%c", f_string_eol_s[0]);
status = F_status_set_error(F_parameter);
}
if (F_status_is_error_not(status) && data->parameters[fss_embedded_list_read_parameter_name].result == f_console_result_found) {
fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_read_long_name);
- fl_color_print(data->error.to.stream, data->context.set.error, "' requires a string.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' requires a string.%c", f_string_eol_s[0]);
status = F_status_set_error(F_parameter);
}
if (F_status_is_error_not(status) && data->parameters[fss_embedded_list_read_parameter_select].result == f_console_result_found) {
fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_read_long_select);
- fl_color_print(data->error.to.stream, data->context.set.error, "' requires a positive number.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' requires a positive number.%c", f_string_eol_s[0]);
status = F_status_set_error(F_parameter);
}
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_read_long_object);
fl_color_print(data->error.to.stream, data->context.set.error, "' parameter with the '");
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_read_long_line);
- fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol_s[0]);
status = F_status_set_error(F_parameter);
}
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_read_long_object);
fl_color_print(data->error.to.stream, data->context.set.error, "' parameter with the '");
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_read_long_select);
- fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol_s[0]);
status = F_status_set_error(F_parameter);
}
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_read_long_content);
fl_color_print(data->error.to.stream, data->context.set.error, "' parameter with the '");
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_read_long_total);
- fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol_s[0]);
status = F_status_set_error(F_parameter);
}
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_read_long_line);
fl_color_print(data->error.to.stream, data->context.set.error, "' parameter with the '");
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_read_long_total);
- fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol_s[0]);
status = F_status_set_error(F_parameter);
}
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_read_long_pipe);
fl_color_print(data->error.to.stream, data->context.set.error, "' parameter with the '");
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_read_long_total);
- fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol_s[0]);
status = F_status_set_error(F_parameter);
}
if (data->parameters[fss_embedded_list_read_parameter_delimit].result == f_console_result_found) {
fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_read_long_delimit);
- fl_color_print(data->error.to.stream, data->context.set.error, "' requires a value.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' requires a value.%c", f_string_eol_s[0]);
status = F_status_set_error(F_parameter);
}
if (length == 0) {
fl_color_print(data->error.to.stream, data->context.set.error, "%sThe value for the parameter '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_read_long_delimit);
- fl_color_print(data->error.to.stream, data->context.set.error, "' must not be empty.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' must not be empty.%c", f_string_eol_s[0]);
status = F_status_set_error(F_parameter);
}
if (F_status_is_error_not(status) && data->parameters[fss_embedded_list_read_parameter_select].result == f_console_result_found) {
fl_color_print(data->error.to.stream, data->context.set.error, "%sThe '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_read_long_select);
- fl_color_print(data->error.to.stream, data->context.set.error, "' parameter requires a positive number.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' parameter requires a positive number.%c", f_string_eol_s[0]);
status = F_status_set_error(F_parameter);
}
// Skip past empty files.
if (!data->quantity.total) {
if (data->parameters[fss_embedded_list_read_parameter_total].result == f_console_result_found) {
- fprintf(data->output.stream, "0%c", f_string_eol[0]);
+ fprintf(data->output.stream, "0%c", f_string_eol_s[0]);
}
f_file_stream_close(F_true, &file);
f_macro_fss_comments_t_delete_simple(comments);
}
else {
- fl_color_print(data->error.to.stream, data->context.set.error, "%sYou failed to specify one or more files.%c", fll_error_print_error, f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "%sYou failed to specify one or more files.%c", fll_error_print_error, f_string_eol_s[0]);
status = F_status_set_error(F_parameter);
}
for (j = i + 1; j < depths->used; j++) {
if (depths->array[i].depth == depths->array[j].depth) {
- fprintf(data.error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data.error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data.error.to.stream, data.context.set.error, "%sThe value '", fll_error_print_error);
fl_color_print(data.error.to.stream, data.context.set.notable, "%llu", depths->array[i].depth);
fl_color_print(data.error.to.stream, data.context.set.error, "' may only be specified once for the parameter '");
fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_read_long_depth);
- fl_color_print(data.error.to.stream, data.context.set.error, "'.%c", f_string_eol[0]);
+ fl_color_print(data.error.to.stream, data.context.set.error, "'.%c", f_string_eol_s[0]);
return F_status_set_error(F_parameter);
}
else if (depths->array[i].depth > depths->array[j].depth) {
- fprintf(data.error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data.error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data.error.to.stream, data.context.set.error, "%sThe parameter '", fll_error_print_error);
fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_read_long_depth);
fl_color_print(data.error.to.stream, data.context.set.error, "' may not have the value '");
fl_color_print(data.error.to.stream, data.context.set.notable, "%llu", depths->array[i].depth);
fl_color_print(data.error.to.stream, data.context.set.error, "' before the value '");
fl_color_print(data.error.to.stream, data.context.set.notable, "%llu", depths->array[j].depth);
- fl_color_print(data.error.to.stream, data.context.set.error, "'.%c", f_string_eol[0]);
+ fl_color_print(data.error.to.stream, data.context.set.error, "'.%c", f_string_eol_s[0]);
return F_status_set_error(F_parameter);
}
fl_string_dynamic_delete(&data->buffer);
if (data->parameters[fss_embedded_list_read_parameter_total].result == f_console_result_found) {
- fprintf(data->output.stream, "0%c", f_string_eol[0]);
+ fprintf(data->output.stream, "0%c", f_string_eol_s[0]);
return F_none;
}
// Requested depths cannot be greater than contents depth.
if (depths.used > data->nest.used) {
if (data->parameters[fss_embedded_list_read_parameter_total].result == f_console_result_found) {
- fprintf(data->output.stream, "0%c", f_string_eol[0]);
+ fprintf(data->output.stream, "0%c", f_string_eol_s[0]);
return F_none;
}
total++;
} // for
- fprintf(data->output.stream, "%llu%c", total, f_string_eol[0]);
+ fprintf(data->output.stream, "%llu%c", total, f_string_eol_s[0]);
return F_none;
}
if (!data->buffer.string[j]) continue;
- if (data->buffer.string[j] == f_string_eol[0]) {
+ if (data->buffer.string[j] == f_string_eol_s[0]) {
total++;
}
} // for
} // for
- fprintf(data->output.stream, "%llu%c", total, f_string_eol[0]);
+ fprintf(data->output.stream, "%llu%c", total, f_string_eol_s[0]);
return F_none;
}
if (line_current != line) {
for (; j <= items->array[i].content.array[0].stop; ++j) {
- if (data->buffer.string[j] == f_string_eol[0]) {
+ if (data->buffer.string[j] == f_string_eol_s[0]) {
line_current++;
if (line_current == line) {
if (!data->buffer.string[j]) continue;
- if (data->buffer.string[j] == f_string_eol[0]) {
- fprintf(data->output.stream, "%c", f_string_eol[0]);
+ if (data->buffer.string[j] == f_string_eol_s[0]) {
+ fprintf(data->output.stream, "%c", f_string_eol_s[0]);
break;
}
fll_program_print_help_option(output, context, f_console_standard_short_debug, f_console_standard_long_debug, f_console_symbol_short_disable, f_console_symbol_long_disable, " Enable debugging, inceasing verbosity beyond normal output.");
fll_program_print_help_option(output, context, f_console_standard_short_version, f_console_standard_long_version, f_console_symbol_short_disable, f_console_symbol_long_disable, " Print only the version number.");
- fprintf(output.stream, "%c", f_string_eol[0]);
+ fprintf(output.stream, "%c", f_string_eol_s[0]);
fll_program_print_help_option(output, context, fss_embedded_list_write_short_file, fss_embedded_list_write_long_file, f_console_symbol_short_enable, f_console_symbol_long_enable, " Specify a file to send output to.");
fll_program_print_help_option(output, context, fss_embedded_list_write_short_content, fss_embedded_list_write_long_content, f_console_symbol_short_enable, f_console_symbol_long_enable, "The Content to output.");
fl_color_print(output.stream, context.set.notable, "\\b");
fprintf(output.stream, "' (");
fl_color_print(output.stream, context.set.notable, "U+0008");
- fprintf(output.stream, ") to designate the start of a Content.%c", f_string_eol[0]);
+ fprintf(output.stream, ") to designate the start of a Content.%c", f_string_eol_s[0]);
fprintf(output.stream, " The pipe uses the Form Feed character '");
fl_color_print(output.stream, context.set.notable, "\\f");
fprintf(output.stream, "' (");
fl_color_print(output.stream, context.set.notable, "U+000C");
- fprintf(output.stream, ") to designate the end of the last Content.%c", f_string_eol[0]);
+ fprintf(output.stream, ") to designate the end of the last Content.%c", f_string_eol_s[0]);
fprintf(output.stream, " The pipe uses the Vertical Line character '");
fl_color_print(output.stream, context.set.notable, "\\v");
fprintf(output.stream, "' (");
fl_color_print(output.stream, context.set.notable, "U+000B");
- fprintf(output.stream, ") is used to ignore a content range (use this both before and after the range).%c", f_string_eol[0]);
+ fprintf(output.stream, ") is used to ignore a content range (use this both before and after the range).%c", f_string_eol_s[0]);
fprintf(output.stream, " For the pipe, an Object is terminated by either a Backspace character '");
fl_color_print(output.stream, context.set.notable, "\\b");
fl_color_print(output.stream, context.set.notable, "\\f");
fprintf(output.stream, "' (");
fl_color_print(output.stream, context.set.notable, "U+000C");
- fprintf(output.stream, ").%c", f_string_eol[0]);
+ fprintf(output.stream, ").%c", f_string_eol_s[0]);
- fprintf(output.stream, " The end of the pipe represents the end of any Object or Content.%c", f_string_eol[0]);
+ fprintf(output.stream, " The end of the pipe represents the end of any Object or Content.%c", f_string_eol_s[0]);
- fprintf(output.stream, "%c", f_string_eol[0]);
+ fprintf(output.stream, "%c", f_string_eol_s[0]);
fprintf(output.stream, " The FSS-0008 (Embedded List) specification does not support quoted names, therefore the parameters '");
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_write_long_single);
fprintf(output.stream, "' and '");
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_write_long_double);
- fprintf(output.stream, "' do nothing.%c", f_string_eol[0]);
+ fprintf(output.stream, "' do nothing.%c", f_string_eol_s[0]);
- fprintf(output.stream, "%c", f_string_eol[0]);
+ fprintf(output.stream, "%c", f_string_eol_s[0]);
fprintf(output.stream, " The parameter '");
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_write_long_ignore);
- fprintf(output.stream, "' designates to not escape any valid nested Object or Content within some Content.%c", f_string_eol[0]);
- fprintf(output.stream, " This parameter requires two values.%c", f_string_eol[0]);
- fprintf(output.stream, " This parameter is not used for ignoring anything from the input pipe.%c", f_string_eol[0]);
+ fprintf(output.stream, "' designates to not escape any valid nested Object or Content within some Content.%c", f_string_eol_s[0]);
+ fprintf(output.stream, " This parameter requires two values.%c", f_string_eol_s[0]);
+ fprintf(output.stream, " This parameter is not used for ignoring anything from the input pipe.%c", f_string_eol_s[0]);
fprintf(output.stream, " This parameter must be specified after a '");
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_write_long_content);
fprintf(output.stream, "' parameter and this applies only to the Content represented by that specific '");
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_write_long_content);
- fprintf(output.stream, "' parameter.%c", f_string_eol[0]);
+ fprintf(output.stream, "' parameter.%c", f_string_eol_s[0]);
- fprintf(output.stream, "%c", f_string_eol[0]);
+ fprintf(output.stream, "%c", f_string_eol_s[0]);
return F_none;
}
status = fll_program_parameter_process(arguments, parameters, choices, F_true, &data->remaining, &data->context);
- data->error.context = data->context.set.error;
- data->error.notable = data->context.set.notable;
+ if (data->context.set.error.before) {
+ data->error.context = data->context.set.error;
+ data->error.notable = data->context.set.notable;
+ }
+ else {
+ data->context.set.warning = f_color_set_empty_s;
+ data->context.set.error = f_color_set_empty_s;
+ data->context.set.title = f_color_set_empty_s;
+ data->context.set.notable = f_color_set_empty_s;
+ data->context.set.important = f_color_set_empty_s;
+ data->context.set.standout = f_color_set_empty_s;
+ data->context.set.normal = f_color_set_empty_s;
+ data->context.set.normal_reset = f_color_set_empty_s;
+
+ data->error.context = f_color_set_empty_s;
+ data->error.notable = f_color_set_empty_s;
+ }
if (F_status_is_error(status)) {
fss_embedded_list_write_delete_data(data);
if (data->parameters[fss_embedded_list_write_parameter_file].result == f_console_result_additional) {
if (data->parameters[fss_embedded_list_write_parameter_file].values.used > 1) {
if (data->error.verbosity != f_console_verbosity_quiet) {
- fprintf(data->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_write_long_file);
- fl_color_print(data->error.to.stream, data->context.set.error, "' may only be specified once.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' may only be specified once.%c", f_string_eol_s[0]);
}
status = F_status_set_error(F_parameter);
else if (data->parameters[fss_embedded_list_write_parameter_content].locations.used && data->parameters[fss_embedded_list_write_parameter_partial].locations.used) {
if (data->parameters[fss_embedded_list_write_parameter_content].result == f_console_result_additional) {
if (data->error.verbosity != f_console_verbosity_quiet) {
- fprintf(data->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data->error.to.stream, data->context.set.error, "%sThe '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_write_long_partial);
fl_color_print(data->error.to.stream, data->context.set.error, "' parameter only allows either the '");
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_write_long_object);
fl_color_print(data->error.to.stream, data->context.set.error, "' parameter or the '");
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_write_long_content);
- fl_color_print(data->error.to.stream, data->context.set.error, "' parameter, but not both.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' parameter, but not both.%c", f_string_eol_s[0]);
}
status = F_status_set_error(F_parameter);
if (location_object > location_content || location_object == location_content && location_sub_object > location_sub_content) {
if (data->error.verbosity != f_console_verbosity_quiet) {
- fprintf(data->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data->error.to.stream, data->context.set.error, "%sEach ", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_write_long_object);
fl_color_print(data->error.to.stream, data->context.set.error, "' parameter must be specified before a '");
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_write_long_content);
- fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol_s[0]);
}
status = F_status_set_error(F_parameter);
}
else if (!data->process_pipe) {
if (data->error.verbosity != f_console_verbosity_quiet) {
- fprintf(data->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data->error.to.stream, data->context.set.error, "%sThis requires either piped data or the use of the '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_write_long_object);
fl_color_print(data->error.to.stream, data->context.set.error, "' parameter with the '");
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_write_long_content);
- fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol_s[0]);
}
status = F_status_set_error(F_parameter);
if (F_status_is_error_not(status) && data->process_pipe) {
if (data->parameters[fss_embedded_list_write_parameter_partial].result == f_console_result_found) {
if (data->error.verbosity != f_console_verbosity_quiet) {
- fprintf(data->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data->error.to.stream, data->context.set.error, "%sThe '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_write_long_partial);
- fl_color_print(data->error.to.stream, data->context.set.error, "' parameter cannot be used when processing a pipe.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' parameter cannot be used when processing a pipe.%c", f_string_eol_s[0]);
}
status = F_status_set_error(F_parameter);
if (F_status_is_error_not(status)) {
if (data->parameters[fss_embedded_list_write_parameter_prepend].result == f_console_result_found) {
if (data->error.verbosity != f_console_verbosity_quiet) {
- fprintf(data->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_write_long_prepend);
- fl_color_print(data->error.to.stream, data->context.set.error, "' was specified, but no value was given.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' was specified, but no value was given.%c", f_string_eol_s[0]);
}
status = F_status_set_error(F_parameter);
if (status == F_false) {
if (data->error.verbosity != f_console_verbosity_quiet) {
- fprintf(data->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data->error.to.stream, data->context.set.error, "%sThe value for the parameter '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_write_long_prepend);
- fl_color_print(data->error.to.stream, data->context.set.error, "' must only contain whitespace.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' must only contain whitespace.%c", f_string_eol_s[0]);
}
status = F_status_set_error(F_parameter);
}
else {
if (data->error.verbosity != f_console_verbosity_quiet) {
- fprintf(data->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data->error.to.stream, data->context.set.error, "%sThe value for the parameter '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_write_long_prepend);
- fl_color_print(data->error.to.stream, data->context.set.error, "' must not be an empty string.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' must not be an empty string.%c", f_string_eol_s[0]);
}
status = F_status_set_error(F_parameter);
if (F_status_is_error_not(status)) {
if (data->parameters[fss_embedded_list_write_parameter_ignore].result == f_console_result_found) {
if (data->error.verbosity != f_console_verbosity_quiet) {
- fprintf(data->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_write_long_ignore);
- fl_color_print(data->error.to.stream, data->context.set.error, "' was specified, but no values were given.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' was specified, but no values were given.%c", f_string_eol_s[0]);
}
status = F_status_set_error(F_parameter);
const f_array_length_t total_arguments = data->parameters[fss_embedded_list_write_parameter_ignore].values.used;
if (total_locations * 2 > total_arguments) {
- fprintf(data->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_write_long_ignore);
- fl_color_print(data->error.to.stream, data->context.set.error, "' requires two values.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' requires two values.%c", f_string_eol_s[0]);
status = F_status_set_error(F_parameter);
}
if (F_status_is_error(status)) {
if (data->error.verbosity != f_console_verbosity_quiet) {
- fprintf(data->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data->error.to.stream, data->context.set.error, "%sWhile processing the ", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "input pipe");
- fl_color_print(data->error.to.stream, data->context.set.error, ".%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, ".%c", f_string_eol_s[0]);
}
}
if (F_status_is_error(status)) {
if (data->error.verbosity != f_console_verbosity_quiet) {
- fprintf(data->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data->error.to.stream, data->context.set.error, "%sWhile processing the ", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "input arguments");
- fl_color_print(data->error.to.stream, data->context.set.error, ".%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, ".%c", f_string_eol_s[0]);
}
}
else if (data->error.verbosity != f_console_verbosity_quiet && data->parameters[fss_embedded_list_write_parameter_file].result == f_console_result_none) {
// ensure there is always a newline at the end, unless in quiet mode.
- fprintf(data->output.stream, "%c", f_string_eol[0]);
+ fprintf(data->output.stream, "%c", f_string_eol_s[0]);
}
}
// ensure a newline is always put at the end of the program execution, unless in quiet mode.
if (data->error.verbosity != f_console_verbosity_quiet) {
if (F_status_is_error(status)) {
- fprintf(data->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data->error.to.stream, "%c", f_string_eol_s[0]);
}
}
return;
}
- fprintf(data.error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data.error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data.error.to.stream, data.context.set.error, "%sMust specify both the '", fll_error_print_error);
fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_write_long_object);
fl_color_print(data.error.to.stream, data.context.set.error, "' parameter and the '");
fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_write_long_content);
fl_color_print(data.error.to.stream, data.context.set.error, "' parameter the same number of times when not specifying the ");
fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable, fss_embedded_list_write_long_partial);
- fl_color_print(data.error.to.stream, data.context.set.error, "' parameter.%c", f_string_eol[0]);
+ fl_color_print(data.error.to.stream, data.context.set.error, "' parameter.%c", f_string_eol_s[0]);
}
#endif // _di_fss_embedded_list_write_error_parameter_same_times_print_
return;
}
- fprintf(data.error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data.error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data.error.to.stream, data.context.set.error, "%sThis standard does not support end of line character '", fll_error_print_error);
fl_color_print(data.error.to.stream, data.context.set.notable, "\\n");
- fl_color_print(data.error.to.stream, data.context.set.error, "' in objects.%c", f_string_eol[0]);
+ fl_color_print(data.error.to.stream, data.context.set.error, "' in objects.%c", f_string_eol_s[0]);
}
#endif // _di_fss_embedded_list_write_error_parameter_unsupported_eol_print_
return;
}
- fprintf(data.error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data.error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data.error.to.stream, data.context.set.error, "%sThe parameter '", fll_error_print_error);
fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", symbol, parameter);
- fl_color_print(data.error.to.stream, data.context.set.error, "' was specified, but no value was given.%c", f_string_eol[0]);
+ fl_color_print(data.error.to.stream, data.context.set.error, "' was specified, but no value was given.%c", f_string_eol_s[0]);
}
#endif // _di_fss_embedded_list_write_error_parameter_value_missing_print_
if (block.string[range.start] == fss_embedded_list_write_pipe_content_start) {
if (data.error.verbosity != f_console_verbosity_quiet) {
- fprintf(data.error.to.stream, "%c", f_string_eol[0]);
- fl_color_print(data.error.to.stream, data.context.set.error, "%sThis standard only supports one content per object.%c", fll_error_print_error, f_string_eol[0]);
+ fprintf(data.error.to.stream, "%c", f_string_eol_s[0]);
+ fl_color_print(data.error.to.stream, data.context.set.error, "%sThis standard only supports one content per object.%c", fll_error_print_error, f_string_eol_s[0]);
}
status = F_status_set_error(F_supported_not);
fll_program_print_help_option(output, context, f_console_standard_short_debug, f_console_standard_long_debug, f_console_symbol_short_disable, f_console_symbol_long_disable, " Enable debugging, inceasing verbosity beyond normal output.");
fll_program_print_help_option(output, context, f_console_standard_short_version, f_console_standard_long_version, f_console_symbol_short_disable, f_console_symbol_long_disable, " Print only the version number.");
- fprintf(output.stream, "%c", f_string_eol[0]);
+ fprintf(output.stream, "%c", f_string_eol_s[0]);
fll_program_print_help_option(output, context, fss_extended_list_read_short_at, fss_extended_list_read_long_at, f_console_symbol_short_enable, f_console_symbol_long_enable, " Select object at this numeric index.");
fll_program_print_help_option(output, context, fss_extended_list_read_short_content, fss_extended_list_read_long_content, f_console_symbol_short_enable, f_console_symbol_long_enable, " Print the content (default).");
fl_color_print(output.stream, context.set.important, " Notes:");
- fprintf(output.stream, "%c", f_string_eol[0]);
+ fprintf(output.stream, "%c", f_string_eol_s[0]);
- fprintf(output.stream, " This program will print the content associated with the given object and content data based on the FSS-0003 Extended List standard.%c", f_string_eol[0]);
+ fprintf(output.stream, " This program will print the content associated with the given object and content data based on the FSS-0003 Extended List standard.%c", f_string_eol_s[0]);
- fprintf(output.stream, "%c", f_string_eol[0]);
+ fprintf(output.stream, "%c", f_string_eol_s[0]);
fprintf(output.stream, " When using the ");
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_depth);
- fprintf(output.stream, " option, an order of operations is enforced on the parameters.%c", f_string_eol[0]);
+ fprintf(output.stream, " option, an order of operations is enforced on the parameters.%c", f_string_eol_s[0]);
- fprintf(output.stream, " 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]);
+ fprintf(output.stream, " 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_s[0]);
fprintf(output.stream, " ");
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_at);
- fprintf(output.stream, ": An object index at the specified depth.%c", f_string_eol[0]);
+ fprintf(output.stream, ": An object index at the specified depth.%c", f_string_eol_s[0]);
fprintf(output.stream, " ");
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_depth);
- fprintf(output.stream, ": A new depth within the specified depth, indexed from the root.%c", f_string_eol[0]);
+ fprintf(output.stream, ": A new depth within the specified depth, indexed from the root.%c", f_string_eol_s[0]);
fprintf(output.stream, " ");
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_name);
- fprintf(output.stream, ": An object name at the specified depth.%c", f_string_eol[0]);
+ fprintf(output.stream, ": An object name at the specified depth.%c", f_string_eol_s[0]);
- fprintf(output.stream, "%c", f_string_eol[0]);
+ fprintf(output.stream, "%c", f_string_eol_s[0]);
fprintf(output.stream, " The parameter ");
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_depth);
- fprintf(output.stream, " must be in numeric order, but values in between may be skipped.%c", f_string_eol[0]);
- fprintf(output.stream, " ('-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]);
- fprintf(output.stream, " ('-d 2 -a 1 -d 0 -a 2' would be invalid because depth 2 is before depth 1.)%c", f_string_eol[0]);
+ fprintf(output.stream, " must be in numeric order, but values in between may be skipped.%c", f_string_eol_s[0]);
+ fprintf(output.stream, " ('-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_s[0]);
+ fprintf(output.stream, " ('-d 2 -a 1 -d 0 -a 2' would be invalid because depth 2 is before depth 1.)%c", f_string_eol_s[0]);
- fprintf(output.stream, "%c", f_string_eol[0]);
+ fprintf(output.stream, "%c", f_string_eol_s[0]);
fprintf(output.stream, " The parameter ");
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_select);
- fprintf(output.stream, " selects a content index at a given depth.%c", f_string_eol[0]);
- fprintf(output.stream, " (This parameter is not synonymous with the depth parameter and does not relate to nested content).%c", f_string_eol[0]);
+ fprintf(output.stream, " selects a content index at a given depth.%c", f_string_eol_s[0]);
+ fprintf(output.stream, " (This parameter is not synonymous with the depth parameter and does not relate to nested content).%c", f_string_eol_s[0]);
- fprintf(output.stream, "%c", f_string_eol[0]);
+ fprintf(output.stream, "%c", f_string_eol_s[0]);
fprintf(output.stream, " Specify both ");
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_object);
fprintf(output.stream, " and the ");
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_total);
- fprintf(output.stream, " parameters to get the total objects.%c", f_string_eol[0]);
+ fprintf(output.stream, " parameters to get the total objects.%c", f_string_eol_s[0]);
- fprintf(output.stream, "%c", f_string_eol[0]);
+ fprintf(output.stream, "%c", f_string_eol_s[0]);
fprintf(output.stream, " When both ");
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_at);
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_at);
fprintf(output.stream, " parameter value will be treated as a position relative to the specified ");
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_name);
- fprintf(output.stream, " parameter value.%c", f_string_eol[0]);
+ fprintf(output.stream, " parameter value.%c", f_string_eol_s[0]);
- fprintf(output.stream, "%c", f_string_eol[0]);
+ fprintf(output.stream, "%c", f_string_eol_s[0]);
fprintf(output.stream, " This program may support parameters, such as ");
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_depth);
fprintf(output.stream, " or ");
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_select);
- fprintf(output.stream, ", even if not supported by the standard.%c", f_string_eol[0]);
- fprintf(output.stream, " This is done to help ensure consistency for scripting.%c", f_string_eol[0]);
+ fprintf(output.stream, ", even if not supported by the standard.%c", f_string_eol_s[0]);
+ fprintf(output.stream, " This is done to help ensure consistency for scripting.%c", f_string_eol_s[0]);
- fprintf(output.stream, "%c", f_string_eol[0]);
+ fprintf(output.stream, "%c", f_string_eol_s[0]);
fprintf(output.stream, " For parameters like ");
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_depth);
- fprintf(output.stream, ", if the standard doesn't support nested content, then only a depth of 0 would be valid.%c", f_string_eol[0]);
+ fprintf(output.stream, ", if the standard doesn't support nested content, then only a depth of 0 would be valid.%c", f_string_eol_s[0]);
fprintf(output.stream, " For parameters like ");
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_select);
- fprintf(output.stream, ", if the standard doesn't support multiple content groups, then only a select of 0 would be valid.%c", f_string_eol[0]);
+ fprintf(output.stream, ", if the standard doesn't support multiple content groups, then only a select of 0 would be valid.%c", f_string_eol_s[0]);
- fprintf(output.stream, "%c", f_string_eol[0]);
+ fprintf(output.stream, "%c", f_string_eol_s[0]);
fprintf(output.stream, " The parameter ");
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_trim);
- fprintf(output.stream, " will remove leading and trailing whitespaces when selecting objects or when printing objects.%c", f_string_eol[0]);
+ fprintf(output.stream, " will remove leading and trailing whitespaces when selecting objects or when printing objects.%c", f_string_eol_s[0]);
- fprintf(output.stream, "%c", f_string_eol[0]);
+ fprintf(output.stream, "%c", f_string_eol_s[0]);
fprintf(output.stream, " When specifying both the ");
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_object);
fprintf(output.stream, " parameter and the ");
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_content);
- fprintf(output.stream, " parameter, the entire object and content are printed, including the formatting.%c", f_string_eol[0]);
- fprintf(output.stream, " Both the object and content printed are already escaped.%c", f_string_eol[0]);
- fprintf(output.stream, " Both the object and content are separated by an EOL.%c", f_string_eol[0]);
+ fprintf(output.stream, " parameter, the entire object and content are printed, including the formatting.%c", f_string_eol_s[0]);
+ fprintf(output.stream, " Both the object and content printed are already escaped.%c", f_string_eol_s[0]);
+ fprintf(output.stream, " Both the object and content are separated by an EOL.%c", f_string_eol_s[0]);
- fprintf(output.stream, "%c", f_string_eol[0]);
+ fprintf(output.stream, "%c", f_string_eol_s[0]);
fprintf(output.stream, " The parameter ");
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_delimit);
- fprintf(output.stream, " accepts the following:%c", f_string_eol[0]);
+ fprintf(output.stream, " accepts the following:%c", f_string_eol_s[0]);
fprintf(output.stream, " - ");
fl_color_print(output.stream, context.set.notable, "%s", fss_extended_list_read_delimit_mode_name_none);
- fprintf(output.stream, ": Do not apply delimits.%c", f_string_eol[0]);
+ fprintf(output.stream, ": Do not apply delimits.%c", f_string_eol_s[0]);
fprintf(output.stream, " - ");
fl_color_print(output.stream, context.set.notable, "%s", fss_extended_list_read_delimit_mode_name_all);
- fprintf(output.stream, ": (default) apply all delimits.%c", f_string_eol[0]);
- fprintf(output.stream, " - a number, 0 or greater: apply delimits for the specified depth.%c", f_string_eol[0]);
+ fprintf(output.stream, ": (default) apply all delimits.%c", f_string_eol_s[0]);
+ fprintf(output.stream, " - a number, 0 or greater: apply delimits for the specified depth.%c", f_string_eol_s[0]);
fprintf(output.stream, " - a number, 0 or greater, followed by a ");
fl_color_print(output.stream, context.set.notable, "%s", fss_extended_list_read_delimit_mode_name_greater);
- fprintf(output.stream, ": (such as '1+') apply delimits for the specified depth and any greater depth (numerically).%c", f_string_eol[0]);
+ fprintf(output.stream, ": (such as '1+') apply delimits for the specified depth and any greater depth (numerically).%c", f_string_eol_s[0]);
fprintf(output.stream, " - a number, 0 or greater, followed by a ");
fl_color_print(output.stream, context.set.notable, "%s", fss_extended_list_read_delimit_mode_name_lesser);
- fprintf(output.stream, ": (such as '1-') apply delimits for the specified depth and any lesser depth (numerically).%c", f_string_eol[0]);
+ fprintf(output.stream, ": (such as '1-') apply delimits for the specified depth and any lesser depth (numerically).%c", f_string_eol_s[0]);
- fprintf(output.stream, "%c", f_string_eol[0]);
+ fprintf(output.stream, "%c", f_string_eol_s[0]);
return F_none;
}
status = fll_program_parameter_process(arguments, parameters, choices, F_true, &data->remaining, &data->context);
- data->error.context = data->context.set.error;
- data->error.notable = data->context.set.notable;
+ if (data->context.set.error.before) {
+ data->error.context = data->context.set.error;
+ data->error.notable = data->context.set.notable;
+ }
+ else {
+ data->context.set.warning = f_color_set_empty_s;
+ data->context.set.error = f_color_set_empty_s;
+ data->context.set.title = f_color_set_empty_s;
+ data->context.set.notable = f_color_set_empty_s;
+ data->context.set.important = f_color_set_empty_s;
+ data->context.set.standout = f_color_set_empty_s;
+ data->context.set.normal = f_color_set_empty_s;
+ data->context.set.normal_reset = f_color_set_empty_s;
+
+ data->error.context = f_color_set_empty_s;
+ data->error.notable = f_color_set_empty_s;
+ }
if (F_status_is_error(status)) {
fss_extended_list_read_delete_data(data);
if (data->parameters[fss_extended_list_read_parameter_at].result == f_console_result_found) {
fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_at);
- fl_color_print(data->error.to.stream, data->context.set.error, "' requires a positive number.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' requires a positive number.%c", f_string_eol_s[0]);
status = F_status_set_error(F_parameter);
}
if (F_status_is_error_not(status) && data->parameters[fss_extended_list_read_parameter_depth].result == f_console_result_found) {
fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_depth);
- fl_color_print(data->error.to.stream, data->context.set.error, "' requires a positive number.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' requires a positive number.%c", f_string_eol_s[0]);
status = F_status_set_error(F_parameter);
}
if (F_status_is_error_not(status) && data->parameters[fss_extended_list_read_parameter_line].result == f_console_result_found) {
fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_line);
- fl_color_print(data->error.to.stream, data->context.set.error, "' requires a positive number.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' requires a positive number.%c", f_string_eol_s[0]);
status = F_status_set_error(F_parameter);
}
if (F_status_is_error_not(status) && data->parameters[fss_extended_list_read_parameter_name].result == f_console_result_found) {
fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_name);
- fl_color_print(data->error.to.stream, data->context.set.error, "' requires a string.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' requires a string.%c", f_string_eol_s[0]);
status = F_status_set_error(F_parameter);
}
if (F_status_is_error_not(status) && data->parameters[fss_extended_list_read_parameter_select].result == f_console_result_found) {
fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_select);
- fl_color_print(data->error.to.stream, data->context.set.error, "' requires a positive number.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' requires a positive number.%c", f_string_eol_s[0]);
status = F_status_set_error(F_parameter);
}
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_object);
fl_color_print(data->error.to.stream, data->context.set.error, "' parameter with the '");
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_line);
- fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol_s[0]);
status = F_status_set_error(F_parameter);
}
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_object);
fl_color_print(data->error.to.stream, data->context.set.error, "' parameter with the '");
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_select);
- fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol_s[0]);
status = F_status_set_error(F_parameter);
}
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_content);
fl_color_print(data->error.to.stream, data->context.set.error, "' parameter with the '");
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_total);
- fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol_s[0]);
status = F_status_set_error(F_parameter);
}
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_line);
fl_color_print(data->error.to.stream, data->context.set.error, "' parameter with the '");
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_total);
- fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol_s[0]);
status = F_status_set_error(F_parameter);
}
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_pipe);
fl_color_print(data->error.to.stream, data->context.set.error, "' parameter with the '");
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_total);
- fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol_s[0]);
status = F_status_set_error(F_parameter);
}
if (data->parameters[fss_extended_list_read_parameter_delimit].result == f_console_result_found) {
fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_delimit);
- fl_color_print(data->error.to.stream, data->context.set.error, "' requires a value.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' requires a value.%c", f_string_eol_s[0]);
status = F_status_set_error(F_parameter);
}
if (length == 0) {
fl_color_print(data->error.to.stream, data->context.set.error, "%sThe value for the parameter '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_delimit);
- fl_color_print(data->error.to.stream, data->context.set.error, "' must not be empty.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' must not be empty.%c", f_string_eol_s[0]);
status = F_status_set_error(F_parameter);
}
f_macro_fss_comments_t_delete_simple(comments);
if (data->parameters[fss_extended_list_read_parameter_total].result == f_console_result_found) {
- fprintf(data->output.stream, "0%c", f_string_eol[0]);
+ fprintf(data->output.stream, "0%c", f_string_eol_s[0]);
}
fss_extended_list_read_delete_data(data);
if (F_status_is_error_not(status) && data->parameters[fss_extended_list_read_parameter_select].result == f_console_result_found) {
fl_color_print(data->error.to.stream, data->context.set.error, "%sThe '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_select);
- fl_color_print(data->error.to.stream, data->context.set.error, "' parameter requires a positive number.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' parameter requires a positive number.%c", f_string_eol_s[0]);
status = F_status_set_error(F_parameter);
}
// Skip past empty files.
if (!data->quantity.total) {
if (data->parameters[fss_extended_list_read_parameter_total].result == f_console_result_found) {
- fprintf(data->output.stream, "0%c", f_string_eol[0]);
+ fprintf(data->output.stream, "0%c", f_string_eol_s[0]);
}
f_file_stream_close(F_true, &file);
f_macro_fss_comments_t_delete_simple(comments);
}
else {
- fl_color_print(data->error.to.stream, data->context.set.error, "%sYou failed to specify one or more files.%c", fll_error_print_error, f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "%sYou failed to specify one or more files.%c", fll_error_print_error, f_string_eol_s[0]);
status = F_status_set_error(F_parameter);
}
fss_extended_list_read_macro_depths_t_new(status, (*depths), depth_size);
if (F_status_is_error(status)) {
- fl_color_print(data.error.to.stream, data.context.set.error, "%sUnable to allocate memory.%c", fll_error_print_error, f_string_eol[0]);
+ fl_color_print(data.error.to.stream, data.context.set.error, "%sUnable to allocate memory.%c", fll_error_print_error, f_string_eol_s[0]);
return status;
}
// @todo: move error printing into common function.
if (status_code == F_memory_allocation || status_code == F_memory_reallocation) {
- fl_color_print(data.error.to.stream, data.context.set.error, "%sUnable to allocate memory.%c", fll_error_print_error, f_string_eol[0]);
+ fl_color_print(data.error.to.stream, data.context.set.error, "%sUnable to allocate memory.%c", fll_error_print_error, f_string_eol_s[0]);
}
else if (status_code == f_string_length_t_size) {
fl_color_print(data.error.to.stream, data.context.set.error, "%sUnable to process '", fll_error_print_error);
fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_trim);
- fl_color_print(data.error.to.stream, data.context.set.error, "' because the maximum buffer size was reached.%c", f_string_eol[0]);
+ fl_color_print(data.error.to.stream, data.context.set.error, "' because the maximum buffer size was reached.%c", f_string_eol_s[0]);
}
else {
f_string_t function = "fl_string_append";
fl_color_print(data.error.to.stream, data.context.set.notable, "%u", status_code);
fl_color_print(data.error.to.stream, data.context.set.error, ") has occurred while calling ");
fl_color_print(data.error.to.stream, data.context.set.notable, "%s()", function);
- fl_color_print(data.error.to.stream, data.context.set.error, ".%c", f_string_eol[0]);
+ fl_color_print(data.error.to.stream, data.context.set.error, ".%c", f_string_eol_s[0]);
}
return status;
if (!depths->array[i].value_name.used) {
fl_color_print(data.error.to.stream, data.context.set.error, "%sThe '", fll_error_print_error);
fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_name);
- fl_color_print(data.error.to.stream, data.context.set.error, "' must not be an empty string.%c", f_string_eol[0]);
+ fl_color_print(data.error.to.stream, data.context.set.error, "' must not be an empty string.%c", f_string_eol_s[0]);
return F_status_set_error(F_parameter);
}
fl_color_print(data.error.to.stream, data.context.set.notable, "%llu", depths->array[i].depth);
fl_color_print(data.error.to.stream, data.context.set.error, "' may only be specified once for the parameter '");
fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_depth);
- fl_color_print(data.error.to.stream, data.context.set.error, "'.%c", f_string_eol[0]);
+ fl_color_print(data.error.to.stream, data.context.set.error, "'.%c", f_string_eol_s[0]);
return F_status_set_error(F_parameter);
}
fl_color_print(data.error.to.stream, data.context.set.notable, "%llu", depths->array[i].depth);
fl_color_print(data.error.to.stream, data.context.set.error, "' before the value '");
fl_color_print(data.error.to.stream, data.context.set.notable, "%llu", depths->array[j].depth);
- fl_color_print(data.error.to.stream, data.context.set.error, "'.%c", f_string_eol[0]);
+ fl_color_print(data.error.to.stream, data.context.set.error, "'.%c", f_string_eol_s[0]);
return F_status_set_error(F_parameter);
}
fl_string_dynamic_delete(&data->buffer);
if (data->parameters[fss_extended_list_read_parameter_total].result == f_console_result_found) {
- fprintf(data->output.stream, "0%c", f_string_eol[0]);
+ fprintf(data->output.stream, "0%c", f_string_eol_s[0]);
return F_none;
}
if (data->parameters[fss_extended_list_read_parameter_total].result == f_console_result_found) {
if (depths.array[0].index_at > 0) {
if (depths.array[0].value_at < data->objects.used && names[depths.array[0].value_at]) {
- fprintf(data->output.stream, "1%c", f_string_eol[0]);
+ fprintf(data->output.stream, "1%c", f_string_eol_s[0]);
}
else {
- fprintf(data->output.stream, "0%c", f_string_eol[0]);
+ fprintf(data->output.stream, "0%c", f_string_eol_s[0]);
}
}
else if (depths.array[0].index_name > 0) {
total++;
} // for
- fprintf(data->output.stream, "%llu%c", total, f_string_eol[0]);
+ fprintf(data->output.stream, "%llu%c", total, f_string_eol_s[0]);
}
else {
- fprintf(data->output.stream, "%llu%c", data->objects.used, f_string_eol[0]);
+ fprintf(data->output.stream, "%llu%c", data->objects.used, f_string_eol_s[0]);
}
return F_none;
if (depths.array[0].index_at > 0) {
if (depths.array[0].value_at >= data->objects.used) {
if (names[depths.array[0].value_at] && data->parameters[fss_extended_list_read_parameter_total].result == f_console_result_found) {
- fprintf(data->output.stream, "0%c", f_string_eol[0]);
+ fprintf(data->output.stream, "0%c", f_string_eol_s[0]);
}
return F_none;
if (at == depths.array[0].value_at) {
if (data->parameters[fss_extended_list_read_parameter_total].result == f_console_result_found) {
if (!data->contents.array[i].used) {
- fprintf(data->output.stream, "0%c", f_string_eol[0]);
+ fprintf(data->output.stream, "0%c", f_string_eol_s[0]);
}
else {
total = 1;
for (j = data->contents.array[i].array[0].start; j <= data->contents.array[i].array[0].stop; j++) {
if (!data->buffer.string[j]) continue;
- if (data->buffer.string[j] == f_string_eol[0]) {
+ if (data->buffer.string[j] == f_string_eol_s[0]) {
total++;
}
} // for
- fprintf(data->output.stream, "%llu%c", total, f_string_eol[0]);
+ fprintf(data->output.stream, "%llu%c", total, f_string_eol_s[0]);
}
return F_none;
if (data->parameters[fss_extended_list_read_parameter_line].result == f_console_result_additional) {
if (!data->contents.array[i].used) {
if (include_empty && !line) {
- fprintf(data->output.stream, "%c", f_string_eol[0]);
+ fprintf(data->output.stream, "%c", f_string_eol_s[0]);
fss_extended_list_read_print_set_end(*data);
}
}
if (!line) {
for (; i <= data->contents.array[i].array[0].stop; i++) {
if (!data->buffer.string[i]) continue;
- if (data->buffer.string[i] == f_string_eol[0]) {
- fprintf(data->output.stream, "%c", f_string_eol[0]);
+ if (data->buffer.string[i] == f_string_eol_s[0]) {
+ fprintf(data->output.stream, "%c", f_string_eol_s[0]);
break;
}
for (; i <= data->contents.array[i].array[0].stop; i++) {
if (!data->buffer.string[i]) continue;
- if (data->buffer.string[i] == f_string_eol[0]) {
+ if (data->buffer.string[i] == f_string_eol_s[0]) {
line_current++;
if (line_current == line) {
for (; i <= data->contents.array[i].array[0].stop; i++) {
if (!data->buffer.string[i]) continue;
- if (data->buffer.string[i] == f_string_eol[0]) {
- fprintf(data->output.stream, "%c", f_string_eol[0]);
+ if (data->buffer.string[i] == f_string_eol_s[0]) {
+ fprintf(data->output.stream, "%c", f_string_eol_s[0]);
break;
}
fss_extended_list_read_print_set_end(*data);
}
else if (include_empty) {
- fprintf(data->output.stream, "%c", f_string_eol[0]);
+ fprintf(data->output.stream, "%c", f_string_eol_s[0]);
fss_extended_list_read_print_set_end(*data);
}
for (j = data->contents.array[i].array[0].start; j <= data->contents.array[i].array[0].stop; j++) {
if (!data->buffer.string[j]) continue;
- if (data->buffer.string[j] == f_string_eol[0]) {
+ if (data->buffer.string[j] == f_string_eol_s[0]) {
total++;
}
} // for
} // for
- fprintf(data->output.stream, "%llu%c", total, f_string_eol[0]);
+ fprintf(data->output.stream, "%llu%c", total, f_string_eol_s[0]);
return F_none;
}
if (!data->contents.array[i].used) {
if (include_empty) {
if (line_current == line) {
- fprintf(data->output.stream, "%c", f_string_eol[0]);
+ fprintf(data->output.stream, "%c", f_string_eol_s[0]);
fss_extended_list_read_print_set_end(*data);
break;
}
if (line_current != line) {
for (; j <= data->contents.array[i].array[0].stop; j++) {
- if (data->buffer.string[j] == f_string_eol[0]) {
+ if (data->buffer.string[j] == f_string_eol_s[0]) {
line_current++;
if (line_current == line) {
for (; j <= data->contents.array[i].array[0].stop; j++) {
if (!data->buffer.string[j]) continue;
- if (data->buffer.string[j] == f_string_eol[0]) {
- fprintf(data->output.stream, "%c", f_string_eol[0]);
+ if (data->buffer.string[j] == f_string_eol_s[0]) {
+ fprintf(data->output.stream, "%c", f_string_eol_s[0]);
break;
}
if (!data->contents.array[i].used) {
if (include_empty) {
- fprintf(data->output.stream, "%c", f_string_eol[0]);
+ fprintf(data->output.stream, "%c", f_string_eol_s[0]);
fss_extended_list_read_print_set_end(*data);
}
fll_program_print_help_option(output, context, f_console_standard_short_debug, f_console_standard_long_debug, f_console_symbol_short_disable, f_console_symbol_long_disable, " Enable debugging, inceasing verbosity beyond normal output.");
fll_program_print_help_option(output, context, f_console_standard_short_version, f_console_standard_long_version, f_console_symbol_short_disable, f_console_symbol_long_disable, " Print only the version number.");
- fprintf(output.stream, "%c", f_string_eol[0]);
+ fprintf(output.stream, "%c", f_string_eol_s[0]);
fll_program_print_help_option(output, context, fss_extended_list_write_short_file, fss_extended_list_write_long_file, f_console_symbol_short_enable, f_console_symbol_long_enable, " Specify a file to send output to.");
fll_program_print_help_option(output, context, fss_extended_list_write_short_content, fss_extended_list_write_long_content, f_console_symbol_short_enable, f_console_symbol_long_enable, "The Content to output.");
fl_color_print(output.stream, context.set.notable, "\\b");
fprintf(output.stream, "' (");
fl_color_print(output.stream, context.set.notable, "U+0008");
- fprintf(output.stream, ") to designate the start of a Content.%c", f_string_eol[0]);
+ fprintf(output.stream, ") to designate the start of a Content.%c", f_string_eol_s[0]);
fprintf(output.stream, " The pipe uses the Form Feed character '");
fl_color_print(output.stream, context.set.notable, "\\f");
fprintf(output.stream, "' (");
fl_color_print(output.stream, context.set.notable, "U+000C");
- fprintf(output.stream, ") to designate the end of the last Content.%c", f_string_eol[0]);
+ fprintf(output.stream, ") to designate the end of the last Content.%c", f_string_eol_s[0]);
fprintf(output.stream, " The pipe uses the Vertical Line character '");
fl_color_print(output.stream, context.set.notable, "\\v");
fprintf(output.stream, "' (");
fl_color_print(output.stream, context.set.notable, "U+000B");
- fprintf(output.stream, ") is used to ignore a content range (use this both before and after the range).%c", f_string_eol[0]);
+ fprintf(output.stream, ") is used to ignore a content range (use this both before and after the range).%c", f_string_eol_s[0]);
fprintf(output.stream, " For the pipe, an Object is terminated by either a Backspace character '");
fl_color_print(output.stream, context.set.notable, "\\b");
fl_color_print(output.stream, context.set.notable, "\\f");
fprintf(output.stream, "' (");
fl_color_print(output.stream, context.set.notable, "U+000C");
- fprintf(output.stream, ").%c", f_string_eol[0]);
+ fprintf(output.stream, ").%c", f_string_eol_s[0]);
- fprintf(output.stream, " The end of the pipe represents the end of any Object or Content.%c", f_string_eol[0]);
+ fprintf(output.stream, " The end of the pipe represents the end of any Object or Content.%c", f_string_eol_s[0]);
- fprintf(output.stream, "%c", f_string_eol[0]);
+ fprintf(output.stream, "%c", f_string_eol_s[0]);
fprintf(output.stream, " The FSS-0003 (Extended List) specification does not support quoted names, therefore the parameters '");
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_write_long_single);
fprintf(output.stream, "' and '");
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_write_long_double);
- fprintf(output.stream, "' do nothing.%c", f_string_eol[0]);
+ fprintf(output.stream, "' do nothing.%c", f_string_eol_s[0]);
- fprintf(output.stream, "%c", f_string_eol[0]);
+ fprintf(output.stream, "%c", f_string_eol_s[0]);
fprintf(output.stream, " The parameter '");
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_write_long_ignore);
- fprintf(output.stream, "' designates to not escape any valid nested Object or Content within some Content.%c", f_string_eol[0]);
- fprintf(output.stream, " This parameter requires two values.%c", f_string_eol[0]);
- fprintf(output.stream, " This parameter is not used for ignoring anything from the input pipe.%c", f_string_eol[0]);
+ fprintf(output.stream, "' designates to not escape any valid nested Object or Content within some Content.%c", f_string_eol_s[0]);
+ fprintf(output.stream, " This parameter requires two values.%c", f_string_eol_s[0]);
+ fprintf(output.stream, " This parameter is not used for ignoring anything from the input pipe.%c", f_string_eol_s[0]);
fprintf(output.stream, " This parameter must be specified after a '");
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_write_long_content);
fprintf(output.stream, "' parameter and this applies only to the Content represented by that specific '");
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_write_long_content);
- fprintf(output.stream, "' parameter.%c", f_string_eol[0]);
+ fprintf(output.stream, "' parameter.%c", f_string_eol_s[0]);
- fprintf(output.stream, "%c", f_string_eol[0]);
+ fprintf(output.stream, "%c", f_string_eol_s[0]);
return F_none;
}
status = fll_program_parameter_process(arguments, parameters, choices, F_true, &data->remaining, &data->context);
- data->error.context = data->context.set.error;
- data->error.notable = data->context.set.notable;
+ if (data->context.set.error.before) {
+ data->error.context = data->context.set.error;
+ data->error.notable = data->context.set.notable;
+ }
+ else {
+ data->context.set.warning = f_color_set_empty_s;
+ data->context.set.error = f_color_set_empty_s;
+ data->context.set.title = f_color_set_empty_s;
+ data->context.set.notable = f_color_set_empty_s;
+ data->context.set.important = f_color_set_empty_s;
+ data->context.set.standout = f_color_set_empty_s;
+ data->context.set.normal = f_color_set_empty_s;
+ data->context.set.normal_reset = f_color_set_empty_s;
+
+ data->error.context = f_color_set_empty_s;
+ data->error.notable = f_color_set_empty_s;
+ }
if (F_status_is_error(status)) {
fss_extended_list_write_delete_data(data);
if (data->parameters[fss_extended_list_write_parameter_file].result == f_console_result_additional) {
if (data->parameters[fss_extended_list_write_parameter_file].values.used > 1) {
if (data->error.verbosity != f_console_verbosity_quiet) {
- fprintf(data->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_write_long_file);
- fl_color_print(data->error.to.stream, data->context.set.error, "' may only be specified once.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' may only be specified once.%c", f_string_eol_s[0]);
}
status = F_status_set_error(F_parameter);
else if (data->parameters[fss_extended_list_write_parameter_content].locations.used && data->parameters[fss_extended_list_write_parameter_partial].locations.used) {
if (data->parameters[fss_extended_list_write_parameter_content].result == f_console_result_additional) {
if (data->error.verbosity != f_console_verbosity_quiet) {
- fprintf(data->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data->error.to.stream, data->context.set.error, "%sThe '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_write_long_partial);
fl_color_print(data->error.to.stream, data->context.set.error, "' parameter only allows either the '");
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_write_long_object);
fl_color_print(data->error.to.stream, data->context.set.error, "' parameter or the '");
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_write_long_content);
- fl_color_print(data->error.to.stream, data->context.set.error, "' parameter, but not both.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' parameter, but not both.%c", f_string_eol_s[0]);
}
status = F_status_set_error(F_parameter);
if (location_object > location_content || location_object == location_content && location_sub_object > location_sub_content) {
if (data->error.verbosity != f_console_verbosity_quiet) {
- fprintf(data->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data->error.to.stream, data->context.set.error, "%sEach ", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_write_long_object);
fl_color_print(data->error.to.stream, data->context.set.error, "' parameter must be specified before a '");
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_write_long_content);
- fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol_s[0]);
}
status = F_status_set_error(F_parameter);
}
else if (!data->process_pipe) {
if (data->error.verbosity != f_console_verbosity_quiet) {
- fprintf(data->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data->error.to.stream, data->context.set.error, "%sThis requires either piped data or the use of the '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_write_long_object);
fl_color_print(data->error.to.stream, data->context.set.error, "' parameter with the '");
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_write_long_content);
- fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol_s[0]);
}
status = F_status_set_error(F_parameter);
if (F_status_is_error_not(status) && data->process_pipe) {
if (data->parameters[fss_extended_list_write_parameter_partial].result == f_console_result_found) {
if (data->error.verbosity != f_console_verbosity_quiet) {
- fprintf(data->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data->error.to.stream, data->context.set.error, "%sThe '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_write_long_partial);
- fl_color_print(data->error.to.stream, data->context.set.error, "' parameter cannot be used when processing a pipe.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' parameter cannot be used when processing a pipe.%c", f_string_eol_s[0]);
}
status = F_status_set_error(F_parameter);
if (F_status_is_error_not(status)) {
if (data->parameters[fss_extended_list_write_parameter_prepend].result == f_console_result_found) {
if (data->error.verbosity != f_console_verbosity_quiet) {
- fprintf(data->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_write_long_prepend);
- fl_color_print(data->error.to.stream, data->context.set.error, "' was specified, but no value was given.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' was specified, but no value was given.%c", f_string_eol_s[0]);
}
status = F_status_set_error(F_parameter);
if (status == F_false) {
if (data->error.verbosity != f_console_verbosity_quiet) {
- fprintf(data->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data->error.to.stream, data->context.set.error, "%sThe value for the parameter '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_write_long_prepend);
- fl_color_print(data->error.to.stream, data->context.set.error, "' must only contain whitespace.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' must only contain whitespace.%c", f_string_eol_s[0]);
}
status = F_status_set_error(F_parameter);
}
else {
if (data->error.verbosity != f_console_verbosity_quiet) {
- fprintf(data->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data->error.to.stream, data->context.set.error, "%sThe value for the parameter '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_write_long_prepend);
- fl_color_print(data->error.to.stream, data->context.set.error, "' must not be an empty string.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' must not be an empty string.%c", f_string_eol_s[0]);
}
status = F_status_set_error(F_parameter);
if (F_status_is_error_not(status)) {
if (data->parameters[fss_extended_list_write_parameter_ignore].result == f_console_result_found) {
if (data->error.verbosity != f_console_verbosity_quiet) {
- fprintf(data->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_write_long_ignore);
- fl_color_print(data->error.to.stream, data->context.set.error, "' was specified, but no values were given.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' was specified, but no values were given.%c", f_string_eol_s[0]);
}
status = F_status_set_error(F_parameter);
const f_array_length_t total_arguments = data->parameters[fss_extended_list_write_parameter_ignore].values.used;
if (total_locations * 2 > total_arguments) {
- fprintf(data->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_write_long_ignore);
- fl_color_print(data->error.to.stream, data->context.set.error, "' requires two values.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' requires two values.%c", f_string_eol_s[0]);
status = F_status_set_error(F_parameter);
}
if (F_status_is_error(status)) {
if (data->error.verbosity != f_console_verbosity_quiet) {
- fprintf(data->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data->error.to.stream, data->context.set.error, "%sWhile processing the ", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "input pipe");
- fl_color_print(data->error.to.stream, data->context.set.error, ".%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, ".%c", f_string_eol_s[0]);
}
}
if (F_status_is_error(status)) {
if (data->error.verbosity != f_console_verbosity_quiet) {
- fprintf(data->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data->error.to.stream, data->context.set.error, "%sWhile processing the ", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "input arguments");
- fl_color_print(data->error.to.stream, data->context.set.error, ".%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, ".%c", f_string_eol_s[0]);
}
}
else if (data->error.verbosity != f_console_verbosity_quiet && data->parameters[fss_extended_list_write_parameter_file].result == f_console_result_none) {
// ensure there is always a newline at the end, unless in quiet mode.
- fprintf(data->output.stream, "%c", f_string_eol[0]);
+ fprintf(data->output.stream, "%c", f_string_eol_s[0]);
}
}
// ensure a newline is always put at the end of the program execution, unless in quiet mode.
if (data->error.verbosity != f_console_verbosity_quiet) {
if (F_status_is_error(status)) {
- fprintf(data->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data->error.to.stream, "%c", f_string_eol_s[0]);
}
}
return;
}
- fprintf(data.error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data.error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data.error.to.stream, data.context.set.error, "%sMust specify both the '", fll_error_print_error);
fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_write_long_object);
fl_color_print(data.error.to.stream, data.context.set.error, "' parameter and the '");
fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_write_long_content);
fl_color_print(data.error.to.stream, data.context.set.error, "' parameter the same number of times when not specifying the ");
fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_list_write_long_partial);
- fl_color_print(data.error.to.stream, data.context.set.error, "' parameter.%c", f_string_eol[0]);
+ fl_color_print(data.error.to.stream, data.context.set.error, "' parameter.%c", f_string_eol_s[0]);
}
#endif // _di_fss_extended_list_write_error_parameter_same_times_print_
return;
}
- fprintf(data.error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data.error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data.error.to.stream, data.context.set.error, "%sThis standard does not support end of line character '", fll_error_print_error);
fl_color_print(data.error.to.stream, data.context.set.notable, "\\n");
- fl_color_print(data.error.to.stream, data.context.set.error, "' in objects.%c", f_string_eol[0]);
+ fl_color_print(data.error.to.stream, data.context.set.error, "' in objects.%c", f_string_eol_s[0]);
}
#endif // _di_fss_extended_list_write_error_parameter_unsupported_eol_print_
return;
}
- fprintf(data.error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data.error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data.error.to.stream, data.context.set.error, "%sThe parameter '", fll_error_print_error);
fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", symbol, parameter);
- fl_color_print(data.error.to.stream, data.context.set.error, "' was specified, but no value was given.%c", f_string_eol[0]);
+ fl_color_print(data.error.to.stream, data.context.set.error, "' was specified, but no value was given.%c", f_string_eol_s[0]);
}
#endif // _di_fss_extended_list_write_error_parameter_value_missing_print_
if (block.string[range.start] == fss_extended_list_write_pipe_content_start) {
if (data.error.verbosity != f_console_verbosity_quiet) {
- fprintf(data.error.to.stream, "%c", f_string_eol[0]);
- fl_color_print(data.error.to.stream, data.context.set.error, "%sThis standard only supports one content per object.%c", fll_error_print_error, f_string_eol[0]);
+ fprintf(data.error.to.stream, "%c", f_string_eol_s[0]);
+ fl_color_print(data.error.to.stream, data.context.set.error, "%sThis standard only supports one content per object.%c", fll_error_print_error, f_string_eol_s[0]);
}
status = F_status_set_error(F_supported_not);
fll_program_print_help_option(output, context, f_console_standard_short_debug, f_console_standard_long_debug, f_console_symbol_short_disable, f_console_symbol_long_disable, " Enable debugging, inceasing verbosity beyond normal output.");
fll_program_print_help_option(output, context, f_console_standard_short_version, f_console_standard_long_version, f_console_symbol_short_disable, f_console_symbol_long_disable, " Print only the version number.");
- fprintf(output.stream, "%c", f_string_eol[0]);
+ fprintf(output.stream, "%c", f_string_eol_s[0]);
fll_program_print_help_option(output, context, fss_extended_read_short_at, fss_extended_read_long_at, f_console_symbol_short_enable, f_console_symbol_long_enable, " Select object at this numeric index.");
fll_program_print_help_option(output, context, fss_extended_read_short_content, fss_extended_read_long_content, f_console_symbol_short_enable, f_console_symbol_long_enable, " Print the content (default).");
fl_color_print(output.stream, context.set.important, " Notes:");
- fprintf(output.stream, "%c", f_string_eol[0]);
+ fprintf(output.stream, "%c", f_string_eol_s[0]);
- fprintf(output.stream, " This program will print the content associated with the given object and content data based on the FSS-0001 Extended standard.%c", f_string_eol[0]);
+ fprintf(output.stream, " This program will print the content associated with the given object and content data based on the FSS-0001 Extended standard.%c", f_string_eol_s[0]);
- fprintf(output.stream, "%c", f_string_eol[0]);
+ fprintf(output.stream, "%c", f_string_eol_s[0]);
fprintf(output.stream, " When using the ");
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_depth);
- fprintf(output.stream, " option, an order of operations is enforced on the parameters.%c", f_string_eol[0]);
+ fprintf(output.stream, " option, an order of operations is enforced on the parameters.%c", f_string_eol_s[0]);
- fprintf(output.stream, " 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]);
+ fprintf(output.stream, " 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_s[0]);
fprintf(output.stream, " ");
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_at);
- fprintf(output.stream, ": An object index at the specified depth.%c", f_string_eol[0]);
+ fprintf(output.stream, ": An object index at the specified depth.%c", f_string_eol_s[0]);
fprintf(output.stream, " ");
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_depth);
- fprintf(output.stream, ": A new depth within the specified depth, indexed from the root.%c", f_string_eol[0]);
+ fprintf(output.stream, ": A new depth within the specified depth, indexed from the root.%c", f_string_eol_s[0]);
fprintf(output.stream, " ");
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_name);
- fprintf(output.stream, ": An object name at the specified depth.%c", f_string_eol[0]);
+ fprintf(output.stream, ": An object name at the specified depth.%c", f_string_eol_s[0]);
- fprintf(output.stream, "%c", f_string_eol[0]);
+ fprintf(output.stream, "%c", f_string_eol_s[0]);
fprintf(output.stream, " The parameter ");
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_depth);
- fprintf(output.stream, " must be in numeric order, but values in between may be skipped.%c", f_string_eol[0]);
- fprintf(output.stream, " ('-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]);
- fprintf(output.stream, " ('-d 2 -a 1 -d 0 -a 2' would be invalid because depth 2 is before depth 1.)%c", f_string_eol[0]);
+ fprintf(output.stream, " must be in numeric order, but values in between may be skipped.%c", f_string_eol_s[0]);
+ fprintf(output.stream, " ('-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_s[0]);
+ fprintf(output.stream, " ('-d 2 -a 1 -d 0 -a 2' would be invalid because depth 2 is before depth 1.)%c", f_string_eol_s[0]);
- fprintf(output.stream, "%c", f_string_eol[0]);
+ fprintf(output.stream, "%c", f_string_eol_s[0]);
fprintf(output.stream, " The parameter ");
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_select);
- fprintf(output.stream, " selects a content index at a given depth.%c", f_string_eol[0]);
- fprintf(output.stream, " (This parameter is not synonymous with the depth parameter and does not relate to nested content).%c", f_string_eol[0]);
+ fprintf(output.stream, " selects a content index at a given depth.%c", f_string_eol_s[0]);
+ fprintf(output.stream, " (This parameter is not synonymous with the depth parameter and does not relate to nested content).%c", f_string_eol_s[0]);
- fprintf(output.stream, "%c", f_string_eol[0]);
+ fprintf(output.stream, "%c", f_string_eol_s[0]);
fprintf(output.stream, " Specify both ");
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_object);
fprintf(output.stream, " and the ");
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_total);
- fprintf(output.stream, " parameters to get the total objects.%c", f_string_eol[0]);
+ fprintf(output.stream, " parameters to get the total objects.%c", f_string_eol_s[0]);
- fprintf(output.stream, "%c", f_string_eol[0]);
+ fprintf(output.stream, "%c", f_string_eol_s[0]);
fprintf(output.stream, " When both ");
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_at);
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_at);
fprintf(output.stream, " parameter value will be treated as a position relative to the specified ");
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_name);
- fprintf(output.stream, " parameter value.%c", f_string_eol[0]);
+ fprintf(output.stream, " parameter value.%c", f_string_eol_s[0]);
- fprintf(output.stream, "%c", f_string_eol[0]);
+ fprintf(output.stream, "%c", f_string_eol_s[0]);
fprintf(output.stream, " This program may support parameters, such as ");
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_depth);
fprintf(output.stream, " or ");
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_select);
- fprintf(output.stream, ", even if not supported by the standard.%c", f_string_eol[0]);
- fprintf(output.stream, " This is done to help ensure consistency for scripting.%c", f_string_eol[0]);
+ fprintf(output.stream, ", even if not supported by the standard.%c", f_string_eol_s[0]);
+ fprintf(output.stream, " This is done to help ensure consistency for scripting.%c", f_string_eol_s[0]);
- fprintf(output.stream, "%c", f_string_eol[0]);
+ fprintf(output.stream, "%c", f_string_eol_s[0]);
fprintf(output.stream, " For parameters like ");
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_depth);
- fprintf(output.stream, ", if the standard doesn't support nested content, then only a depth of 0 would be valid.%c", f_string_eol[0]);
+ fprintf(output.stream, ", if the standard doesn't support nested content, then only a depth of 0 would be valid.%c", f_string_eol_s[0]);
fprintf(output.stream, " For parameters like ");
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_select);
- fprintf(output.stream, ", if the standard doesn't support multiple content groups, then only a select of 0 would be valid.%c", f_string_eol[0]);
+ fprintf(output.stream, ", if the standard doesn't support multiple content groups, then only a select of 0 would be valid.%c", f_string_eol_s[0]);
- fprintf(output.stream, "%c", f_string_eol[0]);
+ fprintf(output.stream, "%c", f_string_eol_s[0]);
fprintf(output.stream, " The parameter ");
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_trim);
- fprintf(output.stream, " will remove leading and trailing whitespaces when selecting objects or when printing objects.%c", f_string_eol[0]);
+ fprintf(output.stream, " will remove leading and trailing whitespaces when selecting objects or when printing objects.%c", f_string_eol_s[0]);
- fprintf(output.stream, "%c", f_string_eol[0]);
+ fprintf(output.stream, "%c", f_string_eol_s[0]);
fprintf(output.stream, " When specifying both the ");
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_object);
fprintf(output.stream, " parameter and the ");
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_content);
- fprintf(output.stream, " parameter, the entire object and content are printed, including the formatting.%c", f_string_eol[0]);
- fprintf(output.stream, " Both the object and content printed are already escaped.%c", f_string_eol[0]);
- fprintf(output.stream, " Both the object and content are separated by a space.%c", f_string_eol[0]);
+ fprintf(output.stream, " parameter, the entire object and content are printed, including the formatting.%c", f_string_eol_s[0]);
+ fprintf(output.stream, " Both the object and content printed are already escaped.%c", f_string_eol_s[0]);
+ fprintf(output.stream, " Both the object and content are separated by a space.%c", f_string_eol_s[0]);
- fprintf(output.stream, "%c", f_string_eol[0]);
+ fprintf(output.stream, "%c", f_string_eol_s[0]);
fprintf(output.stream, " The parameter ");
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_delimit);
- fprintf(output.stream, " accepts the following:%c", f_string_eol[0]);
+ fprintf(output.stream, " accepts the following:%c", f_string_eol_s[0]);
fprintf(output.stream, " - ");
fl_color_print(output.stream, context.set.notable, "%s", fss_extended_read_delimit_mode_name_none);
- fprintf(output.stream, ": Do not apply delimits.%c", f_string_eol[0]);
+ fprintf(output.stream, ": Do not apply delimits.%c", f_string_eol_s[0]);
fprintf(output.stream, " - ");
fl_color_print(output.stream, context.set.notable, "%s", fss_extended_read_delimit_mode_name_all);
- fprintf(output.stream, ": (default) apply all delimits.%c", f_string_eol[0]);
- fprintf(output.stream, " - a number, 0 or greater: apply delimits for the specified depth.%c", f_string_eol[0]);
+ fprintf(output.stream, ": (default) apply all delimits.%c", f_string_eol_s[0]);
+ fprintf(output.stream, " - a number, 0 or greater: apply delimits for the specified depth.%c", f_string_eol_s[0]);
fprintf(output.stream, " - a number, 0 or greater, followed by a ");
fl_color_print(output.stream, context.set.notable, "%s", fss_extended_read_delimit_mode_name_greater);
- fprintf(output.stream, ": (such as '1+') apply delimits for the specified depth and any greater depth (numerically).%c", f_string_eol[0]);
+ fprintf(output.stream, ": (such as '1+') apply delimits for the specified depth and any greater depth (numerically).%c", f_string_eol_s[0]);
fprintf(output.stream, " - a number, 0 or greater, followed by a ");
fl_color_print(output.stream, context.set.notable, "%s", fss_extended_read_delimit_mode_name_lesser);
- fprintf(output.stream, ": (such as '1-') apply delimits for the specified depth and any lesser depth (numerically).%c", f_string_eol[0]);
+ fprintf(output.stream, ": (such as '1-') apply delimits for the specified depth and any lesser depth (numerically).%c", f_string_eol_s[0]);
- fprintf(output.stream, "%c", f_string_eol[0]);
+ fprintf(output.stream, "%c", f_string_eol_s[0]);
return F_none;
}
status = fll_program_parameter_process(arguments, parameters, choices, F_true, &data->remaining, &data->context);
- data->error.context = data->context.set.error;
- data->error.notable = data->context.set.notable;
+ if (data->context.set.error.before) {
+ data->error.context = data->context.set.error;
+ data->error.notable = data->context.set.notable;
+ }
+ else {
+ data->context.set.warning = f_color_set_empty_s;
+ data->context.set.error = f_color_set_empty_s;
+ data->context.set.title = f_color_set_empty_s;
+ data->context.set.notable = f_color_set_empty_s;
+ data->context.set.important = f_color_set_empty_s;
+ data->context.set.standout = f_color_set_empty_s;
+ data->context.set.normal = f_color_set_empty_s;
+ data->context.set.normal_reset = f_color_set_empty_s;
+
+ data->error.context = f_color_set_empty_s;
+ data->error.notable = f_color_set_empty_s;
+ }
if (F_status_is_error(status)) {
fss_extended_read_delete_data(data);
if (data->parameters[fss_extended_read_parameter_at].result == f_console_result_found) {
fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_at);
- fl_color_print(data->error.to.stream, data->context.set.error, "' requires a positive number.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' requires a positive number.%c", f_string_eol_s[0]);
status = F_status_set_error(F_parameter);
}
if (F_status_is_error_not(status) && data->parameters[fss_extended_read_parameter_depth].result == f_console_result_found) {
fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_depth);
- fl_color_print(data->error.to.stream, data->context.set.error, "' requires a positive number.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' requires a positive number.%c", f_string_eol_s[0]);
status = F_status_set_error(F_parameter);
}
if (F_status_is_error_not(status) && data->parameters[fss_extended_read_parameter_line].result == f_console_result_found) {
fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_line);
- fl_color_print(data->error.to.stream, data->context.set.error, "' requires a positive number.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' requires a positive number.%c", f_string_eol_s[0]);
status = F_status_set_error(F_parameter);
}
if (F_status_is_error_not(status) && data->parameters[fss_extended_read_parameter_name].result == f_console_result_found) {
fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_name);
- fl_color_print(data->error.to.stream, data->context.set.error, "' requires a string.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' requires a string.%c", f_string_eol_s[0]);
status = F_status_set_error(F_parameter);
}
if (F_status_is_error_not(status) && data->parameters[fss_extended_read_parameter_select].result == f_console_result_found) {
fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_select);
- fl_color_print(data->error.to.stream, data->context.set.error, "' requires a positive number.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' requires a positive number.%c", f_string_eol_s[0]);
status = F_status_set_error(F_parameter);
}
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_object);
fl_color_print(data->error.to.stream, data->context.set.error, "' parameter with the '");
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_line);
- fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol_s[0]);
status = F_status_set_error(F_parameter);
}
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_object);
fl_color_print(data->error.to.stream, data->context.set.error, "' parameter with the '");
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_select);
- fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol_s[0]);
status = F_status_set_error(F_parameter);
}
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_content);
fl_color_print(data->error.to.stream, data->context.set.error, "' parameter with the '");
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_total);
- fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol_s[0]);
status = F_status_set_error(F_parameter);
}
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_line);
fl_color_print(data->error.to.stream, data->context.set.error, "' parameter with the '");
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_total);
- fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol_s[0]);
status = F_status_set_error(F_parameter);
}
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_pipe);
fl_color_print(data->error.to.stream, data->context.set.error, "' parameter with the '");
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_total);
- fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol_s[0]);
status = F_status_set_error(F_parameter);
}
if (data->parameters[fss_extended_read_parameter_delimit].result == f_console_result_found) {
fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_delimit);
- fl_color_print(data->error.to.stream, data->context.set.error, "' requires a value.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' requires a value.%c", f_string_eol_s[0]);
status = F_status_set_error(F_parameter);
}
if (length == 0) {
fl_color_print(data->error.to.stream, data->context.set.error, "%sThe value for the parameter '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_delimit);
- fl_color_print(data->error.to.stream, data->context.set.error, "' must not be empty.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' must not be empty.%c", f_string_eol_s[0]);
status = F_status_set_error(F_parameter);
}
f_macro_fss_delimits_t_delete_simple(contents_delimits);
if (data->parameters[fss_extended_read_parameter_total].result == f_console_result_found) {
- fprintf(data->output.stream, "0%c", f_string_eol[0]);
+ fprintf(data->output.stream, "0%c", f_string_eol_s[0]);
}
fss_extended_read_delete_data(data);
if (F_status_is_error_not(status) && data->parameters[fss_extended_read_parameter_select].result == f_console_result_found) {
fl_color_print(data->error.to.stream, data->context.set.error, "%sThe '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_select);
- fl_color_print(data->error.to.stream, data->context.set.error, "' parameter requires a positive number.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' parameter requires a positive number.%c", f_string_eol_s[0]);
status = F_status_set_error(F_parameter);
}
// Skip past empty files.
if (!data->quantity.total) {
if (data->parameters[fss_extended_read_parameter_total].result == f_console_result_found) {
- fprintf(data->output.stream, "0%c", f_string_eol[0]);
+ fprintf(data->output.stream, "0%c", f_string_eol_s[0]);
}
f_file_stream_close(F_true, &file);
f_macro_fss_delimits_t_delete_simple(contents_delimits);
}
else {
- fl_color_print(data->error.to.stream, data->context.set.error, "%sYou failed to specify one or more files.%c", fll_error_print_error, f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "%sYou failed to specify one or more files.%c", fll_error_print_error, f_string_eol_s[0]);
status = F_status_set_error(F_parameter);
}
fss_extended_read_macro_depths_t_new(status, (*depths), depth_size);
if (F_status_is_error(status)) {
- fl_color_print(data.error.to.stream, data.context.set.error, "%sUnable to allocate memory.%c", fll_error_print_error, f_string_eol[0]);
+ fl_color_print(data.error.to.stream, data.context.set.error, "%sUnable to allocate memory.%c", fll_error_print_error, f_string_eol_s[0]);
return status;
}
// @todo: move error printing into common function.
if (status_code == F_memory_allocation || status_code == F_memory_reallocation) {
- fl_color_print(data.error.to.stream, data.context.set.error, "%sUnable to allocate memory.%c", fll_error_print_error, f_string_eol[0]);
+ fl_color_print(data.error.to.stream, data.context.set.error, "%sUnable to allocate memory.%c", fll_error_print_error, f_string_eol_s[0]);
}
else if (status_code == f_string_length_t_size) {
fl_color_print(data.error.to.stream, data.context.set.error, "%sUnable to process '", fll_error_print_error);
fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_trim);
- fl_color_print(data.error.to.stream, data.context.set.error, "' because the maximum buffer size was reached.%c", f_string_eol[0]);
+ fl_color_print(data.error.to.stream, data.context.set.error, "' because the maximum buffer size was reached.%c", f_string_eol_s[0]);
}
else {
f_string_t function = "fl_string_append";
fl_color_print(data.error.to.stream, data.context.set.notable, "%u", status_code);
fl_color_print(data.error.to.stream, data.context.set.error, ") has occurred while calling ");
fl_color_print(data.error.to.stream, data.context.set.notable, "%s()", function);
- fl_color_print(data.error.to.stream, data.context.set.error, ".%c", f_string_eol[0]);
+ fl_color_print(data.error.to.stream, data.context.set.error, ".%c", f_string_eol_s[0]);
}
return status;
if (!depths->array[i].value_name.used) {
fl_color_print(data.error.to.stream, data.context.set.error, "%sThe '", fll_error_print_error);
fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_name);
- fl_color_print(data.error.to.stream, data.context.set.error, "' must not be an empty string.%c", f_string_eol[0]);
+ fl_color_print(data.error.to.stream, data.context.set.error, "' must not be an empty string.%c", f_string_eol_s[0]);
return F_status_set_error(F_parameter);
}
fl_color_print(data.error.to.stream, data.context.set.notable, "%llu", depths->array[i].depth);
fl_color_print(data.error.to.stream, data.context.set.error, "' may only be specified once for the parameter '");
fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_depth);
- fl_color_print(data.error.to.stream, data.context.set.error, "'.%c", f_string_eol[0]);
+ fl_color_print(data.error.to.stream, data.context.set.error, "'.%c", f_string_eol_s[0]);
return F_status_set_error(F_parameter);
}
fl_color_print(data.error.to.stream, data.context.set.notable, "%llu", depths->array[i].depth);
fl_color_print(data.error.to.stream, data.context.set.error, "' before the value '");
fl_color_print(data.error.to.stream, data.context.set.notable, "%llu", depths->array[j].depth);
- fl_color_print(data.error.to.stream, data.context.set.error, "'.%c", f_string_eol[0]);
+ fl_color_print(data.error.to.stream, data.context.set.error, "'.%c", f_string_eol_s[0]);
return F_status_set_error(F_parameter);
}
fl_string_dynamic_delete(&data->buffer);
if (data->parameters[fss_extended_read_parameter_total].result == f_console_result_found) {
- fprintf(data->output.stream, "0%c", f_string_eol[0]);
+ fprintf(data->output.stream, "0%c", f_string_eol_s[0]);
return F_none;
}
if (data->parameters[fss_extended_read_parameter_total].result == f_console_result_found) {
if (depths.array[0].index_at > 0) {
if (depths.array[0].value_at < data->objects.used && names[depths.array[0].value_at]) {
- fprintf(data->output.stream, "1%c", f_string_eol[0]);
+ fprintf(data->output.stream, "1%c", f_string_eol_s[0]);
}
else {
- fprintf(data->output.stream, "0%c", f_string_eol[0]);
+ fprintf(data->output.stream, "0%c", f_string_eol_s[0]);
}
}
else if (depths.array[0].index_name > 0) {
total++;
} // for
- fprintf(data->output.stream, "%llu%c", total, f_string_eol[0]);
+ fprintf(data->output.stream, "%llu%c", total, f_string_eol_s[0]);
}
else {
- fprintf(data->output.stream, "%llu%c", data->objects.used, f_string_eol[0]);
+ fprintf(data->output.stream, "%llu%c", data->objects.used, f_string_eol_s[0]);
}
return F_none;
if (depths.array[0].index_at > 0) {
if (depths.array[0].value_at >= data->objects.used) {
if (names[depths.array[0].value_at] && data->parameters[fss_extended_read_parameter_total].result == f_console_result_found) {
- fprintf(data->output.stream, "0%c", f_string_eol[0]);
+ fprintf(data->output.stream, "0%c", f_string_eol_s[0]);
}
return F_none;
if (at == depths.array[0].value_at) {
if (data->parameters[fss_extended_read_parameter_total].result == f_console_result_found) {
if (!data->contents.array[i].used) {
- fprintf(data->output.stream, "0%c", f_string_eol[0]);
+ fprintf(data->output.stream, "0%c", f_string_eol_s[0]);
}
else {
- fprintf(data->output.stream, "1%c", f_string_eol[0]);
+ fprintf(data->output.stream, "1%c", f_string_eol_s[0]);
}
return F_none;
total++;
} // for
- fprintf(data->output.stream, "%llu%c", total, f_string_eol[0]);
+ fprintf(data->output.stream, "%llu%c", total, f_string_eol_s[0]);
return F_none;
}
fll_program_print_help_option(output, context, f_console_standard_short_debug, f_console_standard_long_debug, f_console_symbol_short_disable, f_console_symbol_long_disable, " Enable debugging, inceasing verbosity beyond normal output.");
fll_program_print_help_option(output, context, f_console_standard_short_version, f_console_standard_long_version, f_console_symbol_short_disable, f_console_symbol_long_disable, " Print only the version number.");
- fprintf(output.stream, "%c", f_string_eol[0]);
+ fprintf(output.stream, "%c", f_string_eol_s[0]);
fll_program_print_help_option(output, context, fss_extended_write_short_file, fss_extended_write_long_file, f_console_symbol_short_enable, f_console_symbol_long_enable, " Specify a file to send output to.");
fll_program_print_help_option(output, context, fss_extended_write_short_content, fss_extended_write_long_content, f_console_symbol_short_enable, f_console_symbol_long_enable, "The Content to output.");
fl_color_print(output.stream, context.set.notable, "\\b");
fprintf(output.stream, "' (");
fl_color_print(output.stream, context.set.notable, "U+0008");
- fprintf(output.stream, ") to designate the start of a Content.%c", f_string_eol[0]);
+ fprintf(output.stream, ") to designate the start of a Content.%c", f_string_eol_s[0]);
fprintf(output.stream, " The pipe uses the Form Feed character '");
fl_color_print(output.stream, context.set.notable, "\\f");
fprintf(output.stream, "' (");
fl_color_print(output.stream, context.set.notable, "U+000C");
- fprintf(output.stream, ") to designate the end of the last Content.%c", f_string_eol[0]);
+ fprintf(output.stream, ") to designate the end of the last Content.%c", f_string_eol_s[0]);
fprintf(output.stream, " The pipe uses the Vertical Line character '");
fl_color_print(output.stream, context.set.notable, "\\v");
fprintf(output.stream, "' (");
fl_color_print(output.stream, context.set.notable, "U+000B");
- fprintf(output.stream, ") is used to ignore a content range, which does nothing in this program.%c", f_string_eol[0]);
+ fprintf(output.stream, ") is used to ignore a content range, which does nothing in this program.%c", f_string_eol_s[0]);
fprintf(output.stream, " For the pipe, an Object is terminated by either a Backspace character '");
fl_color_print(output.stream, context.set.notable, "\\b");
fl_color_print(output.stream, context.set.notable, "\\f");
fprintf(output.stream, "' (");
fl_color_print(output.stream, context.set.notable, "U+000C");
- fprintf(output.stream, ").%c", f_string_eol[0]);
+ fprintf(output.stream, ").%c", f_string_eol_s[0]);
- fprintf(output.stream, " The end of the pipe represents the end of any Object or Content.%c", f_string_eol[0]);
+ fprintf(output.stream, " The end of the pipe represents the end of any Object or Content.%c", f_string_eol_s[0]);
- fprintf(output.stream, "%c", f_string_eol[0]);
+ fprintf(output.stream, "%c", f_string_eol_s[0]);
fprintf(output.stream, " The FSS-0001 (Extended) specification does not support multi-line Content, therefore the parameter '");
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_write_long_prepend);
- fprintf(output.stream, "' does nothing.%c", f_string_eol[0]);
+ fprintf(output.stream, "' does nothing.%c", f_string_eol_s[0]);
- fprintf(output.stream, "%c", f_string_eol[0]);
+ fprintf(output.stream, "%c", f_string_eol_s[0]);
fprintf(output.stream, " This program does not use the parameter '");
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_write_long_ignore);
- fprintf(output.stream, "', which therefore does nothing.%c", f_string_eol[0]);
- fprintf(output.stream, " This parameter requires two values.%c", f_string_eol[0]);
+ fprintf(output.stream, "', which therefore does nothing.%c", f_string_eol_s[0]);
+ fprintf(output.stream, " This parameter requires two values.%c", f_string_eol_s[0]);
- fprintf(output.stream, "%c", f_string_eol[0]);
+ fprintf(output.stream, "%c", f_string_eol_s[0]);
return F_none;
}
status = fll_program_parameter_process(arguments, parameters, choices, F_true, &data->remaining, &data->context);
- data->error.context = data->context.set.error;
- data->error.notable = data->context.set.notable;
+ if (data->context.set.error.before) {
+ data->error.context = data->context.set.error;
+ data->error.notable = data->context.set.notable;
+ }
+ else {
+ data->context.set.warning = f_color_set_empty_s;
+ data->context.set.error = f_color_set_empty_s;
+ data->context.set.title = f_color_set_empty_s;
+ data->context.set.notable = f_color_set_empty_s;
+ data->context.set.important = f_color_set_empty_s;
+ data->context.set.standout = f_color_set_empty_s;
+ data->context.set.normal = f_color_set_empty_s;
+ data->context.set.normal_reset = f_color_set_empty_s;
+
+ data->error.context = f_color_set_empty_s;
+ data->error.notable = f_color_set_empty_s;
+ }
if (F_status_is_error(status)) {
fss_extended_write_delete_data(data);
if (data->parameters[fss_extended_write_parameter_file].result == f_console_result_additional) {
if (data->parameters[fss_extended_write_parameter_file].values.used > 1) {
if (data->error.verbosity != f_console_verbosity_quiet) {
- fprintf(data->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_write_long_file);
- fl_color_print(data->error.to.stream, data->context.set.error, "' may only be specified once.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' may only be specified once.%c", f_string_eol_s[0]);
}
status = F_status_set_error(F_parameter);
else if (data->parameters[fss_extended_write_parameter_content].locations.used && data->parameters[fss_extended_write_parameter_partial].locations.used) {
if (data->parameters[fss_extended_write_parameter_content].result == f_console_result_additional) {
if (data->error.verbosity != f_console_verbosity_quiet) {
- fprintf(data->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data->error.to.stream, data->context.set.error, "%sThe '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_write_long_partial);
fl_color_print(data->error.to.stream, data->context.set.error, "' parameter only allows either the '");
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_write_long_object);
fl_color_print(data->error.to.stream, data->context.set.error, "' parameter or the '");
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_write_long_content);
- fl_color_print(data->error.to.stream, data->context.set.error, "' parameter, but not both.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' parameter, but not both.%c", f_string_eol_s[0]);
}
status = F_status_set_error(F_parameter);
if (location_object > location_content || location_object == location_content && location_sub_object > location_sub_content) {
if (data->error.verbosity != f_console_verbosity_quiet) {
- fprintf(data->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data->error.to.stream, data->context.set.error, "%sEach ", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_write_long_object);
fl_color_print(data->error.to.stream, data->context.set.error, "' parameter must be specified before a '");
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_write_long_content);
- fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol_s[0]);
}
status = F_status_set_error(F_parameter);
if (location_object > location_content || location_object == location_content && location_sub_object > location_sub_content) {
if (data->error.verbosity != f_console_verbosity_quiet) {
- fprintf(data->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data->error.to.stream, data->context.set.error, "%sEach ", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_write_long_object);
fl_color_print(data->error.to.stream, data->context.set.error, "' parameter must have at least one '");
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_write_long_content);
- fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol_s[0]);
}
status = F_status_set_error(F_parameter);
}
else if (!data->process_pipe) {
if (data->error.verbosity != f_console_verbosity_quiet) {
- fprintf(data->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data->error.to.stream, data->context.set.error, "%sThis requires either piped data or the use of the '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_write_long_object);
fl_color_print(data->error.to.stream, data->context.set.error, "' parameter with the '");
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_write_long_content);
- fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol_s[0]);
}
status = F_status_set_error(F_parameter);
if (F_status_is_error_not(status) && data->process_pipe) {
if (data->parameters[fss_extended_write_parameter_partial].result == f_console_result_found) {
if (data->error.verbosity != f_console_verbosity_quiet) {
- fprintf(data->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data->error.to.stream, data->context.set.error, "%sThe '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_write_long_partial);
- fl_color_print(data->error.to.stream, data->context.set.error, "' parameter cannot be used when processing a pipe.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' parameter cannot be used when processing a pipe.%c", f_string_eol_s[0]);
}
status = F_status_set_error(F_parameter);
if (F_status_is_error_not(status)) {
if (data->parameters[fss_extended_write_parameter_prepend].result == f_console_result_found) {
if (data->error.verbosity != f_console_verbosity_quiet) {
- fprintf(data->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_write_long_prepend);
- fl_color_print(data->error.to.stream, data->context.set.error, "' was specified, but no value was given.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' was specified, but no value was given.%c", f_string_eol_s[0]);
}
status = F_status_set_error(F_parameter);
if (status == F_false) {
if (data->error.verbosity != f_console_verbosity_quiet) {
- fprintf(data->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data->error.to.stream, data->context.set.error, "%sThe value for the parameter '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_write_long_prepend);
- fl_color_print(data->error.to.stream, data->context.set.error, "' must only contain whitespace.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' must only contain whitespace.%c", f_string_eol_s[0]);
}
status = F_status_set_error(F_parameter);
}
else {
if (data->error.verbosity != f_console_verbosity_quiet) {
- fprintf(data->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data->error.to.stream, data->context.set.error, "%sThe value for the parameter '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_write_long_prepend);
- fl_color_print(data->error.to.stream, data->context.set.error, "' must not be an empty string.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' must not be an empty string.%c", f_string_eol_s[0]);
}
status = F_status_set_error(F_parameter);
if (F_status_is_error_not(status)) {
if (data->parameters[fss_extended_write_parameter_ignore].result == f_console_result_found) {
if (data->error.verbosity != f_console_verbosity_quiet) {
- fprintf(data->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_write_long_ignore);
- fl_color_print(data->error.to.stream, data->context.set.error, "' was specified, but no values were given.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' was specified, but no values were given.%c", f_string_eol_s[0]);
}
status = F_status_set_error(F_parameter);
const f_array_length_t total_arguments = data->parameters[fss_extended_write_parameter_ignore].values.used;
if (total_locations * 2 > total_arguments) {
- fprintf(data->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_write_long_ignore);
- fl_color_print(data->error.to.stream, data->context.set.error, "' requires two values.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' requires two values.%c", f_string_eol_s[0]);
status = F_status_set_error(F_parameter);
}
if (F_status_is_error(status)) {
if (data->error.verbosity != f_console_verbosity_quiet) {
- fprintf(data->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data->error.to.stream, data->context.set.error, "%sWhile processing the ", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "input pipe");
- fl_color_print(data->error.to.stream, data->context.set.error, ".%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, ".%c", f_string_eol_s[0]);
}
}
}
if (F_status_is_error(status)) {
if (data->error.verbosity != f_console_verbosity_quiet) {
- fprintf(data->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data->error.to.stream, data->context.set.error, "%sWhile processing the ", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "input arguments");
- fl_color_print(data->error.to.stream, data->context.set.error, ".%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, ".%c", f_string_eol_s[0]);
}
}
else if (data->error.verbosity != f_console_verbosity_quiet && data->parameters[fss_extended_write_parameter_file].result == f_console_result_none) {
// ensure there is always a newline at the end, unless in quiet mode.
- fprintf(data->output.stream, "%c", f_string_eol[0]);
+ fprintf(data->output.stream, "%c", f_string_eol_s[0]);
}
}
// ensure a newline is always put at the end of the program execution, unless in quiet mode.
if (data->error.verbosity != f_console_verbosity_quiet) {
if (F_status_is_error(status)) {
- fprintf(data->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data->error.to.stream, "%c", f_string_eol_s[0]);
}
}
return;
}
- fprintf(data.error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data.error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data.error.to.stream, data.context.set.error, "%sMust specify the '", fll_error_print_error);
fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_write_long_object);
fl_color_print(data.error.to.stream, data.context.set.error, "' parameter at least once and the '");
fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_write_long_content);
fl_color_print(data.error.to.stream, data.context.set.error, "' parameter one or more times when not specifying the ");
fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", f_console_symbol_long_enable, fss_extended_write_long_partial);
- fl_color_print(data.error.to.stream, data.context.set.error, "' parameter.%c", f_string_eol[0]);
+ fl_color_print(data.error.to.stream, data.context.set.error, "' parameter.%c", f_string_eol_s[0]);
}
#endif // _di_fss_extended_write_error_parameter_at_least_once_print_
return;
}
- fprintf(data.error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data.error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data.error.to.stream, data.context.set.error, "%sThe parameter '", fll_error_print_error);
fl_color_print(data.error.to.stream, data.context.set.notable, "%s%s", symbol, parameter);
- fl_color_print(data.error.to.stream, data.context.set.error, "' was specified, but no value was given.%c", f_string_eol[0]);
+ fl_color_print(data.error.to.stream, data.context.set.error, "' was specified, but no value was given.%c", f_string_eol_s[0]);
}
#endif // _di_fss_extended_write_error_parameter_value_missing_print_
return;
}
- fprintf(data.error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data.error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data.error.to.stream, data.context.set.error, "%sThis standard does not support end of line character '", fll_error_print_error);
fl_color_print(data.error.to.stream, data.context.set.notable, "\\n");
- fl_color_print(data.error.to.stream, data.context.set.error, "'.%c", f_string_eol[0]);
+ fl_color_print(data.error.to.stream, data.context.set.error, "'.%c", f_string_eol_s[0]);
}
#endif // _di_fss_extended_write_error_parameter_unsupported_eol_print_
fll_program_print_help_option(output, context, f_console_standard_short_debug, f_console_standard_long_debug, f_console_symbol_short_disable, f_console_symbol_long_disable, " Enable debugging, inceasing verbosity beyond normal output.");
fll_program_print_help_option(output, context, f_console_standard_short_version, f_console_standard_long_version, f_console_symbol_short_disable, f_console_symbol_long_disable, " Print only the version number.");
- fprintf(output.stream, "%c", f_string_eol[0]);
+ fprintf(output.stream, "%c", f_string_eol_s[0]);
fll_program_print_help_option(output, context, fss_status_code_short_is_fine, fss_status_code_long_is_fine, f_console_symbol_short_enable, f_console_symbol_long_enable, " Print F_true if the error code is not an error, F_false otherwise.");
fll_program_print_help_option(output, context, fss_status_code_short_is_warning, fss_status_code_long_is_warning, f_console_symbol_short_enable, f_console_symbol_long_enable, "Print F_true if the error code is a warning, F_false otherwise.");
status = fll_program_parameter_process(arguments, parameters, choices, F_true, &data->remaining, &data->context);
- data->error.context = data->context.set.error;
- data->error.notable = data->context.set.notable;
+ if (data->context.set.error.before) {
+ data->error.context = data->context.set.error;
+ data->error.notable = data->context.set.notable;
+ }
+ else {
+ data->context.set.warning = f_color_set_empty_s;
+ data->context.set.error = f_color_set_empty_s;
+ data->context.set.title = f_color_set_empty_s;
+ data->context.set.notable = f_color_set_empty_s;
+ data->context.set.important = f_color_set_empty_s;
+ data->context.set.standout = f_color_set_empty_s;
+ data->context.set.normal = f_color_set_empty_s;
+ data->context.set.normal_reset = f_color_set_empty_s;
+
+ data->error.context = f_color_set_empty_s;
+ data->error.notable = f_color_set_empty_s;
+ }
if (F_status_is_error(status)) {
fss_status_code_delete_data(data);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_status_code_long_is_error);
fl_color_print(data->error.to.stream, data->context.set.error, "' cannot be used with the parameter ");
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_status_code_long_is_warning);
- fl_color_print(data->error.to.stream, data->context.set.error, ".%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, ".%c", f_string_eol_s[0]);
fss_status_code_delete_data(data);
return F_status_set_error(status);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_status_code_long_is_error);
fl_color_print(data->error.to.stream, data->context.set.error, "' cannot be used with the parameter ");
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_status_code_long_is_fine);
- fl_color_print(data->error.to.stream, data->context.set.error, ".%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, ".%c", f_string_eol_s[0]);
fss_status_code_delete_data(data);
return F_status_set_error(status);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_status_code_long_is_warning);
fl_color_print(data->error.to.stream, data->context.set.error, "' cannot be used with the parameter ");
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, fss_status_code_long_is_fine);
- fl_color_print(data->error.to.stream, data->context.set.error, ".%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, ".%c", f_string_eol_s[0]);
fss_status_code_delete_data(data);
return F_status_set_error(status);
}
if (data->remaining.used == 0 && !data->process_pipe) {
- fl_color_print(data->error.to.stream, data->context.set.error, "%sYou failed to specify an error code.%c", fll_error_print_error, f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "%sYou failed to specify an error code.%c", fll_error_print_error, f_string_eol_s[0]);
fss_status_code_delete_data(data);
return F_status_set_error(F_parameter);
status = fl_conversion_string_to_number_unsigned(value, &number, range);
if (status == F_none) {
- fl_color_print(data.output.stream, data.context.set.error, "invalid name%c", f_string_eol[0]);
+ fl_color_print(data.output.stream, data.context.set.error, "invalid name%c", f_string_eol_s[0]);
return F_status_set_error(F_parameter);
}
if (status == F_data_not || F_status_set_fine(status) == F_parameter) {
- fl_color_print(data.output.stream, data.context.set.error, "invalid data%c", f_string_eol[0]);
+ fl_color_print(data.output.stream, data.context.set.error, "invalid data%c", f_string_eol_s[0]);
return status;
}
if (F_status_is_error(status)) {
if (F_status_set_fine(status) == F_data) {
- fl_color_print(data.output.stream, data.context.set.error, "unknown name%c", f_string_eol[0]);
+ fl_color_print(data.output.stream, data.context.set.error, "unknown name%c", f_string_eol_s[0]);
}
else {
- fl_color_print(data.output.stream, data.context.set.error, "failed to convert%c", f_string_eol[0]);
+ fl_color_print(data.output.stream, data.context.set.error, "failed to convert%c", f_string_eol_s[0]);
}
return status;
}
if (status == F_data) {
- fl_color_print(data.output.stream, data.context.set.warning, "unknown code%c", f_string_eol[0]);
+ fl_color_print(data.output.stream, data.context.set.warning, "unknown code%c", f_string_eol_s[0]);
return F_none;
}
if (F_status_is_error(status)) {
if (F_status_set_fine(status) == F_data) {
- fl_color_print(data.output.stream, data.context.set.error, "unknown code%c", f_string_eol[0]);
+ fl_color_print(data.output.stream, data.context.set.error, "unknown code%c", f_string_eol_s[0]);
}
else {
- fl_color_print(data.output.stream, data.context.set.error, "failed to convert%c", f_string_eol[0]);
+ fl_color_print(data.output.stream, data.context.set.error, "failed to convert%c", f_string_eol_s[0]);
}
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(data.output.stream, data.context.set.error, "out of range%c", f_string_eol[0]);
+ fl_color_print(data.output.stream, data.context.set.error, "out of range%c", f_string_eol_s[0]);
return status;
}
if (F_status_is_error(status)) {
if (F_status_set_fine(status) == F_number_negative) {
- fl_color_print(data.output.stream, data.context.set.error, "out of range%c", f_string_eol[0]);
+ fl_color_print(data.output.stream, data.context.set.error, "out of range%c", f_string_eol_s[0]);
}
else {
- fl_color_print(data.output.stream, data.context.set.error, "invalid number%c", f_string_eol[0]);
+ fl_color_print(data.output.stream, data.context.set.error, "invalid number%c", f_string_eol_s[0]);
}
return status;
fll_program_print_help_option(output, context, f_console_standard_short_debug, f_console_standard_long_debug, f_console_symbol_short_disable, f_console_symbol_long_disable, " Enable debugging, inceasing verbosity beyond normal output.");
fll_program_print_help_option(output, context, f_console_standard_short_version, f_console_standard_long_version, f_console_symbol_short_disable, f_console_symbol_long_disable, " Print only the version number.");
- fprintf(output.stream, "%c", f_string_eol[0]);
+ fprintf(output.stream, "%c", f_string_eol_s[0]);
fll_program_print_help_option(output, context, iki_read_short_at, iki_read_long_at, f_console_symbol_short_enable, f_console_symbol_long_enable, " Select variable at this numeric index.");
fll_program_print_help_option(output, context, iki_read_short_line, iki_read_long_line, f_console_symbol_short_enable, f_console_symbol_long_enable, " Print only the variables at the given line.");
fll_program_print_help_option(output, context, iki_read_short_name, iki_read_long_name, f_console_symbol_short_enable, f_console_symbol_long_enable, " Select variables with this name.");
fll_program_print_help_option(output, context, iki_read_short_whole, iki_read_long_whole, f_console_symbol_short_enable, f_console_symbol_long_enable, "Print all of the data instead of just the variable data.");
- fprintf(output.stream, "%c", f_string_eol[0]);
+ fprintf(output.stream, "%c", f_string_eol_s[0]);
fll_program_print_help_option(output, context, iki_read_short_content, iki_read_long_content, f_console_symbol_short_enable, f_console_symbol_long_enable, "Print the variable content (default).");
fll_program_print_help_option(output, context, iki_read_short_literal, iki_read_long_literal, f_console_symbol_short_enable, f_console_symbol_long_enable, "Print the entire variable (aka: object, content, and syntax).");
fll_program_print_help_option(output, context, iki_read_short_object, iki_read_long_object, f_console_symbol_short_enable, f_console_symbol_long_enable, " Print the variable name (aka: object).");
fll_program_print_help_option(output, context, iki_read_short_total, iki_read_long_total, f_console_symbol_short_enable, f_console_symbol_long_enable, " Print the total number of variables.");
- fprintf(output.stream, "%c", f_string_eol[0]);
+ fprintf(output.stream, "%c", f_string_eol_s[0]);
fll_program_print_help_option(output, context, iki_read_short_substitute, iki_read_long_substitute, f_console_symbol_short_enable, f_console_symbol_long_enable, "Substitute the entire variable for the given name and content value with the given string.");
fl_color_print(output.stream, context.set.important, " Notes:");
- fprintf(output.stream, "%c", f_string_eol[0]);
+ fprintf(output.stream, "%c", f_string_eol_s[0]);
- fprintf(output.stream, " This program will find and print variables, vocabularies, or content following the IKI standard, without focusing on any particular vocabulary specification.%c", f_string_eol[0]);
+ fprintf(output.stream, " This program will find and print variables, vocabularies, or content following the IKI standard, without focusing on any particular vocabulary specification.%c", f_string_eol_s[0]);
- fprintf(output.stream, "%c", f_string_eol[0]);
+ fprintf(output.stream, "%c", f_string_eol_s[0]);
fprintf(output.stream, " The ");
fl_color_print(output.stream, context.set.notable, "%s%s", f_console_symbol_long_enable, iki_read_long_substitute);
fl_color_print(output.stream, context.set.notable, "<");
fprintf(output.stream, "%s", iki_read_substitution_with);
fl_color_print(output.stream, context.set.notable, ">");
- fprintf(output.stream, ".%c", f_string_eol[0]);
+ fprintf(output.stream, ".%c", f_string_eol_s[0]);
fl_color_print(output.stream, context.set.notable, " %s", iki_read_substitution_vocabulary);
- fprintf(output.stream, ": The name of the vocabulary whose content is to be substituted.%c", f_string_eol[0]);
+ fprintf(output.stream, ": The name of the vocabulary whose content is to be substituted.%c", f_string_eol_s[0]);
fl_color_print(output.stream, context.set.notable, " %s", iki_read_substitution_replace);
- fprintf(output.stream, ": The content matching this exact string will be substituted.%c", f_string_eol[0]);
+ fprintf(output.stream, ": The content matching this exact string will be substituted.%c", f_string_eol_s[0]);
fl_color_print(output.stream, context.set.notable, " %s", iki_read_substitution_with);
- fprintf(output.stream, ": The new string to use as the substitute.%c", f_string_eol[0]);
+ fprintf(output.stream, ": The new string to use as the substitute.%c", f_string_eol_s[0]);
- fprintf(output.stream, "%c", f_string_eol[0]);
+ fprintf(output.stream, "%c", f_string_eol_s[0]);
- fprintf(output.stream, " The vocabulary and replacement are case-sensitive and must exactly match.%c", f_string_eol[0]);
+ fprintf(output.stream, " The vocabulary and replacement are case-sensitive and must exactly match.%c", f_string_eol_s[0]);
- fprintf(output.stream, "%c", f_string_eol[0]);
+ fprintf(output.stream, "%c", f_string_eol_s[0]);
- fprintf(output.stream, " The default behavior is to only display content portion of the IKI variable.%c", f_string_eol[0]);
+ fprintf(output.stream, " The default behavior is to only display content portion of the IKI variable.%c", f_string_eol_s[0]);
- fprintf(output.stream, "%c", f_string_eol[0]);
+ fprintf(output.stream, "%c", f_string_eol_s[0]);
return F_none;
}
status = fll_program_parameter_process(arguments, parameters, choices, F_true, &data->remaining, &data->context);
- data->error.context = data->context.set.error;
- data->error.notable = data->context.set.notable;
+ if (data->context.set.error.before) {
+ data->error.context = data->context.set.error;
+ data->error.notable = data->context.set.notable;
+ }
+ else {
+ data->context.set.warning = f_color_set_empty_s;
+ data->context.set.error = f_color_set_empty_s;
+ data->context.set.title = f_color_set_empty_s;
+ data->context.set.notable = f_color_set_empty_s;
+ data->context.set.important = f_color_set_empty_s;
+ data->context.set.standout = f_color_set_empty_s;
+ data->context.set.normal = f_color_set_empty_s;
+ data->context.set.normal_reset = f_color_set_empty_s;
+
+ data->error.context = f_color_set_empty_s;
+ data->error.notable = f_color_set_empty_s;
+ }
if (F_status_is_error(status)) {
fll_error_print(data->error, F_status_set_fine(status), "fll_program_parameter_process", F_true);
if (data->error.verbosity == f_console_verbosity_verbose) {
- fprintf(data->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data->error.to.stream, "%c", f_string_eol_s[0]);
}
iki_read_delete_data(data);
if (data->remaining.used > 0 || data->process_pipe) {
if (data->parameters[iki_read_parameter_at].result == f_console_result_found) {
if (data->error.verbosity != f_console_verbosity_quiet) {
- fprintf(data->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, iki_read_long_at);
- fl_color_print(data->error.to.stream, data->context.set.error, "' requires a positive number.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' requires a positive number.%c", f_string_eol_s[0]);
}
status = F_status_set_error(F_parameter);
if (data->parameters[iki_read_parameter_total].result == f_console_result_found) {
if (data->error.verbosity != f_console_verbosity_quiet) {
- fprintf(data->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data->error.to.stream, data->context.set.error, "%sCannot specify the '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, iki_read_long_at);
fl_color_print(data->error.to.stream, data->context.set.error, "' parameter with the '");
if (data->parameters[iki_read_parameter_line].result == f_console_result_found) {
if (data->error.verbosity != f_console_verbosity_quiet) {
- fprintf(data->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, iki_read_long_line);
- fl_color_print(data->error.to.stream, data->context.set.error, "' requires a positive number.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' requires a positive number.%c", f_string_eol_s[0]);
}
status = F_status_set_error(F_parameter);
if (data->parameters[iki_read_parameter_name].result == f_console_result_found) {
if (data->error.verbosity != f_console_verbosity_quiet) {
- fprintf(data->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, iki_read_long_name);
- fl_color_print(data->error.to.stream, data->context.set.error, "' requires a string.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' requires a string.%c", f_string_eol_s[0]);
}
status = F_status_set_error(F_parameter);
if (data->parameters[iki_read_parameter_substitute].result != f_console_result_none) {
if (data->parameters[iki_read_parameter_substitute].result == f_console_result_found || data->parameters[iki_read_parameter_substitute].values.used % 3 != 0) {
if (data->error.verbosity != f_console_verbosity_quiet) {
- fprintf(data->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, iki_read_long_substitute);
- fl_color_print(data->error.to.stream, data->context.set.error, "' requires 3 strings.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' requires 3 strings.%c", f_string_eol_s[0]);
}
status = F_status_set_error(F_parameter);
if (data->parameters[iki_read_parameter_total].result == f_console_result_found) {
if (data->error.verbosity != f_console_verbosity_quiet) {
- fprintf(data->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data->error.to.stream, data->context.set.error, "%sCannot specify the '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, iki_read_long_substitute);
fl_color_print(data->error.to.stream, data->context.set.error, "' parameter with the '");
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, iki_read_long_total);
- fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol_s[0]);
}
status = F_status_set_error(F_parameter);
if (data->parameters[iki_read_parameter_literal].result == f_console_result_found) {
if (data->parameters[iki_read_parameter_object].result == f_console_result_found) {
if (data->error.verbosity != f_console_verbosity_quiet) {
- fprintf(data->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data->error.to.stream, data->context.set.error, "%sCannot specify the '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, iki_read_long_literal);
fl_color_print(data->error.to.stream, data->context.set.error, "' parameter with the '");
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, iki_read_long_object);
- fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol_s[0]);
}
status = F_status_set_error(F_parameter);
if (data->parameters[iki_read_parameter_content].result == f_console_result_found) {
if (data->error.verbosity != f_console_verbosity_quiet) {
- fprintf(data->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data->error.to.stream, data->context.set.error, "%sCannot specify the '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, iki_read_long_literal);
fl_color_print(data->error.to.stream, data->context.set.error, "' parameter with the '");
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, iki_read_long_content);
- fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol_s[0]);
}
status = F_status_set_error(F_parameter);
if (data->parameters[iki_read_parameter_total].result == f_console_result_found) {
if (data->error.verbosity != f_console_verbosity_quiet) {
- fprintf(data->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data->error.to.stream, data->context.set.error, "%sCannot specify the '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, iki_read_long_literal);
fl_color_print(data->error.to.stream, data->context.set.error, "' parameter with the '");
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, iki_read_long_total);
- fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol_s[0]);
}
status = F_status_set_error(F_parameter);
else if (data->parameters[iki_read_parameter_object].result == f_console_result_found) {
if (data->parameters[iki_read_parameter_content].result == f_console_result_found) {
if (data->error.verbosity != f_console_verbosity_quiet) {
- fprintf(data->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data->error.to.stream, data->context.set.error, "%sCannot specify the '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, iki_read_long_object);
fl_color_print(data->error.to.stream, data->context.set.error, "' parameter with the '");
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, iki_read_long_content);
- fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol_s[0]);
}
status = F_status_set_error(F_parameter);
if (data->parameters[iki_read_parameter_total].result == f_console_result_found) {
if (data->error.verbosity != f_console_verbosity_quiet) {
- fprintf(data->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data->error.to.stream, data->context.set.error, "%sCannot specify the '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, iki_read_long_object);
fl_color_print(data->error.to.stream, data->context.set.error, "' parameter with the '");
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, iki_read_long_total);
- fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol_s[0]);
}
status = F_status_set_error(F_parameter);
if (data->parameters[iki_read_parameter_whole].result == f_console_result_found) {
if (data->parameters[iki_read_parameter_total].result == f_console_result_found) {
if (data->error.verbosity != f_console_verbosity_quiet) {
- fprintf(data->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data->error.to.stream, data->context.set.error, "%sCannot specify the '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, iki_read_long_whole);
fl_color_print(data->error.to.stream, data->context.set.error, "' parameter with the '");
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, iki_read_long_total);
- fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' parameter.%c", f_string_eol_s[0]);
}
status = F_status_set_error(F_parameter);
if (F_status_is_error(status)) {
if (data->error.verbosity != f_console_verbosity_quiet) {
- fprintf(data->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data->error.to.stream, "%c", f_string_eol_s[0]);
}
iki_read_delete_data(data);
}
else {
if (data->error.verbosity != f_console_verbosity_quiet) {
- fprintf(data->error.to.stream, "%c", f_string_eol[0]);
- fl_color_print(data->error.to.stream, data->context.set.error, "%syou failed to specify one or more files.%c", fll_error_print_error, f_string_eol[0]);
+ fprintf(data->error.to.stream, "%c", f_string_eol_s[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "%syou failed to specify one or more files.%c", fll_error_print_error, f_string_eol_s[0]);
}
status = F_status_set_error(F_parameter);
// ensure a newline is always put at the end of the program execution, unless in quiet mode.
if (data->error.verbosity != f_console_verbosity_quiet) {
if (F_status_is_error(status) || !data->mode) {
- fprintf(data->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data->error.to.stream, "%c", f_string_eol_s[0]);
}
}
range->start = 0;
if (data->line > 0) {
for (; line < data->line && range->start < data->buffer.used; range->start++) {
- if (data->buffer.string[range->start] == f_string_eol[0]) line++;
+ if (data->buffer.string[range->start] == f_string_eol_s[0]) line++;
} // for
}
if (line == data->line) {
for (range->stop = range->start; range->stop < data->buffer.used; range->stop++) {
- if (data->buffer.string[range->stop] == f_string_eol[0]) break;
+ if (data->buffer.string[range->stop] == f_string_eol_s[0]) break;
} // for
return F_true;
f_print_dynamic_partial(data->output.stream, data->buffer, ranges->array[j]);
}
- printf("%c", f_string_eol[0]);
+ printf("%c", f_string_eol_s[0]);
}
} // for
} // for
f_print_dynamic_partial(data->output.stream, data->buffer, ranges->array[i]);
}
- printf("%c", f_string_eol[0]);
+ printf("%c", f_string_eol_s[0]);
} // for
status = F_none;
fll_program_print_help_option(output, context, f_console_standard_short_debug, f_console_standard_long_debug, f_console_symbol_short_disable, f_console_symbol_long_disable, " Enable debugging, inceasing verbosity beyond normal output.");
fll_program_print_help_option(output, context, f_console_standard_short_version, f_console_standard_long_version, f_console_symbol_short_disable, f_console_symbol_long_disable, " Print only the version number.");
- fprintf(output.stream, "%c", f_string_eol[0]);
+ fprintf(output.stream, "%c", f_string_eol_s[0]);
fll_program_print_help_option(output, context, iki_write_short_file, iki_write_long_file, f_console_symbol_short_enable, f_console_symbol_long_enable, " Specify a file to send output to.");
fll_program_print_help_option(output, context, iki_write_short_content, iki_write_long_content, f_console_symbol_short_enable, f_console_symbol_long_enable, "The content to output.");
fl_color_print(output.stream, context.set.important, " Notes:");
- fprintf(output.stream, "%c", f_string_eol[0]);
+ fprintf(output.stream, "%c", f_string_eol_s[0]);
fprintf(output.stream, " This program will accept object and content strings to generate an IKI string, such as: ");
fl_color_print(output.stream, context.set.notable, "object:\"content\"");
- fprintf(output.stream, ".%c", f_string_eol[0]);
+ fprintf(output.stream, ".%c", f_string_eol_s[0]);
- fprintf(output.stream, " Each object must have a content (and each content must have an object).%c", f_string_eol[0]);
+ fprintf(output.stream, " Each object must have a content (and each content must have an object).%c", f_string_eol_s[0]);
- fprintf(output.stream, "%c", f_string_eol[0]);
+ fprintf(output.stream, "%c", f_string_eol_s[0]);
- fprintf(output.stream, " When piping data to this program, a single end of line (\\n) must be used to separate each object from each content.%c", f_string_eol[0]);
- fprintf(output.stream, " Furthermore, each object must be followed by a content.%c", f_string_eol[0]);
+ fprintf(output.stream, " When piping data to this program, a single end of line (\\n) must be used to separate each object from each content.%c", f_string_eol_s[0]);
+ fprintf(output.stream, " Furthermore, each object must be followed by a content.%c", f_string_eol_s[0]);
- fprintf(output.stream, "%c", f_string_eol[0]);
+ fprintf(output.stream, "%c", f_string_eol_s[0]);
return F_none;
}
status = fll_program_parameter_process(arguments, parameters, choices, F_true, &data->remaining, &data->context);
- data->error.context = data->context.set.error;
- data->error.notable = data->context.set.notable;
+ if (data->context.set.error.before) {
+ data->error.context = data->context.set.error;
+ data->error.notable = data->context.set.notable;
+ }
+ else {
+ data->context.set.warning = f_color_set_empty_s;
+ data->context.set.error = f_color_set_empty_s;
+ data->context.set.title = f_color_set_empty_s;
+ data->context.set.notable = f_color_set_empty_s;
+ data->context.set.important = f_color_set_empty_s;
+ data->context.set.standout = f_color_set_empty_s;
+ data->context.set.normal = f_color_set_empty_s;
+ data->context.set.normal_reset = f_color_set_empty_s;
+
+ data->error.context = f_color_set_empty_s;
+ data->error.notable = f_color_set_empty_s;
+ }
if (F_status_is_error(status)) {
if (data->error.verbosity != f_console_verbosity_quiet) {
fll_error_print(data->error, F_status_set_fine(status), "fll_program_parameter_process", F_true);
- fprintf(data->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data->error.to.stream, "%c", f_string_eol_s[0]);
}
iki_write_delete_data(data);
if (data->error.verbosity != f_console_verbosity_quiet) {
fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, iki_write_long_file);
- fl_color_print(data->error.to.stream, data->context.set.error, "' may only be specified once.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' may only be specified once.%c", f_string_eol_s[0]);
}
status = F_status_set_error(F_parameter);
if (data->error.verbosity != f_console_verbosity_quiet) {
fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, iki_write_long_file);
- fl_color_print(data->error.to.stream, data->context.set.error, "' was specified, but no value was given.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' was specified, but no value was given.%c", f_string_eol_s[0]);
}
status = F_status_set_error(F_parameter);
if (data->error.verbosity != f_console_verbosity_quiet) {
fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, iki_write_long_object);
- fl_color_print(data->error.to.stream, data->context.set.error, "' was specified, but no value was given.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' was specified, but no value was given.%c", f_string_eol_s[0]);
}
status = F_status_set_error(F_parameter);
if (data->error.verbosity != f_console_verbosity_quiet) {
fl_color_print(data->error.to.stream, data->context.set.error, "%sThe parameter '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, iki_write_long_content);
- fl_color_print(data->error.to.stream, data->context.set.error, "' was specified, but no value was given.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' was specified, but no value was given.%c", f_string_eol_s[0]);
}
status = F_status_set_error(F_parameter);
if (F_status_is_error_not(status) && !data->process_pipe) {
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->error.verbosity != f_console_verbosity_quiet) {
- fprintf(data->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data->error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data->error.to.stream, data->context.set.error, "%sNo data provided, either pipe the data or use the '", fll_error_print_error);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, iki_write_long_object);
fl_color_print(data->error.to.stream, data->context.set.error, "' and the '");
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, iki_write_long_content);
- fl_color_print(data->error.to.stream, data->context.set.error, "' parameters.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' parameters.%c", f_string_eol_s[0]);
}
status = F_status_set_error(F_parameter);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, iki_write_long_content);
fl_color_print(data->error.to.stream, data->context.set.error, "' and '");
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, iki_write_long_object);
- fl_color_print(data->error.to.stream, data->context.set.error, "' must be specified the same number of times.%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "' must be specified the same number of times.%c", f_string_eol_s[0]);
}
status = F_status_set_error(F_parameter);
if (!buffer.used) {
if (data->error.verbosity != f_console_verbosity_quiet) {
- fl_color_print(data->error.to.stream, data->context.set.error, "%sThe pipe has no data.%c", fll_error_print_error, f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "%sThe pipe has no data.%c", fll_error_print_error, f_string_eol_s[0]);
}
status = F_status_set_error(F_parameter);
if (object_ended && previous == range.start) {
if (data->error.verbosity != f_console_verbosity_quiet) {
- fl_color_print(data->error.to.stream, data->context.set.error, "%sThe pipe has incorrectly placed newlines.%c", fll_error_print_error, f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "%sThe pipe has incorrectly placed newlines.%c", fll_error_print_error, f_string_eol_s[0]);
}
status = F_status_set_error(F_parameter);
status = iki_write_process(*data, output, object, content, quote, &escaped);
if (F_status_is_error(status)) break;
- fprintf(output.stream, "%c", f_string_eol[0]);
+ fprintf(output.stream, "%c", f_string_eol_s[0]);
object_ended = F_false;
}
if (F_status_is_error_not(status) && object_ended) {
if (data->error.verbosity != f_console_verbosity_quiet) {
- fl_color_print(data->error.to.stream, data->context.set.error, "%sThe pipe has an object without content.%c", fll_error_print_error, f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "%sThe pipe has an object without content.%c", fll_error_print_error, f_string_eol_s[0]);
}
status = F_status_set_error(F_parameter);
status = iki_write_process(*data, output, object, content, quote, &escaped);
if (F_status_is_error(status)) break;
- fprintf(output.stream, "%c", f_string_eol[0]);
+ fprintf(output.stream, "%c", f_string_eol_s[0]);
} // for
// ensure there is always a newline at the end, unless in quiet mode.
if (F_status_is_error_not(status) && data->error.verbosity != f_console_verbosity_quiet && data->parameters[iki_write_parameter_file].result == f_console_result_none) {
- fprintf(data->output.stream, "%c", f_string_eol[0]);
+ fprintf(data->output.stream, "%c", f_string_eol_s[0]);
}
}
// ensure a newline is always put at the end of the program execution, unless in quiet mode.
if (data->error.verbosity != f_console_verbosity_quiet) {
if (F_status_is_error(status)) {
- fprintf(data->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data->error.to.stream, "%c", f_string_eol_s[0]);
}
}
if (!object.used) {
if (data.error.verbosity != f_console_verbosity_quiet) {
- fprintf(data.error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data.error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data.error.to.stream, data.context.set.error, "%sThe object is missing, it must not have a length of ", fll_error_print_error);
fl_color_print(data.error.to.stream, data.context.set.notable, "0");
- fl_color_print(data.error.to.stream, data.context.set.error, ".%c", f_string_eol[0]);
+ fl_color_print(data.error.to.stream, data.context.set.error, ".%c", f_string_eol_s[0]);
}
return F_status_set_error(F_failure);
if (status == F_false) {
if (data.error.verbosity != f_console_verbosity_quiet) {
- fprintf(data.error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data.error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data.error.to.stream, data.context.set.error, "%sThe object '", fll_error_print_error);
fl_color_print_code(data.error.to.stream, data.context.notable);
f_print_dynamic(data.error.to.stream, object);
fl_color_print_code(data.error.to.stream, data.context.reset);
- fl_color_print(data.error.to.stream, data.context.set.error, "' is not a valid IKI object.%c", f_string_eol[0]);
+ fl_color_print(data.error.to.stream, data.context.set.error, "' is not a valid IKI object.%c", f_string_eol_s[0]);
}
return F_status_set_error(F_failure);
fll_program_print_help_usage(output, context, init_name, f_string_empty_s);
fl_color_print(output.stream, context.set.important, " Notes:");
- fprintf(output.stream, "%c", f_string_eol[0]);
+ fprintf(output.stream, "%c", f_string_eol_s[0]);
- fprintf(output.stream, " This program is intended to be directly called by the kernel during boot.%c", f_string_eol[0]);
- fprintf(output.stream, "%c", f_string_eol[0]);
+ fprintf(output.stream, " This program is intended to be directly called by the kernel during boot.%c", f_string_eol_s[0]);
+ fprintf(output.stream, "%c", f_string_eol_s[0]);
// @todo: this should still print the kernel command options.
status = fll_program_parameter_process(arguments, parameters, choices, F_true, &data->remaining, &data->context);
- data->error.context = data->context.set.error;
- data->error.notable = data->context.set.notable;
+ if (data->context.set.error.before) {
+ data->error.context = data->context.set.error;
+ data->error.notable = data->context.set.notable;
+ }
+ else {
+ data->context.set.warning = f_color_set_empty_s;
+ data->context.set.error = f_color_set_empty_s;
+ data->context.set.title = f_color_set_empty_s;
+ data->context.set.notable = f_color_set_empty_s;
+ data->context.set.important = f_color_set_empty_s;
+ data->context.set.standout = f_color_set_empty_s;
+ data->context.set.normal = f_color_set_empty_s;
+ data->context.set.normal_reset = f_color_set_empty_s;
+
+ data->error.context = f_color_set_empty_s;
+ data->error.notable = f_color_set_empty_s;
+ }
if (F_status_is_error(status)) {
if (data->error.verbosity != f_console_verbosity_quiet) {
fll_error_print(data->error, F_status_set_fine(status), "fll_program_parameter_process", F_true);
- fprintf(data->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data->error.to.stream, "%c", f_string_eol_s[0]);
}
init_delete_data(data);
// ensure a newline is always put at the end of the program execution, unless in quiet mode.
if (data->error.verbosity != f_console_verbosity_quiet) {
if (F_status_is_error(status)) {
- fprintf(data->error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data->error.to.stream, "%c", f_string_eol_s[0]);
}
}
case F_signal_termination:
if (data.error.verbosity != f_console_verbosity_quiet) {
- fprintf(data.error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data.error.to.stream, "%c", f_string_eol_s[0]);
fl_color_print(data.error.to.stream, data.context.set.error, "ALERT: An appropriate exit signal has been received, now aborting.");
- fprintf(data.error.to.stream, "%c", f_string_eol[0]);
+ fprintf(data.error.to.stream, "%c", f_string_eol_s[0]);
}
return F_true;
status = fl_conversion_string_to_number_unsigned(value, &number, range);
if (status == F_none) {
- fl_color_print(data.output.stream, data.context.set.error, "invalid name%c", f_string_eol[0]);
+ fl_color_print(data.output.stream, data.context.set.error, "invalid name%c", f_string_eol_s[0]);
return F_status_set_error(F_parameter);
}
if (status == F_data_not || F_status_set_fine(status) == F_parameter) {
- fl_color_print(data.output.stream, data.context.set.error, "invalid data%c", f_string_eol[0]);
+ fl_color_print(data.output.stream, data.context.set.error, "invalid data%c", f_string_eol_s[0]);
return status;
}
if (F_status_is_error(status)) {
if (F_status_set_fine(status) == F_data) {
- fl_color_print(data.output.stream, data.context.set.error, "unknown name%c", f_string_eol[0]);
+ fl_color_print(data.output.stream, data.context.set.error, "unknown name%c", f_string_eol_s[0]);
}
else {
- fl_color_print(data.output.stream, data.context.set.error, "failed to convert%c", f_string_eol[0]);
+ fl_color_print(data.output.stream, data.context.set.error, "failed to convert%c", f_string_eol_s[0]);
}
return status;
}
if (status == F_data) {
- fl_color_print(data.output.stream, data.context.set.warning, "unknown code%c", f_string_eol[0]);
+ fl_color_print(data.output.stream, data.context.set.warning, "unknown code%c", f_string_eol_s[0]);
return F_none;
}
if (F_status_is_error(status)) {
if (F_status_set_fine(status) == F_data) {
- fl_color_print(data.output.stream, data.context.set.error, "unknown code%c", f_string_eol[0]);
+ fl_color_print(data.output.stream, data.context.set.error, "unknown code%c", f_string_eol_s[0]);
}
else {
- fl_color_print(data.output.stream, data.context.set.error, "failed to convert%c", f_string_eol[0]);
+ fl_color_print(data.output.stream, data.context.set.error, "failed to convert%c", f_string_eol_s[0]);
}
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(data.output.stream, data.context.set.error, "out of range%c", f_string_eol[0]);
+ fl_color_print(data.output.stream, data.context.set.error, "out of range%c", f_string_eol_s[0]);
return status;
}
if (F_status_is_error(status)) {
if (F_status_set_fine(status) == F_number_negative) {
- fl_color_print(data.output.stream, data.context.set.error, "out of range%c", f_string_eol[0]);
+ fl_color_print(data.output.stream, data.context.set.error, "out of range%c", f_string_eol_s[0]);
}
else {
- fl_color_print(data.output.stream, data.context.set.error, "invalid number%c", f_string_eol[0]);
+ fl_color_print(data.output.stream, data.context.set.error, "invalid number%c", f_string_eol_s[0]);
}
return status;
fll_program_print_help_option(output, context, f_console_standard_short_debug, f_console_standard_long_debug, f_console_symbol_short_disable, f_console_symbol_long_disable, " Enable debugging, inceasing verbosity beyond normal output.");
fll_program_print_help_option(output, context, f_console_standard_short_version, f_console_standard_long_version, f_console_symbol_short_disable, f_console_symbol_long_disable, " Print only the version number.");
- fprintf(output.stream, "%c", f_string_eol[0]);
+ fprintf(output.stream, "%c", f_string_eol_s[0]);
fll_program_print_help_option(output, context, status_code_short_is_fine, status_code_long_is_fine, f_console_symbol_short_enable, f_console_symbol_long_enable, " Print F_true if the error code is not an error, F_false otherwise.");
fll_program_print_help_option(output, context, status_code_short_is_warning, status_code_long_is_warning, f_console_symbol_short_enable, f_console_symbol_long_enable, "Print F_true if the error code is a warning, F_false otherwise.");
status = fll_program_parameter_process(arguments, parameters, choices, F_true, &data->remaining, &data->context);
- data->error.context = data->context.set.error;
- data->error.notable = data->context.set.notable;
+ if (data->context.set.error.before) {
+ data->error.context = data->context.set.error;
+ data->error.notable = data->context.set.notable;
+ }
+ else {
+ data->context.set.warning = f_color_set_empty_s;
+ data->context.set.error = f_color_set_empty_s;
+ data->context.set.title = f_color_set_empty_s;
+ data->context.set.notable = f_color_set_empty_s;
+ data->context.set.important = f_color_set_empty_s;
+ data->context.set.standout = f_color_set_empty_s;
+ data->context.set.normal = f_color_set_empty_s;
+ data->context.set.normal_reset = f_color_set_empty_s;
+
+ data->error.context = f_color_set_empty_s;
+ data->error.notable = f_color_set_empty_s;
+ }
if (F_status_is_error(status)) {
status_code_delete_data(data);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, status_code_long_is_error);
fl_color_print(data->error.to.stream, data->context.set.error, "' cannot be used with the parameter ");
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, status_code_long_is_warning);
- fl_color_print(data->error.to.stream, data->context.set.error, ".%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, ".%c", f_string_eol_s[0]);
status_code_delete_data(data);
return F_status_set_error(status);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, status_code_long_is_error);
fl_color_print(data->error.to.stream, data->context.set.error, "' cannot be used with the parameter ");
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, status_code_long_is_fine);
- fl_color_print(data->error.to.stream, data->context.set.error, ".%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, ".%c", f_string_eol_s[0]);
status_code_delete_data(data);
return F_status_set_error(status);
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, status_code_long_is_warning);
fl_color_print(data->error.to.stream, data->context.set.error, "' cannot be used with the parameter ");
fl_color_print(data->error.to.stream, data->context.set.notable, "%s%s", f_console_symbol_long_enable, status_code_long_is_fine);
- fl_color_print(data->error.to.stream, data->context.set.error, ".%c", f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, ".%c", f_string_eol_s[0]);
status_code_delete_data(data);
return F_status_set_error(status);
}
if (data->remaining.used == 0 && !data->process_pipe) {
- fl_color_print(data->error.to.stream, data->context.set.error, "%sYou failed to specify a status code.%c", fll_error_print_error, f_string_eol[0]);
+ fl_color_print(data->error.to.stream, data->context.set.error, "%sYou failed to specify a status code.%c", fll_error_print_error, f_string_eol_s[0]);
status_code_delete_data(data);
return F_status_set_error(F_parameter);