]> Kevux Git Server - fll/commitdiff
Progress: Continue Featureless Make, focusing on printing.
authorKevin Day <kevin@kevux.org>
Thu, 23 Feb 2023 05:07:58 +0000 (23:07 -0600)
committerKevin Day <kevin@kevux.org>
Thu, 23 Feb 2023 05:07:58 +0000 (23:07 -0600)
There is still more to go, but the printing changes is nearing the end.
Other minor clean ups in directory code.

25 files changed:
build/stand_alone/fake.settings
level_0/f_directory/c/directory.c
level_0/f_directory/c/private-directory.c
level_1/fl_print/c/print/common.h
level_3/fake/c/main/build.c
level_3/fake/c/main/build/library.c
level_3/fake/c/main/build/object.c
level_3/fake/c/main/build/objects.c
level_3/fake/c/main/build/print-error.c [new file with mode: 0644]
level_3/fake/c/main/build/print-error.h [new file with mode: 0644]
level_3/fake/c/main/build/print-verbose.c [new file with mode: 0644]
level_3/fake/c/main/build/print-verbose.h [new file with mode: 0644]
level_3/fake/c/main/build/print.c
level_3/fake/c/main/build/print.h
level_3/fake/c/main/build/program.c
level_3/fake/c/main/build/skeleton.c
level_3/fake/c/main/clean.c
level_3/fake/c/main/fake.c
level_3/fake/c/main/fake/print.c [deleted file]
level_3/fake/c/main/fake/print.h [deleted file]
level_3/fake/c/main/print.c
level_3/fake/c/main/print.h
level_3/fake/c/main/skeleton/print.c [deleted file]
level_3/fake/c/main/skeleton/print.h [deleted file]
level_3/fake/data/build/settings

index 61673a7a9f33d1fbb46f2242fa470eaf68885fad..3e6e20893ed503bf5c6c5fa0b5f2825ad7a3d741 100644 (file)
@@ -68,12 +68,11 @@ build_sources_program fll/level_2/print.c
 build_sources_program fll/level_2/program.c fll/level_2/program/common.c fll/level_2/program/print.c fll/level_2/private-program.c
 
 build_sources_program program/fake/main/build.c program/fake/main/clean.c program/fake/main/common.c program/fake/main/fake.c program/fake/main/make.c program/fake/main/print.c program/fake/main/print-error.c program/fake/main/print-warning.c program/fake/main/skeleton.c
-build_sources_program program/fake/main/build/library.c program/fake/main/build/load.c program/fake/main/build/object.c program/fake/main/build/objects.c program/fake/main/build/print.c program/fake/main/build/program.c program/fake/main/build/skeleton.c
+build_sources_program program/fake/main/build/library.c program/fake/main/build/load.c program/fake/main/build/object.c program/fake/main/build/objects.c program/fake/main/build/print.c program/fake/main/build/print-error.c program/fake/main/build/print-verbose.c program/fake/main/build/program.c program/fake/main/build/skeleton.c
 build_sources_program program/fake/main/clean/print.c
 build_sources_program program/fake/main/common/define.c program/fake/main/common/enumeration.c program/fake/main/common/print.c program/fake/main/common/string.c program/fake/main/common/type.c
-build_sources_program program/fake/main/fake/path_generate.c program/fake/main/fake/print.c
+build_sources_program program/fake/main/fake/path_generate.c
 build_sources_program program/fake/main/make/load_fakefile.c program/fake/main/make/load_parameters.c program/fake/main/make/operate_block.c program/fake/main/make/operate.c program/fake/main/make/operate_process.c program/fake/main/make/operate_process_type.c program/fake/main/make/operate_validate.c program/fake/main/make/operate_validate_type.c program/fake/main/make/print.c program/fake/main/make/print-error.c program/fake/main/make/print-verbose.c program/fake/main/make/print-warning.c
-build_sources_program program/fake/main/skeleton/print.c
 
 build_sources_program program/fake/main/main.c
 
index dea80e4d786e52a71f518fc208607929dd65e3b9..fda34764527b489d122fe7b964df66e8e5d929a4 100644 (file)
@@ -8,9 +8,7 @@ extern "C" {
 #ifndef _di_f_directory_create_
   f_status_t f_directory_create(const f_string_static_t path, const mode_t mode) {
 
-    if (!path.used) {
-      return F_data_not;
-    }
+    if (!path.used) return F_data_not;
 
     return private_f_directory_create(path, mode);
   }
@@ -19,9 +17,7 @@ extern "C" {
 #ifndef _di_f_directory_create_at_
   f_status_t f_directory_create_at(const int at_id, const f_string_static_t path, const mode_t mode) {
 
-    if (!path.used) {
-      return F_data_not;
-    }
+    if (!path.used) return F_data_not;
 
     return private_f_directory_create_at(at_id, path, mode);
   }
@@ -30,9 +26,7 @@ extern "C" {
 #ifndef _di_f_directory_exists_
   f_status_t f_directory_exists(const f_string_static_t path) {
 
-    if (!path.used) {
-      return F_data_not;
-    }
+    if (!path.used) return F_data_not;
 
     struct stat file_stat;
 
@@ -51,9 +45,7 @@ extern "C" {
       return F_status_set_error(F_file_stat);
     }
 
-    if ((file_stat.st_mode & S_IFMT) == S_IFDIR) {
-      return F_true;
-    }
+    if ((file_stat.st_mode & S_IFMT) == S_IFDIR) return F_true;
 
     return F_false;
   }
@@ -62,9 +54,7 @@ extern "C" {
 #ifndef _di_f_directory_exists_at_
   f_status_t f_directory_exists_at(const int at_id, const f_string_static_t path, const int flag) {
 
-    if (!path.used) {
-      return F_data_not;
-    }
+    if (!path.used) return F_data_not;
 
     struct stat file_stat;
 
@@ -84,9 +74,7 @@ extern "C" {
       return F_status_set_error(F_file_stat);
     }
 
-    if ((file_stat.st_mode & S_IFMT) == S_IFDIR) {
-      return F_true;
-    }
+    if ((file_stat.st_mode & S_IFMT) == S_IFDIR) return F_true;
 
     return F_false;
   }
@@ -95,9 +83,7 @@ extern "C" {
 #ifndef _di_f_directory_is_
   f_status_t f_directory_is(const f_string_static_t path) {
 
-    if (!path.used) {
-      return F_data_not;
-    }
+    if (!path.used) return F_data_not;
 
     struct stat file_stat;
 
@@ -116,9 +102,7 @@ extern "C" {
       return F_status_set_error(F_file_stat);
     }
 
-    if ((file_stat.st_mode & S_IFMT) == S_IFDIR) {
-      return F_true;
-    }
+    if ((file_stat.st_mode & S_IFMT) == S_IFDIR) return F_true;
 
     return F_false;
   }
@@ -127,9 +111,7 @@ extern "C" {
 #ifndef _di_f_directory_is_at_
   f_status_t f_directory_is_at(const int at_id, const f_string_static_t path, const int flag) {
 
-    if (!path.used) {
-      return F_data_not;
-    }
+    if (!path.used) return F_data_not;
 
     struct stat file_stat;
 
@@ -149,9 +131,7 @@ extern "C" {
       return F_status_set_error(F_file_stat);
     }
 
-    if ((file_stat.st_mode & S_IFMT) == S_IFDIR) {
-      return F_true;
-    }
+    if ((file_stat.st_mode & S_IFMT) == S_IFDIR) return F_true;
 
     return F_false;
   }
@@ -163,9 +143,7 @@ extern "C" {
       if (!names) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
 
-    if (!path.used) {
-      return F_data_not;
-    }
+    if (!path.used) return F_data_not;
 
     struct dirent **listing = 0;
     f_status_t status = F_none;
@@ -228,13 +206,8 @@ extern "C" {
       f_memory_delete(1, sizeof(struct dirent *), (void *) &listing);
     }
 
-    if (F_status_is_error(status)) {
-      return status;
-    }
-
-    if (!length) {
-      return F_directory_empty;
-    }
+    if (F_status_is_error(status)) return status;
+    if (!length) return F_directory_empty;
 
     return F_none;
   }
@@ -246,9 +219,7 @@ extern "C" {
       if (!id) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
 
-    if (!path.used) {
-      return F_data_not;
-    }
+    if (!path.used) return F_data_not;
 
     int flag = F_directory_flag_directory_d | F_directory_flag_close_execute_d | F_directory_flag_path_d;
 
@@ -287,9 +258,7 @@ extern "C" {
       if (!id) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
 
-    if (!path.used) {
-      return F_data_not;
-    }
+    if (!path.used) return F_data_not;
 
     int flag = F_directory_flag_directory_d | F_directory_flag_close_execute_d | F_directory_flag_path_d;
 
@@ -329,9 +298,7 @@ extern "C" {
       if (depth_max < 0) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
 
-    if (!path.used) {
-      return F_data_not;
-    }
+    if (!path.used) return F_data_not;
 
     int result = 0;
 
@@ -345,9 +312,7 @@ extern "C" {
     else {
 
       // Not recursively deleting and the path is requested to be preserved, so there is nothing to delete.
-      if (preserve) {
-        return F_none;
-      }
+      if (preserve) return F_none;
 
       result = remove(path.string);
     }
@@ -383,9 +348,7 @@ extern "C" {
       if (depth_max < 0) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
 
-    if (!path.used) {
-      return F_data_not;
-    }
+    if (!path.used) return F_data_not;
 
     int result = 0;
 
@@ -399,9 +362,7 @@ extern "C" {
     else {
 
       // Not recursively deleting and the path is requested to be preserved, so there is nothing to delete.
-      if (preserve) {
-        return F_none;
-      }
+      if (preserve) return F_none;
 
       result = remove(path.string);
     }
@@ -434,19 +395,14 @@ extern "C" {
 #ifndef _di_f_directory_touch_
   f_status_t f_directory_touch(const f_string_static_t path, const mode_t mode) {
 
-    if (!path.used) {
-      return F_data_not;
-    }
+    if (!path.used) return F_data_not;
 
     struct stat file_stat;
 
     memset(&file_stat, 0, sizeof(struct stat));
 
     if (stat(path.string, &file_stat) < 0) {
-      if (errno == ENOENT) {
-        return private_f_directory_create(path, mode);
-      }
-
+      if (errno == ENOENT) return private_f_directory_create(path, mode);
       if (errno == EACCES) return F_status_set_error(F_access_denied);
       if (errno == EFAULT) return F_status_set_error(F_buffer);
       if (errno == ELOOP) return F_status_set_error(F_loop);
@@ -481,9 +437,7 @@ extern "C" {
 #ifndef _di_f_directory_touch_at_
   f_status_t f_directory_touch_at(const int at_id, const f_string_static_t path, const mode_t mode, const int flag) {
 
-    if (!path.used) {
-      return F_data_not;
-    }
+    if (!path.used) return F_data_not;
 
     struct stat file_stat;
 
index a007138386e0db09e58d80c97ca50c6cba703058..218650bcc1f6b8fa6a683e82fadb7d49d74b0172 100644 (file)
@@ -61,9 +61,7 @@ extern "C" {
 #if !defined(_di_f_directory_remove_)
   int private_f_directory_remove_recursively(const char * const path, const struct stat *file_stat, int type, struct FTW *entity) {
 
-    if (!entity->level) {
-      return 0;
-    }
+    if (!entity->level) return 0;
 
     return remove(path);
   }
index ef39aad8e00f3f83030052e81350409b735a5579..fc965bec3566084bda1c8cbcbca0817f70b8d956 100644 (file)
@@ -83,7 +83,13 @@ extern "C" {
   }
 
   #define macro_fl_print_t_initialize(to, verbosity, prefix, suffix, context, notable, set) { \
-    to, verbosity, prefix, suffix, context, notable, set \
+    to, \
+    verbosity, \
+    prefix, \
+    suffix, \
+    context, \
+    notable, \
+    set, \
   }
 
   #define macro_fl_print_t_initialize_debug()               macro_fl_print_t_initialize(macro_f_file_t_initialize2(F_type_output_d, F_type_descriptor_output_d, F_file_flag_write_only_d), f_console_verbosity_normal_e, fl_print_debug_s, f_string_static_t_initialize, f_color_set_t_initialize, f_color_set_t_initialize, 0)
index 908f5a3b6813222c3711220f11cf8ad00668eb68..f161ccc2d654f8a511f555ed435a4cdf15c8ac91 100644 (file)
@@ -827,7 +827,9 @@ const f_string_static_t fake_build_documentation_files_s = macro_f_string_static
       if (data->main->message.verbosity != f_console_verbosity_quiet_e && data->main->message.verbosity != f_console_verbosity_error_e) {
         f_file_stream_lock(data->main->message.to);
 
-        fl_print_format("%r%[Building%] ", data->main->message.to, f_string_eol_s, data->main->context.set.important, data->main->context.set.important);
+        fake_print_line_first_unlocked(data->setting, data->main->message);
+
+        fl_print_format("%[Building%] ", data->main->message.to, data->main->context.set.important, data->main->context.set.important);
         fl_print_format("%[%Q%]", data->main->message.to, data->main->context.set.notable, data_build.setting.build_name, data->main->context.set.notable);
         fl_print_format("%[ using '%]", data->main->message.to, data->main->context.set.important, data->main->context.set.important);
         fl_print_format("%[%Q%]", data->main->message.to, data->main->context.set.notable, data->setting->settings, data->main->context.set.notable);
index 29f98346109952489882aaee43e888b6ab60611e..ba2109e08d471f859f5cee930f065c74ec6811d2 100644 (file)
@@ -1,5 +1,6 @@
 #include "../fake.h"
 #include "../build.h"
+#include "print.h"
 
 #ifdef __cplusplus
 extern "C" {
@@ -22,9 +23,7 @@ extern "C" {
     if (F_status_is_error(*status) || f_file_exists(file_stage, F_true) == F_true || *status == F_child) return data->main->child;
     if (!data_build->setting.build_sources_library.used && !data_build->setting.build_sources_library_shared.used) return 0;
 
-    if (data->main->message.verbosity != f_console_verbosity_quiet_e && data->main->message.verbosity != f_console_verbosity_error_e) {
-      fll_print_format("%r%[Compiling shared library.%]%r", data->main->message.to, f_string_eol_s, data->main->context.set.important, data->main->context.set.important, f_string_eol_s);
-    }
+    fake_build_print_compile_library_shared(data->setting, data->main->message);
 
     f_string_dynamics_t arguments = f_string_dynamics_t_initialize;
 
@@ -326,10 +325,10 @@ extern "C" {
 
       *status = f_file_link(parameter_file_name_major, parameter_file_path);
 
-      if (F_status_is_error_not(*status) && data->main->error.verbosity >= f_console_verbosity_verbose_e) {
-        fll_print_format("Linked file '%Q' to '%Q'.%r", data->main->message.to, parameter_file_path, parameter_file_name_major, f_string_eol_s);
+      if (F_status_is_error_not(*status)) {
+        fake_build_print_linked_file(data->setting, data->main->message, parameter_file_path, parameter_file_name_major);
       }
-      else if (F_status_is_error(*status)) {
+      else {
         if (F_status_set_fine(*status) == F_file_found) {
           fake_print_error_file(data->setting, data->main->error, *status, macro_fake_f(f_file_link), parameter_file_path, f_file_operation_link_s, fll_error_file_type_file_e);
 
@@ -357,10 +356,10 @@ extern "C" {
 
         *status = f_file_link(parameter_file_name_minor, parameter_file_path);
 
-        if (F_status_is_error_not(*status) && data->main->error.verbosity >= f_console_verbosity_verbose_e) {
-          fll_print_format("Linked file '%Q' to '%Q'.%r", data->main->message.to, parameter_file_path, parameter_file_name_minor, f_string_eol_s);
+        if (F_status_is_error_not(*status)) {
+          fake_build_print_linked_file(data->setting, data->main->message, parameter_file_path, parameter_file_name_minor);
         }
-        else if (F_status_is_error(*status)) {
+        else {
           fake_print_error_file(data->setting, data->main->error, *status, macro_fake_f(f_file_link), F_status_set_fine(*status) == F_file_found ? parameter_file_path : parameter_file_name_minor, f_file_operation_link_s, fll_error_file_type_file_e);
 
           return 0;
@@ -380,10 +379,10 @@ extern "C" {
 
           *status = f_file_link(parameter_file_name_micro, parameter_file_path);
 
-          if (F_status_is_error_not(*status) && data->main->error.verbosity >= f_console_verbosity_verbose_e) {
-            fll_print_format("Linked file '%Q' to '%Q'.%r", data->main->message.to, parameter_file_path, parameter_file_name_micro, f_string_eol_s);
+          if (F_status_is_error_not(*status)) {
+            fake_build_print_linked_file(data->setting, data->main->message, parameter_file_path, parameter_file_name_micro);
           }
-          else if (F_status_is_error(*status)) {
+          else {
             if (F_status_set_fine(*status) == F_file_found) {
               fake_print_error_file(data->setting, data->main->error, *status, macro_fake_f(f_file_link), parameter_file_path, f_file_operation_link_s, fll_error_file_type_file_e);
 
@@ -408,10 +407,10 @@ extern "C" {
 
           *status = f_file_link(parameter_file_name_nano, parameter_file_path);
 
-          if (F_status_is_error_not(*status) && data->main->error.verbosity >= f_console_verbosity_verbose_e) {
-            fll_print_format("Linked file '%Q' to '%Q'.%r", data->main->message.to, parameter_file_path, parameter_file_name_nano, f_string_eol_s);
+          if (F_status_is_error_not(*status)) {
+            fake_build_print_linked_file(data->setting, data->main->message, parameter_file_path, parameter_file_name_nano);
           }
-          else if (F_status_is_error(*status)) {
+          else {
             if (F_status_set_fine(*status) == F_file_found) {
               fake_print_error_file(data->setting, data->main->error, *status, macro_fake_f(f_file_link), parameter_file_path, f_file_operation_link_s, fll_error_file_type_file_e);
 
@@ -438,9 +437,7 @@ extern "C" {
     if (F_status_is_error(*status) || f_file_exists(file_stage, F_true) == F_true || *status == F_child) return data->main->child;
     if (!data_build->setting.build_sources_library.used && !data_build->setting.build_sources_library_static.used) return 0;
 
-    if (data->main->message.verbosity != f_console_verbosity_quiet_e && data->main->message.verbosity != f_console_verbosity_error_e) {
-      fll_print_format("%r%[Compiling static library.%]%r", data->main->message.to, f_string_eol_s, data->main->context.set.important, data->main->context.set.important, f_string_eol_s);
-    }
+    fake_build_print_compile_library_static(data->setting, data->main->message);
 
     f_string_dynamic_t file_name = f_string_dynamic_t_initialize;
     f_string_dynamic_t source_path = f_string_dynamic_t_initialize;
index d2a58c49dcd715c9a18b2b73c4087d7767605d68..d38e65426d5c043255576975e994a78146699f05 100644 (file)
@@ -1,6 +1,7 @@
 #include "../fake.h"
 #include "../build.h"
 #include "object.h"
+#include "print.h"
 
 #ifdef __cplusplus
 extern "C" {
@@ -23,9 +24,7 @@ extern "C" {
     if (F_status_is_error(*status) || f_file_exists(file_stage, F_true) == F_true || *status == F_child) return data->main->child;
     if (!data_build->setting.build_sources_object.used && !data_build->setting.build_sources_object_shared.used) return 0;
 
-    if (data->main->message.verbosity != f_console_verbosity_quiet_e && data->main->message.verbosity != f_console_verbosity_error_e) {
-      fll_print_format("%r%[Compiling shared object.%]%r", data->main->message.to, f_string_eol_s, data->main->context.set.important, data->main->context.set.important, f_string_eol_s);
-    }
+    fake_build_print_compile_object_shared(data->setting, data->main->message);
 
     f_string_dynamics_t arguments = f_string_dynamics_t_initialize;
 
@@ -94,9 +93,7 @@ extern "C" {
     if (F_status_is_error(*status) || f_file_exists(file_stage, F_true) == F_true || *status == F_child) return data->main->child;
     if (!data_build->setting.build_sources_object.used && !data_build->setting.build_sources_object_static.used) return 0;
 
-    if (data->main->message.verbosity != f_console_verbosity_quiet_e && data->main->message.verbosity != f_console_verbosity_error_e) {
-      fll_print_format("%r%[Compiling static object.%]%r", data->main->message.to, f_string_eol_s, data->main->context.set.important, data->main->context.set.important, f_string_eol_s);
-    }
+    fake_build_print_compile_object_static(data->setting, data->main->message);
 
     f_string_dynamics_t arguments = f_string_dynamics_t_initialize;
 
index c1ea63f1f6b860e6b02d8abde3a097203cae4546..ee71d0f5b47e0d374ede113af2027599ae570fa1 100644 (file)
@@ -1,6 +1,9 @@
 #include "../fake.h"
 #include "../build.h"
 #include "objects.h"
+#include "print.h"
+#include "print-error.h"
+#include "print-verbose.h"
 
 #ifdef __cplusplus
 extern "C" {
@@ -12,9 +15,7 @@ extern "C" {
     if (F_status_is_error(*status) || f_file_exists(file_stage, F_true) == F_true || *status == F_child) return data->main->child;
     if (!data_build->setting.build_sources_library.used) return 0;
 
-    if (data->main->message.verbosity != f_console_verbosity_quiet_e && data->main->message.verbosity != f_console_verbosity_error_e) {
-      fll_print_format("%r%[Compiling objects for static library.%]%r", data->main->message.to, f_string_eol_s, data->main->context.set.important, data->main->context.set.important, f_string_eol_s);
-    }
+    fake_build_print_compile_object_static_library(data->setting, data->main->message);
 
     f_string_dynamics_t arguments = f_string_dynamics_t_initialize;
 
@@ -99,15 +100,7 @@ extern "C" {
           *status = f_directory_exists(destination_path);
 
           if (*status == F_false) {
-            if (data->main->error.verbosity > f_console_verbosity_quiet_e) {
-              f_file_stream_lock(data->main->error.to);
-
-              fl_print_format("%r%[%QThe path '%]", data->main->error.to, f_string_eol_s, data->main->error.context, data->main->error.prefix, data->main->error.context);
-              fl_print_format("%[%Q%]", data->main->error.to, data->main->error.notable, destination_path, data->main->error.notable);
-              fl_print_format("%[' exists but is not a directory.%]%r", data->main->error.to, data->main->error.context, data->main->error.context, f_string_eol_s);
-
-              f_file_stream_unlock(data->main->error.to);
-            }
+            fake_build_print_error_exist_not_directory(data->setting, data->main->message, destination_path);
 
             *status = F_status_set_error(F_failure);
 
@@ -119,13 +112,7 @@ extern "C" {
 
             if (F_status_is_error(*status)) {
               if (F_status_set_fine(*status) == F_file_found_not) {
-                f_file_stream_lock(data->main->error.to);
-
-                fl_print_format("%r%[%QThe path '%]", data->main->error.to, f_string_eol_s, data->main->error.context, data->main->error.prefix, data->main->error.context);
-                fl_print_format("%[%Q%]", data->main->error.to, data->main->error.notable, destination_path, data->main->error.notable);
-                fl_print_format("%[' could not be created, a parent directory does not exist.%]%r", data->main->error.to, data->main->error.context, data->main->error.context, f_string_eol_s);
-
-                f_file_stream_unlock(data->main->error.to);
+                fake_build_print_error_cannot_create_due_to_parent(data->setting, data->main->message, destination_path);
               }
               else {
                 fake_print_error_file(data->setting, data->main->error, *status, macro_fake_f(f_directory_create), destination_path, f_file_operation_create_s, fll_error_file_type_directory_e);
@@ -134,9 +121,7 @@ extern "C" {
               break;
             }
 
-            if (data->main->error.verbosity >= f_console_verbosity_verbose_e) {
-              fll_print_format("Directory '%Q' created.%r", data->main->message.to, destination_path, f_string_eol_s);
-            }
+            fake_build_print_verbose_create_directory(data->setting, data->main->message, destination_path);
           }
 
           if (F_status_is_error(*status)) {
diff --git a/level_3/fake/c/main/build/print-error.c b/level_3/fake/c/main/build/print-error.c
new file mode 100644 (file)
index 0000000..5950a43
--- /dev/null
@@ -0,0 +1,32 @@
+#include "../fake.h"
+#include "print-verbose.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef _di_fake_build_print_error_cannot_create_due_to_parent_
+  f_status_t fake_build_print_error_cannot_create_due_to_parent(fake_setting_t * const setting, const fl_print_t print, const f_string_static_t path) {
+
+    if (!setting || print.verbosity < f_console_verbosity_error_e) return F_output_not;
+
+    fake_print_context_wrapped_variable(setting, print, "The path ", path, " could not be created, a parent directory is invalid or does not exist");
+
+    return F_none;
+  }
+#endif // _di_fake_build_print_error_cannot_create_due_to_parent_
+
+#ifndef _di_fake_build_print_error_exist_not_directory_
+  f_status_t fake_build_print_error_exist_not_directory(fake_setting_t * const setting, const fl_print_t print, const f_string_static_t path) {
+
+    if (!setting || print.verbosity < f_console_verbosity_error_e) return F_output_not;
+
+    fake_print_context_wrapped_variable(setting, print, "The path ", path, " exists but is not a directory");
+
+    return F_none;
+  }
+#endif // _di_fake_build_print_error_exist_not_directory_
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_3/fake/c/main/build/print-error.h b/level_3/fake/c/main/build/print-error.h
new file mode 100644 (file)
index 0000000..a1903fe
--- /dev/null
@@ -0,0 +1,63 @@
+/**
+ * FLL - Level 3
+ *
+ * Project: Featureless Make
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ */
+#ifndef _PRIVATE_build_print_error_h
+#define _PRIVATE_build_print_error_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * Print error message about not creating path due to a parent directory not existing or is otherwise invalid.
+ *
+ * @param setting
+ *   The main program settings.
+ *
+ *   This does not alter setting.status.
+ * @param print
+ *   Designates the how and where to print.
+ * @param path
+ *   The path that cannot be created.
+ *
+ * @return
+ *   F_none on success.
+ *   F_output_not on success, but no printing is performed.
+ *
+ * @see fake_print_context_wrapped_variable()
+ */
+#ifndef _di_fake_build_print_error_cannot_create_due_to_parent_
+  extern f_status_t fake_build_print_error_cannot_create_due_to_parent(fake_setting_t * const setting, const fl_print_t print, const f_string_static_t path);
+#endif // _di_fake_build_print_error_cannot_create_due_to_parent_
+
+/**
+ * Print error message about not creating path due to a parent directory not existing or is otherwise invalid.
+ *
+ * @param setting
+ *   The main program settings.
+ *
+ *   This does not alter setting.status.
+ * @param print
+ *   Designates the how and where to print.
+ * @param path
+ *   The path that cannot be created.
+ *
+ * @return
+ *   F_none on success.
+ *   F_output_not on success, but no printing is performed.
+ *
+ * @see fake_print_context_wrapped_variable()
+ */
+#ifndef _di_fake_build_print_error_exist_not_directory_
+  extern f_status_t fake_build_print_error_exist_not_directory(fake_setting_t * const setting, const fl_print_t print, const f_string_static_t path);
+#endif // _di_fake_build_print_error_exist_not_directory_
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _PRIVATE_build_print_error_h
diff --git a/level_3/fake/c/main/build/print-verbose.c b/level_3/fake/c/main/build/print-verbose.c
new file mode 100644 (file)
index 0000000..9228afe
--- /dev/null
@@ -0,0 +1,21 @@
+#include "../fake.h"
+#include "print-verbose.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef _di_fake_build_print_verbose_create_directory_
+  f_status_t fake_build_print_verbose_create_directory(fake_setting_t * const setting, const fl_print_t print, const f_string_static_t directory) {
+
+    if (!setting || print.verbosity < f_console_verbosity_verbose_e) return F_output_not;
+
+    fake_print_simple_variable(setting, print, "Created directory ", directory);
+
+    return F_none;
+  }
+#endif // _di_fake_build_print_verbose_create_directory_
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
diff --git a/level_3/fake/c/main/build/print-verbose.h b/level_3/fake/c/main/build/print-verbose.h
new file mode 100644 (file)
index 0000000..1acdf10
--- /dev/null
@@ -0,0 +1,41 @@
+/**
+ * FLL - Level 3
+ *
+ * Project: Featureless Make
+ * API Version: 0.7
+ * Licenses: lgpl-2.1-or-later
+ */
+#ifndef _PRIVATE_build_print_verbose_h
+#define _PRIVATE_build_print_verbose_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * Print verbose message about creating a directory.
+ *
+ * @param setting
+ *   The main program settings.
+ *
+ *   This does not alter setting.status.
+ * @param print
+ *   Designates the how and where to print.
+ * @param directory
+ *   The directory created.
+ *
+ * @return
+ *   F_none on success.
+ *   F_output_not on success, but no printing is performed.
+ *
+ * @see fake_print_simple()
+ */
+#ifndef _di_fake_build_print_verbose_create_directory_
+  extern f_status_t fake_build_print_verbose_create_directory(fake_setting_t * const setting, const fl_print_t print, const f_string_static_t directory);
+#endif // _di_fake_build_print_verbose_create_directory_
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _PRIVATE_build_print_verbose_h
index 9dcac6e209145e43fcf6aa2c4504b382bd96612f..ad975ecf25c587ba3ded84792027d5d2ebb5126b 100644 (file)
@@ -5,6 +5,105 @@
 extern "C" {
 #endif
 
+#ifndef _di_fake_build_print_compile_library_shared_
+  f_status_t fake_build_print_compile_library_shared(fake_setting_t * const setting, const fl_print_t print) {
+
+    if (!setting || print.verbosity < f_console_verbosity_normal_e) return F_output_not;
+
+    fake_print_important_simple(setting, print, "Compiling shared library");
+
+    return F_none;
+  }
+#endif // _di_fake_build_print_compile_library_shared_
+
+#ifndef _di_fake_build_print_compile_library_static_
+  f_status_t fake_build_print_compile_library_static(fake_setting_t * const setting, const fl_print_t print) {
+
+    if (!setting || print.verbosity < f_console_verbosity_normal_e) return F_output_not;
+
+    fake_print_important_simple(setting, print, "Compiling static library");
+
+    return F_none;
+  }
+#endif // _di_fake_build_print_compile_library_static_
+
+#ifndef _di_fake_build_print_compile_object_shared_
+  f_status_t fake_build_print_compile_object_shared(fake_setting_t * const setting, const fl_print_t print) {
+
+    if (!setting || print.verbosity < f_console_verbosity_normal_e) return F_output_not;
+
+    fake_print_important_simple(setting, print, "Compiling shared object");
+
+    return F_none;
+  }
+#endif // _di_fake_build_print_compile_object_shared_
+
+#ifndef _di_fake_build_print_compile_object_static_
+  f_status_t fake_build_print_compile_object_static(fake_setting_t * const setting, const fl_print_t print) {
+
+    if (!setting || print.verbosity < f_console_verbosity_normal_e) return F_output_not;
+
+    fake_print_important_simple(setting, print, "Compiling static object");
+
+    return F_none;
+  }
+#endif // _di_fake_build_print_compile_object_static_
+
+#ifndef _di_fake_build_print_compile_object_static_library_
+  f_status_t fake_build_print_compile_object_static_library(fake_setting_t * const setting, const fl_print_t print) {
+
+    if (!setting || print.verbosity < f_console_verbosity_normal_e) return F_output_not;
+
+    fake_print_important_simple(setting, print, "Compiling objects for static library");
+
+    return F_none;
+  }
+#endif // _di_fake_build_print_compile_object_static_library_
+
+#ifndef _di_fake_build_print_compile_program_shared_
+  f_status_t fake_build_print_compile_program_shared(fake_setting_t * const setting, const fl_print_t print) {
+
+    if (!setting || print.verbosity < f_console_verbosity_normal_e) return F_output_not;
+
+    fake_print_important_simple(setting, print, "Compiling shared program");
+
+    return F_none;
+  }
+#endif // _di_fake_build_print_compile_program_shared_
+
+#ifndef _di_fake_build_print_compile_program_static_
+  f_status_t fake_build_print_compile_program_static(fake_setting_t * const setting, const fl_print_t print) {
+
+    if (!setting || print.verbosity < f_console_verbosity_normal_e) return F_output_not;
+
+    fake_print_important_simple(setting, print, "Compiling static program");
+
+    return F_none;
+  }
+#endif // _di_fake_build_print_compile_program_static_
+
+#ifndef _di_fake_build_print_linked_file_
+  f_status_t fake_build_print_linked_file(fake_setting_t * const setting, const fl_print_t print, const f_string_static_t from, const f_string_static_t to) {
+
+    if (!setting || print.verbosity < f_console_verbosity_normal_e) return F_output_not;
+
+    fake_print_wrapped_variables(setting, print, "Linked file ", from, " to ", to, 0);
+
+    return F_none;
+  }
+#endif // _di_fake_build_print_linked_file_
+
+#ifndef _di_fake_build_print_skeleton_build_base_
+  f_status_t fake_build_print_skeleton_build_base(fake_setting_t * const setting, const fl_print_t print) {
+
+    if (!setting || print.verbosity < f_console_verbosity_normal_e) return F_output_not;
+
+    fake_print_important_simple(setting, print, "Creating base build directories");
+
+    return F_none;
+  }
+#endif // _di_fake_build_print_skeleton_build_base_
+
 #ifdef __cplusplus
 } // extern "C"
 #endif
index 779a1a08f3b6371b69ca588d0dd0eecd8e5342cb..11b2ce440134a0c495e3f7971049f38abc0cde33 100644 (file)
 extern "C" {
 #endif
 
+/**
+ * Print message when compiling a shared library.
+ *
+ * @param setting
+ *   The main program settings.
+ *
+ *   This does not alter setting.status.
+ * @param print
+ *   Designates the how and where to print.
+ *
+ * @return
+ *   F_none on success.
+ *   F_output_not on success, but no printing is performed.
+ *
+ * @see fake_print_important_simple()
+ */
+#ifndef _di_fake_build_print_compile_library_shared_
+  extern f_status_t fake_build_print_compile_library_shared(fake_setting_t * const setting, const fl_print_t print);
+#endif // _di_fake_build_print_compile_library_shared_
+
+/**
+ * Print message when compiling a static library.
+ *
+ * @param setting
+ *   The main program settings.
+ *
+ *   This does not alter setting.status.
+ * @param print
+ *   Designates the how and where to print.
+ *
+ * @return
+ *   F_none on success.
+ *   F_output_not on success, but no printing is performed.
+ *
+ * @see fake_print_important_simple()
+ */
+#ifndef _di_fake_build_print_compile_library_static_
+  extern f_status_t fake_build_print_compile_library_static(fake_setting_t * const setting, const fl_print_t print);
+#endif // _di_fake_build_print_compile_library_static_
+
+/**
+ * Print message when compiling a shared object.
+ *
+ * @param setting
+ *   The main program settings.
+ *
+ *   This does not alter setting.status.
+ * @param print
+ *   Designates the how and where to print.
+ *
+ * @return
+ *   F_none on success.
+ *   F_output_not on success, but no printing is performed.
+ *
+ * @see fake_print_important_simple()
+ */
+#ifndef _di_fake_build_print_compile_object_shared_
+  extern f_status_t fake_build_print_compile_object_shared(fake_setting_t * const setting, const fl_print_t print);
+#endif // _di_fake_build_print_compile_object_shared_
+
+/**
+ * Print message when compiling a static object.
+ *
+ * @param setting
+ *   The main program settings.
+ *
+ *   This does not alter setting.status.
+ * @param print
+ *   Designates the how and where to print.
+ *
+ * @return
+ *   F_none on success.
+ *   F_output_not on success, but no printing is performed.
+ *
+ * @see fake_print_important_simple()
+ */
+#ifndef _di_fake_build_print_compile_object_static_
+  extern f_status_t fake_build_print_compile_object_static(fake_setting_t * const setting, const fl_print_t print);
+#endif // _di_fake_build_print_compile_object_static_
+
+/**
+ * Print message when compiling a static object for a library.
+ *
+ * @param setting
+ *   The main program settings.
+ *
+ *   This does not alter setting.status.
+ * @param print
+ *   Designates the how and where to print.
+ *
+ * @return
+ *   F_none on success.
+ *   F_output_not on success, but no printing is performed.
+ *
+ * @see fake_print_important_simple()
+ */
+#ifndef _di_fake_build_print_compile_object_static_library_
+  extern f_status_t fake_build_print_compile_object_static_library(fake_setting_t * const setting, const fl_print_t print);
+#endif // _di_fake_build_print_compile_object_static_library_
+
+/**
+ * Print message when compiling a shared program.
+ *
+ * @param setting
+ *   The main program settings.
+ *
+ *   This does not alter setting.status.
+ * @param print
+ *   Designates the how and where to print.
+ *
+ * @return
+ *   F_none on success.
+ *   F_output_not on success, but no printing is performed.
+ *
+ * @see fake_print_important_simple()
+ */
+#ifndef _di_fake_build_print_compile_program_shared_
+  extern f_status_t fake_build_print_compile_program_shared(fake_setting_t * const setting, const fl_print_t print);
+#endif // _di_fake_build_print_compile_program_shared_
+
+/**
+ * Print message when compiling a static program.
+ *
+ * @param setting
+ *   The main program settings.
+ *
+ *   This does not alter setting.status.
+ * @param print
+ *   Designates the how and where to print.
+ *
+ * @return
+ *   F_none on success.
+ *   F_output_not on success, but no printing is performed.
+ *
+ * @see fake_print_important_simple()
+ */
+#ifndef _di_fake_build_print_compile_program_static_
+  extern f_status_t fake_build_print_compile_program_static(fake_setting_t * const setting, const fl_print_t print);
+#endif // _di_fake_build_print_compile_program_static_
+
+/**
+ * Print message when compiling a shared library.
+ *
+ * @param setting
+ *   The main program settings.
+ *
+ *   This does not alter setting.status.
+ * @param print
+ *   Designates the how and where to print.
+ * @param from
+ *   The link source.
+ * @param to
+ *   The link destination.
+ *
+ * @return
+ *   F_none on success.
+ *   F_output_not on success, but no printing is performed.
+ *
+ * @see fake_print_wrapped_variables()
+ */
+#ifndef _di_fake_build_print_linked_file_
+  extern f_status_t fake_build_print_linked_file(fake_setting_t * const setting, const fl_print_t print, const f_string_static_t from, const f_string_static_t to);
+#endif // _di_fake_build_print_linked_file_
+
+/**
+ * Print message when building base skeleton directories.
+ *
+ * @param setting
+ *   The main program settings.
+ *
+ *   This does not alter setting.status.
+ * @param print
+ *   Designates the how and where to print.
+ *
+ * @return
+ *   F_none on success.
+ *   F_output_not on success, but no printing is performed.
+ *
+ * @see fake_print_important_simple()
+ */
+#ifndef _di_fake_build_print_skeleton_build_base_
+  extern f_status_t fake_build_print_skeleton_build_base(fake_setting_t * const setting, const fl_print_t print);
+#endif // _di_fake_build_print_skeleton_build_base_
+
 #ifdef __cplusplus
 } // extern "C"
 #endif
index 7507fa127dec1fd9f54eb5b7abceb21d614711ad..11d2b4d0990ecfd18b0a646b0b9cd377e848dbe7 100644 (file)
@@ -1,6 +1,7 @@
 #include "../fake.h"
 #include "../build.h"
 #include "program.h"
+#include "print.h"
 
 #ifdef __cplusplus
 extern "C" {
@@ -23,9 +24,7 @@ extern "C" {
     if (F_status_is_error(*status) || f_file_exists(file_stage, F_true) == F_true || *status == F_child) return data->main->child;
     if (!data_build->setting.build_sources_program.used && !data_build->setting.build_sources_program_shared.used) return 0;
 
-    if (data->main->message.verbosity != f_console_verbosity_quiet_e && data->main->message.verbosity != f_console_verbosity_error_e) {
-      fll_print_format("%r%[Compiling shared program.%]%r", data->main->message.to, f_string_eol_s, data->main->context.set.important, data->main->context.set.important, f_string_eol_s);
-    }
+    fake_build_print_compile_program_shared(data->setting, data->main->message);
 
     f_string_dynamics_t arguments = f_string_dynamics_t_initialize;
 
@@ -117,9 +116,7 @@ extern "C" {
     if (F_status_is_error(*status) || f_file_exists(file_stage, F_true) == F_true || *status == F_child) return data->main->child;
     if (!data_build->setting.build_sources_program.used && !data_build->setting.build_sources_program_static.used) return 0;
 
-    if (data->main->message.verbosity != f_console_verbosity_quiet_e && data->main->message.verbosity != f_console_verbosity_error_e) {
-      fll_print_format("%r%[Compiling static program.%]%r", data->main->message.to, f_string_eol_s, data->main->context.set.important, data->main->context.set.important, f_string_eol_s);
-    }
+    fake_build_print_compile_program_static(data->setting, data->main->message);
 
     f_string_dynamics_t arguments = f_string_dynamics_t_initialize;
 
index 54b1925fd5976840a35f637f7559616dcb224474..19275732f5abb4a726d7c46d7265718f32a10c30 100644 (file)
@@ -1,6 +1,8 @@
 #include "../fake.h"
 #include "../build.h"
 #include "skeleton.h"
+#include "print.h"
+#include "print-verbose.h"
 
 #ifdef __cplusplus
 extern "C" {
@@ -49,9 +51,7 @@ extern "C" {
       path_headers,
     };
 
-    if (data->main->message.verbosity != f_console_verbosity_quiet_e && data->main->message.verbosity != f_console_verbosity_error_e) {
-      fll_print_format("%r%[Creating base build directories.%]%r", data->main->message.to, f_string_eol_s, data->main->context.set.important, data->main->context.set.important, f_string_eol_s);
-    }
+    fake_build_print_skeleton_build_base(data->setting, data->main->message);
 
     bool created = F_false;
     f_array_length_t j = 0;
@@ -111,8 +111,8 @@ extern "C" {
         return;
       }
 
-      if (created && data->main->error.verbosity >= f_console_verbosity_verbose_e) {
-        fll_print_format("Created directory '%Q'.%r", data->main->message.to, directorys[i], f_string_eol_s);
+      if (created) {
+        fake_build_print_verbose_create_directory(data->setting, data->main->message, directorys[i]);
       }
     } // for
 
index 5edac3d56fa918e2ece5a6a65659b3740f870e3d..7ffed9687d164811c1ee7a1bebf6f59fcb0a392e 100644 (file)
@@ -11,7 +11,9 @@ extern "C" {
     if (data->main->message.verbosity != f_console_verbosity_quiet_e && data->main->message.verbosity != f_console_verbosity_error_e) {
       f_file_stream_lock(data->main->message.to);
 
-      fl_print_format("%r%[Deleting all files within build directory '%]", data->main->message.to, f_string_eol_s, data->main->context.set.important, data->main->context.set.important);
+      fake_print_line_first_unlocked(data->setting, data->main->message);
+
+      fl_print_format("%[Deleting all files within build directory '%]", data->main->message.to, data->main->context.set.important, data->main->context.set.important);
       fl_print_format("%[%Q%]", data->main->message.to, data->main->context.set.notable, data->setting->build, data->main->context.set.notable);
       fl_print_format("%['.%]%r", data->main->message.to, data->main->context.set.important, data->main->context.set.important, f_string_eol_s);
 
index 0ff025bb6e51a78f45ddd66a7d3a8488cc8e82a7..24491ff39534e3b2fc1906886217e0fba103a793 100644 (file)
@@ -284,7 +284,9 @@ extern "C" {
         if (data->main->error.verbosity > f_console_verbosity_quiet_e) {
           f_file_stream_lock(data->main->error.to);
 
-          fl_print_format("%r%[%QFailed to find program '%]", data->main->error.to, f_string_eol_s, data->main->error.context, data->main->error.prefix, data->main->error.context);
+          fake_print_line_first_unlocked(data->setting, data->main->error);
+
+          fl_print_format("%[%QFailed to find program '%]", data->main->error.to, data->main->error.context, data->main->error.prefix, data->main->error.context);
           fl_print_format("%[%Q%]", data->main->error.to, data->main->error.notable, program, data->main->error.notable);
           fl_print_format("%[' for executing.%]%r", data->main->error.to, data->main->error.context, data->main->error.context, f_string_eol_s);
 
@@ -513,7 +515,9 @@ extern "C" {
       else if (requireds[i] == F_true) {
         f_file_stream_lock(data->main->error.to);
 
-        fl_print_format("%r%[%QNo valid path for the (required) directory parameter '%]", data->main->error.to, f_string_eol_s, data->main->error.context, data->main->error.prefix, data->main->error.context);
+        fake_print_line_first_unlocked(data->setting, data->main->error);
+
+        fl_print_format("%[%QNo valid path for the (required) directory parameter '%]", data->main->error.to, data->main->error.context, data->main->error.prefix, data->main->error.context);
         fl_print_format("%[%r%r%]", data->main->error.to, data->main->error.notable, f_console_symbol_long_normal_s, names[i], data->main->error.notable);
         fl_print_format("%[' was found.%]%r", data->main->error.to, data->main->error.context, data->main->error.context, f_string_eol_s);
 
diff --git a/level_3/fake/c/main/fake/print.c b/level_3/fake/c/main/fake/print.c
deleted file mode 100644 (file)
index 9dcac6e..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-#include "../fake.h"
-#include "print.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_3/fake/c/main/fake/print.h b/level_3/fake/c/main/fake/print.h
deleted file mode 100644 (file)
index bf45bcc..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-/**
- * FLL - Level 3
- *
- * Project: Featureless Make
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- *
- * Provides the print functionality for the fake program.
- *
- * This is to be specifically included by the fake program sources and not anywhere else.
- */
-#ifndef _fake_fake_print_h
-#define _fake_fake_print_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
-
-#endif // _fake_fake_print_h
index 446ed9c61403ff6a11042a9b163756fdd409f615..10672b2d45c235e3f13760d03221d45ffdbfb62d 100644 (file)
@@ -169,14 +169,19 @@ extern "C" {
   }
 #endif // _di_fake_print_help_
 
+#ifndef _di_fake_print_important_simple_
+  void fake_print_important_simple(fake_setting_t * const setting, const fl_print_t print, const f_string_t message) {
+
+    const fl_print_t custom = macro_fl_print_t_initialize(print.to, print.verbosity, f_string_empty_s, f_string_empty_s, print.set->important, print.set->notable, print.set);
+
+    fake_print_context_simple(setting, custom, message);
+  }
+#endif // _di_fake_print_important_simple_
+
 #ifndef _di_fake_print_line_first_locked_
   f_status_t fake_print_line_first_locked(fake_setting_t * const setting, const fl_print_t print) {
 
-    if (!setting || print.verbosity < f_console_verbosity_error_e) return F_output_not;
-
-    if (F_status_is_error_not(setting->status)) {
-      if (print.verbosity < f_console_verbosity_normal_e) return F_output_not;
-    }
+    if (!setting) return F_output_not;
 
     if (setting->flag & fake_main_flag_print_first_e) {
       fll_print_dynamic_raw(setting->line_first, print.to);
@@ -194,11 +199,7 @@ extern "C" {
 #ifndef _di_fake_print_line_first_unlocked_
   f_status_t fake_print_line_first_unlocked(fake_setting_t * const setting, const fl_print_t print) {
 
-    if (!setting || print.verbosity < f_console_verbosity_error_e) return F_output_not;
-
-    if (F_status_is_error_not(setting->status)) {
-      if (print.verbosity < f_console_verbosity_normal_e) return F_output_not;
-    }
+    if (!setting) return F_output_not;
 
     if (setting->flag & fake_main_flag_print_first_e) {
       fll_print_dynamic_raw(setting->line_first, print.to);
@@ -216,11 +217,7 @@ extern "C" {
 #ifndef _di_fake_print_line_last_locked_
   f_status_t fake_print_line_last_locked(fake_setting_t * const setting, const fl_print_t print) {
 
-    if (!setting || print.verbosity < f_console_verbosity_error_e) return F_output_not;
-
-    if (F_status_is_error_not(setting->status)) {
-      if (print.verbosity < f_console_verbosity_normal_e) return F_output_not;
-    }
+    if (!setting) return F_output_not;
 
     fll_print_dynamic_raw(setting->line_last, print.to);
 
@@ -231,11 +228,7 @@ extern "C" {
 #ifndef _di_fake_print_line_last_unlocked_
   f_status_t fake_print_line_last_unlocked(fake_setting_t * const setting, const fl_print_t print) {
 
-    if (!setting || print.verbosity < f_console_verbosity_error_e) return F_output_not;
-
-    if (F_status_is_error_not(setting->status)) {
-      if (print.verbosity < f_console_verbosity_normal_e) return F_output_not;
-    }
+    if (!setting) return F_output_not;
 
     f_print_dynamic_raw(setting->line_last, print.to);
 
@@ -315,7 +308,7 @@ extern "C" {
 
     fake_print_line_first_unlocked(setting, print);
 
-    fll_print_format("%S '%[%Q%]'.%r", print.to, message, print.set->notable, variable, print.set->notable, f_string_eol_s);
+    fll_print_format("%S'%[%Q%]'.%r", print.to, message, print.set->notable, variable, print.set->notable, f_string_eol_s);
 
     f_file_stream_unlock(print.to);
   }
@@ -334,6 +327,25 @@ extern "C" {
   }
 #endif // _di_fake_print_wrapped_variable_
 
+#ifndef _di_fake_print_wrapped_variables_
+  void fake_print_wrapped_variables(fake_setting_t * const setting, const fl_print_t print, const f_string_t before, const f_string_static_t first, const f_string_t between, const f_string_static_t second, const f_string_t after) {
+
+    if (!setting) return;
+
+    f_file_stream_lock(print.to);
+
+    fake_print_line_first_unlocked(setting, print);
+
+    fl_print_format("%S'", print.to, before);
+    fl_print_format("%[%Q%]", print.to, print.notable, first, print.notable);
+    fl_print_format("'%S'", print.to, between);
+    fl_print_format("%[%Q%]", print.to, print.notable, second, print.notable);
+    fl_print_format("'%S.%r", print.to, after, f_string_eol_s);
+
+    f_file_stream_unlock(print.to);
+  }
+#endif // _di_fake_print_wrapped_variables_
+
 #ifdef __cplusplus
 } // extern "C"
 #endif
index cf19ccac69f4e603f2d9eb23c92a9b2bb4a7c3c1..8712eebc88d9b7b96fff51b47b2f91b60ee524ff 100644 (file)
@@ -15,8 +15,8 @@ extern "C" {
 /**
  * Print a simple context message with prefix and a single string message.
  *
- * This is primarily used by numerous error print functions to reduce code.
- * This is not used for any error print functions that has complex format structures.
+ * This is primarily used by numerous print functions to reduce code.
+ * This is not used for any print functions that has complex format structures.
  *
  * @param setting
  *   The main program settings.
@@ -41,8 +41,8 @@ extern "C" {
 /**
  * Print a variable context message with a before string, an after string, and a string variable.
  *
- * This is primarily used by numerous context print functions to reduce code.
- * This is not used for any context print functions that has complex format structures.
+ * This is primarily used by numerous print functions to reduce code.
+ * This is not used for any print functions that has complex format structures.
  *
  * @param setting
  *   The main program settings.
@@ -75,8 +75,8 @@ extern "C" {
 /**
  * Print a parameter context message with a before string, an after string, a string symbol, and a parameter name.
  *
- * This is primarily used by numerous context print functions to reduce code.
- * This is not used for any context print functions that has complex format structures.
+ * This is primarily used by numerous print functions to reduce code.
+ * This is not used for any print functions that has complex format structures.
  *
  * @param setting
  *   The main program settings.
@@ -113,8 +113,8 @@ extern "C" {
 /**
  * Print a wrapped context message with a before string, an after string, and a string variable.
  *
- * This is primarily used by numerous context print functions to reduce code.
- * This is not used for any context print functions that has complex format structures.
+ * This is primarily used by numerous print functions to reduce code.
+ * This is not used for any print functions that has complex format structures.
  *
  * @param setting
  *   The main program settings.
@@ -147,8 +147,8 @@ extern "C" {
 /**
  * Print a wrapped context message with a before string, a middle strng, an after string, and two string variables.
  *
- * This is primarily used by numerous context print functions to reduce code.
- * This is not used for any context print functions that has more format structures.
+ * This is primarily used by numerous print functions to reduce code.
+ * This is not used for any print functions that has complex format structures.
  *
  * @param setting
  *   The main program settings.
@@ -200,6 +200,28 @@ extern "C" {
 #endif // _di_fake_print_help_
 
 /**
+ * Print a simple message with context set to important but without prefix and suffix.
+ *
+ * This is primarily used by numerous print functions to reduce code.
+ * This is not used for any print functions that has complex format structures.
+ *
+ * @param setting
+ *   The main program settings.
+ *   (Must be of type fake_setting_t.)
+ *
+ *   This does not alter setting.status.
+ * @param print
+ *   The output structure to print to.
+ * @param message
+ *   The string to print.
+ *
+ * @see fake_print_context_simple()
+ */
+#ifndef _di_fake_print_important_simple_
+  extern void fake_print_important_simple(fake_setting_t * const setting, const fl_print_t print, const f_string_t message);
+#endif // _di_fake_print_important_simple_
+
+/**
  * Print first new line, unless verbosity says otherwise.
  *
  * This is generally either the first line in the program or the first line printed before an error message.
@@ -399,6 +421,43 @@ extern "C" {
   extern void fake_print_wrapped_variable(fake_setting_t * const setting, const fl_print_t print, const f_string_t before, const f_string_static_t variable, const f_string_t after);
 #endif // _di_fake_print_wrapped_variable_
 
+/**
+ * Print a wrapped message with a before string, a middle strng, an after string, and two string variables.
+ *
+ * This is primarily used by numerous print functions to reduce code.
+ * This is not used for any print functions that has complex format structures.
+ *
+ * @param setting
+ *   The main program settings.
+ *   (Must be of type fake_setting_t.)
+ *
+ *   This does not alter setting.status.
+ * @param print
+ *   The output structure to print to.
+ * @param before
+ *   The string being printed before the variable.
+ *   Likely should have a space added at the end of the string.
+ * @param first
+ *   The string representing the first variable.
+ * @param between
+ *   The string being printed before the variable.
+ *   Likely should have a space added at the start and end of the string.
+ * @param second
+ *   The string representing the second variable.
+ * @param after
+ *   The string being printed after the variable.
+ *   Likely should have a space added at the start of the string.
+ *
+ * @see f_file_stream_lock()
+ * @see f_file_stream_unlock()
+ * @see fl_print_format()
+ *
+ * @see fake_print_line_first_unlocked()
+ */
+#ifndef _di_fake_print_wrapped_variables_
+  extern void fake_print_wrapped_variables(fake_setting_t * const setting, const fl_print_t print, const f_string_t before, const f_string_static_t first, const f_string_t between, const f_string_static_t second, const f_string_t after);
+#endif // _di_fake_print_wrapped_variables_
+
 #ifdef __cplusplus
 } // extern "C"
 #endif
diff --git a/level_3/fake/c/main/skeleton/print.c b/level_3/fake/c/main/skeleton/print.c
deleted file mode 100644 (file)
index 9dcac6e..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-#include "../fake.h"
-#include "print.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
diff --git a/level_3/fake/c/main/skeleton/print.h b/level_3/fake/c/main/skeleton/print.h
deleted file mode 100644 (file)
index 66c9d2c..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-/**
- * FLL - Level 3
- *
- * Project: Featureless Make
- * API Version: 0.7
- * Licenses: lgpl-2.1-or-later
- */
-#ifndef _PRIVATE_skeleton_print_h
-#define _PRIVATE_skeleton_print_h
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
-
-#endif // _PRIVATE_skeleton_print_h
index 564be7da6e4ee1314d7009436d74d406ff13a1aa..ebfcf378b7ec4980631db7c8c225dcca71fd2296 100644 (file)
@@ -28,22 +28,20 @@ build_libraries-level -lfll_2 -lfll_1 -lfll_0
 build_libraries-monolithic -lfll
 
 build_sources_library main/build.c main/clean.c main/common.c main/fake.c main/make.c main/print.c main/print-error.c main/print-warning.c main/skeleton.c
-build_sources_library main/build/library.c main/build/load.c main/build/object.c main/build/objects.c main/build/print.c main/build/program.c main/build/skeleton.c
+build_sources_library main/build/library.c main/build/load.c main/build/object.c main/build/objects.c main/build/print.c main/build/print-error.c main/build/print-verbose.c main/build/program.c main/build/skeleton.c
 build_sources_library main/clean/print.c
 build_sources_library main/common/define.c main/common/enumeration.c main/common/print.c main/common/string.c main/common/type.c
-build_sources_library main/fake/path_generate.c main/fake/print.c
+build_sources_library main/fake/path_generate.c
 build_sources_library main/make/load_fakefile.c main/make/load_parameters.c main/make/operate_block.c main/make/operate.c main/make/operate_process.c main/make/operate_process_type.c main/make/operate_validate.c main/make/operate_validate_type.c main/make/print.c main/make/print-error.c main/make/print-verbose.c main/make/print-warning.c
-build_sources_library main/skeleton/print.c
 
 build_sources_program main/main.c
 
 build_sources_headers main/build.h main/clean.h main/common.h main/fake.h main/make.h main/print.h main/print-error.h main/print-warning.h main/skeleton.h
-build_sources_headers main/build/library.h main/build/load.h main/build/object.h main/build/objects.h main/build/print.h main/build/program.h main/build/skeleton.h
+build_sources_headers main/build/library.h main/build/load.h main/build/object.h main/build/objects.h main/build/print.h main/build/print-error.h main/build/print-verbose.h main/build/program.h main/build/skeleton.h
 build_sources_headers main/clean/print.h
 build_sources_headers main/common/define.h main/common/enumeration.h main/common/print.h main/common/string.h main/common/type.h
-build_sources_headers main/fake/path_generate.h main/fake/print.h
+build_sources_headers main/fake/path_generate.h
 build_sources_headers main/make/load_fakefile.h main/make/load_parameters.h main/make/operate_block.h main/make/operate.h main/make/operate_process.h main/make/operate_process_type.h main/make/operate_validate.h main/make/operate_validate_type.h main/make/print.h main/make/print-error.h main/make/print-verbose.h main/make/print-warning.h
-build_sources_headers main/skeleton/print.h
 
 build_sources_documentation man