The "f_file_t output" should now be "fl_print_t output".
The output verbosity can now be used rather than the error verbosity for output verbosity.
This makes the code more readable and consistent.
The default fl_print_t_initialize is for normal output so also convert the error output initialization to use macro_fl_print_t_initialize_error().
#endif
#ifndef _di_byte_dump_print_help_
- f_status_t byte_dump_print_help(const f_file_t output, const f_color_context_t context) {
+ f_status_t byte_dump_print_help(const f_file_t file, const f_color_context_t context) {
- flockfile(output.stream);
+ flockfile(file.stream);
- fll_program_print_help_header(output, context, byte_dump_name_long, byte_dump_version);
+ fll_program_print_help_header(file, context, byte_dump_name_long, byte_dump_version);
- fll_program_print_help_option(output, context, f_console_standard_short_help_s, f_console_standard_long_help_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print this help message.");
- fll_program_print_help_option(output, context, f_console_standard_short_dark_s, f_console_standard_long_dark_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on dark backgrounds.");
- fll_program_print_help_option(output, context, f_console_standard_short_light_s, f_console_standard_long_light_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on light backgrounds.");
- fll_program_print_help_option(output, context, f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, "Do not output in color.");
- fll_program_print_help_option(output, context, f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Decrease verbosity beyond normal output.");
- fll_program_print_help_option(output, context, f_console_standard_short_normal_s, f_console_standard_long_normal_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Set verbosity to normal output.");
- fll_program_print_help_option(output, context, f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Increase verbosity beyond normal output.");
- fll_program_print_help_option(output, context, f_console_standard_short_debug_s, f_console_standard_long_debug_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Enable debugging, inceasing verbosity beyond normal output.");
- fll_program_print_help_option(output, context, f_console_standard_short_version_s, f_console_standard_long_version_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Print only the version number.");
+ fll_program_print_help_option(file, context, f_console_standard_short_help_s, f_console_standard_long_help_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print this help message.");
+ fll_program_print_help_option(file, context, f_console_standard_short_dark_s, f_console_standard_long_dark_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on dark backgrounds.");
+ fll_program_print_help_option(file, context, f_console_standard_short_light_s, f_console_standard_long_light_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on light backgrounds.");
+ fll_program_print_help_option(file, context, f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, "Do not file in color.");
+ fll_program_print_help_option(file, context, f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Decrease verbosity beyond normal file.");
+ fll_program_print_help_option(file, context, f_console_standard_short_normal_s, f_console_standard_long_normal_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Set verbosity to normal file.");
+ fll_program_print_help_option(file, context, f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Increase verbosity beyond normal file.");
+ fll_program_print_help_option(file, context, f_console_standard_short_debug_s, f_console_standard_long_debug_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Enable debugging, inceasing verbosity beyond normal file.");
+ fll_program_print_help_option(file, context, f_console_standard_short_version_s, f_console_standard_long_version_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Print only the version number.");
- f_print_character(f_string_eol_s[0], output.stream);
+ f_print_character(f_string_eol_s[0], file.stream);
- fll_program_print_help_option(output, context, byte_dump_short_binary, byte_dump_long_binary, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Display binary representation.");
- fll_program_print_help_option(output, context, byte_dump_short_decimal, byte_dump_long_decimal, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Display decimal representation.");
- fll_program_print_help_option(output, context, byte_dump_short_duodecimal, byte_dump_long_duodecimal, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Display duodecimal representation.");
- fll_program_print_help_option(output, context, byte_dump_short_hexidecimal, byte_dump_long_hexidecimal, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Display hexadecimal representation.");
- fll_program_print_help_option(output, context, byte_dump_short_octal, byte_dump_long_octal, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Display octal representation.");
- fll_program_print_help_option(output, context, byte_dump_short_unicode, byte_dump_long_unicode, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Display using Unicode representation for valid Unicode (like: U+0000).");
+ fll_program_print_help_option(file, context, byte_dump_short_binary, byte_dump_long_binary, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Display binary representation.");
+ fll_program_print_help_option(file, context, byte_dump_short_decimal, byte_dump_long_decimal, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Display decimal representation.");
+ fll_program_print_help_option(file, context, byte_dump_short_duodecimal, byte_dump_long_duodecimal, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Display duodecimal representation.");
+ fll_program_print_help_option(file, context, byte_dump_short_hexidecimal, byte_dump_long_hexidecimal, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Display hexadecimal representation.");
+ fll_program_print_help_option(file, context, byte_dump_short_octal, byte_dump_long_octal, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Display octal representation.");
+ fll_program_print_help_option(file, context, byte_dump_short_unicode, byte_dump_long_unicode, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Display using Unicode representation for valid Unicode (like: U+0000).");
- f_print_character(f_string_eol_s[0], output.stream);
+ f_print_character(f_string_eol_s[0], file.stream);
- fll_program_print_help_option(output, context, byte_dump_short_first, byte_dump_long_first, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " 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_s, f_console_symbol_long_enable_s, " 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_s, f_console_symbol_long_enable_s, " Set number of columns of Bytes to display.");
+ fll_program_print_help_option(file, context, byte_dump_short_first, byte_dump_long_first, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Start reading at this byte offset.");
+ fll_program_print_help_option(file, context, byte_dump_short_last, byte_dump_long_last, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Stop reading at this (inclusive) byte offset.");
+ fll_program_print_help_option(file, context, byte_dump_short_width, byte_dump_long_width, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Set number of columns of Bytes to display.");
- f_print_character(f_string_eol_s[0], output.stream);
+ f_print_character(f_string_eol_s[0], file.stream);
- fll_program_print_help_option(output, context, byte_dump_short_text, byte_dump_long_text, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " 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_s, f_console_symbol_long_enable_s, "Use a placeholder character instead of a space for placeholders.");
+ fll_program_print_help_option(file, context, byte_dump_short_text, byte_dump_long_text, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Include a column of text when displaying the bytes.");
+ fll_program_print_help_option(file, context, byte_dump_short_placeholder, byte_dump_long_placeholder, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Use a placeholder character instead of a space for placeholders.");
- f_print_character(f_string_eol_s[0], output.stream);
- f_print_character(f_string_eol_s[0], output.stream);
+ f_print_character(f_string_eol_s[0], file.stream);
+ f_print_character(f_string_eol_s[0], file.stream);
- fl_print_format(" %[Special Options:%] ", output.stream, context.set.important, context.set.important);
+ fl_print_format(" %[Special Options:%] ", file.stream, context.set.important, context.set.important);
- fll_program_print_help_option_long(output, context, byte_dump_long_normal, f_console_symbol_long_enable_s, " Display UTF-8 symbols for ASCII control codes.");
- fll_program_print_help_option_long(output, context, byte_dump_long_simple, f_console_symbol_long_enable_s, " Display spaces for ASCII control codes.");
- fll_program_print_help_option_long(output, context, byte_dump_long_classic, f_console_symbol_long_enable_s, "Display periods for ASCII control codes.");
+ fll_program_print_help_option_long(file, context, byte_dump_long_normal, f_console_symbol_long_enable_s, " Display UTF-8 symbols for ASCII control codes.");
+ fll_program_print_help_option_long(file, context, byte_dump_long_simple, f_console_symbol_long_enable_s, " Display spaces for ASCII control codes.");
+ fll_program_print_help_option_long(file, context, byte_dump_long_classic, f_console_symbol_long_enable_s, "Display periods for ASCII control codes.");
- fll_program_print_help_usage(output, context, byte_dump_name, "filename(s)");
+ fll_program_print_help_usage(file, context, byte_dump_name, "filename(s)");
- fl_print_format(" When using the %[%s%s%] option, some UTF-8 characters may be replaced by your instance and cause display alignment issues.%c%c", output.stream, context.set.notable, f_console_symbol_long_enable_s, byte_dump_long_text, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]);
+ fl_print_format(" When using the %[%s%s%] option, some UTF-8 characters may be replaced by your instance and cause display alignment issues.%c%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, byte_dump_long_text, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]);
- fl_print_format(" Special UTF-8 characters and non-spacing UTF-8 characters may be replaced with a space (or a placeholder when the %[%s%s%] option is used).%c%c", output.stream, context.set.notable, f_console_symbol_long_enable_s, byte_dump_long_placeholder, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]);
+ fl_print_format(" Special UTF-8 characters and non-spacing UTF-8 characters may be replaced with a space (or a placeholder when the %[%s%s%] option is used).%c%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, byte_dump_long_placeholder, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]);
- fl_print_format(" UTF-8 \"Combining\" characters might have a space appended to allow a proper display but this may cause copy and paste issues.%c%c", output.stream, f_string_eol_s[0], f_string_eol_s[0]);
+ fl_print_format(" UTF-8 \"Combining\" characters might have a space appended to allow a proper display but this may cause copy and paste issues.%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]);
- fl_print_format(" When %[%s%s%] is used, any UTF-8 sequences will still be printed in full should any part is found within the requested range.%c%c", output.stream, context.set.notable, f_console_symbol_long_enable_s, byte_dump_long_last, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]);
+ fl_print_format(" When %[%s%s%] is used, any UTF-8 sequences will still be printed in full should any part is found within the requested range.%c%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, byte_dump_long_last, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]);
- fl_print_format(" When using the %[%s%s%] option, invalid Unicode will fallback to being displayed using one of the other modes.%c%c", output.stream, context.set.notable, f_console_symbol_long_enable_s, byte_dump_long_unicode, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]);
+ fl_print_format(" When using the %[%s%s%] option, invalid Unicode will fallback to being displayed using one of the other modes.%c%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, byte_dump_long_unicode, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]);
- funlockfile(output.stream);
+ funlockfile(file.stream);
return F_none;
}
}
if (choice == byte_dump_parameter_verbosity_quiet) {
+ main->output.verbosity = f_console_verbosity_quiet;
main->error.verbosity = f_console_verbosity_quiet;
main->warning.verbosity = f_console_verbosity_quiet;
}
else if (choice == byte_dump_parameter_verbosity_normal) {
+ main->output.verbosity = f_console_verbosity_normal;
main->error.verbosity = f_console_verbosity_normal;
main->warning.verbosity = f_console_verbosity_normal;
}
else if (choice == byte_dump_parameter_verbosity_verbose) {
+ main->output.verbosity = f_console_verbosity_verbose;
main->error.verbosity = f_console_verbosity_verbose;
main->warning.verbosity = f_console_verbosity_verbose;
}
else if (choice == byte_dump_parameter_verbosity_debug) {
+ main->output.verbosity = f_console_verbosity_debug;
main->error.verbosity = f_console_verbosity_debug;
main->warning.verbosity = f_console_verbosity_debug;
}
}
if (main->parameters[byte_dump_parameter_help].result == f_console_result_found) {
- byte_dump_print_help(main->output, main->context);
+ byte_dump_print_help(main->output.to, main->context);
byte_dump_main_delete(main);
return F_none;
}
if (main->parameters[byte_dump_parameter_version].result == f_console_result_found) {
- fll_program_print_version(main->output, byte_dump_version);
+ fll_program_print_version(main->output.to, byte_dump_version);
byte_dump_main_delete(main);
return F_none;
file.id = f_type_descriptor_input;
file.stream = f_type_input;
- flockfile(main->output.stream);
+ flockfile(main->output.to.stream);
- f_print_terminated(f_string_eol_s, main->output.stream);
- fl_print_format("%[Piped Byte Dump: (in ", main->output.stream, main->context.set.title);
+ f_print_terminated(f_string_eol_s, main->output.to.stream);
+ fl_print_format("%[Piped Byte Dump: (in ", main->output.to.stream, main->context.set.title);
if (main->mode == byte_dump_mode_hexidecimal) {
- f_print_terminated("Hexidecimal", main->output.stream);
+ f_print_terminated("Hexidecimal", main->output.to.stream);
}
else if (main->mode == byte_dump_mode_duodecimal) {
- f_print_terminated("Duodecimal", main->output.stream);
+ f_print_terminated("Duodecimal", main->output.to.stream);
}
else if (main->mode == byte_dump_mode_octal) {
- f_print_terminated("Octal", main->output.stream);
+ f_print_terminated("Octal", main->output.to.stream);
}
else if (main->mode == byte_dump_mode_binary) {
- f_print_terminated("Binary", main->output.stream);
+ f_print_terminated("Binary", main->output.to.stream);
}
else if (main->mode == byte_dump_mode_decimal) {
- f_print_terminated("Decimal", main->output.stream);
+ f_print_terminated("Decimal", main->output.to.stream);
}
- fl_print_format(")%]%c", main->output.stream, main->context.set.title, f_string_eol_s[0]);
+ fl_print_format(")%]%c", main->output.to.stream, main->context.set.title, f_string_eol_s[0]);
- funlockfile(main->output.stream);
+ funlockfile(main->output.to.stream);
status = byte_dump_file(*main, 0, file);
return status;
}
- flockfile(main->output.stream);
+ flockfile(main->output.to.stream);
- f_print_terminated(f_string_eol_s, main->output.stream);
- fl_print_format("%[Byte Dump of: %]%[", main->output.stream, main->context.set.title, main->context.set.title, main->context.set.notable);
- fll_print_safely_terminated(arguments.argv[main->remaining.array[counter]], main->output.stream);
- fl_print_format("%] %[(in ", main->output.stream, main->context.set.notable, main->context.set.title);
+ f_print_terminated(f_string_eol_s, main->output.to.stream);
+ fl_print_format("%[Byte Dump of: %]%[", main->output.to.stream, main->context.set.title, main->context.set.title, main->context.set.notable);
+ fll_print_safely_terminated(arguments.argv[main->remaining.array[counter]], main->output.to.stream);
+ fl_print_format("%] %[(in ", main->output.to.stream, main->context.set.notable, main->context.set.title);
if (main->mode == byte_dump_mode_hexidecimal) {
- f_print_terminated("Hexidecimal", main->output.stream);
+ f_print_terminated("Hexidecimal", main->output.to.stream);
}
else if (main->mode == byte_dump_mode_duodecimal) {
- f_print_terminated("Duodecimal", main->output.stream);
+ f_print_terminated("Duodecimal", main->output.to.stream);
}
else if (main->mode == byte_dump_mode_octal) {
- f_print_terminated("Octal", main->output.stream);
+ f_print_terminated("Octal", main->output.to.stream);
}
else if (main->mode == byte_dump_mode_binary) {
- f_print_terminated("Binary", main->output.stream);
+ f_print_terminated("Binary", main->output.to.stream);
}
else if (main->mode == byte_dump_mode_decimal) {
- f_print_terminated("Decimal", main->output.stream);
+ f_print_terminated("Decimal", main->output.to.stream);
}
- fl_print_format(")%]%c", main->output.stream, main->context.set.title, f_string_eol_s[0]);
+ fl_print_format(")%]%c", main->output.to.stream, main->context.set.title, f_string_eol_s[0]);
- funlockfile(main->output.stream);
+ funlockfile(main->output.to.stream);
status = byte_dump_file(*main, arguments.argv[main->remaining.array[counter]], file);
f_array_lengths_t remaining;
bool process_pipe;
- f_file_t output;
+ fl_print_t output;
fl_print_t error;
fl_print_t warning;
byte_dump_console_parameter_t_initialize, \
f_array_lengths_t_initialize, \
F_false, \
- macro_f_file_t_initialize2(f_type_output, f_type_descriptor_output, f_file_flag_write_only), \
fl_print_t_initialize, \
+ macro_fl_print_t_initialize_error(), \
macro_fl_print_t_initialize_warning(), \
0, \
0, \
/**
* Print help.
*
- * @param output
+ * @param file
* The file to print to.
* @param context
* The color context settings.
* F_none on success.
*/
#ifndef _di_byte_dump_print_help_
- extern f_status_t byte_dump_print_help(const f_file_t output, const f_color_context_t context);
+ extern f_status_t byte_dump_print_help(const f_file_t file, const f_color_context_t context);
#endif // _di_byte_dump_print_help_
/**
}
}
- flockfile(main.output.stream);
+ flockfile(main.output.to.stream);
if (byte_dump_print_character_fragment(main, characters, invalid, width_utf, 1, &previous, &cell, &offset) == F_true) {
character_reset = F_true;
position += width_utf;
if (position >= main.last) {
- funlockfile(main.output.stream);
+ funlockfile(main.output.to.stream);
break;
}
++position;
if (position >= main.last) {
- funlockfile(main.output.stream);
+ funlockfile(main.output.to.stream);
break;
}
}
- funlockfile(main.output.stream);
+ funlockfile(main.output.to.stream);
width_utf = -1;
} // for
}
- flockfile(main.output.stream);
+ flockfile(main.output.to.stream);
// Print placeholders to fill out the remaining line and then optionally print the text block.
if (cell.column && cell.column < main.width) {
while (cell.column < main.width) {
if (main.parameters[byte_dump_parameter_unicode].result == f_console_result_found) {
- f_print_terminated(" ", main.output.stream);
+ f_print_terminated(" ", main.output.to.stream);
}
else if (main.mode == byte_dump_mode_hexidecimal) {
- f_print_terminated(" ", main.output.stream);
+ f_print_terminated(" ", main.output.to.stream);
}
else if (main.mode == byte_dump_mode_duodecimal) {
- f_print_terminated(" ", main.output.stream);
+ f_print_terminated(" ", main.output.to.stream);
}
else if (main.mode == byte_dump_mode_octal) {
- f_print_terminated(" ", main.output.stream);
+ f_print_terminated(" ", main.output.to.stream);
}
else if (main.mode == byte_dump_mode_binary) {
- f_print_terminated(" ", main.output.stream);
+ f_print_terminated(" ", main.output.to.stream);
}
else if (main.mode == byte_dump_mode_decimal) {
- f_print_terminated(" ", main.output.stream);
+ f_print_terminated(" ", main.output.to.stream);
}
++cell.column;
if (cell.column < main.width) {
if (main.parameters[byte_dump_parameter_unicode].result == f_console_result_found) {
if (!(cell.column % 4)) {
- f_print_character(f_string_space_s[0], main.output.stream);
+ f_print_character(f_string_space_s[0], main.output.to.stream);
}
}
else if (main.mode == byte_dump_mode_hexidecimal) {
if (!(cell.column % 8)) {
- f_print_character(f_string_space_s[0], main.output.stream);
+ f_print_character(f_string_space_s[0], main.output.to.stream);
}
}
else if (main.mode == byte_dump_mode_duodecimal) {
if (!(cell.column % 6)) {
- f_print_character(f_string_space_s[0], main.output.stream);
+ f_print_character(f_string_space_s[0], main.output.to.stream);
}
}
else if (main.mode == byte_dump_mode_octal) {
if (!(cell.column % 6)) {
- f_print_character(f_string_space_s[0], main.output.stream);
+ f_print_character(f_string_space_s[0], main.output.to.stream);
}
}
else if (main.mode == byte_dump_mode_binary) {
if (!(cell.column % 6)) {
- f_print_character(f_string_space_s[0], main.output.stream);
+ f_print_character(f_string_space_s[0], main.output.to.stream);
}
}
else if (main.mode == byte_dump_mode_decimal) {
if (!(cell.column % 6)) {
- f_print_character(f_string_space_s[0], main.output.stream);
+ f_print_character(f_string_space_s[0], main.output.to.stream);
}
}
}
byte_dump_print_text(main, characters, invalid, &previous, &offset);
}
else {
- f_print_character(f_string_eol_s[0], main.output.stream);
+ f_print_character(f_string_eol_s[0], main.output.to.stream);
}
}
- f_print_character(f_string_eol_s[0], main.output.stream);
+ f_print_character(f_string_eol_s[0], main.output.to.stream);
- funlockfile(main.output.stream);
+ funlockfile(main.output.to.stream);
// make sure to flush standard out to help prevent standard error from causing poblems.
- fflush(main.output.stream);
+ fflush(main.output.to.stream);
if (found_invalid_utf) {
flockfile(main.error.to.stream);
}
if (!cell->column) {
- fl_print_format("%[%016_UL%] ", main.output.stream, main.context.set.notable, cell->row, main.context.set.notable);
+ fl_print_format("%[%016_UL%] ", main.output.to.stream, main.context.set.notable, cell->row, main.context.set.notable);
if (*offset) {
uint8_t offset_to_print = *offset;
while (offset_to_print && cell->column < main.width) {
if (main.parameters[byte_dump_parameter_unicode].result == f_console_result_found) {
- f_print_terminated(" ", main.output.stream);
+ f_print_terminated(" ", main.output.to.stream);
}
else if (main.mode == byte_dump_mode_hexidecimal) {
- f_print_terminated(" ", main.output.stream);
+ f_print_terminated(" ", main.output.to.stream);
}
else if (main.mode == byte_dump_mode_duodecimal) {
- f_print_terminated(" ", main.output.stream);
+ f_print_terminated(" ", main.output.to.stream);
}
else if (main.mode == byte_dump_mode_octal) {
- f_print_terminated(" ", main.output.stream);
+ f_print_terminated(" ", main.output.to.stream);
}
else if (main.mode == byte_dump_mode_binary) {
- f_print_terminated(" ", main.output.stream);
+ f_print_terminated(" ", main.output.to.stream);
}
else if (main.mode == byte_dump_mode_decimal) {
- f_print_terminated(" ", main.output.stream);
+ f_print_terminated(" ", main.output.to.stream);
}
--offset_to_print;
if (cell->column < main.width) {
if (main.parameters[byte_dump_parameter_unicode].result == f_console_result_found) {
if (!(cell->column % 4)) {
- f_print_character(f_string_space_s[0], main.output.stream);
+ f_print_character(f_string_space_s[0], main.output.to.stream);
}
}
else if (main.mode == byte_dump_mode_hexidecimal) {
if (!(cell->column % 8)) {
- f_print_character(f_string_space_s[0], main.output.stream);
+ f_print_character(f_string_space_s[0], main.output.to.stream);
}
}
else if (main.mode == byte_dump_mode_duodecimal) {
if (!(cell->column % 6)) {
- f_print_character(f_string_space_s[0], main.output.stream);
+ f_print_character(f_string_space_s[0], main.output.to.stream);
}
}
else if (main.mode == byte_dump_mode_octal) {
if (!(cell->column % 6)) {
- f_print_character(f_string_space_s[0], main.output.stream);
+ f_print_character(f_string_space_s[0], main.output.to.stream);
}
}
else if (main.mode == byte_dump_mode_binary) {
if (!(cell->column % 4)) {
- f_print_character(f_string_space_s[0], main.output.stream);
+ f_print_character(f_string_space_s[0], main.output.to.stream);
}
}
else if (main.mode == byte_dump_mode_decimal) {
if (!(cell->column % 6)) {
- f_print_character(f_string_space_s[0], main.output.stream);
+ f_print_character(f_string_space_s[0], main.output.to.stream);
}
}
}
}
if (width_utf < 4) {
- fl_print_format(" U+%04_U ", main.output.stream, unicode);
+ fl_print_format(" U+%04_U ", main.output.to.stream, unicode);
}
else {
- fl_print_format(" U+%06_U ", main.output.stream, unicode);
+ fl_print_format(" U+%06_U ", main.output.to.stream, unicode);
}
}
else {
// Pad the characters that are incomplete fragments of an already printed valid Unicode.
- f_print_terminated(" ", main.output.stream);
+ f_print_terminated(" ", main.output.to.stream);
}
}
else {
if (main.mode == byte_dump_mode_hexidecimal) {
if (main.parameters[byte_dump_parameter_unicode].result == f_console_result_found) {
- f_print_terminated(" ", main.output.stream);
+ f_print_terminated(" ", main.output.to.stream);
}
if (invalid[character_current]) {
- fl_print_format(" %[%02_uii%]", main.output.stream, main.context.set.error, (uint8_t) byte, main.context.set.error);
+ fl_print_format(" %[%02_uii%]", main.output.to.stream, main.context.set.error, (uint8_t) byte, main.context.set.error);
}
else {
- fl_print_format(" %02_uii", main.output.stream, (uint8_t) byte);
+ fl_print_format(" %02_uii", main.output.to.stream, (uint8_t) byte);
}
}
else if (main.mode == byte_dump_mode_duodecimal) {
if (main.parameters[byte_dump_parameter_unicode].result == f_console_result_found) {
- f_print_terminated(" ", main.output.stream);
+ f_print_terminated(" ", main.output.to.stream);
}
if (invalid[character_current]) {
- fl_print_format(" %[%03&uii%]", main.output.stream, main.context.set.error, (uint8_t) byte, main.context.set.error);
+ fl_print_format(" %[%03&uii%]", main.output.to.stream, main.context.set.error, (uint8_t) byte, main.context.set.error);
}
else {
- fl_print_format(" %03&uii", main.output.stream, (uint8_t) byte);
+ fl_print_format(" %03&uii", main.output.to.stream, (uint8_t) byte);
}
}
else if (main.mode == byte_dump_mode_octal) {
if (main.parameters[byte_dump_parameter_unicode].result == f_console_result_found) {
- f_print_terminated(" ", main.output.stream);
+ f_print_terminated(" ", main.output.to.stream);
}
if (invalid[character_current]) {
- fl_print_format(" %[%03@uii%]", main.output.stream, main.context.set.error, (uint8_t) byte, main.context.set.error);
+ fl_print_format(" %[%03@uii%]", main.output.to.stream, main.context.set.error, (uint8_t) byte, main.context.set.error);
}
else {
- fl_print_format(" %03@uii", main.output.stream, (uint8_t) byte);
+ fl_print_format(" %03@uii", main.output.to.stream, (uint8_t) byte);
}
}
else if (main.mode == byte_dump_mode_binary) {
if (invalid[character_current]) {
- fl_print_format(" %[%08!uii%]", main.output.stream, main.context.set.error, (uint8_t) byte, main.context.set.error);
+ fl_print_format(" %[%08!uii%]", main.output.to.stream, main.context.set.error, (uint8_t) byte, main.context.set.error);
}
else {
- fl_print_format(" %08!uii", main.output.stream, (uint8_t) byte);
+ fl_print_format(" %08!uii", main.output.to.stream, (uint8_t) byte);
}
}
else if (main.mode == byte_dump_mode_decimal) {
if (main.parameters[byte_dump_parameter_unicode].result == f_console_result_found) {
- f_print_terminated(" ", main.output.stream);
+ f_print_terminated(" ", main.output.to.stream);
}
if (invalid[character_current]) {
- fl_print_format(" %[%3uii%]", main.output.stream, main.context.set.error, (uint8_t) byte, main.context.set.error);
+ fl_print_format(" %[%3uii%]", main.output.to.stream, main.context.set.error, (uint8_t) byte, main.context.set.error);
}
else {
- fl_print_format(" %3uii", main.output.stream, (uint8_t) byte);
+ fl_print_format(" %3uii", main.output.to.stream, (uint8_t) byte);
}
}
}
byte_dump_print_text(main, characters, invalid, previous, offset);
}
else {
- f_print_character(f_string_eol_s[0], main.output.stream);
+ f_print_character(f_string_eol_s[0], main.output.to.stream);
}
cell->column = 0;
else {
if (main.parameters[byte_dump_parameter_unicode].result == f_console_result_found) {
if (!(cell->column % 4)) {
- f_print_character(f_string_space_s[0], main.output.stream);
+ f_print_character(f_string_space_s[0], main.output.to.stream);
}
}
else if (main.mode == byte_dump_mode_hexidecimal) {
if (!(cell->column % 8)) {
- f_print_character(f_string_space_s[0], main.output.stream);
+ f_print_character(f_string_space_s[0], main.output.to.stream);
}
}
else if (main.mode == byte_dump_mode_duodecimal) {
if (!(cell->column % 6)) {
- f_print_character(f_string_space_s[0], main.output.stream);
+ f_print_character(f_string_space_s[0], main.output.to.stream);
}
}
else if (main.mode == byte_dump_mode_octal) {
if (!(cell->column % 6)) {
- f_print_character(f_string_space_s[0], main.output.stream);
+ f_print_character(f_string_space_s[0], main.output.to.stream);
}
}
else if (main.mode == byte_dump_mode_binary) {
if (!(cell->column % 4)) {
- f_print_character(f_string_space_s[0], main.output.stream);
+ f_print_character(f_string_space_s[0], main.output.to.stream);
}
}
else if (main.mode == byte_dump_mode_decimal) {
if (!(cell->column % 6)) {
- f_print_character(f_string_space_s[0], main.output.stream);
+ f_print_character(f_string_space_s[0], main.output.to.stream);
}
}
}
char byte[5] = { 0, 0, 0, 0, 0 };
- f_print_terminated(" ", main.output.stream);
- fl_print_color_terminated(byte_dump_character_wall, main.context.set.notable, main.output.stream);
- f_print_character(f_string_space_s[0], main.output.stream);
+ f_print_terminated(" ", main.output.to.stream);
+ fl_print_color_terminated(byte_dump_character_wall, main.context.set.notable, main.output.to.stream);
+ f_print_character(f_string_space_s[0], main.output.to.stream);
if (*offset) {
if (main.parameters[byte_dump_parameter_classic].result == f_console_result_found) {
while (*offset && j < main.width) {
- f_print_character(f_string_ascii_period_s[0], main.output.stream);
+ f_print_character(f_string_ascii_period_s[0], main.output.to.stream);
--(*offset);
++j;
} // while
while (*offset && j < main.width) {
- f_print_terminated(" ", main.output.stream);
+ f_print_terminated(" ", main.output.to.stream);
if (main.parameters[byte_dump_parameter_placeholder].result == f_console_result_found) {
- fl_print_color_terminated(byte_dump_character_placeholder, main.context.set.warning, main.output.stream);
+ fl_print_color_terminated(byte_dump_character_placeholder, main.context.set.warning, main.output.to.stream);
}
else {
- fl_print_color_terminated(f_string_space_s, main.context.set.warning, main.output.stream);
+ fl_print_color_terminated(f_string_space_s, main.context.set.warning, main.output.to.stream);
}
- f_print_character(f_string_space_s[0], main.output.stream);
+ f_print_character(f_string_space_s[0], main.output.to.stream);
--(*offset);
++j;
} // while
for (; j < previous->bytes && j < main.width; ++j) {
if (previous->invalid) {
- fl_print_color_terminated(byte_dump_character_placeholder, main.context.set.error, main.output.stream);
+ fl_print_color_terminated(byte_dump_character_placeholder, main.context.set.error, main.output.to.stream);
}
else if (main.parameters[byte_dump_parameter_classic].result == f_console_result_found) {
- f_print_character(f_string_ascii_period_s[0], main.output.stream);
+ f_print_character(f_string_ascii_period_s[0], main.output.to.stream);
}
else {
- fl_print_color_terminated(byte_dump_character_placeholder, main.context.set.warning, main.output.stream);
+ fl_print_color_terminated(byte_dump_character_placeholder, main.context.set.warning, main.output.to.stream);
}
} // for
}
else {
for (; j < previous->bytes && j < main.width; ++j) {
- f_print_character(f_string_space_s[0], main.output.stream);
+ f_print_character(f_string_space_s[0], main.output.to.stream);
} // for
}
}
width_utf = macro_f_utf_byte_width_is(c);
if (invalid[i]) {
- fl_print_color_terminated(byte_dump_character_incomplete, main.context.set.error, main.output.stream);
+ fl_print_color_terminated(byte_dump_character_incomplete, main.context.set.error, main.output.to.stream);
}
else if (f_utf_character_is_control(characters.string[i]) == F_true) {
if (main.presentation == byte_dump_presentation_normal) {
- fl_print_color_before(main.context.set.notable, main.output.stream);
- fl_print_color_before(main.context.set.warning, main.output.stream);
+ fl_print_color_before(main.context.set.notable, main.output.to.stream);
+ fl_print_color_before(main.context.set.warning, main.output.to.stream);
if (width_utf) {
byte[0] = c;
byte[1] = 0;
}
- f_print_safely(byte, width_utf ? width_utf : 1, main.output.stream);
+ f_print_safely(byte, width_utf ? width_utf : 1, main.output.to.stream);
}
else {
- f_print_character_safely(c, main.output.stream);
+ f_print_character_safely(c, main.output.to.stream);
}
- fl_print_color_after(main.context.set.warning, main.output.stream);
- fl_print_color_after(main.context.set.notable, main.output.stream);
+ fl_print_color_after(main.context.set.warning, main.output.to.stream);
+ fl_print_color_after(main.context.set.notable, main.output.to.stream);
}
else if (main.presentation == byte_dump_presentation_simple) {
- f_print_character(f_string_space_s[0], main.output.stream);
+ f_print_character(f_string_space_s[0], main.output.to.stream);
if (width_utf > 1) {
- f_print_character(f_string_space_s[0], main.output.stream);
+ f_print_character(f_string_space_s[0], main.output.to.stream);
if (width_utf > 2) {
- f_print_character(f_string_space_s[0], main.output.stream);
+ f_print_character(f_string_space_s[0], main.output.to.stream);
if (width_utf > 3) {
- f_print_character(f_string_space_s[0], main.output.stream);
+ f_print_character(f_string_space_s[0], main.output.to.stream);
}
}
}
}
else if (main.presentation == byte_dump_presentation_classic) {
- f_print_character(f_string_ascii_period_s[0], main.output.stream);
+ f_print_character(f_string_ascii_period_s[0], main.output.to.stream);
if (width_utf > 1) {
- f_print_character(f_string_ascii_period_s[0], main.output.stream);
+ f_print_character(f_string_ascii_period_s[0], main.output.to.stream);
if (width_utf > 2) {
- f_print_character(f_string_ascii_period_s[0], main.output.stream);
+ f_print_character(f_string_ascii_period_s[0], main.output.to.stream);
if (width_utf > 3) {
- f_print_character(f_string_ascii_period_s[0], main.output.stream);
+ f_print_character(f_string_ascii_period_s[0], main.output.to.stream);
}
}
}
}
else if (f_utf_character_is_whitespace(characters.string[i]) == F_true) {
if (main.parameters[byte_dump_parameter_classic].result == f_console_result_found) {
- f_print_character(f_string_ascii_period_s[0], main.output.stream);
+ f_print_character(f_string_ascii_period_s[0], main.output.to.stream);
}
else {
- fl_print_color_before(main.context.set.notable, main.output.stream);
- fl_print_color_terminated(byte_dump_sequence_space, main.context.set.warning, main.output.stream);
- fl_print_color_after(main.context.set.notable, main.output.stream);
+ fl_print_color_before(main.context.set.notable, main.output.to.stream);
+ fl_print_color_terminated(byte_dump_sequence_space, main.context.set.warning, main.output.to.stream);
+ fl_print_color_after(main.context.set.notable, main.output.to.stream);
}
}
else if (f_utf_character_is_zero_width(characters.string[i]) == F_true) {
if (main.presentation == byte_dump_presentation_classic) {
- f_print_character(f_string_ascii_period_s[0], main.output.stream);
+ f_print_character(f_string_ascii_period_s[0], main.output.to.stream);
}
else if (main.parameters[byte_dump_parameter_placeholder].result == f_console_result_found) {
- fl_print_color_before(main.context.set.notable, main.output.stream);
- fl_print_color_terminated(byte_dump_character_placeholder, main.context.set.warning, main.output.stream);
- fl_print_color_after(main.context.set.notable, main.output.stream);
+ fl_print_color_before(main.context.set.notable, main.output.to.stream);
+ fl_print_color_terminated(byte_dump_character_placeholder, main.context.set.warning, main.output.to.stream);
+ fl_print_color_after(main.context.set.notable, main.output.to.stream);
}
else {
- f_print_character(f_string_space_s[0], main.output.stream);
+ f_print_character(f_string_space_s[0], main.output.to.stream);
}
}
else if (width_utf == 2 && characters.string[i] == 0xd89d0000) {
// U+061C
- f_print_character(f_string_space_s[0], main.output.stream);
+ f_print_character(f_string_space_s[0], main.output.to.stream);
}
else if (width_utf == 3 && characters.string[i] >= 0xefbfb000 && characters.string[i] <= 0xefbfbc00) {
// Use space to represent Specials codes.
// 0xefbfbd00 is excluded because it is printable (and is the "Replacement Character" code).
- f_print_character(f_string_space_s[0], main.output.stream);
+ f_print_character(f_string_space_s[0], main.output.to.stream);
}
else if (width_utf == 3 && characters.string[i] >= 0xe290a700 && characters.string[i] <= 0xe290bf00) {
// Use space to represent Control Pictues codes that are not currently defined but are reserved.
- f_print_character(f_string_space_s[0], main.output.stream);
+ f_print_character(f_string_space_s[0], main.output.to.stream);
}
else if (width_utf == 3 && characters.string[i] >= 0xee808000 && characters.string[i] <= 0xefa3bf00) {
// Use space to represent Private Use Area codes.
- f_print_character(f_string_space_s[0], main.output.stream);
+ f_print_character(f_string_space_s[0], main.output.to.stream);
}
else if (width_utf == 4 && characters.string[i] >= 0xf09c80a0 && characters.string[i] <= 0xf09c80bd) {
// Use space to represent Vaiation Selectors Supplement codes.
- f_print_character(f_string_space_s[0], main.output.stream);
+ f_print_character(f_string_space_s[0], main.output.to.stream);
}
else if (width_utf == 4 && characters.string[i] >= 0xf3b08080 && characters.string[i] <= 0xf3bfbfbf) {
// Use space to represent Supplemental Private Use Area-A codes.
- f_print_character(f_string_space_s[0], main.output.stream);
+ f_print_character(f_string_space_s[0], main.output.to.stream);
}
else if (width_utf == 4 && characters.string[i] >= 0xf4808080 && characters.string[i] <= 0xf48fbfbf) {
// Use space to represent Supplemental Private Use Area-B codes.
- f_print_character(f_string_space_s[0], main.output.stream);
+ f_print_character(f_string_space_s[0], main.output.to.stream);
}
else if (width_utf == 1) {
// print invalid placeholder for invalid UTF-8 widths.
if (invalid[i]) {
- fl_print_color_terminated(byte_dump_character_incomplete, main.context.set.error, main.output.stream);
+ fl_print_color_terminated(byte_dump_character_incomplete, main.context.set.error, main.output.to.stream);
}
else {
- fl_print_color_terminated(byte_dump_character_incomplete, main.context.set.warning, main.output.stream);
+ fl_print_color_terminated(byte_dump_character_incomplete, main.context.set.warning, main.output.to.stream);
}
}
else if (width_utf) {
- f_print_character(c, main.output.stream);
+ f_print_character(c, main.output.to.stream);
if (width_utf > 1) {
- f_print_character(macro_f_utf_character_t_to_char_2(characters.string[i]), main.output.stream);
+ f_print_character(macro_f_utf_character_t_to_char_2(characters.string[i]), main.output.to.stream);
if (width_utf > 2) {
- f_print_character(macro_f_utf_character_t_to_char_3(characters.string[i]), main.output.stream);
+ f_print_character(macro_f_utf_character_t_to_char_3(characters.string[i]), main.output.to.stream);
if (width_utf > 3) {
- f_print_character(macro_f_utf_character_t_to_char_4(characters.string[i]), main.output.stream);
+ f_print_character(macro_f_utf_character_t_to_char_4(characters.string[i]), main.output.to.stream);
}
}
}
if (width_utf == 2 && characters.string[i] >= 0xdea60000 && characters.string[i] <= 0xdeb00000) {
// Thana combining codes: U+07A6 to U+07B0.
- f_print_character(f_string_space_s[0], main.output.stream);
+ f_print_character(f_string_space_s[0], main.output.to.stream);
}
else if (width_utf == 2 && characters.string[i] >= 0xcc800000 && characters.string[i] <= 0xcdaf0000) {
- f_print_character(f_string_space_s[0], main.output.stream);
+ f_print_character(f_string_space_s[0], main.output.to.stream);
}
else if (width_utf == 3 && characters.string[i] >= 0xe1aab000 && characters.string[i] <= 0xe1abbf00) {
- f_print_character(f_string_space_s[0], main.output.stream);
+ f_print_character(f_string_space_s[0], main.output.to.stream);
}
else if (width_utf == 3 && characters.string[i] >= 0xe1b78000 && characters.string[i] <= 0xe1b7bf00) {
- f_print_character(f_string_space_s[0], main.output.stream);
+ f_print_character(f_string_space_s[0], main.output.to.stream);
}
else if (width_utf == 3 && characters.string[i] >= 0xe2839000 && characters.string[i] <= 0xe283bf00) {
- f_print_character(f_string_space_s[0], main.output.stream);
+ f_print_character(f_string_space_s[0], main.output.to.stream);
}
else if (width_utf == 2 && characters.string[i] >= 0xd8900000 && characters.string[i] <= 0xd89a0000) {
- f_print_character(f_string_space_s[0], main.output.stream);
+ f_print_character(f_string_space_s[0], main.output.to.stream);
}
else if (width_utf == 2 && characters.string[i] >= 0xd98b0000 && characters.string[i] <= 0xd99f0000) {
// Arabic, U+064B to U+065F.
- f_print_character(f_string_space_s[0], main.output.stream);
+ f_print_character(f_string_space_s[0], main.output.to.stream);
}
else if (width_utf == 2 && characters.string[i] >= 0xdb960000 && characters.string[i] <= 0xdb9c0000) {
// Arabic, U+06D6 to U+06DC.
- f_print_character(f_string_space_s[0], main.output.stream);
+ f_print_character(f_string_space_s[0], main.output.to.stream);
}
else if (width_utf == 2 && characters.string[i] >= 0xd6910000 && characters.string[i] <= 0xd6bd0000) {
// Hebrew, U+0591 to U+05BD.
- f_print_character(f_string_space_s[0], main.output.stream);
+ f_print_character(f_string_space_s[0], main.output.to.stream);
}
}
else {
- f_print_character(c, main.output.stream);
+ f_print_character(c, main.output.to.stream);
}
// When using UTF-8 characters, the character columns will not line up, so print placeholders to simulate the bytes that are not printed, if necessary for alignment.
if (width_utf > 1 && j + 1 < main.width) {
if (main.parameters[byte_dump_parameter_placeholder].result == f_console_result_found) {
if (invalid[i]) {
- fl_print_color_terminated(byte_dump_character_placeholder, main.context.set.error, main.output.stream);
+ fl_print_color_terminated(byte_dump_character_placeholder, main.context.set.error, main.output.to.stream);
}
else if (main.parameters[byte_dump_parameter_classic].result == f_console_result_found) {
- f_print_character(f_string_ascii_period_s[0], main.output.stream);
+ f_print_character(f_string_ascii_period_s[0], main.output.to.stream);
}
else {
- fl_print_color_terminated(byte_dump_character_placeholder, main.context.set.warning, main.output.stream);
+ fl_print_color_terminated(byte_dump_character_placeholder, main.context.set.warning, main.output.to.stream);
}
}
else {
- f_print_character(f_string_space_s[0], main.output.stream);
+ f_print_character(f_string_space_s[0], main.output.to.stream);
}
++j;
if (width_utf > 2 && j + 1 < main.width) {
if (main.parameters[byte_dump_parameter_placeholder].result == f_console_result_found) {
if (invalid[i]) {
- fl_print_color_terminated(byte_dump_character_placeholder, main.context.set.error, main.output.stream);
+ fl_print_color_terminated(byte_dump_character_placeholder, main.context.set.error, main.output.to.stream);
}
else if (main.parameters[byte_dump_parameter_classic].result == f_console_result_found) {
- f_print_character(f_string_ascii_period_s[0], main.output.stream);
+ f_print_character(f_string_ascii_period_s[0], main.output.to.stream);
}
else {
- fl_print_color_terminated(byte_dump_character_placeholder, main.context.set.warning, main.output.stream);
+ fl_print_color_terminated(byte_dump_character_placeholder, main.context.set.warning, main.output.to.stream);
}
}
else {
- f_print_character(f_string_space_s[0], main.output.stream);
+ f_print_character(f_string_space_s[0], main.output.to.stream);
}
++j;
if (width_utf > 3 && j + 1 < main.width) {
if (main.parameters[byte_dump_parameter_placeholder].result == f_console_result_found) {
if (invalid[i]) {
- fl_print_color_terminated(byte_dump_character_placeholder, main.context.set.error, main.output.stream);
+ fl_print_color_terminated(byte_dump_character_placeholder, main.context.set.error, main.output.to.stream);
}
else if (main.parameters[byte_dump_parameter_classic].result == f_console_result_found) {
- f_print_character(f_string_ascii_period_s[0], main.output.stream);
+ f_print_character(f_string_ascii_period_s[0], main.output.to.stream);
}
else {
- fl_print_color_terminated(byte_dump_character_placeholder, main.context.set.warning, main.output.stream);
+ fl_print_color_terminated(byte_dump_character_placeholder, main.context.set.warning, main.output.to.stream);
}
}
else {
- f_print_character(f_string_space_s[0], main.output.stream);
+ f_print_character(f_string_space_s[0], main.output.to.stream);
}
++j;
for (; j < main.width; ++j) {
if (invalid[j]) {
- fl_print_color_terminated(byte_dump_character_placeholder, main.context.set.error, main.output.stream);
+ fl_print_color_terminated(byte_dump_character_placeholder, main.context.set.error, main.output.to.stream);
}
else if (main.parameters[byte_dump_parameter_classic].result == f_console_result_found) {
- f_print_character(f_string_ascii_period_s[0], main.output.stream);
+ f_print_character(f_string_ascii_period_s[0], main.output.to.stream);
}
else {
- fl_print_color_terminated(byte_dump_character_placeholder, main.context.set.warning, main.output.stream);
+ fl_print_color_terminated(byte_dump_character_placeholder, main.context.set.warning, main.output.to.stream);
}
} // for
}
else {
for (; j < main.width; ++j) {
- f_print_character(f_string_space_s[0], main.output.stream);
+ f_print_character(f_string_space_s[0], main.output.to.stream);
} // for
}
- f_print_character(f_string_space_s[0], main.output.stream);
- fl_print_color_terminated(byte_dump_character_wall, main.context.set.notable, main.output.stream);
- f_print_character(f_string_eol_s[0], main.output.stream);
+ f_print_character(f_string_space_s[0], main.output.to.stream);
+ fl_print_color_terminated(byte_dump_character_wall, main.context.set.notable, main.output.to.stream);
+ f_print_character(f_string_eol_s[0], main.output.to.stream);
}
#endif // _di_byte_dump_file_
#endif
#ifndef _di_control_print_help_
- f_status_t control_print_help(const f_file_t output, const f_color_context_t context) {
+ f_status_t control_print_help(const f_file_t file, const f_color_context_t context) {
- flockfile(output.stream);
+ flockfile(file.stream);
- fll_program_print_help_header(output, context, control_name_long, control_version);
+ fll_program_print_help_header(file, context, control_name_long, control_version);
- fll_program_print_help_option(output, context, f_console_standard_short_help_s, f_console_standard_long_help_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print this help message.");
- fll_program_print_help_option(output, context, f_console_standard_short_dark_s, f_console_standard_long_dark_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on dark backgrounds.");
- fll_program_print_help_option(output, context, f_console_standard_short_light_s, f_console_standard_long_light_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on light backgrounds.");
- fll_program_print_help_option(output, context, f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, "Do not output in color.");
- fll_program_print_help_option(output, context, f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Decrease verbosity beyond normal output.");
- fll_program_print_help_option(output, context, f_console_standard_short_normal_s, f_console_standard_long_normal_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Set verbosity to normal output.");
- fll_program_print_help_option(output, context, f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Increase verbosity beyond normal output.");
- fll_program_print_help_option(output, context, f_console_standard_short_debug_s, f_console_standard_long_debug_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Enable debugging, inceasing verbosity beyond normal output.");
- fll_program_print_help_option(output, context, f_console_standard_short_version_s, f_console_standard_long_version_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Print only the version number.");
+ fll_program_print_help_option(file, context, f_console_standard_short_help_s, f_console_standard_long_help_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print this help message.");
+ fll_program_print_help_option(file, context, f_console_standard_short_dark_s, f_console_standard_long_dark_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on dark backgrounds.");
+ fll_program_print_help_option(file, context, f_console_standard_short_light_s, f_console_standard_long_light_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on light backgrounds.");
+ fll_program_print_help_option(file, context, f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, "Do not file in color.");
+ fll_program_print_help_option(file, context, f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Decrease verbosity beyond normal file.");
+ fll_program_print_help_option(file, context, f_console_standard_short_normal_s, f_console_standard_long_normal_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Set verbosity to normal file.");
+ fll_program_print_help_option(file, context, f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Increase verbosity beyond normal file.");
+ fll_program_print_help_option(file, context, f_console_standard_short_debug_s, f_console_standard_long_debug_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Enable debugging, inceasing verbosity beyond normal file.");
+ fll_program_print_help_option(file, context, f_console_standard_short_version_s, f_console_standard_long_version_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Print only the version number.");
- fll_program_print_help_usage(output, context, control_name, f_string_empty_s);
+ fll_program_print_help_usage(file, context, control_name, f_string_empty_s);
- funlockfile(output.stream);
+ funlockfile(file.stream);
return F_none;
}
}
if (choice == control_parameter_verbosity_quiet) {
+ main->output.verbosity = f_console_verbosity_quiet;
main->error.verbosity = f_console_verbosity_quiet;
main->warning.verbosity = f_console_verbosity_quiet;
}
else if (choice == control_parameter_verbosity_normal) {
+ main->output.verbosity = f_console_verbosity_normal;
main->error.verbosity = f_console_verbosity_normal;
main->warning.verbosity = f_console_verbosity_normal;
}
else if (choice == control_parameter_verbosity_verbose) {
+ main->output.verbosity = f_console_verbosity_verbose;
main->error.verbosity = f_console_verbosity_verbose;
main->warning.verbosity = f_console_verbosity_verbose;
}
else if (choice == control_parameter_verbosity_debug) {
+ main->output.verbosity = f_console_verbosity_debug;
main->error.verbosity = f_console_verbosity_debug;
main->warning.verbosity = f_console_verbosity_debug;
}
}
if (main->parameters[control_parameter_help].result == f_console_result_found) {
- control_print_help(main->output, main->context);
+ control_print_help(main->output.to, main->context);
control_main_delete(main);
return F_none;
}
if (main->parameters[control_parameter_version].result == f_console_result_found) {
- fll_program_print_version(main->output, control_version);
+ fll_program_print_version(main->output.to, control_version);
control_main_delete(main);
return F_none;
f_array_lengths_t remaining;
bool process_pipe;
- f_file_t output;
+ fl_print_t output;
fl_print_t error;
fl_print_t warning;
control_console_parameter_t_initialize, \
f_array_lengths_t_initialize, \
F_false, \
- macro_f_file_t_initialize2(f_type_output, f_type_descriptor_output, f_file_flag_write_only), \
fl_print_t_initialize, \
+ macro_fl_print_t_initialize_error(), \
macro_fl_print_t_initialize_warning(), \
f_color_context_t_initialize, \
}
/**
* Print help.
*
- * @param output
+ * @param file
* The file to print to.
* @param context
* The color context settings.
* F_none on success.
*/
#ifndef _di_control_print_help_
- extern f_status_t control_print_help(const f_file_t output, const f_color_context_t context);
+ extern f_status_t control_print_help(const f_file_t file, const f_color_context_t context);
#endif // _di_control_print_help_
/**
#ifndef _di_controller_print_help_
f_status_t controller_print_help(const controller_main_t main) {
- controller_print_lock(main.output, 0);
+ controller_print_lock(main.output.to, 0);
- fll_program_print_help_header(main.output, main.context, main.program_name_long, controller_version);
+ fll_program_print_help_header(main.output.to, main.context, main.program_name_long, controller_version);
- fll_program_print_help_option(main.output, main.context, f_console_standard_short_help_s, f_console_standard_long_help_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print this help message.");
- fll_program_print_help_option(main.output, main.context, f_console_standard_short_dark_s, f_console_standard_long_dark_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on dark backgrounds.");
- fll_program_print_help_option(main.output, main.context, f_console_standard_short_light_s, f_console_standard_long_light_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on light backgrounds.");
- fll_program_print_help_option(main.output, main.context, f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, "Do not main.output in color.");
- fll_program_print_help_option(main.output, main.context, f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Decrease verbosity beyond normal main.output.");
- fll_program_print_help_option(main.output, main.context, f_console_standard_short_normal_s, f_console_standard_long_normal_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Set verbosity to normal main.output.");
- fll_program_print_help_option(main.output, main.context, f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Increase verbosity beyond normal main.output.");
- fll_program_print_help_option(main.output, main.context, f_console_standard_short_debug_s, f_console_standard_long_debug_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Enable debugging, inceasing verbosity beyond normal main.output.");
- fll_program_print_help_option(main.output, main.context, f_console_standard_short_version_s, f_console_standard_long_version_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Print only the version number.");
+ fll_program_print_help_option(main.output.to, main.context, f_console_standard_short_help_s, f_console_standard_long_help_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print this help message.");
+ fll_program_print_help_option(main.output.to, main.context, f_console_standard_short_dark_s, f_console_standard_long_dark_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on dark backgrounds.");
+ fll_program_print_help_option(main.output.to, main.context, f_console_standard_short_light_s, f_console_standard_long_light_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on light backgrounds.");
+ fll_program_print_help_option(main.output.to, main.context, f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, "Do not main.output.to in color.");
+ fll_program_print_help_option(main.output.to, main.context, f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Decrease verbosity beyond normal main.output.to.");
+ fll_program_print_help_option(main.output.to, main.context, f_console_standard_short_normal_s, f_console_standard_long_normal_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Set verbosity to normal main.output.to.");
+ fll_program_print_help_option(main.output.to, main.context, f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Increase verbosity beyond normal main.output.to.");
+ fll_program_print_help_option(main.output.to, main.context, f_console_standard_short_debug_s, f_console_standard_long_debug_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Enable debugging, inceasing verbosity beyond normal main.output.to.");
+ fll_program_print_help_option(main.output.to, main.context, f_console_standard_short_version_s, f_console_standard_long_version_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Print only the version number.");
- f_print_character(f_string_eol_s[0], main.output.stream);
+ f_print_character(f_string_eol_s[0], main.output.to.stream);
- fll_program_print_help_option(main.output, main.context, controller_short_control, controller_long_control, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Specify a custom control group file path, such as '" f_control_group_path_system_prefix f_control_group_path_system_default "'.");
- fll_program_print_help_option(main.output, main.context, controller_short_daemon, controller_long_daemon, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Run in daemon only mode (do not process the entry).");
- fll_program_print_help_option(main.output, main.context, controller_short_init, controller_long_init, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " The program will run as an init replacement.");
- fll_program_print_help_option(main.output, main.context, controller_short_interruptable, controller_long_interruptable, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Designate that this program can be interrupted by a signal.");
- fll_program_print_help_option(main.output, main.context, controller_short_pid, controller_long_pid, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Specify a custom pid file path, such as '" controller_path_pid controller_string_default controller_path_suffix "'.");
- fll_program_print_help_option(main.output, main.context, controller_short_settings, controller_long_settings, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Specify a custom settings path, such as '" controller_path_settings "'.");
- fll_program_print_help_option(main.output, main.context, controller_short_simulate, controller_long_simulate, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Run as a simulation.");
- fll_program_print_help_option(main.output, main.context, controller_short_uninterruptable, controller_long_uninterruptable, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Designate that this program cannot be interrupted by a signal.");
- fll_program_print_help_option(main.output, main.context, controller_short_validate, controller_long_validate, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Validate the settings (entry and rules) without running (does not simulate).");
+ fll_program_print_help_option(main.output.to, main.context, controller_short_control, controller_long_control, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Specify a custom control group file path, such as '" f_control_group_path_system_prefix f_control_group_path_system_default "'.");
+ fll_program_print_help_option(main.output.to, main.context, controller_short_daemon, controller_long_daemon, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Run in daemon only mode (do not process the entry).");
+ fll_program_print_help_option(main.output.to, main.context, controller_short_init, controller_long_init, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " The program will run as an init replacement.");
+ fll_program_print_help_option(main.output.to, main.context, controller_short_interruptable, controller_long_interruptable, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Designate that this program can be interrupted by a signal.");
+ fll_program_print_help_option(main.output.to, main.context, controller_short_pid, controller_long_pid, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Specify a custom pid file path, such as '" controller_path_pid controller_string_default controller_path_suffix "'.");
+ fll_program_print_help_option(main.output.to, main.context, controller_short_settings, controller_long_settings, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Specify a custom settings path, such as '" controller_path_settings "'.");
+ fll_program_print_help_option(main.output.to, main.context, controller_short_simulate, controller_long_simulate, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Run as a simulation.");
+ fll_program_print_help_option(main.output.to, main.context, controller_short_uninterruptable, controller_long_uninterruptable, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Designate that this program cannot be interrupted by a signal.");
+ fll_program_print_help_option(main.output.to, main.context, controller_short_validate, controller_long_validate, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Validate the settings (entry and rules) without running (does not simulate).");
- fll_program_print_help_usage(main.output, main.context, main.program_name, "entry");
+ fll_program_print_help_usage(main.output.to, main.context, main.program_name, "entry");
- fl_print_format(" When both the %[%s%s%] parameter and the", main.output.stream, main.context.set.notable, f_console_symbol_long_enable_s, controller_long_simulate, main.context.set.notable);
- fl_print_format(" %[%s%s%] parameter are specified, then additional information on each would be executed rule is printed but no simulation is performed.%c%c", main.output.stream, main.context.set.notable, f_console_symbol_long_enable_s, controller_long_validate, main.context.set.notable, f_string_eol_s[0], f_string_eol_s[0]);
+ fl_print_format(" When both the %[%s%s%] parameter and the", main.output.to.stream, main.context.set.notable, f_console_symbol_long_enable_s, controller_long_simulate, main.context.set.notable);
+ fl_print_format(" %[%s%s%] parameter are specified, then additional information on each would be executed rule is printed but no simulation is performed.%c%c", main.output.to.stream, main.context.set.notable, f_console_symbol_long_enable_s, controller_long_validate, main.context.set.notable, f_string_eol_s[0], f_string_eol_s[0]);
- fl_print_format(" The default interrupt behavior is to operate as if the %[%s%s%] parameter is passed.%c%c", main.output.stream, main.context.set.notable, f_console_symbol_long_enable_s, main.setting_default.used ? controller_long_uninterruptable : controller_long_interruptable, main.context.set.notable, f_string_eol_s[0], f_string_eol_s[0]);
+ fl_print_format(" The default interrupt behavior is to operate as if the %[%s%s%] parameter is passed.%c%c", main.output.to.stream, main.context.set.notable, f_console_symbol_long_enable_s, main.setting_default.used ? controller_long_uninterruptable : controller_long_interruptable, main.context.set.notable, f_string_eol_s[0], f_string_eol_s[0]);
- fl_print_format(" Specify an empty string for the %[%s%s%] parameter to disable pid file creation for this program.%c%c", main.output.stream, main.context.set.notable, f_console_symbol_long_enable_s, controller_long_pid, main.context.set.notable, f_string_eol_s[0], f_string_eol_s[0]);
+ fl_print_format(" Specify an empty string for the %[%s%s%] parameter to disable pid file creation for this program.%c%c", main.output.to.stream, main.context.set.notable, f_console_symbol_long_enable_s, controller_long_pid, main.context.set.notable, f_string_eol_s[0], f_string_eol_s[0]);
- controller_print_unlock_flush(main.output, 0);
+ controller_print_unlock_flush(main.output.to, 0);
return F_none;
}
}
if (choice == controller_parameter_verbosity_quiet) {
+ main->output.verbosity = f_console_verbosity_quiet;
main->error.verbosity = f_console_verbosity_quiet;
main->warning.verbosity = f_console_verbosity_quiet;
}
else if (choice == controller_parameter_verbosity_normal) {
+ main->output.verbosity = f_console_verbosity_normal;
main->error.verbosity = f_console_verbosity_normal;
main->warning.verbosity = f_console_verbosity_normal;
}
else if (choice == controller_parameter_verbosity_verbose) {
+ main->output.verbosity = f_console_verbosity_verbose;
main->error.verbosity = f_console_verbosity_verbose;
main->warning.verbosity = f_console_verbosity_verbose;
}
else if (choice == controller_parameter_verbosity_debug) {
+ main->output.verbosity = f_console_verbosity_debug;
main->error.verbosity = f_console_verbosity_debug;
main->warning.verbosity = f_console_verbosity_debug;
}
}
if (main->parameters[controller_parameter_version].result == f_console_result_found) {
- controller_print_lock(main->output, 0);
+ controller_print_lock(main->output.to, 0);
- fll_program_print_version(main->output, controller_version);
+ fll_program_print_version(main->output.to, controller_version);
- controller_print_unlock_flush(main->output, 0);
+ controller_print_unlock_flush(main->output.to, 0);
controller_main_delete(main);
return F_none;
bool process_pipe;
bool as_init;
- f_file_t output;
+ fl_print_t output;
fl_print_t error;
fl_print_t warning;
f_array_lengths_t_initialize, \
F_false, \
F_false, \
- macro_f_file_t_initialize2(f_type_output, f_type_descriptor_output, f_file_flag_write_only), \
fl_print_t_initialize, \
+ macro_fl_print_t_initialize_error(), \
macro_fl_print_t_initialize_warning(), \
0, \
0, \
if (global->main->parameters[controller_parameter_simulate].result == f_console_result_found || global->main->error.verbosity == f_console_verbosity_verbose || global->main->error.verbosity == f_console_verbosity_debug) {
if (global->main->error.verbosity != f_console_verbosity_quiet) {
- controller_print_lock(global->main->output, global->thread);
+ controller_print_lock(global->main->output.to, global->thread);
- fl_print_format("%cProcessing %s%s item '", global->main->output.stream, f_string_eol_s[0], failsafe ? "failsafe " : "", is_entry ? controller_string_entry_s : controller_string_exit_s);
- fl_print_format("%[%Q%]'.%c", global->main->output.stream, global->main->context.set.notable, cache->action.name_item, global->main->context.set.notable, f_string_eol_s[0]);
+ fl_print_format("%cProcessing %s%s item '", global->main->output.to.stream, f_string_eol_s[0], failsafe ? "failsafe " : "", is_entry ? controller_string_entry_s : controller_string_exit_s);
+ fl_print_format("%[%Q%]'.%c", global->main->output.to.stream, global->main->context.set.notable, cache->action.name_item, global->main->context.set.notable, f_string_eol_s[0]);
- controller_print_unlock_flush(global->main->output, global->thread);
+ controller_print_unlock_flush(global->main->output.to, global->thread);
}
}
if (F_status_is_error(entry_action->status)) {
if (global->main->parameters[controller_parameter_simulate].result == f_console_result_found) {
if (global->main->error.verbosity != f_console_verbosity_quiet) {
- controller_print_lock(global->main->output, global->thread);
+ controller_print_lock(global->main->output.to, global->thread);
- fl_print_format("%cThe %s item action '", global->main->output.stream, f_string_eol_s[0], is_entry ? controller_string_entry_s : controller_string_exit_s);
- fl_print_format("%[%Q%]", global->main->output.stream, global->main->context.set.title, cache->action.name_action, global->main->context.set.title);
+ fl_print_format("%cThe %s item action '", global->main->output.to.stream, f_string_eol_s[0], is_entry ? controller_string_entry_s : controller_string_exit_s);
+ fl_print_format("%[%Q%]", global->main->output.to.stream, global->main->context.set.title, cache->action.name_action, global->main->context.set.title);
if (entry_action->parameters.used) {
- fl_print_format(" %[", global->main->output.stream, global->main->context.set.notable);
+ fl_print_format(" %[", global->main->output.to.stream, global->main->context.set.notable);
- controller_entry_action_parameters_print(global->main->output.stream, *entry_action);
+ controller_entry_action_parameters_print(global->main->output.to.stream, *entry_action);
- fl_print_format("%]", global->main->output.stream, global->main->context.set.notable);
+ fl_print_format("%]", global->main->output.to.stream, global->main->context.set.notable);
}
- fl_print_format("' is %[%s%] and is in a ", global->main->output.stream, global->main->context.set.notable, entry_action->code & controller_entry_rule_code_require ? "required" : "optional", global->main->context.set.notable);
+ fl_print_format("' is %[%s%] and is in a ", global->main->output.to.stream, global->main->context.set.notable, entry_action->code & controller_entry_rule_code_require ? "required" : "optional", global->main->context.set.notable);
- fl_print_format("%[failed%] state, skipping.%c", global->main->output.stream, global->main->context.set.notable, global->main->context.set.notable, global->main->context.set.notable, f_string_eol_s[0]);
+ fl_print_format("%[failed%] state, skipping.%c", global->main->output.to.stream, global->main->context.set.notable, global->main->context.set.notable, global->main->context.set.notable, f_string_eol_s[0]);
- controller_print_unlock_flush(global->main->output, global->thread);
+ controller_print_unlock_flush(global->main->output.to, global->thread);
}
}
else {
if (entry_action->type == controller_entry_action_type_ready) {
if ((entry_action->code & controller_entry_rule_code_wait) || global->setting->ready == controller_setting_ready_wait) {
if (global->main->parameters[controller_parameter_simulate].result == f_console_result_found || global->main->error.verbosity == f_console_verbosity_verbose || global->main->error.verbosity == f_console_verbosity_debug || entry->show == controller_entry_show_init) {
- if (global->main->error.verbosity != f_console_verbosity_quiet) {
- controller_print_lock(global->main->output, global->thread);
+ if (global->main->output.verbosity != f_console_verbosity_quiet) {
+ controller_print_lock(global->main->output.to, global->thread);
- fl_print_format("%cWaiting before processing %s item action '", global->main->output.stream, f_string_eol_s[0], is_entry ? controller_string_entry_s : controller_string_exit_s);
- fl_print_format("%[%s%]", global->main->output.stream, global->main->context.set.title, controller_string_ready_s, global->main->context.set.title);
- fl_print_format("'.%c", global->main->output.stream, f_string_eol_s[0]);
+ fl_print_format("%cWaiting before processing %s item action '", global->main->output.to.stream, f_string_eol_s[0], is_entry ? controller_string_entry_s : controller_string_exit_s);
+ fl_print_format("%[%s%]", global->main->output.to.stream, global->main->context.set.title, controller_string_ready_s, global->main->context.set.title);
+ fl_print_format("'.%c", global->main->output.to.stream, f_string_eol_s[0]);
- controller_print_unlock_flush(global->main->output, global->thread);
+ controller_print_unlock_flush(global->main->output.to, global->thread);
}
}
if (global->setting->ready == controller_setting_ready_yes) {
if (global->main->parameters[controller_parameter_simulate].result == f_console_result_found || global->main->error.verbosity == f_console_verbosity_verbose || global->main->error.verbosity == f_console_verbosity_debug) {
- if (global->main->error.verbosity != f_console_verbosity_quiet) {
- controller_print_lock(global->main->output, global->thread);
+ if (global->main->output.verbosity != f_console_verbosity_quiet) {
+ controller_print_lock(global->main->output.to, global->thread);
- fl_print_format("%cIgnoring %s item action '", global->main->output.stream, f_string_eol_s[0], is_entry ? controller_string_entry_s : controller_string_exit_s);
- fl_print_format("%[%s%]", global->main->output.stream, global->main->context.set.title, controller_string_ready_s, global->main->context.set.title);
- fl_print_format("', state already is ready.%c", global->main->output.stream, f_string_eol_s[0]);
+ fl_print_format("%cIgnoring %s item action '", global->main->output.to.stream, f_string_eol_s[0], is_entry ? controller_string_entry_s : controller_string_exit_s);
+ fl_print_format("%[%s%]", global->main->output.to.stream, global->main->context.set.title, controller_string_ready_s, global->main->context.set.title);
+ fl_print_format("', state already is ready.%c", global->main->output.to.stream, f_string_eol_s[0]);
- controller_print_unlock_flush(global->main->output, global->thread);
+ controller_print_unlock_flush(global->main->output.to, global->thread);
}
}
}
else {
if (!failsafe && (global->main->error.verbosity == f_console_verbosity_verbose || entry->show == controller_entry_show_init) && global->main->parameters[controller_parameter_simulate].result == f_console_result_none) {
- fl_print_format("%cState is now '%[%s%]'.%c", global->main->output.stream, f_string_eol_s[0], global->main->context.set.notable, controller_string_ready_s, global->main->context.set.notable, f_string_eol_s[0]);
+ fl_print_format("%cState is now '%[%s%]'.%c", global->main->output.to.stream, f_string_eol_s[0], global->main->context.set.notable, controller_string_ready_s, global->main->context.set.notable, f_string_eol_s[0]);
}
status = controller_perform_ready(is_entry, *global, cache);
}
if (global->main->parameters[controller_parameter_simulate].result == f_console_result_found || global->main->error.verbosity == f_console_verbosity_verbose || global->main->error.verbosity == f_console_verbosity_debug) {
- if (global->main->error.verbosity != f_console_verbosity_quiet) {
- controller_print_lock(global->main->output, global->thread);
+ if (global->main->output.verbosity != f_console_verbosity_quiet) {
+ controller_print_lock(global->main->output.to, global->thread);
- fl_print_format("%cProcessing %s item '", global->main->output.stream, f_string_eol_s[0], is_entry ? controller_string_entry_s : controller_string_exit_s);
- fl_print_format("%[%Q%]", global->main->output.stream, global->main->context.set.title, cache->action.name_item, global->main->context.set.title);
- fl_print_format("'.%c", global->main->output.stream, f_string_eol_s[0]);
+ fl_print_format("%cProcessing %s item '", global->main->output.to.stream, f_string_eol_s[0], is_entry ? controller_string_entry_s : controller_string_exit_s);
+ fl_print_format("%[%Q%]", global->main->output.to.stream, global->main->context.set.title, cache->action.name_item, global->main->context.set.title);
+ fl_print_format("'.%c", global->main->output.to.stream, f_string_eol_s[0]);
- controller_print_unlock_flush(global->main->output, global->thread);
+ controller_print_unlock_flush(global->main->output.to, global->thread);
}
}
f_thread_unlock(&global->thread->lock.rule);
if (global->main->parameters[controller_parameter_simulate].result == f_console_result_found || global->main->error.verbosity == f_console_verbosity_verbose || global->main->error.verbosity == f_console_verbosity_debug || (entry->show == controller_entry_show_init && entry_action->type != controller_entry_action_type_consider)) {
- if (global->main->error.verbosity != f_console_verbosity_quiet) {
- controller_print_lock(global->main->output, global->thread);
+ if (global->main->output.verbosity != f_console_verbosity_quiet) {
+ controller_print_lock(global->main->output.to, global->thread);
- fl_print_format("%c%s %s item rule ", global->main->output.stream, f_string_eol_s[0], entry_action->type == controller_entry_action_type_consider ? "Considering" : "Processing", is_entry ? controller_string_entry_s : controller_string_exit_s);
- fl_print_format("'%[%Q%]'", global->main->output.stream, global->main->context.set.title, alias_rule, global->main->context.set.title);
+ fl_print_format("%c%s %s item rule ", global->main->output.to.stream, f_string_eol_s[0], entry_action->type == controller_entry_action_type_consider ? "Considering" : "Processing", is_entry ? controller_string_entry_s : controller_string_exit_s);
+ fl_print_format("'%[%Q%]'", global->main->output.to.stream, global->main->context.set.title, alias_rule, global->main->context.set.title);
if (entry->show == controller_entry_show_init && global->main->parameters[controller_parameter_simulate].result == f_console_result_none) {
- fl_print_format(" [%[%s%]]", global->main->output.stream, global->main->context.set.notable, entry_action->code == controller_entry_rule_code_asynchronous ? controller_string_asynchronous_s : controller_string_synchronous_s, global->main->context.set.notable);
+ fl_print_format(" [%[%s%]]", global->main->output.to.stream, global->main->context.set.notable, entry_action->code == controller_entry_rule_code_asynchronous ? controller_string_asynchronous_s : controller_string_synchronous_s, global->main->context.set.notable);
if (entry_action->code == controller_entry_rule_code_wait) {
- fl_print_format(" [%[%s%]]", global->main->output.stream, global->main->context.set.notable, controller_string_wait_s, global->main->context.set.notable);
+ fl_print_format(" [%[%s%]]", global->main->output.to.stream, global->main->context.set.notable, controller_string_wait_s, global->main->context.set.notable);
}
if (entry_action->code == controller_entry_rule_code_require) {
- fl_print_format(" [%[%s%]]", global->main->output.stream, global->main->context.set.notable, controller_string_required_s, global->main->context.set.notable);
+ fl_print_format(" [%[%s%]]", global->main->output.to.stream, global->main->context.set.notable, controller_string_required_s, global->main->context.set.notable);
}
}
- fl_print_format(".%c", global->main->output.stream, f_string_eol_s[0]);
+ fl_print_format(".%c", global->main->output.to.stream, f_string_eol_s[0]);
- controller_print_unlock_flush(global->main->output, global->thread);
+ controller_print_unlock_flush(global->main->output.to, global->thread);
}
}
if (F_status_is_error(status)) {
if (global->main->error.verbosity != f_console_verbosity_quiet) {
if (F_status_set_fine(status) != F_interrupt) {
- controller_print_lock(global->main->output, global->thread);
+ controller_print_lock(global->main->error.to, global->thread);
controller_entry_error_print_cache(is_entry, global->main->error, cache->action);
- controller_print_unlock_flush(global->main->output, global->thread);
+ controller_print_unlock_flush(global->main->error.to, global->thread);
}
}
}
else if (entry_action->type == controller_entry_action_type_execute) {
if (global->main->parameters[controller_parameter_simulate].result == f_console_result_found || global->main->error.verbosity == f_console_verbosity_verbose || global->main->error.verbosity == f_console_verbosity_debug || entry->show == controller_entry_show_init) {
- if (global->main->error.verbosity != f_console_verbosity_quiet) {
- controller_print_lock(global->main->output, global->thread);
+ if (global->main->output.verbosity != f_console_verbosity_quiet) {
+ controller_print_lock(global->main->output.to, global->thread);
- fl_print_format("%c%s is executing '", global->main->output.stream, f_string_eol_s[0], is_entry ? controller_string_entry_s : controller_string_exit_s);
+ fl_print_format("%c%s is executing '", global->main->output.to.stream, f_string_eol_s[0], is_entry ? controller_string_entry_s : controller_string_exit_s);
for (f_array_length_t k = 0; k < entry_action->parameters.used; ++k) {
- fl_print_format("%[%Q%]", global->main->output.stream, global->main->context.set.title, entry_action->parameters.array[k], global->main->context.set.title);
+ fl_print_format("%[%Q%]", global->main->output.to.stream, global->main->context.set.title, entry_action->parameters.array[k], global->main->context.set.title);
if (k + 1 < entry_action->parameters.used) {
- f_print_character(f_string_space_s[0], global->main->output.stream);
+ f_print_character(f_string_space_s[0], global->main->output.to.stream);
}
} // for
- fl_print_format("'.%c", global->main->output.stream, f_string_eol_s[0]);
+ fl_print_format("'.%c", global->main->output.to.stream, f_string_eol_s[0]);
- controller_print_unlock_flush(global->main->output, global->thread);
+ controller_print_unlock_flush(global->main->output.to, global->thread);
}
}
}
if ((global->main->parameters[controller_parameter_simulate].result == f_console_result_found && global->main->error.verbosity != f_console_verbosity_quiet) || global->main->error.verbosity == f_console_verbosity_verbose) {
- controller_print_lock(global->main->output, global->thread);
+ controller_print_lock(global->main->output.to, global->thread);
- fl_print_format("%cDone processing %s item '", global->main->output.stream, f_string_eol_s[0], is_entry ? controller_string_entry_s : controller_string_exit_s);
- fl_print_format("%[%s%]", global->main->output.stream, global->main->context.set.title, controller_string_main_s, global->main->context.set.title);
- fl_print_format("'.%c", global->main->output.stream, f_string_eol_s[0]);
+ fl_print_format("%cDone processing %s item '", global->main->output.to.stream, f_string_eol_s[0], is_entry ? controller_string_entry_s : controller_string_exit_s);
+ fl_print_format("%[%s%]", global->main->output.to.stream, global->main->context.set.title, controller_string_main_s, global->main->context.set.title);
+ fl_print_format("'.%c", global->main->output.to.stream, f_string_eol_s[0]);
// failsafe should not print the extra newline because the failure exit from controller_main should handle this.
if (!failsafe) {
- f_print_terminated(f_string_eol_s, global->main->output.stream);
+ f_print_terminated(f_string_eol_s, global->main->output.to.stream);
}
- controller_print_unlock_flush(global->main->output, global->thread);
+ controller_print_unlock_flush(global->main->output.to, global->thread);
}
return status;
return;
}
- controller_print_lock(global.main->output, global.thread);
+ controller_print_lock(global.main->output.to, global.thread);
- fl_print_format("%cProcessing %s item action '", global.main->output.stream, f_string_eol_s[0], is_entry ? controller_string_entry_s : controller_string_exit_s);
+ fl_print_format("%cProcessing %s item action '", global.main->output.to.stream, f_string_eol_s[0], is_entry ? controller_string_entry_s : controller_string_exit_s);
- fl_print_format("%[%S%]' setting ", global.main->output.stream, global.main->context.set.title, name, global.main->context.set.title);
+ fl_print_format("%[%S%]' setting ", global.main->output.to.stream, global.main->context.set.title, name, global.main->context.set.title);
if (name_sub) {
- fl_print_format("'%[%S%]'", global.main->output.stream, global.main->context.set.notable, name_sub, global.main->context.set.notable);
+ fl_print_format("'%[%S%]'", global.main->output.to.stream, global.main->context.set.notable, name_sub, global.main->context.set.notable);
}
else {
- fl_print_format("value", global.main->output.stream);
+ fl_print_format("value", global.main->output.to.stream);
}
- fl_print_format(" to '%[%Q%]", global.main->output.stream, global.main->context.set.important, value, global.main->context.set.important);
+ fl_print_format(" to '%[%Q%]", global.main->output.to.stream, global.main->context.set.important, value, global.main->context.set.important);
- fl_print_format("'%S.%c", global.main->output.stream, suffix, f_string_eol_s[0]);
+ fl_print_format("'%S.%c", global.main->output.to.stream, suffix, f_string_eol_s[0]);
- controller_print_unlock_flush(global.main->output, global.thread);
+ controller_print_unlock_flush(global.main->output.to, global.thread);
}
#endif // _di_controller_process_entry_print_simulate_setting_value_
}
if (options & controller_process_option_simulate) {
- if (main->error.verbosity != f_console_verbosity_quiet) {
- controller_print_lock(main->output, thread);
+ if (main->output.verbosity != f_console_verbosity_quiet) {
+ controller_print_lock(main->output.to, thread);
- fl_print_format("%cSimulating execution of '%[", main->output.stream, f_string_eol_s[0], main->context.set.title);
+ fl_print_format("%cSimulating execution of '%[", main->output.to.stream, f_string_eol_s[0], main->context.set.title);
if (program) {
- f_print_safely_terminated(program, main->output.stream);
+ f_print_safely_terminated(program, main->output.to.stream);
}
else {
- f_print_dynamic_safely(arguments.array[0], main->output.stream);
+ f_print_dynamic_safely(arguments.array[0], main->output.to.stream);
}
- fl_print_format("%]' with the arguments: '%[", main->output.stream, main->context.set.title, main->context.set.important);
+ fl_print_format("%]' with the arguments: '%[", main->output.to.stream, main->context.set.title, main->context.set.important);
for (f_array_length_t i = program ? 0 : 1; i < arguments.used; ++i) {
if (program && i || !program && i > 1) {
- f_print_terminated(f_string_space_s, main->output.stream);
+ f_print_terminated(f_string_space_s, main->output.to.stream);
}
- f_print_dynamic_safely(arguments.array[i], main->output.stream);
+ f_print_dynamic_safely(arguments.array[i], main->output.to.stream);
} // for
- fl_print_format("%]' from '", main->output.stream, main->context.set.important);
- fl_print_format("%[%Q%]'.%c", main->output.stream, main->context.set.notable, process->rule.name, main->context.set.notable, f_string_eol_s[0]);
+ fl_print_format("%]' from '", main->output.to.stream, main->context.set.important);
+ fl_print_format("%[%Q%]'.%c", main->output.to.stream, main->context.set.notable, process->rule.name, main->context.set.notable, f_string_eol_s[0]);
- controller_print_unlock_flush(main->output, thread);
+ controller_print_unlock_flush(main->output.to, thread);
}
// sleep for less than a second to better show simulation of synchronous vs asynchronous.
if (!rerun_item->max || rerun_item->count < rerun_item->max) {
if (main->error.verbosity == f_console_verbosity_debug) {
- controller_print_lock(main->output, thread);
+ controller_print_lock(main->output.to, thread);
- fl_print_format("%cRe-running '", main->output.stream, f_string_eol_s[0]);
- fl_print_format("%[%q%]", main->output.stream, main->context.set.title, process->rule.alias, main->context.set.title);
- f_print_terminated("' '", main->output.stream);
- fl_print_format("%[%q%]", main->output.stream, main->context.set.notable, controller_rule_action_type_execute_name(action), main->context.set.notable);
- f_print_terminated("' with a ", main->output.stream);
- fl_print_format("%[%s%]", main->output.stream, main->context.set.notable, controller_string_delay_s, main->context.set.notable);
- f_print_terminated(" of ", main->output.stream);
- fl_print_format("%[%ul%] MegaTime", main->output.stream, main->context.set.notable, rerun_item->delay, main->context.set.notable);
+ fl_print_format("%cRe-running '", main->output.to.stream, f_string_eol_s[0]);
+ fl_print_format("%[%q%]", main->output.to.stream, main->context.set.title, process->rule.alias, main->context.set.title);
+ f_print_terminated("' '", main->output.to.stream);
+ fl_print_format("%[%q%]", main->output.to.stream, main->context.set.notable, controller_rule_action_type_execute_name(action), main->context.set.notable);
+ f_print_terminated("' with a ", main->output.to.stream);
+ fl_print_format("%[%s%]", main->output.to.stream, main->context.set.notable, controller_string_delay_s, main->context.set.notable);
+ f_print_terminated(" of ", main->output.to.stream);
+ fl_print_format("%[%ul%] MegaTime", main->output.to.stream, main->context.set.notable, rerun_item->delay, main->context.set.notable);
if (rerun_item->max) {
- f_print_terminated(" for ", main->output.stream);
- fl_print_format("%[%ul%]", main->output.stream, main->context.set.notable, rerun_item->count, main->context.set.notable);
- f_print_terminated(" of ", main->output.stream);
- fl_print_format("%[%s%] ", main->output.stream, main->context.set.notable, controller_string_max_s, main->context.set.notable);
- fl_print_format("%[%ul%]", main->output.stream, main->context.set.notable, rerun_item->max, main->context.set.notable);
- fl_print_format(".%c", main->output.stream, f_string_eol_s[0]);
+ f_print_terminated(" for ", main->output.to.stream);
+ fl_print_format("%[%ul%]", main->output.to.stream, main->context.set.notable, rerun_item->count, main->context.set.notable);
+ f_print_terminated(" of ", main->output.to.stream);
+ fl_print_format("%[%s%] ", main->output.to.stream, main->context.set.notable, controller_string_max_s, main->context.set.notable);
+ fl_print_format("%[%ul%]", main->output.to.stream, main->context.set.notable, rerun_item->max, main->context.set.notable);
+ fl_print_format(".%c", main->output.to.stream, f_string_eol_s[0]);
}
else {
- fl_print_format(" with no %[%s%].%c", main->output.stream, main->context.set.notable, controller_string_max_s, main->context.set.notable, f_string_eol_s[0]);
+ fl_print_format(" with no %[%s%].%c", main->output.to.stream, main->context.set.notable, controller_string_max_s, main->context.set.notable, f_string_eol_s[0]);
}
- controller_print_unlock_flush(main->output, thread);
+ controller_print_unlock_flush(main->output.to, thread);
}
if (rerun_item->delay) {
status = F_status_set_fine(status);
if ((zero_only && number) || (!zero_only && (number < 1 || number > 99)) || status == F_data_not || status == F_number || status == F_number_overflow || status == F_number_negative || status == F_number_positive) {
-
if (global.main->error.verbosity != f_console_verbosity_quiet) {
// get the current line number within the settings item.
}
else {
if (global.main->error.verbosity == f_console_verbosity_debug || (global.main->error.verbosity == f_console_verbosity_verbose && global.main->parameters[controller_parameter_simulate].result == f_console_result_found)) {
- controller_print_lock(global.main->output, global.thread);
+ controller_print_lock(global.main->output.to, global.thread);
- fl_print_format("%cProcessing rule item action '%[%s%]' setting value to an empty set.%c", global.main->output.stream, f_string_eol_s[0], global.main->context.set.title, controller_string_environment_s, global.main->context.set.title, f_string_eol_s[0]);
+ fl_print_format("%cProcessing rule item action '%[%s%]' setting value to an empty set.%c", global.main->output.to.stream, f_string_eol_s[0], global.main->context.set.title, controller_string_environment_s, global.main->context.set.title, f_string_eol_s[0]);
- controller_print_unlock_flush(global.main->output, global.thread);
+ controller_print_unlock_flush(global.main->output.to, global.thread);
}
}
}
if (global.main->error.verbosity == f_console_verbosity_debug || (global.main->error.verbosity == f_console_verbosity_verbose && global.main->parameters[controller_parameter_simulate].result == f_console_result_found)) {
- controller_print_lock(global.main->output, global.thread);
+ controller_print_lock(global.main->output.to, global.thread);
- fl_print_format("%cProcessing rule item action '%[%S%]', adding ", global.main->output.stream, f_string_eol_s[0], global.main->context.set.title, controller_string_on_s, global.main->context.set.title);
- fl_print_format("'%[%/Q%]' of ", global.main->output.stream, global.main->context.set.notable, cache->buffer_item, cache->content_actions.array[i].array[1], global.main->context.set.notable);
- fl_print_format("'%[%/Q%]/", global.main->output.stream, global.main->context.set.important, cache->buffer_item, cache->content_actions.array[i].array[2], global.main->context.set.important);
- fl_print_format("%[%/Q%]'.%c", global.main->output.stream, global.main->context.set.important, cache->buffer_item, cache->content_actions.array[i].array[3], global.main->context.set.important, f_string_eol_s[0]);
+ fl_print_format("%cProcessing rule item action '%[%S%]', adding ", global.main->output.to.stream, f_string_eol_s[0], global.main->context.set.title, controller_string_on_s, global.main->context.set.title);
+ fl_print_format("'%[%/Q%]' of ", global.main->output.to.stream, global.main->context.set.notable, cache->buffer_item, cache->content_actions.array[i].array[1], global.main->context.set.notable);
+ fl_print_format("'%[%/Q%]/", global.main->output.to.stream, global.main->context.set.important, cache->buffer_item, cache->content_actions.array[i].array[2], global.main->context.set.important);
+ fl_print_format("%[%/Q%]'.%c", global.main->output.to.stream, global.main->context.set.important, cache->buffer_item, cache->content_actions.array[i].array[3], global.main->context.set.important, f_string_eol_s[0]);
- controller_print_unlock_flush(global.main->output, global.thread);
+ controller_print_unlock_flush(global.main->output.to, global.thread);
}
} // for
return;
}
- controller_print_lock(global.main->output, global.thread);
+ controller_print_lock(global.main->output.to, global.thread);
- fl_print_format("%cProcessing rule item action '%[%S%]' setting ", global.main->output.stream, f_string_eol_s[0], global.main->context.set.title, name, global.main->context.set.title);
+ fl_print_format("%cProcessing rule item action '%[%S%]' setting ", global.main->output.to.stream, f_string_eol_s[0], global.main->context.set.title, name, global.main->context.set.title);
if (name_sub) {
- fl_print_format("'%[%S%]'", global.main->output.stream, global.main->context.set.notable, name_sub, global.main->context.set.notable);
+ fl_print_format("'%[%S%]'", global.main->output.to.stream, global.main->context.set.notable, name_sub, global.main->context.set.notable);
}
else {
- f_print_terminated("value", global.main->output.stream);
+ f_print_terminated("value", global.main->output.to.stream);
}
- fl_print_format(" to '%[%Q%]'", global.main->output.stream, global.main->context.set.important, value, global.main->context.set.important);
- fl_print_format("%S.%c", global.main->output.stream, suffix, f_string_eol_s[0]);
+ fl_print_format(" to '%[%Q%]'", global.main->output.to.stream, global.main->context.set.important, value, global.main->context.set.important);
+ fl_print_format("%S.%c", global.main->output.to.stream, suffix, f_string_eol_s[0]);
- controller_print_unlock_flush(global.main->output, global.thread);
+ controller_print_unlock_flush(global.main->output.to, global.thread);
}
#endif // _di_controller_rule_setting_read_print_value_
return;
}
- controller_print_lock(global.main->output, global.thread);
+ controller_print_lock(global.main->output.to, global.thread);
- fl_print_format("%cProcessing rule item action '%[%S%]' setting value to", global.main->output.stream, f_string_eol_s[0], global.main->context.set.title, name, global.main->context.set.title);
+ fl_print_format("%cProcessing rule item action '%[%S%]' setting value to", global.main->output.to.stream, f_string_eol_s[0], global.main->context.set.title, name, global.main->context.set.title);
for (f_array_length_t j = 0; j < cache->content_actions.array[index].used; ++j) {
- fl_print_format(" '%[%/Q%]'", global.main->output.stream, global.main->context.set.important, cache->buffer_item, cache->content_actions.array[index].array[j], global.main->context.set.important);
+ fl_print_format(" '%[%/Q%]'", global.main->output.to.stream, global.main->context.set.important, cache->buffer_item, cache->content_actions.array[index].array[j], global.main->context.set.important);
if (j + 2 == cache->content_actions.array[index].used) {
if (cache->content_actions.array[index].used > 2) {
- f_print_terminated(",", global.main->output.stream);
+ f_print_terminated(",", global.main->output.to.stream);
}
- f_print_terminated(" and", global.main->output.stream);
+ f_print_terminated(" and", global.main->output.to.stream);
}
else if (j + 1 < cache->content_actions.array[index].used) {
- f_print_terminated(",", global.main->output.stream);
+ f_print_terminated(",", global.main->output.to.stream);
}
} // for
- fl_print_format(".%c", global.main->output.stream, f_string_eol_s[0]);
+ fl_print_format(".%c", global.main->output.to.stream, f_string_eol_s[0]);
- controller_print_unlock_flush(global.main->output, global.thread);
+ controller_print_unlock_flush(global.main->output.to, global.thread);
}
#endif // _di_controller_rule_setting_read_print_value_
} // for
if (missing) {
- controller_print_lock(main->output, global.thread);
+ controller_print_lock(main->output.to, global.thread);
if (rule.items.used) {
- fl_print_format("%cRule '", main->output.stream, f_string_eol_s[0]);
- fl_print_format("%[%Q%]' has no '", main->output.stream, main->context.set.title, rule.name, main->context.set.title);
- fl_print_format("%[%q%]' action to execute and would '", main->output.stream, main->context.set.title, controller_rule_action_type_name(action), main->context.set.title);
- fl_print_format("%[%s%]' because it is '", main->output.stream, main->context.set.important, options & controller_process_option_require ? controller_string_fail_s : controller_string_succeed_s, main->context.set.important);
- fl_print_format("%[%s%]'.%c", main->output.stream, main->context.set.important, options & controller_process_option_require ? controller_string_required_s : controller_string_optional_s, main->context.set.important, f_string_eol_s[0]);
+ fl_print_format("%cRule '", main->output.to.stream, f_string_eol_s[0]);
+ fl_print_format("%[%Q%]' has no '", main->output.to.stream, main->context.set.title, rule.name, main->context.set.title);
+ fl_print_format("%[%q%]' action to execute and would '", main->output.to.stream, main->context.set.title, controller_rule_action_type_name(action), main->context.set.title);
+ fl_print_format("%[%s%]' because it is '", main->output.to.stream, main->context.set.important, options & controller_process_option_require ? controller_string_fail_s : controller_string_succeed_s, main->context.set.important);
+ fl_print_format("%[%s%]'.%c", main->output.to.stream, main->context.set.important, options & controller_process_option_require ? controller_string_required_s : controller_string_optional_s, main->context.set.important, f_string_eol_s[0]);
}
else {
- fl_print_format("%cRule '", main->output.stream, f_string_eol_s[0]);
- fl_print_format("%[%Q%]' has no known '", main->output.stream, main->context.set.title, rule.name, main->context.set.title);
- fl_print_format("%[%s %s%]' (such as ", main->output.stream, main->context.set.title, controller_string_rule_s, controller_string_type_s, main->context.set.title);
- fl_print_format("'%[%s%]', ", main->output.stream, main->context.set.title, controller_string_command_s, main->context.set.title);
- fl_print_format("'%[%s%]', ", main->output.stream, main->context.set.title, controller_string_service_s, main->context.set.title);
- fl_print_format("'%[%s%]', or ", main->output.stream, main->context.set.title, controller_string_script_s, main->context.set.title);
- fl_print_format("'%[%s%]'", main->output.stream, main->context.set.title, controller_string_utility_s, main->context.set.title);
- fl_print_format(") and would '%[%s%]' because it is '", main->output.stream, main->context.set.important, options & controller_process_option_require ? controller_string_fail_s : controller_string_succeed_s, main->context.set.important);
- fl_print_format("%[%s%]'.%c", main->output.stream, main->context.set.important, options & controller_process_option_require ? controller_string_required_s : controller_string_optional_s, main->context.set.important, f_string_eol_s[0]);
+ fl_print_format("%cRule '", main->output.to.stream, f_string_eol_s[0]);
+ fl_print_format("%[%Q%]' has no known '", main->output.to.stream, main->context.set.title, rule.name, main->context.set.title);
+ fl_print_format("%[%s %s%]' (such as ", main->output.to.stream, main->context.set.title, controller_string_rule_s, controller_string_type_s, main->context.set.title);
+ fl_print_format("'%[%s%]', ", main->output.to.stream, main->context.set.title, controller_string_command_s, main->context.set.title);
+ fl_print_format("'%[%s%]', ", main->output.to.stream, main->context.set.title, controller_string_service_s, main->context.set.title);
+ fl_print_format("'%[%s%]', or ", main->output.to.stream, main->context.set.title, controller_string_script_s, main->context.set.title);
+ fl_print_format("'%[%s%]'", main->output.to.stream, main->context.set.title, controller_string_utility_s, main->context.set.title);
+ fl_print_format(") and would '%[%s%]' because it is '", main->output.to.stream, main->context.set.important, options & controller_process_option_require ? controller_string_fail_s : controller_string_succeed_s, main->context.set.important);
+ fl_print_format("%[%s%]'.%c", main->output.to.stream, main->context.set.important, options & controller_process_option_require ? controller_string_required_s : controller_string_optional_s, main->context.set.important, f_string_eol_s[0]);
}
- controller_print_unlock_flush(main->output, global.thread);
+ controller_print_unlock_flush(main->output.to, global.thread);
}
}
- controller_print_lock(main->output, global.thread);
+ controller_print_lock(main->output.to, global.thread);
- fl_print_format("%cRule %[%Q%] {%c", main->output.stream, f_string_eol_s[0], main->context.set.title, rule.alias, main->context.set.title, f_string_eol_s[0]);
- fl_print_format(" %[%s%] %Q%c", main->output.stream, main->context.set.important, controller_string_name_s, main->context.set.important, rule.name, f_string_eol_s[0]);
- fl_print_format(" %[%s%] %s%c", main->output.stream, main->context.set.important, controller_string_how_s, main->context.set.important, options & controller_process_option_asynchronous ? controller_string_asynchronous_s : controller_string_synchronous_s, f_string_eol_s[0]);
- fl_print_format(" %[%s%] %s%c", main->output.stream, main->context.set.important, controller_string_wait_s, main->context.set.important, options & controller_process_option_wait ? controller_string_yes_s : controller_string_no_s, f_string_eol_s[0]);
- fl_print_format(" %[%s%] ", main->output.stream, main->context.set.important, controller_string_capability_s, main->context.set.important);
+ fl_print_format("%cRule %[%Q%] {%c", main->output.to.stream, f_string_eol_s[0], main->context.set.title, rule.alias, main->context.set.title, f_string_eol_s[0]);
+ fl_print_format(" %[%s%] %Q%c", main->output.to.stream, main->context.set.important, controller_string_name_s, main->context.set.important, rule.name, f_string_eol_s[0]);
+ fl_print_format(" %[%s%] %s%c", main->output.to.stream, main->context.set.important, controller_string_how_s, main->context.set.important, options & controller_process_option_asynchronous ? controller_string_asynchronous_s : controller_string_synchronous_s, f_string_eol_s[0]);
+ fl_print_format(" %[%s%] %s%c", main->output.to.stream, main->context.set.important, controller_string_wait_s, main->context.set.important, options & controller_process_option_wait ? controller_string_yes_s : controller_string_no_s, f_string_eol_s[0]);
+ fl_print_format(" %[%s%] ", main->output.to.stream, main->context.set.important, controller_string_capability_s, main->context.set.important);
if (f_capability_supported()) {
if (rule.capability) {
cache->action.generic.used = 0;
if (F_status_is_error_not(f_capability_to_text(rule.capability, &cache->action.generic))) {
- f_print_dynamic_safely(cache->action.generic, main->output.stream);
+ f_print_dynamic_safely(cache->action.generic, main->output.to.stream);
}
}
- f_print_terminated(f_string_eol_s, main->output.stream);
+ f_print_terminated(f_string_eol_s, main->output.to.stream);
}
else {
- fl_print_format("%[(unsupported)%]%c", main->output.stream, main->context.set.warning, controller_string_capability_s, main->context.set.warning, f_string_eol_s[0]);
+ fl_print_format("%[(unsupported)%]%c", main->output.to.stream, main->context.set.warning, controller_string_capability_s, main->context.set.warning, f_string_eol_s[0]);
}
- fl_print_format(" %[%s%]", main->output.stream, main->context.set.important, controller_string_control_group_s, main->context.set.important);
+ fl_print_format(" %[%s%]", main->output.to.stream, main->context.set.important, controller_string_control_group_s, main->context.set.important);
if (rule.has & controller_rule_has_control_group) {
- fl_print_format(" %s", main->output.stream, rule.control_group.as_new ? controller_string_new_s : controller_string_existing_s);
+ fl_print_format(" %s", main->output.to.stream, rule.control_group.as_new ? controller_string_new_s : controller_string_existing_s);
for (i = 0; i < rule.control_group.groups.used; ++i) {
if (rule.control_group.groups.array[i].used) {
- fl_print_format(" %Q", main->output.stream, rule.control_group.groups.array[i]);
+ fl_print_format(" %Q", main->output.to.stream, rule.control_group.groups.array[i]);
}
} // for
}
- fl_print_format("%c %[%s%]", main->output.stream, f_string_eol_s[0], main->context.set.important, controller_string_nice_s, main->context.set.important);
+ fl_print_format("%c %[%s%]", main->output.to.stream, f_string_eol_s[0], main->context.set.important, controller_string_nice_s, main->context.set.important);
if (rule.has & controller_rule_has_nice) {
- fl_print_format(" %i", main->output.stream, rule.nice);
+ fl_print_format(" %i", main->output.to.stream, rule.nice);
}
- fl_print_format("%c %[%s%]", main->output.stream, f_string_eol_s[0], main->context.set.important, controller_string_scheduler_s, main->context.set.important);
+ fl_print_format("%c %[%s%]", main->output.to.stream, f_string_eol_s[0], main->context.set.important, controller_string_scheduler_s, main->context.set.important);
if (rule.has & controller_rule_has_scheduler) {
f_string_t policy = "";
policy = controller_string_round_robin_s;
}
- fl_print_format(" %s %i", main->output.stream, policy, rule.scheduler.priority);
+ fl_print_format(" %s %i", main->output.to.stream, policy, rule.scheduler.priority);
}
- fl_print_format("%c %[%s%] %Q%c", main->output.stream, f_string_eol_s[0], main->context.set.important, controller_string_script_s, main->context.set.important, rule.script, f_string_eol_s[0]);
- fl_print_format(" %[%s%]", main->output.stream, main->context.set.important, controller_string_user_s, main->context.set.important);
+ fl_print_format("%c %[%s%] %Q%c", main->output.to.stream, f_string_eol_s[0], main->context.set.important, controller_string_script_s, main->context.set.important, rule.script, f_string_eol_s[0]);
+ fl_print_format(" %[%s%]", main->output.to.stream, main->context.set.important, controller_string_user_s, main->context.set.important);
if (rule.has & controller_rule_has_user) {
- fl_print_format(" %i", main->output.stream, rule.user);
+ fl_print_format(" %i", main->output.to.stream, rule.user);
}
- fl_print_format("%c %[%s%] {%c", main->output.stream, f_string_eol_s[0], main->context.set.important, controller_string_affinity_s, main->context.set.important, f_string_eol_s[0]);
+ fl_print_format("%c %[%s%] {%c", main->output.to.stream, f_string_eol_s[0], main->context.set.important, controller_string_affinity_s, main->context.set.important, f_string_eol_s[0]);
for (i = 0; i < rule.affinity.used; ++i) {
- fl_print_format(" %i%c", main->output.stream, rule.affinity.array[i], f_string_eol_s[0]);
+ fl_print_format(" %i%c", main->output.to.stream, rule.affinity.array[i], f_string_eol_s[0]);
} // for
- fl_print_format(" }%c %[%s%] {%c", main->output.stream, f_string_eol_s[0], main->context.set.important, controller_string_define_s, main->context.set.important, f_string_eol_s[0]);
+ fl_print_format(" }%c %[%s%] {%c", main->output.to.stream, f_string_eol_s[0], main->context.set.important, controller_string_define_s, main->context.set.important, f_string_eol_s[0]);
for (i = 0; i < rule.define.used; ++i) {
if (rule.define.array[i].name.used && rule.define.array[i].value.used) {
- fl_print_format(" %Q %[=%] %Q%c", main->output.stream, rule.define.array[i].name, main->context.set.important, main->context.set.important, rule.define.array[i].value, f_string_eol_s[0]);
+ fl_print_format(" %Q %[=%] %Q%c", main->output.to.stream, rule.define.array[i].name, main->context.set.important, main->context.set.important, rule.define.array[i].value, f_string_eol_s[0]);
}
} // for
- fl_print_format(" }%c %[%s%] {%c", main->output.stream, f_string_eol_s[0], main->context.set.important, controller_string_environment_s, main->context.set.important, f_string_eol_s[0]);
+ fl_print_format(" }%c %[%s%] {%c", main->output.to.stream, f_string_eol_s[0], main->context.set.important, controller_string_environment_s, main->context.set.important, f_string_eol_s[0]);
for (i = 0; i < rule.environment.used; ++i) {
if (rule.environment.array[i].used) {
- fl_print_format(" %Q%c", main->output.stream, rule.environment.array[i], f_string_eol_s[0]);
+ fl_print_format(" %Q%c", main->output.to.stream, rule.environment.array[i], f_string_eol_s[0]);
}
} // for
- fl_print_format(" }%c %[%s%] {%c", main->output.stream, f_string_eol_s[0], main->context.set.important, controller_string_parameter_s, main->context.set.important, f_string_eol_s[0]);
+ fl_print_format(" }%c %[%s%] {%c", main->output.to.stream, f_string_eol_s[0], main->context.set.important, controller_string_parameter_s, main->context.set.important, f_string_eol_s[0]);
for (i = 0; i < rule.parameter.used; ++i) {
if (rule.parameter.array[i].name.used && rule.parameter.array[i].value.used) {
- fl_print_format(" %Q %[=%] %Q%c", main->output.stream, rule.parameter.array[i].name, main->context.set.important, main->context.set.important, rule.parameter.array[i].value, f_string_eol_s[0]);
+ fl_print_format(" %Q %[=%] %Q%c", main->output.to.stream, rule.parameter.array[i].name, main->context.set.important, main->context.set.important, rule.parameter.array[i].value, f_string_eol_s[0]);
}
} // for
- fl_print_format(" }%c %[%s%] {%c", main->output.stream, f_string_eol_s[0], main->context.set.important, controller_string_group_s, main->context.set.important, f_string_eol_s[0]);
+ fl_print_format(" }%c %[%s%] {%c", main->output.to.stream, f_string_eol_s[0], main->context.set.important, controller_string_group_s, main->context.set.important, f_string_eol_s[0]);
if (rule.has & controller_rule_has_group) {
- fl_print_format(" %i%c", main->output.stream, rule.group, f_string_eol_s[0]);
+ fl_print_format(" %i%c", main->output.to.stream, rule.group, f_string_eol_s[0]);
for (i = 0; i < rule.groups.used; ++i) {
- fl_print_format(" %i%c", main->output.stream, rule.groups.array[i], f_string_eol_s[0]);
+ fl_print_format(" %i%c", main->output.to.stream, rule.groups.array[i], f_string_eol_s[0]);
} // for
}
- fl_print_format(" }%c %[%s%] {%c", main->output.stream, f_string_eol_s[0], main->context.set.important, controller_string_limit_s, main->context.set.important, f_string_eol_s[0]);
+ fl_print_format(" }%c %[%s%] {%c", main->output.to.stream, f_string_eol_s[0], main->context.set.important, controller_string_limit_s, main->context.set.important, f_string_eol_s[0]);
for (i = 0; i < rule.limits.used; ++i) {
- fl_print_format(" %Q %[=%] %un %un%c", main->output.stream, controller_rule_setting_limit_type_name(rule.limits.array[i].type), main->context.set.important, main->context.set.important, rule.limits.array[i].value.rlim_cur, rule.limits.array[i].value.rlim_max, f_string_eol_s[0]);
+ fl_print_format(" %Q %[=%] %un %un%c", main->output.to.stream, controller_rule_setting_limit_type_name(rule.limits.array[i].type), main->context.set.important, main->context.set.important, rule.limits.array[i].value.rlim_cur, rule.limits.array[i].value.rlim_max, f_string_eol_s[0]);
} // for
- fl_print_format(" }%c %[%s%] {%c", main->output.stream, f_string_eol_s[0], main->context.set.important, controller_string_on_s, main->context.set.important, f_string_eol_s[0]);
+ fl_print_format(" }%c %[%s%] {%c", main->output.to.stream, f_string_eol_s[0], main->context.set.important, controller_string_on_s, main->context.set.important, f_string_eol_s[0]);
for (i = 0; i < rule.ons.used; ++i) {
- fl_print_format(" %[%s%] {%c", main->output.stream, main->context.set.important, controller_string_action_s, main->context.set.important, f_string_eol_s[0]);
+ fl_print_format(" %[%s%] {%c", main->output.to.stream, main->context.set.important, controller_string_action_s, main->context.set.important, f_string_eol_s[0]);
{
f_string_t action = "";
action = controller_string_thaw_s;
}
- fl_print_format(" %[%s%] %s%c", main->output.stream, main->context.set.important, controller_string_type_s, main->context.set.important, action, f_string_eol_s[0]);
+ fl_print_format(" %[%s%] %s%c", main->output.to.stream, main->context.set.important, controller_string_type_s, main->context.set.important, action, f_string_eol_s[0]);
}
- fl_print_format(" %[%s%] {%c", main->output.stream, main->context.set.important, controller_string_need_s, main->context.set.important, f_string_eol_s[0]);
+ fl_print_format(" %[%s%] {%c", main->output.to.stream, main->context.set.important, controller_string_need_s, main->context.set.important, f_string_eol_s[0]);
for (j = 0; j < rule.ons.array[i].need.used; ++j) {
if (rule.ons.array[i].need.array[j].used) {
- fl_print_format(" %Q%c", main->output.stream, rule.ons.array[i].need.array[j], f_string_eol_s[0]);
+ fl_print_format(" %Q%c", main->output.to.stream, rule.ons.array[i].need.array[j], f_string_eol_s[0]);
}
} // for
- fl_print_format(" }%c %[%s%] {%c", main->output.stream, f_string_eol_s[0], main->context.set.important, controller_string_want_s, main->context.set.important, f_string_eol_s[0]);
+ fl_print_format(" }%c %[%s%] {%c", main->output.to.stream, f_string_eol_s[0], main->context.set.important, controller_string_want_s, main->context.set.important, f_string_eol_s[0]);
for (j = 0; j < rule.ons.array[i].want.used; ++j) {
if (rule.ons.array[i].want.array[j].used) {
- fl_print_format(" %Q%c", main->output.stream, rule.ons.array[i].want.array[j], f_string_eol_s[0]);
+ fl_print_format(" %Q%c", main->output.to.stream, rule.ons.array[i].want.array[j], f_string_eol_s[0]);
}
} // for
- fl_print_format(" }%c %[%s%] {%c", main->output.stream, f_string_eol_s[0], main->context.set.important, controller_string_wish_s, main->context.set.important, f_string_eol_s[0]);
+ fl_print_format(" }%c %[%s%] {%c", main->output.to.stream, f_string_eol_s[0], main->context.set.important, controller_string_wish_s, main->context.set.important, f_string_eol_s[0]);
for (j = 0; j < rule.ons.array[i].wish.used; ++j) {
if (rule.ons.array[i].wish.array[j].used) {
- fl_print_format(" %Q%c", main->output.stream, rule.ons.array[i].wish.array[j], f_string_eol_s[0]);
+ fl_print_format(" %Q%c", main->output.to.stream, rule.ons.array[i].wish.array[j], f_string_eol_s[0]);
}
} // for
- fl_print_format(" }%c }%c", main->output.stream, f_string_eol_s[0], f_string_eol_s[0]);
+ fl_print_format(" }%c }%c", main->output.to.stream, f_string_eol_s[0], f_string_eol_s[0]);
} // for
- fl_print_format(" }%c", main->output.stream, f_string_eol_s[0]);
+ fl_print_format(" }%c", main->output.to.stream, f_string_eol_s[0]);
if (rule.items.used) {
controller_rule_action_t *action = 0;
item = &rule.items.array[i];
- fl_print_format(" %[%s%] {%c", main->output.stream, main->context.set.important, controller_string_item_s, main->context.set.important, f_string_eol_s[0]);
- fl_print_format(" %[%s%] %Q%c", main->output.stream, main->context.set.important, controller_string_type_s, main->context.set.important, controller_rule_item_type_name(item->type), f_string_eol_s[0]);
+ fl_print_format(" %[%s%] {%c", main->output.to.stream, main->context.set.important, controller_string_item_s, main->context.set.important, f_string_eol_s[0]);
+ fl_print_format(" %[%s%] %Q%c", main->output.to.stream, main->context.set.important, controller_string_type_s, main->context.set.important, controller_rule_item_type_name(item->type), f_string_eol_s[0]);
- fl_print_format(" %[%s%] {%c", main->output.stream, main->context.set.important, controller_string_rerun_s, main->context.set.important, f_string_eol_s[0]);
+ fl_print_format(" %[%s%] {%c", main->output.to.stream, main->context.set.important, controller_string_rerun_s, main->context.set.important, f_string_eol_s[0]);
for (j = 0; j < controller_rule_action_type_execute__enum_size; ++j) {
for (k = 0; k < 2; ++k) {
continue;
}
- fl_print_format(" %[", main->output.stream, main->context.set.important);
+ fl_print_format(" %[", main->output.to.stream, main->context.set.important);
switch (j) {
case controller_rule_action_type_execute_freeze:
- f_print_terminated(controller_string_freeze_s, main->output.stream);
+ f_print_terminated(controller_string_freeze_s, main->output.to.stream);
break;
case controller_rule_action_type_execute_kill:
- f_print_terminated(controller_string_kill_s, main->output.stream);
+ f_print_terminated(controller_string_kill_s, main->output.to.stream);
break;
case controller_rule_action_type_execute_pause:
- f_print_terminated(controller_string_pause_s, main->output.stream);
+ f_print_terminated(controller_string_pause_s, main->output.to.stream);
break;
case controller_rule_action_type_execute_reload:
- f_print_terminated(controller_string_reload_s, main->output.stream);
+ f_print_terminated(controller_string_reload_s, main->output.to.stream);
break;
case controller_rule_action_type_execute_restart:
- f_print_terminated(controller_string_restart_s, main->output.stream);
+ f_print_terminated(controller_string_restart_s, main->output.to.stream);
break;
case controller_rule_action_type_execute_resume:
- f_print_terminated(controller_string_resume_s, main->output.stream);
+ f_print_terminated(controller_string_resume_s, main->output.to.stream);
break;
case controller_rule_action_type_execute_start:
- f_print_terminated(controller_string_start_s, main->output.stream);
+ f_print_terminated(controller_string_start_s, main->output.to.stream);
break;
case controller_rule_action_type_execute_stop:
- f_print_terminated(controller_string_stop_s, main->output.stream);
+ f_print_terminated(controller_string_stop_s, main->output.to.stream);
break;
case controller_rule_action_type_execute_thaw:
- f_print_terminated(controller_string_thaw_s, main->output.stream);
+ f_print_terminated(controller_string_thaw_s, main->output.to.stream);
break;
default:
break;
}
- fl_print_format("%] %s", main->output.stream, main->context.set.important, k ? controller_string_success_s : controller_string_failure_s);
- fl_print_format(" %s %ul %s %ul", main->output.stream, controller_string_delay_s, rerun_item->delay, controller_string_max_s, rerun_item->max);
+ fl_print_format("%] %s", main->output.to.stream, main->context.set.important, k ? controller_string_success_s : controller_string_failure_s);
+ fl_print_format(" %s %ul %s %ul", main->output.to.stream, controller_string_delay_s, rerun_item->delay, controller_string_max_s, rerun_item->max);
if (!k && (item->reruns[j].is & controller_rule_rerun_is_failure_reset) || k && (item->reruns[j].is & controller_rule_rerun_is_success_reset)) {
- fl_print_format(" %s", main->output.stream, controller_string_reset_s);
+ fl_print_format(" %s", main->output.to.stream, controller_string_reset_s);
}
- f_print_terminated(f_string_eol_s, main->output.stream);
+ f_print_terminated(f_string_eol_s, main->output.to.stream);
} // for
} // for
- fl_print_format(" }%c", main->output.stream, f_string_eol_s[0]);
+ fl_print_format(" }%c", main->output.to.stream, f_string_eol_s[0]);
- fl_print_format(" %[%s%]", main->output.stream, main->context.set.important, controller_string_pid_file_s, main->context.set.important);
+ fl_print_format(" %[%s%]", main->output.to.stream, main->context.set.important, controller_string_pid_file_s, main->context.set.important);
if (item->pid_file.used) {
- fl_print_format(" %Q", main->output.stream, item->pid_file);
+ fl_print_format(" %Q", main->output.to.stream, item->pid_file);
}
- f_print_terminated(f_string_eol_s, main->output.stream);
+ f_print_terminated(f_string_eol_s, main->output.to.stream);
- fl_print_format(" %[%s%]", main->output.stream, main->context.set.important, controller_string_with_s, main->context.set.important);
+ fl_print_format(" %[%s%]", main->output.to.stream, main->context.set.important, controller_string_with_s, main->context.set.important);
if (item->with & controller_with_full_path) {
- fl_print_format(" %s", main->output.stream, controller_string_full_path_s);
+ fl_print_format(" %s", main->output.to.stream, controller_string_full_path_s);
}
- f_print_terminated(f_string_eol_s, main->output.stream);
+ f_print_terminated(f_string_eol_s, main->output.to.stream);
for (j = 0; j < item->actions.used; ++j) {
action = &item->actions.array[j];
- fl_print_format(" %[%s%] {%c", main->output.stream, main->context.set.important, controller_string_action_s, main->context.set.important, f_string_eol_s[0]);
- fl_print_format(" %[%s%] %q%c", main->output.stream, main->context.set.important, controller_string_type_s, main->context.set.important, controller_rule_action_type_name(action->type), f_string_eol_s[0]);
+ fl_print_format(" %[%s%] {%c", main->output.to.stream, main->context.set.important, controller_string_action_s, main->context.set.important, f_string_eol_s[0]);
+ fl_print_format(" %[%s%] %q%c", main->output.to.stream, main->context.set.important, controller_string_type_s, main->context.set.important, controller_rule_action_type_name(action->type), f_string_eol_s[0]);
if (item->type == controller_rule_item_type_script || item->type == controller_rule_item_type_utility) {
- fl_print_format(" %[%s%] {%c", main->output.stream, main->context.set.important, controller_string_parameter_s, main->context.set.important, f_string_eol_s[0]);
+ fl_print_format(" %[%s%] {%c", main->output.to.stream, main->context.set.important, controller_string_parameter_s, main->context.set.important, f_string_eol_s[0]);
parameter = &action->parameters.array[0];
if (parameter->used) {
- f_print_terminated(" ", main->output.stream);
+ f_print_terminated(" ", main->output.to.stream);
for (k = 0; k < parameter->used; ++k) {
if (parameter->string[k] == f_fss_eol) {
if (k + 1 < parameter->used) {
- f_print_terminated(f_string_eol_s, main->output.stream);
- f_print_terminated(" ", main->output.stream);
+ f_print_terminated(f_string_eol_s, main->output.to.stream);
+ f_print_terminated(" ", main->output.to.stream);
}
}
else {
- f_print_character_safely(parameter->string[k], main->output.stream);
+ f_print_character_safely(parameter->string[k], main->output.to.stream);
}
} // for
- f_print_terminated(f_string_eol_s, main->output.stream);
+ f_print_terminated(f_string_eol_s, main->output.to.stream);
}
- fl_print_format(" }%c", main->output.stream, f_string_eol_s[0]);
+ fl_print_format(" }%c", main->output.to.stream, f_string_eol_s[0]);
}
else {
for (k = 0; k < action->parameters.used; ++k) {
- fl_print_format(" %[%s%] %Q%c", main->output.stream, main->context.set.important, controller_string_parameter_s, main->context.set.important, action->parameters.array[k], f_string_eol_s[0]);
+ fl_print_format(" %[%s%] %Q%c", main->output.to.stream, main->context.set.important, controller_string_parameter_s, main->context.set.important, action->parameters.array[k], f_string_eol_s[0]);
} // for
}
- fl_print_format(" }%c", main->output.stream, f_string_eol_s[0]);
+ fl_print_format(" }%c", main->output.to.stream, f_string_eol_s[0]);
} // for
- fl_print_format(" }%c", main->output.stream, f_string_eol_s[0]);
+ fl_print_format(" }%c", main->output.to.stream, f_string_eol_s[0]);
} // for
}
- fl_print_format("}%c", main->output.stream, f_string_eol_s[0]);
+ fl_print_format("}%c", main->output.to.stream, f_string_eol_s[0]);
- controller_print_unlock_flush(main->output, global.thread);
+ controller_print_unlock_flush(main->output.to, global.thread);
}
#endif // _di_controller_rule_validate_
#endif
#ifndef _di_fake_print_help_
- f_status_t fake_print_help(const f_file_t output, const f_color_context_t context) {
+ f_status_t fake_print_help(const f_file_t file, const f_color_context_t context) {
- flockfile(output.stream);
+ flockfile(file.stream);
- fll_program_print_help_header(output, context, fake_name_long, fake_version);
+ fll_program_print_help_header(file, context, fake_name_long, fake_version);
- fll_program_print_help_option(output, context, f_console_standard_short_help_s, f_console_standard_long_help_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print this help message.");
- fll_program_print_help_option(output, context, f_console_standard_short_dark_s, f_console_standard_long_dark_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on dark backgrounds.");
- fll_program_print_help_option(output, context, f_console_standard_short_light_s, f_console_standard_long_light_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on light backgrounds.");
- fll_program_print_help_option(output, context, f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, "Do not output in color.");
- fll_program_print_help_option(output, context, f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Decrease verbosity beyond normal output.");
- fll_program_print_help_option(output, context, f_console_standard_short_normal_s, f_console_standard_long_normal_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Set verbosity to normal output.");
- fll_program_print_help_option(output, context, f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Increase verbosity beyond normal output.");
- fll_program_print_help_option(output, context, f_console_standard_short_debug_s, f_console_standard_long_debug_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Enable debugging, inceasing verbosity beyond normal output.");
- fll_program_print_help_option(output, context, f_console_standard_short_version_s, f_console_standard_long_version_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Print only the version number.");
+ fll_program_print_help_option(file, context, f_console_standard_short_help_s, f_console_standard_long_help_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print this help message.");
+ fll_program_print_help_option(file, context, f_console_standard_short_dark_s, f_console_standard_long_dark_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on dark backgrounds.");
+ fll_program_print_help_option(file, context, f_console_standard_short_light_s, f_console_standard_long_light_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on light backgrounds.");
+ fll_program_print_help_option(file, context, f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, "Do not file in color.");
+ fll_program_print_help_option(file, context, f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Decrease verbosity beyond normal file.");
+ fll_program_print_help_option(file, context, f_console_standard_short_normal_s, f_console_standard_long_normal_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Set verbosity to normal file.");
+ fll_program_print_help_option(file, context, f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Increase verbosity beyond normal file.");
+ fll_program_print_help_option(file, context, f_console_standard_short_debug_s, f_console_standard_long_debug_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Enable debugging, inceasing verbosity beyond normal file.");
+ fll_program_print_help_option(file, context, f_console_standard_short_version_s, f_console_standard_long_version_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Print only the version number.");
- f_print_character(f_string_eol_s[0], output.stream);
+ f_print_character(f_string_eol_s[0], file.stream);
- fll_program_print_help_option(output, context, fake_short_define, fake_long_define, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Append an additional define after defines from settings file.");
- fll_program_print_help_option(output, context, fake_short_fakefile, fake_long_fakefile, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Use this fakefile.");
- fll_program_print_help_option(output, context, fake_short_mode, fake_long_mode, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Use this mode when processing the build settings.");
- fll_program_print_help_option(output, context, fake_short_process, fake_long_process, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Process name for storing build states.");
- fll_program_print_help_option(output, context, fake_short_settings, fake_long_settings, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Use this settings file.");
+ fll_program_print_help_option(file, context, fake_short_define, fake_long_define, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Append an additional define after defines from settings file.");
+ fll_program_print_help_option(file, context, fake_short_fakefile, fake_long_fakefile, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Use this fakefile.");
+ fll_program_print_help_option(file, context, fake_short_mode, fake_long_mode, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Use this mode when processing the build settings.");
+ fll_program_print_help_option(file, context, fake_short_process, fake_long_process, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Process name for storing build states.");
+ fll_program_print_help_option(file, context, fake_short_settings, fake_long_settings, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Use this settings file.");
- f_print_character(f_string_eol_s[0], output.stream);
+ f_print_character(f_string_eol_s[0], file.stream);
- fll_program_print_help_option(output, context, fake_short_path_build, fake_long_path_build, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " 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_s, f_console_symbol_long_enable_s, " 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_s, f_console_symbol_long_enable_s, "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_s, f_console_symbol_long_enable_s, " Use includes/libraries/programs from this directory instead of system.");
+ fll_program_print_help_option(file, context, fake_short_path_build, fake_long_path_build, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Specify a custom build directory.");
+ fll_program_print_help_option(file, context, fake_short_path_data, fake_long_path_data, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Specify a custom path to the data files.");
+ fll_program_print_help_option(file, context, fake_short_path_sources, fake_long_path_sources, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Specify a custom path to the source files.");
+ fll_program_print_help_option(file, context, fake_short_path_work, fake_long_path_work, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Use includes/libraries/programs from this directory instead of system.");
- fl_print_format("%c%c %[Special Options:%] ", output.stream, f_string_eol_s[0], f_string_eol_s[0], context.set.important, context.set.important);
+ fl_print_format("%c%c %[Special Options:%] ", file.stream, f_string_eol_s[0], f_string_eol_s[0], context.set.important, context.set.important);
- fll_program_print_help_option_long(output, context, fake_long_documents_disabled, f_console_symbol_long_enable_s, " Forcibly do not build documents files.");
- fll_program_print_help_option_long(output, context, fake_long_documents_enabled, f_console_symbol_long_enable_s, " Forcibly do build documents files.");
- fll_program_print_help_option_long(output, context, fake_long_shared_disabled, f_console_symbol_long_enable_s, "Forcibly do not build shared files.");
- fll_program_print_help_option_long(output, context, fake_long_shared_enabled, f_console_symbol_long_enable_s, " Forcibly do build shared files.");
- fll_program_print_help_option_long(output, context, fake_long_static_disabled, f_console_symbol_long_enable_s, "Forcibly do not build static files.");
- fll_program_print_help_option_long(output, context, fake_long_static_enabled, f_console_symbol_long_enable_s, " Forcibly do build static files.");
+ fll_program_print_help_option_long(file, context, fake_long_documents_disabled, f_console_symbol_long_enable_s, " Forcibly do not build documents files.");
+ fll_program_print_help_option_long(file, context, fake_long_documents_enabled, f_console_symbol_long_enable_s, " Forcibly do build documents files.");
+ fll_program_print_help_option_long(file, context, fake_long_shared_disabled, f_console_symbol_long_enable_s, "Forcibly do not build shared files.");
+ fll_program_print_help_option_long(file, context, fake_long_shared_enabled, f_console_symbol_long_enable_s, " Forcibly do build shared files.");
+ fll_program_print_help_option_long(file, context, fake_long_static_disabled, f_console_symbol_long_enable_s, "Forcibly do not build static files.");
+ fll_program_print_help_option_long(file, context, fake_long_static_enabled, f_console_symbol_long_enable_s, " Forcibly do build static files.");
- fl_print_format("%c%c %[Operations:%] ", output.stream, f_string_eol_s[0], f_string_eol_s[0], context.set.important, context.set.important);
+ fl_print_format("%c%c %[Operations:%] ", file.stream, f_string_eol_s[0], f_string_eol_s[0], context.set.important, context.set.important);
- fll_program_print_help_option_other(output, context, fake_other_operation_build, " Build or compile the code based on build settings file.");
- fll_program_print_help_option_other(output, context, fake_other_operation_clean, " Delete all build files.");
- fll_program_print_help_option_other(output, context, fake_other_operation_make, " Build or compile the code based on fakefile.");
- fll_program_print_help_option_other(output, context, fake_other_operation_skeleton, "Build a skeleton directory structure.");
+ fll_program_print_help_option_other(file, context, fake_other_operation_build, " Build or compile the code based on build settings file.");
+ fll_program_print_help_option_other(file, context, fake_other_operation_clean, " Delete all build files.");
+ fll_program_print_help_option_other(file, context, fake_other_operation_make, " Build or compile the code based on fakefile.");
+ fll_program_print_help_option_other(file, context, fake_other_operation_skeleton, "Build a skeleton directory structure.");
- fll_program_print_help_usage(output, context, fake_name, "operation");
+ fll_program_print_help_usage(file, context, fake_name, "operation");
- fl_print_format(" When performing the %[%s%] operation, the", output.stream, context.set.notable, fake_other_operation_build, context.set.notable);
- fl_print_format(" %[%s%s%] parameter specifies a name (limited to alpha-numeric, underscore, and dash) to be used in addition to the global.%c", output.stream, context.set.notable, f_console_symbol_long_enable_s, fake_long_mode, context.set.notable, f_string_eol_s[0]);
+ fl_print_format(" When performing the %[%s%] operation, the", file.stream, context.set.notable, fake_other_operation_build, context.set.notable);
+ fl_print_format(" %[%s%s%] parameter specifies a name (limited to alpha-numeric, underscore, and dash) to be used in addition to the global.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fake_long_mode, context.set.notable, f_string_eol_s[0]);
- fl_print_format(" For example, when a %[%s%]", output.stream, context.set.notable, fake_make_parameter_variable_mode, context.set.notable);
- fl_print_format(" of 'fll_monolithic' is specified, build libraries from both 'build_libraries' and 'build_libraries-fll_monolithic' are used (but not 'build_libraries-fll_level').%c%c", output.stream, f_string_eol_s[0], f_string_eol_s[0]);
+ fl_print_format(" For example, when a %[%s%]", file.stream, context.set.notable, fake_make_parameter_variable_mode, context.set.notable);
+ fl_print_format(" of 'fll_monolithic' is specified, build libraries from both 'build_libraries' and 'build_libraries-fll_monolithic' are used (but not 'build_libraries-fll_level').%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]);
- fl_print_format(" When specifying the %[%s%] or the %[%s%]", output.stream, context.set.notable, fake_make_parameter_variable_fakefile, context.set.notable, context.set.notable, fake_make_parameter_variable_settings, context.set.notable);
- fl_print_format(" parameters, the filenames are relative to the data build directory, unless a path is used.%c", output.stream, f_string_eol_s[0]);
+ fl_print_format(" When specifying the %[%s%] or the %[%s%]", file.stream, context.set.notable, fake_make_parameter_variable_fakefile, context.set.notable, context.set.notable, fake_make_parameter_variable_settings, context.set.notable);
+ fl_print_format(" parameters, the filenames are relative to the data build directory, unless a path is used.%c", file.stream, f_string_eol_s[0]);
- fl_print_format(" For example, with '%[%s%s my_fakefile%]' the fakefile at", output.stream, context.set.notable, f_console_symbol_long_enable_s, fake_long_fakefile, context.set.notable);
- fl_print_format(" '%[./%s%smy_fakefile%]' would be used, however with", output.stream, context.set.notable, fake_default_path_data, fake_default_path_build, context.set.notable);
- fl_print_format(" '%[%s%s ./my_fakefile%]' the fakefile at", output.stream, context.set.notable, f_console_symbol_long_enable_s, fake_long_fakefile, context.set.notable);
- fl_print_format(" '%[./my_fakefile%]' would be used.%c%c", output.stream, context.set.notable, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]);
+ fl_print_format(" For example, with '%[%s%s my_fakefile%]' the fakefile at", file.stream, context.set.notable, f_console_symbol_long_enable_s, fake_long_fakefile, context.set.notable);
+ fl_print_format(" '%[./%s%smy_fakefile%]' would be used, however with", file.stream, context.set.notable, fake_default_path_data, fake_default_path_build, context.set.notable);
+ fl_print_format(" '%[%s%s ./my_fakefile%]' the fakefile at", file.stream, context.set.notable, f_console_symbol_long_enable_s, fake_long_fakefile, context.set.notable);
+ fl_print_format(" '%[./my_fakefile%]' would be used.%c%c", file.stream, context.set.notable, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]);
- funlockfile(output.stream);
+ funlockfile(file.stream);
return F_none;
}
}
if (choice == fake_parameter_verbosity_quiet) {
+ main->output.verbosity = f_console_verbosity_quiet;
main->error.verbosity = f_console_verbosity_quiet;
main->warning.verbosity = f_console_verbosity_quiet;
}
else if (choice == fake_parameter_verbosity_normal) {
+ main->output.verbosity = f_console_verbosity_normal;
main->error.verbosity = f_console_verbosity_normal;
main->warning.verbosity = f_console_verbosity_normal;
}
else if (choice == fake_parameter_verbosity_verbose) {
+ main->output.verbosity = f_console_verbosity_verbose;
main->error.verbosity = f_console_verbosity_verbose;
main->warning.verbosity = f_console_verbosity_verbose;
}
else if (choice == fake_parameter_verbosity_debug) {
+ main->output.verbosity = f_console_verbosity_debug;
main->error.verbosity = f_console_verbosity_debug;
main->warning.verbosity = f_console_verbosity_debug;
}
status = F_none;
if (main->parameters[fake_parameter_help].result == f_console_result_found) {
- fake_print_help(main->output, main->context);
+ fake_print_help(main->output.to, main->context);
fake_main_delete(main);
return F_none;
}
if (main->parameters[fake_parameter_version].result == f_console_result_found) {
- fll_program_print_version(main->output, fake_version);
+ fll_program_print_version(main->output.to, fake_version);
fake_main_delete(main);
return F_none;
fll_print_character(f_string_eol_s[0], main->error.to.stream);
}
else if (status != F_child) {
- fll_print_format("%cAll operations complete.%c%c", main->output.stream, f_string_eol_s[0], f_string_eol_s[0], f_string_eol_s[0]);
+ fll_print_format("%cAll operations complete.%c%c", main->output.to.stream, f_string_eol_s[0], f_string_eol_s[0], f_string_eol_s[0]);
}
}
}
f_array_lengths_t remaining;
bool process_pipe;
- f_file_t output;
+ fl_print_t output;
fl_print_t error;
fl_print_t warning;
fake_console_parameter_t_initialize, \
f_array_lengths_t_initialize, \
F_false, \
- macro_f_file_t_initialize2(f_type_output, f_type_descriptor_output, f_file_flag_write_only), \
fl_print_t_initialize, \
+ macro_fl_print_t_initialize_error(), \
macro_fl_print_t_initialize_warning(), \
0, \
0, \
/**
* Print help.
*
- * @param output
+ * @param file
* The file to print to.
* @param context
* The color context settings.
* F_none on success.
*/
#ifndef _di_fake_print_help_
- extern f_status_t fake_print_help(const f_file_t output, const f_color_context_t context);
+ extern f_status_t fake_print_help(const f_file_t file, const f_color_context_t context);
#endif // _di_fake_print_help_
/**
f_string_dynamic_t destination_file = f_string_dynamic_t_initialize;
f_string_dynamic_t destination_directory = f_string_dynamic_t_initialize;
- if (main.error.verbosity != f_console_verbosity_quiet) {
- fll_print_format("%c%[Copying %S.%]%c", main.output.stream, f_string_eol_s[0], main.context.set.important, label, main.context.set.important, f_string_eol_s[0]);
+ if (main.output.verbosity != f_console_verbosity_quiet) {
+ fll_print_format("%c%[Copying %S.%]%c", main.output.to.stream, f_string_eol_s[0], main.context.set.important, label, main.context.set.important, f_string_eol_s[0]);
}
macro_f_string_dynamic_t_resize(*status, path_source, source.used);
fl_directory_recurse_t recurse = fl_directory_recurse_t_initialize;
if (main.error.verbosity == f_console_verbosity_verbose) {
- recurse.output = main.output;
+ recurse.output.stream = main.output.to.stream;
+ recurse.output.id = main.output.to.id;
+ recurse.output.flag = main.output.to.flag;
+ recurse.output.size_read = main.output.to.size_read;
+ recurse.output.size_write = main.output.to.size_write;
recurse.verbose = fake_verbose_print_copy;
}
}
if (main.error.verbosity == f_console_verbosity_verbose) {
- fll_print_format("Copied file '%Q' to '%Q'.%c", main.output.stream, path_source, destination_file, f_string_eol_s[0]);
+ fll_print_format("Copied file '%Q' to '%Q'.%c", main.output.to.stream, path_source, destination_file, f_string_eol_s[0]);
}
}
else if (F_status_is_error(*status)) {
&path_headers,
};
- if (main.error.verbosity != f_console_verbosity_quiet) {
- fll_print_format("%c%[Creating base build directories.%]%c", main.output.stream, f_string_eol_s[0], main.context.set.important, main.context.set.important, f_string_eol_s[0]);
+ if (main.output.verbosity != f_console_verbosity_quiet) {
+ fll_print_format("%c%[Creating base build directories.%]%c", main.output.to.stream, f_string_eol_s[0], main.context.set.important, main.context.set.important, f_string_eol_s[0]);
}
for (uint8_t i = 0; i < 15; ++i) {
}
if (main.error.verbosity == f_console_verbosity_verbose) {
- fll_print_format("Created directory '%Q'.%c", main.output.stream, directorys[i], f_string_eol_s[0]);
+ fll_print_format("Created directory '%Q'.%c", main.output.to.stream, directorys[i], f_string_eol_s[0]);
}
} // for
if (F_status_is_error(*status) || f_file_exists(file_stage.string) == F_true || *status == F_child) return main.child;
if (!data_build.setting.build_sources_library.used) return 0;
- if (main.error.verbosity != f_console_verbosity_quiet) {
- fll_print_format("%c%[Compiling shared library.%]%c", main.output.stream, f_string_eol_s[0], main.context.set.important, main.context.set.important, f_string_eol_s[0]);
+ if (main.output.verbosity != f_console_verbosity_quiet) {
+ fll_print_format("%c%[Compiling shared library.%]%c", main.output.to.stream, f_string_eol_s[0], main.context.set.important, main.context.set.important, f_string_eol_s[0]);
}
f_string_dynamics_t arguments = f_string_dynamics_t_initialize;
*status = f_file_link(parameter_file_name_major, parameter_file_path);
if (F_status_is_error_not(*status) && main.error.verbosity == f_console_verbosity_verbose) {
- fll_print_format("Linked file '%S' to '%S'.%c", main.output.stream, parameter_file_path, parameter_file_name_major, f_string_eol_s[0]);
+ fll_print_format("Linked file '%S' to '%S'.%c", main.output.to.stream, parameter_file_path, parameter_file_name_major, f_string_eol_s[0]);
}
else if (F_status_is_error(*status)) {
if (F_status_set_fine(*status) == F_file_found) {
*status = f_file_link(parameter_file_name_minor, parameter_file_path);
if (F_status_is_error_not(*status) && main.error.verbosity == f_console_verbosity_verbose) {
- fll_print_format("Linked file '%S' to '%S'.%c", main.output.stream, parameter_file_path, parameter_file_name_minor, f_string_eol_s[0]);
+ fll_print_format("Linked file '%S' to '%S'.%c", main.output.to.stream, parameter_file_path, parameter_file_name_minor, f_string_eol_s[0]);
}
else if (F_status_is_error(*status)) {
if (F_status_set_fine(*status) == F_file_found) {
*status = f_file_link(parameter_file_name_micro, parameter_file_path);
if (F_status_is_error_not(*status) && main.error.verbosity == f_console_verbosity_verbose) {
- fll_print_format("Linked file '%S' to '%S'.%c", main.output.stream, parameter_file_path, parameter_file_name_micro, f_string_eol_s[0]);
+ fll_print_format("Linked file '%S' to '%S'.%c", main.output.to.stream, 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) {
*status = f_file_link(parameter_file_name_nano, parameter_file_path);
if (F_status_is_error_not(*status) && main.error.verbosity == f_console_verbosity_verbose) {
- fll_print_format("Linked file '%S' to '%S'.%c", main.output.stream, parameter_file_path, parameter_file_name_nano, f_string_eol_s[0]);
+ fll_print_format("Linked file '%S' to '%S'.%c", main.output.to.stream, parameter_file_path, parameter_file_name_nano, f_string_eol_s[0]);
}
else if (F_status_is_error(*status)) {
if (F_status_set_fine(*status) == F_file_found) {
if (F_status_is_error(*status) || f_file_exists(file_stage.string) == F_true || *status == F_child) return main.child;
if (!data_build.setting.build_sources_library.used) return 0;
- if (main.error.verbosity != f_console_verbosity_quiet) {
- fll_print_format("%c%[Compiling static library.%]%c", main.output.stream, f_string_eol_s[0], main.context.set.important, main.context.set.important, f_string_eol_s[0]);
+ if (main.output.verbosity != f_console_verbosity_quiet) {
+ fll_print_format("%c%[Compiling static library.%]%c", main.output.to.stream, f_string_eol_s[0], main.context.set.important, main.context.set.important, f_string_eol_s[0]);
}
f_string_dynamic_t file_name = f_string_dynamic_t_initialize;
if (F_status_is_error(*status) || f_file_exists(file_stage.string) == F_true || *status == F_child) return main.child;
if (!data_build.setting.build_sources_library.used) return 0;
- if (main.error.verbosity != f_console_verbosity_quiet) {
- fll_print_format("%c%[Compiling static objects.%]%c", main.output.stream, f_string_eol_s[0], main.context.set.important, main.context.set.important, f_string_eol_s[0]);
+ if (main.output.verbosity != f_console_verbosity_quiet) {
+ fll_print_format("%c%[Compiling static objects.%]%c", main.output.to.stream, f_string_eol_s[0], main.context.set.important, main.context.set.important, f_string_eol_s[0]);
}
f_string_dynamic_t file_name = f_string_dynamic_t_initialize;
}
if (main.error.verbosity == f_console_verbosity_verbose) {
- fll_print_format("Directory '%Q' created.%c", main.output.stream, destination_path, f_string_eol_s[0]);
+ fll_print_format("Directory '%Q' created.%c", main.output.to.stream, destination_path, f_string_eol_s[0]);
}
}
else if (F_status_is_error(*status)) {
fake_build_load_setting(*main, setting_file, &data_build.setting, &status);
if (F_status_is_fine(status)) {
- if (main->error.verbosity != f_console_verbosity_quiet) {
- flockfile(main->output.stream);
+ if (main->output.verbosity != f_console_verbosity_quiet) {
+ flockfile(main->output.to.stream);
- fl_print_format("%c%[Building project%] ", main->output.stream, f_string_eol_s[0], main->context.set.important, main->context.set.important);
- fl_print_format("%[%Q%]", main->output.stream, main->context.set.notable, data_build.setting.project_name, main->context.set.notable);
- fl_print_format("%[.%]%c", main->output.stream, main->context.set.important, main->context.set.important, f_string_eol_s[0]);
+ fl_print_format("%c%[Building project%] ", main->output.to.stream, f_string_eol_s[0], main->context.set.important, main->context.set.important);
+ fl_print_format("%[%Q%]", main->output.to.stream, main->context.set.notable, data_build.setting.project_name, main->context.set.notable);
+ fl_print_format("%[.%]%c", main->output.to.stream, main->context.set.important, main->context.set.important, f_string_eol_s[0]);
- funlockfile(main->output.stream);
+ funlockfile(main->output.to.stream);
}
}
if (F_status_is_error(*status) || f_file_exists(file_stage.string) == F_true || *status == F_child) return main.child;
if (!data_build.setting.build_sources_program.used) return 0;
- if (main.error.verbosity != f_console_verbosity_quiet) {
- fll_print_format("%c%[Compiling shared program.%]%c", main.output.stream, f_string_eol_s[0], main.context.set.important, main.context.set.important, f_string_eol_s[0]);
+ if (main.output.verbosity != f_console_verbosity_quiet) {
+ fll_print_format("%c%[Compiling shared program.%]%c", main.output.to.stream, f_string_eol_s[0], main.context.set.important, main.context.set.important, f_string_eol_s[0]);
}
f_string_dynamics_t arguments = f_string_dynamics_t_initialize;
if (F_status_is_error(*status) || f_file_exists(file_stage.string) == F_true || *status == F_child) return main.child;
if (!data_build.setting.build_sources_program.used) return 0;
- if (main.error.verbosity != f_console_verbosity_quiet) {
- fll_print_format("%c%[Compiling static program.%]%c", main.output.stream, f_string_eol_s[0], main.context.set.important, main.context.set.important, f_string_eol_s[0]);
+ if (main.output.verbosity != f_console_verbosity_quiet) {
+ fll_print_format("%c%[Compiling static program.%]%c", main.output.to.stream, f_string_eol_s[0], main.context.set.important, main.context.set.important, f_string_eol_s[0]);
}
f_string_dynamics_t arguments = f_string_dynamics_t_initialize;
f_status_t status = F_none;
- if (main.error.verbosity != f_console_verbosity_quiet) {
- flockfile(main.output.stream);
+ if (main.output.verbosity != f_console_verbosity_quiet) {
+ flockfile(main.output.to.stream);
- fl_print_format("%c%[Deleting all files within build directory '%]", main.output.stream, f_string_eol_s[0], main.context.set.important, main.context.set.important);
- fl_print_format("%[%Q%]", main.output.stream, main.context.set.notable, main.path_build, main.context.set.notable);
- fl_print_format("%[.%]%c", main.output.stream, main.context.set.important, main.context.set.important, f_string_eol_s[0]);
+ fl_print_format("%c%[Deleting all files within build directory '%]", main.output.to.stream, f_string_eol_s[0], main.context.set.important, main.context.set.important);
+ fl_print_format("%[%Q%]", main.output.to.stream, main.context.set.notable, main.path_build, main.context.set.notable);
+ fl_print_format("%[.%]%c", main.output.to.stream, main.context.set.important, main.context.set.important, f_string_eol_s[0]);
- funlockfile(main.output.stream);
+ funlockfile(main.output.to.stream);
}
if (fake_signal_received(main)) {
if (F_status_set_fine(status) == F_file_found_not) {
if (main.error.verbosity == f_console_verbosity_verbose) {
- flockfile(main.output.stream);
+ flockfile(main.output.to.stream);
- f_print_terminated("The build directory '", main.output.stream);
- fl_print_format("%[%Q%]", main.output.stream, main.context.set.notable, main.path_build, main.context.set.notable);
- fl_print_format("' does not exist.%c", main.output.stream, f_string_eol_s[0]);
+ f_print_terminated("The build directory '", main.output.to.stream);
+ fl_print_format("%[%Q%]", main.output.to.stream, main.context.set.notable, main.path_build, main.context.set.notable);
+ fl_print_format("' does not exist.%c", main.output.to.stream, f_string_eol_s[0]);
- funlockfile(main.output.stream);
+ funlockfile(main.output.to.stream);
}
status = F_none;
if (F_status_is_error(*status)) return 1;
if (main.error.verbosity == f_console_verbosity_verbose) {
- flockfile(main.output.stream);
+ flockfile(main.output.to.stream);
- f_print_dynamic(program, main.output.stream);
+ f_print_dynamic(program, main.output.to.stream);
for (f_array_length_t i = 0; i < arguments.used; ++i) {
if (!arguments.array[i].used) continue;
- fl_print_format(" %Q", main.output.stream, arguments.array[i]);
+ fl_print_format(" %Q", main.output.to.stream, arguments.array[i]);
} // for
- f_print_character(f_string_eol_s[0], main.output.stream);
+ f_print_character(f_string_eol_s[0], main.output.to.stream);
- funlockfile(main.output.stream);
+ funlockfile(main.output.to.stream);
// flush to stdout before executing command.
- fflush(main.output.stream);
+ fflush(main.output.to.stream);
}
if (fake_signal_received(main)) {
return F_signal;
}
- if (main->error.verbosity != f_console_verbosity_quiet) {
- fll_print_format("%c$[Making project.%]%c", main->output.stream, f_string_eol_s[0], main->context.set.important, main->context.set.important, f_string_eol_s[0]);
+ if (main->output.verbosity != f_console_verbosity_quiet) {
+ fll_print_format("%c$[Making project.%]%c", main->output.to.stream, f_string_eol_s[0], main->context.set.important, main->context.set.important, f_string_eol_s[0]);
}
f_status_t status = F_none;
const f_fss_named_t *section = &data_make->fakefile.array[id_section];
- if (main->error.verbosity != f_console_verbosity_quiet) {
- flockfile(main->output.stream);
+ if (main->output.verbosity != f_console_verbosity_quiet) {
+ flockfile(main->output.to.stream);
- fl_print_format("%c%[Processing Section '%]", main->output.stream, f_string_eol_s[0], main->context.set.important, main->context.set.important);
- fl_print_format("%[%Q%]", main->output.stream, main->context.set.notable, section->name, main->context.set.notable);
- fl_print_format("%['.%]%c", main->output.stream, main->context.set.important, main->context.set.important, f_string_eol_s[0]);
+ fl_print_format("%c%[Processing Section '%]", main->output.to.stream, f_string_eol_s[0], main->context.set.important, main->context.set.important);
+ fl_print_format("%[%Q%]", main->output.to.stream, main->context.set.notable, section->name, main->context.set.notable);
+ fl_print_format("%['.%]%c", main->output.to.stream, main->context.set.important, main->context.set.important, f_string_eol_s[0]);
- funlockfile(main->output.stream);
+ funlockfile(main->output.to.stream);
}
if (!section->objects.used) {
}
if (main->error.verbosity == f_console_verbosity_verbose) {
- flockfile(main->output.stream);
+ flockfile(main->output.to.stream);
- fl_print_format("%cBreaking as '", main->output.stream, f_string_eol_s[0]);
- fl_print_format("%[%S%]", main->output.stream, main->context.set.notable, arguments.used ? arguments.array[0].string : fake_make_operation_argument_success, main->context.set.notable);
- fl_print_format("'.%c", main->output.stream, f_string_eol_s[0]);
+ fl_print_format("%cBreaking as '", main->output.to.stream, f_string_eol_s[0]);
+ fl_print_format("%[%S%]", main->output.to.stream, main->context.set.notable, arguments.used ? arguments.array[0].string : fake_make_operation_argument_success, main->context.set.notable);
+ fl_print_format("'.%c", main->output.to.stream, f_string_eol_s[0]);
- funlockfile(main->output.stream);
+ funlockfile(main->output.to.stream);
}
return 0;
f_array_length_t destination_length = 0;
if (main->error.verbosity == f_console_verbosity_verbose) {
- recurse.output = main->output;
+ recurse.output = main->output.to;
recurse.verbose = fake_verbose_print_clone;
}
*status = F_status_set_error(F_failure);
}
else if (main->error.verbosity == f_console_verbosity_verbose) {
- flockfile(main->output.stream);
+ flockfile(main->output.to.stream);
- fl_print_format("%cCloned '%[%Q%]' to '", main->output.stream, f_string_eol_s[0], main->context.set.notable, arguments.array[i], main->context.set.notable);
- fl_print_format("%[%S%]'.%c", main->output.stream, f_string_eol_s[0], main->context.set.notable, destination, main->context.set.notable, f_string_eol_s[0]);
+ fl_print_format("%cCloned '%[%Q%]' to '", main->output.to.stream, f_string_eol_s[0], main->context.set.notable, arguments.array[i], main->context.set.notable);
+ fl_print_format("%[%S%]'.%c", main->output.to.stream, f_string_eol_s[0], main->context.set.notable, destination, main->context.set.notable, f_string_eol_s[0]);
- funlockfile(main->output.stream);
+ funlockfile(main->output.to.stream);
}
}
else if (F_status_is_error(status_file)) {
macro_f_mode_t_set_default_umask(mode, main->umask);
if (main->error.verbosity == f_console_verbosity_verbose) {
- recurse.output = main->output;
+ recurse.output = main->output.to;
recurse.verbose = fake_verbose_print_copy;
}
*status = F_status_set_error(F_failure);
}
else if (main->error.verbosity == f_console_verbosity_verbose) {
- flockfile(main->output.stream);
+ flockfile(main->output.to.stream);
- fl_print_format("%cCopied '%[%Q%]", main->output.stream, f_string_eol_s[0], main->context.set.notable, arguments.array[i], main->context.set.notable);
- fl_print_format("' to '%[%S%]'.%c", main->output.stream, main->context.set.notable, destination, main->context.set.notable, f_string_eol_s[0]);
+ fl_print_format("%cCopied '%[%Q%]", main->output.to.stream, f_string_eol_s[0], main->context.set.notable, arguments.array[i], main->context.set.notable);
+ fl_print_format("' to '%[%S%]'.%c", main->output.to.stream, main->context.set.notable, destination, main->context.set.notable, f_string_eol_s[0]);
- funlockfile(main->output.stream);
+ funlockfile(main->output.to.stream);
}
}
else if (F_status_is_error(status_file)) {
fll_error_print(data_make->error, F_status_set_fine(*status), "f_environment_set", F_true);
}
else if (main->error.verbosity == f_console_verbosity_verbose) {
- fll_print_format("%cDefined environment variable '%[%Q%]'.%c", main->output.stream, f_string_eol_s[0], main->context.set.notable, arguments.array[0], main->context.set.notable, f_string_eol_s[0]);
+ fll_print_format("%cDefined environment variable '%[%Q%]'.%c", main->output.to.stream, f_string_eol_s[0], main->context.set.notable, arguments.array[0], main->context.set.notable, f_string_eol_s[0]);
}
return 0;
if (F_status_set_fine(*status) == F_file_found_not) {
if (main->error.verbosity == f_console_verbosity_verbose) {
- fll_print_format("%cThe directory '%[%Q%]' does not exist.%c", main->output.stream, f_string_eol_s[0], main->context.set.notable, arguments.array[i], main->context.set.notable, f_string_eol_s[0]);
+ fll_print_format("%cThe directory '%[%Q%]' does not exist.%c", main->output.to.stream, f_string_eol_s[0], main->context.set.notable, arguments.array[i], main->context.set.notable, f_string_eol_s[0]);
}
*status = F_none;
return 0;
}
else if (main->error.verbosity == f_console_verbosity_verbose) {
- fll_print_format("%cRemoved '%[%Q%]'.%c", main->output.stream, f_string_eol_s[0], main->context.set.notable, arguments.array[i], main->context.set.notable, f_string_eol_s[0]);
+ fll_print_format("%cRemoved '%[%Q%]'.%c", main->output.to.stream, f_string_eol_s[0], main->context.set.notable, arguments.array[i], main->context.set.notable, f_string_eol_s[0]);
}
}
else {
if (F_status_set_fine(*status) == F_file_found_not) {
if (main->error.verbosity == f_console_verbosity_verbose) {
- fll_print_format("%cThe file '%[%Q%]' does not exist.%c", main->output.stream, f_string_eol_s[0], main->context.set.notable, arguments.array[i], main->context.set.notable, f_string_eol_s[0]);
+ fll_print_format("%cThe file '%[%Q%]' does not exist.%c", main->output.to.stream, f_string_eol_s[0], main->context.set.notable, arguments.array[i], main->context.set.notable, f_string_eol_s[0]);
}
*status = F_none;
return 0;
}
else if (main->error.verbosity == f_console_verbosity_verbose) {
- fll_print_format("%cRemoved '%[%Q%]'.%c", main->output.stream, f_string_eol_s[0], main->context.set.notable, arguments.array[i], main->context.set.notable, f_string_eol_s[0]);
+ fll_print_format("%cRemoved '%[%Q%]'.%c", main->output.to.stream, f_string_eol_s[0], main->context.set.notable, arguments.array[i], main->context.set.notable, f_string_eol_s[0]);
}
}
} // for
}
if (main->error.verbosity == f_console_verbosity_verbose) {
- fll_print_format("%cExiting as '%[%S%]'.%c", main->output.stream, f_string_eol_s[0], main->context.set.notable, arguments.used ? arguments.array[0].string : fake_make_operation_argument_success, main->context.set.notable, f_string_eol_s[0]);
+ fll_print_format("%cExiting as '%[%S%]'.%c", main->output.to.stream, f_string_eol_s[0], main->context.set.notable, arguments.used ? arguments.array[0].string : fake_make_operation_argument_success, main->context.set.notable, f_string_eol_s[0]);
}
return 0;
}
if (main->error.verbosity == f_console_verbosity_verbose) {
- flockfile(main->output.stream);
+ flockfile(main->output.to.stream);
- f_print_terminated("Set failure state to '", main->output.stream);
+ f_print_terminated("Set failure state to '", main->output.to.stream);
if (data_make->setting_make.fail == fake_make_operation_fail_type_exit) {
- fl_print_format("%[%s%]", main->output.stream, main->context.set.notable, fake_make_operation_argument_exit, main->context.set.notable);
+ fl_print_format("%[%s%]", main->output.to.stream, main->context.set.notable, fake_make_operation_argument_exit, main->context.set.notable);
}
else if (data_make->setting_make.fail == fake_make_operation_fail_type_warn) {
- fl_print_format("%[%s%]", main->output.stream, main->context.set.notable, fake_make_operation_argument_warn, main->context.set.notable);
+ fl_print_format("%[%s%]", main->output.to.stream, main->context.set.notable, fake_make_operation_argument_warn, main->context.set.notable);
}
else if (data_make->setting_make.fail == fake_make_operation_fail_type_ignore) {
- fl_print_format("%[%s%]", main->output.stream, main->context.set.notable, fake_make_operation_argument_ignore, main->context.set.notable);
+ fl_print_format("%[%s%]", main->output.to.stream, main->context.set.notable, fake_make_operation_argument_ignore, main->context.set.notable);
}
- fl_print_format("'.%c", main->output.stream, f_string_eol_s[0]);
+ fl_print_format("'.%c", main->output.to.stream, f_string_eol_s[0]);
- funlockfile(main->output.stream);
+ funlockfile(main->output.to.stream);
}
return 0;
fll_error_file_print(data_make->error, F_status_set_fine(*status), "f_file_role_change", F_true, arguments.array[i].string, "change group of", fll_error_file_type_file);
}
else if (main->error.verbosity == f_console_verbosity_verbose) {
- flockfile(main->output.stream);
+ flockfile(main->output.to.stream);
- fl_print_format("Changed group of '%[%s%]", main->output.stream, main->context.set.notable, arguments.array[i], main->context.set.notable);
- fl_print_format("' to %[%ul%].%c", main->output.stream, main->context.set.notable, id, main->context.set.notable, f_string_eol_s[0]);
+ fl_print_format("Changed group of '%[%s%]", main->output.to.stream, main->context.set.notable, arguments.array[i], main->context.set.notable);
+ fl_print_format("' to %[%ul%].%c", main->output.to.stream, main->context.set.notable, id, main->context.set.notable, f_string_eol_s[0]);
- funlockfile(main->output.stream);
+ funlockfile(main->output.to.stream);
}
} // for
fll_error_file_print(data_make->error, F_status_set_fine(*status), "fll_file_role_change_all", F_true, arguments.array[i].string, "change group of", fll_error_file_type_file);
}
else if (main->error.verbosity == f_console_verbosity_verbose) {
- flockfile(main->output.stream);
+ flockfile(main->output.to.stream);
- fl_print_format("Changed group of '%[%s%]", main->output.stream, main->context.set.notable, arguments.array[i], main->context.set.notable);
- fl_print_format("' to %[%ul%].%c", main->output.stream, main->context.set.notable, id, main->context.set.notable, f_string_eol_s[0]);
+ fl_print_format("Changed group of '%[%s%]", main->output.to.stream, main->context.set.notable, arguments.array[i], main->context.set.notable);
+ fl_print_format("' to %[%ul%].%c", main->output.to.stream, main->context.set.notable, id, main->context.set.notable, f_string_eol_s[0]);
- funlockfile(main->output.stream);
+ funlockfile(main->output.to.stream);
}
} // for
fll_error_file_print(data_make->error, F_status_set_fine(*status), "f_file_link", F_true, arguments.array[1].string, "create link", fll_error_file_type_file);
}
else if (main->error.verbosity == f_console_verbosity_verbose) {
- flockfile(main->output.stream);
+ flockfile(main->output.to.stream);
- fl_print_format("Created symbolic link from '%[%Q%]", main->output.stream, main->context.set.notable, arguments.array[1], main->context.set.notable);
- fl_print_format("' to %[%Q%].%c", main->output.stream, main->context.set.notable, arguments.array[0], main->context.set.notable, f_string_eol_s[0]);
+ fl_print_format("Created symbolic link from '%[%Q%]", main->output.to.stream, main->context.set.notable, arguments.array[1], main->context.set.notable);
+ fl_print_format("' to %[%Q%].%c", main->output.to.stream, main->context.set.notable, arguments.array[0], main->context.set.notable, f_string_eol_s[0]);
- funlockfile(main->output.stream);
+ funlockfile(main->output.to.stream);
}
return 0;
}
if (main->error.verbosity == f_console_verbosity_verbose) {
- fll_print_format("Changed mode of '%Q' to %#@u.%c", main->output.stream, arguments.array[i], mode, f_string_eol_s[0]);
+ fll_print_format("Changed mode of '%Q' to %#@u.%c", main->output.to.stream, arguments.array[i], mode, f_string_eol_s[0]);
}
} // for
}
if (main->error.verbosity == f_console_verbosity_verbose) {
- fll_print_format("Changed mode of '%Q' to %#@u.%c", main->output.stream, arguments.array[i], mode, f_string_eol_s[0]);
+ fll_print_format("Changed mode of '%Q' to %#@u.%c", main->output.to.stream, arguments.array[i], mode, f_string_eol_s[0]);
}
} // for
f_array_length_t destination_length = 0;
if (main->error.verbosity == f_console_verbosity_verbose) {
- recurse.output = main->output;
+ recurse.output = main->output.to;
recurse.verbose = fake_verbose_print_move;
}
break;
}
else if (main->error.verbosity == f_console_verbosity_verbose) {
- fll_print_format("Changed owner of '%Q' to %u.%c", main->output.stream, arguments.array[i], id, f_string_eol_s[0]);
+ fll_print_format("Changed owner of '%Q' to %u.%c", main->output.to.stream, arguments.array[i], id, f_string_eol_s[0]);
}
} // for
fll_error_file_print(data_make->error, F_status_set_fine(*status), "fll_file_role_change_all", F_true, arguments.array[i].string, "change owner of", fll_error_file_type_file);
}
else if (main->error.verbosity == f_console_verbosity_verbose) {
- fll_print_format("Changed owner of '%Q' to %u.%c", main->output.stream, arguments.array[i], id, f_string_eol_s[0]);
+ fll_print_format("Changed owner of '%Q' to %u.%c", main->output.to.stream, arguments.array[i], id, f_string_eol_s[0]);
}
} // for
return 0;
}
- fll_print_format("Changed to project path '%[%Q%]'.%c", main->output.stream, main->context.set.notable, data_make->path_cache, main->context.set.notable, f_string_eol_s[0]);
+ fll_print_format("Changed to project path '%[%Q%]'.%c", main->output.to.stream, main->context.set.notable, data_make->path_cache, main->context.set.notable, f_string_eol_s[0]);
}
return 0;
}
if (operation == fake_make_operation_type_print) {
- flockfile(main->output.stream);
+ flockfile(main->output.to.stream);
for (f_array_length_t i = 0; i < arguments.used; ++i) {
- f_print_dynamic(arguments.array[i], main->output.stream);
+ f_print_dynamic(arguments.array[i], main->output.to.stream);
if (i + 1 < arguments.used) {
- f_print_character(f_string_space_s[0], main->output.stream);
+ f_print_character(f_string_space_s[0], main->output.to.stream);
}
} // for
- f_print_character(f_string_space_s[0], main->output.stream);
+ f_print_character(f_string_space_s[0], main->output.to.stream);
- funlockfile(main->output.stream);
+ funlockfile(main->output.to.stream);
return 0;
}
return 0;
}
- fll_print_format("Changed to project path '%[%Q%]'.%c", main->output.stream, main->context.set.notable, data_make->path_cache, main->context.set.notable, f_string_eol_s[0]);
+ fll_print_format("Changed to project path '%[%Q%]'.%c", main->output.to.stream, main->context.set.notable, data_make->path_cache, main->context.set.notable, f_string_eol_s[0]);
}
++data_make->path.stack.used;
}
if (main->error.verbosity == f_console_verbosity_verbose) {
- fll_print_format("Changed to project path ''.%c", main->output.stream, f_string_eol_s[0]);
+ fll_print_format("Changed to project path ''.%c", main->output.to.stream, f_string_eol_s[0]);
}
// clear stack, except for the project root.
}
if (main->error.verbosity == f_console_verbosity_verbose) {
- fll_print_format("Touched '%[%Q%]'.%c", main->output.stream, main->context.set.notable, arguments.array[i], main->context.set.notable, f_string_eol_s[0]);
+ fll_print_format("Touched '%[%Q%]'.%c", main->output.to.stream, main->context.set.notable, arguments.array[i], main->context.set.notable, f_string_eol_s[0]);
}
} // for
}
}
if (main.error.verbosity == f_console_verbosity_verbose) {
- flockfile(main.output.stream);
+ flockfile(main.output.to.stream);
- f_print_dynamic_safely(program, main.output.stream);
+ f_print_dynamic_safely(program, main.output.to.stream);
for (f_array_length_t i = 0; i < arguments.used; ++i) {
if (arguments.array[i].used) {
- fll_print_format(" %Q", main.output.stream, arguments.array[i]);
+ fll_print_format(" %Q", main.output.to.stream, arguments.array[i]);
}
} // for
- f_print_character(f_string_eol_s[0], main.output.stream);
+ f_print_character(f_string_eol_s[0], main.output.to.stream);
- funlockfile(main.output.stream);
+ funlockfile(main.output.to.stream);
// flush to stdout before executing command.
- fflush(main.output.stream);
+ fflush(main.output.to.stream);
}
int return_code = 0;
if (fl_string_dynamic_compare_string(fake_make_operation_argument_exit, arguments.array[0], fake_make_operation_argument_exit_length) == F_equal_to_not) {
if (fl_string_dynamic_compare_string(fake_make_operation_argument_warn, arguments.array[0], fake_make_operation_argument_warn_length) == F_equal_to_not) {
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_make->error.verbosity != f_console_verbosity_quiet && data_make->error.to.stream) {
flockfile(data_make->error.to.stream);
f_status_t status = F_none;
- if (main.error.verbosity != f_console_verbosity_quiet) {
- fll_print_format("%cGenerating skeleton structure.%c", main.output.stream, f_string_eol_s[0], f_string_eol_s[0]);
+ if (main.output.verbosity != f_console_verbosity_quiet) {
+ fll_print_format("%cGenerating skeleton structure.%c", main.output.to.stream, f_string_eol_s[0], f_string_eol_s[0]);
}
{
if (status == F_true) {
if (main.error.verbosity == f_console_verbosity_verbose) {
- fll_print_format("Directory '%Q' already exists.%c", main.output.stream, path, f_string_eol_s[0]);
+ fll_print_format("Directory '%Q' already exists.%c", main.output.to.stream, path, f_string_eol_s[0]);
}
return F_none;
}
if (main.error.verbosity == f_console_verbosity_verbose) {
- fll_print_format("Directory '%Q' created.%c", main.output.stream, path, f_string_eol_s[0]);
+ fll_print_format("Directory '%Q' created.%c", main.output.to.stream, path, f_string_eol_s[0]);
}
}
else if (F_status_is_error(status)) {
if (status == F_true) {
if (main.error.verbosity == f_console_verbosity_verbose) {
- fll_print_format("File '%Q' already exists.%c", main.output.stream, path, f_string_eol_s[0]);
+ fll_print_format("File '%Q' already exists.%c", main.output.to.stream, path, f_string_eol_s[0]);
}
return F_none;
if (status == F_true) {
if (main.error.verbosity == f_console_verbosity_verbose) {
- fll_print_format("File '%Q' already exists (as a symbolic link).%c", main.output.stream, path, f_string_eol_s[0]);
+ fll_print_format("File '%Q' already exists (as a symbolic link).%c", main.output.to.stream, path, f_string_eol_s[0]);
}
return F_none;
if (status == F_false) {
if (main.error.verbosity == f_console_verbosity_verbose) {
- fll_print_format("File '%Q' already exists but is not a regular file (or symbolic link).%c", main.output.stream, path, f_string_eol_s[0]);
+ fll_print_format("File '%Q' already exists but is not a regular file (or symbolic link).%c", main.output.to.stream, path, f_string_eol_s[0]);
}
return F_status_set_warning(F_none);
}
if (main.error.verbosity == f_console_verbosity_verbose) {
- fll_print_format("File '%Q' created.%c", main.output.stream, path, f_string_eol_s[0]);
+ fll_print_format("File '%Q' created.%c", main.output.to.stream, path, f_string_eol_s[0]);
}
if (content.used) {
}
if (main.error.verbosity == f_console_verbosity_verbose) {
- fll_print_format("File '%Q' pre-populated.%c", main.output.stream, path, f_string_eol_s[0]);
+ fll_print_format("File '%Q' pre-populated.%c", main.output.to.stream, path, f_string_eol_s[0]);
}
f_file_stream_close(F_true, &file);
#endif
#ifndef _di_firewall_print_help_
- f_status_t firewall_print_help(const f_file_t output, const f_color_context_t context) {
+ f_status_t firewall_print_help(const f_file_t file, const f_color_context_t context) {
- flockfile(output.stream);
+ flockfile(file.stream);
- fll_program_print_help_header(output, context, firewall_name_long, firewall_version);
+ fll_program_print_help_header(file, context, firewall_name_long, firewall_version);
- fll_program_print_help_option(output, context, f_console_standard_short_help_s, f_console_standard_long_help_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print this help message.");
- fll_program_print_help_option(output, context, f_console_standard_short_dark_s, f_console_standard_long_dark_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on dark backgrounds.");
- fll_program_print_help_option(output, context, f_console_standard_short_light_s, f_console_standard_long_light_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on light backgrounds.");
- fll_program_print_help_option(output, context, f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, "Do not output in color.");
- fll_program_print_help_option(output, context, f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Decrease verbosity beyond normal output.");
- fll_program_print_help_option(output, context, f_console_standard_short_normal_s, f_console_standard_long_normal_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Set verbosity to normal output.");
- fll_program_print_help_option(output, context, f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Increase verbosity beyond normal output.");
- fll_program_print_help_option(output, context, f_console_standard_short_debug_s, f_console_standard_long_debug_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Enable debugging, inceasing verbosity beyond normal output.");
- fll_program_print_help_option(output, context, f_console_standard_short_version_s, f_console_standard_long_version_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Print only the version number.");
+ fll_program_print_help_option(file, context, f_console_standard_short_help_s, f_console_standard_long_help_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print this help message.");
+ fll_program_print_help_option(file, context, f_console_standard_short_dark_s, f_console_standard_long_dark_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on dark backgrounds.");
+ fll_program_print_help_option(file, context, f_console_standard_short_light_s, f_console_standard_long_light_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on light backgrounds.");
+ fll_program_print_help_option(file, context, f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, "Do not file in color.");
+ fll_program_print_help_option(file, context, f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Decrease verbosity beyond normal file.");
+ fll_program_print_help_option(file, context, f_console_standard_short_normal_s, f_console_standard_long_normal_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Set verbosity to normal file.");
+ fll_program_print_help_option(file, context, f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Increase verbosity beyond normal file.");
+ fll_program_print_help_option(file, context, f_console_standard_short_debug_s, f_console_standard_long_debug_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Enable debugging, inceasing verbosity beyond normal file.");
+ fll_program_print_help_option(file, context, f_console_standard_short_version_s, f_console_standard_long_version_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Print only the version number.");
- fl_print_format("%c%c %[Available Commands:%] ", output.stream, f_string_eol_s[0], f_string_eol_s[0], context.set.important, context.set.important);
- fl_print_format("%c %[%s%] Turn on the firewall.", output.stream, f_string_eol_s[0], context.set.standout, firewall_command_start, context.set.standout);
- fl_print_format("%c %[%s%] Turn off the firewall.", output.stream, f_string_eol_s[0], context.set.standout, firewall_command_stop, context.set.standout);
- fl_print_format("%c %[%s%] Turn off and then turn on the firewall.", output.stream, f_string_eol_s[0], context.set.standout, firewall_command_restart, context.set.standout);
- fl_print_format("%c %[%s%] Prevent all communication.", output.stream, f_string_eol_s[0], context.set.standout, firewall_command_lock, context.set.standout);
- fl_print_format("%c %[%s%] Show active firewall settings.", output.stream, f_string_eol_s[0], context.set.standout, firewall_command_show, context.set.standout);
+ fl_print_format("%c%c %[Available Commands:%] ", file.stream, f_string_eol_s[0], f_string_eol_s[0], context.set.important, context.set.important);
+ fl_print_format("%c %[%s%] Turn on the firewall.", file.stream, f_string_eol_s[0], context.set.standout, firewall_command_start, context.set.standout);
+ fl_print_format("%c %[%s%] Turn off the firewall.", file.stream, f_string_eol_s[0], context.set.standout, firewall_command_stop, context.set.standout);
+ fl_print_format("%c %[%s%] Turn off and then turn on the firewall.", file.stream, f_string_eol_s[0], context.set.standout, firewall_command_restart, context.set.standout);
+ fl_print_format("%c %[%s%] Prevent all communication.", file.stream, f_string_eol_s[0], context.set.standout, firewall_command_lock, context.set.standout);
+ fl_print_format("%c %[%s%] Show active firewall settings.", file.stream, f_string_eol_s[0], context.set.standout, firewall_command_show, context.set.standout);
- fll_program_print_help_usage(output, context, firewall_name, "command");
+ fll_program_print_help_usage(file, context, firewall_name, "command");
- funlockfile(output.stream);
+ funlockfile(file.stream);
return F_none;
}
}
if (choice == firewall_parameter_verbosity_quiet) {
+ main->output.verbosity = f_console_verbosity_quiet;
main->error.verbosity = f_console_verbosity_quiet;
main->warning.verbosity = f_console_verbosity_quiet;
}
else if (choice == firewall_parameter_verbosity_normal) {
+ main->output.verbosity = f_console_verbosity_normal;
main->error.verbosity = f_console_verbosity_normal;
main->warning.verbosity = f_console_verbosity_normal;
}
else if (choice == firewall_parameter_verbosity_verbose) {
+ main->output.verbosity = f_console_verbosity_verbose;
main->error.verbosity = f_console_verbosity_verbose;
main->warning.verbosity = f_console_verbosity_verbose;
}
else if (choice == firewall_parameter_verbosity_debug) {
+ main->output.verbosity = f_console_verbosity_debug;
main->error.verbosity = f_console_verbosity_debug;
main->warning.verbosity = f_console_verbosity_debug;
}
}
if (main->parameters[firewall_parameter_help].result == f_console_result_found) {
- firewall_print_help(main->output, main->context);
+ firewall_print_help(main->output.to, main->context);
firewall_main_delete(main);
return F_none;
}
if (main->parameters[firewall_parameter_version].result == f_console_result_found) {
- fll_program_print_version(main->output, firewall_version);
+ fll_program_print_version(main->output.to, firewall_version);
firewall_main_delete(main);
return F_none;
}
if (show_nat) {
- fll_print_format("%[===========================%] %[NAT%] %[============================%]%c", main->output.stream, main->context.set.standout, main->context.set.standout, main->context.set.title, main->context.set.title, main->context.set.standout, main->context.set.standout, f_string_eol_s[0]);
- fflush(main->output.stream);
+ fll_print_format("%[===========================%] %[NAT%] %[============================%]%c", main->output.to.stream, main->context.set.standout, main->context.set.standout, main->context.set.title, main->context.set.title, main->context.set.standout, main->context.set.standout, f_string_eol_s[0]);
+ fflush(main->output.to.stream);
parameters.used = 6;
exit(return_code);
}
- fll_print_character(f_string_eol_s[0], main->output.stream);
- fflush(main->output.stream);
+ fll_print_character(f_string_eol_s[0], main->output.to.stream);
+ fflush(main->output.to.stream);
}
if (F_status_is_error_not(status) && show_mangle) {
- fll_print_format("%[==========================%] %[MANGLE%] %[==========================%]%c", main->output.stream, main->context.set.standout, main->context.set.standout, main->context.set.title, main->context.set.title, main->context.set.standout, main->context.set.standout, f_string_eol_s[0]);
- fflush(main->output.stream);
+ fll_print_format("%[==========================%] %[MANGLE%] %[==========================%]%c", main->output.to.stream, main->context.set.standout, main->context.set.standout, main->context.set.title, main->context.set.title, main->context.set.standout, main->context.set.standout, f_string_eol_s[0]);
+ fflush(main->output.to.stream);
parameters.used = 6;
exit(return_code);
}
- fll_print_character(f_string_eol_s[0], main->output.stream);
- fflush(main->output.stream);
+ fll_print_character(f_string_eol_s[0], main->output.to.stream);
+ fflush(main->output.to.stream);
}
if (F_status_is_error_not(status) && show_ports) {
- fll_print_format("%[==========================%] %[FILTER%] %[==========================%]%c", main->output.stream, main->context.set.standout, main->context.set.standout, main->context.set.title, main->context.set.title, main->context.set.standout, main->context.set.standout, f_string_eol_s[0]);
- fflush(main->output.stream);
+ fll_print_format("%[==========================%] %[FILTER%] %[==========================%]%c", main->output.to.stream, main->context.set.standout, main->context.set.standout, main->context.set.title, main->context.set.title, main->context.set.standout, main->context.set.standout, f_string_eol_s[0]);
+ fflush(main->output.to.stream);
parameters.used = 4;
exit(return_code);
}
- fll_print_character(f_string_eol_s[0], main->output.stream);
- fflush(main->output.stream);
+ fll_print_character(f_string_eol_s[0], main->output.to.stream);
+ fflush(main->output.to.stream);
}
if (F_status_is_error(status)) {
return status;
}
else {
-
if (main->error.verbosity != f_console_verbosity_quiet) {
fll_print_format("%c%[%sFailed to perform lock request because the lock instructions are missing from: %s.%]%c", main->error.to.stream, f_string_eol_s[0], main->error.context, main->error.prefix, network_path firewall_file_other, main->error.context, f_string_eol_s[0]);
}
f_array_lengths_t remaining;
bool process_pipe;
- f_file_t output;
+ fl_print_t output;
fl_print_t error;
fl_print_t warning;
firewall_console_parameter_t_initialize, \
f_array_lengths_t_initialize, \
F_false, \
- macro_f_file_t_initialize2(f_type_output, f_type_descriptor_output, f_file_flag_write_only), \
fl_print_t_initialize, \
+ macro_fl_print_t_initialize_error(), \
macro_fl_print_t_initialize_warning(), \
f_string_dynamics_t_initialize, \
f_string_dynamics_t_initialize, \
/**
* Print help.
*
- * @param output
+ * @param file
* The file to print to.
* @param context
* The color context settings.
* F_none on success.
*/
#ifndef _di_firewall_print_help_
- extern f_status_t firewall_print_help(const f_file_t output, const f_color_context_t context);
+ extern f_status_t firewall_print_help(const f_file_t file, const f_color_context_t context);
#endif // _di_firewall_print_help_
/**
#endif
#ifndef _di_fss_basic_list_read_print_help_
- f_status_t fss_basic_list_read_print_help(const f_file_t output, const f_color_context_t context) {
+ f_status_t fss_basic_list_read_print_help(const f_file_t file, const f_color_context_t context) {
- flockfile(output.stream);
+ flockfile(file.stream);
- fll_program_print_help_header(output, context, fss_basic_list_read_name_long, fss_basic_list_read_version);
+ fll_program_print_help_header(file, context, fss_basic_list_read_name_long, fss_basic_list_read_version);
- fll_program_print_help_option(output, context, f_console_standard_short_help_s, f_console_standard_long_help_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print this help message.");
- fll_program_print_help_option(output, context, f_console_standard_short_dark_s, f_console_standard_long_dark_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on dark backgrounds.");
- fll_program_print_help_option(output, context, f_console_standard_short_light_s, f_console_standard_long_light_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on light backgrounds.");
- fll_program_print_help_option(output, context, f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, "Do not output in color.");
- fll_program_print_help_option(output, context, f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Decrease verbosity beyond normal output.");
- fll_program_print_help_option(output, context, f_console_standard_short_normal_s, f_console_standard_long_normal_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Set verbosity to normal output.");
- fll_program_print_help_option(output, context, f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Increase verbosity beyond normal output.");
- fll_program_print_help_option(output, context, f_console_standard_short_debug_s, f_console_standard_long_debug_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Enable debugging, inceasing verbosity beyond normal output.");
- fll_program_print_help_option(output, context, f_console_standard_short_version_s, f_console_standard_long_version_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Print only the version number.");
+ fll_program_print_help_option(file, context, f_console_standard_short_help_s, f_console_standard_long_help_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print this help message.");
+ fll_program_print_help_option(file, context, f_console_standard_short_dark_s, f_console_standard_long_dark_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on dark backgrounds.");
+ fll_program_print_help_option(file, context, f_console_standard_short_light_s, f_console_standard_long_light_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on light backgrounds.");
+ fll_program_print_help_option(file, context, f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, "Do not file in color.");
+ fll_program_print_help_option(file, context, f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Decrease verbosity beyond normal file.");
+ fll_program_print_help_option(file, context, f_console_standard_short_normal_s, f_console_standard_long_normal_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Set verbosity to normal file.");
+ fll_program_print_help_option(file, context, f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Increase verbosity beyond normal file.");
+ fll_program_print_help_option(file, context, f_console_standard_short_debug_s, f_console_standard_long_debug_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Enable debugging, inceasing verbosity beyond normal file.");
+ fll_program_print_help_option(file, context, f_console_standard_short_version_s, f_console_standard_long_version_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Print only the version number.");
- f_print_character(f_string_eol_s[0], output.stream);
+ f_print_character(f_string_eol_s[0], file.stream);
- fll_program_print_help_option(output, context, fss_basic_list_read_short_at, fss_basic_list_read_long_at, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " 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_s, f_console_symbol_long_enable_s, " Print the Content (default).");
- fll_program_print_help_option(output, context, fss_basic_list_read_short_columns, fss_basic_list_read_long_columns, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the total number of columns.");
- fll_program_print_help_option(output, context, fss_basic_list_read_short_delimit, fss_basic_list_read_long_delimit, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Designate how to handle applying delimits.");
- fll_program_print_help_option(output, context, fss_basic_list_read_short_depth, fss_basic_list_read_long_depth, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select Object at this numeric depth.");
- fll_program_print_help_option(output, context, fss_basic_list_read_short_empty, fss_basic_list_read_long_empty, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Include empty Content when processing.");
- fll_program_print_help_option(output, context, fss_basic_list_read_short_line, fss_basic_list_read_long_line, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print only the Content at the given line.");
- fll_program_print_help_option(output, context, fss_basic_list_read_short_name, fss_basic_list_read_long_name, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select Object with this name.");
- fll_program_print_help_option(output, context, fss_basic_list_read_short_object, fss_basic_list_read_long_object, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the Object.");
- fll_program_print_help_option(output, context, fss_basic_list_read_short_pipe, fss_basic_list_read_long_pipe, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print using the special pipe format.");
- fll_program_print_help_option(output, context, fss_basic_list_read_short_raw, fss_basic_list_read_long_raw, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print with the original quotes and escapes.");
- fll_program_print_help_option(output, context, fss_basic_list_read_short_select, fss_basic_list_read_long_select, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select sub-Content at this index.");
- fll_program_print_help_option(output, context, fss_basic_list_read_short_total, fss_basic_list_read_long_total, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the total number of lines.");
- fll_program_print_help_option(output, context, fss_basic_list_read_short_trim, fss_basic_list_read_long_trim, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Trim Object names on select or print.");
+ fll_program_print_help_option(file, context, fss_basic_list_read_short_at, fss_basic_list_read_long_at, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select Object at this numeric index.");
+ fll_program_print_help_option(file, context, fss_basic_list_read_short_content, fss_basic_list_read_long_content, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the Content (default).");
+ fll_program_print_help_option(file, context, fss_basic_list_read_short_columns, fss_basic_list_read_long_columns, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the total number of columns.");
+ fll_program_print_help_option(file, context, fss_basic_list_read_short_delimit, fss_basic_list_read_long_delimit, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Designate how to handle applying delimits.");
+ fll_program_print_help_option(file, context, fss_basic_list_read_short_depth, fss_basic_list_read_long_depth, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select Object at this numeric depth.");
+ fll_program_print_help_option(file, context, fss_basic_list_read_short_empty, fss_basic_list_read_long_empty, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Include empty Content when processing.");
+ fll_program_print_help_option(file, context, fss_basic_list_read_short_line, fss_basic_list_read_long_line, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print only the Content at the given line.");
+ fll_program_print_help_option(file, context, fss_basic_list_read_short_name, fss_basic_list_read_long_name, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select Object with this name.");
+ fll_program_print_help_option(file, context, fss_basic_list_read_short_object, fss_basic_list_read_long_object, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the Object.");
+ fll_program_print_help_option(file, context, fss_basic_list_read_short_pipe, fss_basic_list_read_long_pipe, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print using the special pipe format.");
+ fll_program_print_help_option(file, context, fss_basic_list_read_short_raw, fss_basic_list_read_long_raw, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print with the original quotes and escapes.");
+ fll_program_print_help_option(file, context, fss_basic_list_read_short_select, fss_basic_list_read_long_select, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select sub-Content at this index.");
+ fll_program_print_help_option(file, context, fss_basic_list_read_short_total, fss_basic_list_read_long_total, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the total number of lines.");
+ fll_program_print_help_option(file, context, fss_basic_list_read_short_trim, fss_basic_list_read_long_trim, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Trim Object names on select or print.");
- fll_program_print_help_usage(output, context, fss_basic_list_read_name, "filename(s)");
+ fll_program_print_help_usage(file, context, fss_basic_list_read_name, "filename(s)");
- fl_print_format(" %[Notes:%]%c", output.stream, context.set.important, context.set.important, f_string_eol_s[0]);
+ fl_print_format(" %[Notes:%]%c", file.stream, context.set.important, context.set.important, f_string_eol_s[0]);
- fl_print_format(" This program will print the Content associated with the given Object and Content main based on the FSS-0002 Basic List standard.%c%c", output.stream, f_string_eol_s[0], f_string_eol_s[0]);
+ fl_print_format(" This program will print the Content associated with the given Object and Content main based on the FSS-0002 Basic List standard.%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]);
- fl_print_format(" All numeric positions (indexes) start at 0 instead of 1.%c", output.stream, f_string_eol_s[0]);
- fl_print_format(" For example, a file of 17 lines would range from 0 to 16.%c%c", output.stream, f_string_eol_s[0], f_string_eol_s[0]);
+ fl_print_format(" All numeric positions (indexes) start at 0 instead of 1.%c", file.stream, f_string_eol_s[0]);
+ fl_print_format(" For example, a file of 17 lines would range from 0 to 16.%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]);
- fl_print_format(" When using the %[%s%s%] option, an order of operations is enforced on the parameters.%c", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_list_read_long_depth, context.set.notable, f_string_eol_s[0]);
+ fl_print_format(" When using the %[%s%s%] option, an order of operations is enforced on the parameters.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_list_read_long_depth, context.set.notable, f_string_eol_s[0]);
- fl_print_format(" When this order of operations is in effect, parameters to the right of a depth parameter are influenced by that depth parameter:%c", output.stream, f_string_eol_s[0]);
+ fl_print_format(" When this order of operations is in effect, parameters to the right of a depth parameter are influenced by that depth parameter:%c", file.stream, f_string_eol_s[0]);
- fl_print_format(" %[%s%s%]: An Object index at the specified depth.%c", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_list_read_long_at, context.set.notable, f_string_eol_s[0]);
- fl_print_format(" %[%s%s%]: A new depth within the specified depth, indexed from the root.%c", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_list_read_long_depth, context.set.notable, f_string_eol_s[0]);
- fl_print_format(" %[%s%s%]: An Object name at the specified depth.%c%c", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_list_read_long_name, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]);
+ fl_print_format(" %[%s%s%]: An Object index at the specified depth.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_list_read_long_at, context.set.notable, f_string_eol_s[0]);
+ fl_print_format(" %[%s%s%]: A new depth within the specified depth, indexed from the root.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_list_read_long_depth, context.set.notable, f_string_eol_s[0]);
+ fl_print_format(" %[%s%s%]: An Object name at the specified depth.%c%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_list_read_long_name, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]);
- fl_print_format(" The parameter %[%s%s%] must be in numeric order, but values in between may be skipped.%c", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_list_read_long_depth, context.set.notable, f_string_eol_s[0]);
- fl_print_format(" ('-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", output.stream, f_string_eol_s[0]);
- fl_print_format(" ('-d 2 -a 1 -d 0 -a 2' would be invalid because depth 2 is before depth 1.)%c%c", output.stream, f_string_eol_s[0], f_string_eol_s[0]);
+ fl_print_format(" The parameter %[%s%s%] must be in numeric order, but values in between may be skipped.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_list_read_long_depth, context.set.notable, f_string_eol_s[0]);
+ fl_print_format(" ('-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", file.stream, f_string_eol_s[0]);
+ fl_print_format(" ('-d 2 -a 1 -d 0 -a 2' would be invalid because depth 2 is before depth 1.)%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]);
- fl_print_format(" The parameter %[%s%s%] selects a Content column.%c%c", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_list_read_long_select, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]);
+ fl_print_format(" The parameter %[%s%s%] selects a Content column.%c%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_list_read_long_select, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]);
- fl_print_format(" Specify both %[%s%s%]", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_list_read_long_object, context.set.notable);
- fl_print_format(" and the %[%s%s%] parameters to get the total objects.%c%c", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_list_read_long_total, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]);
+ fl_print_format(" Specify both %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_list_read_long_object, context.set.notable);
+ fl_print_format(" and the %[%s%s%] parameters to get the total objects.%c%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_list_read_long_total, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]);
- fl_print_format(" When both %[%s%s%]", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_list_read_long_at, context.set.notable);
- fl_print_format(" and %[%s%s%] parameters are specified (at the same depth),", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_list_read_long_name, context.set.notable);
- fl_print_format(" the %[%s%s%] parameter value will be treated as a position relative to the specified", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_list_read_long_at, context.set.notable);
- fl_print_format(" %[%s%s%] parameter value.%c%c", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_list_read_long_name, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]);
+ fl_print_format(" When both %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_list_read_long_at, context.set.notable);
+ fl_print_format(" and %[%s%s%] parameters are specified (at the same depth),", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_list_read_long_name, context.set.notable);
+ fl_print_format(" the %[%s%s%] parameter value will be treated as a position relative to the specified", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_list_read_long_at, context.set.notable);
+ fl_print_format(" %[%s%s%] parameter value.%c%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_list_read_long_name, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]);
- fl_print_format(" This program may support parameters, such as %[%s%s%]", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_list_read_long_depth, context.set.notable);
- fl_print_format(" or %[%s%s%], even if not supported by the standard.%c", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_list_read_long_select, context.set.notable, f_string_eol_s[0]);
- fl_print_format(" This is done to help ensure consistency for scripting.%c%c", output.stream, f_string_eol_s[0], f_string_eol_s[0]);
+ fl_print_format(" This program may support parameters, such as %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_list_read_long_depth, context.set.notable);
+ fl_print_format(" or %[%s%s%], even if not supported by the standard.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_list_read_long_select, context.set.notable, f_string_eol_s[0]);
+ fl_print_format(" This is done to help ensure consistency for scripting.%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]);
- fl_print_format(" For parameters like %[%s%s%],", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_list_read_long_depth, context.set.notable);
- fl_print_format(" if the standard doesn't support nested Content, then only a depth of 0 would be valid.%c", output.stream, f_string_eol_s[0]);
+ fl_print_format(" For parameters like %[%s%s%],", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_list_read_long_depth, context.set.notable);
+ fl_print_format(" if the standard doesn't support nested Content, then only a depth of 0 would be valid.%c", file.stream, f_string_eol_s[0]);
- fl_print_format(" For parameters like %[%s%s%],", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_list_read_long_select, context.set.notable);
- fl_print_format(" if the standard doesn't support multiple Content groups, then only a select of 0 would be valid.%c%c", output.stream, f_string_eol_s[0], f_string_eol_s[0]);
+ fl_print_format(" For parameters like %[%s%s%],", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_list_read_long_select, context.set.notable);
+ fl_print_format(" if the standard doesn't support multiple Content groups, then only a select of 0 would be valid.%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]);
- fl_print_format(" The parameter %[%s%s%]", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_list_read_long_trim, context.set.notable);
- fl_print_format(" will remove leading and trailing whitespaces when selecting objects or when printing objects.%c%c", output.stream, f_string_eol_s[0], f_string_eol_s[0]);
+ fl_print_format(" The parameter %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_list_read_long_trim, context.set.notable);
+ fl_print_format(" will remove leading and trailing whitespaces when selecting objects or when printing objects.%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]);
- fl_print_format(" When specifying both the %[%s%s%]", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_list_read_long_object, context.set.notable);
- fl_print_format(" parameter and the %[%s%s%] parameter, the entire Object and Content are printed, including the formatting.%c", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_list_read_long_content, context.set.notable, f_string_eol_s[0]);
- fl_print_format(" Both the Object and Content printed are already escaped.%c", output.stream, f_string_eol_s[0]);
- fl_print_format(" Both the Object and Content are separated by an EOL.%c%c", output.stream, f_string_eol_s[0], f_string_eol_s[0]);
+ fl_print_format(" When specifying both the %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_list_read_long_object, context.set.notable);
+ fl_print_format(" parameter and the %[%s%s%] parameter, the entire Object and Content are printed, including the formatting.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_list_read_long_content, context.set.notable, f_string_eol_s[0]);
+ fl_print_format(" Both the Object and Content printed are already escaped.%c", file.stream, f_string_eol_s[0]);
+ fl_print_format(" Both the Object and Content are separated by an EOL.%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]);
- fl_print_format(" The parameter %[%s%s%] accepts the following:%c", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_list_read_long_delimit, context.set.notable, f_string_eol_s[0]);
- fl_print_format(" - %[%s%]: Do not apply delimits.%c", output.stream, context.set.notable, fss_basic_list_read_delimit_mode_name_none, context.set.notable, f_string_eol_s[0]);
- fl_print_format(" - %[%s%]: (default) Apply all delimits.%c", output.stream, context.set.notable, fss_basic_list_read_delimit_mode_name_all, context.set.notable, f_string_eol_s[0]);
- fl_print_format(" - %[%s%]: Apply delimits for Objects.%c", output.stream, context.set.notable, fss_basic_list_read_delimit_mode_name_object, context.set.notable, f_string_eol_s[0]);
- fl_print_format(" - A number, 0 or greater: apply delimits for Content at the specified depth.%c", output.stream, f_string_eol_s[0]);
- fl_print_format(" - A number, 0 or greater, followed by a %[%s%]: (such as '1+') apply delimits for Content at the specified depth and any greater depth (numerically).%c", output.stream, context.set.notable, fss_basic_list_read_delimit_mode_name_greater, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]);
- fl_print_format(" - A number, 0 or lesser, followed by a %[%s%]: (such as '1-') apply delimits for Content at the specified depth and any lesser depth (numerically).%c%c", output.stream, context.set.notable, fss_basic_list_read_delimit_mode_name_lesser, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]);
+ fl_print_format(" The parameter %[%s%s%] accepts the following:%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_list_read_long_delimit, context.set.notable, f_string_eol_s[0]);
+ fl_print_format(" - %[%s%]: Do not apply delimits.%c", file.stream, context.set.notable, fss_basic_list_read_delimit_mode_name_none, context.set.notable, f_string_eol_s[0]);
+ fl_print_format(" - %[%s%]: (default) Apply all delimits.%c", file.stream, context.set.notable, fss_basic_list_read_delimit_mode_name_all, context.set.notable, f_string_eol_s[0]);
+ fl_print_format(" - %[%s%]: Apply delimits for Objects.%c", file.stream, context.set.notable, fss_basic_list_read_delimit_mode_name_object, context.set.notable, f_string_eol_s[0]);
+ fl_print_format(" - A number, 0 or greater: apply delimits for Content at the specified depth.%c", file.stream, f_string_eol_s[0]);
+ fl_print_format(" - A number, 0 or greater, followed by a %[%s%]: (such as '1+') apply delimits for Content at the specified depth and any greater depth (numerically).%c", file.stream, context.set.notable, fss_basic_list_read_delimit_mode_name_greater, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]);
+ fl_print_format(" - A number, 0 or lesser, followed by a %[%s%]: (such as '1-') apply delimits for Content at the specified depth and any lesser depth (numerically).%c%c", file.stream, context.set.notable, fss_basic_list_read_delimit_mode_name_lesser, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]);
- fl_print_format(" The %[%s%s%] parameter may be specified multiple times to customize the delimit behavior.%c", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_list_read_long_delimit, context.set.notable, f_string_eol_s[0]);
+ fl_print_format(" The %[%s%s%] parameter may be specified multiple times to customize the delimit behavior.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_list_read_long_delimit, context.set.notable, f_string_eol_s[0]);
- fl_print_format(" The %[%s%s%]", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_list_read_long_delimit, context.set.notable);
- fl_print_format(" values %[%s%]", output.stream, context.set.notable, fss_basic_list_read_delimit_mode_name_none, context.set.notable);
- fl_print_format(" and %[%s%],", output.stream, context.set.notable, fss_basic_list_read_delimit_mode_name_all, context.set.notable);
- fl_print_format(" overrule all other delimit values.%c%c", output.stream, f_string_eol_s[0], f_string_eol_s[0]);
+ fl_print_format(" The %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_list_read_long_delimit, context.set.notable);
+ fl_print_format(" values %[%s%]", file.stream, context.set.notable, fss_basic_list_read_delimit_mode_name_none, context.set.notable);
+ fl_print_format(" and %[%s%],", file.stream, context.set.notable, fss_basic_list_read_delimit_mode_name_all, context.set.notable);
+ fl_print_format(" overrule all other delimit values.%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]);
- fl_print_format(" The parameters %[%s%s%]", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_list_read_long_columns, context.set.notable);
- fl_print_format(" and %[%s%s%]", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_list_read_long_select, context.set.notable);
- fl_print_format(" refer to a Content column.%c", output.stream, f_string_eol_s[0]);
- fl_print_format(" The word \"column\" is being loosely defined to refer to a specific Content.%c", output.stream, f_string_eol_s[0]);
- fl_print_format(" This is not to be confused with a depth.%c%c", output.stream, f_string_eol_s[0], f_string_eol_s[0]);
+ fl_print_format(" The parameters %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_list_read_long_columns, context.set.notable);
+ fl_print_format(" and %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_list_read_long_select, context.set.notable);
+ fl_print_format(" refer to a Content column.%c", file.stream, f_string_eol_s[0]);
+ fl_print_format(" The word \"column\" is being loosely defined to refer to a specific Content.%c", file.stream, f_string_eol_s[0]);
+ fl_print_format(" This is not to be confused with a depth.%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]);
- funlockfile(output.stream);
+ funlockfile(file.stream);
return F_none;
}
}
if (choice == fss_basic_list_read_parameter_verbosity_quiet) {
+ main->output.verbosity = f_console_verbosity_quiet;
main->error.verbosity = f_console_verbosity_quiet;
main->warning.verbosity = f_console_verbosity_quiet;
}
else if (choice == fss_basic_list_read_parameter_verbosity_normal) {
+ main->output.verbosity = f_console_verbosity_normal;
main->error.verbosity = f_console_verbosity_normal;
main->warning.verbosity = f_console_verbosity_normal;
}
else if (choice == fss_basic_list_read_parameter_verbosity_verbose) {
+ main->output.verbosity = f_console_verbosity_verbose;
main->error.verbosity = f_console_verbosity_verbose;
main->warning.verbosity = f_console_verbosity_verbose;
}
else if (choice == fss_basic_list_read_parameter_verbosity_debug) {
+ main->output.verbosity = f_console_verbosity_debug;
main->error.verbosity = f_console_verbosity_debug;
main->warning.verbosity = f_console_verbosity_debug;
}
}
if (main->parameters[fss_basic_list_read_parameter_help].result == f_console_result_found) {
- fss_basic_list_read_print_help(main->output, main->context);
+ fss_basic_list_read_print_help(main->output.to, main->context);
fss_basic_list_read_main_delete(main);
return status;
}
if (main->parameters[fss_basic_list_read_parameter_version].result == f_console_result_found) {
- fll_program_print_version(main->output, fss_basic_list_read_version);
+ fll_program_print_version(main->output.to, fss_basic_list_read_version);
fss_basic_list_read_main_delete(main);
return status;
f_array_lengths_t remaining;
bool process_pipe;
- f_file_t output;
+ fl_print_t output;
fl_print_t error;
fl_print_t warning;
fss_basic_list_read_console_parameter_t_initialize, \
f_array_lengths_t_initialize, \
F_false, \
- macro_f_file_t_initialize2(f_type_output, f_type_descriptor_output, f_file_flag_write_only), \
fl_print_t_initialize, \
+ macro_fl_print_t_initialize_error(), \
macro_fl_print_t_initialize_warning(), \
f_color_context_t_initialize, \
}
/**
* Print help.
*
- * @param output
+ * @param file
* The file to print to.
* @param context
* The color context settings.
* F_none on success.
*/
#ifndef _di_fss_basic_list_read_print_help_
- extern f_status_t fss_basic_list_read_print_help(const f_file_t output, const f_color_context_t context);
+ extern f_status_t fss_basic_list_read_print_help(const f_file_t file, const f_color_context_t context);
#endif // _di_fss_basic_list_read_print_help_
/**
}
else if (status == F_data_not_stop || status == F_data_not_eos) {
if (data->option & fss_basic_list_read_data_option_total) {
- flockfile(main->output.stream);
+ flockfile(main->output.to.stream);
fss_basic_list_read_print_zero(main);
- funlockfile(main->output.stream);
+ funlockfile(main->output.to.stream);
return F_none;
}
}
if ((data->option & fss_basic_list_read_data_option_object) || (data->option & fss_basic_list_read_data_option_content) && (data->contents.array[at].used || (data->option & fss_basic_list_read_data_option_empty))) {
- flockfile(main->output.stream);
+ flockfile(main->output.to.stream);
if (data->option & fss_basic_list_read_data_option_object) {
if (data->option & fss_basic_list_read_data_option_trim) {
- fl_print_trim_except_in_dynamic_partial(data->buffer, data->objects.array[at], delimits_object, data->comments, main->output.stream);
+ fl_print_trim_except_in_dynamic_partial(data->buffer, data->objects.array[at], delimits_object, data->comments, main->output.to.stream);
}
else {
- f_print_except_in_dynamic_partial(data->buffer, data->objects.array[at], delimits_object, data->comments, main->output.stream);
+ f_print_except_in_dynamic_partial(data->buffer, data->objects.array[at], delimits_object, data->comments, main->output.to.stream);
}
fss_basic_list_read_print_object_end(main);
if (data->contents.array[at].used) {
fss_basic_list_read_print_content_ignore(main);
- f_print_except_in_dynamic_partial(data->buffer, data->contents.array[at].array[0], delimits_content, data->comments, main->output.stream);
+ f_print_except_in_dynamic_partial(data->buffer, data->contents.array[at].array[0], delimits_content, data->comments, main->output.to.stream);
fss_basic_list_read_print_content_ignore(main);
}
fss_basic_list_read_print_set_end(main);
- funlockfile(main->output.stream);
+ funlockfile(main->output.to.stream);
}
}
#endif // _di_fss_basic_list_read_print_at_
}
if (data->option & fss_basic_list_read_data_option_trim) {
- fl_print_trim_except_dynamic_partial(data->buffer, data->objects.array[at], delimits_object, main->output.stream);
+ fl_print_trim_except_dynamic_partial(data->buffer, data->objects.array[at], delimits_object, main->output.to.stream);
}
else {
- f_print_except_dynamic_partial(data->buffer, data->objects.array[at], delimits_object, main->output.stream);
+ f_print_except_dynamic_partial(data->buffer, data->objects.array[at], delimits_object, main->output.to.stream);
}
fss_basic_list_read_print_object_end(main);
void fss_basic_list_read_print_content_ignore(fss_basic_list_read_main_t * const main) {
if (main->parameters[fss_basic_list_read_parameter_pipe].result == f_console_result_found) {
- f_print_character(fss_basic_list_read_pipe_content_ignore, main->output.stream);
+ f_print_character(fss_basic_list_read_pipe_content_ignore, main->output.to.stream);
}
}
#endif // _di_fss_basic_list_read_print_content_ignore_
void fss_basic_list_read_print_object_end(fss_basic_list_read_main_t * const main) {
if (main->parameters[fss_basic_list_read_parameter_pipe].result == f_console_result_found) {
- f_print_character(fss_basic_list_read_pipe_content_start, main->output.stream);
+ f_print_character(fss_basic_list_read_pipe_content_start, main->output.to.stream);
}
else {
if (main->parameters[fss_basic_list_read_parameter_content].result == f_console_result_found) {
- f_print_character(f_fss_basic_list_open, main->output.stream);
- f_print_character(f_fss_basic_list_open_end, main->output.stream);
+ f_print_character(f_fss_basic_list_open, main->output.to.stream);
+ f_print_character(f_fss_basic_list_open_end, main->output.to.stream);
}
else {
- f_print_character(f_fss_eol, main->output.stream);
+ f_print_character(f_fss_eol, main->output.to.stream);
}
}
}
void fss_basic_list_read_print_set_end(fss_basic_list_read_main_t * const main) {
if (main->parameters[fss_basic_list_read_parameter_pipe].result == f_console_result_found) {
- f_print_character(fss_basic_list_read_pipe_content_end, main->output.stream);
+ f_print_character(fss_basic_list_read_pipe_content_end, main->output.to.stream);
}
}
#endif // _di_fss_basic_list_read_print_set_end_
#ifndef _di_fss_basic_list_read_print_one_
void fss_basic_list_read_print_one(fss_basic_list_read_main_t * const main) {
- f_print_character(f_string_ascii_1_s[0], main->output.stream);
- f_print_character(f_string_eol_s[0], main->output.stream);
+ f_print_character(f_string_ascii_1_s[0], main->output.to.stream);
+ f_print_character(f_string_eol_s[0], main->output.to.stream);
}
#endif // _di_fss_basic_list_read_print_one_
#ifndef _di_fss_basic_list_read_print_zero_
void fss_basic_list_read_print_zero(fss_basic_list_read_main_t * const main) {
- f_print_character(f_string_ascii_0_s[0], main->output.stream);
- f_print_character(f_string_eol_s[0], main->output.stream);
+ f_print_character(f_string_ascii_0_s[0], main->output.to.stream);
+ f_print_character(f_string_eol_s[0], main->output.to.stream);
}
#endif // _di_fss_basic_list_read_print_zero_
// This standard does not support multiple content groups.
if ((data->option & fss_basic_list_read_data_option_select) && data->select) {
if (main->parameters[fss_basic_list_read_parameter_total].result == f_console_result_found) {
- flockfile(main->output.stream);
+ flockfile(main->output.to.stream);
fss_basic_list_read_print_zero(main);
- funlockfile(main->output.stream);
+ funlockfile(main->output.to.stream);
}
return F_none;
if (data->depths.array[0].value_at >= data->objects.used) {
if (data->option & (fss_basic_list_read_data_option_columns | fss_basic_list_read_data_option_total)) {
- flockfile(main->output.stream);
+ flockfile(main->output.to.stream);
fss_basic_list_read_print_zero(main);
- funlockfile(main->output.stream);
+ funlockfile(main->output.to.stream);
}
return F_none;
if (status == F_success) return F_none;
}
else if (data->option & fss_basic_list_read_data_option_columns) {
- fll_print_format("%ul%c", main->output.stream, data->contents.array[i].used, f_string_eol_s[0]);
+ fll_print_format("%ul%c", main->output.to.stream, data->contents.array[i].used, f_string_eol_s[0]);
}
else if (data->option & fss_basic_list_read_data_option_total) {
- flockfile(main->output.stream);
+ flockfile(main->output.to.stream);
if (data->contents.array[i].used) {
fss_basic_list_read_print_one(main);
fss_basic_list_read_print_zero(main);
}
- funlockfile(main->output.stream);
+ funlockfile(main->output.to.stream);
}
else {
fss_basic_list_read_print_at(i, *delimits_object, *delimits_content, main, data);
} // for
if (data->option & fss_basic_list_read_data_option_total) {
- flockfile(main->output.stream);
+ flockfile(main->output.to.stream);
fss_basic_list_read_print_zero(main);
- funlockfile(main->output.stream);
+ funlockfile(main->output.to.stream);
}
return F_none;
f_status_t fss_basic_list_read_process_columns(fss_basic_list_read_main_t * const main, fss_basic_list_read_data_t *data, bool names[]) {
if (!(data->option & fss_basic_list_read_data_option_content)) {
- flockfile(main->output.stream);
+ flockfile(main->output.to.stream);
fss_basic_list_read_print_zero(main);
- funlockfile(main->output.stream);
+ funlockfile(main->output.to.stream);
return F_none;
}
}
} // for
- fll_print_format("%ul%c", main->output.stream, max, f_string_eol_s[0]);
+ fll_print_format("%ul%c", main->output.to.stream, max, f_string_eol_s[0]);
return F_none;
}
if (data->option & fss_basic_list_read_data_option_object) {
if (*line == data->line) {
- flockfile(main->output.stream);
+ flockfile(main->output.to.stream);
if (data->option & fss_basic_list_read_data_option_total) {
fss_basic_list_read_print_one(main);
fss_basic_list_read_print_at_object(main, data, at, delimits_object);
}
- funlockfile(main->output.stream);
+ funlockfile(main->output.to.stream);
return F_success;
}
if (*line == data->line) {
range.stop = i;
- flockfile(main->output.stream);
+ flockfile(main->output.to.stream);
if (data->option & fss_basic_list_read_data_option_total) {
fss_basic_list_read_print_one(main);
}
else {
- f_print_except_in_dynamic_partial(data->buffer, range, delimits_content, data->comments, main->output.stream);
+ f_print_except_in_dynamic_partial(data->buffer, range, delimits_content, data->comments, main->output.to.stream);
}
- funlockfile(main->output.stream);
+ funlockfile(main->output.to.stream);
return F_success;
}
++(*line);
if (*line == data->line) {
- flockfile(main->output.stream);
+ flockfile(main->output.to.stream);
if (data->option & fss_basic_list_read_data_option_total) {
fss_basic_list_read_print_one(main);
else {
range.stop = data->contents.array[at].array[0].stop;
- f_print_except_in_dynamic_partial(data->buffer, range, delimits_content, data->comments, main->output.stream);
- f_print_character(f_string_eol_s[0], main->output.stream);
+ f_print_except_in_dynamic_partial(data->buffer, range, delimits_content, data->comments, main->output.to.stream);
+ f_print_character(f_string_eol_s[0], main->output.to.stream);
}
- funlockfile(main->output.stream);
+ funlockfile(main->output.to.stream);
return F_success;
}
}
} // for
- flockfile(main->output.stream);
+ flockfile(main->output.to.stream);
if (data->option & fss_basic_list_read_data_option_line) {
if (data->line < total) {
}
}
else {
- fl_print_format("%ul%c", main->output.stream, total, f_string_eol_s[0]);
+ fl_print_format("%ul%c", main->output.to.stream, total, f_string_eol_s[0]);
}
- funlockfile(main->output.stream);
+ funlockfile(main->output.to.stream);
return F_none;
}
#endif
#ifndef _di_fss_basic_list_write_print_help_
- f_status_t fss_basic_list_write_print_help(const f_file_t output, const f_color_context_t context) {
+ f_status_t fss_basic_list_write_print_help(const f_file_t file, const f_color_context_t context) {
- flockfile(output.stream);
+ flockfile(file.stream);
- fll_program_print_help_header(output, context, fss_basic_list_write_name_long, fss_basic_list_write_version);
+ fll_program_print_help_header(file, context, fss_basic_list_write_name_long, fss_basic_list_write_version);
- fll_program_print_help_option(output, context, f_console_standard_short_help_s, f_console_standard_long_help_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print this help message.");
- fll_program_print_help_option(output, context, f_console_standard_short_dark_s, f_console_standard_long_dark_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on dark backgrounds.");
- fll_program_print_help_option(output, context, f_console_standard_short_light_s, f_console_standard_long_light_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on light backgrounds.");
- fll_program_print_help_option(output, context, f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, "Do not output in color.");
- fll_program_print_help_option(output, context, f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Decrease verbosity beyond normal output.");
- fll_program_print_help_option(output, context, f_console_standard_short_normal_s, f_console_standard_long_normal_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Set verbosity to normal output.");
- fll_program_print_help_option(output, context, f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Increase verbosity beyond normal output.");
- fll_program_print_help_option(output, context, f_console_standard_short_debug_s, f_console_standard_long_debug_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Enable debugging, inceasing verbosity beyond normal output.");
- fll_program_print_help_option(output, context, f_console_standard_short_version_s, f_console_standard_long_version_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Print only the version number.");
+ fll_program_print_help_option(file, context, f_console_standard_short_help_s, f_console_standard_long_help_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print this help message.");
+ fll_program_print_help_option(file, context, f_console_standard_short_dark_s, f_console_standard_long_dark_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on dark backgrounds.");
+ fll_program_print_help_option(file, context, f_console_standard_short_light_s, f_console_standard_long_light_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on light backgrounds.");
+ fll_program_print_help_option(file, context, f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, "Do not file in color.");
+ fll_program_print_help_option(file, context, f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Decrease verbosity beyond normal file.");
+ fll_program_print_help_option(file, context, f_console_standard_short_normal_s, f_console_standard_long_normal_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Set verbosity to normal file.");
+ fll_program_print_help_option(file, context, f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Increase verbosity beyond normal file.");
+ fll_program_print_help_option(file, context, f_console_standard_short_debug_s, f_console_standard_long_debug_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Enable debugging, inceasing verbosity beyond normal file.");
+ fll_program_print_help_option(file, context, f_console_standard_short_version_s, f_console_standard_long_version_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Print only the version number.");
- f_print_character(f_string_eol_s[0], output.stream);
+ f_print_character(f_string_eol_s[0], file.stream);
- fll_program_print_help_option(output, context, fss_basic_list_write_short_file, fss_basic_list_write_long_file, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " 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_s, f_console_symbol_long_enable_s, "The Content to output.");
- fll_program_print_help_option(output, context, fss_basic_list_write_short_double, fss_basic_list_write_long_double, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Use double quotes (default).");
- fll_program_print_help_option(output, context, fss_basic_list_write_short_ignore, fss_basic_list_write_long_ignore, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Ignore a given range within a Content.");
- fll_program_print_help_option(output, context, fss_basic_list_write_short_object, fss_basic_list_write_long_object, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " The Object to output.");
- fll_program_print_help_option(output, context, fss_basic_list_write_short_partial, fss_basic_list_write_long_partial, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Do not output end of Object/Content character.");
- fll_program_print_help_option(output, context, fss_basic_list_write_short_prepend, fss_basic_list_write_long_prepend, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Prepend the given whitespace characters to the start of each multi-line Content.");
- fll_program_print_help_option(output, context, fss_basic_list_write_short_single, fss_basic_list_write_long_single, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Use single quotes.");
- fll_program_print_help_option(output, context, fss_basic_list_write_short_trim, fss_basic_list_write_long_trim, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Trim Object names.");
+ fll_program_print_help_option(file, context, fss_basic_list_write_short_file, fss_basic_list_write_long_file, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Specify a file to send file to.");
+ fll_program_print_help_option(file, context, fss_basic_list_write_short_content, fss_basic_list_write_long_content, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "The Content to file.");
+ fll_program_print_help_option(file, context, fss_basic_list_write_short_double, fss_basic_list_write_long_double, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Use double quotes (default).");
+ fll_program_print_help_option(file, context, fss_basic_list_write_short_ignore, fss_basic_list_write_long_ignore, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Ignore a given range within a Content.");
+ fll_program_print_help_option(file, context, fss_basic_list_write_short_object, fss_basic_list_write_long_object, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " The Object to file.");
+ fll_program_print_help_option(file, context, fss_basic_list_write_short_partial, fss_basic_list_write_long_partial, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Do not file end of Object/Content character.");
+ fll_program_print_help_option(file, context, fss_basic_list_write_short_prepend, fss_basic_list_write_long_prepend, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Prepend the given whitespace characters to the start of each multi-line Content.");
+ fll_program_print_help_option(file, context, fss_basic_list_write_short_single, fss_basic_list_write_long_single, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Use single quotes.");
+ fll_program_print_help_option(file, context, fss_basic_list_write_short_trim, fss_basic_list_write_long_trim, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Trim Object names.");
- fll_program_print_help_usage(output, context, fss_basic_list_write_name, f_string_empty_s);
+ fll_program_print_help_usage(file, context, fss_basic_list_write_name, f_string_empty_s);
- fl_print_format(" The pipe uses the Backspace character '%[\\b%]' (%[U+0008%]) to designate the start of a Content.%c", output.stream, context.set.notable, context.set.notable, context.set.notable, context.set.notable, f_string_eol_s[0]);
- fl_print_format(" The pipe uses the Form Feed character '%[\\f%]' (%[U+000C%]) to designate the end of the last Content.%c", output.stream, context.set.notable, context.set.notable, context.set.notable, context.set.notable, f_string_eol_s[0]);
- fl_print_format(" The pipe uses the Vertical Line character '%[\\v%]' (%[U+000B%]) is used to ignore a Content range, which does nothing in this program.%c", output.stream, context.set.notable, context.set.notable, context.set.notable, context.set.notable, f_string_eol_s[0]);
- fl_print_format(" For the pipe, an Object is terminated by either a Backspace character '%[\\b%]' (%[U+0008%])", output.stream, context.set.notable, context.set.notable, context.set.notable, context.set.notable);
- fl_print_format(" or a Form Feed character '%[\\f%]' (%[U+000C%]).%c", output.stream, context.set.notable, context.set.notable, context.set.notable, context.set.notable, f_string_eol_s[0]);
- fl_print_format(" The end of the pipe represents the end of any Object or Content.%c%c", output.stream, f_string_eol_s[0], f_string_eol_s[0]);
+ fl_print_format(" The pipe uses the Backspace character '%[\\b%]' (%[U+0008%]) to designate the start of a Content.%c", file.stream, context.set.notable, context.set.notable, context.set.notable, context.set.notable, f_string_eol_s[0]);
+ fl_print_format(" The pipe uses the Form Feed character '%[\\f%]' (%[U+000C%]) to designate the end of the last Content.%c", file.stream, context.set.notable, context.set.notable, context.set.notable, context.set.notable, f_string_eol_s[0]);
+ fl_print_format(" The pipe uses the Vertical Line character '%[\\v%]' (%[U+000B%]) is used to ignore a Content range, which does nothing in this program.%c", file.stream, context.set.notable, context.set.notable, context.set.notable, context.set.notable, f_string_eol_s[0]);
+ fl_print_format(" For the pipe, an Object is terminated by either a Backspace character '%[\\b%]' (%[U+0008%])", file.stream, context.set.notable, context.set.notable, context.set.notable, context.set.notable);
+ fl_print_format(" or a Form Feed character '%[\\f%]' (%[U+000C%]).%c", file.stream, context.set.notable, context.set.notable, context.set.notable, context.set.notable, f_string_eol_s[0]);
+ fl_print_format(" The end of the pipe represents the end of any Object or Content.%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]);
- fl_print_format(" The FSS-0002 (Basic List) specification does not support quoted names, therefore the parameters '%[%s%s%]'", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_list_write_long_single, context.set.notable);
- fl_print_format(" and '%[%s%s%]' do nothing.%c%c", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_list_write_long_double, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]);
+ fl_print_format(" The FSS-0002 (Basic List) specification does not support quoted names, therefore the parameters '%[%s%s%]'", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_list_write_long_single, context.set.notable);
+ fl_print_format(" and '%[%s%s%]' do nothing.%c%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_list_write_long_double, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]);
- fl_print_format(" This program does not use the parameter '%[%s%s%]', which therefore does nothing.%c", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_list_write_long_ignore, context.set.notable, f_string_eol_s[0]);
- fl_print_format(" This parameter requires two values.%c%c", output.stream, f_string_eol_s[0], f_string_eol_s[0]);
+ fl_print_format(" This program does not use the parameter '%[%s%s%]', which therefore does nothing.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_list_write_long_ignore, context.set.notable, f_string_eol_s[0]);
+ fl_print_format(" This parameter requires two values.%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]);
- funlockfile(output.stream);
+ funlockfile(file.stream);
return F_none;
}
}
if (choice == fss_basic_list_write_parameter_verbosity_quiet) {
+ main->output.verbosity = f_console_verbosity_quiet;
main->error.verbosity = f_console_verbosity_quiet;
main->warning.verbosity = f_console_verbosity_quiet;
}
else if (choice == fss_basic_list_write_parameter_verbosity_normal) {
+ main->output.verbosity = f_console_verbosity_normal;
main->error.verbosity = f_console_verbosity_normal;
main->warning.verbosity = f_console_verbosity_normal;
}
else if (choice == fss_basic_list_write_parameter_verbosity_verbose) {
+ main->output.verbosity = f_console_verbosity_verbose;
main->error.verbosity = f_console_verbosity_verbose;
main->warning.verbosity = f_console_verbosity_verbose;
}
else if (choice == fss_basic_list_write_parameter_verbosity_debug) {
+ main->output.verbosity = f_console_verbosity_debug;
main->error.verbosity = f_console_verbosity_debug;
main->warning.verbosity = f_console_verbosity_debug;
}
}
if (main->parameters[fss_basic_list_write_parameter_help].result == f_console_result_found) {
- fss_basic_list_write_print_help(main->output, main->context);
+ fss_basic_list_write_print_help(main->output.to, main->context);
fss_basic_list_write_main_delete(main);
return status;
}
if (main->parameters[fss_basic_list_write_parameter_version].result == f_console_result_found) {
- fll_program_print_version(main->output, fss_basic_list_write_version);
+ fll_program_print_version(main->output.to, fss_basic_list_write_version);
fss_basic_list_write_main_delete(main);
return status;
f_file_t output = f_file_t_initialize;
output.id = f_type_descriptor_output;
- output.stream = main->output.stream;
+ output.stream = main->output.to.stream;
output.flag = f_file_flag_create | f_file_flag_write_only | f_file_flag_append;
+ output.size_read = main->output.to.size_read;
+ output.size_write = main->output.to.size_write;
if (F_status_is_error_not(status)) {
if (main->parameters[fss_basic_list_write_parameter_file].result == f_console_result_additional) {
f_array_lengths_t remaining;
bool process_pipe;
- f_file_t output;
+ fl_print_t output;
fl_print_t error;
fl_print_t warning;
f_string_static_t prepend;
fss_basic_list_write_console_parameter_t_initialize, \
f_array_lengths_t_initialize, \
F_false, \
- macro_f_file_t_initialize2(f_type_output, f_type_descriptor_output, f_file_flag_write_only), \
fl_print_t_initialize, \
+ macro_fl_print_t_initialize_error(), \
macro_fl_print_t_initialize_warning(), \
f_string_static_t_initialize, \
f_color_context_t_initialize, \
/**
* Print help.
*
- * @param output
+ * @param file
* The file to print to.
* @param context
* The color context settings.
* F_none on success.
*/
#ifndef _di_fss_basic_list_write_print_help_
- extern f_status_t fss_basic_list_write_print_help(const f_file_t output, const f_color_context_t context);
+ extern f_status_t fss_basic_list_write_print_help(const f_file_t file, const f_color_context_t context);
#endif // _di_fss_basic_list_write_print_help_
/**
#endif
#ifndef _di_fss_basic_read_print_help_
- f_status_t fss_basic_read_print_help(const f_file_t output, const f_color_context_t context) {
+ f_status_t fss_basic_read_print_help(const f_file_t file, const f_color_context_t context) {
- flockfile(output.stream);
+ flockfile(file.stream);
- fll_program_print_help_header(output, context, fss_basic_read_name_long, fss_basic_read_version);
+ fll_program_print_help_header(file, context, fss_basic_read_name_long, fss_basic_read_version);
- fll_program_print_help_option(output, context, f_console_standard_short_help_s, f_console_standard_long_help_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print this help message.");
- fll_program_print_help_option(output, context, f_console_standard_short_dark_s, f_console_standard_long_dark_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on dark backgrounds.");
- fll_program_print_help_option(output, context, f_console_standard_short_light_s, f_console_standard_long_light_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on light backgrounds.");
- fll_program_print_help_option(output, context, f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, "Do not output in color.");
- fll_program_print_help_option(output, context, f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Decrease verbosity beyond normal output.");
- fll_program_print_help_option(output, context, f_console_standard_short_normal_s, f_console_standard_long_normal_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Set verbosity to normal output.");
- fll_program_print_help_option(output, context, f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Increase verbosity beyond normal output.");
- fll_program_print_help_option(output, context, f_console_standard_short_debug_s, f_console_standard_long_debug_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Enable debugging, inceasing verbosity beyond normal output.");
- fll_program_print_help_option(output, context, f_console_standard_short_version_s, f_console_standard_long_version_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Print only the version number.");
+ fll_program_print_help_option(file, context, f_console_standard_short_help_s, f_console_standard_long_help_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print this help message.");
+ fll_program_print_help_option(file, context, f_console_standard_short_dark_s, f_console_standard_long_dark_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on dark backgrounds.");
+ fll_program_print_help_option(file, context, f_console_standard_short_light_s, f_console_standard_long_light_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on light backgrounds.");
+ fll_program_print_help_option(file, context, f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, "Do not file in color.");
+ fll_program_print_help_option(file, context, f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Decrease verbosity beyond normal file.");
+ fll_program_print_help_option(file, context, f_console_standard_short_normal_s, f_console_standard_long_normal_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Set verbosity to normal file.");
+ fll_program_print_help_option(file, context, f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Increase verbosity beyond normal file.");
+ fll_program_print_help_option(file, context, f_console_standard_short_debug_s, f_console_standard_long_debug_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Enable debugging, inceasing verbosity beyond normal file.");
+ fll_program_print_help_option(file, context, f_console_standard_short_version_s, f_console_standard_long_version_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Print only the version number.");
- f_print_character(f_string_eol_s[0], output.stream);
+ f_print_character(f_string_eol_s[0], file.stream);
- fll_program_print_help_option(output, context, fss_basic_read_short_at, fss_basic_read_long_at, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " 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_s, f_console_symbol_long_enable_s, " Print the Content (default).");
- fll_program_print_help_option(output, context, fss_basic_read_short_columns, fss_basic_read_long_columns, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the total number of columns.");
- fll_program_print_help_option(output, context, fss_basic_read_short_delimit, fss_basic_read_long_delimit, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Designate how to handle applying delimits.");
- fll_program_print_help_option(output, context, fss_basic_read_short_depth, fss_basic_read_long_depth, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select Object at this numeric depth.");
- fll_program_print_help_option(output, context, fss_basic_read_short_empty, fss_basic_read_long_empty, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Include empty Content when processing.");
- fll_program_print_help_option(output, context, fss_basic_read_short_line, fss_basic_read_long_line, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print only the Content at the given line.");
- fll_program_print_help_option(output, context, fss_basic_read_short_name, fss_basic_read_long_name, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select Object with this name.");
- fll_program_print_help_option(output, context, fss_basic_read_short_object, fss_basic_read_long_object, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the Object.");
- fll_program_print_help_option(output, context, fss_basic_read_short_pipe, fss_basic_read_long_pipe, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print using the special pipe format.");
- fll_program_print_help_option(output, context, fss_basic_read_short_raw, fss_basic_read_long_raw, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print with the original quotes and escapes.");
- fll_program_print_help_option(output, context, fss_basic_read_short_select, fss_basic_read_long_select, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select sub-Content at this index.");
- fll_program_print_help_option(output, context, fss_basic_read_short_total, fss_basic_read_long_total, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the total number of lines.");
- fll_program_print_help_option(output, context, fss_basic_read_short_trim, fss_basic_read_long_trim, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Trim Object names on select or print.");
+ fll_program_print_help_option(file, context, fss_basic_read_short_at, fss_basic_read_long_at, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select Object at this numeric index.");
+ fll_program_print_help_option(file, context, fss_basic_read_short_content, fss_basic_read_long_content, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the Content (default).");
+ fll_program_print_help_option(file, context, fss_basic_read_short_columns, fss_basic_read_long_columns, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the total number of columns.");
+ fll_program_print_help_option(file, context, fss_basic_read_short_delimit, fss_basic_read_long_delimit, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Designate how to handle applying delimits.");
+ fll_program_print_help_option(file, context, fss_basic_read_short_depth, fss_basic_read_long_depth, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select Object at this numeric depth.");
+ fll_program_print_help_option(file, context, fss_basic_read_short_empty, fss_basic_read_long_empty, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Include empty Content when processing.");
+ fll_program_print_help_option(file, context, fss_basic_read_short_line, fss_basic_read_long_line, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print only the Content at the given line.");
+ fll_program_print_help_option(file, context, fss_basic_read_short_name, fss_basic_read_long_name, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select Object with this name.");
+ fll_program_print_help_option(file, context, fss_basic_read_short_object, fss_basic_read_long_object, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the Object.");
+ fll_program_print_help_option(file, context, fss_basic_read_short_pipe, fss_basic_read_long_pipe, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print using the special pipe format.");
+ fll_program_print_help_option(file, context, fss_basic_read_short_raw, fss_basic_read_long_raw, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print with the original quotes and escapes.");
+ fll_program_print_help_option(file, context, fss_basic_read_short_select, fss_basic_read_long_select, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select sub-Content at this index.");
+ fll_program_print_help_option(file, context, fss_basic_read_short_total, fss_basic_read_long_total, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the total number of lines.");
+ fll_program_print_help_option(file, context, fss_basic_read_short_trim, fss_basic_read_long_trim, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Trim Object names on select or print.");
- fll_program_print_help_usage(output, context, fss_basic_read_name, "filename(s)");
+ fll_program_print_help_usage(file, context, fss_basic_read_name, "filename(s)");
- fl_print_format(" %[Notes:%]%c", output.stream, context.set.important, context.set.important, f_string_eol_s[0]);
+ fl_print_format(" %[Notes:%]%c", file.stream, context.set.important, context.set.important, f_string_eol_s[0]);
- fl_print_format(" This program will print the Content associated with the given Object and Content main based on the FSS-0000 Basic standard.%c%c", output.stream, f_string_eol_s[0], f_string_eol_s[0]);
+ fl_print_format(" This program will print the Content associated with the given Object and Content main based on the FSS-0000 Basic standard.%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]);
- fl_print_format(" All numeric positions (indexes) start at 0 instead of 1.%c", output.stream, f_string_eol_s[0]);
- fl_print_format(" For example, a file of 17 lines would range from 0 to 16.%c%c", output.stream, f_string_eol_s[0], f_string_eol_s[0]);
+ fl_print_format(" All numeric positions (indexes) start at 0 instead of 1.%c", file.stream, f_string_eol_s[0]);
+ fl_print_format(" For example, a file of 17 lines would range from 0 to 16.%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]);
- fl_print_format(" When using the %[%s%s%] option, an order of operations is enforced on the parameters.%c", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_read_long_depth, context.set.notable, f_string_eol_s[0]);
+ fl_print_format(" When using the %[%s%s%] option, an order of operations is enforced on the parameters.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_read_long_depth, context.set.notable, f_string_eol_s[0]);
- fl_print_format(" When this order of operations is in effect, parameters to the right of a depth parameter are influenced by that depth parameter:%c", output.stream, f_string_eol_s[0]);
+ fl_print_format(" When this order of operations is in effect, parameters to the right of a depth parameter are influenced by that depth parameter:%c", file.stream, f_string_eol_s[0]);
- fl_print_format(" %[%s%s%]: An Object index at the specified depth.%c", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_read_long_at, context.set.notable, f_string_eol_s[0]);
- fl_print_format(" %[%s%s%]: A new depth within the specified depth, indexed from the root.%c", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_read_long_depth, context.set.notable, f_string_eol_s[0]);
- fl_print_format(" %[%s%s%]: An Object name at the specified depth.%c%c", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_read_long_name, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]);
+ fl_print_format(" %[%s%s%]: An Object index at the specified depth.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_read_long_at, context.set.notable, f_string_eol_s[0]);
+ fl_print_format(" %[%s%s%]: A new depth within the specified depth, indexed from the root.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_read_long_depth, context.set.notable, f_string_eol_s[0]);
+ fl_print_format(" %[%s%s%]: An Object name at the specified depth.%c%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_read_long_name, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]);
- fl_print_format(" The parameter %[%s%s%] must be in numeric order, but values in between may be skipped.%c", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_read_long_depth, context.set.notable, f_string_eol_s[0]);
- fl_print_format(" ('-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", output.stream, f_string_eol_s[0]);
- fl_print_format(" ('-d 2 -a 1 -d 0 -a 2' would be invalid because depth 2 is before depth 1.)%c%c", output.stream, f_string_eol_s[0], f_string_eol_s[0]);
+ fl_print_format(" The parameter %[%s%s%] must be in numeric order, but values in between may be skipped.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_read_long_depth, context.set.notable, f_string_eol_s[0]);
+ fl_print_format(" ('-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", file.stream, f_string_eol_s[0]);
+ fl_print_format(" ('-d 2 -a 1 -d 0 -a 2' would be invalid because depth 2 is before depth 1.)%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]);
- fl_print_format(" The parameter %[%s%s%] selects a Content column.%c%c", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_read_long_select, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]);
+ fl_print_format(" The parameter %[%s%s%] selects a Content column.%c%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_read_long_select, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]);
- fl_print_format(" Specify both %[%s%s%]", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_read_long_object, context.set.notable);
- fl_print_format(" and the %[%s%s%] parameters to get the total objects.%c%c", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_read_long_total, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]);
+ fl_print_format(" Specify both %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_read_long_object, context.set.notable);
+ fl_print_format(" and the %[%s%s%] parameters to get the total objects.%c%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_read_long_total, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]);
- fl_print_format(" When both %[%s%s%]", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_read_long_at, context.set.notable);
- fl_print_format(" and %[%s%s%] parameters are specified (at the same depth),", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_read_long_name, context.set.notable);
- fl_print_format(" the %[%s%s%] parameter value will be treated as a position relative to the specified", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_read_long_at, context.set.notable);
- fl_print_format(" %[%s%s%] parameter value.%c%c", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_read_long_name, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]);
+ fl_print_format(" When both %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_read_long_at, context.set.notable);
+ fl_print_format(" and %[%s%s%] parameters are specified (at the same depth),", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_read_long_name, context.set.notable);
+ fl_print_format(" the %[%s%s%] parameter value will be treated as a position relative to the specified", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_read_long_at, context.set.notable);
+ fl_print_format(" %[%s%s%] parameter value.%c%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_read_long_name, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]);
- fl_print_format(" This program may support parameters, such as %[%s%s%]", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_read_long_depth, context.set.notable);
- fl_print_format(" or %[%s%s%], even if not supported by the standard.%c", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_read_long_select, context.set.notable, f_string_eol_s[0]);
- fl_print_format(" This is done to help ensure consistency for scripting.%c%c", output.stream, f_string_eol_s[0], f_string_eol_s[0]);
+ fl_print_format(" This program may support parameters, such as %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_read_long_depth, context.set.notable);
+ fl_print_format(" or %[%s%s%], even if not supported by the standard.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_read_long_select, context.set.notable, f_string_eol_s[0]);
+ fl_print_format(" This is done to help ensure consistency for scripting.%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]);
- fl_print_format(" For parameters like %[%s%s%],", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_read_long_depth, context.set.notable);
- fl_print_format(" if the standard doesn't support nested Content, then only a depth of 0 would be valid.%c", output.stream, f_string_eol_s[0]);
+ fl_print_format(" For parameters like %[%s%s%],", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_read_long_depth, context.set.notable);
+ fl_print_format(" if the standard doesn't support nested Content, then only a depth of 0 would be valid.%c", file.stream, f_string_eol_s[0]);
- fl_print_format(" For parameters like %[%s%s%],", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_read_long_select, context.set.notable);
- fl_print_format(" if the standard doesn't support multiple Content groups, then only a select of 0 would be valid.%c%c", output.stream, f_string_eol_s[0], f_string_eol_s[0]);
+ fl_print_format(" For parameters like %[%s%s%],", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_read_long_select, context.set.notable);
+ fl_print_format(" if the standard doesn't support multiple Content groups, then only a select of 0 would be valid.%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]);
- fl_print_format(" The parameter %[%s%s%]", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_read_long_trim, context.set.notable);
- fl_print_format(" will remove leading and trailing whitespaces when selecting objects or when printing objects.%c%c", output.stream, f_string_eol_s[0], f_string_eol_s[0]);
+ fl_print_format(" The parameter %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_read_long_trim, context.set.notable);
+ fl_print_format(" will remove leading and trailing whitespaces when selecting objects or when printing objects.%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]);
- fl_print_format(" When specifying both the %[%s%s%]", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_read_long_object, context.set.notable);
- fl_print_format(" parameter and the %[%s%s%] parameter, the entire Object and Content are printed, including the formatting.%c", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_read_long_content, context.set.notable, f_string_eol_s[0]);
- fl_print_format(" Both the Object and Content printed are already escaped.%c", output.stream, f_string_eol_s[0]);
- fl_print_format(" Both the Object and Content are separated by a space.%c%c", output.stream, f_string_eol_s[0], f_string_eol_s[0]);
+ fl_print_format(" When specifying both the %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_read_long_object, context.set.notable);
+ fl_print_format(" parameter and the %[%s%s%] parameter, the entire Object and Content are printed, including the formatting.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_read_long_content, context.set.notable, f_string_eol_s[0]);
+ fl_print_format(" Both the Object and Content printed are already escaped.%c", file.stream, f_string_eol_s[0]);
+ fl_print_format(" Both the Object and Content are separated by a space.%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]);
- fl_print_format(" The parameter %[%s%s%] accepts the following:%c", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_read_long_delimit, context.set.notable, f_string_eol_s[0]);
- fl_print_format(" - %[%s%]: Do not apply delimits.%c", output.stream, context.set.notable, fss_basic_read_delimit_mode_name_none, context.set.notable, f_string_eol_s[0]);
- fl_print_format(" - %[%s%]: (default) Apply all delimits.%c", output.stream, context.set.notable, fss_basic_read_delimit_mode_name_all, context.set.notable, f_string_eol_s[0]);
- fl_print_format(" - %[%s%]: Apply delimits for Objects.%c", output.stream, context.set.notable, fss_basic_read_delimit_mode_name_object, context.set.notable, f_string_eol_s[0]);
- fl_print_format(" - A number, 0 or greater: apply delimits for Content at the specified depth.%c", output.stream, f_string_eol_s[0]);
- fl_print_format(" - A number, 0 or greater, followed by a %[%s%]: (such as '1+') apply delimits for Content at the specified depth and any greater depth (numerically).%c", output.stream, context.set.notable, fss_basic_read_delimit_mode_name_greater, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]);
- fl_print_format(" - A number, 0 or lesser, followed by a %[%s%]: (such as '1-') apply delimits for Content at the specified depth and any lesser depth (numerically).%c%c", output.stream, context.set.notable, fss_basic_read_delimit_mode_name_lesser, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]);
+ fl_print_format(" The parameter %[%s%s%] accepts the following:%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_read_long_delimit, context.set.notable, f_string_eol_s[0]);
+ fl_print_format(" - %[%s%]: Do not apply delimits.%c", file.stream, context.set.notable, fss_basic_read_delimit_mode_name_none, context.set.notable, f_string_eol_s[0]);
+ fl_print_format(" - %[%s%]: (default) Apply all delimits.%c", file.stream, context.set.notable, fss_basic_read_delimit_mode_name_all, context.set.notable, f_string_eol_s[0]);
+ fl_print_format(" - %[%s%]: Apply delimits for Objects.%c", file.stream, context.set.notable, fss_basic_read_delimit_mode_name_object, context.set.notable, f_string_eol_s[0]);
+ fl_print_format(" - A number, 0 or greater: apply delimits for Content at the specified depth.%c", file.stream, f_string_eol_s[0]);
+ fl_print_format(" - A number, 0 or greater, followed by a %[%s%]: (such as '1+') apply delimits for Content at the specified depth and any greater depth (numerically).%c", file.stream, context.set.notable, fss_basic_read_delimit_mode_name_greater, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]);
+ fl_print_format(" - A number, 0 or lesser, followed by a %[%s%]: (such as '1-') apply delimits for Content at the specified depth and any lesser depth (numerically).%c%c", file.stream, context.set.notable, fss_basic_read_delimit_mode_name_lesser, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]);
- fl_print_format(" The %[%s%s%] parameter may be specified multiple times to customize the delimit behavior.%c", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_read_long_delimit, context.set.notable, f_string_eol_s[0]);
+ fl_print_format(" The %[%s%s%] parameter may be specified multiple times to customize the delimit behavior.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_read_long_delimit, context.set.notable, f_string_eol_s[0]);
- fl_print_format(" The %[%s%s%]", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_read_long_delimit, context.set.notable);
- fl_print_format(" values %[%s%]", output.stream, context.set.notable, fss_basic_read_delimit_mode_name_none, context.set.notable);
- fl_print_format(" and %[%s%],", output.stream, context.set.notable, fss_basic_read_delimit_mode_name_all, context.set.notable);
- fl_print_format(" overrule all other delimit values.%c%c", output.stream, f_string_eol_s[0], f_string_eol_s[0]);
+ fl_print_format(" The %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_read_long_delimit, context.set.notable);
+ fl_print_format(" values %[%s%]", file.stream, context.set.notable, fss_basic_read_delimit_mode_name_none, context.set.notable);
+ fl_print_format(" and %[%s%],", file.stream, context.set.notable, fss_basic_read_delimit_mode_name_all, context.set.notable);
+ fl_print_format(" overrule all other delimit values.%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]);
- fl_print_format(" The parameters %[%s%s%]", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_read_long_columns, context.set.notable);
- fl_print_format(" and %[%s%s%]", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_read_long_select, context.set.notable);
- fl_print_format(" refer to a Content column.%c", output.stream, f_string_eol_s[0]);
- fl_print_format(" The word \"column\" is being loosely defined to refer to a specific Content.%c", output.stream, f_string_eol_s[0]);
- fl_print_format(" This is not to be confused with a depth.%c%c", output.stream, f_string_eol_s[0], f_string_eol_s[0]);
+ fl_print_format(" The parameters %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_read_long_columns, context.set.notable);
+ fl_print_format(" and %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_read_long_select, context.set.notable);
+ fl_print_format(" refer to a Content column.%c", file.stream, f_string_eol_s[0]);
+ fl_print_format(" The word \"column\" is being loosely defined to refer to a specific Content.%c", file.stream, f_string_eol_s[0]);
+ fl_print_format(" This is not to be confused with a depth.%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]);
- funlockfile(output.stream);
+ funlockfile(file.stream);
return F_none;
}
}
if (choice == fss_basic_read_parameter_verbosity_quiet) {
+ main->output.verbosity = f_console_verbosity_quiet;
main->error.verbosity = f_console_verbosity_quiet;
main->warning.verbosity = f_console_verbosity_quiet;
}
else if (choice == fss_basic_read_parameter_verbosity_normal) {
+ main->output.verbosity = f_console_verbosity_normal;
main->error.verbosity = f_console_verbosity_normal;
main->warning.verbosity = f_console_verbosity_normal;
}
else if (choice == fss_basic_read_parameter_verbosity_verbose) {
+ main->output.verbosity = f_console_verbosity_verbose;
main->error.verbosity = f_console_verbosity_verbose;
main->warning.verbosity = f_console_verbosity_verbose;
}
else if (choice == fss_basic_read_parameter_verbosity_debug) {
+ main->output.verbosity = f_console_verbosity_debug;
main->error.verbosity = f_console_verbosity_debug;
main->warning.verbosity = f_console_verbosity_debug;
}
}
if (main->parameters[fss_basic_read_parameter_help].result == f_console_result_found) {
- fss_basic_read_print_help(main->output, main->context);
+ fss_basic_read_print_help(main->output.to, main->context);
fss_basic_read_main_delete(main);
return status;
}
if (main->parameters[fss_basic_read_parameter_version].result == f_console_result_found) {
- fll_program_print_version(main->output, fss_basic_read_version);
+ fll_program_print_version(main->output.to, fss_basic_read_version);
fss_basic_read_main_delete(main);
return status;
f_array_lengths_t remaining;
bool process_pipe;
- f_file_t output;
+ fl_print_t output;
fl_print_t error;
fl_print_t warning;
fss_basic_read_console_parameter_t_initialize, \
f_array_lengths_t_initialize, \
F_false, \
- macro_f_file_t_initialize2(f_type_output, f_type_descriptor_output, f_file_flag_write_only), \
fl_print_t_initialize, \
+ macro_fl_print_t_initialize_error(), \
macro_fl_print_t_initialize_warning(), \
f_color_context_t_initialize, \
}
/**
* Print help.
*
- * @param output
+ * @param file
* The file to print to.
* @param context
* The color context settings.
* F_none on success.
*/
#ifndef _di_fss_basic_read_print_help_
- extern f_status_t fss_basic_read_print_help(const f_file_t output, const f_color_context_t context);
+ extern f_status_t fss_basic_read_print_help(const f_file_t file, const f_color_context_t context);
#endif // _di_fss_basic_read_print_help_
/**
}
if ((data->option & fss_basic_read_data_option_object) || (data->option & fss_basic_read_data_option_content) && (data->contents.array[at].used || (data->option & fss_basic_read_data_option_empty))) {
- flockfile(main->output.stream);
+ flockfile(main->output.to.stream);
if (data->option & fss_basic_read_data_option_object) {
if (data->option & fss_basic_read_data_option_trim) {
if (data->option & fss_basic_read_data_option_raw) {
if (data->quotes.array[at]) {
- f_print_character_safely(data->quotes.array[at] == f_fss_quote_type_single ? f_fss_quote_single_s[0] : f_fss_quote_double_s[0], main->output.stream);
+ f_print_character_safely(data->quotes.array[at] == f_fss_quote_type_single ? f_fss_quote_single_s[0] : f_fss_quote_double_s[0], main->output.to.stream);
}
- fl_print_trim_dynamic_partial(data->buffer, data->objects.array[at], main->output.stream);
+ fl_print_trim_dynamic_partial(data->buffer, data->objects.array[at], main->output.to.stream);
if (data->quotes.array[at]) {
- f_print_character_safely(data->quotes.array[at] == f_fss_quote_type_single ? f_fss_quote_single_s[0] : f_fss_quote_double_s[0], main->output.stream);
+ f_print_character_safely(data->quotes.array[at] == f_fss_quote_type_single ? f_fss_quote_single_s[0] : f_fss_quote_double_s[0], main->output.to.stream);
}
}
else {
- fl_print_trim_except_dynamic_partial(data->buffer, data->objects.array[at], delimits_object, main->output.stream);
+ fl_print_trim_except_dynamic_partial(data->buffer, data->objects.array[at], delimits_object, main->output.to.stream);
}
}
else {
if (data->option & fss_basic_read_data_option_raw) {
if (data->quotes.array[at]) {
- f_print_character_safely(data->quotes.array[at] == f_fss_quote_type_single ? f_fss_quote_single_s[0] : f_fss_quote_double_s[0], main->output.stream);
+ f_print_character_safely(data->quotes.array[at] == f_fss_quote_type_single ? f_fss_quote_single_s[0] : f_fss_quote_double_s[0], main->output.to.stream);
}
- f_print_dynamic_partial(data->buffer, data->objects.array[at], main->output.stream);
+ f_print_dynamic_partial(data->buffer, data->objects.array[at], main->output.to.stream);
if (data->quotes.array[at]) {
- f_print_character_safely(data->quotes.array[at] == f_fss_quote_type_single ? f_fss_quote_single_s[0] : f_fss_quote_double_s[0], main->output.stream);
+ f_print_character_safely(data->quotes.array[at] == f_fss_quote_type_single ? f_fss_quote_single_s[0] : f_fss_quote_double_s[0], main->output.to.stream);
}
}
else {
- f_print_except_dynamic_partial(data->buffer, data->objects.array[at], delimits_object, main->output.stream);
+ f_print_except_dynamic_partial(data->buffer, data->objects.array[at], delimits_object, main->output.to.stream);
}
}
if ((data->option & fss_basic_read_data_option_content) && data->contents.array[at].used) {
if (data->option & fss_basic_read_data_option_raw) {
- f_print_dynamic_partial(data->buffer, data->contents.array[at].array[0], main->output.stream);
+ f_print_dynamic_partial(data->buffer, data->contents.array[at].array[0], main->output.to.stream);
}
else {
- f_print_except_dynamic_partial(data->buffer, data->contents.array[at].array[0], delimits_content, main->output.stream);
+ f_print_except_dynamic_partial(data->buffer, data->contents.array[at].array[0], delimits_content, main->output.to.stream);
}
}
fss_basic_read_print_set_end(main);
- funlockfile(main->output.stream);
+ funlockfile(main->output.to.stream);
}
}
#endif // _di_fss_basic_read_print_at_
void fss_basic_read_print_object_end(fss_basic_read_main_t * const main) {
if (main->parameters[fss_basic_read_parameter_pipe].result == f_console_result_found) {
- f_print_character(fss_basic_read_pipe_content_start, main->output.stream);
+ f_print_character(fss_basic_read_pipe_content_start, main->output.to.stream);
}
else {
- f_print_character(f_fss_space, main->output.stream);
+ f_print_character(f_fss_space, main->output.to.stream);
}
}
#endif // _di_fss_basic_read_print_object_end_
#ifndef _di_fss_basic_read_print_one_
void fss_basic_read_print_one(fss_basic_read_main_t * const main) {
- f_print_character(f_string_ascii_1_s[0], main->output.stream);
- f_print_character(f_string_eol_s[0], main->output.stream);
+ f_print_character(f_string_ascii_1_s[0], main->output.to.stream);
+ f_print_character(f_string_eol_s[0], main->output.to.stream);
}
#endif // _di_fss_basic_read_print_one_
void fss_basic_read_print_set_end(fss_basic_read_main_t * const main) {
if (main->parameters[fss_basic_read_parameter_pipe].result == f_console_result_found) {
- f_print_character(fss_basic_read_pipe_content_end, main->output.stream);
+ f_print_character(fss_basic_read_pipe_content_end, main->output.to.stream);
}
else {
- f_print_character(f_string_eol_s[0], main->output.stream);
+ f_print_character(f_string_eol_s[0], main->output.to.stream);
}
}
#endif // _di_fss_basic_read_print_set_end_
#ifndef _di_fss_basic_read_print_zero_
void fss_basic_read_print_zero(fss_basic_read_main_t * const main) {
- f_print_character(f_string_ascii_0_s[0], main->output.stream);
- f_print_character(f_string_eol_s[0], main->output.stream);
+ f_print_character(f_string_ascii_0_s[0], main->output.to.stream);
+ f_print_character(f_string_eol_s[0], main->output.to.stream);
}
#endif // _di_fss_basic_read_print_zero_
// This standard does not support multiple content groups.
if ((data->option & fss_basic_read_data_option_select) && data->select) {
if (main->parameters[fss_basic_read_parameter_total].result == f_console_result_found) {
- flockfile(main->output.stream);
+ flockfile(main->output.to.stream);
fss_basic_read_print_zero(main);
- funlockfile(main->output.stream);
+ funlockfile(main->output.to.stream);
}
return F_none;
if (data->depths.array[0].value_at >= data->objects.used) {
if (data->option & (fss_basic_read_data_option_columns | fss_basic_read_data_option_total)) {
- flockfile(main->output.stream);
+ flockfile(main->output.to.stream);
fss_basic_read_print_zero(main);
- funlockfile(main->output.stream);
+ funlockfile(main->output.to.stream);
}
return F_none;
if (data->option & fss_basic_read_data_option_line) {
if (data->line) {
if (data->option & fss_basic_read_data_option_total) {
- flockfile(main->output.stream);
+ flockfile(main->output.to.stream);
fss_basic_read_print_zero(main);
- funlockfile(main->output.stream);
+ funlockfile(main->output.to.stream);
}
return F_none;
if (data->line) break;
if (data->option & fss_basic_read_data_option_total) {
- flockfile(main->output.stream);
+ flockfile(main->output.to.stream);
fss_basic_read_print_one(main);
- funlockfile(main->output.stream);
+ funlockfile(main->output.to.stream);
}
else {
fss_basic_read_print_at(i, *delimits, except_none, main, data);
}
}
else if (data->option & fss_basic_read_data_option_columns) {
- fll_print_format("%ul%c", main->output.stream, data->contents.array[i].used, f_string_eol_s[0]);
+ fll_print_format("%ul%c", main->output.to.stream, data->contents.array[i].used, f_string_eol_s[0]);
}
else if (data->option & fss_basic_read_data_option_total) {
- flockfile(main->output.stream);
+ flockfile(main->output.to.stream);
if (data->contents.array[i].used) {
fss_basic_read_print_one(main);
fss_basic_read_print_zero(main);
}
- funlockfile(main->output.stream);
+ funlockfile(main->output.to.stream);
}
else {
fss_basic_read_print_at(i, *delimits, except_none, main, data);
} // for
if (data->option & fss_basic_read_data_option_total) {
- flockfile(main->output.stream);
+ flockfile(main->output.to.stream);
fss_basic_read_print_zero(main);
- funlockfile(main->output.stream);
+ funlockfile(main->output.to.stream);
}
return F_none;
f_status_t fss_basic_read_process_columns(fss_basic_read_main_t * const main, fss_basic_read_data_t *data, bool names[]) {
if (!(data->option & fss_basic_read_data_option_content)) {
- flockfile(main->output.stream);
+ flockfile(main->output.to.stream);
fss_basic_read_print_zero(main);
- funlockfile(main->output.stream);
+ funlockfile(main->output.to.stream);
return F_none;
}
}
} // for
- fll_print_format("%ul%c", main->output.stream, max, f_string_eol_s[0]);
+ fll_print_format("%ul%c", main->output.to.stream, max, f_string_eol_s[0]);
return F_none;
}
if (!data->contents.array[i].used) {
if (data->option & fss_basic_read_data_option_empty) {
if (line == data->line) {
- flockfile(main->output.stream);
+ flockfile(main->output.to.stream);
fss_basic_read_print_set_end(main);
- funlockfile(main->output.stream);
+ funlockfile(main->output.to.stream);
break;
}
++total;
} // for
- flockfile(main->output.stream);
+ flockfile(main->output.to.stream);
if (data->option & fss_basic_read_data_option_line) {
if (data->line < total) {
}
}
else {
- fl_print_format("%ul%c", main->output.stream, total, f_string_eol_s[0]);
+ fl_print_format("%ul%c", main->output.to.stream, total, f_string_eol_s[0]);
}
- funlockfile(main->output.stream);
+ funlockfile(main->output.to.stream);
return F_none;
}
#endif
#ifndef _di_fss_basic_write_print_help_
- f_status_t fss_basic_write_print_help(const f_file_t output, const f_color_context_t context) {
+ f_status_t fss_basic_write_print_help(const f_file_t file, const f_color_context_t context) {
- flockfile(output.stream);
+ flockfile(file.stream);
- fll_program_print_help_header(output, context, fss_basic_write_name_long, fss_basic_write_version);
+ fll_program_print_help_header(file, context, fss_basic_write_name_long, fss_basic_write_version);
- fll_program_print_help_option(output, context, f_console_standard_short_help_s, f_console_standard_long_help_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print this help message.");
- fll_program_print_help_option(output, context, f_console_standard_short_dark_s, f_console_standard_long_dark_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on dark backgrounds.");
- fll_program_print_help_option(output, context, f_console_standard_short_light_s, f_console_standard_long_light_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on light backgrounds.");
- fll_program_print_help_option(output, context, f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, "Do not output in color.");
- fll_program_print_help_option(output, context, f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Decrease verbosity beyond normal output.");
- fll_program_print_help_option(output, context, f_console_standard_short_normal_s, f_console_standard_long_normal_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Set verbosity to normal output.");
- fll_program_print_help_option(output, context, f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Increase verbosity beyond normal output.");
- fll_program_print_help_option(output, context, f_console_standard_short_debug_s, f_console_standard_long_debug_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Enable debugging, inceasing verbosity beyond normal output.");
- fll_program_print_help_option(output, context, f_console_standard_short_version_s, f_console_standard_long_version_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Print only the version number.");
+ fll_program_print_help_option(file, context, f_console_standard_short_help_s, f_console_standard_long_help_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print this help message.");
+ fll_program_print_help_option(file, context, f_console_standard_short_dark_s, f_console_standard_long_dark_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on dark backgrounds.");
+ fll_program_print_help_option(file, context, f_console_standard_short_light_s, f_console_standard_long_light_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on light backgrounds.");
+ fll_program_print_help_option(file, context, f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, "Do not file in color.");
+ fll_program_print_help_option(file, context, f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Decrease verbosity beyond normal file.");
+ fll_program_print_help_option(file, context, f_console_standard_short_normal_s, f_console_standard_long_normal_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Set verbosity to normal file.");
+ fll_program_print_help_option(file, context, f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Increase verbosity beyond normal file.");
+ fll_program_print_help_option(file, context, f_console_standard_short_debug_s, f_console_standard_long_debug_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Enable debugging, inceasing verbosity beyond normal file.");
+ fll_program_print_help_option(file, context, f_console_standard_short_version_s, f_console_standard_long_version_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Print only the version number.");
- f_print_character(f_string_eol_s[0], output.stream);
+ f_print_character(f_string_eol_s[0], file.stream);
- fll_program_print_help_option(output, context, fss_basic_write_short_file, fss_basic_write_long_file, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " 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_s, f_console_symbol_long_enable_s, "The Content to output.");
- fll_program_print_help_option(output, context, fss_basic_write_short_double, fss_basic_write_long_double, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Use double quotes (default).");
- fll_program_print_help_option(output, context, fss_basic_write_short_ignore, fss_basic_write_long_ignore, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Ignore a given range within a Content.");
- fll_program_print_help_option(output, context, fss_basic_write_short_object, fss_basic_write_long_object, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " The Object to output.");
- fll_program_print_help_option(output, context, fss_basic_write_short_partial, fss_basic_write_long_partial, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Do not output end of Object/Content character.");
- fll_program_print_help_option(output, context, fss_basic_write_short_prepend, fss_basic_write_long_prepend, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Prepend the given whitespace characters to the start of each multi-line Content.");
- fll_program_print_help_option(output, context, fss_basic_write_short_single, fss_basic_write_long_single, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Use single quotes.");
- fll_program_print_help_option(output, context, fss_basic_write_short_trim, fss_basic_write_long_trim, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Trim Object names.");
+ fll_program_print_help_option(file, context, fss_basic_write_short_file, fss_basic_write_long_file, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Specify a file to send file to.");
+ fll_program_print_help_option(file, context, fss_basic_write_short_content, fss_basic_write_long_content, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "The Content to file.");
+ fll_program_print_help_option(file, context, fss_basic_write_short_double, fss_basic_write_long_double, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Use double quotes (default).");
+ fll_program_print_help_option(file, context, fss_basic_write_short_ignore, fss_basic_write_long_ignore, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Ignore a given range within a Content.");
+ fll_program_print_help_option(file, context, fss_basic_write_short_object, fss_basic_write_long_object, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " The Object to file.");
+ fll_program_print_help_option(file, context, fss_basic_write_short_partial, fss_basic_write_long_partial, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Do not file end of Object/Content character.");
+ fll_program_print_help_option(file, context, fss_basic_write_short_prepend, fss_basic_write_long_prepend, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Prepend the given whitespace characters to the start of each multi-line Content.");
+ fll_program_print_help_option(file, context, fss_basic_write_short_single, fss_basic_write_long_single, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Use single quotes.");
+ fll_program_print_help_option(file, context, fss_basic_write_short_trim, fss_basic_write_long_trim, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Trim Object names.");
- fll_program_print_help_usage(output, context, fss_basic_write_name, f_string_empty_s);
+ fll_program_print_help_usage(file, context, fss_basic_write_name, f_string_empty_s);
- fl_print_format(" The pipe uses the Backspace character '%[\\b%]' (%[U+0008%]) to designate the start of a Content.%c", output.stream, context.set.notable, context.set.notable, context.set.notable, context.set.notable, f_string_eol_s[0]);
- fl_print_format(" The pipe uses the Form Feed character '%[\\f%]' (%[U+000C%]) to designate the end of the last Content.%c", output.stream, context.set.notable, context.set.notable, context.set.notable, context.set.notable, f_string_eol_s[0]);
- fl_print_format(" The pipe uses the Vertical Line character '%[\\v%]' (%[U+000B%]) is used to ignore a Content range, which does nothing in this program.%c", output.stream, context.set.notable, context.set.notable, context.set.notable, context.set.notable, f_string_eol_s[0]);
- fl_print_format(" For the pipe, an Object is terminated by either a Backspace character '%[\\b%]' (%[U+0008%])", output.stream, context.set.notable, context.set.notable, context.set.notable, context.set.notable);
- fl_print_format(" or a Form Feed character '%[\\f%]' (%[U+000C%]).%c", output.stream, context.set.notable, context.set.notable, context.set.notable, context.set.notable, f_string_eol_s[0]);
- fl_print_format(" The end of the pipe represents the end of any Object or Content.%c%c", output.stream, f_string_eol_s[0], f_string_eol_s[0]);
+ fl_print_format(" The pipe uses the Backspace character '%[\\b%]' (%[U+0008%]) to designate the start of a Content.%c", file.stream, context.set.notable, context.set.notable, context.set.notable, context.set.notable, f_string_eol_s[0]);
+ fl_print_format(" The pipe uses the Form Feed character '%[\\f%]' (%[U+000C%]) to designate the end of the last Content.%c", file.stream, context.set.notable, context.set.notable, context.set.notable, context.set.notable, f_string_eol_s[0]);
+ fl_print_format(" The pipe uses the Vertical Line character '%[\\v%]' (%[U+000B%]) is used to ignore a Content range, which does nothing in this program.%c", file.stream, context.set.notable, context.set.notable, context.set.notable, context.set.notable, f_string_eol_s[0]);
+ fl_print_format(" For the pipe, an Object is terminated by either a Backspace character '%[\\b%]' (%[U+0008%])", file.stream, context.set.notable, context.set.notable, context.set.notable, context.set.notable);
+ fl_print_format(" or a Form Feed character '%[\\f%]' (%[U+000C%]).%c", file.stream, context.set.notable, context.set.notable, context.set.notable, context.set.notable, f_string_eol_s[0]);
+ fl_print_format(" The end of the pipe represents the end of any Object or Content.%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]);
- fl_print_format(" The FSS-0000 (Basic) specification does not support multi-line Content, therefore the parameter '%[%s%s%]'", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_write_long_prepend, context.set.notable);
- fl_print_format(" does nothing.%c%c", output.stream, f_string_eol_s[0], f_string_eol_s[0]);
+ fl_print_format(" The FSS-0000 (Basic) specification does not support multi-line Content, therefore the parameter '%[%s%s%]'", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_write_long_prepend, context.set.notable);
+ fl_print_format(" does nothing.%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]);
- fl_print_format(" This program does not use the parameter '%[%s%s%]', which therefore does nothing.%c", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_write_long_ignore, context.set.notable, f_string_eol_s[0]);
- fl_print_format(" This parameter requires two values.%c%c", output.stream, f_string_eol_s[0], f_string_eol_s[0]);
+ fl_print_format(" This program does not use the parameter '%[%s%s%]', which therefore does nothing.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_basic_write_long_ignore, context.set.notable, f_string_eol_s[0]);
+ fl_print_format(" This parameter requires two values.%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]);
- funlockfile(output.stream);
+ funlockfile(file.stream);
return F_none;
}
}
if (choice == fss_basic_write_parameter_verbosity_quiet) {
+ main->output.verbosity = f_console_verbosity_quiet;
main->error.verbosity = f_console_verbosity_quiet;
main->warning.verbosity = f_console_verbosity_quiet;
}
else if (choice == fss_basic_write_parameter_verbosity_normal) {
+ main->output.verbosity = f_console_verbosity_normal;
main->error.verbosity = f_console_verbosity_normal;
main->warning.verbosity = f_console_verbosity_normal;
}
else if (choice == fss_basic_write_parameter_verbosity_verbose) {
+ main->output.verbosity = f_console_verbosity_verbose;
main->error.verbosity = f_console_verbosity_verbose;
main->warning.verbosity = f_console_verbosity_verbose;
}
else if (choice == fss_basic_write_parameter_verbosity_debug) {
+ main->output.verbosity = f_console_verbosity_debug;
main->error.verbosity = f_console_verbosity_debug;
main->warning.verbosity = f_console_verbosity_debug;
}
}
if (main->parameters[fss_basic_write_parameter_help].result == f_console_result_found) {
- fss_basic_write_print_help(main->output, main->context);
+ fss_basic_write_print_help(main->output.to, main->context);
fss_basic_write_main_delete(main);
return status;
}
if (main->parameters[fss_basic_write_parameter_version].result == f_console_result_found) {
- fll_program_print_version(main->output, fss_basic_write_version);
+ fll_program_print_version(main->output.to, fss_basic_write_version);
fss_basic_write_main_delete(main);
return status;
f_array_lengths_t remaining;
bool process_pipe;
- f_file_t output;
+ fl_print_t output;
fl_print_t error;
fl_print_t warning;
fss_basic_write_console_parameter_t_initialize, \
f_array_lengths_t_initialize, \
F_false, \
- macro_f_file_t_initialize2(f_type_output, f_type_descriptor_output, f_file_flag_write_only), \
fl_print_t_initialize, \
+ macro_fl_print_t_initialize_error(), \
macro_fl_print_t_initialize_warning(), \
f_color_context_t_initialize, \
}
/**
* Print help.
*
- * @param output
+ * @param file
* The file to print to.
* @param context
* The color context settings.
* F_none on success.
*/
#ifndef _di_fss_basic_write_print_help_
- extern f_status_t fss_basic_write_print_help(const f_file_t output, const f_color_context_t context);
+ extern f_status_t fss_basic_write_print_help(const f_file_t file, const f_color_context_t context);
#endif // _di_fss_basic_write_print_help_
/**
#endif
#ifndef _di_fss_embedded_list_read_print_help_
- f_status_t fss_embedded_list_read_print_help(const f_file_t output, const f_color_context_t context) {
+ f_status_t fss_embedded_list_read_print_help(const f_file_t file, const f_color_context_t context) {
- flockfile(output.stream);
+ flockfile(file.stream);
- fll_program_print_help_header(output, context, fss_embedded_list_read_name_long, fss_embedded_list_read_version);
+ fll_program_print_help_header(file, context, fss_embedded_list_read_name_long, fss_embedded_list_read_version);
- fll_program_print_help_option(output, context, f_console_standard_short_help_s, f_console_standard_long_help_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print this help message.");
- fll_program_print_help_option(output, context, f_console_standard_short_dark_s, f_console_standard_long_dark_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on dark backgrounds.");
- fll_program_print_help_option(output, context, f_console_standard_short_light_s, f_console_standard_long_light_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on light backgrounds.");
- fll_program_print_help_option(output, context, f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, "Do not output in color.");
- fll_program_print_help_option(output, context, f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Decrease verbosity beyond normal output.");
- fll_program_print_help_option(output, context, f_console_standard_short_normal_s, f_console_standard_long_normal_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Set verbosity to normal output.");
- fll_program_print_help_option(output, context, f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Increase verbosity beyond normal output.");
- fll_program_print_help_option(output, context, f_console_standard_short_debug_s, f_console_standard_long_debug_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Enable debugging, inceasing verbosity beyond normal output.");
- fll_program_print_help_option(output, context, f_console_standard_short_version_s, f_console_standard_long_version_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Print only the version number.");
+ fll_program_print_help_option(file, context, f_console_standard_short_help_s, f_console_standard_long_help_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print this help message.");
+ fll_program_print_help_option(file, context, f_console_standard_short_dark_s, f_console_standard_long_dark_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on dark backgrounds.");
+ fll_program_print_help_option(file, context, f_console_standard_short_light_s, f_console_standard_long_light_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on light backgrounds.");
+ fll_program_print_help_option(file, context, f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, "Do not file in color.");
+ fll_program_print_help_option(file, context, f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Decrease verbosity beyond normal file.");
+ fll_program_print_help_option(file, context, f_console_standard_short_normal_s, f_console_standard_long_normal_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Set verbosity to normal file.");
+ fll_program_print_help_option(file, context, f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Increase verbosity beyond normal file.");
+ fll_program_print_help_option(file, context, f_console_standard_short_debug_s, f_console_standard_long_debug_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Enable debugging, inceasing verbosity beyond normal file.");
+ fll_program_print_help_option(file, context, f_console_standard_short_version_s, f_console_standard_long_version_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Print only the version number.");
- f_print_character(f_string_eol_s[0], output.stream);
+ f_print_character(f_string_eol_s[0], file.stream);
- fll_program_print_help_option(output, context, fss_embedded_list_read_short_at, fss_embedded_list_read_long_at, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " 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_s, f_console_symbol_long_enable_s, " Print the Content (default).");
- fll_program_print_help_option(output, context, fss_embedded_list_read_short_columns, fss_embedded_list_read_long_columns, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the total number of columns.");
- fll_program_print_help_option(output, context, fss_embedded_list_read_short_delimit, fss_embedded_list_read_long_delimit, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Designate how to handle applying delimits.");
- fll_program_print_help_option(output, context, fss_embedded_list_read_short_depth, fss_embedded_list_read_long_depth, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select Object at this numeric depth.");
- fll_program_print_help_option(output, context, fss_embedded_list_read_short_empty, fss_embedded_list_read_long_empty, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Include empty Content when processing.");
- fll_program_print_help_option(output, context, fss_embedded_list_read_short_line, fss_embedded_list_read_long_line, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print only the Content at the given line.");
- fll_program_print_help_option(output, context, fss_embedded_list_read_short_name, fss_embedded_list_read_long_name, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select Object with this name.");
- fll_program_print_help_option(output, context, fss_embedded_list_read_short_object, fss_embedded_list_read_long_object, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the Object.");
- fll_program_print_help_option(output, context, fss_embedded_list_read_short_pipe, fss_embedded_list_read_long_pipe, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print using the special pipe format.");
- fll_program_print_help_option(output, context, fss_embedded_list_read_short_raw, fss_embedded_list_read_long_raw, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print with the original quotes and escapes.");
- fll_program_print_help_option(output, context, fss_embedded_list_read_short_select, fss_embedded_list_read_long_select, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select sub-Content at this index.");
- fll_program_print_help_option(output, context, fss_embedded_list_read_short_total, fss_embedded_list_read_long_total, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the total number of lines.");
- fll_program_print_help_option(output, context, fss_embedded_list_read_short_trim, fss_embedded_list_read_long_trim, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Trim Object names on select or print.");
+ fll_program_print_help_option(file, context, fss_embedded_list_read_short_at, fss_embedded_list_read_long_at, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select Object at this numeric index.");
+ fll_program_print_help_option(file, context, fss_embedded_list_read_short_content, fss_embedded_list_read_long_content, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the Content (default).");
+ fll_program_print_help_option(file, context, fss_embedded_list_read_short_columns, fss_embedded_list_read_long_columns, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the total number of columns.");
+ fll_program_print_help_option(file, context, fss_embedded_list_read_short_delimit, fss_embedded_list_read_long_delimit, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Designate how to handle applying delimits.");
+ fll_program_print_help_option(file, context, fss_embedded_list_read_short_depth, fss_embedded_list_read_long_depth, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select Object at this numeric depth.");
+ fll_program_print_help_option(file, context, fss_embedded_list_read_short_empty, fss_embedded_list_read_long_empty, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Include empty Content when processing.");
+ fll_program_print_help_option(file, context, fss_embedded_list_read_short_line, fss_embedded_list_read_long_line, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print only the Content at the given line.");
+ fll_program_print_help_option(file, context, fss_embedded_list_read_short_name, fss_embedded_list_read_long_name, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select Object with this name.");
+ fll_program_print_help_option(file, context, fss_embedded_list_read_short_object, fss_embedded_list_read_long_object, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the Object.");
+ fll_program_print_help_option(file, context, fss_embedded_list_read_short_pipe, fss_embedded_list_read_long_pipe, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print using the special pipe format.");
+ fll_program_print_help_option(file, context, fss_embedded_list_read_short_raw, fss_embedded_list_read_long_raw, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print with the original quotes and escapes.");
+ fll_program_print_help_option(file, context, fss_embedded_list_read_short_select, fss_embedded_list_read_long_select, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select sub-Content at this index.");
+ fll_program_print_help_option(file, context, fss_embedded_list_read_short_total, fss_embedded_list_read_long_total, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the total number of lines.");
+ fll_program_print_help_option(file, context, fss_embedded_list_read_short_trim, fss_embedded_list_read_long_trim, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Trim Object names on select or print.");
- fll_program_print_help_usage(output, context, fss_embedded_list_read_name, "filename(s)");
+ fll_program_print_help_usage(file, context, fss_embedded_list_read_name, "filename(s)");
- fl_print_format(" %[Notes:%]%c", output.stream, context.set.important, context.set.important, f_string_eol_s[0]);
+ fl_print_format(" %[Notes:%]%c", file.stream, context.set.important, context.set.important, f_string_eol_s[0]);
- fl_print_format(" This program will print the Content associated with the given Object and Content main based on the FSS-0008 Embedded List standard.%c%c", output.stream, f_string_eol_s[0], f_string_eol_s[0]);
+ fl_print_format(" This program will print the Content associated with the given Object and Content main based on the FSS-0008 Embedded List standard.%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]);
- fl_print_format(" All numeric positions (indexes) start at 0 instead of 1.%c", output.stream, f_string_eol_s[0]);
- fl_print_format(" For example, a file of 17 lines would range from 0 to 16.%c%c", output.stream, f_string_eol_s[0], f_string_eol_s[0]);
+ fl_print_format(" All numeric positions (indexes) start at 0 instead of 1.%c", file.stream, f_string_eol_s[0]);
+ fl_print_format(" For example, a file of 17 lines would range from 0 to 16.%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]);
- fl_print_format(" When using the %[%s%s%] option, an order of operations is enforced on the parameters.%c", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_depth, context.set.notable, f_string_eol_s[0]);
+ fl_print_format(" When using the %[%s%s%] option, an order of operations is enforced on the parameters.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_depth, context.set.notable, f_string_eol_s[0]);
- fl_print_format(" When this order of operations is in effect, parameters to the right of a depth parameter are influenced by that depth parameter:%c", output.stream, f_string_eol_s[0]);
+ fl_print_format(" When this order of operations is in effect, parameters to the right of a depth parameter are influenced by that depth parameter:%c", file.stream, f_string_eol_s[0]);
- fl_print_format(" %[%s%s%]: An Object index at the specified depth.%c", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_at, context.set.notable, f_string_eol_s[0]);
- fl_print_format(" %[%s%s%]: A new depth within the specified depth, indexed from the root.%c", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_depth, context.set.notable, f_string_eol_s[0]);
- fl_print_format(" %[%s%s%]: An Object name at the specified depth.%c%c", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_name, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]);
+ fl_print_format(" %[%s%s%]: An Object index at the specified depth.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_at, context.set.notable, f_string_eol_s[0]);
+ fl_print_format(" %[%s%s%]: A new depth within the specified depth, indexed from the root.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_depth, context.set.notable, f_string_eol_s[0]);
+ fl_print_format(" %[%s%s%]: An Object name at the specified depth.%c%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_name, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]);
- fl_print_format(" The parameter %[%s%s%] must be in numeric order, but values in between may be skipped.%c", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_depth, context.set.notable, f_string_eol_s[0]);
- fl_print_format(" ('-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", output.stream, f_string_eol_s[0]);
- fl_print_format(" ('-d 2 -a 1 -d 0 -a 2' would be invalid because depth 2 is before depth 1.)%c%c", output.stream, f_string_eol_s[0], f_string_eol_s[0]);
+ fl_print_format(" The parameter %[%s%s%] must be in numeric order, but values in between may be skipped.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_depth, context.set.notable, f_string_eol_s[0]);
+ fl_print_format(" ('-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", file.stream, f_string_eol_s[0]);
+ fl_print_format(" ('-d 2 -a 1 -d 0 -a 2' would be invalid because depth 2 is before depth 1.)%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]);
- fl_print_format(" The parameter %[%s%s%] selects a Content column.%c%c", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_select, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]);
+ fl_print_format(" The parameter %[%s%s%] selects a Content column.%c%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_select, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]);
- fl_print_format(" Specify both %[%s%s%]", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_object, context.set.notable);
- fl_print_format(" and the %[%s%s%] parameters to get the total objects.%c%c", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_total, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]);
+ fl_print_format(" Specify both %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_object, context.set.notable);
+ fl_print_format(" and the %[%s%s%] parameters to get the total objects.%c%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_total, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]);
- fl_print_format(" When both %[%s%s%]", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_at, context.set.notable);
- fl_print_format(" and %[%s%s%] parameters are specified (at the same depth),", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_name, context.set.notable);
- fl_print_format(" the %[%s%s%] parameter value will be treated as a position relative to the specified", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_at, context.set.notable);
- fl_print_format(" %[%s%s%] parameter value.%c%c", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_name, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]);
+ fl_print_format(" When both %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_at, context.set.notable);
+ fl_print_format(" and %[%s%s%] parameters are specified (at the same depth),", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_name, context.set.notable);
+ fl_print_format(" the %[%s%s%] parameter value will be treated as a position relative to the specified", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_at, context.set.notable);
+ fl_print_format(" %[%s%s%] parameter value.%c%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_name, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]);
- fl_print_format(" This program may support parameters, such as %[%s%s%]", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_depth, context.set.notable);
- fl_print_format(" or %[%s%s%], even if not supported by the standard.%c", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_select, context.set.notable, f_string_eol_s[0]);
- fl_print_format(" This is done to help ensure consistency for scripting.%c%c", output.stream, f_string_eol_s[0], f_string_eol_s[0]);
+ fl_print_format(" This program may support parameters, such as %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_depth, context.set.notable);
+ fl_print_format(" or %[%s%s%], even if not supported by the standard.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_select, context.set.notable, f_string_eol_s[0]);
+ fl_print_format(" This is done to help ensure consistency for scripting.%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]);
- fl_print_format(" For parameters like %[%s%s%],", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_depth, context.set.notable);
- fl_print_format(" if the standard doesn't support nested Content, then only a depth of 0 would be valid.%c", output.stream, f_string_eol_s[0]);
+ fl_print_format(" For parameters like %[%s%s%],", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_depth, context.set.notable);
+ fl_print_format(" if the standard doesn't support nested Content, then only a depth of 0 would be valid.%c", file.stream, f_string_eol_s[0]);
- fl_print_format(" For parameters like %[%s%s%],", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_select, context.set.notable);
- fl_print_format(" if the standard doesn't support multiple Content groups, then only a select of 0 would be valid.%c%c", output.stream, f_string_eol_s[0], f_string_eol_s[0]);
+ fl_print_format(" For parameters like %[%s%s%],", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_select, context.set.notable);
+ fl_print_format(" if the standard doesn't support multiple Content groups, then only a select of 0 would be valid.%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]);
- fl_print_format(" The parameter %[%s%s%]", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_trim, context.set.notable);
- fl_print_format(" will remove leading and trailing whitespaces when selecting objects or when printing objects.%c%c", output.stream, f_string_eol_s[0], f_string_eol_s[0]);
+ fl_print_format(" The parameter %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_trim, context.set.notable);
+ fl_print_format(" will remove leading and trailing whitespaces when selecting objects or when printing objects.%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]);
- fl_print_format(" When specifying both the %[%s%s%]", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_object, context.set.notable);
- fl_print_format(" parameter and the %[%s%s%] parameter, the entire Object and Content are printed, including the formatting.%c", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_content, context.set.notable, f_string_eol_s[0]);
- fl_print_format(" Both the Object and Content printed are already escaped.%c", output.stream, f_string_eol_s[0]);
- fl_print_format(" Both the Object and Content are separated by an EOL.%c%c", output.stream, f_string_eol_s[0], f_string_eol_s[0]);
+ fl_print_format(" When specifying both the %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_object, context.set.notable);
+ fl_print_format(" parameter and the %[%s%s%] parameter, the entire Object and Content are printed, including the formatting.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_content, context.set.notable, f_string_eol_s[0]);
+ fl_print_format(" Both the Object and Content printed are already escaped.%c", file.stream, f_string_eol_s[0]);
+ fl_print_format(" Both the Object and Content are separated by an EOL.%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]);
- fl_print_format(" The parameter %[%s%s%] accepts the following:%c", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_delimit, context.set.notable, f_string_eol_s[0]);
- fl_print_format(" - %[%s%]: Do not apply delimits.%c", output.stream, context.set.notable, fss_embedded_list_read_delimit_mode_name_none, context.set.notable, f_string_eol_s[0]);
- fl_print_format(" - %[%s%]: (default) Apply all delimits.%c", output.stream, context.set.notable, fss_embedded_list_read_delimit_mode_name_all, context.set.notable, f_string_eol_s[0]);
+ fl_print_format(" The parameter %[%s%s%] accepts the following:%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_delimit, context.set.notable, f_string_eol_s[0]);
+ fl_print_format(" - %[%s%]: Do not apply delimits.%c", file.stream, context.set.notable, fss_embedded_list_read_delimit_mode_name_none, context.set.notable, f_string_eol_s[0]);
+ fl_print_format(" - %[%s%]: (default) Apply all delimits.%c", file.stream, context.set.notable, fss_embedded_list_read_delimit_mode_name_all, context.set.notable, f_string_eol_s[0]);
// @todo
- //fl_print_format(" - %[%s%]: Apply delimits for Objects.%c", output.stream, context.set.notable, fss_embedded_list_read_delimit_mode_name_object, context.set.notable, f_string_eol_s[0]);
- fl_print_format(" - A number, 0 or greater: apply delimits for Content at the specified depth.%c", output.stream, f_string_eol_s[0]);
- fl_print_format(" - A number, 0 or greater, followed by a %[%s%]: (such as '1+') apply delimits for Content at the specified depth and any greater depth (numerically).%c", output.stream, context.set.notable, fss_embedded_list_read_delimit_mode_name_greater, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]);
- fl_print_format(" - A number, 0 or lesser, followed by a %[%s%]: (such as '1-') apply delimits for Content at the specified depth and any lesser depth (numerically).%c%c", output.stream, context.set.notable, fss_embedded_list_read_delimit_mode_name_lesser, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]);
+ //fl_print_format(" - %[%s%]: Apply delimits for Objects.%c", file.stream, context.set.notable, fss_embedded_list_read_delimit_mode_name_object, context.set.notable, f_string_eol_s[0]);
+ fl_print_format(" - A number, 0 or greater: apply delimits for Content at the specified depth.%c", file.stream, f_string_eol_s[0]);
+ fl_print_format(" - A number, 0 or greater, followed by a %[%s%]: (such as '1+') apply delimits for Content at the specified depth and any greater depth (numerically).%c", file.stream, context.set.notable, fss_embedded_list_read_delimit_mode_name_greater, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]);
+ fl_print_format(" - A number, 0 or lesser, followed by a %[%s%]: (such as '1-') apply delimits for Content at the specified depth and any lesser depth (numerically).%c%c", file.stream, context.set.notable, fss_embedded_list_read_delimit_mode_name_lesser, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]);
- fl_print_format(" The %[%s%s%] parameter may be specified multiple times to customize the delimit behavior.%c", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_delimit, context.set.notable, f_string_eol_s[0]);
+ fl_print_format(" The %[%s%s%] parameter may be specified multiple times to customize the delimit behavior.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_delimit, context.set.notable, f_string_eol_s[0]);
- fl_print_format(" The %[%s%s%]", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_delimit, context.set.notable);
- fl_print_format(" values %[%s%]", output.stream, context.set.notable, fss_embedded_list_read_delimit_mode_name_none, context.set.notable);
- fl_print_format(" and %[%s%],", output.stream, context.set.notable, fss_embedded_list_read_delimit_mode_name_all, context.set.notable);
- fl_print_format(" overrule all other delimit values.%c%c", output.stream, f_string_eol_s[0], f_string_eol_s[0]);
+ fl_print_format(" The %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_delimit, context.set.notable);
+ fl_print_format(" values %[%s%]", file.stream, context.set.notable, fss_embedded_list_read_delimit_mode_name_none, context.set.notable);
+ fl_print_format(" and %[%s%],", file.stream, context.set.notable, fss_embedded_list_read_delimit_mode_name_all, context.set.notable);
+ fl_print_format(" overrule all other delimit values.%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]);
- fl_print_format(" The parameters %[%s%s%]", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_columns, context.set.notable);
- fl_print_format(" and %[%s%s%]", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_select, context.set.notable);
- fl_print_format(" refer to a Content column.%c", output.stream, f_string_eol_s[0]);
- fl_print_format(" The word \"column\" is being loosely defined to refer to a specific Content.%c", output.stream, f_string_eol_s[0]);
- fl_print_format(" This is not to be confused with a depth.%c%c", output.stream, f_string_eol_s[0], f_string_eol_s[0]);
+ fl_print_format(" The parameters %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_columns, context.set.notable);
+ fl_print_format(" and %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_embedded_list_read_long_select, context.set.notable);
+ fl_print_format(" refer to a Content column.%c", file.stream, f_string_eol_s[0]);
+ fl_print_format(" The word \"column\" is being loosely defined to refer to a specific Content.%c", file.stream, f_string_eol_s[0]);
+ fl_print_format(" This is not to be confused with a depth.%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]);
- funlockfile(output.stream);
+ funlockfile(file.stream);
return F_none;
}
}
if (choice == fss_embedded_list_read_parameter_verbosity_quiet) {
+ main->output.verbosity = f_console_verbosity_quiet;
main->error.verbosity = f_console_verbosity_quiet;
main->warning.verbosity = f_console_verbosity_quiet;
}
else if (choice == fss_embedded_list_read_parameter_verbosity_normal) {
+ main->output.verbosity = f_console_verbosity_normal;
main->error.verbosity = f_console_verbosity_normal;
main->warning.verbosity = f_console_verbosity_normal;
}
else if (choice == fss_embedded_list_read_parameter_verbosity_verbose) {
+ main->output.verbosity = f_console_verbosity_verbose;
main->error.verbosity = f_console_verbosity_verbose;
main->warning.verbosity = f_console_verbosity_verbose;
}
else if (choice == fss_embedded_list_read_parameter_verbosity_debug) {
+ main->output.verbosity = f_console_verbosity_debug;
main->error.verbosity = f_console_verbosity_debug;
main->warning.verbosity = f_console_verbosity_debug;
}
}
if (main->parameters[fss_embedded_list_read_parameter_help].result == f_console_result_found) {
- fss_embedded_list_read_print_help(main->output, main->context);
+ fss_embedded_list_read_print_help(main->output.to, main->context);
fss_embedded_list_read_main_delete(main);
return F_none;
}
if (main->parameters[fss_embedded_list_read_parameter_version].result == f_console_result_found) {
- fll_program_print_version(main->output, fss_embedded_list_read_version);
+ fll_program_print_version(main->output.to, fss_embedded_list_read_version);
fss_embedded_list_read_main_delete(main);
return F_none;
// Skip past empty files.
if (!main->quantity.total) {
if (main->parameters[fss_embedded_list_read_parameter_total].result == f_console_result_found) {
- fll_print_format("0%c", main->output.stream, f_string_eol_s[0]);
+ fll_print_format("0%c", main->output.to.stream, f_string_eol_s[0]);
}
f_file_stream_close(F_true, &file);
f_array_lengths_t remaining;
bool process_pipe;
- f_file_t output;
+ fl_print_t output;
fl_print_t error;
fl_print_t warning;
fss_embedded_list_read_console_parameter_t_initialize, \
f_array_lengths_t_initialize, \
F_false, \
- macro_f_file_t_initialize2(f_type_output, f_type_descriptor_output, f_file_flag_write_only), \
fl_print_t_initialize, \
+ macro_fl_print_t_initialize_error(), \
macro_fl_print_t_initialize_warning(), \
f_string_dynamic_t_initialize, \
f_fss_nest_t_initialize, \
/**
* Print help.
*
- * @param output
+ * @param file
* The file to print to.
* @param context
* The color context settings.
* F_none on success.
*/
#ifndef _di_fss_embedded_list_read_print_help_
- extern f_status_t fss_embedded_list_read_print_help(const f_file_t output, const f_color_context_t context);
+ extern f_status_t fss_embedded_list_read_print_help(const f_file_t file, const f_color_context_t context);
#endif // _di_fss_embedded_list_read_print_help_
/**
macro_f_string_dynamic_t_delete_simple(main->buffer);
if (main->parameters[fss_embedded_list_read_parameter_total].result == f_console_result_found) {
- fll_print_format("0%c", main->output.stream, f_string_eol_s[0]);
+ fll_print_format("0%c", main->output.to.stream, f_string_eol_s[0]);
return F_none;
}
// Requested depths cannot be greater than contents depth.
if (depths.used > main->nest.used) {
if (main->parameters[fss_embedded_list_read_parameter_total].result == f_console_result_found) {
- fll_print_format("0%c", main->output.stream, f_string_eol_s[0]);
+ fll_print_format("0%c", main->output.to.stream, f_string_eol_s[0]);
return F_none;
}
++total;
} // for
- fll_print_format("%lu%c", main->output.stream, total, f_string_eol_s[0]);
+ fll_print_format("%lu%c", main->output.to.stream, total, f_string_eol_s[0]);
return F_none;
}
print_object = &fl_print_trim_except_dynamic_partial;
}
- flockfile(main->output.stream);
+ flockfile(main->output.to.stream);
for (i = 0; i < items->used; ++i) {
if (skip[i]) continue;
- print_object(main->buffer, items->array[i].object, *objects_delimits, main->output.stream);
+ print_object(main->buffer, items->array[i].object, *objects_delimits, main->output.to.stream);
if (main->parameters[fss_embedded_list_read_parameter_content].result == f_console_result_found) {
fss_embedded_list_read_print_object_end(*main);
if (items->array[i].content.used) {
- f_print_except_dynamic_partial(main->buffer, items->array[i].content.array[0], *contents_delimits, main->output.stream);
+ f_print_except_dynamic_partial(main->buffer, items->array[i].content.array[0], *contents_delimits, main->output.to.stream);
}
}
fss_embedded_list_read_print_set_end(*main);
} // for
- funlockfile(main->output.stream);
+ funlockfile(main->output.to.stream);
return F_none;
}
} // for
} // for
- fll_print_format("%lu%c", main->output.stream, total, f_string_eol_s[0]);
+ fll_print_format("%lu%c", main->output.to.stream, total, f_string_eol_s[0]);
return F_none;
}
if (main->parameters[fss_embedded_list_read_parameter_line].result == f_console_result_additional) {
f_array_length_t line_current = 0;
- flockfile(main->output.stream);
+ flockfile(main->output.to.stream);
for (; i < items->used; ++i) {
if (!main->buffer.string[j]) continue;
if (main->buffer.string[j] == f_string_eol_s[0]) {
- f_print_character(f_string_eol_s[0], main->output.stream);
+ f_print_character(f_string_eol_s[0], main->output.to.stream);
break;
}
- f_print_character(main->buffer.string[j], main->output.stream);
+ f_print_character(main->buffer.string[j], main->output.to.stream);
} // for
break;
}
} // for
- funlockfile(main->output.stream);
+ funlockfile(main->output.to.stream);
return F_none;
}
- flockfile(main->output.stream);
+ flockfile(main->output.to.stream);
for (i = 0; i < items->used; ++i) {
continue;
}
- f_print_except_dynamic_partial(main->buffer, items->array[i].content.array[0], *contents_delimits, main->output.stream);
+ f_print_except_dynamic_partial(main->buffer, items->array[i].content.array[0], *contents_delimits, main->output.to.stream);
if (main->parameters[fss_embedded_list_read_parameter_pipe].result == f_console_result_found) {
- f_print_character(fss_embedded_list_read_pipe_content_end, main->output.stream);
+ f_print_character(fss_embedded_list_read_pipe_content_end, main->output.to.stream);
}
} // for
- funlockfile(main->output.stream);
+ funlockfile(main->output.to.stream);
return F_none;
}
void fss_embedded_list_read_print_object_end(const fss_embedded_list_read_main_t main) {
if (main.parameters[fss_embedded_list_read_parameter_pipe].result == f_console_result_found) {
- f_print_character(fss_embedded_list_read_pipe_content_start, main.output.stream);
+ f_print_character(fss_embedded_list_read_pipe_content_start, main.output.to.stream);
}
else {
if (main.parameters[fss_embedded_list_read_parameter_object].result == f_console_result_found && main.parameters[fss_embedded_list_read_parameter_content].result == f_console_result_found) {
- f_print_character(f_fss_embedded_list_open, main.output.stream);
- f_print_character(f_fss_embedded_list_open_end, main.output.stream);
+ f_print_character(f_fss_embedded_list_open, main.output.to.stream);
+ f_print_character(f_fss_embedded_list_open_end, main.output.to.stream);
}
else {
- f_print_character(f_fss_eol, main.output.stream);
+ f_print_character(f_fss_eol, main.output.to.stream);
}
}
}
void fss_embedded_list_read_print_content_ignore(const fss_embedded_list_read_main_t main) {
if (main.parameters[fss_embedded_list_read_parameter_pipe].result == f_console_result_found) {
- f_print_character(fss_embedded_list_read_pipe_content_ignore, main.output.stream);
+ f_print_character(fss_embedded_list_read_pipe_content_ignore, main.output.to.stream);
}
}
#endif // _di_fss_embedded_list_read_print_content_ignore_
void fss_embedded_list_read_print_set_end(const fss_embedded_list_read_main_t main) {
if (main.parameters[fss_embedded_list_read_parameter_pipe].result == f_console_result_found) {
- f_print_character(fss_embedded_list_read_pipe_content_end, main.output.stream);
+ f_print_character(fss_embedded_list_read_pipe_content_end, main.output.to.stream);
}
else {
if (main.parameters[fss_embedded_list_read_parameter_object].result == f_console_result_found && main.parameters[fss_embedded_list_read_parameter_content].result == f_console_result_found) {
- f_print_character(f_fss_embedded_list_close, main.output.stream);
- f_print_character(f_fss_embedded_list_close_end, main.output.stream);
+ f_print_character(f_fss_embedded_list_close, main.output.to.stream);
+ f_print_character(f_fss_embedded_list_close_end, main.output.to.stream);
}
else {
- f_print_character(f_fss_eol, main.output.stream);
+ f_print_character(f_fss_eol, main.output.to.stream);
}
}
}
#endif
#ifndef _di_fss_embedded_list_write_print_help_
- f_status_t fss_embedded_list_write_print_help(const f_file_t output, const f_color_context_t context) {
-
- flockfile(output.stream);
-
- fll_program_print_help_header(output, context, fss_embedded_list_write_name_long, fss_embedded_list_write_version);
-
- fll_program_print_help_option(output, context, f_console_standard_short_help_s, f_console_standard_long_help_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print this help message.");
- fll_program_print_help_option(output, context, f_console_standard_short_dark_s, f_console_standard_long_dark_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on dark backgrounds.");
- fll_program_print_help_option(output, context, f_console_standard_short_light_s, f_console_standard_long_light_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on light backgrounds.");
- fll_program_print_help_option(output, context, f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, "Do not output in color.");
- fll_program_print_help_option(output, context, f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Decrease verbosity beyond normal output.");
- fll_program_print_help_option(output, context, f_console_standard_short_normal_s, f_console_standard_long_normal_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Set verbosity to normal output.");
- fll_program_print_help_option(output, context, f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Increase verbosity beyond normal output.");
- fll_program_print_help_option(output, context, f_console_standard_short_debug_s, f_console_standard_long_debug_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Enable debugging, inceasing verbosity beyond normal output.");
- fll_program_print_help_option(output, context, f_console_standard_short_version_s, f_console_standard_long_version_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Print only the version number.");
-
- f_print_character(f_string_eol_s[0], output.stream);
-
- fll_program_print_help_option(output, context, fss_embedded_list_write_short_file, fss_embedded_list_write_long_file, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " 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_s, f_console_symbol_long_enable_s, "The Content to output.");
- fll_program_print_help_option(output, context, fss_embedded_list_write_short_double, fss_embedded_list_write_long_double, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Use double quotes (default).");
- fll_program_print_help_option(output, context, fss_embedded_list_write_short_ignore, fss_embedded_list_write_long_ignore, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Ignore a given range within a Content.");
- fll_program_print_help_option(output, context, fss_embedded_list_write_short_object, fss_embedded_list_write_long_object, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " The Object to output.");
- fll_program_print_help_option(output, context, fss_embedded_list_write_short_partial, fss_embedded_list_write_long_partial, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Do not output end of Object/Content character.");
- fll_program_print_help_option(output, context, fss_embedded_list_write_short_prepend, fss_embedded_list_write_long_prepend, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Prepend the given whitespace characters to the start of each multi-line Content.");
- fll_program_print_help_option(output, context, fss_embedded_list_write_short_single, fss_embedded_list_write_long_single, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Use single quotes.");
- fll_program_print_help_option(output, context, fss_embedded_list_write_short_trim, fss_embedded_list_write_long_trim, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Trim Object names.");
-
- fll_program_print_help_usage(output, context, fss_embedded_list_write_name, f_string_empty_s);
-
- fl_print_format(" The pipe uses the Backspace character '%[\\b%]' (%[U+0008%]) to designate the start of a Content.%c", output.stream, context.set.notable, context.set.notable, context.set.notable, context.set.notable, f_string_eol_s[0]);
- fl_print_format(" The pipe uses the Form Feed character '%[\\f%]' (%[U+000C%]) to designate the end of the last Content.%c", output.stream, context.set.notable, context.set.notable, context.set.notable, context.set.notable, f_string_eol_s[0]);
- fl_print_format(" The pipe uses the Vertical Line character '%[\\v%]' (%[U+000B%]) is used to ignore a Content range (use this both before and after the range).%c", output.stream, context.set.notable, context.set.notable, context.set.notable, context.set.notable, f_string_eol_s[0]);
- fl_print_format(" For the pipe, an Object is terminated by either a Backspace character '%[\\b%]' (%[U+0008%])", output.stream, context.set.notable, context.set.notable, context.set.notable, context.set.notable);
- fl_print_format(" or a Form Feed character '%[\\f%]' (%[U+000C%]).%c", output.stream, context.set.notable, context.set.notable, context.set.notable, context.set.notable, f_string_eol_s[0]);
- fl_print_format(" The end of the pipe represents the end of any Object or Content.%c%c", output.stream, f_string_eol_s[0], f_string_eol_s[0]);
-
- fl_print_format(" The FSS-0008 (Embedded List) specification does not support quoted names, therefore the parameters '%[%s%s%]'", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_embedded_list_write_long_single, context.set.notable);
- fl_print_format(" and '%[%s%s%]' do nothing.%c%c", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_embedded_list_write_long_double, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]);
-
- fl_print_format(" The parameter '%[%s%s%]' designates to not escape any valid nested Object or Content within some Content.%c", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_embedded_list_write_long_ignore, context.set.notable, f_string_eol_s[0]);
- fl_print_format(" This parameter requires two values.%c", output.stream, f_string_eol_s[0]);
- fl_print_format(" This parameter is not used for ignoring anything from the input pipe.%c", output.stream, f_string_eol_s[0]);
- fl_print_format(" This parameter must be specified after a '%[%s%s%]'", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_embedded_list_write_long_content, context.set.notable);
- fl_print_format(" parameter and this applies only to the Content represented by that specific '%[%s%s%]' parameter.%c%c", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_embedded_list_write_long_content, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]);
-
- funlockfile(output.stream);
+ f_status_t fss_embedded_list_write_print_help(const f_file_t file, const f_color_context_t context) {
+
+ flockfile(file.stream);
+
+ fll_program_print_help_header(file, context, fss_embedded_list_write_name_long, fss_embedded_list_write_version);
+
+ fll_program_print_help_option(file, context, f_console_standard_short_help_s, f_console_standard_long_help_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print this help message.");
+ fll_program_print_help_option(file, context, f_console_standard_short_dark_s, f_console_standard_long_dark_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on dark backgrounds.");
+ fll_program_print_help_option(file, context, f_console_standard_short_light_s, f_console_standard_long_light_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on light backgrounds.");
+ fll_program_print_help_option(file, context, f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, "Do not file in color.");
+ fll_program_print_help_option(file, context, f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Decrease verbosity beyond normal file.");
+ fll_program_print_help_option(file, context, f_console_standard_short_normal_s, f_console_standard_long_normal_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Set verbosity to normal file.");
+ fll_program_print_help_option(file, context, f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Increase verbosity beyond normal file.");
+ fll_program_print_help_option(file, context, f_console_standard_short_debug_s, f_console_standard_long_debug_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Enable debugging, inceasing verbosity beyond normal file.");
+ fll_program_print_help_option(file, context, f_console_standard_short_version_s, f_console_standard_long_version_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Print only the version number.");
+
+ f_print_character(f_string_eol_s[0], file.stream);
+
+ fll_program_print_help_option(file, context, fss_embedded_list_write_short_file, fss_embedded_list_write_long_file, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Specify a file to send file to.");
+ fll_program_print_help_option(file, context, fss_embedded_list_write_short_content, fss_embedded_list_write_long_content, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "The Content to file.");
+ fll_program_print_help_option(file, context, fss_embedded_list_write_short_double, fss_embedded_list_write_long_double, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Use double quotes (default).");
+ fll_program_print_help_option(file, context, fss_embedded_list_write_short_ignore, fss_embedded_list_write_long_ignore, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Ignore a given range within a Content.");
+ fll_program_print_help_option(file, context, fss_embedded_list_write_short_object, fss_embedded_list_write_long_object, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " The Object to file.");
+ fll_program_print_help_option(file, context, fss_embedded_list_write_short_partial, fss_embedded_list_write_long_partial, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Do not file end of Object/Content character.");
+ fll_program_print_help_option(file, context, fss_embedded_list_write_short_prepend, fss_embedded_list_write_long_prepend, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Prepend the given whitespace characters to the start of each multi-line Content.");
+ fll_program_print_help_option(file, context, fss_embedded_list_write_short_single, fss_embedded_list_write_long_single, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Use single quotes.");
+ fll_program_print_help_option(file, context, fss_embedded_list_write_short_trim, fss_embedded_list_write_long_trim, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Trim Object names.");
+
+ fll_program_print_help_usage(file, context, fss_embedded_list_write_name, f_string_empty_s);
+
+ fl_print_format(" The pipe uses the Backspace character '%[\\b%]' (%[U+0008%]) to designate the start of a Content.%c", file.stream, context.set.notable, context.set.notable, context.set.notable, context.set.notable, f_string_eol_s[0]);
+ fl_print_format(" The pipe uses the Form Feed character '%[\\f%]' (%[U+000C%]) to designate the end of the last Content.%c", file.stream, context.set.notable, context.set.notable, context.set.notable, context.set.notable, f_string_eol_s[0]);
+ fl_print_format(" The pipe uses the Vertical Line character '%[\\v%]' (%[U+000B%]) is used to ignore a Content range (use this both before and after the range).%c", file.stream, context.set.notable, context.set.notable, context.set.notable, context.set.notable, f_string_eol_s[0]);
+ fl_print_format(" For the pipe, an Object is terminated by either a Backspace character '%[\\b%]' (%[U+0008%])", file.stream, context.set.notable, context.set.notable, context.set.notable, context.set.notable);
+ fl_print_format(" or a Form Feed character '%[\\f%]' (%[U+000C%]).%c", file.stream, context.set.notable, context.set.notable, context.set.notable, context.set.notable, f_string_eol_s[0]);
+ fl_print_format(" The end of the pipe represents the end of any Object or Content.%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]);
+
+ fl_print_format(" The FSS-0008 (Embedded List) specification does not support quoted names, therefore the parameters '%[%s%s%]'", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_embedded_list_write_long_single, context.set.notable);
+ fl_print_format(" and '%[%s%s%]' do nothing.%c%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_embedded_list_write_long_double, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]);
+
+ fl_print_format(" The parameter '%[%s%s%]' designates to not escape any valid nested Object or Content within some Content.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_embedded_list_write_long_ignore, context.set.notable, f_string_eol_s[0]);
+ fl_print_format(" This parameter requires two values.%c", file.stream, f_string_eol_s[0]);
+ fl_print_format(" This parameter is not used for ignoring anything from the input pipe.%c", file.stream, f_string_eol_s[0]);
+ fl_print_format(" This parameter must be specified after a '%[%s%s%]'", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_embedded_list_write_long_content, context.set.notable);
+ fl_print_format(" parameter and this applies only to the Content represented by that specific '%[%s%s%]' parameter.%c%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_embedded_list_write_long_content, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]);
+
+ funlockfile(file.stream);
return F_none;
}
}
if (choice == fss_embedded_list_write_parameter_verbosity_quiet) {
+ main->output.verbosity = f_console_verbosity_quiet;
main->error.verbosity = f_console_verbosity_quiet;
main->warning.verbosity = f_console_verbosity_quiet;
}
else if (choice == fss_embedded_list_write_parameter_verbosity_normal) {
+ main->output.verbosity = f_console_verbosity_normal;
main->error.verbosity = f_console_verbosity_normal;
main->warning.verbosity = f_console_verbosity_normal;
}
else if (choice == fss_embedded_list_write_parameter_verbosity_verbose) {
+ main->output.verbosity = f_console_verbosity_verbose;
main->error.verbosity = f_console_verbosity_verbose;
main->warning.verbosity = f_console_verbosity_verbose;
}
else if (choice == fss_embedded_list_write_parameter_verbosity_debug) {
+ main->output.verbosity = f_console_verbosity_debug;
main->error.verbosity = f_console_verbosity_debug;
main->warning.verbosity = f_console_verbosity_debug;
}
}
if (main->parameters[fss_embedded_list_write_parameter_help].result == f_console_result_found) {
- fss_embedded_list_write_print_help(main->output, main->context);
+ fss_embedded_list_write_print_help(main->output.to, main->context);
fss_embedded_list_write_main_delete(main);
return status;
}
if (main->parameters[fss_embedded_list_write_parameter_version].result == f_console_result_found) {
- fll_program_print_version(main->output, fss_embedded_list_write_version);
+ fll_program_print_version(main->output.to, fss_embedded_list_write_version);
fss_embedded_list_write_main_delete(main);
return status;
f_array_lengths_t remaining;
bool process_pipe;
- f_file_t output;
+ fl_print_t output;
fl_print_t error;
fl_print_t warning;
f_string_static_t prepend;
fss_embedded_list_write_console_parameter_t_initialize, \
f_array_lengths_t_initialize, \
F_false, \
- macro_f_file_t_initialize2(f_type_output, f_type_descriptor_output, f_file_flag_write_only), \
fl_print_t_initialize, \
+ macro_fl_print_t_initialize_error(), \
macro_fl_print_t_initialize_warning(), \
f_string_static_t_initialize, \
f_color_context_t_initialize, \
/**
* Print help.
*
- * @param output
+ * @param file
* The file to print to.
* @param context
* The color context settings.
* F_none on success.
*/
#ifndef _di_fss_embedded_list_write_print_help_
- extern f_status_t fss_embedded_list_write_print_help(const f_file_t output, const f_color_context_t context);
+ extern f_status_t fss_embedded_list_write_print_help(const f_file_t file, const f_color_context_t context);
#endif // _di_fss_embedded_list_write_print_help_
/**
#endif
#ifndef _di_fss_extended_list_read_print_help_
- f_status_t fss_extended_list_read_print_help(const f_file_t output, const f_color_context_t context) {
+ f_status_t fss_extended_list_read_print_help(const f_file_t file, const f_color_context_t context) {
- flockfile(output.stream);
+ flockfile(file.stream);
- fll_program_print_help_header(output, context, fss_extended_list_read_name_long, fss_extended_list_read_version);
+ fll_program_print_help_header(file, context, fss_extended_list_read_name_long, fss_extended_list_read_version);
- fll_program_print_help_option(output, context, f_console_standard_short_help_s, f_console_standard_long_help_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print this help message.");
- fll_program_print_help_option(output, context, f_console_standard_short_dark_s, f_console_standard_long_dark_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on dark backgrounds.");
- fll_program_print_help_option(output, context, f_console_standard_short_light_s, f_console_standard_long_light_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on light backgrounds.");
- fll_program_print_help_option(output, context, f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, "Do not output in color.");
- fll_program_print_help_option(output, context, f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Decrease verbosity beyond normal output.");
- fll_program_print_help_option(output, context, f_console_standard_short_normal_s, f_console_standard_long_normal_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Set verbosity to normal output.");
- fll_program_print_help_option(output, context, f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Increase verbosity beyond normal output.");
- fll_program_print_help_option(output, context, f_console_standard_short_debug_s, f_console_standard_long_debug_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Enable debugging, inceasing verbosity beyond normal output.");
- fll_program_print_help_option(output, context, f_console_standard_short_version_s, f_console_standard_long_version_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Print only the version number.");
+ fll_program_print_help_option(file, context, f_console_standard_short_help_s, f_console_standard_long_help_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print this help message.");
+ fll_program_print_help_option(file, context, f_console_standard_short_dark_s, f_console_standard_long_dark_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on dark backgrounds.");
+ fll_program_print_help_option(file, context, f_console_standard_short_light_s, f_console_standard_long_light_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on light backgrounds.");
+ fll_program_print_help_option(file, context, f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, "Do not file in color.");
+ fll_program_print_help_option(file, context, f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Decrease verbosity beyond normal file.");
+ fll_program_print_help_option(file, context, f_console_standard_short_normal_s, f_console_standard_long_normal_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Set verbosity to normal file.");
+ fll_program_print_help_option(file, context, f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Increase verbosity beyond normal file.");
+ fll_program_print_help_option(file, context, f_console_standard_short_debug_s, f_console_standard_long_debug_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Enable debugging, inceasing verbosity beyond normal file.");
+ fll_program_print_help_option(file, context, f_console_standard_short_version_s, f_console_standard_long_version_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Print only the version number.");
- f_print_character(f_string_eol_s[0], output.stream);
+ f_print_character(f_string_eol_s[0], file.stream);
- fll_program_print_help_option(output, context, fss_extended_list_read_short_at, fss_extended_list_read_long_at, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " 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_s, f_console_symbol_long_enable_s, " Print the Content (default).");
- fll_program_print_help_option(output, context, fss_extended_list_read_short_columns, fss_extended_list_read_long_columns, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the total number of columns.");
- fll_program_print_help_option(output, context, fss_extended_list_read_short_delimit, fss_extended_list_read_long_delimit, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Designate how to handle applying delimits.");
- fll_program_print_help_option(output, context, fss_extended_list_read_short_depth, fss_extended_list_read_long_depth, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select Object at this numeric depth.");
- fll_program_print_help_option(output, context, fss_extended_list_read_short_empty, fss_extended_list_read_long_empty, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Include empty Content when processing.");
- fll_program_print_help_option(output, context, fss_extended_list_read_short_line, fss_extended_list_read_long_line, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print only the Content at the given line.");
- fll_program_print_help_option(output, context, fss_extended_list_read_short_name, fss_extended_list_read_long_name, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select Object with this name.");
- fll_program_print_help_option(output, context, fss_extended_list_read_short_object, fss_extended_list_read_long_object, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the Object.");
- fll_program_print_help_option(output, context, fss_extended_list_read_short_pipe, fss_extended_list_read_long_pipe, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print using the special pipe format.");
- fll_program_print_help_option(output, context, fss_extended_list_read_short_raw, fss_extended_list_read_long_raw, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print with the original quotes and escapes.");
- fll_program_print_help_option(output, context, fss_extended_list_read_short_select, fss_extended_list_read_long_select, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select sub-Content at this index.");
- fll_program_print_help_option(output, context, fss_extended_list_read_short_total, fss_extended_list_read_long_total, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the total number of lines.");
- fll_program_print_help_option(output, context, fss_extended_list_read_short_trim, fss_extended_list_read_long_trim, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Trim Object names on select or print.");
+ fll_program_print_help_option(file, context, fss_extended_list_read_short_at, fss_extended_list_read_long_at, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select Object at this numeric index.");
+ fll_program_print_help_option(file, context, fss_extended_list_read_short_content, fss_extended_list_read_long_content, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the Content (default).");
+ fll_program_print_help_option(file, context, fss_extended_list_read_short_columns, fss_extended_list_read_long_columns, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the total number of columns.");
+ fll_program_print_help_option(file, context, fss_extended_list_read_short_delimit, fss_extended_list_read_long_delimit, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Designate how to handle applying delimits.");
+ fll_program_print_help_option(file, context, fss_extended_list_read_short_depth, fss_extended_list_read_long_depth, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select Object at this numeric depth.");
+ fll_program_print_help_option(file, context, fss_extended_list_read_short_empty, fss_extended_list_read_long_empty, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Include empty Content when processing.");
+ fll_program_print_help_option(file, context, fss_extended_list_read_short_line, fss_extended_list_read_long_line, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print only the Content at the given line.");
+ fll_program_print_help_option(file, context, fss_extended_list_read_short_name, fss_extended_list_read_long_name, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select Object with this name.");
+ fll_program_print_help_option(file, context, fss_extended_list_read_short_object, fss_extended_list_read_long_object, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the Object.");
+ fll_program_print_help_option(file, context, fss_extended_list_read_short_pipe, fss_extended_list_read_long_pipe, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print using the special pipe format.");
+ fll_program_print_help_option(file, context, fss_extended_list_read_short_raw, fss_extended_list_read_long_raw, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print with the original quotes and escapes.");
+ fll_program_print_help_option(file, context, fss_extended_list_read_short_select, fss_extended_list_read_long_select, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select sub-Content at this index.");
+ fll_program_print_help_option(file, context, fss_extended_list_read_short_total, fss_extended_list_read_long_total, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the total number of lines.");
+ fll_program_print_help_option(file, context, fss_extended_list_read_short_trim, fss_extended_list_read_long_trim, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Trim Object names on select or print.");
- fll_program_print_help_usage(output, context, fss_extended_list_read_name, "filename(s)");
+ fll_program_print_help_usage(file, context, fss_extended_list_read_name, "filename(s)");
- fl_print_format(" %[Notes:%]%c", output.stream, context.set.important, context.set.important, f_string_eol_s[0]);
+ fl_print_format(" %[Notes:%]%c", file.stream, context.set.important, context.set.important, f_string_eol_s[0]);
- fl_print_format(" This program will print the Content associated with the given Object and Content main based on the FSS-0003 Extended List standard.%c%c", output.stream, f_string_eol_s[0], f_string_eol_s[0]);
+ fl_print_format(" This program will print the Content associated with the given Object and Content main based on the FSS-0003 Extended List standard.%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]);
- fl_print_format(" All numeric positions (indexes) start at 0 instead of 1.%c", output.stream, f_string_eol_s[0]);
- fl_print_format(" For example, a file of 17 lines would range from 0 to 16.%c%c", output.stream, f_string_eol_s[0], f_string_eol_s[0]);
+ fl_print_format(" All numeric positions (indexes) start at 0 instead of 1.%c", file.stream, f_string_eol_s[0]);
+ fl_print_format(" For example, a file of 17 lines would range from 0 to 16.%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]);
- fl_print_format(" When using the %[%s%s%] option, an order of operations is enforced on the parameters.%c", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_depth, context.set.notable, f_string_eol_s[0]);
+ fl_print_format(" When using the %[%s%s%] option, an order of operations is enforced on the parameters.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_depth, context.set.notable, f_string_eol_s[0]);
- fl_print_format(" When this order of operations is in effect, parameters to the right of a depth parameter are influenced by that depth parameter:%c", output.stream, f_string_eol_s[0]);
+ fl_print_format(" When this order of operations is in effect, parameters to the right of a depth parameter are influenced by that depth parameter:%c", file.stream, f_string_eol_s[0]);
- fl_print_format(" %[%s%s%]: An Object index at the specified depth.%c", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_at, context.set.notable, f_string_eol_s[0]);
- fl_print_format(" %[%s%s%]: A new depth within the specified depth, indexed from the root.%c", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_depth, context.set.notable, f_string_eol_s[0]);
- fl_print_format(" %[%s%s%]: An Object name at the specified depth.%c%c", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_name, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]);
+ fl_print_format(" %[%s%s%]: An Object index at the specified depth.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_at, context.set.notable, f_string_eol_s[0]);
+ fl_print_format(" %[%s%s%]: A new depth within the specified depth, indexed from the root.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_depth, context.set.notable, f_string_eol_s[0]);
+ fl_print_format(" %[%s%s%]: An Object name at the specified depth.%c%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_name, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]);
- fl_print_format(" The parameter %[%s%s%] must be in numeric order, but values in between may be skipped.%c", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_depth, context.set.notable, f_string_eol_s[0]);
- fl_print_format(" ('-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", output.stream, f_string_eol_s[0]);
- fl_print_format(" ('-d 2 -a 1 -d 0 -a 2' would be invalid because depth 2 is before depth 1.)%c%c", output.stream, f_string_eol_s[0], f_string_eol_s[0]);
+ fl_print_format(" The parameter %[%s%s%] must be in numeric order, but values in between may be skipped.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_depth, context.set.notable, f_string_eol_s[0]);
+ fl_print_format(" ('-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", file.stream, f_string_eol_s[0]);
+ fl_print_format(" ('-d 2 -a 1 -d 0 -a 2' would be invalid because depth 2 is before depth 1.)%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]);
- fl_print_format(" The parameter %[%s%s%] selects a Content column.%c%c", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_select, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]);
+ fl_print_format(" The parameter %[%s%s%] selects a Content column.%c%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_select, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]);
- fl_print_format(" Specify both %[%s%s%]", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_object, context.set.notable);
- fl_print_format(" and the %[%s%s%] parameters to get the total objects.%c%c", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_total, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]);
+ fl_print_format(" Specify both %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_object, context.set.notable);
+ fl_print_format(" and the %[%s%s%] parameters to get the total objects.%c%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_total, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]);
- fl_print_format(" When both %[%s%s%]", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_at, context.set.notable);
- fl_print_format(" and %[%s%s%] parameters are specified (at the same depth),", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_name, context.set.notable);
- fl_print_format(" the %[%s%s%] parameter value will be treated as a position relative to the specified", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_at, context.set.notable);
- fl_print_format(" %[%s%s%] parameter value.%c%c", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_name, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]);
+ fl_print_format(" When both %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_at, context.set.notable);
+ fl_print_format(" and %[%s%s%] parameters are specified (at the same depth),", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_name, context.set.notable);
+ fl_print_format(" the %[%s%s%] parameter value will be treated as a position relative to the specified", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_at, context.set.notable);
+ fl_print_format(" %[%s%s%] parameter value.%c%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_name, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]);
- fl_print_format(" This program may support parameters, such as %[%s%s%]", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_depth, context.set.notable);
- fl_print_format(" or %[%s%s%], even if not supported by the standard.%c", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_select, context.set.notable, f_string_eol_s[0]);
- fl_print_format(" This is done to help ensure consistency for scripting.%c%c", output.stream, f_string_eol_s[0], f_string_eol_s[0]);
+ fl_print_format(" This program may support parameters, such as %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_depth, context.set.notable);
+ fl_print_format(" or %[%s%s%], even if not supported by the standard.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_select, context.set.notable, f_string_eol_s[0]);
+ fl_print_format(" This is done to help ensure consistency for scripting.%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]);
- fl_print_format(" For parameters like %[%s%s%],", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_depth, context.set.notable);
- fl_print_format(" if the standard doesn't support nested Content, then only a depth of 0 would be valid.%c", output.stream, f_string_eol_s[0]);
+ fl_print_format(" For parameters like %[%s%s%],", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_depth, context.set.notable);
+ fl_print_format(" if the standard doesn't support nested Content, then only a depth of 0 would be valid.%c", file.stream, f_string_eol_s[0]);
- fl_print_format(" For parameters like %[%s%s%],", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_select, context.set.notable);
- fl_print_format(" if the standard doesn't support multiple Content groups, then only a select of 0 would be valid.%c%c", output.stream, f_string_eol_s[0], f_string_eol_s[0]);
+ fl_print_format(" For parameters like %[%s%s%],", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_select, context.set.notable);
+ fl_print_format(" if the standard doesn't support multiple Content groups, then only a select of 0 would be valid.%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]);
- fl_print_format(" The parameter %[%s%s%]", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_trim, context.set.notable);
- fl_print_format(" will remove leading and trailing whitespaces when selecting objects or when printing objects.%c%c", output.stream, f_string_eol_s[0], f_string_eol_s[0]);
+ fl_print_format(" The parameter %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_trim, context.set.notable);
+ fl_print_format(" will remove leading and trailing whitespaces when selecting objects or when printing objects.%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]);
- fl_print_format(" When specifying both the %[%s%s%]", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_object, context.set.notable);
- fl_print_format(" parameter and the %[%s%s%] parameter, the entire Object and Content are printed, including the formatting.%c", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_content, context.set.notable, f_string_eol_s[0]);
- fl_print_format(" Both the Object and Content printed are already escaped.%c", output.stream, f_string_eol_s[0]);
- fl_print_format(" Both the Object and Content are separated by an EOL.%c%c", output.stream, f_string_eol_s[0], f_string_eol_s[0]);
+ fl_print_format(" When specifying both the %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_object, context.set.notable);
+ fl_print_format(" parameter and the %[%s%s%] parameter, the entire Object and Content are printed, including the formatting.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_content, context.set.notable, f_string_eol_s[0]);
+ fl_print_format(" Both the Object and Content printed are already escaped.%c", file.stream, f_string_eol_s[0]);
+ fl_print_format(" Both the Object and Content are separated by an EOL.%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]);
- fl_print_format(" The parameter %[%s%s%] accepts the following:%c", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_delimit, context.set.notable, f_string_eol_s[0]);
- fl_print_format(" - %[%s%]: Do not apply delimits.%c", output.stream, context.set.notable, fss_extended_list_read_delimit_mode_name_none, context.set.notable, f_string_eol_s[0]);
- fl_print_format(" - %[%s%]: (default) Apply all delimits.%c", output.stream, context.set.notable, fss_extended_list_read_delimit_mode_name_all, context.set.notable, f_string_eol_s[0]);
- fl_print_format(" - %[%s%]: Apply delimits for Objects.%c", output.stream, context.set.notable, fss_extended_list_read_delimit_mode_name_object, context.set.notable, f_string_eol_s[0]);
- fl_print_format(" - A number, 0 or greater: apply delimits for Content at the specified depth.%c", output.stream, f_string_eol_s[0]);
- fl_print_format(" - A number, 0 or greater, followed by a %[%s%]: (such as '1+') apply delimits for Content at the specified depth and any greater depth (numerically).%c", output.stream, context.set.notable, fss_extended_list_read_delimit_mode_name_greater, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]);
- fl_print_format(" - A number, 0 or lesser, followed by a %[%s%]: (such as '1-') apply delimits for Content at the specified depth and any lesser depth (numerically).%c%c", output.stream, context.set.notable, fss_extended_list_read_delimit_mode_name_lesser, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]);
+ fl_print_format(" The parameter %[%s%s%] accepts the following:%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_delimit, context.set.notable, f_string_eol_s[0]);
+ fl_print_format(" - %[%s%]: Do not apply delimits.%c", file.stream, context.set.notable, fss_extended_list_read_delimit_mode_name_none, context.set.notable, f_string_eol_s[0]);
+ fl_print_format(" - %[%s%]: (default) Apply all delimits.%c", file.stream, context.set.notable, fss_extended_list_read_delimit_mode_name_all, context.set.notable, f_string_eol_s[0]);
+ fl_print_format(" - %[%s%]: Apply delimits for Objects.%c", file.stream, context.set.notable, fss_extended_list_read_delimit_mode_name_object, context.set.notable, f_string_eol_s[0]);
+ fl_print_format(" - A number, 0 or greater: apply delimits for Content at the specified depth.%c", file.stream, f_string_eol_s[0]);
+ fl_print_format(" - A number, 0 or greater, followed by a %[%s%]: (such as '1+') apply delimits for Content at the specified depth and any greater depth (numerically).%c", file.stream, context.set.notable, fss_extended_list_read_delimit_mode_name_greater, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]);
+ fl_print_format(" - A number, 0 or lesser, followed by a %[%s%]: (such as '1-') apply delimits for Content at the specified depth and any lesser depth (numerically).%c%c", file.stream, context.set.notable, fss_extended_list_read_delimit_mode_name_lesser, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]);
- fl_print_format(" The %[%s%s%] parameter may be specified multiple times to customize the delimit behavior.%c", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_delimit, context.set.notable, f_string_eol_s[0]);
+ fl_print_format(" The %[%s%s%] parameter may be specified multiple times to customize the delimit behavior.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_delimit, context.set.notable, f_string_eol_s[0]);
- fl_print_format(" The %[%s%s%]", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_delimit, context.set.notable);
- fl_print_format(" values %[%s%]", output.stream, context.set.notable, fss_extended_list_read_delimit_mode_name_none, context.set.notable);
- fl_print_format(" and %[%s%],", output.stream, context.set.notable, fss_extended_list_read_delimit_mode_name_all, context.set.notable);
- fl_print_format(" overrule all other delimit values.%c%c", output.stream, f_string_eol_s[0], f_string_eol_s[0]);
+ fl_print_format(" The %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_delimit, context.set.notable);
+ fl_print_format(" values %[%s%]", file.stream, context.set.notable, fss_extended_list_read_delimit_mode_name_none, context.set.notable);
+ fl_print_format(" and %[%s%],", file.stream, context.set.notable, fss_extended_list_read_delimit_mode_name_all, context.set.notable);
+ fl_print_format(" overrule all other delimit values.%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]);
- fl_print_format(" The parameters %[%s%s%]", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_columns, context.set.notable);
- fl_print_format(" and %[%s%s%]", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_select, context.set.notable);
- fl_print_format(" refer to a Content column.%c", output.stream, f_string_eol_s[0]);
- fl_print_format(" The word \"column\" is being loosely defined to refer to a specific Content.%c", output.stream, f_string_eol_s[0]);
- fl_print_format(" This is not to be confused with a depth.%c%c", output.stream, f_string_eol_s[0], f_string_eol_s[0]);
+ fl_print_format(" The parameters %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_columns, context.set.notable);
+ fl_print_format(" and %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_list_read_long_select, context.set.notable);
+ fl_print_format(" refer to a Content column.%c", file.stream, f_string_eol_s[0]);
+ fl_print_format(" The word \"column\" is being loosely defined to refer to a specific Content.%c", file.stream, f_string_eol_s[0]);
+ fl_print_format(" This is not to be confused with a depth.%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]);
- funlockfile(output.stream);
+ funlockfile(file.stream);
return F_none;
}
}
if (choice == fss_extended_list_read_parameter_verbosity_quiet) {
+ main->output.verbosity = f_console_verbosity_quiet;
main->error.verbosity = f_console_verbosity_quiet;
main->warning.verbosity = f_console_verbosity_quiet;
}
else if (choice == fss_extended_list_read_parameter_verbosity_normal) {
+ main->output.verbosity = f_console_verbosity_normal;
main->error.verbosity = f_console_verbosity_normal;
main->warning.verbosity = f_console_verbosity_normal;
}
else if (choice == fss_extended_list_read_parameter_verbosity_verbose) {
+ main->output.verbosity = f_console_verbosity_verbose;
main->error.verbosity = f_console_verbosity_verbose;
main->warning.verbosity = f_console_verbosity_verbose;
}
else if (choice == fss_extended_list_read_parameter_verbosity_debug) {
+ main->output.verbosity = f_console_verbosity_debug;
main->error.verbosity = f_console_verbosity_debug;
main->warning.verbosity = f_console_verbosity_debug;
}
}
if (main->parameters[fss_extended_list_read_parameter_help].result == f_console_result_found) {
- fss_extended_list_read_print_help(main->output, main->context);
+ fss_extended_list_read_print_help(main->output.to, main->context);
fss_extended_list_read_main_delete(main);
return status;
}
if (main->parameters[fss_extended_list_read_parameter_version].result == f_console_result_found) {
- fll_program_print_version(main->output, fss_extended_list_read_version);
+ fll_program_print_version(main->output.to, fss_extended_list_read_version);
fss_extended_list_read_main_delete(main);
return status;
f_array_lengths_t remaining;
bool process_pipe;
- f_file_t output;
+ fl_print_t output;
fl_print_t error;
fl_print_t warning;
fss_extended_list_read_console_parameter_t_initialize, \
f_array_lengths_t_initialize, \
F_false, \
- macro_f_file_t_initialize2(f_type_output, f_type_descriptor_output, f_file_flag_write_only), \
fl_print_t_initialize, \
+ macro_fl_print_t_initialize_error(), \
macro_fl_print_t_initialize_warning(), \
f_color_context_t_initialize, \
}
/**
* Print help.
*
- * @param output
+ * @param file
* The file to print to.
* @param context
* The color context settings.
* F_none on success.
*/
#ifndef _di_fss_extended_list_read_print_help_
- extern f_status_t fss_extended_list_read_print_help(const f_file_t output, const f_color_context_t context);
+ extern f_status_t fss_extended_list_read_print_help(const f_file_t file, const f_color_context_t context);
#endif // _di_fss_extended_list_read_print_help_
/**
}
if ((data->option & fss_extended_list_read_data_option_object) || ((data->option & fss_extended_list_read_data_option_content) && (data->contents.array[at].used && data->contents.array[at].array[0].start <= data->contents.array[at].array[0].stop || (data->option & fss_extended_list_read_data_option_empty)))) {
- flockfile(main->output.stream);
+ flockfile(main->output.to.stream);
if (data->option & fss_extended_list_read_data_option_object) {
if (data->option & fss_extended_list_read_data_option_trim) {
- fl_print_trim_except_dynamic_partial(data->buffer, data->objects.array[at], delimits_object, main->output.stream);
+ fl_print_trim_except_dynamic_partial(data->buffer, data->objects.array[at], delimits_object, main->output.to.stream);
}
else {
- f_print_except_dynamic_partial(data->buffer, data->objects.array[at], delimits_object, main->output.stream);
+ f_print_except_dynamic_partial(data->buffer, data->objects.array[at], delimits_object, main->output.to.stream);
}
fss_extended_list_read_print_object_end(main, data);
if (data->contents.array[at].used && data->contents.array[at].array[0].start <= data->contents.array[at].array[0].stop) {
fss_extended_list_read_print_content_ignore(main);
- f_print_except_in_dynamic_partial(data->buffer, data->contents.array[at].array[0], delimits_content, data->comments, main->output.stream);
+ f_print_except_in_dynamic_partial(data->buffer, data->contents.array[at].array[0], delimits_content, data->comments, main->output.to.stream);
fss_extended_list_read_print_content_ignore(main);
}
fss_extended_list_read_print_set_end(main, data);
- funlockfile(main->output.stream);
+ funlockfile(main->output.to.stream);
}
}
#endif // _di_fss_extended_list_read_print_at_
}
if (data->option & fss_extended_list_read_data_option_trim) {
- fl_print_trim_except_dynamic_partial(data->buffer, data->objects.array[at], delimits_object, main->output.stream);
+ fl_print_trim_except_dynamic_partial(data->buffer, data->objects.array[at], delimits_object, main->output.to.stream);
}
else {
- f_print_except_dynamic_partial(data->buffer, data->objects.array[at], delimits_object, main->output.stream);
+ f_print_except_dynamic_partial(data->buffer, data->objects.array[at], delimits_object, main->output.to.stream);
}
fss_extended_list_read_print_object_end(main, data);
void fss_extended_list_read_print_content_ignore(fss_extended_list_read_main_t * const main) {
if (main->parameters[fss_extended_list_read_parameter_pipe].result == f_console_result_found) {
- f_print_character(fss_extended_list_read_pipe_content_ignore, main->output.stream);
+ f_print_character(fss_extended_list_read_pipe_content_ignore, main->output.to.stream);
}
}
#endif // _di_fss_extended_list_read_print_content_ignore_
void fss_extended_list_read_print_object_end(fss_extended_list_read_main_t * const main, fss_extended_list_read_data_t * const data) {
if (main->parameters[fss_extended_list_read_parameter_pipe].result == f_console_result_found) {
- f_print_character(fss_extended_list_read_pipe_content_start, main->output.stream);
+ f_print_character(fss_extended_list_read_pipe_content_start, main->output.to.stream);
}
else {
if ((data->option & fss_extended_list_read_data_option_object) && (data->option & fss_extended_list_read_data_option_content)) {
- f_print_character(f_fss_extended_list_open, main->output.stream);
- f_print_character(f_fss_extended_list_open_end, main->output.stream);
+ f_print_character(f_fss_extended_list_open, main->output.to.stream);
+ f_print_character(f_fss_extended_list_open_end, main->output.to.stream);
}
}
}
void fss_extended_list_read_print_set_end(fss_extended_list_read_main_t * const main, fss_extended_list_read_data_t * const data) {
if (main->parameters[fss_extended_list_read_parameter_pipe].result == f_console_result_found) {
- f_print_character(fss_extended_list_read_pipe_content_end, main->output.stream);
+ f_print_character(fss_extended_list_read_pipe_content_end, main->output.to.stream);
}
else {
if (data->option & fss_extended_list_read_data_option_object) {
if (data->option & fss_extended_list_read_data_option_content) {
- f_print_character(f_fss_extended_list_close, main->output.stream);
- f_print_character(f_fss_extended_list_close_end, main->output.stream);
+ f_print_character(f_fss_extended_list_close, main->output.to.stream);
+ f_print_character(f_fss_extended_list_close_end, main->output.to.stream);
}
else if (!(data->option & fss_extended_list_read_data_option_content)) {
- f_print_character(f_fss_eol, main->output.stream);
+ f_print_character(f_fss_eol, main->output.to.stream);
}
}
}
#ifndef _di_fss_extended_list_read_print_one_
void fss_extended_list_read_print_one(fss_extended_list_read_main_t * const main) {
- f_print_character(f_string_ascii_1_s[0], main->output.stream);
- f_print_character(f_string_eol_s[0], main->output.stream);
+ f_print_character(f_string_ascii_1_s[0], main->output.to.stream);
+ f_print_character(f_string_eol_s[0], main->output.to.stream);
}
#endif // _di_fss_extended_list_read_print_one_
#ifndef _di_fss_extended_list_read_print_zero_
void fss_extended_list_read_print_zero(fss_extended_list_read_main_t * const main) {
- f_print_character(f_string_ascii_0_s[0], main->output.stream);
- f_print_character(f_string_eol_s[0], main->output.stream);
+ f_print_character(f_string_ascii_0_s[0], main->output.to.stream);
+ f_print_character(f_string_eol_s[0], main->output.to.stream);
}
#endif // _di_fss_extended_list_read_print_zero_
if (data->depths.array[0].value_at >= data->objects.used) {
if (data->option & (fss_extended_list_read_data_option_columns | fss_extended_list_read_data_option_total)) {
- flockfile(main->output.stream);
+ flockfile(main->output.to.stream);
fss_extended_list_read_print_zero(main);
- funlockfile(main->output.stream);
+ funlockfile(main->output.to.stream);
}
return F_none;
if (status == F_success) return F_none;
}
else if (data->option & fss_extended_list_read_data_option_columns) {
- fll_print_format("%ul%c", main->output.stream, data->contents.array[i].used, f_string_eol_s[0]);
+ fll_print_format("%ul%c", main->output.to.stream, data->contents.array[i].used, f_string_eol_s[0]);
}
else if (data->option & fss_extended_list_read_data_option_total) {
if ((data->option & fss_extended_list_read_data_option_object) && !(data->option & fss_extended_list_read_data_option_content)) {
- flockfile(main->output.stream);
+ flockfile(main->output.to.stream);
if (data->contents.array[i].used) {
fss_extended_list_read_print_one(main);
fss_extended_list_read_print_zero(main);
}
- funlockfile(main->output.stream);
+ funlockfile(main->output.to.stream);
}
else {
f_array_length_t total = 0;
}
} // for
- fll_print_format("%ul%c", main->output.stream, total, f_string_eol_s[0]);
+ fll_print_format("%ul%c", main->output.to.stream, total, f_string_eol_s[0]);
}
}
else {
} // for
if (data->option & fss_extended_list_read_data_option_total) {
- flockfile(main->output.stream);
+ flockfile(main->output.to.stream);
fss_extended_list_read_print_zero(main);
- funlockfile(main->output.stream);
+ funlockfile(main->output.to.stream);
}
return F_none;
f_status_t fss_extended_list_read_process_columns(fss_extended_list_read_main_t * const main, fss_extended_list_read_data_t *data, bool names[]) {
if (!(data->option & fss_extended_list_read_data_option_content)) {
- flockfile(main->output.stream);
+ flockfile(main->output.to.stream);
fss_extended_list_read_print_zero(main);
- funlockfile(main->output.stream);
+ funlockfile(main->output.to.stream);
return F_none;
}
}
} // for
- fll_print_format("%ul%c", main->output.stream, max, f_string_eol_s[0]);
+ fll_print_format("%ul%c", main->output.to.stream, max, f_string_eol_s[0]);
return F_none;
}
if (data->option & fss_extended_list_read_data_option_object) {
if (*line == data->line) {
- flockfile(main->output.stream);
+ flockfile(main->output.to.stream);
if (data->option & fss_extended_list_read_data_option_total) {
fss_extended_list_read_print_one(main);
fss_extended_list_read_print_at_object(main, data, at, delimits_object);
}
- funlockfile(main->output.stream);
+ funlockfile(main->output.to.stream);
return F_success;
}
if (*line == data->line) {
range.stop = i;
- flockfile(main->output.stream);
+ flockfile(main->output.to.stream);
if (data->option & fss_extended_list_read_data_option_total) {
fss_extended_list_read_print_one(main);
}
else {
- f_print_except_in_dynamic_partial(data->buffer, range, delimits_content, data->comments, main->output.stream);
+ f_print_except_in_dynamic_partial(data->buffer, range, delimits_content, data->comments, main->output.to.stream);
}
- funlockfile(main->output.stream);
+ funlockfile(main->output.to.stream);
return F_success;
}
++(*line);
if (*line == data->line) {
- flockfile(main->output.stream);
+ flockfile(main->output.to.stream);
if (data->option & fss_extended_list_read_data_option_total) {
fss_extended_list_read_print_one(main);
else {
range.stop = data->contents.array[at].array[0].stop;
- f_print_except_in_dynamic_partial(data->buffer, range, delimits_content, data->comments, main->output.stream);
- f_print_character(f_string_eol_s[0], main->output.stream);
+ f_print_except_in_dynamic_partial(data->buffer, range, delimits_content, data->comments, main->output.to.stream);
+ f_print_character(f_string_eol_s[0], main->output.to.stream);
}
- funlockfile(main->output.stream);
+ funlockfile(main->output.to.stream);
return F_success;
}
}
} // for
- flockfile(main->output.stream);
+ flockfile(main->output.to.stream);
if (data->option & fss_extended_list_read_data_option_line) {
if (data->line < total) {
}
}
else {
- fl_print_format("%ul%c", main->output.stream, total, f_string_eol_s[0]);
+ fl_print_format("%ul%c", main->output.to.stream, total, f_string_eol_s[0]);
}
- funlockfile(main->output.stream);
+ funlockfile(main->output.to.stream);
return F_none;
}
#endif
#ifndef _di_fss_extended_list_write_print_help_
- f_status_t fss_extended_list_write_print_help(const f_file_t output, const f_color_context_t context) {
-
- flockfile(output.stream);
-
- fll_program_print_help_header(output, context, fss_extended_list_write_name_long, fss_extended_list_write_version);
-
- fll_program_print_help_option(output, context, f_console_standard_short_help_s, f_console_standard_long_help_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print this help message.");
- fll_program_print_help_option(output, context, f_console_standard_short_dark_s, f_console_standard_long_dark_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on dark backgrounds.");
- fll_program_print_help_option(output, context, f_console_standard_short_light_s, f_console_standard_long_light_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on light backgrounds.");
- fll_program_print_help_option(output, context, f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, "Do not output in color.");
- fll_program_print_help_option(output, context, f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Decrease verbosity beyond normal output.");
- fll_program_print_help_option(output, context, f_console_standard_short_normal_s, f_console_standard_long_normal_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Set verbosity to normal output.");
- fll_program_print_help_option(output, context, f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Increase verbosity beyond normal output.");
- fll_program_print_help_option(output, context, f_console_standard_short_debug_s, f_console_standard_long_debug_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Enable debugging, inceasing verbosity beyond normal output.");
- fll_program_print_help_option(output, context, f_console_standard_short_version_s, f_console_standard_long_version_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Print only the version number.");
-
- f_print_character(f_string_eol_s[0], output.stream);
-
- fll_program_print_help_option(output, context, fss_extended_list_write_short_file, fss_extended_list_write_long_file, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " 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_s, f_console_symbol_long_enable_s, "The Content to output.");
- fll_program_print_help_option(output, context, fss_extended_list_write_short_double, fss_extended_list_write_long_double, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Use double quotes (default).");
- fll_program_print_help_option(output, context, fss_extended_list_write_short_ignore, fss_extended_list_write_long_ignore, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Ignore a given range within a Content.");
- fll_program_print_help_option(output, context, fss_extended_list_write_short_object, fss_extended_list_write_long_object, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " The Object to output.");
- fll_program_print_help_option(output, context, fss_extended_list_write_short_partial, fss_extended_list_write_long_partial, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Do not output end of Object/Content character.");
- fll_program_print_help_option(output, context, fss_extended_list_write_short_prepend, fss_extended_list_write_long_prepend, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Prepend the given whitespace characters to the start of each multi-line Content.");
- fll_program_print_help_option(output, context, fss_extended_list_write_short_single, fss_extended_list_write_long_single, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Use single quotes.");
- fll_program_print_help_option(output, context, fss_extended_list_write_short_trim, fss_extended_list_write_long_trim, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Trim Object names.");
-
- fll_program_print_help_usage(output, context, fss_extended_list_write_name, f_string_empty_s);
-
- fl_print_format(" The pipe uses the Backspace character '%[\\b%]' (%[U+0008%]) to designate the start of a Content.%c", output.stream, context.set.notable, context.set.notable, context.set.notable, context.set.notable, f_string_eol_s[0]);
- fl_print_format(" The pipe uses the Form Feed character '%[\\f%]' (%[U+000C%]) to designate the end of the last Content.%c", output.stream, context.set.notable, context.set.notable, context.set.notable, context.set.notable, f_string_eol_s[0]);
- fl_print_format(" The pipe uses the Vertical Line character '%[\\v%]' (%[U+000B%]) is used to ignore a Content range (use this both before and after the range).%c", output.stream, context.set.notable, context.set.notable, context.set.notable, context.set.notable, f_string_eol_s[0]);
- fl_print_format(" For the pipe, an Object is terminated by either a Backspace character '%[\\b%]' (%[U+0008%])", output.stream, context.set.notable, context.set.notable, context.set.notable, context.set.notable);
- fl_print_format(" or a Form Feed character '%[\\f%]' (%[U+000C%]).%c", output.stream, context.set.notable, context.set.notable, context.set.notable, context.set.notable, f_string_eol_s[0]);
- fl_print_format(" The end of the pipe represents the end of any Object or Content.%c%c", output.stream, f_string_eol_s[0], f_string_eol_s[0]);
-
- fl_print_format(" The FSS-0003 (Extended List) specification does not support quoted names, therefore the parameters '%[%s%s%]'", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_list_write_long_single, context.set.notable);
- fl_print_format(" and '%[%s%s%]' do nothing.%c%c", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_list_write_long_double, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]);
-
- fl_print_format(" The parameter '%[%s%s%]' designates to not escape any valid nested Object or Content within some Content.%c", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_list_write_long_ignore, context.set.notable, f_string_eol_s[0]);
- fl_print_format(" This parameter requires two values.%c", output.stream, f_string_eol_s[0]);
- fl_print_format(" This parameter is not used for ignoring anything from the input pipe.%c", output.stream, f_string_eol_s[0]);
- fl_print_format(" This parameter must be specified after a '%[%s%s%]'", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_list_write_long_content, context.set.notable);
- fl_print_format(" parameter and this applies only to the Content represented by that specific '%[%s%s%]' parameter.%c%c", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_list_write_long_content, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]);
-
- funlockfile(output.stream);
+ f_status_t fss_extended_list_write_print_help(const f_file_t file, const f_color_context_t context) {
+
+ flockfile(file.stream);
+
+ fll_program_print_help_header(file, context, fss_extended_list_write_name_long, fss_extended_list_write_version);
+
+ fll_program_print_help_option(file, context, f_console_standard_short_help_s, f_console_standard_long_help_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print this help message.");
+ fll_program_print_help_option(file, context, f_console_standard_short_dark_s, f_console_standard_long_dark_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on dark backgrounds.");
+ fll_program_print_help_option(file, context, f_console_standard_short_light_s, f_console_standard_long_light_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on light backgrounds.");
+ fll_program_print_help_option(file, context, f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, "Do not file in color.");
+ fll_program_print_help_option(file, context, f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Decrease verbosity beyond normal file.");
+ fll_program_print_help_option(file, context, f_console_standard_short_normal_s, f_console_standard_long_normal_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Set verbosity to normal file.");
+ fll_program_print_help_option(file, context, f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Increase verbosity beyond normal file.");
+ fll_program_print_help_option(file, context, f_console_standard_short_debug_s, f_console_standard_long_debug_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Enable debugging, inceasing verbosity beyond normal file.");
+ fll_program_print_help_option(file, context, f_console_standard_short_version_s, f_console_standard_long_version_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Print only the version number.");
+
+ f_print_character(f_string_eol_s[0], file.stream);
+
+ fll_program_print_help_option(file, context, fss_extended_list_write_short_file, fss_extended_list_write_long_file, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Specify a file to send file to.");
+ fll_program_print_help_option(file, context, fss_extended_list_write_short_content, fss_extended_list_write_long_content, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "The Content to file.");
+ fll_program_print_help_option(file, context, fss_extended_list_write_short_double, fss_extended_list_write_long_double, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Use double quotes (default).");
+ fll_program_print_help_option(file, context, fss_extended_list_write_short_ignore, fss_extended_list_write_long_ignore, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Ignore a given range within a Content.");
+ fll_program_print_help_option(file, context, fss_extended_list_write_short_object, fss_extended_list_write_long_object, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " The Object to file.");
+ fll_program_print_help_option(file, context, fss_extended_list_write_short_partial, fss_extended_list_write_long_partial, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Do not file end of Object/Content character.");
+ fll_program_print_help_option(file, context, fss_extended_list_write_short_prepend, fss_extended_list_write_long_prepend, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Prepend the given whitespace characters to the start of each multi-line Content.");
+ fll_program_print_help_option(file, context, fss_extended_list_write_short_single, fss_extended_list_write_long_single, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Use single quotes.");
+ fll_program_print_help_option(file, context, fss_extended_list_write_short_trim, fss_extended_list_write_long_trim, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Trim Object names.");
+
+ fll_program_print_help_usage(file, context, fss_extended_list_write_name, f_string_empty_s);
+
+ fl_print_format(" The pipe uses the Backspace character '%[\\b%]' (%[U+0008%]) to designate the start of a Content.%c", file.stream, context.set.notable, context.set.notable, context.set.notable, context.set.notable, f_string_eol_s[0]);
+ fl_print_format(" The pipe uses the Form Feed character '%[\\f%]' (%[U+000C%]) to designate the end of the last Content.%c", file.stream, context.set.notable, context.set.notable, context.set.notable, context.set.notable, f_string_eol_s[0]);
+ fl_print_format(" The pipe uses the Vertical Line character '%[\\v%]' (%[U+000B%]) is used to ignore a Content range (use this both before and after the range).%c", file.stream, context.set.notable, context.set.notable, context.set.notable, context.set.notable, f_string_eol_s[0]);
+ fl_print_format(" For the pipe, an Object is terminated by either a Backspace character '%[\\b%]' (%[U+0008%])", file.stream, context.set.notable, context.set.notable, context.set.notable, context.set.notable);
+ fl_print_format(" or a Form Feed character '%[\\f%]' (%[U+000C%]).%c", file.stream, context.set.notable, context.set.notable, context.set.notable, context.set.notable, f_string_eol_s[0]);
+ fl_print_format(" The end of the pipe represents the end of any Object or Content.%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]);
+
+ fl_print_format(" The FSS-0003 (Extended List) specification does not support quoted names, therefore the parameters '%[%s%s%]'", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_list_write_long_single, context.set.notable);
+ fl_print_format(" and '%[%s%s%]' do nothing.%c%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_list_write_long_double, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]);
+
+ fl_print_format(" The parameter '%[%s%s%]' designates to not escape any valid nested Object or Content within some Content.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_list_write_long_ignore, context.set.notable, f_string_eol_s[0]);
+ fl_print_format(" This parameter requires two values.%c", file.stream, f_string_eol_s[0]);
+ fl_print_format(" This parameter is not used for ignoring anything from the input pipe.%c", file.stream, f_string_eol_s[0]);
+ fl_print_format(" This parameter must be specified after a '%[%s%s%]'", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_list_write_long_content, context.set.notable);
+ fl_print_format(" parameter and this applies only to the Content represented by that specific '%[%s%s%]' parameter.%c%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_list_write_long_content, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]);
+
+ funlockfile(file.stream);
return F_none;
}
}
if (choice == fss_extended_list_write_parameter_verbosity_quiet) {
+ main->output.verbosity = f_console_verbosity_quiet;
main->error.verbosity = f_console_verbosity_quiet;
main->warning.verbosity = f_console_verbosity_quiet;
}
else if (choice == fss_extended_list_write_parameter_verbosity_normal) {
+ main->output.verbosity = f_console_verbosity_normal;
main->error.verbosity = f_console_verbosity_normal;
main->warning.verbosity = f_console_verbosity_normal;
}
else if (choice == fss_extended_list_write_parameter_verbosity_verbose) {
+ main->output.verbosity = f_console_verbosity_verbose;
main->error.verbosity = f_console_verbosity_verbose;
main->warning.verbosity = f_console_verbosity_verbose;
}
else if (choice == fss_extended_list_write_parameter_verbosity_debug) {
+ main->output.verbosity = f_console_verbosity_debug;
main->error.verbosity = f_console_verbosity_debug;
main->warning.verbosity = f_console_verbosity_debug;
}
}
if (main->parameters[fss_extended_list_write_parameter_help].result == f_console_result_found) {
- fss_extended_list_write_print_help(main->output, main->context);
+ fss_extended_list_write_print_help(main->output.to, main->context);
fss_extended_list_write_main_delete(main);
return status;
}
if (main->parameters[fss_extended_list_write_parameter_version].result == f_console_result_found) {
- fll_program_print_version(main->output, fss_extended_list_write_version);
+ fll_program_print_version(main->output.to, fss_extended_list_write_version);
fss_extended_list_write_main_delete(main);
return status;
f_array_lengths_t remaining;
bool process_pipe;
- f_file_t output;
+ fl_print_t output;
fl_print_t error;
fl_print_t warning;
fss_extended_list_write_console_parameter_t_initialize, \
f_array_lengths_t_initialize, \
F_false, \
- macro_f_file_t_initialize2(f_type_output, f_type_descriptor_output, f_file_flag_write_only), \
fl_print_t_initialize, \
+ macro_fl_print_t_initialize_error(), \
macro_fl_print_t_initialize_warning(), \
f_string_static_t_initialize, \
f_color_context_t_initialize, \
/**
* Print help.
*
- * @param output
+ * @param file
* The file to print to.
* @param context
* The color context settings.
* F_none on success.
*/
#ifndef _di_fss_extended_list_write_print_help_
- extern f_status_t fss_extended_list_write_print_help(const f_file_t output, const f_color_context_t context);
+ extern f_status_t fss_extended_list_write_print_help(const f_file_t file, const f_color_context_t context);
#endif // _di_fss_extended_list_write_print_help_
/**
#endif
#ifndef _di_fss_extended_read_print_help_
- f_status_t fss_extended_read_print_help(const f_file_t output, const f_color_context_t context) {
+ f_status_t fss_extended_read_print_help(const f_file_t file, const f_color_context_t context) {
- flockfile(output.stream);
+ flockfile(file.stream);
- fll_program_print_help_header(output, context, fss_extended_read_name_long, fss_extended_read_version);
+ fll_program_print_help_header(file, context, fss_extended_read_name_long, fss_extended_read_version);
- fll_program_print_help_option(output, context, f_console_standard_short_help_s, f_console_standard_long_help_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print this help message.");
- fll_program_print_help_option(output, context, f_console_standard_short_dark_s, f_console_standard_long_dark_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on dark backgrounds.");
- fll_program_print_help_option(output, context, f_console_standard_short_light_s, f_console_standard_long_light_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on light backgrounds.");
- fll_program_print_help_option(output, context, f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, "Do not output in color.");
- fll_program_print_help_option(output, context, f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Decrease verbosity beyond normal output.");
- fll_program_print_help_option(output, context, f_console_standard_short_normal_s, f_console_standard_long_normal_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Set verbosity to normal output.");
- fll_program_print_help_option(output, context, f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Increase verbosity beyond normal output.");
- fll_program_print_help_option(output, context, f_console_standard_short_debug_s, f_console_standard_long_debug_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Enable debugging, inceasing verbosity beyond normal output.");
- fll_program_print_help_option(output, context, f_console_standard_short_version_s, f_console_standard_long_version_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Print only the version number.");
+ fll_program_print_help_option(file, context, f_console_standard_short_help_s, f_console_standard_long_help_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print this help message.");
+ fll_program_print_help_option(file, context, f_console_standard_short_dark_s, f_console_standard_long_dark_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on dark backgrounds.");
+ fll_program_print_help_option(file, context, f_console_standard_short_light_s, f_console_standard_long_light_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on light backgrounds.");
+ fll_program_print_help_option(file, context, f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, "Do not file in color.");
+ fll_program_print_help_option(file, context, f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Decrease verbosity beyond normal file.");
+ fll_program_print_help_option(file, context, f_console_standard_short_normal_s, f_console_standard_long_normal_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Set verbosity to normal file.");
+ fll_program_print_help_option(file, context, f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Increase verbosity beyond normal file.");
+ fll_program_print_help_option(file, context, f_console_standard_short_debug_s, f_console_standard_long_debug_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Enable debugging, inceasing verbosity beyond normal file.");
+ fll_program_print_help_option(file, context, f_console_standard_short_version_s, f_console_standard_long_version_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Print only the version number.");
- f_print_character(f_string_eol_s[0], output.stream);
+ f_print_character(f_string_eol_s[0], file.stream);
- fll_program_print_help_option(output, context, fss_extended_read_short_at, fss_extended_read_long_at, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " 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_s, f_console_symbol_long_enable_s, " Print the Content (default).");
- fll_program_print_help_option(output, context, fss_extended_read_short_columns, fss_extended_read_long_columns, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the total number of columns.");
- fll_program_print_help_option(output, context, fss_extended_read_short_delimit, fss_extended_read_long_delimit, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Designate how to handle applying delimits.");
- fll_program_print_help_option(output, context, fss_extended_read_short_depth, fss_extended_read_long_depth, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select Object at this numeric depth.");
- fll_program_print_help_option(output, context, fss_extended_read_short_empty, fss_extended_read_long_empty, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Include empty Content when processing.");
- fll_program_print_help_option(output, context, fss_extended_read_short_line, fss_extended_read_long_line, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print only the Content at the given line.");
- fll_program_print_help_option(output, context, fss_extended_read_short_name, fss_extended_read_long_name, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select Object with this name.");
- fll_program_print_help_option(output, context, fss_extended_read_short_object, fss_extended_read_long_object, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the Object.");
- fll_program_print_help_option(output, context, fss_extended_read_short_pipe, fss_extended_read_long_pipe, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print using the special pipe format.");
- fll_program_print_help_option(output, context, fss_extended_read_short_raw, fss_extended_read_long_raw, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print with the original quotes and escapes.");
- fll_program_print_help_option(output, context, fss_extended_read_short_select, fss_extended_read_long_select, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select sub-Content at this index.");
- fll_program_print_help_option(output, context, fss_extended_read_short_total, fss_extended_read_long_total, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the total number of lines.");
- fll_program_print_help_option(output, context, fss_extended_read_short_trim, fss_extended_read_long_trim, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Trim Object names on select or print.");
+ fll_program_print_help_option(file, context, fss_extended_read_short_at, fss_extended_read_long_at, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select Object at this numeric index.");
+ fll_program_print_help_option(file, context, fss_extended_read_short_content, fss_extended_read_long_content, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the Content (default).");
+ fll_program_print_help_option(file, context, fss_extended_read_short_columns, fss_extended_read_long_columns, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the total number of columns.");
+ fll_program_print_help_option(file, context, fss_extended_read_short_delimit, fss_extended_read_long_delimit, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Designate how to handle applying delimits.");
+ fll_program_print_help_option(file, context, fss_extended_read_short_depth, fss_extended_read_long_depth, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select Object at this numeric depth.");
+ fll_program_print_help_option(file, context, fss_extended_read_short_empty, fss_extended_read_long_empty, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Include empty Content when processing.");
+ fll_program_print_help_option(file, context, fss_extended_read_short_line, fss_extended_read_long_line, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print only the Content at the given line.");
+ fll_program_print_help_option(file, context, fss_extended_read_short_name, fss_extended_read_long_name, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select Object with this name.");
+ fll_program_print_help_option(file, context, fss_extended_read_short_object, fss_extended_read_long_object, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the Object.");
+ fll_program_print_help_option(file, context, fss_extended_read_short_pipe, fss_extended_read_long_pipe, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print using the special pipe format.");
+ fll_program_print_help_option(file, context, fss_extended_read_short_raw, fss_extended_read_long_raw, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print with the original quotes and escapes.");
+ fll_program_print_help_option(file, context, fss_extended_read_short_select, fss_extended_read_long_select, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select sub-Content at this index.");
+ fll_program_print_help_option(file, context, fss_extended_read_short_total, fss_extended_read_long_total, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the total number of lines.");
+ fll_program_print_help_option(file, context, fss_extended_read_short_trim, fss_extended_read_long_trim, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Trim Object names on select or print.");
- fll_program_print_help_usage(output, context, fss_extended_read_name, "filename(s)");
+ fll_program_print_help_usage(file, context, fss_extended_read_name, "filename(s)");
- fl_print_format(" %[Notes:%]%c", output.stream, context.set.important, context.set.important, f_string_eol_s[0]);
+ fl_print_format(" %[Notes:%]%c", file.stream, context.set.important, context.set.important, f_string_eol_s[0]);
- fl_print_format(" This program will print the Content associated with the given Object and Content main based on the FSS-0001 Extended standard.%c%c", output.stream, f_string_eol_s[0], f_string_eol_s[0]);
+ fl_print_format(" This program will print the Content associated with the given Object and Content main based on the FSS-0001 Extended standard.%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]);
- fl_print_format(" All numeric positions (indexes) start at 0 instead of 1.%c", output.stream, f_string_eol_s[0]);
- fl_print_format(" For example, a file of 17 lines would range from 0 to 16.%c%c", output.stream, f_string_eol_s[0], f_string_eol_s[0]);
+ fl_print_format(" All numeric positions (indexes) start at 0 instead of 1.%c", file.stream, f_string_eol_s[0]);
+ fl_print_format(" For example, a file of 17 lines would range from 0 to 16.%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]);
- fl_print_format(" When using the %[%s%s%] option, an order of operations is enforced on the parameters.%c", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_read_long_depth, context.set.notable, f_string_eol_s[0]);
+ fl_print_format(" When using the %[%s%s%] option, an order of operations is enforced on the parameters.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_read_long_depth, context.set.notable, f_string_eol_s[0]);
- fl_print_format(" When this order of operations is in effect, parameters to the right of a depth parameter are influenced by that depth parameter:%c", output.stream, f_string_eol_s[0]);
+ fl_print_format(" When this order of operations is in effect, parameters to the right of a depth parameter are influenced by that depth parameter:%c", file.stream, f_string_eol_s[0]);
- fl_print_format(" %[%s%s%]: An Object index at the specified depth.%c", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_read_long_at, context.set.notable, f_string_eol_s[0]);
- fl_print_format(" %[%s%s%]: A new depth within the specified depth, indexed from the root.%c", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_read_long_depth, context.set.notable, f_string_eol_s[0]);
- fl_print_format(" %[%s%s%]: An Object name at the specified depth.%c%c", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_read_long_name, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]);
+ fl_print_format(" %[%s%s%]: An Object index at the specified depth.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_read_long_at, context.set.notable, f_string_eol_s[0]);
+ fl_print_format(" %[%s%s%]: A new depth within the specified depth, indexed from the root.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_read_long_depth, context.set.notable, f_string_eol_s[0]);
+ fl_print_format(" %[%s%s%]: An Object name at the specified depth.%c%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_read_long_name, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]);
- fl_print_format(" The parameter %[%s%s%] must be in numeric order, but values in between may be skipped.%c", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_read_long_depth, context.set.notable, f_string_eol_s[0]);
- fl_print_format(" ('-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", output.stream, f_string_eol_s[0]);
- fl_print_format(" ('-d 2 -a 1 -d 0 -a 2' would be invalid because depth 2 is before depth 1.)%c%c", output.stream, f_string_eol_s[0], f_string_eol_s[0]);
+ fl_print_format(" The parameter %[%s%s%] must be in numeric order, but values in between may be skipped.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_read_long_depth, context.set.notable, f_string_eol_s[0]);
+ fl_print_format(" ('-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", file.stream, f_string_eol_s[0]);
+ fl_print_format(" ('-d 2 -a 1 -d 0 -a 2' would be invalid because depth 2 is before depth 1.)%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]);
- fl_print_format(" The parameter %[%s%s%] selects a Content column.%c%c", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_read_long_select, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]);
+ fl_print_format(" The parameter %[%s%s%] selects a Content column.%c%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_read_long_select, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]);
- fl_print_format(" Specify both %[%s%s%]", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_read_long_object, context.set.notable);
- fl_print_format(" and the %[%s%s%] parameters to get the total objects.%c%c", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_read_long_total, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]);
+ fl_print_format(" Specify both %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_read_long_object, context.set.notable);
+ fl_print_format(" and the %[%s%s%] parameters to get the total objects.%c%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_read_long_total, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]);
- fl_print_format(" When both %[%s%s%]", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_read_long_at, context.set.notable);
- fl_print_format(" and %[%s%s%] parameters are specified (at the same depth),", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_read_long_name, context.set.notable);
- fl_print_format(" the %[%s%s%] parameter value will be treated as a position relative to the specified", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_read_long_at, context.set.notable);
- fl_print_format(" %[%s%s%] parameter value.%c%c", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_read_long_name, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]);
+ fl_print_format(" When both %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_read_long_at, context.set.notable);
+ fl_print_format(" and %[%s%s%] parameters are specified (at the same depth),", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_read_long_name, context.set.notable);
+ fl_print_format(" the %[%s%s%] parameter value will be treated as a position relative to the specified", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_read_long_at, context.set.notable);
+ fl_print_format(" %[%s%s%] parameter value.%c%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_read_long_name, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]);
- fl_print_format(" This program may support parameters, such as %[%s%s%]", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_read_long_depth, context.set.notable);
- fl_print_format(" or %[%s%s%], even if not supported by the standard.%c", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_read_long_select, context.set.notable, f_string_eol_s[0]);
- fl_print_format(" This is done to help ensure consistency for scripting.%c%c", output.stream, f_string_eol_s[0], f_string_eol_s[0]);
+ fl_print_format(" This program may support parameters, such as %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_read_long_depth, context.set.notable);
+ fl_print_format(" or %[%s%s%], even if not supported by the standard.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_read_long_select, context.set.notable, f_string_eol_s[0]);
+ fl_print_format(" This is done to help ensure consistency for scripting.%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]);
- fl_print_format(" For parameters like %[%s%s%],", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_read_long_depth, context.set.notable);
- fl_print_format(" if the standard doesn't support nested Content, then only a depth of 0 would be valid.%c", output.stream, f_string_eol_s[0]);
+ fl_print_format(" For parameters like %[%s%s%],", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_read_long_depth, context.set.notable);
+ fl_print_format(" if the standard doesn't support nested Content, then only a depth of 0 would be valid.%c", file.stream, f_string_eol_s[0]);
- fl_print_format(" For parameters like %[%s%s%],", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_read_long_select, context.set.notable);
- fl_print_format(" if the standard doesn't support multiple Content groups, then only a select of 0 would be valid.%c%c", output.stream, f_string_eol_s[0], f_string_eol_s[0]);
+ fl_print_format(" For parameters like %[%s%s%],", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_read_long_select, context.set.notable);
+ fl_print_format(" if the standard doesn't support multiple Content groups, then only a select of 0 would be valid.%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]);
- fl_print_format(" The parameter %[%s%s%]", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_read_long_trim, context.set.notable);
- fl_print_format(" will remove leading and trailing whitespaces when selecting objects or when printing objects.%c%c", output.stream, f_string_eol_s[0], f_string_eol_s[0]);
+ fl_print_format(" The parameter %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_read_long_trim, context.set.notable);
+ fl_print_format(" will remove leading and trailing whitespaces when selecting objects or when printing objects.%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]);
- fl_print_format(" When specifying both the %[%s%s%]", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_read_long_object, context.set.notable);
- fl_print_format(" parameter and the %[%s%s%] parameter, the entire Object and Content are printed, including the formatting.%c", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_read_long_content, context.set.notable, f_string_eol_s[0]);
- fl_print_format(" Both the Object and Content printed are already escaped.%c", output.stream, f_string_eol_s[0]);
- fl_print_format(" Both the Object and Content are separated by a space.%c%c", output.stream, f_string_eol_s[0], f_string_eol_s[0]);
+ fl_print_format(" When specifying both the %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_read_long_object, context.set.notable);
+ fl_print_format(" parameter and the %[%s%s%] parameter, the entire Object and Content are printed, including the formatting.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_read_long_content, context.set.notable, f_string_eol_s[0]);
+ fl_print_format(" Both the Object and Content printed are already escaped.%c", file.stream, f_string_eol_s[0]);
+ fl_print_format(" Both the Object and Content are separated by a space.%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]);
- fl_print_format(" The parameter %[%s%s%] accepts the following:%c", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_read_long_delimit, context.set.notable, f_string_eol_s[0]);
- fl_print_format(" - %[%s%]: Do not apply delimits.%c", output.stream, context.set.notable, fss_extended_read_delimit_mode_name_none, context.set.notable, f_string_eol_s[0]);
- fl_print_format(" - %[%s%]: (default) Apply all delimits.%c", output.stream, context.set.notable, fss_extended_read_delimit_mode_name_all, context.set.notable, f_string_eol_s[0]);
- fl_print_format(" - %[%s%]: Apply delimits for Objects.%c", output.stream, context.set.notable, fss_extended_read_delimit_mode_name_object, context.set.notable, f_string_eol_s[0]);
- fl_print_format(" - A number, 0 or greater: apply delimits for Content at the specified depth.%c", output.stream, f_string_eol_s[0]);
- fl_print_format(" - A number, 0 or greater, followed by a %[%s%]: (such as '1+') apply delimits for Content at the specified depth and any greater depth (numerically).%c", output.stream, context.set.notable, fss_extended_read_delimit_mode_name_greater, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]);
- fl_print_format(" - A number, 0 or lesser, followed by a %[%s%]: (such as '1-') apply delimits for Content at the specified depth and any lesser depth (numerically).%c%c", output.stream, context.set.notable, fss_extended_read_delimit_mode_name_lesser, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]);
+ fl_print_format(" The parameter %[%s%s%] accepts the following:%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_read_long_delimit, context.set.notable, f_string_eol_s[0]);
+ fl_print_format(" - %[%s%]: Do not apply delimits.%c", file.stream, context.set.notable, fss_extended_read_delimit_mode_name_none, context.set.notable, f_string_eol_s[0]);
+ fl_print_format(" - %[%s%]: (default) Apply all delimits.%c", file.stream, context.set.notable, fss_extended_read_delimit_mode_name_all, context.set.notable, f_string_eol_s[0]);
+ fl_print_format(" - %[%s%]: Apply delimits for Objects.%c", file.stream, context.set.notable, fss_extended_read_delimit_mode_name_object, context.set.notable, f_string_eol_s[0]);
+ fl_print_format(" - A number, 0 or greater: apply delimits for Content at the specified depth.%c", file.stream, f_string_eol_s[0]);
+ fl_print_format(" - A number, 0 or greater, followed by a %[%s%]: (such as '1+') apply delimits for Content at the specified depth and any greater depth (numerically).%c", file.stream, context.set.notable, fss_extended_read_delimit_mode_name_greater, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]);
+ fl_print_format(" - A number, 0 or lesser, followed by a %[%s%]: (such as '1-') apply delimits for Content at the specified depth and any lesser depth (numerically).%c%c", file.stream, context.set.notable, fss_extended_read_delimit_mode_name_lesser, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]);
- fl_print_format(" The %[%s%s%] parameter may be specified multiple times to customize the delimit behavior.%c", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_read_long_delimit, context.set.notable, f_string_eol_s[0]);
+ fl_print_format(" The %[%s%s%] parameter may be specified multiple times to customize the delimit behavior.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_read_long_delimit, context.set.notable, f_string_eol_s[0]);
- fl_print_format(" The %[%s%s%]", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_read_long_delimit, context.set.notable);
- fl_print_format(" values %[%s%]", output.stream, context.set.notable, fss_extended_read_delimit_mode_name_none, context.set.notable);
- fl_print_format(" and %[%s%],", output.stream, context.set.notable, fss_extended_read_delimit_mode_name_all, context.set.notable);
- fl_print_format(" overrule all other delimit values.%c%c", output.stream, f_string_eol_s[0], f_string_eol_s[0]);
+ fl_print_format(" The %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_read_long_delimit, context.set.notable);
+ fl_print_format(" values %[%s%]", file.stream, context.set.notable, fss_extended_read_delimit_mode_name_none, context.set.notable);
+ fl_print_format(" and %[%s%],", file.stream, context.set.notable, fss_extended_read_delimit_mode_name_all, context.set.notable);
+ fl_print_format(" overrule all other delimit values.%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]);
- fl_print_format(" The parameters %[%s%s%]", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_read_long_columns, context.set.notable);
- fl_print_format(" and %[%s%s%]", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_read_long_select, context.set.notable);
- fl_print_format(" refer to a Content column.%c", output.stream, f_string_eol_s[0]);
- fl_print_format(" The word \"column\" is being loosely defined to refer to a specific Content.%c", output.stream, f_string_eol_s[0]);
- fl_print_format(" This is not to be confused with a depth.%c%c", output.stream, f_string_eol_s[0], f_string_eol_s[0]);
+ fl_print_format(" The parameters %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_read_long_columns, context.set.notable);
+ fl_print_format(" and %[%s%s%]", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_read_long_select, context.set.notable);
+ fl_print_format(" refer to a Content column.%c", file.stream, f_string_eol_s[0]);
+ fl_print_format(" The word \"column\" is being loosely defined to refer to a specific Content.%c", file.stream, f_string_eol_s[0]);
+ fl_print_format(" This is not to be confused with a depth.%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]);
- funlockfile(output.stream);
+ funlockfile(file.stream);
return F_none;
}
}
if (choice == fss_extended_read_parameter_verbosity_quiet) {
+ main->output.verbosity = f_console_verbosity_quiet;
main->error.verbosity = f_console_verbosity_quiet;
main->warning.verbosity = f_console_verbosity_quiet;
}
else if (choice == fss_extended_read_parameter_verbosity_normal) {
+ main->output.verbosity = f_console_verbosity_normal;
main->error.verbosity = f_console_verbosity_normal;
main->warning.verbosity = f_console_verbosity_normal;
}
else if (choice == fss_extended_read_parameter_verbosity_verbose) {
+ main->output.verbosity = f_console_verbosity_verbose;
main->error.verbosity = f_console_verbosity_verbose;
main->warning.verbosity = f_console_verbosity_verbose;
}
else if (choice == fss_extended_read_parameter_verbosity_debug) {
+ main->output.verbosity = f_console_verbosity_debug;
main->error.verbosity = f_console_verbosity_debug;
main->warning.verbosity = f_console_verbosity_debug;
}
}
if (main->parameters[fss_extended_read_parameter_help].result == f_console_result_found) {
- fss_extended_read_print_help(main->output, main->context);
+ fss_extended_read_print_help(main->output.to, main->context);
fss_extended_read_main_delete(main);
return status;
}
if (main->parameters[fss_extended_read_parameter_version].result == f_console_result_found) {
- fll_program_print_version(main->output, fss_extended_read_version);
+ fll_program_print_version(main->output.to, fss_extended_read_version);
fss_extended_read_main_delete(main);
return status;
f_array_lengths_t remaining;
bool process_pipe;
- f_file_t output;
+ fl_print_t output;
fl_print_t error;
fl_print_t warning;
fss_extended_read_console_parameter_t_initialize, \
f_array_lengths_t_initialize, \
F_false, \
- macro_f_file_t_initialize2(f_type_output, f_type_descriptor_output, f_file_flag_write_only), \
fl_print_t_initialize, \
+ macro_fl_print_t_initialize_error(), \
macro_fl_print_t_initialize_warning(), \
f_color_context_t_initialize, \
}
/**
* Print help.
*
- * @param output
+ * @param file
* The file to print to.
* @param context
* The color context settings.
* F_none on success.
*/
#ifndef _di_fss_extended_read_print_help_
- extern f_status_t fss_extended_read_print_help(const f_file_t output, const f_color_context_t context);
+ extern f_status_t fss_extended_read_print_help(const f_file_t file, const f_color_context_t context);
#endif // _di_fss_extended_read_print_help_
/**
return;
}
- flockfile(main->output.stream);
+ flockfile(main->output.to.stream);
if ((data->option & fss_extended_read_data_option_object) || (data->option & fss_extended_read_data_option_content) && (data->contents.array[at].used || (data->option & fss_extended_read_data_option_empty))) {
if (data->option & fss_extended_read_data_option_object) {
if (data->option & fss_extended_read_data_option_trim) {
if ((data->option & fss_extended_read_data_option_raw) && data->quotes_object.array[at]) {
- f_print_character_safely(data->quotes_object.array[at] == f_fss_quote_type_single ? f_fss_quote_single_s[0] : f_fss_quote_double_s[0], main->output.stream);
+ f_print_character_safely(data->quotes_object.array[at] == f_fss_quote_type_single ? f_fss_quote_single_s[0] : f_fss_quote_double_s[0], main->output.to.stream);
}
- fl_print_trim_except_dynamic_partial(data->buffer, data->objects.array[at], delimits_object, main->output.stream);
+ fl_print_trim_except_dynamic_partial(data->buffer, data->objects.array[at], delimits_object, main->output.to.stream);
if ((data->option & fss_extended_read_data_option_raw) && data->quotes_object.array[at]) {
- f_print_character_safely(data->quotes_object.array[at] == f_fss_quote_type_single ? f_fss_quote_single_s[0] : f_fss_quote_double_s[0], main->output.stream);
+ f_print_character_safely(data->quotes_object.array[at] == f_fss_quote_type_single ? f_fss_quote_single_s[0] : f_fss_quote_double_s[0], main->output.to.stream);
}
}
else {
if ((data->option & fss_extended_read_data_option_raw) && data->quotes_object.array[at]) {
- f_print_character_safely(data->quotes_object.array[at] == f_fss_quote_type_single ? f_fss_quote_single_s[0] : f_fss_quote_double_s[0], main->output.stream);
+ f_print_character_safely(data->quotes_object.array[at] == f_fss_quote_type_single ? f_fss_quote_single_s[0] : f_fss_quote_double_s[0], main->output.to.stream);
}
- f_print_except_dynamic_partial(data->buffer, data->objects.array[at], delimits_object, main->output.stream);
+ f_print_except_dynamic_partial(data->buffer, data->objects.array[at], delimits_object, main->output.to.stream);
if ((data->option & fss_extended_read_data_option_raw) && data->quotes_object.array[at]) {
- f_print_character_safely(data->quotes_object.array[at] == f_fss_quote_type_single ? f_fss_quote_single_s[0] : f_fss_quote_double_s[0], main->output.stream);
+ f_print_character_safely(data->quotes_object.array[at] == f_fss_quote_type_single ? f_fss_quote_single_s[0] : f_fss_quote_double_s[0], main->output.to.stream);
}
}
content_printed = F_true;
if ((data->option & fss_extended_read_data_option_raw) && data->quotes_content.array[at].array[data->select]) {
- f_print_character_safely(data->quotes_content.array[at].array[data->select] == f_fss_quote_type_single ? f_fss_quote_single_s[0] : f_fss_quote_double_s[0], main->output.stream);
+ f_print_character_safely(data->quotes_content.array[at].array[data->select] == f_fss_quote_type_single ? f_fss_quote_single_s[0] : f_fss_quote_double_s[0], main->output.to.stream);
}
- f_print_except_dynamic_partial(data->buffer, data->contents.array[at].array[data->select], delimits_content, main->output.stream);
+ f_print_except_dynamic_partial(data->buffer, data->contents.array[at].array[data->select], delimits_content, main->output.to.stream);
if ((data->option & fss_extended_read_data_option_raw) && data->quotes_content.array[at].array[data->select]) {
- f_print_character_safely(data->quotes_content.array[at].array[data->select] == f_fss_quote_type_single ? f_fss_quote_single_s[0] : f_fss_quote_double_s[0], main->output.stream);
+ f_print_character_safely(data->quotes_content.array[at].array[data->select] == f_fss_quote_type_single ? f_fss_quote_single_s[0] : f_fss_quote_double_s[0], main->output.to.stream);
}
}
}
content_printed = F_true;
if ((data->option & fss_extended_read_data_option_raw) && data->quotes_content.array[at].array[i]) {
- f_print_character_safely(data->quotes_content.array[at].array[i] == f_fss_quote_type_single ? f_fss_quote_single_s[0] : f_fss_quote_double_s[0], main->output.stream);
+ f_print_character_safely(data->quotes_content.array[at].array[i] == f_fss_quote_type_single ? f_fss_quote_single_s[0] : f_fss_quote_double_s[0], main->output.to.stream);
}
- f_print_except_dynamic_partial(data->buffer, data->contents.array[at].array[i], delimits_content, main->output.stream);
+ f_print_except_dynamic_partial(data->buffer, data->contents.array[at].array[i], delimits_content, main->output.to.stream);
if ((data->option & fss_extended_read_data_option_raw) && data->quotes_content.array[at].array[i]) {
- f_print_character_safely(data->quotes_content.array[at].array[i] == f_fss_quote_type_single ? f_fss_quote_single_s[0] : f_fss_quote_double_s[0], main->output.stream);
+ f_print_character_safely(data->quotes_content.array[at].array[i] == f_fss_quote_type_single ? f_fss_quote_single_s[0] : f_fss_quote_double_s[0], main->output.to.stream);
}
if (i + 1 < data->contents.array[at].used && data->contents.array[at].array[i + 1].start <= data->contents.array[at].array[i + 1].stop) {
fss_extended_read_print_set_end(main);
}
- funlockfile(main->output.stream);
+ funlockfile(main->output.to.stream);
}
}
#endif // _di_fss_extended_read_print_at_
if (data->option & fss_extended_read_data_option_select) {
if (data->option & fss_extended_read_data_option_object) {
- flockfile(main->output.stream);
+ flockfile(main->output.to.stream);
fss_extended_read_print_one(main);
- funlockfile(main->output.stream);
+ funlockfile(main->output.to.stream);
return F_success;
}
if (data->select < data->contents.array[at].used) {
if (data->contents.array[at].array[data->select].start <= data->contents.array[at].array[data->select].stop || (data->option & fss_extended_read_data_option_empty)) {
- flockfile(main->output.stream);
+ flockfile(main->output.to.stream);
fss_extended_read_print_one(main);
- funlockfile(main->output.stream);
+ funlockfile(main->output.to.stream);
return F_success;
}
}
}
else if ((data->option & fss_extended_read_data_option_object) || (data->option & fss_extended_read_data_option_empty)) {
- flockfile(main->output.stream);
+ flockfile(main->output.to.stream);
fss_extended_read_print_one(main);
- funlockfile(main->output.stream);
+ funlockfile(main->output.to.stream);
return F_success;
}
for (f_array_length_t j = 0; j < data->contents.array[at].used; ++j) {
if (data->contents.array[at].array[j].start <= data->contents.array[at].array[j].stop) {
- flockfile(main->output.stream);
+ flockfile(main->output.to.stream);
fss_extended_read_print_one(main);
- funlockfile(main->output.stream);
+ funlockfile(main->output.to.stream);
return F_success;
}
void fss_extended_read_print_content_end(fss_extended_read_main_t * const main) {
if (main->parameters[fss_extended_read_parameter_pipe].result == f_console_result_found) {
- f_print_character(fss_extended_read_pipe_content_start, main->output.stream);
+ f_print_character(fss_extended_read_pipe_content_start, main->output.to.stream);
}
else {
- f_print_character(f_fss_space, main->output.stream);
+ f_print_character(f_fss_space, main->output.to.stream);
}
}
#endif // _di_fss_extended_read_print_content_end_
void fss_extended_read_print_object_end(fss_extended_read_main_t * const main) {
if (main->parameters[fss_extended_read_parameter_pipe].result == f_console_result_found) {
- f_print_character(fss_extended_read_pipe_content_end, main->output.stream);
+ f_print_character(fss_extended_read_pipe_content_end, main->output.to.stream);
}
else {
- f_print_character(f_fss_space, main->output.stream);
+ f_print_character(f_fss_space, main->output.to.stream);
}
}
#endif // _di_fss_extended_read_print_object_end_
#ifndef _di_fss_extended_read_print_one_
void fss_extended_read_print_one(fss_extended_read_main_t * const main) {
- f_print_character(f_string_ascii_1_s[0], main->output.stream);
- f_print_character(f_string_eol_s[0], main->output.stream);
+ f_print_character(f_string_ascii_1_s[0], main->output.to.stream);
+ f_print_character(f_string_eol_s[0], main->output.to.stream);
}
#endif // _di_fss_extended_read_print_one_
void fss_extended_read_print_set_end(fss_extended_read_main_t * const main) {
if (main->parameters[fss_extended_read_parameter_pipe].result == f_console_result_found) {
- f_print_character(fss_extended_read_pipe_content_end, main->output.stream);
+ f_print_character(fss_extended_read_pipe_content_end, main->output.to.stream);
}
else {
- f_print_character(f_fss_eol, main->output.stream);
+ f_print_character(f_fss_eol, main->output.to.stream);
}
}
#endif // _di_fss_extended_read_print_set_end_
#ifndef _di_fss_extended_read_print_zero_
void fss_extended_read_print_zero(fss_extended_read_main_t * const main) {
- f_print_character(f_string_ascii_0_s[0], main->output.stream);
- f_print_character(f_string_eol_s[0], main->output.stream);
+ f_print_character(f_string_ascii_0_s[0], main->output.to.stream);
+ f_print_character(f_string_eol_s[0], main->output.to.stream);
}
#endif // _di_fss_extended_read_print_zero_
if (data->depths.array[0].value_at >= data->objects.used) {
if (data->option & (fss_extended_read_data_option_columns | fss_extended_read_data_option_total)) {
- flockfile(main->output.stream);
+ flockfile(main->output.to.stream);
fss_extended_read_print_zero(main);
- funlockfile(main->output.stream);
+ funlockfile(main->output.to.stream);
}
return F_none;
if (data->option & fss_extended_read_data_option_line) {
if (data->line) {
if (data->option & fss_extended_read_data_option_total) {
- flockfile(main->output.stream);
+ flockfile(main->output.to.stream);
fss_extended_read_print_zero(main);
- funlockfile(main->output.stream);
+ funlockfile(main->output.to.stream);
}
return F_none;
}
else {
if ((data->option & fss_extended_read_data_option_raw) && data->quotes_object.array[at]) {
- f_print_character_safely(data->quotes_object.array[at] == f_fss_quote_type_single ? f_fss_quote_single_s[0] : f_fss_quote_double_s[0], main->output.stream);
+ f_print_character_safely(data->quotes_object.array[at] == f_fss_quote_type_single ? f_fss_quote_single_s[0] : f_fss_quote_double_s[0], main->output.to.stream);
}
fss_extended_read_print_at(i, *delimits_object, *delimits_content, main, data);
if ((data->option & fss_extended_read_data_option_raw) && data->quotes_object.array[at]) {
- f_print_character_safely(data->quotes_object.array[at] == f_fss_quote_type_single ? f_fss_quote_single_s[0] : f_fss_quote_double_s[0], main->output.stream);
+ f_print_character_safely(data->quotes_object.array[at] == f_fss_quote_type_single ? f_fss_quote_single_s[0] : f_fss_quote_double_s[0], main->output.to.stream);
}
}
}
else if (data->option & fss_extended_read_data_option_columns) {
- fll_print_format("%ul%c", main->output.stream, data->contents.array[i].used, f_string_eol_s[0]);
+ fll_print_format("%ul%c", main->output.to.stream, data->contents.array[i].used, f_string_eol_s[0]);
}
else if (data->option & fss_extended_read_data_option_total) {
if (fss_extended_read_print_at_total(i, main, data) == F_none) {
}
else {
if ((data->option & fss_extended_read_data_option_raw) && data->quotes_content.array[at].array[i]) {
- f_print_character_safely(data->quotes_content.array[at].array[i] == f_fss_quote_type_single ? f_fss_quote_single_s[0] : f_fss_quote_double_s[0], main->output.stream);
+ f_print_character_safely(data->quotes_content.array[at].array[i] == f_fss_quote_type_single ? f_fss_quote_single_s[0] : f_fss_quote_double_s[0], main->output.to.stream);
}
fss_extended_read_print_at(i, *delimits_object, *delimits_content, main, data);
if ((data->option & fss_extended_read_data_option_raw) && data->quotes_content.array[at].array[i]) {
- f_print_character_safely(data->quotes_content.array[at].array[i] == f_fss_quote_type_single ? f_fss_quote_single_s[0] : f_fss_quote_double_s[0], main->output.stream);
+ f_print_character_safely(data->quotes_content.array[at].array[i] == f_fss_quote_type_single ? f_fss_quote_single_s[0] : f_fss_quote_double_s[0], main->output.to.stream);
}
}
} // for
if (data->option & fss_extended_read_data_option_total) {
- flockfile(main->output.stream);
+ flockfile(main->output.to.stream);
fss_extended_read_print_zero(main);
- funlockfile(main->output.stream);
+ funlockfile(main->output.to.stream);
}
return F_none;
f_status_t fss_extended_read_process_columns(fss_extended_read_main_t * const main, fss_extended_read_data_t *data, bool names[]) {
if (!(data->option & fss_extended_read_data_option_content)) {
- flockfile(main->output.stream);
+ flockfile(main->output.to.stream);
fss_extended_read_print_zero(main);
- funlockfile(main->output.stream);
+ funlockfile(main->output.to.stream);
return F_none;
}
}
} // for
- fll_print_format("%ul%c", main->output.stream, max, f_string_eol_s[0]);
+ fll_print_format("%ul%c", main->output.to.stream, max, f_string_eol_s[0]);
return F_none;
}
if (!data->contents.array[i].used) {
if (data->option & fss_extended_read_data_option_empty) {
if (line == data->line) {
- flockfile(main->output.stream);
+ flockfile(main->output.to.stream);
fss_extended_read_print_set_end(main);
- funlockfile(main->output.stream);
+ funlockfile(main->output.to.stream);
break;
}
} // for
}
- flockfile(main->output.stream);
+ flockfile(main->output.to.stream);
if (data->option & fss_extended_read_data_option_line) {
if (data->line < total) {
}
}
else {
- fl_print_format("%ul%c", main->output.stream, total, f_string_eol_s[0]);
+ fl_print_format("%ul%c", main->output.to.stream, total, f_string_eol_s[0]);
}
- funlockfile(main->output.stream);
+ funlockfile(main->output.to.stream);
return F_none;
}
#endif
#ifndef _di_fss_extended_write_print_help_
- f_status_t fss_extended_write_print_help(const f_file_t output, const f_color_context_t context) {
+ f_status_t fss_extended_write_print_help(const f_file_t file, const f_color_context_t context) {
- flockfile(output.stream);
+ flockfile(file.stream);
- fll_program_print_help_header(output, context, fss_extended_write_name_long, fss_extended_write_version);
+ fll_program_print_help_header(file, context, fss_extended_write_name_long, fss_extended_write_version);
- fll_program_print_help_option(output, context, f_console_standard_short_help_s, f_console_standard_long_help_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print this help message.");
- fll_program_print_help_option(output, context, f_console_standard_short_dark_s, f_console_standard_long_dark_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on dark backgrounds.");
- fll_program_print_help_option(output, context, f_console_standard_short_light_s, f_console_standard_long_light_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on light backgrounds.");
- fll_program_print_help_option(output, context, f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, "Do not output in color.");
- fll_program_print_help_option(output, context, f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Decrease verbosity beyond normal output.");
- fll_program_print_help_option(output, context, f_console_standard_short_normal_s, f_console_standard_long_normal_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Set verbosity to normal output.");
- fll_program_print_help_option(output, context, f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Increase verbosity beyond normal output.");
- fll_program_print_help_option(output, context, f_console_standard_short_debug_s, f_console_standard_long_debug_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Enable debugging, inceasing verbosity beyond normal output.");
- fll_program_print_help_option(output, context, f_console_standard_short_version_s, f_console_standard_long_version_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Print only the version number.");
+ fll_program_print_help_option(file, context, f_console_standard_short_help_s, f_console_standard_long_help_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print this help message.");
+ fll_program_print_help_option(file, context, f_console_standard_short_dark_s, f_console_standard_long_dark_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on dark backgrounds.");
+ fll_program_print_help_option(file, context, f_console_standard_short_light_s, f_console_standard_long_light_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on light backgrounds.");
+ fll_program_print_help_option(file, context, f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, "Do not file in color.");
+ fll_program_print_help_option(file, context, f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Decrease verbosity beyond normal file.");
+ fll_program_print_help_option(file, context, f_console_standard_short_normal_s, f_console_standard_long_normal_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Set verbosity to normal file.");
+ fll_program_print_help_option(file, context, f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Increase verbosity beyond normal file.");
+ fll_program_print_help_option(file, context, f_console_standard_short_debug_s, f_console_standard_long_debug_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Enable debugging, inceasing verbosity beyond normal file.");
+ fll_program_print_help_option(file, context, f_console_standard_short_version_s, f_console_standard_long_version_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Print only the version number.");
- f_print_character(f_string_eol_s[0], output.stream);
+ f_print_character(f_string_eol_s[0], file.stream);
- fll_program_print_help_option(output, context, fss_extended_write_short_file, fss_extended_write_long_file, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " 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_s, f_console_symbol_long_enable_s, "The Content to output.");
- fll_program_print_help_option(output, context, fss_extended_write_short_double, fss_extended_write_long_double, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Use double quotes (default).");
- fll_program_print_help_option(output, context, fss_extended_write_short_ignore, fss_extended_write_long_ignore, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Ignore a given range within a Content.");
- fll_program_print_help_option(output, context, fss_extended_write_short_object, fss_extended_write_long_object, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " The Object to output.");
- fll_program_print_help_option(output, context, fss_extended_write_short_partial, fss_extended_write_long_partial, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Do not output end of Object/Content character.");
- fll_program_print_help_option(output, context, fss_extended_write_short_prepend, fss_extended_write_long_prepend, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Prepend the given whitespace characters to the start of each multi-line Content.");
- fll_program_print_help_option(output, context, fss_extended_write_short_single, fss_extended_write_long_single, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Use single quotes.");
- fll_program_print_help_option(output, context, fss_extended_write_short_trim, fss_extended_write_long_trim, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Trim Object names.");
+ fll_program_print_help_option(file, context, fss_extended_write_short_file, fss_extended_write_long_file, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Specify a file to send file to.");
+ fll_program_print_help_option(file, context, fss_extended_write_short_content, fss_extended_write_long_content, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "The Content to file.");
+ fll_program_print_help_option(file, context, fss_extended_write_short_double, fss_extended_write_long_double, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Use double quotes (default).");
+ fll_program_print_help_option(file, context, fss_extended_write_short_ignore, fss_extended_write_long_ignore, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Ignore a given range within a Content.");
+ fll_program_print_help_option(file, context, fss_extended_write_short_object, fss_extended_write_long_object, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " The Object to file.");
+ fll_program_print_help_option(file, context, fss_extended_write_short_partial, fss_extended_write_long_partial, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Do not file end of Object/Content character.");
+ fll_program_print_help_option(file, context, fss_extended_write_short_prepend, fss_extended_write_long_prepend, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Prepend the given whitespace characters to the start of each multi-line Content.");
+ fll_program_print_help_option(file, context, fss_extended_write_short_single, fss_extended_write_long_single, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Use single quotes.");
+ fll_program_print_help_option(file, context, fss_extended_write_short_trim, fss_extended_write_long_trim, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Trim Object names.");
- fll_program_print_help_usage(output, context, fss_extended_write_name, f_string_empty_s);
+ fll_program_print_help_usage(file, context, fss_extended_write_name, f_string_empty_s);
- fl_print_format(" The pipe uses the Backspace character '%[\\b%]' (%[U+0008%]) to designate the start of a Content.%c", output.stream, context.set.notable, context.set.notable, context.set.notable, context.set.notable, f_string_eol_s[0]);
- fl_print_format(" The pipe uses the Form Feed character '%[\\f%]' (%[U+000C%]) to designate the end of the last Content.%c", output.stream, context.set.notable, context.set.notable, context.set.notable, context.set.notable, f_string_eol_s[0]);
- fl_print_format(" The pipe uses the Vertical Line character '%[\\v%]' (%[U+000B%]) is used to ignore a Content range, which does nothing in this program.%c", output.stream, context.set.notable, context.set.notable, context.set.notable, context.set.notable, f_string_eol_s[0]);
- fl_print_format(" For the pipe, an Object is terminated by either a Backspace character '%[\\b%]' (%[U+0008%])", output.stream, context.set.notable, context.set.notable, context.set.notable, context.set.notable);
- fl_print_format(" or a Form Feed character '%[\\f%]' (%[U+000C%]).%c", output.stream, context.set.notable, context.set.notable, context.set.notable, context.set.notable, f_string_eol_s[0]);
- fl_print_format(" The end of the pipe represents the end of any Object or Content.%c%c", output.stream, f_string_eol_s[0], f_string_eol_s[0]);
+ fl_print_format(" The pipe uses the Backspace character '%[\\b%]' (%[U+0008%]) to designate the start of a Content.%c", file.stream, context.set.notable, context.set.notable, context.set.notable, context.set.notable, f_string_eol_s[0]);
+ fl_print_format(" The pipe uses the Form Feed character '%[\\f%]' (%[U+000C%]) to designate the end of the last Content.%c", file.stream, context.set.notable, context.set.notable, context.set.notable, context.set.notable, f_string_eol_s[0]);
+ fl_print_format(" The pipe uses the Vertical Line character '%[\\v%]' (%[U+000B%]) is used to ignore a Content range, which does nothing in this program.%c", file.stream, context.set.notable, context.set.notable, context.set.notable, context.set.notable, f_string_eol_s[0]);
+ fl_print_format(" For the pipe, an Object is terminated by either a Backspace character '%[\\b%]' (%[U+0008%])", file.stream, context.set.notable, context.set.notable, context.set.notable, context.set.notable);
+ fl_print_format(" or a Form Feed character '%[\\f%]' (%[U+000C%]).%c", file.stream, context.set.notable, context.set.notable, context.set.notable, context.set.notable, f_string_eol_s[0]);
+ fl_print_format(" The end of the pipe represents the end of any Object or Content.%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]);
- fl_print_format(" The FSS-0001 (Extended) specification does not support multi-line Content, therefore the parameter '%[%s%s%]'", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_write_long_prepend, context.set.notable);
- fl_print_format(" does nothing.%c%c", output.stream, f_string_eol_s[0], f_string_eol_s[0]);
+ fl_print_format(" The FSS-0001 (Extended) specification does not support multi-line Content, therefore the parameter '%[%s%s%]'", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_write_long_prepend, context.set.notable);
+ fl_print_format(" does nothing.%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]);
- fl_print_format(" This program does not use the parameter '%[%s%s%]', which therefore does nothing.%c", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_write_long_ignore, context.set.notable, f_string_eol_s[0]);
- fl_print_format(" This parameter requires two values.%c%c", output.stream, f_string_eol_s[0], f_string_eol_s[0]);
+ fl_print_format(" This program does not use the parameter '%[%s%s%]', which therefore does nothing.%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_extended_write_long_ignore, context.set.notable, f_string_eol_s[0]);
+ fl_print_format(" This parameter requires two values.%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]);
- funlockfile(output.stream);
+ funlockfile(file.stream);
return F_none;
}
}
if (choice == fss_extended_write_parameter_verbosity_quiet) {
+ main->output.verbosity = f_console_verbosity_quiet;
main->error.verbosity = f_console_verbosity_quiet;
main->warning.verbosity = f_console_verbosity_quiet;
}
else if (choice == fss_extended_write_parameter_verbosity_normal) {
+ main->output.verbosity = f_console_verbosity_normal;
main->error.verbosity = f_console_verbosity_normal;
main->warning.verbosity = f_console_verbosity_normal;
}
else if (choice == fss_extended_write_parameter_verbosity_verbose) {
+ main->output.verbosity = f_console_verbosity_verbose;
main->error.verbosity = f_console_verbosity_verbose;
main->warning.verbosity = f_console_verbosity_verbose;
}
else if (choice == fss_extended_write_parameter_verbosity_debug) {
+ main->output.verbosity = f_console_verbosity_debug;
main->error.verbosity = f_console_verbosity_debug;
main->warning.verbosity = f_console_verbosity_debug;
}
}
if (main->parameters[fss_extended_write_parameter_help].result == f_console_result_found) {
- fss_extended_write_print_help(main->output, main->context);
+ fss_extended_write_print_help(main->output.to, main->context);
fss_extended_write_main_delete(main);
return status;
}
if (main->parameters[fss_extended_write_parameter_version].result == f_console_result_found) {
- fll_program_print_version(main->output, fss_extended_write_version);
+ fll_program_print_version(main->output.to, fss_extended_write_version);
fss_extended_write_main_delete(main);
return status;
f_array_lengths_t remaining;
bool process_pipe;
- f_file_t output;
+ fl_print_t output;
fl_print_t error;
fl_print_t warning;
f_string_static_t prepend;
fss_extended_write_console_parameter_t_initialize, \
f_array_lengths_t_initialize, \
F_false, \
- macro_f_file_t_initialize2(f_type_output, f_type_descriptor_output, f_file_flag_write_only), \
fl_print_t_initialize, \
+ macro_fl_print_t_initialize_error(), \
macro_fl_print_t_initialize_warning(), \
f_string_static_t_initialize, \
f_color_context_t_initialize, \
/**
* Print help.
*
- * @param output
+ * @param file
* The file to print to.
* @param context
* The color context settings.
* F_none on success.
*/
#ifndef _di_fss_extended_write_print_help_
- extern f_status_t fss_extended_write_print_help(const f_file_t output, const f_color_context_t context);
+ extern f_status_t fss_extended_write_print_help(const f_file_t file, const f_color_context_t context);
#endif // _di_fss_extended_write_print_help_
/**
#endif
#ifndef _di_fss_identify_print_help_
- f_status_t fss_identify_print_help(const f_file_t output, const f_color_context_t context) {
+ f_status_t fss_identify_print_help(const f_file_t file, const f_color_context_t context) {
- flockfile(output.stream);
+ flockfile(file.stream);
- fll_program_print_help_header(output, context, fss_identify_name_long, fss_identify_version);
+ fll_program_print_help_header(file, context, fss_identify_name_long, fss_identify_version);
- fll_program_print_help_option(output, context, f_console_standard_short_help_s, f_console_standard_long_help_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print this help message.");
- fll_program_print_help_option(output, context, f_console_standard_short_dark_s, f_console_standard_long_dark_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on dark backgrounds.");
- fll_program_print_help_option(output, context, f_console_standard_short_light_s, f_console_standard_long_light_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on light backgrounds.");
- fll_program_print_help_option(output, context, f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, "Do not output in color.");
- fll_program_print_help_option(output, context, f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Decrease verbosity beyond normal output.");
- fll_program_print_help_option(output, context, f_console_standard_short_normal_s, f_console_standard_long_normal_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Set verbosity to normal output.");
- fll_program_print_help_option(output, context, f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Increase verbosity beyond normal output.");
- fll_program_print_help_option(output, context, f_console_standard_short_debug_s, f_console_standard_long_debug_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Enable debugging, inceasing verbosity beyond normal output.");
- fll_program_print_help_option(output, context, f_console_standard_short_version_s, f_console_standard_long_version_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Print only the version number.");
+ fll_program_print_help_option(file, context, f_console_standard_short_help_s, f_console_standard_long_help_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print this help message.");
+ fll_program_print_help_option(file, context, f_console_standard_short_dark_s, f_console_standard_long_dark_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on dark backgrounds.");
+ fll_program_print_help_option(file, context, f_console_standard_short_light_s, f_console_standard_long_light_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on light backgrounds.");
+ fll_program_print_help_option(file, context, f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, "Do not file in color.");
+ fll_program_print_help_option(file, context, f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Decrease verbosity beyond normal file.");
+ fll_program_print_help_option(file, context, f_console_standard_short_normal_s, f_console_standard_long_normal_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Set verbosity to normal file.");
+ fll_program_print_help_option(file, context, f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Increase verbosity beyond normal file.");
+ fll_program_print_help_option(file, context, f_console_standard_short_debug_s, f_console_standard_long_debug_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Enable debugging, inceasing verbosity beyond normal file.");
+ fll_program_print_help_option(file, context, f_console_standard_short_version_s, f_console_standard_long_version_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Print only the version number.");
- f_print_character(f_string_eol_s[0], output.stream);
+ f_print_character(f_string_eol_s[0], file.stream);
- fll_program_print_help_option(output, context, fss_identify_short_content, fss_identify_long_content, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Print the Identifier content (the 4-digit hexidecimal type code).");
- fll_program_print_help_option(output, context, fss_identify_short_object, fss_identify_long_object, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the Identifier object (the name).");
+ fll_program_print_help_option(file, context, fss_identify_short_content, fss_identify_long_content, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Print the Identifier content (the 4-digit hexidecimal type code).");
+ fll_program_print_help_option(file, context, fss_identify_short_object, fss_identify_long_object, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the Identifier object (the name).");
- f_print_character(f_string_eol_s[0], output.stream);
+ f_print_character(f_string_eol_s[0], file.stream);
- fll_program_print_help_option(output, context, fss_identify_short_line, fss_identify_long_line, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print only the Identifier at the given line.");
- fll_program_print_help_option(output, context, fss_identify_short_name, fss_identify_long_name, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select Object with this name.");
- fll_program_print_help_option(output, context, fss_identify_short_total, fss_identify_long_total, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Print the total Identifiers found.");
+ fll_program_print_help_option(file, context, fss_identify_short_line, fss_identify_long_line, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print only the Identifier at the given line.");
+ fll_program_print_help_option(file, context, fss_identify_short_name, fss_identify_long_name, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select Object with this name.");
+ fll_program_print_help_option(file, context, fss_identify_short_total, fss_identify_long_total, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Print the total Identifiers found.");
- fll_program_print_help_usage(output, context, fss_identify_name, "filename(s)");
+ fll_program_print_help_usage(file, context, fss_identify_name, "filename(s)");
- fl_print_format(" The %[%s%s%] parameter refers to the output lines and not the lines in a given file.%c%c", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_identify_long_line, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]);
+ fl_print_format(" The %[%s%s%] parameter refers to the file lines and not the lines in a given file.%c%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_identify_long_line, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]);
- fl_print_format(" If neither the %[%s%s%] nor", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_identify_long_object, context.set.notable);
- fl_print_format(" %[%s%s%] are specified, then the default behavior is to print both.%c%c", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_identify_long_content, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]);
+ fl_print_format(" If neither the %[%s%s%] nor", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_identify_long_object, context.set.notable);
+ fl_print_format(" %[%s%s%] are specified, then the default behavior is to print both.%c%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_identify_long_content, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]);
- fl_print_format(" When specifying the %[%s%s%] parameter, neither the", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_identify_long_total, context.set.notable);
- fl_print_format(" %[%s%s%] nor the", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_identify_long_object, context.set.notable);
- fl_print_format(" %[%s%s%] parameter may be specified.%c%c", output.stream, context.set.notable, f_console_symbol_long_enable_s, fss_identify_long_content, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]);
+ fl_print_format(" When specifying the %[%s%s%] parameter, neither the", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_identify_long_total, context.set.notable);
+ fl_print_format(" %[%s%s%] nor the", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_identify_long_object, context.set.notable);
+ fl_print_format(" %[%s%s%] parameter may be specified.%c%c", file.stream, context.set.notable, f_console_symbol_long_enable_s, fss_identify_long_content, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]);
- fl_print_format(" An FSS file is identified by the following format: '%[# Object-Content%]'", output.stream, context.set.notable, context.set.notable);
- fl_print_format(" where the Object, is a machine-name representing the name and may only consist of \"word\" characters and the Content is a 4-digit hexidecimal number representing a particular variant of the Object.%c", output.stream, f_string_eol_s[0]);
- fl_print_format(" This identifier, if provided, must exist on the first line in a file and must begin with the pound character: '#'.%c", output.stream, f_string_eol_s[0]);
- fl_print_format(" Whitespace must follow this pound character.%c", output.stream, f_string_eol_s[0]);
- fl_print_format(" There may be multiple Object and Content pairs, separated by whitspace, such as: \"# fss-0002 fss-0000 iki-0002\".%c%c", output.stream, f_string_eol_s[0], f_string_eol_s[0]);
+ fl_print_format(" An FSS file is identified by the following format: '%[# Object-Content%]'", file.stream, context.set.notable, context.set.notable);
+ fl_print_format(" where the Object, is a machine-name representing the name and may only consist of \"word\" characters and the Content is a 4-digit hexidecimal number representing a particular variant of the Object.%c", file.stream, f_string_eol_s[0]);
+ fl_print_format(" This identifier, if provided, must exist on the first line in a file and must begin with the pound character: '#'.%c", file.stream, f_string_eol_s[0]);
+ fl_print_format(" Whitespace must follow this pound character.%c", file.stream, f_string_eol_s[0]);
+ fl_print_format(" There may be multiple Object and Content pairs, separated by whitspace, such as: \"# fss-0002 fss-0000 iki-0002\".%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]);
- funlockfile(output.stream);
+ funlockfile(file.stream);
return F_none;
}
}
if (choice == fss_identify_parameter_verbosity_quiet) {
+ main->output.verbosity = f_console_verbosity_quiet;
main->error.verbosity = f_console_verbosity_quiet;
main->warning.verbosity = f_console_verbosity_quiet;
}
else if (choice == fss_identify_parameter_verbosity_normal) {
+ main->output.verbosity = f_console_verbosity_normal;
main->error.verbosity = f_console_verbosity_normal;
main->warning.verbosity = f_console_verbosity_normal;
}
else if (choice == fss_identify_parameter_verbosity_verbose) {
+ main->output.verbosity = f_console_verbosity_verbose;
main->error.verbosity = f_console_verbosity_verbose;
main->warning.verbosity = f_console_verbosity_verbose;
}
else if (choice == fss_identify_parameter_verbosity_debug) {
+ main->output.verbosity = f_console_verbosity_debug;
main->error.verbosity = f_console_verbosity_debug;
main->warning.verbosity = f_console_verbosity_debug;
}
}
if (main->parameters[fss_identify_parameter_help].result == f_console_result_found) {
- fss_identify_print_help(main->output, main->context);
+ fss_identify_print_help(main->output.to, main->context);
fss_identify_main_delete(main);
}
if (main->parameters[fss_identify_parameter_version].result == f_console_result_found) {
- fll_program_print_version(main->output, fss_identify_version);
+ fll_program_print_version(main->output.to, fss_identify_version);
fss_identify_main_delete(main);
if (F_status_is_error_not(status)) {
if (main->parameters[fss_identify_parameter_total].result == f_console_result_found) {
- fll_print_format("%ul%c", main->output.stream, data.total, f_string_eol_s[0]);
+ fll_print_format("%ul%c", main->output.to.stream, data.total, f_string_eol_s[0]);
}
}
f_array_lengths_t remaining;
bool process_pipe;
- f_file_t output;
+ fl_print_t output;
fl_print_t error;
fl_print_t warning;
fss_identify_console_parameter_t_initialize, \
f_array_lengths_t_initialize, \
F_false, \
- macro_f_file_t_initialize2(f_type_output, f_type_descriptor_output, f_file_flag_write_only), \
fl_print_t_initialize, \
+ macro_fl_print_t_initialize_error(), \
macro_fl_print_t_initialize_warning(), \
f_color_context_t_initialize, \
}
/**
* Print help.
*
- * @param output
+ * @param file
* The file to print to.
* @param context
* The color context settings.
* F_none on success.
*/
#ifndef _di_fss_identify_print_help_
- extern f_status_t fss_identify_print_help(const f_file_t output, const f_color_context_t context);
+ extern f_status_t fss_identify_print_help(const f_file_t file, const f_color_context_t context);
#endif // _di_fss_identify_print_help_
/**
#ifndef _di_fss_identify_print_
void fss_identify_print(const fss_identify_main_t main, f_fll_id_t id) {
- flockfile(main.output.stream);
+ flockfile(main.output.to.stream);
if (main.parameters[fss_identify_parameter_object].result == f_console_result_found || main.parameters[fss_identify_parameter_content].result != f_console_result_found) {
- f_print(id.name, id.used, main.output.stream);
+ f_print(id.name, id.used, main.output.to.stream);
if (main.parameters[fss_identify_parameter_object].result != f_console_result_found || main.parameters[fss_identify_parameter_content].result == f_console_result_found) {
- f_print_character(f_fss_type_header_part5, main.output.stream);
+ f_print_character(f_fss_type_header_part5, main.output.to.stream);
}
}
if (main.parameters[fss_identify_parameter_object].result != f_console_result_found || main.parameters[fss_identify_parameter_content].result == f_console_result_found) {
- fl_print_format("%04_ui", main.output.stream, id.type);
+ fl_print_format("%04_ui", main.output.to.stream, id.type);
}
- f_print_character(f_string_eol_s[0], main.output.stream);
+ f_print_character(f_string_eol_s[0], main.output.to.stream);
- funlockfile(main.output.stream);
+ funlockfile(main.output.to.stream);
}
#endif // _di_fss_identify_print_
#endif
#ifndef _di_fss_status_code_print_help_
- f_status_t fss_status_code_print_help(const f_file_t output, const f_color_context_t context) {
+ f_status_t fss_status_code_print_help(const f_file_t file, const f_color_context_t context) {
- flockfile(output.stream);
+ flockfile(file.stream);
- fll_program_print_help_header(output, context, fss_status_code_name_long, fss_status_code_version);
+ fll_program_print_help_header(file, context, fss_status_code_name_long, fss_status_code_version);
- fll_program_print_help_option(output, context, f_console_standard_short_help_s, f_console_standard_long_help_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print this help message.");
- fll_program_print_help_option(output, context, f_console_standard_short_dark_s, f_console_standard_long_dark_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on dark backgrounds.");
- fll_program_print_help_option(output, context, f_console_standard_short_light_s, f_console_standard_long_light_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on light backgrounds.");
- fll_program_print_help_option(output, context, f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, "Do not output in color.");
- fll_program_print_help_option(output, context, f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Decrease verbosity beyond normal output.");
- fll_program_print_help_option(output, context, f_console_standard_short_normal_s, f_console_standard_long_normal_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Set verbosity to normal output.");
- fll_program_print_help_option(output, context, f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Increase verbosity beyond normal output.");
- fll_program_print_help_option(output, context, f_console_standard_short_debug_s, f_console_standard_long_debug_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Enable debugging, inceasing verbosity beyond normal output.");
- fll_program_print_help_option(output, context, f_console_standard_short_version_s, f_console_standard_long_version_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Print only the version number.");
+ fll_program_print_help_option(file, context, f_console_standard_short_help_s, f_console_standard_long_help_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print this help message.");
+ fll_program_print_help_option(file, context, f_console_standard_short_dark_s, f_console_standard_long_dark_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on dark backgrounds.");
+ fll_program_print_help_option(file, context, f_console_standard_short_light_s, f_console_standard_long_light_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on light backgrounds.");
+ fll_program_print_help_option(file, context, f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, "Do not file in color.");
+ fll_program_print_help_option(file, context, f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Decrease verbosity beyond normal file.");
+ fll_program_print_help_option(file, context, f_console_standard_short_normal_s, f_console_standard_long_normal_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Set verbosity to normal file.");
+ fll_program_print_help_option(file, context, f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Increase verbosity beyond normal file.");
+ fll_program_print_help_option(file, context, f_console_standard_short_debug_s, f_console_standard_long_debug_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Enable debugging, inceasing verbosity beyond normal file.");
+ fll_program_print_help_option(file, context, f_console_standard_short_version_s, f_console_standard_long_version_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Print only the version number.");
- f_print_character(f_string_eol_s[0], output.stream);
+ f_print_character(f_string_eol_s[0], file.stream);
- fll_program_print_help_option(output, context, fss_status_code_short_is_fine, fss_status_code_long_is_fine, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " 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_s, f_console_symbol_long_enable_s, "Print F_true if the error code is a warning, F_false otherwise.");
- fll_program_print_help_option(output, context, fss_status_code_short_is_error, fss_status_code_long_is_error, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print F_true if the error code is an error, F_false otherwise.");
- fll_program_print_help_option(output, context, fss_status_code_short_number, fss_status_code_long_number, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Convert status code name to number.");
+ fll_program_print_help_option(file, context, fss_status_code_short_is_fine, fss_status_code_long_is_fine, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print F_true if the error code is not an error, F_false otherwise.");
+ fll_program_print_help_option(file, context, fss_status_code_short_is_warning, fss_status_code_long_is_warning, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Print F_true if the error code is a warning, F_false otherwise.");
+ fll_program_print_help_option(file, context, fss_status_code_short_is_error, fss_status_code_long_is_error, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print F_true if the error code is an error, F_false otherwise.");
+ fll_program_print_help_option(file, context, fss_status_code_short_number, fss_status_code_long_number, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Convert status code name to number.");
- fll_program_print_help_usage(output, context, fss_status_code_name, "status code(s)");
+ fll_program_print_help_usage(file, context, fss_status_code_name, "status code(s)");
- funlockfile(output.stream);
+ funlockfile(file.stream);
return F_none;
}
}
if (choice == fss_status_code_parameter_verbosity_quiet) {
+ main->output.verbosity = f_console_verbosity_quiet;
main->error.verbosity = f_console_verbosity_quiet;
main->warning.verbosity = f_console_verbosity_quiet;
}
else if (choice == fss_status_code_parameter_verbosity_normal) {
+ main->output.verbosity = f_console_verbosity_normal;
main->error.verbosity = f_console_verbosity_normal;
main->warning.verbosity = f_console_verbosity_normal;
}
else if (choice == fss_status_code_parameter_verbosity_verbose) {
+ main->output.verbosity = f_console_verbosity_verbose;
main->error.verbosity = f_console_verbosity_verbose;
main->warning.verbosity = f_console_verbosity_verbose;
}
else if (choice == fss_status_code_parameter_verbosity_debug) {
+ main->output.verbosity = f_console_verbosity_debug;
main->error.verbosity = f_console_verbosity_debug;
main->warning.verbosity = f_console_verbosity_debug;
}
}
if (main->parameters[fss_status_code_parameter_help].result == f_console_result_found) {
- fss_status_code_print_help(main->output, main->context);
+ fss_status_code_print_help(main->output.to, main->context);
fss_status_code_main_delete(main);
return F_none;
}
if (main->parameters[fss_status_code_parameter_version].result == f_console_result_found) {
- fll_program_print_version(main->output, fss_status_code_version);
+ fll_program_print_version(main->output.to, fss_status_code_version);
fss_status_code_main_delete(main);
return F_none;
}
if (main->remaining.used > 0) {
- flockfile(main->output.stream);
+ flockfile(main->output.to.stream);
for (f_array_length_t i = 0; i < main->remaining.used; ++i) {
}
} // for
- funlockfile(main->output.stream);
+ funlockfile(main->output.to.stream);
}
}
else if (main->parameters[fss_status_code_parameter_number].result == f_console_result_found) {
}
if (main->remaining.used > 0) {
- flockfile(main->output.stream);
+ flockfile(main->output.to.stream);
for (f_array_length_t i = 0; i < main->remaining.used; ++i) {
}
} // for
- funlockfile(main->output.stream);
+ funlockfile(main->output.to.stream);
}
}
else {
}
if (main->remaining.used > 0) {
- flockfile(main->output.stream);
+ flockfile(main->output.to.stream);
for (f_array_length_t i = 0; i < main->remaining.used; ++i) {
status2 = fss_status_code_process_normal(*main, arguments.argv[main->remaining.array[i]]);
}
} // for
- funlockfile(main->output.stream);
+ funlockfile(main->output.to.stream);
}
}
f_array_lengths_t remaining;
bool process_pipe;
- f_file_t output;
+ fl_print_t output;
fl_print_t error;
fl_print_t warning;
fss_status_code_console_parameter_t_initialize, \
f_array_lengths_t_initialize, \
F_false, \
- macro_f_file_t_initialize2(f_type_output, f_type_descriptor_output, f_file_flag_write_only), \
fl_print_t_initialize, \
+ macro_fl_print_t_initialize_error(), \
macro_fl_print_t_initialize_warning(), \
f_color_context_t_initialize, \
}
/**
* Print help.
*
- * @param output
+ * @param file
* The file to print to.
* @param context
* The color context settings.
* F_none on success.
*/
#ifndef _di_fss_status_code_print_help_
- extern f_status_t fss_status_code_print_help(const f_file_t output, const f_color_context_t context);
+ extern f_status_t fss_status_code_print_help(const f_file_t file, const f_color_context_t context);
#endif // _di_fss_status_code_print_help_
/**
if (main.parameters[fss_status_code_parameter_is_error].result == f_console_result_found) {
if (F_status_is_error(number)) {
- f_print_terminated(FL_status_string_true, main.output.stream);
+ f_print_terminated(FL_status_string_true, main.output.to.stream);
}
else {
- f_print_terminated(FL_status_string_false, main.output.stream);
+ f_print_terminated(FL_status_string_false, main.output.to.stream);
}
- f_print_character(f_string_eol_s[0], main.output.stream);
+ f_print_character(f_string_eol_s[0], main.output.to.stream);
}
else if (main.parameters[fss_status_code_parameter_is_warning].result == f_console_result_found) {
if (F_status_is_warning(number)) {
- f_print_terminated(FL_status_string_true, main.output.stream);
+ f_print_terminated(FL_status_string_true, main.output.to.stream);
}
else {
- f_print_terminated(FL_status_string_false, main.output.stream);
+ f_print_terminated(FL_status_string_false, main.output.to.stream);
}
- f_print_character(f_string_eol_s[0], main.output.stream);
+ f_print_character(f_string_eol_s[0], main.output.to.stream);
}
else if (main.parameters[fss_status_code_parameter_is_fine].result == f_console_result_found) {
if (F_status_is_fine(number)) {
- f_print_terminated(FL_status_string_true, main.output.stream);
+ f_print_terminated(FL_status_string_true, main.output.to.stream);
}
else {
- f_print_terminated(FL_status_string_false, main.output.stream);
+ f_print_terminated(FL_status_string_false, main.output.to.stream);
}
- f_print_character(f_string_eol_s[0], main.output.stream);
+ f_print_character(f_string_eol_s[0], main.output.to.stream);
}
return F_none;
status = fl_conversion_string_to_number_unsigned(value, range, &number);
if (status == F_none) {
- fl_print_format("%[invalid name%]%c", main.output.stream, main.context.set.error, main.context.set.error, f_string_eol_s[0]);
+ fl_print_format("%[invalid name%]%c", main.output.to.stream, main.context.set.error, main.context.set.error, 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_print_format("%[invalid main%]%c", main.output.stream, main.context.set.error, main.context.set.error, f_string_eol_s[0]);
+ fl_print_format("%[invalid main%]%c", main.output.to.stream, main.context.set.error, main.context.set.error, f_string_eol_s[0]);
return status;
}
if (F_status_is_error(status)) {
if (F_status_set_fine(status) == F_data) {
- fl_print_format("%[unknown name%]%c", main.output.stream, main.context.set.error, main.context.set.error, f_string_eol_s[0]);
+ fl_print_format("%[unknown name%]%c", main.output.to.stream, main.context.set.error, main.context.set.error, f_string_eol_s[0]);
}
else {
- fl_print_format("%[failed to convert%]%c", main.output.stream, main.context.set.error, main.context.set.error, f_string_eol_s[0]);
+ fl_print_format("%[failed to convert%]%c", main.output.to.stream, main.context.set.error, main.context.set.error, f_string_eol_s[0]);
}
return status;
}
if (status == F_data) {
- fl_print_format("%[unknown code%]%c", main.output.stream, main.context.set.error, main.context.set.error, f_string_eol_s[0]);
+ fl_print_format("%[unknown code%]%c", main.output.to.stream, main.context.set.error, main.context.set.error, f_string_eol_s[0]);
return F_none;
}
- fl_print_format("%ui%c", main.output.stream, code, f_string_eol_s[0]);
+ fl_print_format("%ui%c", main.output.to.stream, code, f_string_eol_s[0]);
return F_none;
}
if (F_status_is_error(status)) {
if (F_status_set_fine(status) == F_data) {
- fl_print_format("%[unknown code%]%c", main.output.stream, main.context.set.error, main.context.set.error, f_string_eol_s[0]);
+ fl_print_format("%[unknown code%]%c", main.output.to.stream, main.context.set.error, main.context.set.error, f_string_eol_s[0]);
}
else {
- fl_print_format("%[failed to convert%]%c", main.output.stream, main.context.set.error, main.context.set.error, f_string_eol_s[0]);
+ fl_print_format("%[failed to convert%]%c", main.output.to.stream, main.context.set.error, main.context.set.error, f_string_eol_s[0]);
}
return status;
}
- fl_print_format("%S%c", main.output.stream, string, f_string_eol_s[0]);
+ fl_print_format("%S%c", main.output.to.stream, string, f_string_eol_s[0]);
return F_none;
}
f_status_t status = fl_conversion_string_to_number_unsigned(value, range, number);
if (*number > F_status_size_max_with_signal) {
- fl_print_format("%[out of range%]%c", main.output.stream, main.context.set.error, main.context.set.error, f_string_eol_s[0]);
+ fl_print_format("%[out of range%]%c", main.output.to.stream, main.context.set.error, main.context.set.error, f_string_eol_s[0]);
return status;
}
if (F_status_is_error(status)) {
if (F_status_set_fine(status) == F_number_negative) {
- fl_print_format("%[out of range%]%c", main.output.stream, main.context.set.error, main.context.set.error, f_string_eol_s[0]);
+ fl_print_format("%[out of range%]%c", main.output.to.stream, main.context.set.error, main.context.set.error, f_string_eol_s[0]);
}
else {
- fl_print_format("%[invalid number%]%c", main.output.stream, main.context.set.error, main.context.set.error, f_string_eol_s[0]);
+ fl_print_format("%[invalid number%]%c", main.output.to.stream, main.context.set.error, main.context.set.error, f_string_eol_s[0]);
}
return status;
#endif
#ifndef _di_iki_read_print_help_
- f_status_t iki_read_print_help(const f_file_t output, const f_color_context_t context) {
+ f_status_t iki_read_print_help(const f_file_t file, const f_color_context_t context) {
- flockfile(output.stream);
+ flockfile(file.stream);
- fll_program_print_help_header(output, context, iki_read_name_long, iki_read_version);
+ fll_program_print_help_header(file, context, iki_read_name_long, iki_read_version);
- fll_program_print_help_option(output, context, f_console_standard_short_help_s, f_console_standard_long_help_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print this help message.");
- fll_program_print_help_option(output, context, f_console_standard_short_dark_s, f_console_standard_long_dark_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on dark backgrounds.");
- fll_program_print_help_option(output, context, f_console_standard_short_light_s, f_console_standard_long_light_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on light backgrounds.");
- fll_program_print_help_option(output, context, f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, "Do not output in color.");
- fll_program_print_help_option(output, context, f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Decrease verbosity beyond normal output.");
- fll_program_print_help_option(output, context, f_console_standard_short_normal_s, f_console_standard_long_normal_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Set verbosity to normal output.");
- fll_program_print_help_option(output, context, f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Increase verbosity beyond normal output.");
- fll_program_print_help_option(output, context, f_console_standard_short_debug_s, f_console_standard_long_debug_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Enable debugging, inceasing verbosity beyond normal output.");
- fll_program_print_help_option(output, context, f_console_standard_short_version_s, f_console_standard_long_version_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Print only the version number.");
+ fll_program_print_help_option(file, context, f_console_standard_short_help_s, f_console_standard_long_help_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print this help message.");
+ fll_program_print_help_option(file, context, f_console_standard_short_dark_s, f_console_standard_long_dark_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on dark backgrounds.");
+ fll_program_print_help_option(file, context, f_console_standard_short_light_s, f_console_standard_long_light_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on light backgrounds.");
+ fll_program_print_help_option(file, context, f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, "Do not file in color.");
+ fll_program_print_help_option(file, context, f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Decrease verbosity beyond normal file.");
+ fll_program_print_help_option(file, context, f_console_standard_short_normal_s, f_console_standard_long_normal_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Set verbosity to normal file.");
+ fll_program_print_help_option(file, context, f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Increase verbosity beyond normal file.");
+ fll_program_print_help_option(file, context, f_console_standard_short_debug_s, f_console_standard_long_debug_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Enable debugging, inceasing verbosity beyond normal file.");
+ fll_program_print_help_option(file, context, f_console_standard_short_version_s, f_console_standard_long_version_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Print only the version number.");
- f_print_character(f_string_eol_s[0], output.stream);
+ f_print_character(f_string_eol_s[0], file.stream);
- fll_program_print_help_option(output, context, iki_read_short_at, iki_read_long_at, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " 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_s, f_console_symbol_long_enable_s, " Print only the variables at the given line within the file.");
- fll_program_print_help_option(output, context, iki_read_short_name, iki_read_long_name, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " 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_s, f_console_symbol_long_enable_s, "Print all of the data instead of just the IKI variable data.");
+ fll_program_print_help_option(file, context, iki_read_short_at, iki_read_long_at, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select variable at this numeric index.");
+ fll_program_print_help_option(file, context, iki_read_short_line, iki_read_long_line, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print only the variables at the given line within the file.");
+ fll_program_print_help_option(file, context, iki_read_short_name, iki_read_long_name, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Select variables with this name.");
+ fll_program_print_help_option(file, context, iki_read_short_whole, iki_read_long_whole, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Print all of the data instead of just the IKI variable data.");
- f_print_character(f_string_eol_s[0], output.stream);
+ f_print_character(f_string_eol_s[0], file.stream);
- fll_program_print_help_option(output, context, iki_read_short_content, iki_read_long_content, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "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_s, f_console_symbol_long_enable_s, "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_s, f_console_symbol_long_enable_s, " 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_s, f_console_symbol_long_enable_s, " Print the total number of variables.");
+ fll_program_print_help_option(file, context, iki_read_short_content, iki_read_long_content, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Print the variable content (default).");
+ fll_program_print_help_option(file, context, iki_read_short_literal, iki_read_long_literal, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Print the entire variable (aka: object, content, and syntax).");
+ fll_program_print_help_option(file, context, iki_read_short_object, iki_read_long_object, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the variable name (aka: object).");
+ fll_program_print_help_option(file, context, iki_read_short_total, iki_read_long_total, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print the total number of variables.");
- f_print_character(f_string_eol_s[0], output.stream);
+ f_print_character(f_string_eol_s[0], file.stream);
- fll_program_print_help_option(output, context, iki_read_short_substitute, iki_read_long_substitute, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Substitute the entire variable for the given name and content value with the given string.");
+ fll_program_print_help_option(file, context, iki_read_short_substitute, iki_read_long_substitute, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Substitute the entire variable for the given name and content value with the given string.");
- fll_program_print_help_usage(output, context, iki_read_name, "filename(s)");
+ fll_program_print_help_usage(file, context, iki_read_name, "filename(s)");
- fl_print_format(" %[Notes:%]%c", output.stream, context.set.important, context.set.important, f_string_eol_s[0]);
- fl_print_format(" This program will find and print variables, vocabularies, or content following the IKI standard, without focusing on any particular vocabulary specification.%c%c", output.stream, f_string_eol_s[0], f_string_eol_s[0]);
+ fl_print_format(" %[Notes:%]%c", file.stream, context.set.important, context.set.important, f_string_eol_s[0]);
+ fl_print_format(" This program will find and print variables, vocabularies, or content following the IKI standard, without focusing on any particular vocabulary specification.%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]);
- fl_print_format(" This %[%s%s%] option, requires 3 additional parameters:", output.stream, context.set.notable, f_console_symbol_long_enable_s, iki_read_long_substitute, context.set.notable);
- fl_print_format(" %[<%]%s%[>%]", output.stream, context.set.notable, context.set.notable, iki_read_substitution_vocabulary, context.set.notable, context.set.notable);
- fl_print_format(" %[<%]%s%[>%]", output.stream, context.set.notable, context.set.notable, iki_read_substitution_replace, context.set.notable, context.set.notable);
- fl_print_format(" %[<%]%s%[>%].%c", output.stream, context.set.notable, context.set.notable, iki_read_substitution_with, context.set.notable, context.set.notable, f_string_eol_s[0]);
+ fl_print_format(" This %[%s%s%] option, requires 3 additional parameters:", file.stream, context.set.notable, f_console_symbol_long_enable_s, iki_read_long_substitute, context.set.notable);
+ fl_print_format(" %[<%]%s%[>%]", file.stream, context.set.notable, context.set.notable, iki_read_substitution_vocabulary, context.set.notable, context.set.notable);
+ fl_print_format(" %[<%]%s%[>%]", file.stream, context.set.notable, context.set.notable, iki_read_substitution_replace, context.set.notable, context.set.notable);
+ fl_print_format(" %[<%]%s%[>%].%c", file.stream, context.set.notable, context.set.notable, iki_read_substitution_with, context.set.notable, context.set.notable, f_string_eol_s[0]);
- fl_print_format(" %[%s%]: The name of the vocabulary whose content is to be substituted.%c", output.stream, context.set.notable, iki_read_substitution_vocabulary, context.set.notable, f_string_eol_s[0]);
- fl_print_format(" %[%s%]: The content matching this exact string will be substituted.%c", output.stream, context.set.notable, iki_read_substitution_replace, context.set.notable, f_string_eol_s[0]);
- fl_print_format(" %[%s%]: The new string to use as the substitute.%c%c", output.stream, context.set.notable, iki_read_substitution_with, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]);
+ fl_print_format(" %[%s%]: The name of the vocabulary whose content is to be substituted.%c", file.stream, context.set.notable, iki_read_substitution_vocabulary, context.set.notable, f_string_eol_s[0]);
+ fl_print_format(" %[%s%]: The content matching this exact string will be substituted.%c", file.stream, context.set.notable, iki_read_substitution_replace, context.set.notable, f_string_eol_s[0]);
+ fl_print_format(" %[%s%]: The new string to use as the substitute.%c%c", file.stream, context.set.notable, iki_read_substitution_with, context.set.notable, f_string_eol_s[0], f_string_eol_s[0]);
- fl_print_format(" The vocabulary and replacement are case-sensitive and must exactly match.%c%c", output.stream, f_string_eol_s[0], f_string_eol_s[0]);
+ fl_print_format(" The vocabulary and replacement are case-sensitive and must exactly match.%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]);
- fl_print_format(" The default behavior is to only display content portion of the IKI variable.%c%c", output.stream, f_string_eol_s[0], f_string_eol_s[0]);
+ fl_print_format(" The default behavior is to only display content portion of the IKI variable.%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]);
- funlockfile(output.stream);
+ funlockfile(file.stream);
return F_none;
}
}
if (choice == iki_read_parameter_verbosity_quiet) {
+ main->output.verbosity = f_console_verbosity_quiet;
main->error.verbosity = f_console_verbosity_quiet;
main->warning.verbosity = f_console_verbosity_quiet;
}
else if (choice == iki_read_parameter_verbosity_normal) {
+ main->output.verbosity = f_console_verbosity_normal;
main->error.verbosity = f_console_verbosity_normal;
main->warning.verbosity = f_console_verbosity_normal;
}
else if (choice == iki_read_parameter_verbosity_verbose) {
+ main->output.verbosity = f_console_verbosity_verbose;
main->error.verbosity = f_console_verbosity_verbose;
main->warning.verbosity = f_console_verbosity_verbose;
}
else if (choice == iki_read_parameter_verbosity_debug) {
+ main->output.verbosity = f_console_verbosity_debug;
main->error.verbosity = f_console_verbosity_debug;
main->warning.verbosity = f_console_verbosity_debug;
}
}
if (main->parameters[iki_read_parameter_help].result == f_console_result_found) {
- iki_read_print_help(main->output, main->context);
+ iki_read_print_help(main->output.to, main->context);
iki_read_main_delete(main);
return F_none;
}
if (main->parameters[iki_read_parameter_version].result == f_console_result_found) {
- fll_program_print_version(main->output, iki_read_version);
+ fll_program_print_version(main->output.to, iki_read_version);
iki_read_main_delete(main);
return F_none;
f_array_lengths_t remaining;
bool process_pipe;
- f_file_t output;
+ fl_print_t output;
fl_print_t error;
fl_print_t warning;
iki_read_console_parameter_t_initialize, \
f_array_lengths_t_initialize, \
F_false, \
- macro_f_file_t_initialize2(f_type_output, f_type_descriptor_output, f_file_flag_write_only), \
fl_print_t_initialize, \
+ macro_fl_print_t_initialize_error(), \
macro_fl_print_t_initialize_warning(), \
0, \
0, \
/**
* Print help.
*
- * @param output
+ * @param file
* The file to print to.
* @param context
* The color context settings.
* F_none on success.
*/
#ifndef _di_iki_read_print_help_
- extern f_status_t iki_read_print_help(const f_file_t output, const f_color_context_t context);
+ extern f_status_t iki_read_print_help(const f_file_t file, const f_color_context_t context);
#endif // _di_iki_read_print_help_
/**
buffer_range->stop = name.used - 1;
- flockfile(main->output.stream);
+ flockfile(main->output.to.stream);
for (j = 0; j < vocabulary->used; ++j) {
iki_read_substitutions_print(*main, *variable, *content, *ranges, substitutionss[j], j, content_only);
}
else {
- f_print_dynamic_partial(main->buffer, ranges->array[j], main->output.stream);
+ f_print_dynamic_partial(main->buffer, ranges->array[j], main->output.to.stream);
}
- f_print_character(f_string_eol_s[0], main->output.stream);
+ f_print_character(f_string_eol_s[0], main->output.to.stream);
}
} // for
- funlockfile(main->output.stream);
+ funlockfile(main->output.to.stream);
} // for
macro_f_string_dynamic_t_delete_simple(name);
else if (ranges->used) {
if (main->parameters[iki_read_parameter_at].result == f_console_result_additional) {
if (main->at < ranges->used) {
- flockfile(main->output.stream);
+ flockfile(main->output.to.stream);
if (substitutionss[main->at].used) {
iki_read_substitutions_print(*main, *variable, *content, *ranges, substitutionss[main->at], main->at, content_only);
}
else {
- f_print_dynamic_partial(main->buffer, ranges->array[main->at], main->output.stream);
+ f_print_dynamic_partial(main->buffer, ranges->array[main->at], main->output.to.stream);
}
- f_print_character(f_string_eol_s[0], main->output.stream);
+ f_print_character(f_string_eol_s[0], main->output.to.stream);
- funlockfile(main->output.stream);
+ funlockfile(main->output.to.stream);
status = F_none;
}
}
}
else {
- flockfile(main->output.stream);
+ flockfile(main->output.to.stream);
for (f_array_length_t i = 0; i < ranges->used; ++i) {
iki_read_substitutions_print(*main, *variable, *content, *ranges, substitutionss[i], i, content_only);
}
else {
- f_print_dynamic_partial(main->buffer, ranges->array[i], main->output.stream);
+ f_print_dynamic_partial(main->buffer, ranges->array[i], main->output.to.stream);
}
- f_print_character(f_string_eol_s[0], main->output.stream);
+ f_print_character(f_string_eol_s[0], main->output.to.stream);
} // for
- funlockfile(main->output.stream);
+ funlockfile(main->output.to.stream);
status = F_none;
}
}
if (!variable->used) {
- fll_print_dynamic_partial(main->buffer, buffer_range, main->output.stream);
+ fll_print_dynamic_partial(main->buffer, buffer_range, main->output.to.stream);
return F_none;
}
range = buffer_range;
name_range.start = 0;
- flockfile(main->output.stream);
+ flockfile(main->output.to.stream);
while (i <= range.stop && j < stop) {
range.start = i;
range.stop = variable->array[j].start - 1;
- f_print_dynamic_partial(main->buffer, range, main->output.stream);
+ f_print_dynamic_partial(main->buffer, range, main->output.to.stream);
range.start = variable->array[j].stop + 1;
range.stop = buffer_range.stop;
iki_read_substitutions_print(*main, *variable, *content, *variable, substitutionss[j], j, F_false);
}
else {
- f_print_dynamic_partial(main->buffer, variable->array[j], main->output.stream);
+ f_print_dynamic_partial(main->buffer, variable->array[j], main->output.to.stream);
}
}
else {
iki_read_substitutions_print(*main, *variable, *content, *ranges, substitutionss[j], j, content_only);
}
else {
- f_print_dynamic_partial(main->buffer, ranges->array[j], main->output.stream);
+ f_print_dynamic_partial(main->buffer, ranges->array[j], main->output.to.stream);
}
}
}
iki_read_substitutions_print(*main, *variable, *content, *ranges, substitutionss[j], j, content_only);
}
else {
- f_print_dynamic_partial(main->buffer, ranges->array[j], main->output.stream);
+ f_print_dynamic_partial(main->buffer, ranges->array[j], main->output.to.stream);
}
}
if (i <= buffer_range.stop) {
range.start = i;
- f_print_dynamic_partial(main->buffer, range, main->output.stream);
+ f_print_dynamic_partial(main->buffer, range, main->output.to.stream);
}
- funlockfile(main->output.stream);
+ funlockfile(main->output.to.stream);
}
for (f_array_length_t i = 0; i < variable->used; ++i) {
if (status == F_true) {
if (range.start > main->buffer.used) {
- fll_print_format("0%c", main->output.stream, f_string_eol_s[0]);
+ fll_print_format("0%c", main->output.to.stream, f_string_eol_s[0]);
return F_none;
}
}
else if (status == F_data_not) {
- fll_print_format("0%c", main->output.stream, f_string_eol_s[0]);
+ fll_print_format("0%c", main->output.to.stream, f_string_eol_s[0]);
return F_none;
}
}
}
- fll_print_format("%ul%c", main->output.stream, total, f_string_eol_s[0]);
+ fll_print_format("%ul%c", main->output.to.stream, total, f_string_eol_s[0]);
return F_none;
}
if (status == F_equal_to) {
if (content_only) {
- f_print_dynamic(substitutions.array[i].with, main.output.stream);
+ f_print_dynamic(substitutions.array[i].with, main.output.to.stream);
}
else {
range.start = variable.array[index].start;
range.stop = content.array[index].start - 1;
- f_print_dynamic_partial(main.buffer, range, main.output.stream);
+ f_print_dynamic_partial(main.buffer, range, main.output.to.stream);
- f_print_dynamic(substitutions.array[i].with, main.output.stream);
+ f_print_dynamic(substitutions.array[i].with, main.output.to.stream);
range.start = content.array[index].stop + 1;
range.stop = variable.array[index].stop;
- f_print_dynamic_partial(main.buffer, range, main.output.stream);
+ f_print_dynamic_partial(main.buffer, range, main.output.to.stream);
}
}
else {
- f_print_dynamic_partial(main.buffer, ranges.array[index], main.output.stream);
+ f_print_dynamic_partial(main.buffer, ranges.array[index], main.output.to.stream);
}
}
#endif // _di_iki_read_substitutions_print_
#endif
#ifndef _di_iki_write_print_help_
- f_status_t iki_write_print_help(const f_file_t output, const f_color_context_t context) {
+ f_status_t iki_write_print_help(const f_file_t file, const f_color_context_t context) {
- flockfile(output.stream);
+ flockfile(file.stream);
- fll_program_print_help_header(output, context, iki_write_name_long, iki_write_version);
+ fll_program_print_help_header(file, context, iki_write_name_long, iki_write_version);
- fll_program_print_help_option(output, context, f_console_standard_short_help_s, f_console_standard_long_help_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print this help message.");
- fll_program_print_help_option(output, context, f_console_standard_short_dark_s, f_console_standard_long_dark_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on dark backgrounds.");
- fll_program_print_help_option(output, context, f_console_standard_short_light_s, f_console_standard_long_light_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on light backgrounds.");
- fll_program_print_help_option(output, context, f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, "Do not output in color.");
- fll_program_print_help_option(output, context, f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Decrease verbosity beyond normal output.");
- fll_program_print_help_option(output, context, f_console_standard_short_normal_s, f_console_standard_long_normal_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Set verbosity to normal output.");
- fll_program_print_help_option(output, context, f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Increase verbosity beyond normal output.");
- fll_program_print_help_option(output, context, f_console_standard_short_debug_s, f_console_standard_long_debug_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Enable debugging, inceasing verbosity beyond normal output.");
- fll_program_print_help_option(output, context, f_console_standard_short_version_s, f_console_standard_long_version_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Print only the version number.");
+ fll_program_print_help_option(file, context, f_console_standard_short_help_s, f_console_standard_long_help_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print this help message.");
+ fll_program_print_help_option(file, context, f_console_standard_short_dark_s, f_console_standard_long_dark_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on dark backgrounds.");
+ fll_program_print_help_option(file, context, f_console_standard_short_light_s, f_console_standard_long_light_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on light backgrounds.");
+ fll_program_print_help_option(file, context, f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, "Do not file in color.");
+ fll_program_print_help_option(file, context, f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Decrease verbosity beyond normal file.");
+ fll_program_print_help_option(file, context, f_console_standard_short_normal_s, f_console_standard_long_normal_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Set verbosity to normal file.");
+ fll_program_print_help_option(file, context, f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Increase verbosity beyond normal file.");
+ fll_program_print_help_option(file, context, f_console_standard_short_debug_s, f_console_standard_long_debug_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Enable debugging, inceasing verbosity beyond normal file.");
+ fll_program_print_help_option(file, context, f_console_standard_short_version_s, f_console_standard_long_version_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Print only the version number.");
- f_print_character(f_string_eol_s[0], output.stream);
+ f_print_character(f_string_eol_s[0], file.stream);
- fll_program_print_help_option(output, context, iki_write_short_file, iki_write_long_file, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " 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_s, f_console_symbol_long_enable_s, "The content to output.");
- fll_program_print_help_option(output, context, iki_write_short_double, iki_write_long_double, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Use double quotes (default).");
- fll_program_print_help_option(output, context, iki_write_short_object, iki_write_long_object, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " The object to output.");
- fll_program_print_help_option(output, context, iki_write_short_single, iki_write_long_single, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Use single quotes.");
+ fll_program_print_help_option(file, context, iki_write_short_file, iki_write_long_file, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Specify a file to send file to.");
+ fll_program_print_help_option(file, context, iki_write_short_content, iki_write_long_content, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "The content to file.");
+ fll_program_print_help_option(file, context, iki_write_short_double, iki_write_long_double, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Use double quotes (default).");
+ fll_program_print_help_option(file, context, iki_write_short_object, iki_write_long_object, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " The object to file.");
+ fll_program_print_help_option(file, context, iki_write_short_single, iki_write_long_single, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Use single quotes.");
- fll_program_print_help_usage(output, context, iki_write_name, f_string_empty_s);
+ fll_program_print_help_usage(file, context, iki_write_name, f_string_empty_s);
- fl_print_format(" %[Notes:%]%c", output.stream, context.set.important, context.set.important, f_string_eol_s[0]);
- fl_print_format(" This program will accept object and content strings to generate an IKI string, such as %[object:\"content\"%].%c", output.stream, context.set.notable, context.set.notable, f_string_eol_s[0]);
+ fl_print_format(" %[Notes:%]%c", file.stream, context.set.important, context.set.important, f_string_eol_s[0]);
+ fl_print_format(" This program will accept object and content strings to generate an IKI string, such as %[object:\"content\"%].%c", file.stream, context.set.notable, context.set.notable, f_string_eol_s[0]);
- fl_print_format(" Each object must have a content (and each content must have an object).%c%c", output.stream, f_string_eol_s[0], f_string_eol_s[0]);
+ fl_print_format(" Each object must have a content (and each content must have an object).%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]);
- fl_print_format(" When piping main to this program, a single end of line (\\n) must be used to separate each object from each content.%c", output.stream, f_string_eol_s[0]);
- fl_print_format(" Furthermore, each object must be followed by a content.%c%c", output.stream, f_string_eol_s[0], f_string_eol_s[0]);
+ fl_print_format(" When piping main to this program, a single end of line (\\n) must be used to separate each object from each content.%c", file.stream, f_string_eol_s[0]);
+ fl_print_format(" Furthermore, each object must be followed by a content.%c%c", file.stream, f_string_eol_s[0], f_string_eol_s[0]);
- funlockfile(output.stream);
+ funlockfile(file.stream);
return F_none;
}
}
if (choice == iki_write_parameter_verbosity_quiet) {
+ main->output.verbosity = f_console_verbosity_quiet;
main->error.verbosity = f_console_verbosity_quiet;
main->warning.verbosity = f_console_verbosity_quiet;
}
else if (choice == iki_write_parameter_verbosity_normal) {
+ main->output.verbosity = f_console_verbosity_normal;
main->error.verbosity = f_console_verbosity_normal;
main->warning.verbosity = f_console_verbosity_normal;
}
else if (choice == iki_write_parameter_verbosity_verbose) {
+ main->output.verbosity = f_console_verbosity_verbose;
main->error.verbosity = f_console_verbosity_verbose;
main->warning.verbosity = f_console_verbosity_verbose;
}
else if (choice == iki_write_parameter_verbosity_debug) {
+ main->output.verbosity = f_console_verbosity_debug;
main->error.verbosity = f_console_verbosity_debug;
main->warning.verbosity = f_console_verbosity_debug;
}
}
if (main->parameters[iki_write_parameter_help].result == f_console_result_found) {
- iki_write_print_help(main->output, main->context);
+ iki_write_print_help(main->output.to, main->context);
iki_write_main_delete(main);
return F_none;
}
if (main->parameters[iki_write_parameter_version].result == f_console_result_found) {
- fll_program_print_version(main->output, iki_write_version);
+ fll_program_print_version(main->output.to, iki_write_version);
iki_write_main_delete(main);
return F_none;
}
- f_file_t output = f_file_t_initialize;
+ f_file_t file = f_file_t_initialize;
- output.id = f_type_descriptor_output;
- output.stream = f_type_output;
- output.flag = f_file_flag_create | f_file_flag_write_only | f_file_flag_append;
+ file.id = f_type_descriptor_output;
+ file.stream = f_type_output;
+ file.flag = f_file_flag_create | f_file_flag_write_only | f_file_flag_append;
if (F_status_is_error_not(status)) {
if (main->parameters[iki_write_parameter_file].result == f_console_result_additional) {
else {
const f_array_length_t location = main->parameters[iki_write_parameter_file].values.array[0];
- output.id = -1;
- output.stream = 0;
+ file.id = -1;
+ file.stream = 0;
- status = f_file_stream_open(arguments.argv[location], 0, &output);
+ status = f_file_stream_open(arguments.argv[location], 0, &file);
if (F_status_is_error(status)) {
fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_open", F_true, arguments.argv[location], "open", fll_error_file_type_file);
}
}
- status = iki_write_process(*main, output, object, content, quote, &escaped);
+ status = iki_write_process(*main, file, object, content, quote, &escaped);
if (F_status_is_error(status)) break;
- fll_print_character(f_string_eol_s[0], output.stream);
+ fll_print_character(f_string_eol_s[0], file.stream);
object_ended = F_false;
}
content.used = strnlen(content.string, f_console_parameter_size);
content.size = content.used;
- status = iki_write_process(*main, output, object, content, quote, &escaped);
+ status = iki_write_process(*main, file, object, content, quote, &escaped);
if (F_status_is_error(status)) break;
- fll_print_character(f_string_eol_s[0], output.stream);
+ fll_print_character(f_string_eol_s[0], file.stream);
} // for
// ensure there is always a newline at the end, unless in quiet mode.
if (F_status_is_error_not(status) && main->error.verbosity != f_console_verbosity_quiet && main->parameters[iki_write_parameter_file].result == f_console_result_none) {
- fll_print_character(f_string_eol_s[0], output.stream);
+ fll_print_character(f_string_eol_s[0], file.stream);
}
}
}
if (main->parameters[iki_write_parameter_file].result == f_console_result_additional) {
- if (output.id != -1) {
- f_file_stream_close(F_true, &output);
+ if (file.id != -1) {
+ f_file_stream_close(F_true, &file);
}
}
f_array_lengths_t remaining;
bool process_pipe;
- f_file_t output;
+ fl_print_t output;
fl_print_t error;
fl_print_t warning;
iki_write_console_parameter_t_initialize, \
f_array_lengths_t_initialize, \
F_false, \
- macro_f_file_t_initialize2(f_type_output, f_type_descriptor_output, f_file_flag_write_only), \
fl_print_t_initialize, \
+ macro_fl_print_t_initialize_error(), \
macro_fl_print_t_initialize_warning(), \
f_string_dynamic_t_initialize, \
f_color_context_t_initialize, \
/**
* Print help.
*
- * @param output
+ * @param file
* The file to print to.
* @param context
* The color context settings.
* F_none on success.
*/
#ifndef _di_iki_write_print_help_
- extern f_status_t iki_write_print_help(const f_file_t output, const f_color_context_t context);
+ extern f_status_t iki_write_print_help(const f_file_t file, const f_color_context_t context);
#endif // _di_iki_write_print_help_
/**
if (main.parameters[status_code_parameter_is_error].result == f_console_result_found) {
if (F_status_is_error(number)) {
- f_print_terminated(FL_status_string_true, main.output.stream);
+ f_print_terminated(FL_status_string_true, main.output.to.stream);
}
else {
- f_print_terminated(FL_status_string_false, main.output.stream);
+ f_print_terminated(FL_status_string_false, main.output.to.stream);
}
- f_print_character(f_string_eol_s[0], main.output.stream);
+ f_print_character(f_string_eol_s[0], main.output.to.stream);
}
else if (main.parameters[status_code_parameter_is_warning].result == f_console_result_found) {
if (F_status_is_warning(number)) {
- f_print_terminated(FL_status_string_true, main.output.stream);
+ f_print_terminated(FL_status_string_true, main.output.to.stream);
}
else {
- f_print_terminated(FL_status_string_false, main.output.stream);
+ f_print_terminated(FL_status_string_false, main.output.to.stream);
}
- f_print_character(f_string_eol_s[0], main.output.stream);
+ f_print_character(f_string_eol_s[0], main.output.to.stream);
}
else if (main.parameters[status_code_parameter_is_fine].result == f_console_result_found) {
if (F_status_is_fine(number)) {
- f_print_terminated(FL_status_string_true, main.output.stream);
+ f_print_terminated(FL_status_string_true, main.output.to.stream);
}
else {
- f_print_terminated(FL_status_string_false, main.output.stream);
+ f_print_terminated(FL_status_string_false, main.output.to.stream);
}
- f_print_character(f_string_eol_s[0], main.output.stream);
+ f_print_character(f_string_eol_s[0], main.output.to.stream);
}
return F_none;
status = fl_conversion_string_to_number_unsigned(value, range, &number);
if (status == F_none) {
- fl_print_format("%[invalid name%]%c", main.output.stream, main.context.set.error, main.context.set.error, f_string_eol_s[0]);
+ fl_print_format("%[invalid name%]%c", main.output.to.stream, main.context.set.error, main.context.set.error, 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_print_format("%[invalid main%]%c", main.output.stream, main.context.set.error, main.context.set.error, f_string_eol_s[0]);
+ fl_print_format("%[invalid main%]%c", main.output.to.stream, main.context.set.error, main.context.set.error, f_string_eol_s[0]);
return status;
}
if (F_status_is_error(status)) {
if (F_status_set_fine(status) == F_data) {
- fl_print_format("%[unknown name%]%c", main.output.stream, main.context.set.error, main.context.set.error, f_string_eol_s[0]);
+ fl_print_format("%[unknown name%]%c", main.output.to.stream, main.context.set.error, main.context.set.error, f_string_eol_s[0]);
}
else {
- fl_print_format("%[failed to convert%]%c", main.output.stream, main.context.set.error, main.context.set.error, f_string_eol_s[0]);
+ fl_print_format("%[failed to convert%]%c", main.output.to.stream, main.context.set.error, main.context.set.error, f_string_eol_s[0]);
}
return status;
}
if (status == F_data) {
- fl_print_format("%[unknown code%]%c", main.output.stream, main.context.set.error, main.context.set.error, f_string_eol_s[0]);
+ fl_print_format("%[unknown code%]%c", main.output.to.stream, main.context.set.error, main.context.set.error, f_string_eol_s[0]);
return F_none;
}
- fl_print_format("%ui%c", main.output.stream, code, f_string_eol_s[0]);
+ fl_print_format("%ui%c", main.output.to.stream, code, f_string_eol_s[0]);
return F_none;
}
if (F_status_is_error(status)) {
if (F_status_set_fine(status) == F_data) {
- fl_print_format("%[unknown code%]%c", main.output.stream, main.context.set.error, main.context.set.error, f_string_eol_s[0]);
+ fl_print_format("%[unknown code%]%c", main.output.to.stream, main.context.set.error, main.context.set.error, f_string_eol_s[0]);
}
else {
- fl_print_format("%[failed to convert%]%c", main.output.stream, main.context.set.error, main.context.set.error, f_string_eol_s[0]);
+ fl_print_format("%[failed to convert%]%c", main.output.to.stream, main.context.set.error, main.context.set.error, f_string_eol_s[0]);
}
return status;
}
- fl_print_format("%S%c", main.output.stream, string, f_string_eol_s[0]);
+ fl_print_format("%S%c", main.output.to.stream, string, f_string_eol_s[0]);
return F_none;
}
f_status_t status = fl_conversion_string_to_number_unsigned(value, range, number);
if (*number > F_status_size_max_with_signal) {
- fl_print_format("%[out of range%]%c", main.output.stream, main.context.set.error, main.context.set.error, f_string_eol_s[0]);
+ fl_print_format("%[out of range%]%c", main.output.to.stream, main.context.set.error, main.context.set.error, f_string_eol_s[0]);
return status;
}
if (F_status_is_error(status)) {
if (F_status_set_fine(status) == F_number_negative) {
- fl_print_format("%[out of range%]%c", main.output.stream, main.context.set.error, main.context.set.error, f_string_eol_s[0]);
+ fl_print_format("%[out of range%]%c", main.output.to.stream, main.context.set.error, main.context.set.error, f_string_eol_s[0]);
}
else {
- fl_print_format("%[invalid number%]%c", main.output.stream, main.context.set.error, main.context.set.error, f_string_eol_s[0]);
+ fl_print_format("%[invalid number%]%c", main.output.to.stream, main.context.set.error, main.context.set.error, f_string_eol_s[0]);
}
return status;
#endif
#ifndef _di_status_code_print_help_
- f_status_t status_code_print_help(const f_file_t output, const f_color_context_t context) {
+ f_status_t status_code_print_help(const f_file_t file, const f_color_context_t context) {
- flockfile(output.stream);
+ flockfile(file.stream);
- fll_program_print_help_header(output, context, status_code_name_long, status_code_version);
+ fll_program_print_help_header(file, context, status_code_name_long, status_code_version);
- fll_program_print_help_option(output, context, f_console_standard_short_help_s, f_console_standard_long_help_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print this help message.");
- fll_program_print_help_option(output, context, f_console_standard_short_dark_s, f_console_standard_long_dark_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on dark backgrounds.");
- fll_program_print_help_option(output, context, f_console_standard_short_light_s, f_console_standard_long_light_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on light backgrounds.");
- fll_program_print_help_option(output, context, f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, "Do not output in color.");
- fll_program_print_help_option(output, context, f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Decrease verbosity beyond normal output.");
- fll_program_print_help_option(output, context, f_console_standard_short_normal_s, f_console_standard_long_normal_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Set verbosity to normal output.");
- fll_program_print_help_option(output, context, f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Increase verbosity beyond normal output.");
- fll_program_print_help_option(output, context, f_console_standard_short_debug_s, f_console_standard_long_debug_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Enable debugging, inceasing verbosity beyond normal output.");
- fll_program_print_help_option(output, context, f_console_standard_short_version_s, f_console_standard_long_version_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Print only the version number.");
+ fll_program_print_help_option(file, context, f_console_standard_short_help_s, f_console_standard_long_help_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print this help message.");
+ fll_program_print_help_option(file, context, f_console_standard_short_dark_s, f_console_standard_long_dark_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on dark backgrounds.");
+ fll_program_print_help_option(file, context, f_console_standard_short_light_s, f_console_standard_long_light_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Output using colors that show up better on light backgrounds.");
+ fll_program_print_help_option(file, context, f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, "Do not file in color.");
+ fll_program_print_help_option(file, context, f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Decrease verbosity beyond normal file.");
+ fll_program_print_help_option(file, context, f_console_standard_short_normal_s, f_console_standard_long_normal_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Set verbosity to normal file.");
+ fll_program_print_help_option(file, context, f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Increase verbosity beyond normal file.");
+ fll_program_print_help_option(file, context, f_console_standard_short_debug_s, f_console_standard_long_debug_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Enable debugging, inceasing verbosity beyond normal file.");
+ fll_program_print_help_option(file, context, f_console_standard_short_version_s, f_console_standard_long_version_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, " Print only the version number.");
- f_print_character(f_string_eol_s[0], output.stream);
+ f_print_character(f_string_eol_s[0], file.stream);
- fll_program_print_help_option(output, context, status_code_short_is_fine, status_code_long_is_fine, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " 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_s, f_console_symbol_long_enable_s, "Print F_true if the error code is a warning, F_false otherwise.");
- fll_program_print_help_option(output, context, status_code_short_is_error, status_code_long_is_error, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print F_true if the error code is an error, F_false otherwise.");
- fll_program_print_help_option(output, context, status_code_short_number, status_code_long_number, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Convert status code name to number.");
+ fll_program_print_help_option(file, context, status_code_short_is_fine, status_code_long_is_fine, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print F_true if the error code is not an error, F_false otherwise.");
+ fll_program_print_help_option(file, context, status_code_short_is_warning, status_code_long_is_warning, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "Print F_true if the error code is a warning, F_false otherwise.");
+ fll_program_print_help_option(file, context, status_code_short_is_error, status_code_long_is_error, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Print F_true if the error code is an error, F_false otherwise.");
+ fll_program_print_help_option(file, context, status_code_short_number, status_code_long_number, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " Convert status code name to number.");
- fll_program_print_help_usage(output, context, status_code_name, "status code(s)");
+ fll_program_print_help_usage(file, context, status_code_name, "status code(s)");
- funlockfile(output.stream);
+ funlockfile(file.stream);
return F_none;
}
}
if (choice == status_code_parameter_verbosity_quiet) {
+ main->output.verbosity = f_console_verbosity_quiet;
main->error.verbosity = f_console_verbosity_quiet;
main->warning.verbosity = f_console_verbosity_quiet;
}
else if (choice == status_code_parameter_verbosity_normal) {
+ main->output.verbosity = f_console_verbosity_normal;
main->error.verbosity = f_console_verbosity_normal;
main->warning.verbosity = f_console_verbosity_normal;
}
else if (choice == status_code_parameter_verbosity_verbose) {
+ main->output.verbosity = f_console_verbosity_verbose;
main->error.verbosity = f_console_verbosity_verbose;
main->warning.verbosity = f_console_verbosity_verbose;
}
else if (choice == status_code_parameter_verbosity_debug) {
+ main->output.verbosity = f_console_verbosity_debug;
main->error.verbosity = f_console_verbosity_debug;
main->warning.verbosity = f_console_verbosity_debug;
}
}
if (main->parameters[status_code_parameter_help].result == f_console_result_found) {
- status_code_print_help(main->output, main->context);
+ status_code_print_help(main->output.to, main->context);
status_code_main_delete(main);
return F_none;
}
if (main->parameters[status_code_parameter_version].result == f_console_result_found) {
- fll_program_print_version(main->output, status_code_version);
+ fll_program_print_version(main->output.to, status_code_version);
status_code_main_delete(main);
return F_none;
}
if (main->remaining.used > 0) {
- flockfile(main->output.stream);
+ flockfile(main->output.to.stream);
for (f_array_length_t i = 0; i < main->remaining.used; ++i) {
}
} // for
- funlockfile(main->output.stream);
+ funlockfile(main->output.to.stream);
}
}
else if (main->parameters[status_code_parameter_number].result == f_console_result_found) {
}
if (main->remaining.used > 0) {
- flockfile(main->output.stream);
+ flockfile(main->output.to.stream);
for (f_array_length_t i = 0; i < main->remaining.used; ++i) {
}
} // for
- funlockfile(main->output.stream);
+ funlockfile(main->output.to.stream);
}
}
else {
}
if (main->remaining.used > 0) {
- flockfile(main->output.stream);
+ flockfile(main->output.to.stream);
for (f_array_length_t i = 0; i < main->remaining.used; ++i) {
}
} // for
- funlockfile(main->output.stream);
+ funlockfile(main->output.to.stream);
}
}
f_array_lengths_t remaining;
bool process_pipe;
- f_file_t output;
+ fl_print_t output;
fl_print_t error;
fl_print_t warning;
status_code_console_parameter_t_initialize, \
f_array_lengths_t_initialize, \
F_false, \
- macro_f_file_t_initialize2(f_type_output, f_type_descriptor_output, f_file_flag_write_only), \
fl_print_t_initialize, \
+ macro_fl_print_t_initialize_error(), \
macro_fl_print_t_initialize_warning(), \
f_color_context_t_initialize, \
}
/**
* Print help.
*
- * @param output
+ * @param file
* The file to print to.
* @param context
* The color context settings.
* F_none on success.
*/
#ifndef _di_status_code_print_help_
- extern f_status_t status_code_print_help(const f_file_t output, const f_color_context_t context);
+ extern f_status_t status_code_print_help(const f_file_t file, const f_color_context_t context);
#endif // _di_status_code_print_help_
/**