I did some reviewing of how the enumerations used for flags are used.
These generally are not being used as a type.
An enumeration slightly increases the resulting binary size.
Enumeration values might be limited to just type of int.
This seems like an easy (small) optimization to just use defines rather than enumerations for flags and other bit-wise numbers.
main->setting.state.status = F_okay;
- if (main->setting.flag & byte_dump_main_flag_version_copyright_help_e) {
- if (main->setting.flag & byte_dump_main_flag_help_e) {
+ if (main->setting.flag & byte_dump_main_flag_version_copyright_help_d) {
+ if (main->setting.flag & byte_dump_main_flag_help_d) {
byte_dump_print_message_help(&main->program.message);
}
- else if (main->setting.flag & byte_dump_main_flag_version_e) {
+ else if (main->setting.flag & byte_dump_main_flag_version_d) {
fll_program_print_version(&main->program.message, byte_dump_program_version_s);
}
- else if (main->setting.flag & byte_dump_main_flag_copyright_e) {
+ else if (main->setting.flag & byte_dump_main_flag_copyright_d) {
fll_program_print_copyright(&main->program.message, fll_program_copyright_year_author_s);
}
if (main->setting.files.used || (main->program.pipe & fll_program_data_pipe_input_e)) {
f_file_t file = f_file_t_initialize;
- if (main->setting.flag & byte_dump_main_flag_pipe_e) {
+ if (main->setting.flag & byte_dump_main_flag_pipe_d) {
file.id = F_type_descriptor_input_d;
file.stream = F_type_input_d;
}
if (choices.array[choice] == byte_dump_parameter_narrow_e) {
- main->setting.flag &= ~byte_dump_main_flag_wide_e;
+ main->setting.flag &= ~byte_dump_main_flag_wide_d;
}
else if (choices.array[choice] == byte_dump_parameter_wide_e) {
- main->setting.flag |= byte_dump_main_flag_wide_e;
+ main->setting.flag |= byte_dump_main_flag_wide_d;
}
}
}
if (main->program.parameters.array[f_console_standard_parameter_help_e].result & f_console_result_found_e) {
- main->setting.flag |= byte_dump_main_flag_help_e;
+ main->setting.flag |= byte_dump_main_flag_help_d;
return;
}
if (main->program.parameters.array[f_console_standard_parameter_version_e].result & f_console_result_found_e) {
- main->setting.flag |= byte_dump_main_flag_version_e;
+ main->setting.flag |= byte_dump_main_flag_version_d;
return;
}
if (main->program.parameters.array[f_console_standard_parameter_copyright_e].result & f_console_result_found_e) {
- main->setting.flag |= byte_dump_main_flag_copyright_e;
+ main->setting.flag |= byte_dump_main_flag_copyright_d;
return;
}
f_number_unsigned_t number = 0;
if (main->program.pipe & fll_program_data_pipe_input_e) {
- main->setting.flag |= byte_dump_main_flag_pipe_e;
+ main->setting.flag |= byte_dump_main_flag_pipe_d;
}
else {
- main->setting.flag &= ~byte_dump_main_flag_pipe_e;
+ main->setting.flag &= ~byte_dump_main_flag_pipe_d;
}
if (main->program.parameters.array[byte_dump_parameter_width_e].result & f_console_result_value_e) {
};
const uint16_t flags[] = {
- byte_dump_main_flag_first_e,
- byte_dump_main_flag_last_e,
+ byte_dump_main_flag_first_d,
+ byte_dump_main_flag_last_d,
};
uint64_t * const values[] = {
}
} // for
- if ((main->setting.flag & byte_dump_main_flag_first_e) && (main->setting.flag & byte_dump_main_flag_last_e)) {
+ if ((main->setting.flag & byte_dump_main_flag_first_d) && (main->setting.flag & byte_dump_main_flag_last_d)) {
if (main->setting.first > main->setting.last) {
main->setting.state.status = F_status_set_error(F_parameter);
}
if (main->program.parameters.array[byte_dump_parameter_text_e].result & f_console_result_found_e) {
- main->setting.flag |= byte_dump_main_flag_text_e;
+ main->setting.flag |= byte_dump_main_flag_text_d;
}
else {
- main->setting.flag &= ~byte_dump_main_flag_text_e;
+ main->setting.flag &= ~byte_dump_main_flag_text_d;
}
if (main->program.parameters.array[byte_dump_parameter_unicode_e].result & f_console_result_found_e) {
- main->setting.flag |= byte_dump_main_flag_unicode_e;
+ main->setting.flag |= byte_dump_main_flag_unicode_d;
}
else {
- main->setting.flag &= ~byte_dump_main_flag_unicode_e;
+ main->setting.flag &= ~byte_dump_main_flag_unicode_d;
}
if (main->program.parameters.array[byte_dump_parameter_placeholder_e].result & f_console_result_found_e) {
- main->setting.flag |= byte_dump_main_flag_placeholder_e;
+ main->setting.flag |= byte_dump_main_flag_placeholder_d;
}
else {
- main->setting.flag &= ~byte_dump_main_flag_placeholder_e;
+ main->setting.flag &= ~byte_dump_main_flag_placeholder_d;
}
if (main->program.parameters.array[byte_dump_parameter_classic_e].result & f_console_result_found_e) {
- main->setting.flag |= byte_dump_main_flag_classic_e;
+ main->setting.flag |= byte_dump_main_flag_classic_d;
}
else {
- main->setting.flag &= ~byte_dump_main_flag_classic_e;
+ main->setting.flag &= ~byte_dump_main_flag_classic_d;
}
if (main->program.parameters.remaining.used) {
#endif // _di_byte_dump_allocation_d_
/**
+ * Flags passed to the main function or program.
+ *
+ * byte_dump_main_flag_*_d:
+ * - none: No flags set.
+ * - classic: Classic is specified.
+ * - copyright: Print the copyright.
+ * - first: The first position is specified.
+ * - help: Print help.
+ * - last: The last position is specified.
+ * - placeholder: Placeholder is specified.
+ * - pipe: Use the input pipe.
+ * - text: Text is specified.
+ * - unicode: Unicode is specified.
+ * - version: Print version.
+ * - version_copyright_help: A helper flag representing version, copyright, and help flag bits being set.
+ * - wide: Wide option is specified for printing wide.
+ */
+#ifndef _di_byte_dump_main_flag_d_
+ #define byte_dump_main_flag_none_d 0x0
+ #define byte_dump_main_flag_classic_d 0x1
+ #define byte_dump_main_flag_copyright_d 0x2
+ #define byte_dump_main_flag_first_d 0x4
+ #define byte_dump_main_flag_help_d 0x8
+ #define byte_dump_main_flag_last_d 0x10
+ #define byte_dump_main_flag_pipe_d 0x20
+ #define byte_dump_main_flag_placeholder_d 0x40
+ #define byte_dump_main_flag_text_d 0x80
+ #define byte_dump_main_flag_unicode_d 0x100
+ #define byte_dump_main_flag_version_d 0x200
+ #define byte_dump_main_flag_version_copyright_help_d 0x20a
+ #define byte_dump_main_flag_wide_d 0x400
+#endif // _di_byte_dump_main_flag_d_
+
+/**
+ * Flags for fine-tuned print control.
+ *
+ * byte_dump_print_flag_*_d:
+ * - none: No flags set.
+ * - debug: Stream is for debug printing.
+ * - error: Stream is for error printing.
+ * - in: Stream is a source file.
+ * - message: Stream is for message printing.
+ * - out: Stream is a destination file.
+ * - warning: Stream is for warning printing.
+ */
+#ifndef _di_byte_dump_print_flag_d_
+ #define byte_dump_print_flag_none_d 0x0
+ #define byte_dump_print_flag_debug_d 0x1
+ #define byte_dump_print_flag_error_d 0x2
+ #define byte_dump_print_flag_file_d 0x4
+ #define byte_dump_print_flag_in_d 0x8
+ #define byte_dump_print_flag_out_d 0x10
+ #define byte_dump_print_flag_message_d 0x20
+ #define byte_dump_print_flag_warning_d 0x40
+#endif // _di_byte_dump_print_flag_d_
+
+/**
* The program signal defines.
*
* byte_dump_signal_*_d:
#endif // _di_byte_dump_presentations_e_
/**
- * Flags passed to the main function or program.
- *
- * byte_dump_main_flag_*_e:
- * - none: No flags set.
- * - classic: Classic is specified.
- * - copyright: Print the copyright.
- * - first: The first position is specified.
- * - help: Print help.
- * - last: The last position is specified.
- * - placeholder: Placeholder is specified.
- * - pipe: Use the input pipe.
- * - text: Text is specified.
- * - unicode: Unicode is specified.
- * - version: Print version.
- * - version_copyright_help: A helper flag representing version, copyright, and help flag bits being set.
- * - wide: Wide option is specified for printing wide.
- */
-#ifndef _di_byte_dump_main_flag_e_
- enum {
- byte_dump_main_flag_none_e = 0x0,
- byte_dump_main_flag_classic_e = 0x1,
- byte_dump_main_flag_copyright_e = 0x2,
- byte_dump_main_flag_first_e = 0x4,
- byte_dump_main_flag_help_e = 0x8,
- byte_dump_main_flag_last_e = 0x10,
- byte_dump_main_flag_pipe_e = 0x20,
- byte_dump_main_flag_placeholder_e = 0x40,
- byte_dump_main_flag_text_e = 0x80,
- byte_dump_main_flag_unicode_e = 0x100,
- byte_dump_main_flag_version_e = 0x200,
- byte_dump_main_flag_version_copyright_help_e = 0x20a,
- byte_dump_main_flag_wide_e = 0x400,
- }; // enum
-#endif // _di_byte_dump_main_flag_e_
-
-/**
* The program parameters.
*
* byte_dump_parameter_*_e:
#define byte_dump_parameter_total_d (f_console_parameter_state_type_total_d + 16)
#endif // _di_byte_dump_parameter_e_
-/**
- * Flags for fine-tuned print control.
- *
- * byte_dump_print_flag_*_e:
- * - none: No flags set.
- * - debug: Stream is for debug printing.
- * - error: Stream is for error printing.
- * - in: Stream is a source file.
- * - message: Stream is for message printing.
- * - out: Stream is a destination file.
- * - warning: Stream is for warning printing.
- */
-#ifndef _di_byte_dump_print_flag_e_
- enum {
- byte_dump_print_flag_none_e = 0x0,
- byte_dump_print_flag_debug_e = 0x1,
- byte_dump_print_flag_error_e = 0x2,
- byte_dump_print_flag_file_e = 0x4,
- byte_dump_print_flag_in_e = 0x8,
- byte_dump_print_flag_out_e = 0x10,
- byte_dump_print_flag_message_e = 0x20,
- byte_dump_print_flag_warning_e = 0x40,
- }; // enum
-#endif // _di_byte_dump_print_flag_e_
-
#ifdef __cplusplus
} // extern "C"
#endif
#define byte_dump_setting_t_initialize \
{ \
- byte_dump_main_flag_none_e, \
+ byte_dump_main_flag_none_d, \
F_okay, \
f_state_t_initialize, \
0, \
byte_dump_main_t data = byte_dump_main_t_initialize;
- data.program.debug.flag |= byte_dump_print_flag_debug_e | byte_dump_print_flag_out_e;
- data.program.error.flag |= byte_dump_print_flag_error_e | byte_dump_print_flag_out_e;
- data.program.output.flag |= byte_dump_print_flag_out_e;
- data.program.message.flag |= byte_dump_print_flag_message_e | byte_dump_print_flag_out_e;
- data.program.warning.flag |= byte_dump_print_flag_warning_e | byte_dump_print_flag_out_e;
+ data.program.debug.flag |= byte_dump_print_flag_debug_d | byte_dump_print_flag_out_d;
+ data.program.error.flag |= byte_dump_print_flag_error_d | byte_dump_print_flag_out_d;
+ data.program.output.flag |= byte_dump_print_flag_out_d;
+ data.program.message.flag |= byte_dump_print_flag_message_d | byte_dump_print_flag_out_d;
+ data.program.warning.flag |= byte_dump_print_flag_warning_d | byte_dump_print_flag_out_d;
data.program.error.custom = (void *) &data;
data.program.debug.custom = (void *) &data;
data.program.message.custom = (void *) &data;
// Pad the buffer with spaces to hide any skipped bytes (skipped via --first).
while (offset_to_print && cell->column < main->setting.width) {
- f_print_dynamic_raw(byte_dump_padding_s[(main->setting.flag & byte_dump_main_flag_unicode_e) ? 0 : main->setting.mode], print->to);
+ f_print_dynamic_raw(byte_dump_padding_s[(main->setting.flag & byte_dump_main_flag_unicode_d) ? 0 : main->setting.mode], print->to);
--offset_to_print;
++cell->column;
if (cell->column < main->setting.width) {
- if ((main->setting.flag & byte_dump_main_flag_unicode_e) || main->setting.mode == byte_dump_mode_binary_e) {
+ if ((main->setting.flag & byte_dump_main_flag_unicode_d) || main->setting.mode == byte_dump_mode_binary_e) {
if (!(cell->column % 4)) {
f_print_dynamic_raw(f_string_space_s, print->to);
}
}
if (cell->column < main->setting.width) {
- if ((main->setting.flag & byte_dump_main_flag_unicode_e) && !invalid[current]) {
+ if ((main->setting.flag & byte_dump_main_flag_unicode_d) && !invalid[current]) {
if (byte_current == 1) {
uint32_t unicode = 0;
}
else {
if (main->setting.mode == byte_dump_mode_hexidecimal_e) {
- if (main->setting.flag & byte_dump_main_flag_unicode_e) {
+ if (main->setting.flag & byte_dump_main_flag_unicode_d) {
f_print_dynamic_raw(byte_dump_padding_6_s, print->to);
}
}
}
else if (main->setting.mode == byte_dump_mode_duodecimal_e) {
- if (main->setting.flag & byte_dump_main_flag_unicode_e) {
+ if (main->setting.flag & byte_dump_main_flag_unicode_d) {
f_print_dynamic_raw(byte_dump_padding_5_s, print->to);
}
}
}
else if (main->setting.mode == byte_dump_mode_octal_e) {
- if (main->setting.flag & byte_dump_main_flag_unicode_e) {
+ if (main->setting.flag & byte_dump_main_flag_unicode_d) {
f_print_dynamic_raw(byte_dump_padding_5_s, print->to);
}
}
}
else if (main->setting.mode == byte_dump_mode_decimal_e) {
- if (main->setting.flag & byte_dump_main_flag_unicode_e) {
+ if (main->setting.flag & byte_dump_main_flag_unicode_d) {
f_print_dynamic_raw(byte_dump_padding_5_s, print->to);
}
reset = F_true;
- if (main->setting.flag & byte_dump_main_flag_text_e) {
+ if (main->setting.flag & byte_dump_main_flag_text_d) {
byte_dump_print_text(print, sequence, invalid, previous, offset);
}
else {
}
}
else {
- if ((main->setting.flag & byte_dump_main_flag_unicode_e) || main->setting.mode == byte_dump_mode_binary_e) {
+ if ((main->setting.flag & byte_dump_main_flag_unicode_d) || main->setting.mode == byte_dump_mode_binary_e) {
if (!(cell->column % 4)) {
f_print_dynamic_raw(f_string_space_s, print->to);
}
fl_print_format(" %[%r%] ", print->to, print->set->notable, byte_dump_character_wall_s, print->set->notable);
if (*offset) {
- if (main->setting.flag & byte_dump_main_flag_classic_e) {
+ if (main->setting.flag & byte_dump_main_flag_classic_d) {
while (*offset && at < main->setting.width) {
f_print_dynamic_raw(f_string_ascii_period_s, print->to);
- if (main->setting.flag & byte_dump_main_flag_wide_e) {
+ if (main->setting.flag & byte_dump_main_flag_wide_d) {
f_print_dynamic_raw(f_string_ascii_space_s, print->to);
}
} // while
}
else {
- if (main->setting.flag & byte_dump_main_flag_placeholder_e) {
+ if (main->setting.flag & byte_dump_main_flag_placeholder_d) {
for (; *offset && at < main->setting.width; --(*offset), ++at) {
fl_print_format(f_string_format_r_single_s.string, print->to, print->set->warning, byte_dump_character_placeholder_s, print->set->warning);
- if (main->setting.flag & byte_dump_main_flag_wide_e) {
+ if (main->setting.flag & byte_dump_main_flag_wide_d) {
f_print_dynamic_raw(f_string_space_s, print->to);
}
} // for
f_print_dynamic_raw(f_string_space_s, print->to);
- if (main->setting.flag & byte_dump_main_flag_wide_e) {
+ if (main->setting.flag & byte_dump_main_flag_wide_d) {
f_print_dynamic_raw(f_string_space_s, print->to);
}
} // for
}
if (previous->bytes) {
- if (main->setting.flag & byte_dump_main_flag_placeholder_e) {
+ if (main->setting.flag & byte_dump_main_flag_placeholder_d) {
for (; at < previous->bytes && at < main->setting.width; ++at) {
if (previous->invalid) {
fl_print_format(f_string_format_r_single_s.string, print->to, print->set->error, byte_dump_character_placeholder_s, print->set->error);
}
- else if (main->setting.flag & byte_dump_main_flag_classic_e) {
+ else if (main->setting.flag & byte_dump_main_flag_classic_d) {
f_print_dynamic_raw(f_string_ascii_period_s, print->to);
}
else {
fl_print_format(f_string_format_r_single_s.string, print->to, print->set->warning, byte_dump_character_placeholder_s, print->set->warning);
}
- if (main->setting.flag & byte_dump_main_flag_wide_e) {
+ if (main->setting.flag & byte_dump_main_flag_wide_d) {
f_print_dynamic_raw(f_string_ascii_space_s, print->to);
}
} // for
f_print_dynamic_raw(f_string_space_s, print->to);
- if (main->setting.flag & byte_dump_main_flag_wide_e) {
+ if (main->setting.flag & byte_dump_main_flag_wide_d) {
f_print_dynamic_raw(f_string_space_s, print->to);
}
} // for
if (invalid[i]) {
fl_print_format(f_string_format_r_single_s.string, print->to, print->set->error, byte_dump_character_incomplete_s, print->set->error);
- if (main->setting.flag & byte_dump_main_flag_wide_e) {
+ if (main->setting.flag & byte_dump_main_flag_wide_d) {
f_print_dynamic_raw(f_string_ascii_space_s, print->to);
}
}
fl_print_format("%]%]", print->to, print->set->warning, print->set->notable);
- if (main->setting.flag & byte_dump_main_flag_wide_e) {
+ if (main->setting.flag & byte_dump_main_flag_wide_d) {
if (f_utf_character_is_wide(sequence.string[i]) != F_true) {
f_print_dynamic_raw(f_string_ascii_space_s, print->to);
}
}
}
- if (main->setting.flag & byte_dump_main_flag_wide_e) {
+ if (main->setting.flag & byte_dump_main_flag_wide_d) {
f_print_dynamic_raw(f_string_ascii_space_s, print->to);
}
}
}
else if (f_utf_character_is_whitespace(sequence.string[i], F_true) == F_true) {
- if (main->setting.flag & byte_dump_main_flag_classic_e) {
+ if (main->setting.flag & byte_dump_main_flag_classic_d) {
f_print_dynamic_raw(f_string_ascii_period_s, print->to);
}
else {
fl_print_format(f_string_format_r_double_s.string, print->to, print->set->notable, print->set->warning, f_print_sequence_space_s, print->set->warning, print->set->notable);
}
- if (main->setting.flag & byte_dump_main_flag_wide_e) {
+ if (main->setting.flag & byte_dump_main_flag_wide_d) {
f_print_dynamic_raw(f_string_ascii_space_s, print->to);
}
}
if (main->setting.presentation == byte_dump_presentation_classic_e) {
f_print_dynamic_raw(f_string_ascii_period_s, print->to);
}
- else if (main->setting.flag & byte_dump_main_flag_placeholder_e) {
+ else if (main->setting.flag & byte_dump_main_flag_placeholder_d) {
fl_print_format(f_string_format_r_double_s.string, print->to, print->set->notable, print->set->warning, byte_dump_character_placeholder_s, print->set->warning, print->set->notable);
}
else {
f_print_dynamic_raw(f_string_space_s, print->to);
}
- if (main->setting.flag & byte_dump_main_flag_wide_e) {
+ if (main->setting.flag & byte_dump_main_flag_wide_d) {
f_print_dynamic_raw(f_string_ascii_space_s, print->to);
}
}
f_print_dynamic_raw(f_string_space_s, print->to);
}
- if (main->setting.flag & byte_dump_main_flag_wide_e) {
+ if (main->setting.flag & byte_dump_main_flag_wide_d) {
if (width_utf == 1 || f_utf_character_is_wide(sequence.string[i]) != F_true) {
f_print_dynamic_raw(f_string_ascii_space_s, print->to);
}
}
}
else {
- if (main->setting.flag & byte_dump_main_flag_wide_e) {
+ if (main->setting.flag & byte_dump_main_flag_wide_d) {
f_print_dynamic_raw(f_string_ascii_space_s, print->to);
}
}
else {
f_print_character(c, print->to);
- if (main->setting.flag & byte_dump_main_flag_wide_e) {
+ if (main->setting.flag & byte_dump_main_flag_wide_d) {
f_print_dynamic_raw(f_string_ascii_space_s, print->to);
}
}
// Print placeholders when using UTF-8 sequence to simulate the spaces bytes used for the character.
if (width_utf > 1 && at + 1 < main->setting.width) {
- if (main->setting.flag & byte_dump_main_flag_placeholder_e) {
+ if (main->setting.flag & byte_dump_main_flag_placeholder_d) {
if (invalid[i]) {
fl_print_format(f_string_format_r_single_s.string, print->to, print->set->error, byte_dump_character_placeholder_s, print->set->error);
}
- else if (main->setting.flag & byte_dump_main_flag_classic_e) {
+ else if (main->setting.flag & byte_dump_main_flag_classic_d) {
f_print_dynamic_raw(f_string_ascii_period_s, print->to);
}
else {
f_print_dynamic_raw(f_string_space_s, print->to);
}
- if (main->setting.flag & byte_dump_main_flag_wide_e) {
+ if (main->setting.flag & byte_dump_main_flag_wide_d) {
f_print_dynamic_raw(f_string_ascii_space_s, print->to);
}
++at;
if (width_utf > 2 && at + 1 < main->setting.width) {
- if (main->setting.flag & byte_dump_main_flag_placeholder_e) {
+ if (main->setting.flag & byte_dump_main_flag_placeholder_d) {
if (invalid[i]) {
fl_print_format(f_string_format_r_single_s.string, print->to, print->set->error, byte_dump_character_placeholder_s, print->set->error);
}
- else if (main->setting.flag & byte_dump_main_flag_classic_e) {
+ else if (main->setting.flag & byte_dump_main_flag_classic_d) {
f_print_dynamic_raw(f_string_ascii_period_s, print->to);
}
else {
f_print_dynamic_raw(f_string_space_s, print->to);
}
- if (main->setting.flag & byte_dump_main_flag_wide_e) {
+ if (main->setting.flag & byte_dump_main_flag_wide_d) {
f_print_dynamic_raw(f_string_ascii_space_s, print->to);
}
++at;
if (width_utf > 3 && at + 1 < main->setting.width) {
- if (main->setting.flag & byte_dump_main_flag_placeholder_e) {
+ if (main->setting.flag & byte_dump_main_flag_placeholder_d) {
if (invalid[i]) {
fl_print_format(f_string_format_r_single_s.string, print->to, print->set->error, byte_dump_character_placeholder_s, print->set->error);
}
- else if (main->setting.flag & byte_dump_main_flag_classic_e) {
+ else if (main->setting.flag & byte_dump_main_flag_classic_d) {
f_print_dynamic_raw(f_string_ascii_period_s, print->to);
}
else {
f_print_dynamic_raw(f_string_space_s, print->to);
}
- if (main->setting.flag & byte_dump_main_flag_wide_e) {
+ if (main->setting.flag & byte_dump_main_flag_wide_d) {
f_print_dynamic_raw(f_string_ascii_space_s, print->to);
}
} // for
// Print placeholder for the remaining parts of the line.
- if (main->setting.flag & byte_dump_main_flag_placeholder_e) {
+ if (main->setting.flag & byte_dump_main_flag_placeholder_d) {
for (; at < main->setting.width; ++at) {
if (invalid[at]) {
fl_print_format(f_string_format_r_single_s.string, print->to, print->set->error, byte_dump_character_placeholder_s, print->set->error);
}
- else if (main->setting.flag & byte_dump_main_flag_classic_e) {
+ else if (main->setting.flag & byte_dump_main_flag_classic_d) {
f_print_dynamic_raw(f_string_ascii_period_s, print->to);
}
else {
fl_print_format(f_string_format_r_single_s.string, print->to, print->set->warning, byte_dump_character_placeholder_s, print->set->warning);
}
- if (main->setting.flag & byte_dump_main_flag_wide_e) {
+ if (main->setting.flag & byte_dump_main_flag_wide_d) {
f_print_dynamic_raw(f_string_ascii_space_s, print->to);
}
} // for
f_print_dynamic_raw(f_string_space_s, print->to);
- if (main->setting.flag & byte_dump_main_flag_wide_e) {
+ if (main->setting.flag & byte_dump_main_flag_wide_d) {
f_print_dynamic_raw(f_string_space_s, print->to);
}
} // for
if (cell.column && cell.column < main->setting.width) {
while (cell.column < main->setting.width) {
- f_print_dynamic_raw(byte_dump_padding_s[(main->setting.flag & byte_dump_main_flag_unicode_e) ? 0 : main->setting.mode], main->program.output.to);
+ f_print_dynamic_raw(byte_dump_padding_s[(main->setting.flag & byte_dump_main_flag_unicode_d) ? 0 : main->setting.mode], main->program.output.to);
++cell.column;
if (cell.column < main->setting.width) {
- if ((main->setting.flag & byte_dump_main_flag_unicode_e) || main->setting.mode == byte_dump_mode_binary_e) {
+ if ((main->setting.flag & byte_dump_main_flag_unicode_d) || main->setting.mode == byte_dump_mode_binary_e) {
if (!(cell.column % 4)) {
f_print_dynamic_raw(f_string_space_s, main->program.output.to);
}
}
} // while
- if (main->setting.flag & byte_dump_main_flag_text_e) {
+ if (main->setting.flag & byte_dump_main_flag_text_d) {
byte_dump_print_text(&main->program.output, sequence, invalid, &previous, &offset);
}
else {
}
if (main->program.parameters.array[f_console_standard_parameter_help_e].result & f_console_result_found_e) {
- main->setting.flag |= example_main_flag_help_e;
+ main->setting.flag |= example_main_flag_help_d;
return;
}
if (main->program.parameters.array[f_console_standard_parameter_version_e].result & f_console_result_found_e) {
- main->setting.flag |= example_main_flag_version_e;
+ main->setting.flag |= example_main_flag_version_d;
return;
}
if (main->program.parameters.array[f_console_standard_parameter_copyright_e].result & f_console_result_found_e) {
- main->setting.flag |= example_main_flag_copyright_e;
+ main->setting.flag |= example_main_flag_copyright_d;
return;
}
if (main->program.pipe & fll_program_data_pipe_input_e) {
- main->setting.flag |= example_main_flag_pipe_e;
+ main->setting.flag |= example_main_flag_pipe_d;
}
else {
- main->setting.flag &= ~example_main_flag_pipe_e;
+ main->setting.flag &= ~example_main_flag_pipe_d;
}
}
#endif // _di_example_setting_load_
#endif // _di_example_allocation_d_
/**
+ * Flags passed to the main function or program.
+ *
+ * When number mode is not specified, then mode is "string" mode (there is no flag for "string" mode).
+ *
+ * example_main_flag_*_d:
+ * - none: No flags set.
+ * - copyright: Print copyright.
+ * - error: Check if status is "error".
+ * - fine: Check if status is "fine".
+ * - help: Print help.
+ * - pipe: Use the input pipe.
+ * - version: Print version.
+ * - version_copyright_help: A helper flag representing version, copyright, and help flag bits being set.
+ * - warning: Check if status is "warning".
+ */
+#ifndef _di_example_main_flag_d_
+ #define example_main_flag_none_d 0x0
+ #define example_main_flag_copyright_d 0x1
+ #define example_main_flag_error_d 0x2
+ #define example_main_flag_fine_d 0x4
+ #define example_main_flag_help_d 0x8
+ #define example_main_flag_pipe_d 0x10
+ #define example_main_flag_version_d 0x20
+ #define example_main_flag_version_copyright_help_d 0x29
+ #define example_main_flag_warning_d 0x40
+#endif // _di_example_main_flag_d_
+
+/**
+ * Flags for fine-tuned print control.
+ *
+ * example_print_flag_*_d:
+ * - none: No flags set.
+ * - debug: Stream is for debug printing.
+ * - error: Stream is for error printing.
+ * - in: Stream is a source file.
+ * - message: Stream is for message printing.
+ * - out: Stream is a destination file.
+ * - warning: Stream is for warning printing.
+ */
+#ifndef _di_example_print_flag_d_
+ #define example_print_flag_none_d 0x0
+ #define example_print_flag_debug_d 0x1
+ #define example_print_flag_error_d 0x2
+ #define example_print_flag_file_d 0x4
+ #define example_print_flag_in_d 0x8
+ #define example_print_flag_out_d 0x10
+ #define example_print_flag_message_d 0x20
+ #define example_print_flag_warning_d 0x40
+#endif // _di_example_print_flag_d_
+
+/**
* The program signal defines.
*
* example_signal_*_d:
#endif
/**
- * Flags passed to the main function or program.
- *
- * When number mode is not specified, then mode is "string" mode (there is no flag for "string" mode).
- *
- * example_main_flag_*_e:
- * - none: No flags set.
- * - copyright: Print copyright.
- * - error: Check if status is "error".
- * - fine: Check if status is "fine".
- * - help: Print help.
- * - pipe: Use the input pipe.
- * - version: Print version.
- * - version_copyright_help: A helper flag representing version, copyright, and help flag bits being set.
- * - warning: Check if status is "warning".
- */
-#ifndef _di_example_main_flag_e_
- enum {
- example_main_flag_none_e = 0x0,
- example_main_flag_copyright_e = 0x1,
- example_main_flag_error_e = 0x2,
- example_main_flag_fine_e = 0x4,
- example_main_flag_help_e = 0x8,
- example_main_flag_pipe_e = 0x10,
- example_main_flag_version_e = 0x20,
- example_main_flag_version_copyright_help_e = 0x29,
- example_main_flag_warning_e = 0x40,
- }; // enum
-#endif // _di_example_main_flag_e_
-
-/**
* The main program parameters.
*/
#ifndef _di_example_parameter_e_
#define example_parameter_total_d (f_console_parameter_state_type_total_d + 1)
#endif // _di_example_parameter_e_
-/**
- * Flags for fine-tuned print control.
- *
- * example_print_flag_*_e:
- * - none: No flags set.
- * - debug: Stream is for debug printing.
- * - error: Stream is for error printing.
- * - in: Stream is a source file.
- * - message: Stream is for message printing.
- * - out: Stream is a destination file.
- * - warning: Stream is for warning printing.
- */
-#ifndef _di_example_print_flag_e_
- enum {
- example_print_flag_none_e = 0x0,
- example_print_flag_debug_e = 0x1,
- example_print_flag_error_e = 0x2,
- example_print_flag_file_e = 0x4,
- example_print_flag_in_e = 0x8,
- example_print_flag_out_e = 0x10,
- example_print_flag_message_e = 0x20,
- example_print_flag_warning_e = 0x40,
- }; // enum
-#endif // _di_example_print_flag_e_
-
#ifdef __cplusplus
} // extern "C"
#endif
#define example_setting_t_initialize \
{ \
- example_main_flag_none_e, \
+ example_main_flag_none_d, \
F_okay, \
f_state_t_initialize, \
0, \
main->setting.state.status = F_okay;
- if (main->setting.flag & example_main_flag_version_copyright_help_e) {
- if (main->setting.flag & example_main_flag_help_e) {
+ if (main->setting.flag & example_main_flag_version_copyright_help_d) {
+ if (main->setting.flag & example_main_flag_help_d) {
example_print_message_help(&main->program.message);
}
- else if (main->setting.flag & example_main_flag_version_e) {
+ else if (main->setting.flag & example_main_flag_version_d) {
fll_program_print_version(&main->program.message, example_program_version_s);
}
- else if (main->setting.flag & example_main_flag_copyright_e) {
+ else if (main->setting.flag & example_main_flag_copyright_d) {
fll_program_print_copyright(&main->program.message, fll_program_copyright_year_author_s);
}
example_main_t data = example_main_t_initialize;
- data.program.debug.flag |= example_print_flag_debug_e | example_print_flag_out_e;
- data.program.error.flag |= example_print_flag_error_e | example_print_flag_out_e;
- data.program.output.flag |= example_print_flag_out_e;
- data.program.message.flag |= example_print_flag_message_e | example_print_flag_out_e;
- data.program.warning.flag |= example_print_flag_warning_e | example_print_flag_out_e;
+ data.program.debug.flag |= example_print_flag_debug_d | example_print_flag_out_d;
+ data.program.error.flag |= example_print_flag_error_d | example_print_flag_out_d;
+ data.program.output.flag |= example_print_flag_out_d;
+ data.program.message.flag |= example_print_flag_message_d | example_print_flag_out_d;
+ data.program.warning.flag |= example_print_flag_warning_d | example_print_flag_out_d;
data.program.error.custom = (void *) &data;
data.program.debug.custom = (void *) &data;
data.program.message.custom = (void *) &data;
main->cache_recurse_do.action = &fake_do_copy_action;
main->cache_recurse_do.handle = &fake_do_copy_handle;
main->cache_recurse_do.state.custom = (void *) &local;
- main->cache_recurse_do.state.code = fake_state_code_local_e;
+ main->cache_recurse_do.state.code = fake_state_code_local_d;
main->cache_recurse_do.flag = f_directory_recurse_do_flag_top_e | f_directory_recurse_do_flag_before_e | f_directory_recurse_do_flag_after_e;
main->cache_recurse_do.mode = mode;
if (build_arguments && build_arguments->used) {
path_file.used = data->path_data_build.used + build_arguments->array[0].used;
}
- else if (!process_pipe || (main->setting.flag & fake_main_flag_operation_e)) {
+ else if (!process_pipe || (main->setting.flag & fake_main_flag_operation_d)) {
path_file.used = data->file_data_build_settings.used;
}
else {
memcpy(path_file_string, data->path_data_build.string, sizeof(f_char_t) * data->path_data_build.used);
memcpy(path_file_string + data->path_data_build.used, build_arguments->array[0].string, sizeof(f_char_t) * build_arguments->array[0].used);
}
- else if (!process_pipe || (main->setting.flag & fake_main_flag_operation_e)) {
+ else if (!process_pipe || (main->setting.flag & fake_main_flag_operation_d)) {
memcpy(path_file_string, data->file_data_build_settings.string, sizeof(f_char_t) * data->file_data_build_settings.used);
}
else {
}
if (F_status_is_error_not(main->setting.state.status)) {
- if (build_arguments && build_arguments->used || !process_pipe || (main->setting.flag & fake_main_flag_operation_e)) {
+ if (build_arguments && build_arguments->used || !process_pipe || (main->setting.flag & fake_main_flag_operation_d)) {
fake_file_buffer(data, path_file, process_pipe ? F_false : F_true, &buffer);
}
}
}
if (main->program.parameters.array[f_console_standard_parameter_help_e].result & f_console_result_found_e) {
- main->setting.flag |= fake_main_flag_help_e;
+ main->setting.flag |= fake_main_flag_help_d;
return;
}
if (main->program.parameters.array[f_console_standard_parameter_version_e].result & f_console_result_found_e) {
- main->setting.flag |= fake_main_flag_version_e;
+ main->setting.flag |= fake_main_flag_version_d;
return;
}
if (main->program.parameters.array[f_console_standard_parameter_copyright_e].result & f_console_result_found_e) {
- main->setting.flag |= fake_main_flag_copyright_e;
+ main->setting.flag |= fake_main_flag_copyright_d;
return;
}
f_number_unsigned_t index = 0;
if (main->program.pipe & fll_program_data_pipe_input_e) {
- main->setting.flag |= fake_main_flag_pipe_e;
+ main->setting.flag |= fake_main_flag_pipe_d;
}
else {
- main->setting.flag &= ~fake_main_flag_pipe_e;
+ main->setting.flag &= ~fake_main_flag_pipe_d;
}
{
};
const uint16_t flags[] = {
- fake_main_flag_enable_documents_e,
- fake_main_flag_enable_shared_e,
- fake_main_flag_enable_static_e,
+ fake_main_flag_enable_documents_d,
+ fake_main_flag_enable_shared_d,
+ fake_main_flag_enable_static_d,
};
for (; i < 3; ++i) {
}
if (main->setting.operations.used) {
- main->setting.flag |= fake_main_flag_operation_e;
+ main->setting.flag |= fake_main_flag_operation_d;
}
else {
- main->setting.flag |= fake_main_flag_operation_make_e;
- main->setting.flag &= ~fake_main_flag_operation_e;
+ main->setting.flag |= fake_main_flag_operation_make_d;
+ main->setting.flag &= ~fake_main_flag_operation_d;
main->setting.state.status = f_memory_array_increase_by(1, sizeof(uint8_t), (void **) &main->setting.operations.array, &main->setting.operations.used, &main->setting.operations.size);
switch (parameter_state->at) {
case fake_parameter_operation_build_e:
data->main->setting.operations.array[data->main->setting.operations.used++] = fake_operation_build_e;
- data->main->setting.flag |= fake_main_flag_operation_build_e;
+ data->main->setting.flag |= fake_main_flag_operation_build_d;
break;
case fake_parameter_operation_clean_e:
data->main->setting.operations.array[data->main->setting.operations.used++] = fake_operation_clean_e;
- data->main->setting.flag |= fake_main_flag_operation_clean_e;
+ data->main->setting.flag |= fake_main_flag_operation_clean_d;
break;
case fake_parameter_operation_make_e:
data->main->setting.operations.array[data->main->setting.operations.used++] = fake_operation_make_e;
- data->main->setting.flag |= fake_main_flag_operation_make_e;
+ data->main->setting.flag |= fake_main_flag_operation_make_d;
break;
case fake_parameter_operation_skeleton_e:
data->main->setting.operations.array[data->main->setting.operations.used++] = fake_operation_skeleton_e;
- data->main->setting.flag |= fake_main_flag_operation_skeleton_e;
+ data->main->setting.flag |= fake_main_flag_operation_skeleton_d;
break;
#endif // _di_fake_allocation_d_
/**
- * The program signal defines.
+ * Flags passed to the main function or program.
*
- * fake_signal_*_d:
- * - check: Number of iterations before performing signal check in non-threaded signal handling.
- * - check_failsafe: When using threads, how many consecutive failures to check signal before aborting (as a recursion failsafe).
- * - check_tiny: The tiny check.
- * - check_short: The short signal check.
+ * fake_main_flag_*_d:
+ * - none: No flags set.
+ * - copyright: Print copyright.
+ * - enable_documents: Enable documents, as in --enable-doc (not specifying means --disable-doc).
+ * - enable_shared: Enable shared, as in --enable-shared (not specifying means --disable-shared).
+ * - enable_static: Enable static, as in --enable-static (not specifying means --disable-static).
+ * - header: Enable printing of headers.
+ * - help: Print help.
+ * - operation: Designate that an operation is explicitly passed.
+ * - operation_build: The build operation is designated.
+ * - operation_clean: The clean operation is designated.
+ * - operation_make: The make operation is designated (or enabled as default).
+ * - operation_skeleton: The skeleton operation is designated.
+ * - pipe: Use the input pipe.
+ * - separate: Enable printing of separators.
+ * - strip_invalid: Using strip invalid character mode.
+ * - verify: Using verify mode.
+ * - version: Print version.
+ * - version_copyright_help: A helper flag representing version, copyright, and help flag bits being set.
*/
-#ifndef _di_fake_signal_d_
- #define fake_signal_check_d 500000
- #define fake_signal_check_failsafe_d 20000
- #define fake_signal_check_tiny_d 4
- #define fake_signal_check_short_d 16
-#endif // _di_fake_signal_d_
+#ifndef _di_fake_main_flag_d_
+ #define fake_main_flag_none_d 0x0
+ #define fake_main_flag_copyright_d 0x1
+ #define fake_main_flag_enable_documents_d 0x2
+ #define fake_main_flag_enable_shared_d 0x4
+ #define fake_main_flag_enable_static_d 0x8
+ #define fake_main_flag_header_d 0x10
+ #define fake_main_flag_help_d 0x20
+ #define fake_main_flag_operation_d 0x40
+ #define fake_main_flag_operation_build_d 0x80
+ #define fake_main_flag_operation_clean_d 0x100
+ #define fake_main_flag_operation_make_d 0x200
+ #define fake_main_flag_operation_skeleton_d 0x400
+ #define fake_main_flag_pipe_d 0x800
+ #define fake_main_flag_separate_d 0x1000
+ #define fake_main_flag_strip_invalid_d 0x2000
+ #define fake_main_flag_verify_d 0x4000
+ #define fake_main_flag_version_d 0x8000
+ #define fake_main_flag_version_copyright_help_d 0x8021
+#endif // _di_fake_main_flag_d_
/**
* Provide common/generic definitions.
#define fake_max_stack_d 8192
#endif // _di_fake_max_d_
+/**
+ * Flags for fine-tuned print control.
+ *
+ * fake_print_flag_*_d:
+ * - none: No flags set.
+ * - debug: Stream is for debug printing.
+ * - error: Stream is for error printing.
+ * - in: Stream is a source file.
+ * - message: Stream is for message printing.
+ * - out: Stream is a destination file.
+ * - warning: Stream is for warning printing.
+ */
+#ifndef _di_fake_print_flag_d_
+ #define fake_print_flag_none_d 0x0
+ #define fake_print_flag_debug_d 0x1
+ #define fake_print_flag_error_d 0x2
+ #define fake_print_flag_file_d 0x4
+ #define fake_print_flag_in_d 0x8
+ #define fake_print_flag_out_d 0x10
+ #define fake_print_flag_message_d 0x20
+ #define fake_print_flag_warning_d 0x40
+#endif // _di_fake_print_flag_d_
+
+/**
+ * The program signal defines.
+ *
+ * fake_signal_*_d:
+ * - check: Number of iterations before performing signal check in non-threaded signal handling.
+ * - check_failsafe: When using threads, how many consecutive failures to check signal before aborting (as a recursion failsafe).
+ * - check_tiny: The tiny check.
+ * - check_short: The short signal check.
+ */
+#ifndef _di_fake_signal_d_
+ #define fake_signal_check_d 500000
+ #define fake_signal_check_failsafe_d 20000
+ #define fake_signal_check_tiny_d 4
+ #define fake_signal_check_short_d 16
+#endif // _di_fake_signal_d_
+
+/**
+ * Flags for the code property in the f_state_t structure.
+ *
+ * fake_state_code_*_d:
+ * - none: No flags set.
+ * - clone: Designate that the operation is a clone operation (as opposed to a copy operation).
+ * - local: Designate that the state.custom is in fake_local_t rather than fake_main_t.
+ */
+#ifndef _di_fake_state_code_d_
+ #define fake_state_code_none_d 0x0
+ #define fake_state_code_clone_d 0x1
+ #define fake_state_code_local_d 0x2
+#endif // _di_fake_state_code_d_
+
#ifdef __cplusplus
} // extern "C"
#endif
#endif // _di_fake_parameter_e_
/**
- * Flags passed to the main function or program.
- *
- * fake_main_flag_*_e:
- * - none: No flags set.
- * - copyright: Print copyright.
- * - enable_documents: Enable documents, as in --enable-doc (not specifying means --disable-doc).
- * - enable_shared: Enable shared, as in --enable-shared (not specifying means --disable-shared).
- * - enable_static: Enable static, as in --enable-static (not specifying means --disable-static).
- * - header: Enable printing of headers.
- * - help: Print help.
- * - operation: Designate that an operation is explicitly passed.
- * - operation_build: The build operation is designated.
- * - operation_clean: The clean operation is designated.
- * - operation_make: The make operation is designated (or enabled as default).
- * - operation_skeleton: The skeleton operation is designated.
- * - pipe: Use the input pipe.
- * - separate: Enable printing of separators.
- * - strip_invalid: Using strip invalid character mode.
- * - verify: Using verify mode.
- * - version: Print version.
- * - version_copyright_help: A helper flag representing version, copyright, and help flag bits being set.
- */
-#ifndef _di_fake_main_flag_e_
- enum {
- fake_main_flag_none_e = 0x0,
- fake_main_flag_copyright_e = 0x1,
- fake_main_flag_enable_documents_e = 0x2,
- fake_main_flag_enable_shared_e = 0x4,
- fake_main_flag_enable_static_e = 0x8,
- fake_main_flag_header_e = 0x10,
- fake_main_flag_help_e = 0x20,
- fake_main_flag_operation_e = 0x40,
- fake_main_flag_operation_build_e = 0x80,
- fake_main_flag_operation_clean_e = 0x100,
- fake_main_flag_operation_make_e = 0x200,
- fake_main_flag_operation_skeleton_e = 0x400,
- fake_main_flag_pipe_e = 0x800,
- fake_main_flag_separate_e = 0x1000,
- fake_main_flag_strip_invalid_e = 0x2000,
- fake_main_flag_verify_e = 0x4000,
- fake_main_flag_version_e = 0x8000,
- fake_main_flag_version_copyright_help_e = 0x8021,
- }; // enum
-#endif // _di_fake_main_flag_e_
-
-/**
* The program operation enumerations.
*
* fake_operation_*_e:
}; // enum
#endif // _di_fake_condition_result_e_
-/**
- * Flags for fine-tuned print control.
- *
- * fake_print_flag_*_e:
- * - none: No flags set.
- * - debug: Stream is for debug printing.
- * - error: Stream is for error printing.
- * - in: Stream is a source file.
- * - message: Stream is for message printing.
- * - out: Stream is a destination file.
- * - warning: Stream is for warning printing.
- */
-#ifndef _di_fake_print_flag_e_
- enum {
- fake_print_flag_none_e = 0x0,
- fake_print_flag_debug_e = 0x1,
- fake_print_flag_error_e = 0x2,
- fake_print_flag_file_e = 0x4,
- fake_print_flag_in_e = 0x8,
- fake_print_flag_out_e = 0x10,
- fake_print_flag_message_e = 0x20,
- fake_print_flag_warning_e = 0x40,
- }; // enum
-#endif // _di_fake_print_flag_e_
-
-/**
- * Flags for the code property in the f_state_t structure.
- *
- * fake_state_code_*_e:
- * - none: No flags set.
- * - clone: Designate that the operation is a clone operation (as opposed to a copy operation).
- * - local: Designate that the state.custom is in fake_local_t rather than fake_main_t.
- */
-#ifndef _di_fake_state_code_e_
- enum {
- fake_state_code_none_e = 0x0,
- fake_state_code_clone_e = 0x1,
- fake_state_code_local_e = 0x2,
- }; // enum
-#endif // _di_fake_state_code_e_
-
#ifdef __cplusplus
} // extern "C"
#endif
main->setting.state.status = F_okay;
- if (main->setting.flag & fake_main_flag_version_copyright_help_e) {
- if (main->setting.flag & fake_main_flag_help_e) {
+ if (main->setting.flag & fake_main_flag_version_copyright_help_d) {
+ if (main->setting.flag & fake_main_flag_help_d) {
fake_print_message_help(&main->program.message);
}
- else if (main->setting.flag & fake_main_flag_version_e) {
+ else if (main->setting.flag & fake_main_flag_version_d) {
fll_program_print_version(&main->program.message, fake_program_version_s);
}
- else if (main->setting.flag & fake_main_flag_copyright_e) {
+ else if (main->setting.flag & fake_main_flag_copyright_d) {
fll_program_print_copyright(&main->program.message, fll_program_copyright_year_author_s);
}
return;
}
- if ((main->setting.flag & fake_main_flag_operation_build_e) && (main->setting.flag & fake_main_flag_operation_make_e)) {
+ if ((main->setting.flag & fake_main_flag_operation_build_d) && (main->setting.flag & fake_main_flag_operation_make_d)) {
main->setting.state.status = F_status_set_error(F_parameter);
fake_print_error_parameter_operation_not_with(&main->program.error, fake_other_operation_build_s, fake_other_operation_make_s);
return;
}
- if ((main->program.pipe & fll_program_data_pipe_input_e) && !(main->setting.flag & fake_main_flag_operation_e)) {
+ if ((main->program.pipe & fll_program_data_pipe_input_e) && !(main->setting.flag & fake_main_flag_operation_d)) {
data.file_data_build_fakefile.used = 0;
main->setting.state.status = f_string_dynamic_append(f_string_ascii_minus_s, &data.file_data_build_fakefile);
if (flag & f_directory_recurse_do_flag_before_e) {
if (flag & f_directory_recurse_do_flag_top_e) {
- if (recurse->state.code & fake_state_code_clone_e) {
+ if (recurse->state.code & fake_state_code_clone_d) {
fake_print_verbose_cloning(&local->main->program.message, *recurse->path_top, map->key);
recurse->state.status = f_file_clone(*recurse->path_top, map->key, F_file_default_size_write_d, f_file_stat_flag_group_e | f_file_stat_flag_owner_e | (f_directory_recurse_do_flag_dereference_e ? 0 : f_file_stat_flag_reference_e));
if (F_status_is_error(recurse->state.status)) {
local->main->setting.state.status = recurse->state.status;
- fake_print_error_file(&local->main->program.error, (recurse->state.code & fake_state_code_clone_e) ? macro_fake_f(f_file_clone) : macro_fake_f(f_file_copy), *recurse->path_top, (recurse->state.code & fake_state_code_clone_e) ? f_file_operation_clone_s : f_file_operation_copy_s, fll_error_file_type_directory_e);
+ fake_print_error_file(&local->main->program.error, (recurse->state.code & fake_state_code_clone_d) ? macro_fake_f(f_file_clone) : macro_fake_f(f_file_copy), *recurse->path_top, (recurse->state.code & fake_state_code_clone_d) ? f_file_operation_clone_s : f_file_operation_copy_s, fll_error_file_type_directory_e);
// Save the error status for when the error message is printed.
*((f_status_t *) local->custom_2) = recurse->state.status;
if (F_status_is_error(recurse->state.status)) return;
- if (recurse->state.code & fake_state_code_clone_e) {
+ if (recurse->state.code & fake_state_code_clone_d) {
fake_print_verbose_cloning(&local->main->program.message, recurse->path, recurse->path_cache);
recurse->state.status = f_file_clone(recurse->path, recurse->path_cache, F_file_default_size_write_d, f_file_stat_flag_group_e | f_file_stat_flag_owner_e | (f_directory_recurse_do_flag_dereference_e ? 0 : f_file_stat_flag_reference_e));
if (F_status_is_error(recurse->state.status)) {
local->main->setting.state.status = recurse->state.status;
- fake_print_error_file(&local->main->program.error, (recurse->state.code & fake_state_code_clone_e) ? macro_fake_f(f_file_clone) : macro_fake_f(f_file_copy), recurse->path, (recurse->state.code & fake_state_code_clone_e) ? f_file_operation_clone_s : f_file_operation_copy_s, fll_error_file_type_directory_e);
+ fake_print_error_file(&local->main->program.error, (recurse->state.code & fake_state_code_clone_d) ? macro_fake_f(f_file_clone) : macro_fake_f(f_file_copy), recurse->path, (recurse->state.code & fake_state_code_clone_d) ? f_file_operation_clone_s : f_file_operation_copy_s, fll_error_file_type_directory_e);
// Save the error status for when the error message is printed.
*((f_status_t *) local->custom_2) = recurse->state.status;
if (F_status_is_error(recurse->state.status)) return;
- if (recurse->state.code & fake_state_code_clone_e) {
+ if (recurse->state.code & fake_state_code_clone_d) {
fake_print_verbose_cloning(&local->main->program.message, recurse->path, map->value);
recurse->state.status = f_file_clone(recurse->path, map->value, F_file_default_size_write_d, f_file_stat_flag_group_e | f_file_stat_flag_owner_e | (f_directory_recurse_do_flag_dereference_e ? 0 : f_file_stat_flag_reference_e));
if (F_status_is_error(recurse->state.status)) {
local->main->setting.state.status = recurse->state.status;
- fake_print_error_file(&local->main->program.error, (recurse->state.code & fake_state_code_clone_e) ? macro_fake_f(f_file_clone) : macro_fake_f(f_file_copy), map->value, f_file_operation_create_s, (flag & f_directory_recurse_do_flag_directory_e) ? fll_error_file_type_directory_e : fll_error_file_type_file_e);
+ fake_print_error_file(&local->main->program.error, (recurse->state.code & fake_state_code_clone_d) ? macro_fake_f(f_file_clone) : macro_fake_f(f_file_copy), map->value, f_file_operation_create_s, (flag & f_directory_recurse_do_flag_directory_e) ? fll_error_file_type_directory_e : fll_error_file_type_file_e);
// Save the error status for when the error message is printed.
*((f_status_t *) local->custom_2) = recurse->state.status;
if (F_status_is_error_not(*((f_status_t *) local->custom_2))) {
local->main->setting.state.status = recurse->state.status;
- fake_print_error_build_operation_file(&local->main->program.error, macro_fake_f(fl_directory_do), (recurse->state.code & fake_state_code_clone_e) ? f_file_operation_clone_s : f_file_operation_copy_s, *recurse->path_top, recurse->path_cache, f_file_operation_to_s, F_true);
+ fake_print_error_build_operation_file(&local->main->program.error, macro_fake_f(fl_directory_do), (recurse->state.code & fake_state_code_clone_d) ? f_file_operation_clone_s : f_file_operation_copy_s, *recurse->path_top, recurse->path_cache, f_file_operation_to_s, F_true);
*((f_status_t *) local->custom_2) = recurse->state.status;
}
* Must be of type f_directory_recurse_do_t.
*
* The recurse.state.code relevant flags:
- * - fake_state_code_clone_e: Designate that this is a clone instead of copy.
- * - fake_state_code_local_e: This is required and assumed to be set.
+ * - fake_state_code_clone_d: Designate that this is a clone instead of copy.
+ * - fake_state_code_local_d: This is required and assumed to be set.
*
* This alters recurse.state.custom.main.setting.state.status and recurse.state.status:
* F_okay on success.
* Must be of type f_directory_recurse_do_t.
*
* The recurse.state.code relevant flags:
- * - fake_state_code_clone_e: Designate that this is a clone instead of copy.
- * - fake_state_code_local_e: This is required and assumed to be set.
+ * - fake_state_code_clone_d: Designate that this is a clone instead of copy.
+ * - fake_state_code_local_d: This is required and assumed to be set.
*
* This alters recurse.state.custom.main.setting.state.status:
* Assigns value from recurse.state.status.
fake_main_t data = fake_main_t_initialize;
- data.program.debug.flag |= fake_print_flag_debug_e | fake_print_flag_out_e;
- data.program.error.flag |= fake_print_flag_error_e | fake_print_flag_out_e;
- data.program.output.flag |= fake_print_flag_out_e;
- data.program.message.flag |= fake_print_flag_message_e | fake_print_flag_out_e;
- data.program.warning.flag |= fake_print_flag_warning_e | fake_print_flag_out_e;
+ data.program.debug.flag |= fake_print_flag_debug_d | fake_print_flag_out_d;
+ data.program.error.flag |= fake_print_flag_error_d | fake_print_flag_out_d;
+ data.program.output.flag |= fake_print_flag_out_d;
+ data.program.message.flag |= fake_print_flag_message_d | fake_print_flag_out_d;
+ data.program.warning.flag |= fake_print_flag_warning_d | fake_print_flag_out_d;
data.program.error.custom = (void *) &data;
data.program.debug.custom = (void *) &data;
data.program.message.custom = (void *) &data;
data.program.output.custom = (void *) &data;
data.program.warning.custom = (void *) &data;
- data.setting.flag |= fake_main_flag_enable_documents_e;
- data.setting.flag |= fake_main_flag_enable_shared_e;
- data.setting.flag |= fake_main_flag_enable_static_e;
+ data.setting.flag |= fake_main_flag_enable_documents_d;
+ data.setting.flag |= fake_main_flag_enable_shared_d;
+ data.setting.flag |= fake_main_flag_enable_static_d;
data.setting.state.step_large = fake_allocation_large_d;
data.setting.state.step_small = fake_allocation_small_d;
data.setting.state.custom = (void *) &data;
- data.setting.state.code = fake_state_code_none_e;
+ data.setting.state.code = fake_state_code_none_d;
data.setting.state.interrupt = &fake_signal_handler_callback;
f_console_parameter_t parameters[] = fake_console_parameter_t_initialize;
main->cache_recurse_do.action = &fake_do_copy_action;
main->cache_recurse_do.handle = &fake_do_copy_handle;
main->cache_recurse_do.state.custom = (void *) &local;
- main->cache_recurse_do.state.code = fake_state_code_local_e;
+ main->cache_recurse_do.state.code = fake_state_code_local_d;
main->cache_recurse_do.flag = f_directory_recurse_do_flag_top_e | f_directory_recurse_do_flag_before_e | f_directory_recurse_do_flag_after_e;
if (clone) {
- main->cache_recurse_do.state.code |= fake_state_code_clone_e;
+ main->cache_recurse_do.state.code |= fake_state_code_clone_d;
}
else {
macro_f_mode_t_set_default_umask(main->cache_recurse_do.mode, main->program.umask);
return;
}
- fake_main_t * const main = (state->code & fake_state_code_local_e)
+ fake_main_t * const main = (state->code & fake_state_code_local_d)
? ((fake_local_t *) state->custom)->main
: (fake_main_t *) state->custom;
* @param state
* The f_state_t data.
*
- * The state.custom must be fake_main_t, except for when the code has the bit fake_state_code_local_e.
- * When the fake_state_code_local_e bit is set, then the state.custum must be fake_local_t.
+ * The state.custom must be fake_main_t, except for when the code has the bit fake_state_code_local_d.
+ * When the fake_state_code_local_d bit is set, then the state.custum must be fake_local_t.
*
* This alters state.status:
* F_interrupt_not if not interrupted.
}
if (main->program.parameters.array[f_console_standard_parameter_help_e].result & f_console_result_found_e) {
- main->setting.flag |= firewall_main_flag_help_e;
+ main->setting.flag |= firewall_main_flag_help_d;
return;
}
if (main->program.parameters.array[f_console_standard_parameter_version_e].result & f_console_result_found_e) {
- main->setting.flag |= firewall_main_flag_version_e;
+ main->setting.flag |= firewall_main_flag_version_d;
return;
}
if (main->program.parameters.array[f_console_standard_parameter_copyright_e].result & f_console_result_found_e) {
- main->setting.flag |= firewall_main_flag_copyright_e;
+ main->setting.flag |= firewall_main_flag_copyright_d;
return;
}
f_number_unsigned_t index = 0;
if (main->program.parameters.array[firewall_parameter_operation_start_e].result & f_console_result_found_e) {
- main->setting.flag &= ~firewall_main_flag_operation_e;
- main->setting.flag |= firewall_main_flag_operation_start_e;
+ main->setting.flag &= ~firewall_main_flag_operation_d;
+ main->setting.flag |= firewall_main_flag_operation_start_d;
index = main->program.parameters.array[firewall_parameter_operation_start_e].location;
}
if (main->program.parameters.array[firewall_parameter_operation_stop_e].result & f_console_result_found_e) {
- if (!(main->setting.flag & firewall_main_flag_operation_e) || main->program.parameters.array[firewall_parameter_operation_stop_e].location > index) {
- main->setting.flag &= ~firewall_main_flag_operation_e;
- main->setting.flag |= firewall_main_flag_operation_stop_e;
+ if (!(main->setting.flag & firewall_main_flag_operation_d) || main->program.parameters.array[firewall_parameter_operation_stop_e].location > index) {
+ main->setting.flag &= ~firewall_main_flag_operation_d;
+ main->setting.flag |= firewall_main_flag_operation_stop_d;
index = main->program.parameters.array[firewall_parameter_operation_stop_e].location;
}
}
if (main->program.parameters.array[firewall_parameter_operation_restart_e].result & f_console_result_found_e) {
- if (!(main->setting.flag & firewall_main_flag_operation_e) || main->program.parameters.array[firewall_parameter_operation_restart_e].location > index) {
- main->setting.flag &= ~firewall_main_flag_operation_e;
- main->setting.flag |= firewall_main_flag_operation_restart_e;
+ if (!(main->setting.flag & firewall_main_flag_operation_d) || main->program.parameters.array[firewall_parameter_operation_restart_e].location > index) {
+ main->setting.flag &= ~firewall_main_flag_operation_d;
+ main->setting.flag |= firewall_main_flag_operation_restart_d;
index = main->program.parameters.array[firewall_parameter_operation_restart_e].location;
}
}
if (main->program.parameters.array[firewall_parameter_operation_lock_e].result & f_console_result_found_e) {
- if (!(main->setting.flag & firewall_main_flag_operation_e) || main->program.parameters.array[firewall_parameter_operation_lock_e].location > index) {
- main->setting.flag &= ~firewall_main_flag_operation_e;
- main->setting.flag |= firewall_main_flag_operation_lock_e;
+ if (!(main->setting.flag & firewall_main_flag_operation_d) || main->program.parameters.array[firewall_parameter_operation_lock_e].location > index) {
+ main->setting.flag &= ~firewall_main_flag_operation_d;
+ main->setting.flag |= firewall_main_flag_operation_lock_d;
index = main->program.parameters.array[firewall_parameter_operation_lock_e].location;
}
}
if (main->program.parameters.array[firewall_parameter_operation_show_e].result & f_console_result_found_e) {
- if (!(main->setting.flag & firewall_main_flag_operation_e) || main->program.parameters.array[firewall_parameter_operation_show_e].location > index) {
- main->setting.flag &= ~firewall_main_flag_operation_e;
- main->setting.flag |= firewall_main_flag_operation_show_e;
+ if (!(main->setting.flag & firewall_main_flag_operation_d) || main->program.parameters.array[firewall_parameter_operation_show_e].location > index) {
+ main->setting.flag &= ~firewall_main_flag_operation_d;
+ main->setting.flag |= firewall_main_flag_operation_show_d;
}
}
if (main->program.pipe & fll_program_data_pipe_input_e) {
- main->setting.flag |= firewall_main_flag_pipe_e;
+ main->setting.flag |= firewall_main_flag_pipe_d;
}
else {
- main->setting.flag &= ~firewall_main_flag_pipe_e;
+ main->setting.flag &= ~firewall_main_flag_pipe_d;
}
- if (main->setting.flag & firewall_main_flag_operation_show_e) {
+ if (main->setting.flag & firewall_main_flag_operation_show_d) {
if (main->program.parameters.remaining.used) {
- main->setting.flag &= ~firewall_main_flag_operation_show_filter_nat_mangle_e;
+ main->setting.flag &= ~firewall_main_flag_operation_show_filter_nat_mangle_d;
for (f_number_unsigned_t i = 0; i < main->program.parameters.remaining.used; ++i) {
index = main->program.parameters.remaining.array[i];
if (f_compare_dynamic(firewall_show_nat_s, main->program.parameters.arguments.array[index]) == F_equal_to) {
- main->setting.flag |= firewall_main_flag_operation_show_nat_e;
+ main->setting.flag |= firewall_main_flag_operation_show_nat_d;
}
else if (f_compare_dynamic(firewall_show_mangle_s, main->program.parameters.arguments.array[index]) == F_equal_to) {
- main->setting.flag |= firewall_main_flag_operation_show_mangle_e;
+ main->setting.flag |= firewall_main_flag_operation_show_mangle_d;
}
else if (f_compare_dynamic(firewall_show_filter_s, main->program.parameters.arguments.array[index]) == F_equal_to) {
- main->setting.flag |= firewall_main_flag_operation_show_filter_e;
+ main->setting.flag |= firewall_main_flag_operation_show_filter_d;
}
else {
firewall_print_warning_show_option_unknown(&main->program.warning, main->program.parameters.arguments.array[index]);
} // for
}
else {
- main->setting.flag |= firewall_main_flag_operation_show_filter_nat_mangle_e;
+ main->setting.flag |= firewall_main_flag_operation_show_filter_nat_mangle_d;
}
}
}
#endif // _di_firewall_allocation_d_
/**
+ * Flags representing the current state of the processed rule.
+ *
+ * firewall_data_is_*_d:
+ * - none: No flags set.
+ * - global: The current processed rule is global.
+ * - local: The current processed rule is lock.
+ * - main: The current processed rule is main.
+ * - stop: The current processed rule is stop.
+ * - stop_main_lock: Helper flag representing main, stop, and lock being set.
+ */
+#ifndef _di_firewall_data_is_d_
+ #define firewall_data_is_none_d 0x0
+ #define firewall_data_is_global_d 0x1
+ #define firewall_data_is_lock_d 0x2
+ #define firewall_data_is_main_d 0x4
+ #define firewall_data_is_stop_d 0x8
+ #define firewall_data_is_stop_main_lock_d 0xe
+#endif // _di_firewall_data_is_d_
+
+/**
+ * Flags passed to the main function or program.
+ *
+ * firewall_main_flag_*_d:
+ * - none: No flags set.
+ * - copyright: Print copyright.
+ * - help: Print help.
+ * - operation: A helper flag representing every operation flag bit being set.
+ * - operation_lock: Perform the lock operation.
+ * - operation_restart: Perform the restart operation.
+ * - operation_show: Perform the show operation.
+ * - operation_show_nat: For the show operation, show nat.
+ * - operation_show_mangle: For the show operation, show mangle.
+ * - operation_show_filter: For the show operation, show filter.
+ * - operation_show_filter_nat_mangle: A helper flag representing the show nat, show mangle, and short filter flags set.
+ * - operation_start: Perform the start operation.
+ * - operation_start_restart: A helper flag representing both the start and restart operation flag set.
+ * - operation_stop: Perform the stop operation.
+ * - operation_stop_restart: A helper flag representing both the stop and restart operation flag set.
+ * - operation_stop_restart_lock: A helper flag representing both the stop, restart, and lock operation flag set.
+ * - pipe: Use the input pipe.
+ * - version: Print version.
+ * - version_copyright_help: A helper flag representing version, copyright, and help flag bits being set.
+ */
+#ifndef _di_firewall_main_flag_d_
+ #define firewall_main_flag_none_d 0x0
+ #define firewall_main_flag_copyright_d 0x1
+ #define firewall_main_flag_help_d 0x2
+ #define firewall_main_flag_operation_d 0x31c
+ #define firewall_main_flag_operation_lock_d 0x4
+ #define firewall_main_flag_operation_restart_d 0x8
+ #define firewall_main_flag_operation_show_d 0x10
+ #define firewall_main_flag_operation_show_nat_d 0x20
+ #define firewall_main_flag_operation_show_mangle_d 0x40
+ #define firewall_main_flag_operation_show_filter_d 0x80
+ #define firewall_main_flag_operation_show_filter_nat_mangle_d 0xe0
+ #define firewall_main_flag_operation_start_d 0x100
+ #define firewall_main_flag_operation_start_restart_d 0x108
+ #define firewall_main_flag_operation_stop_d 0x200
+ #define firewall_main_flag_operation_stop_restart_d 0x208
+ #define firewall_main_flag_operation_stop_restart_lock_d 0x20c
+ #define firewall_main_flag_pipe_d 0x400
+ #define firewall_main_flag_version_d 0x800
+ #define firewall_main_flag_version_copyright_help_d 0x803
+#endif // _di_firewall_main_flag_d_
+
+/**
* The program signal defines.
*
* firewall_signal_*_d:
#endif
/**
- * Flags passed to the main function or program.
- *
- * firewall_main_flag_*_e:
- * - none: No flags set.
- * - copyright: Print copyright.
- * - help: Print help.
- * - operation: A helper flag representing every operation flag bit being set.
- * - operation_lock: Perform the lock operation.
- * - operation_restart: Perform the restart operation.
- * - operation_show: Perform the show operation.
- * - operation_show_nat: For the show operation, show nat.
- * - operation_show_mangle: For the show operation, show mangle.
- * - operation_show_filter: For the show operation, show filter.
- * - operation_show_filter_nat_mangle: A helper flag representing the show nat, show mangle, and short filter flags set.
- * - operation_start: Perform the start operation.
- * - operation_start_restart: A helper flag representing both the start and restart operation flag set.
- * - operation_stop: Perform the stop operation.
- * - operation_stop_restart: A helper flag representing both the stop and restart operation flag set.
- * - operation_stop_restart_lock: A helper flag representing both the stop, restart, and lock operation flag set.
- * - pipe: Use the input pipe.
- * - version: Print version.
- * - version_copyright_help: A helper flag representing version, copyright, and help flag bits being set.
- */
-#ifndef _di_firewall_main_flag_e_
- enum {
- firewall_main_flag_none_e = 0x0,
- firewall_main_flag_copyright_e = 0x1,
- firewall_main_flag_help_e = 0x2,
- firewall_main_flag_operation_e = 0x31c,
- firewall_main_flag_operation_lock_e = 0x4,
- firewall_main_flag_operation_restart_e = 0x8,
- firewall_main_flag_operation_show_e = 0x10,
- firewall_main_flag_operation_show_nat_e = 0x20,
- firewall_main_flag_operation_show_mangle_e = 0x40,
- firewall_main_flag_operation_show_filter_e = 0x80,
- firewall_main_flag_operation_show_filter_nat_mangle_e = 0xe0,
- firewall_main_flag_operation_start_e = 0x100,
- firewall_main_flag_operation_start_restart_e = 0x108,
- firewall_main_flag_operation_stop_e = 0x200,
- firewall_main_flag_operation_stop_restart_e = 0x208,
- firewall_main_flag_operation_stop_restart_lock_e = 0x20c,
- firewall_main_flag_pipe_e = 0x400,
- firewall_main_flag_version_e = 0x800,
- firewall_main_flag_version_copyright_help_e = 0x803,
- }; // enum
-#endif // _di_firewall_main_flag_e_
-
-/**
* The firewall action.
*
* firewall_action_*_e:
#endif // _di_firewall_action_e_
/**
- * Flags representing the current state of the processed rule.
- *
- * firewall_data_is_*_e:
- * - none: No flags set.
- * - global: The current processed rule is global.
- * - local: The current processed rule is lock.
- * - main: The current processed rule is main.
- * - stop: The current processed rule is stop.
- * - stop_main_lock: Helper flag representing main, stop, and lock being set.
- */
-#ifndef _di_firewall_data_is_e_
- enum {
- firewall_data_is_none_e = 0x0,
- firewall_data_is_global_e = 0x1,
- firewall_data_is_lock_e = 0x2,
- firewall_data_is_main_e = 0x4,
- firewall_data_is_stop_e = 0x8,
- firewall_data_is_stop_main_lock_e = 0xe,
- }; // enum
-#endif // _di_firewall_data_is_e_
-
-/**
* Flags representing the existence of reserved sets.
*
* firewall_data_has_*_e:
#define firewall_data_t_initialize \
{ \
- firewall_data_is_none_e, \
+ firewall_data_is_none_d, \
firewall_data_has_none_e, \
0, \
0, \
#define firewall_setting_t_initialize \
{ \
- firewall_main_flag_none_e, \
+ firewall_main_flag_none_d, \
F_okay, \
f_state_t_initialize, \
f_string_dynamics_t_initialize, \
main->setting.state.status = F_okay;
- if (main->setting.flag & firewall_main_flag_version_copyright_help_e) {
- if (main->setting.flag & firewall_main_flag_help_e) {
+ if (main->setting.flag & firewall_main_flag_version_copyright_help_d) {
+ if (main->setting.flag & firewall_main_flag_help_d) {
firewall_print_message_help(&main->program.message);
}
- else if (main->setting.flag & firewall_main_flag_version_e) {
+ else if (main->setting.flag & firewall_main_flag_version_d) {
fll_program_print_version(&main->program.message, firewall_program_version_s);
}
- else if (main->setting.flag & firewall_main_flag_copyright_e) {
+ else if (main->setting.flag & firewall_main_flag_copyright_d) {
fll_program_print_copyright(&main->program.message, fll_program_copyright_year_author_s);
}
return;
}
- if (main->setting.flag & firewall_main_flag_operation_e) {
+ if (main->setting.flag & firewall_main_flag_operation_d) {
firewall_operate(main);
}
else {
if (!main) return;
- main->data.is = firewall_data_is_global_e;
+ main->data.is = firewall_data_is_global_d;
- if (main->setting.flag & firewall_main_flag_operation_show_e) {
+ if (main->setting.flag & firewall_main_flag_operation_show_d) {
firewall_operate_show(main);
return;
main->data.file.string = 0;
main->data.file.used = 0;
- if (main->setting.flag & firewall_main_flag_operation_stop_restart_lock_e) {
+ if (main->setting.flag & firewall_main_flag_operation_stop_restart_lock_d) {
main->data.file.used = firewall_network_path_s.used + firewall_file_other_s.used;
f_char_t path_file_other[main->data.file.used + 1];
}
} // for
- if (main->setting.flag & firewall_main_flag_operation_lock_e) {
+ if (main->setting.flag & firewall_main_flag_operation_lock_d) {
if (main->data.has & firewall_data_has_lock_e) {
firewall_operate_delete_chains(main);
if (F_status_is_error(main->setting.state.status) || main->setting.state.status == F_child) return;
main->data.chain = main->data.lock;
- main->data.is = firewall_data_is_lock_e;
+ main->data.is = firewall_data_is_lock_d;
main->data.range.start = main->data.chain_contents.array[main->data.lock].array[0].start;
main->data.range.stop = main->data.chain_contents.array[main->data.lock].array[0].stop;
return;
}
- if (main->setting.flag & firewall_main_flag_operation_stop_restart_e) {
+ if (main->setting.flag & firewall_main_flag_operation_stop_restart_d) {
if (main->data.has & firewall_data_has_stop_e) {
firewall_operate_delete_chains(main);
if (F_status_is_error(main->setting.state.status) || main->setting.state.status == F_child) return;
main->data.chain = main->data.stop;
- main->data.is = firewall_data_is_global_e | firewall_data_is_stop_e;
+ main->data.is = firewall_data_is_global_d | firewall_data_is_stop_d;
main->data.range.start = main->data.chain_contents.array[main->data.stop].array[0].start;
main->data.range.stop = main->data.chain_contents.array[main->data.stop].array[0].stop;
firewall_operate_rules(main);
- if (F_status_is_error(main->setting.state.status) || (main->data.has & firewall_main_flag_operation_stop_e) || main->setting.state.status == F_child) return;
+ if (F_status_is_error(main->setting.state.status) || (main->data.has & firewall_main_flag_operation_stop_d) || main->setting.state.status == F_child) return;
}
else {
main->setting.state.status = F_status_set_error(F_data);
main->data.file.used = 0;
}
- if (main->setting.flag & firewall_main_flag_operation_start_restart_e) {
+ if (main->setting.flag & firewall_main_flag_operation_start_restart_d) {
main->data.file.used = firewall_network_path_s.used + firewall_file_first_s.used;
f_char_t path_file_first[main->data.file.used + 1];
firewall_operate_buffer_chain(main, main->data.file, F_false);
- if (main->setting.flag & firewall_main_flag_operation_start_e) {
+ if (main->setting.flag & firewall_main_flag_operation_start_d) {
firewall_operate_delete_chains(main);
firewall_operate_default_lock(main);
firewall_operate_create_custom_chains(main);
- main->data.is = firewall_data_is_global_e;
+ main->data.is = firewall_data_is_global_d;
firewall_operate_chains(main);
- if (F_status_is_error(main->setting.state.status) || main->setting.state.status == F_child || (main->setting.flag & firewall_main_flag_operation_stop_e)) return;
+ if (F_status_is_error(main->setting.state.status) || main->setting.state.status == F_child || (main->setting.flag & firewall_main_flag_operation_stop_d)) return;
for (f_number_unsigned_t j = 0; j < main->setting.devices.used; ++j) {
main->data.is = 0;
firewall_operate_chains(main);
- if (F_status_is_error(main->setting.state.status) || main->setting.state.status == F_child || (main->setting.flag & firewall_main_flag_operation_stop_e)) return;
+ if (F_status_is_error(main->setting.state.status) || main->setting.state.status == F_child || (main->setting.flag & firewall_main_flag_operation_stop_d)) return;
} // for
main->cache.path_file.used = 0;
firewall_operate_create_custom_chains(main);
- main->data.is = firewall_data_is_global_e;
+ main->data.is = firewall_data_is_global_d;
firewall_operate_chains(main);
if (F_status_is_error(main->setting.state.status) || main->setting.state.status == F_child) return;
main->data.range = main->data.chain_contents.array[i].array[0];
if ((main->data.has & firewall_data_has_main_e) && i == main->data.main) {
- main->data.is |= firewall_data_is_main_e;
+ main->data.is |= firewall_data_is_main_d;
}
else {
- main->data.is &= ~firewall_data_is_main_e;
+ main->data.is &= ~firewall_data_is_main_d;
}
main->data.chain = i;
firewall_operate_rules(main);
- if (F_status_is_error(main->setting.state.status) || (main->setting.flag & firewall_main_flag_operation_stop_e) || main->setting.state.status == F_child) return;
+ if (F_status_is_error(main->setting.state.status) || (main->setting.flag & firewall_main_flag_operation_stop_d) || main->setting.state.status == F_child) return;
} // for
main->setting.state.status = F_okay;
f_ranges_t * const rule_objects = &main->data.rule_objects;
f_rangess_t * const rule_contents = &main->data.rule_contents;
- if (!(main->data.is & firewall_data_is_global_e)) {
+ if (!(main->data.is & firewall_data_is_global_d)) {
if (main->setting.devices.array[main->data.device].used) {
main->cache.device.used = 0;
}
// For custom chains, the chain command may not be specified.
- if (!(main->data.is & firewall_data_is_stop_main_lock_e)) {
+ if (!(main->data.is & firewall_data_is_stop_main_lock_d)) {
chain = firewall_chain_custom_e;
}
};
const uint16_t show_flags[] = {
- firewall_main_flag_operation_show_nat_e,
- firewall_main_flag_operation_show_mangle_e,
- firewall_main_flag_operation_show_filter_e,
+ firewall_main_flag_operation_show_nat_d,
+ firewall_main_flag_operation_show_mangle_d,
+ firewall_main_flag_operation_show_filter_d,
};
for (uint8_t i = 0; i < 3; ++i) {
}
if (main->program.parameters.array[f_console_standard_parameter_help_e].result & f_console_result_found_e) {
- main->setting.flag |= fss_identify_main_flag_help_e;
+ main->setting.flag |= fss_identify_main_flag_help_d;
return;
}
if (main->program.parameters.array[f_console_standard_parameter_version_e].result & f_console_result_found_e) {
- main->setting.flag |= fss_identify_main_flag_version_e;
+ main->setting.flag |= fss_identify_main_flag_version_d;
return;
}
if (main->program.parameters.array[f_console_standard_parameter_copyright_e].result & f_console_result_found_e) {
- main->setting.flag |= fss_identify_main_flag_copyright_e;
+ main->setting.flag |= fss_identify_main_flag_copyright_d;
return;
}
f_number_unsigned_t index = 0;
if (main->program.parameters.array[fss_identify_parameter_content_e].result & f_console_result_found_e) {
- main->setting.flag |= fss_identify_main_flag_content_e;
+ main->setting.flag |= fss_identify_main_flag_content_d;
}
else {
- main->setting.flag &= ~fss_identify_main_flag_content_e;
+ main->setting.flag &= ~fss_identify_main_flag_content_d;
}
if (main->program.parameters.array[fss_identify_parameter_object_e].result & f_console_result_found_e) {
- main->setting.flag |= fss_identify_main_flag_object_e;
+ main->setting.flag |= fss_identify_main_flag_object_d;
}
else {
- main->setting.flag &= ~fss_identify_main_flag_object_e;
+ main->setting.flag &= ~fss_identify_main_flag_object_d;
}
if (main->program.parameters.array[fss_identify_parameter_total_e].result & f_console_result_found_e) {
- main->setting.flag |= fss_identify_main_flag_total_e;
+ main->setting.flag |= fss_identify_main_flag_total_d;
}
else {
- main->setting.flag &= ~fss_identify_main_flag_total_e;
+ main->setting.flag &= ~fss_identify_main_flag_total_d;
}
if (main->program.parameters.array[fss_identify_parameter_line_e].result & f_console_result_value_e) {
return;
}
- main->setting.flag |= fss_identify_main_flag_line_e;
+ main->setting.flag |= fss_identify_main_flag_line_d;
}
else if (main->program.parameters.array[fss_identify_parameter_line_e].result & f_console_result_found_e) {
main->setting.state.status = F_status_set_error(F_parameter);
return;
}
else {
- main->setting.flag &= ~fss_identify_main_flag_line_e;
+ main->setting.flag &= ~fss_identify_main_flag_line_d;
}
if (main->program.parameters.array[fss_identify_parameter_name_e].result & f_console_result_value_e) {
return;
}
- main->setting.flag |= fss_identify_main_flag_name_e;
+ main->setting.flag |= fss_identify_main_flag_name_d;
}
else if (main->program.parameters.array[fss_identify_parameter_name_e].result & f_console_result_found_e) {
main->setting.state.status = F_status_set_error(F_parameter);
main->setting.files.array[main->setting.files.used++].size = 0;
} // for
- main->setting.flag |= fss_identify_main_flag_file_from_e;
+ main->setting.flag |= fss_identify_main_flag_file_from_d;
}
else {
- main->setting.flag &= ~fss_identify_main_flag_file_from_e;
+ main->setting.flag &= ~fss_identify_main_flag_file_from_d;
}
if (main->program.pipe & fll_program_data_pipe_input_e) {
- main->setting.flag |= fss_identify_main_flag_pipe_e;
+ main->setting.flag |= fss_identify_main_flag_pipe_d;
}
else {
- main->setting.flag &= ~fss_identify_main_flag_pipe_e;
+ main->setting.flag &= ~fss_identify_main_flag_pipe_d;
}
- if (!(main->setting.flag & fss_identify_main_flag_pipe_e | fss_identify_main_flag_file_from_e)) {
+ if (!(main->setting.flag & fss_identify_main_flag_pipe_d | fss_identify_main_flag_file_from_d)) {
main->setting.state.status = F_status_set_error(F_parameter);
fss_identify_print_error_no_from(&main->program.error);
}
// Default to both Object and Content when neither are specified.
- if (!(main->setting.flag & (fss_identify_main_flag_object_e | fss_identify_main_flag_content_e | fss_identify_main_flag_total_e))) {
- main->setting.flag |= fss_identify_main_flag_object_e;
- main->setting.flag |= fss_identify_main_flag_content_e;
+ if (!(main->setting.flag & (fss_identify_main_flag_object_d | fss_identify_main_flag_content_d | fss_identify_main_flag_total_d))) {
+ main->setting.flag |= fss_identify_main_flag_object_d;
+ main->setting.flag |= fss_identify_main_flag_content_d;
}
- if (main->setting.flag & fss_identify_main_flag_total_e) {
- if (main->setting.flag & (fss_identify_main_flag_content_e | fss_identify_main_flag_object_e)) {
+ if (main->setting.flag & fss_identify_main_flag_total_d) {
+ if (main->setting.flag & (fss_identify_main_flag_content_d | fss_identify_main_flag_object_d)) {
main->setting.state.status = F_status_set_error(F_parameter);
if (main->program.error.verbosity > f_console_verbosity_quiet_e) {
- fll_program_print_error_parameter_cannot_use_with(&main->program.error, f_console_symbol_long_normal_s, f_console_symbol_long_normal_s, main->setting.flag & fss_identify_main_flag_content_e ? fss_identify_long_content_s : fss_identify_long_object_s, fss_identify_long_total_s);
+ fll_program_print_error_parameter_cannot_use_with(&main->program.error, f_console_symbol_long_normal_s, f_console_symbol_long_normal_s, main->setting.flag & fss_identify_main_flag_content_d ? fss_identify_long_content_s : fss_identify_long_object_s, fss_identify_long_total_s);
}
}
}
#endif // _di_fss_identify_allocation_d_
/**
+ * Flags passed to the main function or program.
+ *
+ * fss_identify_main_flag_*_d:
+ * - none: No flags set.
+ * - content: Use the content (The "0000" part of "FSS-0000").
+ * - copyright: Print copyright.
+ * - file_from: Using a specified source file.
+ * - file_to: Using a specified destination file. (Not used at this time.)
+ * - header: Enable printing of headers.
+ * - help: Print help.
+ * - line: Print only the identifier at a given line.
+ * - name: Select using this full or partial type name or code.
+ * - object: Use the object (The "FSS" part of "FSS-0000").
+ * - pipe: Use the input pipe.
+ * - total: Print the total Identifiers found.
+ * - version: Print version.
+ * - version_copyright_help: A helper flag representing version, copyright, and help flag bits being set.
+ */
+#ifndef _di_fss_identify_main_flag_d_
+ #define fss_identify_main_flag_none_d 0x0
+ #define fss_identify_main_flag_content_d 0x1
+ #define fss_identify_main_flag_copyright_d 0x2
+ #define fss_identify_main_flag_file_from_d 0x4
+ #define fss_identify_main_flag_file_to_d 0x8
+ #define fss_identify_main_flag_header_d 0x10
+ #define fss_identify_main_flag_help_d 0x20
+ #define fss_identify_main_flag_line_d 0x40
+ #define fss_identify_main_flag_name_d 0x80
+ #define fss_identify_main_flag_object_d 0x100
+ #define fss_identify_main_flag_pipe_d 0x200
+ #define fss_identify_main_flag_total_d 0x400
+ #define fss_identify_main_flag_version_d 0x800
+ #define fss_identify_main_flag_version_copyright_help_d 0x822
+#endif // _di_fss_identify_main_flag_d_
+
+/**
+ * Flags for fine-tuned print control.
+ *
+ * fss_identify_print_flag_*_d:
+ * - none: No flags set.
+ * - debug: Stream is for debug printing.
+ * - error: Stream is for error printing.
+ * - in: Stream is a source file.
+ * - message: Stream is for message printing.
+ * - out: Stream is a destination file.
+ * - warning: Stream is for warning printing.
+ */
+#ifndef _di_fss_identify_print_flag_d_
+ #define fss_identify_print_flag_none_d 0x0
+ #define fss_identify_print_flag_debug_d 0x1
+ #define fss_identify_print_flag_error_d 0x2
+ #define fss_identify_print_flag_file_d 0x4
+ #define fss_identify_print_flag_in_d 0x8
+ #define fss_identify_print_flag_out_d 0x10
+ #define fss_identify_print_flag_message_d 0x20
+ #define fss_identify_print_flag_warning_d 0x40
+#endif // _di_fss_identify_print_flag_d_
+
+/**
* The program signal defines.
*
* fss_identify_signal_*_d:
#endif
/**
- * Flags passed to the main function or program.
- *
- * fss_identify_main_flag_*_e:
- * - none: No flags set.
- * - content: Use the content (The "0000" part of "FSS-0000").
- * - copyright: Print copyright.
- * - file_from: Using a specified source file.
- * - file_to: Using a specified destination file. (Not used at this time.)
- * - header: Enable printing of headers.
- * - help: Print help.
- * - line: Print only the identifier at a given line.
- * - name: Select using this full or partial type name or code.
- * - object: Use the object (The "FSS" part of "FSS-0000").
- * - pipe: Use the input pipe.
- * - total: Print the total Identifiers found.
- * - version: Print version.
- * - version_copyright_help: A helper flag representing version, copyright, and help flag bits being set.
- */
-#ifndef _di_fss_identify_main_flag_e_
- enum {
- fss_identify_main_flag_none_e = 0x0,
- fss_identify_main_flag_content_e = 0x1,
- fss_identify_main_flag_copyright_e = 0x2,
- fss_identify_main_flag_file_from_e = 0x4,
- fss_identify_main_flag_file_to_e = 0x8,
- fss_identify_main_flag_header_e = 0x10,
- fss_identify_main_flag_help_e = 0x20,
- fss_identify_main_flag_line_e = 0x40,
- fss_identify_main_flag_name_e = 0x80,
- fss_identify_main_flag_object_e = 0x100,
- fss_identify_main_flag_pipe_e = 0x200,
- fss_identify_main_flag_total_e = 0x400,
- fss_identify_main_flag_version_e = 0x800,
- fss_identify_main_flag_version_copyright_help_e = 0x822,
- }; // enum
-#endif // _di_fss_identify_main_flag_e_
-
-/**
* The main program parameters.
*/
#ifndef _di_fss_identify_parameter_e_
#define fss_identify_parameter_total_d (f_console_parameter_state_type_total_d + 5)
#endif // _di_fss_identify_parameter_e_
-/**
- * Flags for fine-tuned print control.
- *
- * fss_identify_print_flag_*_e:
- * - none: No flags set.
- * - debug: Stream is for debug printing.
- * - error: Stream is for error printing.
- * - in: Stream is a source file.
- * - message: Stream is for message printing.
- * - out: Stream is a destination file.
- * - warning: Stream is for warning printing.
- */
-#ifndef _di_fss_identify_print_flag_e_
- enum {
- fss_identify_print_flag_none_e = 0x0,
- fss_identify_print_flag_debug_e = 0x1,
- fss_identify_print_flag_error_e = 0x2,
- fss_identify_print_flag_file_e = 0x4,
- fss_identify_print_flag_in_e = 0x8,
- fss_identify_print_flag_out_e = 0x10,
- fss_identify_print_flag_message_e = 0x20,
- fss_identify_print_flag_warning_e = 0x40,
- }; // enum
-#endif // _di_fss_identify_print_flag_e_
-
#ifdef __cplusplus
} // extern "C"
#endif
#define fss_identify_setting_t_initialize \
{ \
- fss_identify_main_flag_none_e, \
+ fss_identify_main_flag_none_d, \
0, \
0, \
0, \
main->setting.state.status = F_okay;
- if (main->setting.flag & fss_identify_main_flag_version_copyright_help_e) {
- if (main->setting.flag & fss_identify_main_flag_help_e) {
+ if (main->setting.flag & fss_identify_main_flag_version_copyright_help_d) {
+ if (main->setting.flag & fss_identify_main_flag_help_d) {
fss_identify_print_message_help(&main->program.message);
}
- else if (main->setting.flag & fss_identify_main_flag_version_e) {
+ else if (main->setting.flag & fss_identify_main_flag_version_d) {
fll_program_print_version(&main->program.message, fss_identify_program_version_s);
}
- else if (main->setting.flag & fss_identify_main_flag_copyright_e) {
+ else if (main->setting.flag & fss_identify_main_flag_copyright_d) {
fll_program_print_copyright(&main->program.message, fll_program_copyright_year_author_s);
}
return;
}
- if (F_status_is_error_not(main->setting.state.status) && (main->setting.flag & fss_identify_main_flag_pipe_e)) {
+ if (F_status_is_error_not(main->setting.state.status) && (main->setting.flag & fss_identify_main_flag_pipe_d)) {
main->setting.file.id = F_type_descriptor_input_d;
main->setting.file.stream = F_type_input_d;
main->setting.file.size_read = 512;
for (f_number_unsigned_t i = 0; F_status_is_error_not(main->setting.state.status) && i < main->setting.files.used; ++i) {
if (fss_identify_signal_check(main)) break;
- if ((main->setting.flag & fss_identify_main_flag_line_e) && main->setting.current > main->setting.line) break;
+ if ((main->setting.flag & fss_identify_main_flag_line_d) && main->setting.current > main->setting.line) break;
macro_f_file_t_reset(main->setting.file);
} // for
if (F_status_is_error_not(main->setting.state.status)) {
- if (main->setting.flag & fss_identify_main_flag_total_e) {
+ if (main->setting.flag & fss_identify_main_flag_total_d) {
fss_identify_print_data_total(&main->program.message);
}
}
fss_identify_main_t data = fss_identify_main_t_initialize;
- data.program.debug.flag |= fss_identify_print_flag_debug_e | fss_identify_print_flag_out_e;
- data.program.error.flag |= fss_identify_print_flag_error_e | fss_identify_print_flag_out_e;
- data.program.output.flag |= fss_identify_print_flag_out_e;
- data.program.message.flag |= fss_identify_print_flag_message_e | fss_identify_print_flag_out_e;
- data.program.warning.flag |= fss_identify_print_flag_warning_e | fss_identify_print_flag_out_e;
+ data.program.debug.flag |= fss_identify_print_flag_debug_d | fss_identify_print_flag_out_d;
+ data.program.error.flag |= fss_identify_print_flag_error_d | fss_identify_print_flag_out_d;
+ data.program.output.flag |= fss_identify_print_flag_out_d;
+ data.program.message.flag |= fss_identify_print_flag_message_d | fss_identify_print_flag_out_d;
+ data.program.warning.flag |= fss_identify_print_flag_warning_d | fss_identify_print_flag_out_d;
data.program.error.custom = (void *) &data;
data.program.debug.custom = (void *) &data;
data.program.message.custom = (void *) &data;
f_file_stream_lock(print->to);
- if (main->setting.flag & fss_identify_main_flag_object_e) {
+ if (main->setting.flag & fss_identify_main_flag_object_d) {
f_print((const f_string_t) id.name, id.used, print->to);
- if (main->setting.flag & fss_identify_main_flag_content_e) {
+ if (main->setting.flag & fss_identify_main_flag_content_d) {
f_print_dynamic_raw(f_fss_type_header_part5_s, print->to);
}
}
- if (main->setting.flag & fss_identify_main_flag_content_e) {
+ if (main->setting.flag & fss_identify_main_flag_content_d) {
fl_print_format("%04_ui", print->to, id.type);
}
} // for
}
- if (main->setting.flag & fss_identify_main_flag_line_e) {
+ if (main->setting.flag & fss_identify_main_flag_line_d) {
for (i = 0; i < main->setting.ids.used; ++i, ++main->setting.current) {
if (main->setting.current == main->setting.line) {
if (fss_identify_process_name_compare(main, main->setting.ids.array[i], modes) != F_equal_to) continue;
}
- if (main->setting.flag & fss_identify_main_flag_total_e) {
+ if (main->setting.flag & fss_identify_main_flag_total_d) {
++main->setting.total;
}
else {
}
} // for
}
- else if (main->setting.flag & fss_identify_main_flag_total_e) {
+ else if (main->setting.flag & fss_identify_main_flag_total_d) {
if (main->setting.names.used) {
for (i = 0; i < main->setting.ids.used; ++i, ++main->setting.current) {
}
if (main->setting.state.status == F_data_not_stop || main->setting.state.status == F_data_not_eos) {
- if (!(main->setting.flag & fss_read_main_flag_total_e)) {
+ if (!(main->setting.flag & fss_read_main_flag_total_d)) {
main->setting.state.status = F_status_set_warning(main->setting.state.status);
return;
fss_read_main_t data = fss_read_main_t_initialize;
- data.program.debug.flag |= fss_read_print_flag_debug_e | fss_read_print_flag_out_e;
- data.program.error.flag |= fss_read_print_flag_error_e | fss_read_print_flag_out_e;
- data.program.output.flag |= fss_read_print_flag_out_e;
- data.program.message.flag |= fss_read_print_flag_message_e | fss_read_print_flag_out_e;
- data.program.warning.flag |= fss_read_print_flag_warning_e | fss_read_print_flag_out_e;
+ data.program.debug.flag |= fss_read_print_flag_debug_d | fss_read_print_flag_out_d;
+ data.program.error.flag |= fss_read_print_flag_error_d | fss_read_print_flag_out_d;
+ data.program.output.flag |= fss_read_print_flag_out_d;
+ data.program.message.flag |= fss_read_print_flag_message_d | fss_read_print_flag_out_d;
+ data.program.warning.flag |= fss_read_print_flag_warning_d | fss_read_print_flag_out_d;
data.program.error.custom = (void *) &data;
data.program.debug.custom = (void *) &data;
data.program.output.custom = (void *) &data;
data.program.warning.custom = (void *) &data;
- data.setting.flag |= fss_read_main_flag_line_single_e;
- data.setting.flag |= fss_read_main_flag_quote_content_e | fss_read_main_flag_quote_object_e;
+ data.setting.flag |= fss_read_main_flag_line_single_d;
+ data.setting.flag |= fss_read_main_flag_quote_content_d | fss_read_main_flag_quote_object_d;
data.setting.state.custom = (void *) &data;
data.setting.standard = fss_read_basic_standard_s;
fss_read_main_t * const main = (fss_read_main_t *) print->custom;
- if (main->setting.flag & fss_read_main_flag_content_e) {
- if (main->setting.flag & fss_read_main_flag_pipe_format_e) {
+ if (main->setting.flag & fss_read_main_flag_content_d) {
+ if (main->setting.flag & fss_read_main_flag_pipe_format_d) {
fll_print_dynamic_raw(fss_read_pipe_content_start_s, print->to);
}
else {
}
if (main->setting.state.status == F_data_not_stop || main->setting.state.status == F_data_not_eos) {
- if (!(main->setting.flag & fss_read_main_flag_total_e)) {
+ if (!(main->setting.flag & fss_read_main_flag_total_d)) {
main->setting.state.status = F_status_set_warning(main->setting.state.status);
return;
fss_read_main_t data = fss_read_main_t_initialize;
- data.program.debug.flag |= fss_read_print_flag_debug_e | fss_read_print_flag_out_e;
- data.program.error.flag |= fss_read_print_flag_error_e | fss_read_print_flag_out_e;
- data.program.output.flag |= fss_read_print_flag_out_e;
- data.program.message.flag |= fss_read_print_flag_message_e | fss_read_print_flag_out_e;
- data.program.warning.flag |= fss_read_print_flag_warning_e | fss_read_print_flag_out_e;
+ data.program.debug.flag |= fss_read_print_flag_debug_d | fss_read_print_flag_out_d;
+ data.program.error.flag |= fss_read_print_flag_error_d | fss_read_print_flag_out_d;
+ data.program.output.flag |= fss_read_print_flag_out_d;
+ data.program.message.flag |= fss_read_print_flag_message_d | fss_read_print_flag_out_d;
+ data.program.warning.flag |= fss_read_print_flag_warning_d | fss_read_print_flag_out_d;
data.program.error.custom = (void *) &data;
data.program.debug.custom = (void *) &data;
data.program.output.custom = (void *) &data;
data.program.warning.custom = (void *) &data;
- data.setting.flag |= fss_read_main_flag_object_as_line_e | fss_read_main_flag_object_trim_e;
+ data.setting.flag |= fss_read_main_flag_object_as_line_d | fss_read_main_flag_object_trim_d;
data.setting.state.custom = (void *) &data;
data.setting.standard = fss_read_basic_list_standard_s;
f_file_stream_lock(print->to);
- if (main->setting.flag & fss_read_main_flag_pipe_format_e) {
+ if (main->setting.flag & fss_read_main_flag_pipe_format_d) {
f_print_dynamic_raw(fss_read_pipe_content_start_s, print->to);
}
else {
- if (main->setting.flag & fss_read_main_flag_content_e) {
+ if (main->setting.flag & fss_read_main_flag_content_d) {
f_print_dynamic_raw(f_fss_basic_list_open_s, print->to);
f_print_dynamic_raw(f_fss_basic_list_open_end_s, print->to);
}
}
if (main->setting.state.status == F_data_not_stop || main->setting.state.status == F_data_not_eos) {
- if (!(main->setting.flag & fss_read_main_flag_total_e)) {
+ if (!(main->setting.flag & fss_read_main_flag_total_d)) {
main->setting.state.status = F_status_set_warning(main->setting.state.status);
return;
fss_read_main_t data = fss_read_main_t_initialize;
- data.program.debug.flag |= fss_read_print_flag_debug_e | fss_read_print_flag_out_e;
- data.program.error.flag |= fss_read_print_flag_error_e | fss_read_print_flag_out_e;
- data.program.output.flag |= fss_read_print_flag_out_e;
- data.program.message.flag |= fss_read_print_flag_message_e | fss_read_print_flag_out_e;
- data.program.warning.flag |= fss_read_print_flag_warning_e | fss_read_print_flag_out_e;
+ data.program.debug.flag |= fss_read_print_flag_debug_d | fss_read_print_flag_out_d;
+ data.program.error.flag |= fss_read_print_flag_error_d | fss_read_print_flag_out_d;
+ data.program.output.flag |= fss_read_print_flag_out_d;
+ data.program.message.flag |= fss_read_print_flag_message_d | fss_read_print_flag_out_d;
+ data.program.warning.flag |= fss_read_print_flag_warning_d | fss_read_print_flag_out_d;
data.program.error.custom = (void *) &data;
data.program.debug.custom = (void *) &data;
data.program.output.custom = (void *) &data;
data.program.warning.custom = (void *) &data;
- data.setting.flag |= fss_read_main_flag_object_as_line_e | fss_read_main_flag_content_has_close_e | fss_read_main_flag_object_trim_e;
- data.setting.flag |= fss_read_main_flag_depth_multiple_e;
+ data.setting.flag |= fss_read_main_flag_object_as_line_d | fss_read_main_flag_content_has_close_d | fss_read_main_flag_object_trim_d;
+ data.setting.flag |= fss_read_main_flag_depth_multiple_d;
data.setting.state.custom = (void *) &data;
data.setting.standard = fss_read_embedded_list_standard_s;
f_file_stream_lock(print->to);
- if (main->setting.flag & fss_read_main_flag_pipe_format_e) {
+ if (main->setting.flag & fss_read_main_flag_pipe_format_d) {
f_print_dynamic_raw(fss_read_pipe_content_start_s, print->to);
}
else {
- if (main->setting.flag & fss_read_main_flag_content_e) {
+ if (main->setting.flag & fss_read_main_flag_content_d) {
f_print_dynamic_raw(f_fss_embedded_list_open_s, print->to);
f_print_dynamic_raw(f_fss_embedded_list_open_end_s, print->to);
}
fss_read_main_t * const main = (fss_read_main_t *) print->custom;
- if ((main->setting.flag & fss_read_main_flag_object_e) && main->setting.flag & fss_read_main_flag_content_e) {
+ if ((main->setting.flag & fss_read_main_flag_object_d) && main->setting.flag & fss_read_main_flag_content_d) {
f_print_dynamic_raw(f_fss_embedded_list_close_s, print->to);
f_print_dynamic_raw(f_fss_embedded_list_close_end_s, print->to);
}
}
if (main->setting.state.status == F_data_not_stop || main->setting.state.status == F_data_not_eos) {
- if (!(main->setting.flag & fss_read_main_flag_total_e)) {
+ if (!(main->setting.flag & fss_read_main_flag_total_d)) {
main->setting.state.status = F_status_set_warning(main->setting.state.status);
return;
fss_read_main_t data = fss_read_main_t_initialize;
- data.program.debug.flag |= fss_read_print_flag_debug_e | fss_read_print_flag_out_e;
- data.program.error.flag |= fss_read_print_flag_error_e | fss_read_print_flag_out_e;
- data.program.output.flag |= fss_read_print_flag_out_e;
- data.program.message.flag |= fss_read_print_flag_message_e | fss_read_print_flag_out_e;
- data.program.warning.flag |= fss_read_print_flag_warning_e | fss_read_print_flag_out_e;
+ data.program.debug.flag |= fss_read_print_flag_debug_d | fss_read_print_flag_out_d;
+ data.program.error.flag |= fss_read_print_flag_error_d | fss_read_print_flag_out_d;
+ data.program.output.flag |= fss_read_print_flag_out_d;
+ data.program.message.flag |= fss_read_print_flag_message_d | fss_read_print_flag_out_d;
+ data.program.warning.flag |= fss_read_print_flag_warning_d | fss_read_print_flag_out_d;
data.program.error.custom = (void *) &data;
data.program.debug.custom = (void *) &data;
data.program.output.custom = (void *) &data;
data.program.warning.custom = (void *) &data;
- data.setting.flag |= fss_read_main_flag_line_single_e | fss_read_main_flag_content_multiple_e;
- data.setting.flag |= fss_read_main_flag_quote_content_e | fss_read_main_flag_quote_object_e;
+ data.setting.flag |= fss_read_main_flag_line_single_d | fss_read_main_flag_content_multiple_d;
+ data.setting.flag |= fss_read_main_flag_quote_content_d | fss_read_main_flag_quote_object_d;
data.setting.state.custom = (void *) &data;
data.setting.standard = fss_read_extended_standard_s;
fss_read_main_t * const main = (fss_read_main_t *) print->custom;
- if (main->setting.flag & fss_read_main_flag_content_e) {
- fll_print_dynamic_raw((main->setting.flag & fss_read_main_flag_pipe_format_e) ? fss_read_pipe_content_start_s : f_fss_extended_next_s, print->to);
+ if (main->setting.flag & fss_read_main_flag_content_d) {
+ fll_print_dynamic_raw((main->setting.flag & fss_read_main_flag_pipe_format_d) ? fss_read_pipe_content_start_s : f_fss_extended_next_s, print->to);
}
return F_okay;
fss_read_main_t * const main = (fss_read_main_t *) print->custom;
- if (main->setting.flag & fss_read_main_flag_content_e) {
- if (main->setting.flag & fss_read_main_flag_pipe_format_e) {
+ if (main->setting.flag & fss_read_main_flag_content_d) {
+ if (main->setting.flag & fss_read_main_flag_pipe_format_d) {
fll_print_dynamic_raw(fss_read_pipe_content_start_s, print->to);
}
else {
}
if (main->setting.state.status == F_data_not_stop || main->setting.state.status == F_data_not_eos) {
- if (!(main->setting.flag & fss_read_main_flag_total_e)) {
+ if (!(main->setting.flag & fss_read_main_flag_total_d)) {
main->setting.state.status = F_status_set_warning(main->setting.state.status);
return;
fss_read_main_t data = fss_read_main_t_initialize;
- data.program.debug.flag |= fss_read_print_flag_debug_e | fss_read_print_flag_out_e;
- data.program.error.flag |= fss_read_print_flag_error_e | fss_read_print_flag_out_e;
- data.program.output.flag |= fss_read_print_flag_out_e;
- data.program.message.flag |= fss_read_print_flag_message_e | fss_read_print_flag_out_e;
- data.program.warning.flag |= fss_read_print_flag_warning_e | fss_read_print_flag_out_e;
+ data.program.debug.flag |= fss_read_print_flag_debug_d | fss_read_print_flag_out_d;
+ data.program.error.flag |= fss_read_print_flag_error_d | fss_read_print_flag_out_d;
+ data.program.output.flag |= fss_read_print_flag_out_d;
+ data.program.message.flag |= fss_read_print_flag_message_d | fss_read_print_flag_out_d;
+ data.program.warning.flag |= fss_read_print_flag_warning_d | fss_read_print_flag_out_d;
data.program.error.custom = (void *) &data;
data.program.debug.custom = (void *) &data;
data.program.output.custom = (void *) &data;
data.program.warning.custom = (void *) &data;
- data.setting.flag |= fss_read_main_flag_object_as_line_e | fss_read_main_flag_content_has_close_e | fss_read_main_flag_object_trim_e;
+ data.setting.flag |= fss_read_main_flag_object_as_line_d | fss_read_main_flag_content_has_close_d | fss_read_main_flag_object_trim_d;
data.setting.state.custom = (void *) &data;
data.setting.standard = fss_read_extended_list_standard_s;
f_file_stream_lock(print->to);
- if (main->setting.flag & fss_read_main_flag_pipe_format_e) {
+ if (main->setting.flag & fss_read_main_flag_pipe_format_d) {
f_print_dynamic_raw(fss_read_pipe_content_start_s, print->to);
}
else {
- if (main->setting.flag & fss_read_main_flag_content_e) {
+ if (main->setting.flag & fss_read_main_flag_content_d) {
f_print_dynamic_raw(f_fss_extended_list_open_s, print->to);
f_print_dynamic_raw(f_fss_extended_list_open_end_s, print->to);
}
fss_read_main_t * const main = (fss_read_main_t *) print->custom;
- if ((main->setting.flag & fss_read_main_flag_object_e) && main->setting.flag & fss_read_main_flag_content_e) {
+ if ((main->setting.flag & fss_read_main_flag_object_d) && main->setting.flag & fss_read_main_flag_content_d) {
f_print_dynamic_raw(f_fss_extended_list_close_s, print->to);
f_print_dynamic_raw(f_fss_extended_list_close_end_s, print->to);
}
main->program.output.to.flag = F_file_flag_create_d | F_file_flag_write_only_d | F_file_flag_append_d;
if (parameters->array[f_console_standard_parameter_help_e].result & f_console_result_found_e) {
- main->setting.flag |= fss_read_main_flag_help_e;
+ main->setting.flag |= fss_read_main_flag_help_d;
}
if (parameters->array[f_console_standard_parameter_version_e].result & f_console_result_found_e) {
- main->setting.flag |= fss_read_main_flag_version_e;
+ main->setting.flag |= fss_read_main_flag_version_d;
}
if (parameters->array[f_console_standard_parameter_copyright_e].result & f_console_result_found_e) {
- main->setting.flag |= fss_read_main_flag_copyright_e;
+ main->setting.flag |= fss_read_main_flag_copyright_d;
}
if (callback) {
f_number_unsigned_t index = 0;
if (main->program.pipe & fll_program_data_pipe_input_e) {
- main->setting.flag |= fss_read_main_flag_pipe_e;
+ main->setting.flag |= fss_read_main_flag_pipe_d;
}
else {
- main->setting.flag &= ~fss_read_main_flag_pipe_e;
+ main->setting.flag &= ~fss_read_main_flag_pipe_d;
}
{
};
const uint32_t parameter_flag[] = {
- fss_read_main_flag_at_e,
- fss_read_main_flag_depth_e,
- fss_read_main_flag_line_e,
- fss_read_main_flag_select_e,
- fss_read_main_flag_name_e,
- fss_read_main_flag_delimit_e,
+ fss_read_main_flag_at_d,
+ fss_read_main_flag_depth_d,
+ fss_read_main_flag_line_d,
+ fss_read_main_flag_select_d,
+ fss_read_main_flag_name_d,
+ fss_read_main_flag_delimit_d,
};
f_number_unsigned_t * const parameter_value_digit[] = {
}
} // for
- main->setting.flag |= fss_read_main_flag_columns_e;
+ main->setting.flag |= fss_read_main_flag_columns_d;
}
if (parameters->array[fss_read_parameter_pipe_e].result & f_console_result_found_e) {
if (parameters->array[fss_read_parameter_content_e].result & f_console_result_found_e) {
if (parameters->array[fss_read_parameter_object_e].result & f_console_result_found_e) {
- main->setting.flag |= fss_read_main_flag_object_e;
+ main->setting.flag |= fss_read_main_flag_object_d;
}
- main->setting.flag |= fss_read_main_flag_content_e;
+ main->setting.flag |= fss_read_main_flag_content_d;
}
else if (parameters->array[fss_read_parameter_object_e].result & f_console_result_found_e) {
- main->setting.flag |= fss_read_main_flag_object_e;
+ main->setting.flag |= fss_read_main_flag_object_d;
}
else {
// Fallback to Content as the default.
- main->setting.flag |= fss_read_main_flag_content_e;
+ main->setting.flag |= fss_read_main_flag_content_d;
}
if (parameters->array[fss_read_parameter_empty_e].result & f_console_result_found_e) {
- main->setting.flag |= fss_read_main_flag_empty_e;
+ main->setting.flag |= fss_read_main_flag_empty_d;
}
if (parameters->array[fss_read_parameter_original_e].result & f_console_result_found_e) {
- main->setting.flag |= fss_read_main_flag_original_e;
+ main->setting.flag |= fss_read_main_flag_original_d;
}
if (parameters->array[fss_read_parameter_pipe_e].result & f_console_result_found_e) {
- main->setting.flag |= fss_read_main_flag_pipe_format_e;
+ main->setting.flag |= fss_read_main_flag_pipe_format_d;
}
if (parameters->array[fss_read_parameter_total_e].result & f_console_result_found_e) {
- main->setting.flag |= fss_read_main_flag_total_e;
+ main->setting.flag |= fss_read_main_flag_total_d;
}
if (parameters->array[fss_read_parameter_trim_e].result & f_console_result_found_e) {
- main->setting.flag |= fss_read_main_flag_trim_e;
+ main->setting.flag |= fss_read_main_flag_trim_d;
}
fss_read_setting_load_depth(arguments, main, parameters);
if (F_status_is_error(main->setting.state.status)) return;
if (parameters->array[fss_read_parameter_trim_e].result & f_console_result_found_e) {
- main->setting.flag |= fss_read_main_flag_trim_e;
+ main->setting.flag |= fss_read_main_flag_trim_d;
}
f_file_t file = f_file_t_initialize;
/**
* The program allocation block defines.
*
- * fss_payload_read_block_*:
+ * fss_payload_read_block_*_d:
* - max: The max block read size before checking for interrupt.
* - read_small: The block read size for small files.
* - read_large: The block read size for large files.
*/
-#ifndef _di_fss_read_allocation_d_
+#ifndef _di_fss_read_allocation_block_d_
#define fss_read_allocation_block_max_d 16777216
#define fss_read_allocation_block_read_small_d 8192
#define fss_read_allocation_block_read_large_d 65536
-#endif // _di_fss_read_allocation_d_
+#endif // _di_fss_read_allocation_block_d_
+
+/**
+ * Flags passed to the main function or program.
+ *
+ * fss_read_main_flag_*_d:
+ * - none: No flags set.
+ * - at: The object at the given position is being selected (Think of this as select a row for some Object).
+ * - columns: The total columns found and selected is printed instead of the Content.
+ * - content: The Content is to be printed.
+ * - content_has_close: The Content has a closing character which needs to be counted and handled when processing both Object and Content, but is otherwise not processed or printed.
+ * - content_multiple: Designate that multiple Content is allowed for an Object for this standard rather than a single Content per Object.
+ * - copyright: Print copyright.
+ * - delimit: How delimits are to be handled is designated.
+ * - depth: The depth is specified at least once.
+ * - depth_multiple: Designate that multiple depths are allowed within Content rather than being single depth Content.
+ * - empty: Empty Content will be printed (Objects that have no Content will have their empty Content printed).
+ * - help: Print help.
+ * - line: A specific Content at a given line is to be selected (Think of this as select a row for some Content).
+ * - line_single: Designate that only a single line for Content is allowed for an Object for this standard rather than allowing multiple lines per Content per Object.
+ * - name: A specific Object name has been requested.
+ * - object: The Object is to be printed.
+ * - object_as_line: The Object is counted as its own line for the purpose of -l/--line or any other similar behavior.
+ * - object_trim: Empty space before an after Objects are ignored while processing without affecting printing behavior.
+ * - original: Enable original printing, where the quotes are printed and no delimits are applied.
+ * - payload_create: Create the payload Object with empty Content if the payload Object is missing (when using FSS Payload and related).
+ * - payload_error: Treat missing or invalid payload as an error (when using FSS Payload and related).
+ * - payload_warn: Treat missing or invalid payload as a warning (when using FSS Payload and related).
+ * - pipe: Use the input pipe.
+ * - pipe_format: Print using the special pipe format.
+ * - quote_content: Designate that the standard supports quotes on Content.
+ * - quote_object: Designate that the standard supports quotes on Objects.
+ * - select: A specific Content at a given position is to be selected (Think of this as select a column for some Content).
+ * - total: The total lines found and selected is printed instead of the Content.
+ * - trim: Empty space before and after Objects and Content will not be printed (They will be trimmed).
+ * - trim_object: Empty space before and after Objects (but not Content) will not be printed (They will be trimmed).
+ * - version: Print version.
+ * - version_copyright_help: A helper flag representing version, copyright, and help flag bits being set.
+ */
+#ifndef _di_fss_read_main_flag_d_
+ #define fss_read_main_flag_none_d 0x0
+ #define fss_read_main_flag_at_d 0x1
+ #define fss_read_main_flag_columns_d 0x2
+ #define fss_read_main_flag_content_d 0x4
+ #define fss_read_main_flag_content_has_close_d 0x8
+ #define fss_read_main_flag_content_multiple_d 0x10
+ #define fss_read_main_flag_copyright_d 0x20
+ #define fss_read_main_flag_delimit_d 0x40
+ #define fss_read_main_flag_depth_d 0x80
+ #define fss_read_main_flag_depth_multiple_d 0x100
+ #define fss_read_main_flag_empty_d 0x200
+ #define fss_read_main_flag_help_d 0x400
+ #define fss_read_main_flag_line_d 0x800
+ #define fss_read_main_flag_line_single_d 0x1000
+ #define fss_read_main_flag_name_d 0x2000
+ #define fss_read_main_flag_object_d 0x4000
+ #define fss_read_main_flag_object_as_line_d 0x8000
+ #define fss_read_main_flag_object_trim_d 0x10000
+ #define fss_read_main_flag_original_d 0x20000
+ #define fss_read_main_flag_payload_create_d 0x40000
+ #define fss_read_main_flag_payload_error_d 0x80000
+ #define fss_read_main_flag_payload_warn_d 0x100000
+ #define fss_read_main_flag_pipe_d 0x200000
+ #define fss_read_main_flag_pipe_format_d 0x400000
+ #define fss_read_main_flag_quote_content_d 0x800000
+ #define fss_read_main_flag_quote_object_d 0x1000000
+ #define fss_read_main_flag_select_d 0x2000000
+ #define fss_read_main_flag_total_d 0x4000000
+ #define fss_read_main_flag_trim_d 0x8000000
+ #define fss_read_main_flag_trim_object_d 0x10000000
+ #define fss_read_main_flag_version_d 0x20000000
+ #define fss_read_main_flag_version_copyright_help_d 0x20000420
+#endif // _di_fss_read_main_flag_d_
+
+/**
+ * Flags for fine-tuned print control.
+ *
+ * fss_read_print_flag_*_d:
+ * - none: No flags set.
+ * - debug: Stream is for debug printing.
+ * - error: Stream is for error printing.
+ * - in: Stream is a source file.
+ * - message: Stream is for message printing.
+ * - out: Stream is a destination file.
+ * - warning: Stream is for warning printing.
+ */
+#ifndef _di_fss_read_print_flag_d_
+ #define fss_read_print_flag_none_d 0x0
+ #define fss_read_print_flag_debug_d 0x1
+ #define fss_read_print_flag_error_d 0x2
+ #define fss_read_print_flag_file_d 0x4
+ #define fss_read_print_flag_in_d 0x8
+ #define fss_read_print_flag_out_d 0x10
+ #define fss_read_print_flag_message_d 0x20
+ #define fss_read_print_flag_warning_d 0x40
+#endif // _di_fss_read_print_flag_d_
/**
* The program signal defines.
#endif
/**
- * Flags passed to the main function or program.
- *
- * fss_read_main_flag_*_e:
- * - none: No flags set.
- * - at: The object at the given position is being selected (Think of this as select a row for some Object).
- * - columns: The total columns found and selected is printed instead of the Content.
- * - content: The Content is to be printed.
- * - content_has_close: The Content has a closing character which needs to be counted and handled when processing both Object and Content, but is otherwise not processed or printed.
- * - content_multiple: Designate that multiple Content is allowed for an Object for this standard rather than a single Content per Object.
- * - copyright: Print copyright.
- * - delimit: How delimits are to be handled is designated.
- * - depth: The depth is specified at least once.
- * - depth_multiple: Designate that multiple depths are allowed within Content rather than being single depth Content.
- * - empty: Empty Content will be printed (Objects that have no Content will have their empty Content printed).
- * - help: Print help.
- * - line: A specific Content at a given line is to be selected (Think of this as select a row for some Content).
- * - line_single: Designate that only a single line for Content is allowed for an Object for this standard rather than allowing multiple lines per Content per Object.
- * - name: A specific Object name has been requested.
- * - object: The Object is to be printed.
- * - object_as_line: The Object is counted as its own line for the purpose of -l/--line or any other similar behavior.
- * - object_trim: Empty space before an after Objects are ignored while processing without affecting printing behavior.
- * - original: Enable original printing, where the quotes are printed and no delimits are applied.
- * - payload_create: Create the payload Object with empty Content if the payload Object is missing (when using FSS Payload and related).
- * - payload_error: Treat missing or invalid payload as an error (when using FSS Payload and related).
- * - payload_warn: Treat missing or invalid payload as a warning (when using FSS Payload and related).
- * - pipe: Use the input pipe.
- * - pipe_format: Print using the special pipe format.
- * - quote_content: Designate that the standard supports quotes on Content.
- * - quote_object: Designate that the standard supports quotes on Objects.
- * - select: A specific Content at a given position is to be selected (Think of this as select a column for some Content).
- * - total: The total lines found and selected is printed instead of the Content.
- * - trim: Empty space before and after Objects and Content will not be printed (They will be trimmed).
- * - trim_object: Empty space before and after Objects (but not Content) will not be printed (They will be trimmed).
- * - version: Print version.
- * - version_copyright_help: A helper flag representing version, copyright, and help flag bits being set.
- */
-#ifndef _di_fss_read_main_flag_e_
- enum {
- fss_read_main_flag_none_e = 0x0,
- fss_read_main_flag_at_e = 0x1,
- fss_read_main_flag_columns_e = 0x2,
- fss_read_main_flag_content_e = 0x4,
- fss_read_main_flag_content_has_close_e = 0x8,
- fss_read_main_flag_content_multiple_e = 0x10,
- fss_read_main_flag_copyright_e = 0x20,
- fss_read_main_flag_delimit_e = 0x40,
- fss_read_main_flag_depth_e = 0x80,
- fss_read_main_flag_depth_multiple_e = 0x100,
- fss_read_main_flag_empty_e = 0x200,
- fss_read_main_flag_help_e = 0x400,
- fss_read_main_flag_line_e = 0x800,
- fss_read_main_flag_line_single_e = 0x1000,
- fss_read_main_flag_name_e = 0x2000,
- fss_read_main_flag_object_e = 0x4000,
- fss_read_main_flag_object_as_line_e = 0x8000,
- fss_read_main_flag_object_trim_e = 0x10000,
- fss_read_main_flag_original_e = 0x20000,
- fss_read_main_flag_payload_create_e = 0x40000,
- fss_read_main_flag_payload_error_e = 0x80000,
- fss_read_main_flag_payload_warn_e = 0x100000,
- fss_read_main_flag_pipe_e = 0x200000,
- fss_read_main_flag_pipe_format_e = 0x400000,
- fss_read_main_flag_quote_content_e = 0x800000,
- fss_read_main_flag_quote_object_e = 0x1000000,
- fss_read_main_flag_select_e = 0x2000000,
- fss_read_main_flag_total_e = 0x4000000,
- fss_read_main_flag_trim_e = 0x8000000,
- fss_read_main_flag_trim_object_e = 0x10000000,
- fss_read_main_flag_version_e = 0x20000000,
- fss_read_main_flag_version_copyright_help_e = 0x20000420,
- }; // enum
-#endif // _di_fss_read_main_flag_e_
-
-/**
* The main program parameters.
*/
#ifndef _di_fss_read_parameter_e_
#endif // _di_fss_read_parameter_e_
/**
- * Flags for fine-tuned print control.
- *
- * fss_read_print_flag_*_e:
- * - none: No flags set.
- * - debug: Stream is for debug printing.
- * - error: Stream is for error printing.
- * - in: Stream is a source file.
- * - message: Stream is for message printing.
- * - out: Stream is a destination file.
- * - warning: Stream is for warning printing.
- */
-#ifndef _di_fss_read_print_flag_e_
- enum {
- fss_read_print_flag_none_e = 0x0,
- fss_read_print_flag_debug_e = 0x1,
- fss_read_print_flag_error_e = 0x2,
- fss_read_print_flag_file_e = 0x4,
- fss_read_print_flag_in_e = 0x8,
- fss_read_print_flag_out_e = 0x10,
- fss_read_print_flag_message_e = 0x20,
- fss_read_print_flag_warning_e = 0x40,
- }; // enum
-#endif // _di_fss_read_print_flag_e_
-
-/**
* FSS Delimit Parameter enumerations.
*
* fss_read_delimit_mode_*_e:
#define fss_read_setting_t_initialize \
{ \
- fss_read_main_flag_none_e, \
+ fss_read_main_flag_none_d, \
fss_read_delimit_mode_all_e, \
F_okay, \
macro_f_state_t_initialize_1(fss_read_allocation_large_d, fss_read_allocation_small_d, F_okay, 0, 0, &fll_program_standard_signal_handle, 0, 0, 0, 0), \
main->setting.state.status = F_okay;
- if (main->setting.flag & fss_read_main_flag_version_copyright_help_e) {
- if (main->setting.flag & fss_read_main_flag_help_e) {
+ if (main->setting.flag & fss_read_main_flag_version_copyright_help_d) {
+ if (main->setting.flag & fss_read_main_flag_help_d) {
if (main->callback.process_help) {
main->callback.process_help(void_main);
}
fss_read_print_message_help(&main->program.message);
}
}
- else if (main->setting.flag & fss_read_main_flag_version_e) {
+ else if (main->setting.flag & fss_read_main_flag_version_d) {
fll_program_print_version(&main->program.message, fss_read_program_version_s);
}
- else if (main->setting.flag & fss_read_main_flag_copyright_e) {
+ else if (main->setting.flag & fss_read_main_flag_copyright_d) {
fll_program_print_copyright(&main->program.message, fll_program_copyright_year_author_s);
}
return;
}
- if (main->setting.flag & (fss_read_main_flag_object_e | fss_read_main_flag_content_e)) {
+ if (main->setting.flag & (fss_read_main_flag_object_d | fss_read_main_flag_content_d)) {
if (main->callback.process_normal) {
main->callback.process_normal(void_main);
}
fss_read_main_t data = fss_read_main_t_initialize;
- data.program.debug.flag |= fss_read_print_flag_debug_e | fss_read_print_flag_out_e;
- data.program.error.flag |= fss_read_print_flag_error_e | fss_read_print_flag_out_e;
- data.program.output.flag |= fss_read_print_flag_out_e;
- data.program.message.flag |= fss_read_print_flag_message_e | fss_read_print_flag_out_e;
- data.program.warning.flag |= fss_read_print_flag_warning_e | fss_read_print_flag_out_e;
+ data.program.debug.flag |= fss_read_print_flag_debug_d | fss_read_print_flag_out_d;
+ data.program.error.flag |= fss_read_print_flag_error_d | fss_read_print_flag_out_d;
+ data.program.output.flag |= fss_read_print_flag_out_d;
+ data.program.message.flag |= fss_read_print_flag_message_d | fss_read_print_flag_out_d;
+ data.program.warning.flag |= fss_read_print_flag_warning_d | fss_read_print_flag_out_d;
data.program.error.custom = (void *) &data;
data.program.debug.custom = (void *) &data;
#ifndef _di_fss_read_main_setting_load_as_
void fss_read_main_setting_load_as(const f_console_arguments_t arguments, fss_read_main_t * const main) {
- if (!main || F_status_is_error(main->setting.state.status) || (main->setting.flag & fss_read_main_flag_version_e)) return;
+ if (!main || F_status_is_error(main->setting.state.status) || (main->setting.flag & fss_read_main_flag_version_d)) return;
// Use the default standard of: FSS-0000 (Basic)
main->callback.process_help = &fss_read_main_process_help;
main->setting.standard = fss_read_basic_standard_s;
- main->setting.flag &= ~fss_read_main_flag_content_has_close_e;
- main->setting.flag &= ~fss_read_main_flag_content_multiple_e;
- main->setting.flag &= ~fss_read_main_flag_depth_multiple_e;
- main->setting.flag &= ~fss_read_main_flag_object_as_line_e;
- main->setting.flag &= ~fss_read_main_flag_object_trim_e;
- main->setting.flag &= ~fss_read_main_flag_payload_error_e;
- main->setting.flag &= ~fss_read_main_flag_payload_warn_e;
- main->setting.flag &= ~fss_read_main_flag_trim_object_e;
+ main->setting.flag &= ~fss_read_main_flag_content_has_close_d;
+ main->setting.flag &= ~fss_read_main_flag_content_multiple_d;
+ main->setting.flag &= ~fss_read_main_flag_depth_multiple_d;
+ main->setting.flag &= ~fss_read_main_flag_object_as_line_d;
+ main->setting.flag &= ~fss_read_main_flag_object_trim_d;
+ main->setting.flag &= ~fss_read_main_flag_payload_error_d;
+ main->setting.flag &= ~fss_read_main_flag_payload_warn_d;
+ main->setting.flag &= ~fss_read_main_flag_trim_object_d;
- main->setting.flag |= fss_read_main_flag_line_single_e;
- main->setting.flag |= fss_read_main_flag_quote_content_e | fss_read_main_flag_quote_object_e;
+ main->setting.flag |= fss_read_main_flag_line_single_d;
+ main->setting.flag |= fss_read_main_flag_quote_content_d | fss_read_main_flag_quote_object_d;
if (main->program.parameters.array[fss_read_parameter_as_e].result & f_console_result_value_e && main->program.parameters.array[fss_read_parameter_as_e].values.used) {
const f_number_unsigned_t index = main->program.parameters.array[fss_read_parameter_as_e].values.array[main->program.parameters.array[fss_read_parameter_as_e].values.used - 1];
main->setting.standard = fss_read_basic_standard_s;
// Remove flags not supported for this standard.
- main->setting.flag &= ~fss_read_main_flag_content_has_close_e;
- main->setting.flag &= ~fss_read_main_flag_content_multiple_e;
- main->setting.flag &= ~fss_read_main_flag_depth_multiple_e;
- main->setting.flag &= ~fss_read_main_flag_object_as_line_e;
- main->setting.flag &= ~fss_read_main_flag_object_trim_e;
- main->setting.flag &= ~fss_read_main_flag_payload_error_e;
- main->setting.flag &= ~fss_read_main_flag_payload_warn_e;
- main->setting.flag &= ~fss_read_main_flag_trim_object_e;
-
- main->setting.flag |= fss_read_main_flag_line_single_e;
- main->setting.flag |= fss_read_main_flag_quote_content_e | fss_read_main_flag_quote_object_e;
+ main->setting.flag &= ~fss_read_main_flag_content_has_close_d;
+ main->setting.flag &= ~fss_read_main_flag_content_multiple_d;
+ main->setting.flag &= ~fss_read_main_flag_depth_multiple_d;
+ main->setting.flag &= ~fss_read_main_flag_object_as_line_d;
+ main->setting.flag &= ~fss_read_main_flag_object_trim_d;
+ main->setting.flag &= ~fss_read_main_flag_payload_error_d;
+ main->setting.flag &= ~fss_read_main_flag_payload_warn_d;
+ main->setting.flag &= ~fss_read_main_flag_trim_object_d;
+
+ main->setting.flag |= fss_read_main_flag_line_single_d;
+ main->setting.flag |= fss_read_main_flag_quote_content_d | fss_read_main_flag_quote_object_d;
main->program.parameters.array[fss_read_parameter_payload_e].flag |= f_console_flag_disable_e;
main->setting.standard = fss_read_extended_standard_s;
// Remove flags not supported for this standard.
- main->setting.flag &= ~fss_read_main_flag_content_has_close_e;
- main->setting.flag &= ~fss_read_main_flag_depth_multiple_e;
- main->setting.flag &= ~fss_read_main_flag_object_as_line_e;
- main->setting.flag &= ~fss_read_main_flag_object_trim_e;
- main->setting.flag &= ~fss_read_main_flag_payload_error_e;
- main->setting.flag &= ~fss_read_main_flag_payload_warn_e;
- main->setting.flag &= ~fss_read_main_flag_trim_object_e;
+ main->setting.flag &= ~fss_read_main_flag_content_has_close_d;
+ main->setting.flag &= ~fss_read_main_flag_depth_multiple_d;
+ main->setting.flag &= ~fss_read_main_flag_object_as_line_d;
+ main->setting.flag &= ~fss_read_main_flag_object_trim_d;
+ main->setting.flag &= ~fss_read_main_flag_payload_error_d;
+ main->setting.flag &= ~fss_read_main_flag_payload_warn_d;
+ main->setting.flag &= ~fss_read_main_flag_trim_object_d;
- main->setting.flag |= fss_read_main_flag_line_single_e | fss_read_main_flag_content_multiple_e;
- main->setting.flag |= fss_read_main_flag_quote_content_e | fss_read_main_flag_quote_object_e;
+ main->setting.flag |= fss_read_main_flag_line_single_d | fss_read_main_flag_content_multiple_d;
+ main->setting.flag |= fss_read_main_flag_quote_content_d | fss_read_main_flag_quote_object_d;
main->program.parameters.array[fss_read_parameter_payload_e].flag |= f_console_flag_disable_e;
main->setting.standard = fss_read_basic_list_standard_s;
// Remove flags not supported for this standard.
- main->setting.flag &= ~fss_read_main_flag_content_has_close_e;
- main->setting.flag &= ~fss_read_main_flag_content_multiple_e;
- main->setting.flag &= ~fss_read_main_flag_depth_multiple_e;
- main->setting.flag &= ~fss_read_main_flag_line_single_e;
- main->setting.flag &= ~fss_read_main_flag_payload_error_e;
- main->setting.flag &= ~fss_read_main_flag_payload_warn_e;
- main->setting.flag &= ~fss_read_main_flag_quote_content_e;
- main->setting.flag &= ~fss_read_main_flag_quote_object_e;
+ main->setting.flag &= ~fss_read_main_flag_content_has_close_d;
+ main->setting.flag &= ~fss_read_main_flag_content_multiple_d;
+ main->setting.flag &= ~fss_read_main_flag_depth_multiple_d;
+ main->setting.flag &= ~fss_read_main_flag_line_single_d;
+ main->setting.flag &= ~fss_read_main_flag_payload_error_d;
+ main->setting.flag &= ~fss_read_main_flag_payload_warn_d;
+ main->setting.flag &= ~fss_read_main_flag_quote_content_d;
+ main->setting.flag &= ~fss_read_main_flag_quote_object_d;
- main->setting.flag |= fss_read_main_flag_object_as_line_e | fss_read_main_flag_object_trim_e;
+ main->setting.flag |= fss_read_main_flag_object_as_line_d | fss_read_main_flag_object_trim_d;
main->program.parameters.array[fss_read_parameter_payload_e].flag |= f_console_flag_disable_e;
main->setting.standard = fss_read_extended_list_standard_s;
// Remove flags not supported for this standard.
- main->setting.flag &= ~fss_read_main_flag_line_single_e;
- main->setting.flag &= ~fss_read_main_flag_content_multiple_e;
- main->setting.flag &= ~fss_read_main_flag_depth_multiple_e;
- main->setting.flag &= ~fss_read_main_flag_payload_error_e;
- main->setting.flag &= ~fss_read_main_flag_payload_warn_e;
- main->setting.flag &= ~fss_read_main_flag_quote_content_e;
- main->setting.flag &= ~fss_read_main_flag_quote_object_e;
+ main->setting.flag &= ~fss_read_main_flag_line_single_d;
+ main->setting.flag &= ~fss_read_main_flag_content_multiple_d;
+ main->setting.flag &= ~fss_read_main_flag_depth_multiple_d;
+ main->setting.flag &= ~fss_read_main_flag_payload_error_d;
+ main->setting.flag &= ~fss_read_main_flag_payload_warn_d;
+ main->setting.flag &= ~fss_read_main_flag_quote_content_d;
+ main->setting.flag &= ~fss_read_main_flag_quote_object_d;
- main->setting.flag |= fss_read_main_flag_content_has_close_e;
- main->setting.flag |= fss_read_main_flag_object_as_line_e | fss_read_main_flag_object_trim_e;
+ main->setting.flag |= fss_read_main_flag_content_has_close_d;
+ main->setting.flag |= fss_read_main_flag_object_as_line_d | fss_read_main_flag_object_trim_d;
main->program.parameters.array[fss_read_parameter_payload_e].flag |= f_console_flag_disable_e;
main->setting.standard = fss_read_embedded_list_standard_s;
// Remove flags not supported for this standard.
- main->setting.flag &= ~fss_read_main_flag_content_has_close_e;
- main->setting.flag &= ~fss_read_main_flag_line_single_e;
- main->setting.flag &= ~fss_read_main_flag_payload_error_e;
- main->setting.flag &= ~fss_read_main_flag_payload_warn_e;
- main->setting.flag &= ~fss_read_main_flag_quote_content_e;
- main->setting.flag &= ~fss_read_main_flag_quote_object_e;
+ main->setting.flag &= ~fss_read_main_flag_content_has_close_d;
+ main->setting.flag &= ~fss_read_main_flag_line_single_d;
+ main->setting.flag &= ~fss_read_main_flag_payload_error_d;
+ main->setting.flag &= ~fss_read_main_flag_payload_warn_d;
+ main->setting.flag &= ~fss_read_main_flag_quote_content_d;
+ main->setting.flag &= ~fss_read_main_flag_quote_object_d;
- main->setting.flag |= fss_read_main_flag_content_has_close_e | fss_read_main_flag_content_multiple_e;
- main->setting.flag |= fss_read_main_flag_depth_multiple_e;
- main->setting.flag |= fss_read_main_flag_object_as_line_e | fss_read_main_flag_object_trim_e;
+ main->setting.flag |= fss_read_main_flag_content_has_close_d | fss_read_main_flag_content_multiple_d;
+ main->setting.flag |= fss_read_main_flag_depth_multiple_d;
+ main->setting.flag |= fss_read_main_flag_object_as_line_d | fss_read_main_flag_object_trim_d;
main->program.parameters.array[fss_read_parameter_payload_e].flag |= f_console_flag_disable_e;
main->setting.standard = fss_read_payload_standard_s;
// Remove flags not supported for this standard.
- main->setting.flag &= ~fss_read_main_flag_content_has_close_e;
- main->setting.flag &= ~fss_read_main_flag_content_multiple_e;
- main->setting.flag &= ~fss_read_main_flag_depth_multiple_e;
- main->setting.flag &= ~fss_read_main_flag_line_single_e;
- main->setting.flag &= ~fss_read_main_flag_quote_content_e;
- main->setting.flag &= ~fss_read_main_flag_quote_object_e;
+ main->setting.flag &= ~fss_read_main_flag_content_has_close_d;
+ main->setting.flag &= ~fss_read_main_flag_content_multiple_d;
+ main->setting.flag &= ~fss_read_main_flag_depth_multiple_d;
+ main->setting.flag &= ~fss_read_main_flag_line_single_d;
+ main->setting.flag &= ~fss_read_main_flag_quote_content_d;
+ main->setting.flag &= ~fss_read_main_flag_quote_object_d;
- main->setting.flag |= fss_read_main_flag_object_as_line_e | fss_read_main_flag_object_trim_e;
- main->setting.flag |= fss_read_main_flag_payload_error_e;
+ main->setting.flag |= fss_read_main_flag_object_as_line_d | fss_read_main_flag_object_trim_d;
+ main->setting.flag |= fss_read_main_flag_payload_error_d;
main->program.parameters.array[fss_read_parameter_payload_e].flag &= ~f_console_flag_disable_e;
else {
main->setting.state.status = F_status_set_error(F_parameter);
- if (main->setting.flag & fss_read_main_flag_help_e) {
+ if (main->setting.flag & fss_read_main_flag_help_d) {
fss_read_main_process_help((void *) main);
}
else {
main->setting.state.status = f_console_parameter_reset(&main->program.parameters);
if (F_status_is_error(main->setting.state.status)) {
- if (main->setting.flag & fss_read_main_flag_help_e) {
+ if (main->setting.flag & fss_read_main_flag_help_d) {
fss_read_main_process_help((void *) main);
}
else {
f_console_parameter_process(arguments, &main->program.parameters, &main->setting.state, 0);
if (F_status_is_error(main->setting.state.status)) {
- if (main->setting.flag & fss_read_main_flag_help_e) {
+ if (main->setting.flag & fss_read_main_flag_help_d) {
fss_read_main_process_help((void *) main);
}
else {
if (f_compare_dynamic(as, main->program.parameters.arguments.array[index_new]) != F_equal_to) {
main->setting.state.status = F_status_set_error(F_parameter);
- if (main->setting.flag & fss_read_main_flag_help_e) {
+ if (main->setting.flag & fss_read_main_flag_help_d) {
fss_read_main_process_help((void *) main);
}
else {
else if (main->program.parameters.array[fss_read_parameter_as_e].result & f_console_result_found_e) {
main->setting.state.status = F_status_set_error(F_parameter);
- if (main->setting.flag & fss_read_main_flag_help_e) {
+ if (main->setting.flag & fss_read_main_flag_help_d) {
fss_read_main_process_help((void *) main);
return;
bool print_set_end = F_false;
- if ((main->setting.flag & fss_read_main_flag_object_e) || (main->setting.flag & fss_read_main_flag_content_e) && (main->setting.contents.array[at].used || (main->setting.flag & fss_read_main_flag_empty_e))) {
- if (main->setting.flag & fss_read_main_flag_object_e) {
+ if ((main->setting.flag & fss_read_main_flag_object_d) || (main->setting.flag & fss_read_main_flag_content_d) && (main->setting.contents.array[at].used || (main->setting.flag & fss_read_main_flag_empty_d))) {
+ if (main->setting.flag & fss_read_main_flag_object_d) {
if (main->callback.print_object) {
main->callback.print_object(&main->program.output, at, delimits_object);
}
print_set_end = F_true;
}
- if (main->setting.flag & fss_read_main_flag_content_e) {
- if (main->setting.flag & fss_read_main_flag_select_e) {
+ if (main->setting.flag & fss_read_main_flag_content_d) {
+ if (main->setting.flag & fss_read_main_flag_select_d) {
if (main->setting.contents.array[at].used) {
if (main->setting.select < main->setting.contents.array[at].used) {
if (main->setting.contents.array[at].array[main->setting.select].start <= main->setting.contents.array[at].array[main->setting.select].stop) {
main->callback.print_content_ignore(&main->program.output);
}
- if (main->setting.flag & fss_read_main_flag_original_e) {
- if (main->setting.flag & fss_read_main_flag_quote_content_e) {
+ if (main->setting.flag & fss_read_main_flag_original_d) {
+ if (main->setting.flag & fss_read_main_flag_quote_content_d) {
fss_read_print_quote(&main->program.output, quote);
}
}
fll_print_except_in_dynamic_partial(main->setting.buffer, range, delimits, main->setting.comments, print->to);
- if (main->setting.flag & fss_read_main_flag_original_e) {
- if (main->setting.flag & fss_read_main_flag_quote_content_e) {
+ if (main->setting.flag & fss_read_main_flag_original_d) {
+ if (main->setting.flag & fss_read_main_flag_quote_content_d) {
fss_read_print_quote(&main->program.output, quote);
}
}
fss_read_main_t * const main = (fss_read_main_t *) print->custom;
- if (main->callback.print_set_end && (main->setting.flag & fss_read_main_flag_empty_e)) {
+ if (main->callback.print_set_end && (main->setting.flag & fss_read_main_flag_empty_d)) {
main->callback.print_set_end(print);
}
fss_read_main_t * const main = (fss_read_main_t *) print->custom;
- if (main->setting.flag & fss_read_main_flag_pipe_format_e) {
+ if (main->setting.flag & fss_read_main_flag_pipe_format_d) {
fll_print_dynamic_raw(fss_read_pipe_content_ignore_s, print->to);
}
if (at >= main->setting.objects.used) return F_output_not;
- if (main->setting.flag & (fss_read_main_flag_trim_e | fss_read_main_flag_trim_object_e)) {
- if (main->setting.flag & fss_read_main_flag_original_e) {
+ if (main->setting.flag & (fss_read_main_flag_trim_d | fss_read_main_flag_trim_object_d)) {
+ if (main->setting.flag & fss_read_main_flag_original_d) {
if (main->setting.quotes_object.array[at]) {
fss_read_print_quote(&main->program.output, main->setting.quotes_object.array[at]);
}
}
}
else {
- if (main->setting.flag & fss_read_main_flag_original_e) {
+ if (main->setting.flag & fss_read_main_flag_original_d) {
if (main->setting.quotes_object.array[at]) {
fss_read_print_quote(&main->program.output, main->setting.quotes_object.array[at]);
}
fss_read_main_t * const main = (fss_read_main_t *) print->custom;
- fll_print_dynamic_raw((main->setting.flag & fss_read_main_flag_pipe_format_e) ? fss_read_pipe_content_end_s : f_string_eol_s, print->to);
+ fll_print_dynamic_raw((main->setting.flag & fss_read_main_flag_pipe_format_d) ? fss_read_pipe_content_end_s : f_string_eol_s, print->to);
return F_okay;
}
fss_read_main_t * const main = (fss_read_main_t *) print->custom;
- if (main->setting.flag & fss_read_main_flag_pipe_format_e) {
+ if (main->setting.flag & fss_read_main_flag_pipe_format_d) {
fll_print_dynamic_raw(fss_read_pipe_content_end_s, print->to);
}
// For depth, most standards do not support nesting, so any depth greater than 0 can be predicted without processing the buffer.
// For select, most standards do not support multiple select, so any select greater than 0 can be predicted without processing the buffer.
- if (!(main->setting.flag & fss_read_main_flag_depth_multiple_e) && main->setting.depths.array[0].depth || !(main->setting.flag & fss_read_main_flag_content_multiple_e) && ((main->setting.flag & fss_read_main_flag_select_e) && main->setting.select)) {
- if (main->setting.flag & fss_read_main_flag_total_e) {
+ if (!(main->setting.flag & fss_read_main_flag_depth_multiple_d) && main->setting.depths.array[0].depth || !(main->setting.flag & fss_read_main_flag_content_multiple_d) && ((main->setting.flag & fss_read_main_flag_select_d) && main->setting.select)) {
+ if (main->setting.flag & fss_read_main_flag_total_d) {
fss_read_print_number(&main->program.output, 0);
}
main->callback.process_load(main);
if (F_status_is_error(main->setting.state.status)) return;
- const f_number_unsigneds_t * const delimits_object = !(main->setting.flag & fss_read_main_flag_original_e) && fss_read_delimit_object_is(main, 0) ? &main->setting.delimits_object : &fss_read_except_none_c;
- const f_number_unsigneds_t * const delimits_content = !(main->setting.flag & fss_read_main_flag_original_e) && fss_read_delimit_content_is(main, 0) ? &main->setting.delimits_content : &fss_read_except_none_c;
+ const f_number_unsigneds_t * const delimits_object = !(main->setting.flag & fss_read_main_flag_original_d) && fss_read_delimit_object_is(main, 0) ? &main->setting.delimits_object : &fss_read_except_none_c;
+ const f_number_unsigneds_t * const delimits_content = !(main->setting.flag & fss_read_main_flag_original_d) && fss_read_delimit_content_is(main, 0) ? &main->setting.delimits_content : &fss_read_except_none_c;
bool names[main->setting.objects.used];
memset(names, F_true, sizeof(bool) * main->setting.objects.used);
}
- if (main->setting.flag & fss_read_main_flag_total_e) {
+ if (main->setting.flag & fss_read_main_flag_total_d) {
if (main->callback.process_total) {
main->callback.process_total(main, names);
}
}
- else if (main->setting.flag & fss_read_main_flag_at_e) {
+ else if (main->setting.flag & fss_read_main_flag_at_d) {
if (main->callback.process_at) {
main->callback.process_at(main, names, *delimits_object, *delimits_content);
}
}
- else if (main->setting.flag & fss_read_main_flag_columns_e) {
+ else if (main->setting.flag & fss_read_main_flag_columns_d) {
if (main->callback.process_columns) {
main->callback.process_columns(main, names);
}
else {
f_number_unsigned_t i = 0;
- if (main->setting.flag & fss_read_main_flag_line_e) {
+ if (main->setting.flag & fss_read_main_flag_line_d) {
if (main->callback.process_at_line) {
f_number_unsigned_t line = 0;
fss_read_main_t * const main = (fss_read_main_t *) void_main;
if (main->setting.depths.array[0].value_at >= main->setting.objects.used) {
- if (main->setting.flag & (fss_read_main_flag_columns_e | fss_read_main_flag_total_e)) {
+ if (main->setting.flag & (fss_read_main_flag_columns_d | fss_read_main_flag_total_d)) {
fss_read_print_number(&main->program.output, 0);
}
}
// If the standard only has one line per Content, then any line value greater than 0 equates to no line to print.
- if ((main->setting.flag & fss_read_main_flag_line_e) && (main->setting.flag & fss_read_main_flag_line_single_e)) {
+ if ((main->setting.flag & fss_read_main_flag_line_d) && (main->setting.flag & fss_read_main_flag_line_single_d)) {
if (main->setting.line) {
main->setting.state.status = F_okay;
if (fss_read_signal_check(main)) return;
if (at == main->setting.depths.array[0].value_at) {
- if (main->setting.flag & fss_read_main_flag_line_e) {
+ if (main->setting.flag & fss_read_main_flag_line_d) {
// If using "--at" for standards that only support one line per Object, then the only valid line is line 0.
- if ((main->setting.flag & fss_read_main_flag_line_single_e) && !at) break;
+ if ((main->setting.flag & fss_read_main_flag_line_single_d) && !at) break;
if (main->callback.process_at_line) {
f_number_unsigned_t line = 0;
main->callback.process_at_line(void_main, i, delimits_object, delimits_content, &line);
}
}
- else if (main->setting.flag & fss_read_main_flag_columns_e) {
+ else if (main->setting.flag & fss_read_main_flag_columns_d) {
fss_read_print_number(&main->program.output, main->setting.contents.array[i].used);
}
else if (main->callback.print_at) {
if (F_status_is_error(main->setting.state.status)) return;
- if (main->setting.flag & fss_read_main_flag_total_e) {
+ if (main->setting.flag & fss_read_main_flag_total_d) {
fss_read_print_number(&main->program.output, 0);
}
fss_read_main_t * const main = (fss_read_main_t *) void_main;
- if (main->setting.flag & fss_read_main_flag_object_e) {
+ if (main->setting.flag & fss_read_main_flag_object_d) {
if (*line == main->setting.line) {
if (main->callback.print_object) {
main->callback.print_object(&main->program.output, at, delimits_object);
main->callback.print_object_end(&main->program.output);
}
- if (!(main->setting.flag & fss_read_main_flag_content_e)) {
- if (!(main->setting.flag & fss_read_main_flag_object_as_line_e)) {
+ if (!(main->setting.flag & fss_read_main_flag_content_d)) {
+ if (!(main->setting.flag & fss_read_main_flag_object_as_line_d)) {
if (main->callback.print_set_end) {
main->callback.print_set_end(&main->program.output);
}
}
}
- if ((main->setting.flag & fss_read_main_flag_object_as_line_e) || !(main->setting.flag & fss_read_main_flag_content_e)) {
+ if ((main->setting.flag & fss_read_main_flag_object_as_line_d) || !(main->setting.flag & fss_read_main_flag_content_d)) {
++(*line);
}
}
- if (main->setting.flag & fss_read_main_flag_content_e) {
+ if (main->setting.flag & fss_read_main_flag_content_d) {
if (!main->setting.contents.array[at].used) {
// Must process/count line when both Object and Content share the same line but Content is empty for single line Content.
- if ((main->setting.flag & fss_read_main_flag_line_single_e)) {
- if (main->setting.flag & fss_read_main_flag_object_e) {
- if (!(main->setting.flag & fss_read_main_flag_object_as_line_e)) {
+ if ((main->setting.flag & fss_read_main_flag_line_single_d)) {
+ if (main->setting.flag & fss_read_main_flag_object_d) {
+ if (!(main->setting.flag & fss_read_main_flag_object_as_line_d)) {
if (*line == main->setting.line) {
if (main->callback.print_set_end) {
main->callback.print_set_end(&main->program.output);
++(*line);
}
}
- else if (main->setting.flag & fss_read_main_flag_empty_e) {
+ else if (main->setting.flag & fss_read_main_flag_empty_d) {
if (*line == main->setting.line) {
if (main->callback.print_content_empty_set) {
main->callback.print_content_empty_set(&main->program.output);
f_number_unsigned_t i = 0;
- if (main->setting.flag & fss_read_main_flag_line_single_e) {
+ if (main->setting.flag & fss_read_main_flag_line_single_d) {
if (*line == main->setting.line) {
while (main->setting.contents.array[at].used) {
// @fixme The fll_fss_*_read functions do not have a store of the set closing ranges but should.
// Simulate the ending by printing, but the original range should ideally be used (add new features to accomplish this).
- if ((main->setting.flag & fss_read_main_flag_object_e) && (main->setting.flag & fss_read_main_flag_content_has_close_e)) {
+ if ((main->setting.flag & fss_read_main_flag_object_d) && (main->setting.flag & fss_read_main_flag_content_has_close_d)) {
if (*line == main->setting.line) {
if (main->callback.print_set_end) {
main->callback.print_set_end(&main->program.output);
fss_read_main_t * const main = (fss_read_main_t *) void_main;
- if (!(main->setting.flag & fss_read_main_flag_content_e)) {
+ if (!(main->setting.flag & fss_read_main_flag_content_d)) {
fss_read_print_number(&main->program.output, 0);
main->setting.state.status = F_okay;
f_number_unsigned_t max = 0;
- if (main->setting.flag & fss_read_main_flag_content_multiple_e) {
+ if (main->setting.flag & fss_read_main_flag_content_multiple_d) {
uint8_t has_at = F_false;
for (f_number_unsigned_t at = 0; at < main->setting.contents.used; ++at) {
}
} // for
- if (!max && has_at && (main->setting.flag & fss_read_main_flag_empty_e)) {
+ if (!max && has_at && (main->setting.flag & fss_read_main_flag_empty_d)) {
max = 1;
}
}
memset(names, F_false, sizeof(bool) * main->setting.objects.used);
- if (main->setting.flag & (fss_read_main_flag_trim_e | fss_read_main_flag_trim_object_e | fss_read_main_flag_object_trim_e)) {
+ if (main->setting.flag & (fss_read_main_flag_trim_d | fss_read_main_flag_trim_object_d | fss_read_main_flag_object_trim_d)) {
for (i = 0; i < main->setting.objects.used; ++i) {
if (fss_read_signal_check(main)) return;
f_number_unsigned_t total = 0;
f_number_unsigned_t i = 0;
- if (main->setting.flag & fss_read_main_flag_select_e) {
+ if (main->setting.flag & fss_read_main_flag_select_d) {
for (; i < main->setting.contents.used; ++i) {
if (!names[i]) continue;
if (fss_read_signal_check(main)) return;
- if (main->setting.flag & fss_read_main_flag_at_e) {
+ if (main->setting.flag & fss_read_main_flag_at_d) {
if (main->setting.depths.array[0].value_at != i) continue;
}
if (main->setting.contents.array[i].used) {
if (main->setting.select < main->setting.contents.array[i].used) {
- if ((main->setting.flag & fss_read_main_flag_empty_e) || main->setting.contents.array[i].array[main->setting.select].start <= main->setting.contents.array[i].array[main->setting.select].stop) {
+ if ((main->setting.flag & fss_read_main_flag_empty_d) || main->setting.contents.array[i].array[main->setting.select].start <= main->setting.contents.array[i].array[main->setting.select].stop) {
++total;
}
}
}
- else if (!main->setting.select && (main->setting.flag & fss_read_main_flag_empty_e)) {
+ else if (!main->setting.select && (main->setting.flag & fss_read_main_flag_empty_d)) {
++total;
}
} // for
if (!names[i]) continue;
if (fss_read_signal_check(main)) return;
- if (main->setting.flag & fss_read_main_flag_at_e) {
+ if (main->setting.flag & fss_read_main_flag_at_d) {
if (main->setting.depths.array[0].value_at != i) continue;
}
- if (!(main->setting.flag & fss_read_main_flag_object_e) && (main->setting.flag & fss_read_main_flag_content_e)) {
- if (!(main->setting.contents.array[i].used || (main->setting.flag & fss_read_main_flag_empty_e))) continue;
+ if (!(main->setting.flag & fss_read_main_flag_object_d) && (main->setting.flag & fss_read_main_flag_content_d)) {
+ if (!(main->setting.contents.array[i].used || (main->setting.flag & fss_read_main_flag_empty_d))) continue;
}
++total;
fss_read_print_number(
&main->program.output,
- main->setting.flag & fss_read_main_flag_line_e
+ main->setting.flag & fss_read_main_flag_line_d
? main->setting.line < total ? 1 : 0
: total
);
if (!names[at]) continue;
if (fss_read_signal_check(main)) return;
- if (main->setting.flag & fss_read_main_flag_at_e) {
+ if (main->setting.flag & fss_read_main_flag_at_d) {
if (main->setting.depths.array[0].value_at != at) continue;
}
- if (main->setting.flag & fss_read_main_flag_object_e) {
+ if (main->setting.flag & fss_read_main_flag_object_d) {
++total;
}
- if (main->setting.flag & fss_read_main_flag_content_e) {
+ if (main->setting.flag & fss_read_main_flag_content_d) {
if (!main->setting.contents.array[at].used) continue;
for (i = 0; i < main->setting.contents.array[at].used; ++i) {
} // for
// If Content does not end with a newline, it still must be treated as the last line.
- if ((main->setting.flag & fss_read_main_flag_line_single_e) && i) {
+ if ((main->setting.flag & fss_read_main_flag_line_single_d) && i) {
j = main->setting.contents.array[at].array[i - 1].stop;
if (main->setting.buffer.string[j] != f_string_eol_s.string[0]) ++total;
}
- if ((main->setting.flag & fss_read_main_flag_object_e) && (main->setting.flag & fss_read_main_flag_content_has_close_e)) {
+ if ((main->setting.flag & fss_read_main_flag_object_d) && (main->setting.flag & fss_read_main_flag_content_has_close_d)) {
++total;
}
}
fss_read_print_number(
&main->program.output,
- main->setting.flag & fss_read_main_flag_line_e
+ main->setting.flag & fss_read_main_flag_line_d
? main->setting.line < total ? 1 : 0
: total
);
if (F_status_set_fine(main->setting.state.status) == F_interrupt) return;
if (main->setting.state.status == F_status_set_error(F_okay_stop) || main->setting.state.status == F_status_set_error(F_okay_eos)) {
- if (main->setting.flag & fss_read_main_flag_payload_error_e) {
+ if (main->setting.flag & fss_read_main_flag_payload_error_d) {
fss_read_payload_print_problem_payload_missing(&main->program.error);
return;
}
- if (main->setting.flag & (fss_read_main_flag_payload_error_e | fss_read_main_flag_payload_warn_e)) {
+ if (main->setting.flag & (fss_read_main_flag_payload_error_d | fss_read_main_flag_payload_warn_d)) {
if (main->program.warning.verbosity > f_console_verbosity_normal_e) {
fss_read_payload_print_problem_payload_missing(&main->program.warning);
}
main->setting.state.status = F_okay;
}
- else if (main->setting.flag & fss_read_main_flag_payload_create_e) {
+ else if (main->setting.flag & fss_read_main_flag_payload_create_d) {
main->setting.state.status = f_string_dynamic_append_assure(f_string_eol_s, &main->setting.buffer);
if (F_status_is_error(main->setting.state.status)) {
}
if (main->setting.state.status == F_data_not_stop || main->setting.state.status == F_data_not_eos) {
- if (!(main->setting.flag & fss_read_main_flag_total_e)) {
+ if (!(main->setting.flag & fss_read_main_flag_total_d)) {
main->setting.state.status = F_status_set_warning(main->setting.state.status);
return;
f_string_static_t * const argv = main->program.parameters.arguments.array;
if (f_compare_dynamic(argv[values->array[values->used - 1]], fss_read_string_create_s) == F_equal_to) {
- main->setting.flag |= fss_read_main_flag_payload_create_e;
- main->setting.flag &= ~(fss_read_main_flag_payload_error_e | fss_read_main_flag_payload_warn_e);
+ main->setting.flag |= fss_read_main_flag_payload_create_d;
+ main->setting.flag &= ~(fss_read_main_flag_payload_error_d | fss_read_main_flag_payload_warn_d);
}
else if (f_compare_dynamic(argv[values->array[values->used - 1]], fss_read_string_none_s) == F_equal_to) {
- main->setting.flag |= fss_read_main_flag_payload_error_e;
- main->setting.flag &= ~(fss_read_main_flag_payload_create_e | fss_read_main_flag_payload_error_e | fss_read_main_flag_payload_warn_e);
+ main->setting.flag |= fss_read_main_flag_payload_error_d;
+ main->setting.flag &= ~(fss_read_main_flag_payload_create_d | fss_read_main_flag_payload_error_d | fss_read_main_flag_payload_warn_d);
}
else if (f_compare_dynamic(argv[values->array[values->used - 1]], fss_read_string_error_s) == F_equal_to) {
- main->setting.flag |= fss_read_main_flag_payload_error_e;
- main->setting.flag &= ~(fss_read_main_flag_payload_create_e | fss_read_main_flag_payload_warn_e);
+ main->setting.flag |= fss_read_main_flag_payload_error_d;
+ main->setting.flag &= ~(fss_read_main_flag_payload_create_d | fss_read_main_flag_payload_warn_d);
}
else if (f_compare_dynamic(argv[values->array[values->used - 1]], fss_read_string_warn_s) == F_equal_to) {
- main->setting.flag |= fss_read_main_flag_payload_warn_e;
- main->setting.flag &= ~(fss_read_main_flag_payload_create_e | fss_read_main_flag_payload_error_e);
+ main->setting.flag |= fss_read_main_flag_payload_warn_d;
+ main->setting.flag &= ~(fss_read_main_flag_payload_create_d | fss_read_main_flag_payload_error_d);
}
else {
main->setting.state.status = F_status_set_error(F_parameter);
fss_read_main_t data = fss_read_main_t_initialize;
- data.program.debug.flag |= fss_read_print_flag_debug_e | fss_read_print_flag_out_e;
- data.program.error.flag |= fss_read_print_flag_error_e | fss_read_print_flag_out_e;
- data.program.output.flag |= fss_read_print_flag_out_e;
- data.program.message.flag |= fss_read_print_flag_message_e | fss_read_print_flag_out_e;
- data.program.warning.flag |= fss_read_print_flag_warning_e | fss_read_print_flag_out_e;
+ data.program.debug.flag |= fss_read_print_flag_debug_d | fss_read_print_flag_out_d;
+ data.program.error.flag |= fss_read_print_flag_error_d | fss_read_print_flag_out_d;
+ data.program.output.flag |= fss_read_print_flag_out_d;
+ data.program.message.flag |= fss_read_print_flag_message_d | fss_read_print_flag_out_d;
+ data.program.warning.flag |= fss_read_print_flag_warning_d | fss_read_print_flag_out_d;
data.program.error.custom = (void *) &data;
data.program.debug.custom = (void *) &data;
data.program.output.custom = (void *) &data;
data.program.warning.custom = (void *) &data;
- data.setting.flag |= fss_read_main_flag_object_as_line_e | fss_read_main_flag_object_trim_e;
+ data.setting.flag |= fss_read_main_flag_object_as_line_d | fss_read_main_flag_object_trim_d;
data.setting.state.custom = (void *) &data;
data.setting.standard = fss_read_payload_standard_s;
f_file_stream_lock(print->to);
- if (main->setting.flag & fss_read_main_flag_pipe_format_e) {
+ if (main->setting.flag & fss_read_main_flag_pipe_format_d) {
f_print_dynamic_raw(fss_read_pipe_content_start_s, print->to);
}
else {
- if (main->setting.flag & fss_read_main_flag_content_e) {
+ if (main->setting.flag & fss_read_main_flag_content_d) {
f_print_dynamic_raw(f_fss_payload_list_open_s, print->to);
f_print_dynamic_raw(f_fss_payload_list_open_end_s, print->to);
}
if (main->setting.content) {
fl_fss_basic_content_write(
*main->setting.content,
- (main->setting.flag & fss_write_main_flag_partial_e)
+ (main->setting.flag & fss_write_main_flag_partial_d)
? f_fss_complete_partial_e
: f_fss_complete_full_e,
&main->setting.range,
}
}
- if ((main->setting.flag & fss_write_main_flag_partial_e) && !(main->setting.flag & fss_write_main_flag_object_e) || !(main->setting.flag & (fss_write_main_flag_object_e | fss_write_main_flag_content_e))) {
- if (main->setting.flag & fss_write_main_flag_content_end_e) {
+ if ((main->setting.flag & fss_write_main_flag_partial_d) && !(main->setting.flag & fss_write_main_flag_object_d) || !(main->setting.flag & (fss_write_main_flag_object_d | fss_write_main_flag_content_d))) {
+ if (main->setting.flag & fss_write_main_flag_content_end_d) {
main->setting.state.status = f_string_dynamic_append(f_fss_basic_close_s, &main->setting.buffer);
if (F_status_is_error(main->setting.state.status)) {
main->setting.quote.used
? main->setting.quote.string[0]
: f_fss_quote_double_s.string[0],
- (main->setting.flag & fss_write_main_flag_partial_e)
- ? (main->setting.flag & fss_write_main_flag_trim_e)
+ (main->setting.flag & fss_write_main_flag_partial_d)
+ ? (main->setting.flag & fss_write_main_flag_trim_d)
? f_fss_complete_trim_e
: f_fss_complete_none_e
- : (main->setting.flag & fss_write_main_flag_trim_e)
+ : (main->setting.flag & fss_write_main_flag_trim_d)
? f_fss_complete_full_trim_e
: f_fss_complete_full_e,
&main->setting.range,
}
}
- if ((main->setting.flag & fss_write_main_flag_partial_e) && !(main->setting.flag & fss_write_main_flag_content_e) || !(main->setting.flag & (fss_write_main_flag_object_e | fss_write_main_flag_content_e))) {
- if (main->setting.flag & fss_write_main_flag_object_open_e) {
+ if ((main->setting.flag & fss_write_main_flag_partial_d) && !(main->setting.flag & fss_write_main_flag_content_d) || !(main->setting.flag & (fss_write_main_flag_object_d | fss_write_main_flag_content_d))) {
+ if (main->setting.flag & fss_write_main_flag_object_open_d) {
main->setting.state.status = f_string_dynamic_append(f_fss_basic_open_s, &main->setting.buffer);
if (F_status_is_error(main->setting.state.status)) {
fss_write_main_t data = fss_write_main_t_initialize;
- data.program.debug.flag |= fss_write_print_flag_debug_e | fss_write_print_flag_out_e;
- data.program.error.flag |= fss_write_print_flag_error_e | fss_write_print_flag_out_e;
- data.program.output.flag |= fss_write_print_flag_out_e;
- data.program.message.flag |= fss_write_print_flag_message_e | fss_write_print_flag_out_e;
- data.program.warning.flag |= fss_write_print_flag_warning_e | fss_write_print_flag_out_e;
+ data.program.debug.flag |= fss_write_print_flag_debug_d | fss_write_print_flag_out_d;
+ data.program.error.flag |= fss_write_print_flag_error_d | fss_write_print_flag_out_d;
+ data.program.output.flag |= fss_write_print_flag_out_d;
+ data.program.message.flag |= fss_write_print_flag_message_d | fss_write_print_flag_out_d;
+ data.program.warning.flag |= fss_write_print_flag_warning_d | fss_write_print_flag_out_d;
data.program.error.custom = (void *) &data;
data.program.debug.custom = (void *) &data;
data.program.message.custom = (void *) &data;
if (main->setting.content) {
fl_fss_basic_list_content_write(
*main->setting.content,
- (main->setting.flag & fss_write_main_flag_partial_e)
+ (main->setting.flag & fss_write_main_flag_partial_d)
? f_fss_complete_partial_e
- : (main->setting.flag & fss_write_main_flag_trim_e)
+ : (main->setting.flag & fss_write_main_flag_trim_d)
? f_fss_complete_full_trim_e
: f_fss_complete_full_e,
&main->setting.prepend,
}
}
- if ((main->setting.flag & fss_write_main_flag_partial_e) && !(main->setting.flag & fss_write_main_flag_object_e) || !(main->setting.flag & (fss_write_main_flag_object_e | fss_write_main_flag_content_e))) {
- if (main->setting.flag & fss_write_main_flag_content_end_e) {
+ if ((main->setting.flag & fss_write_main_flag_partial_d) && !(main->setting.flag & fss_write_main_flag_object_d) || !(main->setting.flag & (fss_write_main_flag_object_d | fss_write_main_flag_content_d))) {
+ if (main->setting.flag & fss_write_main_flag_content_end_d) {
main->setting.state.status = f_string_dynamic_append(f_fss_basic_list_close_s, &main->setting.buffer);
if (F_status_is_error(main->setting.state.status)) {
if (main->setting.object) {
fl_fss_basic_list_object_write(
*main->setting.object,
- (main->setting.flag & fss_write_main_flag_partial_e)
- ? (main->setting.flag & fss_write_main_flag_trim_e)
+ (main->setting.flag & fss_write_main_flag_partial_d)
+ ? (main->setting.flag & fss_write_main_flag_trim_d)
? f_fss_complete_trim_e
: f_fss_complete_none_e
- : (main->setting.flag & fss_write_main_flag_trim_e)
+ : (main->setting.flag & fss_write_main_flag_trim_d)
? f_fss_complete_full_trim_e
: f_fss_complete_full_e,
&main->setting.range,
}
}
- if ((main->setting.flag & fss_write_main_flag_partial_e) && !(main->setting.flag & fss_write_main_flag_content_e) || !(main->setting.flag & (fss_write_main_flag_object_e | fss_write_main_flag_content_e))) {
- if (main->setting.flag & fss_write_main_flag_object_open_e) {
+ if ((main->setting.flag & fss_write_main_flag_partial_d) && !(main->setting.flag & fss_write_main_flag_content_d) || !(main->setting.flag & (fss_write_main_flag_object_d | fss_write_main_flag_content_d))) {
+ if (main->setting.flag & fss_write_main_flag_object_open_d) {
main->setting.state.status = f_string_dynamic_append(f_fss_basic_list_open_s, &main->setting.buffer);
if (F_status_is_error_not(main->setting.state.status)) {
fss_write_main_t data = fss_write_main_t_initialize;
- data.program.debug.flag |= fss_write_print_flag_debug_e | fss_write_print_flag_out_e;
- data.program.error.flag |= fss_write_print_flag_error_e | fss_write_print_flag_out_e;
- data.program.output.flag |= fss_write_print_flag_out_e;
- data.program.message.flag |= fss_write_print_flag_message_e | fss_write_print_flag_out_e;
- data.program.warning.flag |= fss_write_print_flag_warning_e | fss_write_print_flag_out_e;
+ data.program.debug.flag |= fss_write_print_flag_debug_d | fss_write_print_flag_out_d;
+ data.program.error.flag |= fss_write_print_flag_error_d | fss_write_print_flag_out_d;
+ data.program.output.flag |= fss_write_print_flag_out_d;
+ data.program.message.flag |= fss_write_print_flag_message_d | fss_write_print_flag_out_d;
+ data.program.warning.flag |= fss_write_print_flag_warning_d | fss_write_print_flag_out_d;
data.program.error.custom = (void *) &data;
data.program.debug.custom = (void *) &data;
data.program.message.custom = (void *) &data;
if (main->setting.content) {
fl_fss_embedded_list_content_write(
*main->setting.content,
- (main->setting.flag & fss_write_main_flag_partial_e)
+ (main->setting.flag & fss_write_main_flag_partial_d)
? f_fss_complete_partial_e
: last
? f_fss_complete_end_e
}
}
- if ((main->setting.flag & fss_write_main_flag_partial_e) && !(main->setting.flag & fss_write_main_flag_object_e) || !(main->setting.flag & (fss_write_main_flag_object_e | fss_write_main_flag_content_e))) {
- if (main->setting.flag & fss_write_main_flag_content_end_e) {
+ if ((main->setting.flag & fss_write_main_flag_partial_d) && !(main->setting.flag & fss_write_main_flag_object_d) || !(main->setting.flag & (fss_write_main_flag_object_d | fss_write_main_flag_content_d))) {
+ if (main->setting.flag & fss_write_main_flag_content_end_d) {
main->setting.state.status = f_string_dynamic_append(f_fss_embedded_list_close_s, &main->setting.buffer);
if (F_status_is_error_not(main->setting.state.status)) {
if (main->setting.object) {
fl_fss_embedded_list_object_write(
*main->setting.object,
- (main->setting.flag & fss_write_main_flag_partial_e)
- ? (main->setting.flag & fss_write_main_flag_trim_e)
+ (main->setting.flag & fss_write_main_flag_partial_d)
+ ? (main->setting.flag & fss_write_main_flag_trim_d)
? f_fss_complete_trim_e
: f_fss_complete_none_e
- : (main->setting.flag & fss_write_main_flag_trim_e)
+ : (main->setting.flag & fss_write_main_flag_trim_d)
? f_fss_complete_full_trim_e
: f_fss_complete_full_e,
&main->setting.range,
}
}
- if ((main->setting.flag & fss_write_main_flag_partial_e) && !(main->setting.flag & fss_write_main_flag_content_e) || !(main->setting.flag & (fss_write_main_flag_object_e | fss_write_main_flag_content_e))) {
- if (main->setting.flag & fss_write_main_flag_object_open_e) {
+ if ((main->setting.flag & fss_write_main_flag_partial_d) && !(main->setting.flag & fss_write_main_flag_content_d) || !(main->setting.flag & (fss_write_main_flag_object_d | fss_write_main_flag_content_d))) {
+ if (main->setting.flag & fss_write_main_flag_object_open_d) {
main->setting.state.status = f_string_dynamic_append(f_fss_embedded_list_open_s, &main->setting.buffer);
if (F_status_is_error_not(main->setting.state.status)) {
fss_write_main_t data = fss_write_main_t_initialize;
- data.program.debug.flag |= fss_write_print_flag_debug_e | fss_write_print_flag_out_e;
- data.program.error.flag |= fss_write_print_flag_error_e | fss_write_print_flag_out_e;
- data.program.output.flag |= fss_write_print_flag_out_e;
- data.program.message.flag |= fss_write_print_flag_message_e | fss_write_print_flag_out_e;
- data.program.warning.flag |= fss_write_print_flag_warning_e | fss_write_print_flag_out_e;
+ data.program.debug.flag |= fss_write_print_flag_debug_d | fss_write_print_flag_out_d;
+ data.program.error.flag |= fss_write_print_flag_error_d | fss_write_print_flag_out_d;
+ data.program.output.flag |= fss_write_print_flag_out_d;
+ data.program.message.flag |= fss_write_print_flag_message_d | fss_write_print_flag_out_d;
+ data.program.warning.flag |= fss_write_print_flag_warning_d | fss_write_print_flag_out_d;
data.program.error.custom = (void *) &data;
data.program.debug.custom = (void *) &data;
data.program.message.custom = (void *) &data;
data.program.output.custom = (void *) &data;
data.program.warning.custom = (void *) &data;
- data.setting.flag |= fss_write_main_flag_ignore_e;
- data.setting.flag |= fss_write_main_flag_content_multiple_e;
+ data.setting.flag |= fss_write_main_flag_ignore_d;
+ data.setting.flag |= fss_write_main_flag_content_multiple_d;
data.setting.state.custom = (void *) &data;
data.setting.standard = fss_write_embedded_list_standard_s;
main->setting.quote.used
? main->setting.quote.string[0]
: f_fss_quote_double_s.string[0],
- (main->setting.flag & fss_write_main_flag_partial_e)
+ (main->setting.flag & fss_write_main_flag_partial_d)
? f_fss_complete_partial_e
: last
? f_fss_complete_end_e
}
}
- if ((main->setting.flag & fss_write_main_flag_partial_e) && !(main->setting.flag & fss_write_main_flag_object_e) || !(main->setting.flag & (fss_write_main_flag_object_e | fss_write_main_flag_content_e))) {
- if (main->setting.flag & fss_write_main_flag_content_end_e) {
+ if ((main->setting.flag & fss_write_main_flag_partial_d) && !(main->setting.flag & fss_write_main_flag_object_d) || !(main->setting.flag & (fss_write_main_flag_object_d | fss_write_main_flag_content_d))) {
+ if (main->setting.flag & fss_write_main_flag_content_end_d) {
main->setting.state.status = f_string_dynamic_append(f_fss_extended_close_s, &main->setting.buffer);
if (F_status_is_error(main->setting.state.status)) {
fss_write_print_error(&main->program.error, macro_fss_write_f(f_string_dynamic_append));
}
}
- else if (main->setting.flag & fss_write_main_flag_content_next_e) {
+ else if (main->setting.flag & fss_write_main_flag_content_next_d) {
main->setting.state.status = f_string_dynamic_append(f_fss_extended_next_s, &main->setting.buffer);
if (F_status_is_error(main->setting.state.status)) {
main->setting.quote.used
? main->setting.quote.string[0]
: f_fss_quote_double_s.string[0],
- (main->setting.flag & fss_write_main_flag_partial_e)
- ? (main->setting.flag & fss_write_main_flag_trim_e)
+ (main->setting.flag & fss_write_main_flag_partial_d)
+ ? (main->setting.flag & fss_write_main_flag_trim_d)
? f_fss_complete_trim_e
: f_fss_complete_none_e
- : (main->setting.flag & fss_write_main_flag_trim_e)
+ : (main->setting.flag & fss_write_main_flag_trim_d)
? f_fss_complete_full_trim_e
: f_fss_complete_full_e,
&main->setting.range,
}
}
- if ((main->setting.flag & fss_write_main_flag_partial_e) && !(main->setting.flag & fss_write_main_flag_content_e) || !(main->setting.flag & (fss_write_main_flag_object_e | fss_write_main_flag_content_e))) {
- if (main->setting.flag & fss_write_main_flag_object_open_e) {
+ if ((main->setting.flag & fss_write_main_flag_partial_d) && !(main->setting.flag & fss_write_main_flag_content_d) || !(main->setting.flag & (fss_write_main_flag_object_d | fss_write_main_flag_content_d))) {
+ if (main->setting.flag & fss_write_main_flag_object_open_d) {
main->setting.state.status = f_string_dynamic_append(f_fss_extended_open_s, &main->setting.buffer);
if (F_status_is_error(main->setting.state.status)) {
fss_write_print_error(&main->program.error, macro_fss_write_f(f_string_dynamic_append));
fss_write_main_t data = fss_write_main_t_initialize;
- data.program.debug.flag |= fss_write_print_flag_debug_e | fss_write_print_flag_out_e;
- data.program.error.flag |= fss_write_print_flag_error_e | fss_write_print_flag_out_e;
- data.program.output.flag |= fss_write_print_flag_out_e;
- data.program.message.flag |= fss_write_print_flag_message_e | fss_write_print_flag_out_e;
- data.program.warning.flag |= fss_write_print_flag_warning_e | fss_write_print_flag_out_e;
+ data.program.debug.flag |= fss_write_print_flag_debug_d | fss_write_print_flag_out_d;
+ data.program.error.flag |= fss_write_print_flag_error_d | fss_write_print_flag_out_d;
+ data.program.output.flag |= fss_write_print_flag_out_d;
+ data.program.message.flag |= fss_write_print_flag_message_d | fss_write_print_flag_out_d;
+ data.program.warning.flag |= fss_write_print_flag_warning_d | fss_write_print_flag_out_d;
data.program.error.custom = (void *) &data;
data.program.debug.custom = (void *) &data;
data.program.message.custom = (void *) &data;
data.program.output.custom = (void *) &data;
data.program.warning.custom = (void *) &data;
- data.setting.flag |= fss_write_main_flag_content_multiple_e;
+ data.setting.flag |= fss_write_main_flag_content_multiple_d;
data.setting.state.custom = (void *) &data;
data.setting.standard = fss_write_extended_standard_s;
if (main->setting.content) {
fl_fss_extended_list_content_write(
*main->setting.content,
- (main->setting.flag & fss_write_main_flag_partial_e)
+ (main->setting.flag & fss_write_main_flag_partial_d)
? last
? f_fss_complete_none_e
: f_fss_complete_partial_e
}
}
- if ((main->setting.flag & fss_write_main_flag_partial_e) && !(main->setting.flag & fss_write_main_flag_object_e) || !(main->setting.flag & (fss_write_main_flag_object_e | fss_write_main_flag_content_e))) {
- if (main->setting.flag & fss_write_main_flag_content_end_e) {
+ if ((main->setting.flag & fss_write_main_flag_partial_d) && !(main->setting.flag & fss_write_main_flag_object_d) || !(main->setting.flag & (fss_write_main_flag_object_d | fss_write_main_flag_content_d))) {
+ if (main->setting.flag & fss_write_main_flag_content_end_d) {
main->setting.state.status = f_string_dynamic_append(f_fss_extended_list_close_s, &main->setting.buffer);
if (F_status_is_error_not(main->setting.state.status)) {
if (main->setting.object) {
fl_fss_extended_list_object_write(
*main->setting.object,
- (main->setting.flag & fss_write_main_flag_partial_e)
- ? (main->setting.flag & fss_write_main_flag_trim_e)
+ (main->setting.flag & fss_write_main_flag_partial_d)
+ ? (main->setting.flag & fss_write_main_flag_trim_d)
? f_fss_complete_trim_e
: f_fss_complete_none_e
- : (main->setting.flag & fss_write_main_flag_trim_e)
+ : (main->setting.flag & fss_write_main_flag_trim_d)
? f_fss_complete_full_trim_e
: f_fss_complete_full_e,
&main->setting.range,
}
}
- if ((main->setting.flag & fss_write_main_flag_partial_e) && !(main->setting.flag & fss_write_main_flag_content_e) || !(main->setting.flag & (fss_write_main_flag_object_e | fss_write_main_flag_content_e))) {
- if (main->setting.flag & fss_write_main_flag_object_open_e) {
+ if ((main->setting.flag & fss_write_main_flag_partial_d) && !(main->setting.flag & fss_write_main_flag_content_d) || !(main->setting.flag & (fss_write_main_flag_object_d | fss_write_main_flag_content_d))) {
+ if (main->setting.flag & fss_write_main_flag_object_open_d) {
main->setting.state.status = f_string_dynamic_append(f_fss_extended_list_open_s, &main->setting.buffer);
if (F_status_is_error_not(main->setting.state.status)) {
fss_write_main_t data = fss_write_main_t_initialize;
- data.program.debug.flag |= fss_write_print_flag_debug_e | fss_write_print_flag_out_e;
- data.program.error.flag |= fss_write_print_flag_error_e | fss_write_print_flag_out_e;
- data.program.output.flag |= fss_write_print_flag_out_e;
- data.program.message.flag |= fss_write_print_flag_message_e | fss_write_print_flag_out_e;
- data.program.warning.flag |= fss_write_print_flag_warning_e | fss_write_print_flag_out_e;
+ data.program.debug.flag |= fss_write_print_flag_debug_d | fss_write_print_flag_out_d;
+ data.program.error.flag |= fss_write_print_flag_error_d | fss_write_print_flag_out_d;
+ data.program.output.flag |= fss_write_print_flag_out_d;
+ data.program.message.flag |= fss_write_print_flag_message_d | fss_write_print_flag_out_d;
+ data.program.warning.flag |= fss_write_print_flag_warning_d | fss_write_print_flag_out_d;
data.program.error.custom = (void *) &data;
data.program.debug.custom = (void *) &data;
data.program.message.custom = (void *) &data;
data.setting.state.custom = (void *) &data;
data.setting.standard = fss_write_extended_list_standard_s;
- data.setting.flag |= fss_write_main_flag_ignore_e;
+ data.setting.flag |= fss_write_main_flag_ignore_d;
data.callback.process_content = &fss_write_extended_list_process_content;
data.callback.process_help = &fss_write_extended_list_process_help;
main->program.output.to.flag = F_file_flag_create_d | F_file_flag_write_only_d | F_file_flag_append_d;
if (main->program.parameters.array[f_console_standard_parameter_help_e].result & f_console_result_found_e) {
- main->setting.flag |= fss_write_main_flag_help_e;
+ main->setting.flag |= fss_write_main_flag_help_d;
}
if (main->program.parameters.array[f_console_standard_parameter_version_e].result & f_console_result_found_e) {
- main->setting.flag |= fss_write_main_flag_version_e;
+ main->setting.flag |= fss_write_main_flag_version_d;
}
if (main->program.parameters.array[f_console_standard_parameter_copyright_e].result & f_console_result_found_e) {
- main->setting.flag |= fss_write_main_flag_copyright_e;
+ main->setting.flag |= fss_write_main_flag_copyright_d;
}
if (main->program.pipe & fll_program_data_pipe_input_e) {
- main->setting.flag |= fss_write_main_flag_pipe_e;
+ main->setting.flag |= fss_write_main_flag_pipe_d;
}
else {
- main->setting.flag &= ~fss_write_main_flag_pipe_e;
+ main->setting.flag &= ~fss_write_main_flag_pipe_d;
}
if (callback) {
return;
}
- main->setting.flag |= fss_write_main_flag_file_to_e;
+ main->setting.flag |= fss_write_main_flag_file_to_d;
}
else if (main->program.parameters.array[fss_write_parameter_file_e].result & f_console_result_found_e) {
main->setting.state.status = F_status_set_error(F_parameter);
main->setting.objects.array[main->setting.objects.used++].size = 0;
} // for
- main->setting.flag |= fss_write_main_flag_object_e;
+ main->setting.flag |= fss_write_main_flag_object_d;
}
else if (main->program.parameters.array[fss_write_parameter_object_e].result & f_console_result_found_e) {
main->setting.state.status = F_status_set_error(F_parameter);
if ((main->program.parameters.array[fss_write_parameter_content_e].result & f_console_result_value_e) && main->program.parameters.array[fss_write_parameter_content_e].values.used) {
- if (main->setting.flag & fss_write_main_flag_object_e) {
- if (!(main->setting.flag & fss_write_main_flag_content_multiple_e)) {
+ if (main->setting.flag & fss_write_main_flag_object_d) {
+ if (!(main->setting.flag & fss_write_main_flag_content_multiple_d)) {
if (main->program.parameters.array[fss_write_parameter_content_e].values.used > main->program.parameters.array[fss_write_parameter_object_e].values.used) {
main->setting.state.status = F_status_set_error(F_support_not);
++main->setting.contentss.used;
}
- main->setting.flag |= fss_write_main_flag_content_e;
+ main->setting.flag |= fss_write_main_flag_content_d;
}
else if (main->program.parameters.array[fss_write_parameter_content_e].result & f_console_result_found_e) {
main->setting.state.status = F_status_set_error(F_parameter);
} // for
}
- main->setting.flag |= fss_write_main_flag_prepend_e;
+ main->setting.flag |= fss_write_main_flag_prepend_d;
}
else if (main->program.parameters.array[fss_write_parameter_prepend_e].result & f_console_result_found_e) {
main->setting.state.status = F_status_set_error(F_parameter);
}
// Only process if the standard designates that the ingore is supported.
- if (main->setting.flag & fss_write_main_flag_ignore_e) {
+ if (main->setting.flag & fss_write_main_flag_ignore_d) {
f_number_unsigned_t stub_data_array[1] = { 0 };
f_number_unsigneds_t stub_data = macro_f_number_unsigneds_t_initialize_1(stub_data_array, 0, 1);
else {
// There is no Object or Content, so remove ignores if set.
- main->setting.flag &= ~fss_write_main_flag_ignore_e;
+ main->setting.flag &= ~fss_write_main_flag_ignore_d;
}
if (main->program.parameters.array[fss_write_parameter_partial_e].result & f_console_result_found_e) {
- main->setting.flag |= fss_write_main_flag_partial_e;
+ main->setting.flag |= fss_write_main_flag_partial_d;
}
{
};
const uint16_t has_flag[] = {
- fss_write_main_flag_content_end_e,
- fss_write_main_flag_content_next_e,
- fss_write_main_flag_object_open_e,
+ fss_write_main_flag_content_end_d,
+ fss_write_main_flag_content_next_d,
+ fss_write_main_flag_object_open_d,
};
const f_string_static_t has_string[] = {
for (uint8_t i = 0; i < 3; ++i) {
if (main->program.parameters.array[has[i]].result & f_console_result_found_e) {
- if (main->setting.flag & (fss_write_main_flag_object_e | fss_write_main_flag_content_e)) {
- if (!(main->setting.flag & fss_write_main_flag_partial_e)) {
+ if (main->setting.flag & (fss_write_main_flag_object_d | fss_write_main_flag_content_d)) {
+ if (!(main->setting.flag & fss_write_main_flag_partial_d)) {
main->setting.state.status = F_status_set_error(F_parameter);
if (main->program.error.verbosity > f_console_verbosity_quiet_e) {
f_console_symbol_long_normal_s,
f_console_symbol_long_normal_s,
has_string[i],
- (main->setting.flag & fss_write_main_flag_object_e)
+ (main->setting.flag & fss_write_main_flag_object_d)
? fss_write_long_object_s
: fss_write_long_content_s,
fss_write_long_partial_s
} // for
}
- if (main->setting.flag & (fss_write_main_flag_object_e | fss_write_main_flag_content_e)) {
- if (main->setting.flag & fss_write_main_flag_object_e) {
- if (main->setting.flag & fss_write_main_flag_content_multiple_e) {
- if (main->program.parameters.array[fss_write_parameter_object_e].locations_sub.used > main->program.parameters.array[fss_write_parameter_content_e].locations_sub.used && !(main->setting.flag & fss_write_main_flag_partial_e)) {
+ if (main->setting.flag & (fss_write_main_flag_object_d | fss_write_main_flag_content_d)) {
+ if (main->setting.flag & fss_write_main_flag_object_d) {
+ if (main->setting.flag & fss_write_main_flag_content_multiple_d) {
+ if (main->program.parameters.array[fss_write_parameter_object_e].locations_sub.used > main->program.parameters.array[fss_write_parameter_content_e].locations_sub.used && !(main->setting.flag & fss_write_main_flag_partial_d)) {
main->setting.state.status = F_status_set_error(F_parameter);
fss_write_print_error_parameter_same_times_at_least(&main->program.error);
}
}
- if ((main->setting.flag & fss_write_main_flag_content_e) && (main->setting.flag & fss_write_main_flag_partial_e)) {
+ if ((main->setting.flag & fss_write_main_flag_content_d) && (main->setting.flag & fss_write_main_flag_partial_d)) {
if (main->program.parameters.array[fss_write_parameter_content_e].result & f_console_result_value_e) {
main->setting.state.status = F_status_set_error(F_parameter);
}
if (main->program.parameters.array[fss_write_parameter_trim_e].result & f_console_result_found_e) {
- main->setting.flag |= fss_write_main_flag_trim_e;
+ main->setting.flag |= fss_write_main_flag_trim_d;
}
- if (!(main->setting.flag & (fll_program_data_pipe_input_e | fss_write_main_flag_content_e | fss_write_parameter_object_e))) {
+ if (!(main->setting.flag & (fll_program_data_pipe_input_e | fss_write_main_flag_content_d | fss_write_parameter_object_e))) {
main->setting.state.status = F_data_not;
}
}
#endif // _di_fss_write_allocation_d_
/**
+ * Flags passed to the main function or program.
+ *
+ * fss_write_main_flag_*_d:
+ * - none: No flags set.
+ * - content: The Content being written is specified.
+ * - content_end: The Content end characters are to be printed.
+ * - content_multiple: Designate that multiple Content is allowed for an Object for this standard rather than a single Content per Object.
+ * - content_next: The Content next characters are to be printed.
+ * - copyright: Print copyright.
+ * - file_to: Using a specified destination file.
+ * - help: Print help.
+ * - ignore: Ignore a given range within a Content (specify flag before setting loading to designate ignores is supported by standard).
+ * - object: The Object being written is specified.
+ * - object_open: The Object open characters are to be printed.
+ * - partial: Do not write end of Object/Content character.
+ * - pipe: Use the input pipe.
+ * - trim: Trim Object names.
+ * - version: Print version.
+ * - version_copyright_help: A helper flag representing version, copyright, and help flag bits being set.
+ */
+#ifndef _di_fss_write_main_flag_d_
+ #define fss_write_main_flag_none_d 0x0
+ #define fss_write_main_flag_content_d 0x1
+ #define fss_write_main_flag_content_end_d 0x2
+ #define fss_write_main_flag_content_multiple_d 0x4
+ #define fss_write_main_flag_content_next_d 0x8
+ #define fss_write_main_flag_copyright_d 0x10
+ #define fss_write_main_flag_file_to_d 0x20
+ #define fss_write_main_flag_help_d 0x40
+ #define fss_write_main_flag_ignore_d 0x80
+ #define fss_write_main_flag_object_d 0x100
+ #define fss_write_main_flag_object_open_d 0x200
+ #define fss_write_main_flag_partial_d 0x400
+ #define fss_write_main_flag_pipe_d 0x800
+ #define fss_write_main_flag_prepend_d 0x1000
+ #define fss_write_main_flag_trim_d 0x2000
+ #define fss_write_main_flag_version_d 0x4000
+ #define fss_write_main_flag_version_copyright_help_d 0x4050
+#endif // _di_fss_write_main_flag_d_
+
+/**
+ * Flags for fine-tuned print control.
+ *
+ * fss_write_print_flag_*_d:
+ * - none: No flags set.
+ * - debug: Stream is for debug printing.
+ * - error: Stream is for error printing.
+ * - in: Stream is a source file.
+ * - message: Stream is for message printing.
+ * - out: Stream is a destination file.
+ * - warning: Stream is for warning printing.
+ */
+#ifndef _di_fss_write_print_flag_d_
+ #define fss_write_print_flag_none_d 0x0
+ #define fss_write_print_flag_debug_d 0x1
+ #define fss_write_print_flag_error_d 0x2
+ #define fss_write_print_flag_file_d 0x4
+ #define fss_write_print_flag_in_d 0x8
+ #define fss_write_print_flag_out_d 0x10
+ #define fss_write_print_flag_message_d 0x20
+ #define fss_write_print_flag_warning_d 0x40
+#endif // _di_fss_write_print_flag_d_
+
+/**
* The program signal defines.
*
* fss_write_signal_*_d:
#endif
/**
- * Flags passed to the main function or program.
- *
- * fss_write_main_flag_*_e:
- * - none: No flags set.
- * - content: The Content being written is specified.
- * - content_end: The Content end characters are to be printed.
- * - content_multiple: Designate that multiple Content is allowed for an Object for this standard rather than a single Content per Object.
- * - content_next: The Content next characters are to be printed.
- * - copyright: Print copyright.
- * - file_to: Using a specified destination file.
- * - help: Print help.
- * - ignore: Ignore a given range within a Content (specify flag before setting loading to designate ignores is supported by standard).
- * - object: The Object being written is specified.
- * - object_open: The Object open characters are to be printed.
- * - partial: Do not write end of Object/Content character.
- * - pipe: Use the input pipe.
- * - trim: Trim Object names.
- * - version: Print version.
- * - version_copyright_help: A helper flag representing version, copyright, and help flag bits being set.
- */
-#ifndef _di_fss_write_main_flag_e_
- enum {
- fss_write_main_flag_none_e = 0x0,
- fss_write_main_flag_content_e = 0x1,
- fss_write_main_flag_content_end_e = 0x2,
- fss_write_main_flag_content_multiple_e = 0x4,
- fss_write_main_flag_content_next_e = 0x8,
- fss_write_main_flag_copyright_e = 0x10,
- fss_write_main_flag_file_to_e = 0x20,
- fss_write_main_flag_help_e = 0x40,
- fss_write_main_flag_ignore_e = 0x80,
- fss_write_main_flag_object_e = 0x100,
- fss_write_main_flag_object_open_e = 0x200,
- fss_write_main_flag_partial_e = 0x400,
- fss_write_main_flag_pipe_e = 0x800,
- fss_write_main_flag_prepend_e = 0x1000,
- fss_write_main_flag_trim_e = 0x2000,
- fss_write_main_flag_version_e = 0x4000,
- fss_write_main_flag_version_copyright_help_e = 0x4050,
- }; // enum
-#endif // _di_fss_write_main_flag_e_
-
-/**
* The main program parameters.
*/
#ifndef _di_fss_write_parameter_e_
#define fss_write_parameter_total_d (f_console_parameter_state_type_total_d + 14)
#endif // _di_fss_write_parameter_e_
-/**
- * Flags for fine-tuned print control.
- *
- * fss_write_print_flag_*_e:
- * - none: No flags set.
- * - debug: Stream is for debug printing.
- * - error: Stream is for error printing.
- * - in: Stream is a source file.
- * - message: Stream is for message printing.
- * - out: Stream is a destination file.
- * - warning: Stream is for warning printing.
- */
-#ifndef _di_fss_write_print_flag_e_
- enum {
- fss_write_print_flag_none_e = 0x0,
- fss_write_print_flag_debug_e = 0x1,
- fss_write_print_flag_error_e = 0x2,
- fss_write_print_flag_file_e = 0x4,
- fss_write_print_flag_in_e = 0x8,
- fss_write_print_flag_out_e = 0x10,
- fss_write_print_flag_message_e = 0x20,
- fss_write_print_flag_warning_e = 0x40,
- }; // enum
-#endif // _di_fss_write_print_flag_e_
-
#ifdef __cplusplus
} // extern "C"
#endif
#define fss_write_setting_t_initialize \
{ \
- fss_write_main_flag_none_e, \
+ fss_write_main_flag_none_d, \
F_okay, \
macro_f_state_t_initialize_1(fss_write_allocation_large_d, fss_write_allocation_small_d, F_okay, 0, 0, &fll_program_standard_signal_handle, 0, 0, 0, 0), \
f_range_t_initialize, \
main->setting.state.status = F_okay;
- if (main->setting.flag & fss_write_main_flag_version_copyright_help_e) {
- if (main->setting.flag & fss_write_main_flag_help_e) {
+ if (main->setting.flag & fss_write_main_flag_version_copyright_help_d) {
+ if (main->setting.flag & fss_write_main_flag_help_d) {
if (main->callback.process_help) {
main->callback.process_help(void_main);
}
fss_write_print_message_help(&main->program.message);
}
}
- else if (main->setting.flag & fss_write_main_flag_version_e) {
+ else if (main->setting.flag & fss_write_main_flag_version_d) {
fll_program_print_version(&main->program.message, fss_write_program_version_s);
}
- else if (main->setting.flag & fss_write_main_flag_copyright_e) {
+ else if (main->setting.flag & fss_write_main_flag_copyright_d) {
fll_program_print_copyright(&main->program.message, fll_program_copyright_year_author_s);
}
return;
}
- if (main->setting.flag & fss_write_main_flag_pipe_e) {
+ if (main->setting.flag & fss_write_main_flag_pipe_d) {
if (main->callback.process_pipe) {
main->callback.process_pipe(void_main);
}
}
if (F_status_is_error_not(main->setting.state.status)) {
- if (main->setting.flag & (fss_write_main_flag_object_e | fss_write_main_flag_content_e | fss_write_main_flag_object_open_e | fss_write_main_flag_content_next_e | fss_write_main_flag_content_end_e)) {
+ if (main->setting.flag & (fss_write_main_flag_object_d | fss_write_main_flag_content_d | fss_write_main_flag_object_open_d | fss_write_main_flag_content_next_d | fss_write_main_flag_content_end_d)) {
if (main->callback.process_normal) {
main->callback.process_normal(void_main);
}
fss_write_process_normal_data(
(fss_write_main_t *) void_main,
- (((fss_write_main_t *) void_main)->setting.flag & fss_write_main_flag_object_e)
+ (((fss_write_main_t *) void_main)->setting.flag & fss_write_main_flag_object_d)
? ((fss_write_main_t *) void_main)->setting.objects.used
: ((fss_write_main_t *) void_main)->setting.contentss.used
);
} // for
}
else {
- if (main->setting.flag & (fss_write_main_flag_object_open_e | fss_write_main_flag_content_next_e | fss_write_main_flag_content_end_e)) {
+ if (main->setting.flag & (fss_write_main_flag_object_open_d | fss_write_main_flag_content_next_d | fss_write_main_flag_content_end_d)) {
main->setting.object = 0;
main->setting.contents = 0;
main->setting.ignores = 0;
// Check to see if the Content supports multiple Content per Object.
if (flag & 0x4) {
- if (!(main->setting.flag & fss_write_main_flag_content_multiple_e)) {
+ if (!(main->setting.flag & fss_write_main_flag_content_multiple_d)) {
main->setting.state.status = F_status_set_error(F_support_not);
fss_write_print_error_one_content_only(&main->program.error);
// Do not handle start/end while inside an ignore set.
if (!(flag & 0x2)) {
if (main->setting.block.string[range.start] == fss_write_pipe_content_start_s.string[0]) {
- if (!(main->setting.flag & fss_write_main_flag_content_multiple_e)) {
+ if (!(main->setting.flag & fss_write_main_flag_content_multiple_d)) {
main->setting.state.status = F_status_set_error(F_support_not);
fss_write_print_error_one_content_only(&main->program.error);
main->setting.buffer.used = 0;
- if ((!(main->setting.flag & fss_write_main_flag_partial_e) || (main->setting.flag & fss_write_main_flag_partial_e) && (main->setting.flag & fss_write_main_flag_object_e)) && main->setting.object || (main->setting.flag & fss_write_main_flag_object_open_e)) {
+ if ((!(main->setting.flag & fss_write_main_flag_partial_d) || (main->setting.flag & fss_write_main_flag_partial_d) && (main->setting.flag & fss_write_main_flag_object_d)) && main->setting.object || (main->setting.flag & fss_write_main_flag_object_open_d)) {
if (main->setting.object) {
if (main->setting.object->used) {
}
}
- if ((!(main->setting.flag & fss_write_main_flag_partial_e) || (main->setting.flag & fss_write_main_flag_partial_e) && (main->setting.flag & fss_write_main_flag_content_e)) && main->setting.contents || (main->setting.flag & (fss_write_main_flag_content_next_e | fss_write_main_flag_content_end_e))) {
+ if ((!(main->setting.flag & fss_write_main_flag_partial_d) || (main->setting.flag & fss_write_main_flag_partial_d) && (main->setting.flag & fss_write_main_flag_content_d)) && main->setting.contents || (main->setting.flag & (fss_write_main_flag_content_next_d | fss_write_main_flag_content_end_d))) {
if (main->callback.process_content) {
if (main->setting.contents && main->setting.contents->used) {
fss_write_main_t data = fss_write_main_t_initialize;
- data.program.debug.flag |= fss_write_print_flag_debug_e | fss_write_print_flag_out_e;
- data.program.error.flag |= fss_write_print_flag_error_e | fss_write_print_flag_out_e;
- data.program.output.flag |= fss_write_print_flag_out_e;
- data.program.message.flag |= fss_write_print_flag_message_e | fss_write_print_flag_out_e;
- data.program.warning.flag |= fss_write_print_flag_warning_e | fss_write_print_flag_out_e;
+ data.program.debug.flag |= fss_write_print_flag_debug_d | fss_write_print_flag_out_d;
+ data.program.error.flag |= fss_write_print_flag_error_d | fss_write_print_flag_out_d;
+ data.program.output.flag |= fss_write_print_flag_out_d;
+ data.program.message.flag |= fss_write_print_flag_message_d | fss_write_print_flag_out_d;
+ data.program.warning.flag |= fss_write_print_flag_warning_d | fss_write_print_flag_out_d;
data.program.error.custom = (void *) &data;
data.program.debug.custom = (void *) &data;
#ifndef _di_fss_write_main_setting_load_as_
void fss_write_main_setting_load_as(const f_console_arguments_t arguments, fss_write_main_t * const main) {
- if (!main || F_status_is_error(main->setting.state.status) || (main->setting.flag & fss_write_main_flag_version_e)) return;
+ if (!main || F_status_is_error(main->setting.state.status) || (main->setting.flag & fss_write_main_flag_version_d)) return;
main->setting.standard = fss_write_basic_standard_s;
main->setting.standard = fss_write_basic_standard_s;
// Remove flags not supported for this standard.
- main->setting.flag &= ~(fss_write_main_flag_ignore_e | fss_write_main_flag_content_multiple_e);
+ main->setting.flag &= ~(fss_write_main_flag_ignore_d | fss_write_main_flag_content_multiple_d);
main->callback.process_content = &fss_write_basic_process_content;
main->callback.process_help = &fss_write_basic_process_help;
main->setting.standard = fss_write_extended_standard_s;
// Remove flags not supported for this standard.
- main->setting.flag &= ~fss_write_main_flag_ignore_e;
- main->setting.flag |= fss_write_main_flag_content_multiple_e;
+ main->setting.flag &= ~fss_write_main_flag_ignore_d;
+ main->setting.flag |= fss_write_main_flag_content_multiple_d;
main->callback.process_content = &fss_write_extended_process_content;
main->callback.process_help = &fss_write_extended_process_help;
main->setting.standard = fss_write_basic_list_standard_s;
// Remove flags not supported for this standard.
- main->setting.flag &= ~(fss_write_main_flag_ignore_e | fss_write_main_flag_content_multiple_e);
+ main->setting.flag &= ~(fss_write_main_flag_ignore_d | fss_write_main_flag_content_multiple_d);
main->callback.process_content = &fss_write_basic_list_process_content;
main->callback.process_help = &fss_write_basic_list_process_help;
main->setting.standard = fss_write_extended_list_standard_s;
// Remove flags not supported for this standard.
- main->setting.flag &= ~fss_write_main_flag_content_multiple_e;
- main->setting.flag |= fss_write_main_flag_ignore_e;
+ main->setting.flag &= ~fss_write_main_flag_content_multiple_d;
+ main->setting.flag |= fss_write_main_flag_ignore_d;
main->callback.process_content = &fss_write_extended_list_process_content;
main->callback.process_help = &fss_write_extended_list_process_help;
main->setting.standard = fss_write_embedded_list_standard_s;
- main->setting.flag |= fss_write_main_flag_ignore_e;
- main->setting.flag |= fss_write_main_flag_content_multiple_e;
+ main->setting.flag |= fss_write_main_flag_ignore_d;
+ main->setting.flag |= fss_write_main_flag_content_multiple_d;
main->callback.process_content = &fss_write_embedded_list_process_content;
main->callback.process_help = &fss_write_embedded_list_process_help;
main->setting.standard = fss_write_payload_standard_s;
// Remove flags not supported for this standard.
- main->setting.flag &= ~(fss_write_main_flag_ignore_e | fss_write_main_flag_content_multiple_e);
+ main->setting.flag &= ~(fss_write_main_flag_ignore_d | fss_write_main_flag_content_multiple_d);
main->callback.process_content = 0;
main->callback.process_help = &fss_write_payload_process_help;
main->callback.process_set = &fss_write_payload_process_set;
}
else {
- if (main->setting.flag & fss_write_main_flag_help_e) {
+ if (main->setting.flag & fss_write_main_flag_help_d) {
main->setting.state.status = F_status_set_error(F_parameter);
break;
} // for
if (F_status_is_error(main->setting.state.status)) {
- if (main->setting.flag & fss_write_main_flag_help_e) {
+ if (main->setting.flag & fss_write_main_flag_help_d) {
fss_write_main_process_help((void *) main);
}
else if (main->program.parameters.array[fss_write_parameter_as_e].result & f_console_result_found_e) {
main->setting.state.status = F_status_set_error(F_parameter);
- if (main->setting.flag & fss_write_main_flag_help_e) {
+ if (main->setting.flag & fss_write_main_flag_help_d) {
fss_write_main_process_help((void *) main);
return;
// Check to see if the Content supports multiple Content per Object.
if (flag & 0x4) {
- if (!(main->setting.flag & fss_write_main_flag_content_multiple_e)) {
+ if (!(main->setting.flag & fss_write_main_flag_content_multiple_d)) {
main->setting.state.status = F_status_set_error(F_support_not);
fss_write_print_error_one_content_only(&main->program.error);
fss_write_main_t * const main = (fss_write_main_t *) void_main;
- if ((!(main->setting.flag & fss_write_main_flag_partial_e) || (main->setting.flag & fss_write_main_flag_partial_e) && (main->setting.flag & fss_write_main_flag_object_e))) {
- if (main->setting.object && !(main->setting.flag & fss_write_main_flag_partial_e) && main->setting.contents && main->setting.contents->used) {
+ if ((!(main->setting.flag & fss_write_main_flag_partial_d) || (main->setting.flag & fss_write_main_flag_partial_d) && (main->setting.flag & fss_write_main_flag_object_d))) {
+ if (main->setting.object && !(main->setting.flag & fss_write_main_flag_partial_d) && main->setting.contents && main->setting.contents->used) {
if (main->setting.object->used) {
main->setting.range.start = 0;
main->setting.range.stop = main->setting.object->used - 1;
fll_fss_payload_write(
*main->setting.object,
main->setting.contents->array[0],
- (main->setting.flag & fss_write_main_flag_trim_e),
- (main->setting.flag & fss_write_main_flag_prepend_e)
+ (main->setting.flag & fss_write_main_flag_trim_d),
+ (main->setting.flag & fss_write_main_flag_prepend_d)
? &main->setting.prepend
: 0,
&main->setting.buffer,
fl_fss_basic_list_object_write(
*main->setting.object,
- (main->setting.flag & fss_write_main_flag_partial_e)
- ? (main->setting.flag & fss_write_main_flag_trim_e)
+ (main->setting.flag & fss_write_main_flag_partial_d)
+ ? (main->setting.flag & fss_write_main_flag_trim_d)
? f_fss_complete_trim_e
: f_fss_complete_none_e
- : (main->setting.flag & fss_write_main_flag_trim_e)
+ : (main->setting.flag & fss_write_main_flag_trim_d)
? f_fss_complete_full_trim_e
: f_fss_complete_full_e,
&main->setting.range,
}
}
- if ((main->setting.flag & fss_write_main_flag_partial_e) && !(main->setting.flag & fss_write_main_flag_content_e) || !(main->setting.flag & (fss_write_main_flag_object_e | fss_write_main_flag_content_e))) {
- if (main->setting.flag & fss_write_main_flag_object_open_e) {
+ if ((main->setting.flag & fss_write_main_flag_partial_d) && !(main->setting.flag & fss_write_main_flag_content_d) || !(main->setting.flag & (fss_write_main_flag_object_d | fss_write_main_flag_content_d))) {
+ if (main->setting.flag & fss_write_main_flag_object_open_d) {
main->setting.state.status = f_string_dynamic_append(f_fss_basic_list_open_s, &main->setting.buffer);
if (F_status_is_error_not(main->setting.state.status)) {
const f_string_static_t *prepend = 0;
- if (main->setting.flag & fss_write_main_flag_prepend_e) {
+ if (main->setting.flag & fss_write_main_flag_prepend_d) {
const f_number_unsigned_t index = main->program.parameters.array[fss_write_parameter_prepend_e].values.array[main->program.parameters.array[fss_write_parameter_prepend_e].values.used - 1];
prepend = &main->program.parameters.arguments.array[index];
}
}
- if ((main->setting.flag & fss_write_main_flag_partial_e) && !(main->setting.flag & fss_write_main_flag_object_e) || !(main->setting.flag & (fss_write_main_flag_object_e | fss_write_main_flag_content_e))) {
- if (main->setting.flag & fss_write_main_flag_content_end_e) {
+ if ((main->setting.flag & fss_write_main_flag_partial_d) && !(main->setting.flag & fss_write_main_flag_object_d) || !(main->setting.flag & (fss_write_main_flag_object_d | fss_write_main_flag_content_d))) {
+ if (main->setting.flag & fss_write_main_flag_content_end_d) {
main->setting.state.status = f_string_dynamic_append(f_fss_basic_list_close_s, &main->setting.buffer);
if (F_status_is_error(main->setting.state.status)) {
fss_write_main_t data = fss_write_main_t_initialize;
- data.program.debug.flag |= fss_write_print_flag_debug_e | fss_write_print_flag_out_e;
- data.program.error.flag |= fss_write_print_flag_error_e | fss_write_print_flag_out_e;
- data.program.output.flag |= fss_write_print_flag_out_e;
- data.program.message.flag |= fss_write_print_flag_message_e | fss_write_print_flag_out_e;
- data.program.warning.flag |= fss_write_print_flag_warning_e | fss_write_print_flag_out_e;
+ data.program.debug.flag |= fss_write_print_flag_debug_d | fss_write_print_flag_out_d;
+ data.program.error.flag |= fss_write_print_flag_error_d | fss_write_print_flag_out_d;
+ data.program.output.flag |= fss_write_print_flag_out_d;
+ data.program.message.flag |= fss_write_print_flag_message_d | fss_write_print_flag_out_d;
+ data.program.warning.flag |= fss_write_print_flag_warning_d | fss_write_print_flag_out_d;
data.program.error.custom = (void *) &data;
data.program.debug.custom = (void *) &data;
}
if (main->program.parameters.array[f_console_standard_parameter_help_e].result & f_console_result_found_e) {
- main->setting.flag |= iki_read_main_flag_help_e;
+ main->setting.flag |= iki_read_main_flag_help_d;
return;
}
if (main->program.parameters.array[f_console_standard_parameter_version_e].result & f_console_result_found_e) {
- main->setting.flag |= iki_read_main_flag_version_e;
+ main->setting.flag |= iki_read_main_flag_version_d;
return;
}
if (main->program.parameters.array[f_console_standard_parameter_copyright_e].result & f_console_result_found_e) {
- main->setting.flag |= iki_read_main_flag_copyright_e;
+ main->setting.flag |= iki_read_main_flag_copyright_d;
return;
}
if (main->program.pipe & fll_program_data_pipe_input_e) {
- main->setting.flag |= iki_read_main_flag_pipe_e;
+ main->setting.flag |= iki_read_main_flag_pipe_d;
}
else {
- main->setting.flag &= ~iki_read_main_flag_pipe_e;
+ main->setting.flag &= ~iki_read_main_flag_pipe_d;
}
if (!(main->program.parameters.remaining.used || (main->program.pipe & fll_program_data_pipe_input_e))) {
return;
}
- main->setting.flag |= iki_read_main_flag_at_e;
+ main->setting.flag |= iki_read_main_flag_at_d;
}
else if (main->program.parameters.array[iki_read_parameter_at_e].result & f_console_result_found_e) {
main->setting.state.status = F_status_set_error(F_parameter);
return;
}
- main->setting.flag |= iki_read_main_flag_line_e;
+ main->setting.flag |= iki_read_main_flag_line_d;
}
else if (main->program.parameters.array[iki_read_parameter_line_e].result & f_console_result_found_e) {
main->setting.state.status = F_status_set_error(F_parameter);
return;
}
- main->setting.flag |= iki_read_main_flag_name_e;
+ main->setting.flag |= iki_read_main_flag_name_d;
}
else if (main->program.parameters.array[iki_read_parameter_name_e].result & f_console_result_found_e) {
main->setting.state.status = F_status_set_error(F_parameter);
}
} // for
- main->setting.flag |= iki_read_main_flag_replace_e;
+ main->setting.flag |= iki_read_main_flag_replace_d;
}
if (iki_read_setting_load_parameter_substitution(main, main->program.parameters.array[iki_read_parameter_reassign_e], iki_read_long_reassign_s, &main->setting.reassign)) {
- main->setting.flag |= iki_read_main_flag_reassign_e;
+ main->setting.flag |= iki_read_main_flag_reassign_d;
}
if (F_status_is_error(main->setting.state.status)) return;
if (iki_read_setting_load_parameter_substitution(main, main->program.parameters.array[iki_read_parameter_substitute_e], iki_read_long_substitute_s, &main->setting.substitute)) {
- main->setting.flag |= iki_read_main_flag_substitute_e;
+ main->setting.flag |= iki_read_main_flag_substitute_d;
}
if (F_status_is_error(main->setting.state.status)) return;
}
} // for
- main->setting.flag |= iki_read_main_flag_wrap_e;
+ main->setting.flag |= iki_read_main_flag_wrap_d;
}
if (main->program.parameters.array[iki_read_parameter_literal_e].result & f_console_result_found_e) {
}
} // for
- main->setting.flag |= iki_read_main_flag_literal_e;
+ main->setting.flag |= iki_read_main_flag_literal_d;
}
else if (main->program.parameters.array[iki_read_parameter_object_e].result & f_console_result_found_e) {
const uint8_t ids[2] = {
}
} // for
- main->setting.flag |= iki_read_main_flag_object_e;
+ main->setting.flag |= iki_read_main_flag_object_d;
}
else if (main->program.parameters.array[iki_read_parameter_content_e].result & f_console_result_found_e) {
if (main->program.parameters.array[iki_read_parameter_total_e].result & f_console_result_found_e) {
return;
}
- main->setting.flag |= iki_read_main_flag_content_e;
+ main->setting.flag |= iki_read_main_flag_content_d;
}
else if (main->program.parameters.array[iki_read_parameter_total_e].result & f_console_result_found_e) {
if (main->program.parameters.array[iki_read_parameter_whole_e].result & f_console_result_found_e) {
return;
}
- main->setting.flag |= iki_read_main_flag_total_e;
+ main->setting.flag |= iki_read_main_flag_total_d;
}
else {
// This is the default behavior.
- main->setting.flag |= iki_read_main_flag_content_e;
+ main->setting.flag |= iki_read_main_flag_content_d;
}
if (main->program.parameters.array[iki_read_parameter_whole_e].result & f_console_result_found_e) {
- main->setting.flag |= iki_read_main_flag_whole_e;
+ main->setting.flag |= iki_read_main_flag_whole_d;
}
if (main->program.parameters.remaining.used) {
* - read_small: The block read size for small files.
* - read_large: The block read size for large files.
*/
-#ifndef _di_iki_read_d_
+#ifndef _di_iki_read_block_d_
#define iki_read_block_max_d 16777216
#define iki_read_block_read_small_d 8192
#define iki_read_block_read_large_d 65536
-#endif // _di_iki_read_d_
+#endif // _di_iki_read_block_d_
+
+/**
+ * Flags passed to the main function or program.
+ *
+ * iki_read_main_flag_*_d:
+ * - none: No flags set.
+ * - at: Selecting at a specific index.
+ * - content: Print Contents.
+ * - copyright: Print copyright.
+ * - help: Print help.
+ * - literal: Print as literal data (printing entire variable).
+ * - line: Selecting at a specific line.
+ * - name: Selecting using a specific Vocabulary name.
+ * - object: Print Objects.
+ * - pipe: Use the input pipe.
+ * - replace: Using re-assignments.
+ * - replace: Using replacements.
+ * - substitute: Using substitutions.
+ * - total: Enable printing of "total" count.
+ * - version: Print version.
+ * - version_copyright_help: A helper flag representing version, copyright, and help flag bits being set.
+ * - whole: Print all data.
+ * - wrap: Using wrapping.
+ */
+#ifndef _di_iki_read_main_flag_d_
+ #define iki_read_main_flag_none_d 0x0
+ #define iki_read_main_flag_at_d 0x1
+ #define iki_read_main_flag_content_d 0x2
+ #define iki_read_main_flag_copyright_d 0x4
+ #define iki_read_main_flag_help_d 0x8
+ #define iki_read_main_flag_literal_d 0x10
+ #define iki_read_main_flag_line_d 0x20
+ #define iki_read_main_flag_name_d 0x40
+ #define iki_read_main_flag_object_d 0x80
+ #define iki_read_main_flag_pipe_d 0x100
+ #define iki_read_main_flag_reassign_d 0x200
+ #define iki_read_main_flag_replace_d 0x400
+ #define iki_read_main_flag_substitute_d 0x800
+ #define iki_read_main_flag_total_d 0x1000
+ #define iki_read_main_flag_version_d 0x2000
+ #define iki_read_main_flag_version_copyright_help_d 0x200c
+ #define iki_read_main_flag_whole_d 0x4000
+ #define iki_read_main_flag_wrap_d 0x8000
+#endif // _di_iki_read_main_flag_d_
+
+/**
+ * Flags for fine-tuned print control.
+ *
+ * iki_read_print_flag_*_d:
+ * - none: No flags set.
+ * - debug: Stream is for debug printing.
+ * - error: Stream is for error printing.
+ * - in: Stream is a source file.
+ * - message: Stream is for message printing.
+ * - out: Stream is a destination file.
+ * - warning: Stream is for warning printing.
+ */
+#ifndef _di_iki_read_print_flag_d_
+ #define iki_read_print_flag_none_d 0x0
+ #define iki_read_print_flag_debug_d 0x1
+ #define iki_read_print_flag_error_d 0x2
+ #define iki_read_print_flag_file_d 0x4
+ #define iki_read_print_flag_in_d 0x8
+ #define iki_read_print_flag_out_d 0x10
+ #define iki_read_print_flag_message_d 0x20
+ #define iki_read_print_flag_warning_d 0x40
+#endif // _di_iki_read_print_flag_d_
/**
* The program signal defines.
#endif
/**
- * Flags passed to the main function or program.
- *
- * iki_read_main_flag_*_e:
- * - none: No flags set.
- * - at: Selecting at a specific index.
- * - content: Print Contents.
- * - copyright: Print copyright.
- * - help: Print help.
- * - literal: Print as literal data (printing entire variable).
- * - line: Selecting at a specific line.
- * - name: Selecting using a specific Vocabulary name.
- * - object: Print Objects.
- * - pipe: Use the input pipe.
- * - replace: Using re-assignments.
- * - replace: Using replacements.
- * - substitute: Using substitutions.
- * - total: Enable printing of "total" count.
- * - version: Print version.
- * - version_copyright_help: A helper flag representing version, copyright, and help flag bits being set.
- * - whole: Print all data.
- * - wrap: Using wrapping.
- */
-#ifndef _di_iki_read_main_flag_e_
- enum {
- iki_read_main_flag_none_e = 0x0,
- iki_read_main_flag_at_e = 0x1,
- iki_read_main_flag_content_e = 0x2,
- iki_read_main_flag_copyright_e = 0x4,
- iki_read_main_flag_help_e = 0x8,
- iki_read_main_flag_literal_e = 0x10,
- iki_read_main_flag_line_e = 0x20,
- iki_read_main_flag_name_e = 0x40,
- iki_read_main_flag_object_e = 0x80,
- iki_read_main_flag_pipe_e = 0x100,
- iki_read_main_flag_reassign_e = 0x200,
- iki_read_main_flag_replace_e = 0x400,
- iki_read_main_flag_substitute_e = 0x800,
- iki_read_main_flag_total_e = 0x1000,
- iki_read_main_flag_version_e = 0x2000,
- iki_read_main_flag_version_copyright_help_e = 0x200c,
- iki_read_main_flag_whole_e = 0x4000,
- iki_read_main_flag_wrap_e = 0x8000,
- }; // enum
-#endif // _di_iki_read_main_flag_e_
-
-/**
* The main program parameters.
*/
#ifndef _di_iki_read_parameter_e_
#define iki_read_parameter_total_d (f_console_parameter_state_type_total_d + 12)
#endif // _di_iki_read_parameter_e_
-/**
- * Flags for fine-tuned print control.
- *
- * iki_read_print_flag_*_e:
- * - none: No flags set.
- * - debug: Stream is for debug printing.
- * - error: Stream is for error printing.
- * - in: Stream is a source file.
- * - message: Stream is for message printing.
- * - out: Stream is a destination file.
- * - warning: Stream is for warning printing.
- */
-#ifndef _di_iki_read_print_flag_e_
- enum {
- iki_read_print_flag_none_e = 0x0,
- iki_read_print_flag_debug_e = 0x1,
- iki_read_print_flag_error_e = 0x2,
- iki_read_print_flag_file_e = 0x4,
- iki_read_print_flag_in_e = 0x8,
- iki_read_print_flag_out_e = 0x10,
- iki_read_print_flag_message_e = 0x20,
- iki_read_print_flag_warning_e = 0x40,
- }; // enum
-#endif // _di_iki_read_print_flag_e_
-
#ifdef __cplusplus
} // extern "C"
#endif
#define iki_read_setting_t_initialize \
{ \
- iki_read_main_flag_none_e, \
+ iki_read_main_flag_none_d, \
F_okay, \
macro_f_state_t_initialize_1(iki_read_allocation_large_d, iki_read_allocation_small_d, F_okay, 0, 0, 0, 0, 0, 0, 0), \
0, \
f_number_unsigned_t i = 0;
- if (main->setting.flag & (iki_read_main_flag_content_e | iki_read_main_flag_literal_e)) {
+ if (main->setting.flag & (iki_read_main_flag_content_d | iki_read_main_flag_literal_d)) {
f_number_unsigned_t j = 0;
for (i = 0; i < main->setting.data.vocabulary.used; ++i) {
main->setting.state.status = F_okay;
- if (main->setting.flag & iki_read_main_flag_version_copyright_help_e) {
- if (main->setting.flag & iki_read_main_flag_help_e) {
+ if (main->setting.flag & iki_read_main_flag_version_copyright_help_d) {
+ if (main->setting.flag & iki_read_main_flag_help_d) {
iki_read_print_message_help(&main->program.message);
}
- else if (main->setting.flag & iki_read_main_flag_version_e) {
+ else if (main->setting.flag & iki_read_main_flag_version_d) {
fll_program_print_version(&main->program.message, iki_read_program_version_s);
}
- else if (main->setting.flag & iki_read_main_flag_copyright_e) {
+ else if (main->setting.flag & iki_read_main_flag_copyright_d) {
fll_program_print_copyright(&main->program.message, fll_program_copyright_year_author_s);
}
return;
}
- if (main->setting.flag & iki_read_main_flag_pipe_e) {
+ if (main->setting.flag & iki_read_main_flag_pipe_d) {
f_file_t file = f_file_t_initialize;
file.id = F_type_descriptor_input_d;
iki_read_main_t data = iki_read_main_t_initialize;
- data.program.debug.flag |= iki_read_print_flag_debug_e | iki_read_print_flag_out_e;
- data.program.error.flag |= iki_read_print_flag_error_e | iki_read_print_flag_out_e;
- data.program.output.flag |= iki_read_print_flag_out_e;
- data.program.message.flag |= iki_read_print_flag_message_e | iki_read_print_flag_out_e;
- data.program.warning.flag |= iki_read_print_flag_warning_e | iki_read_print_flag_out_e;
+ data.program.debug.flag |= iki_read_print_flag_debug_d | iki_read_print_flag_out_d;
+ data.program.error.flag |= iki_read_print_flag_error_d | iki_read_print_flag_out_d;
+ data.program.output.flag |= iki_read_print_flag_out_d;
+ data.program.message.flag |= iki_read_print_flag_message_d | iki_read_print_flag_out_d;
+ data.program.warning.flag |= iki_read_print_flag_warning_d | iki_read_print_flag_out_d;
data.program.error.custom = (void *) &data;
data.program.debug.custom = (void *) &data;
data.program.message.custom = (void *) &data;
f_number_unsigned_t at = main->setting.reassign.used;
- if (main->setting.reassign.used && (main->setting.flag & (iki_read_main_flag_content_e | iki_read_main_flag_literal_e))) {
+ if (main->setting.reassign.used && (main->setting.flag & (iki_read_main_flag_content_d | iki_read_main_flag_literal_d))) {
at = iki_read_identify_substitution(main, main->setting.data.vocabulary.array[index], main->setting.data.content.array[index], &main->setting.reassign);
}
if (at < main->setting.reassign.used) {
- if (main->setting.flag & iki_read_main_flag_content_e) {
+ if (main->setting.flag & iki_read_main_flag_content_d) {
f_print_dynamic(main->setting.reassign.array[at].c, main->program.output.to);
}
else {
at = main->setting.substitute.used;
- if (main->setting.substitute.used && (main->setting.flag & (iki_read_main_flag_content_e | iki_read_main_flag_literal_e))) {
+ if (main->setting.substitute.used && (main->setting.flag & (iki_read_main_flag_content_d | iki_read_main_flag_literal_d))) {
at = iki_read_identify_substitution(main, main->setting.data.vocabulary.array[index], main->setting.data.content.array[index], &main->setting.substitute);
}
if (at < main->setting.substitute.used) {
- if (main->setting.flag & iki_read_main_flag_content_e) {
+ if (main->setting.flag & iki_read_main_flag_content_d) {
iki_read_print_data_wrap_prepend(&main->program.output, index);
f_print_dynamic(main->setting.substitute.array[at].c, main->program.output.to);
}
}
else if (main->setting.replace.used && main->setting.map_replaces[index] < main->setting.replace.used) {
- if (main->setting.flag & iki_read_main_flag_content_e) {
+ if (main->setting.flag & iki_read_main_flag_content_d) {
iki_read_print_data_wrap_prepend(&main->program.output, index);
f_print_dynamic(main->setting.replace.array[main->setting.map_replaces[index]].value, main->program.output.to);
iki_read_print_data_wrap_append(&main->program.output, index);
}
- else if (main->setting.flag & iki_read_main_flag_object_e) {
+ else if (main->setting.flag & iki_read_main_flag_object_d) {
f_print_dynamic(main->setting.replace.array[main->setting.map_replaces[index]].key, main->program.output.to);
}
else {
f_print_dynamic_partial(main->setting.buffer, range, main->program.output.to);
}
}
- else if (main->setting.flag & iki_read_main_flag_content_e) {
+ else if (main->setting.flag & iki_read_main_flag_content_d) {
iki_read_print_data_wrap_prepend(&main->program.output, index);
f_print_dynamic_partial(main->setting.buffer, main->setting.data.content.array[index], main->program.output.to);
iki_read_print_data_wrap_append(&main->program.output, index);
}
- else if (main->setting.flag & iki_read_main_flag_object_e) {
+ else if (main->setting.flag & iki_read_main_flag_object_d) {
f_print_dynamic_partial(main->setting.buffer, main->setting.data.vocabulary.array[index], main->program.output.to);
}
else {
#ifndef _di_iki_read_process_line_
void iki_read_process_line(iki_read_main_t * const main, f_range_t *range) {
- if (!(main->setting.flag & iki_read_main_flag_line_e)) {
+ if (!(main->setting.flag & iki_read_main_flag_line_d)) {
main->setting.state.status = F_false;
return;
#ifndef _di_iki_read_process_buffer_
void iki_read_process_buffer(iki_read_main_t * const main) {
- if (main->setting.flag & iki_read_main_flag_total_e) {
+ if (main->setting.flag & iki_read_main_flag_total_d) {
iki_read_process_buffer_total(main);
if (F_status_is_error_not(main->setting.state.status)) {
return;
}
- if (main->setting.flag & iki_read_main_flag_whole_e) {
+ if (main->setting.flag & iki_read_main_flag_whole_d) {
iki_read_process_buffer_ranges_whole(main, buffer_range);
}
else {
iki_read_identify_alteration(main);
- if (main->setting.flag & iki_read_main_flag_name_e) {
+ if (main->setting.flag & iki_read_main_flag_name_d) {
f_number_unsigned_t j = 0;
f_number_unsigned_t matches = 0;
bool unmatched = F_true;
if (f_compare_dynamic_partial_string(main->setting.names.array[j].string, main->setting.buffer, main->setting.names.array[j].used, main->setting.data.vocabulary.array[i]) == F_equal_to) {
unmatched = F_false;
- if (main->setting.flag & iki_read_main_flag_at_e) {
+ if (main->setting.flag & iki_read_main_flag_at_d) {
if (matches < main->setting.at) {
matches++;
}
else {
if (main->setting.data.variable.used) {
- if (main->setting.flag & iki_read_main_flag_at_e) {
+ if (main->setting.flag & iki_read_main_flag_at_d) {
if (main->setting.at < main->setting.data.variable.used) {
f_file_stream_lock(main->program.output.to);
main->program.output.to.flag = F_file_flag_create_d | F_file_flag_write_only_d | F_file_flag_append_d;
if (main->program.parameters.array[f_console_standard_parameter_help_e].result & f_console_result_found_e) {
- main->setting.flag |= iki_write_main_flag_help_e;
+ main->setting.flag |= iki_write_main_flag_help_d;
return;
}
if (main->program.parameters.array[f_console_standard_parameter_version_e].result & f_console_result_found_e) {
- main->setting.flag |= iki_write_main_flag_version_e;
+ main->setting.flag |= iki_write_main_flag_version_d;
return;
}
if (main->program.parameters.array[f_console_standard_parameter_copyright_e].result & f_console_result_found_e) {
- main->setting.flag |= iki_write_main_flag_copyright_e;
+ main->setting.flag |= iki_write_main_flag_copyright_d;
return;
}
if (main->program.pipe & fll_program_data_pipe_input_e) {
- main->setting.flag |= iki_write_main_flag_pipe_e;
+ main->setting.flag |= iki_write_main_flag_pipe_d;
}
else {
- main->setting.flag &= ~iki_write_main_flag_pipe_e;
+ main->setting.flag &= ~iki_write_main_flag_pipe_d;
}
if (main->program.parameters.array[iki_write_parameter_file_e].result & f_console_result_value_e && main->program.parameters.array[iki_write_parameter_file_e].values.used) {
return;
}
- main->setting.flag |= iki_write_main_flag_file_to_e;
+ main->setting.flag |= iki_write_main_flag_file_to_d;
}
else if (main->program.parameters.array[iki_write_parameter_file_e].result & f_console_result_found_e) {
main->setting.state.status = F_status_set_error(F_parameter);
main->setting.objects.array[main->setting.objects.used++].size = 0;
} // for
- main->setting.flag |= iki_write_main_flag_object_e;
+ main->setting.flag |= iki_write_main_flag_object_d;
}
else if (main->program.parameters.array[iki_write_parameter_object_e].result & f_console_result_found_e) {
main->setting.state.status = F_status_set_error(F_parameter);
main->setting.contents.array[main->setting.contents.used++].size = 0;
} // for
- main->setting.flag |= iki_write_main_flag_content_e;
+ main->setting.flag |= iki_write_main_flag_content_d;
}
else if (main->program.parameters.array[iki_write_parameter_content_e].result & f_console_result_found_e) {
main->setting.state.status = F_status_set_error(F_parameter);
return;
}
- if (!(main->program.pipe & fll_program_data_pipe_input_e) && !(main->setting.flag & (iki_write_main_flag_content_e | iki_write_parameter_object_e))) {
+ if (!(main->program.pipe & fll_program_data_pipe_input_e) && !(main->setting.flag & (iki_write_main_flag_content_d | iki_write_parameter_object_e))) {
main->setting.state.status = F_status_set_error(F_parameter);
iki_write_print_error_main_missing(&main->program.error);
}
if (main->program.parameters.array[iki_write_parameter_wrap_e].result & f_console_result_found_e) {
- main->setting.flag |= iki_write_main_flag_wrap_e;
+ main->setting.flag |= iki_write_main_flag_wrap_d;
}
main->setting.quote = f_iki_syntax_quote_double_s;
#endif // _di_iki_write_allocation_d_
/**
+ * Flags passed to the main function or program.
+ *
+ * iki_write_main_flag_*_d:
+ * - none: No flags set.
+ * - content: The Content being written is specified.
+ * - copyright: Print copyright.
+ * - file_to: Using a specified destination file.
+ * - help: Print help.
+ * - object: The Object being written is specified.
+ * - pipe: Use the input pipe.
+ * - version: Print version.
+ * - version_copyright_help: A helper flag representing version, copyright, and help flag bits being set.
+ * - wrap: Wrap the vocabulary.
+ */
+#ifndef _di_iki_write_main_flag_d_
+ #define iki_write_main_flag_none_d 0x0
+ #define iki_write_main_flag_content_d 0x1
+ #define iki_write_main_flag_copyright_d 0x2
+ #define iki_write_main_flag_file_to_d 0x4
+ #define iki_write_main_flag_help_d 0x8
+ #define iki_write_main_flag_object_d 0x10
+ #define iki_write_main_flag_pipe_d 0x20
+ #define iki_write_main_flag_version_d 0x40
+ #define iki_write_main_flag_version_copyright_help_d 0x4a
+ #define iki_write_main_flag_wrap_d 0x80
+#endif // _di_iki_write_main_flag_d_
+
+/**
+ * Flags for fine-tuned print control.
+ *
+ * iki_write_print_flag_*_d:
+ * - none: No flags set.
+ * - debug: Stream is for debug printing.
+ * - error: Stream is for error printing.
+ * - in: Stream is a source file.
+ * - message: Stream is for message printing.
+ * - out: Stream is a destination file.
+ * - warning: Stream is for warning printing.
+ */
+#ifndef _di_iki_write_print_flag_d_
+ #define iki_write_print_flag_none_d 0x0
+ #define iki_write_print_flag_debug_d 0x1
+ #define iki_write_print_flag_error_d 0x2
+ #define iki_write_print_flag_file_d 0x4
+ #define iki_write_print_flag_in_d 0x8
+ #define iki_write_print_flag_out_d 0x10
+ #define iki_write_print_flag_message_d 0x20
+ #define iki_write_print_flag_warning_d 0x40
+#endif // _di_iki_write_print_flag_d_
+
+/**
* The program signal defines.
*
* iki_write_signal_*_d:
#endif
/**
- * Flags passed to the main function or program.
- *
- * iki_write_main_flag_*_e:
- * - none: No flags set.
- * - content: The Content being written is specified.
- * - copyright: Print copyright.
- * - file_to: Using a specified destination file.
- * - help: Print help.
- * - object: The Object being written is specified.
- * - pipe: Use the input pipe.
- * - version: Print version.
- * - version_copyright_help: A helper flag representing version, copyright, and help flag bits being set.
- * - wrap: Wrap the vocabulary.
- */
-#ifndef _di_iki_write_main_flag_e_
- enum {
- iki_write_main_flag_none_e = 0x0,
- iki_write_main_flag_content_e = 0x1,
- iki_write_main_flag_copyright_e = 0x2,
- iki_write_main_flag_file_to_e = 0x4,
- iki_write_main_flag_help_e = 0x8,
- iki_write_main_flag_object_e = 0x10,
- iki_write_main_flag_pipe_e = 0x20,
- iki_write_main_flag_version_e = 0x40,
- iki_write_main_flag_version_copyright_help_e = 0x4a,
- iki_write_main_flag_wrap_e = 0x80,
- }; // enum
-#endif // _di_iki_write_main_flag_e_
-
-/**
* The main program parameters.
*/
#ifndef _di_iki_write_parameter_e_
#define iki_write_parameter_total_d (f_console_parameter_state_type_total_d + 7)
#endif // _di_iki_write_parameter_e_
-/**
- * Flags for fine-tuned print control.
- *
- * iki_write_print_flag_*_e:
- * - none: No flags set.
- * - debug: Stream is for debug printing.
- * - error: Stream is for error printing.
- * - in: Stream is a source file.
- * - message: Stream is for message printing.
- * - out: Stream is a destination file.
- * - warning: Stream is for warning printing.
- */
-#ifndef _di_iki_write_print_flag_e_
- enum {
- iki_write_print_flag_none_e = 0x0,
- iki_write_print_flag_debug_e = 0x1,
- iki_write_print_flag_error_e = 0x2,
- iki_write_print_flag_file_e = 0x4,
- iki_write_print_flag_in_e = 0x8,
- iki_write_print_flag_out_e = 0x10,
- iki_write_print_flag_message_e = 0x20,
- iki_write_print_flag_warning_e = 0x40,
- }; // enum
-#endif // _di_iki_write_print_flag_e_
-
#ifdef __cplusplus
} // extern "C"
#endif
#define iki_write_setting_t_initialize \
{ \
- iki_write_main_flag_none_e, \
+ iki_write_main_flag_none_d, \
F_okay, \
f_state_t_initialize, \
f_string_static_t_initialize, \
main->setting.state.status = F_okay;
- if (main->setting.flag & iki_write_main_flag_version_copyright_help_e) {
- if (main->setting.flag & iki_write_main_flag_help_e) {
+ if (main->setting.flag & iki_write_main_flag_version_copyright_help_d) {
+ if (main->setting.flag & iki_write_main_flag_help_d) {
iki_write_print_message_help(&main->program.message);
}
- else if (main->setting.flag & iki_write_main_flag_version_e) {
+ else if (main->setting.flag & iki_write_main_flag_version_d) {
fll_program_print_version(&main->program.message, iki_write_program_version_s);
}
- else if (main->setting.flag & iki_write_main_flag_copyright_e) {
+ else if (main->setting.flag & iki_write_main_flag_copyright_d) {
fll_program_print_copyright(&main->program.message, fll_program_copyright_year_author_s);
}
main->setting.escaped.used = 0;
- if (main->setting.flag & iki_write_main_flag_pipe_e) {
+ if (main->setting.flag & iki_write_main_flag_pipe_d) {
bool object_ended = F_false;
f_number_unsigned_t previous = 0;
iki_write_main_t data = iki_write_main_t_initialize;
- data.program.debug.flag |= iki_write_print_flag_debug_e | iki_write_print_flag_out_e;
- data.program.error.flag |= iki_write_print_flag_error_e | iki_write_print_flag_out_e;
- data.program.output.flag |= iki_write_print_flag_out_e;
- data.program.message.flag |= iki_write_print_flag_message_e | iki_write_print_flag_out_e;
- data.program.warning.flag |= iki_write_print_flag_warning_e | iki_write_print_flag_out_e;
+ data.program.debug.flag |= iki_write_print_flag_debug_d | iki_write_print_flag_out_d;
+ data.program.error.flag |= iki_write_print_flag_error_d | iki_write_print_flag_out_d;
+ data.program.output.flag |= iki_write_print_flag_out_d;
+ data.program.message.flag |= iki_write_print_flag_message_d | iki_write_print_flag_out_d;
+ data.program.warning.flag |= iki_write_print_flag_warning_d | iki_write_print_flag_out_d;
data.program.error.custom = (void *) &data;
data.program.debug.custom = (void *) &data;
data.program.message.custom = (void *) &data;
return;
}
- if (main->setting.flag & iki_write_main_flag_wrap_e) {
+ if (main->setting.flag & iki_write_main_flag_wrap_d) {
fl_print_format("%r%Q%r%r%r%Q%r", main->program.output.to, f_iki_syntax_wrap_open_s, object, f_iki_syntax_wrap_close_s, f_iki_syntax_separator_s, main->setting.quote, main->setting.escaped, main->setting.quote);
}
else {
status_code_main_t data = status_code_main_t_initialize;
- data.program.debug.flag |= status_code_print_flag_debug_e | status_code_print_flag_out_e;
- data.program.error.flag |= status_code_print_flag_error_e | status_code_print_flag_out_e;
- data.program.output.flag |= status_code_print_flag_out_e;
- data.program.message.flag |= status_code_print_flag_message_e | status_code_print_flag_out_e;
- data.program.warning.flag |= status_code_print_flag_warning_e | status_code_print_flag_out_e;
+ data.program.debug.flag |= status_code_print_flag_debug_d | status_code_print_flag_out_d;
+ data.program.error.flag |= status_code_print_flag_error_d | status_code_print_flag_out_d;
+ data.program.output.flag |= status_code_print_flag_out_d;
+ data.program.message.flag |= status_code_print_flag_message_d | status_code_print_flag_out_d;
+ data.program.warning.flag |= status_code_print_flag_warning_d | status_code_print_flag_out_d;
data.program.error.custom = (void *) &data;
data.program.debug.custom = (void *) &data;
data.program.message.custom = (void *) &data;
}
if (main->program.parameters.array[f_console_standard_parameter_help_e].result & f_console_result_found_e) {
- main->setting.flag |= status_code_main_flag_help_e;
+ main->setting.flag |= status_code_main_flag_help_d;
return;
}
if (main->program.parameters.array[f_console_standard_parameter_version_e].result & f_console_result_found_e) {
- main->setting.flag |= status_code_main_flag_version_e;
+ main->setting.flag |= status_code_main_flag_version_d;
return;
}
if (main->program.parameters.array[f_console_standard_parameter_copyright_e].result & f_console_result_found_e) {
- main->setting.flag |= status_code_main_flag_copyright_e;
+ main->setting.flag |= status_code_main_flag_copyright_d;
return;
}
if (main->program.pipe & fll_program_data_pipe_input_e) {
- main->setting.flag |= status_code_main_flag_pipe_e;
+ main->setting.flag |= status_code_main_flag_pipe_d;
}
else {
- main->setting.flag &= ~status_code_main_flag_pipe_e;
+ main->setting.flag &= ~status_code_main_flag_pipe_d;
}
if (main->program.parameters.array[status_code_parameter_error_e].result & f_console_result_found_e) {
- main->setting.flag |= status_code_main_flag_error_e;
+ main->setting.flag |= status_code_main_flag_error_d;
}
if (main->program.parameters.array[status_code_parameter_fine_e].result & f_console_result_found_e) {
- main->setting.flag |= status_code_main_flag_fine_e;
+ main->setting.flag |= status_code_main_flag_fine_d;
}
if (main->program.parameters.array[status_code_parameter_warning_e].result & f_console_result_found_e) {
- main->setting.flag |= status_code_main_flag_warning_e;
+ main->setting.flag |= status_code_main_flag_warning_d;
}
if (main->program.parameters.array[status_code_parameter_number_e].result & f_console_result_found_e) {
- main->setting.flag |= status_code_main_flag_number_e;
+ main->setting.flag |= status_code_main_flag_number_d;
}
- if (main->setting.flag & status_code_main_flag_error_e) {
- if (main->setting.flag & status_code_main_flag_warning_e) {
- if (!(main->setting.flag & status_code_main_flag_number_e)) {
+ if (main->setting.flag & status_code_main_flag_error_d) {
+ if (main->setting.flag & status_code_main_flag_warning_d) {
+ if (!(main->setting.flag & status_code_main_flag_number_d)) {
main->setting.state.status = F_status_set_error(F_parameter);
status_code_print_error_cannot_error_warning_number(&main->program.error);
}
}
- if (main->setting.flag & status_code_main_flag_fine_e) {
+ if (main->setting.flag & status_code_main_flag_fine_d) {
main->setting.state.status = F_status_set_error(F_parameter);
fll_program_print_error_parameter_cannot_use_with(&main->program.error, f_console_symbol_long_normal_s, f_console_symbol_long_normal_s, status_code_long_error_s, status_code_long_fine_s);
return;
}
}
- else if (main->setting.flag & status_code_main_flag_warning_e && main->setting.flag & status_code_main_flag_fine_e) {
+ else if (main->setting.flag & status_code_main_flag_warning_d && main->setting.flag & status_code_main_flag_fine_d) {
main->setting.state.status = F_status_set_error(F_parameter);
fll_program_print_error_parameter_cannot_use_with(&main->program.error, f_console_symbol_long_normal_s, f_console_symbol_long_normal_s, status_code_long_warning_s, status_code_long_fine_s);
#endif // _di_status_code_allocation_d_
/**
+ * Flags passed to the main function or program.
+ *
+ * When number mode is not specified, then mode is "string" mode (there is no flag for "string" mode).
+ *
+ * status_code_main_flag_*_d:
+ * - none: No flags set.
+ * - copyright: Print copyright.
+ * - error: Check if status is "error".
+ * - fine: Check if status is "fine".
+ * - help: Print help.
+ * - number: Operate in number mode.
+ * - pipe: Use the input pipe.
+ * - version: Print version.
+ * - version_copyright_help: A helper flag representing version, copyright, and help flag bits being set.
+ * - warning: Check if status is "warning".
+ */
+#ifndef _di_status_code_main_flag_d_
+ #define status_code_main_flag_none_d 0x0
+ #define status_code_main_flag_copyright_d 0x1
+ #define status_code_main_flag_error_d 0x2
+ #define status_code_main_flag_fine_d 0x4
+ #define status_code_main_flag_help_d 0x8
+ #define status_code_main_flag_number_d 0x10
+ #define status_code_main_flag_pipe_d 0x20
+ #define status_code_main_flag_version_d 0x40
+ #define status_code_main_flag_version_copyright_help_d 0x49
+ #define status_code_main_flag_warning_d 0x80
+#endif // _di_status_code_main_flag_d_
+
+/**
+ * Flags for fine-tuned print control.
+ *
+ * status_code_print_flag_*_d:
+ * - none: No flags set.
+ * - debug: Stream is for debug printing.
+ * - error: Stream is for error printing.
+ * - in: Stream is a source file.
+ * - message: Stream is for message printing.
+ * - out: Stream is a destination file.
+ * - warning: Stream is for warning printing.
+ */
+#ifndef _di_status_code_print_flag_d_
+ #define status_code_print_flag_none_d 0x0
+ #define status_code_print_flag_debug_d 0x1
+ #define status_code_print_flag_error_d 0x2
+ #define status_code_print_flag_file_d 0x4
+ #define status_code_print_flag_in_d 0x8
+ #define status_code_print_flag_out_d 0x10
+ #define status_code_print_flag_message_d 0x20
+ #define status_code_print_flag_warning_d 0x40
+#endif // _di_status_code_print_flag_d_
+
+/**
* The program signal defines.
*
* status_code_signal_*_d:
#endif
/**
- * Flags passed to the main function or program.
- *
- * When number mode is not specified, then mode is "string" mode (there is no flag for "string" mode).
- *
- * status_code_main_flag_*_e:
- * - none: No flags set.
- * - copyright: Print copyright.
- * - error: Check if status is "error".
- * - fine: Check if status is "fine".
- * - help: Print help.
- * - number: Operate in number mode.
- * - pipe: Use the input pipe.
- * - version: Print version.
- * - version_copyright_help: A helper flag representing version, copyright, and help flag bits being set.
- * - warning: Check if status is "warning".
- */
-#ifndef _di_status_code_main_flag_e_
- enum {
- status_code_main_flag_none_e = 0x0,
- status_code_main_flag_copyright_e = 0x1,
- status_code_main_flag_error_e = 0x2,
- status_code_main_flag_fine_e = 0x4,
- status_code_main_flag_help_e = 0x8,
- status_code_main_flag_number_e = 0x10,
- status_code_main_flag_pipe_e = 0x20,
- status_code_main_flag_version_e = 0x40,
- status_code_main_flag_version_copyright_help_e = 0x49,
- status_code_main_flag_warning_e = 0x80,
- }; // enum
-#endif // _di_status_code_main_flag_e_
-
-/**
* The main program parameters.
*/
#ifndef _di_status_code_parameter_e_
#define status_code_parameter_total_d (f_console_parameter_state_type_total_d + 4)
#endif // _di_status_code_parameter_e_
-/**
- * Flags for fine-tuned print control.
- *
- * status_code_print_flag_*_e:
- * - none: No flags set.
- * - debug: Stream is for debug printing.
- * - error: Stream is for error printing.
- * - in: Stream is a source file.
- * - message: Stream is for message printing.
- * - out: Stream is a destination file.
- * - warning: Stream is for warning printing.
- */
-#ifndef _di_status_code_print_flag_e_
- enum {
- status_code_print_flag_none_e = 0x0,
- status_code_print_flag_debug_e = 0x1,
- status_code_print_flag_error_e = 0x2,
- status_code_print_flag_file_e = 0x4,
- status_code_print_flag_in_e = 0x8,
- status_code_print_flag_out_e = 0x10,
- status_code_print_flag_message_e = 0x20,
- status_code_print_flag_warning_e = 0x40,
- }; // enum
-#endif // _di_status_code_print_flag_e_
-
#ifdef __cplusplus
} // extern "C"
#endif
#define status_code_setting_t_initialize \
{ \
- status_code_main_flag_none_e, \
+ status_code_main_flag_none_d, \
F_okay, \
f_state_t_initialize, \
0, \
status_code_main_t data = status_code_main_t_initialize;
- data.program.debug.flag |= status_code_print_flag_debug_e | status_code_print_flag_out_e;
- data.program.error.flag |= status_code_print_flag_error_e | status_code_print_flag_out_e;
- data.program.output.flag |= status_code_print_flag_out_e;
- data.program.message.flag |= status_code_print_flag_message_e | status_code_print_flag_out_e;
- data.program.warning.flag |= status_code_print_flag_warning_e | status_code_print_flag_out_e;
+ data.program.debug.flag |= status_code_print_flag_debug_d | status_code_print_flag_out_d;
+ data.program.error.flag |= status_code_print_flag_error_d | status_code_print_flag_out_d;
+ data.program.output.flag |= status_code_print_flag_out_d;
+ data.program.message.flag |= status_code_print_flag_message_d | status_code_print_flag_out_d;
+ data.program.warning.flag |= status_code_print_flag_warning_d | status_code_print_flag_out_d;
data.program.error.custom = (void *) &data;
data.program.debug.custom = (void *) &data;
data.program.message.custom = (void *) &data;
f_file_stream_lock(main->program.output.to);
- if ((main->setting.flag & status_code_main_flag_error_e) && F_status_is_error(number) || (main->setting.flag & status_code_main_flag_warning_e) && F_status_is_warning(number) || (main->setting.flag & status_code_main_flag_fine_e) && F_status_is_fine(number)) {
+ if ((main->setting.flag & status_code_main_flag_error_d) && F_status_is_error(number) || (main->setting.flag & status_code_main_flag_warning_d) && F_status_is_warning(number) || (main->setting.flag & status_code_main_flag_fine_d) && F_status_is_fine(number)) {
f_print_dynamic_raw(f_status_true_s, main->program.output.to);
}
else {
return;
}
- if (main->setting.flag & status_code_main_flag_error_e) {
+ if (main->setting.flag & status_code_main_flag_error_d) {
code = F_status_set_error(code);
}
- if (main->setting.flag & status_code_main_flag_warning_e) {
+ if (main->setting.flag & status_code_main_flag_warning_d) {
code = F_status_set_warning(code);
}
main->setting.state.status = F_okay;
- if (main->setting.flag & status_code_main_flag_version_copyright_help_e) {
- if (main->setting.flag & status_code_main_flag_help_e) {
+ if (main->setting.flag & status_code_main_flag_version_copyright_help_d) {
+ if (main->setting.flag & status_code_main_flag_help_d) {
status_code_print_message_help(&main->program.message);
}
- else if (main->setting.flag & status_code_main_flag_version_e) {
+ else if (main->setting.flag & status_code_main_flag_version_d) {
fll_program_print_version(&main->program.message, status_code_program_version_s);
}
- else if (main->setting.flag & status_code_main_flag_copyright_e) {
+ else if (main->setting.flag & status_code_main_flag_copyright_d) {
fll_program_print_copyright(&main->program.message, fll_program_copyright_year_author_s);
}
f_status_t status = F_okay;
- if (main->setting.flag & status_code_main_flag_number_e) {
- if (main->setting.flag & status_code_main_flag_pipe_e) {
+ if (main->setting.flag & status_code_main_flag_number_d) {
+ if (main->setting.flag & status_code_main_flag_pipe_d) {
// @todo call status_code_process_number() here for all main from pipe that are space separated.
}
f_file_stream_unlock(main->program.output.to);
}
}
- else if ((main->setting.flag & status_code_main_flag_error_e) || (main->setting.flag & status_code_main_flag_warning_e) || (main->setting.flag & status_code_main_flag_fine_e)) {
- if (main->setting.flag & status_code_main_flag_pipe_e) {
+ else if ((main->setting.flag & status_code_main_flag_error_d) || (main->setting.flag & status_code_main_flag_warning_d) || (main->setting.flag & status_code_main_flag_fine_d)) {
+ if (main->setting.flag & status_code_main_flag_pipe_d) {
// @todo call status_code_process_check() here for all main from pipe that is space separated.
}
}
}
else {
- if (main->setting.flag & status_code_main_flag_pipe_e) {
+ if (main->setting.flag & status_code_main_flag_pipe_d) {
// @todo call status_code_process_normal() here for all main from pipe that is space separated.
}
return;
}
}
- else if (!(main->setting.flag & utf8_main_flag_verify_e)) {
+ else if (!(main->setting.flag & utf8_main_flag_verify_d)) {
if (main->setting.mode & utf8_mode_to_bytesequence_e) {
utf8_print_data_bytesequence(&main->program.output, sequence);
}
return;
}
}
- else if (!(main->setting.flag & utf8_main_flag_verify_e)) {
+ else if (!(main->setting.flag & utf8_main_flag_verify_d)) {
if (main->setting.mode & utf8_mode_to_codepoint_e) {
utf8_print_data_codepoint(&main->program.output, codepoint);
}
return;
}
}
- else if (!(main->setting.flag & utf8_main_flag_verify_e)) {
+ else if (!(main->setting.flag & utf8_main_flag_verify_d)) {
// The width actually includes the leading '0x', which is not part of the width of the digit in binary form.
uint8_t width = main->setting.text.used > 1 ? (main->setting.text.used - 2) / 2 : 0;
}
if (main->program.parameters.array[f_console_standard_parameter_help_e].result & f_console_result_found_e) {
- main->setting.flag |= utf8_main_flag_help_e;
+ main->setting.flag |= utf8_main_flag_help_d;
return;
}
if (main->program.parameters.array[f_console_standard_parameter_version_e].result & f_console_result_found_e) {
- main->setting.flag |= utf8_main_flag_version_e;
+ main->setting.flag |= utf8_main_flag_version_d;
return;
}
if (main->program.parameters.array[f_console_standard_parameter_copyright_e].result & f_console_result_found_e) {
- main->setting.flag |= utf8_main_flag_copyright_e;
+ main->setting.flag |= utf8_main_flag_copyright_d;
return;
}
if (main->program.pipe & fll_program_data_pipe_input_e) {
- main->setting.flag |= utf8_main_flag_pipe_e;
+ main->setting.flag |= utf8_main_flag_pipe_d;
}
else {
- main->setting.flag &= ~utf8_main_flag_pipe_e;
+ main->setting.flag &= ~utf8_main_flag_pipe_d;
}
if (main->program.parameters.array[utf8_parameter_to_file_e].result & f_console_result_value_e) {
return;
}
- main->setting.flag |= utf8_main_flag_file_to_e;
+ main->setting.flag |= utf8_main_flag_file_to_d;
}
else {
utf8_print_error_parameter_file_name_empty(&main->program.error, main->program.parameters.array[utf8_parameter_to_file_e].values.array[0]);
}
else {
main->program.output.to = main->program.message.to;
- main->setting.flag &= ~utf8_main_flag_file_to_e;
+ main->setting.flag &= ~utf8_main_flag_file_to_d;
}
if (main->program.parameters.array[utf8_parameter_from_file_e].result & f_console_result_value_e) {
if (F_status_is_error(main->setting.state.status)) return;
- main->setting.flag |= utf8_main_flag_file_from_e;
+ main->setting.flag |= utf8_main_flag_file_from_d;
}
else if (main->program.parameters.array[utf8_parameter_from_file_e].result & f_console_result_found_e) {
main->setting.state.status = F_status_set_error(F_parameter);
return;
}
else {
- main->setting.flag &= ~utf8_main_flag_file_from_e;
+ main->setting.flag &= ~utf8_main_flag_file_from_d;
}
if (main->program.parameters.remaining.used) {
} // for
}
- if (!((main->setting.flag & (utf8_main_flag_pipe_e | utf8_main_flag_file_from_e)) || main->program.parameters.remaining.used)) {
+ if (!((main->setting.flag & (utf8_main_flag_pipe_d | utf8_main_flag_file_from_d)) || main->program.parameters.remaining.used)) {
main->setting.state.status = F_status_set_error(F_parameter);
utf8_print_error_no_from(&main->program.error);
if (main->program.parameters.array[utf8_parameter_headers_e].result & f_console_result_found_e) {
if (main->program.parameters.array[utf8_parameter_separate_e].result & f_console_result_found_e) {
if (main->program.parameters.array[utf8_parameter_headers_e].location < main->program.parameters.array[utf8_parameter_separate_e].location) {
- main->setting.flag |= utf8_main_flag_separate_e;
+ main->setting.flag |= utf8_main_flag_separate_d;
}
else if (main->program.parameters.array[utf8_parameter_headers_e].location == main->program.parameters.array[utf8_parameter_separate_e].location) {
if (main->program.parameters.array[utf8_parameter_headers_e].location_sub < main->program.parameters.array[utf8_parameter_separate_e].location_sub) {
- main->setting.flag |= utf8_main_flag_separate_e;
+ main->setting.flag |= utf8_main_flag_separate_d;
}
else {
- main->setting.flag |= utf8_main_flag_header_e;
+ main->setting.flag |= utf8_main_flag_header_d;
}
}
else {
- main->setting.flag |= utf8_main_flag_header_e;
+ main->setting.flag |= utf8_main_flag_header_d;
}
}
else {
- main->setting.flag |= utf8_main_flag_header_e;
+ main->setting.flag |= utf8_main_flag_header_d;
}
}
else if (main->program.parameters.array[utf8_parameter_separate_e].result & f_console_result_found_e) {
- main->setting.flag |= utf8_main_flag_separate_e;
+ main->setting.flag |= utf8_main_flag_separate_d;
}
if (main->program.parameters.array[utf8_parameter_strip_invalid_e].result & f_console_result_found_e) {
- main->setting.flag |= utf8_main_flag_strip_invalid_e;
+ main->setting.flag |= utf8_main_flag_strip_invalid_d;
}
main->setting.valid_not = main->program.message.set->error;
#endif // _di_utf8_allocation_d_
/**
+ * Flags passed to the main function or program.
+ *
+ * utf8_main_flag_*_d:
+ * - none: No flags set.
+ * - copyright: Print the copyright.
+ * - file_from: Using a specified source file.
+ * - file_to: Using a specified destination file.
+ * - header: Enable printing of headers.
+ * - help: Print help.
+ * - pipe: Use the input pipe.
+ * - separate: Enable printing of separators.
+ * - strip_invalid: Using strip invalid character mode.
+ * - verify: Using verify mode.
+ * - version: Print version.
+ * - version_copyright_help: A helper flag representing version, copyright, and help flag bits being set.
+ */
+#ifndef _di_utf8_main_flag_d_
+ #define utf8_main_flag_none_d 0x0
+ #define utf8_main_flag_copyright_d 0x1
+ #define utf8_main_flag_file_from_d 0x2
+ #define utf8_main_flag_file_to_d 0x4
+ #define utf8_main_flag_header_d 0x8
+ #define utf8_main_flag_help_d 0x10
+ #define utf8_main_flag_pipe_d 0x20
+ #define utf8_main_flag_separate_d 0x40
+ #define utf8_main_flag_strip_invalid_d 0x80
+ #define utf8_main_flag_verify_d 0x100
+ #define utf8_main_flag_version_d 0x200
+ #define utf8_main_flag_version_copyright_help_d 0x211
+#endif // _di_utf8_main_flag_d_
+
+/**
+ * Modes used to designate how to the input and output are to be processed.
+ *
+ * utf8_mode_*_d:
+ * - none: No flags set.
+ *
+ * utf8_mode_from_*_d:
+ * - bytesequence: The input format is bytesequence.
+ * - codepoint: The input format is codepoint (U+XXXX or U+XXXXXX).
+ *
+ * utf8_mode_to_*_d:
+ * - bytesequence: The output format is bytesequence.
+ * - codepoint: The output format is codepoint (U+XXXX or U+XXXXXX).
+ * - combining: The output format is whether or not character is combining (may be used with "width").
+ * - width: The output format is how wide the character is (may be used with "combining").
+ */
+#ifndef _di_utf8_modes_d_
+ #define utf8_mode_none_e 0x0
+ #define utf8_mode_from_bytesequence_e 0x1
+ #define utf8_mode_from_codepoint_e 0x2
+ #define utf8_mode_to_bytesequence_e 0x4
+ #define utf8_mode_to_codepoint_e 0x8
+ #define utf8_mode_to_combining_e 0x10
+ #define utf8_mode_to_width_e 0x20
+#endif // _di_utf8_modes_d_
+
+/**
+ * Flags for fine-tuned print control.
+ *
+ * utf8_print_flag_*_d:
+ * - none: No flags set.
+ * - debug: Stream is for debug printing.
+ * - error: Stream is for error printing.
+ * - in: Stream is a source file.
+ * - message: Stream is for message printing.
+ * - out: Stream is a destination file.
+ * - warning: Stream is for warning printing.
+ */
+#ifndef _di_utf8_print_flag_d_
+ #define utf8_print_flag_none_d 0x0
+ #define utf8_print_flag_debug_d 0x1
+ #define utf8_print_flag_error_d 0x2
+ #define utf8_print_flag_file_d 0x4
+ #define utf8_print_flag_in_d 0x8
+ #define utf8_print_flag_out_d 0x10
+ #define utf8_print_flag_message_d 0x20
+ #define utf8_print_flag_warning_d 0x40
+#endif // _di_utf8_print_flag_d_
+
+/**
* The program signal defines.
*
* utf8_signal_*_d:
#endif
/**
- * Modes used to designate how to the input and output are to be processed.
- *
- * utf8_mode_*_e:
- * - none: No flags set.
- *
- * utf8_mode_from_*_e:
- * - bytesequence: The input format is bytesequence.
- * - codepoint: The input format is codepoint (U+XXXX or U+XXXXXX).
- *
- * utf8_mode_to_*_e:
- * - bytesequence: The output format is bytesequence.
- * - codepoint: The output format is codepoint (U+XXXX or U+XXXXXX).
- * - combining: The output format is whether or not character is combining (may be used with "width").
- * - width: The output format is how wide the character is (may be used with "combining").
- */
-#ifndef _di_utf8_modes_e_
- enum {
- utf8_mode_none_e = 0x0,
- utf8_mode_from_bytesequence_e = 0x1,
- utf8_mode_from_codepoint_e = 0x2,
- utf8_mode_to_bytesequence_e = 0x4,
- utf8_mode_to_codepoint_e = 0x8,
- utf8_mode_to_combining_e = 0x10,
- utf8_mode_to_width_e = 0x20,
- }; // enum
-#endif // _di_utf8_modes_e_
-
-/**
- * Flags passed to the main function or program.
- *
- * utf8_main_flag_*_e:
- * - none: No flags set.
- * - copyright: Print the copyright.
- * - file_from: Using a specified source file.
- * - file_to: Using a specified destination file.
- * - header: Enable printing of headers.
- * - help: Print help.
- * - pipe: Use the input pipe.
- * - separate: Enable printing of separators.
- * - strip_invalid: Using strip invalid character mode.
- * - verify: Using verify mode.
- * - version: Print version.
- * - version_copyright_help: A helper flag representing version, copyright, and help flag bits being set.
- */
-#ifndef _di_utf8_main_flag_e_
- enum {
- utf8_main_flag_none_e = 0x0,
- utf8_main_flag_copyright_e = 0x1,
- utf8_main_flag_file_from_e = 0x2,
- utf8_main_flag_file_to_e = 0x4,
- utf8_main_flag_header_e = 0x8,
- utf8_main_flag_help_e = 0x10,
- utf8_main_flag_pipe_e = 0x20,
- utf8_main_flag_separate_e = 0x40,
- utf8_main_flag_strip_invalid_e = 0x80,
- utf8_main_flag_verify_e = 0x100,
- utf8_main_flag_version_e = 0x200,
- utf8_main_flag_version_copyright_help_e = 0x211,
- }; // enum
-#endif // _di_utf8_main_flag_e_
-
-/**
* Codepoint modes for converting to/from binary and codepoint values.
*
* The special "raw" format is used only for reading from codepoint format where that format represents binary character that is not a valid Unicode character.
#define utf8_parameter_total_d (f_console_parameter_state_type_total_d + 12)
#endif // _di_utf8_parameter_e_
-/**
- * Flags for fine-tuned print control.
- *
- * utf8_print_flag_*_e:
- * - none: No flags set.
- * - debug: Stream is for debug printing.
- * - error: Stream is for error printing.
- * - in: Stream is a source file.
- * - message: Stream is for message printing.
- * - out: Stream is a destination file.
- * - warning: Stream is for warning printing.
- */
-#ifndef _di_utf8_print_flag_e_
- enum {
- utf8_print_flag_none_e = 0x0,
- utf8_print_flag_debug_e = 0x1,
- utf8_print_flag_error_e = 0x2,
- utf8_print_flag_file_e = 0x4,
- utf8_print_flag_in_e = 0x8,
- utf8_print_flag_out_e = 0x10,
- utf8_print_flag_message_e = 0x20,
- utf8_print_flag_warning_e = 0x40,
- }; // enum
-#endif // _di_utf8_print_flag_e_
-
#ifdef __cplusplus
} // extern "C"
#endif
* - buffer: A buffer to use for printing output (generally for storing a block of input from an input file).
* - text: A buffer for storing a series of characters for processing (generally for code point processing).
*
- * - path_files_from: An array of all "from" file paths for when the flag utf8_main_flag_file_from_e is set.
- * - path_files_to: An array of all "to" file paths for when the flag utf8_main_flag_file_to_e is set.
+ * - path_files_from: An array of all "from" file paths for when the flag utf8_main_flag_file_from_d is set.
+ * - path_files_to: An array of all "to" file paths for when the flag utf8_main_flag_file_to_d is set.
* - remaining: An array containing all remaining arguments passed to the program.
*/
#ifndef _di_utf8_setting_t_
#define utf8_setting_t_initialize \
{ \
utf8_mode_from_bytesequence_e | utf8_mode_to_codepoint_e, \
- utf8_main_flag_none_e, \
+ utf8_main_flag_none_d, \
F_okay, \
f_state_t_initialize, \
f_color_set_t_initialize, \
utf8_main_t data = utf8_main_t_initialize;
- data.program.debug.flag |= utf8_print_flag_debug_e | utf8_print_flag_out_e;
- data.program.error.flag |= utf8_print_flag_error_e | utf8_print_flag_out_e;
- data.program.output.flag |= utf8_print_flag_out_e;
- data.program.message.flag |= utf8_print_flag_message_e | utf8_print_flag_out_e;
- data.program.warning.flag |= utf8_print_flag_warning_e | utf8_print_flag_out_e;
+ data.program.debug.flag |= utf8_print_flag_debug_d | utf8_print_flag_out_d;
+ data.program.error.flag |= utf8_print_flag_error_d | utf8_print_flag_out_d;
+ data.program.output.flag |= utf8_print_flag_out_d;
+ data.program.message.flag |= utf8_print_flag_message_d | utf8_print_flag_out_d;
+ data.program.warning.flag |= utf8_print_flag_warning_d | utf8_print_flag_out_d;
data.program.error.custom = (void *) &data;
data.program.debug.custom = (void *) &data;
data.program.message.custom = (void *) &data;
utf8_main_t * const main = (utf8_main_t *) print->custom;
- if (main->setting.flag & (utf8_main_flag_strip_invalid_e | utf8_main_flag_verify_e)) return F_output_not;
+ if (main->setting.flag & (utf8_main_flag_strip_invalid_d | utf8_main_flag_verify_d)) return F_output_not;
if (!invalid.used) return F_output_not;
if ((main->setting.mode & utf8_mode_to_combining_e) || (main->setting.mode & utf8_mode_to_width_e)) {
utf8_main_t * const main = (utf8_main_t *) print->custom;
- if (main->setting.flag & (utf8_main_flag_strip_invalid_e | utf8_main_flag_verify_e)) return F_output_not;
+ if (main->setting.flag & (utf8_main_flag_strip_invalid_d | utf8_main_flag_verify_d)) return F_output_not;
fl_print_format("%r%[%r%]%r", print->to, main->setting.prepend, main->setting.valid_not, utf8_string_unknown_s, main->setting.valid_not, main->setting.append);
utf8_main_t * const main = (utf8_main_t *) print->custom;
- if (main->setting.flag & (utf8_main_flag_strip_invalid_e | utf8_main_flag_verify_e)) return F_output_not;
+ if (main->setting.flag & (utf8_main_flag_strip_invalid_d | utf8_main_flag_verify_d)) return F_output_not;
f_string_static_t character = macro_f_string_static_t_initialize_1(0, 0, width);
utf8_main_t * const main = (utf8_main_t *) print->custom;
- if (main->setting.flag & (utf8_main_flag_strip_invalid_e | utf8_main_flag_verify_e)) return F_output_not;
+ if (main->setting.flag & (utf8_main_flag_strip_invalid_d | utf8_main_flag_verify_d)) return F_output_not;
fl_print_format("%r%[%r%]%r", print->to, main->setting.prepend, main->setting.valid_not, raw, main->setting.valid_not, main->setting.append);
utf8_main_t * const main = (utf8_main_t *) print->custom;
- if (main->setting.flag & (utf8_main_flag_strip_invalid_e | utf8_main_flag_verify_e)) return F_output_not;
+ if (main->setting.flag & (utf8_main_flag_strip_invalid_d | utf8_main_flag_verify_d)) return F_output_not;
if (main->setting.mode & utf8_mode_to_combining_e) {
utf8_print_data_combining_or_width_invalid(print);
utf8_main_t * const main = (utf8_main_t *) print->custom;
- if (!(main->setting.flag & (utf8_main_flag_header_e | utf8_main_flag_separate_e))) return F_output_not;
- if (main->setting.flag & utf8_main_flag_verify_e) return F_output_not;
+ if (!(main->setting.flag & (utf8_main_flag_header_d | utf8_main_flag_separate_d))) return F_output_not;
+ if (main->setting.flag & utf8_main_flag_verify_d) return F_output_not;
f_file_stream_lock(print->to);
- if (main->setting.flag & utf8_main_flag_header_e) {
+ if (main->setting.flag & utf8_main_flag_header_d) {
if (index) {
f_print_dynamic_raw(f_string_eol_s, print->to);
}
fl_print_format("%[File%] ", print->to, print->set->title, print->set->title);
- if (main->setting.flag & utf8_main_flag_file_to_e) {
+ if (main->setting.flag & utf8_main_flag_file_to_d) {
fl_print_format("%[%Q%]: %Q.%r", print->to, print->set->notable, name, print->set->notable, main->setting.path_files_to.array[0], f_string_eol_s);
}
else {
utf8_main_t * const main = (utf8_main_t *) print->custom;
- if (!(main->setting.flag & (utf8_main_flag_header_e | utf8_main_flag_separate_e))) return F_output_not;
- if (main->setting.flag & utf8_main_flag_verify_e) return F_output_not;
+ if (!(main->setting.flag & (utf8_main_flag_header_d | utf8_main_flag_separate_d))) return F_output_not;
+ if (main->setting.flag & utf8_main_flag_verify_d) return F_output_not;
f_file_stream_lock(print->to);
- if (main->setting.flag & utf8_main_flag_header_e) {
- if ((main->setting.flag & (utf8_main_flag_pipe_e | utf8_main_flag_file_from_e)) || index) {
+ if (main->setting.flag & utf8_main_flag_header_d) {
+ if ((main->setting.flag & (utf8_main_flag_pipe_d | utf8_main_flag_file_from_d)) || index) {
f_print_dynamic_raw(f_string_eol_s, print->to);
}
fl_print_format("%[%ul%]:%r", print->to, print->set->notable, index, print->set->notable, f_string_eol_s);
}
else {
- if ((main->setting.flag & (utf8_main_flag_pipe_e | utf8_main_flag_file_from_e)) || index) {
+ if ((main->setting.flag & (utf8_main_flag_pipe_d | utf8_main_flag_file_from_d)) || index) {
f_print_dynamic_raw(f_string_eol_s, print->to);
}
}
utf8_main_t * const main = (utf8_main_t *) print->custom;
- if (!(main->setting.flag & (utf8_main_flag_header_e | utf8_main_flag_separate_e))) return F_output_not;
- if (main->setting.flag & utf8_main_flag_verify_e) return F_output_not;
+ if (!(main->setting.flag & (utf8_main_flag_header_d | utf8_main_flag_separate_d))) return F_output_not;
+ if (main->setting.flag & utf8_main_flag_verify_d) return F_output_not;
- if (main->setting.flag & utf8_main_flag_header_e) {
+ if (main->setting.flag & utf8_main_flag_header_d) {
fll_print_format("%[Pipe%]:%r", print->to, print->set->title, print->set->title, f_string_eol_s);
}
utf8_main_t * const main = (utf8_main_t *) print->custom;
- if (main->setting.flag & (utf8_main_flag_strip_invalid_e | utf8_main_flag_verify_e)) return F_output_not;
+ if (main->setting.flag & (utf8_main_flag_strip_invalid_d | utf8_main_flag_verify_d)) return F_output_not;
fl_print_format("%[%QFailed to decode character code '%]", print->to, print->set->error, print->prefix, print->set->error);
utf8_main_t * const main = (utf8_main_t *) print->custom;
- if (main->setting.flag & (utf8_main_flag_strip_invalid_e | utf8_main_flag_verify_e)) return F_output_not;
+ if (main->setting.flag & (utf8_main_flag_strip_invalid_d | utf8_main_flag_verify_d)) return F_output_not;
fl_print_format("%[%QFailed to encode Unicode codepoint '%]", print->to, print->set->error, print->prefix, print->set->error);
fl_print_format("%[U+%_U%]", print->to, print->set->notable, codepoint, print->set->notable);
main->setting.state.status = F_okay;
- if (main->setting.flag & utf8_main_flag_version_copyright_help_e) {
- if (main->setting.flag & utf8_main_flag_help_e) {
+ if (main->setting.flag & utf8_main_flag_version_copyright_help_d) {
+ if (main->setting.flag & utf8_main_flag_help_d) {
utf8_print_message_help(&main->program.message);
}
- else if (main->setting.flag & utf8_main_flag_version_e) {
+ else if (main->setting.flag & utf8_main_flag_version_d) {
fll_program_print_version(&main->program.message, utf8_program_version_s);
}
- else if (main->setting.flag & utf8_main_flag_copyright_e) {
+ else if (main->setting.flag & utf8_main_flag_copyright_d) {
fll_program_print_copyright(&main->program.message, fll_program_copyright_year_author_s);
}
if (F_status_is_error_not(main->setting.state.status)) {
if (main->setting.mode & utf8_mode_to_bytesequence_e) {
- if (main->setting.flag & utf8_main_flag_header_e) {
+ if (main->setting.flag & utf8_main_flag_header_d) {
fll_print_dynamic_raw(f_string_eol_s, main->program.output.to);
}
- else if ((main->setting.flag & (utf8_main_flag_separate_e | utf8_main_flag_file_from_e)) || main->setting.remaining.used) {
+ else if ((main->setting.flag & (utf8_main_flag_separate_d | utf8_main_flag_file_from_d)) || main->setting.remaining.used) {
fll_print_dynamic_raw(f_string_eol_s, main->program.output.to);
}
}
}
// Process "from" files.
- if (F_status_is_error_not(main->setting.state.status) && (main->setting.flag & utf8_main_flag_file_from_e)) {
+ if (F_status_is_error_not(main->setting.state.status) && (main->setting.flag & utf8_main_flag_file_from_d)) {
f_file_t file = macro_f_file_t_initialize_1(0, -1, F_file_flag_read_only_d, 32768, F_file_default_size_write_d);
for (f_number_unsigned_t i = 0; i < main->setting.path_files_from.used && F_status_is_error_not(main->setting.state.status); ++i) {
f_file_stream_flush(file);
f_file_stream_close(&file);
- if (main->setting.flag & utf8_main_flag_verify_e) {
+ if (main->setting.flag & utf8_main_flag_verify_d) {
if (main->setting.state.status == F_false) {
valid = F_false;
}
if (F_status_is_error_not(main->setting.state.status)) {
if (main->setting.mode & utf8_mode_to_bytesequence_e) {
- if (main->setting.flag & utf8_main_flag_header_e) {
+ if (main->setting.flag & utf8_main_flag_header_d) {
fll_print_dynamic_raw(f_string_eol_s, main->program.output.to);
}
- else if ((main->setting.flag & utf8_main_flag_separate_e) && (main->setting.remaining.used || main->setting.path_files_from.used)) {
+ else if ((main->setting.flag & utf8_main_flag_separate_d) && (main->setting.remaining.used || main->setting.path_files_from.used)) {
fll_print_dynamic_raw(f_string_eol_s, main->program.output.to);
}
}
else {
- if (!(main->setting.flag & (utf8_main_flag_file_to_e | utf8_main_flag_header_e | utf8_main_flag_verify_e | utf8_main_flag_separate_e))) {
+ if (!(main->setting.flag & (utf8_main_flag_file_to_d | utf8_main_flag_header_d | utf8_main_flag_verify_d | utf8_main_flag_separate_d))) {
fll_print_dynamic_raw(f_string_eol_s, main->program.output.to);
}
}
utf8_process_text(main, main->program.parameters.arguments.array[main->program.parameters.remaining.array[i]]);
- if (main->setting.flag & utf8_main_flag_verify_e) {
+ if (main->setting.flag & utf8_main_flag_verify_d) {
if (main->setting.state.status == F_false) {
valid = F_false;
}
if (F_status_is_error(main->setting.state.status) || main->setting.state.status == F_interrupt) return;
- main->setting.state.status = (main->setting.flag & utf8_main_flag_verify_e) ? valid : F_okay;
+ main->setting.state.status = (main->setting.flag & utf8_main_flag_verify_d) ? valid : F_okay;
}
#endif // _di_utf8_main_