]> Kevux Git Server - fll/commitdiff
Security: Invalid reads, always add NULL for compatibility.
authorKevin Day <thekevinday@gmail.com>
Sat, 19 Feb 2022 02:10:16 +0000 (20:10 -0600)
committerKevin Day <thekevinday@gmail.com>
Sat, 19 Feb 2022 02:10:16 +0000 (20:10 -0600)
After switching from f_string_t to f_string_static_t, the NULL terminated string problem has become apparent.
If at any point in time these strings are passed to a standard function that expects NULL terminated strings, then an invalid read (or write) can occur.

Manually appending a NULL termination every time its needed has made the code messier than I would like.
This commit changes the behavior to instead always append a NULL termination after the string.used when appending strings.
I accept the additional resource cost of 1-byte per string to guarantee this.

This should make the program more easily more secure by catering to the NULL terminated string code out there.
This project still doesn't need the or care about NULL termination for most (but not all) of its functions.

41 files changed:
level_0/f_string/c/private-string.c
level_1/fl_environment/c/environment.c
level_1/fl_environment/c/environment.h
level_2/fll_execute/c/execute.c
level_2/fll_execute/c/execute.h
level_2/fll_execute/c/private-execute.c
level_2/fll_execute/c/private-execute.h
level_2/fll_fss/c/fss.c
level_2/fll_path/c/path.c
level_2/fll_path/c/path.h
level_3/control/c/private-control.c
level_3/control/c/private-control.h
level_3/controller/c/common/private-common.c
level_3/controller/c/common/private-common.h
level_3/controller/c/controller.c
level_3/controller/c/controller/private-controller.c
level_3/controller/c/controller/private-controller.h
level_3/controller/c/entry/private-entry.c
level_3/controller/c/entry/private-entry.h
level_3/controller/c/entry/private-entry_print.c
level_3/controller/c/process/private-process.c
level_3/controller/c/process/private-process.h
level_3/controller/c/rule/private-rule.c
level_3/controller/c/rule/private-rule.h
level_3/fake/c/private-build-library.c
level_3/fake/c/private-build-load.c
level_3/fake/c/private-build-load.h
level_3/fake/c/private-build-objects.c
level_3/fake/c/private-build.c
level_3/fake/c/private-fake-path_generate.c
level_3/fake/c/private-fake.c
level_3/fake/c/private-make-load_fakefile.c
level_3/fake/c/private-make-load_fakefile.h
level_3/fake/c/private-make-operate.c
level_3/fake/c/private-make-operate.h
level_3/fake/c/private-make-operate_process.c
level_3/fake/c/private-make-operate_process.h
level_3/fake/c/private-make-operate_process_type.c
level_3/fake/c/private-make-operate_process_type.h
level_3/firewall/c/firewall.c
level_3/firewall/c/private-firewall.c

index 7e8291f0b2c1a406add285fcf72194d5fa042c8d..50e08a867234003f4602b647c6ea5a634385315e 100644 (file)
@@ -8,13 +8,14 @@ extern "C" {
 #if !defined(_di_f_string_append_) || !defined(_di_f_string_append_assure_) || !defined(_di_f_string_dynamic_append_) || !defined(_di_f_string_dynamic_append_assure_) || !defined(_di_f_string_dynamic_mash_) || !defined(f_string_dynamic_partial_append) || !defined(_di_f_string_dynamic_partial_append_assure_) || !defined(_di_f_string_dynamic_partial_mash_) || !defined(_di_f_string_dynamics_append_) || !defined(_di_f_string_map_multis_append_) || !defined(_di_f_string_mash_) || !defined(_di_f_string_maps_append_) || !defined(_di_f_string_triples_append_)
   f_status_t private_f_string_append(const f_string_t source, const f_array_length_t length, f_string_dynamic_t * const destination) {
 
-    if (destination->used + length > destination->size) {
-      const f_status_t status = private_f_string_dynamic_increase_by(length, destination);
+    if (destination->used + length + 1 > destination->size) {
+      const f_status_t status = private_f_string_dynamic_increase_by(length + 1, destination);
       if (F_status_is_error(status)) return status;
     }
 
     memcpy(destination->string + destination->used, source, length);
     destination->used += length;
+    destination->string[destination->used] = 0;
 
     return F_none;
   }
@@ -23,28 +24,30 @@ extern "C" {
 #if !defined(_di_f_string_append_assure_nulless_) || !defined(_di_f_string_append_nulless_) || !defined(_di_f_string_dynamic_append_assure_nulless_) || !defined(_di_f_string_dynamic_append_nulless_) || !defined(_di_f_string_dynamic_mash_nulless_) || !defined(_di_f_string_dynamic_partial_append_assure_nulless_) || !defined(_di_f_string_dynamic_partial_append_nulless_) || !defined(_di_f_string_dynamic_partial_mash_nulless_) || !defined(_di_f_string_mash_nulless_)
   f_status_t private_f_string_append_nulless(const f_string_t source, const f_array_length_t length, f_string_dynamic_t * const destination) {
 
-    if (destination->used + length > F_string_t_size_d) {
-      return F_status_set_error(F_string_too_large);
-    }
-
     f_status_t status = F_none;
 
     f_array_length_t i = 0;
-    f_array_length_t first = 0;
     f_array_length_t size = 0;
 
+    // Count all of the NULLs and subtract them from the total size.
     for (; i < length; ++i) {
+      if (source[i]) ++size;
+    } // for
+
+    if (destination->used + size + 1 > destination->size) {
+      status = private_f_string_dynamic_increase_by(size + 1, destination);
+      if (F_status_is_error(status)) return status;
+    }
+
+    f_array_length_t first = 0;
+
+    for (i = 0, size = 0; i < length; ++i) {
 
       if (source[i]) continue;
 
       if (i && i > first) {
         size = i - first;
 
-        if (destination->used + size > destination->size) {
-          status = private_f_string_dynamic_increase_by(size, destination);
-          if (F_status_is_error(status)) return status;
-        }
-
         memcpy(destination->string + destination->used, source + first, size);
         destination->used += size;
       }
@@ -59,15 +62,12 @@ extern "C" {
     if (i > first) {
       size = i - first;
 
-      if (destination->used + size > destination->size) {
-        status = private_f_string_dynamic_increase_by(size, destination);
-        if (F_status_is_error(status)) return status;
-      }
-
       memcpy(destination->string + destination->used, source + first, size);
       destination->used += size;
     }
 
+    destination->string[destination->used] = 0;
+
     return F_none;
   }
 #endif // !defined(_di_f_string_append_assure_nulless_) || !defined(_di_f_string_append_nulless_) || !defined(_di_f_string_dynamic_append_assure_nulless_) || !defined(_di_f_string_dynamic_append_nulless_) || !defined(_di_f_string_dynamic_mash_nulless_) || !defined(_di_f_string_dynamic_partial_append_assure_nulless_) || !defined(_di_f_string_dynamic_partial_append_nulless_) || !defined(_di_f_string_dynamic_partial_mash_nulless_) || !defined(_di_f_string_mash_nulless_)
index 75bb2f316c7b30120143dd8a4587cd9e35890173..b4ec370c2227b58b687a487e52c334d23d108dd5 100644 (file)
@@ -20,15 +20,7 @@ extern "C" {
     environment->array[environment->used].name.used = 0;
     environment->array[environment->used].value.used = 0;
 
-    status = f_string_dynamic_increase_by(name.used + 1, &environment->array[environment->used].name);
-
-    if (F_status_is_error_not(status)) {
-      status = f_string_dynamic_append_nulless(name, &environment->array[environment->used].name);
-    }
-
-    if (F_status_is_error_not(status)) {
-      status = f_string_dynamic_terminate_after(&environment->array[environment->used].name);
-    }
+    status = f_string_dynamic_append_nulless(name, &environment->array[environment->used].name);
 
     if (F_status_is_error_not(status)) {
       status = f_environment_get(name, &environment->array[environment->used].value);
@@ -65,21 +57,12 @@ extern "C" {
       environment->array[environment->used].name.used = 0;
       environment->array[environment->used].value.used = 0;
 
-      status = f_string_dynamic_increase_by(names.array[i].used + 1, &environment->array[environment->used].name);
-
-      if (F_status_is_error_not(status)) {
-        status = f_string_dynamic_append_nulless(names.array[i], &environment->array[environment->used].name);
-      }
-
-      if (F_status_is_error_not(status)) {
-        status = f_string_dynamic_terminate_after(&environment->array[environment->used].name);
-      }
+      status = f_string_dynamic_append_nulless(names.array[i], &environment->array[environment->used].name);
 
       if (F_status_is_error_not(status)) {
         status = f_environment_get(names.array[i], &environment->array[environment->used].value);
       }
-
-      if (F_status_is_error(status)) {
+      else {
         environment->array[environment->used].name.used = 0;
         environment->array[environment->used].value.used = 0;
 
index 944bc39d00b4892b91e3d8d51c2cf9f44c3f5bda..dc5ae42b523622b798d28881c993e3bf6ef5e6f8 100644 (file)
@@ -47,14 +47,10 @@ extern "C" {
  *
  *   Errors (with error bit) from: f_environment_get().
  *   Errors (with error bit) from: f_string_dynamic_append_nulless().
- *   Errors (with error bit) from: f_string_dynamic_increase_by().
- *   Errors (with error bit) from: f_string_dynamic_terminate_after().
  *   Errors (with error bit) from: f_string_maps_increase_by().
  *
  * @see f_environment_get()
  * @see f_string_dynamic_append_nulless()
- * @see f_string_dynamic_increase_by()
- * @see f_string_dynamic_terminate_after()
  * @see f_string_maps_increase_by()
  */
 #ifndef _di_fl_environment_load_name_
@@ -73,6 +69,7 @@ extern "C" {
  *
  * @param names
  *   An array of valid environment variable names.
+ *   The strings in the array must be NULL terminated.
  * @param environment
  *   An array of maps generated from the loaded environment variable names.
  *   All environment names loaded are appended to this.
index 71cb58a117cfda3d22dac5ad563dfef2e2a77a66..ec7a6160b609842e29015ce76925fa4e66d8da30 100644 (file)
@@ -149,10 +149,6 @@ extern "C" {
           status = f_string_dynamic_append(program_name, &paths.array[i]);
 
           if (F_status_is_error_not(status)) {
-            status = f_string_dynamic_terminate_after(&paths.array[i]);
-          }
-
-          if (F_status_is_error_not(status)) {
             status = f_file_exists(paths.array[i]);
 
             if (status == F_true) {
@@ -345,10 +341,6 @@ extern "C" {
           status = f_string_dynamic_append(program_name, &paths.array[i]);
 
           if (F_status_is_error_not(status)) {
-            status = f_string_dynamic_terminate_after(&paths.array[i]);
-          }
-
-          if (F_status_is_error_not(status)) {
             status = f_file_exists(paths.array[i]);
 
             if (status == F_true) {
index fa0f1bdd1d9e6173ae6a6dd4e63f95734fe6f02f..918ea451ce2ce8c05d4c2c40ceda83fde8df37fa 100644 (file)
@@ -71,12 +71,10 @@ extern "C" {
  *
  *   Errors (with error bit) from: f_string_dynamic_append().
  *   Errors (with error bit) from: f_string_dynamic_resize().
- *   Errors (with error bit) from: f_string_dynamic_terminate_after().
  *   Errors (with error bit) from: f_string_dynamics_increase().
  *
  * @see f_string_dynamic_append()
  * @see f_string_dynamic_resize()
- * @see f_string_dynamic_terminate_after()
  * @see f_string_dynamics_increase()
  */
 #ifndef _di_fll_execute_arguments_add_
@@ -109,12 +107,10 @@ extern "C" {
  *
  *   Errors (with error bit) from: f_string_append().
  *   Errors (with error bit) from: f_string_dynamic_resize().
- *   Errors (with error bit) from: f_string_dynamic_terminate_after().
  *   Errors (with error bit) from: f_string_dynamics_increase().
  *
  * @see f_string_append()
  * @see f_string_dynamic_resize()
- * @see f_string_dynamic_terminate_after()
  * @see f_string_dynamics_increase()
  */
 #ifndef _di_fll_execute_arguments_add_parameter_
@@ -149,12 +145,10 @@ extern "C" {
  *
  *   Errors (with error bit) from: f_string_append().
  *   Errors (with error bit) from: f_string_dynamic_resize().
- *   Errors (with error bit) from: f_string_dynamic_terminate_after().
  *   Errors (with error bit) from: f_string_dynamics_increase().
  *
  * @see f_string_append()
  * @see f_string_dynamic_resize()
- * @see f_string_dynamic_terminate_after()
  * @see f_string_dynamics_increase()
  */
 #ifndef _di_fll_execute_arguments_add_parameter_set_
@@ -179,12 +173,10 @@ extern "C" {
  *
  *   Errors (with error bit) from: f_string_append().
  *   Errors (with error bit) from: f_string_dynamic_resize().
- *   Errors (with error bit) from: f_string_dynamic_terminate_after().
  *   Errors (with error bit) from: f_string_dynamics_increase().
  *
  * @see f_string_append()
  * @see f_string_dynamic_resize()
- * @see f_string_dynamic_terminate_after()
  * @see f_string_dynamics_increase()
  */
 #ifndef _di_fll_execute_arguments_add_set_
@@ -228,7 +220,6 @@ extern "C" {
  *
  *   Errors (with error bit) from: f_environment_get().
  *   Errors (with error bit) from: f_string_dynamic_append().
- *   Errors (with error bit) from: f_string_dynamic_terminate_after().
  *   Errors (with error bit) from: fl_environment_path_explode().
  *
  * @see execv()
@@ -239,7 +230,6 @@ extern "C" {
  *
  * @see f_environment_get()
  * @see f_string_dynamic_append()
- * @see f_string_dynamic_terminate_after()
  * @see fl_environment_path_explode()
  */
 #ifndef _di_fll_execute_into_
@@ -320,7 +310,6 @@ extern "C" {
  *   Errors (with error bit) from: f_signal_mask().
  *   Errors (with error bit) from: f_string_append().
  *   Errors (with error bit) from: f_string_dynamic_resize().
- *   Errors (with error bit) from: f_string_dynamic_terminate_after().
  *   Errors (with error bit) from: f_string_dynamics_resize().
  *   Errors (with error bit) from: f_thread_signal_mask().
  *   Errors (with error bit) from: fl_environment_path_explode().
@@ -351,7 +340,6 @@ extern "C" {
  * @see f_limit_process()
  * @see f_signal_mask()
  * @see f_string_dynamic_append()
- * @see f_string_dynamic_terminate_after()
  * @see f_string_dynamics_resize()
  * @see f_thread_signal_mask()
  * @see fl_control_group_apply()
index 16b8bc9c37cdf7de60456c436c22123c80e25ba3..8c6188a3546fea3856803f765a4a7108f43544bf 100644 (file)
@@ -16,9 +16,6 @@ extern "C" {
     status = f_string_dynamic_append(source, &arguments->array[arguments->used]);
     if (F_status_is_error(status)) return status;
 
-    status = f_string_dynamic_terminate_after(&arguments->array[arguments->used]);
-    if (F_status_is_error(status)) return status;
-
     ++arguments->used;
 
     return F_none;
@@ -36,9 +33,6 @@ extern "C" {
     status = f_string_dynamic_append(prefix, &arguments->array[arguments->used]);
     if (F_status_is_error(status)) return status;
 
-    status = f_string_dynamic_terminate_after(&arguments->array[arguments->used]);
-    if (F_status_is_error(status)) return status;
-
     ++arguments->used;
 
     status = f_string_dynamics_increase(F_memory_default_allocation_small_d, arguments);
@@ -52,9 +46,6 @@ extern "C" {
     status = f_string_dynamic_append(value, &arguments->array[arguments->used]);
     if (F_status_is_error(status)) return status;
 
-    status = f_string_dynamic_terminate_after(&arguments->array[arguments->used]);
-    if (F_status_is_error(status)) return status;
-
     ++arguments->used;
 
     return F_none;
index 2e25848054b4915e81f1371b52f1e3cd86e39053..8bde5c3f6a283d079090615bd4ec49a5fb458a49 100644 (file)
@@ -30,12 +30,10 @@ extern "C" {
  *
  *   Errors (with error bit) from: f_string_dynamic_increase_by().
  *   Errors (with error bit) from: f_string_dynamic_resize().
- *   Errors (with error bit) from: f_string_dynamic_terminate_after().
  *   Errors (with error bit) from: f_string_dynamics_increase().
  *
  * @see f_string_dynamic_increase_by()
  * @see f_string_dynamic_resize()
- * @see f_string_dynamic_terminate_after()
  * @see f_string_dynamics_increase()
  */
 #if !defined(_di_fll_execute_arguments_add_) || !defined(_di_fll_execute_arguments_add_set_)
@@ -61,12 +59,10 @@ extern "C" {
  *
  *   Errors (with error bit) from: f_string_append().
  *   Errors (with error bit) from: f_string_dynamic_resize().
- *   Errors (with error bit) from: f_string_dynamic_terminate_after().
  *   Errors (with error bit) from: f_string_dynamics_increase().
  *
  * @see f_string_append()
  * @see f_string_dynamic_resize()
- * @see f_string_dynamic_terminate_after()
  * @see f_string_dynamics_increase()
  * @see fll_execute_arguments_add_parameter()
  * @see fll_execute_arguments_add_parameter_set()
index 4e8d786eaa1f30abfb7f90f72f2a5b8f36edfcab..8226bd90574a1e4329cb6065e2dfa958589e6bea 100644 (file)
@@ -290,9 +290,6 @@ extern "C" {
           status = f_string_dynamic_partial_append_nulless(buffer, contents.array[i].array[k], &values[j]->array[values[j]->used]);
           if (F_status_is_error(status)) return status;
 
-          status = f_string_dynamic_terminate_after(&values[j]->array[values[j]->used]);
-          if (F_status_is_error(status)) return status;
-
           ++values[j]->used;
 
           if (indexs) {
index 636d02996e569d0c0079c70456f984e113c72fb0..42232c85b2469f0c57bfeb7adf2006b2292d3cbe 100644 (file)
@@ -139,9 +139,6 @@ extern "C" {
       --canonical->used;
     }
 
-    status = f_string_dynamic_terminate_after(canonical);
-    if (F_status_is_error(status)) return status;
-
     return F_none;
   }
 #endif // _di_fll_path_canonical_
index e3ca84fa233ab354d2f7f051745609ccafe283f8..2bed3eaefb3ae3586b9634494aaf283c57aae95a 100644 (file)
@@ -49,13 +49,11 @@ extern "C" {
  *   Errors (with error bit) from: f_string_append().
  *   Errors (with error bit) from: f_string_append_assure().
  *   Errors (with error bit) from: f_string_dynamic_append_assure().
- *   Errors (with error bit) from: f_string_dynamic_terminate_after().
  *
  * @see f_path_current()
  * @see f_string_append()
  * @see f_string_append_assure()
  * @see f_string_dynamic_append_assure()
- * @see f_string_dynamic_terminate_after()
  */
 #ifndef _di_fll_path_canonical_
   extern f_status_t fll_path_canonical(const f_string_static_t path, f_string_dynamic_t *canonical);
index 78024edb2ac839b0343b800667a17b2628d78ff4..ec9076c65c495823928582f013d1dd2697c52576 100644 (file)
@@ -263,13 +263,6 @@ extern "C" {
           fll_error_print(main->error, F_status_set_fine(status), "f_string_dynamic_partial_append_nulless", F_true);
         }
       }
-      else {
-        status = f_string_dynamic_terminate_after(&data->cache.buffer_small);
-
-        if (F_status_is_error(status)) {
-          fll_error_print(main->error, F_status_set_fine(status), "f_string_dynamic_terminate_after", F_true);
-        }
-      }
 
       status = f_file_exists(data->cache.buffer_small);
 
@@ -340,14 +333,6 @@ extern "C" {
           } // for
 
           if (F_status_is_error_not(status)) {
-            status = f_string_dynamic_terminate_after(&data->cache.buffer_small);
-
-            if (F_status_is_error(status)) {
-              fll_error_print(main->error, F_status_set_fine(status), "f_string_dynamic_terminate_after", F_true);
-            }
-          }
-
-          if (F_status_is_error_not(status)) {
             status = f_file_exists(data->cache.buffer_small);
 
             if (F_status_is_error(status) || status == F_false) {
index ef1cc9767325cf4029c23b40a4491f48d0350634..cbcb94ea7746ccdc0222ac9bf1655143be9ea1b5 100644 (file)
@@ -67,7 +67,6 @@ extern "C" {
  *   Errors (with error bit) from: f_string_append_assure().
  *   Errors (with error bit) from: f_string_dynamic_append_nulless().
  *   Errors (with error bit) from: f_string_dynamic_partial_append_nulless().
- *   Errors (with error bit) from: f_string_dynamic_terminate_after().
  *   Errors (with error bit) from: f_string_dynamics_resize().
  *   Errors (with error bit) from: fl_fss_apply_delimit().
  *   Errors (with error bit) from: fll_fss_extended_read().
@@ -81,7 +80,6 @@ extern "C" {
  * @see f_string_append_assure()
  * @see f_string_dynamic_append_nulless()
  * @see f_string_dynamic_partial_append_nulless()
- * @see f_string_dynamic_terminate_after()
  * @see f_string_dynamics_resize()
  * @see fl_fss_apply_delimit()
  * @see fll_fss_extended_read()
index 2ddfcd04071b3a0419d388ff1c7f3b076146102f..4c2cb8a13d7bffe578a18a8d8a3dc5004814ecb2 100644 (file)
@@ -124,6 +124,9 @@ extern "C" {
   const f_string_static_t controller_wish_s = macro_f_string_static_t_initialize(CONTROLLER_wish_s, 0, CONTROLLER_wish_s_length);
   const f_string_static_t controller_with_s = macro_f_string_static_t_initialize(CONTROLLER_with_s, 0, CONTROLLER_with_s_length);
   const f_string_static_t controller_yes_s = macro_f_string_static_t_initialize(CONTROLLER_yes_s, 0, CONTROLLER_yes_s_length);
+
+  const f_string_static_t controller_Entry_s = macro_f_string_static_t_initialize(CONTROLLER_Entry_s, 0, CONTROLLER_Entry_s_length);
+  const f_string_static_t controller_Exit_s = macro_f_string_static_t_initialize(CONTROLLER_Exit_s, 0, CONTROLLER_Exit_s_length);
 #endif // _di_controller_string_s_
 
 #ifdef __cplusplus
index cd5a676ecbc1008c333b7cc4682e11f2986e7dcd..bc0ec8256c7e5000f2e8c001cd4551a7e6963ac9 100644 (file)
@@ -150,6 +150,9 @@ extern "C" {
   #define CONTROLLER_with_s          "with"
   #define CONTROLLER_yes_s           "yes"
 
+  #define CONTROLLER_Entry_s "Entry"
+  #define CONTROLLER_Exit_s  "Exit"
+
   #define CONTROLLER_action_s_length        6
   #define CONTROLLER_actions_s_length       7
   #define CONTROLLER_affinity_s_length      8
@@ -269,6 +272,9 @@ extern "C" {
   #define CONTROLLER_with_s_length          4
   #define CONTROLLER_yes_s_length           3
 
+  #define CONTROLLER_Entry_s_length 5
+  #define CONTROLLER_Exit_s_length  4
+
   extern const f_string_static_t controller_action_s;
   extern const f_string_static_t controller_actions_s;
   extern const f_string_static_t controller_affinity_s;
@@ -387,6 +393,9 @@ extern "C" {
   extern const f_string_static_t controller_wish_s;
   extern const f_string_static_t controller_with_s;
   extern const f_string_static_t controller_yes_s;
+
+  extern const f_string_static_t controller_Entry_s;
+  extern const f_string_static_t controller_Exit_s;
 #endif // _di_controller_string_s_
 
 /**
index 410d307aec99841a48be3e4b951c0ae0715f4cb6..d69bd65cd17249762621c2fda301e93dffef4333 100644 (file)
@@ -195,16 +195,6 @@ extern "C" {
       return status;
     }
 
-    status = f_string_dynamic_terminate_after(&setting.name_entry);
-
-    if (F_status_is_error(status)) {
-      fll_error_print(main->error, F_status_set_fine(status), "f_string_dynamic_terminate_after", F_true);
-
-      controller_main_delete(main);
-
-      return status;
-    }
-
     if (main->parameters.array[controller_parameter_init_e].result == f_console_result_found_e) {
       main->as_init = F_true;
     }
@@ -308,13 +298,6 @@ extern "C" {
       if (F_status_is_error(status)) {
         fll_error_print(main->error, F_status_set_fine(status), "f_string_dynamic_append", F_true);
       }
-      else {
-        status = f_string_dynamic_terminate_after(&setting.path_pid);
-
-        if (F_status_is_error(status)) {
-          fll_error_print(main->error, F_status_set_fine(status), "f_string_dynamic_terminate_after", F_true);
-        }
-      }
     }
 
     if (F_status_is_error_not(status)) {
@@ -346,13 +329,6 @@ extern "C" {
             if (F_status_is_error(status)) {
               fll_error_print(main->error, F_status_set_fine(status), "f_string_append_assure", F_true);
             }
-            else {
-              status = f_string_dynamic_terminate_after(&setting.path_cgroup);
-
-              if (F_status_is_error(status)) {
-                fll_error_print(main->error, F_status_set_fine(status), "f_string_dynamic_terminate_after", F_true);
-              }
-            }
           }
         }
         else {
@@ -439,13 +415,6 @@ extern "C" {
           if (F_status_is_error(status)) {
             fll_error_print(main->error, F_status_set_fine(status), "f_string_append_assure", F_true);
           }
-          else {
-            status = f_string_dynamic_terminate_after(&setting.path_cgroup);
-
-            if (F_status_is_error(status)) {
-              fll_error_print(main->error, F_status_set_fine(status), "f_string_dynamic_terminate_after", F_true);
-            }
-          }
         }
       }
     }
index 68917dd195a1ee63de4ad735a441e2c6e619c940..2677062f0e4e2fb2a0f903c464133628c5f10e19 100644 (file)
@@ -33,30 +33,21 @@ extern "C" {
 #ifndef _di_controller_string_dynamic_rip_nulless_terminated_
   f_status_t controller_dynamic_rip_nulless_terminated(const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination) {
 
-    f_status_t status = fl_string_dynamic_rip_nulless(source, range, destination);
-    if (F_status_is_error(status)) return status;
-
-    return f_string_dynamic_terminate_after(destination);
+    return fl_string_dynamic_rip_nulless(source, range, destination);
   }
 #endif // _di_controller_string_dynamic_rip_nulless_terminated_
 
 #ifndef _di_controller_string_dynamic_append_terminated_
   f_status_t controller_dynamic_append_terminated(const f_string_static_t source, f_string_dynamic_t *destination) {
 
-    f_status_t status = f_string_dynamic_append_nulless(source, destination);
-    if (F_status_is_error(status)) return status;
-
-    return f_string_dynamic_terminate_after(destination);
+    return f_string_dynamic_append_nulless(source, destination);
   }
 #endif // _di_controller_string_dynamic_append_terminated_
 
 #ifndef _di_controller_string_dynamic_partial_append_terminated_
   f_status_t controller_dynamic_partial_append_terminated(const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination) {
 
-    f_status_t status = f_string_dynamic_partial_append(source, range, destination);
-    if (F_status_is_error(status)) return status;
-
-    return f_string_dynamic_terminate_after(destination);
+    return f_string_dynamic_partial_append(source, range, destination);
   }
 #endif // _di_controller_string_dynamic_partial_append_terminated_
 
@@ -95,14 +86,6 @@ extern "C" {
       return status;
     }
 
-    status = f_string_dynamic_terminate_after(&cache->action.name_file);
-
-    if (F_status_is_error(status)) {
-      controller_print_error(global.thread, global.main->error, F_status_set_fine(status), "f_string_dynamic_terminate_after", F_true);
-
-      return status;
-    }
-
     f_string_static_t path = f_string_static_t_initialize;
 
     if (global.setting->path_setting.used) {
index 90e2f3cb72e035048caa13dcedfff87cb52439bb..01e254198138f7ab6ce919ed9c96cd927ac91258 100644 (file)
@@ -43,10 +43,8 @@ extern "C" {
  * @return
  *   F_none on success.
  *
- *   Errors (with error bit) from: f_string_dynamic_terminate_after().
  *   Errors (with error bit) from: fl_string_dynamic_rip_nulless().
  *
- * @see f_string_dynamic_terminate_after()
  * @see fl_string_dynamic_rip_nulless()
  */
 #ifndef _di_controller_string_dynamic_rip_nulless_terminated_
@@ -65,10 +63,8 @@ extern "C" {
  *   F_none on success.
  *
  *   Errors (with error bit) from: f_string_dynamic_append_nulless().
- *   Errors (with error bit) from: f_string_dynamic_terminate_after().
  *
  * @see f_string_dynamic_append_nulless()
- * @see f_string_dynamic_terminate_after()
  */
 #ifndef _di_controller_string_dynamic_append_terminated_
   extern f_status_t controller_dynamic_append_terminated(const f_string_static_t from, f_string_dynamic_t *destination) F_attribute_visibility_internal_d;
@@ -88,10 +84,8 @@ extern "C" {
  *   F_none on success.
  *
  *   Errors (with error bit) from: f_string_dynamic_append().
- *   Errors (with error bit) from: f_string_dynamic_terminate_after().
  *
  * @see f_string_dynamic_append()
- * @see f_string_dynamic_terminate_after()
  */
 #ifndef _di_controller_string_dynamic_partial_append_terminated_
   extern f_status_t controller_dynamic_partial_append_terminated(const f_string_static_t from, const f_string_range_t range, f_string_dynamic_t *destination) F_attribute_visibility_internal_d;
@@ -125,13 +119,11 @@ extern "C" {
  *   Errors (with error bit) from: f_file_stream_open().
  *   Errors (with error bit) from: f_file_stream_read().
  *   Errors (with error bit) from: f_string_append().
- *   Errors (with error bit) from: f_string_dynamic_terminate_after().
  *
  * @see f_file_stat()
  * @see f_file_stream_open()
  * @see f_file_stream_read()
  * @see f_string_append()
- * @see f_string_dynamic_terminate_after()
  */
 #ifndef _di_controller_file_load_
   extern f_status_t controller_file_load(const controller_global_t global, const bool required, const f_string_static_t path_prefix, const f_string_static_t path_name, const f_string_static_t path_suffix, controller_cache_t * const cache) F_attribute_visibility_internal_d;
index f4928ee93c67ab39266aae2c3dec099f6fb2cce0..f835858b718d864f2a34f265d2209bcb0fcdc39f 100644 (file)
@@ -404,13 +404,6 @@ extern "C" {
             if (F_status_is_error(status)) {
               controller_entry_print_error(is_entry, global.main->error, cache->action, F_status_set_fine(status), "f_string_dynamic_partial_append_nulless", F_true, global.thread);
             }
-            else {
-              status = f_string_dynamic_terminate_after(&action->parameters.array[j]);
-
-              if (F_status_is_error(status)) {
-                controller_entry_print_error(is_entry, global.main->error, cache->action, F_status_set_fine(status), "f_string_dynamic_partial_append_nulless", F_true, global.thread);
-              }
-            }
           }
 
           ++action->parameters.used;
@@ -473,22 +466,7 @@ extern "C" {
               }
               else {
                 if (fl_string_dynamic_compare(action->parameters.array[1], cache->buffer_path) == F_equal_to_not) {
-
                   if (global.main->error.verbosity != f_console_verbosity_quiet_e) {
-                    status = f_string_dynamic_terminate_after(&cache->buffer_path);
-
-                    if (F_status_is_error(status)) {
-                      controller_entry_print_error(is_entry, global.main->error, cache->action, F_status_set_fine(status), "f_string_dynamic_terminate_after", F_true, global.thread);
-
-                      action->status = status;
-
-                      if (F_status_set_fine(status) == F_memory_not) {
-                        status_action = status;
-                      }
-
-                      break;
-                    }
-
                     flockfile(global.main->error.to.stream);
 
                     fl_print_format("%r%[%QThe %r item action second parameter '%]", global.main->error.to.stream, f_string_eol_s, global.main->error.context, global.main->error.prefix, is_entry ? controller_entry_s : controller_exit_s, global.main->error.context);
@@ -2063,16 +2041,6 @@ extern "C" {
           }
         }
 
-        status = f_string_dynamic_terminate_after(&cache->action.generic);
-
-        if (F_status_is_error(status)) {
-          controller_entry_print_error(is_entry, global.main->error, cache->action, F_status_set_fine(status), "f_string_dynamic_terminate_after", F_true, global.thread);
-
-          global.setting->path_control.used = 0;
-
-          break;
-        }
-
         status = fll_path_canonical(cache->action.generic, &global.setting->path_control);
 
         if (F_status_is_error(status)) {
index f457ba574aefec83a7850bf56e9797f7032409d9..338ffa0ef0ec006410ef7dd429d7204e45e9a14c 100644 (file)
@@ -77,14 +77,12 @@ extern "C" {
  *   Errors (with error bit) from: fl_fss_apply_delimit().
  *   Errors (with error bit) from: f_string_dynamic_partial_append_nulless().
  *   Errors (with error bit) from: fl_string_dynamic_rip_nulless().
- *   Errors (with error bit) from: f_string_dynamic_terminate_after().
  *   Errors (with error bit) from: f_string_dynamics_increase_by().
  *   Errors (with error bit) from: fll_fss_extended_read().
  *
  * @see controller_entry_actions_increase_by()
  * @see f_fss_count_lines()
  * @see f_string_dynamic_partial_append_nulless()
- * @see f_string_dynamic_terminate_after()
  * @see f_string_dynamics_increase_by()
  * @see fl_fss_apply_delimit()
  * @see fl_string_dynamic_rip_nulless()
@@ -112,14 +110,12 @@ extern "C" {
  *
  *   Errors (with error bit) from: macro_f_array_lengths_t_increase_by().
  *   Errors (with error bit) from: f_string_dynamic_append().
- *   Errors (with error bit) from: f_string_dynamic_terminate_after().
  *
  *   This will detect and report all errors, but only the first error is returned.
  *   Memory related errors return immediately.
 
  * @see macro_f_array_lengths_t_increase_by()
  * @see f_string_dynamic_append()
- * @see f_string_dynamic_terminate_after()
  */
 #ifndef _di_controller_entry_preprocess_
   extern f_status_t controller_entry_preprocess(const controller_global_t global, const bool is_entry, controller_cache_t * const cache) F_attribute_visibility_internal_d;
index 9a22a96e799126d0f29a15ee19efa81a55dd7117..9c4c42e8a9e42568463c0f1bd60af765bdecc549 100644 (file)
@@ -133,7 +133,7 @@ extern "C" {
 
     controller_lock_print(print.to, thread);
 
-    fl_print_format("%r%[%Q%s setting%S '%]", print.to.stream, f_string_eol_s, print.context, print.prefix, is_entry ? "Entry" : "Exit", before, print.context);
+    fl_print_format("%r%[%Q%r setting%S '%]", print.to.stream, f_string_eol_s, print.context, print.prefix, is_entry ? controller_Entry_s : controller_Exit_s, before, print.context);
     fl_print_format("%[%/Q%]", print.to.stream, print.notable, cache->buffer_file, range, print.notable);
     fl_print_format("%['%S.%]%r", print.to.stream, print.context, after, print.context, f_string_eol_s);
 
@@ -154,7 +154,7 @@ extern "C" {
     fl_print_format("%[%Q%]", global.main->error.to.stream, global.main->error.notable, cache.action.name_action, global.main->error.notable);
     fl_print_format("%[' requires exactly %]", global.main->error.to.stream, global.main->error.context, global.main->error.context);
     fl_print_format("%[%un%]", global.main->error.to.stream, global.main->error.notable, total, global.main->error.notable);
-    fl_print_format("%[' %s.%]%r", global.main->error.to.stream, global.main->error.context, total > 1 ? controller_parameters_s : controller_parameter_s, global.main->error.context, f_string_eol_s);
+    fl_print_format("%[' %r.%]%r", global.main->error.to.stream, global.main->error.context, total > 1 ? controller_parameters_s : controller_parameter_s, global.main->error.context, f_string_eol_s);
 
     controller_entry_print_error_cache(is_entry, global.main->error, cache.action);
 
index 20419e12ed9a47ca9debe0b17907a9b3feadf17f..ea8d85e7ee1781b2042617a9349c5000f8181b8f 100644 (file)
@@ -64,15 +64,11 @@ extern "C" {
           status = f_string_dynamic_append(alias, &process->rule.alias);
 
           if (F_status_is_error_not(status)) {
-            status = f_string_dynamic_terminate_after(&process->rule.alias);
+            process->id = global.thread->processs.used++;
+            status = F_none;
 
-            if (F_status_is_error_not(status)) {
-              process->id = global.thread->processs.used++;
-              status = F_none;
-
-              if (id) {
-                *id = process->id;
-              }
+            if (id) {
+              *id = process->id;
             }
           }
 
index c818851e54743e6559d73a3b68e881dda5879255..4c7ed0491a11938568178c34ddf087fbdddaf08b 100644 (file)
@@ -42,13 +42,11 @@ extern "C" {
  *   F_lock (with error bit) if failed to re-establish read lock on global.thread->lock.process while returning.
  *
  *   Errors (with error bit) from: f_string_dynamic_append().
- *   Errors (with error bit) from: f_string_dynamic_terminate_after().
  *
  *   Errors (with error bit) from: controller_lock_read().
  *   Errors (with error bit) from: controller_lock_write().
  *
  * @see f_string_dynamic_append()
- * @see f_string_dynamic_terminate_after()
  * @see controller_lock_read()
  * @see controller_lock_write()
  */
index 21c98f3beafde2815c186841e8f4e67b75b022a4..e7e52dba7a5306234ac585d7a03b085bb147fe71 100644 (file)
@@ -85,14 +85,6 @@ extern "C" {
         return status;
       }
 
-      status = f_string_dynamic_terminate_after(&parameters->array[0]);
-
-      if (F_status_is_error(status)) {
-        controller_print_error(global.thread, global.main->error, F_status_set_fine(status), "f_string_dynamic_terminate_after", F_true);
-
-        return status;
-      }
-
       ++parameters->used;
     }
 
@@ -120,14 +112,6 @@ extern "C" {
           return status;
         }
 
-        status = f_string_dynamic_terminate_after(&parameters->array[parameters->used]);
-
-        if (F_status_is_error(status)) {
-          controller_print_error(global.thread, global.main->error, F_status_set_fine(status), "f_string_dynamic_terminate_after", F_true);
-
-          return status;
-        }
-
         ++parameters->used;
       } // for
     }
@@ -351,12 +335,6 @@ extern "C" {
               if (F_status_is_error(status)) {
                 controller_print_error(global.thread, global.main->error, F_status_set_fine(status), "f_string_dynamic_append_nulless", F_true);
               }
-
-              status = f_string_dynamic_terminate_after(&actions->array[actions->used].parameters.array[0]);
-
-              if (F_status_is_error(status)) {
-                controller_print_error(global.thread, global.main->error, F_status_set_fine(status), "f_string_dynamic_terminate_after", F_true);
-              }
               else {
                 actions->array[actions->used++].parameters.used = 1;
               }
@@ -462,13 +440,6 @@ extern "C" {
           if (F_status_is_error(status)) {
             controller_print_error(global.thread, global.main->error, F_status_set_fine(status), "fl_string_dynamic_rip", F_true);
           }
-          else {
-            status = f_string_dynamic_terminate_after(&item->pid_file);
-
-            if (F_status_is_error(status)) {
-              controller_print_error(global.thread, global.main->error, F_status_set_fine(status), "f_string_dynamic_terminate_after", F_true);
-            }
-          }
         }
         else if (type == controller_rule_action_type_rerun_e) {
           uint8_t type_rerun = 0;
@@ -660,14 +631,7 @@ extern "C" {
               controller_print_error(global.thread, global.main->error, F_status_set_fine(status), "f_string_dynamic_partial_mash_nulless", F_true);
             }
             else {
-              status = f_string_dynamic_terminate_after(&actions->array[actions->used].parameters.array[0]);
-
-              if (F_status_is_error(status)) {
-                controller_print_error(global.thread, global.main->error, F_status_set_fine(status), "f_string_dynamic_terminate_after", F_true);
-              }
-              else {
-                actions->array[actions->used++].parameters.used = 1;
-              }
+              actions->array[actions->used++].parameters.used = 1;
             }
           }
         }
@@ -789,8 +753,6 @@ extern "C" {
 #ifndef _di_controller_rule_copy_
   f_status_t controller_rule_copy(const controller_rule_t source, controller_rule_t *destination) {
 
-    f_status_t status = F_none;
-
     // Delete the third party structures.
     macro_f_control_group_t_delete_simple(destination->cgroup)
     f_capability_delete(&destination->capability);
@@ -837,6 +799,8 @@ extern "C" {
     destination->ons.used = 0;
     destination->items.used = 0;
 
+    f_status_t status = F_none;
+
     if (source.alias.used) {
       status = f_string_dynamic_append(source.alias, &destination->alias);
       if (F_status_is_error(status)) return status;
@@ -963,9 +927,6 @@ extern "C" {
         status = f_string_dynamic_append(item_source->pid_file, &item_destination->pid_file);
         if (F_status_is_error(status)) return status;
 
-        status = f_string_dynamic_terminate_after(&item_destination->pid_file);
-        if (F_status_is_error(status)) return status;
-
         for (j = 0; j < controller_rule_action_type_execute__enum_size_e; ++j) {
           item_destination->reruns[j].is = item_source->reruns[j].is;
           item_destination->reruns[j].failure.count = item_source->reruns[j].failure.count;
@@ -1867,12 +1828,6 @@ extern "C" {
       return status;
     }
 
-    status = f_string_dynamic_terminate_after(alias);
-
-    if (F_status_is_error(status)) {
-      controller_print_error(global.thread, global.main->error, F_status_set_fine(status), "f_string_dynamic_terminate_after", F_true);
-    }
-
     return status;
   }
 #endif // _di_controller_rule_id_construct_
@@ -2263,14 +2218,6 @@ extern "C" {
       return status;
     }
 
-    status = f_string_dynamic_terminate_after(&process->cache.action.name_file);
-
-    if (F_status_is_error(status)) {
-      controller_rule_print_error(global.thread, global.main->error, process->cache.action, F_status_set_fine(status), "f_string_dynamic_terminate_after", F_true, F_true);
-
-      return status;
-    }
-
     if ((process->options & controller_process_option_simulate_d) && (process->options & controller_process_option_validate_d)) {
       controller_rule_validate(global, process->rule, process->action, process->options, &process->cache);
     }
@@ -3362,14 +3309,7 @@ extern "C" {
       controller_print_error(global.thread, global.main->error, F_status_set_fine(status), "f_string_dynamic_append_nulless", F_true);
     }
     else {
-      status = f_string_dynamic_terminate_after(&rule->alias);
-
-      if (F_status_is_error(status)) {
-        controller_print_error(global.thread, global.main->error, F_status_set_fine(status), "f_string_dynamic_terminate_after", F_true);
-      }
-      else {
-        status = controller_file_load(global, F_true, controller_rules_s, rule->alias, controller_rule_s, cache);
-      }
+      status = controller_file_load(global, F_true, controller_rules_s, rule->alias, controller_rule_s, cache);
     }
 
     if (F_status_is_error_not(status)) {
@@ -3490,14 +3430,6 @@ extern "C" {
             break;
           }
 
-          status = f_string_dynamic_terminate_after(&cache->buffer_item);
-
-          if (F_status_is_error(status)) {
-            controller_print_error(global.thread, global.main->error, F_status_set_fine(status), "f_string_dynamic_terminate_after", F_true);
-
-            break;
-          }
-
           if (rule->items.array[rule->items.used].type) {
 
             // Initialize the item with settings.
@@ -3596,16 +3528,7 @@ extern "C" {
 
       if (F_status_is_error(status)) {
         controller_rule_print_error(global.thread, global.main->error, cache->action, F_status_set_fine(status), "f_string_dynamic_partial_append_nulless", F_true, F_false);
-      }
-      else {
-        status = f_string_dynamic_terminate_after(&cache->action.name_item);
 
-        if (F_status_is_error(status)) {
-          controller_rule_print_error(global.thread, global.main->error, cache->action, F_status_set_fine(status), "f_string_dynamic_terminate_after", F_true, F_false);
-        }
-      }
-
-      if (F_status_is_error(status)) {
         if (F_status_set_fine(status) == F_memory_not) {
           status_return = status;
 
@@ -3709,16 +3632,6 @@ extern "C" {
 
         if (F_status_is_error(status)) {
           controller_rule_print_error(global.thread, global.main->error, cache->action, F_status_set_fine(status), "f_string_dynamic_partial_append_nulless", F_true, F_false);
-        }
-        else {
-          status = f_string_dynamic_terminate_after(&cache->action.name_action);
-
-          if (F_status_is_error(status)) {
-            controller_rule_print_error(global.thread, global.main->error, cache->action, F_status_set_fine(status), "f_string_dynamic_terminate_after", F_true, F_false);
-          }
-        }
-
-        if (F_status_is_error(status)) {
 
           // Get the current line number within the settings item.
           cache->action.line_item = line_item;
@@ -3935,16 +3848,7 @@ extern "C" {
 
         if (F_status_is_error(status)) {
           controller_rule_print_error(global.thread, global.main->error, cache->action, F_status_set_fine(status), "f_string_dynamic_partial_append_nulless", F_true, F_false);
-        }
-        else {
-          status = f_string_dynamic_terminate_after(&setting_maps->array[setting_maps->used].value);
 
-          if (F_status_is_error(status)) {
-            controller_rule_print_error(global.thread, global.main->error, cache->action, F_status_set_fine(status), "f_string_dynamic_terminate_after", F_true, F_false);
-          }
-        }
-
-        if (F_status_is_error(status)) {
           if (F_status_set_fine(status) == F_memory_not) {
             status_return = status;
 
@@ -4372,16 +4276,7 @@ extern "C" {
 
           if (F_status_is_error(status)) {
             controller_rule_print_error(global.thread, global.main->error, cache->action, F_status_set_fine(status), "f_string_dynamic_partial_append_nulless", F_true, F_false);
-          }
-          else {
-            status = f_string_dynamic_terminate_after(setting_value);
 
-            if (F_status_is_error(status)) {
-              controller_rule_print_error(global.thread, global.main->error, cache->action, F_status_set_fine(status), "f_string_dynamic_terminate_after", F_true, F_false);
-            }
-          }
-
-          if (F_status_is_error(status)) {
             if (F_status_set_fine(status) == F_memory_not) {
               status_return = status;
 
@@ -4700,35 +4595,6 @@ extern "C" {
             }
           }
 
-          status = f_string_dynamic_terminate_after(&cache->action.generic);
-
-          if (F_status_is_error(status)) {
-
-            // Get the current line number within the settings item.
-            cache->action.line_item = line_item;
-            f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item);
-
-            cache->action.line_action = ++cache->action.line_item;
-
-            controller_lock_print(global.main->error.to, global.thread);
-
-            controller_rule_print_error(global.thread, global.main->error, cache->action, F_status_set_fine(status), "f_string_dynamic_terminate_after", F_true, F_false);
-
-            controller_rule_print_error_cache(global.main->error, cache->action, F_false);
-
-            controller_unlock_print_flush(global.main->error.to, global.thread);
-
-            if (F_status_set_fine(status) == F_memory_not) {
-              status_return = status;
-
-              break;
-            }
-
-            if (F_status_is_error_not(status_return)) {
-              status_return = F_status_set_error(F_valid_not);
-            }
-          }
-
           status = f_capability_from_text(cache->action.generic, &rule->capability);
 
           if (F_status_is_error(status) && F_status_set_fine(status) != F_supported_not) {
@@ -4827,10 +4693,6 @@ extern "C" {
 
               status = f_string_dynamic_partial_append_nulless(cache->buffer_item, cache->content_actions.array[i].array[0], &cache->action.generic);
 
-              if (F_status_is_error_not(status)) {
-                status = f_string_dynamic_terminate_after(&cache->action.generic);
-              }
-
               if (F_status_is_error(status)) {
 
                 // Get the current line number within the settings item.
@@ -4841,7 +4703,7 @@ extern "C" {
 
                 controller_lock_print(global.main->error.to, global.thread);
 
-                controller_rule_print_error(global.thread, global.main->error, cache->action, F_status_set_fine(status), cache->action.generic.used ? "f_string_dynamic_partial_append_nulless" : "f_string_dynamic_terminate_after", F_true, F_false);
+                controller_rule_print_error(global.thread, global.main->error, cache->action, F_status_set_fine(status), "f_string_dynamic_partial_append_nulless", F_true, F_false);
 
                 controller_rule_print_error_cache(global.main->error, cache->action, F_false);
 
@@ -4907,10 +4769,6 @@ extern "C" {
 
               status = f_string_dynamic_partial_append_nulless(cache->buffer_item, cache->content_actions.array[i].array[0], &cache->action.generic);
 
-              if (F_status_is_error_not(status)) {
-                status = f_string_dynamic_terminate_after(&cache->action.generic);
-              }
-
               controller_rule_setting_read_print_value(global, controller_user_s, f_string_empty_s, cache->action.generic, 0);
             }
           }
@@ -4978,7 +4836,7 @@ extern "C" {
             }
             else {
 
-              // get the current line number within the settings item.
+              // Get the current line number within the settings item.
               cache->action.line_item = line_item;
               f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item);
 
@@ -5046,16 +4904,7 @@ extern "C" {
 
           if (F_status_is_error(status)) {
             controller_rule_print_error(global.thread, global.main->error, cache->action, F_status_set_fine(status), "f_string_dynamic_partial_append_nulless", F_true, F_false);
-          }
-          else {
-            status = f_string_dynamic_terminate_after(&setting_values->array[setting_values->used]);
 
-            if (F_status_is_error(status)) {
-              controller_rule_print_error(global.thread, global.main->error, cache->action, F_status_set_fine(status), "f_string_dynamic_terminate_after", F_true, F_false);
-            }
-          }
-
-          if (F_status_is_error(status)) {
             setting_values->array[setting_values->used].used = 0;
 
             if (F_status_set_fine(status) == F_memory_not) {
@@ -5364,7 +5213,7 @@ extern "C" {
       if (global.main->error.verbosity == f_console_verbosity_debug_e || (global.main->error.verbosity == f_console_verbosity_verbose_e && global.main->parameters.array[controller_parameter_simulate_e].result == f_console_result_found_e)) {
         controller_lock_print(global.main->output.to, global.thread);
 
-        fl_print_format("%rProcessing rule item action '%[%S%]', adding ", global.main->output.to.stream, f_string_eol_s, global.main->context.set.title, controller_on_s, global.main->context.set.title);
+        fl_print_format("%rProcessing rule item action '%[%r%]', adding ", global.main->output.to.stream, f_string_eol_s, global.main->context.set.title, controller_on_s, global.main->context.set.title);
         fl_print_format("'%[%/Q%]' of ", global.main->output.to.stream, global.main->context.set.notable, cache->buffer_item, cache->content_actions.array[i].array[1], global.main->context.set.notable);
         fl_print_format("'%[%/Q%]/", global.main->output.to.stream, global.main->context.set.important, cache->buffer_item, cache->content_actions.array[i].array[2], global.main->context.set.important);
         fl_print_format("%[%/Q%]'.%r", global.main->output.to.stream, global.main->context.set.important, cache->buffer_item, cache->content_actions.array[i].array[3], global.main->context.set.important, f_string_eol_s);
index 6713d6697249af1f26c26797959e2106acf70f04..2384a29303ac07c5a659bf400e5ed3841d3c8073 100644 (file)
@@ -370,11 +370,9 @@ extern "C" {
  *   F_none on success.
  *
  *   Errors (with error bit) from: f_string_dynamic_partial_append_nulless().
- *   Errors (with error bit) from: f_string_dynamic_terminate_after().
  *
  * @see f_string_append()
  * @see f_string_dynamic_partial_append_nulless()
- * @see f_string_dynamic_terminate_after()
  */
 #ifndef _di_controller_rule_id_construct_
   extern f_status_t controller_rule_id_construct(const controller_global_t global, const f_string_static_t source, const f_string_range_t directory, const f_string_range_t basename, f_string_dynamic_t * const alias) F_attribute_visibility_internal_d;
@@ -437,12 +435,10 @@ extern "C" {
  *
  *   Errors (with error bit) from: f_fss_count_lines().
  *   Errors (with error bit) from: f_string_dynamic_partial_append_nulless().
- *   Errors (with error bit) from: f_string_dynamic_terminate_after().
  *
  * @see controller_rule_action_read()
  * @see f_fss_count_lines()
  * @see f_string_dynamic_partial_append_nulless()
- * @see f_string_dynamic_terminate_after()
  */
 #ifndef _di_controller_rule_item_read_
   extern f_status_t controller_rule_item_read(const controller_global_t global, const bool is_normal, controller_cache_t * const cache, controller_rule_item_t * const item) F_attribute_visibility_internal_d;
@@ -642,7 +638,6 @@ extern "C" {
  * @see fl_fss_apply_delimit().
  * @see f_string_dynamic_partial_append().
  * @see f_string_dynamic_partial_append_nulless().
- * @see f_string_dynamic_terminate_after().
  * @see fll_fss_basic_list_read().
  */
 #ifndef _di_controller_rule_read_
index 9f94f66924a25271700d8cd61cae3bca1c313e39..aec29a53827ef1f7468684fcd9d59daa5cc56479 100644 (file)
@@ -540,14 +540,6 @@ extern "C" {
               break;
             }
 
-            *status = f_string_dynamic_terminate_after(&source_path);
-
-            if (F_status_is_error(*status)) {
-              fll_error_print(main->error, F_status_set_fine(*status), "f_string_dynamic_terminate_after", F_true);
-
-              break;
-            }
-
             source.used = source_path.used + file_name.used + fake_build_parameter_object_name_suffix_s.used;
           }
           else {
index e0654447e2ae7752798600eb2f058b40e3949e4a..3f2cbb6817cdb196271092834b528e5d8cbbfd79 100644 (file)
@@ -1046,14 +1046,6 @@ extern "C" {
 
             break;
           }
-
-          *status = f_string_dynamic_terminate_after(settings_single_destination[i]);
-
-          if (F_status_is_error(*status)) {
-            fll_error_print(main->error, F_status_set_fine(*status), "f_string_dynamic_terminate_after", F_true);
-
-            break;
-          }
         }
 
         if (!settings_single_source[i]->used) continue;
@@ -1206,13 +1198,6 @@ extern "C" {
 
               break;
             }
-
-            *status = f_string_dynamic_terminate_after(settings_single_destination[i]);
-            if (F_status_is_error(*status)) {
-              fll_error_print(main->error, F_status_set_fine(*status), "f_string_dynamic_terminate_after", F_true);
-
-              break;
-            }
           }
         }
       } // for
@@ -1312,14 +1297,6 @@ extern "C" {
 
         return;
       }
-
-      *status = f_string_dynamic_terminate_after(&main->path_sources);
-
-      if (F_status_is_error(*status)) {
-        fll_error_print(main->error, F_status_set_fine(*status), "f_string_dynamic_terminate_after", F_true);
-
-        return;
-      }
     }
 
     if (main->parameters.array[fake_parameter_shared_disabled_e].result == f_console_result_found_e) {
@@ -1511,14 +1488,6 @@ extern "C" {
 
         break;
       }
-
-      *status = f_string_dynamic_terminate_after(values[i]);
-
-      if (F_status_is_error(*status)) {
-        fll_error_print(main->error, F_status_set_fine(*status), "f_string_dynamic_terminate_after", F_true);
-
-        break;
-      }
     } // for
 
     f_string_dynamic_resize(0, &settings_file_base);
index 43acce20728c7a849332cbaa8625a7c78ec5b636..02acb937736500f01983a75900eccb87de35ab72 100644 (file)
@@ -87,13 +87,11 @@ extern "C" {
  *   Errors (with error bit) from: f_path_directory_cleanup().
  *   Errors (with error bit) from: f_string_dynamic_append().
  *   Errors (with error bit) from: f_string_dynamic_increase_by().
- *   Errors (with error bit) from: f_string_dynamic_terminate_after().
  *   Errors (with error bit) from: fll_fss_snatch_apart().
  *
  * @see f_path_directory_cleanup()
  * @see f_string_dynamic_append()
  * @see f_string_dynamic_increase_by()
- * @see f_string_dynamic_terminate_after()
  * @see fll_fss_snatch_apart()
  */
 #ifndef _di_fake_build_load_setting_process_
index 8c43639208e40a0b0934ceb66b1c35cbc521bada..611a59b00de3355ed3683f0958e6175d336b65d2 100644 (file)
@@ -101,14 +101,6 @@ extern "C" {
             break;
           }
 
-          *status = f_string_dynamic_terminate_after(&destination_path);
-
-          if (F_status_is_error(*status)) {
-            fll_error_print(main->error, F_status_set_fine(*status), "f_string_dynamic_terminate_after", F_true);
-
-            break;
-          }
-
           *status = f_directory_exists(destination_path);
 
           if (*status == F_false) {
index 2ebff22552ad144448986fab17e520cb5193efbd..d755c1fe0bf0202cfb1995cc955d7106f74bcae1 100644 (file)
@@ -409,14 +409,6 @@ extern "C" {
         break;
       }
 
-      *status = f_string_dynamic_terminate_after(&path_source);
-
-      if (F_status_is_error(*status)) {
-        fll_error_print(main->error, F_status_set_fine(*status), "f_string_dynamic_terminate_after", F_true);
-
-        break;
-      }
-
       *status = f_directory_is(path_source);
 
       if (*status == F_true) {
@@ -438,14 +430,6 @@ extern "C" {
           break;
         }
 
-        *status = f_string_dynamic_terminate_after(&destination_directory);
-
-        if (F_status_is_error(*status)) {
-          fll_error_print(main->error, F_status_set_fine(*status), "f_string_dynamic_terminate_after", F_true);
-
-          break;
-        }
-
         *status = fl_directory_copy(path_source, destination_directory, mode, recurse);
 
         if (F_status_is_error(*status)) {
@@ -499,14 +483,6 @@ extern "C" {
             break;
           }
 
-          *status = f_string_dynamic_terminate_after(&destination_directory);
-
-          if (F_status_is_error(*status)) {
-            fll_error_print(main->error, F_status_set_fine(*status), "f_string_dynamic_terminate_after", F_true);
-
-            break;
-          }
-
           *status = fl_directory_create(destination_directory, F_file_mode_all_rwx_d);
 
           if (F_status_is_error(*status)) {
@@ -533,14 +509,6 @@ extern "C" {
           }
         }
 
-        *status = f_string_dynamic_terminate_after(&destination_file);
-
-        if (F_status_is_error(*status)) {
-          fll_error_print(main->error, F_status_set_fine(*status), "f_string_dynamic_terminate_after", F_true);
-
-          break;
-        }
-
         *status = f_file_copy(path_source, destination_file, mode, F_file_default_read_size_d, F_false);
 
         if (F_status_is_error(*status)) {
@@ -658,17 +626,6 @@ extern "C" {
 
           return 0;
         }
-
-        *status = f_string_dynamic_terminate_after(&defines);
-
-        if (F_status_is_error(*status)) {
-          fll_error_print(main->error, F_status_set_fine(*status), "f_string_dynamic_terminate_after", F_true);
-
-          f_string_dynamic_resize(0, &defines);
-          f_string_dynamics_resize(0, &arguments);
-
-          return 0;
-        }
       }
 
       const f_string_static_t parameters_prefix[] = {
@@ -715,32 +672,22 @@ extern "C" {
     }
 
     f_string_dynamic_t path = f_string_dynamic_t_initialize;
-    f_string_t function = 0;
-
-    {
-      function = "f_string_dynamic_append_nulless";
-
-      if (process_script.string[0] != '/') {
-        *status = f_string_dynamic_append_nulless(main->path_data_build, &path);
-      }
 
-      if (F_status_is_error_not(*status)) {
-        *status = f_string_dynamic_append_nulless(process_script, &path);
-      }
+    if (process_script.string[0] != '/') {
+      *status = f_string_dynamic_append_nulless(main->path_data_build, &path);
+    }
 
-      if (F_status_is_error_not(*status)) {
-        function = "f_string_dynamic_terminate_after";
-        *status = f_string_dynamic_terminate_after(&path);
-      }
+    if (F_status_is_error_not(*status)) {
+      *status = f_string_dynamic_append_nulless(process_script, &path);
+    }
 
-      if (F_status_is_error(*status)) {
-        fll_error_print(main->error, F_status_set_fine(*status), function, F_true);
+    if (F_status_is_error(*status)) {
+      fll_error_print(main->error, F_status_set_fine(*status), "f_string_dynamic_append_nulless", F_true);
 
-        f_string_dynamic_resize(0, &path);
-        f_string_dynamics_resize(0, &arguments);
+      f_string_dynamic_resize(0, &path);
+      f_string_dynamics_resize(0, &arguments);
 
-        return 0;
-      }
+      return 0;
     }
 
     int return_code = 0;
@@ -813,14 +760,6 @@ extern "C" {
       }
     } // for
 
-    status = f_string_dynamic_terminate_after(name);
-
-    if (F_status_is_error(status)) {
-      fll_error_print(main->error, F_status_set_fine(status), "f_string_dynamic_terminate_after", F_true);
-
-      return status;
-    }
-
     return F_none;
   }
 #endif // _di_fake_build_get_file_name_without_extension_
index 830a1228b800b274c4b7f3603b1bd8b311445efd..3c9472456ad96382147ea23a327fc77b404b2a1e 100644 (file)
@@ -352,61 +352,6 @@ extern "C" {
       }
     }
 
-    {
-      f_string_dynamic_t * const parameters_value[] = {
-        &main->path_build_documents,
-        &main->path_build_includes,
-        &main->path_build_libraries,
-        &main->path_build_libraries_script,
-        &main->path_build_libraries_shared,
-        &main->path_build_libraries_static,
-        &main->path_build_objects,
-        &main->path_build_objects_script,
-        &main->path_build_objects_shared,
-        &main->path_build_objects_static,
-        &main->path_build_programs,
-        &main->path_build_programs_script,
-        &main->path_build_programs_shared,
-        &main->path_build_programs_static,
-        &main->path_build_settings,
-        &main->path_build_stage,
-        &main->path_data_build,
-        &main->path_data_settings,
-        &main->path_documents,
-        &main->path_licenses,
-        &main->path_sources,
-        &main->path_work_includes,
-        &main->path_work_libraries,
-        &main->path_work_libraries_script,
-        &main->path_work_libraries_shared,
-        &main->path_work_libraries_static,
-        &main->path_work_programs,
-        &main->path_work_programs_script,
-        &main->path_work_programs_shared,
-        &main->path_work_programs_static,
-        &main->file_data_build_defines,
-        &main->file_data_build_dependencies,
-        &main->file_data_build_process_post_s,
-        &main->file_data_build_process_pre_s,
-        &main->file_data_build_fakefile,
-        &main->file_data_build_settings,
-        &main->file_documents_readme,
-      };
-
-      for (i = 0; i < 37; ++i) {
-
-        if (!parameters_value[i]->used) continue;
-
-        status = f_string_dynamic_terminate_after(parameters_value[i]);
-
-        if (F_status_is_error(status)) {
-          fll_error_print(main->error, F_status_set_fine(status), "f_string_dynamic_terminate_after", F_true);
-
-          return status;
-        }
-      } // for
-    }
-
     return F_none;
   }
 #endif // _di_fake_path_generate_
index 89e94e0b517ac5065f77e7a891fc3f98e13257e8..fc7f3087500f190830fc2ee212b3b4ec952a9db8 100644 (file)
@@ -313,14 +313,6 @@ extern "C" {
             return status;
           }
         }
-
-        status = f_string_dynamic_terminate_after(parameters_value[i]);
-
-        if (F_status_is_error(status)) {
-          fll_error_print(main->error, F_status_set_fine(status), "f_string_dynamic_terminate_after", F_true);
-
-          return status;
-        }
       } // for
     }
 
@@ -424,14 +416,6 @@ extern "C" {
             return status;
           }
         }
-
-        status = f_string_dynamic_terminate_after(parameters_value[i]);
-
-        if (F_status_is_error(status)) {
-          fll_error_print(main->error, F_status_set_fine(status), "f_string_dynamic_terminate_after", F_true);
-
-          return status;
-        }
       } // for
     }
 
index a775669ab3e8d2426b8fe0fa31b8a6ac01083ad1..f935afb9be5f7fc75915b93ed95f35497e87c908 100644 (file)
@@ -225,20 +225,10 @@ extern "C" {
         }
 
         if (F_status_is_error_not(*status)) {
-          function_name = "f_string_dynamic_terminate_after";
-          *status = f_string_dynamic_terminate_after(&data_make->setting_make.parameter.array[0].name);
-        }
-
-        if (F_status_is_error_not(*status)) {
           function_name = "f_string_dynamics_resize";
           *status = f_string_dynamics_resize(1, &data_make->setting_make.parameter.array[0].value);
         }
 
-        if (F_status_is_error_not(*status)) {
-          function_name = "f_string_dynamic_terminate_after";
-          *status = f_string_dynamic_terminate_after(&data_make->setting_make.parameter.array[0].value.array[0]);
-        }
-
         if (F_status_is_error(*status)) {
           fll_error_print(data_make->main->error, F_status_set_fine(*status), function_name, F_true);
 
@@ -447,14 +437,6 @@ extern "C" {
 
           if (F_status_is_error(status)) break;
 
-          status = f_string_dynamic_terminate_after(&combined);
-
-          if (F_status_is_error(status)) {
-            fll_error_print(main->error, F_status_set_fine(status), "f_string_dynamic_terminate_after", F_true);
-
-            break;
-          }
-
           status = f_environment_set(define.array[i].name, combined, F_true);
 
           if (F_status_is_error(status)) {
@@ -511,14 +493,6 @@ extern "C" {
         break;
       }
 
-      status = f_string_dynamic_terminate_after(&name_define);
-
-      if (F_status_is_error(status)) {
-        fll_error_print(data_make->main->error, F_status_set_fine(status), "f_string_dynamic_terminate_after", F_true);
-
-        break;
-      }
-
       // The environment settings are stored in the build settings rather than the make settings.
       if (fake_make_operate_validate_define_name(name_define) == F_true) {
         for (j = 0; j < data_make->setting_build.environment.used; ++j) {
@@ -552,14 +526,6 @@ extern "C" {
             break;
           }
 
-          status = f_string_dynamic_terminate_after(&data_make->setting_build.environment.array[data_make->setting_build.environment.used]);
-
-          if (F_status_is_error(status)) {
-            fll_error_print(data_make->main->error, F_status_set_fine(status), "f_string_dynamic_terminate_after", F_true);
-
-            break;
-          }
-
           ++data_make->setting_build.environment.used;
         }
         else if (data_make->main->warning.verbosity == f_console_verbosity_verbose_e) {
@@ -672,14 +638,6 @@ extern "C" {
               break;
             }
 
-            status = f_string_dynamic_terminate_after(&data_make->setting_make.parameter.array[0].value.array[0]);
-
-            if (F_status_is_error(status)) {
-              fll_error_print(data_make->main->error, F_status_set_fine(status), "f_string_dynamic_terminate_after", F_true);
-
-              break;
-            }
-
             status = f_string_dynamic_append_assure(f_string_space_s, &data_make->setting_make.parameter.array[0].value.array[0]);
 
             if (F_status_is_error(status)) {
index b6a01b988cd262f2b19eba3749b7a0b9bffa53c2..d452b8049532ae946691b77b18b8b1a278f0afe8 100644 (file)
@@ -81,12 +81,10 @@ extern "C" {
  *
  *   Errors (with error bit) from: f_environment_set().
  *   Errors (with error bit) from: f_string_dynamic_mash_nulless().
- *   Errors (with error bit) from: f_string_dynamic_terminate_after().
  *   Errors (with error bit) from: fll_fss_snatch_map_apart().
  *
  * @see f_environment_set()
  * @see f_string_dynamic_mash_nulless()
- * @see f_string_dynamic_terminate_after()
  * @see fll_fss_snatch_map_apart()
  */
 #ifndef _di_fake_make_load_fakefile_setting_define_and_parameter_
@@ -106,12 +104,10 @@ extern "C" {
  *
  *   Errors (with error bit) from: f_string_dynamic_append().
  *   Errors (with error bit) from: f_string_dynamic_partial_append_nulless().
- *   Errors (with error bit) from: f_string_dynamic_terminate_after().
  *   Errors (with error bit) from: f_string_dynamics_increase().
  *
  * @see f_string_dynamic_append()
  * @see f_string_dynamic_partial_append_nulless()
- * @see f_string_dynamic_terminate_after()
  * @see f_string_dynamics_increase()
  */
 #ifndef _di_fake_make_load_fakefile_setting_environment_
@@ -168,11 +164,9 @@ extern "C" {
  *
  *   Errors (with error bit) from: f_string_append_assure().
  *   Errors (with error bit) from: f_string_dynamic_partial_append_nulless().
- *   Errors (with error bit) from: f_string_dynamic_terminate_after().
  *
  * @see f_string_append_assure()
  * @see f_string_dynamic_partial_append_nulless()
- * @see f_string_dynamic_terminate_after()
  *
  * @see fake_make_load_fakefile_setting_define_and_parameter()
  */
index 2d3ced16bd5098591bdad3ff5c2eee466f65664e..62d34285c6a3a0992a84d6fb175da776f657f734 100644 (file)
@@ -522,14 +522,6 @@ extern "C" {
           }
         }
 
-        *status = f_string_dynamic_terminate_after(&arguments->array[arguments->used]);
-
-        if (F_status_is_error(*status)) {
-          fll_error_print(data_make->error, F_status_set_fine(*status), "f_string_dynamic_terminate_after", F_true);
-
-          break;
-        }
-
         // Unquoted empty Content after IKI variable substitution are not used as an argument.
         if (used_content < arguments->array[arguments->used].used || quotes.array[i]) {
           ++arguments->used;
@@ -544,14 +536,6 @@ extern "C" {
           break;
         }
 
-        *status = f_string_dynamic_terminate_after(&arguments->array[arguments->used]);
-
-        if (F_status_is_error(*status)) {
-          fll_error_print(data_make->error, F_status_set_fine(*status), "f_string_dynamic_terminate_after", F_true);
-
-          break;
-        }
-
         ++arguments->used;
       }
 
@@ -815,11 +799,7 @@ extern "C" {
         status = f_string_dynamic_append_nulless(value, &arguments->array[arguments->used]);
 
         if (F_status_is_error_not(status)) {
-          status = f_string_dynamic_terminate_after(&arguments->array[arguments->used]);
-
-          if (F_status_is_error_not(status)) {
-            ++arguments->used;
-          }
+          ++arguments->used;
         }
       }
     }
@@ -882,11 +862,7 @@ extern "C" {
           status = f_string_dynamic_append_nulless(*context, &arguments->array[arguments->used]);
 
           if (F_status_is_error_not(status)) {
-            status = f_string_dynamic_terminate_after(&arguments->array[arguments->used]);
-
-            if (F_status_is_error_not(status)) {
-              ++arguments->used;
-            }
+            ++arguments->used;
           }
         }
       }
@@ -913,10 +889,6 @@ extern "C" {
     }
 
     if (F_status_is_error_not(status)) {
-      status = f_string_dynamic_terminate_after(&data_make->cache_1);
-    }
-
-    if (F_status_is_error_not(status)) {
       status = f_environment_get(data_make->cache_1, &data_make->cache_2);
     }
 
@@ -933,10 +905,6 @@ extern "C" {
       status = f_string_dynamic_append_nulless(data_make->cache_2, &arguments->array[arguments->used]);
     }
 
-    if (F_status_is_error_not(status)) {
-      status = f_string_dynamic_terminate_after(&arguments->array[arguments->used]);
-    }
-
     if (F_status_is_error(status)) return status;
 
     if (!quoted) {
index 85c9eae26faa091bfbf0ef607756b85481d62231..7580b106cce1d461f9a9f9506950d044a24aa6f6 100644 (file)
@@ -101,13 +101,11 @@ extern "C" {
  *   Errors (with error bit) from: f_string_dynamic_append_nulless().
  *   Errors (with error bit) from: f_string_dynamic_partial_append_nulless().
  *   Errors (with error bit) from: f_string_dynamic_increase_by().
- *   Errors (with error bit) from: f_string_dynamic_terminate_after().
  *   Errors (with error bit) from: f_string_dynamics_increase().
  *
  * @see f_string_dynamic_append_nulless()
  * @see f_string_dynamic_partial_append_nulless()
  * @see f_string_dynamic_increase_by()
- * @see f_string_dynamic_terminate_after()
  * @see f_string_dynamics_increase()
  */
 #ifndef _di_fake_make_operate_expand_environment_
index f05161435355fa5b0caadc6e6cda83cc2096d3c0..37ff28d2f010b246fd4f99553f82fbe2e4af09e8 100644 (file)
@@ -637,14 +637,6 @@ extern "C" {
       return status;
     }
 
-    status = f_string_dynamic_terminate_after(&data_make->setting_make.parameter.array[0].value.array[0]);
-
-    if (F_status_is_error(status)) {
-      fll_error_print(data_make->error, F_status_set_fine(status), "f_string_dynamic_terminate_after", F_true);
-
-      return status;
-    }
-
     if (data_make->error.verbosity != f_console_verbosity_quiet_e && data_make->error.to.stream) {
       flockfile(data_make->error.to.stream);
 
index 65be39c01a5485f20d5bb062007ec4a779fd314c..ee39783a6f221c3048a1eb5f36746ba92a997299 100644 (file)
@@ -85,12 +85,10 @@ extern "C" {
  *   Errors (with error bit) from: f_conversion_number_signed_to_string().
  *   Errors (with error bit) from: f_string_append().
  *   Errors (with error bit) from: f_string_dynamic_append().
- *   Errors (with error bit) from: f_string_dynamic_terminate_after().
  *
  * @see f_conversion_number_signed_to_string()
  * @see f_string_append()
  * @see f_string_dynamic_append()
- * @see f_string_dynamic_terminate_after()
  */
 #ifndef _di_fake_make_operate_process_return_
   extern f_status_t fake_make_operate_process_return(fake_make_data_t * const data_make, const int return_code) F_attribute_visibility_internal_d;
index cd91f4d99319e46ca3dd84a603f75783ddaf3952..38ae4db3f95a11fc5423803fbbe99e311bbdd32b 100644 (file)
@@ -1184,14 +1184,6 @@ extern "C" {
         return status;
       }
 
-      status = f_string_dynamic_terminate_after(&data_make->setting_make.parameter.array[data_make->setting_make.parameter.used].name);
-
-      if (F_status_is_error(status)) {
-        fll_error_print(data_make->error, F_status_set_fine(status), "f_string_dynamic_terminate_after", F_true);
-
-        return status;
-      }
-
       i = data_make->setting_make.parameter.used++;
     }
 
index 3c002e67ecc35094e651b4c9e0cfdf41ed64ec47..4be8a1410dadd72069794a189db2832a7fa4ac33 100644 (file)
@@ -377,12 +377,10 @@ extern "C" {
  *   F_none on success.
  *
  *   Errors (with error bit) from: f_string_dynamic_resize().
- *   Errors (with error bit) from: f_string_dynamic_terminate_after().
  *   Errors (with error bit) from: f_string_dynamics_resize().
  *   Errors (with error bit) from: f_string_map_multis_resize().
  *
  * @see f_string_dynamic_resize()
- * @see f_string_dynamic_terminate_after()
  * @see f_string_dynamics_resize()
  * @see f_string_map_multis_resize()
  */
index 9a11a9b5f834d7d53e2318444713338091bcbd1b..446a3274478075210b3c01393629e07cf5b5ed5b 100644 (file)
@@ -609,10 +609,6 @@ extern "C" {
               status = f_string_dynamic_append(firewall_file_suffix_s, &path_file);
             }
 
-            if (F_status_is_error_not(status)) {
-              status = f_string_dynamic_terminate_after(&path_file);
-            }
-
             if (F_status_is_error(status)) {
               firewall_print_error_on_allocation_failure(main->error);
 
index 7babe702dedb600b58fe42a14ea3c6b9b2cd21fe..df1d5e0a98f5b265903cfb152d051d2efb4078f2 100644 (file)
@@ -46,10 +46,6 @@ f_status_t firewall_perform_commands(firewall_main_t * const main, const firewal
 
       status = f_string_dynamic_append(main->devices.array[local.device], &device);
 
-      if (F_status_is_error_not(status)) {
-        status = f_string_dynamic_terminate_after(&device);
-      }
-
       if (F_status_is_error(status)) {
         if (F_status_set_fine(status) == F_memory_not) {
           firewall_print_error_on_allocation_failure(main->error);
@@ -194,10 +190,6 @@ f_status_t firewall_perform_commands(firewall_main_t * const main, const firewal
         if (length) {
           status = f_string_dynamic_partial_append(local.buffer, local.rule_contents.array[i].array[0], &device);
 
-          if (F_status_is_error_not(status)) {
-            status = f_string_dynamic_terminate_after(&device);
-          }
-
           if (F_status_is_error(status)) break;
         }
 
@@ -263,10 +255,6 @@ f_status_t firewall_perform_commands(firewall_main_t * const main, const firewal
 
           status = f_string_dynamic_partial_append(local.buffer, local.rule_contents.array[i].array[0], &protocol);
 
-          if (F_status_is_error_not(status)) {
-            status = f_string_dynamic_terminate_after(&protocol);
-          }
-
           if (F_status_is_error(status)) break;
 
           use_protocol = F_true;
@@ -383,10 +371,6 @@ f_status_t firewall_perform_commands(firewall_main_t * const main, const firewal
           status = f_string_dynamic_append(firewall_action_policy_command_s, &arguments.array[arguments.used]);
         }
 
-        if (F_status_is_error_not(status)) {
-          status = f_string_dynamic_terminate_after(&arguments.array[arguments.used]);
-        }
-
         if (F_status_is_error(status)) break;
 
         if (action == firewall_action_append_id_e || action == firewall_action_insert_id_e || action == firewall_action_policy_id_e) {
@@ -418,10 +402,6 @@ f_status_t firewall_perform_commands(firewall_main_t * const main, const firewal
             status = f_string_dynamic_append(firewall_chain_output_s, &arguments.array[arguments.used]);
           }
 
-          if (F_status_is_error_not(status)) {
-            status = f_string_dynamic_terminate_after(&arguments.array[arguments.used]);
-          }
-
           if (F_status_is_error(status)) break;
 
           if (status == F_data_not) {
@@ -445,10 +425,6 @@ f_status_t firewall_perform_commands(firewall_main_t * const main, const firewal
           if (direction == firewall_direction_input_id_e) {
             status = f_string_dynamic_append(firewall_device_input_command_s, &arguments.array[arguments.used]);
 
-            if (F_status_is_error_not(status)) {
-              status = f_string_dynamic_terminate_after(&arguments.array[arguments.used]);
-            }
-
             if (F_status_is_error(status)) break;
 
             ++arguments.used;
@@ -456,10 +432,6 @@ f_status_t firewall_perform_commands(firewall_main_t * const main, const firewal
           else if (direction == firewall_direction_output_id_e) {
             status = f_string_dynamic_append(firewall_device_output_command_s, &arguments.array[arguments.used]);
 
-            if (F_status_is_error_not(status)) {
-              status = f_string_dynamic_terminate_after(&arguments.array[arguments.used]);
-            }
-
             if (F_status_is_error(status)) break;
 
             ++arguments.used;
@@ -475,10 +447,6 @@ f_status_t firewall_perform_commands(firewall_main_t * const main, const firewal
 
           status = f_string_dynamic_append(device, &arguments.array[arguments.used]);
 
-          if (F_status_is_error_not(status)) {
-            status = f_string_dynamic_terminate_after(&arguments.array[arguments.used]);
-          }
-
           if (F_status_is_error(status)) break;
 
           ++arguments.used;
@@ -493,10 +461,6 @@ f_status_t firewall_perform_commands(firewall_main_t * const main, const firewal
 
         status = f_string_dynamic_append(firewall_protocol_command_s, &arguments.array[arguments.used]);
 
-        if (F_status_is_error_not(status)) {
-          status = f_string_dynamic_terminate_after(&arguments.array[arguments.used]);
-        }
-
         if (F_status_is_error(status)) break;
 
         ++arguments.used;
@@ -509,10 +473,6 @@ f_status_t firewall_perform_commands(firewall_main_t * const main, const firewal
 
           status = f_string_dynamic_append(protocol, &arguments.array[arguments.used]);
 
-          if (F_status_is_error_not(status)) {
-            status = f_string_dynamic_terminate_after(&arguments.array[arguments.used]);
-          }
-
           if (F_status_is_error(status)) break;
 
           ++arguments.used;
@@ -535,10 +495,6 @@ f_status_t firewall_perform_commands(firewall_main_t * const main, const firewal
 
             status = f_string_dynamic_partial_append(local.buffer, local.rule_contents.array[i].array[subcounter], &ip_list);
 
-            if (F_status_is_error_not(status)) {
-              status = f_string_dynamic_terminate_after(&ip_list);
-            }
-
             if (F_status_is_error(status)) {
 
               // Prevent the loop below from being processed.
@@ -558,11 +514,6 @@ f_status_t firewall_perform_commands(firewall_main_t * const main, const firewal
             arguments.array[arguments.used].used = 0;
 
             status = f_string_dynamic_partial_append(local.buffer, local.rule_contents.array[i].array[subcounter], &arguments.array[arguments.used]);
-
-            if (F_status_is_error_not(status)) {
-              status = f_string_dynamic_terminate_after(&arguments.array[arguments.used]);
-            }
-
             if (F_status_is_error(status)) break;
 
             ++arguments.used;
@@ -726,11 +677,6 @@ f_status_t firewall_perform_commands(firewall_main_t * const main, const firewal
                   arguments.array[arguments.used].used = 0;
 
                   status = f_string_dynamic_partial_append(local_buffer, basic_objects.array[at], &arguments.array[arguments.used]);
-
-                  if (F_status_is_error_not(status)) {
-                    status = f_string_dynamic_terminate_after(&arguments.array[arguments.used]);
-                  }
-
                   if (F_status_is_error(status)) break;
 
                   ++arguments.used;
@@ -857,14 +803,9 @@ f_status_t firewall_create_custom_chains(firewall_main_t * const main, firewall_
   status = f_string_dynamic_append(firewall_chain_create_command_s, &arguments.array[0]);
 
   if (F_status_is_error_not(status)) {
-    status = f_string_dynamic_terminate_after(&arguments.array[0]);
-  }
-
-  if (F_status_is_error_not(status)) {
     status = f_string_dynamic_increase(F_memory_default_allocation_small_d, &arguments.array[1]);
   }
-
-  if (F_status_is_error(status)) {
+  else {
     f_string_dynamics_resize(0, &arguments);
 
     return status;