]> Kevux Git Server - controller/commitdiff
Update: Remove the ++first and ++last parameters and relating logic.
authorKevin Day <Kevin@kevux.org>
Thu, 23 May 2024 04:41:32 +0000 (23:41 -0500)
committerKevin Day <Kevin@kevux.org>
Thu, 23 May 2024 04:41:32 +0000 (23:41 -0500)
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.

install.sh
sources/c/controller/controller.c
sources/c/init/init.c
sources/c/main/common.c
sources/c/main/common/enumeration.h
sources/c/main/controller.h

index 4db64b7d7676aee8660810971f57879ecd4fbf4d..7e4db0c6ef1da27519fa99f48bc1b8580e38793c 100755 (executable)
@@ -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-2023 Kevin Day."
+  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."
+  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
 }
 
index 13aa16f018c5ef9cd5462de93f68c8ce5fe68b46..193120acad9ec6628a17255b9356a84ea8bfc71c 100644 (file)
@@ -7,19 +7,7 @@ extern "C" {
 #ifndef _di_controller_controller_main_
   void controller_controller_main(controller_main_t * const main, controller_program_t * const program) {
 
-    if (!main || !program) return;
-
-    if (F_status_is_error(main->setting.state.status)) {
-      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;
-    }
-
-    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);
-    }
+    if (!main || !program || 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 & 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;
     }
 
@@ -47,10 +31,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 & 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);
-    }
   }
 #endif // _di_controller_controller_main_
 
index ee22aca54a54e0a360f299dac68bcf4f77b57411..8c594c33bc8f84b848471f46c54bfa41163fd5fe 100644 (file)
@@ -7,19 +7,7 @@ extern "C" {
 #ifndef _di_controller_init_main_
   void controller_init_main(controller_main_t * const main, controller_program_t * const program) {
 
-    if (!main || !program) return;
-
-    if (F_status_is_error(main->setting.state.status)) {
-      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;
-    }
-
-    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);
-    }
+    if (!main || !program || 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 & 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;
     }
 
@@ -47,10 +31,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 & 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);
-    }
   }
 #endif // _di_controller_init_main_
 
index 8d81a1120fc90faa026b05ef97cf39f4f191046d..61d4ddce11deb0996b54f26f47da611b85e5d07a 100644 (file)
@@ -15,25 +15,7 @@ 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)) {
-      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);
-      }
-
       controller_main_print_error(&main->program.error, macro_controller_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 & 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);
-      }
-
       controller_main_print_error(&main->program.error, macro_controller_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 & 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);
-      }
-
       controller_main_print_error(&main->program.error, macro_controller_f(fll_program_parameter_process_verbosity_standard));
 
       return;
@@ -117,10 +91,6 @@ extern "C" {
         if (main->program.parameters.array[controller_parameter_settings_e].result & codes[index]) {
           main->setting.state.status = F_status_set_error(F_parameter);
 
-          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);
-          }
-
           fll_program_print_error_parameter_missing_value(&main->program.error, f_console_symbol_long_normal_s, strings[index]);
 
           return;
@@ -132,10 +102,6 @@ extern "C" {
     main->setting.state.status = f_string_dynamic_append(main->program.parameters.remaining.used ? args[main->program.parameters.remaining.array[0]] : controller_default_s, &program->name_entry);
 
     if (F_status_is_error(main->setting.state.status)) {
-      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);
-      }
-
       controller_main_print_error(&main->program.error, macro_controller_f(fll_program_parameter_process_verbosity_standard));
 
       return;
@@ -144,10 +110,6 @@ extern "C" {
     main->setting.state.status = f_path_current(F_false, &program->path_current);
 
     if (F_status_is_error(main->setting.state.status)) {
-      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);
-      }
-
       controller_main_print_error(&main->program.error, macro_controller_f(f_path_current));
 
       return;
@@ -165,10 +127,6 @@ extern "C" {
     }
 
     if (F_status_is_error(main->setting.state.status)) {
-      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);
-      }
-
       if (main->program.parameters.array[controller_parameter_settings_e].locations.used) {
         controller_main_print_error_file(&main->program.error, macro_controller_f(controller_path_canonical_relative), args[index], f_file_operation_verify_s, fll_error_file_type_path_e);
       }
@@ -199,10 +157,6 @@ extern "C" {
       }
 
       if (F_status_is_error(main->setting.state.status)) {
-        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);
-        }
-
         controller_main_print_error(&main->program.error, macro_controller_f(f_string_dynamic_append));
 
         return;
@@ -216,10 +170,6 @@ extern "C" {
         controller_path_canonical_relative(main, program->path_current, args[index], &program->path_cgroup);
 
         if (F_status_is_error(main->setting.state.status)) {
-          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);
-          }
-
           controller_main_print_error_file(&main->program.error, macro_controller_f(controller_path_canonical_relative), args[index], f_file_operation_verify_s, fll_error_file_type_path_e);
 
           return;
@@ -228,10 +178,6 @@ extern "C" {
         main->setting.state.status = f_string_append_assure(F_path_separator_s, 1, &program->path_cgroup);
 
         if (F_status_is_error(main->setting.state.status)) {
-          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);
-          }
-
           controller_main_print_error(&main->program.error, macro_controller_f(f_string_append_assure));
 
           return;
index 590e89772937e9eaf483f064bb4fada32ab0e7fc..345558f8a35749352153ef45266d630b0629e474 100644 (file)
@@ -29,8 +29,6 @@ extern "C" {
  *   - help:                   Print help.
  *   - interruptible:          The process is interruptible.
  *   - 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" {
     controller_main_flag_help_e                   = 0x8,
     controller_main_flag_interruptible_e          = 0x10,
     controller_main_flag_pipe_e                   = 0x20,
-    controller_main_flag_print_first_e            = 0x40,
-    controller_main_flag_print_last_e             = 0x80,
-    controller_main_flag_version_e                = 0x100,
-    controller_main_flag_version_copyright_help_e = 0x181,
-    controller_main_flag_warning_e                = 0x200,
+    controller_main_flag_version_e                = 0x40,
+    controller_main_flag_version_copyright_help_e = 0x49,
+    controller_main_flag_warning_e                = 0x80,
   }; // enum
 #endif // _di_controller_main_flag_e_
 
index 776e1baca6bb6d1b217334ba6a6a43905a8e9804..443cc5c0e74d47d375c00580c323db1eb447a824 100644 (file)
@@ -75,7 +75,6 @@
 #include <program/controller/main/common/enumeration/control.h>
 #include <program/controller/main/common/enumeration/entry.h>
 #include <program/controller/main/common/enumeration/rule.h>
-#include <program/controller/main/common/enumeration/process.h>
 #include <program/controller/main/common/enumeration/program.h>
 #include <program/controller/main/common/enumeration/thread.h>
 #include <program/controller/main/common/type/cache.h>