From: Kevin Day Date: Thu, 23 May 2024 03:23:23 +0000 (-0500) Subject: Update: Remove the ++first and ++last parameters and relating logic. X-Git-Url: https://git.kevux.org/?a=commitdiff_plain;h=aa69f191a7aa7d251d3b3d99dc4a012e85995d46;p=fll Update: Remove the ++first and ++last parameters and relating logic. I have used this for a while and have decided these are not worth the effort. The addition is very nice but the additional code and logic is just extra maintenance and complexity for very little gain. --- diff --git a/build/scripts/bootstrap-example.sh b/build/scripts/bootstrap-example.sh index c947587..a8ff064 100644 --- a/build/scripts/bootstrap-example.sh +++ b/build/scripts/bootstrap-example.sh @@ -68,7 +68,6 @@ build_mode_extra_value_1= build_mode_extra_param_2= build_mode_extra_value_2= shell_command=bash -suppress_first="+F" exclude_programs= grab_next= skip= @@ -150,11 +149,11 @@ if [[ ${1} == "individual" ]] ; then cd package/individual/${i}-${version}/ && - ${shell_command} ./bootstrap.sh clean ${verbose} ${color} ${suppress_first} && + ${shell_command} ./bootstrap.sh clean ${verbose} ${color} && - ${shell_command} ./bootstrap.sh build ${verbose} ${color} ${suppress_first} ${shared} ${static} -w ${path_work} -m individual -m individual_thread ${mode_thread_param} ${mode_thread_value} ${mode_compiler_param} ${mode_compiler_value} && + ${shell_command} ./bootstrap.sh build ${verbose} ${color} ${shared} ${static} -w ${path_work} -m individual -m individual_thread ${mode_thread_param} ${mode_thread_value} ${mode_compiler_param} ${mode_compiler_value} && - ${shell_command} ./install.sh ${verbose} ${color} ${suppress_first} ${shared} ${static} -w ${path_work} && + ${shell_command} ./install.sh ${verbose} ${color} ${shared} ${static} -w ${path_work} && cd ${path_original} || break done @@ -166,31 +165,31 @@ if [[ ${1} == "level" ]] ; then cd package/level/fll-level_0-${version}/ && - ${shell_command} ./bootstrap.sh clean ${verbose} ${color} ${suppress_first} && + ${shell_command} ./bootstrap.sh clean ${verbose} ${color} && - ${shell_command} ./bootstrap.sh build ${verbose} ${color} ${suppress_first} ${shared} ${static} -w ${path_work} -m level ${mode_thread_param} ${mode_thread_value} ${mode_compiler_param} ${mode_compiler_value} && + ${shell_command} ./bootstrap.sh build ${verbose} ${color} ${shared} ${static} -w ${path_work} -m level ${mode_thread_param} ${mode_thread_value} ${mode_compiler_param} ${mode_compiler_value} && - ${shell_command} ./install.sh ${verbose} ${color} ${suppress_first} ${shared} ${static} -w ${path_work} && + ${shell_command} ./install.sh ${verbose} ${color} ${shared} ${static} -w ${path_work} && cd ${path_original} && cd package/level/fll-level_1-${version}/ && - ${shell_command} ./bootstrap.sh clean ${verbose} ${color} ${suppress_first} && + ${shell_command} ./bootstrap.sh clean ${verbose} ${color} && - ${shell_command} ./bootstrap.sh build ${verbose} ${color} ${suppress_first} ${shared} ${static} -w ${path_work} -m level ${mode_thread_param} ${mode_thread_value} ${mode_compiler_param} ${mode_compiler_value} && + ${shell_command} ./bootstrap.sh build ${verbose} ${color} ${shared} ${static} -w ${path_work} -m level ${mode_thread_param} ${mode_thread_value} ${mode_compiler_param} ${mode_compiler_value} && - ${shell_command} ./install.sh ${verbose} ${color} ${suppress_first} ${shared} ${static} -w ${path_work} && + ${shell_command} ./install.sh ${verbose} ${color} ${shared} ${static} -w ${path_work} && cd ${path_original} && cd package/level/fll-level_2-${version}/ && - ${shell_command} ./bootstrap.sh clean ${verbose} ${color} ${suppress_first} && + ${shell_command} ./bootstrap.sh clean ${verbose} ${color} && - ${shell_command} ./bootstrap.sh build ${verbose} ${color} ${suppress_first} ${shared} ${static} -w ${path_work} -m level ${mode_thread_param} ${mode_thread_value} ${mode_compiler_param} ${mode_compiler_value} && + ${shell_command} ./bootstrap.sh build ${verbose} ${color} ${shared} ${static} -w ${path_work} -m level ${mode_thread_param} ${mode_thread_value} ${mode_compiler_param} ${mode_compiler_value} && - ${shell_command} ./install.sh ${verbose} ${color} ${suppress_first} ${shared} ${static} -w ${path_work} + ${shell_command} ./install.sh ${verbose} ${color} ${shared} ${static} -w ${path_work} fi if [[ ${1} == "monolithic" ]] ; then @@ -198,11 +197,11 @@ if [[ ${1} == "monolithic" ]] ; then cd package/monolithic/fll-${version}/ && - ${shell_command} ./bootstrap.sh clean ${verbose} ${color} ${suppress_first} && + ${shell_command} ./bootstrap.sh clean ${verbose} ${color} && - ${shell_command} ./bootstrap.sh build ${verbose} ${color} ${suppress_first} ${shared} ${static} -w ${path_work} -m monolithic ${mode_thread_param} ${mode_thread_value} ${mode_compiler_param} ${mode_compiler_value} && + ${shell_command} ./bootstrap.sh build ${verbose} ${color} ${shared} ${static} -w ${path_work} -m monolithic ${mode_thread_param} ${mode_thread_value} ${mode_compiler_param} ${mode_compiler_value} && - ${shell_command} ./install.sh ${verbose} ${color} ${shared} ${suppress_first} ${static} -w ${path_work} + ${shell_command} ./install.sh ${verbose} ${color} ${shared} ${static} -w ${path_work} fi # The following in an example on building individual projects. @@ -254,11 +253,11 @@ if [[ ${mode_part} != "" ]] ; then cd package/${mode_path}/${mode_part}-${version}/ && - ${shell_command} ./bootstrap.sh clean ${verbose} ${color} ${suppress_first} && + ${shell_command} ./bootstrap.sh clean ${verbose} ${color} && - ${shell_command} ./bootstrap.sh build ${verbose} ${color} ${suppress_first} ${shared} ${static} -w ${path_work} -m ${build_mode} ${build_mode_extra_param_1} ${build_mode_extra_value_1} ${build_mode_extra_param_2} ${build_mode_extra_value_2} ${mode_compiler_param} ${mode_compiler_value} && + ${shell_command} ./bootstrap.sh build ${verbose} ${color} ${shared} ${static} -w ${path_work} -m ${build_mode} ${build_mode_extra_param_1} ${build_mode_extra_value_1} ${build_mode_extra_param_2} ${build_mode_extra_value_2} ${mode_compiler_param} ${mode_compiler_value} && - ${shell_command} ./install.sh ${verbose} ${color} ${suppress_first} ${shared} ${static} -w ${path_work} + ${shell_command} ./install.sh ${verbose} ${color} ${shared} ${static} -w ${path_work} # The following in an example on building all FLL program projects using the project bootstrapped from above. elif [[ ${1} == "programs-individual" || ${1} == "programs-level" || ${1} == "programs-monolithic" ]] ; then @@ -314,11 +313,11 @@ elif [[ ${1} == "programs-individual" || ${1} == "programs-level" || ${1} == "pr cd ${path_original}package/program/${i} && - ${shell_command} ./bootstrap.sh clean ${verbose} ${color} ${suppress_first} && + ${shell_command} ./bootstrap.sh clean ${verbose} ${color} && - ${shell_command} ./bootstrap.sh build ${verbose} ${color} ${suppress_first} ${shared} ${static} -w ${path_work} -m ${build_mode} ${build_mode_extra_param_1} ${build_mode_extra_value_1} ${build_mode_extra_param_2} ${build_mode_extra_value_2} ${mode_compiler_param} ${mode_compiler_value} && + ${shell_command} ./bootstrap.sh build ${verbose} ${color} ${shared} ${static} -w ${path_work} -m ${build_mode} ${build_mode_extra_param_1} ${build_mode_extra_value_1} ${build_mode_extra_param_2} ${build_mode_extra_value_2} ${mode_compiler_param} ${mode_compiler_value} && - ${shell_command} ./install.sh ${verbose} ${color} ${suppress_first} ${shared} ${static} -w ${path_work} || + ${shell_command} ./install.sh ${verbose} ${color} ${shared} ${static} -w ${path_work} || break done diff --git a/build/scripts/bootstrap.sh b/build/scripts/bootstrap.sh index 8a3213e..1644837 100644 --- a/build/scripts/bootstrap.sh +++ b/build/scripts/bootstrap.sh @@ -61,8 +61,6 @@ bootstrap_main() { local path_sources=sources/ local path_language=c/ local path_work= - local print_line_first="yes" - local print_line_last="yes" local project_built= local project_built_shared= local project_built_static= @@ -127,10 +125,6 @@ bootstrap_main() { verbosity="debug" verbose="+D" verbose_common="-v" - elif [[ ${p} == "+F" || ${p} == "++line_first_no" ]] ; then - print_line_first="no" - elif [[ ${p} == "+L" || ${p} == "++line_last_no" ]] ; then - print_line_last="no" elif [[ ${p} == "+v" || ${p} == "++version" ]] ; then echo ${version} return 0 @@ -197,11 +191,6 @@ bootstrap_main() { p= fi - if [[ ${verbosity} == "quiet" ]] ; then - print_line_first="no" - print_line_last="no" - fi - # If the settings_name has a directory separator, then assume it is a path to the settings file. if [[ $(echo ${settings_name} | grep -s -o '/') == "" ]] ; then settings_file="${path_data}build/${settings_name}" @@ -240,11 +229,7 @@ bootstrap_main() { for mode in ${modes} ; do if [[ $(echo "${mode}" | grep -s -o "[^_[:alnum:]+-]") != "" ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - bootstrap_print_first - echo -e "${c_error}ERROR: The mode ${c_notice}${mode}${c_error} includes invalid characters, only alphanumeric, underscore, minus, and plus are allowed.${c_reset}" - - bootstrap_print_last fi bootstrap_cleanup @@ -280,11 +265,7 @@ bootstrap_main() { if [[ ${modes_available} == "" ]] ; then if [[ ${modes} != "" ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - bootstrap_print_first - echo -e "${c_error}ERROR: The mode(s) ${c_notice}${modes}${c_error} are not a valid modes, there are no available modes.${c_error}${c_reset}" - - bootstrap_print_last fi bootstrap_cleanup @@ -309,11 +290,7 @@ bootstrap_main() { if [[ ${i} -eq 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - bootstrap_print_first - echo -e "${c_error}ERROR: The mode(s) ${c_notice}${modes}${c_error} are not valid modes, they must be one of: ${c_notice}${modes_available}${c_error}.${c_reset}" - - bootstrap_print_last fi bootstrap_cleanup @@ -325,11 +302,7 @@ bootstrap_main() { bootstrap_id "build_name" if [[ ${variables[${key}]} == "" ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - bootstrap_print_first - echo -e "${c_error}ERROR: The required setting '${c_notice}build_name${c_error}' is not specified in the build settings file '${c_notice}${settings_file}${c_error}'.${c_reset}" - - bootstrap_print_last fi bootstrap_cleanup @@ -340,11 +313,7 @@ bootstrap_main() { bootstrap_id "version_major" if [[ ${variables[${key}]} == "" ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - bootstrap_print_first - echo -e "${c_error}ERROR: The required setting '${c_notice}version_major${c_error}' is not specified in the build settings file '${c_notice}${settings_file}${c_error}'.${c_reset}" - - bootstrap_print_last fi bootstrap_cleanup @@ -355,11 +324,7 @@ bootstrap_main() { bootstrap_id "version_minor" if [[ ${variables[${key}]} == "" ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - bootstrap_print_first - echo -e "${c_error}ERROR: The required setting '${c_notice}version_minor${c_error}' is not specified in the build settings file '${c_notice}${settings_file}${c_error}'.${c_reset}" - - bootstrap_print_last fi bootstrap_cleanup @@ -370,11 +335,7 @@ bootstrap_main() { bootstrap_id "version_micro" if [[ ${variables[${key}]} == "" ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - bootstrap_print_first - echo -e "${c_error}ERROR: The required setting '${c_notice}version_micro${c_error}' is not specified in the build settings file '${c_notice}${settings_file}${c_error}'.${c_reset}" - - bootstrap_print_last fi bootstrap_cleanup @@ -384,11 +345,7 @@ bootstrap_main() { if [[ ${path_data} == "" || ! -d ${path_data} ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - bootstrap_print_first - echo -e "${c_error}ERROR: The data directory ${c_notice}${path_data}${c_error} is not a valid directory.${c_reset}" - - bootstrap_print_last fi bootstrap_cleanup @@ -398,11 +355,7 @@ bootstrap_main() { if [[ ${path_sources} == "" || ! -d ${path_sources} ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - bootstrap_print_first - echo -e "${c_error}ERROR: The sources directory ${c_notice}${path_sources}${c_error} is not a valid directory.${c_reset}" - - bootstrap_print_last fi bootstrap_cleanup @@ -412,11 +365,7 @@ bootstrap_main() { if [[ ${path_work} != "" && ! -d ${path_work} ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - bootstrap_print_first - echo -e "${c_error}ERROR: The work directory ${c_notice}${path_work}${c_error} is not a valid directory.${c_reset}" - - bootstrap_print_last fi bootstrap_cleanup @@ -444,11 +393,7 @@ bootstrap_main() { if [[ ${operation_failure} == "fail-multiple" ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - bootstrap_print_first - echo -e "${c_error}ERROR: Only one operation may be specified at a time.${c_reset}" - - bootstrap_print_last fi bootstrap_cleanup @@ -456,8 +401,6 @@ bootstrap_main() { return 1 elif [[ ${operation} == "build" ]] ; then if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then - bootstrap_print_first - echo -e "${c_highlight}Building:${c_reset} ${c_notice}${project_label}${c_highlight} with modes: ${c_notice}${modes}${c_highlight}.${c_reset}" fi @@ -480,16 +423,12 @@ bootstrap_main() { fi elif [[ ${operation} == "clean" ]] ; then if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then - bootstrap_print_first - echo -e "${c_highlight}Cleaning Project:${c_reset} ${c_notice}${project_label}${c_highlight}.${c_reset}" fi bootstrap_operation_clean elif [[ ${operation} == "" ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - bootstrap_print_first - echo -e "${c_error}ERROR: No operation was given.${c_reset}" fi @@ -498,11 +437,7 @@ bootstrap_main() { return 1 else if [[ ${verbosity} != "quiet" ]] ; then - bootstrap_print_first - echo -e "${c_error}ERROR: The operation ${c_notice}${operation}${c_error} was not recognized.${c_reset}" - - bootstrap_print_last fi bootstrap_cleanup @@ -510,12 +445,6 @@ bootstrap_main() { return 1 fi - if [[ ${verbosity} != "quiet" ]] ; then - if [[ ${failure} -eq 1 || ${verbosity} != "error" ]] ; then - bootstrap_print_last - fi - fi - bootstrap_cleanup return 0 @@ -545,8 +474,6 @@ bootstrap_handle_colors() { bootstrap_help() { - bootstrap_print_first - echo -e "${c_title}${public_name}${c_reset}" echo -e " ${c_notice}Version ${version}${c_reset}" echo @@ -555,19 +482,17 @@ bootstrap_help() { echo -e " ${c_important}clean${c_reset} Delete all build files." echo echo -e "${c_highlight}Options:${c_reset}" - echo -e " -${c_important}h${c_reset}, --${c_important}help${c_reset} Print this help message." - echo -e " +${c_important}C${c_reset}, ++${c_important}copyright${c_reset} Print the copyright." - echo -e " +${c_important}d${c_reset}, ++${c_important}dark${c_reset} Output using colors that show up better on dark backgrounds." - echo -e " +${c_important}l${c_reset}, ++${c_important}light${c_reset} Output using colors that show up better on light backgrounds." - echo -e " +${c_important}n${c_reset}, ++${c_important}no_color${c_reset} Do not print using color." - echo -e " +${c_important}Q${c_reset}, ++${c_important}quiet${c_reset} Decrease verbosity, silencing most print.to." - echo -e " +${c_important}E${c_reset}, ++${c_important}error${c_reset} Decrease verbosity, using only error print.to." - echo -e " +${c_important}N${c_reset}, ++${c_important}normal${c_reset} Set verbosity to normal." - echo -e " +${c_important}V${c_reset}, ++${c_important}verbose${c_reset} Increase verbosity beyond normal print.to." - echo -e " +${c_important}D${c_reset}, ++${c_important}debug${c_reset} Enable debugging, significantly increasing verbosity beyond normal print.to." - echo -e " +${c_important}v${c_reset}, ++${c_important}version${c_reset} Print only the version number." - echo -e " +${c_important}F${c_reset}, ++${c_important}line_first_no${c_reset} Disable printing of first line." - echo -e " +${c_important}L${c_reset}, ++${c_important}line_last_no${c_reset} Disable printing of last line." + echo -e " -${c_important}h${c_reset}, --${c_important}help${c_reset} Print this help message." + echo -e " +${c_important}C${c_reset}, ++${c_important}copyright${c_reset} Print the copyright." + echo -e " +${c_important}d${c_reset}, ++${c_important}dark${c_reset} Output using colors that show up better on dark backgrounds." + echo -e " +${c_important}l${c_reset}, ++${c_important}light${c_reset} Output using colors that show up better on light backgrounds." + echo -e " +${c_important}n${c_reset}, ++${c_important}no_color${c_reset} Do not print using color." + echo -e " +${c_important}Q${c_reset}, ++${c_important}quiet${c_reset} Decrease verbosity, silencing most print.to." + echo -e " +${c_important}E${c_reset}, ++${c_important}error${c_reset} Decrease verbosity, using only error print.to." + echo -e " +${c_important}N${c_reset}, ++${c_important}normal${c_reset} Set verbosity to normal." + echo -e " +${c_important}V${c_reset}, ++${c_important}verbose${c_reset} Increase verbosity beyond normal print.to." + echo -e " +${c_important}D${c_reset}, ++${c_important}debug${c_reset} Enable debugging, significantly increasing verbosity beyond normal print.to." + echo -e " +${c_important}v${c_reset}, ++${c_important}version${c_reset} Print only the version number." echo echo -e "${c_highlight}Bootstrap Options:${c_reset}" echo -e " -${c_important}d${c_reset}, --${c_important}define${c_reset} Append an additional define after defines from settings file." @@ -587,21 +512,15 @@ bootstrap_help() { echo -e " --${c_important}disable-shared${c_reset} Forcibly do not build shared files." echo -e " --${c_important}enable-static${c_reset} Forcibly do build static files." echo -e " --${c_important}disable-static${c_reset} Forcibly do not build static files." - - bootstrap_print_last } bootstrap_copyright() { - bootstrap_print_first - echo "Copyright © 2007-2024 Kevin Day." echo echo "Source code license lgpl-2.1-or-later." echo "Standard and specification license open-standard-license-1.0-or-later." echo "Documentation license cc-by-sa-4.0." - - bootstrap_print_last } bootstrap_id() { @@ -858,16 +777,12 @@ bootstrap_load_settings() { if [[ ! -d ${path_data}build/ ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - bootstrap_print_first - echo -e "${c_error}ERROR: No build settings directory '${c_notice}${path_data}build/${c_error}' could not be found or is not a valid directory.${c_reset}" fi let failure=1 elif [[ ! -f ${settings_file} ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - bootstrap_print_first - echo -e "${c_error}ERROR: No settings file ${c_notice}${settings_file}${c_error} could not be found or is not a valid file.${c_reset}" fi @@ -1720,8 +1635,6 @@ bootstrap_operation_build() { if [[ ${failure} -eq 1 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - bootstrap_print_first - echo -e "${c_error}ERROR: Failed to build.${c_reset}" fi @@ -2821,8 +2734,6 @@ bootstrap_operation_build_validate_build() { if [[ ${build_compiler} == "" ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - bootstrap_print_first - echo -e "${c_error}ERROR: Cannot Build, no '${c_notice}build_compiler${c_error}' specified, such as '${c_notice}gcc${c_error}'.${c_reset}" fi @@ -2831,8 +2742,6 @@ bootstrap_operation_build_validate_build() { if [[ ${build_indexer} == "" ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - bootstrap_print_first - echo -e "${c_error}ERROR: Cannot Build, no '${c_notice}build_indexer${c_error}' specified, such as '${c_notice}ar${c_error}'.${c_reset}" fi @@ -2850,8 +2759,6 @@ bootstrap_operation_build_validate_paths() { if [[ ${path_sources} == "" || ! -d ${path_sources} ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - bootstrap_print_first - echo -e "${c_error}ERROR: The sources directory ${c_notice}${path_sources}${c_error} is not a valid directory.${c_reset}" fi @@ -2860,8 +2767,6 @@ bootstrap_operation_build_validate_paths() { if [[ ${failure} -eq 0 && ${path_sources_object} != "" && ! -d ${path_sources_object} ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - bootstrap_print_first - echo -e "${c_error}ERROR: The sources object directory ${c_notice}${path_sources_object}${c_error} is not a valid directory.${c_reset}" fi @@ -2887,8 +2792,6 @@ bootstrap_operation_build_validate_shared_static() { if [[ ${build_shared} != "yes" && ${build_static} != "yes" ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - bootstrap_print_first - echo -e "${c_error}ERROR: Cannot Build, either build_shared or build_static must be set to 'yes'.${c_reset}" fi @@ -2897,8 +2800,6 @@ bootstrap_operation_build_validate_shared_static() { if [[ ${search_shared} != "yes" && ${search_static} != "yes" ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - bootstrap_print_first - echo -e "${c_error}ERROR: Cannot Build, either search_shared or search_static must be set to 'yes'.${c_reset}" fi @@ -2917,8 +2818,6 @@ bootstrap_operation_build_validate_sources() { for i in ${sources_script} ; do if [[ ${i} != "$(echo ${i} | sed -e 's|^//*||' -e 's|^\.\.//*||' -e 's|/*$||')" ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - bootstrap_print_first - echo -e "${c_error}ERROR: Cannot Build, invalid build_sources_script path provided: '${i}'.${c_reset}" fi @@ -2929,8 +2828,6 @@ bootstrap_operation_build_validate_sources() { for i in ${sources_headers} ; do if [[ ${i} != "$(echo ${i} | sed -e 's|^//*||' -e 's|^\.\.//*||' -e 's|/*$||')" ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - bootstrap_print_first - echo -e "${c_error}ERROR: Cannot Build, invalid build_sources_headers path provided: '${i}'.${c_reset}" fi @@ -2941,8 +2838,6 @@ bootstrap_operation_build_validate_sources() { for i in ${sources_library} ; do if [[ ${i} != "$(echo ${i} | sed -e 's|^//*||' -e 's|^\.\.//*||' -e 's|/*$||')" ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - bootstrap_print_first - echo -e "${c_error}ERROR: Cannot Build, invalid build_sources_library path provided: '${i}'.${c_reset}" fi @@ -2953,8 +2848,6 @@ bootstrap_operation_build_validate_sources() { for i in ${sources_library_object} ; do if [[ ${i} != "$(echo ${i} | sed -e 's|^//*||' -e 's|^\.\.//*||' -e 's|/*$||')" ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - bootstrap_print_first - echo -e "${c_error}ERROR: Cannot Build, invalid build_sources_library_object path provided: '${i}'.${c_reset}" fi @@ -2965,8 +2858,6 @@ bootstrap_operation_build_validate_sources() { for i in ${sources_program_object} ; do if [[ ${i} != "$(echo ${i} | sed -e 's|^//*||' -e 's|^\.\.//*||' -e 's|/*$||')" ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - bootstrap_print_first - echo -e "${c_error}ERROR: Cannot Build, invalid build_sources_program_object path provided: '${i}'.${c_reset}" fi @@ -2977,8 +2868,6 @@ bootstrap_operation_build_validate_sources() { for i in ${sources_program} ; do if [[ ${i} != "$(echo ${i} | sed -e 's|^//*||' -e 's|^\.\.//*||' -e 's|/*$||')" ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - bootstrap_print_first - echo -e "${c_error}ERROR: Cannot Build, invalid build_sources_program path provided: '${i}'.${c_reset}" fi @@ -2989,8 +2878,6 @@ bootstrap_operation_build_validate_sources() { for i in ${sources_documentation} ; do if [[ ${i} != "$(echo ${i} | sed -e 's|^//*||' -e 's|^\.\.//*||' -e 's|/*$||')" ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - bootstrap_print_first - echo -e "${c_error}ERROR: Cannot Build, invalid build_sources_documentation path provided: '${i}'.${c_reset}" fi @@ -3001,8 +2888,6 @@ bootstrap_operation_build_validate_sources() { for i in ${sources_setting} ; do if [[ ${i} != "$(echo ${i} | sed -e 's|^//*||' -e 's|^\.\.//*||' -e 's|/*$||')" ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - bootstrap_print_first - echo -e "${c_error}ERROR: Cannot Build, invalid build_sources_setting path provided: '${i}'.${c_reset}" fi @@ -3098,22 +2983,6 @@ bootstrap_operation_clean() { fi } -bootstrap_print_first() { - - if [[ ${print_line_first} == "yes" ]] ; then - echo - - print_line_first= - fi -} - -bootstrap_print_last() { - - if [[ ${print_line_last} == "yes" ]] ; then - echo - fi -} - bootstrap_cleanup() { unset bootstrap_copyright @@ -3144,8 +3013,6 @@ bootstrap_cleanup() { unset bootstrap_operation_build_validate_shared_static unset bootstrap_operation_build_validate_sources unset bootstrap_operation_clean - unset bootstrap_print_first - unset bootstrap_print_last unset bootstrap_cleanup } diff --git a/build/scripts/generate_ctags.sh b/build/scripts/generate_ctags.sh index 400cfab..edc01ff 100644 --- a/build/scripts/generate_ctags.sh +++ b/build/scripts/generate_ctags.sh @@ -42,8 +42,6 @@ main() { local failure=0 local file= local name= - local print_line_first="yes" - local print_line_last="yes" local source="./" local verbosity=normal local verbose= @@ -95,10 +93,6 @@ main() { verbosity="debug" verbose="+D" verbose_common="-v" - elif [[ ${p} == "+F" || ${p} == "++line_first_no" ]] ; then - print_line_first="no" - elif [[ ${p} == "+L" || ${p} == "++line_last_no" ]] ; then - print_line_last="no" elif [[ ${p} == "+v" || ${p} == "++version" ]] ; then echo ${version} return 0 @@ -123,11 +117,6 @@ main() { p= fi - if [[ ${verbosity} == "quiet" ]] ; then - print_line_first="no" - print_line_last="no" - fi - generate_ctags_handle_colors if [[ ${do_help} == "yes" ]] ; then @@ -146,15 +135,11 @@ main() { if [[ $(echo "$name" | grep -s -o "/") != "" || ${name} == "" ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - generate_ctags_print_first - if [[ ${name} == "" ]] ; then echo -e "${c_error}ERROR: No ${c_notice}name${c_error} parameter has been provided or is empty.${c_reset}" else echo -e "${c_error}ERROR: The ${c_notice}name${c_error} parameter value '${c_notice}${name}${c_error}' must not have a slash.${c_reset}" fi - - generate_ctags_print_last fi generate_ctags_cleanup @@ -164,15 +149,11 @@ main() { if [[ ${destination} == "" || ! -d ${destination} ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - generate_ctags_print_first - if [[ ${destination} == "" ]] ; then echo -e "${c_error}ERROR: The ${c_notice}destination${c_error} parameter is empty.${c_reset}" else echo -e "${c_error}ERROR: The ${c_notice}destination${c_error} parameter value '${c_notice}${destination}${c_error}' must be a directory.${c_reset}" fi - - generate_ctags_print_last fi generate_ctags_cleanup @@ -182,15 +163,11 @@ main() { if [[ ${source} == "" || ! -d ${source} ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - generate_ctags_print_first - if [[ ${source} == "" ]] ; then echo -e "${c_error}ERROR: The ${c_notice}source${c_error} parameter is empty.${c_reset}" else echo -e "${c_error}ERROR: The ${c_notice}source${c_error} parameter value '${c_notice}${source}${c_error}' must be a directory.${c_reset}" fi - - generate_ctags_print_last fi generate_ctags_cleanup @@ -209,11 +186,7 @@ main() { if [[ $? -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - generate_ctags_print_first - echo -e "${c_error}ERROR: The ${c_notice}ctags${c_error} process failed.${c_reset}" - - generate_ctags_print_last fi generate_ctags_cleanup @@ -231,11 +204,7 @@ main() { if [[ $? -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - generate_ctags_print_first - echo -e "${c_error}ERROR: Failed to strip the full path from the ${c_notice}${file}${c_error} file.${c_reset}" - - generate_ctags_print_last fi generate_ctags_cleanup @@ -246,11 +215,7 @@ main() { fi if [[ ${verbosity} != "quiet" ]] ; then - generate_ctags_print_first - echo -e "${c_highlight}SUCCESS: The file ${c_notice}${file}${c_highlight} has been generated.${c_reset}" - - generate_ctags_print_last fi generate_ctags_cleanup @@ -258,22 +223,6 @@ main() { return 0 } -generate_ctags_print_first() { - - if [[ ${print_line_first} == "yes" ]] ; then - echo - - print_line_first= - fi -} - -generate_ctags_print_last() { - - if [[ ${print_line_last} == "yes" ]] ; then - echo - fi -} - generate_ctags_handle_colors() { if [[ ${do_color} == "light" ]] ; then @@ -298,48 +247,38 @@ generate_ctags_handle_colors() { generate_ctags_help() { - generate_ctags_print_first - echo -e "${c_title}${public_name}${c_reset}" echo -e " ${c_notice}Version ${version}${c_reset}" echo echo -e "${c_highlight}${system_name}${c_reset} ${c_notice}[${c_reset} options ${c_notice}]${c_reset} ${c_notice}[${c_reset} name ${c_notice}]${c_reset}" echo echo -e "${c_highlight}Options:${c_reset}" - echo -e " -${c_important}h${c_reset}, --${c_important}help${c_reset} Print this help message." - echo -e " +${c_important}C${c_reset}, ++${c_important}copyright${c_reset} Print the copyright." - echo -e " +${c_important}d${c_reset}, ++${c_important}dark${c_reset} Output using colors that show up better on dark backgrounds." - echo -e " +${c_important}l${c_reset}, ++${c_important}light${c_reset} Output using colors that show up better on light backgrounds." - echo -e " +${c_important}n${c_reset}, ++${c_important}no_color${c_reset} Do not print using color." - echo -e " +${c_important}Q${c_reset}, ++${c_important}quiet${c_reset} Decrease verbosity, silencing most print.to." - echo -e " +${c_important}E${c_reset}, ++${c_important}error${c_reset} Decrease verbosity, using only error print.to." - echo -e " +${c_important}N${c_reset}, ++${c_important}normal${c_reset} Set verbosity to normal." - echo -e " +${c_important}V${c_reset}, ++${c_important}verbose${c_reset} Increase verbosity beyond normal print.to." - echo -e " +${c_important}D${c_reset}, ++${c_important}debug${c_reset} Enable debugging, significantly increasing verbosity beyond normal print.to." - echo -e " +${c_important}v${c_reset}, ++${c_important}version${c_reset} Print only the version number." - echo -e " +${c_important}F${c_reset}, ++${c_important}line_first_no${c_reset} Disable printing of first line." - echo -e " +${c_important}L${c_reset}, ++${c_important}line_last_no${c_reset} Disable printing of last line." + echo -e " -${c_important}h${c_reset}, --${c_important}help${c_reset} Print this help message." + echo -e " +${c_important}C${c_reset}, ++${c_important}copyright${c_reset} Print the copyright." + echo -e " +${c_important}d${c_reset}, ++${c_important}dark${c_reset} Output using colors that show up better on dark backgrounds." + echo -e " +${c_important}l${c_reset}, ++${c_important}light${c_reset} Output using colors that show up better on light backgrounds." + echo -e " +${c_important}n${c_reset}, ++${c_important}no_color${c_reset} Do not print using color." + echo -e " +${c_important}Q${c_reset}, ++${c_important}quiet${c_reset} Decrease verbosity, silencing most print.to." + echo -e " +${c_important}E${c_reset}, ++${c_important}error${c_reset} Decrease verbosity, using only error print.to." + echo -e " +${c_important}N${c_reset}, ++${c_important}normal${c_reset} Set verbosity to normal." + echo -e " +${c_important}V${c_reset}, ++${c_important}verbose${c_reset} Increase verbosity beyond normal print.to." + echo -e " +${c_important}D${c_reset}, ++${c_important}debug${c_reset} Enable debugging, significantly increasing verbosity beyond normal print.to." + echo -e " +${c_important}v${c_reset}, ++${c_important}version${c_reset} Print only the version number." echo echo -e "${c_highlight}Generate Options:${c_reset}" echo -e " -${c_important}d${c_reset}, --${c_important}destination${c_reset} The destination directory to write to." echo -e " -${c_important}s${c_reset}, --${c_important}source${c_reset} The source directory containing the header files for generating the ctags from." echo echo -e "The ${c_notice}name${c_reset} represents the name of the file, without the extension." - - generate_ctags_print_last } generate_ctags_copyright() { - generate_ctags_print_first - echo "Copyright © 2007-2024 Kevin Day." echo echo "Source code license lgpl-2.1-or-later." echo "Standard and specification license open-standard-license-1.0-or-later." echo "Documentation license cc-by-sa-4.0." - - generate_ctags_print_last } generate_ctags_cleanup() { @@ -348,8 +287,6 @@ generate_ctags_cleanup() { unset generate_ctags_main unset generate_ctags_handle_colors unset generate_ctags_help - unset generate_ctags_print_first - unset generate_ctags_print_last unset generate_ctags_cleanup } diff --git a/build/scripts/install.sh b/build/scripts/install.sh index 2220c77..7e4db0c 100644 --- a/build/scripts/install.sh +++ b/build/scripts/install.sh @@ -81,8 +81,6 @@ install_main() { local enable_static_programs="yes" local enable_static_libraries="yes" local enable_includes="yes" - local print_line_first="yes" - local print_line_last="yes" if [[ $# -gt 0 ]] ; then t=$# @@ -130,10 +128,6 @@ install_main() { verbosity="debug" verbose="+D" verbose_common="-v" - elif [[ ${p} == "+F" || ${p} == "++line_first_no" ]] ; then - print_line_first="no" - elif [[ ${p} == "+L" || ${p} == "++line_last_no" ]] ; then - print_line_last="no" elif [[ ${p} == "+v" || ${p} == "++version" ]] ; then echo ${version} return 0 @@ -227,11 +221,6 @@ install_main() { p= fi - if [[ ${verbosity} == "quiet" ]] ; then - print_line_first="no" - print_line_last="no" - fi - install_handle_colors if [[ ${do_help} == "yes" ]] ; then @@ -250,11 +239,7 @@ install_main() { if [[ ${operation_failure} == "fail-unsupported" ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - install_print_first - echo -e "${c_error}ERROR: The operation ${c_notice}${operation}${c_error} was not recognized.${c_reset}" - - install_print_last fi install_cleanup @@ -264,11 +249,7 @@ install_main() { if [[ ! -d ${path_build} ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - install_print_first - echo -e "${c_error}ERROR: The build path ${c_notice}${path_build}${c_error} is not a valid directory.${c_reset}" - - install_print_last fi install_cleanup @@ -278,11 +259,7 @@ install_main() { if [[ ${work} == "" && ${destination_prefix} != "" && ! -d ${destination_prefix} ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - install_print_first - echo -e "${c_error}ERROR: The destination prefix ${c_notice}${destination_prefix}${c_error} is not a valid directory.${c_reset}" - - install_print_last fi install_cleanup @@ -346,11 +323,7 @@ install_main() { if [[ ${work} != "" && ! -d ${work} ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - install_print_first - echo -e "${c_error}ERROR: The work directory ${c_notice}${work}${c_error} is not a valid directory.${c_reset}" - - install_print_last fi install_cleanup @@ -360,11 +333,7 @@ install_main() { if [[ ${work} == "" && -e ${destination_programs} && ! -d ${destination_programs} ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - install_print_first - echo -e "${c_error}ERROR: The destination bindir ${c_notice}${destination_programs}${c_error} is not a valid directory.${c_reset}" - - install_print_last fi install_cleanup @@ -374,11 +343,7 @@ install_main() { if [[ ${work} == "" && -e ${destination_programs_static} && ! -d ${destination_programs_static} ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - install_print_first - echo -e "${c_error}ERROR: The destination (${c_notice}static${c_error}) bindir ${c_notice}${destination_programs_static}${c_error} is not a valid directory.${c_reset}" - - install_print_last fi install_cleanup @@ -388,11 +353,7 @@ install_main() { if [[ ${work} == "" && -e ${destination_programs_shared} && ! -d ${destination_programs_shared} ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - install_print_first - echo -e "${c_error}ERROR: The destination (${c_notice}shared${c_error}) bindir ${c_notice}${destination_programs_shared}${c_error} is not a valid directory.${c_reset}" - - install_print_last fi install_cleanup @@ -402,11 +363,7 @@ install_main() { if [[ ${work} == "" && -e ${destination_includes} && ! -d ${destination_includes} ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - install_print_first - echo -e "${c_error}ERROR: The destination incluedir ${c_notice}${destination_includes}${c_error} is not a valid directory.${c_reset}" - - install_print_last fi install_cleanup @@ -416,11 +373,7 @@ install_main() { if [[ ${work} == "" && -e ${destination_libraries_static} && ! -d ${destination_libraries_static} ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - install_print_first - echo -e "${c_error}ERROR: The destination (${c_notice}static${c_error}) libdir ${c_notice}${destination_libraries_static}${c_error} is not a valid directory.${c_reset}" - - install_print_last fi install_cleanup @@ -430,11 +383,7 @@ install_main() { if [[ ${work} == "" && -e ${destination_libraries_shared} && ! -d ${destination_libraries_shared} ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - install_print_first - echo -e "${c_error}ERROR: The destination (${c_notice}shared${c_error}) libdir ${c_notice}${destination_libraries_shared}${c_error} is not a valid directory.${c_reset}" - - install_print_last fi install_cleanup @@ -444,12 +393,6 @@ install_main() { install_perform_install - if [[ ${verbosity} != "quiet" ]] ; then - if [[ ${failure} -eq 1 || ${verbosity} != "error" ]] ; then - install_print_last - fi - fi - install_cleanup if [[ ${failure} -eq 1 ]] ; then @@ -483,27 +426,23 @@ install_handle_colors() { install_help() { - install_print_first - echo -e "${c_title}${public_name}${c_reset}" echo -e " ${c_notice}Version ${version}${c_reset}" echo echo -e "${c_highlight}${system_name}${c_reset} ${c_notice}[${c_reset} options ${c_notice}]${c_reset}" echo echo -e "${c_highlight}Options:${c_reset}" - echo -e " -${c_important}h${c_reset}, --${c_important}help${c_reset} Print this help message." - echo -e " +${c_important}C${c_reset}, ++${c_important}copyright${c_reset} Print the copyright." - echo -e " +${c_important}d${c_reset}, ++${c_important}dark${c_reset} Output using colors that show up better on dark backgrounds." - echo -e " +${c_important}l${c_reset}, ++${c_important}light${c_reset} Output using colors that show up better on light backgrounds." - echo -e " +${c_important}n${c_reset}, ++${c_important}no_color${c_reset} Do not print using color." - echo -e " +${c_important}Q${c_reset}, ++${c_important}quiet${c_reset} Decrease verbosity, silencing most print.to." - echo -e " +${c_important}E${c_reset}, ++${c_important}error${c_reset} Decrease verbosity, using only error print.to." - echo -e " +${c_important}N${c_reset}, ++${c_important}normal${c_reset} Set verbosity to normal." - echo -e " +${c_important}V${c_reset}, ++${c_important}verbose${c_reset} Increase verbosity beyond normal print.to." - echo -e " +${c_important}D${c_reset}, ++${c_important}debug${c_reset} Enable debugging, significantly increasing verbosity beyond normal print.to." - echo -e " +${c_important}v${c_reset}, ++${c_important}version${c_reset} Print only the version number." - echo -e " +${c_important}F${c_reset}, ++${c_important}line_first_no${c_reset} Disable printing of first line." - echo -e " +${c_important}L${c_reset}, ++${c_important}line_last_no${c_reset} Disable printing of last line." + echo -e " -${c_important}h${c_reset}, --${c_important}help${c_reset} Print this help message." + echo -e " +${c_important}C${c_reset}, ++${c_important}copyright${c_reset} Print the copyright." + echo -e " +${c_important}d${c_reset}, ++${c_important}dark${c_reset} Output using colors that show up better on dark backgrounds." + echo -e " +${c_important}l${c_reset}, ++${c_important}light${c_reset} Output using colors that show up better on light backgrounds." + echo -e " +${c_important}n${c_reset}, ++${c_important}no_color${c_reset} Do not print using color." + echo -e " +${c_important}Q${c_reset}, ++${c_important}quiet${c_reset} Decrease verbosity, silencing most print.to." + echo -e " +${c_important}E${c_reset}, ++${c_important}error${c_reset} Decrease verbosity, using only error print.to." + echo -e " +${c_important}N${c_reset}, ++${c_important}normal${c_reset} Set verbosity to normal." + echo -e " +${c_important}V${c_reset}, ++${c_important}verbose${c_reset} Increase verbosity beyond normal print.to." + echo -e " +${c_important}D${c_reset}, ++${c_important}debug${c_reset} Enable debugging, significantly increasing verbosity beyond normal print.to." + echo -e " +${c_important}v${c_reset}, ++${c_important}version${c_reset} Print only the version number." echo echo -e "${c_highlight}Install Options:${c_reset}" echo -e " -${c_important}b${c_reset}, --${c_important}build${c_reset} Custom build directory." @@ -534,21 +473,15 @@ install_help() { echo -e " --${c_important}libraries-shared${c_reset} Custom destination for shared libraries." echo -e " --${c_important}programs-static${c_reset} Custom destination for static programs." echo -e " --${c_important}programs-shared${c_reset} Custom destination for shared programs." - - install_print_last } install_copyright() { - install_print_first - echo "Copyright © 2007-2024 Kevin Day." echo echo "Source code license lgpl-2.1-or-later." echo "Standard and specification license open-standard-license-1.0-or-later." echo "Documentation license cc-by-sa-4.0." - - install_print_last } install_perform_install() { @@ -588,8 +521,6 @@ install_perform_install() { if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - install_print_first - echo -e "${c_error}ERROR: Failed to create install ${message} ${c_notice}${destination_prefix}${c_error}.${c_reset}" fi @@ -603,8 +534,6 @@ install_perform_install() { if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - install_print_first - echo -e "${c_error}ERROR: Failed to create install ${message} ${c_notice}${destination_programs}${c_error}.${c_reset}" fi @@ -617,8 +546,6 @@ install_perform_install() { if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - install_print_first - echo -e "${c_error}ERROR: Failed to create install ${message} ${c_notice}${destination_programs_shared}${c_error}.${c_reset}" fi @@ -631,8 +558,6 @@ install_perform_install() { if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - install_print_first - echo -e "${c_error}ERROR: Failed to create install ${message} ${c_notice}${destination_programs_static}${c_error}.${c_reset}" fi @@ -647,8 +572,6 @@ install_perform_install() { if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - install_print_first - echo -e "${c_error}ERROR: Failed to create install ${message} ${c_notice}${destination_libraries}${c_error}.${c_reset}" fi @@ -661,8 +584,6 @@ install_perform_install() { if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - install_print_first - echo -e "${c_error}ERROR: Failed to create ${message} ${c_notice}${destination_libraries_shared}${c_error}.${c_reset}" fi @@ -675,8 +596,6 @@ install_perform_install() { if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - install_print_first - echo -e "${c_error}ERROR: Failed to create ${message} ${c_notice}${destination_libraries_static}${c_error}.${c_reset}" fi @@ -691,8 +610,6 @@ install_perform_install() { if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - install_print_first - echo -e "${c_error}ERROR: Failed to create ${message} ${c_notice}${destination_includes}${c_error}.${c_reset}" fi @@ -707,8 +624,6 @@ install_perform_install() { if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - install_print_first - echo -e "${c_error}ERROR: Failed to create ${message} ${c_notice}${destination_documentation}${c_error}.${c_reset}" fi @@ -723,8 +638,6 @@ install_perform_install() { if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - install_print_first - echo -e "${c_error}ERROR: Failed to create ${message} ${c_notice}${destination_settings}${c_error}.${c_reset}" fi @@ -747,8 +660,7 @@ install_perform_install() { if [[ ${file} != "" ]] ; then if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then - install_print_first_or_always - + echo echo -e "${c_highlight}Installing Includes to: ${c_reset}${c_notice}${destination_includes}${c_reset}${c_highlight}.${c_reset}" fi @@ -756,8 +668,6 @@ install_perform_install() { if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - install_print_first - echo -e "${c_error}ERROR: Failed to copy include files from ${c_notice}${path_build}${path_includes}${c_error} to ${c_notice}${destination_includes}${c_error}.${c_reset}" fi @@ -781,8 +691,7 @@ install_perform_install() { if [[ ${file} != "" ]] ; then if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then - install_print_first_or_always - + echo echo -e "${c_highlight}Installing (${c_notice}static${c_highlight}) Libraries to: ${c_reset}${c_notice}${destination_libraries_static}${c_reset}${c_highlight}.${c_reset}" fi @@ -790,8 +699,6 @@ install_perform_install() { if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - install_print_first - echo -e "${c_error}ERROR: Failed to copy (${c_notice}static${c_error}) library files from ${c_notice}${path_build}${path_libraries}${path_static}${c_error} to ${c_notice}${destination_libraries_static}${c_error}.${c_reset}" fi @@ -814,8 +721,7 @@ install_perform_install() { if [[ ${file} != "" ]] ; then if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then - install_print_first_or_always - + echo echo -e "${c_highlight}Installing (${c_notice}shared${c_highlight}) Libraries to: ${c_reset}${c_notice}${destination_libraries_shared}${c_reset}${c_highlight}.${c_reset}" fi @@ -823,8 +729,6 @@ install_perform_install() { if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - install_print_first - echo -e "${c_error}ERROR: Failed to copy (${c_notice}shared${c_error}) library files from ${c_notice}${path_build}${path_libraries}${path_shared}${c_error} to ${c_notice}${destination_libraries_shared}${c_error}.${c_reset}" fi @@ -849,8 +753,7 @@ install_perform_install() { if [[ ${file} != "" && ${enable_static_programs} == "yes" ]] ; then if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then - install_print_first_or_always - + echo echo -e "${c_highlight}Installing (${c_notice}static${c_highlight}) Programs to: ${c_reset}${c_notice}${destination_programs_static}${c_reset}${c_highlight}.${c_reset}" fi @@ -858,8 +761,6 @@ install_perform_install() { if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - install_print_first - echo -e "${c_error}ERROR: failed to copy (${c_notice}static${c_error}) program files from ${c_notice}${path_build}${path_programs}${path_static}${c_error} to ${c_notice}${destination_programs_static}${c_error}.${c_reset}" fi @@ -882,8 +783,7 @@ install_perform_install() { if [[ ${file} != "" ]] ; then if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then - install_print_first_or_always - + echo echo -e "${c_highlight}Installing (${c_notice}shared${c_highlight}) Programs to: ${c_reset}${c_notice}${destination_programs_shared}${c_reset}${c_highlight}.${c_reset}" fi @@ -891,8 +791,6 @@ install_perform_install() { if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - install_print_first - echo -e "${c_error}ERROR: failed to copy (${c_notice}shared${c_error}) program files from ${c_notice}${path_build}${path_programs}${path_shared}${c_error} to ${c_notice}${destination_programs_shared}${c_error}.${c_reset}" fi @@ -916,8 +814,7 @@ install_perform_install() { if [[ ${file} != "" ]] ; then if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then - install_print_first_or_always - + echo echo -e "${c_highlight}Installing Settings to: ${c_reset}${c_notice}${destination_settings}${c_reset}${c_highlight}.${c_reset}" fi @@ -925,8 +822,6 @@ install_perform_install() { if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - install_print_first - echo -e "${c_error}ERROR: failed to copy settings files from ${c_notice}${path_build}${path_settings}${c_error} to ${c_notice}${destination_settings}${c_error}.${c_reset}" fi @@ -949,8 +844,7 @@ install_perform_install() { if [[ ${file} != "" ]] ; then if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then - install_print_first_or_always - + echo echo -e "${c_highlight}Installing Documentation to: ${c_reset}${c_notice}${destination_documentation}${c_reset}${c_highlight}.${c_reset}" fi @@ -958,8 +852,6 @@ install_perform_install() { if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - install_print_first - echo -e "${c_error}ERROR: failed to copy documentation files from ${c_notice}${path_build}${path_documentation}${c_error} to ${c_notice}${destination_documentation}${c_error}.${c_reset}" fi @@ -975,35 +867,6 @@ install_perform_install() { return 0 } -install_print_first() { - - if [[ ${print_line_first} == "yes" ]] ; then - echo - - print_line_first= - fi -} - -install_print_first_or_always() { - - if [[ ${print_line_first} == "yes" ]] ; then - echo - - print_line_first= - elif [[ ${print_line_first} == "no" ]] ; then - print_line_first= - else - echo - fi -} - -install_print_last() { - - if [[ ${print_line_last} == "yes" ]] ; then - echo - fi -} - install_cleanup() { unset install_copyright @@ -1011,9 +874,6 @@ install_cleanup() { unset install_handle_colors unset install_help unset install_perform_install - unset install_print_first - unset install_print_first_or_always - unset install_print_last unset install_cleanup } diff --git a/build/scripts/package.sh b/build/scripts/package.sh index 5f06e15..9d9d4c9 100644 --- a/build/scripts/package.sh +++ b/build/scripts/package.sh @@ -53,8 +53,6 @@ package_main() { local path_destination=package/ local path_sources=./ local prepend= - local print_line_first="yes" - local print_line_last="yes" local verbosity=normal local verbose= local verbose_common= @@ -106,10 +104,6 @@ package_main() { verbosity="debug" verbose="+D" verbose_common="-v" - elif [[ ${p} == "+F" || ${p} == "++line_first_no" ]] ; then - print_line_first="no" - elif [[ ${p} == "+L" || ${p} == "++line_last_no" ]] ; then - print_line_last="no" elif [[ ${p} == "+v" || ${p} == "++version" ]] ; then echo $version return 0 @@ -159,11 +153,6 @@ package_main() { p= fi - if [[ ${verbosity} == "quiet" ]] ; then - print_line_first="no" - print_line_last="no" - fi - package_handle_colors if [[ ${do_help} == "yes" ]] ; then @@ -182,11 +171,7 @@ package_main() { if [[ ${operation_failure} == "fail-multiple" ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - package_print_first - echo -e "${c_error}ERROR: Only one operation may be specified at a time.${c_reset}" - - package_print_last fi package_cleanup @@ -205,11 +190,7 @@ package_main() { if [[ ! -f build/stand_alone/${i}.settings ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - package_print_first - echo -e "${c_error}ERROR: Unknown or unsupported stand alone program '${c_notice}${i}${c_error}'.${c_reset}" - - package_print_last fi package_cleanup @@ -231,11 +212,7 @@ package_main() { if [[ ${operation} == "build" || ${operation} == "rebuild" ]] ; then if [[ ! -d ${path_build} ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - package_print_first - echo -e "${c_error}ERROR: Build directory '${c_notice}${path_build}${c_error}' is invalid or missing.${c_reset}" - - package_print_last fi package_cleanup @@ -248,11 +225,7 @@ package_main() { if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - package_print_first - echo -e "${c_error}ERROR: Package directory '${c_notice}${path_destination}${c_error}' is invalid or could not be created.${c_reset}" - - package_print_last fi package_cleanup @@ -263,11 +236,7 @@ package_main() { if [[ ! -d ${path_sources} ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - package_print_first - echo -e "${c_error}ERROR: Sources directory '${c_notice}${path_sources}${c_error}' is invalid or missing.${c_reset}" - - package_print_last fi package_cleanup @@ -277,11 +246,7 @@ package_main() { if [[ ! -d ${path_sources}level_0/ ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - package_print_first - echo -e "${c_error}ERROR: Build sources directory '${c_notice}${path_sources}level_0/${c_error}' is invalid or missing.${c_reset}" - - package_print_last fi package_cleanup @@ -291,11 +256,7 @@ package_main() { if [[ ! -d ${path_sources}level_1/ ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - package_print_first - echo -e "${c_error}ERROR: Build sources directory '${c_notice}${path_sources}level_1/${c_error}' is invalid or missing.${c_reset}" - - package_print_last fi package_cleanup @@ -305,11 +266,7 @@ package_main() { if [[ ! -d ${path_sources}level_2/ ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - package_print_first - echo -e "${c_error}ERROR: Build sources directory '${c_notice}${path_sources}level_2/${c_error}' is invalid or missing.${c_reset}" - - package_print_last fi package_cleanup @@ -319,11 +276,7 @@ package_main() { if [[ ! -d ${path_sources}level_3/ ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - package_print_first - echo -e "${c_error}ERROR: Build sources directory '${c_notice}${path_sources}level_3/${c_error}' is invalid or missing.${c_reset}" - - package_print_last fi package_cleanup @@ -385,11 +338,7 @@ package_main() { elif [[ ${operation} == "dependencies" ]] ; then if [[ ! -d ${path_sources} ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - package_print_first - echo -e "${c_error}ERROR: Sources directory '${c_notice}${path_sources}${c_error}' is invalid or missing.${c_reset}" - - package_print_last fi package_cleanup @@ -401,11 +350,7 @@ package_main() { elif [[ ${operation} == "clean" ]] ; then if [[ ! -d ${path_destination} ]] ; then if [[ ${verbosity} != "quiet" && ${verbosity} != "error" ]] ; then - package_print_first - echo -e "${c_warning}WARNING: Package directory '${c_notice}${path_destination}${c_error}' does not exist, there is nothing to clean.${c_reset}" - - package_print_last fi package_cleanup @@ -416,11 +361,7 @@ package_main() { package_operation_clean elif [[ ${operation} == "" ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - package_print_first - echo -e "${c_error}ERROR: No operation was given.${c_reset}" - - package_print_last fi package_cleanup @@ -428,11 +369,7 @@ package_main() { return 1 else if [[ ${verbosity} != "quiet" ]] ; then - package_print_first - echo -e "${c_error}ERROR: The operation ${c_notice}${operation}${c_error} was not recognized.${c_reset}" - - package_print_last fi package_cleanup @@ -440,12 +377,6 @@ package_main() { return 1 fi - if [[ ${verbosity} != "quiet" ]] ; then - if [[ ${failure} -eq 1 || ${verbosity} != "error" ]] ; then - package_print_last - fi - fi - package_cleanup if [[ ${failure} -eq 1 ]] ; then @@ -479,8 +410,6 @@ package_handle_colors() { package_help() { - package_print_first - echo -e "${c_title}${public_name}${c_reset}" echo -e " ${c_notice}Version ${version}${c_reset}" echo @@ -491,19 +420,17 @@ package_help() { echo -e " ${c_important}rebuild${c_reset} Delete all built packages then build the package." echo echo -e "${c_highlight}Options:${c_reset}" - echo -e " -${c_important}h${c_reset}, --${c_important}help${c_reset} Print this help message." - echo -e " +${c_important}C${c_reset}, ++${c_important}copyright${c_reset} Print the copyright." - echo -e " +${c_important}d${c_reset}, ++${c_important}dark${c_reset} Output using colors that show up better on dark backgrounds." - echo -e " +${c_important}l${c_reset}, ++${c_important}light${c_reset} Output using colors that show up better on light backgrounds." - echo -e " +${c_important}n${c_reset}, ++${c_important}no_color${c_reset} Do not print using color." - echo -e " +${c_important}Q${c_reset}, ++${c_important}quiet${c_reset} Decrease verbosity, silencing most print.to." - echo -e " +${c_important}E${c_reset}, ++${c_important}error${c_reset} Decrease verbosity, using only error print.to." - echo -e " +${c_important}N${c_reset}, ++${c_important}normal${c_reset} Set verbosity to normal." - echo -e " +${c_important}V${c_reset}, ++${c_important}verbose${c_reset} Increase verbosity beyond normal print.to." - echo -e " +${c_important}D${c_reset}, ++${c_important}debug${c_reset} Enable debugging, significantly increasing verbosity beyond normal print.to." - echo -e " +${c_important}v${c_reset}, ++${c_important}version${c_reset} Print only the version number." - echo -e " +${c_important}F${c_reset}, ++${c_important}line_first_no${c_reset} Disable printing of first line." - echo -e " +${c_important}L${c_reset}, ++${c_important}line_last_no${c_reset} Disable printing of last line." + echo -e " -${c_important}h${c_reset}, --${c_important}help${c_reset} Print this help message." + echo -e " +${c_important}C${c_reset}, ++${c_important}copyright${c_reset} Print the copyright." + echo -e " +${c_important}d${c_reset}, ++${c_important}dark${c_reset} Output using colors that show up better on dark backgrounds." + echo -e " +${c_important}l${c_reset}, ++${c_important}light${c_reset} Output using colors that show up better on light backgrounds." + echo -e " +${c_important}n${c_reset}, ++${c_important}no_color${c_reset} Do not print using color." + echo -e " +${c_important}Q${c_reset}, ++${c_important}quiet${c_reset} Decrease verbosity, silencing most print.to." + echo -e " +${c_important}E${c_reset}, ++${c_important}error${c_reset} Decrease verbosity, using only error print.to." + echo -e " +${c_important}N${c_reset}, ++${c_important}normal${c_reset} Set verbosity to normal." + echo -e " +${c_important}V${c_reset}, ++${c_important}verbose${c_reset} Increase verbosity beyond normal print.to." + echo -e " +${c_important}D${c_reset}, ++${c_important}debug${c_reset} Enable debugging, significantly increasing verbosity beyond normal print.to." + echo -e " +${c_important}v${c_reset}, ++${c_important}version${c_reset} Print only the version number." echo echo -e "${c_highlight}Package Options:${c_reset}" echo -e " -${c_important}d${c_reset}, --${c_important}destination${c_reset} Specify a custom package destination directory." @@ -515,20 +442,15 @@ package_help() { echo -e " -${c_important}p${c_reset}, --${c_important}program${c_reset} Build program packages (level 3)." echo -e " -${c_important}s${c_reset}, --${c_important}sources${c_reset} Specify a custom sources directory." echo -e " -${c_important}S${c_reset}, --${c_important}stand_alone${c_reset} Build a specified program package as stand alone." - echo } package_copyright() { - package_print_first - echo "Copyright © 2007-2024 Kevin Day." echo echo "Source code license lgpl-2.1-or-later." echo "Standard and specification license open-standard-license-1.0-or-later." echo "Documentation license cc-by-sa-4.0." - - package_print_last } package_create_base_files() { @@ -538,8 +460,6 @@ package_create_base_files() { if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - package_print_first - echo -e "${c_error}ERROR: Failed to create directory ${c_notice}${package}${c_error}.${c_reset}" fi @@ -552,8 +472,6 @@ package_create_base_files() { if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - package_print_first - echo -e "${c_error}ERROR: Failed to copy directory ${c_notice}${path_build}documents${c_error} to ${c_notice}${package}${c_error}.${c_reset}" fi @@ -567,8 +485,6 @@ package_create_base_files() { if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - package_print_first - echo -e "${c_error}ERROR: Failed to copy directory ${c_notice}${path_build}licenses${c_error} to ${c_notice}${package}${c_error}.${c_reset}" fi @@ -579,8 +495,6 @@ package_create_base_files() { if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - package_print_first - echo -e "${c_error}ERROR: Failed to copy directory ${c_notice}${path_build}../licenses${c_error} to ${c_notice}${package}${c_error}.${c_reset}" fi @@ -588,8 +502,6 @@ package_create_base_files() { fi else if [[ ${verbosity} != "quiet" ]] ; then - package_print_first - echo -e "${c_error}ERROR: Neither directory ${c_notice}${path_build}licenses${c_error} nor ${c_notice}${path_build}../licenses${c_error} can be found or are invalid.${c_reset}" fi @@ -602,8 +514,6 @@ package_create_base_files() { if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - package_print_first - echo -e "${c_error}ERROR: Failed to copy script ${c_notice}${path_build}bootstrap.sh${c_error} to ${c_notice}${package}${c_error}.${c_reset}" fi @@ -615,8 +525,6 @@ package_create_base_files() { if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - package_print_first - echo -e "${c_error}ERROR: Failed to set executable permissions on script ${c_notice}${package}bootstrap.sh${c_error}.${c_reset}" fi @@ -629,8 +537,6 @@ package_create_base_files() { if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - package_print_first - echo -e "${c_error}ERROR: Failed to copy script ${c_notice}${path_build}install.sh${c_error} to ${c_notice}${package}${c_error}.${c_reset}" fi @@ -643,8 +549,6 @@ package_create_base_files() { if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - package_print_first - echo -e "${c_error}ERROR: Failed to set executable permissions on script ${c_notice}${package}install.sh${c_error}.${c_reset}" fi @@ -691,15 +595,12 @@ package_dependencies_individual() { level_current="$(echo ${directory} | grep -o '\") == "" ]] ; then if [[ ${verbosity} == "verbose" || ${verbosity} == "debug" ]] ; then - test_print_first_or_always - echo -e "${c_warning}WARNING: Project '${c_notice}${project}${c_warning}' does not have a testfile.${c_reset}" fi else - test_print_first_or_always - echo -e "Project '${c_notice}${project}${c_reset}' has no tests and is not expected to.${c_reset}" fi @@ -1181,8 +1041,6 @@ test_operate_tests_programs() { if [[ ${failure} -eq 0 ]] ; then if [[ ! -f ${path_test_package_program}${program}-${version}/data/build/testfile ]] ; then if [[ ${verbosity} == "verbose" || ${verbosity} == "debug" ]] ; then - test_print_first_or_always - echo -e "${c_warning}WARNING: Program '${c_notice}${program}${c_warning}' does not have a testfile.${c_reset}" fi @@ -1214,8 +1072,6 @@ test_operate_tests_run() { if [[ ${failure} -eq 0 ]] ; then if [[ ${verbosity} == "debug" ]] ; then - test_print_first_or_always - if [[ ${build_compiler} == "gcc" ]] ; then echo "PATH=\"${env_path}\" LD_LIBRARY_PATH=\"${env_libs}\" fake ${verbose} ${context} -w \"${destination}\" -m individual -m ${test_thread} ${thread_individual_param} ${thread_individual_value} -m test ${analyze_flag} ${analyze_value} clean make -f testfile ${ci_arguments}" else @@ -1231,11 +1087,7 @@ test_operate_tests_run() { if [[ ${?} -ne 0 ]] ; then if [[ ${verbosity} != "quiet" ]] ; then - test_print_first - echo -e "${c_error}ERROR: Failure while testing ${what} '${c_notice}${name}${c_reset}${c_error}'.${c_reset}" - - test_print_last fi let failure=1 @@ -1243,35 +1095,6 @@ test_operate_tests_run() { fi } -test_print_first() { - - if [[ ${print_line_first} == "yes" ]] ; then - echo - - print_line_first= - fi -} - -test_print_first_or_always() { - - if [[ ${print_line_first} == "yes" ]] ; then - echo - - print_line_first= - elif [[ ${print_line_first} == "no" ]] ; then - print_line_first= - else - echo - fi -} - -test_print_last() { - - if [[ ${print_line_last} == "yes" ]] ; then - echo - fi -} - test_cleanup() { unset test_copyright @@ -1293,9 +1116,6 @@ test_cleanup() { unset test_operate_tests_projects unset test_operate_tests_programs unset test_operate_tests_run - unset test_print_first - unset test_print_first_or_always - unset test_print_last unset test_cleanup } diff --git a/level_0/f_console/c/console/common.c b/level_0/f_console/c/console/common.c index c7646c5..4c9ac78 100644 --- a/level_0/f_console/c/console/common.c +++ b/level_0/f_console/c/console/common.c @@ -29,14 +29,6 @@ extern "C" { const f_string_static_t f_console_standard_short_light_s = macro_f_string_static_t_initialize_1(F_console_standard_short_light_s, 0, F_console_standard_short_light_s_length); #endif // _di_f_console_standard_short_light_s_ - #ifndef _di_f_console_standard_short_line_first_no_s_ - const f_string_static_t f_console_standard_short_line_first_no_s = macro_f_string_static_t_initialize_1(F_console_standard_short_line_first_no_s, 0, F_console_standard_short_line_first_no_s_length); - #endif // _di_f_console_standard_short_line_first_no_s_ - - #ifndef _di_f_console_standard_short_line_last_no_s_ - const f_string_static_t f_console_standard_short_line_last_no_s = macro_f_string_static_t_initialize_1(F_console_standard_short_line_last_no_s, 0, F_console_standard_short_line_last_no_s_length); - #endif // _di_f_console_standard_short_line_last_no_s_ - #ifndef _di_f_console_standard_short_no_color_s_ const f_string_static_t f_console_standard_short_no_color_s = macro_f_string_static_t_initialize_1(F_console_standard_short_no_color_s, 0, F_console_standard_short_no_color_s_length); #endif // _di_f_console_standard_short_no_color_s_ @@ -89,14 +81,6 @@ extern "C" { const f_string_static_t f_console_standard_long_light_s = macro_f_string_static_t_initialize_1(F_console_standard_long_light_s, 0, F_console_standard_long_light_s_length); #endif // _di_f_console_standard_long_light_s_ - #ifndef _di_f_console_standard_long_line_first_no_s_ - const f_string_static_t f_console_standard_long_line_first_no_s = macro_f_string_static_t_initialize_1(F_console_standard_long_line_first_no_s, 0, F_console_standard_long_line_first_no_s_length); - #endif // _di_f_console_standard_long_line_first_no_s_ - - #ifndef _di_f_console_standard_long_line_last_no_s_ - const f_string_static_t f_console_standard_long_line_last_no_s = macro_f_string_static_t_initialize_1(F_console_standard_long_line_last_no_s, 0, F_console_standard_long_line_last_no_s_length); - #endif // _di_f_console_standard_long_line_last_no_s_ - #ifndef _di_f_console_standard_long_no_color_s_ const f_string_static_t f_console_standard_long_no_color_s = macro_f_string_static_t_initialize_1(F_console_standard_long_no_color_s, 0, F_console_standard_long_no_color_s_length); #endif // _di_f_console_standard_long_no_color_s_ diff --git a/level_0/f_console/c/console/common.h b/level_0/f_console/c/console/common.h index b0d0463..651c87c 100644 --- a/level_0/f_console/c/console/common.h +++ b/level_0/f_console/c/console/common.h @@ -577,12 +577,10 @@ extern "C" { f_console_standard_parameter_verbosity_verbose_e, f_console_standard_parameter_verbosity_debug_e, f_console_standard_parameter_version_e, - f_console_standard_parameter_line_first_no_e, - f_console_standard_parameter_line_last_no_e, f_console_standard_parameter_last_e, }; // enum - #define f_console_parameter_state_type_total_d 13 + #define f_console_parameter_state_type_total_d 11 #endif // _di_f_console_standard_parameter_e_ /** @@ -604,8 +602,6 @@ extern "C" { * - normal: Use normal printing (don't use debug/quiet/verbose). * - quiet: Decrease verbosity, print less, in some use cases this could mean printing nothing. * - verbose: Increase verbosity, print more, in some use cases this could mean printing just about everything. - * - line_first_no: Don't print the first line if one is to be printed (useful in scripts) (may include error/warning messages). - * - line_last_no: Don't print the last line if one is to be printed (useful in scripts) (may include error/warning messages). * * The following are less subjective in interpretation but do allow some flexibility. * - dark: Do display color intended for dark backgrounds (often the default behavior) when printing to the console. Other contexts may be acceptable (such as voice inflections, or lack-thereof) for audio.) @@ -624,69 +620,61 @@ extern "C" { * - To avoid problems with the status code after a program is forcibly killed, the status_out environment variable should be cleared at program start. */ #ifndef _di_f_console_standard_s_ - #define F_console_standard_short_copyright_s "C" - #define F_console_standard_short_dark_s "d" - #define F_console_standard_short_debug_s "D" - #define F_console_standard_short_error_s "E" - #define F_console_standard_short_help_s "h" - #define F_console_standard_short_light_s "l" - #define F_console_standard_short_line_first_no_s "F" - #define F_console_standard_short_line_last_no_s "L" - #define F_console_standard_short_no_color_s "n" - #define F_console_standard_short_normal_s "N" - #define F_console_standard_short_quiet_s "Q" - #define F_console_standard_short_status_in_s "s" - #define F_console_standard_short_status_out_s "S" - #define F_console_standard_short_verbose_s "V" - #define F_console_standard_short_version_s "v" - - #define F_console_standard_short_copyright_s_length 1 - #define F_console_standard_short_dark_s_length 1 - #define F_console_standard_short_debug_s_length 1 - #define F_console_standard_short_error_s_length 1 - #define F_console_standard_short_help_s_length 1 - #define F_console_standard_short_light_s_length 1 - #define F_console_standard_short_line_first_no_s_length 1 - #define F_console_standard_short_line_last_no_s_length 1 - #define F_console_standard_short_no_color_s_length 1 - #define F_console_standard_short_normal_s_length 1 - #define F_console_standard_short_quiet_s_length 1 - #define F_console_standard_short_status_in_s_length 1 - #define F_console_standard_short_status_out_s_length 1 - #define F_console_standard_short_verbose_s_length 1 - #define F_console_standard_short_version_s_length 1 - - #define F_console_standard_long_copyright_s "copyright" - #define F_console_standard_long_dark_s "dark" - #define F_console_standard_long_debug_s "debug" - #define F_console_standard_long_error_s "error" - #define F_console_standard_long_help_s "help" - #define F_console_standard_long_light_s "light" - #define F_console_standard_long_line_first_no_s "line_first_no" - #define F_console_standard_long_line_last_no_s "line_last_no" - #define F_console_standard_long_no_color_s "no_color" - #define F_console_standard_long_normal_s "normal" - #define F_console_standard_long_quiet_s "quiet" - #define F_console_standard_long_status_in_s "status_in" - #define F_console_standard_long_status_out_s "status_out" - #define F_console_standard_long_verbose_s "verbose" - #define F_console_standard_long_version_s "version" - - #define F_console_standard_long_copyright_s_length 9 - #define F_console_standard_long_dark_s_length 4 - #define F_console_standard_long_debug_s_length 5 - #define F_console_standard_long_error_s_length 5 - #define F_console_standard_long_help_s_length 4 - #define F_console_standard_long_light_s_length 5 - #define F_console_standard_long_line_first_no_s_length 13 - #define F_console_standard_long_line_last_no_s_length 12 - #define F_console_standard_long_no_color_s_length 8 - #define F_console_standard_long_normal_s_length 6 - #define F_console_standard_long_quiet_s_length 5 - #define F_console_standard_long_status_in_s_length 9 - #define F_console_standard_long_status_out_s_length 10 - #define F_console_standard_long_verbose_s_length 7 - #define F_console_standard_long_version_s_length 7 + #define F_console_standard_short_copyright_s "C" + #define F_console_standard_short_dark_s "d" + #define F_console_standard_short_debug_s "D" + #define F_console_standard_short_error_s "E" + #define F_console_standard_short_help_s "h" + #define F_console_standard_short_light_s "l" + #define F_console_standard_short_no_color_s "n" + #define F_console_standard_short_normal_s "N" + #define F_console_standard_short_quiet_s "Q" + #define F_console_standard_short_status_in_s "s" + #define F_console_standard_short_status_out_s "S" + #define F_console_standard_short_verbose_s "V" + #define F_console_standard_short_version_s "v" + + #define F_console_standard_short_copyright_s_length 1 + #define F_console_standard_short_dark_s_length 1 + #define F_console_standard_short_debug_s_length 1 + #define F_console_standard_short_error_s_length 1 + #define F_console_standard_short_help_s_length 1 + #define F_console_standard_short_light_s_length 1 + #define F_console_standard_short_no_color_s_length 1 + #define F_console_standard_short_normal_s_length 1 + #define F_console_standard_short_quiet_s_length 1 + #define F_console_standard_short_status_in_s_length 1 + #define F_console_standard_short_status_out_s_length 1 + #define F_console_standard_short_verbose_s_length 1 + #define F_console_standard_short_version_s_length 1 + + #define F_console_standard_long_copyright_s "copyright" + #define F_console_standard_long_dark_s "dark" + #define F_console_standard_long_debug_s "debug" + #define F_console_standard_long_error_s "error" + #define F_console_standard_long_help_s "help" + #define F_console_standard_long_light_s "light" + #define F_console_standard_long_no_color_s "no_color" + #define F_console_standard_long_normal_s "normal" + #define F_console_standard_long_quiet_s "quiet" + #define F_console_standard_long_status_in_s "status_in" + #define F_console_standard_long_status_out_s "status_out" + #define F_console_standard_long_verbose_s "verbose" + #define F_console_standard_long_version_s "version" + + #define F_console_standard_long_copyright_s_length 9 + #define F_console_standard_long_dark_s_length 4 + #define F_console_standard_long_debug_s_length 5 + #define F_console_standard_long_error_s_length 5 + #define F_console_standard_long_help_s_length 4 + #define F_console_standard_long_light_s_length 5 + #define F_console_standard_long_no_color_s_length 8 + #define F_console_standard_long_normal_s_length 6 + #define F_console_standard_long_quiet_s_length 5 + #define F_console_standard_long_status_in_s_length 9 + #define F_console_standard_long_status_out_s_length 10 + #define F_console_standard_long_verbose_s_length 7 + #define F_console_standard_long_version_s_length 7 #ifndef _di_f_console_standard_short_copyright_s_ extern const f_string_static_t f_console_standard_short_copyright_s; @@ -712,14 +700,6 @@ extern "C" { extern const f_string_static_t f_console_standard_short_light_s; #endif // _di_f_console_standard_short_light_s_ - #ifndef _di_f_console_standard_short_line_first_no_s_ - extern const f_string_static_t f_console_standard_short_line_first_no_s; - #endif // _di_f_console_standard_short_line_first_no_s_ - - #ifndef _di_f_console_standard_short_line_last_no_s_ - extern const f_string_static_t f_console_standard_short_line_last_no_s; - #endif // _di_f_console_standard_short_line_last_no_s_ - #ifndef _di_f_console_standard_short_no_color_s_ extern const f_string_static_t f_console_standard_short_no_color_s; #endif // _di_f_console_standard_short_no_color_s_ @@ -772,14 +752,6 @@ extern "C" { extern const f_string_static_t f_console_standard_long_light_s; #endif // _di_f_console_standard_long_light_s_ - #ifndef _di_f_console_standard_long_line_first_no_s_ - extern const f_string_static_t f_console_standard_long_line_first_no_s; - #endif // _di_f_console_standard_long_line_first_no_s_ - - #ifndef _di_f_console_standard_long_line_last_no_s_ - extern const f_string_static_t f_console_standard_long_line_last_no_s; - #endif // _di_f_console_standard_long_line_last_no_s_ - #ifndef _di_f_console_standard_long_no_color_s_ extern const f_string_static_t f_console_standard_long_no_color_s; #endif // _di_f_console_standard_long_no_color_s_ diff --git a/level_2/fll_program/c/program/common.h b/level_2/fll_program/c/program/common.h index 04a8c02..f1ca6a7 100644 --- a/level_2/fll_program/c/program/common.h +++ b/level_2/fll_program/c/program/common.h @@ -167,19 +167,17 @@ extern "C" { } #define macro_fll_program_console_parameter_standard_initialize \ - macro_f_console_parameter_t_initialize_3(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, f_console_flag_normal_e), \ - macro_f_console_parameter_t_initialize_3(f_console_standard_short_copyright_s, f_console_standard_long_copyright_s, 0, f_console_flag_inverse_e), \ - macro_f_console_parameter_t_initialize_3(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, f_console_flag_inverse_e), \ - macro_f_console_parameter_t_initialize_3(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, f_console_flag_inverse_e), \ - macro_f_console_parameter_t_initialize_3(f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, 0, f_console_flag_inverse_e), \ - macro_f_console_parameter_t_initialize_3(f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, 0, f_console_flag_inverse_e), \ - macro_f_console_parameter_t_initialize_3(f_console_standard_short_error_s, f_console_standard_long_error_s, 0, f_console_flag_inverse_e), \ - macro_f_console_parameter_t_initialize_3(f_console_standard_short_normal_s, f_console_standard_long_normal_s, 0, f_console_flag_inverse_e), \ - macro_f_console_parameter_t_initialize_3(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, f_console_flag_inverse_e), \ - macro_f_console_parameter_t_initialize_3(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, f_console_flag_inverse_e), \ - macro_f_console_parameter_t_initialize_3(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, f_console_flag_inverse_e), \ - macro_f_console_parameter_t_initialize_3(f_console_standard_short_line_first_no_s, f_console_standard_long_line_first_no_s, 0, f_console_flag_inverse_e), \ - macro_f_console_parameter_t_initialize_3(f_console_standard_short_line_last_no_s, f_console_standard_long_line_last_no_s, 0, f_console_flag_inverse_e) + macro_f_console_parameter_t_initialize_3(f_console_standard_short_help_s, f_console_standard_long_help_s, 0, f_console_flag_normal_e), \ + macro_f_console_parameter_t_initialize_3(f_console_standard_short_copyright_s, f_console_standard_long_copyright_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize_3(f_console_standard_short_light_s, f_console_standard_long_light_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize_3(f_console_standard_short_dark_s, f_console_standard_long_dark_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize_3(f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize_3(f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize_3(f_console_standard_short_error_s, f_console_standard_long_error_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize_3(f_console_standard_short_normal_s, f_console_standard_long_normal_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize_3(f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize_3(f_console_standard_short_debug_s, f_console_standard_long_debug_s, 0, f_console_flag_inverse_e), \ + macro_f_console_parameter_t_initialize_3(f_console_standard_short_version_s, f_console_standard_long_version_s, 0, f_console_flag_inverse_e) #endif // _di_fll_program_data_t_ /** diff --git a/level_2/fll_program/c/program/print.c b/level_2/fll_program/c/program/print.c index 6f6d30d..3aab56b 100644 --- a/level_2/fll_program/c/program/print.c +++ b/level_2/fll_program/c/program/print.c @@ -589,19 +589,17 @@ extern "C" { if (!print) return F_status_set_error(F_parameter); #endif // _di_level_2_parameter_checking_ - private_fll_program_print_help_option(print, f_console_standard_short_help_s, f_console_standard_long_help_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Print this help message."); - private_fll_program_print_help_option(print, f_console_standard_short_copyright_s, f_console_standard_long_copyright_s, f_console_symbol_short_inverse_s, f_console_symbol_long_inverse_s, " Print the copyright."); - private_fll_program_print_help_option(print, f_console_standard_short_dark_s, f_console_standard_long_dark_s, f_console_symbol_short_inverse_s, f_console_symbol_long_inverse_s, " Output using colors that show up better on dark backgrounds."); - private_fll_program_print_help_option(print, f_console_standard_short_light_s, f_console_standard_long_light_s, f_console_symbol_short_inverse_s, f_console_symbol_long_inverse_s, " Output using colors that show up better on light backgrounds."); - private_fll_program_print_help_option(print, f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, f_console_symbol_short_inverse_s, f_console_symbol_long_inverse_s, " Do not print using color."); - private_fll_program_print_help_option(print, f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, f_console_symbol_short_inverse_s, f_console_symbol_long_inverse_s, " Decrease verbosity, silencing most print->to."); - private_fll_program_print_help_option(print, f_console_standard_short_error_s, f_console_standard_long_error_s, f_console_symbol_short_inverse_s, f_console_symbol_long_inverse_s, " Decrease verbosity, using only error print->to."); - private_fll_program_print_help_option(print, f_console_standard_short_normal_s, f_console_standard_long_normal_s, f_console_symbol_short_inverse_s, f_console_symbol_long_inverse_s, " Set verbosity to normal."); - private_fll_program_print_help_option(print, f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, f_console_symbol_short_inverse_s, f_console_symbol_long_inverse_s, " Increase verbosity beyond normal print->to."); - private_fll_program_print_help_option(print, f_console_standard_short_debug_s, f_console_standard_long_debug_s, f_console_symbol_short_inverse_s, f_console_symbol_long_inverse_s, " Enable debugging, significantly increasing verbosity beyond normal print->to."); - private_fll_program_print_help_option(print, f_console_standard_short_version_s, f_console_standard_long_version_s, f_console_symbol_short_inverse_s, f_console_symbol_long_inverse_s, " Print only the version number."); - private_fll_program_print_help_option(print, f_console_standard_short_line_first_no_s, f_console_standard_long_line_first_no_s, f_console_symbol_short_inverse_s, f_console_symbol_long_inverse_s, "Disable printing of first line."); - private_fll_program_print_help_option(print, f_console_standard_short_line_last_no_s, f_console_standard_long_line_last_no_s, f_console_symbol_short_inverse_s, f_console_symbol_long_inverse_s, " Disable printing of last line."); + private_fll_program_print_help_option(print, f_console_standard_short_help_s, f_console_standard_long_help_s, f_console_symbol_short_normal_s, f_console_symbol_long_normal_s, " Print this help message."); + private_fll_program_print_help_option(print, f_console_standard_short_copyright_s, f_console_standard_long_copyright_s, f_console_symbol_short_inverse_s, f_console_symbol_long_inverse_s, "Print the copyright."); + private_fll_program_print_help_option(print, f_console_standard_short_dark_s, f_console_standard_long_dark_s, f_console_symbol_short_inverse_s, f_console_symbol_long_inverse_s, " Output using colors that show up better on dark backgrounds."); + private_fll_program_print_help_option(print, f_console_standard_short_light_s, f_console_standard_long_light_s, f_console_symbol_short_inverse_s, f_console_symbol_long_inverse_s, " Output using colors that show up better on light backgrounds."); + private_fll_program_print_help_option(print, f_console_standard_short_no_color_s, f_console_standard_long_no_color_s, f_console_symbol_short_inverse_s, f_console_symbol_long_inverse_s, " Do not print using color."); + private_fll_program_print_help_option(print, f_console_standard_short_quiet_s, f_console_standard_long_quiet_s, f_console_symbol_short_inverse_s, f_console_symbol_long_inverse_s, " Decrease verbosity, silencing most print->to."); + private_fll_program_print_help_option(print, f_console_standard_short_error_s, f_console_standard_long_error_s, f_console_symbol_short_inverse_s, f_console_symbol_long_inverse_s, " Decrease verbosity, using only error print->to."); + private_fll_program_print_help_option(print, f_console_standard_short_normal_s, f_console_standard_long_normal_s, f_console_symbol_short_inverse_s, f_console_symbol_long_inverse_s, " Set verbosity to normal."); + private_fll_program_print_help_option(print, f_console_standard_short_verbose_s, f_console_standard_long_verbose_s, f_console_symbol_short_inverse_s, f_console_symbol_long_inverse_s, " Increase verbosity beyond normal print->to."); + private_fll_program_print_help_option(print, f_console_standard_short_debug_s, f_console_standard_long_debug_s, f_console_symbol_short_inverse_s, f_console_symbol_long_inverse_s, " Enable debugging, significantly increasing verbosity beyond normal print->to."); + private_fll_program_print_help_option(print, f_console_standard_short_version_s, f_console_standard_long_version_s, f_console_symbol_short_inverse_s, f_console_symbol_long_inverse_s, " Print only the version number."); return F_okay; } diff --git a/level_3/byte_dump/c/main/byte_dump.c b/level_3/byte_dump/c/main/byte_dump.c index d4e610b..8130703 100644 --- a/level_3/byte_dump/c/main/byte_dump.c +++ b/level_3/byte_dump/c/main/byte_dump.c @@ -7,19 +7,7 @@ extern "C" { #ifndef _di_byte_dump_main_ void byte_dump_main(byte_dump_main_t * const main) { - if (!main) return; - - if (F_status_is_error(main->setting.state.status)) { - if ((main->setting.flag & byte_dump_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 & byte_dump_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); - } + if (!main || F_status_is_error(main->setting.state.status)) return; main->setting.state.status = F_okay; @@ -34,10 +22,6 @@ extern "C" { fll_program_print_copyright(&main->program.message, fll_program_copyright_year_author_s); } - if ((main->setting.flag & byte_dump_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; } @@ -97,10 +81,6 @@ extern "C" { byte_dump_print_error_file_none(&main->program.error); } - - if ((main->setting.flag & byte_dump_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_byte_dump_main_ diff --git a/level_3/byte_dump/c/main/common.c b/level_3/byte_dump/c/main/common.c index d31c6d0..211b8c4 100644 --- a/level_3/byte_dump/c/main/common.c +++ b/level_3/byte_dump/c/main/common.c @@ -15,25 +15,7 @@ extern "C" { main->setting.state.step_small = byte_dump_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 &= ~byte_dump_main_flag_print_first_e; - } - else { - main->setting.flag |= byte_dump_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 &= ~byte_dump_main_flag_print_last_e; - } - else { - main->setting.flag |= byte_dump_main_flag_print_last_e; - } - if (F_status_is_error(main->setting.state.status)) { - if ((main->setting.flag & byte_dump_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); - } - byte_dump_print_error(&main->program.error, macro_byte_dump_f(f_console_parameter_process)); return; @@ -42,10 +24,6 @@ extern "C" { 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 & byte_dump_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); - } - byte_dump_print_error(&main->program.error, macro_byte_dump_f(fll_program_parameter_process_context_standard)); return; @@ -54,10 +32,6 @@ extern "C" { 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 & byte_dump_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); - } - byte_dump_print_error(&main->program.error, macro_byte_dump_f(fll_program_parameter_process_verbosity_standard)); return; @@ -77,10 +51,6 @@ extern "C" { main->setting.state.status = f_console_parameter_prioritize_right(main->program.parameters, choices, &choice); if (F_status_is_error(main->setting.state.status)) { - if ((main->setting.flag & byte_dump_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); - } - byte_dump_print_error(&main->program.error, macro_byte_dump_f(f_console_parameter_prioritize_right)); return; @@ -113,10 +83,6 @@ extern "C" { main->setting.state.status = f_console_parameter_prioritize_right(main->program.parameters, choices, &choice); if (F_status_is_error(main->setting.state.status)) { - if ((main->setting.flag & byte_dump_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); - } - byte_dump_print_error(&main->program.error, macro_byte_dump_f(f_console_parameter_prioritize_right)); return; @@ -143,10 +109,6 @@ extern "C" { main->setting.state.status = f_console_parameter_prioritize_right(main->program.parameters, choices, &choice); if (F_status_is_error(main->setting.state.status)) { - if ((main->setting.flag & byte_dump_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); - } - byte_dump_print_error(&main->program.error, macro_byte_dump_f(f_console_parameter_prioritize_right)); return; @@ -200,10 +162,6 @@ extern "C" { } if (F_status_is_error(main->setting.state.status) || number < 0x1 || number >= 0xfb) { - if ((main->setting.flag & byte_dump_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); - } - byte_dump_print_error_parameter_range_out(&main->program.error, byte_dump_long_width_s, 1, 250, main->program.parameters.arguments.array[index]); return; @@ -214,10 +172,6 @@ extern "C" { else if (main->program.parameters.array[byte_dump_parameter_width_e].result & f_console_result_found_e) { main->setting.state.status = F_status_set_error(F_parameter); - if ((main->setting.flag & byte_dump_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); - } - fll_program_print_error_parameter_missing_value(&main->program.error, f_console_symbol_long_normal_s, byte_dump_long_width_s); return; @@ -257,10 +211,6 @@ extern "C" { } if (F_status_is_error(main->setting.state.status)) { - if ((main->setting.flag & byte_dump_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); - } - byte_dump_print_error_parameter_range_out(&main->program.error, names[i], 0, F_number_t_size_unsigned_d, main->program.parameters.arguments.array[index]); return; @@ -272,10 +222,6 @@ extern "C" { else if (main->program.parameters.array[indexs[i]].result & f_console_result_found_e) { main->setting.state.status = F_status_set_error(F_parameter); - if ((main->setting.flag & byte_dump_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); - } - fll_program_print_error_parameter_missing_value(&main->program.error, f_console_symbol_long_normal_s, names[i]); return; @@ -289,10 +235,6 @@ extern "C" { if (main->setting.first > main->setting.last) { main->setting.state.status = F_status_set_error(F_parameter); - if ((main->setting.flag & byte_dump_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); - } - fll_program_print_error_parameter_first_greater_than_last(&main->program.error); return; @@ -335,10 +277,6 @@ extern "C" { main->setting.state.status = f_memory_array_increase_by(main->program.parameters.remaining.used, sizeof(f_string_dynamic_t), (void **) &main->setting.files.array, &main->setting.files.used, &main->setting.files.size); if (F_status_is_error(main->setting.state.status)) { - if ((main->setting.flag & byte_dump_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); - } - byte_dump_print_error(&main->program.error, macro_byte_dump_f(f_memory_array_increase_by)); return; @@ -367,10 +305,6 @@ extern "C" { if (F_status_is_error(main->setting.state.status)) { if (status_files == F_okay) { - if ((main->setting.flag & byte_dump_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); - } - status_files = main->setting.state.status; } diff --git a/level_3/byte_dump/c/main/common/enumeration.h b/level_3/byte_dump/c/main/common/enumeration.h index 87c33af..fc34ee7 100644 --- a/level_3/byte_dump/c/main/common/enumeration.h +++ b/level_3/byte_dump/c/main/common/enumeration.h @@ -68,8 +68,6 @@ extern "C" { * - last: The last position is specified. * - placeholder: Placeholder is specified. * - 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. * - text: Text is specified. * - unicode: Unicode is specified. * - version: Print version. @@ -86,13 +84,11 @@ extern "C" { byte_dump_main_flag_last_e = 0x10, byte_dump_main_flag_pipe_e = 0x20, byte_dump_main_flag_placeholder_e = 0x40, - byte_dump_main_flag_print_first_e = 0x80, - byte_dump_main_flag_print_last_e = 0x100, - byte_dump_main_flag_text_e = 0x200, - byte_dump_main_flag_unicode_e = 0x400, - byte_dump_main_flag_version_e = 0x800, - byte_dump_main_flag_version_copyright_help_e = 0x80a, - byte_dump_main_flag_wide_e = 0x1000, + byte_dump_main_flag_text_e = 0x80, + byte_dump_main_flag_unicode_e = 0x100, + byte_dump_main_flag_version_e = 0x200, + byte_dump_main_flag_version_copyright_help_e = 0x20a, + byte_dump_main_flag_wide_e = 0x400, }; // enum #endif // _di_byte_dump_main_flag_e_ diff --git a/level_3/controller/c/common.c b/level_3/controller/c/common.c index 12f9219..36a35b0 100644 --- a/level_3/controller/c/common.c +++ b/level_3/controller/c/common.c @@ -609,20 +609,6 @@ extern "C" { main->setting.state.step_small = controller_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 &= ~controller_main_flag_print_first_e; - } - else { - main->setting.flag |= controller_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 &= ~controller_main_flag_print_last_e; - } - else { - main->setting.flag |= controller_main_flag_print_last_e; - } - if (F_status_is_error(main->setting.state.status)) { fll_error_print(&main->program.error, F_status_set_fine(main->setting.state.status), "f_console_parameter_process", fll_error_file_flag_fallback_e); diff --git a/level_3/controller/c/common.h b/level_3/controller/c/common.h index 429380f..258c3d1 100644 --- a/level_3/controller/c/common.h +++ b/level_3/controller/c/common.h @@ -355,8 +355,6 @@ extern "C" { * - header: Enable printing of headers. * - help: Print help. * - init: Operate as an "init" program. - * - 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. * - separate: Enable printing of separators. * - strip_invalid: Using strip invalid character mode. * - verify: Using verify mode. @@ -372,13 +370,11 @@ extern "C" { controller_main_flag_header_e = 0x8, controller_main_flag_help_e = 0x10, controller_main_flag_init_e = 0x20, - controller_main_flag_print_first_e = 0x40, - controller_main_flag_print_last_e = 0x80, - controller_main_flag_separate_e = 0x100, - controller_main_flag_strip_invalid_e = 0x200, - controller_main_flag_verify_e = 0x400, - controller_main_flag_version_e = 0x800, - controller_main_flag_version_copyright_help_e = 0x811, + controller_main_flag_separate_e = 0x40, + controller_main_flag_strip_invalid_e = 0x80, + controller_main_flag_verify_e = 0x100, + controller_main_flag_version_e = 0x200, + controller_main_flag_version_copyright_help_e = 0x211, }; // enum #endif // _di_controller_main_flag_e_ diff --git a/level_3/controller/c/controller.c b/level_3/controller/c/controller.c index d5b7abe..1785bac 100644 --- a/level_3/controller/c/controller.c +++ b/level_3/controller/c/controller.c @@ -17,10 +17,6 @@ extern "C" { if (F_status_is_error(main->setting.state.status)) return; - if ((main->setting.flag & controller_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 & controller_main_flag_version_copyright_help_e) { @@ -34,10 +30,6 @@ extern "C" { fll_program_print_copyright(&main->program.message, fll_program_copyright_year_author_s); } - if ((main->setting.flag & controller_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; } diff --git a/level_3/example/c/main/common.c b/level_3/example/c/main/common.c index a200d39..5855876 100644 --- a/level_3/example/c/main/common.c +++ b/level_3/example/c/main/common.c @@ -15,25 +15,7 @@ extern "C" { 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; @@ -42,10 +24,6 @@ extern "C" { 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; @@ -54,10 +32,6 @@ extern "C" { 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; diff --git a/level_3/example/c/main/common/enumeration.h b/level_3/example/c/main/common/enumeration.h index 6830767..b081409 100644 --- a/level_3/example/c/main/common/enumeration.h +++ b/level_3/example/c/main/common/enumeration.h @@ -28,8 +28,6 @@ extern "C" { * - 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". @@ -42,11 +40,9 @@ extern "C" { 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, + example_main_flag_version_e = 0x20, + example_main_flag_version_copyright_help_e = 0x29, + example_main_flag_warning_e = 0x40, }; // enum #endif // _di_example_main_flag_e_ diff --git a/level_3/example/c/main/example.c b/level_3/example/c/main/example.c index 9f006ce..d5e0afb 100644 --- a/level_3/example/c/main/example.c +++ b/level_3/example/c/main/example.c @@ -7,19 +7,7 @@ extern "C" { #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); - } + if (!main || F_status_is_error(main->setting.state.status)) return; main->setting.state.status = F_okay; @@ -34,20 +22,12 @@ extern "C" { fll_program_print_copyright(&main->program.message, fll_program_copyright_year_author_s); } - 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_ diff --git a/level_3/fake/c/main/common.c b/level_3/fake/c/main/common.c index 4473501..107ba3a 100644 --- a/level_3/fake/c/main/common.c +++ b/level_3/fake/c/main/common.c @@ -25,25 +25,7 @@ extern "C" { main->setting.state.step_small = step_original; } - if (main->program.parameters.array[f_console_standard_parameter_line_first_no_e].result & f_console_result_found_e) { - main->setting.flag &= ~fake_main_flag_print_first_e; - } - else { - main->setting.flag |= fake_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 &= ~fake_main_flag_print_last_e; - } - else { - main->setting.flag |= fake_main_flag_print_last_e; - } - if (F_status_is_error(main->setting.state.status)) { - if ((main->setting.flag & fake_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); - } - fake_print_error(&main->program.error, macro_fake_f(f_console_parameter_process)); return; @@ -52,10 +34,6 @@ extern "C" { 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 & fake_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); - } - fake_print_error(&main->program.error, macro_fake_f(fll_program_parameter_process_context_standard)); return; @@ -64,10 +42,6 @@ extern "C" { 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 & fake_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); - } - fake_print_error(&main->program.error, macro_fake_f(fll_program_parameter_process_verbosity_standard)); return; @@ -226,10 +200,6 @@ extern "C" { if ((main->program.parameters.array[parameters[i]].result & f_console_result_found_e) && !(main->program.parameters.array[parameters[i]].result & f_console_result_value_e)) { main->setting.state.status = F_status_set_error(F_parameter); - if ((main->setting.flag & fake_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); - } - if (main->program.error.verbosity > f_console_verbosity_quiet_e) { fll_program_print_error_parameter_missing_value(&main->program.error, f_console_symbol_long_normal_s, names[i]); } @@ -249,10 +219,6 @@ extern "C" { // @todo fix this to print an error about the actual invalid character so that it can be investigated. if (F_status_is_error(main->setting.state.status)) { - if ((main->setting.flag & fake_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); - } - if (fake_print_error_fallback(&main->program.error, macro_fake_f(f_utf_is_word_dash_plus)) == F_false) { fll_program_print_error_parameter_process(&main->program.error, f_console_symbol_long_normal_s, names[i]); } @@ -263,10 +229,6 @@ extern "C" { if (main->setting.state.status == F_false) { main->setting.state.status = F_status_set_error(F_parameter); - if ((main->setting.flag & fake_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); - } - fake_print_error_parameter_not_word(&main->program.error, f_console_symbol_long_normal_s, names[i], main->program.parameters.arguments.array[index]); return; @@ -278,10 +240,6 @@ extern "C" { main->setting.state.status = f_path_directory_cleanup(main->program.parameters.arguments.array[index], variable[i]); if (F_status_is_error(main->setting.state.status)) { - if ((main->setting.flag & fake_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); - } - if (main->program.error.verbosity > f_console_verbosity_quiet_e) { if (fake_print_error_fallback(&main->program.error, macro_fake_f(f_path_directory_cleanup)) == F_false) { fll_program_print_error_parameter_process(&main->program.error, f_console_symbol_long_normal_s, names[i]); @@ -298,10 +256,6 @@ extern "C" { main->setting.state.status = f_memory_array_resize(0, sizeof(f_char_t), (void **) &variable[i]->string, &variable[i]->used, &variable[i]->size); if (F_status_is_error(main->setting.state.status)) { - if ((main->setting.flag & fake_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); - } - fake_print_error(&main->program.error, macro_fake_f(f_memory_array_resize)); return; @@ -316,10 +270,6 @@ extern "C" { if (!variable[i]->used) { main->setting.state.status = F_status_set_error(F_parameter); - if ((main->setting.flag & fake_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); - } - fake_print_error_parameter_not_empty(&main->program.error, f_console_symbol_long_normal_s, names[i], main->program.parameters.arguments.array[index]); return; @@ -335,10 +285,6 @@ extern "C" { main->setting.state.status = f_memory_array_resize(0, sizeof(f_char_t), (void **) &variable[i]->string, &variable[i]->used, &variable[i]->size); if (F_status_is_error(main->setting.state.status)) { - if ((main->setting.flag & fake_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); - } - fake_print_error(&main->program.error, macro_fake_f(f_memory_array_resize)); return; @@ -376,10 +322,6 @@ extern "C" { main->setting.state.status = F_status_set_error(F_parameter); if (main->program.error.verbosity > f_console_verbosity_quiet_e) { - if ((main->setting.flag & fake_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); - } - fll_program_print_error_parameter_missing_value(&main->program.error, f_console_symbol_long_normal_s, names[i]); } @@ -390,10 +332,6 @@ extern "C" { main->setting.state.status = fll_program_parameter_additional_rip(main->program.parameters.arguments.array, main->program.parameters.array[parameters[i]].values, variable[i]); if (F_status_is_error(main->setting.state.status)) { - if ((main->setting.flag & fake_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); - } - if (main->program.error.verbosity > f_console_verbosity_quiet_e) { if (fake_print_error_fallback(&main->program.error, macro_fake_f(fll_program_parameter_additional_rip)) == F_false) { fll_program_print_error_parameter_process(&main->program.error, f_console_symbol_long_normal_s, names[i]); @@ -411,9 +349,6 @@ extern "C" { main->setting.state.status = f_utf_is_word_dash_plus(main->program.parameters.arguments.array[i].string + j, width_max, F_false); if (F_status_is_error(main->setting.state.status)) { - if ((main->setting.flag & fake_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); - } // @todo fix this to print an error about the actual invalid character so that it can be investigated. if (fake_print_error_fallback(&main->program.error, macro_fake_f(f_utf_is_word_dash_plus)) == F_false) { @@ -426,10 +361,6 @@ extern "C" { if (main->setting.state.status == F_false) { main->setting.state.status = F_status_set_error(F_parameter); - if ((main->setting.flag & fake_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); - } - fake_print_error_parameter_not_word(&main->program.error, f_console_symbol_long_normal_s, names[i], main->program.parameters.arguments.array[i]); return; @@ -451,10 +382,6 @@ extern "C" { main->setting.state.status = f_memory_array_increase_by(1, sizeof(uint8_t), (void **) &main->setting.operations.array, &main->setting.operations.used, &main->setting.operations.size); if (F_status_is_error(main->setting.state.status)) { - if ((main->setting.flag & fake_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); - } - fake_print_error(&main->program.error, macro_fake_f(f_memory_array_increase_by)); return; diff --git a/level_3/fake/c/main/common/enumeration.h b/level_3/fake/c/main/common/enumeration.h index dc4869b..b9029a9 100644 --- a/level_3/fake/c/main/common/enumeration.h +++ b/level_3/fake/c/main/common/enumeration.h @@ -97,8 +97,6 @@ extern "C" { * - operation_make: The make operation is designated (or enabled as default). * - operation_skeleton: The skeleton operation is designated. * - 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. * - separate: Enable printing of separators. * - strip_invalid: Using strip invalid character mode. * - verify: Using verify mode. @@ -120,13 +118,11 @@ extern "C" { fake_main_flag_operation_make_e = 0x200, fake_main_flag_operation_skeleton_e = 0x400, fake_main_flag_pipe_e = 0x800, - fake_main_flag_print_first_e = 0x1000, - fake_main_flag_print_last_e = 0x2000, - fake_main_flag_separate_e = 0x4000, - fake_main_flag_strip_invalid_e = 0x8000, - fake_main_flag_verify_e = 0x10000, - fake_main_flag_version_e = 0x20000, - fake_main_flag_version_copyright_help_e = 0x20021, + fake_main_flag_separate_e = 0x1000, + fake_main_flag_strip_invalid_e = 0x2000, + fake_main_flag_verify_e = 0x4000, + fake_main_flag_version_e = 0x8000, + fake_main_flag_version_copyright_help_e = 0x8021, }; // enum #endif // _di_fake_main_flag_e_ diff --git a/level_3/fake/c/main/fake.c b/level_3/fake/c/main/fake.c index 4606f73..fb848b9 100644 --- a/level_3/fake/c/main/fake.c +++ b/level_3/fake/c/main/fake.c @@ -7,19 +7,7 @@ extern "C" { #ifndef _di_fake_main_ void fake_main(fake_main_t * const main) { - if (!main) return; - - if (F_status_is_error(main->setting.state.status)) { - if ((main->setting.flag & fake_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 & fake_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); - } + if (!main || F_status_is_error(main->setting.state.status)) return; main->setting.state.status = F_okay; @@ -34,10 +22,6 @@ extern "C" { fll_program_print_copyright(&main->program.message, fll_program_copyright_year_author_s); } - if ((main->setting.flag & fake_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; } @@ -46,10 +30,6 @@ extern "C" { fake_print_error_parameter_operation_not_with(&main->program.error, fake_other_operation_build_s, fake_other_operation_make_s); - if ((main->setting.flag & fake_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; } @@ -61,10 +41,6 @@ extern "C" { if (F_status_is_error(main->setting.state.status)) { fake_data_delete(&data); - if ((main->setting.flag & fake_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; } @@ -206,10 +182,6 @@ extern "C" { } } - if ((main->setting.flag & fake_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); - } - fake_data_delete(&data); } #endif // _di_fake_main_ diff --git a/level_3/firewall/c/main/common.c b/level_3/firewall/c/main/common.c index 1d6cc3f..787dfc6 100644 --- a/level_3/firewall/c/main/common.c +++ b/level_3/firewall/c/main/common.c @@ -15,25 +15,7 @@ extern "C" { main->setting.state.step_small = firewall_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 &= ~firewall_main_flag_print_first_e; - } - else { - main->setting.flag |= firewall_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 &= ~firewall_main_flag_print_last_e; - } - else { - main->setting.flag |= firewall_main_flag_print_last_e; - } - if (F_status_is_error(main->setting.state.status)) { - if ((main->setting.flag & firewall_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); - } - firewall_print_error(&main->program.error, macro_firewall_f(f_console_parameter_process)); return; @@ -42,10 +24,6 @@ extern "C" { 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 & firewall_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); - } - firewall_print_error(&main->program.error, macro_firewall_f(fll_program_parameter_process_context_standard)); return; @@ -54,10 +32,6 @@ extern "C" { 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 & firewall_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); - } - firewall_print_error(&main->program.error, macro_firewall_f(fll_program_parameter_process_verbosity_standard)); return; diff --git a/level_3/firewall/c/main/common/enumeration.h b/level_3/firewall/c/main/common/enumeration.h index d13cd6b..1303a87 100644 --- a/level_3/firewall/c/main/common/enumeration.h +++ b/level_3/firewall/c/main/common/enumeration.h @@ -37,8 +37,6 @@ extern "C" { * - operation_stop_restart: A helper flag representing both the stop and restart operation flag set. * - operation_stop_restart_lock: A helper flag representing both the stop, restart, and lock operation flag set. * - pipe: Use the input pipe. - * - 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. */ @@ -61,10 +59,8 @@ extern "C" { firewall_main_flag_operation_stop_restart_e = 0x208, firewall_main_flag_operation_stop_restart_lock_e = 0x20c, firewall_main_flag_pipe_e = 0x400, - firewall_main_flag_print_first_e = 0x800, - firewall_main_flag_print_last_e = 0x1000, - firewall_main_flag_version_e = 0x2000, - firewall_main_flag_version_copyright_help_e = 0x2003, + firewall_main_flag_version_e = 0x800, + firewall_main_flag_version_copyright_help_e = 0x803, }; // enum #endif // _di_firewall_main_flag_e_ diff --git a/level_3/firewall/c/main/firewall.c b/level_3/firewall/c/main/firewall.c index 9dd4bc3..7237dde 100644 --- a/level_3/firewall/c/main/firewall.c +++ b/level_3/firewall/c/main/firewall.c @@ -7,19 +7,7 @@ extern "C" { #ifndef _di_firewall_main_ void firewall_main(firewall_main_t * const main) { - if (!main) return; - - if (F_status_is_error(main->setting.state.status)) { - if ((main->setting.flag & firewall_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 & firewall_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); - } + if (!main || F_status_is_error(main->setting.state.status)) return; main->setting.state.status = F_okay; @@ -34,10 +22,6 @@ extern "C" { fll_program_print_copyright(&main->program.message, fll_program_copyright_year_author_s); } - if ((main->setting.flag & firewall_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; } @@ -50,10 +34,6 @@ extern "C" { firewall_print_error_operation_specified_not(&main->program.error); } - if ((main->setting.flag & firewall_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); - } - if (F_status_is_error(main->setting.state.status) || main->setting.state.status == F_interrupt) return; main->setting.state.status = F_okay; diff --git a/level_3/fss_identify/c/main/common.c b/level_3/fss_identify/c/main/common.c index f7da7af..7885ef3 100644 --- a/level_3/fss_identify/c/main/common.c +++ b/level_3/fss_identify/c/main/common.c @@ -15,25 +15,7 @@ extern "C" { main->setting.state.step_small = fss_identify_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 &= ~fss_identify_main_flag_print_first_e; - } - else { - main->setting.flag |= fss_identify_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 &= ~fss_identify_main_flag_print_last_e; - } - else { - main->setting.flag |= fss_identify_main_flag_print_last_e; - } - if (F_status_is_error(main->setting.state.status)) { - if ((main->setting.flag & fss_identify_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); - } - fss_identify_print_error(&main->program.error, macro_fss_identify_f(f_console_parameter_process)); return; @@ -42,10 +24,6 @@ extern "C" { 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 & fss_identify_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); - } - fss_identify_print_error(&main->program.error, macro_fss_identify_f(fll_program_parameter_process_context_standard)); return; @@ -54,10 +32,6 @@ extern "C" { 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 & fss_identify_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); - } - fss_identify_print_error(&main->program.error, macro_fss_identify_f(fll_program_parameter_process_verbosity_standard)); return; @@ -115,10 +89,6 @@ extern "C" { } if (F_status_is_error(main->setting.state.status)) { - if ((main->setting.flag & fss_identify_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); - } - fll_program_print_error_parameter_integer_not(&main->program.error, f_console_symbol_long_normal_s, fss_identify_long_line_s, main->program.parameters.arguments.array[index]); return; @@ -129,10 +99,6 @@ extern "C" { else if (main->program.parameters.array[fss_identify_parameter_line_e].result & f_console_result_found_e) { main->setting.state.status = F_status_set_error(F_parameter); - if ((main->setting.flag & fss_identify_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); - } - fll_program_print_error_parameter_missing_value(&main->program.error, f_console_symbol_long_normal_s, fss_identify_long_line_s); return; @@ -147,10 +113,6 @@ extern "C" { main->setting.state.status = f_memory_array_increase_by(main->program.parameters.array[fss_identify_parameter_name_e].values.used, sizeof(f_string_dynamic_t), (void **) &main->setting.names.array, &main->setting.names.used, &main->setting.names.size); if (F_status_is_error(main->setting.state.status)) { - if ((main->setting.flag & fss_identify_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); - } - fss_identify_print_error(&main->program.error, macro_fss_identify_f(f_memory_array_increase_by)); return; @@ -172,10 +134,6 @@ extern "C" { main->setting.state.status = f_string_dynamic_append_nulless(main->program.parameters.arguments.array[index], &main->setting.names.array[i]); if (F_status_is_error(main->setting.state.status)) { - if ((main->setting.flag & fss_identify_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); - } - fss_identify_print_error(&main->program.error, macro_fss_identify_f(f_string_dynamic_append_nulless)); break; @@ -189,12 +147,6 @@ extern "C" { main->setting.state.status = f_utf_is_word_dash(main->setting.names.array[i].string + j, main->setting.names.array[i].used, F_true); if (F_status_is_error(main->setting.state.status)) { - if (F_status_is_error_not(main->setting.state.status)) { - if ((main->setting.flag & fss_identify_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); - } - } - fss_identify_print_error(&main->program.error, macro_fss_identify_f(f_utf_is_word_dash)); return; @@ -205,10 +157,6 @@ extern "C" { if (F_status_is_error_not(main->setting.state.status)) { status = F_status_set_error(F_parameter); - - if ((main->setting.flag & fss_identify_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); - } } fss_identify_print_error_parameter_file_name_invalid(&main->program.error, index, main->setting.names.array[i]); @@ -220,10 +168,6 @@ extern "C" { else { if (F_status_is_error_not(main->setting.state.status)) { status = F_status_set_error(F_parameter); - - if ((main->setting.flag & fss_identify_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); - } } fss_identify_print_error_parameter_file_name_empty(&main->program.error, index); @@ -243,10 +187,6 @@ extern "C" { else if (main->program.parameters.array[fss_identify_parameter_name_e].result & f_console_result_found_e) { main->setting.state.status = F_status_set_error(F_parameter); - if ((main->setting.flag & fss_identify_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); - } - fll_program_print_error_parameter_missing_value(&main->program.error, f_console_symbol_long_normal_s, fss_identify_long_name_s); return; @@ -261,10 +201,6 @@ extern "C" { main->setting.state.status = f_memory_array_increase_by(main->program.parameters.remaining.used, sizeof(f_string_dynamic_t), (void **) &main->setting.files.array, &main->setting.files.used, &main->setting.files.size); if (F_status_is_error(main->setting.state.status)) { - if ((main->setting.flag & fss_identify_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); - } - fss_identify_print_error(&main->program.error, macro_fss_identify_f(f_memory_array_increase_by)); return; @@ -298,10 +234,6 @@ extern "C" { if (!(main->setting.flag & fss_identify_main_flag_pipe_e | fss_identify_main_flag_file_from_e)) { main->setting.state.status = F_status_set_error(F_parameter); - if ((main->setting.flag & fss_identify_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); - } - fss_identify_print_error_no_from(&main->program.error); return; @@ -317,10 +249,6 @@ extern "C" { if (main->setting.flag & (fss_identify_main_flag_content_e | fss_identify_main_flag_object_e)) { main->setting.state.status = F_status_set_error(F_parameter); - if ((main->setting.flag & fss_identify_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); - } - if (main->program.error.verbosity > f_console_verbosity_quiet_e) { fll_program_print_error_parameter_cannot_use_with(&main->program.error, f_console_symbol_long_normal_s, f_console_symbol_long_normal_s, main->setting.flag & fss_identify_main_flag_content_e ? fss_identify_long_content_s : fss_identify_long_object_s, fss_identify_long_total_s); } diff --git a/level_3/fss_identify/c/main/common/enumeration.h b/level_3/fss_identify/c/main/common/enumeration.h index 9721206..8cf2a86 100644 --- a/level_3/fss_identify/c/main/common/enumeration.h +++ b/level_3/fss_identify/c/main/common/enumeration.h @@ -31,8 +31,6 @@ extern "C" { * - name: Select using this full or partial type name or code. * - object: Use the object (The "FSS" part of "FSS-0000"). * - pipe: Use the input pipe. - * - 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. * - total: Print the total Identifiers found. * - version: Print version. * - version_copyright_help: A helper flag representing version, copyright, and help flag bits being set. @@ -50,11 +48,9 @@ extern "C" { fss_identify_main_flag_name_e = 0x80, fss_identify_main_flag_object_e = 0x100, fss_identify_main_flag_pipe_e = 0x200, - fss_identify_main_flag_print_first_e = 0x400, - fss_identify_main_flag_print_last_e = 0x800, - fss_identify_main_flag_total_e = 0x1000, - fss_identify_main_flag_version_e = 0x2000, - fss_identify_main_flag_version_copyright_help_e = 0x2022, + fss_identify_main_flag_total_e = 0x400, + fss_identify_main_flag_version_e = 0x800, + fss_identify_main_flag_version_copyright_help_e = 0x822, }; // enum #endif // _di_fss_identify_main_flag_e_ diff --git a/level_3/fss_identify/c/main/fss_identify.c b/level_3/fss_identify/c/main/fss_identify.c index 3a86aa8..59965c8 100644 --- a/level_3/fss_identify/c/main/fss_identify.c +++ b/level_3/fss_identify/c/main/fss_identify.c @@ -7,19 +7,7 @@ extern "C" { #ifndef _di_fss_identify_main_ void fss_identify_main(fss_identify_main_t * const main) { - if (!main) return; - - if (F_status_is_error(main->setting.state.status)) { - if ((main->setting.flag & fss_identify_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 & fss_identify_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); - } + if (!main || F_status_is_error(main->setting.state.status)) return; main->setting.state.status = F_okay; @@ -34,10 +22,6 @@ extern "C" { fll_program_print_copyright(&main->program.message, fll_program_copyright_year_author_s); } - if ((main->setting.flag & fss_identify_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; } @@ -85,10 +69,6 @@ extern "C" { } } - if ((main->setting.flag & fss_identify_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); - } - if (F_status_is_error(main->setting.state.status) || main->setting.state.status == F_interrupt) return; main->setting.state.status = F_okay; diff --git a/level_3/fss_read/c/main/common.c b/level_3/fss_read/c/main/common.c index b4bfa65..f89d3c3 100644 --- a/level_3/fss_read/c/main/common.c +++ b/level_3/fss_read/c/main/common.c @@ -53,25 +53,7 @@ extern "C" { main->setting.state.step_small = fss_read_allocation_small_d; - if (parameters->array[f_console_standard_parameter_line_first_no_e].result & f_console_result_found_e) { - main->setting.flag &= ~fss_read_main_flag_print_first_e; - } - else { - main->setting.flag |= fss_read_main_flag_print_first_e; - } - - if (parameters->array[f_console_standard_parameter_line_last_no_e].result & f_console_result_found_e) { - main->setting.flag &= ~fss_read_main_flag_print_last_e; - } - else { - main->setting.flag |= fss_read_main_flag_print_last_e; - } - if (F_status_is_error(main->setting.state.status)) { - if ((main->setting.flag & fss_read_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); - } - fss_read_print_error(&main->program.error, macro_fss_read_f(f_console_parameter_process)); return; @@ -80,10 +62,6 @@ extern "C" { 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 & fss_read_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); - } - fss_read_print_error(&main->program.error, macro_fss_read_f(fll_program_parameter_process_context_standard)); return; @@ -92,10 +70,6 @@ extern "C" { 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 & fss_read_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); - } - fss_read_print_error(&main->program.error, macro_fss_read_f(fll_program_parameter_process_verbosity_standard)); return; @@ -211,10 +185,6 @@ extern "C" { else if (parameters->array[parameter_code[i]].result & f_console_result_found_e) { main->setting.state.status = F_status_set_error(F_parameter); - if ((main->setting.flag & fss_read_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); - } - fss_read_print_error_parameter_requires_message(&main->program.error, f_console_symbol_long_normal_s, parameter_name[i], parameter_message[i]); return; @@ -253,10 +223,6 @@ extern "C" { main->setting.state.status = F_status_set_error(F_parameter); if (main->program.error.verbosity > f_console_verbosity_quiet_e) { - if ((main->setting.flag & fss_read_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); - } - fll_program_print_error_parameter_cannot_use_with(&main->program.error, f_console_symbol_long_normal_s, f_console_symbol_long_normal_s, fss_read_long_columns_s, parameter_name[i]); } @@ -272,10 +238,6 @@ extern "C" { main->setting.state.status = F_status_set_error(F_parameter); if (main->program.error.verbosity > f_console_verbosity_quiet_e) { - if ((main->setting.flag & fss_read_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); - } - fll_program_print_error_parameter_cannot_use_with( &main->program.error, f_console_symbol_long_normal_s, f_console_symbol_long_normal_s, @@ -306,10 +268,6 @@ extern "C" { if (!length) { main->setting.state.status = F_status_set_error(F_parameter); - if ((main->setting.flag & fss_read_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); - } - fll_program_print_error_parameter_empty_value(&main->program.error, f_console_symbol_long_normal_s, fss_read_long_delimit_s); return; @@ -406,10 +364,6 @@ extern "C" { main->setting.state.status = fl_conversion_dynamic_partial_to_unsigned_detect(fl_conversion_data_base_10_c, parameters->arguments.array[index], main->setting.range, &main->setting.delimit_depth); if (F_status_is_error(main->setting.state.status)) { - if ((main->setting.flag & fss_read_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); - } - fll_error_parameter_integer_print(&main->program.error, F_status_set_fine(main->setting.state.status), macro_fss_read_f(fl_conversion_dynamic_partial_to_unsigned_detect), F_true, fss_read_long_delimit_s, parameters->arguments.array[index]); return; @@ -503,10 +457,6 @@ extern "C" { } // while if (F_status_is_error(main->setting.state.status)) { - if ((main->setting.flag & fss_read_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); - } - fll_error_file_print(&main->program.error, F_status_set_fine(main->setting.state.status), macro_fss_read_f(f_file_stream_read_block), fll_error_file_flag_fallback_e, f_string_ascii_minus_s, f_file_operation_read_s, fll_error_file_type_pipe_e); return; @@ -549,10 +499,6 @@ extern "C" { main->setting.state.status = f_file_stream_open(file_data->name, f_string_empty_s, &file); if (F_status_is_error(main->setting.state.status)) { - if ((main->setting.flag & fss_read_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); - } - fll_error_file_print(&main->program.error, F_status_set_fine(main->setting.state.status), macro_fss_read_f(f_file_stream_open), fll_error_file_flag_fallback_e, parameters->arguments.array[index], f_file_operation_open_s, fll_error_file_type_file_e); break; @@ -563,10 +509,6 @@ extern "C" { main->setting.state.status = f_file_size(file_data->name, F_true, &size_file); if (F_status_is_error(main->setting.state.status)) { - if ((main->setting.flag & fss_read_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); - } - fll_error_file_print(&main->program.error, F_status_set_fine(main->setting.state.status), macro_fss_read_f(f_file_size), fll_error_file_flag_fallback_e, parameters->arguments.array[index], f_file_operation_read_s, fll_error_file_type_file_e); break; @@ -588,10 +530,6 @@ extern "C" { main->setting.state.status = f_memory_array_increase_by(size_file + 1, sizeof(f_char_t), (void **) &main->setting.buffer.string, &main->setting.buffer.used, &main->setting.buffer.size); if (F_status_is_error(main->setting.state.status)) { - if ((main->setting.flag & fss_read_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); - } - fll_error_file_print(&main->program.error, F_status_set_fine(main->setting.state.status), macro_fss_read_f(f_memory_array_increase_by), fll_error_file_flag_fallback_e, parameters->arguments.array[index], f_file_operation_process_s, fll_error_file_type_file_e); break; @@ -607,10 +545,6 @@ extern "C" { if (F_status_is_error(main->setting.state.status)) { if (F_status_set_fine(main->setting.state.status) != F_interrupt) { - if ((main->setting.flag & fss_read_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); - } - fll_error_file_print(&main->program.error, F_status_set_fine(main->setting.state.status), macro_fss_read_f(f_file_stream_read_until), fll_error_file_flag_fallback_e, parameters->arguments.array[index], f_file_operation_read_s, fll_error_file_type_file_e); } @@ -658,10 +592,6 @@ extern "C" { main->setting.state.status = fss_read_depths_resize(i, &main->setting.depths); if (F_status_is_error(main->setting.state.status)) { - if ((main->setting.flag & fss_read_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); - } - fss_read_print_error(&main->program.error, macro_fss_read_f(fss_read_depths_resize)); return; @@ -692,10 +622,6 @@ extern "C" { main->setting.state.status = fl_conversion_dynamic_to_unsigned_detect(fl_conversion_data_base_10_c, parameters->arguments.array[position_depth], ¤t->depth); if (F_status_is_error(main->setting.state.status)) { - if ((main->setting.flag & fss_read_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); - } - fll_error_parameter_integer_print(&main->program.error, F_status_set_fine(main->setting.state.status), macro_fss_read_f(fl_conversion_dynamic_to_unsigned_detect), F_true, fss_read_long_depth_s, parameters->arguments.array[position_depth]); return; @@ -721,10 +647,6 @@ extern "C" { main->setting.state.status = fl_conversion_dynamic_to_unsigned_detect(fl_conversion_data_base_10_c, parameters->arguments.array[current->index_at], ¤t->value_at); if (F_status_is_error(main->setting.state.status)) { - if ((main->setting.flag & fss_read_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); - } - fll_error_parameter_integer_print(&main->program.error, F_status_set_fine(main->setting.state.status), macro_fss_read_f(fl_conversion_dynamic_to_unsigned_detect), F_true, fss_read_long_at_s, parameters->arguments.array[current->index_at]); return; @@ -753,10 +675,6 @@ extern "C" { } if (F_status_is_error(main->setting.state.status)) { - if ((main->setting.flag & fss_read_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); - } - fss_read_print_error(&main->program.error, (parameters->array[fss_read_parameter_trim_e].result & f_console_result_found_e) ? macro_fss_read_f(f_rip_dynamic) : macro_fss_read_f(f_string_dynamic_append)); return; @@ -778,10 +696,6 @@ extern "C" { if (current->depth == main->setting.depths.array[j].depth) { main->setting.state.status = F_status_set_error(F_parameter); - if ((main->setting.flag & fss_read_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); - } - fss_read_print_error_parameter_value_once_only_number(&main->program.error, f_console_symbol_long_normal_s, fss_read_long_depth_s, current->depth); return; @@ -790,10 +704,6 @@ extern "C" { if (current->depth > main->setting.depths.array[j].depth) { main->setting.state.status = F_status_set_error(F_parameter); - if ((main->setting.flag & fss_read_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); - } - fss_read_print_error_parameter_value_before_value_number(&main->program.error, f_console_symbol_long_normal_s, fss_read_long_depth_s, current->depth, main->setting.depths.array[j].depth); return; diff --git a/level_3/fss_read/c/main/common/enumeration.h b/level_3/fss_read/c/main/common/enumeration.h index 04d95ba..e2aa1c0 100644 --- a/level_3/fss_read/c/main/common/enumeration.h +++ b/level_3/fss_read/c/main/common/enumeration.h @@ -44,8 +44,6 @@ extern "C" { * - payload_warn: Treat missing or invalid payload as a warning (when using FSS Payload and related). * - pipe: Use the input pipe. * - pipe_format: Print using the special pipe format. - * - 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. * - quote_content: Designate that the standard supports quotes on Content. * - quote_object: Designate that the standard supports quotes on Objects. * - select: A specific Content at a given position is to be selected (Think of this as select a column for some Content). @@ -81,16 +79,14 @@ extern "C" { fss_read_main_flag_payload_warn_e = 0x100000, fss_read_main_flag_pipe_e = 0x200000, fss_read_main_flag_pipe_format_e = 0x400000, - fss_read_main_flag_print_first_e = 0x800000, - fss_read_main_flag_print_last_e = 0x1000000, - fss_read_main_flag_quote_content_e = 0x2000000, - fss_read_main_flag_quote_object_e = 0x4000000, - fss_read_main_flag_select_e = 0x8000000, - fss_read_main_flag_total_e = 0x10000000, - fss_read_main_flag_trim_e = 0x20000000, - fss_read_main_flag_trim_object_e = 0x40000000, - fss_read_main_flag_version_e = 0x80000000, - fss_read_main_flag_version_copyright_help_e = 0x80000420, + fss_read_main_flag_quote_content_e = 0x800000, + fss_read_main_flag_quote_object_e = 0x1000000, + fss_read_main_flag_select_e = 0x2000000, + fss_read_main_flag_total_e = 0x4000000, + fss_read_main_flag_trim_e = 0x8000000, + fss_read_main_flag_trim_object_e = 0x10000000, + fss_read_main_flag_version_e = 0x20000000, + fss_read_main_flag_version_copyright_help_e = 0x20000420, }; // enum #endif // _di_fss_read_main_flag_e_ diff --git a/level_3/fss_read/c/main/fss_read.c b/level_3/fss_read/c/main/fss_read.c index d76b3b7..765279b 100644 --- a/level_3/fss_read/c/main/fss_read.c +++ b/level_3/fss_read/c/main/fss_read.c @@ -52,17 +52,7 @@ extern "C" { fss_read_main_t * const main = (fss_read_main_t *) void_main; - if (F_status_is_error(main->setting.state.status)) { - if ((main->setting.flag & fss_read_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 & fss_read_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); - } + if (F_status_is_error(main->setting.state.status)) return; main->setting.state.status = F_okay; @@ -82,10 +72,6 @@ extern "C" { fll_program_print_copyright(&main->program.message, fll_program_copyright_year_author_s); } - if ((main->setting.flag & fss_read_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; } @@ -94,10 +80,6 @@ extern "C" { main->callback.process_normal(void_main); } } - - if ((main->setting.flag & fss_read_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_fss_read_main_ @@ -125,10 +107,6 @@ extern "C" { main->setting.state.status = f_string_dynamic_append_assure(f_string_eol_s, &main->setting.buffer); if (F_status_is_error(main->setting.state.status)) { - if ((main->setting.flag & fss_read_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); - } - fll_error_file_print(&main->program.error, F_status_set_fine(main->setting.state.status), macro_fss_read_f(f_string_dynamic_append_assure), fll_error_file_flag_fallback_e, f_string_ascii_minus_s, f_file_operation_read_s, fll_error_file_type_pipe_e); } } diff --git a/level_3/fss_read/tests/runtime/script/generate.sh b/level_3/fss_read/tests/runtime/script/generate.sh index ee42c18..e870b6b 100644 --- a/level_3/fss_read/tests/runtime/script/generate.sh +++ b/level_3/fss_read/tests/runtime/script/generate.sh @@ -1223,182 +1223,182 @@ generate_operate_000e() { generate_operate_test_standard() { standard=$(echo "${standard}" | sed -e 's|^test-||') - fss_read +FLn -A ${standard} -c ${file_source} > ${test_current}content.expect && - fss_read +FLn -A ${standard} -cO ${file_source} > ${test_current}content-original.expect && - fss_read +FLn -A ${standard} -ct ${file_source} > ${test_current}content-total.expect && - fss_read +FLn -A ${standard} -cT ${file_source} > ${test_current}content-trim.expect && - fss_read +FLn -A ${standard} -cl 0 ${file_source} > ${test_current}content-line-0.expect && - fss_read +FLn -A ${standard} -cl 1 ${file_source} > ${test_current}content-line-1.expect && - fss_read +FLn -A ${standard} -cl 5 ${file_source} > ${test_current}content-line-5.expect && - fss_read +FLn -A ${standard} -cl 6 ${file_source} > ${test_current}content-line-6.expect && - fss_read +FLn -A ${standard} -cl 100 ${file_source} > ${test_current}content-line-100.expect && - fss_read +FLn -A ${standard} -cs 0 ${file_source} > ${test_current}content-select-0.expect && - fss_read +FLn -A ${standard} -cs 1 ${file_source} > ${test_current}content-select-1.expect && - fss_read +FLn -A ${standard} -cs 5 ${file_source} > ${test_current}content-select-5.expect && - fss_read +FLn -A ${standard} -cs 6 ${file_source} > ${test_current}content-select-6.expect && - fss_read +FLn -A ${standard} -cs 100 ${file_source} > ${test_current}content-select-100.expect && - fss_read +FLn -A ${standard} -cC ${file_source} > ${test_current}content-columns.expect && - fss_read +FLn -A ${standard} -ca 0 ${file_source} > ${test_current}content-at-0.expect && - fss_read +FLn -A ${standard} -ca 1 ${file_source} > ${test_current}content-at-1.expect && - fss_read +FLn -A ${standard} -ca 5 ${file_source} > ${test_current}content-at-5.expect && - fss_read +FLn -A ${standard} -ca 6 ${file_source} > ${test_current}content-at-6.expect && - fss_read +FLn -A ${standard} -ca 100 ${file_source} > ${test_current}content-at-100.expect && - fss_read +FLn -A ${standard} -cn hi ${file_source} > ${test_current}content-name-hi.expect && - fss_read +FLn -A ${standard} -cn a ${file_source} > ${test_current}content-name-a.expect && - fss_read +FLn -A ${standard} -cn "" ${file_source} > ${test_current}content-name-.expect && - fss_read +FLn -A ${standard} -cn мир ${file_source} > ${test_current}content-name-мир.expect && - fss_read +FLn -A ${standard} -cn "привет has space" ${file_source} > ${test_current}content-name-привет.expect && - fss_read +FLn -A ${standard} -cnt hi ${file_source} > ${test_current}content-name-hi-total.expect && - fss_read +FLn -A ${standard} -cnt a ${file_source} > ${test_current}content-name-a-total.expect && - fss_read +FLn -A ${standard} -cnt "" ${file_source} > ${test_current}content-name--total.expect && - fss_read +FLn -A ${standard} -cnt мир ${file_source} > ${test_current}content-name-мир-total.expect && - fss_read +FLn -A ${standard} -cnt "привет has space" ${file_source} > ${test_current}content-name-привет-total.expect && - fss_read +FLn -A ${standard} -cns hi 0 ${file_source} > ${test_current}content-name-hi-select-0.expect && - fss_read +FLn -A ${standard} -cns hi 1 ${file_source} > ${test_current}content-name-hi-select-1.expect && - fss_read +FLn -A ${standard} -cns a 0 ${file_source} > ${test_current}content-name-a-select-0.expect && - fss_read +FLn -A ${standard} -cns a 1 ${file_source} > ${test_current}content-name-a-select-1.expect && - fss_read +FLn -A ${standard} -cns a 2 ${file_source} > ${test_current}content-name-a-select-2.expect && - fss_read +FLn -A ${standard} -cns a 5 ${file_source} > ${test_current}content-name-a-select-5.expect && - fss_read +FLn -A ${standard} -cns a 6 ${file_source} > ${test_current}content-name-a-select-6.expect && - fss_read +FLn -A ${standard} -cns a 100 ${file_source} > ${test_current}content-name-a-select-100.expect && - fss_read +FLn -A ${standard} -cns "" 0 ${file_source} > ${test_current}content-name--select-0.expect && - fss_read +FLn -A ${standard} -cns "" 1 ${file_source} > ${test_current}content-name--select-1.expect && - fss_read +FLn -A ${standard} -cns мир 0 ${file_source} > ${test_current}content-name-мир-select-0.expect && - fss_read +FLn -A ${standard} -cns мир 1 ${file_source} > ${test_current}content-name-мир-select-1.expect && - fss_read +FLn -A ${standard} -cns "привет has space" 0 ${file_source} > ${test_current}content-name-привет-select-0.expect && - fss_read +FLn -A ${standard} -cns "привет has space" 1 ${file_source} > ${test_current}content-name-привет-select-1.expect && - fss_read +FLn -A ${standard} -cnst hi 0 ${file_source} > ${test_current}content-name-hi-select-0-total.expect && - fss_read +FLn -A ${standard} -cnst hi 1 ${file_source} > ${test_current}content-name-hi-select-1-total.expect && - fss_read +FLn -A ${standard} -cnst a 0 ${file_source} > ${test_current}content-name-a-select-0-total.expect && - fss_read +FLn -A ${standard} -cnst a 1 ${file_source} > ${test_current}content-name-a-select-1-total.expect && - fss_read +FLn -A ${standard} -cnst a 2 ${file_source} > ${test_current}content-name-a-select-2-total.expect && - fss_read +FLn -A ${standard} -cnst a 5 ${file_source} > ${test_current}content-name-a-select-5-total.expect && - fss_read +FLn -A ${standard} -cnst a 6 ${file_source} > ${test_current}content-name-a-select-6-total.expect && - fss_read +FLn -A ${standard} -cnst a 100 ${file_source} > ${test_current}content-name-a-select-100-total.expect && - fss_read +FLn -A ${standard} -cnst "" 0 ${file_source} > ${test_current}content-name--select-0-total.expect && - fss_read +FLn -A ${standard} -cnst "" 1 ${file_source} > ${test_current}content-name--select-1-total.expect && - fss_read +FLn -A ${standard} -cnst мир 0 ${file_source} > ${test_current}content-name-мир-select-0-total.expect && - fss_read +FLn -A ${standard} -cnst мир 1 ${file_source} > ${test_current}content-name-мир-select-1-total.expect && - fss_read +FLn -A ${standard} -cnst "привет has space" 0 ${file_source} > ${test_current}content-name-привет-select-0-total.expect && - fss_read +FLn -A ${standard} -cnst "привет has space" 1 ${file_source} > ${test_current}content-name-привет-select-1-total.expect && - - fss_read +FLn -A ${standard} -o ${file_source} > ${test_current}object.expect && - fss_read +FLn -A ${standard} -oO ${file_source} > ${test_current}object-original.expect && - fss_read +FLn -A ${standard} -ot ${file_source} > ${test_current}object-total.expect && - fss_read +FLn -A ${standard} -oT ${file_source} > ${test_current}object-trim.expect && - fss_read +FLn -A ${standard} -ol 0 ${file_source} > ${test_current}object-line-0.expect && - fss_read +FLn -A ${standard} -ol 1 ${file_source} > ${test_current}object-line-1.expect && - fss_read +FLn -A ${standard} -ol 5 ${file_source} > ${test_current}object-line-5.expect && - fss_read +FLn -A ${standard} -ol 6 ${file_source} > ${test_current}object-line-6.expect && - fss_read +FLn -A ${standard} -ol 100 ${file_source} > ${test_current}object-line-100.expect && - fss_read +FLn -A ${standard} -os 0 ${file_source} > ${test_current}object-select-0.expect && - fss_read +FLn -A ${standard} -os 1 ${file_source} > ${test_current}object-select-1.expect && - fss_read +FLn -A ${standard} -os 5 ${file_source} > ${test_current}object-select-5.expect && - fss_read +FLn -A ${standard} -os 6 ${file_source} > ${test_current}object-select-6.expect && - fss_read +FLn -A ${standard} -os 100 ${file_source} > ${test_current}object-select-100.expect && - fss_read +FLn -A ${standard} -oC ${file_source} > ${test_current}object-columns.expect && - fss_read +FLn -A ${standard} -oa 0 ${file_source} > ${test_current}object-at-0.expect && - fss_read +FLn -A ${standard} -oa 1 ${file_source} > ${test_current}object-at-1.expect && - fss_read +FLn -A ${standard} -oa 5 ${file_source} > ${test_current}object-at-5.expect && - fss_read +FLn -A ${standard} -oa 6 ${file_source} > ${test_current}object-at-6.expect && - fss_read +FLn -A ${standard} -oa 100 ${file_source} > ${test_current}object-at-100.expect && - fss_read +FLn -A ${standard} -cn hi ${file_source} > ${test_current}object-name-hi.expect && - fss_read +FLn -A ${standard} -cn "" ${file_source} > ${test_current}object-name-.expect && - fss_read +FLn -A ${standard} -cn мир ${file_source} > ${test_current}object-name-мир.expect && - fss_read +FLn -A ${standard} -cn "привет has space" ${file_source} > ${test_current}object-name-привет.expect && - fss_read +FLn -A ${standard} -cn a ${file_source} > ${test_current}object-name-a.expect && - fss_read +FLn -A ${standard} -cnt hi ${file_source} > ${test_current}object-name-hi-total.expect && - fss_read +FLn -A ${standard} -cnt a ${file_source} > ${test_current}object-name-a-total.expect && - fss_read +FLn -A ${standard} -cnt "" ${file_source} > ${test_current}object-name--total.expect && - fss_read +FLn -A ${standard} -cnt мир ${file_source} > ${test_current}object-name-мир-total.expect && - fss_read +FLn -A ${standard} -cnt "привет has space" ${file_source} > ${test_current}object-name-привет-total.expect && - fss_read +FLn -A ${standard} -cns hi 0 ${file_source} > ${test_current}object-name-hi-select-0.expect && - fss_read +FLn -A ${standard} -cns hi 1 ${file_source} > ${test_current}object-name-hi-select-1.expect && - fss_read +FLn -A ${standard} -cns a 0 ${file_source} > ${test_current}object-name-a-select-0.expect && - fss_read +FLn -A ${standard} -cns a 1 ${file_source} > ${test_current}object-name-a-select-1.expect && - fss_read +FLn -A ${standard} -cns a 2 ${file_source} > ${test_current}object-name-a-select-2.expect && - fss_read +FLn -A ${standard} -cns a 5 ${file_source} > ${test_current}object-name-a-select-5.expect && - fss_read +FLn -A ${standard} -cns a 6 ${file_source} > ${test_current}object-name-a-select-6.expect && - fss_read +FLn -A ${standard} -cns a 100 ${file_source} > ${test_current}object-name-a-select-100.expect && - fss_read +FLn -A ${standard} -cns "" 0 ${file_source} > ${test_current}object-name--select-0.expect && - fss_read +FLn -A ${standard} -cns "" 1 ${file_source} > ${test_current}object-name--select-1.expect && - fss_read +FLn -A ${standard} -cns мир 0 ${file_source} > ${test_current}object-name-мир-select-0.expect && - fss_read +FLn -A ${standard} -cns мир 1 ${file_source} > ${test_current}object-name-мир-select-1.expect && - fss_read +FLn -A ${standard} -cns привет 0 ${file_source} > ${test_current}object-name-привет-select-0.expect && - fss_read +FLn -A ${standard} -cns привет 1 ${file_source} > ${test_current}object-name-привет-select-1.expect && - fss_read +FLn -A ${standard} -cnst hi 0 ${file_source} > ${test_current}object-name-hi-select-0-total.expect && - fss_read +FLn -A ${standard} -cnst hi 1 ${file_source} > ${test_current}object-name-hi-select-1-total.expect && - fss_read +FLn -A ${standard} -cnst a 0 ${file_source} > ${test_current}object-name-a-select-0-total.expect && - fss_read +FLn -A ${standard} -cnst a 1 ${file_source} > ${test_current}object-name-a-select-1-total.expect && - fss_read +FLn -A ${standard} -cnst a 2 ${file_source} > ${test_current}object-name-a-select-2-total.expect && - fss_read +FLn -A ${standard} -cnst a 5 ${file_source} > ${test_current}object-name-a-select-5-total.expect && - fss_read +FLn -A ${standard} -cnst a 6 ${file_source} > ${test_current}object-name-a-select-6-total.expect && - fss_read +FLn -A ${standard} -cnst a 100 ${file_source} > ${test_current}object-name-a-select-100-total.expect && - fss_read +FLn -A ${standard} -cnst "" 0 ${file_source} > ${test_current}object-name--select-0-total.expect && - fss_read +FLn -A ${standard} -cnst "" 1 ${file_source} > ${test_current}object-name--select-1-total.expect && - fss_read +FLn -A ${standard} -cnst мир 0 ${file_source} > ${test_current}object-name-мир-select-0-total.expect && - fss_read +FLn -A ${standard} -cnst мир 1 ${file_source} > ${test_current}object-name-мир-select-1-total.expect && - fss_read +FLn -A ${standard} -cnst "привет has space" 0 ${file_source} > ${test_current}object-name-привет-select-0-total.expect && - fss_read +FLn -A ${standard} -cnst "привет has space" 1 ${file_source} > ${test_current}object-name-привет-select-1-total.expect && - - fss_read +FLn -A ${standard} -oc ${file_source} > ${test_current}object_and_content.expect && - fss_read +FLn -A ${standard} -ocO ${file_source} > ${test_current}object_and_content-original.expect && - fss_read +FLn -A ${standard} -oct ${file_source} > ${test_current}object_and_content-total.expect && - fss_read +FLn -A ${standard} -ocT ${file_source} > ${test_current}object_and_content-trim.expect && - fss_read +FLn -A ${standard} -ocl 0 ${file_source} > ${test_current}object_and_content-line-0.expect && - fss_read +FLn -A ${standard} -ocl 1 ${file_source} > ${test_current}object_and_content-line-1.expect && - fss_read +FLn -A ${standard} -ocl 5 ${file_source} > ${test_current}object_and_content-line-5.expect && - fss_read +FLn -A ${standard} -ocl 6 ${file_source} > ${test_current}object_and_content-line-6.expect && - fss_read +FLn -A ${standard} -ocl 100 ${file_source} > ${test_current}object_and_content-line-100.expect && - fss_read +FLn -A ${standard} -ocs 0 ${file_source} > ${test_current}object_and_content-select-0.expect && - fss_read +FLn -A ${standard} -ocs 1 ${file_source} > ${test_current}object_and_content-select-1.expect && - fss_read +FLn -A ${standard} -ocs 5 ${file_source} > ${test_current}object_and_content-select-5.expect && - fss_read +FLn -A ${standard} -ocs 6 ${file_source} > ${test_current}object_and_content-select-6.expect && - fss_read +FLn -A ${standard} -ocs 100 ${file_source} > ${test_current}object_and_content-select-100.expect && - fss_read +FLn -A ${standard} -ocC ${file_source} > ${test_current}object_and_content-columns.expect && - fss_read +FLn -A ${standard} -oca 0 ${file_source} > ${test_current}object_and_content-at-0.expect && - fss_read +FLn -A ${standard} -oca 1 ${file_source} > ${test_current}object_and_content-at-1.expect && - fss_read +FLn -A ${standard} -oca 5 ${file_source} > ${test_current}object_and_content-at-5.expect && - fss_read +FLn -A ${standard} -oca 6 ${file_source} > ${test_current}object_and_content-at-6.expect && - fss_read +FLn -A ${standard} -oca 100 ${file_source} > ${test_current}object_and_content-at-100.expect && - fss_read +FLn -A ${standard} -cn hi ${file_source} > ${test_current}object_and_content-name-hi.expect && - fss_read +FLn -A ${standard} -cn a ${file_source} > ${test_current}object_and_content-name-a.expect && - fss_read +FLn -A ${standard} -cn "" ${file_source} > ${test_current}object_and_content-name-.expect && - fss_read +FLn -A ${standard} -cn мир ${file_source} > ${test_current}object_and_content-name-мир.expect && - fss_read +FLn -A ${standard} -cn привет ${file_source} > ${test_current}object_and_content-name-привет.expect && - fss_read +FLn -A ${standard} -cnt hi ${file_source} > ${test_current}object_and_content-name-hi-total.expect && - fss_read +FLn -A ${standard} -cnt a ${file_source} > ${test_current}object_and_content-name-a-total.expect && - fss_read +FLn -A ${standard} -cnt "" ${file_source} > ${test_current}object_and_content-name--total.expect && - fss_read +FLn -A ${standard} -cnt мир ${file_source} > ${test_current}object_and_content-name-мир-total.expect && - fss_read +FLn -A ${standard} -cnt "привет has space" ${file_source} > ${test_current}object_and_content-name-привет-total.expect && - fss_read +FLn -A ${standard} -cns hi 0 ${file_source} > ${test_current}object_and_content-name-hi-select-0.expect && - fss_read +FLn -A ${standard} -cns hi 1 ${file_source} > ${test_current}object_and_content-name-hi-select-1.expect && - fss_read +FLn -A ${standard} -cns a 0 ${file_source} > ${test_current}object_and_content-name-a-select-0.expect && - fss_read +FLn -A ${standard} -cns a 1 ${file_source} > ${test_current}object_and_content-name-a-select-1.expect && - fss_read +FLn -A ${standard} -cns a 2 ${file_source} > ${test_current}object_and_content-name-a-select-2.expect && - fss_read +FLn -A ${standard} -cns a 5 ${file_source} > ${test_current}object_and_content-name-a-select-5.expect && - fss_read +FLn -A ${standard} -cns a 6 ${file_source} > ${test_current}object_and_content-name-a-select-6.expect && - fss_read +FLn -A ${standard} -cns a 100 ${file_source} > ${test_current}object_and_content-name-a-select-100.expect && - fss_read +FLn -A ${standard} -cns "" 0 ${file_source} > ${test_current}object_and_content-name--select-0.expect && - fss_read +FLn -A ${standard} -cns "" 1 ${file_source} > ${test_current}object_and_content-name--select-1.expect && - fss_read +FLn -A ${standard} -cns мир 0 ${file_source} > ${test_current}object_and_content-name-мир-select-0.expect && - fss_read +FLn -A ${standard} -cns мир 1 ${file_source} > ${test_current}object_and_content-name-мир-select-1.expect && - fss_read +FLn -A ${standard} -cns "привет has space" 0 ${file_source} > ${test_current}object_and_content-name-привет-select-0.expect && - fss_read +FLn -A ${standard} -cns "привет has space" 1 ${file_source} > ${test_current}object_and_content-name-привет-select-1.expect && - fss_read +FLn -A ${standard} -cnst hi 0 ${file_source} > ${test_current}object_and_content-name-hi-select-0-total.expect && - fss_read +FLn -A ${standard} -cnst hi 1 ${file_source} > ${test_current}object_and_content-name-hi-select-1-total.expect && - fss_read +FLn -A ${standard} -cnst a 0 ${file_source} > ${test_current}object_and_content-name-a-select-0-total.expect && - fss_read +FLn -A ${standard} -cnst a 1 ${file_source} > ${test_current}object_and_content-name-a-select-1-total.expect && - fss_read +FLn -A ${standard} -cnst a 2 ${file_source} > ${test_current}object_and_content-name-a-select-2-total.expect && - fss_read +FLn -A ${standard} -cnst a 5 ${file_source} > ${test_current}object_and_content-name-a-select-5-total.expect && - fss_read +FLn -A ${standard} -cnst a 6 ${file_source} > ${test_current}object_and_content-name-a-select-6-total.expect && - fss_read +FLn -A ${standard} -cnst a 100 ${file_source} > ${test_current}object_and_content-name-a-select-100-total.expect && - fss_read +FLn -A ${standard} -cnst "" 0 ${file_source} > ${test_current}object_and_content-name--select-0-total.expect && - fss_read +FLn -A ${standard} -cnst "" 1 ${file_source} > ${test_current}object_and_content-name--select-1-total.expect && - fss_read +FLn -A ${standard} -cnst мир 0 ${file_source} > ${test_current}object_and_content-name-мир-select-0-total.expect && - fss_read +FLn -A ${standard} -cnst мир 1 ${file_source} > ${test_current}object_and_content-name-мир-select-1-total.expect && - fss_read +FLn -A ${standard} -cnst "привет has space" 0 ${file_source} > ${test_current}object_and_content-name-привет-select-0-total.expect && - fss_read +FLn -A ${standard} -cnst "привет has space" 1 ${file_source} > ${test_current}object_and_content-name-привет-select-1-total.expect && + fss_read +n -A ${standard} -c ${file_source} > ${test_current}content.expect && + fss_read +n -A ${standard} -cO ${file_source} > ${test_current}content-original.expect && + fss_read +n -A ${standard} -ct ${file_source} > ${test_current}content-total.expect && + fss_read +n -A ${standard} -cT ${file_source} > ${test_current}content-trim.expect && + fss_read +n -A ${standard} -cl 0 ${file_source} > ${test_current}content-line-0.expect && + fss_read +n -A ${standard} -cl 1 ${file_source} > ${test_current}content-line-1.expect && + fss_read +n -A ${standard} -cl 5 ${file_source} > ${test_current}content-line-5.expect && + fss_read +n -A ${standard} -cl 6 ${file_source} > ${test_current}content-line-6.expect && + fss_read +n -A ${standard} -cl 100 ${file_source} > ${test_current}content-line-100.expect && + fss_read +n -A ${standard} -cs 0 ${file_source} > ${test_current}content-select-0.expect && + fss_read +n -A ${standard} -cs 1 ${file_source} > ${test_current}content-select-1.expect && + fss_read +n -A ${standard} -cs 5 ${file_source} > ${test_current}content-select-5.expect && + fss_read +n -A ${standard} -cs 6 ${file_source} > ${test_current}content-select-6.expect && + fss_read +n -A ${standard} -cs 100 ${file_source} > ${test_current}content-select-100.expect && + fss_read +n -A ${standard} -cC ${file_source} > ${test_current}content-columns.expect && + fss_read +n -A ${standard} -ca 0 ${file_source} > ${test_current}content-at-0.expect && + fss_read +n -A ${standard} -ca 1 ${file_source} > ${test_current}content-at-1.expect && + fss_read +n -A ${standard} -ca 5 ${file_source} > ${test_current}content-at-5.expect && + fss_read +n -A ${standard} -ca 6 ${file_source} > ${test_current}content-at-6.expect && + fss_read +n -A ${standard} -ca 100 ${file_source} > ${test_current}content-at-100.expect && + fss_read +n -A ${standard} -cn hi ${file_source} > ${test_current}content-name-hi.expect && + fss_read +n -A ${standard} -cn a ${file_source} > ${test_current}content-name-a.expect && + fss_read +n -A ${standard} -cn "" ${file_source} > ${test_current}content-name-.expect && + fss_read +n -A ${standard} -cn мир ${file_source} > ${test_current}content-name-мир.expect && + fss_read +n -A ${standard} -cn "привет has space" ${file_source} > ${test_current}content-name-привет.expect && + fss_read +n -A ${standard} -cnt hi ${file_source} > ${test_current}content-name-hi-total.expect && + fss_read +n -A ${standard} -cnt a ${file_source} > ${test_current}content-name-a-total.expect && + fss_read +n -A ${standard} -cnt "" ${file_source} > ${test_current}content-name--total.expect && + fss_read +n -A ${standard} -cnt мир ${file_source} > ${test_current}content-name-мир-total.expect && + fss_read +n -A ${standard} -cnt "привет has space" ${file_source} > ${test_current}content-name-привет-total.expect && + fss_read +n -A ${standard} -cns hi 0 ${file_source} > ${test_current}content-name-hi-select-0.expect && + fss_read +n -A ${standard} -cns hi 1 ${file_source} > ${test_current}content-name-hi-select-1.expect && + fss_read +n -A ${standard} -cns a 0 ${file_source} > ${test_current}content-name-a-select-0.expect && + fss_read +n -A ${standard} -cns a 1 ${file_source} > ${test_current}content-name-a-select-1.expect && + fss_read +n -A ${standard} -cns a 2 ${file_source} > ${test_current}content-name-a-select-2.expect && + fss_read +n -A ${standard} -cns a 5 ${file_source} > ${test_current}content-name-a-select-5.expect && + fss_read +n -A ${standard} -cns a 6 ${file_source} > ${test_current}content-name-a-select-6.expect && + fss_read +n -A ${standard} -cns a 100 ${file_source} > ${test_current}content-name-a-select-100.expect && + fss_read +n -A ${standard} -cns "" 0 ${file_source} > ${test_current}content-name--select-0.expect && + fss_read +n -A ${standard} -cns "" 1 ${file_source} > ${test_current}content-name--select-1.expect && + fss_read +n -A ${standard} -cns мир 0 ${file_source} > ${test_current}content-name-мир-select-0.expect && + fss_read +n -A ${standard} -cns мир 1 ${file_source} > ${test_current}content-name-мир-select-1.expect && + fss_read +n -A ${standard} -cns "привет has space" 0 ${file_source} > ${test_current}content-name-привет-select-0.expect && + fss_read +n -A ${standard} -cns "привет has space" 1 ${file_source} > ${test_current}content-name-привет-select-1.expect && + fss_read +n -A ${standard} -cnst hi 0 ${file_source} > ${test_current}content-name-hi-select-0-total.expect && + fss_read +n -A ${standard} -cnst hi 1 ${file_source} > ${test_current}content-name-hi-select-1-total.expect && + fss_read +n -A ${standard} -cnst a 0 ${file_source} > ${test_current}content-name-a-select-0-total.expect && + fss_read +n -A ${standard} -cnst a 1 ${file_source} > ${test_current}content-name-a-select-1-total.expect && + fss_read +n -A ${standard} -cnst a 2 ${file_source} > ${test_current}content-name-a-select-2-total.expect && + fss_read +n -A ${standard} -cnst a 5 ${file_source} > ${test_current}content-name-a-select-5-total.expect && + fss_read +n -A ${standard} -cnst a 6 ${file_source} > ${test_current}content-name-a-select-6-total.expect && + fss_read +n -A ${standard} -cnst a 100 ${file_source} > ${test_current}content-name-a-select-100-total.expect && + fss_read +n -A ${standard} -cnst "" 0 ${file_source} > ${test_current}content-name--select-0-total.expect && + fss_read +n -A ${standard} -cnst "" 1 ${file_source} > ${test_current}content-name--select-1-total.expect && + fss_read +n -A ${standard} -cnst мир 0 ${file_source} > ${test_current}content-name-мир-select-0-total.expect && + fss_read +n -A ${standard} -cnst мир 1 ${file_source} > ${test_current}content-name-мир-select-1-total.expect && + fss_read +n -A ${standard} -cnst "привет has space" 0 ${file_source} > ${test_current}content-name-привет-select-0-total.expect && + fss_read +n -A ${standard} -cnst "привет has space" 1 ${file_source} > ${test_current}content-name-привет-select-1-total.expect && + + fss_read +n -A ${standard} -o ${file_source} > ${test_current}object.expect && + fss_read +n -A ${standard} -oO ${file_source} > ${test_current}object-original.expect && + fss_read +n -A ${standard} -ot ${file_source} > ${test_current}object-total.expect && + fss_read +n -A ${standard} -oT ${file_source} > ${test_current}object-trim.expect && + fss_read +n -A ${standard} -ol 0 ${file_source} > ${test_current}object-line-0.expect && + fss_read +n -A ${standard} -ol 1 ${file_source} > ${test_current}object-line-1.expect && + fss_read +n -A ${standard} -ol 5 ${file_source} > ${test_current}object-line-5.expect && + fss_read +n -A ${standard} -ol 6 ${file_source} > ${test_current}object-line-6.expect && + fss_read +n -A ${standard} -ol 100 ${file_source} > ${test_current}object-line-100.expect && + fss_read +n -A ${standard} -os 0 ${file_source} > ${test_current}object-select-0.expect && + fss_read +n -A ${standard} -os 1 ${file_source} > ${test_current}object-select-1.expect && + fss_read +n -A ${standard} -os 5 ${file_source} > ${test_current}object-select-5.expect && + fss_read +n -A ${standard} -os 6 ${file_source} > ${test_current}object-select-6.expect && + fss_read +n -A ${standard} -os 100 ${file_source} > ${test_current}object-select-100.expect && + fss_read +n -A ${standard} -oC ${file_source} > ${test_current}object-columns.expect && + fss_read +n -A ${standard} -oa 0 ${file_source} > ${test_current}object-at-0.expect && + fss_read +n -A ${standard} -oa 1 ${file_source} > ${test_current}object-at-1.expect && + fss_read +n -A ${standard} -oa 5 ${file_source} > ${test_current}object-at-5.expect && + fss_read +n -A ${standard} -oa 6 ${file_source} > ${test_current}object-at-6.expect && + fss_read +n -A ${standard} -oa 100 ${file_source} > ${test_current}object-at-100.expect && + fss_read +n -A ${standard} -cn hi ${file_source} > ${test_current}object-name-hi.expect && + fss_read +n -A ${standard} -cn "" ${file_source} > ${test_current}object-name-.expect && + fss_read +n -A ${standard} -cn мир ${file_source} > ${test_current}object-name-мир.expect && + fss_read +n -A ${standard} -cn "привет has space" ${file_source} > ${test_current}object-name-привет.expect && + fss_read +n -A ${standard} -cn a ${file_source} > ${test_current}object-name-a.expect && + fss_read +n -A ${standard} -cnt hi ${file_source} > ${test_current}object-name-hi-total.expect && + fss_read +n -A ${standard} -cnt a ${file_source} > ${test_current}object-name-a-total.expect && + fss_read +n -A ${standard} -cnt "" ${file_source} > ${test_current}object-name--total.expect && + fss_read +n -A ${standard} -cnt мир ${file_source} > ${test_current}object-name-мир-total.expect && + fss_read +n -A ${standard} -cnt "привет has space" ${file_source} > ${test_current}object-name-привет-total.expect && + fss_read +n -A ${standard} -cns hi 0 ${file_source} > ${test_current}object-name-hi-select-0.expect && + fss_read +n -A ${standard} -cns hi 1 ${file_source} > ${test_current}object-name-hi-select-1.expect && + fss_read +n -A ${standard} -cns a 0 ${file_source} > ${test_current}object-name-a-select-0.expect && + fss_read +n -A ${standard} -cns a 1 ${file_source} > ${test_current}object-name-a-select-1.expect && + fss_read +n -A ${standard} -cns a 2 ${file_source} > ${test_current}object-name-a-select-2.expect && + fss_read +n -A ${standard} -cns a 5 ${file_source} > ${test_current}object-name-a-select-5.expect && + fss_read +n -A ${standard} -cns a 6 ${file_source} > ${test_current}object-name-a-select-6.expect && + fss_read +n -A ${standard} -cns a 100 ${file_source} > ${test_current}object-name-a-select-100.expect && + fss_read +n -A ${standard} -cns "" 0 ${file_source} > ${test_current}object-name--select-0.expect && + fss_read +n -A ${standard} -cns "" 1 ${file_source} > ${test_current}object-name--select-1.expect && + fss_read +n -A ${standard} -cns мир 0 ${file_source} > ${test_current}object-name-мир-select-0.expect && + fss_read +n -A ${standard} -cns мир 1 ${file_source} > ${test_current}object-name-мир-select-1.expect && + fss_read +n -A ${standard} -cns привет 0 ${file_source} > ${test_current}object-name-привет-select-0.expect && + fss_read +n -A ${standard} -cns привет 1 ${file_source} > ${test_current}object-name-привет-select-1.expect && + fss_read +n -A ${standard} -cnst hi 0 ${file_source} > ${test_current}object-name-hi-select-0-total.expect && + fss_read +n -A ${standard} -cnst hi 1 ${file_source} > ${test_current}object-name-hi-select-1-total.expect && + fss_read +n -A ${standard} -cnst a 0 ${file_source} > ${test_current}object-name-a-select-0-total.expect && + fss_read +n -A ${standard} -cnst a 1 ${file_source} > ${test_current}object-name-a-select-1-total.expect && + fss_read +n -A ${standard} -cnst a 2 ${file_source} > ${test_current}object-name-a-select-2-total.expect && + fss_read +n -A ${standard} -cnst a 5 ${file_source} > ${test_current}object-name-a-select-5-total.expect && + fss_read +n -A ${standard} -cnst a 6 ${file_source} > ${test_current}object-name-a-select-6-total.expect && + fss_read +n -A ${standard} -cnst a 100 ${file_source} > ${test_current}object-name-a-select-100-total.expect && + fss_read +n -A ${standard} -cnst "" 0 ${file_source} > ${test_current}object-name--select-0-total.expect && + fss_read +n -A ${standard} -cnst "" 1 ${file_source} > ${test_current}object-name--select-1-total.expect && + fss_read +n -A ${standard} -cnst мир 0 ${file_source} > ${test_current}object-name-мир-select-0-total.expect && + fss_read +n -A ${standard} -cnst мир 1 ${file_source} > ${test_current}object-name-мир-select-1-total.expect && + fss_read +n -A ${standard} -cnst "привет has space" 0 ${file_source} > ${test_current}object-name-привет-select-0-total.expect && + fss_read +n -A ${standard} -cnst "привет has space" 1 ${file_source} > ${test_current}object-name-привет-select-1-total.expect && + + fss_read +n -A ${standard} -oc ${file_source} > ${test_current}object_and_content.expect && + fss_read +n -A ${standard} -ocO ${file_source} > ${test_current}object_and_content-original.expect && + fss_read +n -A ${standard} -oct ${file_source} > ${test_current}object_and_content-total.expect && + fss_read +n -A ${standard} -ocT ${file_source} > ${test_current}object_and_content-trim.expect && + fss_read +n -A ${standard} -ocl 0 ${file_source} > ${test_current}object_and_content-line-0.expect && + fss_read +n -A ${standard} -ocl 1 ${file_source} > ${test_current}object_and_content-line-1.expect && + fss_read +n -A ${standard} -ocl 5 ${file_source} > ${test_current}object_and_content-line-5.expect && + fss_read +n -A ${standard} -ocl 6 ${file_source} > ${test_current}object_and_content-line-6.expect && + fss_read +n -A ${standard} -ocl 100 ${file_source} > ${test_current}object_and_content-line-100.expect && + fss_read +n -A ${standard} -ocs 0 ${file_source} > ${test_current}object_and_content-select-0.expect && + fss_read +n -A ${standard} -ocs 1 ${file_source} > ${test_current}object_and_content-select-1.expect && + fss_read +n -A ${standard} -ocs 5 ${file_source} > ${test_current}object_and_content-select-5.expect && + fss_read +n -A ${standard} -ocs 6 ${file_source} > ${test_current}object_and_content-select-6.expect && + fss_read +n -A ${standard} -ocs 100 ${file_source} > ${test_current}object_and_content-select-100.expect && + fss_read +n -A ${standard} -ocC ${file_source} > ${test_current}object_and_content-columns.expect && + fss_read +n -A ${standard} -oca 0 ${file_source} > ${test_current}object_and_content-at-0.expect && + fss_read +n -A ${standard} -oca 1 ${file_source} > ${test_current}object_and_content-at-1.expect && + fss_read +n -A ${standard} -oca 5 ${file_source} > ${test_current}object_and_content-at-5.expect && + fss_read +n -A ${standard} -oca 6 ${file_source} > ${test_current}object_and_content-at-6.expect && + fss_read +n -A ${standard} -oca 100 ${file_source} > ${test_current}object_and_content-at-100.expect && + fss_read +n -A ${standard} -cn hi ${file_source} > ${test_current}object_and_content-name-hi.expect && + fss_read +n -A ${standard} -cn a ${file_source} > ${test_current}object_and_content-name-a.expect && + fss_read +n -A ${standard} -cn "" ${file_source} > ${test_current}object_and_content-name-.expect && + fss_read +n -A ${standard} -cn мир ${file_source} > ${test_current}object_and_content-name-мир.expect && + fss_read +n -A ${standard} -cn привет ${file_source} > ${test_current}object_and_content-name-привет.expect && + fss_read +n -A ${standard} -cnt hi ${file_source} > ${test_current}object_and_content-name-hi-total.expect && + fss_read +n -A ${standard} -cnt a ${file_source} > ${test_current}object_and_content-name-a-total.expect && + fss_read +n -A ${standard} -cnt "" ${file_source} > ${test_current}object_and_content-name--total.expect && + fss_read +n -A ${standard} -cnt мир ${file_source} > ${test_current}object_and_content-name-мир-total.expect && + fss_read +n -A ${standard} -cnt "привет has space" ${file_source} > ${test_current}object_and_content-name-привет-total.expect && + fss_read +n -A ${standard} -cns hi 0 ${file_source} > ${test_current}object_and_content-name-hi-select-0.expect && + fss_read +n -A ${standard} -cns hi 1 ${file_source} > ${test_current}object_and_content-name-hi-select-1.expect && + fss_read +n -A ${standard} -cns a 0 ${file_source} > ${test_current}object_and_content-name-a-select-0.expect && + fss_read +n -A ${standard} -cns a 1 ${file_source} > ${test_current}object_and_content-name-a-select-1.expect && + fss_read +n -A ${standard} -cns a 2 ${file_source} > ${test_current}object_and_content-name-a-select-2.expect && + fss_read +n -A ${standard} -cns a 5 ${file_source} > ${test_current}object_and_content-name-a-select-5.expect && + fss_read +n -A ${standard} -cns a 6 ${file_source} > ${test_current}object_and_content-name-a-select-6.expect && + fss_read +n -A ${standard} -cns a 100 ${file_source} > ${test_current}object_and_content-name-a-select-100.expect && + fss_read +n -A ${standard} -cns "" 0 ${file_source} > ${test_current}object_and_content-name--select-0.expect && + fss_read +n -A ${standard} -cns "" 1 ${file_source} > ${test_current}object_and_content-name--select-1.expect && + fss_read +n -A ${standard} -cns мир 0 ${file_source} > ${test_current}object_and_content-name-мир-select-0.expect && + fss_read +n -A ${standard} -cns мир 1 ${file_source} > ${test_current}object_and_content-name-мир-select-1.expect && + fss_read +n -A ${standard} -cns "привет has space" 0 ${file_source} > ${test_current}object_and_content-name-привет-select-0.expect && + fss_read +n -A ${standard} -cns "привет has space" 1 ${file_source} > ${test_current}object_and_content-name-привет-select-1.expect && + fss_read +n -A ${standard} -cnst hi 0 ${file_source} > ${test_current}object_and_content-name-hi-select-0-total.expect && + fss_read +n -A ${standard} -cnst hi 1 ${file_source} > ${test_current}object_and_content-name-hi-select-1-total.expect && + fss_read +n -A ${standard} -cnst a 0 ${file_source} > ${test_current}object_and_content-name-a-select-0-total.expect && + fss_read +n -A ${standard} -cnst a 1 ${file_source} > ${test_current}object_and_content-name-a-select-1-total.expect && + fss_read +n -A ${standard} -cnst a 2 ${file_source} > ${test_current}object_and_content-name-a-select-2-total.expect && + fss_read +n -A ${standard} -cnst a 5 ${file_source} > ${test_current}object_and_content-name-a-select-5-total.expect && + fss_read +n -A ${standard} -cnst a 6 ${file_source} > ${test_current}object_and_content-name-a-select-6-total.expect && + fss_read +n -A ${standard} -cnst a 100 ${file_source} > ${test_current}object_and_content-name-a-select-100-total.expect && + fss_read +n -A ${standard} -cnst "" 0 ${file_source} > ${test_current}object_and_content-name--select-0-total.expect && + fss_read +n -A ${standard} -cnst "" 1 ${file_source} > ${test_current}object_and_content-name--select-1-total.expect && + fss_read +n -A ${standard} -cnst мир 0 ${file_source} > ${test_current}object_and_content-name-мир-select-0-total.expect && + fss_read +n -A ${standard} -cnst мир 1 ${file_source} > ${test_current}object_and_content-name-мир-select-1-total.expect && + fss_read +n -A ${standard} -cnst "привет has space" 0 ${file_source} > ${test_current}object_and_content-name-привет-select-0-total.expect && + fss_read +n -A ${standard} -cnst "привет has space" 1 ${file_source} > ${test_current}object_and_content-name-привет-select-1-total.expect && echo "Generation Complete" diff --git a/level_3/fss_write/c/main/common.c b/level_3/fss_write/c/main/common.c index b38d13f..cf9877f 100644 --- a/level_3/fss_write/c/main/common.c +++ b/level_3/fss_write/c/main/common.c @@ -15,25 +15,7 @@ extern "C" { main->setting.state.step_small = fss_write_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 &= ~fss_write_main_flag_print_first_e; - } - else { - main->setting.flag |= fss_write_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 &= ~fss_write_main_flag_print_last_e; - } - else { - main->setting.flag |= fss_write_main_flag_print_last_e; - } - if (F_status_is_error(main->setting.state.status)) { - if ((main->setting.flag & fss_write_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); - } - fss_write_print_error(&main->program.error, macro_fss_write_f(f_console_parameter_process)); return; @@ -42,10 +24,6 @@ extern "C" { 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 & fss_write_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); - } - fss_write_print_error(&main->program.error, macro_fss_write_f(fll_program_parameter_process_context_standard)); return; @@ -54,10 +32,6 @@ extern "C" { 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 & fss_write_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); - } - fss_write_print_error(&main->program.error, macro_fss_write_f(fll_program_parameter_process_verbosity_standard)); return; @@ -104,10 +78,6 @@ extern "C" { if (main->program.parameters.array[fss_write_parameter_file_e].values.used > 1) { main->setting.state.status = F_status_set_error(F_parameter); - if ((main->setting.flag & fss_write_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); - } - fll_program_print_error_parameter_must_specify_once(&main->program.error, f_console_symbol_long_normal_s, fss_write_long_file_s); return; @@ -121,10 +91,6 @@ extern "C" { main->setting.state.status = f_file_stream_open(main->program.parameters.arguments.array[index], f_string_empty_s, &main->program.output.to); if (F_status_is_error(main->setting.state.status)) { - if ((main->setting.flag & fss_write_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); - } - fss_write_print_error_file(&main->program.error, macro_fss_write_f(f_file_stream_open), main->program.parameters.arguments.array[index], f_file_operation_open_s, fll_error_file_type_file_e); return; @@ -135,10 +101,6 @@ extern "C" { else if (main->program.parameters.array[fss_write_parameter_file_e].result & f_console_result_found_e) { main->setting.state.status = F_status_set_error(F_parameter); - if ((main->setting.flag & fss_write_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); - } - fll_program_print_error_parameter_missing_value(&main->program.error, f_console_symbol_long_normal_s, fss_write_long_file_s); return; @@ -152,10 +114,6 @@ extern "C" { main->setting.state.status = f_memory_arrays_resize(values->used, sizeof(f_string_dynamic_t), (void **) &main->setting.objects.array, &main->setting.objects.used, &main->setting.objects.size, &f_string_dynamics_delete_callback); if (F_status_is_error(main->setting.state.status)) { - if ((main->setting.flag & fss_write_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); - } - fss_write_print_error(&main->program.error, macro_fss_write_f(f_memory_arrays_resize)); return; @@ -176,10 +134,6 @@ extern "C" { else if (main->program.parameters.array[fss_write_parameter_object_e].result & f_console_result_found_e) { main->setting.state.status = F_status_set_error(F_parameter); - if ((main->setting.flag & fss_write_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); - } - fll_program_print_error_parameter_missing_value(&main->program.error, f_console_symbol_long_normal_s, fss_write_long_object_s); return; @@ -192,10 +146,6 @@ extern "C" { if (main->program.parameters.array[fss_write_parameter_content_e].values.used > main->program.parameters.array[fss_write_parameter_object_e].values.used) { main->setting.state.status = F_status_set_error(F_support_not); - if ((main->setting.flag & fss_write_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); - } - fss_write_print_error_one_content_only(&main->program.error); return; @@ -216,10 +166,6 @@ extern "C" { main->setting.state.status = f_memory_arrays_resize(values_object->used, sizeof(f_string_dynamic_t), (void **) &main->setting.contentss.array, &main->setting.contentss.used, &main->setting.contentss.size, &f_string_dynamics_delete_callback); if (F_status_is_error(main->setting.state.status)) { - if ((main->setting.flag & fss_write_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); - } - fss_write_print_error(&main->program.error, macro_fss_write_f(f_memory_arrays_resize)); return; @@ -251,10 +197,6 @@ extern "C" { main->setting.state.status = f_memory_array_increase_by(total, sizeof(f_string_dynamic_t), (void **) &main->setting.contentss.array[j].array, &main->setting.contentss.array[j].used, &main->setting.contentss.array[j].size); if (F_status_is_error(main->setting.state.status)) { - if ((main->setting.flag & fss_write_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); - } - fss_write_print_error(&main->program.error, macro_fss_write_f(f_memory_array_increase_by)); return; @@ -279,10 +221,6 @@ extern "C" { else if (main->program.parameters.array[fss_write_parameter_content_e].result & f_console_result_found_e) { main->setting.state.status = F_status_set_error(F_parameter); - if ((main->setting.flag & fss_write_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); - } - fll_program_print_error_parameter_missing_value(&main->program.error, f_console_symbol_long_normal_s, fss_write_long_content_s); return; @@ -296,10 +234,6 @@ extern "C" { main->setting.state.status = f_string_dynamic_append_nulless(main->program.parameters.arguments.array[index], &main->setting.prepend); if (F_status_is_error(main->setting.state.status)) { - if ((main->setting.flag & fss_write_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); - } - fss_write_print_error(&main->program.error, macro_fss_write_f(f_string_dynamic_append_nulless)); return; @@ -311,10 +245,6 @@ extern "C" { for (; range.start < main->program.parameters.arguments.array[index].used; range.start++) { if (f_fss_is_space(main->program.parameters.arguments.array[index], range, &main->setting.state) == F_false) { - if ((main->setting.flag & fss_write_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); - } - if (F_status_is_error(main->setting.state.status)) { fss_write_print_error(&main->program.error, macro_fss_write_f(f_fss_is_space)); } @@ -334,10 +264,6 @@ extern "C" { else if (main->program.parameters.array[fss_write_parameter_prepend_e].result & f_console_result_found_e) { main->setting.state.status = F_status_set_error(F_parameter); - if ((main->setting.flag & fss_write_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); - } - fll_program_print_error_parameter_missing_value(&main->program.error, f_console_symbol_long_normal_s, fss_write_long_prepend_s); return; @@ -347,10 +273,6 @@ extern "C" { if (main->program.parameters.array[fss_write_parameter_ignore_e].values.used % 2) { main->setting.state.status = F_status_set_error(F_parameter); - if ((main->setting.flag & fss_write_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); - } - fll_program_print_error_parameter_missing_value_requires_amount(&main->program.error, f_console_symbol_long_normal_s, fss_write_long_ignore_s, fss_write_string_two_s); return; @@ -373,10 +295,6 @@ extern "C" { main->setting.state.status = f_memory_array_increase_by(values_data->used, sizeof(f_ranges_t), (void **) &main->setting.ignoress.array, &main->setting.ignoress.used, &main->setting.ignoress.size); if (F_status_is_error(main->setting.state.status)) { - if ((main->setting.flag & fss_write_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); - } - fss_write_print_error(&main->program.error, macro_fss_write_f(f_memory_array_increase_by)); return; @@ -407,10 +325,6 @@ extern "C" { main->setting.state.status = f_memory_array_increase_by(total, sizeof(f_range_t), (void **) &main->setting.ignoress.array[j].array, &main->setting.ignoress.array[j].used, &main->setting.ignoress.array[j].size); if (F_status_is_error(main->setting.state.status)) { - if ((main->setting.flag & fss_write_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); - } - fss_write_print_error(&main->program.error, macro_fss_write_f(f_memory_array_increase_by)); return; @@ -423,10 +337,6 @@ extern "C" { main->setting.state.status = fl_conversion_dynamic_to_unsigned_detect(fl_conversion_data_base_10_c, main->program.parameters.arguments.array[index], &main->setting.ignoress.array[j].array[main->setting.ignoress.array[j].used].start); if (F_status_is_error(main->setting.state.status)) { - if ((main->setting.flag & fss_write_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); - } - fll_program_print_error_parameter_integer_not(&main->program.error, f_console_symbol_long_normal_s, fss_write_long_ignore_s, main->program.parameters.arguments.array[index]); return; @@ -437,10 +347,6 @@ extern "C" { main->setting.state.status = fl_conversion_dynamic_to_unsigned_detect(fl_conversion_data_base_10_c, main->program.parameters.arguments.array[index], &main->setting.ignoress.array[j].array[main->setting.ignoress.array[j].used].stop); if (F_status_is_error(main->setting.state.status)) { - if ((main->setting.flag & fss_write_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); - } - fll_program_print_error_parameter_integer_not(&main->program.error, f_console_symbol_long_normal_s, fss_write_long_ignore_s, main->program.parameters.arguments.array[index]); return; @@ -449,10 +355,6 @@ extern "C" { if (main->setting.ignoress.array[j].array[main->setting.ignoress.array[j].used].stop > main->setting.ignoress.array[j].array[main->setting.ignoress.array[j].used].start) { main->setting.state.status = F_status_set_error(F_parameter); - if ((main->setting.flag & fss_write_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); - } - fll_program_print_error_parameter_range_start_before_stop( &main->program.error, f_console_symbol_long_normal_s, @@ -486,10 +388,6 @@ extern "C" { main->setting.state.status = fl_conversion_dynamic_to_unsigned_detect(fl_conversion_data_base_10_c, main->program.parameters.arguments.array[index], &number.start); if (F_status_is_error(main->setting.state.status)) { - if ((main->setting.flag & fss_write_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); - } - fll_program_print_error_parameter_integer_not(&main->program.error, f_console_symbol_long_normal_s, fss_write_long_ignore_s, main->program.parameters.arguments.array[index]); return; @@ -500,10 +398,6 @@ extern "C" { main->setting.state.status = fl_conversion_dynamic_to_unsigned_detect(fl_conversion_data_base_10_c, main->program.parameters.arguments.array[index], &number.stop); if (F_status_is_error(main->setting.state.status)) { - if ((main->setting.flag & fss_write_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); - } - fll_program_print_error_parameter_integer_not(&main->program.error, f_console_symbol_long_normal_s, fss_write_long_ignore_s, main->program.parameters.arguments.array[index]); return; @@ -512,10 +406,6 @@ extern "C" { if (number.start > number.stop) { main->setting.state.status = F_status_set_error(F_parameter); - if ((main->setting.flag & fss_write_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); - } - fll_program_print_error_parameter_range_start_before_stop( &main->program.error, f_console_symbol_long_normal_s, @@ -532,9 +422,6 @@ extern "C" { else if (main->program.parameters.array[fss_write_parameter_ignore_e].result & f_console_result_found_e) { main->setting.state.status = F_status_set_error(F_parameter); - if ((main->setting.flag & fss_write_main_flag_print_first_e) && main->program.message.verbosity > f_console_verbosity_error_e) { - fll_print_dynamic_raw(f_string_eol_s, main->program.message.to); - } fll_program_print_error_parameter_missing_value(&main->program.error, f_console_symbol_long_normal_s, fss_write_long_ignore_s); @@ -611,10 +498,6 @@ extern "C" { if (main->program.parameters.array[has_cannots[i][0]].result & f_console_result_found_e) { main->setting.state.status = F_status_set_error(F_parameter); - if ((main->setting.flag & fss_write_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); - } - fll_program_print_error_parameter_cannot_use_with(&main->program.error, f_console_symbol_long_normal_s, f_console_symbol_long_normal_s, has_string[i], has_cannots_string[i][0]); return; @@ -623,10 +506,6 @@ extern "C" { if (main->program.parameters.array[has_cannots[i][1]].result & f_console_result_found_e) { main->setting.state.status = F_status_set_error(F_parameter); - if ((main->setting.flag & fss_write_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); - } - fll_program_print_error_parameter_cannot_use_with(&main->program.error, f_console_symbol_long_normal_s, f_console_symbol_long_normal_s, has_string[i], has_cannots_string[i][1]); return; @@ -643,10 +522,6 @@ extern "C" { if (main->program.parameters.array[fss_write_parameter_object_e].locations_sub.used > main->program.parameters.array[fss_write_parameter_content_e].locations_sub.used && !(main->setting.flag & fss_write_main_flag_partial_e)) { main->setting.state.status = F_status_set_error(F_parameter); - if ((main->setting.flag & fss_write_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); - } - fss_write_print_error_parameter_same_times_at_least(&main->program.error); return; @@ -657,10 +532,6 @@ extern "C" { if (main->program.parameters.array[fss_write_parameter_content_e].result & f_console_result_value_e) { main->setting.state.status = F_status_set_error(F_parameter); - if ((main->setting.flag & fss_write_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); - } - fll_program_print_error_parameter_cannot_use_with_xor(&main->program.error, f_console_symbol_long_normal_s, f_console_symbol_long_normal_s, f_console_symbol_long_normal_s, fss_write_long_partial_s, fss_write_long_object_s, fss_write_long_content_s); return; diff --git a/level_3/fss_write/c/main/common/enumeration.h b/level_3/fss_write/c/main/common/enumeration.h index 6e6c4b8..9d7c570 100644 --- a/level_3/fss_write/c/main/common/enumeration.h +++ b/level_3/fss_write/c/main/common/enumeration.h @@ -33,8 +33,6 @@ extern "C" { * - object_open: The Object open characters are to be printed. * - partial: Do not write end of Object/Content character. * - 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. * - trim: Trim Object names. * - version: Print version. * - version_copyright_help: A helper flag representing version, copyright, and help flag bits being set. @@ -55,11 +53,9 @@ extern "C" { fss_write_main_flag_partial_e = 0x400, fss_write_main_flag_pipe_e = 0x800, fss_write_main_flag_prepend_e = 0x1000, - fss_write_main_flag_print_first_e = 0x2000, - fss_write_main_flag_print_last_e = 0x4000, - fss_write_main_flag_trim_e = 0x8000, - fss_write_main_flag_version_e = 0x10000, - fss_write_main_flag_version_copyright_help_e = 0x10050, + fss_write_main_flag_trim_e = 0x2000, + fss_write_main_flag_version_e = 0x4000, + fss_write_main_flag_version_copyright_help_e = 0x4050, }; // enum #endif // _di_fss_write_main_flag_e_ diff --git a/level_3/fss_write/c/main/fss_write.c b/level_3/fss_write/c/main/fss_write.c index e95b4bc..8c93517 100644 --- a/level_3/fss_write/c/main/fss_write.c +++ b/level_3/fss_write/c/main/fss_write.c @@ -11,17 +11,7 @@ extern "C" { fss_write_main_t * const main = (fss_write_main_t *) void_main; - if (F_status_is_error(main->setting.state.status)) { - if ((main->setting.flag & fss_write_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 & fss_write_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); - } + if (F_status_is_error(main->setting.state.status)) return; main->setting.state.status = F_okay; @@ -41,10 +31,6 @@ extern "C" { fll_program_print_copyright(&main->program.message, fll_program_copyright_year_author_s); } - if ((main->setting.flag & fss_write_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; } @@ -61,10 +47,6 @@ extern "C" { } } } - - if ((main->setting.flag & fss_write_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_fss_write_main_ diff --git a/level_3/iki_read/c/main/common.c b/level_3/iki_read/c/main/common.c index d914ae6..96360f2 100644 --- a/level_3/iki_read/c/main/common.c +++ b/level_3/iki_read/c/main/common.c @@ -15,25 +15,7 @@ extern "C" { main->setting.state.step_small = iki_read_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 &= ~iki_read_main_flag_print_first_e; - } - else { - main->setting.flag |= iki_read_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 &= ~iki_read_main_flag_print_last_e; - } - else { - main->setting.flag |= iki_read_main_flag_print_last_e; - } - if (F_status_is_error(main->setting.state.status)) { - if ((main->setting.flag & iki_read_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); - } - iki_read_print_error(&main->program.error, macro_iki_read_f(f_console_parameter_process)); return; @@ -42,10 +24,6 @@ extern "C" { 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 & iki_read_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); - } - iki_read_print_error(&main->program.error, macro_iki_read_f(fll_program_parameter_process_context_standard)); return; @@ -54,10 +32,6 @@ extern "C" { 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 & iki_read_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); - } - iki_read_print_error(&main->program.error, macro_iki_read_f(fll_program_parameter_process_verbosity_standard)); return; @@ -91,10 +65,6 @@ extern "C" { if (!(main->program.parameters.remaining.used || (main->program.pipe & fll_program_data_pipe_input_e))) { main->setting.state.status = F_status_set_error(F_parameter); - if ((main->setting.flag & iki_read_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); - } - fll_program_print_error_missing_file(&main->program.error); return; @@ -104,10 +74,6 @@ extern "C" { if (main->program.parameters.array[iki_read_parameter_whole_e].result & f_console_result_found_e) { main->setting.state.status = F_status_set_error(F_parameter); - if ((main->setting.flag & iki_read_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); - } - fll_program_print_error_parameter_cannot_use_with(&main->program.error, f_console_symbol_long_normal_s, f_console_symbol_long_normal_s, iki_read_long_at_s, iki_read_long_whole_s); return; @@ -127,10 +93,6 @@ extern "C" { if (F_status_is_error(main->setting.state.status)) { main->setting.state.status = F_status_set_error(F_parameter); - if ((main->setting.flag & iki_read_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); - } - fll_program_print_error_parameter_integer_not(&main->program.error, f_console_symbol_long_normal_s, iki_read_long_at_s, main->program.parameters.arguments.array[index]); return; @@ -141,10 +103,6 @@ extern "C" { else if (main->program.parameters.array[iki_read_parameter_at_e].result & f_console_result_found_e) { main->setting.state.status = F_status_set_error(F_parameter); - if ((main->setting.flag & iki_read_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); - } - fll_program_print_error_parameter_missing_value(&main->program.error, f_console_symbol_long_normal_s, iki_read_long_at_s); return; @@ -165,10 +123,6 @@ extern "C" { if (F_status_is_error(main->setting.state.status)) { main->setting.state.status = F_status_set_error(F_parameter); - if ((main->setting.flag & iki_read_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); - } - fll_program_print_error_parameter_integer_not(&main->program.error, f_console_symbol_long_normal_s, iki_read_long_line_s, main->program.parameters.arguments.array[index]); return; @@ -179,10 +133,6 @@ extern "C" { else if (main->program.parameters.array[iki_read_parameter_line_e].result & f_console_result_found_e) { main->setting.state.status = F_status_set_error(F_parameter); - if ((main->setting.flag & iki_read_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); - } - fll_program_print_error_parameter_missing_value(&main->program.error, f_console_symbol_long_normal_s, iki_read_long_line_s); return; @@ -194,10 +144,6 @@ extern "C" { main->setting.state.status = f_memory_array_increase_by(main->program.parameters.array[iki_read_parameter_name_e].values.used, sizeof(f_string_dynamic_t), (void **) &main->setting.names.array, &main->setting.names.used, &main->setting.names.size); if (F_status_is_error(main->setting.state.status)) { - if ((main->setting.flag & iki_read_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); - } - iki_read_print_error(&main->program.error, macro_iki_read_f(f_memory_array_increase_by)); return; @@ -229,10 +175,6 @@ extern "C" { } // for if (F_status_is_error(main->setting.state.status)) { - if ((main->setting.flag & iki_read_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); - } - iki_read_print_error(&main->program.error, macro_iki_read_f(f_string_dynamics_append)); return; @@ -243,10 +185,6 @@ extern "C" { else if (main->program.parameters.array[iki_read_parameter_name_e].result & f_console_result_found_e) { main->setting.state.status = F_status_set_error(F_parameter); - if ((main->setting.flag & iki_read_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); - } - fll_program_print_error_parameter_missing_value(&main->program.error, f_console_symbol_long_normal_s, iki_read_long_name_s); return; @@ -256,10 +194,6 @@ extern "C" { if ((main->program.parameters.array[iki_read_parameter_replace_e].result & f_console_result_found_e) || main->program.parameters.array[iki_read_parameter_replace_e].values.used % 2) { main->setting.state.status = F_status_set_error(F_parameter); - if ((main->setting.flag & iki_read_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); - } - fll_program_print_error_parameter_missing_value_requires_amount(&main->program.error, f_console_symbol_long_normal_s, iki_read_long_replace_s, iki_read_string_two_s); return; @@ -270,10 +204,6 @@ extern "C" { main->setting.state.status = f_memory_array_increase_by(main->program.parameters.array[iki_read_parameter_replace_e].values.used / 2, sizeof(f_string_map_t), (void **) &main->setting.replace.array, &main->setting.replace.used, &main->setting.replace.size); if (F_status_is_error(main->setting.state.status)) { - if ((main->setting.flag & iki_read_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); - } - iki_read_print_error(&main->program.error, macro_iki_read_f(f_memory_array_increase_by)); return; @@ -308,10 +238,6 @@ extern "C" { } if (F_status_is_error(main->setting.state.status)) { - if ((main->setting.flag & iki_read_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); - } - iki_read_print_error(&main->program.error, macro_iki_read_f(f_memory_array_resize)); return; @@ -351,10 +277,6 @@ extern "C" { if ((main->program.parameters.array[iki_read_parameter_wrap_e].result & f_console_result_found_e) || main->program.parameters.array[iki_read_parameter_wrap_e].values.used % 3) { main->setting.state.status = F_status_set_error(F_parameter); - if ((main->setting.flag & iki_read_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); - } - fll_program_print_error_parameter_missing_value_requires_amount(&main->program.error, f_console_symbol_long_normal_s, iki_read_long_wrap_s, iki_read_string_three_s); return; @@ -365,10 +287,6 @@ extern "C" { main->setting.state.status = f_memory_array_increase_by(main->program.parameters.array[iki_read_parameter_wrap_e].values.used / 3, sizeof(f_string_triple_t), (void **) &main->setting.wrap.array, &main->setting.wrap.used, &main->setting.wrap.size); if (F_status_is_error(main->setting.state.status)) { - if ((main->setting.flag & iki_read_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); - } - iki_read_print_error(&main->program.error, macro_iki_read_f(f_memory_array_increase_by)); return; @@ -407,10 +325,6 @@ extern "C" { } if (F_status_is_error(main->setting.state.status)) { - if ((main->setting.flag & iki_read_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); - } - iki_read_print_error(&main->program.error, macro_iki_read_f(f_memory_array_resize)); return; @@ -458,10 +372,6 @@ extern "C" { if (main->program.parameters.array[ids[i]].result & f_console_result_found_e) { main->setting.state.status = F_status_set_error(F_parameter); - if ((main->setting.flag & iki_read_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); - } - fll_program_print_error_parameter_cannot_use_with(&main->program.error, f_console_symbol_long_normal_s, f_console_symbol_long_normal_s, iki_read_long_literal_s, names[i]); return; @@ -486,10 +396,6 @@ extern "C" { if (main->program.parameters.array[ids[i]].result & f_console_result_found_e) { main->setting.state.status = F_status_set_error(F_parameter); - if ((main->setting.flag & iki_read_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); - } - fll_program_print_error_parameter_cannot_use_with(&main->program.error, f_console_symbol_long_normal_s, f_console_symbol_long_normal_s, iki_read_long_object_s, names[i]); return; @@ -502,10 +408,6 @@ extern "C" { if (main->program.parameters.array[iki_read_parameter_total_e].result & f_console_result_found_e) { main->setting.state.status = F_status_set_error(F_parameter); - if ((main->setting.flag & iki_read_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); - } - fll_program_print_error_parameter_cannot_use_with(&main->program.error, f_console_symbol_long_normal_s, f_console_symbol_long_normal_s, iki_read_long_content_s, iki_read_long_total_s); return; @@ -517,10 +419,6 @@ extern "C" { if (main->program.parameters.array[iki_read_parameter_whole_e].result & f_console_result_found_e) { main->setting.state.status = F_status_set_error(F_parameter); - if ((main->setting.flag & iki_read_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); - } - fll_program_print_error_parameter_cannot_use_with(&main->program.error, f_console_symbol_long_normal_s, f_console_symbol_long_normal_s, iki_read_long_total_s, iki_read_long_wrap_s); return; @@ -544,10 +442,6 @@ extern "C" { main->setting.state.status = f_memory_arrays_resize(main->program.parameters.remaining.used, sizeof(f_string_dynamic_t), (void **) &main->setting.files.array, &main->setting.files.used, &main->setting.files.size, &f_string_dynamics_delete_callback); if (F_status_is_error(main->setting.state.status)) { - if ((main->setting.flag & iki_read_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); - } - iki_read_print_error(&main->program.error, macro_iki_read_f(f_memory_arrays_resize)); return; @@ -562,10 +456,6 @@ extern "C" { main->setting.state.status = f_memory_array_resize(0, sizeof(f_char_t), (void **) &main->setting.files.array[main->setting.files.used].string, &main->setting.files.array[main->setting.files.used].used, &main->setting.files.array[main->setting.files.used].size); if (F_status_is_error(main->setting.state.status)) { - if ((main->setting.flag & iki_read_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); - } - iki_read_print_error(&main->program.error, macro_iki_read_f(f_memory_array_resize)); return; @@ -581,10 +471,6 @@ extern "C" { main->setting.state.status = f_file_exists(main->setting.files.array[main->setting.files.used], F_true); if (F_status_is_error(main->setting.state.status)) { - if ((main->setting.flag & iki_read_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); - } - fll_error_file_print(&main->program.error, F_status_set_fine(main->setting.state.status), macro_iki_read_f(f_file_exists), fll_error_file_flag_fallback_e, main->setting.files.array[main->setting.files.used], f_file_operation_verify_s, fll_error_file_type_file_e); return; @@ -602,10 +488,6 @@ extern "C" { if ((parameter.result & f_console_result_found_e) || parameter.values.used % 3) { main->setting.state.status = F_status_set_error(F_parameter); - if ((main->setting.flag & iki_read_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); - } - fll_program_print_error_parameter_missing_value_requires_amount(&main->program.error, f_console_symbol_long_normal_s, name, iki_read_string_three_s); return F_false; @@ -616,10 +498,6 @@ extern "C" { main->setting.state.status = f_memory_array_increase_by(parameter.values.used / 3, sizeof(f_string_triple_t), (void **) &triple->array, &triple->used, &triple->size); if (F_status_is_error(main->setting.state.status)) { - if ((main->setting.flag & iki_read_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); - } - iki_read_print_error(&main->program.error, macro_iki_read_f(f_memory_array_increase_by)); return F_false; @@ -660,10 +538,6 @@ extern "C" { } if (F_status_is_error(main->setting.state.status)) { - if ((main->setting.flag & iki_read_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); - } - iki_read_print_error(&main->program.error, macro_iki_read_f(f_memory_array_resize)); return F_false; diff --git a/level_3/iki_read/c/main/common/enumeration.h b/level_3/iki_read/c/main/common/enumeration.h index bfdd46c..ffe1b03 100644 --- a/level_3/iki_read/c/main/common/enumeration.h +++ b/level_3/iki_read/c/main/common/enumeration.h @@ -30,8 +30,6 @@ extern "C" { * - name: Selecting using a specific Vocabulary name. * - object: Print Objects. * - 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. * - replace: Using re-assignments. * - replace: Using replacements. * - substitute: Using substitutions. @@ -53,16 +51,14 @@ extern "C" { iki_read_main_flag_name_e = 0x40, iki_read_main_flag_object_e = 0x80, iki_read_main_flag_pipe_e = 0x100, - iki_read_main_flag_print_first_e = 0x200, - iki_read_main_flag_print_last_e = 0x400, - iki_read_main_flag_reassign_e = 0x800, - iki_read_main_flag_replace_e = 0x1000, - iki_read_main_flag_substitute_e = 0x2000, - iki_read_main_flag_total_e = 0x4000, - iki_read_main_flag_version_e = 0x8000, + iki_read_main_flag_reassign_e = 0x200, + iki_read_main_flag_replace_e = 0x400, + iki_read_main_flag_substitute_e = 0x800, + iki_read_main_flag_total_e = 0x1000, + iki_read_main_flag_version_e = 0x2000, iki_read_main_flag_version_copyright_help_e = 0x800c, - iki_read_main_flag_whole_e = 0x10000, - iki_read_main_flag_wrap_e = 0x20000, + iki_read_main_flag_whole_e = 0x4000, + iki_read_main_flag_wrap_e = 0x8000, }; // enum #endif // _di_iki_read_main_flag_e_ diff --git a/level_3/iki_read/c/main/iki_read.c b/level_3/iki_read/c/main/iki_read.c index 39ba8b5..d2f3b42 100644 --- a/level_3/iki_read/c/main/iki_read.c +++ b/level_3/iki_read/c/main/iki_read.c @@ -7,19 +7,7 @@ extern "C" { #ifndef _di_iki_read_main_ void iki_read_main(iki_read_main_t * const main) { - if (!main) return; - - if (F_status_is_error(main->setting.state.status)) { - if ((main->setting.flag & iki_read_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 & iki_read_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); - } + if (!main || F_status_is_error(main->setting.state.status)) return; main->setting.state.status = F_okay; @@ -34,10 +22,6 @@ extern "C" { fll_program_print_copyright(&main->program.message, fll_program_copyright_year_author_s); } - if ((main->setting.flag & iki_read_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; } @@ -161,10 +145,6 @@ extern "C" { f_file_stream_close(&file); } } - - if ((main->setting.flag & iki_read_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_iki_read_main_ diff --git a/level_3/iki_write/c/main/common.c b/level_3/iki_write/c/main/common.c index 7f27dfb..0f3fa2d 100644 --- a/level_3/iki_write/c/main/common.c +++ b/level_3/iki_write/c/main/common.c @@ -15,25 +15,7 @@ extern "C" { main->setting.state.step_small = iki_write_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 &= ~iki_write_main_flag_print_first_e; - } - else { - main->setting.flag |= iki_write_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 &= ~iki_write_main_flag_print_last_e; - } - else { - main->setting.flag |= iki_write_main_flag_print_last_e; - } - if (F_status_is_error(main->setting.state.status)) { - if ((main->setting.flag & iki_write_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); - } - iki_write_print_error(&main->program.error, macro_iki_write_f(f_console_parameter_process)); return; @@ -42,10 +24,6 @@ extern "C" { 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 & iki_write_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); - } - iki_write_print_error(&main->program.error, macro_iki_write_f(fll_program_parameter_process_context_standard)); return; @@ -54,10 +32,6 @@ extern "C" { 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 & iki_write_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); - } - iki_write_print_error(&main->program.error, macro_iki_write_f(fll_program_parameter_process_verbosity_standard)); return; @@ -96,10 +70,6 @@ extern "C" { if (main->program.parameters.array[iki_write_parameter_file_e].values.used > 1) { main->setting.state.status = F_status_set_error(F_parameter); - if ((main->setting.flag & iki_write_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); - } - fll_program_print_error_parameter_must_specify_once(&main->program.error, f_console_symbol_long_normal_s, iki_write_long_file_s); return; @@ -113,10 +83,6 @@ extern "C" { main->setting.state.status = f_file_stream_open(main->program.parameters.arguments.array[index], f_string_empty_s, &main->program.output.to); if (F_status_is_error(main->setting.state.status)) { - if ((main->setting.flag & iki_write_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); - } - fll_error_file_print(&main->program.error, F_status_set_fine(main->setting.state.status), macro_iki_write_f(f_file_stream_open), fll_error_file_flag_fallback_e, main->program.parameters.arguments.array[index], f_file_operation_open_s, fll_error_file_type_file_e); return; @@ -127,10 +93,6 @@ extern "C" { else if (main->program.parameters.array[iki_write_parameter_file_e].result & f_console_result_found_e) { main->setting.state.status = F_status_set_error(F_parameter); - if ((main->setting.flag & iki_write_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); - } - fll_program_print_error_parameter_missing_value(&main->program.error, f_console_symbol_long_normal_s, iki_write_long_file_s); return; @@ -144,10 +106,6 @@ extern "C" { main->setting.state.status = f_memory_arrays_resize(values->used, sizeof(f_string_dynamic_t), (void **) &main->setting.objects.array, &main->setting.objects.used, &main->setting.objects.size, &f_string_dynamics_delete_callback); if (F_status_is_error(main->setting.state.status)) { - if ((main->setting.flag & iki_write_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); - } - iki_write_print_error(&main->program.error, macro_iki_write_f(f_memory_arrays_resize)); return; @@ -168,10 +126,6 @@ extern "C" { else if (main->program.parameters.array[iki_write_parameter_object_e].result & f_console_result_found_e) { main->setting.state.status = F_status_set_error(F_parameter); - if ((main->setting.flag & iki_write_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); - } - fll_program_print_error_parameter_missing_value(&main->program.error, f_console_symbol_long_normal_s, iki_write_long_object_s); return; @@ -185,10 +139,6 @@ extern "C" { main->setting.state.status = f_memory_arrays_resize(values->used, sizeof(f_string_dynamic_t), (void **) &main->setting.contents.array, &main->setting.contents.used, &main->setting.contents.size, &f_string_dynamics_delete_callback); if (F_status_is_error(main->setting.state.status)) { - if ((main->setting.flag & iki_write_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); - } - iki_write_print_error(&main->program.error, macro_iki_write_f(f_memory_arrays_resize)); return; @@ -209,10 +159,6 @@ extern "C" { else if (main->program.parameters.array[iki_write_parameter_content_e].result & f_console_result_found_e) { main->setting.state.status = F_status_set_error(F_parameter); - if ((main->setting.flag & iki_write_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); - } - fll_program_print_error_parameter_missing_value(&main->program.error, f_console_symbol_long_normal_s, iki_write_long_content_s); return; @@ -221,10 +167,6 @@ extern "C" { if (!(main->program.pipe & fll_program_data_pipe_input_e) && !(main->setting.flag & (iki_write_main_flag_content_e | iki_write_parameter_object_e))) { main->setting.state.status = F_status_set_error(F_parameter); - if ((main->setting.flag & iki_write_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); - } - iki_write_print_error_main_missing(&main->program.error); return; diff --git a/level_3/iki_write/c/main/common/enumeration.h b/level_3/iki_write/c/main/common/enumeration.h index c7935a3..d26193a 100644 --- a/level_3/iki_write/c/main/common/enumeration.h +++ b/level_3/iki_write/c/main/common/enumeration.h @@ -27,9 +27,6 @@ extern "C" { * - help: Print help. * - object: The Object being written is specified. * - 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. - * - print_last: The Object being written is specified. * - version: Print version. * - version_copyright_help: A helper flag representing version, copyright, and help flag bits being set. * - wrap: Wrap the vocabulary. @@ -43,11 +40,9 @@ extern "C" { iki_write_main_flag_help_e = 0x8, iki_write_main_flag_object_e = 0x10, iki_write_main_flag_pipe_e = 0x20, - iki_write_main_flag_print_first_e = 0x40, - iki_write_main_flag_print_last_e = 0x80, - iki_write_main_flag_version_e = 0x100, - iki_write_main_flag_version_copyright_help_e = 0x10a, - iki_write_main_flag_wrap_e = 0x200, + iki_write_main_flag_version_e = 0x40, + iki_write_main_flag_version_copyright_help_e = 0x4a, + iki_write_main_flag_wrap_e = 0x80, }; // enum #endif // _di_iki_write_main_flag_e_ diff --git a/level_3/iki_write/c/main/iki_write.c b/level_3/iki_write/c/main/iki_write.c index 28e1e98..50c68fd 100644 --- a/level_3/iki_write/c/main/iki_write.c +++ b/level_3/iki_write/c/main/iki_write.c @@ -7,19 +7,7 @@ extern "C" { #ifndef _di_iki_write_main_ void iki_write_main(iki_write_main_t * const main) { - if (!main) return; - - if (F_status_is_error(main->setting.state.status)) { - if ((main->setting.flag & iki_write_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 & iki_write_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); - } + if (!main || F_status_is_error(main->setting.state.status)) return; main->setting.state.status = F_okay; @@ -34,10 +22,6 @@ extern "C" { fll_program_print_copyright(&main->program.message, fll_program_copyright_year_author_s); } - if ((main->setting.flag & iki_write_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; } @@ -208,10 +192,6 @@ extern "C" { fll_print_dynamic_raw(f_string_eol_s, main->program.output.to); } // for } - - if ((main->setting.flag & iki_write_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_iki_write_main_ diff --git a/level_3/status_code/c/main/common.c b/level_3/status_code/c/main/common.c index f65ad9b..2f15f66 100644 --- a/level_3/status_code/c/main/common.c +++ b/level_3/status_code/c/main/common.c @@ -15,25 +15,7 @@ extern "C" { main->setting.state.step_small = status_code_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 &= ~status_code_main_flag_print_first_e; - } - else { - main->setting.flag |= status_code_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 &= ~status_code_main_flag_print_last_e; - } - else { - main->setting.flag |= status_code_main_flag_print_last_e; - } - if (F_status_is_error(main->setting.state.status)) { - if ((main->setting.flag & status_code_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); - } - status_code_print_error(&main->program.error, macro_status_code_f(f_console_parameter_process)); return; @@ -42,10 +24,6 @@ extern "C" { 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 & status_code_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); - } - status_code_print_error(&main->program.error, macro_status_code_f(fll_program_parameter_process_context_standard)); return; @@ -54,10 +32,6 @@ extern "C" { 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 & status_code_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); - } - status_code_print_error(&main->program.error, macro_status_code_f(fll_program_parameter_process_verbosity_standard)); return; @@ -109,10 +83,6 @@ extern "C" { if (!(main->setting.flag & status_code_main_flag_number_e)) { main->setting.state.status = F_status_set_error(F_parameter); - if ((main->setting.flag & status_code_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); - } - status_code_print_error_cannot_error_warning_number(&main->program.error); return; @@ -122,10 +92,6 @@ extern "C" { if (main->setting.flag & status_code_main_flag_fine_e) { main->setting.state.status = F_status_set_error(F_parameter); - if ((main->setting.flag & status_code_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); - } - fll_program_print_error_parameter_cannot_use_with(&main->program.error, f_console_symbol_long_normal_s, f_console_symbol_long_normal_s, status_code_long_error_s, status_code_long_fine_s); return; @@ -134,10 +100,6 @@ extern "C" { else if (main->setting.flag & status_code_main_flag_warning_e && main->setting.flag & status_code_main_flag_fine_e) { main->setting.state.status = F_status_set_error(F_parameter); - if ((main->setting.flag & status_code_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); - } - fll_program_print_error_parameter_cannot_use_with(&main->program.error, f_console_symbol_long_normal_s, f_console_symbol_long_normal_s, status_code_long_warning_s, status_code_long_fine_s); return; @@ -146,10 +108,6 @@ extern "C" { if (main->program.parameters.remaining.used == 0 && !(main->program.pipe & fll_program_data_pipe_input_e)) { main->setting.state.status = F_status_set_error(F_parameter); - if ((main->setting.flag & status_code_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); - } - status_code_print_error_no_status_codes(&main->program.error); return; diff --git a/level_3/status_code/c/main/common/enumeration.h b/level_3/status_code/c/main/common/enumeration.h index b3bf49c7..570f0ce 100644 --- a/level_3/status_code/c/main/common/enumeration.h +++ b/level_3/status_code/c/main/common/enumeration.h @@ -29,8 +29,6 @@ extern "C" { * - help: Print help. * - number: Operate in number mode. * - 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". @@ -44,11 +42,9 @@ extern "C" { status_code_main_flag_help_e = 0x8, status_code_main_flag_number_e = 0x10, status_code_main_flag_pipe_e = 0x20, - status_code_main_flag_print_first_e = 0x40, - status_code_main_flag_print_last_e = 0x80, - status_code_main_flag_version_e = 0x100, - status_code_main_flag_version_copyright_help_e = 0x109, - status_code_main_flag_warning_e = 0x200, + status_code_main_flag_version_e = 0x40, + status_code_main_flag_version_copyright_help_e = 0x49, + status_code_main_flag_warning_e = 0x80, }; // enum #endif // _di_status_code_main_flag_e_ diff --git a/level_3/status_code/c/main/status_code.c b/level_3/status_code/c/main/status_code.c index 886ab62..3f6b3a8 100644 --- a/level_3/status_code/c/main/status_code.c +++ b/level_3/status_code/c/main/status_code.c @@ -7,19 +7,7 @@ extern "C" { #ifndef _di_status_code_main_ void status_code_main(status_code_main_t * const main) { - if (!main) return; - - if (F_status_is_error(main->setting.state.status)) { - if ((main->setting.flag & status_code_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 & status_code_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); - } + if (!main || F_status_is_error(main->setting.state.status)) return; if (!main->setting.status_string_from || !main->setting.status_string_to) { if (!main->setting.status_string_from) { @@ -30,10 +18,6 @@ extern "C" { status_code_print_error_invalid_callback(&main->program.error, macro_status_code_f(status_string_to)); } - if ((main->setting.flag & status_code_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); - } - main->setting.state.status = F_status_set_error(F_parameter); return; @@ -52,10 +36,6 @@ extern "C" { fll_program_print_copyright(&main->program.message, fll_program_copyright_year_author_s); } - if ((main->setting.flag & status_code_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; } @@ -161,10 +141,6 @@ extern "C" { 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 & status_code_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_status_code_main_ diff --git a/level_3/utf8/c/main/common.c b/level_3/utf8/c/main/common.c index e38db65..35451fa 100644 --- a/level_3/utf8/c/main/common.c +++ b/level_3/utf8/c/main/common.c @@ -15,25 +15,7 @@ extern "C" { main->setting.state.step_small = utf8_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 &= ~utf8_main_flag_print_first_e; - } - else { - main->setting.flag |= utf8_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 &= ~utf8_main_flag_print_last_e; - } - else { - main->setting.flag |= utf8_main_flag_print_last_e; - } - if (F_status_is_error(main->setting.state.status)) { - if ((main->setting.flag & utf8_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); - } - utf8_print_error(&main->program.error, macro_utf8_f(f_console_parameter_process)); return; @@ -42,10 +24,6 @@ extern "C" { 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 & utf8_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); - } - utf8_print_error(&main->program.error, macro_utf8_f(fll_program_parameter_process_context_standard)); return; @@ -54,10 +32,6 @@ extern "C" { 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 & utf8_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); - } - utf8_print_error(&main->program.error, macro_utf8_f(fll_program_parameter_process_verbosity_standard)); return; @@ -77,10 +51,6 @@ extern "C" { main->setting.state.status = f_console_parameter_prioritize_right(main->program.parameters, choices, &choice); if (F_status_is_error(main->setting.state.status)) { - if ((main->setting.flag & utf8_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); - } - utf8_print_error(&main->program.error, macro_utf8_f(f_console_parameter_prioritize_right)); return; @@ -106,10 +76,6 @@ extern "C" { main->setting.state.status = f_console_parameter_prioritize_right(main->program.parameters, choices, &choice); if (F_status_is_error(main->setting.state.status)) { - if ((main->setting.flag & utf8_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); - } - utf8_print_error(&main->program.error, macro_utf8_f(f_console_parameter_prioritize_right)); return; @@ -175,10 +141,6 @@ extern "C" { if (main->program.parameters.array[utf8_parameter_to_file_e].values.used > 1) { main->setting.state.status = F_status_set_error(F_parameter); - if ((main->setting.flag & utf8_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); - } - utf8_print_error_parameter_file_to_too_many(&main->program.error); return; @@ -190,10 +152,6 @@ extern "C" { main->setting.state.status = f_memory_array_increase_by(1, sizeof(f_string_dynamic_t), (void **) &main->setting.path_files_to.array, &main->setting.path_files_to.used, &main->setting.path_files_to.size); if (F_status_is_error(main->setting.state.status)) { - if ((main->setting.flag & utf8_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); - } - utf8_print_error(&main->program.error, macro_utf8_f(f_memory_array_increase_by)); return; @@ -204,10 +162,6 @@ extern "C" { main->setting.state.status = f_string_dynamic_append_nulless(main->program.parameters.arguments.array[main->program.parameters.array[utf8_parameter_to_file_e].values.array[0]], &main->setting.path_files_to.array[0]); if (F_status_is_error(main->setting.state.status)) { - if ((main->setting.flag & utf8_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); - } - utf8_print_error(&main->program.error, macro_utf8_f(f_string_dynamic_append_nulless)); return; @@ -218,10 +172,6 @@ extern "C" { main->setting.state.status = f_file_stream_open(main->program.parameters.arguments.array[main->program.parameters.array[utf8_parameter_to_file_e].values.array[0]], f_file_open_mode_write_append_s, &main->program.output.to); if (F_status_is_error(main->setting.state.status)) { - if ((main->setting.flag & utf8_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); - } - utf8_print_error_file(&main->program.error, macro_utf8_f(f_file_stream_open), main->program.parameters.arguments.array[main->program.parameters.array[utf8_parameter_to_file_e].values.array[0]], f_file_operation_open_s, fll_error_file_type_file_e); return; @@ -230,10 +180,6 @@ extern "C" { main->setting.flag |= utf8_main_flag_file_to_e; } else { - if ((main->setting.flag & utf8_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); - } - utf8_print_error_parameter_file_name_empty(&main->program.error, main->program.parameters.array[utf8_parameter_to_file_e].values.array[0]); main->setting.state.status = F_status_set_error(F_parameter); @@ -244,10 +190,6 @@ extern "C" { else if (main->program.parameters.array[utf8_parameter_to_file_e].result & f_console_result_found_e) { main->setting.state.status = F_status_set_error(F_parameter); - if ((main->setting.flag & utf8_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); - } - fll_program_print_error_parameter_missing_value(&main->program.error, f_console_symbol_long_normal_s, utf8_long_to_file_s); return; @@ -263,10 +205,6 @@ extern "C" { main->setting.state.status = f_memory_array_increase_by(main->program.parameters.array[utf8_parameter_from_file_e].values.used, sizeof(f_string_dynamic_t), (void **) &main->setting.path_files_from.array, &main->setting.path_files_from.used, &main->setting.path_files_from.size); if (F_status_is_error(main->setting.state.status)) { - if ((main->setting.flag & utf8_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); - } - utf8_print_error(&main->program.error, macro_utf8_f(f_memory_array_increase_by)); return; @@ -285,10 +223,6 @@ extern "C" { main->setting.state.status = f_string_dynamic_append(main->program.parameters.arguments.array[index], &main->setting.path_files_from.array[i]); if (F_status_is_error(main->setting.state.status)) { - if ((main->setting.flag & utf8_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); - } - fll_error_print(&main->program.error, F_status_set_fine(main->setting.state.status), macro_utf8_f(f_string_dynamic_append_nulless), fll_error_file_flag_fallback_e); break; @@ -304,12 +238,6 @@ extern "C" { } } else { - if (F_status_is_error_not(main->setting.state.status)) { - if ((main->setting.flag & utf8_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); - } - } - utf8_print_error_parameter_file_name_empty(&main->program.error, index); if (F_status_is_error_not(main->setting.state.status)) { @@ -325,10 +253,6 @@ extern "C" { else if (main->program.parameters.array[utf8_parameter_from_file_e].result & f_console_result_found_e) { main->setting.state.status = F_status_set_error(F_parameter); - if ((main->setting.flag & utf8_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); - } - fll_program_print_error_parameter_missing_value(&main->program.error, f_console_symbol_long_normal_s, utf8_long_from_file_s); return; @@ -343,10 +267,6 @@ extern "C" { main->setting.state.status = f_memory_array_increase_by(main->program.parameters.remaining.used, sizeof(f_string_dynamic_t), (void **) &main->setting.remaining.array, &main->setting.remaining.used, &main->setting.remaining.size); if (F_status_is_error(main->setting.state.status)) { - if ((main->setting.flag & utf8_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); - } - utf8_print_error(&main->program.error, macro_utf8_f(f_memory_array_increase_by)); return; @@ -366,10 +286,6 @@ extern "C" { if (!((main->setting.flag & (utf8_main_flag_pipe_e | utf8_main_flag_file_from_e)) || main->program.parameters.remaining.used)) { main->setting.state.status = F_status_set_error(F_parameter); - if ((main->setting.flag & utf8_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); - } - utf8_print_error_no_from(&main->program.error); return; diff --git a/level_3/utf8/c/main/common/enumeration.h b/level_3/utf8/c/main/common/enumeration.h index 3bf3822..01d9935 100644 --- a/level_3/utf8/c/main/common/enumeration.h +++ b/level_3/utf8/c/main/common/enumeration.h @@ -55,8 +55,6 @@ extern "C" { * - header: Enable printing of headers. * - 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. * - separate: Enable printing of separators. * - strip_invalid: Using strip invalid character mode. * - verify: Using verify mode. @@ -72,13 +70,11 @@ extern "C" { utf8_main_flag_header_e = 0x8, utf8_main_flag_help_e = 0x10, utf8_main_flag_pipe_e = 0x20, - utf8_main_flag_print_first_e = 0x40, - utf8_main_flag_print_last_e = 0x80, - utf8_main_flag_separate_e = 0x100, - utf8_main_flag_strip_invalid_e = 0x200, - utf8_main_flag_verify_e = 0x400, - utf8_main_flag_version_e = 0x800, - utf8_main_flag_version_copyright_help_e = 0x811, + utf8_main_flag_separate_e = 0x40, + utf8_main_flag_strip_invalid_e = 0x80, + utf8_main_flag_verify_e = 0x100, + utf8_main_flag_version_e = 0x200, + utf8_main_flag_version_copyright_help_e = 0x211, }; // enum #endif // _di_utf8_main_flag_e_ diff --git a/level_3/utf8/c/main/utf8.c b/level_3/utf8/c/main/utf8.c index 2fb3c88..11179e1 100644 --- a/level_3/utf8/c/main/utf8.c +++ b/level_3/utf8/c/main/utf8.c @@ -7,19 +7,7 @@ extern "C" { #ifndef _di_utf8_main_ void utf8_main(utf8_main_t * const main) { - if (!main) return; - - if (F_status_is_error(main->setting.state.status)) { - if ((main->setting.flag & utf8_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 & utf8_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); - } + if (!main || F_status_is_error(main->setting.state.status)) return; main->setting.state.status = F_okay; @@ -34,10 +22,6 @@ extern "C" { fll_program_print_copyright(&main->program.message, fll_program_copyright_year_author_s); } - if ((main->setting.flag & utf8_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; } @@ -155,17 +139,6 @@ extern "C" { } // for } - if ((main->setting.flag & utf8_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); - - // The last line for data is not printed under certain circumstances, but when last line is printed to screen, print an extra last line. - if (F_status_is_error_not(main->setting.state.status) && F_status_set_fine(main->setting.state.status) != F_interrupt) { - if (!(main->setting.flag & (utf8_main_flag_file_to_e | utf8_main_flag_header_e | utf8_main_flag_separate_e))) { - fll_print_dynamic_raw(f_string_eol_s, main->program.message.to); - } - } - } - if (F_status_is_error(main->setting.state.status) || main->setting.state.status == F_interrupt) return; main->setting.state.status = (main->setting.flag & utf8_main_flag_verify_e) ? valid : F_okay;