From 1591c0c6c448c63a9900bd6fca3d717de11133c8 Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Sun, 18 Feb 2024 22:59:17 -0600 Subject: [PATCH] Feature: Add example program for providing an example on how to build a standard FLL program. The stand alone build system is also setup and working. --- build/stand_alone/example.config.h | 1352 ++++++++++++++++++++ build/stand_alone/example.fakefile | 27 + build/stand_alone/example.settings | 113 ++ level_3/example/c/main/common.c | 95 ++ level_3/example/c/main/common.h | 48 + level_3/example/c/main/common/define.c | 9 + level_3/example/c/main/common/define.h | 55 + level_3/example/c/main/common/enumeration.c | 9 + level_3/example/c/main/common/enumeration.h | 100 ++ level_3/example/c/main/common/print.c | 18 + level_3/example/c/main/common/print.h | 53 + level_3/example/c/main/common/string.c | 24 + level_3/example/c/main/common/string.h | 83 ++ level_3/example/c/main/common/type.c | 35 + level_3/example/c/main/common/type.h | 138 ++ level_3/example/c/main/example.c | 56 + level_3/example/c/main/example.h | 99 ++ level_3/example/c/main/main.c | 76 ++ level_3/example/c/main/main.h | 38 + level_3/example/c/main/print/data.c | 9 + level_3/example/c/main/print/data.h | 23 + level_3/example/c/main/print/debug.c | 9 + level_3/example/c/main/print/debug.h | 23 + level_3/example/c/main/print/error.c | 23 + level_3/example/c/main/print/error.h | 45 + level_3/example/c/main/print/message.c | 36 + level_3/example/c/main/print/message.h | 51 + level_3/example/c/main/print/verbose.c | 9 + level_3/example/c/main/print/verbose.h | 23 + level_3/example/c/main/print/warning.c | 9 + level_3/example/c/main/print/warning.h | 23 + level_3/example/c/main/signal.c | 111 ++ level_3/example/c/main/signal.h | 86 ++ level_3/example/c/main/thread.c | 22 + level_3/example/c/main/thread.h | 46 + level_3/example/data/build/defines | 9 + level_3/example/data/build/dependencies | 26 + level_3/example/data/build/fakefile | 27 + level_3/example/data/build/settings | 98 ++ .../example/data/documentation/man/man1/example.1 | 55 + 40 files changed, 3191 insertions(+) create mode 100644 build/stand_alone/example.config.h create mode 100644 build/stand_alone/example.fakefile create mode 100644 build/stand_alone/example.settings create mode 100644 level_3/example/c/main/common.c create mode 100644 level_3/example/c/main/common.h create mode 100644 level_3/example/c/main/common/define.c create mode 100644 level_3/example/c/main/common/define.h create mode 100644 level_3/example/c/main/common/enumeration.c create mode 100644 level_3/example/c/main/common/enumeration.h create mode 100644 level_3/example/c/main/common/print.c create mode 100644 level_3/example/c/main/common/print.h create mode 100644 level_3/example/c/main/common/string.c create mode 100644 level_3/example/c/main/common/string.h create mode 100644 level_3/example/c/main/common/type.c create mode 100644 level_3/example/c/main/common/type.h create mode 100644 level_3/example/c/main/example.c create mode 100644 level_3/example/c/main/example.h create mode 100644 level_3/example/c/main/main.c create mode 100644 level_3/example/c/main/main.h create mode 100644 level_3/example/c/main/print/data.c create mode 100644 level_3/example/c/main/print/data.h create mode 100644 level_3/example/c/main/print/debug.c create mode 100644 level_3/example/c/main/print/debug.h create mode 100644 level_3/example/c/main/print/error.c create mode 100644 level_3/example/c/main/print/error.h create mode 100644 level_3/example/c/main/print/message.c create mode 100644 level_3/example/c/main/print/message.h create mode 100644 level_3/example/c/main/print/verbose.c create mode 100644 level_3/example/c/main/print/verbose.h create mode 100644 level_3/example/c/main/print/warning.c create mode 100644 level_3/example/c/main/print/warning.h create mode 100644 level_3/example/c/main/signal.c create mode 100644 level_3/example/c/main/signal.h create mode 100644 level_3/example/c/main/thread.c create mode 100644 level_3/example/c/main/thread.h create mode 100644 level_3/example/data/build/defines create mode 100644 level_3/example/data/build/dependencies create mode 100644 level_3/example/data/build/fakefile create mode 100644 level_3/example/data/build/settings create mode 100644 level_3/example/data/documentation/man/man1/example.1 diff --git a/build/stand_alone/example.config.h b/build/stand_alone/example.config.h new file mode 100644 index 0000000..8d8a5a1 --- /dev/null +++ b/build/stand_alone/example.config.h @@ -0,0 +1,1352 @@ +// A config.h file for defining all code being disabled for compiling the stand alone Example program. +// To assist in building this file use (may need to omit --defined-only): "nm --defined-only -f p programs/shared/example | grep -oP '^(f|fl|fll)_[^\s]+'". +// To get the list of all possible functions, use something like: "grep -horP '\b_di_f_\w*\b' level_0/f_color/". +// +// Note that some special defines may need to be manually added, such as: +// #define _di_private_inline_f_print_to_error_ +// #define _di_private_inline_private_f_print_to_error_ +// +// Example: +// echo > /tmp/all.txt +// for i in f_type f_status f_memory f_type_array f_string f_utf f_color f_console f_conversion f_file f_pipe f_print f_rip f_signal f_thread ; do grep -horP '\b_di_f_\w*\b' level_0/$i/c >> /tmp/all.txt ; grep -horP '\b_di_macro_\w*\b' level_0/$i/c >> /tmp/all.txt ; done +// for i in fl_print ; do grep -horP '\b_di_fl_\w*\b' level_1/$i/c >> /tmp/all.txt ; grep -horP '\b_di_macro_\w*\b' level_1/$i/c >> /tmp/all.txt ; done +// for i in fll_error fll_print fll_program ; do grep -horP '\b_di_fll_\w*\b' level_2/$i/c >> /tmp/all.txt ; grep -horP '\b_di_macro_\w*\b' level_2/$i/c >> /tmp/all.txt ; done +// sort /tmp/all.txt | uniq | sed -e 's|^_|#define &|g' > /tmp/sorted.txt +// echo "#define _di_private_inline_f_print_to_error_" >> /tmp/sorted.txt +// echo "#define _di_private_inline_private_f_print_to_error_" >> /tmp/sorted.txt + +#define _di_f_cellss_delete_callback_ +#define _di_f_cellss_destroy_callback_ +#define _di_f_cellss_t_ +#define _di_f_cells_t_ +#define _di_f_cell_t_ +//#define _di_f_char_t_ +//#define _di_f_color_begin_s_ +//#define _di_f_color_code_black_bg_s_ +//#define _di_f_color_code_black_s_ +//#define _di_f_color_code_blink_s_ +//#define _di_f_color_code_blue_bg_s_ +//#define _di_f_color_code_blue_s_ +//#define _di_f_color_code_bold_s_ +//#define _di_f_color_code_bright_black_bg_s_ +//#define _di_f_color_code_bright_black_s_ +//#define _di_f_color_code_bright_blue_bg_s_ +//#define _di_f_color_code_bright_blue_s_ +//#define _di_f_color_code_bright_green_bg_s_ +//#define _di_f_color_code_bright_green_s_ +//#define _di_f_color_code_bright_purple_bg_s_ +//#define _di_f_color_code_bright_purple_s_ +//#define _di_f_color_code_bright_red_bg_s_ +//#define _di_f_color_code_bright_red_s_ +//#define _di_f_color_code_bright_teal_bg_s_ +//#define _di_f_color_code_bright_teal_s_ +//#define _di_f_color_code_bright_white_bg_s_ +//#define _di_f_color_code_bright_white_s_ +//#define _di_f_color_code_bright_yellow_bg_s_ +//#define _di_f_color_code_bright_yellow_s_ +//#define _di_f_color_code_conceal_s_ +//#define _di_f_color_code_e_ +//#define _di_f_color_code_green_bg_s_ +//#define _di_f_color_code_green_s_ +//#define _di_f_color_code_purple_bg_s_ +//#define _di_f_color_code_purple_s_ +//#define _di_f_color_code_red_bg_s_ +//#define _di_f_color_code_red_s_ +//#define _di_f_color_code_reset_s_ +//#define _di_f_color_code_reverse_s_ +//#define _di_f_color_code_t_ +//#define _di_f_color_code_teal_bg_s_ +//#define _di_f_color_code_teal_s_ +//#define _di_f_color_code_underline_s_ +//#define _di_f_color_code_white_bg_s_ +//#define _di_f_color_code_white_s_ +//#define _di_f_color_code_yellow_bg_s_ +//#define _di_f_color_code_yellow_s_ +//#define _di_f_color_context_delete_ +#define _di_f_color_context_destroy_ +//#define _di_f_color_context_t_ +//#define _di_f_color_end_s_ +//#define _di_f_color_format_t_ +//#define _di_f_color_load_context_ +//#define _di_f_color_max_size_d_ +//#define _di_f_color_medium_s_ +//#define _di_f_color_mode_e_ +//#define _di_f_color_reset_s_ +//#define _di_f_color_s_ +#define _di_f_color_save_1_ +#define _di_f_color_save_2_ +#define _di_f_color_save_3_ +#define _di_f_color_save_4_ +#define _di_f_color_save_5_ +//#define _di_f_color_set_context_t_ +//#define _di_f_color_set_string_empty_s_ +//#define _di_f_color_set_t_ +//#define _di_f_color_t_ +//#define _di_f_color_terminal_name_s_ +//#define _di_f_color_terminal_s_ +//#define _di_f_color_terminal_value_linux_s_ +//#define _di_f_console_arguments_t_ +#define _di_f_console_environment_process_ +//#define _di_f_console_flag_e_ +//#define _di_f_console_flag_t_ +#define _di_f_console_identify_ +//#define _di_f_console_length_size_d_ +//#define _di_f_console_parameter_prioritize_left_ +//#define _di_f_console_parameter_prioritize_right_ +//#define _di_f_console_parameter_process_ +#define _di_f_console_parameter_reset_ +//#define _di_f_console_parameters_delete_ +#define _di_f_console_parameters_destroy_ +//#define _di_f_console_parameters_t_ +#define _di_f_console_parameter_state_delete_ +#define _di_f_console_parameter_state_destroy_ +//#define _di_f_console_parameter_state_t_ +//#define _di_f_console_parameter_state_type_e_ +//#define _di_f_console_parameter_t_ +//#define _di_f_console_result_e_ +//#define _di_f_console_result_t_ +//#define _di_f_console_standard_long_copyright_s_ +//#define _di_f_console_standard_long_dark_s_ +//#define _di_f_console_standard_long_debug_s_ +//#define _di_f_console_standard_long_error_s_ +//#define _di_f_console_standard_long_help_s_ +//#define _di_f_console_standard_long_light_s_ +//#define _di_f_console_standard_long_line_first_no_s_ +//#define _di_f_console_standard_long_line_last_no_s_ +//#define _di_f_console_standard_long_no_color_s_ +//#define _di_f_console_standard_long_normal_s_ +//#define _di_f_console_standard_long_quiet_s_ +//#define _di_f_console_standard_long_status_in_s_ +//#define _di_f_console_standard_long_status_out_s_ +//#define _di_f_console_standard_long_verbose_s_ +//#define _di_f_console_standard_long_version_s_ +//#define _di_f_console_standard_parameter_e_ +//#define _di_f_console_standard_s_ +//#define _di_f_console_standard_short_copyright_s_ +//#define _di_f_console_standard_short_dark_s_ +//#define _di_f_console_standard_short_debug_s_ +//#define _di_f_console_standard_short_error_s_ +//#define _di_f_console_standard_short_help_s_ +//#define _di_f_console_standard_short_light_s_ +//#define _di_f_console_standard_short_line_first_no_s_ +//#define _di_f_console_standard_short_line_last_no_s_ +//#define _di_f_console_standard_short_no_color_s_ +//#define _di_f_console_standard_short_normal_s_ +//#define _di_f_console_standard_short_quiet_s_ +//#define _di_f_console_standard_short_status_in_s_ +//#define _di_f_console_standard_short_status_out_s_ +//#define _di_f_console_standard_short_verbose_s_ +//#define _di_f_console_standard_short_version_s_ +//#define _di_f_console_symbol_long_inverse_s_ +//#define _di_f_console_symbol_long_normal_s_ +//#define _di_f_console_symbol_s_ +//#define _di_f_console_symbol_short_inverse_s_ +//#define _di_f_console_symbol_short_normal_s_ +//#define _di_f_console_verbosity_e_ +//#define _di_f_conversion_character_is_binary_ +//#define _di_f_conversion_character_is_decimal_ +//#define _di_f_conversion_character_is_duodecimal_ +//#define _di_f_conversion_character_is_hexidecimal_ +//#define _di_f_conversion_character_is_octal_ +//#define _di_f_conversion_character_to_binary_ +//#define _di_f_conversion_character_to_decimal_ +//#define _di_f_conversion_character_to_duodecimal_ +//#define _di_f_conversion_character_to_hexidecimal_ +//#define _di_f_conversion_character_to_octal_ +//#define _di_f_conversion_d_ +//#define _di_f_conversion_data_base_10_c_ +#define _di_f_conversion_data_base_12_c_ +#define _di_f_conversion_data_base_16_c_ +#define _di_f_conversion_data_base_2_c_ +#define _di_f_conversion_data_base_8_c_ +//#define _di_f_conversion_data_c_ +//#define _di_f_conversion_data_flag_d_ +//#define _di_f_conversion_data_t_ +//#define _di_f_conversion_number_signed_print_ +//#define _di_f_conversion_number_signed_to_string_ +//#define _di_f_conversion_number_unsigned_print_ +//#define _di_f_conversion_number_unsigned_to_string_ +#define _di_f_date_spec_t_ +#define _di_f_date_t_ +#define _di_f_file_access_ +#define _di_f_file_access_at_ +#define _di_f_file_access_mode_d_ +#define _di_f_file_at_d_ +#define _di_f_file_clone_ +//#define _di_f_file_close_ +#define _di_f_file_close_id_ +#define _di_f_file_copy_ +#define _di_f_file_create_ +#define _di_f_file_create_at_ +#define _di_f_file_create_device_ +#define _di_f_file_create_device_at_ +#define _di_f_file_create_fifo_ +#define _di_f_file_create_fifo_at_ +#define _di_f_file_create_node_ +#define _di_f_file_create_node_at_ +#define _di_f_file_descriptor_ +#define _di_f_file_exists_ +#define _di_f_file_exists_at_ +//#define _di_f_file_flush_ +#define _di_f_file_group_read_ +#define _di_f_file_is_ +#define _di_f_file_is_at_ +#define _di_f_file_is_stat_ +#define _di_f_file_link_ +#define _di_f_file_link_at_ +#define _di_f_file_link_hard_ +#define _di_f_file_link_hard_at_ +#define _di_f_file_link_read_ +#define _di_f_file_link_read_at_ +#define _di_f_file_manipulate_ +#define _di_f_file_mode_determine_ +#define _di_f_file_mode_from_string_ +#define _di_f_file_mode_read_ +#define _di_f_file_mode_read_at_ +#define _di_f_file_mode_set_ +#define _di_f_file_mode_set_at_ +#define _di_f_file_mode_t_ +#define _di_f_file_mode_to_mode_ +#define _di_f_file_name_base_ +#define _di_f_file_name_directory_ +#define _di_f_file_open_ +#define _di_f_file_open_at_ +//#define _di_f_file_open_mode_read_append_s_ +//#define _di_f_file_open_mode_read_s_ +//#define _di_f_file_open_mode_read_truncate_s_ +//#define _di_f_file_open_mode_read_write_s_ +//#define _di_f_file_open_mode_s_ +//#define _di_f_file_open_mode_write_append_s_ +//#define _di_f_file_open_mode_write_truncate_s_ +#define _di_f_file_operation_access_s_ +#define _di_f_file_operation_analyze_s_ +#define _di_f_file_operation_append_s_ +#define _di_f_file_operation_change_group_s_ +#define _di_f_file_operation_change_mode_s_ +#define _di_f_file_operation_change_owner_s_ +#define _di_f_file_operation_change_type_s_ +#define _di_f_file_operation_clone_s_ +#define _di_f_file_operation_close_s_ +#define _di_f_file_operation_concatenate_s_ +#define _di_f_file_operation_connect_s_ +#define _di_f_file_operation_copy_s_ +#define _di_f_file_operation_create_s_ +#define _di_f_file_operation_decrypt_s_ +#define _di_f_file_operation_delete_s_ +#define _di_f_file_operation_disconnect_s_ +#define _di_f_file_operation_encrypt_s_ +#define _di_f_file_operation_find_s_ +#define _di_f_file_operation_flush_s_ +#define _di_f_file_operation_from_s_ +#define _di_f_file_operation_get_group_s_ +#define _di_f_file_operation_get_mode_s_ +#define _di_f_file_operation_get_owner_s_ +#define _di_f_file_operation_get_type_s_ +#define _di_f_file_operation_identify_s_ +#define _di_f_file_operation_link_s_ +#define _di_f_file_operation_list_s_ +#define _di_f_file_operation_move_s_ +#define _di_f_file_operation_open_s_ +#define _di_f_file_operation_pipe_s_ +#define _di_f_file_operation_process_s_ +#define _di_f_file_operation_read_s_ +#define _di_f_file_operation_receive_s_ +#define _di_f_file_operation_rename_s_ +#define _di_f_file_operation_s_ +#define _di_f_file_operation_send_s_ +#define _di_f_file_operation_shred_s_ +#define _di_f_file_operation_stat_s_ +#define _di_f_file_operation_to_s_ +#define _di_f_file_operation_touch_s_ +#define _di_f_file_operation_truncate_s_ +#define _di_f_file_operation_unlink_s_ +#define _di_f_file_operation_verify_s_ +#define _di_f_file_operation_wipe_s_ +#define _di_f_file_operation_write_s_ +#define _di_f_file_owner_read_ +#define _di_f_file_poll_ +#define _di_f_file_read_ +#define _di_f_file_read_block_ +#define _di_f_file_read_until_ +#define _di_f_file_remove_ +#define _di_f_file_remove_at_ +#define _di_f_file_rename_ +#define _di_f_file_rename_at_ +#define _di_f_file_role_change_ +#define _di_f_file_role_change_at_ +#define _di_f_file_seek_ +#define _di_f_file_seeks_d_ +#define _di_f_file_select_ +#define _di_f_file_select_signal_ +#define _di_f_file_size_ +#define _di_f_file_size_at_ +#define _di_f_file_size_by_id_ +#define _di_f_filess_delete_callback_ +#define _di_f_filess_destroy_callback_ +#define _di_f_filess_t_ +#define _di_f_files_t_ +#define _di_f_file_stat_ +#define _di_f_file_stat_at_ +#define _di_f_file_stat_by_id_ +#define _di_f_file_stat_flags_e_ +//#define _di_f_file_stream_close_ +//#define _di_f_file_stream_flush_ +//#define _di_f_file_stream_lock_ +#define _di_f_file_stream_lock_try_ +//#define _di_f_file_stream_open_ +#define _di_f_file_stream_open_descriptor_ +#define _di_f_file_stream_read_ +#define _di_f_file_stream_read_block_ +#define _di_f_file_stream_read_until_ +#define _di_f_file_stream_reopen_ +//#define _di_f_file_stream_unlock_ +#define _di_f_file_stream_write_ +#define _di_f_file_stream_write_block_ +#define _di_f_file_stream_write_range +#define _di_f_file_stream_write_range_ +#define _di_f_file_stream_write_until +#define _di_f_file_stream_write_until_ +//#define _di_f_file_t_ +#define _di_f_file_touch_ +#define _di_f_file_touch_at_ +#define _di_f_file_type_ +#define _di_f_file_type_at_ +//#define _di_f_file_type_d_ +#define _di_f_file_type_name_block_s_ +#define _di_f_file_type_name_character_s_ +#define _di_f_file_type_name_directory_s_ +#define _di_f_file_type_name_fifo_s_ +#define _di_f_file_type_name_file_s_ +#define _di_f_file_type_name_link_s_ +#define _di_f_file_type_name_regular_s_ +#define _di_f_file_type_name_socket_s_ +#define _di_f_file_type_s_ +//#define _di_f_file_umask_get_ +#define _di_f_file_umask_set_ +#define _di_f_file_write_ +#define _di_f_file_write_block_ +#define _di_f_file_write_range +#define _di_f_file_write_range_ +#define _di_f_file_write_until +#define _di_f_file_write_until_ +#define _di_f_fll_ids_delete_callback_ +#define _di_f_fll_ids_destroy_callback_ +#define _di_f_fll_idss_delete_callback_ +#define _di_f_fll_idss_destroy_callback_ +#define _di_f_fll_idss_t_ +#define _di_f_fll_ids_t_ +#define _di_f_fll_id_t_ +#define _di_f_f_utf_space_em_per_four_s_ +#define _di_f_f_utf_space_em_per_six_s_ +#define _di_f_f_utf_space_em_per_three_s_ +#define _di_f_f_utf_space_em_quad_s_ +#define _di_f_f_utf_space_em_s_ +#define _di_f_f_utf_space_en_quad_s_ +#define _di_f_f_utf_space_en_s_ +#define _di_f_f_utf_space_figure_s_ +#define _di_f_f_utf_space_hair_s_ +#define _di_f_f_utf_space_ideographic_s_ +#define _di_f_f_utf_space_line_feed_reverse_s_ +#define _di_f_f_utf_space_line_next_s_ +#define _di_f_f_utf_space_medium_mathematical_s_ +#define _di_f_f_utf_space_no_break_narrow_s_ +#define _di_f_f_utf_space_no_break_s_ +#define _di_f_f_utf_space_ogham_s_ +#define _di_f_f_utf_space_punctuation_s_ +#define _di_f_f_utf_space_separator_line_s_ +#define _di_f_f_utf_space_separator_paragraph_s_ +#define _di_f_f_utf_space_thin_s_ +#define _di_f_f_utf_substitute_middle_dot_s_ +#define _di_f_f_utf_substitute_open_box_s_ +#define _di_f_f_utf_substitute_open_box_shouldered_s_ +#define _di_f_f_utf_substitute_symbol_blank_s_ +#define _di_f_f_utf_substitute_symbol_space_s_ +#define _di_f_int128ss_delete_callback_ +#define _di_f_int128ss_destroy_callback_ +#define _di_f_int128ss_t_ +#define _di_f_int128s_t_ +//#define _di_f_int128_t_ +#define _di_f_int16ss_delete_callback_ +#define _di_f_int16ss_destroy_callback_ +#define _di_f_int16ss_t_ +#define _di_f_int16s_t_ +#define _di_f_int32ss_delete_callback_ +#define _di_f_int32ss_destroy_callback_ +#define _di_f_int32ss_t_ +#define _di_f_int32s_t_ +#define _di_f_int64ss_delete_callback_ +#define _di_f_int64ss_destroy_callback_ +#define _di_f_int64ss_t_ +#define _di_f_int64s_t_ +#define _di_f_int8ss_delete_callback_ +#define _di_f_int8ss_destroy_callback_ +#define _di_f_int8ss_t_ +#define _di_f_int8s_t_ +//#define _di_fll_error_file_flag_e_ +#define _di_fll_error_file_print_ +#define _di_fll_error_file_type_directory_s_ +#define _di_fll_error_file_type_e_ +#define _di_fll_error_file_type_file_s_ +#define _di_fll_error_file_type_link_s_ +#define _di_fll_error_file_type_path_s_ +#define _di_fll_error_file_type_pipe_s_ +#define _di_fll_error_file_type_s_ +#define _di_fll_error_file_type_socket_s_ +#define _di_fll_error_parameter_integer_print_ +//#define _di_fll_error_print_ +#define _di_fll_print_ +#define _di_fll_print_character_ +#define _di_fll_print_character_safely_ +#define _di_fll_print_dynamic_ +#define _di_fll_print_dynamic_partial_ +#define _di_fll_print_dynamic_partial_raw_ +#define _di_fll_print_dynamic_partial_raw_safely_ +#define _di_fll_print_dynamic_partial_safely_ +//#define _di_fll_print_dynamic_raw_ +#define _di_fll_print_dynamic_raw_safely_ +#define _di_fll_print_dynamic_safely_ +#define _di_fll_print_except_ +#define _di_fll_print_except_dynamic_ +#define _di_fll_print_except_dynamic_partial_ +#define _di_fll_print_except_dynamic_partial_raw_ +#define _di_fll_print_except_dynamic_partial_raw_safely_ +#define _di_fll_print_except_dynamic_partial_safely_ +#define _di_fll_print_except_dynamic_raw_ +#define _di_fll_print_except_dynamic_raw_safely_ +#define _di_fll_print_except_dynamic_safely_ +#define _di_fll_print_except_in_ +#define _di_fll_print_except_in_dynamic_ +#define _di_fll_print_except_in_dynamic_partial_ +#define _di_fll_print_except_in_dynamic_partial_raw_ +#define _di_fll_print_except_in_dynamic_partial_raw_safely_ +#define _di_fll_print_except_in_dynamic_partial_safely_ +#define _di_fll_print_except_in_dynamic_raw_ +#define _di_fll_print_except_in_dynamic_raw_safely_ +#define _di_fll_print_except_in_dynamic_safely_ +#define _di_fll_print_except_in_raw_ +#define _di_fll_print_except_in_raw_safely_ +#define _di_fll_print_except_in_safely_ +#define _di_fll_print_except_raw_ +#define _di_fll_print_except_raw_safely_ +#define _di_fll_print_except_safely_ +#define _di_fll_print_format_ +#define _di_fll_print_format_convert_ +#define _di_fll_print_raw_ +#define _di_fll_print_raw_safely_ +#define _di_fll_print_raw_terminated_ +#define _di_fll_print_safely_ +#define _di_fll_print_safely_terminated_ +#define _di_fll_print_string_va_ +#define _di_fll_print_terminated_ +#define _di_fll_print_trim_ +#define _di_fll_print_trim_dynamic_ +#define _di_fll_print_trim_dynamic_partial_ +#define _di_fll_print_trim_dynamic_partial_raw_ +#define _di_fll_print_trim_dynamic_partial_raw_safely_ +#define _di_fll_print_trim_dynamic_partial_safely_ +#define _di_fll_print_trim_dynamic_raw_ +#define _di_fll_print_trim_dynamic_raw_safely_ +#define _di_fll_print_trim_dynamic_safely_ +#define _di_fll_print_trim_except_ +#define _di_fll_print_trim_except_dynamic_ +#define _di_fll_print_trim_except_dynamic_partial_ +#define _di_fll_print_trim_except_dynamic_partial_raw_ +#define _di_fll_print_trim_except_dynamic_partial_raw_safely_ +#define _di_fll_print_trim_except_dynamic_partial_safely_ +#define _di_fll_print_trim_except_dynamic_raw_ +#define _di_fll_print_trim_except_dynamic_raw_safely_ +#define _di_fll_print_trim_except_dynamic_safely_ +#define _di_fll_print_trim_except_in_ +#define _di_fll_print_trim_except_in_dynamic_ +#define _di_fll_print_trim_except_in_dynamic_partial_ +#define _di_fll_print_trim_except_in_dynamic_partial_raw_ +#define _di_fll_print_trim_except_in_dynamic_partial_raw_safely_ +#define _di_fll_print_trim_except_in_dynamic_partial_safely_ +#define _di_fll_print_trim_except_in_dynamic_raw_ +#define _di_fll_print_trim_except_in_dynamic_raw_safely_ +#define _di_fll_print_trim_except_in_dynamic_safely_ +#define _di_fll_print_trim_except_in_raw_ +#define _di_fll_print_trim_except_in_raw_safely_ +#define _di_fll_print_trim_except_in_safely_ +#define _di_fll_print_trim_except_raw_ +#define _di_fll_print_trim_except_raw_safely_ +#define _di_fll_print_trim_except_safely_ +#define _di_fll_print_trim_raw_ +#define _di_fll_print_trim_raw_safely_ +#define _di_fll_print_trim_safely_ +//#define _di_fll_program_data_delete_ +#define _di_fll_program_data_destroy_ +//#define _di_fll_program_data_pipe_e_ +//#define _di_fll_program_data_t_ +#define _di_fll_program_parameter_additional_append_ +#define _di_fll_program_parameter_additional_mash_ +#define _di_fll_program_parameter_additional_rip_ +#define _di_fll_program_parameter_additional_rip_mash_ +#define _di_fll_program_parameter_filename_s_ +#define _di_fll_program_parameter_filenames_s_ +#define _di_fll_program_parameter_process_context_ +//#define _di_fll_program_parameter_process_context_standard_ +#define _di_fll_program_parameter_process_empty_ +#define _di_fll_program_parameter_process_verbosity_ +//#define _di_fll_program_parameter_process_verbosity_standard_ +#define _di_fll_program_parameter_s_ +//#define _di_fll_program_print_copyright_ +#define _di_fll_program_print_error_missing_file_ +#define _di_fll_program_print_error_missing_variable_not_zero_ +#define _di_fll_program_print_error_parameter_allows_either_xor_ +#define _di_fll_program_print_error_parameter_both_specified_same_amount_ +#define _di_fll_program_print_error_parameter_both_specified_same_amount_without_ +#define _di_fll_program_print_error_parameter_cannot_use_with_ +#define _di_fll_program_print_error_parameter_cannot_use_with_pipe_ +#define _di_fll_program_print_error_parameter_cannot_use_with_without_ +#define _di_fll_program_print_error_parameter_cannot_use_with_xor_ +#define _di_fll_program_print_error_parameter_empty_value_ +#define _di_fll_program_print_error_parameter_integer_less_than_ +#define _di_fll_program_print_error_parameter_integer_more_than_ +#define _di_fll_program_print_error_parameter_integer_not_ +#define _di_fll_program_print_error_parameter_integer_not_negative_ +#define _di_fll_program_print_error_parameter_integer_not_positive_ +#define _di_fll_program_print_error_parameter_missing_value_ +#define _di_fll_program_print_error_parameter_missing_value_requires_amount_ +#define _di_fll_program_print_error_parameter_must_specify_once_ +#define _di_fll_program_print_error_parameter_must_specify_once_value_ +#define _di_fll_program_print_error_parameter_process_ +#define _di_fll_program_print_error_parameter_range_start_before_stop_ +#define _di_fll_program_print_error_parameter_value_too_long_ +#define _di_fll_program_print_error_pipe_invalid_form_feed_ +#define _di_fll_program_print_error_pipe_missing_content_ +#define _di_fll_program_print_error_pipe_object_without_content_ +//#define _di_fll_program_print_help_header_ +#define _di_fll_program_print_help_operations_ +//#define _di_fll_program_print_help_option_ +#define _di_fll_program_print_help_option_long_ +#define _di_fll_program_print_help_option_other_ +//#define _di_fll_program_print_help_option_standard_ +#define _di_fll_program_print_help_special_options_ +//#define _di_fll_program_print_help_usage_ +//#define _di_fll_program_print_signal_received_ +//#define _di_fll_program_print_version_ +//#define _di_fll_program_standard_set_down_ +//#define _di_fll_program_standard_set_up_ +//#define _di_fll_program_standard_signal_handle_ +//#define _di_fll_program_standard_signal_received_ +//#define _di_fl_print_debug_s_ +//#define _di_fl_print_error_s_ +//#define _di_fl_print_format_ +#define _di_fl_print_format_convert_ +//#define _di_fl_print_s_ +//#define _di_fl_print_string_va_ +//#define _di_fl_print_t_ +#define _di_fl_print_trim_ +#define _di_fl_print_trim_dynamic_ +#define _di_fl_print_trim_dynamic_partial_ +#define _di_fl_print_trim_dynamic_partial_raw_ +#define _di_fl_print_trim_dynamic_partial_raw_safely_ +#define _di_fl_print_trim_dynamic_partial_safely_ +#define _di_fl_print_trim_dynamic_raw_ +#define _di_fl_print_trim_dynamic_raw_safely_ +#define _di_fl_print_trim_dynamic_safely_ +#define _di_fl_print_trim_except_ +#define _di_fl_print_trim_except_dynamic_ +#define _di_fl_print_trim_except_dynamic_partial_ +#define _di_fl_print_trim_except_dynamic_partial_raw_ +#define _di_fl_print_trim_except_dynamic_partial_raw_safely_ +#define _di_fl_print_trim_except_dynamic_partial_safely_ +#define _di_fl_print_trim_except_dynamic_raw_ +#define _di_fl_print_trim_except_dynamic_raw_safely_ +#define _di_fl_print_trim_except_dynamic_safely_ +#define _di_fl_print_trim_except_in_ +#define _di_fl_print_trim_except_in_dynamic_ +#define _di_fl_print_trim_except_in_dynamic_partial_ +#define _di_fl_print_trim_except_in_dynamic_partial_raw_ +#define _di_fl_print_trim_except_in_dynamic_partial_raw_safely_ +#define _di_fl_print_trim_except_in_dynamic_partial_safely_ +#define _di_fl_print_trim_except_in_dynamic_raw_ +#define _di_fl_print_trim_except_in_dynamic_raw_safely_ +#define _di_fl_print_trim_except_in_dynamic_safely_ +#define _di_fl_print_trim_except_in_raw_ +#define _di_fl_print_trim_except_in_raw_safely_ +#define _di_fl_print_trim_except_in_safely_ +#define _di_fl_print_trim_except_raw_ +#define _di_fl_print_trim_except_raw_safely_ +#define _di_fl_print_trim_except_safely_ +#define _di_fl_print_trim_raw_ +#define _di_fl_print_trim_raw_safely_ +#define _di_fl_print_trim_safely_ +//#define _di_fl_print_warning_s_ +#define _di_f_memory_adjust_ +#define _di_f_memory_array_adjust_ +#define _di_f_memory_array_append_ +#define _di_f_memory_array_append_all_ +#define _di_f_memory_array_decimate_by_ +#define _di_f_memory_array_decrease_by_ +//#define _di_f_memory_array_increase_ +//#define _di_f_memory_array_increase_by_ +//#define _di_f_memory_array_resize_ +#define _di_f_memory_arrays_adjust_ +//#define _di_f_memory_arrays_resize_ +//#define _di_f_memory_default_d_ +//#define _di_f_memory_delete_ +#define _di_f_memory_destroy_ +#define _di_f_memory_new_ +#define _di_f_memory_new_aligned_ +//#define _di_f_memory_resize_ +#define _di_f_mode_t_ +#define _di_f_number_signedss_delete_callback_ +#define _di_f_number_signedss_destroy_callback_ +#define _di_f_number_signedss_t_ +#define _di_f_number_signeds_t_ +#define _di_f_number_unsignedss_delete_callback_ +#define _di_f_number_unsignedss_destroy_callback_ +#define _di_f_number_unsignedss_t_ +//#define _di_f_number_unsigneds_t_ +#define _di_f_pipe_error_exists_ +//#define _di_f_pipe_input_exists_ +#define _di_f_pipe_output_exists_ +#define _di_f_poll_e_ +#define _di_f_pollss_delete_callback_ +#define _di_f_pollss_destroy_callback_ +#define _di_f_pollss_t_ +#define _di_f_polls_t_ +//#define _di_f_poll_t_ +//#define _di_f_print_ +#define _di_f_print_character_ +#define _di_f_print_character_safely_ +#define _di_f_print_character_safely_get_ +//#define _di_f_print_dynamic_ +#define _di_f_print_dynamic_partial_ +#define _di_f_print_dynamic_partial_raw_ +#define _di_f_print_dynamic_partial_raw_safely_ +#define _di_f_print_dynamic_partial_safely_ +#define _di_f_print_dynamic_partial_to_ +#define _di_f_print_dynamic_partial_to_raw_ +#define _di_f_print_dynamic_partial_to_raw_safely_ +#define _di_f_print_dynamic_partial_to_safely_ +//#define _di_f_print_dynamic_raw_ +//#define _di_f_print_dynamic_raw_safely_ +//#define _di_f_print_dynamic_safely_ +#define _di_f_print_dynamic_to_ +#define _di_f_print_dynamic_to_raw_ +#define _di_f_print_except_ +#define _di_f_print_except_dynamic_ +#define _di_f_print_except_dynamic_partial_ +#define _di_f_print_except_dynamic_partial_raw_ +#define _di_f_print_except_dynamic_partial_raw_safely_ +#define _di_f_print_except_dynamic_partial_safely_ +#define _di_f_print_except_dynamic_raw_ +#define _di_f_print_except_dynamic_raw_safely_ +#define _di_f_print_except_dynamic_safely_ +//#define _di_f_print_except_in_ +//#define _di_f_print_except_in_dynamic_ +#define _di_f_print_except_in_dynamic_partial_ +#define _di_f_print_except_in_dynamic_partial_raw_ +#define _di_f_print_except_in_dynamic_partial_raw_safely_ +#define _di_f_print_except_in_dynamic_partial_safely_ +//#define _di_f_print_except_in_dynamic_raw_ +//#define _di_f_print_except_in_dynamic_raw_safely_ +//#define _di_f_print_except_in_dynamic_safely_ +//#define _di_f_print_except_in_raw_ +//#define _di_f_print_except_in_raw_safely_ +//#define _di_f_print_except_in_safely_ +#define _di_f_print_except_raw_ +#define _di_f_print_except_raw_safely_ +#define _di_f_print_except_safely_ +//#define _di_f_print_format_flag_d_ +//#define _di_f_print_format_type_e_ +//#define _di_f_print_raw_ +//#define _di_f_print_raw_safely_ +#define _di_f_print_raw_terminated_ +//#define _di_f_print_safely_ +#define _di_f_print_safely_get_ +//#define _di_f_print_safely_terminated_ +//#define _di_f_print_sequence_acknowledge_negative_s_ +//#define _di_f_print_sequence_acknowledge_s_ +//#define _di_f_print_sequence_backspace_s_ +//#define _di_f_print_sequence_bell_s_ +//#define _di_f_print_sequence_cancel_s_ +//#define _di_f_print_sequence_carriage_return_s_ +//#define _di_f_print_sequence_data_link_escape_s_ +//#define _di_f_print_sequence_delete_s_ +//#define _di_f_print_sequence_device_control_1_s_ +//#define _di_f_print_sequence_device_control_2_s_ +//#define _di_f_print_sequence_device_control_3_s_ +//#define _di_f_print_sequence_device_control_4_s_ +//#define _di_f_print_sequence_end_of_medium_s_ +//#define _di_f_print_sequence_end_of_text_s_ +//#define _di_f_print_sequence_end_of_transmission_block_s_ +//#define _di_f_print_sequence_end_of_transmission_s_ +//#define _di_f_print_sequence_enquiry_s_ +//#define _di_f_print_sequence_escape_s_ +//#define _di_f_print_sequence_form_feed_s_ +//#define _di_f_print_sequence_line_feed_s_ +//#define _di_f_print_sequence_line_new_s_ +//#define _di_f_print_sequence_null_s_ +//#define _di_f_print_sequence_s_ +//#define _di_f_print_sequence_separator_file_s_ +//#define _di_f_print_sequence_separator_group_s_ +//#define _di_f_print_sequence_separator_record_s_ +//#define _di_f_print_sequence_separator_unit_s_ +//#define _di_f_print_sequence_shift_in_s_ +//#define _di_f_print_sequence_shift_out_s_ +//#define _di_f_print_sequence_space_s_ +//#define _di_f_print_sequences_set_control_s_ +//#define _di_f_print_sequence_start_of_header_s_ +//#define _di_f_print_sequence_start_of_text_s_ +//#define _di_f_print_sequence_substitute_s_ +//#define _di_f_print_sequence_synchronous_idle_s_ +//#define _di_f_print_sequence_tab_s_ +//#define _di_f_print_sequence_tab_vertical_s_ +//#define _di_f_print_sequence_unknown_s_ +//#define _di_f_print_terminated_ +#define _di_f_print_to_ +#define _di_f_print_to_character_ +#define _di_f_print_to_character_safely_ +#define _di_f_print_to_dynamic_ +#define _di_f_print_to_dynamic_partial_ +#define _di_f_print_to_dynamic_partial_raw_ +#define _di_f_print_to_dynamic_partial_raw_safely_ +#define _di_f_print_to_dynamic_partial_safely_ +#define _di_f_print_to_dynamic_raw_ +#define _di_f_print_to_dynamic_raw_safely_ +#define _di_f_print_to_dynamic_safely_ +#define _di_f_print_to_except_ +#define _di_f_print_to_except_dynamic_ +#define _di_f_print_to_except_dynamic_in_ +#define _di_f_print_to_except_dynamic_in_raw_ +#define _di_f_print_to_except_dynamic_in_raw_safely_ +#define _di_f_print_to_except_dynamic_in_safely_ +#define _di_f_print_to_except_dynamic_partial_ +#define _di_f_print_to_except_dynamic_partial_raw_ +#define _di_f_print_to_except_dynamic_partial_raw_safely_ +#define _di_f_print_to_except_dynamic_partial_safely_ +#define _di_f_print_to_except_dynamic_raw_ +#define _di_f_print_to_except_dynamic_raw_safely_ +#define _di_f_print_to_except_dynamic_safely_ +#define _di_f_print_to_except_in_ +#define _di_f_print_to_except_in_dynamic_ +#define _di_f_print_to_except_in_dynamic_partial_ +#define _di_f_print_to_except_in_dynamic_partial_raw_ +#define _di_f_print_to_except_in_dynamic_partial_raw_safely_ +#define _di_f_print_to_except_in_dynamic_partial_safely_ +#define _di_f_print_to_except_in_dynamic_raw_ +#define _di_f_print_to_except_in_dynamic_raw_safely_ +#define _di_f_print_to_except_in_dynamic_safely_ +#define _di_f_print_to_except_in_raw_ +#define _di_f_print_to_except_in_raw_safely_ +#define _di_f_print_to_except_in_safely_ +#define _di_f_print_to_except_raw_ +#define _di_f_print_to_except_raw_safely_ +#define _di_f_print_to_except_safely_ +#define _di_f_print_to_raw_ +#define _di_f_print_to_raw_safely_ +#define _di_f_print_to_raw_terminated_ +#define _di_f_print_to_safely_ +#define _di_f_print_to_safely_dynamic_ +#define _di_f_print_to_safely_dynamic_partial_ +#define _di_f_print_to_safely_terminated_ +#define _di_f_print_to_terminated_ +//#define _di_f_print_write_max_d_ +#define _di_f_quantity_empty_c_ +#define _di_f_quantitys_append_ +#define _di_f_quantitys_append_all_ +#define _di_f_quantityss_append_ +#define _di_f_quantityss_append_all_ +#define _di_f_quantityss_delete_callback_ +#define _di_f_quantityss_destroy_callback_ +#define _di_f_quantityss_t_ +#define _di_f_quantitys_t_ +#define _di_f_quantity_t_ +#define _di_f_range_double_empty_c_ +#define _di_f_range_doubles_append_ +#define _di_f_range_doubles_append_all_ +#define _di_f_range_doubless_append_ +#define _di_f_range_doubless_append_all_ +#define _di_f_range_doubless_delete_callback_ +#define _di_f_range_doubless_destroy_callback_ +#define _di_f_range_doubless_t_ +#define _di_f_range_doubles_t_ +#define _di_f_range_double_t_ +#define _di_f_range_empty_c_ +#define _di_f_ranges_append_ +#define _di_f_ranges_append_all_ +#define _di_f_rangess_append_ +#define _di_f_rangess_append_all_ +#define _di_f_rangess_delete_callback_ +#define _di_f_rangess_destroy_callback_ +#define _di_f_rangess_t_ +//#define _di_f_ranges_t_ +//#define _di_f_range_t_ +#define _di_f_rip_ +#define _di_f_rip_dynamic_ +#define _di_f_rip_dynamic_nulless_ +#define _di_f_rip_dynamic_partial_ +#define _di_f_rip_dynamic_partial_nulless_ +#define _di_f_rip_nulless_ +#define _di_f_rip_utf_ +#define _di_f_rip_utf_dynamic_ +#define _di_f_rip_utf_dynamic_nulless_ +#define _di_f_rip_utf_nulless_ +#define _di_f_signal_action_ +//#define _di_f_signal_close_ +//#define _di_f_signal_how_t_ +//#define _di_f_signal_mask_ +//#define _di_f_signal_open_ +#define _di_f_signal_pause_ +#define _di_f_signal_queue_ +//#define _di_f_signal_read_ +#define _di_f_signal_send_ +//#define _di_f_signal_set_add_ +//#define _di_f_signal_set_delete_ +//#define _di_f_signal_set_empty_ +//#define _di_f_signal_set_fill_ +#define _di_f_signal_set_has_ +#define _di_f_signal_suspend_ +//#define _di_f_signal_t_ +//#define _di_f_signal_wait_ +#define _di_f_signal_wait_until_ +#define _di_f_statess_delete_callback_ +#define _di_f_statess_destroy_callback_ +#define _di_f_statess_t_ +#define _di_f_states_t_ +//#define _di_f_state_t_ +//#define _di_f_status_e_ +//#define _di_f_status_mask_d_ +#define _di_f_statusss_delete_callback_ +#define _di_f_statusss_destroy_callback_ +#define _di_f_statusss_t_ +#define _di_f_statuss_t_ +//#define _di_f_status_t_ +#define _di_f_string_append_ +#define _di_f_string_append_assure_ +#define _di_f_string_append_assure_nulless_ +#define _di_f_string_append_nulless_ +//#define _di_f_string_ascii_s_ +#define _di_f_string_constant_t_ +#define _di_f_string_dynamic_append_ +#define _di_f_string_dynamic_append_assure_ +#define _di_f_string_dynamic_append_assure_nulless_ +#define _di_f_string_dynamic_append_nulless_ +#define _di_f_string_dynamic_mash_ +#define _di_f_string_dynamic_mash_nulless_ +#define _di_f_string_dynamic_mish_ +#define _di_f_string_dynamic_mish_nulless_ +#define _di_f_string_dynamic_partial_append_ +#define _di_f_string_dynamic_partial_append_assure_ +#define _di_f_string_dynamic_partial_append_assure_nulless_ +#define _di_f_string_dynamic_partial_append_nulless_ +#define _di_f_string_dynamic_partial_mash_ +#define _di_f_string_dynamic_partial_mash_nulless_ +#define _di_f_string_dynamic_partial_mish_ +#define _di_f_string_dynamic_partial_mish_nulless_ +#define _di_f_string_dynamic_partial_prepend_ +#define _di_f_string_dynamic_partial_prepend_assure_ +#define _di_f_string_dynamic_partial_prepend_assure_nulless +#define _di_f_string_dynamic_partial_prepend_assure_nulless_ +#define _di_f_string_dynamic_partial_prepend_nulless +#define _di_f_string_dynamic_partial_prepend_nulless_ +#define _di_f_string_dynamic_prepend_ +#define _di_f_string_dynamic_prepend_assure_ +#define _di_f_string_dynamic_prepend_assure_nulless_ +#define _di_f_string_dynamic_prepend_nulless_ +#define _di_f_string_dynamics_append_ +#define _di_f_string_dynamics_append_all_ +//#define _di_f_string_dynamics_delete_callback_ +#define _di_f_string_dynamics_destroy_callback_ +#define _di_f_string_dynamic_seek_line_ +#define _di_f_string_dynamic_seek_line_to_ +#define _di_f_string_dynamic_seek_to_ +#define _di_f_string_dynamicss_append_ +#define _di_f_string_dynamicss_append_all_ +#define _di_f_string_dynamicss_delete_callback_ +#define _di_f_string_dynamicss_destroy_callback_ +#define _di_f_string_dynamicss_t_ +//#define _di_f_string_dynamics_t_ +#define _di_f_string_dynamic_strip_null_ +#define _di_f_string_dynamic_strip_null_range_ +//#define _di_f_string_dynamic_t_ +#define _di_f_string_dynamic_terminate_ +#define _di_f_string_dynamic_terminate_after_ +//#define _di_f_string_empty_s_ +//#define _di_f_string_eol_s_ +//#define _di_f_string_format_s_ +#define _di_f_string_map_multis_append_ +#define _di_f_string_map_multis_append_all_ +#define _di_f_string_map_multis_delete_callback_ +#define _di_f_string_map_multis_destroy_callback_ +#define _di_f_string_map_multiss_append_ +#define _di_f_string_map_multiss_append_all_ +#define _di_f_string_map_multiss_delete_callback_ +#define _di_f_string_map_multiss_destroy_callback_ +#define _di_f_string_map_multiss_t_ +#define _di_f_string_map_multis_t_ +#define _di_f_string_map_multi_t_ +#define _di_f_string_maps_append_ +#define _di_f_string_maps_append_all_ +#define _di_f_string_maps_delete_callback_ +#define _di_f_string_maps_destroy_callback_ +#define _di_f_string_mapss_append_ +#define _di_f_string_mapss_append_all_ +#define _di_f_string_mapss_delete_callback_ +#define _di_f_string_mapss_destroy_callback_ +#define _di_f_string_mapss_t_ +#define _di_f_string_maps_t_ +#define _di_f_string_map_t_ +#define _di_f_string_mash_ +#define _di_f_string_mash_nulless_ +#define _di_f_string_mish_ +#define _di_f_string_mish_nulless_ +//#define _di_f_string_null_s_ +//#define _di_f_string_placeholder_s_ +#define _di_f_string_prepend_ +#define _di_f_string_prepend_assure_ +#define _di_f_string_prepend_assure_nulless_ +#define _di_f_string_prepend_nulless_ +#define _di_f_string_seek_line_ +#define _di_f_string_seek_line_to_ +#define _di_f_string_seek_to_ +#define _di_f_string_space_s_ +#define _di_f_string_staticss_t_ +//#define _di_f_string_statics_t_ +//#define _di_f_string_static_t_ +//#define _di_f_string_t_ +#define _di_f_string_triples_append_ +#define _di_f_string_triples_append_all_ +#define _di_f_string_triples_delete_callback_ +#define _di_f_string_triples_destroy_callback_ +#define _di_f_string_tripless_append_ +#define _di_f_string_tripless_append_all_ +#define _di_f_string_tripless_delete_callback_ +#define _di_f_string_tripless_destroy_callback_ +#define _di_f_string_tripless_t_ +#define _di_f_string_triples_t_ +#define _di_f_string_triple_t_ +#define _di_f_thread_at_fork_ +#define _di_f_thread_attribute_affinity_get_ +#define _di_f_thread_attribute_affinity_set_ +#define _di_f_thread_attribute_concurrency_get_ +#define _di_f_thread_attribute_concurrency_set_ +#define _di_f_thread_attribute_create_ +#define _di_f_thread_attribute_default_get_ +#define _di_f_thread_attribute_default_set_ +#define _di_f_thread_attribute_delete_ +#define _di_f_thread_attribute_detach_get_ +#define _di_f_thread_attribute_detach_set_ +#define _di_f_thread_attribute_guard_get_ +#define _di_f_thread_attribute_guard_set_ +#define _di_f_thread_attribute_scheduler_inherit_get_ +#define _di_f_thread_attribute_scheduler_inherit_set_ +#define _di_f_thread_attribute_scheduler_parameter_get_ +#define _di_f_thread_attribute_scheduler_parameter_set_ +#define _di_f_thread_attribute_scheduler_policy_get_ +#define _di_f_thread_attribute_scheduler_policy_set_ +#define _di_f_thread_attribute_scope_get_ +#define _di_f_thread_attribute_scope_set_ +#define _di_f_thread_attributes_delete_callback_ +#define _di_f_thread_attributes_destroy_callback_ +#define _di_f_thread_attributess_delete_callback_ +#define _di_f_thread_attributess_destroy_callback_ +#define _di_f_thread_attributes_t_ +#define _di_f_thread_attribute_stack_get_ +#define _di_f_thread_attribute_stack_set_ +#define _di_f_thread_attribute_stack_size_get_ +#define _di_f_thread_attribute_stack_size_set_ +//#define _di_f_thread_attribute_t_ +#define _di_f_thread_barrier_attribute_create_ +#define _di_f_thread_barrier_attribute_delete_ +#define _di_f_thread_barrier_attributes_delete_callback_ +#define _di_f_thread_barrier_attributes_destroy_callback_ +#define _di_f_thread_barrier_attribute_shared_get_ +#define _di_f_thread_barrier_attribute_shared_set_ +#define _di_f_thread_barrier_attributess_delete_callback_ +#define _di_f_thread_barrier_attributess_destroy_callback_ +#define _di_f_thread_barrier_attributes_t_ +#define _di_f_thread_barrier_attribute_t_ +#define _di_f_thread_barrier_create_ +#define _di_f_thread_barrier_delete_ +#define _di_f_thread_barriers_delete_callback_ +#define _di_f_thread_barriers_destroy_callback_ +#define _di_f_thread_barrierss_delete_callback_ +#define _di_f_thread_barrierss_destroy_callback_ +#define _di_f_thread_barriers_t_ +#define _di_f_thread_barrier_t_ +#define _di_f_thread_barrier_wait_ +#define _di_f_thread_caller_ +//#define _di_f_thread_cancel_ +//#define _di_f_thread_cancel_state_set_ +#define _di_f_thread_cancel_test_ +#define _di_f_thread_cancel_type_set_ +#define _di_f_thread_clock_get_id_ +#define _di_f_thread_compare_ +#define _di_f_thread_condition_attribute_clock_get_ +#define _di_f_thread_condition_attribute_clock_set_ +#define _di_f_thread_condition_attribute_create_ +#define _di_f_thread_condition_attribute_delete_ +#define _di_f_thread_condition_attributes_delete_callback_ +#define _di_f_thread_condition_attributes_destroy_callback_ +#define _di_f_thread_condition_attribute_shared_get_ +#define _di_f_thread_condition_attribute_shared_set_ +#define _di_f_thread_condition_attributess_delete_callback_ +#define _di_f_thread_condition_attributess_destroy_callback_ +#define _di_f_thread_condition_attributes_t_ +#define _di_f_thread_condition_attribute_t_ +#define _di_f_thread_condition_create_ +#define _di_f_thread_condition_delete_ +#define _di_f_thread_conditions_delete_callback_ +#define _di_f_thread_conditions_destroy_callback_ +#define _di_f_thread_condition_signal_ +#define _di_f_thread_condition_signal_all_ +#define _di_f_thread_conditionss_delete_callback_ +#define _di_f_thread_conditionss_destroy_callback_ +#define _di_f_thread_conditions_t_ +#define _di_f_thread_condition_t_ +#define _di_f_thread_condition_wait_ +#define _di_f_thread_condition_wait_timed_ +//#define _di_f_thread_create_ +#define _di_f_thread_detach_ +#define _di_f_thread_exit_ +#define _di_f_thread_ids_t_ +//#define _di_f_thread_id_t_ +//#define _di_f_thread_join_ +#define _di_f_thread_join_timed_ +#define _di_f_thread_join_try_ +#define _di_f_thread_key_create_ +#define _di_f_thread_key_delete_ +#define _di_f_thread_key_get_ +#define _di_f_thread_keys_delete_callback_ +#define _di_f_thread_keys_destroy_callback_ +#define _di_f_thread_key_set_ +#define _di_f_thread_keyss_delete_callback_ +#define _di_f_thread_keyss_destroy_callback_ +#define _di_f_thread_keys_t_ +#define _di_f_thread_key_t_ +#define _di_f_thread_lock_attribute_create_ +#define _di_f_thread_lock_attribute_delete_ +#define _di_f_thread_lock_attributes_delete_callback_ +#define _di_f_thread_lock_attributes_destroy_callback_ +#define _di_f_thread_lock_attribute_shared_get_ +#define _di_f_thread_lock_attribute_shared_set_ +#define _di_f_thread_lock_attributess_delete_callback_ +#define _di_f_thread_lock_attributess_destroy_callback_ +#define _di_f_thread_lock_attributes_t_ +#define _di_f_thread_lock_attribute_t_ +#define _di_f_thread_lock_create_ +#define _di_f_thread_lock_delete_ +#define _di_f_thread_lock_read_ +#define _di_f_thread_lock_read_timed_ +#define _di_f_thread_lock_read_try_ +#define _di_f_thread_locks_delete_callback_ +#define _di_f_thread_locks_destroy_callback_ +#define _di_f_thread_lockss_delete_callback_ +#define _di_f_thread_lockss_destroy_callback_ +#define _di_f_thread_locks_t_ +#define _di_f_thread_lock_t_ +#define _di_f_thread_lock_write_ +#define _di_f_thread_lock_write_timed_ +#define _di_f_thread_lock_write_try_ +#define _di_f_thread_mutex_attribute_create_ +#define _di_f_thread_mutex_attribute_delete_ +#define _di_f_thread_mutex_attribute_priority_ceiling_get_ +#define _di_f_thread_mutex_attribute_priority_ceiling_set_ +#define _di_f_thread_mutex_attribute_protocol_get_ +#define _di_f_thread_mutex_attribute_protocol_set_ +#define _di_f_thread_mutex_attributes_delete_callback_ +#define _di_f_thread_mutex_attributes_destroy_callback_ +#define _di_f_thread_mutex_attribute_shared_get_ +#define _di_f_thread_mutex_attribute_shared_set_ +#define _di_f_thread_mutex_attributess_delete_callback_ +#define _di_f_thread_mutex_attributess_destroy_callback_ +#define _di_f_thread_mutex_attributes_t_ +#define _di_f_thread_mutex_attribute_t_ +#define _di_f_thread_mutex_attribute_type_get_ +#define _di_f_thread_mutex_attribute_type_set_ +#define _di_f_thread_mutex_create_ +#define _di_f_thread_mutex_delete_ +#define _di_f_thread_mutex_lock_ +#define _di_f_thread_mutex_lock_timed_ +#define _di_f_thread_mutex_lock_try_ +#define _di_f_thread_mutex_priority_ceiling_get_ +#define _di_f_thread_mutex_priority_ceiling_set_ +#define _di_f_thread_mutexs_delete_callback_ +#define _di_f_thread_mutexs_destroy_callback_ +#define _di_f_thread_mutexss_delete_callback_ +#define _di_f_thread_mutexss_destroy_callback_ +#define _di_f_thread_mutexs_t_ +#define _di_f_thread_mutex_t_ +#define _di_f_thread_mutex_unlock_ +#define _di_f_thread_once_ +#define _di_f_thread_onces_t_ +#define _di_f_thread_once_t_ +#define _di_f_thread_scheduler_parameter_get_ +#define _di_f_thread_scheduler_parameter_set_ +#define _di_f_thread_scheduler_priority_set_ +#define _di_f_thread_semaphore_create_ +#define _di_f_thread_semaphore_delete_ +#define _di_f_thread_semaphore_file_close_ +#define _di_f_thread_semaphore_file_delete_ +#define _di_f_thread_semaphore_file_open_ +#define _di_f_thread_semaphore_lock_ +#define _di_f_thread_semaphore_lock_timed_ +#define _di_f_thread_semaphore_lock_try_ +#define _di_f_thread_semaphores_delete_callback_ +#define _di_f_thread_semaphores_destroy_callback_ +#define _di_f_thread_semaphoress_delete_callback_ +#define _di_f_thread_semaphoress_destroy_callback_ +#define _di_f_thread_semaphores_t_ +#define _di_f_thread_semaphore_t_ +#define _di_f_thread_semaphore_unlock_ +#define _di_f_thread_semaphore_value_get_ +#define _di_f_thread_sets_delete_callback_ +#define _di_f_thread_sets_destroy_callback_ +#define _di_f_thread_setss_delete_callback_ +#define _di_f_thread_setss_destroy_callback_ +#define _di_f_thread_sets_t_ +#define _di_f_thread_set_t_ +//#define _di_f_thread_signal_mask_ +#define _di_f_thread_signal_queue_ +#define _di_f_thread_signal_write_ +#define _di_f_thread_spin_create_ +#define _di_f_thread_spin_delete_ +#define _di_f_thread_spin_lock_ +#define _di_f_thread_spin_lock_try_ +#define _di_f_thread_spins_delete_callback_ +#define _di_f_thread_spins_destroy_callback_ +#define _di_f_thread_spinss_delete_callback_ +#define _di_f_thread_spinss_destroy_callback_ +#define _di_f_thread_spins_t_ +#define _di_f_thread_spin_t_ +#define _di_f_thread_spin_unlock_ +#define _di_f_thread_unlock_ +#define _di_f_time_spec_t_ +#define _di_f_time_t_ +//#define _di_f_type_d_ +//#define _di_f_type_file_defaults_d_ +//#define _di_f_type_file_flag_d_ +//#define _di_f_type_number_64_t_ +//#define _di_f_type_sizes_d_ +#define _di_f_uint128ss_delete_callback_ +#define _di_f_uint128ss_destroy_callback_ +#define _di_f_uint128ss_t_ +#define _di_f_uint128s_t_ +//#define _di_f_uint128_t_ +#define _di_f_uint16ss_delete_callback_ +#define _di_f_uint16ss_destroy_callback_ +#define _di_f_uint16ss_t_ +//#define _di_f_uint16s_t_ +#define _di_f_uint32ss_delete_callback_ +#define _di_f_uint32ss_destroy_callback_ +#define _di_f_uint32ss_t_ +#define _di_f_uint32s_t_ +#define _di_f_uint64ss_delete_callback_ +#define _di_f_uint64ss_destroy_callback_ +#define _di_f_uint64ss_t_ +#define _di_f_uint64s_t_ +#define _di_f_uint8ss_delete_callback_ +#define _di_f_uint8ss_destroy_callback_ +#define _di_f_uint8ss_t_ +#define _di_f_uint8s_t_ +#define _di_f_utf_buffer_decrement_ +#define _di_f_utf_buffer_increment_ +//#define _di_f_utf_byte_d_ +#define _di_f_utf_character_is_ +#define _di_f_utf_character_is_alphabetic_ +#define _di_f_utf_character_is_alphabetic_digit_ +#define _di_f_utf_character_is_alphabetic_numeric_ +#define _di_f_utf_character_is_ascii_ +#define _di_f_utf_character_is_combining_ +#define _di_f_utf_character_is_control_ +#define _di_f_utf_character_is_control_code_ +#define _di_f_utf_character_is_control_format_ +#define _di_f_utf_character_is_control_picture_ +#define _di_f_utf_character_is_digit_ +#define _di_f_utf_character_is_emoji_ +#define _di_f_utf_character_is_fragment_ +#define _di_f_utf_character_is_graph_ +#define _di_f_utf_character_is_numeric_ +#define _di_f_utf_character_is_phonetic_ +#define _di_f_utf_character_is_private_ +#define _di_f_utf_character_is_punctuation_ +#define _di_f_utf_character_is_subscript_ +#define _di_f_utf_character_is_superscript_ +#define _di_f_utf_character_is_symbol_ +#define _di_f_utf_character_is_unassigned_ +#define _di_f_utf_character_is_valid_ +#define _di_f_utf_character_is_value_ +#define _di_f_utf_character_is_whitespace_ +#define _di_f_utf_character_is_whitespace_modifier_ +#define _di_f_utf_character_is_whitespace_other_ +#define _di_f_utf_character_is_whitespace_zero_width_ +#define _di_f_utf_character_is_wide_ +#define _di_f_utf_character_is_word_ +#define _di_f_utf_character_is_word_dash_ +#define _di_f_utf_character_is_word_dash_plus_ +#define _di_f_utf_character_is_zero_width_ +#define _di_f_utf_character_unicode_from_ +#define _di_f_utf_character_unicode_string_to_ +#define _di_f_utf_character_unicode_to_ +#define _di_f_utf_char_eol_s_ +#define _di_f_utf_char_eos_s_ +#define _di_f_utf_char_placeholder_s_ +#define _di_f_utf_char_s_ +//#define _di_f_utf_char_t_ +#define _di_f_utf_char_to_char_ +//#define _di_f_utf_char_to_character_ +#define _di_f_utf_is_ +#define _di_f_utf_is_alphabetic_ +#define _di_f_utf_is_alphabetic_digit_ +#define _di_f_utf_is_alphabetic_numeric_ +#define _di_f_utf_is_ascii_ +//#define _di_f_utf_is_combining_ +//#define _di_f_utf_is_control_ +#define _di_f_utf_is_control_code_ +#define _di_f_utf_is_control_format_ +#define _di_f_utf_is_control_picture_ +#define _di_f_utf_is_digit_ +#define _di_f_utf_is_emoji_ +#define _di_f_utf_is_fragment_ +#define _di_f_utf_is_graph_ +#define _di_f_utf_is_numeric_ +#define _di_f_utf_is_phonetic_ +#define _di_f_utf_is_private_ +#define _di_f_utf_is_punctuation_ +#define _di_f_utf_is_subscript_ +#define _di_f_utf_is_superscript_ +#define _di_f_utf_is_symbol_ +#define _di_f_utf_is_unassigned_ +//#define _di_f_utf_is_valid_ +//#define _di_f_utf_is_whitespace_ +#define _di_f_utf_is_whitespace_modifier_ +#define _di_f_utf_is_whitespace_other_ +#define _di_f_utf_is_whitespace_zero_width_ +#define _di_f_utf_is_wide_ +#define _di_f_utf_is_word_ +#define _di_f_utf_is_word_dash_ +#define _di_f_utf_is_word_dash_plus_ +#define _di_f_utf_is_zero_width_ +#define _di_f_utf_space_em_per_four_s_ +#define _di_f_utf_space_em_per_six_s_ +#define _di_f_utf_space_em_per_three_s_ +#define _di_f_utf_space_em_quad_s_ +#define _di_f_utf_space_em_s_ +#define _di_f_utf_space_en_quad_s_ +#define _di_f_utf_space_en_s_ +#define _di_f_utf_space_figure_s_ +#define _di_f_utf_space_hair_s_ +#define _di_f_utf_space_ideographic_s_ +#define _di_f_utf_space_line_feed_reverse_s_ +#define _di_f_utf_space_line_next_s_ +#define _di_f_utf_space_medium_mathematical_s_ +#define _di_f_utf_space_no_break_narrow_s_ +#define _di_f_utf_space_no_break_s_ +#define _di_f_utf_space_ogham_s_ +#define _di_f_utf_space_punctuation_s_ +#define _di_f_utf_space_s_ +#define _di_f_utf_space_separator_line_s_ +#define _di_f_utf_space_separator_paragraph_s_ +#define _di_f_utf_space_thin_s_ +#define _di_f_utf_string_append_ +#define _di_f_utf_string_append_assure_ +#define _di_f_utf_string_append_assure_nulless_ +#define _di_f_utf_string_append_nulless_ +#define _di_f_utf_string_dynamic_append_ +#define _di_f_utf_string_dynamic_append_assure_ +#define _di_f_utf_string_dynamic_append_assure_nulless_ +#define _di_f_utf_string_dynamic_append_nulless_ +#define _di_f_utf_string_dynamic_mash_ +#define _di_f_utf_string_dynamic_mash_nulless_ +#define _di_f_utf_string_dynamic_mish_ +#define _di_f_utf_string_dynamic_mish_nulless_ +#define _di_f_utf_string_dynamic_partial_append_ +#define _di_f_utf_string_dynamic_partial_append_assure_ +#define _di_f_utf_string_dynamic_partial_append_assure_nulless_ +#define _di_f_utf_string_dynamic_partial_append_nulless_ +#define _di_f_utf_string_dynamic_partial_mash_ +#define _di_f_utf_string_dynamic_partial_mash_nulless_ +#define _di_f_utf_string_dynamic_partial_mish_ +#define _di_f_utf_string_dynamic_partial_mish_nulless_ +#define _di_f_utf_string_dynamic_partial_prepend_ +#define _di_f_utf_string_dynamic_partial_prepend_assure_ +#define _di_f_utf_string_dynamic_partial_prepend_assure_nulless +#define _di_f_utf_string_dynamic_partial_prepend_assure_nulless_ +#define _di_f_utf_string_dynamic_partial_prepend_nulless +#define _di_f_utf_string_dynamic_partial_prepend_nulless_ +#define _di_f_utf_string_dynamic_prepend_ +#define _di_f_utf_string_dynamic_prepend_assure_ +#define _di_f_utf_string_dynamic_prepend_assure_nulless_ +#define _di_f_utf_string_dynamic_prepend_nulless_ +#define _di_f_utf_string_dynamics_append_ +#define _di_f_utf_string_dynamics_append_all_ +#define _di_f_utf_string_dynamics_delete_callback_ +#define _di_f_utf_string_dynamics_destroy_callback_ +#define _di_f_utf_string_dynamic_seek_line_ +#define _di_f_utf_string_dynamic_seek_line_to_ +#define _di_f_utf_string_dynamic_seek_to_ +#define _di_f_utf_string_dynamicss_append_ +#define _di_f_utf_string_dynamicss_append_all_ +#define _di_f_utf_string_dynamicss_delete_callback_ +#define _di_f_utf_string_dynamicss_destroy_callback_ +#define _di_f_utf_string_dynamicss_t_ +#define _di_f_utf_string_dynamics_t_ +#define _di_f_utf_string_dynamic_t_ +#define _di_f_utf_string_dynamic_terminate_ +#define _di_f_utf_string_dynamic_terminate_after_ +#define _di_f_utf_string_empty_s_ +#define _di_f_utf_string_map_multis_append_ +#define _di_f_utf_string_map_multis_append_all_ +#define _di_f_utf_string_map_multis_delete_callback_ +#define _di_f_utf_string_map_multis_destroy_callback_ +#define _di_f_utf_string_map_multiss_append_ +#define _di_f_utf_string_map_multiss_append_all_ +#define _di_f_utf_string_map_multiss_delete_callback_ +#define _di_f_utf_string_map_multiss_destroy_callback_ +#define _di_f_utf_string_map_multiss_t_ +#define _di_f_utf_string_map_multis_t_ +#define _di_f_utf_string_map_multi_t_ +#define _di_f_utf_string_maps_append_ +#define _di_f_utf_string_maps_append_all_ +#define _di_f_utf_string_maps_delete_callback_ +#define _di_f_utf_string_maps_destroy_callback_ +#define _di_f_utf_string_mapss_append_ +#define _di_f_utf_string_mapss_append_all_ +#define _di_f_utf_string_mapss_delete_callback_ +#define _di_f_utf_string_mapss_destroy_callback_ +#define _di_f_utf_string_mapss_t_ +#define _di_f_utf_string_maps_t_ +#define _di_f_utf_string_map_t_ +#define _di_f_utf_string_mash_ +#define _di_f_utf_string_mash_nulless_ +#define _di_f_utf_string_mish_ +#define _di_f_utf_string_mish_nulless_ +#define _di_f_utf_string_prepend_ +#define _di_f_utf_string_prepend_assure_ +#define _di_f_utf_string_prepend_assure_nulless_ +#define _di_f_utf_string_prepend_nulless_ +#define _di_f_utf_string_seek_line_ +#define _di_f_utf_string_seek_line_to_ +#define _di_f_utf_string_seek_to_ +#define _di_f_utf_string_staticss_t_ +#define _di_f_utf_string_statics_t_ +#define _di_f_utf_string_static_t_ +#define _di_f_utf_string_t_ +#define _di_f_utf_string_triples_append_ +#define _di_f_utf_string_triples_append_all_ +#define _di_f_utf_string_triples_delete_callback_ +#define _di_f_utf_string_triples_destroy_callback_ +#define _di_f_utf_string_tripless_append_ +#define _di_f_utf_string_tripless_append_all_ +#define _di_f_utf_string_tripless_delete_callback_ +#define _di_f_utf_string_tripless_destroy_callback_ +#define _di_f_utf_string_tripless_t_ +#define _di_f_utf_string_triples_t_ +#define _di_f_utf_string_triple_t_ +#define _di_f_utf_substitute_middle_dot_s_ +#define _di_f_utf_substitute_open_box_s_ +#define _di_f_utf_substitute_open_box_shouldered_s_ +#define _di_f_utf_substitute_s_ +#define _di_f_utf_substitute_symbol_blank_s_ +#define _di_f_utf_substitute_symbol_space_s_ +#define _di_f_utf_unicode_from_ +#define _di_f_utf_unicode_string_to_ +#define _di_f_utf_unicode_to_ +#define _di_f_utf_width_e_ +#define _di_private_inline_f_print_to_error_ +#define _di_private_inline_private_f_print_to_error_ diff --git a/build/stand_alone/example.fakefile b/build/stand_alone/example.fakefile new file mode 100644 index 0000000..54ca35c --- /dev/null +++ b/build/stand_alone/example.fakefile @@ -0,0 +1,27 @@ +# fss-0005 iki-0002 + +settings: + fail exit + modes stand_alone clang test fanalyzer thread threadless + + environment PATH LD_LIBRARY_PATH + environment LANG LC_ALL LC_COLLATE LC_CTYPE LC_FASTMSG LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME LOCPATH NLSPATH + +main: + build + +install: + shell ./install.sh parameter:'work' parameter:'verbosity' parameter:'color' + +help: + print + print context:'title'Fakefile Options for Example Program.context:'reset' + + print + print The following operations are available\: + print " - context:'notable'help:context:'reset' Perform the help operation, printing this message." + print " - context:'notable'install:context:'reset' A helper operation that simply calls the ./install.sh script with default settings." + print " - context:'notable'main:context:'reset' The default compilation using the build settings mode." + + print + print The context:'notable'install context:'reset'operation supports the context:'notable'work,context:'reset' context:'notable'verbosity,context:'reset' and context:'notable'color context:'reset'parameters. diff --git a/build/stand_alone/example.settings b/build/stand_alone/example.settings new file mode 100644 index 0000000..87fa6c7 --- /dev/null +++ b/build/stand_alone/example.settings @@ -0,0 +1,113 @@ +# fss-0001 +# +# A custom build for compiling Example as a stand alone binary building in all of the FLL dependencies. +# This will compile a program that does not have a libexample.so library and builds all of the FLL dependencies into the resulting program. +# +# Modes: +# - stand_alone: The stand alone build mode, which in general should always be used. +# - clang: Use clang rather than the default, which is generally gcc. +# - test: Compile for a test, such as unit testing. +# - fanalyzer: Compile using GCC's -fanalyzer compile time option. +# - thread: Compile with thread support. +# - threadless: Compile without thread support. +# + +build_name example + +version_major 0 +version_minor 6 +version_micro 2 +version_file micro +version_target minor + +modes stand_alone clang test fanalyzer coverage thread threadless +modes_default stand_alone thread + +build_compiler gcc +build_compiler-clang clang +build_indexer ar +build_indexer_arguments rcs +build_language c + +build_libraries -lc -lcap + +build_sources_program fll/level_0/color.c fll/level_0/private-color.c fll/level_0/color/common.c +build_sources_program fll/level_0/console.c fll/level_0/console/common.c fll/level_0/private-console.c +build_sources_program fll/level_0/conversion.c fll/level_0/private-conversion.c fll/level_0/conversion/common.c +build_sources_program fll/level_0/file.c fll/level_0/private-file.c fll/level_0/file/common.c fll/level_0/file/stream.c +build_sources_program fll/level_0/memory.c fll/level_0/memory/array.c fll/level_0/memory/arrays.c +build_sources_program fll/level_0/private-memory.c fll/level_0/memory/private-array.c +build_sources_program fll/level_0/pipe.c +build_sources_program fll/level_0/print.c fll/level_0/private-print.c fll/level_0/print/common.c fll/level_0/print/to.c fll/level_0/print/private-to.c +build_sources_program fll/level_0/rip.c fll/level_0/rip/utf.c fll/level_0/private-rip.c fll/level_0/rip/private-utf.c +build_sources_program fll/level_0/signal.c +build_sources_program fll/level_0/string.c fll/level_0/private-string.c fll/level_0/string/common.c +build_sources_program fll/level_0/string/dynamic.c fll/level_0/string/dynamics.c fll/level_0/string/dynamicss.c fll/level_0/string/map.c fll/level_0/string/maps.c fll/level_0/string/mapss.c fll/level_0/string/map_multi.c fll/level_0/string/map_multis.c fll/level_0/string/map_multiss.c fll/level_0/string/static.c fll/level_0/string/statics.c fll/level_0/string/staticss.c fll/level_0/string/triple.c fll/level_0/string/triples.c fll/level_0/string/tripless.c +build_sources_program fll/level_0/type_array/cell.c fll/level_0/type_array/file.c fll/level_0/type_array/fll_id.c fll/level_0/type_array/int8.c fll/level_0/type_array/int16.c fll/level_0/type_array/int32.c fll/level_0/type_array/int64.c fll/level_0/type_array/int128.c fll/level_0/type_array/number_signed.c fll/level_0/type_array/number_unsigned.c fll/level_0/type_array/poll.c fll/level_0/type_array/quantity.c fll/level_0/type_array/quantitys.c fll/level_0/type_array/quantityss.c fll/level_0/type_array/range.c fll/level_0/type_array/ranges.c fll/level_0/type_array/rangess.c fll/level_0/type_array/state.c fll/level_0/type_array/status.c fll/level_0/type_array/uint8.c fll/level_0/type_array/uint16.c fll/level_0/type_array/uint32.c fll/level_0/type_array/uint64.c fll/level_0/type_array/uint128.c +build_sources_program fll/level_0/utf.c fll/level_0/private-utf.c fll/level_0/private-utf_alphabetic.c fll/level_0/private-utf_combining.c fll/level_0/private-utf_control.c fll/level_0/private-utf_digit.c fll/level_0/private-utf_emoji.c fll/level_0/private-utf_numeric.c fll/level_0/private-utf_phonetic.c fll/level_0/private-utf_private.c fll/level_0/private-utf_punctuation.c fll/level_0/private-utf_subscript.c fll/level_0/private-utf_superscript.c fll/level_0/private-utf_symbol.c fll/level_0/private-utf_unassigned.c fll/level_0/private-utf_valid.c fll/level_0/private-utf_whitespace.c fll/level_0/private-utf_wide.c fll/level_0/private-utf_word.c fll/level_0/private-utf_zero_width.c +build_sources_program fll/level_0/utf/common.c fll/level_0/utf/convert.c fll/level_0/utf/dynamic.c fll/level_0/utf/dynamics.c fll/level_0/utf/dynamicss.c fll/level_0/utf/is.c fll/level_0/utf/is_character.c fll/level_0/utf/map.c fll/level_0/utf/maps.c fll/level_0/utf/mapss.c fll/level_0/utf/map_multi.c fll/level_0/utf/map_multis.c fll/level_0/utf/map_multiss.c fll/level_0/utf/static.c fll/level_0/utf/statics.c fll/level_0/utf/staticss.c fll/level_0/utf/string.c fll/level_0/utf/triple.c fll/level_0/utf/triples.c fll/level_0/utf/tripless.c +build_sources_program fll/level_0/utf/private-dynamics.c fll/level_0/utf/private-maps.c fll/level_0/utf/private-map_multis.c fll/level_0/utf/private-string.c fll/level_0/utf/private-triples.c + +build_sources_program-thread fll/level_0/thread.c fll/level_0/thread/attribute.c fll/level_0/thread/barrier.c fll/level_0/thread/barrier_attribute.c fll/level_0/thread/condition.c fll/level_0/thread/condition_attribute.c fll/level_0/thread/id.c fll/level_0/thread/key.c fll/level_0/thread/lock.c fll/level_0/thread/lock_attribute.c fll/level_0/thread/mutex.c fll/level_0/thread/mutex_attribute.c fll/level_0/thread/once.c fll/level_0/thread/semaphore.c fll/level_0/thread/set.c fll/level_0/thread/spin.c + +build_sources_program fll/level_1/print.c fll/level_1/private-print.c fll/level_1/print/common.c + +build_sources_program fll/level_2/error.c fll/level_2/private-error.c fll/level_2/error/common.c +build_sources_program fll/level_2/print.c +build_sources_program fll/level_2/program.c fll/level_2/program/common.c fll/level_2/program/print.c fll/level_2/private-program.c + +build_sources_program program/example/main/common.c program/example/main/common/define.c program/example/main/common/enumeration.c program/example/main/common/print.c program/example/main/common/string.c program/example/main/common/type.c +build_sources_program program/example/main/print/data.c program/example/main/print/debug.c program/example/main/print/error.c program/example/main/print/message.c program/example/main/print/verbose.c program/example/main/print/warning.c +build_sources_program program/example/main/example.c program/example/main/signal.c program/example/main/thread.c + +build_sources_program program/example/main/main.c + +build_sources_documentation man + +build_sources_setting network + +build_script yes +build_shared yes +build_static no + +path_headers fll +path_library_script script +path_library_shared shared +path_library_static static +path_object_script script +path_object_shared shared +path_object_static static +path_program_script script +path_program_shared shared +path_program_static static + +has_path_standard yes +preserve_path_headers yes + +search_exclusive yes +search_shared yes +search_static yes + +environment PATH LD_LIBRARY_PATH +environment LANG LC_ALL LC_COLLATE LC_CTYPE LC_FASTMSG LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME LOCPATH NLSPATH + +defines -include sources/c/config.h -I sources/c/ +#defines -D_f_file_rename_use_renameat2_ +#defines -D_di_libcap_ +defines -D_libcap_legacy_only_ +defines-clang -D_clang_not_a_compile_time_constant_workaround_ +defines-threadless -D_di_thread_support_ +defines-thread -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_ + +flags -O2 -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno-parentheses -Wno-main +flags -fstack-clash-protection -fno-delete-null-pointer-checks -fstrict-flex-arrays=3 +flags -D_FORTIFY_SOURCE=3 +flags -Wl,-z,nodlopen -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now +flags-thread -pthread +flags-clang -Wno-logical-op-parentheses +flags-test -O0 -fstack-protector-strong -Wall +flags-fanalyzer -fanalyzer + +flags_library -fPIC +flags_object -fPIC +flags_program -fPIE diff --git a/level_3/example/c/main/common.c b/level_3/example/c/main/common.c new file mode 100644 index 0000000..a200d39 --- /dev/null +++ b/level_3/example/c/main/common.c @@ -0,0 +1,95 @@ +#include "example.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef _di_example_setting_load_ + void example_setting_load(const f_console_arguments_t arguments, example_main_t * const main) { + + if (!main) return; + + main->setting.state.step_small = example_allocation_console_d; + + f_console_parameter_process(arguments, &main->program.parameters, &main->setting.state, 0); + + main->setting.state.step_small = example_allocation_small_d; + + if (main->program.parameters.array[f_console_standard_parameter_line_first_no_e].result & f_console_result_found_e) { + main->setting.flag &= ~example_main_flag_print_first_e; + } + else { + main->setting.flag |= example_main_flag_print_first_e; + } + + if (main->program.parameters.array[f_console_standard_parameter_line_last_no_e].result & f_console_result_found_e) { + main->setting.flag &= ~example_main_flag_print_last_e; + } + else { + main->setting.flag |= example_main_flag_print_last_e; + } + + if (F_status_is_error(main->setting.state.status)) { + if ((main->setting.flag & example_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) { + fll_print_dynamic_raw(f_string_eol_s, main->program.message.to); + } + + example_print_error(&main->program.error, macro_example_f(f_console_parameter_process)); + + return; + } + + main->setting.state.status = fll_program_parameter_process_context_standard(F_true, &main->program); + + if (F_status_is_error(main->setting.state.status)) { + if ((main->setting.flag & example_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) { + fll_print_dynamic_raw(f_string_eol_s, main->program.message.to); + } + + example_print_error(&main->program.error, macro_example_f(fll_program_parameter_process_context_standard)); + + return; + } + + main->setting.state.status = fll_program_parameter_process_verbosity_standard(F_true, &main->program); + + if (F_status_is_error(main->setting.state.status)) { + if ((main->setting.flag & example_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) { + fll_print_dynamic_raw(f_string_eol_s, main->program.message.to); + } + + example_print_error(&main->program.error, macro_example_f(fll_program_parameter_process_verbosity_standard)); + + return; + } + + if (main->program.parameters.array[f_console_standard_parameter_help_e].result & f_console_result_found_e) { + main->setting.flag |= example_main_flag_help_e; + + return; + } + + if (main->program.parameters.array[f_console_standard_parameter_version_e].result & f_console_result_found_e) { + main->setting.flag |= example_main_flag_version_e; + + return; + } + + if (main->program.parameters.array[f_console_standard_parameter_copyright_e].result & f_console_result_found_e) { + main->setting.flag |= example_main_flag_copyright_e; + + return; + } + + if (main->program.pipe & fll_program_data_pipe_input_e) { + main->setting.flag |= example_main_flag_pipe_e; + } + else { + main->setting.flag &= ~example_main_flag_pipe_e; + } + } +#endif // _di_example_setting_load_ + +#ifdef __cplusplus +} // extern "C" +#endif diff --git a/level_3/example/c/main/common.h b/level_3/example/c/main/common.h new file mode 100644 index 0000000..a27d850 --- /dev/null +++ b/level_3/example/c/main/common.h @@ -0,0 +1,48 @@ +/** + * FLL - Level 3 + * + * Project: Firewall + * API Version: 0.7 + * Licenses: lgpl-2.1-or-later + * + * Provides the common functionality. + * + * This is auto-included and should not need to be explicitly included. + */ +#ifndef _example_common_h +#define _example_common_h + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * Perform the standard program setting load process. + * + * This prints error messages as appropriate. + * + * If either main or setting is NULL, then this immediately returns without doing anything. + * + * @param arguments + * The parameters passed to the process (often referred to as command line arguments). + * @param main + * The program and settings data. + * + * This alters setting.state.status: + * F_okay on success. + * + * Errors (with error bit) from: f_console_parameter_process(). + * Errors (with error bit) from: fll_program_parameter_process_context(). + * + * @see f_console_parameter_process() + * @see fll_program_parameter_process_context() + */ +#ifndef _di_example_setting_load_ + extern void example_setting_load(const f_console_arguments_t arguments, example_main_t * const main); +#endif // _di_example_setting_load_ + +#ifdef __cplusplus +} // extern "C" +#endif + +#endif // _example_common_h diff --git a/level_3/example/c/main/common/define.c b/level_3/example/c/main/common/define.c new file mode 100644 index 0000000..65ff2a7 --- /dev/null +++ b/level_3/example/c/main/common/define.c @@ -0,0 +1,9 @@ +#include "../example.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +} // extern "C" +#endif diff --git a/level_3/example/c/main/common/define.h b/level_3/example/c/main/common/define.h new file mode 100644 index 0000000..87e15d1 --- /dev/null +++ b/level_3/example/c/main/common/define.h @@ -0,0 +1,55 @@ +/** + * FLL - Level 3 + * + * Project: Example + * API Version: 0.7 + * Licenses: lgpl-2.1-or-later + * + * Provides the common define types. + * + * This is auto-included and should not need to be explicitly included. + */ +#ifndef _example_common_define_h +#define _example_common_define_h + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * The program allocation defines. + * + * example_allocation_*_d: + * - console: An allocation step used for small buffers specifically for console parameter. + * - large: An allocation step used for buffers that are anticipated to have large buffers. + * - pipe: A buffer size used for processing piped data. + * - small: An allocation step used for buffers that are anticipated to have small buffers. + */ +#ifndef _di_example_allocation_d_ + #define example_allocation_console_d 4 + #define example_allocation_large_d 256 + #define example_allocation_pipe_d 16384 + #define example_allocation_small_d 16 +#endif // _di_example_allocation_d_ + +/** + * The program signal defines. + * + * example_signal_*_d: + * - check: Number of iterations before performing signal check in non-threaded signal handling. + * - check_failsafe: When using threads, how many consecutive failures to check signal before aborting (as a recursion failsafe). + * - check_tiny: The tiny check. + * - check_short: The short signal check. + */ +#ifndef _di_example_signal_d_ + #define example_signal_check_d 500000 + #define example_signal_check_failsafe_d 20000 + #define example_signal_check_tiny_d 4 + #define example_signal_check_short_d 16 +#endif // _di_example_signal_d_ + +#ifdef __cplusplus +} // extern "C" +#endif + +#endif // _example_common_define_h diff --git a/level_3/example/c/main/common/enumeration.c b/level_3/example/c/main/common/enumeration.c new file mode 100644 index 0000000..65ff2a7 --- /dev/null +++ b/level_3/example/c/main/common/enumeration.c @@ -0,0 +1,9 @@ +#include "../example.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +} // extern "C" +#endif diff --git a/level_3/example/c/main/common/enumeration.h b/level_3/example/c/main/common/enumeration.h new file mode 100644 index 0000000..6830767 --- /dev/null +++ b/level_3/example/c/main/common/enumeration.h @@ -0,0 +1,100 @@ +/** + * FLL - Level 3 + * + * Project: Example + * API Version: 0.7 + * Licenses: lgpl-2.1-or-later + * + * Provides the common enumeration types. + * + * This is auto-included and should not need to be explicitly included. + */ +#ifndef _example_common_enumeration_h +#define _example_common_enumeration_h + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * Flags passed to the main function or program. + * + * When number mode is not specified, then mode is "string" mode (there is no flag for "string" mode). + * + * example_main_flag_*_e: + * - none: No flags set. + * - copyright: Print copyright. + * - error: Check if status is "error". + * - fine: Check if status is "fine". + * - help: Print help. + * - pipe: Use the input pipe. + * - print_first: When set, print new line to message output on program begin after loading settings. + * - print_last: When set, print new line to message output on program end. + * - version: Print version. + * - version_copyright_help: A helper flag representing version, copyright, and help flag bits being set. + * - warning: Check if status is "warning". + */ +#ifndef _di_example_main_flag_e_ + enum { + example_main_flag_none_e = 0x0, + example_main_flag_copyright_e = 0x1, + example_main_flag_error_e = 0x2, + example_main_flag_fine_e = 0x4, + example_main_flag_help_e = 0x8, + example_main_flag_pipe_e = 0x10, + example_main_flag_print_first_e = 0x20, + example_main_flag_print_last_e = 0x40, + example_main_flag_version_e = 0x80, + example_main_flag_version_copyright_help_e = 0x89, + example_main_flag_warning_e = 0x100, + }; // enum +#endif // _di_example_main_flag_e_ + +/** + * The main program parameters. + */ +#ifndef _di_example_parameter_e_ + enum { + example_parameter_example_e = f_console_standard_parameter_last_e, + }; // enum + + #define example_console_parameter_t_initialize \ + { \ + macro_fll_program_console_parameter_standard_initialize, \ + \ + macro_f_console_parameter_t_initialize_3(example_short_example_s, example_long_example_s, 0, f_console_flag_normal_e), \ + } + + #define example_parameter_total_d (f_console_parameter_state_type_total_d + 1) +#endif // _di_example_parameter_e_ + +/** + * Flags for fine-tuned print control. + * + * example_print_flag_*_e: + * - none: No flags set. + * - debug: Stream is for debug printing. + * - error: Stream is for error printing. + * - in: Stream is a source file. + * - message: Stream is for message printing. + * - out: Stream is a destination file. + * - warning: Stream is for warning printing. + */ +#ifndef _di_example_print_flag_e_ + enum { + example_print_flag_none_e = 0x0, + example_print_flag_debug_e = 0x1, + example_print_flag_error_e = 0x2, + example_print_flag_file_e = 0x4, + example_print_flag_in_e = 0x8, + example_print_flag_out_e = 0x10, + example_print_flag_message_e = 0x20, + example_print_flag_warning_e = 0x40, + }; // enum +#endif // _di_example_print_flag_e_ + +#ifdef __cplusplus +} // extern "C" +#endif + +#endif // _example_common_enumeration_h diff --git a/level_3/example/c/main/common/print.c b/level_3/example/c/main/common/print.c new file mode 100644 index 0000000..9da93ca --- /dev/null +++ b/level_3/example/c/main/common/print.c @@ -0,0 +1,18 @@ +#include "../example.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef _di_example_f_a_ + const f_string_t example_f_a[] = { + "f_console_parameter_process", + "f_thread_create", + "fll_program_parameter_process_context_standard", + "fll_program_parameter_process_verbosity_standard", + }; +#endif // _di_example_f_a_ + +#ifdef __cplusplus +} // extern "C" +#endif diff --git a/level_3/example/c/main/common/print.h b/level_3/example/c/main/common/print.h new file mode 100644 index 0000000..0380d76 --- /dev/null +++ b/level_3/example/c/main/common/print.h @@ -0,0 +1,53 @@ +/** + * FLL - Level 3 + * + * Project: Example + * API Version: 0.7 + * Licenses: lgpl-2.1-or-later + * + * Provides the common print functionality. + * + * This is auto-included and should not need to be explicitly included. + */ +#ifndef _example_common_print_h +#define _example_common_print_h + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * A special array of strings intended for representing funciton names. + * + * These are primarily used for printing errors with the function names. + * + * The macro macro_example_f() is used to reference the array index by the enum name. + * + * macro_example_f(): + * - name: The name of the function. + */ +#ifndef _di_example_f_a_ + extern const f_string_t example_f_a[]; + + #define macro_example_f(name) example_f_a[example_f_##name##_e] +#endif // _di_example_f_a_ + +/** + * An enum representing specific indexes within the above array. + * + * This is a convenience enum used to make code slightly more readable. + */ +#ifndef _di_example_f_e_ + enum { + example_f_f_console_parameter_process_e, + example_f_f_thread_create_e, + example_f_fll_program_parameter_process_context_standard_e, + example_f_fll_program_parameter_process_verbosity_standard_e, + }; // enum +#endif // _di_example_f_e_ + +#ifdef __cplusplus +} // extern "C" +#endif + +#endif // _example_common_print_h diff --git a/level_3/example/c/main/common/string.c b/level_3/example/c/main/common/string.c new file mode 100644 index 0000000..67b959d --- /dev/null +++ b/level_3/example/c/main/common/string.c @@ -0,0 +1,24 @@ +#include "../example.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef _di_example_program_version_s_ + const f_string_static_t example_program_version_s = macro_f_string_static_t_initialize_1(EXAMPLE_program_version_s, 0, EXAMPLE_program_version_s_length); +#endif // _di_example_program_version_s_ + +#ifndef _di_example_program_name_s_ + const f_string_static_t example_program_name_s = macro_f_string_static_t_initialize_1(EXAMPLE_program_name_s, 0, EXAMPLE_program_name_s_length); + const f_string_static_t example_program_name_long_s = macro_f_string_static_t_initialize_1(EXAMPLE_program_name_long_s, 0, EXAMPLE_program_name_long_s_length); +#endif // _di_example_program_name_s_ + +#ifndef _di_example_parameter_s_ + const f_string_static_t example_short_example_s = macro_f_string_static_t_initialize_1(EXAMPLE_short_example_s, 0, EXAMPLE_short_example_s_length); + + const f_string_static_t example_long_example_s = macro_f_string_static_t_initialize_1(EXAMPLE_long_example_s, 0, EXAMPLE_long_example_s_length); +#endif // _di_example_parameter_s_ + +#ifdef __cplusplus +} // extern "C" +#endif diff --git a/level_3/example/c/main/common/string.h b/level_3/example/c/main/common/string.h new file mode 100644 index 0000000..c08acde --- /dev/null +++ b/level_3/example/c/main/common/string.h @@ -0,0 +1,83 @@ +/** + * FLL - Level 3 + * + * Project: Example + * API Version: 0.7 + * Licenses: lgpl-2.1-or-later + * + * Provides the common string structures. + * + * This is auto-included and should not need to be explicitly included. + */ +#ifndef _example_common_string_h +#define _example_common_string_h + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * The program version. + */ +#ifndef _di_example_program_version_s_ + #define EXAMPLE_program_version_major_s F_string_ascii_0_s + #define EXAMPLE_program_version_minor_s F_string_ascii_7_s + #define EXAMPLE_program_version_micro_s F_string_ascii_0_s + + #define EXAMPLE_program_version_major_s_length F_string_ascii_0_s_length + #define EXAMPLE_program_version_minor_s_length F_string_ascii_7_s_length + #define EXAMPLE_program_version_micro_s_length F_string_ascii_0_s_length + + #if !(defined(EXAMPLE_program_version_nano_prefix_s) && defined(EXAMPLE_program_version_nano_prefix_s_length)) + #define EXAMPLE_program_version_nano_prefix_s + #define EXAMPLE_program_version_nano_prefix_s_length 0 + #endif // !(defined(EXAMPLE_program_version_nano_prefix_s) && defined(EXAMPLE_program_version_nano_prefix_s_length)) + + #if !(defined(EXAMPLE_program_version_nano_s) && defined(EXAMPLE_program_version_nano_s_length)) + #define EXAMPLE_program_version_nano_s + #define EXAMPLE_program_version_nano_s_length 0 + #endif // !(defined(EXAMPLE_program_version_nano_s) && defined(EXAMPLE_program_version_nano_s_length)) + + #define EXAMPLE_program_version_s EXAMPLE_program_version_major_s F_string_ascii_period_s EXAMPLE_program_version_minor_s F_string_ascii_period_s EXAMPLE_program_version_micro_s EXAMPLE_program_version_nano_prefix_s EXAMPLE_program_version_nano_s + + #define EXAMPLE_program_version_s_length EXAMPLE_program_version_major_s_length + F_string_ascii_period_s_length + EXAMPLE_program_version_minor_s_length + F_string_ascii_period_s_length + EXAMPLE_program_version_micro_s_length + EXAMPLE_program_version_nano_prefix_s_length + EXAMPLE_program_version_nano_s_length + + extern const f_string_static_t example_program_version_s; +#endif // _di_example_program_version_s_ + +/** + * The program name. + */ +#ifndef _di_example_program_name_s_ + #define EXAMPLE_program_name_s "example" + #define EXAMPLE_program_name_long_s "Example" + + #define EXAMPLE_program_name_s_length 7 + #define EXAMPLE_program_name_long_s_length 7 + + extern const f_string_static_t example_program_name_s; + extern const f_string_static_t example_program_name_long_s; +#endif // _di_example_program_name_s_ + +/** + * The main program parameters. + */ +#ifndef _di_example_parameter_s_ + #define EXAMPLE_short_example_s "e" + + #define EXAMPLE_long_example_s "example" + + #define EXAMPLE_short_example_s_length 1 + + #define EXAMPLE_long_example_s_length 7 + + extern const f_string_static_t example_short_example_s; + + extern const f_string_static_t example_long_example_s; +#endif // _di_example_parameter_s_ + +#ifdef __cplusplus +} // extern "C" +#endif + +#endif // _example_common_string_h diff --git a/level_3/example/c/main/common/type.c b/level_3/example/c/main/common/type.c new file mode 100644 index 0000000..a63c7a0 --- /dev/null +++ b/level_3/example/c/main/common/type.c @@ -0,0 +1,35 @@ +#include "../example.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef _di_example_cache_delete_ + void example_cache_delete(example_cache_t * const cache) { + + if (!cache) return; + + f_memory_array_resize(0, sizeof(f_char_t), (void **) &cache->buffer.string, &cache->buffer.used, &cache->buffer.size); + } +#endif // _di_example_cache_delete_ + +#ifndef _di_example_main_delete_ + void example_main_delete(example_main_t * const main) { + + if (!main) return; + + fll_program_data_delete(&main->program); + example_setting_delete(&main->setting); + } +#endif // _di_example_main_delete_ + +#ifndef _di_example_setting_delete_ + void example_setting_delete(example_setting_t * const setting) { + + if (!setting) return; + } +#endif // _di_example_setting_delete_ + +#ifdef __cplusplus +} // extern "C" +#endif diff --git a/level_3/example/c/main/common/type.h b/level_3/example/c/main/common/type.h new file mode 100644 index 0000000..c5b4c1c --- /dev/null +++ b/level_3/example/c/main/common/type.h @@ -0,0 +1,138 @@ +/** + * FLL - Level 3 + * + * Project: Firewall + * API Version: 0.7 + * Licenses: lgpl-2.1-or-later + * + * Provides the common type structures. + * + * This is auto-included and should not need to be explicitly included. + */ +#ifndef _example_common_type_h +#define _example_common_type_h + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * The example main program cache. + * + * buffer: A generic buffer. + */ +#ifndef _di_example_cache_t_ + typedef struct { + f_string_dynamic_t buffer; + } example_cache_t; + + #define example_cache_t_initialize \ + { \ + f_string_dynamic_t_initialize, \ + } +#endif // _di_example_cache_t_ + +/** + * The example main program settings. + * + * This is passed to the program-specific main entry point to designate program settings. + * These program settings are often processed from the program arguments (often called the command line arguments). + * + * flag: Flags passed to the main function. + * + * status_signal: A status used eclusively by the threaded signal handler. + * state: The state data used when processing the FSS data. + */ +#ifndef _di_example_setting_t_ + typedef struct { + uint16_t flag; + + f_status_t status_signal; + f_state_t state; + + const f_string_static_t *program_name; + const f_string_static_t *program_name_long; + } example_setting_t; + + #define example_setting_t_initialize \ + { \ + example_main_flag_none_e, \ + F_okay, \ + f_state_t_initialize, \ + 0, \ + 0, \ + } +#endif // _di_example_setting_t_ + +/** + * The main program data as a single structure. + * + * program: The main program data. + * setting: The settings data. + */ +#ifndef _di_example_main_t_ + typedef struct { + fll_program_data_t program; + example_setting_t setting; + example_cache_t cache; + } example_main_t; + + #define example_main_t_initialize \ + { \ + fll_program_data_t_initialize, \ + example_setting_t_initialize, \ + example_cache_t_initialize, \ + } +#endif // _di_example_main_t_ + +/** + * Deallocate main program data. + * + * @param cache + * The program cache. + * + * Must not be NULL. + * + * @see f_memory_array_resize() + */ +#ifndef _di_example_cache_delete_ + extern void example_cache_delete(example_cache_t * const cache); +#endif // _di_example_cache_delete_ + +/** + * Deallocate main program data. + * + * @param main + * The main program data. + * + * Must not be NULL. + * + * This does not alter main.setting.state.status. + * + * @see example_cache_delete() + * @see example_setting_delete() + * @see fll_program_data_delete() + */ +#ifndef _di_example_main_delete_ + extern void example_main_delete(example_main_t * const main); +#endif // _di_example_main_delete_ + +/** + * Delete the program main setting data. + * + * @param setting + * The program main setting data. + * + * Must not be NULL. + * + * This does not alter setting.state.status. + */ +#ifndef _di_example_setting_delete_ + extern void example_setting_delete(example_setting_t * const setting); +#endif // _di_example_setting_delete_ + +#ifdef __cplusplus +} // extern "C" +#endif + +#endif // _example_common_type_h diff --git a/level_3/example/c/main/example.c b/level_3/example/c/main/example.c new file mode 100644 index 0000000..d86c400 --- /dev/null +++ b/level_3/example/c/main/example.c @@ -0,0 +1,56 @@ +#include "example.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef _di_example_main_ + void example_main(example_main_t * const main) { + + if (!main) return; + + if (F_status_is_error(main->setting.state.status)) { + if ((main->setting.flag & example_main_flag_print_last_e) && main->program.message.verbosity > f_console_verbosity_error_e) { + fll_print_dynamic_raw(f_string_eol_s, main->program.message.to); + } + + return; + } + + if ((main->setting.flag & example_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) { + fll_print_dynamic_raw(f_string_eol_s, main->program.message.to); + } + + main->setting.state.status = F_okay; + + if (main->setting.flag & example_main_flag_version_copyright_help_e) { + if (main->setting.flag & example_main_flag_help_e) { + example_print_message_help(&main->program.message); + } + else if (main->setting.flag & example_main_flag_version_e) { + fll_program_print_version(&main->program.message, example_program_version_s); + } + else if (main->setting.flag & example_main_flag_copyright_e) { + fll_program_print_copyright(&main->program.message); + } + + if ((main->setting.flag & example_main_flag_print_last_e) && main->program.message.verbosity > f_console_verbosity_error_e) { + fll_print_dynamic_raw(f_string_eol_s, main->program.message.to); + } + + return; + } + + if (main->setting.state.status == F_status_set_error(F_interrupt)) { + fll_program_print_signal_received(&main->program.warning, main->program.signal_received); + } + + if ((main->setting.flag & example_main_flag_print_last_e) && main->program.message.verbosity > f_console_verbosity_error_e) { + fll_print_dynamic_raw(f_string_eol_s, main->program.message.to); + } + } +#endif // _di_example_main_ + +#ifdef __cplusplus +} // extern "C" +#endif diff --git a/level_3/example/c/main/example.h b/level_3/example/c/main/example.h new file mode 100644 index 0000000..4c9dfda --- /dev/null +++ b/level_3/example/c/main/example.h @@ -0,0 +1,99 @@ +/** + * FLL - Level 3 + * + * Project: Example + * API Version: 0.7 + * Licenses: lgpl-2.1-or-later + * + * This program provides an example base project. + * + * This program does nothing but can be used as a starting point for new program projects. + */ +#ifndef _example_h +#define _example_h + +// Libc includes. +#include +#include +#include +#include + +// FLL-0 includes. +#include +#include +#include +#include +#include +#include +//#include +#include +//#include +#include +#include +//#include +#include + +#ifndef _di_thread_support_ + #include +#endif // _di_thread_support_ + +// FLL-1 includes. +//#include +#include + +// FLL-2 includes. +#include +#include +#include + +// Firewall includes. +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * Execute main program. + * + * If main.signal is non-zero, then this blocks and handles the following signals: + * - F_signal_abort + * - F_signal_broken_pipe + * - F_signal_hangup + * - F_signal_interrupt + * - F_signal_quit + * - F_signal_termination + * + * @param main + * The main program data and settings. + * + * This alters main.setting.state.status: + * F_okay on success. + * F_true on success when performing verification and verify passed. + * F_false on success when performing verification and verify failed. + * F_interrupt on (exit) signal received. + * + * F_parameter (with error bit) if main is NULL or setting is NULL. + */ +#ifndef _di_example_main_ + extern void example_main(example_main_t * const main); +#endif // _di_example_main_ + +#ifdef __cplusplus +} // extern "C" +#endif + +#endif // _example_h diff --git a/level_3/example/c/main/main.c b/level_3/example/c/main/main.c new file mode 100644 index 0000000..48bbe86 --- /dev/null +++ b/level_3/example/c/main/main.c @@ -0,0 +1,76 @@ +#include "example.h" + +int main(const int argc, const f_string_t *argv, const f_string_t *envp) { + + example_main_t data = example_main_t_initialize; + + data.program.debug.flag |= example_print_flag_debug_e | example_print_flag_out_e; + data.program.error.flag |= example_print_flag_error_e | example_print_flag_out_e; + data.program.output.flag |= example_print_flag_out_e; + data.program.message.flag |= example_print_flag_message_e | example_print_flag_out_e; + data.program.warning.flag |= example_print_flag_warning_e | example_print_flag_out_e; + data.program.error.custom = (void *) &data; + data.program.debug.custom = (void *) &data; + data.program.message.custom = (void *) &data; + data.program.output.custom = (void *) &data; + data.program.warning.custom = (void *) &data; + + data.setting.program_name = &example_program_name_s; + data.setting.program_name_long = &example_program_name_long_s; + + f_console_parameter_t parameters[] = example_console_parameter_t_initialize; + + data.program.parameters.array = parameters; + data.program.parameters.used = example_parameter_total_d; + data.program.environment = envp; + + if (f_pipe_input_exists()) { + data.program.pipe = fll_program_data_pipe_input_e; + } + + fll_program_standard_set_up(&data.program); + + f_file_umask_get(&data.program.umask); + + #ifdef _di_thread_support_ + { + const f_console_arguments_t arguments = macro_f_console_arguments_t_initialize_1(argc, argv, envp); + + example_setting_load(arguments, &data); + } + + example_main(&data); + #else + { + f_thread_id_t id_signal; + + memset(&id_signal, 0, sizeof(f_thread_id_t)); + + data.setting.state.status = f_thread_create(0, &id_signal, &example_thread_signal, (void *) &data); + + if (F_status_is_error(data.setting.state.status)) { + example_print_error(&data.program.error, macro_example_f(f_thread_create)); + } + else { + { + const f_console_arguments_t arguments = macro_f_console_arguments_t_initialize_1(argc, argv, envp); + + example_setting_load(arguments, &data); + } + + if (!example_signal_check(&data)) { + example_main(&data); + } + + f_thread_cancel(id_signal); + f_thread_join(id_signal, 0); + } + } + #endif // _di_thread_support_ + + example_main_delete(&data); + + fll_program_standard_set_down(&data.program); + + return (F_status_is_error(data.setting.state.status) || data.setting.state.status == F_false) ? 1 : 0; +} diff --git a/level_3/example/c/main/main.h b/level_3/example/c/main/main.h new file mode 100644 index 0000000..3cd12e7 --- /dev/null +++ b/level_3/example/c/main/main.h @@ -0,0 +1,38 @@ +/** + * FLL - Level 3 + * + * Project: Example + * API Version: 0.7 + * Licenses: lgpl-2.1-or-later + * + * This file is only ever included by main/main.c and should not normally be included anywhere else. + * Anything that wants to include this should be providing the "example" program functionality in some manner. + */ +#ifndef _example_main_h +#define _example_main_h + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * Standard program entry point. + * + * @param argc + * The number of arguments. + * @param argv + * The array of arguments. + * @param envp + * The array of all environment variables on program start. + * + * @return + * 0 on success. + * 1 on error. + */ +extern int main(const int argc, const f_string_t *argv, const f_string_t *envp); + +#ifdef __cplusplus +} // extern "C" +#endif + +#endif // _example_main_h diff --git a/level_3/example/c/main/print/data.c b/level_3/example/c/main/print/data.c new file mode 100644 index 0000000..65ff2a7 --- /dev/null +++ b/level_3/example/c/main/print/data.c @@ -0,0 +1,9 @@ +#include "../example.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +} // extern "C" +#endif diff --git a/level_3/example/c/main/print/data.h b/level_3/example/c/main/print/data.h new file mode 100644 index 0000000..34041e3 --- /dev/null +++ b/level_3/example/c/main/print/data.h @@ -0,0 +1,23 @@ +/** + * FLL - Level 3 + * + * Project: Example + * API Version: 0.7 + * Licenses: lgpl-2.1-or-later + * + * Provides the print data functionality. + * + * This is auto-included and should not need to be explicitly included. + */ +#ifndef _example_print_data_h +#define _example_print_data_h + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +} // extern "C" +#endif + +#endif // _example_print_data_h diff --git a/level_3/example/c/main/print/debug.c b/level_3/example/c/main/print/debug.c new file mode 100644 index 0000000..65ff2a7 --- /dev/null +++ b/level_3/example/c/main/print/debug.c @@ -0,0 +1,9 @@ +#include "../example.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +} // extern "C" +#endif diff --git a/level_3/example/c/main/print/debug.h b/level_3/example/c/main/print/debug.h new file mode 100644 index 0000000..7f87fbe --- /dev/null +++ b/level_3/example/c/main/print/debug.h @@ -0,0 +1,23 @@ +/** + * FLL - Level 3 + * + * Project: Example + * API Version: 0.7 + * Licenses: lgpl-2.1-or-later + * + * Provides the print debug functionality. + * + * This is auto-included and should not need to be explicitly included. + */ +#ifndef _example_print_debug_h +#define _example_print_debug_h + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +} // extern "C" +#endif + +#endif // _example_print_debug_h diff --git a/level_3/example/c/main/print/error.c b/level_3/example/c/main/print/error.c new file mode 100644 index 0000000..7998ebb --- /dev/null +++ b/level_3/example/c/main/print/error.c @@ -0,0 +1,23 @@ +#include "../example.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef _di_example_print_error_ + f_status_t example_print_error(fl_print_t * const print, const f_string_t function) { + + if (!print || !print->custom) return F_status_set_error(F_output_not); + if (print->verbosity < f_console_verbosity_error_e) return F_output_not; + + example_main_t * const main = (example_main_t *) print->custom; + + fll_error_print(print, F_status_set_fine(main->setting.state.status), function, fll_error_file_flag_fallback_e); + + return F_okay; + } +#endif // _di_example_print_error_ + +#ifdef __cplusplus +} // extern "C" +#endif diff --git a/level_3/example/c/main/print/error.h b/level_3/example/c/main/print/error.h new file mode 100644 index 0000000..9501410 --- /dev/null +++ b/level_3/example/c/main/print/error.h @@ -0,0 +1,45 @@ +/** + * FLL - Level 3 + * + * Project: Example + * API Version: 0.7 + * Licenses: lgpl-2.1-or-later + * + * Provides the print error functionality. + * + * This is auto-included and should not need to be explicitly included. + */ +#ifndef _example_print_error_h +#define _example_print_error_h + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * Print generic error message regarding a function failing in some way. + * + * @param print + * The output structure to print to. + * + * This does not alter print.custom.setting.state.status. + * @param function + * The name of the function associated with the error. + * + * @return + * F_okay on success. + * F_output_not on success, but no printing is performed. + * + * F_output_not (with error bit) if setting is NULL. + * + * @see fll_error_print() + */ +#ifndef _di_example_print_error_ + extern f_status_t example_print_error(fl_print_t * const print, const f_string_t function); +#endif // _di_example_print_error_ + +#ifdef __cplusplus +} // extern "C" +#endif + +#endif // _example_print_error_h diff --git a/level_3/example/c/main/print/message.c b/level_3/example/c/main/print/message.c new file mode 100644 index 0000000..b0f4254 --- /dev/null +++ b/level_3/example/c/main/print/message.c @@ -0,0 +1,36 @@ +#include "../example.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef _di_example_print_message_help_ + f_status_t example_print_message_help(fl_print_t * const print) { + + if (!print) return F_status_set_error(F_output_not); + + f_file_stream_lock(print->to); + + fll_program_print_help_header(print, example_program_name_long_s, example_program_version_s); + + fll_program_print_help_option_standard(print); + + f_print_dynamic_raw(f_string_eol_s, print->to); + + fll_program_print_help_option(print, example_short_example_s, example_long_example_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, "This is an example program parameter."); + + f_print_dynamic_raw(f_string_eol_s, print->to); + + fll_program_print_help_usage(print, example_program_name_s, f_string_empty_s); + + f_file_stream_flush(print->to); + f_file_stream_unlock(print->to); + + return F_okay; + } +#endif // _di_example_print_message_help_ + + +#ifdef __cplusplus +} // extern "C" +#endif diff --git a/level_3/example/c/main/print/message.h b/level_3/example/c/main/print/message.h new file mode 100644 index 0000000..1f82c9f --- /dev/null +++ b/level_3/example/c/main/print/message.h @@ -0,0 +1,51 @@ +/** + * FLL - Level 3 + * + * Project: Example + * API Version: 0.7 + * Licenses: lgpl-2.1-or-later + * + * Provides the print message functionality. + * + * This is auto-included and should not need to be explicitly included. + */ +#ifndef _example_print_message_h +#define _example_print_message_h + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * Print help. + * + * @param print + * The output structure to print to. + * + * This requires print.custom to be example_main_t. + * + * This does not alter print.custom.setting.state.status. + * + * @return + * F_okay on success. + * F_output_not on success, but no printing is performed. + * + * F_output_not (with error bit) if setting is NULL. + * + * @see f_file_stream_flush() + * @see f_file_stream_lock() + * @see f_file_stream_unlock() + * @see f_print_dynamic_raw() + * @see fll_program_print_help_header() + * @see fll_program_print_help_option() + * @see fll_program_print_help_usage() + */ +#ifndef _di_example_print_message_help_ + extern f_status_t example_print_message_help(fl_print_t * const print); +#endif // _di_example_print_message_help_ + +#ifdef __cplusplus +} // extern "C" +#endif + +#endif // _example_print_message_h diff --git a/level_3/example/c/main/print/verbose.c b/level_3/example/c/main/print/verbose.c new file mode 100644 index 0000000..65ff2a7 --- /dev/null +++ b/level_3/example/c/main/print/verbose.c @@ -0,0 +1,9 @@ +#include "../example.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +} // extern "C" +#endif diff --git a/level_3/example/c/main/print/verbose.h b/level_3/example/c/main/print/verbose.h new file mode 100644 index 0000000..3ebb608 --- /dev/null +++ b/level_3/example/c/main/print/verbose.h @@ -0,0 +1,23 @@ +/** + * FLL - Level 3 + * + * Project: Example + * API Version: 0.7 + * Licenses: lgpl-2.1-or-later + * + * Provides the print verbose functionality. + * + * This is auto-included and should not need to be explicitly included. + */ +#ifndef _example_print_verbose_h +#define _example_print_verbose_h + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +} // extern "C" +#endif + +#endif // _example_print_verbose_h diff --git a/level_3/example/c/main/print/warning.c b/level_3/example/c/main/print/warning.c new file mode 100644 index 0000000..65ff2a7 --- /dev/null +++ b/level_3/example/c/main/print/warning.c @@ -0,0 +1,9 @@ +#include "../example.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +} // extern "C" +#endif diff --git a/level_3/example/c/main/print/warning.h b/level_3/example/c/main/print/warning.h new file mode 100644 index 0000000..4899f13 --- /dev/null +++ b/level_3/example/c/main/print/warning.h @@ -0,0 +1,23 @@ +/** + * FLL - Level 3 + * + * Project: Example + * API Version: 0.7 + * Licenses: lgpl-2.1-or-later + * + * Provides the print warning functionality. + * + * This is auto-included and should not need to be explicitly included. + */ +#ifndef _example_print_warning_h +#define _example_print_warning_h + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +} // extern "C" +#endif + +#endif // _example_print_warning_h diff --git a/level_3/example/c/main/signal.c b/level_3/example/c/main/signal.c new file mode 100644 index 0000000..84969c8 --- /dev/null +++ b/level_3/example/c/main/signal.c @@ -0,0 +1,111 @@ +#include "example.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#if !defined(_di_example_signal_check_) && defined(_di_thread_support_) + f_status_t example_signal_check(example_main_t * const main) { + + if (!main || main->program.signal.id == -1) return F_false; + + if (!((++main->program.signal_check) % example_signal_check_d)) { + if (fll_program_standard_signal_received(&main->program)) { + fll_program_print_signal_received(&main->program.warning, main->program.signal_received); + + main->setting.state.status = F_status_set_error(F_interrupt); + + return F_true; + } + + main->program.signal_check = 0; + } + + return F_false; + } +#endif // !defined(_di_example_signal_check_) && defined(_di_thread_support_) + +#if !defined(_di_example_signal_check_) && !defined(_di_thread_support_) + f_status_t example_signal_check(example_main_t * const main) { + + if (!main || main->program.signal.id == -1) return F_false; + + if (main->program.signal_received) { + fll_program_print_signal_received(&main->program.warning, main->program.signal_received); + + main->setting.state.status = F_status_set_error(F_interrupt); + + return F_true; + } + + return F_false; + } +#endif // !defined(_di_example_signal_check_) && !defined(_di_thread_support_) + +#if !defined(_di_example_signal_handler_) && !defined(_di_thread_support_) + void example_signal_handler(example_main_t * const main) { + + if (!main) return; + + siginfo_t information; + f_number_unsigned_t failsafe = 0; + + memset(&information, 0, sizeof(siginfo_t)); + + main->program.signal_received = 0; + + f_signal_set_empty(&main->program.signal.set); + f_signal_set_add(F_signal_abort, &main->program.signal.set); + f_signal_set_add(F_signal_broken_pipe, &main->program.signal.set); + f_signal_set_add(F_signal_hangup, &main->program.signal.set); + f_signal_set_add(F_signal_interrupt, &main->program.signal.set); + f_signal_set_add(F_signal_quit, &main->program.signal.set); + f_signal_set_add(F_signal_termination, &main->program.signal.set); + + if (main->program.signal.id == -1) { + main->setting.status_signal = f_signal_open(&main->program.signal); + + if (F_status_is_error(main->setting.status_signal)) { + main->program.signal_received = F_signal_abort; + + return; + } + } + + do { + memset(&information, 0, sizeof(siginfo_t)); + + main->setting.status_signal = f_signal_wait(&main->program.signal.set, &information); + + if (F_status_is_error(main->setting.status_signal) && F_status_set_fine(main->setting.status_signal) != F_interrupt) { + if (++failsafe >= example_signal_check_failsafe_d) break; + } + + switch (information.si_signo) { + case F_signal_abort: + case F_signal_broken_pipe: + case F_signal_hangup: + case F_signal_interrupt: + case F_signal_quit: + case F_signal_termination: + main->program.signal_received = information.si_signo; + + break; + } + + failsafe = 0; + main->setting.status_signal = F_okay; + + } while (!main->program.signal_received); + + f_signal_close(&main->program.signal); + + if (F_status_is_error(main->setting.status_signal)) { + main->program.signal_received = F_signal_abort; + } + } +#endif // !defined(_di_example_signal_handler_) && !defined(_di_thread_support_) + +#ifdef __cplusplus +} // extern "C" +#endif diff --git a/level_3/example/c/main/signal.h b/level_3/example/c/main/signal.h new file mode 100644 index 0000000..5bbc615 --- /dev/null +++ b/level_3/example/c/main/signal.h @@ -0,0 +1,86 @@ +/** + * FLL - Level 3 + * + * Project: Example + * API Version: 0.7 + * Licenses: lgpl-2.1-or-later + * + * Provides signal functionality. + * + * This is auto-included and should not need to be explicitly included. + */ +#ifndef _example_signal_h +#define _example_signal_h + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * Check to see if a signal is received. + * + * If main.signal is non-zero, then this handles the following signals: + * - F_signal_abort + * - F_signal_broken_pipe + * - F_signal_hangup + * - F_signal_interrupt + * - F_signal_quit + * - F_signal_termination + * + * There is a threaded and a non-threaded version of this. + * The non-threaded version checks periodically using example_signal_check_d and updates main->signal_check as needed. + * The threaded version checks the flag state which is set by a separate thread that is blocking until signal is received. + * + * @param main + * The main program and settings data. + * + * This does not alter main.setting.state.status. + * + * @return + * F_true on signal received. + * F_false otherwise. + * + * @see example_signal_handler() + * + * @see fll_program_standard_signal_received() + */ +#ifndef _di_example_signal_check_ + extern f_status_t example_signal_check(example_main_t * const main); +#endif // _di_example_signal_check_ + +/** + * Signal handler for signals/interrupts. + * + * This blocks until an expected signal is recieved. + * When an expected signal is received it then sets the + * + * If main.signal is non-zero, then this handles the following signals: + * - F_signal_abort + * - F_signal_broken_pipe + * - F_signal_hangup + * - F_signal_interrupt + * - F_signal_quit + * - F_signal_termination + * + * @param main + * The main program and settings data. + * + * This alters main.program.signal_received, setting it to a received signal. + * + * This alters main.setting.state.status: + * Errors (with error bit) from: f_signal_open() + * Errors (with error bit) from: f_signal_wait() + * + * @see f_signal_close() + * @see f_signal_open() + * @see f_signal_wait() + */ +#if !defined(_di_example_signal_handler_) && !defined(_di_thread_support_) + extern void example_signal_handler(example_main_t * const main); +#endif // !defined(_di_example_signal_handler_) && !defined(_di_thread_support_) + +#ifdef __cplusplus +} // extern "C" +#endif + +#endif // _example_signal_h diff --git a/level_3/example/c/main/thread.c b/level_3/example/c/main/thread.c new file mode 100644 index 0000000..2c302a3 --- /dev/null +++ b/level_3/example/c/main/thread.c @@ -0,0 +1,22 @@ +#include "example.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#if !defined(_di_example_thread_signal_) && !defined(_di_thread_support_) + void * example_thread_signal(void * const main) { + + f_thread_cancel_state_set(PTHREAD_CANCEL_DEFERRED, 0); + + if (main) { + example_signal_handler((example_main_t *) main); + } + + return 0; + } +#endif // !defined(_di_example_thread_signal_) && !defined(_di_thread_support_) + +#ifdef __cplusplus +} // extern "C" +#endif diff --git a/level_3/example/c/main/thread.h b/level_3/example/c/main/thread.h new file mode 100644 index 0000000..dec3ec9 --- /dev/null +++ b/level_3/example/c/main/thread.h @@ -0,0 +1,46 @@ +/** + * FLL - Level 3 + * + * Project: Example + * API Version: 0.7 + * Licenses: lgpl-2.1-or-later + * + * Provides thread functionality. + * + * This is auto-included and should not need to be explicitly included. + */ +#ifndef _example_thread_h +#define _example_thread_h + +/** + * Thread handler for signals/interrupts. + * + * If main.signal is non-zero, then this handles the following signals: + * - F_signal_abort + * - F_signal_broken_pipe + * - F_signal_hangup + * - F_signal_interrupt + * - F_signal_quit + * - F_signal_termination + * + * @param main + * The program and settings data. + * + * Must be of type example_main_t. + * + * @return + * 0, always. + * + * @see f_thread_cancel_state_set() + * + * @see example_signal_handler() + */ +#if !defined(_di_example_thread_signal_) && !defined(_di_thread_support_) + extern void * example_thread_signal(void * const main); +#endif // !defined(_di_example_thread_signal_) && !defined(_di_thread_support_) + +#ifdef __cplusplus +} // extern "C" +#endif + +#endif // _example_thread_h diff --git a/level_3/example/data/build/defines b/level_3/example/data/build/defines new file mode 100644 index 0000000..0fc015c --- /dev/null +++ b/level_3/example/data/build/defines @@ -0,0 +1,9 @@ +# fss-0000 +# +# Defines for the "example" program. +# + +_di_thread_support_ Disables thread support. + +_pthread_attr_unsupported_ Disable non-portable functionality associated with pthread_attr. +_pthread_sigqueue_unsupported_ Disable GNU specific sigqueue(). diff --git a/level_3/example/data/build/dependencies b/level_3/example/data/build/dependencies new file mode 100644 index 0000000..443aa6e --- /dev/null +++ b/level_3/example/data/build/dependencies @@ -0,0 +1,26 @@ +# fss-0000 +# +# Dependencies for the "example" program. +# + +f_type +f_status +f_memory +f_type_array +f_string +f_utf +f_color +f_console +f_conversion +f_file +f_pipe +f_print +f_rip +f_signal +f_thread + +fl_print + +fll_error +fll_print +fll_program diff --git a/level_3/example/data/build/fakefile b/level_3/example/data/build/fakefile new file mode 100644 index 0000000..5e021cb --- /dev/null +++ b/level_3/example/data/build/fakefile @@ -0,0 +1,27 @@ +# fss-0005 iki-0002 + +settings: + fail exit + modes individual individual_thread level monolithic clang test fanalyzer coverage thread threadless + + environment PATH LD_LIBRARY_PATH + environment LANG LC_ALL LC_COLLATE LC_CTYPE LC_FASTMSG LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME LOCPATH NLSPATH + +main: + build + +install: + shell ./install.sh parameter:'work' parameter:'verbosity' parameter:'color' + +help: + print + print context:'title'Fakefile Options for Example Program.context:'reset' + + print + print The following operations are available\: + print " - context:'notable'help:context:'reset' Perform the help operation, printing this message." + print " - context:'notable'install:context:'reset' A helper operation that simply calls the ./install.sh script with default settings." + print " - context:'notable'main:context:'reset' The default compilation using the build settings mode." + + print + print The context:'notable'install context:'reset'operation supports the context:'notable'work,context:'reset' context:'notable'verbosity,context:'reset' and context:'notable'color context:'reset'parameters. diff --git a/level_3/example/data/build/settings b/level_3/example/data/build/settings new file mode 100644 index 0000000..2d03da1 --- /dev/null +++ b/level_3/example/data/build/settings @@ -0,0 +1,98 @@ +# fss-0001 +# +# Builds the main library of the project with all parts except "main" program related. +# +# Modes: +# - individual: Compile using per project (individual) libraries, does not handle thread or threadless cases. +# - individual_thread: This is required when compiling in individual mode with "thread" mode. +# - level: Compile using per level libraries. +# - monolithic: Compile using per monolithic libraries. +# - clang: Use clang rather than the default, which is generally gcc +# - test: Compile for a test, such as unit testing. +# - fanalyzer: Compile using GCC's -fanalyzer compile time option. +# - coverage: Compile for building coverage. +# - thread: Compile with thread support. +# - threadless: Compile without thread support. +# + +build_name example + +version_major 0 +version_minor 7 +version_micro 0 +version_file micro +version_target minor + +modes individual individual_thread level monolithic clang test fanalyzer coverage thread threadless +modes_default monolithic thread + +build_compiler gcc +build_compiler-clang clang +build_indexer ar +build_indexer_arguments rcs +build_language c + +build_libraries -lc +build_libraries-individual -lfll_error -lfll_print -lfll_program +build_libraries-individual -lfl_print +build_libraries-individual -lf_file -lf_color -lf_console -lf_conversion -lf_memory -lf_pipe -lf_print -lf_rip -lf_signal -lf_string -lf_type_array -lf_utf + +build_libraries-individual_thread -lf_thread +build_libraries-level -lfll_2 -lfll_1 -lfll_0 +build_libraries-monolithic -lfll + +build_sources_library main/common.c main/common/define.c main/common/enumeration.c main/common/print.c main/common/string.c main/common/type.c +build_sources_library main/print/data.c main/print/debug.c main/print/error.c main/print/message.c main/print/verbose.c main/print/warning.c +build_sources_library main/example.c main/signal.c main/thread.c + +build_sources_program main/main.c + +build_sources_headers main/common.h main/common/define.h main/common/enumeration.h main/common/print.h main/common/string.h main/common/type.h +build_sources_headers main/print/data.h main/print/debug.h main/print/error.h main/print/message.h main/print/verbose.h main/print/warning.h +build_sources_headers main/example.h main/signal.h main/thread.h + +build_sources_documentation man + +build_script yes +build_shared yes +build_static no + +path_headers program/example +path_library_script script +path_library_shared shared +path_library_static static +path_object_script script +path_object_shared shared +path_object_static static +path_program_script script +path_program_shared shared +path_program_static static + +has_path_standard yes +preserve_path_headers yes + +search_exclusive yes +search_shared yes +search_static yes + +environment PATH LD_LIBRARY_PATH +environment LANG LC_ALL LC_COLLATE LC_CTYPE LC_FASTMSG LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME LOCPATH NLSPATH + +#defines -D_di_libcap_ +defines -D_libcap_legacy_only_ +defines-threadless -D_di_thread_support_ +defines-thread -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_ + +flags -O2 -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno-parentheses +flags -fstack-clash-protection -fno-delete-null-pointer-checks -fstrict-flex-arrays=3 +flags -D_FORTIFY_SOURCE=3 +flags -Wl,-z,nodlopen -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now +flags-thread -pthread +flags-clang -Wno-logical-op-parentheses +flags-test -O0 -fstack-protector-strong -Wall +flags-fanalyzer -fanalyzer +flags-coverage -O0 --coverage -fprofile-abs-path -fprofile-dir=build/coverage/ + +flags_library -fPIC +flags_object -fPIC +flags_program -fPIE diff --git a/level_3/example/data/documentation/man/man1/example.1 b/level_3/example/data/documentation/man/man1/example.1 new file mode 100644 index 0000000..c55a1e8 --- /dev/null +++ b/level_3/example/data/documentation/man/man1/example.1 @@ -0,0 +1,55 @@ +.TH EXAMPLE "1" "February 2024" "FLL - Example 0.7.0" "User Commands" +.SH NAME +example \- A program used for providing an example on how a program might be written for the Featureless Linux Library project. +.SH SYNOPSIS +.B example +[\fI\,OPTIONS\/\fR] +.SH DESCRIPTION +.PP +.SH OPTIONS +.TP +\fB\{\-h, \-\-help\fR +Print the help message. +.TP +\fB+C, ++copyright\fR +Print the copyright. +\fB+d, ++dark\fR +Output using colors that show up better on dark backgrounds. +.TP +\fB+l, ++light\fR +Output using colors that show up better on light backgrounds. +.TP +\fB+n, ++no_color\fR +Do not print using color. +.TP +\fB+Q, ++quiet\fR +Decrease verbosity, silencing most output. +.TP +\fB+E, ++error\fR +Decrease verbosity, using only error output. +.TP +\fB+N, ++normal\fR +Set verbosity to normal. +.TP +\fB+V, ++verbose\fR +Increase verbosity beyond normal output. +.TP +\fB+D, ++debug\fR +Enable debugging, significantly increasing verbosity beyond normal output. +.TP +\fB+v, ++version\fR +Print only the version number. +.TP +\fB+F, ++line_first_no\fR +Disable printing of first line. +.TP +\fB+L, ++line_last_no\fR +Disable printing of last line. +.TP +\fB-e, --example\fR +An example program parameter. +.SH AUTHOR +Written by Kevin Day. +.SH COPYRIGHT +.PP +Copyright \(co 2007-2024 Kevin Day, GNU LGPL Version 2.1 or later. -- 1.8.3.1