The console program has been changed to populate an argv as a f_string_static_t.
This avoids having to run strlen() and strnlen() everywhere for console parameter processing.
The program that processes the parameters already does this, so save the values in an f_string_static_t.
build_libraries-level_threadless -lfll_0
build_libraries_shared
build_libraries_static
-build_sources_library console.c control_group.c conversion.c private-conversion.c directory.c private-directory.c environment.c private-fss.c fss_basic.c fss_basic_list.c fss_embedded_list.c fss_extended.c fss_extended_list.c iki.c print.c print-common.c private-print.c signal.c string.c private-string.c utf.c private-utf.c utf_file.c private-utf_file.c
+build_sources_library console.c control_group.c conversion.c private-conversion.c directory.c directory-common.c private-directory.c environment.c private-fss.c fss_basic.c fss_basic_list.c fss_embedded_list.c fss_extended.c fss_extended_list.c iki.c print.c print-common.c private-print.c signal.c string.c private-string.c utf.c private-utf.c utf_file.c private-utf_file.c
build_sources_library-level
build_sources_library_shared
build_sources_library_static
build_sources_program
build_sources_program_shared
build_sources_program_static
-build_sources_headers console.h control_group.h conversion.h directory.h environment.h execute.h execute-common.h fss.h fss_basic.h fss_basic_list.h fss_embedded_list.h fss_extended.h fss_extended_list.h iki.h print.h print-common.h signal.h signal-common.h string.h utf.h utf_file.h
+build_sources_headers console.h control_group.h conversion.h directory.h directory-common.h environment.h execute.h execute-common.h fss.h fss_basic.h fss_basic_list.h fss_embedded_list.h fss_extended.h fss_extended_list.h iki.h print.h print-common.h signal.h signal-common.h string.h utf.h utf_file.h
build_sources_headers-level
build_sources_headers_shared
build_sources_headers_static
build_libraries-monolithic_threadless
build_libraries_shared
build_libraries_static
-build_sources_library level_0/account.c level_0/private-account.c level_0/capability.c level_0/color.c level_0/color-common.c level_0/console.c level_0/console-common.c level_0/control_group.c level_0/control_group-common.c level_0/conversion.c level_0/conversion-common.c level_0/private-conversion.c level_0/directory.c level_0/private-directory.c level_0/environment.c level_0/private-environment.c level_0/execute.c level_0/file.c level_0/file-common.c level_0/private-file.c level_0/fss.c level_0/private-fss.c level_0/fss-common.c level_0/fss_named.c level_0/fss_nest.c level_0/fss_set.c level_0/iki.c level_0/iki-common.c level_0/private-iki.c level_0/limit.c level_0/memory.c level_0/memory_structure.c level_0/private-memory.c level_0/path.c level_0/path-common.c level_0/private-path.c level_0/pipe.c level_0/print.c level_0/print_to.c level_0/print-common.c level_0/private-print.c level_0/private-print_to.c level_0/serialize.c level_0/serialize-common.c level_0/private-serialize.c level_0/signal.c level_0/socket.c level_0/status_string.c level_0/string.c level_0/string-common.c level_0/private-string.c level_0/string_dynamic.c level_0/string_map.c level_0/string_quantity.c level_0/string_range.c level_0/string_triple.c level_0/type_array.c level_0/private-type_array.c level_0/utf.c level_0/utf-common.c level_0/utf_dynamic.c level_0/utf_map.c level_0/utf_string.c level_0/utf_triple.c level_0/private-utf.c level_0/private-utf-is_unassigned.c level_0/private-utf_string.c level_1/console.c level_1/control_group.c level_1/conversion.c level_1/private-conversion.c level_1/directory.c level_1/private-directory.c level_1/environment.c level_1/private-fss.c level_1/fss_basic.c level_1/fss_basic_list.c level_1/fss_embedded_list.c level_1/fss_extended.c level_1/fss_extended_list.c level_1/iki.c level_1/print.c level_1/print-common.c level_1/private-print.c level_1/signal.c level_1/string.c level_1/private-string.c level_1/utf.c level_1/private-utf.c level_1/utf_file.c level_1/private-utf_file.c level_2/control_group.c level_2/error.c level_2/error-common.c level_2/private-error.c level_2/execute.c level_2/private-execute.c level_2/file.c level_2/private-file.c level_2/fss.c level_2/private-fss.c level_2/fss_basic.c level_2/fss_basic_list.c level_2/fss_embedded_list.c level_2/fss_extended.c level_2/fss_extended_list.c level_2/fss_payload.c level_2/fss_status_string.c level_2/iki.c level_2/private-iki.c level_2/path.c level_2/print.c level_2/program.c level_2/status_string.c
+build_sources_library level_0/account.c level_0/private-account.c level_0/capability.c level_0/color.c level_0/color-common.c level_0/console.c level_0/console-common.c level_0/control_group.c level_0/control_group-common.c level_0/conversion.c level_0/conversion-common.c level_0/private-conversion.c level_0/directory.c level_0/private-directory.c level_0/environment.c level_0/private-environment.c level_0/execute.c level_0/file.c level_0/file-common.c level_0/private-file.c level_0/fss.c level_0/private-fss.c level_0/fss-common.c level_0/fss_named.c level_0/fss_nest.c level_0/fss_set.c level_0/iki.c level_0/iki-common.c level_0/private-iki.c level_0/limit.c level_0/memory.c level_0/memory_structure.c level_0/private-memory.c level_0/path.c level_0/path-common.c level_0/private-path.c level_0/pipe.c level_0/print.c level_0/print_to.c level_0/print-common.c level_0/private-print.c level_0/private-print_to.c level_0/serialize.c level_0/serialize-common.c level_0/private-serialize.c level_0/signal.c level_0/socket.c level_0/status_string.c level_0/string.c level_0/string-common.c level_0/private-string.c level_0/string_dynamic.c level_0/string_map.c level_0/string_quantity.c level_0/string_range.c level_0/string_triple.c level_0/type_array.c level_0/private-type_array.c level_0/utf.c level_0/utf-common.c level_0/utf_dynamic.c level_0/utf_map.c level_0/utf_string.c level_0/utf_triple.c level_0/private-utf.c level_0/private-utf-is_unassigned.c level_0/private-utf_string.c level_1/console.c level_1/control_group.c level_1/conversion.c level_1/private-conversion.c level_1/directory.c level_1/directory-common.c level_1/private-directory.c level_1/environment.c level_1/private-fss.c level_1/fss_basic.c level_1/fss_basic_list.c level_1/fss_embedded_list.c level_1/fss_extended.c level_1/fss_extended_list.c level_1/iki.c level_1/print.c level_1/print-common.c level_1/private-print.c level_1/signal.c level_1/string.c level_1/private-string.c level_1/utf.c level_1/private-utf.c level_1/utf_file.c level_1/private-utf_file.c level_2/control_group.c level_2/error.c level_2/error-common.c level_2/private-error.c level_2/execute.c level_2/private-execute.c level_2/file.c level_2/private-file.c level_2/fss.c level_2/private-fss.c level_2/fss_basic.c level_2/fss_basic_list.c level_2/fss_embedded_list.c level_2/fss_extended.c level_2/fss_extended_list.c level_2/fss_payload.c level_2/fss_status_string.c level_2/iki.c level_2/private-iki.c level_2/path.c level_2/print.c level_2/program.c level_2/status_string.c
build_sources_library-monolithic level_0/thread.c level_0/private-thread.c
build_sources_library_shared
build_sources_library_static
build_sources_program
build_sources_program_shared
build_sources_program_static
-build_sources_headers level_0/account.h level_0/account-common.h level_0/capability.h level_0/capability-common.h level_0/color.h level_0/color-common.h level_0/console.h level_0/console-common.h level_0/control_group.h level_0/control_group-common.h level_0/conversion.h level_0/conversion-common.h level_0/directory.h level_0/directory_type.h level_0/directory-common.h level_0/environment.h level_0/environment-common.h level_0/execute.h level_0/execute-common.h level_0/file.h level_0/file-common.h level_0/fss.h level_0/fss-common.h level_0/fss_comment.h level_0/fss_delimit.h level_0/fss_named.h level_0/fss_nest.h level_0/fss_quote.h level_0/fss_set.h level_0/iki.h level_0/iki-common.h level_0/limit.h level_0/limit-common.h level_0/memory.h level_0/memory_structure.h level_0/memory-common.h level_0/path.h level_0/path-common.h level_0/pipe.h level_0/print.h level_0/print_to.h level_0/print-common.h level_0/serialize.h level_0/serialize-common.h level_0/signal.h level_0/signal-common.h level_0/socket.h level_0/socket-common.h level_0/status.h level_0/status_string.h level_0/string.h level_0/string-common.h level_0/string_dynamic.h level_0/string_map.h level_0/string_quantity.h level_0/string_range.h level_0/string_triple.h level_0/type.h level_0/type_array.h level_0/type_array-common.h level_0/utf.h level_0/utf-common.h level_0/utf_dynamic.h level_0/utf_map.h level_0/utf_string.h level_0/utf_triple.h level_1/console.h level_1/control_group.h level_1/conversion.h level_1/directory.h level_1/environment.h level_1/execute.h level_1/execute-common.h level_1/fss.h level_1/fss_basic.h level_1/fss_basic_list.h level_1/fss_embedded_list.h level_1/fss_extended.h level_1/fss_extended_list.h level_1/iki.h level_1/print.h level_1/print-common.h level_1/signal.h level_1/signal-common.h level_1/string.h level_1/utf.h level_1/utf_file.h level_2/control_group.h level_2/error.h level_2/error-common.h level_2/execute.h level_2/file.h level_2/fss.h level_2/fss_basic.h level_2/fss_basic_list.h level_2/fss_embedded_list.h level_2/fss_extended.h level_2/fss_extended_list.h level_2/fss_payload.h level_2/fss_status_string.h level_2/iki.h level_2/path.h level_2/print.h level_2/program.h level_2/status_string.h
+build_sources_headers level_0/account.h level_0/account-common.h level_0/capability.h level_0/capability-common.h level_0/color.h level_0/color-common.h level_0/console.h level_0/console-common.h level_0/control_group.h level_0/control_group-common.h level_0/conversion.h level_0/conversion-common.h level_0/directory.h level_0/directory_type.h level_0/directory-common.h level_0/environment.h level_0/environment-common.h level_0/execute.h level_0/execute-common.h level_0/file.h level_0/file-common.h level_0/fss.h level_0/fss-common.h level_0/fss_comment.h level_0/fss_delimit.h level_0/fss_named.h level_0/fss_nest.h level_0/fss_quote.h level_0/fss_set.h level_0/iki.h level_0/iki-common.h level_0/limit.h level_0/limit-common.h level_0/memory.h level_0/memory_structure.h level_0/memory-common.h level_0/path.h level_0/path-common.h level_0/pipe.h level_0/print.h level_0/print_to.h level_0/print-common.h level_0/serialize.h level_0/serialize-common.h level_0/signal.h level_0/signal-common.h level_0/socket.h level_0/socket-common.h level_0/status.h level_0/status_string.h level_0/string.h level_0/string-common.h level_0/string_dynamic.h level_0/string_map.h level_0/string_quantity.h level_0/string_range.h level_0/string_triple.h level_0/type.h level_0/type_array.h level_0/type_array-common.h level_0/utf.h level_0/utf-common.h level_0/utf_dynamic.h level_0/utf_map.h level_0/utf_string.h level_0/utf_triple.h level_1/console.h level_1/control_group.h level_1/conversion.h level_1/directory.h level_1/directory-common.h level_1/environment.h level_1/execute.h level_1/execute-common.h level_1/fss.h level_1/fss_basic.h level_1/fss_basic_list.h level_1/fss_embedded_list.h level_1/fss_extended.h level_1/fss_extended_list.h level_1/iki.h level_1/print.h level_1/print-common.h level_1/signal.h level_1/signal-common.h level_1/string.h level_1/utf.h level_1/utf_file.h level_2/control_group.h level_2/error.h level_2/error-common.h level_2/execute.h level_2/file.h level_2/fss.h level_2/fss_basic.h level_2/fss_basic_list.h level_2/fss_embedded_list.h level_2/fss_extended.h level_2/fss_extended_list.h level_2/fss_payload.h level_2/fss_status_string.h level_2/iki.h level_2/path.h level_2/print.h level_2/program.h level_2/status_string.h
build_sources_headers-monolithic level_0/thread.h level_0/thread-common.h
build_sources_headers_shared
build_sources_headers_static
#endif
#ifndef _di_f_color_strings_s_
- const f_string_static_t f_color_string_begin_s = macro_f_string_static_t_initialize2(F_color_string_begin_s, 0, F_color_string_begin_s_length);
- const f_string_static_t f_color_string_end_s = macro_f_string_static_t_initialize2(F_color_string_end_s, 0, F_color_string_end_s_length);
- const f_string_static_t f_color_string_medium_s = macro_f_string_static_t_initialize2(F_color_string_medium_s, 0, F_color_string_medium_s_length);
+ const f_string_static_t f_color_string_begin_s = macro_f_string_static_t_initialize(F_color_string_begin_s, 0, F_color_string_begin_s_length);
+ const f_string_static_t f_color_string_end_s = macro_f_string_static_t_initialize(F_color_string_end_s, 0, F_color_string_end_s_length);
+ const f_string_static_t f_color_string_medium_s = macro_f_string_static_t_initialize(F_color_string_medium_s, 0, F_color_string_medium_s_length);
- const f_string_static_t f_color_string_code_reset_s = macro_f_string_static_t_initialize2(F_color_string_code_reset_s, 0, F_color_string_code_reset_s_length);
- const f_string_static_t f_color_string_code_bold_s = macro_f_string_static_t_initialize2(F_color_string_code_bold_s, 0, F_color_string_code_bold_s_length);
- const f_string_static_t f_color_string_code_underline_s = macro_f_string_static_t_initialize2(F_color_string_code_underline_s, 0, F_color_string_code_underline_s_length);
- const f_string_static_t f_color_string_code_blink_s = macro_f_string_static_t_initialize2(F_color_string_code_blink_s, 0, F_color_string_code_blink_s_length);
- const f_string_static_t f_color_string_code_reverse_s = macro_f_string_static_t_initialize2(F_color_string_code_reverse_s, 0, F_color_string_code_reverse_s_length);
- const f_string_static_t f_color_string_code_conceal_s = macro_f_string_static_t_initialize2(F_color_string_code_conceal_s, 0, F_color_string_code_conceal_s_length);
- const f_string_static_t f_color_string_code_black_s = macro_f_string_static_t_initialize2(F_color_string_code_black_s, 0, F_color_string_code_black_s_length);
- const f_string_static_t f_color_string_code_red_s = macro_f_string_static_t_initialize2(F_color_string_code_red_s, 0, F_color_string_code_red_s_length);
- const f_string_static_t f_color_string_code_green_s = macro_f_string_static_t_initialize2(F_color_string_code_green_s, 0, F_color_string_code_green_s_length);
- const f_string_static_t f_color_string_code_yellow_s = macro_f_string_static_t_initialize2(F_color_string_code_yellow_s, 0, F_color_string_code_yellow_s_length);
- const f_string_static_t f_color_string_code_blue_s = macro_f_string_static_t_initialize2(F_color_string_code_blue_s, 0, F_color_string_code_blue_s_length);
- const f_string_static_t f_color_string_code_purple_s = macro_f_string_static_t_initialize2(F_color_string_code_purple_s, 0, F_color_string_code_purple_s_length);
- const f_string_static_t f_color_string_code_teal_s = macro_f_string_static_t_initialize2(F_color_string_code_teal_s, 0, F_color_string_code_teal_s_length);
- const f_string_static_t f_color_string_code_white_s = macro_f_string_static_t_initialize2(F_color_string_code_white_s, 0, F_color_string_code_white_s_length);
- const f_string_static_t f_color_string_code_black_bg_s = macro_f_string_static_t_initialize2(F_color_string_code_black_bg_s, 0, F_color_string_code_black_bg_s_length);
- const f_string_static_t f_color_string_code_red_bg_s = macro_f_string_static_t_initialize2(F_color_string_code_red_bg_s, 0, F_color_string_code_red_bg_s_length);
- const f_string_static_t f_color_string_code_green_bg_s = macro_f_string_static_t_initialize2(F_color_string_code_green_bg_s, 0, F_color_string_code_green_bg_s_length);
- const f_string_static_t f_color_string_code_yellow_bg_s = macro_f_string_static_t_initialize2(F_color_string_code_yellow_bg_s, 0, F_color_string_code_yellow_bg_s_length);
- const f_string_static_t f_color_string_code_blue_bg_s = macro_f_string_static_t_initialize2(F_color_string_code_blue_bg_s, 0, F_color_string_code_blue_bg_s_length);
- const f_string_static_t f_color_string_code_purple_bg_s = macro_f_string_static_t_initialize2(F_color_string_code_purple_bg_s, 0, F_color_string_code_purple_bg_s_length);
- const f_string_static_t f_color_string_code_teal_bg_s = macro_f_string_static_t_initialize2(F_color_string_code_teal_bg_s, 0, F_color_string_code_teal_bg_s_length);
- const f_string_static_t f_color_string_code_white_bg_s = macro_f_string_static_t_initialize2(F_color_string_code_white_bg_s, 0, F_color_string_code_white_bg_s_length);
- const f_string_static_t f_color_string_code_bright_black_s = macro_f_string_static_t_initialize2(F_color_string_code_bright_black_s, 0, F_color_string_code_bright_black_s_length);
- const f_string_static_t f_color_string_code_bright_red_s = macro_f_string_static_t_initialize2(F_color_string_code_bright_red_s, 0, F_color_string_code_bright_red_s_length);
- const f_string_static_t f_color_string_code_bright_green_s = macro_f_string_static_t_initialize2(F_color_string_code_bright_green_s, 0, F_color_string_code_bright_green_s_length);
- const f_string_static_t f_color_string_code_bright_yellow_s = macro_f_string_static_t_initialize2(F_color_string_code_bright_yellow_s, 0, F_color_string_code_bright_yellow_s_length);
- const f_string_static_t f_color_string_code_bright_blue_s = macro_f_string_static_t_initialize2(F_color_string_code_bright_blue_s, 0, F_color_string_code_bright_blue_s_length);
- const f_string_static_t f_color_string_code_bright_purple_s = macro_f_string_static_t_initialize2(F_color_string_code_bright_purple_s, 0, F_color_string_code_bright_purple_s_length);
- const f_string_static_t f_color_string_code_bright_teal_s = macro_f_string_static_t_initialize2(F_color_string_code_bright_teal_s, 0, F_color_string_code_bright_teal_s_length);
- const f_string_static_t f_color_string_code_bright_white_s = macro_f_string_static_t_initialize2(F_color_string_code_bright_white_s, 0, F_color_string_code_bright_white_s_length);
- const f_string_static_t f_color_string_code_bright_black_bg_s = macro_f_string_static_t_initialize2(F_color_string_code_bright_black_bg_s, 0, F_color_string_code_bright_black_bg_s_length);
- const f_string_static_t f_color_string_code_bright_red_bg_s = macro_f_string_static_t_initialize2(F_color_string_code_bright_red_bg_s, 0, F_color_string_code_bright_red_bg_s_length);
- const f_string_static_t f_color_string_code_bright_green_bg_s = macro_f_string_static_t_initialize2(F_color_string_code_bright_green_bg_s, 0, F_color_string_code_bright_green_bg_s_length);
- const f_string_static_t f_color_string_code_bright_yellow_bg_s = macro_f_string_static_t_initialize2(F_color_string_code_bright_yellow_bg_s, 0, F_color_string_code_bright_yellow_bg_s_length);
- const f_string_static_t f_color_string_code_bright_blue_bg_s = macro_f_string_static_t_initialize2(F_color_string_code_bright_blue_bg_s, 0, F_color_string_code_bright_blue_bg_s_length);
- const f_string_static_t f_color_string_code_bright_purple_bg_s = macro_f_string_static_t_initialize2(F_color_string_code_bright_purple_bg_s, 0, F_color_string_code_bright_purple_bg_s_length);
- const f_string_static_t f_color_string_code_bright_teal_bg_s = macro_f_string_static_t_initialize2(F_color_string_code_bright_teal_bg_s, 0, F_color_string_code_bright_teal_bg_s_length);
- const f_string_static_t f_color_string_code_bright_white_bg_s = macro_f_string_static_t_initialize2(F_color_string_code_bright_white_bg_s, 0, F_color_string_code_bright_white_bg_s_length);
+ const f_string_static_t f_color_string_code_reset_s = macro_f_string_static_t_initialize(F_color_string_code_reset_s, 0, F_color_string_code_reset_s_length);
+ const f_string_static_t f_color_string_code_bold_s = macro_f_string_static_t_initialize(F_color_string_code_bold_s, 0, F_color_string_code_bold_s_length);
+ const f_string_static_t f_color_string_code_underline_s = macro_f_string_static_t_initialize(F_color_string_code_underline_s, 0, F_color_string_code_underline_s_length);
+ const f_string_static_t f_color_string_code_blink_s = macro_f_string_static_t_initialize(F_color_string_code_blink_s, 0, F_color_string_code_blink_s_length);
+ const f_string_static_t f_color_string_code_reverse_s = macro_f_string_static_t_initialize(F_color_string_code_reverse_s, 0, F_color_string_code_reverse_s_length);
+ const f_string_static_t f_color_string_code_conceal_s = macro_f_string_static_t_initialize(F_color_string_code_conceal_s, 0, F_color_string_code_conceal_s_length);
+ const f_string_static_t f_color_string_code_black_s = macro_f_string_static_t_initialize(F_color_string_code_black_s, 0, F_color_string_code_black_s_length);
+ const f_string_static_t f_color_string_code_red_s = macro_f_string_static_t_initialize(F_color_string_code_red_s, 0, F_color_string_code_red_s_length);
+ const f_string_static_t f_color_string_code_green_s = macro_f_string_static_t_initialize(F_color_string_code_green_s, 0, F_color_string_code_green_s_length);
+ const f_string_static_t f_color_string_code_yellow_s = macro_f_string_static_t_initialize(F_color_string_code_yellow_s, 0, F_color_string_code_yellow_s_length);
+ const f_string_static_t f_color_string_code_blue_s = macro_f_string_static_t_initialize(F_color_string_code_blue_s, 0, F_color_string_code_blue_s_length);
+ const f_string_static_t f_color_string_code_purple_s = macro_f_string_static_t_initialize(F_color_string_code_purple_s, 0, F_color_string_code_purple_s_length);
+ const f_string_static_t f_color_string_code_teal_s = macro_f_string_static_t_initialize(F_color_string_code_teal_s, 0, F_color_string_code_teal_s_length);
+ const f_string_static_t f_color_string_code_white_s = macro_f_string_static_t_initialize(F_color_string_code_white_s, 0, F_color_string_code_white_s_length);
+ const f_string_static_t f_color_string_code_black_bg_s = macro_f_string_static_t_initialize(F_color_string_code_black_bg_s, 0, F_color_string_code_black_bg_s_length);
+ const f_string_static_t f_color_string_code_red_bg_s = macro_f_string_static_t_initialize(F_color_string_code_red_bg_s, 0, F_color_string_code_red_bg_s_length);
+ const f_string_static_t f_color_string_code_green_bg_s = macro_f_string_static_t_initialize(F_color_string_code_green_bg_s, 0, F_color_string_code_green_bg_s_length);
+ const f_string_static_t f_color_string_code_yellow_bg_s = macro_f_string_static_t_initialize(F_color_string_code_yellow_bg_s, 0, F_color_string_code_yellow_bg_s_length);
+ const f_string_static_t f_color_string_code_blue_bg_s = macro_f_string_static_t_initialize(F_color_string_code_blue_bg_s, 0, F_color_string_code_blue_bg_s_length);
+ const f_string_static_t f_color_string_code_purple_bg_s = macro_f_string_static_t_initialize(F_color_string_code_purple_bg_s, 0, F_color_string_code_purple_bg_s_length);
+ const f_string_static_t f_color_string_code_teal_bg_s = macro_f_string_static_t_initialize(F_color_string_code_teal_bg_s, 0, F_color_string_code_teal_bg_s_length);
+ const f_string_static_t f_color_string_code_white_bg_s = macro_f_string_static_t_initialize(F_color_string_code_white_bg_s, 0, F_color_string_code_white_bg_s_length);
+ const f_string_static_t f_color_string_code_bright_black_s = macro_f_string_static_t_initialize(F_color_string_code_bright_black_s, 0, F_color_string_code_bright_black_s_length);
+ const f_string_static_t f_color_string_code_bright_red_s = macro_f_string_static_t_initialize(F_color_string_code_bright_red_s, 0, F_color_string_code_bright_red_s_length);
+ const f_string_static_t f_color_string_code_bright_green_s = macro_f_string_static_t_initialize(F_color_string_code_bright_green_s, 0, F_color_string_code_bright_green_s_length);
+ const f_string_static_t f_color_string_code_bright_yellow_s = macro_f_string_static_t_initialize(F_color_string_code_bright_yellow_s, 0, F_color_string_code_bright_yellow_s_length);
+ const f_string_static_t f_color_string_code_bright_blue_s = macro_f_string_static_t_initialize(F_color_string_code_bright_blue_s, 0, F_color_string_code_bright_blue_s_length);
+ const f_string_static_t f_color_string_code_bright_purple_s = macro_f_string_static_t_initialize(F_color_string_code_bright_purple_s, 0, F_color_string_code_bright_purple_s_length);
+ const f_string_static_t f_color_string_code_bright_teal_s = macro_f_string_static_t_initialize(F_color_string_code_bright_teal_s, 0, F_color_string_code_bright_teal_s_length);
+ const f_string_static_t f_color_string_code_bright_white_s = macro_f_string_static_t_initialize(F_color_string_code_bright_white_s, 0, F_color_string_code_bright_white_s_length);
+ const f_string_static_t f_color_string_code_bright_black_bg_s = macro_f_string_static_t_initialize(F_color_string_code_bright_black_bg_s, 0, F_color_string_code_bright_black_bg_s_length);
+ const f_string_static_t f_color_string_code_bright_red_bg_s = macro_f_string_static_t_initialize(F_color_string_code_bright_red_bg_s, 0, F_color_string_code_bright_red_bg_s_length);
+ const f_string_static_t f_color_string_code_bright_green_bg_s = macro_f_string_static_t_initialize(F_color_string_code_bright_green_bg_s, 0, F_color_string_code_bright_green_bg_s_length);
+ const f_string_static_t f_color_string_code_bright_yellow_bg_s = macro_f_string_static_t_initialize(F_color_string_code_bright_yellow_bg_s, 0, F_color_string_code_bright_yellow_bg_s_length);
+ const f_string_static_t f_color_string_code_bright_blue_bg_s = macro_f_string_static_t_initialize(F_color_string_code_bright_blue_bg_s, 0, F_color_string_code_bright_blue_bg_s_length);
+ const f_string_static_t f_color_string_code_bright_purple_bg_s = macro_f_string_static_t_initialize(F_color_string_code_bright_purple_bg_s, 0, F_color_string_code_bright_purple_bg_s_length);
+ const f_string_static_t f_color_string_code_bright_teal_bg_s = macro_f_string_static_t_initialize(F_color_string_code_bright_teal_bg_s, 0, F_color_string_code_bright_teal_bg_s_length);
+ const f_string_static_t f_color_string_code_bright_white_bg_s = macro_f_string_static_t_initialize(F_color_string_code_bright_white_bg_s, 0, F_color_string_code_bright_white_bg_s_length);
#endif // _di_f_color_strings_s_
#ifndef _di_f_color_set_string_empty_s_
f_string_static_t buffer = f_string_static_t_initialize;
const f_color_format_t format = f_color_format_t_initialize;
- const f_string_static_t color = macro_f_string_static_t_initialize("color", 5);
+ const f_string_static_t color = macro_f_string_static_t_initialize2("color", 5);
{
const f_status_t status = f_color_save_1(format, color, 0);
f_color_context_t context = f_color_context_t_initialize;
f_string_dynamic_t buffer = f_string_dynamic_t_initialize;
const f_color_format_t format = f_color_format_t_initialize;
- const f_string_static_t color1 = macro_f_string_static_t_initialize("color1", 6);
+ const f_string_static_t color1 = macro_f_string_static_t_initialize2("color1", 6);
{
f_status_t status = F_none;
f_string_static_t buffer = f_string_static_t_initialize;
const f_color_format_t format = f_color_format_t_initialize;
- const f_string_static_t color = macro_f_string_static_t_initialize("color", 5);
+ const f_string_static_t color = macro_f_string_static_t_initialize2("color", 5);
{
const f_status_t status = f_color_save_2(format, color, color, 0);
f_color_context_t context = f_color_context_t_initialize;
f_string_dynamic_t buffer = f_string_dynamic_t_initialize;
const f_color_format_t format = f_color_format_t_initialize;
- const f_string_static_t color1 = macro_f_string_static_t_initialize("color1", 6);
- const f_string_static_t color2 = macro_f_string_static_t_initialize("color2", 6);
+ const f_string_static_t color1 = macro_f_string_static_t_initialize2("color1", 6);
+ const f_string_static_t color2 = macro_f_string_static_t_initialize2("color2", 6);
{
f_status_t status = F_none;
f_string_static_t buffer = f_string_static_t_initialize;
const f_color_format_t format = f_color_format_t_initialize;
- const f_string_static_t color = macro_f_string_static_t_initialize("color", 5);
+ const f_string_static_t color = macro_f_string_static_t_initialize2("color", 5);
{
const f_status_t status = f_color_save_3(format, color, color, color, 0);
f_color_context_t context = f_color_context_t_initialize;
f_string_dynamic_t buffer = f_string_dynamic_t_initialize;
const f_color_format_t format = f_color_format_t_initialize;
- const f_string_static_t color1 = macro_f_string_static_t_initialize("color1", 6);
- const f_string_static_t color2 = macro_f_string_static_t_initialize("color2", 6);
- const f_string_static_t color3 = macro_f_string_static_t_initialize("color3", 6);
+ const f_string_static_t color1 = macro_f_string_static_t_initialize2("color1", 6);
+ const f_string_static_t color2 = macro_f_string_static_t_initialize2("color2", 6);
+ const f_string_static_t color3 = macro_f_string_static_t_initialize2("color3", 6);
{
f_status_t status = F_none;
f_string_static_t buffer = f_string_static_t_initialize;
const f_color_format_t format = f_color_format_t_initialize;
- const f_string_static_t color = macro_f_string_static_t_initialize("color", 5);
+ const f_string_static_t color = macro_f_string_static_t_initialize2("color", 5);
{
const f_status_t status = f_color_save_4(format, color, color, color, color, 0);
f_color_context_t context = f_color_context_t_initialize;
f_string_dynamic_t buffer = f_string_dynamic_t_initialize;
const f_color_format_t format = f_color_format_t_initialize;
- const f_string_static_t color1 = macro_f_string_static_t_initialize("color1", 6);
- const f_string_static_t color2 = macro_f_string_static_t_initialize("color2", 6);
- const f_string_static_t color3 = macro_f_string_static_t_initialize("color3", 6);
- const f_string_static_t color4 = macro_f_string_static_t_initialize("color4", 6);
+ const f_string_static_t color1 = macro_f_string_static_t_initialize2("color1", 6);
+ const f_string_static_t color2 = macro_f_string_static_t_initialize2("color2", 6);
+ const f_string_static_t color3 = macro_f_string_static_t_initialize2("color3", 6);
+ const f_string_static_t color4 = macro_f_string_static_t_initialize2("color4", 6);
{
f_status_t status = F_none;
f_string_static_t buffer = f_string_static_t_initialize;
const f_color_format_t format = f_color_format_t_initialize;
- const f_string_static_t color = macro_f_string_static_t_initialize("color", 5);
+ const f_string_static_t color = macro_f_string_static_t_initialize2("color", 5);
{
const f_status_t status = f_color_save_5(format, color, color, color, color, color, 0);
f_color_context_t context = f_color_context_t_initialize;
f_string_dynamic_t buffer = f_string_dynamic_t_initialize;
const f_color_format_t format = f_color_format_t_initialize;
- const f_string_static_t color1 = macro_f_string_static_t_initialize("color1", 6);
- const f_string_static_t color2 = macro_f_string_static_t_initialize("color2", 6);
- const f_string_static_t color3 = macro_f_string_static_t_initialize("color3", 6);
- const f_string_static_t color4 = macro_f_string_static_t_initialize("color4", 6);
- const f_string_static_t color5 = macro_f_string_static_t_initialize("color5", 6);
+ const f_string_static_t color1 = macro_f_string_static_t_initialize2("color1", 6);
+ const f_string_static_t color2 = macro_f_string_static_t_initialize2("color2", 6);
+ const f_string_static_t color3 = macro_f_string_static_t_initialize2("color3", 6);
+ const f_string_static_t color4 = macro_f_string_static_t_initialize2("color4", 6);
+ const f_string_static_t color5 = macro_f_string_static_t_initialize2("color5", 6);
{
f_status_t status = F_none;
#endif
#ifndef _di_f_console_standard_s_
- const f_string_static_t f_console_standard_short_dark_s = macro_f_string_static_t_initialize2(F_console_standard_short_dark_s, 0, F_console_standard_short_dark_s_length);
- const f_string_static_t f_console_standard_short_debug_s = macro_f_string_static_t_initialize2(F_console_standard_short_debug_s, 0, F_console_standard_short_debug_s_length);
- const f_string_static_t f_console_standard_short_help_s = macro_f_string_static_t_initialize2(F_console_standard_short_help_s, 0, F_console_standard_short_help_s_length);
- const f_string_static_t f_console_standard_short_light_s = macro_f_string_static_t_initialize2(F_console_standard_short_light_s, 0, F_console_standard_short_light_s_length);
- const f_string_static_t f_console_standard_short_no_color_s = macro_f_string_static_t_initialize2(F_console_standard_short_no_color_s, 0, F_console_standard_short_no_color_s_length);
- const f_string_static_t f_console_standard_short_normal_s = macro_f_string_static_t_initialize2(F_console_standard_short_normal_s, 0, F_console_standard_short_normal_s_length);
- const f_string_static_t f_console_standard_short_quiet_s = macro_f_string_static_t_initialize2(F_console_standard_short_quiet_s, 0, F_console_standard_short_quiet_s_length);
- const f_string_static_t f_console_standard_short_status_in_s = macro_f_string_static_t_initialize2(F_console_standard_short_status_in_s, 0, F_console_standard_short_status_in_s_length);
- const f_string_static_t f_console_standard_short_status_out_s = macro_f_string_static_t_initialize2(F_console_standard_short_status_out_s, 0, F_console_standard_short_status_out_s_length);
- const f_string_static_t f_console_standard_short_verbose_s = macro_f_string_static_t_initialize2(F_console_standard_short_verbose_s, 0, F_console_standard_short_verbose_s_length);
- const f_string_static_t f_console_standard_short_version_s = macro_f_string_static_t_initialize2(F_console_standard_short_version_s, 0, F_console_standard_short_version_s_length);
-
- const f_string_static_t f_console_standard_long_dark_s = macro_f_string_static_t_initialize2(F_console_standard_long_dark_s, 0, F_console_standard_long_dark_s_length);
- const f_string_static_t f_console_standard_long_debug_s = macro_f_string_static_t_initialize2(F_console_standard_long_debug_s, 0, F_console_standard_long_debug_s_length);
- const f_string_static_t f_console_standard_long_help_s = macro_f_string_static_t_initialize2(F_console_standard_long_help_s, 0, F_console_standard_long_help_s_length);
- const f_string_static_t f_console_standard_long_light_s = macro_f_string_static_t_initialize2(F_console_standard_long_light_s, 0, F_console_standard_long_light_s_length);
- const f_string_static_t f_console_standard_long_no_color_s = macro_f_string_static_t_initialize2(F_console_standard_long_no_color_s, 0, F_console_standard_long_no_color_s_length);
- const f_string_static_t f_console_standard_long_normal_s = macro_f_string_static_t_initialize2(F_console_standard_long_normal_s, 0, F_console_standard_long_normal_s_length);
- const f_string_static_t f_console_standard_long_quiet_s = macro_f_string_static_t_initialize2(F_console_standard_long_quiet_s, 0, F_console_standard_long_quiet_s_length);
- const f_string_static_t f_console_standard_long_status_in_s = macro_f_string_static_t_initialize2(F_console_standard_long_status_in_s, 0, F_console_standard_long_status_in_s_length);
- const f_string_static_t f_console_standard_long_status_out_s = macro_f_string_static_t_initialize2(F_console_standard_long_status_out_s, 0, F_console_standard_long_status_out_s_length);
- const f_string_static_t f_console_standard_long_verbose_s = macro_f_string_static_t_initialize2(F_console_standard_long_verbose_s, 0, F_console_standard_long_verbose_s_length);
- const f_string_static_t f_console_standard_long_version_s = macro_f_string_static_t_initialize2(F_console_standard_long_version_s, 0, F_console_standard_long_version_s_length);
+ const f_string_static_t f_console_standard_short_dark_s = macro_f_string_static_t_initialize(F_console_standard_short_dark_s, 0, F_console_standard_short_dark_s_length);
+ const f_string_static_t f_console_standard_short_debug_s = macro_f_string_static_t_initialize(F_console_standard_short_debug_s, 0, F_console_standard_short_debug_s_length);
+ const f_string_static_t f_console_standard_short_help_s = macro_f_string_static_t_initialize(F_console_standard_short_help_s, 0, F_console_standard_short_help_s_length);
+ const f_string_static_t f_console_standard_short_light_s = macro_f_string_static_t_initialize(F_console_standard_short_light_s, 0, F_console_standard_short_light_s_length);
+ const f_string_static_t f_console_standard_short_no_color_s = macro_f_string_static_t_initialize(F_console_standard_short_no_color_s, 0, F_console_standard_short_no_color_s_length);
+ const f_string_static_t f_console_standard_short_normal_s = macro_f_string_static_t_initialize(F_console_standard_short_normal_s, 0, F_console_standard_short_normal_s_length);
+ const f_string_static_t f_console_standard_short_quiet_s = macro_f_string_static_t_initialize(F_console_standard_short_quiet_s, 0, F_console_standard_short_quiet_s_length);
+ const f_string_static_t f_console_standard_short_status_in_s = macro_f_string_static_t_initialize(F_console_standard_short_status_in_s, 0, F_console_standard_short_status_in_s_length);
+ const f_string_static_t f_console_standard_short_status_out_s = macro_f_string_static_t_initialize(F_console_standard_short_status_out_s, 0, F_console_standard_short_status_out_s_length);
+ const f_string_static_t f_console_standard_short_verbose_s = macro_f_string_static_t_initialize(F_console_standard_short_verbose_s, 0, F_console_standard_short_verbose_s_length);
+ const f_string_static_t f_console_standard_short_version_s = macro_f_string_static_t_initialize(F_console_standard_short_version_s, 0, F_console_standard_short_version_s_length);
+
+ const f_string_static_t f_console_standard_long_dark_s = macro_f_string_static_t_initialize(F_console_standard_long_dark_s, 0, F_console_standard_long_dark_s_length);
+ const f_string_static_t f_console_standard_long_debug_s = macro_f_string_static_t_initialize(F_console_standard_long_debug_s, 0, F_console_standard_long_debug_s_length);
+ const f_string_static_t f_console_standard_long_help_s = macro_f_string_static_t_initialize(F_console_standard_long_help_s, 0, F_console_standard_long_help_s_length);
+ const f_string_static_t f_console_standard_long_light_s = macro_f_string_static_t_initialize(F_console_standard_long_light_s, 0, F_console_standard_long_light_s_length);
+ const f_string_static_t f_console_standard_long_no_color_s = macro_f_string_static_t_initialize(F_console_standard_long_no_color_s, 0, F_console_standard_long_no_color_s_length);
+ const f_string_static_t f_console_standard_long_normal_s = macro_f_string_static_t_initialize(F_console_standard_long_normal_s, 0, F_console_standard_long_normal_s_length);
+ const f_string_static_t f_console_standard_long_quiet_s = macro_f_string_static_t_initialize(F_console_standard_long_quiet_s, 0, F_console_standard_long_quiet_s_length);
+ const f_string_static_t f_console_standard_long_status_in_s = macro_f_string_static_t_initialize(F_console_standard_long_status_in_s, 0, F_console_standard_long_status_in_s_length);
+ const f_string_static_t f_console_standard_long_status_out_s = macro_f_string_static_t_initialize(F_console_standard_long_status_out_s, 0, F_console_standard_long_status_out_s_length);
+ const f_string_static_t f_console_standard_long_verbose_s = macro_f_string_static_t_initialize(F_console_standard_long_verbose_s, 0, F_console_standard_long_verbose_s_length);
+ const f_string_static_t f_console_standard_long_version_s = macro_f_string_static_t_initialize(F_console_standard_long_version_s, 0, F_console_standard_long_version_s_length);
#endif // _di_f_console_standard_s_
#ifndef _di_f_console_symbol_s_
- const f_string_static_t f_console_symbol_short_enable_s = macro_f_string_static_t_initialize2(F_console_symbol_short_enable_s, 0, F_console_symbol_short_enable_s_length);
- const f_string_static_t f_console_symbol_short_disable_s = macro_f_string_static_t_initialize2(F_console_symbol_short_disable_s, 0, F_console_symbol_short_disable_s_length);
+ const f_string_static_t f_console_symbol_short_enable_s = macro_f_string_static_t_initialize(F_console_symbol_short_enable_s, 0, F_console_symbol_short_enable_s_length);
+ const f_string_static_t f_console_symbol_short_disable_s = macro_f_string_static_t_initialize(F_console_symbol_short_disable_s, 0, F_console_symbol_short_disable_s_length);
- const f_string_static_t f_console_symbol_long_enable_s = macro_f_string_static_t_initialize2(F_console_symbol_long_enable_s, 0, F_console_symbol_long_enable_s_length);
- const f_string_static_t f_console_symbol_long_disable_s = macro_f_string_static_t_initialize2(F_console_symbol_long_disable_s, 0, F_console_symbol_long_disable_s_length);
+ const f_string_static_t f_console_symbol_long_enable_s = macro_f_string_static_t_initialize(F_console_symbol_long_enable_s, 0, F_console_symbol_long_enable_s_length);
+ const f_string_static_t f_console_symbol_long_disable_s = macro_f_string_static_t_initialize(F_console_symbol_long_disable_s, 0, F_console_symbol_long_disable_s_length);
#endif // _di_f_console_symbol_s_
+#ifndef _di_f_console_parameters_delete_
+ f_status_t f_console_parameters_delete(f_console_parameters_t * const parameters) {
+ #ifndef _di_level_0_parameters_checking_
+ if (!parameters) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameters_checking_
+
+ f_status_t status = F_none;
+
+ for (f_array_length_t i = 0; i < parameters->used; ++i) {
+
+ status = f_type_array_lengths_resize(0, ¶meters->array[i].locations);
+ if (F_status_is_error(status)) return status;
+
+ status = f_type_array_lengths_resize(0, ¶meters->array[i].locations_sub);
+ if (F_status_is_error(status)) return status;
+
+ status = f_type_array_lengths_resize(0, ¶meters->array[i].values);
+ if (F_status_is_error(status)) return status;
+ } // for
+
+ return f_string_dynamics_resize(0, ¶meters->arguments);
+ }
+#endif // _di_f_console_parameters_delete_
+
+#ifndef _di_f_console_parameters_destroy_
+ f_status_t f_console_parameters_destroy(f_console_parameters_t * const parameters) {
+ #ifndef _di_level_0_parameters_checking_
+ if (!parameters) return F_status_set_error(F_parameter);
+ #endif // _di_level_0_parameters_checking_
+
+ f_status_t status = F_none;
+
+ for (f_array_length_t i = 0; i < parameters->used; ++i) {
+
+ status = f_type_array_lengths_adjust(0, ¶meters->array[i].locations);
+ if (F_status_is_error(status)) return status;
+
+ status = f_type_array_lengths_adjust(0, ¶meters->array[i].locations_sub);
+ if (F_status_is_error(status)) return status;
+
+ status = f_type_array_lengths_adjust(0, ¶meters->array[i].values);
+ if (F_status_is_error(status)) return status;
+ } // for
+
+ return f_string_dynamics_adjust(0, ¶meters->arguments);
+ }
+#endif // _di_f_console_parameters_destroy_
+
#ifdef __cplusplus
} // extern "C"
#endif
location_sub, \
locations, \
locations_sub, \
- values \
+ values, \
}
#endif // _di_f_console_parameter_t_
*
* Designed for passing this to a function as a single argument.
*
- * parameter: Intended to be populated with an array of f_console_parameter_id_t whose size is defined by the "used" property.
- * This is not intended to be dynamically allocated, so there is no "size" property.
+ * This is not intended to be dynamically allocated, so there is no "size" property.
+ *
+ * array: Intended to be populated with an array of f_console_parameter_t whose size is defined by the "used" property.
+ * arguments: An array of arguments pointing to the argv[] strings with the string lengths already calculated (This is a dynamic array of f_string_static_t).
* length: The total number of parameters in the parameters array.
*/
#ifndef _di_f_console_parameters_t_
typedef struct {
- f_console_parameter_t *parameter;
+ f_console_parameter_t *array;
+
+ f_string_dynamics_t arguments;
f_array_length_t used;
} f_console_parameters_t;
- #define f_console_parameters_t_initialize { 0, 0 }
-
- #define macro_f_console_parameters_t_initialize(parameters, length) { parameters, length }
+ #define f_console_parameters_t_initialize {0, f_string_dynamics_t_initialize, 0 }
#endif // _di_f_console_parameters_t_
/**
#define macro_f_console_arguments_t_initialize(argc, argv) { argc, argv }
#endif // _di_f_console_arguments_t_
+/**
+ * Delete any dynamic allocated data on the parameters object.
+ *
+ * @param parameters
+ * The parameters object.
+ *
+ * @return
+ * F_none on success.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_string_dynamics_resize().
+ * Errors (with error bit) from: f_type_array_lengths_resize().
+ *
+ * @see f_string_dynamics_resize()
+ * @see f_type_array_lengths_resize()
+ */
+#ifndef _di_f_console_parameters_delete_
+ extern f_status_t f_console_parameters_delete(f_console_parameters_t * const parameters);
+#endif // _di_f_console_parameters_delete_
+
+/**
+ * Destroy any dynamic allocated data on the parameters object.
+ *
+ * @param parameters
+ * The parameters object.
+ *
+ * @return
+ * F_none on success.
+ *
+ * F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_string_dynamics_adjust().
+ * Errors (with error bit) from: f_type_array_lengths_adjust().
+ *
+ * @see f_string_dynamics_adjust()
+ * @see f_type_array_lengths_adjust()
+ */
+#ifndef _di_f_console_parameters_destroy_
+ extern f_status_t f_console_parameters_destroy(f_console_parameters_t * const parameters);
+#endif // _di_f_console_parameters_destroy_
+
#ifdef __cplusplus
} // extern "C"
#endif
return F_status_set_error(F_parameter);
}
- if (parameters.parameter[choices.id[i]].result == f_console_result_found_e) {
- if (!location || parameters.parameter[choices.id[i]].location < location) {
- location = parameters.parameter[choices.id[i]].location;
- location_sub = parameters.parameter[choices.id[i]].location_sub;
+ if (parameters.array[choices.id[i]].result == f_console_result_found_e) {
+ if (!location || parameters.array[choices.id[i]].location < location) {
+ location = parameters.array[choices.id[i]].location;
+ location_sub = parameters.array[choices.id[i]].location_sub;
priority = choices.id[i];
}
- else if (parameters.parameter[choices.id[i]].location == location && parameters.parameter[choices.id[i]].location_sub < location_sub) {
- location_sub = parameters.parameter[choices.id[i]].location_sub;
+ else if (parameters.array[choices.id[i]].location == location && parameters.array[choices.id[i]].location_sub < location_sub) {
+ location_sub = parameters.array[choices.id[i]].location_sub;
priority = choices.id[i];
}
}
return F_status_set_error(F_parameter);
}
- if (parameters.parameter[choices.id[i]].result == f_console_result_found_e) {
- if (!location || parameters.parameter[choices.id[i]].location > location) {
- location = parameters.parameter[choices.id[i]].location;
- location_sub = parameters.parameter[choices.id[i]].location_sub;
+ if (parameters.array[choices.id[i]].result == f_console_result_found_e) {
+ if (!location || parameters.array[choices.id[i]].location > location) {
+ location = parameters.array[choices.id[i]].location;
+ location_sub = parameters.array[choices.id[i]].location_sub;
priority = choices.id[i];
}
- else if (parameters.parameter[choices.id[i]].location == location && parameters.parameter[choices.id[i]].location_sub > location_sub) {
- location_sub = parameters.parameter[choices.id[i]].location_sub;
+ else if (parameters.array[choices.id[i]].location == location && parameters.array[choices.id[i]].location_sub > location_sub) {
+ location_sub = parameters.array[choices.id[i]].location_sub;
priority = choices.id[i];
}
}
#endif // _di_f_console_parameter_prioritize_right_
#ifndef _di_f_console_parameter_process_
- f_status_t f_console_parameter_process(const f_console_arguments_t arguments, f_console_parameters_t parameters, f_array_lengths_t *remaining) {
+ f_status_t f_console_parameter_process(const f_console_arguments_t arguments, f_console_parameters_t * const parameters, f_array_lengths_t *remaining) {
#ifndef _di_level_0_parameter_checking_
if (!remaining) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
f_status_t status = F_none;
+
+ parameters->arguments.used = 0;
+
+ if (arguments.argc) {
+ status = f_string_dynamics_increase_by(arguments.argc, ¶meters->arguments);
+ if (F_status_is_error(status)) return status;
+ }
+
+ // Append the program name parameter.
+ parameters->arguments.array[parameters->arguments.used].string = arguments.argv[0];
+ parameters->arguments.array[parameters->arguments.used].used = strnlen(arguments.argv[0], F_console_parameter_size_d);
+ parameters->arguments.array[parameters->arguments.used++].size = 0;
+
f_console_id_t result = 0;
bool found = F_false;
f_array_length_t sub_location = 0;
f_array_length_t increment_by = 0;
- f_array_length_t argument_length = 0;
f_array_length_t i = 0;
f_array_length_t values = 0;
while (location < arguments.argc) {
+ parameters->arguments.array[parameters->arguments.used].string = arguments.argv[location];
+ parameters->arguments.array[parameters->arguments.used].used = strnlen(arguments.argv[location], F_console_parameter_size_d);
+ parameters->arguments.array[parameters->arguments.used++].size = 0;
+
// Additional parameters must always follow what requests them.
if (needs_value.used > 0) {
i = needs_value.array[0];
- status = f_type_array_lengths_increase(F_memory_default_allocation_small_d, ¶meters.parameter[i].values);
+ status = f_type_array_lengths_increase(F_memory_default_allocation_small_d, ¶meters->array[i].values);
+ if (F_status_is_error(status)) break;
- if (F_status_is_error(status)) {
- f_type_array_lengths_resize(0, &needs_value);
-
- return status;
- }
-
- parameters.parameter[i].result = f_console_result_additional_e;
- parameters.parameter[i].values.array[parameters.parameter[i].values.used++] = location;
+ parameters->array[i].result = f_console_result_additional_e;
+ parameters->array[i].values.array[parameters->array[i].values.used++] = location;
--needs_value.used;
f_console_identify(arguments.argv[location], &result);
- argument_length = strnlen(arguments.argv[location], F_console_parameter_size_d);
-
// Process the current parameter.
if (result == f_console_short_enable_e || result == f_console_short_disable_e) {
increment_by = 1;
sub_location = 1;
}
else if (result == f_console_long_enable_e || result == f_console_long_disable_e) {
- increment_by = argument_length;
+ increment_by = parameters->arguments.array[location].used;
sub_location = 2;
}
else {
- increment_by = argument_length;
+ increment_by = parameters->arguments.array[location].used;
sub_location = 0;
}
if (console_short != f_console_none_e) {
// The sub_location is used on a per increment basis (such as 'tar -xcf', the '-' would have an increment of 1, therefore x, c, and f would all be three separate parameters).
- while (sub_location < argument_length) {
+ while (sub_location < parameters->arguments.array[location].used) {
- for (i = 0; i < parameters.used; ++i) {
+ for (i = 0; i < parameters->used; ++i) {
- if (parameters.parameter[i].type != console_type) continue;
+ if (parameters->array[i].type != console_type) continue;
if (result == console_short) {
- if (!parameters.parameter[i].symbol_short) continue;
+ if (!parameters->array[i].symbol_short) continue;
width = macro_f_utf_byte_width_is(arguments.argv[location][sub_location]);
increment_by = width;
}
- if (arguments.argv[location][sub_location] != *parameters.parameter[i].symbol_short) continue;
+ if (arguments.argv[location][sub_location] != *parameters->array[i].symbol_short) continue;
if (width > 0) {
f_utf_character_t character_argument_utf = 0;
f_utf_character_t character_console_utf = 0;
- f_number_unsigned_t width_max = argument_length - sub_location;
+ f_number_unsigned_t width_max = parameters->arguments.array[location].used - sub_location;
status = f_utf_char_to_character(arguments.argv[location] + sub_location, width_max, &character_argument_utf);
+ if (F_status_is_error(status)) break;
- if (F_status_is_error(status)) {
- f_type_array_lengths_resize(0, &needs_value);
-
- return status;
- }
+ width_max = strlen(parameters->array[i].symbol_short);
- width_max = strlen(parameters.parameter[i].symbol_short);
-
- status = f_utf_char_to_character((f_string_t) parameters.parameter[i].symbol_short, width_max, &character_console_utf);
-
- if (F_status_is_error(status)) {
- f_type_array_lengths_resize(0, &needs_value);
-
- return status;
- }
+ status = f_utf_char_to_character((f_string_t) parameters->array[i].symbol_short, width_max, &character_console_utf);
+ if (F_status_is_error(status)) break;
if (character_argument_utf != character_console_utf) continue;
}
}
else if (result == console_long) {
- if (!parameters.parameter[i].symbol_long) continue;
+ if (!parameters->array[i].symbol_long) continue;
- if (strncmp(&arguments.argv[location][sub_location], parameters.parameter[i].symbol_long, increment_by + 1) != 0) {
+ if (strncmp(&arguments.argv[location][sub_location], parameters->array[i].symbol_long, increment_by + 1) != 0) {
continue;
}
}
continue;
}
- status = f_type_array_lengths_increase(F_memory_default_allocation_small_d, ¶meters.parameter[i].locations);
-
- if (F_status_is_error(status)) {
- f_type_array_lengths_resize(0, &needs_value);
-
- return status;
- }
+ status = f_type_array_lengths_increase(F_memory_default_allocation_small_d, ¶meters->array[i].locations);
+ if (F_status_is_error(status)) break;
- status = f_type_array_lengths_increase(F_memory_default_allocation_small_d, ¶meters.parameter[i].locations_sub);
-
- if (F_status_is_error(status)) {
- f_type_array_lengths_resize(0, &needs_value);
-
- return status;
- }
+ status = f_type_array_lengths_increase(F_memory_default_allocation_small_d, ¶meters->array[i].locations_sub);
+ if (F_status_is_error(status)) break;
found = F_true;
- parameters.parameter[i].locations.array[parameters.parameter[i].locations.used++] = location;
+ parameters->array[i].locations.array[parameters->array[i].locations.used++] = location;
- parameters.parameter[i].result = f_console_result_found_e;
- parameters.parameter[i].location = location;
- parameters.parameter[i].location_sub = 0;
+ parameters->array[i].result = f_console_result_found_e;
+ parameters->array[i].location = location;
+ parameters->array[i].location_sub = 0;
if (result == console_short) {
- parameters.parameter[i].location_sub = sub_location;
- parameters.parameter[i].locations_sub.array[parameters.parameter[i].locations_sub.used++] = sub_location;
+ parameters->array[i].location_sub = sub_location;
+ parameters->array[i].locations_sub.array[parameters->array[i].locations_sub.used++] = sub_location;
}
else {
- parameters.parameter[i].locations_sub.array[parameters.parameter[i].locations_sub.used++] = 0;
+ parameters->array[i].locations_sub.array[parameters->array[i].locations_sub.used++] = 0;
}
- if (parameters.parameter[i].values_total) {
- if (needs_value.used + parameters.parameter[i].values_total > needs_value.size) {
- status = f_type_array_lengths_resize(needs_value.used + parameters.parameter[i].values_total, &needs_value);
-
- if (F_status_is_error(status)) {
- f_type_array_lengths_resize(0, &needs_value);
-
- return status;
- }
+ if (parameters->array[i].values_total) {
+ if (needs_value.used + parameters->array[i].values_total > needs_value.size) {
+ status = f_type_array_lengths_resize(needs_value.used + parameters->array[i].values_total, &needs_value);
+ if (F_status_is_error(status)) break;
}
- for (values = 0; values < parameters.parameter[i].values_total; ++values) {
+ for (values = 0; values < parameters->array[i].values_total; ++values) {
needs_value.array[needs_value.used++] = i;
} // for
}
break;
} // for
+ if (F_status_is_error(status)) break;
+
sub_location += increment_by;
} // while
+
+ if (F_status_is_error(status)) break;
}
else {
- for (i = 0; i < parameters.used; ++i) {
-
- if (parameters.parameter[i].type != f_console_type_other_e) continue;
+ for (i = 0; i < parameters->used; ++i) {
- if (!parameters.parameter[i].symbol_other) continue;
+ if (parameters->array[i].type != f_console_type_other_e) continue;
- if (strncmp(arguments.argv[location], parameters.parameter[i].symbol_other, argument_length + 1) != 0) continue;
+ if (!parameters->array[i].symbol_other) continue;
- status = f_type_array_lengths_increase(F_memory_default_allocation_small_d, ¶meters.parameter[i].locations);
+ if (strncmp(arguments.argv[location], parameters->array[i].symbol_other, parameters->arguments.array[location].used + 1) != 0) continue;
- if (F_status_is_error(status)) {
- f_type_array_lengths_resize(0, &needs_value);
+ status = f_type_array_lengths_increase(F_memory_default_allocation_small_d, ¶meters->array[i].locations);
+ if (F_status_is_error(status)) break;
- return status;
- }
-
- status = f_type_array_lengths_increase(F_memory_default_allocation_small_d, ¶meters.parameter[i].locations_sub);
+ status = f_type_array_lengths_increase(F_memory_default_allocation_small_d, ¶meters->array[i].locations_sub);
+ if (F_status_is_error(status)) break;
- if (F_status_is_error(status)) {
- f_type_array_lengths_resize(0, &needs_value);
+ parameters->array[i].locations.array[parameters->array[i].locations.used++] = location;
+ parameters->array[i].locations_sub.array[parameters->array[i].locations_sub.used++] = 0;
- return status;
- }
+ parameters->array[i].result = f_console_result_found_e;
+ parameters->array[i].location = location;
+ parameters->array[i].location_sub = 0;
- parameters.parameter[i].locations.array[parameters.parameter[i].locations.used++] = location;
- parameters.parameter[i].locations_sub.array[parameters.parameter[i].locations_sub.used++] = 0;
-
- parameters.parameter[i].result = f_console_result_found_e;
- parameters.parameter[i].location = location;
- parameters.parameter[i].location_sub = 0;
-
- if (parameters.parameter[i].values_total) {
- if (needs_value.used + parameters.parameter[i].values_total > needs_value.size) {
- status = f_type_array_lengths_resize(needs_value.used + parameters.parameter[i].values_total, &needs_value);
-
- if (F_status_is_error(status)) {
- f_type_array_lengths_resize(0, &needs_value);
-
- return status;
- }
+ if (parameters->array[i].values_total) {
+ if (needs_value.used + parameters->array[i].values_total > needs_value.size) {
+ status = f_type_array_lengths_resize(needs_value.used + parameters->array[i].values_total, &needs_value);
+ if (F_status_is_error(status)) break;
}
- for (values = 0; values < parameters.parameter[i].values_total; ++values) {
+ for (values = 0; values < parameters->array[i].values_total; ++values) {
needs_value.array[needs_value.used++] = i;
} // for
}
break;
} // for
+
+ if (F_status_is_error(status)) break;
}
if (!found) {
- // Populate list of remaining parameters.parameter that are not associated with anything.
+ // Populate list of remaining parameters->array that are not associated with anything.
if (remaining->used == remaining->size) {
status = f_type_array_lengths_increase(F_memory_default_allocation_small_d, remaining);
-
- if (F_status_is_error(status)) {
- f_type_array_lengths_resize(0, &needs_value);
-
- return status;
- }
+ if (F_status_is_error(status)) break;
}
remaining->array[remaining->used++] = location;
++location;
} // while
+ // Make sure the entire parameters arguments array is populated.
+ for (; location < arguments.argc; ++location) {
+
+ parameters->arguments.array[parameters->arguments.used].string = arguments.argv[location];
+ parameters->arguments.array[parameters->arguments.used].used = strnlen(arguments.argv[location], F_console_parameter_size_d);
+ parameters->arguments.array[parameters->arguments.used++].size = 0;
+ } // for
+
+ if (F_status_is_error(status)) {
+ f_type_array_lengths_resize(0, &needs_value);
+
+ return status;
+ }
+
if (needs_value.used > 0) {
status = F_data_not;
}
* The parameters passed to the process.
* @param parameters
* The console parameters to look for.
- * This will be updated by this function with the results.
* @param remaining
* A list of remaining parameters not associated with anything.
*
* F_failure (with error bit) if width is not long enough to convert when processing arguments as UTF-8.
* F_parameter (with error bit) if a parameter is invalid.
* F_utf (with error bit) if character is an invalid UTF-8 character, when processing arguments.
+ *
+ * Errors (with error bit) from: f_string_dynamics_increase_by().
+ *
+ * @see f_string_dynamics_increase_by()
*/
#ifndef _di_f_console_parameter_process_
- extern f_status_t f_console_parameter_process(const f_console_arguments_t arguments, f_console_parameters_t parameters, f_array_lengths_t *remaining);
+ extern f_status_t f_console_parameter_process(const f_console_arguments_t arguments, f_console_parameters_t * const parameters, f_array_lengths_t *remaining);
#endif // _di_f_console_parameter_process_
#ifdef __cplusplus
#endif
#ifndef _di_f_control_group_defines_
- const f_string_static_t f_control_group_path_system_default_s = macro_f_string_static_t_initialize2(F_control_group_path_system_default_s, 0, F_control_group_path_system_default_s_length);
- const f_string_static_t f_control_group_path_system_prefix_s = macro_f_string_static_t_initialize2(F_control_group_path_system_prefix_s, 0, F_control_group_path_system_prefix_s_length);
- const f_string_static_t f_control_group_path_system_suffix_s = macro_f_string_static_t_initialize2(F_control_group_path_system_suffix_s, 0, F_control_group_path_system_suffix_s_length);
+ const f_string_static_t f_control_group_path_system_default_s = macro_f_string_static_t_initialize(F_control_group_path_system_default_s, 0, F_control_group_path_system_default_s_length);
+ const f_string_static_t f_control_group_path_system_prefix_s = macro_f_string_static_t_initialize(F_control_group_path_system_prefix_s, 0, F_control_group_path_system_prefix_s_length);
+ const f_string_static_t f_control_group_path_system_suffix_s = macro_f_string_static_t_initialize(F_control_group_path_system_suffix_s, 0, F_control_group_path_system_suffix_s_length);
#endif // _di_f_control_group_defines_
#ifdef __cplusplus
#endif
#ifndef _di_f_directory_create_
- f_status_t f_directory_create(const f_string_t path, const mode_t mode) {
+ f_status_t f_directory_create(const f_string_static_t path, const mode_t mode) {
+
+ if (!path.used) {
+ return F_data_not;
+ }
return private_f_directory_create(path, mode);
}
#endif // _di_f_directory_create_
#ifndef _di_f_directory_create_at_
- f_status_t f_directory_create_at(const int at_id, const f_string_t path, const mode_t mode) {
+ f_status_t f_directory_create_at(const int at_id, const f_string_static_t path, const mode_t mode) {
#ifndef _di_level_0_parameter_checking_
if (at_id <= 0) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!path.used) {
+ return F_data_not;
+ }
+
return private_f_directory_create_at(at_id, path, mode);
}
#endif // _di_f_directory_create_at_
#ifndef _di_f_directory_exists_
- f_status_t f_directory_exists(const f_string_t path) {
+ f_status_t f_directory_exists(const f_string_static_t path) {
+
+ if (!path.used) {
+ return F_data_not;
+ }
struct stat file_stat;
memset(&file_stat, 0, sizeof(struct stat));
- if (stat(path, &file_stat) < 0) {
+ if (stat(path.string, &file_stat) < 0) {
if (errno == EACCES) return F_status_set_error(F_access_denied);
if (errno == EFAULT) return F_status_set_error(F_buffer);
if (errno == ELOOP) return F_status_set_error(F_loop);
#endif // _di_f_directory_exists_
#ifndef _di_f_directory_exists_at_
- f_status_t f_directory_exists_at(const int at_id, const f_string_t path, const int flag) {
+ f_status_t f_directory_exists_at(const int at_id, const f_string_static_t path, const int flag) {
+
+ if (!path.used) {
+ return F_data_not;
+ }
struct stat file_stat;
memset(&file_stat, 0, sizeof(struct stat));
- if (fstatat(at_id, path, &file_stat, flag) < 0) {
+ if (fstatat(at_id, path.string, &file_stat, flag) < 0) {
if (errno == EACCES) return F_status_set_error(F_access_denied);
if (errno == EBADF) return F_status_set_error(F_directory_descriptor);
if (errno == EFAULT) return F_status_set_error(F_buffer);
#endif // _di_f_directory_exists_at_
#ifndef _di_f_directory_is_
- f_status_t f_directory_is(const f_string_t path) {
+ f_status_t f_directory_is(const f_string_static_t path) {
+
+ if (!path.used) {
+ return F_data_not;
+ }
struct stat file_stat;
memset(&file_stat, AT_SYMLINK_NOFOLLOW, sizeof(struct stat));
- if (stat(path, &file_stat) < 0) {
+ if (stat(path.string, &file_stat) < 0) {
if (errno == EACCES) return F_status_set_error(F_access_denied);
if (errno == EFAULT) return F_status_set_error(F_buffer);
if (errno == ENAMETOOLONG) return F_status_set_error(F_name);
#endif // _di_f_directory_is_
#ifndef _di_f_directory_is_at_
- f_status_t f_directory_is_at(const int at_id, const f_string_t path, const int flag) {
+ f_status_t f_directory_is_at(const int at_id, const f_string_static_t path, const int flag) {
+
+ if (!path.used) {
+ return F_data_not;
+ }
struct stat file_stat;
memset(&file_stat, 0, sizeof(struct stat));
- if (fstatat(at_id, path, &file_stat, flag) < 0) {
+ if (fstatat(at_id, path.string, &file_stat, flag) < 0) {
if (errno == EACCES) return F_status_set_error(F_access_denied);
if (errno == EBADF) return F_status_set_error(F_directory_descriptor);
if (errno == EFAULT) return F_status_set_error(F_buffer);
#endif // _di_f_directory_is_at_
#ifndef _di_f_directory_list_
- f_status_t f_directory_list(const f_string_t path, int (*filter)(const struct dirent *), int (*sort)(const struct dirent **, const struct dirent **), f_string_dynamics_t *names) {
+ f_status_t f_directory_list(const f_string_static_t path, int (*filter)(const struct dirent *), int (*sort)(const struct dirent **, const struct dirent **), f_string_dynamics_t *names) {
#ifndef _di_level_0_parameter_checking_
if (!names) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!path.used) {
+ return F_data_not;
+ }
+
struct dirent **listing = 0;
size_t i = 0;
f_array_length_t size = 0;
f_status_t status = F_none;
- const size_t length = scandir(path, &listing, filter, sort);
+ const size_t length = scandir(path.string, &listing, filter, sort);
if (length == -1) {
if (errno == ENOMEM) return F_status_set_error(F_memory_not);
if (F_status_is_error(status)) break;
}
- macro_f_string_dynamic_t_clear(names->array[names->used])
- macro_f_string_dynamic_t_resize(status, names->array[names->used], size);
+ names->array[names->used].used = 0;
+
+ status = f_string_dynamic_increase_by(size, &names->array[names->used]);
if (F_status_is_error(status)) break;
memcpy(names->array[names->used].string, listing[i]->d_name, size);
}
if (!length) {
- return F_data_not;
+ return F_directory_empty;
}
return F_none;
#endif // _di_f_directory_list_
#ifndef _di_f_directory_open_
- f_status_t f_directory_open(const f_string_t path, const bool dereference, int *id) {
+ f_status_t f_directory_open(const f_string_static_t path, const bool dereference, int *id) {
#ifndef _di_level_0_parameter_checking_
if (!id) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!path.used) {
+ return F_data_not;
+ }
+
int flag = F_directory_flag_directory_d | F_directory_flag_close_execute_d | F_directory_flag_path_d;
if (dereference) {
flag |= F_directory_flag_no_follow_d;
}
- *id = open(path, flag);
+ *id = open(path.string, flag);
if (*id < 0) {
if (errno == EACCES) return F_status_set_error(F_access_denied);
#endif // _di_f_directory_open_
#ifndef _di_f_directory_open_at_
- f_status_t f_directory_open_at(const int at_id, const f_string_t path, const bool dereference, int *id) {
+ f_status_t f_directory_open_at(const int at_id, const f_string_static_t path, const bool dereference, int *id) {
#ifndef _di_level_0_parameter_checking_
if (at_id <= 0) return F_status_set_error(F_parameter);
if (!id) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!path.used) {
+ return F_data_not;
+ }
+
int flag = F_directory_flag_directory_d | F_directory_flag_close_execute_d | F_directory_flag_path_d;
if (dereference) {
flag |= F_directory_flag_no_follow_d;
}
- *id = openat(at_id, path, flag);
+ *id = openat(at_id, path.string, flag);
if (*id < 0) {
if (errno == EACCES) return F_status_set_error(F_access_denied);
#endif // _di_f_directory_open_at_
#ifndef _di_f_directory_remove_
- f_status_t f_directory_remove(const f_string_t path, const int depth_max, const bool preserve) {
+ f_status_t f_directory_remove(const f_string_static_t path, const int depth_max, const bool preserve) {
#ifndef _di_level_0_parameter_checking_
if (depth_max < 0) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!path.used) {
+ return F_data_not;
+ }
+
int result = 0;
if (depth_max) {
- result = nftw(path, private_f_directory_remove_recursively, depth_max, FTW_DEPTH | FTW_PHYS);
+ result = nftw(path.string, private_f_directory_remove_recursively, depth_max, FTW_DEPTH | FTW_PHYS);
if (result == 0 && !preserve) {
- result = remove(path);
+ result = remove(path.string);
}
}
else {
return F_none;
}
- result = remove(path);
+ result = remove(path.string);
}
if (result < 0) {
#endif // _di_f_directory_remove_
#ifndef _di_f_directory_remove_custom_
- f_status_t f_directory_remove_custom(const f_string_t path, const int depth_max, const bool preserve, int (*custom) (const char *, const struct stat *, int, struct FTW *)) {
+ f_status_t f_directory_remove_custom(const f_string_static_t path, const int depth_max, const bool preserve, int (*custom) (const char *, const struct stat *, int, struct FTW *)) {
#ifndef _di_level_0_parameter_checking_
if (depth_max < 0) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!path.used) {
+ return F_data_not;
+ }
+
int result = 0;
if (depth_max) {
- result = nftw(path, custom, depth_max, FTW_DEPTH | FTW_PHYS);
+ result = nftw(path.string, custom, depth_max, FTW_DEPTH | FTW_PHYS);
if (result == 0 && !preserve) {
- result = remove(path);
+ result = remove(path.string);
}
}
else {
return F_none;
}
- result = remove(path);
+ result = remove(path.string);
}
if (result < 0) {
#endif // _di_f_directory_remove_custom_
#ifndef _di_f_directory_touch_
- f_status_t f_directory_touch(const f_string_t path, const mode_t mode) {
- #ifndef _di_level_0_parameter_checking_
- if (!path) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+ f_status_t f_directory_touch(const f_string_static_t path, const mode_t mode) {
+
+ if (!path.used) {
+ return F_data_not;
+ }
struct stat file_stat;
memset(&file_stat, 0, sizeof(struct stat));
- if (stat(path, &file_stat) < 0) {
+ if (stat(path.string, &file_stat) < 0) {
if (errno == ENOENT) {
return private_f_directory_create(path, mode);
}
return F_status_set_error(F_file_stat);
}
- if (utimensat(F_directory_at_current_working_d, path, 0, 0) < 0) {
+ if (utimensat(F_directory_at_current_working_d, path.string, 0, 0) < 0) {
if (errno == EACCES) return F_status_set_error(F_access_denied);
if (errno == EBADF) return F_status_set_error(F_directory_descriptor);
if (errno == EFAULT) return F_status_set_error(F_buffer);
#endif // _di_f_directory_touch_
#ifndef _di_f_directory_touch_at_
- f_status_t f_directory_touch_at(const int at_id, const f_string_t path, const mode_t mode, const int flag) {
- #ifndef _di_level_0_parameter_checking_
- if (!path) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+ f_status_t f_directory_touch_at(const int at_id, const f_string_static_t path, const mode_t mode, const int flag) {
+
+ if (!path.used) {
+ return F_data_not;
+ }
struct stat file_stat;
memset(&file_stat, 0, sizeof(struct stat));
- if (fstatat(at_id, path, &file_stat, flag) < 0) {
- if (errno == ENOENT) {
- return private_f_directory_create_at(at_id, path, mode);
- }
-
- if (errno == ENAMETOOLONG) return F_status_set_error(F_name);
+ if (fstatat(at_id, path.string, &file_stat, flag) < 0) {
+ if (errno == EACCES) return F_status_set_error(F_access_denied);
+ if (errno == EBADF) return F_status_set_error(F_directory_descriptor);
if (errno == EFAULT) return F_status_set_error(F_buffer);
+ if (errno == ELOOP) return F_status_set_error(F_loop);
+ if (errno == ENAMETOOLONG) return F_status_set_error(F_name);
+ if (errno == ENOENT) return private_f_directory_create_at(at_id, path, mode);
if (errno == ENOMEM) return F_status_set_error(F_memory_not);
- if (errno == EOVERFLOW) return F_status_set_error(F_number_overflow);
if (errno == ENOTDIR) return F_status_set_error(F_directory);
- if (errno == ENOENT) return F_status_set_error(F_file_found_not);
- if (errno == EACCES) return F_status_set_error(F_access_denied);
- if (errno == ELOOP) return F_status_set_error(F_loop);
- if (errno == EBADF) return F_status_set_error(F_directory_descriptor);
+ if (errno == EOVERFLOW) return F_status_set_error(F_number_overflow);
return F_status_set_error(F_file_stat);
}
- if (utimensat(at_id, path, 0, flag) < 0) {
+ if (utimensat(at_id, path.string, 0, flag) < 0) {
if (errno == EACCES) return F_status_set_error(F_access_denied);
if (errno == EBADF) return F_status_set_error(F_directory_descriptor);
if (errno == EFAULT) return F_status_set_error(F_buffer);
*
* @return
* F_none on success.
+ * F_data_not if path.used is 0.
*
* F_access_denied (with error bit) on access denied.
* F_directory (with error bit) if a supposed directory in path is not actually a directory.
* @see mkdir()
*/
#ifndef _di_f_directory_create_
- extern f_status_t f_directory_create(const f_string_t path, const mode_t mode);
+ extern f_status_t f_directory_create(const f_string_static_t path, const mode_t mode);
#endif // _di_f_directory_create_
/**
*
* @return
* F_none on success.
+ * F_data_not if path.used is 0.
*
* F_access_denied (with error bit) on access denied.
* F_directory (with error bit) if a supposed directory in path is not actually a directory.
* @see mkdirat()
*/
#ifndef _di_f_directory_create_at_
- extern f_status_t f_directory_create_at(const int at_id, const f_string_t path, const mode_t mode);
+ extern f_status_t f_directory_create_at(const int at_id, const f_string_static_t path, const mode_t mode);
#endif // _di_f_directory_create_at_
/**
* F_true if path was found and path is a directory (or a symlink to a directory).
* F_false if path was found and path is not a directory.
* F_file_found_not if the path was not found.
+ * F_data_not if path.used is 0.
*
* F_access_denied (with error bit) if access to the file was denied.
* F_loop (with error bit) on loop error.
* @see stat()
*/
#ifndef _di_f_directory_exists_
- extern f_status_t f_directory_exists(const f_string_t path);
+ extern f_status_t f_directory_exists(const f_string_static_t path);
#endif // _di_f_directory_exists_
/**
* F_true if path was found and path is a directory (or a symlink to a directory).
* F_false if path was found and path is not a directory.
* F_file_found_not if the path was not found.
+ * F_data_not if path.used is 0.
*
* F_access_denied (with error bit) if access to the file was denied.
* F_directory_descriptor (with error bit) for bad directory descriptor for at_id.
* @see fstatat()
*/
#ifndef _di_f_directory_exists_at_
- extern f_status_t f_directory_exists_at(const int at_id, const f_string_t path, const int flag);
+ extern f_status_t f_directory_exists_at(const int at_id, const f_string_static_t path, const int flag);
#endif // _di_f_directory_exists_at_
/**
* F_true if path was found and path is a directory.
* F_false if path was found and path is not a directory (this includes symlinks).
* F_file_found_not if the path was not found.
+ * F_data_not if path.used is 0.
*
* F_access_denied (with error bit) if access to the file was denied.
* F_loop (with error bit) on loop error.
* @see stat()
*/
#ifndef _di_f_directory_is_
- extern f_status_t f_directory_is(const f_string_t path);
+ extern f_status_t f_directory_is(const f_string_static_t path);
#endif // _di_f_directory_is_
/**
* F_true if path was found and path is a directory.
* F_false if path was found and path is not a directory.
* F_file_found_not if the path was not found.
+ * F_data_not if path.used is 0.
*
* F_access_denied (with error bit) if access to the file was denied.
* F_directory_descriptor (with error bit) for bad directory descriptor for at_id.
* @see fstatat()
*/
#ifndef _di_f_directory_is_at_
- extern f_status_t f_directory_is_at(const int at_id, const f_string_t path, const int flag);
+ extern f_status_t f_directory_is_at(const int at_id, const f_string_static_t path, const int flag);
#endif // _di_f_directory_is_at_
/**
*
* @return
* F_none on success.
- * F_data_not if directory is empty.
+ * F_data_not if path.used is 0.
+ * F_directory_empty if directory is empty.
*
* F_array_too_large (with error bit) if the directory buffer max length would be exceeded.
* F_failure (with error bit) if failed to read directory information.
* @see versionsort()
*/
#ifndef _di_f_directory_list_
- extern f_status_t f_directory_list(const f_string_t path, int (*filter)(const struct dirent *), int (*sort)(const struct dirent **, const struct dirent **), f_string_dynamics_t *names);
+ extern f_status_t f_directory_list(const f_string_static_t path, int (*filter)(const struct dirent *), int (*sort)(const struct dirent **, const struct dirent **), f_string_dynamics_t *names);
#endif // _di_f_directory_list_
/**
*
* @return
* F_none on success.
+ * F_data_not if path.used is 0.
*
* F_access_denied (with error bit) on access denied.
* F_buffer (with error bit) if the buffer is invalid.
* @see open()
*/
#ifndef _di_f_directory_open_
- extern f_status_t f_directory_open(const f_string_t path, const bool dereference, int *id);
+ extern f_status_t f_directory_open(const f_string_static_t path, const bool dereference, int *id);
#endif // _di_f_directory_open_
/**
*
* @return
* F_none on success.
+ * F_data_not if path.used is 0.
*
* F_access_denied (with error bit) on access denied.
* F_buffer (with error bit) if the buffer is invalid.
* @see openat()
*/
#ifndef _di_f_directory_open_at_
- extern f_status_t f_directory_open_at(const int at_id, const f_string_t path, const bool dereference, int *id);
+ extern f_status_t f_directory_open_at(const int at_id, const f_string_static_t path, const bool dereference, int *id);
#endif // _di_f_directory_open_at_
/**
*
* @return
* F_none on success.
+ * F_data_not if path.used is 0.
*
* F_access_denied (with error bit) on access denied.
* F_busy (with error bit) if file is busy.
* @see remove()
*/
#ifndef _di_f_directory_remove_
- extern f_status_t f_directory_remove(const f_string_t path, const int depth_max, const bool preserve);
+ extern f_status_t f_directory_remove(const f_string_static_t path, const int depth_max, const bool preserve);
#endif // _di_f_directory_remove_
/**
*
* @return
* F_none on success.
+ * F_data_not if path.used is 0.
*
* F_access_denied (with error bit) on access denied.
* F_busy (with error bit) if file is busy.
* @see remove()
*/
#ifndef _di_f_directory_remove_custom_
- extern f_status_t f_directory_remove_custom(const f_string_t path, const int depth_max, const bool preserve, int (*custom) (const char *, const struct stat *, int, struct FTW *));
+ extern f_status_t f_directory_remove_custom(const f_string_static_t path, const int depth_max, const bool preserve, int (*custom) (const char *, const struct stat *, int, struct FTW *));
#endif // _di_f_directory_remove_custom_
/**
*
* @return
* F_none on success.
+ * F_data_not if path.used is 0.
*
* F_access_denied (with error bit) on access denied.
* F_buffer (with error bit) if the buffer is invalid.
* @see utimensat()
*/
#ifndef _di_f_directory_touch_
- extern f_status_t f_directory_touch(const f_string_t path, const mode_t mode);
+ extern f_status_t f_directory_touch(const f_string_static_t path, const mode_t mode);
#endif // _di_f_directory_touch_
/**
*
* @return
* F_none on success.
+ * F_data_not if path.used is 0.
*
* F_access_denied (with error bit) on access denied.
* F_buffer (with error bit) if the buffer is invalid.
* @see utimensat()
*/
#ifndef _di_f_directory_touch_at_
- extern f_status_t f_directory_touch_at(const int at_id, const f_string_t path, const mode_t mode, const int flag);
+ extern f_status_t f_directory_touch_at(const int at_id, const f_string_static_t path, const mode_t mode, const int flag);
#endif // _di_f_directory_touch_at_
#ifdef __cplusplus
#endif
#if !defined(_di_f_directory_create_) || !defined(_di_f_directory_touch_)
- f_status_t private_f_directory_create(const f_string_t path, const mode_t mode) {
+ f_status_t private_f_directory_create(const f_string_static_t path, const mode_t mode) {
- if (mkdir(path, mode) < 0) {
+ if (mkdir(path.string, mode) < 0) {
if (errno == EACCES) return F_status_set_error(F_access_denied);
if (errno == EDQUOT) return F_status_set_error(F_filesystem_quota_block);
if (errno == EEXIST) return F_status_set_error(F_file_found);
#endif // !defined(_di_f_directory_create_) || !defined(_di_f_directory_touch_)
#if !defined(_di_f_directory_create_at_) || !defined(_di_f_directory_touch_at_)
- f_status_t private_f_directory_create_at(const int at_id, const f_string_t path, const mode_t mode) {
+ f_status_t private_f_directory_create_at(const int at_id, const f_string_static_t path, const mode_t mode) {
- if (mkdirat(at_id, path, mode) < 0) {
+ if (mkdirat(at_id, path.string, mode) < 0) {
if (errno == EACCES) return F_status_set_error(F_access_denied);
if (errno == EBADF) return F_status_set_error(F_directory_descriptor);
if (errno == EDQUOT) return F_status_set_error(F_filesystem_quota_block);
* @see f_directory_touch()
*/
#if !defined(_di_f_directory_create_) || !defined(_di_f_directory_touch_)
- extern f_status_t private_f_directory_create(const f_string_t path, const mode_t mode) F_attribute_visibility_internal_d;
+ extern f_status_t private_f_directory_create(const f_string_static_t path, const mode_t mode) F_attribute_visibility_internal_d;
#endif // !defined(_di_f_directory_create_) || !defined(_di_f_directory_touch_)
/**
* @see f_directory_touch_at()
*/
#if !defined(_di_f_directory_create_at_) || !defined(_di_f_directory_touch_at_)
- extern f_status_t private_f_directory_create_at(const int at_id, const f_string_t path, const mode_t mode) F_attribute_visibility_internal_d;
+ extern f_status_t private_f_directory_create_at(const int at_id, const f_string_static_t path, const mode_t mode) F_attribute_visibility_internal_d;
#endif // !defined(_di_f_directory_create_at_) || !defined(_di_f_directory_touch_at_)
/**
#ifndef _di_f_environment_clear_
f_status_t f_environment_clear(void) {
+
if (!clearenv()) {
return F_none;
}
#endif // _di_f_environment_clear_
#ifndef _di_f_environment_exists_
- f_status_t f_environment_exists(const f_string_t name) {
- #ifndef _di_level_0_parameter_checking_
- if (!name) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+ f_status_t f_environment_exists(const f_string_static_t name) {
+
+ if (!name.used) {
+ return F_data_not;
+ }
- if (getenv(name)) {
+ if (getenv(name.string)) {
return F_true;
}
#endif // _di_f_environment_exists_
#ifndef _di_f_environment_get_
- f_status_t f_environment_get(const f_string_t name, f_string_dynamic_t *value) {
+ f_status_t f_environment_get(const f_string_static_t name, f_string_dynamic_t *value) {
#ifndef _di_level_0_parameter_checking_
- if (!name) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- return private_f_environment_get(name, value);
- }
-#endif // _di_f_environment_get_
-
-#ifndef _di_f_environment_get_dynamic_
- f_status_t f_environment_get_dynamic(const f_string_static_t name, f_string_dynamic_t *value) {
- #ifndef _di_level_0_parameter_checking_
- if (name.used > name.size) return F_status_set_error(F_parameter);
- if (value->used > value->size) return F_status_set_error(F_parameter);
+ if (!value) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
if (!name.used) {
return F_data_not;
}
- if (!name.string[name.used - 1]) {
- return private_f_environment_get(name.string, value);
+ const f_string_t result = getenv(name.string);
+
+ if (!result) {
+ return F_exist_not;
}
- char variable_name[name.used + 1];
+ const f_array_length_t size = strnlen(result, f_environment_max_length);
- memcpy(&variable_name, name.string, name.used);
- variable_name[name.used] = 0;
+ if (size) {
+ const f_status_t status = f_string_dynamic_increase_by(size, value);
+ if (F_status_is_error(status)) return status;
- return private_f_environment_get(variable_name, value);
- }
-#endif // _di_f_environment_get_dynamic_
+ memcpy(value->string + value->used, result, size);
+ value->used += size;
+ }
+ else {
+ value->used = 0;
+ }
-#ifndef _di_f_environment_set_
- f_status_t f_environment_set(const f_string_t name, const f_string_t value, const bool replace) {
- return private_f_environment_set(name, value, replace);
+ return F_none;
}
-#endif // _di_f_environment_set_
+#endif // _di_f_environment_get_
-#ifndef _di_f_environment_set_dynamic_
- f_status_t f_environment_set_dynamic(const f_string_static_t name, const f_string_static_t value, const bool replace) {
- #ifndef _di_level_0_parameter_checking_
- if (name.used > name.size) return F_status_set_error(F_parameter);
- if (value.used > value.size) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+#ifndef _di_f_environment_set_
+ f_status_t f_environment_set(const f_string_static_t name, const f_string_static_t value, const bool replace) {
if (!name.used) {
return F_data_not;
}
- if (!name.string[name.used - 1]) {
- if (value.used > 0 && !value.string[value.used - 1]) {
- return private_f_environment_set(name.string, value.string, replace);
- }
+ if (setenv(name.string, value.string, replace) < 0) {
+ if (errno == EINVAL) return F_status_set_error(F_valid_not);
+ if (errno == ENOMEM) return F_status_set_error(F_memory_not);
- char variable_value[value.used + 1];
-
- if (value.used > 0) {
- memcpy(&variable_value, value.string, value.used);
- }
-
- variable_value[value.used] = 0;
-
- return private_f_environment_set(name.string, variable_value, replace);
+ return F_status_set_error(F_failure);
}
- char variable_name[name.used + 1];
-
- memcpy(&variable_name, name.string, name.used);
- variable_name[name.used] = 0;
-
- if (value.used > 0 && !value.string[value.used - 1]) {
- return private_f_environment_set(variable_name, value.string, replace);
- }
-
- char variable_value[value.used + 1];
-
- if (value.used > 0) {
- memcpy(&variable_value, value.string, value.used);
- }
-
- variable_value[value.used] = 0;
-
- return private_f_environment_set(variable_name, variable_value, replace);
+ return F_none;
}
-#endif // _di_f_environment_set_dynamic_
+#endif // _di_f_environment_set_
#ifndef _di_f_environment_unset_
- f_status_t f_environment_unset(const f_string_t name) {
- return private_f_environment_unset(name);
- }
-#endif // _di_f_environment_unset_
+ f_status_t f_environment_unset(const f_string_static_t name) {
-#ifndef _di_f_environment_unset_
- f_status_t f_environment_unset_dynamic(const f_string_static_t name) {
- #ifndef _di_level_0_parameter_checking_
- if (name.used > name.size) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- if (!name.used) return F_data_not;
-
- if (!name.string[name.used - 1]) {
- return private_f_environment_unset(name.string);
+ if (!name.used) {
+ return F_data_not;
}
- char variable_name[name.used + 1];
+ if (unsetenv(name.string) < 0) {
+ if (errno == EINVAL) return F_status_set_error(F_valid_not);
+ if (errno == ENOMEM) return F_status_set_error(F_memory_not);
- memcpy(&variable_name, name.string, name.used);
- variable_name[name.used] = 0;
+ return F_status_set_error(F_failure);
+ }
- return private_f_environment_unset(variable_name);
+ return F_none;
}
#endif // _di_f_environment_unset_
* The value will be appended (set value->used to 0 to replace).
*
* @return
+ * F_data_not if name.used is 0.
* F_true on success and environment variable exists.
* F_false on success and environment variable does not exist.
*
- * F_parameter (with error bit) if a parameter is invalid.
- *
* @see getenv()
*/
#ifndef _di_f_environment_exists_
- extern f_status_t f_environment_exists(const f_string_t name);
+ extern f_status_t f_environment_exists(const f_string_static_t name);
#endif // _di_f_environment_exists_
/**
*
* @return
* F_none on success.
+ * F_data_not if name.used is 0.
* F_exist_not if name does not exist.
*
- * F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
- * F_string_too_large (with error bit) if appended string length is too large to store in the buffer.
+ *
+ * Errors (with error bit) from: f_string_dynamic_increase_by().
*
* @see getenv()
+ *
+ * @see f_string_dynamic_increase_by()
*/
#ifndef _di_f_environment_get_
- extern f_status_t f_environment_get(const f_string_t name, f_string_dynamic_t *value);
+ extern f_status_t f_environment_get(const f_string_static_t name, f_string_dynamic_t *value);
#endif // _di_f_environment_get_
/**
- * Get a single environment variable.
- *
- * The variable is copied into a new dynamically allocated string and is safe to alter.
- *
- * @param name
- * The name of the environment variable to get.
- * The name string must not contain the '=' character.
- * The name need not be NULL terminated.
- * @param value
- * The value associated with name.
- * The value will not be null terminated.
- * The value will be appended (set value->used to 0 to replace).
- *
- * @return
- * F_none on success.
- * F_data_not if name.used is 0.
- * F_exist_not if name does not exist.
- *
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
- * F_string_too_large (with error bit) if appended string length is too large to store in the buffer.
- *
- * @see getenv()
- */
-#ifndef _di_f_environment_get_dynamic_
- extern f_status_t f_environment_get_dynamic(const f_string_static_t name, f_string_dynamic_t *value);
-#endif // _di_f_environment_get_dynamic_
-
-/**
* Assign the given value to the named environment variable.
*
* If the name does not exist, then it is created.
*
* @return
* F_none on success.
+ * F_data_not if name.used is 0.
*
- * F_valid_not (with error bit) if name is an invalid string.
* F_memory_not (with error bit) on out of memory.
+ * F_valid_not (with error bit) if name is an invalid string.
* F_failure (with error bit) on any other error.
*
* @see setenv()
*/
#ifndef _di_f_environment_set_
- extern f_status_t f_environment_set(const f_string_t name, const f_string_t value, const bool replace);
+ extern f_status_t f_environment_set(const f_string_static_t name, const f_string_static_t value, const bool replace);
#endif // _di_f_environment_set_
/**
- * Assign the given value to the named environment variable.
- *
- * If the name does not exist, then it is created.
- *
- * @param name
- * The name of the environment variable to set.
- * The name string must not contain the '=' character.
- * The name need not be NULL terminated.
- * @param value
- * The value to assign to name.
- * The value need not be NULL terminated.
- * @param replace
- * Set to TRUE to replace value if name already exists.
- * Set to FALSE to not replace value if name already exists.
- *
- * @return
- * F_none on success.
- * F_data_not if name.used is 0.
- *
- * F_valid_not (with error bit) if name is an invalid string.
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
- * F_failure (with error bit) on any other error.
- *
- * @see setenv()
- */
-#ifndef _di_f_environment_set_dynamic_
- extern f_status_t f_environment_set_dynamic(const f_string_static_t name, const f_string_static_t value, const bool replace);
-#endif // _di_f_environment_set_dynamic_
-
-/**
* Remove the name environment variable.
*
* @param name
*
* @return
* F_none on success.
+ * F_data_not if name.used is 0.
*
- * F_valid_not (with error bit) if name is an invalid string.
* F_memory_not (with error bit) on out of memory.
+ * F_valid_not (with error bit) if name is an invalid string.
* F_failure (with error bit) on any other error.
*
* @see unsetenv()
*/
#ifndef _di_f_environment_unset_
- extern f_status_t f_environment_unset(const f_string_t name);
+ extern f_status_t f_environment_unset(const f_string_static_t name);
#endif // _di_f_environment_unset_
-/**
- * Remove the name environment variable.
- *
- * @param name
- * The name of the environment variable to remove.
- * The name string must not contain the '=' character.
- * The name need not be NULL terminated.
- *
- * @return
- * F_none on success.
- *
- * F_valid_not (with error bit) if name is an invalid string.
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
- * F_failure (with error bit) on any other error.
- *
- * @see unsetenv()
- */
-#ifndef _di_f_environment_unset_dynamic_
- extern f_status_t f_environment_unset_dynamic(const f_string_static_t name);
-#endif // _di_f_environment_unset_dynamic_
-
#ifdef __cplusplus
} // extern "C"
#endif
extern "C" {
#endif
-#if !defined(_di_f_environment_get_) || !defined(_di_f_environment_get_dynamic_)
- f_status_t private_f_environment_get(const f_string_t name, f_string_dynamic_t *value) {
- const f_string_t result = getenv(name);
-
- if (!result) {
- return F_exist_not;
- }
-
- const f_array_length_t size = strnlen(result, f_environment_max_length);
-
- if (size) {
- if (value->used + size > f_environment_max_length) {
- return F_status_set_error(F_string_too_large);
- }
-
- if (value->used + size > value->size) {
- f_status_t status = F_none;
-
- macro_f_string_dynamic_t_resize(status, (*value), size);
- if (F_status_is_error(status)) return status;
- }
-
- memcpy(value->string + value->used, result, value->used + size);
- value->used = size;
- }
- else {
- value->used = 0;
- }
-
- return F_none;
- }
-#endif // !defined(_di_f_environment_get_) || !defined(_di_f_environment_get_dynamic_)
-
-#if !defined(_di_f_environment_set_) || !defined(_di_f_environment_set_dynamic_)
- f_status_t private_f_environment_set(const f_string_t name, const f_string_t value, const bool replace) {
-
- if (setenv(name, value, replace) < 0) {
- if (errno == EINVAL) {
- return F_status_set_error(F_valid_not);
- }
- else if (errno == ENOMEM) {
- return F_status_set_error(F_memory_not);
- }
-
- return F_status_set_error(F_failure);
- }
-
- return F_none;
- }
-#endif // !defined(_di_f_environment_set_) || !defined(_di_f_environment_set_dynamic_)
-
-#if !defined(_di_f_environment_unset_) || !defined(_di_f_environment_unset_dynamic_)
- f_status_t private_f_environment_unset(const f_string_t name) {
-
- if (unsetenv(name) < 0) {
- if (errno == EINVAL) {
- return F_status_set_error(F_valid_not);
- }
- else if (errno == ENOMEM) {
- return F_status_set_error(F_memory_not);
- }
-
- return F_status_set_error(F_failure);
- }
-
- return F_none;
- }
-#endif // !defined(_di_f_environment_unset_) || !defined(_di_f_environment_unset_dynamic_)
-
#ifdef __cplusplus
} // extern "C"
#endif
extern "C" {
#endif
-/**
- * Get a single environment variable.
- *
- * The variable is copied into a new dynamically allocated string and is safe to alter.
- *
- * @param name
- * The name of the environment variable to get.
- * The name string must not contain the '=' character.
- * The name must be NULL terminated.
- * @param value
- * The value associated with name.
- * The value will not be null terminated.
- * The value will be appended (set value->used to 0 to replace).
- *
- * @return
- * F_none on success.
- * F_exist_not if name does not exist.
- *
- * F_memory_not (with error bit) on out of memory.
- * F_string_too_large (with error bit) if appended string length is too large to store in the buffer.
- *
- * @see f_environment_get()
- * @see f_environment_get_dynamic()
- */
-#if !defined(_di_f_environment_get_) || !defined(_di_f_environment_get_dynamic_)
- extern f_status_t private_f_environment_get(const f_string_t name, f_string_dynamic_t *value) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_environment_get_) || !defined(_di_f_environment_get_dynamic_)
-
-/**
- * Assign the given value to the named environment variable.
- *
- * If the name does not exist, then it is created.
- *
- * @param name
- * The name of the environment variable to set.
- * The name string must not contain the '=' character.
- * @param value
- * The value to assign to name.
- * @param replace
- * Set to TRUE to replace value if name already exists.
- * Set to FALSE to not replace value if name already exists.
- *
- * @return
- * F_none on success.
- *
- * F_valid_not (with error bit) if name is an invalid string.
- * F_memory_not (with error bit) on out of memory.
- * F_failure (with error bit) on any other error.
- *
- * @see f_environment_set()
- * @see f_environment_set_dynamic()
- */
-#if !defined(_di_f_environment_set_) || !defined(_di_f_environment_set_dynamic_)
- extern f_status_t private_f_environment_set(const f_string_t name, const f_string_t value, const bool replace) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_environment_set_) || !defined(_di_f_environment_set_dynamic_)
-
-/**
- * Remove the name environment variable.
- *
- * @param name
- * The name of the environment variable to remove.
- * The name string must not contain the '=' character.
- *
- * @return
- * F_none on success.
- *
- * F_valid_not (with error bit) if name is an invalid string.
- * F_memory_not (with error bit) on out of memory.
- * F_failure (with error bit) on any other error.
- *
- * @see f_environment_unset()
- * @see f_environment_unset_dynamic()
- */
-#if !defined(_di_f_environment_unset_) || !defined(_di_f_environment_unset_dynamic_)
- extern f_status_t private_f_environment_unset(const f_string_t name) F_attribute_visibility_internal_d;
-#endif // !defined(_di_f_environment_unset_) || !defined(_di_f_environment_unset_dynamic_)
-
#ifdef __cplusplus
} // extern "C"
#endif
#endif
#ifndef _di_f_file_type_
- const f_string_static_t f_file_type_name_block_s = macro_f_string_static_t_initialize2(F_file_type_name_block_s, 0, F_file_type_name_block_s_length);
- const f_string_static_t f_file_type_name_character_s = macro_f_string_static_t_initialize2(F_file_type_name_character_s, 0, F_file_type_name_character_s_length);
- const f_string_static_t f_file_type_name_directory_s = macro_f_string_static_t_initialize2(F_file_type_name_directory_s, 0, F_file_type_name_directory_s_length);
- const f_string_static_t f_file_type_name_fifo_s = macro_f_string_static_t_initialize2(F_file_type_name_fifo_s, 0, F_file_type_name_fifo_s_length);
- const f_string_static_t f_file_type_name_link_s = macro_f_string_static_t_initialize2(F_file_type_name_link_s, 0, F_file_type_name_link_s_length);
- const f_string_static_t f_file_type_name_regular_s = macro_f_string_static_t_initialize2(F_file_type_name_regular_s, 0, F_file_type_name_regular_s_length);
- const f_string_static_t f_file_type_name_socket_s = macro_f_string_static_t_initialize2(F_file_type_name_socket_s, 0, F_file_type_name_socket_s_length);
+ const f_string_static_t f_file_type_name_block_s = macro_f_string_static_t_initialize(F_file_type_name_block_s, 0, F_file_type_name_block_s_length);
+ const f_string_static_t f_file_type_name_character_s = macro_f_string_static_t_initialize(F_file_type_name_character_s, 0, F_file_type_name_character_s_length);
+ const f_string_static_t f_file_type_name_directory_s = macro_f_string_static_t_initialize(F_file_type_name_directory_s, 0, F_file_type_name_directory_s_length);
+ const f_string_static_t f_file_type_name_fifo_s = macro_f_string_static_t_initialize(F_file_type_name_fifo_s, 0, F_file_type_name_fifo_s_length);
+ const f_string_static_t f_file_type_name_link_s = macro_f_string_static_t_initialize(F_file_type_name_link_s, 0, F_file_type_name_link_s_length);
+ const f_string_static_t f_file_type_name_regular_s = macro_f_string_static_t_initialize(F_file_type_name_regular_s, 0, F_file_type_name_regular_s_length);
+ const f_string_static_t f_file_type_name_socket_s = macro_f_string_static_t_initialize(F_file_type_name_socket_s, 0, F_file_type_name_socket_s_length);
- const f_string_static_t f_file_open_mode_append_s = macro_f_string_static_t_initialize2(F_file_open_mode_append_s, 0, F_file_open_mode_append_s_length);
- const f_string_static_t f_file_open_mode_read_s = macro_f_string_static_t_initialize2(F_file_open_mode_read_s, 0, F_file_open_mode_read_s_length);
- const f_string_static_t f_file_open_mode_read_append_s = macro_f_string_static_t_initialize2(F_file_open_mode_read_append_s, 0, F_file_open_mode_read_append_s_length);
- const f_string_static_t f_file_open_mode_read_truncate_s = macro_f_string_static_t_initialize2(F_file_open_mode_read_truncate_s, 0, F_file_open_mode_read_truncate_s_length);
- const f_string_static_t f_file_open_mode_read_write_s = macro_f_string_static_t_initialize2(F_file_open_mode_read_write_s, 0, F_file_open_mode_read_write_s_length);
- const f_string_static_t f_file_open_mode_truncate_s = macro_f_string_static_t_initialize2(F_file_open_mode_truncate_s, 0, F_file_open_mode_truncate_s_length);
+ const f_string_static_t f_file_open_mode_append_s = macro_f_string_static_t_initialize(F_file_open_mode_append_s, 0, F_file_open_mode_append_s_length);
+ const f_string_static_t f_file_open_mode_read_s = macro_f_string_static_t_initialize(F_file_open_mode_read_s, 0, F_file_open_mode_read_s_length);
+ const f_string_static_t f_file_open_mode_read_append_s = macro_f_string_static_t_initialize(F_file_open_mode_read_append_s, 0, F_file_open_mode_read_append_s_length);
+ const f_string_static_t f_file_open_mode_read_truncate_s = macro_f_string_static_t_initialize(F_file_open_mode_read_truncate_s, 0, F_file_open_mode_read_truncate_s_length);
+ const f_string_static_t f_file_open_mode_read_write_s = macro_f_string_static_t_initialize(F_file_open_mode_read_write_s, 0, F_file_open_mode_read_write_s_length);
+ const f_string_static_t f_file_open_mode_truncate_s = macro_f_string_static_t_initialize(F_file_open_mode_truncate_s, 0, F_file_open_mode_truncate_s_length);
#endif // _di_f_file_type_
+#ifndef _di_f_file_operation_strings_
+ const f_string_static_t f_file_operation_append_s = macro_f_string_static_t_initialize(F_file_operation_append_s, 0, F_file_operation_append_s_length);
+ const f_string_static_t f_file_operation_clone_s = macro_f_string_static_t_initialize(F_file_operation_clone_s, 0, F_file_operation_clone_s_length);
+ const f_string_static_t f_file_operation_close_s = macro_f_string_static_t_initialize(F_file_operation_close_s, 0, F_file_operation_close_s_length);
+ const f_string_static_t f_file_operation_concatenate_s = macro_f_string_static_t_initialize(F_file_operation_concatenate_s, 0, F_file_operation_concatenate_s_length);
+ const f_string_static_t f_file_operation_connect_s = macro_f_string_static_t_initialize(F_file_operation_connect_s, 0, F_file_operation_connect_s_length);
+ const f_string_static_t f_file_operation_copy_s = macro_f_string_static_t_initialize(F_file_operation_copy_s, 0, F_file_operation_copy_s_length);
+ const f_string_static_t f_file_operation_create_s = macro_f_string_static_t_initialize(F_file_operation_create_s, 0, F_file_operation_create_s_length);
+ const f_string_static_t f_file_operation_delete_s = macro_f_string_static_t_initialize(F_file_operation_delete_s, 0, F_file_operation_delete_s_length);
+ const f_string_static_t f_file_operation_disconnect_s = macro_f_string_static_t_initialize(F_file_operation_disconnect_s, 0, F_file_operation_disconnect_s_length);
+ const f_string_static_t f_file_operation_find_s = macro_f_string_static_t_initialize(F_file_operation_find_s, 0, F_file_operation_find_s_length);
+ const f_string_static_t f_file_operation_from_s = macro_f_string_static_t_initialize(F_file_operation_from_s, 0, F_file_operation_from_s_length);
+ const f_string_static_t f_file_operation_flush_s = macro_f_string_static_t_initialize(F_file_operation_flush_s, 0, F_file_operation_flush_s_length);
+ const f_string_static_t f_file_operation_link_s = macro_f_string_static_t_initialize(F_file_operation_link_s, 0, F_file_operation_link_s_length);
+ const f_string_static_t f_file_operation_list_s = macro_f_string_static_t_initialize(F_file_operation_list_s, 0, F_file_operation_list_s_length);
+ const f_string_static_t f_file_operation_open_s = macro_f_string_static_t_initialize(F_file_operation_open_s, 0, F_file_operation_open_s_length);
+ const f_string_static_t f_file_operation_process_s = macro_f_string_static_t_initialize(F_file_operation_process_s, 0, F_file_operation_process_s_length);
+ const f_string_static_t f_file_operation_read_s = macro_f_string_static_t_initialize(F_file_operation_read_s, 0, F_file_operation_read_s_length);
+ const f_string_static_t f_file_operation_receive_s = macro_f_string_static_t_initialize(F_file_operation_receive_s, 0, F_file_operation_receive_s_length);
+ const f_string_static_t f_file_operation_send_s = macro_f_string_static_t_initialize(F_file_operation_send_s, 0, F_file_operation_send_s_length);
+ const f_string_static_t f_file_operation_to_s = macro_f_string_static_t_initialize(F_file_operation_to_s, 0, F_file_operation_to_s_length);
+ const f_string_static_t f_file_operation_truncate_s = macro_f_string_static_t_initialize(F_file_operation_truncate_s, 0, F_file_operation_truncate_s_length);
+ const f_string_static_t f_file_operation_unlink_s = macro_f_string_static_t_initialize(F_file_operation_unlink_s, 0, F_file_operation_unlink_s_length);
+ const f_string_static_t f_file_operation_verify_s = macro_f_string_static_t_initialize(F_file_operation_verify_s, 0, F_file_operation_verify_s_length);
+ const f_string_static_t f_file_operation_wipe_s = macro_f_string_static_t_initialize(F_file_operation_wipe_s, 0, F_file_operation_wipe_s_length);
+ const f_string_static_t f_file_operation_write_s = macro_f_string_static_t_initialize(F_file_operation_write_s, 0, F_file_operation_write_s_length);
+#endif // _di_f_file_operation_strings_
+
#ifdef __cplusplus
} // extern "C"
#endif
#define F_file_mode_user_protected_d (F_file_mode_owner_r_d | F_file_mode_group_r_d)
#endif // _di_f_file_mode_
+/**
+ * Provide common file operation strings.
+ *
+ * F_file_operation_*:
+ * - append: Append to a file.
+ * - clone: Clone a file.
+ * - close: Close a file.
+ * - concatenate: Concatenate a file.
+ * - connect: Connect to a file (such as a socket file).
+ * - copy: Copy a file.
+ * - create: Create a file.
+ * - delete: Delete a file.
+ * - disconnect: Disconnect from a file (such as a socket file).
+ * - find: Find a file.
+ * - from: Do something from a file.
+ * - flush: Flush a file.
+ * - link: Link a file.
+ * - list: List a file.
+ * - open: Open a file.
+ * - process: Process a file.
+ * - read: Read a file.
+ * - receive: Receive a file.
+ * - send: Send a file.
+ * - to: Do someting to a file.
+ * - truncate: Truncate a file.
+ * - unlink: Unlink a file.
+ * - verify: Verify a file.
+ * - wipe: Wipe a file.
+ * - write: Write a file.
+ */
+#ifndef _di_f_file_operation_strings_
+ #define F_file_operation_append_s "append"
+ #define F_file_operation_clone_s "clone"
+ #define F_file_operation_close_s "close"
+ #define F_file_operation_concatenate_s "concatenate"
+ #define F_file_operation_connect_s "connect"
+ #define F_file_operation_copy_s "copy"
+ #define F_file_operation_create_s "create"
+ #define F_file_operation_delete_s "delete"
+ #define F_file_operation_disconnect_s "disconnect"
+ #define F_file_operation_find_s "find"
+ #define F_file_operation_from_s "from"
+ #define F_file_operation_flush_s "flush"
+ #define F_file_operation_link_s "link"
+ #define F_file_operation_list_s "list"
+ #define F_file_operation_open_s "open"
+ #define F_file_operation_process_s "process"
+ #define F_file_operation_read_s "read"
+ #define F_file_operation_receive_s "receive"
+ #define F_file_operation_send_s "send"
+ #define F_file_operation_to_s "to"
+ #define F_file_operation_truncate_s "truncate"
+ #define F_file_operation_unlink_s "unlink"
+ #define F_file_operation_verify_s "verify"
+ #define F_file_operation_wipe_s "wipe"
+ #define F_file_operation_write_s "write"
+
+ #define F_file_operation_append_s_length 6
+ #define F_file_operation_clone_s_length 5
+ #define F_file_operation_close_s_length 5
+ #define F_file_operation_concatenate_s_length 11
+ #define F_file_operation_connect_s_length 7
+ #define F_file_operation_copy_s_length 4
+ #define F_file_operation_create_s_length 6
+ #define F_file_operation_delete_s_length 6
+ #define F_file_operation_disconnect_s_length 10
+ #define F_file_operation_find_s_length 4
+ #define F_file_operation_from_s_length 4
+ #define F_file_operation_flush_s_length 5
+ #define F_file_operation_link_s_length 4
+ #define F_file_operation_list_s_length 4
+ #define F_file_operation_open_s_length 4
+ #define F_file_operation_process_s_length 7
+ #define F_file_operation_read_s_length 4
+ #define F_file_operation_receive_s_length 7
+ #define F_file_operation_send_s_length 4
+ #define F_file_operation_to_s_length 2
+ #define F_file_operation_truncate_s_length 8
+ #define F_file_operation_unlink_s_length 6
+ #define F_file_operation_verify_s_length 6
+ #define F_file_operation_wipe_s_length 4
+ #define F_file_operation_write_s_length 5
+
+ extern const f_string_static_t f_file_operation_append_s;
+ extern const f_string_static_t f_file_operation_clone_s;
+ extern const f_string_static_t f_file_operation_close_s;
+ extern const f_string_static_t f_file_operation_concatenate_s;
+ extern const f_string_static_t f_file_operation_connect_s;
+ extern const f_string_static_t f_file_operation_copy_s;
+ extern const f_string_static_t f_file_operation_create_s;
+ extern const f_string_static_t f_file_operation_delete_s;
+ extern const f_string_static_t f_file_operation_disconnect_s;
+ extern const f_string_static_t f_file_operation_find_s;
+ extern const f_string_static_t f_file_operation_from_s;
+ extern const f_string_static_t f_file_operation_flush_s;
+ extern const f_string_static_t f_file_operation_link_s;
+ extern const f_string_static_t f_file_operation_list_s;
+ extern const f_string_static_t f_file_operation_open_s;
+ extern const f_string_static_t f_file_operation_process_s;
+ extern const f_string_static_t f_file_operation_read_s;
+ extern const f_string_static_t f_file_operation_receive_s;
+ extern const f_string_static_t f_file_operation_send_s;
+ extern const f_string_static_t f_file_operation_to_s;
+ extern const f_string_static_t f_file_operation_truncate_s;
+ extern const f_string_static_t f_file_operation_unlink_s;
+ extern const f_string_static_t f_file_operation_verify_s;
+ extern const f_string_static_t f_file_operation_wipe_s;
+ extern const f_string_static_t f_file_operation_write_s;
+#endif // _di_f_file_operation_strings_
+
#ifdef __cplusplus
} // extern "C"
#endif
#endif
#ifndef _di_f_file_access_
- f_status_t f_file_access(const f_string_t path) {
- #ifndef _di_level_0_parameter_checking_
- if (!path) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+ f_status_t f_file_access(const f_string_static_t path) {
+
+ if (!path.used) {
+ return F_data_not;
+ }
- if (access(path, F_OK)) {
+ if (access(path.string, F_OK)) {
if (errno == ENOENT) return F_false;
if (errno == ENAMETOOLONG) return F_status_set_error(F_name);
if (errno == EFAULT) return F_status_set_error(F_buffer);
#endif // _di_f_file_access_
#ifndef _di_f_file_clone_
- f_status_t f_file_clone(const f_string_t source, const f_string_t destination, const bool role, const f_number_unsigned_t size_block, const bool exclusive) {
- #ifndef _di_level_0_parameter_checking_
- if (!source) return F_status_set_error(F_parameter);
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+ f_status_t f_file_clone(const f_string_static_t source, const f_string_static_t destination, const bool role, const f_number_unsigned_t size_block, const bool exclusive) {
+
+ if (!source.used || !destination.used) {
+ return F_data_not;
+ }
f_status_t status = F_none;
struct stat source_stat;
if (macro_f_file_type_is_link(source_stat.st_mode)) {
status = private_f_file_link(destination, source);
+
if (F_status_set_fine(status) == F_file_found) {
if (exclusive) return status;
}
#endif // _di_f_file_close_flush_
#ifndef _di_f_file_copy_
- f_status_t f_file_copy(const f_string_t source, const f_string_t destination, const f_mode_t mode, const f_number_unsigned_t size_block, const bool exclusive) {
- #ifndef _di_level_0_parameter_checking_
- if (!source) return F_status_set_error(F_parameter);
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+ f_status_t f_file_copy(const f_string_static_t source, const f_string_static_t destination, const f_mode_t mode, const f_number_unsigned_t size_block, const bool exclusive) {
+
+ if (!source.used || !destination.used) {
+ return F_data_not;
+ }
f_status_t status = F_none;
struct stat source_stat;
return status;
}
- status = private_f_file_link(target.string, destination);
+ status = private_f_file_link(target, destination);
f_string_dynamic_resize(0, &target);
#endif // _di_f_file_copy_
#ifndef _di_f_file_create_
- f_status_t f_file_create(const f_string_t path, const mode_t mode, const bool exclusive) {
- #ifndef _di_level_0_parameter_checking_
- if (!path) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+ f_status_t f_file_create(const f_string_static_t path, const mode_t mode, const bool exclusive) {
+
+ if (!path.used) {
+ return F_data_not;
+ }
return private_f_file_create(path, mode, exclusive);
}
#endif // _di_f_file_create_
#ifndef _di_f_file_create_at_
- f_status_t f_file_create_at(const int at_id, const f_string_t path, const mode_t mode, const bool exclusive) {
- #ifndef _di_level_0_parameter_checking_
- if (!path) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+ f_status_t f_file_create_at(const int at_id, const f_string_static_t path, const mode_t mode, const bool exclusive) {
+
+ if (!path.used) {
+ return F_data_not;
+ }
return private_f_file_create_at(at_id, path, mode, exclusive);
}
#endif // _di_f_file_create_at_
#ifndef _di_f_file_create_device_
- f_status_t f_file_create_device(const f_string_t path, const mode_t mode, const unsigned int major, const unsigned int minor) {
- #ifndef _di_level_0_parameter_checking_
- if (!path) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+ f_status_t f_file_create_device(const f_string_static_t path, const mode_t mode, const unsigned int major, const unsigned int minor) {
+
+ if (!path.used) {
+ return F_data_not;
+ }
if (!macro_f_file_type_is_fifo(mode) && !macro_f_file_type_is_character(mode) && !macro_f_file_type_is_block(mode)) {
return F_status_set_error(F_supported_not);
#endif // _di_f_file_create_device_
#ifndef _di_f_file_create_device_at_
- f_status_t f_file_create_device_at(const int at_id, const f_string_t path, const mode_t mode, const unsigned int major, const unsigned int minor) {
- #ifndef _di_level_0_parameter_checking_
- if (!path) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+ f_status_t f_file_create_device_at(const int at_id, const f_string_static_t path, const mode_t mode, const unsigned int major, const unsigned int minor) {
+
+ if (!path.used) {
+ return F_data_not;
+ }
if (!macro_f_file_type_is_fifo(mode) && !macro_f_file_type_is_character(mode) && !macro_f_file_type_is_block(mode)) {
return F_status_set_error(F_supported_not);
#endif // _di_f_file_create_device_at_
#ifndef _di_f_file_create_fifo_
- f_status_t f_file_create_fifo(const f_string_t path, const mode_t mode) {
- #ifndef _di_level_0_parameter_checking_
- if (!path) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+ f_status_t f_file_create_fifo(const f_string_static_t path, const mode_t mode) {
+
+ if (!path.used) {
+ return F_data_not;
+ }
return private_f_file_create_fifo(path, mode);
}
#endif // _di_f_file_create_fifo_
#ifndef _di_f_file_create_fifo_at_
- f_status_t f_file_create_fifo_at(const int at_id, const f_string_t path, const mode_t mode) {
- #ifndef _di_level_0_parameter_checking_
- if (!path) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+ f_status_t f_file_create_fifo_at(const int at_id, const f_string_static_t path, const mode_t mode) {
+
+ if (!path.used) {
+ return F_data_not;
+ }
return private_f_file_create_fifo_at(at_id, path, mode);
}
#endif // _di_f_file_create_fifo_at_
#ifndef _di_f_file_create_node_
- f_status_t f_file_create_node(const f_string_t path, const mode_t mode, const dev_t device) {
- #ifndef _di_level_0_parameter_checking_
- if (!path) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+ f_status_t f_file_create_node(const f_string_static_t path, const mode_t mode, const dev_t device) {
+
+ if (!path.used) {
+ return F_data_not;
+ }
if (!macro_f_file_type_is_fifo(mode) && !macro_f_file_type_is_character(mode) && !macro_f_file_type_is_block(mode)) {
return F_status_set_error(F_supported_not);
#endif // _di_f_file_create_node_
#ifndef _di_f_file_create_node_at_
- f_status_t f_file_create_node_at(const int at_id, const f_string_t path, const mode_t mode, const dev_t device) {
- #ifndef _di_level_0_parameter_checking_
- if (!path) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+ f_status_t f_file_create_node_at(const int at_id, const f_string_static_t path, const mode_t mode, const dev_t device) {
+
+ if (!path.used) {
+ return F_data_not;
+ }
if (!macro_f_file_type_is_fifo(mode) && !macro_f_file_type_is_character(mode) && !macro_f_file_type_is_block(mode)) {
return F_status_set_error(F_supported_not);
#ifndef _di_f_file_descriptor_
f_status_t f_file_descriptor(f_file_t *file) {
- #ifndef _di_level_0_parameter_checking_
- if (!file) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
file->id = fileno(file->stream);
#endif // _di_f_file_descriptor_
#ifndef _di_f_file_exists_
- f_status_t f_file_exists(const f_string_t path) {
- #ifndef _di_level_0_parameter_checking_
- if (!path) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+ f_status_t f_file_exists(const f_string_static_t path) {
+
+ if (!path.used) {
+ return F_data_not;
+ }
struct stat stat_file;
#endif // _di_f_file_exists_
#ifndef _di_f_file_exists_at_
- f_status_t f_file_exists_at(const int at_id, const f_string_t path, const int flag) {
- #ifndef _di_level_0_parameter_checking_
- if (!path) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+ f_status_t f_file_exists_at(const int at_id, const f_string_static_t path, const int flag) {
+
+ if (!path.used) {
+ return F_data_not;
+ }
struct stat stat_file;
#ifndef _di_f_file_flush_
f_status_t f_file_flush(const int id) {
+
return private_f_file_flush(id);
}
#endif // _di_f_file_flush_
#ifndef _di_f_file_group_read_
- f_status_t f_file_group_read(const f_string_t path, gid_t *group) {
+ f_status_t f_file_group_read(const f_string_static_t path, gid_t *group) {
#ifndef _di_level_0_parameter_checking_
- if (!path) return F_status_set_error(F_parameter);
if (!group) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!path.used) {
+ return F_data_not;
+ }
+
struct stat stat_file;
memset(&stat_file, 0, sizeof(struct stat));
#endif // _di_f_file_group_read_
#ifndef _di_f_file_is_
- f_status_t f_file_is(const f_string_t path, const int type, const bool dereference) {
- #ifndef _di_level_0_parameter_checking_
- if (!path) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+ f_status_t f_file_is(const f_string_static_t path, const int type, const bool dereference) {
+
+ if (!path.used) {
+ return F_data_not;
+ }
struct stat stat_file;
#endif // _di_f_file_is_
#ifndef _di_f_file_is_at_
- f_status_t f_file_is_at(const int at_id, const f_string_t path, const int type, const int flag) {
- #ifndef _di_level_0_parameter_checking_
- if (!path) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+ f_status_t f_file_is_at(const int at_id, const f_string_static_t path, const int type, const int flag) {
+
+ if (!path.used) {
+ return F_data_not;
+ }
struct stat stat_file;
memset(&stat_file, 0, sizeof(struct stat));
- if (fstatat(at_id, path, &stat_file, flag) < 0) {
+ if (fstatat(at_id, path.string, &stat_file, flag) < 0) {
if (errno == ENAMETOOLONG) return F_status_set_error(F_name);
if (errno == EFAULT) return F_status_set_error(F_buffer);
if (errno == ENOMEM) return F_status_set_error(F_memory_not);
#endif // _di_f_file_is_at_
#ifndef _di_f_file_link_
- f_status_t f_file_link(const f_string_t target, const f_string_t point) {
- #ifndef _di_level_0_parameter_checking_
- if (!target) return F_status_set_error(F_parameter);
- if (!point) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+ f_status_t f_file_link(const f_string_static_t target, const f_string_static_t point) {
+
+ if (!target.used || !point.used) {
+ return F_data_not;
+ }
return private_f_file_link(target, point);
}
#endif // _di_f_file_link_
#ifndef _di_f_file_link_at_
- f_status_t f_file_link_at(const int at_id, const f_string_t target, const f_string_t point) {
- #ifndef _di_level_0_parameter_checking_
- if (!target) return F_status_set_error(F_parameter);
- if (!point) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+ f_status_t f_file_link_at(const int at_id, const f_string_static_t target, const f_string_static_t point) {
+
+ if (!target.used || !point.used) {
+ return F_data_not;
+ }
return private_f_file_link_at(at_id, target, point);
}
#endif // _di_f_file_link_at_
#ifndef _di_f_file_link_hard_
- f_status_t f_file_link_hard(const f_string_t target, const f_string_t point) {
- #ifndef _di_level_0_parameter_checking_
- if (!target) return F_status_set_error(F_parameter);
- if (!point) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+ f_status_t f_file_link_hard(const f_string_static_t target, const f_string_static_t point) {
+
+ if (!target.used || !point.used) {
+ return F_data_not;
+ }
- if (link(target, point) < 0) {
+ if (link(target.string, point.string) < 0) {
if (errno == EACCES) return F_status_set_error(F_access_denied);
if (errno == EDQUOT) return F_status_set_error(F_filesystem_quota_block);
if (errno == EEXIST) return F_status_set_error(F_file_found);
#endif // _di_f_file_link_hard_
#ifndef _di_f_file_link_hard_at_
- f_status_t f_file_link_hard_at(const int at_id_target, const int at_id_point, const f_string_t target, const f_string_t point, const int flag) {
- #ifndef _di_level_0_parameter_checking_
- if (!target) return F_status_set_error(F_parameter);
- if (!point) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+ f_status_t f_file_link_hard_at(const int at_id_target, const int at_id_point, const f_string_static_t target, const f_string_static_t point, const int flag) {
- if (linkat(at_id_target, target, at_id_point, point, flag) < 0) {
+ if (linkat(at_id_target, target.string, at_id_point, point.string, flag) < 0) {
if (errno == EACCES) return F_status_set_error(F_access_denied);
if (errno == EDQUOT) return F_status_set_error(F_filesystem_quota_block);
if (errno == EEXIST) return F_status_set_error(F_file_found);
#endif // _di_f_file_link_hard_at_
#ifndef _di_f_file_link_read_
- f_status_t f_file_link_read(const f_string_t path, const struct stat link_stat, f_string_dynamic_t *target) {
+ f_status_t f_file_link_read(const f_string_static_t path, const struct stat link_stat, f_string_dynamic_t *target) {
#ifndef _di_level_0_parameter_checking_
- if (!path) return F_status_set_error(F_parameter);
if (!link_stat.st_size) return F_status_set_error(F_parameter);
if (!target) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!path.used) {
+ return F_data_not;
+ }
+
return private_f_file_link_read(path, link_stat, target);
}
#endif // _di_f_file_link_read_
#ifndef _di_f_file_link_read_at_
- f_status_t f_file_link_read_at(const int at_id, const f_string_t path, const struct stat link_stat, f_string_dynamic_t *target) {
+ f_status_t f_file_link_read_at(const int at_id, const f_string_static_t path, const struct stat link_stat, f_string_dynamic_t *target) {
#ifndef _di_level_0_parameter_checking_
if (!link_stat.st_size) return F_status_set_error(F_parameter);
if (!target) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!path.used) {
+ return F_data_not;
+ }
+
return private_f_file_link_read_at(at_id, path, link_stat, target);
}
#endif // _di_f_file_link_read_at_
#endif // _di_f_file_mode_determine_
#ifndef _di_f_file_mode_from_string_
- f_status_t f_file_mode_from_string(const f_string_t string, const mode_t umask, f_file_mode_t *mode, uint8_t *replace) {
+ f_status_t f_file_mode_from_string(const f_string_static_t code, const mode_t umask, f_file_mode_t *mode, uint8_t *replace) {
#ifndef _di_level_0_parameter_checking_
- if (!string) return F_status_set_error(F_parameter);
- if (!string[0]) return F_status_set_error(F_parameter);
if (!mode) return F_status_set_error(F_parameter);
if (!replace) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!code.used) {
+ return F_data_not;
+ }
+
uint8_t syntax = 0;
uint8_t replace_result = 0;
f_file_mode_t mode_result = 0;
- if (string[0] == f_string_ascii_plus_s.string[0] || string[0] == f_string_ascii_minus_s.string[0] || string[0] == f_string_ascii_equal_s.string[0]) {
- if (string[1] == f_string_ascii_r_s.string[0] || f_string_ascii_w_s.string[0] || f_string_ascii_x_s.string[0] || f_string_ascii_X_s.string[0] || f_string_ascii_s_s.string[0] ||f_string_ascii_t_s.string[0]) {
+ if (code.string[0] == f_string_ascii_plus_s.string[0] || code.string[0] == f_string_ascii_minus_s.string[0] || code.string[0] == f_string_ascii_equal_s.string[0]) {
+ if (code.string[1] == f_string_ascii_r_s.string[0] || f_string_ascii_w_s.string[0] || f_string_ascii_x_s.string[0] || f_string_ascii_X_s.string[0] || f_string_ascii_s_s.string[0] ||f_string_ascii_t_s.string[0]) {
syntax = 1;
}
- else if (string[1] == f_string_ascii_0_s.string[0] || string[1] == f_string_ascii_1_s.string[0] || string[1] == f_string_ascii_2_s.string[0] || string[1] == f_string_ascii_3_s.string[0] || string[1] == f_string_ascii_4_s.string[0] || string[1] == f_string_ascii_5_s.string[0] || string[1] == f_string_ascii_6_s.string[0] || string[1] == f_string_ascii_7_s.string[0]) {
+ else if (code.string[1] == f_string_ascii_0_s.string[0] || code.string[1] == f_string_ascii_1_s.string[0] || code.string[1] == f_string_ascii_2_s.string[0] || code.string[1] == f_string_ascii_3_s.string[0] || code.string[1] == f_string_ascii_4_s.string[0] || code.string[1] == f_string_ascii_5_s.string[0] || code.string[1] == f_string_ascii_6_s.string[0] || code.string[1] == f_string_ascii_7_s.string[0]) {
syntax = 2;
}
else {
return F_status_set_error(F_syntax);
}
}
- else if (string[0] == f_string_ascii_u_s.string[0] || string[0] == f_string_ascii_g_s.string[0] || string[0] == f_string_ascii_o_s.string[0] || string[0] == f_string_ascii_a_s.string[0]) {
+ else if (code.string[0] == f_string_ascii_u_s.string[0] || code.string[0] == f_string_ascii_g_s.string[0] || code.string[0] == f_string_ascii_o_s.string[0] || code.string[0] == f_string_ascii_a_s.string[0]) {
syntax = 1;
}
- else if (string[0] == f_string_ascii_0_s.string[0] || string[0] == f_string_ascii_1_s.string[0] || string[0] == f_string_ascii_2_s.string[0] || string[0] == f_string_ascii_3_s.string[0] || string[0] == f_string_ascii_4_s.string[0] || string[0] == f_string_ascii_5_s.string[0] || string[0] == f_string_ascii_6_s.string[0] || string[0] == f_string_ascii_7_s.string[0]) {
+ else if (code.string[0] == f_string_ascii_0_s.string[0] || code.string[0] == f_string_ascii_1_s.string[0] || code.string[0] == f_string_ascii_2_s.string[0] || code.string[0] == f_string_ascii_3_s.string[0] || code.string[0] == f_string_ascii_4_s.string[0] || code.string[0] == f_string_ascii_5_s.string[0] || code.string[0] == f_string_ascii_6_s.string[0] || code.string[0] == f_string_ascii_7_s.string[0]) {
syntax = 2;
}
else {
mode_umask |= F_file_mode_t_block_world_d & F_file_mode_t_mask_bit_execute_d;
}
- for (f_array_length_t i = 0; syntax && string[i]; ++i) {
+ for (f_array_length_t i = 0; syntax && code.string[i]; ++i) {
- if (string[i] == f_string_ascii_u_s.string[0]) {
+ if (code.string[i] == f_string_ascii_u_s.string[0]) {
on |= 1;
mode_mask |= F_file_mode_t_block_owner_d;
}
- else if (string[i] == f_string_ascii_g_s.string[0]) {
+ else if (code.string[i] == f_string_ascii_g_s.string[0]) {
on |= 2;
mode_mask |= F_file_mode_t_block_group_d;
}
- else if (string[i] == f_string_ascii_o_s.string[0]) {
+ else if (code.string[i] == f_string_ascii_o_s.string[0]) {
on |= 4;
mode_mask |= F_file_mode_t_block_world_d;
}
- else if (string[i] == f_string_ascii_a_s.string[0]) {
+ else if (code.string[i] == f_string_ascii_a_s.string[0]) {
on = 7;
mode_mask = F_file_mode_t_block_standard_d;
}
- else if (string[i] == f_string_ascii_plus_s.string[0] || string[i] == f_string_ascii_minus_s.string[0] || string[i] == f_string_ascii_equal_s.string[0]) {
- if (string[i] == f_string_ascii_plus_s.string[0]) {
+ else if (code.string[i] == f_string_ascii_plus_s.string[0] || code.string[i] == f_string_ascii_minus_s.string[0] || code.string[i] == f_string_ascii_equal_s.string[0]) {
+ if (code.string[i] == f_string_ascii_plus_s.string[0]) {
how = on ? 1 : 4;
}
- else if (string[i] == f_string_ascii_minus_s.string[0]) {
+ else if (code.string[i] == f_string_ascii_minus_s.string[0]) {
how = on ? 3 : 6;
}
else {
what = 0;
- for (++i; string[i]; ++i) {
+ for (++i; code.string[i]; ++i) {
- if (string[i] == f_string_ascii_r_s.string[0]) {
+ if (code.string[i] == f_string_ascii_r_s.string[0]) {
what = F_file_mode_t_mask_bit_read_d;
}
- else if (string[i] == f_string_ascii_w_s.string[0]) {
+ else if (code.string[i] == f_string_ascii_w_s.string[0]) {
what = F_file_mode_t_mask_bit_write_d;
}
- else if (string[i] == f_string_ascii_x_s.string[0]) {
+ else if (code.string[i] == f_string_ascii_x_s.string[0]) {
what = F_file_mode_t_mask_bit_execute_d;
}
- else if (string[i] == f_string_ascii_X_s.string[0]) {
+ else if (code.string[i] == f_string_ascii_X_s.string[0]) {
what = F_file_mode_t_mask_bit_execute_only_d;
}
- else if (string[i] == f_string_ascii_s_s.string[0]) {
+ else if (code.string[i] == f_string_ascii_s_s.string[0]) {
mode_mask |= F_file_mode_t_block_special_d;
if (on & 1) {
what = 0;
}
}
- else if (string[i] == f_string_ascii_t_s.string[0]) {
+ else if (code.string[i] == f_string_ascii_t_s.string[0]) {
mode_mask |= F_file_mode_t_block_special_d;
if (on & 4) {
what = 0;
}
}
- else if (string[i] == f_string_ascii_comma_s.string[0]) {
+ else if (code.string[i] == f_string_ascii_comma_s.string[0]) {
if (how > 3) {
mode_result -= mode_result & mode_umask;
}
break;
}
- else if (string[i] == f_string_ascii_plus_s.string[0] || string[i] == f_string_ascii_minus_s.string[0] || string[i] == f_string_ascii_equal_s.string[0]) {
+ else if (code.string[i] == f_string_ascii_plus_s.string[0] || code.string[i] == f_string_ascii_minus_s.string[0] || code.string[i] == f_string_ascii_equal_s.string[0]) {
what = 0;
- if (string[i] == f_string_ascii_plus_s.string[0]) {
+ if (code.string[i] == f_string_ascii_plus_s.string[0]) {
how = on ? 1 : 4;
}
- else if (string[i] == f_string_ascii_minus_s.string[0]) {
+ else if (code.string[i] == f_string_ascii_minus_s.string[0]) {
how = on ? 3 : 6;
}
else {
mode_result -= mode_result & mode_umask;
}
- if (!string[i]) break;
+ if (!code.string[i]) break;
}
else {
syntax = 0;
f_array_length_t i = 0;
f_array_length_t j = 0;
- if (string[0] == f_string_ascii_plus_s.string[0]) {
+ if (code.string[0] == f_string_ascii_plus_s.string[0]) {
how = 1;
i = 1;
}
- else if (string[0] == f_string_ascii_minus_s.string[0]) {
+ else if (code.string[0] == f_string_ascii_minus_s.string[0]) {
how = 3;
i = 1;
}
- else if (string[0] == f_string_ascii_equal_s.string[0]) {
+ else if (code.string[0] == f_string_ascii_equal_s.string[0]) {
how = 2;
i = 1;
}
// Seek past leading '0's.
- while (string[i] == f_string_ascii_0_s.string[0]) {
+ while (code.string[i] == f_string_ascii_0_s.string[0]) {
++i;
} // while
- if (string[i]) {
+ if (code.string[i]) {
f_array_length_t j = 0;
- for (; string[i + j] && j < 4; ++j) {
+ for (; code.string[i + j] && j < 4; ++j) {
if (j) {
mode_result <<= 8;
}
- if (string[i] == f_string_ascii_0_s.string[0]) {
+ if (code.string[i] == f_string_ascii_0_s.string[0]) {
// Already is a zero.
}
- else if (string[i] == f_string_ascii_1_s.string[0] || string[i] == f_string_ascii_2_s.string[0] || string[i] == f_string_ascii_3_s.string[0] || string[i] == f_string_ascii_4_s.string[0] || string[i] == f_string_ascii_5_s.string[0] || string[i] == f_string_ascii_6_s.string[0] || string[i] == f_string_ascii_7_s.string[0]) {
+ else if (code.string[i] == f_string_ascii_1_s.string[0] || code.string[i] == f_string_ascii_2_s.string[0] || code.string[i] == f_string_ascii_3_s.string[0] || code.string[i] == f_string_ascii_4_s.string[0] || code.string[i] == f_string_ascii_5_s.string[0] || code.string[i] == f_string_ascii_6_s.string[0] || code.string[i] == f_string_ascii_7_s.string[0]) {
// This assumes ASCII/UTF-8.
if (how == 3) {
- mode_result |= (string[i + j] - 0x30) << 4;
+ mode_result |= (code.string[i + j] - 0x30) << 4;
}
else {
- mode_result |= string[i + j] - 0x30;
+ mode_result |= code.string[i + j] - 0x30;
}
}
else {
#endif // _di_f_file_mode_from_string_
#ifndef _di_f_file_mode_read_
- f_status_t f_file_mode_read(const f_string_t path, mode_t *mode) {
+ f_status_t f_file_mode_read(const f_string_static_t path, mode_t *mode) {
#ifndef _di_level_0_parameter_checking_
- if (!path) return F_status_set_error(F_parameter);
if (!mode) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!path.used) {
+ return F_data_not;
+ }
+
struct stat stat_file;
memset(&stat_file, 0, sizeof(struct stat));
#endif // _di_f_file_mode_read_
#ifndef _di_f_file_mode_read_at_
- f_status_t f_file_mode_read_at(const int at_id, const f_string_t path, mode_t *mode) {
+ f_status_t f_file_mode_read_at(const int at_id, const f_string_static_t path, mode_t *mode) {
#ifndef _di_level_0_parameter_checking_
- if (!path) return F_status_set_error(F_parameter);
if (!mode) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_file_mode_read_at_
#ifndef _di_f_file_mode_set_
- f_status_t f_file_mode_set(const f_string_t path, const mode_t mode) {
+ f_status_t f_file_mode_set(const f_string_static_t path, const mode_t mode) {
#ifndef _di_level_0_parameter_checking_
- if (!path) return F_status_set_error(F_parameter);
+ if (!path.used) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!path.used) {
+ return F_data_not;
+ }
+
return private_f_file_mode_set(path, mode);
}
#endif // _di_f_file_mode_set_
#ifndef _di_f_file_mode_set_at_
- f_status_t f_file_mode_set_at(const int at_id, const f_string_t path, const mode_t mode) {
- #ifndef _di_level_0_parameter_checking_
- if (!path) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+ f_status_t f_file_mode_set_at(const int at_id, const f_string_static_t path, const mode_t mode) {
+
+ if (!path.used) {
+ return F_data_not;
+ }
return private_f_file_mode_set_at(at_id, path, mode);
}
#endif // _di_f_file_mode_to_mode_
#ifndef _di_f_file_name_base_
- f_status_t f_file_name_base(const f_string_t path, const f_array_length_t length, f_string_dynamic_t *name_base) {
+ f_status_t f_file_name_base(const f_string_static_t path, f_string_dynamic_t *name_base) {
#ifndef _di_level_0_parameter_checking_
- if (!path) return F_status_set_error(F_parameter);
if (!name_base) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!path.used) {
+ return F_data_not;
+ }
+
// POSIX basename() modifies the path, so protect it (and add a terminating NULL).
- char path_argument[length + 1];
+ char path_argument[path.used + 1];
f_string_t path_to_name;
- memcpy(path_argument, path, length);
- path_argument[length] = 0;
+ memcpy(path_argument, path.string, path.used);
+ path_argument[path.used] = 0;
path_to_name = basename(path_argument);
- f_array_length_t size = strnlen(path_to_name, length);
-
- if (name_base->used + size > name_base->size) {
- if (name_base->used + size > F_string_t_size_d) {
- return F_status_set_error(F_string_too_large);
- }
-
- f_status_t status = F_none;
+ f_array_length_t size = strnlen(path_to_name, path.used);
- macro_f_string_dynamic_t_resize(status, (*name_base), name_base->used + size);
- if (F_status_is_error(status)) return status;
- }
+ const f_status_t status = f_string_dynamic_increase_by(size, name_base);
+ if (F_status_is_error(status)) return status;
memcpy(name_base->string + name_base->used, path_to_name, size);
name_base->used += size;
#endif // _di_f_file_name_base_
#ifndef _di_f_file_name_directory_
- f_status_t f_file_name_directory(const f_string_t path, const f_array_length_t length, f_string_dynamic_t *name_directory) {
+ f_status_t f_file_name_directory(const f_string_static_t path, f_string_dynamic_t *name_directory) {
#ifndef _di_level_0_parameter_checking_
- if (!path) return F_status_set_error(F_parameter);
if (!name_directory) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!path.used) {
+ return F_data_not;
+ }
+
// POSIX dirname() modifies the path, so protect it (and add a terminating NULL).
- char path_argument[length + 1];
+ char path_argument[path.used + 1];
f_string_t path_to_name;
- memcpy(path_argument, path, length);
- path_argument[length] = 0;
+ memcpy(path_argument, path.string, path.used);
+ path_argument[path.used] = 0;
path_to_name = dirname(path_argument);
- f_array_length_t size = strnlen(path_to_name, length);
-
- if (name_directory->used + size > name_directory->size) {
- if (name_directory->used + size > F_string_t_size_d) {
- return F_status_set_error(F_string_too_large);
- }
-
- f_status_t status = F_none;
+ f_array_length_t size = strnlen(path_to_name, path.used);
- macro_f_string_dynamic_t_resize(status, (*name_directory), name_directory->used + size);
+ {
+ const f_status_t status = f_string_dynamic_increase_by(size, name_directory);
if (F_status_is_error(status)) return status;
}
#endif // _di_f_file_name_directory_
#ifndef _di_f_file_open_
- f_status_t f_file_open(const f_string_t path, const mode_t mode, f_file_t *file) {
+ f_status_t f_file_open(const f_string_static_t path, const mode_t mode, f_file_t *file) {
#ifndef _di_level_0_parameter_checking_
- if (!path) return F_status_set_error(F_parameter);
if (!file) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!path.used) {
+ return F_data_not;
+ }
+
return private_f_file_open(path, mode, file);
}
#endif // _di_f_file_open_
#ifndef _di_f_file_open_at_
- f_status_t f_file_open_at(const int at_id, const f_string_t path, const mode_t mode, f_file_t *file) {
+ f_status_t f_file_open_at(const int at_id, const f_string_static_t path, const mode_t mode, f_file_t *file) {
#ifndef _di_level_0_parameter_checking_
if (!file) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!path.used) {
+ return F_data_not;
+ }
+
return private_f_file_open_at(at_id, path, mode, file);
}
#endif // _di_f_file_open_at_
#ifndef _di_f_file_owner_read_
- f_status_t f_file_owner_read(const f_string_t path, uid_t *owner) {
+ f_status_t f_file_owner_read(const f_string_static_t path, uid_t *owner) {
#ifndef _di_level_0_parameter_checking_
- if (!path) return F_status_set_error(F_parameter);
if (!owner) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!path.used) {
+ return F_data_not;
+ }
+
struct stat stat_file;
memset(&stat_file, 0, sizeof(struct stat));
f_status_t status = F_none;
ssize_t size_read = 0;
- for (f_string_t buffer_read = 0; ; ) {
-
- if (buffer->used + file.size_read > buffer->size) {
- if (buffer->size + file.size_read > F_string_t_size_d) {
- return F_status_set_error(F_string_too_large);
- }
-
- macro_f_string_dynamic_t_resize(status, (*buffer), buffer->size + file.size_read);
- if (F_status_is_error(status)) return status;
- }
+ for (;;) {
- buffer_read = buffer->string + buffer->used;
+ status = f_string_dynamic_increase_by(file.size_read, buffer);
+ if (F_status_is_error(status)) return status;
- size_read = read(file.id, buffer_read, file.size_read);
+ size_read = read(file.id, buffer->string + buffer->used, file.size_read);
if (size_read < 0) {
if (errno == EAGAIN || errno == EWOULDBLOCK) return F_status_set_error(F_block);
return F_status_set_error(F_file_closed);
}
- f_status_t status = F_none;
ssize_t size_read = 0;
- f_string_t buffer_read = 0;
-
- if (buffer->used + file.size_read > buffer->size) {
- if (buffer->size + file.size_read > F_string_t_size_d) {
- return F_status_set_error(F_string_too_large);
- }
-
- macro_f_string_dynamic_t_resize(status, (*buffer), buffer->size + file.size_read);
+ {
+ const f_status_t status = f_string_dynamic_increase_by(file.size_read, buffer);
if (F_status_is_error(status)) return status;
}
- buffer_read = buffer->string + buffer->used;
-
- size_read = read(file.id, buffer_read, file.size_read);
+ size_read = read(file.id, buffer->string + buffer->used, file.size_read);
if (size_read > 0) {
buffer->used += size_read;
f_status_t status = F_none;
ssize_t size_read = 0;
- for (f_string_t buffer_read = 0; ; ) {
+ for (;;) {
if (buffer_count + buffer_size > total) {
buffer_size = total - buffer_count;
}
- if (buffer->used + buffer_size > buffer->size) {
- if (buffer->size + buffer_size > F_string_t_size_d) {
- return F_status_set_error(F_string_too_large);
- }
-
- macro_f_string_dynamic_t_resize(status, (*buffer), buffer->size + buffer_size);
- if (F_status_is_error(status)) return status;
- }
-
- buffer_read = buffer->string + buffer->used;
+ status = f_string_dynamic_increase_by(buffer_size, buffer);
+ if (F_status_is_error(status)) return status;
- size_read = read(file.id, buffer_read, buffer_size);
+ size_read = read(file.id, buffer->string + buffer->used, buffer_size);
if (size_read < 0) {
if (errno == EAGAIN || errno == EWOULDBLOCK) return F_status_set_error(F_block);
buffer_count += size_read;
- if (buffer_count == total) {
- return F_none_stop;
- }
+ if (buffer_count >= total) break;
} // for
- return F_none;
+ return F_none_stop;
}
#endif // _di_f_file_read_until_
#ifndef _di_f_file_remove_
- f_status_t f_file_remove(const f_string_t path) {
- #ifndef _di_level_0_parameter_checking_
- if (!path) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+ f_status_t f_file_remove(const f_string_static_t path) {
+
+ if (!path.used) {
+ return F_data_not;
+ }
- if (unlink(path) < 0) {
+ if (unlink(path.string) < 0) {
if (errno == EACCES) return F_status_set_error(F_access_denied);
if (errno == EBUSY) return F_status_set_error(F_busy);
if (errno == EIO) return F_status_set_error(F_input_output);
#endif // _di_f_file_remove_
#ifndef _di_f_file_remove_at_
- f_status_t f_file_remove_at(const int at_id, const f_string_t path, const int flag) {
- #ifndef _di_level_0_parameter_checking_
- if (!path) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+ f_status_t f_file_remove_at(const int at_id, const f_string_static_t path, const int flag) {
+
+ if (!path.used) {
+ return F_data_not;
+ }
- if (unlinkat(at_id, path, flag) < 0) {
+ if (unlinkat(at_id, path.string, flag) < 0) {
if (errno == EACCES) return F_status_set_error(F_access_denied);
if (errno == EBUSY) return F_status_set_error(F_busy);
if (errno == EIO) return F_status_set_error(F_input_output);
#endif // _di_f_file_remove_at_
#ifndef _di_f_file_rename_
- f_status_t f_file_rename(const f_string_t source, const f_string_t destination) {
- #ifndef _di_level_0_parameter_checking_
- if (!source) return F_status_set_error(F_parameter);
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+ f_status_t f_file_rename(const f_string_static_t source, const f_string_static_t destination) {
- if (rename(source, destination) < 0) {
+ if (!source.used || !destination.used) {
+ return F_data_not;
+ }
+
+ if (rename(source.string, destination.string) < 0) {
if (errno == EACCES) return F_status_set_error(F_access_denied);
if (errno == EBUSY) return F_status_set_error(F_busy);
if (errno == EDQUOT) return F_status_set_error(F_filesystem_quota_block);
#endif // _di_f_file_rename_
#ifndef _di_f_file_rename_at_
- f_status_t f_file_rename_at(const int at_id, const int to_id, const f_string_t source, const f_string_t destination) {
- #ifndef _di_level_0_parameter_checking_
- if (!source) return F_status_set_error(F_parameter);
- if (!destination) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+ f_status_t f_file_rename_at(const int at_id, const int to_id, const f_string_static_t source, const f_string_static_t destination) {
- if (renameat(at_id, source, to_id, destination) < 0) {
+ if (!source.used || !destination.used) {
+ return F_data_not;
+ }
+
+ if (renameat(at_id, source.string, to_id, destination.string) < 0) {
if (errno == EACCES) return F_status_set_error(F_access_denied);
if (errno == EBUSY) return F_status_set_error(F_busy);
if (errno == EDQUOT) return F_status_set_error(F_filesystem_quota_block);
#endif // _di_f_file_rename_at_
#ifndef _di_f_file_role_change_
- f_status_t f_file_role_change(const f_string_t path, const uid_t uid, const gid_t gid, const bool dereference) {
+ f_status_t f_file_role_change(const f_string_static_t path, const uid_t uid, const gid_t gid, const bool dereference) {
#ifndef _di_level_0_parameter_checking_
- if (!path) return F_status_set_error(F_parameter);
if (uid == -1 && gid == -1) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!path.used) {
+ return F_data_not;
+ }
+
return private_f_file_role_change(path, uid, gid, dereference);
}
#endif // _di_f_file_role_change_
#ifndef _di_f_file_role_change_at_
- f_status_t f_file_role_change_at(const int at_id, const f_string_t path, const uid_t uid, const gid_t gid, const int flag) {
+ f_status_t f_file_role_change_at(const int at_id, const f_string_static_t path, const uid_t uid, const gid_t gid, const int flag) {
#ifndef _di_level_0_parameter_checking_
- if (!path) return F_status_set_error(F_parameter);
if (uid == -1 && gid == -1) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_file_seek_
#ifndef _di_f_file_size_
- f_status_t f_file_size(const f_string_t path, const bool dereference, f_array_length_t *size) {
+ f_status_t f_file_size(const f_string_static_t path, const bool dereference, f_array_length_t *size) {
#ifndef _di_level_0_parameter_checking_
- if (!path) return F_status_set_error(F_parameter);
if (!size) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!path.used) {
+ return F_data_not;
+ }
+
struct stat stat_file;
memset(&stat_file, 0, sizeof(struct stat));
#endif // _di_f_file_size_
#ifndef _di_f_file_size_at_
- f_status_t f_file_size_at(const int at_id, const f_string_t path, const bool dereference, f_array_length_t *size) {
+ f_status_t f_file_size_at(const int at_id, const f_string_static_t path, const bool dereference, f_array_length_t *size) {
#ifndef _di_level_0_parameter_checking_
- if (!path) return F_status_set_error(F_parameter);
if (at_id <= 0) return F_status_set_error(F_parameter);
if (!size) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!path.used) {
+ return F_data_not;
+ }
+
struct stat stat_file;
memset(&stat_file, 0, sizeof(struct stat));
#endif // _di_f_file_size_by_id_
#ifndef _di_f_file_stat_
- f_status_t f_file_stat(const f_string_t path, const bool dereference, struct stat *stat_file) {
+ f_status_t f_file_stat(const f_string_static_t path, const bool dereference, struct stat *stat_file) {
#ifndef _di_level_0_parameter_checking_
- if (!path) return F_status_set_error(F_parameter);
if (!stat_file) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!path.used) {
+ return F_data_not;
+ }
+
return private_f_file_stat(path, dereference, stat_file);
}
#endif // _di_f_file_stat_
#ifndef _di_f_file_stat_at_
- f_status_t f_file_stat_at(const int at_id, const f_string_t path, const int flag, struct stat *stat_file) {
+ f_status_t f_file_stat_at(const int at_id, const f_string_static_t path, const int flag, struct stat *stat_file) {
#ifndef _di_level_0_parameter_checking_
- if (!path) return F_status_set_error(F_parameter);
if (at_id <= 0) return F_status_set_error(F_parameter);
if (!stat_file) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!path.used) {
+ return F_data_not;
+ }
+
return private_f_file_stat_at(at_id, path, flag, stat_file);
}
#endif // _di_f_file_stat_at_
file->stream = 0;
- // file stream will result in the file descriptor being invalid because it is already closed.
+ // File stream will result in the file descriptor being invalid because it is already closed.
if (complete) {
file->id = -1;
}
#endif // _di_f_file_stream_close_
#ifndef _di_f_file_stream_descriptor_
- f_status_t f_file_stream_descriptor(const f_string_t mode, f_file_t *file) {
+ f_status_t f_file_stream_descriptor(const f_string_static_t mode, f_file_t *file) {
#ifndef _di_level_0_parameter_checking_
if (!file) return F_status_set_error(F_parameter);
if (file->id == -1) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- if (mode) {
- file->stream = fdopen(file->id, mode);
+ if (mode.string) {
+ file->stream = fdopen(file->id, mode.string);
}
else {
file->stream = fdopen(file->id, private_f_file_stream_open_mode_determine(file->flag));
#ifndef _di_f_file_stream_open_
- f_status_t f_file_stream_open(const f_string_t path, const f_string_t mode, f_file_t *file) {
+ f_status_t f_file_stream_open(const f_string_static_t path, const f_string_static_t mode, f_file_t *file) {
#ifndef _di_level_0_parameter_checking_
- if (!path) return F_status_set_error(F_parameter);
if (!file) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
- if (mode) {
- file->stream = fopen(path, mode);
+ if (mode.used) {
+ file->stream = fopen(path.string, mode.string);
}
else {
- file->stream = fopen(path, private_f_file_stream_open_mode_determine(file->flag));
+ file->stream = fopen(path.string, private_f_file_stream_open_mode_determine(file->flag));
}
if (!file->stream) {
for (;;) {
- if (buffer->used + file.size_read > buffer->size) {
- if (buffer->size + file.size_read > F_string_t_size_d) {
- return F_status_set_error(F_string_too_large);
- }
-
- macro_f_string_dynamic_t_resize(status, (*buffer), buffer->size + file.size_read);
- if (F_status_is_error(status)) return status;
-
- memset(buffer->string + buffer->used, 0, sizeof(file.size_read));
- }
+ status = f_string_dynamic_increase_by(file.size_read, buffer);
+ if (F_status_is_error(status)) return status;
size_read = fread(buffer->string + buffer->used, 1, file.size_read, file.stream);
f_status_t f_file_stream_read_block(const f_file_t file, f_string_dynamic_t *buffer) {
#ifndef _di_level_0_parameter_checking_
if (!file.size_read) return F_status_set_error(F_parameter);
- if (buffer->used > buffer->size) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
if (!file.stream) return F_status_set_error(F_file_closed);
- f_status_t status = F_none;
ssize_t size_read = 0;
- if (buffer->used + file.size_read > buffer->size) {
- if (buffer->size + file.size_read > F_string_t_size_d) {
- return F_status_set_error(F_string_too_large);
- }
-
- macro_f_string_dynamic_t_resize(status, (*buffer), buffer->size + file.size_read);
+ {
+ const f_status_t status = f_string_dynamic_increase_by(file.size_read, buffer);
if (F_status_is_error(status)) return status;
}
buffer_size = total - buffer_count;
}
- if (buffer->used + buffer_size > buffer->size) {
- if (buffer->size + buffer_size > F_string_t_size_d) {
- return F_status_set_error(F_string_too_large);
- }
-
- macro_f_string_dynamic_t_resize(status, (*buffer), buffer->size + buffer_size);
- if (F_status_is_error(status)) return status;
- }
+ status = f_string_dynamic_increase_by(buffer_size, buffer);
+ if (F_status_is_error(status)) return status;
size_read = fread(buffer->string + buffer->used, 1, file.size_read, file.stream);
#endif // _di_f_file_stream_read_until_
#ifndef _di_f_file_stream_reopen_
- f_status_t f_file_stream_reopen(const f_string_t path, const f_string_t mode, f_file_t *file) {
+ f_status_t f_file_stream_reopen(const f_string_static_t path, const f_string_static_t mode, f_file_t *file) {
#ifndef _di_level_0_parameter_checking_
- if (!path) return F_status_set_error(F_parameter);
if (!file) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!path.used) {
+ return F_data_not;
+ }
+
FILE *result = 0;
- if (mode) {
- result = freopen(path, mode, file->stream);
+ if (mode.used) {
+ result = freopen(path.string, mode.string, file->stream);
}
else {
- result = freopen(path, private_f_file_stream_open_mode_determine(file->flag), file->stream);
+ result = freopen(path.string, private_f_file_stream_open_mode_determine(file->flag), file->stream);
}
if (!result) {
}
if (!buffer.used) {
- if (written) *written = 0;
+ if (written) {
+ *written = 0;
+ }
+
return F_data_not;
}
f_status_t status = F_none;
if (written) {
- private_f_file_stream_write_until(file, buffer.string, buffer.used, written);
+ private_f_file_stream_write_until(file, buffer, buffer.used, written);
if (status == F_none && *written == buffer.used) {
return F_none_eos;
else {
f_array_length_t written_local = 0;
- private_f_file_stream_write_until(file, buffer.string, buffer.used, &written_local);
+ private_f_file_stream_write_until(file, buffer, buffer.used, &written_local);
if (status == F_none && written_local == buffer.used) {
return F_none_eos;
}
if (!buffer.used) {
- if (written) *written = 0;
+ if (written) {
+ *written = 0;
+ }
return F_data_not;
}
f_status_t status = F_none;
if (written) {
- private_f_file_stream_write_until(file, buffer.string, write_max, written);
+ private_f_file_stream_write_until(file, buffer, write_max, written);
if (status == F_none) {
if (*written == buffer.used) {
else {
f_array_length_t written_local = 0;
- private_f_file_stream_write_until(file, buffer.string, write_max, &written_local);
+ private_f_file_stream_write_until(file, buffer, write_max, &written_local);
if (status == F_none) {
if (written_local == buffer.used) {
f_status_t f_file_stream_write_until(const f_file_t file, const f_string_static_t buffer, const f_array_length_t total, f_array_length_t *written) {
#ifndef _di_level_0_parameter_checking_
if (!file.size_write) return F_status_set_error(F_parameter);
- if (buffer.used > buffer.size) return F_status_set_error(F_parameter);
if (!total) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
}
if (!buffer.used || !total) {
- if (written) *written = 0;
+ if (written) {
+ *written = 0;
+ }
return F_data_not;
}
f_status_t status = F_none;
if (written) {
- private_f_file_stream_write_until(file, buffer.string, write_max, written);
+ private_f_file_stream_write_until(file, buffer, write_max, written);
if (status == F_none) {
if (*written == buffer.used) {
else {
f_array_length_t written_local = 0;
- private_f_file_stream_write_until(file, buffer.string, buffer.used, &written_local);
+ private_f_file_stream_write_until(file, buffer, buffer.used, &written_local);
if (status == F_none) {
if (written_local == buffer.used) {
f_status_t f_file_stream_write_range(const f_file_t file, const f_string_static_t buffer, const f_string_range_t range, f_array_length_t *written) {
#ifndef _di_level_0_parameter_checking_
if (!file.size_write) return F_status_set_error(F_parameter);
- if (buffer.used > buffer.size) return F_status_set_error(F_parameter);
if (range.stop < range.start) return F_status_set_error(F_parameter);
if (range.start >= buffer.used) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
}
if (!buffer.used) {
- if (written) *written = 0;
+ if (written) {
+ *written = 0;
+ }
return F_data_not;
}
f_status_t status = F_none;
if (written) {
- private_f_file_stream_write_until(file, buffer.string + range.start, write_max, written);
+ const f_string_static_t buffer_adjusted = macro_f_string_static_t_initialize(buffer.string + range.start, 0, buffer.used - range.start);
+
+ private_f_file_stream_write_until(file, buffer_adjusted, write_max, written);
if (status == F_none) {
if (range.start + *written == buffer.used) {
}
}
else {
+ const f_string_static_t buffer_adjusted = macro_f_string_static_t_initialize(buffer.string + range.start, 0, buffer.used - range.start);
f_array_length_t written_local = 0;
- private_f_file_stream_write_until(file, buffer.string + range.start, write_max, &written_local);
+ private_f_file_stream_write_until(file, buffer_adjusted, write_max, &written_local);
if (status == F_none) {
if (range.start + written_local == buffer.used) {
#endif // _di_f_file_stream_write_range_
#ifndef _di_f_file_touch_
- f_status_t f_file_touch(const f_string_t path, const mode_t mode, const bool dereference) {
- #ifndef _di_level_0_parameter_checking_
- if (!path) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+ f_status_t f_file_touch(const f_string_static_t path, const mode_t mode, const bool dereference) {
+
+ if (!path.used) {
+ return F_data_not;
+ }
f_status_t status = F_none;
struct stat stat_file;
if (F_status_set_fine(status) == F_file_found_not) {
return private_f_file_create(path, mode, dereference);
}
- else if (F_status_is_error(status)) {
+
+ if (F_status_is_error(status)) {
return status;
}
- if (utimensat(F_file_at_current_working_d, path, 0, dereference ? 0 : F_file_at_symlink_follow_no_d) < 0) {
+ if (utimensat(F_file_at_current_working_d, path.string, 0, dereference ? 0 : F_file_at_symlink_follow_no_d) < 0) {
if (errno == EACCES) return F_status_set_error(F_access_denied);
if (errno == EBADF) return F_status_set_error(F_directory_descriptor);
if (errno == EFAULT) return F_status_set_error(F_buffer);
#endif // _di_f_file_touch_
#ifndef _di_f_file_touch_at_
- f_status_t f_file_touch_at(const int at_id, const f_string_t path, const mode_t mode, const int flag) {
- #ifndef _di_level_0_parameter_checking_
- if (!path) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
+ f_status_t f_file_touch_at(const int at_id, const f_string_static_t path, const mode_t mode, const int flag) {
+
+ if (!path.used) {
+ return F_data_not;
+ }
f_status_t status = F_none;
struct stat stat_file;
if (F_status_set_fine(status) == F_file_found_not) {
return private_f_file_create_at(at_id, path, mode, F_false);
}
- else if (F_status_is_error(status)) {
- return status;
- }
- if (utimensat(at_id, path, 0, flag) < 0) {
+ if (F_status_is_error(status)) return status;
+
+ if (utimensat(at_id, path.string, 0, flag) < 0) {
if (errno == EACCES) return F_status_set_error(F_access_denied);
if (errno == EBADF) return F_status_set_error(F_directory_descriptor);
if (errno == EFAULT) return F_status_set_error(F_buffer);
#endif // _di_f_file_touch_at_
#ifndef _di_f_file_type_
- f_status_t f_file_type(const f_string_t path, int *type) {
+ f_status_t f_file_type(const f_string_static_t path, int *type) {
#ifndef _di_level_0_parameter_checking_
- if (!path) return F_status_set_error(F_parameter);
if (!type) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!path.used) {
+ return F_data_not;
+ }
+
struct stat stat_file;
memset(&stat_file, 0, sizeof(struct stat));
- if (stat(path, &stat_file) < 0) {
+ if (stat(path.string, &stat_file) < 0) {
if (errno == ENAMETOOLONG) return F_status_set_error(F_name);
if (errno == EFAULT) return F_status_set_error(F_buffer);
if (errno == ENOMEM) return F_status_set_error(F_memory_not);
#endif // _di_f_file_type_
#ifndef _di_f_file_type_at_
- f_status_t f_file_type_at(const int at_id, const f_string_t path, const int flag, int *type) {
+ f_status_t f_file_type_at(const int at_id, const f_string_static_t path, const int flag, int *type) {
#ifndef _di_level_0_parameter_checking_
- if (!path) return F_status_set_error(F_parameter);
if (!type) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
+ if (!path.used) {
+ return F_data_not;
+ }
+
struct stat stat_file;
memset(&stat_file, 0, sizeof(struct stat));
- if (fstatat(at_id, path, &stat_file, flag) < 0) {
+ if (fstatat(at_id, path.string, &stat_file, flag) < 0) {
if (errno == ENAMETOOLONG) return F_status_set_error(F_name);
if (errno == EFAULT) return F_status_set_error(F_buffer);
if (errno == ENOMEM) return F_status_set_error(F_memory_not);
f_status_t f_file_write(const f_file_t file, const f_string_static_t buffer, f_array_length_t *written) {
#ifndef _di_level_0_parameter_checking_
if (!file.size_write) return F_status_set_error(F_parameter);
- if (buffer.used > buffer.size) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
if (file.id == -1) {
f_status_t status = F_none;
if (written) {
- private_f_file_write_until(file, buffer.string, buffer.used, written);
+ private_f_file_write_until(file, buffer, buffer.used, written);
if (status == F_none && *written == buffer.used) {
return F_none_eos;
else {
f_array_length_t written_local = 0;
- private_f_file_write_until(file, buffer.string, buffer.used, &written_local);
+ private_f_file_write_until(file, buffer, buffer.used, &written_local);
if (status == F_none && written_local == buffer.used) {
return F_none_eos;
f_status_t f_file_write_block(const f_file_t file, const f_string_static_t buffer, f_array_length_t *written) {
#ifndef _di_level_0_parameter_checking_
if (!file.size_write) return F_status_set_error(F_parameter);
- if (buffer.used > buffer.size) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
if (file.id == -1) {
f_status_t status = F_none;
if (written) {
- private_f_file_write_until(file, buffer.string, write_max, written);
+ private_f_file_write_until(file, buffer, write_max, written);
if (status == F_none) {
if (*written == buffer.used) {
else {
f_array_length_t written_local = 0;
- private_f_file_write_until(file, buffer.string, write_max, &written_local);
+ private_f_file_write_until(file, buffer, write_max, &written_local);
if (status == F_none) {
if (written_local == buffer.used) {
f_status_t f_file_write_until(const f_file_t file, const f_string_static_t buffer, const f_array_length_t total, f_array_length_t *written) {
#ifndef _di_level_0_parameter_checking_
if (!file.size_write) return F_status_set_error(F_parameter);
- if (buffer.used > buffer.size) return F_status_set_error(F_parameter);
if (!total) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
f_status_t status = F_none;
if (written) {
- private_f_file_write_until(file, buffer.string, write_max, written);
+ private_f_file_write_until(file, buffer, write_max, written);
if (status == F_none) {
if (*written == buffer.used) {
else {
f_array_length_t written_local = 0;
- private_f_file_write_until(file, buffer.string, buffer.used, &written_local);
+ private_f_file_write_until(file, buffer, buffer.used, &written_local);
if (status == F_none) {
if (written_local == buffer.used) {
f_status_t f_file_write_range(const f_file_t file, const f_string_static_t buffer, const f_string_range_t range, f_array_length_t *written) {
#ifndef _di_level_0_parameter_checking_
if (!file.size_write) return F_status_set_error(F_parameter);
- if (buffer.used > buffer.size) return F_status_set_error(F_parameter);
if (range.stop < range.start) return F_status_set_error(F_parameter);
if (range.start >= buffer.used) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
}
if (!buffer.used) {
- if (written) *written = 0;
+ if (written) {
+ *written = 0;
+ }
return F_data_not;
}
f_status_t status = F_none;
if (written) {
- private_f_file_write_until(file, buffer.string + range.start, write_max, written);
+ const f_string_static_t buffer_adjusted = macro_f_string_static_t_initialize(buffer.string + range.start, 0, buffer.used - range.start);
+
+ private_f_file_write_until(file, buffer_adjusted, write_max, written);
if (status == F_none) {
if (range.start + *written == buffer.used) {
}
}
else {
+ const f_string_static_t buffer_adjusted = macro_f_string_static_t_initialize(buffer.string + range.start, 0, buffer.used - range.start);
f_array_length_t written_local = 0;
- private_f_file_write_until(file, buffer.string + range.start, write_max, &written_local);
+ private_f_file_write_until(file, buffer_adjusted, write_max, &written_local);
if (status == F_none) {
if (range.start + written_local == buffer.used) {
* @return
* F_true if file exists.
* F_false if file does not exist.
+ * F_data_not if path.used is 0.
+ *
* F_access_denied (with error bit) on access denied.
* F_directory (with error bit) on invalid directory.
* F_false (with error bit) on unknown/unhandled errors.
* @see access()
*/
#ifndef _di_f_file_access_
- extern f_status_t f_file_access(const f_string_t path);
+ extern f_status_t f_file_access(const f_string_static_t path);
#endif // _di_f_file_access_
/**
*
* @return
* F_none on success.
+ * F_data_not if source.used or destination.used is 0.
*
* F_access_denied (with error bit) on access denied.
* F_access_group (with error bit) if the current user does not have access to assign the specified group.
* F_failure (with error bit) for any other error.
*/
#ifndef _di_f_file_clone_
- extern f_status_t f_file_clone(const f_string_t source, const f_string_t destination, const bool role, const f_number_unsigned_t size_block, const bool exclusive);
+ extern f_status_t f_file_clone(const f_string_static_t source, const f_string_static_t destination, const bool role, const f_number_unsigned_t size_block, const bool exclusive);
#endif // _di_f_file_clone_
/**
*
* @return
* F_none on success.
+ * F_data_not if source.used or destination.used is 0.
*
* F_access_denied (with error bit) on access denied.
* F_busy (with error bit) if file system is too busy to perform write.
* F_failure (with error bit) for any other error.
*/
#ifndef _di_f_file_copy_
- extern f_status_t f_file_copy(const f_string_t source, const f_string_t destination, const f_mode_t mode, const f_number_unsigned_t size_block, const bool exclusive);
+ extern f_status_t f_file_copy(const f_string_static_t source, const f_string_static_t destination, const f_mode_t mode, const f_number_unsigned_t size_block, const bool exclusive);
#endif // _di_f_file_copy_
/**
*
* @return
* F_none on success.
+ * F_data_not if path.used is 0.
*
* F_access_denied (with error bit) on access denied.
* F_busy (with error bit) if file system is too busy to perform write.
* @see open()
*/
#ifndef _di_f_file_create_
- extern f_status_t f_file_create(const f_string_t path, const mode_t mode, const bool exclusive);
+ extern f_status_t f_file_create(const f_string_static_t path, const mode_t mode, const bool exclusive);
#endif // _di_f_file_create_
/**
*
* @return
* F_none on success.
+ * F_data_not if path.used is 0.
*
* F_access_denied (with error bit) on access denied.
* F_busy (with error bit) if file system is too busy to perform write.
* @see openat()
*/
#ifndef _di_f_file_create_at_
- extern f_status_t f_file_create_at(const int at_id, const f_string_t path, const mode_t mode, const bool exclusive);
+ extern f_status_t f_file_create_at(const int at_id, const f_string_static_t path, const mode_t mode, const bool exclusive);
#endif // _di_f_file_create_at_
/**
*
* @return
* F_none on success.
+ * F_data_not if path.used is 0.
*
* F_access_denied (with error bit) on access denied.
* F_directory (with error bit) if a supposed directory in path is not actually a directory.
* @see mknod()
*/
#ifndef _di_f_file_create_device_
- extern f_status_t f_file_create_device(const f_string_t path, const mode_t mode, const unsigned int major, const unsigned int minor);
+ extern f_status_t f_file_create_device(const f_string_static_t path, const mode_t mode, const unsigned int major, const unsigned int minor);
#endif // _di_f_file_create_device_
/**
*
* @return
* F_none on success.
+ * F_data_not if path.used is 0.
*
* F_access_denied (with error bit) on access denied.
* F_directory (with error bit) if a supposed directory in path is not actually a directory.
* @see mknodat()
*/
#ifndef _di_f_file_create_device_at_
- extern f_status_t f_file_create_device_at(const int at_id, const f_string_t path, const mode_t mode, const unsigned int major, const unsigned int minor);
+ extern f_status_t f_file_create_device_at(const int at_id, const f_string_static_t path, const mode_t mode, const unsigned int major, const unsigned int minor);
#endif // _di_f_file_create_device_at_
/**
*
* @return
* F_none on success.
+ * F_data_not if path.used is 0.
*
* F_access_denied (with error bit) on access denied.
* F_directory (with error bit) if a supposed directory in path is not actually a directory.
* @see mkfifo()
*/
#ifndef _di_f_file_create_fifo_
- extern f_status_t f_file_create_fifo(const f_string_t path, const mode_t mode);
+ extern f_status_t f_file_create_fifo(const f_string_static_t path, const mode_t mode);
#endif // _di_f_file_create_fifo_
/**
*
* @return
* F_none on success.
+ * F_data_not if path.used is 0.
*
* F_access_denied (with error bit) on access denied.
* F_directory (with error bit) if a supposed directory in path is not actually a directory.
* @see mkfifoat()
*/
#ifndef _di_f_file_create_fifo_at_
- extern f_status_t f_file_create_fifo_at(const int at_id, const f_string_t path, const mode_t mode);
+ extern f_status_t f_file_create_fifo_at(const int at_id, const f_string_static_t path, const mode_t mode);
#endif // _di_f_file_create_fifo_at_
/**
*
* @return
* F_none on success.
+ * F_data_not if path.used is 0.
*
* F_access_denied (with error bit) on access denied.
* F_directory (with error bit) if a supposed directory in path is not actually a directory.
* @see mknod()
*/
#ifndef _di_f_file_create_node_
- extern f_status_t f_file_create_node(const f_string_t path, const mode_t mode, const dev_t device);
+ extern f_status_t f_file_create_node(const f_string_static_t path, const mode_t mode, const dev_t device);
#endif // _di_f_file_create_node_
/**
*
* @return
* F_none on success.
+ * F_data_not if path.used is 0.
*
* F_access_denied (with error bit) on access denied.
* F_directory (with error bit) if a supposed directory in path is not actually a directory.
* @see mknodat()
*/
#ifndef _di_f_file_create_node_at_
- extern f_status_t f_file_create_node_at(const int at_id, const f_string_t path, const mode_t mode, const dev_t device);
+ extern f_status_t f_file_create_node_at(const int at_id, const f_string_static_t path, const mode_t mode, const dev_t device);
#endif // _di_f_file_create_node_at_
/**
* @return
* F_true if path was found.
* F_false if path was not found.
+ * F_data_not if path.used is 0.
*
* F_access_denied (with error bit) if access to the file was denied.
* F_directory (with error bit) on invalid directory.
* @see stat()
*/
#ifndef _di_f_file_exists_
- extern f_status_t f_file_exists(const f_string_t path);
+ extern f_status_t f_file_exists(const f_string_static_t path);
#endif // _di_f_file_exists_
/**
* @return
* F_true if file exists.
* F_false if file does not exist.
+ * F_data_not if path.used is 0.
*
* F_access_denied (with error bit) on access denied.
* F_directory (with error bit) on invalid directory.
* @see fstatat()
*/
#ifndef _di_f_file_exists_at_
- extern f_status_t f_file_exists_at(const int at_id, const f_string_t path, const int flag);
+ extern f_status_t f_file_exists_at(const int at_id, const f_string_static_t path, const int flag);
#endif // _di_f_file_exists_at_
/**
*
* @return
* F_none on success.
+ * F_data_not if path.used is 0.
*
* F_access_denied (with error bit) if access to the file was denied.
* F_directory (with error bit) on invalid directory.
* @see fstat()
*/
#ifndef _di_f_file_group_read_
- extern f_status_t f_file_group_read(const f_string_t path, uid_t *group);
+ extern f_status_t f_file_group_read(const f_string_static_t path, uid_t *group);
#endif // _di_f_file_group_read_
/**
* F_true if path was found and path is type.
* F_false if path was found and path is not type.
* F_file_found_not if the path was not found.
+ * F_data_not if path.used is 0.
*
* F_access_denied (with error bit) if access to the file was denied.
* F_directory (with error bit) on invalid directory.
* @see stat()
*/
#ifndef _di_f_file_is_
- extern f_status_t f_file_is(const f_string_t path, const int type, const bool dereference);
+ extern f_status_t f_file_is(const f_string_static_t path, const int type, const bool dereference);
#endif // _di_f_file_is_
/**
* F_true if path was found and path is type.
* F_false if path was found and path is not type.
* F_file_found_not if the path was not found.
+ * F_data_not if path.used is 0.
*
* F_access_denied (with error bit) if access to the file was denied.
* F_directory (with error bit) on invalid directory.
* @see fstatat()
*/
#ifndef _di_f_file_is_at_
- extern f_status_t f_file_is_at(const int at_id, const f_string_t path, const int type, const int flag);
+ extern f_status_t f_file_is_at(const int at_id, const f_string_static_t path, const int type, const int flag);
#endif // _di_f_file_is_at_
/**
*
* @return
* F_none on success.
+ * F_data_not if target.used or point.used is 0.
*
* F_access_denied (with error bit) on access denied.
* F_buffer (with error bit) if the buffer is invalid.
* @see symlink()
*/
#ifndef _di_f_file_link_
- extern f_status_t f_file_link(const f_string_t target, const f_string_t point);
+ extern f_status_t f_file_link(const f_string_static_t target, const f_string_static_t point);
#endif // _di_f_file_link_
/**
*
* @return
* F_none on success.
+ * F_data_not if target.used or point.used is 0.
*
* F_access_denied (with error bit) on access denied.
* F_busy (with error bit) if file system is too busy to perform write.
* @see symlinkat()
*/
#ifndef _di_f_file_link_at_
- extern f_status_t f_file_link_at(const int at_id, const f_string_t target, const f_string_t point);
+ extern f_status_t f_file_link_at(const int at_id, const f_string_static_t target, const f_string_static_t point);
#endif // _di_f_file_link_at_
/**
*
* @return
* F_none on success.
+ * F_data_not if target.used or point.used is 0.
*
* F_access_denied (with error bit) on access denied.
* F_buffer (with error bit) if the buffer is invalid.
* @see link()
*/
#ifndef _di_f_file_link_hard_
- extern f_status_t f_file_link_hard(const f_string_t target, const f_string_t point);
+ extern f_status_t f_file_link_hard(const f_string_static_t target, const f_string_static_t point);
#endif // _di_f_file_link_hard_
/**
*
* @return
* F_none on success.
+ * F_data_not if target.used or point.used is 0.
*
* F_access_denied (with error bit) on access denied.
* F_buffer (with error bit) if the buffer is invalid.
* @see linkat()
*/
#ifndef _di_f_file_link_hard_at_
- extern f_status_t f_file_link_hard_at(const int at_id_target, const int at_id_point, const f_string_t target, const f_string_t point, const int flag);
+ extern f_status_t f_file_link_hard_at(const int at_id_target, const int at_id_point, const f_string_static_t target, const f_string_static_t point, const int flag);
#endif // _di_f_file_link_hard_at_
/**
*
* @return
* F_none on success.
+ * F_data_not if path.used is 0.
*
* F_access_denied (with error bit) on access denied.
* F_buffer (with error bit) if the buffer is invalid.
* @see readlink()
*/
#ifndef _di_f_file_link_read_
- extern f_status_t f_file_link_read(const f_string_t path, const struct stat link_stat, f_string_dynamic_t *target);
+ extern f_status_t f_file_link_read(const f_string_static_t path, const struct stat link_stat, f_string_dynamic_t *target);
#endif // _di_f_file_link_read_
/**
*
* @return
* F_none on success.
+ * F_data_not if path.used is 0.
*
* F_access_denied (with error bit) on access denied.
* F_buffer (with error bit) if the buffer is invalid.
* @see readlinkat()
*/
#ifndef _di_f_file_link_read_at_
- extern f_status_t f_file_link_read_at(const int at_id, const f_string_t path, const struct stat link_stat, f_string_dynamic_t *target);
+ extern f_status_t f_file_link_read_at(const int at_id, const f_string_static_t path, const struct stat link_stat, f_string_dynamic_t *target);
#endif // _di_f_file_link_read_at_
/**
*
* @fixme apparently "u+g" is valid such that the mode from the group (g) is applied to the user (u) mode.
*
- * @param string
+ * @param code
* A NULL terminated string designating the desired mode, following the above string syntax.
* @param umask
* The umask to be applied to the file mode, when applicable.
* @see private_f_file_mode_determine()
*/
#ifndef _di_f_file_mode_from_string_
- extern f_status_t f_file_mode_from_string(const f_string_t string, const mode_t umask, f_file_mode_t *mode, uint8_t *replace);
+ extern f_status_t f_file_mode_from_string(const f_string_static_t code, const mode_t umask, f_file_mode_t *mode, uint8_t *replace);
#endif // _di_f_file_mode_from_string_
/**
*
* @return
* F_none on success.
+ * F_data_not if path.used is 0.
*
* F_access_denied (with error bit) if access to the file was denied.
* F_directory (with error bit) on invalid directory.
* @see fstat()
*/
#ifndef _di_f_file_mode_read_
- extern f_status_t f_file_mode_read(const f_string_t path, mode_t *mode);
+ extern f_status_t f_file_mode_read(const f_string_static_t path, mode_t *mode);
#endif // _di_f_file_mode_read_
/**
*
* @return
* F_none on success.
+ * F_data_not if path.used is 0.
*
* F_access_denied (with error bit) if access to the file was denied.
* F_directory (with error bit) on invalid directory.
* @see fstatat()
*/
#ifndef _di_f_file_mode_read_at_
- extern f_status_t f_file_mode_read_at(const int at_id, const f_string_t path, mode_t *mode);
+ extern f_status_t f_file_mode_read_at(const int at_id, const f_string_static_t path, mode_t *mode);
#endif // _di_f_file_mode_read_at_
/**
*
* @return
* F_none on success.
+ * F_data_not if path.used is 0.
*
* F_access_denied (with error bit) on access denied.
* F_access_mode (with error bit) if the current user does not have access to assign the file mode.
* @see chmod()
*/
#ifndef _di_f_file_mode_set_
- extern f_status_t f_file_mode_set(const f_string_t path, const mode_t mode);
+ extern f_status_t f_file_mode_set(const f_string_static_t path, const mode_t mode);
#endif // _di_f_file_mode_set_
/**
*
* @return
* F_none on success.
+ * F_data_not if path.used is 0.
*
* F_access_denied (with error bit) on access denied.
* F_access_mode (with error bit) if the current user does not have access to assign the file mode.
* @see fchmodat()
*/
#ifndef _di_f_file_mode_set_at_
- extern f_status_t f_file_mode_set_at(const int at_id, const f_string_t path, const mode_t mode);
+ extern f_status_t f_file_mode_set_at(const int at_id, const f_string_static_t path, const mode_t mode);
#endif // _di_f_file_mode_set_at_
/**
* @param path
* The path file name.
* Need not be NULL terminated.
- * @param length
- * The length of the path string.
* @param name_base
* The resulting base name as per basename().
* The base name is appended onto this.
*
* @return
* F_none on success.
+ * F_data_not if path.used is 0.
*
* F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
* F_string_too_large (with error bit) if string is too large to store in the buffer.
*
+ * Errors (with error bit) from: f_string_dynamic_increase_by().
+ *
* @see basename()
+ *
+ * @see f_string_dynamic_increase_by()
*/
#ifndef _di_f_file_name_base_
- extern f_status_t f_file_name_base(const f_string_t path, const f_array_length_t length, f_string_dynamic_t *name_base);
+ extern f_status_t f_file_name_base(const f_string_static_t path, f_string_dynamic_t *name_base);
#endif // _di_f_file_name_base_
/**
* @param path
* The path file name.
* Need not be NULL terminated.
- * @param length
- * The length of the path string.
* @param name_directory
* The resulting base name as per dirname().
* The directory name is appended onto this.
*
* @return
* F_none on success.
+ * F_data_not if path.used is 0.
*
* F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
* F_string_too_large (with error bit) if string is too large to store in the buffer.
*
+ * Errors (with error bit) from: f_string_dynamic_increase_by().
+ *
* @see dirname()
+ *
+ * @see f_string_dynamic_increase_by()
*/
#ifndef _di_f_file_name_directory_
- extern f_status_t f_file_name_directory(const f_string_t path, const f_array_length_t length, f_string_dynamic_t *name_directory);
+ extern f_status_t f_file_name_directory(const f_string_static_t path, f_string_dynamic_t *name_directory);
#endif // _di_f_file_name_directory_
/**
*
* @return
* F_none is returned on success.
+ * F_data_not if path.used is 0.
*
* F_access_denied (with error bit) on access denied.
* F_buffer (with error bit) if the buffer is invalid.
* @see open()
*/
#ifndef _di_f_file_open_
- extern f_status_t f_file_open(const f_string_t path, const mode_t mode, f_file_t *file);
+ extern f_status_t f_file_open(const f_string_static_t path, const mode_t mode, f_file_t *file);
#endif // _di_f_file_open_
/**
*
* @return
* F_none on success.
+ * F_data_not if path.used is 0.
*
* F_directory_descriptor (with error bit) for bad directory descriptor for at_id.
* F_file_found_not (with error bit) if the file was not found.
* @see openat()
*/
#ifndef _di_f_file_open_at_
- extern f_status_t f_file_open_at(const int at_id, const f_string_t path, const mode_t mode, f_file_t *file);
+ extern f_status_t f_file_open_at(const int at_id, const f_string_static_t path, const mode_t mode, f_file_t *file);
#endif // _di_f_file_open_at_
/**
*
* @return
* F_none on success.
+ * F_data_not if path.used is 0.
*
* F_access_denied (with error bit) if access to the file was denied.
* F_directory (with error bit) on invalid directory.
* @see fstat()
*/
#ifndef _di_f_file_owner_read_
- extern f_status_t f_file_owner_read(const f_string_t path, uid_t *owner);
+ extern f_status_t f_file_owner_read(const f_string_static_t path, uid_t *owner);
#endif // _di_f_file_owner_read_
/**
* F_interrupt (with error bit) if interrupt was received.
* F_parameter (with error bit) if a parameter is invalid.
*
+ * Errors (with error bit) from: f_string_dynamic_increase_by().
+ *
* @see read()
+ *
+ * @see f_string_dynamic_increase_by()
*/
#ifndef _di_f_file_read_
extern f_status_t f_file_read(const f_file_t file, f_string_dynamic_t *buffer);
* @see unlink()
*/
#ifndef _di_f_file_remove_
- extern f_status_t f_file_remove(const f_string_t path);
+ extern f_status_t f_file_remove(const f_string_static_t path);
#endif // _di_f_file_remove_
/**
* @see unlinkat()
*/
#ifndef _di_f_file_remove_at_
- extern f_status_t f_file_remove_at(const int at_id, const f_string_t path, const int flag);
+ extern f_status_t f_file_remove_at(const int at_id, const f_string_static_t path, const int flag);
#endif // _di_f_file_remove_at_
/**
* @see rename()
*/
#ifndef _di_f_file_rename_
- extern f_status_t f_file_rename(const f_string_t source, const f_string_t destination);
+ extern f_status_t f_file_rename(const f_string_static_t source, const f_string_static_t destination);
#endif // _di_f_file_rename_
/**
* @see renameat()
*/
#ifndef _di_f_file_rename_at_
- extern f_status_t f_file_rename_at(const int at_id, const int to_id, const f_string_t source, const f_string_t destination);
+ extern f_status_t f_file_rename_at(const int at_id, const int to_id, const f_string_static_t source, const f_string_static_t destination);
#endif // _di_f_file_rename_at_
/**
* @see lchown()
*/
#ifndef _di_f_file_role_change_
- extern f_status_t f_file_role_change(const f_string_t path, const uid_t uid, const gid_t gid, const bool dereference);
+ extern f_status_t f_file_role_change(const f_string_static_t path, const uid_t uid, const gid_t gid, const bool dereference);
#endif // _di_f_file_role_change_
/**
* @see fchownat()
*/
#ifndef _di_f_file_role_change_at_
- extern f_status_t f_file_role_change_at(const int at_id, const f_string_t path, const uid_t uid, const gid_t gid, const int flag);
+ extern f_status_t f_file_role_change_at(const int at_id, const f_string_static_t path, const uid_t uid, const gid_t gid, const int flag);
#endif // _di_f_file_role_change_at_
/**
* @see f_file_stat()
*/
#ifndef _di_f_file_size_
- extern f_status_t f_file_size(const f_string_t path, const bool dereference, f_array_length_t *size);
+ extern f_status_t f_file_size(const f_string_static_t path, const bool dereference, f_array_length_t *size);
#endif // _di_f_file_size_
/**
* @see f_file_stat_at()
*/
#ifndef _di_f_file_size_at_
- extern f_status_t f_file_size_at(const int at_id, const f_string_t path, const bool dereference, f_array_length_t *size);
+ extern f_status_t f_file_size_at(const int at_id, const f_string_static_t path, const bool dereference, f_array_length_t *size);
#endif // _di_f_file_size_at_
/**
* @see stat()
*/
#ifndef _di_f_file_stat_
- extern f_status_t f_file_stat(const f_string_t path, const bool dereference, struct stat *stat_file);
+ extern f_status_t f_file_stat(const f_string_static_t path, const bool dereference, struct stat *stat_file);
#endif // _di_f_file_stat_
/**
* @see fstatat()
*/
#ifndef _di_f_file_stat_at_
- extern f_status_t f_file_stat_at(const int at_id, const f_string_t path, const int flag, struct stat *stat_file);
+ extern f_status_t f_file_stat_at(const int at_id, const f_string_static_t path, const int flag, struct stat *stat_file);
#endif // _di_f_file_stat_at_
/**
*
* @param mode
* The file modes do use when opening.
- * The file modes do use when opening.
- * Set to 0 to determine mode from file.flags (falling back to read only as a failsafe).
+ * Set mode.used to 0 to determine mode from file.flags (falling back to read only as a failsafe).
* If neither truncate nor append are not specified in write only mode, then the failsafe is to append.
* This should match the modes used to open the file descriptor as it relates to the stream modes.
* @param file
* @see fdopen()
*/
#ifndef _di_f_file_stream_descriptor_
- extern f_status_t f_file_stream_descriptor(const f_string_t mode, f_file_t *file);
+ extern f_status_t f_file_stream_descriptor(const f_string_static_t mode, f_file_t *file);
#endif // _di_f_file_stream_descriptor_
/**
* The file path
* @param mode
* The file modes do use when opening, as an fopen() file mode string.
- * Set to 0 to determine mode from file.flags (falling back to read only as a failsafe).
+ * Set mode.used to 0 to determine mode from file.flags (falling back to read only as a failsafe).
* If neither truncate nor append are not specified in write only mode, then the failsafe is to append.
*
* File Modes (fopen() file modes vs open file modes):
* @see fopen()
*/
#ifndef _di_f_file_stream_open_
- extern f_status_t f_file_stream_open(const f_string_t path, const f_string_t mode, f_file_t *file);
+ extern f_status_t f_file_stream_open(const f_string_static_t path, const f_string_static_t mode, f_file_t *file);
#endif // _di_f_file_stream_open_
/**
* F_interrupt (with error bit) if interrupt was received.
* F_parameter (with error bit) if a parameter is invalid.
*
+ * Errors (with error bit) from: f_string_dynamic_increase_by().
+ *
* @see fread()
+ *
+ * @see f_string_dynamic_increase_by()
*/
#ifndef _di_f_file_stream_read_until_
extern f_status_t f_file_stream_read_until(const f_file_t file, const f_array_length_t total, f_string_dynamic_t *buffer);
* @see freopen()
*/
#ifndef _di_f_file_stream_reopen_
- extern f_status_t f_file_stream_reopen(const f_string_t path, const f_string_t mode, f_file_t *file);
+ extern f_status_t f_file_stream_reopen(const f_string_static_t path, const f_string_static_t mode, f_file_t *file);
#endif // _di_f_file_stream_reopen_
/**
* @see utimensat()
*/
#ifndef _di_f_file_touch_
- extern f_status_t f_file_touch(const f_string_t path, const mode_t mode, const bool dereference);
+ extern f_status_t f_file_touch(const f_string_static_t path, const mode_t mode, const bool dereference);
#endif // _di_f_file_touch_
/**
* @see utimensat()
*/
#ifndef _di_f_file_touch_at_
- extern f_status_t f_file_touch_at(const int at_id, const f_string_t path, const mode_t mode, const int flag);
+ extern f_status_t f_file_touch_at(const int at_id, const f_string_static_t path, const mode_t mode, const int flag);
#endif // _di_f_file_touch_at_
/**
* @see stat()
*/
#ifndef _di_f_file_type_
- extern f_status_t f_file_type(const f_string_t path, int *type);
+ extern f_status_t f_file_type(const f_string_static_t path, int *type);
#endif // _di_f_file_type_
/**
* @see fstatat()
*/
#ifndef _di_f_file_type_at_
- extern f_status_t f_file_type_at(const int at_id, const f_string_t path, const int flag, int *type);
+ extern f_status_t f_file_type_at(const int at_id, const f_string_static_t path, const int flag, int *type);
#endif // _di_f_file_type_at_
/**
#endif // !defined(_di_f_file_close_) || !defined(_di_f_file_copy_) || !defined(_di_f_file_stream_close_)
#if !defined(_di_f_file_copy_) || !defined(_di_f_file_clone_)
- f_status_t private_f_file_copy_content(const f_string_t source, const f_string_t destination, const f_number_unsigned_t size_block) {
+ f_status_t private_f_file_copy_content(const f_string_static_t source, const f_string_static_t destination, const f_number_unsigned_t size_block) {
f_file_t file_source = f_file_t_initialize;
f_file_t file_destination = f_file_t_initialize;
#endif // !defined(_di_f_file_copy_) || !defined(_di_f_file_clone_)
#if !defined(_di_f_file_copy_at_) || !defined(_di_f_file_clone_at_)
- f_status_t private_f_file_copy_content_at(const int at_id, const f_string_t source, const f_string_t destination, const f_number_unsigned_t size_block) {
+ f_status_t private_f_file_copy_content_at(const int at_id, const f_string_static_t source, const f_string_static_t destination, const f_number_unsigned_t size_block) {
f_file_t file_source = f_file_t_initialize;
f_file_t file_destination = f_file_t_initialize;
#endif // !defined(_di_f_file_copy_at_) || !defined(_di_f_file_clone_at_)
#if !defined(_di_f_file_create_) || !defined(_di_f_file_copy_)
- f_status_t private_f_file_create(const f_string_t path, const mode_t mode, const bool exclusive) {
+ f_status_t private_f_file_create(const f_string_static_t path, const mode_t mode, const bool exclusive) {
f_file_t file = f_file_t_initialize;
#endif // !defined(_di_f_file_create_) || !defined(_di_f_file_copy_)
#if !defined(_di_f_file_create_at_) || !defined(_di_f_file_copy_at_)
- f_status_t private_f_file_create_at(const int at_id, const f_string_t path, const mode_t mode, const bool exclusive) {
+ f_status_t private_f_file_create_at(const int at_id, const f_string_static_t path, const mode_t mode, const bool exclusive) {
f_file_t file = f_file_t_initialize;
#endif // !defined(_di_f_file_create_at_) || !defined(_di_f_file_copy_at_)
#if !defined(_di_f_file_copy_)
- f_status_t private_f_file_create_directory(const f_string_t path, const mode_t mode) {
+ f_status_t private_f_file_create_directory(const f_string_static_t path, const mode_t mode) {
- if (mkdir(path, mode) < 0) {
+ if (mkdir(path.string, mode) < 0) {
if (errno == EACCES) return F_status_set_error(F_access_denied);
if (errno == EDQUOT) return F_status_set_error(F_filesystem_quota_block);
if (errno == EEXIST) return F_status_set_error(F_file_found);
#endif // !defined(_di_f_file_copy_)
#if !defined(_di_f_file_copy_at_)
- f_status_t private_f_file_create_directory_at(const int at_id, const f_string_t path, const mode_t mode) {
+ f_status_t private_f_file_create_directory_at(const int at_id, const f_string_static_t path, const mode_t mode) {
- if (mkdirat(at_id, path, mode) < 0) {
+ if (mkdirat(at_id, path.string, mode) < 0) {
if (errno == EACCES) return F_status_set_error(F_access_denied);
if (errno == EDQUOT) return F_status_set_error(F_filesystem_quota_block);
if (errno == EEXIST) return F_status_set_error(F_file_found);
#endif // !defined(_di_f_file_copy_at_)
#if !defined(_di_f_file_create_fifo_) || !defined(_di_f_file_copy_)
- f_status_t private_f_file_create_fifo(const f_string_t path, const mode_t mode) {
+ f_status_t private_f_file_create_fifo(const f_string_static_t path, const mode_t mode) {
- if (mkfifo(path, mode) < 0) {
+ if (mkfifo(path.string, mode) < 0) {
if (errno == EACCES) return F_status_set_error(F_access_denied);
if (errno == EDQUOT) return F_status_set_error(F_filesystem_quota_block);
if (errno == EEXIST) return F_status_set_error(F_file_found);
#endif // !defined(_di_f_file_create_fifo_) || !defined(_di_f_file_copy_)
#if !defined(_di_f_file_create_fifo_at_) || !defined(_di_f_file_copy_at_)
- f_status_t private_f_file_create_fifo_at(const int at_id, const f_string_t path, const mode_t mode) {
+ f_status_t private_f_file_create_fifo_at(const int at_id, const f_string_static_t path, const mode_t mode) {
- if (mkfifoat(at_id, path, mode) < 0) {
+ if (mkfifoat(at_id, path.string, mode) < 0) {
if (errno == EACCES) return F_status_set_error(F_access_denied);
if (errno == EDQUOT) return F_status_set_error(F_filesystem_quota_block);
if (errno == EEXIST) return F_status_set_error(F_file_found);
#endif // !defined(_di_f_file_create_fifo_at_) || !defined(_di_f_file_copy_at_)
#if !defined(_di_f_file_create_device_) || !defined(_di_f_file_create_node_) || !defined(_di_f_file_copy_)
- f_status_t private_f_file_create_node(const f_string_t path, const mode_t mode, const dev_t device) {
+ f_status_t private_f_file_create_node(const f_string_static_t path, const mode_t mode, const dev_t device) {
- if (mknod(path, mode, device) < 0) {
+ if (mknod(path.string, mode, device) < 0) {
if (errno == EACCES) return F_status_set_error(F_access_denied);
if (errno == EDQUOT) return F_status_set_error(F_filesystem_quota_block);
if (errno == EEXIST) return F_status_set_error(F_file_found);
#endif // !defined(_di_f_file_create_device_) || !defined(_di_f_file_create_node_) || !defined(_di_f_file_copy_)
#if !defined(_di_f_file_create_device_at_) || !defined(_di_f_file_create_node_at_) || !defined(_di_f_file_copy_at_)
- f_status_t private_f_file_create_node_at(const int at_id, const f_string_t path, const mode_t mode, const dev_t device) {
+ f_status_t private_f_file_create_node_at(const int at_id, const f_string_static_t path, const mode_t mode, const dev_t device) {
- if (mknodat(at_id, path, mode, device) < 0) {
+ if (mknodat(at_id, path.string, mode, device) < 0) {
if (errno == EACCES) return F_status_set_error(F_access_denied);
if (errno == EDQUOT) return F_status_set_error(F_filesystem_quota_block);
if (errno == EEXIST) return F_status_set_error(F_file_found);
#endif // !defined(_di_f_file_flush_) || !defined(_di_f_file_close_) || !defined(_di_f_file_copy_)
#if !defined(_di_f_file_link_) || !defined(_di_f_file_copy_)
- f_status_t private_f_file_link(const f_string_t target, const f_string_t point) {
+ f_status_t private_f_file_link(const f_string_static_t target, const f_string_static_t point) {
- if (symlink(target, point) < 0) {
+ if (symlink(target.string, point.string) < 0) {
if (errno == EACCES) return F_status_set_error(F_access_denied);
if (errno == EDQUOT) return F_status_set_error(F_filesystem_quota_block);
if (errno == EEXIST) return F_status_set_error(F_file_found);
#endif // !defined(_di_f_file_link_) || !defined(_di_f_file_copy_)
#if !defined(_di_f_file_link_at_) || !defined(_di_f_file_copy_at_)
- f_status_t private_f_file_link_at(const int at_id, const f_string_t target, const f_string_t point) {
+ f_status_t private_f_file_link_at(const int at_id, const f_string_static_t target, const f_string_static_t point) {
- if (symlinkat(target, at_id, point) < 0) {
+ if (symlinkat(target.string, at_id, point.string) < 0) {
if (errno == EACCES) return F_status_set_error(F_access_denied);
if (errno == EDQUOT) return F_status_set_error(F_filesystem_quota_block);
if (errno == EEXIST) return F_status_set_error(F_file_found);
#endif // !defined(_di_f_file_link_at_) || !defined(_di_f_file_copy_at_)
#if !defined(_di_f_file_link_read_) || !defined(_di_f_file_copy_)
- f_status_t private_f_file_link_read(const f_string_t path, const struct stat link_stat, f_string_dynamic_t *target) {
+ f_status_t private_f_file_link_read(const f_string_static_t path, const struct stat link_stat, f_string_dynamic_t *target) {
// create a NULL terminated string based on file stat.
if (link_stat.st_size + 1 > target->size) {
target->used = link_stat.st_size;
- if (readlink(path, target->string, target->used) < 0) {
+ if (readlink(path.string, target->string, target->used) < 0) {
if (errno == EACCES) return F_status_set_error(F_access_denied);
if (errno == EFAULT) return F_status_set_error(F_buffer);
if (errno == EINVAL) return F_status_set_error(F_parameter);
#endif // !defined(_di_f_file_link_read_) || !defined(_di_f_file_copy_)
#if !defined(_di_f_file_link_read_at_) || !defined(_di_f_file_copy_at_)
- f_status_t private_f_file_link_read_at(const int at_id, const f_string_t path, const struct stat link_stat, f_string_dynamic_t *target) {
+ f_status_t private_f_file_link_read_at(const int at_id, const f_string_static_t path, const struct stat link_stat, f_string_dynamic_t *target) {
- // create a NULL terminated string based on file stat.
+ // Create a NULL terminated string based on file stat.
if (link_stat.st_size + 1 > target->size) {
if (link_stat.st_size + 1 > F_array_length_t_size_d) {
return F_status_set_error(F_string_too_large);
target->used = link_stat.st_size;
- if (readlinkat(at_id, path, target->string, target->used) < 0) {
+ if (readlinkat(at_id, path.string, target->string, target->used) < 0) {
if (errno == EACCES) return F_status_set_error(F_access_denied);
if (errno == EFAULT) return F_status_set_error(F_buffer);
if (errno == EINVAL) return F_status_set_error(F_parameter);
#endif // !defined(_di_f_file_link_read_at_) || !defined(_di_f_file_copy_at_)
#if !defined(_di_f_file_mode_set_) || !defined(_di_f_file_copy_)
- f_status_t private_f_file_mode_set(const f_string_t path, const mode_t mode) {
+ f_status_t private_f_file_mode_set(const f_string_static_t path, const mode_t mode) {
- if (chmod(path, mode) < 0) {
+ if (chmod(path.string, mode) < 0) {
if (errno == EACCES) return F_status_set_error(F_access_denied);
if (errno == ENAMETOOLONG) return F_status_set_error(F_name);
if (errno == EFAULT) return F_status_set_error(F_buffer);
#endif // !defined(_di_f_file_mode_set_) || !defined(_di_f_file_copy_)
#if !defined(_di_f_file_mode_set_at_) || !defined(_di_f_file_copy_at_)
- f_status_t private_f_file_mode_set_at(const int at_id, const f_string_t path, const mode_t mode) {
+ f_status_t private_f_file_mode_set_at(const int at_id, const f_string_static_t path, const mode_t mode) {
- if (fchmodat(at_id, path, mode, 0) < 0) {
+ if (fchmodat(at_id, path.string, mode, 0) < 0) {
if (errno == EACCES) return F_status_set_error(F_access_denied);
if (errno == ENAMETOOLONG) return F_status_set_error(F_name);
if (errno == EFAULT) return F_status_set_error(F_buffer);
#endif // !defined(_di_f_file_mode_set_at_) || !defined(_di_f_file_copy_at_)
#if !defined(_di_f_file_open_) || !defined(_di_f_file_copy_)
- f_status_t private_f_file_open(const f_string_t path, const mode_t mode, f_file_t *file) {
+ f_status_t private_f_file_open(const f_string_static_t path, const mode_t mode, f_file_t *file) {
if (!mode) {
- file->id = open(path, file->flag);
+ file->id = open(path.string, file->flag);
}
else {
- file->id = open(path, file->flag, mode);
+ file->id = open(path.string, file->flag, mode);
}
if (file->id == -1) {
#endif // !defined(_di_f_file_open_) || !defined(_di_f_file_copy_)
#if !defined(_di_f_file_open_at_) || !defined(_di_f_file_copy_at_)
- f_status_t private_f_file_open_at(const int at_id, const f_string_t path, const mode_t mode, f_file_t *file) {
+ f_status_t private_f_file_open_at(const int at_id, const f_string_static_t path, const mode_t mode, f_file_t *file) {
if (!mode) {
- file->id = openat(at_id, path, file->flag);
+ file->id = openat(at_id, path.string, file->flag);
}
else {
- file->id = openat(at_id, path, file->flag, mode);
+ file->id = openat(at_id, path.string, file->flag, mode);
}
if (file->id == -1) {
#endif // !defined(_di_f_file_open_at_) || !defined(_di_f_file_copy_at_)
#if !defined(_di_f_file_role_change_) || !defined(_di_f_file_copy_)
- f_status_t private_f_file_role_change(const f_string_t path, const uid_t uid, const gid_t gid, const bool dereference) {
+ f_status_t private_f_file_role_change(const f_string_static_t path, const uid_t uid, const gid_t gid, const bool dereference) {
int result = 0;
if (dereference) {
if (uid != -1) {
- result = chown(path, uid, -1);
+ result = chown(path.string, uid, -1);
if (result < 0 && errno == EPERM) {
return F_status_set_error(F_access_owner);
}
if (result == 0 && gid != -1) {
- result = chown(path, -1, gid);
+ result = chown(path.string, -1, gid);
if (result < 0 && errno == EPERM) {
return F_status_set_error(F_access_group);
}
else {
if (uid != -1) {
- result = lchown(path, uid, -1);
+ result = lchown(path.string, uid, -1);
if (result < 0 && errno == EPERM) {
return F_status_set_error(F_access_owner);
}
if (gid != -1) {
- result = lchown(path, -1, gid);
+ result = lchown(path.string, -1, gid);
if (result < 0 && errno == EPERM) {
return F_status_set_error(F_access_group);
#endif // !defined(_di_f_file_role_change_) || !defined(_di_f_file_copy_)
#if !defined(_di_f_file_role_change_at_) || !defined(_di_f_file_copy_at_)
- f_status_t private_f_file_role_change_at(const int at_id, const f_string_t path, const uid_t uid, const gid_t gid, const int flag) {
+ f_status_t private_f_file_role_change_at(const int at_id, const f_string_static_t path, const uid_t uid, const gid_t gid, const int flag) {
int result = 0;
if (uid != -1) {
- result = fchownat(at_id, path, uid, -1, flag);
+ result = fchownat(at_id, path.string, uid, -1, flag);
if (result < 0 && errno == EPERM) {
return F_status_set_error(F_access_owner);
}
if (gid != -1) {
- result = fchownat(at_id, path, -1, gid, flag);
+ result = fchownat(at_id, path.string, -1, gid, flag);
if (result < 0 && errno == EPERM) {
return F_status_set_error(F_access_group);
#endif // !defined(_di_f_file_role_change_at_) || !defined(_di_f_file_copy_at_)
#if !defined(_di_f_file_stat_) || !defined(_di_f_file_copy_)
- f_status_t private_f_file_stat(const f_string_t path, const bool dereference, struct stat *file_stat) {
+ f_status_t private_f_file_stat(const f_string_static_t path, const bool dereference, struct stat *file_stat) {
- if ((dereference ? stat(path, file_stat) : lstat(path, file_stat)) < 0) {
+ if ((dereference ? stat(path.string, file_stat) : lstat(path.string, file_stat)) < 0) {
if (errno == ENAMETOOLONG) return F_status_set_error(F_name);
if (errno == EFAULT) return F_status_set_error(F_buffer);
if (errno == ENOMEM) return F_status_set_error(F_memory_not);
#endif // !defined(_di_f_file_stat_) || !defined(_di_f_file_copy_)
#if !defined(_di_f_file_stat_at_) || !defined(_di_f_file_copy_at_)
- f_status_t private_f_file_stat_at(const int at_id, const f_string_t path, const int flag, struct stat *file_stat) {
+ f_status_t private_f_file_stat_at(const int at_id, const f_string_static_t path, const int flag, struct stat *file_stat) {
- if (fstatat(at_id, path, file_stat, flag) < 0) {
+ if (fstatat(at_id, path.string, file_stat, flag) < 0) {
if (errno == ENAMETOOLONG) return F_status_set_error(F_name);
if (errno == EFAULT) return F_status_set_error(F_buffer);
if (errno == ENOMEM) return F_status_set_error(F_memory_not);
if (flag & F_file_flag_truncate_d) {
return f_file_open_mode_read_truncate_s.string;
}
- else if (flag & F_file_flag_append_d) {
+
+ if (flag & F_file_flag_append_d) {
return f_file_open_mode_read_append_s.string;
}
#endif // !defined(_di_f_file_stream_descriptor_) || !defined(_di_f_file_stream_open_) || !defined(_di_f_file_stream_reopen_)
#if !defined(f_file_stream_write) || !defined(_di_f_file_stream_write_block_) || !defined(f_file_stream_write_until) || !defined(f_file_stream_write_range)
- f_status_t private_f_file_stream_write_until(const f_file_t file, const f_string_t string, const f_array_length_t total, f_array_length_t *written) {
+ f_status_t private_f_file_stream_write_until(const f_file_t file, const f_string_static_t buffer, const f_array_length_t total, f_array_length_t *written) {
*written = 0;
while (*written < write_max) {
- size_write = fwrite(string + *written, write_amount, write_size, file.stream);
+ size_write = fwrite(buffer.string + *written, write_amount, write_size, file.stream);
if (size_write < 0) {
if (errno == EAGAIN || errno == EWOULDBLOCK) return F_status_set_error(F_block);
#endif // !defined(f_file_stream_write) || !defined(_di_f_file_stream_write_block_) || !defined(f_file_stream_write_until) || !defined(f_file_stream_write_range)
#if !defined(f_file_write) || !defined(_di_f_file_write_block_) || !defined(f_file_write_until) || !defined(f_file_write_range)
- f_status_t private_f_file_write_until(const f_file_t file, const f_string_t string, const f_array_length_t total, f_array_length_t *written) {
+ f_status_t private_f_file_write_until(const f_file_t file, const f_string_static_t buffer, const f_array_length_t total, f_array_length_t *written) {
*written = 0;
write_size = write_max;
}
- while (*written < write_max && (size_write = write(file.id, string + *written, write_size)) > 0) {
+ while (*written < write_max && (size_write = write(file.id, buffer.string + *written, write_size)) > 0) {
*written += size_write;
* @see f_file_clone()
*/
#if !defined(_di_f_file_copy_) || !defined(_di_f_file_clone_)
- extern f_status_t private_f_file_copy_content(const f_string_t source, const f_string_t destination, const f_number_unsigned_t size_block) F_attribute_visibility_internal_d;
+ extern f_status_t private_f_file_copy_content(const f_string_static_t source, const f_string_static_t destination, const f_number_unsigned_t size_block) F_attribute_visibility_internal_d;
#endif // !defined(_di_f_file_copy_) || !defined(_di_f_file_clone_)
/**
* @see f_file_create()
*/
#if !defined(_di_f_file_create_) || !defined(_di_f_file_copy_)
- extern f_status_t private_f_file_create(const f_string_t path, const mode_t mode, const bool exclusive) F_attribute_visibility_internal_d;
+ extern f_status_t private_f_file_create(const f_string_static_t path, const mode_t mode, const bool exclusive) F_attribute_visibility_internal_d;
#endif // !defined(_di_f_file_create_) || !defined(_di_f_file_copy_)
/**
* @see f_file_create_at()
*/
#if !defined(_di_f_file_create_at_)
- extern f_status_t private_f_file_create_at(const int at_id, const f_string_t path, const mode_t mode, const bool exclusive) F_attribute_visibility_internal_d;
+ extern f_status_t private_f_file_create_at(const int at_id, const f_string_static_t path, const mode_t mode, const bool exclusive) F_attribute_visibility_internal_d;
#endif // !defined(_di_f_file_create_at_)
/**
* @see f_file_copy()
*/
#if !defined(_di_f_file_copy_)
- extern f_status_t private_f_file_create_directory(const f_string_t path, const mode_t mode) F_attribute_visibility_internal_d;
+ extern f_status_t private_f_file_create_directory(const f_string_static_t path, const mode_t mode) F_attribute_visibility_internal_d;
#endif // !defined(_di_f_file_copy_)
/**
* @see f_file_copy_at()
*/
#if !defined(_di_f_file_copy_at_)
- extern f_status_t private_f_file_create_directory_at(const int at_id, const f_string_t path, const mode_t mode) F_attribute_visibility_internal_d;
+ extern f_status_t private_f_file_create_directory_at(const int at_id, const f_string_static_t path, const mode_t mode) F_attribute_visibility_internal_d;
#endif // !defined(_di_f_file_copy_at_)
/**
* @see f_file_copy()
*/
#if !defined(_di_f_file_create_fifo_) || !defined(_di_f_file_copy_)
- extern f_status_t private_f_file_create_fifo(const f_string_t path, const mode_t mode) F_attribute_visibility_internal_d;
+ extern f_status_t private_f_file_create_fifo(const f_string_static_t path, const mode_t mode) F_attribute_visibility_internal_d;
#endif // !defined(_di_f_file_create_fifo_) || !defined(_di_f_file_copy_)
/**
* @see f_file_copy_at()
*/
#if !defined(_di_f_file_create_fifo_at_) || !defined(_di_f_file_copy_at_)
- extern f_status_t private_f_file_create_fifo_at(const int at_id, const f_string_t path, const mode_t mode) F_attribute_visibility_internal_d;
+ extern f_status_t private_f_file_create_fifo_at(const int at_id, const f_string_static_t path, const mode_t mode) F_attribute_visibility_internal_d;
#endif // !defined(_di_f_file_create_fifo_at_) || !defined(_di_f_file_copy_at_)
/**
* @see f_file_create_node()
*/
#if !defined(_di_f_file_create_device_) || !defined(_di_f_file_create_node_) || !defined(_di_f_file_copy_)
- extern f_status_t private_f_file_create_node(const f_string_t path, const mode_t mode, const dev_t device) F_attribute_visibility_internal_d;
+ extern f_status_t private_f_file_create_node(const f_string_static_t path, const mode_t mode, const dev_t device) F_attribute_visibility_internal_d;
#endif // !defined(_di_f_file_create_device_) || !defined(_di_f_file_create_node_) || !defined(_di_f_file_copy_)
/**
* @see f_file_create_node_at()
*/
#if !defined(_di_f_file_create_device_at_) || !defined(_di_f_file_create_node_at_) || !defined(_di_f_file_copy_at_)
- extern f_status_t private_f_file_create_node_at(const int at_id, const f_string_t path, const mode_t mode, const dev_t device) F_attribute_visibility_internal_d;
+ extern f_status_t private_f_file_create_node_at(const int at_id, const f_string_static_t path, const mode_t mode, const dev_t device) F_attribute_visibility_internal_d;
#endif // !defined(_di_f_file_create_device_at_) || !defined(_di_f_file_create_node_at_) || !defined(_di_f_file_copy_at_)
/**
* @see f_file_link()
*/
#if !defined(_di_f_file_link_) || !defined(_di_f_file_copy_)
- extern f_status_t private_f_file_link(const f_string_t target, const f_string_t point) F_attribute_visibility_internal_d;
+ extern f_status_t private_f_file_link(const f_string_static_t target, const f_string_static_t point) F_attribute_visibility_internal_d;
#endif // !defined(_di_f_file_link_) || !defined(_di_f_file_copy_)
/**
* @see f_file_link_at()
*/
#if !defined(_di_f_file_link_at_)
- extern f_status_t private_f_file_link_at(const int at_id, const f_string_t target, const f_string_t point) F_attribute_visibility_internal_d;
+ extern f_status_t private_f_file_link_at(const int at_id, const f_string_static_t target, const f_string_static_t point) F_attribute_visibility_internal_d;
#endif // !defined(_di_f_file_link_at_)
/**
* @see f_file_link_read()
*/
#if !defined(_di_f_file_link_read_) || !defined(_di_f_file_copy_)
- extern f_status_t private_f_file_link_read(const f_string_t path, const struct stat link_stat, f_string_dynamic_t *target) F_attribute_visibility_internal_d;
+ extern f_status_t private_f_file_link_read(const f_string_static_t path, const struct stat link_stat, f_string_dynamic_t *target) F_attribute_visibility_internal_d;
#endif // !defined(_di_f_file_link_read_) || !defined(_di_f_file_copy_)
/**
* @see f_file_link_read_at()
*/
#if !defined(_di_f_file_link_read_at_) || !defined(_di_f_file_copy_at_)
- extern f_status_t private_f_file_link_read_at(const int at_id, const f_string_t path, const struct stat link_stat, f_string_dynamic_t *target) F_attribute_visibility_internal_d;
+ extern f_status_t private_f_file_link_read_at(const int at_id, const f_string_static_t path, const struct stat link_stat, f_string_dynamic_t *target) F_attribute_visibility_internal_d;
#endif // !defined(_di_f_file_link_read_at_) || !defined(_di_f_file_copy_at_)
/**
* @see f_file_mode_set()
*/
#if !defined(_di_f_file_mode_set_) || !defined(_di_f_file_copy_)
- extern f_status_t private_f_file_mode_set(const f_string_t path, const mode_t mode) F_attribute_visibility_internal_d;
+ extern f_status_t private_f_file_mode_set(const f_string_static_t path, const mode_t mode) F_attribute_visibility_internal_d;
#endif // !defined(_di_f_file_mode_set_) || !defined(_di_f_file_copy_)
/**
* @see f_file_mode_set_at()
*/
#if !defined(_di_f_file_mode_set_at_)
- extern f_status_t private_f_file_mode_set_at(const int at_id, const f_string_t path, const mode_t mode) F_attribute_visibility_internal_d;
+ extern f_status_t private_f_file_mode_set_at(const int at_id, const f_string_static_t path, const mode_t mode) F_attribute_visibility_internal_d;
#endif // !defined(_di_f_file_mode_set_at_)
/**
* @see f_file_open()
*/
#if !defined(_di_f_file_open_) || !defined(_di_f_file_copy_)
- extern f_status_t private_f_file_open(const f_string_t path, const mode_t mode, f_file_t *file) F_attribute_visibility_internal_d;
+ extern f_status_t private_f_file_open(const f_string_static_t path, const mode_t mode, f_file_t *file) F_attribute_visibility_internal_d;
#endif // !defined(_di_f_file_open_) || !defined(_di_f_file_copy_)
/**
* @see f_file_open_at()
*/
#if !defined(_di_f_file_open_at_)
- extern f_status_t private_f_file_open_at(const int at_id, const f_string_t path, const mode_t mode, f_file_t *file) F_attribute_visibility_internal_d;
+ extern f_status_t private_f_file_open_at(const int at_id, const f_string_static_t path, const mode_t mode, f_file_t *file) F_attribute_visibility_internal_d;
#endif // !defined(_di_f_file_open_at_)
/**
* @see f_file_role_change()
*/
#if !defined(_di_f_file_role_change_) || !defined(_di_f_file_copy_)
- extern f_status_t private_f_file_role_change(const f_string_t path, const uid_t uid, const gid_t gid, const bool dereference) F_attribute_visibility_internal_d;
+ extern f_status_t private_f_file_role_change(const f_string_static_t path, const uid_t uid, const gid_t gid, const bool dereference) F_attribute_visibility_internal_d;
#endif // !defined(_di_f_file_role_change_) || !defined(_di_f_file_copy_)
/**
* @see f_file_role_change_at()
*/
#if !defined(_di_f_file_role_change_at_)
- extern f_status_t private_f_file_role_change_at(const int at_id, const f_string_t path, const uid_t uid, const gid_t gid, const int flag) F_attribute_visibility_internal_d;
+ extern f_status_t private_f_file_role_change_at(const int at_id, const f_string_static_t path, const uid_t uid, const gid_t gid, const int flag) F_attribute_visibility_internal_d;
#endif // !defined(_di_f_file_role_change_at_)
/**
* @see f_file_touch()
*/
#if !defined(_di_f_file_stat_) || !defined(_di_f_file_copy_) || !defined(_di_f_file_exists_) || !defined(_di_f_file_is_) || !defined(_di_f_file_touch_)
- extern f_status_t private_f_file_stat(const f_string_t file_name, const bool dereference, struct stat *file_stat) F_attribute_visibility_internal_d;
+ extern f_status_t private_f_file_stat(const f_string_static_t file_name, const bool dereference, struct stat *file_stat) F_attribute_visibility_internal_d;
#endif // !defined(_di_f_file_stat_) || !defined(_di_f_file_copy_) || !defined(_di_f_file_exists_) || !defined(_di_f_file_is_) || !defined(_di_f_file_touch_)
/**
* @see f_file_touch_at()
*/
#if !defined(_di_f_file_stat_at_) || !defined(_di_f_file_exists_at_) || !defined(_di_f_file_touch_at_)
- extern f_status_t private_f_file_stat_at(const int at_id, const f_string_t file_name, const int flag, struct stat *file_stat) F_attribute_visibility_internal_d;
+ extern f_status_t private_f_file_stat_at(const int at_id, const f_string_static_t file_name, const int flag, struct stat *file_stat) F_attribute_visibility_internal_d;
#endif // !defined(_di_f_file_stat_at_) || !defined(_di_f_file_exists_at_) || !defined(_di_f_file_touch_at_)
/**
* @param file
* The file to write to.
* The file must already be open.
- * @param string
+ * @param buffer
* The string to write to the file.
* @param total
* The total bytes to write.
* @see f_file_stream_write_until()
*/
#if !defined(f_file_stream_write) || !defined(_di_f_file_stream_write_block_) || !defined(f_file_stream_write_until) || !defined(f_file_stream_write_range)
- extern f_status_t private_f_file_stream_write_until(const f_file_t file, const f_string_t string, const f_array_length_t total, f_array_length_t *written) F_attribute_visibility_internal_d;
+ extern f_status_t private_f_file_stream_write_until(const f_file_t file, const f_string_static_t buffer, const f_array_length_t total, f_array_length_t *written) F_attribute_visibility_internal_d;
#endif // !defined(f_file_stream_write) || !defined(_di_f_file_stream_write_block_) || !defined(f_file_stream_write_until) || !defined(f_file_stream_write_range)
/**
* @param file
* The file to write to.
* The file must already be open.
- * @param string
+ * @param buffer
* The string to write to the file.
* @param total
* The total bytes to write.
* @see f_file_write_until()
*/
#if !defined(f_file_write) || !defined(_di_f_file_write_block_) || !defined(f_file_write_until) || !defined(f_file_write_range)
- extern f_status_t private_f_file_write_until(const f_file_t file, const f_string_t string, const f_array_length_t total, f_array_length_t *written) F_attribute_visibility_internal_d;
+ extern f_status_t private_f_file_write_until(const f_file_t file, const f_string_static_t buffer, const f_array_length_t total, f_array_length_t *written) F_attribute_visibility_internal_d;
#endif // !defined(f_file_write) || !defined(_di_f_file_write_block_) || !defined(f_file_write_until) || !defined(f_file_write_range)
#ifdef __cplusplus
#endif
#ifndef _di_f_fss_strings_
- const f_string_static_t f_fss_string_header_s = macro_f_string_static_t_initialize2(F_fss_string_header_s, 0, F_fss_string_header_s_length);
- const f_string_static_t f_fss_string_payload_s = macro_f_string_static_t_initialize2(F_fss_string_payload_s, 0, F_fss_string_payload_s_length);
+ const f_string_static_t f_fss_string_header_s = macro_f_string_static_t_initialize(F_fss_string_header_s, 0, F_fss_string_header_s_length);
+ const f_string_static_t f_fss_string_payload_s = macro_f_string_static_t_initialize(F_fss_string_payload_s, 0, F_fss_string_payload_s_length);
#endif // _di_f_fss_strings_
#ifdef __cplusplus
#endif
#ifndef _di_f_iki_syntax_
- const f_string_static_t f_iki_syntax_separator_s = macro_f_string_static_t_initialize2(F_iki_syntax_separator_s, 0, F_iki_syntax_separator_s_length);
- const f_string_static_t f_iki_syntax_placeholder_s = macro_f_string_static_t_initialize2(F_iki_syntax_placeholder_s, 0, F_iki_syntax_placeholder_s_length);
- const f_string_static_t f_iki_syntax_quote_double_s = macro_f_string_static_t_initialize2(F_iki_syntax_quote_double_s, 0, F_iki_syntax_quote_double_s_length);
- const f_string_static_t f_iki_syntax_quote_single_s = macro_f_string_static_t_initialize2(F_iki_syntax_quote_single_s, 0, F_iki_syntax_quote_single_s_length);
- const f_string_static_t f_iki_syntax_slash_s = macro_f_string_static_t_initialize2(F_iki_syntax_slash_s, 0, F_iki_syntax_slash_s_length);
+ const f_string_static_t f_iki_syntax_separator_s = macro_f_string_static_t_initialize(F_iki_syntax_separator_s, 0, F_iki_syntax_separator_s_length);
+ const f_string_static_t f_iki_syntax_placeholder_s = macro_f_string_static_t_initialize(F_iki_syntax_placeholder_s, 0, F_iki_syntax_placeholder_s_length);
+ const f_string_static_t f_iki_syntax_quote_double_s = macro_f_string_static_t_initialize(F_iki_syntax_quote_double_s, 0, F_iki_syntax_quote_double_s_length);
+ const f_string_static_t f_iki_syntax_quote_single_s = macro_f_string_static_t_initialize(F_iki_syntax_quote_single_s, 0, F_iki_syntax_quote_single_s_length);
+ const f_string_static_t f_iki_syntax_slash_s = macro_f_string_static_t_initialize(F_iki_syntax_slash_s, 0, F_iki_syntax_slash_s_length);
#endif //_di_f_iki_syntax_
#ifndef _di_iki_vocabulary_0001_s_
- const f_string_static_t f_iki_vocabulary_0001_address_s = macro_f_string_static_t_initialize2(F_iki_vocabulary_0001_address_s, 0, F_iki_vocabulary_0001_address_s_length);
- const f_string_static_t f_iki_vocabulary_0001_code_s = macro_f_string_static_t_initialize2(F_iki_vocabulary_0001_code_s, 0, F_iki_vocabulary_0001_code_s_length);
- const f_string_static_t f_iki_vocabulary_0001_email_s = macro_f_string_static_t_initialize2(F_iki_vocabulary_0001_email_s, 0, F_iki_vocabulary_0001_email_s_length);
- const f_string_static_t f_iki_vocabulary_0001_name_s = macro_f_string_static_t_initialize2(F_iki_vocabulary_0001_name_s, 0, F_iki_vocabulary_0001_name_s_length);
- const f_string_static_t f_iki_vocabulary_0001_phone_s = macro_f_string_static_t_initialize2(F_iki_vocabulary_0001_phone_s, 0, F_iki_vocabulary_0001_phone_s_length);
- const f_string_static_t f_iki_vocabulary_0001_quote_s = macro_f_string_static_t_initialize2(F_iki_vocabulary_0001_quote_s, 0, F_iki_vocabulary_0001_quote_s_length);
- const f_string_static_t f_iki_vocabulary_0001_uri_s = macro_f_string_static_t_initialize2(F_iki_vocabulary_0001_uri_s, 0, F_iki_vocabulary_0001_uri_s_length);
- const f_string_static_t f_iki_vocabulary_0001_url_s = macro_f_string_static_t_initialize2(F_iki_vocabulary_0001_url_s, 0, F_iki_vocabulary_0001_url_s_length);
- const f_string_static_t f_iki_vocabulary_0001_urn_s = macro_f_string_static_t_initialize2(F_iki_vocabulary_0001_urn_s, 0, F_iki_vocabulary_0001_urn_s_length);
- const f_string_static_t f_iki_vocabulary_0001_variable_s = macro_f_string_static_t_initialize2(F_iki_vocabulary_0001_variable_s, 0, F_iki_vocabulary_0001_variable_s_length);
+ const f_string_static_t f_iki_vocabulary_0001_address_s = macro_f_string_static_t_initialize(F_iki_vocabulary_0001_address_s, 0, F_iki_vocabulary_0001_address_s_length);
+ const f_string_static_t f_iki_vocabulary_0001_code_s = macro_f_string_static_t_initialize(F_iki_vocabulary_0001_code_s, 0, F_iki_vocabulary_0001_code_s_length);
+ const f_string_static_t f_iki_vocabulary_0001_email_s = macro_f_string_static_t_initialize(F_iki_vocabulary_0001_email_s, 0, F_iki_vocabulary_0001_email_s_length);
+ const f_string_static_t f_iki_vocabulary_0001_name_s = macro_f_string_static_t_initialize(F_iki_vocabulary_0001_name_s, 0, F_iki_vocabulary_0001_name_s_length);
+ const f_string_static_t f_iki_vocabulary_0001_phone_s = macro_f_string_static_t_initialize(F_iki_vocabulary_0001_phone_s, 0, F_iki_vocabulary_0001_phone_s_length);
+ const f_string_static_t f_iki_vocabulary_0001_quote_s = macro_f_string_static_t_initialize(F_iki_vocabulary_0001_quote_s, 0, F_iki_vocabulary_0001_quote_s_length);
+ const f_string_static_t f_iki_vocabulary_0001_uri_s = macro_f_string_static_t_initialize(F_iki_vocabulary_0001_uri_s, 0, F_iki_vocabulary_0001_uri_s_length);
+ const f_string_static_t f_iki_vocabulary_0001_url_s = macro_f_string_static_t_initialize(F_iki_vocabulary_0001_url_s, 0, F_iki_vocabulary_0001_url_s_length);
+ const f_string_static_t f_iki_vocabulary_0001_urn_s = macro_f_string_static_t_initialize(F_iki_vocabulary_0001_urn_s, 0, F_iki_vocabulary_0001_urn_s_length);
+ const f_string_static_t f_iki_vocabulary_0001_variable_s = macro_f_string_static_t_initialize(F_iki_vocabulary_0001_variable_s, 0, F_iki_vocabulary_0001_variable_s_length);
#endif // _di_iki_vocabulary_0001_s_
#ifndef _di_iki_vocabulary_0002_s_
- const f_string_static_t f_iki_vocabulary_0002_context_s = macro_f_string_static_t_initialize2(F_iki_vocabulary_0002_context_s, 0, F_iki_vocabulary_0002_context_s_length);
- const f_string_static_t f_iki_vocabulary_0002_define_s = macro_f_string_static_t_initialize2(F_iki_vocabulary_0002_define_s, 0, F_iki_vocabulary_0002_define_s_length);
- const f_string_static_t f_iki_vocabulary_0002_parameter_s = macro_f_string_static_t_initialize2(F_iki_vocabulary_0002_parameter_s, 0, F_iki_vocabulary_0002_parameter_s_length);
+ const f_string_static_t f_iki_vocabulary_0002_context_s = macro_f_string_static_t_initialize(F_iki_vocabulary_0002_context_s, 0, F_iki_vocabulary_0002_context_s_length);
+ const f_string_static_t f_iki_vocabulary_0002_define_s = macro_f_string_static_t_initialize(F_iki_vocabulary_0002_define_s, 0, F_iki_vocabulary_0002_define_s_length);
+ const f_string_static_t f_iki_vocabulary_0002_parameter_s = macro_f_string_static_t_initialize(F_iki_vocabulary_0002_parameter_s, 0, F_iki_vocabulary_0002_parameter_s_length);
#endif // _di_iki_vocabulary_0002_s_
#ifdef __cplusplus
#endif
#ifndef _di_f_path_defines_
- const f_string_static_t f_path_separator_s = macro_f_string_static_t_initialize2(F_string_ascii_slash_forward_s, 0, F_string_ascii_slash_forward_s_length);
- const f_string_static_t f_path_separator_current_s = macro_f_string_static_t_initialize2(F_string_ascii_period_s, 0, F_string_ascii_period_s_length);
- const f_string_static_t f_path_separator_variable_s = macro_f_string_static_t_initialize2(F_string_ascii_colon_s, 0, F_string_ascii_colon_s_length);
+ const f_string_static_t f_path_separator_s = macro_f_string_static_t_initialize(F_string_ascii_slash_forward_s, 0, F_string_ascii_slash_forward_s_length);
+ const f_string_static_t f_path_separator_current_s = macro_f_string_static_t_initialize(F_string_ascii_period_s, 0, F_string_ascii_period_s_length);
+ const f_string_static_t f_path_separator_variable_s = macro_f_string_static_t_initialize(F_string_ascii_colon_s, 0, F_string_ascii_colon_s_length);
- const f_string_static_t f_path_extension_separator_s = macro_f_string_static_t_initialize2(F_string_ascii_period_s, 0, F_string_ascii_period_s_length);
+ const f_string_static_t f_path_extension_separator_s = macro_f_string_static_t_initialize(F_string_ascii_period_s, 0, F_string_ascii_period_s_length);
- const f_string_static_t f_path_environment_s = macro_f_string_static_t_initialize2(F_path_environment_s, 0, F_path_environment_s_length);
- const f_string_static_t f_path_home_wildcard_s = macro_f_string_static_t_initialize2(F_string_ascii_tilde_s, 0, F_string_ascii_tilde_s_length);
- const f_string_static_t f_path_present_working_s = macro_f_string_static_t_initialize2(F_path_present_working_s, 0, F_path_present_working_s_length);
- const f_string_static_t f_path_present_working_old_s = macro_f_string_static_t_initialize2(F_path_present_working_old_s, 0, F_path_present_working_old_s_length);
+ const f_string_static_t f_path_environment_s = macro_f_string_static_t_initialize(F_path_environment_s, 0, F_path_environment_s_length);
+ const f_string_static_t f_path_home_wildcard_s = macro_f_string_static_t_initialize(F_string_ascii_tilde_s, 0, F_string_ascii_tilde_s_length);
+ const f_string_static_t f_path_present_working_s = macro_f_string_static_t_initialize(F_path_present_working_s, 0, F_path_present_working_s_length);
+ const f_string_static_t f_path_present_working_old_s = macro_f_string_static_t_initialize(F_path_present_working_old_s, 0, F_path_present_working_old_s_length);
#endif // _di_f_path_defines_
#ifdef _di_path_tree_s_
// KFS Root Level
- const f_string_static_t f_path_tree_devices_s = macro_f_string_static_t_initialize2(F_path_tree_devices_s, 0, F_path_tree_devices_s_length);
- const f_string_static_t f_path_tree_external_s = macro_f_string_static_t_initialize2(F_path_tree_external_s, 0, F_path_tree_external_s_length);
- const f_string_static_t f_path_tree_libraries_s = macro_f_string_static_t_initialize2(F_path_tree_libraries_s, 0, F_path_tree_libraries_s_length);
- const f_string_static_t f_path_tree_programs_s = macro_f_string_static_t_initialize2(F_path_tree_programs_s, 0,F_path_tree_programs_s _length);
- const f_string_static_t f_path_tree_temporary_s = macro_f_string_static_t_initialize2(F_path_tree_temporary_s, 0, F_path_tree_temporary_s_length);
- const f_string_static_t f_path_tree_home_s = macro_f_string_static_t_initialize2(F_path_tree_home_s, 0, F_path_tree_home_s_length);
- const f_string_static_t f_path_tree_run_s = macro_f_string_static_t_initialize2(F_path_tree_run_s, 0, F_path_tree_run_s_length);
- const f_string_static_t f_path_tree_binary_s = macro_f_string_static_t_initialize2(F_path_tree_binary_s, 0, F_path_tree_binary_s_length);
+ const f_string_static_t f_path_tree_devices_s = macro_f_string_static_t_initialize(F_path_tree_devices_s, 0, F_path_tree_devices_s_length);
+ const f_string_static_t f_path_tree_external_s = macro_f_string_static_t_initialize(F_path_tree_external_s, 0, F_path_tree_external_s_length);
+ const f_string_static_t f_path_tree_libraries_s = macro_f_string_static_t_initialize(F_path_tree_libraries_s, 0, F_path_tree_libraries_s_length);
+ const f_string_static_t f_path_tree_programs_s = macro_f_string_static_t_initialize(F_path_tree_programs_s, 0,F_path_tree_programs_s _length);
+ const f_string_static_t f_path_tree_temporary_s = macro_f_string_static_t_initialize(F_path_tree_temporary_s, 0, F_path_tree_temporary_s_length);
+ const f_string_static_t f_path_tree_home_s = macro_f_string_static_t_initialize(F_path_tree_home_s, 0, F_path_tree_home_s_length);
+ const f_string_static_t f_path_tree_run_s = macro_f_string_static_t_initialize(F_path_tree_run_s, 0, F_path_tree_run_s_length);
+ const f_string_static_t f_path_tree_binary_s = macro_f_string_static_t_initialize(F_path_tree_binary_s, 0, F_path_tree_binary_s_length);
// FHS Root Level
- const f_string_static_t f_path_tree_boot_s = macro_f_string_static_t_initialize2(F_path_tree_boot_s, 0, F_path_tree_boot_s_length);
- const f_string_static_t f_path_tree_hardware_s = macro_f_string_static_t_initialize2(F_path_tree_hardware_s, 0, F_path_tree_hardware_s_length);
- const f_string_static_t f_path_tree_processes_s = macro_f_string_static_t_initialize2(F_path_tree_processes_s, 0, F_path_tree_processes_s_length);
- const f_string_static_t f_path_tree_system_s = macro_f_string_static_t_initialize2(F_path_tree_system_s, 0, F_path_tree_system_s_length);
+ const f_string_static_t f_path_tree_boot_s = macro_f_string_static_t_initialize(F_path_tree_boot_s, 0, F_path_tree_boot_s_length);
+ const f_string_static_t f_path_tree_hardware_s = macro_f_string_static_t_initialize(F_path_tree_hardware_s, 0, F_path_tree_hardware_s_length);
+ const f_string_static_t f_path_tree_processes_s = macro_f_string_static_t_initialize(F_path_tree_processes_s, 0, F_path_tree_processes_s_length);
+ const f_string_static_t f_path_tree_system_s = macro_f_string_static_t_initialize(F_path_tree_system_s, 0, F_path_tree_system_s_length);
// Program Level
- const f_string_static_t f_path_tree_programs_public_s = macro_f_string_static_t_initialize2(F_path_tree_programs_public_s, 0, F_path_tree_programs_public_s_length);
- const f_string_static_t f_path_tree_programs_system_s = macro_f_string_static_t_initialize2(F_path_tree_programs_system_s, 0, F_path_tree_programs_system_s_length);
- const f_string_static_t f_path_tree_programs_remote_s = macro_f_string_static_t_initialize2(F_path_tree_programs_remote_s, 0, F_path_tree_programs_remote_s_length);
- const f_string_static_t f_path_tree_programs_services_s = macro_f_string_static_t_initialize2(F_path_tree_programs_services_s, 0, F_path_tree_programs_services_s_length);
- const f_string_static_t f_path_tree_programs_toolchain_s = macro_f_string_static_t_initialize2(F_path_tree_programs_toolchain_s, 0, F_path_tree_programs_toolchain_s_length);
- const f_string_static_t f_path_tree_programs_users_s = macro_f_string_static_t_initialize2(F_path_tree_programs_users_s, 0, F_path_tree_programs_users_s_length);
- const f_string_static_t f_path_tree_programs_susers_s = macro_f_string_static_t_initialize2(F_path_tree_programs_susers_s, 0, F_path_tree_programs_susers_s_length);
- const f_string_static_t f_path_tree_programs_boot_s = macro_f_string_static_t_initialize2(F_path_tree_programs_boot_s, 0, F_path_tree_programs_boot_s_length);
- const f_string_static_t f_path_tree_programs_sboot_s = macro_f_string_static_t_initialize2(F_path_tree_programs_sboot_s, 0, F_path_tree_programs_sboot_s_length);
+ const f_string_static_t f_path_tree_programs_public_s = macro_f_string_static_t_initialize(F_path_tree_programs_public_s, 0, F_path_tree_programs_public_s_length);
+ const f_string_static_t f_path_tree_programs_system_s = macro_f_string_static_t_initialize(F_path_tree_programs_system_s, 0, F_path_tree_programs_system_s_length);
+ const f_string_static_t f_path_tree_programs_remote_s = macro_f_string_static_t_initialize(F_path_tree_programs_remote_s, 0, F_path_tree_programs_remote_s_length);
+ const f_string_static_t f_path_tree_programs_services_s = macro_f_string_static_t_initialize(F_path_tree_programs_services_s, 0, F_path_tree_programs_services_s_length);
+ const f_string_static_t f_path_tree_programs_toolchain_s = macro_f_string_static_t_initialize(F_path_tree_programs_toolchain_s, 0, F_path_tree_programs_toolchain_s_length);
+ const f_string_static_t f_path_tree_programs_users_s = macro_f_string_static_t_initialize(F_path_tree_programs_users_s, 0, F_path_tree_programs_users_s_length);
+ const f_string_static_t f_path_tree_programs_susers_s = macro_f_string_static_t_initialize(F_path_tree_programs_susers_s, 0, F_path_tree_programs_susers_s_length);
+ const f_string_static_t f_path_tree_programs_boot_s = macro_f_string_static_t_initialize(F_path_tree_programs_boot_s, 0, F_path_tree_programs_boot_s_length);
+ const f_string_static_t f_path_tree_programs_sboot_s = macro_f_string_static_t_initialize(F_path_tree_programs_sboot_s, 0, F_path_tree_programs_sboot_s_length);
// Library Level
- const f_string_static_t f_path_tree_libraries_public_s = macro_f_string_static_t_initialize2(F_path_tree_libraries_public_s, 0, F_path_tree_libraries_public_s_length);
- const f_string_static_t f_path_tree_libraries_system_s = macro_f_string_static_t_initialize2(F_path_tree_libraries_system_s, 0, F_path_tree_libraries_system_s_length);
- const f_string_static_t f_path_tree_libraries_remote_s = macro_f_string_static_t_initialize2(F_path_tree_libraries_remote_s, 0, F_path_tree_libraries_remote_s_length);
- const f_string_static_t f_path_tree_libraries_services_s = macro_f_string_static_t_initialize2(F_path_tree_libraries_services_s, 0, F_path_tree_libraries_services_s_length);
- const f_string_static_t f_path_tree_libraries_toolchain_s = macro_f_string_static_t_initialize2(F_path_tree_libraries_toolchain_s, 0, F_path_tree_libraries_toolchain_s_length);
- const f_string_static_t f_path_tree_libraries_users_s = macro_f_string_static_t_initialize2(F_path_tree_libraries_users_s, 0, F_path_tree_libraries_users_s_length);
- const f_string_static_t f_path_tree_libraries_boot_s = macro_f_string_static_t_initialize2(F_path_tree_libraries_boot_s, 0, F_path_tree_libraries_boot_s_length);
+ const f_string_static_t f_path_tree_libraries_public_s = macro_f_string_static_t_initialize(F_path_tree_libraries_public_s, 0, F_path_tree_libraries_public_s_length);
+ const f_string_static_t f_path_tree_libraries_system_s = macro_f_string_static_t_initialize(F_path_tree_libraries_system_s, 0, F_path_tree_libraries_system_s_length);
+ const f_string_static_t f_path_tree_libraries_remote_s = macro_f_string_static_t_initialize(F_path_tree_libraries_remote_s, 0, F_path_tree_libraries_remote_s_length);
+ const f_string_static_t f_path_tree_libraries_services_s = macro_f_string_static_t_initialize(F_path_tree_libraries_services_s, 0, F_path_tree_libraries_services_s_length);
+ const f_string_static_t f_path_tree_libraries_toolchain_s = macro_f_string_static_t_initialize(F_path_tree_libraries_toolchain_s, 0, F_path_tree_libraries_toolchain_s_length);
+ const f_string_static_t f_path_tree_libraries_users_s = macro_f_string_static_t_initialize(F_path_tree_libraries_users_s, 0, F_path_tree_libraries_users_s_length);
+ const f_string_static_t f_path_tree_libraries_boot_s = macro_f_string_static_t_initialize(F_path_tree_libraries_boot_s, 0, F_path_tree_libraries_boot_s_length);
// Home Level
- const f_string_static_t f_path_tree_home_services_s = macro_f_string_static_t_initialize2(F_path_tree_home_services_s, 0, F_path_tree_home_services_s_length);
- const f_string_static_t f_path_tree_home_share_s = macro_f_string_static_t_initialize2(F_path_tree_home_share_s, 0, F_path_tree_home_share_s_length);
- const f_string_static_t f_path_tree_home_users_s = macro_f_string_static_t_initialize2(F_path_tree_home_users_s, 0, F_path_tree_home_users_s_length);
- const f_string_static_t f_path_tree_home_websites_s = macro_f_string_static_t_initialize2(F_path_tree_home_websites_s, 0, F_path_tree_home_websites_s_length);
+ const f_string_static_t f_path_tree_home_services_s = macro_f_string_static_t_initialize(F_path_tree_home_services_s, 0, F_path_tree_home_services_s_length);
+ const f_string_static_t f_path_tree_home_share_s = macro_f_string_static_t_initialize(F_path_tree_home_share_s, 0, F_path_tree_home_share_s_length);
+ const f_string_static_t f_path_tree_home_users_s = macro_f_string_static_t_initialize(F_path_tree_home_users_s, 0, F_path_tree_home_users_s_length);
+ const f_string_static_t f_path_tree_home_websites_s = macro_f_string_static_t_initialize(F_path_tree_home_websites_s, 0, F_path_tree_home_websites_s_length);
// System Level
- const f_string_static_t f_path_tree_system_logs_s = macro_f_string_static_t_initialize2(F_path_tree_system_logs_s, 0, F_path_tree_system_logs_s_length);
- const f_string_static_t f_path_tree_system_settings_s = macro_f_string_static_t_initialize2(F_path_tree_system_settings_s, 0, F_path_tree_system_settings_s_length);
- const f_string_static_t f_path_tree_system_data_s = macro_f_string_static_t_initialize2(F_path_tree_system_data_s, 0, F_path_tree_system_data_s_length);
- const f_string_static_t f_path_tree_system_variables_s = macro_f_string_static_t_initialize2(F_path_tree_system_variables_s, 0, F_path_tree_system_variables_s_length);
+ const f_string_static_t f_path_tree_system_logs_s = macro_f_string_static_t_initialize(F_path_tree_system_logs_s, 0, F_path_tree_system_logs_s_length);
+ const f_string_static_t f_path_tree_system_settings_s = macro_f_string_static_t_initialize(F_path_tree_system_settings_s, 0, F_path_tree_system_settings_s_length);
+ const f_string_static_t f_path_tree_system_data_s = macro_f_string_static_t_initialize(F_path_tree_system_data_s, 0, F_path_tree_system_data_s_length);
+ const f_string_static_t f_path_tree_system_variables_s = macro_f_string_static_t_initialize(F_path_tree_system_variables_s, 0, F_path_tree_system_variables_s_length);
// Temporary Level
- const f_string_static_t f_path_tree_temporary_public_s = macro_f_string_static_t_initialize2(F_path_tree_temporary_public_s, 0, F_path_tree_temporary_public_s_length);
- const f_string_static_t f_path_tree_temporary_services_s = macro_f_string_static_t_initialize2(F_path_tree_temporary_services_s, 0, F_path_tree_temporary_services_s_length);
- const f_string_static_t f_path_tree_temporary_users_s = macro_f_string_static_t_initialize2(F_path_tree_temporary_users_s, 0, F_path_tree_temporary_users_s_length);
- const f_string_static_t f_path_tree_temporary_variables_s = macro_f_string_static_t_initialize2(F_path_tree_temporary_variables_s, 0, F_path_tree_temporary_variables_s_length);
+ const f_string_static_t f_path_tree_temporary_public_s = macro_f_string_static_t_initialize(F_path_tree_temporary_public_s, 0, F_path_tree_temporary_public_s_length);
+ const f_string_static_t f_path_tree_temporary_services_s = macro_f_string_static_t_initialize(F_path_tree_temporary_services_s, 0, F_path_tree_temporary_services_s_length);
+ const f_string_static_t f_path_tree_temporary_users_s = macro_f_string_static_t_initialize(F_path_tree_temporary_users_s, 0, F_path_tree_temporary_users_s_length);
+ const f_string_static_t f_path_tree_temporary_variables_s = macro_f_string_static_t_initialize(F_path_tree_temporary_variables_s, 0, F_path_tree_temporary_variables_s_length);
// Private User Directories
- const f_string_static_t f_path_user_downloads_s = macro_f_string_static_t_initialize2(F_path_user_downloads_s, 0, F_path_user_downloads_s_length);
- const f_string_static_t f_path_user_desktop_s = macro_f_string_static_t_initialize2(F_path_user_desktop_s, 0, F_path_user_desktop_s_length);
- const f_string_static_t f_path_user_private_s = macro_f_string_static_t_initialize2(F_path_user_private_s, 0, F_path_user_private_s_length);
- const f_string_static_t f_path_user_settings_s = macro_f_string_static_t_initialize2(F_path_user_settings_s, 0, F_path_user_settings_s_length);
- const f_string_static_t f_path_user_data_s = macro_f_string_static_t_initialize2(F_path_user_data_s, 0, F_path_user_data_s_length);
- const f_string_static_t f_path_user_temporary_s = macro_f_string_static_t_initialize2(F_path_user_temporary_s, 0, F_path_user_temporary_s_length);
- const f_string_static_t f_path_user_shared_s = macro_f_string_static_t_initialize2(F_path_user_shared_s, 0, F_path_user_shared_s_length);
+ const f_string_static_t f_path_user_downloads_s = macro_f_string_static_t_initialize(F_path_user_downloads_s, 0, F_path_user_downloads_s_length);
+ const f_string_static_t f_path_user_desktop_s = macro_f_string_static_t_initialize(F_path_user_desktop_s, 0, F_path_user_desktop_s_length);
+ const f_string_static_t f_path_user_private_s = macro_f_string_static_t_initialize(F_path_user_private_s, 0, F_path_user_private_s_length);
+ const f_string_static_t f_path_user_settings_s = macro_f_string_static_t_initialize(F_path_user_settings_s, 0, F_path_user_settings_s_length);
+ const f_string_static_t f_path_user_data_s = macro_f_string_static_t_initialize(F_path_user_data_s, 0, F_path_user_data_s_length);
+ const f_string_static_t f_path_user_temporary_s = macro_f_string_static_t_initialize(F_path_user_temporary_s, 0, F_path_user_temporary_s_length);
+ const f_string_static_t f_path_user_shared_s = macro_f_string_static_t_initialize(F_path_user_shared_s, 0, F_path_user_shared_s_length);
#endif // _di_path_tree_s_
#ifdef __cplusplus
#endif
#ifndef _di_f_print_sequences_
- const f_string_static_t f_print_sequence_acknowledge_s = macro_f_string_static_t_initialize2(F_print_sequence_acknowledge_s, 0, F_print_sequence_acknowledge_s_length);
- const f_string_static_t f_print_sequence_acknowledge_negative_s = macro_f_string_static_t_initialize2(F_print_sequence_acknowledge_negative_s, 0, F_print_sequence_acknowledge_negative_s_length);
- const f_string_static_t f_print_sequence_backspace_s = macro_f_string_static_t_initialize2(F_print_sequence_backspace_s, 0, F_print_sequence_backspace_s_length);
- const f_string_static_t f_print_sequence_bell_s = macro_f_string_static_t_initialize2(F_print_sequence_bell_s, 0, F_print_sequence_bell_s_length);
- const f_string_static_t f_print_sequence_cancel_s = macro_f_string_static_t_initialize2(F_print_sequence_cancel_s, 0, F_print_sequence_cancel_s_length);
- const f_string_static_t f_print_sequence_carriage_return_s = macro_f_string_static_t_initialize2(F_print_sequence_carriage_return_s, 0, F_print_sequence_carriage_return_s_length);
- const f_string_static_t f_print_sequence_data_link_escape_s = macro_f_string_static_t_initialize2(F_print_sequence_data_link_escape_s, 0, F_print_sequence_data_link_escape_s_length);
- const f_string_static_t f_print_sequence_delete_s = macro_f_string_static_t_initialize2(F_print_sequence_delete_s, 0, F_print_sequence_delete_s_length);
- const f_string_static_t f_print_sequence_device_control_1_s = macro_f_string_static_t_initialize2(F_print_sequence_device_control_1_s, 0, F_print_sequence_device_control_1_s_length);
- const f_string_static_t f_print_sequence_device_control_2_s = macro_f_string_static_t_initialize2(F_print_sequence_device_control_2_s, 0, F_print_sequence_device_control_2_s_length);
- const f_string_static_t f_print_sequence_device_control_3_s = macro_f_string_static_t_initialize2(F_print_sequence_device_control_3_s, 0, F_print_sequence_device_control_3_s_length);
- const f_string_static_t f_print_sequence_device_control_4_s = macro_f_string_static_t_initialize2(F_print_sequence_device_control_4_s, 0, F_print_sequence_device_control_4_s_length);
- const f_string_static_t f_print_sequence_end_of_medium_s = macro_f_string_static_t_initialize2(F_print_sequence_end_of_medium_s, 0, F_print_sequence_end_of_medium_s_length);
- const f_string_static_t f_print_sequence_end_of_text_s = macro_f_string_static_t_initialize2(F_print_sequence_end_of_text_s, 0, F_print_sequence_end_of_text_s_length);
- const f_string_static_t f_print_sequence_end_of_transmission_s = macro_f_string_static_t_initialize2(F_print_sequence_end_of_transmission_s, 0, F_print_sequence_end_of_transmission_s_length);
- const f_string_static_t f_print_sequence_end_of_transmission_block_s = macro_f_string_static_t_initialize2(F_print_sequence_end_of_transmission_block_s, 0, F_print_sequence_end_of_transmission_block_s_length);
- const f_string_static_t f_print_sequence_enquiry_s = macro_f_string_static_t_initialize2(F_print_sequence_enquiry_s, 0, F_print_sequence_enquiry_s_length);
- const f_string_static_t f_print_sequence_escape_s = macro_f_string_static_t_initialize2(F_print_sequence_escape_s, 0, F_print_sequence_escape_s_length);
- const f_string_static_t f_print_sequence_form_feed_s = macro_f_string_static_t_initialize2(F_print_sequence_form_feed_s, 0, F_print_sequence_form_feed_s_length);
- const f_string_static_t f_print_sequence_line_feed_s = macro_f_string_static_t_initialize2(F_print_sequence_line_feed_s, 0, F_print_sequence_line_feed_s_length);
- const f_string_static_t f_print_sequence_line_new_s = macro_f_string_static_t_initialize2(F_print_sequence_line_new_s, 0, F_print_sequence_line_new_s_length);
- const f_string_static_t f_print_sequence_null_s = macro_f_string_static_t_initialize2(F_print_sequence_null_s, 0, F_print_sequence_null_s_length);
- const f_string_static_t f_print_sequence_separator_file_s = macro_f_string_static_t_initialize2(F_print_sequence_separator_file_s, 0, F_print_sequence_separator_file_s_length);
- const f_string_static_t f_print_sequence_separator_group_s = macro_f_string_static_t_initialize2(F_print_sequence_separator_group_s, 0, F_print_sequence_separator_group_s_length);
- const f_string_static_t f_print_sequence_separator_record_s = macro_f_string_static_t_initialize2(F_print_sequence_separator_record_s, 0, F_print_sequence_separator_record_s_length);
- const f_string_static_t f_print_sequence_separator_unit_s = macro_f_string_static_t_initialize2(F_print_sequence_separator_unit_s, 0, F_print_sequence_separator_unit_s_length);
- const f_string_static_t f_print_sequence_shift_in_s = macro_f_string_static_t_initialize2(F_print_sequence_shift_in_s, 0, F_print_sequence_shift_in_s_length);
- const f_string_static_t f_print_sequence_shift_out_s = macro_f_string_static_t_initialize2(F_print_sequence_shift_out_s, 0, F_print_sequence_shift_out_s_length);
- const f_string_static_t f_print_sequence_space_s = macro_f_string_static_t_initialize2(F_print_sequence_space_s, 0, F_print_sequence_space_s_length);
- const f_string_static_t f_print_sequence_start_of_header_s = macro_f_string_static_t_initialize2(F_print_sequence_start_of_header_s, 0, F_print_sequence_start_of_header_s_length);
- const f_string_static_t f_print_sequence_start_of_text_s = macro_f_string_static_t_initialize2(F_print_sequence_start_of_text_s, 0, F_print_sequence_start_of_text_s_length);
- const f_string_static_t f_print_sequence_substitute_s = macro_f_string_static_t_initialize2(F_print_sequence_substitute_s, 0, F_print_sequence_substitute_s_length);
- const f_string_static_t f_print_sequence_synchronous_idle_s = macro_f_string_static_t_initialize2(F_print_sequence_synchronous_idle_s, 0, F_print_sequence_synchronous_idle_s_length);
- const f_string_static_t f_print_sequence_tab_s = macro_f_string_static_t_initialize2(F_print_sequence_tab_s, 0, F_print_sequence_tab_s_length);
- const f_string_static_t f_print_sequence_tab_vertical_s = macro_f_string_static_t_initialize2(F_print_sequence_tab_vertical_s, 0, F_print_sequence_tab_vertical_s_length);
- const f_string_static_t f_print_sequence_unknown_s = macro_f_string_static_t_initialize2(F_print_sequence_unknown_s, 0, F_print_sequence_unknown_s_length);
+ const f_string_static_t f_print_sequence_acknowledge_s = macro_f_string_static_t_initialize(F_print_sequence_acknowledge_s, 0, F_print_sequence_acknowledge_s_length);
+ const f_string_static_t f_print_sequence_acknowledge_negative_s = macro_f_string_static_t_initialize(F_print_sequence_acknowledge_negative_s, 0, F_print_sequence_acknowledge_negative_s_length);
+ const f_string_static_t f_print_sequence_backspace_s = macro_f_string_static_t_initialize(F_print_sequence_backspace_s, 0, F_print_sequence_backspace_s_length);
+ const f_string_static_t f_print_sequence_bell_s = macro_f_string_static_t_initialize(F_print_sequence_bell_s, 0, F_print_sequence_bell_s_length);
+ const f_string_static_t f_print_sequence_cancel_s = macro_f_string_static_t_initialize(F_print_sequence_cancel_s, 0, F_print_sequence_cancel_s_length);
+ const f_string_static_t f_print_sequence_carriage_return_s = macro_f_string_static_t_initialize(F_print_sequence_carriage_return_s, 0, F_print_sequence_carriage_return_s_length);
+ const f_string_static_t f_print_sequence_data_link_escape_s = macro_f_string_static_t_initialize(F_print_sequence_data_link_escape_s, 0, F_print_sequence_data_link_escape_s_length);
+ const f_string_static_t f_print_sequence_delete_s = macro_f_string_static_t_initialize(F_print_sequence_delete_s, 0, F_print_sequence_delete_s_length);
+ const f_string_static_t f_print_sequence_device_control_1_s = macro_f_string_static_t_initialize(F_print_sequence_device_control_1_s, 0, F_print_sequence_device_control_1_s_length);
+ const f_string_static_t f_print_sequence_device_control_2_s = macro_f_string_static_t_initialize(F_print_sequence_device_control_2_s, 0, F_print_sequence_device_control_2_s_length);
+ const f_string_static_t f_print_sequence_device_control_3_s = macro_f_string_static_t_initialize(F_print_sequence_device_control_3_s, 0, F_print_sequence_device_control_3_s_length);
+ const f_string_static_t f_print_sequence_device_control_4_s = macro_f_string_static_t_initialize(F_print_sequence_device_control_4_s, 0, F_print_sequence_device_control_4_s_length);
+ const f_string_static_t f_print_sequence_end_of_medium_s = macro_f_string_static_t_initialize(F_print_sequence_end_of_medium_s, 0, F_print_sequence_end_of_medium_s_length);
+ const f_string_static_t f_print_sequence_end_of_text_s = macro_f_string_static_t_initialize(F_print_sequence_end_of_text_s, 0, F_print_sequence_end_of_text_s_length);
+ const f_string_static_t f_print_sequence_end_of_transmission_s = macro_f_string_static_t_initialize(F_print_sequence_end_of_transmission_s, 0, F_print_sequence_end_of_transmission_s_length);
+ const f_string_static_t f_print_sequence_end_of_transmission_block_s = macro_f_string_static_t_initialize(F_print_sequence_end_of_transmission_block_s, 0, F_print_sequence_end_of_transmission_block_s_length);
+ const f_string_static_t f_print_sequence_enquiry_s = macro_f_string_static_t_initialize(F_print_sequence_enquiry_s, 0, F_print_sequence_enquiry_s_length);
+ const f_string_static_t f_print_sequence_escape_s = macro_f_string_static_t_initialize(F_print_sequence_escape_s, 0, F_print_sequence_escape_s_length);
+ const f_string_static_t f_print_sequence_form_feed_s = macro_f_string_static_t_initialize(F_print_sequence_form_feed_s, 0, F_print_sequence_form_feed_s_length);
+ const f_string_static_t f_print_sequence_line_feed_s = macro_f_string_static_t_initialize(F_print_sequence_line_feed_s, 0, F_print_sequence_line_feed_s_length);
+ const f_string_static_t f_print_sequence_line_new_s = macro_f_string_static_t_initialize(F_print_sequence_line_new_s, 0, F_print_sequence_line_new_s_length);
+ const f_string_static_t f_print_sequence_null_s = macro_f_string_static_t_initialize(F_print_sequence_null_s, 0, F_print_sequence_null_s_length);
+ const f_string_static_t f_print_sequence_separator_file_s = macro_f_string_static_t_initialize(F_print_sequence_separator_file_s, 0, F_print_sequence_separator_file_s_length);
+ const f_string_static_t f_print_sequence_separator_group_s = macro_f_string_static_t_initialize(F_print_sequence_separator_group_s, 0, F_print_sequence_separator_group_s_length);
+ const f_string_static_t f_print_sequence_separator_record_s = macro_f_string_static_t_initialize(F_print_sequence_separator_record_s, 0, F_print_sequence_separator_record_s_length);
+ const f_string_static_t f_print_sequence_separator_unit_s = macro_f_string_static_t_initialize(F_print_sequence_separator_unit_s, 0, F_print_sequence_separator_unit_s_length);
+ const f_string_static_t f_print_sequence_shift_in_s = macro_f_string_static_t_initialize(F_print_sequence_shift_in_s, 0, F_print_sequence_shift_in_s_length);
+ const f_string_static_t f_print_sequence_shift_out_s = macro_f_string_static_t_initialize(F_print_sequence_shift_out_s, 0, F_print_sequence_shift_out_s_length);
+ const f_string_static_t f_print_sequence_space_s = macro_f_string_static_t_initialize(F_print_sequence_space_s, 0, F_print_sequence_space_s_length);
+ const f_string_static_t f_print_sequence_start_of_header_s = macro_f_string_static_t_initialize(F_print_sequence_start_of_header_s, 0, F_print_sequence_start_of_header_s_length);
+ const f_string_static_t f_print_sequence_start_of_text_s = macro_f_string_static_t_initialize(F_print_sequence_start_of_text_s, 0, F_print_sequence_start_of_text_s_length);
+ const f_string_static_t f_print_sequence_substitute_s = macro_f_string_static_t_initialize(F_print_sequence_substitute_s, 0, F_print_sequence_substitute_s_length);
+ const f_string_static_t f_print_sequence_synchronous_idle_s = macro_f_string_static_t_initialize(F_print_sequence_synchronous_idle_s, 0, F_print_sequence_synchronous_idle_s_length);
+ const f_string_static_t f_print_sequence_tab_s = macro_f_string_static_t_initialize(F_print_sequence_tab_s, 0, F_print_sequence_tab_s_length);
+ const f_string_static_t f_print_sequence_tab_vertical_s = macro_f_string_static_t_initialize(F_print_sequence_tab_vertical_s, 0, F_print_sequence_tab_vertical_s_length);
+ const f_string_static_t f_print_sequence_unknown_s = macro_f_string_static_t_initialize(F_print_sequence_unknown_s, 0, F_print_sequence_unknown_s_length);
#endif // _di_f_print_sequences_
#ifndef _di_f_print_sequences_set_control_
#endif
#ifndef _di_f_serialize_splitter_s_
- const f_string_static_t f_serialize_simple_splitter_s = macro_f_string_static_t_initialize2(F_serialize_simple_splitter_s, 0, F_serialize_simple_splitter_s_length);
- const f_string_static_t f_serialize_delimited_splitter_s = macro_f_string_static_t_initialize2(F_serialize_delimited_splitter_s, 0, F_serialize_delimited_splitter_s_length);
- const f_string_static_t f_serialize_delimited_delimiter_s = macro_f_string_static_t_initialize2(F_serialize_delimited_delimiter_s, 0, F_serialize_delimited_delimiter_s_length);
+ const f_string_static_t f_serialize_simple_splitter_s = macro_f_string_static_t_initialize(F_serialize_simple_splitter_s, 0, F_serialize_simple_splitter_s_length);
+ const f_string_static_t f_serialize_delimited_splitter_s = macro_f_string_static_t_initialize(F_serialize_delimited_splitter_s, 0, F_serialize_delimited_splitter_s_length);
+ const f_string_static_t f_serialize_delimited_delimiter_s = macro_f_string_static_t_initialize(F_serialize_delimited_delimiter_s, 0, F_serialize_delimited_delimiter_s_length);
#endif // _di_f_serialize_splitter_s_
#ifdef __cplusplus
#ifndef _di_F_status_string_
#ifndef _di_F_status_boolean_
- const f_string_static_t f_status_false_s = macro_f_string_static_t_initialize2(F_status_false_s, 0, F_status_false_s_length);
- const f_string_static_t f_status_true_s = macro_f_string_static_t_initialize2(F_status_true_s, 0, F_status_true_s_length);
+ const f_string_static_t f_status_false_s = macro_f_string_static_t_initialize(F_status_false_s, 0, F_status_false_s_length);
+ const f_string_static_t f_status_true_s = macro_f_string_static_t_initialize(F_status_true_s, 0, F_status_true_s_length);
#endif // _di_F_status_boolean_
#ifndef _di_F_status_signal_
- const f_string_static_t f_status_signal_hangup_s = macro_f_string_static_t_initialize2(F_status_signal_hangup_s, 0, F_status_signal_hangup_s_length);
- const f_string_static_t f_status_signal_interrupt_s = macro_f_string_static_t_initialize2(F_status_signal_interrupt_s, 0, F_status_signal_interrupt_s_length);
- const f_string_static_t f_status_signal_quit_s = macro_f_string_static_t_initialize2(F_status_signal_quit_s, 0, F_status_signal_quit_s_length);
- const f_string_static_t f_status_signal_illegal_s = macro_f_string_static_t_initialize2(F_status_signal_illegal_s, 0, F_status_signal_illegal_s_length);
- const f_string_static_t f_status_signal_trap_s = macro_f_string_static_t_initialize2(F_status_signal_trap_s, 0, F_status_signal_trap_s_length);
- const f_string_static_t f_status_signal_abort_s = macro_f_string_static_t_initialize2(F_status_signal_abort_s, 0, F_status_signal_abort_s_length);
- const f_string_static_t f_status_signal_bus_error_s = macro_f_string_static_t_initialize2(F_status_signal_bus_error_s, 0, F_status_signal_bus_error_s_length);
- const f_string_static_t f_status_signal_floating_point_error_s = macro_f_string_static_t_initialize2(F_status_signal_floating_point_error_s, 0, F_status_signal_floating_point_error_s_length);
- const f_string_static_t f_status_signal_kill_s = macro_f_string_static_t_initialize2(F_status_signal_kill_s, 0, F_status_signal_kill_s_length);
- const f_string_static_t f_status_signal_user_1_s = macro_f_string_static_t_initialize2(F_status_signal_user_1_s, 0, F_status_signal_user_1_s_length);
- const f_string_static_t f_status_signal_segmentation_fault_s = macro_f_string_static_t_initialize2(F_status_signal_segmentation_fault_s, 0, F_status_signal_segmentation_fault_s_length);
- const f_string_static_t f_status_signal_user_2_s = macro_f_string_static_t_initialize2(F_status_signal_user_2_s, 0, F_status_signal_user_2_s_length);
- const f_string_static_t f_status_signal_broken_pipe_s = macro_f_string_static_t_initialize2(F_status_signal_broken_pipe_s, 0, F_status_signal_broken_pipe_s_length);
- const f_string_static_t f_status_signal_alarm_clock_s = macro_f_string_static_t_initialize2(F_status_signal_alarm_clock_s, 0, F_status_signal_alarm_clock_s_length);
- const f_string_static_t f_status_signal_termination_s = macro_f_string_static_t_initialize2(F_status_signal_termination_s, 0, F_status_signal_termination_s_length);
- const f_string_static_t f_status_signal_stack_fault_s = macro_f_string_static_t_initialize2(F_status_signal_stack_fault_s, 0, F_status_signal_stack_fault_s_length);
- const f_string_static_t f_status_signal_child_s = macro_f_string_static_t_initialize2(F_status_signal_child_s, 0, F_status_signal_child_s_length);
- const f_string_static_t f_status_signal_continue_s = macro_f_string_static_t_initialize2(F_status_signal_continue_s, 0, F_status_signal_continue_s_length);
- const f_string_static_t f_status_signal_stop_s = macro_f_string_static_t_initialize2(F_status_signal_stop_s, 0, F_status_signal_stop_s_length);
- const f_string_static_t f_status_signal_keyboard_stop_s = macro_f_string_static_t_initialize2(F_status_signal_keyboard_stop_s, 0, F_status_signal_keyboard_stop_s_length);
- const f_string_static_t f_status_signal_tty_in_s = macro_f_string_static_t_initialize2(F_status_signal_tty_in_s, 0, F_status_signal_tty_in_s_length);
- const f_string_static_t f_status_signal_tty_out_s = macro_f_string_static_t_initialize2(F_status_signal_tty_out_s, 0, F_status_signal_tty_out_s_length);
- const f_string_static_t f_status_signal_urgent_s = macro_f_string_static_t_initialize2(F_status_signal_urgent_s, 0, F_status_signal_urgent_s_length);
- const f_string_static_t f_status_signal_cpu_limit_s = macro_f_string_static_t_initialize2(F_status_signal_cpu_limit_s, 0, F_status_signal_cpu_limit_s_length);
- const f_string_static_t f_status_signal_file_size_limit_s = macro_f_string_static_t_initialize2(F_status_signal_file_size_limit_s, 0, F_status_signal_file_size_limit_s_length);
- const f_string_static_t f_status_signal_virtual_alarm_clock_s = macro_f_string_static_t_initialize2(F_status_signal_virtual_alarm_clock_s, 0, F_status_signal_virtual_alarm_clock_s_length);
- const f_string_static_t f_status_signal_profile_alarm_clock_s = macro_f_string_static_t_initialize2(F_status_signal_profile_alarm_clock_s, 0, F_status_signal_profile_alarm_clock_s_length);
- const f_string_static_t f_status_signal_window_size_change_s = macro_f_string_static_t_initialize2(F_status_signal_window_size_change_s, 0, F_status_signal_window_size_change_s_length);
- const f_string_static_t f_status_signal_pollable_event_s = macro_f_string_static_t_initialize2(F_status_signal_pollable_event_s, 0, F_status_signal_pollable_event_s_length);
- const f_string_static_t f_status_signal_power_failure_s = macro_f_string_static_t_initialize2(F_status_signal_power_failure_s, 0, F_status_signal_power_failure_s_length);
- const f_string_static_t f_status_signal_bad_system_call_s = macro_f_string_static_t_initialize2(F_status_signal_bad_system_call_s, 0, F_status_signal_bad_system_call_s_length);
- const f_string_static_t f_status_signal_reserved_32_s = macro_f_string_static_t_initialize2(F_status_signal_reserved_32_s, 0, F_status_signal_reserved_32_s_length);
- const f_string_static_t f_status_signal_reserved_33_s = macro_f_string_static_t_initialize2(F_status_signal_reserved_33_s, 0, F_status_signal_reserved_33_s_length);
- const f_string_static_t f_status_signal_reserved_34_s = macro_f_string_static_t_initialize2(F_status_signal_reserved_34_s, 0, F_status_signal_reserved_34_s_length);
- const f_string_static_t f_status_signal_reserved_35_s = macro_f_string_static_t_initialize2(F_status_signal_reserved_35_s, 0, F_status_signal_reserved_35_s_length);
- const f_string_static_t f_status_signal_reserved_36_s = macro_f_string_static_t_initialize2(F_status_signal_reserved_36_s, 0, F_status_signal_reserved_36_s_length);
- const f_string_static_t f_status_signal_reserved_37_s = macro_f_string_static_t_initialize2(F_status_signal_reserved_37_s, 0, F_status_signal_reserved_37_s_length);
- const f_string_static_t f_status_signal_reserved_38_s = macro_f_string_static_t_initialize2(F_status_signal_reserved_38_s, 0, F_status_signal_reserved_38_s_length);
- const f_string_static_t f_status_signal_reserved_39_s = macro_f_string_static_t_initialize2(F_status_signal_reserved_39_s, 0, F_status_signal_reserved_39_s_length);
- const f_string_static_t f_status_signal_reserved_40_s = macro_f_string_static_t_initialize2(F_status_signal_reserved_40_s, 0, F_status_signal_reserved_40_s_length);
- const f_string_static_t f_status_signal_reserved_41_s = macro_f_string_static_t_initialize2(F_status_signal_reserved_41_s, 0, F_status_signal_reserved_41_s_length);
- const f_string_static_t f_status_signal_reserved_42_s = macro_f_string_static_t_initialize2(F_status_signal_reserved_42_s, 0, F_status_signal_reserved_42_s_length);
- const f_string_static_t f_status_signal_reserved_43_s = macro_f_string_static_t_initialize2(F_status_signal_reserved_43_s, 0, F_status_signal_reserved_43_s_length);
- const f_string_static_t f_status_signal_reserved_44_s = macro_f_string_static_t_initialize2(F_status_signal_reserved_44_s, 0, F_status_signal_reserved_44_s_length);
- const f_string_static_t f_status_signal_reserved_45_s = macro_f_string_static_t_initialize2(F_status_signal_reserved_45_s, 0, F_status_signal_reserved_45_s_length);
- const f_string_static_t f_status_signal_reserved_46_s = macro_f_string_static_t_initialize2(F_status_signal_reserved_46_s, 0, F_status_signal_reserved_46_s_length);
- const f_string_static_t f_status_signal_reserved_47_s = macro_f_string_static_t_initialize2(F_status_signal_reserved_47_s, 0, F_status_signal_reserved_47_s_length);
- const f_string_static_t f_status_signal_reserved_48_s = macro_f_string_static_t_initialize2(F_status_signal_reserved_48_s, 0, F_status_signal_reserved_48_s_length);
- const f_string_static_t f_status_signal_reserved_49_s = macro_f_string_static_t_initialize2(F_status_signal_reserved_49_s, 0, F_status_signal_reserved_49_s_length);
- const f_string_static_t f_status_signal_reserved_50_s = macro_f_string_static_t_initialize2(F_status_signal_reserved_50_s, 0, F_status_signal_reserved_50_s_length);
- const f_string_static_t f_status_signal_reserved_51_s = macro_f_string_static_t_initialize2(F_status_signal_reserved_51_s, 0, F_status_signal_reserved_51_s_length);
- const f_string_static_t f_status_signal_reserved_52_s = macro_f_string_static_t_initialize2(F_status_signal_reserved_52_s, 0, F_status_signal_reserved_52_s_length);
- const f_string_static_t f_status_signal_reserved_53_s = macro_f_string_static_t_initialize2(F_status_signal_reserved_53_s, 0, F_status_signal_reserved_53_s_length);
- const f_string_static_t f_status_signal_reserved_54_s = macro_f_string_static_t_initialize2(F_status_signal_reserved_54_s, 0, F_status_signal_reserved_54_s_length);
- const f_string_static_t f_status_signal_reserved_55_s = macro_f_string_static_t_initialize2(F_status_signal_reserved_55_s, 0, F_status_signal_reserved_55_s_length);
- const f_string_static_t f_status_signal_reserved_56_s = macro_f_string_static_t_initialize2(F_status_signal_reserved_56_s, 0, F_status_signal_reserved_56_s_length);
- const f_string_static_t f_status_signal_reserved_57_s = macro_f_string_static_t_initialize2(F_status_signal_reserved_57_s, 0, F_status_signal_reserved_57_s_length);
- const f_string_static_t f_status_signal_reserved_58_s = macro_f_string_static_t_initialize2(F_status_signal_reserved_58_s, 0, F_status_signal_reserved_58_s_length);
- const f_string_static_t f_status_signal_reserved_59_s = macro_f_string_static_t_initialize2(F_status_signal_reserved_59_s, 0, F_status_signal_reserved_59_s_length);
- const f_string_static_t f_status_signal_reserved_60_s = macro_f_string_static_t_initialize2(F_status_signal_reserved_60_s, 0, F_status_signal_reserved_60_s_length);
- const f_string_static_t f_status_signal_reserved_61_s = macro_f_string_static_t_initialize2(F_status_signal_reserved_61_s, 0, F_status_signal_reserved_61_s_length);
- const f_string_static_t f_status_signal_reserved_62_s = macro_f_string_static_t_initialize2(F_status_signal_reserved_62_s, 0, F_status_signal_reserved_62_s_length);
- const f_string_static_t f_status_signal_reserved_63_s = macro_f_string_static_t_initialize2(F_status_signal_reserved_63_s, 0, F_status_signal_reserved_63_s_length);
- const f_string_static_t f_status_signal_reserved_64_s = macro_f_string_static_t_initialize2(F_status_signal_reserved_64_s, 0, F_status_signal_reserved_64_s_length);
+ const f_string_static_t f_status_signal_hangup_s = macro_f_string_static_t_initialize(F_status_signal_hangup_s, 0, F_status_signal_hangup_s_length);
+ const f_string_static_t f_status_signal_interrupt_s = macro_f_string_static_t_initialize(F_status_signal_interrupt_s, 0, F_status_signal_interrupt_s_length);
+ const f_string_static_t f_status_signal_quit_s = macro_f_string_static_t_initialize(F_status_signal_quit_s, 0, F_status_signal_quit_s_length);
+ const f_string_static_t f_status_signal_illegal_s = macro_f_string_static_t_initialize(F_status_signal_illegal_s, 0, F_status_signal_illegal_s_length);
+ const f_string_static_t f_status_signal_trap_s = macro_f_string_static_t_initialize(F_status_signal_trap_s, 0, F_status_signal_trap_s_length);
+ const f_string_static_t f_status_signal_abort_s = macro_f_string_static_t_initialize(F_status_signal_abort_s, 0, F_status_signal_abort_s_length);
+ const f_string_static_t f_status_signal_bus_error_s = macro_f_string_static_t_initialize(F_status_signal_bus_error_s, 0, F_status_signal_bus_error_s_length);
+ const f_string_static_t f_status_signal_floating_point_error_s = macro_f_string_static_t_initialize(F_status_signal_floating_point_error_s, 0, F_status_signal_floating_point_error_s_length);
+ const f_string_static_t f_status_signal_kill_s = macro_f_string_static_t_initialize(F_status_signal_kill_s, 0, F_status_signal_kill_s_length);
+ const f_string_static_t f_status_signal_user_1_s = macro_f_string_static_t_initialize(F_status_signal_user_1_s, 0, F_status_signal_user_1_s_length);
+ const f_string_static_t f_status_signal_segmentation_fault_s = macro_f_string_static_t_initialize(F_status_signal_segmentation_fault_s, 0, F_status_signal_segmentation_fault_s_length);
+ const f_string_static_t f_status_signal_user_2_s = macro_f_string_static_t_initialize(F_status_signal_user_2_s, 0, F_status_signal_user_2_s_length);
+ const f_string_static_t f_status_signal_broken_pipe_s = macro_f_string_static_t_initialize(F_status_signal_broken_pipe_s, 0, F_status_signal_broken_pipe_s_length);
+ const f_string_static_t f_status_signal_alarm_clock_s = macro_f_string_static_t_initialize(F_status_signal_alarm_clock_s, 0, F_status_signal_alarm_clock_s_length);
+ const f_string_static_t f_status_signal_termination_s = macro_f_string_static_t_initialize(F_status_signal_termination_s, 0, F_status_signal_termination_s_length);
+ const f_string_static_t f_status_signal_stack_fault_s = macro_f_string_static_t_initialize(F_status_signal_stack_fault_s, 0, F_status_signal_stack_fault_s_length);
+ const f_string_static_t f_status_signal_child_s = macro_f_string_static_t_initialize(F_status_signal_child_s, 0, F_status_signal_child_s_length);
+ const f_string_static_t f_status_signal_continue_s = macro_f_string_static_t_initialize(F_status_signal_continue_s, 0, F_status_signal_continue_s_length);
+ const f_string_static_t f_status_signal_stop_s = macro_f_string_static_t_initialize(F_status_signal_stop_s, 0, F_status_signal_stop_s_length);
+ const f_string_static_t f_status_signal_keyboard_stop_s = macro_f_string_static_t_initialize(F_status_signal_keyboard_stop_s, 0, F_status_signal_keyboard_stop_s_length);
+ const f_string_static_t f_status_signal_tty_in_s = macro_f_string_static_t_initialize(F_status_signal_tty_in_s, 0, F_status_signal_tty_in_s_length);
+ const f_string_static_t f_status_signal_tty_out_s = macro_f_string_static_t_initialize(F_status_signal_tty_out_s, 0, F_status_signal_tty_out_s_length);
+ const f_string_static_t f_status_signal_urgent_s = macro_f_string_static_t_initialize(F_status_signal_urgent_s, 0, F_status_signal_urgent_s_length);
+ const f_string_static_t f_status_signal_cpu_limit_s = macro_f_string_static_t_initialize(F_status_signal_cpu_limit_s, 0, F_status_signal_cpu_limit_s_length);
+ const f_string_static_t f_status_signal_file_size_limit_s = macro_f_string_static_t_initialize(F_status_signal_file_size_limit_s, 0, F_status_signal_file_size_limit_s_length);
+ const f_string_static_t f_status_signal_virtual_alarm_clock_s = macro_f_string_static_t_initialize(F_status_signal_virtual_alarm_clock_s, 0, F_status_signal_virtual_alarm_clock_s_length);
+ const f_string_static_t f_status_signal_profile_alarm_clock_s = macro_f_string_static_t_initialize(F_status_signal_profile_alarm_clock_s, 0, F_status_signal_profile_alarm_clock_s_length);
+ const f_string_static_t f_status_signal_window_size_change_s = macro_f_string_static_t_initialize(F_status_signal_window_size_change_s, 0, F_status_signal_window_size_change_s_length);
+ const f_string_static_t f_status_signal_pollable_event_s = macro_f_string_static_t_initialize(F_status_signal_pollable_event_s, 0, F_status_signal_pollable_event_s_length);
+ const f_string_static_t f_status_signal_power_failure_s = macro_f_string_static_t_initialize(F_status_signal_power_failure_s, 0, F_status_signal_power_failure_s_length);
+ const f_string_static_t f_status_signal_bad_system_call_s = macro_f_string_static_t_initialize(F_status_signal_bad_system_call_s, 0, F_status_signal_bad_system_call_s_length);
+ const f_string_static_t f_status_signal_reserved_32_s = macro_f_string_static_t_initialize(F_status_signal_reserved_32_s, 0, F_status_signal_reserved_32_s_length);
+ const f_string_static_t f_status_signal_reserved_33_s = macro_f_string_static_t_initialize(F_status_signal_reserved_33_s, 0, F_status_signal_reserved_33_s_length);
+ const f_string_static_t f_status_signal_reserved_34_s = macro_f_string_static_t_initialize(F_status_signal_reserved_34_s, 0, F_status_signal_reserved_34_s_length);
+ const f_string_static_t f_status_signal_reserved_35_s = macro_f_string_static_t_initialize(F_status_signal_reserved_35_s, 0, F_status_signal_reserved_35_s_length);
+ const f_string_static_t f_status_signal_reserved_36_s = macro_f_string_static_t_initialize(F_status_signal_reserved_36_s, 0, F_status_signal_reserved_36_s_length);
+ const f_string_static_t f_status_signal_reserved_37_s = macro_f_string_static_t_initialize(F_status_signal_reserved_37_s, 0, F_status_signal_reserved_37_s_length);
+ const f_string_static_t f_status_signal_reserved_38_s = macro_f_string_static_t_initialize(F_status_signal_reserved_38_s, 0, F_status_signal_reserved_38_s_length);
+ const f_string_static_t f_status_signal_reserved_39_s = macro_f_string_static_t_initialize(F_status_signal_reserved_39_s, 0, F_status_signal_reserved_39_s_length);
+ const f_string_static_t f_status_signal_reserved_40_s = macro_f_string_static_t_initialize(F_status_signal_reserved_40_s, 0, F_status_signal_reserved_40_s_length);
+ const f_string_static_t f_status_signal_reserved_41_s = macro_f_string_static_t_initialize(F_status_signal_reserved_41_s, 0, F_status_signal_reserved_41_s_length);
+ const f_string_static_t f_status_signal_reserved_42_s = macro_f_string_static_t_initialize(F_status_signal_reserved_42_s, 0, F_status_signal_reserved_42_s_length);
+ const f_string_static_t f_status_signal_reserved_43_s = macro_f_string_static_t_initialize(F_status_signal_reserved_43_s, 0, F_status_signal_reserved_43_s_length);
+ const f_string_static_t f_status_signal_reserved_44_s = macro_f_string_static_t_initialize(F_status_signal_reserved_44_s, 0, F_status_signal_reserved_44_s_length);
+ const f_string_static_t f_status_signal_reserved_45_s = macro_f_string_static_t_initialize(F_status_signal_reserved_45_s, 0, F_status_signal_reserved_45_s_length);
+ const f_string_static_t f_status_signal_reserved_46_s = macro_f_string_static_t_initialize(F_status_signal_reserved_46_s, 0, F_status_signal_reserved_46_s_length);
+ const f_string_static_t f_status_signal_reserved_47_s = macro_f_string_static_t_initialize(F_status_signal_reserved_47_s, 0, F_status_signal_reserved_47_s_length);
+ const f_string_static_t f_status_signal_reserved_48_s = macro_f_string_static_t_initialize(F_status_signal_reserved_48_s, 0, F_status_signal_reserved_48_s_length);
+ const f_string_static_t f_status_signal_reserved_49_s = macro_f_string_static_t_initialize(F_status_signal_reserved_49_s, 0, F_status_signal_reserved_49_s_length);
+ const f_string_static_t f_status_signal_reserved_50_s = macro_f_string_static_t_initialize(F_status_signal_reserved_50_s, 0, F_status_signal_reserved_50_s_length);
+ const f_string_static_t f_status_signal_reserved_51_s = macro_f_string_static_t_initialize(F_status_signal_reserved_51_s, 0, F_status_signal_reserved_51_s_length);
+ const f_string_static_t f_status_signal_reserved_52_s = macro_f_string_static_t_initialize(F_status_signal_reserved_52_s, 0, F_status_signal_reserved_52_s_length);
+ const f_string_static_t f_status_signal_reserved_53_s = macro_f_string_static_t_initialize(F_status_signal_reserved_53_s, 0, F_status_signal_reserved_53_s_length);
+ const f_string_static_t f_status_signal_reserved_54_s = macro_f_string_static_t_initialize(F_status_signal_reserved_54_s, 0, F_status_signal_reserved_54_s_length);
+ const f_string_static_t f_status_signal_reserved_55_s = macro_f_string_static_t_initialize(F_status_signal_reserved_55_s, 0, F_status_signal_reserved_55_s_length);
+ const f_string_static_t f_status_signal_reserved_56_s = macro_f_string_static_t_initialize(F_status_signal_reserved_56_s, 0, F_status_signal_reserved_56_s_length);
+ const f_string_static_t f_status_signal_reserved_57_s = macro_f_string_static_t_initialize(F_status_signal_reserved_57_s, 0, F_status_signal_reserved_57_s_length);
+ const f_string_static_t f_status_signal_reserved_58_s = macro_f_string_static_t_initialize(F_status_signal_reserved_58_s, 0, F_status_signal_reserved_58_s_length);
+ const f_string_static_t f_status_signal_reserved_59_s = macro_f_string_static_t_initialize(F_status_signal_reserved_59_s, 0, F_status_signal_reserved_59_s_length);
+ const f_string_static_t f_status_signal_reserved_60_s = macro_f_string_static_t_initialize(F_status_signal_reserved_60_s, 0, F_status_signal_reserved_60_s_length);
+ const f_string_static_t f_status_signal_reserved_61_s = macro_f_string_static_t_initialize(F_status_signal_reserved_61_s, 0, F_status_signal_reserved_61_s_length);
+ const f_string_static_t f_status_signal_reserved_62_s = macro_f_string_static_t_initialize(F_status_signal_reserved_62_s, 0, F_status_signal_reserved_62_s_length);
+ const f_string_static_t f_status_signal_reserved_63_s = macro_f_string_static_t_initialize(F_status_signal_reserved_63_s, 0, F_status_signal_reserved_63_s_length);
+ const f_string_static_t f_status_signal_reserved_64_s = macro_f_string_static_t_initialize(F_status_signal_reserved_64_s, 0, F_status_signal_reserved_64_s_length);
#endif // _di_F_status_signal_
#ifndef _di_F_status_basic_
- const f_string_static_t f_status_none_s = macro_f_string_static_t_initialize2(F_status_none_s, 0, F_status_none_s_length);
- const f_string_static_t f_status_abort_s = macro_f_string_static_t_initialize2(F_status_abort_s, 0, F_status_abort_s_length);
- const f_string_static_t f_status_abort_not_s = macro_f_string_static_t_initialize2(F_status_abort_not_s, 0, F_status_abort_not_s_length);
- const f_string_static_t f_status_absolute_s = macro_f_string_static_t_initialize2(F_status_absolute_s, 0, F_status_absolute_s_length);
- const f_string_static_t f_status_absolute_not_s = macro_f_string_static_t_initialize2(F_status_absolute_not_s, 0, F_status_absolute_not_s_length);
- const f_string_static_t f_status_address_s = macro_f_string_static_t_initialize2(F_status_address_s, 0, F_status_address_s_length);
- const f_string_static_t f_status_address_not_s = macro_f_string_static_t_initialize2(F_status_address_not_s, 0, F_status_address_not_s_length);
- const f_string_static_t f_status_ascii_s = macro_f_string_static_t_initialize2(F_status_ascii_s, 0, F_status_ascii_s_length);
- const f_string_static_t f_status_ascii_not_s = macro_f_string_static_t_initialize2(F_status_ascii_not_s, 0, F_status_ascii_not_s_length);
- const f_string_static_t f_status_atomic_s = macro_f_string_static_t_initialize2(F_status_atomic_s, 0, F_status_atomic_s_length);
- const f_string_static_t f_status_atomic_not_s = macro_f_string_static_t_initialize2(F_status_atomic_not_s, 0, F_status_atomic_not_s_length);
- const f_string_static_t f_status_begin_s = macro_f_string_static_t_initialize2(F_status_begin_s, 0, F_status_begin_s_length);
- const f_string_static_t f_status_begin_not_s = macro_f_string_static_t_initialize2(F_status_begin_not_s, 0, F_status_begin_not_s_length);
- const f_string_static_t f_status_block_s = macro_f_string_static_t_initialize2(F_status_block_s, 0, F_status_block_s_length);
- const f_string_static_t f_status_block_not_s = macro_f_string_static_t_initialize2(F_status_block_not_s, 0, F_status_block_not_s_length);
- const f_string_static_t f_status_body_s = macro_f_string_static_t_initialize2(F_status_body_s, 0, F_status_body_s_length);
- const f_string_static_t f_status_body_not_s = macro_f_string_static_t_initialize2(F_status_body_not_s, 0, F_status_body_not_s_length);
- const f_string_static_t f_status_bound_s = macro_f_string_static_t_initialize2(F_status_bound_s, 0, F_status_bound_s_length);
- const f_string_static_t f_status_bound_not_s = macro_f_string_static_t_initialize2(F_status_bound_not_s, 0, F_status_bound_not_s_length);
- const f_string_static_t f_status_capability_s = macro_f_string_static_t_initialize2(F_status_capability_s, 0, F_status_capability_s_length);
- const f_string_static_t f_status_capability_not_s = macro_f_string_static_t_initialize2(F_status_capability_not_s, 0, F_status_capability_not_s_length);
- const f_string_static_t f_status_child_s = macro_f_string_static_t_initialize2(F_status_child_s, 0, F_status_child_s_length);
- const f_string_static_t f_status_child_not_s = macro_f_string_static_t_initialize2(F_status_child_not_s, 0, F_status_child_not_s_length);
- const f_string_static_t f_status_complete_s = macro_f_string_static_t_initialize2(F_status_complete_s, 0, F_status_complete_s_length);
- const f_string_static_t f_status_complete_not_s = macro_f_string_static_t_initialize2(F_status_complete_not_s, 0, F_status_complete_not_s_length);
- const f_string_static_t f_status_connect_s = macro_f_string_static_t_initialize2(F_status_connect_s, 0, F_status_connect_s_length);
- const f_string_static_t f_status_connect_not_s = macro_f_string_static_t_initialize2(F_status_connect_not_s, 0, F_status_connect_not_s_length);
- const f_string_static_t f_status_connect_refuse_s = macro_f_string_static_t_initialize2(F_status_connect_refuse_s, 0, F_status_connect_refuse_s_length);
- const f_string_static_t f_status_connect_reset_s = macro_f_string_static_t_initialize2(F_status_connect_reset_s, 0, F_status_connect_reset_s_length);
- const f_string_static_t f_status_container_s = macro_f_string_static_t_initialize2(F_status_container_s, 0, F_status_container_s_length);
- const f_string_static_t f_status_container_not_s = macro_f_string_static_t_initialize2(F_status_container_not_s, 0, F_status_container_not_s_length);
- const f_string_static_t f_status_content_s = macro_f_string_static_t_initialize2(F_status_content_s, 0, F_status_content_s_length);
- const f_string_static_t f_status_content_not_s = macro_f_string_static_t_initialize2(F_status_content_not_s, 0, F_status_content_not_s_length);
- const f_string_static_t f_status_continue_s = macro_f_string_static_t_initialize2(F_status_continue_s, 0, F_status_continue_s_length);
- const f_string_static_t f_status_continue_not_s = macro_f_string_static_t_initialize2(F_status_continue_not_s, 0, F_status_continue_not_s_length);
- const f_string_static_t f_status_control_s = macro_f_string_static_t_initialize2(F_status_control_s, 0, F_status_control_s_length);
- const f_string_static_t f_status_control_not_s = macro_f_string_static_t_initialize2(F_status_control_not_s, 0, F_status_control_not_s_length);
- const f_string_static_t f_status_control_group_s = macro_f_string_static_t_initialize2(F_status_control_group_s, 0, F_status_control_group_s_length);
- const f_string_static_t f_status_control_group_not_s = macro_f_string_static_t_initialize2(F_status_control_group_not_s, 0, F_status_control_group_not_s_length);
- const f_string_static_t f_status_critical_s = macro_f_string_static_t_initialize2(F_status_critical_s, 0, F_status_critical_s_length);
- const f_string_static_t f_status_critical_not_s = macro_f_string_static_t_initialize2(F_status_critical_not_s, 0, F_status_critical_not_s_length);
- const f_string_static_t f_status_dead_s = macro_f_string_static_t_initialize2(F_status_dead_s, 0, F_status_dead_s_length);
- const f_string_static_t f_status_dead_not_s = macro_f_string_static_t_initialize2(F_status_dead_not_s, 0, F_status_dead_not_s_length);
- const f_string_static_t f_status_deadlock_s = macro_f_string_static_t_initialize2(F_status_deadlock_s, 0, F_status_deadlock_s_length);
- const f_string_static_t f_status_deadlock_not_s = macro_f_string_static_t_initialize2(F_status_deadlock_not_s, 0, F_status_deadlock_not_s_length);
- const f_string_static_t f_status_descriptor_s = macro_f_string_static_t_initialize2(F_status_descriptor_s, 0, F_status_descriptor_s_length);
- const f_string_static_t f_status_descriptor_not_s = macro_f_string_static_t_initialize2(F_status_descriptor_not_s, 0, F_status_descriptor_not_s_length);
- const f_string_static_t f_status_device_s = macro_f_string_static_t_initialize2(F_status_device_s, 0, F_status_device_s_length);
- const f_string_static_t f_status_device_not_s = macro_f_string_static_t_initialize2(F_status_device_not_s, 0, F_status_device_not_s_length);
- const f_string_static_t f_status_disable_s = macro_f_string_static_t_initialize2(F_status_disable_s, 0, F_status_disable_s_length);
- const f_string_static_t f_status_disable_not_s = macro_f_string_static_t_initialize2(F_status_disable_not_s, 0, F_status_disable_not_s_length);
- const f_string_static_t f_status_domain_s = macro_f_string_static_t_initialize2(F_status_domain_s, 0, F_status_domain_s_length);
- const f_string_static_t f_status_domain_not_s = macro_f_string_static_t_initialize2(F_status_domain_not_s, 0, F_status_domain_not_s_length);
- const f_string_static_t f_status_done_s = macro_f_string_static_t_initialize2(F_status_done_s, 0, F_status_done_s_length);
- const f_string_static_t f_status_done_not_s = macro_f_string_static_t_initialize2(F_status_done_not_s, 0, F_status_done_not_s_length);
- const f_string_static_t f_status_dummy_s = macro_f_string_static_t_initialize2(F_status_dummy_s, 0, F_status_dummy_s_length);
- const f_string_static_t f_status_dummy_not_s = macro_f_string_static_t_initialize2(F_status_dummy_not_s, 0, F_status_dummy_not_s_length);
- const f_string_static_t f_status_empty_s = macro_f_string_static_t_initialize2(F_status_empty_s, 0, F_status_empty_s_length);
- const f_string_static_t f_status_empty_not_s = macro_f_string_static_t_initialize2(F_status_empty_not_s, 0, F_status_empty_not_s_length);
- const f_string_static_t f_status_enable_s = macro_f_string_static_t_initialize2(F_status_enable_s, 0, F_status_enable_s_length);
- const f_string_static_t f_status_enable_not_s = macro_f_string_static_t_initialize2(F_status_enable_not_s, 0, F_status_enable_not_s_length);
- const f_string_static_t f_status_encoding_s = macro_f_string_static_t_initialize2(F_status_encoding_s, 0, F_status_encoding_s_length);
- const f_string_static_t f_status_encoding_not_s = macro_f_string_static_t_initialize2(F_status_encoding_not_s, 0, F_status_encoding_not_s_length);
- const f_string_static_t f_status_end_s = macro_f_string_static_t_initialize2(F_status_end_s, 0, F_status_end_s_length);
- const f_string_static_t f_status_end_not_s = macro_f_string_static_t_initialize2(F_status_end_not_s, 0, F_status_end_not_s_length);
- const f_string_static_t f_status_endian_s = macro_f_string_static_t_initialize2(F_status_endian_s, 0, F_status_endian_s_length);
- const f_string_static_t f_status_endian_big_s = macro_f_string_static_t_initialize2(F_status_endian_big_s, 0, F_status_endian_big_s_length);
- const f_string_static_t f_status_endian_little_s = macro_f_string_static_t_initialize2(F_status_endian_little_s, 0, F_status_endian_little_s_length);
- const f_string_static_t f_status_endian_not_s = macro_f_string_static_t_initialize2(F_status_endian_not_s, 0, F_status_endian_not_s_length);
- const f_string_static_t f_status_eoa_s = macro_f_string_static_t_initialize2(F_status_eoa_s, 0, F_status_eoa_s_length);
- const f_string_static_t f_status_eoa_not_s = macro_f_string_static_t_initialize2(F_status_eoa_not_s, 0, F_status_eoa_not_s_length);
- const f_string_static_t f_status_eof_s = macro_f_string_static_t_initialize2(F_status_eof_s, 0, F_status_eof_s_length);
- const f_string_static_t f_status_eof_not_s = macro_f_string_static_t_initialize2(F_status_eof_not_s, 0, F_status_eof_not_s_length);
- const f_string_static_t f_status_eol_s = macro_f_string_static_t_initialize2(F_status_eol_s, 0, F_status_eol_s_length);
- const f_string_static_t f_status_eol_not_s = macro_f_string_static_t_initialize2(F_status_eol_not_s, 0, F_status_eol_not_s_length);
- const f_string_static_t f_status_eos_s = macro_f_string_static_t_initialize2(F_status_eos_s, 0, F_status_eos_s_length);
- const f_string_static_t f_status_eos_not_s = macro_f_string_static_t_initialize2(F_status_eos_not_s, 0, F_status_eos_not_s_length);
- const f_string_static_t f_status_execute_s = macro_f_string_static_t_initialize2(F_status_execute_s, 0, F_status_execute_s_length);
- const f_string_static_t f_status_execute_not_s = macro_f_string_static_t_initialize2(F_status_execute_not_s, 0, F_status_execute_not_s_length);
- const f_string_static_t f_status_exist_s = macro_f_string_static_t_initialize2(F_status_exist_s, 0, F_status_exist_s_length);
- const f_string_static_t f_status_exist_not_s = macro_f_string_static_t_initialize2(F_status_exist_not_s, 0, F_status_exist_not_s_length);
- const f_string_static_t f_status_failure_s = macro_f_string_static_t_initialize2(F_status_failure_s, 0, F_status_failure_s_length);
- const f_string_static_t f_status_failure_not_s = macro_f_string_static_t_initialize2(F_status_failure_not_s, 0, F_status_failure_not_s_length);
- const f_string_static_t f_status_family_s = macro_f_string_static_t_initialize2(F_status_family_s, 0, F_status_family_s_length);
- const f_string_static_t f_status_family_not_s = macro_f_string_static_t_initialize2(F_status_family_not_s, 0, F_status_family_not_s_length);
- const f_string_static_t f_status_first_s = macro_f_string_static_t_initialize2(F_status_first_s, 0, F_status_first_s_length);
- const f_string_static_t f_status_first_not_s = macro_f_string_static_t_initialize2(F_status_first_not_s, 0, F_status_first_not_s_length);
- const f_string_static_t f_status_footer_s = macro_f_string_static_t_initialize2(F_status_footer_s, 0, F_status_footer_s_length);
- const f_string_static_t f_status_footer_not_s = macro_f_string_static_t_initialize2(F_status_footer_not_s, 0, F_status_footer_not_s_length);
- const f_string_static_t f_status_fork_s = macro_f_string_static_t_initialize2(F_status_fork_s, 0, F_status_fork_s_length);
- const f_string_static_t f_status_fork_not_s = macro_f_string_static_t_initialize2(F_status_fork_not_s, 0, F_status_fork_not_s_length);
- const f_string_static_t f_status_format_s = macro_f_string_static_t_initialize2(F_status_format_s, 0, F_status_format_s_length);
- const f_string_static_t f_status_format_not_s = macro_f_string_static_t_initialize2(F_status_format_not_s, 0, F_status_format_not_s_length);
- const f_string_static_t f_status_found_s = macro_f_string_static_t_initialize2(F_status_found_s, 0, F_status_found_s_length);
- const f_string_static_t f_status_found_not_s = macro_f_string_static_t_initialize2(F_status_found_not_s, 0, F_status_found_not_s_length);
- const f_string_static_t f_status_full_s = macro_f_string_static_t_initialize2(F_status_full_s, 0, F_status_full_s_length);
- const f_string_static_t f_status_full_not_s = macro_f_string_static_t_initialize2(F_status_full_not_s, 0, F_status_full_not_s_length);
- const f_string_static_t f_status_group_s = macro_f_string_static_t_initialize2(F_status_group_s, 0, F_status_group_s_length);
- const f_string_static_t f_status_group_not_s = macro_f_string_static_t_initialize2(F_status_group_not_s, 0, F_status_group_not_s_length);
- const f_string_static_t f_status_header_s = macro_f_string_static_t_initialize2(F_status_header_s, 0, F_status_header_s_length);
- const f_string_static_t f_status_header_not_s = macro_f_string_static_t_initialize2(F_status_header_not_s, 0, F_status_header_not_s_length);
- const f_string_static_t f_status_ignore_s = macro_f_string_static_t_initialize2(F_status_ignore_s, 0, F_status_ignore_s_length);
- const f_string_static_t f_status_ignore_not_s = macro_f_string_static_t_initialize2(F_status_ignore_not_s, 0, F_status_ignore_not_s_length);
- const f_string_static_t f_status_implemented_s = macro_f_string_static_t_initialize2(F_status_implemented_s, 0, F_status_implemented_s_length);
- const f_string_static_t f_status_implemented_not_s = macro_f_string_static_t_initialize2(F_status_implemented_not_s, 0, F_status_implemented_not_s_length);
- const f_string_static_t f_status_input_s = macro_f_string_static_t_initialize2(F_status_input_s, 0, F_status_input_s_length);
- const f_string_static_t f_status_input_not_s = macro_f_string_static_t_initialize2(F_status_input_not_s, 0, F_status_input_not_s_length);
- const f_string_static_t f_status_input_output_s = macro_f_string_static_t_initialize2(F_status_input_output_s, 0, F_status_input_output_s_length);
- const f_string_static_t f_status_interrupt_s = macro_f_string_static_t_initialize2(F_status_interrupt_s, 0, F_status_interrupt_s_length);
- const f_string_static_t f_status_interrupt_not_s = macro_f_string_static_t_initialize2(F_status_interrupt_not_s, 0, F_status_interrupt_not_s_length);
- const f_string_static_t f_status_known_s = macro_f_string_static_t_initialize2(F_status_known_s, 0, F_status_known_s_length);
- const f_string_static_t f_status_known_not_s = macro_f_string_static_t_initialize2(F_status_known_not_s, 0, F_status_known_not_s_length);
- const f_string_static_t f_status_last_s = macro_f_string_static_t_initialize2(F_status_last_s, 0, F_status_last_s_length);
- const f_string_static_t f_status_last_not_s = macro_f_string_static_t_initialize2(F_status_last_not_s, 0, F_status_last_not_s_length);
- const f_string_static_t f_status_limit_s = macro_f_string_static_t_initialize2(F_status_limit_s, 0, F_status_limit_s_length);
- const f_string_static_t f_status_limit_not_s = macro_f_string_static_t_initialize2(F_status_limit_not_s, 0, F_status_limit_not_s_length);
- const f_string_static_t f_status_link_s = macro_f_string_static_t_initialize2(F_status_link_s, 0, F_status_link_s_length);
- const f_string_static_t f_status_link_not_s = macro_f_string_static_t_initialize2(F_status_link_not_s, 0, F_status_link_not_s_length);
- const f_string_static_t f_status_live_s = macro_f_string_static_t_initialize2(F_status_live_s, 0, F_status_live_s_length);
- const f_string_static_t f_status_live_not_s = macro_f_string_static_t_initialize2(F_status_live_not_s, 0, F_status_live_not_s_length);
- const f_string_static_t f_status_lock_s = macro_f_string_static_t_initialize2(F_status_lock_s, 0, F_status_lock_s_length);
- const f_string_static_t f_status_lock_not_s = macro_f_string_static_t_initialize2(F_status_lock_not_s, 0, F_status_lock_not_s_length);
- const f_string_static_t f_status_loop_s = macro_f_string_static_t_initialize2(F_status_loop_s, 0, F_status_loop_s_length);
- const f_string_static_t f_status_loop_not_s = macro_f_string_static_t_initialize2(F_status_loop_not_s, 0, F_status_loop_not_s_length);
- const f_string_static_t f_status_maybe_s = macro_f_string_static_t_initialize2(F_status_maybe_s, 0, F_status_maybe_s_length);
- const f_string_static_t f_status_maybe_not_s = macro_f_string_static_t_initialize2(F_status_maybe_not_s, 0, F_status_maybe_not_s_length);
- const f_string_static_t f_status_memory_s = macro_f_string_static_t_initialize2(F_status_memory_s, 0, F_status_memory_s_length);
- const f_string_static_t f_status_memory_not_s = macro_f_string_static_t_initialize2(F_status_memory_not_s, 0, F_status_memory_not_s_length);
- const f_string_static_t f_status_message_s = macro_f_string_static_t_initialize2(F_status_message_s, 0, F_status_message_s_length);
- const f_string_static_t f_status_message_not_s = macro_f_string_static_t_initialize2(F_status_message_not_s, 0, F_status_message_not_s_length);
- const f_string_static_t f_status_minor_s = macro_f_string_static_t_initialize2(F_status_minor_s, 0, F_status_minor_s_length);
- const f_string_static_t f_status_minor_not_s = macro_f_string_static_t_initialize2(F_status_minor_not_s, 0, F_status_minor_not_s_length);
- const f_string_static_t f_status_moderate_s = macro_f_string_static_t_initialize2(F_status_moderate_s, 0, F_status_moderate_s_length);
- const f_string_static_t f_status_moderate_not_s = macro_f_string_static_t_initialize2(F_status_moderate_not_s, 0, F_status_moderate_not_s_length);
- const f_string_static_t f_status_mount_s = macro_f_string_static_t_initialize2(F_status_mount_s, 0, F_status_mount_s_length);
- const f_string_static_t f_status_mount_not_s = macro_f_string_static_t_initialize2(F_status_mount_not_s, 0, F_status_mount_not_s_length);
- const f_string_static_t f_status_name_s = macro_f_string_static_t_initialize2(F_status_name_s, 0, F_status_name_s_length);
- const f_string_static_t f_status_name_not_s = macro_f_string_static_t_initialize2(F_status_name_not_s, 0, F_status_name_not_s_length);
- const f_string_static_t f_status_next_s = macro_f_string_static_t_initialize2(F_status_next_s, 0, F_status_next_s_length);
- const f_string_static_t f_status_next_not_s = macro_f_string_static_t_initialize2(F_status_next_not_s, 0, F_status_next_not_s_length);
- const f_string_static_t f_status_nice_s = macro_f_string_static_t_initialize2(F_status_nice_s, 0, F_status_nice_s_length);
- const f_string_static_t f_status_nice_not_s = macro_f_string_static_t_initialize2(F_status_nice_not_s, 0, F_status_nice_not_s_length);
- const f_string_static_t f_status_object_s = macro_f_string_static_t_initialize2(F_status_object_s, 0, F_status_object_s_length);
- const f_string_static_t f_status_object_not_s = macro_f_string_static_t_initialize2(F_status_object_not_s, 0, F_status_object_not_s_length);
- const f_string_static_t f_status_option_s = macro_f_string_static_t_initialize2(F_status_option_s, 0, F_status_option_s_length);
- const f_string_static_t f_status_option_not_s = macro_f_string_static_t_initialize2(F_status_option_not_s, 0, F_status_option_not_s_length);
- const f_string_static_t f_status_output_s = macro_f_string_static_t_initialize2(F_status_output_s, 0, F_status_output_s_length);
- const f_string_static_t f_status_output_not_s = macro_f_string_static_t_initialize2(F_status_output_not_s, 0, F_status_output_not_s_length);
- const f_string_static_t f_status_packet_s = macro_f_string_static_t_initialize2(F_status_packet_s, 0, F_status_packet_s_length);
- const f_string_static_t f_status_packet_not_s = macro_f_string_static_t_initialize2(F_status_packet_not_s, 0, F_status_packet_not_s_length);
- const f_string_static_t f_status_parameter_s = macro_f_string_static_t_initialize2(F_status_parameter_s, 0, F_status_parameter_s_length);
- const f_string_static_t f_status_parameter_not_s = macro_f_string_static_t_initialize2(F_status_parameter_not_s, 0, F_status_parameter_not_s_length);
- const f_string_static_t f_status_parent_s = macro_f_string_static_t_initialize2(F_status_parent_s, 0, F_status_parent_s_length);
- const f_string_static_t f_status_parent_not_s = macro_f_string_static_t_initialize2(F_status_parent_not_s, 0, F_status_parent_not_s_length);
- const f_string_static_t f_status_payload_s = macro_f_string_static_t_initialize2(F_status_payload_s, 0, F_status_payload_s_length);
- const f_string_static_t f_status_payload_not_s = macro_f_string_static_t_initialize2(F_status_payload_not_s, 0, F_status_payload_not_s_length);
- const f_string_static_t f_status_pipe_s = macro_f_string_static_t_initialize2(F_status_pipe_s, 0, F_status_pipe_s_length);
- const f_string_static_t f_status_pipe_not_s = macro_f_string_static_t_initialize2(F_status_pipe_not_s, 0, F_status_pipe_not_s_length);
- const f_string_static_t f_status_port_s = macro_f_string_static_t_initialize2(F_status_port_s, 0, F_status_port_s_length);
- const f_string_static_t f_status_port_not_s = macro_f_string_static_t_initialize2(F_status_port_not_s, 0, F_status_port_not_s_length);
- const f_string_static_t f_status_previous_s = macro_f_string_static_t_initialize2(F_status_previous_s, 0, F_status_previous_s_length);
- const f_string_static_t f_status_previous_not_s = macro_f_string_static_t_initialize2(F_status_previous_not_s, 0, F_status_previous_not_s_length);
- const f_string_static_t f_status_processor_s = macro_f_string_static_t_initialize2(F_status_processor_s, 0, F_status_processor_s_length);
- const f_string_static_t f_status_processor_not_s = macro_f_string_static_t_initialize2(F_status_processor_not_s, 0, F_status_processor_not_s_length);
- const f_string_static_t f_status_progress_s = macro_f_string_static_t_initialize2(F_status_progress_s, 0, F_status_progress_s_length);
- const f_string_static_t f_status_progress_not_s = macro_f_string_static_t_initialize2(F_status_progress_not_s, 0, F_status_progress_not_s_length);
- const f_string_static_t f_status_prohibited_s = macro_f_string_static_t_initialize2(F_status_prohibited_s, 0, F_status_prohibited_s_length);
- const f_string_static_t f_status_prohibited_not_s = macro_f_string_static_t_initialize2(F_status_prohibited_not_s, 0, F_status_prohibited_not_s_length);
- const f_string_static_t f_status_property_s = macro_f_string_static_t_initialize2(F_status_property_s, 0, F_status_property_s_length);
- const f_string_static_t f_status_property_not_s = macro_f_string_static_t_initialize2(F_status_property_not_s, 0, F_status_property_not_s_length);
- const f_string_static_t f_status_protocol_s = macro_f_string_static_t_initialize2(F_status_protocol_s, 0, F_status_protocol_s_length);
- const f_string_static_t f_status_protocol_not_s = macro_f_string_static_t_initialize2(F_status_protocol_not_s, 0, F_status_protocol_not_s_length);
- const f_string_static_t f_status_range_s = macro_f_string_static_t_initialize2(F_status_range_s, 0, F_status_range_s_length);
- const f_string_static_t f_status_range_not_s = macro_f_string_static_t_initialize2(F_status_range_not_s, 0, F_status_range_not_s_length);
- const f_string_static_t f_status_read_s = macro_f_string_static_t_initialize2(F_status_read_s, 0, F_status_read_s_length);
- const f_string_static_t f_status_read_not_s = macro_f_string_static_t_initialize2(F_status_read_not_s, 0, F_status_read_not_s_length);
- const f_string_static_t f_status_read_only_s = macro_f_string_static_t_initialize2(F_status_read_only_s, 0, F_status_read_only_s_length);
- const f_string_static_t f_status_ready_s = macro_f_string_static_t_initialize2(F_status_ready_s, 0, F_status_ready_s_length);
- const f_string_static_t f_status_ready_not_s = macro_f_string_static_t_initialize2(F_status_ready_not_s, 0, F_status_ready_not_s_length);
- const f_string_static_t f_status_recover_s = macro_f_string_static_t_initialize2(F_status_recover_s, 0, F_status_recover_s_length);
- const f_string_static_t f_status_recover_not_s = macro_f_string_static_t_initialize2(F_status_recover_not_s, 0, F_status_recover_not_s_length);
- const f_string_static_t f_status_recurse_s = macro_f_string_static_t_initialize2(F_status_recurse_s, 0, F_status_recurse_s_length);
- const f_string_static_t f_status_recurse_not_s = macro_f_string_static_t_initialize2(F_status_recurse_not_s, 0, F_status_recurse_not_s_length);
- const f_string_static_t f_status_relative_s = macro_f_string_static_t_initialize2(F_status_relative_s, 0, F_status_relative_s_length);
- const f_string_static_t f_status_relative_not_s = macro_f_string_static_t_initialize2(F_status_relative_not_s, 0, F_status_relative_not_s_length);
- const f_string_static_t f_status_require_s = macro_f_string_static_t_initialize2(F_status_require_s, 0, F_status_require_s_length);
- const f_string_static_t f_status_require_not_s = macro_f_string_static_t_initialize2(F_status_require_not_s, 0, F_status_require_not_s_length);
- const f_string_static_t f_status_resource_s = macro_f_string_static_t_initialize2(F_status_resource_s, 0, F_status_resource_s_length);
- const f_string_static_t f_status_resource_not_s = macro_f_string_static_t_initialize2(F_status_resource_not_s, 0, F_status_resource_not_s_length);
- const f_string_static_t f_status_search_s = macro_f_string_static_t_initialize2(F_status_search_s, 0, F_status_search_s_length);
- const f_string_static_t f_status_search_not_s = macro_f_string_static_t_initialize2(F_status_search_not_s, 0, F_status_search_not_s_length);
- const f_string_static_t f_status_schedule_s = macro_f_string_static_t_initialize2(F_status_schedule_s, 0, F_status_schedule_s_length);
- const f_string_static_t f_status_schedule_not_s = macro_f_string_static_t_initialize2(F_status_schedule_not_s, 0, F_status_schedule_not_s_length);
- const f_string_static_t f_status_size_s = macro_f_string_static_t_initialize2(F_status_size_s, 0, F_status_size_s_length);
- const f_string_static_t f_status_size_not_s = macro_f_string_static_t_initialize2(F_status_size_not_s, 0, F_status_size_not_s_length);
- const f_string_static_t f_status_signal_s = macro_f_string_static_t_initialize2(F_status_signal_s, 0, F_status_signal_s_length);
- const f_string_static_t f_status_signal_not_s = macro_f_string_static_t_initialize2(F_status_signal_not_s, 0, F_status_signal_not_s_length);
- const f_string_static_t f_status_space_s = macro_f_string_static_t_initialize2(F_status_space_s, 0, F_status_space_s_length);
- const f_string_static_t f_status_space_not_s = macro_f_string_static_t_initialize2(F_status_space_not_s, 0, F_status_space_not_s_length);
- const f_string_static_t f_status_start_s = macro_f_string_static_t_initialize2(F_status_start_s, 0, F_status_start_s_length);
- const f_string_static_t f_status_start_not_s = macro_f_string_static_t_initialize2(F_status_start_not_s, 0, F_status_start_not_s_length);
- const f_string_static_t f_status_stop_s = macro_f_string_static_t_initialize2(F_status_stop_s, 0, F_status_stop_s_length);
- const f_string_static_t f_status_stop_not_s = macro_f_string_static_t_initialize2(F_status_stop_not_s, 0, F_status_stop_not_s_length);
- const f_string_static_t f_status_stream_s = macro_f_string_static_t_initialize2(F_status_stream_s, 0, F_status_stream_s_length);
- const f_string_static_t f_status_stream_not_s = macro_f_string_static_t_initialize2(F_status_stream_not_s, 0, F_status_stream_not_s_length);
- const f_string_static_t f_status_string_s = macro_f_string_static_t_initialize2(F_status_string_s, 0, F_status_string_s_length);
- const f_string_static_t f_status_string_not_s = macro_f_string_static_t_initialize2(F_status_string_not_s, 0, F_status_string_not_s_length);
- const f_string_static_t f_status_string_too_large_s = macro_f_string_static_t_initialize2(F_status_string_too_large_s, 0, F_status_string_too_large_s_length);
- const f_string_static_t f_status_string_too_small_s = macro_f_string_static_t_initialize2(F_status_string_too_small_s, 0, F_status_string_too_small_s_length);
- const f_string_static_t f_status_syntax_s = macro_f_string_static_t_initialize2(F_status_syntax_s, 0, F_status_syntax_s_length);
- const f_string_static_t f_status_syntax_not_s = macro_f_string_static_t_initialize2(F_status_syntax_not_s, 0, F_status_syntax_not_s_length);
- const f_string_static_t f_status_thread_s = macro_f_string_static_t_initialize2(F_status_thread_s, 0, F_status_thread_s_length);
- const f_string_static_t f_status_thread_not_s = macro_f_string_static_t_initialize2(F_status_thread_not_s, 0, F_status_thread_not_s_length);
- const f_string_static_t f_status_time_s = macro_f_string_static_t_initialize2(F_status_time_s, 0, F_status_time_s_length);
- const f_string_static_t f_status_time_not_s = macro_f_string_static_t_initialize2(F_status_time_not_s, 0, F_status_time_not_s_length);
- const f_string_static_t f_status_time_out_s = macro_f_string_static_t_initialize2(F_status_time_out_s, 0, F_status_time_out_s_length);
- const f_string_static_t f_status_too_large_s = macro_f_string_static_t_initialize2(F_status_too_large_s, 0, F_status_too_large_s_length);
- const f_string_static_t f_status_too_small_s = macro_f_string_static_t_initialize2(F_status_too_small_s, 0, F_status_too_small_s_length);
- const f_string_static_t f_status_type_s = macro_f_string_static_t_initialize2(F_status_type_s, 0, F_status_type_s_length);
- const f_string_static_t f_status_type_not_s = macro_f_string_static_t_initialize2(F_status_type_not_s, 0, F_status_type_not_s_length);
- const f_string_static_t f_status_success_s = macro_f_string_static_t_initialize2(F_status_success_s, 0, F_status_success_s_length);
- const f_string_static_t f_status_success_not_s = macro_f_string_static_t_initialize2(F_status_success_not_s, 0, F_status_success_not_s_length);
- const f_string_static_t f_status_supported_s = macro_f_string_static_t_initialize2(F_status_supported_s, 0, F_status_supported_s_length);
- const f_string_static_t f_status_supported_not_s = macro_f_string_static_t_initialize2(F_status_supported_not_s, 0, F_status_supported_not_s_length);
- const f_string_static_t f_status_user_s = macro_f_string_static_t_initialize2(F_status_user_s, 0, F_status_user_s_length);
- const f_string_static_t f_status_user_not_s = macro_f_string_static_t_initialize2(F_status_user_not_s, 0, F_status_user_not_s_length);
- const f_string_static_t f_status_utf_s = macro_f_string_static_t_initialize2(F_status_utf_s, 0, F_status_utf_s_length);
- const f_string_static_t f_status_utf_fragment_s = macro_f_string_static_t_initialize2(F_status_utf_fragment_s, 0, F_status_utf_fragment_s_length);
- const f_string_static_t f_status_utf_fragment_not_s = macro_f_string_static_t_initialize2(F_status_utf_fragment_not_s, 0, F_status_utf_fragment_not_s_length);
- const f_string_static_t f_status_utf_not_s = macro_f_string_static_t_initialize2(F_status_utf_not_s, 0, F_status_utf_not_s_length);
- const f_string_static_t f_status_valid_s = macro_f_string_static_t_initialize2(F_status_valid_s, 0, F_status_valid_s_length);
- const f_string_static_t f_status_valid_not_s = macro_f_string_static_t_initialize2(F_status_valid_not_s, 0, F_status_valid_not_s_length);
- const f_string_static_t f_status_value_s = macro_f_string_static_t_initialize2(F_status_value_s, 0, F_status_value_s_length);
- const f_string_static_t f_status_value_not_s = macro_f_string_static_t_initialize2(F_status_value_not_s, 0, F_status_value_not_s_length);
- const f_string_static_t f_status_wait_s = macro_f_string_static_t_initialize2(F_status_wait_s, 0, F_status_wait_s_length);
- const f_string_static_t f_status_wait_not_s = macro_f_string_static_t_initialize2(F_status_wait_not_s, 0, F_status_wait_not_s_length);
- const f_string_static_t f_status_warn_s = macro_f_string_static_t_initialize2(F_status_warn_s, 0, F_status_warn_s_length);
- const f_string_static_t f_status_warn_not_s = macro_f_string_static_t_initialize2(F_status_warn_not_s, 0, F_status_warn_not_s_length);
- const f_string_static_t f_status_world_s = macro_f_string_static_t_initialize2(F_status_world_s, 0, F_status_world_s_length);
- const f_string_static_t f_status_world_not_s = macro_f_string_static_t_initialize2(F_status_world_not_s, 0, F_status_world_not_s_length);
- const f_string_static_t f_status_write_s = macro_f_string_static_t_initialize2(F_status_write_s, 0, F_status_write_s_length);
- const f_string_static_t f_status_write_not_s = macro_f_string_static_t_initialize2(F_status_write_not_s, 0, F_status_write_not_s_length);
- const f_string_static_t f_status_write_only_s = macro_f_string_static_t_initialize2(F_status_write_only_s, 0, F_status_write_only_s_length);
+ const f_string_static_t f_status_none_s = macro_f_string_static_t_initialize(F_status_none_s, 0, F_status_none_s_length);
+ const f_string_static_t f_status_abort_s = macro_f_string_static_t_initialize(F_status_abort_s, 0, F_status_abort_s_length);
+ const f_string_static_t f_status_abort_not_s = macro_f_string_static_t_initialize(F_status_abort_not_s, 0, F_status_abort_not_s_length);
+ const f_string_static_t f_status_absolute_s = macro_f_string_static_t_initialize(F_status_absolute_s, 0, F_status_absolute_s_length);
+ const f_string_static_t f_status_absolute_not_s = macro_f_string_static_t_initialize(F_status_absolute_not_s, 0, F_status_absolute_not_s_length);
+ const f_string_static_t f_status_address_s = macro_f_string_static_t_initialize(F_status_address_s, 0, F_status_address_s_length);
+ const f_string_static_t f_status_address_not_s = macro_f_string_static_t_initialize(F_status_address_not_s, 0, F_status_address_not_s_length);
+ const f_string_static_t f_status_ascii_s = macro_f_string_static_t_initialize(F_status_ascii_s, 0, F_status_ascii_s_length);
+ const f_string_static_t f_status_ascii_not_s = macro_f_string_static_t_initialize(F_status_ascii_not_s, 0, F_status_ascii_not_s_length);
+ const f_string_static_t f_status_atomic_s = macro_f_string_static_t_initialize(F_status_atomic_s, 0, F_status_atomic_s_length);
+ const f_string_static_t f_status_atomic_not_s = macro_f_string_static_t_initialize(F_status_atomic_not_s, 0, F_status_atomic_not_s_length);
+ const f_string_static_t f_status_begin_s = macro_f_string_static_t_initialize(F_status_begin_s, 0, F_status_begin_s_length);
+ const f_string_static_t f_status_begin_not_s = macro_f_string_static_t_initialize(F_status_begin_not_s, 0, F_status_begin_not_s_length);
+ const f_string_static_t f_status_block_s = macro_f_string_static_t_initialize(F_status_block_s, 0, F_status_block_s_length);
+ const f_string_static_t f_status_block_not_s = macro_f_string_static_t_initialize(F_status_block_not_s, 0, F_status_block_not_s_length);
+ const f_string_static_t f_status_body_s = macro_f_string_static_t_initialize(F_status_body_s, 0, F_status_body_s_length);
+ const f_string_static_t f_status_body_not_s = macro_f_string_static_t_initialize(F_status_body_not_s, 0, F_status_body_not_s_length);
+ const f_string_static_t f_status_bound_s = macro_f_string_static_t_initialize(F_status_bound_s, 0, F_status_bound_s_length);
+ const f_string_static_t f_status_bound_not_s = macro_f_string_static_t_initialize(F_status_bound_not_s, 0, F_status_bound_not_s_length);
+ const f_string_static_t f_status_capability_s = macro_f_string_static_t_initialize(F_status_capability_s, 0, F_status_capability_s_length);
+ const f_string_static_t f_status_capability_not_s = macro_f_string_static_t_initialize(F_status_capability_not_s, 0, F_status_capability_not_s_length);
+ const f_string_static_t f_status_child_s = macro_f_string_static_t_initialize(F_status_child_s, 0, F_status_child_s_length);
+ const f_string_static_t f_status_child_not_s = macro_f_string_static_t_initialize(F_status_child_not_s, 0, F_status_child_not_s_length);
+ const f_string_static_t f_status_complete_s = macro_f_string_static_t_initialize(F_status_complete_s, 0, F_status_complete_s_length);
+ const f_string_static_t f_status_complete_not_s = macro_f_string_static_t_initialize(F_status_complete_not_s, 0, F_status_complete_not_s_length);
+ const f_string_static_t f_status_connect_s = macro_f_string_static_t_initialize(F_status_connect_s, 0, F_status_connect_s_length);
+ const f_string_static_t f_status_connect_not_s = macro_f_string_static_t_initialize(F_status_connect_not_s, 0, F_status_connect_not_s_length);
+ const f_string_static_t f_status_connect_refuse_s = macro_f_string_static_t_initialize(F_status_connect_refuse_s, 0, F_status_connect_refuse_s_length);
+ const f_string_static_t f_status_connect_reset_s = macro_f_string_static_t_initialize(F_status_connect_reset_s, 0, F_status_connect_reset_s_length);
+ const f_string_static_t f_status_container_s = macro_f_string_static_t_initialize(F_status_container_s, 0, F_status_container_s_length);
+ const f_string_static_t f_status_container_not_s = macro_f_string_static_t_initialize(F_status_container_not_s, 0, F_status_container_not_s_length);
+ const f_string_static_t f_status_content_s = macro_f_string_static_t_initialize(F_status_content_s, 0, F_status_content_s_length);
+ const f_string_static_t f_status_content_not_s = macro_f_string_static_t_initialize(F_status_content_not_s, 0, F_status_content_not_s_length);
+ const f_string_static_t f_status_continue_s = macro_f_string_static_t_initialize(F_status_continue_s, 0, F_status_continue_s_length);
+ const f_string_static_t f_status_continue_not_s = macro_f_string_static_t_initialize(F_status_continue_not_s, 0, F_status_continue_not_s_length);
+ const f_string_static_t f_status_control_s = macro_f_string_static_t_initialize(F_status_control_s, 0, F_status_control_s_length);
+ const f_string_static_t f_status_control_not_s = macro_f_string_static_t_initialize(F_status_control_not_s, 0, F_status_control_not_s_length);
+ const f_string_static_t f_status_control_group_s = macro_f_string_static_t_initialize(F_status_control_group_s, 0, F_status_control_group_s_length);
+ const f_string_static_t f_status_control_group_not_s = macro_f_string_static_t_initialize(F_status_control_group_not_s, 0, F_status_control_group_not_s_length);
+ const f_string_static_t f_status_critical_s = macro_f_string_static_t_initialize(F_status_critical_s, 0, F_status_critical_s_length);
+ const f_string_static_t f_status_critical_not_s = macro_f_string_static_t_initialize(F_status_critical_not_s, 0, F_status_critical_not_s_length);
+ const f_string_static_t f_status_dead_s = macro_f_string_static_t_initialize(F_status_dead_s, 0, F_status_dead_s_length);
+ const f_string_static_t f_status_dead_not_s = macro_f_string_static_t_initialize(F_status_dead_not_s, 0, F_status_dead_not_s_length);
+ const f_string_static_t f_status_deadlock_s = macro_f_string_static_t_initialize(F_status_deadlock_s, 0, F_status_deadlock_s_length);
+ const f_string_static_t f_status_deadlock_not_s = macro_f_string_static_t_initialize(F_status_deadlock_not_s, 0, F_status_deadlock_not_s_length);
+ const f_string_static_t f_status_descriptor_s = macro_f_string_static_t_initialize(F_status_descriptor_s, 0, F_status_descriptor_s_length);
+ const f_string_static_t f_status_descriptor_not_s = macro_f_string_static_t_initialize(F_status_descriptor_not_s, 0, F_status_descriptor_not_s_length);
+ const f_string_static_t f_status_device_s = macro_f_string_static_t_initialize(F_status_device_s, 0, F_status_device_s_length);
+ const f_string_static_t f_status_device_not_s = macro_f_string_static_t_initialize(F_status_device_not_s, 0, F_status_device_not_s_length);
+ const f_string_static_t f_status_disable_s = macro_f_string_static_t_initialize(F_status_disable_s, 0, F_status_disable_s_length);
+ const f_string_static_t f_status_disable_not_s = macro_f_string_static_t_initialize(F_status_disable_not_s, 0, F_status_disable_not_s_length);
+ const f_string_static_t f_status_domain_s = macro_f_string_static_t_initialize(F_status_domain_s, 0, F_status_domain_s_length);
+ const f_string_static_t f_status_domain_not_s = macro_f_string_static_t_initialize(F_status_domain_not_s, 0, F_status_domain_not_s_length);
+ const f_string_static_t f_status_done_s = macro_f_string_static_t_initialize(F_status_done_s, 0, F_status_done_s_length);
+ const f_string_static_t f_status_done_not_s = macro_f_string_static_t_initialize(F_status_done_not_s, 0, F_status_done_not_s_length);
+ const f_string_static_t f_status_dummy_s = macro_f_string_static_t_initialize(F_status_dummy_s, 0, F_status_dummy_s_length);
+ const f_string_static_t f_status_dummy_not_s = macro_f_string_static_t_initialize(F_status_dummy_not_s, 0, F_status_dummy_not_s_length);
+ const f_string_static_t f_status_empty_s = macro_f_string_static_t_initialize(F_status_empty_s, 0, F_status_empty_s_length);
+ const f_string_static_t f_status_empty_not_s = macro_f_string_static_t_initialize(F_status_empty_not_s, 0, F_status_empty_not_s_length);
+ const f_string_static_t f_status_enable_s = macro_f_string_static_t_initialize(F_status_enable_s, 0, F_status_enable_s_length);
+ const f_string_static_t f_status_enable_not_s = macro_f_string_static_t_initialize(F_status_enable_not_s, 0, F_status_enable_not_s_length);
+ const f_string_static_t f_status_encoding_s = macro_f_string_static_t_initialize(F_status_encoding_s, 0, F_status_encoding_s_length);
+ const f_string_static_t f_status_encoding_not_s = macro_f_string_static_t_initialize(F_status_encoding_not_s, 0, F_status_encoding_not_s_length);
+ const f_string_static_t f_status_end_s = macro_f_string_static_t_initialize(F_status_end_s, 0, F_status_end_s_length);
+ const f_string_static_t f_status_end_not_s = macro_f_string_static_t_initialize(F_status_end_not_s, 0, F_status_end_not_s_length);
+ const f_string_static_t f_status_endian_s = macro_f_string_static_t_initialize(F_status_endian_s, 0, F_status_endian_s_length);
+ const f_string_static_t f_status_endian_big_s = macro_f_string_static_t_initialize(F_status_endian_big_s, 0, F_status_endian_big_s_length);
+ const f_string_static_t f_status_endian_little_s = macro_f_string_static_t_initialize(F_status_endian_little_s, 0, F_status_endian_little_s_length);
+ const f_string_static_t f_status_endian_not_s = macro_f_string_static_t_initialize(F_status_endian_not_s, 0, F_status_endian_not_s_length);
+ const f_string_static_t f_status_eoa_s = macro_f_string_static_t_initialize(F_status_eoa_s, 0, F_status_eoa_s_length);
+ const f_string_static_t f_status_eoa_not_s = macro_f_string_static_t_initialize(F_status_eoa_not_s, 0, F_status_eoa_not_s_length);
+ const f_string_static_t f_status_eof_s = macro_f_string_static_t_initialize(F_status_eof_s, 0, F_status_eof_s_length);
+ const f_string_static_t f_status_eof_not_s = macro_f_string_static_t_initialize(F_status_eof_not_s, 0, F_status_eof_not_s_length);
+ const f_string_static_t f_status_eol_s = macro_f_string_static_t_initialize(F_status_eol_s, 0, F_status_eol_s_length);
+ const f_string_static_t f_status_eol_not_s = macro_f_string_static_t_initialize(F_status_eol_not_s, 0, F_status_eol_not_s_length);
+ const f_string_static_t f_status_eos_s = macro_f_string_static_t_initialize(F_status_eos_s, 0, F_status_eos_s_length);
+ const f_string_static_t f_status_eos_not_s = macro_f_string_static_t_initialize(F_status_eos_not_s, 0, F_status_eos_not_s_length);
+ const f_string_static_t f_status_execute_s = macro_f_string_static_t_initialize(F_status_execute_s, 0, F_status_execute_s_length);
+ const f_string_static_t f_status_execute_not_s = macro_f_string_static_t_initialize(F_status_execute_not_s, 0, F_status_execute_not_s_length);
+ const f_string_static_t f_status_exist_s = macro_f_string_static_t_initialize(F_status_exist_s, 0, F_status_exist_s_length);
+ const f_string_static_t f_status_exist_not_s = macro_f_string_static_t_initialize(F_status_exist_not_s, 0, F_status_exist_not_s_length);
+ const f_string_static_t f_status_failure_s = macro_f_string_static_t_initialize(F_status_failure_s, 0, F_status_failure_s_length);
+ const f_string_static_t f_status_failure_not_s = macro_f_string_static_t_initialize(F_status_failure_not_s, 0, F_status_failure_not_s_length);
+ const f_string_static_t f_status_family_s = macro_f_string_static_t_initialize(F_status_family_s, 0, F_status_family_s_length);
+ const f_string_static_t f_status_family_not_s = macro_f_string_static_t_initialize(F_status_family_not_s, 0, F_status_family_not_s_length);
+ const f_string_static_t f_status_first_s = macro_f_string_static_t_initialize(F_status_first_s, 0, F_status_first_s_length);
+ const f_string_static_t f_status_first_not_s = macro_f_string_static_t_initialize(F_status_first_not_s, 0, F_status_first_not_s_length);
+ const f_string_static_t f_status_footer_s = macro_f_string_static_t_initialize(F_status_footer_s, 0, F_status_footer_s_length);
+ const f_string_static_t f_status_footer_not_s = macro_f_string_static_t_initialize(F_status_footer_not_s, 0, F_status_footer_not_s_length);
+ const f_string_static_t f_status_fork_s = macro_f_string_static_t_initialize(F_status_fork_s, 0, F_status_fork_s_length);
+ const f_string_static_t f_status_fork_not_s = macro_f_string_static_t_initialize(F_status_fork_not_s, 0, F_status_fork_not_s_length);
+ const f_string_static_t f_status_format_s = macro_f_string_static_t_initialize(F_status_format_s, 0, F_status_format_s_length);
+ const f_string_static_t f_status_format_not_s = macro_f_string_static_t_initialize(F_status_format_not_s, 0, F_status_format_not_s_length);
+ const f_string_static_t f_status_found_s = macro_f_string_static_t_initialize(F_status_found_s, 0, F_status_found_s_length);
+ const f_string_static_t f_status_found_not_s = macro_f_string_static_t_initialize(F_status_found_not_s, 0, F_status_found_not_s_length);
+ const f_string_static_t f_status_full_s = macro_f_string_static_t_initialize(F_status_full_s, 0, F_status_full_s_length);
+ const f_string_static_t f_status_full_not_s = macro_f_string_static_t_initialize(F_status_full_not_s, 0, F_status_full_not_s_length);
+ const f_string_static_t f_status_group_s = macro_f_string_static_t_initialize(F_status_group_s, 0, F_status_group_s_length);
+ const f_string_static_t f_status_group_not_s = macro_f_string_static_t_initialize(F_status_group_not_s, 0, F_status_group_not_s_length);
+ const f_string_static_t f_status_header_s = macro_f_string_static_t_initialize(F_status_header_s, 0, F_status_header_s_length);
+ const f_string_static_t f_status_header_not_s = macro_f_string_static_t_initialize(F_status_header_not_s, 0, F_status_header_not_s_length);
+ const f_string_static_t f_status_ignore_s = macro_f_string_static_t_initialize(F_status_ignore_s, 0, F_status_ignore_s_length);
+ const f_string_static_t f_status_ignore_not_s = macro_f_string_static_t_initialize(F_status_ignore_not_s, 0, F_status_ignore_not_s_length);
+ const f_string_static_t f_status_implemented_s = macro_f_string_static_t_initialize(F_status_implemented_s, 0, F_status_implemented_s_length);
+ const f_string_static_t f_status_implemented_not_s = macro_f_string_static_t_initialize(F_status_implemented_not_s, 0, F_status_implemented_not_s_length);
+ const f_string_static_t f_status_input_s = macro_f_string_static_t_initialize(F_status_input_s, 0, F_status_input_s_length);
+ const f_string_static_t f_status_input_not_s = macro_f_string_static_t_initialize(F_status_input_not_s, 0, F_status_input_not_s_length);
+ const f_string_static_t f_status_input_output_s = macro_f_string_static_t_initialize(F_status_input_output_s, 0, F_status_input_output_s_length);
+ const f_string_static_t f_status_interrupt_s = macro_f_string_static_t_initialize(F_status_interrupt_s, 0, F_status_interrupt_s_length);
+ const f_string_static_t f_status_interrupt_not_s = macro_f_string_static_t_initialize(F_status_interrupt_not_s, 0, F_status_interrupt_not_s_length);
+ const f_string_static_t f_status_known_s = macro_f_string_static_t_initialize(F_status_known_s, 0, F_status_known_s_length);
+ const f_string_static_t f_status_known_not_s = macro_f_string_static_t_initialize(F_status_known_not_s, 0, F_status_known_not_s_length);
+ const f_string_static_t f_status_last_s = macro_f_string_static_t_initialize(F_status_last_s, 0, F_status_last_s_length);
+ const f_string_static_t f_status_last_not_s = macro_f_string_static_t_initialize(F_status_last_not_s, 0, F_status_last_not_s_length);
+ const f_string_static_t f_status_limit_s = macro_f_string_static_t_initialize(F_status_limit_s, 0, F_status_limit_s_length);
+ const f_string_static_t f_status_limit_not_s = macro_f_string_static_t_initialize(F_status_limit_not_s, 0, F_status_limit_not_s_length);
+ const f_string_static_t f_status_link_s = macro_f_string_static_t_initialize(F_status_link_s, 0, F_status_link_s_length);
+ const f_string_static_t f_status_link_not_s = macro_f_string_static_t_initialize(F_status_link_not_s, 0, F_status_link_not_s_length);
+ const f_string_static_t f_status_live_s = macro_f_string_static_t_initialize(F_status_live_s, 0, F_status_live_s_length);
+ const f_string_static_t f_status_live_not_s = macro_f_string_static_t_initialize(F_status_live_not_s, 0, F_status_live_not_s_length);
+ const f_string_static_t f_status_lock_s = macro_f_string_static_t_initialize(F_status_lock_s, 0, F_status_lock_s_length);
+ const f_string_static_t f_status_lock_not_s = macro_f_string_static_t_initialize(F_status_lock_not_s, 0, F_status_lock_not_s_length);
+ const f_string_static_t f_status_loop_s = macro_f_string_static_t_initialize(F_status_loop_s, 0, F_status_loop_s_length);
+ const f_string_static_t f_status_loop_not_s = macro_f_string_static_t_initialize(F_status_loop_not_s, 0, F_status_loop_not_s_length);
+ const f_string_static_t f_status_maybe_s = macro_f_string_static_t_initialize(F_status_maybe_s, 0, F_status_maybe_s_length);
+ const f_string_static_t f_status_maybe_not_s = macro_f_string_static_t_initialize(F_status_maybe_not_s, 0, F_status_maybe_not_s_length);
+ const f_string_static_t f_status_memory_s = macro_f_string_static_t_initialize(F_status_memory_s, 0, F_status_memory_s_length);
+ const f_string_static_t f_status_memory_not_s = macro_f_string_static_t_initialize(F_status_memory_not_s, 0, F_status_memory_not_s_length);
+ const f_string_static_t f_status_message_s = macro_f_string_static_t_initialize(F_status_message_s, 0, F_status_message_s_length);
+ const f_string_static_t f_status_message_not_s = macro_f_string_static_t_initialize(F_status_message_not_s, 0, F_status_message_not_s_length);
+ const f_string_static_t f_status_minor_s = macro_f_string_static_t_initialize(F_status_minor_s, 0, F_status_minor_s_length);
+ const f_string_static_t f_status_minor_not_s = macro_f_string_static_t_initialize(F_status_minor_not_s, 0, F_status_minor_not_s_length);
+ const f_string_static_t f_status_moderate_s = macro_f_string_static_t_initialize(F_status_moderate_s, 0, F_status_moderate_s_length);
+ const f_string_static_t f_status_moderate_not_s = macro_f_string_static_t_initialize(F_status_moderate_not_s, 0, F_status_moderate_not_s_length);
+ const f_string_static_t f_status_mount_s = macro_f_string_static_t_initialize(F_status_mount_s, 0, F_status_mount_s_length);
+ const f_string_static_t f_status_mount_not_s = macro_f_string_static_t_initialize(F_status_mount_not_s, 0, F_status_mount_not_s_length);
+ const f_string_static_t f_status_name_s = macro_f_string_static_t_initialize(F_status_name_s, 0, F_status_name_s_length);
+ const f_string_static_t f_status_name_not_s = macro_f_string_static_t_initialize(F_status_name_not_s, 0, F_status_name_not_s_length);
+ const f_string_static_t f_status_next_s = macro_f_string_static_t_initialize(F_status_next_s, 0, F_status_next_s_length);
+ const f_string_static_t f_status_next_not_s = macro_f_string_static_t_initialize(F_status_next_not_s, 0, F_status_next_not_s_length);
+ const f_string_static_t f_status_nice_s = macro_f_string_static_t_initialize(F_status_nice_s, 0, F_status_nice_s_length);
+ const f_string_static_t f_status_nice_not_s = macro_f_string_static_t_initialize(F_status_nice_not_s, 0, F_status_nice_not_s_length);
+ const f_string_static_t f_status_object_s = macro_f_string_static_t_initialize(F_status_object_s, 0, F_status_object_s_length);
+ const f_string_static_t f_status_object_not_s = macro_f_string_static_t_initialize(F_status_object_not_s, 0, F_status_object_not_s_length);
+ const f_string_static_t f_status_option_s = macro_f_string_static_t_initialize(F_status_option_s, 0, F_status_option_s_length);
+ const f_string_static_t f_status_option_not_s = macro_f_string_static_t_initialize(F_status_option_not_s, 0, F_status_option_not_s_length);
+ const f_string_static_t f_status_output_s = macro_f_string_static_t_initialize(F_status_output_s, 0, F_status_output_s_length);
+ const f_string_static_t f_status_output_not_s = macro_f_string_static_t_initialize(F_status_output_not_s, 0, F_status_output_not_s_length);
+ const f_string_static_t f_status_packet_s = macro_f_string_static_t_initialize(F_status_packet_s, 0, F_status_packet_s_length);
+ const f_string_static_t f_status_packet_not_s = macro_f_string_static_t_initialize(F_status_packet_not_s, 0, F_status_packet_not_s_length);
+ const f_string_static_t f_status_parameter_s = macro_f_string_static_t_initialize(F_status_parameter_s, 0, F_status_parameter_s_length);
+ const f_string_static_t f_status_parameter_not_s = macro_f_string_static_t_initialize(F_status_parameter_not_s, 0, F_status_parameter_not_s_length);
+ const f_string_static_t f_status_parent_s = macro_f_string_static_t_initialize(F_status_parent_s, 0, F_status_parent_s_length);
+ const f_string_static_t f_status_parent_not_s = macro_f_string_static_t_initialize(F_status_parent_not_s, 0, F_status_parent_not_s_length);
+ const f_string_static_t f_status_payload_s = macro_f_string_static_t_initialize(F_status_payload_s, 0, F_status_payload_s_length);
+ const f_string_static_t f_status_payload_not_s = macro_f_string_static_t_initialize(F_status_payload_not_s, 0, F_status_payload_not_s_length);
+ const f_string_static_t f_status_pipe_s = macro_f_string_static_t_initialize(F_status_pipe_s, 0, F_status_pipe_s_length);
+ const f_string_static_t f_status_pipe_not_s = macro_f_string_static_t_initialize(F_status_pipe_not_s, 0, F_status_pipe_not_s_length);
+ const f_string_static_t f_status_port_s = macro_f_string_static_t_initialize(F_status_port_s, 0, F_status_port_s_length);
+ const f_string_static_t f_status_port_not_s = macro_f_string_static_t_initialize(F_status_port_not_s, 0, F_status_port_not_s_length);
+ const f_string_static_t f_status_previous_s = macro_f_string_static_t_initialize(F_status_previous_s, 0, F_status_previous_s_length);
+ const f_string_static_t f_status_previous_not_s = macro_f_string_static_t_initialize(F_status_previous_not_s, 0, F_status_previous_not_s_length);
+ const f_string_static_t f_status_processor_s = macro_f_string_static_t_initialize(F_status_processor_s, 0, F_status_processor_s_length);
+ const f_string_static_t f_status_processor_not_s = macro_f_string_static_t_initialize(F_status_processor_not_s, 0, F_status_processor_not_s_length);
+ const f_string_static_t f_status_progress_s = macro_f_string_static_t_initialize(F_status_progress_s, 0, F_status_progress_s_length);
+ const f_string_static_t f_status_progress_not_s = macro_f_string_static_t_initialize(F_status_progress_not_s, 0, F_status_progress_not_s_length);
+ const f_string_static_t f_status_prohibited_s = macro_f_string_static_t_initialize(F_status_prohibited_s, 0, F_status_prohibited_s_length);
+ const f_string_static_t f_status_prohibited_not_s = macro_f_string_static_t_initialize(F_status_prohibited_not_s, 0, F_status_prohibited_not_s_length);
+ const f_string_static_t f_status_property_s = macro_f_string_static_t_initialize(F_status_property_s, 0, F_status_property_s_length);
+ const f_string_static_t f_status_property_not_s = macro_f_string_static_t_initialize(F_status_property_not_s, 0, F_status_property_not_s_length);
+ const f_string_static_t f_status_protocol_s = macro_f_string_static_t_initialize(F_status_protocol_s, 0, F_status_protocol_s_length);
+ const f_string_static_t f_status_protocol_not_s = macro_f_string_static_t_initialize(F_status_protocol_not_s, 0, F_status_protocol_not_s_length);
+ const f_string_static_t f_status_range_s = macro_f_string_static_t_initialize(F_status_range_s, 0, F_status_range_s_length);
+ const f_string_static_t f_status_range_not_s = macro_f_string_static_t_initialize(F_status_range_not_s, 0, F_status_range_not_s_length);
+ const f_string_static_t f_status_read_s = macro_f_string_static_t_initialize(F_status_read_s, 0, F_status_read_s_length);
+ const f_string_static_t f_status_read_not_s = macro_f_string_static_t_initialize(F_status_read_not_s, 0, F_status_read_not_s_length);
+ const f_string_static_t f_status_read_only_s = macro_f_string_static_t_initialize(F_status_read_only_s, 0, F_status_read_only_s_length);
+ const f_string_static_t f_status_ready_s = macro_f_string_static_t_initialize(F_status_ready_s, 0, F_status_ready_s_length);
+ const f_string_static_t f_status_ready_not_s = macro_f_string_static_t_initialize(F_status_ready_not_s, 0, F_status_ready_not_s_length);
+ const f_string_static_t f_status_recover_s = macro_f_string_static_t_initialize(F_status_recover_s, 0, F_status_recover_s_length);
+ const f_string_static_t f_status_recover_not_s = macro_f_string_static_t_initialize(F_status_recover_not_s, 0, F_status_recover_not_s_length);
+ const f_string_static_t f_status_recurse_s = macro_f_string_static_t_initialize(F_status_recurse_s, 0, F_status_recurse_s_length);
+ const f_string_static_t f_status_recurse_not_s = macro_f_string_static_t_initialize(F_status_recurse_not_s, 0, F_status_recurse_not_s_length);
+ const f_string_static_t f_status_relative_s = macro_f_string_static_t_initialize(F_status_relative_s, 0, F_status_relative_s_length);
+ const f_string_static_t f_status_relative_not_s = macro_f_string_static_t_initialize(F_status_relative_not_s, 0, F_status_relative_not_s_length);
+ const f_string_static_t f_status_require_s = macro_f_string_static_t_initialize(F_status_require_s, 0, F_status_require_s_length);
+ const f_string_static_t f_status_require_not_s = macro_f_string_static_t_initialize(F_status_require_not_s, 0, F_status_require_not_s_length);
+ const f_string_static_t f_status_resource_s = macro_f_string_static_t_initialize(F_status_resource_s, 0, F_status_resource_s_length);
+ const f_string_static_t f_status_resource_not_s = macro_f_string_static_t_initialize(F_status_resource_not_s, 0, F_status_resource_not_s_length);
+ const f_string_static_t f_status_search_s = macro_f_string_static_t_initialize(F_status_search_s, 0, F_status_search_s_length);
+ const f_string_static_t f_status_search_not_s = macro_f_string_static_t_initialize(F_status_search_not_s, 0, F_status_search_not_s_length);
+ const f_string_static_t f_status_schedule_s = macro_f_string_static_t_initialize(F_status_schedule_s, 0, F_status_schedule_s_length);
+ const f_string_static_t f_status_schedule_not_s = macro_f_string_static_t_initialize(F_status_schedule_not_s, 0, F_status_schedule_not_s_length);
+ const f_string_static_t f_status_size_s = macro_f_string_static_t_initialize(F_status_size_s, 0, F_status_size_s_length);
+ const f_string_static_t f_status_size_not_s = macro_f_string_static_t_initialize(F_status_size_not_s, 0, F_status_size_not_s_length);
+ const f_string_static_t f_status_signal_s = macro_f_string_static_t_initialize(F_status_signal_s, 0, F_status_signal_s_length);
+ const f_string_static_t f_status_signal_not_s = macro_f_string_static_t_initialize(F_status_signal_not_s, 0, F_status_signal_not_s_length);
+ const f_string_static_t f_status_space_s = macro_f_string_static_t_initialize(F_status_space_s, 0, F_status_space_s_length);
+ const f_string_static_t f_status_space_not_s = macro_f_string_static_t_initialize(F_status_space_not_s, 0, F_status_space_not_s_length);
+ const f_string_static_t f_status_start_s = macro_f_string_static_t_initialize(F_status_start_s, 0, F_status_start_s_length);
+ const f_string_static_t f_status_start_not_s = macro_f_string_static_t_initialize(F_status_start_not_s, 0, F_status_start_not_s_length);
+ const f_string_static_t f_status_stop_s = macro_f_string_static_t_initialize(F_status_stop_s, 0, F_status_stop_s_length);
+ const f_string_static_t f_status_stop_not_s = macro_f_string_static_t_initialize(F_status_stop_not_s, 0, F_status_stop_not_s_length);
+ const f_string_static_t f_status_stream_s = macro_f_string_static_t_initialize(F_status_stream_s, 0, F_status_stream_s_length);
+ const f_string_static_t f_status_stream_not_s = macro_f_string_static_t_initialize(F_status_stream_not_s, 0, F_status_stream_not_s_length);
+ const f_string_static_t f_status_string_s = macro_f_string_static_t_initialize(F_status_string_s, 0, F_status_string_s_length);
+ const f_string_static_t f_status_string_not_s = macro_f_string_static_t_initialize(F_status_string_not_s, 0, F_status_string_not_s_length);
+ const f_string_static_t f_status_string_too_large_s = macro_f_string_static_t_initialize(F_status_string_too_large_s, 0, F_status_string_too_large_s_length);
+ const f_string_static_t f_status_string_too_small_s = macro_f_string_static_t_initialize(F_status_string_too_small_s, 0, F_status_string_too_small_s_length);
+ const f_string_static_t f_status_syntax_s = macro_f_string_static_t_initialize(F_status_syntax_s, 0, F_status_syntax_s_length);
+ const f_string_static_t f_status_syntax_not_s = macro_f_string_static_t_initialize(F_status_syntax_not_s, 0, F_status_syntax_not_s_length);
+ const f_string_static_t f_status_thread_s = macro_f_string_static_t_initialize(F_status_thread_s, 0, F_status_thread_s_length);
+ const f_string_static_t f_status_thread_not_s = macro_f_string_static_t_initialize(F_status_thread_not_s, 0, F_status_thread_not_s_length);
+ const f_string_static_t f_status_time_s = macro_f_string_static_t_initialize(F_status_time_s, 0, F_status_time_s_length);
+ const f_string_static_t f_status_time_not_s = macro_f_string_static_t_initialize(F_status_time_not_s, 0, F_status_time_not_s_length);
+ const f_string_static_t f_status_time_out_s = macro_f_string_static_t_initialize(F_status_time_out_s, 0, F_status_time_out_s_length);
+ const f_string_static_t f_status_too_large_s = macro_f_string_static_t_initialize(F_status_too_large_s, 0, F_status_too_large_s_length);
+ const f_string_static_t f_status_too_small_s = macro_f_string_static_t_initialize(F_status_too_small_s, 0, F_status_too_small_s_length);
+ const f_string_static_t f_status_type_s = macro_f_string_static_t_initialize(F_status_type_s, 0, F_status_type_s_length);
+ const f_string_static_t f_status_type_not_s = macro_f_string_static_t_initialize(F_status_type_not_s, 0, F_status_type_not_s_length);
+ const f_string_static_t f_status_success_s = macro_f_string_static_t_initialize(F_status_success_s, 0, F_status_success_s_length);
+ const f_string_static_t f_status_success_not_s = macro_f_string_static_t_initialize(F_status_success_not_s, 0, F_status_success_not_s_length);
+ const f_string_static_t f_status_supported_s = macro_f_string_static_t_initialize(F_status_supported_s, 0, F_status_supported_s_length);
+ const f_string_static_t f_status_supported_not_s = macro_f_string_static_t_initialize(F_status_supported_not_s, 0, F_status_supported_not_s_length);
+ const f_string_static_t f_status_user_s = macro_f_string_static_t_initialize(F_status_user_s, 0, F_status_user_s_length);
+ const f_string_static_t f_status_user_not_s = macro_f_string_static_t_initialize(F_status_user_not_s, 0, F_status_user_not_s_length);
+ const f_string_static_t f_status_utf_s = macro_f_string_static_t_initialize(F_status_utf_s, 0, F_status_utf_s_length);
+ const f_string_static_t f_status_utf_fragment_s = macro_f_string_static_t_initialize(F_status_utf_fragment_s, 0, F_status_utf_fragment_s_length);
+ const f_string_static_t f_status_utf_fragment_not_s = macro_f_string_static_t_initialize(F_status_utf_fragment_not_s, 0, F_status_utf_fragment_not_s_length);
+ const f_string_static_t f_status_utf_not_s = macro_f_string_static_t_initialize(F_status_utf_not_s, 0, F_status_utf_not_s_length);
+ const f_string_static_t f_status_valid_s = macro_f_string_static_t_initialize(F_status_valid_s, 0, F_status_valid_s_length);
+ const f_string_static_t f_status_valid_not_s = macro_f_string_static_t_initialize(F_status_valid_not_s, 0, F_status_valid_not_s_length);
+ const f_string_static_t f_status_value_s = macro_f_string_static_t_initialize(F_status_value_s, 0, F_status_value_s_length);
+ const f_string_static_t f_status_value_not_s = macro_f_string_static_t_initialize(F_status_value_not_s, 0, F_status_value_not_s_length);
+ const f_string_static_t f_status_wait_s = macro_f_string_static_t_initialize(F_status_wait_s, 0, F_status_wait_s_length);
+ const f_string_static_t f_status_wait_not_s = macro_f_string_static_t_initialize(F_status_wait_not_s, 0, F_status_wait_not_s_length);
+ const f_string_static_t f_status_warn_s = macro_f_string_static_t_initialize(F_status_warn_s, 0, F_status_warn_s_length);
+ const f_string_static_t f_status_warn_not_s = macro_f_string_static_t_initialize(F_status_warn_not_s, 0, F_status_warn_not_s_length);
+ const f_string_static_t f_status_world_s = macro_f_string_static_t_initialize(F_status_world_s, 0, F_status_world_s_length);
+ const f_string_static_t f_status_world_not_s = macro_f_string_static_t_initialize(F_status_world_not_s, 0, F_status_world_not_s_length);
+ const f_string_static_t f_status_write_s = macro_f_string_static_t_initialize(F_status_write_s, 0, F_status_write_s_length);
+ const f_string_static_t f_status_write_not_s = macro_f_string_static_t_initialize(F_status_write_not_s, 0, F_status_write_not_s_length);
+ const f_string_static_t f_status_write_only_s = macro_f_string_static_t_initialize(F_status_write_only_s, 0, F_status_write_only_s_length);
#endif // _di_F_status_basic_
#ifndef _di_F_status_array_
- const f_string_static_t f_status_array_s = macro_f_string_static_t_initialize2(F_status_array_s, 0, F_status_array_s_length);
- const f_string_static_t f_status_array_not_s = macro_f_string_static_t_initialize2(F_status_array_not_s, 0, F_status_array_not_s_length);
- const f_string_static_t f_status_array_too_large_s = macro_f_string_static_t_initialize2(F_status_array_too_large_s, 0, F_status_array_too_large_s_length);
- const f_string_static_t f_status_array_too_small_s = macro_f_string_static_t_initialize2(F_status_array_too_small_s, 0, F_status_array_too_small_s_length);
+ const f_string_static_t f_status_array_s = macro_f_string_static_t_initialize(F_status_array_s, 0, F_status_array_s_length);
+ const f_string_static_t f_status_array_not_s = macro_f_string_static_t_initialize(F_status_array_not_s, 0, F_status_array_not_s_length);
+ const f_string_static_t f_status_array_too_large_s = macro_f_string_static_t_initialize(F_status_array_too_large_s, 0, F_status_array_too_large_s_length);
+ const f_string_static_t f_status_array_too_small_s = macro_f_string_static_t_initialize(F_status_array_too_small_s, 0, F_status_array_too_small_s_length);
#endif // _di_F_status_array_
#ifndef _di_F_status_available_
- const f_string_static_t f_status_available_s = macro_f_string_static_t_initialize2(F_status_available_s, 0, F_status_available_s_length);
- const f_string_static_t f_status_available_not_s = macro_f_string_static_t_initialize2(F_status_available_not_s, 0, F_status_available_not_s_length);
- const f_string_static_t f_status_available_not_address_s = macro_f_string_static_t_initialize2(F_status_available_not_address_s, 0, F_status_available_not_address_s_length);
- const f_string_static_t f_status_available_not_buffer_s = macro_f_string_static_t_initialize2(F_status_available_not_buffer_s, 0, F_status_available_not_buffer_s_length);
- const f_string_static_t f_status_available_not_device_s = macro_f_string_static_t_initialize2(F_status_available_not_device_s, 0, F_status_available_not_device_s_length);
- const f_string_static_t f_status_available_not_pipe_s = macro_f_string_static_t_initialize2(F_status_available_not_pipe_s, 0, F_status_available_not_pipe_s_length);
- const f_string_static_t f_status_available_not_port_s = macro_f_string_static_t_initialize2(F_status_available_not_port_s, 0, F_status_available_not_port_s_length);
- const f_string_static_t f_status_available_not_process_s = macro_f_string_static_t_initialize2(F_status_available_not_process_s, 0, F_status_available_not_process_s_length);
- const f_string_static_t f_status_available_not_socket_s = macro_f_string_static_t_initialize2(F_status_available_not_socket_s, 0, F_status_available_not_socket_s_length);
+ const f_string_static_t f_status_available_s = macro_f_string_static_t_initialize(F_status_available_s, 0, F_status_available_s_length);
+ const f_string_static_t f_status_available_not_s = macro_f_string_static_t_initialize(F_status_available_not_s, 0, F_status_available_not_s_length);
+ const f_string_static_t f_status_available_not_address_s = macro_f_string_static_t_initialize(F_status_available_not_address_s, 0, F_status_available_not_address_s_length);
+ const f_string_static_t f_status_available_not_buffer_s = macro_f_string_static_t_initialize(F_status_available_not_buffer_s, 0, F_status_available_not_buffer_s_length);
+ const f_string_static_t f_status_available_not_device_s = macro_f_string_static_t_initialize(F_status_available_not_device_s, 0, F_status_available_not_device_s_length);
+ const f_string_static_t f_status_available_not_pipe_s = macro_f_string_static_t_initialize(F_status_available_not_pipe_s, 0, F_status_available_not_pipe_s_length);
+ const f_string_static_t f_status_available_not_port_s = macro_f_string_static_t_initialize(F_status_available_not_port_s, 0, F_status_available_not_port_s_length);
+ const f_string_static_t f_status_available_not_process_s = macro_f_string_static_t_initialize(F_status_available_not_process_s, 0, F_status_available_not_process_s_length);
+ const f_string_static_t f_status_available_not_socket_s = macro_f_string_static_t_initialize(F_status_available_not_socket_s, 0, F_status_available_not_socket_s_length);
#endif // _di_F_status_available_
#ifndef _di_F_status_busy_
- const f_string_static_t f_status_busy_s = macro_f_string_static_t_initialize2(F_status_busy_s, 0, F_status_busy_s_length);
- const f_string_static_t f_status_busy_address_s = macro_f_string_static_t_initialize2(F_status_busy_address_s, 0, F_status_busy_address_s_length);
- const f_string_static_t f_status_busy_buffer_s = macro_f_string_static_t_initialize2(F_status_busy_buffer_s, 0, F_status_busy_buffer_s_length);
- const f_string_static_t f_status_busy_device_s = macro_f_string_static_t_initialize2(F_status_busy_device_s, 0, F_status_busy_device_s_length);
- const f_string_static_t f_status_busy_not_s = macro_f_string_static_t_initialize2(F_status_busy_not_s, 0, F_status_busy_not_s_length);
- const f_string_static_t f_status_busy_pipe_s = macro_f_string_static_t_initialize2(F_status_busy_pipe_s, 0, F_status_busy_pipe_s_length);
- const f_string_static_t f_status_busy_port_s = macro_f_string_static_t_initialize2(F_status_busy_port_s, 0, F_status_busy_port_s_length);
- const f_string_static_t f_status_busy_process_s = macro_f_string_static_t_initialize2(F_status_busy_process_s, 0, F_status_busy_process_s_length);
- const f_string_static_t f_status_busy_socket_s = macro_f_string_static_t_initialize2(F_status_busy_socket_s, 0, F_status_busy_socket_s_length);
+ const f_string_static_t f_status_busy_s = macro_f_string_static_t_initialize(F_status_busy_s, 0, F_status_busy_s_length);
+ const f_string_static_t f_status_busy_address_s = macro_f_string_static_t_initialize(F_status_busy_address_s, 0, F_status_busy_address_s_length);
+ const f_string_static_t f_status_busy_buffer_s = macro_f_string_static_t_initialize(F_status_busy_buffer_s, 0, F_status_busy_buffer_s_length);
+ const f_string_static_t f_status_busy_device_s = macro_f_string_static_t_initialize(F_status_busy_device_s, 0, F_status_busy_device_s_length);
+ const f_string_static_t f_status_busy_not_s = macro_f_string_static_t_initialize(F_status_busy_not_s, 0, F_status_busy_not_s_length);
+ const f_string_static_t f_status_busy_pipe_s = macro_f_string_static_t_initialize(F_status_busy_pipe_s, 0, F_status_busy_pipe_s_length);
+ const f_string_static_t f_status_busy_port_s = macro_f_string_static_t_initialize(F_status_busy_port_s, 0, F_status_busy_port_s_length);
+ const f_string_static_t f_status_busy_process_s = macro_f_string_static_t_initialize(F_status_busy_process_s, 0, F_status_busy_process_s_length);
+ const f_string_static_t f_status_busy_socket_s = macro_f_string_static_t_initialize(F_status_busy_socket_s, 0, F_status_busy_socket_s_length);
#endif // _di_F_status_busy_
#ifndef _di_F_status_network_
- const f_string_static_t f_status_network_s = macro_f_string_static_t_initialize2(F_status_network_s, 0, F_status_network_s_length);
- const f_string_static_t f_status_network_busy_s = macro_f_string_static_t_initialize2(F_status_network_busy_s, 0, F_status_network_busy_s_length);
- const f_string_static_t f_status_network_busy_not_s = macro_f_string_static_t_initialize2(F_status_network_busy_not_s, 0, F_status_network_busy_not_s_length);
- const f_string_static_t f_status_network_client_s = macro_f_string_static_t_initialize2(F_status_network_client_s, 0, F_status_network_client_s_length);
- const f_string_static_t f_status_network_client_not_s = macro_f_string_static_t_initialize2(F_status_network_client_not_s, 0, F_status_network_client_not_s_length);
- const f_string_static_t f_status_network_device_s = macro_f_string_static_t_initialize2(F_status_network_device_s, 0, F_status_network_device_s_length);
- const f_string_static_t f_status_network_device_not_s = macro_f_string_static_t_initialize2(F_status_network_device_not_s, 0, F_status_network_device_not_s_length);
- const f_string_static_t f_status_network_found_s = macro_f_string_static_t_initialize2(F_status_network_found_s, 0, F_status_network_found_s_length);
- const f_string_static_t f_status_network_found_not_s = macro_f_string_static_t_initialize2(F_status_network_found_not_s, 0, F_status_network_found_not_s_length);
- const f_string_static_t f_status_network_lost_s = macro_f_string_static_t_initialize2(F_status_network_lost_s, 0, F_status_network_lost_s_length);
- const f_string_static_t f_status_network_lost_not_s = macro_f_string_static_t_initialize2(F_status_network_lost_not_s, 0, F_status_network_lost_not_s_length);
- const f_string_static_t f_status_network_not_s = macro_f_string_static_t_initialize2(F_status_network_not_s, 0, F_status_network_not_s_length);
- const f_string_static_t f_status_network_reach_s = macro_f_string_static_t_initialize2(F_status_network_reach_s, 0, F_status_network_reach_s_length);
- const f_string_static_t f_status_network_reach_client_s = macro_f_string_static_t_initialize2(F_status_network_reach_client_s, 0, F_status_network_reach_client_s_length);
- const f_string_static_t f_status_network_reach_client_not_s = macro_f_string_static_t_initialize2(F_status_network_reach_client_not_s, 0, F_status_network_reach_client_not_s_length);
- const f_string_static_t f_status_network_reach_not_s = macro_f_string_static_t_initialize2(F_status_network_reach_not_s, 0, F_status_network_reach_not_s_length);
- const f_string_static_t f_status_network_reach_server_s = macro_f_string_static_t_initialize2(F_status_network_reach_server_s, 0, F_status_network_reach_server_s_length);
- const f_string_static_t f_status_network_reach_server_not_s = macro_f_string_static_t_initialize2(F_status_network_reach_server_not_s, 0, F_status_network_reach_server_not_s_length);
- const f_string_static_t f_status_network_server_s = macro_f_string_static_t_initialize2(F_status_network_server_s, 0, F_status_network_server_s_length);
- const f_string_static_t f_status_network_server_not_s = macro_f_string_static_t_initialize2(F_status_network_server_not_s, 0, F_status_network_server_not_s_length);
- const f_string_static_t f_status_network_time_s = macro_f_string_static_t_initialize2(F_status_network_time_s, 0, F_status_network_time_s_length);
- const f_string_static_t f_status_network_time_not_s = macro_f_string_static_t_initialize2(F_status_network_time_not_s, 0, F_status_network_time_not_s_length);
+ const f_string_static_t f_status_network_s = macro_f_string_static_t_initialize(F_status_network_s, 0, F_status_network_s_length);
+ const f_string_static_t f_status_network_busy_s = macro_f_string_static_t_initialize(F_status_network_busy_s, 0, F_status_network_busy_s_length);
+ const f_string_static_t f_status_network_busy_not_s = macro_f_string_static_t_initialize(F_status_network_busy_not_s, 0, F_status_network_busy_not_s_length);
+ const f_string_static_t f_status_network_client_s = macro_f_string_static_t_initialize(F_status_network_client_s, 0, F_status_network_client_s_length);
+ const f_string_static_t f_status_network_client_not_s = macro_f_string_static_t_initialize(F_status_network_client_not_s, 0, F_status_network_client_not_s_length);
+ const f_string_static_t f_status_network_device_s = macro_f_string_static_t_initialize(F_status_network_device_s, 0, F_status_network_device_s_length);
+ const f_string_static_t f_status_network_device_not_s = macro_f_string_static_t_initialize(F_status_network_device_not_s, 0, F_status_network_device_not_s_length);
+ const f_string_static_t f_status_network_found_s = macro_f_string_static_t_initialize(F_status_network_found_s, 0, F_status_network_found_s_length);
+ const f_string_static_t f_status_network_found_not_s = macro_f_string_static_t_initialize(F_status_network_found_not_s, 0, F_status_network_found_not_s_length);
+ const f_string_static_t f_status_network_lost_s = macro_f_string_static_t_initialize(F_status_network_lost_s, 0, F_status_network_lost_s_length);
+ const f_string_static_t f_status_network_lost_not_s = macro_f_string_static_t_initialize(F_status_network_lost_not_s, 0, F_status_network_lost_not_s_length);
+ const f_string_static_t f_status_network_not_s = macro_f_string_static_t_initialize(F_status_network_not_s, 0, F_status_network_not_s_length);
+ const f_string_static_t f_status_network_reach_s = macro_f_string_static_t_initialize(F_status_network_reach_s, 0, F_status_network_reach_s_length);
+ const f_string_static_t f_status_network_reach_client_s = macro_f_string_static_t_initialize(F_status_network_reach_client_s, 0, F_status_network_reach_client_s_length);
+ const f_string_static_t f_status_network_reach_client_not_s = macro_f_string_static_t_initialize(F_status_network_reach_client_not_s, 0, F_status_network_reach_client_not_s_length);
+ const f_string_static_t f_status_network_reach_not_s = macro_f_string_static_t_initialize(F_status_network_reach_not_s, 0, F_status_network_reach_not_s_length);
+ const f_string_static_t f_status_network_reach_server_s = macro_f_string_static_t_initialize(F_status_network_reach_server_s, 0, F_status_network_reach_server_s_length);
+ const f_string_static_t f_status_network_reach_server_not_s = macro_f_string_static_t_initialize(F_status_network_reach_server_not_s, 0, F_status_network_reach_server_not_s_length);
+ const f_string_static_t f_status_network_server_s = macro_f_string_static_t_initialize(F_status_network_server_s, 0, F_status_network_server_s_length);
+ const f_string_static_t f_status_network_server_not_s = macro_f_string_static_t_initialize(F_status_network_server_not_s, 0, F_status_network_server_not_s_length);
+ const f_string_static_t f_status_network_time_s = macro_f_string_static_t_initialize(F_status_network_time_s, 0, F_status_network_time_s_length);
+ const f_string_static_t f_status_network_time_not_s = macro_f_string_static_t_initialize(F_status_network_time_not_s, 0, F_status_network_time_not_s_length);
#endif // _di_F_status_network_
#ifndef _di_F_status_number_
- const f_string_static_t f_status_number_s = macro_f_string_static_t_initialize2(F_status_number_s, 0, F_status_number_s_length);
- const f_string_static_t f_status_number_decimal_s = macro_f_string_static_t_initialize2(F_status_number_decimal_s, 0, F_status_number_decimal_s_length);
- const f_string_static_t f_status_number_decimal_not_s = macro_f_string_static_t_initialize2(F_status_number_decimal_not_s, 0, F_status_number_decimal_not_s_length);
- const f_string_static_t f_status_number_divide_by_zero_s = macro_f_string_static_t_initialize2(F_status_number_divide_by_zero_s, 0, F_status_number_divide_by_zero_s_length);
- const f_string_static_t f_status_number_negative_s = macro_f_string_static_t_initialize2(F_status_number_negative_s, 0, F_status_number_negative_s_length);
- const f_string_static_t f_status_number_negative_not_s = macro_f_string_static_t_initialize2(F_status_number_negative_not_s, 0, F_status_number_negative_not_s_length);
- const f_string_static_t f_status_number_not_s = macro_f_string_static_t_initialize2(F_status_number_not_s, 0, F_status_number_not_s_length);
- const f_string_static_t f_status_number_overflow_s = macro_f_string_static_t_initialize2(F_status_number_overflow_s, 0, F_status_number_overflow_s_length);
- const f_string_static_t f_status_number_positive_s = macro_f_string_static_t_initialize2(F_status_number_positive_s, 0, F_status_number_positive_s_length);
- const f_string_static_t f_status_number_positive_not_s = macro_f_string_static_t_initialize2(F_status_number_positive_not_s, 0, F_status_number_positive_not_s_length);
- const f_string_static_t f_status_number_too_large_s = macro_f_string_static_t_initialize2(F_status_number_too_large_s, 0, F_status_number_too_large_s_length);
- const f_string_static_t f_status_number_too_small_s = macro_f_string_static_t_initialize2(F_status_number_too_small_s, 0, F_status_number_too_small_s_length);
- const f_string_static_t f_status_number_underflow_s = macro_f_string_static_t_initialize2(F_status_number_underflow_s, 0, F_status_number_underflow_s_length);
- const f_string_static_t f_status_number_whole_s = macro_f_string_static_t_initialize2(F_status_number_whole_s, 0, F_status_number_whole_s_length);
- const f_string_static_t f_status_number_whole_not_s = macro_f_string_static_t_initialize2(F_status_number_whole_not_s, 0, F_status_number_whole_not_s_length);
- const f_string_static_t f_status_number_zero_s = macro_f_string_static_t_initialize2(F_status_number_zero_s, 0, F_status_number_zero_s_length);
- const f_string_static_t f_status_number_zero_not_s = macro_f_string_static_t_initialize2(F_status_number_zero_not_s, 0, F_status_number_zero_not_s_length);
+ const f_string_static_t f_status_number_s = macro_f_string_static_t_initialize(F_status_number_s, 0, F_status_number_s_length);
+ const f_string_static_t f_status_number_decimal_s = macro_f_string_static_t_initialize(F_status_number_decimal_s, 0, F_status_number_decimal_s_length);
+ const f_string_static_t f_status_number_decimal_not_s = macro_f_string_static_t_initialize(F_status_number_decimal_not_s, 0, F_status_number_decimal_not_s_length);
+ const f_string_static_t f_status_number_divide_by_zero_s = macro_f_string_static_t_initialize(F_status_number_divide_by_zero_s, 0, F_status_number_divide_by_zero_s_length);
+ const f_string_static_t f_status_number_negative_s = macro_f_string_static_t_initialize(F_status_number_negative_s, 0, F_status_number_negative_s_length);
+ const f_string_static_t f_status_number_negative_not_s = macro_f_string_static_t_initialize(F_status_number_negative_not_s, 0, F_status_number_negative_not_s_length);
+ const f_string_static_t f_status_number_not_s = macro_f_string_static_t_initialize(F_status_number_not_s, 0, F_status_number_not_s_length);
+ const f_string_static_t f_status_number_overflow_s = macro_f_string_static_t_initialize(F_status_number_overflow_s, 0, F_status_number_overflow_s_length);
+ const f_string_static_t f_status_number_positive_s = macro_f_string_static_t_initialize(F_status_number_positive_s, 0, F_status_number_positive_s_length);
+ const f_string_static_t f_status_number_positive_not_s = macro_f_string_static_t_initialize(F_status_number_positive_not_s, 0, F_status_number_positive_not_s_length);
+ const f_string_static_t f_status_number_too_large_s = macro_f_string_static_t_initialize(F_status_number_too_large_s, 0, F_status_number_too_large_s_length);
+ const f_string_static_t f_status_number_too_small_s = macro_f_string_static_t_initialize(F_status_number_too_small_s, 0, F_status_number_too_small_s_length);
+ const f_string_static_t f_status_number_underflow_s = macro_f_string_static_t_initialize(F_status_number_underflow_s, 0, F_status_number_underflow_s_length);
+ const f_string_static_t f_status_number_whole_s = macro_f_string_static_t_initialize(F_status_number_whole_s, 0, F_status_number_whole_s_length);
+ const f_string_static_t f_status_number_whole_not_s = macro_f_string_static_t_initialize(F_status_number_whole_not_s, 0, F_status_number_whole_not_s_length);
+ const f_string_static_t f_status_number_zero_s = macro_f_string_static_t_initialize(F_status_number_zero_s, 0, F_status_number_zero_s_length);
+ const f_string_static_t f_status_number_zero_not_s = macro_f_string_static_t_initialize(F_status_number_zero_not_s, 0, F_status_number_zero_not_s_length);
#endif // _di_F_status_number_
#ifndef _di_F_status_buffer_
- const f_string_static_t f_status_buffer_s = macro_f_string_static_t_initialize2(F_status_buffer_s, 0, F_status_buffer_s_length);
- const f_string_static_t f_status_buffer_not_s = macro_f_string_static_t_initialize2(F_status_buffer_not_s, 0, F_status_buffer_not_s_length);
- const f_string_static_t f_status_buffer_too_large_s = macro_f_string_static_t_initialize2(F_status_buffer_too_large_s, 0, F_status_buffer_too_large_s_length);
- const f_string_static_t f_status_buffer_too_small_s = macro_f_string_static_t_initialize2(F_status_buffer_too_small_s, 0, F_status_buffer_too_small_s_length);
- const f_string_static_t f_status_complete_not_utf_s = macro_f_string_static_t_initialize2(F_status_complete_not_utf_s, 0, F_status_complete_not_utf_s_length);
- const f_string_static_t f_status_complete_not_utf_block_s = macro_f_string_static_t_initialize2(F_status_complete_not_utf_block_s, 0, F_status_complete_not_utf_block_s_length);
- const f_string_static_t f_status_complete_not_utf_eoa_s = macro_f_string_static_t_initialize2(F_status_complete_not_utf_eoa_s, 0, F_status_complete_not_utf_eoa_s_length);
- const f_string_static_t f_status_complete_not_utf_eof_s = macro_f_string_static_t_initialize2(F_status_complete_not_utf_eof_s, 0, F_status_complete_not_utf_eof_s_length);
- const f_string_static_t f_status_complete_not_utf_eol_s = macro_f_string_static_t_initialize2(F_status_complete_not_utf_eol_s, 0, F_status_complete_not_utf_eol_s_length);
- const f_string_static_t f_status_complete_not_utf_eos_s = macro_f_string_static_t_initialize2(F_status_complete_not_utf_eos_s, 0, F_status_complete_not_utf_eos_s_length);
- const f_string_static_t f_status_complete_not_utf_stop_s = macro_f_string_static_t_initialize2(F_status_complete_not_utf_stop_s, 0, F_status_complete_not_utf_stop_s_length);
- const f_string_static_t f_status_none_block_s = macro_f_string_static_t_initialize2(F_status_none_block_s, 0, F_status_none_block_s_length);
- const f_string_static_t f_status_none_eoa_s = macro_f_string_static_t_initialize2(F_status_none_eoa_s, 0, F_status_none_eoa_s_length);
- const f_string_static_t f_status_none_eof_s = macro_f_string_static_t_initialize2(F_status_none_eof_s, 0, F_status_none_eof_s_length);
- const f_string_static_t f_status_none_eol_s = macro_f_string_static_t_initialize2(F_status_none_eol_s, 0, F_status_none_eol_s_length);
- const f_string_static_t f_status_none_eos_s = macro_f_string_static_t_initialize2(F_status_none_eos_s, 0, F_status_none_eos_s_length);
- const f_string_static_t f_status_none_not_s = macro_f_string_static_t_initialize2(F_status_none_not_s, 0, F_status_none_not_s_length);
- const f_string_static_t f_status_none_stop_s = macro_f_string_static_t_initialize2(F_status_none_stop_s, 0, F_status_none_stop_s_length);
- const f_string_static_t f_status_data_s = macro_f_string_static_t_initialize2(F_status_data_s, 0, F_status_data_s_length);
- const f_string_static_t f_status_data_not_s = macro_f_string_static_t_initialize2(F_status_data_not_s, 0, F_status_data_not_s_length);
- const f_string_static_t f_status_data_not_block_s = macro_f_string_static_t_initialize2(F_status_data_not_block_s, 0, F_status_data_not_block_s_length);
- const f_string_static_t f_status_data_not_eoa_s = macro_f_string_static_t_initialize2(F_status_data_not_eoa_s, 0, F_status_data_not_eoa_s_length);
- const f_string_static_t f_status_data_not_eof_s = macro_f_string_static_t_initialize2(F_status_data_not_eof_s, 0, F_status_data_not_eof_s_length);
- const f_string_static_t f_status_data_not_eol_s = macro_f_string_static_t_initialize2(F_status_data_not_eol_s, 0, F_status_data_not_eol_s_length);
- const f_string_static_t f_status_data_not_eos_s = macro_f_string_static_t_initialize2(F_status_data_not_eos_s, 0, F_status_data_not_eos_s_length);
- const f_string_static_t f_status_data_not_stop_s = macro_f_string_static_t_initialize2(F_status_data_not_stop_s, 0, F_status_data_not_stop_s_length);
- const f_string_static_t f_status_terminated_s = macro_f_string_static_t_initialize2(F_status_terminated_s, 0, F_status_terminated_s_length);
- const f_string_static_t f_status_terminated_not_s = macro_f_string_static_t_initialize2(F_status_terminated_not_s, 0, F_status_terminated_not_s_length);
- const f_string_static_t f_status_terminated_not_block_s = macro_f_string_static_t_initialize2(F_status_terminated_not_block_s, 0, F_status_terminated_not_block_s_length);
- const f_string_static_t f_status_terminated_not_eoa_s = macro_f_string_static_t_initialize2(F_status_terminated_not_eoa_s, 0, F_status_terminated_not_eoa_s_length);
- const f_string_static_t f_status_terminated_not_eof_s = macro_f_string_static_t_initialize2(F_status_terminated_not_eof_s, 0, F_status_terminated_not_eof_s_length);
- const f_string_static_t f_status_terminated_not_eol_s = macro_f_string_static_t_initialize2(F_status_terminated_not_eol_s, 0, F_status_terminated_not_eol_s_length);
- const f_string_static_t f_status_terminated_not_eos_s = macro_f_string_static_t_initialize2(F_status_terminated_not_eos_s, 0, F_status_terminated_not_eos_s_length);
- const f_string_static_t f_status_terminated_not_stop_s = macro_f_string_static_t_initialize2(F_status_terminated_not_stop_s, 0, F_status_terminated_not_stop_s_length);
- const f_string_static_t f_status_terminated_not_group_s = macro_f_string_static_t_initialize2(F_status_terminated_not_group_s, 0, F_status_terminated_not_group_s_length);
- const f_string_static_t f_status_terminated_not_group_block_s = macro_f_string_static_t_initialize2(F_status_terminated_not_group_block_s, 0, F_status_terminated_not_group_block_s_length);
- const f_string_static_t f_status_terminated_not_group_eoa_s = macro_f_string_static_t_initialize2(F_status_terminated_not_group_eoa_s, 0, F_status_terminated_not_group_eoa_s_length);
- const f_string_static_t f_status_terminated_not_group_eof_s = macro_f_string_static_t_initialize2(F_status_terminated_not_group_eof_s, 0, F_status_terminated_not_group_eof_s_length);
- const f_string_static_t f_status_terminated_not_group_eol_s = macro_f_string_static_t_initialize2(F_status_terminated_not_group_eol_s, 0, F_status_terminated_not_group_eol_s_length);
- const f_string_static_t f_status_terminated_not_group_eos_s = macro_f_string_static_t_initialize2(F_status_terminated_not_group_eos_s, 0, F_status_terminated_not_group_eos_s_length);
- const f_string_static_t f_status_terminated_not_group_stop_s = macro_f_string_static_t_initialize2(F_status_terminated_not_group_stop_s, 0, F_status_terminated_not_group_stop_s_length);
- const f_string_static_t f_status_terminated_not_nest_s = macro_f_string_static_t_initialize2(F_status_terminated_not_nest_s, 0, F_status_terminated_not_nest_s_length);
- const f_string_static_t f_status_terminated_not_nest_block_s = macro_f_string_static_t_initialize2(F_status_terminated_not_nest_block_s, 0, F_status_terminated_not_nest_block_s_length);
- const f_string_static_t f_status_terminated_not_nest_eoa_s = macro_f_string_static_t_initialize2(F_status_terminated_not_nest_eoa_s, 0, F_status_terminated_not_nest_eoa_s_length);
- const f_string_static_t f_status_terminated_not_nest_eof_s = macro_f_string_static_t_initialize2(F_status_terminated_not_nest_eof_s, 0, F_status_terminated_not_nest_eof_s_length);
- const f_string_static_t f_status_terminated_not_nest_eol_s = macro_f_string_static_t_initialize2(F_status_terminated_not_nest_eol_s, 0, F_status_terminated_not_nest_eol_s_length);
- const f_string_static_t f_status_terminated_not_nest_eos_s = macro_f_string_static_t_initialize2(F_status_terminated_not_nest_eos_s, 0, F_status_terminated_not_nest_eos_s_length);
- const f_string_static_t f_status_terminated_not_nest_stop_s = macro_f_string_static_t_initialize2(F_status_terminated_not_nest_stop_s, 0, F_status_terminated_not_nest_stop_s_length);
+ const f_string_static_t f_status_buffer_s = macro_f_string_static_t_initialize(F_status_buffer_s, 0, F_status_buffer_s_length);
+ const f_string_static_t f_status_buffer_not_s = macro_f_string_static_t_initialize(F_status_buffer_not_s, 0, F_status_buffer_not_s_length);
+ const f_string_static_t f_status_buffer_too_large_s = macro_f_string_static_t_initialize(F_status_buffer_too_large_s, 0, F_status_buffer_too_large_s_length);
+ const f_string_static_t f_status_buffer_too_small_s = macro_f_string_static_t_initialize(F_status_buffer_too_small_s, 0, F_status_buffer_too_small_s_length);
+ const f_string_static_t f_status_complete_not_utf_s = macro_f_string_static_t_initialize(F_status_complete_not_utf_s, 0, F_status_complete_not_utf_s_length);
+ const f_string_static_t f_status_complete_not_utf_block_s = macro_f_string_static_t_initialize(F_status_complete_not_utf_block_s, 0, F_status_complete_not_utf_block_s_length);
+ const f_string_static_t f_status_complete_not_utf_eoa_s = macro_f_string_static_t_initialize(F_status_complete_not_utf_eoa_s, 0, F_status_complete_not_utf_eoa_s_length);
+ const f_string_static_t f_status_complete_not_utf_eof_s = macro_f_string_static_t_initialize(F_status_complete_not_utf_eof_s, 0, F_status_complete_not_utf_eof_s_length);
+ const f_string_static_t f_status_complete_not_utf_eol_s = macro_f_string_static_t_initialize(F_status_complete_not_utf_eol_s, 0, F_status_complete_not_utf_eol_s_length);
+ const f_string_static_t f_status_complete_not_utf_eos_s = macro_f_string_static_t_initialize(F_status_complete_not_utf_eos_s, 0, F_status_complete_not_utf_eos_s_length);
+ const f_string_static_t f_status_complete_not_utf_stop_s = macro_f_string_static_t_initialize(F_status_complete_not_utf_stop_s, 0, F_status_complete_not_utf_stop_s_length);
+ const f_string_static_t f_status_none_block_s = macro_f_string_static_t_initialize(F_status_none_block_s, 0, F_status_none_block_s_length);
+ const f_string_static_t f_status_none_eoa_s = macro_f_string_static_t_initialize(F_status_none_eoa_s, 0, F_status_none_eoa_s_length);
+ const f_string_static_t f_status_none_eof_s = macro_f_string_static_t_initialize(F_status_none_eof_s, 0, F_status_none_eof_s_length);
+ const f_string_static_t f_status_none_eol_s = macro_f_string_static_t_initialize(F_status_none_eol_s, 0, F_status_none_eol_s_length);
+ const f_string_static_t f_status_none_eos_s = macro_f_string_static_t_initialize(F_status_none_eos_s, 0, F_status_none_eos_s_length);
+ const f_string_static_t f_status_none_not_s = macro_f_string_static_t_initialize(F_status_none_not_s, 0, F_status_none_not_s_length);
+ const f_string_static_t f_status_none_stop_s = macro_f_string_static_t_initialize(F_status_none_stop_s, 0, F_status_none_stop_s_length);
+ const f_string_static_t f_status_data_s = macro_f_string_static_t_initialize(F_status_data_s, 0, F_status_data_s_length);
+ const f_string_static_t f_status_data_not_s = macro_f_string_static_t_initialize(F_status_data_not_s, 0, F_status_data_not_s_length);
+ const f_string_static_t f_status_data_not_block_s = macro_f_string_static_t_initialize(F_status_data_not_block_s, 0, F_status_data_not_block_s_length);
+ const f_string_static_t f_status_data_not_eoa_s = macro_f_string_static_t_initialize(F_status_data_not_eoa_s, 0, F_status_data_not_eoa_s_length);
+ const f_string_static_t f_status_data_not_eof_s = macro_f_string_static_t_initialize(F_status_data_not_eof_s, 0, F_status_data_not_eof_s_length);
+ const f_string_static_t f_status_data_not_eol_s = macro_f_string_static_t_initialize(F_status_data_not_eol_s, 0, F_status_data_not_eol_s_length);
+ const f_string_static_t f_status_data_not_eos_s = macro_f_string_static_t_initialize(F_status_data_not_eos_s, 0, F_status_data_not_eos_s_length);
+ const f_string_static_t f_status_data_not_stop_s = macro_f_string_static_t_initialize(F_status_data_not_stop_s, 0, F_status_data_not_stop_s_length);
+ const f_string_static_t f_status_terminated_s = macro_f_string_static_t_initialize(F_status_terminated_s, 0, F_status_terminated_s_length);
+ const f_string_static_t f_status_terminated_not_s = macro_f_string_static_t_initialize(F_status_terminated_not_s, 0, F_status_terminated_not_s_length);
+ const f_string_static_t f_status_terminated_not_block_s = macro_f_string_static_t_initialize(F_status_terminated_not_block_s, 0, F_status_terminated_not_block_s_length);
+ const f_string_static_t f_status_terminated_not_eoa_s = macro_f_string_static_t_initialize(F_status_terminated_not_eoa_s, 0, F_status_terminated_not_eoa_s_length);
+ const f_string_static_t f_status_terminated_not_eof_s = macro_f_string_static_t_initialize(F_status_terminated_not_eof_s, 0, F_status_terminated_not_eof_s_length);
+ const f_string_static_t f_status_terminated_not_eol_s = macro_f_string_static_t_initialize(F_status_terminated_not_eol_s, 0, F_status_terminated_not_eol_s_length);
+ const f_string_static_t f_status_terminated_not_eos_s = macro_f_string_static_t_initialize(F_status_terminated_not_eos_s, 0, F_status_terminated_not_eos_s_length);
+ const f_string_static_t f_status_terminated_not_stop_s = macro_f_string_static_t_initialize(F_status_terminated_not_stop_s, 0, F_status_terminated_not_stop_s_length);
+ const f_string_static_t f_status_terminated_not_group_s = macro_f_string_static_t_initialize(F_status_terminated_not_group_s, 0, F_status_terminated_not_group_s_length);
+ const f_string_static_t f_status_terminated_not_group_block_s = macro_f_string_static_t_initialize(F_status_terminated_not_group_block_s, 0, F_status_terminated_not_group_block_s_length);
+ const f_string_static_t f_status_terminated_not_group_eoa_s = macro_f_string_static_t_initialize(F_status_terminated_not_group_eoa_s, 0, F_status_terminated_not_group_eoa_s_length);
+ const f_string_static_t f_status_terminated_not_group_eof_s = macro_f_string_static_t_initialize(F_status_terminated_not_group_eof_s, 0, F_status_terminated_not_group_eof_s_length);
+ const f_string_static_t f_status_terminated_not_group_eol_s = macro_f_string_static_t_initialize(F_status_terminated_not_group_eol_s, 0, F_status_terminated_not_group_eol_s_length);
+ const f_string_static_t f_status_terminated_not_group_eos_s = macro_f_string_static_t_initialize(F_status_terminated_not_group_eos_s, 0, F_status_terminated_not_group_eos_s_length);
+ const f_string_static_t f_status_terminated_not_group_stop_s = macro_f_string_static_t_initialize(F_status_terminated_not_group_stop_s, 0, F_status_terminated_not_group_stop_s_length);
+ const f_string_static_t f_status_terminated_not_nest_s = macro_f_string_static_t_initialize(F_status_terminated_not_nest_s, 0, F_status_terminated_not_nest_s_length);
+ const f_string_static_t f_status_terminated_not_nest_block_s = macro_f_string_static_t_initialize(F_status_terminated_not_nest_block_s, 0, F_status_terminated_not_nest_block_s_length);
+ const f_string_static_t f_status_terminated_not_nest_eoa_s = macro_f_string_static_t_initialize(F_status_terminated_not_nest_eoa_s, 0, F_status_terminated_not_nest_eoa_s_length);
+ const f_string_static_t f_status_terminated_not_nest_eof_s = macro_f_string_static_t_initialize(F_status_terminated_not_nest_eof_s, 0, F_status_terminated_not_nest_eof_s_length);
+ const f_string_static_t f_status_terminated_not_nest_eol_s = macro_f_string_static_t_initialize(F_status_terminated_not_nest_eol_s, 0, F_status_terminated_not_nest_eol_s_length);
+ const f_string_static_t f_status_terminated_not_nest_eos_s = macro_f_string_static_t_initialize(F_status_terminated_not_nest_eos_s, 0, F_status_terminated_not_nest_eos_s_length);
+ const f_string_static_t f_status_terminated_not_nest_stop_s = macro_f_string_static_t_initialize(F_status_terminated_not_nest_stop_s, 0, F_status_terminated_not_nest_stop_s_length);
#endif // _di_F_status_buffer_
#ifndef _di_F_status_process_
- const f_string_static_t f_status_process_s = macro_f_string_static_t_initialize2(F_status_process_s, 0, F_status_process_s_length);
- const f_string_static_t f_status_process_not_s = macro_f_string_static_t_initialize2(F_status_process_not_s, 0, F_status_process_not_s_length);
- const f_string_static_t f_status_process_too_many_s = macro_f_string_static_t_initialize2(F_status_process_too_many_s, 0, F_status_process_too_many_s_length);
+ const f_string_static_t f_status_process_s = macro_f_string_static_t_initialize(F_status_process_s, 0, F_status_process_s_length);
+ const f_string_static_t f_status_process_not_s = macro_f_string_static_t_initialize(F_status_process_not_s, 0, F_status_process_not_s_length);
+ const f_string_static_t f_status_process_too_many_s = macro_f_string_static_t_initialize(F_status_process_too_many_s, 0, F_status_process_too_many_s_length);
#endif // _di_F_status_process_
#ifndef _di_F_status_file_
- const f_string_static_t f_status_file_s = macro_f_string_static_t_initialize2(F_status_file_s, 0, F_status_file_s_length);
- const f_string_static_t f_status_file_close_s = macro_f_string_static_t_initialize2(F_status_file_close_s, 0, F_status_file_close_s_length);
- const f_string_static_t f_status_file_closed_s = macro_f_string_static_t_initialize2(F_status_file_closed_s, 0, F_status_file_closed_s_length);
- const f_string_static_t f_status_file_descriptor_s = macro_f_string_static_t_initialize2(F_status_file_descriptor_s, 0, F_status_file_descriptor_s_length);
- const f_string_static_t f_status_file_descriptor_max_s = macro_f_string_static_t_initialize2(F_status_file_descriptor_max_s, 0, F_status_file_descriptor_max_s_length);
- const f_string_static_t f_status_file_descriptor_not_s = macro_f_string_static_t_initialize2(F_status_file_descriptor_not_s, 0, F_status_file_descriptor_not_s_length);
- const f_string_static_t f_status_file_empty_s = macro_f_string_static_t_initialize2(F_status_file_empty_s, 0, F_status_file_empty_s_length);
- const f_string_static_t f_status_file_flush_s = macro_f_string_static_t_initialize2(F_status_file_flush_s, 0, F_status_file_flush_s_length);
- const f_string_static_t f_status_file_found_s = macro_f_string_static_t_initialize2(F_status_file_found_s, 0, F_status_file_found_s_length);
- const f_string_static_t f_status_file_found_not_s = macro_f_string_static_t_initialize2(F_status_file_found_not_s, 0, F_status_file_found_not_s_length);
- const f_string_static_t f_status_file_not_s = macro_f_string_static_t_initialize2(F_status_file_not_s, 0, F_status_file_not_s_length);
- const f_string_static_t f_status_file_open_s = macro_f_string_static_t_initialize2(F_status_file_open_s, 0, F_status_file_open_s_length);
- const f_string_static_t f_status_file_open_max_s = macro_f_string_static_t_initialize2(F_status_file_open_max_s, 0, F_status_file_open_max_s_length);
- const f_string_static_t f_status_file_opened_s = macro_f_string_static_t_initialize2(F_status_file_opened_s, 0, F_status_file_opened_s_length);
- const f_string_static_t f_status_file_overflow_s = macro_f_string_static_t_initialize2(F_status_file_overflow_s, 0, F_status_file_overflow_s_length);
- const f_string_static_t f_status_file_purge_s = macro_f_string_static_t_initialize2(F_status_file_purge_s, 0, F_status_file_purge_s_length);
- const f_string_static_t f_status_file_read_s = macro_f_string_static_t_initialize2(F_status_file_read_s, 0, F_status_file_read_s_length);
- const f_string_static_t f_status_file_reallocation_s = macro_f_string_static_t_initialize2(F_status_file_reallocation_s, 0, F_status_file_reallocation_s_length);
- const f_string_static_t f_status_file_seek_s = macro_f_string_static_t_initialize2(F_status_file_seek_s, 0, F_status_file_seek_s_length);
- const f_string_static_t f_status_file_stat_s = macro_f_string_static_t_initialize2(F_status_file_stat_s, 0, F_status_file_stat_s_length);
- const f_string_static_t f_status_file_synchronize_s = macro_f_string_static_t_initialize2(F_status_file_synchronize_s, 0, F_status_file_synchronize_s_length);
- const f_string_static_t f_status_file_type_block_s = macro_f_string_static_t_initialize2(F_status_file_type_block_s, 0, F_status_file_type_block_s_length);
- const f_string_static_t f_status_file_type_character_s = macro_f_string_static_t_initialize2(F_status_file_type_character_s, 0, F_status_file_type_character_s_length);
- const f_string_static_t f_status_file_type_directory_s = macro_f_string_static_t_initialize2(F_status_file_type_directory_s, 0, F_status_file_type_directory_s_length);
- const f_string_static_t f_status_file_type_fifo_s = macro_f_string_static_t_initialize2(F_status_file_type_fifo_s, 0, F_status_file_type_fifo_s_length);
- const f_string_static_t f_status_file_type_link_s = macro_f_string_static_t_initialize2(F_status_file_type_link_s, 0, F_status_file_type_link_s_length);
- const f_string_static_t f_status_file_type_not_block_s = macro_f_string_static_t_initialize2(F_status_file_type_not_block_s, 0, F_status_file_type_not_block_s_length);
- const f_string_static_t f_status_file_type_not_character_s = macro_f_string_static_t_initialize2(F_status_file_type_not_character_s, 0, F_status_file_type_not_character_s_length);
- const f_string_static_t f_status_file_type_not_directory_s = macro_f_string_static_t_initialize2(F_status_file_type_not_directory_s, 0, F_status_file_type_not_directory_s_length);
- const f_string_static_t f_status_file_type_not_fifo_s = macro_f_string_static_t_initialize2(F_status_file_type_not_fifo_s, 0, F_status_file_type_not_fifo_s_length);
- const f_string_static_t f_status_file_type_not_link_s = macro_f_string_static_t_initialize2(F_status_file_type_not_link_s, 0, F_status_file_type_not_link_s_length);
- const f_string_static_t f_status_file_type_not_pipe_s = macro_f_string_static_t_initialize2(F_status_file_type_not_pipe_s, 0, F_status_file_type_not_pipe_s_length);
- const f_string_static_t f_status_file_type_not_regular_s = macro_f_string_static_t_initialize2(F_status_file_type_not_regular_s, 0, F_status_file_type_not_regular_s_length);
- const f_string_static_t f_status_file_type_not_socket_s = macro_f_string_static_t_initialize2(F_status_file_type_not_socket_s, 0, F_status_file_type_not_socket_s_length);
- const f_string_static_t f_status_file_type_not_unknown_s = macro_f_string_static_t_initialize2(F_status_file_type_not_unknown_s, 0, F_status_file_type_not_unknown_s_length);
- const f_string_static_t f_status_file_type_pipe_s = macro_f_string_static_t_initialize2(F_status_file_type_pipe_s, 0, F_status_file_type_pipe_s_length);
- const f_string_static_t f_status_file_type_regular_s = macro_f_string_static_t_initialize2(F_status_file_type_regular_s, 0, F_status_file_type_regular_s_length);
- const f_string_static_t f_status_file_type_socket_s = macro_f_string_static_t_initialize2(F_status_file_type_socket_s, 0, F_status_file_type_socket_s_length);
- const f_string_static_t f_status_file_type_unknown_s = macro_f_string_static_t_initialize2(F_status_file_type_unknown_s, 0, F_status_file_type_unknown_s_length);
- const f_string_static_t f_status_file_underflow_s = macro_f_string_static_t_initialize2(F_status_file_underflow_s, 0, F_status_file_underflow_s_length);
- const f_string_static_t f_status_file_utf_s = macro_f_string_static_t_initialize2(F_status_file_utf_s, 0, F_status_file_utf_s_length);
- const f_string_static_t f_status_file_utf_not_s = macro_f_string_static_t_initialize2(F_status_file_utf_not_s, 0, F_status_file_utf_not_s_length);
- const f_string_static_t f_status_file_write_s = macro_f_string_static_t_initialize2(F_status_file_write_s, 0, F_status_file_write_s_length);
+ const f_string_static_t f_status_file_s = macro_f_string_static_t_initialize(F_status_file_s, 0, F_status_file_s_length);
+ const f_string_static_t f_status_file_close_s = macro_f_string_static_t_initialize(F_status_file_close_s, 0, F_status_file_close_s_length);
+ const f_string_static_t f_status_file_closed_s = macro_f_string_static_t_initialize(F_status_file_closed_s, 0, F_status_file_closed_s_length);
+ const f_string_static_t f_status_file_descriptor_s = macro_f_string_static_t_initialize(F_status_file_descriptor_s, 0, F_status_file_descriptor_s_length);
+ const f_string_static_t f_status_file_descriptor_max_s = macro_f_string_static_t_initialize(F_status_file_descriptor_max_s, 0, F_status_file_descriptor_max_s_length);
+ const f_string_static_t f_status_file_descriptor_not_s = macro_f_string_static_t_initialize(F_status_file_descriptor_not_s, 0, F_status_file_descriptor_not_s_length);
+ const f_string_static_t f_status_file_empty_s = macro_f_string_static_t_initialize(F_status_file_empty_s, 0, F_status_file_empty_s_length);
+ const f_string_static_t f_status_file_flush_s = macro_f_string_static_t_initialize(F_status_file_flush_s, 0, F_status_file_flush_s_length);
+ const f_string_static_t f_status_file_found_s = macro_f_string_static_t_initialize(F_status_file_found_s, 0, F_status_file_found_s_length);
+ const f_string_static_t f_status_file_found_not_s = macro_f_string_static_t_initialize(F_status_file_found_not_s, 0, F_status_file_found_not_s_length);
+ const f_string_static_t f_status_file_not_s = macro_f_string_static_t_initialize(F_status_file_not_s, 0, F_status_file_not_s_length);
+ const f_string_static_t f_status_file_open_s = macro_f_string_static_t_initialize(F_status_file_open_s, 0, F_status_file_open_s_length);
+ const f_string_static_t f_status_file_open_max_s = macro_f_string_static_t_initialize(F_status_file_open_max_s, 0, F_status_file_open_max_s_length);
+ const f_string_static_t f_status_file_opened_s = macro_f_string_static_t_initialize(F_status_file_opened_s, 0, F_status_file_opened_s_length);
+ const f_string_static_t f_status_file_overflow_s = macro_f_string_static_t_initialize(F_status_file_overflow_s, 0, F_status_file_overflow_s_length);
+ const f_string_static_t f_status_file_purge_s = macro_f_string_static_t_initialize(F_status_file_purge_s, 0, F_status_file_purge_s_length);
+ const f_string_static_t f_status_file_read_s = macro_f_string_static_t_initialize(F_status_file_read_s, 0, F_status_file_read_s_length);
+ const f_string_static_t f_status_file_reallocation_s = macro_f_string_static_t_initialize(F_status_file_reallocation_s, 0, F_status_file_reallocation_s_length);
+ const f_string_static_t f_status_file_seek_s = macro_f_string_static_t_initialize(F_status_file_seek_s, 0, F_status_file_seek_s_length);
+ const f_string_static_t f_status_file_stat_s = macro_f_string_static_t_initialize(F_status_file_stat_s, 0, F_status_file_stat_s_length);
+ const f_string_static_t f_status_file_synchronize_s = macro_f_string_static_t_initialize(F_status_file_synchronize_s, 0, F_status_file_synchronize_s_length);
+ const f_string_static_t f_status_file_type_block_s = macro_f_string_static_t_initialize(F_status_file_type_block_s, 0, F_status_file_type_block_s_length);
+ const f_string_static_t f_status_file_type_character_s = macro_f_string_static_t_initialize(F_status_file_type_character_s, 0, F_status_file_type_character_s_length);
+ const f_string_static_t f_status_file_type_directory_s = macro_f_string_static_t_initialize(F_status_file_type_directory_s, 0, F_status_file_type_directory_s_length);
+ const f_string_static_t f_status_file_type_fifo_s = macro_f_string_static_t_initialize(F_status_file_type_fifo_s, 0, F_status_file_type_fifo_s_length);
+ const f_string_static_t f_status_file_type_link_s = macro_f_string_static_t_initialize(F_status_file_type_link_s, 0, F_status_file_type_link_s_length);
+ const f_string_static_t f_status_file_type_not_block_s = macro_f_string_static_t_initialize(F_status_file_type_not_block_s, 0, F_status_file_type_not_block_s_length);
+ const f_string_static_t f_status_file_type_not_character_s = macro_f_string_static_t_initialize(F_status_file_type_not_character_s, 0, F_status_file_type_not_character_s_length);
+ const f_string_static_t f_status_file_type_not_directory_s = macro_f_string_static_t_initialize(F_status_file_type_not_directory_s, 0, F_status_file_type_not_directory_s_length);
+ const f_string_static_t f_status_file_type_not_fifo_s = macro_f_string_static_t_initialize(F_status_file_type_not_fifo_s, 0, F_status_file_type_not_fifo_s_length);
+ const f_string_static_t f_status_file_type_not_link_s = macro_f_string_static_t_initialize(F_status_file_type_not_link_s, 0, F_status_file_type_not_link_s_length);
+ const f_string_static_t f_status_file_type_not_pipe_s = macro_f_string_static_t_initialize(F_status_file_type_not_pipe_s, 0, F_status_file_type_not_pipe_s_length);
+ const f_string_static_t f_status_file_type_not_regular_s = macro_f_string_static_t_initialize(F_status_file_type_not_regular_s, 0, F_status_file_type_not_regular_s_length);
+ const f_string_static_t f_status_file_type_not_socket_s = macro_f_string_static_t_initialize(F_status_file_type_not_socket_s, 0, F_status_file_type_not_socket_s_length);
+ const f_string_static_t f_status_file_type_not_unknown_s = macro_f_string_static_t_initialize(F_status_file_type_not_unknown_s, 0, F_status_file_type_not_unknown_s_length);
+ const f_string_static_t f_status_file_type_pipe_s = macro_f_string_static_t_initialize(F_status_file_type_pipe_s, 0, F_status_file_type_pipe_s_length);
+ const f_string_static_t f_status_file_type_regular_s = macro_f_string_static_t_initialize(F_status_file_type_regular_s, 0, F_status_file_type_regular_s_length);
+ const f_string_static_t f_status_file_type_socket_s = macro_f_string_static_t_initialize(F_status_file_type_socket_s, 0, F_status_file_type_socket_s_length);
+ const f_string_static_t f_status_file_type_unknown_s = macro_f_string_static_t_initialize(F_status_file_type_unknown_s, 0, F_status_file_type_unknown_s_length);
+ const f_string_static_t f_status_file_underflow_s = macro_f_string_static_t_initialize(F_status_file_underflow_s, 0, F_status_file_underflow_s_length);
+ const f_string_static_t f_status_file_utf_s = macro_f_string_static_t_initialize(F_status_file_utf_s, 0, F_status_file_utf_s_length);
+ const f_string_static_t f_status_file_utf_not_s = macro_f_string_static_t_initialize(F_status_file_utf_not_s, 0, F_status_file_utf_not_s_length);
+ const f_string_static_t f_status_file_write_s = macro_f_string_static_t_initialize(F_status_file_write_s, 0, F_status_file_write_s_length);
#endif // _di_F_status_file_
#ifndef _di_F_status_filesystem_
- const f_string_static_t f_status_filesystem_s = macro_f_string_static_t_initialize2(F_status_filesystem_s, 0, F_status_filesystem_s_length);
- const f_string_static_t f_status_filesystem_not_s = macro_f_string_static_t_initialize2(F_status_filesystem_not_s, 0, F_status_filesystem_not_s_length);
- const f_string_static_t f_status_filesystem_quota_block_s = macro_f_string_static_t_initialize2(F_status_filesystem_quota_block_s, 0, F_status_filesystem_quota_block_s_length);
- const f_string_static_t f_status_filesystem_quota_reached_s = macro_f_string_static_t_initialize2(F_status_filesystem_quota_reached_s, 0, F_status_filesystem_quota_reached_s_length);
+ const f_string_static_t f_status_filesystem_s = macro_f_string_static_t_initialize(F_status_filesystem_s, 0, F_status_filesystem_s_length);
+ const f_string_static_t f_status_filesystem_not_s = macro_f_string_static_t_initialize(F_status_filesystem_not_s, 0, F_status_filesystem_not_s_length);
+ const f_string_static_t f_status_filesystem_quota_block_s = macro_f_string_static_t_initialize(F_status_filesystem_quota_block_s, 0, F_status_filesystem_quota_block_s_length);
+ const f_string_static_t f_status_filesystem_quota_reached_s = macro_f_string_static_t_initialize(F_status_filesystem_quota_reached_s, 0, F_status_filesystem_quota_reached_s_length);
#endif // _di_F_status_filesystem_
#ifndef _di_F_status_directory_
- const f_string_static_t f_status_directory_s = macro_f_string_static_t_initialize2(F_status_directory_s, 0, F_status_directory_s_length);
- const f_string_static_t f_status_directory_close_s = macro_f_string_static_t_initialize2(F_status_directory_close_s, 0, F_status_directory_close_s_length);
- const f_string_static_t f_status_directory_closed_s = macro_f_string_static_t_initialize2(F_status_directory_closed_s, 0, F_status_directory_closed_s_length);
- const f_string_static_t f_status_directory_descriptor_s = macro_f_string_static_t_initialize2(F_status_directory_descriptor_s, 0, F_status_directory_descriptor_s_length);
- const f_string_static_t f_status_directory_empty_s = macro_f_string_static_t_initialize2(F_status_directory_empty_s, 0, F_status_directory_empty_s_length);
- const f_string_static_t f_status_directory_empty_not_s = macro_f_string_static_t_initialize2(F_status_directory_empty_not_s, 0, F_status_directory_empty_not_s_length);
- const f_string_static_t f_status_directory_found_s = macro_f_string_static_t_initialize2(F_status_directory_found_s, 0, F_status_directory_found_s_length);
- const f_string_static_t f_status_directory_found_not_s = macro_f_string_static_t_initialize2(F_status_directory_found_not_s, 0, F_status_directory_found_not_s_length);
- const f_string_static_t f_status_directory_flush_s = macro_f_string_static_t_initialize2(F_status_directory_flush_s, 0, F_status_directory_flush_s_length);
- const f_string_static_t f_status_directory_link_max_s = macro_f_string_static_t_initialize2(F_status_directory_link_max_s, 0, F_status_directory_link_max_s_length);
- const f_string_static_t f_status_directory_not_s = macro_f_string_static_t_initialize2(F_status_directory_not_s, 0, F_status_directory_not_s_length);
- const f_string_static_t f_status_directory_open_s = macro_f_string_static_t_initialize2(F_status_directory_open_s, 0, F_status_directory_open_s_length);
- const f_string_static_t f_status_directory_purge_s = macro_f_string_static_t_initialize2(F_status_directory_purge_s, 0, F_status_directory_purge_s_length);
- const f_string_static_t f_status_directory_read_s = macro_f_string_static_t_initialize2(F_status_directory_read_s, 0, F_status_directory_read_s_length);
- const f_string_static_t f_status_directory_stream_s = macro_f_string_static_t_initialize2(F_status_directory_stream_s, 0, F_status_directory_stream_s_length);
- const f_string_static_t f_status_directory_supported_not_s = macro_f_string_static_t_initialize2(F_status_directory_supported_not_s, 0, F_status_directory_supported_not_s_length);
- const f_string_static_t f_status_directory_synchronize_s = macro_f_string_static_t_initialize2(F_status_directory_synchronize_s, 0, F_status_directory_synchronize_s_length);
- const f_string_static_t f_status_directory_utf_s = macro_f_string_static_t_initialize2(F_status_directory_utf_s, 0, F_status_directory_utf_s_length);
- const f_string_static_t f_status_directory_utf_not_s = macro_f_string_static_t_initialize2(F_status_directory_utf_not_s, 0, F_status_directory_utf_not_s_length);
- const f_string_static_t f_status_directory_write_s = macro_f_string_static_t_initialize2(F_status_directory_write_s, 0, F_status_directory_write_s_length);
+ const f_string_static_t f_status_directory_s = macro_f_string_static_t_initialize(F_status_directory_s, 0, F_status_directory_s_length);
+ const f_string_static_t f_status_directory_close_s = macro_f_string_static_t_initialize(F_status_directory_close_s, 0, F_status_directory_close_s_length);
+ const f_string_static_t f_status_directory_closed_s = macro_f_string_static_t_initialize(F_status_directory_closed_s, 0, F_status_directory_closed_s_length);
+ const f_string_static_t f_status_directory_descriptor_s = macro_f_string_static_t_initialize(F_status_directory_descriptor_s, 0, F_status_directory_descriptor_s_length);
+ const f_string_static_t f_status_directory_empty_s = macro_f_string_static_t_initialize(F_status_directory_empty_s, 0, F_status_directory_empty_s_length);
+ const f_string_static_t f_status_directory_empty_not_s = macro_f_string_static_t_initialize(F_status_directory_empty_not_s, 0, F_status_directory_empty_not_s_length);
+ const f_string_static_t f_status_directory_found_s = macro_f_string_static_t_initialize(F_status_directory_found_s, 0, F_status_directory_found_s_length);
+ const f_string_static_t f_status_directory_found_not_s = macro_f_string_static_t_initialize(F_status_directory_found_not_s, 0, F_status_directory_found_not_s_length);
+ const f_string_static_t f_status_directory_flush_s = macro_f_string_static_t_initialize(F_status_directory_flush_s, 0, F_status_directory_flush_s_length);
+ const f_string_static_t f_status_directory_link_max_s = macro_f_string_static_t_initialize(F_status_directory_link_max_s, 0, F_status_directory_link_max_s_length);
+ const f_string_static_t f_status_directory_not_s = macro_f_string_static_t_initialize(F_status_directory_not_s, 0, F_status_directory_not_s_length);
+ const f_string_static_t f_status_directory_open_s = macro_f_string_static_t_initialize(F_status_directory_open_s, 0, F_status_directory_open_s_length);
+ const f_string_static_t f_status_directory_purge_s = macro_f_string_static_t_initialize(F_status_directory_purge_s, 0, F_status_directory_purge_s_length);
+ const f_string_static_t f_status_directory_read_s = macro_f_string_static_t_initialize(F_status_directory_read_s, 0, F_status_directory_read_s_length);
+ const f_string_static_t f_status_directory_stream_s = macro_f_string_static_t_initialize(F_status_directory_stream_s, 0, F_status_directory_stream_s_length);
+ const f_string_static_t f_status_directory_supported_not_s = macro_f_string_static_t_initialize(F_status_directory_supported_not_s, 0, F_status_directory_supported_not_s_length);
+ const f_string_static_t f_status_directory_synchronize_s = macro_f_string_static_t_initialize(F_status_directory_synchronize_s, 0, F_status_directory_synchronize_s_length);
+ const f_string_static_t f_status_directory_utf_s = macro_f_string_static_t_initialize(F_status_directory_utf_s, 0, F_status_directory_utf_s_length);
+ const f_string_static_t f_status_directory_utf_not_s = macro_f_string_static_t_initialize(F_status_directory_utf_not_s, 0, F_status_directory_utf_not_s_length);
+ const f_string_static_t f_status_directory_write_s = macro_f_string_static_t_initialize(F_status_directory_write_s, 0, F_status_directory_write_s_length);
#endif // _di_F_status_directory_
#ifndef _di_F_status_socket_
- const f_string_static_t f_status_socket_s = macro_f_string_static_t_initialize2(F_status_socket_s, 0, F_status_socket_s_length);
- const f_string_static_t f_status_socket_client_s = macro_f_string_static_t_initialize2(F_status_socket_client_s, 0, F_status_socket_client_s_length);
- const f_string_static_t f_status_socket_not_s = macro_f_string_static_t_initialize2(F_status_socket_not_s, 0, F_status_socket_not_s_length);
- const f_string_static_t f_status_socket_receive_s = macro_f_string_static_t_initialize2(F_status_socket_receive_s, 0, F_status_socket_receive_s_length);
- const f_string_static_t f_status_socket_send_s = macro_f_string_static_t_initialize2(F_status_socket_send_s, 0, F_status_socket_send_s_length);
- const f_string_static_t f_status_socket_target_s = macro_f_string_static_t_initialize2(F_status_socket_target_s, 0, F_status_socket_target_s_length);
+ const f_string_static_t f_status_socket_s = macro_f_string_static_t_initialize(F_status_socket_s, 0, F_status_socket_s_length);
+ const f_string_static_t f_status_socket_client_s = macro_f_string_static_t_initialize(F_status_socket_client_s, 0, F_status_socket_client_s_length);
+ const f_string_static_t f_status_socket_not_s = macro_f_string_static_t_initialize(F_status_socket_not_s, 0, F_status_socket_not_s_length);
+ const f_string_static_t f_status_socket_receive_s = macro_f_string_static_t_initialize(F_status_socket_receive_s, 0, F_status_socket_receive_s_length);
+ const f_string_static_t f_status_socket_send_s = macro_f_string_static_t_initialize(F_status_socket_send_s, 0, F_status_socket_send_s_length);
+ const f_string_static_t f_status_socket_target_s = macro_f_string_static_t_initialize(F_status_socket_target_s, 0, F_status_socket_target_s_length);
#endif // _di_F_status_socket_
#ifndef _di_F_status_compare_
- const f_string_static_t f_status_equal_to_s = macro_f_string_static_t_initialize2(F_status_equal_to_s, 0, F_status_equal_to_s_length);
- const f_string_static_t f_status_equal_to_not_s = macro_f_string_static_t_initialize2(F_status_equal_to_not_s, 0, F_status_equal_to_not_s_length);
- const f_string_static_t f_status_than_greater_s = macro_f_string_static_t_initialize2(F_status_than_greater_s, 0, F_status_than_greater_s_length);
- const f_string_static_t f_status_than_less_s = macro_f_string_static_t_initialize2(F_status_than_less_s, 0, F_status_than_less_s_length);
+ const f_string_static_t f_status_equal_to_s = macro_f_string_static_t_initialize(F_status_equal_to_s, 0, F_status_equal_to_s_length);
+ const f_string_static_t f_status_equal_to_not_s = macro_f_string_static_t_initialize(F_status_equal_to_not_s, 0, F_status_equal_to_not_s_length);
+ const f_string_static_t f_status_than_greater_s = macro_f_string_static_t_initialize(F_status_than_greater_s, 0, F_status_than_greater_s_length);
+ const f_string_static_t f_status_than_less_s = macro_f_string_static_t_initialize(F_status_than_less_s, 0, F_status_than_less_s_length);
#endif // _di_F_status_compare_
#ifndef _di_F_status_access_
- const f_string_static_t f_status_access_s = macro_f_string_static_t_initialize2(F_status_access_s, 0, F_status_access_s_length);
- const f_string_static_t f_status_access_denied_s = macro_f_string_static_t_initialize2(F_status_access_denied_s, 0, F_status_access_denied_s_length);
- const f_string_static_t f_status_access_denied_user_s = macro_f_string_static_t_initialize2(F_status_access_denied_user_s, 0, F_status_access_denied_user_s_length);
- const f_string_static_t f_status_access_denied_group_s = macro_f_string_static_t_initialize2(F_status_access_denied_group_s, 0, F_status_access_denied_group_s_length);
- const f_string_static_t f_status_access_denied_world_s = macro_f_string_static_t_initialize2(F_status_access_denied_world_s, 0, F_status_access_denied_world_s_length);
- const f_string_static_t f_status_access_denied_read_s = macro_f_string_static_t_initialize2(F_status_access_denied_read_s, 0, F_status_access_denied_read_s_length);
- const f_string_static_t f_status_access_denied_write_s = macro_f_string_static_t_initialize2(F_status_access_denied_write_s, 0, F_status_access_denied_write_s_length);
- const f_string_static_t f_status_access_denied_execute_s = macro_f_string_static_t_initialize2(F_status_access_denied_execute_s, 0, F_status_access_denied_execute_s_length);
- const f_string_static_t f_status_access_denied_super_s = macro_f_string_static_t_initialize2(F_status_access_denied_super_s, 0, F_status_access_denied_super_s_length);
- const f_string_static_t f_status_access_granted_s = macro_f_string_static_t_initialize2(F_status_access_granted_s, 0, F_status_access_granted_s_length);
- const f_string_static_t f_status_access_granted_user_s = macro_f_string_static_t_initialize2(F_status_access_granted_user_s, 0, F_status_access_granted_user_s_length);
- const f_string_static_t f_status_access_granted_group_s = macro_f_string_static_t_initialize2(F_status_access_granted_group_s, 0, F_status_access_granted_group_s_length);
- const f_string_static_t f_status_access_granted_world_s = macro_f_string_static_t_initialize2(F_status_access_granted_world_s, 0, F_status_access_granted_world_s_length);
- const f_string_static_t f_status_access_granted_read_s = macro_f_string_static_t_initialize2(F_status_access_granted_read_s, 0, F_status_access_granted_read_s_length);
- const f_string_static_t f_status_access_granted_write_s = macro_f_string_static_t_initialize2(F_status_access_granted_write_s, 0, F_status_access_granted_write_s_length);
- const f_string_static_t f_status_access_granted_execute_s = macro_f_string_static_t_initialize2(F_status_access_granted_execute_s, 0, F_status_access_granted_execute_s_length);
- const f_string_static_t f_status_access_granted_super_s = macro_f_string_static_t_initialize2(F_status_access_granted_super_s, 0, F_status_access_granted_super_s_length);
- const f_string_static_t f_status_access_group_s = macro_f_string_static_t_initialize2(F_status_access_group_s, 0, F_status_access_group_s_length);
- const f_string_static_t f_status_access_mode_s = macro_f_string_static_t_initialize2(F_status_access_mode_s, 0, F_status_access_mode_s_length);
- const f_string_static_t f_status_access_not_s = macro_f_string_static_t_initialize2(F_status_access_not_s, 0, F_status_access_not_s_length);
- const f_string_static_t f_status_access_owner_s = macro_f_string_static_t_initialize2(F_status_access_owner_s, 0, F_status_access_owner_s_length);
+ const f_string_static_t f_status_access_s = macro_f_string_static_t_initialize(F_status_access_s, 0, F_status_access_s_length);
+ const f_string_static_t f_status_access_denied_s = macro_f_string_static_t_initialize(F_status_access_denied_s, 0, F_status_access_denied_s_length);
+ const f_string_static_t f_status_access_denied_user_s = macro_f_string_static_t_initialize(F_status_access_denied_user_s, 0, F_status_access_denied_user_s_length);
+ const f_string_static_t f_status_access_denied_group_s = macro_f_string_static_t_initialize(F_status_access_denied_group_s, 0, F_status_access_denied_group_s_length);
+ const f_string_static_t f_status_access_denied_world_s = macro_f_string_static_t_initialize(F_status_access_denied_world_s, 0, F_status_access_denied_world_s_length);
+ const f_string_static_t f_status_access_denied_read_s = macro_f_string_static_t_initialize(F_status_access_denied_read_s, 0, F_status_access_denied_read_s_length);
+ const f_string_static_t f_status_access_denied_write_s = macro_f_string_static_t_initialize(F_status_access_denied_write_s, 0, F_status_access_denied_write_s_length);
+ const f_string_static_t f_status_access_denied_execute_s = macro_f_string_static_t_initialize(F_status_access_denied_execute_s, 0, F_status_access_denied_execute_s_length);
+ const f_string_static_t f_status_access_denied_super_s = macro_f_string_static_t_initialize(F_status_access_denied_super_s, 0, F_status_access_denied_super_s_length);
+ const f_string_static_t f_status_access_granted_s = macro_f_string_static_t_initialize(F_status_access_granted_s, 0, F_status_access_granted_s_length);
+ const f_string_static_t f_status_access_granted_user_s = macro_f_string_static_t_initialize(F_status_access_granted_user_s, 0, F_status_access_granted_user_s_length);
+ const f_string_static_t f_status_access_granted_group_s = macro_f_string_static_t_initialize(F_status_access_granted_group_s, 0, F_status_access_granted_group_s_length);
+ const f_string_static_t f_status_access_granted_world_s = macro_f_string_static_t_initialize(F_status_access_granted_world_s, 0, F_status_access_granted_world_s_length);
+ const f_string_static_t f_status_access_granted_read_s = macro_f_string_static_t_initialize(F_status_access_granted_read_s, 0, F_status_access_granted_read_s_length);
+ const f_string_static_t f_status_access_granted_write_s = macro_f_string_static_t_initialize(F_status_access_granted_write_s, 0, F_status_access_granted_write_s_length);
+ const f_string_static_t f_status_access_granted_execute_s = macro_f_string_static_t_initialize(F_status_access_granted_execute_s, 0, F_status_access_granted_execute_s_length);
+ const f_string_static_t f_status_access_granted_super_s = macro_f_string_static_t_initialize(F_status_access_granted_super_s, 0, F_status_access_granted_super_s_length);
+ const f_string_static_t f_status_access_group_s = macro_f_string_static_t_initialize(F_status_access_group_s, 0, F_status_access_group_s_length);
+ const f_string_static_t f_status_access_mode_s = macro_f_string_static_t_initialize(F_status_access_mode_s, 0, F_status_access_mode_s_length);
+ const f_string_static_t f_status_access_not_s = macro_f_string_static_t_initialize(F_status_access_not_s, 0, F_status_access_not_s_length);
+ const f_string_static_t f_status_access_owner_s = macro_f_string_static_t_initialize(F_status_access_owner_s, 0, F_status_access_owner_s_length);
#endif // _di_F_status_access_
#ifndef _di_F_status_terminal_
- const f_string_static_t f_status_terminal_s = macro_f_string_static_t_initialize2(F_status_terminal_s, 0, F_status_terminal_s_length);
- const f_string_static_t f_status_terminal_access_s = macro_f_string_static_t_initialize2(F_status_terminal_access_s, 0, F_status_terminal_access_s_length);
- const f_string_static_t f_status_terminal_known_s = macro_f_string_static_t_initialize2(F_status_terminal_known_s, 0, F_status_terminal_known_s_length);
- const f_string_static_t f_status_terminal_known_not_s = macro_f_string_static_t_initialize2(F_status_terminal_known_not_s, 0, F_status_terminal_known_not_s_length);
- const f_string_static_t f_status_terminal_not_s = macro_f_string_static_t_initialize2(F_status_terminal_not_s, 0, F_status_terminal_not_s_length);
- const f_string_static_t f_status_terminal_prohibited_s = macro_f_string_static_t_initialize2(F_status_terminal_prohibited_s, 0, F_status_terminal_prohibited_s_length);
- const f_string_static_t f_status_terminal_read_s = macro_f_string_static_t_initialize2(F_status_terminal_read_s, 0, F_status_terminal_read_s_length);
- const f_string_static_t f_status_terminal_valid_s = macro_f_string_static_t_initialize2(F_status_terminal_valid_s, 0, F_status_terminal_valid_s_length);
- const f_string_static_t f_status_terminal_valid_not_s = macro_f_string_static_t_initialize2(F_status_terminal_valid_not_s, 0, F_status_terminal_valid_not_s_length);
- const f_string_static_t f_status_terminal_write_s = macro_f_string_static_t_initialize2(F_status_terminal_write_s, 0, F_status_terminal_write_s_length);
+ const f_string_static_t f_status_terminal_s = macro_f_string_static_t_initialize(F_status_terminal_s, 0, F_status_terminal_s_length);
+ const f_string_static_t f_status_terminal_access_s = macro_f_string_static_t_initialize(F_status_terminal_access_s, 0, F_status_terminal_access_s_length);
+ const f_string_static_t f_status_terminal_known_s = macro_f_string_static_t_initialize(F_status_terminal_known_s, 0, F_status_terminal_known_s_length);
+ const f_string_static_t f_status_terminal_known_not_s = macro_f_string_static_t_initialize(F_status_terminal_known_not_s, 0, F_status_terminal_known_not_s_length);
+ const f_string_static_t f_status_terminal_not_s = macro_f_string_static_t_initialize(F_status_terminal_not_s, 0, F_status_terminal_not_s_length);
+ const f_string_static_t f_status_terminal_prohibited_s = macro_f_string_static_t_initialize(F_status_terminal_prohibited_s, 0, F_status_terminal_prohibited_s_length);
+ const f_string_static_t f_status_terminal_read_s = macro_f_string_static_t_initialize(F_status_terminal_read_s, 0, F_status_terminal_read_s_length);
+ const f_string_static_t f_status_terminal_valid_s = macro_f_string_static_t_initialize(F_status_terminal_valid_s, 0, F_status_terminal_valid_s_length);
+ const f_string_static_t f_status_terminal_valid_not_s = macro_f_string_static_t_initialize(F_status_terminal_valid_not_s, 0, F_status_terminal_valid_not_s_length);
+ const f_string_static_t f_status_terminal_write_s = macro_f_string_static_t_initialize(F_status_terminal_write_s, 0, F_status_terminal_write_s_length);
#endif // _di_F_status_terminal_
- const f_string_static_t f_status_status_code_last_s = macro_f_string_static_t_initialize2(F_status_status_code_last_s, 0, F_status_status_code_last_s_length);
+ const f_string_static_t f_status_status_code_last_s = macro_f_string_static_t_initialize(F_status_status_code_last_s, 0, F_status_status_code_last_s_length);
#endif // _di_F_status_string_
#ifndef _di_f_status_string_to_
#endif
#ifndef _di_f_string_empty_s_
- const f_string_static_t f_string_empty_s = macro_f_string_static_t_initialize2(F_string_empty_s, 0, F_string_empty_s_length);
+ const f_string_static_t f_string_empty_s = macro_f_string_static_t_initialize(F_string_empty_s, 0, F_string_empty_s_length);
#endif // _di_f_string_empty_s_
#ifndef _di_f_string_null_s_
- const f_string_static_t f_string_null_s = macro_f_string_static_t_initialize2(F_string_null_s, 0, F_string_null_s_length);
+ const f_string_static_t f_string_null_s = macro_f_string_static_t_initialize(F_string_null_s, 0, F_string_null_s_length);
#endif // _di_f_string_null_s_
#ifndef _di_string_ascii_s_
- const f_string_static_t f_string_ascii_0_s = macro_f_string_static_t_initialize2(F_string_ascii_0_s, 0, F_string_ascii_0_s_length);
- const f_string_static_t f_string_ascii_1_s = macro_f_string_static_t_initialize2(F_string_ascii_1_s, 0, F_string_ascii_1_s_length);
- const f_string_static_t f_string_ascii_2_s = macro_f_string_static_t_initialize2(F_string_ascii_2_s, 0, F_string_ascii_2_s_length);
- const f_string_static_t f_string_ascii_3_s = macro_f_string_static_t_initialize2(F_string_ascii_3_s, 0, F_string_ascii_3_s_length);
- const f_string_static_t f_string_ascii_4_s = macro_f_string_static_t_initialize2(F_string_ascii_4_s, 0, F_string_ascii_4_s_length);
- const f_string_static_t f_string_ascii_5_s = macro_f_string_static_t_initialize2(F_string_ascii_5_s, 0, F_string_ascii_5_s_length);
- const f_string_static_t f_string_ascii_6_s = macro_f_string_static_t_initialize2(F_string_ascii_6_s, 0, F_string_ascii_6_s_length);
- const f_string_static_t f_string_ascii_7_s = macro_f_string_static_t_initialize2(F_string_ascii_7_s, 0, F_string_ascii_7_s_length);
- const f_string_static_t f_string_ascii_8_s = macro_f_string_static_t_initialize2(F_string_ascii_8_s, 0, F_string_ascii_8_s_length);
- const f_string_static_t f_string_ascii_9_s = macro_f_string_static_t_initialize2(F_string_ascii_9_s, 0, F_string_ascii_9_s_length);
-
- const f_string_static_t f_string_ascii_a_s = macro_f_string_static_t_initialize2(F_string_ascii_a_s, 0, F_string_ascii_a_s_length);
- const f_string_static_t f_string_ascii_b_s = macro_f_string_static_t_initialize2(F_string_ascii_b_s, 0, F_string_ascii_b_s_length);
- const f_string_static_t f_string_ascii_c_s = macro_f_string_static_t_initialize2(F_string_ascii_c_s, 0, F_string_ascii_c_s_length);
- const f_string_static_t f_string_ascii_d_s = macro_f_string_static_t_initialize2(F_string_ascii_d_s, 0, F_string_ascii_d_s_length);
- const f_string_static_t f_string_ascii_e_s = macro_f_string_static_t_initialize2(F_string_ascii_e_s, 0, F_string_ascii_e_s_length);
- const f_string_static_t f_string_ascii_f_s = macro_f_string_static_t_initialize2(F_string_ascii_f_s, 0, F_string_ascii_f_s_length);
- const f_string_static_t f_string_ascii_g_s = macro_f_string_static_t_initialize2(F_string_ascii_g_s, 0, F_string_ascii_g_s_length);
- const f_string_static_t f_string_ascii_h_s = macro_f_string_static_t_initialize2(F_string_ascii_h_s, 0, F_string_ascii_h_s_length);
- const f_string_static_t f_string_ascii_i_s = macro_f_string_static_t_initialize2(F_string_ascii_i_s, 0, F_string_ascii_i_s_length);
- const f_string_static_t f_string_ascii_j_s = macro_f_string_static_t_initialize2(F_string_ascii_j_s, 0, F_string_ascii_j_s_length);
- const f_string_static_t f_string_ascii_k_s = macro_f_string_static_t_initialize2(F_string_ascii_k_s, 0, F_string_ascii_k_s_length);
- const f_string_static_t f_string_ascii_l_s = macro_f_string_static_t_initialize2(F_string_ascii_l_s, 0, F_string_ascii_l_s_length);
- const f_string_static_t f_string_ascii_m_s = macro_f_string_static_t_initialize2(F_string_ascii_m_s, 0, F_string_ascii_m_s_length);
- const f_string_static_t f_string_ascii_n_s = macro_f_string_static_t_initialize2(F_string_ascii_n_s, 0, F_string_ascii_n_s_length);
- const f_string_static_t f_string_ascii_o_s = macro_f_string_static_t_initialize2(F_string_ascii_o_s, 0, F_string_ascii_o_s_length);
- const f_string_static_t f_string_ascii_p_s = macro_f_string_static_t_initialize2(F_string_ascii_p_s, 0, F_string_ascii_p_s_length);
- const f_string_static_t f_string_ascii_q_s = macro_f_string_static_t_initialize2(F_string_ascii_q_s, 0, F_string_ascii_q_s_length);
- const f_string_static_t f_string_ascii_r_s = macro_f_string_static_t_initialize2(F_string_ascii_r_s, 0, F_string_ascii_r_s_length);
- const f_string_static_t f_string_ascii_s_s = macro_f_string_static_t_initialize2(F_string_ascii_s_s, 0, F_string_ascii_s_s_length);
- const f_string_static_t f_string_ascii_t_s = macro_f_string_static_t_initialize2(F_string_ascii_t_s, 0, F_string_ascii_t_s_length);
- const f_string_static_t f_string_ascii_u_s = macro_f_string_static_t_initialize2(F_string_ascii_u_s, 0, F_string_ascii_u_s_length);
- const f_string_static_t f_string_ascii_v_s = macro_f_string_static_t_initialize2(F_string_ascii_v_s, 0, F_string_ascii_v_s_length);
- const f_string_static_t f_string_ascii_w_s = macro_f_string_static_t_initialize2(F_string_ascii_w_s, 0, F_string_ascii_w_s_length);
- const f_string_static_t f_string_ascii_x_s = macro_f_string_static_t_initialize2(F_string_ascii_x_s, 0, F_string_ascii_x_s_length);
- const f_string_static_t f_string_ascii_y_s = macro_f_string_static_t_initialize2(F_string_ascii_y_s, 0, F_string_ascii_y_s_length);
- const f_string_static_t f_string_ascii_z_s = macro_f_string_static_t_initialize2(F_string_ascii_z_s, 0, F_string_ascii_z_s_length);
-
- const f_string_static_t f_string_ascii_A_s = macro_f_string_static_t_initialize2(F_string_ascii_A_s, 0, F_string_ascii_A_s_length);
- const f_string_static_t f_string_ascii_B_s = macro_f_string_static_t_initialize2(F_string_ascii_B_s, 0, F_string_ascii_B_s_length);
- const f_string_static_t f_string_ascii_C_s = macro_f_string_static_t_initialize2(F_string_ascii_C_s, 0, F_string_ascii_C_s_length);
- const f_string_static_t f_string_ascii_D_s = macro_f_string_static_t_initialize2(F_string_ascii_D_s, 0, F_string_ascii_D_s_length);
- const f_string_static_t f_string_ascii_E_s = macro_f_string_static_t_initialize2(F_string_ascii_E_s, 0, F_string_ascii_E_s_length);
- const f_string_static_t f_string_ascii_F_s = macro_f_string_static_t_initialize2(F_string_ascii_F_s, 0, F_string_ascii_F_s_length);
- const f_string_static_t f_string_ascii_G_s = macro_f_string_static_t_initialize2(F_string_ascii_G_s, 0, F_string_ascii_G_s_length);
- const f_string_static_t f_string_ascii_H_s = macro_f_string_static_t_initialize2(F_string_ascii_H_s, 0, F_string_ascii_H_s_length);
- const f_string_static_t f_string_ascii_I_s = macro_f_string_static_t_initialize2(F_string_ascii_I_s, 0, F_string_ascii_I_s_length);
- const f_string_static_t f_string_ascii_J_s = macro_f_string_static_t_initialize2(F_string_ascii_J_s, 0, F_string_ascii_J_s_length);
- const f_string_static_t f_string_ascii_K_s = macro_f_string_static_t_initialize2(F_string_ascii_K_s, 0, F_string_ascii_K_s_length);
- const f_string_static_t f_string_ascii_L_s = macro_f_string_static_t_initialize2(F_string_ascii_L_s, 0, F_string_ascii_L_s_length);
- const f_string_static_t f_string_ascii_M_s = macro_f_string_static_t_initialize2(F_string_ascii_M_s, 0, F_string_ascii_M_s_length);
- const f_string_static_t f_string_ascii_N_s = macro_f_string_static_t_initialize2(F_string_ascii_N_s, 0, F_string_ascii_N_s_length);
- const f_string_static_t f_string_ascii_O_s = macro_f_string_static_t_initialize2(F_string_ascii_O_s, 0, F_string_ascii_O_s_length);
- const f_string_static_t f_string_ascii_P_s = macro_f_string_static_t_initialize2(F_string_ascii_P_s, 0, F_string_ascii_P_s_length);
- const f_string_static_t f_string_ascii_Q_s = macro_f_string_static_t_initialize2(F_string_ascii_Q_s, 0, F_string_ascii_Q_s_length);
- const f_string_static_t f_string_ascii_R_s = macro_f_string_static_t_initialize2(F_string_ascii_R_s, 0, F_string_ascii_R_s_length);
- const f_string_static_t f_string_ascii_S_s = macro_f_string_static_t_initialize2(F_string_ascii_S_s, 0, F_string_ascii_S_s_length);
- const f_string_static_t f_string_ascii_T_s = macro_f_string_static_t_initialize2(F_string_ascii_T_s, 0, F_string_ascii_T_s_length);
- const f_string_static_t f_string_ascii_U_s = macro_f_string_static_t_initialize2(F_string_ascii_U_s, 0, F_string_ascii_U_s_length);
- const f_string_static_t f_string_ascii_V_s = macro_f_string_static_t_initialize2(F_string_ascii_V_s, 0, F_string_ascii_V_s_length);
- const f_string_static_t f_string_ascii_W_s = macro_f_string_static_t_initialize2(F_string_ascii_W_s, 0, F_string_ascii_W_s_length);
- const f_string_static_t f_string_ascii_X_s = macro_f_string_static_t_initialize2(F_string_ascii_X_s, 0, F_string_ascii_X_s_length);
- const f_string_static_t f_string_ascii_Y_s = macro_f_string_static_t_initialize2(F_string_ascii_Y_s, 0, F_string_ascii_Y_s_length);
- const f_string_static_t f_string_ascii_Z_s = macro_f_string_static_t_initialize2(F_string_ascii_Z_s, 0, F_string_ascii_Z_s_length);
-
- const f_string_static_t f_string_ascii_ampersand_s = macro_f_string_static_t_initialize2(F_string_ascii_ampersand_s, 0, F_string_ascii_ampersand_s_length);
- const f_string_static_t f_string_ascii_asterisk_s = macro_f_string_static_t_initialize2(F_string_ascii_asterisk_s, 0, F_string_ascii_asterisk_s_length);
- const f_string_static_t f_string_ascii_brace_close_s = macro_f_string_static_t_initialize2(F_string_ascii_brace_close_s, 0, F_string_ascii_brace_close_s_length);
- const f_string_static_t f_string_ascii_brace_open_s = macro_f_string_static_t_initialize2(F_string_ascii_brace_open_s, 0, F_string_ascii_brace_open_s_length);
- const f_string_static_t f_string_ascii_bracket_close_s = macro_f_string_static_t_initialize2(F_string_ascii_bracket_close_s, 0, F_string_ascii_bracket_close_s_length);
- const f_string_static_t f_string_ascii_bracket_open_s = macro_f_string_static_t_initialize2(F_string_ascii_bracket_open_s, 0, F_string_ascii_bracket_open_s_length);
- const f_string_static_t f_string_ascii_caret_s = macro_f_string_static_t_initialize2(F_string_ascii_caret_s, 0, F_string_ascii_caret_s_length);
- const f_string_static_t f_string_ascii_comma_s = macro_f_string_static_t_initialize2(F_string_ascii_comma_s, 0, F_string_ascii_comma_s_length);
- const f_string_static_t f_string_ascii_colon_s = macro_f_string_static_t_initialize2(F_string_ascii_colon_s, 0, F_string_ascii_colon_s_length);
- const f_string_static_t f_string_ascii_colon_semi_s = macro_f_string_static_t_initialize2(F_string_ascii_colon_semi_s, 0, F_string_ascii_colon_semi_s_length);
- const f_string_static_t f_string_ascii_dollar_s = macro_f_string_static_t_initialize2(F_string_ascii_dollar_s, 0, F_string_ascii_dollar_s_length);
- const f_string_static_t f_string_ascii_equal_s = macro_f_string_static_t_initialize2(F_string_ascii_equal_s, 0, F_string_ascii_equal_s_length);
- const f_string_static_t f_string_ascii_exclamation_s = macro_f_string_static_t_initialize2(F_string_ascii_exclamation_s, 0, F_string_ascii_exclamation_s_length);
- const f_string_static_t f_string_ascii_grave_s = macro_f_string_static_t_initialize2(F_string_ascii_grave_s, 0, F_string_ascii_grave_s_length);
- const f_string_static_t f_string_ascii_mark_question_s = macro_f_string_static_t_initialize2(F_string_ascii_mark_question_s, 0, F_string_ascii_mark_question_s_length);
- const f_string_static_t f_string_ascii_minus_s = macro_f_string_static_t_initialize2(F_string_ascii_minus_s, 0, F_string_ascii_minus_s_length);
- const f_string_static_t f_string_ascii_parenthesis_open_s = macro_f_string_static_t_initialize2(F_string_ascii_parenthesis_open_s, 0, F_string_ascii_parenthesis_open_s_length);
- const f_string_static_t f_string_ascii_parenthesis_close_s = macro_f_string_static_t_initialize2(F_string_ascii_parenthesis_close_s, 0, F_string_ascii_parenthesis_close_s_length);
- const f_string_static_t f_string_ascii_percent_s = macro_f_string_static_t_initialize2(F_string_ascii_percent_s, 0, F_string_ascii_percent_s_length);
- const f_string_static_t f_string_ascii_period_s = macro_f_string_static_t_initialize2(F_string_ascii_period_s, 0, F_string_ascii_period_s_length);
- const f_string_static_t f_string_ascii_pipe_s = macro_f_string_static_t_initialize2(F_string_ascii_pipe_s, 0, F_string_ascii_pipe_s_length);
- const f_string_static_t f_string_ascii_plus_s = macro_f_string_static_t_initialize2(F_string_ascii_plus_s, 0, F_string_ascii_plus_s_length);
- const f_string_static_t f_string_ascii_pound_s = macro_f_string_static_t_initialize2(F_string_ascii_pound_s, 0, F_string_ascii_pound_s_length);
- const f_string_static_t f_string_ascii_quote_double_s = macro_f_string_static_t_initialize2(F_string_ascii_quote_double_s, 0, F_string_ascii_quote_double_s_length);
- const f_string_static_t f_string_ascii_quote_single_s = macro_f_string_static_t_initialize2(F_string_ascii_quote_single_s, 0, F_string_ascii_quote_single_s_length);
- const f_string_static_t f_string_ascii_sign_at_s = macro_f_string_static_t_initialize2(F_string_ascii_sign_at_s, 0, F_string_ascii_sign_at_s_length);
- const f_string_static_t f_string_ascii_sign_greater_than_s = macro_f_string_static_t_initialize2(F_string_ascii_sign_greater_than_s, 0, F_string_ascii_sign_greater_than_s_length);
- const f_string_static_t f_string_ascii_sign_less_than_s = macro_f_string_static_t_initialize2(F_string_ascii_sign_less_than_s, 0, F_string_ascii_sign_less_than_s_length);
- const f_string_static_t f_string_ascii_slash_forward_s = macro_f_string_static_t_initialize2(F_string_ascii_slash_forward_s, 0, F_string_ascii_slash_forward_s_length);
- const f_string_static_t f_string_ascii_slash_backward_s = macro_f_string_static_t_initialize2(F_string_ascii_slash_backward_s, 0, F_string_ascii_slash_backward_s_length);
- const f_string_static_t f_string_ascii_tilde_s = macro_f_string_static_t_initialize2(F_string_ascii_tilde_s, 0, F_string_ascii_tilde_s_length);
- const f_string_static_t f_string_ascii_underscore_s = macro_f_string_static_t_initialize2(F_string_ascii_underscore_s, 0, F_string_ascii_underscore_s_length);
-
- const f_string_static_t f_string_ascii_acknowledge_s = macro_f_string_static_t_initialize2(F_string_ascii_acknowledge_s, 0, F_string_ascii_acknowledge_s_length);
- const f_string_static_t f_string_ascii_acknowledge_negative_s = macro_f_string_static_t_initialize2(F_string_ascii_acknowledge_negative_s, 0, F_string_ascii_acknowledge_negative_s_length);
- const f_string_static_t f_string_ascii_bell_s = macro_f_string_static_t_initialize2(F_string_ascii_bell_s, 0, F_string_ascii_bell_s_length);
- const f_string_static_t f_string_ascii_cancel_s = macro_f_string_static_t_initialize2(F_string_ascii_cancel_s, 0, F_string_ascii_cancel_s_length);
- const f_string_static_t f_string_ascii_data_link_escape_s = macro_f_string_static_t_initialize2(F_string_ascii_data_link_escape_s, 0, F_string_ascii_data_link_escape_s_length);
- const f_string_static_t f_string_ascii_device_control_one_s = macro_f_string_static_t_initialize2(F_string_ascii_device_control_one_s, 0, F_string_ascii_device_control_one_s_length);
- const f_string_static_t f_string_ascii_device_control_two_s = macro_f_string_static_t_initialize2(F_string_ascii_device_control_two_s, 0, F_string_ascii_device_control_two_s_length);
- const f_string_static_t f_string_ascii_device_control_three_s = macro_f_string_static_t_initialize2(F_string_ascii_device_control_three_s, 0, F_string_ascii_device_control_three_s_length);
- const f_string_static_t f_string_ascii_device_control_four_s = macro_f_string_static_t_initialize2(F_string_ascii_device_control_four_s, 0, F_string_ascii_device_control_four_s_length);
- const f_string_static_t f_string_ascii_enquiry_s = macro_f_string_static_t_initialize2(F_string_ascii_enquiry_s, 0, F_string_ascii_enquiry_s_length);
- const f_string_static_t f_string_ascii_escape_s = macro_f_string_static_t_initialize2(F_string_ascii_escape_s, 0, F_string_ascii_escape_s_length);
- const f_string_static_t f_string_ascii_feed_form_s = macro_f_string_static_t_initialize2(F_string_ascii_feed_form_s, 0, F_string_ascii_feed_form_s_length);
- const f_string_static_t f_string_ascii_feed_line_s = macro_f_string_static_t_initialize2(F_string_ascii_feed_line_s, 0, F_string_ascii_feed_line_s_length);
- const f_string_static_t f_string_ascii_header_start_s = macro_f_string_static_t_initialize2(F_string_ascii_header_start_s, 0, F_string_ascii_header_start_s_length);
- const f_string_static_t f_string_ascii_medium_stop_s = macro_f_string_static_t_initialize2(F_string_ascii_medium_stop_s, 0, F_string_ascii_medium_stop_s_length);
- const f_string_static_t f_string_ascii_null_s = macro_f_string_static_t_initialize2(F_string_ascii_null_s, 0, F_string_ascii_null_s_length);
- const f_string_static_t f_string_ascii_return_carriage_s = macro_f_string_static_t_initialize2(F_string_ascii_return_carriage_s, 0, F_string_ascii_return_carriage_s_length);
- const f_string_static_t f_string_ascii_separator_file_s = macro_f_string_static_t_initialize2(F_string_ascii_separator_file_s, 0, F_string_ascii_separator_file_s_length);
- const f_string_static_t f_string_ascii_separator_group_s = macro_f_string_static_t_initialize2(F_string_ascii_separator_group_s, 0, F_string_ascii_separator_group_s_length);
- const f_string_static_t f_string_ascii_separator_record_s = macro_f_string_static_t_initialize2(F_string_ascii_separator_record_s, 0, F_string_ascii_separator_record_s_length);
- const f_string_static_t f_string_ascii_separator_unit_s = macro_f_string_static_t_initialize2(F_string_ascii_separator_unit_s, 0, F_string_ascii_separator_unit_s_length);
- const f_string_static_t f_string_ascii_shift_in_s = macro_f_string_static_t_initialize2(F_string_ascii_shift_in_s, 0, F_string_ascii_shift_in_s_length);
- const f_string_static_t f_string_ascii_shift_out_s = macro_f_string_static_t_initialize2(F_string_ascii_shift_out_s, 0, F_string_ascii_shift_out_s_length);
- const f_string_static_t f_string_ascii_space_s = macro_f_string_static_t_initialize2(F_string_ascii_space_s, 0, F_string_ascii_space_s_length);
- const f_string_static_t f_string_ascii_space_back_s = macro_f_string_static_t_initialize2(F_string_ascii_space_back_s, 0, F_string_ascii_space_back_s_length);
- const f_string_static_t f_string_ascii_substitute_s = macro_f_string_static_t_initialize2(F_string_ascii_substitute_s, 0, F_string_ascii_substitute_s_length);
- const f_string_static_t f_string_ascii_synchronous_idle_s = macro_f_string_static_t_initialize2(F_string_ascii_synchronous_idle_s, 0, F_string_ascii_synchronous_idle_s_length);
- const f_string_static_t f_string_ascii_tab_horizontal_s = macro_f_string_static_t_initialize2(F_string_ascii_tab_horizontal_s, 0, F_string_ascii_tab_horizontal_s_length);
- const f_string_static_t f_string_ascii_tab_vertical_s = macro_f_string_static_t_initialize2(F_string_ascii_tab_vertical_s, 0, F_string_ascii_tab_vertical_s_length);
- const f_string_static_t f_string_ascii_text_start_s = macro_f_string_static_t_initialize2(F_string_ascii_text_start_s, 0, F_string_ascii_text_start_s_length);
- const f_string_static_t f_string_ascii_text_stop_s = macro_f_string_static_t_initialize2(F_string_ascii_text_stop_s, 0, F_string_ascii_text_stop_s_length);
- const f_string_static_t f_string_ascii_transmission_stop_s = macro_f_string_static_t_initialize2(F_string_ascii_transmission_stop_s, 0, F_string_ascii_transmission_stop_s_length);
- const f_string_static_t f_string_ascii_transmission_block_end_s = macro_f_string_static_t_initialize2(F_string_ascii_transmission_block_end_s, 0, F_string_ascii_transmission_block_end_s_length);
+ const f_string_static_t f_string_ascii_0_s = macro_f_string_static_t_initialize(F_string_ascii_0_s, 0, F_string_ascii_0_s_length);
+ const f_string_static_t f_string_ascii_1_s = macro_f_string_static_t_initialize(F_string_ascii_1_s, 0, F_string_ascii_1_s_length);
+ const f_string_static_t f_string_ascii_2_s = macro_f_string_static_t_initialize(F_string_ascii_2_s, 0, F_string_ascii_2_s_length);
+ const f_string_static_t f_string_ascii_3_s = macro_f_string_static_t_initialize(F_string_ascii_3_s, 0, F_string_ascii_3_s_length);
+ const f_string_static_t f_string_ascii_4_s = macro_f_string_static_t_initialize(F_string_ascii_4_s, 0, F_string_ascii_4_s_length);
+ const f_string_static_t f_string_ascii_5_s = macro_f_string_static_t_initialize(F_string_ascii_5_s, 0, F_string_ascii_5_s_length);
+ const f_string_static_t f_string_ascii_6_s = macro_f_string_static_t_initialize(F_string_ascii_6_s, 0, F_string_ascii_6_s_length);
+ const f_string_static_t f_string_ascii_7_s = macro_f_string_static_t_initialize(F_string_ascii_7_s, 0, F_string_ascii_7_s_length);
+ const f_string_static_t f_string_ascii_8_s = macro_f_string_static_t_initialize(F_string_ascii_8_s, 0, F_string_ascii_8_s_length);
+ const f_string_static_t f_string_ascii_9_s = macro_f_string_static_t_initialize(F_string_ascii_9_s, 0, F_string_ascii_9_s_length);
+
+ const f_string_static_t f_string_ascii_a_s = macro_f_string_static_t_initialize(F_string_ascii_a_s, 0, F_string_ascii_a_s_length);
+ const f_string_static_t f_string_ascii_b_s = macro_f_string_static_t_initialize(F_string_ascii_b_s, 0, F_string_ascii_b_s_length);
+ const f_string_static_t f_string_ascii_c_s = macro_f_string_static_t_initialize(F_string_ascii_c_s, 0, F_string_ascii_c_s_length);
+ const f_string_static_t f_string_ascii_d_s = macro_f_string_static_t_initialize(F_string_ascii_d_s, 0, F_string_ascii_d_s_length);
+ const f_string_static_t f_string_ascii_e_s = macro_f_string_static_t_initialize(F_string_ascii_e_s, 0, F_string_ascii_e_s_length);
+ const f_string_static_t f_string_ascii_f_s = macro_f_string_static_t_initialize(F_string_ascii_f_s, 0, F_string_ascii_f_s_length);
+ const f_string_static_t f_string_ascii_g_s = macro_f_string_static_t_initialize(F_string_ascii_g_s, 0, F_string_ascii_g_s_length);
+ const f_string_static_t f_string_ascii_h_s = macro_f_string_static_t_initialize(F_string_ascii_h_s, 0, F_string_ascii_h_s_length);
+ const f_string_static_t f_string_ascii_i_s = macro_f_string_static_t_initialize(F_string_ascii_i_s, 0, F_string_ascii_i_s_length);
+ const f_string_static_t f_string_ascii_j_s = macro_f_string_static_t_initialize(F_string_ascii_j_s, 0, F_string_ascii_j_s_length);
+ const f_string_static_t f_string_ascii_k_s = macro_f_string_static_t_initialize(F_string_ascii_k_s, 0, F_string_ascii_k_s_length);
+ const f_string_static_t f_string_ascii_l_s = macro_f_string_static_t_initialize(F_string_ascii_l_s, 0, F_string_ascii_l_s_length);
+ const f_string_static_t f_string_ascii_m_s = macro_f_string_static_t_initialize(F_string_ascii_m_s, 0, F_string_ascii_m_s_length);
+ const f_string_static_t f_string_ascii_n_s = macro_f_string_static_t_initialize(F_string_ascii_n_s, 0, F_string_ascii_n_s_length);
+ const f_string_static_t f_string_ascii_o_s = macro_f_string_static_t_initialize(F_string_ascii_o_s, 0, F_string_ascii_o_s_length);
+ const f_string_static_t f_string_ascii_p_s = macro_f_string_static_t_initialize(F_string_ascii_p_s, 0, F_string_ascii_p_s_length);
+ const f_string_static_t f_string_ascii_q_s = macro_f_string_static_t_initialize(F_string_ascii_q_s, 0, F_string_ascii_q_s_length);
+ const f_string_static_t f_string_ascii_r_s = macro_f_string_static_t_initialize(F_string_ascii_r_s, 0, F_string_ascii_r_s_length);
+ const f_string_static_t f_string_ascii_s_s = macro_f_string_static_t_initialize(F_string_ascii_s_s, 0, F_string_ascii_s_s_length);
+ const f_string_static_t f_string_ascii_t_s = macro_f_string_static_t_initialize(F_string_ascii_t_s, 0, F_string_ascii_t_s_length);
+ const f_string_static_t f_string_ascii_u_s = macro_f_string_static_t_initialize(F_string_ascii_u_s, 0, F_string_ascii_u_s_length);
+ const f_string_static_t f_string_ascii_v_s = macro_f_string_static_t_initialize(F_string_ascii_v_s, 0, F_string_ascii_v_s_length);
+ const f_string_static_t f_string_ascii_w_s = macro_f_string_static_t_initialize(F_string_ascii_w_s, 0, F_string_ascii_w_s_length);
+ const f_string_static_t f_string_ascii_x_s = macro_f_string_static_t_initialize(F_string_ascii_x_s, 0, F_string_ascii_x_s_length);
+ const f_string_static_t f_string_ascii_y_s = macro_f_string_static_t_initialize(F_string_ascii_y_s, 0, F_string_ascii_y_s_length);
+ const f_string_static_t f_string_ascii_z_s = macro_f_string_static_t_initialize(F_string_ascii_z_s, 0, F_string_ascii_z_s_length);
+
+ const f_string_static_t f_string_ascii_A_s = macro_f_string_static_t_initialize(F_string_ascii_A_s, 0, F_string_ascii_A_s_length);
+ const f_string_static_t f_string_ascii_B_s = macro_f_string_static_t_initialize(F_string_ascii_B_s, 0, F_string_ascii_B_s_length);
+ const f_string_static_t f_string_ascii_C_s = macro_f_string_static_t_initialize(F_string_ascii_C_s, 0, F_string_ascii_C_s_length);
+ const f_string_static_t f_string_ascii_D_s = macro_f_string_static_t_initialize(F_string_ascii_D_s, 0, F_string_ascii_D_s_length);
+ const f_string_static_t f_string_ascii_E_s = macro_f_string_static_t_initialize(F_string_ascii_E_s, 0, F_string_ascii_E_s_length);
+ const f_string_static_t f_string_ascii_F_s = macro_f_string_static_t_initialize(F_string_ascii_F_s, 0, F_string_ascii_F_s_length);
+ const f_string_static_t f_string_ascii_G_s = macro_f_string_static_t_initialize(F_string_ascii_G_s, 0, F_string_ascii_G_s_length);
+ const f_string_static_t f_string_ascii_H_s = macro_f_string_static_t_initialize(F_string_ascii_H_s, 0, F_string_ascii_H_s_length);
+ const f_string_static_t f_string_ascii_I_s = macro_f_string_static_t_initialize(F_string_ascii_I_s, 0, F_string_ascii_I_s_length);
+ const f_string_static_t f_string_ascii_J_s = macro_f_string_static_t_initialize(F_string_ascii_J_s, 0, F_string_ascii_J_s_length);
+ const f_string_static_t f_string_ascii_K_s = macro_f_string_static_t_initialize(F_string_ascii_K_s, 0, F_string_ascii_K_s_length);
+ const f_string_static_t f_string_ascii_L_s = macro_f_string_static_t_initialize(F_string_ascii_L_s, 0, F_string_ascii_L_s_length);
+ const f_string_static_t f_string_ascii_M_s = macro_f_string_static_t_initialize(F_string_ascii_M_s, 0, F_string_ascii_M_s_length);
+ const f_string_static_t f_string_ascii_N_s = macro_f_string_static_t_initialize(F_string_ascii_N_s, 0, F_string_ascii_N_s_length);
+ const f_string_static_t f_string_ascii_O_s = macro_f_string_static_t_initialize(F_string_ascii_O_s, 0, F_string_ascii_O_s_length);
+ const f_string_static_t f_string_ascii_P_s = macro_f_string_static_t_initialize(F_string_ascii_P_s, 0, F_string_ascii_P_s_length);
+ const f_string_static_t f_string_ascii_Q_s = macro_f_string_static_t_initialize(F_string_ascii_Q_s, 0, F_string_ascii_Q_s_length);
+ const f_string_static_t f_string_ascii_R_s = macro_f_string_static_t_initialize(F_string_ascii_R_s, 0, F_string_ascii_R_s_length);
+ const f_string_static_t f_string_ascii_S_s = macro_f_string_static_t_initialize(F_string_ascii_S_s, 0, F_string_ascii_S_s_length);
+ const f_string_static_t f_string_ascii_T_s = macro_f_string_static_t_initialize(F_string_ascii_T_s, 0, F_string_ascii_T_s_length);
+ const f_string_static_t f_string_ascii_U_s = macro_f_string_static_t_initialize(F_string_ascii_U_s, 0, F_string_ascii_U_s_length);
+ const f_string_static_t f_string_ascii_V_s = macro_f_string_static_t_initialize(F_string_ascii_V_s, 0, F_string_ascii_V_s_length);
+ const f_string_static_t f_string_ascii_W_s = macro_f_string_static_t_initialize(F_string_ascii_W_s, 0, F_string_ascii_W_s_length);
+ const f_string_static_t f_string_ascii_X_s = macro_f_string_static_t_initialize(F_string_ascii_X_s, 0, F_string_ascii_X_s_length);
+ const f_string_static_t f_string_ascii_Y_s = macro_f_string_static_t_initialize(F_string_ascii_Y_s, 0, F_string_ascii_Y_s_length);
+ const f_string_static_t f_string_ascii_Z_s = macro_f_string_static_t_initialize(F_string_ascii_Z_s, 0, F_string_ascii_Z_s_length);
+
+ const f_string_static_t f_string_ascii_ampersand_s = macro_f_string_static_t_initialize(F_string_ascii_ampersand_s, 0, F_string_ascii_ampersand_s_length);
+ const f_string_static_t f_string_ascii_asterisk_s = macro_f_string_static_t_initialize(F_string_ascii_asterisk_s, 0, F_string_ascii_asterisk_s_length);
+ const f_string_static_t f_string_ascii_brace_close_s = macro_f_string_static_t_initialize(F_string_ascii_brace_close_s, 0, F_string_ascii_brace_close_s_length);
+ const f_string_static_t f_string_ascii_brace_open_s = macro_f_string_static_t_initialize(F_string_ascii_brace_open_s, 0, F_string_ascii_brace_open_s_length);
+ const f_string_static_t f_string_ascii_bracket_close_s = macro_f_string_static_t_initialize(F_string_ascii_bracket_close_s, 0, F_string_ascii_bracket_close_s_length);
+ const f_string_static_t f_string_ascii_bracket_open_s = macro_f_string_static_t_initialize(F_string_ascii_bracket_open_s, 0, F_string_ascii_bracket_open_s_length);
+ const f_string_static_t f_string_ascii_caret_s = macro_f_string_static_t_initialize(F_string_ascii_caret_s, 0, F_string_ascii_caret_s_length);
+ const f_string_static_t f_string_ascii_comma_s = macro_f_string_static_t_initialize(F_string_ascii_comma_s, 0, F_string_ascii_comma_s_length);
+ const f_string_static_t f_string_ascii_colon_s = macro_f_string_static_t_initialize(F_string_ascii_colon_s, 0, F_string_ascii_colon_s_length);
+ const f_string_static_t f_string_ascii_colon_semi_s = macro_f_string_static_t_initialize(F_string_ascii_colon_semi_s, 0, F_string_ascii_colon_semi_s_length);
+ const f_string_static_t f_string_ascii_dollar_s = macro_f_string_static_t_initialize(F_string_ascii_dollar_s, 0, F_string_ascii_dollar_s_length);
+ const f_string_static_t f_string_ascii_equal_s = macro_f_string_static_t_initialize(F_string_ascii_equal_s, 0, F_string_ascii_equal_s_length);
+ const f_string_static_t f_string_ascii_exclamation_s = macro_f_string_static_t_initialize(F_string_ascii_exclamation_s, 0, F_string_ascii_exclamation_s_length);
+ const f_string_static_t f_string_ascii_grave_s = macro_f_string_static_t_initialize(F_string_ascii_grave_s, 0, F_string_ascii_grave_s_length);
+ const f_string_static_t f_string_ascii_mark_question_s = macro_f_string_static_t_initialize(F_string_ascii_mark_question_s, 0, F_string_ascii_mark_question_s_length);
+ const f_string_static_t f_string_ascii_minus_s = macro_f_string_static_t_initialize(F_string_ascii_minus_s, 0, F_string_ascii_minus_s_length);
+ const f_string_static_t f_string_ascii_parenthesis_open_s = macro_f_string_static_t_initialize(F_string_ascii_parenthesis_open_s, 0, F_string_ascii_parenthesis_open_s_length);
+ const f_string_static_t f_string_ascii_parenthesis_close_s = macro_f_string_static_t_initialize(F_string_ascii_parenthesis_close_s, 0, F_string_ascii_parenthesis_close_s_length);
+ const f_string_static_t f_string_ascii_percent_s = macro_f_string_static_t_initialize(F_string_ascii_percent_s, 0, F_string_ascii_percent_s_length);
+ const f_string_static_t f_string_ascii_period_s = macro_f_string_static_t_initialize(F_string_ascii_period_s, 0, F_string_ascii_period_s_length);
+ const f_string_static_t f_string_ascii_pipe_s = macro_f_string_static_t_initialize(F_string_ascii_pipe_s, 0, F_string_ascii_pipe_s_length);
+ const f_string_static_t f_string_ascii_plus_s = macro_f_string_static_t_initialize(F_string_ascii_plus_s, 0, F_string_ascii_plus_s_length);
+ const f_string_static_t f_string_ascii_pound_s = macro_f_string_static_t_initialize(F_string_ascii_pound_s, 0, F_string_ascii_pound_s_length);
+ const f_string_static_t f_string_ascii_quote_double_s = macro_f_string_static_t_initialize(F_string_ascii_quote_double_s, 0, F_string_ascii_quote_double_s_length);
+ const f_string_static_t f_string_ascii_quote_single_s = macro_f_string_static_t_initialize(F_string_ascii_quote_single_s, 0, F_string_ascii_quote_single_s_length);
+ const f_string_static_t f_string_ascii_sign_at_s = macro_f_string_static_t_initialize(F_string_ascii_sign_at_s, 0, F_string_ascii_sign_at_s_length);
+ const f_string_static_t f_string_ascii_sign_greater_than_s = macro_f_string_static_t_initialize(F_string_ascii_sign_greater_than_s, 0, F_string_ascii_sign_greater_than_s_length);
+ const f_string_static_t f_string_ascii_sign_less_than_s = macro_f_string_static_t_initialize(F_string_ascii_sign_less_than_s, 0, F_string_ascii_sign_less_than_s_length);
+ const f_string_static_t f_string_ascii_slash_forward_s = macro_f_string_static_t_initialize(F_string_ascii_slash_forward_s, 0, F_string_ascii_slash_forward_s_length);
+ const f_string_static_t f_string_ascii_slash_backward_s = macro_f_string_static_t_initialize(F_string_ascii_slash_backward_s, 0, F_string_ascii_slash_backward_s_length);
+ const f_string_static_t f_string_ascii_tilde_s = macro_f_string_static_t_initialize(F_string_ascii_tilde_s, 0, F_string_ascii_tilde_s_length);
+ const f_string_static_t f_string_ascii_underscore_s = macro_f_string_static_t_initialize(F_string_ascii_underscore_s, 0, F_string_ascii_underscore_s_length);
+
+ const f_string_static_t f_string_ascii_acknowledge_s = macro_f_string_static_t_initialize(F_string_ascii_acknowledge_s, 0, F_string_ascii_acknowledge_s_length);
+ const f_string_static_t f_string_ascii_acknowledge_negative_s = macro_f_string_static_t_initialize(F_string_ascii_acknowledge_negative_s, 0, F_string_ascii_acknowledge_negative_s_length);
+ const f_string_static_t f_string_ascii_bell_s = macro_f_string_static_t_initialize(F_string_ascii_bell_s, 0, F_string_ascii_bell_s_length);
+ const f_string_static_t f_string_ascii_cancel_s = macro_f_string_static_t_initialize(F_string_ascii_cancel_s, 0, F_string_ascii_cancel_s_length);
+ const f_string_static_t f_string_ascii_data_link_escape_s = macro_f_string_static_t_initialize(F_string_ascii_data_link_escape_s, 0, F_string_ascii_data_link_escape_s_length);
+ const f_string_static_t f_string_ascii_device_control_one_s = macro_f_string_static_t_initialize(F_string_ascii_device_control_one_s, 0, F_string_ascii_device_control_one_s_length);
+ const f_string_static_t f_string_ascii_device_control_two_s = macro_f_string_static_t_initialize(F_string_ascii_device_control_two_s, 0, F_string_ascii_device_control_two_s_length);
+ const f_string_static_t f_string_ascii_device_control_three_s = macro_f_string_static_t_initialize(F_string_ascii_device_control_three_s, 0, F_string_ascii_device_control_three_s_length);
+ const f_string_static_t f_string_ascii_device_control_four_s = macro_f_string_static_t_initialize(F_string_ascii_device_control_four_s, 0, F_string_ascii_device_control_four_s_length);
+ const f_string_static_t f_string_ascii_enquiry_s = macro_f_string_static_t_initialize(F_string_ascii_enquiry_s, 0, F_string_ascii_enquiry_s_length);
+ const f_string_static_t f_string_ascii_escape_s = macro_f_string_static_t_initialize(F_string_ascii_escape_s, 0, F_string_ascii_escape_s_length);
+ const f_string_static_t f_string_ascii_feed_form_s = macro_f_string_static_t_initialize(F_string_ascii_feed_form_s, 0, F_string_ascii_feed_form_s_length);
+ const f_string_static_t f_string_ascii_feed_line_s = macro_f_string_static_t_initialize(F_string_ascii_feed_line_s, 0, F_string_ascii_feed_line_s_length);
+ const f_string_static_t f_string_ascii_header_start_s = macro_f_string_static_t_initialize(F_string_ascii_header_start_s, 0, F_string_ascii_header_start_s_length);
+ const f_string_static_t f_string_ascii_medium_stop_s = macro_f_string_static_t_initialize(F_string_ascii_medium_stop_s, 0, F_string_ascii_medium_stop_s_length);
+ const f_string_static_t f_string_ascii_null_s = macro_f_string_static_t_initialize(F_string_ascii_null_s, 0, F_string_ascii_null_s_length);
+ const f_string_static_t f_string_ascii_return_carriage_s = macro_f_string_static_t_initialize(F_string_ascii_return_carriage_s, 0, F_string_ascii_return_carriage_s_length);
+ const f_string_static_t f_string_ascii_separator_file_s = macro_f_string_static_t_initialize(F_string_ascii_separator_file_s, 0, F_string_ascii_separator_file_s_length);
+ const f_string_static_t f_string_ascii_separator_group_s = macro_f_string_static_t_initialize(F_string_ascii_separator_group_s, 0, F_string_ascii_separator_group_s_length);
+ const f_string_static_t f_string_ascii_separator_record_s = macro_f_string_static_t_initialize(F_string_ascii_separator_record_s, 0, F_string_ascii_separator_record_s_length);
+ const f_string_static_t f_string_ascii_separator_unit_s = macro_f_string_static_t_initialize(F_string_ascii_separator_unit_s, 0, F_string_ascii_separator_unit_s_length);
+ const f_string_static_t f_string_ascii_shift_in_s = macro_f_string_static_t_initialize(F_string_ascii_shift_in_s, 0, F_string_ascii_shift_in_s_length);
+ const f_string_static_t f_string_ascii_shift_out_s = macro_f_string_static_t_initialize(F_string_ascii_shift_out_s, 0, F_string_ascii_shift_out_s_length);
+ const f_string_static_t f_string_ascii_space_s = macro_f_string_static_t_initialize(F_string_ascii_space_s, 0, F_string_ascii_space_s_length);
+ const f_string_static_t f_string_ascii_space_back_s = macro_f_string_static_t_initialize(F_string_ascii_space_back_s, 0, F_string_ascii_space_back_s_length);
+ const f_string_static_t f_string_ascii_substitute_s = macro_f_string_static_t_initialize(F_string_ascii_substitute_s, 0, F_string_ascii_substitute_s_length);
+ const f_string_static_t f_string_ascii_synchronous_idle_s = macro_f_string_static_t_initialize(F_string_ascii_synchronous_idle_s, 0, F_string_ascii_synchronous_idle_s_length);
+ const f_string_static_t f_string_ascii_tab_horizontal_s = macro_f_string_static_t_initialize(F_string_ascii_tab_horizontal_s, 0, F_string_ascii_tab_horizontal_s_length);
+ const f_string_static_t f_string_ascii_tab_vertical_s = macro_f_string_static_t_initialize(F_string_ascii_tab_vertical_s, 0, F_string_ascii_tab_vertical_s_length);
+ const f_string_static_t f_string_ascii_text_start_s = macro_f_string_static_t_initialize(F_string_ascii_text_start_s, 0, F_string_ascii_text_start_s_length);
+ const f_string_static_t f_string_ascii_text_stop_s = macro_f_string_static_t_initialize(F_string_ascii_text_stop_s, 0, F_string_ascii_text_stop_s_length);
+ const f_string_static_t f_string_ascii_transmission_stop_s = macro_f_string_static_t_initialize(F_string_ascii_transmission_stop_s, 0, F_string_ascii_transmission_stop_s_length);
+ const f_string_static_t f_string_ascii_transmission_block_end_s = macro_f_string_static_t_initialize(F_string_ascii_transmission_block_end_s, 0, F_string_ascii_transmission_block_end_s_length);
#endif // _di_string_ascii_s_
#ifndef _di_f_string_dynamic_adjust_
*
* The f_string_static_t type should never be directly allocated or deallocated.
*
- * A special macro_f_string_static_t_initialize() is provided for the special purpose of easily initialize a static string with an identical used and size.
- * A special macro_f_string_static_t_initialize2() is provided for the special purpose of easily initialize a static string.
+ * A special macro_f_string_static_t_initialize2() is provided for the special purpose of easily initialize a static string with an identical used and size.
+ * A special macro_f_string_static_t_initialize() is provided for the special purpose of easily initialize a static string.
*
* string: The string.
* size: Total amount of space available.
string_static.size = 0; \
string_static.used = 0;
- #define macro_f_string_static_t_initialize(string, length) { string, length, length }
- #define macro_f_string_static_t_initialize2(string, size, used) { string, size, used }
+ #define macro_f_string_static_t_initialize(string, size, used) { string, size, used }
+ #define macro_f_string_static_t_initialize2(string, length) { string, length, length }
#endif // _di_f_string_static_t_
/**
#include <fll/level_0/memory.h>
#include <fll/level_0/string.h>
-// fll-0 utf includes
+// FLL-0 utf includes.
#include <fll/level_0/utf-common.h>
#include <fll/level_0/utf_dynamic.h>
#include <fll/level_0/utf_map.h>
f_file_t file = macro_f_file_t_initialize2(0, -1, F_file_flag_write_only_d);
f_status_t status = F_none;
- f_array_length_t length = 0;
+ f_string_static_t path = f_string_static_t_initialize;
for (f_array_length_t i = 0; i < control_group.groups.used; ++i) {
if (!control_group.groups.array[i].used) continue;
- length = control_group.path.used + control_group.groups.array[i].used + F_control_group_path_system_suffix_s_length;
+ path.used = control_group.path.used + control_group.groups.array[i].used + F_control_group_path_system_suffix_s_length;
- char path[length + 1];
+ char path_string[path.used + 1];
+ path.string = path_string;
if (control_group.path.used) {
- memcpy(path, control_group.path.string, control_group.path.used);
+ memcpy(path.string, control_group.path.string, control_group.path.used);
}
- memcpy(path + control_group.path.used, control_group.groups.array[i].string, control_group.groups.array[i].used);
- memcpy(path + control_group.path.used + F_control_group_path_system_default_s_length, F_control_group_path_system_suffix_s, F_control_group_path_system_suffix_s_length);
+ memcpy(path.string + control_group.path.used, control_group.groups.array[i].string, control_group.groups.array[i].used);
+ memcpy(path.string + control_group.path.used + F_control_group_path_system_default_s_length, F_control_group_path_system_suffix_s, F_control_group_path_system_suffix_s_length);
- path[length] = 0;
+ path.string[path.used] = 0;
- status = f_file_stream_open(path, 0, &file);
+ status = f_file_stream_open(path, f_string_empty_s, &file);
if (F_status_is_error(status)) break;
fprintf(file.stream, "%d", id);
fflush(file.stream);
- f_file_stream_close(F_true, &file);
+ status = f_file_stream_close(F_true, &file);
if (F_status_is_error(status)) break;
} // for
- if (F_status_is_error(status)) {
- return status;
- }
+ if (F_status_is_error(status)) return status;
return F_none;
}
--- /dev/null
+#include "directory.h"
+#include "private-directory.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
--- /dev/null
+/**
+ * FLL - Level 1
+ *
+ * Project: Directory
+ * API Version: 0.5
+ * Licenses: lgpl-2.1-or-later
+ *
+ * Defines common data to be used for/by project directory.
+ *
+ * This is auto-included by utf.h and should not need to be explicitly included.
+ */
+#ifndef _FL_directory_common_h
+#define _FL_directory_common_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * An association of a path and a status code.
+ *
+ * The allocation macros apply to the path.
+ *
+ * depth_max:
+ * The max recursion depth.
+ * size_block:
+ * The default number of chunks to read at a time with each chunk being 1-byte.
+ * Must be greater than 0.
+ * exclusive:
+ * If TRUE, will fail when file already exists.
+ * If FALSE, will not fail if file already exists (existing file will be replaced).
+ * output:
+ * Set to -1 to not print on successful operation.
+ * Set to a valid file descriptor to print to on successful operation.
+ * This is passed to the verbose function if that function pointer is not -1.
+ * verbose:
+ * Set to 0 to not print on successful operation.
+ * Set to address of a function to be called for printing such that:
+ * - The first parameter represents the output file type.
+ * - The second parameter represents the source string.
+ * - The third parameter represents the destination string.
+ * failures:
+ * A list of paths and their respective status codes for clone failures.
+ * If 0, then this and statuses are ignored.
+ */
+#ifndef _di_fl_directory_recurse_t_
+ #define FL_directory_recurse_depth_max_d 65535
+
+ typedef struct {
+ f_number_unsigned_t depth_max;
+ f_number_unsigned_t size_block;
+
+ bool exclusive;
+ f_file_t output;
+
+ void (*verbose)(const f_file_t, const f_string_t, const f_string_t);
+
+ f_directory_statuss_t *failures;
+ } fl_directory_recurse_t;
+
+ #define fl_directory_recurse_t_initialize { FL_directory_recurse_depth_max_d, F_file_default_read_size_d, F_false, macro_f_file_t_initialize2(F_type_output_d, F_type_descriptor_output_d, F_file_flag_write_only_d), 0, 0 }
+#endif // _di_fl_directory_recurse_t_
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _FL_directory_common_h
#endif
#ifndef _di_fl_directory_create_
- f_status_t fl_directory_create(const f_string_t path, const f_array_length_t length, const mode_t mode) {
+ f_status_t fl_directory_create(const f_string_static_t path, const mode_t mode) {
#ifndef _di_level_1_parameter_checking_
- if (!path) return F_status_set_error(F_parameter);
+ if (!path.string) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- if (!length) {
+ if (!path.used) {
return F_data_not;
}
{
f_array_length_t at_tree = 0;
f_array_length_t at_path = 0;
+ f_string_static_t tree = f_string_static_t_initialize;
- char tree[length];
+ char tree_string[path.used];
+ tree.string = tree_string;
+ tree.used = path.used;
- for (; path[at_path]; ++at_path) {
+ for (; path.string[at_path]; ++at_path) {
- if (at_path && path[at_path] == f_path_separator_s.string[0]) {
- memcpy(tree, path + at_tree, at_path - at_tree);
- tree[at_path] = 0;
+ if (at_path && path.string[at_path] == f_path_separator_s.string[0]) {
+ memcpy(tree.string, path.string + at_tree, at_path - at_tree);
+ tree.string[at_path] = 0;
status = f_directory_exists(tree);
if (F_status_is_error(status)) return status;
#endif // _di_fl_directory_create_
#ifndef _di_fl_directory_clone_
- f_status_t fl_directory_clone(const f_string_t source, const f_string_t destination, const f_array_length_t source_length, const f_array_length_t destination_length, const bool role, const fl_directory_recurse_t recurse) {
+ f_status_t fl_directory_clone(const f_string_static_t source, const f_string_static_t destination, const bool role, const fl_directory_recurse_t recurse) {
#ifndef _di_level_1_parameter_checking_
- if (!source) return F_status_set_error(F_parameter);
- if (!destination) return F_status_set_error(F_parameter);
+ if (!source.string) return F_status_set_error(F_parameter);
+ if (!destination.string) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
+ if (!source.used || !destination.used) {
+ return F_data_not;
+ }
+
f_status_t status = f_directory_exists(source);
if (F_status_is_error(status)) return status;
if (F_status_is_error(status)) return status;
}
- f_string_static_t static_source = { source, source_length, source_length };
- f_string_static_t static_destination = { destination, destination_length, destination_length };
-
- // do not allow null termination or trailing path separators in the string's length calculation.
{
- f_array_length_t i = source_length;
+ f_string_static_t static_source = source;
+ f_string_static_t static_destination = destination;
+ f_array_length_t i = 0;
+ // Do not allow null termination or trailing path separators in the string's length calculation.
for (; i > 0; --i, --static_source.used) {
- if (!source[i - 1]) continue;
- if (source[i - 1] == f_path_separator_s.string[0]) continue;
+ if (!source.string[i - 1]) continue;
+ if (source.string[i - 1] == f_path_separator_s.string[0]) continue;
break;
} // for
- i = destination_length;
+ i = destination.used;
for (; i > 0; --i, --static_destination.used) {
- if (!destination[i - 1]) continue;
- if (destination[i - 1] == f_path_separator_s.string[0]) continue;
+ if (!destination.string[i - 1]) continue;
+ if (destination.string[i - 1] == f_path_separator_s.string[0]) continue;
break;
} // for
- }
- if (recurse.depth_max) {
- status = private_fl_directory_clone(static_source, static_destination, role, recurse, 1);
+ if (recurse.depth_max) {
+ status = private_fl_directory_clone(static_source, static_destination, role, recurse, 1);
+ }
}
if (status == F_none && (!recurse.output.stream || recurse.output.id != -1) && recurse.verbose) {
- recurse.verbose(recurse.output, source, destination);
+ recurse.verbose(recurse.output, source.string, destination.string);
}
return status;
#endif // _di_fl_directory_clone_
#ifndef _di_fl_directory_clone_content_
- f_status_t fl_directory_clone_content(const f_string_t source, const f_string_t destination, const f_array_length_t source_length, const f_array_length_t destination_length, const bool role, const fl_directory_recurse_t recurse) {
+ f_status_t fl_directory_clone_content(const f_string_static_t source, const f_string_static_t destination, const bool role, const fl_directory_recurse_t recurse) {
#ifndef _di_level_1_parameter_checking_
- if (!source) return F_status_set_error(F_parameter);
- if (!destination) return F_status_set_error(F_parameter);
+ if (!source.string) return F_status_set_error(F_parameter);
+ if (!destination.string) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
+ if (!source.used || !destination.used) {
+ return F_data_not;
+ }
+
f_status_t status = f_directory_exists(source);
if (F_status_is_error(status)) return status;
if (F_status_is_error(status)) return status;
if (status == F_false) return F_status_set_error(F_directory);
- f_string_static_t static_source = { source, source_length, source_length };
- f_string_static_t static_destination = { destination, destination_length, destination_length };
+ f_string_static_t static_source = macro_f_string_static_t_initialize2(source.string, source.used);
+ f_string_static_t static_destination = macro_f_string_static_t_initialize2(destination.string, destination.used);
- // do not allow null termination or trailing path separators in the string's length calculation.
+ // Do not allow null termination or trailing path separators in the string's length calculation.
{
- f_array_length_t i = source_length;
+ f_array_length_t i = source.used;
for (; i > 0; --i, --static_source.used) {
- if (!source[i - 1]) continue;
- if (source[i - 1] == f_path_separator_s.string[0]) continue;
+ if (!source.string[i - 1]) continue;
+ if (source.string[i - 1] == f_path_separator_s.string[0]) continue;
break;
} // for
- i = destination_length;
+ i = destination.used;
for (; i > 0; --i, --static_destination.used) {
- if (!destination[i - 1]) continue;
- if (destination[i - 1] == f_path_separator_s.string[0]) continue;
+ if (!destination.string[i - 1]) continue;
+ if (destination.string[i - 1] == f_path_separator_s.string[0]) continue;
break;
} // for
status = private_fl_directory_clone(static_source, static_destination, role, recurse, 1);
if (status == F_none && (!recurse.output.stream || recurse.output.id != -1) && recurse.verbose) {
- recurse.verbose(recurse.output, source, destination);
+ recurse.verbose(recurse.output, source.string, destination.string);
}
return status;
#endif // _di_fl_directory_clone_content_
#ifndef _di_fl_directory_copy_
- f_status_t fl_directory_copy(const f_string_t source, const f_string_t destination, const f_array_length_t source_length, const f_array_length_t destination_length, const f_mode_t mode, const fl_directory_recurse_t recurse) {
+ f_status_t fl_directory_copy(const f_string_static_t source, const f_string_static_t destination, const f_mode_t mode, const fl_directory_recurse_t recurse) {
#ifndef _di_level_1_parameter_checking_
- if (!source) return F_status_set_error(F_parameter);
- if (!destination) return F_status_set_error(F_parameter);
+ if (!source.string) return F_status_set_error(F_parameter);
+ if (!destination.string) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
+ if (!source.used || !destination.used) {
+ return F_data_not;
+ }
+
f_status_t status = f_directory_exists(source);
if (F_status_is_error(status)) return status;
if (F_status_is_error(status)) return status;
}
- f_string_static_t static_source = { source, source_length, source_length };
- f_string_static_t static_destination = { destination, destination_length, destination_length };
+ f_string_static_t static_source = macro_f_string_static_t_initialize2(source.string, source.used);
+ f_string_static_t static_destination = macro_f_string_static_t_initialize2(destination.string, destination.used);
- // do not allow null termination or trailing path separators in the string's length calculation.
+ // Do not allow null termination or trailing path separators in the string's length calculation.
{
- f_array_length_t i = source_length;
+ f_array_length_t i = source.used;
for (; i > 0; --i, --static_source.used) {
- if (!source[i - 1]) continue;
- if (source[i - 1] == f_path_separator_s.string[0]) continue;
+ if (!source.string[i - 1]) continue;
+ if (source.string[i - 1] == f_path_separator_s.string[0]) continue;
break;
} // for
- i = destination_length;
+ i = destination.used;
for (; i > 0; --i, --static_destination.used) {
- if (!destination[i - 1]) continue;
- if (destination[i - 1] == f_path_separator_s.string[0]) continue;
+ if (!destination.string[i - 1]) continue;
+ if (destination.string[i - 1] == f_path_separator_s.string[0]) continue;
break;
} // for
}
if (status == F_none && (!recurse.output.stream || recurse.output.id != -1) && recurse.verbose) {
- recurse.verbose(recurse.output, source, destination);
+ recurse.verbose(recurse.output, source.string, destination.string);
}
return status;
#endif // _di_fl_directory_copy_
#ifndef _di_fl_directory_copy_content_
- f_status_t fl_directory_copy_content(const f_string_t source, const f_string_t destination, const f_array_length_t source_length, const f_array_length_t destination_length, const f_mode_t mode, const fl_directory_recurse_t recurse) {
+ f_status_t fl_directory_copy_content(const f_string_static_t source, const f_string_static_t destination, const f_mode_t mode, const fl_directory_recurse_t recurse) {
#ifndef _di_level_1_parameter_checking_
- if (!source) return F_status_set_error(F_parameter);
- if (!destination) return F_status_set_error(F_parameter);
+ if (!source.string) return F_status_set_error(F_parameter);
+ if (!destination.string) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
+ if (!source.used || !destination.used) {
+ return F_data_not;
+ }
+
f_status_t status = f_directory_exists(source);
if (F_status_is_error(status)) return status;
if (F_status_is_error(status)) return status;
if (status == F_false) return F_status_set_error(F_directory);
- f_string_static_t static_source = { source, source_length, source_length };
- f_string_static_t static_destination = { destination, destination_length, destination_length };
+ f_string_static_t static_source = macro_f_string_static_t_initialize2(source.string, source.used);
+ f_string_static_t static_destination = macro_f_string_static_t_initialize2(destination.string, destination.used);
- // do not allow null termination or trailing path separators in the string's length calculation.
+ // Do not allow null termination or trailing path separators in the string's length calculation.
{
- f_array_length_t i = source_length;
+ f_array_length_t i = source.used;
for (; i > 0; --i, --static_source.used) {
- if (!source[i - 1]) continue;
- if (source[i - 1] == f_path_separator_s.string[0]) continue;
+ if (!source.string[i - 1]) continue;
+ if (source.string[i - 1] == f_path_separator_s.string[0]) continue;
break;
} // for
- i = destination_length;
+ i = destination.used;
for (; i > 0; --i, --static_destination.used) {
- if (!destination[i - 1]) continue;
- if (destination[i - 1] == f_path_separator_s.string[0]) continue;
+ if (!destination.string[i - 1]) continue;
+ if (destination.string[i - 1] == f_path_separator_s.string[0]) continue;
break;
} // for
}
if (status == F_none && (!recurse.output.stream || recurse.output.id != -1) && recurse.verbose) {
- recurse.verbose(recurse.output, source, destination);
+ recurse.verbose(recurse.output, source.string, destination.string);
}
return status;
#endif // _di_fl_directory_copy_content_
#ifndef _di_fl_directory_list_
- f_status_t fl_directory_list(const f_string_t path, int (*filter)(const struct dirent *), int (*sort)(const struct dirent **, const struct dirent **), const bool dereference, f_directory_listing_t *listing) {
+ f_status_t fl_directory_list(const f_string_static_t path, int (*filter)(const struct dirent *), int (*sort)(const struct dirent **, const struct dirent **), const bool dereference, f_directory_listing_t *listing) {
#ifndef _di_level_1_parameter_checking_
- if (!path) return F_status_set_error(F_parameter);
+ if (!path.string) return F_status_set_error(F_parameter);
if (!listing) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
+ if (!path.used) {
+ return F_data_not;
+ }
+
return private_fl_directory_list(path, filter, sort, dereference, listing);
}
#endif // _di_fl_directory_list_
#ifndef _di_fl_directory_path_pop_
f_status_t fl_directory_path_pop(f_string_static_t *path) {
#ifndef _di_level_1_parameter_checking_
- if (path->used > path->size) return F_status_set_error(F_parameter);
+ if (!path->string) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
if (!path->used) {
if (path->string[j] != f_path_separator_s.string[0]) {
i = j + 1;
+
break;
}
} // for
} // for
path->used = 0;
+
return F_none;
}
#endif // _di_fl_directory_path_pop_
#ifndef _di_fl_directory_path_push_
- f_status_t fl_directory_path_push(const f_string_t source, f_array_length_t length, f_string_dynamic_t *destination) {
+ f_status_t fl_directory_path_push(const f_string_static_t source, f_string_dynamic_t *destination) {
#ifndef _di_level_1_parameter_checking_
- if (!source) return F_status_set_error(F_parameter);
- if (destination->used > destination->size) return F_status_set_error(F_parameter);
- #endif // _di_level_1_parameter_checking_
-
- if (!length) {
- return F_data_not;
- }
-
- return private_fl_directory_path_push(source, length, destination);
- }
-#endif // _di_fl_directory_path_push_
-
-#ifndef _di_fl_directory_path_push_dynamic_
- f_status_t fl_directory_path_push_dynamic(const f_string_static_t source, f_string_dynamic_t *destination) {
- #ifndef _di_level_1_parameter_checking_
- if (source.used > source.size) return F_status_set_error(F_parameter);
- if (destination->used > destination->size) return F_status_set_error(F_parameter);
+ if (!source.string) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
if (!source.used) {
return F_data_not;
}
- return private_fl_directory_path_push(source.string, source.used, destination);
+ return private_fl_directory_path_push(source, destination);
}
-#endif // _di_fl_directory_path_push_dynamic_
+#endif // _di_fl_directory_path_push_
#ifdef __cplusplus
} // extern "C"
#include <sys/types.h>
#include <unistd.h>
-// work-around for out-dated systems.
+// Work-around for systems that require __USE_XOPEN_EXTENDED defined to properly include ftw.h.
#ifndef __USE_XOPEN_EXTENDED
#define __USE_XOPEN_EXTENDED
#include <ftw.h>
#include <fll/level_0/file.h>
#include <fll/level_0/path.h>
+// FLL-1 directory includes.
+#include <fll/level_1/directory-common.h>
+
#ifdef __cplusplus
extern "C" {
#endif
/**
- * An association of a path and a status code.
- *
- * The allocation macros apply to the path.
- *
- * depth_max:
- * The max recursion depth.
- * size_block:
- * The default number of chunks to read at a time with each chunk being 1-byte.
- * Must be greater than 0.
- * exclusive:
- * If TRUE, will fail when file already exists.
- * If FALSE, will not fail if file already exists (existing file will be replaced).
- * output:
- * Set to -1 to not print on successful operation.
- * Set to a valid file descriptor to print to on successful operation.
- * This is passed to the verbose function if that function pointer is not -1.
- * verbose:
- * Set to 0 to not print on successful operation.
- * Set to address of a function to be called for printing such that:
- * - The first parameter represents the output file type.
- * - The second parameter represents the source string.
- * - The third parameter represents the destination string.
- * failures:
- * A list of paths and their respective status codes for clone failures.
- * If 0, then this and statuses are ignored.
- */
-#ifndef _di_fl_directory_recurse_t_
- #define FL_directory_recurse_depth_max_d 65535
-
- typedef struct {
- f_number_unsigned_t depth_max;
- f_number_unsigned_t size_block;
-
- bool exclusive;
- f_file_t output;
-
- void (*verbose)(const f_file_t, const f_string_t, const f_string_t);
-
- f_directory_statuss_t *failures;
- } fl_directory_recurse_t;
-
- #define fl_directory_recurse_t_initialize { FL_directory_recurse_depth_max_d, F_file_default_read_size_d, F_false, macro_f_file_t_initialize2(F_type_output_d, F_type_descriptor_output_d, F_file_flag_write_only_d), 0, 0 }
-#endif // _di_fl_directory_recurse_t_
-
-/**
* Create all directories at the given path.
*
* The paths must not contain NULL except for the terminating NULL.
*
* @param path
* The file path to the directory.
- * @param length
- * The length of the path string.
* @param mode
* The directory mode to use when creating.
* This is applied to all created directories.
*
* @return
* F_none on success.
- * F_data_not on success, but there was no string to process (length is 0).
+ * F_data_not if path.used is 0.
* F_directory_found on success, but the directory already exists.
*
* F_access_denied (with error bit) on access denied.
* @see f_directory_create()
*/
#ifndef _di_fl_directory_create_
- extern f_status_t fl_directory_create(const f_string_t path, const f_array_length_t length, const mode_t mode);
+ extern f_status_t fl_directory_create(const f_string_static_t path, const mode_t mode);
#endif // _di_fl_directory_create_
/**
* @param destination
* The destination file path.
* Must be NULL terminated.
- * @param source_length
- * The length of the source path.
- * @param destination_length
- * The length of the destination path.
* @param role
* If TRUE, will copy the owner and group ids.
* If FALSE, will not copy the owner and group ids.
*
* @return
* F_none on success.
+ * F_data_not if source.used or destination.used is 0.
*
* F_failure (with error bit) for any other failure, failures might be populated with individual status codes.
*
* @see f_file_clone()
*/
#ifndef _di_fl_directory_clone_
- extern f_status_t fl_directory_clone(const f_string_t source, const f_string_t destination, const f_array_length_t source_length, const f_array_length_t destination_length, const bool role, const fl_directory_recurse_t recurse);
+ extern f_status_t fl_directory_clone(const f_string_static_t source, const f_string_static_t destination, const bool role, const fl_directory_recurse_t recurse);
#endif // _di_fl_directory_clone_
/**
* @param destination
* The destination file path.
* Must be NULL terminated.
- * @param source_length
- * The length of the source path.
- * @param destination_length
- * The length of the destination path.
* @param role
* If TRUE, will copy the owner and group ids.
* If FALSE, will not copy the owner and group ids.
*
* @return
* F_none on success.
+ * F_data_not if source.used or destination.used is 0.
*
* F_failure (with error bit) for any other failure, failures might be populated with individual status codes.
*
* @see f_file_clone()
*/
#ifndef _di_fl_directory_clone_content_
- extern f_status_t fl_directory_clone_content(const f_string_t source, const f_string_t destination, const f_array_length_t source_length, const f_array_length_t destination_length, const bool role, const fl_directory_recurse_t recurse);
+ extern f_status_t fl_directory_clone_content(const f_string_static_t source, const f_string_static_t destination, const bool role, const fl_directory_recurse_t recurse);
#endif // _di_fl_directory_clone_content_
/**
* @param destination
* The destination file path.
* Must be NULL terminated.
- * @param source_length
- * The length of the source path.
- * @param destination_length
- * The length of the destination path.
* @param mode
* The directory modes.
* @param recurse
*
* @return
* F_none on success.
+ * F_data_not if source.used or destination.used is 0.
*
* F_failure (with error bit) for any other failure, failures might be populated with individual status codes.
*
* @see f_file_copy()
*/
#ifndef _di_fl_directory_copy_
- extern f_status_t fl_directory_copy(const f_string_t source, const f_string_t destination, const f_array_length_t source_length, const f_array_length_t destination_length, const f_mode_t mode, const fl_directory_recurse_t recurse);
+ extern f_status_t fl_directory_copy(const f_string_static_t source, const f_string_static_t destination, const f_mode_t mode, const fl_directory_recurse_t recurse);
#endif // _di_fl_directory_copy_
/**
* @param destination
* The destination file path.
* Must be NULL terminated.
- * @param source_length
- * The length of the source path.
- * @param destination_length
- * The length of the destination path.
* @param mode
* The directory modes.
* @param recurse
*
* @return
* F_none on success.
+ * F_data_not if source.used or destination.used is 0.
*
* F_failure (with error bit) for any other failure, failures might be populated with individual status codes.
*
* @see f_file_copy()
*/
#ifndef _di_fl_directory_copy_content_
- extern f_status_t fl_directory_copy_content(const f_string_t source, const f_string_t destination, const f_array_length_t source_length, const f_array_length_t destination_length, const f_mode_t mode, const fl_directory_recurse_t recurse);
+ extern f_status_t fl_directory_copy_content(const f_string_static_t source, const f_string_static_t destination, const f_mode_t mode, const fl_directory_recurse_t recurse);
#endif // _di_fl_directory_copy_content_
/**
*
* @return
* F_none on success.
- * F_data_not if directory is empty.
+ * F_data_not if source.used or destination.used is 0.
+ * F_directory_empty if directory is empty.
*
* F_directory_descriptor (with error bit) on directory file descriptor error.
* F_directory_open (with error bit) on directory open error.
* F_string_too_large (with error bit) if appended string length is too large to store in the buffer.
*
* Errors (with error bit) from: f_file_stat_at().
+ * Errors (with error bit) from: f_string_dynamics_increase_by().
*
* @see alphasort()
* @see opendir()
* @see scandir()
* @see versionsort()
+ *
+ * @see f_file_stat_at()
+ * @see f_string_dynamics_increase_by()
*/
#ifndef _di_fl_directory_list_
- extern f_status_t fl_directory_list(const f_string_t path, int (*filter)(const struct dirent *), int (*sort)(const struct dirent **, const struct dirent **), const bool dereference, f_directory_listing_t *listing);
+ extern f_status_t fl_directory_list(const f_string_static_t path, int (*filter)(const struct dirent *), int (*sort)(const struct dirent **, const struct dirent **), const bool dereference, f_directory_listing_t *listing);
#endif // _di_fl_directory_list_
/**
* @param source
* The path to append onto the destination.
* This need not be NULL terminated.
- * @param length
- * The length of the string.
- * Must not exceed length of source.
* @param destination
* The destination path to push the path part onto.
* Any terminating NULLs at the end of the destination string are removed before appending.
*
* @return
* F_none on success.
- * F_data_not if length is 0.
+ * F_data_not if source.used is 0.
*
* F_parameter (with error bit) if a parameter is invalid.
* F_string_too_large (with error bit) if appended string length is too large to store in the buffer.
* Errors (with error bit) from: f_utf_is_control().
*/
#ifndef _di_fl_directory_path_push_
- extern f_status_t fl_directory_path_push(const f_string_t source, f_array_length_t length, f_string_dynamic_t *destination);
+ extern f_status_t fl_directory_path_push(const f_string_static_t source, f_string_dynamic_t *destination);
#endif // _di_fl_directory_path_push_
-/**
- * Append a dynamic path string onto the destination path.
- *
- * This ensures that there is a leading and trailing '/' from source.
- * This ignores control characters.
- *
- * @param source
- * The path to append onto the destination.
- * This need not be NULL terminated.
- * @param destination
- * The destination path to push the path part onto.
- * Any terminating NULLs at the end of the destination string are removed before appending.
- * This will only be NULL terminated if destination string is already NULL terminated.
- *
- * @return
- * F_none on success.
- * F_data_not if source.used is 0.
- *
- * F_parameter (with error bit) if a parameter is invalid.
- * F_string_too_large (with error bit) if appended string length is too large to store in the buffer.
- *
- * Errors (with error bit) from: f_utf_is_control().
- */
-#ifndef _di_fl_directory_path_push_dynamic_
- extern f_status_t fl_directory_path_push_dynamic(const f_string_static_t source, f_string_dynamic_t *destination);
-#endif // _di_fl_directory_path_push_dynamic_
-
#ifdef __cplusplus
} // extern "C"
#endif
f_status_t status = F_none;
f_directory_listing_t listing = f_directory_listing_t_initialize;
- status = private_fl_directory_list(source.string, 0, 0, F_false, &listing);
+ status = private_fl_directory_list(source, 0, 0, F_false, &listing);
if (F_status_is_error(status)) {
macro_f_directory_listing_t_delete_simple(listing);
+
return status;
}
source_sub.string = path_source_sub;
destination_sub.string = path_destination_sub;
- status = f_directory_exists(source_sub.string);
+ status = f_directory_exists(source_sub);
if (F_status_is_error(status)) break;
if (status == F_false) {
status = F_status_set_error(F_directory);
+
break;
}
memset(&source_stat, 0, sizeof(struct stat));
- status = f_file_stat(source_sub.string, F_false, &source_stat);
+ status = f_file_stat(source_sub, F_false, &source_stat);
if (F_status_is_error(status)) break;
- status = f_directory_exists(destination_sub.string);
+ status = f_directory_exists(destination_sub);
if (F_status_is_error(status)) break;
if (status == F_true) {
if (recurse.exclusive) {
status = F_status_set_error(F_directory_found);
+
break;
}
- status = f_file_mode_set(destination_sub.string, source_stat.st_mode);
+ status = f_file_mode_set(destination_sub, source_stat.st_mode);
if (F_status_is_error(status)) break;
}
else {
- status = f_directory_create(destination_sub.string, source_stat.st_mode);
+ status = f_directory_create(destination_sub, source_stat.st_mode);
if (F_status_is_error(status)) break;
}
if (role) {
- status = f_file_role_change(destination_sub.string, source_stat.st_uid, source_stat.st_gid, F_true);
+ status = f_file_role_change(destination_sub, source_stat.st_uid, source_stat.st_gid, F_true);
if (F_status_is_error(status)) break;
}
}
} // for
f_string_dynamics_resize(0, &listing.directory);
-
if (F_status_is_error(status)) return status;
if (recurse.failures && failures_used < recurse.failures->used) {
#if !defined(_di_fl_directory_clone_file_)
f_status_t private_fl_directory_clone_file(const f_string_static_t file, const f_string_static_t source, const f_string_static_t destination, const bool role, const fl_directory_recurse_t recurse) {
- char path_source[source.used + file.used + 2];
- char path_destination[destination.used + file.used + 2];
+ f_string_static_t path_source = f_string_static_t_initialize;
+ f_string_static_t path_destination = f_string_static_t_initialize;
+
+ path_source.used = source.used + file.used + 2;
+ path_destination.used = destination.used + file.used + 2;
- memcpy(path_source, source.string, source.used);
- memcpy(path_source + source.used + 1, file.string, file.used);
- path_source[source.used] = f_path_separator_s.string[0];
- path_source[source.used + file.used + 1] = 0;
+ char path_source_string[path_source.used];
+ char path_destination_string[path_destination.used];
- memcpy(path_destination, destination.string, destination.used);
- memcpy(path_destination + destination.used + 1, file.string, file.used);
- path_destination[destination.used] = f_path_separator_s.string[0];
- path_destination[destination.used + file.used + 1] = 0;
+ path_source.string = path_source_string;
+ path_destination.string = path_destination_string;
+
+ memcpy(path_source_string, source.string, source.used);
+ memcpy(path_source_string + source.used + 1, file.string, file.used);
+ path_source_string[source.used] = f_path_separator_s.string[0];
+ path_source_string[source.used + file.used + 1] = 0;
+
+ memcpy(path_destination_string, destination.string, destination.used);
+ memcpy(path_destination_string + destination.used + 1, file.string, file.used);
+ path_destination_string[destination.used] = f_path_separator_s.string[0];
+ path_destination_string[destination.used + file.used + 1] = 0;
f_status_t status = f_file_clone(path_source, path_destination, role, recurse.size_block, recurse.exclusive);
memset(&source_stat, 0, sizeof(struct stat));
- status = f_file_stat(source.string, F_false, &source_stat);
+ status = f_file_stat(source, F_false, &source_stat);
if (F_status_is_error(status)) {
if (status == F_status_set_error(F_string_too_large)) {
size = F_string_t_size_d - 1;
macro_f_directory_status_t_resize(status, failure, size + 1);
if (F_status_is_error(status)) return status;
- memcpy(failure.path.string, path_source, size);
+ memcpy(failure.path.string, path_source.string, size);
failure.path.string[size] = 0;
}
else {
macro_f_directory_status_t_resize(status, failure, size + 1);
if (F_status_is_error(status)) return status;
- memcpy(failure.path.string, path_destination, size);
+ memcpy(failure.path.string, path_destination.string, size);
failure.path.string[size] = 0;
}
recurse.failures->array[recurse.failures->used].path.string = failure.path.string;
recurse.failures->array[recurse.failures->used].path.used = size;
recurse.failures->array[recurse.failures->used].path.size = size + 1;
- recurse.failures->array[recurse.failures->used].status = status_failure;
- ++recurse.failures->used;
+ recurse.failures->array[recurse.failures->used++].status = status_failure;
return F_failure;
}
if ((!recurse.output.stream || recurse.output.id != -1) && recurse.verbose) {
- recurse.verbose(recurse.output, path_source, path_destination);
+ recurse.verbose(recurse.output, path_source.string, path_destination.string);
}
return F_none;
f_status_t status = F_none;
f_directory_listing_t listing = f_directory_listing_t_initialize;
- status = private_fl_directory_list(source.string, 0, 0, F_false, &listing);
+ status = private_fl_directory_list(source, 0, 0, F_false, &listing);
if (F_status_is_error(status)) {
macro_f_directory_listing_t_delete_simple(listing);
source_sub.string = path_source_sub;
destination_sub.string = path_destination_sub;
- status = f_directory_exists(source_sub.string);
+ status = f_directory_exists(source_sub);
if (F_status_is_error(status)) break;
if (status == F_false) {
status = F_status_set_error(F_directory);
+
break;
}
- status = f_directory_exists(destination_sub.string);
+ status = f_directory_exists(destination_sub);
if (F_status_is_error(status)) break;
if (status == F_true) {
if (recurse.exclusive) {
status = F_status_set_error(F_directory_found);
+
break;
}
- status = f_file_mode_set(destination_sub.string, mode.directory);
+ status = f_file_mode_set(destination_sub, mode.directory);
if (F_status_is_error(status)) break;
}
else {
- status = f_directory_create(destination_sub.string, mode.directory);
+ status = f_directory_create(destination_sub, mode.directory);
if (F_status_is_error(status)) break;
}
#if !defined(_di_fl_directory_copy_file_)
f_status_t private_fl_directory_copy_file(const f_string_static_t file, const f_string_static_t source, const f_string_static_t destination, const f_mode_t mode, const fl_directory_recurse_t recurse) {
- char path_source[source.used + file.used + 2];
- char path_destination[destination.used + file.used + 2];
- memcpy(path_source, source.string, source.used);
- memcpy(path_source + source.used + 1, file.string, file.used);
- path_source[source.used] = f_path_separator_s.string[0];
- path_source[source.used + file.used + 1] = 0;
+ f_string_static_t path_source = f_string_static_t_initialize;
+ f_string_static_t path_destination = f_string_static_t_initialize;
+
+ path_source.used = source.used + file.used + 2;
+ path_destination.used = destination.used + file.used + 2;
- memcpy(path_destination, destination.string, destination.used);
- memcpy(path_destination + destination.used + 1, file.string, file.used);
- path_destination[destination.used] = f_path_separator_s.string[0];
- path_destination[destination.used + file.used + 1] = 0;
+ char path_source_string[path_source.used];
+ char path_destination_string[path_destination.used];
+
+ path_source.string = path_source_string;
+ path_destination.string = path_destination_string;
+
+ memcpy(path_source_string, source.string, source.used);
+ memcpy(path_source_string + source.used + 1, file.string, file.used);
+ path_source_string[source.used] = f_path_separator_s.string[0];
+ path_source_string[source.used + file.used + 1] = 0;
+
+ memcpy(path_destination_string, destination.string, destination.used);
+ memcpy(path_destination_string + destination.used + 1, file.string, file.used);
+ path_destination_string[destination.used] = f_path_separator_s.string[0];
+ path_destination_string[destination.used + file.used + 1] = 0;
f_status_t status = f_file_copy(path_source, path_destination, mode, recurse.size_block, recurse.exclusive);
memset(&source_stat, 0, sizeof(struct stat));
- status = f_file_stat(source.string, F_false, &source_stat);
+ status = f_file_stat(source, F_false, &source_stat);
if (F_status_is_error(status)) {
if (status == F_status_set_error(F_string_too_large)) {
macro_f_directory_status_t_resize(status, failure, size + 1);
if (F_status_is_error(status)) return status;
- memcpy(failure.path.string, path_source, size);
+ memcpy(failure.path.string, path_source.string, size);
failure.path.string[size] = 0;
}
else {
macro_f_directory_status_t_resize(status, failure, size + 1);
if (F_status_is_error(status)) return status;
- memcpy(failure.path.string, path_destination, size);
+ memcpy(failure.path.string, path_destination.string, size);
failure.path.string[size] = 0;
}
recurse.failures->array[recurse.failures->used].path.string = failure.path.string;
recurse.failures->array[recurse.failures->used].path.used = size;
recurse.failures->array[recurse.failures->used].path.size = size + 1;
- recurse.failures->array[recurse.failures->used].status = status_failure;
- ++recurse.failures->used;
+ recurse.failures->array[recurse.failures->used++].status = status_failure;
return F_failure;
}
if ((!recurse.output.stream || recurse.output.id != -1) && recurse.verbose) {
- recurse.verbose(recurse.output, path_source, path_destination);
+ recurse.verbose(recurse.output, path_source.string, path_destination.string);
}
return F_none;
#endif // !defined(_di_fl_directory_copy_file_)
#if !defined(_di_fl_directory_list_)
- f_status_t private_fl_directory_list(const f_string_t path, int (*filter)(const struct dirent *), int (*sort)(const struct dirent **, const struct dirent **), const bool dereference, f_directory_listing_t *listing) {
+ f_status_t private_fl_directory_list(const f_string_static_t path, int (*filter)(const struct dirent *), int (*sort)(const struct dirent **, const struct dirent **), const bool dereference, f_directory_listing_t *listing) {
struct dirent **entity = 0;
f_array_length_t size = 0;
f_status_t status = F_none;
- DIR *parent = opendir(path);
+ DIR *parent = opendir(path.string);
if (!parent) {
- if (errno == ENOMEM) {
- return F_status_set_error(F_memory_not);
- }
- else if (errno == ENOMEM) {
- return F_status_set_error(F_memory_not);
- }
- else if (errno == EMFILE) {
- return F_status_set_error(F_file_descriptor_max);
- }
- else if (errno == ENFILE) {
- return F_status_set_error(F_file_open_max);
- }
- else if (errno == ENOTDIR) {
- return F_status_set_error(F_directory);
- }
- else if (errno == ENOENT) {
- return F_status_set_error(F_directory_found_not);
- }
- else if (errno == EACCES) {
- return F_status_set_error(F_access_denied);
- }
+ if (errno == ENOMEM) return F_status_set_error(F_memory_not);
+ if (errno == ENOMEM) return F_status_set_error(F_memory_not);
+ if (errno == EMFILE) return F_status_set_error(F_file_descriptor_max);
+ if (errno == ENFILE) return F_status_set_error(F_file_open_max);
+ if (errno == ENOTDIR) return F_status_set_error(F_directory);
+ if (errno == ENOENT) return F_status_set_error(F_directory_found_not);
+ if (errno == EACCES) return F_status_set_error(F_access_denied);
return F_status_set_error(F_directory_open);
}
if (parent_fd < 0) {
closedir(parent);
- if (errno == EINVAL) {
- return F_status_set_error(F_directory_stream);
- }
- else if (errno == ENOTSUP) {
- return F_status_set_error(F_directory_supported_not);
- }
+ if (errno == EINVAL) return F_status_set_error(F_directory_stream);
+ if (errno == ENOTSUP) return F_status_set_error(F_directory_supported_not);
return F_status_set_error(F_directory_descriptor);
}
- const size_t length = scandir(path, &entity, filter, sort);
+ const size_t length = scandir(path.string, &entity, filter, sort);
if (length == -1) {
closedir(parent);
- if (errno == ENOMEM) {
- return F_status_set_error(F_memory_not);
- }
- else {
- return F_status_set_error(F_failure);
- }
+ if (errno == ENOMEM) return F_status_set_error(F_memory_not);
+
+ return F_status_set_error(F_failure);
}
+ f_string_static_t name_directory = f_string_static_t_initialize;
f_string_dynamics_t *names = 0;
f_array_length_t total = 0;
struct stat file_stat;
for (; i < length; ++i) {
- size = strnlen(entity[i]->d_name, F_directory_name_max_d);
+ name_directory.string = entity[i]->d_name;
+ name_directory.used = strnlen(name_directory.string, F_directory_name_max_d);
// There is no reason to include "." and ".." in the directory listing.
- if (!strncmp(entity[i]->d_name, "..", 3) || !strncmp(entity[i]->d_name, ".", 2)) {
+ if (!strncmp(name_directory.string, "..", 3) || !strncmp(name_directory.string, ".", 2)) {
f_memory_resize(1, 0, sizeof(char *), (void **) & entity[i]);
continue;
memset(&file_stat, 0, sizeof(struct stat));
- status = f_file_stat_at(parent_fd, entity[i]->d_name, dereference ? 0 : AT_SYMLINK_NOFOLLOW, &file_stat);
+ status = f_file_stat_at(parent_fd, name_directory, dereference ? 0 : AT_SYMLINK_NOFOLLOW, &file_stat);
if (F_status_is_error(status)) break;
mode = macro_f_file_type_get(file_stat.st_mode);
}
if (names->used == names->size) {
- macro_f_string_dynamics_t_resize(status, (*names), names->size + F_directory_default_allocation_step_d);
+ status = f_string_dynamics_increase_by(F_directory_default_allocation_step_d, names);
if (F_status_is_error(status)) break;
}
- macro_f_string_dynamic_t_clear(names->array[names->used])
- macro_f_string_dynamic_t_resize(status, names->array[names->used], size);
- if (F_status_is_error(status)) break;
-
- if (names->array[names->used].used > 0 && names->array[names->used].string[names->array[names->used].used - 1] != 0) {
- if (names->array[names->used].used == F_string_t_size_d) {
- status = F_status_set_error(F_string_too_large);
- break;
- }
-
- total = names->array[names->used].used + 1;
- if (total > names->array[names->used].size) {
- f_status_t status = F_none;
+ names->array[names->used].used = 0;
- macro_f_string_dynamics_t_resize(status, (*names), total);
- if (F_status_is_error(status)) break;
- }
-
- names->array[names->used].string[names->array[names->used].used] = 0;
- names->array[names->used].used = total;
- }
+ status = f_string_dynamic_increase_by(name_directory.used, &names->array[names->used]);
+ if (F_status_is_error(status)) break;
- memcpy(names->array[names->used].string, entity[i]->d_name, size);
- names->array[names->used].used = size;
- ++names->used;
+ memcpy(names->array[names->used].string, name_directory.string, name_directory.used);
+ names->array[names->used++].used = name_directory.used;
f_memory_resize(1, 0, sizeof(char *), (void **) & entity[i]);
} // for
f_memory_resize(1, 0, sizeof(struct dirent *), (void **) & entity);
if (F_status_is_error(status)) return status;
- if (!length) return F_data_not;
+ if (!length) return F_directory_empty;
return F_none;
}
#endif // !defined(_di_fl_directory_list_)
#if !defined(_di_fl_directory_path_push_) || !defined(_di_fl_directory_path_push_dynamic_)
- f_status_t private_fl_directory_path_push(const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination) {
+ f_status_t private_fl_directory_path_push(const f_string_static_t source, f_string_dynamic_t *destination) {
bool terminated_null = F_false;
bool separator_prepend = F_false;
f_array_length_t total = 0;
f_array_length_t start = 0;
- f_array_length_t length_truncated = length;
+ f_array_length_t length_truncated = source.used;
f_status_t status = F_none;
{
}
}
- for (i = length - 1; i > 0; --i) {
- if (!source[i]) continue;
+ for (i = source.used - 1; i > 0; --i) {
+
+ if (!source.string[i]) continue;
- status = f_utf_is_control(source + i, length - i);
+ status = f_utf_is_control(source.string + i, source.used - i);
if (status == F_true) continue;
if (F_status_is_error(status)) {
return status;
}
- if (source[i] == f_path_separator_s.string[0]) {
+ if (source.string[i] == f_path_separator_s.string[0]) {
if (!separator_prepend && destination->used > 0) {
--destination->used;
}
if (i - 1 > 0) {
for (j = i - 1; j > 0; --j) {
- if (!source[j]) continue;
+ if (!source.string[j]) continue;
- status = f_utf_is_control(source + j, length - j);
+ status = f_utf_is_control(source.string + j, source.used - j);
if (status == F_true) continue;
if (F_status_is_error(status)) {
return status;
}
- if (source[j] == f_path_separator_s.string[0]) {
+ if (source.string[j] == f_path_separator_s.string[0]) {
length_truncated = j + 1;
}
else {
break;
} // for
- if (!i && source[0] != f_path_separator_s.string[0]) {
+ if (!i && source.string[0] != f_path_separator_s.string[0]) {
separator_append = F_true;
++total;
}
for (i = 0; i < length_truncated; ++i) {
- if (!source[i]) continue;
+ if (!source.string[i]) continue;
- status = f_utf_is_control(source + i, length - i);
+ status = f_utf_is_control(source.string + i, source.used - i);
if (status == F_true) continue;
if (F_status_is_error(status)) {
start = i;
- if (source[0] == f_path_separator_s.string[0]) {
+ if (source.string[0] == f_path_separator_s.string[0]) {
if (i + 1 < length_truncated) {
for (j = i + 1; j < length_truncated; ++j) {
- if (!source[j]) continue;
+ if (!source.string[j]) continue;
- status = f_utf_is_control(source + j, length - j);
+ status = f_utf_is_control(source.string + j, source.used - j);
if (status == F_true) continue;
if (F_status_is_error(status)) {
return status;
}
- if (source[j] == f_path_separator_s.string[0]) {
+ if (source.string[j] == f_path_separator_s.string[0]) {
start = j;
}
else {
}
if (separator_prepend) {
- destination->string[destination->used] = f_path_separator_s.string[0];
- ++destination->used;
+ destination->string[destination->used++] = f_path_separator_s.string[0];
--total;
}
if (length_truncated - start > 0) {
- memcpy(destination->string + destination->used, source + start, length_truncated - start);
+ memcpy(destination->string + destination->used, source.string + start, length_truncated - start);
}
destination->used += total;
* F_string_too_large (with error bit) if appended string length is too large to store in the buffer.
*
* Errors (with error bit) from: f_file_stat_at().
+ * Errors (with error bit) from: f_string_dynamics_increase_by().
*
+ * @see f_file_stat_at()
+ * @see f_string_dynamics_increase_by()
* @see fl_directory_list()
*/
#if !defined(_di_fl_directory_list_)
- extern f_status_t private_fl_directory_list(const f_string_t path, int (*filter)(const struct dirent *), int (*sort)(const struct dirent **, const struct dirent **), const bool dereference, f_directory_listing_t *listing) F_attribute_visibility_internal_d;
+ extern f_status_t private_fl_directory_list(const f_string_static_t path, int (*filter)(const struct dirent *), int (*sort)(const struct dirent **, const struct dirent **), const bool dereference, f_directory_listing_t *listing) F_attribute_visibility_internal_d;
#endif // !defined(_di_fl_directory_list_)
/**
* @param source
* The path to append onto the destination.
* This need not be NULL terminated.
- * @param length
- * The length of the string.
- * Must not exceed length of source.
* @param destination
* The destination path to push the path part onto.
* Any terminating NULLs at the end of the destination string are removed before appending.
* @see fl_directory_path_push_dynamic()
*/
#if !defined(_di_fl_directory_path_push_) || !defined(_di_fl_directory_path_push_dynamic_)
- extern f_status_t private_fl_directory_path_push(const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination) F_attribute_visibility_internal_d;
+ extern f_status_t private_fl_directory_path_push(const f_string_static_t source, f_string_dynamic_t *destination) F_attribute_visibility_internal_d;
#endif // !defined(_di_fl_directory_path_push_) || !defined(_di_fl_directory_path_push_dynamic_)
#ifdef __cplusplus
build_sources_program
build_sources_program_shared
build_sources_program_static
-build_sources_headers directory.h
+build_sources_headers directory.h directory-common.h
build_sources_headers_shared
build_sources_headers_static
build_sources_script
#endif
#ifndef _di_fl_environment_load_name_
- f_status_t fl_environment_load_name(const f_string_t name, const f_array_length_t length, f_string_maps_t *environment) {
+ f_status_t fl_environment_load_name(const f_string_static_t name, f_string_maps_t *environment) {
#ifndef _di_level_2_parameter_checking_
- if (!name) return F_status_set_error(F_parameter);
if (!environment) return F_status_set_error(F_parameter);
#endif // _di_level_2_parameter_checking_
- if (!length) {
+ if (!name.used) {
return F_data_not;
}
environment->array[environment->used].name.used = 0;
environment->array[environment->used].value.used = 0;
- const f_string_static_t name_string = macro_f_string_static_t_initialize(name, length);
-
- status = f_string_dynamic_append_nulless(name_string, &environment->array[environment->used].name);
+ status = f_string_dynamic_append_nulless(name, &environment->array[environment->used].name);
if (F_status_is_error(status)) return status;
- status = f_environment_get_dynamic(name_string, &environment->array[environment->used].value);
-
- if (F_status_is_error(status)) {
- environment->array[environment->used].name.used = 0;
-
- return status;
- }
+ status = f_environment_get(name, &environment->array[environment->used].value);
- if (status == F_data_not || status == F_exist_not) {
+ if (F_status_is_error(status) || status == F_data_not || status == F_exist_not) {
environment->array[environment->used].name.used = 0;
return status;
#endif // _di_fl_environment_load_name_
#ifndef _di_fl_environment_load_names_
- f_status_t fl_environment_load_names(const f_string_dynamics_t names, f_string_maps_t *environment) {
+ f_status_t fl_environment_load_names(const f_string_statics_t names, f_string_maps_t *environment) {
#ifndef _di_level_2_parameter_checking_
if (!environment) return F_status_set_error(F_parameter);
#endif // _di_level_2_parameter_checking_
status = f_string_dynamic_append_nulless(names.array[i], &environment->array[environment->used].name);
if (F_status_is_error(status)) return status;
- status = f_environment_get_dynamic(names.array[i], &environment->array[environment->used].value);
+ status = f_environment_get(names.array[i], &environment->array[environment->used].value);
if (F_status_is_error(status)) {
environment->array[environment->used].name.used = 0;
#endif // _di_fl_environment_load_names_
#ifndef _di_fl_environment_path_explode_
- f_status_t fl_environment_path_explode(const f_string_t path, f_string_dynamics_t *paths) {
- #ifndef _di_level_0_parameter_checking_
- if (!paths) return F_status_set_error(F_parameter);
- if (paths->used > paths->size) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- f_status_t status = F_none;
- const f_array_length_t length = strnlen(path, PATH_MAX);
-
- if (!length) {
-
- // When PATH is "", this is actually a valid search path for PWD.
- // Append an equivalent representation of PWD (string used length is 0).
- macro_f_memory_structure_increment(status, (*paths), 1, F_memory_default_allocation_small_d, macro_f_string_dynamics_t_resize, F_array_too_large);
- if (F_status_is_error(status)) return status;
-
- macro_f_string_dynamic_t_clear(paths->array[paths->used]);
- ++paths->used;
-
- return F_none;
- }
-
- f_array_length_t i = length;
- f_array_length_t first = 0;
- f_array_length_t total = 0;
-
- for (i = 0; i <= length; ++i) {
-
- if (i == length || path[i] == f_path_separator_variable_s.string[0]) {
- macro_f_memory_structure_increment(status, (*paths), 1, F_memory_default_allocation_small_d, macro_f_string_dynamics_t_resize, F_array_too_large);
- if (F_status_is_error(status)) return status;
-
- if (!i) {
- macro_f_string_dynamic_t_clear(paths->array[paths->used]);
- ++paths->used;
-
- first = 1;
- continue;
- }
-
- f_string_dynamic_t part = f_string_dynamic_t_initialize;
-
- total = i - first;
-
- if (total > 0) {
- if (path[i - 1] == f_path_separator_s.string[0]) {
- macro_f_string_dynamic_t_clear(part)
- macro_f_string_dynamic_t_resize(status, part, total)
- if (F_status_is_error(status)) return status;
-
- part.used = total;
- }
- else {
- macro_f_string_dynamic_t_resize(status, part, (total + 1))
- if (F_status_is_error(status)) return status;
-
- part.string[total] = f_path_separator_s.string[0];
- part.used = total + 1;
- }
-
- memcpy(part.string, path + first, total);
- }
-
- paths->array[paths->used].string = part.string;
- paths->array[paths->used].used = part.used;
- paths->array[paths->used++].size = part.size;
-
- first = i + 1;
- }
- } // for
-
- return F_none;
- }
-#endif // _di_fl_environment_path_explode_
-
-#ifndef _di_fl_environment_path_explode_dynamic_
- f_status_t fl_environment_path_explode_dynamic(const f_string_static_t path, f_string_dynamics_t *paths) {
+ f_status_t fl_environment_path_explode(const f_string_static_t path, f_string_dynamics_t *paths) {
#ifndef _di_level_0_parameter_checking_
- if (path.used > path.size) return F_status_set_error(F_parameter);
if (!paths) return F_status_set_error(F_parameter);
- if (paths->used > paths->size) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
f_status_t status = F_none;
// When PATH is "", this is actually a valid search path for PWD.
// Therefore append an equivalent representation of PWD (string used length is 0).
- macro_f_memory_structure_increment(status, (*paths), 1, F_memory_default_allocation_small_d, macro_f_string_dynamics_t_resize, F_array_too_large);
+ status = f_string_dynamics_increase(F_memory_default_allocation_small_d, paths);
if (F_status_is_error(status)) return status;
- macro_f_string_dynamic_t_clear(paths->array[paths->used]);
- ++paths->used;
+ paths->array[paths->used++].used = 0;
return F_none;
}
f_array_length_t i = 0;
f_array_length_t j = 0;
+ f_array_length_t k = 0;
f_array_length_t first = 0;
f_array_length_t total = 0;
- f_string_dynamic_t part = f_string_dynamic_t_initialize;
-
- for (i = 0; i <= path.used; ++i) {
+ for (; i <= path.used; ++i) {
if (i == path.used || path.string[i] == f_path_separator_variable_s.string[0]) {
- macro_f_memory_structure_increment(status, (*paths), 1, F_memory_default_allocation_small_d, macro_f_string_dynamics_t_resize, F_array_too_large);
+ status = f_string_dynamics_increase(F_memory_default_allocation_small_d, paths);
if (F_status_is_error(status)) return status;
if (!i) {
- macro_f_string_dynamic_t_clear(paths->array[paths->used]);
- ++paths->used;
+ paths->array[paths->used++].used = 0;
first = 1;
+
continue;
}
total = i - first;
+ paths->array[paths->used].used = 0;
- if (total > 0) {
- macro_f_string_dynamic_t_clear(part)
- macro_f_string_dynamic_t_resize(status, part, total)
- if (F_status_is_error(status)) return status;
+ if (total) {
+ char buffer[total];
- for (j = 0; j < total; ++j) {
+ for (j = 0, k = 0; j < total; ++j) {
if (!path.string[first + j]) continue;
- part.string[part.used] = path.string[first + j];
- ++part.used;
+ buffer[k++] = path.string[first + j];
} // for
- if (part.string[part.used - 1] != f_path_separator_s.string[0]) {
- macro_f_string_dynamic_t_resize(status, part, (total + 1))
- if (F_status_is_error(status)) return status;
-
- part.string[part.used] = f_path_separator_s.string[0];
- ++part.used;
- }
- }
-
- paths->array[paths->used].string = part.string;
- paths->array[paths->used].used = part.used;
- paths->array[paths->used++].size = part.size;
+ buffer[k++] = f_path_separator_s.string[0];
- first = i + 1;
- }
- } // for
-
- return F_none;
- }
-#endif // _di_fl_environment_path_explode_dynamic_
-
-#ifndef _di_fl_environment_path_explode_reverse_
- f_status_t fl_environment_path_explode_reverse(const f_string_t path, f_string_dynamics_t *paths) {
- #ifndef _di_level_0_parameter_checking_
- if (!paths) return F_status_set_error(F_parameter);
- if (paths->used > paths->size) return F_status_set_error(F_parameter);
- #endif // _di_level_0_parameter_checking_
-
- f_status_t status = F_none;
- const f_array_length_t length = strnlen(path, PATH_MAX);
-
- if (!length) {
-
- // When PATH is "", this is actually a valid search path for PWD.
- // Therefore append an equivalent representation of PWD (string used length is 0).
- macro_f_memory_structure_increment(status, (*paths), 1, F_memory_default_allocation_small_d, macro_f_string_dynamics_t_resize, F_array_too_large);
- if (F_status_is_error(status)) return status;
-
- paths->array[paths->used].string = 0;
- paths->array[paths->used].used = 0;
- paths->array[paths->used++].size = 0;
-
- return F_none;
- }
-
- f_array_length_t i = length;
- f_array_length_t j = length;
- f_array_length_t last = length;
- f_array_length_t total = 0;
-
- f_string_dynamic_t part = f_string_dynamic_t_initialize;
-
- // @fixme i is unsgned, it will never be less than 0!
- for (; i > 0; --i, --j) {
-
- if (!j || path[j] == f_path_separator_variable_s.string[0]) {
- macro_f_memory_structure_increment(status, (*paths), 1, F_memory_default_allocation_small_d, macro_f_string_dynamics_t_resize, F_array_too_large);
- if (F_status_is_error(status)) return status;
-
- if (path[j] == f_path_separator_variable_s.string[0]) {
- total = last - i;
-
- if (total > 0) {
- if (path[j + total] == f_path_separator_s.string[0]) {
- macro_f_string_dynamic_t_clear(part)
- macro_f_string_dynamic_t_resize(status, part, total)
- if (F_status_is_error(status)) return status;
-
- part.used = total;
- }
- else {
- macro_f_string_dynamic_t_resize(status, part, (total + 1))
- if (F_status_is_error(status)) return status;
-
- part.string[total] = f_path_separator_s.string[0];
- part.used = total + 1;
- }
+ status = f_string_dynamic_increase_by(k, &paths->array[paths->used]);
+ if (F_status_is_error(status)) return status;
- memcpy(part.string, path + i, total);
- }
+ memcpy(paths->array[paths->used].string, buffer, k);
- last = j;
+ paths->array[paths->used++].used = k;
}
- else if (!j) {
-
- // when j = 0, the total is actually the entire length to max.
- total = last - j;
-
- if (total > 0) {
- if (path[last - 1] == f_path_separator_s.string[0]) {
- macro_f_string_dynamic_t_clear(part)
- macro_f_string_dynamic_t_resize(status, part, total)
- if (F_status_is_error(status)) return status;
-
- part.used = total;
- }
- else {
- macro_f_string_dynamic_t_resize(status, part, (total + 1))
- if (F_status_is_error(status)) return status;
-
- part.used = total + 1;
- part.string[total] = f_path_separator_s.string[0];
- }
-
- memcpy(part.string, path, total);
- }
+ else {
+ ++paths->used;
}
- paths->array[paths->used].string = part.string;
- paths->array[paths->used].used = part.used;
- paths->array[paths->used++].size = part.size;
+ first = i + 1;
}
} // for
return F_none;
}
-#endif // _di_fl_environment_path_explode_reverse_
+#endif // _di_fl_environment_path_explode_
-#ifndef _di_fl_environment_path_explode_reverse_dynamic_
- f_status_t fl_environment_path_explode_reverse_dynamic(const f_string_static_t path, f_string_dynamics_t *paths) {
+#ifndef _di_fl_environment_path_explode_reverse_
+ f_status_t fl_environment_path_explode_reverse(const f_string_static_t path, f_string_dynamics_t *paths) {
#ifndef _di_level_0_parameter_checking_
- if (path.used > path.size) return F_status_set_error(F_parameter);
if (!paths) return F_status_set_error(F_parameter);
- if (paths->used > paths->size) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
f_status_t status = F_none;
// When PATH is "", this is actually a valid search path for PWD.
// Therefore append an equivalent representation of PWD (string used length is 0).
- macro_f_memory_structure_increment(status, (*paths), 1, F_memory_default_allocation_small_d, macro_f_string_dynamics_t_resize, F_array_too_large);
+ status = f_string_dynamics_increase(F_memory_default_allocation_small_d, paths);
if (F_status_is_error(status)) return status;
- macro_f_string_dynamic_t_clear(paths->array[paths->used]);
- ++paths->used;
+ paths->array[paths->used++].used = 0;
return F_none;
}
- f_array_length_t i = path.used;
- f_array_length_t j = path.used;
+ f_array_length_t i = 0;
+ f_array_length_t j = 0;
f_array_length_t k = 0;
+ f_array_length_t r = path.used;
f_array_length_t last = path.used;
f_array_length_t total = 0;
- f_string_dynamic_t part = f_string_dynamic_t_initialize;
+ for (; i <= path.used; ++i, --r) {
- // @fixme i is unsgned, it will never be less than 0!
- for (; i > 0; --i, --j) {
-
- if (!j || path.string[j] == f_path_separator_variable_s.string[0]) {
- macro_f_memory_structure_increment(status, (*paths), 1, F_memory_default_allocation_small_d, macro_f_string_dynamics_t_resize, F_array_too_large);
+ if (i == path.used || path.string[r] == f_path_separator_variable_s.string[0]) {
+ status = f_string_dynamics_increase(F_memory_default_allocation_small_d, paths);
if (F_status_is_error(status)) return status;
- if (path.string[j] == f_path_separator_variable_s.string[0]) {
- total = last - i;
+ if (!i) {
+ paths->array[paths->used++].used = 0;
- if (total > 0) {
- macro_f_string_dynamic_t_clear(part)
- macro_f_string_dynamic_t_resize(status, part, total)
- if (F_status_is_error(status)) return status;
+ last = r - 1;
- for (k = 0; k < total; ++k) {
+ continue;
+ }
- if (!path.string[i + k]) continue;
+ total = last - r;
+ paths->array[paths->used].used = 0;
- part.string[part.used] = path.string[i + k];
- ++part.used;
- } // for
+ if (total) {
+ char buffer[total];
- if (part.string[part.used - 1] != f_path_separator_s.string[0]) {
- macro_f_string_dynamic_t_resize(status, part, (total + 1))
- if (F_status_is_error(status)) return status;
+ for (j = 0, k = 0; j < total; ++j) {
- part.string[part.used] = f_path_separator_s.string[0];
- ++part.used;
- }
- }
+ if (!path.string[r + j + 1]) continue;
- last = j;
- }
- else if (!j) {
+ buffer[k++] = path.string[r + j + 1];
+ } // for
- // when j = 0, the total is actually the entire length to max.
- total = last - j;
+ buffer[k++] = f_path_separator_s.string[0];
- macro_f_string_dynamic_t_clear(part)
- macro_f_string_dynamic_t_resize(status, part, total)
+ status = f_string_dynamic_increase_by(k, &paths->array[paths->used]);
if (F_status_is_error(status)) return status;
- for (k = 0; k < total; ++k) {
- if (!path.string[i + k]) continue;
-
- part.string[part.used] = path.string[i + k];
- ++part.used;
- } // for
-
- if (part.string[part.used - 1] != f_path_separator_s.string[0]) {
- macro_f_string_dynamic_t_resize(status, part, (total + 1))
- if (F_status_is_error(status)) return status;
+ memcpy(paths->array[paths->used].string, buffer, k);
- part.string[part.used - 1] = f_path_separator_s.string[0];
- ++part.used;
- }
+ paths->array[paths->used++].used = k;
+ }
+ else {
+ ++paths->used;
}
- paths->array[paths->used].string = part.string;
- paths->array[paths->used].used = part.used;
- paths->array[paths->used++].size = part.size;
+ last = r - 1;
}
} // for
return F_none;
}
-#endif // _di_fl_environment_path_explode_reverse_dynamic_
+#endif // _di_fl_environment_path_explode_reverse_
#ifdef __cplusplus
} // extern "C"
*
* @param name
* A string representing the environment variable name.
- * @param length
- * The length of the environment variable name string.
* @param environment
* An array of maps generated from the loaded environment variable names.
*
* @return
* F_none on success.
- * F_data_not if name length is 0.
+ * F_data_not if names.used is 0.
* F_exist_not if name does not exist.
*
- * Errors (with error bit) from: f_environment_get_dynamic().
+ * Errors (with error bit) from: f_environment_get().
* Errors (with error bit) from: f_string_dynamic_append_nulless().
* Errors (with error bit) from: f_string_maps_increase_by().
*
- * @see f_environment_get_dynamic()
+ * @see f_environment_get()
* @see f_string_dynamic_append_nulless()
* @see f_string_maps_increase_by()
*/
#ifndef _di_fl_environment_load_name_
- extern f_status_t fl_environment_load_name(const f_string_t name, const f_array_length_t length, f_string_maps_t *environment);
+ extern f_status_t fl_environment_load_name(const f_string_static_t name, f_string_maps_t *environment);
#endif // _di_fl_environment_load_name_
/**
* F_none on success.
* F_data_not if names.used is 0.
*
- * Errors (with error bit) from: f_environment_get_dynamic().
+ * Errors (with error bit) from: f_environment_get().
* Errors (with error bit) from: f_string_dynamic_append_nulless().
* Errors (with error bit) from: f_string_maps_increase_by().
*
- * @see f_environment_get_dynamic()
+ * @see f_environment_get()
* @see f_string_dynamic_append_nulless()
* @see f_string_maps_increase_by()
*/
#ifndef _di_fl_environment_load_names_
- extern f_status_t fl_environment_load_names(const f_string_dynamics_t names, f_string_maps_t *environment);
+ extern f_status_t fl_environment_load_names(const f_string_statics_t names, f_string_maps_t *environment);
#endif // _di_fl_environment_load_names_
/**
* @param path
* The string to process that is expected to follow the traditional Linux standard PATH environment variable.
* Each seperate path is separated by a single ':'.
- * Must not contain NULLs except for the terminating NULL.
- * Must be NULL terminated.
- * @param paths
- * All of the strings exploded from PATH.
- * Each exploded path, when not empty, is guaranteed to have a trailing '/'.
- * Each exploded path is not NULL terminated.
- *
- * @return
- * F_none on success.
- *
- * F_array_too_large (with error bit) if paths array is too large for further addressing.
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
- */
-#ifndef _di_fl_environment_path_explode_
- extern f_status_t fl_environment_path_explode(const f_string_t path, f_string_dynamics_t *paths);
-#endif // _di_fl_environment_path_explode_
-
-/**
- * Separate a given PATH-style string into multiple separate paths.
- *
- * @param path
- * The string to process that is expected to follow the traditional Linux standard PATH environment variable.
- * Each seperate path is separated by a single ':'.
* Need not be NULL terminated.
* NULLs are ignored and are not copied into the exploded paths.
* @param paths
* F_array_too_large (with error bit) if paths array is too large for further addressing.
* F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
- */
-#ifndef _di_fl_environment_path_explode_dynamic_
- extern f_status_t fl_environment_path_explode_dynamic(const f_string_static_t path, f_string_dynamics_t *paths);
-#endif // _di_fl_environment_path_explode_dynamic_
-
-/**
- * Separate a given PATH-style string into multiple separate paths.
- *
- * The paths are created in reverse order.
- *
- * @param path
- * The string to process that is expected to follow the traditional Linux standard PATH environment variable.
- * Each seperate path is separated by a single ':'.
- * Must not contain NULLs except for the terminating NULL.
- * Must be NULL terminated.
- * @param paths
- * All of the strings exploded from PATH.
- * Each exploded path, when not empty, is guaranteed to have a trailing '/'.
- * Each exploded path is not NULL terminated.
*
- * @return
- * F_none on success.
+ * Errors (with error bit) from: f_string_dynamics_increase().
+ * Errors (with error bit) from: f_string_dynamics_increase_by().
*
- * F_array_too_large (with error bit) if paths array is too large for further addressing.
- * F_memory_not (with error bit) on out of memory.
- * F_parameter (with error bit) if a parameter is invalid.
+ * @see f_string_dynamics_increase()
+ * @see f_string_dynamics_increase_by()
*/
-#ifndef _di_fl_environment_path_explode_reverse_
- extern f_status_t fl_environment_path_explode_reverse(const f_string_t path, f_string_dynamics_t *paths);
-#endif // _di_fl_environment_path_explode_reverse_
+#ifndef _di_fl_environment_path_explode_
+ extern f_status_t fl_environment_path_explode(const f_string_static_t path, f_string_dynamics_t *paths);
+#endif // _di_fl_environment_path_explode_
/**
* Separate a given PATH-style string into multiple separate paths.
* F_array_too_large (with error bit) if paths array is too large for further addressing.
* F_memory_not (with error bit) on out of memory.
* F_parameter (with error bit) if a parameter is invalid.
+ *
+ * Errors (with error bit) from: f_string_dynamics_increase().
+ * Errors (with error bit) from: f_string_dynamics_increase_by().
+ *
+ * @see f_string_dynamics_increase()
+ * @see f_string_dynamics_increase_by()
*/
-#ifndef _di_fl_environment_path_explode_reverse_dynamic_
- extern f_status_t fl_environment_path_explode_reverse_dynamic(const f_string_static_t path, f_string_dynamics_t *paths);
-#endif // _di_fl_environment_path_explode_reverse_dynamic_
+#ifndef _di_fl_environment_path_explode_reverse_
+ extern f_status_t fl_environment_path_explode_reverse(const f_string_static_t path, f_string_dynamics_t *paths);
+#endif // _di_fl_environment_path_explode_reverse_
#ifdef __cplusplus
} // extern "C"
#endif
#ifndef _di_fl_print_t_
- const f_string_static_t fl_print_debug_s = macro_f_string_static_t_initialize2(FL_print_debug_s, 0, FL_print_debug_s_length);
- const f_string_static_t fl_print_error_s = macro_f_string_static_t_initialize2(FL_print_error_s, 0, FL_print_error_s_length);
- const f_string_static_t fl_print_warning_s = macro_f_string_static_t_initialize2(FL_print_warning_s, 0, FL_print_warning_s_length);
+ const f_string_static_t fl_print_debug_s = macro_f_string_static_t_initialize(FL_print_debug_s, 0, FL_print_debug_s_length);
+ const f_string_static_t fl_print_error_s = macro_f_string_static_t_initialize(FL_print_error_s, 0, FL_print_error_s_length);
+ const f_string_static_t fl_print_warning_s = macro_f_string_static_t_initialize(FL_print_warning_s, 0, FL_print_warning_s_length);
#endif // _di_fl_print_t_
#ifdef __cplusplus
f_status_t status = F_none;
if (control_group.path.used) {
- status = f_directory_exists(control_group.path.string);
+ status = f_directory_exists(control_group.path);
if (F_status_is_error(status)) return status;
if (status == F_false) {
}
}
- f_array_length_t length = 0;
+ f_string_static_t path = f_string_static_t_initialize;
for (f_array_length_t i = 0; i < control_group.groups.used; ++i) {
if (!control_group.groups.array[i].used) continue;
- length = control_group.path.used + control_group.groups.array[i].used;
+ path.used = control_group.path.used + control_group.groups.array[i].used;
- char path[length + 1];
+ char path_string[path.used + 1];
+ path.string = path_string;
if (control_group.path.used) {
- memcpy(path, control_group.path.string, control_group.path.used);
+ memcpy(path.string, control_group.path.string, control_group.path.used);
}
- memcpy(path + control_group.path.used, control_group.groups.array[i].string, control_group.groups.array[i].used);
- path[length] = 0;
+ memcpy(path.string + control_group.path.used, control_group.groups.array[i].string, control_group.groups.array[i].used);
+ path.string[path.used] = 0;
- status = fl_directory_create(path, length, F_file_mode_all_rwx_d);
+ status = fl_directory_create(path, F_file_mode_all_rwx_d);
if (F_status_is_error(status)) break;
} // for
- if (F_status_is_error(status)) {
- return status;
- }
+ if (F_status_is_error(status)) return status;
return F_none;
}
#endif
#ifndef _di_fll_error_file_type_
- const f_string_static_t fll_error_file_type_directory_s = macro_f_string_static_t_initialize2(FLL_error_file_type_directory_s, 0, FLL_error_file_type_directory_s_length);
- const f_string_static_t fll_error_file_type_file_s = macro_f_string_static_t_initialize2(FLL_error_file_type_file_s, 0, FLL_error_file_type_file_s_length);
- const f_string_static_t fll_error_file_type_path_s = macro_f_string_static_t_initialize2(FLL_error_file_type_path_s, 0, FLL_error_file_type_path_s_length);
- const f_string_static_t fll_error_file_type_pipe_s = macro_f_string_static_t_initialize2(FLL_error_file_type_pipe_s, 0, FLL_error_file_type_pipe_s_length);
+ const f_string_static_t fll_error_file_type_directory_s = macro_f_string_static_t_initialize(FLL_error_file_type_directory_s, 0, FLL_error_file_type_directory_s_length);
+ const f_string_static_t fll_error_file_type_file_s = macro_f_string_static_t_initialize(FLL_error_file_type_file_s, 0, FLL_error_file_type_file_s_length);
+ const f_string_static_t fll_error_file_type_path_s = macro_f_string_static_t_initialize(FLL_error_file_type_path_s, 0, FLL_error_file_type_path_s_length);
+ const f_string_static_t fll_error_file_type_pipe_s = macro_f_string_static_t_initialize(FLL_error_file_type_pipe_s, 0, FLL_error_file_type_pipe_s_length);
+ const f_string_static_t fll_error_file_type_socket_s = macro_f_string_static_t_initialize(FLL_error_file_type_socket_s, 0, FLL_error_file_type_socket_s_length);
#endif // _di_fll_error_file_type_
#ifdef __cplusplus
* - directory: Directory error.
* - path: Path error.
* - pipe: Pipe error.
+ * - socket: Socket error.
*/
#ifndef _di_fll_error_file_type_
enum {
fll_error_file_type_directory_e,
fll_error_file_type_path_e,
fll_error_file_type_pipe_e,
+ fll_error_file_type_socket_e,
};
#define FLL_error_file_type_directory_s "directory"
#define FLL_error_file_type_file_s "file"
#define FLL_error_file_type_path_s "path"
#define FLL_error_file_type_pipe_s "pipe"
+ #define FLL_error_file_type_socket_s "socket"
#define FLL_error_file_type_directory_s_length 9
#define FLL_error_file_type_file_s_length 4
#define FLL_error_file_type_path_s_length 4
#define FLL_error_file_type_pipe_s_length 4
+ #define FLL_error_file_type_socket_s_length 6
extern const f_string_static_t fll_error_file_type_directory_s;
extern const f_string_static_t fll_error_file_type_file_s;
extern const f_string_static_t fll_error_file_type_path_s;
extern const f_string_static_t fll_error_file_type_pipe_s;
+ extern const f_string_static_t fll_error_file_type_socket_s;
#endif // _di_fll_error_file_type_
#ifdef __cplusplus
#endif // _di_fll_error_print_
#ifndef _di_fll_error_file_print_
- f_status_t fll_error_file_print(const fl_print_t print, const f_status_t status, const f_string_t function, const bool fallback, const f_string_t name, const f_string_t operation, const uint8_t type) {
+ f_status_t fll_error_file_print(const fl_print_t print, const f_status_t status, const f_string_t function, const bool fallback, const f_string_static_t name, const f_string_static_t operation, const uint8_t type) {
- const char *type_name = FLL_error_file_type_file_s;
+ f_string_static_t type_name = fll_error_file_type_file_s;
if (type == fll_error_file_type_directory_e) {
- type_name = FLL_error_file_type_directory_s;
+ type_name = fll_error_file_type_directory_s;
}
else if (type == fll_error_file_type_path_e) {
- type_name = FLL_error_file_type_path_s;
+ type_name = fll_error_file_type_path_s;
}
else if (type == fll_error_file_type_pipe_e) {
- type_name = FLL_error_file_type_pipe_s;
+ type_name = fll_error_file_type_pipe_s;
+ }
+ else if (type == fll_error_file_type_socket_e) {
+ type_name = fll_error_file_type_socket_s;
}
if (status == F_access_denied) {
if (print.verbosity != f_console_verbosity_quiet_e) {
flockfile(print.to.stream);
- fl_print_format("%q%[%QAccess denied while trying to %S %S '%]", print.to.stream, f_string_eol_s, print.context, print.prefix, operation, type_name, print.context);
- fl_print_format("%[%S%]", print.to.stream, print.notable, name, print.notable);
+ fl_print_format("%q%[%QAccess denied while trying to %Q %Q '%]", print.to.stream, f_string_eol_s, print.context, print.prefix, operation, type_name, print.context);
+ fl_print_format("%[%Q%]", print.to.stream, print.notable, name, print.notable);
fl_print_format("%['.%]%q", print.to.stream, print.context, print.context, f_string_eol_s);
funlockfile(print.to.stream);
if (print.verbosity != f_console_verbosity_quiet_e) {
flockfile(print.to.stream);
- fl_print_format("%q%[%QCurrent user is not allowed to use the given group while trying to %S %S '%]", print.to.stream, f_string_eol_s, print.context, print.prefix, operation, type_name, print.context);
- fl_print_format("%[%S%]", print.to.stream, print.notable, name, print.notable);
+ fl_print_format("%q%[%QCurrent user is not allowed to use the given group while trying to %Q %Q '%]", print.to.stream, f_string_eol_s, print.context, print.prefix, operation, type_name, print.context);
+ fl_print_format("%[%Q%]", print.to.stream, print.notable, name, print.notable);
fl_print_format("%['.%]%q", print.to.stream, print.context, print.context, f_string_eol_s);
funlockfile(print.to.stream);
if (print.verbosity != f_console_verbosity_quiet_e) {
flockfile(print.to.stream);
- fl_print_format("%q%[%QCurrent user is not allowed to use the given owner while trying to %S %S '%]", print.to.stream, f_string_eol_s, print.context, print.prefix, operation, type_name, print.context);
- fl_print_format("%[%S%]", print.to.stream, print.notable, name, print.notable);
+ fl_print_format("%q%[%QCurrent user is not allowed to use the given owner while trying to %Q %Q '%]", print.to.stream, f_string_eol_s, print.context, print.prefix, operation, type_name, print.context);
+ fl_print_format("%[%Q%]", print.to.stream, print.notable, name, print.notable);
fl_print_format("%['.%]%q", print.to.stream, print.context, print.context, f_string_eol_s);
funlockfile(print.to.stream);
if (print.verbosity != f_console_verbosity_quiet_e) {
flockfile(print.to.stream);
- fl_print_format("%q%[%QInvalid directory while trying to %S %S '%]", print.to.stream, f_string_eol_s, print.context, print.prefix, operation, type_name, print.context);
- fl_print_format("%[%S%]", print.to.stream, print.notable, name, print.notable);
+ fl_print_format("%q%[%QInvalid directory while trying to %Q %Q '%]", print.to.stream, f_string_eol_s, print.context, print.prefix, operation, type_name, print.context);
+ fl_print_format("%[%Q%]", print.to.stream, print.notable, name, print.notable);
fl_print_format("%['.%]%q", print.to.stream, print.context, print.context, f_string_eol_s);
funlockfile(print.to.stream);
if (print.verbosity != f_console_verbosity_quiet_e) {
flockfile(print.to.stream);
- fl_print_format("%q%[%QUnable to %S %S '%]", print.to.stream, f_string_eol_s, print.context, print.prefix, operation, type_name, print.context);
- fl_print_format("%[%S%]", print.to.stream, print.notable, name, print.notable);
+ fl_print_format("%q%[%QUnable to %Q %Q '%]", print.to.stream, f_string_eol_s, print.context, print.prefix, operation, type_name, print.context);
+ fl_print_format("%[%Q%]", print.to.stream, print.notable, name, print.notable);
fl_print_format("%[', not empty.%]%q", print.to.stream, print.context, print.context, f_string_eol_s);
funlockfile(print.to.stream);
if (print.verbosity != f_console_verbosity_quiet_e) {
flockfile(print.to.stream);
- fl_print_format("%q%[%QFailed to %S %S '%]", print.to.stream, f_string_eol_s, print.context, print.prefix, operation, type_name, print.context);
- fl_print_format("%[%S%]", print.to.stream, print.notable, name, print.notable);
+ fl_print_format("%q%[%QFailed to %Q %Q '%]", print.to.stream, f_string_eol_s, print.context, print.prefix, operation, type_name, print.context);
+ fl_print_format("%[%Q%]", print.to.stream, print.notable, name, print.notable);
fl_print_format("%['.%]%q", print.to.stream, print.context, print.context, f_string_eol_s);
funlockfile(print.to.stream);
if (print.verbosity != f_console_verbosity_quiet_e) {
flockfile(print.to.stream);
- fl_print_format("%q%[%QUnable to %S %S '%]", print.to.stream, f_string_eol_s, print.context, print.prefix, operation, type_name, print.context);
- fl_print_format("%[%S%]", print.to.stream, print.notable, name, print.notable);
+ fl_print_format("%q%[%QUnable to %Q %Q '%]", print.to.stream, f_string_eol_s, print.context, print.prefix, operation, type_name, print.context);
+ fl_print_format("%[%Q%]", print.to.stream, print.notable, name, print.notable);
fl_print_format("%[', failed to close.%]%q", print.to.stream, print.context, print.context, f_string_eol_s);
funlockfile(print.to.stream);
if (print.verbosity != f_console_verbosity_quiet_e) {
flockfile(print.to.stream);
- fl_print_format("%q%[%QUnable to %S %S '%]", print.to.stream, f_string_eol_s, print.context, print.prefix, operation, type_name, print.context);
- fl_print_format("%[%S%]", print.to.stream, print.notable, name, print.notable);
+ fl_print_format("%q%[%QUnable to %Q %Q '%]", print.to.stream, f_string_eol_s, print.context, print.prefix, operation, type_name, print.context);
+ fl_print_format("%[%Q%]", print.to.stream, print.notable, name, print.notable);
fl_print_format("%[', is closed.%]%q", print.to.stream, print.context, print.context, f_string_eol_s);
funlockfile(print.to.stream);
if (print.verbosity != f_console_verbosity_quiet_e) {
flockfile(print.to.stream);
- fl_print_format("%q%[%QFile descriptor error while trying to %S %S '%]", print.to.stream, f_string_eol_s, print.context, print.prefix, operation, type_name, print.context);
- fl_print_format("%[%S%]", print.to.stream, print.notable, name, print.notable);
+ fl_print_format("%q%[%QFile descriptor error while trying to %Q %Q '%]", print.to.stream, f_string_eol_s, print.context, print.prefix, operation, type_name, print.context);
+ fl_print_format("%[%Q%]", print.to.stream, print.notable, name, print.notable);
fl_print_format("%['.%]%q", print.to.stream, print.context, print.context, f_string_eol_s);
funlockfile(print.to.stream);
if (print.verbosity != f_console_verbosity_quiet_e) {
flockfile(print.to.stream);
- fl_print_format("%q%[%QMax file descriptors reached while trying to %S %S '%]", print.to.stream, f_string_eol_s, print.context, print.prefix, operation, type_name, print.context);
- fl_print_format("%[%S%]", print.to.stream, print.notable, name, print.notable);
+ fl_print_format("%q%[%QMax file descriptors reached while trying to %Q %Q '%]", print.to.stream, f_string_eol_s, print.context, print.prefix, operation, type_name, print.context);
+ fl_print_format("%[%Q%]", print.to.stream, print.notable, name, print.notable);
fl_print_format("%['.%]%q", print.to.stream, print.context, print.context, f_string_eol_s);
funlockfile(print.to.stream);
if (print.verbosity != f_console_verbosity_quiet_e) {
flockfile(print.to.stream);
- fl_print_format("%q%[%QInvalid file descriptor while trying to %S %S '%]", print.to.stream, f_string_eol_s, print.context, print.prefix, operation, type_name, print.context);
- fl_print_format("%[%S%]", print.to.stream, print.notable, name, print.notable);
+ fl_print_format("%q%[%QInvalid file descriptor while trying to %Q %Q '%]", print.to.stream, f_string_eol_s, print.context, print.prefix, operation, type_name, print.context);
+ fl_print_format("%[%Q%]", print.to.stream, print.notable, name, print.notable);
fl_print_format("%['.%]%q", print.to.stream, print.context, print.context, f_string_eol_s);
funlockfile(print.to.stream);
if (print.verbosity != f_console_verbosity_quiet_e) {
flockfile(print.to.stream);
- fl_print_format("%q%[%QUnable to %S %S '%]", print.to.stream, f_string_eol_s, print.context, print.prefix, operation, type_name, print.context);
- fl_print_format("%[%S%]", print.to.stream, print.notable, name, print.notable);
- fl_print_format("%[', %s is empty.%]%q", print.to.stream, print.context, type_name, print.context, f_string_eol_s);
+ fl_print_format("%q%[%QUnable to %Q %Q '%]", print.to.stream, f_string_eol_s, print.context, print.prefix, operation, type_name, print.context);
+ fl_print_format("%[%Q%]", print.to.stream, print.notable, name, print.notable);
+ fl_print_format("%[', %Q is empty.%]%q", print.to.stream, print.context, type_name, print.context, f_string_eol_s);
funlockfile(print.to.stream);
}
if (print.verbosity != f_console_verbosity_quiet_e) {
flockfile(print.to.stream);
- fl_print_format("%q%[%QUnable to %S %S '%]", print.to.stream, f_string_eol_s, print.context, print.prefix, operation, type_name, print.context);
- fl_print_format("%[%S%]", print.to.stream, print.notable, name, print.notable);
+ fl_print_format("%q%[%QUnable to %Q %Q '%]", print.to.stream, f_string_eol_s, print.context, print.prefix, operation, type_name, print.context);
+ fl_print_format("%[%Q%]", print.to.stream, print.notable, name, print.notable);
fl_print_format("%[', flush failed.%]%q", print.to.stream, print.context, print.context, f_string_eol_s);
funlockfile(print.to.stream);
if (print.verbosity != f_console_verbosity_quiet_e) {
flockfile(print.to.stream);
- fl_print_format("%q%[%QUnable to %S %S '%]", print.to.stream, f_string_eol_s, print.context, print.prefix, operation, type_name, print.context);
- fl_print_format("%[%S%]", print.to.stream, print.notable, name, print.notable);
+ fl_print_format("%q%[%QUnable to %Q %Q '%]", print.to.stream, f_string_eol_s, print.context, print.prefix, operation, type_name, print.context);
+ fl_print_format("%[%Q%]", print.to.stream, print.notable, name, print.notable);
fl_print_format("%[', found.%]%q", print.to.stream, print.context, print.context, f_string_eol_s);
funlockfile(print.to.stream);
if (print.verbosity != f_console_verbosity_quiet_e) {
flockfile(print.to.stream);
- fl_print_format("%q%[%QUnable to %S %S '%]", print.to.stream, f_string_eol_s, print.context, print.prefix, operation, type_name, print.context);
- fl_print_format("%[%S%]", print.to.stream, print.notable, name, print.notable);
+ fl_print_format("%q%[%QUnable to %Q %Q '%]", print.to.stream, f_string_eol_s, print.context, print.prefix, operation, type_name, print.context);
+ fl_print_format("%[%Q%]", print.to.stream, print.notable, name, print.notable);
fl_print_format("%[', could not find.%]%q", print.to.stream, print.context, print.context, f_string_eol_s);
funlockfile(print.to.stream);
if (print.verbosity != f_console_verbosity_quiet_e) {
flockfile(print.to.stream);
- fl_print_format("%q%[%QUnable to %S %S '%]", print.to.stream, f_string_eol_s, print.context, print.prefix, operation, type_name, print.context);
- fl_print_format("%[%S%]", print.to.stream, print.notable, name, print.notable);
+ fl_print_format("%q%[%QUnable to %Q %Q '%]", print.to.stream, f_string_eol_s, print.context, print.prefix, operation, type_name, print.context);
+ fl_print_format("%[%Q%]", print.to.stream, print.notable, name, print.notable);
fl_print_format("%[', already open.%]%q", print.to.stream, print.context, print.context, f_string_eol_s);
funlockfile(print.to.stream);
if (print.verbosity != f_console_verbosity_quiet_e) {
flockfile(print.to.stream);
- fl_print_format("%q%[%QMax open files reached while trying to %S %S '%]", print.to.stream, f_string_eol_s, print.context, print.prefix, operation, type_name, print.context);
- fl_print_format("%[%S%]", print.to.stream, print.notable, name, print.notable);
+ fl_print_format("%q%[%QMax open files reached while trying to %Q %Q '%]", print.to.stream, f_string_eol_s, print.context, print.prefix, operation, type_name, print.context);
+ fl_print_format("%[%Q%]", print.to.stream, print.notable, name, print.notable);
fl_print_format("%['.%]%q", print.to.stream, print.context, print.context, f_string_eol_s);
funlockfile(print.to.stream);
if (print.verbosity != f_console_verbosity_quiet_e) {
flockfile(print.to.stream);
- fl_print_format("%q%[%QOverflow while trying to %S %S '%]", print.to.stream, f_string_eol_s, print.context, print.prefix, operation, type_name, print.context);
- fl_print_format("%[%S%]", print.to.stream, print.notable, name, print.notable);
+ fl_print_format("%q%[%QOverflow while trying to %Q %Q '%]", print.to.stream, f_string_eol_s, print.context, print.prefix, operation, type_name, print.context);
+ fl_print_format("%[%Q%]", print.to.stream, print.notable, name, print.notable);
fl_print_format("%['.%]%q", print.to.stream, print.context, print.context, f_string_eol_s);
funlockfile(print.to.stream);
if (print.verbosity != f_console_verbosity_quiet_e) {
flockfile(print.to.stream);
- fl_print_format("%q%[%QUnable to %S %S '%]", print.to.stream, f_string_eol_s, print.context, print.prefix, operation, type_name, print.context);
- fl_print_format("%[%S%]", print.to.stream, print.notable, name, print.notable);
+ fl_print_format("%q%[%QUnable to %Q %Q '%]", print.to.stream, f_string_eol_s, print.context, print.prefix, operation, type_name, print.context);
+ fl_print_format("%[%Q%]", print.to.stream, print.notable, name, print.notable);
fl_print_format("%[', purge failed.%]%q", print.to.stream, print.context, print.context, f_string_eol_s);
funlockfile(print.to.stream);
if (print.verbosity != f_console_verbosity_quiet_e) {
flockfile(print.to.stream);
- fl_print_format("%q%[%QRead failed while trying to %S %S '%]", print.to.stream, f_string_eol_s, print.context, print.prefix, operation, type_name, print.context);
- fl_print_format("%[%S%]", print.to.stream, print.notable, name, print.notable);
+ fl_print_format("%q%[%QRead failed while trying to %Q %Q '%]", print.to.stream, f_string_eol_s, print.context, print.prefix, operation, type_name, print.context);
+ fl_print_format("%[%Q%]", print.to.stream, print.notable, name, print.notable);
fl_print_format("%['.%]%q", print.to.stream, print.context, print.context, f_string_eol_s);
funlockfile(print.to.stream);
if (print.verbosity != f_console_verbosity_quiet_e) {
flockfile(print.to.stream);
- fl_print_format("%q%[%QSeek failed while trying to %S %S '%]", print.to.stream, f_string_eol_s, print.context, print.prefix, operation, type_name, print.context);
- fl_print_format("%[%S%]", print.to.stream, print.notable, name, print.notable);
+ fl_print_format("%q%[%QSeek failed while trying to %Q %Q '%]", print.to.stream, f_string_eol_s, print.context, print.prefix, operation, type_name, print.context);
+ fl_print_format("%[%Q%]", print.to.stream, print.notable, name, print.notable);
fl_print_format("%['.%]%q", print.to.stream, print.context, print.context, f_string_eol_s);
funlockfile(print.to.stream);
if (print.verbosity != f_console_verbosity_quiet_e) {
flockfile(print.to.stream);
- fl_print_format("%q%[%QStat failed while trying to %S %S '%]", print.to.stream, f_string_eol_s, print.context, print.prefix, operation, type_name, print.context);
- fl_print_format("%[%S%]", print.to.stream, print.notable, name, print.notable);
+ fl_print_format("%q%[%QStat failed while trying to %Q %Q '%]", print.to.stream, f_string_eol_s, print.context, print.prefix, operation, type_name, print.context);
+ fl_print_format("%[%Q%]", print.to.stream, print.notable, name, print.notable);
fl_print_format("%['.%]%q", print.to.stream, print.context, print.context, f_string_eol_s);
funlockfile(print.to.stream);
if (print.verbosity != f_console_verbosity_quiet_e) {
flockfile(print.to.stream);
- fl_print_format("%q%[%QSynchronize failed while trying to %S %S '%]", print.to.stream, f_string_eol_s, print.context, print.prefix, operation, type_name, print.context);
- fl_print_format("%[%S%]", print.to.stream, print.notable, name, print.notable);
+ fl_print_format("%q%[%QSynchronize failed while trying to %Q %Q '%]", print.to.stream, f_string_eol_s, print.context, print.prefix, operation, type_name, print.context);
+ fl_print_format("%[%Q%]", print.to.stream, print.notable, name, print.notable);
fl_print_format("%['.%]%q", print.to.stream, print.context, print.context, f_string_eol_s);
funlockfile(print.to.stream);
if (print.verbosity != f_console_verbosity_quiet_e) {
flockfile(print.to.stream);
- fl_print_format("%q%[%QFailed to %S %S, the path '%]", print.to.stream, f_string_eol_s, print.context, print.prefix, operation, type_name, print.context);
- fl_print_format("%[%S%]", print.to.stream, print.notable, name, print.notable);
+ fl_print_format("%q%[%QFailed to %Q %Q, the path '%]", print.to.stream, f_string_eol_s, print.context, print.prefix, operation, type_name, print.context);
+ fl_print_format("%[%Q%]", print.to.stream, print.notable, name, print.notable);
fl_print_format("%[' is an unknown file type.%]%q", print.to.stream, print.context, print.context, f_string_eol_s);
funlockfile(print.to.stream);
if (print.verbosity != f_console_verbosity_quiet_e) {
flockfile(print.to.stream);
- fl_print_format("%q%[%QUTF failure while trying to %S %S '%]", print.to.stream, f_string_eol_s, print.context, print.prefix, operation, type_name, print.context);
- fl_print_format("%[%S%]", print.to.stream, print.notable, name, print.notable);
+ fl_print_format("%q%[%QUTF failure while trying to %Q %Q '%]", print.to.stream, f_string_eol_s, print.context, print.prefix, operation, type_name, print.context);
+ fl_print_format("%[%Q%]", print.to.stream, print.notable, name, print.notable);
fl_print_format("%['.%]%q", print.to.stream, print.context, print.context, f_string_eol_s);
funlockfile(print.to.stream);
if (print.verbosity != f_console_verbosity_quiet_e) {
flockfile(print.to.stream);
- fl_print_format("%q%[%QInvalid UTF while trying to %S %S '%]", print.to.stream, f_string_eol_s, print.context, print.prefix, operation, type_name, print.context);
- fl_print_format("%[%S%]", print.to.stream, print.notable, name, print.notable);
+ fl_print_format("%q%[%QInvalid UTF while trying to %Q %Q '%]", print.to.stream, f_string_eol_s, print.context, print.prefix, operation, type_name, print.context);
+ fl_print_format("%[%Q%]", print.to.stream, print.notable, name, print.notable);
fl_print_format("%['.%]%q", print.to.stream, print.context, print.context, f_string_eol_s);
funlockfile(print.to.stream);
if (print.verbosity != f_console_verbosity_quiet_e) {
flockfile(print.to.stream);
- fl_print_format("%q%[%QUnderflow while trying to %S %S '%]", print.to.stream, f_string_eol_s, print.context, print.prefix, operation, type_name, print.context);
- fl_print_format("%[%S%]", print.to.stream, print.notable, name, print.notable);
+ fl_print_format("%q%[%QUnderflow while trying to %Q %Q '%]", print.to.stream, f_string_eol_s, print.context, print.prefix, operation, type_name, print.context);
+ fl_print_format("%[%Q%]", print.to.stream, print.notable, name, print.notable);
fl_print_format("%['.%]%q", print.to.stream, print.context, print.context, f_string_eol_s);
funlockfile(print.to.stream);
if (print.verbosity != f_console_verbosity_quiet_e) {
flockfile(print.to.stream);
- fl_print_format("%q%[%QFailed to %S %S '%]", print.to.stream, f_string_eol_s, print.context, print.prefix, operation, type_name, print.context);
- fl_print_format("%[%S%]", print.to.stream, print.notable, name, print.notable);
+ fl_print_format("%q%[%QFailed to %Q %Q '%]", print.to.stream, f_string_eol_s, print.context, print.prefix, operation, type_name, print.context);
+ fl_print_format("%[%Q%]", print.to.stream, print.notable, name, print.notable);
fl_print_format("%[', write failure.%]%q", print.to.stream, print.context, print.context, f_string_eol_s);
funlockfile(print.to.stream);
if (print.verbosity != f_console_verbosity_quiet_e) {
flockfile(print.to.stream);
- fl_print_format("%q%[%QLoop while trying to %S %S '%]", print.to.stream, f_string_eol_s, print.context, print.prefix, operation, type_name, print.context);
- fl_print_format("%[%S%]", print.to.stream, print.notable, name, print.notable);
+ fl_print_format("%q%[%QLoop while trying to %Q %Q '%]", print.to.stream, f_string_eol_s, print.context, print.prefix, operation, type_name, print.context);
+ fl_print_format("%[%Q%]", print.to.stream, print.notable, name, print.notable);
fl_print_format("%['.%]%q", print.to.stream, print.context, print.context, f_string_eol_s);
funlockfile(print.to.stream);
if (print.verbosity != f_console_verbosity_quiet_e) {
flockfile(print.to.stream);
- fl_print_format("%q%[%QInvalid %S name '%]", print.to.stream, f_string_eol_s, print.context, print.prefix, type_name, print.context);
- fl_print_format("%[%S%]", print.to.stream, print.notable, name, print.notable);
+ fl_print_format("%q%[%QInvalid %Q name '%]", print.to.stream, f_string_eol_s, print.context, print.prefix, type_name, print.context);
+ fl_print_format("%[%Q%]", print.to.stream, print.notable, name, print.notable);
fl_print_format("%['.%]%q", print.to.stream, print.context, print.context, f_string_eol_s);
funlockfile(print.to.stream);
if (print.verbosity != f_console_verbosity_quiet_e) {
flockfile(print.to.stream);
- fl_print_format("%q%[%QNumber overflow while trying to %S %S '%]", print.to.stream, f_string_eol_s, print.context, print.prefix, operation, type_name, print.context);
- fl_print_format("%[%S%]", print.to.stream, print.notable, name, print.notable);
+ fl_print_format("%q%[%QNumber overflow while trying to %Q %Q '%]", print.to.stream, f_string_eol_s, print.context, print.prefix, operation, type_name, print.context);
+ fl_print_format("%[%Q%]", print.to.stream, print.notable, name, print.notable);
fl_print_format("%['.%]%q", print.to.stream, print.context, print.context, f_string_eol_s);
funlockfile(print.to.stream);
if (print.verbosity != f_console_verbosity_quiet_e) {
flockfile(print.to.stream);
- fl_print_format("%q%[%QNumber underflow while trying to %S %S '%]", print.to.stream, f_string_eol_s, print.context, print.prefix, operation, type_name, print.context);
- fl_print_format("%[%S%]", print.to.stream, print.notable, name, print.notable);
+ fl_print_format("%q%[%QNumber underflow while trying to %Q %Q '%]", print.to.stream, f_string_eol_s, print.context, print.prefix, operation, type_name, print.context);
+ fl_print_format("%[%Q%]", print.to.stream, print.notable, name, print.notable);
fl_print_format("%['.%]%q", print.to.stream, print.context, print.context, f_string_eol_s);
funlockfile(print.to.stream);
private_fll_error_print_function(print, function);
- fl_print_format(" for the %S '%]", print.to.stream, type_name, print.context);
- fl_print_format("%[%S%]", print.to.stream, print.notable, name, print.notable);
+ fl_print_format(" for the %Q '%]", print.to.stream, type_name, print.context);
+ fl_print_format("%[%Q%]", print.to.stream, print.notable, name, print.notable);
fl_print_format("%['.%]%q", print.to.stream, print.context, print.context, f_string_eol_s);
funlockfile(print.to.stream);
if (print.verbosity != f_console_verbosity_quiet_e) {
flockfile(print.to.stream);
- fl_print_format("%q%[%QProhibited by system while trying to %S %S '%]", print.to.stream, f_string_eol_s, print.context, print.prefix, operation, type_name, print.context);
- fl_print_format("%[%S%]", print.to.stream, print.notable, name, print.notable);
+ fl_print_format("%q%[%QProhibited by system while trying to %Q %Q '%]", print.to.stream, f_string_eol_s, print.context, print.prefix, operation, type_name, print.context);
+ fl_print_format("%[%Q%]", print.to.stream, print.notable, name, print.notable);
fl_print_format("%['.%]%q", print.to.stream, print.context, print.context, f_string_eol_s);
funlockfile(print.to.stream);
if (print.verbosity != f_console_verbosity_quiet_e) {
flockfile(print.to.stream);
- fl_print_format("%q%[%QUnable to %S %S '%]", print.to.stream, f_string_eol_s, print.context, print.prefix, operation, type_name, print.context);
- fl_print_format("%[%S%]", print.to.stream, print.notable, name, print.notable);
- fl_print_format("%[', %S is read only.%]%q", print.to.stream, print.context, type_name, print.context, f_string_eol_s);
+ fl_print_format("%q%[%QUnable to %Q %Q '%]", print.to.stream, f_string_eol_s, print.context, print.prefix, operation, type_name, print.context);
+ fl_print_format("%[%Q%]", print.to.stream, print.notable, name, print.notable);
+ fl_print_format("%[', %Q is read only.%]%q", print.to.stream, print.context, type_name, print.context, f_string_eol_s);
funlockfile(print.to.stream);
}
if (print.verbosity != f_console_verbosity_quiet_e) {
flockfile(print.to.stream);
- fl_print_format("%q%[%QUnable to %S %S '%]", print.to.stream, f_string_eol_s, print.context, print.prefix, operation, type_name, print.context);
- fl_print_format("%[%S%]", print.to.stream, print.notable, name, print.notable);
- fl_print_format("%[', %S is write only.%]%q", print.to.stream, print.context, type_name, print.context, f_string_eol_s);
+ fl_print_format("%q%[%QUnable to %Q %Q '%]", print.to.stream, f_string_eol_s, print.context, print.prefix, operation, type_name, print.context);
+ fl_print_format("%[%Q%]", print.to.stream, print.notable, name, print.notable);
+ fl_print_format("%[', %Q is write only.%]%q", print.to.stream, print.context, type_name, print.context, f_string_eol_s);
funlockfile(print.to.stream);
}
if (print.verbosity != f_console_verbosity_quiet_e) {
flockfile(print.to.stream);
- fl_print_format("%q%[%QInvalid or missing directory in path while trying to %S %S '%]", print.to.stream, f_string_eol_s, print.context, print.prefix, operation, type_name, print.context);
- fl_print_format("%[%S%]", print.to.stream, print.notable, name, print.notable);
+ fl_print_format("%q%[%QInvalid or missing directory in path while trying to %Q %Q '%]", print.to.stream, f_string_eol_s, print.context, print.prefix, operation, type_name, print.context);
+ fl_print_format("%[%Q%]", print.to.stream, print.notable, name, print.notable);
fl_print_format("%['.%]%q", print.to.stream, print.context, print.context, f_string_eol_s);
funlockfile(print.to.stream);
if (print.verbosity != f_console_verbosity_quiet_e) {
flockfile(print.to.stream);
- fl_print_format("%q%[%QFailed to %S %S, the path '%]", print.to.stream, f_string_eol_s, print.context, print.prefix, operation, type_name, print.context);
- fl_print_format("%[%S%]", print.to.stream, print.notable, name, print.notable);
+ fl_print_format("%q%[%QFailed to %Q %Q, the path '%]", print.to.stream, f_string_eol_s, print.context, print.prefix, operation, type_name, print.context);
+ fl_print_format("%[%Q%]", print.to.stream, print.notable, name, print.notable);
fl_print_format("%[' is a directory.%]%q", print.to.stream, print.context, print.context, f_string_eol_s);
funlockfile(print.to.stream);
if (print.verbosity != f_console_verbosity_quiet_e) {
flockfile(print.to.stream);
- fl_print_format("%q%[%QFailed to %S %S, the path '%]", print.to.stream, f_string_eol_s, print.context, print.prefix, operation, type_name, print.context);
- fl_print_format("%[%S%]", print.to.stream, print.notable, name, print.notable);
+ fl_print_format("%q%[%QFailed to %Q %Q, the path '%]", print.to.stream, f_string_eol_s, print.context, print.prefix, operation, type_name, print.context);
+ fl_print_format("%[%Q%]", print.to.stream, print.notable, name, print.notable);
fl_print_format("%[' is a file.%]%q", print.to.stream, print.context, print.context, f_string_eol_s);
funlockfile(print.to.stream);
if (print.verbosity != f_console_verbosity_quiet_e) {
flockfile(print.to.stream);
- fl_print_format("%q%[%QFailed to %S %S '%]", print.to.stream, f_string_eol_s, print.context, print.prefix, operation, type_name, print.context);
- fl_print_format("%[%S%]", print.to.stream, print.notable, name, print.notable);
+ fl_print_format("%q%[%QFailed to %Q %Q '%]", print.to.stream, f_string_eol_s, print.context, print.prefix, operation, type_name, print.context);
+ fl_print_format("%[%Q%]", print.to.stream, print.notable, name, print.notable);
fl_print_format("%[' due to an invalid directory in the path.%]%q", print.to.stream, print.context, print.context, f_string_eol_s);
funlockfile(print.to.stream);
if (print.verbosity != f_console_verbosity_quiet_e) {
flockfile(print.to.stream);
- fl_print_format("%q%[%QFailed to %S %S, the path '%]", print.to.stream, f_string_eol_s, print.context, print.prefix, operation, type_name, print.context);
- fl_print_format("%[%S%]", print.to.stream, print.notable, name, print.notable);
- fl_print_format("%[' is a %s.%]%q", print.to.stream, print.context, status == F_file_type_pipe ? "pipe" : "socket", print.context, f_string_eol_s);
+ fl_print_format("%q%[%QFailed to %Q %Q, the path '%]", print.to.stream, f_string_eol_s, print.context, print.prefix, operation, type_name, print.context);
+ fl_print_format("%[%Q%]", print.to.stream, print.notable, name, print.notable);
+ fl_print_format("%[' is a %Q.%]%q", print.to.stream, print.context, status == F_file_type_pipe ? fll_error_file_type_pipe_s : fll_error_file_type_socket_s, print.context, f_string_eol_s);
funlockfile(print.to.stream);
}
#endif // _di_fll_error_file_print_
#ifndef _di_fll_error_parameter_integer_print_
- f_status_t fll_error_parameter_integer_print(const fl_print_t print, const f_status_t status, const f_string_t function, const bool fallback, const f_string_t parameter, const f_string_t argument) {
+ f_status_t fll_error_parameter_integer_print(const fl_print_t print, const f_status_t status, const f_string_t function, const bool fallback, const f_string_static_t parameter, const f_string_static_t argument) {
if (status == F_data_not) {
if (print.verbosity != f_console_verbosity_quiet_e) {
flockfile(print.to.stream);
fl_print_format("%q%[%QThe argument for the parameter '%]", print.to.stream, f_string_eol_s, print.context, print.prefix, print.context);
- fl_print_format("%[%S%]", print.to.stream, print.notable, parameter, print.notable);
+ fl_print_format("%[%Q%]", print.to.stream, print.notable, parameter, print.notable);
fl_print_format("%[' must not be an empty string.%]%q", print.to.stream, print.context, print.context, f_string_eol_s);
funlockfile(print.to.stream);
flockfile(print.to.stream);
fl_print_format("%q%[%QThe argument '%]", print.to.stream, f_string_eol_s, print.context, print.prefix, print.context);
- fl_print_format("%[%S%]", print.to.stream, print.notable, argument, print.notable);
+ fl_print_format("%[%Q%]", print.to.stream, print.notable, argument, print.notable);
fl_print_format("%[' is not a valid number for the parameter '%]", print.to.stream, print.context, print.context);
- fl_print_format("%[%S%]", print.to.stream, print.notable, parameter, print.notable);
+ fl_print_format("%[%Q%]", print.to.stream, print.notable, parameter, print.notable);
fl_print_format("%['.%]%q", print.to.stream, print.context, print.context, f_string_eol_s);
funlockfile(print.to.stream);
flockfile(print.to.stream);
fl_print_format("%q%[%QThe argument '%]", print.to.stream, f_string_eol_s, print.context, print.prefix, print.context);
- fl_print_format("%[%S%]", print.to.stream, print.notable, argument, print.notable);
+ fl_print_format("%[%Q%]", print.to.stream, print.notable, argument, print.notable);
fl_print_format("%[' is negative, which is not allowed for the parameter '%]", print.to.stream, print.context, print.context);
- fl_print_format("%[%S%]", print.to.stream, print.notable, parameter, print.notable);
+ fl_print_format("%[%Q%]", print.to.stream, print.notable, parameter, print.notable);
fl_print_format("%['.%]%q", print.to.stream, print.context, print.context, f_string_eol_s);
funlockfile(print.to.stream);
flockfile(print.to.stream);
fl_print_format("%q%[%QThe argument '%]", print.to.stream, f_string_eol_s, print.context, print.prefix, print.context);
- fl_print_format("%[%S%]", print.to.stream, print.notable, argument, print.notable);
+ fl_print_format("%[%Q%]", print.to.stream, print.notable, argument, print.notable);
fl_print_format("%[' is too large for the parameter '%]", print.to.stream, print.context, print.context);
- fl_print_format("%[%S%]", print.to.stream, print.notable, parameter, print.notable);
+ fl_print_format("%[%Q%]", print.to.stream, print.notable, parameter, print.notable);
fl_print_format("%['.%]%q", print.to.stream, print.context, print.context, f_string_eol_s);
funlockfile(print.to.stream);
flockfile(print.to.stream);
fl_print_format("%q%[%QThe argument '%]", print.to.stream, f_string_eol_s, print.context, print.prefix, print.context);
- fl_print_format("%[%S%]", print.to.stream, print.notable, argument, print.notable);
+ fl_print_format("%[%Q%]", print.to.stream, print.notable, argument, print.notable);
fl_print_format("%[' is positive, which is not allowed for the parameter '%]", print.to.stream, print.context, print.context);
- fl_print_format("%[%S%]", print.to.stream, print.notable, parameter, print.notable);
+ fl_print_format("%[%Q%]", print.to.stream, print.notable, parameter, print.notable);
fl_print_format("%['.%]%q", print.to.stream, print.context, print.context, f_string_eol_s);
funlockfile(print.to.stream);
flockfile(print.to.stream);
fl_print_format("%q%[%QThe argument '%]", print.to.stream, f_string_eol_s, print.context, print.prefix, print.context);
- fl_print_format("%[%S%]", print.to.stream, print.notable, argument, print.notable);
+ fl_print_format("%[%Q%]", print.to.stream, print.notable, argument, print.notable);
fl_print_format("%[' is too small for the parameter '%]", print.to.stream, print.context, print.context);
- fl_print_format("%[%S%]", print.to.stream, print.notable, parameter, print.notable);
+ fl_print_format("%[%Q%]", print.to.stream, print.notable, parameter, print.notable);
fl_print_format("%['.%]%q", print.to.stream, print.context, print.context, f_string_eol_s);
funlockfile(print.to.stream);
* F_false is returned on successful print of known errors.
*/
#ifndef _di_fll_error_file_print_
- extern f_status_t fll_error_file_print(const fl_print_t print, const f_status_t status, const f_string_t function, const bool fallback, const f_string_t name, const f_string_t operation, const uint8_t type);
+ extern f_status_t fll_error_file_print(const fl_print_t print, const f_status_t status, const f_string_t function, const bool fallback, const f_string_static_t name, const f_string_static_t operation, const uint8_t type);
#endif // _di_fll_error_file_print_
/**
* F_false is returned on successful print of known errors.
*/
#ifndef _di_fll_error_parameter_integer_print_
- extern f_status_t fll_error_parameter_integer_print(const fl_print_t print, const f_status_t status, const f_string_t function, const bool fallback, const f_string_t parameter, const f_string_t argument);
+ extern f_status_t fll_error_parameter_integer_print(const fl_print_t print, const f_status_t status, const f_string_t function, const bool fallback, const f_string_static_t parameter, const f_string_static_t argument);
#endif // _di_fll_error_parameter_integer_print_
#ifdef __cplusplus
#endif
#ifndef _di_fll_execute_arguments_add_
- f_status_t fll_execute_arguments_add(const f_string_t source, const f_array_length_t length, f_string_dynamics_t *arguments) {
+ f_status_t fll_execute_arguments_add(const f_string_static_t source, f_string_dynamics_t *arguments) {
#ifndef _di_level_2_parameter_checking_
if (!arguments) return F_status_set_error(F_parameter);
#endif // _di_level_2_parameter_checking_
- const f_status_t status = private_fll_execute_arguments_add(source, length, arguments);
+ const f_status_t status = private_fll_execute_arguments_add(source, arguments);
if (F_status_is_error(status)) return status;
return F_none;
#endif // _di_fll_execute_arguments_add_
#ifndef _di_fll_execute_arguments_add_parameter_
- f_status_t fll_execute_arguments_add_parameter(const f_string_t prefix, const f_array_length_t prefix_length, const f_string_t name, const f_array_length_t name_length, const f_string_t value, const f_array_length_t value_length, f_string_dynamics_t *arguments) {
+ f_status_t fll_execute_arguments_add_parameter(const f_string_static_t prefix, const f_string_static_t name, const f_string_static_t value, f_string_dynamics_t *arguments) {
#ifndef _di_level_2_parameter_checking_
if (!arguments) return F_status_set_error(F_parameter);
#endif // _di_level_2_parameter_checking_
- const f_status_t status = private_fll_execute_arguments_add_parameter(prefix, prefix_length, name, name_length, value, value_length, arguments);
+ const f_status_t status = private_fll_execute_arguments_add_parameter(prefix, name, value, arguments);
if (F_status_is_error(status)) return status;
return F_none;
#endif // _di_fll_execute_arguments_add_parameter_
#ifndef _di_fll_execute_arguments_add_parameter_set_
- f_status_t fll_execute_arguments_add_parameter_set(const f_string_t prefix[], const f_array_length_t prefix_length[], const f_string_t name[], const f_array_length_t name_length[], const f_string_t value[], const f_array_length_t value_length[], const f_array_length_t size, f_string_dynamics_t *arguments) {
+ f_status_t fll_execute_arguments_add_parameter_set(const f_string_static_t prefix[], const f_string_static_t name[], const f_string_static_t value[], const f_array_length_t size, f_string_dynamics_t *arguments) {
#ifndef _di_level_2_parameter_checking_
if (!arguments) return F_status_set_error(F_parameter);
#endif // _di_level_2_parameter_checking_
for (f_array_length_t i = 0; i < size; ++i) {
- status = private_fll_execute_arguments_add_parameter(prefix[i], prefix_length[i], name[i], name_length[i], value[i], value_length[i], arguments);
+ status = private_fll_execute_arguments_add_parameter(prefix[i], name[i], value[i], arguments);
if (F_status_is_error(status)) return status;
} // for
#endif // _di_fll_execute_arguments_add_parameter_set_
#ifndef _di_fll_execute_arguments_add_set_
- f_status_t fll_execute_arguments_add_set(const f_string_t source[], const f_array_length_t length[], const f_array_length_t size, f_string_dynamics_t *arguments) {
+ f_status_t fll_execute_arguments_add_set(const f_string_static_t source[], const f_array_length_t size, f_string_dynamics_t *arguments) {
#ifndef _di_level_2_parameter_checking_
if (!arguments) return F_status_set_error(F_parameter);
#endif // _di_level_2_parameter_checking_
for (f_array_length_t i = 0; i < size; ++i) {
- status = private_fll_execute_arguments_add(source[i], length[i], arguments);
+ status = private_fll_execute_arguments_add(source[i], arguments);
if (F_status_is_error(status)) return status;
} // for
}
#endif // _di_fll_execute_arguments_add_set_
-#ifndef _di_fll_execute_arguments_dynamic_add_
- f_status_t fll_execute_arguments_dynamic_add(const f_string_static_t source, f_string_dynamics_t *arguments) {
- #ifndef _di_level_2_parameter_checking_
- if (!arguments) return F_status_set_error(F_parameter);
- #endif // _di_level_2_parameter_checking_
-
- const f_status_t status = private_fll_execute_arguments_add(source.string, source.used, arguments);
- if (F_status_is_error(status)) return status;
-
- return F_none;
- }
-#endif // _di_fll_execute_arguments_dynamic_add_
-
-#ifndef _di_fll_execute_arguments_dynamic_add_parameter_
- f_status_t fll_execute_arguments_dynamic_add_parameter(const f_string_static_t prefix, const f_string_static_t name, const f_string_static_t value, f_string_dynamics_t *arguments) {
- #ifndef _di_level_2_parameter_checking_
- if (!arguments) return F_status_set_error(F_parameter);
- #endif // _di_level_2_parameter_checking_
-
- const f_status_t status = private_fll_execute_arguments_add_parameter(prefix.string, prefix.used, name.string, name.used, value.string, value.used, arguments);
- if (F_status_is_error(status)) return status;
-
- return F_none;
- }
-#endif // _di_fll_execute_arguments_dynamic_add_parameter_
-
-#ifndef _di_fll_execute_arguments_dynamic_add_parameter_set_
- f_status_t fll_execute_arguments_dynamic_add_parameter_set(const f_string_static_t prefix[], const f_string_static_t name[], const f_string_static_t value[], const f_array_length_t size, f_string_dynamics_t *arguments) {
- #ifndef _di_level_2_parameter_checking_
- if (!arguments) return F_status_set_error(F_parameter);
- #endif // _di_level_2_parameter_checking_
-
- f_status_t status = F_none;
-
- for (f_array_length_t i = 0; i < size; ++i) {
-
- status = private_fll_execute_arguments_add_parameter(prefix[i].string, prefix[i].used, name[i].string, name[i].used, value[i].string, value[i].used, arguments);
- if (F_status_is_error(status)) return status;
- } // for
-
- return status;
- }
-#endif // _di_fll_execute_arguments_dynamic_add_parameter_set_
-
-#ifndef _di_fll_execute_arguments_dynamic_add_set_
- f_status_t fll_execute_arguments_dynamic_add_set(const f_string_static_t source[], const f_array_length_t size, f_string_dynamics_t *arguments) {
- #ifndef _di_level_2_parameter_checking_
- if (!arguments) return F_status_set_error(F_parameter);
- #endif // _di_level_2_parameter_checking_
-
- f_status_t status = F_none;
-
- for (f_array_length_t i = 0; i < size; ++i) {
-
- status = private_fll_execute_arguments_add(source[i].string, source[i].used, arguments);
- if (F_status_is_error(status)) return status;
- } // for
-
- return status;
- }
-#endif // _di_fll_execute_arguments_dynamic_add_set_
-
#ifndef _di_fll_execute_into_
- f_status_t fll_execute_into(const f_string_t program, const f_string_statics_t arguments, const uint8_t option, const f_string_maps_t *environment, int *result) {
+ f_status_t fll_execute_into(const f_string_static_t program, const f_string_statics_t arguments, const uint8_t option, const f_string_maps_t *environment, int *result) {
#ifndef _di_level_2_parameter_checking_
- if (!program && !arguments.used) return F_status_set_error(F_parameter);
+ if (!program.used && !arguments.used) return F_status_set_error(F_parameter);
if (!result) return F_status_set_error(F_parameter);
#endif // _di_level_2_parameter_checking_
- // create a string array that is compatible with execv() calls.
+ // Create a string array that is compatible with execv() calls.
f_string_t fixed_arguments[arguments.used + 2];
+ f_string_static_t program_name = f_string_static_t_initialize;
- const f_string_t last_slash = strrchr(program ? program : arguments.array[0].string, f_path_separator_s.string[0]);
- const f_array_length_t size_name = last_slash ? strnlen(last_slash + 1, F_path_length_max_d) : strnlen(program ? program : arguments.array[0].string, F_path_length_max_d);
+ const f_string_t last_slash = strrchr(program.used ? program.string : arguments.array[0].string, f_path_separator_s.string[0]);
- char program_name[size_name + 1];
+ if (last_slash) {
+ program_name.used = strnlen(last_slash + 1, F_path_length_max_d);
+ }
+ else {
+ program_name.used = program.used ? program.used : arguments.array[0].used;
+ }
- private_fll_execute_path_arguments_fixate(program ? program : arguments.array[0].string, arguments, last_slash, !program, size_name, program_name, fixed_arguments);
+ char program_name_string[program_name.used + 1];
+ program_name.string = program_name_string;
+
+ private_fll_execute_path_arguments_fixate(program.used ? program : arguments.array[0], arguments, last_slash, !program.used, program_name, fixed_arguments);
int code = 0;
setsid();
}
- // full path is explicitly requested.
+ // Full path is explicitly requested.
if (option & FL_execute_parameter_option_path_d) {
f_string_dynamic_t path = f_string_dynamic_t_initialize;
f_string_dynamics_t paths = f_string_dynamics_t_initialize;
f_status_t status = F_none;
if (last_slash) {
- status = f_file_exists(program ? program : arguments.array[0].string);
+ status = f_file_exists(program.used ? program : arguments.array[0]);
if (status != F_true) {
- f_string_dynamics_resize(0, &paths);
-
return F_status_set_error(F_file_found_not);
}
- path.string = program ? program : arguments.array[0].string;
- path.used = strnlen(program ? program : arguments.array[0].string, F_path_length_max_d);
+ path.string = program.used ? program.string : arguments.array[0].string;
+ path.used = program.used ? program.used : arguments.array[0].used;
found = &path;
}
else {
- status = f_environment_get(f_path_environment_s.string, &path);
+ status = f_environment_get(f_path_environment_s, &path);
if (F_status_is_error(status)) {
- // Do not consider PATH is not available (or valid?) to be an error.
+ // Do not consider PATH is not available (or not valid?) to be an error.
if (F_status_set_fine(status) == F_valid_not || F_status_set_fine(status) == F_failure) {
status = F_none;
}
}
else {
- status = fl_environment_path_explode_dynamic(path, &paths);
+ status = fl_environment_path_explode(path, &paths);
}
f_string_dynamic_resize(0, &path);
return status;
}
+ // Search each individual path in PATH until a match is found.
for (f_array_length_t i = 0; i < paths.used; ++i) {
- status = f_string_append(program_name, size_name, &paths.array[i]);
+ status = f_string_dynamic_append(program_name, &paths.array[i]);
if (F_status_is_error_not(status)) {
status = f_string_dynamic_terminate_after(&paths.array[i]);
}
if (F_status_is_error_not(status)) {
- status = f_file_exists(paths.array[i].string);
+ status = f_file_exists(paths.array[i]);
if (status == F_true) {
found = &paths.array[i];
if (F_status_is_error(status)) {
status = F_status_set_fine(status);
- // don't consider bad/non-accessible paths an error, just ignore them.
+ // Don't consider bad/non-accessible paths an error, just ignore them.
if (status == F_name) {
continue;
}
clearenv();
for (f_array_length_t i = 0; i < environment->used; ++i) {
- f_environment_set_dynamic(environment->array[i].name, environment->array[i].value, F_true);
+ f_environment_set(environment->array[i].name, environment->array[i].value, F_true);
} // for
}
clearenv();
for (f_array_length_t i = 0; i < environment->used; ++i) {
- f_environment_set_dynamic(environment->array[i].name, environment->array[i].value, F_true);
+ f_environment_set(environment->array[i].name, environment->array[i].value, F_true);
} // for
}
- code = last_slash ? execv(program ? program : arguments.array[0].string, fixed_arguments) : execvp(program ? program : arguments.array[0].string, fixed_arguments);
+ if (last_slash) {
+ code = execv(program.used ? program.string : arguments.array[0].string, fixed_arguments);
+ }
+ else {
+ code = execvp(program.used ? program.string : arguments.array[0].string, fixed_arguments);
+ }
}
- // generally this does not return, but in some cases (such as with scripts) this does return so handle the results.
+ // Generally this does not return, but in some cases (such as with scripts) this does return so handle the results.
if (code < 0) {
if (errno == EACCES) code = F_execute_access;
else if (errno == E2BIG) code = F_execute_too_large;
#endif // _di_fll_execute_into_
#ifndef _di_fll_execute_program_
- f_status_t fll_execute_program(const f_string_t program, const f_string_statics_t arguments, fl_execute_parameter_t * const parameter, fl_execute_as_t * const as, void *result) {
+ f_status_t fll_execute_program(const f_string_static_t program, const f_string_statics_t arguments, fl_execute_parameter_t * const parameter, fl_execute_as_t * const as, void *result) {
#ifndef _di_level_2_parameter_checking_
- if (!program && !arguments.used) return F_status_set_error(F_parameter);
+ if (!program.used && !arguments.used) return F_status_set_error(F_parameter);
if (!result) return F_status_set_error(F_parameter);
#endif // _di_level_2_parameter_checking_
- // create a string array that is compatible with execv() calls.
+ // Create a string array that is compatible with execv() calls.
f_string_t fixed_arguments[arguments.used + 2];
- const f_string_t last_slash = strrchr(program ? program : arguments.array[0].string, f_path_separator_s.string[0]);
- const f_array_length_t size_name = last_slash ? strnlen(last_slash + 1, F_path_length_max_d) : strnlen(program ? program : arguments.array[0].string, F_path_length_max_d);
+ f_string_static_t program_name = f_string_static_t_initialize;
- char program_name[size_name + 1];
+ const f_string_t last_slash = strrchr(program.used ? program.string : arguments.array[0].string, f_path_separator_s.string[0]);
- private_fll_execute_path_arguments_fixate(program ? program : arguments.array[0].string, arguments, last_slash, !program, size_name, program_name, fixed_arguments);
+ if (last_slash) {
+ program_name.used = strnlen(last_slash + 1, F_path_length_max_d);
+ }
+ else {
+ program_name.used = program.used ? program.used : arguments.array[0].used;
+ }
- // determine full path when the environment is to be cleared or full path is explicitly requested.
+ char program_name_string[program_name.used + 1];
+ program_name.string = program_name_string;
+
+ private_fll_execute_path_arguments_fixate(program.used ? program : arguments.array[0], arguments, last_slash, !program.used, program_name, fixed_arguments);
+
+ // Determine full path when the environment is to be cleared or full path is explicitly requested.
if (parameter && parameter->environment || parameter && (parameter->option & FL_execute_parameter_option_path_d)) {
f_string_dynamic_t path = f_string_dynamic_t_initialize;
f_string_dynamics_t paths = f_string_dynamics_t_initialize;
f_status_t status = F_none;
if (last_slash) {
- status = f_file_exists(program ? program : arguments.array[0].string);
+ status = f_file_exists(program.used ? program : arguments.array[0]);
if (status != F_true) {
f_string_dynamics_resize(0, &paths);
return F_status_set_error(F_file_found_not);
}
- path.string = program ? program : arguments.array[0].string;
- path.used = strnlen(program ? program : arguments.array[0].string, F_path_length_max_d);
+ path.string = program.used ? program.string : arguments.array[0].string;
+ path.used = program.used ? program.used : arguments.array[0].used;
found = &path;
}
else {
- status = f_environment_get(f_path_environment_s.string, &path);
+ status = f_environment_get(f_path_environment_s, &path);
if (F_status_is_error(status)) {
- // Do not consider PATH is not available (or valid?) to be an error.
+ // Do not consider PATH is not available (or not valid?) to be an error.
if (F_status_set_fine(status) == F_valid_not || F_status_set_fine(status) == F_failure) {
status = F_none;
}
}
else {
- status = fl_environment_path_explode_dynamic(path, &paths);
+ status = fl_environment_path_explode(path, &paths);
}
f_string_dynamic_resize(0, &path);
return status;
}
+ // Search each individual path in PATH until a match is found.
for (f_array_length_t i = 0; i < paths.used; ++i) {
- status = f_string_append(program_name, size_name, &paths.array[i]);
+ status = f_string_dynamic_append(program_name, &paths.array[i]);
if (F_status_is_error_not(status)) {
status = f_string_dynamic_terminate_after(&paths.array[i]);
}
if (F_status_is_error_not(status)) {
- status = f_file_exists(paths.array[i].string);
+ status = f_file_exists(paths.array[i]);
if (status == F_true) {
found = &paths.array[i];
if (F_status_is_error(status)) {
status = F_status_set_fine(status);
- // don't consider bad/non-accessible paths an error, just ignore them.
+ // Don't consider bad/non-accessible paths an error, just ignore them.
if (status == F_name) {
continue;
}
f_string_dynamics_resize(0, &paths);
+ program_name.string = program_path;
+ program_name.used = found->used;
+
if (parameter && (parameter->option & FL_execute_parameter_option_path_d)) {
fixed_arguments[0] = program_path;
}
if (parameter && parameter->data) {
- return private_fll_execute_fork_data(F_true, program_path, fixed_arguments, parameter, as, result);
+ return private_fll_execute_fork_data(F_true, program_name, fixed_arguments, parameter, as, result);
}
- return private_fll_execute_fork(F_true, program_path, fixed_arguments, parameter, as, result);
+ return private_fll_execute_fork(F_true, program_name, fixed_arguments, parameter, as, result);
}
if (parameter && parameter->data) {
- return private_fll_execute_fork_data(last_slash, program ? program : arguments.array[0].string, fixed_arguments, parameter, as, result);
+ return private_fll_execute_fork_data(last_slash, program.used ? program : arguments.array[0], fixed_arguments, parameter, as, result);
}
- return private_fll_execute_fork(last_slash, program ? program : arguments.array[0].string, fixed_arguments, parameter, as, result);
+ return private_fll_execute_fork(last_slash, program.used ? program : arguments.array[0], fixed_arguments, parameter, as, result);
}
#endif // _di_fll_execute_program_
/**
* Add an argument to the execution arguments array.
*
- * This guarantees that an end of string exists at the end of the copied string.
+ * This guarantees that a NULL exists at the end of the string (after the source.used length).
* This does not check for NULL characters anywhere else in the string.
*
* @param source
* The string to add to the arguments array.
- * @param length
- * Length of string to prepend.
* @param arguments
* The array of string arguments intended to pass to the execute functions.
*
* @return
* F_none on success.
*
- * Errors (with error bit) from: macro_f_string_dynamics_t_resize().
- * Errors (with error bit) from: f_string_append().
+ * Errors (with error bit) from: f_string_dynamic_append().
* Errors (with error bit) from: f_string_dynamic_resize().
- * Errors (with error bit) from: f_string_dynamic_terminate().
+ * Errors (with error bit) from: f_string_dynamic_terminate_after().
* Errors (with error bit) from: f_string_dynamics_increase().
*
- * @see macro_f_string_dynamics_t_resize()
- * @see f_string_append()
+ * @see f_string_dynamic_append()
* @see f_string_dynamic_resize()
- * @see f_string_dynamic_terminate()
+ * @see f_string_dynamic_terminate_after()
* @see f_string_dynamics_increase()
*/
#ifndef _di_fll_execute_arguments_add_
- extern f_status_t fll_execute_arguments_add(const f_string_t source, const f_array_length_t length, f_string_dynamics_t *arguments);
+ extern f_status_t fll_execute_arguments_add(const f_string_static_t source, f_string_dynamics_t *arguments);
#endif // _di_fll_execute_arguments_add_
/**
*
* @param prefix
* The string prepend to the name.
- * @param prefix_length
- * Length of prefix to prepend.
* @param name
* The string to add to the arguments array.
- * @param name_length
- * Length of name to prepend.
* @param value
* The string to add to the arguments array.
- * @param value_length
- * Length of value to prepend.
* @param arguments
* The array of string arguments intended to pass to the execute functions.
*
* @see f_string_dynamics_increase()
*/
#ifndef _di_fll_execute_arguments_add_parameter_
- extern f_status_t fll_execute_arguments_add_parameter(const f_string_t prefix, const f_array_length_t prefix_length, const f_string_t name, const f_array_length_t name_length, const f_string_t value, const f_array_length_t value_length, f_string_dynamics_t *arguments);
+ extern f_status_t fll_execute_arguments_add_parameter(const f_string_static_t prefix, const f_string_static_t name, const f_string_static_t value, f_string_dynamics_t *arguments);
#endif // _di_fll_execute_arguments_add_parameter_
/**
*
* @param prefix
* An array of the strings prepend to the name.
- * @param prefix_length
- * Length of prefix to prepend.
* @param name
* An array of the strings to add to the arguments array.
- * @param name_length
- * Length of name to prepend.
* @param value
* An array of the strings to add to the arguments array.
- * @param value_length
- * Length of value to prepend.
* @param size
* The array size of prefix, prefix_length, name, name_length, value, and value_length (all of which must be of the same array size).
* @param arguments
* @see f_string_dynamics_increase()
*/
#ifndef _di_fll_execute_arguments_add_parameter_set_
- extern f_status_t fll_execute_arguments_add_parameter_set(const f_string_t prefix[], const f_array_length_t prefix_length[], const f_string_t name[], const f_array_length_t name_length[], const f_string_t value[], const f_array_length_t value_length[], const f_array_length_t size, f_string_dynamics_t *arguments);
+ extern f_status_t fll_execute_arguments_add_parameter_set(const f_string_static_t prefix[], const f_string_static_t name[], const f_string_static_t value[], const f_array_length_t size, f_string_dynamics_t *arguments);
#endif // _di_fll_execute_arguments_add_parameter_set_
/**
*
* @param source
* An array of strings to add to the arguments array.
- * @param length
- * An array of lengths of each string to prepend.
* @param size
* The array size of source and length (all of which must be of the same array size).
* @param arguments
* @see f_string_dynamics_increase()
*/
#ifndef _di_fll_execute_arguments_add_set_
- extern f_status_t fll_execute_arguments_add_set(const f_string_t source[], const f_array_length_t length[], const f_array_length_t size, f_string_dynamics_t *arguments);
+ extern f_status_t fll_execute_arguments_add_set(const f_string_static_t source[], const f_array_length_t size, f_string_dynamics_t *arguments);
#endif // _di_fll_execute_arguments_add_set_
/**
- * Add an argument to the execution arguments array.
- *
- * This guarantees that an end of string exists at the end of the copied string.
- * This does not check for NULL characters anywhere else in the string.
- *
- * @param source
- * The string to add to the arguments array.
- * @param arguments
- * The array of string arguments intended to pass to the execute functions.
- *
- * @return
- * F_none on success.
- *
- * Errors (with error bit) from: f_string_append().
- * Errors (with error bit) from: f_string_dynamic_resize().
- * Errors (with error bit) from: f_string_dynamic_terminate().
- * Errors (with error bit) from: f_string_dynamics_increase().
- *
- * @see f_string_append()
- * @see f_string_dynamic_resize()
- * @see f_string_dynamic_terminate()
- * @see f_string_dynamics_increase()
- */
-#ifndef _di_fll_execute_arguments_dynamic_add_
- extern f_status_t fll_execute_arguments_dynamic_add(const f_string_static_t source, f_string_dynamics_t *arguments);
-#endif // _di_fll_execute_arguments_dynamic_add_
-
-/**
- * Add parameters as arguments to the execution arguments array.
- *
- * This is intended to simplify adding arguments that have prefixes and values such as those common in console parameters.
- * For example, a pefix of '--', a name of 'do', and a value of 'something' would result in two arguments added:
- * '--do' and 'something'.
- *
- * The arguments are only appended if the length of name and value are not 0.
- *
- * This guarantees that an end of string exists at the end of each argument.
- * This does not check for NULL characters anywhere else in the string.
- *
- * @param prefix
- * The string prepend to the name.
- * @param name
- * The string to add to the arguments array.
- * @param value
- * The string to add to the arguments array.
- * @param arguments
- * The array of string arguments intended to pass to the execute functions.
- *
- * @return
- * F_none on success.
- *
- * Errors (with error bit) from: f_string_append().
- * Errors (with error bit) from: f_string_dynamic_resize().
- * Errors (with error bit) from: f_string_dynamic_terminate().
- * Errors (with error bit) from: f_string_dynamics_increase().
- *
- * @see f_string_append()
- * @see f_string_dynamic_resize()
- * @see f_string_dynamic_terminate()
- * @see f_string_dynamics_increase()
- */
-#ifndef _di_fll_execute_arguments_dynamic_add_parameter_
- extern f_status_t fll_execute_arguments_dynamic_add_parameter(const f_string_static_t prefix, const f_string_static_t name, const f_string_static_t value, f_string_dynamics_t *arguments);
-#endif // _di_fll_execute_arguments_dynamic_add_parameter_
-
-/**
- * Add set of parameters as arguments to the execution arguments array.
- *
- * This is intended to simplify adding arguments that have prefixes and values such as those common in console parameters.
- * For example, a pefix of '--', a name of 'do', and a value of 'something' would result in two arguments added:
- * '--do' and 'something'.
- *
- * The arguments are only appended if the length of name and value are not 0.
- *
- * This guarantees that an end of string exists at the end of each argument.
- * This does not check for NULL characters anywhere else in the string.
- *
- * @param prefix
- * The string prepend to the name.
- * @param name
- * The string to add to the arguments array.
- * @param value
- * The string prepend to the name.
- * @param size
- * The array size of buffer.
- * @param arguments
- * The array of string arguments intended to pass to the execute functions.
- *
- * @return
- * F_none on success.
- *
- * Errors (with error bit) from: f_string_append().
- * Errors (with error bit) from: f_string_dynamic_resize().
- * Errors (with error bit) from: f_string_dynamic_terminate().
- * Errors (with error bit) from: f_string_dynamics_increase().
- *
- * @see f_string_append()
- * @see f_string_dynamic_resize()
- * @see f_string_dynamic_terminate()
- * @see f_string_dynamics_increase()
- */
-#ifndef _di_fll_execute_arguments_dynamic_add_parameter_set_
- extern f_status_t fll_execute_arguments_dynamic_add_parameter_set(const f_string_static_t prefix[], const f_string_static_t name[], const f_string_static_t value[], const f_array_length_t size, f_string_dynamics_t *arguments);
-#endif // _di_fll_execute_arguments_dynamic_add_parameter_set_
-
-/**
- * Add a set of arguments to the execution arguments array.
- *
- * This guarantees that an end of string exists at the end of the copied string.
- * This does not check for NULL characters anywhere else in the string.
- *
- * @param source
- * An array of strings to add to the arguments array.
- * @param size
- * The array size of buffer.
- * @param arguments
- * The array of string arguments intended to pass to the execute functions.
- *
- * @return
- * F_none on success.
- *
- * Errors (with error bit) from: f_string_append().
- * Errors (with error bit) from: f_string_dynamic_resize().
- * Errors (with error bit) from: f_string_dynamic_terminate().
- * Errors (with error bit) from: f_string_dynamics_increase().
- *
- * @see f_string_append()
- * @see f_string_dynamic_resize()
- * @see f_string_dynamic_terminate()
- * @see f_string_dynamics_increase()
- */
-#ifndef _di_fll_execute_arguments_dynamic_add_set_
- extern f_status_t fll_execute_arguments_dynamic_add_set(const f_string_static_t source[], const f_array_length_t size, f_string_dynamics_t *arguments);
-#endif // _di_fll_execute_arguments_dynamic_add_set_
-
-/**
* Execute a program given by program name found in the PATH environment (such as "bash") or program path (such as "/bin/bash").
*
* The program will be executed directly and not via a child process.
*
* F_failure (with error bit) on execution failure.
*
+ * Errors (with error bit) from: f_environment_get().
+ * Errors (with error bit) from: f_string_dynamic_append().
+ * Errors (with error bit) from: f_string_dynamic_terminate_after().
+ * Errors (with error bit) from: fl_environment_path_explode().
+ *
* @see execv()
* @see execvp()
* @see exit()
* @see memcpy()
* @see strnlen()
+ *
+ * @see f_environment_get()
+ * @see f_string_dynamic_append()
+ * @see f_string_dynamic_terminate_after()
+ * @see fl_environment_path_explode()
*/
#ifndef _di_fll_execute_into_
- extern f_status_t fll_execute_into(const f_string_t program, const f_string_statics_t arguments, const uint8_t option, const f_string_maps_t *environment, int *result);
+ extern f_status_t fll_execute_into(const f_string_static_t program, const f_string_statics_t arguments, const uint8_t option, const f_string_maps_t *environment, int *result);
#endif // _di_fll_execute_into_
/**
* Errors (with error bit) from: f_environment_get().
* Errors (with error bit) from: f_file_exists().
* Errors (with error bit) from: f_limit_process().
- * Errors (with error bit) from: macro_f_string_dynamics_t_delete().
* Errors (with error bit) from: f_signal_mask().
- * Errors (with error bit) from: f_thread_signal_mask().
- * Errors (with error bit) from: fl_environment_path_explode_dynamic().
* Errors (with error bit) from: f_string_append().
* Errors (with error bit) from: f_string_dynamic_resize().
* Errors (with error bit) from: f_string_dynamic_terminate_after().
+ * Errors (with error bit) from: f_string_dynamics_resize().
+ * Errors (with error bit) from: f_thread_signal_mask().
+ * Errors (with error bit) from: fl_environment_path_explode().
*
* @see close()
* @see clearenv()
* @see f_file_exists()
* @see f_limit_process()
* @see f_signal_mask()
- * @see f_string_append()
- * @see f_string_dynamic_terminate()
+ * @see f_string_dynamic_append()
+ * @see f_string_dynamic_terminate_after()
+ * @see f_string_dynamics_resize()
* @see f_thread_signal_mask()
* @see fl_control_group_apply()
- * @see fl_environment_path_explode_dynamic()
+ * @see fl_environment_path_explode()
*/
#ifndef _di_fll_execute_program_
- extern f_status_t fll_execute_program(const f_string_t program, const f_string_statics_t arguments, fl_execute_parameter_t * const parameter, fl_execute_as_t * const as, void *result);
+ extern f_status_t fll_execute_program(const f_string_static_t program, const f_string_statics_t arguments, fl_execute_parameter_t * const parameter, fl_execute_as_t * const as, void *result);
#endif // _di_fll_execute_program_
#ifdef __cplusplus
extern "C" {
#endif
-#if !defined(_di_fll_execute_arguments_add_) || !defined(_di_fll_execute_arguments_add_set_) || !defined(_di_fll_execute_arguments_dynamic_add_) || !defined(_di_fll_execute_arguments_dynamic_add_set_)
- f_status_t private_fll_execute_arguments_add(const f_string_t source, const f_array_length_t length, f_string_dynamics_t *arguments) {
+#if !defined(_di_fll_execute_arguments_add_) || !defined(_di_fll_execute_arguments_add_set_)
+ f_status_t private_fll_execute_arguments_add(const f_string_static_t source, f_string_dynamics_t *arguments) {
f_status_t status = f_string_dynamics_increase(F_memory_default_allocation_small_d, arguments);
if (F_status_is_error(status)) return status;
- f_string_dynamic_t argument = f_string_dynamic_t_initialize;
+ arguments->array[arguments->used].used = 0;
- if (length) {
- status = f_string_append(source, length, &argument);
+ status = f_string_dynamic_increase_by(source.used + 1, &arguments->array[arguments->used]);
+ if (F_status_is_error(status)) return status;
- if (F_status_is_error(status)) {
- f_string_dynamic_resize(0, &argument);
+ status = f_string_dynamic_append(source, &arguments->array[arguments->used]);
- return status;
- }
+ if (F_status_is_error_not(status)) {
+ status = f_string_dynamic_terminate_after(&arguments->array[arguments->used]);
}
- status = f_string_dynamic_terminate(&argument);
-
- if (F_status_is_error(status)) {
- f_string_dynamic_resize(0, &argument);
-
- return status;
- }
+ if (F_status_is_error(status)) return status;
- arguments->array[arguments->used].string = argument.string;
- arguments->array[arguments->used].used = argument.used;
- arguments->array[arguments->used++].size = argument.size;
+ ++arguments->used;
return F_none;
}
-#endif // !defined(_di_fll_execute_arguments_add_) || !defined(_di_fll_execute_arguments_add_set_) || !defined(_di_fll_execute_arguments_dynamic_add_) || !defined(_di_fll_execute_arguments_dynamic_add_set_)
+#endif // !defined(_di_fll_execute_arguments_add_) || !defined(_di_fll_execute_arguments_add_set_)
-#if !defined(_di_fll_execute_arguments_add_parameter_) || !defined(_di_fll_execute_arguments_add_parameter_set_) || !defined(_di_fll_execute_arguments_dynamic_add_parameter_) || !defined(_di_fll_execute_arguments_dynamic_add_parameter_set_)
- f_status_t private_fll_execute_arguments_add_parameter(const f_string_t prefix, const f_array_length_t prefix_length, const f_string_t name, const f_array_length_t name_length, const f_string_t value, const f_array_length_t value_length, f_string_dynamics_t *arguments) {
+#if !defined(_di_fll_execute_arguments_add_parameter_) || !defined(_di_fll_execute_arguments_add_parameter_set_)
+ f_status_t private_fll_execute_arguments_add_parameter(const f_string_static_t prefix, const f_string_static_t name, const f_string_static_t value, f_string_dynamics_t *arguments) {
f_status_t status = f_string_dynamics_increase(F_memory_default_allocation_small_d, arguments);
if (F_status_is_error(status)) return status;
- f_string_dynamic_t argument = f_string_dynamic_t_initialize;
-
- if (prefix_length) {
- status = f_string_append(prefix, prefix_length, &argument);
-
- if (F_status_is_error(status)) {
- f_string_dynamic_resize(0, &argument);
-
- return status;
- }
- }
-
- if (name_length) {
- status = f_string_append(name, name_length, &argument);
+ arguments->array[arguments->used].used = 0;
- if (F_status_is_error(status)) {
- f_string_dynamic_resize(0, &argument);
-
- return status;
- }
- }
-
- status = f_string_dynamic_terminate(&argument);
+ status = f_string_dynamic_increase_by(prefix.used + name.used + 1, &arguments->array[arguments->used]);
+ if (F_status_is_error(status)) return status;
- if (F_status_is_error(status)) {
- f_string_dynamic_resize(0, &argument);
+ status = f_string_dynamic_append(prefix, &arguments->array[arguments->used]);
- return status;
+ if (F_status_is_error_not(status)) {
+ status = f_string_dynamic_terminate(&arguments->array[arguments->used]);
}
- arguments->array[arguments->used].string = argument.string;
- arguments->array[arguments->used].used = argument.used;
- arguments->array[arguments->used++].size = argument.size;
-
- macro_f_string_dynamic_t_clear(argument);
+ if (F_status_is_error(status)) return status;
- if (value_length) {
- status = f_string_append(value, value_length, &argument);
+ ++arguments->used;
- if (F_status_is_error(status)) {
- f_string_dynamic_resize(0, &argument);
+ status = f_string_dynamics_increase(F_memory_default_allocation_small_d, arguments);
+ if (F_status_is_error(status)) return status;
- return status;
- }
- }
+ arguments->array[arguments->used].used = 0;
- status = f_string_dynamic_terminate(&argument);
+ status = f_string_dynamic_increase_by(value.used + 1, &arguments->array[arguments->used]);
+ if (F_status_is_error(status)) return status;
- if (F_status_is_error(status)) {
- f_string_dynamic_resize(0, &argument);
+ status = f_string_dynamic_append(value, &arguments->array[arguments->used]);
- return status;
+ if (F_status_is_error_not(status)) {
+ status = f_string_dynamic_terminate(&arguments->array[arguments->used]);
}
- status = f_string_dynamics_increase(F_memory_default_allocation_small_d, arguments);
-
- if (F_status_is_error(status)) {
- f_string_dynamic_resize(0, &argument);
-
- return status;
- }
+ if (F_status_is_error(status)) return status;
- arguments->array[arguments->used].string = argument.string;
- arguments->array[arguments->used].used = argument.used;
- arguments->array[arguments->used++].size = argument.size;
+ ++arguments->used;
return F_none;
}
-#endif // !defined(_di_fll_execute_arguments_add_parameter_) || !defined(_di_fll_execute_arguments_add_parameter_set_) || !defined(_di_fll_execute_arguments_dynamic_add_parameter_) || !defined(_di_fll_execute_arguments_dynamic_add_parameter_set_)
+#endif // !defined(_di_fll_execute_arguments_add_parameter_) || !defined(_di_fll_execute_arguments_add_parameter_set_)
#if !defined(_di_fll_execute_program_)
f_status_t private_fll_execute_as_child(const fl_execute_as_t as, fl_execute_parameter_t * const parameter, int *result) {
}
*result = F_execute_nice;
+
return F_status_set_error(F_nice);
}
}
}
*result = F_execute_capability;
+
return F_status_set_error(F_capability);
}
}
}
*result = F_execute_group;
+
return F_status_set_error(F_group);
}
}
}
*result = F_execute_group;
+
return F_status_set_error(F_group);
}
}
}
*result = F_execute_user;
+
return F_status_set_error(F_user);
}
}
#endif // !defined(_di_fll_execute_program_)
#if !defined(_di_fll_execute_program_)
- f_status_t private_fll_execute_fork(const bool direct, const f_string_t program, const f_string_t fixed_arguments[], fl_execute_parameter_t * const parameter, fl_execute_as_t * const as, void *result) {
+ f_status_t private_fll_execute_fork(const bool direct, const f_string_static_t program, const f_string_t fixed_arguments[], fl_execute_parameter_t * const parameter, fl_execute_as_t * const as, void *result) {
int descriptors[2] = { -1, -1 };
if (id_process) {
if (as) {
- // close the read pipe for the parent.
+ // Close the read pipe for the parent.
close(descriptors[0]);
- // have the parent perform all appropriate access controls and then send either '0' for no error or '1' for error to the child.
+ // Have the parent perform all appropriate access controls and then send either '0' for no error or '1' for error to the child.
{
char string_result[2] = { '0', 0 };
const f_status_t status = private_fll_execute_as_parent(*as, id_process, parameter, string_result);
- // inform the child that it can now safely begin (or exit).
+ // Inform the child that it can now safely begin (or exit).
f_file_write(file, buffer, 0);
- // close the write pipe for the parent when finished writing.
+ // Close the write pipe for the parent when finished writing.
close(descriptors[1]);
if (F_status_is_error(status)) {
// have the parent wait for the child process to finish.
waitpid(id_process, (int *) result, parameter ? parameter->wait : 0);
- // this must explicitly check for 0 (as opposed to checking (!result)).
+ // This must explicitly check for 0 (as opposed to checking (!result)).
if (result != 0) {
if (WIFEXITED(*((int *) result))) {
return F_none;
if (as) {
- // close the write pipe for the child.
+ // Close the write pipe for the child.
close(descriptors[1]);
char string_response[2] = { 0, 0 };
clearenv();
for (f_array_length_t i = 0; i < parameter->environment->used; ++i) {
- f_environment_set_dynamic(parameter->environment->array[i].name, parameter->environment->array[i].value, F_true);
+ f_environment_set(parameter->environment->array[i].name, parameter->environment->array[i].value, F_true);
} // for
}
if (as) {
- // close the write pipe for the child when done.
+ // Close the write pipe for the child when done.
close(descriptors[0]);
const f_status_t status = private_fll_execute_as_child(*as, parameter, (int *) result);
if (F_status_is_error(status)) return status;
}
- int code = direct ? execv(program, fixed_arguments) : execvp(program, fixed_arguments);
+ int code = direct ? execv(program.string, fixed_arguments) : execvp(program.string, fixed_arguments);
if (code == -1) {
if (errno == EACCES) code = F_execute_access;
#endif // !defined(_di_fll_execute_program_)
#if !defined(_di_fll_execute_program_)
- f_status_t private_fll_execute_fork_data(const bool direct, const f_string_t program, const f_string_t fixed_arguments[], fl_execute_parameter_t * const parameter, fl_execute_as_t * const as, void *result) {
+ f_status_t private_fll_execute_fork_data(const bool direct, const f_string_static_t program, const f_string_t fixed_arguments[], fl_execute_parameter_t * const parameter, fl_execute_as_t * const as, void *result) {
int descriptors[2] = { -1, -1 };
if (id_process) {
- // close the read pipe for the parent.
+ // Close the read pipe for the parent.
close(descriptors[0]);
{
f_status_t status = F_none;
- // have the parent perform all appropriate access controls and then send either '0' for no error or '1' for error to the child.
+ // Have the parent perform all appropriate access controls and then send either '0' for no error or '1' for error to the child.
if (as) {
f_string_static_t buffer = f_string_static_t_initialize;
status = private_fll_execute_as_parent(*as, id_process, parameter, string_result);
- // inform the child that it can now safely begin (or exit).
+ // Inform the child that it can now safely begin (or exit).
if (F_status_is_error(f_file_write(file, buffer, 0))) {
string_result[0] = '1';
}
}
- // write all data, if child doesn't read this could block until child closes the pipe.
+ // Write all data, if child doesn't read this could block until child closes the pipe.
if (string_result[0] == '0') {
f_file_write(file, *parameter->data, 0);
}
- // close the write pipe for the parent when finished writing.
+ // Close the write pipe for the parent when finished writing.
close(descriptors[1]);
if (F_status_is_error(status)) {
return F_parent;
}
- // have the parent wait for the child process to finish.
+ // Have the parent wait for the child process to finish.
waitpid(id_process, (int *) result, parameter->wait);
- // this must explicitly check for 0 (as opposed to checking (!result)).
+ // This must explicitly check for 0 (as opposed to checking (!result)).
if (result != 0) {
if (WIFEXITED(*((int *) result))) {
return F_none;
setsid();
}
- // close the write pipe for the child.
+ // Close the write pipe for the child.
close(descriptors[1]);
- // wait for parent to tell child to begin.
+ // Wait for parent to tell child to begin.
if (as) {
char string_response[2] = { 0, 0 };
clearenv();
for (f_array_length_t i = 0; i < parameter->environment->used; ++i) {
- f_environment_set_dynamic(parameter->environment->array[i].name, parameter->environment->array[i].value, F_true);
+ f_environment_set(parameter->environment->array[i].name, parameter->environment->array[i].value, F_true);
} // for
}
if (F_status_is_error(status)) return status;
}
- int code = direct ? execv(program, fixed_arguments) : execvp(program, fixed_arguments);
+ int code = direct ? execv(program.string, fixed_arguments) : execvp(program.string, fixed_arguments);
- // close the write pipe for the child when done.
+ // Close the write pipe for the child when done.
close(descriptors[0]);
if (code < 0) {
#endif // !defined(_di_fll_execute_program_)
#if !defined(_di_fll_execute_program_)
- void private_fll_execute_path_arguments_fixate(const f_string_t program_path, const f_string_statics_t arguments, const f_string_t last_slash, const bool fixated_is, const f_array_length_t name_size, char program_name[], f_string_t fixed_arguments[]) {
+ void private_fll_execute_path_arguments_fixate(const f_string_static_t program_path, const f_string_statics_t arguments, const f_string_t last_slash, const bool fixated_is, f_string_static_t program_name, f_string_t fixed_arguments[]) {
- memset(program_name, 0, name_size + 1);
+ memset(program_name.string, 0, program_name.used + 1);
memset(fixed_arguments, 0, sizeof(f_string_t) * (arguments.used + 2));
- memcpy(program_name, last_slash ? last_slash + 1 : program_path, name_size);
- if (name_size) {
- fixed_arguments[0] = program_name;
+ memcpy(program_name.string, last_slash ? last_slash + 1 : program_path.string, program_name.used);
+
+ if (program_name.used) {
+ fixed_arguments[0] = program_name.string;
}
if (fixated_is) {
*
* @param source
* The string to add to the arguments array.
- * @param length
- * Length of string to prepend.
* @param arguments
* The array of string arguments intended to pass to the execute functions.
*
* @return
* F_none on success.
*
- * Errors (with error bit) from: f_string_append().
+ * Errors (with error bit) from: f_string_dynamic_increase_by().
* Errors (with error bit) from: f_string_dynamic_resize().
- * Errors (with error bit) from: f_string_dynamic_terminate().
+ * Errors (with error bit) from: f_string_dynamic_terminate_after().
* Errors (with error bit) from: f_string_dynamics_increase().
*
- * @see f_string_append()
+ * @see f_string_dynamic_increase_by()
* @see f_string_dynamic_resize()
- * @see f_string_dynamic_terminate()
+ * @see f_string_dynamic_terminate_after()
* @see f_string_dynamics_increase()
- * @see fll_execute_arguments_add()
- * @see fll_execute_arguments_add_set()
- * @see fll_execute_arguments_dynamic_add()
- * @see fll_execute_arguments_dynamic_add_set()
*/
-#if !defined(_di_fll_execute_arguments_add_) || !defined(_di_fll_execute_arguments_add_set_) || !defined(_di_fll_execute_arguments_dynamic_add_) || !defined(_di_fll_execute_arguments_dynamic_add_set_)
- extern f_status_t private_fll_execute_arguments_add(const f_string_t source, const f_array_length_t length, f_string_dynamics_t *arguments) F_attribute_visibility_internal_d;
-#endif // !defined(_di_fll_execute_arguments_add_) || !defined(_di_fll_execute_arguments_add_set_) || !defined(_di_fll_execute_arguments_dynamic_add_) || !defined(_di_fll_execute_arguments_dynamic_add_set_)
+#if !defined(_di_fll_execute_arguments_add_) || !defined(_di_fll_execute_arguments_add_set_)
+ extern f_status_t private_fll_execute_arguments_add(const f_string_static_t source, f_string_dynamics_t *arguments) F_attribute_visibility_internal_d;
+#endif // !defined(_di_fll_execute_arguments_add_) || !defined(_di_fll_execute_arguments_add_set_)
/**
* Private implementation of fll_execute_arguments_add_parameter().
*
* @param prefix
* The string prepend to the name.
- * @param prefix_length
- * Length of prefix to prepend.
* @param name
* The string to add to the arguments array.
- * @param name_length
- * Length of name to prepend.
* @param value
* The string prepend to the name.
- * @param value_length
- * Length of value to prepend.
* @param arguments
* The array of string arguments intended to pass to the execute functions.
*
* @see fll_execute_arguments_dynamic_add_parameter()
* @see fll_execute_arguments_dynamic_add_parameter_set()
*/
-#if !defined(_di_fll_execute_arguments_add_parameter_) || !defined(_di_fll_execute_arguments_add_parameter_set_) || !defined(_di_fll_execute_arguments_dynamic_add_parameter_) || !defined(_di_fll_execute_arguments_dynamic_add_parameter_set_)
- extern f_status_t private_fll_execute_arguments_add_parameter(const f_string_t prefix, const f_array_length_t prefix_length, const f_string_t name, const f_array_length_t name_length, const f_string_t value, const f_array_length_t value_length, f_string_dynamics_t *arguments) F_attribute_visibility_internal_d;
-#endif // !defined(_di_fll_execute_arguments_add_parameter_) || !defined(_di_fll_execute_arguments_add_parameter_set_) || !defined(_di_fll_execute_arguments_dynamic_add_parameter_) || !defined(_di_fll_execute_arguments_dynamic_add_parameter_set_)
+#if !defined(_di_fll_execute_arguments_add_parameter_) || !defined(_di_fll_execute_arguments_add_parameter_set_)
+ extern f_status_t private_fll_execute_arguments_add_parameter(const f_string_static_t prefix, const f_string_static_t name, const f_string_static_t value, f_string_dynamics_t *arguments) F_attribute_visibility_internal_d;
+#endif // !defined(_di_fll_execute_arguments_add_parameter_) || !defined(_di_fll_execute_arguments_add_parameter_set_)
/**
* Private function for perform the execute as operations.
* @see pipe()
* @see waitpid()
*
- * @see f_environment_set_dynamic()
+ * @see f_environment_set()
* @see f_limit_process()
* @see f_signal_mask()
* @see f_thread_signal_mask()
* @see fll_execute_program()
*/
#if !defined(_di_fll_execute_program_)
- extern f_status_t private_fll_execute_fork(const bool direct, const f_string_t program, const f_string_t fixed_arguments[], fl_execute_parameter_t * const parameter, fl_execute_as_t * const as, void *result) F_attribute_visibility_internal_d;
+ extern f_status_t private_fll_execute_fork(const bool direct, const f_string_static_t program, const f_string_t fixed_arguments[], fl_execute_parameter_t * const parameter, fl_execute_as_t * const as, void *result) F_attribute_visibility_internal_d;
#endif // !defined(_di_fll_execute_program_)
/**
* @see pipe()
* @see waitpid()
*
- * @see f_environment_set_dynamic()
+ * @see f_environment_set()
* @see f_limit_process()
* @see f_signal_mask()
* @see f_thread_signal_mask()
* @see fll_execute_program()
*/
#if !defined(_di_fll_execute_program_)
- extern f_status_t private_fll_execute_fork_data(const bool direct, const f_string_t program, const f_string_t fixed_arguments[], fl_execute_parameter_t * const parameter, fl_execute_as_t * const as, void *result) F_attribute_visibility_internal_d;
+ extern f_status_t private_fll_execute_fork_data(const bool direct, const f_string_static_t program, const f_string_t fixed_arguments[], fl_execute_parameter_t * const parameter, fl_execute_as_t * const as, void *result) F_attribute_visibility_internal_d;
#endif // !defined(_di_fll_execute_program_)
/**
* @param fixated_is
* If TRUE, then the program_path is already fixated in the fixed_arguments at index 0.
* If FALSE, then the program_path needs to be fixated in the fixed_arguments at index 0.
- * @param name_size
- * The size of the program_path to copy.
* @param program_name
* The destination to copy the name to.
* @param fixed_arguments
* @see fll_execute_program()
*/
#if !defined(_di_fll_execute_program_)
- extern void private_fll_execute_path_arguments_fixate(const f_string_t program_path, const f_string_statics_t arguments, const f_string_t last_slash, const bool fixated_is, const f_array_length_t name_size, char program_name[], f_string_t fixed_arguments[]) F_attribute_visibility_internal_d;
+ extern void private_fll_execute_path_arguments_fixate(const f_string_static_t program_path, const f_string_statics_t arguments, const f_string_t last_slash, const bool fixated_is, f_string_static_t program_name, f_string_t fixed_arguments[]) F_attribute_visibility_internal_d;
#endif // !defined(_di_fll_execute_program_)
#ifdef __cplusplus
#endif
#ifndef _di_fll_file_mode_set_all_
- f_status_t fll_file_mode_set_all(const f_string_t path, const mode_t mode, const f_number_unsigned_t depth_max) {
+ f_status_t fll_file_mode_set_all(const f_string_static_t path, const mode_t mode, const f_number_unsigned_t depth_max) {
#ifndef _di_level_2_parameter_checking_
- if (!path) return F_status_set_error(F_parameter);
+ if (!path.string) return F_status_set_error(F_parameter);
#endif // _di_level_2_parameter_checking_
+ if (!path.used) {
+ return F_data_not;
+ }
+
return private_fll_file_mode_set_all(path, mode, depth_max, 0);
}
#endif // _di_fll_file_mode_set_all_
#ifndef _di_fll_file_move_
- f_status_t fll_file_move(const f_string_t source, const f_string_t destination, const f_array_length_t source_length, const f_array_length_t destination_length, const fl_directory_recurse_t recurse) {
+ f_status_t fll_file_move(const f_string_static_t source, const f_string_static_t destination, const fl_directory_recurse_t recurse) {
#ifndef _di_level_2_parameter_checking_
- if (!source) return F_status_set_error(F_parameter);
- if (!destination) return F_status_set_error(F_parameter);
+ if (!source.string) return F_status_set_error(F_parameter);
+ if (!destination.string) return F_status_set_error(F_parameter);
#endif // _di_level_2_parameter_checking_
+ if (!source.used || !destination.string) {
+ return F_data_not;
+ }
+
f_status_t status = f_file_rename(source, destination);
if (F_status_set_fine(status) != F_mount) {
if (status == F_none && (!recurse.output.stream || recurse.output.id != -1) && recurse.verbose) {
- recurse.verbose(recurse.output, source, destination);
+ recurse.verbose(recurse.output, source.string, destination.string);
}
return status;
}
if (status == F_true) {
- status = fl_directory_clone(source, destination, source_length, destination_length, F_true, recurse);
+ status = fl_directory_clone(source, destination, F_true, recurse);
if (F_status_is_error(status)) return status;
status = f_directory_remove(source, recurse.depth_max, F_false);
if (status == F_none && (!recurse.output.stream || recurse.output.id != -1) && recurse.verbose) {
- recurse.verbose(recurse.output, source, destination);
+ recurse.verbose(recurse.output, source.string, destination.string);
}
}
else {
status = f_file_remove(source);
if (status == F_none && (!recurse.output.stream || recurse.output.id != -1) && recurse.verbose) {
- recurse.verbose(recurse.output, source, destination);
+ recurse.verbose(recurse.output, source.string, destination.string);
}
}
#endif // _di_fll_file_move_
#ifndef _di_fll_file_role_change_all_
- f_status_t fll_file_role_change_all(const f_string_t path, const uid_t uid, const gid_t gid, const bool dereference, const f_number_unsigned_t depth_max) {
+ f_status_t fll_file_role_change_all(const f_string_static_t path, const uid_t uid, const gid_t gid, const bool dereference, const f_number_unsigned_t depth_max) {
#ifndef _di_level_2_parameter_checking_
- if (!path) return F_status_set_error(F_parameter);
+ if (!path.string) return F_status_set_error(F_parameter);
if (uid == -1 && gid == -1) return F_status_set_error(F_parameter);
#endif // _di_level_2_parameter_checking_
+ if (!path.string) {
+ return F_data_not;
+ }
+
return private_fll_file_role_change_all(path, uid, gid, dereference, depth_max, 0);
}
#endif // _di_fll_file_role_change_all_
*
* @return
* F_none on success.
+ * F_data_not if path.used is 0.
*
* F_access_denied (with error bit) on access denied.
* F_access_mode (with error bit) if the current user does not have access to assign the file mode.
* Errors (with error bit) from: fl_directory_list().
*/
#ifndef _di_fll_file_mode_set_all_
- extern f_status_t fll_file_mode_set_all(const f_string_t path, const mode_t mode, const f_number_unsigned_t depth_max);
+ extern f_status_t fll_file_mode_set_all(const f_string_static_t path, const mode_t mode, const f_number_unsigned_t depth_max);
#endif // _di_fll_file_mode_set_all_
/**
* The path to the file to copy from.
* @param destination
* The path to copy to.
- * @param source_length
- * The length of the source path.
- * @param destination_length
- * The length of the destination path.
* @param recurse
* The directory recurse data.
*
* @see fl_directory_clone()
*/
#ifndef _di_fll_file_move_
- extern f_status_t fll_file_move(const f_string_t source, const f_string_t destination, const f_array_length_t source_length, const f_array_length_t destination_length, const fl_directory_recurse_t recurse);
+ extern f_status_t fll_file_move(const f_string_static_t source, const f_string_static_t destination, const fl_directory_recurse_t recurse);
#endif // _di_fll_file_move_
/**
* Errors (with error bit) from: fl_directory_list().
*/
#ifndef _di_fll_file_role_change_all_
- extern f_status_t fll_file_role_change_all(const f_string_t path, const uid_t uid, const gid_t gid, const bool dereference, const f_number_unsigned_t depth_max);
+ extern f_status_t fll_file_role_change_all(const f_string_static_t path, const uid_t uid, const gid_t gid, const bool dereference, const f_number_unsigned_t depth_max);
#endif // _di_fll_file_role_change_all_
#ifdef __cplusplus
#endif
#if !defined(_di_fll_file_mode_set_all_)
- f_status_t private_fll_file_mode_set_all(const f_string_t path, const mode_t mode, const f_number_unsigned_t depth_max, const f_number_unsigned_t depth) {
+ f_status_t private_fll_file_mode_set_all(const f_string_static_t path, const mode_t mode, const f_number_unsigned_t depth_max, const f_number_unsigned_t depth) {
+
f_status_t status = F_none;
status = f_directory_is(path);
status = F_none;
- const f_array_length_t path_length = strnlen(path, F_path_length_max_d);
-
{
f_string_dynamics_t * const list[] = {
&listing.block,
uint8_t i = 0;
f_array_length_t j = 0;
+ f_string_static_t path_sub = f_string_static_t_initialize;
for (; i < 7; ++i) {
for (j = 0; F_status_is_fine(status) && j < list[i]->used; ++j) {
- const f_array_length_t length = path_length + list[i]->array[j].used + 1;
+ path_sub.used = path.used + list[i]->array[j].used + 1;
- char path_sub[length + 1];
+ char path_sub_string[path_sub.used + 1];
+ path_sub.string = path_sub_string;
- memcpy(path_sub, path, path_length);
- memcpy(path_sub + path_length + 1, list[i]->array[j].string, list[i]->array[j].used);
+ memcpy(path_sub.string, path.string, path.used);
+ memcpy(path_sub.string + path.used + 1, list[i]->array[j].string, list[i]->array[j].used);
- path_sub[path_length] = f_path_separator_s.string[0];
- path_sub[length] = 0;
+ path_sub.string[path.used] = f_path_separator_s.string[0];
+ path_sub.string[path_sub.used] = 0;
status = f_file_mode_set(path_sub, mode);
} // for
f_string_dynamics_resize(0, &listing.unknown);
+ f_string_static_t path_sub = f_string_static_t_initialize;
+
for (f_array_length_t i = 0; F_status_is_fine(status) && i < listing.directory.used; ++i) {
- const f_array_length_t length = path_length + listing.directory.array[i].used + 1;
+ path_sub.used = path.used + listing.directory.array[i].used + 1;
- char path_sub[length + 1];
+ char path_sub_string[path_sub.used + 1];
+ path_sub.string = path_sub_string;
- memcpy(path_sub, path, path_length);
- memcpy(path_sub + path_length + 1, listing.directory.array[i].string, listing.directory.array[i].used);
+ memcpy(path_sub.string, path.string, path.used);
+ memcpy(path_sub.string + path.used + 1, listing.directory.array[i].string, listing.directory.array[i].used);
- path_sub[path_length] = f_path_separator_s.string[0];
- path_sub[length] = 0;
+ path_sub.string[path.used] = f_path_separator_s.string[0];
+ path_sub.string[path_sub.used] = 0;
status = f_directory_exists(path_sub);
if (F_status_is_error(status)) break;
#endif // !defined(_di_fll_file_mode_set_all_)
#if !defined(_di_fll_file_role_change_all_)
- f_status_t private_fll_file_role_change_all(const f_string_t path, const uid_t uid, const gid_t gid, const bool dereference, const f_number_unsigned_t depth_max, const f_number_unsigned_t depth) {
+ f_status_t private_fll_file_role_change_all(const f_string_static_t path, const uid_t uid, const gid_t gid, const bool dereference, const f_number_unsigned_t depth_max, const f_number_unsigned_t depth) {
f_status_t status = F_none;
status = f_directory_is(path);
status = F_none;
- const f_array_length_t path_length = strnlen(path, F_path_length_max_d);
-
{
f_string_dynamics_t * const list[] = {
&listing.block,
uint8_t i = 0;
f_array_length_t j = 0;
+ f_string_static_t path_sub = f_string_static_t_initialize;
for (; i < 7; ++i) {
for (j = 0; F_status_is_fine(status) && j < list[i]->used; ++j) {
- const f_array_length_t length = path_length + list[i]->array[j].used + 1;
+ path_sub.used = path.used + list[i]->array[j].used + 1;
- char path_sub[length + 1];
+ char path_sub_string[path_sub.used + 1];
+ path_sub.string = path_sub_string;
- memcpy(path_sub, path, path_length);
- memcpy(path_sub + path_length + 1, list[i]->array[j].string, list[i]->array[j].used);
+ memcpy(path_sub.string, path.string, path.used);
+ memcpy(path_sub.string + path.used + 1, list[i]->array[j].string, list[i]->array[j].used);
- path_sub[path_length] = f_path_separator_s.string[0];
- path_sub[length] = 0;
+ path_sub.string[path.used] = f_path_separator_s.string[0];
+ path_sub.string[path_sub.used] = 0;
status = f_file_role_change(path_sub, uid, gid, dereference);
} // for
} // for
}
- for (f_array_length_t i = 0; F_status_is_fine(status) && i < listing.directory.used; ++i) {
+ {
+ f_string_static_t path_sub = f_string_static_t_initialize;
- const f_array_length_t length = path_length + listing.directory.array[i].used + 1;
+ for (f_array_length_t i = 0; F_status_is_fine(status) && i < listing.directory.used; ++i) {
- char path_sub[length + 1];
+ path_sub.used = path.used + listing.directory.array[i].used + 1;
- memcpy(path_sub, path, path_length);
- memcpy(path_sub + path_length + 1, listing.directory.array[i].string, listing.directory.array[i].used);
+ char path_sub_string[path_sub.used + 1];
+ path_sub.string = path_sub_string;
- path_sub[path_length] = f_path_separator_s.string[0];
- path_sub[length] = 0;
+ memcpy(path_sub.string, path.string, path.used);
+ memcpy(path_sub.string + path.used + 1, listing.directory.array[i].string, listing.directory.array[i].used);
- status = f_directory_exists(path_sub);
- if (F_status_is_error(status)) break;
+ path_sub.string[path.used] = f_path_separator_s.string[0];
+ path_sub.string[path_sub.used] = 0;
- if (status == F_false) {
- status = F_status_set_error(F_directory);
+ status = f_directory_exists(path_sub);
+ if (F_status_is_error(status)) break;
- break;
- }
+ if (status == F_false) {
+ status = F_status_set_error(F_directory);
- if (depth < depth_max) {
- status = private_fll_file_role_change_all(path_sub, uid, gid, dereference, depth_max, depth + 1);
- if (F_status_is_error(status)) break;
- }
- } // for
+ break;
+ }
+
+ if (depth < depth_max) {
+ status = private_fll_file_role_change_all(path_sub, uid, gid, dereference, depth_max, depth + 1);
+ if (F_status_is_error(status)) break;
+ }
+ } // for
+ }
f_string_dynamics_resize(0, &listing.directory);
* F_failure (with error bit) for any other error.
*/
#if !defined(_di_fll_file_mode_set_all_)
- extern f_status_t private_fll_file_mode_set_all(const f_string_t path, const mode_t mode, const f_number_unsigned_t depth_max, const f_number_unsigned_t depth) F_attribute_visibility_internal_d;
+ extern f_status_t private_fll_file_mode_set_all(const f_string_static_t path, const mode_t mode, const f_number_unsigned_t depth_max, const f_number_unsigned_t depth) F_attribute_visibility_internal_d;
#endif // !defined(_di_fll_file_mode_set_all_)
/**
* F_failure (with error bit) for any other error.
*/
#if !defined(_di_fll_file_role_change_all_)
- extern f_status_t private_fll_file_role_change_all(const f_string_t path, const uid_t uid, const gid_t gid, const bool dereference, const f_number_unsigned_t depth_max, const f_number_unsigned_t depth) F_attribute_visibility_internal_d;
+ extern f_status_t private_fll_file_role_change_all(const f_string_static_t path, const uid_t uid, const gid_t gid, const bool dereference, const f_number_unsigned_t depth_max, const f_number_unsigned_t depth) F_attribute_visibility_internal_d;
#endif // !defined(_di_fll_file_role_change_all_)
#ifdef __cplusplus
#ifndef _di_fll_fss_status_string_
#ifndef _di_fll_fss_status_error_
- const f_string_static_t fll_fss_status_format_s = macro_f_string_static_t_initialize2(FLL_fss_status_format_s, 0, FLL_fss_status_format_s_length);
- const f_string_static_t fll_fss_status_format_eos_s = macro_f_string_static_t_initialize2(FLL_fss_status_format_eos_s, 0, FLL_fss_status_format_eos_s_length);
+ const f_string_static_t fll_fss_status_format_s = macro_f_string_static_t_initialize(FLL_fss_status_format_s, 0, FLL_fss_status_format_s_length);
+ const f_string_static_t fll_fss_status_format_eos_s = macro_f_string_static_t_initialize(FLL_fss_status_format_eos_s, 0, FLL_fss_status_format_eos_s_length);
#endif // _di_fll_fss_status_error_
#ifndef _di_fll_fss_status_warning_
- const f_string_static_t fll_fss_status_accepted_invalid_s = macro_f_string_static_t_initialize2(FLL_fss_status_accepted_invalid_s, 0, FLL_fss_status_accepted_invalid_s_length);
- const f_string_static_t fll_fss_status_accepted_invalid_eos_s = macro_f_string_static_t_initialize2(FLL_fss_status_accepted_invalid_eos_s, 0, FLL_fss_status_accepted_invalid_eos_s_length);
+ const f_string_static_t fll_fss_status_accepted_invalid_s = macro_f_string_static_t_initialize(FLL_fss_status_accepted_invalid_s, 0, FLL_fss_status_accepted_invalid_s_length);
+ const f_string_static_t fll_fss_status_accepted_invalid_eos_s = macro_f_string_static_t_initialize(FLL_fss_status_accepted_invalid_eos_s, 0, FLL_fss_status_accepted_invalid_eos_s_length);
#endif // _di_fll_fss_status_warning_
#ifndef _di_fll_fss_status_success_
- const f_string_static_t fll_fss_status_found_object_s = macro_f_string_static_t_initialize2(FLL_fss_status_found_object_s, 0, FLL_fss_status_found_object_s_length);
- const f_string_static_t fll_fss_status_found_content_s = macro_f_string_static_t_initialize2(FLL_fss_status_found_content_s, 0, FLL_fss_status_found_content_s_length);
- const f_string_static_t fll_fss_status_found_object_not_s = macro_f_string_static_t_initialize2(FLL_fss_status_found_object_not_s, 0, FLL_fss_status_found_object_not_s_length);
- const f_string_static_t fll_fss_status_found_content_not_s = macro_f_string_static_t_initialize2(FLL_fss_status_found_content_not_s, 0, FLL_fss_status_found_content_not_s_length);
- const f_string_static_t fll_fss_status_found_object_content_not_s = macro_f_string_static_t_initialize2(FLL_fss_status_found_object_content_not_s, 0, FLL_fss_status_found_object_content_not_s_length);
+ const f_string_static_t fll_fss_status_found_object_s = macro_f_string_static_t_initialize(FLL_fss_status_found_object_s, 0, FLL_fss_status_found_object_s_length);
+ const f_string_static_t fll_fss_status_found_content_s = macro_f_string_static_t_initialize(FLL_fss_status_found_content_s, 0, FLL_fss_status_found_content_s_length);
+ const f_string_static_t fll_fss_status_found_object_not_s = macro_f_string_static_t_initialize(FLL_fss_status_found_object_not_s, 0, FLL_fss_status_found_object_not_s_length);
+ const f_string_static_t fll_fss_status_found_content_not_s = macro_f_string_static_t_initialize(FLL_fss_status_found_content_not_s, 0, FLL_fss_status_found_content_not_s_length);
+ const f_string_static_t fll_fss_status_found_object_content_not_s = macro_f_string_static_t_initialize(FLL_fss_status_found_object_content_not_s, 0, FLL_fss_status_found_object_content_not_s_length);
#endif // _di_fll_fss_status_success_
#ifndef _di_fll_fss_status_codes_
- const f_string_static_t fll_fss_status_found_comment_s = macro_f_string_static_t_initialize2(FLL_fss_status_found_comment_s, 0, FLL_fss_status_found_comment_s_length);
+ const f_string_static_t fll_fss_status_found_comment_s = macro_f_string_static_t_initialize(FLL_fss_status_found_comment_s, 0, FLL_fss_status_found_comment_s_length);
#endif // _di_fll_fss_status_codes_
- const f_string_static_t fll_fss_status_status_code_first_s = macro_f_string_static_t_initialize2(FLL_fss_status_status_code_first_s, 0, FLL_fss_status_status_code_first_s_length);
- const f_string_static_t fll_fss_status_status_code_last_s = macro_f_string_static_t_initialize2(FLL_fss_status_status_code_last_s, 0, FLL_fss_status_status_code_last_s_length);
+ const f_string_static_t fll_fss_status_status_code_first_s = macro_f_string_static_t_initialize(FLL_fss_status_status_code_first_s, 0, FLL_fss_status_status_code_first_s_length);
+ const f_string_static_t fll_fss_status_status_code_last_s = macro_f_string_static_t_initialize(FLL_fss_status_status_code_last_s, 0, FLL_fss_status_status_code_last_s_length);
#endif // _di_FLL_fss_status_string_
#ifndef _di_fll_fss_status_string_from_
#endif // _di_fll_program_print_version_
#ifndef _di_fll_program_parameter_process_
- f_status_t fll_program_parameter_process(const f_console_arguments_t arguments, f_console_parameters_t parameters, const f_console_parameter_ids_t choices, const bool right, f_array_lengths_t *remaining, f_color_context_t *context) {
+ f_status_t fll_program_parameter_process(const f_console_arguments_t arguments, f_console_parameters_t * const parameters, const f_console_parameter_ids_t choices, const bool right, f_array_lengths_t *remaining, f_color_context_t *context) {
f_status_t status = F_none;
f_console_parameter_id_t decision = choices.id[2];
if (right) {
- status = f_console_parameter_prioritize_right(parameters, choices, &decision);
+ status = f_console_parameter_prioritize_right(*parameters, choices, &decision);
}
else {
- status = f_console_parameter_prioritize_left(parameters, choices, &decision);
+ status = f_console_parameter_prioritize_left(*parameters, choices, &decision);
}
if (F_status_is_error(status)) return status;
* @see f_color_load_context()
*/
#ifndef _di_fll_program_parameter_process_
- extern f_status_t fll_program_parameter_process(const f_console_arguments_t arguments, f_console_parameters_t parameters, const f_console_parameter_ids_t choices, const bool right, f_array_lengths_t *remaining, f_color_context_t *context);
+ extern f_status_t fll_program_parameter_process(const f_console_arguments_t arguments, f_console_parameters_t * const parameters, const f_console_parameter_ids_t choices, const bool right, f_array_lengths_t *remaining, f_color_context_t *context);
#endif // _di_fll_program_parameter_process_
/**
f_status_t status = F_none;
- {
- const f_console_parameters_t parameters = macro_f_console_parameters_t_initialize(main->parameters, byte_dump_total_parameters_d);
+ f_console_parameter_t parameters[] = byte_dump_console_parameter_t_initialize;
+ main->parameters.array = parameters;
+ main->parameters.used = byte_dump_total_parameters_d;
- // Identify priority of color parameters.
- {
- f_console_parameter_id_t ids[3] = { byte_dump_parameter_no_color_e, byte_dump_parameter_light_e, byte_dump_parameter_dark_e };
- const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 3);
+ // Identify priority of color parameters.
+ {
+ f_console_parameter_id_t ids[3] = { byte_dump_parameter_no_color_e, byte_dump_parameter_light_e, byte_dump_parameter_dark_e };
+ const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 3);
- status = fll_program_parameter_process(*arguments, parameters, choices, F_true, &main->remaining, &main->context);
+ status = fll_program_parameter_process(*arguments, &main->parameters, choices, F_true, &main->remaining, &main->context);
- main->output.set = &main->context.set;
- main->error.set = &main->context.set;
- main->warning.set = &main->context.set;
+ main->output.set = &main->context.set;
+ main->error.set = &main->context.set;
+ main->warning.set = &main->context.set;
- if (main->context.set.error.before) {
- main->output.context = f_color_set_empty_s;
- main->output.notable = main->context.set.notable;
+ if (main->context.set.error.before) {
+ main->output.context = f_color_set_empty_s;
+ main->output.notable = main->context.set.notable;
- main->error.context = main->context.set.error;
- main->error.notable = main->context.set.notable;
+ main->error.context = main->context.set.error;
+ main->error.notable = main->context.set.notable;
- main->warning.context = main->context.set.warning;
- main->warning.notable = main->context.set.notable;
- }
- else {
- f_color_set_t *sets[] = { &main->output.context, &main->output.notable, &main->error.context, &main->error.notable, &main->warning.context, &main->warning.notable, 0 };
+ main->warning.context = main->context.set.warning;
+ main->warning.notable = main->context.set.notable;
+ }
+ else {
+ f_color_set_t *sets[] = { &main->output.context, &main->output.notable, &main->error.context, &main->error.notable, &main->warning.context, &main->warning.notable, 0 };
- fll_program_parameter_process_empty(&main->context, sets);
- }
+ fll_program_parameter_process_empty(&main->context, sets);
+ }
- if (F_status_is_error(status)) {
- fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process", F_true);
+ if (F_status_is_error(status)) {
+ fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process", F_true);
- byte_dump_main_delete(main);
+ byte_dump_main_delete(main);
- return F_status_set_error(status);
- }
+ return F_status_set_error(status);
}
+ }
- // Identify priority of verbosity related parameters.
- {
- f_console_parameter_id_t ids[4] = { byte_dump_parameter_verbosity_quiet_e, byte_dump_parameter_verbosity_normal_e, byte_dump_parameter_verbosity_verbose_e, byte_dump_parameter_verbosity_debug_e };
- f_console_parameter_id_t choice = 0;
- const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 4);
+ // Identify priority of verbosity related parameters.
+ {
+ f_console_parameter_id_t ids[4] = { byte_dump_parameter_verbosity_quiet_e, byte_dump_parameter_verbosity_normal_e, byte_dump_parameter_verbosity_verbose_e, byte_dump_parameter_verbosity_debug_e };
+ f_console_parameter_id_t choice = 0;
+ const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 4);
- status = f_console_parameter_prioritize_right(parameters, choices, &choice);
+ status = f_console_parameter_prioritize_right(main->parameters, choices, &choice);
- if (F_status_is_error(status)) {
- fll_error_print(main->error, F_status_set_fine(status), "f_console_parameter_prioritize_right", F_true);
+ if (F_status_is_error(status)) {
+ fll_error_print(main->error, F_status_set_fine(status), "f_console_parameter_prioritize_right", F_true);
- byte_dump_main_delete(main);
+ byte_dump_main_delete(main);
- return status;
- }
+ return status;
+ }
- if (choice == byte_dump_parameter_verbosity_quiet_e) {
- main->output.verbosity = f_console_verbosity_quiet_e;
- main->error.verbosity = f_console_verbosity_quiet_e;
- main->warning.verbosity = f_console_verbosity_quiet_e;
- }
- else if (choice == byte_dump_parameter_verbosity_normal_e) {
- main->output.verbosity = f_console_verbosity_normal_e;
- main->error.verbosity = f_console_verbosity_normal_e;
- main->warning.verbosity = f_console_verbosity_normal_e;
- }
- else if (choice == byte_dump_parameter_verbosity_verbose_e) {
- main->output.verbosity = f_console_verbosity_verbose_e;
- main->error.verbosity = f_console_verbosity_verbose_e;
- main->warning.verbosity = f_console_verbosity_verbose_e;
- }
- else if (choice == byte_dump_parameter_verbosity_debug_e) {
- main->output.verbosity = f_console_verbosity_debug_e;
- main->error.verbosity = f_console_verbosity_debug_e;
- main->warning.verbosity = f_console_verbosity_debug_e;
- }
+ if (choice == byte_dump_parameter_verbosity_quiet_e) {
+ main->output.verbosity = f_console_verbosity_quiet_e;
+ main->error.verbosity = f_console_verbosity_quiet_e;
+ main->warning.verbosity = f_console_verbosity_quiet_e;
+ }
+ else if (choice == byte_dump_parameter_verbosity_normal_e) {
+ main->output.verbosity = f_console_verbosity_normal_e;
+ main->error.verbosity = f_console_verbosity_normal_e;
+ main->warning.verbosity = f_console_verbosity_normal_e;
+ }
+ else if (choice == byte_dump_parameter_verbosity_verbose_e) {
+ main->output.verbosity = f_console_verbosity_verbose_e;
+ main->error.verbosity = f_console_verbosity_verbose_e;
+ main->warning.verbosity = f_console_verbosity_verbose_e;
+ }
+ else if (choice == byte_dump_parameter_verbosity_debug_e) {
+ main->output.verbosity = f_console_verbosity_debug_e;
+ main->error.verbosity = f_console_verbosity_debug_e;
+ main->warning.verbosity = f_console_verbosity_debug_e;
}
+ }
- // Identify priority of mode parameters.
- {
- f_console_parameter_id_t ids[5] = { byte_dump_parameter_hexidecimal_e, byte_dump_parameter_duodecimal_e, byte_dump_parameter_octal_e, byte_dump_parameter_binary_e, byte_dump_parameter_decimal_e };
- f_console_parameter_id_t choice = byte_dump_parameter_hexidecimal_e;
- const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 5);
+ // Identify priority of mode parameters.
+ {
+ f_console_parameter_id_t ids[5] = { byte_dump_parameter_hexidecimal_e, byte_dump_parameter_duodecimal_e, byte_dump_parameter_octal_e, byte_dump_parameter_binary_e, byte_dump_parameter_decimal_e };
+ f_console_parameter_id_t choice = byte_dump_parameter_hexidecimal_e;
+ const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 5);
- status = f_console_parameter_prioritize_right(parameters, choices, &choice);
+ status = f_console_parameter_prioritize_right(main->parameters, choices, &choice);
- if (F_status_is_error(status)) {
- fll_error_print(main->error, F_status_set_fine(status), "f_console_parameter_prioritize_right", F_true);
+ if (F_status_is_error(status)) {
+ fll_error_print(main->error, F_status_set_fine(status), "f_console_parameter_prioritize_right", F_true);
- byte_dump_main_delete(main);
+ byte_dump_main_delete(main);
- return F_status_set_error(status);
- }
+ return F_status_set_error(status);
+ }
- if (choice == byte_dump_parameter_hexidecimal_e) {
- main->mode = byte_dump_mode_hexidecimal_e;
- }
- else if (choice == byte_dump_parameter_duodecimal_e) {
- main->mode = byte_dump_mode_duodecimal_e;
- }
- else if (choice == byte_dump_parameter_octal_e) {
- main->mode = byte_dump_mode_octal_e;
- }
- else if (choice == byte_dump_parameter_binary_e) {
- main->mode = byte_dump_mode_binary_e;
- }
- else if (choice == byte_dump_parameter_decimal_e) {
- main->mode = byte_dump_mode_decimal_e;
- }
+ if (choice == byte_dump_parameter_hexidecimal_e) {
+ main->mode = byte_dump_mode_hexidecimal_e;
+ }
+ else if (choice == byte_dump_parameter_duodecimal_e) {
+ main->mode = byte_dump_mode_duodecimal_e;
}
+ else if (choice == byte_dump_parameter_octal_e) {
+ main->mode = byte_dump_mode_octal_e;
+ }
+ else if (choice == byte_dump_parameter_binary_e) {
+ main->mode = byte_dump_mode_binary_e;
+ }
+ else if (choice == byte_dump_parameter_decimal_e) {
+ main->mode = byte_dump_mode_decimal_e;
+ }
+ }
- // Identify priority of presentation parameters.
- {
- f_console_parameter_id_t ids[3] = { byte_dump_parameter_normal_e, byte_dump_parameter_simple_e, byte_dump_parameter_classic_e };
- f_console_parameter_id_t choice = byte_dump_parameter_normal_e;
- const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 3);
+ // Identify priority of presentation parameters.
+ {
+ f_console_parameter_id_t ids[3] = { byte_dump_parameter_normal_e, byte_dump_parameter_simple_e, byte_dump_parameter_classic_e };
+ f_console_parameter_id_t choice = byte_dump_parameter_normal_e;
+ const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 3);
- status = f_console_parameter_prioritize_right(parameters, choices, &choice);
+ status = f_console_parameter_prioritize_right(main->parameters, choices, &choice);
- if (F_status_is_error(status)) {
- fll_error_print(main->error, F_status_set_fine(status), "f_console_parameter_prioritize_right", F_true);
+ if (F_status_is_error(status)) {
+ fll_error_print(main->error, F_status_set_fine(status), "f_console_parameter_prioritize_right", F_true);
- byte_dump_main_delete(main);
+ byte_dump_main_delete(main);
- return F_status_set_error(status);
- }
+ return F_status_set_error(status);
+ }
- if (choice == byte_dump_parameter_normal_e) {
- main->presentation = byte_dump_presentation_normal_e;
- }
- else if (choice == byte_dump_parameter_simple_e) {
- main->presentation = byte_dump_presentation_simple_e;
- }
- else if (choice == byte_dump_parameter_classic_e) {
- main->presentation = byte_dump_presentation_classic_e;
- }
+ if (choice == byte_dump_parameter_normal_e) {
+ main->presentation = byte_dump_presentation_normal_e;
+ }
+ else if (choice == byte_dump_parameter_simple_e) {
+ main->presentation = byte_dump_presentation_simple_e;
+ }
+ else if (choice == byte_dump_parameter_classic_e) {
+ main->presentation = byte_dump_presentation_classic_e;
}
+ }
- // Identify priority of narrow and wide parameters.
- {
- f_console_parameter_id_t ids[2] = { byte_dump_parameter_narrow_e, byte_dump_parameter_wide_e };
- f_console_parameter_id_t choice = byte_dump_parameter_wide_e;
- const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 2);
+ // Identify priority of narrow and wide parameters.
+ {
+ f_console_parameter_id_t ids[2] = { byte_dump_parameter_narrow_e, byte_dump_parameter_wide_e };
+ f_console_parameter_id_t choice = byte_dump_parameter_wide_e;
+ const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 2);
- status = f_console_parameter_prioritize_right(parameters, choices, &choice);
+ status = f_console_parameter_prioritize_right(main->parameters, choices, &choice);
- if (F_status_is_error(status)) {
- fll_error_print(main->error, F_status_set_fine(status), "f_console_parameter_prioritize_right", F_true);
+ if (F_status_is_error(status)) {
+ fll_error_print(main->error, F_status_set_fine(status), "f_console_parameter_prioritize_right", F_true);
- byte_dump_main_delete(main);
+ byte_dump_main_delete(main);
- return F_status_set_error(status);
- }
+ return F_status_set_error(status);
+ }
- if (choice == byte_dump_parameter_narrow_e) {
- if (main->options & byte_dump_option_wide_d) {
- main->options -= byte_dump_option_wide_d;
- }
- }
- else if (choice == byte_dump_parameter_wide_e) {
- main->options |= byte_dump_option_wide_d;
+ if (choice == byte_dump_parameter_narrow_e) {
+ if (main->options & byte_dump_option_wide_d) {
+ main->options -= byte_dump_option_wide_d;
}
}
-
- status = F_none;
+ else if (choice == byte_dump_parameter_wide_e) {
+ main->options |= byte_dump_option_wide_d;
+ }
}
- if (main->parameters[byte_dump_parameter_help_e].result == f_console_result_found_e) {
+ f_string_static_t * const argv = main->parameters.arguments.array;
+
+ status = F_none;
+
+ if (main->parameters.array[byte_dump_parameter_help_e].result == f_console_result_found_e) {
byte_dump_print_help(main->output.to, main->context);
byte_dump_main_delete(main);
return F_none;
}
- if (main->parameters[byte_dump_parameter_version_e].result == f_console_result_found_e) {
+ if (main->parameters.array[byte_dump_parameter_version_e].result == f_console_result_found_e) {
fll_program_print_version(main->output.to, byte_dump_program_version_s);
byte_dump_main_delete(main);
}
if (main->remaining.used || main->process_pipe) {
- if (main->parameters[byte_dump_parameter_width_e].result == f_console_result_found_e) {
+ if (main->parameters.array[byte_dump_parameter_width_e].result == f_console_result_found_e) {
flockfile(main->error.to.stream);
fl_print_format("%[%QThe parameter '%]", main->error.to.stream, main->context.set.error, main->error.prefix, main->context.set.error);
return F_status_set_error(F_parameter);
}
- if (main->parameters[byte_dump_parameter_width_e].result == f_console_result_additional_e) {
- const f_array_length_t index = main->parameters[byte_dump_parameter_width_e].values.array[main->parameters[byte_dump_parameter_width_e].values.used - 1];
- const f_string_range_t range = macro_f_string_range_t_initialize(strlen(arguments->argv[index]));
+ if (main->parameters.array[byte_dump_parameter_width_e].result == f_console_result_additional_e) {
+ const f_array_length_t index = main->parameters.array[byte_dump_parameter_width_e].values.array[main->parameters.array[byte_dump_parameter_width_e].values.used - 1];
+ const f_string_range_t range = macro_f_string_range_t_initialize(argv[index].used);
f_number_unsigned_t number = 0;
- status = fl_conversion_string_to_number_unsigned(arguments->argv[index], range, &number);
+ status = fl_conversion_string_to_number_unsigned(argv[index].string, range, &number);
if (F_status_is_error(status) || number < 1 || number >= 0xfb) {
flockfile(main->error.to.stream);
main->width = (uint8_t) number;
}
- if (main->parameters[byte_dump_parameter_first_e].result == f_console_result_found_e) {
+ if (main->parameters.array[byte_dump_parameter_first_e].result == f_console_result_found_e) {
flockfile(main->error.to.stream);
fl_print_format("%[%QThe parameter '%]", main->error.to.stream, main->context.set.error, main->error.prefix, main->context.set.error);
return F_status_set_error(F_parameter);
}
- if (main->parameters[byte_dump_parameter_first_e].result == f_console_result_additional_e) {
- const f_array_length_t index = main->parameters[byte_dump_parameter_first_e].values.array[main->parameters[byte_dump_parameter_first_e].values.used - 1];
- const f_string_range_t range = macro_f_string_range_t_initialize(strlen(arguments->argv[index]));
+ if (main->parameters.array[byte_dump_parameter_first_e].result == f_console_result_additional_e) {
+ const f_array_length_t index = main->parameters.array[byte_dump_parameter_first_e].values.array[main->parameters.array[byte_dump_parameter_first_e].values.used - 1];
+ const f_string_range_t range = macro_f_string_range_t_initialize(argv[index].used);
f_number_unsigned_t number = 0;
- status = fl_conversion_string_to_number_unsigned(arguments->argv[index], range, &number);
+ status = fl_conversion_string_to_number_unsigned(argv[index].string, range, &number);
if (F_status_is_error(status) || number > F_number_t_size_unsigned_d) {
flockfile(main->error.to.stream);
main->first = number;
}
- if (main->parameters[byte_dump_parameter_last_e].result == f_console_result_found_e) {
+ if (main->parameters.array[byte_dump_parameter_last_e].result == f_console_result_found_e) {
flockfile(main->error.to.stream);
fl_print_format("%[%QThe parameter '%]", main->error.to.stream, main->context.set.error, main->error.prefix, main->context.set.error);
return F_status_set_error(F_parameter);
}
- if (main->parameters[byte_dump_parameter_last_e].result == f_console_result_additional_e) {
- const f_array_length_t index = main->parameters[byte_dump_parameter_last_e].values.array[main->parameters[byte_dump_parameter_last_e].values.used - 1];
- const f_string_range_t range = macro_f_string_range_t_initialize(strlen(arguments->argv[index]));
+ if (main->parameters.array[byte_dump_parameter_last_e].result == f_console_result_additional_e) {
+ const f_array_length_t index = main->parameters.array[byte_dump_parameter_last_e].values.array[main->parameters.array[byte_dump_parameter_last_e].values.used - 1];
+ const f_string_range_t range = macro_f_string_range_t_initialize(argv[index].used);
f_number_unsigned_t number = 0;
- status = fl_conversion_string_to_number_unsigned(arguments->argv[index], range, &number);
+ status = fl_conversion_string_to_number_unsigned(argv[index].string, range, &number);
if (F_status_is_error(status) || number < 0 || number > F_number_t_size_unsigned_d) {
flockfile(main->error.to.stream);
main->last = number;
}
- if (main->parameters[byte_dump_parameter_first_e].result == f_console_result_additional_e && main->parameters[byte_dump_parameter_last_e].result == f_console_result_additional_e) {
+ if (main->parameters.array[byte_dump_parameter_first_e].result == f_console_result_additional_e && main->parameters.array[byte_dump_parameter_last_e].result == f_console_result_additional_e) {
if (main->first > main->last) {
flockfile(main->error.to.stream);
funlockfile(main->output.to.stream);
- status = byte_dump_file(main, 0, file);
+ status = byte_dump_file(main, f_string_empty_s, file);
if (F_status_is_error(status)) {
fll_error_print(main->error, F_status_set_fine(status), "byte_dump_file", F_true);
for (f_array_length_t counter = 0; counter < main->remaining.used; ++counter) {
- status = f_file_exists(arguments->argv[main->remaining.array[counter]]);
+ status = f_file_exists(argv[main->remaining.array[counter]]);
if (status == F_false) {
status = F_status_set_error(F_file_found_not);
missing_files = status;
}
- fll_error_file_print(main->error, F_status_set_fine(status), "f_file_exists", F_true, arguments->argv[main->remaining.array[counter]], "open", fll_error_file_type_file_e);
+ fll_error_file_print(main->error, F_status_set_fine(status), "f_file_exists", F_true, argv[main->remaining.array[counter]], f_file_operation_open_s, fll_error_file_type_file_e);
}
} // for
for (f_array_length_t counter = 0; counter < main->remaining.used; ++counter) {
- status = f_file_stream_open(arguments->argv[main->remaining.array[counter]], 0, &file);
+ status = f_file_stream_open(argv[main->remaining.array[counter]], f_string_empty_s, &file);
if (F_status_is_error(status)) {
- fll_error_file_print(main->error, F_status_set_fine(status), "f_file_open", F_true, arguments->argv[main->remaining.array[counter]], "open", fll_error_file_type_file_e);
+ fll_error_file_print(main->error, F_status_set_fine(status), "f_file_open", F_true, argv[main->remaining.array[counter]], f_file_operation_open_s, fll_error_file_type_file_e);
byte_dump_main_delete(main);
flockfile(main->output.to.stream);
- f_print_dynamic(f_string_eol_s, main->output.to.stream);
- fl_print_format("%[Byte Dump of: %]%[", main->output.to.stream, main->context.set.title, main->context.set.title, main->context.set.notable);
- fl_print_format("%S%] %[(in ", main->output.to.stream, arguments->argv[main->remaining.array[counter]], main->context.set.notable, main->context.set.title);
+ fl_print_format("%q%[Byte Dump of: %]%[", main->output.to.stream, f_string_eol_s, main->context.set.title, main->context.set.title, main->context.set.notable);
+ fl_print_format("%Q%] %[(in ", main->output.to.stream, argv[main->remaining.array[counter]], main->context.set.notable, main->context.set.title);
if (main->mode == byte_dump_mode_hexidecimal_e) {
f_print_terminated("Hexidecimal", main->output.to.stream);
funlockfile(main->output.to.stream);
- status = byte_dump_file(main, arguments->argv[main->remaining.array[counter]], file);
+ status = byte_dump_file(main, argv[main->remaining.array[counter]], file);
f_file_stream_close(F_true, &file);
}
else {
if (main->error.verbosity != f_console_verbosity_quiet_e) {
- fll_error_file_print(main->error, F_status_set_fine(status), "byte_dump_file", F_true, arguments->argv[main->remaining.array[counter]], "process", fll_error_file_type_file_e);
+ fll_error_file_print(main->error, F_status_set_fine(status), "byte_dump_file", F_true, argv[main->remaining.array[counter]], f_file_operation_process_s, fll_error_file_type_file_e);
}
}
}
}
else {
- fll_print_format("%[%QYou failed to specify one or more filenames.%]%q", main->error.to.stream, main->context.set.error, main->error.prefix, main->context.set.error, f_string_eol_s);
+ fll_print_format("%q%[%QYou failed to specify one or more filenames.%]%q", main->error.to.stream, f_string_eol_s, main->context.set.error, main->error.prefix, main->context.set.error, f_string_eol_s);
+
status = F_status_set_error(F_parameter);
}
#endif
#ifndef _di_byte_dump_program_version_
- const f_string_static_t byte_dump_program_version_s = macro_f_string_static_t_initialize2(BYTE_DUMP_program_version_s, 0, BYTE_DUMP_program_version_s_length);
+ const f_string_static_t byte_dump_program_version_s = macro_f_string_static_t_initialize(BYTE_DUMP_program_version_s, 0, BYTE_DUMP_program_version_s_length);
#endif // _di_byte_dump_program_version_
#ifndef _di_byte_dump_program_name_
- const f_string_static_t byte_dump_program_name_s = macro_f_string_static_t_initialize2(BYTE_DUMP_program_name_s, 0, BYTE_DUMP_program_name_s_length);
- const f_string_static_t byte_dump_program_name_long_s = macro_f_string_static_t_initialize2(BYTE_DUMP_program_name_long_s, 0, BYTE_DUMP_program_name_long_s_length);
+ const f_string_static_t byte_dump_program_name_s = macro_f_string_static_t_initialize(BYTE_DUMP_program_name_s, 0, BYTE_DUMP_program_name_s_length);
+ const f_string_static_t byte_dump_program_name_long_s = macro_f_string_static_t_initialize(BYTE_DUMP_program_name_long_s, 0, BYTE_DUMP_program_name_long_s_length);
#endif // _di_byte_dump_program_name_
#ifndef _di_byte_dump_program_help_parameters_
- const f_string_static_t byte_dump_program_help_parameters_s = macro_f_string_static_t_initialize2(BYTE_DUMP_program_help_parameters_s, 0, BYTE_DUMP_program_help_parameters_s_length);
+ const f_string_static_t byte_dump_program_help_parameters_s = macro_f_string_static_t_initialize(BYTE_DUMP_program_help_parameters_s, 0, BYTE_DUMP_program_help_parameters_s_length);
#endif // _di_byte_dump_program_help_parameters_
#ifndef _di_byte_dump_defines_
- const f_string_static_t byte_dump_character_wall_s = macro_f_string_static_t_initialize2(BYTE_DUMP_character_wall_s, 0, BYTE_DUMP_character_wall_s_length);
- const f_string_static_t byte_dump_character_placeholder_s = macro_f_string_static_t_initialize2(BYTE_DUMP_character_placeholder_s, 0, BYTE_DUMP_character_placeholder_s_length);
- const f_string_static_t byte_dump_character_incomplete_s = macro_f_string_static_t_initialize2(BYTE_DUMP_character_incomplete_s, 0, BYTE_DUMP_character_incomplete_s_length);
- const f_string_static_t byte_dump_character_unused_s = macro_f_string_static_t_initialize2(BYTE_DUMP_character_unused_s, 0, BYTE_DUMP_character_unused_s_length);
-
- const f_string_static_t byte_dump_short_binary_s = macro_f_string_static_t_initialize2(BYTE_DUMP_short_binary_s, 0, BYTE_DUMP_short_binary_s_length);
- const f_string_static_t byte_dump_short_decimal_s = macro_f_string_static_t_initialize2(BYTE_DUMP_short_decimal_s, 0, BYTE_DUMP_short_decimal_s_length);
- const f_string_static_t byte_dump_short_duodecimal_s = macro_f_string_static_t_initialize2(BYTE_DUMP_short_duodecimal_s, 0, BYTE_DUMP_short_duodecimal_s_length);
- const f_string_static_t byte_dump_short_hexidecimal_s = macro_f_string_static_t_initialize2(BYTE_DUMP_short_hexidecimal_s, 0, BYTE_DUMP_short_hexidecimal_s_length);
- const f_string_static_t byte_dump_short_octal_s = macro_f_string_static_t_initialize2(BYTE_DUMP_short_octal_s, 0, BYTE_DUMP_short_octal_s_length);
- const f_string_static_t byte_dump_short_unicode_s = macro_f_string_static_t_initialize2(BYTE_DUMP_short_unicode_s, 0, BYTE_DUMP_short_unicode_s_length);
-
- const f_string_static_t byte_dump_short_first_s = macro_f_string_static_t_initialize2(BYTE_DUMP_short_first_s, 0, BYTE_DUMP_short_first_s_length);
- const f_string_static_t byte_dump_short_last_s = macro_f_string_static_t_initialize2(BYTE_DUMP_short_last_s, 0, BYTE_DUMP_short_last_s_length);
-
- const f_string_static_t byte_dump_short_narrow_s = macro_f_string_static_t_initialize2(BYTE_DUMP_short_narrow_s, 0, BYTE_DUMP_short_narrow_s_length);
- const f_string_static_t byte_dump_short_placeholder_s = macro_f_string_static_t_initialize2(BYTE_DUMP_short_placeholder_s, 0, BYTE_DUMP_short_placeholder_s_length);
- const f_string_static_t byte_dump_short_text_s = macro_f_string_static_t_initialize2(BYTE_DUMP_short_text_s, 0, BYTE_DUMP_short_text_s_length);
- const f_string_static_t byte_dump_short_wide_s = macro_f_string_static_t_initialize2(BYTE_DUMP_short_wide_s, 0, BYTE_DUMP_short_wide_s_length);
- const f_string_static_t byte_dump_short_width_s = macro_f_string_static_t_initialize2(BYTE_DUMP_short_width_s, 0, BYTE_DUMP_short_width_s_length);
-
- const f_string_static_t byte_dump_long_binary_s = macro_f_string_static_t_initialize2(BYTE_DUMP_long_binary_s, 0, BYTE_DUMP_long_binary_s_length);
- const f_string_static_t byte_dump_long_decimal_s = macro_f_string_static_t_initialize2(BYTE_DUMP_long_decimal_s, 0, BYTE_DUMP_long_decimal_s_length);
- const f_string_static_t byte_dump_long_duodecimal_s = macro_f_string_static_t_initialize2(BYTE_DUMP_long_duodecimal_s, 0, BYTE_DUMP_long_duodecimal_s_length);
- const f_string_static_t byte_dump_long_hexidecimal_s = macro_f_string_static_t_initialize2(BYTE_DUMP_long_hexidecimal_s, 0, BYTE_DUMP_long_hexidecimal_s_length);
- const f_string_static_t byte_dump_long_octal_s = macro_f_string_static_t_initialize2(BYTE_DUMP_long_octal_s, 0, BYTE_DUMP_long_octal_s_length);
- const f_string_static_t byte_dump_long_unicode_s = macro_f_string_static_t_initialize2(BYTE_DUMP_long_unicode_s, 0, BYTE_DUMP_long_unicode_s_length);
-
- const f_string_static_t byte_dump_long_first_s = macro_f_string_static_t_initialize2(BYTE_DUMP_long_first_s, 0, BYTE_DUMP_long_first_s_length);
- const f_string_static_t byte_dump_long_last_s = macro_f_string_static_t_initialize2(BYTE_DUMP_long_last_s, 0, BYTE_DUMP_long_last_s_length);
-
- const f_string_static_t byte_dump_long_narrow_s = macro_f_string_static_t_initialize2(BYTE_DUMP_long_narrow_s, 0, BYTE_DUMP_long_narrow_s_length);
- const f_string_static_t byte_dump_long_placeholder_s = macro_f_string_static_t_initialize2(BYTE_DUMP_long_placeholder_s, 0, BYTE_DUMP_long_placeholder_s_length);
- const f_string_static_t byte_dump_long_text_s = macro_f_string_static_t_initialize2(BYTE_DUMP_long_text_s, 0, BYTE_DUMP_long_text_s_length);
- const f_string_static_t byte_dump_long_wide_s = macro_f_string_static_t_initialize2(BYTE_DUMP_long_wide_s, 0, BYTE_DUMP_long_wide_s_length);
- const f_string_static_t byte_dump_long_width_s = macro_f_string_static_t_initialize2(BYTE_DUMP_long_width_s, 0, BYTE_DUMP_long_width_s_length);
-
- const f_string_static_t byte_dump_long_normal_s = macro_f_string_static_t_initialize2(BYTE_DUMP_long_normal_s, 0, BYTE_DUMP_long_normal_s_length);
- const f_string_static_t byte_dump_long_simple_s = macro_f_string_static_t_initialize2(BYTE_DUMP_long_simple_s, 0, BYTE_DUMP_long_simple_s_length);
- const f_string_static_t byte_dump_long_classic_s = macro_f_string_static_t_initialize2(BYTE_DUMP_long_classic_s, 0, BYTE_DUMP_long_classic_s_length);
+ const f_string_static_t byte_dump_character_wall_s = macro_f_string_static_t_initialize(BYTE_DUMP_character_wall_s, 0, BYTE_DUMP_character_wall_s_length);
+ const f_string_static_t byte_dump_character_placeholder_s = macro_f_string_static_t_initialize(BYTE_DUMP_character_placeholder_s, 0, BYTE_DUMP_character_placeholder_s_length);
+ const f_string_static_t byte_dump_character_incomplete_s = macro_f_string_static_t_initialize(BYTE_DUMP_character_incomplete_s, 0, BYTE_DUMP_character_incomplete_s_length);
+ const f_string_static_t byte_dump_character_unused_s = macro_f_string_static_t_initialize(BYTE_DUMP_character_unused_s, 0, BYTE_DUMP_character_unused_s_length);
+
+ const f_string_static_t byte_dump_short_binary_s = macro_f_string_static_t_initialize(BYTE_DUMP_short_binary_s, 0, BYTE_DUMP_short_binary_s_length);
+ const f_string_static_t byte_dump_short_decimal_s = macro_f_string_static_t_initialize(BYTE_DUMP_short_decimal_s, 0, BYTE_DUMP_short_decimal_s_length);
+ const f_string_static_t byte_dump_short_duodecimal_s = macro_f_string_static_t_initialize(BYTE_DUMP_short_duodecimal_s, 0, BYTE_DUMP_short_duodecimal_s_length);
+ const f_string_static_t byte_dump_short_hexidecimal_s = macro_f_string_static_t_initialize(BYTE_DUMP_short_hexidecimal_s, 0, BYTE_DUMP_short_hexidecimal_s_length);
+ const f_string_static_t byte_dump_short_octal_s = macro_f_string_static_t_initialize(BYTE_DUMP_short_octal_s, 0, BYTE_DUMP_short_octal_s_length);
+ const f_string_static_t byte_dump_short_unicode_s = macro_f_string_static_t_initialize(BYTE_DUMP_short_unicode_s, 0, BYTE_DUMP_short_unicode_s_length);
+
+ const f_string_static_t byte_dump_short_first_s = macro_f_string_static_t_initialize(BYTE_DUMP_short_first_s, 0, BYTE_DUMP_short_first_s_length);
+ const f_string_static_t byte_dump_short_last_s = macro_f_string_static_t_initialize(BYTE_DUMP_short_last_s, 0, BYTE_DUMP_short_last_s_length);
+
+ const f_string_static_t byte_dump_short_narrow_s = macro_f_string_static_t_initialize(BYTE_DUMP_short_narrow_s, 0, BYTE_DUMP_short_narrow_s_length);
+ const f_string_static_t byte_dump_short_placeholder_s = macro_f_string_static_t_initialize(BYTE_DUMP_short_placeholder_s, 0, BYTE_DUMP_short_placeholder_s_length);
+ const f_string_static_t byte_dump_short_text_s = macro_f_string_static_t_initialize(BYTE_DUMP_short_text_s, 0, BYTE_DUMP_short_text_s_length);
+ const f_string_static_t byte_dump_short_wide_s = macro_f_string_static_t_initialize(BYTE_DUMP_short_wide_s, 0, BYTE_DUMP_short_wide_s_length);
+ const f_string_static_t byte_dump_short_width_s = macro_f_string_static_t_initialize(BYTE_DUMP_short_width_s, 0, BYTE_DUMP_short_width_s_length);
+
+ const f_string_static_t byte_dump_long_binary_s = macro_f_string_static_t_initialize(BYTE_DUMP_long_binary_s, 0, BYTE_DUMP_long_binary_s_length);
+ const f_string_static_t byte_dump_long_decimal_s = macro_f_string_static_t_initialize(BYTE_DUMP_long_decimal_s, 0, BYTE_DUMP_long_decimal_s_length);
+ const f_string_static_t byte_dump_long_duodecimal_s = macro_f_string_static_t_initialize(BYTE_DUMP_long_duodecimal_s, 0, BYTE_DUMP_long_duodecimal_s_length);
+ const f_string_static_t byte_dump_long_hexidecimal_s = macro_f_string_static_t_initialize(BYTE_DUMP_long_hexidecimal_s, 0, BYTE_DUMP_long_hexidecimal_s_length);
+ const f_string_static_t byte_dump_long_octal_s = macro_f_string_static_t_initialize(BYTE_DUMP_long_octal_s, 0, BYTE_DUMP_long_octal_s_length);
+ const f_string_static_t byte_dump_long_unicode_s = macro_f_string_static_t_initialize(BYTE_DUMP_long_unicode_s, 0, BYTE_DUMP_long_unicode_s_length);
+
+ const f_string_static_t byte_dump_long_first_s = macro_f_string_static_t_initialize(BYTE_DUMP_long_first_s, 0, BYTE_DUMP_long_first_s_length);
+ const f_string_static_t byte_dump_long_last_s = macro_f_string_static_t_initialize(BYTE_DUMP_long_last_s, 0, BYTE_DUMP_long_last_s_length);
+
+ const f_string_static_t byte_dump_long_narrow_s = macro_f_string_static_t_initialize(BYTE_DUMP_long_narrow_s, 0, BYTE_DUMP_long_narrow_s_length);
+ const f_string_static_t byte_dump_long_placeholder_s = macro_f_string_static_t_initialize(BYTE_DUMP_long_placeholder_s, 0, BYTE_DUMP_long_placeholder_s_length);
+ const f_string_static_t byte_dump_long_text_s = macro_f_string_static_t_initialize(BYTE_DUMP_long_text_s, 0, BYTE_DUMP_long_text_s_length);
+ const f_string_static_t byte_dump_long_wide_s = macro_f_string_static_t_initialize(BYTE_DUMP_long_wide_s, 0, BYTE_DUMP_long_wide_s_length);
+ const f_string_static_t byte_dump_long_width_s = macro_f_string_static_t_initialize(BYTE_DUMP_long_width_s, 0, BYTE_DUMP_long_width_s_length);
+
+ const f_string_static_t byte_dump_long_normal_s = macro_f_string_static_t_initialize(BYTE_DUMP_long_normal_s, 0, BYTE_DUMP_long_normal_s_length);
+ const f_string_static_t byte_dump_long_simple_s = macro_f_string_static_t_initialize(BYTE_DUMP_long_simple_s, 0, BYTE_DUMP_long_simple_s_length);
+ const f_string_static_t byte_dump_long_classic_s = macro_f_string_static_t_initialize(BYTE_DUMP_long_classic_s, 0, BYTE_DUMP_long_classic_s_length);
#endif // _di_byte_dump_defines_
#ifndef _di_byte_dump_main_delete_
f_status_t byte_dump_main_delete(byte_dump_main_t * const main) {
- for (f_array_length_t i = 0; i < byte_dump_total_parameters_d; ++i) {
-
- f_type_array_lengths_resize(0, &main->parameters[i].locations);
- f_type_array_lengths_resize(0, &main->parameters[i].locations_sub);
- f_type_array_lengths_resize(0, &main->parameters[i].values);
- } // for
+ f_console_parameters_delete(&main->parameters);
f_type_array_lengths_resize(0, &main->remaining);
#ifndef _di_byte_dump_main_t_
typedef struct {
- f_console_parameter_t parameters[byte_dump_total_parameters_d];
+ f_console_parameters_t parameters;
f_array_lengths_t remaining;
bool process_pipe;
#define byte_dump_main_t_initialize \
{ \
- byte_dump_console_parameter_t_initialize, \
+ f_console_parameters_t_initialize, \
f_array_lengths_t_initialize, \
F_false, \
fl_print_t_initialize, \
#endif
#ifndef _di_byte_dump_file_
- f_status_t byte_dump_file(byte_dump_main_t * const main, const f_string_t file_name, const f_file_t file) {
+ f_status_t byte_dump_file(byte_dump_main_t * const main, const f_string_static_t file_name, const f_file_t file) {
f_status_t status = F_none;
offset = main->first % main->width;
// fseek() cannot be used on a PIPE, so read instead of seek.
- if (file_name) {
+ if (file_name.used) {
byte_get = fseek(file.stream, main->first, SEEK_SET);
}
else {
while (cell.column < main->width) {
- if (main->parameters[byte_dump_parameter_unicode_e].result == f_console_result_found_e) {
+ if (main->parameters.array[byte_dump_parameter_unicode_e].result == f_console_result_found_e) {
f_print_terminated(" ", main->output.to.stream);
}
else if (main->mode == byte_dump_mode_hexidecimal_e) {
++cell.column;
if (cell.column < main->width) {
- if (main->parameters[byte_dump_parameter_unicode_e].result == f_console_result_found_e) {
+ if (main->parameters.array[byte_dump_parameter_unicode_e].result == f_console_result_found_e) {
if (!(cell.column % 4)) {
f_print_dynamic(f_string_space_s, main->output.to.stream);
}
}
} // while
- if (main->parameters[byte_dump_parameter_text_e].result == f_console_result_found_e) {
+ if (main->parameters.array[byte_dump_parameter_text_e].result == f_console_result_found_e) {
byte_dump_print_text(main, characters, invalid, &previous, &offset);
}
else {
flockfile(main->error.to.stream);
fl_print_format("%[Invalid UTF-8 codes were detected for file '%]", main->error.to.stream, main->context.set.error, main->context.set.error);
- fl_print_format("%[%S%]", main->error.to.stream, main->context.set.notable, file_name ? file_name : "-", main->context.set.notable);
+ fl_print_format("%[%Q%]", main->error.to.stream, main->context.set.notable, file_name.used ? file_name : f_string_ascii_minus_s, main->context.set.notable);
fl_print_format("%['.%]%q%q", main->error.to.stream, main->context.set.error, main->context.set.error, f_string_eol_s, f_string_eol_s);
funlockfile(main->error.to.stream);
flockfile(main->error.to.stream);
fl_print_format("%[%Qread() failed for '%]", main->error.to.stream, main->context.set.error, main->error.prefix, main->context.set.error);
- fl_print_format("%[%S%]", main->error.to.stream, main->context.set.notable, file_name ? file_name : "-", main->context.set.notable);
+ fl_print_format("%[%Q%]", main->error.to.stream, main->context.set.notable, file_name.used ? file_name : f_string_ascii_minus_s, main->context.set.notable);
fl_print_format("%['.%]%q%q", main->error.to.stream, main->context.set.error, main->context.set.error, f_string_eol_s, f_string_eol_s);
funlockfile(main->error.to.stream);
// Pad the buffer with spaces to hide any skipped bytes (skipped via --first).
while (offset_to_print && cell->column < main->width) {
- if (main->parameters[byte_dump_parameter_unicode_e].result == f_console_result_found_e) {
+ if (main->parameters.array[byte_dump_parameter_unicode_e].result == f_console_result_found_e) {
f_print_terminated(" ", main->output.to.stream);
}
else if (main->mode == byte_dump_mode_hexidecimal_e) {
++cell->column;
if (cell->column < main->width) {
- if (main->parameters[byte_dump_parameter_unicode_e].result == f_console_result_found_e) {
+ if (main->parameters.array[byte_dump_parameter_unicode_e].result == f_console_result_found_e) {
if (!(cell->column % 4)) {
f_print_dynamic(f_string_space_s, main->output.to.stream);
}
}
if (cell->column < main->width) {
- if (main->parameters[byte_dump_parameter_unicode_e].result == f_console_result_found_e && !invalid[character_current]) {
+ if (main->parameters.array[byte_dump_parameter_unicode_e].result == f_console_result_found_e && !invalid[character_current]) {
if (byte_current == 1) {
uint32_t unicode = 0;
}
else {
if (main->mode == byte_dump_mode_hexidecimal_e) {
- if (main->parameters[byte_dump_parameter_unicode_e].result == f_console_result_found_e) {
+ if (main->parameters.array[byte_dump_parameter_unicode_e].result == f_console_result_found_e) {
f_print_terminated(" ", main->output.to.stream);
}
}
}
else if (main->mode == byte_dump_mode_duodecimal_e) {
- if (main->parameters[byte_dump_parameter_unicode_e].result == f_console_result_found_e) {
+ if (main->parameters.array[byte_dump_parameter_unicode_e].result == f_console_result_found_e) {
f_print_terminated(" ", main->output.to.stream);
}
}
}
else if (main->mode == byte_dump_mode_octal_e) {
- if (main->parameters[byte_dump_parameter_unicode_e].result == f_console_result_found_e) {
+ if (main->parameters.array[byte_dump_parameter_unicode_e].result == f_console_result_found_e) {
f_print_terminated(" ", main->output.to.stream);
}
}
}
else if (main->mode == byte_dump_mode_decimal_e) {
- if (main->parameters[byte_dump_parameter_unicode_e].result == f_console_result_found_e) {
+ if (main->parameters.array[byte_dump_parameter_unicode_e].result == f_console_result_found_e) {
f_print_terminated(" ", main->output.to.stream);
}
reset = F_true;
- if (main->parameters[byte_dump_parameter_text_e].result == f_console_result_found_e) {
+ if (main->parameters.array[byte_dump_parameter_text_e].result == f_console_result_found_e) {
byte_dump_print_text(main, characters, invalid, previous, offset);
}
else {
}
}
else {
- if (main->parameters[byte_dump_parameter_unicode_e].result == f_console_result_found_e) {
+ if (main->parameters.array[byte_dump_parameter_unicode_e].result == f_console_result_found_e) {
if (!(cell->column % 4)) {
f_print_dynamic(f_string_space_s, main->output.to.stream);
}
fl_print_format(" %[%q%] ", main->output.to.stream, main->context.set.notable, byte_dump_character_wall_s, main->context.set.notable);
if (*offset) {
- if (main->parameters[byte_dump_parameter_classic_e].result == f_console_result_found_e) {
+ if (main->parameters.array[byte_dump_parameter_classic_e].result == f_console_result_found_e) {
while (*offset && at < main->width) {
f_print_dynamic(f_string_ascii_period_s, main->output.to.stream);
} // while
}
else {
- if (main->parameters[byte_dump_parameter_placeholder_e].result == f_console_result_found_e) {
+ if (main->parameters.array[byte_dump_parameter_placeholder_e].result == f_console_result_found_e) {
for (; *offset && at < main->width; --(*offset), ++at) {
fl_print_format("%[%q%]", main->output.to.stream, main->context.set.warning, byte_dump_character_placeholder_s, main->context.set.warning);
}
if (previous->bytes) {
- if (main->parameters[byte_dump_parameter_placeholder_e].result == f_console_result_found_e) {
+ if (main->parameters.array[byte_dump_parameter_placeholder_e].result == f_console_result_found_e) {
for (; at < previous->bytes && at < main->width; ++at) {
if (previous->invalid) {
fl_print_format("%[%q%]", main->output.to.stream, main->context.set.error, byte_dump_character_placeholder_s, main->context.set.error);
}
- else if (main->parameters[byte_dump_parameter_classic_e].result == f_console_result_found_e) {
+ else if (main->parameters.array[byte_dump_parameter_classic_e].result == f_console_result_found_e) {
f_print_dynamic(f_string_ascii_period_s, main->output.to.stream);
}
else {
}
}
else if (f_utf_character_is_whitespace(characters.string[i]) == F_true) {
- if (main->parameters[byte_dump_parameter_classic_e].result == f_console_result_found_e) {
+ if (main->parameters.array[byte_dump_parameter_classic_e].result == f_console_result_found_e) {
f_print_dynamic(f_string_ascii_period_s, main->output.to.stream);
}
else {
if (main->presentation == byte_dump_presentation_classic_e) {
f_print_dynamic(f_string_ascii_period_s, main->output.to.stream);
}
- else if (main->parameters[byte_dump_parameter_placeholder_e].result == f_console_result_found_e) {
+ else if (main->parameters.array[byte_dump_parameter_placeholder_e].result == f_console_result_found_e) {
fl_print_format("%[%[%q%]%]", main->output.to.stream, main->context.set.notable, main->context.set.warning, byte_dump_character_placeholder_s, main->context.set.warning, main->context.set.notable);
}
else {
// Print placeholders when using UTF-8 characters to simulate the spaces bytes used for the character.
if (width_utf > 1 && at + 1 < main->width) {
- if (main->parameters[byte_dump_parameter_placeholder_e].result == f_console_result_found_e) {
+ if (main->parameters.array[byte_dump_parameter_placeholder_e].result == f_console_result_found_e) {
if (invalid[i]) {
fl_print_format("%[%q%]", main->output.to.stream, main->context.set.error, byte_dump_character_placeholder_s, main->context.set.error);
}
- else if (main->parameters[byte_dump_parameter_classic_e].result == f_console_result_found_e) {
+ else if (main->parameters.array[byte_dump_parameter_classic_e].result == f_console_result_found_e) {
f_print_dynamic(f_string_ascii_period_s, main->output.to.stream);
}
else {
++at;
if (width_utf > 2 && at + 1 < main->width) {
- if (main->parameters[byte_dump_parameter_placeholder_e].result == f_console_result_found_e) {
+ if (main->parameters.array[byte_dump_parameter_placeholder_e].result == f_console_result_found_e) {
if (invalid[i]) {
fl_print_format("%[%q%]", main->output.to.stream, main->context.set.error, byte_dump_character_placeholder_s, main->context.set.error);
}
- else if (main->parameters[byte_dump_parameter_classic_e].result == f_console_result_found_e) {
+ else if (main->parameters.array[byte_dump_parameter_classic_e].result == f_console_result_found_e) {
f_print_dynamic(f_string_ascii_period_s, main->output.to.stream);
}
else {
++at;
if (width_utf > 3 && at + 1 < main->width) {
- if (main->parameters[byte_dump_parameter_placeholder_e].result == f_console_result_found_e) {
+ if (main->parameters.array[byte_dump_parameter_placeholder_e].result == f_console_result_found_e) {
if (invalid[i]) {
fl_print_format("%[%q%]", main->output.to.stream, main->context.set.error, byte_dump_character_placeholder_s, main->context.set.error);
}
- else if (main->parameters[byte_dump_parameter_classic_e].result == f_console_result_found_e) {
+ else if (main->parameters.array[byte_dump_parameter_classic_e].result == f_console_result_found_e) {
f_print_dynamic(f_string_ascii_period_s, main->output.to.stream);
}
else {
} // for
// Print placeholder for the remaining parts of the line.
- if (main->parameters[byte_dump_parameter_placeholder_e].result == f_console_result_found_e) {
+ if (main->parameters.array[byte_dump_parameter_placeholder_e].result == f_console_result_found_e) {
for (; at < main->width; ++at) {
if (invalid[at]) {
fl_print_format("%[%q%]", main->output.to.stream, main->context.set.error, byte_dump_character_placeholder_s, main->context.set.error);
}
- else if (main->parameters[byte_dump_parameter_classic_e].result == f_console_result_found_e) {
+ else if (main->parameters.array[byte_dump_parameter_classic_e].result == f_console_result_found_e) {
f_print_dynamic(f_string_ascii_period_s, main->output.to.stream);
}
else {
* F_interrupt (with error bit) on receiving a process signal, such as an interrupt signal.
*/
#ifndef _di_byte_dump_file_
- extern f_status_t byte_dump_file(byte_dump_main_t * const main, const f_string_t file_name, const f_file_t file) F_attribute_visibility_internal_d;
+ extern f_status_t byte_dump_file(byte_dump_main_t * const main, const f_string_static_t file_name, const f_file_t file) F_attribute_visibility_internal_d;
#endif // _di_byte_dump_file_
/**
#endif
#ifndef _di_control_program_version_
- const f_string_static_t control_program_version_s = macro_f_string_static_t_initialize2(CONTROL_program_version_s, 0, CONTROL_program_version_s_length);
+ const f_string_static_t control_program_version_s = macro_f_string_static_t_initialize(CONTROL_program_version_s, 0, CONTROL_program_version_s_length);
#endif // _di_control_program_version_
#ifndef _di_control_program_name_
- const f_string_static_t control_program_name_s = macro_f_string_static_t_initialize2(CONTROL_program_name_s, 0, CONTROL_program_name_s_length);
- const f_string_static_t control_program_name_long_s = macro_f_string_static_t_initialize2(CONTROL_program_name_long_s, 0, CONTROL_program_name_long_s_length);
+ const f_string_static_t control_program_name_s = macro_f_string_static_t_initialize(CONTROL_program_name_s, 0, CONTROL_program_name_s_length);
+ const f_string_static_t control_program_name_long_s = macro_f_string_static_t_initialize(CONTROL_program_name_long_s, 0, CONTROL_program_name_long_s_length);
#endif // _di_control_program_name_
#ifndef _di_control_defines_
- const f_string_static_t control_short_name_s = macro_f_string_static_t_initialize2(CONTROL_short_name_s, 0, CONTROL_short_name_s_length);
- const f_string_static_t control_short_settings_s = macro_f_string_static_t_initialize2(CONTROL_short_settings_s, 0, CONTROL_short_settings_s_length);
- const f_string_static_t control_short_socket_s = macro_f_string_static_t_initialize2(CONTROL_short_socket_s, 0, CONTROL_short_socket_s_length);
+ const f_string_static_t control_short_name_s = macro_f_string_static_t_initialize(CONTROL_short_name_s, 0, CONTROL_short_name_s_length);
+ const f_string_static_t control_short_settings_s = macro_f_string_static_t_initialize(CONTROL_short_settings_s, 0, CONTROL_short_settings_s_length);
+ const f_string_static_t control_short_socket_s = macro_f_string_static_t_initialize(CONTROL_short_socket_s, 0, CONTROL_short_socket_s_length);
- const f_string_static_t control_long_name_s = macro_f_string_static_t_initialize2(CONTROL_long_name_s, 0, CONTROL_long_name_s_length);
- const f_string_static_t control_long_settings_s = macro_f_string_static_t_initialize2(CONTROL_long_settings_s, 0, CONTROL_long_settings_s_length);
- const f_string_static_t control_long_socket_s = macro_f_string_static_t_initialize2(CONTROL_long_socket_s, 0, CONTROL_long_socket_s_length);
+ const f_string_static_t control_long_name_s = macro_f_string_static_t_initialize(CONTROL_long_name_s, 0, CONTROL_long_name_s_length);
+ const f_string_static_t control_long_settings_s = macro_f_string_static_t_initialize(CONTROL_long_settings_s, 0, CONTROL_long_settings_s_length);
+ const f_string_static_t control_long_socket_s = macro_f_string_static_t_initialize(CONTROL_long_socket_s, 0, CONTROL_long_socket_s_length);
#endif // _di_control_defines_
#ifndef _di_control_main_delete_
f_status_t control_main_delete(control_main_t * const main) {
- for (f_array_length_t i = 0; i < control_total_parameters_d; ++i) {
-
- f_type_array_lengths_resize(0, &main->parameters[i].locations);
- f_type_array_lengths_resize(0, &main->parameters[i].locations_sub);
- f_type_array_lengths_resize(0, &main->parameters[i].values);
- } // for
+ f_console_parameters_delete(&main->parameters);
f_type_array_lengths_resize(0, &main->remaining);
#define CONTROL_program_version_s CONTROL_program_version_major_s F_string_ascii_period_s CONTROL_program_version_minor_s F_string_ascii_period_s CONTROL_program_version_micro_s CONTROL_program_version_nano_prefix_s CONTROL_program_version_nano_s
- #define CONTROL_program_version_s_length CONTROL_program_version_major_s_length + F_string_ascii_period_s_length + CONTROL_program_version_minor_s_length + F_string_ascii_period_s_length + CONTROL_program_version_nano_prefix_s_length + CONTROL_program_version_nano_s_length
+ #define CONTROL_program_version_s_length CONTROL_program_version_major_s_length + F_string_ascii_period_s_length + CONTROL_program_version_minor_s_length + F_string_ascii_period_s_length + CONTROL_program_version_micro_s_length + CONTROL_program_version_nano_prefix_s_length + CONTROL_program_version_nano_s_length
extern const f_string_static_t control_program_version_s;
#endif // _di_control_program_version_
#ifndef _di_control_main_t_
typedef struct {
- f_console_parameter_t parameters[control_total_parameters_d];
+ f_console_parameters_t parameters;
uint16_t signal_check;
#define control_main_initialize \
{ \
- control_console_parameter_t_initialize, \
+ f_console_parameters_t_initialize, \
0, \
f_array_lengths_t_initialize, \
F_false, \
fll_program_print_help_usage(main->output.to, main->context, control_program_name_s, control_command_s);
- fl_print_format(" When the %[%s%q%] parameter represents a directory path then the file name is generated from either the", main->output.to.stream, main->context.set.notable, f_console_symbol_long_enable_s, control_long_socket_s, main->context.set.notable);
- fl_print_format(" %[%s%q%] parameter or from the control settings file.%q%q", main->output.to.stream, main->context.set.notable, f_console_symbol_long_enable_s, control_long_name_s, main->context.set.notable, f_string_eol_s, f_string_eol_s);
+ fl_print_format(" When the %[%q%q%] parameter represents a directory path then the file name is generated from either the", main->output.to.stream, main->context.set.notable, f_console_symbol_long_enable_s, control_long_socket_s, main->context.set.notable);
+ fl_print_format(" %[%q%q%] parameter or from the control settings file.%q%q", main->output.to.stream, main->context.set.notable, f_console_symbol_long_enable_s, control_long_name_s, main->context.set.notable, f_string_eol_s, f_string_eol_s);
fl_print_format(" A rule action allows for either the full rule path, such as '%[boot/root%]'", main->output.to.stream, main->context.set.notable, main->context.set.notable);
fl_print_format(" as a single parameter or two parameters with the first representing the rule directory path '%[boot%]'", main->output.to.stream, main->context.set.notable, main->context.set.notable);
f_status_t status = F_none;
+ f_console_parameter_t parameters[] = control_console_parameter_t_initialize;
+ main->parameters.array = parameters;
+ main->parameters.used = control_total_parameters_d;
+
{
- const f_console_parameters_t parameters = macro_f_console_parameters_t_initialize(main->parameters, control_total_parameters_d);
+ f_console_parameter_id_t ids[3] = { control_parameter_no_color_e, control_parameter_light_e, control_parameter_dark_e };
+ const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 3);
- {
- f_console_parameter_id_t ids[3] = { control_parameter_no_color_e, control_parameter_light_e, control_parameter_dark_e };
- const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 3);
+ status = fll_program_parameter_process(*arguments, &main->parameters, choices, F_true, &main->remaining, &main->context);
- status = fll_program_parameter_process(*arguments, parameters, choices, F_true, &main->remaining, &main->context);
+ main->output.set = &main->context.set;
+ main->error.set = &main->context.set;
+ main->warning.set = &main->context.set;
- main->output.set = &main->context.set;
- main->error.set = &main->context.set;
- main->warning.set = &main->context.set;
+ if (main->context.set.error.before) {
+ main->output.context = f_color_set_empty_s;
+ main->output.notable = main->context.set.notable;
- if (main->context.set.error.before) {
- main->output.context = f_color_set_empty_s;
- main->output.notable = main->context.set.notable;
+ main->error.context = main->context.set.error;
+ main->error.notable = main->context.set.notable;
- main->error.context = main->context.set.error;
- main->error.notable = main->context.set.notable;
+ main->warning.context = main->context.set.warning;
+ main->warning.notable = main->context.set.notable;
+ }
+ else {
+ f_color_set_t *sets[] = { &main->output.context, &main->output.notable, &main->error.context, &main->error.notable, &main->warning.context, &main->warning.notable, 0 };
- main->warning.context = main->context.set.warning;
- main->warning.notable = main->context.set.notable;
- }
- else {
- f_color_set_t *sets[] = { &main->output.context, &main->output.notable, &main->error.context, &main->error.notable, &main->warning.context, &main->warning.notable, 0 };
+ fll_program_parameter_process_empty(&main->context, sets);
+ }
- fll_program_parameter_process_empty(&main->context, sets);
+ if (F_status_is_error(status)) {
+ if (main->error.verbosity != f_console_verbosity_quiet_e) {
+ fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process", F_true);
+ fll_print_dynamic(f_string_eol_s, main->error.to.stream);
}
- if (F_status_is_error(status)) {
- if (main->error.verbosity != f_console_verbosity_quiet_e) {
- fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process", F_true);
- fll_print_dynamic(f_string_eol_s, main->error.to.stream);
- }
-
- control_main_delete(main);
+ control_main_delete(main);
- return F_status_set_error(status);
- }
+ return F_status_set_error(status);
}
+ }
- // Identify priority of verbosity related parameters.
- {
- f_console_parameter_id_t ids[4] = { control_parameter_verbosity_quiet_e, control_parameter_verbosity_normal_e, control_parameter_verbosity_verbose_e, control_parameter_verbosity_debug_e };
- f_console_parameter_id_t choice = 0;
- const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 4);
-
- status = f_console_parameter_prioritize_right(parameters, choices, &choice);
+ // Identify priority of verbosity related parameters.
+ {
+ f_console_parameter_id_t ids[4] = { control_parameter_verbosity_quiet_e, control_parameter_verbosity_normal_e, control_parameter_verbosity_verbose_e, control_parameter_verbosity_debug_e };
+ f_console_parameter_id_t choice = 0;
+ const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 4);
- if (F_status_is_error(status)) {
- control_main_delete(main);
+ status = f_console_parameter_prioritize_right(main->parameters, choices, &choice);
- return status;
- }
+ if (F_status_is_error(status)) {
+ control_main_delete(main);
- if (choice == control_parameter_verbosity_quiet_e) {
- main->output.verbosity = f_console_verbosity_quiet_e;
- main->error.verbosity = f_console_verbosity_quiet_e;
- main->warning.verbosity = f_console_verbosity_quiet_e;
- }
- else if (choice == control_parameter_verbosity_normal_e) {
- main->output.verbosity = f_console_verbosity_normal_e;
- main->error.verbosity = f_console_verbosity_normal_e;
- main->warning.verbosity = f_console_verbosity_normal_e;
- }
- else if (choice == control_parameter_verbosity_verbose_e) {
- main->output.verbosity = f_console_verbosity_verbose_e;
- main->error.verbosity = f_console_verbosity_verbose_e;
- main->warning.verbosity = f_console_verbosity_verbose_e;
- }
- else if (choice == control_parameter_verbosity_debug_e) {
- main->output.verbosity = f_console_verbosity_debug_e;
- main->error.verbosity = f_console_verbosity_debug_e;
- main->warning.verbosity = f_console_verbosity_debug_e;
- }
+ return status;
}
- status = F_none;
+ if (choice == control_parameter_verbosity_quiet_e) {
+ main->output.verbosity = f_console_verbosity_quiet_e;
+ main->error.verbosity = f_console_verbosity_quiet_e;
+ main->warning.verbosity = f_console_verbosity_quiet_e;
+ }
+ else if (choice == control_parameter_verbosity_normal_e) {
+ main->output.verbosity = f_console_verbosity_normal_e;
+ main->error.verbosity = f_console_verbosity_normal_e;
+ main->warning.verbosity = f_console_verbosity_normal_e;
+ }
+ else if (choice == control_parameter_verbosity_verbose_e) {
+ main->output.verbosity = f_console_verbosity_verbose_e;
+ main->error.verbosity = f_console_verbosity_verbose_e;
+ main->warning.verbosity = f_console_verbosity_verbose_e;
+ }
+ else if (choice == control_parameter_verbosity_debug_e) {
+ main->output.verbosity = f_console_verbosity_debug_e;
+ main->error.verbosity = f_console_verbosity_debug_e;
+ main->warning.verbosity = f_console_verbosity_debug_e;
+ }
}
- if (main->parameters[control_parameter_help_e].result == f_console_result_found_e) {
+ status = F_none;
+
+ if (main->parameters.array[control_parameter_help_e].result == f_console_result_found_e) {
control_print_help(main);
control_main_delete(main);
return F_none;
}
- if (main->parameters[control_parameter_version_e].result == f_console_result_found_e) {
+ if (main->parameters.array[control_parameter_version_e].result == f_console_result_found_e) {
fll_program_print_version(main->output.to, control_program_version_s);
control_main_delete(main);
control_long_socket_s
};
- f_array_length_t location = f_array_length_t_initialize;
+ f_array_length_t index = f_array_length_t_initialize;
for (uint8_t i = 0; i < 3; ++i) {
- if (main->parameters[ids[i]].result == f_console_result_found_e) {
+ if (main->parameters.array[ids[i]].result == f_console_result_found_e) {
control_print_error_parameter_value_not(main, names[i]);
status = F_status_set_error(F_parameter);
}
- else if (main->parameters[ids[i]].result == f_console_result_additional_e) {
- location = main->parameters[ids[i]].values.array[main->parameters[ids[i]].values.used - 1];
+ else if (main->parameters.array[ids[i]].result == f_console_result_additional_e) {
+ index = main->parameters.array[ids[i]].values.array[main->parameters.array[ids[i]].values.used - 1];
- if (!strnlen(arguments->argv[location], F_console_parameter_size_d)) {
+ if (!main->parameters.arguments.array[index].used) {
control_print_error_parameter_value_empty(main, names[i]);
status = F_status_set_error(F_parameter);
}
else if (main->remaining.used) {
control_data_t data = control_data_t_initialize;
+ data.argv = main->parameters.arguments.array;
// Verify commands before attempting to connect to the socket.
- if (control_command_identify(main, &data, arguments->argv[main->remaining.array[0]]) == F_found) {
- status = control_command_verify(main, &data, arguments);
+ if (control_command_identify(main, &data, data.argv[main->remaining.array[0]]) == F_found) {
+ status = control_command_verify(main, &data);
}
else {
- control_print_error_parameter_command_not(main, arguments->argv[main->remaining.array[0]]);
+ control_print_error_parameter_command_not(main, data.argv[main->remaining.array[0]]);
status = F_status_set_error(F_parameter);
}
data.socket.type = f_socket_type_datagram_d;
data.socket.length = sizeof(struct sockaddr_un);
- status = control_settings_load(main, &data, arguments);
+ status = control_settings_load(main, &data);
if (F_status_is_error_not(status)) {
// @todo construct the packet, send the packet to the controller, and process the response.
// Ensure a newline is always put at the end of the program execution, unless in quiet mode.
if (main->output.verbosity != f_console_verbosity_quiet_e) {
if (F_status_is_error(status)) {
- if (F_status_set_fine(status) == F_interrupt) {
- fflush(main->output.to.stream);
- }
+ fflush(main->output.to.stream);
+ fflush(main->error.to.stream);
fll_print_dynamic(f_string_eol_s, main->output.to.stream);
}
#endif
#ifndef _di_controller_strings_
- const f_string_static_t controller_name_socket_s = macro_f_string_static_t_initialize2(CONTROLLER_name_socket_s, 0, CONTROLLER_name_socket_s_length);
- const f_string_static_t controller_path_socket_s = macro_f_string_static_t_initialize2(CONTROLLER_path_socket_s, 0, CONTROLLER_path_socket_s_length);
- const f_string_static_t controller_path_socket_prefix_s = macro_f_string_static_t_initialize2(CONTROLLER_path_socket_prefix_s, 0, CONTROLLER_path_socket_prefix_s_length);
- const f_string_static_t controller_path_socket_suffix_s = macro_f_string_static_t_initialize2(CONTROLLER_path_socket_suffix_s, 0, CONTROLLER_path_socket_suffix_s_length);
+ const f_string_static_t controller_name_socket_s = macro_f_string_static_t_initialize(CONTROLLER_name_socket_s, 0, CONTROLLER_name_socket_s_length);
+ const f_string_static_t controller_path_socket_s = macro_f_string_static_t_initialize(CONTROLLER_path_socket_s, 0, CONTROLLER_path_socket_s_length);
+ const f_string_static_t controller_path_socket_prefix_s = macro_f_string_static_t_initialize(CONTROLLER_path_socket_prefix_s, 0, CONTROLLER_path_socket_prefix_s_length);
+ const f_string_static_t controller_path_socket_suffix_s = macro_f_string_static_t_initialize(CONTROLLER_path_socket_suffix_s, 0, CONTROLLER_path_socket_suffix_s_length);
#endif // _di_controller_strings_
#ifndef _di_control_strings_s_
- const f_string_static_t control_path_settings_s = macro_f_string_static_t_initialize2(CONTROL_path_settings_s, 0, CONTROL_path_settings_s_length);
-
- const f_string_static_t control_command_s = macro_f_string_static_t_initialize2(CONTROL_command_s, 0, CONTROL_command_s_length);
- const f_string_static_t control_default_s = macro_f_string_static_t_initialize2(CONTROL_default_s, 0, CONTROL_default_s_length);
- const f_string_static_t control_name_socket_s = macro_f_string_static_t_initialize2(CONTROL_name_socket_s, 0, CONTROL_name_socket_s_length);
- const f_string_static_t control_path_socket_s = macro_f_string_static_t_initialize2(CONTROL_path_socket_s, 0, CONTROL_path_socket_s_length);
- const f_string_static_t control_path_socket_prefix_s = macro_f_string_static_t_initialize2(CONTROL_path_socket_prefix_s, 0, CONTROL_path_socket_prefix_s_length);
- const f_string_static_t control_path_socket_suffix_s = macro_f_string_static_t_initialize2(CONTROL_path_socket_suffix_s, 0, CONTROL_path_socket_suffix_s_length);
-
- const f_string_static_t control_error_s = macro_f_string_static_t_initialize2(CONTROL_error_s, 0, CONTROL_error_s_length);
- const f_string_static_t control_freeze_s = macro_f_string_static_t_initialize2(CONTROL_freeze_s, 0, CONTROL_freeze_s_length);
- const f_string_static_t control_kill_s = macro_f_string_static_t_initialize2(CONTROL_kill_s, 0, CONTROL_kill_s_length);
- const f_string_static_t control_pause_s = macro_f_string_static_t_initialize2(CONTROL_pause_s, 0, CONTROL_pause_s_length);
- const f_string_static_t control_reboot_s = macro_f_string_static_t_initialize2(CONTROL_reboot_s, 0, CONTROL_reboot_s_length);
- const f_string_static_t control_reload_s = macro_f_string_static_t_initialize2(CONTROL_reload_s, 0, CONTROL_reload_s_length);
- const f_string_static_t control_rerun_s = macro_f_string_static_t_initialize2(CONTROL_rerun_s, 0, CONTROL_rerun_s_length);
- const f_string_static_t control_restart_s = macro_f_string_static_t_initialize2(CONTROL_restart_s, 0, CONTROL_restart_s_length);
- const f_string_static_t control_resume_s = macro_f_string_static_t_initialize2(CONTROL_resume_s, 0, CONTROL_resume_s_length);
- const f_string_static_t control_shutdown_s = macro_f_string_static_t_initialize2(CONTROL_shutdown_s, 0, CONTROL_shutdown_s_length);
- const f_string_static_t control_start_s = macro_f_string_static_t_initialize2(CONTROL_start_s, 0, CONTROL_start_s_length);
- const f_string_static_t control_stop_s = macro_f_string_static_t_initialize2(CONTROL_stop_s, 0, CONTROL_stop_s_length);
- const f_string_static_t control_thaw_s = macro_f_string_static_t_initialize2(CONTROL_thaw_s, 0, CONTROL_thaw_s_length);
+ const f_string_static_t control_path_settings_s = macro_f_string_static_t_initialize(CONTROL_path_settings_s, 0, CONTROL_path_settings_s_length);
+
+ const f_string_static_t control_command_s = macro_f_string_static_t_initialize(CONTROL_command_s, 0, CONTROL_command_s_length);
+ const f_string_static_t control_default_s = macro_f_string_static_t_initialize(CONTROL_default_s, 0, CONTROL_default_s_length);
+ const f_string_static_t control_name_socket_s = macro_f_string_static_t_initialize(CONTROL_name_socket_s, 0, CONTROL_name_socket_s_length);
+ const f_string_static_t control_path_socket_s = macro_f_string_static_t_initialize(CONTROL_path_socket_s, 0, CONTROL_path_socket_s_length);
+ const f_string_static_t control_path_socket_prefix_s = macro_f_string_static_t_initialize(CONTROL_path_socket_prefix_s, 0, CONTROL_path_socket_prefix_s_length);
+ const f_string_static_t control_path_socket_suffix_s = macro_f_string_static_t_initialize(CONTROL_path_socket_suffix_s, 0, CONTROL_path_socket_suffix_s_length);
+
+ const f_string_static_t control_error_s = macro_f_string_static_t_initialize(CONTROL_error_s, 0, CONTROL_error_s_length);
+ const f_string_static_t control_freeze_s = macro_f_string_static_t_initialize(CONTROL_freeze_s, 0, CONTROL_freeze_s_length);
+ const f_string_static_t control_kill_s = macro_f_string_static_t_initialize(CONTROL_kill_s, 0, CONTROL_kill_s_length);
+ const f_string_static_t control_pause_s = macro_f_string_static_t_initialize(CONTROL_pause_s, 0, CONTROL_pause_s_length);
+ const f_string_static_t control_reboot_s = macro_f_string_static_t_initialize(CONTROL_reboot_s, 0, CONTROL_reboot_s_length);
+ const f_string_static_t control_reload_s = macro_f_string_static_t_initialize(CONTROL_reload_s, 0, CONTROL_reload_s_length);
+ const f_string_static_t control_rerun_s = macro_f_string_static_t_initialize(CONTROL_rerun_s, 0, CONTROL_rerun_s_length);
+ const f_string_static_t control_restart_s = macro_f_string_static_t_initialize(CONTROL_restart_s, 0, CONTROL_restart_s_length);
+ const f_string_static_t control_resume_s = macro_f_string_static_t_initialize(CONTROL_resume_s, 0, CONTROL_resume_s_length);
+ const f_string_static_t control_shutdown_s = macro_f_string_static_t_initialize(CONTROL_shutdown_s, 0, CONTROL_shutdown_s_length);
+ const f_string_static_t control_start_s = macro_f_string_static_t_initialize(CONTROL_start_s, 0, CONTROL_start_s_length);
+ const f_string_static_t control_stop_s = macro_f_string_static_t_initialize(CONTROL_stop_s, 0, CONTROL_stop_s_length);
+ const f_string_static_t control_thaw_s = macro_f_string_static_t_initialize(CONTROL_thaw_s, 0, CONTROL_thaw_s_length);
#endif // _di_control_strings_s_
#ifndef _di_control_data_delete_
* command: The command type code.
* cache: A cache.
* socket: A socket used to connect to the controller.
+ * argv: The argument structure in control_main_t.parameters for simplifying syntax.
*/
#ifndef _di_control_data_t_
typedef struct {
control_cache_t cache;
f_socket_t socket;
+
+ f_string_static_t *argv;
} control_data_t;
#define control_data_t_initialize \
0, \
f_string_dynamic_t_initialize, \
f_socket_t_initialize, \
+ 0, \
}
#endif // _di_control_data_t_
#endif
#ifndef _di_control_command_identify_
- f_status_t control_command_identify(control_main_t * const main, control_data_t * const data, const f_string_t command) {
+ f_status_t control_command_identify(control_main_t * const main, control_data_t * const data, const f_string_static_t command) {
- const f_string_static_t command_string = macro_f_string_static_t_initialize2(command, 0, strnlen(command, F_console_parameter_size_d));
-
-
- if (fl_string_dynamic_compare(command_string, control_freeze_s) == F_equal_to) {
+ if (fl_string_dynamic_compare(command, control_freeze_s) == F_equal_to) {
data->command = control_command_type_freeze_e;
return F_found;
}
- if (fl_string_dynamic_compare(command_string, control_kill_s) == F_equal_to) {
+ if (fl_string_dynamic_compare(command, control_kill_s) == F_equal_to) {
data->command = control_command_type_kill_e;
return F_found;
}
- if (fl_string_dynamic_compare(command_string, control_pause_s) == F_equal_to) {
+ if (fl_string_dynamic_compare(command, control_pause_s) == F_equal_to) {
data->command = control_command_type_pause_e;
return F_found;
}
- if (fl_string_dynamic_compare(command_string, control_reboot_s) == F_equal_to) {
+ if (fl_string_dynamic_compare(command, control_reboot_s) == F_equal_to) {
data->command = control_command_type_reboot_e;
return F_found;
}
- if (fl_string_dynamic_compare(command_string, control_reload_s) == F_equal_to) {
+ if (fl_string_dynamic_compare(command, control_reload_s) == F_equal_to) {
data->command = control_command_type_reload_e;
return F_found;
}
- if (fl_string_dynamic_compare(command_string, control_rerun_s) == F_equal_to) {
+ if (fl_string_dynamic_compare(command, control_rerun_s) == F_equal_to) {
data->command = control_command_type_rerun_e;
return F_found;
}
- if (fl_string_dynamic_compare(command_string, control_restart_s) == F_equal_to) {
+ if (fl_string_dynamic_compare(command, control_restart_s) == F_equal_to) {
data->command = control_command_type_restart_e;
return F_found;
}
- if (fl_string_dynamic_compare(command_string, control_resume_s) == F_equal_to) {
+ if (fl_string_dynamic_compare(command, control_resume_s) == F_equal_to) {
data->command = control_command_type_resume_e;
return F_found;
}
- if (fl_string_dynamic_compare(command_string, control_shutdown_s) == F_equal_to) {
+ if (fl_string_dynamic_compare(command, control_shutdown_s) == F_equal_to) {
data->command = control_command_type_shutdown_e;
return F_found;
}
- if (fl_string_dynamic_compare(command_string, control_start_s) == F_equal_to) {
+ if (fl_string_dynamic_compare(command, control_start_s) == F_equal_to) {
data->command = control_command_type_start_e;
return F_found;
}
- if (fl_string_dynamic_compare(command_string, control_stop_s) == F_equal_to) {
+ if (fl_string_dynamic_compare(command, control_stop_s) == F_equal_to) {
data->command = control_command_type_stop_e;
return F_found;
}
- if (fl_string_dynamic_compare(command_string, control_thaw_s) == F_equal_to) {
+ if (fl_string_dynamic_compare(command, control_thaw_s) == F_equal_to) {
data->command = control_command_type_thaw_e;
return F_found;
#endif // _di_control_command_identify_
#ifndef _di_control_command_verify_
- f_status_t control_command_verify(control_main_t * const main, control_data_t * const data, const f_console_arguments_t *arguments) {
+ f_status_t control_command_verify(control_main_t * const main, control_data_t * const data) {
switch (data->command) {
case control_command_type_freeze_e:
case control_command_type_stop_e:
case control_command_type_thaw_e:
if (main->remaining.used < 2) {
- control_print_error_parameter_command_rule_not(main, arguments->argv[0]);
+ control_print_error_parameter_command_rule_not(main, data->argv[main->remaining.array[0]]);
return F_status_set_error(F_parameter);
}
else if (main->remaining.used > 3) {
- control_print_error_parameter_command_rule_too_many(main, arguments->argv[0]);
+ control_print_error_parameter_command_rule_too_many(main, data->argv[main->remaining.array[0]]);
return F_status_set_error(F_parameter);
}
- if (!strnlen(arguments->argv[main->remaining.array[1]], F_console_parameter_size_d)) {
+ if (!data->argv[main->remaining.array[1]].used) {
if (main->remaining.used == 2) {
- control_print_error_parameter_command_rule_empty(main, arguments->argv[0]);
+ control_print_error_parameter_command_rule_empty(main, data->argv[main->remaining.array[0]]);
}
else {
- control_print_error_parameter_command_rule_directory_empty(main, arguments->argv[0]);
+ control_print_error_parameter_command_rule_directory_empty(main, data->argv[main->remaining.array[0]]);
}
return F_status_set_error(F_parameter);
}
if (main->remaining.used == 3) {
- if (!strnlen(arguments->argv[main->remaining.array[2]], F_console_parameter_size_d)) {
- control_print_error_parameter_command_rule_basename_empty(main, arguments->argv[0]);
+ if (!data->argv[main->remaining.array[2]].used) {
+ control_print_error_parameter_command_rule_basename_empty(main, data->argv[main->remaining.array[0]]);
return F_status_set_error(F_parameter);
}
#endif // _di_control_command_verify_
#ifndef _di_control_settings_load_
- f_status_t control_settings_load(control_main_t * const main, control_data_t * const data, const f_console_arguments_t *arguments) {
+ f_status_t control_settings_load(control_main_t * const main, control_data_t * const data) {
f_status_t status = F_none;
data->cache.buffer_small.used = 0;
- if (main->parameters[control_parameter_socket_e].result == f_console_result_additional_e) {
- const f_array_length_t location = main->parameters[control_parameter_settings_e].values.array[main->parameters[control_parameter_settings_e].values.used - 1];
+ if (main->parameters.array[control_parameter_socket_e].result == f_console_result_additional_e) {
+ const f_array_length_t index = main->parameters.array[control_parameter_settings_e].values.array[main->parameters.array[control_parameter_settings_e].values.used - 1];
- status = f_string_append(arguments->argv[location], strnlen(arguments->argv[location], F_console_parameter_size_d), &data->cache.buffer_small);
+ status = f_string_dynamic_append(data->argv[index], &data->cache.buffer_small);
}
else {
- status = f_string_dynamic_append_nulless(control_path_settings_s, &data->cache.buffer_small);
+ status = f_string_dynamic_append(control_path_settings_s, &data->cache.buffer_small);
}
if (F_status_is_error(status)) {
- if (main->parameters[control_parameter_socket_e].result == f_console_result_additional_e) {
- fll_error_print(main->error, F_status_set_fine(status), "f_string_append", F_true);
- }
- else {
- fll_error_print(main->error, F_status_set_fine(status), "f_string_dynamic_append_nulless", F_true);
- }
+ fll_error_print(main->error, F_status_set_fine(status), "f_string_dynamic_append", F_true);
return status;
}
{
f_file_t file = f_file_t_initialize;
- status = f_file_stream_open(data->cache.buffer_small.string, f_file_open_mode_read_s.string, &file);
+ status = f_file_stream_open(data->cache.buffer_small, f_file_open_mode_read_s, &file);
if (F_status_is_error(status)) {
- fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_open", F_true, data->cache.buffer_small.string, "open", fll_error_file_type_file_e);
+ fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_open", F_true, data->cache.buffer_small, f_file_operation_open_s, fll_error_file_type_file_e);
return status;
}
f_file_stream_close(F_true, &file);
if (F_status_is_error(status)) {
- fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_read", F_true, data->cache.buffer_small.string, "read", fll_error_file_type_file_e);
+ fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_read", F_true, data->cache.buffer_small, f_file_operation_read_s, fll_error_file_type_file_e);
return status;
}
status = fll_fss_extended_read(data->cache.buffer_large, state, &range, &objects, &contents, 0, 0, &delimits, 0);
if (F_status_is_error(status)) {
- fll_error_file_print(main->error, F_status_set_fine(status), "fll_fss_extended_read", F_true, data->cache.buffer_small.string, "process", fll_error_file_type_file_e);
+ fll_error_file_print(main->error, F_status_set_fine(status), "fll_fss_extended_read", F_true, data->cache.buffer_small, f_file_operation_process_s, fll_error_file_type_file_e);
}
else {
status = fl_fss_apply_delimit(delimits, &data->cache.buffer_large);
if (F_status_is_error(status)) {
- fll_error_file_print(main->error, F_status_set_fine(status), "fl_fss_apply_delimit", F_true, data->cache.buffer_small.string, "process", fll_error_file_type_file_e);
+ fll_error_file_print(main->error, F_status_set_fine(status), "fl_fss_apply_delimit", F_true, data->cache.buffer_small, f_file_operation_process_s, fll_error_file_type_file_e);
}
}
data->cache.buffer_small.used = 0;
- if (main->parameters[control_parameter_socket_e].result == f_console_result_additional_e) {
- const f_array_length_t location = main->parameters[control_parameter_socket_e].values.array[main->parameters[control_parameter_socket_e].values.used - 1];
+ if (main->parameters.array[control_parameter_socket_e].result == f_console_result_additional_e) {
+ const f_array_length_t index = main->parameters.array[control_parameter_socket_e].values.array[main->parameters.array[control_parameter_socket_e].values.used - 1];
- status = f_string_append(arguments->argv[location], strnlen(arguments->argv[location], F_console_parameter_size_d), &data->cache.buffer_small);
+ status = f_string_dynamic_append(data->argv[index], &data->cache.buffer_small);
}
else if (parameter_hass[1]) {
status = f_string_dynamic_partial_append_nulless(data->cache.buffer_large, objects.array[parameter_ats[1]], &data->cache.buffer_small);
}
else {
- status = f_string_dynamic_append_nulless(controller_path_socket_s, &data->cache.buffer_small);
+ status = f_string_dynamic_append(controller_path_socket_s, &data->cache.buffer_small);
}
if (F_status_is_error(status)) {
- if (main->parameters[control_parameter_socket_e].result == f_console_result_additional_e) {
- fll_error_print(main->error, F_status_set_fine(status), "f_string_append", F_true);
- }
- else if (parameter_hass[1]) {
- fll_error_print(main->error, F_status_set_fine(status), "f_string_dynamic_partial_append_nulless", F_true);
+ if (main->parameters.array[control_parameter_socket_e].result == f_console_result_additional_e || !parameter_hass[1]) {
+ fll_error_print(main->error, F_status_set_fine(status), "f_string_dynamic_append", F_true);
}
else {
- fll_error_print(main->error, F_status_set_fine(status), "f_string_dynamic_append_nulless", F_true);
+ fll_error_print(main->error, F_status_set_fine(status), "f_string_dynamic_partial_append_nulless", F_true);
}
}
else {
}
}
- status = f_file_exists(data->cache.buffer_small.string);
+ status = f_file_exists(data->cache.buffer_small);
if (F_status_is_error(status) || status == F_false) {
if (F_status_is_error(status)) {
- fll_error_file_print(main->error, F_status_set_fine(status), "f_file_exists", F_true, data->cache.buffer_small.string, "find", fll_error_file_type_directory_e);
+ fll_error_file_print(main->error, F_status_set_fine(status), "f_file_exists", F_true, data->cache.buffer_small, f_file_operation_find_s, fll_error_file_type_directory_e);
if (main->error.verbosity != f_console_verbosity_quiet_e) {
fll_print_dynamic(f_string_eol_s, main->error.to.stream);
}
// Construct the file name when the socket path is a directory.
- else if (f_file_is(data->cache.buffer_small.string, F_file_type_directory_d, F_true) == F_true) {
+ else if (f_file_is(data->cache.buffer_small, F_file_type_directory_d, F_true) == F_true) {
status = f_string_dynamic_append_assure(f_path_separator_s, &data->cache.buffer_small);
if (F_status_is_error(status)) {
for (uint8_t i = 0; i < 3; ++i) {
- if (append_ids[i] && main->parameters[append_ids[i]].result == f_console_result_additional_e) {
- const f_array_length_t location = main->parameters[append_ids[i]].values.array[main->parameters[append_ids[i]].values.used - 1];
+ if (append_ids[i] && main->parameters.array[append_ids[i]].result == f_console_result_additional_e) {
+ const f_array_length_t index = main->parameters.array[append_ids[i]].values.array[main->parameters.array[append_ids[i]].values.used - 1];
- status = f_string_append(arguments->argv[location], strnlen(arguments->argv[location], F_console_parameter_size_d), &data->cache.buffer_small);
+ status = f_string_dynamic_append(data->argv[index], &data->cache.buffer_small);
}
else if (append_hass[i]) {
status = f_string_dynamic_partial_append_nulless(data->cache.buffer_large, objects.array[append_hass[i]], &data->cache.buffer_small);
}
if (F_status_is_error(status)) {
- if (append_ids[i] && main->parameters[append_ids[i]].result == f_console_result_additional_e) {
- fll_error_print(main->error, F_status_set_fine(status), "f_string_append", F_true);
- }
- else if (append_hass[i]) {
- fll_error_print(main->error, F_status_set_fine(status), "f_string_dynamic_partial_append_nulless", F_true);
+ if (append_ids[i] && main->parameters.array[append_ids[i]].result == f_console_result_additional_e || !append_hass[i]) {
+ fll_error_print(main->error, F_status_set_fine(status), "f_string_dynamic_append", F_true);
}
else {
- fll_error_print(main->error, F_status_set_fine(status), "f_string_dynamic_append_nulless", F_true);
+ fll_error_print(main->error, F_status_set_fine(status), "f_string_dynamic_partial_append_nulless", F_true);
}
break;
}
if (F_status_is_error_not(status)) {
- status = f_file_exists(data->cache.buffer_small.string);
+ status = f_file_exists(data->cache.buffer_small);
if (F_status_is_error(status) || status == F_false) {
if (F_status_is_error(status)) {
- fll_error_file_print(main->error, F_status_set_fine(status), "f_file_exists", F_true, data->cache.buffer_small.string, "find", fll_error_file_type_directory_e);
+ fll_error_file_print(main->error, F_status_set_fine(status), "f_file_exists", F_true, data->cache.buffer_small, f_file_operation_find_s, fll_error_file_type_directory_e);
if (main->error.verbosity != f_console_verbosity_quiet_e) {
fll_print_dynamic(f_string_eol_s, main->error.to.stream);
}
if (F_status_is_error_not(status)) {
- if (f_file_is(data->cache.buffer_small.string, F_file_type_socket_d, F_true) == F_false) {
+ if (f_file_is(data->cache.buffer_small, F_file_type_socket_d, F_true) == F_false) {
control_print_error_socket_file_not(main, data->cache.buffer_small);
status = F_status_set_error(F_socket_not);
* F_found_not if name is unknown.
*/
#ifndef _di_control_command_identify_
- extern f_status_t control_command_identify(control_main_t * const main, control_data_t * const data, const f_string_t command) F_attribute_visibility_internal_d;
+ extern f_status_t control_command_identify(control_main_t * const main, control_data_t * const data, const f_string_static_t command) F_attribute_visibility_internal_d;
#endif // _di_control_command_identify_
/**
* The main program data.
* @param data
* The control data.
- * @param arguments
- * The main program arguments.
*/
#ifndef _di_control_command_verify_
- extern f_status_t control_command_verify(control_main_t * const main, control_data_t * const data, const f_console_arguments_t *arguments) F_attribute_visibility_internal_d;
+ extern f_status_t control_command_verify(control_main_t * const main, control_data_t * const data) F_attribute_visibility_internal_d;
#endif // _di_control_command_verify_
/**
* Load and process the control settings file.
* The main program data.
* @param data
* The control data.
- * @param arguments
- * The main program arguments.
*
* @return
* F_none on success.
* @see fll_fss_extended_read()
*/
#ifndef _di_control_settings_load_
- extern f_status_t control_settings_load(control_main_t * const main, control_data_t * const data, const f_console_arguments_t *arguments) F_attribute_visibility_internal_d;
+ extern f_status_t control_settings_load(control_main_t * const main, control_data_t * const data) F_attribute_visibility_internal_d;
#endif // _di_control_settings_load_
#ifdef __cplusplus
#endif
#ifndef _di_control_print_error_parameter_command_not_
- void control_print_error_parameter_command_not(control_main_t * const main, const f_string_t command) {
+ void control_print_error_parameter_command_not(control_main_t * const main, const f_string_static_t command) {
if (main->error.verbosity == f_console_verbosity_quiet_e) return;
flockfile(main->error.to.stream);
- fl_print_format("%[%QThe parameter '%]", main->error.to.stream, main->context.set.error, main->error.prefix, main->context.set.error);
- fl_print_format("%[%S%]", main->error.to.stream, main->context.set.notable, command, main->context.set.notable);
+ fl_print_format("%q%[%QThe parameter '%]", main->error.to.stream, f_string_eol_s, main->context.set.error, main->error.prefix, main->context.set.error);
+ fl_print_format("%[%Q%]", main->error.to.stream, main->context.set.notable, command, main->context.set.notable);
fl_print_format("%[' is not a known controller command.%]%q", main->error.to.stream, main->context.set.error, main->context.set.error, f_string_eol_s);
funlockfile(main->error.to.stream);
#endif // _di_control_print_error_parameter_command_not_
#ifndef _di_control_print_error_parameter_command_rule_basename_empty_
- void control_print_error_parameter_command_rule_basename_empty(control_main_t * const main, const f_string_t command) {
+ void control_print_error_parameter_command_rule_basename_empty(control_main_t * const main, const f_string_static_t command) {
if (main->error.verbosity == f_console_verbosity_quiet_e) return;
flockfile(main->error.to.stream);
- fl_print_format("%[%QThe command parameter '%]", main->error.to.stream, main->context.set.error, main->error.prefix, main->context.set.error);
- fl_print_format("%[%S%]", main->error.to.stream, main->context.set.notable, command, main->context.set.notable);
+ fl_print_format("%q%[%QThe command parameter '%]", main->error.to.stream, f_string_eol_s, main->context.set.error, main->error.prefix, main->context.set.error);
+ fl_print_format("%[%Q%]", main->error.to.stream, main->context.set.notable, command, main->context.set.notable);
fl_print_format("%[' a rule base name cannot be an empty string.%]%q", main->error.to.stream, main->context.set.error, main->context.set.error, f_string_eol_s);
funlockfile(main->error.to.stream);
#endif // _di_control_print_error_parameter_command_rule_basename_empty_
#ifndef _di_control_print_error_parameter_command_rule_directory_empty_
- void control_print_error_parameter_command_rule_directory_empty(control_main_t * const main, const f_string_t command) {
+ void control_print_error_parameter_command_rule_directory_empty(control_main_t * const main, const f_string_static_t command) {
if (main->error.verbosity == f_console_verbosity_quiet_e) return;
flockfile(main->error.to.stream);
- fl_print_format("%[%QThe command parameter '%]", main->error.to.stream, main->context.set.error, main->error.prefix, main->context.set.error);
- fl_print_format("%[%S%]", main->error.to.stream, main->context.set.notable, command, main->context.set.notable);
+ fl_print_format("%q%[%QThe command parameter '%]", main->error.to.stream, f_string_eol_s, main->context.set.error, main->error.prefix, main->context.set.error);
+ fl_print_format("%[%Q%]", main->error.to.stream, main->context.set.notable, command, main->context.set.notable);
fl_print_format("%[' a rule directory path cannot be an empty string.%]%q", main->error.to.stream, main->context.set.error, main->context.set.error, f_string_eol_s);
funlockfile(main->error.to.stream);
#endif // _di_control_print_error_parameter_command_rule_directory_empty_
#ifndef _di_control_print_error_parameter_command_rule_empty_
- void control_print_error_parameter_command_rule_empty(control_main_t * const main, const f_string_t command) {
+ void control_print_error_parameter_command_rule_empty(control_main_t * const main, const f_string_static_t command) {
if (main->error.verbosity == f_console_verbosity_quiet_e) return;
flockfile(main->error.to.stream);
- fl_print_format("%[%QThe command parameter '%]", main->error.to.stream, main->context.set.error, main->error.prefix, main->context.set.error);
- fl_print_format("%[%S%]", main->error.to.stream, main->context.set.notable, command, main->context.set.notable);
+ fl_print_format("%q%[%QThe command parameter '%]", main->error.to.stream, f_string_eol_s, main->context.set.error, main->error.prefix, main->context.set.error);
+ fl_print_format("%[%Q%]", main->error.to.stream, main->context.set.notable, command, main->context.set.notable);
fl_print_format("%[' a rule name cannot be an empty string.%]%q", main->error.to.stream, main->context.set.error, main->context.set.error, f_string_eol_s);
funlockfile(main->error.to.stream);
#endif // _di_control_print_error_parameter_command_rule_empty_
#ifndef _di_control_print_error_parameter_command_rule_not_
- void control_print_error_parameter_command_rule_not(control_main_t * const main, const f_string_t command) {
+ void control_print_error_parameter_command_rule_not(control_main_t * const main, const f_string_static_t command) {
if (main->error.verbosity == f_console_verbosity_quiet_e) return;
flockfile(main->error.to.stream);
- fl_print_format("%[%QThe command parameter '%]", main->error.to.stream, main->context.set.error, main->error.prefix, main->context.set.error);
- fl_print_format("%[%S%]", main->error.to.stream, main->context.set.notable, command, main->context.set.notable);
+ fl_print_format("%q%[%QThe command parameter '%]", main->error.to.stream, f_string_eol_s, main->context.set.error, main->error.prefix, main->context.set.error);
+ fl_print_format("%[%Q%]", main->error.to.stream, main->context.set.notable, command, main->context.set.notable);
fl_print_format("%[' requires either a full rule name or a rule directory path along with the rule base name.%]%q", main->error.to.stream, main->context.set.error, main->context.set.error, f_string_eol_s);
funlockfile(main->error.to.stream);
#endif // _di_control_print_error_parameter_command_rule_not_
#ifndef _di_control_print_error_parameter_command_rule_too_many_
- void control_print_error_parameter_command_rule_too_many(control_main_t * const main, const f_string_t command) {
+ void control_print_error_parameter_command_rule_too_many(control_main_t * const main, const f_string_static_t command) {
if (main->error.verbosity == f_console_verbosity_quiet_e) return;
flockfile(main->error.to.stream);
- fl_print_format("%[%QThe command parameter '%]", main->error.to.stream, main->context.set.error, main->error.prefix, main->context.set.error);
- fl_print_format("%[%S%]", main->error.to.stream, main->context.set.notable, command, main->context.set.notable);
+ fl_print_format("%q%[%QThe command parameter '%]", main->error.to.stream, f_string_eol_s, main->context.set.error, main->error.prefix, main->context.set.error);
+ fl_print_format("%[%Q%]", main->error.to.stream, main->context.set.notable, command, main->context.set.notable);
fl_print_format("%[' has too many arguments.%]%q", main->error.to.stream, main->context.set.error, main->context.set.error, f_string_eol_s);
funlockfile(main->error.to.stream);
if (main->error.verbosity == f_console_verbosity_quiet_e) return;
- fll_print_format("%[%QNo commands are provided.%]%q", main->error.to.stream, main->context.set.error, main->error.prefix, main->context.set.error, f_string_eol_s);
+ fll_print_format("%q%[%QNo commands provided.%]%q", main->error.to.stream, f_string_eol_s, main->context.set.error, main->error.prefix, main->context.set.error, f_string_eol_s);
}
#endif // _di_control_print_error_commands_none_
flockfile(main->error.to.stream);
- fl_print_format("%[%QThe value for the parameter '%]", main->error.to.stream, main->context.set.error, main->error.prefix, main->context.set.error);
+ fl_print_format("%q%[%QThe value for the parameter '%]", main->error.to.stream, f_string_eol_s, main->context.set.error, main->error.prefix, main->context.set.error);
fl_print_format("%[%q%q%]", main->error.to.stream, main->context.set.notable, f_console_symbol_long_enable_s, parameter, main->context.set.notable);
fl_print_format("%[' must not be an empty string.%]%q", main->error.to.stream, main->context.set.error, main->context.set.error, f_string_eol_s);
flockfile(main->error.to.stream);
- fl_print_format("%[%QThe parameter '%]", main->error.to.stream, main->context.set.error, main->error.prefix, main->context.set.error);
+ fl_print_format("%q%[%QThe parameter '%]", main->error.to.stream, f_string_eol_s, main->context.set.error, main->error.prefix, main->context.set.error);
fl_print_format("%[%q%q%]", main->error.to.stream, main->context.set.notable, f_console_symbol_long_enable_s, parameter, main->context.set.notable);
fl_print_format("%[' is specified, but no value is given.%]%q", main->error.to.stream, main->context.set.error, main->context.set.error, f_string_eol_s);
if (main->error.verbosity == f_console_verbosity_quiet_e) return;
- fll_print_format("%[%QPipe input is not supported by this program.%]%q", main->error.to.stream, main->context.set.error, main->error.prefix, main->context.set.error, f_string_eol_s);
+ fll_print_format("%q%[%QPipe input is not supported by this program.%]%q", main->error.to.stream, f_string_eol_s, main->context.set.error, main->error.prefix, main->context.set.error, f_string_eol_s);
}
#endif // _di_control_print_error_pipe_supported_not_
flockfile(main->error.to.stream);
- fl_print_format("%[%QFailed to connect to the socket file '%]", main->error.to.stream, main->context.set.error, main->error.prefix, main->context.set.error);
+ fl_print_format("%q%[%QFailed to connect to the socket file '%]", main->error.to.stream, f_string_eol_s, main->context.set.error, main->error.prefix, main->context.set.error);
fl_print_format("%[%Q%]", main->error.to.stream, main->context.set.notable, path_socket, main->context.set.notable);
fl_print_format("%['.%]%q", main->error.to.stream, main->context.set.error, main->context.set.error, f_string_eol_s);
flockfile(main->error.to.stream);
- fl_print_format("%[%QThe controller socket file '%]", main->error.to.stream, main->context.set.error, main->error.prefix, main->context.set.error);
+ fl_print_format("%q%[%QThe controller socket file '%]", main->error.to.stream, f_string_eol_s, main->context.set.error, main->error.prefix, main->context.set.error);
fl_print_format("%[%Q%]", main->error.to.stream, main->context.set.notable, path_socket, main->context.set.notable);
fl_print_format("%[' could not be found and is required.%]%q", main->error.to.stream, main->context.set.error, main->context.set.error, f_string_eol_s);
flockfile(main->error.to.stream);
- fl_print_format("%[%QThe controller socket file '%]", main->error.to.stream, main->context.set.error, main->error.prefix, main->context.set.error);
+ fl_print_format("%q%[%QThe controller socket file '%]", main->error.to.stream, f_string_eol_s, main->context.set.error, main->error.prefix, main->context.set.error);
fl_print_format("%[%Q%]", main->error.to.stream, main->context.set.notable, path_socket, main->context.set.notable);
fl_print_format("%[' is not a socket file.%]%q", main->error.to.stream, main->context.set.error, main->context.set.error, f_string_eol_s);
* The parameter representing a command.
*/
#ifndef _di_control_print_error_parameter_command_not_
- extern void control_print_error_parameter_command_not(control_main_t * const main, const f_string_t command) F_attribute_visibility_internal_d;
+ extern void control_print_error_parameter_command_not(control_main_t * const main, const f_string_static_t command) F_attribute_visibility_internal_d;
#endif // _di_control_print_error_parameter_command_not_
/**
* The parameter representing a command.
*/
#ifndef _di_control_print_error_parameter_command_rule_basename_empty_
- extern void control_print_error_parameter_command_rule_basename_empty(control_main_t * const main, const f_string_t command) F_attribute_visibility_internal_d;
+ extern void control_print_error_parameter_command_rule_basename_empty(control_main_t * const main, const f_string_static_t command) F_attribute_visibility_internal_d;
#endif // _di_control_print_error_parameter_command_rule_basename_empty_
/**
* The parameter representing a command.
*/
#ifndef _di_control_print_error_parameter_command_rule_directory_empty_
- extern void control_print_error_parameter_command_rule_directory_empty(control_main_t * const main, const f_string_t command) F_attribute_visibility_internal_d;
+ extern void control_print_error_parameter_command_rule_directory_empty(control_main_t * const main, const f_string_static_t command) F_attribute_visibility_internal_d;
#endif // _di_control_print_error_parameter_command_rule_directory_empty_
/**
* The parameter representing a command.
*/
#ifndef _di_control_print_error_parameter_command_rule_empty_
- extern void control_print_error_parameter_command_rule_empty(control_main_t * const main, const f_string_t command) F_attribute_visibility_internal_d;
+ extern void control_print_error_parameter_command_rule_empty(control_main_t * const main, const f_string_static_t command) F_attribute_visibility_internal_d;
#endif // _di_control_print_error_parameter_command_rule_empty_
/**
* The parameter representing a command.
*/
#ifndef _di_control_print_error_parameter_command_rule_not_
- extern void control_print_error_parameter_command_rule_not(control_main_t * const main, const f_string_t command) F_attribute_visibility_internal_d;
+ extern void control_print_error_parameter_command_rule_not(control_main_t * const main, const f_string_static_t command) F_attribute_visibility_internal_d;
#endif // _di_control_print_error_parameter_command_rule_not_
/**
* The parameter representing a command.
*/
#ifndef _di_control_print_error_parameter_command_rule_too_many_
- extern void control_print_error_parameter_command_rule_too_many(control_main_t * const main, const f_string_t command) F_attribute_visibility_internal_d;
+ extern void control_print_error_parameter_command_rule_too_many(control_main_t * const main, const f_string_static_t command) F_attribute_visibility_internal_d;
#endif // _di_control_print_error_parameter_command_rule_too_many_
/**
#endif
#ifndef _di_controller_program_version_
- const f_string_static_t controller_program_version_s = macro_f_string_static_t_initialize2(CONTROLLER_program_version_s, 0, CONTROLLER_program_version_s_length);
+ const f_string_static_t controller_program_version_s = macro_f_string_static_t_initialize(CONTROLLER_program_version_s, 0, CONTROLLER_program_version_s_length);
#endif // _di_controller_program_version_
#ifndef _di_controller_program_name_
- const f_string_static_t controller_program_name_s = macro_f_string_static_t_initialize2(CONTROLLER_program_name_s, 0, CONTROLLER_program_name_s_length);
- const f_string_static_t controller_program_name_long_s = macro_f_string_static_t_initialize2(CONTROLLER_program_name_long_s, 0, CONTROLLER_program_name_long_s_length);
+ const f_string_static_t controller_program_name_s = macro_f_string_static_t_initialize(CONTROLLER_program_name_s, 0, CONTROLLER_program_name_s_length);
+ const f_string_static_t controller_program_name_long_s = macro_f_string_static_t_initialize(CONTROLLER_program_name_long_s, 0, CONTROLLER_program_name_long_s_length);
- const f_string_static_t controller_program_name_init_s = macro_f_string_static_t_initialize2(CONTROLLER_program_name_init_s, 0, CONTROLLER_program_name_init_s_length);
- const f_string_static_t controller_program_name_init_long_s = macro_f_string_static_t_initialize2(CONTROLLER_program_name_init_long_s, 0, CONTROLLER_program_name_init_long_s_length);
+ const f_string_static_t controller_program_name_init_s = macro_f_string_static_t_initialize(CONTROLLER_program_name_init_s, 0, CONTROLLER_program_name_init_s_length);
+ const f_string_static_t controller_program_name_init_long_s = macro_f_string_static_t_initialize(CONTROLLER_program_name_init_long_s, 0, CONTROLLER_program_name_init_long_s_length);
#endif // _di_controller_program_name_
#ifndef _di_controller_defines_
- const f_string_static_t controller_default_program_script_s = macro_f_string_static_t_initialize2(CONTROLLER_default_program_script_s, 0, CONTROLLER_default_program_script_s_length);
- const f_string_static_t controller_path_pid_s = macro_f_string_static_t_initialize2(CONTROLLER_path_pid_s, 0, CONTROLLER_path_pid_s_length);
- const f_string_static_t controller_path_pid_init_s = macro_f_string_static_t_initialize2(CONTROLLER_path_pid_init_s, 0, CONTROLLER_path_pid_init_s_length);
- const f_string_static_t controller_path_pid_prefix_s = macro_f_string_static_t_initialize2(CONTROLLER_path_pid_prefix_s, 0, CONTROLLER_path_pid_prefix_s_length);
- const f_string_static_t controller_path_pid_suffix_s = macro_f_string_static_t_initialize2(CONTROLLER_path_pid_suffix_s, 0, CONTROLLER_path_pid_suffix_s_length);
- const f_string_static_t controller_path_settings_s = macro_f_string_static_t_initialize2(CONTROLLER_path_settings_s, 0, CONTROLLER_path_settings_s_length);
- const f_string_static_t controller_path_settings_init_s = macro_f_string_static_t_initialize2(CONTROLLER_path_settings_init_s, 0, CONTROLLER_path_settings_init_s_length);
- const f_string_static_t controller_path_socket_s = macro_f_string_static_t_initialize2(CONTROLLER_path_socket_s, 0, CONTROLLER_path_socket_s_length);
- const f_string_static_t controller_path_socket_init_s = macro_f_string_static_t_initialize2(CONTROLLER_path_socket_init_s, 0, CONTROLLER_path_socket_s_length);
- const f_string_static_t controller_path_socket_prefix_s = macro_f_string_static_t_initialize2(CONTROLLER_path_socket_prefix_s, 0, CONTROLLER_path_socket_prefix_s_length);
- const f_string_static_t controller_path_socket_suffix_s = macro_f_string_static_t_initialize2(CONTROLLER_path_socket_suffix_s, 0, CONTROLLER_path_socket_suffix_s_length);
+ const f_string_static_t controller_default_program_script_s = macro_f_string_static_t_initialize(CONTROLLER_default_program_script_s, 0, CONTROLLER_default_program_script_s_length);
+ const f_string_static_t controller_path_pid_s = macro_f_string_static_t_initialize(CONTROLLER_path_pid_s, 0, CONTROLLER_path_pid_s_length);
+ const f_string_static_t controller_path_pid_init_s = macro_f_string_static_t_initialize(CONTROLLER_path_pid_init_s, 0, CONTROLLER_path_pid_init_s_length);
+ const f_string_static_t controller_path_pid_prefix_s = macro_f_string_static_t_initialize(CONTROLLER_path_pid_prefix_s, 0, CONTROLLER_path_pid_prefix_s_length);
+ const f_string_static_t controller_path_pid_suffix_s = macro_f_string_static_t_initialize(CONTROLLER_path_pid_suffix_s, 0, CONTROLLER_path_pid_suffix_s_length);
+ const f_string_static_t controller_path_settings_s = macro_f_string_static_t_initialize(CONTROLLER_path_settings_s, 0, CONTROLLER_path_settings_s_length);
+ const f_string_static_t controller_path_settings_init_s = macro_f_string_static_t_initialize(CONTROLLER_path_settings_init_s, 0, CONTROLLER_path_settings_init_s_length);
+ const f_string_static_t controller_path_socket_s = macro_f_string_static_t_initialize(CONTROLLER_path_socket_s, 0, CONTROLLER_path_socket_s_length);
+ const f_string_static_t controller_path_socket_init_s = macro_f_string_static_t_initialize(CONTROLLER_path_socket_init_s, 0, CONTROLLER_path_socket_s_length);
+ const f_string_static_t controller_path_socket_prefix_s = macro_f_string_static_t_initialize(CONTROLLER_path_socket_prefix_s, 0, CONTROLLER_path_socket_prefix_s_length);
+ const f_string_static_t controller_path_socket_suffix_s = macro_f_string_static_t_initialize(CONTROLLER_path_socket_suffix_s, 0, CONTROLLER_path_socket_suffix_s_length);
- const f_string_static_t controller_short_cgroup_s = macro_f_string_static_t_initialize2(CONTROLLER_short_cgroup_s, 0, CONTROLLER_short_cgroup_s_length);
- const f_string_static_t controller_short_daemon_s = macro_f_string_static_t_initialize2(CONTROLLER_short_daemon_s, 0, CONTROLLER_short_daemon_s_length);
- const f_string_static_t controller_short_init_s = macro_f_string_static_t_initialize2(CONTROLLER_short_init_s, 0, CONTROLLER_short_init_s_length);
- const f_string_static_t controller_short_interruptible_s = macro_f_string_static_t_initialize2(CONTROLLER_short_interruptible_s, 0, CONTROLLER_short_interruptible_s_length);
- const f_string_static_t controller_short_pid_s = macro_f_string_static_t_initialize2(CONTROLLER_short_pid_s, 0, CONTROLLER_short_pid_s_length);
- const f_string_static_t controller_short_settings_s = macro_f_string_static_t_initialize2(CONTROLLER_short_settings_s, 0, CONTROLLER_short_settings_s_length);
- const f_string_static_t controller_short_simulate_s = macro_f_string_static_t_initialize2(CONTROLLER_short_simulate_s, 0, CONTROLLER_short_simulate_s_length);
- const f_string_static_t controller_short_socket_s = macro_f_string_static_t_initialize2(CONTROLLER_short_socket_s, 0, CONTROLLER_short_socket_s_length);
- const f_string_static_t controller_short_uninterruptible_s = macro_f_string_static_t_initialize2(CONTROLLER_short_uninterruptible_s, 0, CONTROLLER_short_uninterruptible_s_length);
- const f_string_static_t controller_short_validate_s = macro_f_string_static_t_initialize2(CONTROLLER_short_validate_s, 0, CONTROLLER_short_validate_s_length);
+ const f_string_static_t controller_short_cgroup_s = macro_f_string_static_t_initialize(CONTROLLER_short_cgroup_s, 0, CONTROLLER_short_cgroup_s_length);
+ const f_string_static_t controller_short_daemon_s = macro_f_string_static_t_initialize(CONTROLLER_short_daemon_s, 0, CONTROLLER_short_daemon_s_length);
+ const f_string_static_t controller_short_init_s = macro_f_string_static_t_initialize(CONTROLLER_short_init_s, 0, CONTROLLER_short_init_s_length);
+ const f_string_static_t controller_short_interruptible_s = macro_f_string_static_t_initialize(CONTROLLER_short_interruptible_s, 0, CONTROLLER_short_interruptible_s_length);
+ const f_string_static_t controller_short_pid_s = macro_f_string_static_t_initialize(CONTROLLER_short_pid_s, 0, CONTROLLER_short_pid_s_length);
+ const f_string_static_t controller_short_settings_s = macro_f_string_static_t_initialize(CONTROLLER_short_settings_s, 0, CONTROLLER_short_settings_s_length);
+ const f_string_static_t controller_short_simulate_s = macro_f_string_static_t_initialize(CONTROLLER_short_simulate_s, 0, CONTROLLER_short_simulate_s_length);
+ const f_string_static_t controller_short_socket_s = macro_f_string_static_t_initialize(CONTROLLER_short_socket_s, 0, CONTROLLER_short_socket_s_length);
+ const f_string_static_t controller_short_uninterruptible_s = macro_f_string_static_t_initialize(CONTROLLER_short_uninterruptible_s, 0, CONTROLLER_short_uninterruptible_s_length);
+ const f_string_static_t controller_short_validate_s = macro_f_string_static_t_initialize(CONTROLLER_short_validate_s, 0, CONTROLLER_short_validate_s_length);
- const f_string_static_t controller_long_cgroup_s = macro_f_string_static_t_initialize2(CONTROLLER_long_cgroup_s, 0, CONTROLLER_long_cgroup_s_length);
- const f_string_static_t controller_long_daemon_s = macro_f_string_static_t_initialize2(CONTROLLER_long_daemon_s, 0, CONTROLLER_long_daemon_s_length);
- const f_string_static_t controller_long_init_s = macro_f_string_static_t_initialize2(CONTROLLER_long_init_s, 0, CONTROLLER_long_init_s_length);
- const f_string_static_t controller_long_interruptible_s = macro_f_string_static_t_initialize2(CONTROLLER_long_interruptible_s, 0, CONTROLLER_long_interruptible_s_length);
- const f_string_static_t controller_long_pid_s = macro_f_string_static_t_initialize2(CONTROLLER_long_pid_s, 0, CONTROLLER_long_pid_s_length);
- const f_string_static_t controller_long_settings_s = macro_f_string_static_t_initialize2(CONTROLLER_long_settings_s, 0, CONTROLLER_long_settings_s_length);
- const f_string_static_t controller_long_simulate_s = macro_f_string_static_t_initialize2(CONTROLLER_long_simulate_s, 0, CONTROLLER_long_simulate_s_length);
- const f_string_static_t controller_long_socket_s = macro_f_string_static_t_initialize2(CONTROLLER_long_socket_s, 0, CONTROLLER_long_socket_s_length);
- const f_string_static_t controller_long_uninterruptible_s = macro_f_string_static_t_initialize2(CONTROLLER_long_uninterruptible_s, 0, CONTROLLER_long_uninterruptible_s_length);
- const f_string_static_t controller_long_validate_s = macro_f_string_static_t_initialize2(CONTROLLER_long_validate_s, 0, CONTROLLER_long_validate_s_length);
+ const f_string_static_t controller_long_cgroup_s = macro_f_string_static_t_initialize(CONTROLLER_long_cgroup_s, 0, CONTROLLER_long_cgroup_s_length);
+ const f_string_static_t controller_long_daemon_s = macro_f_string_static_t_initialize(CONTROLLER_long_daemon_s, 0, CONTROLLER_long_daemon_s_length);
+ const f_string_static_t controller_long_init_s = macro_f_string_static_t_initialize(CONTROLLER_long_init_s, 0, CONTROLLER_long_init_s_length);
+ const f_string_static_t controller_long_interruptible_s = macro_f_string_static_t_initialize(CONTROLLER_long_interruptible_s, 0, CONTROLLER_long_interruptible_s_length);
+ const f_string_static_t controller_long_pid_s = macro_f_string_static_t_initialize(CONTROLLER_long_pid_s, 0, CONTROLLER_long_pid_s_length);
+ const f_string_static_t controller_long_settings_s = macro_f_string_static_t_initialize(CONTROLLER_long_settings_s, 0, CONTROLLER_long_settings_s_length);
+ const f_string_static_t controller_long_simulate_s = macro_f_string_static_t_initialize(CONTROLLER_long_simulate_s, 0, CONTROLLER_long_simulate_s_length);
+ const f_string_static_t controller_long_socket_s = macro_f_string_static_t_initialize(CONTROLLER_long_socket_s, 0, CONTROLLER_long_socket_s_length);
+ const f_string_static_t controller_long_uninterruptible_s = macro_f_string_static_t_initialize(CONTROLLER_long_uninterruptible_s, 0, CONTROLLER_long_uninterruptible_s_length);
+ const f_string_static_t controller_long_validate_s = macro_f_string_static_t_initialize(CONTROLLER_long_validate_s, 0, CONTROLLER_long_validate_s_length);
#endif // _di_controller_defines_
#ifndef _di_controller_main_delete_
f_status_t controller_main_delete(controller_main_t * const main) {
- for (f_array_length_t i = 0; i < controller_total_parameters_d; ++i) {
-
- f_type_array_lengths_resize(0, &main->parameters[i].locations);
- f_type_array_lengths_resize(0, &main->parameters[i].locations_sub);
- f_type_array_lengths_resize(0, &main->parameters[i].values);
- } // for
+ f_console_parameters_delete(&main->parameters);
f_type_array_lengths_resize(0, &main->remaining);
macro_f_color_context_t_delete_simple(main->context);
#ifndef _di_controller_main_t_
typedef struct {
- f_console_parameter_t parameters[controller_total_parameters_d];
+ f_console_parameters_t parameters;
f_array_lengths_t remaining;
bool process_pipe;
#define controller_main_t_initialize \
{ \
- controller_console_parameter_t_initialize, \
+ f_console_parameters_t_initialize, \
f_array_lengths_t_initialize, \
F_false, \
F_false, \
#endif
#ifndef _di_controller_string_s_
- const f_string_static_t controller_action_s = macro_f_string_static_t_initialize2(CONTROLLER_action_s, 0, CONTROLLER_action_s_length);
- const f_string_static_t controller_actions_s = macro_f_string_static_t_initialize2(CONTROLLER_actions_s, 0, CONTROLLER_actions_s_length);
- const f_string_static_t controller_affinity_s = macro_f_string_static_t_initialize2(CONTROLLER_affinity_s, 0, CONTROLLER_affinity_s_length);
- const f_string_static_t controller_as_s = macro_f_string_static_t_initialize2(CONTROLLER_as_s, 0, CONTROLLER_as_s_length);
- const f_string_static_t controller_asynchronous_s = macro_f_string_static_t_initialize2(CONTROLLER_asynchronous_s, 0, CONTROLLER_asynchronous_s_length);
- const f_string_static_t controller_bash_s = macro_f_string_static_t_initialize2(CONTROLLER_bash_s, 0, CONTROLLER_bash_s_length);
- const f_string_static_t controller_batch_s = macro_f_string_static_t_initialize2(CONTROLLER_batch_s, 0, CONTROLLER_batch_s_length);
- const f_string_static_t controller_capability_s = macro_f_string_static_t_initialize2(CONTROLLER_capability_s, 0, CONTROLLER_capability_s_length);
- const f_string_static_t controller_cgroup_s = macro_f_string_static_t_initialize2(CONTROLLER_cgroup_s, 0, CONTROLLER_cgroup_s_length);
- const f_string_static_t controller_create_s = macro_f_string_static_t_initialize2(CONTROLLER_create_s, 0, CONTROLLER_create_s_length);
- const f_string_static_t controller_command_s = macro_f_string_static_t_initialize2(CONTROLLER_command_s, 0, CONTROLLER_command_s_length);
- const f_string_static_t controller_consider_s = macro_f_string_static_t_initialize2(CONTROLLER_consider_s, 0, CONTROLLER_consider_s_length);
- const f_string_static_t controller_control_s = macro_f_string_static_t_initialize2(CONTROLLER_control_s, 0, CONTROLLER_control_s_length);
- const f_string_static_t controller_control_group_s = macro_f_string_static_t_initialize2(CONTROLLER_control_group_s, 0, CONTROLLER_control_group_s_length);
- const f_string_static_t controller_control_mode_s = macro_f_string_static_t_initialize2(CONTROLLER_control_mode_s, 0, CONTROLLER_control_mode_s_length);
- const f_string_static_t controller_control_user_s = macro_f_string_static_t_initialize2(CONTROLLER_control_user_s, 0, CONTROLLER_control_user_s_length);
- const f_string_static_t controller_cpu_s = macro_f_string_static_t_initialize2(CONTROLLER_cpu_s, 0, CONTROLLER_cpu_s_length);
- const f_string_static_t controller_core_s = macro_f_string_static_t_initialize2(CONTROLLER_core_s, 0, CONTROLLER_core_s_length);
- const f_string_static_t controller_data_s = macro_f_string_static_t_initialize2(CONTROLLER_data_s, 0, CONTROLLER_data_s_length);
- const f_string_static_t controller_deadline_s = macro_f_string_static_t_initialize2(CONTROLLER_deadline_s, 0, CONTROLLER_deadline_s_length);
- const f_string_static_t controller_default_s = macro_f_string_static_t_initialize2(CONTROLLER_default_s, 0, CONTROLLER_default_s_length);
- const f_string_static_t controller_define_s = macro_f_string_static_t_initialize2(CONTROLLER_define_s, 0, CONTROLLER_define_s_length);
- const f_string_static_t controller_delay_s = macro_f_string_static_t_initialize2(CONTROLLER_delay_s, 0, CONTROLLER_delay_s_length);
- const f_string_static_t controller_disable_s = macro_f_string_static_t_initialize2(CONTROLLER_disable_s, 0, CONTROLLER_disable_s_length);
- const f_string_static_t controller_entry_s = macro_f_string_static_t_initialize2(CONTROLLER_entry_s, 0, CONTROLLER_entry_s_length);
- const f_string_static_t controller_entries_s = macro_f_string_static_t_initialize2(CONTROLLER_entries_s, 0, CONTROLLER_entries_s_length);
- const f_string_static_t controller_environment_s = macro_f_string_static_t_initialize2(CONTROLLER_environment_s, 0, CONTROLLER_environment_s_length);
- const f_string_static_t controller_error_s = macro_f_string_static_t_initialize2(CONTROLLER_error_s, 0, CONTROLLER_error_s_length);
- const f_string_static_t controller_execute_s = macro_f_string_static_t_initialize2(CONTROLLER_execute_s, 0, CONTROLLER_execute_s_length);
- const f_string_static_t controller_existing_s = macro_f_string_static_t_initialize2(CONTROLLER_existing_s, 0, CONTROLLER_existing_s_length);
- const f_string_static_t controller_exit_s = macro_f_string_static_t_initialize2(CONTROLLER_exit_s, 0, CONTROLLER_exit_s_length);
- const f_string_static_t controller_exits_s = macro_f_string_static_t_initialize2(CONTROLLER_exits_s, 0, CONTROLLER_exits_s_length);
- const f_string_static_t controller_fail_s = macro_f_string_static_t_initialize2(CONTROLLER_fail_s, 0, CONTROLLER_fail_s_length);
- const f_string_static_t controller_failsafe_s = macro_f_string_static_t_initialize2(CONTROLLER_failsafe_s, 0, CONTROLLER_failsafe_s_length);
- const f_string_static_t controller_failure_s = macro_f_string_static_t_initialize2(CONTROLLER_failure_s, 0, CONTROLLER_failure_s_length);
- const f_string_static_t controller_fifo_s = macro_f_string_static_t_initialize2(CONTROLLER_fifo_s, 0, CONTROLLER_fifo_s_length);
- const f_string_static_t controller_freeze_s = macro_f_string_static_t_initialize2(CONTROLLER_freeze_s, 0, CONTROLLER_freeze_s_length);
- const f_string_static_t controller_fsize_s = macro_f_string_static_t_initialize2(CONTROLLER_fsize_s, 0, CONTROLLER_fsize_s_length);
- const f_string_static_t controller_full_path_s = macro_f_string_static_t_initialize2(CONTROLLER_full_path_s, 0, CONTROLLER_full_path_s_length);
- const f_string_static_t controller_group_s = macro_f_string_static_t_initialize2(CONTROLLER_group_s, 0, CONTROLLER_group_s_length);
- const f_string_static_t controller_groups_s = macro_f_string_static_t_initialize2(CONTROLLER_groups_s, 0, CONTROLLER_groups_s_length);
- const f_string_static_t controller_how_s = macro_f_string_static_t_initialize2(CONTROLLER_how_s, 0, CONTROLLER_how_s_length);
- const f_string_static_t controller_idle_s = macro_f_string_static_t_initialize2(CONTROLLER_idle_s, 0, CONTROLLER_idle_s_length);
- const f_string_static_t controller_item_s = macro_f_string_static_t_initialize2(CONTROLLER_item_s, 0, CONTROLLER_item_s_length);
- const f_string_static_t controller_init_s = macro_f_string_static_t_initialize2(CONTROLLER_init_s, 0, CONTROLLER_init_s_length);
- const f_string_static_t controller_kill_s = macro_f_string_static_t_initialize2(CONTROLLER_kill_s, 0, CONTROLLER_kill_s_length);
- const f_string_static_t controller_length_s = macro_f_string_static_t_initialize2(CONTROLLER_length_s, 0, CONTROLLER_length_s_length);
- const f_string_static_t controller_limit_s = macro_f_string_static_t_initialize2(CONTROLLER_limit_s, 0, CONTROLLER_limit_s_length);
- const f_string_static_t controller_locks_s = macro_f_string_static_t_initialize2(CONTROLLER_locks_s, 0, CONTROLLER_locks_s_length);
- const f_string_static_t controller_main_s = macro_f_string_static_t_initialize2(CONTROLLER_main_s, 0, CONTROLLER_main_s_length);
- const f_string_static_t controller_max_s = macro_f_string_static_t_initialize2(CONTROLLER_max_s, 0, CONTROLLER_max_s_length);
- const f_string_static_t controller_memlock_s = macro_f_string_static_t_initialize2(CONTROLLER_memlock_s, 0, CONTROLLER_memlock_s_length);
- const f_string_static_t controller_method_s = macro_f_string_static_t_initialize2(CONTROLLER_method_s, 0, CONTROLLER_method_s_length);
- const f_string_static_t controller_mode_s = macro_f_string_static_t_initialize2(CONTROLLER_mode_s, 0, CONTROLLER_mode_s_length);
- const f_string_static_t controller_msgqueue_s = macro_f_string_static_t_initialize2(CONTROLLER_msgqueue_s, 0, CONTROLLER_msgqueue_s_length);
- const f_string_static_t controller_name_s = macro_f_string_static_t_initialize2(CONTROLLER_name_s, 0, CONTROLLER_name_s_length);
- const f_string_static_t controller_need_s = macro_f_string_static_t_initialize2(CONTROLLER_need_s, 0, CONTROLLER_need_s_length);
- const f_string_static_t controller_new_s = macro_f_string_static_t_initialize2(CONTROLLER_new_s, 0, CONTROLLER_new_s_length);
- const f_string_static_t controller_nice_s = macro_f_string_static_t_initialize2(CONTROLLER_nice_s, 0, CONTROLLER_nice_s_length);
- const f_string_static_t controller_no_s = macro_f_string_static_t_initialize2(CONTROLLER_no_s, 0, CONTROLLER_no_s_length);
- const f_string_static_t controller_nofile_s = macro_f_string_static_t_initialize2(CONTROLLER_nofile_s, 0, CONTROLLER_nofile_s_length);
- const f_string_static_t controller_normal_s = macro_f_string_static_t_initialize2(CONTROLLER_normal_s, 0, CONTROLLER_normal_s_length);
- const f_string_static_t controller_nproc_s = macro_f_string_static_t_initialize2(CONTROLLER_nproc_s, 0, CONTROLLER_nproc_s_length);
- const f_string_static_t controller_on_s = macro_f_string_static_t_initialize2(CONTROLLER_on_s, 0, CONTROLLER_on_s_length);
- const f_string_static_t controller_optional_s = macro_f_string_static_t_initialize2(CONTROLLER_optional_s, 0, CONTROLLER_optional_s_length);
- const f_string_static_t controller_other_s = macro_f_string_static_t_initialize2(CONTROLLER_other_s, 0, CONTROLLER_other_s_length);
- const f_string_static_t controller_parameter_s = macro_f_string_static_t_initialize2(CONTROLLER_parameter_s, 0, CONTROLLER_parameter_s_length);
- const f_string_static_t controller_parameters_s = macro_f_string_static_t_initialize2(CONTROLLER_parameters_s, 0, CONTROLLER_parameters_s_length);
- const f_string_static_t controller_path_s = macro_f_string_static_t_initialize2(CONTROLLER_path_s, 0, CONTROLLER_path_s_length);
- const f_string_static_t controller_pause_s = macro_f_string_static_t_initialize2(CONTROLLER_pause_s, 0, CONTROLLER_pause_s_length);
- const f_string_static_t controller_payload_type_s = macro_f_string_static_t_initialize2(CONTROLLER_payload_type_s, 0, CONTROLLER_payload_type_s_length);
- const f_string_static_t controller_pid_s = macro_f_string_static_t_initialize2(CONTROLLER_pid_s, 0, CONTROLLER_pid_s_length);
- const f_string_static_t controller_pid_file_s = macro_f_string_static_t_initialize2(CONTROLLER_pid_file_s, 0, CONTROLLER_pid_file_s_length);
- const f_string_static_t controller_processor_s = macro_f_string_static_t_initialize2(CONTROLLER_processor_s, 0, CONTROLLER_processor_s_length);
- const f_string_static_t controller_program_s = macro_f_string_static_t_initialize2(CONTROLLER_program_s, 0, CONTROLLER_program_s_length);
- const f_string_static_t controller_ready_s = macro_f_string_static_t_initialize2(CONTROLLER_ready_s, 0, CONTROLLER_ready_s_length);
- const f_string_static_t controller_reload_s = macro_f_string_static_t_initialize2(CONTROLLER_reload_s, 0, CONTROLLER_reload_s_length);
- const f_string_static_t controller_require_s = macro_f_string_static_t_initialize2(CONTROLLER_require_s, 0, CONTROLLER_require_s_length);
- const f_string_static_t controller_required_s = macro_f_string_static_t_initialize2(CONTROLLER_required_s, 0, CONTROLLER_required_s_length);
- const f_string_static_t controller_rerun_s = macro_f_string_static_t_initialize2(CONTROLLER_rerun_s, 0, CONTROLLER_rerun_s_length);
- const f_string_static_t controller_reset_s = macro_f_string_static_t_initialize2(CONTROLLER_reset_s, 0, CONTROLLER_reset_s_length);
- const f_string_static_t controller_restart_s = macro_f_string_static_t_initialize2(CONTROLLER_restart_s, 0, CONTROLLER_restart_s_length);
- const f_string_static_t controller_resume_s = macro_f_string_static_t_initialize2(CONTROLLER_resume_s, 0, CONTROLLER_resume_s_length);
- const f_string_static_t controller_round_robin_s = macro_f_string_static_t_initialize2(CONTROLLER_round_robin_s, 0, CONTROLLER_round_robin_s_length);
- const f_string_static_t controller_rss_s = macro_f_string_static_t_initialize2(CONTROLLER_rss_s, 0, CONTROLLER_rss_s_length);
- const f_string_static_t controller_rtprio_s = macro_f_string_static_t_initialize2(CONTROLLER_rtprio_s, 0, CONTROLLER_rtprio_s_length);
- const f_string_static_t controller_rttime_s = macro_f_string_static_t_initialize2(CONTROLLER_rttime_s, 0, CONTROLLER_rttime_s_length);
- const f_string_static_t controller_rule_s = macro_f_string_static_t_initialize2(CONTROLLER_rule_s, 0, CONTROLLER_rule_s_length);
- const f_string_static_t controller_rules_s = macro_f_string_static_t_initialize2(CONTROLLER_rules_s, 0, CONTROLLER_rules_s_length);
- const f_string_static_t controller_same_s = macro_f_string_static_t_initialize2(CONTROLLER_same_s, 0, CONTROLLER_same_s_length);
- const f_string_static_t controller_scheduler_s = macro_f_string_static_t_initialize2(CONTROLLER_scheduler_s, 0, CONTROLLER_scheduler_s_length);
- const f_string_static_t controller_script_s = macro_f_string_static_t_initialize2(CONTROLLER_script_s, 0, CONTROLLER_script_s_length);
- const f_string_static_t controller_service_s = macro_f_string_static_t_initialize2(CONTROLLER_service_s, 0, CONTROLLER_service_s_length);
- const f_string_static_t controller_setting_s = macro_f_string_static_t_initialize2(CONTROLLER_setting_s, 0, CONTROLLER_setting_s_length);
- const f_string_static_t controller_session_s = macro_f_string_static_t_initialize2(CONTROLLER_session_s, 0, CONTROLLER_session_s_length);
- const f_string_static_t controller_session_new_s = macro_f_string_static_t_initialize2(CONTROLLER_session_new_s, 0, CONTROLLER_session_new_s_length);
- const f_string_static_t controller_session_same_s = macro_f_string_static_t_initialize2(CONTROLLER_session_same_s, 0, CONTROLLER_session_same_s_length);
- const f_string_static_t controller_show_s = macro_f_string_static_t_initialize2(CONTROLLER_show_s, 0, CONTROLLER_show_s_length);
- const f_string_static_t controller_sigpending_s = macro_f_string_static_t_initialize2(CONTROLLER_sigpending_s, 0, CONTROLLER_sigpending_s_length);
- const f_string_static_t controller_stack_s = macro_f_string_static_t_initialize2(CONTROLLER_stack_s, 0, CONTROLLER_stack_s_length);
- const f_string_static_t controller_start_s = macro_f_string_static_t_initialize2(CONTROLLER_start_s, 0, CONTROLLER_start_s_length);
- const f_string_static_t controller_status_s = macro_f_string_static_t_initialize2(CONTROLLER_status_s, 0, CONTROLLER_status_s_length);
- const f_string_static_t controller_stop_s = macro_f_string_static_t_initialize2(CONTROLLER_stop_s, 0, CONTROLLER_stop_s_length);
- const f_string_static_t controller_succeed_s = macro_f_string_static_t_initialize2(CONTROLLER_succeed_s, 0, CONTROLLER_succeed_s_length);
- const f_string_static_t controller_success_s = macro_f_string_static_t_initialize2(CONTROLLER_success_s, 0, CONTROLLER_success_s_length);
- const f_string_static_t controller_synchronous_s = macro_f_string_static_t_initialize2(CONTROLLER_synchronous_s, 0, CONTROLLER_synchronous_s_length);
- const f_string_static_t controller_thaw_s = macro_f_string_static_t_initialize2(CONTROLLER_thaw_s, 0, CONTROLLER_thaw_s_length);
- const f_string_static_t controller_timeout_s = macro_f_string_static_t_initialize2(CONTROLLER_timeout_s, 0, CONTROLLER_timeout_s_length);
- const f_string_static_t controller_type_s = macro_f_string_static_t_initialize2(CONTROLLER_type_s, 0, CONTROLLER_type_s_length);
- const f_string_static_t controller_use_s = macro_f_string_static_t_initialize2(CONTROLLER_use_s, 0, CONTROLLER_use_s_length);
- const f_string_static_t controller_user_s = macro_f_string_static_t_initialize2(CONTROLLER_user_s, 0, CONTROLLER_user_s_length);
- const f_string_static_t controller_utility_s = macro_f_string_static_t_initialize2(CONTROLLER_utility_s, 0, CONTROLLER_utility_s_length);
- const f_string_static_t controller_value_s = macro_f_string_static_t_initialize2(CONTROLLER_value_s, 0, CONTROLLER_value_s_length);
- const f_string_static_t controller_wait_s = macro_f_string_static_t_initialize2(CONTROLLER_wait_s, 0, CONTROLLER_wait_s_length);
- const f_string_static_t controller_want_s = macro_f_string_static_t_initialize2(CONTROLLER_want_s, 0, CONTROLLER_want_s_length);
- const f_string_static_t controller_wish_s = macro_f_string_static_t_initialize2(CONTROLLER_wish_s, 0, CONTROLLER_wish_s_length);
- const f_string_static_t controller_with_s = macro_f_string_static_t_initialize2(CONTROLLER_with_s, 0, CONTROLLER_with_s_length);
- const f_string_static_t controller_yes_s = macro_f_string_static_t_initialize2(CONTROLLER_yes_s, 0, CONTROLLER_yes_s_length);
+ const f_string_static_t controller_action_s = macro_f_string_static_t_initialize(CONTROLLER_action_s, 0, CONTROLLER_action_s_length);
+ const f_string_static_t controller_actions_s = macro_f_string_static_t_initialize(CONTROLLER_actions_s, 0, CONTROLLER_actions_s_length);
+ const f_string_static_t controller_affinity_s = macro_f_string_static_t_initialize(CONTROLLER_affinity_s, 0, CONTROLLER_affinity_s_length);
+ const f_string_static_t controller_as_s = macro_f_string_static_t_initialize(CONTROLLER_as_s, 0, CONTROLLER_as_s_length);
+ const f_string_static_t controller_asynchronous_s = macro_f_string_static_t_initialize(CONTROLLER_asynchronous_s, 0, CONTROLLER_asynchronous_s_length);
+ const f_string_static_t controller_bash_s = macro_f_string_static_t_initialize(CONTROLLER_bash_s, 0, CONTROLLER_bash_s_length);
+ const f_string_static_t controller_batch_s = macro_f_string_static_t_initialize(CONTROLLER_batch_s, 0, CONTROLLER_batch_s_length);
+ const f_string_static_t controller_capability_s = macro_f_string_static_t_initialize(CONTROLLER_capability_s, 0, CONTROLLER_capability_s_length);
+ const f_string_static_t controller_cgroup_s = macro_f_string_static_t_initialize(CONTROLLER_cgroup_s, 0, CONTROLLER_cgroup_s_length);
+ const f_string_static_t controller_create_s = macro_f_string_static_t_initialize(CONTROLLER_create_s, 0, CONTROLLER_create_s_length);
+ const f_string_static_t controller_command_s = macro_f_string_static_t_initialize(CONTROLLER_command_s, 0, CONTROLLER_command_s_length);
+ const f_string_static_t controller_consider_s = macro_f_string_static_t_initialize(CONTROLLER_consider_s, 0, CONTROLLER_consider_s_length);
+ const f_string_static_t controller_control_s = macro_f_string_static_t_initialize(CONTROLLER_control_s, 0, CONTROLLER_control_s_length);
+ const f_string_static_t controller_control_group_s = macro_f_string_static_t_initialize(CONTROLLER_control_group_s, 0, CONTROLLER_control_group_s_length);
+ const f_string_static_t controller_control_mode_s = macro_f_string_static_t_initialize(CONTROLLER_control_mode_s, 0, CONTROLLER_control_mode_s_length);
+ const f_string_static_t controller_control_user_s = macro_f_string_static_t_initialize(CONTROLLER_control_user_s, 0, CONTROLLER_control_user_s_length);
+ const f_string_static_t controller_cpu_s = macro_f_string_static_t_initialize(CONTROLLER_cpu_s, 0, CONTROLLER_cpu_s_length);
+ const f_string_static_t controller_core_s = macro_f_string_static_t_initialize(CONTROLLER_core_s, 0, CONTROLLER_core_s_length);
+ const f_string_static_t controller_data_s = macro_f_string_static_t_initialize(CONTROLLER_data_s, 0, CONTROLLER_data_s_length);
+ const f_string_static_t controller_deadline_s = macro_f_string_static_t_initialize(CONTROLLER_deadline_s, 0, CONTROLLER_deadline_s_length);
+ const f_string_static_t controller_default_s = macro_f_string_static_t_initialize(CONTROLLER_default_s, 0, CONTROLLER_default_s_length);
+ const f_string_static_t controller_define_s = macro_f_string_static_t_initialize(CONTROLLER_define_s, 0, CONTROLLER_define_s_length);
+ const f_string_static_t controller_delay_s = macro_f_string_static_t_initialize(CONTROLLER_delay_s, 0, CONTROLLER_delay_s_length);
+ const f_string_static_t controller_disable_s = macro_f_string_static_t_initialize(CONTROLLER_disable_s, 0, CONTROLLER_disable_s_length);
+ const f_string_static_t controller_entry_s = macro_f_string_static_t_initialize(CONTROLLER_entry_s, 0, CONTROLLER_entry_s_length);
+ const f_string_static_t controller_entries_s = macro_f_string_static_t_initialize(CONTROLLER_entries_s, 0, CONTROLLER_entries_s_length);
+ const f_string_static_t controller_environment_s = macro_f_string_static_t_initialize(CONTROLLER_environment_s, 0, CONTROLLER_environment_s_length);
+ const f_string_static_t controller_error_s = macro_f_string_static_t_initialize(CONTROLLER_error_s, 0, CONTROLLER_error_s_length);
+ const f_string_static_t controller_execute_s = macro_f_string_static_t_initialize(CONTROLLER_execute_s, 0, CONTROLLER_execute_s_length);
+ const f_string_static_t controller_existing_s = macro_f_string_static_t_initialize(CONTROLLER_existing_s, 0, CONTROLLER_existing_s_length);
+ const f_string_static_t controller_exit_s = macro_f_string_static_t_initialize(CONTROLLER_exit_s, 0, CONTROLLER_exit_s_length);
+ const f_string_static_t controller_exits_s = macro_f_string_static_t_initialize(CONTROLLER_exits_s, 0, CONTROLLER_exits_s_length);
+ const f_string_static_t controller_fail_s = macro_f_string_static_t_initialize(CONTROLLER_fail_s, 0, CONTROLLER_fail_s_length);
+ const f_string_static_t controller_failsafe_s = macro_f_string_static_t_initialize(CONTROLLER_failsafe_s, 0, CONTROLLER_failsafe_s_length);
+ const f_string_static_t controller_failure_s = macro_f_string_static_t_initialize(CONTROLLER_failure_s, 0, CONTROLLER_failure_s_length);
+ const f_string_static_t controller_fifo_s = macro_f_string_static_t_initialize(CONTROLLER_fifo_s, 0, CONTROLLER_fifo_s_length);
+ const f_string_static_t controller_freeze_s = macro_f_string_static_t_initialize(CONTROLLER_freeze_s, 0, CONTROLLER_freeze_s_length);
+ const f_string_static_t controller_fsize_s = macro_f_string_static_t_initialize(CONTROLLER_fsize_s, 0, CONTROLLER_fsize_s_length);
+ const f_string_static_t controller_full_path_s = macro_f_string_static_t_initialize(CONTROLLER_full_path_s, 0, CONTROLLER_full_path_s_length);
+ const f_string_static_t controller_group_s = macro_f_string_static_t_initialize(CONTROLLER_group_s, 0, CONTROLLER_group_s_length);
+ const f_string_static_t controller_groups_s = macro_f_string_static_t_initialize(CONTROLLER_groups_s, 0, CONTROLLER_groups_s_length);
+ const f_string_static_t controller_how_s = macro_f_string_static_t_initialize(CONTROLLER_how_s, 0, CONTROLLER_how_s_length);
+ const f_string_static_t controller_idle_s = macro_f_string_static_t_initialize(CONTROLLER_idle_s, 0, CONTROLLER_idle_s_length);
+ const f_string_static_t controller_item_s = macro_f_string_static_t_initialize(CONTROLLER_item_s, 0, CONTROLLER_item_s_length);
+ const f_string_static_t controller_init_s = macro_f_string_static_t_initialize(CONTROLLER_init_s, 0, CONTROLLER_init_s_length);
+ const f_string_static_t controller_kill_s = macro_f_string_static_t_initialize(CONTROLLER_kill_s, 0, CONTROLLER_kill_s_length);
+ const f_string_static_t controller_length_s = macro_f_string_static_t_initialize(CONTROLLER_length_s, 0, CONTROLLER_length_s_length);
+ const f_string_static_t controller_limit_s = macro_f_string_static_t_initialize(CONTROLLER_limit_s, 0, CONTROLLER_limit_s_length);
+ const f_string_static_t controller_locks_s = macro_f_string_static_t_initialize(CONTROLLER_locks_s, 0, CONTROLLER_locks_s_length);
+ const f_string_static_t controller_main_s = macro_f_string_static_t_initialize(CONTROLLER_main_s, 0, CONTROLLER_main_s_length);
+ const f_string_static_t controller_max_s = macro_f_string_static_t_initialize(CONTROLLER_max_s, 0, CONTROLLER_max_s_length);
+ const f_string_static_t controller_memlock_s = macro_f_string_static_t_initialize(CONTROLLER_memlock_s, 0, CONTROLLER_memlock_s_length);
+ const f_string_static_t controller_method_s = macro_f_string_static_t_initialize(CONTROLLER_method_s, 0, CONTROLLER_method_s_length);
+ const f_string_static_t controller_mode_s = macro_f_string_static_t_initialize(CONTROLLER_mode_s, 0, CONTROLLER_mode_s_length);
+ const f_string_static_t controller_msgqueue_s = macro_f_string_static_t_initialize(CONTROLLER_msgqueue_s, 0, CONTROLLER_msgqueue_s_length);
+ const f_string_static_t controller_name_s = macro_f_string_static_t_initialize(CONTROLLER_name_s, 0, CONTROLLER_name_s_length);
+ const f_string_static_t controller_need_s = macro_f_string_static_t_initialize(CONTROLLER_need_s, 0, CONTROLLER_need_s_length);
+ const f_string_static_t controller_new_s = macro_f_string_static_t_initialize(CONTROLLER_new_s, 0, CONTROLLER_new_s_length);
+ const f_string_static_t controller_nice_s = macro_f_string_static_t_initialize(CONTROLLER_nice_s, 0, CONTROLLER_nice_s_length);
+ const f_string_static_t controller_no_s = macro_f_string_static_t_initialize(CONTROLLER_no_s, 0, CONTROLLER_no_s_length);
+ const f_string_static_t controller_nofile_s = macro_f_string_static_t_initialize(CONTROLLER_nofile_s, 0, CONTROLLER_nofile_s_length);
+ const f_string_static_t controller_normal_s = macro_f_string_static_t_initialize(CONTROLLER_normal_s, 0, CONTROLLER_normal_s_length);
+ const f_string_static_t controller_nproc_s = macro_f_string_static_t_initialize(CONTROLLER_nproc_s, 0, CONTROLLER_nproc_s_length);
+ const f_string_static_t controller_on_s = macro_f_string_static_t_initialize(CONTROLLER_on_s, 0, CONTROLLER_on_s_length);
+ const f_string_static_t controller_optional_s = macro_f_string_static_t_initialize(CONTROLLER_optional_s, 0, CONTROLLER_optional_s_length);
+ const f_string_static_t controller_other_s = macro_f_string_static_t_initialize(CONTROLLER_other_s, 0, CONTROLLER_other_s_length);
+ const f_string_static_t controller_parameter_s = macro_f_string_static_t_initialize(CONTROLLER_parameter_s, 0, CONTROLLER_parameter_s_length);
+ const f_string_static_t controller_parameters_s = macro_f_string_static_t_initialize(CONTROLLER_parameters_s, 0, CONTROLLER_parameters_s_length);
+ const f_string_static_t controller_path_s = macro_f_string_static_t_initialize(CONTROLLER_path_s, 0, CONTROLLER_path_s_length);
+ const f_string_static_t controller_pause_s = macro_f_string_static_t_initialize(CONTROLLER_pause_s, 0, CONTROLLER_pause_s_length);
+ const f_string_static_t controller_payload_type_s = macro_f_string_static_t_initialize(CONTROLLER_payload_type_s, 0, CONTROLLER_payload_type_s_length);
+ const f_string_static_t controller_pid_s = macro_f_string_static_t_initialize(CONTROLLER_pid_s, 0, CONTROLLER_pid_s_length);
+ const f_string_static_t controller_pid_file_s = macro_f_string_static_t_initialize(CONTROLLER_pid_file_s, 0, CONTROLLER_pid_file_s_length);
+ const f_string_static_t controller_processor_s = macro_f_string_static_t_initialize(CONTROLLER_processor_s, 0, CONTROLLER_processor_s_length);
+ const f_string_static_t controller_program_s = macro_f_string_static_t_initialize(CONTROLLER_program_s, 0, CONTROLLER_program_s_length);
+ const f_string_static_t controller_ready_s = macro_f_string_static_t_initialize(CONTROLLER_ready_s, 0, CONTROLLER_ready_s_length);
+ const f_string_static_t controller_reload_s = macro_f_string_static_t_initialize(CONTROLLER_reload_s, 0, CONTROLLER_reload_s_length);
+ const f_string_static_t controller_require_s = macro_f_string_static_t_initialize(CONTROLLER_require_s, 0, CONTROLLER_require_s_length);
+ const f_string_static_t controller_required_s = macro_f_string_static_t_initialize(CONTROLLER_required_s, 0, CONTROLLER_required_s_length);
+ const f_string_static_t controller_rerun_s = macro_f_string_static_t_initialize(CONTROLLER_rerun_s, 0, CONTROLLER_rerun_s_length);
+ const f_string_static_t controller_reset_s = macro_f_string_static_t_initialize(CONTROLLER_reset_s, 0, CONTROLLER_reset_s_length);
+ const f_string_static_t controller_restart_s = macro_f_string_static_t_initialize(CONTROLLER_restart_s, 0, CONTROLLER_restart_s_length);
+ const f_string_static_t controller_resume_s = macro_f_string_static_t_initialize(CONTROLLER_resume_s, 0, CONTROLLER_resume_s_length);
+ const f_string_static_t controller_round_robin_s = macro_f_string_static_t_initialize(CONTROLLER_round_robin_s, 0, CONTROLLER_round_robin_s_length);
+ const f_string_static_t controller_rss_s = macro_f_string_static_t_initialize(CONTROLLER_rss_s, 0, CONTROLLER_rss_s_length);
+ const f_string_static_t controller_rtprio_s = macro_f_string_static_t_initialize(CONTROLLER_rtprio_s, 0, CONTROLLER_rtprio_s_length);
+ const f_string_static_t controller_rttime_s = macro_f_string_static_t_initialize(CONTROLLER_rttime_s, 0, CONTROLLER_rttime_s_length);
+ const f_string_static_t controller_rule_s = macro_f_string_static_t_initialize(CONTROLLER_rule_s, 0, CONTROLLER_rule_s_length);
+ const f_string_static_t controller_rules_s = macro_f_string_static_t_initialize(CONTROLLER_rules_s, 0, CONTROLLER_rules_s_length);
+ const f_string_static_t controller_same_s = macro_f_string_static_t_initialize(CONTROLLER_same_s, 0, CONTROLLER_same_s_length);
+ const f_string_static_t controller_scheduler_s = macro_f_string_static_t_initialize(CONTROLLER_scheduler_s, 0, CONTROLLER_scheduler_s_length);
+ const f_string_static_t controller_script_s = macro_f_string_static_t_initialize(CONTROLLER_script_s, 0, CONTROLLER_script_s_length);
+ const f_string_static_t controller_service_s = macro_f_string_static_t_initialize(CONTROLLER_service_s, 0, CONTROLLER_service_s_length);
+ const f_string_static_t controller_setting_s = macro_f_string_static_t_initialize(CONTROLLER_setting_s, 0, CONTROLLER_setting_s_length);
+ const f_string_static_t controller_session_s = macro_f_string_static_t_initialize(CONTROLLER_session_s, 0, CONTROLLER_session_s_length);
+ const f_string_static_t controller_session_new_s = macro_f_string_static_t_initialize(CONTROLLER_session_new_s, 0, CONTROLLER_session_new_s_length);
+ const f_string_static_t controller_session_same_s = macro_f_string_static_t_initialize(CONTROLLER_session_same_s, 0, CONTROLLER_session_same_s_length);
+ const f_string_static_t controller_show_s = macro_f_string_static_t_initialize(CONTROLLER_show_s, 0, CONTROLLER_show_s_length);
+ const f_string_static_t controller_sigpending_s = macro_f_string_static_t_initialize(CONTROLLER_sigpending_s, 0, CONTROLLER_sigpending_s_length);
+ const f_string_static_t controller_stack_s = macro_f_string_static_t_initialize(CONTROLLER_stack_s, 0, CONTROLLER_stack_s_length);
+ const f_string_static_t controller_start_s = macro_f_string_static_t_initialize(CONTROLLER_start_s, 0, CONTROLLER_start_s_length);
+ const f_string_static_t controller_status_s = macro_f_string_static_t_initialize(CONTROLLER_status_s, 0, CONTROLLER_status_s_length);
+ const f_string_static_t controller_stop_s = macro_f_string_static_t_initialize(CONTROLLER_stop_s, 0, CONTROLLER_stop_s_length);
+ const f_string_static_t controller_succeed_s = macro_f_string_static_t_initialize(CONTROLLER_succeed_s, 0, CONTROLLER_succeed_s_length);
+ const f_string_static_t controller_success_s = macro_f_string_static_t_initialize(CONTROLLER_success_s, 0, CONTROLLER_success_s_length);
+ const f_string_static_t controller_synchronous_s = macro_f_string_static_t_initialize(CONTROLLER_synchronous_s, 0, CONTROLLER_synchronous_s_length);
+ const f_string_static_t controller_thaw_s = macro_f_string_static_t_initialize(CONTROLLER_thaw_s, 0, CONTROLLER_thaw_s_length);
+ const f_string_static_t controller_timeout_s = macro_f_string_static_t_initialize(CONTROLLER_timeout_s, 0, CONTROLLER_timeout_s_length);
+ const f_string_static_t controller_type_s = macro_f_string_static_t_initialize(CONTROLLER_type_s, 0, CONTROLLER_type_s_length);
+ const f_string_static_t controller_use_s = macro_f_string_static_t_initialize(CONTROLLER_use_s, 0, CONTROLLER_use_s_length);
+ const f_string_static_t controller_user_s = macro_f_string_static_t_initialize(CONTROLLER_user_s, 0, CONTROLLER_user_s_length);
+ const f_string_static_t controller_utility_s = macro_f_string_static_t_initialize(CONTROLLER_utility_s, 0, CONTROLLER_utility_s_length);
+ const f_string_static_t controller_value_s = macro_f_string_static_t_initialize(CONTROLLER_value_s, 0, CONTROLLER_value_s_length);
+ const f_string_static_t controller_wait_s = macro_f_string_static_t_initialize(CONTROLLER_wait_s, 0, CONTROLLER_wait_s_length);
+ const f_string_static_t controller_want_s = macro_f_string_static_t_initialize(CONTROLLER_want_s, 0, CONTROLLER_want_s_length);
+ const f_string_static_t controller_wish_s = macro_f_string_static_t_initialize(CONTROLLER_wish_s, 0, CONTROLLER_wish_s_length);
+ const f_string_static_t controller_with_s = macro_f_string_static_t_initialize(CONTROLLER_with_s, 0, CONTROLLER_with_s_length);
+ const f_string_static_t controller_yes_s = macro_f_string_static_t_initialize(CONTROLLER_yes_s, 0, CONTROLLER_yes_s_length);
#endif // _di_controller_string_s_
#ifdef __cplusplus
#endif
#ifndef _di_controller_rule_action_t_
- const f_string_static_t controller_rule_action_method_string_extended_s = macro_f_string_static_t_initialize2(CONTROLLER_rule_action_method_string_extended_s, 0, CONTROLLER_rule_action_method_string_extended_s_length);
- const f_string_static_t controller_rule_action_method_string_extended_list_s = macro_f_string_static_t_initialize2(CONTROLLER_rule_action_method_string_extended_list_s, 0, CONTROLLER_rule_action_method_string_extended_list_s_length);
+ const f_string_static_t controller_rule_action_method_string_extended_s = macro_f_string_static_t_initialize(CONTROLLER_rule_action_method_string_extended_s, 0, CONTROLLER_rule_action_method_string_extended_s_length);
+ const f_string_static_t controller_rule_action_method_string_extended_list_s = macro_f_string_static_t_initialize(CONTROLLER_rule_action_method_string_extended_list_s, 0, CONTROLLER_rule_action_method_string_extended_list_s_length);
#endif // _di_controller_rule_action_t_
#ifndef _di_controller_rule_action_delete_simple_
#ifndef _di_controller_control_respond_error_string_
f_status_t controller_control_respond_error_string(const controller_global_t *global, controller_control_t * const control, const f_status_t status, const f_string_t message) {
- const f_string_static_t string = macro_f_string_static_t_initialize(message, strlen(message));
+ const f_string_static_t string = macro_f_string_static_t_initialize2(message, strlen(message));
return controller_control_respond_error(global, control, status, string);
}
f_status_t status = F_none;
+ f_console_parameter_t parameters[] = controller_console_parameter_t_initialize;
+ main->parameters.array = parameters;
+ main->parameters.used = controller_total_parameters_d;
+
{
- const f_console_parameters_t parameters = macro_f_console_parameters_t_initialize(main->parameters, controller_total_parameters_d);
+ f_console_parameter_id_t ids[3] = { controller_parameter_no_color_e, controller_parameter_light_e, controller_parameter_dark_e };
+ const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 3);
- {
- f_console_parameter_id_t ids[3] = { controller_parameter_no_color_e, controller_parameter_light_e, controller_parameter_dark_e };
- const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 3);
+ status = fll_program_parameter_process(*arguments, &main->parameters, choices, F_true, &main->remaining, &main->context);
- status = fll_program_parameter_process(*arguments, parameters, choices, F_true, &main->remaining, &main->context);
+ main->output.set = &main->context.set;
+ main->error.set = &main->context.set;
+ main->warning.set = &main->context.set;
- main->output.set = &main->context.set;
- main->error.set = &main->context.set;
- main->warning.set = &main->context.set;
+ if (main->context.set.error.before) {
+ main->output.context = f_color_set_empty_s;
+ main->output.notable = main->context.set.notable;
- if (main->context.set.error.before) {
- main->output.context = f_color_set_empty_s;
- main->output.notable = main->context.set.notable;
+ main->error.context = main->context.set.error;
+ main->error.notable = main->context.set.notable;
- main->error.context = main->context.set.error;
- main->error.notable = main->context.set.notable;
+ main->warning.context = main->context.set.warning;
+ main->warning.notable = main->context.set.notable;
+ }
+ else {
+ f_color_set_t *sets[] = { &main->output.context, &main->output.notable, &main->error.context, &main->error.notable, &main->warning.context, &main->warning.notable, 0 };
- main->warning.context = main->context.set.warning;
- main->warning.notable = main->context.set.notable;
- }
- else {
- f_color_set_t *sets[] = { &main->output.context, &main->output.notable, &main->error.context, &main->error.notable, &main->warning.context, &main->warning.notable, 0 };
+ fll_program_parameter_process_empty(&main->context, sets);
+ }
- fll_program_parameter_process_empty(&main->context, sets);
+ if (F_status_is_error(status)) {
+ if (main->error.verbosity != f_console_verbosity_quiet_e) {
+ fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process", F_true);
+ fll_print_dynamic(f_string_eol_s, main->error.to.stream);
}
- if (F_status_is_error(status)) {
- if (main->error.verbosity != f_console_verbosity_quiet_e) {
- fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process", F_true);
- fll_print_dynamic(f_string_eol_s, main->error.to.stream);
- }
+ controller_main_delete(main);
- controller_main_delete(main);
-
- return F_status_set_error(status);
- }
+ return F_status_set_error(status);
}
+ }
- // Identify priority of verbosity related parameters.
- {
- f_console_parameter_id_t ids[4] = { controller_parameter_verbosity_quiet_e, controller_parameter_verbosity_normal_e, controller_parameter_verbosity_verbose_e, controller_parameter_verbosity_debug_e };
- f_console_parameter_id_t choice = 0;
- const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 4);
+ // Identify priority of verbosity related parameters.
+ {
+ f_console_parameter_id_t ids[4] = { controller_parameter_verbosity_quiet_e, controller_parameter_verbosity_normal_e, controller_parameter_verbosity_verbose_e, controller_parameter_verbosity_debug_e };
+ f_console_parameter_id_t choice = 0;
+ const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 4);
- status = f_console_parameter_prioritize_right(parameters, choices, &choice);
+ status = f_console_parameter_prioritize_right(main->parameters, choices, &choice);
- if (F_status_is_error(status)) {
- controller_main_delete(main);
-
- return status;
- }
+ if (F_status_is_error(status)) {
+ controller_main_delete(main);
- if (choice == controller_parameter_verbosity_quiet_e) {
- main->output.verbosity = f_console_verbosity_quiet_e;
- main->error.verbosity = f_console_verbosity_quiet_e;
- main->warning.verbosity = f_console_verbosity_quiet_e;
- }
- else if (choice == controller_parameter_verbosity_normal_e) {
- main->output.verbosity = f_console_verbosity_normal_e;
- main->error.verbosity = f_console_verbosity_normal_e;
- main->warning.verbosity = f_console_verbosity_normal_e;
- }
- else if (choice == controller_parameter_verbosity_verbose_e) {
- main->output.verbosity = f_console_verbosity_verbose_e;
- main->error.verbosity = f_console_verbosity_verbose_e;
- main->warning.verbosity = f_console_verbosity_verbose_e;
- }
- else if (choice == controller_parameter_verbosity_debug_e) {
- main->output.verbosity = f_console_verbosity_debug_e;
- main->error.verbosity = f_console_verbosity_debug_e;
- main->warning.verbosity = f_console_verbosity_debug_e;
- }
+ return status;
}
- status = F_none;
+ if (choice == controller_parameter_verbosity_quiet_e) {
+ main->output.verbosity = f_console_verbosity_quiet_e;
+ main->error.verbosity = f_console_verbosity_quiet_e;
+ main->warning.verbosity = f_console_verbosity_quiet_e;
+ }
+ else if (choice == controller_parameter_verbosity_normal_e) {
+ main->output.verbosity = f_console_verbosity_normal_e;
+ main->error.verbosity = f_console_verbosity_normal_e;
+ main->warning.verbosity = f_console_verbosity_normal_e;
+ }
+ else if (choice == controller_parameter_verbosity_verbose_e) {
+ main->output.verbosity = f_console_verbosity_verbose_e;
+ main->error.verbosity = f_console_verbosity_verbose_e;
+ main->warning.verbosity = f_console_verbosity_verbose_e;
+ }
+ else if (choice == controller_parameter_verbosity_debug_e) {
+ main->output.verbosity = f_console_verbosity_debug_e;
+ main->error.verbosity = f_console_verbosity_debug_e;
+ main->warning.verbosity = f_console_verbosity_debug_e;
+ }
}
- if (main->parameters[controller_parameter_help_e].result == f_console_result_found_e) {
+ f_string_static_t * const argv = main->parameters.arguments.array;
+
+ status = F_none;
+
+ if (main->parameters.array[controller_parameter_help_e].result == f_console_result_found_e) {
controller_print_help(main);
controller_main_delete(main);
return F_none;
}
- if (main->parameters[controller_parameter_version_e].result == f_console_result_found_e) {
+ if (main->parameters.array[controller_parameter_version_e].result == f_console_result_found_e) {
controller_lock_print(main->output.to, 0);
fll_program_print_version(main->output.to, controller_program_version_s);
return status;
}
- if (main->parameters[controller_parameter_init_e].result == f_console_result_found_e) {
+ if (main->parameters.array[controller_parameter_init_e].result == f_console_result_found_e) {
main->as_init = F_true;
}
setting.mode = controller_setting_mode_service_e;
}
- if (main->parameters[controller_parameter_settings_e].result == f_console_result_found_e) {
+ if (main->parameters.array[controller_parameter_settings_e].result == f_console_result_found_e) {
if (main->error.verbosity != f_console_verbosity_quiet_e) {
controller_lock_print(main->error.to, 0);
status = F_status_set_error(F_parameter);
}
- else if (main->parameters[controller_parameter_settings_e].locations.used) {
- const f_array_length_t location = main->parameters[controller_parameter_settings_e].values.array[main->parameters[controller_parameter_settings_e].values.used - 1];
+ else if (main->parameters.array[controller_parameter_settings_e].locations.used) {
+ const f_array_length_t location = main->parameters.array[controller_parameter_settings_e].values.array[main->parameters.array[controller_parameter_settings_e].values.used - 1];
status = fll_path_canonical(arguments->argv[location], &setting.path_setting);
if (F_status_is_error(status)) {
- fll_error_file_print(main->error, F_status_set_fine(status), "fll_path_canonical", F_true, arguments->argv[location], "verify", fll_error_file_type_path_e);
+ const f_string_static_t argv = macro_f_string_static_t_initialize(arguments->argv[location], 0, strnlen(arguments->argv[location], F_console_parameter_size_d);
+
+ fll_error_file_print(main->error, F_status_set_fine(status), "fll_path_canonical", F_true, argv, f_file_operation_verify_s, fll_error_file_type_path_e);
}
}
else {
- if (main->parameters[controller_parameter_init_e].result == f_console_result_found_e && !main->as_init) {
+ if (main->parameters.array[controller_parameter_init_e].result == f_console_result_found_e && !main->as_init) {
status = f_string_dynamic_append(controller_path_settings_init_s, &setting.path_setting);
}
else if (main->default_path_setting->used) {
}
if (F_status_is_error_not(status)) {
- if (main->parameters[controller_parameter_pid_e].result == f_console_result_found_e) {
+ if (main->parameters.array[controller_parameter_pid_e].result == f_console_result_found_e) {
if (main->error.verbosity != f_console_verbosity_quiet_e) {
controller_lock_print(main->error.to, 0);
status = F_status_set_error(F_parameter);
}
- else if (main->parameters[controller_parameter_pid_e].locations.used) {
- const f_array_length_t location = main->parameters[controller_parameter_pid_e].values.array[main->parameters[controller_parameter_pid_e].values.used - 1];
+ else if (main->parameters.array[controller_parameter_pid_e].locations.used) {
+ const f_array_length_t location = main->parameters.array[controller_parameter_pid_e].values.array[main->parameters.array[controller_parameter_pid_e].values.used - 1];
if (strnlen(arguments->argv[location], F_console_parameter_size_d)) {
status = fll_path_canonical(arguments->argv[location], &setting.path_pid);
}
}
- if (F_status_is_error_not(status) && !setting.path_pid.used && !main->parameters[controller_parameter_pid_e].locations.used) {
- if (main->parameters[controller_parameter_init_e].result == f_console_result_found_e) {
+ if (F_status_is_error_not(status) && !setting.path_pid.used && !main->parameters.array[controller_parameter_pid_e].locations.used) {
+ if (main->parameters.array[controller_parameter_init_e].result == f_console_result_found_e) {
status = f_string_dynamic_append(controller_path_pid_init_s, &setting.path_pid);
}
else {
}
if (F_status_is_error_not(status)) {
- if (main->parameters[controller_parameter_cgroup_e].result == f_console_result_found_e) {
+ if (main->parameters.array[controller_parameter_cgroup_e].result == f_console_result_found_e) {
if (main->error.verbosity != f_console_verbosity_quiet_e) {
controller_lock_print(main->error.to, 0);
status = F_status_set_error(F_parameter);
}
- else if (main->parameters[controller_parameter_cgroup_e].locations.used) {
- const f_array_length_t location = main->parameters[controller_parameter_cgroup_e].values.array[main->parameters[controller_parameter_cgroup_e].values.used - 1];
+ else if (main->parameters.array[controller_parameter_cgroup_e].locations.used) {
+ const f_array_length_t location = main->parameters.array[controller_parameter_cgroup_e].values.array[main->parameters.array[controller_parameter_cgroup_e].values.used - 1];
if (strnlen(arguments->argv[location], F_console_parameter_size_d)) {
status = fll_path_canonical(arguments->argv[location], &setting.path_cgroup);
}
}
- if (F_status_is_error_not(status) && main->parameters[controller_parameter_daemon_e].result == f_console_result_found_e) {
- if (main->parameters[controller_parameter_validate_e].result == f_console_result_found_e) {
+ if (F_status_is_error_not(status) && main->parameters.array[controller_parameter_daemon_e].result == f_console_result_found_e) {
+ if (main->parameters.array[controller_parameter_validate_e].result == f_console_result_found_e) {
if (main->error.verbosity != f_console_verbosity_quiet_e) {
controller_lock_print(main->error.to, 0);
setting.entry.pid = controller_entry_pid_disable_e;
setting.entry.show = controller_entry_show_init_e;
- if (main->parameters[controller_parameter_interruptible_e].result == f_console_result_found_e) {
+ if (main->parameters.array[controller_parameter_interruptible_e].result == f_console_result_found_e) {
setting.interruptible = F_true;
}
else {
}
}
else {
- if (main->parameters[controller_parameter_uninterruptible_e].result == f_console_result_found_e) {
+ if (main->parameters.array[controller_parameter_uninterruptible_e].result == f_console_result_found_e) {
setting.interruptible = F_false;
}
else {
path[path_length] = 0;
- status = f_file_stream_open(path, 0, &file);
+ status = f_file_stream_open(path, f_string_empty_s, &file);
if (F_status_is_error(status)) {
if (!required && F_status_set_fine(status) == F_file_found_not) {
}
if (global.main->error.verbosity != f_console_verbosity_quiet_e) {
- controller_print_error_file(global.thread, global.main->error, F_status_set_fine(status), "f_file_stream_open", F_true, path, "open", fll_error_file_type_file_e);
+ controller_print_error_file(global.thread, global.main->error, F_status_set_fine(status), "f_file_stream_open", F_true, path, f_file_operation_open_s, fll_error_file_type_file_e);
}
}
else {
f_status_t status = F_none;
if (global->setting->entry.pid != controller_entry_pid_disable_e && !global->setting->path_pid.used) {
- if (global->main->parameters[controller_parameter_validate_e].result == f_console_result_additional_e) {
+ if (global->main->parameters.array[controller_parameter_validate_e].result == f_console_result_additional_e) {
status = controller_file_pid_create(global->main->pid, global->setting->path_pid);
}
fl_print_format("%qPID file '", global->main->output.to.stream, f_string_eol_s);
fl_print_format("%[%Q%]", global->main->output.to.stream, global->main->context.set.notable, global->setting->path_pid, global->main->context.set.notable);
- if (global->main->parameters[controller_parameter_validate_e].result == f_console_result_none_e) {
+ if (global->main->parameters.array[controller_parameter_validate_e].result == f_console_result_none_e) {
fl_print_format("' created.%q", global->main->output.to.stream, f_string_eol_s);
}
else {
fl_print_format("%qControl socket '", global->main->output.to.stream, f_string_eol_s);
fl_print_format("%[%Q%]", global->main->output.to.stream, global->main->context.set.notable, global->setting->path_control, global->main->context.set.notable);
- if (global->main->parameters[controller_parameter_validate_e].result == f_console_result_none_e) {
+ if (global->main->parameters.array[controller_parameter_validate_e].result == f_console_result_none_e) {
fl_print_format("' created.%q", global->main->output.to.stream, f_string_eol_s);
}
else {
#endif // _di_controller_print_error_
#ifndef _di_controller_print_error_file_
- void controller_print_error_file(controller_thread_t * const thread, const fl_print_t print, const f_status_t status, const f_string_t function, const bool fallback, const f_string_t name, const f_string_t operation, const uint8_t type) {
+ void controller_print_error_file(controller_thread_t * const thread, const fl_print_t print, const f_status_t status, const f_string_t function, const bool fallback, const f_string_static_t name, const f_string_static_t operation, const uint8_t type) {
if (print.verbosity == f_console_verbosity_quiet_e) return;
if (status == F_interrupt) return;
* @see fll_error_file_print()
*/
#ifndef _di_controller_print_error_file_
- extern void controller_print_error_file(controller_thread_t * const thread, const fl_print_t print, const f_status_t status, const f_string_t function, const bool fallback, const f_string_t name, const f_string_t operation, const uint8_t type) F_attribute_visibility_internal_d;
+ extern void controller_print_error_file(controller_thread_t * const thread, const fl_print_t print, const f_status_t status, const f_string_t function, const bool fallback, const f_string_static_t name, const f_string_static_t operation, const uint8_t type) F_attribute_visibility_internal_d;
#endif // _di_controller_print_error_file_
/**
if (F_status_is_error(status)) {
// @todo instead call: fll_error_file_print().
- // fll_error_file_print(main->error, F_status_set_fine(status), "fll_path_canonical", F_true, arguments->argv[location], "verify", fll_error_file_type_path_e);
+ // fll_error_file_print(main->error, F_status_set_fine(status), "fll_path_canonical", F_true, arguments->argv[location], f_file_operation_verify_s, fll_error_file_type_path_e);
controller_entry_print_error(is_entry, global.main->error, cache->action, F_status_set_fine(status), "fll_path_canonical", F_true, global.thread);
action->status = status;
return status;
}
- if (global->main->parameters[controller_parameter_simulate_e].result == f_console_result_found_e || global->main->error.verbosity == f_console_verbosity_verbose_e || global->main->error.verbosity == f_console_verbosity_debug_e) {
+ if (global->main->parameters.array[controller_parameter_simulate_e].result == f_console_result_found_e || global->main->error.verbosity == f_console_verbosity_verbose_e || global->main->error.verbosity == f_console_verbosity_debug_e) {
if (global->main->error.verbosity != f_console_verbosity_quiet_e) {
controller_lock_print(global->main->output.to, global->thread);
}
if (F_status_is_error(entry_action->status)) {
- if (global->main->parameters[controller_parameter_simulate_e].result == f_console_result_found_e) {
+ if (global->main->parameters.array[controller_parameter_simulate_e].result == f_console_result_found_e) {
if (global->main->error.verbosity != f_console_verbosity_quiet_e) {
controller_lock_print(global->main->output.to, global->thread);
if (entry_action->type == controller_entry_action_type_ready_e) {
if ((entry_action->code & controller_entry_rule_code_wait_d) || global->setting->ready == controller_setting_ready_wait_e) {
- if (global->main->parameters[controller_parameter_simulate_e].result == f_console_result_found_e || global->main->error.verbosity == f_console_verbosity_verbose_e || global->main->error.verbosity == f_console_verbosity_debug_e || entry->show == controller_entry_show_init_e) {
+ if (global->main->parameters.array[controller_parameter_simulate_e].result == f_console_result_found_e || global->main->error.verbosity == f_console_verbosity_verbose_e || global->main->error.verbosity == f_console_verbosity_debug_e || entry->show == controller_entry_show_init_e) {
if (global->main->output.verbosity != f_console_verbosity_quiet_e) {
controller_lock_print(global->main->output.to, global->thread);
}
}
- if (global->main->parameters[controller_parameter_validate_e].result == f_console_result_none_e) {
+ if (global->main->parameters.array[controller_parameter_validate_e].result == f_console_result_none_e) {
status = controller_rule_wait_all(*global, is_entry, F_false, process);
if (F_status_is_error(status)) return status;
}
}
if (global->setting->ready == controller_setting_ready_yes_e) {
- if (global->main->parameters[controller_parameter_simulate_e].result == f_console_result_found_e || global->main->error.verbosity == f_console_verbosity_verbose_e || global->main->error.verbosity == f_console_verbosity_debug_e) {
+ if (global->main->parameters.array[controller_parameter_simulate_e].result == f_console_result_found_e || global->main->error.verbosity == f_console_verbosity_verbose_e || global->main->error.verbosity == f_console_verbosity_debug_e) {
if (global->main->output.verbosity != f_console_verbosity_quiet_e) {
controller_lock_print(global->main->output.to, global->thread);
}
}
else {
- if (!failsafe && (global->main->error.verbosity == f_console_verbosity_verbose_e || entry->show == controller_entry_show_init_e) && global->main->parameters[controller_parameter_simulate_e].result == f_console_result_none_e) {
+ if (!failsafe && (global->main->error.verbosity == f_console_verbosity_verbose_e || entry->show == controller_entry_show_init_e) && global->main->parameters.array[controller_parameter_simulate_e].result == f_console_result_none_e) {
fl_print_format("%qState is now '%[%q%]'.%q", global->main->output.to.stream, f_string_eol_s, global->main->context.set.notable, controller_ready_s, global->main->context.set.notable, f_string_eol_s);
}
return status;
}
- if (global->main->parameters[controller_parameter_simulate_e].result == f_console_result_found_e || global->main->error.verbosity == f_console_verbosity_verbose_e || global->main->error.verbosity == f_console_verbosity_debug_e) {
+ if (global->main->parameters.array[controller_parameter_simulate_e].result == f_console_result_found_e || global->main->error.verbosity == f_console_verbosity_verbose_e || global->main->error.verbosity == f_console_verbosity_debug_e) {
if (global->main->output.verbosity != f_console_verbosity_quiet_e) {
controller_lock_print(global->main->output.to, global->thread);
const f_array_length_t id_rule_length = entry_action->parameters.array[0].used + entry_action->parameters.array[1].used + 1;
char id_rule_name[id_rule_length + 1];
- const f_string_static_t alias_rule = macro_f_string_static_t_initialize(id_rule_name, id_rule_length);
+ const f_string_static_t alias_rule = macro_f_string_static_t_initialize2(id_rule_name, id_rule_length);
memcpy(id_rule_name, entry_action->parameters.array[0].string, entry_action->parameters.array[0].used);
memcpy(id_rule_name + entry_action->parameters.array[0].used + 1, entry_action->parameters.array[1].string, entry_action->parameters.array[1].used);
f_thread_unlock(&global->thread->lock.rule);
- if (global->main->parameters[controller_parameter_simulate_e].result == f_console_result_found_e || global->main->error.verbosity == f_console_verbosity_verbose_e || global->main->error.verbosity == f_console_verbosity_debug_e || (entry->show == controller_entry_show_init_e && entry_action->type != controller_entry_action_type_consider_e)) {
+ if (global->main->parameters.array[controller_parameter_simulate_e].result == f_console_result_found_e || global->main->error.verbosity == f_console_verbosity_verbose_e || global->main->error.verbosity == f_console_verbosity_debug_e || (entry->show == controller_entry_show_init_e && entry_action->type != controller_entry_action_type_consider_e)) {
if (global->main->output.verbosity != f_console_verbosity_quiet_e) {
controller_lock_print(global->main->output.to, global->thread);
fl_print_format("%q%q %q item rule ", global->main->output.to.stream, f_string_eol_s, entry_action->type == controller_entry_action_type_consider_e ? controller_entry_print_considering_s : controller_entry_print_processing_s, is_entry ? controller_entry_s : controller_exit_s);
fl_print_format("'%[%Q%]'", global->main->output.to.stream, global->main->context.set.title, alias_rule, global->main->context.set.title);
- if (entry->show == controller_entry_show_init_e && global->main->parameters[controller_parameter_simulate_e].result == f_console_result_none_e) {
+ if (entry->show == controller_entry_show_init_e && global->main->parameters.array[controller_parameter_simulate_e].result == f_console_result_none_e) {
fl_print_format(" [%[%q%]]", global->main->output.to.stream, global->main->context.set.notable, entry_action->code == controller_entry_rule_code_asynchronous_d ? controller_asynchronous_s : controller_synchronous_s, global->main->context.set.notable);
if (entry_action->code == controller_entry_rule_code_wait_d) {
// Designate the action as failed.
entry_action->status = F_status_set_error(F_failure);
- if (global->main->parameters[controller_parameter_simulate_e].result == f_console_result_none_e) {
+ if (global->main->parameters.array[controller_parameter_simulate_e].result == f_console_result_none_e) {
f_thread_unlock(&global->thread->lock.rule);
if (entry_action->code & controller_entry_rule_code_require_d) {
options_force = 0;
options_process = 0;
- if (global->main->parameters[controller_parameter_simulate_e].result == f_console_result_found_e) {
+ if (global->main->parameters.array[controller_parameter_simulate_e].result == f_console_result_found_e) {
options_process |= controller_process_option_simulate_d;
}
options_process |= controller_process_option_wait_d;
}
- if (global->main->parameters[controller_parameter_validate_e].result == f_console_result_found_e) {
+ if (global->main->parameters.array[controller_parameter_validate_e].result == f_console_result_found_e) {
options_process |= controller_process_option_validate_d;
}
if (entry_action->code & controller_entry_rule_code_asynchronous_d) {
- if (global->main->parameters[controller_parameter_validate_e].result == f_console_result_none_e) {
+ if (global->main->parameters.array[controller_parameter_validate_e].result == f_console_result_none_e) {
options_force |= controller_process_option_asynchronous_d;
}
break;
}
- if (F_status_is_error(status) && global->main->parameters[controller_parameter_simulate_e].result == f_console_result_none_e && (entry_action->code & controller_entry_rule_code_require_d)) {
+ if (F_status_is_error(status) && global->main->parameters.array[controller_parameter_simulate_e].result == f_console_result_none_e && (entry_action->code & controller_entry_rule_code_require_d)) {
return F_status_set_error(F_require);
}
}
}
else if (entry_action->type == controller_entry_action_type_execute_e) {
- if (global->main->parameters[controller_parameter_simulate_e].result == f_console_result_found_e || global->main->error.verbosity == f_console_verbosity_verbose_e || global->main->error.verbosity == f_console_verbosity_debug_e || entry->show == controller_entry_show_init_e) {
+ if (global->main->parameters.array[controller_parameter_simulate_e].result == f_console_result_found_e || global->main->error.verbosity == f_console_verbosity_verbose_e || global->main->error.verbosity == f_console_verbosity_debug_e || entry->show == controller_entry_show_init_e) {
if (global->main->output.verbosity != f_console_verbosity_quiet_e) {
controller_lock_print(global->main->output.to, global->thread);
}
}
- if (global->main->parameters[controller_parameter_simulate_e].result == f_console_result_found_e) {
+ if (global->main->parameters.array[controller_parameter_simulate_e].result == f_console_result_found_e) {
return F_execute;
}
option |= FL_execute_parameter_option_session_d;
}
- status = fll_execute_into(0, entry_action->parameters, option, 0, (void *) &result);
+ status = fll_execute_into(f_string_empty_s, entry_action->parameters, option, 0, (void *) &result);
if (F_status_is_error(status)) {
if (F_status_set_fine(status) == F_file_found_not) {
}
// Check to see if any required processes failed, but do not do this if already operating in failsafe.
- if (F_status_is_error_not(status) && !failsafe && global->main->parameters[controller_parameter_validate_e].result == f_console_result_none_e) {
+ if (F_status_is_error_not(status) && !failsafe && global->main->parameters.array[controller_parameter_validate_e].result == f_console_result_none_e) {
const f_status_t status_wait = controller_rule_wait_all(*global, is_entry, F_true, 0);
if (F_status_is_error(status_wait)) {
}
}
- if ((global->main->parameters[controller_parameter_simulate_e].result == f_console_result_found_e && global->main->error.verbosity != f_console_verbosity_quiet_e) || global->main->error.verbosity == f_console_verbosity_verbose_e) {
+ if ((global->main->parameters.array[controller_parameter_simulate_e].result == f_console_result_found_e && global->main->error.verbosity != f_console_verbosity_quiet_e) || global->main->error.verbosity == f_console_verbosity_verbose_e) {
controller_lock_print(global->main->output.to, global->thread);
fl_print_format("%qDone processing %q item '", global->main->output.to.stream, f_string_eol_s, is_entry ? controller_entry_s : controller_exit_s);
#endif
#ifndef _di_controller_entry_print_string_s_
- const f_string_static_t controller_entry_print_considering_s = macro_f_string_static_t_initialize2(CONTROLLER_entry_print_considering_s, 0, CONTROLLER_entry_print_considering_s_length);
- const f_string_static_t controller_entry_print_failsafe_s = macro_f_string_static_t_initialize2(CONTROLLER_entry_print_failsafe_s, 0, CONTROLLER_entry_print_failsafe_s_length);
- const f_string_static_t controller_entry_print_processing_s = macro_f_string_static_t_initialize2(CONTROLLER_entry_print_processing_s, 0, CONTROLLER_entry_print_processing_s_length);
- const f_string_static_t controller_entry_print_suffix_megatime_s = macro_f_string_static_t_initialize2(CONTROLLER_entry_print_suffix_megatime_s, 0, CONTROLLER_entry_print_suffix_megatime_s_length);
+ const f_string_static_t controller_entry_print_considering_s = macro_f_string_static_t_initialize(CONTROLLER_entry_print_considering_s, 0, CONTROLLER_entry_print_considering_s_length);
+ const f_string_static_t controller_entry_print_failsafe_s = macro_f_string_static_t_initialize(CONTROLLER_entry_print_failsafe_s, 0, CONTROLLER_entry_print_failsafe_s_length);
+ const f_string_static_t controller_entry_print_processing_s = macro_f_string_static_t_initialize(CONTROLLER_entry_print_processing_s, 0, CONTROLLER_entry_print_processing_s_length);
+ const f_string_static_t controller_entry_print_suffix_megatime_s = macro_f_string_static_t_initialize(CONTROLLER_entry_print_suffix_megatime_s, 0, CONTROLLER_entry_print_suffix_megatime_s_length);
#endif // _di_controller_entry_print_string_s_
#ifndef _di_controller_entry_action_parameters_print_
#ifndef _di_controller_entry_preprocess_print_simulate_setting_value_
void controller_entry_preprocess_print_simulate_setting_value(const controller_global_t global, const bool is_entry, const f_string_static_t name, const f_string_static_t name_sub, const f_string_static_t value, const f_string_static_t suffix) {
- if (global.main->error.verbosity != f_console_verbosity_debug_e && !(global.main->error.verbosity == f_console_verbosity_verbose_e && global.main->parameters[controller_parameter_simulate_e].result == f_console_result_found_e)) {
+ if (global.main->error.verbosity != f_console_verbosity_debug_e && !(global.main->error.verbosity == f_console_verbosity_verbose_e && global.main->parameters.array[controller_parameter_simulate_e].result == f_console_result_found_e)) {
return;
}
#endif // _di_controller_entry_print_error_cache_
#ifndef _di_controller_entry_print_error_file_
- void controller_entry_print_error_file(const bool is_entry, const fl_print_t print, const controller_cache_action_t cache, const f_status_t status, const f_string_t function, const bool fallback, const f_string_t name, const f_string_t operation, const uint8_t type, controller_thread_t *thread) {
+ void controller_entry_print_error_file(const bool is_entry, const fl_print_t print, const controller_cache_action_t cache, const f_status_t status, const f_string_t function, const bool fallback, const f_string_static_t name, const f_string_static_t operation, const uint8_t type, controller_thread_t *thread) {
if (print.verbosity == f_console_verbosity_quiet_e) return;
if (status == F_interrupt) return;
* @see controller_entry_print_error_cache()
*/
#ifndef _di_controller_entry_print_error_file_
- extern void controller_entry_print_error_file(const bool is_entry, const fl_print_t print, const controller_cache_action_t cache, const f_status_t status, const f_string_t function, const bool fallback, const f_string_t name, const f_string_t operation, const uint8_t type, controller_thread_t *thread) F_attribute_visibility_internal_d;
+ extern void controller_entry_print_error_file(const bool is_entry, const fl_print_t print, const controller_cache_action_t cache, const f_status_t status, const f_string_t function, const bool fallback, const f_string_static_t name, const f_string_static_t operation, const uint8_t type, controller_thread_t *thread) F_attribute_visibility_internal_d;
#endif // _di_controller_entry_print_error_file_
/**
const f_string_statics_t simulated_arguments = f_string_statics_t_initialize;
fl_execute_parameter_t simulated_parameter = macro_fl_execute_parameter_t_initialize(execute_set->parameter.option, execute_set->parameter.wait, process->rule.has & controller_rule_has_environment_d ? execute_set->parameter.environment : 0, execute_set->parameter.signals, &f_string_empty_s);
- status = fll_execute_program(controller_default_program_script_s.string, simulated_arguments, &simulated_parameter, &execute_set->as, (void *) &result);
+ status = fll_execute_program(controller_default_program_script_s, simulated_arguments, &simulated_parameter, &execute_set->as, (void *) &result);
}
}
else {
- status = fll_execute_program(program.string, arguments, &execute_set->parameter, &execute_set->as, (void *) &result);
+ status = fll_execute_program(program, arguments, &execute_set->parameter, &execute_set->as, (void *) &result);
}
if (status == F_parent) {
status = f_file_exists(pid_file.string);
if (F_status_is_error(status)) {
- controller_print_error_file(thread, main->error, F_status_set_fine(status), "f_file_exists", F_true, pid_file.string, "find", fll_error_file_type_file_e);
+ controller_print_error_file(thread, main->error, F_status_set_fine(status), "f_file_exists", F_true, pid_file.string, f_file_operation_find_s, fll_error_file_type_file_e);
return status;
}
if (status == F_true) {
- controller_print_error_file(thread, main->error, F_file_found, "f_file_exists", F_true, pid_file.string, "find", fll_error_file_type_file_e);
+ controller_print_error_file(thread, main->error, F_file_found, "f_file_exists", F_true, pid_file.string, f_file_operation_find_s, fll_error_file_type_file_e);
return F_status_set_error(F_file_found);
}
const f_string_statics_t simulated_arguments = f_string_statics_t_initialize;
fl_execute_parameter_t simulated_parameter = macro_fl_execute_parameter_t_initialize(execute_set->parameter.option, execute_set->parameter.wait, process->rule.has & controller_rule_has_environment_d ? execute_set->parameter.environment : 0, execute_set->parameter.signals, &f_string_empty_s);
- status = fll_execute_program(controller_default_program_script_s.string, simulated_arguments, &simulated_parameter, &execute_set->as, (void *) &result);
+ status = fll_execute_program(controller_default_program_script_s, simulated_arguments, &simulated_parameter, &execute_set->as, (void *) &result);
}
}
else {
- status = fll_execute_program(program.string, arguments, &execute_set->parameter, &execute_set->as, (void *) &result);
+ status = fll_execute_program(program, arguments, &execute_set->parameter, &execute_set->as, (void *) &result);
}
if (status == F_parent) {
memcpy(alias_other_buffer, global.setting->rules.array[id_rule].alias.string, global.setting->rules.array[id_rule].alias.used);
alias_other_buffer[global.setting->rules.array[id_rule].alias.used] = 0;
- const f_string_static_t alias_other = macro_f_string_static_t_initialize(alias_other_buffer, global.setting->rules.array[id_rule].alias.used);
+ const f_string_static_t alias_other = macro_f_string_static_t_initialize2(alias_other_buffer, global.setting->rules.array[id_rule].alias.used);
f_thread_unlock(&global.thread->lock.rule);
options_process = 0;
- if (global.main->parameters[controller_parameter_simulate_e].result == f_console_result_found_e) {
+ if (global.main->parameters.array[controller_parameter_simulate_e].result == f_console_result_found_e) {
options_process |= controller_process_option_simulate_d;
}
rule->timeout_stop = number;
}
- if (global.main->error.verbosity == f_console_verbosity_debug_e || (global.main->error.verbosity == f_console_verbosity_verbose_e && global.main->parameters[controller_parameter_simulate_e].result == f_console_result_found_e)) {
+ if (global.main->error.verbosity == f_console_verbosity_debug_e || (global.main->error.verbosity == f_console_verbosity_verbose_e && global.main->parameters.array[controller_parameter_simulate_e].result == f_console_result_found_e)) {
f_string_static_t name_sub = controller_stop_s;
if (timeout_code == controller_rule_timeout_code_kill_d) {
rule->nice = number;
rule->has |= controller_rule_has_nice_d;
- if (global.main->parameters[controller_parameter_simulate_e].result == f_console_result_found_e || global.main->error.verbosity == f_console_verbosity_verbose_e) {
+ if (global.main->parameters.array[controller_parameter_simulate_e].result == f_console_result_found_e || global.main->error.verbosity == f_console_verbosity_verbose_e) {
cache->action.generic.used = 0;
status = f_string_dynamic_partial_append_nulless(cache->buffer_item, cache->content_actions.array[i].array[0], &cache->action.generic);
rule->user = number;
rule->has |= controller_rule_has_user_d;
- if (global.main->error.verbosity == f_console_verbosity_debug_e || (global.main->error.verbosity == f_console_verbosity_verbose_e && global.main->parameters[controller_parameter_simulate_e].result == f_console_result_found_e)) {
+ if (global.main->error.verbosity == f_console_verbosity_debug_e || (global.main->error.verbosity == f_console_verbosity_verbose_e && global.main->parameters.array[controller_parameter_simulate_e].result == f_console_result_found_e)) {
cache->action.generic.used = 0;
status = f_string_dynamic_partial_append_nulless(cache->buffer_item, cache->content_actions.array[i].array[0], &cache->action.generic);
controller_rule_setting_read_print_values(global, controller_environment_s, i, cache);
}
else {
- if (global.main->error.verbosity == f_console_verbosity_debug_e || (global.main->error.verbosity == f_console_verbosity_verbose_e && global.main->parameters[controller_parameter_simulate_e].result == f_console_result_found_e)) {
+ if (global.main->error.verbosity == f_console_verbosity_debug_e || (global.main->error.verbosity == f_console_verbosity_verbose_e && global.main->parameters.array[controller_parameter_simulate_e].result == f_console_result_found_e)) {
controller_lock_print(global.main->output.to, global.thread);
fl_print_format("%qProcessing rule item action '%[%q%]' setting value to an empty set.%q", global.main->output.to.stream, f_string_eol_s, global.main->context.set.title, controller_environment_s, global.main->context.set.title, f_string_eol_s);
++rule->ons.used;
}
- if (global.main->error.verbosity == f_console_verbosity_debug_e || (global.main->error.verbosity == f_console_verbosity_verbose_e && global.main->parameters[controller_parameter_simulate_e].result == f_console_result_found_e)) {
+ if (global.main->error.verbosity == f_console_verbosity_debug_e || (global.main->error.verbosity == f_console_verbosity_verbose_e && global.main->parameters.array[controller_parameter_simulate_e].result == f_console_result_found_e)) {
controller_lock_print(global.main->output.to, global.thread);
fl_print_format("%qProcessing rule item action '%[%S%]', adding ", global.main->output.to.stream, f_string_eol_s, global.main->context.set.title, controller_on_s, global.main->context.set.title);
#ifndef _di_controller_rule_setting_read_print_value_
void controller_rule_setting_read_print_value(const controller_global_t global, const f_string_static_t name, const f_string_static_t name_sub, const f_string_static_t value, const f_string_t suffix) {
- if (global.main->error.verbosity != f_console_verbosity_debug_e && !(global.main->error.verbosity == f_console_verbosity_verbose_e && global.main->parameters[controller_parameter_simulate_e].result == f_console_result_found_e)) {
+ if (global.main->error.verbosity != f_console_verbosity_debug_e && !(global.main->error.verbosity == f_console_verbosity_verbose_e && global.main->parameters.array[controller_parameter_simulate_e].result == f_console_result_found_e)) {
return;
}
#ifndef _di_controller_rule_setting_read_print_values_
void controller_rule_setting_read_print_values(const controller_global_t global, const f_string_static_t name, const f_array_length_t index, controller_cache_t * const cache) {
- if (global.main->error.verbosity != f_console_verbosity_debug_e && !(global.main->error.verbosity == f_console_verbosity_verbose_e && global.main->parameters[controller_parameter_simulate_e].result == f_console_result_found_e)) {
+ if (global.main->error.verbosity != f_console_verbosity_debug_e && !(global.main->error.verbosity == f_console_verbosity_verbose_e && global.main->parameters.array[controller_parameter_simulate_e].result == f_console_result_found_e)) {
return;
}
if (global->thread->enabled != controller_thread_enabled_e) return 0;
- const struct timespec delay = controller_time_seconds(global->main->parameters[controller_parameter_simulate_e].result == f_console_result_found_e ? controller_thread_cleanup_interval_short_d : controller_thread_cleanup_interval_long_d);
+ const struct timespec delay = controller_time_seconds(global->main->parameters.array[controller_parameter_simulate_e].result == f_console_result_found_e ? controller_thread_cleanup_interval_short_d : controller_thread_cleanup_interval_long_d);
f_status_t status = F_none;
}
}
else {
- if (main->parameters[controller_parameter_daemon_e].result == f_console_result_found_e) {
+ if (main->parameters.array[controller_parameter_daemon_e].result == f_console_result_found_e) {
setting->ready = controller_setting_ready_done_e;
if (f_file_exists(setting->path_pid.string) == F_true) {
// Only make the rule and control threads available once any/all pre-processing and are completed.
if (F_status_is_error_not(status) && status != F_failure && status != F_child && thread.enabled == controller_thread_enabled_e) {
- if (main->parameters[controller_parameter_validate_e].result == f_console_result_none_e) {
+ if (main->parameters.array[controller_parameter_validate_e].result == f_console_result_none_e) {
// Wait for the entry thread to complete before starting the rule thread.
controller_thread_join(&thread.id_rule);
return F_child;
}
- if (F_status_is_error_not(status) && status != F_failure && main->parameters[controller_parameter_validate_e].result == f_console_result_none_e && controller_thread_is_enabled(F_true, &thread)) {
+ if (F_status_is_error_not(status) && status != F_failure && main->parameters.array[controller_parameter_validate_e].result == f_console_result_none_e && controller_thread_is_enabled(F_true, &thread)) {
if (setting->mode == controller_setting_mode_service_e) {
controller_thread_join(&thread.id_signal);
}
if (F_status_is_error_not(*status) && *status != F_child) {
- if (main->parameters[controller_parameter_validate_e].result == f_console_result_none_e || main->parameters[controller_parameter_simulate_e].result == f_console_result_found_e) {
+ if (main->parameters.array[controller_parameter_validate_e].result == f_console_result_none_e || main->parameters.array[controller_parameter_simulate_e].result == f_console_result_found_e) {
if (entry->setting->entry.pid == controller_entry_pid_require_e && f_file_exists(entry->setting->path_pid.string) == F_true) {
if (main->error.verbosity != f_console_verbosity_quiet_e) {
}
if (F_status_is_error_not(*status) && *status != F_child && *status != F_file_found_not) {
- if (main->parameters[controller_parameter_validate_e].result == f_console_result_none_e || main->parameters[controller_parameter_simulate_e].result == f_console_result_found_e) {
+ if (main->parameters.array[controller_parameter_validate_e].result == f_console_result_none_e || main->parameters.array[controller_parameter_simulate_e].result == f_console_result_found_e) {
*status = controller_entry_process(entry->global, cache, F_false, F_false);
#endif
#ifndef _di_fake_program_version_
- const f_string_static_t fake_program_version_s = macro_f_string_static_t_initialize2(FAKE_program_version_s, 0, FAKE_program_version_s_length);
+ const f_string_static_t fake_program_version_s = macro_f_string_static_t_initialize(FAKE_program_version_s, 0, FAKE_program_version_s_length);
#endif // _di_fake_program_version_
#ifndef _di_fake_program_name_
- const f_string_static_t fake_program_name_s = macro_f_string_static_t_initialize2(FAKE_program_name_s, 0, FAKE_program_name_s_length);
- const f_string_static_t fake_program_name_long_s = macro_f_string_static_t_initialize2(FAKE_program_name_long_s, 0, FAKE_program_name_long_s_length);
+ const f_string_static_t fake_program_name_s = macro_f_string_static_t_initialize(FAKE_program_name_s, 0, FAKE_program_name_s_length);
+ const f_string_static_t fake_program_name_long_s = macro_f_string_static_t_initialize(FAKE_program_name_long_s, 0, FAKE_program_name_long_s_length);
#endif // _di_fake_program_name_
#ifndef _di_fake_program_help_parameters_
- const f_string_static_t fake_program_help_parameters_s = macro_f_string_static_t_initialize2(FAKE_program_help_parameters_s, 0, FAKE_program_help_parameters_s_length);
+ const f_string_static_t fake_program_help_parameters_s = macro_f_string_static_t_initialize(FAKE_program_help_parameters_s, 0, FAKE_program_help_parameters_s_length);
#endif // _di_fake_program_help_parameters_
/**
* These structures are hard-coded by their individual pieces to be constructed later on.
*/
#ifndef _di_fake_path_
- const f_string_static_t fake_path_part_bash_s = macro_f_string_static_t_initialize2(FAKE_path_part_bash_s, 0, FAKE_path_part_bash_s_length);
- const f_string_static_t fake_path_part_build_s = macro_f_string_static_t_initialize2(FAKE_path_part_build_s, 0, FAKE_path_part_build_s_length);
- const f_string_static_t fake_path_part_c_s = macro_f_string_static_t_initialize2(FAKE_path_part_c_s, 0, FAKE_path_part_c_s_length);
- const f_string_static_t fake_path_part_cpp_s = macro_f_string_static_t_initialize2(FAKE_path_part_cpp_s, 0, FAKE_path_part_cpp_s_length);
- const f_string_static_t fake_path_part_data_s = macro_f_string_static_t_initialize2(FAKE_path_part_data_s, 0, FAKE_path_part_data_s_length);
- const f_string_static_t fake_path_part_documents_s = macro_f_string_static_t_initialize2(FAKE_path_part_documents_s, 0, FAKE_path_part_documents_s_length);
- const f_string_static_t fake_path_part_includes_s = macro_f_string_static_t_initialize2(FAKE_path_part_includes_s, 0, FAKE_path_part_includes_s_length);
- const f_string_static_t fake_path_part_libraries_s = macro_f_string_static_t_initialize2(FAKE_path_part_libraries_s, 0, FAKE_path_part_libraries_s_length);
- const f_string_static_t fake_path_part_licenses_s = macro_f_string_static_t_initialize2(FAKE_path_part_licenses_s, 0, FAKE_path_part_licenses_s_length);
- const f_string_static_t fake_path_part_objects_s = macro_f_string_static_t_initialize2(FAKE_path_part_objects_s, 0, FAKE_path_part_objects_s_length);
- const f_string_static_t fake_path_part_process_s = macro_f_string_static_t_initialize2(FAKE_path_part_process_s, 0, FAKE_path_part_process_s_length);
- const f_string_static_t fake_path_part_programs_s = macro_f_string_static_t_initialize2(FAKE_path_part_programs_s, 0, FAKE_path_part_programs_s_length);
- const f_string_static_t fake_path_part_script_s = macro_f_string_static_t_initialize2(FAKE_path_part_script_s, 0, FAKE_path_part_script_s_length);
- const f_string_static_t fake_path_part_settings_s = macro_f_string_static_t_initialize2(FAKE_path_part_settings_s, 0, FAKE_path_part_settings_s_length);
- const f_string_static_t fake_path_part_shared_s = macro_f_string_static_t_initialize2(FAKE_path_part_shared_s, 0, FAKE_path_part_shared_s_length);
- const f_string_static_t fake_path_part_stage_s = macro_f_string_static_t_initialize2(FAKE_path_part_stage_s, 0, FAKE_path_part_stage_s_length);
- const f_string_static_t fake_path_part_static_s = macro_f_string_static_t_initialize2(FAKE_path_part_static_s, 0, FAKE_path_part_static_s_length);
+ const f_string_static_t fake_path_part_bash_s = macro_f_string_static_t_initialize(FAKE_path_part_bash_s, 0, FAKE_path_part_bash_s_length);
+ const f_string_static_t fake_path_part_build_s = macro_f_string_static_t_initialize(FAKE_path_part_build_s, 0, FAKE_path_part_build_s_length);
+ const f_string_static_t fake_path_part_c_s = macro_f_string_static_t_initialize(FAKE_path_part_c_s, 0, FAKE_path_part_c_s_length);
+ const f_string_static_t fake_path_part_cpp_s = macro_f_string_static_t_initialize(FAKE_path_part_cpp_s, 0, FAKE_path_part_cpp_s_length);
+ const f_string_static_t fake_path_part_data_s = macro_f_string_static_t_initialize(FAKE_path_part_data_s, 0, FAKE_path_part_data_s_length);
+ const f_string_static_t fake_path_part_documents_s = macro_f_string_static_t_initialize(FAKE_path_part_documents_s, 0, FAKE_path_part_documents_s_length);
+ const f_string_static_t fake_path_part_includes_s = macro_f_string_static_t_initialize(FAKE_path_part_includes_s, 0, FAKE_path_part_includes_s_length);
+ const f_string_static_t fake_path_part_libraries_s = macro_f_string_static_t_initialize(FAKE_path_part_libraries_s, 0, FAKE_path_part_libraries_s_length);
+ const f_string_static_t fake_path_part_licenses_s = macro_f_string_static_t_initialize(FAKE_path_part_licenses_s, 0, FAKE_path_part_licenses_s_length);
+ const f_string_static_t fake_path_part_objects_s = macro_f_string_static_t_initialize(FAKE_path_part_objects_s, 0, FAKE_path_part_objects_s_length);
+ const f_string_static_t fake_path_part_process_s = macro_f_string_static_t_initialize(FAKE_path_part_process_s, 0, FAKE_path_part_process_s_length);
+ const f_string_static_t fake_path_part_programs_s = macro_f_string_static_t_initialize(FAKE_path_part_programs_s, 0, FAKE_path_part_programs_s_length);
+ const f_string_static_t fake_path_part_script_s = macro_f_string_static_t_initialize(FAKE_path_part_script_s, 0, FAKE_path_part_script_s_length);
+ const f_string_static_t fake_path_part_settings_s = macro_f_string_static_t_initialize(FAKE_path_part_settings_s, 0, FAKE_path_part_settings_s_length);
+ const f_string_static_t fake_path_part_shared_s = macro_f_string_static_t_initialize(FAKE_path_part_shared_s, 0, FAKE_path_part_shared_s_length);
+ const f_string_static_t fake_path_part_stage_s = macro_f_string_static_t_initialize(FAKE_path_part_stage_s, 0, FAKE_path_part_stage_s_length);
+ const f_string_static_t fake_path_part_static_s = macro_f_string_static_t_initialize(FAKE_path_part_static_s, 0, FAKE_path_part_static_s_length);
#endif // _di_fake_path_
#ifndef _di_fake_file_
- const f_string_static_t fake_file_defines_s = macro_f_string_static_t_initialize2(FAKE_file_defines_s, 0, FAKE_file_defines_s_length);
- const f_string_static_t fake_file_dependencies_s = macro_f_string_static_t_initialize2(FAKE_file_dependencies_s, 0, FAKE_file_dependencies_s_length);
- const f_string_static_t fake_file_process_pre_s = macro_f_string_static_t_initialize2(FAKE_file_process_pre_s, 0, FAKE_file_process_pre_s_length);
- const f_string_static_t fake_file_process_post_s = macro_f_string_static_t_initialize2(FAKE_file_process_post_s, 0, FAKE_file_process_post_s_length);
- const f_string_static_t fake_file_readme_s = macro_f_string_static_t_initialize2(FAKE_file_readme_s, 0, FAKE_file_readme_s_length);
+ const f_string_static_t fake_file_defines_s = macro_f_string_static_t_initialize(FAKE_file_defines_s, 0, FAKE_file_defines_s_length);
+ const f_string_static_t fake_file_dependencies_s = macro_f_string_static_t_initialize(FAKE_file_dependencies_s, 0, FAKE_file_dependencies_s_length);
+ const f_string_static_t fake_file_process_pre_s = macro_f_string_static_t_initialize(FAKE_file_process_pre_s, 0, FAKE_file_process_pre_s_length);
+ const f_string_static_t fake_file_process_post_s = macro_f_string_static_t_initialize(FAKE_file_process_post_s, 0, FAKE_file_process_post_s_length);
+ const f_string_static_t fake_file_readme_s = macro_f_string_static_t_initialize(FAKE_file_readme_s, 0, FAKE_file_readme_s_length);
#endif // _di_fake_file_
/**
* Provide default settings.
*/
#ifndef _di_fake_defaults_
- const f_string_static_t fake_default_path_build_s = macro_f_string_static_t_initialize2(FAKE_default_path_build_s, 0, FAKE_default_path_build_s_length);
- const f_string_static_t fake_default_path_data_s = macro_f_string_static_t_initialize2(FAKE_default_path_data_s, 0, FAKE_default_path_data_s_length);
- const f_string_static_t fake_default_path_sources_s = macro_f_string_static_t_initialize2(FAKE_default_path_sources_s, 0, FAKE_default_path_sources_s_length);
- const f_string_static_t fake_default_path_work_s = macro_f_string_static_t_initialize2(FAKE_default_path_work_s, 0, FAKE_default_path_work_s_length);
-
- const f_string_static_t fake_default_define_s = macro_f_string_static_t_initialize2(FAKE_default_define_s, 0, FAKE_default_define_s_length);
- const f_string_static_t fake_default_fakefile_s = macro_f_string_static_t_initialize2(FAKE_default_fakefile_s, 0, FAKE_default_fakefile_s_length);
- const f_string_static_t fake_default_mode_s = macro_f_string_static_t_initialize2(FAKE_default_mode_s, 0, FAKE_default_mode_s_length);
- const f_string_static_t fake_default_process_s = macro_f_string_static_t_initialize2(FAKE_default_process_s, 0, FAKE_default_process_s_length);
- const f_string_static_t fake_default_settings_s = macro_f_string_static_t_initialize2(FAKE_default_settings_s, 0, FAKE_default_settings_s_length);
+ const f_string_static_t fake_default_path_build_s = macro_f_string_static_t_initialize(FAKE_default_path_build_s, 0, FAKE_default_path_build_s_length);
+ const f_string_static_t fake_default_path_data_s = macro_f_string_static_t_initialize(FAKE_default_path_data_s, 0, FAKE_default_path_data_s_length);
+ const f_string_static_t fake_default_path_sources_s = macro_f_string_static_t_initialize(FAKE_default_path_sources_s, 0, FAKE_default_path_sources_s_length);
+ const f_string_static_t fake_default_path_work_s = macro_f_string_static_t_initialize(FAKE_default_path_work_s, 0, FAKE_default_path_work_s_length);
+
+ const f_string_static_t fake_default_define_s = macro_f_string_static_t_initialize(FAKE_default_define_s, 0, FAKE_default_define_s_length);
+ const f_string_static_t fake_default_fakefile_s = macro_f_string_static_t_initialize(FAKE_default_fakefile_s, 0, FAKE_default_fakefile_s_length);
+ const f_string_static_t fake_default_mode_s = macro_f_string_static_t_initialize(FAKE_default_mode_s, 0, FAKE_default_mode_s_length);
+ const f_string_static_t fake_default_process_s = macro_f_string_static_t_initialize(FAKE_default_process_s, 0, FAKE_default_process_s_length);
+ const f_string_static_t fake_default_settings_s = macro_f_string_static_t_initialize(FAKE_default_settings_s, 0, FAKE_default_settings_s_length);
#endif // _di_fake_defaults_
#ifndef _di_fake_build_language_
- const f_string_static_t fake_build_language_bash_s = macro_f_string_static_t_initialize2(FAKE_build_language_bash_s, 0, FAKE_build_language_bash_s_length);
- const f_string_static_t fake_build_language_c_s = macro_f_string_static_t_initialize2(FAKE_build_language_c_s, 0, FAKE_build_language_c_s_length);
- const f_string_static_t fake_build_language_cpp_s = macro_f_string_static_t_initialize2(FAKE_build_language_cpp_s, 0, FAKE_build_language_cpp_s_length);
+ const f_string_static_t fake_build_language_bash_s = macro_f_string_static_t_initialize(FAKE_build_language_bash_s, 0, FAKE_build_language_bash_s_length);
+ const f_string_static_t fake_build_language_c_s = macro_f_string_static_t_initialize(FAKE_build_language_c_s, 0, FAKE_build_language_c_s_length);
+ const f_string_static_t fake_build_language_cpp_s = macro_f_string_static_t_initialize(FAKE_build_language_cpp_s, 0, FAKE_build_language_cpp_s_length);
#endif // _di_fake_build_language_
#ifndef _di_fake_build_version_
- const f_string_static_t fake_build_version_major_s = macro_f_string_static_t_initialize2(FAKE_build_version_major_s, 0, FAKE_build_version_major_s_length);
- const f_string_static_t fake_build_version_minor_s = macro_f_string_static_t_initialize2(FAKE_build_version_minor_s, 0, FAKE_build_version_minor_s_length);
- const f_string_static_t fake_build_version_micro_s = macro_f_string_static_t_initialize2(FAKE_build_version_micro_s, 0, FAKE_build_version_micro_s_length);
- const f_string_static_t fake_build_version_nano_s = macro_f_string_static_t_initialize2(FAKE_build_version_nano_s, 0, FAKE_build_version_nano_s_length);
+ const f_string_static_t fake_build_version_major_s = macro_f_string_static_t_initialize(FAKE_build_version_major_s, 0, FAKE_build_version_major_s_length);
+ const f_string_static_t fake_build_version_minor_s = macro_f_string_static_t_initialize(FAKE_build_version_minor_s, 0, FAKE_build_version_minor_s_length);
+ const f_string_static_t fake_build_version_micro_s = macro_f_string_static_t_initialize(FAKE_build_version_micro_s, 0, FAKE_build_version_micro_s_length);
+ const f_string_static_t fake_build_version_nano_s = macro_f_string_static_t_initialize(FAKE_build_version_nano_s, 0, FAKE_build_version_nano_s_length);
#endif // _di_fake_build_version_
#ifndef _di_fake_defines_
- const f_string_static_t fake_short_define_s = macro_f_string_static_t_initialize2(FAKE_short_define_s, 0, FAKE_short_define_s_length);
- const f_string_static_t fake_short_fakefile_s = macro_f_string_static_t_initialize2(FAKE_short_fakefile_s, 0, FAKE_short_fakefile_s_length);
- const f_string_static_t fake_short_mode_s = macro_f_string_static_t_initialize2(FAKE_short_mode_s, 0, FAKE_short_mode_s_length);
- const f_string_static_t fake_short_process_s = macro_f_string_static_t_initialize2(FAKE_short_process_s, 0, FAKE_short_process_s_length);
- const f_string_static_t fake_short_settings_s = macro_f_string_static_t_initialize2(FAKE_short_settings_s, 0, FAKE_short_settings_s_length);
-
- const f_string_static_t fake_short_path_build_s = macro_f_string_static_t_initialize2(FAKE_short_path_build_s, 0, FAKE_short_path_build_s_length);
- const f_string_static_t fake_short_path_data_s = macro_f_string_static_t_initialize2(FAKE_short_path_data_s, 0, FAKE_short_path_data_s_length);
- const f_string_static_t fake_short_path_sources_s = macro_f_string_static_t_initialize2(FAKE_short_path_sources_s, 0, FAKE_short_path_sources_s_length);
- const f_string_static_t fake_short_path_work_s = macro_f_string_static_t_initialize2(FAKE_short_path_work_s, 0, FAKE_short_path_work_s_length);
-
- const f_string_static_t fake_long_define_s = macro_f_string_static_t_initialize2(FAKE_long_define_s, 0, FAKE_long_define_s_length);
- const f_string_static_t fake_long_fakefile_s = macro_f_string_static_t_initialize2(FAKE_long_fakefile_s, 0, FAKE_long_fakefile_s_length);
- const f_string_static_t fake_long_mode_s = macro_f_string_static_t_initialize2(FAKE_long_mode_s, 0, FAKE_long_mode_s_length);
- const f_string_static_t fake_long_process_s = macro_f_string_static_t_initialize2(FAKE_long_process_s, 0, FAKE_long_process_s_length);
- const f_string_static_t fake_long_settings_s = macro_f_string_static_t_initialize2(FAKE_long_settings_s, 0, FAKE_long_settings_s_length);
-
- const f_string_static_t fake_long_path_build_s = macro_f_string_static_t_initialize2(FAKE_long_path_build_s, 0, FAKE_long_path_build_s_length);
- const f_string_static_t fake_long_path_data_s = macro_f_string_static_t_initialize2(FAKE_long_path_data_s, 0, FAKE_long_path_data_s_length);
- const f_string_static_t fake_long_path_sources_s = macro_f_string_static_t_initialize2(FAKE_long_path_sources_s, 0, FAKE_long_path_sources_s_length);
- const f_string_static_t fake_long_path_work_s = macro_f_string_static_t_initialize2(FAKE_long_path_work_s, 0, FAKE_long_path_work_s_length);
-
- const f_string_static_t fake_long_documents_disabled_s = macro_f_string_static_t_initialize2(FAKE_long_documents_disabled_s, 0, FAKE_long_documents_disabled_s_length);
- const f_string_static_t fake_long_documents_enabled_s = macro_f_string_static_t_initialize2(FAKE_long_documents_enabled_s, 0, FAKE_long_documents_enabled_s_length);
- const f_string_static_t fake_long_shared_disabled_s = macro_f_string_static_t_initialize2(FAKE_long_shared_disabled_s, 0, FAKE_long_shared_disabled_s_length);
- const f_string_static_t fake_long_shared_enabled_s = macro_f_string_static_t_initialize2(FAKE_long_shared_enabled_s, 0, FAKE_long_shared_enabled_s_length);
- const f_string_static_t fake_long_static_disabled_s = macro_f_string_static_t_initialize2(FAKE_long_static_disabled_s, 0, FAKE_long_static_disabled_s_length);
- const f_string_static_t fake_long_static_enabled_s = macro_f_string_static_t_initialize2(FAKE_long_static_enabled_s, 0, FAKE_long_static_enabled_s_length);
-
- const f_string_static_t fake_other_operation_build_s = macro_f_string_static_t_initialize2(FAKE_other_operation_build_s, 0, FAKE_other_operation_build_s_length);
- const f_string_static_t fake_other_operation_clean_s = macro_f_string_static_t_initialize2(FAKE_other_operation_clean_s, 0, FAKE_other_operation_clean_s_length);
- const f_string_static_t fake_other_operation_make_s = macro_f_string_static_t_initialize2(FAKE_other_operation_make_s, 0, FAKE_other_operation_make_s_length);
- const f_string_static_t fake_other_operation_skeleton_s = macro_f_string_static_t_initialize2(FAKE_other_operation_skeleton_s, 0, FAKE_other_operation_skeleton_s_length);
+ const f_string_static_t fake_short_define_s = macro_f_string_static_t_initialize(FAKE_short_define_s, 0, FAKE_short_define_s_length);
+ const f_string_static_t fake_short_fakefile_s = macro_f_string_static_t_initialize(FAKE_short_fakefile_s, 0, FAKE_short_fakefile_s_length);
+ const f_string_static_t fake_short_mode_s = macro_f_string_static_t_initialize(FAKE_short_mode_s, 0, FAKE_short_mode_s_length);
+ const f_string_static_t fake_short_process_s = macro_f_string_static_t_initialize(FAKE_short_process_s, 0, FAKE_short_process_s_length);
+ const f_string_static_t fake_short_settings_s = macro_f_string_static_t_initialize(FAKE_short_settings_s, 0, FAKE_short_settings_s_length);
+
+ const f_string_static_t fake_short_path_build_s = macro_f_string_static_t_initialize(FAKE_short_path_build_s, 0, FAKE_short_path_build_s_length);
+ const f_string_static_t fake_short_path_data_s = macro_f_string_static_t_initialize(FAKE_short_path_data_s, 0, FAKE_short_path_data_s_length);
+ const f_string_static_t fake_short_path_sources_s = macro_f_string_static_t_initialize(FAKE_short_path_sources_s, 0, FAKE_short_path_sources_s_length);
+ const f_string_static_t fake_short_path_work_s = macro_f_string_static_t_initialize(FAKE_short_path_work_s, 0, FAKE_short_path_work_s_length);
+
+ const f_string_static_t fake_long_define_s = macro_f_string_static_t_initialize(FAKE_long_define_s, 0, FAKE_long_define_s_length);
+ const f_string_static_t fake_long_fakefile_s = macro_f_string_static_t_initialize(FAKE_long_fakefile_s, 0, FAKE_long_fakefile_s_length);
+ const f_string_static_t fake_long_mode_s = macro_f_string_static_t_initialize(FAKE_long_mode_s, 0, FAKE_long_mode_s_length);
+ const f_string_static_t fake_long_process_s = macro_f_string_static_t_initialize(FAKE_long_process_s, 0, FAKE_long_process_s_length);
+ const f_string_static_t fake_long_settings_s = macro_f_string_static_t_initialize(FAKE_long_settings_s, 0, FAKE_long_settings_s_length);
+
+ const f_string_static_t fake_long_path_build_s = macro_f_string_static_t_initialize(FAKE_long_path_build_s, 0, FAKE_long_path_build_s_length);
+ const f_string_static_t fake_long_path_data_s = macro_f_string_static_t_initialize(FAKE_long_path_data_s, 0, FAKE_long_path_data_s_length);
+ const f_string_static_t fake_long_path_sources_s = macro_f_string_static_t_initialize(FAKE_long_path_sources_s, 0, FAKE_long_path_sources_s_length);
+ const f_string_static_t fake_long_path_work_s = macro_f_string_static_t_initialize(FAKE_long_path_work_s, 0, FAKE_long_path_work_s_length);
+
+ const f_string_static_t fake_long_documents_disabled_s = macro_f_string_static_t_initialize(FAKE_long_documents_disabled_s, 0, FAKE_long_documents_disabled_s_length);
+ const f_string_static_t fake_long_documents_enabled_s = macro_f_string_static_t_initialize(FAKE_long_documents_enabled_s, 0, FAKE_long_documents_enabled_s_length);
+ const f_string_static_t fake_long_shared_disabled_s = macro_f_string_static_t_initialize(FAKE_long_shared_disabled_s, 0, FAKE_long_shared_disabled_s_length);
+ const f_string_static_t fake_long_shared_enabled_s = macro_f_string_static_t_initialize(FAKE_long_shared_enabled_s, 0, FAKE_long_shared_enabled_s_length);
+ const f_string_static_t fake_long_static_disabled_s = macro_f_string_static_t_initialize(FAKE_long_static_disabled_s, 0, FAKE_long_static_disabled_s_length);
+ const f_string_static_t fake_long_static_enabled_s = macro_f_string_static_t_initialize(FAKE_long_static_enabled_s, 0, FAKE_long_static_enabled_s_length);
+
+ const f_string_static_t fake_other_operation_build_s = macro_f_string_static_t_initialize(FAKE_other_operation_build_s, 0, FAKE_other_operation_build_s_length);
+ const f_string_static_t fake_other_operation_clean_s = macro_f_string_static_t_initialize(FAKE_other_operation_clean_s, 0, FAKE_other_operation_clean_s_length);
+ const f_string_static_t fake_other_operation_make_s = macro_f_string_static_t_initialize(FAKE_other_operation_make_s, 0, FAKE_other_operation_make_s_length);
+ const f_string_static_t fake_other_operation_skeleton_s = macro_f_string_static_t_initialize(FAKE_other_operation_skeleton_s, 0, FAKE_other_operation_skeleton_s_length);
#endif // _di_fake_defines_
#ifndef _di_fake_main_delete_
f_status_t fake_main_delete(fake_main_t * const main) {
- for (f_array_length_t i = 0; i < fake_total_parameters_d; ++i) {
-
- f_type_array_lengths_resize(0, &main->parameters[i].locations);
- f_type_array_lengths_resize(0, &main->parameters[i].locations_sub);
- f_type_array_lengths_resize(0, &main->parameters[i].values);
- } // for
+ f_console_parameters_delete(&main->parameters);
f_type_array_lengths_resize(0, &main->remaining);
#ifndef _di_fake_main_t_
typedef struct {
- f_console_parameter_t parameters[fake_total_parameters_d];
+ f_console_parameters_t parameters;
f_array_lengths_t remaining;
bool process_pipe;
#define fake_main_t_initialize \
{ \
- fake_console_parameter_t_initialize, \
+ macro_f_console_parameters_t_initialize(fake_console_parameter_t_initialize, fake_total_parameters_d) \
f_array_lengths_t_initialize, \
F_false, \
fl_print_t_initialize, \
f_status_t status = F_none;
- {
- const f_console_parameters_t parameters = macro_f_console_parameters_t_initialize(main->parameters, fake_total_parameters_d);
+ f_console_parameter_t parameters[] = fake_console_parameter_t_initialize;
+ main->parameters.array = parameters;
+ main->parameters.used = fake_total_parameters_d;
- // Load all parameters and identify priority of color parameters.
- {
- f_console_parameter_id_t ids[3] = { fake_parameter_no_color_e, fake_parameter_light_e, fake_parameter_dark_e };
- const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 3);
+ // Load all parameters and identify priority of color parameters.
+ {
+ f_console_parameter_id_t ids[3] = { fake_parameter_no_color_e, fake_parameter_light_e, fake_parameter_dark_e };
+ const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 3);
- status = fll_program_parameter_process(*arguments, parameters, choices, F_true, &main->remaining, &main->context);
+ status = fll_program_parameter_process(*arguments, &main->parameters, choices, F_true, &main->remaining, &main->context);
- main->output.set = &main->context.set;
- main->error.set = &main->context.set;
- main->warning.set = &main->context.set;
+ main->output.set = &main->context.set;
+ main->error.set = &main->context.set;
+ main->warning.set = &main->context.set;
- if (main->context.set.error.before) {
- main->output.context = f_color_set_empty_s;
- main->output.notable = main->context.set.notable;
+ if (main->context.set.error.before) {
+ main->output.context = f_color_set_empty_s;
+ main->output.notable = main->context.set.notable;
- main->error.context = main->context.set.error;
- main->error.notable = main->context.set.notable;
+ main->error.context = main->context.set.error;
+ main->error.notable = main->context.set.notable;
- main->warning.context = main->context.set.warning;
- main->warning.notable = main->context.set.notable;
- }
- else {
- f_color_set_t *sets[] = { &main->output.context, &main->output.notable, &main->error.context, &main->error.notable, &main->warning.context, &main->warning.notable, 0 };
+ main->warning.context = main->context.set.warning;
+ main->warning.notable = main->context.set.notable;
+ }
+ else {
+ f_color_set_t *sets[] = { &main->output.context, &main->output.notable, &main->error.context, &main->error.notable, &main->warning.context, &main->warning.notable, 0 };
- fll_program_parameter_process_empty(&main->context, sets);
- }
+ fll_program_parameter_process_empty(&main->context, sets);
+ }
- if (F_status_is_error(status)) {
- fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process", F_true);
+ if (F_status_is_error(status)) {
+ fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process", F_true);
- fake_main_delete(main);
- return status;
- }
+ fake_main_delete(main);
+ return status;
}
+ }
- // Identify priority of verbosity related parameters.
- {
- f_console_parameter_id_t ids[4] = { fake_parameter_verbosity_quiet_e, fake_parameter_verbosity_normal_e, fake_parameter_verbosity_verbose_e, fake_parameter_verbosity_debug_e };
- f_console_parameter_id_t choice = 0;
- const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 4);
-
- status = f_console_parameter_prioritize_right(parameters, choices, &choice);
+ // Identify priority of verbosity related parameters.
+ {
+ f_console_parameter_id_t ids[4] = { fake_parameter_verbosity_quiet_e, fake_parameter_verbosity_normal_e, fake_parameter_verbosity_verbose_e, fake_parameter_verbosity_debug_e };
+ f_console_parameter_id_t choice = 0;
+ const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 4);
- if (F_status_is_error(status)) {
- fll_error_print(main->error, F_status_set_fine(status), "f_console_parameter_prioritize_right", F_true);
+ status = f_console_parameter_prioritize_right(main->parameters, choices, &choice);
- fake_main_delete(main);
- return status;
- }
+ if (F_status_is_error(status)) {
+ fll_error_print(main->error, F_status_set_fine(status), "f_console_parameter_prioritize_right", F_true);
- if (choice == fake_parameter_verbosity_quiet_e) {
- main->output.verbosity = f_console_verbosity_quiet_e;
- main->error.verbosity = f_console_verbosity_quiet_e;
- main->warning.verbosity = f_console_verbosity_quiet_e;
- }
- else if (choice == fake_parameter_verbosity_normal_e) {
- main->output.verbosity = f_console_verbosity_normal_e;
- main->error.verbosity = f_console_verbosity_normal_e;
- main->warning.verbosity = f_console_verbosity_normal_e;
- }
- else if (choice == fake_parameter_verbosity_verbose_e) {
- main->output.verbosity = f_console_verbosity_verbose_e;
- main->error.verbosity = f_console_verbosity_verbose_e;
- main->warning.verbosity = f_console_verbosity_verbose_e;
- }
- else if (choice == fake_parameter_verbosity_debug_e) {
- main->output.verbosity = f_console_verbosity_debug_e;
- main->error.verbosity = f_console_verbosity_debug_e;
- main->warning.verbosity = f_console_verbosity_debug_e;
- }
+ fake_main_delete(main);
+ return status;
}
- status = F_none;
+ if (choice == fake_parameter_verbosity_quiet_e) {
+ main->output.verbosity = f_console_verbosity_quiet_e;
+ main->error.verbosity = f_console_verbosity_quiet_e;
+ main->warning.verbosity = f_console_verbosity_quiet_e;
+ }
+ else if (choice == fake_parameter_verbosity_normal_e) {
+ main->output.verbosity = f_console_verbosity_normal_e;
+ main->error.verbosity = f_console_verbosity_normal_e;
+ main->warning.verbosity = f_console_verbosity_normal_e;
+ }
+ else if (choice == fake_parameter_verbosity_verbose_e) {
+ main->output.verbosity = f_console_verbosity_verbose_e;
+ main->error.verbosity = f_console_verbosity_verbose_e;
+ main->warning.verbosity = f_console_verbosity_verbose_e;
+ }
+ else if (choice == fake_parameter_verbosity_debug_e) {
+ main->output.verbosity = f_console_verbosity_debug_e;
+ main->error.verbosity = f_console_verbosity_debug_e;
+ main->warning.verbosity = f_console_verbosity_debug_e;
+ }
}
- f_array_length_t operations_length = main->parameters[fake_parameter_operation_build_e].locations.used;
+ f_string_static_t * const argv = main->parameters.arguments.array;
+ status = F_none;
+
+ f_array_length_t operations_length = main->parameters.array[fake_parameter_operation_build_e].locations.used;
- operations_length += main->parameters[fake_parameter_operation_clean_e].locations.used;
- operations_length += main->parameters[fake_parameter_operation_make_e].locations.used;
- operations_length += main->parameters[fake_parameter_operation_skeleton_e].locations.used;
+ operations_length += main->parameters.array[fake_parameter_operation_clean_e].locations.used;
+ operations_length += main->parameters.array[fake_parameter_operation_make_e].locations.used;
+ operations_length += main->parameters.array[fake_parameter_operation_skeleton_e].locations.used;
uint8_t operations[operations_length];
f_string_static_t operations_name = f_string_static_t_initialize;
f_array_length_t j = 0;
f_array_length_t k = 0;
- for (; i < main->parameters[fake_parameter_operation_build_e].locations.used; ++i, ++locations_length) {
+ for (; i < main->parameters.array[fake_parameter_operation_build_e].locations.used; ++i, ++locations_length) {
operations[locations_length] = fake_operation_build_e;
- locations[locations_length] = main->parameters[fake_parameter_operation_build_e].locations.array[i];
+ locations[locations_length] = main->parameters.array[fake_parameter_operation_build_e].locations.array[i];
} // for
- for (i = 0; i < main->parameters[fake_parameter_operation_clean_e].locations.used; ++i) {
+ for (i = 0; i < main->parameters.array[fake_parameter_operation_clean_e].locations.used; ++i) {
for (j = 0; j < locations_length; ++j) {
- if (main->parameters[fake_parameter_operation_clean_e].locations.array[i] < locations[j]) {
+ if (main->parameters.array[fake_parameter_operation_clean_e].locations.array[i] < locations[j]) {
for (k = locations_length; k > j; --k) {
locations[k] = locations[k - 1];
operations[k] = operations[k - 1];
}
} // for
- locations[j] = main->parameters[fake_parameter_operation_clean_e].locations.array[i];
+ locations[j] = main->parameters.array[fake_parameter_operation_clean_e].locations.array[i];
operations[j] = fake_operation_clean_e;
++locations_length;
} // for
- for (i = 0; i < main->parameters[fake_parameter_operation_make_e].locations.used; ++i) {
+ for (i = 0; i < main->parameters.array[fake_parameter_operation_make_e].locations.used; ++i) {
for (j = 0; j < locations_length; ++j) {
- if (main->parameters[fake_parameter_operation_make_e].locations.array[i] < locations[j]) {
+ if (main->parameters.array[fake_parameter_operation_make_e].locations.array[i] < locations[j]) {
for (k = locations_length; k > j; --k) {
locations[k] = locations[k - 1];
operations[k] = operations[k - 1];
}
} // for
- locations[j] = main->parameters[fake_parameter_operation_make_e].locations.array[i];
+ locations[j] = main->parameters.array[fake_parameter_operation_make_e].locations.array[i];
operations[j] = fake_operation_make_e;
++locations_length;
} // for
- for (i = 0; i < main->parameters[fake_parameter_operation_skeleton_e].locations.used; ++i) {
+ for (i = 0; i < main->parameters.array[fake_parameter_operation_skeleton_e].locations.used; ++i) {
for (j = 0; j < locations_length; ++j) {
- if (main->parameters[fake_parameter_operation_skeleton_e].locations.array[i] < locations[j]) {
+ if (main->parameters.array[fake_parameter_operation_skeleton_e].locations.array[i] < locations[j]) {
for (k = locations_length; k > j; --k) {
locations[k] = locations[k - 1];
}
} // for
- locations[j] = main->parameters[fake_parameter_operation_skeleton_e].locations.array[i];
+ locations[j] = main->parameters.array[fake_parameter_operation_skeleton_e].locations.array[i];
operations[j] = fake_operation_skeleton_e;
++locations_length;
} // for
status = F_none;
- if (main->parameters[fake_parameter_help_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fake_parameter_help_e].result == f_console_result_found_e) {
fake_print_help(main->output.to, main->context);
fake_main_delete(main);
return F_none;
}
- if (main->parameters[fake_parameter_version_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fake_parameter_version_e].result == f_console_result_found_e) {
fll_program_print_version(main->output.to, fake_program_version_s);
fake_main_delete(main);
path_sources = &main->path_sources_cpp;
}
}
- else if (main->parameters[fake_parameter_path_sources_e].result != f_console_result_additional_e) {
+ else if (main->parameters.array[fake_parameter_path_sources_e].result != f_console_result_additional_e) {
path_sources = &data_build.setting.path_sources;
}
f_array_length_t i = 0;
f_array_length_t j = 0;
- f_array_length_t source_length = 0;
+ f_string_static_t source = f_string_static_t_initialize;
const f_string_dynamics_t *sources[2] = {
&data_build.setting.build_sources_library,
if (!sources[i]->array[j].used) continue;
- source_length = path_sources->used + sources[i]->array[j].used;
+ source.used = path_sources->used + sources[i]->array[j].used;
- char source[source_length + 1];
+ char source_string[source.used + 1];
+ source.string = source_string;
- memcpy(source, path_sources->string, path_sources->used);
- memcpy(source + path_sources->used, sources[i]->array[j].string, sources[i]->array[j].used);
- source[source_length] = 0;
+ memcpy(source_string, path_sources->string, path_sources->used);
+ memcpy(source_string + path_sources->used, sources[i]->array[j].string, sources[i]->array[j].used);
+ source_string[source.used] = 0;
- *status = fll_execute_arguments_add(source, source_length, &arguments);
+ *status = fll_execute_arguments_add(source, &arguments);
if (F_status_is_error(*status)) break;
} // for
}
}
- const f_array_length_t parameter_file_name_length = fake_build_parameter_library_name_prefix_s_length + data_build.setting.project_name.used + fake_build_parameter_library_name_suffix_shared_s_length;
+ const f_array_length_t parameter_file_name_length = fake_build_parameter_library_name_prefix_s.used + data_build.setting.project_name.used + fake_build_parameter_library_name_suffix_shared_s.used;
const f_array_length_t parameter_file_name_major_length = data_build.setting.version_major.used ? parameter_file_name_length + data_build.setting.version_major_prefix.used + data_build.setting.version_major.used : 0;
const f_array_length_t parameter_file_name_minor_length = data_build.setting.version_minor.used ? parameter_file_name_major_length + data_build.setting.version_minor_prefix.used + data_build.setting.version_minor.used : 0;
const f_array_length_t parameter_file_name_micro_length = data_build.setting.version_micro.used ? parameter_file_name_minor_length + data_build.setting.version_micro_prefix.used + data_build.setting.version_micro.used : 0;
parameter_file_name_micro[parameter_file_name_micro_length] = 0;
parameter_file_name_nano[parameter_file_name_nano_length] = 0;
- memcpy(parameter_file_name, fake_build_parameter_library_name_prefix_s, fake_build_parameter_library_name_prefix_s_length);
+ memcpy(parameter_file_name, fake_build_parameter_library_name_prefix_s.string, fake_build_parameter_library_name_prefix_s.used);
if (parameter_file_name_major_length) {
- memcpy(parameter_file_name_major, fake_build_parameter_library_name_prefix_s, fake_build_parameter_library_name_prefix_s_length);
+ memcpy(parameter_file_name_major, fake_build_parameter_library_name_prefix_s.string, fake_build_parameter_library_name_prefix_s.used);
if (parameter_file_name_minor_length) {
- memcpy(parameter_file_name_minor, fake_build_parameter_library_name_prefix_s, fake_build_parameter_library_name_prefix_s_length);
+ memcpy(parameter_file_name_minor, fake_build_parameter_library_name_prefix_s.string, fake_build_parameter_library_name_prefix_s.used);
if (parameter_file_name_micro_length) {
- memcpy(parameter_file_name_micro, fake_build_parameter_library_name_prefix_s, fake_build_parameter_library_name_prefix_s_length);
+ memcpy(parameter_file_name_micro, fake_build_parameter_library_name_prefix_s.string, fake_build_parameter_library_name_prefix_s.used);
if (parameter_file_name_nano_length) {
- memcpy(parameter_file_name_nano, fake_build_parameter_library_name_prefix_s, fake_build_parameter_library_name_prefix_s_length);
+ memcpy(parameter_file_name_nano, fake_build_parameter_library_name_prefix_s.string, fake_build_parameter_library_name_prefix_s.used);
}
}
}
}
- f_array_length_t count = fake_build_parameter_library_name_prefix_s_length;
+ f_array_length_t count = fake_build_parameter_library_name_prefix_s.used;
memcpy(parameter_file_name + count, data_build.setting.project_name.string, data_build.setting.project_name.used);
count += data_build.setting.project_name.used;
- memcpy(parameter_file_name + count, fake_build_parameter_library_name_suffix_shared_s, fake_build_parameter_library_name_suffix_shared_s_length);
+ memcpy(parameter_file_name + count, fake_build_parameter_library_name_suffix_shared_s.string, fake_build_parameter_library_name_suffix_shared_s.used);
if (parameter_file_name_major_length) {
- memcpy(parameter_file_name_major + count, fake_build_parameter_library_name_suffix_shared_s, fake_build_parameter_library_name_suffix_shared_s_length);
+ memcpy(parameter_file_name_major + count, fake_build_parameter_library_name_suffix_shared_s.string, fake_build_parameter_library_name_suffix_shared_s.used);
if (parameter_file_name_minor_length) {
- memcpy(parameter_file_name_minor + count, fake_build_parameter_library_name_suffix_shared_s, fake_build_parameter_library_name_suffix_shared_s_length);
+ memcpy(parameter_file_name_minor + count, fake_build_parameter_library_name_suffix_shared_s.string, fake_build_parameter_library_name_suffix_shared_s.used);
if (parameter_file_name_micro_length) {
- memcpy(parameter_file_name_micro + count, fake_build_parameter_library_name_suffix_shared_s, fake_build_parameter_library_name_suffix_shared_s_length);
+ memcpy(parameter_file_name_micro + count, fake_build_parameter_library_name_suffix_shared_s.string, fake_build_parameter_library_name_suffix_shared_s.used);
if (parameter_file_name_nano_length) {
- memcpy(parameter_file_name_nano + count, fake_build_parameter_library_name_suffix_shared_s, fake_build_parameter_library_name_suffix_shared_s_length);
+ memcpy(parameter_file_name_nano + count, fake_build_parameter_library_name_suffix_shared_s.string, fake_build_parameter_library_name_suffix_shared_s.used);
}
}
}
}
if (parameter_file_name_major_length) {
- count += fake_build_parameter_library_name_suffix_shared_s_length;
+ count += fake_build_parameter_library_name_suffix_shared_s.used;
if (data_build.setting.version_major_prefix.used) {
memcpy(parameter_file_name_major + count, data_build.setting.version_major_prefix.string, data_build.setting.version_major_prefix.used);
}
{
- f_array_length_t parameter_linker_length = fake_build_parameter_library_shared_prefix_s_length;
+ f_array_length_t parameter_linker_length = fake_build_parameter_library_shared_prefix_s.used;
f_array_length_t parameter_file_path_length = main->path_build_libraries_shared.used;
if (data_build.setting.version_file == fake_build_version_type_major_e) {
char parameter_linker[parameter_linker_length + 1];
char parameter_file_path[parameter_file_path_length + 1];
- memcpy(parameter_linker, fake_build_parameter_library_shared_prefix_s, fake_build_parameter_library_shared_prefix_s_length);
+ memcpy(parameter_linker, fake_build_parameter_library_shared_prefix_s.string, fake_build_parameter_library_shared_prefix_s.used);
memcpy(parameter_file_path, main->path_build_libraries_shared.string, main->path_build_libraries_shared.used);
if (data_build.setting.version_file == fake_build_version_type_major_e) {
}
if (data_build.setting.version_target == fake_build_version_type_major_e) {
- memcpy(parameter_linker + fake_build_parameter_library_shared_prefix_s_length, parameter_file_name_major, parameter_file_name_major_length);
+ memcpy(parameter_linker + fake_build_parameter_library_shared_prefix_s.used, parameter_file_name_major, parameter_file_name_major_length);
}
else if (data_build.setting.version_target == fake_build_version_type_minor_e) {
- memcpy(parameter_linker + fake_build_parameter_library_shared_prefix_s_length, parameter_file_name_minor, parameter_file_name_minor_length);
+ memcpy(parameter_linker + fake_build_parameter_library_shared_prefix_s.used, parameter_file_name_minor, parameter_file_name_minor_length);
}
else if (data_build.setting.version_target == fake_build_version_type_micro_e) {
- memcpy(parameter_linker + fake_build_parameter_library_shared_prefix_s_length, parameter_file_name_micro, parameter_file_name_micro_length);
+ memcpy(parameter_linker + fake_build_parameter_library_shared_prefix_s.used, parameter_file_name_micro, parameter_file_name_micro_length);
}
else if (data_build.setting.version_target == fake_build_version_type_nano_e) {
- memcpy(parameter_linker + fake_build_parameter_library_shared_prefix_s_length, parameter_file_name_nano, parameter_file_name_nano_length);
+ memcpy(parameter_linker + fake_build_parameter_library_shared_prefix_s.used, parameter_file_name_nano, parameter_file_name_nano_length);
}
parameter_linker[parameter_linker_length] = 0;
parameter_file_path[parameter_file_path_length] = 0;
- const f_string_t values[] = {
+ const f_string_static_t values[] = {
fake_build_parameter_library_shared_s,
- parameter_linker,
+ macro_f_string_static_t_initialize(parameter_linker, 0, parameter_linker_length),
fake_build_parameter_library_output_s,
- parameter_file_path,
- };
-
- const f_array_length_t lengths[] = {
- fake_build_parameter_library_shared_s_length,
- parameter_linker_length,
- fake_build_parameter_library_output_s_length,
- parameter_file_path_length,
+ macro_f_string_static_t_initialize(parameter_file_path, 0, parameter_file_path_length),
};
for (uint8_t i = 0; i < 4; ++i) {
- if (!lengths[i]) continue;
+ if (!values[i].used) continue;
- *status = fll_execute_arguments_add(values[i], lengths[i], &arguments);
+ *status = fll_execute_arguments_add(values[i], &arguments);
if (F_status_is_error(*status)) break;
} // for
if (!data_build.setting.build_indexer_arguments.array[i].used) continue;
- *status = fll_execute_arguments_add(data_build.setting.build_indexer_arguments.array[i].string, data_build.setting.build_indexer_arguments.array[i].used, &arguments);
+ *status = fll_execute_arguments_add(data_build.setting.build_indexer_arguments.array[i], &arguments);
if (F_status_is_error(*status)) break;
} // for
if (F_status_is_error_not(*status)) {
- f_array_length_t destination_length = main->path_build_libraries_static.used + fake_build_parameter_library_name_prefix_s_length;
- destination_length += data_build.setting.project_name.used + fake_build_parameter_library_name_suffix_static_s_length;
+ f_string_static_t destination = f_string_static_t_initialize;
+ destination.used = main->path_build_libraries_static.used + fake_build_parameter_library_name_prefix_s.used;
+ destination.used += data_build.setting.project_name.used + fake_build_parameter_library_name_suffix_static_s.used;
- char destination[destination_length + 1];
+ char destination_string[destination.used + 1];
+ destination.string = destination_string;
- destination_length = 0;
+ destination.used = 0;
- memcpy(destination, main->path_build_libraries_static.string, main->path_build_libraries_static.used);
- destination_length += main->path_build_libraries_static.used;
+ memcpy(destination_string, main->path_build_libraries_static.string, main->path_build_libraries_static.used);
+ destination.used += main->path_build_libraries_static.used;
- memcpy(destination + destination_length, fake_build_parameter_library_name_prefix_s, fake_build_parameter_library_name_prefix_s_length);
- destination_length += fake_build_parameter_library_name_prefix_s_length;
+ memcpy(destination_string + destination.used, fake_build_parameter_library_name_prefix_s.string, fake_build_parameter_library_name_prefix_s.used);
+ destination.used += fake_build_parameter_library_name_prefix_s.used;
- memcpy(destination + destination_length, data_build.setting.project_name.string, data_build.setting.project_name.used);
- destination_length += data_build.setting.project_name.used;
+ memcpy(destination_string + destination.used, data_build.setting.project_name.string, data_build.setting.project_name.used);
+ destination.used += data_build.setting.project_name.used;
- memcpy(destination + destination_length, fake_build_parameter_library_name_suffix_static_s, fake_build_parameter_library_name_suffix_static_s_length);
- destination_length += fake_build_parameter_library_name_suffix_static_s_length;
+ memcpy(destination_string + destination.used, fake_build_parameter_library_name_suffix_static_s.string, fake_build_parameter_library_name_suffix_static_s.used);
+ destination.used += fake_build_parameter_library_name_suffix_static_s.used;
- destination[destination_length] = 0;
+ destination_string[destination.used] = 0;
- *status = fll_execute_arguments_add(destination, destination_length, &arguments);
+ *status = fll_execute_arguments_add(destination, &arguments);
}
if (F_status_is_error_not(*status)) {
- f_array_length_t source_length = 0;
+ f_string_static_t source = f_string_static_t_initialize;
f_array_length_t j = 0;
const f_string_dynamics_t *sources[2] = {
break;
}
- source_length = source_path.used + file_name.used + fake_build_parameter_object_name_suffix_s_length;
+ source.used = source_path.used + file_name.used + fake_build_parameter_object_name_suffix_s.used;
}
else {
- source_length = main->path_build_objects.used + file_name.used + fake_build_parameter_object_name_suffix_s_length;
+ source.used = main->path_build_objects.used + file_name.used + fake_build_parameter_object_name_suffix_s.used;
}
- char source[source_length + 1];
+ char source_string[source.used + 1];
+ source.string = source_string;
if (source_path.used) {
- memcpy(source, source_path.string, source_path.used);
- memcpy(source + source_path.used, file_name.string, file_name.used);
- memcpy(source + source_path.used + file_name.used, fake_build_parameter_object_name_suffix_s, fake_build_parameter_object_name_suffix_s_length);
+ memcpy(source_string, source_path.string, source_path.used);
+ memcpy(source_string + source_path.used, file_name.string, file_name.used);
+ memcpy(source_string + source_path.used + file_name.used, fake_build_parameter_object_name_suffix_s.string, fake_build_parameter_object_name_suffix_s.used);
}
else {
- memcpy(source, main->path_build_objects.string, main->path_build_objects.used);
- memcpy(source + main->path_build_objects.used, file_name.string, file_name.used);
- memcpy(source + main->path_build_objects.used + file_name.used, fake_build_parameter_object_name_suffix_s, fake_build_parameter_object_name_suffix_s_length);
+ memcpy(source_string, main->path_build_objects.string, main->path_build_objects.used);
+ memcpy(source_string + main->path_build_objects.used, file_name.string, file_name.used);
+ memcpy(source_string + main->path_build_objects.used + file_name.used, fake_build_parameter_object_name_suffix_s.string, fake_build_parameter_object_name_suffix_s.used);
}
- source[source_length] = 0;
+ source_string[source.used] = 0;
- *status = fll_execute_arguments_add(source, source_length, &arguments);
+ *status = fll_execute_arguments_add(source, &arguments);
if (F_status_is_error(*status)) {
fll_error_print(main->error, F_status_set_fine(*status), "fll_execute_arguments_add", F_true);
for (uint8_t i = 0; i < 2; ++i) {
- *status = fl_environment_load_name(variables[i].string, variables[i].used, environment);
+ *status = fl_environment_load_name(variables[i], environment);
if (F_status_is_error(*status)) {
fll_error_print(main->error, F_status_set_fine(*status), "fl_environment_load_name", F_true);
- break;
+
+ return;
}
} // for
-
- if (F_status_is_error(*status)) {
- return;
- }
}
if (environment->used + data_build.setting.environment.used > environment->size) {
return;
}
- char path_file[main->path_data_build.used + setting_file.used + 1];
+ f_string_static_t path_file = f_string_static_t_initialize;
+ path_file.used = main->path_data_build.used + setting_file.used;
+
+ char path_file_string[path_file.used + 1];
+ path_file.string = path_file_string;
{
f_string_dynamic_t buffer = f_string_dynamic_t_initialize;
f_fss_contents_t contents = f_fss_contents_t_initialize;
if (setting_file.used) {
- memcpy(path_file, main->path_data_build.string, main->path_data_build.used);
- memcpy(path_file + main->path_data_build.used, setting_file.string, setting_file.used);
+ memcpy(path_file_string, main->path_data_build.string, main->path_data_build.used);
+ memcpy(path_file_string + main->path_data_build.used, setting_file.string, setting_file.used);
- path_file[main->path_data_build.used + setting_file.used] = 0;
+ path_file_string[main->path_data_build.used + setting_file.used] = 0;
*status = fake_file_buffer(main, path_file, &buffer);
}
else {
- *status = fake_file_buffer(main, main->file_data_build_settings.string, &buffer);
+ *status = fake_file_buffer(main, main->file_data_build_settings, &buffer);
}
if (F_status_is_error_not(*status)) {
fll_error_print(main->error, F_status_set_fine(*status), "fl_fss_apply_delimit", F_true);
}
else {
- fake_build_load_setting_process(main, F_true, setting_file.used ? path_file : main->file_data_build_settings.string, buffer, objects, contents, setting, status);
+ fake_build_load_setting_process(main, F_true, setting_file.used ? path_file : main->file_data_build_settings, buffer, objects, contents, setting, status);
}
}
fl_print_format("%q%[%QThe setting '%]", main->error.to.stream, f_string_eol_s, main->error.context, main->error.prefix, main->error.context);
fl_print_format("%[%Q%]", main->error.to.stream, main->error.notable, names[i], main->error.notable);
fl_print_format("%[' is required but is not specified in the settings file '%]", main->error.to.stream, main->error.context, main->error.context);
- fl_print_format("%[%S%]", main->error.to.stream, main->error.notable, setting_file.used ? path_file : main->file_data_build_settings.string, main->error.notable);
+ fl_print_format("%[%Q%]", main->error.to.stream, main->error.notable, setting_file.used ? path_file : main->file_data_build_settings, main->error.notable);
fl_print_format("%['.%]%q", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s);
funlockfile(main->error.to.stream);
#endif // _di_fake_build_load_setting_
#ifndef _di_fake_build_load_setting_process_
- void fake_build_load_setting_process(fake_main_t * const main, const bool checks, const f_string_t path_file, const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, fake_build_setting_t *setting, f_status_t *status) {
+ void fake_build_load_setting_process(fake_main_t * const main, const bool checks, const f_string_static_t path_file, const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, fake_build_setting_t *setting, f_status_t *status) {
if (F_status_is_error(*status) && buffer.used) return;
const int total_build_libraries = setting->build_libraries.used;
const f_string_dynamics_t *modes = &setting->modes_default;
- f_string_dynamic_t settings_mode_name_dynamic[fake_build_setting_total_d];
- f_string_t settings_mode_names[fake_build_setting_total_d];
- f_array_length_t setting_mode_lengths[fake_build_setting_total_d];
+ f_string_dynamic_t settings_mode_names[fake_build_setting_total_d];
bool found = F_false;
fl_print_format("%q%[%QThe specified mode '%]", main->error.to.stream, f_string_eol_s, main->error.context, main->error.prefix, main->error.context);
fl_print_format("%[%Q%]", main->error.to.stream, main->error.notable, modes->array[i], main->error.notable);
fl_print_format("%[' is not a valid mode, according to '%]", main->error.to.stream, main->error.context, main->error.context);
- fl_print_format("%[%S%]", main->error.to.stream, main->error.notable, path_file, main->error.notable);
+ fl_print_format("%[%Q%]", main->error.to.stream, main->error.notable, path_file, main->error.notable);
fl_print_format("%['.%]%q", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s);
funlockfile(main->error.to.stream);
break;
}
- memset(&settings_mode_name_dynamic, 0, sizeof(f_string_dynamic_t) * fake_build_setting_total_d);
- memset(&settings_mode_names, 0, sizeof(f_string_t) * fake_build_setting_total_d);
- memset(&setting_mode_lengths, 0, sizeof(f_array_length_t) * fake_build_setting_total_d);
+ memset(&settings_mode_names, 0, sizeof(f_string_dynamic_t) * fake_build_setting_total_d);
for (j = 0; j < fake_build_setting_total_d; ++j) {
- setting_mode_lengths[j] = settings_length[j] + 1 + modes->array[i].used;
+ settings_mode_names[j].used = 0;
- *status = f_string_dynamic_resize(setting_mode_lengths[j], &settings_mode_name_dynamic[j]);
+ *status = f_string_dynamic_increase_by(settings_length[j] + f_string_ascii_minus_s.used + modes->array[i].used, &settings_mode_names[j]);
if (F_status_is_error(*status)) {
- function = "macro_f_string_dynamic_t_resize";
+ function = "f_string_dynamic_increase_by";
break;
}
- memcpy(settings_mode_name_dynamic[j].string, settings_name[j], settings_length[j]);
- memcpy(settings_mode_name_dynamic[j].string + settings_length[j] + 1, modes->array[i].string, modes->array[i].used);
- settings_mode_name_dynamic[j].string[settings_length[j]] = '-';
+ memcpy(settings_mode_names[j].string, settings_name[j], settings_length[j]);
+ settings_mode_names[j].used = settings_length[j];
+
+ memcpy(settings_mode_names[j].string, f_string_ascii_minus_s.string, f_string_ascii_minus_s.used);
+ settings_mode_names[j].used += f_string_ascii_minus_s.used;
- settings_mode_names[j] = settings_mode_name_dynamic[j].string;
+ memcpy(settings_mode_names[j].string + settings_mode_namesf[j].used, modes->array[i].string, modes->array[i].used);
+ settings_mode_names[j].used += modes->array[i].used;
} // for
if (*status == F_none) {
- *status = fll_fss_snatch_apart(buffer, objects, contents, settings_mode_names, setting_mode_lengths, fake_build_setting_total_d, settings_value, 0, 0);
+ *status = fll_fss_snatch_apart(buffer, objects, contents, settings_mode_names, fake_build_setting_total_d, settings_value, 0, 0);
if (F_status_is_error(*status)) {
function = "fll_fss_snatch_apart";
}
for (j = 0; j < fake_build_setting_total_d; ++j) {
- f_string_dynamic_resize(0, &settings_mode_name_dynamic[j]);
+ f_string_dynamic_resize(0, &settings_mode_names[j]);
} // for
if (F_status_is_error(*status)) break;
funlockfile(main->error.to.stream);
fl_print_format("%q%[%QA setting in the file '%]", main->error.to.stream, f_string_eol_s, main->error.context, main->error.prefix, main->error.context);
- fl_print_format("%[%S%]", main->error.to.stream, main->error.notable, path_file, main->error.notable);
+ fl_print_format("%[%Q%]", main->error.to.stream, main->error.notable, path_file, main->error.notable);
fl_print_format("%[' is too long.%]%q", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s);
funlockfile(main->error.to.stream);
if (F_status_is_error(*status)) return;
// Override setting file when any of these are specified in the command line.
- if (main->parameters[fake_parameter_shared_disabled_e].result == f_console_result_found_e) {
- if (main->parameters[fake_parameter_shared_enabled_e].result == f_console_result_found_e) {
- if (main->parameters[fake_parameter_shared_enabled_e].location > main->parameters[fake_parameter_shared_disabled_e].location) {
+ if (main->parameters.array[fake_parameter_shared_disabled_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fake_parameter_shared_enabled_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fake_parameter_shared_enabled_e].location > main->parameters.array[fake_parameter_shared_disabled_e].location) {
setting->build_shared = F_true;
setting->search_shared = F_true;
}
setting->search_shared = F_false;
}
}
- else if (main->parameters[fake_parameter_shared_enabled_e].result == f_console_result_found_e) {
+ else if (main->parameters.array[fake_parameter_shared_enabled_e].result == f_console_result_found_e) {
setting->build_shared = F_true;
setting->search_shared = F_true;
}
- if (main->parameters[fake_parameter_static_disabled_e].result == f_console_result_found_e) {
- if (main->parameters[fake_parameter_static_enabled_e].result == f_console_result_found_e) {
- if (main->parameters[fake_parameter_static_enabled_e].location > main->parameters[fake_parameter_static_disabled_e].location) {
+ if (main->parameters.array[fake_parameter_static_disabled_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fake_parameter_static_enabled_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fake_parameter_static_enabled_e].location > main->parameters.array[fake_parameter_static_disabled_e].location) {
setting->build_static = F_true;
setting->search_static = F_true;
}
setting->search_static = F_false;
}
}
- else if (main->parameters[fake_parameter_static_enabled_e].result == f_console_result_found_e) {
+ else if (main->parameters.array[fake_parameter_static_enabled_e].result == f_console_result_found_e) {
setting->build_static = F_true;
setting->search_static = F_true;
}
* Status codes (with error bit) are returned on any problem.
*/
#ifndef _di_fake_build_load_setting_process_
- extern void fake_build_load_setting_process(fake_main_t * const main, const bool checks, const f_string_t path_file, const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, fake_build_setting_t *setting, f_status_t *status) F_attribute_visibility_internal_d;
+ extern void fake_build_load_setting_process(fake_main_t * const main, const bool checks, const f_string_static_t path_file, const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, fake_build_setting_t *setting, f_status_t *status) F_attribute_visibility_internal_d;
#endif // _di_fake_build_load_setting_process_
/**
path_sources = &main->path_sources_cpp;
}
}
- else if (main->parameters[fake_parameter_path_sources_e].result != f_console_result_additional_e) {
+ else if (main->parameters.array[fake_parameter_path_sources_e].result != f_console_result_additional_e) {
path_sources = &data_build.setting.path_sources;
}
funlockfile(main->error.to.stream);
}
else {
- fll_error_file_print(main->error, F_status_set_fine(*status), "f_directory_create", F_true, destination_path.string, "create", fll_error_file_type_directory_e);
+ fll_error_file_print(main->error, F_status_set_fine(*status), "f_directory_create", F_true, destination_path, f_file_operation_create_s, fll_error_file_type_directory_e);
}
break;
}
}
else if (F_status_is_error(*status)) {
- fll_error_file_print(main->error, F_status_set_fine(*status), "f_directory_exists", F_true, destination_path.string, "create", fll_error_file_type_directory_e);
+ fll_error_file_print(main->error, F_status_set_fine(*status), "f_directory_exists", F_true, destination_path, f_file_operation_create_s, fll_error_file_type_directory_e);
break;
}
- destination_length = destination_path.used + file_name.used + fake_build_parameter_object_name_suffix_s_length;
+ destination_length = destination_path.used + file_name.used + fake_build_parameter_object_name_suffix_s.used;
}
else {
- destination_length = main->path_build_objects.used + file_name.used + fake_build_parameter_object_name_suffix_s_length;
+ destination_length = main->path_build_objects.used + file_name.used + fake_build_parameter_object_name_suffix_s.used;
}
char destination[destination_length + 1];
if (destination_path.used) {
memcpy(destination, destination_path.string, destination_path.used);
memcpy(destination + destination_path.used, file_name.string, file_name.used);
- memcpy(destination + destination_path.used + file_name.used, fake_build_parameter_object_name_suffix_s, fake_build_parameter_object_name_suffix_s_length);
+ memcpy(destination + destination_path.used + file_name.used, fake_build_parameter_object_name_suffix_s, fake_build_parameter_object_name_suffix_s.used);
}
else {
memcpy(destination, main->path_build_objects.string, main->path_build_objects.used);
memcpy(destination + main->path_build_objects.used, file_name.string, file_name.used);
- memcpy(destination + main->path_build_objects.used + file_name.used, fake_build_parameter_object_name_suffix_s, fake_build_parameter_object_name_suffix_s_length);
+ memcpy(destination + main->path_build_objects.used + file_name.used, fake_build_parameter_object_name_suffix_s, fake_build_parameter_object_name_suffix_s.used);
}
destination[destination_length] = 0;
- const f_string_t values[] = {
- source,
+ const f_string_static_t values[] = {
+ macro_f_string_static_t_initialize(source, 0, source_length),
fake_build_parameter_object_compile_s,
fake_build_parameter_object_static_s,
fake_build_parameter_object_output_s,
- destination,
- };
-
- const f_array_length_t lengths[] = {
- source_length,
- fake_build_parameter_object_compile_s_length,
- fake_build_parameter_object_static_s_length,
- fake_build_parameter_object_output_s_length,
- destination_length,
+ macro_f_string_static_t_initialize(destination, 0, destination_length),
};
for (uint8_t k = 0; k < 5; ++k) {
if (!lengths[k]) continue;
- *status = fll_execute_arguments_add(values[k], lengths[k], &arguments);
+ *status = fll_execute_arguments_add(values[k], &arguments);
if (F_status_is_error(*status)) break;
} // for
path_sources = &main->path_sources_cpp;
}
}
- else if (main->parameters[fake_parameter_path_sources_e].result != f_console_result_additional_e) {
+ else if (main->parameters.array[fake_parameter_path_sources_e].result != f_console_result_additional_e) {
path_sources = &data_build.setting.path_sources;
}
- f_array_length_t source_length = 0;
+ f_string_static_t source = f_string_static_t_initialize;
const f_string_dynamics_t *sources[2] = {
&data_build.setting.build_sources_program,
for (j = 0; j < sources[i]->used; ++j) {
- source_length = path_sources->used + sources[i]->array[j].used;
+ source.used = path_sources->used + sources[i]->array[j].used;
- char source[source_length + 1];
+ char source_string[source.used + 1];
+ source.string = source_string;
- memcpy(source, path_sources->string, path_sources->used);
- memcpy(source + path_sources->used, sources[i]->array[j].string, sources[i]->array[j].used);
- source[source_length] = 0;
+ memcpy(source_string, path_sources->string, path_sources->used);
+ memcpy(source_string + path_sources->used, sources[i]->array[j].string, sources[i]->array[j].used);
+ source_string[source.used] = 0;
- *status = fll_execute_arguments_add(source, source_length, &arguments);
+ *status = fll_execute_arguments_add(source, &arguments);
if (F_status_is_error(*status)) break;
} // for
memcpy(parameter_file_name_path + main->path_build_programs_shared.used, data_build.setting.project_name.string, data_build.setting.project_name.used);
parameter_file_name_path[parameter_file_name_path_length] = 0;
- const f_string_t values[] = {
+ const f_string_static_t values[] = {
fake_build_parameter_library_output_s,
- parameter_file_name_path,
- };
-
- const f_array_length_t lengths[] = {
- fake_build_parameter_library_output_s_length,
- parameter_file_name_path_length,
+ macro_f_string_static_t_initialize(parameter_file_name_path, 0, parameter_file_name_path_length),
};
for (uint8_t i = 0; i < 2; ++i) {
- if (!lengths[i]) continue;
+ if (!values[i].used) continue;
- *status = fll_execute_arguments_add(values[i], lengths[i], &arguments);
+ *status = fll_execute_arguments_add(values[i], &arguments);
if (F_status_is_error(*status)) break;
} // for
}
// if project-specific library sources exist, then the -lproject_name needs to be added to the arguments.
if (F_status_is_error_not(*status) && data_build.setting.build_sources_library.used) {
- f_array_length_t link_project_library_length = fake_build_parameter_library_link_file_s_length + data_build.setting.project_name.used;
+ f_string_static_t link_project_library = f_string_static_t_initialize;
+ link_project_library.used = fake_build_parameter_library_link_file_s_length + data_build.setting.project_name.used;
- char link_project_library[link_project_library_length + 1];
+ char link_project_library_string[link_project_library.used + 1];
+ link_project_library.string = link_project_library_string;
- memcpy(link_project_library, fake_build_parameter_library_link_file_s, fake_build_parameter_library_link_file_s_length);
- memcpy(link_project_library + fake_build_parameter_library_link_file_s_length, data_build.setting.project_name.string, data_build.setting.project_name.used);
- link_project_library[link_project_library_length] = 0;
+ memcpy(link_project_library, fake_build_parameter_library_link_file_s.string, fake_build_parameter_library_link_file_s.used);
+ memcpy(link_project_library + fake_build_parameter_library_link_file_s.string, data_build.setting.project_name.string, data_build.setting.project_name.used);
+ link_project_library_string[link_project_library.used] = 0;
- *status = fll_execute_arguments_add(link_project_library, link_project_library_length, &arguments);
+ *status = fll_execute_arguments_add(link_project_library, &arguments);
}
fake_build_arguments_standard_add(main, data_build, F_true, F_false, &arguments, status);
path_sources = &main->path_sources_cpp;
}
}
- else if (main->parameters[fake_parameter_path_sources_e].result != f_console_result_additional_e) {
+ else if (main->parameters.array[fake_parameter_path_sources_e].result != f_console_result_additional_e) {
path_sources = &data_build.setting.path_sources;
}
- f_array_length_t source_length = 0;
+ f_string_static_t source = f_string_static_t_initialize;
const f_string_dynamics_t *sources[2] = {
&data_build.setting.build_sources_program,
if (!sources[i]->array[j].used) continue;
- source_length = path_sources->used + sources[i]->array[j].used;
+ source.used = path_sources->used + sources[i]->array[j].used;
- char source[source_length + 1];
+ char source_string[source.used + 1];
+ source.string = source_string;
- memcpy(source, path_sources->string, path_sources->used);
- memcpy(source + path_sources->used, sources[i]->array[j].string, sources[i]->array[j].used);
- source[source_length] = 0;
+ memcpy(source_string, path_sources->string, path_sources->used);
+ memcpy(source_string + path_sources->used, sources[i]->array[j].string, sources[i]->array[j].used);
+ source_string[source.used] = 0;
- *status = fll_execute_arguments_add(source, source_length, &arguments);
+ *status = fll_execute_arguments_add(source, &arguments);
if (F_status_is_error(*status)) break;
} // for
memcpy(source_library, main->path_build_libraries_static.string, main->path_build_libraries_static.used);
source_library_length += main->path_build_libraries_static.used;
- memcpy(source_library + source_library_length, fake_build_parameter_library_name_prefix_s, fake_build_parameter_library_name_prefix_s_length);
- source_library_length += fake_build_parameter_library_name_prefix_s_length;
+ memcpy(source_library + source_library_length, fake_build_parameter_library_name_prefix_s.string, fake_build_parameter_library_name_prefix_s.used);
+ source_library_length += fake_build_parameter_library_name_prefix_s.used;
memcpy(source_library + source_library_length, data_build.setting.project_name.string, data_build.setting.project_name.used);
source_library_length += data_build.setting.project_name.used;
- memcpy(source_library + source_library_length, fake_build_parameter_library_name_suffix_static_s, fake_build_parameter_library_name_suffix_static_s_length);
- source_library_length += fake_build_parameter_library_name_suffix_static_s_length;
+ memcpy(source_library + source_library_length, fake_build_parameter_library_name_suffix_static_s.string, fake_build_parameter_library_name_suffix_static_s.used);
+ source_library_length += fake_build_parameter_library_name_suffix_static_s.used;
}
- source_library[source_library_length] = 0;
+ source_library.string[source_library_length] = 0;
f_array_length_t parameter_file_name_path_length = main->path_build_programs_static.used + data_build.setting.project_name.used;
memcpy(parameter_file_name_path + main->path_build_programs_static.used, data_build.setting.project_name.string, data_build.setting.project_name.used);
parameter_file_name_path[parameter_file_name_path_length] = 0;
- const f_string_t values[] = {
- source_library,
+ const f_string_static_t values[] = {
+ macro_f_string_static_t_initialize(source_library, 0, source_library_length),
fake_build_parameter_library_static_s,
fake_build_parameter_library_output_s,
- parameter_file_name_path,
- };
-
- const f_array_length_t lengths[] = {
- source_library_length,
- fake_build_parameter_library_static_s_length,
- fake_build_parameter_library_output_s_length,
- parameter_file_name_path_length,
+ macro_f_string_static_t_initialize(parameter_file_name_path, 0, parameter_file_name_path_length),
};
for (uint8_t i = 0; i < 4; ++i) {
- if (!lengths[i]) continue;
+ if (!values[i].used) continue;
- *status = fll_execute_arguments_add(values[i], lengths[i], &arguments);
+ *status = fll_execute_arguments_add(values[i], &arguments);
if (F_status_is_error(*status)) break;
} // for
}
if (F_status_is_error(*status)) return;
- f_array_length_t build_libraries_length = fake_build_parameter_library_link_path_s_length + main->path_build_libraries_shared.used;
+ f_array_length_t build_libraries_length = fake_build_parameter_library_link_path_s.used + main->path_build_libraries_shared.used;
char build_libraries[build_libraries_length + 1];
- memcpy(build_libraries, fake_build_parameter_library_link_path_s, fake_build_parameter_library_link_path_s_length);
+ memcpy(build_libraries, fake_build_parameter_library_link_path_s.string, fake_build_parameter_library_link_path_s.used);
if (is_shared) {
- memcpy(build_libraries + fake_build_parameter_library_link_path_s_length, main->path_build_libraries_shared.string, main->path_build_libraries_shared.used);
+ memcpy(build_libraries + fake_build_parameter_library_link_path_s.used, main->path_build_libraries_shared.string, main->path_build_libraries_shared.used);
}
else {
- memcpy(build_libraries + fake_build_parameter_library_link_path_s_length, main->path_build_libraries_static.string, main->path_build_libraries_static.used);
+ memcpy(build_libraries + fake_build_parameter_library_link_path_s.used, main->path_build_libraries_static.string, main->path_build_libraries_static.used);
}
build_libraries[build_libraries_length] = 0;
- f_array_length_t build_includes_length = fake_build_parameter_library_include_s_length + main->path_build_includes.used;
+ f_array_length_t build_includes_length = fake_build_parameter_library_include_s.used + main->path_build_includes.used;
char build_includes[build_includes_length + 1];
- memcpy(build_includes, fake_build_parameter_library_include_s, fake_build_parameter_library_include_s_length);
- memcpy(build_includes + fake_build_parameter_library_include_s_length, main->path_build_includes.string, main->path_build_includes.used);
+ memcpy(build_includes, fake_build_parameter_library_include_s.string, fake_build_parameter_library_include_s.used);
+ memcpy(build_includes + fake_build_parameter_library_include_s.used, main->path_build_includes.string, main->path_build_includes.used);
const f_string_static_t values[] = {
- macro_f_string_static_t_initialize2(build_libraries, 0, build_includes_length),
- macro_f_string_static_t_initialize2(build_includes, 0, build_includes_length),
+ macro_f_string_static_t_initialize(build_libraries, 0, build_libraries_length),
+ macro_f_string_static_t_initialize(build_includes, 0, build_includes_length),
};
for (uint8_t i = 0; i < 2; ++i) {
- if (!lengths[i]) continue;
+ if (!values[i].used) continue;
- *status = fll_execute_arguments_add(values[i].string, values[i].used, arguments);
+ *status = fll_execute_arguments_add(values[i], arguments);
if (F_status_is_error(*status)) break;
} // for
if (main->path_work.used) {
- f_array_length_t length = 0;
+ f_string_static_t buffer = f_string_static_t_initialize;
if (F_status_is_error_not(*status)) {
- length = fake_build_parameter_library_include_s_length + main->path_work_includes.used;
+ buffer.used = fake_build_parameter_library_include_s.used + main->path_work_includes.used;
- char string[length + 1];
+ char buffer_string[buffer.used + 1];
- memcpy(string, fake_build_parameter_library_include_s, fake_build_parameter_library_include_s_length);
- memcpy(string + fake_build_parameter_library_include_s_length, main->path_work_includes.string, main->path_work_includes.used);
+ memcpy(buffer_string, fake_build_parameter_library_include_s.string, fake_build_parameter_library_include_s.used);
+ memcpy(buffer_string + fake_build_parameter_library_include_s.used, main->path_work_includes.string, main->path_work_includes.used);
- string[length] = 0;
+ buffer_string[buffer.used] = 0;
- *status = fll_execute_arguments_add(string, length, arguments);
+ *status = fll_execute_arguments_add(buffer, arguments);
}
if (data_build.setting.search_shared && (is_shared || !data_build.setting.search_exclusive) && F_status_is_error_not(*status)) {
- length = fake_build_parameter_library_link_path_s_length + main->path_work_libraries_shared.used;
+ buffer.used = fake_build_parameter_library_link_path_s.used + main->path_work_libraries_shared.used;
- char string[length + 1];
+ char buffer_string[buffer.used + 1];
- memcpy(string, fake_build_parameter_library_link_path_s, fake_build_parameter_library_link_path_s_length);
- memcpy(string + fake_build_parameter_library_link_path_s_length, main->path_work_libraries_shared.string, main->path_work_libraries_shared.used);
+ memcpy(buffer_string, fake_build_parameter_library_link_path_s.string, fake_build_parameter_library_link_path_s.used);
+ memcpy(buffer_string + fake_build_parameter_library_link_path_s.used, main->path_work_libraries_shared.string, main->path_work_libraries_shared.used);
- string[length] = 0;
+ buffer_string[buffer.used] = 0;
- *status = fll_execute_arguments_add(string, length, arguments);
+ *status = fll_execute_arguments_add(buffer, arguments);
}
if (data_build.setting.search_static && (!is_shared || !data_build.setting.search_exclusive) && F_status_is_error_not(*status)) {
- length = fake_build_parameter_library_link_path_s_length + main->path_work_libraries_static.used;
+ buffer.used = fake_build_parameter_library_link_path_s.used + main->path_work_libraries_static.used;
- char string[length + 1];
+ char buffer_string[buffer.used + 1];
- memcpy(string, fake_build_parameter_library_link_path_s, fake_build_parameter_library_link_path_s_length);
- memcpy(string + fake_build_parameter_library_link_path_s_length, main->path_work_libraries_static.string, main->path_work_libraries_static.used);
+ memcpy(buffer_string, fake_build_parameter_library_link_path_s.string, fake_build_parameter_library_link_path_s.used);
+ memcpy(buffer_string + fake_build_parameter_library_link_path_s.used, main->path_work_libraries_static.string, main->path_work_libraries_static.used);
- string[length] = 0;
+ buffer_string[buffer.used] = 0;
- *status = fll_execute_arguments_add(string, length, arguments);
+ *status = fll_execute_arguments_add(buffer, arguments);
}
}
if (!data_build.setting.build_libraries.array[i].used) continue;
- *status = fll_execute_arguments_add(data_build.setting.build_libraries.array[i].string, data_build.setting.build_libraries.array[i].used, arguments);
+ *status = fll_execute_arguments_add(data_build.setting.build_libraries.array[i], arguments);
} // for
if (is_shared) {
if (!data_build.setting.build_libraries_shared.array[i].used) continue;
- *status = fll_execute_arguments_add(data_build.setting.build_libraries_shared.array[i].string, data_build.setting.build_libraries_shared.array[i].used, arguments);
+ *status = fll_execute_arguments_add(data_build.setting.build_libraries_shared.array[i], arguments);
} // for
}
else {
if (!data_build.setting.build_libraries_static.array[i].used) continue;
- *status = fll_execute_arguments_add(data_build.setting.build_libraries_static.array[i].string, data_build.setting.build_libraries_static.array[i].used, arguments);
+ *status = fll_execute_arguments_add(data_build.setting.build_libraries_static.array[i], arguments);
} // for
}
if (!data_build.setting.flags.array[i].used) continue;
- *status = fll_execute_arguments_add(data_build.setting.flags.array[i].string, data_build.setting.flags.array[i].used, arguments);
+ *status = fll_execute_arguments_add(data_build.setting.flags.array[i], arguments);
} // for
if (is_shared) {
if (!data_build.setting.flags_shared.array[i].used) continue;
- *status = fll_execute_arguments_add(data_build.setting.flags_shared.array[i].string, data_build.setting.flags_shared.array[i].used, arguments);
+ *status = fll_execute_arguments_add(data_build.setting.flags_shared.array[i], arguments);
} // for
}
else {
if (!data_build.setting.flags_static.array[i].used) continue;
- *status = fll_execute_arguments_add(data_build.setting.flags_static.array[i].string, data_build.setting.flags_static.array[i].used, arguments);
+ *status = fll_execute_arguments_add(data_build.setting.flags_static.array[i], arguments);
} // for
}
if (!data_build.setting.flags_library.array[i].used) continue;
- *status = fll_execute_arguments_add(data_build.setting.flags_library.array[i].string, data_build.setting.flags_library.array[i].used, arguments);
+ *status = fll_execute_arguments_add(data_build.setting.flags_library.array[i], arguments);
} // for
if (is_shared) {
if (!data_build.setting.flags_library_shared.array[i].used) continue;
- *status = fll_execute_arguments_add(data_build.setting.flags_library_shared.array[i].string, data_build.setting.flags_library_shared.array[i].used, arguments);
+ *status = fll_execute_arguments_add(data_build.setting.flags_library_shared.array[i], arguments);
} // for
}
else {
if (!data_build.setting.flags_library_static.array[i].used) continue;
- *status = fll_execute_arguments_add(data_build.setting.flags_library_static.array[i].string, data_build.setting.flags_library_static.array[i].used, arguments);
+ *status = fll_execute_arguments_add(data_build.setting.flags_library_static.array[i], arguments);
} // for
}
}
if (!data_build.setting.flags_program.array[i].used) continue;
- *status = fll_execute_arguments_add(data_build.setting.flags_program.array[i].string, data_build.setting.flags_program.array[i].used, arguments);
+ *status = fll_execute_arguments_add(data_build.setting.flags_program.array[i], arguments);
} // for
if (is_shared) {
if (!data_build.setting.flags_program_shared.array[i].used) continue;
- *status = fll_execute_arguments_add(data_build.setting.flags_program_shared.array[i].string, data_build.setting.flags_program_shared.array[i].used, arguments);
+ *status = fll_execute_arguments_add(data_build.setting.flags_program_shared.array[i], arguments);
} // for
}
else {
if (!data_build.setting.flags_program_static.array[i].used) continue;
- *status = fll_execute_arguments_add(data_build.setting.flags_program_static.array[i].string, data_build.setting.flags_program_static.array[i].used, arguments);
+ *status = fll_execute_arguments_add(data_build.setting.flags_program_static.array[i], arguments);
} // for
}
}
if (!data_build.setting.defines.array[i].used) continue;
- *status = fll_execute_arguments_add(data_build.setting.defines.array[i].string, data_build.setting.defines.array[i].used, arguments);
+ *status = fll_execute_arguments_add(data_build.setting.defines.array[i], arguments);
} // for
if (is_shared) {
if (!data_build.setting.defines_shared.array[i].used) continue;
- *status = fll_execute_arguments_add(data_build.setting.defines_shared.array[i].string, data_build.setting.defines_shared.array[i].used, arguments);
+ *status = fll_execute_arguments_add(data_build.setting.defines_shared.array[i], arguments);
} // for
}
else {
if (!data_build.setting.defines_static.array[i].used) continue;
- *status = fll_execute_arguments_add(data_build.setting.defines_static.array[i].string, data_build.setting.defines_static.array[i].used, arguments);
+ *status = fll_execute_arguments_add(data_build.setting.defines_static.array[i], arguments);
} // for
}
if (!data_build.setting.defines_library.array[i].used) continue;
- *status = fll_execute_arguments_add(data_build.setting.defines_library.array[i].string, data_build.setting.defines_library.array[i].used, arguments);
+ *status = fll_execute_arguments_add(data_build.setting.defines_library.array[i], arguments);
} // for
if (is_shared) {
if (!data_build.setting.defines_library_shared.array[i].used) continue;
- *status = fll_execute_arguments_add(data_build.setting.defines_library_shared.array[i].string, data_build.setting.defines_library_shared.array[i].used, arguments);
+ *status = fll_execute_arguments_add(data_build.setting.defines_library_shared.array[i], arguments);
} // for
}
else {
if (!data_build.setting.defines_library_static.array[i].used) continue;
- *status = fll_execute_arguments_add(data_build.setting.defines_library_static.array[i].string, data_build.setting.defines_library_static.array[i].used, arguments);
+ *status = fll_execute_arguments_add(data_build.setting.defines_library_static.array[i], arguments);
} // for
}
}
if (!data_build.setting.defines_program.array[i].used) continue;
- *status = fll_execute_arguments_add(data_build.setting.defines_program.array[i].string, data_build.setting.defines_program.array[i].used, arguments);
+ *status = fll_execute_arguments_add(data_build.setting.defines_program.array[i], arguments);
} // for
if (is_shared) {
if (!data_build.setting.defines_program_shared.array[i].used) continue;
- *status = fll_execute_arguments_add(data_build.setting.defines_program_shared.array[i].string, data_build.setting.defines_program_shared.array[i].used, arguments);
+ *status = fll_execute_arguments_add(data_build.setting.defines_program_shared.array[i], arguments);
} // for
}
else {
if (!data_build.setting.defines_program_static.array[i].used) continue;
- *status = fll_execute_arguments_add(data_build.setting.defines_program_static.array[i].string, data_build.setting.defines_program_static.array[i].used, arguments);
+ *status = fll_execute_arguments_add(data_build.setting.defines_program_static.array[i], arguments);
} // for
}
}
if (!main->define.array[i].used) continue;
- *status = fll_execute_arguments_add(main->define.array[i].string, main->define.array[i].used, arguments);
+ *status = fll_execute_arguments_add(main->define.array[i], arguments);
} // for
}
#endif // _di_fake_build_arguments_standard_add_
if (F_status_is_error(*status)) {
if (main->error.verbosity == f_console_verbosity_verbose_e) {
for (f_array_length_t j = 0; j < failures.used; ++j) {
- fake_print_error_build_operation_file(main, F_status_set_fine(*status), "fl_directory_copy", "copy directory", "to", path_source.string, destination_directory.string, F_true);
+ fake_print_error_build_operation_file(main, F_status_set_fine(*status), "fl_directory_copy", fake_common_file_directory_copy_s, f_file_operation_to_s, path_source, destination_directory, F_true);
} // for
if (F_status_set_fine(*status) != F_failure) {
break;
}
else if (main->error.verbosity != f_console_verbosity_quiet_e) {
- fake_print_error_build_operation_file(main, F_status_set_fine(*status), "fl_directory_copy", "copy directory", "to", path_source.string, destination_directory.string, F_true);
+ fake_print_error_build_operation_file(main, F_status_set_fine(*status), "fl_directory_copy", fake_common_file_directory_copy_s, f_file_operation_to_s, path_source, destination_directory, F_true);
}
break;
*status = f_file_copy(path_source.string, destination_file.string, mode, F_file_default_read_size_d, F_false);
if (F_status_is_error(*status)) {
- fake_print_error_build_operation_file(main, F_status_set_fine(*status), "f_file_copy", "copy", "to", path_source.string, destination_file.string, F_true);
+ fake_print_error_build_operation_file(main, F_status_set_fine(*status), "f_file_copy", F_file_operation_copy_s, f_file_operation_to_s, path_source, destination_file, F_true);
break;
}
}
}
else if (F_status_is_error(*status)) {
- fll_error_file_print(main->error, F_status_set_fine(*status), "f_directory_is", F_true, path_source.string, "create", fll_error_file_type_file_e);
+ fll_error_file_print(main->error, F_status_set_fine(*status), "f_directory_is", F_true, path_source, f_file_operation_create_s, fll_error_file_type_file_e);
break;
}
f_string_dynamics_t arguments = f_string_dynamics_t_initialize;
- *status = fll_execute_arguments_add(fake_other_operation_build_s, fake_other_operation_build_s_length, &arguments);
+ *status = fll_execute_arguments_add(fake_other_operation_build_s, &arguments);
// Ensure console color mode is passed to the scripts so that they can also react to color mode.
if (F_status_is_error_not(*status) && main->context.mode != F_color_mode_none_d) {
- char argument[3] = { f_console_symbol_short_disable_s.string[0], 0, 0 };
+ f_string_static_t argument = f_string_static_t_initialize;
+ argument.used = f_console_symbol_short_disable_s.used + f_console_standard_short_dark_s.used;
+
+ char argument_string[argument.used + 1];
+ argument_string[argument.used] = 0;
+
+ memcpy(argument_string, f_console_symbol_short_disable_s.string, f_console_symbol_short_disable_s.used);
if (main->context.mode == F_color_mode_dark_d) {
- argument[1] = f_console_standard_short_dark_s.string[0];
+ memcpy(argument_string + f_console_symbol_short_disable_s.used, f_console_standard_short_dark_s.string, f_console_standard_short_dark_s.used);
}
else if (main->context.mode == F_color_mode_light_d) {
- argument[1] = f_console_standard_short_light_s.string[0];
+ memcpy(argument_string + f_console_symbol_short_disable_s.used, f_console_standard_short_light_s.string, f_console_standard_short_light_s.used);
}
else if (main->context.mode == F_color_mode_no_color_d) {
- argument[1] = f_console_standard_short_no_color_s.string[0];
+ memcpy(argument_string + f_console_symbol_short_disable_s.used, f_console_standard_short_no_color_s.string, f_console_standard_short_no_color_s.used);
}
- *status = fll_execute_arguments_add(argument, 2, &arguments);
+ *status = fll_execute_arguments_add(argument, &arguments);
}
// Ensure verbosity level is passed to the scripts so that they can also react to requested verbosity.
if (F_status_is_error_not(*status) && main->error.verbosity != f_console_verbosity_normal_e) {
- char argument[3] = { f_console_symbol_short_disable_s.string[0], 0, 0 };
+ f_string_static_t argument = f_string_static_t_initialize;
+ argument.used = f_console_symbol_short_disable_s.used + f_console_standard_short_quiet_s.used;
+
+ char argument_string[argument.used + 1];
+ argument_string[argument.used] = 0;
+
+ memcpy(argument_string, f_console_symbol_short_disable_s.string, f_console_symbol_short_disable_s.used);
- if (main->error.verbosity == f_console_verbosity_quiet_e) {
- argument[1] = f_console_standard_short_quiet_s.string[0];
+ if (main->context.mode == f_console_verbosity_quiet_e) {
+ memcpy(argument_string + f_console_symbol_short_disable_s.used, f_console_standard_short_quiet_s.string, f_console_standard_short_quiet_s.used);
}
- else if (main->error.verbosity == f_console_verbosity_verbose_e) {
- argument[1] = f_console_standard_short_verbose_s.string[0];
+ else if (main->context.mode == f_console_verbosity_verbose_e) {
+ memcpy(argument_string + f_console_symbol_short_disable_s.used, f_console_standard_short_verbose_s.string, f_console_standard_short_verbose_s.used);
}
- else if (main->error.verbosity == f_console_verbosity_debug_e) {
- argument[1] = f_console_standard_short_debug_s.string[0];
+ else if (main->context.mode == f_console_verbosity_debug_e) {
+ memcpy(argument_string + f_console_symbol_short_disable_s.used, f_console_standard_short_debug_s.string, f_console_standard_short_debug_s.used);
}
- *status = fll_execute_arguments_add(argument, 2, &arguments);
+ *status = fll_execute_arguments_add(argument, &arguments);
}
if (F_status_is_error(*status)) {
for (f_array_length_t i = 0; i < main->define.used; ++i) {
*status = f_string_dynamic_mash(f_string_space_s, main->define.array[i], &defines);
-
- if (F_status_is_error(*status)) {
- break;
- }
+ if (F_status_is_error(*status)) break;
} // for
if (F_status_is_error(*status)) {
}
}
- const f_string_t parameters_prefix[] = {
+ const f_string_static_t parameters_prefix[] = {
f_console_symbol_short_enable_s,
f_console_symbol_short_enable_s,
f_console_symbol_short_enable_s,
f_console_symbol_short_enable_s,
};
- const f_array_length_t parameters_prefix_length[] = {
- f_console_symbol_short_enable_s.used,
- f_console_symbol_short_enable_s.used,
- f_console_symbol_short_enable_s.used,
- f_console_symbol_short_enable_s.used,
- f_console_symbol_short_enable_s.used,
- f_console_symbol_short_enable_s.used,
- f_console_symbol_short_enable_s.used,
- };
-
- const f_string_t parameters_name[] = {
+ const f_string_static_t parameters_name[] = {
fake_short_define_s,
fake_short_process_s,
fake_short_settings_s,
fake_short_path_work_s,
};
- const f_array_length_t parameters_name_length[] = {
- fake_short_define_s_length,
- fake_short_process_s_length,
- fake_short_settings_s_length,
- fake_short_path_build_s_length,
- fake_short_path_data_s_length,
- fake_short_path_sources_s_length,
- fake_short_path_work_s_length,
- };
-
- const f_string_t parameters_value[] = {
- defines.string,
- main->process.string,
- main->settings.string,
- main->path_build.string,
- main->path_data.string,
- main->path_sources.string,
- main->path_work.string,
- };
-
- const f_array_length_t parameters_value_length[] = {
- defines.used,
- main->process.used,
- main->settings.used,
- main->path_build.used,
- main->path_data.used,
- main->path_sources.used,
- main->path_work.used,
+ const f_string_static_t parameters_value[] = {
+ defines,
+ main->process,
+ main->settings,
+ main->path_build,
+ main->path_data,
+ main->path_sources,
+ main->path_work,
};
- *status = fll_execute_arguments_add_parameter_set(parameters_prefix, parameters_prefix_length, parameters_name, parameters_name_length, parameters_value, parameters_value_length, 7, &arguments);
+ *status = fll_execute_arguments_add_parameter_set(parameters_prefix, parameters_name, parameters_value, 7, &arguments);
f_string_dynamic_resize(0, &defines);
fl_execute_parameter_t parameter = macro_fl_execute_parameter_t_initialize(FL_execute_parameter_option_path_d, 0, &data_build.environment, &signals, 0);
- *status = fll_execute_program(path.string, arguments, ¶meter, 0, (void *) &return_code);
+ *status = fll_execute_program(path, arguments, ¶meter, 0, (void *) &return_code);
f_string_dynamics_resize(0, &arguments);
path_sources = main->path_sources_cpp;
}
}
- else if (main->parameters[fake_parameter_path_sources_e].result != f_console_result_additional_e) {
+ else if (main->parameters.array[fake_parameter_path_sources_e].result != f_console_result_additional_e) {
path_sources = data_build.setting.path_sources;
}
#endif
#ifndef _di_fake_build_setting_t_
- const f_string_static_t fake_build_setting_name_build_compiler_s = macro_f_string_static_t_initialize2(FAKE_build_setting_name_build_compiler_s, 0, FAKE_build_setting_name_build_compiler_s_length);
- const f_string_static_t fake_build_setting_name_build_language_s = macro_f_string_static_t_initialize2(FAKE_build_setting_name_build_language_s, 0, FAKE_build_setting_name_build_language_s_length);
- const f_string_static_t fake_build_setting_name_build_libraries_s = macro_f_string_static_t_initialize2(FAKE_build_setting_name_build_libraries_s, 0, FAKE_build_setting_name_build_libraries_s_length);
- const f_string_static_t fake_build_setting_name_build_libraries_shared_s = macro_f_string_static_t_initialize2(FAKE_build_setting_name_build_libraries_shared_s, 0, FAKE_build_setting_name_build_libraries_shared_s_length);
- const f_string_static_t fake_build_setting_name_build_libraries_static_s = macro_f_string_static_t_initialize2(FAKE_build_setting_name_build_libraries_static_s, 0, FAKE_build_setting_name_build_libraries_static_s_length);
- const f_string_static_t fake_build_setting_name_build_indexer_s = macro_f_string_static_t_initialize2(FAKE_build_setting_name_build_indexer_s, 0, FAKE_build_setting_name_build_indexer_s_length);
- const f_string_static_t fake_build_setting_name_build_indexer_arguments_s = macro_f_string_static_t_initialize2(FAKE_build_setting_name_build_indexer_arguments_s, 0, FAKE_build_setting_name_build_indexer_arguments_s_length);
- const f_string_static_t fake_build_setting_name_build_script_s = macro_f_string_static_t_initialize2(FAKE_build_setting_name_build_script_s, 0, FAKE_build_setting_name_build_script_s_length);
- const f_string_static_t fake_build_setting_name_build_shared_s = macro_f_string_static_t_initialize2(FAKE_build_setting_name_build_shared_s, 0, FAKE_build_setting_name_build_shared_s_length);
- const f_string_static_t fake_build_setting_name_build_sources_headers_s = macro_f_string_static_t_initialize2(FAKE_build_setting_name_build_sources_headers_s, 0, FAKE_build_setting_name_build_sources_headers_s_length);
- const f_string_static_t fake_build_setting_name_build_sources_headers_shared_s = macro_f_string_static_t_initialize2(FAKE_build_setting_name_build_sources_headers_shared_s, 0, FAKE_build_setting_name_build_sources_headers_shared_s_length);
- const f_string_static_t fake_build_setting_name_build_sources_headers_static_s = macro_f_string_static_t_initialize2(FAKE_build_setting_name_build_sources_headers_static_s, 0, FAKE_build_setting_name_build_sources_headers_static_s_length);
- const f_string_static_t fake_build_setting_name_build_sources_library_s = macro_f_string_static_t_initialize2(FAKE_build_setting_name_build_sources_library_s, 0, FAKE_build_setting_name_build_sources_library_s_length);
- const f_string_static_t fake_build_setting_name_build_sources_library_shared_s = macro_f_string_static_t_initialize2(FAKE_build_setting_name_build_sources_library_shared_s, 0, FAKE_build_setting_name_build_sources_library_shared_s_length);
- const f_string_static_t fake_build_setting_name_build_sources_library_static_s = macro_f_string_static_t_initialize2(FAKE_build_setting_name_build_sources_library_static_s, 0, FAKE_build_setting_name_build_sources_library_static_s_length);
- const f_string_static_t fake_build_setting_name_build_sources_program_s = macro_f_string_static_t_initialize2(FAKE_build_setting_name_build_sources_program_s, 0, FAKE_build_setting_name_build_sources_program_s_length);
- const f_string_static_t fake_build_setting_name_build_sources_program_shared_s = macro_f_string_static_t_initialize2(FAKE_build_setting_name_build_sources_program_shared_s, 0, FAKE_build_setting_name_build_sources_program_shared_s_length);
- const f_string_static_t fake_build_setting_name_build_sources_program_static_s = macro_f_string_static_t_initialize2(FAKE_build_setting_name_build_sources_program_static_s, 0, FAKE_build_setting_name_build_sources_program_static_s_length);
- const f_string_static_t fake_build_setting_name_build_sources_script_s = macro_f_string_static_t_initialize2(FAKE_build_setting_name_build_sources_script_s, 0, FAKE_build_setting_name_build_sources_script_s_length);
- const f_string_static_t fake_build_setting_name_build_sources_settings_s = macro_f_string_static_t_initialize2(FAKE_build_setting_name_build_sources_settings_s, 0, FAKE_build_setting_name_build_sources_settings_s_length);
- const f_string_static_t fake_build_setting_name_build_static_s = macro_f_string_static_t_initialize2(FAKE_build_setting_name_build_static_s, 0, FAKE_build_setting_name_build_static_s_length);
- const f_string_static_t fake_build_setting_name_defines_s = macro_f_string_static_t_initialize2(FAKE_build_setting_name_defines_s, 0, FAKE_build_setting_name_defines_s_length);
- const f_string_static_t fake_build_setting_name_defines_library_s = macro_f_string_static_t_initialize2(FAKE_build_setting_name_defines_library_s, 0, FAKE_build_setting_name_defines_library_s_length);
- const f_string_static_t fake_build_setting_name_defines_library_shared_s = macro_f_string_static_t_initialize2(FAKE_build_setting_name_defines_library_shared_s, 0, FAKE_build_setting_name_defines_library_shared_s_length);
- const f_string_static_t fake_build_setting_name_defines_library_static_s = macro_f_string_static_t_initialize2(FAKE_build_setting_name_defines_library_static_s, 0, FAKE_build_setting_name_defines_library_static_s_length);
- const f_string_static_t fake_build_setting_name_defines_program_s = macro_f_string_static_t_initialize2(FAKE_build_setting_name_defines_program_s, 0, FAKE_build_setting_name_defines_program_s_length);
- const f_string_static_t fake_build_setting_name_defines_program_shared_s = macro_f_string_static_t_initialize2(FAKE_build_setting_name_defines_program_shared_s, 0, FAKE_build_setting_name_defines_program_shared_s_length);
- const f_string_static_t fake_build_setting_name_defines_program_static_s = macro_f_string_static_t_initialize2(FAKE_build_setting_name_defines_program_static_s, 0, FAKE_build_setting_name_defines_program_static_s_length);
- const f_string_static_t fake_build_setting_name_defines_shared_s = macro_f_string_static_t_initialize2(FAKE_build_setting_name_defines_shared_s, 0, FAKE_build_setting_name_defines_shared_s_length);
- const f_string_static_t fake_build_setting_name_defines_static_s = macro_f_string_static_t_initialize2(FAKE_build_setting_name_defines_static_s, 0, FAKE_build_setting_name_defines_static_s_length);
- const f_string_static_t fake_build_setting_name_environment_s = macro_f_string_static_t_initialize2(FAKE_build_setting_name_environment_s, 0, FAKE_build_setting_name_environment_s_length);
- const f_string_static_t fake_build_setting_name_flags_s = macro_f_string_static_t_initialize2(FAKE_build_setting_name_flags_s, 0, FAKE_build_setting_name_flags_s_length);
- const f_string_static_t fake_build_setting_name_flags_library_s = macro_f_string_static_t_initialize2(FAKE_build_setting_name_flags_library_s, 0, FAKE_build_setting_name_flags_library_s_length);
- const f_string_static_t fake_build_setting_name_flags_library_shared_s = macro_f_string_static_t_initialize2(FAKE_build_setting_name_flags_library_shared_s, 0, FAKE_build_setting_name_flags_library_shared_s_length);
- const f_string_static_t fake_build_setting_name_flags_library_static_s = macro_f_string_static_t_initialize2(FAKE_build_setting_name_flags_library_static_s, 0, FAKE_build_setting_name_flags_library_static_s_length);
- const f_string_static_t fake_build_setting_name_flags_program_s = macro_f_string_static_t_initialize2(FAKE_build_setting_name_flags_program_s, 0, FAKE_build_setting_name_flags_program_s_length);
- const f_string_static_t fake_build_setting_name_flags_program_shared_s = macro_f_string_static_t_initialize2(FAKE_build_setting_name_flags_program_shared_s, 0, FAKE_build_setting_name_flags_program_shared_s_length);
- const f_string_static_t fake_build_setting_name_flags_program_static_s = macro_f_string_static_t_initialize2(FAKE_build_setting_name_flags_program_static_s, 0, FAKE_build_setting_name_flags_program_static_s_length);
- const f_string_static_t fake_build_setting_name_flags_shared_s = macro_f_string_static_t_initialize2(FAKE_build_setting_name_flags_shared_s, 0, FAKE_build_setting_name_flags_shared_s_length);
- const f_string_static_t fake_build_setting_name_flags_static_s = macro_f_string_static_t_initialize2(FAKE_build_setting_name_flags_static_s, 0, FAKE_build_setting_name_flags_static_s_length);
- const f_string_static_t fake_build_setting_name_modes_s = macro_f_string_static_t_initialize2(FAKE_build_setting_name_modes_s, 0, FAKE_build_setting_name_modes_s_length);
- const f_string_static_t fake_build_setting_name_modes_default_s = macro_f_string_static_t_initialize2(FAKE_build_setting_name_modes_default_s, 0, FAKE_build_setting_name_modes_default_s_length);
- const f_string_static_t fake_build_setting_name_path_headers_s = macro_f_string_static_t_initialize2(FAKE_build_setting_name_path_headers_s, 0, FAKE_build_setting_name_path_headers_s_length);
- const f_string_static_t fake_build_setting_name_path_headers_preserve_s = macro_f_string_static_t_initialize2(FAKE_build_setting_name_path_headers_preserve_s, 0, FAKE_build_setting_name_path_headers_preserve_s_length);
- const f_string_static_t fake_build_setting_name_path_language_s = macro_f_string_static_t_initialize2(FAKE_build_setting_name_path_language_s, 0, FAKE_build_setting_name_path_language_s_length);
- const f_string_static_t fake_build_setting_name_path_library_script_s = macro_f_string_static_t_initialize2(FAKE_build_setting_name_path_library_script_s, 0, FAKE_build_setting_name_path_library_script_s_length);
- const f_string_static_t fake_build_setting_name_path_library_shared_s = macro_f_string_static_t_initialize2(FAKE_build_setting_name_path_library_shared_s, 0, FAKE_build_setting_name_path_library_shared_s_length);
- const f_string_static_t fake_build_setting_name_path_library_static_s = macro_f_string_static_t_initialize2(FAKE_build_setting_name_path_library_static_s, 0, FAKE_build_setting_name_path_library_static_s_length);
- const f_string_static_t fake_build_setting_name_path_program_script_s = macro_f_string_static_t_initialize2(FAKE_build_setting_name_path_program_script_s, 0, FAKE_build_setting_name_path_program_script_s_length);
- const f_string_static_t fake_build_setting_name_path_program_shared_s = macro_f_string_static_t_initialize2(FAKE_build_setting_name_path_program_shared_s, 0, FAKE_build_setting_name_path_program_shared_s_length);
- const f_string_static_t fake_build_setting_name_path_program_static_s = macro_f_string_static_t_initialize2(FAKE_build_setting_name_path_program_static_s, 0, FAKE_build_setting_name_path_program_static_s_length);
- const f_string_static_t fake_build_setting_name_path_sources_s = macro_f_string_static_t_initialize2(FAKE_build_setting_name_path_sources_s, 0, FAKE_build_setting_name_path_sources_s_length);
- const f_string_static_t fake_build_setting_name_path_standard_s = macro_f_string_static_t_initialize2(FAKE_build_setting_name_path_standard_s, 0, FAKE_build_setting_name_path_standard_s_length);
- const f_string_static_t fake_build_setting_name_process_post_s = macro_f_string_static_t_initialize2(FAKE_build_setting_name_process_post_s, 0, FAKE_build_setting_name_process_post_s_length);
- const f_string_static_t fake_build_setting_name_process_pre_s = macro_f_string_static_t_initialize2(FAKE_build_setting_name_process_pre_s, 0, FAKE_build_setting_name_process_pre_s_length);
- const f_string_static_t fake_build_setting_name_project_name_s = macro_f_string_static_t_initialize2(FAKE_build_setting_name_project_name_s, 0, FAKE_build_setting_name_project_name_s_length);
- const f_string_static_t fake_build_setting_name_search_exclusive_s = macro_f_string_static_t_initialize2(FAKE_build_setting_name_search_exclusive_s, 0, FAKE_build_setting_name_search_exclusive_s_length);
- const f_string_static_t fake_build_setting_name_search_shared_s = macro_f_string_static_t_initialize2(FAKE_build_setting_name_search_shared_s, 0, FAKE_build_setting_name_search_shared_s_length);
- const f_string_static_t fake_build_setting_name_search_static_s = macro_f_string_static_t_initialize2(FAKE_build_setting_name_search_static_s, 0, FAKE_build_setting_name_search_static_s_length);
- const f_string_static_t fake_build_setting_name_version_file_s = macro_f_string_static_t_initialize2(FAKE_build_setting_name_version_file_s, 0, FAKE_build_setting_name_version_file_s_length);
- const f_string_static_t fake_build_setting_name_version_major_s = macro_f_string_static_t_initialize2(FAKE_build_setting_name_version_major_s, 0, FAKE_build_setting_name_version_major_s_length);
- const f_string_static_t fake_build_setting_name_version_major_prefix_s = macro_f_string_static_t_initialize2(FAKE_build_setting_name_version_major_prefix_s, 0, FAKE_build_setting_name_version_major_prefix_s_length);
- const f_string_static_t fake_build_setting_name_version_micro_s = macro_f_string_static_t_initialize2(FAKE_build_setting_name_version_micro_s, 0, FAKE_build_setting_name_version_micro_s_length);
- const f_string_static_t fake_build_setting_name_version_micro_prefix_s = macro_f_string_static_t_initialize2(FAKE_build_setting_name_version_micro_prefix_s, 0, FAKE_build_setting_name_version_micro_prefix_s_length);
- const f_string_static_t fake_build_setting_name_version_minor_s = macro_f_string_static_t_initialize2(FAKE_build_setting_name_version_minor_s, 0, FAKE_build_setting_name_version_minor_s_length);
- const f_string_static_t fake_build_setting_name_version_minor_prefix_s = macro_f_string_static_t_initialize2(FAKE_build_setting_name_version_minor_prefix_s, 0, FAKE_build_setting_name_version_minor_prefix_s_length);
- const f_string_static_t fake_build_setting_name_version_nano_s = macro_f_string_static_t_initialize2(FAKE_build_setting_name_version_nano_s, 0, FAKE_build_setting_name_version_nano_s_length);
- const f_string_static_t fake_build_setting_name_version_nano_prefix_s = macro_f_string_static_t_initialize2(FAKE_build_setting_name_version_nano_prefix_s, 0, FAKE_build_setting_name_version_nano_prefix_s_length);
- const f_string_static_t fake_build_setting_name_version_target_s = macro_f_string_static_t_initialize2(FAKE_build_setting_name_version_target_s, 0, FAKE_build_setting_name_version_target_s_length);
+ const f_string_static_t fake_build_setting_name_build_compiler_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_build_compiler_s, 0, FAKE_build_setting_name_build_compiler_s_length);
+ const f_string_static_t fake_build_setting_name_build_language_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_build_language_s, 0, FAKE_build_setting_name_build_language_s_length);
+ const f_string_static_t fake_build_setting_name_build_libraries_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_build_libraries_s, 0, FAKE_build_setting_name_build_libraries_s_length);
+ const f_string_static_t fake_build_setting_name_build_libraries_shared_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_build_libraries_shared_s, 0, FAKE_build_setting_name_build_libraries_shared_s_length);
+ const f_string_static_t fake_build_setting_name_build_libraries_static_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_build_libraries_static_s, 0, FAKE_build_setting_name_build_libraries_static_s_length);
+ const f_string_static_t fake_build_setting_name_build_indexer_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_build_indexer_s, 0, FAKE_build_setting_name_build_indexer_s_length);
+ const f_string_static_t fake_build_setting_name_build_indexer_arguments_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_build_indexer_arguments_s, 0, FAKE_build_setting_name_build_indexer_arguments_s_length);
+ const f_string_static_t fake_build_setting_name_build_script_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_build_script_s, 0, FAKE_build_setting_name_build_script_s_length);
+ const f_string_static_t fake_build_setting_name_build_shared_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_build_shared_s, 0, FAKE_build_setting_name_build_shared_s_length);
+ const f_string_static_t fake_build_setting_name_build_sources_headers_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_build_sources_headers_s, 0, FAKE_build_setting_name_build_sources_headers_s_length);
+ const f_string_static_t fake_build_setting_name_build_sources_headers_shared_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_build_sources_headers_shared_s, 0, FAKE_build_setting_name_build_sources_headers_shared_s_length);
+ const f_string_static_t fake_build_setting_name_build_sources_headers_static_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_build_sources_headers_static_s, 0, FAKE_build_setting_name_build_sources_headers_static_s_length);
+ const f_string_static_t fake_build_setting_name_build_sources_library_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_build_sources_library_s, 0, FAKE_build_setting_name_build_sources_library_s_length);
+ const f_string_static_t fake_build_setting_name_build_sources_library_shared_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_build_sources_library_shared_s, 0, FAKE_build_setting_name_build_sources_library_shared_s_length);
+ const f_string_static_t fake_build_setting_name_build_sources_library_static_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_build_sources_library_static_s, 0, FAKE_build_setting_name_build_sources_library_static_s_length);
+ const f_string_static_t fake_build_setting_name_build_sources_program_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_build_sources_program_s, 0, FAKE_build_setting_name_build_sources_program_s_length);
+ const f_string_static_t fake_build_setting_name_build_sources_program_shared_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_build_sources_program_shared_s, 0, FAKE_build_setting_name_build_sources_program_shared_s_length);
+ const f_string_static_t fake_build_setting_name_build_sources_program_static_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_build_sources_program_static_s, 0, FAKE_build_setting_name_build_sources_program_static_s_length);
+ const f_string_static_t fake_build_setting_name_build_sources_script_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_build_sources_script_s, 0, FAKE_build_setting_name_build_sources_script_s_length);
+ const f_string_static_t fake_build_setting_name_build_sources_settings_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_build_sources_settings_s, 0, FAKE_build_setting_name_build_sources_settings_s_length);
+ const f_string_static_t fake_build_setting_name_build_static_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_build_static_s, 0, FAKE_build_setting_name_build_static_s_length);
+ const f_string_static_t fake_build_setting_name_defines_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_defines_s, 0, FAKE_build_setting_name_defines_s_length);
+ const f_string_static_t fake_build_setting_name_defines_library_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_defines_library_s, 0, FAKE_build_setting_name_defines_library_s_length);
+ const f_string_static_t fake_build_setting_name_defines_library_shared_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_defines_library_shared_s, 0, FAKE_build_setting_name_defines_library_shared_s_length);
+ const f_string_static_t fake_build_setting_name_defines_library_static_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_defines_library_static_s, 0, FAKE_build_setting_name_defines_library_static_s_length);
+ const f_string_static_t fake_build_setting_name_defines_program_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_defines_program_s, 0, FAKE_build_setting_name_defines_program_s_length);
+ const f_string_static_t fake_build_setting_name_defines_program_shared_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_defines_program_shared_s, 0, FAKE_build_setting_name_defines_program_shared_s_length);
+ const f_string_static_t fake_build_setting_name_defines_program_static_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_defines_program_static_s, 0, FAKE_build_setting_name_defines_program_static_s_length);
+ const f_string_static_t fake_build_setting_name_defines_shared_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_defines_shared_s, 0, FAKE_build_setting_name_defines_shared_s_length);
+ const f_string_static_t fake_build_setting_name_defines_static_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_defines_static_s, 0, FAKE_build_setting_name_defines_static_s_length);
+ const f_string_static_t fake_build_setting_name_environment_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_environment_s, 0, FAKE_build_setting_name_environment_s_length);
+ const f_string_static_t fake_build_setting_name_flags_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_flags_s, 0, FAKE_build_setting_name_flags_s_length);
+ const f_string_static_t fake_build_setting_name_flags_library_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_flags_library_s, 0, FAKE_build_setting_name_flags_library_s_length);
+ const f_string_static_t fake_build_setting_name_flags_library_shared_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_flags_library_shared_s, 0, FAKE_build_setting_name_flags_library_shared_s_length);
+ const f_string_static_t fake_build_setting_name_flags_library_static_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_flags_library_static_s, 0, FAKE_build_setting_name_flags_library_static_s_length);
+ const f_string_static_t fake_build_setting_name_flags_program_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_flags_program_s, 0, FAKE_build_setting_name_flags_program_s_length);
+ const f_string_static_t fake_build_setting_name_flags_program_shared_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_flags_program_shared_s, 0, FAKE_build_setting_name_flags_program_shared_s_length);
+ const f_string_static_t fake_build_setting_name_flags_program_static_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_flags_program_static_s, 0, FAKE_build_setting_name_flags_program_static_s_length);
+ const f_string_static_t fake_build_setting_name_flags_shared_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_flags_shared_s, 0, FAKE_build_setting_name_flags_shared_s_length);
+ const f_string_static_t fake_build_setting_name_flags_static_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_flags_static_s, 0, FAKE_build_setting_name_flags_static_s_length);
+ const f_string_static_t fake_build_setting_name_modes_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_modes_s, 0, FAKE_build_setting_name_modes_s_length);
+ const f_string_static_t fake_build_setting_name_modes_default_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_modes_default_s, 0, FAKE_build_setting_name_modes_default_s_length);
+ const f_string_static_t fake_build_setting_name_path_headers_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_path_headers_s, 0, FAKE_build_setting_name_path_headers_s_length);
+ const f_string_static_t fake_build_setting_name_path_headers_preserve_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_path_headers_preserve_s, 0, FAKE_build_setting_name_path_headers_preserve_s_length);
+ const f_string_static_t fake_build_setting_name_path_language_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_path_language_s, 0, FAKE_build_setting_name_path_language_s_length);
+ const f_string_static_t fake_build_setting_name_path_library_script_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_path_library_script_s, 0, FAKE_build_setting_name_path_library_script_s_length);
+ const f_string_static_t fake_build_setting_name_path_library_shared_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_path_library_shared_s, 0, FAKE_build_setting_name_path_library_shared_s_length);
+ const f_string_static_t fake_build_setting_name_path_library_static_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_path_library_static_s, 0, FAKE_build_setting_name_path_library_static_s_length);
+ const f_string_static_t fake_build_setting_name_path_program_script_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_path_program_script_s, 0, FAKE_build_setting_name_path_program_script_s_length);
+ const f_string_static_t fake_build_setting_name_path_program_shared_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_path_program_shared_s, 0, FAKE_build_setting_name_path_program_shared_s_length);
+ const f_string_static_t fake_build_setting_name_path_program_static_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_path_program_static_s, 0, FAKE_build_setting_name_path_program_static_s_length);
+ const f_string_static_t fake_build_setting_name_path_sources_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_path_sources_s, 0, FAKE_build_setting_name_path_sources_s_length);
+ const f_string_static_t fake_build_setting_name_path_standard_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_path_standard_s, 0, FAKE_build_setting_name_path_standard_s_length);
+ const f_string_static_t fake_build_setting_name_process_post_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_process_post_s, 0, FAKE_build_setting_name_process_post_s_length);
+ const f_string_static_t fake_build_setting_name_process_pre_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_process_pre_s, 0, FAKE_build_setting_name_process_pre_s_length);
+ const f_string_static_t fake_build_setting_name_project_name_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_project_name_s, 0, FAKE_build_setting_name_project_name_s_length);
+ const f_string_static_t fake_build_setting_name_search_exclusive_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_search_exclusive_s, 0, FAKE_build_setting_name_search_exclusive_s_length);
+ const f_string_static_t fake_build_setting_name_search_shared_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_search_shared_s, 0, FAKE_build_setting_name_search_shared_s_length);
+ const f_string_static_t fake_build_setting_name_search_static_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_search_static_s, 0, FAKE_build_setting_name_search_static_s_length);
+ const f_string_static_t fake_build_setting_name_version_file_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_version_file_s, 0, FAKE_build_setting_name_version_file_s_length);
+ const f_string_static_t fake_build_setting_name_version_major_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_version_major_s, 0, FAKE_build_setting_name_version_major_s_length);
+ const f_string_static_t fake_build_setting_name_version_major_prefix_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_version_major_prefix_s, 0, FAKE_build_setting_name_version_major_prefix_s_length);
+ const f_string_static_t fake_build_setting_name_version_micro_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_version_micro_s, 0, FAKE_build_setting_name_version_micro_s_length);
+ const f_string_static_t fake_build_setting_name_version_micro_prefix_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_version_micro_prefix_s, 0, FAKE_build_setting_name_version_micro_prefix_s_length);
+ const f_string_static_t fake_build_setting_name_version_minor_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_version_minor_s, 0, FAKE_build_setting_name_version_minor_s_length);
+ const f_string_static_t fake_build_setting_name_version_minor_prefix_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_version_minor_prefix_s, 0, FAKE_build_setting_name_version_minor_prefix_s_length);
+ const f_string_static_t fake_build_setting_name_version_nano_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_version_nano_s, 0, FAKE_build_setting_name_version_nano_s_length);
+ const f_string_static_t fake_build_setting_name_version_nano_prefix_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_version_nano_prefix_s, 0, FAKE_build_setting_name_version_nano_prefix_s_length);
+ const f_string_static_t fake_build_setting_name_version_target_s = macro_f_string_static_t_initialize(FAKE_build_setting_name_version_target_s, 0, FAKE_build_setting_name_version_target_s_length);
- const f_string_static_t fake_build_setting_default_version_s = macro_f_string_static_t_initialize2(FAKE_build_setting_default_version_s, 0, FAKE_build_setting_default_version_s_length);
- const f_string_static_t fake_build_setting_default_version_prefix_s = macro_f_string_static_t_initialize2(FAKE_build_setting_default_version_prefix_s, 0, FAKE_build_setting_default_version_prefix_s_length);
+ const f_string_static_t fake_build_setting_default_version_s = macro_f_string_static_t_initialize(FAKE_build_setting_default_version_s, 0, FAKE_build_setting_default_version_s_length);
+ const f_string_static_t fake_build_setting_default_version_prefix_s = macro_f_string_static_t_initialize(FAKE_build_setting_default_version_prefix_s, 0, FAKE_build_setting_default_version_prefix_s_length);
#endif // _di_fake_build_setting_t_
#ifndef _di_fake_build_stage_t_
- const f_string_static_t fake_build_stage_built_s = macro_f_string_static_t_initialize2(FAKE_build_stage_built_s, 0, FAKE_build_stage_built_s_length);
- const f_string_static_t fake_build_stage_libraries_script_s = macro_f_string_static_t_initialize2(FAKE_build_stage_libraries_script_s, 0, FAKE_build_stage_libraries_script_s_length);
- const f_string_static_t fake_build_stage_libraries_shared_s = macro_f_string_static_t_initialize2(FAKE_build_stage_libraries_shared_s, 0, FAKE_build_stage_libraries_shared_s_length);
- const f_string_static_t fake_build_stage_libraries_static_s = macro_f_string_static_t_initialize2(FAKE_build_stage_libraries_static_s, 0, FAKE_build_stage_libraries_static_s_length);
- const f_string_static_t fake_build_stage_objects_static_s = macro_f_string_static_t_initialize2(FAKE_build_stage_objects_static_s, 0, FAKE_build_stage_objects_static_s_length);
- const f_string_static_t fake_build_stage_process_post_s = macro_f_string_static_t_initialize2(FAKE_build_stage_process_post_s, 0, FAKE_build_stage_process_post_s_length);
- const f_string_static_t fake_build_stage_process_pre_s = macro_f_string_static_t_initialize2(FAKE_build_stage_process_pre_s, 0, FAKE_build_stage_process_pre_s_length);
- const f_string_static_t fake_build_stage_programs_script_s = macro_f_string_static_t_initialize2(FAKE_build_stage_programs_script_s, 0, FAKE_build_stage_programs_script_s_length);
- const f_string_static_t fake_build_stage_programs_shared_s = macro_f_string_static_t_initialize2(FAKE_build_stage_programs_shared_s, 0, FAKE_build_stage_programs_shared_s_length);
- const f_string_static_t fake_build_stage_programs_static_s = macro_f_string_static_t_initialize2(FAKE_build_stage_programs_static_s, 0, FAKE_build_stage_programs_static_s_length);
- const f_string_static_t fake_build_stage_separate_s = macro_f_string_static_t_initialize2(FAKE_build_stage_separate_s, 0, FAKE_build_stage_separate_s_length);
- const f_string_static_t fake_build_stage_skeleton_s = macro_f_string_static_t_initialize2(FAKE_build_stage_skeleton_s, 0, FAKE_build_stage_skeleton_s_length);
- const f_string_static_t fake_build_stage_sources_headers_s = macro_f_string_static_t_initialize2(FAKE_build_stage_sources_headers_s, 0, FAKE_build_stage_sources_headers_s_length);
- const f_string_static_t fake_build_stage_sources_script_s = macro_f_string_static_t_initialize2(FAKE_build_stage_sources_script_s, 0, FAKE_build_stage_sources_script_s_length);
- const f_string_static_t fake_build_stage_sources_settings_s = macro_f_string_static_t_initialize2(FAKE_build_stage_sources_settings_s, 0, FAKE_build_stage_sources_settings_s_length);
+ const f_string_static_t fake_build_stage_built_s = macro_f_string_static_t_initialize(FAKE_build_stage_built_s, 0, FAKE_build_stage_built_s_length);
+ const f_string_static_t fake_build_stage_libraries_script_s = macro_f_string_static_t_initialize(FAKE_build_stage_libraries_script_s, 0, FAKE_build_stage_libraries_script_s_length);
+ const f_string_static_t fake_build_stage_libraries_shared_s = macro_f_string_static_t_initialize(FAKE_build_stage_libraries_shared_s, 0, FAKE_build_stage_libraries_shared_s_length);
+ const f_string_static_t fake_build_stage_libraries_static_s = macro_f_string_static_t_initialize(FAKE_build_stage_libraries_static_s, 0, FAKE_build_stage_libraries_static_s_length);
+ const f_string_static_t fake_build_stage_objects_static_s = macro_f_string_static_t_initialize(FAKE_build_stage_objects_static_s, 0, FAKE_build_stage_objects_static_s_length);
+ const f_string_static_t fake_build_stage_process_post_s = macro_f_string_static_t_initialize(FAKE_build_stage_process_post_s, 0, FAKE_build_stage_process_post_s_length);
+ const f_string_static_t fake_build_stage_process_pre_s = macro_f_string_static_t_initialize(FAKE_build_stage_process_pre_s, 0, FAKE_build_stage_process_pre_s_length);
+ const f_string_static_t fake_build_stage_programs_script_s = macro_f_string_static_t_initialize(FAKE_build_stage_programs_script_s, 0, FAKE_build_stage_programs_script_s_length);
+ const f_string_static_t fake_build_stage_programs_shared_s = macro_f_string_static_t_initialize(FAKE_build_stage_programs_shared_s, 0, FAKE_build_stage_programs_shared_s_length);
+ const f_string_static_t fake_build_stage_programs_static_s = macro_f_string_static_t_initialize(FAKE_build_stage_programs_static_s, 0, FAKE_build_stage_programs_static_s_length);
+ const f_string_static_t fake_build_stage_separate_s = macro_f_string_static_t_initialize(FAKE_build_stage_separate_s, 0, FAKE_build_stage_separate_s_length);
+ const f_string_static_t fake_build_stage_skeleton_s = macro_f_string_static_t_initialize(FAKE_build_stage_skeleton_s, 0, FAKE_build_stage_skeleton_s_length);
+ const f_string_static_t fake_build_stage_sources_headers_s = macro_f_string_static_t_initialize(FAKE_build_stage_sources_headers_s, 0, FAKE_build_stage_sources_headers_s_length);
+ const f_string_static_t fake_build_stage_sources_script_s = macro_f_string_static_t_initialize(FAKE_build_stage_sources_script_s, 0, FAKE_build_stage_sources_script_s_length);
+ const f_string_static_t fake_build_stage_sources_settings_s = macro_f_string_static_t_initialize(FAKE_build_stage_sources_settings_s, 0, FAKE_build_stage_sources_settings_s_length);
#endif // _di_fake_build_stage_t_
#ifndef _di_fake_build_parameter_
- const f_string_static_t fake_build_parameter_library_include_s = macro_f_string_static_t_initialize2(FAKE_build_parameter_library_include_s, 0, FAKE_build_parameter_library_include_s_length);
- const f_string_static_t fake_build_parameter_library_link_file_s = macro_f_string_static_t_initialize2(FAKE_build_parameter_library_link_file_s, 0, FAKE_build_parameter_library_link_file_s_length);
- const f_string_static_t fake_build_parameter_library_link_path_s = macro_f_string_static_t_initialize2(FAKE_build_parameter_library_link_path_s, 0, FAKE_build_parameter_library_link_path_s_length);
- const f_string_static_t fake_build_parameter_library_name_prefix_s = macro_f_string_static_t_initialize2(FAKE_build_parameter_library_name_prefix_s, 0, FAKE_build_parameter_library_name_prefix_s_length);
- const f_string_static_t fake_build_parameter_library_name_suffix_shared_s = macro_f_string_static_t_initialize2(FAKE_build_parameter_library_name_suffix_shared_s, 0, FAKE_build_parameter_library_name_suffix_shared_s_length);
- const f_string_static_t fake_build_parameter_library_name_suffix_static_s = macro_f_string_static_t_initialize2(FAKE_build_parameter_library_name_suffix_static_s, 0, FAKE_build_parameter_library_name_suffix_static_s_length);
- const f_string_static_t fake_build_parameter_library_output_s = macro_f_string_static_t_initialize2(FAKE_build_parameter_library_output_s, 0, FAKE_build_parameter_library_output_s_length);
- const f_string_static_t fake_build_parameter_library_shared_s = macro_f_string_static_t_initialize2(FAKE_build_parameter_library_shared_s, 0, FAKE_build_parameter_library_shared_s_length);
- const f_string_static_t fake_build_parameter_library_static_s = macro_f_string_static_t_initialize2(FAKE_build_parameter_library_static_s, 0, FAKE_build_parameter_library_static_s_length);
- const f_string_static_t fake_build_parameter_library_shared_prefix_s = macro_f_string_static_t_initialize2(FAKE_build_parameter_library_shared_prefix_s, 0, FAKE_build_parameter_library_shared_prefix_s_length);
+ const f_string_static_t fake_build_parameter_library_include_s = macro_f_string_static_t_initialize(FAKE_build_parameter_library_include_s, 0, FAKE_build_parameter_library_include_s_length);
+ const f_string_static_t fake_build_parameter_library_link_file_s = macro_f_string_static_t_initialize(FAKE_build_parameter_library_link_file_s, 0, FAKE_build_parameter_library_link_file_s_length);
+ const f_string_static_t fake_build_parameter_library_link_path_s = macro_f_string_static_t_initialize(FAKE_build_parameter_library_link_path_s, 0, FAKE_build_parameter_library_link_path_s_length);
+ const f_string_static_t fake_build_parameter_library_name_prefix_s = macro_f_string_static_t_initialize(FAKE_build_parameter_library_name_prefix_s, 0, FAKE_build_parameter_library_name_prefix_s_length);
+ const f_string_static_t fake_build_parameter_library_name_suffix_shared_s = macro_f_string_static_t_initialize(FAKE_build_parameter_library_name_suffix_shared_s, 0, FAKE_build_parameter_library_name_suffix_shared_s_length);
+ const f_string_static_t fake_build_parameter_library_name_suffix_static_s = macro_f_string_static_t_initialize(FAKE_build_parameter_library_name_suffix_static_s, 0, FAKE_build_parameter_library_name_suffix_static_s_length);
+ const f_string_static_t fake_build_parameter_library_output_s = macro_f_string_static_t_initialize(FAKE_build_parameter_library_output_s, 0, FAKE_build_parameter_library_output_s_length);
+ const f_string_static_t fake_build_parameter_library_shared_s = macro_f_string_static_t_initialize(FAKE_build_parameter_library_shared_s, 0, FAKE_build_parameter_library_shared_s_length);
+ const f_string_static_t fake_build_parameter_library_static_s = macro_f_string_static_t_initialize(FAKE_build_parameter_library_static_s, 0, FAKE_build_parameter_library_static_s_length);
+ const f_string_static_t fake_build_parameter_library_shared_prefix_s = macro_f_string_static_t_initialize(FAKE_build_parameter_library_shared_prefix_s, 0, FAKE_build_parameter_library_shared_prefix_s_length);
- const f_string_static_t fake_build_parameter_object_compile_s = macro_f_string_static_t_initialize2(FAKE_build_parameter_object_compile_s, 0, FAKE_build_parameter_object_compile_s_length);
- const f_string_static_t fake_build_parameter_object_name_suffix_s = macro_f_string_static_t_initialize2(FAKE_build_parameter_object_name_suffix_s, 0, FAKE_build_parameter_object_name_suffix_s_length);
- const f_string_static_t fake_build_parameter_object_output_s = macro_f_string_static_t_initialize2(FAKE_build_parameter_object_output_s, 0, FAKE_build_parameter_object_output_s_length);
- const f_string_static_t fake_build_parameter_object_static_s = macro_f_string_static_t_initialize2(FAKE_build_parameter_object_static_s, 0, FAKE_build_parameter_object_static_s_length);
+ const f_string_static_t fake_build_parameter_object_compile_s = macro_f_string_static_t_initialize(FAKE_build_parameter_object_compile_s, 0, FAKE_build_parameter_object_compile_s_length);
+ const f_string_static_t fake_build_parameter_object_name_suffix_s = macro_f_string_static_t_initialize(FAKE_build_parameter_object_name_suffix_s, 0, FAKE_build_parameter_object_name_suffix_s_length);
+ const f_string_static_t fake_build_parameter_object_output_s = macro_f_string_static_t_initialize(FAKE_build_parameter_object_output_s, 0, FAKE_build_parameter_object_output_s_length);
+ const f_string_static_t fake_build_parameter_object_static_s = macro_f_string_static_t_initialize(FAKE_build_parameter_object_static_s, 0, FAKE_build_parameter_object_static_s_length);
#endif // _di_fake_build_parameter_
#ifndef _di_fake_common_
- const f_string_static_t fake_common_setting_bool_yes_s = macro_f_string_static_t_initialize2(FAKE_common_setting_bool_yes_s, 0, FAKE_common_setting_bool_yes_s_length);
- const f_string_static_t fake_common_setting_bool_no_s = macro_f_string_static_t_initialize2(FAKE_common_setting_bool_no_s, 0, FAKE_common_setting_bool_no_s_length);
- const f_string_static_t fake_common_setting_list_s = macro_f_string_static_t_initialize2(FAKE_common_setting_list_s, 0, FAKE_common_setting_list_s_length);
+ const f_string_static_t fake_common_file_directory_copy_s = macro_f_string_static_t_initialize(FAKE_common_file_directory_copy_s, 0, FAKE_common_file_directory_copy_s_length);
+ const f_string_static_t fake_common_file_path_change_to_s = macro_f_string_static_t_initialize(FAKE_common_file_path_change_to_s, 0, FAKE_common_file_path_change_to_s_length);
+ const f_string_static_t fake_common_file_path_determine_real_s = macro_f_string_static_t_initialize(FAKE_common_file_path_determine_real_s, 0, FAKE_common_file_path_determine_real_s_length);
+ const f_string_static_t fake_common_file_path_stack_s = macro_f_string_static_t_initialize(FAKE_common_file_path_stack_s, 0, FAKE_common_file_path_stack_s_length);
+ const f_string_static_t fake_common_file_populate_pre_s = macro_f_string_static_t_initialize(FAKE_common_file_populate_pre_s, 0, FAKE_common_file_populate_pre_s_length);
+
+ const f_string_static_t fake_common_setting_bool_yes_s = macro_f_string_static_t_initialize(FAKE_common_setting_bool_yes_s, 0, FAKE_common_setting_bool_yes_s_length);
+ const f_string_static_t fake_common_setting_bool_no_s = macro_f_string_static_t_initialize(FAKE_common_setting_bool_no_s, 0, FAKE_common_setting_bool_no_s_length);
+
+ const f_string_static_t fake_common_setting_list_s = macro_f_string_static_t_initialize(FAKE_common_setting_list_s, 0, FAKE_common_setting_list_s_length);
#endif // _di_fake_common_
#ifndef _di_fake_make_section_
- const f_string_static_t fake_make_section_main_s = macro_f_string_static_t_initialize2(FAKE_make_section_main_s, 0, FAKE_make_section_main_s_length);
- const f_string_static_t fake_make_section_settings_s = macro_f_string_static_t_initialize2(FAKE_make_section_settings_s, 0, FAKE_make_section_settings_s_length);
+ const f_string_static_t fake_make_section_main_s = macro_f_string_static_t_initialize(FAKE_make_section_main_s, 0, FAKE_make_section_main_s_length);
+ const f_string_static_t fake_make_section_settings_s = macro_f_string_static_t_initialize(FAKE_make_section_settings_s, 0, FAKE_make_section_settings_s_length);
#endif // _di_fake_make_section_
#ifndef _di_fake_make_setting_t_
- const f_string_static_t fake_make_setting_compiler_s = macro_f_string_static_t_initialize2(FAKE_make_setting_compiler_s, 0, FAKE_make_setting_compiler_s_length);
- const f_string_static_t fake_make_setting_define_s = macro_f_string_static_t_initialize2(FAKE_make_setting_define_s, 0, FAKE_make_setting_define_s_length);
- const f_string_static_t fake_make_setting_environment_s = macro_f_string_static_t_initialize2(FAKE_make_setting_environment_s, 0, FAKE_make_setting_environment_s_length);
- const f_string_static_t fake_make_setting_fail_s = macro_f_string_static_t_initialize2(FAKE_make_setting_fail_s, 0, FAKE_make_setting_fail_s_length);
- const f_string_static_t fake_make_setting_indexer_s = macro_f_string_static_t_initialize2(FAKE_make_setting_indexer_s, 0, FAKE_make_setting_indexer_s_length);
- const f_string_static_t fake_make_setting_indexer_arguments_s = macro_f_string_static_t_initialize2(FAKE_make_setting_indexer_arguments_s, 0, FAKE_make_setting_indexer_arguments_s_length);
- const f_string_static_t fake_make_setting_load_build_s = macro_f_string_static_t_initialize2(FAKE_make_setting_load_build_s, 0, FAKE_make_setting_load_build_s_length);
- const f_string_static_t fake_make_setting_parameter_s = macro_f_string_static_t_initialize2(FAKE_make_setting_parameter_s, 0, FAKE_make_setting_parameter_s_length);
- const f_string_static_t fake_make_setting_return_s = macro_f_string_static_t_initialize2(FAKE_make_setting_return_s, 0, FAKE_make_setting_return_s_length);
+ const f_string_static_t fake_make_setting_compiler_s = macro_f_string_static_t_initialize(FAKE_make_setting_compiler_s, 0, FAKE_make_setting_compiler_s_length);
+ const f_string_static_t fake_make_setting_define_s = macro_f_string_static_t_initialize(FAKE_make_setting_define_s, 0, FAKE_make_setting_define_s_length);
+ const f_string_static_t fake_make_setting_environment_s = macro_f_string_static_t_initialize(FAKE_make_setting_environment_s, 0, FAKE_make_setting_environment_s_length);
+ const f_string_static_t fake_make_setting_fail_s = macro_f_string_static_t_initialize(FAKE_make_setting_fail_s, 0, FAKE_make_setting_fail_s_length);
+ const f_string_static_t fake_make_setting_indexer_s = macro_f_string_static_t_initialize(FAKE_make_setting_indexer_s, 0, FAKE_make_setting_indexer_s_length);
+ const f_string_static_t fake_make_setting_indexer_arguments_s = macro_f_string_static_t_initialize(FAKE_make_setting_indexer_arguments_s, 0, FAKE_make_setting_indexer_arguments_s_length);
+ const f_string_static_t fake_make_setting_load_build_s = macro_f_string_static_t_initialize(FAKE_make_setting_load_build_s, 0, FAKE_make_setting_load_build_s_length);
+ const f_string_static_t fake_make_setting_parameter_s = macro_f_string_static_t_initialize(FAKE_make_setting_parameter_s, 0, FAKE_make_setting_parameter_s_length);
+ const f_string_static_t fake_make_setting_return_s = macro_f_string_static_t_initialize(FAKE_make_setting_return_s, 0, FAKE_make_setting_return_s_length);
#endif // _di_fake_make_setting_t_
#ifndef _di_fake_make_operation_
- const f_string_static_t fake_make_operation_and_s = macro_f_string_static_t_initialize2(FAKE_make_operation_and_s, 0, FAKE_make_operation_and_s_length);
- const f_string_static_t fake_make_operation_break_s = macro_f_string_static_t_initialize2(FAKE_make_operation_break_s, 0, FAKE_make_operation_break_s_length);
- const f_string_static_t fake_make_operation_build_s = macro_f_string_static_t_initialize2(FAKE_make_operation_build_s, 0, FAKE_make_operation_build_s_length);
- const f_string_static_t fake_make_operation_clean_s = macro_f_string_static_t_initialize2(FAKE_make_operation_clean_s, 0, FAKE_make_operation_clean_s_length);
- const f_string_static_t fake_make_operation_clone_s = macro_f_string_static_t_initialize2(FAKE_make_operation_clone_s, 0, FAKE_make_operation_clone_s_length);
- const f_string_static_t fake_make_operation_compile_s = macro_f_string_static_t_initialize2(FAKE_make_operation_compile_s, 0, FAKE_make_operation_compile_s_length);
- const f_string_static_t fake_make_operation_copy_s = macro_f_string_static_t_initialize2(FAKE_make_operation_copy_s, 0, FAKE_make_operation_copy_s_length);
- const f_string_static_t fake_make_operation_define_s = macro_f_string_static_t_initialize2(FAKE_make_operation_define_s, 0, FAKE_make_operation_define_s_length);
- const f_string_static_t fake_make_operation_delete_s = macro_f_string_static_t_initialize2(FAKE_make_operation_delete_s, 0, FAKE_make_operation_delete_s_length);
- const f_string_static_t fake_make_operation_deletes_s = macro_f_string_static_t_initialize2(FAKE_make_operation_deletes_s, 0, FAKE_make_operation_deletes_s_length);
- const f_string_static_t fake_make_operation_else_s = macro_f_string_static_t_initialize2(FAKE_make_operation_else_s, 0, FAKE_make_operation_else_s_length);
- const f_string_static_t fake_make_operation_exit_s = macro_f_string_static_t_initialize2(FAKE_make_operation_exit_s, 0, FAKE_make_operation_exit_s_length);
- const f_string_static_t fake_make_operation_fail_s = macro_f_string_static_t_initialize2(FAKE_make_operation_fail_s, 0, FAKE_make_operation_fail_s_length);
- const f_string_static_t fake_make_operation_group_s = macro_f_string_static_t_initialize2(FAKE_make_operation_group_s, 0, FAKE_make_operation_group_s_length);
- const f_string_static_t fake_make_operation_groups_s = macro_f_string_static_t_initialize2(FAKE_make_operation_groups_s, 0, FAKE_make_operation_groups_s_length);
- const f_string_static_t fake_make_operation_if_s = macro_f_string_static_t_initialize2(FAKE_make_operation_if_s, 0, FAKE_make_operation_if_s_length);
- const f_string_static_t fake_make_operation_index_s = macro_f_string_static_t_initialize2(FAKE_make_operation_index_s, 0, FAKE_make_operation_index_s_length);
- const f_string_static_t fake_make_operation_link_s = macro_f_string_static_t_initialize2(FAKE_make_operation_link_s, 0, FAKE_make_operation_link_s_length);
- const f_string_static_t fake_make_operation_mode_s = macro_f_string_static_t_initialize2(FAKE_make_operation_mode_s, 0, FAKE_make_operation_mode_s_length);
- const f_string_static_t fake_make_operation_modes_s = macro_f_string_static_t_initialize2(FAKE_make_operation_modes_s, 0, FAKE_make_operation_modes_s_length);
- const f_string_static_t fake_make_operation_move_s = macro_f_string_static_t_initialize2(FAKE_make_operation_move_s, 0, FAKE_make_operation_move_s_length);
- const f_string_static_t fake_make_operation_operate_s = macro_f_string_static_t_initialize2(FAKE_make_operation_operate_s, 0, FAKE_make_operation_operate_s_length);
- const f_string_static_t fake_make_operation_or_s = macro_f_string_static_t_initialize2(FAKE_make_operation_or_s, 0, FAKE_make_operation_or_s_length);
- const f_string_static_t fake_make_operation_owner_s = macro_f_string_static_t_initialize2(FAKE_make_operation_owner_s, 0, FAKE_make_operation_owner_s_length);
- const f_string_static_t fake_make_operation_owners_s = macro_f_string_static_t_initialize2(FAKE_make_operation_owners_s, 0, FAKE_make_operation_owners_s_length);
- const f_string_static_t fake_make_operation_parameter_s = macro_f_string_static_t_initialize2(FAKE_make_operation_parameter_s, 0, FAKE_make_operation_parameter_s_length);
- const f_string_static_t fake_make_operation_pop_s = macro_f_string_static_t_initialize2(FAKE_make_operation_pop_s, 0, FAKE_make_operation_pop_s_length);
- const f_string_static_t fake_make_operation_print_s = macro_f_string_static_t_initialize2(FAKE_make_operation_print_s, 0, FAKE_make_operation_print_s_length);
- const f_string_static_t fake_make_operation_run_s = macro_f_string_static_t_initialize2(FAKE_make_operation_run_s, 0, FAKE_make_operation_run_s_length);
- const f_string_static_t fake_make_operation_shell_s = macro_f_string_static_t_initialize2(FAKE_make_operation_shell_s, 0, FAKE_make_operation_shell_s_length);
- const f_string_static_t fake_make_operation_skeleton_s = macro_f_string_static_t_initialize2(FAKE_make_operation_skeleton_s, 0, FAKE_make_operation_skeleton_s_length);
- const f_string_static_t fake_make_operation_to_s = macro_f_string_static_t_initialize2(FAKE_make_operation_to_s, 0, FAKE_make_operation_to_s_length);
- const f_string_static_t fake_make_operation_top_s = macro_f_string_static_t_initialize2(FAKE_make_operation_top_s, 0, FAKE_make_operation_top_s_length);
- const f_string_static_t fake_make_operation_touch_s = macro_f_string_static_t_initialize2(FAKE_make_operation_touch_s, 0, FAKE_make_operation_touch_s_length);
+ const f_string_static_t fake_make_operation_and_s = macro_f_string_static_t_initialize(FAKE_make_operation_and_s, 0, FAKE_make_operation_and_s_length);
+ const f_string_static_t fake_make_operation_break_s = macro_f_string_static_t_initialize(FAKE_make_operation_break_s, 0, FAKE_make_operation_break_s_length);
+ const f_string_static_t fake_make_operation_build_s = macro_f_string_static_t_initialize(FAKE_make_operation_build_s, 0, FAKE_make_operation_build_s_length);
+ const f_string_static_t fake_make_operation_clean_s = macro_f_string_static_t_initialize(FAKE_make_operation_clean_s, 0, FAKE_make_operation_clean_s_length);
+ const f_string_static_t fake_make_operation_clone_s = macro_f_string_static_t_initialize(FAKE_make_operation_clone_s, 0, FAKE_make_operation_clone_s_length);
+ const f_string_static_t fake_make_operation_compile_s = macro_f_string_static_t_initialize(FAKE_make_operation_compile_s, 0, FAKE_make_operation_compile_s_length);
+ const f_string_static_t fake_make_operation_copy_s = macro_f_string_static_t_initialize(FAKE_make_operation_copy_s, 0, FAKE_make_operation_copy_s_length);
+ const f_string_static_t fake_make_operation_define_s = macro_f_string_static_t_initialize(FAKE_make_operation_define_s, 0, FAKE_make_operation_define_s_length);
+ const f_string_static_t fake_make_operation_delete_s = macro_f_string_static_t_initialize(FAKE_make_operation_delete_s, 0, FAKE_make_operation_delete_s_length);
+ const f_string_static_t fake_make_operation_deletes_s = macro_f_string_static_t_initialize(FAKE_make_operation_deletes_s, 0, FAKE_make_operation_deletes_s_length);
+ const f_string_static_t fake_make_operation_else_s = macro_f_string_static_t_initialize(FAKE_make_operation_else_s, 0, FAKE_make_operation_else_s_length);
+ const f_string_static_t fake_make_operation_exit_s = macro_f_string_static_t_initialize(FAKE_make_operation_exit_s, 0, FAKE_make_operation_exit_s_length);
+ const f_string_static_t fake_make_operation_fail_s = macro_f_string_static_t_initialize(FAKE_make_operation_fail_s, 0, FAKE_make_operation_fail_s_length);
+ const f_string_static_t fake_make_operation_group_s = macro_f_string_static_t_initialize(FAKE_make_operation_group_s, 0, FAKE_make_operation_group_s_length);
+ const f_string_static_t fake_make_operation_groups_s = macro_f_string_static_t_initialize(FAKE_make_operation_groups_s, 0, FAKE_make_operation_groups_s_length);
+ const f_string_static_t fake_make_operation_if_s = macro_f_string_static_t_initialize(FAKE_make_operation_if_s, 0, FAKE_make_operation_if_s_length);
+ const f_string_static_t fake_make_operation_index_s = macro_f_string_static_t_initialize(FAKE_make_operation_index_s, 0, FAKE_make_operation_index_s_length);
+ const f_string_static_t fake_make_operation_link_s = macro_f_string_static_t_initialize(FAKE_make_operation_link_s, 0, FAKE_make_operation_link_s_length);
+ const f_string_static_t fake_make_operation_mode_s = macro_f_string_static_t_initialize(FAKE_make_operation_mode_s, 0, FAKE_make_operation_mode_s_length);
+ const f_string_static_t fake_make_operation_modes_s = macro_f_string_static_t_initialize(FAKE_make_operation_modes_s, 0, FAKE_make_operation_modes_s_length);
+ const f_string_static_t fake_make_operation_move_s = macro_f_string_static_t_initialize(FAKE_make_operation_move_s, 0, FAKE_make_operation_move_s_length);
+ const f_string_static_t fake_make_operation_operate_s = macro_f_string_static_t_initialize(FAKE_make_operation_operate_s, 0, FAKE_make_operation_operate_s_length);
+ const f_string_static_t fake_make_operation_or_s = macro_f_string_static_t_initialize(FAKE_make_operation_or_s, 0, FAKE_make_operation_or_s_length);
+ const f_string_static_t fake_make_operation_owner_s = macro_f_string_static_t_initialize(FAKE_make_operation_owner_s, 0, FAKE_make_operation_owner_s_length);
+ const f_string_static_t fake_make_operation_owners_s = macro_f_string_static_t_initialize(FAKE_make_operation_owners_s, 0, FAKE_make_operation_owners_s_length);
+ const f_string_static_t fake_make_operation_parameter_s = macro_f_string_static_t_initialize(FAKE_make_operation_parameter_s, 0, FAKE_make_operation_parameter_s_length);
+ const f_string_static_t fake_make_operation_pop_s = macro_f_string_static_t_initialize(FAKE_make_operation_pop_s, 0, FAKE_make_operation_pop_s_length);
+ const f_string_static_t fake_make_operation_print_s = macro_f_string_static_t_initialize(FAKE_make_operation_print_s, 0, FAKE_make_operation_print_s_length);
+ const f_string_static_t fake_make_operation_run_s = macro_f_string_static_t_initialize(FAKE_make_operation_run_s, 0, FAKE_make_operation_run_s_length);
+ const f_string_static_t fake_make_operation_shell_s = macro_f_string_static_t_initialize(FAKE_make_operation_shell_s, 0, FAKE_make_operation_shell_s_length);
+ const f_string_static_t fake_make_operation_skeleton_s = macro_f_string_static_t_initialize(FAKE_make_operation_skeleton_s, 0, FAKE_make_operation_skeleton_s_length);
+ const f_string_static_t fake_make_operation_to_s = macro_f_string_static_t_initialize(FAKE_make_operation_to_s, 0, FAKE_make_operation_to_s_length);
+ const f_string_static_t fake_make_operation_top_s = macro_f_string_static_t_initialize(FAKE_make_operation_top_s, 0, FAKE_make_operation_top_s_length);
+ const f_string_static_t fake_make_operation_touch_s = macro_f_string_static_t_initialize(FAKE_make_operation_touch_s, 0, FAKE_make_operation_touch_s_length);
- const f_string_static_t fake_make_operation_argument_environment_s = macro_f_string_static_t_initialize2(FAKE_make_operation_argument_environment_s, 0, FAKE_make_operation_argument_environment_s_length);
- const f_string_static_t fake_make_operation_argument_failure_s = macro_f_string_static_t_initialize2(FAKE_make_operation_argument_failure_s, 0, FAKE_make_operation_argument_failure_s_length);
- const f_string_static_t fake_make_operation_argument_file_s = macro_f_string_static_t_initialize2(FAKE_make_operation_argument_file_s, 0, FAKE_make_operation_argument_file_s_length);
- const f_string_static_t fake_make_operation_argument_directory_s = macro_f_string_static_t_initialize2(FAKE_make_operation_argument_directory_s, 0, FAKE_make_operation_argument_directory_s_length);
- const f_string_static_t fake_make_operation_argument_error_s = macro_f_string_static_t_initialize2(FAKE_make_operation_argument_error_s, 0, FAKE_make_operation_argument_error_s_length);
- const f_string_static_t fake_make_operation_argument_exit_s = macro_f_string_static_t_initialize2(FAKE_make_operation_argument_exit_s, 0, FAKE_make_operation_argument_exit_s_length);
- const f_string_static_t fake_make_operation_argument_has_s = macro_f_string_static_t_initialize2(FAKE_make_operation_argument_has_s, 0, FAKE_make_operation_argument_has_s_length);
- const f_string_static_t fake_make_operation_argument_ignore_s = macro_f_string_static_t_initialize2(FAKE_make_operation_argument_ignore_s, 0, FAKE_make_operation_argument_ignore_s_length);
- const f_string_static_t fake_make_operation_argument_is_s = macro_f_string_static_t_initialize2(FAKE_make_operation_argument_is_s, 0, FAKE_make_operation_argument_is_s_length);
- const f_string_static_t fake_make_operation_argument_parameter_s = macro_f_string_static_t_initialize2(FAKE_make_operation_argument_parameter_s, 0, FAKE_make_operation_argument_parameter_s_length);
- const f_string_static_t fake_make_operation_argument_point_s = macro_f_string_static_t_initialize2(FAKE_make_operation_argument_point_s, 0, FAKE_make_operation_argument_point_s_length);
- const f_string_static_t fake_make_operation_argument_recursive_s = macro_f_string_static_t_initialize2(FAKE_make_operation_argument_recursive_s, 0, FAKE_make_operation_argument_recursive_s_length);
- const f_string_static_t fake_make_operation_argument_success_s = macro_f_string_static_t_initialize2(FAKE_make_operation_argument_success_s, 0, FAKE_make_operation_argument_success_s_length);
- const f_string_static_t fake_make_operation_argument_target_s = macro_f_string_static_t_initialize2(FAKE_make_operation_argument_target_s, 0, FAKE_make_operation_argument_target_s_length);
- const f_string_static_t fake_make_operation_argument_warn_s = macro_f_string_static_t_initialize2(FAKE_make_operation_argument_warn_s, 0, FAKE_make_operation_argument_warn_s_length);
+ const f_string_static_t fake_make_operation_argument_environment_s = macro_f_string_static_t_initialize(FAKE_make_operation_argument_environment_s, 0, FAKE_make_operation_argument_environment_s_length);
+ const f_string_static_t fake_make_operation_argument_failure_s = macro_f_string_static_t_initialize(FAKE_make_operation_argument_failure_s, 0, FAKE_make_operation_argument_failure_s_length);
+ const f_string_static_t fake_make_operation_argument_file_s = macro_f_string_static_t_initialize(FAKE_make_operation_argument_file_s, 0, FAKE_make_operation_argument_file_s_length);
+ const f_string_static_t fake_make_operation_argument_directory_s = macro_f_string_static_t_initialize(FAKE_make_operation_argument_directory_s, 0, FAKE_make_operation_argument_directory_s_length);
+ const f_string_static_t fake_make_operation_argument_error_s = macro_f_string_static_t_initialize(FAKE_make_operation_argument_error_s, 0, FAKE_make_operation_argument_error_s_length);
+ const f_string_static_t fake_make_operation_argument_exit_s = macro_f_string_static_t_initialize(FAKE_make_operation_argument_exit_s, 0, FAKE_make_operation_argument_exit_s_length);
+ const f_string_static_t fake_make_operation_argument_has_s = macro_f_string_static_t_initialize(FAKE_make_operation_argument_has_s, 0, FAKE_make_operation_argument_has_s_length);
+ const f_string_static_t fake_make_operation_argument_ignore_s = macro_f_string_static_t_initialize(FAKE_make_operation_argument_ignore_s, 0, FAKE_make_operation_argument_ignore_s_length);
+ const f_string_static_t fake_make_operation_argument_is_s = macro_f_string_static_t_initialize(FAKE_make_operation_argument_is_s, 0, FAKE_make_operation_argument_is_s_length);
+ const f_string_static_t fake_make_operation_argument_parameter_s = macro_f_string_static_t_initialize(FAKE_make_operation_argument_parameter_s, 0, FAKE_make_operation_argument_parameter_s_length);
+ const f_string_static_t fake_make_operation_argument_point_s = macro_f_string_static_t_initialize(FAKE_make_operation_argument_point_s, 0, FAKE_make_operation_argument_point_s_length);
+ const f_string_static_t fake_make_operation_argument_recursive_s = macro_f_string_static_t_initialize(FAKE_make_operation_argument_recursive_s, 0, FAKE_make_operation_argument_recursive_s_length);
+ const f_string_static_t fake_make_operation_argument_success_s = macro_f_string_static_t_initialize(FAKE_make_operation_argument_success_s, 0, FAKE_make_operation_argument_success_s_length);
+ const f_string_static_t fake_make_operation_argument_target_s = macro_f_string_static_t_initialize(FAKE_make_operation_argument_target_s, 0, FAKE_make_operation_argument_target_s_length);
+ const f_string_static_t fake_make_operation_argument_warn_s = macro_f_string_static_t_initialize(FAKE_make_operation_argument_warn_s, 0, FAKE_make_operation_argument_warn_s_length);
- const f_string_static_t fake_make_operation_argument_if_defined_s = macro_f_string_static_t_initialize2(FAKE_make_operation_argument_if_defined_s, 0, FAKE_make_operation_argument_if_defined_s_length);
- const f_string_static_t fake_make_operation_argument_if_equal_s = macro_f_string_static_t_initialize2(FAKE_make_operation_argument_if_equal_s, 0, FAKE_make_operation_argument_if_equal_s_length);
- const f_string_static_t fake_make_operation_argument_if_equal_not_s = macro_f_string_static_t_initialize2(FAKE_make_operation_argument_if_equal_not_s, 0, FAKE_make_operation_argument_if_equal_not_s_length);
- const f_string_static_t fake_make_operation_argument_if_exists_s = macro_f_string_static_t_initialize2(FAKE_make_operation_argument_if_exists_s, 0, FAKE_make_operation_argument_if_exists_s_length);
- const f_string_static_t fake_make_operation_argument_if_failure_s = macro_f_string_static_t_initialize2(FAKE_make_operation_argument_if_failure_s, 0, FAKE_make_operation_argument_if_failure_s_length);
- const f_string_static_t fake_make_operation_argument_if_greater_s = macro_f_string_static_t_initialize2(FAKE_make_operation_argument_if_greater_s, 0, FAKE_make_operation_argument_if_greater_s_length);
- const f_string_static_t fake_make_operation_argument_if_greater_equal_s = macro_f_string_static_t_initialize2(FAKE_make_operation_argument_if_greater_equal_s, 0, FAKE_make_operation_argument_if_greater_equal_s_length);
- const f_string_static_t fake_make_operation_argument_if_group_s = macro_f_string_static_t_initialize2(FAKE_make_operation_argument_if_group_s, 0, FAKE_make_operation_argument_if_group_s_length);
- const f_string_static_t fake_make_operation_argument_if_is_s = macro_f_string_static_t_initialize2(FAKE_make_operation_argument_if_is_s, 0, FAKE_make_operation_argument_if_is_s_length);
- const f_string_static_t fake_make_operation_argument_if_is_for_s = macro_f_string_static_t_initialize2(FAKE_make_operation_argument_if_is_for_s, 0, FAKE_make_operation_argument_if_is_for_s_length);
- const f_string_static_t fake_make_operation_argument_if_less_s = macro_f_string_static_t_initialize2(FAKE_make_operation_argument_if_less_s, 0, FAKE_make_operation_argument_if_less_s_length);
- const f_string_static_t fake_make_operation_argument_if_less_equal_s = macro_f_string_static_t_initialize2(FAKE_make_operation_argument_if_less_equal_s, 0, FAKE_make_operation_argument_if_less_equal_s_length);
- const f_string_static_t fake_make_operation_argument_if_mode_s = macro_f_string_static_t_initialize2(FAKE_make_operation_argument_if_mode_s, 0, FAKE_make_operation_argument_if_mode_s_length);
- const f_string_static_t fake_make_operation_argument_if_not_s = macro_f_string_static_t_initialize2(FAKE_make_operation_argument_if_not_s, 0, FAKE_make_operation_argument_if_not_s_length);
- const f_string_static_t fake_make_operation_argument_if_owner_s = macro_f_string_static_t_initialize2(FAKE_make_operation_argument_if_owner_s, 0, FAKE_make_operation_argument_if_owner_s_length);
- const f_string_static_t fake_make_operation_argument_if_success_s = macro_f_string_static_t_initialize2(FAKE_make_operation_argument_if_success_s, 0, FAKE_make_operation_argument_if_success_s_length);
+ const f_string_static_t fake_make_operation_argument_if_defined_s = macro_f_string_static_t_initialize(FAKE_make_operation_argument_if_defined_s, 0, FAKE_make_operation_argument_if_defined_s_length);
+ const f_string_static_t fake_make_operation_argument_if_equal_s = macro_f_string_static_t_initialize(FAKE_make_operation_argument_if_equal_s, 0, FAKE_make_operation_argument_if_equal_s_length);
+ const f_string_static_t fake_make_operation_argument_if_equal_not_s = macro_f_string_static_t_initialize(FAKE_make_operation_argument_if_equal_not_s, 0, FAKE_make_operation_argument_if_equal_not_s_length);
+ const f_string_static_t fake_make_operation_argument_if_exists_s = macro_f_string_static_t_initialize(FAKE_make_operation_argument_if_exists_s, 0, FAKE_make_operation_argument_if_exists_s_length);
+ const f_string_static_t fake_make_operation_argument_if_failure_s = macro_f_string_static_t_initialize(FAKE_make_operation_argument_if_failure_s, 0, FAKE_make_operation_argument_if_failure_s_length);
+ const f_string_static_t fake_make_operation_argument_if_greater_s = macro_f_string_static_t_initialize(FAKE_make_operation_argument_if_greater_s, 0, FAKE_make_operation_argument_if_greater_s_length);
+ const f_string_static_t fake_make_operation_argument_if_greater_equal_s = macro_f_string_static_t_initialize(FAKE_make_operation_argument_if_greater_equal_s, 0, FAKE_make_operation_argument_if_greater_equal_s_length);
+ const f_string_static_t fake_make_operation_argument_if_group_s = macro_f_string_static_t_initialize(FAKE_make_operation_argument_if_group_s, 0, FAKE_make_operation_argument_if_group_s_length);
+ const f_string_static_t fake_make_operation_argument_if_is_s = macro_f_string_static_t_initialize(FAKE_make_operation_argument_if_is_s, 0, FAKE_make_operation_argument_if_is_s_length);
+ const f_string_static_t fake_make_operation_argument_if_is_for_s = macro_f_string_static_t_initialize(FAKE_make_operation_argument_if_is_for_s, 0, FAKE_make_operation_argument_if_is_for_s_length);
+ const f_string_static_t fake_make_operation_argument_if_less_s = macro_f_string_static_t_initialize(FAKE_make_operation_argument_if_less_s, 0, FAKE_make_operation_argument_if_less_s_length);
+ const f_string_static_t fake_make_operation_argument_if_less_equal_s = macro_f_string_static_t_initialize(FAKE_make_operation_argument_if_less_equal_s, 0, FAKE_make_operation_argument_if_less_equal_s_length);
+ const f_string_static_t fake_make_operation_argument_if_mode_s = macro_f_string_static_t_initialize(FAKE_make_operation_argument_if_mode_s, 0, FAKE_make_operation_argument_if_mode_s_length);
+ const f_string_static_t fake_make_operation_argument_if_not_s = macro_f_string_static_t_initialize(FAKE_make_operation_argument_if_not_s, 0, FAKE_make_operation_argument_if_not_s_length);
+ const f_string_static_t fake_make_operation_argument_if_owner_s = macro_f_string_static_t_initialize(FAKE_make_operation_argument_if_owner_s, 0, FAKE_make_operation_argument_if_owner_s_length);
+ const f_string_static_t fake_make_operation_argument_if_success_s = macro_f_string_static_t_initialize(FAKE_make_operation_argument_if_success_s, 0, FAKE_make_operation_argument_if_success_s_length);
#endif // _di_fake_make_operation_
#ifndef _di_fake_make_parameter_t_
- const f_string_static_t fake_make_parameter_iki_option_s = macro_f_string_static_t_initialize2(FAKE_make_parameter_iki_option_s, 0, FAKE_make_parameter_iki_option_s_length);
- const f_string_static_t fake_make_parameter_iki_value_s = macro_f_string_static_t_initialize2(FAKE_make_parameter_iki_value_s, 0, FAKE_make_parameter_iki_value_s_length);
+ const f_string_static_t fake_make_parameter_iki_option_s = macro_f_string_static_t_initialize(FAKE_make_parameter_iki_option_s, 0, FAKE_make_parameter_iki_option_s_length);
+ const f_string_static_t fake_make_parameter_iki_value_s = macro_f_string_static_t_initialize(FAKE_make_parameter_iki_value_s, 0, FAKE_make_parameter_iki_value_s_length);
- const f_string_static_t fake_make_parameter_variable_build_s = macro_f_string_static_t_initialize2(FAKE_make_parameter_variable_build_s, 0, FAKE_make_parameter_variable_build_s_length);
- const f_string_static_t fake_make_parameter_variable_color_s = macro_f_string_static_t_initialize2(FAKE_make_parameter_variable_color_s, 0, FAKE_make_parameter_variable_color_s_length);
- const f_string_static_t fake_make_parameter_variable_data_s = macro_f_string_static_t_initialize2(FAKE_make_parameter_variable_data_s, 0, FAKE_make_parameter_variable_data_s_length);
- const f_string_static_t fake_make_parameter_variable_define_s = macro_f_string_static_t_initialize2(FAKE_make_parameter_variable_define_s, 0, FAKE_make_parameter_variable_define_s_length);
- const f_string_static_t fake_make_parameter_variable_fakefile_s = macro_f_string_static_t_initialize2(FAKE_make_parameter_variable_fakefile_s, 0, FAKE_make_parameter_variable_fakefile_s_length);
- const f_string_static_t fake_make_parameter_variable_mode_s = macro_f_string_static_t_initialize2(FAKE_make_parameter_variable_mode_s, 0, FAKE_make_parameter_variable_mode_s_length);
- const f_string_static_t fake_make_parameter_variable_process_s = macro_f_string_static_t_initialize2(FAKE_make_parameter_variable_process_s, 0, FAKE_make_parameter_variable_process_s_length);
- const f_string_static_t fake_make_parameter_variable_return_s = macro_f_string_static_t_initialize2(FAKE_make_parameter_variable_return_s, 0, FAKE_make_parameter_variable_return_s_length);
- const f_string_static_t fake_make_parameter_variable_settings_s = macro_f_string_static_t_initialize2(FAKE_make_parameter_variable_settings_s, 0, FAKE_make_parameter_variable_settings_s_length);
- const f_string_static_t fake_make_parameter_variable_sources_s = macro_f_string_static_t_initialize2(FAKE_make_parameter_variable_sources_s, 0, FAKE_make_parameter_variable_sources_s_length);
- const f_string_static_t fake_make_parameter_variable_verbosity_s = macro_f_string_static_t_initialize2(FAKE_make_parameter_variable_verbosity_s, 0, FAKE_make_parameter_variable_verbosity_s_length);
- const f_string_static_t fake_make_parameter_variable_work_s = macro_f_string_static_t_initialize2(FAKE_make_parameter_variable_work_s, 0, FAKE_make_parameter_variable_work_s_length);
+ const f_string_static_t fake_make_parameter_variable_build_s = macro_f_string_static_t_initialize(FAKE_make_parameter_variable_build_s, 0, FAKE_make_parameter_variable_build_s_length);
+ const f_string_static_t fake_make_parameter_variable_color_s = macro_f_string_static_t_initialize(FAKE_make_parameter_variable_color_s, 0, FAKE_make_parameter_variable_color_s_length);
+ const f_string_static_t fake_make_parameter_variable_data_s = macro_f_string_static_t_initialize(FAKE_make_parameter_variable_data_s, 0, FAKE_make_parameter_variable_data_s_length);
+ const f_string_static_t fake_make_parameter_variable_define_s = macro_f_string_static_t_initialize(FAKE_make_parameter_variable_define_s, 0, FAKE_make_parameter_variable_define_s_length);
+ const f_string_static_t fake_make_parameter_variable_fakefile_s = macro_f_string_static_t_initialize(FAKE_make_parameter_variable_fakefile_s, 0, FAKE_make_parameter_variable_fakefile_s_length);
+ const f_string_static_t fake_make_parameter_variable_mode_s = macro_f_string_static_t_initialize(FAKE_make_parameter_variable_mode_s, 0, FAKE_make_parameter_variable_mode_s_length);
+ const f_string_static_t fake_make_parameter_variable_process_s = macro_f_string_static_t_initialize(FAKE_make_parameter_variable_process_s, 0, FAKE_make_parameter_variable_process_s_length);
+ const f_string_static_t fake_make_parameter_variable_return_s = macro_f_string_static_t_initialize(FAKE_make_parameter_variable_return_s, 0, FAKE_make_parameter_variable_return_s_length);
+ const f_string_static_t fake_make_parameter_variable_settings_s = macro_f_string_static_t_initialize(FAKE_make_parameter_variable_settings_s, 0, FAKE_make_parameter_variable_settings_s_length);
+ const f_string_static_t fake_make_parameter_variable_sources_s = macro_f_string_static_t_initialize(FAKE_make_parameter_variable_sources_s, 0, FAKE_make_parameter_variable_sources_s_length);
+ const f_string_static_t fake_make_parameter_variable_verbosity_s = macro_f_string_static_t_initialize(FAKE_make_parameter_variable_verbosity_s, 0, FAKE_make_parameter_variable_verbosity_s_length);
+ const f_string_static_t fake_make_parameter_variable_work_s = macro_f_string_static_t_initialize(FAKE_make_parameter_variable_work_s, 0, FAKE_make_parameter_variable_work_s_length);
- const f_string_static_t fake_make_parameter_variable_option_build_s = macro_f_string_static_t_initialize2(FAKE_make_parameter_variable_build_s, 0, FAKE_make_parameter_variable_build_s_length);
- const f_string_static_t fake_make_parameter_variable_option_color_s = macro_f_string_static_t_initialize2(FAKE_make_parameter_variable_option_color_s, 0, FAKE_make_parameter_variable_option_color_s_length);
- const f_string_static_t fake_make_parameter_variable_option_data_s = macro_f_string_static_t_initialize2(FAKE_make_parameter_variable_option_data_s, 0, FAKE_make_parameter_variable_option_data_s_length);
- const f_string_static_t fake_make_parameter_variable_option_define_s = macro_f_string_static_t_initialize2(FAKE_make_parameter_variable_option_define_s, 0, FAKE_make_parameter_variable_option_define_s_length);
- const f_string_static_t fake_make_parameter_variable_option_fakefile_s = macro_f_string_static_t_initialize2(FAKE_make_parameter_variable_option_fakefile_s, 0, FAKE_make_parameter_variable_option_fakefile_s_length);
- const f_string_static_t fake_make_parameter_variable_option_mode_s = macro_f_string_static_t_initialize2(FAKE_make_parameter_variable_option_mode_s, 0, FAKE_make_parameter_variable_option_mode_s_length);
- const f_string_static_t fake_make_parameter_variable_option_process_s = macro_f_string_static_t_initialize2(FAKE_make_parameter_variable_option_process_s, 0, FAKE_make_parameter_variable_option_process_s_length);
- const f_string_static_t fake_make_parameter_variable_option_return_s = macro_f_string_static_t_initialize2(FAKE_make_parameter_variable_option_return_s, 0, FAKE_make_parameter_variable_option_return_s_length);
- const f_string_static_t fake_make_parameter_variable_option_settings_s = macro_f_string_static_t_initialize2(FAKE_make_parameter_variable_option_settings_s, 0, FAKE_make_parameter_variable_option_settings_s_length);
- const f_string_static_t fake_make_parameter_variable_option_sources_s = macro_f_string_static_t_initialize2(FAKE_make_parameter_variable_option_sources_s, 0, FAKE_make_parameter_variable_option_sources_s_length);
- const f_string_static_t fake_make_parameter_variable_option_verbosity_s = macro_f_string_static_t_initialize2(FAKE_make_parameter_variable_option_verbosity_s, 0, FAKE_make_parameter_variable_option_verbosity_s_length);
- const f_string_static_t fake_make_parameter_variable_option_work_s = macro_f_string_static_t_initialize2(FAKE_make_parameter_variable_option_work_s, 0, FAKE_make_parameter_variable_option_work_s_length);
+ const f_string_static_t fake_make_parameter_variable_option_build_s = macro_f_string_static_t_initialize(FAKE_make_parameter_variable_build_s, 0, FAKE_make_parameter_variable_build_s_length);
+ const f_string_static_t fake_make_parameter_variable_option_color_s = macro_f_string_static_t_initialize(FAKE_make_parameter_variable_option_color_s, 0, FAKE_make_parameter_variable_option_color_s_length);
+ const f_string_static_t fake_make_parameter_variable_option_data_s = macro_f_string_static_t_initialize(FAKE_make_parameter_variable_option_data_s, 0, FAKE_make_parameter_variable_option_data_s_length);
+ const f_string_static_t fake_make_parameter_variable_option_define_s = macro_f_string_static_t_initialize(FAKE_make_parameter_variable_option_define_s, 0, FAKE_make_parameter_variable_option_define_s_length);
+ const f_string_static_t fake_make_parameter_variable_option_fakefile_s = macro_f_string_static_t_initialize(FAKE_make_parameter_variable_option_fakefile_s, 0, FAKE_make_parameter_variable_option_fakefile_s_length);
+ const f_string_static_t fake_make_parameter_variable_option_mode_s = macro_f_string_static_t_initialize(FAKE_make_parameter_variable_option_mode_s, 0, FAKE_make_parameter_variable_option_mode_s_length);
+ const f_string_static_t fake_make_parameter_variable_option_process_s = macro_f_string_static_t_initialize(FAKE_make_parameter_variable_option_process_s, 0, FAKE_make_parameter_variable_option_process_s_length);
+ const f_string_static_t fake_make_parameter_variable_option_return_s = macro_f_string_static_t_initialize(FAKE_make_parameter_variable_option_return_s, 0, FAKE_make_parameter_variable_option_return_s_length);
+ const f_string_static_t fake_make_parameter_variable_option_settings_s = macro_f_string_static_t_initialize(FAKE_make_parameter_variable_option_settings_s, 0, FAKE_make_parameter_variable_option_settings_s_length);
+ const f_string_static_t fake_make_parameter_variable_option_sources_s = macro_f_string_static_t_initialize(FAKE_make_parameter_variable_option_sources_s, 0, FAKE_make_parameter_variable_option_sources_s_length);
+ const f_string_static_t fake_make_parameter_variable_option_verbosity_s = macro_f_string_static_t_initialize(FAKE_make_parameter_variable_option_verbosity_s, 0, FAKE_make_parameter_variable_option_verbosity_s_length);
+ const f_string_static_t fake_make_parameter_variable_option_work_s = macro_f_string_static_t_initialize(FAKE_make_parameter_variable_option_work_s, 0, FAKE_make_parameter_variable_option_work_s_length);
- const f_string_static_t fake_make_parameter_variable_value_build_s = macro_f_string_static_t_initialize2(FAKE_make_parameter_variable_value_build_s, 0, FAKE_make_parameter_variable_value_build_s_length);
- const f_string_static_t fake_make_parameter_variable_value_color_s = macro_f_string_static_t_initialize2(FAKE_make_parameter_variable_value_color_s, 0, FAKE_make_parameter_variable_value_color_s_length);
- const f_string_static_t fake_make_parameter_variable_value_data_s = macro_f_string_static_t_initialize2(FAKE_make_parameter_variable_value_data_s, 0, FAKE_make_parameter_variable_value_data_s_length);
- const f_string_static_t fake_make_parameter_variable_value_define_s = macro_f_string_static_t_initialize2(FAKE_make_parameter_variable_value_define_s, 0, FAKE_make_parameter_variable_value_define_s_length);
- const f_string_static_t fake_make_parameter_variable_value_fakefile_s = macro_f_string_static_t_initialize2(FAKE_make_parameter_variable_value_fakefile_s, 0, FAKE_make_parameter_variable_value_fakefile_s_length);
- const f_string_static_t fake_make_parameter_variable_value_mode_s = macro_f_string_static_t_initialize2(FAKE_make_parameter_variable_value_mode_s, 0, FAKE_make_parameter_variable_value_mode_s_length);
- const f_string_static_t fake_make_parameter_variable_value_process_s = macro_f_string_static_t_initialize2(FAKE_make_parameter_variable_value_process_s, 0, FAKE_make_parameter_variable_value_process_s_length);
- const f_string_static_t fake_make_parameter_variable_value_return_s = macro_f_string_static_t_initialize2(FAKE_make_parameter_variable_value_return_s, 0, FAKE_make_parameter_variable_value_return_s_length);
- const f_string_static_t fake_make_parameter_variable_value_settings_s = macro_f_string_static_t_initialize2(FAKE_make_parameter_variable_value_settings_s, 0, FAKE_make_parameter_variable_value_settings_s_length);
- const f_string_static_t fake_make_parameter_variable_value_sources_s = macro_f_string_static_t_initialize2(FAKE_make_parameter_variable_value_sources_s, 0, FAKE_make_parameter_variable_value_sources_s_length);
- const f_string_static_t fake_make_parameter_variable_value_verbosity_s = macro_f_string_static_t_initialize2(FAKE_make_parameter_variable_value_verbosity_s, 0, FAKE_make_parameter_variable_value_verbosity_s_length);
- const f_string_static_t fake_make_parameter_variable_value_work_s = macro_f_string_static_t_initialize2(FAKE_make_parameter_variable_value_work_s, 0, FAKE_make_parameter_variable_value_work_s_length);
+ const f_string_static_t fake_make_parameter_variable_value_build_s = macro_f_string_static_t_initialize(FAKE_make_parameter_variable_value_build_s, 0, FAKE_make_parameter_variable_value_build_s_length);
+ const f_string_static_t fake_make_parameter_variable_value_color_s = macro_f_string_static_t_initialize(FAKE_make_parameter_variable_value_color_s, 0, FAKE_make_parameter_variable_value_color_s_length);
+ const f_string_static_t fake_make_parameter_variable_value_data_s = macro_f_string_static_t_initialize(FAKE_make_parameter_variable_value_data_s, 0, FAKE_make_parameter_variable_value_data_s_length);
+ const f_string_static_t fake_make_parameter_variable_value_define_s = macro_f_string_static_t_initialize(FAKE_make_parameter_variable_value_define_s, 0, FAKE_make_parameter_variable_value_define_s_length);
+ const f_string_static_t fake_make_parameter_variable_value_fakefile_s = macro_f_string_static_t_initialize(FAKE_make_parameter_variable_value_fakefile_s, 0, FAKE_make_parameter_variable_value_fakefile_s_length);
+ const f_string_static_t fake_make_parameter_variable_value_mode_s = macro_f_string_static_t_initialize(FAKE_make_parameter_variable_value_mode_s, 0, FAKE_make_parameter_variable_value_mode_s_length);
+ const f_string_static_t fake_make_parameter_variable_value_process_s = macro_f_string_static_t_initialize(FAKE_make_parameter_variable_value_process_s, 0, FAKE_make_parameter_variable_value_process_s_length);
+ const f_string_static_t fake_make_parameter_variable_value_return_s = macro_f_string_static_t_initialize(FAKE_make_parameter_variable_value_return_s, 0, FAKE_make_parameter_variable_value_return_s_length);
+ const f_string_static_t fake_make_parameter_variable_value_settings_s = macro_f_string_static_t_initialize(FAKE_make_parameter_variable_value_settings_s, 0, FAKE_make_parameter_variable_value_settings_s_length);
+ const f_string_static_t fake_make_parameter_variable_value_sources_s = macro_f_string_static_t_initialize(FAKE_make_parameter_variable_value_sources_s, 0, FAKE_make_parameter_variable_value_sources_s_length);
+ const f_string_static_t fake_make_parameter_variable_value_verbosity_s = macro_f_string_static_t_initialize(FAKE_make_parameter_variable_value_verbosity_s, 0, FAKE_make_parameter_variable_value_verbosity_s_length);
+ const f_string_static_t fake_make_parameter_variable_value_work_s = macro_f_string_static_t_initialize(FAKE_make_parameter_variable_value_work_s, 0, FAKE_make_parameter_variable_value_work_s_length);
#endif // _di_fake_make_parameter_t_
#ifndef _di_fake_skeleton_content_
- const f_string_static_t fake_make_skeleton_content_defines_s = macro_f_string_static_t_initialize2(FAKE_make_skeleton_content_defines_s, 0, FAKE_make_skeleton_content_defines_s_length);
- const f_string_static_t fake_make_skeleton_content_dependencies_s = macro_f_string_static_t_initialize2(FAKE_make_skeleton_content_dependencies_s, 0, FAKE_make_skeleton_content_dependencies_s_length);
- const f_string_static_t fake_make_skeleton_content_fakefile_s = macro_f_string_static_t_initialize2(FAKE_make_skeleton_content_fakefile_s, 0, FAKE_make_skeleton_content_fakefile_s_length);
- const f_string_static_t fake_make_skeleton_content_process_post_s = macro_f_string_static_t_initialize2(FAKE_make_skeleton_content_process_post_s, 0, FAKE_make_skeleton_content_process_post_s_length);
- const f_string_static_t fake_make_skeleton_content_process_pre_s = macro_f_string_static_t_initialize2(FAKE_make_skeleton_content_process_pre_s, 0, FAKE_make_skeleton_content_process_pre_s_length);
- const f_string_static_t fake_make_skeleton_content_settings_s = macro_f_string_static_t_initialize2(FAKE_make_skeleton_content_settings_s, 0, FAKE_make_skeleton_content_settings_s_length);
+ const f_string_static_t fake_make_skeleton_content_defines_s = macro_f_string_static_t_initialize(FAKE_make_skeleton_content_defines_s, 0, FAKE_make_skeleton_content_defines_s_length);
+ const f_string_static_t fake_make_skeleton_content_dependencies_s = macro_f_string_static_t_initialize(FAKE_make_skeleton_content_dependencies_s, 0, FAKE_make_skeleton_content_dependencies_s_length);
+ const f_string_static_t fake_make_skeleton_content_fakefile_s = macro_f_string_static_t_initialize(FAKE_make_skeleton_content_fakefile_s, 0, FAKE_make_skeleton_content_fakefile_s_length);
+ const f_string_static_t fake_make_skeleton_content_process_post_s = macro_f_string_static_t_initialize(FAKE_make_skeleton_content_process_post_s, 0, FAKE_make_skeleton_content_process_post_s_length);
+ const f_string_static_t fake_make_skeleton_content_process_pre_s = macro_f_string_static_t_initialize(FAKE_make_skeleton_content_process_pre_s, 0, FAKE_make_skeleton_content_process_pre_s_length);
+ const f_string_static_t fake_make_skeleton_content_settings_s = macro_f_string_static_t_initialize(FAKE_make_skeleton_content_settings_s, 0, FAKE_make_skeleton_content_settings_s_length);
#endif // _di_fake_skeleton_content_
#ifndef _di_fake_make_context_
- const f_string_static_t fake_make_context_reset_s = macro_f_string_static_t_initialize2(FAKE_make_context_reset_s, 0, FAKE_make_context_reset_s_length);
- const f_string_static_t fake_make_context_warning_s = macro_f_string_static_t_initialize2(FAKE_make_context_warning_s, 0, FAKE_make_context_warning_s_length);
- const f_string_static_t fake_make_context_error_s = macro_f_string_static_t_initialize2(FAKE_make_context_error_s, 0, FAKE_make_context_error_s_length);
- const f_string_static_t fake_make_context_title_s = macro_f_string_static_t_initialize2(FAKE_make_context_title_s, 0, FAKE_make_context_title_s_length);
- const f_string_static_t fake_make_context_notable_s = macro_f_string_static_t_initialize2(FAKE_make_context_notable_s, 0, FAKE_make_context_notable_s_length);
- const f_string_static_t fake_make_context_important_s = macro_f_string_static_t_initialize2(FAKE_make_context_important_s, 0, FAKE_make_context_important_s_length);
- const f_string_static_t fake_make_context_standout_s = macro_f_string_static_t_initialize2(FAKE_make_context_standout_s, 0, FAKE_make_context_standout_s_length);
- const f_string_static_t fake_make_context_success_s = macro_f_string_static_t_initialize2(FAKE_make_context_success_s, 0, FAKE_make_context_success_s_length);
- const f_string_static_t fake_make_context_normal_s = macro_f_string_static_t_initialize2(FAKE_make_context_normal_s, 0, FAKE_make_context_normal_s_length);
+ const f_string_static_t fake_make_context_reset_s = macro_f_string_static_t_initialize(FAKE_make_context_reset_s, 0, FAKE_make_context_reset_s_length);
+ const f_string_static_t fake_make_context_warning_s = macro_f_string_static_t_initialize(FAKE_make_context_warning_s, 0, FAKE_make_context_warning_s_length);
+ const f_string_static_t fake_make_context_error_s = macro_f_string_static_t_initialize(FAKE_make_context_error_s, 0, FAKE_make_context_error_s_length);
+ const f_string_static_t fake_make_context_title_s = macro_f_string_static_t_initialize(FAKE_make_context_title_s, 0, FAKE_make_context_title_s_length);
+ const f_string_static_t fake_make_context_notable_s = macro_f_string_static_t_initialize(FAKE_make_context_notable_s, 0, FAKE_make_context_notable_s_length);
+ const f_string_static_t fake_make_context_important_s = macro_f_string_static_t_initialize(FAKE_make_context_important_s, 0, FAKE_make_context_important_s_length);
+ const f_string_static_t fake_make_context_standout_s = macro_f_string_static_t_initialize(FAKE_make_context_standout_s, 0, FAKE_make_context_standout_s_length);
+ const f_string_static_t fake_make_context_success_s = macro_f_string_static_t_initialize(FAKE_make_context_success_s, 0, FAKE_make_context_success_s_length);
+ const f_string_static_t fake_make_context_normal_s = macro_f_string_static_t_initialize(FAKE_make_context_normal_s, 0, FAKE_make_context_normal_s_length);
#endif // _di_fake_make_context_
#ifndef _di_fake_file_data_build_strings_
- const f_string_static_t fake_file_data_build_process_post_s = macro_f_string_static_t_initialize2(FAKE_file_data_build_process_post_s, 0, FAKE_file_data_build_process_post_s_length);
- const f_string_static_t fake_file_data_build_process_pre_s = macro_f_string_static_t_initialize2(FAKE_file_data_build_process_pre_s, 0, FAKE_file_data_build_process_pre_s_length);
+ const f_string_static_t fake_file_data_build_process_post_s = macro_f_string_static_t_initialize(FAKE_file_data_build_process_post_s, 0, FAKE_file_data_build_process_post_s_length);
+ const f_string_static_t fake_file_data_build_process_pre_s = macro_f_string_static_t_initialize(FAKE_file_data_build_process_pre_s, 0, FAKE_file_data_build_process_pre_s_length);
#endif // _di_fake_file_data_build_strings_
#ifndef _di_fake_signal_received_
* - large: An allocation step used for buffers that are anticipated to have large buffers.
* - small: An allocation step used for buffers that are anticipated to have small buffers.
*
+ * fake_common_file_*:
+ * - directory_copy: A string referring to a file directory copy operation.
+ *
* fake_common_setting_bool_*:
* - yes: A representation of yes or true.
* - no: A representation of no or false.
#define fake_common_allocation_large_d 256
#define fake_common_allocation_small_d 16
+ #define FAKE_common_file_directory_copy_s "copy directory"
+ #define FAKE_common_file_path_change_to_s "change path to"
+ #define FAKE_common_file_path_determine_real_s "determine real path of"
+ #define FAKE_common_file_path_stack_s "path stack"
+ #define FAKE_common_file_populate_pre_s "pre-populate"
+
#define FAKE_common_setting_bool_yes_s "yes"
#define FAKE_common_setting_bool_no_s "no"
#define FAKE_common_setting_list_s "list"
+ #define FAKE_common_file_directory_copy_s_length 14
+ #define FAKE_common_file_path_change_to_s_length 14
+ #define FAKE_common_file_path_determine_real_s_length 22
+ #define FAKE_common_file_path_stack_s_length 10
+ #define FAKE_common_file_populate_pre_s_length 12
+
#define FAKE_common_setting_bool_yes_s_length 3
#define FAKE_common_setting_bool_no_s_length 2
#define FAKE_common_setting_list_s_length 4
+ extern const f_string_static_t fake_common_file_directory_copy_s;
+ extern const f_string_static_t fake_common_file_path_change_to_s;
+ extern const f_string_static_t fake_common_file_path_determine_real_s;
+ extern const f_string_static_t fake_common_file_path_stack_s;
+ extern const f_string_static_t fake_common_file_populate_pre_s;
+
extern const f_string_static_t fake_common_setting_bool_yes_s;
extern const f_string_static_t fake_common_setting_bool_no_s;
+
extern const f_string_static_t fake_common_setting_list_s;
#define fake_common_initial_buffer_max_d 131072 // 128k max default initial buffer size.
#define FAKE_make_parameter_variable_verbosity_s "verbosity"
#define FAKE_make_parameter_variable_work_s "work"
+ #define FAKE_make_parameter_variable_option_build_s FAKE_make_parameter_variable_build_s FAKE_make_parameter_iki_option_s
+ #define FAKE_make_parameter_variable_option_color_s FAKE_make_parameter_variable_color_s FAKE_make_parameter_iki_option_s
+ #define FAKE_make_parameter_variable_option_data_s FAKE_make_parameter_variable_data_s FAKE_make_parameter_iki_option_s
+ #define FAKE_make_parameter_variable_option_define_s FAKE_make_parameter_variable_define_s FAKE_make_parameter_iki_option_s
+ #define FAKE_make_parameter_variable_option_fakefile_s FAKE_make_parameter_variable_fakefile_s FAKE_make_parameter_iki_option_s
+ #define FAKE_make_parameter_variable_option_mode_s FAKE_make_parameter_variable_mode_s FAKE_make_parameter_iki_option_s
+ #define FAKE_make_parameter_variable_option_process_s FAKE_make_parameter_variable_process_s FAKE_make_parameter_iki_option_s
+ #define FAKE_make_parameter_variable_option_settings_s FAKE_make_parameter_variable_settings_s FAKE_make_parameter_iki_option_s
+ #define FAKE_make_parameter_variable_option_sources_s FAKE_make_parameter_variable_sources_s FAKE_make_parameter_iki_option_s
+ #define FAKE_make_parameter_variable_option_verbosity_s FAKE_make_parameter_variable_verbosity_s FAKE_make_parameter_iki_option_s
+ #define FAKE_make_parameter_variable_option_work_s FAKE_make_parameter_variable_work_s FAKE_make_parameter_iki_option_s
+
+ #define FAKE_make_parameter_variable_value_build_s FAKE_make_parameter_variable_build_s FAKE_make_parameter_iki_value_s
+ #define FAKE_make_parameter_variable_value_color_s FAKE_make_parameter_variable_color_s FAKE_make_parameter_iki_value_s
+ #define FAKE_make_parameter_variable_value_data_s FAKE_make_parameter_variable_data_s FAKE_make_parameter_iki_value_s
+ #define FAKE_make_parameter_variable_value_define_s FAKE_make_parameter_variable_define_s FAKE_make_parameter_iki_value_s
+ #define FAKE_make_parameter_variable_value_fakefile_s FAKE_make_parameter_variable_fakefile_s FAKE_make_parameter_iki_value_s
+ #define FAKE_make_parameter_variable_value_mode_s FAKE_make_parameter_variable_mode_s FAKE_make_parameter_iki_value_s
+ #define FAKE_make_parameter_variable_value_process_s FAKE_make_parameter_variable_process_s FAKE_make_parameter_iki_value_s
+ #define FAKE_make_parameter_variable_value_settings_s FAKE_make_parameter_variable_settings_s FAKE_make_parameter_iki_value_s
+ #define FAKE_make_parameter_variable_value_sources_s FAKE_make_parameter_variable_sources_s FAKE_make_parameter_iki_value_s
+ #define FAKE_make_parameter_variable_value_verbosity_s FAKE_make_parameter_variable_verbosity_s FAKE_make_parameter_iki_value_s
+ #define FAKE_make_parameter_variable_value_work_s FAKE_make_parameter_variable_work_s FAKE_make_parameter_iki_value_s
+
#define FAKE_make_parameter_iki_option_s_length 7
#define FAKE_make_parameter_iki_value_s_length 6
#define FAKE_make_parameter_variable_verbosity_s_length 9
#define FAKE_make_parameter_variable_work_s_length 4
+ #define FAKE_make_parameter_variable_option_build_s_length FAKE_make_parameter_variable_build_s_length + FAKE_make_parameter_iki_option_s_length
+ #define FAKE_make_parameter_variable_option_color_s_length FAKE_make_parameter_variable_color_s_length + FAKE_make_parameter_iki_option_s_length
+ #define FAKE_make_parameter_variable_option_data_s_length FAKE_make_parameter_variable_data_s_length + FAKE_make_parameter_iki_option_s_length
+ #define FAKE_make_parameter_variable_option_define_s_length FAKE_make_parameter_variable_define_s_length + FAKE_make_parameter_iki_option_s_length
+ #define FAKE_make_parameter_variable_option_fakefile_s_length FAKE_make_parameter_variable_fakefile_s_length + FAKE_make_parameter_iki_option_s_length
+ #define FAKE_make_parameter_variable_option_mode_s_length FAKE_make_parameter_variable_mode_s_length + FAKE_make_parameter_iki_option_s_length
+ #define FAKE_make_parameter_variable_option_process_s_length FAKE_make_parameter_variable_process_s_length + FAKE_make_parameter_iki_option_s_length
+ #define FAKE_make_parameter_variable_option_settings_s_length FAKE_make_parameter_variable_settings_s_length + FAKE_make_parameter_iki_option_s_length
+ #define FAKE_make_parameter_variable_option_sources_s_length FAKE_make_parameter_variable_sources_s_length + FAKE_make_parameter_iki_option_s_length
+ #define FAKE_make_parameter_variable_option_verbosity_s_length FAKE_make_parameter_variable_verbosity_s_length + FAKE_make_parameter_iki_option_s_length
+ #define FAKE_make_parameter_variable_option_work_s_length FAKE_make_parameter_variable_work_s_length + FAKE_make_parameter_iki_option_s_length
+
+ #define FAKE_make_parameter_variable_value_build_s_length FAKE_make_parameter_variable_build_s_length + FAKE_make_parameter_iki_value_s_length
+ #define FAKE_make_parameter_variable_value_color_s_length FAKE_make_parameter_variable_color_s_length + FAKE_make_parameter_iki_value_s_length
+ #define FAKE_make_parameter_variable_value_data_s_length FAKE_make_parameter_variable_data_s_length + FAKE_make_parameter_iki_value_s_length
+ #define FAKE_make_parameter_variable_value_define_s_length FAKE_make_parameter_variable_define_s_length + FAKE_make_parameter_iki_value_s_length
+ #define FAKE_make_parameter_variable_value_fakefile_s_length FAKE_make_parameter_variable_fakefile_s_length + FAKE_make_parameter_iki_value_s_length
+ #define FAKE_make_parameter_variable_value_mode_s_length FAKE_make_parameter_variable_mode_s_length + FAKE_make_parameter_iki_value_s_length
+ #define FAKE_make_parameter_variable_value_process_s_length FAKE_make_parameter_variable_process_s_length + FAKE_make_parameter_iki_value_s_length
+ #define FAKE_make_parameter_variable_value_settings_s_length FAKE_make_parameter_variable_settings_s_length + FAKE_make_parameter_iki_value_s_length
+ #define FAKE_make_parameter_variable_value_sources_s_length FAKE_make_parameter_variable_sources_s_length + FAKE_make_parameter_iki_value_s_length
+ #define FAKE_make_parameter_variable_value_verbosity_s_length FAKE_make_parameter_variable_verbosity_s_length + FAKE_make_parameter_iki_value_s_length
+ #define FAKE_make_parameter_variable_value_work_s_length FAKE_make_parameter_variable_work_s_length + FAKE_make_parameter_iki_value_s_length
+
extern const f_string_static_t fake_make_parameter_iki_option_s;
extern const f_string_static_t fake_make_parameter_iki_value_s;
fl_execute_parameter_t parameter = macro_fl_execute_parameter_t_initialize(0, 0, &environment, &signals, 0);
- *status = fll_execute_program(program.string, arguments, ¶meter, 0, (void *) &return_code);
+ *status = fll_execute_program(program, arguments, ¶meter, 0, (void *) &return_code);
if (fake_signal_received(main)) {
*status = F_status_set_error(F_interrupt);
#endif // _di_fake_execute_
#ifndef _di_fake_file_buffer_
- f_status_t fake_file_buffer(fake_main_t * const main, const f_string_t path_file, f_string_dynamic_t *buffer) {
+ f_status_t fake_file_buffer(fake_main_t * const main, const f_string_static_t path_file, f_string_dynamic_t *buffer) {
f_file_t file = f_file_t_initialize;
f_string_t name_function = "f_file_exists";
return F_status_set_error(F_interrupt);
}
- status = f_file_exists(path_file);
+ status = f_file_exists(path_file.string);
if (status == F_true) {
{
f_array_length_t size_file = 0;
name_function = "f_file_size";
- status = f_file_size(path_file, F_true, &size_file);
+ status = f_file_size(path_file.string, F_true, &size_file);
if (F_status_is_error_not(status)) {
if (size_file > fake_common_initial_buffer_max_d) {
for (uint8_t i = 0; i < 3; ++i) {
- if (main->parameters[parameters_id[i]].result == f_console_result_found_e) {
+ if (main->parameters.array[parameters_id[i]].result == f_console_result_found_e) {
fake_print_error_parameter_missing_value(main, parameters_name[i]);
return F_status_set_error(F_parameter);
}
- else if (main->parameters[parameters_id[i]].result == f_console_result_additional_e) {
- if (main->parameters[parameters_id[i]].locations.used > 1) {
+ else if (main->parameters.array[parameters_id[i]].result == f_console_result_additional_e) {
+ if (main->parameters.array[parameters_id[i]].locations.used > 1) {
fake_print_error_parameter_too_many(main, parameters_name[i]);
return F_status_set_error(F_parameter);
}
- f_array_length_t location = main->parameters[parameters_id[i]].values.array[0];
+ f_array_length_t location = main->parameters.array[parameters_id[i]].values.array[0];
f_array_length_t length = strnlen(arguments->argv[location], F_console_parameter_size_d);
if (length > 0) {
} // for
}
- if (main->parameters[fake_parameter_define_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fake_parameter_define_e].result == f_console_result_found_e) {
fake_print_error_parameter_missing_value(main, fake_long_define_s);
return F_status_set_error(F_parameter);
for (uint8_t i = 0; i < 4; ++i) {
- if (main->parameters[parameters_id[i]].result == f_console_result_found_e) {
+ if (main->parameters.array[parameters_id[i]].result == f_console_result_found_e) {
fake_print_error_parameter_missing_value(main, parameters_name[i]);
return F_status_set_error(F_parameter);
}
- else if (main->parameters[parameters_id[i]].result == f_console_result_additional_e) {
- if (main->parameters[parameters_id[i]].values.used > 1) {
+ else if (main->parameters.array[parameters_id[i]].result == f_console_result_additional_e) {
+ if (main->parameters.array[parameters_id[i]].values.used > 1) {
fake_print_error_parameter_too_many(main, parameters_name[i]);
return F_status_set_error(F_parameter);
}
- status = fl_console_parameter_to_string_dynamic_directory(arguments->argv[main->parameters[parameters_id[i]].values.array[0]], parameters_value[i]);
+ status = fl_console_parameter_to_string_dynamic_directory(arguments->argv[main->parameters.array[parameters_id[i]].values.array[0]], parameters_value[i]);
if (F_status_is_error(status)) {
if (fll_error_print(main->error, F_status_set_fine(status), "fl_console_parameter_to_string_dynamic_directory", F_false) == F_known_not && main->error.verbosity != f_console_verbosity_quiet_e) {
} // for
}
- if (main->parameters[fake_parameter_define_e].result == f_console_result_additional_e) {
- status = fll_program_parameter_additional_rip(arguments->argv, main->parameters[fake_parameter_define_e].values, &main->define);
+ if (main->parameters.array[fake_parameter_define_e].result == f_console_result_additional_e) {
+ status = fll_program_parameter_additional_rip(arguments->argv, main->parameters.array[fake_parameter_define_e].values, &main->define);
if (F_status_is_error(status)) {
if (fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_additional_rip", F_false) == F_known_not && main->error.verbosity != f_console_verbosity_quiet_e) {
}
}
- if (main->parameters[fake_parameter_mode_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fake_parameter_mode_e].result == f_console_result_found_e) {
fake_print_error_parameter_missing_value(main, fake_long_mode_s);
return F_status_set_error(F_parameter);
}
- else if (main->parameters[fake_parameter_mode_e].result == f_console_result_additional_e) {
- status = fll_program_parameter_additional_rip(arguments->argv, main->parameters[fake_parameter_mode_e].values, &main->mode);
+ else if (main->parameters.array[fake_parameter_mode_e].result == f_console_result_additional_e) {
+ status = fll_program_parameter_additional_rip(arguments->argv, main->parameters.array[fake_parameter_mode_e].values, &main->mode);
if (F_status_is_error(status)) {
if (fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_additional_rip", F_false) == F_known_not && main->error.verbosity != f_console_verbosity_quiet_e) {
* Status codes (with error bit) are returned on any problem.
*/
#ifndef _di_fake_file_buffer_
- extern f_status_t fake_file_buffer(fake_main_t * const main, const f_string_t path_file, f_string_dynamic_t *buffer) F_attribute_visibility_internal_d;
+ extern f_status_t fake_file_buffer(fake_main_t * const main, const f_string_static_t path_file, f_string_dynamic_t *buffer) F_attribute_visibility_internal_d;
#endif // _di_fake_file_buffer_
/**
}
if (data_make->main->context.mode == F_color_mode_no_color_d) {
- if (data_make->main->parameters[fake_parameter_no_color_e].type == f_console_type_normal_e) {
+ if (data_make->main->parameters.array[fake_parameter_no_color_e].type == f_console_type_normal_e) {
*status = f_string_dynamic_append(f_console_symbol_short_enable_s, &data_make->parameter.color.array[data_make->parameter.color.used]);
}
- else if (data_make->main->parameters[fake_parameter_no_color_e].type == f_console_type_inverse_e) {
+ else if (data_make->main->parameters.array[fake_parameter_no_color_e].type == f_console_type_inverse_e) {
*status = f_string_dynamic_append(f_console_symbol_short_disable_s, &data_make->parameter.color.array[data_make->parameter.color.used]);
}
}
}
else if (data_make->main->context.mode == F_color_mode_dark_d) {
- if (data_make->main->parameters[fake_parameter_dark_e].type == f_console_type_normal_e) {
+ if (data_make->main->parameters.array[fake_parameter_dark_e].type == f_console_type_normal_e) {
*status = f_string_dynamic_append(f_console_symbol_short_enable_s, &data_make->parameter.color.array[data_make->parameter.color.used]);
}
- else if (data_make->main->parameters[fake_parameter_dark_e].type == f_console_type_inverse_e) {
+ else if (data_make->main->parameters.array[fake_parameter_dark_e].type == f_console_type_inverse_e) {
*status = f_string_dynamic_append(f_console_symbol_short_disable_s, &data_make->parameter.color.array[data_make->parameter.color.used]);
}
}
}
else {
- if (data_make->main->parameters[fake_parameter_light_e].type == f_console_type_normal_e) {
+ if (data_make->main->parameters.array[fake_parameter_light_e].type == f_console_type_normal_e) {
*status = f_string_dynamic_append(f_console_symbol_short_enable_s, &data_make->parameter.color.array[data_make->parameter.color.used]);
}
- else if (data_make->main->parameters[fake_parameter_light_e].type == f_console_type_inverse_e) {
+ else if (data_make->main->parameters.array[fake_parameter_light_e].type == f_console_type_inverse_e) {
*status = f_string_dynamic_append(f_console_symbol_short_disable_s, &data_make->parameter.color.array[data_make->parameter.color.used]);
}
}
if (data_make->main->error.verbosity == f_console_verbosity_quiet_e) {
- if (data_make->main->parameters[fake_parameter_verbosity_quiet_e].type == f_console_type_normal_e) {
+ if (data_make->main->parameters.array[fake_parameter_verbosity_quiet_e].type == f_console_type_normal_e) {
*status = f_string_dynamic_append(f_console_symbol_short_enable_s, &data_make->parameter.verbosity.array[data_make->parameter.verbosity.used]);
}
- else if (data_make->main->parameters[fake_parameter_verbosity_quiet_e].type == f_console_type_inverse_e) {
+ else if (data_make->main->parameters.array[fake_parameter_verbosity_quiet_e].type == f_console_type_inverse_e) {
*status = f_string_dynamic_append(f_console_symbol_short_disable_s, &data_make->parameter.verbosity.array[data_make->parameter.verbosity.used]);
}
}
}
else if (data_make->main->error.verbosity == f_console_verbosity_verbose_e) {
- if (data_make->main->parameters[fake_parameter_verbosity_verbose_e].type == f_console_type_normal_e) {
+ if (data_make->main->parameters.array[fake_parameter_verbosity_verbose_e].type == f_console_type_normal_e) {
*status = f_string_dynamic_append(f_console_symbol_short_enable_s, &data_make->parameter.verbosity.array[data_make->parameter.verbosity.used]);
}
- else if (data_make->main->parameters[fake_parameter_verbosity_verbose_e].type == f_console_type_inverse_e) {
+ else if (data_make->main->parameters.array[fake_parameter_verbosity_verbose_e].type == f_console_type_inverse_e) {
*status = f_string_dynamic_append(f_console_symbol_short_disable_s, &data_make->parameter.verbosity.array[data_make->parameter.verbosity.used]);
}
}
}
else {
- if (data_make->main->parameters[fake_parameter_verbosity_debug_e].type == f_console_type_normal_e) {
+ if (data_make->main->parameters.array[fake_parameter_verbosity_debug_e].type == f_console_type_normal_e) {
*status = f_string_dynamic_append(f_console_symbol_short_enable_s, &data_make->parameter.verbosity.array[data_make->parameter.verbosity.used]);
}
- else if (data_make->main->parameters[fake_parameter_verbosity_debug_e].type == f_console_type_inverse_e) {
+ else if (data_make->main->parameters.array[fake_parameter_verbosity_debug_e].type == f_console_type_inverse_e) {
*status = f_string_dynamic_append(f_console_symbol_short_disable_s, &data_make->parameter.verbosity.array[data_make->parameter.verbosity.used]);
}
};
const f_console_parameter_t *console[] = {
- &data_make->main->parameters[fake_parameter_define_e],
- &data_make->main->parameters[fake_parameter_mode_e],
+ &data_make->main->parameters.array[fake_parameter_define_e],
+ &data_make->main->parameters.array[fake_parameter_mode_e],
};
const f_string_dynamics_t *source[] = {
};
const f_console_parameter_t *console[] = {
- &data_make->main->parameters[fake_parameter_fakefile_e],
- &data_make->main->parameters[fake_parameter_path_build_e],
- &data_make->main->parameters[fake_parameter_path_data_e],
- &data_make->main->parameters[fake_parameter_path_sources_e],
- &data_make->main->parameters[fake_parameter_path_work_e],
- &data_make->main->parameters[fake_parameter_process_e],
- &data_make->main->parameters[fake_parameter_settings_e],
+ &data_make->main->parameters.array[fake_parameter_fakefile_e],
+ &data_make->main->parameters.array[fake_parameter_path_build_e],
+ &data_make->main->parameters.array[fake_parameter_path_data_e],
+ &data_make->main->parameters.array[fake_parameter_path_sources_e],
+ &data_make->main->parameters.array[fake_parameter_path_work_e],
+ &data_make->main->parameters.array[fake_parameter_process_e],
+ &data_make->main->parameters.array[fake_parameter_settings_e],
};
const f_string_dynamic_t *source[] = {
return;
}
- const f_string_static_t vocabulary_context = macro_f_string_static_t_initialize(F_iki_vocabulary_0002_context_s, F_iki_vocabulary_0002_context_s_length);
- const f_string_static_t vocabulary_define = macro_f_string_static_t_initialize(F_iki_vocabulary_0002_define_s, F_iki_vocabulary_0002_define_s_length);
- const f_string_static_t vocabulary_parameter = macro_f_string_static_t_initialize(F_iki_vocabulary_0002_parameter_s, F_iki_vocabulary_0002_parameter_s_length);
+ const f_string_static_t vocabulary_context = macro_f_string_static_t_initialize2(F_iki_vocabulary_0002_context_s, F_iki_vocabulary_0002_context_s_length);
+ const f_string_static_t vocabulary_define = macro_f_string_static_t_initialize2(F_iki_vocabulary_0002_define_s, F_iki_vocabulary_0002_define_s_length);
+ const f_string_static_t vocabulary_parameter = macro_f_string_static_t_initialize2(F_iki_vocabulary_0002_parameter_s, F_iki_vocabulary_0002_parameter_s_length);
const f_string_range_t range_context = macro_f_string_range_t_initialize(F_iki_vocabulary_0002_context_s_length);
const f_string_range_t range_define = macro_f_string_range_t_initialize(F_iki_vocabulary_0002_define_s_length);
if (state_process->operation == fake_make_operation_type_define_e) {
if (arguments.used > 1) {
- *status = f_environment_set(arguments.array[0].string, arguments.array[1].string, F_true);
+ *status = f_environment_set(arguments.array[0], arguments.array[1], F_true);
}
else {
- *status = f_environment_set(arguments.array[0].string, f_string_empty_s.string, F_true);
+ *status = f_environment_set(arguments.array[0], f_string_empty_s, F_true);
}
if (F_status_is_error(*status)) {
fl_execute_parameter_t parameter = macro_fl_execute_parameter_t_initialize(as_shell ? 0 : FL_execute_parameter_option_path_d, 0, &data_make->environment, &signals, 0);
- status = fll_execute_program(program.string, arguments, ¶meter, 0, (void *) &return_code);
+ status = fll_execute_program(program, arguments, ¶meter, 0, (void *) &return_code);
if (fake_signal_received(data_make->main)) {
return F_status_set_error(F_interrupt);
if (F_status_is_error(status_file)) {
status = status_file;
- fake_print_message_section_operation_path_outside(data_make->main, data_make->error, F_status_set_fine(status), "fake_make_assure_inside_project", data_make->path_cache.used ? data_make->path_cache.string : arguments.array[i].string);
+ fake_print_message_section_operation_path_outside(data_make->main, data_make->error, F_status_set_fine(status), "fake_make_assure_inside_project", data_make->path_cache.used ? data_make->path_cache : arguments.array[i]);
continue;
}
data_make->main->path_sources.used,
F_true,
data_make->main->path_work.used,
- data_make->main->parameters[fake_parameter_path_build_e].result == f_console_result_additional_e,
- data_make->main->parameters[fake_parameter_light_e].result == f_console_result_found_e || data_make->main->parameters[fake_parameter_dark_e].result == f_console_result_found_e || data_make->main->parameters[fake_parameter_no_color_e].result == f_console_result_found_e,
- data_make->main->parameters[fake_parameter_path_data_e].result == f_console_result_additional_e,
- data_make->main->parameters[fake_parameter_define_e].result == f_console_result_additional_e,
- data_make->main->parameters[fake_parameter_fakefile_e].result == f_console_result_additional_e,
- data_make->main->parameters[fake_parameter_mode_e].result == f_console_result_additional_e,
- data_make->main->parameters[fake_parameter_process_e].result == f_console_result_additional_e,
- data_make->main->parameters[fake_parameter_settings_e].result == f_console_result_additional_e,
- data_make->main->parameters[fake_parameter_path_sources_e].result == f_console_result_additional_e,
- data_make->main->parameters[fake_parameter_verbosity_quiet_e].result == f_console_result_found_e || data_make->main->parameters[fake_parameter_verbosity_normal_e].result == f_console_result_found_e || data_make->main->parameters[fake_parameter_verbosity_verbose_e].result == f_console_result_found_e || data_make->main->parameters[fake_parameter_verbosity_debug_e].result == f_console_result_found_e,
- data_make->main->parameters[fake_parameter_path_work_e].result == f_console_result_additional_e,
+ data_make->main->parameters.array[fake_parameter_path_build_e].result == f_console_result_additional_e,
+ data_make->main->parameters.array[fake_parameter_light_e].result == f_console_result_found_e || data_make->main->parameters.array[fake_parameter_dark_e].result == f_console_result_found_e || data_make->main->parameters.array[fake_parameter_no_color_e].result == f_console_result_found_e,
+ data_make->main->parameters.array[fake_parameter_path_data_e].result == f_console_result_additional_e,
+ data_make->main->parameters.array[fake_parameter_define_e].result == f_console_result_additional_e,
+ data_make->main->parameters.array[fake_parameter_fakefile_e].result == f_console_result_additional_e,
+ data_make->main->parameters.array[fake_parameter_mode_e].result == f_console_result_additional_e,
+ data_make->main->parameters.array[fake_parameter_process_e].result == f_console_result_additional_e,
+ data_make->main->parameters.array[fake_parameter_settings_e].result == f_console_result_additional_e,
+ data_make->main->parameters.array[fake_parameter_path_sources_e].result == f_console_result_additional_e,
+ data_make->main->parameters.array[fake_parameter_verbosity_quiet_e].result == f_console_result_found_e || data_make->main->parameters.array[fake_parameter_verbosity_normal_e].result == f_console_result_found_e || data_make->main->parameters.array[fake_parameter_verbosity_verbose_e].result == f_console_result_found_e || data_make->main->parameters.array[fake_parameter_verbosity_debug_e].result == f_console_result_found_e,
+ data_make->main->parameters.array[fake_parameter_path_work_e].result == f_console_result_additional_e,
data_make->parameter_value.build.used,
data_make->parameter_value.color.used,
data_make->parameter_value.data.used,
if (if_not) {
for (f_array_length_t i = 3; i < arguments.used; ++i) {
- if (f_environment_exists(arguments.array[i].string) == F_true) {
+ if (f_environment_exists(arguments.array[i]) == F_true) {
state_process->condition_result = fake_condition_result_false_e;
break;
else {
for (f_array_length_t i = 2; i < arguments.used; ++i) {
- if (f_environment_exists(arguments.array[i].string) != F_true) {
+ if (f_environment_exists(arguments.array[i].) != F_true) {
state_process->condition_result = fake_condition_result_false_e;
break;
if (F_status_is_error(status)) {
state_process->condition_result = fake_condition_result_error_e;
- fll_error_file_print(data_make->error, F_status_set_fine(status), "f_file_exists", F_true, arguments.array[i].string, "find", fll_error_file_type_file_e);
+ fll_error_file_print(data_make->error, F_status_set_fine(status), "f_file_exists", F_true, arguments.array[i].string, f_file_operation_find_s, fll_error_file_type_file_e);
break;
}
if (F_status_is_error(status_file)) {
status = status_file;
- fake_print_message_section_operation_path_outside(data_make->main, data_make->error, F_status_set_fine(status), "fake_make_assure_inside_project", data_make->path_cache.used ? data_make->path_cache.string : arguments.array[i].string);
+ fake_print_message_section_operation_path_outside(data_make->main, data_make->error, F_status_set_fine(status), "fake_make_assure_inside_project", data_make->path_cache.used ? data_make->path_cache : arguments.array[i]);
continue;
}
status = f_path_change(data_make->path.stack.array[data_make->path.stack.used - 1].string);
if (F_status_is_error(status)) {
- fake_print_message_section_operation_path_stack_max(data_make->main, data_make->error, F_status_set_fine(status), "f_path_change", data_make->path.stack.array[data_make->path.stack.used - 1].string);
+ fake_print_message_section_operation_path_stack_max(data_make->main, data_make->error, F_status_set_fine(status), "f_path_change", data_make->path.stack.array[data_make->path.stack.used - 1]);
return 0;
}
status = fake_make_assure_inside_project(data_make, arguments.array[0]);
if (F_status_is_error(status)) {
- fake_print_message_section_operation_path_outside(data_make->main, data_make->error, F_status_set_fine(status), "fake_make_assure_inside_project", data_make->path_cache.used ? data_make->path_cache.string : arguments.array[0].string);
+ fake_print_message_section_operation_path_outside(data_make->main, data_make->error, F_status_set_fine(status), "fake_make_assure_inside_project", data_make->path_cache.used ? data_make->path_cache : arguments.array[0]);
if (F_status_set_fine(status) == F_false) {
status = F_status_set_error(F_failure);
status = f_path_change(arguments.array[0].string);
if (F_status_is_error(status)) {
- fake_print_message_section_operation_path_stack_max(data_make->main, data_make->error, F_status_set_fine(status), "f_path_change", arguments.array[0].string);
+ fake_print_message_section_operation_path_stack_max(data_make->main, data_make->error, F_status_set_fine(status), "f_path_change", arguments.array[0]);
}
else {
status = f_string_dynamics_increase_by(F_memory_default_allocation_small_d, &data_make->path.stack);
if (F_status_set_fine(status) == F_array_too_large) {
- fake_print_message_section_operation_path_stack_max(data_make->main, data_make->error, F_array_too_large, "f_string_dynamics_increase_by", "path stack");
+ fake_print_message_section_operation_path_stack_max(data_make->main, data_make->error, F_array_too_large, "f_string_dynamics_increase_by", fake_common_file_path_stack_s_length);
return status;
}
status = f_path_change_at(data_make->path.top.id);
if (F_status_is_error(status)) {
- fake_print_message_section_operation_path_stack_max(data_make->main, data_make->error, F_status_set_fine(status), "f_path_change", arguments.array[0].string);
+ fake_print_message_section_operation_path_stack_max(data_make->main, data_make->error, F_status_set_fine(status), "f_path_change", arguments.array[0]);
return status;
}
*status = F_status_set_error(status_file);
}
else if (F_status_is_error(status_file)) {
- fll_error_file_print(data_make->error, F_status_set_fine(status_file), "f_file_is", F_true, path_file, "find", fll_error_file_type_file_e);
+ fll_error_file_print(data_make->error, F_status_set_fine(status_file), "f_file_is", F_true, path_file, f_file_operation_find_s, fll_error_file_type_file_e);
*status = status_file;
}
else if (!status_file) {
*status = fake_make_assure_inside_project(data_make, arguments.array[i]);
if (F_status_is_error(*status)) {
- fake_print_message_section_operation_path_outside(data_make->main, data_make->error, F_status_set_fine(*status), "fake_make_assure_inside_project", data_make->path_cache.used ? data_make->path_cache.string : arguments.array[i].string);
+ fake_print_message_section_operation_path_outside(data_make->main, data_make->error, F_status_set_fine(*status), "fake_make_assure_inside_project", data_make->path_cache.used ? data_make->path_cache : arguments.array[i]);
if (F_status_set_fine(*status) == F_false) {
*status = F_status_set_error(F_failure);
*status = F_status_set_error(F_failure);
}
else if (F_status_is_error(status_file)) {
- fll_error_file_print(data_make->error, F_status_set_fine(status_file), "f_directory_is", F_true, arguments.array[arguments.used - 1].string, "find", fll_error_file_type_directory_e);
+ fll_error_file_print(data_make->error, F_status_set_fine(status_file), "f_directory_is", F_true, arguments.array[arguments.used - 1].string, f_file_operation_find_s, fll_error_file_type_directory_e);
*status = F_status_set_error(F_failure);
}
}
*status = fake_make_assure_inside_project(data_make, arguments.array[i]);
if (F_status_is_error(*status)) {
- fake_print_message_section_operation_path_outside(data_make->main, data_make->error, F_status_set_fine(*status), "fake_make_assure_inside_project", data_make->path_cache.used ? data_make->path_cache.string : arguments.array[i].string);
+ fake_print_message_section_operation_path_outside(data_make->main, data_make->error, F_status_set_fine(*status), "fake_make_assure_inside_project", data_make->path_cache.used ? data_make->path_cache : arguments.array[i]);
if (F_status_set_fine(*status) == F_false) {
*status = F_status_set_error(F_failure);
*status = fake_make_assure_inside_project(data_make, arguments.array[i]);
if (F_status_is_error(*status)) {
- fake_print_message_section_operation_path_outside(data_make->main, data_make->error, F_status_set_fine(*status), "fake_make_assure_inside_project", data_make->path_cache.used ? data_make->path_cache.string : arguments.array[i].string);
+ fake_print_message_section_operation_path_outside(data_make->main, data_make->error, F_status_set_fine(*status), "fake_make_assure_inside_project", data_make->path_cache.used ? data_make->path_cache : arguments.array[i]);
if (F_status_set_fine(*status) == F_false) {
*status = F_status_set_error(F_failure);
}
else if (F_status_is_error(status_file)) {
if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->error.to.stream) {
- fll_error_file_print(data_make->error, F_status_set_fine(*status), "f_file_is", F_true, arguments.array[i].string, "find", fll_error_file_type_directory_e);
+ fll_error_file_print(data_make->error, F_status_set_fine(*status), "f_file_is", F_true, arguments.array[i].string, f_file_operation_find_s, fll_error_file_type_directory_e);
}
*status = status_file;
status_file = fake_make_assure_inside_project(data_make, arguments.array[i]);
if (F_status_is_error(status_file)) {
- fake_print_message_section_operation_path_outside(data_make->main, data_make->error, F_status_set_fine(status_file), "fake_make_assure_inside_project", data_make->path_cache.used ? data_make->path_cache.string : arguments.array[i].string);
+ fake_print_message_section_operation_path_outside(data_make->main, data_make->error, F_status_set_fine(status_file), "fake_make_assure_inside_project", data_make->path_cache.used ? data_make->path_cache : arguments.array[i]);
if (F_status_is_error_not(*status)) {
if (F_status_set_fine(status_file) == F_false) {
}
if (F_status_is_error(status_file)) {
- fll_error_file_print(data_make->error, F_status_set_fine(status_file), "f_file_exists", F_true, arguments.array[i].string, "find", fll_error_file_type_file_e);
+ fll_error_file_print(data_make->error, F_status_set_fine(status_file), "f_file_exists", F_true, arguments.array[i].string, f_file_operation_find_s, fll_error_file_type_file_e);
if (F_status_is_error_not(*status)) {
*status = F_status_set_error(status_file);
*status = fake_make_assure_inside_project(data_make, arguments.array[0]);
if (F_status_is_error(*status)) {
- fake_print_message_section_operation_path_outside(data_make->main, data_make->error, F_status_set_fine(*status), "fake_make_assure_inside_project", data_make->path_cache.used ? data_make->path_cache.string : arguments.array[0].string);
+ fake_print_message_section_operation_path_outside(data_make->main, data_make->error, F_status_set_fine(*status), "fake_make_assure_inside_project", data_make->path_cache.used ? data_make->path_cache : arguments.array[0]);
if (F_status_set_fine(*status) == F_false) {
*status = F_status_set_error(F_failure);
*status = fake_make_assure_inside_project(data_make, arguments.array[1]);
if (F_status_is_error(*status)) {
- fake_print_message_section_operation_path_outside(data_make->main, data_make->error, F_status_set_fine(*status), "fake_make_assure_inside_project", data_make->path_cache.used ? data_make->path_cache.string : arguments.array[1].string);
+ fake_print_message_section_operation_path_outside(data_make->main, data_make->error, F_status_set_fine(*status), "fake_make_assure_inside_project", data_make->path_cache.used ? data_make->path_cache : arguments.array[1]);
if (F_status_set_fine(*status) == F_false) {
*status = F_status_set_error(F_failure);
*status = fake_make_assure_inside_project(data_make, arguments.array[i]);
if (F_status_is_error(*status)) {
- fake_print_message_section_operation_path_outside(data_make->main, data_make->error, F_status_set_fine(*status), "fake_make_assure_inside_project", data_make->path_cache.used ? data_make->path_cache.string : arguments.array[i].string);
+ fake_print_message_section_operation_path_outside(data_make->main, data_make->error, F_status_set_fine(*status), "fake_make_assure_inside_project", data_make->path_cache.used ? data_make->path_cache : arguments.array[i]);
if (F_status_set_fine(*status) == F_false) {
*status = F_status_set_error(F_failure);
}
else if (F_status_is_error(status_file)) {
if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->error.to.stream) {
- fll_error_file_print(data_make->error, F_status_set_fine(*status), "f_file_is", F_true, data_make->main->file_data_build_fakefile.string, "find", fll_error_file_type_file_e);
+ fll_error_file_print(data_make->error, F_status_set_fine(*status), "f_file_is", F_true, data_make->main->file_data_build_fakefile.string, f_file_operation_find_s, fll_error_file_type_file_e);
}
*status = status_file;
*status = fake_make_assure_inside_project(data_make, arguments.array[i]);
if (F_status_is_error(*status)) {
- fake_print_message_section_operation_path_outside(data_make->main, data_make->error, F_status_set_fine(*status), "fake_make_assure_inside_project", data_make->path_cache.used ? data_make->path_cache.string : arguments.array[i].string);
+ fake_print_message_section_operation_path_outside(data_make->main, data_make->error, F_status_set_fine(*status), "fake_make_assure_inside_project", data_make->path_cache.used ? data_make->path_cache : arguments.array[i]);
if (F_status_set_fine(*status) == F_false) {
*status = F_status_set_error(F_failure);
#endif
#ifndef _di_fake_print_error_build_operation_file_
- bool fake_print_error_build_operation_file(fake_main_t * const main, const f_status_t status, const f_string_t function, const f_string_static_t operation, const f_string_t how, const f_string_t source, const f_string_t destination, const bool fallback) {
+ bool fake_print_error_build_operation_file(fake_main_t * const main, const f_status_t status, const f_string_t function, const f_string_static_t operation, const f_string_static_t source, const f_string_static_t destination, const f_string_static_t how, const bool fallback) {
if (status == F_file_found_not) {
if (main->error.verbosity != f_console_verbosity_quiet_e) {
fl_print_format("%q%[%QFailed to find '%]", main->error.to.stream, f_string_eol_s, main->error.context, main->error.prefix, main->error.context);
- if (source) {
- fl_print_format("%[%S%]", main->error.to.stream, main->error.notable, f_file_exists(source) == F_true ? destination : source, main->error.notable);
- }
-
- fl_print_format("%[while trying to %Q '%]", main->error.to.stream, main->error.context, operation, main->error.context);
-
- if (source) {
- fl_print_format("%[%S%]", main->error.to.stream, main->error.notable, source, main->error.notable);
- }
-
- if (destination) {
- fl_print_format("%[' %S '%]", main->error.to.stream, main->error.context, how, main->error.context);
- fl_print_format("%[%S%]", main->error.to.stream, main->error.notable, destination, main->error.notable);
- }
+ fake_print_error_build_operation_file_message(main, operation, source, destination, how);
fl_print_format("%['.%]%q", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s);
fl_print_format("%[%S%]", main->error.to.stream, main->error.notable, function, main->error.notable);
fl_print_format("%[() to %Q '%]", main->error.to.stream, main->error.context, operation, main->error.context);
- if (source) {
- fl_print_format("%[%S%]", main->error.to.stream, main->error.notable, source, main->error.notable);
- }
-
- if (destination) {
- fl_print_format("%[' %S '%]", main->error.to.stream, main->error.context, how, main->error.context);
- fl_print_format("%[%S%]", main->error.to.stream, main->error.notable, destination, main->error.notable);
- }
+ fake_print_error_build_operation_file_message(main, operation, source, destination, how);
fl_print_format("%['.%]%q", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s);
fl_print_format("%q%[%QInvalid name for '%]", main->error.to.stream, f_string_eol_s, main->error.context, main->error.prefix, main->error.context);
- if (source) {
- fl_print_format("%[%S%]", main->error.to.stream, main->error.notable, source, main->error.notable);
+ if (source.used) {
+ fl_print_format("%[%Q%]", main->error.to.stream, main->error.notable, source, main->error.notable);
}
- if (destination) {
+ if (destination.used) {
fl_print_format("%[' or '%]", main->error.to.stream, main->error.context, main->error.context);
- fl_print_format("%[%S%]", main->error.to.stream, main->error.notable, destination, main->error.notable);
+ fl_print_format("%[%Q%]", main->error.to.stream, main->error.notable, destination, main->error.notable);
}
fl_print_format("%['.%]%q", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s);
fl_print_format("%q%[%QUnable to allocate memory, while trying to %Q '%]", main->error.to.stream, f_string_eol_s, main->error.context, main->error.prefix, operation, main->error.context);
- if (source) {
- fl_print_format("%[%S%]", main->error.to.stream, main->error.notable, source, main->error.notable);
- }
-
- if (destination) {
- fl_print_format("%[' %S '%]", main->error.to.stream, main->error.context, how, main->error.context);
- fl_print_format("%[%S%]", main->error.to.stream, main->error.notable, destination, main->error.notable);
- }
+ fake_print_error_build_operation_file_message(main, operation, source, destination, how);
fl_print_format("%['.%]%q", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s);
fl_print_format("%q%[%QOverflow while trying to %Q '%]", main->error.to.stream, f_string_eol_s, main->error.context, main->error.prefix, operation, main->error.context);
- if (source) {
- fl_print_format("%[%S%]", main->error.to.stream, main->error.notable, source, main->error.notable);
- }
-
- if (destination) {
- fl_print_format("%[' %S '%]", main->error.to.stream, main->error.context, how, main->error.context);
- fl_print_format("%[%S%]", main->error.to.stream, main->error.notable, destination, main->error.notable);
- }
+ fake_print_error_build_operation_file_message(main, operation, source, destination, how);
fl_print_format("%['.%]%q", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s);
fl_print_format("%q%[%QInvalid directory while trying to %Q '%]", main->error.to.stream, f_string_eol_s, main->error.context, main->error.prefix, operation, main->error.context);
- if (source) {
- fl_print_format("%[%S%]", main->error.to.stream, main->error.notable, source, main->error.notable);
- }
-
- if (destination) {
- fl_print_format("%[' %S '%]", main->error.to.stream, main->error.context, how, main->error.context);
- fl_print_format("%[%S%]", main->error.to.stream, main->error.notable, destination, main->error.notable);
- }
+ fake_print_error_build_operation_file_message(main, operation, source, destination, how);
fl_print_format("%['.%]%q", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s);
fl_print_format("%q%[%QAccess denied while trying to %Q '%]", main->error.to.stream, f_string_eol_s, main->error.context, main->error.prefix, operation, main->error.context);
- if (source) {
- fl_print_format("%[%S%]", main->error.to.stream, main->error.notable, source, main->error.notable);
- }
-
- if (destination) {
- fl_print_format("%[' %S '%]", main->error.to.stream, main->error.context, how, main->error.context);
- fl_print_format("%[%S%]", main->error.to.stream, main->error.notable, destination, main->error.notable);
- }
+ fake_print_error_build_operation_file_message(main, operation, source, destination, how);
fl_print_format("%['.%]%q", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s);
fl_print_format("%q%[%QLoop while trying to %Q '%]", main->error.to.stream, f_string_eol_s, main->error.context, main->error.prefix, operation, main->error.context);
- if (source) {
- fl_print_format("%[%S%]", main->error.to.stream, main->error.notable, source, main->error.notable);
- }
-
- if (destination) {
- fl_print_format("%[' %S '%]", main->error.to.stream, main->error.context, how, main->error.context);
- fl_print_format("%[%S%]", main->error.to.stream, main->error.notable, destination, main->error.notable);
- }
+ fake_print_error_build_operation_file_message(main, operation, source, destination, how);
fl_print_format("%['.%]%q", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s);
fl_print_format("%q%[%QProhibited by system while trying to %Q '%]", main->error.to.stream, f_string_eol_s, main->error.context, main->error.prefix, operation, main->error.context);
- if (source) {
- fl_print_format("%[%S%]", main->error.to.stream, main->error.notable, source, main->error.notable);
- }
-
- if (destination) {
- fl_print_format("%[' %S '%]", main->error.to.stream, main->error.context, how, main->error.context);
- fl_print_format("%[%S%]", main->error.to.stream, main->error.notable, destination, main->error.notable);
- }
+ fake_print_error_build_operation_file_message(main, operation, source, destination, how);
fl_print_format("%['.%]%q", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s);
fl_print_format("%q%[%QFailed to %Q '%]", main->error.to.stream, f_string_eol_s, main->error.context, main->error.prefix, operation, main->error.context);
- if (source) {
- fl_print_format("%[%S%]", main->error.to.stream, main->error.notable, source, main->error.notable);
- }
-
- if (destination) {
- fl_print_format("%[' %S '%]", main->error.to.stream, main->error.context, how, main->error.context);
- fl_print_format("%[%S%]", main->error.to.stream, main->error.notable, destination, main->error.notable);
- }
+ fake_print_error_build_operation_file_message(main, operation, source, destination, how);
fl_print_format("%[' due to an invalid directory in the path.%]%q", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s);
fl_print_format("%q%[%QFailed to %Q '%]", main->error.to.stream, f_string_eol_s, main->error.context, main->error.prefix, operation, main->error.context);
- if (source) {
- fl_print_format("%[%S%]", main->error.to.stream, main->error.notable, source, main->error.notable);
- }
-
- if (destination) {
- fl_print_format("%[' %S '%]", main->error.to.stream, main->error.context, how, main->error.context);
- fl_print_format("%[%S%]", main->error.to.stream, main->error.notable, destination, main->error.notable);
- }
+ fake_print_error_build_operation_file_message(main, operation, source, destination, how);
fl_print_format("%['.%]%q", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s);
fl_print_format("%[%ui%]", main->error.to.stream, main->error.notable, status, main->error.notable);
fl_print_format("%[) occurred while trying to %Q '%]", main->error.to.stream, main->error.context, operation, main->error.context);
- if (source) {
- fl_print_format("%[%S%]", main->error.to.stream, main->error.notable, source, main->error.notable);
- }
-
- if (destination) {
- fl_print_format("%[' %S '%]", main->error.to.stream, main->error.context, how, main->error.context);
- fl_print_format("%[%S%]", main->error.to.stream, main->error.notable, destination, main->error.notable);
- }
+ fake_print_error_build_operation_file_message(main, operation, source, destination, how);
fl_print_format("%['.%]%q", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s);
}
#endif // _di_fake_print_error_build_operation_file_
+#ifndef _di_fake_print_error_build_operation_file_message_
+ void fake_print_error_build_operation_file_message(fake_main_t * const main, const f_string_static_t operation, const f_string_static_t source, const f_string_static_t destination, const f_string_static_t how) {
+
+ if (source.used) {
+ fl_print_format("%[%Q%]", main->error.to.stream, main->error.notable, source, main->error.notable);
+ }
+
+ fl_print_format("%[while trying to %Q '%]", main->error.to.stream, main->error.context, operation, main->error.context);
+
+ if (destination.used) {
+ fl_print_format("%[' %Q '%]", main->error.to.stream, main->error.context, how, main->error.context);
+ fl_print_format("%[%Q%]", main->error.to.stream, main->error.notable, destination, main->error.notable);
+ }
+ else if (source.used) {
+ fl_print_format("%[%Q%]", main->error.to.stream, main->error.notable, source, main->error.notable);
+ }
+ }
+#endif // #ifndef _di_fake_print_error_build_operation_file_message_
+
#ifndef _di_fake_print_error_fss
bool fake_print_error_fss(fake_main_t * const main, const f_status_t status, const f_string_t function, const f_string_t path_file, const f_string_range_t range, const bool fallback) {
fl_print_format("%q%[%QOccurred on invalid UTF-8 character at stop position (at '%]", main->error.to.stream, f_string_eol_s, main->error.context, main->error.prefix, main->error.context);
fl_print_format("%[%un%]", main->error.to.stream, main->error.notable, range.start, main->error.notable);
fl_print_format("%[ of setting file '%]", main->error.to.stream, main->error.context, main->error.context);
- fl_print_format("%[%S%]", main->error.to.stream, main->error.notable, path_file, main->error.notable);
+ fl_print_format("%[%Q%]", main->error.to.stream, main->error.notable, path_file, main->error.notable);
fl_print_format("%[').%]%q", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s);
funlockfile(main->error.to.stream);
fl_print_format("%q%[%QOccurred on invalid UTF-8 character at %s (at '%]", main->error.to.stream, f_string_eol_s, main->error.context, main->error.prefix, status == F_complete_not_utf_eos ? "end of string" : "stop point of string", main->error.context);
fl_print_format("%[%un%]", main->error.to.stream, main->error.notable, range.start, main->error.notable);
fl_print_format("%[ of setting file '%]", main->error.to.stream, main->error.context, main->error.context);
- fl_print_format("%[%S%]", main->error.to.stream, main->error.notable, path_file, main->error.notable);
+ fl_print_format("%[%Q%]", main->error.to.stream, main->error.notable, path_file, main->error.notable);
fl_print_format("%[').%]%q", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s);
funlockfile(main->error.to.stream);
fl_print_format("%q%[%QOccurred on invalid UTF-8 character at stop point of string (at '%]", main->error.to.stream, f_string_eol_s, main->error.context, main->error.prefix, main->error.context);
fl_print_format("%[%un%]", main->error.to.stream, main->error.notable, range.start, main->error.notable);
fl_print_format("%[ of setting file '%]", main->error.to.stream, main->error.context, main->error.context);
- fl_print_format("%[%S%]", main->error.to.stream, main->error.notable, path_file, main->error.notable);
+ fl_print_format("%[%Q%]", main->error.to.stream, main->error.notable, path_file, main->error.notable);
fl_print_format("%[').%]%q", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s);
funlockfile(main->error.to.stream);
fl_print_format("%q%[UNKNOWN %Q(%]", main->error.to.stream, f_string_eol_s, main->error.context, main->error.prefix, main->error.context);
fl_print_format("%[%ui%]", main->error.to.stream, main->error.notable, status, main->error.notable);
fl_print_format("%[) in function '%]", main->error.to.stream, main->error.context, main->error.context);
- fl_print_format("%[%S%]", main->error.to.stream, main->error.notable, function, main->error.notable);
+ fl_print_format("%[%Q%]", main->error.to.stream, main->error.notable, function, main->error.notable);
fl_print_format("%[().%]%q", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s);
funlockfile(main->error.to.stream);
#endif // _di_fake_print_message_section_operation_failed_
#ifndef _di_fake_print_message_section_operation_path_outside_
- void fake_print_message_section_operation_path_outside(fake_main_t * const main, const fl_print_t print, const f_status_t status, const f_string_t function, const f_string_t path) {
+ void fake_print_message_section_operation_path_outside(fake_main_t * const main, const fl_print_t print, const f_status_t status, const f_string_t function, const f_string_static_t path) {
if (main->error.verbosity == f_console_verbosity_quiet_e || !print.to.stream) return;
if (F_status_set_fine(status) == F_false) {
fl_print_format("%q%[%QThe path '%]", main->error.to.stream, f_string_eol_s, main->error.context, main->error.prefix, main->error.context);
- fl_print_format("%[%S%]", main->error.to.stream, main->error.notable, path, main->error.notable);
+ fl_print_format("%[%Q%]", main->error.to.stream, main->error.notable, path, main->error.notable);
fl_print_format("%[' is outside the project root.%]%q", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s);
}
else {
- fll_error_file_print(main->error, F_status_set_fine(status), function, F_true, path, "determine real path of", fll_error_file_type_file_e);
+ fll_error_file_print(main->error, F_status_set_fine(status), function, F_true, path, fake_common_file_path_determine_real_s, fll_error_file_type_file_e);
}
funlockfile(main->error.to.stream);
#endif // _di_fake_print_message_section_operation_path_outside_
#ifndef _di_fake_print_message_section_operation_path_stack_max_
- void fake_print_message_section_operation_path_stack_max(fake_main_t * const main, fl_print_t print, const f_status_t status, const f_string_t function, const f_string_t path) {
+ void fake_print_message_section_operation_path_stack_max(fake_main_t * const main, fl_print_t print, const f_status_t status, const f_string_t function, const f_string_static_t path) {
if (main->error.verbosity == f_console_verbosity_quiet_e || !print.to.stream) return;
flockfile(main->error.to.stream);
fl_print_format("%q%[%QMaximum stack size reached while processing path '%]", main->error.to.stream, f_string_eol_s, main->error.context, main->error.prefix, main->error.context);
- fl_print_format("%[%S%]", main->error.to.stream, main->error.notable, path, main->error.notable);
+ fl_print_format("%[%Q%]", main->error.to.stream, main->error.notable, path, main->error.notable);
fl_print_format("%['", main->error.to.stream, main->error.context);
if (function) {
funlockfile(main->error.to.stream);
}
else {
- fll_error_file_print(print, status, function, F_true, path, "change path to", fll_error_file_type_directory_e);
+ fll_error_file_print(print, status, function, F_true, path, fake_common_file_path_change_to_s, fll_error_file_type_directory_e);
}
}
#endif // _di_fake_print_message_section_operation_path_stack_max_
flockfile(main->error.to.stream);
- fl_print_format("%q%[%SThe section operation '%]", main->error.to.stream, f_string_eol_s, main->error.context, main->error.prefix, main->error.context);
+ fl_print_format("%q%[%QThe section operation '%]", main->error.to.stream, f_string_eol_s, main->error.context, main->error.prefix, main->error.context);
fl_print_format("%[%/Q%]", main->error.to.stream, main->error.notable, buffer, operation_name, main->error.notable);
fl_print_format("%[' from section '%]", main->error.to.stream, main->error.context, buffer, main->error.context);
fl_print_format("%[%/Q%]", main->error.to.stream, main->error.notable, buffer, section_name, main->error.notable);
* The operation performed.
* @param source
* The operation source.
- * Set to 0 to disable.
* @param destination
* The operation destination, if applicable.
- * Requires source to be non-zero.
- * Set to 0 to disable.
+ * Set destination.used to 0 to disable.
* @param how
* The how the operation is perform, such as "to" in "copy" source "to" destination.
- * Requires source and destination to be non-zero.
* @param fallback
* Set to F_true to print the fallback error message for unknown errors.
*
* @see funlockfile()
*
* @see fl_print_format()
+ *
+ * @see fake_print_error_build_operation_file_message();
*/
#ifndef _di_fake_print_error_operation_file_
- extern bool fake_print_error_build_operation_file(fake_main_t * const main, const f_status_t status, const f_string_t function, const f_string_static_t operation, const f_string_t source, const f_string_t destination, const f_string_t how, const bool fallback) F_attribute_visibility_internal_d;
+ extern bool fake_print_error_build_operation_file(fake_main_t * const main, const f_status_t status, const f_string_t function, const f_string_static_t operation, const f_string_static_t source, const f_string_static_t destination, const f_string_static_t how, const bool fallback) F_attribute_visibility_internal_d;
#endif // _di_fake_print_error_operation_file_
/**
+ * Helper function for printing build operation file error messages.
+ *
+ * This prints the "copy source to destination" part of the message.
+ *
+ * @param main
+ * The main program data.
+ * @param operation
+ * The operation performed.
+ * @param source
+ * The operation source.
+ * @param destination
+ * The operation destination, if applicable.
+ * Set destination.used to 0 to disable.
+ * @param how
+ * The how the operation is perform, such as "to" in "copy" source "to" destination.
+ *
+ * @see fl_print_format()
+ *
+ * @see fake_print_error_build_operation_file()
+ */
+#ifndef _di_fake_print_error_build_operation_file_message_
+ extern void fake_print_error_build_operation_file_message(fake_main_t * const main, const f_string_static_t operation, const f_string_static_t source, const f_string_static_t destination, const f_string_static_t how) F_attribute_visibility_internal_d;
+#endif // _di_fake_print_error_build_operation_file_message_
+
+/**
* Print FSS error messages.
*
* @param main
* @see fll_error_file_print()
*/
#ifndef _di_fake_print_message_section_operation_path_outside_
- extern void fake_print_message_section_operation_path_outside(fake_main_t * const main, const fl_print_t print, const f_status_t status, const f_string_t function, const f_string_t path) F_attribute_visibility_internal_d;
+ extern void fake_print_message_section_operation_path_outside(fake_main_t * const main, const fl_print_t print, const f_status_t status, const f_string_t function, const f_string_static_t path) F_attribute_visibility_internal_d;
#endif // _fake_print_message_section_operation_path_outside_
/**
* @see fll_error_file_print()
*/
#ifndef _di_fake_print_message_section_operation_path_stack_max_
- extern void fake_print_message_section_operation_path_stack_max(fake_main_t * const main, fl_print_t error, const f_status_t status, const f_string_t function, const f_string_t path) F_attribute_visibility_internal_d;
+ extern void fake_print_message_section_operation_path_stack_max(fake_main_t * const main, fl_print_t error, const f_status_t status, const f_string_t function, const f_string_static_t path) F_attribute_visibility_internal_d;
#endif // _di_fake_print_message_section_operation_path_stack_max_
/**
funlockfile(main->error.to.stream);
}
else {
- fll_error_file_print(main->error, F_status_set_fine(status), "f_directory_create", F_true, path.string, "create", fll_error_file_type_directory_e);
+ fll_error_file_print(main->error, F_status_set_fine(status), "f_directory_create", F_true, path, f_file_operation_create_s, fll_error_file_type_directory_e);
}
return status;
}
}
else if (F_status_is_error(status)) {
- fll_error_file_print(main->error, F_status_set_fine(status), "f_directory_exists", F_true, path.string, "create", fll_error_file_type_directory_e);
+ fll_error_file_print(main->error, F_status_set_fine(status), "f_directory_exists", F_true, path, f_file_operation_create_s, fll_error_file_type_directory_e);
return status;
}
funlockfile(main->error.to.stream);
}
else {
- fll_error_file_print(main->error, F_status_set_fine(status), "f_file_create", F_true, path.string, "create", fll_error_file_type_file_e);
+ fll_error_file_print(main->error, F_status_set_fine(status), "f_file_create", F_true, path, f_file_operation_create_s, fll_error_file_type_file_e);
}
return status;
status = f_file_open(path.string, 0, &file);
if (F_status_is_error(status)) {
- fll_error_file_print(main->error, F_status_set_fine(status), "f_file_open", F_true, path.string, "pre-populate", fll_error_file_type_file_e);
+ fll_error_file_print(main->error, F_status_set_fine(status), "f_file_open", F_true, path, fake_common_file_populate_pre_s, fll_error_file_type_file_e);
return status;
}
status = f_file_write(file, content, 0);
if (F_status_is_error(status)) {
- fll_error_file_print(main->error, F_status_set_fine(status), "f_file_write", F_true, path.string, "pre-populate", fll_error_file_type_file_e);
+ fll_error_file_print(main->error, F_status_set_fine(status), "f_file_write", F_true, path, fake_common_file_populate_pre_s, fll_error_file_type_file_e);
f_file_stream_close(F_true, &file);
return status;
}
}
else if (F_status_is_error(status)) {
- fll_error_file_print(main->error, F_status_set_fine(status), "f_file_is", F_true, path.string, "create", fll_error_file_type_file_e);
+ fll_error_file_print(main->error, F_status_set_fine(status), "f_file_is", F_true, path, f_file_operation_create_s, fll_error_file_type_file_e);
return status;
}
#endif
#ifndef _di_firewall_program_version_
- const f_string_static_t firewall_program_version_s = macro_f_string_static_t_initialize2(FIREWALL_program_version_s, 0, FIREWALL_program_version_s_length);
+ const f_string_static_t firewall_program_version_s = macro_f_string_static_t_initialize(FIREWALL_program_version_s, 0, FIREWALL_program_version_s_length);
#endif // _di_firewall_program_version_
#ifndef _di_firewall_program_name_
- const f_string_static_t firewall_program_name_s = macro_f_string_static_t_initialize2(FIREWALL_program_name_s, 0, FIREWALL_program_name_s_length);
- const f_string_static_t firewall_program_name_long_s = macro_f_string_static_t_initialize2(FIREWALL_program_name_long_s, 0, FIREWALL_program_name_long_s_length);
+ const f_string_static_t firewall_program_name_s = macro_f_string_static_t_initialize(FIREWALL_program_name_s, 0, FIREWALL_program_name_s_length);
+ const f_string_static_t firewall_program_name_long_s = macro_f_string_static_t_initialize(FIREWALL_program_name_long_s, 0, FIREWALL_program_name_long_s_length);
#endif // _di_firewall_program_name_
#ifndef _di_firewall_print_help_
f_status_t status = F_none;
- {
- const f_console_parameters_t parameters = macro_f_console_parameters_t_initialize(main->parameters, firewall_total_parameters_d);
+ f_console_parameter_t parameters[] = firewall_console_parameter_t_initialize;
+ main->parameters.array = parameters;
+ main->parameters.used = firewall_total_parameters_d;
- {
- f_console_parameter_id_t ids[3] = { firewall_parameter_no_color_e, firewall_parameter_light_e, firewall_parameter_dark_e };
- const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 3);
+ {
+ f_console_parameter_id_t ids[3] = { firewall_parameter_no_color_e, firewall_parameter_light_e, firewall_parameter_dark_e };
+ const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 3);
- status = fll_program_parameter_process(*arguments, parameters, choices, F_true, &main->remaining, &main->context);
+ status = fll_program_parameter_process(*arguments, &main->parameters, choices, F_true, &main->remaining, &main->context);
- main->output.set = &main->context.set;
- main->error.set = &main->context.set;
- main->warning.set = &main->context.set;
+ main->output.set = &main->context.set;
+ main->error.set = &main->context.set;
+ main->warning.set = &main->context.set;
- if (main->context.set.error.before) {
- main->output.context = f_color_set_empty_s;
- main->output.notable = main->context.set.notable;
+ if (main->context.set.error.before) {
+ main->output.context = f_color_set_empty_s;
+ main->output.notable = main->context.set.notable;
- main->error.context = main->context.set.error;
- main->error.notable = main->context.set.notable;
+ main->error.context = main->context.set.error;
+ main->error.notable = main->context.set.notable;
- main->warning.context = main->context.set.warning;
- main->warning.notable = main->context.set.notable;
- }
- else {
- f_color_set_t *sets[] = { &main->output.context, &main->output.notable, &main->error.context, &main->error.notable, &main->warning.context, &main->warning.notable, 0 };
+ main->warning.context = main->context.set.warning;
+ main->warning.notable = main->context.set.notable;
+ }
+ else {
+ f_color_set_t *sets[] = { &main->output.context, &main->output.notable, &main->error.context, &main->error.notable, &main->warning.context, &main->warning.notable, 0 };
- fll_program_parameter_process_empty(&main->context, sets);
- }
+ fll_program_parameter_process_empty(&main->context, sets);
+ }
- if (F_status_is_error(status)) {
- firewall_main_delete(main);
+ if (F_status_is_error(status)) {
+ firewall_main_delete(main);
- return F_status_set_error(status);
- }
+ return F_status_set_error(status);
}
+ }
- // Identify priority of verbosity related parameters.
- {
- f_console_parameter_id_t ids[4] = { firewall_parameter_verbosity_quiet_e, firewall_parameter_verbosity_normal_e, firewall_parameter_verbosity_verbose_e, firewall_parameter_verbosity_debug_e };
- const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 4);
- f_console_parameter_id_t choice = 0;
-
- status = f_console_parameter_prioritize_right(parameters, choices, &choice);
+ // Identify priority of verbosity related parameters.
+ {
+ f_console_parameter_id_t ids[4] = { firewall_parameter_verbosity_quiet_e, firewall_parameter_verbosity_normal_e, firewall_parameter_verbosity_verbose_e, firewall_parameter_verbosity_debug_e };
+ const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 4);
+ f_console_parameter_id_t choice = 0;
- if (F_status_is_error(status)) {
- firewall_main_delete(main);
+ status = f_console_parameter_prioritize_right(main->parameters, choices, &choice);
- return status;
- }
+ if (F_status_is_error(status)) {
+ firewall_main_delete(main);
- if (choice == firewall_parameter_verbosity_quiet_e) {
- main->output.verbosity = f_console_verbosity_quiet_e;
- main->error.verbosity = f_console_verbosity_quiet_e;
- main->warning.verbosity = f_console_verbosity_quiet_e;
- }
- else if (choice == firewall_parameter_verbosity_normal_e) {
- main->output.verbosity = f_console_verbosity_normal_e;
- main->error.verbosity = f_console_verbosity_normal_e;
- main->warning.verbosity = f_console_verbosity_normal_e;
- }
- else if (choice == firewall_parameter_verbosity_verbose_e) {
- main->output.verbosity = f_console_verbosity_verbose_e;
- main->error.verbosity = f_console_verbosity_verbose_e;
- main->warning.verbosity = f_console_verbosity_verbose_e;
- }
- else if (choice == firewall_parameter_verbosity_debug_e) {
- main->output.verbosity = f_console_verbosity_debug_e;
- main->error.verbosity = f_console_verbosity_debug_e;
- main->warning.verbosity = f_console_verbosity_debug_e;
- }
+ return status;
}
- status = F_none;
+ if (choice == firewall_parameter_verbosity_quiet_e) {
+ main->output.verbosity = f_console_verbosity_quiet_e;
+ main->error.verbosity = f_console_verbosity_quiet_e;
+ main->warning.verbosity = f_console_verbosity_quiet_e;
+ }
+ else if (choice == firewall_parameter_verbosity_normal_e) {
+ main->output.verbosity = f_console_verbosity_normal_e;
+ main->error.verbosity = f_console_verbosity_normal_e;
+ main->warning.verbosity = f_console_verbosity_normal_e;
+ }
+ else if (choice == firewall_parameter_verbosity_verbose_e) {
+ main->output.verbosity = f_console_verbosity_verbose_e;
+ main->error.verbosity = f_console_verbosity_verbose_e;
+ main->warning.verbosity = f_console_verbosity_verbose_e;
+ }
+ else if (choice == firewall_parameter_verbosity_debug_e) {
+ main->output.verbosity = f_console_verbosity_debug_e;
+ main->error.verbosity = f_console_verbosity_debug_e;
+ main->warning.verbosity = f_console_verbosity_debug_e;
+ }
}
- if (main->parameters[firewall_parameter_help_e].result == f_console_result_found_e) {
+ f_string_static_t * const argv = main->parameters.arguments.array;
+
+ status = F_none;
+
+ if (main->parameters.array[firewall_parameter_help_e].result == f_console_result_found_e) {
firewall_print_help(main->output.to, main->context);
firewall_main_delete(main);
return F_none;
}
- if (main->parameters[firewall_parameter_version_e].result == f_console_result_found_e) {
+ if (main->parameters.array[firewall_parameter_version_e].result == f_console_result_found_e) {
fll_program_print_version(main->output.to, firewall_version_s);
firewall_main_delete(main);
bool found_command = F_false;
unsigned int command = 0;
- if (main->parameters[firewall_parameter_command_start_e].result == f_console_result_found_e) {
+ if (main->parameters.array[firewall_parameter_command_start_e].result == f_console_result_found_e) {
command = firewall_parameter_command_start_e;
found_command = F_true;
}
- if (main->parameters[firewall_parameter_command_stop_e].result == f_console_result_found_e) {
+ if (main->parameters.array[firewall_parameter_command_stop_e].result == f_console_result_found_e) {
if (found_command) {
- if (main->parameters[command].values.array[0] > main->parameters[firewall_parameter_command_stop_e].values.array[0]) {
+ if (main->parameters.array[command].values.array[0] > main->parameters.array[firewall_parameter_command_stop_e].values.array[0]) {
command = firewall_parameter_command_stop_e;
}
}
}
}
- if (main->parameters[firewall_parameter_command_restart_e].result == f_console_result_found_e) {
+ if (main->parameters.array[firewall_parameter_command_restart_e].result == f_console_result_found_e) {
if (found_command) {
- if (main->parameters[command].values.array[0] > main->parameters[firewall_parameter_command_restart_e].values.array[0]) {
+ if (main->parameters.array[command].values.array[0] > main->parameters.array[firewall_parameter_command_restart_e].values.array[0]) {
command = firewall_parameter_command_restart_e;
}
}
}
}
- if (main->parameters[firewall_parameter_command_lock_e].result == f_console_result_found_e) {
+ if (main->parameters.array[firewall_parameter_command_lock_e].result == f_console_result_found_e) {
if (found_command) {
- if (main->parameters[command].values.array[0] > main->parameters[firewall_parameter_command_lock_e].values.array[0]) {
+ if (main->parameters.array[command].values.array[0] > main->parameters.array[firewall_parameter_command_lock_e].values.array[0]) {
command = firewall_parameter_command_lock_e;
}
}
}
}
- if (main->parameters[firewall_parameter_command_show_e].result == f_console_result_found_e) {
+ if (main->parameters.array[firewall_parameter_command_show_e].result == f_console_result_found_e) {
if (found_command) {
- if (main->parameters[command].values.array[0] > main->parameters[firewall_parameter_command_show_e].values.array[0]) {
+ if (main->parameters.array[command].values.array[0] > main->parameters.array[firewall_parameter_command_show_e].values.array[0]) {
command = firewall_parameter_command_show_e;
}
}
parameters.array[4].used = 9;
parameters.array[5].used = 6;
- status = fll_execute_program((f_string_t) firewall_tool_iptables_s, parameters, 0, 0, (void *) &return_code);
+ status = fll_execute_program(firewall_tool_iptables_s, parameters, 0, 0, (void *) &return_code);
// immediately exit child process, @todo this may require additional memory deallocation and relating changes.
if (status == F_child) {
parameters.array[4].used = 9;
parameters.array[5].used = 6;
- status = fll_execute_program((f_string_t) firewall_tool_iptables_s, parameters, 0, 0, (void *) &return_code);
+ status = fll_execute_program(firewall_tool_iptables_s, parameters, 0, 0, (void *) &return_code);
// immediately exit child process, @todo this may require additional memory deallocation and relating changes.
if (status == F_child) {
parameters.array[2].used = 9;
parameters.array[3].used = 6;
- status = fll_execute_program((f_string_t) firewall_tool_iptables_s, parameters, 0, 0, (void *) &return_code);
+ status = fll_execute_program(firewall_tool_iptables_s, parameters, 0, 0, (void *) &return_code);
// immediately exit child process, @todo this may require additional memory deallocation and relating changes.
if (status == F_child) {
#ifndef _di_firewall_main_delete_
f_status_t firewall_main_delete(firewall_main_t * const main) {
- for (f_array_length_t i = 0; i < firewall_total_parameters_d; ++i) {
-
- f_type_array_lengths_resize(0, &main->parameters[i].locations);
- f_type_array_lengths_resize(0, &main->parameters[i].locations_sub);
- f_type_array_lengths_resize(0, &main->parameters[i].values);
- } // for
+ f_console_parameters_delete(&main->parameters);
f_string_dynamics_resize(0, &main->chains);
f_type_array_lengths_resize(0, &main->remaining);
#ifndef _di_firewall_main_t_
typedef struct {
- f_console_parameter_t parameters[firewall_total_parameters_d];
+ f_console_parameters_t parameters;
f_array_lengths_t remaining;
bool process_pipe;
#define firewall_main_t_initialize \
{ \
- firewall_console_parameter_t_initialize, \
+ f_console_parameters_t_initialize, \
f_array_lengths_t_initialize, \
F_false, \
fl_print_t_initialize, \
f_array_length_t repeat = 2;
f_array_length_t r = 0;
- f_string_t current_tool = firewall_tool_iptables_s;
+ f_string_static_t current_tool = firewall_tool_iptables_s;
f_array_length_t current_tool_length = firewall_tool_iptables_s_length;
f_array_length_t direction = firewall_direction_none_id_e;
firewall_print_debug_tool(main->warning, current_tool, arguments);
- status = fll_execute_program((f_string_t) current_tool, arguments, 0, 0, (void *) &return_code);
+ status = fll_execute_program(current_tool, arguments, 0, 0, (void *) &return_code);
// Immediately exit child process, @todo this may require additional memory deallocation and relating changes.
if (status == F_child) {
f_status_t firewall_delete_chains(firewall_main_t * const main) {
- const f_string_t tools[2] = { firewall_tool_iptables_s, firewall_tool_ip6tables_s };
+ const f_string_static_t tools[2] = { firewall_tool_iptables_s, firewall_tool_ip6tables_s };
f_status_t status = F_none;
for (f_array_length_t i = 0; i < 2; ++i) {
#endif
#ifndef _di_fss_basic_list_program_version_
- const f_string_static_t fss_basic_list_program_version_s = macro_f_string_static_t_initialize2(FSS_BASIC_LIST_program_version_s, 0, FSS_BASIC_LIST_program_version_s_length);
+ const f_string_static_t fss_basic_list_program_version_s = macro_f_string_static_t_initialize(FSS_BASIC_LIST_program_version_s, 0, FSS_BASIC_LIST_program_version_s_length);
#endif // _di_fss_basic_list_program_version_
#ifndef _di_fss_basic_list_program_name_
- const f_string_static_t fss_basic_list_program_name_s = macro_f_string_static_t_initialize2(FSS_BASIC_LIST_program_name_s, 0, FSS_BASIC_LIST_program_name_s_length);
- const f_string_static_t fss_basic_list_program_name_long_s = macro_f_string_static_t_initialize2(FSS_BASIC_LIST_program_name_long_s, 0, FSS_BASIC_LIST_program_name_long_s_length);
+ const f_string_static_t fss_basic_list_program_name_s = macro_f_string_static_t_initialize(FSS_BASIC_LIST_program_name_s, 0, FSS_BASIC_LIST_program_name_s_length);
+ const f_string_static_t fss_basic_list_program_name_long_s = macro_f_string_static_t_initialize(FSS_BASIC_LIST_program_name_long_s, 0, FSS_BASIC_LIST_program_name_long_s_length);
#endif // _di_fss_basic_list_program_name_
#ifndef _di_fss_basic_list_read_print_help_
f_status_t status = F_none;
- {
- const f_console_parameters_t parameters = macro_f_console_parameters_t_initialize(main->parameters, fss_basic_list_total_parameters_d);
+ f_console_parameter_t parameters[] = fss_basic_list_read_console_parameter_t_initialize;
+ main->parameters.array = parameters;
+ main->parameters.used = fss_basic_list_read_total_parameters_d;
- {
- f_console_parameter_id_t ids[3] = { fss_basic_list_read_parameter_no_color_e, fss_basic_list_read_parameter_light_e, fss_basic_list_read_parameter_dark_e };
- const f_console_parameter_ids_t choices = { ids, 3 };
+ {
+ f_console_parameter_id_t ids[3] = { fss_basic_list_read_parameter_no_color_e, fss_basic_list_read_parameter_light_e, fss_basic_list_read_parameter_dark_e };
+ const f_console_parameter_ids_t choices = { ids, 3 };
- status = fll_program_parameter_process(*arguments, parameters, choices, F_true, &main->remaining, &main->context);
+ status = fll_program_parameter_process(*arguments, &main->parameters, choices, F_true, &main->remaining, &main->context);
- main->output.set = &main->context.set;
- main->error.set = &main->context.set;
- main->warning.set = &main->context.set;
+ main->output.set = &main->context.set;
+ main->error.set = &main->context.set;
+ main->warning.set = &main->context.set;
- if (main->context.set.error.before) {
- main->output.context = f_color_set_empty_s;
- main->output.notable = main->context.set.notable;
+ if (main->context.set.error.before) {
+ main->output.context = f_color_set_empty_s;
+ main->output.notable = main->context.set.notable;
- main->error.context = main->context.set.error;
- main->error.notable = main->context.set.notable;
+ main->error.context = main->context.set.error;
+ main->error.notable = main->context.set.notable;
- main->warning.context = main->context.set.warning;
- main->warning.notable = main->context.set.notable;
- }
- else {
- f_color_set_t *sets[] = { &main->output.context, &main->output.notable, &main->error.context, &main->error.notable, &main->warning.context, &main->warning.notable, 0 };
+ main->warning.context = main->context.set.warning;
+ main->warning.notable = main->context.set.notable;
+ }
+ else {
+ f_color_set_t *sets[] = { &main->output.context, &main->output.notable, &main->error.context, &main->error.notable, &main->warning.context, &main->warning.notable, 0 };
- fll_program_parameter_process_empty(&main->context, sets);
- }
+ fll_program_parameter_process_empty(&main->context, sets);
+ }
- if (F_status_is_error(status)) {
- fss_basic_list_read_main_delete(main);
+ if (F_status_is_error(status)) {
+ fss_basic_list_read_main_delete(main);
- return F_status_set_error(status);
- }
+ return F_status_set_error(status);
}
+ }
- // Identify priority of verbosity related parameters.
- {
- f_console_parameter_id_t ids[4] = { fss_basic_list_read_parameter_verbosity_quiet_e, fss_basic_list_read_parameter_verbosity_normal_e, fss_basic_list_read_parameter_verbosity_verbose_e, fss_basic_list_read_parameter_verbosity_debug_e };
- f_console_parameter_id_t choice = 0;
- const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 4);
+ // Identify priority of verbosity related parameters.
+ {
+ f_console_parameter_id_t ids[4] = { fss_basic_list_read_parameter_verbosity_quiet_e, fss_basic_list_read_parameter_verbosity_normal_e, fss_basic_list_read_parameter_verbosity_verbose_e, fss_basic_list_read_parameter_verbosity_debug_e };
+ f_console_parameter_id_t choice = 0;
+ const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 4);
- status = f_console_parameter_prioritize_right(parameters, choices, &choice);
+ status = f_console_parameter_prioritize_right(main->parameters, choices, &choice);
- if (F_status_is_error(status)) {
- fss_basic_list_read_main_delete(main);
-
- return status;
- }
+ if (F_status_is_error(status)) {
+ fss_basic_list_read_main_delete(main);
- if (choice == fss_basic_list_read_parameter_verbosity_quiet_e) {
- main->output.verbosity = f_console_verbosity_quiet_e;
- main->error.verbosity = f_console_verbosity_quiet_e;
- main->warning.verbosity = f_console_verbosity_quiet_e;
- }
- else if (choice == fss_basic_list_read_parameter_verbosity_normal_e) {
- main->output.verbosity = f_console_verbosity_normal_e;
- main->error.verbosity = f_console_verbosity_normal_e;
- main->warning.verbosity = f_console_verbosity_normal_e;
- }
- else if (choice == fss_basic_list_read_parameter_verbosity_verbose_e) {
- main->output.verbosity = f_console_verbosity_verbose_e;
- main->error.verbosity = f_console_verbosity_verbose_e;
- main->warning.verbosity = f_console_verbosity_verbose_e;
- }
- else if (choice == fss_basic_list_read_parameter_verbosity_debug_e) {
- main->output.verbosity = f_console_verbosity_debug_e;
- main->error.verbosity = f_console_verbosity_debug_e;
- main->warning.verbosity = f_console_verbosity_debug_e;
- }
+ return status;
}
- status = F_none;
+ if (choice == fss_basic_list_read_parameter_verbosity_quiet_e) {
+ main->output.verbosity = f_console_verbosity_quiet_e;
+ main->error.verbosity = f_console_verbosity_quiet_e;
+ main->warning.verbosity = f_console_verbosity_quiet_e;
+ }
+ else if (choice == fss_basic_list_read_parameter_verbosity_normal_e) {
+ main->output.verbosity = f_console_verbosity_normal_e;
+ main->error.verbosity = f_console_verbosity_normal_e;
+ main->warning.verbosity = f_console_verbosity_normal_e;
+ }
+ else if (choice == fss_basic_list_read_parameter_verbosity_verbose_e) {
+ main->output.verbosity = f_console_verbosity_verbose_e;
+ main->error.verbosity = f_console_verbosity_verbose_e;
+ main->warning.verbosity = f_console_verbosity_verbose_e;
+ }
+ else if (choice == fss_basic_list_read_parameter_verbosity_debug_e) {
+ main->output.verbosity = f_console_verbosity_debug_e;
+ main->error.verbosity = f_console_verbosity_debug_e;
+ main->warning.verbosity = f_console_verbosity_debug_e;
+ }
}
- if (main->parameters[fss_basic_list_read_parameter_help_e].result == f_console_result_found_e) {
+ f_string_static_t * const argv = main->parameters.arguments.array;
+
+ status = F_none;
+
+ if (main->parameters.array[fss_basic_list_read_parameter_help_e].result == f_console_result_found_e) {
fss_basic_list_read_print_help(main->output.to, main->context);
fss_basic_list_read_main_delete(main);
return status;
}
- if (main->parameters[fss_basic_list_read_parameter_version_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_basic_list_read_parameter_version_e].result == f_console_result_found_e) {
fll_program_print_version(main->output.to, fss_basic_list_program_version_s);
fss_basic_list_read_main_delete(main);
for (f_array_length_t i = 0; i < 6; ++i) {
- if (main->parameters[parameter_code[i]].result == f_console_result_found_e) {
+ if (main->parameters.array[parameter_code[i]].result == f_console_result_found_e) {
flockfile(main->error.to.stream);
fl_print_format("%q%[%QThe parameter '%]", main->error.to.stream, f_string_eol_s, main->error.context, main->error.prefix, main->error.context);
} // for
}
- if (F_status_is_error_not(status) && main->parameters[fss_basic_list_read_parameter_columns_e].result == f_console_result_found_e) {
+ if (F_status_is_error_not(status) && main->parameters.array[fss_basic_list_read_parameter_columns_e].result == f_console_result_found_e) {
const f_array_length_t parameter_code[] = {
fss_basic_list_read_parameter_depth_e,
fss_basic_list_read_parameter_line_e,
for (f_array_length_t i = 0; i < 5; ++i) {
- if (main->parameters[parameter_code[i]].result == parameter_match[i]) {
+ if (main->parameters.array[parameter_code[i]].result == parameter_match[i]) {
flockfile(main->error.to.stream);
fl_print_format("%q%[%QCannot specify the '%]", main->error.to.stream, f_string_eol_s, main->error.context, main->error.prefix, main->error.context);
} // for
}
- if (F_status_is_error_not(status) && main->parameters[fss_basic_list_read_parameter_pipe_e].result == f_console_result_found_e) {
- if (main->parameters[fss_basic_list_read_parameter_total_e].result == f_console_result_found_e) {
+ if (F_status_is_error_not(status) && main->parameters.array[fss_basic_list_read_parameter_pipe_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_basic_list_read_parameter_total_e].result == f_console_result_found_e) {
flockfile(main->error.to.stream);
fl_print_format("%q%[%QCannot specify the '%]", main->error.to.stream, f_string_eol_s, main->error.context, main->error.prefix, main->error.context);
status = F_status_set_error(F_parameter);
}
- else if (main->parameters[fss_basic_list_read_parameter_line_e].result == f_console_result_additional_e) {
+ else if (main->parameters.array[fss_basic_list_read_parameter_line_e].result == f_console_result_additional_e) {
flockfile(main->error.to.stream);
fl_print_format("%q%[%QCannot specify the '%]", main->error.to.stream, f_string_eol_s, main->error.context, main->error.prefix, main->error.context);
}
}
- if (F_status_is_error_not(status) && main->parameters[fss_basic_list_read_parameter_delimit_e].result == f_console_result_additional_e) {
+ if (F_status_is_error_not(status) && main->parameters.array[fss_basic_list_read_parameter_delimit_e].result == f_console_result_additional_e) {
f_array_length_t location = 0;
f_array_length_t length = 0;
uint16_t signal_check = 0;
// Set the value to 0 to allow for detecting mode based on what is provided.
data.delimit_mode = 0;
- for (f_array_length_t i = 0; i < main->parameters[fss_basic_list_read_parameter_delimit_e].values.used; ++i) {
+ for (f_array_length_t i = 0; i < main->parameters.array[fss_basic_list_read_parameter_delimit_e].values.used; ++i) {
if (!((++signal_check) % fss_basic_list_read_signal_check_d)) {
if (fss_basic_list_read_signal_received(main)) {
signal_check = 0;
}
- location = main->parameters[fss_basic_list_read_parameter_delimit_e].values.array[i];
+ location = main->parameters.array[fss_basic_list_read_parameter_delimit_e].values.array[i];
length = strnlen(arguments->argv[location], F_console_parameter_size_d);
if (!length) {
// This standard does not support nesting, so any depth greater than 0 can be predicted without processing the file.
if (F_status_is_error_not(status) && data.depths.array[0].depth > 0) {
- if (main->parameters[fss_basic_list_read_parameter_total_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_basic_list_read_parameter_total_e].result == f_console_result_found_e) {
fss_basic_list_read_print_zero(main);
}
return F_none;
}
- if (F_status_is_error_not(status) && main->parameters[fss_basic_list_read_parameter_select_e].result == f_console_result_found_e) {
+ if (F_status_is_error_not(status) && main->parameters.array[fss_basic_list_read_parameter_select_e].result == f_console_result_found_e) {
flockfile(main->error.to.stream);
fl_print_format("%q%[%QThe '%]", main->error.to.stream, f_string_eol_s, main->error.context, main->error.prefix, main->error.context);
status = f_file_stream_open(arguments->argv[main->remaining.array[i]], 0, &file);
if (F_status_is_error(status)) {
- fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_open", F_true, arguments->argv[main->remaining.array[i]], "open", fll_error_file_type_file_e);
+ fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_open", F_true, arguments->argv[main->remaining.array[i]], f_file_operation_open_s, fll_error_file_type_file_e);
break;
}
#ifndef _di_fss_basic_list_read_main_delete_
f_status_t fss_basic_list_read_main_delete(fss_basic_list_read_main_t * const main) {
- for (f_array_length_t i = 0; i < fss_basic_list_total_parameters_d; ++i) {
-
- f_type_array_lengths_resize(0, &main->parameters[i].locations);
- f_type_array_lengths_resize(0, &main->parameters[i].locations_sub);
- f_type_array_lengths_resize(0, &main->parameters[i].values);
- } // for
+ f_console_parameters_delete(&main->parameters);
f_type_array_lengths_resize(0, &main->remaining);
macro_f_color_context_t_delete_simple(main->context);
#ifndef _di_fss_basic_list_read_main_t_
typedef struct {
- f_console_parameter_t parameters[fss_basic_list_total_parameters_d];
+ f_console_parameters_t parameters;
f_array_lengths_t remaining;
bool process_pipe;
#define fss_basic_list_read_main_t_initialize \
{ \
- fss_basic_list_read_console_parameter_t_initialize, \
+ f_console_parameters_t_initialize, \
f_array_lengths_t_initialize, \
F_false, \
fl_print_t_initialize, \
#ifndef _di_fss_basic_list_read_print_content_ignore_
void fss_basic_list_read_print_content_ignore(fss_basic_list_read_main_t * const main) {
- if (main->parameters[fss_basic_list_read_parameter_pipe_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_basic_list_read_parameter_pipe_e].result == f_console_result_found_e) {
f_print_character(fss_basic_list_read_pipe_content_ignore_s, main->output.to.stream);
}
}
#ifndef _di_fss_basic_list_read_print_object_end_
void fss_basic_list_read_print_object_end(fss_basic_list_read_main_t * const main) {
- if (main->parameters[fss_basic_list_read_parameter_pipe_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_basic_list_read_parameter_pipe_e].result == f_console_result_found_e) {
f_print_character(fss_basic_list_read_pipe_content_start_s, main->output.to.stream);
}
else {
- if (main->parameters[fss_basic_list_read_parameter_content_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_basic_list_read_parameter_content_e].result == f_console_result_found_e) {
f_print_character(f_fss_basic_list_open_s.string[0], main->output.to.stream);
f_print_character(f_fss_basic_list_open_end_s.string[0], main->output.to.stream);
}
#ifndef _di_fss_basic_list_read_print_set_end_
void fss_basic_list_read_print_set_end(fss_basic_list_read_main_t * const main) {
- if (main->parameters[fss_basic_list_read_parameter_pipe_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_basic_list_read_parameter_pipe_e].result == f_console_result_found_e) {
f_print_character(fss_basic_list_read_pipe_content_end_s, main->output.to.stream);
}
}
{
f_array_length_t depth_size = 1;
- if (main->parameters[fss_basic_list_read_parameter_depth_e].result == f_console_result_additional_e) {
- depth_size = main->parameters[fss_basic_list_read_parameter_depth_e].values.used;
+ if (main->parameters.array[fss_basic_list_read_parameter_depth_e].result == f_console_result_additional_e) {
+ depth_size = main->parameters.array[fss_basic_list_read_parameter_depth_e].values.used;
}
if (depth_size > data->depths.size) {
macro_f_string_dynamic_t_clear(data->depths.array[i].value_name);
- if (!main->parameters[fss_basic_list_read_parameter_depth_e].values.used) {
+ if (!main->parameters.array[fss_basic_list_read_parameter_depth_e].values.used) {
position_depth = 0;
}
else {
- position_depth = main->parameters[fss_basic_list_read_parameter_depth_e].values.array[i];
+ position_depth = main->parameters.array[fss_basic_list_read_parameter_depth_e].values.array[i];
const f_string_range_t range = macro_f_string_range_t_initialize(strlen(arguments->argv[position_depth]));
}
}
- if (main->parameters[fss_basic_list_read_parameter_at_e].result == f_console_result_additional_e) {
- for (; position_at < main->parameters[fss_basic_list_read_parameter_at_e].values.used; ++position_at) {
+ if (main->parameters.array[fss_basic_list_read_parameter_at_e].result == f_console_result_additional_e) {
+ for (; position_at < main->parameters.array[fss_basic_list_read_parameter_at_e].values.used; ++position_at) {
- if (main->parameters[fss_basic_list_read_parameter_at_e].values.array[position_at] < position_depth) {
+ if (main->parameters.array[fss_basic_list_read_parameter_at_e].values.array[position_at] < position_depth) {
continue;
}
- if (i + 1 < data->depths.used && main->parameters[fss_basic_list_read_parameter_at_e].values.array[position_at] > main->parameters[fss_basic_list_read_parameter_depth_e].values.array[i + 1]) {
+ if (i + 1 < data->depths.used && main->parameters.array[fss_basic_list_read_parameter_at_e].values.array[position_at] > main->parameters.array[fss_basic_list_read_parameter_depth_e].values.array[i + 1]) {
break;
}
- data->depths.array[i].index_at = main->parameters[fss_basic_list_read_parameter_at_e].values.array[position_at];
+ data->depths.array[i].index_at = main->parameters.array[fss_basic_list_read_parameter_at_e].values.array[position_at];
const f_string_range_t range = macro_f_string_range_t_initialize(strlen(arguments->argv[data->depths.array[i].index_at]));
} // for
}
- if (main->parameters[fss_basic_list_read_parameter_name_e].result == f_console_result_additional_e) {
- for (; position_name < main->parameters[fss_basic_list_read_parameter_name_e].values.used; ++position_name) {
+ if (main->parameters.array[fss_basic_list_read_parameter_name_e].result == f_console_result_additional_e) {
+ for (; position_name < main->parameters.array[fss_basic_list_read_parameter_name_e].values.used; ++position_name) {
- if (main->parameters[fss_basic_list_read_parameter_name_e].values.array[position_name] < position_depth) {
+ if (main->parameters.array[fss_basic_list_read_parameter_name_e].values.array[position_name] < position_depth) {
continue;
}
- if (i + 1 < data->depths.used && main->parameters[fss_basic_list_read_parameter_name_e].values.array[position_name] > main->parameters[fss_basic_list_read_parameter_depth_e].values.array[i + 1]) {
+ if (i + 1 < data->depths.used && main->parameters.array[fss_basic_list_read_parameter_name_e].values.array[position_name] > main->parameters.array[fss_basic_list_read_parameter_depth_e].values.array[i + 1]) {
break;
}
- data->depths.array[i].index_name = main->parameters[fss_basic_list_read_parameter_name_e].values.array[position_name];
+ data->depths.array[i].index_name = main->parameters.array[fss_basic_list_read_parameter_name_e].values.array[position_name];
- if (main->parameters[fss_basic_list_read_parameter_trim_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_basic_list_read_parameter_trim_e].result == f_console_result_found_e) {
status = fl_string_rip(arguments->argv[data->depths.array[i].index_name], strlen(arguments->argv[data->depths.array[i].index_name]), &data->depths.array[i].value_name);
}
else {
}
if (F_status_is_error(status)) {
- fll_error_print(main->error, F_status_set_fine(status), main->parameters[fss_basic_list_read_parameter_trim_e].result == f_console_result_found_e ? "fl_string_rip" : "f_string_append", F_true);
+ fll_error_print(main->error, F_status_set_fine(status), main->parameters.array[fss_basic_list_read_parameter_trim_e].result == f_console_result_found_e ? "fl_string_rip" : "f_string_append", F_true);
return status;
}
if (F_status_is_error(status)) {
const f_string_t file_name = fss_basic_list_read_file_identify(input.start, data->files);
- fll_error_file_print(main->error, F_status_set_fine(status), "fll_fss_basic_list_read", F_true, file_name, "process", fll_error_file_type_file_e);
+ fll_error_file_print(main->error, F_status_set_fine(status), "fll_fss_basic_list_read", F_true, file_name, f_file_operation_process_s, fll_error_file_type_file_e);
return status;
}
#ifndef _di_fss_basic_list_read_load_number_
f_status_t fss_basic_list_read_load_number(fss_basic_list_read_main_t * const main, const f_array_length_t parameter, const f_string_t name, const f_console_arguments_t *arguments, f_number_unsigned_t *number) {
- if (main->parameters[parameter].result == f_console_result_additional_e) {
- const f_array_length_t index = main->parameters[parameter].values.array[main->parameters[parameter].values.used - 1];
+ if (main->parameters.array[parameter].result == f_console_result_additional_e) {
+ const f_array_length_t index = main->parameters.array[parameter].values.array[main->parameters.array[parameter].values.used - 1];
const f_string_range_t range = macro_f_string_range_t_initialize(strnlen(arguments->argv[index], F_console_parameter_size_d));
const f_status_t status = fl_conversion_string_to_number_unsigned(arguments->argv[index], range, number);
// This standard does not support multiple content groups.
if ((data->option & fss_basic_list_read_data_option_select_d) && data->select) {
- if (main->parameters[fss_basic_list_read_parameter_total_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_basic_list_read_parameter_total_e].result == f_console_result_found_e) {
flockfile(main->output.to.stream);
fss_basic_list_read_print_zero(main);
f_status_t status = F_none;
- if (main->parameters[fss_basic_list_read_parameter_at_e].result == f_console_result_additional_e) {
+ if (main->parameters.array[fss_basic_list_read_parameter_at_e].result == f_console_result_additional_e) {
data->option |= fss_basic_list_read_data_option_at_d;
}
- if (main->parameters[fss_basic_list_read_parameter_columns_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_basic_list_read_parameter_columns_e].result == f_console_result_found_e) {
data->option |= fss_basic_list_read_data_option_columns_d;
}
- if (main->parameters[fss_basic_list_read_parameter_content_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_basic_list_read_parameter_content_e].result == f_console_result_found_e) {
data->option |= fss_basic_list_read_data_option_content_d;
}
- if (main->parameters[fss_basic_list_read_parameter_empty_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_basic_list_read_parameter_empty_e].result == f_console_result_found_e) {
data->option |= fss_basic_list_read_data_option_empty_d;
}
- if (main->parameters[fss_basic_list_read_parameter_line_e].result == f_console_result_additional_e) {
+ if (main->parameters.array[fss_basic_list_read_parameter_line_e].result == f_console_result_additional_e) {
data->option |= fss_basic_list_read_data_option_line_d;
status = fss_basic_list_read_load_number(main, fss_basic_list_read_parameter_line_e, fss_basic_list_read_long_line_s, arguments, &data->line);
if (F_status_is_error(status)) return status;
}
- if (main->parameters[fss_basic_list_read_parameter_name_e].result == f_console_result_additional_e) {
+ if (main->parameters.array[fss_basic_list_read_parameter_name_e].result == f_console_result_additional_e) {
data->option |= fss_basic_list_read_data_option_name_d;
}
- if (main->parameters[fss_basic_list_read_parameter_object_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_basic_list_read_parameter_object_e].result == f_console_result_found_e) {
data->option |= fss_basic_list_read_data_option_object_d;
}
- if (main->parameters[fss_basic_list_read_parameter_raw_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_basic_list_read_parameter_raw_e].result == f_console_result_found_e) {
data->option |= fss_basic_list_read_data_option_raw_d;
}
- if (main->parameters[fss_basic_list_read_parameter_select_e].result == f_console_result_additional_e) {
+ if (main->parameters.array[fss_basic_list_read_parameter_select_e].result == f_console_result_additional_e) {
data->option |= fss_basic_list_read_data_option_select_d;
status = fss_basic_list_read_load_number(main, fss_basic_list_read_parameter_select_e, fss_basic_list_read_long_select_s, arguments, &data->select);
if (F_status_is_error(status)) return status;
}
- if (main->parameters[fss_basic_list_read_parameter_total_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_basic_list_read_parameter_total_e].result == f_console_result_found_e) {
data->option |= fss_basic_list_read_data_option_total_d;
}
- if (main->parameters[fss_basic_list_read_parameter_trim_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_basic_list_read_parameter_trim_e].result == f_console_result_found_e) {
data->option |= fss_basic_list_read_data_option_trim_d;
}
#endif
#ifndef _di_fss_basic_list_write_program_version_
- const f_string_static_t fss_basic_list_write_program_version_s = macro_f_string_static_t_initialize2(FSS_BASIC_LIST_WRITE_program_version_s, 0, FSS_BASIC_LIST_WRITE_program_version_s_length);
+ const f_string_static_t fss_basic_list_write_program_version_s = macro_f_string_static_t_initialize(FSS_BASIC_LIST_WRITE_program_version_s, 0, FSS_BASIC_LIST_WRITE_program_version_s_length);
#endif // _di_fss_basic_list_write_program_version_
#ifndef _di_fss_basic_list_write_program_name_
- const f_string_static_t fss_basic_list_write_program_name_s = macro_f_string_static_t_initialize2(FSS_BASIC_LIST_WRITE_program_name_s, 0, FSS_BASIC_LIST_WRITE_program_name_s_length);
- const f_string_static_t fss_basic_list_write_program_name_long_s = macro_f_string_static_t_initialize2(FSS_BASIC_LIST_WRITE_program_name_long_s, 0, FSS_BASIC_LIST_WRITE_program_name_long_s_length);
+ const f_string_static_t fss_basic_list_write_program_name_s = macro_f_string_static_t_initialize(FSS_BASIC_LIST_WRITE_program_name_s, 0, FSS_BASIC_LIST_WRITE_program_name_s_length);
+ const f_string_static_t fss_basic_list_write_program_name_long_s = macro_f_string_static_t_initialize(FSS_BASIC_LIST_WRITE_program_name_long_s, 0, FSS_BASIC_LIST_WRITE_program_name_long_s_length);
#endif // _di_fss_basic_list_write_program_name_
#ifndef _di_fss_basic_list_write_print_help_
f_status_t status = F_none;
- {
- const f_console_parameters_t parameters = macro_f_console_parameters_t_initialize(main->parameters, fss_basic_list_write_total_parameters_d);
+ f_console_parameter_t parameters[] = fss_basic_list_write_console_parameter_t_initialize;
+ main->parameters.array = parameters;
+ main->parameters.used = fss_basic_list_write_total_parameters_d;
- {
- f_console_parameter_id_t ids[3] = { fss_basic_list_write_parameter_no_color_e, fss_basic_list_write_parameter_light_e, fss_basic_list_write_parameter_dark_e };
- const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 3);
+ {
+ f_console_parameter_id_t ids[3] = { fss_basic_list_write_parameter_no_color_e, fss_basic_list_write_parameter_light_e, fss_basic_list_write_parameter_dark_e };
+ const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 3);
- status = fll_program_parameter_process(*arguments, parameters, choices, F_true, &main->remaining, &main->context);
+ status = fll_program_parameter_process(*arguments, &main->parameters, choices, F_true, &main->remaining, &main->context);
- main->output.set = &main->context.set;
- main->error.set = &main->context.set;
- main->warning.set = &main->context.set;
+ main->output.set = &main->context.set;
+ main->error.set = &main->context.set;
+ main->warning.set = &main->context.set;
- if (main->context.set.error.before) {
- main->output.context = f_color_set_empty_s;
- main->output.notable = main->context.set.notable;
+ if (main->context.set.error.before) {
+ main->output.context = f_color_set_empty_s;
+ main->output.notable = main->context.set.notable;
- main->error.context = main->context.set.error;
- main->error.notable = main->context.set.notable;
+ main->error.context = main->context.set.error;
+ main->error.notable = main->context.set.notable;
- main->warning.context = main->context.set.warning;
- main->warning.notable = main->context.set.notable;
- }
- else {
- f_color_set_t *sets[] = { &main->output.context, &main->output.notable, &main->error.context, &main->error.notable, &main->warning.context, &main->warning.notable, 0 };
+ main->warning.context = main->context.set.warning;
+ main->warning.notable = main->context.set.notable;
+ }
+ else {
+ f_color_set_t *sets[] = { &main->output.context, &main->output.notable, &main->error.context, &main->error.notable, &main->warning.context, &main->warning.notable, 0 };
- fll_program_parameter_process_empty(&main->context, sets);
- }
+ fll_program_parameter_process_empty(&main->context, sets);
+ }
- if (F_status_is_error(status)) {
- fss_basic_list_write_main_delete(main);
+ if (F_status_is_error(status)) {
+ fss_basic_list_write_main_delete(main);
- return F_status_set_error(status);
- }
+ return F_status_set_error(status);
}
+ }
- // Identify priority of verbosity related parameters.
- {
- f_console_parameter_id_t ids[4] = { fss_basic_list_write_parameter_verbosity_quiet_e, fss_basic_list_write_parameter_verbosity_normal_e, fss_basic_list_write_parameter_verbosity_verbose_e, fss_basic_list_write_parameter_verbosity_debug_e };
- f_console_parameter_id_t choice = 0;
- const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 4);
-
- status = f_console_parameter_prioritize_right(parameters, choices, &choice);
+ // Identify priority of verbosity related parameters.
+ {
+ f_console_parameter_id_t ids[4] = { fss_basic_list_write_parameter_verbosity_quiet_e, fss_basic_list_write_parameter_verbosity_normal_e, fss_basic_list_write_parameter_verbosity_verbose_e, fss_basic_list_write_parameter_verbosity_debug_e };
+ f_console_parameter_id_t choice = 0;
+ const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 4);
- if (F_status_is_error(status)) {
- fss_basic_list_write_main_delete(main);
+ status = f_console_parameter_prioritize_right(main->parameters, choices, &choice);
- return status;
- }
+ if (F_status_is_error(status)) {
+ fss_basic_list_write_main_delete(main);
- if (choice == fss_basic_list_write_parameter_verbosity_quiet_e) {
- main->output.verbosity = f_console_verbosity_quiet_e;
- main->error.verbosity = f_console_verbosity_quiet_e;
- main->warning.verbosity = f_console_verbosity_quiet_e;
- }
- else if (choice == fss_basic_list_write_parameter_verbosity_normal_e) {
- main->output.verbosity = f_console_verbosity_normal_e;
- main->error.verbosity = f_console_verbosity_normal_e;
- main->warning.verbosity = f_console_verbosity_normal_e;
- }
- else if (choice == fss_basic_list_write_parameter_verbosity_verbose_e) {
- main->output.verbosity = f_console_verbosity_verbose_e;
- main->error.verbosity = f_console_verbosity_verbose_e;
- main->warning.verbosity = f_console_verbosity_verbose_e;
- }
- else if (choice == fss_basic_list_write_parameter_verbosity_debug_e) {
- main->output.verbosity = f_console_verbosity_debug_e;
- main->error.verbosity = f_console_verbosity_debug_e;
- main->warning.verbosity = f_console_verbosity_debug_e;
- }
+ return status;
}
- status = F_none;
+ if (choice == fss_basic_list_write_parameter_verbosity_quiet_e) {
+ main->output.verbosity = f_console_verbosity_quiet_e;
+ main->error.verbosity = f_console_verbosity_quiet_e;
+ main->warning.verbosity = f_console_verbosity_quiet_e;
+ }
+ else if (choice == fss_basic_list_write_parameter_verbosity_normal_e) {
+ main->output.verbosity = f_console_verbosity_normal_e;
+ main->error.verbosity = f_console_verbosity_normal_e;
+ main->warning.verbosity = f_console_verbosity_normal_e;
+ }
+ else if (choice == fss_basic_list_write_parameter_verbosity_verbose_e) {
+ main->output.verbosity = f_console_verbosity_verbose_e;
+ main->error.verbosity = f_console_verbosity_verbose_e;
+ main->warning.verbosity = f_console_verbosity_verbose_e;
+ }
+ else if (choice == fss_basic_list_write_parameter_verbosity_debug_e) {
+ main->output.verbosity = f_console_verbosity_debug_e;
+ main->error.verbosity = f_console_verbosity_debug_e;
+ main->warning.verbosity = f_console_verbosity_debug_e;
+ }
}
- if (main->parameters[fss_basic_list_write_parameter_help_e].result == f_console_result_found_e) {
+ f_string_static_t * const argv = main->parameters.arguments.array;
+
+ status = F_none;
+
+ if (main->parameters.array[fss_basic_list_write_parameter_help_e].result == f_console_result_found_e) {
fss_basic_list_write_print_help(main->output.to, main->context);
fss_basic_list_write_main_delete(main);
return status;
}
- if (main->parameters[fss_basic_list_write_parameter_version_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_basic_list_write_parameter_version_e].result == f_console_result_found_e) {
fll_program_print_version(main->output.to, fss_basic_list_write_program_version_s);
fss_basic_list_write_main_delete(main);
output.size_write = main->output.to.size_write;
if (F_status_is_error_not(status)) {
- if (main->parameters[fss_basic_list_write_parameter_file_e].result == f_console_result_additional_e) {
- if (main->parameters[fss_basic_list_write_parameter_file_e].values.used > 1) {
+ if (main->parameters.array[fss_basic_list_write_parameter_file_e].result == f_console_result_additional_e) {
+ if (main->parameters.array[fss_basic_list_write_parameter_file_e].values.used > 1) {
if (main->error.verbosity != f_console_verbosity_quiet_e) {
flockfile(main->error.to.stream);
status = F_status_set_error(F_parameter);
}
else {
- const f_array_length_t location = main->parameters[fss_basic_list_write_parameter_file_e].values.array[0];
+ const f_array_length_t location = main->parameters.array[fss_basic_list_write_parameter_file_e].values.array[0];
output.id = -1;
output.stream = 0;
status = f_file_stream_open(arguments->argv[location], 0, &output);
if (F_status_is_error(status)) {
- fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_open", F_true, arguments->argv[location], "open", fll_error_file_type_file_e);
+ fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_open", F_true, arguments->argv[location], f_file_operation_open_s, fll_error_file_type_file_e);
}
}
}
- else if (main->parameters[fss_basic_list_write_parameter_file_e].result == f_console_result_found_e) {
+ else if (main->parameters.array[fss_basic_list_write_parameter_file_e].result == f_console_result_found_e) {
fss_basic_list_write_error_parameter_value_missing_print(main, f_console_symbol_long_enable_s, fss_basic_list_write_long_file_s);
status = F_status_set_error(F_parameter);
}
}
if (F_status_is_error_not(status)) {
- if (main->parameters[fss_basic_list_write_parameter_object_e].locations.used || main->parameters[fss_basic_list_write_parameter_content_e].locations.used) {
- if (main->parameters[fss_basic_list_write_parameter_object_e].locations.used) {
- if (main->parameters[fss_basic_list_write_parameter_object_e].locations.used != main->parameters[fss_basic_list_write_parameter_object_e].values.used) {
+ if (main->parameters.array[fss_basic_list_write_parameter_object_e].locations.used || main->parameters.array[fss_basic_list_write_parameter_content_e].locations.used) {
+ if (main->parameters.array[fss_basic_list_write_parameter_object_e].locations.used) {
+ if (main->parameters.array[fss_basic_list_write_parameter_object_e].locations.used != main->parameters.array[fss_basic_list_write_parameter_object_e].values.used) {
fss_basic_list_write_error_parameter_value_missing_print(main, f_console_symbol_long_enable_s, fss_basic_list_write_long_object_s);
status = F_status_set_error(F_parameter);
}
- else if (main->parameters[fss_basic_list_write_parameter_content_e].locations.used != main->parameters[fss_basic_list_write_parameter_content_e].values.used) {
+ else if (main->parameters.array[fss_basic_list_write_parameter_content_e].locations.used != main->parameters.array[fss_basic_list_write_parameter_content_e].values.used) {
fss_basic_list_write_error_parameter_value_missing_print(main, f_console_symbol_long_enable_s, fss_basic_list_write_long_content_s);
status = F_status_set_error(F_parameter);
}
- else if (main->parameters[fss_basic_list_write_parameter_object_e].locations.used != main->parameters[fss_basic_list_write_parameter_content_e].locations.used && main->parameters[fss_basic_list_write_parameter_partial_e].result == f_console_result_none_e) {
+ else if (main->parameters.array[fss_basic_list_write_parameter_object_e].locations.used != main->parameters.array[fss_basic_list_write_parameter_content_e].locations.used && main->parameters.array[fss_basic_list_write_parameter_partial_e].result == f_console_result_none_e) {
fss_basic_list_write_error_parameter_same_times_print(main);
status = F_status_set_error(F_parameter);
}
- else if (main->parameters[fss_basic_list_write_parameter_content_e].locations.used && main->parameters[fss_basic_list_write_parameter_partial_e].locations.used) {
- if (main->parameters[fss_basic_list_write_parameter_content_e].result == f_console_result_additional_e) {
+ else if (main->parameters.array[fss_basic_list_write_parameter_content_e].locations.used && main->parameters.array[fss_basic_list_write_parameter_partial_e].locations.used) {
+ if (main->parameters.array[fss_basic_list_write_parameter_content_e].result == f_console_result_additional_e) {
if (main->error.verbosity != f_console_verbosity_quiet_e) {
flockfile(main->error.to.stream);
}
if (F_status_is_error_not(status)) {
- if (main->parameters[fss_basic_list_write_parameter_content_e].result == f_console_result_additional_e) {
+ if (main->parameters.array[fss_basic_list_write_parameter_content_e].result == f_console_result_additional_e) {
f_array_length_t location_object = 0;
f_array_length_t location_content = 0;
f_array_length_t location_sub_object = 0;
f_array_length_t location_sub_content = 0;
- for (f_array_length_t i = 0; i < main->parameters[fss_basic_list_write_parameter_object_e].locations.used; ++i) {
- location_object = main->parameters[fss_basic_list_write_parameter_object_e].locations.array[i];
- location_content = main->parameters[fss_basic_list_write_parameter_content_e].locations.array[i];
- location_sub_object = main->parameters[fss_basic_list_write_parameter_object_e].locations_sub.array[i];
- location_sub_content = main->parameters[fss_basic_list_write_parameter_content_e].locations_sub.array[i];
+ for (f_array_length_t i = 0; i < main->parameters.array[fss_basic_list_write_parameter_object_e].locations.used; ++i) {
+ location_object = main->parameters.array[fss_basic_list_write_parameter_object_e].locations.array[i];
+ location_content = main->parameters.array[fss_basic_list_write_parameter_content_e].locations.array[i];
+ location_sub_object = main->parameters.array[fss_basic_list_write_parameter_object_e].locations_sub.array[i];
+ location_sub_content = main->parameters.array[fss_basic_list_write_parameter_content_e].locations_sub.array[i];
if (location_object > location_content || location_object == location_content && location_sub_object > location_sub_content) {
if (main->error.verbosity != f_console_verbosity_quiet_e) {
}
}
}
- else if (main->parameters[fss_basic_list_write_parameter_content_e].locations.used) {
- if (main->parameters[fss_basic_list_write_parameter_content_e].locations.used != main->parameters[fss_basic_list_write_parameter_content_e].values.used) {
+ else if (main->parameters.array[fss_basic_list_write_parameter_content_e].locations.used) {
+ if (main->parameters.array[fss_basic_list_write_parameter_content_e].locations.used != main->parameters.array[fss_basic_list_write_parameter_content_e].values.used) {
fss_basic_list_write_error_parameter_value_missing_print(main, f_console_symbol_long_enable_s, fss_basic_list_write_long_content_s);
status = F_status_set_error(F_parameter);
}
- else if (!main->parameters[fss_basic_list_write_parameter_partial_e].locations.used) {
+ else if (!main->parameters.array[fss_basic_list_write_parameter_partial_e].locations.used) {
fss_basic_list_write_error_parameter_same_times_print(main);
status = F_status_set_error(F_parameter);
}
}
if (F_status_is_error_not(status) && main->process_pipe) {
- if (main->parameters[fss_basic_list_write_parameter_partial_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_basic_list_write_parameter_partial_e].result == f_console_result_found_e) {
if (main->error.verbosity != f_console_verbosity_quiet_e) {
flockfile(main->error.to.stream);
}
if (F_status_is_error_not(status)) {
- if (main->parameters[fss_basic_list_write_parameter_prepend_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_basic_list_write_parameter_prepend_e].result == f_console_result_found_e) {
if (main->error.verbosity != f_console_verbosity_quiet_e) {
flockfile(main->error.to.stream);
status = F_status_set_error(F_parameter);
}
- else if (main->parameters[fss_basic_list_write_parameter_prepend_e].result == f_console_result_additional_e) {
- const f_array_length_t index = main->parameters[fss_basic_list_write_parameter_prepend_e].values.array[main->parameters[fss_basic_list_write_parameter_prepend_e].values.used - 1];
+ else if (main->parameters.array[fss_basic_list_write_parameter_prepend_e].result == f_console_result_additional_e) {
+ const f_array_length_t index = main->parameters.array[fss_basic_list_write_parameter_prepend_e].values.array[main->parameters.array[fss_basic_list_write_parameter_prepend_e].values.used - 1];
const f_array_length_t length = strnlen(arguments->argv[index], F_console_parameter_size_d);
if (length) {
}
if (F_status_is_error_not(status)) {
- if (main->parameters[fss_basic_list_write_parameter_ignore_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_basic_list_write_parameter_ignore_e].result == f_console_result_found_e) {
if (main->error.verbosity != f_console_verbosity_quiet_e) {
flockfile(main->error.to.stream);
status = F_status_set_error(F_parameter);
}
- else if (main->parameters[fss_basic_list_write_parameter_ignore_e].result == f_console_result_additional_e) {
- const f_array_length_t total_locations = main->parameters[fss_basic_list_write_parameter_ignore_e].locations.used;
- const f_array_length_t total_arguments = main->parameters[fss_basic_list_write_parameter_ignore_e].values.used;
+ else if (main->parameters.array[fss_basic_list_write_parameter_ignore_e].result == f_console_result_additional_e) {
+ const f_array_length_t total_locations = main->parameters.array[fss_basic_list_write_parameter_ignore_e].locations.used;
+ const f_array_length_t total_arguments = main->parameters.array[fss_basic_list_write_parameter_ignore_e].values.used;
if (total_locations * 2 > total_arguments) {
flockfile(main->error.to.stream);
f_fss_quote_t quote = F_fss_delimit_quote_double_s;
if (F_status_is_error_not(status)) {
- if (main->parameters[fss_basic_list_write_parameter_double_e].result == f_console_result_found_e) {
- if (main->parameters[fss_basic_list_write_parameter_single_e].result == f_console_result_found_e) {
- if (main->parameters[fss_basic_list_write_parameter_double_e].location < main->parameters[fss_basic_list_write_parameter_single_e].location) {
+ if (main->parameters.array[fss_basic_list_write_parameter_double_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_basic_list_write_parameter_single_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_basic_list_write_parameter_double_e].location < main->parameters.array[fss_basic_list_write_parameter_single_e].location) {
quote = F_fss_delimit_quote_single_s;
}
}
}
- else if (main->parameters[fss_basic_list_write_parameter_single_e].result == f_console_result_found_e) {
+ else if (main->parameters.array[fss_basic_list_write_parameter_single_e].result == f_console_result_found_e) {
quote = F_fss_delimit_quote_single_s;
}
}
}
if (F_status_is_error_not(status)) {
- if (main->parameters[fss_basic_list_write_parameter_partial_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_basic_list_write_parameter_partial_e].result == f_console_result_found_e) {
- if (main->parameters[fss_basic_list_write_parameter_object_e].result == f_console_result_additional_e) {
- for (f_array_length_t i = 0; i < main->parameters[fss_basic_list_write_parameter_object_e].values.used; ++i) {
+ if (main->parameters.array[fss_basic_list_write_parameter_object_e].result == f_console_result_additional_e) {
+ for (f_array_length_t i = 0; i < main->parameters.array[fss_basic_list_write_parameter_object_e].values.used; ++i) {
if (fss_basic_list_write_signal_received(main)) {
status = F_status_set_error(F_interrupt);
break;
}
- object.string = arguments->argv[main->parameters[fss_basic_list_write_parameter_object_e].values.array[i]];
+ object.string = arguments->argv[main->parameters.array[fss_basic_list_write_parameter_object_e].values.array[i]];
object.used = strnlen(object.string, F_console_parameter_size_d);
object.size = object.used;
} // for
}
else {
- for (f_array_length_t i = 0; i < main->parameters[fss_basic_list_write_parameter_content_e].values.used; ++i) {
+ for (f_array_length_t i = 0; i < main->parameters.array[fss_basic_list_write_parameter_content_e].values.used; ++i) {
if (fss_basic_list_write_signal_received(main)) {
status = F_status_set_error(F_interrupt);
break;
}
- content.string = arguments->argv[main->parameters[fss_basic_list_write_parameter_content_e].values.array[i]];
+ content.string = arguments->argv[main->parameters.array[fss_basic_list_write_parameter_content_e].values.array[i]];
content.used = strnlen(content.string, F_console_parameter_size_d);
content.size = content.used;
}
}
else {
- for (f_array_length_t i = 0; i < main->parameters[fss_basic_list_write_parameter_object_e].values.used; ++i) {
+ for (f_array_length_t i = 0; i < main->parameters.array[fss_basic_list_write_parameter_object_e].values.used; ++i) {
if (fss_basic_list_write_signal_received(main)) {
status = F_status_set_error(F_interrupt);
break;
}
- object.string = arguments->argv[main->parameters[fss_basic_list_write_parameter_object_e].values.array[i]];
+ object.string = arguments->argv[main->parameters.array[fss_basic_list_write_parameter_object_e].values.array[i]];
object.used = strnlen(object.string, F_console_parameter_size_d);
object.size = object.used;
- content.string = arguments->argv[main->parameters[fss_basic_list_write_parameter_content_e].values.array[i]];
+ content.string = arguments->argv[main->parameters.array[fss_basic_list_write_parameter_content_e].values.array[i]];
content.used = strnlen(content.string, F_console_parameter_size_d);
content.size = content.used;
funlockfile(main->error.to.stream);
}
}
- else if (main->error.verbosity != f_console_verbosity_quiet_e && main->parameters[fss_basic_list_write_parameter_file_e].result == f_console_result_none_e) {
+ else if (main->error.verbosity != f_console_verbosity_quiet_e && main->parameters.array[fss_basic_list_write_parameter_file_e].result == f_console_result_none_e) {
// Ensure there is always a newline at the end, unless in quiet mode.
fll_print_dynamic(f_string_eol_s, main->output.to.stream);
content.size = 0;
}
- if (main->parameters[fss_basic_list_write_parameter_file_e].result == f_console_result_additional_e) {
+ if (main->parameters.array[fss_basic_list_write_parameter_file_e].result == f_console_result_additional_e) {
if (output.id != -1) {
f_file_stream_close(F_true, &output);
}
#ifndef _di_fss_basic_list_write_main_delete_
f_status_t fss_basic_list_write_main_delete(fss_basic_list_write_main_t * const main) {
- for (f_array_length_t i = 0; i < fss_basic_list_write_total_parameters_d; ++i) {
-
- f_type_array_lengths_resize(0, &main->parameters[i].locations);
- f_type_array_lengths_resize(0, &main->parameters[i].locations_sub);
- f_type_array_lengths_resize(0, &main->parameters[i].values);
- } // for
+ f_console_parameters_delete(&main->parameters);
f_type_array_lengths_resize(0, &main->remaining);
#ifndef _di_fss_basic_list_write_main_t_
typedef struct {
- f_console_parameter_t parameters[fss_basic_list_write_total_parameters_d];
+ f_console_parameters_t parameters;
f_array_lengths_t remaining;
bool process_pipe;
#define fss_basic_list_write_main_t_initialize \
{ \
- fss_basic_list_write_console_parameter_t_initialize, \
+ f_console_parameters_t_initialize, \
f_array_lengths_t_initialize, \
F_false, \
fl_print_t_initialize, \
}
if (content) {
- if (main->parameters[fss_basic_list_write_parameter_trim_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_basic_list_write_parameter_trim_e].result == f_console_result_found_e) {
complete = f_fss_complete_full_trim_e;
}
else {
#endif
#ifndef _di_fss_basic_read_program_version_
- const f_string_static_t fss_basic_read_program_version_s = macro_f_string_static_t_initialize2(FSS_BASIC_READ_program_version_s, 0, FSS_BASIC_READ_program_version_s_length);
+ const f_string_static_t fss_basic_read_program_version_s = macro_f_string_static_t_initialize(FSS_BASIC_READ_program_version_s, 0, FSS_BASIC_READ_program_version_s_length);
#endif // _di_fss_basic_read_program_version_
#ifndef _di_fss_basic_read_program_name_
- const f_string_static_t fss_basic_read_program_name_s = macro_f_string_static_t_initialize2(FSS_BASIC_READ_program_name_s, 0, FSS_BASIC_READ_program_name_s_length);
- const f_string_static_t fss_basic_read_program_name_long_s = macro_f_string_static_t_initialize2(FSS_BASIC_READ_program_name_long_s, 0, FSS_BASIC_READ_program_name_long_s_length);
+ const f_string_static_t fss_basic_read_program_name_s = macro_f_string_static_t_initialize(FSS_BASIC_READ_program_name_s, 0, FSS_BASIC_READ_program_name_s_length);
+ const f_string_static_t fss_basic_read_program_name_long_s = macro_f_string_static_t_initialize(FSS_BASIC_READ_program_name_long_s, 0, FSS_BASIC_READ_program_name_long_s_length);
#endif // _di_fss_basic_read_program_name_
#ifndef _di_fss_basic_read_print_help_
f_status_t status = F_none;
- {
- const f_console_parameters_t parameters = macro_f_console_parameters_t_initialize(main->parameters, fss_basic_read_total_parameters_d);
+ f_console_parameter_t parameters[] = fss_basic_read_console_parameter_t_initialize;
+ main->parameters.array = parameters;
+ main->parameters.used = fss_basic_read_total_parameters_d;
- {
- f_console_parameter_id_t ids[3] = { fss_basic_read_parameter_no_color_e, fss_basic_read_parameter_light_e, fss_basic_read_parameter_dark_e };
- const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 3);
+ {
+ f_console_parameter_id_t ids[3] = { fss_basic_read_parameter_no_color_e, fss_basic_read_parameter_light_e, fss_basic_read_parameter_dark_e };
+ const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 3);
- status = fll_program_parameter_process(*arguments, parameters, choices, F_true, &main->remaining, &main->context);
+ status = fll_program_parameter_process(*arguments, &main->parameters, choices, F_true, &main->remaining, &main->context);
- main->output.set = &main->context.set;
- main->error.set = &main->context.set;
- main->warning.set = &main->context.set;
+ main->output.set = &main->context.set;
+ main->error.set = &main->context.set;
+ main->warning.set = &main->context.set;
- if (main->context.set.error.before) {
- main->output.context = f_color_set_empty_s;
- main->output.notable = main->context.set.notable;
+ if (main->context.set.error.before) {
+ main->output.context = f_color_set_empty_s;
+ main->output.notable = main->context.set.notable;
- main->error.context = main->context.set.error;
- main->error.notable = main->context.set.notable;
+ main->error.context = main->context.set.error;
+ main->error.notable = main->context.set.notable;
- main->warning.context = main->context.set.warning;
- main->warning.notable = main->context.set.notable;
- }
- else {
- f_color_set_t *sets[] = { &main->output.context, &main->output.notable, &main->error.context, &main->error.notable, &main->warning.context, &main->warning.notable, 0 };
+ main->warning.context = main->context.set.warning;
+ main->warning.notable = main->context.set.notable;
+ }
+ else {
+ f_color_set_t *sets[] = { &main->output.context, &main->output.notable, &main->error.context, &main->error.notable, &main->warning.context, &main->warning.notable, 0 };
- fll_program_parameter_process_empty(&main->context, sets);
- }
+ fll_program_parameter_process_empty(&main->context, sets);
+ }
- if (F_status_is_error(status)) {
- fss_basic_read_main_delete(main);
+ if (F_status_is_error(status)) {
+ fss_basic_read_main_delete(main);
- return F_status_set_error(status);
- }
+ return F_status_set_error(status);
}
+ }
- // Identify priority of verbosity related parameters.
- {
- f_console_parameter_id_t ids[4] = { fss_basic_read_parameter_verbosity_quiet_e, fss_basic_read_parameter_verbosity_normal_e, fss_basic_read_parameter_verbosity_verbose_e, fss_basic_read_parameter_verbosity_debug_e };
- f_console_parameter_id_t choice = 0;
- const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 4);
+ // Identify priority of verbosity related parameters.
+ {
+ f_console_parameter_id_t ids[4] = { fss_basic_read_parameter_verbosity_quiet_e, fss_basic_read_parameter_verbosity_normal_e, fss_basic_read_parameter_verbosity_verbose_e, fss_basic_read_parameter_verbosity_debug_e };
+ f_console_parameter_id_t choice = 0;
+ const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 4);
- status = f_console_parameter_prioritize_right(parameters, choices, &choice);
+ status = f_console_parameter_prioritize_right(main->parameters, choices, &choice);
- if (F_status_is_error(status)) {
- fss_basic_read_main_delete(main);
-
- return status;
- }
+ if (F_status_is_error(status)) {
+ fss_basic_read_main_delete(main);
- if (choice == fss_basic_read_parameter_verbosity_quiet_e) {
- main->output.verbosity = f_console_verbosity_quiet_e;
- main->error.verbosity = f_console_verbosity_quiet_e;
- main->warning.verbosity = f_console_verbosity_quiet_e;
- }
- else if (choice == fss_basic_read_parameter_verbosity_normal_e) {
- main->output.verbosity = f_console_verbosity_normal_e;
- main->error.verbosity = f_console_verbosity_normal_e;
- main->warning.verbosity = f_console_verbosity_normal_e;
- }
- else if (choice == fss_basic_read_parameter_verbosity_verbose_e) {
- main->output.verbosity = f_console_verbosity_verbose_e;
- main->error.verbosity = f_console_verbosity_verbose_e;
- main->warning.verbosity = f_console_verbosity_verbose_e;
- }
- else if (choice == fss_basic_read_parameter_verbosity_debug_e) {
- main->output.verbosity = f_console_verbosity_debug_e;
- main->error.verbosity = f_console_verbosity_debug_e;
- main->warning.verbosity = f_console_verbosity_debug_e;
- }
+ return status;
}
- status = F_none;
+ if (choice == fss_basic_read_parameter_verbosity_quiet_e) {
+ main->output.verbosity = f_console_verbosity_quiet_e;
+ main->error.verbosity = f_console_verbosity_quiet_e;
+ main->warning.verbosity = f_console_verbosity_quiet_e;
+ }
+ else if (choice == fss_basic_read_parameter_verbosity_normal_e) {
+ main->output.verbosity = f_console_verbosity_normal_e;
+ main->error.verbosity = f_console_verbosity_normal_e;
+ main->warning.verbosity = f_console_verbosity_normal_e;
+ }
+ else if (choice == fss_basic_read_parameter_verbosity_verbose_e) {
+ main->output.verbosity = f_console_verbosity_verbose_e;
+ main->error.verbosity = f_console_verbosity_verbose_e;
+ main->warning.verbosity = f_console_verbosity_verbose_e;
+ }
+ else if (choice == fss_basic_read_parameter_verbosity_debug_e) {
+ main->output.verbosity = f_console_verbosity_debug_e;
+ main->error.verbosity = f_console_verbosity_debug_e;
+ main->warning.verbosity = f_console_verbosity_debug_e;
+ }
}
- if (main->parameters[fss_basic_read_parameter_help_e].result == f_console_result_found_e) {
+ f_string_static_t * const argv = main->parameters.arguments.array;
+
+ status = F_none;
+
+ if (main->parameters.array[fss_basic_read_parameter_help_e].result == f_console_result_found_e) {
fss_basic_read_print_help(main->output.to, main->context);
fss_basic_read_main_delete(main);
return status;
}
- if (main->parameters[fss_basic_read_parameter_version_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_basic_read_parameter_version_e].result == f_console_result_found_e) {
fll_program_print_version(main->output.to, fss_basic_read_program_version_s);
fss_basic_read_main_delete(main);
for (f_array_length_t i = 0; i < 6; ++i) {
- if (main->parameters[parameter_code[i]].result == f_console_result_found_e) {
+ if (main->parameters.array[parameter_code[i]].result == f_console_result_found_e) {
flockfile(main->error.to.stream);
fl_print_format("%q%[%QThe parameter '%]", main->error.to.stream, f_string_eol_s, main->error.context, main->error.prefix, main->error.context);
} // for
}
- if (F_status_is_error_not(status) && main->parameters[fss_basic_read_parameter_columns_e].result == f_console_result_found_e) {
+ if (F_status_is_error_not(status) && main->parameters.array[fss_basic_read_parameter_columns_e].result == f_console_result_found_e) {
const f_array_length_t parameter_code[] = {
fss_basic_read_parameter_depth_e,
fss_basic_read_parameter_line_e,
for (f_array_length_t i = 0; i < 5; ++i) {
- if (main->parameters[parameter_code[i]].result == parameter_match[i]) {
+ if (main->parameters.array[parameter_code[i]].result == parameter_match[i]) {
flockfile(main->error.to.stream);
fl_print_format("%q%[%QCannot specify the '%]", main->error.to.stream, f_string_eol_s, main->error.context, main->error.prefix, main->error.context);
} // for
}
- if (F_status_is_error_not(status) && main->parameters[fss_basic_read_parameter_pipe_e].result == f_console_result_found_e) {
- if (main->parameters[fss_basic_read_parameter_total_e].result == f_console_result_found_e) {
+ if (F_status_is_error_not(status) && main->parameters.array[fss_basic_read_parameter_pipe_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_basic_read_parameter_total_e].result == f_console_result_found_e) {
flockfile(main->error.to.stream);
fl_print_format("%q%[%QCannot specify the '%]", main->error.to.stream, f_string_eol_s, main->error.context, main->error.prefix, main->error.context);
status = F_status_set_error(F_parameter);
}
- else if (main->parameters[fss_basic_read_parameter_line_e].result == f_console_result_additional_e) {
+ else if (main->parameters.array[fss_basic_read_parameter_line_e].result == f_console_result_additional_e) {
flockfile(main->error.to.stream);
fl_print_format("%q%[%QCannot specify the '%]", main->error.to.stream, f_string_eol_s, main->error.context, main->error.prefix, main->error.context);
}
}
- if (F_status_is_error_not(status) && main->parameters[fss_basic_read_parameter_delimit_e].result == f_console_result_additional_e) {
+ if (F_status_is_error_not(status) && main->parameters.array[fss_basic_read_parameter_delimit_e].result == f_console_result_additional_e) {
f_array_length_t location = 0;
f_array_length_t length = 0;
// Set the value to 0 to allow for detecting mode based on what is provided.
data.delimit_mode = 0;
- for (f_array_length_t i = 0; i < main->parameters[fss_basic_read_parameter_delimit_e].values.used; ++i) {
+ for (f_array_length_t i = 0; i < main->parameters.array[fss_basic_read_parameter_delimit_e].values.used; ++i) {
if (fss_basic_read_signal_received(main)) {
status = F_status_set_error(F_interrupt);
break;
}
- location = main->parameters[fss_basic_read_parameter_delimit_e].values.array[i];
+ location = main->parameters.array[fss_basic_read_parameter_delimit_e].values.array[i];
length = strnlen(arguments->argv[location], F_console_parameter_size_d);
if (!length) {
// This standard does not support nesting, so any depth greater than 0 can be predicted without processing the file.
if (F_status_is_error_not(status) && data.depths.array[0].depth > 0) {
- if (main->parameters[fss_basic_read_parameter_total_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_basic_read_parameter_total_e].result == f_console_result_found_e) {
fss_basic_read_print_zero(main);
}
return F_none;
}
- if (F_status_is_error_not(status) && main->parameters[fss_basic_read_parameter_select_e].result == f_console_result_found_e) {
+ if (F_status_is_error_not(status) && main->parameters.array[fss_basic_read_parameter_select_e].result == f_console_result_found_e) {
flockfile(main->error.to.stream);
fl_print_format("%q%[%QThe '%]", main->error.to.stream, f_string_eol_s, main->error.context, main->error.prefix, main->error.context);
status = f_file_stream_open(arguments->argv[main->remaining.array[i]], 0, &file);
if (F_status_is_error(status)) {
- fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_open", F_true, arguments->argv[main->remaining.array[i]], "open", fll_error_file_type_file_e);
+ fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_open", F_true, arguments->argv[main->remaining.array[i]], f_file_operation_open_s, fll_error_file_type_file_e);
break;
}
#ifndef _di_fss_basic_read_main_delete_
f_status_t fss_basic_read_main_delete(fss_basic_read_main_t * const main) {
- for (f_array_length_t i = 0; i < fss_basic_read_total_parameters_d; ++i) {
-
- f_type_array_lengths_resize(0, &main->parameters[i].locations);
- f_type_array_lengths_resize(0, &main->parameters[i].locations_sub);
- f_type_array_lengths_resize(0, &main->parameters[i].values);
- } // for
+ f_console_parameters_delete(&main->parameters);
f_type_array_lengths_resize(0, &main->remaining);
macro_f_color_context_t_delete_simple(main->context);
#ifndef _di_fss_basic_read_main_t_
typedef struct {
- f_console_parameter_t parameters[fss_basic_read_total_parameters_d];
+ f_console_parameters_t parameters;
f_array_lengths_t remaining;
bool process_pipe;
#define fss_basic_read_main_t_initialize \
{ \
- fss_basic_read_console_parameter_t_initialize, \
+ f_console_parameters_t_initialize, \
f_array_lengths_t_initialize, \
F_false, \
fl_print_t_initialize, \
#ifndef _di_fss_basic_read_print_object_end_
void fss_basic_read_print_object_end(fss_basic_read_main_t * const main) {
- if (main->parameters[fss_basic_read_parameter_pipe_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_basic_read_parameter_pipe_e].result == f_console_result_found_e) {
f_print_character(fss_basic_read_pipe_content_start_s, main->output.to.stream);
}
else {
#ifndef _di_fss_basic_read_print_set_end_
void fss_basic_read_print_set_end(fss_basic_read_main_t * const main) {
- if (main->parameters[fss_basic_read_parameter_pipe_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_basic_read_parameter_pipe_e].result == f_console_result_found_e) {
f_print_character(fss_basic_read_pipe_content_end_s, main->output.to.stream);
}
else {
{
f_array_length_t depth_size = 1;
- if (main->parameters[fss_basic_read_parameter_depth_e].result == f_console_result_additional_e) {
- depth_size = main->parameters[fss_basic_read_parameter_depth_e].values.used;
+ if (main->parameters.array[fss_basic_read_parameter_depth_e].result == f_console_result_additional_e) {
+ depth_size = main->parameters.array[fss_basic_read_parameter_depth_e].values.used;
}
if (depth_size > data->depths.size) {
macro_f_string_dynamic_t_clear(data->depths.array[i].value_name);
- if (!main->parameters[fss_basic_read_parameter_depth_e].values.used) {
+ if (!main->parameters.array[fss_basic_read_parameter_depth_e].values.used) {
position_depth = 0;
}
else {
- position_depth = main->parameters[fss_basic_read_parameter_depth_e].values.array[i];
+ position_depth = main->parameters.array[fss_basic_read_parameter_depth_e].values.array[i];
const f_string_range_t range = macro_f_string_range_t_initialize(strlen(arguments->argv[position_depth]));
}
}
- if (main->parameters[fss_basic_read_parameter_at_e].result == f_console_result_additional_e) {
- for (; position_at < main->parameters[fss_basic_read_parameter_at_e].values.used; ++position_at) {
+ if (main->parameters.array[fss_basic_read_parameter_at_e].result == f_console_result_additional_e) {
+ for (; position_at < main->parameters.array[fss_basic_read_parameter_at_e].values.used; ++position_at) {
- if (main->parameters[fss_basic_read_parameter_at_e].values.array[position_at] < position_depth) {
+ if (main->parameters.array[fss_basic_read_parameter_at_e].values.array[position_at] < position_depth) {
continue;
}
- if (i + 1 < data->depths.used && main->parameters[fss_basic_read_parameter_at_e].values.array[position_at] > main->parameters[fss_basic_read_parameter_depth_e].values.array[i + 1]) {
+ if (i + 1 < data->depths.used && main->parameters.array[fss_basic_read_parameter_at_e].values.array[position_at] > main->parameters.array[fss_basic_read_parameter_depth_e].values.array[i + 1]) {
break;
}
- data->depths.array[i].index_at = main->parameters[fss_basic_read_parameter_at_e].values.array[position_at];
+ data->depths.array[i].index_at = main->parameters.array[fss_basic_read_parameter_at_e].values.array[position_at];
const f_string_range_t range = macro_f_string_range_t_initialize(strlen(arguments->argv[data->depths.array[i].index_at]));
} // for
}
- if (main->parameters[fss_basic_read_parameter_name_e].result == f_console_result_additional_e) {
- for (; position_name < main->parameters[fss_basic_read_parameter_name_e].values.used; position_name++) {
+ if (main->parameters.array[fss_basic_read_parameter_name_e].result == f_console_result_additional_e) {
+ for (; position_name < main->parameters.array[fss_basic_read_parameter_name_e].values.used; position_name++) {
- if (main->parameters[fss_basic_read_parameter_name_e].values.array[position_name] < position_depth) {
+ if (main->parameters.array[fss_basic_read_parameter_name_e].values.array[position_name] < position_depth) {
continue;
}
- if (i + 1 < data->depths.used && main->parameters[fss_basic_read_parameter_name_e].values.array[position_name] > main->parameters[fss_basic_read_parameter_depth_e].values.array[i + 1]) {
+ if (i + 1 < data->depths.used && main->parameters.array[fss_basic_read_parameter_name_e].values.array[position_name] > main->parameters.array[fss_basic_read_parameter_depth_e].values.array[i + 1]) {
break;
}
- data->depths.array[i].index_name = main->parameters[fss_basic_read_parameter_name_e].values.array[position_name];
+ data->depths.array[i].index_name = main->parameters.array[fss_basic_read_parameter_name_e].values.array[position_name];
- if (main->parameters[fss_basic_read_parameter_trim_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_basic_read_parameter_trim_e].result == f_console_result_found_e) {
status = fl_string_rip(arguments->argv[data->depths.array[i].index_name], strlen(arguments->argv[data->depths.array[i].index_name]), &data->depths.array[i].value_name);
}
else {
}
if (F_status_is_error(status)) {
- fll_error_print(main->error, F_status_set_fine(status), main->parameters[fss_basic_read_parameter_trim_e].result == f_console_result_found_e ? "fl_string_rip" : "f_string_append", F_true);
+ fll_error_print(main->error, F_status_set_fine(status), main->parameters.array[fss_basic_read_parameter_trim_e].result == f_console_result_found_e ? "fl_string_rip" : "f_string_append", F_true);
return status;
}
if (F_status_is_error(status)) {
const f_string_t file_name = fss_basic_read_file_identify(input.start, data->files);
- fll_error_file_print(main->error, F_status_set_fine(status), "fll_fss_basic_read", F_true, file_name, "process", fll_error_file_type_file_e);
+ fll_error_file_print(main->error, F_status_set_fine(status), "fll_fss_basic_read", F_true, file_name, f_file_operation_process_s, fll_error_file_type_file_e);
return status;
}
#ifndef _di_fss_basic_read_load_number_
f_status_t fss_basic_read_load_number(fss_basic_read_main_t * const main, const f_array_length_t parameter, const f_string_t name, const f_console_arguments_t *arguments, f_number_unsigned_t *number) {
- if (main->parameters[parameter].result == f_console_result_additional_e) {
- const f_array_length_t index = main->parameters[parameter].values.array[main->parameters[parameter].values.used - 1];
+ if (main->parameters.array[parameter].result == f_console_result_additional_e) {
+ const f_array_length_t index = main->parameters.array[parameter].values.array[main->parameters.array[parameter].values.used - 1];
const f_string_range_t range = macro_f_string_range_t_initialize(strnlen(arguments->argv[index], F_console_parameter_size_d));
const f_status_t status = fl_conversion_string_to_number_unsigned(arguments->argv[index], range, number);
// This standard does not support multiple content groups.
if ((data->option & fss_basic_read_data_option_select_d) && data->select) {
- if (main->parameters[fss_basic_read_parameter_total_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_basic_read_parameter_total_e].result == f_console_result_found_e) {
flockfile(main->output.to.stream);
fss_basic_read_print_zero(main);
f_status_t status = F_none;
- if (main->parameters[fss_basic_read_parameter_at_e].result == f_console_result_additional_e) {
+ if (main->parameters.array[fss_basic_read_parameter_at_e].result == f_console_result_additional_e) {
data->option |= fss_basic_read_data_option_at_d;
}
- if (main->parameters[fss_basic_read_parameter_columns_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_basic_read_parameter_columns_e].result == f_console_result_found_e) {
data->option |= fss_basic_read_data_option_columns_d;
}
- if (main->parameters[fss_basic_read_parameter_content_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_basic_read_parameter_content_e].result == f_console_result_found_e) {
data->option |= fss_basic_read_data_option_content_d;
}
- if (main->parameters[fss_basic_read_parameter_empty_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_basic_read_parameter_empty_e].result == f_console_result_found_e) {
data->option |= fss_basic_read_data_option_empty_d;
}
- if (main->parameters[fss_basic_read_parameter_line_e].result == f_console_result_additional_e) {
+ if (main->parameters.array[fss_basic_read_parameter_line_e].result == f_console_result_additional_e) {
data->option |= fss_basic_read_data_option_line_d;
status = fss_basic_read_load_number(main, fss_basic_read_parameter_line_e, fss_basic_read_long_line_s, arguments, &data->line);
if (F_status_is_error(status)) return status;
}
- if (main->parameters[fss_basic_read_parameter_name_e].result == f_console_result_additional_e) {
+ if (main->parameters.array[fss_basic_read_parameter_name_e].result == f_console_result_additional_e) {
data->option |= fss_basic_read_data_option_name_d;
}
- if (main->parameters[fss_basic_read_parameter_object_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_basic_read_parameter_object_e].result == f_console_result_found_e) {
data->option |= fss_basic_read_data_option_object_d;
}
- if (main->parameters[fss_basic_read_parameter_raw_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_basic_read_parameter_raw_e].result == f_console_result_found_e) {
data->option |= fss_basic_read_data_option_raw_d;
}
- if (main->parameters[fss_basic_read_parameter_select_e].result == f_console_result_additional_e) {
+ if (main->parameters.array[fss_basic_read_parameter_select_e].result == f_console_result_additional_e) {
data->option |= fss_basic_read_data_option_select_d;
status = fss_basic_read_load_number(main, fss_basic_read_parameter_select_e, fss_basic_read_long_select_s, arguments, &data->select);
if (F_status_is_error(status)) return status;
}
- if (main->parameters[fss_basic_read_parameter_total_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_basic_read_parameter_total_e].result == f_console_result_found_e) {
data->option |= fss_basic_read_data_option_total_d;
}
- if (main->parameters[fss_basic_read_parameter_trim_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_basic_read_parameter_trim_e].result == f_console_result_found_e) {
data->option |= fss_basic_read_data_option_trim_d;
}
#endif
#ifndef _di_byte_dump_program_version_
- const f_string_static_t fss_basic_write_program_version_s = macro_f_string_static_t_initialize2(FSS_BASIC_WRITE_program_version_s, 0, FSS_BASIC_WRITE_program_version_s_length);
+ const f_string_static_t fss_basic_write_program_version_s = macro_f_string_static_t_initialize(FSS_BASIC_WRITE_program_version_s, 0, FSS_BASIC_WRITE_program_version_s_length);
#endif // _di_byte_dump_program_version_
#ifndef _di_byte_dump_program_name_
- const f_string_static_t fss_basic_write_program_name_s = macro_f_string_static_t_initialize2(FSS_BASIC_WRITE_program_name_s, 0, FSS_BASIC_WRITE_program_name_s_length);
- const f_string_static_t fss_basic_write_program_name_long_s = macro_f_string_static_t_initialize2(FSS_BASIC_WRITE_program_name_long_s, 0, FSS_BASIC_WRITE_program_name_long_s_length);
+ const f_string_static_t fss_basic_write_program_name_s = macro_f_string_static_t_initialize(FSS_BASIC_WRITE_program_name_s, 0, FSS_BASIC_WRITE_program_name_s_length);
+ const f_string_static_t fss_basic_write_program_name_long_s = macro_f_string_static_t_initialize(FSS_BASIC_WRITE_program_name_long_s, 0, FSS_BASIC_WRITE_program_name_long_s_length);
#endif // _di_byte_dump_program_name_
#ifndef _di_fss_basic_write_print_help_
f_status_t status = F_none;
- {
- const f_console_parameters_t parameters = macro_f_console_parameters_t_initialize(main->parameters, fss_basic_write_total_parameters_d);
+ f_console_parameter_t parameters[] = fss_basic_write_console_parameter_t_initialize;
+ main->parameters.array = parameters;
+ main->parameters.used = fss_basic_write_total_parameters_d;
- {
- f_console_parameter_id_t ids[3] = { fss_basic_write_parameter_no_color_e, fss_basic_write_parameter_light_e, fss_basic_write_parameter_dark_e };
- const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 3);
+ {
+ f_console_parameter_id_t ids[3] = { fss_basic_write_parameter_no_color_e, fss_basic_write_parameter_light_e, fss_basic_write_parameter_dark_e };
+ const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 3);
- status = fll_program_parameter_process(*arguments, parameters, choices, F_true, &main->remaining, &main->context);
+ status = fll_program_parameter_process(*arguments, &main->parameters, choices, F_true, &main->remaining, &main->context);
- main->output.set = &main->context.set;
- main->error.set = &main->context.set;
- main->warning.set = &main->context.set;
+ main->output.set = &main->context.set;
+ main->error.set = &main->context.set;
+ main->warning.set = &main->context.set;
- if (main->context.set.error.before) {
- main->output.context = f_color_set_empty_s;
- main->output.notable = main->context.set.notable;
+ if (main->context.set.error.before) {
+ main->output.context = f_color_set_empty_s;
+ main->output.notable = main->context.set.notable;
- main->error.context = main->context.set.error;
- main->error.notable = main->context.set.notable;
+ main->error.context = main->context.set.error;
+ main->error.notable = main->context.set.notable;
- main->warning.context = main->context.set.warning;
- main->warning.notable = main->context.set.notable;
- }
- else {
- f_color_set_t *sets[] = { &main->output.context, &main->output.notable, &main->error.context, &main->error.notable, &main->warning.context, &main->warning.notable, 0 };
+ main->warning.context = main->context.set.warning;
+ main->warning.notable = main->context.set.notable;
+ }
+ else {
+ f_color_set_t *sets[] = { &main->output.context, &main->output.notable, &main->error.context, &main->error.notable, &main->warning.context, &main->warning.notable, 0 };
- fll_program_parameter_process_empty(&main->context, sets);
- }
+ fll_program_parameter_process_empty(&main->context, sets);
+ }
- if (F_status_is_error(status)) {
- fss_basic_write_main_delete(main);
+ if (F_status_is_error(status)) {
+ fss_basic_write_main_delete(main);
- return F_status_set_error(status);
- }
+ return F_status_set_error(status);
}
+ }
- // Identify priority of verbosity related parameters.
- {
- f_console_parameter_id_t ids[4] = { fss_basic_write_parameter_verbosity_quiet_e, fss_basic_write_parameter_verbosity_normal_e, fss_basic_write_parameter_verbosity_verbose_e, fss_basic_write_parameter_verbosity_debug_e };
- f_console_parameter_id_t choice = 0;
- const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 4);
-
- status = f_console_parameter_prioritize_right(parameters, choices, &choice);
+ // Identify priority of verbosity related parameters.
+ {
+ f_console_parameter_id_t ids[4] = { fss_basic_write_parameter_verbosity_quiet_e, fss_basic_write_parameter_verbosity_normal_e, fss_basic_write_parameter_verbosity_verbose_e, fss_basic_write_parameter_verbosity_debug_e };
+ f_console_parameter_id_t choice = 0;
+ const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 4);
- if (F_status_is_error(status)) {
- fss_basic_write_main_delete(main);
+ status = f_console_parameter_prioritize_right(main->parameters, choices, &choice);
- return status;
- }
+ if (F_status_is_error(status)) {
+ fss_basic_write_main_delete(main);
- if (choice == fss_basic_write_parameter_verbosity_quiet_e) {
- main->output.verbosity = f_console_verbosity_quiet_e;
- main->error.verbosity = f_console_verbosity_quiet_e;
- main->warning.verbosity = f_console_verbosity_quiet_e;
- }
- else if (choice == fss_basic_write_parameter_verbosity_normal_e) {
- main->output.verbosity = f_console_verbosity_normal_e;
- main->error.verbosity = f_console_verbosity_normal_e;
- main->warning.verbosity = f_console_verbosity_normal_e;
- }
- else if (choice == fss_basic_write_parameter_verbosity_verbose_e) {
- main->output.verbosity = f_console_verbosity_verbose_e;
- main->error.verbosity = f_console_verbosity_verbose_e;
- main->warning.verbosity = f_console_verbosity_verbose_e;
- }
- else if (choice == fss_basic_write_parameter_verbosity_debug_e) {
- main->output.verbosity = f_console_verbosity_debug_e;
- main->error.verbosity = f_console_verbosity_debug_e;
- main->warning.verbosity = f_console_verbosity_debug_e;
- }
+ return status;
}
- status = F_none;
+ if (choice == fss_basic_write_parameter_verbosity_quiet_e) {
+ main->output.verbosity = f_console_verbosity_quiet_e;
+ main->error.verbosity = f_console_verbosity_quiet_e;
+ main->warning.verbosity = f_console_verbosity_quiet_e;
+ }
+ else if (choice == fss_basic_write_parameter_verbosity_normal_e) {
+ main->output.verbosity = f_console_verbosity_normal_e;
+ main->error.verbosity = f_console_verbosity_normal_e;
+ main->warning.verbosity = f_console_verbosity_normal_e;
+ }
+ else if (choice == fss_basic_write_parameter_verbosity_verbose_e) {
+ main->output.verbosity = f_console_verbosity_verbose_e;
+ main->error.verbosity = f_console_verbosity_verbose_e;
+ main->warning.verbosity = f_console_verbosity_verbose_e;
+ }
+ else if (choice == fss_basic_write_parameter_verbosity_debug_e) {
+ main->output.verbosity = f_console_verbosity_debug_e;
+ main->error.verbosity = f_console_verbosity_debug_e;
+ main->warning.verbosity = f_console_verbosity_debug_e;
+ }
}
- if (main->parameters[fss_basic_write_parameter_help_e].result == f_console_result_found_e) {
+ f_string_static_t * const argv = main->parameters.arguments.array;
+
+ status = F_none;
+
+ if (main->parameters.array[fss_basic_write_parameter_help_e].result == f_console_result_found_e) {
fss_basic_write_print_help(main->output.to, main->context);
fss_basic_write_main_delete(main);
return status;
}
- if (main->parameters[fss_basic_write_parameter_version_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_basic_write_parameter_version_e].result == f_console_result_found_e) {
fll_program_print_version(main->output.to, fss_basic_write_program_version_s);
fss_basic_write_main_delete(main);
output.flag = F_file_flag_create_d | F_file_flag_write_only_d | F_file_flag_append_d;
if (F_status_is_error_not(status)) {
- if (main->parameters[fss_basic_write_parameter_file_e].result == f_console_result_additional_e) {
- if (main->parameters[fss_basic_write_parameter_file_e].values.used > 1) {
+ if (main->parameters.array[fss_basic_write_parameter_file_e].result == f_console_result_additional_e) {
+ if (main->parameters.array[fss_basic_write_parameter_file_e].values.used > 1) {
if (main->error.verbosity != f_console_verbosity_quiet_e) {
flockfile(main->error.to.stream);
status = F_status_set_error(F_parameter);
}
else {
- const f_array_length_t location = main->parameters[fss_basic_write_parameter_file_e].values.array[0];
+ const f_array_length_t location = main->parameters.array[fss_basic_write_parameter_file_e].values.array[0];
output.id = -1;
output.stream = 0;
status = f_file_stream_open(arguments->argv[location], 0, &output);
if (F_status_is_error(status)) {
- fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_open", F_true, arguments->argv[location], "open", fll_error_file_type_file_e);
+ fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_open", F_true, arguments->argv[location], f_file_operation_open_s, fll_error_file_type_file_e);
}
}
}
- else if (main->parameters[fss_basic_write_parameter_file_e].result == f_console_result_found_e) {
+ else if (main->parameters.array[fss_basic_write_parameter_file_e].result == f_console_result_found_e) {
fss_basic_write_error_parameter_value_missing_print(main, f_console_symbol_long_enable_s, fss_basic_write_long_file_s);
status = F_status_set_error(F_parameter);
}
}
if (F_status_is_error_not(status)) {
- if (main->parameters[fss_basic_write_parameter_object_e].locations.used || main->parameters[fss_basic_write_parameter_content_e].locations.used) {
- if (main->parameters[fss_basic_write_parameter_object_e].locations.used) {
- if (main->parameters[fss_basic_write_parameter_object_e].locations.used != main->parameters[fss_basic_write_parameter_object_e].values.used) {
+ if (main->parameters.array[fss_basic_write_parameter_object_e].locations.used || main->parameters.array[fss_basic_write_parameter_content_e].locations.used) {
+ if (main->parameters.array[fss_basic_write_parameter_object_e].locations.used) {
+ if (main->parameters.array[fss_basic_write_parameter_object_e].locations.used != main->parameters.array[fss_basic_write_parameter_object_e].values.used) {
fss_basic_write_error_parameter_value_missing_print(main, f_console_symbol_long_enable_s, fss_basic_write_long_object_s);
status = F_status_set_error(F_parameter);
}
- else if (main->parameters[fss_basic_write_parameter_content_e].locations.used != main->parameters[fss_basic_write_parameter_content_e].values.used) {
+ else if (main->parameters.array[fss_basic_write_parameter_content_e].locations.used != main->parameters.array[fss_basic_write_parameter_content_e].values.used) {
fss_basic_write_error_parameter_value_missing_print(main, f_console_symbol_long_enable_s, fss_basic_write_long_content_s);
status = F_status_set_error(F_parameter);
}
- else if (main->parameters[fss_basic_write_parameter_object_e].locations.used != main->parameters[fss_basic_write_parameter_content_e].locations.used && main->parameters[fss_basic_write_parameter_partial_e].result == f_console_result_none_e) {
+ else if (main->parameters.array[fss_basic_write_parameter_object_e].locations.used != main->parameters.array[fss_basic_write_parameter_content_e].locations.used && main->parameters.array[fss_basic_write_parameter_partial_e].result == f_console_result_none_e) {
fss_basic_write_error_parameter_same_times_print(main);
status = F_status_set_error(F_parameter);
}
- else if (main->parameters[fss_basic_write_parameter_content_e].locations.used && main->parameters[fss_basic_write_parameter_partial_e].locations.used) {
- if (main->parameters[fss_basic_write_parameter_content_e].result == f_console_result_additional_e) {
+ else if (main->parameters.array[fss_basic_write_parameter_content_e].locations.used && main->parameters.array[fss_basic_write_parameter_partial_e].locations.used) {
+ if (main->parameters.array[fss_basic_write_parameter_content_e].result == f_console_result_additional_e) {
if (main->error.verbosity != f_console_verbosity_quiet_e) {
flockfile(main->error.to.stream);
}
if (F_status_is_error_not(status)) {
- if (main->parameters[fss_basic_write_parameter_content_e].result == f_console_result_additional_e) {
+ if (main->parameters.array[fss_basic_write_parameter_content_e].result == f_console_result_additional_e) {
f_array_length_t location_object = 0;
f_array_length_t location_content = 0;
f_array_length_t location_sub_object = 0;
f_array_length_t location_sub_content = 0;
- for (f_array_length_t i = 0; i < main->parameters[fss_basic_write_parameter_object_e].locations.used; ++i) {
- location_object = main->parameters[fss_basic_write_parameter_object_e].locations.array[i];
- location_content = main->parameters[fss_basic_write_parameter_content_e].locations.array[i];
- location_sub_object = main->parameters[fss_basic_write_parameter_object_e].locations_sub.array[i];
- location_sub_content = main->parameters[fss_basic_write_parameter_content_e].locations_sub.array[i];
+ for (f_array_length_t i = 0; i < main->parameters.array[fss_basic_write_parameter_object_e].locations.used; ++i) {
+ location_object = main->parameters.array[fss_basic_write_parameter_object_e].locations.array[i];
+ location_content = main->parameters.array[fss_basic_write_parameter_content_e].locations.array[i];
+ location_sub_object = main->parameters.array[fss_basic_write_parameter_object_e].locations_sub.array[i];
+ location_sub_content = main->parameters.array[fss_basic_write_parameter_content_e].locations_sub.array[i];
if (location_object > location_content || location_object == location_content && location_sub_object > location_sub_content) {
if (main->error.verbosity != f_console_verbosity_quiet_e) {
}
}
}
- else if (main->parameters[fss_basic_write_parameter_content_e].locations.used) {
- if (main->parameters[fss_basic_write_parameter_content_e].locations.used != main->parameters[fss_basic_write_parameter_content_e].values.used) {
+ else if (main->parameters.array[fss_basic_write_parameter_content_e].locations.used) {
+ if (main->parameters.array[fss_basic_write_parameter_content_e].locations.used != main->parameters.array[fss_basic_write_parameter_content_e].values.used) {
fss_basic_write_error_parameter_value_missing_print(main, f_console_symbol_long_enable_s, fss_basic_write_long_content_s);
status = F_status_set_error(F_parameter);
}
- else if (!main->parameters[fss_basic_write_parameter_partial_e].locations.used) {
+ else if (!main->parameters.array[fss_basic_write_parameter_partial_e].locations.used) {
fss_basic_write_error_parameter_same_times_print(main);
status = F_status_set_error(F_parameter);
}
}
if (F_status_is_error_not(status) && main->process_pipe) {
- if (main->parameters[fss_basic_write_parameter_partial_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_basic_write_parameter_partial_e].result == f_console_result_found_e) {
if (main->error.verbosity != f_console_verbosity_quiet_e) {
flockfile(main->error.to.stream);
}
if (F_status_is_error_not(status)) {
- if (main->parameters[fss_basic_write_parameter_prepend_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_basic_write_parameter_prepend_e].result == f_console_result_found_e) {
if (main->error.verbosity != f_console_verbosity_quiet_e) {
flockfile(main->error.to.stream);
status = F_status_set_error(F_parameter);
}
- else if (main->parameters[fss_basic_write_parameter_prepend_e].result == f_console_result_additional_e) {
- const f_array_length_t index = main->parameters[fss_basic_write_parameter_prepend_e].values.array[main->parameters[fss_basic_write_parameter_prepend_e].values.used - 1];
+ else if (main->parameters.array[fss_basic_write_parameter_prepend_e].result == f_console_result_additional_e) {
+ const f_array_length_t index = main->parameters.array[fss_basic_write_parameter_prepend_e].values.array[main->parameters.array[fss_basic_write_parameter_prepend_e].values.used - 1];
const f_array_length_t length = strnlen(arguments->argv[index], F_console_parameter_size_d);
// Even though this standard does not utilize this parameter, provide the validation for consistency.
if (length) {
f_string_range_t range = macro_f_string_range_t_initialize(length);
- const f_string_static_t prepend = macro_f_string_static_t_initialize(arguments->argv[index], length);
+ const f_string_static_t prepend = macro_f_string_static_t_initialize2(arguments->argv[index], length);
for (; range.start < length; range.start++) {
}
if (F_status_is_error_not(status)) {
- if (main->parameters[fss_basic_write_parameter_ignore_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_basic_write_parameter_ignore_e].result == f_console_result_found_e) {
if (main->error.verbosity != f_console_verbosity_quiet_e) {
flockfile(main->error.to.stream);
status = F_status_set_error(F_parameter);
}
- else if (main->parameters[fss_basic_write_parameter_ignore_e].result == f_console_result_additional_e) {
- const f_array_length_t total_locations = main->parameters[fss_basic_write_parameter_ignore_e].locations.used;
- const f_array_length_t total_arguments = main->parameters[fss_basic_write_parameter_ignore_e].values.used;
+ else if (main->parameters.array[fss_basic_write_parameter_ignore_e].result == f_console_result_additional_e) {
+ const f_array_length_t total_locations = main->parameters.array[fss_basic_write_parameter_ignore_e].locations.used;
+ const f_array_length_t total_arguments = main->parameters.array[fss_basic_write_parameter_ignore_e].values.used;
if (total_locations * 2 > total_arguments) {
flockfile(main->error.to.stream);
f_fss_quote_t quote = F_fss_delimit_quote_double_s;
if (F_status_is_error_not(status)) {
- if (main->parameters[fss_basic_write_parameter_double_e].result == f_console_result_found_e) {
- if (main->parameters[fss_basic_write_parameter_single_e].result == f_console_result_found_e) {
- if (main->parameters[fss_basic_write_parameter_double_e].location < main->parameters[fss_basic_write_parameter_single_e].location) {
+ if (main->parameters.array[fss_basic_write_parameter_double_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_basic_write_parameter_single_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_basic_write_parameter_double_e].location < main->parameters.array[fss_basic_write_parameter_single_e].location) {
quote = F_fss_delimit_quote_single_s;
}
}
}
- else if (main->parameters[fss_basic_write_parameter_single_e].result == f_console_result_found_e) {
+ else if (main->parameters.array[fss_basic_write_parameter_single_e].result == f_console_result_found_e) {
quote = F_fss_delimit_quote_single_s;
}
}
}
if (F_status_is_error_not(status)) {
- if (main->parameters[fss_basic_write_parameter_partial_e].result == f_console_result_found_e) {
- if (main->parameters[fss_basic_write_parameter_object_e].result == f_console_result_additional_e) {
+ if (main->parameters.array[fss_basic_write_parameter_partial_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_basic_write_parameter_object_e].result == f_console_result_additional_e) {
content.used = 0;
- for (f_array_length_t i = 0; i < main->parameters[fss_basic_write_parameter_object_e].values.used; ++i) {
+ for (f_array_length_t i = 0; i < main->parameters.array[fss_basic_write_parameter_object_e].values.used; ++i) {
if (fss_basic_write_signal_received(main)) {
status = F_status_set_error(F_interrupt);
break;
}
- object.string = arguments->argv[main->parameters[fss_basic_write_parameter_object_e].values.array[i]];
+ object.string = arguments->argv[main->parameters.array[fss_basic_write_parameter_object_e].values.array[i]];
object.used = strnlen(object.string, F_console_parameter_size_d);
object.size = object.used;
else {
object.used = 0;
- for (f_array_length_t i = 0; i < main->parameters[fss_basic_write_parameter_content_e].values.used; ++i) {
+ for (f_array_length_t i = 0; i < main->parameters.array[fss_basic_write_parameter_content_e].values.used; ++i) {
if (fss_basic_write_signal_received(main)) {
status = F_status_set_error(F_interrupt);
break;
}
- content.string = arguments->argv[main->parameters[fss_basic_write_parameter_content_e].values.array[i]];
+ content.string = arguments->argv[main->parameters.array[fss_basic_write_parameter_content_e].values.array[i]];
content.used = strnlen(content.string, F_console_parameter_size_d);
content.size = content.used;
}
}
else {
- for (f_array_length_t i = 0; i < main->parameters[fss_basic_write_parameter_object_e].values.used; ++i) {
+ for (f_array_length_t i = 0; i < main->parameters.array[fss_basic_write_parameter_object_e].values.used; ++i) {
if (fss_basic_write_signal_received(main)) {
status = F_status_set_error(F_interrupt);
break;
}
- object.string = arguments->argv[main->parameters[fss_basic_write_parameter_object_e].values.array[i]];
+ object.string = arguments->argv[main->parameters.array[fss_basic_write_parameter_object_e].values.array[i]];
object.used = strnlen(object.string, F_console_parameter_size_d);
object.size = object.used;
- content.string = arguments->argv[main->parameters[fss_basic_write_parameter_content_e].values.array[i]];
+ content.string = arguments->argv[main->parameters.array[fss_basic_write_parameter_content_e].values.array[i]];
content.used = strnlen(content.string, F_console_parameter_size_d);
content.size = content.used;
funlockfile(main->error.to.stream);
}
}
- else if (main->error.verbosity != f_console_verbosity_quiet_e && main->parameters[fss_basic_write_parameter_file_e].result == f_console_result_none_e) {
+ else if (main->error.verbosity != f_console_verbosity_quiet_e && main->parameters.array[fss_basic_write_parameter_file_e].result == f_console_result_none_e) {
// Ensure there is always a newline at the end, unless in quiet mode.
fll_print_dynamic(f_string_eol_s, main->output.to.stream);
content.size = 0;
}
- if (main->parameters[fss_basic_write_parameter_file_e].result == f_console_result_additional_e) {
+ if (main->parameters.array[fss_basic_write_parameter_file_e].result == f_console_result_additional_e) {
if (output.id != -1) {
f_file_stream_close(F_true, &output);
}
#ifndef _di_fss_basic_write_main_delete_
f_status_t fss_basic_write_main_delete(fss_basic_write_main_t * const main) {
- for (f_array_length_t i = 0; i < fss_basic_write_total_parameters_d; ++i) {
-
- f_type_array_lengths_resize(0, &main->parameters[i].locations);
- f_type_array_lengths_resize(0, &main->parameters[i].locations_sub);
- f_type_array_lengths_resize(0, &main->parameters[i].values);
- } // for
+ f_console_parameters_delete(&main->parameters);
f_type_array_lengths_resize(0, &main->remaining);
#ifndef _di_fss_basic_write_data_
typedef struct {
- f_console_parameter_t parameters[fss_basic_write_total_parameters_d];
+ f_console_parameters_t parameters;
f_array_lengths_t remaining;
bool process_pipe;
#define fss_basic_write_main_t_initialize \
{ \
- fss_basic_write_console_parameter_t_initialize, \
+ f_console_parameters_t_initialize, \
f_array_lengths_t_initialize, \
F_false, \
fl_print_t_initialize, \
}
if (content) {
- if (main->parameters[fss_basic_write_parameter_trim_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_basic_write_parameter_trim_e].result == f_console_result_found_e) {
complete = f_fss_complete_full_trim_e;
}
else {
#endif
#ifndef _di_fss_embedded_list_read_program_version_
- const f_string_static_t fss_embedded_list_read_program_version_s = macro_f_string_static_t_initialize2(FSS_EMBEDDED_LIST_READ_program_version_s, 0, FSS_EMBEDDED_LIST_READ_program_version_s_length);
+ const f_string_static_t fss_embedded_list_read_program_version_s = macro_f_string_static_t_initialize(FSS_EMBEDDED_LIST_READ_program_version_s, 0, FSS_EMBEDDED_LIST_READ_program_version_s_length);
#endif // _di_fss_embedded_list_read_program_version_
#ifndef _di_fss_embedded_list_read_program_name_
- const f_string_static_t fss_embedded_list_read_program_name_s = macro_f_string_static_t_initialize2(FSS_EMBEDDED_LIST_READ_program_name_s, 0, FSS_EMBEDDED_LIST_READ_program_name_s_length);
- const f_string_static_t fss_embedded_list_read_program_name_long_s = macro_f_string_static_t_initialize2(FSS_EMBEDDED_LIST_READ_program_name_long_s, 0, FSS_EMBEDDED_LIST_READ_program_name_long_s_length);
+ const f_string_static_t fss_embedded_list_read_program_name_s = macro_f_string_static_t_initialize(FSS_EMBEDDED_LIST_READ_program_name_s, 0, FSS_EMBEDDED_LIST_READ_program_name_s_length);
+ const f_string_static_t fss_embedded_list_read_program_name_long_s = macro_f_string_static_t_initialize(FSS_EMBEDDED_LIST_READ_program_name_long_s, 0, FSS_EMBEDDED_LIST_READ_program_name_long_s_length);
#endif // _di_fss_embedded_list_read_program_name_
#ifndef _di_fss_embedded_list_read_print_help_
f_status_t status = F_none;
- {
- const f_console_parameters_t parameters = macro_f_console_parameters_t_initialize(main->parameters, fss_embedded_list_read_total_parameters_d);
+ f_console_parameter_t parameters[] = fss_embedded_list_read_console_parameter_t_initialize;
+ main->parameters.array = parameters;
+ main->parameters.used = fss_embedded_list_read_total_parameters_d;
- {
- f_console_parameter_id_t ids[3] = { fss_embedded_list_read_parameter_no_color_e, fss_embedded_list_read_parameter_light_e, fss_embedded_list_read_parameter_dark_e };
- const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 3);
+ {
+ f_console_parameter_id_t ids[3] = { fss_embedded_list_read_parameter_no_color_e, fss_embedded_list_read_parameter_light_e, fss_embedded_list_read_parameter_dark_e };
+ const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 3);
- status = fll_program_parameter_process(*arguments, parameters, choices, F_true, &main->remaining, &main->context);
+ status = fll_program_parameter_process(*arguments, &main->parameters, choices, F_true, &main->remaining, &main->context);
- main->output.set = &main->context.set;
- main->error.set = &main->context.set;
- main->warning.set = &main->context.set;
+ main->output.set = &main->context.set;
+ main->error.set = &main->context.set;
+ main->warning.set = &main->context.set;
- if (main->context.set.error.before) {
- main->output.context = f_color_set_empty_s;
- main->output.notable = main->context.set.notable;
+ if (main->context.set.error.before) {
+ main->output.context = f_color_set_empty_s;
+ main->output.notable = main->context.set.notable;
- main->error.context = main->context.set.error;
- main->error.notable = main->context.set.notable;
+ main->error.context = main->context.set.error;
+ main->error.notable = main->context.set.notable;
- main->warning.context = main->context.set.warning;
- main->warning.notable = main->context.set.notable;
- }
- else {
- f_color_set_t *sets[] = { &main->output.context, &main->output.notable, &main->error.context, &main->error.notable, &main->warning.context, &main->warning.notable, 0 };
+ main->warning.context = main->context.set.warning;
+ main->warning.notable = main->context.set.notable;
+ }
+ else {
+ f_color_set_t *sets[] = { &main->output.context, &main->output.notable, &main->error.context, &main->error.notable, &main->warning.context, &main->warning.notable, 0 };
- fll_program_parameter_process_empty(&main->context, sets);
- }
+ fll_program_parameter_process_empty(&main->context, sets);
+ }
- if (F_status_is_error(status)) {
- fss_embedded_list_read_main_delete(main);
- return F_status_set_error(status);
- }
+ if (F_status_is_error(status)) {
+ fss_embedded_list_read_main_delete(main);
+ return F_status_set_error(status);
}
+ }
- // Identify priority of verbosity related parameters.
- {
- f_console_parameter_id_t ids[4] = { fss_embedded_list_read_parameter_verbosity_quiet_e, fss_embedded_list_read_parameter_verbosity_normal_e, fss_embedded_list_read_parameter_verbosity_verbose_e, fss_embedded_list_read_parameter_verbosity_debug_e };
- f_console_parameter_id_t choice = 0;
- const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 4);
+ // Identify priority of verbosity related parameters.
+ {
+ f_console_parameter_id_t ids[4] = { fss_embedded_list_read_parameter_verbosity_quiet_e, fss_embedded_list_read_parameter_verbosity_normal_e, fss_embedded_list_read_parameter_verbosity_verbose_e, fss_embedded_list_read_parameter_verbosity_debug_e };
+ f_console_parameter_id_t choice = 0;
+ const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 4);
- status = f_console_parameter_prioritize_right(parameters, choices, &choice);
+ status = f_console_parameter_prioritize_right(main->parameters, choices, &choice);
- if (F_status_is_error(status)) {
- fss_embedded_list_read_main_delete(main);
+ if (F_status_is_error(status)) {
+ fss_embedded_list_read_main_delete(main);
- return status;
- }
-
- if (choice == fss_embedded_list_read_parameter_verbosity_quiet_e) {
- main->output.verbosity = f_console_verbosity_quiet_e;
- main->error.verbosity = f_console_verbosity_quiet_e;
- main->warning.verbosity = f_console_verbosity_quiet_e;
- }
- else if (choice == fss_embedded_list_read_parameter_verbosity_normal_e) {
- main->output.verbosity = f_console_verbosity_normal_e;
- main->error.verbosity = f_console_verbosity_normal_e;
- main->warning.verbosity = f_console_verbosity_normal_e;
- }
- else if (choice == fss_embedded_list_read_parameter_verbosity_verbose_e) {
- main->output.verbosity = f_console_verbosity_verbose_e;
- main->error.verbosity = f_console_verbosity_verbose_e;
- main->warning.verbosity = f_console_verbosity_verbose_e;
- }
- else if (choice == fss_embedded_list_read_parameter_verbosity_debug_e) {
- main->output.verbosity = f_console_verbosity_debug_e;
- main->error.verbosity = f_console_verbosity_debug_e;
- main->warning.verbosity = f_console_verbosity_debug_e;
- }
+ return status;
}
- status = F_none;
+ if (choice == fss_embedded_list_read_parameter_verbosity_quiet_e) {
+ main->output.verbosity = f_console_verbosity_quiet_e;
+ main->error.verbosity = f_console_verbosity_quiet_e;
+ main->warning.verbosity = f_console_verbosity_quiet_e;
+ }
+ else if (choice == fss_embedded_list_read_parameter_verbosity_normal_e) {
+ main->output.verbosity = f_console_verbosity_normal_e;
+ main->error.verbosity = f_console_verbosity_normal_e;
+ main->warning.verbosity = f_console_verbosity_normal_e;
+ }
+ else if (choice == fss_embedded_list_read_parameter_verbosity_verbose_e) {
+ main->output.verbosity = f_console_verbosity_verbose_e;
+ main->error.verbosity = f_console_verbosity_verbose_e;
+ main->warning.verbosity = f_console_verbosity_verbose_e;
+ }
+ else if (choice == fss_embedded_list_read_parameter_verbosity_debug_e) {
+ main->output.verbosity = f_console_verbosity_debug_e;
+ main->error.verbosity = f_console_verbosity_debug_e;
+ main->warning.verbosity = f_console_verbosity_debug_e;
+ }
}
- if (main->parameters[fss_embedded_list_read_parameter_help_e].result == f_console_result_found_e) {
+ f_string_static_t * const argv = main->parameters.arguments.array;
+
+ status = F_none;
+
+ if (main->parameters.array[fss_embedded_list_read_parameter_help_e].result == f_console_result_found_e) {
fss_embedded_list_read_print_help(main->output.to, main->context);
fss_embedded_list_read_main_delete(main);
return F_none;
}
- if (main->parameters[fss_embedded_list_read_parameter_version_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_embedded_list_read_parameter_version_e].result == f_console_result_found_e) {
fll_program_print_version(main->output.to, fss_embedded_list_read_program_version_s);
fss_embedded_list_read_main_delete(main);
return F_none;
}
- if (F_status_is_error_not(status) && main->parameters[fss_embedded_list_read_parameter_total_e].result == f_console_result_found_e) {
- if (main->parameters[fss_embedded_list_read_parameter_columns_e].result == f_console_result_found_e) {
+ if (F_status_is_error_not(status) && main->parameters.array[fss_embedded_list_read_parameter_total_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_embedded_list_read_parameter_columns_e].result == f_console_result_found_e) {
flockfile(main->error.to.stream);
fl_print_format("%q%[%QCannot specify the '%]", main->error.to.stream, f_string_eol_s, main->error.context, main->error.prefix, main->error.context);
}
if (main->remaining.used > 0 || main->process_pipe) {
- if (main->parameters[fss_embedded_list_read_parameter_at_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_embedded_list_read_parameter_at_e].result == f_console_result_found_e) {
flockfile(main->error.to.stream);
fl_print_format("%q%[%QThe parameter '%]", main->error.to.stream, f_string_eol_s, main->error.context, main->error.prefix, main->error.context);
status = F_status_set_error(F_parameter);
}
- if (F_status_is_error_not(status) && main->parameters[fss_embedded_list_read_parameter_depth_e].result == f_console_result_found_e) {
+ if (F_status_is_error_not(status) && main->parameters.array[fss_embedded_list_read_parameter_depth_e].result == f_console_result_found_e) {
flockfile(main->error.to.stream);
fl_print_format("%q%[%QThe parameter '%]", main->error.to.stream, f_string_eol_s, main->error.context, main->error.prefix, main->error.context);
status = F_status_set_error(F_parameter);
}
- if (F_status_is_error_not(status) && main->parameters[fss_embedded_list_read_parameter_line_e].result == f_console_result_additional_e) {
+ if (F_status_is_error_not(status) && main->parameters.array[fss_embedded_list_read_parameter_line_e].result == f_console_result_additional_e) {
flockfile(main->error.to.stream);
fl_print_format("%q%[%QThe parameter '%]", main->error.to.stream, f_string_eol_s, main->error.context, main->error.prefix, main->error.context);
status = F_status_set_error(F_parameter);
}
- if (F_status_is_error_not(status) && main->parameters[fss_embedded_list_read_parameter_name_e].result == f_console_result_found_e) {
+ if (F_status_is_error_not(status) && main->parameters.array[fss_embedded_list_read_parameter_name_e].result == f_console_result_found_e) {
flockfile(main->error.to.stream);
fl_print_format("%q%[%QThe parameter '%]", main->error.to.stream, f_string_eol_s, main->error.context, main->error.prefix, main->error.context);
status = F_status_set_error(F_parameter);
}
- if (F_status_is_error_not(status) && main->parameters[fss_embedded_list_read_parameter_select_e].result == f_console_result_found_e) {
+ if (F_status_is_error_not(status) && main->parameters.array[fss_embedded_list_read_parameter_select_e].result == f_console_result_found_e) {
flockfile(main->error.to.stream);
fl_print_format("%q%[%QThe parameter '%]", main->error.to.stream, f_string_eol_s, main->error.context, main->error.prefix, main->error.context);
status = F_status_set_error(F_parameter);
}
- if (main->parameters[fss_embedded_list_read_parameter_line_e].result == f_console_result_additional_e) {
- if (F_status_is_error_not(status) && main->parameters[fss_embedded_list_read_parameter_total_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_embedded_list_read_parameter_line_e].result == f_console_result_additional_e) {
+ if (F_status_is_error_not(status) && main->parameters.array[fss_embedded_list_read_parameter_total_e].result == f_console_result_found_e) {
flockfile(main->error.to.stream);
fl_print_format("%q%[%QCannot specify the '%]", main->error.to.stream, f_string_eol_s, main->error.context, main->error.prefix, main->error.context);
}
}
- if (main->parameters[fss_embedded_list_read_parameter_pipe_e].result == f_console_result_found_e) {
- if (F_status_is_error_not(status) && main->parameters[fss_embedded_list_read_parameter_total_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_embedded_list_read_parameter_pipe_e].result == f_console_result_found_e) {
+ if (F_status_is_error_not(status) && main->parameters.array[fss_embedded_list_read_parameter_total_e].result == f_console_result_found_e) {
flockfile(main->error.to.stream);
fl_print_format("%q%[%QCannot specify the '%]", main->error.to.stream, f_string_eol_s, main->error.context, main->error.prefix, main->error.context);
}
if (F_status_is_error_not(status)) {
- if (main->parameters[fss_embedded_list_read_parameter_delimit_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_embedded_list_read_parameter_delimit_e].result == f_console_result_found_e) {
flockfile(main->error.to.stream);
fl_print_format("%q%[%QThe parameter '%]", main->error.to.stream, f_string_eol_s, main->error.context, main->error.prefix, main->error.context);
status = F_status_set_error(F_parameter);
}
- else if (main->parameters[fss_embedded_list_read_parameter_delimit_e].result == f_console_result_additional_e) {
- const f_array_length_t location = main->parameters[fss_embedded_list_read_parameter_delimit_e].values.array[0];
+ else if (main->parameters.array[fss_embedded_list_read_parameter_delimit_e].result == f_console_result_additional_e) {
+ const f_array_length_t location = main->parameters.array[fss_embedded_list_read_parameter_delimit_e].values.array[0];
f_array_length_t length = strnlen(arguments->argv[location], F_console_parameter_size_d);
if (length == 0) {
}
}
- if (F_status_is_error_not(status) && main->parameters[fss_embedded_list_read_parameter_select_e].result == f_console_result_found_e) {
+ if (F_status_is_error_not(status) && main->parameters.array[fss_embedded_list_read_parameter_select_e].result == f_console_result_found_e) {
flockfile(main->error.to.stream);
fl_print_format("%q%[%QThe '%]", main->error.to.stream, f_string_eol_s, main->error.context, main->error.prefix, main->error.context);
main->quantity.total = original_size;
if (F_status_is_error(status)) {
- fll_error_file_print(main->error, F_status_set_fine(status), "f_file_open", F_true, arguments->argv[main->remaining.array[i]], "open", fll_error_file_type_file_e);
+ fll_error_file_print(main->error, F_status_set_fine(status), "f_file_open", F_true, arguments->argv[main->remaining.array[i]], f_file_operation_open_s, fll_error_file_type_file_e);
break;
}
// Skip past empty files.
if (!main->quantity.total) {
- if (main->parameters[fss_embedded_list_read_parameter_total_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_embedded_list_read_parameter_total_e].result == f_console_result_found_e) {
fll_print_format("0%q", main->output.to.stream, f_string_eol_s);
}
#ifndef _di_fss_embedded_list_read_main_delete_
f_status_t fss_embedded_list_read_main_delete(fss_embedded_list_read_main_t * const main) {
- for (f_array_length_t i = 0; i < fss_embedded_list_read_total_parameters_d; ++i) {
-
- f_type_array_lengths_resize(0, &main->parameters[i].locations);
- f_type_array_lengths_resize(0, &main->parameters[i].locations_sub);
- f_type_array_lengths_resize(0, &main->parameters[i].values);
- } // for
+ f_console_parameters_delete(&main->parameters);
macro_f_fss_nest_t_delete_simple(main->nest);
#ifndef _di_fss_embedded_list_read_main_t_
typedef struct {
- f_console_parameter_t parameters[fss_embedded_list_read_total_parameters_d];
+ f_console_parameters_t parameters;
f_array_lengths_t remaining;
bool process_pipe;
#define fss_embedded_list_read_main_t_initialize \
{ \
- fss_embedded_list_read_console_parameter_t_initialize, \
+ f_console_parameters_t_initialize, \
f_array_lengths_t_initialize, \
F_false, \
fl_print_t_initialize, \
#ifndef _di_fss_embedded_list_read_print_object_end_
void fss_embedded_list_read_print_object_end(fss_embedded_list_read_main_t * const main) {
- if (main->parameters[fss_embedded_list_read_parameter_pipe_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_embedded_list_read_parameter_pipe_e].result == f_console_result_found_e) {
f_print_character(fss_embedded_list_read_pipe_content_start_s, main->output.to.stream);
}
else {
- if (main->parameters[fss_embedded_list_read_parameter_object_e].result == f_console_result_found_e && main->parameters[fss_embedded_list_read_parameter_content_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_embedded_list_read_parameter_object_e].result == f_console_result_found_e && main->parameters.array[fss_embedded_list_read_parameter_content_e].result == f_console_result_found_e) {
f_print_character(f_fss_embedded_list_open_s.string[0], main->output.to.stream);
f_print_character(f_fss_embedded_list_open_end_s.string[0], main->output.to.stream);
}
#ifndef _di_fss_embedded_list_read_print_content_ignore_
void fss_embedded_list_read_print_content_ignore(fss_embedded_list_read_main_t * const main) {
- if (main->parameters[fss_embedded_list_read_parameter_pipe_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_embedded_list_read_parameter_pipe_e].result == f_console_result_found_e) {
f_print_character(fss_embedded_list_read_pipe_content_ignore_s, main->output.to.stream);
}
}
#ifndef _di_fss_embedded_list_read_print_set_end_
void fss_embedded_list_read_print_set_end(fss_embedded_list_read_main_t * const main) {
- if (main->parameters[fss_embedded_list_read_parameter_pipe_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_embedded_list_read_parameter_pipe_e].result == f_console_result_found_e) {
f_print_character(fss_embedded_list_read_pipe_content_end_s, main->output.to.stream);
}
else {
- if (main->parameters[fss_embedded_list_read_parameter_object_e].result == f_console_result_found_e && main->parameters[fss_embedded_list_read_parameter_content_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_embedded_list_read_parameter_object_e].result == f_console_result_found_e && main->parameters.array[fss_embedded_list_read_parameter_content_e].result == f_console_result_found_e) {
f_print_character(f_fss_embedded_list_close_s.string[0], main->output.to.stream);
f_print_character(f_fss_embedded_list_close_end_s.string[0], main->output.to.stream);
}
f_status_t status = F_none;
- const f_array_length_t values_total = main->parameters[fss_embedded_list_read_parameter_depth_e].values.used + main->parameters[fss_embedded_list_read_parameter_at_e].values.used + main->parameters[fss_embedded_list_read_parameter_name_e].values.used;
+ const f_array_length_t values_total = main->parameters.array[fss_embedded_list_read_parameter_depth_e].values.used + main->parameters.array[fss_embedded_list_read_parameter_at_e].values.used + main->parameters.array[fss_embedded_list_read_parameter_name_e].values.used;
f_array_length_t values_order[values_total];
f_array_length_t values_type[values_total];
f_array_length_t k = 0;
f_array_length_t l = 0;
- for (; j < main->parameters[fss_embedded_list_read_parameter_depth_e].values.used; ++j) {
+ for (; j < main->parameters.array[fss_embedded_list_read_parameter_depth_e].values.used; ++j) {
- values_order[i] = main->parameters[fss_embedded_list_read_parameter_depth_e].values.array[j];
+ values_order[i] = main->parameters.array[fss_embedded_list_read_parameter_depth_e].values.array[j];
values_type[i++] = fss_embedded_list_read_parameter_depth_e;
} // for
if (i) {
- for (j = 0; j < main->parameters[fss_embedded_list_read_parameter_at_e].values.used; ++j) {
+ for (j = 0; j < main->parameters.array[fss_embedded_list_read_parameter_at_e].values.used; ++j) {
for (k = 0; k < i; ++k) {
- if (values_order[k] > main->parameters[fss_embedded_list_read_parameter_at_e].values.array[j]) {
+ if (values_order[k] > main->parameters.array[fss_embedded_list_read_parameter_at_e].values.array[j]) {
for (l = i; l > k; --l) {
values_order[l] = values_order[l - 1];
values_type[l] = values_type[l - 1];
} // for
- values_order[k] = main->parameters[fss_embedded_list_read_parameter_at_e].values.array[j];
+ values_order[k] = main->parameters.array[fss_embedded_list_read_parameter_at_e].values.array[j];
values_type[k] = fss_embedded_list_read_parameter_at_e;
i++;
} // for
if (k == i) {
- values_order[i] = main->parameters[fss_embedded_list_read_parameter_at_e].values.array[j];
+ values_order[i] = main->parameters.array[fss_embedded_list_read_parameter_at_e].values.array[j];
values_type[i++] = fss_embedded_list_read_parameter_at_e;
}
} // for
}
else {
- for (; j < main->parameters[fss_embedded_list_read_parameter_at_e].values.used; ++j) {
+ for (; j < main->parameters.array[fss_embedded_list_read_parameter_at_e].values.used; ++j) {
- values_order[i] = main->parameters[fss_embedded_list_read_parameter_at_e].values.array[j];
+ values_order[i] = main->parameters.array[fss_embedded_list_read_parameter_at_e].values.array[j];
values_type[i++] = fss_embedded_list_read_parameter_at_e;
} // for
}
if (i) {
- for (j = 0; j < main->parameters[fss_embedded_list_read_parameter_name_e].values.used; ++j) {
+ for (j = 0; j < main->parameters.array[fss_embedded_list_read_parameter_name_e].values.used; ++j) {
for (k = 0; k < i; ++k) {
- if (values_order[k] > main->parameters[fss_embedded_list_read_parameter_name_e].values.array[j]) {
+ if (values_order[k] > main->parameters.array[fss_embedded_list_read_parameter_name_e].values.array[j]) {
for (l = i; l > k; --l) {
values_order[l] = values_order[l - 1];
values_type[l] = values_type[l - 1];
} // for
- values_order[k] = main->parameters[fss_embedded_list_read_parameter_name_e].values.array[j];
+ values_order[k] = main->parameters.array[fss_embedded_list_read_parameter_name_e].values.array[j];
values_type[k] = fss_embedded_list_read_parameter_name_e;
i++;
} // for
if (k == i) {
- values_order[i] = main->parameters[fss_embedded_list_read_parameter_name_e].values.array[j];
+ values_order[i] = main->parameters.array[fss_embedded_list_read_parameter_name_e].values.array[j];
values_type[i++] = fss_embedded_list_read_parameter_name_e;
}
} // for
}
else {
- for (; j < main->parameters[fss_embedded_list_read_parameter_name_e].values.used; ++j) {
+ for (; j < main->parameters.array[fss_embedded_list_read_parameter_name_e].values.used; ++j) {
- values_order[i] = main->parameters[fss_embedded_list_read_parameter_name_e].values.array[j];
+ values_order[i] = main->parameters.array[fss_embedded_list_read_parameter_name_e].values.array[j];
values_type[i++] = fss_embedded_list_read_parameter_name_e;
} // for
}
{
i = 1;
- if (main->parameters[fss_embedded_list_read_parameter_depth_e].result == f_console_result_additional_e) {
- i = main->parameters[fss_embedded_list_read_parameter_depth_e].values.used + 1;
+ if (main->parameters.array[fss_embedded_list_read_parameter_depth_e].result == f_console_result_additional_e) {
+ i = main->parameters.array[fss_embedded_list_read_parameter_depth_e].values.used + 1;
}
macro_fss_embedded_list_read_depths_t_resize(status, (*depths), i);
depths->array[depths->used].index_name = values_order[i];
depths->array[depths->used].value_name.used = 0;
- if (main->parameters[fss_embedded_list_read_parameter_trim_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_embedded_list_read_parameter_trim_e].result == f_console_result_found_e) {
status = fl_string_rip(arguments->argv[values_order[i]], strnlen(arguments->argv[values_order[i]], F_console_parameter_size_d), &depths->array[depths->used].value_name);
if (F_status_is_error(status)) {
if (F_status_is_error(status)) {
// @todo detect and replace fll_error_file_type_file_e with fll_error_file_type_pipe_e as appropriate.
- fll_error_file_print(main->error, F_status_set_fine(status), "fll_fss_embedded_list_read", F_true, filename, "process", fll_error_file_type_file_e);
+ fll_error_file_print(main->error, F_status_set_fine(status), "fll_fss_embedded_list_read", F_true, filename, f_file_operation_process_s, fll_error_file_type_file_e);
}
else if (status == F_data_not_stop || status == F_data_not_eos) {
macro_f_fss_nest_t_delete_simple(main->nest);
f_string_dynamic_resize(0, &main->buffer);
- if (main->parameters[fss_embedded_list_read_parameter_total_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_embedded_list_read_parameter_total_e].result == f_console_result_found_e) {
fll_print_format("0%q", main->output.to.stream, f_string_eol_s);
return F_none;
// Requested depths cannot be greater than contents depth.
if (depths.used > main->nest.used) {
- if (main->parameters[fss_embedded_list_read_parameter_total_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_embedded_list_read_parameter_total_e].result == f_console_result_found_e) {
fll_print_format("0%q", main->output.to.stream, f_string_eol_s);
return F_none;
{
f_number_unsigned_t select = 0;
- if (main->parameters[fss_embedded_list_read_parameter_select_e].result == f_console_result_additional_e) {
- const f_array_length_t index = main->parameters[fss_embedded_list_read_parameter_select_e].values.array[main->parameters[fss_embedded_list_read_parameter_select_e].values.used - 1];
+ if (main->parameters.array[fss_embedded_list_read_parameter_select_e].result == f_console_result_additional_e) {
+ const f_array_length_t index = main->parameters.array[fss_embedded_list_read_parameter_select_e].values.array[main->parameters.array[fss_embedded_list_read_parameter_select_e].values.used - 1];
const f_string_range_t range = macro_f_string_range_t_initialize(strlen(arguments->argv[index]));
status = fl_conversion_string_to_number_unsigned(arguments->argv[index], range, &select);
f_array_length_t line = 0;
- if (main->parameters[fss_embedded_list_read_parameter_line_e].result == f_console_result_additional_e) {
- const f_array_length_t index = main->parameters[fss_embedded_list_read_parameter_line_e].values.array[main->parameters[fss_embedded_list_read_parameter_line_e].values.used - 1];
+ if (main->parameters.array[fss_embedded_list_read_parameter_line_e].result == f_console_result_additional_e) {
+ const f_array_length_t index = main->parameters.array[fss_embedded_list_read_parameter_line_e].values.array[main->parameters.array[fss_embedded_list_read_parameter_line_e].values.used - 1];
const f_string_range_t range = macro_f_string_range_t_initialize(strlen(arguments->argv[index]));
status = fl_conversion_string_to_number_unsigned(arguments->argv[index], range, &line);
const fss_embedded_list_read_skip_t parents = fss_embedded_list_read_skip_t_initialize;
- if (main->parameters[fss_embedded_list_read_parameter_raw_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_embedded_list_read_parameter_raw_e].result == f_console_result_found_e) {
f_fss_delimits_t except_none = f_fss_delimits_t_initialize;
return fss_embedded_list_read_main_process_for_depth(main, arguments, filename, depths, 0, line, parents, &except_none, &except_none);
if (depths.array[depths_index].value_at < items->used && !skip[depths.array[depths_index].value_at]) {
if (depths.array[depths_index].index_name) {
- if (main->parameters[fss_embedded_list_read_parameter_trim_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_embedded_list_read_parameter_trim_e].result == f_console_result_found_e) {
if (fl_string_dynamic_partial_compare_except_trim_dynamic(depths.array[depths_index].value_name, main->buffer, items->array[depths.array[depths_index].value_at].object, except_none, *objects_delimits) != F_equal_to) {
skip[depths.array[depths_index].value_at] = F_true;
}
}
else {
- if (main->parameters[fss_embedded_list_read_parameter_trim_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_embedded_list_read_parameter_trim_e].result == f_console_result_found_e) {
for (i = 0; i < items->used; ++i) {
if (skip[i]) continue;
f_array_length_t i = 0;
f_array_length_t j = 0;
- if (main->parameters[fss_embedded_list_read_parameter_object_e].result == f_console_result_found_e) {
- if (main->parameters[fss_embedded_list_read_parameter_total_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_embedded_list_read_parameter_object_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_embedded_list_read_parameter_total_e].result == f_console_result_found_e) {
f_array_length_t total = 0;
for (i = 0; i < items->used; ++i) {
f_status_t (*print_object)(const f_string_static_t, const f_string_range_t, const f_array_lengths_t, FILE *) = &f_print_except_dynamic_partial;
- if (main->parameters[fss_embedded_list_read_parameter_trim_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_embedded_list_read_parameter_trim_e].result == f_console_result_found_e) {
print_object = &fl_print_trim_except_dynamic_partial;
}
print_object(main->buffer, items->array[i].object, *objects_delimits, main->output.to.stream);
- if (main->parameters[fss_embedded_list_read_parameter_content_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_embedded_list_read_parameter_content_e].result == f_console_result_found_e) {
fss_embedded_list_read_print_object_end(main);
if (items->array[i].content.used) {
// Process contents.
bool include_empty = 0;
- if (main->parameters[fss_embedded_list_read_parameter_empty_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_embedded_list_read_parameter_empty_e].result == f_console_result_found_e) {
include_empty = 1;
}
- if (main->parameters[fss_embedded_list_read_parameter_total_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_embedded_list_read_parameter_total_e].result == f_console_result_found_e) {
f_array_length_t total = 0;
for (i = 0; i < items->used; ++i) {
return F_none;
}
- if (main->parameters[fss_embedded_list_read_parameter_line_e].result == f_console_result_additional_e) {
+ if (main->parameters.array[fss_embedded_list_read_parameter_line_e].result == f_console_result_additional_e) {
f_array_length_t line_current = 0;
flockfile(main->output.to.stream);
f_print_except_dynamic_partial(main->buffer, items->array[i].content.array[0], *contents_delimits, main->output.to.stream);
- if (main->parameters[fss_embedded_list_read_parameter_pipe_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_embedded_list_read_parameter_pipe_e].result == f_console_result_found_e) {
f_print_character(fss_embedded_list_read_pipe_content_end_s, main->output.to.stream);
}
} // for
#endif
#ifndef _di_fss_embedded_list_write_program_version_
- const f_string_static_t fss_embedded_list_write_program_version_s = macro_f_string_static_t_initialize2(FSS_EMBEDDED_LIST_WRITE_program_version_s, 0, FSS_EMBEDDED_LIST_WRITE_program_version_s_length);
+ const f_string_static_t fss_embedded_list_write_program_version_s = macro_f_string_static_t_initialize(FSS_EMBEDDED_LIST_WRITE_program_version_s, 0, FSS_EMBEDDED_LIST_WRITE_program_version_s_length);
#endif // _di_fss_embedded_list_write_program_version_
#ifndef _di_fss_embedded_list_write_program_name_
- const f_string_static_t fss_embedded_list_write_program_name_s = macro_f_string_static_t_initialize2(FSS_EMBEDDED_LIST_WRITE_program_name_s, 0, FSS_EMBEDDED_LIST_WRITE_program_name_s_length);
- const f_string_static_t fss_embedded_list_write_program_name_long_s = macro_f_string_static_t_initialize2(FSS_EMBEDDED_LIST_WRITE_program_name_long_s, 0, FSS_EMBEDDED_LIST_WRITE_program_name_long_s_length);
+ const f_string_static_t fss_embedded_list_write_program_name_s = macro_f_string_static_t_initialize(FSS_EMBEDDED_LIST_WRITE_program_name_s, 0, FSS_EMBEDDED_LIST_WRITE_program_name_s_length);
+ const f_string_static_t fss_embedded_list_write_program_name_long_s = macro_f_string_static_t_initialize(FSS_EMBEDDED_LIST_WRITE_program_name_long_s, 0, FSS_EMBEDDED_LIST_WRITE_program_name_long_s_length);
#endif // _di_fss_embedded_list_write_program_name_
#ifndef _di_fss_embedded_list_write_print_help_
f_status_t status = F_none;
- {
- const f_console_parameters_t parameters = macro_f_console_parameters_t_initialize(main->parameters, fss_embedded_list_write_total_parameters_d);
+ f_console_parameter_t parameters[] = fss_embedded_list_write_console_parameter_t_initialize;
+ main->parameters.array = parameters;
+ main->parameters.used = fss_embedded_list_write_total_parameters_d;
- {
- f_console_parameter_id_t ids[3] = { fss_embedded_list_write_parameter_no_color_e, fss_embedded_list_write_parameter_light_e, fss_embedded_list_write_parameter_dark_e };
- const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 3);
+ {
+ f_console_parameter_id_t ids[3] = { fss_embedded_list_write_parameter_no_color_e, fss_embedded_list_write_parameter_light_e, fss_embedded_list_write_parameter_dark_e };
+ const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 3);
- status = fll_program_parameter_process(*arguments, parameters, choices, F_true, &main->remaining, &main->context);
+ status = fll_program_parameter_process(*arguments, &main->parameters, choices, F_true, &main->remaining, &main->context);
- main->output.set = &main->context.set;
- main->error.set = &main->context.set;
- main->warning.set = &main->context.set;
+ main->output.set = &main->context.set;
+ main->error.set = &main->context.set;
+ main->warning.set = &main->context.set;
- if (main->context.set.error.before) {
- main->output.context = f_color_set_empty_s;
- main->output.notable = main->context.set.notable;
+ if (main->context.set.error.before) {
+ main->output.context = f_color_set_empty_s;
+ main->output.notable = main->context.set.notable;
- main->error.context = main->context.set.error;
- main->error.notable = main->context.set.notable;
+ main->error.context = main->context.set.error;
+ main->error.notable = main->context.set.notable;
- main->warning.context = main->context.set.warning;
- main->warning.notable = main->context.set.notable;
- }
- else {
- f_color_set_t *sets[] = { &main->output.context, &main->output.notable, &main->error.context, &main->error.notable, &main->warning.context, &main->warning.notable, 0 };
+ main->warning.context = main->context.set.warning;
+ main->warning.notable = main->context.set.notable;
+ }
+ else {
+ f_color_set_t *sets[] = { &main->output.context, &main->output.notable, &main->error.context, &main->error.notable, &main->warning.context, &main->warning.notable, 0 };
- fll_program_parameter_process_empty(&main->context, sets);
- }
+ fll_program_parameter_process_empty(&main->context, sets);
+ }
- if (F_status_is_error(status)) {
- fss_embedded_list_write_main_delete(main);
+ if (F_status_is_error(status)) {
+ fss_embedded_list_write_main_delete(main);
- return F_status_set_error(status);
- }
+ return F_status_set_error(status);
}
+ }
- // Identify priority of verbosity related parameters.
- {
- f_console_parameter_id_t ids[4] = { fss_embedded_list_write_parameter_verbosity_quiet_e, fss_embedded_list_write_parameter_verbosity_normal_e, fss_embedded_list_write_parameter_verbosity_verbose_e, fss_embedded_list_write_parameter_verbosity_debug_e };
- f_console_parameter_id_t choice = 0;
- const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 4);
-
- status = f_console_parameter_prioritize_right(parameters, choices, &choice);
+ // Identify priority of verbosity related parameters.
+ {
+ f_console_parameter_id_t ids[4] = { fss_embedded_list_write_parameter_verbosity_quiet_e, fss_embedded_list_write_parameter_verbosity_normal_e, fss_embedded_list_write_parameter_verbosity_verbose_e, fss_embedded_list_write_parameter_verbosity_debug_e };
+ f_console_parameter_id_t choice = 0;
+ const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 4);
- if (F_status_is_error(status)) {
- fss_embedded_list_write_main_delete(main);
+ status = f_console_parameter_prioritize_right(main->parameters, choices, &choice);
- return status;
- }
+ if (F_status_is_error(status)) {
+ fss_embedded_list_write_main_delete(main);
- if (choice == fss_embedded_list_write_parameter_verbosity_quiet_e) {
- main->output.verbosity = f_console_verbosity_quiet_e;
- main->error.verbosity = f_console_verbosity_quiet_e;
- main->warning.verbosity = f_console_verbosity_quiet_e;
- }
- else if (choice == fss_embedded_list_write_parameter_verbosity_normal_e) {
- main->output.verbosity = f_console_verbosity_normal_e;
- main->error.verbosity = f_console_verbosity_normal_e;
- main->warning.verbosity = f_console_verbosity_normal_e;
- }
- else if (choice == fss_embedded_list_write_parameter_verbosity_verbose_e) {
- main->output.verbosity = f_console_verbosity_verbose_e;
- main->error.verbosity = f_console_verbosity_verbose_e;
- main->warning.verbosity = f_console_verbosity_verbose_e;
- }
- else if (choice == fss_embedded_list_write_parameter_verbosity_debug_e) {
- main->output.verbosity = f_console_verbosity_debug_e;
- main->error.verbosity = f_console_verbosity_debug_e;
- main->warning.verbosity = f_console_verbosity_debug_e;
- }
+ return status;
}
- status = F_none;
+ if (choice == fss_embedded_list_write_parameter_verbosity_quiet_e) {
+ main->output.verbosity = f_console_verbosity_quiet_e;
+ main->error.verbosity = f_console_verbosity_quiet_e;
+ main->warning.verbosity = f_console_verbosity_quiet_e;
+ }
+ else if (choice == fss_embedded_list_write_parameter_verbosity_normal_e) {
+ main->output.verbosity = f_console_verbosity_normal_e;
+ main->error.verbosity = f_console_verbosity_normal_e;
+ main->warning.verbosity = f_console_verbosity_normal_e;
+ }
+ else if (choice == fss_embedded_list_write_parameter_verbosity_verbose_e) {
+ main->output.verbosity = f_console_verbosity_verbose_e;
+ main->error.verbosity = f_console_verbosity_verbose_e;
+ main->warning.verbosity = f_console_verbosity_verbose_e;
+ }
+ else if (choice == fss_embedded_list_write_parameter_verbosity_debug_e) {
+ main->output.verbosity = f_console_verbosity_debug_e;
+ main->error.verbosity = f_console_verbosity_debug_e;
+ main->warning.verbosity = f_console_verbosity_debug_e;
+ }
}
- if (main->parameters[fss_embedded_list_write_parameter_help_e].result == f_console_result_found_e) {
+ f_string_static_t * const argv = main->parameters.arguments.array;
+
+ status = F_none;
+
+ if (main->parameters.array[fss_embedded_list_write_parameter_help_e].result == f_console_result_found_e) {
fss_embedded_list_write_print_help(main->output.to, main->context);
fss_embedded_list_write_main_delete(main);
return status;
}
- if (main->parameters[fss_embedded_list_write_parameter_version_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_embedded_list_write_parameter_version_e].result == f_console_result_found_e) {
fll_program_print_version(main->output.to, fss_embedded_list_write_program_version_s);
fss_embedded_list_write_main_delete(main);
output.flag = F_file_flag_create_d | F_file_flag_write_only_d | F_file_flag_append_d;
if (F_status_is_error_not(status)) {
- if (main->parameters[fss_embedded_list_write_parameter_file_e].result == f_console_result_additional_e) {
- if (main->parameters[fss_embedded_list_write_parameter_file_e].values.used > 1) {
+ if (main->parameters.array[fss_embedded_list_write_parameter_file_e].result == f_console_result_additional_e) {
+ if (main->parameters.array[fss_embedded_list_write_parameter_file_e].values.used > 1) {
if (main->error.verbosity != f_console_verbosity_quiet_e) {
flockfile(main->error.to.stream);
status = F_status_set_error(F_parameter);
}
else {
- const f_array_length_t location = main->parameters[fss_embedded_list_write_parameter_file_e].values.array[0];
+ const f_array_length_t location = main->parameters.array[fss_embedded_list_write_parameter_file_e].values.array[0];
output.id = -1;
output.stream = 0;
status = f_file_stream_open(arguments->argv[location], 0, &output);
if (F_status_is_error(status)) {
- fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_open", F_true, arguments->argv[location], "open", fll_error_file_type_file_e);
+ fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_open", F_true, arguments->argv[location], f_file_operation_open_s, fll_error_file_type_file_e);
}
}
}
- else if (main->parameters[fss_embedded_list_write_parameter_file_e].result == f_console_result_found_e) {
+ else if (main->parameters.array[fss_embedded_list_write_parameter_file_e].result == f_console_result_found_e) {
fss_embedded_list_write_error_parameter_value_missing_print(main, f_console_symbol_long_enable_s.string.string, fss_embedded_list_write_long_file_s);
status = F_status_set_error(F_parameter);
}
}
if (F_status_is_error_not(status)) {
- if (main->parameters[fss_embedded_list_write_parameter_object_e].locations.used || main->parameters[fss_embedded_list_write_parameter_content_e].locations.used) {
- if (main->parameters[fss_embedded_list_write_parameter_object_e].locations.used) {
- if (main->parameters[fss_embedded_list_write_parameter_object_e].locations.used != main->parameters[fss_embedded_list_write_parameter_object_e].values.used) {
+ if (main->parameters.array[fss_embedded_list_write_parameter_object_e].locations.used || main->parameters.array[fss_embedded_list_write_parameter_content_e].locations.used) {
+ if (main->parameters.array[fss_embedded_list_write_parameter_object_e].locations.used) {
+ if (main->parameters.array[fss_embedded_list_write_parameter_object_e].locations.used != main->parameters.array[fss_embedded_list_write_parameter_object_e].values.used) {
fss_embedded_list_write_error_parameter_value_missing_print(main, f_console_symbol_long_enable_s, fss_embedded_list_write_long_object_s);
status = F_status_set_error(F_parameter);
}
- else if (main->parameters[fss_embedded_list_write_parameter_content_e].locations.used != main->parameters[fss_embedded_list_write_parameter_content_e].values.used) {
+ else if (main->parameters.array[fss_embedded_list_write_parameter_content_e].locations.used != main->parameters.array[fss_embedded_list_write_parameter_content_e].values.used) {
fss_embedded_list_write_error_parameter_value_missing_print(main, f_console_symbol_long_enable_s, fss_embedded_list_write_long_content_s);
status = F_status_set_error(F_parameter);
}
- else if (main->parameters[fss_embedded_list_write_parameter_object_e].locations.used != main->parameters[fss_embedded_list_write_parameter_content_e].locations.used && main->parameters[fss_embedded_list_write_parameter_partial_e].result == f_console_result_none_e) {
+ else if (main->parameters.array[fss_embedded_list_write_parameter_object_e].locations.used != main->parameters.array[fss_embedded_list_write_parameter_content_e].locations.used && main->parameters.array[fss_embedded_list_write_parameter_partial_e].result == f_console_result_none_e) {
fss_embedded_list_write_error_parameter_same_times_print(main);
status = F_status_set_error(F_parameter);
}
- else if (main->parameters[fss_embedded_list_write_parameter_content_e].locations.used && main->parameters[fss_embedded_list_write_parameter_partial_e].locations.used) {
- if (main->parameters[fss_embedded_list_write_parameter_content_e].result == f_console_result_additional_e) {
+ else if (main->parameters.array[fss_embedded_list_write_parameter_content_e].locations.used && main->parameters.array[fss_embedded_list_write_parameter_partial_e].locations.used) {
+ if (main->parameters.array[fss_embedded_list_write_parameter_content_e].result == f_console_result_additional_e) {
if (main->error.verbosity != f_console_verbosity_quiet_e) {
flockfile(main->error.to.stream);
}
if (F_status_is_error_not(status)) {
- if (main->parameters[fss_embedded_list_write_parameter_content_e].result == f_console_result_additional_e) {
+ if (main->parameters.array[fss_embedded_list_write_parameter_content_e].result == f_console_result_additional_e) {
f_array_length_t location_object = 0;
f_array_length_t location_content = 0;
f_array_length_t location_sub_object = 0;
f_array_length_t location_sub_content = 0;
- for (f_array_length_t i = 0; i < main->parameters[fss_embedded_list_write_parameter_object_e].locations.used; ++i) {
- location_object = main->parameters[fss_embedded_list_write_parameter_object_e].locations.array[i];
- location_content = main->parameters[fss_embedded_list_write_parameter_content_e].locations.array[i];
- location_sub_object = main->parameters[fss_embedded_list_write_parameter_object_e].locations_sub.array[i];
- location_sub_content = main->parameters[fss_embedded_list_write_parameter_content_e].locations_sub.array[i];
+ for (f_array_length_t i = 0; i < main->parameters.array[fss_embedded_list_write_parameter_object_e].locations.used; ++i) {
+ location_object = main->parameters.array[fss_embedded_list_write_parameter_object_e].locations.array[i];
+ location_content = main->parameters.array[fss_embedded_list_write_parameter_content_e].locations.array[i];
+ location_sub_object = main->parameters.array[fss_embedded_list_write_parameter_object_e].locations_sub.array[i];
+ location_sub_content = main->parameters.array[fss_embedded_list_write_parameter_content_e].locations_sub.array[i];
if (location_object > location_content || location_object == location_content && location_sub_object > location_sub_content) {
if (main->error.verbosity != f_console_verbosity_quiet_e) {
}
}
}
- else if (main->parameters[fss_embedded_list_write_parameter_content_e].locations.used) {
- if (main->parameters[fss_embedded_list_write_parameter_content_e].locations.used != main->parameters[fss_embedded_list_write_parameter_content_e].values.used) {
+ else if (main->parameters.array[fss_embedded_list_write_parameter_content_e].locations.used) {
+ if (main->parameters.array[fss_embedded_list_write_parameter_content_e].locations.used != main->parameters.array[fss_embedded_list_write_parameter_content_e].values.used) {
fss_embedded_list_write_error_parameter_value_missing_print(main, f_console_symbol_long_enable_s, fss_embedded_list_write_long_content_s);
status = F_status_set_error(F_parameter);
}
- else if (!main->parameters[fss_embedded_list_write_parameter_partial_e].locations.used) {
+ else if (!main->parameters.array[fss_embedded_list_write_parameter_partial_e].locations.used) {
fss_embedded_list_write_error_parameter_same_times_print(main);
status = F_status_set_error(F_parameter);
}
}
if (F_status_is_error_not(status) && main->process_pipe) {
- if (main->parameters[fss_embedded_list_write_parameter_partial_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_embedded_list_write_parameter_partial_e].result == f_console_result_found_e) {
if (main->error.verbosity != f_console_verbosity_quiet_e) {
flockfile(main->error.to.stream);
}
if (F_status_is_error_not(status)) {
- if (main->parameters[fss_embedded_list_write_parameter_prepend_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_embedded_list_write_parameter_prepend_e].result == f_console_result_found_e) {
if (main->error.verbosity != f_console_verbosity_quiet_e) {
flockfile(main->error.to.stream);
status = F_status_set_error(F_parameter);
}
- else if (main->parameters[fss_embedded_list_write_parameter_prepend_e].result == f_console_result_additional_e) {
- const f_array_length_t index = main->parameters[fss_embedded_list_write_parameter_prepend_e].values.array[main->parameters[fss_embedded_list_write_parameter_prepend_e].values.used - 1];
+ else if (main->parameters.array[fss_embedded_list_write_parameter_prepend_e].result == f_console_result_additional_e) {
+ const f_array_length_t index = main->parameters.array[fss_embedded_list_write_parameter_prepend_e].values.array[main->parameters.array[fss_embedded_list_write_parameter_prepend_e].values.used - 1];
const f_array_length_t length = strnlen(arguments->argv[index], F_console_parameter_size_d);
if (length) {
}
if (F_status_is_error_not(status)) {
- if (main->parameters[fss_embedded_list_write_parameter_ignore_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_embedded_list_write_parameter_ignore_e].result == f_console_result_found_e) {
if (main->error.verbosity != f_console_verbosity_quiet_e) {
flockfile(main->error.to.stream);
status = F_status_set_error(F_parameter);
}
- else if (main->parameters[fss_embedded_list_write_parameter_ignore_e].result == f_console_result_additional_e) {
- const f_array_length_t total_locations = main->parameters[fss_embedded_list_write_parameter_ignore_e].locations.used;
- const f_array_length_t total_arguments = main->parameters[fss_embedded_list_write_parameter_ignore_e].values.used;
+ else if (main->parameters.array[fss_embedded_list_write_parameter_ignore_e].result == f_console_result_additional_e) {
+ const f_array_length_t total_locations = main->parameters.array[fss_embedded_list_write_parameter_ignore_e].locations.used;
+ const f_array_length_t total_arguments = main->parameters.array[fss_embedded_list_write_parameter_ignore_e].values.used;
if (total_locations * 2 > total_arguments) {
flockfile(main->error.to.stream);
f_fss_quote_t quote = F_fss_delimit_quote_double_s;
if (F_status_is_error_not(status)) {
- if (main->parameters[fss_embedded_list_write_parameter_double_e].result == f_console_result_found_e) {
- if (main->parameters[fss_embedded_list_write_parameter_single_e].result == f_console_result_found_e) {
- if (main->parameters[fss_embedded_list_write_parameter_double_e].location < main->parameters[fss_embedded_list_write_parameter_single_e].location) {
+ if (main->parameters.array[fss_embedded_list_write_parameter_double_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_embedded_list_write_parameter_single_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_embedded_list_write_parameter_double_e].location < main->parameters.array[fss_embedded_list_write_parameter_single_e].location) {
quote = F_fss_delimit_quote_single_s;
}
}
}
- else if (main->parameters[fss_embedded_list_write_parameter_single_e].result == f_console_result_found_e) {
+ else if (main->parameters.array[fss_embedded_list_write_parameter_single_e].result == f_console_result_found_e) {
quote = F_fss_delimit_quote_single_s;
}
}
}
if (F_status_is_error_not(status)) {
- if (main->parameters[fss_embedded_list_write_parameter_partial_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_embedded_list_write_parameter_partial_e].result == f_console_result_found_e) {
- if (main->parameters[fss_embedded_list_write_parameter_object_e].result == f_console_result_additional_e) {
- for (f_array_length_t i = 0; i < main->parameters[fss_embedded_list_write_parameter_object_e].values.used; ++i) {
+ if (main->parameters.array[fss_embedded_list_write_parameter_object_e].result == f_console_result_additional_e) {
+ for (f_array_length_t i = 0; i < main->parameters.array[fss_embedded_list_write_parameter_object_e].values.used; ++i) {
if (fss_embedded_list_write_signal_received(main)) {
status = F_status_set_error(F_interrupt);
break;
}
- object.string = arguments->argv[main->parameters[fss_embedded_list_write_parameter_object_e].values.array[i]];
+ object.string = arguments->argv[main->parameters.array[fss_embedded_list_write_parameter_object_e].values.array[i]];
object.used = strnlen(object.string, F_console_parameter_size_d);
object.size = object.used;
} // for
}
else {
- for (f_array_length_t i = 0; i < main->parameters[fss_embedded_list_write_parameter_content_e].values.used; ++i) {
+ for (f_array_length_t i = 0; i < main->parameters.array[fss_embedded_list_write_parameter_content_e].values.used; ++i) {
if (fss_embedded_list_write_signal_received(main)) {
status = F_status_set_error(F_interrupt);
break;
}
- status = fss_embedded_list_write_process_parameter_ignore(main, arguments, main->parameters[fss_embedded_list_write_parameter_content_e].locations, i, &ignore);
+ status = fss_embedded_list_write_process_parameter_ignore(main, arguments, main->parameters.array[fss_embedded_list_write_parameter_content_e].locations, i, &ignore);
if (F_status_is_error(status)) break;
- content.string = arguments->argv[main->parameters[fss_embedded_list_write_parameter_content_e].values.array[i]];
+ content.string = arguments->argv[main->parameters.array[fss_embedded_list_write_parameter_content_e].values.array[i]];
content.used = strnlen(content.string, F_console_parameter_size_d);
content.size = content.used;
}
}
else {
- for (f_array_length_t i = 0; i < main->parameters[fss_embedded_list_write_parameter_object_e].values.used; ++i) {
+ for (f_array_length_t i = 0; i < main->parameters.array[fss_embedded_list_write_parameter_object_e].values.used; ++i) {
if (fss_embedded_list_write_signal_received(main)) {
status = F_status_set_error(F_interrupt);
break;
}
- status = fss_embedded_list_write_process_parameter_ignore(main, arguments, main->parameters[fss_embedded_list_write_parameter_content_e].locations, i, &ignore);
+ status = fss_embedded_list_write_process_parameter_ignore(main, arguments, main->parameters.array[fss_embedded_list_write_parameter_content_e].locations, i, &ignore);
if (F_status_is_error(status)) break;
- object.string = arguments->argv[main->parameters[fss_embedded_list_write_parameter_object_e].values.array[i]];
+ object.string = arguments->argv[main->parameters.array[fss_embedded_list_write_parameter_object_e].values.array[i]];
object.used = strnlen(object.string, F_console_parameter_size_d);
object.size = object.used;
- content.string = arguments->argv[main->parameters[fss_embedded_list_write_parameter_content_e].values.array[i]];
+ content.string = arguments->argv[main->parameters.array[fss_embedded_list_write_parameter_content_e].values.array[i]];
content.used = strnlen(content.string, F_console_parameter_size_d);
content.size = content.used;
funlockfile(main->error.to.stream);
}
}
- else if (main->error.verbosity != f_console_verbosity_quiet_e && main->parameters[fss_embedded_list_write_parameter_file_e].result == f_console_result_none_e) {
+ else if (main->error.verbosity != f_console_verbosity_quiet_e && main->parameters.array[fss_embedded_list_write_parameter_file_e].result == f_console_result_none_e) {
// Ensure there is always a newline at the end, unless in quiet mode.
fll_print_dynamic(f_string_eol_s, main->output.to.stream);
content.size = 0;
}
- if (main->parameters[fss_embedded_list_write_parameter_file_e].result == f_console_result_additional_e) {
+ if (main->parameters.array[fss_embedded_list_write_parameter_file_e].result == f_console_result_additional_e) {
if (output.id != -1) {
f_file_stream_close(F_true, &output);
}
#ifndef _di_fss_embedded_list_write_main_delete_
f_status_t fss_embedded_list_write_main_delete(fss_embedded_list_write_main_t * const main) {
- for (f_array_length_t i = 0; i < fss_embedded_list_write_total_parameters_d; ++i) {
-
- f_type_array_lengths_resize(0, &main->parameters[i].locations);
- f_type_array_lengths_resize(0, &main->parameters[i].locations_sub);
- f_type_array_lengths_resize(0, &main->parameters[i].values);
- } // for
+ f_console_parameters_delete(&main->parameters);
f_type_array_lengths_resize(0, &main->remaining);
#ifndef _di_fss_embedded_list_write_main_t_
typedef struct {
- f_console_parameter_t parameters[fss_embedded_list_write_total_parameters_d];
+ f_console_parameters_t parameters;
f_array_lengths_t remaining;
bool process_pipe;
#define fss_embedded_list_write_main_t_initialize \
{ \
- fss_embedded_list_write_console_parameter_t_initialize, \
+ f_console_parameters_t_initialize, \
f_array_lengths_t_initialize, \
F_false, \
fl_print_t_initialize, \
}
if (content) {
- if (main->parameters[fss_embedded_list_write_parameter_trim_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_embedded_list_write_parameter_trim_e].result == f_console_result_found_e) {
complete = f_fss_complete_full_trim_e;
}
else {
range.start = 0;
- for (; i < main->parameters[fss_embedded_list_write_parameter_ignore_e].locations.used; ++i) {
+ for (; i < main->parameters.array[fss_embedded_list_write_parameter_ignore_e].locations.used; ++i) {
if (fss_embedded_list_write_signal_received(main)) {
return F_status_set_error(F_interrupt);
}
- l = main->parameters[fss_embedded_list_write_parameter_ignore_e].locations.array[i];
+ l = main->parameters.array[fss_embedded_list_write_parameter_ignore_e].locations.array[i];
if (l < contents.array[location]) continue;
if (location + 1 < contents.used && l > contents.array[location + 1]) continue;
}
}
- index = main->parameters[fss_embedded_list_write_parameter_ignore_e].values.array[i * 2];
+ index = main->parameters.array[fss_embedded_list_write_parameter_ignore_e].values.array[i * 2];
range.start = 0;
range.stop = strnlen(arguments->argv[index], F_console_parameter_size_d) - 1;
ignore->array[ignore->used].start = number;
- index = main->parameters[fss_embedded_list_write_parameter_ignore_e].values.array[(i * 2) + 1];
+ index = main->parameters.array[fss_embedded_list_write_parameter_ignore_e].values.array[(i * 2) + 1];
range.start = 0;
range.stop = strnlen(arguments->argv[index], F_console_parameter_size_d) - 1;
#endif
#ifndef _di_fss_extended_list_read_program_version_
- const f_string_static_t fss_extended_list_read_program_version_s = macro_f_string_static_t_initialize2(FSS_EXTENDED_LIST_READ_program_version_s, 0, FSS_EXTENDED_LIST_READ_program_version_s_length);
+ const f_string_static_t fss_extended_list_read_program_version_s = macro_f_string_static_t_initialize(FSS_EXTENDED_LIST_READ_program_version_s, 0, FSS_EXTENDED_LIST_READ_program_version_s_length);
#endif // _di_fss_extended_list_read_program_version_
#ifndef _di_fss_extended_list_read_program_name_
- const f_string_static_t fss_extended_list_read_program_name_s = macro_f_string_static_t_initialize2(FSS_EXTENDED_LIST_READ_program_name_s, 0, FSS_EXTENDED_LIST_READ_program_name_s_length);
- const f_string_static_t fss_extended_list_read_program_name_long_s = macro_f_string_static_t_initialize2(FSS_EXTENDED_LIST_READ_program_name_long_s, 0, FSS_EXTENDED_LIST_READ_program_name_long_s_length);
+ const f_string_static_t fss_extended_list_read_program_name_s = macro_f_string_static_t_initialize(FSS_EXTENDED_LIST_READ_program_name_s, 0, FSS_EXTENDED_LIST_READ_program_name_s_length);
+ const f_string_static_t fss_extended_list_read_program_name_long_s = macro_f_string_static_t_initialize(FSS_EXTENDED_LIST_READ_program_name_long_s, 0, FSS_EXTENDED_LIST_READ_program_name_long_s_length);
#endif // _di_fss_extended_list_read_program_name_
#ifndef _di_fss_extended_list_read_print_help_
f_status_t status = F_none;
- {
- const f_console_parameters_t parameters = macro_f_console_parameters_t_initialize(main->parameters, fss_extended_list_read_total_parameters_d);
+ f_console_parameter_t parameters[] = fss_extended_list_read_console_parameter_t_initialize;
+ main->parameters.array = parameters;
+ main->parameters.used = fss_extended_list_read_total_parameters_d;
- {
- f_console_parameter_id_t ids[3] = { fss_extended_list_read_parameter_no_color_e, fss_extended_list_read_parameter_light_e, fss_extended_list_read_parameter_dark_e };
- const f_console_parameter_ids_t choices = { ids, 3 };
+ {
+ f_console_parameter_id_t ids[3] = { fss_extended_list_read_parameter_no_color_e, fss_extended_list_read_parameter_light_e, fss_extended_list_read_parameter_dark_e };
+ const f_console_parameter_ids_t choices = { ids, 3 };
- status = fll_program_parameter_process(*arguments, parameters, choices, F_true, &main->remaining, &main->context);
+ status = fll_program_parameter_process(*arguments, &main->parameters, choices, F_true, &main->remaining, &main->context);
- main->output.set = &main->context.set;
- main->error.set = &main->context.set;
- main->warning.set = &main->context.set;
+ main->output.set = &main->context.set;
+ main->error.set = &main->context.set;
+ main->warning.set = &main->context.set;
- if (main->context.set.error.before) {
- main->output.context = f_color_set_empty_s;
- main->output.notable = main->context.set.notable;
+ if (main->context.set.error.before) {
+ main->output.context = f_color_set_empty_s;
+ main->output.notable = main->context.set.notable;
- main->error.context = main->context.set.error;
- main->error.notable = main->context.set.notable;
+ main->error.context = main->context.set.error;
+ main->error.notable = main->context.set.notable;
- main->warning.context = main->context.set.warning;
- main->warning.notable = main->context.set.notable;
- }
- else {
- f_color_set_t *sets[] = { &main->output.context, &main->output.notable, &main->error.context, &main->error.notable, &main->warning.context, &main->warning.notable, 0 };
+ main->warning.context = main->context.set.warning;
+ main->warning.notable = main->context.set.notable;
+ }
+ else {
+ f_color_set_t *sets[] = { &main->output.context, &main->output.notable, &main->error.context, &main->error.notable, &main->warning.context, &main->warning.notable, 0 };
- fll_program_parameter_process_empty(&main->context, sets);
- }
+ fll_program_parameter_process_empty(&main->context, sets);
+ }
- if (F_status_is_error(status)) {
- fss_extended_list_read_main_delete(main);
+ if (F_status_is_error(status)) {
+ fss_extended_list_read_main_delete(main);
- return F_status_set_error(status);
- }
+ return F_status_set_error(status);
}
+ }
- // Identify priority of verbosity related parameters.
- {
- f_console_parameter_id_t ids[4] = { fss_extended_list_read_parameter_verbosity_quiet_e, fss_extended_list_read_parameter_verbosity_normal_e, fss_extended_list_read_parameter_verbosity_verbose_e, fss_extended_list_read_parameter_verbosity_debug_e };
- f_console_parameter_id_t choice = 0;
- const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 4);
+ // Identify priority of verbosity related parameters.
+ {
+ f_console_parameter_id_t ids[4] = { fss_extended_list_read_parameter_verbosity_quiet_e, fss_extended_list_read_parameter_verbosity_normal_e, fss_extended_list_read_parameter_verbosity_verbose_e, fss_extended_list_read_parameter_verbosity_debug_e };
+ f_console_parameter_id_t choice = 0;
+ const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 4);
- status = f_console_parameter_prioritize_right(parameters, choices, &choice);
+ status = f_console_parameter_prioritize_right(main->parameters, choices, &choice);
- if (F_status_is_error(status)) {
- fss_extended_list_read_main_delete(main);
-
- return status;
- }
+ if (F_status_is_error(status)) {
+ fss_extended_list_read_main_delete(main);
- if (choice == fss_extended_list_read_parameter_verbosity_quiet_e) {
- main->output.verbosity = f_console_verbosity_quiet_e;
- main->error.verbosity = f_console_verbosity_quiet_e;
- main->warning.verbosity = f_console_verbosity_quiet_e;
- }
- else if (choice == fss_extended_list_read_parameter_verbosity_normal_e) {
- main->output.verbosity = f_console_verbosity_normal_e;
- main->error.verbosity = f_console_verbosity_normal_e;
- main->warning.verbosity = f_console_verbosity_normal_e;
- }
- else if (choice == fss_extended_list_read_parameter_verbosity_verbose_e) {
- main->output.verbosity = f_console_verbosity_verbose_e;
- main->error.verbosity = f_console_verbosity_verbose_e;
- main->warning.verbosity = f_console_verbosity_verbose_e;
- }
- else if (choice == fss_extended_list_read_parameter_verbosity_debug_e) {
- main->output.verbosity = f_console_verbosity_debug_e;
- main->error.verbosity = f_console_verbosity_debug_e;
- main->warning.verbosity = f_console_verbosity_debug_e;
- }
+ return status;
}
- status = F_none;
+ if (choice == fss_extended_list_read_parameter_verbosity_quiet_e) {
+ main->output.verbosity = f_console_verbosity_quiet_e;
+ main->error.verbosity = f_console_verbosity_quiet_e;
+ main->warning.verbosity = f_console_verbosity_quiet_e;
+ }
+ else if (choice == fss_extended_list_read_parameter_verbosity_normal_e) {
+ main->output.verbosity = f_console_verbosity_normal_e;
+ main->error.verbosity = f_console_verbosity_normal_e;
+ main->warning.verbosity = f_console_verbosity_normal_e;
+ }
+ else if (choice == fss_extended_list_read_parameter_verbosity_verbose_e) {
+ main->output.verbosity = f_console_verbosity_verbose_e;
+ main->error.verbosity = f_console_verbosity_verbose_e;
+ main->warning.verbosity = f_console_verbosity_verbose_e;
+ }
+ else if (choice == fss_extended_list_read_parameter_verbosity_debug_e) {
+ main->output.verbosity = f_console_verbosity_debug_e;
+ main->error.verbosity = f_console_verbosity_debug_e;
+ main->warning.verbosity = f_console_verbosity_debug_e;
+ }
}
- if (main->parameters[fss_extended_list_read_parameter_help_e].result == f_console_result_found_e) {
+ f_string_static_t * const argv = main->parameters.arguments.array;
+
+ status = F_none;
+
+ if (main->parameters.array[fss_extended_list_read_parameter_help_e].result == f_console_result_found_e) {
fss_extended_list_read_print_help(main->output.to, main->context);
fss_extended_list_read_main_delete(main);
return status;
}
- if (main->parameters[fss_extended_list_read_parameter_version_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_extended_list_read_parameter_version_e].result == f_console_result_found_e) {
fll_program_print_version(main->output.to, fss_extended_list_read_program_version_s);
fss_extended_list_read_main_delete(main);
for (f_array_length_t i = 0; i < 6; ++i) {
- if (main->parameters[parameter_code[i]].result == f_console_result_found_e) {
+ if (main->parameters.array[parameter_code[i]].result == f_console_result_found_e) {
flockfile(main->error.to.stream);
fl_print_format("%q%[%QThe parameter '%]", main->error.to.stream, f_string_eol_s, main->error.context, main->error.prefix, main->error.context);
} // for
}
- if (F_status_is_error_not(status) && main->parameters[fss_extended_list_read_parameter_columns_e].result == f_console_result_found_e) {
+ if (F_status_is_error_not(status) && main->parameters.array[fss_extended_list_read_parameter_columns_e].result == f_console_result_found_e) {
const f_array_length_t parameter_code[] = {
fss_extended_list_read_parameter_depth_e,
fss_extended_list_read_parameter_line_e,
for (f_array_length_t i = 0; i < 5; ++i) {
- if (main->parameters[parameter_code[i]].result == parameter_match[i]) {
+ if (main->parameters.array[parameter_code[i]].result == parameter_match[i]) {
flockfile(main->error.to.stream);
fl_print_format("%q%[%QCannot specify the '%]", main->error.to.stream, f_string_eol_s, main->error.context, main->error.prefix, main->error.context);
} // for
}
- if (F_status_is_error_not(status) && main->parameters[fss_extended_list_read_parameter_pipe_e].result == f_console_result_found_e) {
- if (main->parameters[fss_extended_list_read_parameter_total_e].result == f_console_result_found_e) {
+ if (F_status_is_error_not(status) && main->parameters.array[fss_extended_list_read_parameter_pipe_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_extended_list_read_parameter_total_e].result == f_console_result_found_e) {
flockfile(main->error.to.stream);
fl_print_format("%q%[%QCannot specify the '%]", main->error.to.stream, f_string_eol_s, main->error.context, main->error.prefix, main->error.context);
status = F_status_set_error(F_parameter);
}
- else if (main->parameters[fss_extended_list_read_parameter_line_e].result == f_console_result_additional_e) {
+ else if (main->parameters.array[fss_extended_list_read_parameter_line_e].result == f_console_result_additional_e) {
flockfile(main->error.to.stream);
fl_print_format("%q%[%QCannot specify the '%]", main->error.to.stream, f_string_eol_s, main->error.context, main->error.prefix, main->error.context);
}
}
- if (F_status_is_error_not(status) && main->parameters[fss_extended_list_read_parameter_delimit_e].result == f_console_result_additional_e) {
+ if (F_status_is_error_not(status) && main->parameters.array[fss_extended_list_read_parameter_delimit_e].result == f_console_result_additional_e) {
f_array_length_t location = 0;
f_array_length_t length = 0;
// Set the value to 0 to allow for detecting mode based on what is provided.
data.delimit_mode = 0;
- for (f_array_length_t i = 0; i < main->parameters[fss_extended_list_read_parameter_delimit_e].values.used; ++i) {
+ for (f_array_length_t i = 0; i < main->parameters.array[fss_extended_list_read_parameter_delimit_e].values.used; ++i) {
if (fss_extended_list_read_signal_received(main)) {
status = F_status_set_error(F_interrupt);
break;
}
- location = main->parameters[fss_extended_list_read_parameter_delimit_e].values.array[i];
+ location = main->parameters.array[fss_extended_list_read_parameter_delimit_e].values.array[i];
length = strnlen(arguments->argv[location], F_console_parameter_size_d);
if (!length) {
// This standard does not support nesting, so any depth greater than 0 can be predicted without processing the file.
if (F_status_is_error_not(status) && data.depths.array[0].depth > 0) {
- if (main->parameters[fss_extended_list_read_parameter_total_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_extended_list_read_parameter_total_e].result == f_console_result_found_e) {
fss_extended_list_read_print_zero(main);
}
return F_none;
}
- if (F_status_is_error_not(status) && main->parameters[fss_extended_list_read_parameter_select_e].result == f_console_result_found_e) {
+ if (F_status_is_error_not(status) && main->parameters.array[fss_extended_list_read_parameter_select_e].result == f_console_result_found_e) {
flockfile(main->error.to.stream);
fl_print_format("%q%[%QThe '%]", main->error.to.stream, f_string_eol_s, main->error.context, main->error.prefix, main->error.context);
status = f_file_stream_open(arguments->argv[main->remaining.array[i]], 0, &file);
if (F_status_is_error(status)) {
- fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_open", F_true, arguments->argv[main->remaining.array[i]], "open", fll_error_file_type_file_e);
+ fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_open", F_true, arguments->argv[main->remaining.array[i]], f_file_operation_open_s, fll_error_file_type_file_e);
break;
}
#ifndef _di_fss_extended_list_read_main_delete_
f_status_t fss_extended_list_read_main_delete(fss_extended_list_read_main_t *main) {
- for (f_array_length_t i = 0; i < fss_extended_list_read_total_parameters_d; ++i) {
-
- f_type_array_lengths_resize(0, &main->parameters[i].locations);
- f_type_array_lengths_resize(0, &main->parameters[i].locations_sub);
- f_type_array_lengths_resize(0, &main->parameters[i].values);
- } // for
+ f_console_parameters_delete(&main->parameters);
f_type_array_lengths_resize(0, &main->remaining);
macro_f_color_context_t_delete_simple(main->context);
#ifndef _di_fss_extended_list_read_main_t_
typedef struct {
- f_console_parameter_t parameters[fss_extended_list_read_total_parameters_d];
+ f_console_parameters_t parameters;
f_array_lengths_t remaining;
bool process_pipe;
#define fss_extended_list_read_main_t_initialize \
{ \
- fss_extended_list_read_console_parameter_t_initialize, \
+ f_console_parameters_t_initialize, \
f_array_lengths_t_initialize, \
F_false, \
fl_print_t_initialize, \
#ifndef _di_fss_extended_list_read_print_content_ignore_
void fss_extended_list_read_print_content_ignore(fss_extended_list_read_main_t * const main) {
- if (main->parameters[fss_extended_list_read_parameter_pipe_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_extended_list_read_parameter_pipe_e].result == f_console_result_found_e) {
f_print_character(fss_extended_list_read_pipe_content_ignore, main->output.to.stream);
}
}
#ifndef _di_fss_extended_list_read_print_object_end_
void fss_extended_list_read_print_object_end(fss_extended_list_read_main_t * const main, fss_extended_list_read_data_t * const data) {
- if (main->parameters[fss_extended_list_read_parameter_pipe_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_extended_list_read_parameter_pipe_e].result == f_console_result_found_e) {
f_print_character(fss_extended_list_read_pipe_content_start, main->output.to.stream);
}
else {
#ifndef _di_fss_extended_list_read_print_set_end_
void fss_extended_list_read_print_set_end(fss_extended_list_read_main_t * const main, fss_extended_list_read_data_t * const data) {
- if (main->parameters[fss_extended_list_read_parameter_pipe_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_extended_list_read_parameter_pipe_e].result == f_console_result_found_e) {
f_print_character(fss_extended_list_read_pipe_content_end, main->output.to.stream);
}
else {
{
f_array_length_t depth_size = 1;
- if (main->parameters[fss_extended_list_read_parameter_depth_e].result == f_console_result_additional_e) {
- depth_size = main->parameters[fss_extended_list_read_parameter_depth_e].values.used;
+ if (main->parameters.array[fss_extended_list_read_parameter_depth_e].result == f_console_result_additional_e) {
+ depth_size = main->parameters.array[fss_extended_list_read_parameter_depth_e].values.used;
}
if (depth_size > data->depths.size) {
macro_f_string_dynamic_t_clear(data->depths.array[i].value_name);
- if (!main->parameters[fss_extended_list_read_parameter_depth_e].values.used) {
+ if (!main->parameters.array[fss_extended_list_read_parameter_depth_e].values.used) {
position_depth = 0;
}
else {
- position_depth = main->parameters[fss_extended_list_read_parameter_depth_e].values.array[i];
+ position_depth = main->parameters.array[fss_extended_list_read_parameter_depth_e].values.array[i];
const f_string_range_t range = macro_f_string_range_t_initialize(strlen(arguments->argv[position_depth]));
}
}
- if (main->parameters[fss_extended_list_read_parameter_at_e].result == f_console_result_additional_e) {
- for (; position_at < main->parameters[fss_extended_list_read_parameter_at_e].values.used; ++position_at) {
+ if (main->parameters.array[fss_extended_list_read_parameter_at_e].result == f_console_result_additional_e) {
+ for (; position_at < main->parameters.array[fss_extended_list_read_parameter_at_e].values.used; ++position_at) {
- if (main->parameters[fss_extended_list_read_parameter_at_e].values.array[position_at] < position_depth) {
+ if (main->parameters.array[fss_extended_list_read_parameter_at_e].values.array[position_at] < position_depth) {
continue;
}
- if (i + 1 < data->depths.used && main->parameters[fss_extended_list_read_parameter_at_e].values.array[position_at] > main->parameters[fss_extended_list_read_parameter_depth_e].values.array[i + 1]) {
+ if (i + 1 < data->depths.used && main->parameters.array[fss_extended_list_read_parameter_at_e].values.array[position_at] > main->parameters.array[fss_extended_list_read_parameter_depth_e].values.array[i + 1]) {
break;
}
- data->depths.array[i].index_at = main->parameters[fss_extended_list_read_parameter_at_e].values.array[position_at];
+ data->depths.array[i].index_at = main->parameters.array[fss_extended_list_read_parameter_at_e].values.array[position_at];
const f_string_range_t range = macro_f_string_range_t_initialize(strlen(arguments->argv[data->depths.array[i].index_at]));
} // for
}
- if (main->parameters[fss_extended_list_read_parameter_name_e].result == f_console_result_additional_e) {
- for (; position_name < main->parameters[fss_extended_list_read_parameter_name_e].values.used; ++position_name) {
+ if (main->parameters.array[fss_extended_list_read_parameter_name_e].result == f_console_result_additional_e) {
+ for (; position_name < main->parameters.array[fss_extended_list_read_parameter_name_e].values.used; ++position_name) {
- if (main->parameters[fss_extended_list_read_parameter_name_e].values.array[position_name] < position_depth) {
+ if (main->parameters.array[fss_extended_list_read_parameter_name_e].values.array[position_name] < position_depth) {
continue;
}
- if (i + 1 < data->depths.used && main->parameters[fss_extended_list_read_parameter_name_e].values.array[position_name] > main->parameters[fss_extended_list_read_parameter_depth_e].values.array[i + 1]) {
+ if (i + 1 < data->depths.used && main->parameters.array[fss_extended_list_read_parameter_name_e].values.array[position_name] > main->parameters.array[fss_extended_list_read_parameter_depth_e].values.array[i + 1]) {
break;
}
- data->depths.array[i].index_name = main->parameters[fss_extended_list_read_parameter_name_e].values.array[position_name];
+ data->depths.array[i].index_name = main->parameters.array[fss_extended_list_read_parameter_name_e].values.array[position_name];
- if (main->parameters[fss_extended_list_read_parameter_trim_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_extended_list_read_parameter_trim_e].result == f_console_result_found_e) {
status = fl_string_rip(arguments->argv[data->depths.array[i].index_name], strlen(arguments->argv[data->depths.array[i].index_name]), &data->depths.array[i].value_name);
}
else {
}
if (F_status_is_error(status)) {
- fll_error_print(main->error, F_status_set_fine(status), main->parameters[fss_extended_list_read_parameter_trim_e].result == f_console_result_found_e ? "fl_string_rip" : "f_string_append", F_true);
+ fll_error_print(main->error, F_status_set_fine(status), main->parameters.array[fss_extended_list_read_parameter_trim_e].result == f_console_result_found_e ? "fl_string_rip" : "f_string_append", F_true);
return status;
}
if (F_status_is_error(status)) {
const f_string_t file_name = fss_extended_list_read_file_identify(input.start, data->files);
- fll_error_file_print(main->error, F_status_set_fine(status), "fll_fss_extended_list_read", F_true, file_name, "process", fll_error_file_type_file_e);
+ fll_error_file_print(main->error, F_status_set_fine(status), "fll_fss_extended_list_read", F_true, file_name, f_file_operation_process_s, fll_error_file_type_file_e);
return status;
}
#ifndef _di_fss_extended_list_read_load_number_
f_status_t fss_extended_list_read_load_number(fss_extended_list_read_main_t * const main, const f_array_length_t parameter, const f_string_t name, const f_console_arguments_t *arguments, f_number_unsigned_t *number) {
- if (main->parameters[parameter].result == f_console_result_additional_e) {
- const f_array_length_t index = main->parameters[parameter].values.array[main->parameters[parameter].values.used - 1];
+ if (main->parameters.array[parameter].result == f_console_result_additional_e) {
+ const f_array_length_t index = main->parameters.array[parameter].values.array[main->parameters.array[parameter].values.used - 1];
const f_string_range_t range = macro_f_string_range_t_initialize(strnlen(arguments->argv[index], F_console_parameter_size_d));
const f_status_t status = fl_conversion_string_to_number_unsigned(arguments->argv[index], range, number);
// This standard does not support multiple content groups.
if ((data->option & fss_extended_list_read_data_option_select_d) && data->select) {
- if (main->parameters[fss_extended_list_read_parameter_total_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_extended_list_read_parameter_total_e].result == f_console_result_found_e) {
fss_extended_list_read_print_zero(main);
}
f_status_t status = F_none;
- if (main->parameters[fss_extended_list_read_parameter_at_e].result == f_console_result_additional_e) {
+ if (main->parameters.array[fss_extended_list_read_parameter_at_e].result == f_console_result_additional_e) {
data->option |= fss_extended_list_read_data_option_at_d;
}
- if (main->parameters[fss_extended_list_read_parameter_columns_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_extended_list_read_parameter_columns_e].result == f_console_result_found_e) {
data->option |= fss_extended_list_read_data_option_columns_d;
}
- if (main->parameters[fss_extended_list_read_parameter_content_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_extended_list_read_parameter_content_e].result == f_console_result_found_e) {
data->option |= fss_extended_list_read_data_option_content_d;
}
- if (main->parameters[fss_extended_list_read_parameter_empty_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_extended_list_read_parameter_empty_e].result == f_console_result_found_e) {
data->option |= fss_extended_list_read_data_option_empty_d;
}
- if (main->parameters[fss_extended_list_read_parameter_line_e].result == f_console_result_additional_e) {
+ if (main->parameters.array[fss_extended_list_read_parameter_line_e].result == f_console_result_additional_e) {
data->option |= fss_extended_list_read_data_option_line_d;
status = fss_extended_list_read_load_number(main, fss_extended_list_read_parameter_line_e, fss_extended_list_read_long_line_s, arguments, &data->line);
if (F_status_is_error(status)) return status;
}
- if (main->parameters[fss_extended_list_read_parameter_name_e].result == f_console_result_additional_e) {
+ if (main->parameters.array[fss_extended_list_read_parameter_name_e].result == f_console_result_additional_e) {
data->option |= fss_extended_list_read_data_option_name_d;
}
- if (main->parameters[fss_extended_list_read_parameter_object_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_extended_list_read_parameter_object_e].result == f_console_result_found_e) {
data->option |= fss_extended_list_read_data_option_object_d;
}
- if (main->parameters[fss_extended_list_read_parameter_raw_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_extended_list_read_parameter_raw_e].result == f_console_result_found_e) {
data->option |= fss_extended_list_read_data_option_raw_d;
}
- if (main->parameters[fss_extended_list_read_parameter_select_e].result == f_console_result_additional_e) {
+ if (main->parameters.array[fss_extended_list_read_parameter_select_e].result == f_console_result_additional_e) {
data->option |= fss_extended_list_read_data_option_select_d;
status = fss_extended_list_read_load_number(main, fss_extended_list_read_parameter_select_e, fss_extended_list_read_long_select_s, arguments, &data->select);
if (F_status_is_error(status)) return status;
}
- if (main->parameters[fss_extended_list_read_parameter_total_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_extended_list_read_parameter_total_e].result == f_console_result_found_e) {
data->option |= fss_extended_list_read_data_option_total_d;
}
- if (main->parameters[fss_extended_list_read_parameter_trim_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_extended_list_read_parameter_trim_e].result == f_console_result_found_e) {
data->option |= fss_extended_list_read_data_option_trim_d;
}
#endif
#ifndef _di_fss_extended_list_write_program_version_
- const f_string_static_t fss_extended_list_write_program_version_s = macro_f_string_static_t_initialize2(FSS_EXTENDED_LIST_WRITE_program_version_s, 0, FSS_EXTENDED_LIST_WRITE_program_version_s_length);
+ const f_string_static_t fss_extended_list_write_program_version_s = macro_f_string_static_t_initialize(FSS_EXTENDED_LIST_WRITE_program_version_s, 0, FSS_EXTENDED_LIST_WRITE_program_version_s_length);
#endif // _di_fss_extended_list_write_program_version_
#ifndef _di_fss_extended_list_write_program_name_
- const f_string_static_t fss_extended_list_write_program_name_s = macro_f_string_static_t_initialize2(FSS_EXTENDED_LIST_WRITE_program_name_s, 0, FSS_EXTENDED_LIST_WRITE_program_name_s_length);
- const f_string_static_t fss_extended_list_write_program_name_long_s = macro_f_string_static_t_initialize2(FSS_EXTENDED_LIST_WRITE_program_name_long_s, 0, FSS_EXTENDED_LIST_WRITE_program_name_long_s_length);
+ const f_string_static_t fss_extended_list_write_program_name_s = macro_f_string_static_t_initialize(FSS_EXTENDED_LIST_WRITE_program_name_s, 0, FSS_EXTENDED_LIST_WRITE_program_name_s_length);
+ const f_string_static_t fss_extended_list_write_program_name_long_s = macro_f_string_static_t_initialize(FSS_EXTENDED_LIST_WRITE_program_name_long_s, 0, FSS_EXTENDED_LIST_WRITE_program_name_long_s_length);
#endif // _di_fss_extended_list_write_program_name_
#ifndef _di_fss_extended_list_write_print_help_
f_status_t status = F_none;
- {
- const f_console_parameters_t parameters = macro_f_console_parameters_t_initialize(main->parameters, fss_extended_list_write_total_parameters_d);
+ f_console_parameter_t parameters[] = fss_extended_list_write_console_parameter_t_initialize;
+ main->parameters.array = parameters;
+ main->parameters.used = fss_extended_list_write_total_parameters_d;
- {
- f_console_parameter_id_t ids[3] = { fss_extended_list_write_parameter_no_color_e, fss_extended_list_write_parameter_light_e, fss_extended_list_write_parameter_dark_e };
- const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 3);
+ {
+ f_console_parameter_id_t ids[3] = { fss_extended_list_write_parameter_no_color_e, fss_extended_list_write_parameter_light_e, fss_extended_list_write_parameter_dark_e };
+ const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 3);
- status = fll_program_parameter_process(*arguments, parameters, choices, F_true, &main->remaining, &main->context);
+ status = fll_program_parameter_process(*arguments, &main->parameters, choices, F_true, &main->remaining, &main->context);
- main->output.set = &main->context.set;
- main->error.set = &main->context.set;
- main->warning.set = &main->context.set;
+ main->output.set = &main->context.set;
+ main->error.set = &main->context.set;
+ main->warning.set = &main->context.set;
- if (main->context.set.error.before) {
- main->output.context = f_color_set_empty_s;
- main->output.notable = main->context.set.notable;
+ if (main->context.set.error.before) {
+ main->output.context = f_color_set_empty_s;
+ main->output.notable = main->context.set.notable;
- main->error.context = main->context.set.error;
- main->error.notable = main->context.set.notable;
+ main->error.context = main->context.set.error;
+ main->error.notable = main->context.set.notable;
- main->warning.context = main->context.set.warning;
- main->warning.notable = main->context.set.notable;
- }
- else {
- f_color_set_t *sets[] = { &main->output.context, &main->output.notable, &main->error.context, &main->error.notable, &main->warning.context, &main->warning.notable, 0 };
+ main->warning.context = main->context.set.warning;
+ main->warning.notable = main->context.set.notable;
+ }
+ else {
+ f_color_set_t *sets[] = { &main->output.context, &main->output.notable, &main->error.context, &main->error.notable, &main->warning.context, &main->warning.notable, 0 };
- fll_program_parameter_process_empty(&main->context, sets);
- }
+ fll_program_parameter_process_empty(&main->context, sets);
+ }
- if (F_status_is_error(status)) {
- fss_extended_list_write_main_delete(main);
+ if (F_status_is_error(status)) {
+ fss_extended_list_write_main_delete(main);
- return F_status_set_error(status);
- }
+ return F_status_set_error(status);
}
+ }
- // Identify priority of verbosity related parameters.
- {
- f_console_parameter_id_t ids[4] = { fss_extended_list_write_parameter_verbosity_quiet_e, fss_extended_list_write_parameter_verbosity_normal_e, fss_extended_list_write_parameter_verbosity_verbose_e, fss_extended_list_write_parameter_verbosity_debug_e };
- f_console_parameter_id_t choice = 0;
- const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 4);
-
- status = f_console_parameter_prioritize_right(parameters, choices, &choice);
+ // Identify priority of verbosity related parameters.
+ {
+ f_console_parameter_id_t ids[4] = { fss_extended_list_write_parameter_verbosity_quiet_e, fss_extended_list_write_parameter_verbosity_normal_e, fss_extended_list_write_parameter_verbosity_verbose_e, fss_extended_list_write_parameter_verbosity_debug_e };
+ f_console_parameter_id_t choice = 0;
+ const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 4);
- if (F_status_is_error(status)) {
- fss_extended_list_write_main_delete(main);
+ status = f_console_parameter_prioritize_right(main->parameters, choices, &choice);
- return status;
- }
+ if (F_status_is_error(status)) {
+ fss_extended_list_write_main_delete(main);
- if (choice == fss_extended_list_write_parameter_verbosity_quiet_e) {
- main->output.verbosity = f_console_verbosity_quiet_e;
- main->error.verbosity = f_console_verbosity_quiet_e;
- main->warning.verbosity = f_console_verbosity_quiet_e;
- }
- else if (choice == fss_extended_list_write_parameter_verbosity_normal_e) {
- main->output.verbosity = f_console_verbosity_normal_e;
- main->error.verbosity = f_console_verbosity_normal_e;
- main->warning.verbosity = f_console_verbosity_normal_e;
- }
- else if (choice == fss_extended_list_write_parameter_verbosity_verbose_e) {
- main->output.verbosity = f_console_verbosity_verbose_e;
- main->error.verbosity = f_console_verbosity_verbose_e;
- main->warning.verbosity = f_console_verbosity_verbose_e;
- }
- else if (choice == fss_extended_list_write_parameter_verbosity_debug_e) {
- main->output.verbosity = f_console_verbosity_debug_e;
- main->error.verbosity = f_console_verbosity_debug_e;
- main->warning.verbosity = f_console_verbosity_debug_e;
- }
+ return status;
}
- status = F_none;
+ if (choice == fss_extended_list_write_parameter_verbosity_quiet_e) {
+ main->output.verbosity = f_console_verbosity_quiet_e;
+ main->error.verbosity = f_console_verbosity_quiet_e;
+ main->warning.verbosity = f_console_verbosity_quiet_e;
+ }
+ else if (choice == fss_extended_list_write_parameter_verbosity_normal_e) {
+ main->output.verbosity = f_console_verbosity_normal_e;
+ main->error.verbosity = f_console_verbosity_normal_e;
+ main->warning.verbosity = f_console_verbosity_normal_e;
+ }
+ else if (choice == fss_extended_list_write_parameter_verbosity_verbose_e) {
+ main->output.verbosity = f_console_verbosity_verbose_e;
+ main->error.verbosity = f_console_verbosity_verbose_e;
+ main->warning.verbosity = f_console_verbosity_verbose_e;
+ }
+ else if (choice == fss_extended_list_write_parameter_verbosity_debug_e) {
+ main->output.verbosity = f_console_verbosity_debug_e;
+ main->error.verbosity = f_console_verbosity_debug_e;
+ main->warning.verbosity = f_console_verbosity_debug_e;
+ }
}
- if (main->parameters[fss_extended_list_write_parameter_help_e].result == f_console_result_found_e) {
+ f_string_static_t * const argv = main->parameters.arguments.array;
+
+ status = F_none;
+
+ if (main->parameters.array[fss_extended_list_write_parameter_help_e].result == f_console_result_found_e) {
fss_extended_list_write_print_help(main->output.to, main->context);
fss_extended_list_write_main_delete(main);
return status;
}
- if (main->parameters[fss_extended_list_write_parameter_version_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_extended_list_write_parameter_version_e].result == f_console_result_found_e) {
fll_program_print_version(main->output.to, fss_extended_list_write_program_version_s);
fss_extended_list_write_main_delete(main);
output.flag = F_file_flag_create_d | F_file_flag_write_only_d | F_file_flag_append_d;
if (F_status_is_error_not(status)) {
- if (main->parameters[fss_extended_list_write_parameter_file_e].result == f_console_result_additional_e) {
- if (main->parameters[fss_extended_list_write_parameter_file_e].values.used > 1) {
+ if (main->parameters.array[fss_extended_list_write_parameter_file_e].result == f_console_result_additional_e) {
+ if (main->parameters.array[fss_extended_list_write_parameter_file_e].values.used > 1) {
if (main->error.verbosity != f_console_verbosity_quiet_e) {
flockfile(main->error.to.stream);
status = F_status_set_error(F_parameter);
}
else {
- const f_array_length_t location = main->parameters[fss_extended_list_write_parameter_file_e].values.array[0];
+ const f_array_length_t location = main->parameters.array[fss_extended_list_write_parameter_file_e].values.array[0];
output.id = -1;
output.stream = 0;
status = f_file_stream_open(arguments->argv[location], 0, &output);
if (F_status_is_error(status)) {
- fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_open", F_true, arguments->argv[location], "open", fll_error_file_type_file_e);
+ fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_open", F_true, arguments->argv[location], f_file_operation_open_s, fll_error_file_type_file_e);
}
}
}
- else if (main->parameters[fss_extended_list_write_parameter_file_e].result == f_console_result_found_e) {
+ else if (main->parameters.array[fss_extended_list_write_parameter_file_e].result == f_console_result_found_e) {
fss_extended_list_write_error_parameter_value_missing_print(main, f_console_symbol_long_enable_s, fss_extended_list_write_long_file_s);
status = F_status_set_error(F_parameter);
}
}
if (F_status_is_error_not(status)) {
- if (main->parameters[fss_extended_list_write_parameter_object_e].locations.used || main->parameters[fss_extended_list_write_parameter_content_e].locations.used) {
- if (main->parameters[fss_extended_list_write_parameter_object_e].locations.used) {
- if (main->parameters[fss_extended_list_write_parameter_object_e].locations.used != main->parameters[fss_extended_list_write_parameter_object_e].values.used) {
+ if (main->parameters.array[fss_extended_list_write_parameter_object_e].locations.used || main->parameters.array[fss_extended_list_write_parameter_content_e].locations.used) {
+ if (main->parameters.array[fss_extended_list_write_parameter_object_e].locations.used) {
+ if (main->parameters.array[fss_extended_list_write_parameter_object_e].locations.used != main->parameters.array[fss_extended_list_write_parameter_object_e].values.used) {
fss_extended_list_write_error_parameter_value_missing_print(main, f_console_symbol_long_enable_s, fss_extended_list_write_long_object_s);
status = F_status_set_error(F_parameter);
}
- else if (main->parameters[fss_extended_list_write_parameter_content_e].locations.used != main->parameters[fss_extended_list_write_parameter_content_e].values.used) {
+ else if (main->parameters.array[fss_extended_list_write_parameter_content_e].locations.used != main->parameters.array[fss_extended_list_write_parameter_content_e].values.used) {
fss_extended_list_write_error_parameter_value_missing_print(main, f_console_symbol_long_enable_s, fss_extended_list_write_long_content_s);
status = F_status_set_error(F_parameter);
}
- else if (main->parameters[fss_extended_list_write_parameter_object_e].locations.used != main->parameters[fss_extended_list_write_parameter_content_e].locations.used && main->parameters[fss_extended_list_write_parameter_partial_e].result == f_console_result_none_e) {
+ else if (main->parameters.array[fss_extended_list_write_parameter_object_e].locations.used != main->parameters.array[fss_extended_list_write_parameter_content_e].locations.used && main->parameters.array[fss_extended_list_write_parameter_partial_e].result == f_console_result_none_e) {
fss_extended_list_write_error_parameter_same_times_print(main);
status = F_status_set_error(F_parameter);
}
- else if (main->parameters[fss_extended_list_write_parameter_content_e].locations.used && main->parameters[fss_extended_list_write_parameter_partial_e].locations.used) {
- if (main->parameters[fss_extended_list_write_parameter_content_e].result == f_console_result_additional_e) {
+ else if (main->parameters.array[fss_extended_list_write_parameter_content_e].locations.used && main->parameters.array[fss_extended_list_write_parameter_partial_e].locations.used) {
+ if (main->parameters.array[fss_extended_list_write_parameter_content_e].result == f_console_result_additional_e) {
if (main->error.verbosity != f_console_verbosity_quiet_e) {
flockfile(main->error.to.stream);
}
if (F_status_is_error_not(status)) {
- if (main->parameters[fss_extended_list_write_parameter_content_e].result == f_console_result_additional_e) {
+ if (main->parameters.array[fss_extended_list_write_parameter_content_e].result == f_console_result_additional_e) {
f_array_length_t location_object = 0;
f_array_length_t location_content = 0;
f_array_length_t location_sub_object = 0;
f_array_length_t location_sub_content = 0;
- for (f_array_length_t i = 0; i < main->parameters[fss_extended_list_write_parameter_object_e].locations.used; ++i) {
- location_object = main->parameters[fss_extended_list_write_parameter_object_e].locations.array[i];
- location_content = main->parameters[fss_extended_list_write_parameter_content_e].locations.array[i];
- location_sub_object = main->parameters[fss_extended_list_write_parameter_object_e].locations_sub.array[i];
- location_sub_content = main->parameters[fss_extended_list_write_parameter_content_e].locations_sub.array[i];
+ for (f_array_length_t i = 0; i < main->parameters.array[fss_extended_list_write_parameter_object_e].locations.used; ++i) {
+ location_object = main->parameters.array[fss_extended_list_write_parameter_object_e].locations.array[i];
+ location_content = main->parameters.array[fss_extended_list_write_parameter_content_e].locations.array[i];
+ location_sub_object = main->parameters.array[fss_extended_list_write_parameter_object_e].locations_sub.array[i];
+ location_sub_content = main->parameters.array[fss_extended_list_write_parameter_content_e].locations_sub.array[i];
if (location_object > location_content || location_object == location_content && location_sub_object > location_sub_content) {
if (main->error.verbosity != f_console_verbosity_quiet_e) {
}
}
}
- else if (main->parameters[fss_extended_list_write_parameter_content_e].locations.used) {
- if (main->parameters[fss_extended_list_write_parameter_content_e].locations.used != main->parameters[fss_extended_list_write_parameter_content_e].values.used) {
+ else if (main->parameters.array[fss_extended_list_write_parameter_content_e].locations.used) {
+ if (main->parameters.array[fss_extended_list_write_parameter_content_e].locations.used != main->parameters.array[fss_extended_list_write_parameter_content_e].values.used) {
fss_extended_list_write_error_parameter_value_missing_print(main, f_console_symbol_long_enable_s, fss_extended_list_write_long_content_s);
status = F_status_set_error(F_parameter);
}
- else if (!main->parameters[fss_extended_list_write_parameter_partial_e].locations.used) {
+ else if (!main->parameters.array[fss_extended_list_write_parameter_partial_e].locations.used) {
fss_extended_list_write_error_parameter_same_times_print(main);
status = F_status_set_error(F_parameter);
}
}
if (F_status_is_error_not(status) && main->process_pipe) {
- if (main->parameters[fss_extended_list_write_parameter_partial_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_extended_list_write_parameter_partial_e].result == f_console_result_found_e) {
if (main->error.verbosity != f_console_verbosity_quiet_e) {
flockfile(main->error.to.stream);
}
if (F_status_is_error_not(status)) {
- if (main->parameters[fss_extended_list_write_parameter_prepend_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_extended_list_write_parameter_prepend_e].result == f_console_result_found_e) {
if (main->error.verbosity != f_console_verbosity_quiet_e) {
flockfile(main->error.to.stream);
status = F_status_set_error(F_parameter);
}
- else if (main->parameters[fss_extended_list_write_parameter_prepend_e].result == f_console_result_additional_e) {
- const f_array_length_t index = main->parameters[fss_extended_list_write_parameter_prepend_e].values.array[main->parameters[fss_extended_list_write_parameter_prepend_e].values.used - 1];
+ else if (main->parameters.array[fss_extended_list_write_parameter_prepend_e].result == f_console_result_additional_e) {
+ const f_array_length_t index = main->parameters.array[fss_extended_list_write_parameter_prepend_e].values.array[main->parameters.array[fss_extended_list_write_parameter_prepend_e].values.used - 1];
const f_array_length_t length = strnlen(arguments->argv[index], F_console_parameter_size_d);
if (length) {
}
if (F_status_is_error_not(status)) {
- if (main->parameters[fss_extended_list_write_parameter_ignore_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_extended_list_write_parameter_ignore_e].result == f_console_result_found_e) {
if (main->error.verbosity != f_console_verbosity_quiet_e) {
flockfile(main->error.to.stream);
status = F_status_set_error(F_parameter);
}
- else if (main->parameters[fss_extended_list_write_parameter_ignore_e].result == f_console_result_additional_e) {
- const f_array_length_t total_locations = main->parameters[fss_extended_list_write_parameter_ignore_e].locations.used;
- const f_array_length_t total_arguments = main->parameters[fss_extended_list_write_parameter_ignore_e].values.used;
+ else if (main->parameters.array[fss_extended_list_write_parameter_ignore_e].result == f_console_result_additional_e) {
+ const f_array_length_t total_locations = main->parameters.array[fss_extended_list_write_parameter_ignore_e].locations.used;
+ const f_array_length_t total_arguments = main->parameters.array[fss_extended_list_write_parameter_ignore_e].values.used;
if (total_locations * 2 > total_arguments) {
flockfile(main->error.to.stream);
f_fss_quote_t quote = F_fss_delimit_quote_double_s;
if (F_status_is_error_not(status)) {
- if (main->parameters[fss_extended_list_write_parameter_double_e].result == f_console_result_found_e) {
- if (main->parameters[fss_extended_list_write_parameter_single_e].result == f_console_result_found_e) {
- if (main->parameters[fss_extended_list_write_parameter_double_e].location < main->parameters[fss_extended_list_write_parameter_single_e].location) {
+ if (main->parameters.array[fss_extended_list_write_parameter_double_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_extended_list_write_parameter_single_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_extended_list_write_parameter_double_e].location < main->parameters.array[fss_extended_list_write_parameter_single_e].location) {
quote = F_fss_delimit_quote_single_s;
}
}
}
- else if (main->parameters[fss_extended_list_write_parameter_single_e].result == f_console_result_found_e) {
+ else if (main->parameters.array[fss_extended_list_write_parameter_single_e].result == f_console_result_found_e) {
quote = F_fss_delimit_quote_single_s;
}
}
}
if (F_status_is_error_not(status)) {
- if (main->parameters[fss_extended_list_write_parameter_partial_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_extended_list_write_parameter_partial_e].result == f_console_result_found_e) {
- if (main->parameters[fss_extended_list_write_parameter_object_e].result == f_console_result_additional_e) {
- for (f_array_length_t i = 0; i < main->parameters[fss_extended_list_write_parameter_object_e].values.used; ++i) {
+ if (main->parameters.array[fss_extended_list_write_parameter_object_e].result == f_console_result_additional_e) {
+ for (f_array_length_t i = 0; i < main->parameters.array[fss_extended_list_write_parameter_object_e].values.used; ++i) {
if (fss_extended_list_write_signal_received(main)) {
status = F_status_set_error(F_interrupt);
break;
}
- object.string = arguments->argv[main->parameters[fss_extended_list_write_parameter_object_e].values.array[i]];
+ object.string = arguments->argv[main->parameters.array[fss_extended_list_write_parameter_object_e].values.array[i]];
object.used = strnlen(object.string, F_console_parameter_size_d);
object.size = object.used;
} // for
}
else {
- for (f_array_length_t i = 0; i < main->parameters[fss_extended_list_write_parameter_content_e].values.used; ++i) {
+ for (f_array_length_t i = 0; i < main->parameters.array[fss_extended_list_write_parameter_content_e].values.used; ++i) {
if (fss_extended_list_write_signal_received(main)) {
status = F_status_set_error(F_interrupt);
break;
}
- status = fss_extended_list_write_process_parameter_ignore(main, arguments, main->parameters[fss_extended_list_write_parameter_content_e].locations, i, &ignore);
+ status = fss_extended_list_write_process_parameter_ignore(main, arguments, main->parameters.array[fss_extended_list_write_parameter_content_e].locations, i, &ignore);
if (F_status_is_error(status)) break;
- content.string = arguments->argv[main->parameters[fss_extended_list_write_parameter_content_e].values.array[i]];
+ content.string = arguments->argv[main->parameters.array[fss_extended_list_write_parameter_content_e].values.array[i]];
content.used = strnlen(content.string, F_console_parameter_size_d);
content.size = content.used;
}
}
else {
- for (f_array_length_t i = 0; i < main->parameters[fss_extended_list_write_parameter_object_e].values.used; ++i) {
+ for (f_array_length_t i = 0; i < main->parameters.array[fss_extended_list_write_parameter_object_e].values.used; ++i) {
if (fss_extended_list_write_signal_received(main)) {
status = F_status_set_error(F_interrupt);
break;
}
- status = fss_extended_list_write_process_parameter_ignore(main, arguments, main->parameters[fss_extended_list_write_parameter_content_e].locations, i, &ignore);
+ status = fss_extended_list_write_process_parameter_ignore(main, arguments, main->parameters.array[fss_extended_list_write_parameter_content_e].locations, i, &ignore);
if (F_status_is_error(status)) break;
- object.string = arguments->argv[main->parameters[fss_extended_list_write_parameter_object_e].values.array[i]];
+ object.string = arguments->argv[main->parameters.array[fss_extended_list_write_parameter_object_e].values.array[i]];
object.used = strnlen(object.string, F_console_parameter_size_d);
object.size = object.used;
- content.string = arguments->argv[main->parameters[fss_extended_list_write_parameter_content_e].values.array[i]];
+ content.string = arguments->argv[main->parameters.array[fss_extended_list_write_parameter_content_e].values.array[i]];
content.used = strnlen(content.string, F_console_parameter_size_d);
content.size = content.used;
funlockfile(main->error.to.stream);
}
}
- else if (main->error.verbosity != f_console_verbosity_quiet_e && main->parameters[fss_extended_list_write_parameter_file_e].result == f_console_result_none_e) {
+ else if (main->error.verbosity != f_console_verbosity_quiet_e && main->parameters.array[fss_extended_list_write_parameter_file_e].result == f_console_result_none_e) {
// Ensure there is always a newline at the end, unless in quiet mode.
fll_print_dynamic(f_string_eol_s, main->output.to.stream);
content.size = 0;
}
- if (main->parameters[fss_extended_list_write_parameter_file_e].result == f_console_result_additional_e) {
+ if (main->parameters.array[fss_extended_list_write_parameter_file_e].result == f_console_result_additional_e) {
if (output.id != -1) {
f_file_stream_close(F_true, &output);
}
#ifndef _di_fss_extended_list_write_main_delete_
f_status_t fss_extended_list_write_main_delete(fss_extended_list_write_main_t *main) {
- for (f_array_length_t i = 0; i < fss_extended_list_write_total_parameters_d; ++i) {
-
- f_type_array_lengths_resize(0, &main->parameters[i].locations);
- f_type_array_lengths_resize(0, &main->parameters[i].locations_sub);
- f_type_array_lengths_resize(0, &main->parameters[i].values);
- } // for
+ f_console_parameters_delete(&main->parameters);
f_type_array_lengths_resize(0, &main->remaining);
#ifndef _di_fss_extended_list_write_main_t_
typedef struct {
- f_console_parameter_t parameters[fss_extended_list_write_total_parameters_d];
+ f_console_parameters_t parameters;
f_array_lengths_t remaining;
bool process_pipe;
#define fss_extended_list_write_main_t_initialize \
{ \
- fss_extended_list_write_console_parameter_t_initialize, \
+ f_console_parameters_t_initialize, \
f_array_lengths_t_initialize, \
F_false, \
fl_print_t_initialize, \
}
if (content) {
- if (main->parameters[fss_extended_list_write_parameter_trim_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_extended_list_write_parameter_trim_e].result == f_console_result_found_e) {
complete = f_fss_complete_full_trim_e;
}
else {
range.start = 0;
- for (; i < main->parameters[fss_extended_list_write_parameter_ignore_e].locations.used; ++i) {
+ for (; i < main->parameters.array[fss_extended_list_write_parameter_ignore_e].locations.used; ++i) {
if (fss_extended_list_write_signal_received(main)) {
return F_status_set_error(F_interrupt);
}
- l = main->parameters[fss_extended_list_write_parameter_ignore_e].locations.array[i];
+ l = main->parameters.array[fss_extended_list_write_parameter_ignore_e].locations.array[i];
if (l < contents.array[location]) continue;
if (location + 1 < contents.used && l > contents.array[location + 1]) continue;
}
}
- index = main->parameters[fss_extended_list_write_parameter_ignore_e].values.array[i * 2];
+ index = main->parameters.array[fss_extended_list_write_parameter_ignore_e].values.array[i * 2];
range.start = 0;
range.stop = strnlen(arguments->argv[index], F_console_parameter_size_d) - 1;
ignore->array[ignore->used].start = number;
- index = main->parameters[fss_extended_list_write_parameter_ignore_e].values.array[(i * 2) + 1];
+ index = main->parameters.array[fss_extended_list_write_parameter_ignore_e].values.array[(i * 2) + 1];
range.start = 0;
range.stop = strnlen(arguments->argv[index], F_console_parameter_size_d) - 1;
#endif
#ifndef _di_fss_extended_read_program_version_
- const f_string_static_t fss_extended_read_program_version_s = macro_f_string_static_t_initialize2(FSS_EXTENDED_READ_program_version_s, 0, FSS_EXTENDED_READ_program_version_s_length);
+ const f_string_static_t fss_extended_read_program_version_s = macro_f_string_static_t_initialize(FSS_EXTENDED_READ_program_version_s, 0, FSS_EXTENDED_READ_program_version_s_length);
#endif // _di_fss_extended_read_program_version_
#ifndef _di_fss_extended_read_program_name_
- const f_string_static_t fss_extended_read_program_name_s = macro_f_string_static_t_initialize2(FSS_EXTENDED_READ_program_name_s, 0, FSS_EXTENDED_READ_program_name_s_length);
- const f_string_static_t fss_extended_read_program_name_long_s = macro_f_string_static_t_initialize2(FSS_EXTENDED_READ_program_name_long_s, 0, FSS_EXTENDED_READ_program_name_long_s_length);
+ const f_string_static_t fss_extended_read_program_name_s = macro_f_string_static_t_initialize(FSS_EXTENDED_READ_program_name_s, 0, FSS_EXTENDED_READ_program_name_s_length);
+ const f_string_static_t fss_extended_read_program_name_long_s = macro_f_string_static_t_initialize(FSS_EXTENDED_READ_program_name_long_s, 0, FSS_EXTENDED_READ_program_name_long_s_length);
#endif // _di_fss_extended_read_program_name_
#ifndef _di_fss_extended_read_print_help_
f_status_t status = F_none;
- {
- const f_console_parameters_t parameters = macro_f_console_parameters_t_initialize(main->parameters, fss_extended_read_total_parameters_d);
+ f_console_parameter_t parameters[] = fss_extended_read_console_parameter_t_initialize;
+ main->parameters.array = parameters;
+ main->parameters.used = fss_extended_read_total_parameters_d;
- {
- f_console_parameter_id_t ids[3] = { fss_extended_read_parameter_no_color_e, fss_extended_read_parameter_light_e, fss_extended_read_parameter_dark_e };
- const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 3);
+ {
+ f_console_parameter_id_t ids[3] = { fss_extended_read_parameter_no_color_e, fss_extended_read_parameter_light_e, fss_extended_read_parameter_dark_e };
+ const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 3);
- status = fll_program_parameter_process(*arguments, parameters, choices, F_true, &main->remaining, &main->context);
+ status = fll_program_parameter_process(*arguments, &main->parameters, choices, F_true, &main->remaining, &main->context);
- main->output.set = &main->context.set;
- main->error.set = &main->context.set;
- main->warning.set = &main->context.set;
+ main->output.set = &main->context.set;
+ main->error.set = &main->context.set;
+ main->warning.set = &main->context.set;
- if (main->context.set.error.before) {
- main->output.context = f_color_set_empty_s;
- main->output.notable = main->context.set.notable;
+ if (main->context.set.error.before) {
+ main->output.context = f_color_set_empty_s;
+ main->output.notable = main->context.set.notable;
- main->error.context = main->context.set.error;
- main->error.notable = main->context.set.notable;
+ main->error.context = main->context.set.error;
+ main->error.notable = main->context.set.notable;
- main->warning.context = main->context.set.warning;
- main->warning.notable = main->context.set.notable;
- }
- else {
- f_color_set_t *sets[] = { &main->output.context, &main->output.notable, &main->error.context, &main->error.notable, &main->warning.context, &main->warning.notable, 0 };
+ main->warning.context = main->context.set.warning;
+ main->warning.notable = main->context.set.notable;
+ }
+ else {
+ f_color_set_t *sets[] = { &main->output.context, &main->output.notable, &main->error.context, &main->error.notable, &main->warning.context, &main->warning.notable, 0 };
- fll_program_parameter_process_empty(&main->context, sets);
- }
+ fll_program_parameter_process_empty(&main->context, sets);
+ }
- if (F_status_is_error(status)) {
- fss_extended_read_main_delete(main);
+ if (F_status_is_error(status)) {
+ fss_extended_read_main_delete(main);
- return F_status_set_error(status);
- }
+ return F_status_set_error(status);
}
+ }
- // Identify priority of verbosity related parameters.
- {
- f_console_parameter_id_t ids[4] = { fss_extended_read_parameter_verbosity_quiet_e, fss_extended_read_parameter_verbosity_normal_e, fss_extended_read_parameter_verbosity_verbose_e, fss_extended_read_parameter_verbosity_debug_e };
- f_console_parameter_id_t choice = 0;
- const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 4);
+ // Identify priority of verbosity related parameters.
+ {
+ f_console_parameter_id_t ids[4] = { fss_extended_read_parameter_verbosity_quiet_e, fss_extended_read_parameter_verbosity_normal_e, fss_extended_read_parameter_verbosity_verbose_e, fss_extended_read_parameter_verbosity_debug_e };
+ f_console_parameter_id_t choice = 0;
+ const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 4);
- status = f_console_parameter_prioritize_right(parameters, choices, &choice);
+ status = f_console_parameter_prioritize_right(main->parameters, choices, &choice);
- if (F_status_is_error(status)) {
- fss_extended_read_main_delete(main);
-
- return status;
- }
+ if (F_status_is_error(status)) {
+ fss_extended_read_main_delete(main);
- if (choice == fss_extended_read_parameter_verbosity_quiet_e) {
- main->output.verbosity = f_console_verbosity_quiet_e;
- main->error.verbosity = f_console_verbosity_quiet_e;
- main->warning.verbosity = f_console_verbosity_quiet_e;
- }
- else if (choice == fss_extended_read_parameter_verbosity_normal_e) {
- main->output.verbosity = f_console_verbosity_normal_e;
- main->error.verbosity = f_console_verbosity_normal_e;
- main->warning.verbosity = f_console_verbosity_normal_e;
- }
- else if (choice == fss_extended_read_parameter_verbosity_verbose_e) {
- main->output.verbosity = f_console_verbosity_verbose_e;
- main->error.verbosity = f_console_verbosity_verbose_e;
- main->warning.verbosity = f_console_verbosity_verbose_e;
- }
- else if (choice == fss_extended_read_parameter_verbosity_debug_e) {
- main->output.verbosity = f_console_verbosity_debug_e;
- main->error.verbosity = f_console_verbosity_debug_e;
- main->warning.verbosity = f_console_verbosity_debug_e;
- }
+ return status;
}
- status = F_none;
+ if (choice == fss_extended_read_parameter_verbosity_quiet_e) {
+ main->output.verbosity = f_console_verbosity_quiet_e;
+ main->error.verbosity = f_console_verbosity_quiet_e;
+ main->warning.verbosity = f_console_verbosity_quiet_e;
+ }
+ else if (choice == fss_extended_read_parameter_verbosity_normal_e) {
+ main->output.verbosity = f_console_verbosity_normal_e;
+ main->error.verbosity = f_console_verbosity_normal_e;
+ main->warning.verbosity = f_console_verbosity_normal_e;
+ }
+ else if (choice == fss_extended_read_parameter_verbosity_verbose_e) {
+ main->output.verbosity = f_console_verbosity_verbose_e;
+ main->error.verbosity = f_console_verbosity_verbose_e;
+ main->warning.verbosity = f_console_verbosity_verbose_e;
+ }
+ else if (choice == fss_extended_read_parameter_verbosity_debug_e) {
+ main->output.verbosity = f_console_verbosity_debug_e;
+ main->error.verbosity = f_console_verbosity_debug_e;
+ main->warning.verbosity = f_console_verbosity_debug_e;
+ }
}
- if (main->parameters[fss_extended_read_parameter_help_e].result == f_console_result_found_e) {
+ f_string_static_t * const argv = main->parameters.arguments.array;
+
+ status = F_none;
+
+ if (main->parameters.array[fss_extended_read_parameter_help_e].result == f_console_result_found_e) {
fss_extended_read_print_help(main->output.to, main->context);
fss_extended_read_main_delete(main);
return status;
}
- if (main->parameters[fss_extended_read_parameter_version_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_extended_read_parameter_version_e].result == f_console_result_found_e) {
fll_program_print_version(main->output.to, fss_extended_read_program_version_s);
fss_extended_read_main_delete(main);
for (f_array_length_t i = 0; i < 6; ++i) {
- if (main->parameters[parameter_code[i]].result == f_console_result_found_e) {
+ if (main->parameters.array[parameter_code[i]].result == f_console_result_found_e) {
flockfile(main->error.to.stream);
fl_print_format("%q%[%QThe parameter '%]", main->error.to.stream, f_string_eol_s, main->error.context, main->error.prefix, main->error.context);
} // for
}
- if (F_status_is_error_not(status) && main->parameters[fss_extended_read_parameter_columns_e].result == f_console_result_found_e) {
+ if (F_status_is_error_not(status) && main->parameters.array[fss_extended_read_parameter_columns_e].result == f_console_result_found_e) {
const f_array_length_t parameter_code[] = {
fss_extended_read_parameter_depth_e,
fss_extended_read_parameter_line_e,
for (f_array_length_t i = 0; i < 5; ++i) {
- if (main->parameters[parameter_code[i]].result == parameter_match[i]) {
+ if (main->parameters.array[parameter_code[i]].result == parameter_match[i]) {
flockfile(main->error.to.stream);
fl_print_format("%q%[%QCannot specify the '%]", main->error.to.stream, f_string_eol_s, main->error.context, main->error.prefix, main->error.context);
} // for
}
- if (F_status_is_error_not(status) && main->parameters[fss_extended_read_parameter_pipe_e].result == f_console_result_found_e) {
- if (main->parameters[fss_extended_read_parameter_total_e].result == f_console_result_found_e) {
+ if (F_status_is_error_not(status) && main->parameters.array[fss_extended_read_parameter_pipe_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_extended_read_parameter_total_e].result == f_console_result_found_e) {
flockfile(main->error.to.stream);
fl_print_format("%q%[%QCannot specify the '%]", main->error.to.stream, f_string_eol_s, main->error.context, main->error.prefix, main->error.context);
status = F_status_set_error(F_parameter);
}
- else if (main->parameters[fss_extended_read_parameter_line_e].result == f_console_result_additional_e) {
+ else if (main->parameters.array[fss_extended_read_parameter_line_e].result == f_console_result_additional_e) {
flockfile(main->error.to.stream);
fl_print_format("%q%[%QCannot specify the '%]", main->error.to.stream, f_string_eol_s, main->error.context, main->error.prefix, main->error.context);
}
}
- if (F_status_is_error_not(status) && main->parameters[fss_extended_read_parameter_delimit_e].result == f_console_result_additional_e) {
+ if (F_status_is_error_not(status) && main->parameters.array[fss_extended_read_parameter_delimit_e].result == f_console_result_additional_e) {
f_array_length_t location = 0;
f_array_length_t length = 0;
uint16_t signal_check = 0;
// Set the value to 0 to allow for detecting mode based on what is provided.
data.delimit_mode = 0;
- for (f_array_length_t i = 0; i < main->parameters[fss_extended_read_parameter_delimit_e].values.used; ++i) {
+ for (f_array_length_t i = 0; i < main->parameters.array[fss_extended_read_parameter_delimit_e].values.used; ++i) {
if (!((++signal_check) % fss_extended_read_signal_check_d)) {
if (fss_extended_read_signal_received(main)) {
signal_check = 0;
}
- location = main->parameters[fss_extended_read_parameter_delimit_e].values.array[i];
+ location = main->parameters.array[fss_extended_read_parameter_delimit_e].values.array[i];
length = strnlen(arguments->argv[location], F_console_parameter_size_d);
if (!length) {
// This standard does not support nesting, so any depth greater than 0 can be predicted without processing the file.
if (F_status_is_error_not(status) && data.depths.array[0].depth > 0) {
- if (main->parameters[fss_extended_read_parameter_total_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_extended_read_parameter_total_e].result == f_console_result_found_e) {
fss_extended_read_print_zero(main);
}
return F_none;
}
- if (F_status_is_error_not(status) && main->parameters[fss_extended_read_parameter_select_e].result == f_console_result_found_e) {
+ if (F_status_is_error_not(status) && main->parameters.array[fss_extended_read_parameter_select_e].result == f_console_result_found_e) {
flockfile(main->error.to.stream);
fl_print_format("%q%[%QThe '%]", main->error.to.stream, f_string_eol_s, main->error.context, main->error.prefix, main->error.context);
status = f_file_stream_open(arguments->argv[main->remaining.array[i]], 0, &file);
if (F_status_is_error(status)) {
- fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_open", F_true, arguments->argv[main->remaining.array[i]], "open", fll_error_file_type_file_e);
+ fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_open", F_true, arguments->argv[main->remaining.array[i]], f_file_operation_open_s, fll_error_file_type_file_e);
break;
}
#ifndef _di_fss_extended_read_main_delete_
f_status_t fss_extended_read_main_delete(fss_extended_read_main_t * const main) {
- for (f_array_length_t i = 0; i < fss_extended_read_total_parameters_d; ++i) {
-
- f_type_array_lengths_resize(0, &main->parameters[i].locations);
- f_type_array_lengths_resize(0, &main->parameters[i].locations_sub);
- f_type_array_lengths_resize(0, &main->parameters[i].values);
- } // for
+ f_console_parameters_delete(&main->parameters);
f_type_array_lengths_resize(0, &main->remaining);
macro_f_color_context_t_delete_simple(main->context);
#ifndef _di_fss_extended_read_main_t_
typedef struct {
- f_console_parameter_t parameters[fss_extended_read_total_parameters_d];
+ f_console_parameters_t parameters;
f_array_lengths_t remaining;
bool process_pipe;
#define fss_extended_read_main_t_initialize \
{ \
- fss_extended_read_console_parameter_t_initialize, \
+ f_console_parameters_t_initialize, \
f_array_lengths_t_initialize, \
F_false, \
fl_print_t_initialize, \
#ifndef _di_fss_extended_read_print_content_end_
void fss_extended_read_print_content_end(fss_extended_read_main_t * const main) {
- if (main->parameters[fss_extended_read_parameter_pipe_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_extended_read_parameter_pipe_e].result == f_console_result_found_e) {
f_print_character(fss_extended_read_pipe_content_start_s, main->output.to.stream);
}
else {
#ifndef _di_fss_extended_read_print_object_end_
void fss_extended_read_print_object_end(fss_extended_read_main_t * const main) {
- if (main->parameters[fss_extended_read_parameter_pipe_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_extended_read_parameter_pipe_e].result == f_console_result_found_e) {
f_print_character(fss_extended_read_pipe_content_end_s, main->output.to.stream);
}
else {
#ifndef _di_fss_extended_read_print_set_end_
void fss_extended_read_print_set_end(fss_extended_read_main_t * const main) {
- if (main->parameters[fss_extended_read_parameter_pipe_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_extended_read_parameter_pipe_e].result == f_console_result_found_e) {
f_print_character(fss_extended_read_pipe_content_end_s, main->output.to.stream);
}
else {
{
f_array_length_t depth_size = 1;
- if (main->parameters[fss_extended_read_parameter_depth_e].result == f_console_result_additional_e) {
- depth_size = main->parameters[fss_extended_read_parameter_depth_e].values.used;
+ if (main->parameters.array[fss_extended_read_parameter_depth_e].result == f_console_result_additional_e) {
+ depth_size = main->parameters.array[fss_extended_read_parameter_depth_e].values.used;
}
if (depth_size > data->depths.size) {
macro_f_string_dynamic_t_clear(data->depths.array[i].value_name);
- if (!main->parameters[fss_extended_read_parameter_depth_e].values.used) {
+ if (!main->parameters.array[fss_extended_read_parameter_depth_e].values.used) {
position_depth = 0;
}
else {
- position_depth = main->parameters[fss_extended_read_parameter_depth_e].values.array[i];
+ position_depth = main->parameters.array[fss_extended_read_parameter_depth_e].values.array[i];
const f_string_range_t range = macro_f_string_range_t_initialize(strlen(arguments->argv[position_depth]));
}
}
- if (main->parameters[fss_extended_read_parameter_at_e].result == f_console_result_additional_e) {
- for (; position_at < main->parameters[fss_extended_read_parameter_at_e].values.used; ++position_at) {
+ if (main->parameters.array[fss_extended_read_parameter_at_e].result == f_console_result_additional_e) {
+ for (; position_at < main->parameters.array[fss_extended_read_parameter_at_e].values.used; ++position_at) {
- if (main->parameters[fss_extended_read_parameter_at_e].values.array[position_at] < position_depth) {
+ if (main->parameters.array[fss_extended_read_parameter_at_e].values.array[position_at] < position_depth) {
continue;
}
- if (i + 1 < data->depths.used && main->parameters[fss_extended_read_parameter_at_e].values.array[position_at] > main->parameters[fss_extended_read_parameter_depth_e].values.array[i + 1]) {
+ if (i + 1 < data->depths.used && main->parameters.array[fss_extended_read_parameter_at_e].values.array[position_at] > main->parameters.array[fss_extended_read_parameter_depth_e].values.array[i + 1]) {
break;
}
- data->depths.array[i].index_at = main->parameters[fss_extended_read_parameter_at_e].values.array[position_at];
+ data->depths.array[i].index_at = main->parameters.array[fss_extended_read_parameter_at_e].values.array[position_at];
const f_string_range_t range = macro_f_string_range_t_initialize(strlen(arguments->argv[data->depths.array[i].index_at]));
} // for
}
- if (main->parameters[fss_extended_read_parameter_name_e].result == f_console_result_additional_e) {
- for (; position_name < main->parameters[fss_extended_read_parameter_name_e].values.used; position_name++) {
+ if (main->parameters.array[fss_extended_read_parameter_name_e].result == f_console_result_additional_e) {
+ for (; position_name < main->parameters.array[fss_extended_read_parameter_name_e].values.used; position_name++) {
- if (main->parameters[fss_extended_read_parameter_name_e].values.array[position_name] < position_depth) {
+ if (main->parameters.array[fss_extended_read_parameter_name_e].values.array[position_name] < position_depth) {
continue;
}
- if (i + 1 < data->depths.used && main->parameters[fss_extended_read_parameter_name_e].values.array[position_name] > main->parameters[fss_extended_read_parameter_depth_e].values.array[i + 1]) {
+ if (i + 1 < data->depths.used && main->parameters.array[fss_extended_read_parameter_name_e].values.array[position_name] > main->parameters.array[fss_extended_read_parameter_depth_e].values.array[i + 1]) {
break;
}
- data->depths.array[i].index_name = main->parameters[fss_extended_read_parameter_name_e].values.array[position_name];
+ data->depths.array[i].index_name = main->parameters.array[fss_extended_read_parameter_name_e].values.array[position_name];
- if (main->parameters[fss_extended_read_parameter_trim_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_extended_read_parameter_trim_e].result == f_console_result_found_e) {
status = fl_string_rip(arguments->argv[data->depths.array[i].index_name], strlen(arguments->argv[data->depths.array[i].index_name]), &data->depths.array[i].value_name);
}
else {
}
if (F_status_is_error(status)) {
- fll_error_print(main->error, F_status_set_fine(status), main->parameters[fss_extended_read_parameter_trim_e].result == f_console_result_found_e ? "fl_string_rip" : "f_string_append", F_true);
+ fll_error_print(main->error, F_status_set_fine(status), main->parameters.array[fss_extended_read_parameter_trim_e].result == f_console_result_found_e ? "fl_string_rip" : "f_string_append", F_true);
return status;
}
if (F_status_is_error(status)) {
const f_string_t file_name = fss_extended_read_file_identify(input.start, data->files);
- fll_error_file_print(main->error, F_status_set_fine(status), "fll_fss_extended_read", F_true, file_name, "process", fll_error_file_type_file_e);
+ fll_error_file_print(main->error, F_status_set_fine(status), "fll_fss_extended_read", F_true, file_name, f_file_operation_process_s, fll_error_file_type_file_e);
return status;
}
#ifndef _di_fss_extended_read_load_number_
f_status_t fss_extended_read_load_number(fss_extended_read_main_t * const main, const f_array_length_t parameter, const f_string_t name, const f_console_arguments_t *arguments, f_number_unsigned_t *number) {
- if (main->parameters[parameter].result == f_console_result_additional_e) {
- const f_array_length_t index = main->parameters[parameter].values.array[main->parameters[parameter].values.used - 1];
+ if (main->parameters.array[parameter].result == f_console_result_additional_e) {
+ const f_array_length_t index = main->parameters.array[parameter].values.array[main->parameters.array[parameter].values.used - 1];
const f_string_range_t range = macro_f_string_range_t_initialize(strnlen(arguments->argv[index], F_console_parameter_size_d));
const f_status_t status = fl_conversion_string_to_number_unsigned(arguments->argv[index], range, number);
f_status_t status = F_none;
- if (main->parameters[fss_extended_read_parameter_at_e].result == f_console_result_additional_e) {
+ if (main->parameters.array[fss_extended_read_parameter_at_e].result == f_console_result_additional_e) {
data->option |= fss_extended_read_data_option_at_d;
}
- if (main->parameters[fss_extended_read_parameter_columns_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_extended_read_parameter_columns_e].result == f_console_result_found_e) {
data->option |= fss_extended_read_data_option_columns_d;
}
- if (main->parameters[fss_extended_read_parameter_content_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_extended_read_parameter_content_e].result == f_console_result_found_e) {
data->option |= fss_extended_read_data_option_content_d;
}
- if (main->parameters[fss_extended_read_parameter_empty_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_extended_read_parameter_empty_e].result == f_console_result_found_e) {
data->option |= fss_extended_read_data_option_empty_d;
}
- if (main->parameters[fss_extended_read_parameter_line_e].result == f_console_result_additional_e) {
+ if (main->parameters.array[fss_extended_read_parameter_line_e].result == f_console_result_additional_e) {
data->option |= fss_extended_read_data_option_line_d;
status = fss_extended_read_load_number(main, fss_extended_read_parameter_line_e, fss_extended_read_long_line_s, arguments, &data->line);
if (F_status_is_error(status)) return status;
}
- if (main->parameters[fss_extended_read_parameter_name_e].result == f_console_result_additional_e) {
+ if (main->parameters.array[fss_extended_read_parameter_name_e].result == f_console_result_additional_e) {
data->option |= fss_extended_read_data_option_name_d;
}
- if (main->parameters[fss_extended_read_parameter_object_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_extended_read_parameter_object_e].result == f_console_result_found_e) {
data->option |= fss_extended_read_data_option_object_d;
}
- if (main->parameters[fss_extended_read_parameter_raw_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_extended_read_parameter_raw_e].result == f_console_result_found_e) {
data->option |= fss_extended_read_data_option_raw_d;
}
- if (main->parameters[fss_extended_read_parameter_select_e].result == f_console_result_additional_e) {
+ if (main->parameters.array[fss_extended_read_parameter_select_e].result == f_console_result_additional_e) {
data->option |= fss_extended_read_data_option_select_d;
status = fss_extended_read_load_number(main, fss_extended_read_parameter_select_e, fss_extended_read_long_select_s, arguments, &data->select);
if (F_status_is_error(status)) return status;
}
- if (main->parameters[fss_extended_read_parameter_total_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_extended_read_parameter_total_e].result == f_console_result_found_e) {
data->option |= fss_extended_read_data_option_total_d;
}
- if (main->parameters[fss_extended_read_parameter_trim_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_extended_read_parameter_trim_e].result == f_console_result_found_e) {
data->option |= fss_extended_read_data_option_trim_d;
}
#endif
#ifndef _di_fss_extended_write_program_version_
- const f_string_static_t fss_extended_write_program_version_s = macro_f_string_static_t_initialize2(FSS_EXTENDED_WRITE_program_version_s, 0, FSS_EXTENDED_WRITE_program_version_s_length);
+ const f_string_static_t fss_extended_write_program_version_s = macro_f_string_static_t_initialize(FSS_EXTENDED_WRITE_program_version_s, 0, FSS_EXTENDED_WRITE_program_version_s_length);
#endif // _di_fss_extended_write_program_version_
#ifndef _di_fss_extended_write_program_name_
- const f_string_static_t fss_extended_write_program_name_s = macro_f_string_static_t_initialize2(FSS_EXTENDED_WRITE_program_name_s, 0, FSS_EXTENDED_WRITE_program_name_s_length);
- const f_string_static_t fss_extended_write_program_name_long_s = macro_f_string_static_t_initialize2(FSS_EXTENDED_WRITE_program_name_long_s, 0, FSS_EXTENDED_WRITE_program_name_long_s_length);
+ const f_string_static_t fss_extended_write_program_name_s = macro_f_string_static_t_initialize(FSS_EXTENDED_WRITE_program_name_s, 0, FSS_EXTENDED_WRITE_program_name_s_length);
+ const f_string_static_t fss_extended_write_program_name_long_s = macro_f_string_static_t_initialize(FSS_EXTENDED_WRITE_program_name_long_s, 0, FSS_EXTENDED_WRITE_program_name_long_s_length);
#endif // _di_fss_extended_write_program_name_
#ifndef _di_fss_extended_write_print_help_
f_status_t status = F_none;
- {
- const f_console_parameters_t parameters = macro_f_console_parameters_t_initialize(main->parameters, fss_extended_write_total_parameters_d);
+ f_console_parameter_t parameters[] = fss_extended_write_console_parameter_t_initialize;
+ main->parameters.array = parameters;
+ main->parameters.used = fss_extended_write_total_parameters_d;
- {
- f_console_parameter_id_t ids[3] = { fss_extended_write_parameter_no_color_e, fss_extended_write_parameter_light_e, fss_extended_write_parameter_dark_e };
- const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 3);
+ {
+ f_console_parameter_id_t ids[3] = { fss_extended_write_parameter_no_color_e, fss_extended_write_parameter_light_e, fss_extended_write_parameter_dark_e };
+ const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 3);
- status = fll_program_parameter_process(*arguments, parameters, choices, F_true, &main->remaining, &main->context);
+ status = fll_program_parameter_process(*arguments, &main->parameters, choices, F_true, &main->remaining, &main->context);
- main->output.set = &main->context.set;
- main->error.set = &main->context.set;
- main->warning.set = &main->context.set;
+ main->output.set = &main->context.set;
+ main->error.set = &main->context.set;
+ main->warning.set = &main->context.set;
- if (main->context.set.error.before) {
- main->output.context = f_color_set_empty_s;
- main->output.notable = main->context.set.notable;
+ if (main->context.set.error.before) {
+ main->output.context = f_color_set_empty_s;
+ main->output.notable = main->context.set.notable;
- main->error.context = main->context.set.error;
- main->error.notable = main->context.set.notable;
+ main->error.context = main->context.set.error;
+ main->error.notable = main->context.set.notable;
- main->warning.context = main->context.set.warning;
- main->warning.notable = main->context.set.notable;
- }
- else {
- f_color_set_t *sets[] = { &main->output.context, &main->output.notable, &main->error.context, &main->error.notable, &main->warning.context, &main->warning.notable, 0 };
-
- fll_program_parameter_process_empty(&main->context, sets);
- }
+ main->warning.context = main->context.set.warning;
+ main->warning.notable = main->context.set.notable;
+ }
+ else {
+ f_color_set_t *sets[] = { &main->output.context, &main->output.notable, &main->error.context, &main->error.notable, &main->warning.context, &main->warning.notable, 0 };
- if (F_status_is_error(status)) {
- fss_extended_write_main_delete(main);
- return F_status_set_error(status);
- }
+ fll_program_parameter_process_empty(&main->context, sets);
}
- // Identify priority of verbosity related parameters.
- {
- f_console_parameter_id_t ids[4] = { fss_extended_write_parameter_verbosity_quiet_e, fss_extended_write_parameter_verbosity_normal_e, fss_extended_write_parameter_verbosity_verbose_e, fss_extended_write_parameter_verbosity_debug_e };
- f_console_parameter_id_t choice = 0;
- const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 4);
+ if (F_status_is_error(status)) {
+ fss_extended_write_main_delete(main);
+ return F_status_set_error(status);
+ }
+ }
- status = f_console_parameter_prioritize_right(parameters, choices, &choice);
+ // Identify priority of verbosity related parameters.
+ {
+ f_console_parameter_id_t ids[4] = { fss_extended_write_parameter_verbosity_quiet_e, fss_extended_write_parameter_verbosity_normal_e, fss_extended_write_parameter_verbosity_verbose_e, fss_extended_write_parameter_verbosity_debug_e };
+ f_console_parameter_id_t choice = 0;
+ const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 4);
- if (F_status_is_error(status)) {
- fss_extended_write_main_delete(main);
+ status = f_console_parameter_prioritize_right(main->parameters, choices, &choice);
- return status;
- }
+ if (F_status_is_error(status)) {
+ fss_extended_write_main_delete(main);
- if (choice == fss_extended_write_parameter_verbosity_quiet_e) {
- main->output.verbosity = f_console_verbosity_quiet_e;
- main->error.verbosity = f_console_verbosity_quiet_e;
- main->warning.verbosity = f_console_verbosity_quiet_e;
- }
- else if (choice == fss_extended_write_parameter_verbosity_normal_e) {
- main->output.verbosity = f_console_verbosity_normal_e;
- main->error.verbosity = f_console_verbosity_normal_e;
- main->warning.verbosity = f_console_verbosity_normal_e;
- }
- else if (choice == fss_extended_write_parameter_verbosity_verbose_e) {
- main->output.verbosity = f_console_verbosity_verbose_e;
- main->error.verbosity = f_console_verbosity_verbose_e;
- main->warning.verbosity = f_console_verbosity_verbose_e;
- }
- else if (choice == fss_extended_write_parameter_verbosity_debug_e) {
- main->output.verbosity = f_console_verbosity_debug_e;
- main->error.verbosity = f_console_verbosity_debug_e;
- main->warning.verbosity = f_console_verbosity_debug_e;
- }
+ return status;
}
- status = F_none;
+ if (choice == fss_extended_write_parameter_verbosity_quiet_e) {
+ main->output.verbosity = f_console_verbosity_quiet_e;
+ main->error.verbosity = f_console_verbosity_quiet_e;
+ main->warning.verbosity = f_console_verbosity_quiet_e;
+ }
+ else if (choice == fss_extended_write_parameter_verbosity_normal_e) {
+ main->output.verbosity = f_console_verbosity_normal_e;
+ main->error.verbosity = f_console_verbosity_normal_e;
+ main->warning.verbosity = f_console_verbosity_normal_e;
+ }
+ else if (choice == fss_extended_write_parameter_verbosity_verbose_e) {
+ main->output.verbosity = f_console_verbosity_verbose_e;
+ main->error.verbosity = f_console_verbosity_verbose_e;
+ main->warning.verbosity = f_console_verbosity_verbose_e;
+ }
+ else if (choice == fss_extended_write_parameter_verbosity_debug_e) {
+ main->output.verbosity = f_console_verbosity_debug_e;
+ main->error.verbosity = f_console_verbosity_debug_e;
+ main->warning.verbosity = f_console_verbosity_debug_e;
+ }
}
- if (main->parameters[fss_extended_write_parameter_help_e].result == f_console_result_found_e) {
+ f_string_static_t * const argv = main->parameters.arguments.array;
+
+ status = F_none;
+
+ if (main->parameters.array[fss_extended_write_parameter_help_e].result == f_console_result_found_e) {
fss_extended_write_print_help(main->output.to, main->context);
fss_extended_write_main_delete(main);
return status;
}
- if (main->parameters[fss_extended_write_parameter_version_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_extended_write_parameter_version_e].result == f_console_result_found_e) {
fll_program_print_version(main->output.to, fss_extended_write_program_version_s);
fss_extended_write_main_delete(main);
output.flag = F_file_flag_create_d | F_file_flag_write_only_d | F_file_flag_append_d;
if (F_status_is_error_not(status)) {
- if (main->parameters[fss_extended_write_parameter_file_e].result == f_console_result_additional_e) {
- if (main->parameters[fss_extended_write_parameter_file_e].values.used > 1) {
+ if (main->parameters.array[fss_extended_write_parameter_file_e].result == f_console_result_additional_e) {
+ if (main->parameters.array[fss_extended_write_parameter_file_e].values.used > 1) {
if (main->error.verbosity != f_console_verbosity_quiet_e) {
flockfile(main->error.to.stream);
status = F_status_set_error(F_parameter);
}
else {
- const f_array_length_t location = main->parameters[fss_extended_write_parameter_file_e].values.array[0];
+ const f_array_length_t location = main->parameters.array[fss_extended_write_parameter_file_e].values.array[0];
output.id = -1;
output.stream = 0;
status = f_file_stream_open(arguments->argv[location], 0, &output);
if (F_status_is_error(status)) {
- fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_open", F_true, arguments->argv[location], "open", fll_error_file_type_file_e);
+ fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_open", F_true, arguments->argv[location], f_file_operation_open_s, fll_error_file_type_file_e);
}
}
}
- else if (main->parameters[fss_extended_write_parameter_file_e].result == f_console_result_found_e) {
+ else if (main->parameters.array[fss_extended_write_parameter_file_e].result == f_console_result_found_e) {
fss_extended_write_error_parameter_value_missing_print(main, f_console_symbol_long_enable_s,.string fss_extended_write_long_file_s);
status = F_status_set_error(F_parameter);
}
}
if (F_status_is_error_not(status)) {
- if (main->parameters[fss_extended_write_parameter_object_e].locations.used || main->parameters[fss_extended_write_parameter_content_e].locations.used) {
- if (main->parameters[fss_extended_write_parameter_object_e].locations.used) {
- if (main->parameters[fss_extended_write_parameter_object_e].locations.used != main->parameters[fss_extended_write_parameter_object_e].values.used) {
+ if (main->parameters.array[fss_extended_write_parameter_object_e].locations.used || main->parameters.array[fss_extended_write_parameter_content_e].locations.used) {
+ if (main->parameters.array[fss_extended_write_parameter_object_e].locations.used) {
+ if (main->parameters.array[fss_extended_write_parameter_object_e].locations.used != main->parameters.array[fss_extended_write_parameter_object_e].values.used) {
fss_extended_write_error_parameter_value_missing_print(main, f_console_symbol_long_enable_s, fss_extended_write_long_object_s);
status = F_status_set_error(F_parameter);
}
- else if (main->parameters[fss_extended_write_parameter_content_e].locations.used != main->parameters[fss_extended_write_parameter_content_e].values.used) {
+ else if (main->parameters.array[fss_extended_write_parameter_content_e].locations.used != main->parameters.array[fss_extended_write_parameter_content_e].values.used) {
fss_extended_write_error_parameter_value_missing_print(main, f_console_symbol_long_enable_s, fss_extended_write_long_content_s);
status = F_status_set_error(F_parameter);
}
- else if (!main->parameters[fss_extended_write_parameter_content_e].locations.used && main->parameters[fss_extended_write_parameter_partial_e].result == f_console_result_none_e) {
+ else if (!main->parameters.array[fss_extended_write_parameter_content_e].locations.used && main->parameters.array[fss_extended_write_parameter_partial_e].result == f_console_result_none_e) {
fss_extended_write_error_parameter_at_least_once(main);
status = F_status_set_error(F_parameter);
}
- else if (main->parameters[fss_extended_write_parameter_content_e].locations.used && main->parameters[fss_extended_write_parameter_partial_e].locations.used) {
- if (main->parameters[fss_extended_write_parameter_content_e].result == f_console_result_additional_e) {
+ else if (main->parameters.array[fss_extended_write_parameter_content_e].locations.used && main->parameters.array[fss_extended_write_parameter_partial_e].locations.used) {
+ if (main->parameters.array[fss_extended_write_parameter_content_e].result == f_console_result_additional_e) {
if (main->error.verbosity != f_console_verbosity_quiet_e) {
flockfile(main->error.to.stream);
}
if (F_status_is_error_not(status)) {
- if (main->parameters[fss_extended_write_parameter_content_e].result == f_console_result_additional_e) {
- f_array_length_t location_object = main->parameters[fss_extended_write_parameter_object_e].locations.array[0];
- f_array_length_t location_content = main->parameters[fss_extended_write_parameter_content_e].locations.array[0];
- f_array_length_t location_sub_object = main->parameters[fss_extended_write_parameter_object_e].locations_sub.array[0];
- f_array_length_t location_sub_content = main->parameters[fss_extended_write_parameter_content_e].locations_sub.array[0];
+ if (main->parameters.array[fss_extended_write_parameter_content_e].result == f_console_result_additional_e) {
+ f_array_length_t location_object = main->parameters.array[fss_extended_write_parameter_object_e].locations.array[0];
+ f_array_length_t location_content = main->parameters.array[fss_extended_write_parameter_content_e].locations.array[0];
+ f_array_length_t location_sub_object = main->parameters.array[fss_extended_write_parameter_object_e].locations_sub.array[0];
+ f_array_length_t location_sub_content = main->parameters.array[fss_extended_write_parameter_content_e].locations_sub.array[0];
if (location_object > location_content || location_object == location_content && location_sub_object > location_sub_content) {
if (main->error.verbosity != f_console_verbosity_quiet_e) {
status = F_status_set_error(F_parameter);
}
else {
- location_object = main->parameters[fss_extended_write_parameter_object_e].locations.array[main->parameters[fss_extended_write_parameter_object_e].locations.used - 1];
- location_content = main->parameters[fss_extended_write_parameter_content_e].locations.array[main->parameters[fss_extended_write_parameter_content_e].locations.used - 1];
- location_sub_object = main->parameters[fss_extended_write_parameter_object_e].locations_sub.array[main->parameters[fss_extended_write_parameter_object_e].locations_sub.used - 1];
- location_sub_content = main->parameters[fss_extended_write_parameter_content_e].locations_sub.array[main->parameters[fss_extended_write_parameter_content_e].locations_sub.used - 1];
+ location_object = main->parameters.array[fss_extended_write_parameter_object_e].locations.array[main->parameters.array[fss_extended_write_parameter_object_e].locations.used - 1];
+ location_content = main->parameters.array[fss_extended_write_parameter_content_e].locations.array[main->parameters.array[fss_extended_write_parameter_content_e].locations.used - 1];
+ location_sub_object = main->parameters.array[fss_extended_write_parameter_object_e].locations_sub.array[main->parameters.array[fss_extended_write_parameter_object_e].locations_sub.used - 1];
+ location_sub_content = main->parameters.array[fss_extended_write_parameter_content_e].locations_sub.array[main->parameters.array[fss_extended_write_parameter_content_e].locations_sub.used - 1];
if (location_object > location_content || location_object == location_content && location_sub_object > location_sub_content) {
if (main->error.verbosity != f_console_verbosity_quiet_e) {
}
}
}
- else if (main->parameters[fss_extended_write_parameter_content_e].locations.used) {
- if (main->parameters[fss_extended_write_parameter_content_e].locations.used != main->parameters[fss_extended_write_parameter_content_e].values.used) {
+ else if (main->parameters.array[fss_extended_write_parameter_content_e].locations.used) {
+ if (main->parameters.array[fss_extended_write_parameter_content_e].locations.used != main->parameters.array[fss_extended_write_parameter_content_e].values.used) {
fss_extended_write_error_parameter_value_missing_print(main, f_console_symbol_long_enable_s, fss_extended_write_long_content_s);
status = F_status_set_error(F_parameter);
}
- else if (!main->parameters[fss_extended_write_parameter_partial_e].locations.used) {
+ else if (!main->parameters.array[fss_extended_write_parameter_partial_e].locations.used) {
fss_extended_write_error_parameter_at_least_once(main);
status = F_status_set_error(F_parameter);
}
}
if (F_status_is_error_not(status) && main->process_pipe) {
- if (main->parameters[fss_extended_write_parameter_partial_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_extended_write_parameter_partial_e].result == f_console_result_found_e) {
if (main->error.verbosity != f_console_verbosity_quiet_e) {
flockfile(main->error.to.stream);
}
if (F_status_is_error_not(status)) {
- if (main->parameters[fss_extended_write_parameter_prepend_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_extended_write_parameter_prepend_e].result == f_console_result_found_e) {
if (main->error.verbosity != f_console_verbosity_quiet_e) {
flockfile(main->error.to.stream);
status = F_status_set_error(F_parameter);
}
- else if (main->parameters[fss_extended_write_parameter_prepend_e].result == f_console_result_additional_e) {
- const f_array_length_t index = main->parameters[fss_extended_write_parameter_prepend_e].values.array[main->parameters[fss_extended_write_parameter_prepend_e].values.used - 1];
+ else if (main->parameters.array[fss_extended_write_parameter_prepend_e].result == f_console_result_additional_e) {
+ const f_array_length_t index = main->parameters.array[fss_extended_write_parameter_prepend_e].values.array[main->parameters.array[fss_extended_write_parameter_prepend_e].values.used - 1];
const f_array_length_t length = strnlen(arguments->argv[index], F_console_parameter_size_d);
// Even though this standard does not utilize this parameter, provide the validation for consistency.
if (length) {
f_string_range_t range = macro_f_string_range_t_initialize(length);
- const f_string_static_t prepend = macro_f_string_static_t_initialize(arguments->argv[index], length);
+ const f_string_static_t prepend = macro_f_string_static_t_initialize2(arguments->argv[index], length);
for (; range.start < length; ++range.start) {
}
if (F_status_is_error_not(status)) {
- if (main->parameters[fss_extended_write_parameter_ignore_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_extended_write_parameter_ignore_e].result == f_console_result_found_e) {
if (main->error.verbosity != f_console_verbosity_quiet_e) {
flockfile(main->error.to.stream);
status = F_status_set_error(F_parameter);
}
- else if (main->parameters[fss_extended_write_parameter_ignore_e].result == f_console_result_additional_e) {
- const f_array_length_t total_locations = main->parameters[fss_extended_write_parameter_ignore_e].locations.used;
- const f_array_length_t total_arguments = main->parameters[fss_extended_write_parameter_ignore_e].values.used;
+ else if (main->parameters.array[fss_extended_write_parameter_ignore_e].result == f_console_result_additional_e) {
+ const f_array_length_t total_locations = main->parameters.array[fss_extended_write_parameter_ignore_e].locations.used;
+ const f_array_length_t total_arguments = main->parameters.array[fss_extended_write_parameter_ignore_e].values.used;
if (total_locations * 2 > total_arguments) {
flockfile(main->error.to.stream);
f_fss_quote_t quote = F_fss_delimit_quote_double_s;
if (F_status_is_error_not(status)) {
- if (main->parameters[fss_extended_write_parameter_double_e].result == f_console_result_found_e) {
- if (main->parameters[fss_extended_write_parameter_single_e].result == f_console_result_found_e) {
- if (main->parameters[fss_extended_write_parameter_double_e].location < main->parameters[fss_extended_write_parameter_single_e].location) {
+ if (main->parameters.array[fss_extended_write_parameter_double_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_extended_write_parameter_single_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_extended_write_parameter_double_e].location < main->parameters.array[fss_extended_write_parameter_single_e].location) {
quote = F_fss_delimit_quote_single_s;
}
}
}
- else if (main->parameters[fss_extended_write_parameter_single_e].result == f_console_result_found_e) {
+ else if (main->parameters.array[fss_extended_write_parameter_single_e].result == f_console_result_found_e) {
quote = F_fss_delimit_quote_single_s;
}
}
}
if (F_status_is_error_not(status)) {
- if (main->parameters[fss_extended_write_parameter_partial_e].result == f_console_result_found_e) {
- if (main->parameters[fss_extended_write_parameter_object_e].result == f_console_result_additional_e) {
+ if (main->parameters.array[fss_extended_write_parameter_partial_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_extended_write_parameter_object_e].result == f_console_result_additional_e) {
contents.used = 0;
uint16_t signal_check = 0;
- for (f_array_length_t i = 0; i < main->parameters[fss_extended_write_parameter_object_e].values.used; ++i) {
+ for (f_array_length_t i = 0; i < main->parameters.array[fss_extended_write_parameter_object_e].values.used; ++i) {
if (!((++signal_check) % fss_extended_write_signal_check_d)) {
if (fss_extended_write_signal_received(main)) {
signal_check = 0;
}
- object.string = arguments->argv[main->parameters[fss_extended_write_parameter_object_e].values.array[i]];
+ object.string = arguments->argv[main->parameters.array[fss_extended_write_parameter_object_e].values.array[i]];
object.used = strnlen(object.string, F_console_parameter_size_d);
object.size = object.used;
else {
object.used = 0;
- status = f_string_dynamics_increase_by(main->parameters[fss_extended_write_parameter_content_e].values.used, &contents);
+ status = f_string_dynamics_increase_by(main->parameters.array[fss_extended_write_parameter_content_e].values.used, &contents);
if (status == F_array_too_large) {
status = F_status_set_error(status);
else {
f_array_length_t i = 0;
- for (; i < main->parameters[fss_extended_write_parameter_content_e].values.used; ++i) {
+ for (; i < main->parameters.array[fss_extended_write_parameter_content_e].values.used; ++i) {
- contents.array[contents.used].string = arguments->argv[main->parameters[fss_extended_write_parameter_content_e].values.array[i]];
+ contents.array[contents.used].string = arguments->argv[main->parameters.array[fss_extended_write_parameter_content_e].values.array[i]];
contents.array[contents.used].used = strnlen(contents.array[contents.used].string, F_console_parameter_size_d);
contents.array[contents.used].size = contents.array[contents.used].used;
++contents.used;
status = fss_extended_write_process(main, output, quote, 0, &contents, &buffer);
// clear the contents array of the static strings to avoid deallocation attempts on static variables.
- for (; i < main->parameters[fss_extended_write_parameter_content_e].values.used; ++i) {
+ for (; i < main->parameters.array[fss_extended_write_parameter_content_e].values.used; ++i) {
contents.array[contents.used].string = 0;
contents.array[contents.used].used = 0;
contents.array[contents.used].size = 0;
f_array_length_t object_next = 0;
f_array_length_t content_current = 0;
- for (uint16_t signal_check = 0; i < main->parameters[fss_extended_write_parameter_object_e].values.used; ++i) {
+ for (uint16_t signal_check = 0; i < main->parameters.array[fss_extended_write_parameter_object_e].values.used; ++i) {
if (!((++signal_check) % fss_extended_write_signal_check_d)) {
if (fss_extended_write_signal_received(main)) {
signal_check = 0;
}
- object_current = main->parameters[fss_extended_write_parameter_object_e].locations.array[i];
+ object_current = main->parameters.array[fss_extended_write_parameter_object_e].locations.array[i];
- if (i + 1 < main->parameters[fss_extended_write_parameter_object_e].values.used) {
- object_next = main->parameters[fss_extended_write_parameter_object_e].locations.array[i + 1];
+ if (i + 1 < main->parameters.array[fss_extended_write_parameter_object_e].values.used) {
+ object_next = main->parameters.array[fss_extended_write_parameter_object_e].locations.array[i + 1];
}
- object.string = arguments->argv[main->parameters[fss_extended_write_parameter_object_e].values.array[i]];
+ object.string = arguments->argv[main->parameters.array[fss_extended_write_parameter_object_e].values.array[i]];
object.used = strnlen(object.string, F_console_parameter_size_d);
object.size = object.used;
contents.used = 0;
- for (; j < main->parameters[fss_extended_write_parameter_content_e].values.used; ++j) {
+ for (; j < main->parameters.array[fss_extended_write_parameter_content_e].values.used; ++j) {
- content_current = main->parameters[fss_extended_write_parameter_content_e].locations.array[j];
+ content_current = main->parameters.array[fss_extended_write_parameter_content_e].locations.array[j];
- if (i + 1 < main->parameters[fss_extended_write_parameter_object_e].values.used) {
+ if (i + 1 < main->parameters.array[fss_extended_write_parameter_object_e].values.used) {
if (content_current < object_current || content_current > object_next) break;
}
contents.array[contents.used].used = 0;
}
- status = f_string_append(arguments->argv[main->parameters[fss_extended_write_parameter_content_e].values.array[j]], strnlen(arguments->argv[main->parameters[fss_extended_write_parameter_content_e].values.array[j]], F_console_parameter_size_d), &contents.array[contents.used]);
+ status = f_string_append(arguments->argv[main->parameters.array[fss_extended_write_parameter_content_e].values.array[j]], strnlen(arguments->argv[main->parameters.array[fss_extended_write_parameter_content_e].values.array[j]], F_console_parameter_size_d), &contents.array[contents.used]);
if (F_status_is_error(status)) {
fll_error_print(main->error, F_status_set_fine(status), "f_string_append", F_true);
funlockfile(main->error.to.stream);
}
}
- else if (main->error.verbosity != f_console_verbosity_quiet_e && main->parameters[fss_extended_write_parameter_file_e].result == f_console_result_none_e) {
+ else if (main->error.verbosity != f_console_verbosity_quiet_e && main->parameters.array[fss_extended_write_parameter_file_e].result == f_console_result_none_e) {
// Ensure there is always a newline at the end, unless in quiet mode.
fll_print_dynamic(f_string_eol_s, main->output.to.stream);
contents.used = 0;
}
- if (main->parameters[fss_extended_write_parameter_file_e].result == f_console_result_additional_e) {
+ if (main->parameters.array[fss_extended_write_parameter_file_e].result == f_console_result_additional_e) {
if (output.id != -1) {
f_file_stream_close(F_true, &output);
}
#ifndef _di_fss_extended_write_main_delete_
f_status_t fss_extended_write_main_delete(fss_extended_write_main_t * const main) {
- for (f_array_length_t i = 0; i < fss_extended_write_total_parameters_d; ++i) {
-
- f_type_array_lengths_resize(0, &main->parameters[i].locations);
- f_type_array_lengths_resize(0, &main->parameters[i].locations_sub);
- f_type_array_lengths_resize(0, &main->parameters[i].values);
- } // for
+ f_console_parameters_delete(&main->parameters);
f_type_array_lengths_resize(0, &main->remaining);
#ifndef _di_fss_extended_write_main_t_
typedef struct {
- f_console_parameter_t parameters[fss_extended_write_total_parameters_d];
+ f_console_parameters_t parameters;
f_array_lengths_t remaining;
bool process_pipe;
#define fss_extended_write_main_t_initialize \
{ \
- fss_extended_write_console_parameter_t_initialize, \
+ f_console_parameters_t_initialize, \
f_array_lengths_t_initialize, \
F_false, \
fl_print_t_initialize, \
}
if (contents && contents->used) {
- if (main->parameters[fss_extended_write_parameter_trim_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_extended_write_parameter_trim_e].result == f_console_result_found_e) {
complete = f_fss_complete_full_trim_e;
}
else {
#endif
#ifndef _di_fss_identify_program_version_
- const f_string_static_t fss_identify_program_version_s = macro_f_string_static_t_initialize2(FSS_IDENTIFY_program_version_s, 0, FSS_IDENTIFY_program_version_s_length);
+ const f_string_static_t fss_identify_program_version_s = macro_f_string_static_t_initialize(FSS_IDENTIFY_program_version_s, 0, FSS_IDENTIFY_program_version_s_length);
#endif // _di_fss_identify_program_version_
#ifndef _di_fss_identify_program_name_
- const f_string_static_t fss_identify_program_name_s = macro_f_string_static_t_initialize2(FSS_IDENTIFY_program_name_s, 0, FSS_IDENTIFY_program_name_s_length);
- const f_string_static_t fss_identify_program_name_long_s = macro_f_string_static_t_initialize2(FSS_IDENTIFY_program_name_long_s, 0, FSS_IDENTIFY_program_name_long_s_length);
+ const f_string_static_t fss_identify_program_name_s = macro_f_string_static_t_initialize(FSS_IDENTIFY_program_name_s, 0, FSS_IDENTIFY_program_name_s_length);
+ const f_string_static_t fss_identify_program_name_long_s = macro_f_string_static_t_initialize(FSS_IDENTIFY_program_name_long_s, 0, FSS_IDENTIFY_program_name_long_s_length);
#endif // _di_fss_identify_program_name_
#ifndef _di_fss_identify_print_help_
f_status_t status = F_none;
+ f_console_parameter_t parameters[] = fss_identify_console_parameter_t_initialize;
+ main->parameters.array = parameters;
+ main->parameters.used = fss_identify_total_parameters_d;
+
{
- const f_console_parameters_t parameters = macro_f_console_parameters_t_initialize(main->parameters, fss_identify_total_parameters_d);
+ f_console_parameter_id_t ids[3] = { fss_identify_parameter_no_color_e, fss_identify_parameter_light_e, fss_identify_parameter_dark_e };
+ const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 3);
- {
- f_console_parameter_id_t ids[3] = { fss_identify_parameter_no_color_e, fss_identify_parameter_light_e, fss_identify_parameter_dark_e };
- const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 3);
+ status = fll_program_parameter_process(*arguments, &main->parameters, choices, F_true, &main->remaining, &main->context);
- status = fll_program_parameter_process(*arguments, parameters, choices, F_true, &main->remaining, &main->context);
+ main->output.set = &main->context.set;
+ main->error.set = &main->context.set;
+ main->warning.set = &main->context.set;
- main->output.set = &main->context.set;
- main->error.set = &main->context.set;
- main->warning.set = &main->context.set;
+ if (main->context.set.error.before) {
+ main->output.context = f_color_set_empty_s;
+ main->output.notable = main->context.set.notable;
- if (main->context.set.error.before) {
- main->output.context = f_color_set_empty_s;
- main->output.notable = main->context.set.notable;
+ main->error.context = main->context.set.error;
+ main->error.notable = main->context.set.notable;
- main->error.context = main->context.set.error;
- main->error.notable = main->context.set.notable;
+ main->warning.context = main->context.set.warning;
+ main->warning.notable = main->context.set.notable;
+ }
+ else {
+ f_color_set_t *sets[] = { &main->output.context, &main->output.notable, &main->error.context, &main->error.notable, &main->warning.context, &main->warning.notable, 0 };
- main->warning.context = main->context.set.warning;
- main->warning.notable = main->context.set.notable;
- }
- else {
- f_color_set_t *sets[] = { &main->output.context, &main->output.notable, &main->error.context, &main->error.notable, &main->warning.context, &main->warning.notable, 0 };
+ fll_program_parameter_process_empty(&main->context, sets);
+ }
- fll_program_parameter_process_empty(&main->context, sets);
+ if (F_status_is_error(status)) {
+ if (main->error.verbosity != f_console_verbosity_quiet_e) {
+ fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process", F_true);
+ fll_print_dynamic(f_string_eol_s, main->error.to.stream);
}
- if (F_status_is_error(status)) {
- if (main->error.verbosity != f_console_verbosity_quiet_e) {
- fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process", F_true);
- fll_print_dynamic(f_string_eol_s, main->error.to.stream);
- }
-
- fss_identify_main_delete(main);
+ fss_identify_main_delete(main);
- return F_status_set_error(status);
- }
+ return F_status_set_error(status);
}
+ }
- // Identify priority of verbosity related parameters.
- {
- f_console_parameter_id_t ids[4] = { fss_identify_parameter_verbosity_quiet_e, fss_identify_parameter_verbosity_normal_e, fss_identify_parameter_verbosity_verbose_e, fss_identify_parameter_verbosity_debug_e };
- f_console_parameter_id_t choice = 0;
- const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 4);
-
- status = f_console_parameter_prioritize_right(parameters, choices, &choice);
+ // Identify priority of verbosity related parameters.
+ {
+ f_console_parameter_id_t ids[4] = { fss_identify_parameter_verbosity_quiet_e, fss_identify_parameter_verbosity_normal_e, fss_identify_parameter_verbosity_verbose_e, fss_identify_parameter_verbosity_debug_e };
+ f_console_parameter_id_t choice = 0;
+ const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 4);
- if (F_status_is_error(status)) {
- fss_identify_main_delete(main);
+ status = f_console_parameter_prioritize_right(main->parameters, choices, &choice);
- return status;
- }
+ if (F_status_is_error(status)) {
+ fss_identify_main_delete(main);
- if (choice == fss_identify_parameter_verbosity_quiet_e) {
- main->output.verbosity = f_console_verbosity_quiet_e;
- main->error.verbosity = f_console_verbosity_quiet_e;
- main->warning.verbosity = f_console_verbosity_quiet_e;
- }
- else if (choice == fss_identify_parameter_verbosity_normal_e) {
- main->output.verbosity = f_console_verbosity_normal_e;
- main->error.verbosity = f_console_verbosity_normal_e;
- main->warning.verbosity = f_console_verbosity_normal_e;
- }
- else if (choice == fss_identify_parameter_verbosity_verbose_e) {
- main->output.verbosity = f_console_verbosity_verbose_e;
- main->error.verbosity = f_console_verbosity_verbose_e;
- main->warning.verbosity = f_console_verbosity_verbose_e;
- }
- else if (choice == fss_identify_parameter_verbosity_debug_e) {
- main->output.verbosity = f_console_verbosity_debug_e;
- main->error.verbosity = f_console_verbosity_debug_e;
- main->warning.verbosity = f_console_verbosity_debug_e;
- }
+ return status;
}
- status = F_none;
+ if (choice == fss_identify_parameter_verbosity_quiet_e) {
+ main->output.verbosity = f_console_verbosity_quiet_e;
+ main->error.verbosity = f_console_verbosity_quiet_e;
+ main->warning.verbosity = f_console_verbosity_quiet_e;
+ }
+ else if (choice == fss_identify_parameter_verbosity_normal_e) {
+ main->output.verbosity = f_console_verbosity_normal_e;
+ main->error.verbosity = f_console_verbosity_normal_e;
+ main->warning.verbosity = f_console_verbosity_normal_e;
+ }
+ else if (choice == fss_identify_parameter_verbosity_verbose_e) {
+ main->output.verbosity = f_console_verbosity_verbose_e;
+ main->error.verbosity = f_console_verbosity_verbose_e;
+ main->warning.verbosity = f_console_verbosity_verbose_e;
+ }
+ else if (choice == fss_identify_parameter_verbosity_debug_e) {
+ main->output.verbosity = f_console_verbosity_debug_e;
+ main->error.verbosity = f_console_verbosity_debug_e;
+ main->warning.verbosity = f_console_verbosity_debug_e;
+ }
}
- if (main->parameters[fss_identify_parameter_help_e].result == f_console_result_found_e) {
+ f_string_static_t * const argv = main->parameters.arguments.array;
+
+ status = F_none;
+
+ if (main->parameters.array[fss_identify_parameter_help_e].result == f_console_result_found_e) {
fss_identify_print_help(main->output.to, main->context);
fss_identify_main_delete(main);
return F_none;
}
- if (main->parameters[fss_identify_parameter_version_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_identify_parameter_version_e].result == f_console_result_found_e) {
fll_program_print_version(main->output.to, fss_identify_program_version);
fss_identify_main_delete(main);
fss_identify_data_t data = fss_identify_data_t_initialize;
if (F_status_is_error_not(status)) {
- if (main->parameters[fss_identify_parameter_line_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_identify_parameter_line_e].result == f_console_result_found_e) {
flockfile(main->error.to.stream);
fl_print_format("%q%[%QThe parameter '%]", main->error.to.stream, f_string_eol_s, main->error.context, main->error.prefix, main->error.context);
status = F_status_set_error(F_parameter);
}
- else if (main->parameters[fss_identify_parameter_line_e].result == f_console_result_additional_e) {
- const f_array_length_t index = main->parameters[fss_identify_parameter_line_e].values.array[main->parameters[fss_identify_parameter_line_e].values.used - 1];
+ else if (main->parameters.array[fss_identify_parameter_line_e].result == f_console_result_additional_e) {
+ const f_array_length_t index = main->parameters.array[fss_identify_parameter_line_e].values.array[main->parameters.array[fss_identify_parameter_line_e].values.used - 1];
const f_string_range_t range = macro_f_string_range_t_initialize(strnlen(arguments->argv[index], F_console_parameter_size_d));
status = fl_conversion_string_to_number_unsigned(arguments->argv[index], range, &data.line);
}
}
- if (F_status_is_error_not(status) && main->parameters[fss_identify_parameter_total_e].result == f_console_result_found_e) {
- if (main->parameters[fss_identify_parameter_object_e].result == f_console_result_found_e) {
+ if (F_status_is_error_not(status) && main->parameters.array[fss_identify_parameter_total_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_identify_parameter_object_e].result == f_console_result_found_e) {
flockfile(main->error.to.stream);
fl_print_format("%q%[%QCannot specify the '%]", main->error.to.stream, f_string_eol_s, main->error.context, main->error.prefix, main->error.context);
status = F_status_set_error(F_parameter);
}
- else if (main->parameters[fss_identify_parameter_content_e].result == f_console_result_found_e) {
+ else if (main->parameters.array[fss_identify_parameter_content_e].result == f_console_result_found_e) {
flockfile(main->error.to.stream);
fl_print_format("%q%[%QCannot specify the '%]", main->error.to.stream, f_string_eol_s, main->error.context, main->error.prefix, main->error.context);
}
if (F_status_is_error_not(status)) {
- if (main->parameters[fss_identify_parameter_name_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_identify_parameter_name_e].result == f_console_result_found_e) {
flockfile(main->error.to.stream);
fl_print_format("%q%[%QThe parameter '%]", main->error.to.stream, f_string_eol_s, main->error.context, main->error.prefix, main->error.context);
status = F_status_set_error(F_parameter);
}
- else if (main->parameters[fss_identify_parameter_name_e].result == f_console_result_additional_e) {
- const f_array_length_t index = main->parameters[fss_identify_parameter_name_e].values.array[main->parameters[fss_identify_parameter_name_e].values.used - 1];
+ else if (main->parameters.array[fss_identify_parameter_name_e].result == f_console_result_additional_e) {
+ const f_array_length_t index = main->parameters.array[fss_identify_parameter_name_e].values.array[main->parameters.array[fss_identify_parameter_name_e].values.used - 1];
const f_array_length_t length = strnlen(arguments->argv[index], F_console_parameter_size_d);
const f_string_range_t range = macro_f_string_range_t_initialize(length);
signal_check = 0;
}
- if (main->parameters[fss_identify_parameter_line_e].result == f_console_result_additional_e) {
+ if (main->parameters.array[fss_identify_parameter_line_e].result == f_console_result_additional_e) {
if (data.current > data.line) break;
}
status = f_file_stream_open(arguments->argv[main->remaining.array[i]], 0, &file);
if (F_status_is_error(status)) {
- fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_open", F_true, arguments->argv[main->remaining.array[i]], "open", fll_error_file_type_file_e);
+ fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_open", F_true, arguments->argv[main->remaining.array[i]], f_file_operation_open_s, fll_error_file_type_file_e);
}
else {
status = fss_identify_load_line(main, file, arguments->argv[main->remaining.array[i]], &buffer, &range);
f_string_dynamic_resize(0, &buffer);
if (F_status_is_error_not(status)) {
- if (main->parameters[fss_identify_parameter_total_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_identify_parameter_total_e].result == f_console_result_found_e) {
fll_print_format("%ul%q", main->output.to.stream, data.total, f_string_eol_s);
}
}
#ifndef _di_fss_identify_main_delete_
f_status_t fss_identify_main_delete(fss_identify_main_t * const main) {
- for (f_array_length_t i = 0; i < fss_identify_total_parameters_d; ++i) {
-
- f_type_array_lengths_resize(0, &main->parameters[i].locations);
- f_type_array_lengths_resize(0, &main->parameters[i].locations_sub);
- f_type_array_lengths_resize(0, &main->parameters[i].values);
- } // for
+ f_console_parameters_delete(&main->parameters);
f_type_array_lengths_resize(0, &main->remaining);
#ifndef _di_fss_identify_data_t_
typedef struct {
- f_console_parameter_t parameters[fss_identify_total_parameters_d];
+ f_console_parameters_t parameters;
f_array_lengths_t remaining;
bool process_pipe;
#define fss_identify_data_initialize \
{ \
- fss_identify_console_parameter_t_initialize, \
+ f_console_parameters_t_initialize, \
f_array_lengths_t_initialize, \
F_false, \
fl_print_t_initialize, \
return status;
}
- if (main->parameters[fss_identify_parameter_line_e].result == f_console_result_additional_e) {
+ if (main->parameters.array[fss_identify_parameter_line_e].result == f_console_result_additional_e) {
for (f_array_length_t i = 0; i < ids.used; ++i, ++data->current) {
}
}
- if (main->parameters[fss_identify_parameter_total_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_identify_parameter_total_e].result == f_console_result_found_e) {
++data->total;
}
else {
}
} // for
}
- else if (main->parameters[fss_identify_parameter_total_e].result == f_console_result_found_e) {
+ else if (main->parameters.array[fss_identify_parameter_total_e].result == f_console_result_found_e) {
if (data->name.used) {
for (f_array_length_t i = 0; i < ids.used; ++i, ++data->current) {
flockfile(main->output.to.stream);
- if (main->parameters[fss_identify_parameter_object_e].result == f_console_result_found_e || main->parameters[fss_identify_parameter_content_e].result != f_console_result_found_e) {
+ if (main->parameters.array[fss_identify_parameter_object_e].result == f_console_result_found_e || main->parameters.array[fss_identify_parameter_content_e].result != f_console_result_found_e) {
f_print(id.name, id.used, main->output.to.stream);
- if (main->parameters[fss_identify_parameter_object_e].result != f_console_result_found_e || main->parameters[fss_identify_parameter_content_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_identify_parameter_object_e].result != f_console_result_found_e || main->parameters.array[fss_identify_parameter_content_e].result == f_console_result_found_e) {
f_print_terminated(f_fss_type_header_part5_s, main->output.to.stream);
}
}
- if (main->parameters[fss_identify_parameter_object_e].result != f_console_result_found_e || main->parameters[fss_identify_parameter_content_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_identify_parameter_object_e].result != f_console_result_found_e || main->parameters.array[fss_identify_parameter_content_e].result == f_console_result_found_e) {
fl_print_format("%04_ui", main->output.to.stream, id.type);
}
#endif
#ifndef _di_fss_payload_read_program_version_
- const f_string_static_t fss_payload_read_program_version_s = macro_f_string_static_t_initialize2(FSS_PAYLOAD_READ_program_version_s, 0, FSS_PAYLOAD_READ_program_version_s_length);
+ const f_string_static_t fss_payload_read_program_version_s = macro_f_string_static_t_initialize(FSS_PAYLOAD_READ_program_version_s, 0, FSS_PAYLOAD_READ_program_version_s_length);
#endif // _di_fss_payload_read_program_version_
#ifndef _di_fss_payload_read_program_name_
- const f_string_static_t fss_payload_read_program_name_s = macro_f_string_static_t_initialize2(FSS_PAYLOAD_READ_program_name_s, 0, FSS_PAYLOAD_READ_program_name_s_length);
- const f_string_static_t fss_payload_read_program_name_long_s = macro_f_string_static_t_initialize2(FSS_PAYLOAD_READ_program_name_long_s, 0, FSS_PAYLOAD_READ_program_name_long_s_length);
+ const f_string_static_t fss_payload_read_program_name_s = macro_f_string_static_t_initialize(FSS_PAYLOAD_READ_program_name_s, 0, FSS_PAYLOAD_READ_program_name_s_length);
+ const f_string_static_t fss_payload_read_program_name_long_s = macro_f_string_static_t_initialize(FSS_PAYLOAD_READ_program_name_long_s, 0, FSS_PAYLOAD_READ_program_name_long_s_length);
#endif // _di_fss_payload_read_program_name_
#ifndef _di_fss_payload_read_print_help_
f_status_t status = F_none;
+ f_console_parameter_t parameters[] = fss_payload_read_console_parameter_t_initialize;
+ main->parameters.array = parameters;
+ main->parameters.used = fss_payload_read_total_parameters_d;
+
{
- const f_console_parameters_t parameters = macro_f_console_parameters_t_initialize(main->parameters, fss_payload_total_parameters_d);
+ f_console_parameter_id_t ids[3] = { fss_payload_read_parameter_no_color_e, fss_payload_read_parameter_light_e, fss_payload_read_parameter_dark_e };
+ const f_console_parameter_ids_t choices = { ids, 3 };
- {
- f_console_parameter_id_t ids[3] = { fss_payload_read_parameter_no_color_e, fss_payload_read_parameter_light_e, fss_payload_read_parameter_dark_e };
- const f_console_parameter_ids_t choices = { ids, 3 };
+ status = fll_program_parameter_process(*arguments, &main->parameters, choices, F_true, &main->remaining, &main->context);
- status = fll_program_parameter_process(*arguments, parameters, choices, F_true, &main->remaining, &main->context);
+ main->output.set = &main->context.set;
+ main->error.set = &main->context.set;
+ main->warning.set = &main->context.set;
- main->output.set = &main->context.set;
- main->error.set = &main->context.set;
- main->warning.set = &main->context.set;
+ if (main->context.set.error.before) {
+ main->output.context = f_color_set_empty_s;
+ main->output.notable = main->context.set.notable;
- if (main->context.set.error.before) {
- main->output.context = f_color_set_empty_s;
- main->output.notable = main->context.set.notable;
+ main->error.context = main->context.set.error;
+ main->error.notable = main->context.set.notable;
- main->error.context = main->context.set.error;
- main->error.notable = main->context.set.notable;
+ main->warning.context = main->context.set.warning;
+ main->warning.notable = main->context.set.notable;
+ }
+ else {
+ f_color_set_t *sets[] = { &main->output.context, &main->output.notable, &main->error.context, &main->error.notable, &main->warning.context, &main->warning.notable, 0 };
- main->warning.context = main->context.set.warning;
- main->warning.notable = main->context.set.notable;
- }
- else {
- f_color_set_t *sets[] = { &main->output.context, &main->output.notable, &main->error.context, &main->error.notable, &main->warning.context, &main->warning.notable, 0 };
+ fll_program_parameter_process_empty(&main->context, sets);
+ }
- fll_program_parameter_process_empty(&main->context, sets);
- }
+ if (F_status_is_error(status)) {
+ fss_payload_read_main_delete(main);
- if (F_status_is_error(status)) {
- fss_payload_read_main_delete(main);
-
- return F_status_set_error(status);
- }
+ return F_status_set_error(status);
}
+ }
- // Identify priority of verbosity related parameters.
- {
- f_console_parameter_id_t ids[4] = { fss_payload_read_parameter_verbosity_quiet_e, fss_payload_read_parameter_verbosity_normal_e, fss_payload_read_parameter_verbosity_verbose_e, fss_payload_read_parameter_verbosity_debug_e };
- f_console_parameter_id_t choice = 0;
- const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 4);
+ // Identify priority of verbosity related parameters.
+ {
+ f_console_parameter_id_t ids[4] = { fss_payload_read_parameter_verbosity_quiet_e, fss_payload_read_parameter_verbosity_normal_e, fss_payload_read_parameter_verbosity_verbose_e, fss_payload_read_parameter_verbosity_debug_e };
+ f_console_parameter_id_t choice = 0;
+ const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 4);
- status = f_console_parameter_prioritize_right(parameters, choices, &choice);
+ status = f_console_parameter_prioritize_right(main->parameters, choices, &choice);
- if (F_status_is_error(status)) {
- fss_payload_read_main_delete(main);
-
- return status;
- }
+ if (F_status_is_error(status)) {
+ fss_payload_read_main_delete(main);
- if (choice == fss_payload_read_parameter_verbosity_quiet_e) {
- main->output.verbosity = f_console_verbosity_quiet_e;
- main->error.verbosity = f_console_verbosity_quiet_e;
- main->warning.verbosity = f_console_verbosity_quiet_e;
- }
- else if (choice == fss_payload_read_parameter_verbosity_normal_e) {
- main->output.verbosity = f_console_verbosity_normal_e;
- main->error.verbosity = f_console_verbosity_normal_e;
- main->warning.verbosity = f_console_verbosity_normal_e;
- }
- else if (choice == fss_payload_read_parameter_verbosity_verbose_e) {
- main->output.verbosity = f_console_verbosity_verbose_e;
- main->error.verbosity = f_console_verbosity_verbose_e;
- main->warning.verbosity = f_console_verbosity_verbose_e;
- }
- else if (choice == fss_payload_read_parameter_verbosity_debug_e) {
- main->output.verbosity = f_console_verbosity_debug_e;
- main->error.verbosity = f_console_verbosity_debug_e;
- main->warning.verbosity = f_console_verbosity_debug_e;
- }
+ return status;
}
- status = F_none;
+ if (choice == fss_payload_read_parameter_verbosity_quiet_e) {
+ main->output.verbosity = f_console_verbosity_quiet_e;
+ main->error.verbosity = f_console_verbosity_quiet_e;
+ main->warning.verbosity = f_console_verbosity_quiet_e;
+ }
+ else if (choice == fss_payload_read_parameter_verbosity_normal_e) {
+ main->output.verbosity = f_console_verbosity_normal_e;
+ main->error.verbosity = f_console_verbosity_normal_e;
+ main->warning.verbosity = f_console_verbosity_normal_e;
+ }
+ else if (choice == fss_payload_read_parameter_verbosity_verbose_e) {
+ main->output.verbosity = f_console_verbosity_verbose_e;
+ main->error.verbosity = f_console_verbosity_verbose_e;
+ main->warning.verbosity = f_console_verbosity_verbose_e;
+ }
+ else if (choice == fss_payload_read_parameter_verbosity_debug_e) {
+ main->output.verbosity = f_console_verbosity_debug_e;
+ main->error.verbosity = f_console_verbosity_debug_e;
+ main->warning.verbosity = f_console_verbosity_debug_e;
+ }
}
- if (main->parameters[fss_payload_read_parameter_help_e].result == f_console_result_found_e) {
+ f_string_static_t * const argv = main->parameters.arguments.array;
+
+ status = F_none;
+
+ if (main->parameters.array[fss_payload_read_parameter_help_e].result == f_console_result_found_e) {
fss_payload_read_print_help(main->output.to, main->context);
fss_payload_read_main_delete(main);
return status;
}
- if (main->parameters[fss_payload_read_parameter_version_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_payload_read_parameter_version_e].result == f_console_result_found_e) {
fll_program_print_version(main->output.to, fss_payload_program_version_s);
fss_payload_read_main_delete(main);
for (f_array_length_t i = 0; i < 6; ++i) {
- if (main->parameters[parameter_code[i]].result == f_console_result_found_e) {
+ if (main->parameters.array[parameter_code[i]].result == f_console_result_found_e) {
flockfile(main->error.to.stream);
fl_print_format("%q%[%QThe parameter '%]", main->error.to.stream, f_string_eol_s, main->error.context, main->error.prefix, main->error.context);
} // for
}
- if (F_status_is_error_not(status) && main->parameters[fss_payload_read_parameter_columns_e].result == f_console_result_found_e) {
+ if (F_status_is_error_not(status) && main->parameters.array[fss_payload_read_parameter_columns_e].result == f_console_result_found_e) {
const f_array_length_t parameter_code[] = {
fss_payload_read_parameter_depth_e,
fss_payload_read_parameter_line_e,
for (f_array_length_t i = 0; i < 5; ++i) {
- if (main->parameters[parameter_code[i]].result == parameter_match[i]) {
+ if (main->parameters.array[parameter_code[i]].result == parameter_match[i]) {
flockfile(main->error.to.stream);
fl_print_format("%q%[%QCannot specify the '%]", main->error.to.stream, f_string_eol_s, main->error.context, main->error.prefix, main->error.context);
} // for
}
- if (F_status_is_error_not(status) && main->parameters[fss_payload_read_parameter_pipe_e].result == f_console_result_found_e) {
- if (main->parameters[fss_payload_read_parameter_total_e].result == f_console_result_found_e) {
+ if (F_status_is_error_not(status) && main->parameters.array[fss_payload_read_parameter_pipe_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_payload_read_parameter_total_e].result == f_console_result_found_e) {
flockfile(main->error.to.stream);
fl_print_format("%q%[%QCannot specify the '%]", main->error.to.stream, f_string_eol_s, main->error.context, main->error.prefix, main->error.context);
status = F_status_set_error(F_parameter);
}
- else if (main->parameters[fss_payload_read_parameter_line_e].result == f_console_result_additional_e) {
+ else if (main->parameters.array[fss_payload_read_parameter_line_e].result == f_console_result_additional_e) {
flockfile(main->error.to.stream);
fl_print_format("%q%[%QCannot specify the '%]", main->error.to.stream, f_string_eol_s, main->error.context, main->error.prefix, main->error.context);
}
}
- if (F_status_is_error_not(status) && main->parameters[fss_payload_read_parameter_delimit_e].result == f_console_result_additional_e) {
+ if (F_status_is_error_not(status) && main->parameters.array[fss_payload_read_parameter_delimit_e].result == f_console_result_additional_e) {
f_array_length_t location = 0;
f_array_length_t length = 0;
uint16_t signal_check = 0;
// Set the value to 0 to allow for detecting mode based on what is provided.
data.delimit_mode = 0;
- for (f_array_length_t i = 0; i < main->parameters[fss_payload_read_parameter_delimit_e].values.used; ++i) {
+ for (f_array_length_t i = 0; i < main->parameters.array[fss_payload_read_parameter_delimit_e].values.used; ++i) {
if (!((++signal_check) % fss_payload_read_signal_check_d)) {
if (fss_payload_read_signal_received(main)) {
signal_check = 0;
}
- location = main->parameters[fss_payload_read_parameter_delimit_e].values.array[i];
+ location = main->parameters.array[fss_payload_read_parameter_delimit_e].values.array[i];
length = strnlen(arguments->argv[location], F_console_parameter_size_d);
if (!length) {
} // for
if (data.depth_max > 1) {
- if (main->parameters[fss_payload_read_parameter_total_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_payload_read_parameter_total_e].result == f_console_result_found_e) {
fss_payload_read_print_zero(main);
}
}
}
- if (F_status_is_error_not(status) && main->parameters[fss_payload_read_parameter_select_e].result == f_console_result_found_e) {
+ if (F_status_is_error_not(status) && main->parameters.array[fss_payload_read_parameter_select_e].result == f_console_result_found_e) {
flockfile(main->error.to.stream);
fl_print_format("%q%[%QThe '%]", main->error.to.stream, f_string_eol_s, main->error.context, main->error.prefix, main->error.context);
status = f_file_stream_open(arguments->argv[main->remaining.array[i]], 0, &file);
if (F_status_is_error(status)) {
- fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_open", F_true, arguments->argv[main->remaining.array[i]], "open", fll_error_file_type_file_e);
+ fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_open", F_true, arguments->argv[main->remaining.array[i]], f_file_operation_open_s, fll_error_file_type_file_e);
break;
}
#ifndef _di_fss_payload_read_main_delete_
f_status_t fss_payload_read_main_delete(fss_payload_read_main_t * const main) {
- for (f_array_length_t i = 0; i < fss_payload_total_parameters_d; ++i) {
-
- f_type_array_lengths_resize(0, &main->parameters[i].locations);
- f_type_array_lengths_resize(0, &main->parameters[i].locations_sub);
- f_type_array_lengths_resize(0, &main->parameters[i].values);
- } // for
+ f_console_parameters_delete(&main->parameters);
f_type_array_lengths_resize(0, &main->remaining);
macro_f_color_context_t_delete_simple(main->context);
#ifndef _di_fss_payload_read_main_t_
typedef struct {
- f_console_parameter_t parameters[fss_payload_total_parameters_d];
+ f_console_parameters_t parameters;
f_array_lengths_t remaining;
bool process_pipe;
#define fss_payload_read_main_t_initialize \
{ \
- fss_payload_read_console_parameter_t_initialize, \
+ f_console_parameters_t_initialize, \
f_array_lengths_t_initialize, \
F_false, \
fl_print_t_initialize, \
#ifndef _di_fss_payload_read_print_content_end_extended_
void fss_payload_read_print_content_end_extended(fss_payload_read_main_t * const main) {
- if (main->parameters[fss_payload_read_parameter_pipe_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_payload_read_parameter_pipe_e].result == f_console_result_found_e) {
f_print_character(fss_payload_read_pipe_content_start_s, main->output.to.stream);
}
else {
#ifndef _di_fss_payload_read_print_content_ignore_
void fss_payload_read_print_content_ignore(fss_payload_read_main_t * const main) {
- if (main->parameters[fss_payload_read_parameter_pipe_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_payload_read_parameter_pipe_e].result == f_console_result_found_e) {
f_print_character(fss_payload_read_pipe_content_ignore_s, main->output.to.stream);
}
}
#ifndef _di_fss_payload_read_print_object_end_
void fss_payload_read_print_object_end(fss_payload_read_main_t * const main) {
- if (main->parameters[fss_payload_read_parameter_pipe_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_payload_read_parameter_pipe_e].result == f_console_result_found_e) {
f_print_character(fss_payload_read_pipe_content_start_s, main->output.to.stream);
}
else {
- if (main->parameters[fss_payload_read_parameter_content_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_payload_read_parameter_content_e].result == f_console_result_found_e) {
f_print_dynamic(f_fss_basic_list_open_s, main->output.to.stream);
f_print_dynamic(f_fss_basic_list_open_end_s, main->output.to.stream);
}
#ifndef _di_fss_payload_read_print_object_end_extended_
void fss_payload_read_print_object_end_extended(fss_payload_read_main_t * const main) {
- if (main->parameters[fss_payload_read_parameter_pipe_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_payload_read_parameter_pipe_e].result == f_console_result_found_e) {
f_print_character(fss_payload_read_pipe_content_end_s, main->output.to.stream);
}
else {
#ifndef _di_fss_payload_read_print_set_end_
void fss_payload_read_print_set_end(fss_payload_read_main_t * const main) {
- if (main->parameters[fss_payload_read_parameter_pipe_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_payload_read_parameter_pipe_e].result == f_console_result_found_e) {
f_print_character(fss_payload_read_pipe_content_end_s, main->output.to.stream);
}
}
#ifndef _di_fss_payload_read_print_set_end_extended_
void fss_payload_read_print_set_end_extended(fss_payload_read_main_t * const main) {
- if (main->parameters[fss_payload_read_parameter_pipe_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_payload_read_parameter_pipe_e].result == f_console_result_found_e) {
f_print_character(fss_payload_read_pipe_content_end_s, main->output.to.stream);
}
else {
{
f_array_length_t depth_size = 1;
- if (main->parameters[fss_payload_read_parameter_depth_e].result == f_console_result_additional_e) {
- depth_size = main->parameters[fss_payload_read_parameter_depth_e].values.used;
+ if (main->parameters.array[fss_payload_read_parameter_depth_e].result == f_console_result_additional_e) {
+ depth_size = main->parameters.array[fss_payload_read_parameter_depth_e].values.used;
}
if (depth_size > data->depths.size) {
macro_f_string_dynamic_t_clear(data->depths.array[i].value_name);
- if (!main->parameters[fss_payload_read_parameter_depth_e].values.used) {
+ if (!main->parameters.array[fss_payload_read_parameter_depth_e].values.used) {
position_depth = 0;
}
else {
- position_depth = main->parameters[fss_payload_read_parameter_depth_e].values.array[i];
+ position_depth = main->parameters.array[fss_payload_read_parameter_depth_e].values.array[i];
const f_string_range_t range = macro_f_string_range_t_initialize(strlen(arguments->argv[position_depth]));
}
}
- if (main->parameters[fss_payload_read_parameter_at_e].result == f_console_result_additional_e) {
- for (; position_at < main->parameters[fss_payload_read_parameter_at_e].values.used; ++position_at) {
+ if (main->parameters.array[fss_payload_read_parameter_at_e].result == f_console_result_additional_e) {
+ for (; position_at < main->parameters.array[fss_payload_read_parameter_at_e].values.used; ++position_at) {
- if (main->parameters[fss_payload_read_parameter_at_e].values.array[position_at] < position_depth) {
+ if (main->parameters.array[fss_payload_read_parameter_at_e].values.array[position_at] < position_depth) {
continue;
}
- if (i + 1 < data->depths.used && main->parameters[fss_payload_read_parameter_at_e].values.array[position_at] > main->parameters[fss_payload_read_parameter_depth_e].values.array[i + 1]) {
+ if (i + 1 < data->depths.used && main->parameters.array[fss_payload_read_parameter_at_e].values.array[position_at] > main->parameters.array[fss_payload_read_parameter_depth_e].values.array[i + 1]) {
break;
}
- data->depths.array[i].index_at = main->parameters[fss_payload_read_parameter_at_e].values.array[position_at];
+ data->depths.array[i].index_at = main->parameters.array[fss_payload_read_parameter_at_e].values.array[position_at];
const f_string_range_t range = macro_f_string_range_t_initialize(strlen(arguments->argv[data->depths.array[i].index_at]));
} // for
}
- if (main->parameters[fss_payload_read_parameter_name_e].result == f_console_result_additional_e) {
- for (; position_name < main->parameters[fss_payload_read_parameter_name_e].values.used; ++position_name) {
+ if (main->parameters.array[fss_payload_read_parameter_name_e].result == f_console_result_additional_e) {
+ for (; position_name < main->parameters.array[fss_payload_read_parameter_name_e].values.used; ++position_name) {
- if (main->parameters[fss_payload_read_parameter_name_e].values.array[position_name] < position_depth) {
+ if (main->parameters.array[fss_payload_read_parameter_name_e].values.array[position_name] < position_depth) {
continue;
}
- if (i + 1 < data->depths.used && main->parameters[fss_payload_read_parameter_name_e].values.array[position_name] > main->parameters[fss_payload_read_parameter_depth_e].values.array[i + 1]) {
+ if (i + 1 < data->depths.used && main->parameters.array[fss_payload_read_parameter_name_e].values.array[position_name] > main->parameters.array[fss_payload_read_parameter_depth_e].values.array[i + 1]) {
break;
}
- data->depths.array[i].index_name = main->parameters[fss_payload_read_parameter_name_e].values.array[position_name];
+ data->depths.array[i].index_name = main->parameters.array[fss_payload_read_parameter_name_e].values.array[position_name];
- if (main->parameters[fss_payload_read_parameter_trim_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_payload_read_parameter_trim_e].result == f_console_result_found_e) {
status = fl_string_rip(arguments->argv[data->depths.array[i].index_name], strlen(arguments->argv[data->depths.array[i].index_name]), &data->depths.array[i].value_name);
}
else {
}
if (F_status_is_error(status)) {
- fll_error_print(main->error, F_status_set_fine(status), main->parameters[fss_payload_read_parameter_trim_e].result == f_console_result_found_e ? "fl_string_rip" : "f_string_append", F_true);
+ fll_error_print(main->error, F_status_set_fine(status), main->parameters.array[fss_payload_read_parameter_trim_e].result == f_console_result_found_e ? "fl_string_rip" : "f_string_append", F_true);
return status;
}
}
}
else {
- fll_error_file_print(main->error, F_status_set_fine(status), "fll_fss_payload_read", F_true, file_name, "process", fll_error_file_type_file_e);
+ fll_error_file_print(main->error, F_status_set_fine(status), "fll_fss_payload_read", F_true, file_name, f_file_operation_process_s, fll_error_file_type_file_e);
}
return status;
if (F_status_is_error(status)) {
const f_string_t file_name = fss_payload_read_file_identify(input.start, data->files);
- fll_error_file_print(main->error, F_status_set_fine(status), "fll_fss_extended_read", F_true, file_name, "process", fll_error_file_type_file_e);
+ fll_error_file_print(main->error, F_status_set_fine(status), "fll_fss_extended_read", F_true, file_name, f_file_operation_process_s, fll_error_file_type_file_e);
return status;
}
#ifndef _di_fss_payload_read_load_number_
f_status_t fss_payload_read_load_number(fss_payload_read_main_t * const main, const f_array_length_t parameter, const f_string_t name, const f_console_arguments_t *arguments, f_number_unsigned_t *number) {
- if (main->parameters[parameter].result == f_console_result_additional_e) {
- const f_array_length_t index = main->parameters[parameter].values.array[main->parameters[parameter].values.used - 1];
+ if (main->parameters.array[parameter].result == f_console_result_additional_e) {
+ const f_array_length_t index = main->parameters.array[parameter].values.array[main->parameters.array[parameter].values.used - 1];
const f_string_range_t range = macro_f_string_range_t_initialize(strnlen(arguments->argv[index], F_console_parameter_size_d));
const f_status_t status = fl_conversion_string_to_number_unsigned(arguments->argv[index], range, number);
// This standard does not support multiple content groups, except for "headers" FSS-0001 Extended at depth 1.
if (!(data->option & fss_payload_read_data_option_extended_d)) {
if ((data->option & fss_payload_read_data_option_select_d) && data->select) {
- if (main->parameters[fss_payload_read_parameter_total_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_payload_read_parameter_total_e].result == f_console_result_found_e) {
flockfile(main->output.to.stream);
fss_payload_read_print_zero(main);
if (fl_string_dynamic_partial_compare_string(F_fss_string_header_s, data->buffer, F_fss_string_header_s_length, data->objects.array[i]) == F_equal_to) {
if (names[i]) break;
- if (main->parameters[fss_payload_read_parameter_total_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_payload_read_parameter_total_e].result == f_console_result_found_e) {
flockfile(main->output.to.stream);
fss_payload_read_print_zero(main);
f_status_t status = F_none;
- if (main->parameters[fss_payload_read_parameter_at_e].result == f_console_result_additional_e) {
+ if (main->parameters.array[fss_payload_read_parameter_at_e].result == f_console_result_additional_e) {
data->option |= fss_payload_read_data_option_at_d;
}
- if (main->parameters[fss_payload_read_parameter_columns_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_payload_read_parameter_columns_e].result == f_console_result_found_e) {
data->option |= fss_payload_read_data_option_columns_d;
}
- if (main->parameters[fss_payload_read_parameter_content_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_payload_read_parameter_content_e].result == f_console_result_found_e) {
data->option |= fss_payload_read_data_option_content_d;
}
- if (main->parameters[fss_payload_read_parameter_empty_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_payload_read_parameter_empty_e].result == f_console_result_found_e) {
data->option |= fss_payload_read_data_option_empty_d;
}
- if (main->parameters[fss_payload_read_parameter_line_e].result == f_console_result_additional_e) {
+ if (main->parameters.array[fss_payload_read_parameter_line_e].result == f_console_result_additional_e) {
data->option |= fss_payload_read_data_option_line_d;
status = fss_payload_read_load_number(main, fss_payload_read_parameter_line_e, fss_payload_read_long_line_s, arguments, &data->line);
if (F_status_is_error(status)) return status;
}
- if (main->parameters[fss_payload_read_parameter_name_e].result == f_console_result_additional_e) {
+ if (main->parameters.array[fss_payload_read_parameter_name_e].result == f_console_result_additional_e) {
data->option |= fss_payload_read_data_option_name_d;
}
- if (main->parameters[fss_payload_read_parameter_object_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_payload_read_parameter_object_e].result == f_console_result_found_e) {
data->option |= fss_payload_read_data_option_object_d;
}
- if (main->parameters[fss_payload_read_parameter_raw_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_payload_read_parameter_raw_e].result == f_console_result_found_e) {
data->option |= fss_payload_read_data_option_raw_d;
}
- if (main->parameters[fss_payload_read_parameter_select_e].result == f_console_result_additional_e) {
+ if (main->parameters.array[fss_payload_read_parameter_select_e].result == f_console_result_additional_e) {
data->option |= fss_payload_read_data_option_select_d;
status = fss_payload_read_load_number(main, fss_payload_read_parameter_select_e, fss_payload_read_long_select_s, arguments, &data->select);
if (F_status_is_error(status)) return status;
}
- if (main->parameters[fss_payload_read_parameter_total_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_payload_read_parameter_total_e].result == f_console_result_found_e) {
data->option |= fss_payload_read_data_option_total_d;
}
- if (main->parameters[fss_payload_read_parameter_trim_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_payload_read_parameter_trim_e].result == f_console_result_found_e) {
data->option |= fss_payload_read_data_option_trim_d;
}
#endif
#ifndef _di_fss_payload_write_program_version_
- const f_string_static_t fss_payload_write_program_version_s = macro_f_string_static_t_initialize2(FSS_PAYLOAD_WRITE_program_version_s, 0, FSS_PAYLOAD_WRITE_program_version_s_length);
+ const f_string_static_t fss_payload_write_program_version_s = macro_f_string_static_t_initialize(FSS_PAYLOAD_WRITE_program_version_s, 0, FSS_PAYLOAD_WRITE_program_version_s_length);
#endif // _di_fss_payload_write_program_version_
#ifndef _di_fss_payload_write_program_name_
- const f_string_static_t fss_payload_write_program_name_s = macro_f_string_static_t_initialize2(FSS_PAYLOAD_WRITE_program_name_s, 0, FSS_PAYLOAD_WRITE_program_name_s_length);
- const f_string_static_t fss_payload_write_program_name_long_s = macro_f_string_static_t_initialize2(FSS_PAYLOAD_WRITE_program_name_long_s, 0, FSS_PAYLOAD_WRITE_program_name_long_s_length);
+ const f_string_static_t fss_payload_write_program_name_s = macro_f_string_static_t_initialize(FSS_PAYLOAD_WRITE_program_name_s, 0, FSS_PAYLOAD_WRITE_program_name_s_length);
+ const f_string_static_t fss_payload_write_program_name_long_s = macro_f_string_static_t_initialize(FSS_PAYLOAD_WRITE_program_name_long_s, 0, FSS_PAYLOAD_WRITE_program_name_long_s_length);
#endif // _di_fss_payload_write_program_name_
#ifndef _di_fss_payload_write_print_help_
f_status_t status = F_none;
- {
- const f_console_parameters_t parameters = macro_f_console_parameters_t_initialize(main->parameters, fss_payload_write_total_parameters_d);
+ f_console_parameter_t parameters[] = fss_payload_write_console_parameter_t_initialize;
+ main->parameters.array = parameters;
+ main->parameters.used = fss_payload_write_total_parameters_d;
- {
- f_console_parameter_id_t ids[3] = { fss_payload_write_parameter_no_color_e, fss_payload_write_parameter_light_e, fss_payload_write_parameter_dark_e };
- const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 3);
+ {
+ f_console_parameter_id_t ids[3] = { fss_payload_write_parameter_no_color_e, fss_payload_write_parameter_light_e, fss_payload_write_parameter_dark_e };
+ const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 3);
- status = fll_program_parameter_process(*arguments, parameters, choices, F_true, &main->remaining, &main->context);
+ status = fll_program_parameter_process(*arguments, &main->parameters, choices, F_true, &main->remaining, &main->context);
- main->output.set = &main->context.set;
- main->error.set = &main->context.set;
- main->warning.set = &main->context.set;
+ main->output.set = &main->context.set;
+ main->error.set = &main->context.set;
+ main->warning.set = &main->context.set;
- if (main->context.set.error.before) {
- main->output.context = f_color_set_empty_s;
- main->output.notable = main->context.set.notable;
+ if (main->context.set.error.before) {
+ main->output.context = f_color_set_empty_s;
+ main->output.notable = main->context.set.notable;
- main->error.context = main->context.set.error;
- main->error.notable = main->context.set.notable;
+ main->error.context = main->context.set.error;
+ main->error.notable = main->context.set.notable;
- main->warning.context = main->context.set.warning;
- main->warning.notable = main->context.set.notable;
- }
- else {
- f_color_set_t *sets[] = { &main->output.context, &main->output.notable, &main->error.context, &main->error.notable, &main->warning.context, &main->warning.notable, 0 };
+ main->warning.context = main->context.set.warning;
+ main->warning.notable = main->context.set.notable;
+ }
+ else {
+ f_color_set_t *sets[] = { &main->output.context, &main->output.notable, &main->error.context, &main->error.notable, &main->warning.context, &main->warning.notable, 0 };
- fll_program_parameter_process_empty(&main->context, sets);
- }
+ fll_program_parameter_process_empty(&main->context, sets);
+ }
- if (F_status_is_error(status)) {
- fss_payload_write_main_delete(main);
- return F_status_set_error(status);
- }
+ if (F_status_is_error(status)) {
+ fss_payload_write_main_delete(main);
+ return F_status_set_error(status);
}
+ }
- // Identify priority of verbosity related parameters.
- {
- f_console_parameter_id_t ids[4] = { fss_payload_write_parameter_verbosity_quiet_e, fss_payload_write_parameter_verbosity_normal_e, fss_payload_write_parameter_verbosity_verbose_e, fss_payload_write_parameter_verbosity_debug_e };
- f_console_parameter_id_t choice = 0;
- const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 4);
+ // Identify priority of verbosity related parameters.
+ {
+ f_console_parameter_id_t ids[4] = { fss_payload_write_parameter_verbosity_quiet_e, fss_payload_write_parameter_verbosity_normal_e, fss_payload_write_parameter_verbosity_verbose_e, fss_payload_write_parameter_verbosity_debug_e };
+ f_console_parameter_id_t choice = 0;
+ const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 4);
- status = f_console_parameter_prioritize_right(parameters, choices, &choice);
+ status = f_console_parameter_prioritize_right(main->parameters, choices, &choice);
- if (F_status_is_error(status)) {
- fss_payload_write_main_delete(main);
- return status;
- }
-
- if (choice == fss_payload_write_parameter_verbosity_quiet_e) {
- main->output.verbosity = f_console_verbosity_quiet_e;
- main->error.verbosity = f_console_verbosity_quiet_e;
- main->warning.verbosity = f_console_verbosity_quiet_e;
- }
- else if (choice == fss_payload_write_parameter_verbosity_normal_e) {
- main->output.verbosity = f_console_verbosity_normal_e;
- main->error.verbosity = f_console_verbosity_normal_e;
- main->warning.verbosity = f_console_verbosity_normal_e;
- }
- else if (choice == fss_payload_write_parameter_verbosity_verbose_e) {
- main->output.verbosity = f_console_verbosity_verbose_e;
- main->error.verbosity = f_console_verbosity_verbose_e;
- main->warning.verbosity = f_console_verbosity_verbose_e;
- }
- else if (choice == fss_payload_write_parameter_verbosity_debug_e) {
- main->output.verbosity = f_console_verbosity_debug_e;
- main->error.verbosity = f_console_verbosity_debug_e;
- main->warning.verbosity = f_console_verbosity_debug_e;
- }
+ if (F_status_is_error(status)) {
+ fss_payload_write_main_delete(main);
+ return status;
}
- status = F_none;
+ if (choice == fss_payload_write_parameter_verbosity_quiet_e) {
+ main->output.verbosity = f_console_verbosity_quiet_e;
+ main->error.verbosity = f_console_verbosity_quiet_e;
+ main->warning.verbosity = f_console_verbosity_quiet_e;
+ }
+ else if (choice == fss_payload_write_parameter_verbosity_normal_e) {
+ main->output.verbosity = f_console_verbosity_normal_e;
+ main->error.verbosity = f_console_verbosity_normal_e;
+ main->warning.verbosity = f_console_verbosity_normal_e;
+ }
+ else if (choice == fss_payload_write_parameter_verbosity_verbose_e) {
+ main->output.verbosity = f_console_verbosity_verbose_e;
+ main->error.verbosity = f_console_verbosity_verbose_e;
+ main->warning.verbosity = f_console_verbosity_verbose_e;
+ }
+ else if (choice == fss_payload_write_parameter_verbosity_debug_e) {
+ main->output.verbosity = f_console_verbosity_debug_e;
+ main->error.verbosity = f_console_verbosity_debug_e;
+ main->warning.verbosity = f_console_verbosity_debug_e;
+ }
}
- if (main->parameters[fss_payload_write_parameter_help_e].result == f_console_result_found_e) {
+ f_string_static_t * const argv = main->parameters.arguments.array;
+
+ status = F_none;
+
+ if (main->parameters.array[fss_payload_write_parameter_help_e].result == f_console_result_found_e) {
fss_payload_write_print_help(main->output.to, main->context);
fss_payload_write_main_delete(main);
return status;
}
- if (main->parameters[fss_payload_write_parameter_version_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_payload_write_parameter_version_e].result == f_console_result_found_e) {
fll_program_print_version(main->output.to, fss_payload_write_program_version_s);
fss_payload_write_main_delete(main);
output.size_write = main->output.to.size_write;
if (F_status_is_error_not(status)) {
- if (main->parameters[fss_payload_write_parameter_file_e].result == f_console_result_additional_e) {
- if (main->parameters[fss_payload_write_parameter_file_e].values.used > 1) {
+ if (main->parameters.array[fss_payload_write_parameter_file_e].result == f_console_result_additional_e) {
+ if (main->parameters.array[fss_payload_write_parameter_file_e].values.used > 1) {
if (main->error.verbosity != f_console_verbosity_quiet_e) {
flockfile(main->error.to.stream);
status = F_status_set_error(F_parameter);
}
else {
- const f_array_length_t location = main->parameters[fss_payload_write_parameter_file_e].values.array[0];
+ const f_array_length_t location = main->parameters.array[fss_payload_write_parameter_file_e].values.array[0];
output.id = -1;
output.stream = 0;
status = f_file_stream_open(arguments->argv[location], 0, &output);
if (F_status_is_error(status)) {
- fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_open", F_true, arguments->argv[location], "open", fll_error_file_type_file_e);
+ fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_open", F_true, arguments->argv[location], f_file_operation_open_s, fll_error_file_type_file_e);
}
}
}
- else if (main->parameters[fss_payload_write_parameter_file_e].result == f_console_result_found_e) {
+ else if (main->parameters.array[fss_payload_write_parameter_file_e].result == f_console_result_found_e) {
fss_payload_write_error_parameter_value_missing_print(main, f_console_symbol_long_enable_s, fss_payload_write_long_file_s);
status = F_status_set_error(F_parameter);
}
}
if (F_status_is_error_not(status)) {
- if (main->parameters[fss_payload_write_parameter_object_e].locations.used || main->parameters[fss_payload_write_parameter_content_e].locations.used) {
- if (main->parameters[fss_payload_write_parameter_object_e].locations.used) {
- if (main->parameters[fss_payload_write_parameter_object_e].locations.used != main->parameters[fss_payload_write_parameter_object_e].values.used) {
+ if (main->parameters.array[fss_payload_write_parameter_object_e].locations.used || main->parameters.array[fss_payload_write_parameter_content_e].locations.used) {
+ if (main->parameters.array[fss_payload_write_parameter_object_e].locations.used) {
+ if (main->parameters.array[fss_payload_write_parameter_object_e].locations.used != main->parameters.array[fss_payload_write_parameter_object_e].values.used) {
fss_payload_write_error_parameter_value_missing_print(main, f_console_symbol_long_enable_s, fss_payload_write_long_object_s);
status = F_status_set_error(F_parameter);
}
- else if (main->parameters[fss_payload_write_parameter_content_e].locations.used != main->parameters[fss_payload_write_parameter_content_e].values.used) {
+ else if (main->parameters.array[fss_payload_write_parameter_content_e].locations.used != main->parameters.array[fss_payload_write_parameter_content_e].values.used) {
fss_payload_write_error_parameter_value_missing_print(main, f_console_symbol_long_enable_s, fss_payload_write_long_content_s);
status = F_status_set_error(F_parameter);
}
- else if (main->parameters[fss_payload_write_parameter_object_e].locations.used != main->parameters[fss_payload_write_parameter_content_e].locations.used && main->parameters[fss_payload_write_parameter_partial_e].result == f_console_result_none_e) {
+ else if (main->parameters.array[fss_payload_write_parameter_object_e].locations.used != main->parameters.array[fss_payload_write_parameter_content_e].locations.used && main->parameters.array[fss_payload_write_parameter_partial_e].result == f_console_result_none_e) {
fss_payload_write_error_parameter_same_times_print(main);
status = F_status_set_error(F_parameter);
}
- else if (main->parameters[fss_payload_write_parameter_content_e].locations.used && main->parameters[fss_payload_write_parameter_partial_e].locations.used) {
- if (main->parameters[fss_payload_write_parameter_content_e].result == f_console_result_additional_e) {
+ else if (main->parameters.array[fss_payload_write_parameter_content_e].locations.used && main->parameters.array[fss_payload_write_parameter_partial_e].locations.used) {
+ if (main->parameters.array[fss_payload_write_parameter_content_e].result == f_console_result_additional_e) {
if (main->error.verbosity != f_console_verbosity_quiet_e) {
flockfile(main->error.to.stream);
}
if (F_status_is_error_not(status)) {
- if (main->parameters[fss_payload_write_parameter_content_e].result == f_console_result_additional_e) {
+ if (main->parameters.array[fss_payload_write_parameter_content_e].result == f_console_result_additional_e) {
f_array_length_t location_object = 0;
f_array_length_t location_content = 0;
f_array_length_t location_sub_object = 0;
f_array_length_t location_sub_content = 0;
- for (f_array_length_t i = 0; i < main->parameters[fss_payload_write_parameter_object_e].locations.used; ++i) {
- location_object = main->parameters[fss_payload_write_parameter_object_e].locations.array[i];
- location_content = main->parameters[fss_payload_write_parameter_content_e].locations.array[i];
- location_sub_object = main->parameters[fss_payload_write_parameter_object_e].locations_sub.array[i];
- location_sub_content = main->parameters[fss_payload_write_parameter_content_e].locations_sub.array[i];
+ for (f_array_length_t i = 0; i < main->parameters.array[fss_payload_write_parameter_object_e].locations.used; ++i) {
+ location_object = main->parameters.array[fss_payload_write_parameter_object_e].locations.array[i];
+ location_content = main->parameters.array[fss_payload_write_parameter_content_e].locations.array[i];
+ location_sub_object = main->parameters.array[fss_payload_write_parameter_object_e].locations_sub.array[i];
+ location_sub_content = main->parameters.array[fss_payload_write_parameter_content_e].locations_sub.array[i];
if (location_object > location_content || location_object == location_content && location_sub_object > location_sub_content) {
if (main->error.verbosity != f_console_verbosity_quiet_e) {
}
}
}
- else if (main->parameters[fss_payload_write_parameter_content_e].locations.used) {
- if (main->parameters[fss_payload_write_parameter_content_e].locations.used != main->parameters[fss_payload_write_parameter_content_e].values.used) {
+ else if (main->parameters.array[fss_payload_write_parameter_content_e].locations.used) {
+ if (main->parameters.array[fss_payload_write_parameter_content_e].locations.used != main->parameters.array[fss_payload_write_parameter_content_e].values.used) {
fss_payload_write_error_parameter_value_missing_print(main, f_console_symbol_long_enable_s, fss_payload_write_long_content_s);
status = F_status_set_error(F_parameter);
}
- else if (!main->parameters[fss_payload_write_parameter_partial_e].locations.used) {
+ else if (!main->parameters.array[fss_payload_write_parameter_partial_e].locations.used) {
fss_payload_write_error_parameter_same_times_print(main);
status = F_status_set_error(F_parameter);
}
}
if (F_status_is_error_not(status) && main->process_pipe) {
- if (main->parameters[fss_payload_write_parameter_partial_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_payload_write_parameter_partial_e].result == f_console_result_found_e) {
if (main->error.verbosity != f_console_verbosity_quiet_e) {
flockfile(main->error.to.stream);
}
if (F_status_is_error_not(status)) {
- if (main->parameters[fss_payload_write_parameter_prepend_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_payload_write_parameter_prepend_e].result == f_console_result_found_e) {
if (main->error.verbosity != f_console_verbosity_quiet_e) {
flockfile(main->error.to.stream);
status = F_status_set_error(F_parameter);
}
- else if (main->parameters[fss_payload_write_parameter_prepend_e].result == f_console_result_additional_e) {
- const f_array_length_t index = main->parameters[fss_payload_write_parameter_prepend_e].values.array[main->parameters[fss_payload_write_parameter_prepend_e].values.used - 1];
+ else if (main->parameters.array[fss_payload_write_parameter_prepend_e].result == f_console_result_additional_e) {
+ const f_array_length_t index = main->parameters.array[fss_payload_write_parameter_prepend_e].values.array[main->parameters.array[fss_payload_write_parameter_prepend_e].values.used - 1];
const f_array_length_t length = strnlen(arguments->argv[index], F_console_parameter_size_d);
if (length) {
}
if (F_status_is_error_not(status)) {
- if (main->parameters[fss_payload_write_parameter_ignore_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_payload_write_parameter_ignore_e].result == f_console_result_found_e) {
if (main->error.verbosity != f_console_verbosity_quiet_e) {
flockfile(main->error.to.stream);
status = F_status_set_error(F_parameter);
}
- else if (main->parameters[fss_payload_write_parameter_ignore_e].result == f_console_result_additional_e) {
- const f_array_length_t total_locations = main->parameters[fss_payload_write_parameter_ignore_e].locations.used;
- const f_array_length_t total_arguments = main->parameters[fss_payload_write_parameter_ignore_e].values.used;
+ else if (main->parameters.array[fss_payload_write_parameter_ignore_e].result == f_console_result_additional_e) {
+ const f_array_length_t total_locations = main->parameters.array[fss_payload_write_parameter_ignore_e].locations.used;
+ const f_array_length_t total_arguments = main->parameters.array[fss_payload_write_parameter_ignore_e].values.used;
if (total_locations * 2 > total_arguments) {
flockfile(main->error.to.stream);
f_fss_quote_t quote = F_fss_delimit_quote_double_s;
if (F_status_is_error_not(status)) {
- if (main->parameters[fss_payload_write_parameter_double_e].result == f_console_result_found_e) {
- if (main->parameters[fss_payload_write_parameter_single_e].result == f_console_result_found_e) {
- if (main->parameters[fss_payload_write_parameter_double_e].location < main->parameters[fss_payload_write_parameter_single_e].location) {
+ if (main->parameters.array[fss_payload_write_parameter_double_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_payload_write_parameter_single_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_payload_write_parameter_double_e].location < main->parameters.array[fss_payload_write_parameter_single_e].location) {
quote = F_fss_delimit_quote_single_s;
}
}
}
- else if (main->parameters[fss_payload_write_parameter_single_e].result == f_console_result_found_e) {
+ else if (main->parameters.array[fss_payload_write_parameter_single_e].result == f_console_result_found_e) {
quote = F_fss_delimit_quote_single_s;
}
}
}
if (F_status_is_error_not(status)) {
- if (main->parameters[fss_payload_write_parameter_partial_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_payload_write_parameter_partial_e].result == f_console_result_found_e) {
- if (main->parameters[fss_payload_write_parameter_object_e].result == f_console_result_additional_e) {
- for (f_array_length_t i = 0; i < main->parameters[fss_payload_write_parameter_object_e].values.used; ++i) {
+ if (main->parameters.array[fss_payload_write_parameter_object_e].result == f_console_result_additional_e) {
+ for (f_array_length_t i = 0; i < main->parameters.array[fss_payload_write_parameter_object_e].values.used; ++i) {
if (fss_payload_write_signal_received(main)) {
status = F_status_set_error(F_interrupt);
break;
}
- object.string = arguments->argv[main->parameters[fss_payload_write_parameter_object_e].values.array[i]];
+ object.string = arguments->argv[main->parameters.array[fss_payload_write_parameter_object_e].values.array[i]];
object.used = strnlen(object.string, F_console_parameter_size_d);
object.size = object.used;
} // for
}
else {
- for (f_array_length_t i = 0; i < main->parameters[fss_payload_write_parameter_content_e].values.used; ++i) {
+ for (f_array_length_t i = 0; i < main->parameters.array[fss_payload_write_parameter_content_e].values.used; ++i) {
if (fss_payload_write_signal_received(main)) {
status = F_status_set_error(F_interrupt);
break;
}
- content.string = arguments->argv[main->parameters[fss_payload_write_parameter_content_e].values.array[i]];
+ content.string = arguments->argv[main->parameters.array[fss_payload_write_parameter_content_e].values.array[i]];
content.used = strnlen(content.string, F_console_parameter_size_d);
content.size = content.used;
}
}
else {
- for (f_array_length_t i = 0; i < main->parameters[fss_payload_write_parameter_object_e].values.used; ++i) {
+ for (f_array_length_t i = 0; i < main->parameters.array[fss_payload_write_parameter_object_e].values.used; ++i) {
if (fss_payload_write_signal_received(main)) {
status = F_status_set_error(F_interrupt);
break;
}
- object.string = arguments->argv[main->parameters[fss_payload_write_parameter_object_e].values.array[i]];
+ object.string = arguments->argv[main->parameters.array[fss_payload_write_parameter_object_e].values.array[i]];
object.used = strnlen(object.string, F_console_parameter_size_d);
object.size = object.used;
- content.string = arguments->argv[main->parameters[fss_payload_write_parameter_content_e].values.array[i]];
+ content.string = arguments->argv[main->parameters.array[fss_payload_write_parameter_content_e].values.array[i]];
content.used = strnlen(content.string, F_console_parameter_size_d);
content.size = content.used;
funlockfile(main->error.to.stream);
}
}
- else if (main->error.verbosity != f_console_verbosity_quiet_e && main->parameters[fss_payload_write_parameter_file_e].result == f_console_result_none_e) {
+ else if (main->error.verbosity != f_console_verbosity_quiet_e && main->parameters.array[fss_payload_write_parameter_file_e].result == f_console_result_none_e) {
// Ensure there is always a newline at the end, unless in quiet mode.
fll_print_dynamic(f_string_eol_s, main->output.to.stream);
content.size = 0;
}
- if (main->parameters[fss_payload_write_parameter_file_e].result == f_console_result_additional_e) {
+ if (main->parameters.array[fss_payload_write_parameter_file_e].result == f_console_result_additional_e) {
if (output.id != -1) {
f_file_stream_close(F_true, &output);
}
#ifndef _di_fss_payload_write_main_delete_
f_status_t fss_payload_write_main_delete(fss_payload_write_main_t * const main) {
- for (f_array_length_t i = 0; i < fss_payload_write_total_parameters_d; ++i) {
-
- f_type_array_lengths_resize(0, &main->parameters[i].locations);
- f_type_array_lengths_resize(0, &main->parameters[i].locations_sub);
- f_type_array_lengths_resize(0, &main->parameters[i].values);
- } // for
+ f_console_parameters_delete(&main->parameters);
f_type_array_lengths_resize(0, &main->remaining);
#ifndef _di_fss_payload_write_main_t_
typedef struct {
- f_console_parameter_t parameters[fss_payload_write_total_parameters_d];
+ f_console_parameters_t parameters;
f_array_lengths_t remaining;
bool process_pipe;
#define fss_payload_write_main_t_initialize \
{ \
- fss_payload_write_console_parameter_t_initialize, \
+ f_console_parameters_t_initialize, \
f_array_lengths_t_initialize, \
F_false, \
fl_print_t_initialize, \
if (content) {
bool trim = F_false;
- if (main->parameters[fss_payload_write_parameter_trim_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_payload_write_parameter_trim_e].result == f_console_result_found_e) {
trim = F_true;
}
}
if (content) {
- if (main->parameters[fss_payload_write_parameter_trim_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_payload_write_parameter_trim_e].result == f_console_result_found_e) {
complete = f_fss_complete_full_trim_e;
}
else {
#endif
#ifndef _di_fss_status_code_program_version_
- const f_string_static_t fss_status_code_program_version_s = macro_f_string_static_t_initialize2(FSS_STATUS_CODE_program_version_s, 0, FSS_STATUS_CODE_program_version_s_length);
+ const f_string_static_t fss_status_code_program_version_s = macro_f_string_static_t_initialize(FSS_STATUS_CODE_program_version_s, 0, FSS_STATUS_CODE_program_version_s_length);
#endif // _di_fss_status_code_program_version_
#ifndef _di_fss_status_code_program_name_
- const f_string_static_t fss_status_code_program_name_s = macro_f_string_static_t_initialize2(FSS_STATUS_CODE_program_name_s, 0, FSS_STATUS_CODE_program_name_s_length);
- const f_string_static_t fss_status_code_program_name_long_s = macro_f_string_static_t_initialize2(FSS_STATUS_CODE_program_name_long_s, 0, FSS_STATUS_CODE_program_name_long_s_length);
+ const f_string_static_t fss_status_code_program_name_s = macro_f_string_static_t_initialize(FSS_STATUS_CODE_program_name_s, 0, FSS_STATUS_CODE_program_name_s_length);
+ const f_string_static_t fss_status_code_program_name_long_s = macro_f_string_static_t_initialize(FSS_STATUS_CODE_program_name_long_s, 0, FSS_STATUS_CODE_program_name_long_s_length);
#endif // _di_fss_status_code_program_name_
#ifndef _di_fss_status_code_print_help_
f_status_t status = F_none;
- {
- const f_console_parameters_t parameters = macro_f_console_parameters_t_initialize(main->parameters, fss_status_code_total_parameters_d);
+ f_console_parameter_t parameters[] = fss_status_code_console_parameter_t_initialize;
+ main->parameters.array = parameters;
+ main->parameters.used = fss_status_code_total_parameters_d;
- {
- f_console_parameter_id_t ids[3] = { fss_status_code_parameter_no_color_e, fss_status_code_parameter_light_e, fss_status_code_parameter_dark_e };
- const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 3);
+ {
+ f_console_parameter_id_t ids[3] = { fss_status_code_parameter_no_color_e, fss_status_code_parameter_light_e, fss_status_code_parameter_dark_e };
+ const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 3);
- status = fll_program_parameter_process(*arguments, parameters, choices, F_true, &main->remaining, &main->context);
+ status = fll_program_parameter_process(*arguments, &main->parameters, choices, F_true, &main->remaining, &main->context);
- main->output.set = &main->context.set;
- main->error.set = &main->context.set;
- main->warning.set = &main->context.set;
+ main->output.set = &main->context.set;
+ main->error.set = &main->context.set;
+ main->warning.set = &main->context.set;
- if (main->context.set.error.before) {
- main->output.context = f_color_set_empty_s;
- main->output.notable = main->context.set.notable;
+ if (main->context.set.error.before) {
+ main->output.context = f_color_set_empty_s;
+ main->output.notable = main->context.set.notable;
- main->error.context = main->context.set.error;
- main->error.notable = main->context.set.notable;
+ main->error.context = main->context.set.error;
+ main->error.notable = main->context.set.notable;
- main->warning.context = main->context.set.warning;
- main->warning.notable = main->context.set.notable;
- }
- else {
- f_color_set_t *sets[] = { &main->output.context, &main->output.notable, &main->error.context, &main->error.notable, &main->warning.context, &main->warning.notable, 0 };
+ main->warning.context = main->context.set.warning;
+ main->warning.notable = main->context.set.notable;
+ }
+ else {
+ f_color_set_t *sets[] = { &main->output.context, &main->output.notable, &main->error.context, &main->error.notable, &main->warning.context, &main->warning.notable, 0 };
- fll_program_parameter_process_empty(&main->context, sets);
- }
+ fll_program_parameter_process_empty(&main->context, sets);
+ }
- if (F_status_is_error(status)) {
- fss_status_code_main_delete(main);
- return F_status_set_error(status);
- }
+ if (F_status_is_error(status)) {
+ fss_status_code_main_delete(main);
+ return F_status_set_error(status);
}
+ }
+
+ // Identify priority of verbosity related parameters.
+ {
+ f_console_parameter_id_t ids[4] = { fss_status_code_parameter_verbosity_quiet_e, fss_status_code_parameter_verbosity_normal_e, fss_status_code_parameter_verbosity_verbose_e, fss_status_code_parameter_verbosity_debug_e };
+ f_console_parameter_id_t choice = 0;
+ const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 4);
- // Identify priority of verbosity related parameters.
- {
- f_console_parameter_id_t ids[4] = { fss_status_code_parameter_verbosity_quiet_e, fss_status_code_parameter_verbosity_normal_e, fss_status_code_parameter_verbosity_verbose_e, fss_status_code_parameter_verbosity_debug_e };
- f_console_parameter_id_t choice = 0;
- const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 4);
-
- status = f_console_parameter_prioritize_right(parameters, choices, &choice);
-
- if (F_status_is_error(status)) {
- fss_status_code_main_delete(main);
- return status;
- }
-
- if (choice == fss_status_code_parameter_verbosity_quiet_e) {
- main->output.verbosity = f_console_verbosity_quiet_e;
- main->error.verbosity = f_console_verbosity_quiet_e;
- main->warning.verbosity = f_console_verbosity_quiet_e;
- }
- else if (choice == fss_status_code_parameter_verbosity_normal_e) {
- main->output.verbosity = f_console_verbosity_normal_e;
- main->error.verbosity = f_console_verbosity_normal_e;
- main->warning.verbosity = f_console_verbosity_normal_e;
- }
- else if (choice == fss_status_code_parameter_verbosity_verbose_e) {
- main->output.verbosity = f_console_verbosity_verbose_e;
- main->error.verbosity = f_console_verbosity_verbose_e;
- main->warning.verbosity = f_console_verbosity_verbose_e;
- }
- else if (choice == fss_status_code_parameter_verbosity_debug_e) {
- main->output.verbosity = f_console_verbosity_debug_e;
- main->error.verbosity = f_console_verbosity_debug_e;
- main->warning.verbosity = f_console_verbosity_debug_e;
- }
+ status = f_console_parameter_prioritize_right(main->parameters, choices, &choice);
+
+ if (F_status_is_error(status)) {
+ fss_status_code_main_delete(main);
+ return status;
}
- status = F_none;
+ if (choice == fss_status_code_parameter_verbosity_quiet_e) {
+ main->output.verbosity = f_console_verbosity_quiet_e;
+ main->error.verbosity = f_console_verbosity_quiet_e;
+ main->warning.verbosity = f_console_verbosity_quiet_e;
+ }
+ else if (choice == fss_status_code_parameter_verbosity_normal_e) {
+ main->output.verbosity = f_console_verbosity_normal_e;
+ main->error.verbosity = f_console_verbosity_normal_e;
+ main->warning.verbosity = f_console_verbosity_normal_e;
+ }
+ else if (choice == fss_status_code_parameter_verbosity_verbose_e) {
+ main->output.verbosity = f_console_verbosity_verbose_e;
+ main->error.verbosity = f_console_verbosity_verbose_e;
+ main->warning.verbosity = f_console_verbosity_verbose_e;
+ }
+ else if (choice == fss_status_code_parameter_verbosity_debug_e) {
+ main->output.verbosity = f_console_verbosity_debug_e;
+ main->error.verbosity = f_console_verbosity_debug_e;
+ main->warning.verbosity = f_console_verbosity_debug_e;
+ }
}
- if (main->parameters[fss_status_code_parameter_help_e].result == f_console_result_found_e) {
+ f_string_static_t * const argv = main->parameters.arguments.array;
+
+ status = F_none;
+
+ if (main->parameters.array[fss_status_code_parameter_help_e].result == f_console_result_found_e) {
fss_status_code_print_help(main->output.to, main->context);
fss_status_code_main_delete(main);
return F_none;
}
- if (main->parameters[fss_status_code_parameter_version_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_status_code_parameter_version_e].result == f_console_result_found_e) {
fll_program_print_version(main->output.to, fss_status_code_program_version_s);
fss_status_code_main_delete(main);
return F_none;
}
- if (main->parameters[fss_status_code_parameter_is_error_e].result == f_console_result_found_e) {
- if (main->parameters[fss_status_code_parameter_is_warning_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_status_code_parameter_is_error_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_status_code_parameter_is_warning_e].result == f_console_result_found_e) {
flockfile(main->error.to.stream);
fl_print_format("%q%[%QThe parameter '%]", main->error.to.stream, f_string_eol_s, main->error.context, main->error.prefix, main->error.context);
fss_status_code_main_delete(main);
return F_status_set_error(status);
}
- else if (main->parameters[fss_status_code_parameter_is_fine_e].result == f_console_result_found_e) {
+ else if (main->parameters.array[fss_status_code_parameter_is_fine_e].result == f_console_result_found_e) {
flockfile(main->error.to.stream);
fl_print_format("%q%[%QThe parameter '%]", main->error.to.stream, f_string_eol_s, main->error.context, main->error.prefix, main->error.context);
return F_status_set_error(status);
}
}
- else if (main->parameters[fss_status_code_parameter_is_warning_e].result == f_console_result_found_e && main->parameters[fss_status_code_parameter_is_fine_e].result == f_console_result_found_e) {
+ else if (main->parameters.array[fss_status_code_parameter_is_warning_e].result == f_console_result_found_e && main->parameters.array[fss_status_code_parameter_is_fine_e].result == f_console_result_found_e) {
flockfile(main->error.to.stream);
fl_print_format("%q%[%QThe parameter '%]", main->error.to.stream, f_string_eol_s, main->error.context, main->error.prefix, main->error.context);
f_status_t status2 = F_none;
- if (main->parameters[fss_status_code_parameter_is_error_e].result == f_console_result_found_e || main->parameters[fss_status_code_parameter_is_warning_e].result == f_console_result_found_e || main->parameters[fss_status_code_parameter_is_fine_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_status_code_parameter_is_error_e].result == f_console_result_found_e || main->parameters.array[fss_status_code_parameter_is_warning_e].result == f_console_result_found_e || main->parameters.array[fss_status_code_parameter_is_fine_e].result == f_console_result_found_e) {
if (main->process_pipe) {
// @todo call fss_status_code_process_check() here for all main from pipe that is space separated.
}
funlockfile(main->output.to.stream);
}
}
- else if (main->parameters[fss_status_code_parameter_number_e].result == f_console_result_found_e) {
+ else if (main->parameters.array[fss_status_code_parameter_number_e].result == f_console_result_found_e) {
if (main->process_pipe) {
// @todo call fss_status_code_process_number() here for all main from pipe that is space separated.
}
#ifndef _di_fss_status_code_main_delete_
f_status_t fss_status_code_main_delete(fss_status_code_main_t * const main) {
- for (f_array_length_t i = 0; i < fss_status_code_total_parameters_d; ++i) {
-
- f_type_array_lengths_resize(0, &main->parameters[i].locations);
- f_type_array_lengths_resize(0, &main->parameters[i].locations_sub);
- f_type_array_lengths_resize(0, &main->parameters[i].values);
- } // for
+ f_console_parameters_delete(&main->parameters);
f_type_array_lengths_resize(0, &main->remaining);
#ifndef _di_fss_status_code_main_t_
typedef struct {
- f_console_parameter_t parameters[fss_status_code_total_parameters_d];
+ f_console_parameters_t parameters;
f_array_lengths_t remaining;
bool process_pipe;
#define fss_status_code_main_t_initialize \
{ \
- fss_status_code_console_parameter_t_initialize, \
+ f_console_parameters_t_initialize, \
f_array_lengths_t_initialize, \
F_false, \
fl_print_t_initialize, \
if (F_status_is_error(status)) return status;
}
- if (main->parameters[fss_status_code_parameter_is_error_e].result == f_console_result_found_e) {
+ if (main->parameters.array[fss_status_code_parameter_is_error_e].result == f_console_result_found_e) {
if (F_status_is_error(number)) {
f_print_terminated(f_status_true_s, main->output.to.stream);
}
f_print_dynamic(f_string_eol_s, main->output.to.stream);
}
- else if (main->parameters[fss_status_code_parameter_is_warning_e].result == f_console_result_found_e) {
+ else if (main->parameters.array[fss_status_code_parameter_is_warning_e].result == f_console_result_found_e) {
if (F_status_is_warning(number)) {
f_print_terminated(f_status_true_s, main->output.to.stream);
}
f_print_dynamic(f_string_eol_s, main->output.to.stream);
}
- else if (main->parameters[fss_status_code_parameter_is_fine_e].result == f_console_result_found_e) {
+ else if (main->parameters.array[fss_status_code_parameter_is_fine_e].result == f_console_result_found_e) {
if (F_status_is_fine(number)) {
f_print_terminated(f_status_true_s, main->output.to.stream);
}
#endif
#ifndef _di_iki_read_program_version_
- const f_string_static_t iki_read_program_version_s = macro_f_string_static_t_initialize2(IKI_READ_program_version_s, 0, IKI_READ_program_version_s_length);
+ const f_string_static_t iki_read_program_version_s = macro_f_string_static_t_initialize(IKI_READ_program_version_s, 0, IKI_READ_program_version_s_length);
#endif // _di_iki_read_program_version_
#ifndef _di_iki_read_program_name_
- const f_string_static_t iki_read_program_name_s = macro_f_string_static_t_initialize2(IKI_READ_program_name_s, 0, IKI_READ_program_name_s_length);
- const f_string_static_t iki_read_program_name_long_s = macro_f_string_static_t_initialize2(IKI_READ_program_name_long_s, 0, IKI_READ_program_name_long_s_length);
+ const f_string_static_t iki_read_program_name_s = macro_f_string_static_t_initialize(IKI_READ_program_name_s, 0, IKI_READ_program_name_s_length);
+ const f_string_static_t iki_read_program_name_long_s = macro_f_string_static_t_initialize(IKI_READ_program_name_long_s, 0, IKI_READ_program_name_long_s_length);
#endif // _di_iki_read_program_name_
#ifndef _di_iki_read_print_help_
f_status_t status = F_none;
- {
- const f_console_parameters_t parameters = macro_f_console_parameters_t_initialize(main->parameters, iki_read_total_parameters_d);
+ f_console_parameter_t parameters[] = iki_read_console_parameter_t_initialize;
+ main->parameters.array = parameters;
+ main->parameters.used = iki_read_total_parameters_d;
- {
- f_console_parameter_id_t ids[3] = { iki_read_parameter_no_color_e, iki_read_parameter_light_e, iki_read_parameter_dark_e };
- const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 3);
+ {
+ f_console_parameter_id_t ids[3] = { iki_read_parameter_no_color_e, iki_read_parameter_light_e, iki_read_parameter_dark_e };
+ const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 3);
- status = fll_program_parameter_process(*arguments, parameters, choices, F_true, &main->remaining, &main->context);
+ status = fll_program_parameter_process(*arguments, &main->parameters, choices, F_true, &main->remaining, &main->context);
- main->output.set = &main->context.set;
- main->error.set = &main->context.set;
- main->warning.set = &main->context.set;
+ main->output.set = &main->context.set;
+ main->error.set = &main->context.set;
+ main->warning.set = &main->context.set;
- if (main->context.set.error.before) {
- main->output.context = f_color_set_empty_s;
- main->output.notable = main->context.set.notable;
+ if (main->context.set.error.before) {
+ main->output.context = f_color_set_empty_s;
+ main->output.notable = main->context.set.notable;
- main->error.context = main->context.set.error;
- main->error.notable = main->context.set.notable;
+ main->error.context = main->context.set.error;
+ main->error.notable = main->context.set.notable;
- main->warning.context = main->context.set.warning;
- main->warning.notable = main->context.set.notable;
- }
- else {
- f_color_set_t *sets[] = { &main->output.context, &main->output.notable, &main->error.context, &main->error.notable, &main->warning.context, &main->warning.notable, 0 };
+ main->warning.context = main->context.set.warning;
+ main->warning.notable = main->context.set.notable;
+ }
+ else {
+ f_color_set_t *sets[] = { &main->output.context, &main->output.notable, &main->error.context, &main->error.notable, &main->warning.context, &main->warning.notable, 0 };
- fll_program_parameter_process_empty(&main->context, sets);
- }
+ fll_program_parameter_process_empty(&main->context, sets);
+ }
- if (F_status_is_error(status)) {
- fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process", F_true);
+ if (F_status_is_error(status)) {
+ fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process", F_true);
- if (main->error.verbosity == f_console_verbosity_verbose_e) {
- fll_print_dynamic(f_string_eol_s, main->error.to.stream);
- }
+ if (main->error.verbosity == f_console_verbosity_verbose_e) {
+ fll_print_dynamic(f_string_eol_s, main->error.to.stream);
+ }
- iki_read_main_delete(main);
+ iki_read_main_delete(main);
- return F_status_set_error(status);
- }
+ return F_status_set_error(status);
}
+ }
- // Identify priority of verbosity related parameters.
- {
- f_console_parameter_id_t ids[4] = { iki_read_parameter_verbosity_quiet_e, iki_read_parameter_verbosity_normal_e, iki_read_parameter_verbosity_verbose_e, iki_read_parameter_verbosity_debug_e };
- f_console_parameter_id_t choice = 0;
- const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 4);
-
- status = f_console_parameter_prioritize_right(parameters, choices, &choice);
+ // Identify priority of verbosity related parameters.
+ {
+ f_console_parameter_id_t ids[4] = { iki_read_parameter_verbosity_quiet_e, iki_read_parameter_verbosity_normal_e, iki_read_parameter_verbosity_verbose_e, iki_read_parameter_verbosity_debug_e };
+ f_console_parameter_id_t choice = 0;
+ const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 4);
- if (F_status_is_error(status)) {
- fll_error_print(main->error, F_status_set_fine(status), "f_console_parameter_prioritize_right", F_true);
+ status = f_console_parameter_prioritize_right(main->parameters, choices, &choice);
- iki_read_main_delete(main);
+ if (F_status_is_error(status)) {
+ fll_error_print(main->error, F_status_set_fine(status), "f_console_parameter_prioritize_right", F_true);
- return status;
- }
+ iki_read_main_delete(main);
- if (choice == iki_read_parameter_verbosity_quiet_e) {
- main->output.verbosity = f_console_verbosity_quiet_e;
- main->error.verbosity = f_console_verbosity_quiet_e;
- main->warning.verbosity = f_console_verbosity_quiet_e;
- }
- else if (choice == iki_read_parameter_verbosity_normal_e) {
- main->output.verbosity = f_console_verbosity_normal_e;
- main->error.verbosity = f_console_verbosity_normal_e;
- main->warning.verbosity = f_console_verbosity_normal_e;
- }
- else if (choice == iki_read_parameter_verbosity_verbose_e) {
- main->output.verbosity = f_console_verbosity_verbose_e;
- main->error.verbosity = f_console_verbosity_verbose_e;
- main->warning.verbosity = f_console_verbosity_verbose_e;
- }
- else if (choice == iki_read_parameter_verbosity_debug_e) {
- main->output.verbosity = f_console_verbosity_debug_e;
- main->error.verbosity = f_console_verbosity_debug_e;
- main->warning.verbosity = f_console_verbosity_debug_e;
- }
+ return status;
}
- status = F_none;
+ if (choice == iki_read_parameter_verbosity_quiet_e) {
+ main->output.verbosity = f_console_verbosity_quiet_e;
+ main->error.verbosity = f_console_verbosity_quiet_e;
+ main->warning.verbosity = f_console_verbosity_quiet_e;
+ }
+ else if (choice == iki_read_parameter_verbosity_normal_e) {
+ main->output.verbosity = f_console_verbosity_normal_e;
+ main->error.verbosity = f_console_verbosity_normal_e;
+ main->warning.verbosity = f_console_verbosity_normal_e;
+ }
+ else if (choice == iki_read_parameter_verbosity_verbose_e) {
+ main->output.verbosity = f_console_verbosity_verbose_e;
+ main->error.verbosity = f_console_verbosity_verbose_e;
+ main->warning.verbosity = f_console_verbosity_verbose_e;
+ }
+ else if (choice == iki_read_parameter_verbosity_debug_e) {
+ main->output.verbosity = f_console_verbosity_debug_e;
+ main->error.verbosity = f_console_verbosity_debug_e;
+ main->warning.verbosity = f_console_verbosity_debug_e;
+ }
}
- if (main->parameters[iki_read_parameter_help_e].result == f_console_result_found_e) {
+ f_string_static_t * const argv = main->parameters.arguments.array;
+
+ status = F_none;
+
+ if (main->parameters.array[iki_read_parameter_help_e].result == f_console_result_found_e) {
iki_read_print_help(main->output.to, main->context);
iki_read_main_delete(main);
return F_none;
}
- if (main->parameters[iki_read_parameter_version_e].result == f_console_result_found_e) {
+ if (main->parameters.array[iki_read_parameter_version_e].result == f_console_result_found_e) {
fll_program_print_version(main->output.to, iki_read_program_version_s);
iki_read_main_delete(main);
}
if (main->remaining.used > 0 || main->process_pipe) {
- if (main->parameters[iki_read_parameter_at_e].result == f_console_result_found_e) {
+ if (main->parameters.array[iki_read_parameter_at_e].result == f_console_result_found_e) {
if (main->error.verbosity != f_console_verbosity_quiet_e) {
flockfile(main->error.to.stream);
status = F_status_set_error(F_parameter);
}
- else if (main->parameters[iki_read_parameter_at_e].result == f_console_result_additional_e) {
- const f_array_length_t index = main->parameters[iki_read_parameter_at_e].values.array[main->parameters[iki_read_parameter_at_e].values.used - 1];
+ else if (main->parameters.array[iki_read_parameter_at_e].result == f_console_result_additional_e) {
+ const f_array_length_t index = main->parameters.array[iki_read_parameter_at_e].values.array[main->parameters.array[iki_read_parameter_at_e].values.used - 1];
const f_string_range_t range = macro_f_string_range_t_initialize(strlen(arguments->argv[index]));
f_number_unsigned_t number = 0;
main->at = number;
- if (main->parameters[iki_read_parameter_whole_e].result == f_console_result_found_e) {
+ if (main->parameters.array[iki_read_parameter_whole_e].result == f_console_result_found_e) {
if (main->error.verbosity != f_console_verbosity_quiet_e) {
flockfile(main->error.to.stream);
}
}
- if (main->parameters[iki_read_parameter_line_e].result == f_console_result_found_e) {
+ if (main->parameters.array[iki_read_parameter_line_e].result == f_console_result_found_e) {
if (main->error.verbosity != f_console_verbosity_quiet_e) {
flockfile(main->error.to.stream);
status = F_status_set_error(F_parameter);
}
- else if (main->parameters[iki_read_parameter_line_e].result == f_console_result_additional_e) {
- const f_array_length_t index = main->parameters[iki_read_parameter_line_e].values.array[main->parameters[iki_read_parameter_line_e].values.used - 1];
+ else if (main->parameters.array[iki_read_parameter_line_e].result == f_console_result_additional_e) {
+ const f_array_length_t index = main->parameters.array[iki_read_parameter_line_e].values.array[main->parameters.array[iki_read_parameter_line_e].values.used - 1];
const f_string_range_t range = macro_f_string_range_t_initialize(strlen(arguments->argv[index]));
f_number_unsigned_t number = 0;
main->line = number;
}
- if (main->parameters[iki_read_parameter_name_e].result == f_console_result_found_e) {
+ if (main->parameters.array[iki_read_parameter_name_e].result == f_console_result_found_e) {
if (main->error.verbosity != f_console_verbosity_quiet_e) {
flockfile(main->error.to.stream);
status = F_status_set_error(F_parameter);
}
- if (main->parameters[iki_read_parameter_substitute_e].result != f_console_result_none_e) {
- if (main->parameters[iki_read_parameter_substitute_e].result == f_console_result_found_e || main->parameters[iki_read_parameter_substitute_e].values.used % 3 != 0) {
+ if (main->parameters.array[iki_read_parameter_substitute_e].result != f_console_result_none_e) {
+ if (main->parameters.array[iki_read_parameter_substitute_e].result == f_console_result_found_e || main->parameters.array[iki_read_parameter_substitute_e].values.used % 3 != 0) {
if (main->error.verbosity != f_console_verbosity_quiet_e) {
flockfile(main->error.to.stream);
status = F_status_set_error(F_parameter);
}
- if (main->parameters[iki_read_parameter_total_e].result == f_console_result_found_e) {
+ if (main->parameters.array[iki_read_parameter_total_e].result == f_console_result_found_e) {
if (main->error.verbosity != f_console_verbosity_quiet_e) {
flockfile(main->error.to.stream);
}
}
- if (main->parameters[iki_read_parameter_literal_e].result == f_console_result_found_e) {
- if (main->parameters[iki_read_parameter_object_e].result == f_console_result_found_e) {
+ if (main->parameters.array[iki_read_parameter_literal_e].result == f_console_result_found_e) {
+ if (main->parameters.array[iki_read_parameter_object_e].result == f_console_result_found_e) {
if (main->error.verbosity != f_console_verbosity_quiet_e) {
flockfile(main->error.to.stream);
status = F_status_set_error(F_parameter);
}
- if (main->parameters[iki_read_parameter_content_e].result == f_console_result_found_e) {
+ if (main->parameters.array[iki_read_parameter_content_e].result == f_console_result_found_e) {
if (main->error.verbosity != f_console_verbosity_quiet_e) {
flockfile(main->error.to.stream);
status = F_status_set_error(F_parameter);
}
- if (main->parameters[iki_read_parameter_total_e].result == f_console_result_found_e) {
+ if (main->parameters.array[iki_read_parameter_total_e].result == f_console_result_found_e) {
if (main->error.verbosity != f_console_verbosity_quiet_e) {
flockfile(main->error.to.stream);
main->mode = iki_read_mode_literal_e;
}
- else if (main->parameters[iki_read_parameter_object_e].result == f_console_result_found_e) {
- if (main->parameters[iki_read_parameter_content_e].result == f_console_result_found_e) {
+ else if (main->parameters.array[iki_read_parameter_object_e].result == f_console_result_found_e) {
+ if (main->parameters.array[iki_read_parameter_content_e].result == f_console_result_found_e) {
if (main->error.verbosity != f_console_verbosity_quiet_e) {
flockfile(main->error.to.stream);
status = F_status_set_error(F_parameter);
}
- if (main->parameters[iki_read_parameter_total_e].result == f_console_result_found_e) {
+ if (main->parameters.array[iki_read_parameter_total_e].result == f_console_result_found_e) {
if (main->error.verbosity != f_console_verbosity_quiet_e) {
flockfile(main->error.to.stream);
main->mode = iki_read_mode_object_e;
}
- else if (main->parameters[iki_read_parameter_total_e].result == f_console_result_found_e) {
+ else if (main->parameters.array[iki_read_parameter_total_e].result == f_console_result_found_e) {
main->mode = iki_read_mode_total_e;
}
else {
main->mode = iki_read_mode_content_e;
}
- if (main->parameters[iki_read_parameter_whole_e].result == f_console_result_found_e) {
- if (main->parameters[iki_read_parameter_total_e].result == f_console_result_found_e) {
+ if (main->parameters.array[iki_read_parameter_whole_e].result == f_console_result_found_e) {
+ if (main->parameters.array[iki_read_parameter_total_e].result == f_console_result_found_e) {
if (main->error.verbosity != f_console_verbosity_quiet_e) {
flockfile(main->error.to.stream);
status = f_file_read(file, &main->buffer);
if (F_status_is_error(status)) {
- fll_error_file_print(main->error, F_status_set_fine(status), "f_file_read", F_true, "-", "process", fll_error_file_type_file_e);
+ fll_error_file_print(main->error, F_status_set_fine(status), "f_file_read", F_true, "-", f_file_operation_process_s, fll_error_file_type_file_e);
}
else {
status = iki_read_process_buffer(main, arguments, "-");
status = f_file_open(arguments->argv[main->remaining.array[i]], 0, &file);
if (F_status_is_error(status)) {
- fll_error_file_print(main->error, F_status_set_fine(status), "f_file_open", F_true, arguments->argv[main->remaining.array[i]], "process", fll_error_file_type_file_e);
+ fll_error_file_print(main->error, F_status_set_fine(status), "f_file_open", F_true, arguments->argv[main->remaining.array[i]], f_file_operation_process_s, fll_error_file_type_file_e);
break;
}
status = f_file_size_by_id(file.id, &total);
if (F_status_is_error(status)) {
- fll_error_file_print(main->error, F_status_set_fine(status), "f_file_size_by_id", F_true, arguments->argv[main->remaining.array[i]], "process", fll_error_file_type_file_e);
+ fll_error_file_print(main->error, F_status_set_fine(status), "f_file_size_by_id", F_true, arguments->argv[main->remaining.array[i]], f_file_operation_process_s, fll_error_file_type_file_e);
f_file_stream_close(F_true, &file);
break;
f_file_stream_close(F_true, &file);
if (F_status_is_error(status)) {
- fll_error_file_print(main->error, F_status_set_fine(status), "f_file_read_until", F_true, arguments->argv[main->remaining.array[i]], "process", fll_error_file_type_file_e);
+ fll_error_file_print(main->error, F_status_set_fine(status), "f_file_read_until", F_true, arguments->argv[main->remaining.array[i]], f_file_operation_process_s, fll_error_file_type_file_e);
break;
}
#ifndef _di_iki_read_main_delete_
f_status_t iki_read_main_delete(iki_read_main_t * const main) {
- for (f_array_length_t i = 0; i < iki_read_total_parameters_d; ++i) {
-
- f_type_array_lengths_resize(0, &main->parameters[i].locations);
- f_type_array_lengths_resize(0, &main->parameters[i].locations_sub);
- f_type_array_lengths_resize(0, &main->parameters[i].values);
- } // for
+ f_console_parameters_delete(&main->parameters);
f_type_array_lengths_resize(0, &main->remaining);
f_string_dynamic_resize(0, &main->buffer);
#define macro_iki_read_substitution_t_initialize(replace, with) \
{ \
- macro_f_string_static_t_initialize(replace), \
- macro_f_string_static_t_initialize(with), \
+ macro_f_string_static_t_initialize2(replace), \
+ macro_f_string_static_t_initialize2(with), \
}
#endif // _di_iki_read_substitution_t_
#ifndef _di_iki_read_main_t_
typedef struct {
- f_console_parameter_t parameters[iki_read_total_parameters_d];
+ f_console_parameters_t parameters;
f_array_lengths_t remaining;
bool process_pipe;
#define iki_read_main_t_initialize \
{ \
- iki_read_console_parameter_t_initialize, \
+ f_console_parameters_t_initialize, \
f_array_lengths_t_initialize, \
F_false, \
fl_print_t_initialize, \
#ifndef _di_iki_read_process_at_
f_status_t iki_read_process_at(iki_read_main_t * const main, const f_string_t file_name, f_string_range_t *range) {
- if (main->parameters[iki_read_parameter_line_e].result != f_console_result_additional_e) {
+ if (main->parameters.array[iki_read_parameter_line_e].result != f_console_result_additional_e) {
return F_false;
}
f_status_t status = F_none;
iki_data_t iki_data = iki_data_t_initialize;
- if (main->parameters[iki_read_parameter_whole_e].result == f_console_result_found_e) {
+ if (main->parameters.array[iki_read_parameter_whole_e].result == f_console_result_found_e) {
f_string_range_t buffer_range = macro_f_string_range_t_initialize(main->buffer.used);
status = iki_read_process_at(main, file_name, &buffer_range);
}
}
- if (main->parameters[iki_read_parameter_name_e].result == f_console_result_additional_e) {
+ if (main->parameters.array[iki_read_parameter_name_e].result == f_console_result_additional_e) {
f_string_dynamic_t name = f_string_dynamic_t_initialize;
f_array_length_t index = 0;
f_array_length_t matches = 0;
buffer_range->start = 0;
- for (; i < main->parameters[iki_read_parameter_name_e].values.used; ++i) {
+ for (; i < main->parameters.array[iki_read_parameter_name_e].values.used; ++i) {
- index = main->parameters[iki_read_parameter_name_e].values.array[i];
+ index = main->parameters.array[iki_read_parameter_name_e].values.array[i];
name.used = 0;
status = f_string_append_nulless(arguments->argv[index], strlen(arguments->argv[index]), &name);
if (status == F_equal_to) {
unmatched = F_false;
- if (main->parameters[iki_read_parameter_at_e].result == f_console_result_additional_e) {
+ if (main->parameters.array[iki_read_parameter_at_e].result == f_console_result_additional_e) {
if (matches++ != main->at) continue;
}
else status = F_none;
}
else if (ranges->used) {
- if (main->parameters[iki_read_parameter_at_e].result == f_console_result_additional_e) {
+ if (main->parameters.array[iki_read_parameter_at_e].result == f_console_result_additional_e) {
if (main->at < ranges->used) {
flockfile(main->output.to.stream);
substitution_range.start = 0;
- if (main->parameters[iki_read_parameter_name_e].result == f_console_result_additional_e) {
+ if (main->parameters.array[iki_read_parameter_name_e].result == f_console_result_additional_e) {
f_array_length_t i = 0;
f_array_length_t j = 0;
f_array_length_t length_argument = 0;
- for (f_array_length_t index = 0; i < main->parameters[iki_read_parameter_name_e].values.used; ++i) {
+ for (f_array_length_t index = 0; i < main->parameters.array[iki_read_parameter_name_e].values.used; ++i) {
- index = main->parameters[iki_read_parameter_name_e].values.array[i];
+ index = main->parameters.array[iki_read_parameter_name_e].values.array[i];
length_argument = strnlen(arguments->argv[index], F_console_parameter_size_d);
for (j = 0, name_missed = F_true; j < names.used; ++j) {
f_array_length_t total = 0;
- if (main->parameters[iki_read_parameter_name_e].result == f_console_result_additional_e) {
+ if (main->parameters.array[iki_read_parameter_name_e].result == f_console_result_additional_e) {
f_string_dynamic_t name = f_string_dynamic_t_initialize;
f_array_length_t index = 0;
range.start = 0;
- for (uint16_t signal_check = 0; i < main->parameters[iki_read_parameter_name_e].values.used; ++i) {
+ for (uint16_t signal_check = 0; i < main->parameters.array[iki_read_parameter_name_e].values.used; ++i) {
if (!((++signal_check) % iki_read_signal_check_d)) {
if (iki_read_signal_received(main)) {
signal_check = 0;
}
- index = main->parameters[iki_read_parameter_name_e].values.array[i];
+ index = main->parameters.array[iki_read_parameter_name_e].values.array[i];
name.used = 0;
status = f_string_append_nulless(arguments->argv[index], strlen(arguments->argv[index]), &name);
}
// if that at position is within the actual total, then the total at the given position is 1, otherwise is 0.
- if (main->parameters[iki_read_parameter_at_e].result == f_console_result_additional_e) {
+ if (main->parameters.array[iki_read_parameter_at_e].result == f_console_result_additional_e) {
if (main->at < total) {
total = 1;
}
#ifndef _di_iki_read_substitutions_identify_
f_status_t iki_read_substitutions_identify(iki_read_main_t * const main, const f_console_arguments_t *arguments, const f_string_t file_name, f_iki_vocabulary_t *vocabulary, iki_read_substitutions_t *substitutionss) {
- if (main->parameters[iki_read_parameter_substitute_e].result != f_console_result_additional_e) {
+ if (main->parameters.array[iki_read_parameter_substitute_e].result != f_console_result_additional_e) {
return F_none;
}
f_array_length_t length = 0;
- f_console_parameter_t *parameter = &main->parameters[iki_read_parameter_substitute_e];
+ f_console_parameter_t *parameter = &main->parameters.array[iki_read_parameter_substitute_e];
for (; i < parameter->values.used; i += 3) {
#endif
#ifndef _di_iki_write_program_version_
- const f_string_static_t iki_write_program_version_s = macro_f_string_static_t_initialize2(IKI_WRITE_program_version_s, 0, IKI_WRITE_program_version_s_length);
+ const f_string_static_t iki_write_program_version_s = macro_f_string_static_t_initialize(IKI_WRITE_program_version_s, 0, IKI_WRITE_program_version_s_length);
#endif // _di_iki_write_program_version_
#ifndef _di_iki_write_program_name_
- const f_string_static_t iki_write_program_name_s = macro_f_string_static_t_initialize2(IKI_WRITE_program_name_s, 0, IKI_WRITE_program_name_s_length);
- const f_string_static_t iki_write_program_name_long_s = macro_f_string_static_t_initialize2(IKI_WRITE_program_name_long_s, 0, IKI_WRITE_program_name_long_s_length);
+ const f_string_static_t iki_write_program_name_s = macro_f_string_static_t_initialize(IKI_WRITE_program_name_s, 0, IKI_WRITE_program_name_s_length);
+ const f_string_static_t iki_write_program_name_long_s = macro_f_string_static_t_initialize(IKI_WRITE_program_name_long_s, 0, IKI_WRITE_program_name_long_s_length);
#endif // _di_iki_write_program_name_
#ifndef _di_iki_write_print_help_
f_status_t status = F_none;
+ f_console_parameter_t parameters[] = iki_write_console_parameter_t_initialize;
+ main->parameters.array = parameters;
+ main->parameters.used = iki_write_total_parameters_d;
+
{
- const f_console_parameters_t parameters = macro_f_console_parameters_t_initialize(main->parameters, iki_write_total_parameters_d);
+ f_console_parameter_id_t ids[3] = { iki_write_parameter_no_color_e, iki_write_parameter_light_e, iki_write_parameter_dark_e };
+ const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 3);
- {
- f_console_parameter_id_t ids[3] = { iki_write_parameter_no_color_e, iki_write_parameter_light_e, iki_write_parameter_dark_e };
- const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 3);
+ status = fll_program_parameter_process(*arguments, &main->parameters, choices, F_true, &main->remaining, &main->context);
- status = fll_program_parameter_process(*arguments, parameters, choices, F_true, &main->remaining, &main->context);
+ main->output.set = &main->context.set;
+ main->error.set = &main->context.set;
+ main->warning.set = &main->context.set;
- main->output.set = &main->context.set;
- main->error.set = &main->context.set;
- main->warning.set = &main->context.set;
+ if (main->context.set.error.before) {
+ main->output.context = f_color_set_empty_s;
+ main->output.notable = main->context.set.notable;
- if (main->context.set.error.before) {
- main->output.context = f_color_set_empty_s;
- main->output.notable = main->context.set.notable;
+ main->error.context = main->context.set.error;
+ main->error.notable = main->context.set.notable;
- main->error.context = main->context.set.error;
- main->error.notable = main->context.set.notable;
+ main->warning.context = main->context.set.warning;
+ main->warning.notable = main->context.set.notable;
+ }
+ else {
+ f_color_set_t *sets[] = { &main->output.context, &main->output.notable, &main->error.context, &main->error.notable, &main->warning.context, &main->warning.notable, 0 };
- main->warning.context = main->context.set.warning;
- main->warning.notable = main->context.set.notable;
- }
- else {
- f_color_set_t *sets[] = { &main->output.context, &main->output.notable, &main->error.context, &main->error.notable, &main->warning.context, &main->warning.notable, 0 };
+ fll_program_parameter_process_empty(&main->context, sets);
+ }
- fll_program_parameter_process_empty(&main->context, sets);
+ if (F_status_is_error(status)) {
+ if (main->error.verbosity != f_console_verbosity_quiet_e) {
+ fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process", F_true);
+ f_print_dynamic(f_string_eol_s, main->error.to.stream);
}
- if (F_status_is_error(status)) {
- if (main->error.verbosity != f_console_verbosity_quiet_e) {
- fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process", F_true);
- f_print_dynamic(f_string_eol_s, main->error.to.stream);
- }
+ iki_write_main_delete(main);
- iki_write_main_delete(main);
-
- return F_status_set_error(status);
- }
+ return F_status_set_error(status);
}
+ }
- // Identify priority of verbosity related parameters.
- {
- f_console_parameter_id_t ids[4] = { iki_write_parameter_verbosity_quiet_e, iki_write_parameter_verbosity_normal_e, iki_write_parameter_verbosity_verbose_e, iki_write_parameter_verbosity_debug_e };
- f_console_parameter_id_t choice = 0;
- const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 4);
-
- status = f_console_parameter_prioritize_right(parameters, choices, &choice);
+ // Identify priority of verbosity related parameters.
+ {
+ f_console_parameter_id_t ids[4] = { iki_write_parameter_verbosity_quiet_e, iki_write_parameter_verbosity_normal_e, iki_write_parameter_verbosity_verbose_e, iki_write_parameter_verbosity_debug_e };
+ f_console_parameter_id_t choice = 0;
+ const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 4);
- if (F_status_is_error(status)) {
- iki_write_main_delete(main);
+ status = f_console_parameter_prioritize_right(main->parameters, choices, &choice);
- return status;
- }
+ if (F_status_is_error(status)) {
+ iki_write_main_delete(main);
- if (choice == iki_write_parameter_verbosity_quiet_e) {
- main->output.verbosity = f_console_verbosity_quiet_e;
- main->error.verbosity = f_console_verbosity_quiet_e;
- main->warning.verbosity = f_console_verbosity_quiet_e;
- }
- else if (choice == iki_write_parameter_verbosity_normal_e) {
- main->output.verbosity = f_console_verbosity_normal_e;
- main->error.verbosity = f_console_verbosity_normal_e;
- main->warning.verbosity = f_console_verbosity_normal_e;
- }
- else if (choice == iki_write_parameter_verbosity_verbose_e) {
- main->output.verbosity = f_console_verbosity_verbose_e;
- main->error.verbosity = f_console_verbosity_verbose_e;
- main->warning.verbosity = f_console_verbosity_verbose_e;
- }
- else if (choice == iki_write_parameter_verbosity_debug_e) {
- main->output.verbosity = f_console_verbosity_debug_e;
- main->error.verbosity = f_console_verbosity_debug_e;
- main->warning.verbosity = f_console_verbosity_debug_e;
- }
+ return status;
}
- status = F_none;
+ if (choice == iki_write_parameter_verbosity_quiet_e) {
+ main->output.verbosity = f_console_verbosity_quiet_e;
+ main->error.verbosity = f_console_verbosity_quiet_e;
+ main->warning.verbosity = f_console_verbosity_quiet_e;
+ }
+ else if (choice == iki_write_parameter_verbosity_normal_e) {
+ main->output.verbosity = f_console_verbosity_normal_e;
+ main->error.verbosity = f_console_verbosity_normal_e;
+ main->warning.verbosity = f_console_verbosity_normal_e;
+ }
+ else if (choice == iki_write_parameter_verbosity_verbose_e) {
+ main->output.verbosity = f_console_verbosity_verbose_e;
+ main->error.verbosity = f_console_verbosity_verbose_e;
+ main->warning.verbosity = f_console_verbosity_verbose_e;
+ }
+ else if (choice == iki_write_parameter_verbosity_debug_e) {
+ main->output.verbosity = f_console_verbosity_debug_e;
+ main->error.verbosity = f_console_verbosity_debug_e;
+ main->warning.verbosity = f_console_verbosity_debug_e;
+ }
}
- if (main->parameters[iki_write_parameter_help_e].result == f_console_result_found_e) {
+ f_string_static_t * const argv = main->parameters.arguments.array;
+
+ status = F_none;
+
+ if (main->parameters.array[iki_write_parameter_help_e].result == f_console_result_found_e) {
iki_write_print_help(main->output.to, main->context);
iki_write_main_delete(main);
return F_none;
}
- if (main->parameters[iki_write_parameter_version_e].result == f_console_result_found_e) {
+ if (main->parameters.array[iki_write_parameter_version_e].result == f_console_result_found_e) {
fll_program_print_version(main->output.to, iki_write_program_version_s);
iki_write_main_delete(main);
file.flag = F_file_flag_create_d | F_file_flag_write_only_d | F_file_flag_append_d;
if (F_status_is_error_not(status)) {
- if (main->parameters[iki_write_parameter_file_e].result == f_console_result_additional_e) {
- if (main->parameters[iki_write_parameter_file_e].values.used > 1) {
+ if (main->parameters.array[iki_write_parameter_file_e].result == f_console_result_additional_e) {
+ if (main->parameters.array[iki_write_parameter_file_e].values.used > 1) {
if (main->error.verbosity != f_console_verbosity_quiet_e) {
flockfile(main->error.to.stream);
status = F_status_set_error(F_parameter);
}
else {
- const f_array_length_t location = main->parameters[iki_write_parameter_file_e].values.array[0];
+ const f_array_length_t location = main->parameters.array[iki_write_parameter_file_e].values.array[0];
file.id = -1;
file.stream = 0;
status = f_file_stream_open(arguments->argv[location], 0, &file);
if (F_status_is_error(status)) {
- fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_open", F_true, arguments->argv[location], "open", fll_error_file_type_file_e);
+ fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_open", F_true, arguments->argv[location], f_file_operation_open_s, fll_error_file_type_file_e);
}
}
}
- else if (main->parameters[iki_write_parameter_file_e].result == f_console_result_found_e) {
+ else if (main->parameters.array[iki_write_parameter_file_e].result == f_console_result_found_e) {
if (main->error.verbosity != f_console_verbosity_quiet_e) {
flockfile(main->error.to.stream);
}
}
- if (F_status_is_error_not(status) && main->parameters[iki_write_parameter_object_e].result == f_console_result_found_e) {
+ if (F_status_is_error_not(status) && main->parameters.array[iki_write_parameter_object_e].result == f_console_result_found_e) {
if (main->error.verbosity != f_console_verbosity_quiet_e) {
flockfile(main->error.to.stream);
status = F_status_set_error(F_parameter);
}
- if (F_status_is_error_not(status) && main->parameters[iki_write_parameter_content_e].result == f_console_result_found_e) {
+ if (F_status_is_error_not(status) && main->parameters.array[iki_write_parameter_content_e].result == f_console_result_found_e) {
if (main->error.verbosity != f_console_verbosity_quiet_e) {
flockfile(main->error.to.stream);
}
if (F_status_is_error_not(status) && !main->process_pipe) {
- if (main->parameters[iki_write_parameter_object_e].result != f_console_result_additional_e && main->parameters[iki_write_parameter_content_e].result != f_console_result_additional_e) {
+ if (main->parameters.array[iki_write_parameter_object_e].result != f_console_result_additional_e && main->parameters.array[iki_write_parameter_content_e].result != f_console_result_additional_e) {
if (main->error.verbosity != f_console_verbosity_quiet_e) {
flockfile(main->error.to.stream);
}
if (F_status_is_error_not(status)) {
- if (main->parameters[iki_write_parameter_object_e].values.used != main->parameters[iki_write_parameter_content_e].values.used) {
+ if (main->parameters.array[iki_write_parameter_object_e].values.used != main->parameters.array[iki_write_parameter_content_e].values.used) {
if (main->error.verbosity != f_console_verbosity_quiet_e) {
flockfile(main->error.to.stream);
data->quote = f_iki_syntax_quote_double_s.string[0];
if (F_status_is_error_not(status)) {
- if (main->parameters[iki_write_parameter_double_e].result == f_console_result_found_e) {
- if (main->parameters[iki_write_parameter_single_e].result == f_console_result_found_e) {
- if (main->parameters[iki_write_parameter_double_e].location < main->parameters[iki_write_parameter_single_e].location) {
+ if (main->parameters.array[iki_write_parameter_double_e].result == f_console_result_found_e) {
+ if (main->parameters.array[iki_write_parameter_single_e].result == f_console_result_found_e) {
+ if (main->parameters.array[iki_write_parameter_double_e].location < main->parameters.array[iki_write_parameter_single_e].location) {
data->quote = f_iki_syntax_quote_single_s.string[0];
}
}
}
- else if (main->parameters[iki_write_parameter_single_e].result == f_console_result_found_e) {
+ else if (main->parameters.array[iki_write_parameter_single_e].result == f_console_result_found_e) {
data->quote = f_iki_syntax_quote_single_s.string[0];
}
}
f_string_static_t content = f_string_static_t_initialize;
uint16_t signal_check = 0;
- for (f_array_length_t i = 0; i < main->parameters[iki_write_parameter_object_e].values.used; ++i) {
+ for (f_array_length_t i = 0; i < main->parameters.array[iki_write_parameter_object_e].values.used; ++i) {
if (!((++signal_check) % iki_write_signal_check_d)) {
if (iki_write_signal_received(main)) {
signal_check = 0;
}
- object.string = arguments->argv[main->parameters[iki_write_parameter_object_e].values.array[i]];
+ object.string = arguments->argv[main->parameters.array[iki_write_parameter_object_e].values.array[i]];
object.used = strnlen(object.string, F_console_parameter_size_d);
object.size = object.used;
- content.string = arguments->argv[main->parameters[iki_write_parameter_content_e].values.array[i]];
+ content.string = arguments->argv[main->parameters.array[iki_write_parameter_content_e].values.array[i]];
content.used = strnlen(content.string, F_console_parameter_size_d);
content.size = content.used;
} // for
// Ensure there is always a newline at the end, unless in quiet mode.
- if (F_status_is_error_not(status) && main->error.verbosity != f_console_verbosity_quiet_e && main->parameters[iki_write_parameter_file_e].result == f_console_result_none_e) {
+ if (F_status_is_error_not(status) && main->error.verbosity != f_console_verbosity_quiet_e && main->parameters.array[iki_write_parameter_file_e].result == f_console_result_none_e) {
fll_print_dynamic(f_string_eol_s, file.stream);
}
}
f_string_dynamic_resize(0, &escaped);
}
- if (main->parameters[iki_write_parameter_file_e].result == f_console_result_additional_e) {
+ if (main->parameters.array[iki_write_parameter_file_e].result == f_console_result_additional_e) {
if (file.id != -1) {
f_file_stream_close(F_true, &file);
}
#ifndef _di_iki_write_main_delete_
f_status_t iki_write_main_delete(iki_write_main_t * const main) {
- for (f_array_length_t i = 0; i < iki_write_total_parameters_d; ++i) {
-
- f_type_array_lengths_resize(0, &main->parameters[i].locations);
- f_type_array_lengths_resize(0, &main->parameters[i].locations_sub);
- f_type_array_lengths_resize(0, &main->parameters[i].values);
- } // for
+ f_console_parameters_delete(&main->parameters);
f_type_array_lengths_resize(0, &main->remaining);
f_string_dynamic_resize(0, &main->buffer);
#ifndef _di_iki_write_main_t_
typedef struct {
- f_console_parameter_t parameters[iki_write_total_parameters_d];
+ f_console_parameters_t parameters;
f_array_lengths_t remaining;
bool process_pipe;
#define iki_write_main_t_initialize \
{ \
- iki_write_console_parameter_t_initialize, \
+ f_console_parameters_t_initialize, \
f_array_lengths_t_initialize, \
F_false, \
fl_print_t_initialize, \
return status;
}
- if (main->parameters[status_code_parameter_is_error_e].result == f_console_result_found_e) {
+ if (main->parameters.array[status_code_parameter_is_error_e].result == f_console_result_found_e) {
if (F_status_is_error(number)) {
f_print_terminated(f_status_true_s, main->output.to.stream);
}
f_print_dynamic(f_string_eol_s, main->output.to.stream);
}
- else if (main->parameters[status_code_parameter_is_warning_e].result == f_console_result_found_e) {
+ else if (main->parameters.array[status_code_parameter_is_warning_e].result == f_console_result_found_e) {
if (F_status_is_warning(number)) {
f_print_terminated(f_status_true_s, main->output.to.stream);
}
f_print_dynamic(f_string_eol_s, main->output.to.stream);
}
- else if (main->parameters[status_code_parameter_is_fine_e].result == f_console_result_found_e) {
+ else if (main->parameters.array[status_code_parameter_is_fine_e].result == f_console_result_found_e) {
if (F_status_is_fine(number)) {
f_print_terminated(f_status_true_s, main->output.to.stream);
}
#endif
#ifndef _di_status_code_program_version_
- const f_string_static_t status_code_progam_version_s = macro_f_string_static_t_initialize2(STATUS_CODE_progam_version_s, 0, STATUS_CODE_progam_version_s_length);
+ const f_string_static_t status_code_progam_version_s = macro_f_string_static_t_initialize(STATUS_CODE_progam_version_s, 0, STATUS_CODE_progam_version_s_length);
#endif // _di_status_code_program_version_
#ifndef _di_status_code_program_name_
- const f_string_static_t status_code_program_name_s = macro_f_string_static_t_initialize2(STATUS_CODE_program_name_s, 0, STATUS_CODE_program_name_s_length);
- const f_string_static_t status_code_program_name_long_s = macro_f_string_static_t_initialize2(STATUS_CODE_program_name_long_s, 0, STATUS_CODE_program_name_long_s_length);
+ const f_string_static_t status_code_program_name_s = macro_f_string_static_t_initialize(STATUS_CODE_program_name_s, 0, STATUS_CODE_program_name_s_length);
+ const f_string_static_t status_code_program_name_long_s = macro_f_string_static_t_initialize(STATUS_CODE_program_name_long_s, 0, STATUS_CODE_program_name_long_s_length);
#endif // _di_status_code_program_name_
#ifndef _di_status_code_print_help_
f_status_t status = F_none;
- {
- const f_console_parameters_t parameters = macro_f_console_parameters_t_initialize(main->parameters, status_code_total_parameters_d);
+ f_console_parameter_t parameters[] = status_code_console_parameter_t_initialize;
+ main->parameters.array = parameters;
+ main->parameters.used = status_code_total_parameters_d;
- {
- f_console_parameter_id_t ids[3] = { status_code_parameter_no_color_e, status_code_parameter_light_e, status_code_parameter_dark_e };
- const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 3);
+ {
+ f_console_parameter_id_t ids[3] = { status_code_parameter_no_color_e, status_code_parameter_light_e, status_code_parameter_dark_e };
+ const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 3);
- status = fll_program_parameter_process(*arguments, parameters, choices, F_true, &main->remaining, &main->context);
+ status = fll_program_parameter_process(*arguments, &main->parameters, choices, F_true, &main->remaining, &main->context);
- main->output.set = &main->context.set;
- main->error.set = &main->context.set;
- main->warning.set = &main->context.set;
+ main->output.set = &main->context.set;
+ main->error.set = &main->context.set;
+ main->warning.set = &main->context.set;
- if (main->context.set.error.before) {
- main->output.context = f_color_set_empty_s;
- main->output.notable = main->context.set.notable;
+ if (main->context.set.error.before) {
+ main->output.context = f_color_set_empty_s;
+ main->output.notable = main->context.set.notable;
- main->error.context = main->context.set.error;
- main->error.notable = main->context.set.notable;
+ main->error.context = main->context.set.error;
+ main->error.notable = main->context.set.notable;
- main->warning.context = main->context.set.warning;
- main->warning.notable = main->context.set.notable;
- }
- else {
- f_color_set_t *sets[] = { &main->output.context, &main->output.notable, &main->error.context, &main->error.notable, &main->warning.context, &main->warning.notable, 0 };
+ main->warning.context = main->context.set.warning;
+ main->warning.notable = main->context.set.notable;
+ }
+ else {
+ f_color_set_t *sets[] = { &main->output.context, &main->output.notable, &main->error.context, &main->error.notable, &main->warning.context, &main->warning.notable, 0 };
- fll_program_parameter_process_empty(&main->context, sets);
- }
+ fll_program_parameter_process_empty(&main->context, sets);
+ }
- if (F_status_is_error(status)) {
- status_code_main_delete(main);
+ if (F_status_is_error(status)) {
+ status_code_main_delete(main);
- return F_status_set_error(status);
- }
+ return F_status_set_error(status);
}
+ }
+
+ // Identify priority of verbosity related parameters.
+ {
+ f_console_parameter_id_t ids[4] = { status_code_parameter_verbosity_quiet_e, status_code_parameter_verbosity_normal_e, status_code_parameter_verbosity_verbose_e, status_code_parameter_verbosity_debug_e };
+ f_console_parameter_id_t choice = 0;
+ const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 4);
- // Identify priority of verbosity related parameters.
- {
- f_console_parameter_id_t ids[4] = { status_code_parameter_verbosity_quiet_e, status_code_parameter_verbosity_normal_e, status_code_parameter_verbosity_verbose_e, status_code_parameter_verbosity_debug_e };
- f_console_parameter_id_t choice = 0;
- const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 4);
-
- status = f_console_parameter_prioritize_right(parameters, choices, &choice);
-
- if (F_status_is_error(status)) {
- status_code_main_delete(main);
- return status;
- }
-
- if (choice == status_code_parameter_verbosity_quiet_e) {
- main->output.verbosity = f_console_verbosity_quiet_e;
- main->error.verbosity = f_console_verbosity_quiet_e;
- main->warning.verbosity = f_console_verbosity_quiet_e;
- }
- else if (choice == status_code_parameter_verbosity_normal_e) {
- main->output.verbosity = f_console_verbosity_normal_e;
- main->error.verbosity = f_console_verbosity_normal_e;
- main->warning.verbosity = f_console_verbosity_normal_e;
- }
- else if (choice == status_code_parameter_verbosity_verbose_e) {
- main->output.verbosity = f_console_verbosity_verbose_e;
- main->error.verbosity = f_console_verbosity_verbose_e;
- main->warning.verbosity = f_console_verbosity_verbose_e;
- }
- else if (choice == status_code_parameter_verbosity_debug_e) {
- main->output.verbosity = f_console_verbosity_debug_e;
- main->error.verbosity = f_console_verbosity_debug_e;
- main->warning.verbosity = f_console_verbosity_debug_e;
- }
+ status = f_console_parameter_prioritize_right(main->parameters, choices, &choice);
+
+ if (F_status_is_error(status)) {
+ status_code_main_delete(main);
+ return status;
}
- status = F_none;
+ if (choice == status_code_parameter_verbosity_quiet_e) {
+ main->output.verbosity = f_console_verbosity_quiet_e;
+ main->error.verbosity = f_console_verbosity_quiet_e;
+ main->warning.verbosity = f_console_verbosity_quiet_e;
+ }
+ else if (choice == status_code_parameter_verbosity_normal_e) {
+ main->output.verbosity = f_console_verbosity_normal_e;
+ main->error.verbosity = f_console_verbosity_normal_e;
+ main->warning.verbosity = f_console_verbosity_normal_e;
+ }
+ else if (choice == status_code_parameter_verbosity_verbose_e) {
+ main->output.verbosity = f_console_verbosity_verbose_e;
+ main->error.verbosity = f_console_verbosity_verbose_e;
+ main->warning.verbosity = f_console_verbosity_verbose_e;
+ }
+ else if (choice == status_code_parameter_verbosity_debug_e) {
+ main->output.verbosity = f_console_verbosity_debug_e;
+ main->error.verbosity = f_console_verbosity_debug_e;
+ main->warning.verbosity = f_console_verbosity_debug_e;
+ }
}
- if (main->parameters[status_code_parameter_help_e].result == f_console_result_found_e) {
+ f_string_static_t * const argv = main->parameters.arguments.array;
+
+ status = F_none;
+
+ if (main->parameters.array[status_code_parameter_help_e].result == f_console_result_found_e) {
status_code_print_help(main->output.to, main->context);
status_code_main_delete(main);
return F_none;
}
- if (main->parameters[status_code_parameter_version_e].result == f_console_result_found_e) {
+ if (main->parameters.array[status_code_parameter_version_e].result == f_console_result_found_e) {
fll_program_print_version(main->output.to, status_code_progam_version_s);
status_code_main_delete(main);
return F_none;
}
- if (main->parameters[status_code_parameter_is_error_e].result == f_console_result_found_e) {
- if (main->parameters[status_code_parameter_is_warning_e].result == f_console_result_found_e) {
+ if (main->parameters.array[status_code_parameter_is_error_e].result == f_console_result_found_e) {
+ if (main->parameters.array[status_code_parameter_is_warning_e].result == f_console_result_found_e) {
flockfile(main->error.to.stream);
fl_print_format("%q%[%QThe parameter '%]", main->error.to.stream, f_string_eol_s, main->error.context, main->error.prefix, main->error.context);
return F_status_set_error(status);
}
- else if (main->parameters[status_code_parameter_is_fine_e].result == f_console_result_found_e) {
+ else if (main->parameters.array[status_code_parameter_is_fine_e].result == f_console_result_found_e) {
flockfile(main->error.to.stream);
fl_print_format("%q%[%QThe parameter '%]", main->error.to.stream, f_string_eol_s, main->error.context, main->error.prefix, main->error.context);
return F_status_set_error(status);
}
}
- else if (main->parameters[status_code_parameter_is_warning_e].result == f_console_result_found_e && main->parameters[status_code_parameter_is_fine_e].result == f_console_result_found_e) {
+ else if (main->parameters.array[status_code_parameter_is_warning_e].result == f_console_result_found_e && main->parameters.array[status_code_parameter_is_fine_e].result == f_console_result_found_e) {
flockfile(main->error.to.stream);
fl_print_format("%q%[%QThe parameter '%]", main->error.to.stream, f_string_eol_s, main->error.context, main->error.prefix, main->error.context);
f_status_t status2 = F_none;
- if (main->parameters[status_code_parameter_is_error_e].result == f_console_result_found_e || main->parameters[status_code_parameter_is_warning_e].result == f_console_result_found_e || main->parameters[status_code_parameter_is_fine_e].result == f_console_result_found_e) {
+ if (main->parameters.array[status_code_parameter_is_error_e].result == f_console_result_found_e || main->parameters.array[status_code_parameter_is_warning_e].result == f_console_result_found_e || main->parameters.array[status_code_parameter_is_fine_e].result == f_console_result_found_e) {
if (main->process_pipe) {
// @todo call status_code_process_check() here for all main from pipe that is space separated.
}
funlockfile(main->output.to.stream);
}
}
- else if (main->parameters[status_code_parameter_number_e].result == f_console_result_found_e) {
+ else if (main->parameters.array[status_code_parameter_number_e].result == f_console_result_found_e) {
if (main->process_pipe) {
// @todo call status_code_process_number() here for all main from pipe that is space separated.
}
#ifndef _di_status_code_main_delete_
f_status_t status_code_main_delete(status_code_main_t * const main) {
- for (f_array_length_t i = 0; i < status_code_total_parameters_d; ++i) {
-
- f_type_array_lengths_resize(0, &main->parameters[i].locations);
- f_type_array_lengths_resize(0, &main->parameters[i].locations_sub);
- f_type_array_lengths_resize(0, &main->parameters[i].values);
- } // for
+ f_console_parameters_delete(&main->parameters);
f_type_array_lengths_resize(0, &main->remaining);
#ifndef _di_status_code_main_t_
typedef struct {
- f_console_parameter_t parameters[status_code_total_parameters_d];
+ f_console_parameters_t parameters;
f_array_lengths_t remaining;
bool process_pipe;
#define status_code_main_t_initialize \
{ \
- status_code_console_parameter_t_initialize, \
+ f_console_parameters_t_initialize, \
f_array_lengths_t_initialize, \
F_false, \
fl_print_t_initialize, \
* The program data.
*
* main: The main program data.
+ * argv: The argument structure in utf8_main_t.parameters for simplifying syntax.
* file: The output file for writing the processed data to (may potentially default to "output").
* mode: The input/output mode (see utf8_modes).
* valid: Designate the output context set for valid characters.
#ifndef _di_utf8_data_t_
typedef struct {
utf8_main_t *main;
+ f_string_static_t *argv;
f_file_t file;
uint8_t mode;
#define utf8_data_t_initialize \
{ \
0, \
+ 0, \
f_file_t_initialize, \
utf8_mode_from_binary_d | utf8_mode_to_codepoint_d, \
f_color_set_t_initialize, \
#ifndef _di_utf8_print_character_invalid_
void utf8_print_character_invalid(utf8_data_t * const data, const f_string_static_t character) {
- if (data->main->parameters[utf8_parameter_strip_invalid_e].result == f_console_result_found_e) return;
- if (data->main->parameters[utf8_parameter_verify_e].result == f_console_result_found_e) return;
+ if (data->main->parameters.array[utf8_parameter_strip_invalid_e].result == f_console_result_found_e) return;
+ if (data->main->parameters.array[utf8_parameter_verify_e].result == f_console_result_found_e) return;
if (!character.used) return;
fl_print_format("%s%s%s", data->file.stream, data->prepend, utf8_string_combining_not_s, data->append);
}
}
- else if (data->main->parameters[utf8_parameter_strip_invalid_e].result == f_console_result_none_e && data->main->parameters[utf8_parameter_verify_e].result == f_console_result_none_e) {
+ else if (data->main->parameters.array[utf8_parameter_strip_invalid_e].result == f_console_result_none_e && data->main->parameters.array[utf8_parameter_verify_e].result == f_console_result_none_e) {
fl_print_format("%s%[%s%]%s", data->file.stream, data->prepend, data->valid_not, utf8_string_unknown_s, data->valid_not, data->append);
}
}
void utf8_print_error_decode(utf8_data_t * const data, const f_status_t status, const f_string_static_t character) {
if (data->main->error.verbosity == f_console_verbosity_quiet_e) return;
- if (data->main->parameters[utf8_parameter_strip_invalid_e].result == f_console_result_found_e) return;
- if (data->main->parameters[utf8_parameter_verify_e].result == f_console_result_found_e) return;
+ if (data->main->parameters.array[utf8_parameter_strip_invalid_e].result == f_console_result_found_e) return;
+ if (data->main->parameters.array[utf8_parameter_verify_e].result == f_console_result_found_e) return;
fl_print_format("%q%[%QFailed to decode character code '%]", data->main->error.to.stream, f_string_eol_s, data->main->context.set.error, data->main->error.prefix, data->main->context.set.error);
#ifndef _di_utf8_print_section_header_file_
void utf8_print_section_header_file(utf8_data_t * const data, const f_string_t name) {
- if (data->main->parameters[utf8_parameter_headers_e].result == f_console_result_none_e) return;
- if (data->main->parameters[utf8_parameter_verify_e].result == f_console_result_found_e) return;
+ if (data->main->parameters.array[utf8_parameter_headers_e].result == f_console_result_none_e) return;
+ if (data->main->parameters.array[utf8_parameter_verify_e].result == f_console_result_found_e) return;
flockfile(data->main->output.to.stream);
#ifndef _di_utf8_print_section_header_parameter_
void utf8_print_section_header_parameter(utf8_data_t * const data, const f_array_length_t index) {
- if (data->main->parameters[utf8_parameter_headers_e].result == f_console_result_none_e) return;
- if (data->main->parameters[utf8_parameter_verify_e].result == f_console_result_found_e) return;
+ if (data->main->parameters.array[utf8_parameter_headers_e].result == f_console_result_none_e) return;
+ if (data->main->parameters.array[utf8_parameter_verify_e].result == f_console_result_found_e) return;
flockfile(data->main->output.to.stream);
#ifndef _di_utf8_print_section_header_pipe_
void utf8_print_section_header_pipe(utf8_data_t * const data) {
- if (data->main->parameters[utf8_parameter_headers_e].result == f_console_result_none_e) return;
- if (data->main->parameters[utf8_parameter_verify_e].result == f_console_result_found_e) return;
+ if (data->main->parameters.array[utf8_parameter_headers_e].result == f_console_result_none_e) return;
+ if (data->main->parameters.array[utf8_parameter_verify_e].result == f_console_result_found_e) return;
fll_print_format("%q%[Pipe%]:%q", data->main->output.to.stream, f_string_eol_s, data->main->output.set->title, data->main->output.set->title, f_string_eol_s);
}
}
}
- if (data->main->parameters[utf8_parameter_strip_invalid_e].result == f_console_result_none_e && data->main->parameters[utf8_parameter_verify_e].result == f_console_result_none_e) {
+ if (data->main->parameters.array[utf8_parameter_strip_invalid_e].result == f_console_result_none_e && data->main->parameters.array[utf8_parameter_verify_e].result == f_console_result_none_e) {
fl_print_format("%s%[%s%]%s", data->file.stream, data->prepend, data->valid_not, utf8_string_unknown_s, data->valid_not, data->append);
}
}
bool valid = F_true;
uint8_t mode_codepoint = utf8_codepoint_mode_ready_e;
- f_string_static_t current = macro_f_string_static_t_initialize(text, 0);
+ f_string_static_t current = macro_f_string_static_t_initialize2(text, 0);
utf8_process_text_width(¤t);
return status;
}
- if (data->main->parameters[utf8_parameter_verify_e].result == f_console_result_none_e) {
+ if (data->main->parameters.array[utf8_parameter_verify_e].result == f_console_result_none_e) {
// When headers are printed, they are printed with a newline so only print this newline when separate is used without headers being printed.
- if (data->main->parameters[utf8_parameter_headers_e].result == f_console_result_none_e && data->main->parameters[utf8_parameter_separate_e].result == f_console_result_found_e) {
+ if (data->main->parameters.array[utf8_parameter_headers_e].result == f_console_result_none_e && data->main->parameters.array[utf8_parameter_separate_e].result == f_console_result_found_e) {
f_print_dynamic(f_string_eol_s, data->file.stream);
}
}
return status;
}
}
- else if (data->main->parameters[utf8_parameter_verify_e].result == f_console_result_none_e) {
+ else if (data->main->parameters.array[utf8_parameter_verify_e].result == f_console_result_none_e) {
if (data->mode & utf8_mode_to_binary_d) {
utf8_print_binary(data, character);
}
f_array_length_t j = 0;
char block_character[4] = { 0, 0, 0, 0 };
- f_string_static_t character = macro_f_string_static_t_initialize(block_character, 4);
+ f_string_static_t character = macro_f_string_static_t_initialize2(block_character, 4);
do {
status = f_file_read_block(file, &data->buffer);
return status;
}
}
- else if (data->main->parameters[utf8_parameter_verify_e].result == f_console_result_none_e) {
+ else if (data->main->parameters.array[utf8_parameter_verify_e].result == f_console_result_none_e) {
if (data->mode & utf8_mode_to_binary_d) {
char byte[5] = { 0, 0, 0, 0, 0 };
- f_string_static_t character = macro_f_string_static_t_initialize(byte, 5);
+ f_string_static_t character = macro_f_string_static_t_initialize2(byte, 5);
status = f_utf_unicode_from(codepoint, 4, &character.string);
f_array_length_t j = 0;
char block[4] = { 0, 0, 0, 0 };
- f_string_static_t character = macro_f_string_static_t_initialize(block, 4);
+ f_string_static_t character = macro_f_string_static_t_initialize2(block, 4);
do {
status = f_file_read_block(file, &data->buffer);
#endif
#ifndef _di_utf8_program_version_
- const f_string_static_t utf8_program_version_s = macro_f_string_static_t_initialize2(UTF8_program_version_s, 0, UTF8_program_version_s_length);
+ const f_string_static_t utf8_program_version_s = macro_f_string_static_t_initialize(UTF8_program_version_s, 0, UTF8_program_version_s_length);
#endif // _di_utf8_program_version_
#ifndef _di_utf8_program_name_
- const f_string_static_t utf8_program_name_s = macro_f_string_static_t_initialize2(UTF8_program_name_s, 0, UTF8_program_name_s_length);
- const f_string_static_t utf8_program_name_long_s = macro_f_string_static_t_initialize2(UTF8_program_name_long_s, 0, UTF8_program_name_s_long_length);
+ const f_string_static_t utf8_program_name_s = macro_f_string_static_t_initialize(UTF8_program_name_s, 0, UTF8_program_name_s_length);
+ const f_string_static_t utf8_program_name_long_s = macro_f_string_static_t_initialize(UTF8_program_name_long_s, 0, UTF8_program_name_s_long_length);
#endif // _di_utf8_program_name_
#ifndef _di_utf8_print_help_
utf8_data_t data = utf8_data_t_initialize;
data.main = main;
- {
- const f_console_parameters_t parameters = macro_f_console_parameters_t_initialize(main->parameters, utf8_total_parameters_d);
+ f_console_parameter_t parameters[] = utf8_console_parameter_t_initialize;
+ main->parameters.array = parameters;
+ main->parameters.used = utf8_total_parameters_d;
- // Identify priority of color parameters.
- {
- f_console_parameter_id_t ids[3] = { utf8_parameter_no_color_e, utf8_parameter_light_e, utf8_parameter_dark_e };
- const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 3);
+ // Identify priority of color parameters.
+ {
+ f_console_parameter_id_t ids[3] = { utf8_parameter_no_color_e, utf8_parameter_light_e, utf8_parameter_dark_e };
+ const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 3);
- status = fll_program_parameter_process(*arguments, parameters, choices, F_true, &main->remaining, &main->context);
+ status = fll_program_parameter_process(*arguments, &main->parameters, choices, F_true, &main->remaining, &main->context);
- main->output.set = &main->context.set;
- main->error.set = &main->context.set;
- main->warning.set = &main->context.set;
+ main->output.set = &main->context.set;
+ main->error.set = &main->context.set;
+ main->warning.set = &main->context.set;
- if (main->context.set.error.before) {
- main->output.context = f_color_set_empty_s;
- main->output.notable = main->context.set.notable;
+ if (main->context.set.error.before) {
+ main->output.context = f_color_set_empty_s;
+ main->output.notable = main->context.set.notable;
- main->error.context = main->context.set.error;
- main->error.notable = main->context.set.notable;
+ main->error.context = main->context.set.error;
+ main->error.notable = main->context.set.notable;
- main->warning.context = main->context.set.warning;
- main->warning.notable = main->context.set.notable;
- }
- else {
- f_color_set_t *sets[] = { &main->output.context, &main->output.notable, &main->error.context, &main->error.notable, &main->warning.context, &main->warning.notable, 0 };
+ main->warning.context = main->context.set.warning;
+ main->warning.notable = main->context.set.notable;
+ }
+ else {
+ f_color_set_t *sets[] = { &main->output.context, &main->output.notable, &main->error.context, &main->error.notable, &main->warning.context, &main->warning.notable, 0 };
- fll_program_parameter_process_empty(&main->context, sets);
- }
+ fll_program_parameter_process_empty(&main->context, sets);
+ }
- if (F_status_is_error(status)) {
- fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process", F_true);
+ if (F_status_is_error(status)) {
+ fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_process", F_true);
- utf8_data_delete(&data);
- utf8_main_delete(main);
+ utf8_data_delete(&data);
+ utf8_main_delete(main);
- return F_status_set_error(status);
- }
+ return F_status_set_error(status);
}
+ }
- // Identify priority of verbosity related parameters.
- {
- f_console_parameter_id_t ids[4] = { utf8_parameter_verbosity_quiet_e, utf8_parameter_verbosity_normal_e, utf8_parameter_verbosity_verbose_e, utf8_parameter_verbosity_debug_e };
- f_console_parameter_id_t choice = 0;
- const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 4);
-
- status = f_console_parameter_prioritize_right(parameters, choices, &choice);
+ // Identify priority of verbosity related parameters.
+ {
+ f_console_parameter_id_t ids[4] = { utf8_parameter_verbosity_quiet_e, utf8_parameter_verbosity_normal_e, utf8_parameter_verbosity_verbose_e, utf8_parameter_verbosity_debug_e };
+ f_console_parameter_id_t choice = 0;
+ const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 4);
- if (F_status_is_error(status)) {
- fll_error_print(main->error, F_status_set_fine(status), "f_console_parameter_prioritize_right", F_true);
+ status = f_console_parameter_prioritize_right(main->parameters, choices, &choice);
- utf8_main_delete(main);
- utf8_data_delete(&data);
+ if (F_status_is_error(status)) {
+ fll_error_print(main->error, F_status_set_fine(status), "f_console_parameter_prioritize_right", F_true);
- return status;
- }
+ utf8_main_delete(main);
+ utf8_data_delete(&data);
- if (choice == utf8_parameter_verbosity_quiet_e) {
- main->output.verbosity = f_console_verbosity_quiet_e;
- main->error.verbosity = f_console_verbosity_quiet_e;
- main->warning.verbosity = f_console_verbosity_quiet_e;
- }
- else if (choice == utf8_parameter_verbosity_normal_e) {
- main->output.verbosity = f_console_verbosity_normal_e;
- main->error.verbosity = f_console_verbosity_normal_e;
- main->warning.verbosity = f_console_verbosity_normal_e;
- }
- else if (choice == utf8_parameter_verbosity_verbose_e) {
- main->output.verbosity = f_console_verbosity_verbose_e;
- main->error.verbosity = f_console_verbosity_verbose_e;
- main->warning.verbosity = f_console_verbosity_verbose_e;
- }
- else if (choice == utf8_parameter_verbosity_debug_e) {
- main->output.verbosity = f_console_verbosity_debug_e;
- main->error.verbosity = f_console_verbosity_debug_e;
- main->warning.verbosity = f_console_verbosity_debug_e;
- }
+ return status;
}
- // Identify and prioritize from mode parameters.
- {
- f_console_parameter_id_t ids[2] = { utf8_parameter_from_binary_e, utf8_parameter_from_codepoint_e };
- f_console_parameter_id_t choice = 0;
- const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 2);
+ if (choice == utf8_parameter_verbosity_quiet_e) {
+ main->output.verbosity = f_console_verbosity_quiet_e;
+ main->error.verbosity = f_console_verbosity_quiet_e;
+ main->warning.verbosity = f_console_verbosity_quiet_e;
+ }
+ else if (choice == utf8_parameter_verbosity_normal_e) {
+ main->output.verbosity = f_console_verbosity_normal_e;
+ main->error.verbosity = f_console_verbosity_normal_e;
+ main->warning.verbosity = f_console_verbosity_normal_e;
+ }
+ else if (choice == utf8_parameter_verbosity_verbose_e) {
+ main->output.verbosity = f_console_verbosity_verbose_e;
+ main->error.verbosity = f_console_verbosity_verbose_e;
+ main->warning.verbosity = f_console_verbosity_verbose_e;
+ }
+ else if (choice == utf8_parameter_verbosity_debug_e) {
+ main->output.verbosity = f_console_verbosity_debug_e;
+ main->error.verbosity = f_console_verbosity_debug_e;
+ main->warning.verbosity = f_console_verbosity_debug_e;
+ }
+ }
- status = f_console_parameter_prioritize_right(parameters, choices, &choice);
+ // Identify and prioritize from mode parameters.
+ {
+ f_console_parameter_id_t ids[2] = { utf8_parameter_from_binary_e, utf8_parameter_from_codepoint_e };
+ f_console_parameter_id_t choice = 0;
+ const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 2);
- if (F_status_is_error(status)) {
- fll_error_print(main->error, F_status_set_fine(status), "f_console_parameter_prioritize_right", F_true);
+ status = f_console_parameter_prioritize_right(main->parameters, choices, &choice);
- utf8_data_delete(&data);
- utf8_main_delete(main);
+ if (F_status_is_error(status)) {
+ fll_error_print(main->error, F_status_set_fine(status), "f_console_parameter_prioritize_right", F_true);
- return status;
- }
+ utf8_data_delete(&data);
+ utf8_main_delete(main);
- if (choice == utf8_parameter_from_binary_e) {
- if (data.mode & utf8_mode_from_codepoint_d) {
- data.mode -= utf8_mode_from_codepoint_d;
- }
+ return status;
+ }
- data.mode |= utf8_mode_from_binary_d;
+ if (choice == utf8_parameter_from_binary_e) {
+ if (data.mode & utf8_mode_from_codepoint_d) {
+ data.mode -= utf8_mode_from_codepoint_d;
}
- else if (choice == utf8_parameter_from_codepoint_e) {
- if (data.mode & utf8_mode_from_binary_d) {
- data.mode -= utf8_mode_from_binary_d;
- }
- data.mode |= utf8_mode_from_codepoint_d;
- }
+ data.mode |= utf8_mode_from_binary_d;
}
+ else if (choice == utf8_parameter_from_codepoint_e) {
+ if (data.mode & utf8_mode_from_binary_d) {
+ data.mode -= utf8_mode_from_binary_d;
+ }
- // Identify and prioritize to mode parameters.
- {
- f_console_parameter_id_t ids[4] = { utf8_parameter_to_binary_e, utf8_parameter_to_codepoint_e, utf8_parameter_to_combining_e, utf8_parameter_to_width_e };
- f_console_parameter_id_t choice = 0;
- const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 4);
+ data.mode |= utf8_mode_from_codepoint_d;
+ }
+ }
- status = f_console_parameter_prioritize_right(parameters, choices, &choice);
+ // Identify and prioritize to mode parameters.
+ {
+ f_console_parameter_id_t ids[4] = { utf8_parameter_to_binary_e, utf8_parameter_to_codepoint_e, utf8_parameter_to_combining_e, utf8_parameter_to_width_e };
+ f_console_parameter_id_t choice = 0;
+ const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 4);
- if (F_status_is_error(status)) {
- fll_error_print(main->error, F_status_set_fine(status), "f_console_parameter_prioritize_right", F_true);
+ status = f_console_parameter_prioritize_right(main->parameters, choices, &choice);
- utf8_data_delete(&data);
- utf8_main_delete(main);
+ if (F_status_is_error(status)) {
+ fll_error_print(main->error, F_status_set_fine(status), "f_console_parameter_prioritize_right", F_true);
- return status;
- }
+ utf8_data_delete(&data);
+ utf8_main_delete(main);
- if (choice == utf8_parameter_to_binary_e) {
- if (data.mode & utf8_mode_to_codepoint_d) {
- data.mode -= utf8_mode_to_codepoint_d;
- }
+ return status;
+ }
- if (data.mode & utf8_mode_to_combining_d) {
- data.mode -= utf8_mode_to_combining_d;
- }
+ if (choice == utf8_parameter_to_binary_e) {
+ if (data.mode & utf8_mode_to_codepoint_d) {
+ data.mode -= utf8_mode_to_codepoint_d;
+ }
- if (data.mode & utf8_mode_to_width_d) {
- data.mode -= utf8_mode_to_width_d;
- }
+ if (data.mode & utf8_mode_to_combining_d) {
+ data.mode -= utf8_mode_to_combining_d;
+ }
- data.mode |= utf8_mode_to_binary_d;
+ if (data.mode & utf8_mode_to_width_d) {
+ data.mode -= utf8_mode_to_width_d;
}
- else if (choice == utf8_parameter_to_codepoint_e) {
- if (data.mode & utf8_mode_to_binary_d) {
- data.mode -= utf8_mode_to_binary_d;
- }
- if (data.mode & utf8_mode_to_combining_d) {
- data.mode -= utf8_mode_to_combining_d;
- }
+ data.mode |= utf8_mode_to_binary_d;
+ }
+ else if (choice == utf8_parameter_to_codepoint_e) {
+ if (data.mode & utf8_mode_to_binary_d) {
+ data.mode -= utf8_mode_to_binary_d;
+ }
- if (data.mode & utf8_mode_to_width_d) {
- data.mode -= utf8_mode_to_width_d;
- }
+ if (data.mode & utf8_mode_to_combining_d) {
+ data.mode -= utf8_mode_to_combining_d;
+ }
- data.mode |= utf8_mode_to_codepoint_d;
+ if (data.mode & utf8_mode_to_width_d) {
+ data.mode -= utf8_mode_to_width_d;
}
- else if (choice == utf8_parameter_to_combining_e) {
- if (data.mode & utf8_mode_to_binary_d) {
- data.mode -= utf8_mode_to_binary_d;
- }
- if (data.mode & utf8_mode_to_codepoint_d) {
- data.mode -= utf8_mode_to_codepoint_d;
- }
+ data.mode |= utf8_mode_to_codepoint_d;
+ }
+ else if (choice == utf8_parameter_to_combining_e) {
+ if (data.mode & utf8_mode_to_binary_d) {
+ data.mode -= utf8_mode_to_binary_d;
+ }
- // --to_width may be specified with --to_combining.
- if (main->parameters[utf8_parameter_to_width_e].result == f_console_result_found_e) {
- data.mode |= utf8_mode_to_width_d;
- }
+ if (data.mode & utf8_mode_to_codepoint_d) {
+ data.mode -= utf8_mode_to_codepoint_d;
+ }
- data.mode |= utf8_mode_to_combining_d;
+ // --to_width may be specified with --to_combining.
+ if (main->parameters.array[utf8_parameter_to_width_e].result == f_console_result_found_e) {
+ data.mode |= utf8_mode_to_width_d;
}
- else if (choice == utf8_parameter_to_width_e) {
- if (data.mode & utf8_mode_to_binary_d) {
- data.mode -= utf8_mode_to_binary_d;
- }
- if (data.mode & utf8_mode_to_codepoint_d) {
- data.mode -= utf8_mode_to_codepoint_d;
- }
+ data.mode |= utf8_mode_to_combining_d;
+ }
+ else if (choice == utf8_parameter_to_width_e) {
+ if (data.mode & utf8_mode_to_binary_d) {
+ data.mode -= utf8_mode_to_binary_d;
+ }
- // --to_width may be specified with --to_combining.
- if (main->parameters[utf8_parameter_to_combining_e].result == f_console_result_found_e) {
- data.mode |= utf8_mode_to_combining_d;
- }
+ if (data.mode & utf8_mode_to_codepoint_d) {
+ data.mode -= utf8_mode_to_codepoint_d;
+ }
- data.mode |= utf8_mode_to_width_d;
+ // --to_width may be specified with --to_combining.
+ if (main->parameters.array[utf8_parameter_to_combining_e].result == f_console_result_found_e) {
+ data.mode |= utf8_mode_to_combining_d;
}
- }
- status = F_none;
+ data.mode |= utf8_mode_to_width_d;
+ }
}
- if (main->parameters[utf8_parameter_help_e].result == f_console_result_found_e) {
+ data.argv = main->parameters.arguments.array;
+ status = F_none;
+
+ if (main->parameters.array[utf8_parameter_help_e].result == f_console_result_found_e) {
utf8_print_help(main->output.to, main->context);
utf8_data_delete(&data);
return F_none;
}
- if (main->parameters[utf8_parameter_version_e].result == f_console_result_found_e) {
+ if (main->parameters.array[utf8_parameter_version_e].result == f_console_result_found_e) {
fll_program_print_version(main->output.to, utf8_version_s);
utf8_data_delete(&data);
}
if (F_status_is_error_not(status)) {
- if (main->parameters[utf8_parameter_from_file_e].result == f_console_result_additional_e) {
+ if (main->parameters.array[utf8_parameter_from_file_e].result == f_console_result_additional_e) {
f_array_length_t i = 0;
f_array_length_t index = 0;
- for (; i < main->parameters[utf8_parameter_from_file_e].values.used; ++i) {
+ for (; i < main->parameters.array[utf8_parameter_from_file_e].values.used; ++i) {
- index = main->parameters[utf8_parameter_from_file_e].values.array[i];
+ index = main->parameters.array[utf8_parameter_from_file_e].values.array[i];
if (arguments->argv[index][0]) {
if (!f_file_exists(arguments->argv[index])) {
}
} // for
}
- else if (main->parameters[utf8_parameter_from_file_e].result == f_console_result_found_e) {
+ else if (main->parameters.array[utf8_parameter_from_file_e].result == f_console_result_found_e) {
utf8_print_error_no_value(&data, utf8_long_from_file_s);
status = F_status_set_error(F_parameter);
bool valid = F_true;
if (F_status_is_error_not(status)) {
- if (main->parameters[utf8_parameter_to_file_e].result == f_console_result_additional_e) {
- if (main->parameters[utf8_parameter_to_file_e].values.used > 1) {
+ if (main->parameters.array[utf8_parameter_to_file_e].result == f_console_result_additional_e) {
+ if (main->parameters.array[utf8_parameter_to_file_e].values.used > 1) {
utf8_print_error_parameter_file_to_too_many(&data);
status = F_status_set_error(F_parameter);
}
else {
- data.file_name.string = arguments->argv[main->parameters[utf8_parameter_to_file_e].values.array[0]];
+ data.file_name.string = arguments->argv[main->parameters.array[utf8_parameter_to_file_e].values.array[0]];
data.file_name.used = strnlen(data.file_name.string, PATH_MAX);
if (data.file_name.used) {
status = f_file_stream_open(data.file_name.string, "a", &data.file);
if (F_status_is_error(status)) {
- fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_open", F_true, data.file_name.string, "open", fll_error_file_type_file_e);
+ fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_open", F_true, data.file_name.string, f_file_operation_open_s, fll_error_file_type_file_e);
}
}
else {
- utf8_print_error_parameter_file_name_empty(&data, main->parameters[utf8_parameter_to_file_e].values.array[0]);
+ utf8_print_error_parameter_file_name_empty(&data, main->parameters.array[utf8_parameter_to_file_e].values.array[0]);
status = F_status_set_error(F_parameter);
}
}
}
- else if (main->parameters[utf8_parameter_to_file_e].result == f_console_result_found_e) {
+ else if (main->parameters.array[utf8_parameter_to_file_e].result == f_console_result_found_e) {
utf8_print_error_no_value(&data, utf8_long_to_file_s);
status = F_status_set_error(F_parameter);
}
if (F_status_is_error_not(status)) {
- if (main->parameters[utf8_parameter_from_file_e].result == f_console_result_none_e && !(main->process_pipe || main->remaining.used)) {
+ if (main->parameters.array[utf8_parameter_from_file_e].result == f_console_result_none_e && !(main->process_pipe || main->remaining.used)) {
utf8_print_error_no_from(&data);
status = F_status_set_error(F_parameter);
}
if (!(data.mode & utf8_mode_to_binary_d)) {
- if (main->parameters[utf8_parameter_separate_e].result == f_console_result_found_e || main->parameters[utf8_parameter_headers_e].result == f_console_result_found_e) {
+ if (main->parameters.array[utf8_parameter_separate_e].result == f_console_result_found_e || main->parameters.array[utf8_parameter_headers_e].result == f_console_result_found_e) {
data.prepend = " ";
data.append = f_string_eol_s;
}
}
if (F_status_is_error(status) && F_status_set_fine(status) != F_utf_fragment) {
- fll_error_file_print(main->error, F_status_set_fine(status), data.mode & utf8_mode_from_binary_d ? "utf8_process_file_binary" : "utf8_process_file_codepoint", F_true, 0, utf8_string_process_s, fll_error_file_type_pipe_e);
+ fll_error_file_print(main->error, F_status_set_fine(status), data.mode & utf8_mode_from_binary_d ? "utf8_process_file_binary" : "utf8_process_file_codepoint", F_true, 0, f_file_operation_process_s, fll_error_file_type_pipe_e);
}
}
- if (F_status_is_error_not(status) && status != F_signal && main->parameters[utf8_parameter_from_file_e].result == f_console_result_additional_e) {
+ if (F_status_is_error_not(status) && status != F_signal && main->parameters.array[utf8_parameter_from_file_e].result == f_console_result_additional_e) {
f_array_length_t i = 0;
f_array_length_t index = 0;
f_file_t file = macro_f_file_t_initialize(0, -1, F_file_flag_read_only_d, 32768, F_file_default_write_size_d);
- for (uint16_t signal_check = 0; i < main->parameters[utf8_parameter_from_file_e].values.used && status != F_signal; ++i) {
+ for (uint16_t signal_check = 0; i < main->parameters.array[utf8_parameter_from_file_e].values.used && status != F_signal; ++i) {
if (!((++signal_check) % utf8_signal_check_d)) {
if (utf8_signal_received(&data)) {
signal_check = 0;
}
- index = main->parameters[utf8_parameter_from_file_e].values.array[i];
+ index = main->parameters.array[utf8_parameter_from_file_e].values.array[i];
utf8_print_section_header_file(&data, arguments->argv[index]);
status = f_file_stream_open(arguments->argv[index], 0, &file);
if (F_status_is_error(status)) {
- fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_open", F_true, arguments->argv[index], utf8_string_open_s, fll_error_file_type_file_e);
+ fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_open", F_true, arguments->argv[index], f_file_operation_open_s, fll_error_file_type_file_e);
break;
}
f_file_stream_close(F_true, &file);
- if (main->parameters[utf8_parameter_verify_e].result == f_console_result_found_e) {
+ if (main->parameters.array[utf8_parameter_verify_e].result == f_console_result_found_e) {
if (status == F_false) {
valid = F_false;
}
}
if (F_status_is_error(status) && F_status_set_fine(status) != F_utf_fragment) {
- fll_error_file_print(main->error, F_status_set_fine(status), data.mode & utf8_mode_from_binary_d ? "utf8_process_file_binary" : "utf8_process_file_codepoint", F_true, arguments->argv[index], utf8_string_process_s, fll_error_file_type_file_e);
+ fll_error_file_print(main->error, F_status_set_fine(status), data.mode & utf8_mode_from_binary_d ? "utf8_process_file_binary" : "utf8_process_file_codepoint", F_true, arguments->argv[index], f_file_operation_process_s, fll_error_file_type_file_e);
break;
}
status = utf8_process_text(&data, arguments->argv[index]);
- if (main->parameters[utf8_parameter_verify_e].result == f_console_result_found_e) {
+ if (main->parameters.array[utf8_parameter_verify_e].result == f_console_result_found_e) {
if (status == F_false) {
valid = F_false;
}
}
}
- if (main->output.verbosity != f_console_verbosity_quiet_e && main->parameters[utf8_parameter_verify_e].result == f_console_result_none_e) {
+ if (main->output.verbosity != f_console_verbosity_quiet_e && main->parameters.array[utf8_parameter_verify_e].result == f_console_result_none_e) {
if (status == F_signal) {
fflush(data.file.stream);
#ifndef _di_utf8_main_delete_
f_status_t utf8_main_delete(utf8_main_t *main) {
- for (f_array_length_t i = 0; i < utf8_total_parameters_d; ++i) {
-
- f_type_array_lengths_resize(0, &main->parameters[i].locations);
- f_type_array_lengths_resize(0, &main->parameters[i].locations_sub);
- f_type_array_lengths_resize(0, &main->parameters[i].values);
- } // for
+ f_console_parameters_delete(&main->parameters);
f_type_array_lengths_resize(0, &main->remaining);
#define utf8_string_from_s "from"
#define utf8_string_to_s "to"
- #define utf8_string_open_s "open"
- #define utf8_string_process_s "process"
-
#define utf8_string_verified_valid_s "Verified Valid"
#define utf8_string_verified_valid_not_s "Verified Invalid"
#define utf8_string_from_s_length 4
#define utf8_string_to_s_length 2
- #define utf8_string_open_s_length 4
- #define utf8_string_process_s_length 7
-
#define utf8_string_verified_valid_s_length 14
#define utf8_string_verified_valid_not_s_length 16
*/
#ifndef _di_utf8_main_t_
typedef struct {
- f_console_parameter_t parameters[utf8_total_parameters_d];
+ f_console_parameters_t parameters;
f_array_lengths_t remaining;
bool process_pipe;
#define utf8_main_t_initialize \
{ \
- utf8_console_parameter_t_initialize, \
+ f_console_parameters_t_initialize, \
f_array_lengths_t_initialize, \
F_false, \
fl_print_t_initialize, \