]> Kevux Git Server - fll/commitdiff
Progress: Continue mass converting to f_string_static_t.
authorKevin Day <thekevinday@gmail.com>
Sun, 6 Feb 2022 17:13:06 +0000 (11:13 -0600)
committerKevin Day <thekevinday@gmail.com>
Sun, 6 Feb 2022 17:13:06 +0000 (11:13 -0600)
I've noticed several things that need cleaning and improvement, such as:
- I should make an f_string_dynamic_partial_rip() and have f_string_dynamic_rip() be consistent with other functions lie f_string_dynamic_append().
- iki_read is a bit sloppy in memory, I need to figure out why (and I imagine other are too).
- I've started clearing out old uses of object and content but I am concerned that I overdid the cleanup (I need to re-check some of this in the FSS programs).

There will most definitely need to be another cleanup pass on all of the programs focusing on cleaning up and improving the programs before I make my stable releases.
For now, I am ignoring those problems so I can better focus on f_string_static_t conversions.
Once the programs are updated with the current set of f_string_static_t, I still need to go through all of the remaining level_2 and lower functions to convert many of the functions still using f_string_t that should now be f_string_static_t.

45 files changed:
level_0/f_file/c/file.c
level_0/f_iki/c/iki.c
level_0/f_string/c/string_range.h
level_1/fl_utf_file/c/utf_file.c
level_2/fll_iki/c/iki.c
level_2/fll_program/c/program.c
level_2/fll_program/c/program.h
level_3/controller/c/entry/private-entry.c
level_3/fake/c/fake.h
level_3/fake/c/private-fake.c
level_3/fss_basic_list_read/c/fss_basic_list_read.c
level_3/fss_basic_list_read/c/private-read.c
level_3/fss_basic_list_write/c/fss_basic_list_write.c
level_3/fss_basic_read/c/fss_basic_read.c
level_3/fss_basic_read/c/private-read.c
level_3/fss_basic_write/c/fss_basic_write.c
level_3/fss_embedded_list_read/c/fss_embedded_list_read.c
level_3/fss_embedded_list_read/c/private-read.c
level_3/fss_embedded_list_write/c/fss_embedded_list_write.c
level_3/fss_embedded_list_write/c/private-write.c
level_3/fss_extended_list_read/c/fss_extended_list_read.c
level_3/fss_extended_list_read/c/private-read.c
level_3/fss_extended_list_write/c/fss_extended_list_write.c
level_3/fss_extended_list_write/c/private-write.c
level_3/fss_extended_read/c/fss_extended_read.c
level_3/fss_extended_write/c/fss_extended_write.c
level_3/fss_identify/c/private-print.c
level_3/fss_status_code/c/common.c
level_3/fss_status_code/c/common.h
level_3/fss_status_code/c/fss_status_code.c
level_3/fss_status_code/c/private-fss_status_code.c
level_3/fss_status_code/c/private-fss_status_code.h
level_3/iki_read/c/common.c
level_3/iki_read/c/common.h
level_3/iki_read/c/iki_read.c
level_3/iki_read/c/private-print.c
level_3/iki_read/c/private-read.c
level_3/iki_read/c/private-read.h
level_3/iki_write/c/common.h
level_3/iki_write/c/iki_write.c
level_3/iki_write/c/private-write.c
level_3/status_code/c/common.h
level_3/status_code/c/private-status_code.c
level_3/status_code/c/private-status_code.h
level_3/status_code/c/status_code.c

index b774612df7b96699c4ac045ddf9c8a3abf829d56..c69641654829313eb4fb91daaa0e85d615f48799 100644 (file)
@@ -2233,7 +2233,6 @@ extern "C" {
   f_status_t f_file_stream_write(const f_file_t file, const f_string_static_t buffer, f_array_length_t *written) {
     #ifndef _di_level_0_parameter_checking_
       if (!file.size_write) return F_status_set_error(F_parameter);
-      if (buffer.used > buffer.size) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
 
     if (!file.stream) {
@@ -2279,7 +2278,6 @@ extern "C" {
   f_status_t f_file_stream_write_block(const f_file_t file, const f_string_static_t buffer, f_array_length_t *written) {
     #ifndef _di_level_0_parameter_checking_
       if (!file.size_write) return F_status_set_error(F_parameter);
-      if (buffer.used > buffer.size) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
 
     if (!file.stream) {
index 81d00cb6c3862a3aad5e01fa8f5561cbbabe81db..1a44373b9198ca8744e60bcaf09b3208734e8e84 100644 (file)
@@ -21,7 +21,6 @@ extern "C" {
 #ifndef _di_f_iki_content_partial_is_
   f_status_t f_iki_content_partial_is(const f_string_static_t content, const f_string_range_t range, const f_string_static_t quote) {
     #ifndef _di_level_0_parameter_checking_
-      if (content.used > content.size) return F_status_set_error(F_parameter);
       if (range.start > range.stop) return F_status_set_error(F_parameter);
       if (range.start >= content.used) return F_status_set_error(F_parameter);
       if (!quote.used) return F_status_set_error(F_parameter);
@@ -34,9 +33,6 @@ extern "C" {
 
 #ifndef _di_f_iki_object_is_
   f_status_t f_iki_object_is(const f_string_static_t object) {
-    #ifndef _di_level_0_parameter_checking_
-      if (object.used > object.size) return F_status_set_error(F_parameter);
-    #endif // _di_level_0_parameter_checking_
 
     const f_string_range_t range = macro_f_string_range_t_initialize(object.used);
 
@@ -47,7 +43,6 @@ extern "C" {
 #ifndef _di_f_iki_object_partial_is_
   f_status_t f_iki_object_partial_is(const f_string_static_t object, const f_string_range_t range) {
     #ifndef _di_level_0_parameter_checking_
-      if (object.used > object.size) return F_status_set_error(F_parameter);
       if (range.start > range.stop) return F_status_set_error(F_parameter);
       if (range.start >= object.used) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
index 866c9c787d4f2656bdeae80f5ac786cf1d3ee4ae..dddae56ea1c500176b7c4ee2c9f7448b9a1ec13f 100644 (file)
@@ -23,8 +23,6 @@ extern "C" {
  * Therefore, a range from 0 to 0 would be include position 0.
  * Set start to some value larger than stop to designate that there is no range (such as start = 1, stop = 0).
  *
- * A special macro_f_string_range_t_initialize() is provided for the special purpose of easily initialize a static string range.
- *
  * start: the start position.
  * stop:  the stop position.
  */
@@ -37,6 +35,7 @@ extern "C" {
   #define f_string_range_t_initialize { 1, 0 }
 
   #define macro_f_string_range_t_initialize(length) { length ? 0 : 1, length ? length - 1 : 0 }
+  #define macro_f_string_range_t_initialize2(start, stop) { start, stop }
 
   #define macro_f_string_range_t_clear(range) \
     range.start = 1; \
index d15f40f4da742cff4727643371de672f823c8067..40c2ab7d001c20a830d5b9202e46815771e16d3a 100644 (file)
@@ -205,7 +205,6 @@ extern "C" {
   f_status_t fl_utf_file_write(const f_file_t file, const f_utf_string_static_t buffer, f_array_length_t *written) {
     #ifndef _di_level_0_parameter_checking_
       if (!file.size_write) return F_status_set_error(F_parameter);
-      if (buffer.used > buffer.size) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
 
     if (file.id < 0) {
@@ -237,7 +236,6 @@ extern "C" {
   f_status_t fl_utf_file_write_block(const f_file_t file, const f_utf_string_static_t buffer, f_array_length_t *written) {
     #ifndef _di_level_0_parameter_checking_
       if (!file.size_write) return F_status_set_error(F_parameter);
-      if (buffer.used > buffer.size) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
 
     if (file.id < 0) {
@@ -275,7 +273,6 @@ extern "C" {
   f_status_t fl_utf_file_write_until(const f_file_t file, const f_utf_string_static_t buffer, const f_array_length_t total, f_array_length_t *written) {
     #ifndef _di_level_0_parameter_checking_
       if (!file.size_write) return F_status_set_error(F_parameter);
-      if (buffer.used > buffer.size) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
 
     if (file.id < 0) {
@@ -313,7 +310,6 @@ extern "C" {
   f_status_t fl_utf_file_write_range(const f_file_t file, const f_utf_string_static_t buffer, const f_string_range_t range, f_array_length_t *written) {
     #ifndef _di_level_0_parameter_checking_
       if (!file.size_write) return F_status_set_error(F_parameter);
-      if (buffer.used > buffer.size) return F_status_set_error(F_parameter);
       if (range.stop < range.start) return F_status_set_error(F_parameter);
       if (range.start >= buffer.used) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
index 00ed119084dec19bb05369dc822a4c3fc65d3ba7..2af1dc2cd173b2b1bee118812244eac8d29cfe63 100644 (file)
@@ -8,7 +8,6 @@ extern "C" {
 #ifndef _di_fll_iki_content_escape_
   f_status_t fll_iki_content_escape(const f_string_static_t content, const f_string_static_t quote, f_string_dynamic_t *escaped) {
     #ifndef _di_level_2_parameter_checking_
-      if (content.used > content.size) return F_status_set_error(F_parameter);
       if (!quote.used) return F_status_set_error(F_parameter);
       if (quote.string[0] != f_iki_syntax_quote_single_s.string[0] && quote.string[0] != f_iki_syntax_quote_double_s.string[0]) return F_status_set_error(F_parameter);
       if (escaped->used > escaped->size) return F_status_set_error(F_parameter);
@@ -23,7 +22,6 @@ extern "C" {
 #ifndef _di_fll_iki_content_partial_escape_
   f_status_t fll_iki_content_partial_escape(const f_string_static_t content, const f_string_range_t range, const f_string_static_t quote, f_string_dynamic_t *escaped) {
     #ifndef _di_level_2_parameter_checking_
-      if (content.used > content.size) return F_status_set_error(F_parameter);
       if (range.start > range.stop) return F_status_set_error(F_parameter);
       if (range.start >= content.used) return F_status_set_error(F_parameter);
       if (!quote.used) return F_status_set_error(F_parameter);
@@ -38,7 +36,6 @@ extern "C" {
 #ifndef _di_fll_iki_content_partial_unescape_
   f_status_t fll_iki_content_partial_unescape(const f_string_static_t content, const f_string_range_t range, const f_string_static_t quote, f_string_dynamic_t *unescaped) {
     #ifndef _di_level_2_parameter_checking_
-      if (content.used > content.size) return F_status_set_error(F_parameter);
       if (range.start > range.stop) return F_status_set_error(F_parameter);
       if (range.start >= content.used) return F_status_set_error(F_parameter);
       if (!quote.used) return F_status_set_error(F_parameter);
@@ -53,7 +50,6 @@ extern "C" {
 #ifndef _di_fll_iki_content_unescape_
   f_status_t fll_iki_content_unescape(const f_string_static_t content, const f_string_static_t quote, f_string_dynamic_t *unescaped) {
     #ifndef _di_level_2_parameter_checking_
-      if (content.used > content.size) return F_status_set_error(F_parameter);
       if (!quote.used) return F_status_set_error(F_parameter);
       if (quote.string[0] != f_iki_syntax_quote_single_s.string[0] && quote.string[0] != f_iki_syntax_quote_double_s.string[0]) return F_status_set_error(F_parameter);
       if (unescaped->used > unescaped->size) return F_status_set_error(F_parameter);
index bd5fc680a2550717c496392463ce4db005e802a3..f2b89ecebb02ca06ae5f06b3259883b784ae4e4c 100644 (file)
@@ -127,35 +127,32 @@ extern "C" {
 #endif // _di_fll_program_parameter_process_empty_
 
 #ifndef _di_fll_program_parameter_additional_append_
-  f_status_t fll_program_parameter_additional_append(const f_string_t *argv, const f_array_lengths_t values, f_string_dynamics_t *destination) {
+  f_status_t fll_program_parameter_additional_append(const f_string_static_t *arguments, const f_array_lengths_t values, f_string_dynamics_t *destination) {
     #ifndef _di_level_2_parameter_checking_
-      if (!argv) return F_status_set_error(F_parameter);
+      if (!arguments) return F_status_set_error(F_parameter);
       if (!destination) return F_status_set_error(F_parameter);
     #endif // _di_level_2_parameter_checking_
 
     f_status_t status = F_none;
 
-    f_array_length_t length = 0;
     const f_array_length_t start = destination->used;
 
     for (f_array_length_t i = 0; i < values.used; ++i) {
 
-      length = strnlen(argv[values.array[i]], F_console_parameter_size_d);
+      if (arguments[values.array[i]].used) {
+        status = f_string_dynamics_increase(F_memory_default_allocation_small_d, destination);
+        if (F_status_is_error(status)) break;
 
-      if (length > 0) {
-        f_string_dynamic_t ripped = f_string_dynamic_t_initialize;
+        destination->array[destination->used].used = 0;
 
-        status = f_string_append(argv[values.array[i]], length, &ripped);
-        if (F_status_is_error(status)) return status;
+        status = f_string_dynamic_append(arguments[values.array[i]], &destination->array[destination->used]);
+        if (F_status_is_error(status)) break;
 
         if (status == F_data_not) {
           status = F_none;
         }
         else {
-          macro_f_memory_structure_increment(status, (*destination), 1, F_memory_default_allocation_small_d, macro_f_string_dynamics_t_resize, F_array_too_large);
-          if (F_status_is_error(status)) break;
-
-          destination->array[destination->used++] = ripped;
+          ++destination->used;
         }
       }
     } // for
@@ -169,24 +166,21 @@ extern "C" {
 #endif // _di_fll_program_parameter_additional_append_
 
 #ifndef _di_fll_program_parameter_additional_mash_
-  f_status_t fll_program_parameter_additional_mash(const f_string_static_t glue, const f_string_t *argv, const f_array_lengths_t values, f_string_dynamic_t *destination) {
+  f_status_t fll_program_parameter_additional_mash(const f_string_static_t glue, const f_string_static_t *arguments, const f_array_lengths_t values, f_string_dynamic_t *destination) {
     #ifndef _di_level_2_parameter_checking_
-      if (!argv) return F_status_set_error(F_parameter);
+      if (!arguments) return F_status_set_error(F_parameter);
       if (!destination) return F_status_set_error(F_parameter);
     #endif // _di_level_2_parameter_checking_
 
     f_status_t status = F_none;
 
-    f_array_length_t length = 0;
     const f_array_length_t start = destination->used;
 
     for (f_array_length_t i = 0; i < values.used; ++i) {
 
-      length = strnlen(argv[values.array[i]], F_console_parameter_size_d);
-
-      if (length > 0) {
-        status = f_string_mash(glue.string, glue.used, argv[values.array[i]], length, destination);
-        if (F_status_is_error(status)) return F_status_set_error(F_string_too_large);
+      if (arguments[values.array[i]].used) {
+        status = f_string_dynamic_mash(glue, arguments[values.array[i]], destination);
+        if (F_status_is_error(status)) break;
       }
     } // for
 
@@ -199,34 +193,31 @@ extern "C" {
 #endif // _di_fll_program_parameter_additional_mash_
 
 #ifndef _di_fll_program_parameter_additional_rip_
-  f_status_t fll_program_parameter_additional_rip(const f_string_t *argv, const f_array_lengths_t values, f_string_dynamics_t *destination) {
+  f_status_t fll_program_parameter_additional_rip(const f_string_static_t *arguments, const f_array_lengths_t values, f_string_dynamics_t *destination) {
     #ifndef _di_level_2_parameter_checking_
-      if (!argv) return F_status_set_error(F_parameter);
+      if (!arguments) return F_status_set_error(F_parameter);
       if (!destination) return F_status_set_error(F_parameter);
     #endif // _di_level_2_parameter_checking_
 
     f_status_t status = F_none;
-    f_array_length_t length = 0;
     const f_array_length_t start = destination->used;
 
     for (f_array_length_t i = 0; i < values.used; ++i) {
 
-      length = strnlen(argv[values.array[i]], F_console_parameter_size_d);
+      if (arguments[values.array[i]].used) {
+        status = f_string_dynamics_increase(F_memory_default_allocation_small_d, destination);
+        if (F_status_is_error(status)) break;
 
-      if (length) {
-        f_string_dynamic_t ripped = f_string_dynamic_t_initialize;
+        destination->array[destination->used].used = 0;
 
-        status = fl_string_rip(argv[values.array[i]], length, &ripped);
-        if (F_status_is_error(status)) return status;
+        status = fl_string_rip(arguments[values.array[i]].string, arguments[values.array[i]].used, &destination->array[destination->used]);
+        if (F_status_is_error(status)) break;
 
         if (status == F_data_not) {
           status = F_none;
         }
         else {
-          macro_f_string_dynamics_t_increase(status, F_memory_default_allocation_small_d, (*destination));
-          if (F_status_is_error(status)) return status;
-
-          destination->array[destination->used++] = ripped;
+          ++destination->used;
         }
       }
     } // for
@@ -240,46 +231,33 @@ extern "C" {
 #endif // _di_fll_program_parameter_additional_rip_
 
 #ifndef _di_fll_program_parameter_additional_rip_mash_
-  f_status_t fll_program_parameter_additional_rip_mash(const f_string_static_t glue, const f_string_t *argv, const f_array_lengths_t values, f_string_dynamic_t *destination) {
+  f_status_t fll_program_parameter_additional_rip_mash(const f_string_static_t glue, const f_string_static_t *arguments, const f_array_lengths_t values, f_string_dynamic_t *destination) {
     #ifndef _di_level_2_parameter_checking_
-      if (!argv) return F_status_set_error(F_parameter);
+      if (!arguments) return F_status_set_error(F_parameter);
       if (!destination) return F_status_set_error(F_parameter);
     #endif // _di_level_2_parameter_checking_
 
     f_status_t status = F_none;
 
-    f_array_length_t length = 0;
     const f_array_length_t start = destination->used;
     f_string_dynamic_t ripped = f_string_dynamic_t_initialize;
 
     for (f_array_length_t i = 0; i < values.used; ++i) {
 
-      length = strnlen(argv[values.array[i]], F_console_parameter_size_d);
-
-      if (length > 0) {
-        status = fl_string_rip(argv[values.array[i]], length, &ripped);
+      if (arguments[values.array[i]].used) {
+        ripped.used = 0;
 
-        if (F_status_is_error(status)) {
-          f_string_dynamic_resize(0, &ripped);
+        status = fl_string_rip(arguments[values.array[i]].string, arguments[values.array[i]].used, &ripped);
+        if (F_status_is_error(status)) break;
 
-          return status;
-        }
-
-        if (ripped.used > 0) {
+        if (ripped.used) {
           status = f_string_dynamic_mash(glue, ripped, destination);
-
-          if (F_status_is_error(status)) {
-            status = f_string_dynamic_resize(0, &ripped);
-
-            return F_status_set_error(F_string_too_large);
-          }
+          if (F_status_is_error(status)) break;
         }
       }
     } // for
 
-    if (ripped.size) {
-      f_string_dynamic_resize(0, &ripped);
-    }
+    f_string_dynamic_resize(0, &ripped);
 
     if (status == F_none && start == destination->used) {
       return F_data_not;
index d2cd5751405b73d694a48145a994a6e5812bdcbd..694a5c907273043f239fe92cf39e960ad5ed7fa5 100644 (file)
@@ -242,7 +242,7 @@ extern "C" {
  *
  * Empty console parameters are ignored.
  *
- * @param argv
+ * @param arguments
  *   The program argument array to parse.
  *   The caller must guarantee that the values.used does not exceed the argv length.
  * @param values
@@ -258,12 +258,12 @@ extern "C" {
  *   F_memory_not (with error bit) on out of memory.
  *   F_parameter (with error bit) if a parameter is invalid.
  *
- *   Errors (with error bit) from: f_string_append().
+ *   Errors (with error bit) from: f_string_dynamic_append().
  *
- * @see f_string_append()
+ * @see f_string_dynamic_append()
  */
 #ifndef _di_fll_program_parameter_additional_append_
-  extern f_status_t fll_program_parameter_additional_append(const f_string_t *argv, const f_array_lengths_t values, f_string_dynamics_t *destination);
+  extern f_status_t fll_program_parameter_additional_append(const f_string_static_t *arguments, const f_array_lengths_t values, f_string_dynamics_t *destination);
 #endif // _di_fll_program_parameter_additional_append_
 
 /**
@@ -271,7 +271,7 @@ extern "C" {
  *
  * @param glue
  *   A string to append between the source and destination, such as a space: ' '.
- * @param argv
+ * @param arguments
  *   The program argument array to parse.
  *   The caller must guarantee that the values.used does not exceed the argv length.
  * @param values
@@ -287,12 +287,12 @@ extern "C" {
  *   F_parameter (with error bit) if a parameter is invalid.
  *   F_string_too_large (with error bit) if the combined string is too large.
  *
- *   Errors (with error bit) from: f_string_mash().
+ *   Errors (with error bit) from: f_string_dynamic_mash().
  *
- * @see f_string_mash()
+ * @see f_string_dynamic_mash()
  */
 #ifndef _di_fll_program_parameter_additional_mash_
-  extern f_status_t fll_program_parameter_additional_mash(const f_string_static_t glue, const f_string_t *argv, const f_array_lengths_t values, f_string_dynamic_t *destination);
+  extern f_status_t fll_program_parameter_additional_mash(const f_string_static_t glue, const f_string_static_t *arguments, const f_array_lengths_t values, f_string_dynamic_t *destination);
 #endif // _di_fll_program_parameter_additional_mash_
 
 /**
@@ -300,7 +300,7 @@ extern "C" {
  *
  * The console parameters are trimmed.
  *
- * @param argv
+ * @param arguments
  *   The program argument array to parse.
  *   The caller must guarantee that the values.used does not exceed the argv length.
  * @param values
@@ -320,7 +320,7 @@ extern "C" {
  * @see fl_string_rip()
  */
 #ifndef _di_fll_program_parameter_additional_rip_
-  extern f_status_t fll_program_parameter_additional_rip(const f_string_t *argv, const f_array_lengths_t values, f_string_dynamics_t *destination);
+  extern f_status_t fll_program_parameter_additional_rip(const f_string_static_t *arguments, const f_array_lengths_t values, f_string_dynamics_t *destination);
 #endif // _di_fll_program_parameter_additional_rip_
 
 /**
@@ -330,7 +330,7 @@ extern "C" {
  *
  * @param glue
  *   A string to append between the source and destination, such as a space: ' '.
- * @param argv
+ * @param arguments
  *   The program argument array to parse.
  * @param values
  *   The string locations where the console parameters are found.
@@ -352,7 +352,7 @@ extern "C" {
  * @see fl_string_rip()
  */
 #ifndef _di_fll_program_parameter_additional_rip_mash_
-  extern f_status_t fll_program_parameter_additional_rip_mash(const f_string_static_t glue, const f_string_t *argv, const f_array_lengths_t values, f_string_dynamic_t *destination);
+  extern f_status_t fll_program_parameter_additional_rip_mash(const f_string_static_t glue, const f_string_static_t *arguments, const f_array_lengths_t values, f_string_dynamic_t *destination);
 #endif // _di_fll_program_parameter_additional_rip_mash_
 
 /**
index cf891897b99f572f93c3b603dbf1232ee65ea552..d68c9c4038fa30cfc289b7bc67f379068f8f4869 100644 (file)
@@ -417,7 +417,7 @@ extern "C" {
 
               if (F_status_is_error(status)) {
                 // @todo instead call: fll_error_file_print().
-                // fll_error_file_print(main->error, F_status_set_fine(status), "fll_path_canonical", F_true, arguments->argv[location], f_file_operation_verify_s, fll_error_file_type_path_e);
+                // fll_error_file_print(main->error, F_status_set_fine(status), "fll_path_canonical", F_true, argv[index], f_file_operation_verify_s, fll_error_file_type_path_e);
                 controller_entry_print_error(is_entry, global.main->error, cache->action, F_status_set_fine(status), "fll_path_canonical", F_true, global.thread);
 
                 action->status = status;
index 8ffd116d2a220646edf00f9ff7dfe6fef25735a7..d9087b579a815759129bbb23c219bd9cb1ee21e4 100644 (file)
@@ -36,7 +36,7 @@
  * The "libraries/" and "programs/" directories contains the sub-directories "script/", "shared/", and "static/".
  * The "libraries/" directory will contain compiled libraries or library-like scripts in their respective sub-directories.
  * The "objects/" directory will contain any compile object files.
- * The "progams/" directory will contain compiled programs or program-like scripts in their respective sub-directories.
+ * The "programs/" directory will contain compiled programs or program-like scripts in their respective sub-directories.
  * The "settings/" directory contains all configuration data, such as files commonly found under /etc in a standard GNU Linux system.
  * The "stage/" directory will contain build-time data.
  */
index cdc81876b1e49211c872b05336cd34fa6611d454..3de20df146ca4edb83798ae671cd603548118617 100644 (file)
@@ -204,19 +204,18 @@ extern "C" {
             return F_status_set_error(F_parameter);
           }
 
-          f_array_length_t location = main->parameters.array[parameters_id[i]].values.array[0];
-          f_array_length_t length = strnlen(arguments->argv[location], F_console_parameter_size_d);
+          f_array_length_t index = main->parameters.array[parameters_id[i]].values.array[0];
 
-          if (length > 0) {
+          if (argv[index].used) {
             if (parameters_validate_word[i]) {
               f_array_length_t j = 0;
               f_array_length_t width_max = 0;
 
-              for (j = 0; j < length; ++j) {
+              for (j = 0; j < argv[index].used; ++j) {
 
-                width_max = length - j;
+                width_max = argv[index].used - j;
 
-                status = f_utf_is_word_dash_plus(arguments->argv[location] + j, width_max, F_false);
+                status = f_utf_is_word_dash_plus(argv[index] + j, width_max, F_false);
 
                 if (F_status_is_error(status)) {
                   if (fll_error_print(main->error, F_status_set_fine(status), "f_utf_is_word_dash_plus", F_false) == F_known_not && main->error.verbosity != f_console_verbosity_quiet_e) {
@@ -239,7 +238,7 @@ extern "C" {
                     fl_print_format("%r%[%QThe '%]", main->error.to.stream, f_string_eol_s, main->error.context, main->error.prefix, main->error.context);
                     fl_print_format("%[%r%r%]", main->error.to.stream, main->error.notable, f_console_symbol_long_enable_s, fake_long_process_s, main->error.notable);
                     fl_print_format("%[' parameters value '%]", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s);
-                    fl_print_format("%[%S%]", main->error.to.stream, main->error.notable, arguments->argv[location], main->error.notable);
+                    fl_print_format("%[%S%]", main->error.to.stream, main->error.notable, argv[index], main->error.notable);
                     fl_print_format("%[' contains non-word, non-dash, and non-plus characters.%]%r", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s);
 
                     funlockfile(main->error.to.stream);
@@ -250,7 +249,7 @@ extern "C" {
               } // for
             }
 
-            status = f_string_append(arguments->argv[location], length, parameters_value[i]);
+            status = f_string_append(argv[index], argv[index].used, parameters_value[i]);
 
             if (F_status_is_error(status)) {
               if (status == F_status_set_error(F_string_too_large)) {
@@ -275,7 +274,7 @@ extern "C" {
             }
           }
 
-          if (length == 0 || status == F_data_not) {
+          if (!argv[index].used || status == F_data_not) {
             if (main->error.verbosity != f_console_verbosity_quiet_e) {
               flockfile(main->error.to.stream);
 
@@ -350,7 +349,7 @@ extern "C" {
             return F_status_set_error(F_parameter);
           }
 
-          status = fl_console_parameter_to_string_dynamic_directory(arguments->argv[main->parameters.array[parameters_id[i]].values.array[0]], parameters_value[i]);
+          status = fl_console_parameter_to_string_dynamic_directory(argv[main->parameters.array[parameters_id[i]].values.array[0]], parameters_value[i]);
 
           if (F_status_is_error(status)) {
             if (fll_error_print(main->error, F_status_set_fine(status), "fl_console_parameter_to_string_dynamic_directory", F_false) == F_known_not && main->error.verbosity != f_console_verbosity_quiet_e) {
@@ -389,7 +388,7 @@ extern "C" {
     }
 
     if (main->parameters.array[fake_parameter_define_e].result == f_console_result_additional_e) {
-      status = fll_program_parameter_additional_rip(arguments->argv, main->parameters.array[fake_parameter_define_e].values, &main->define);
+      status = fll_program_parameter_additional_rip(argv, main->parameters.array[fake_parameter_define_e].values, &main->define);
 
       if (F_status_is_error(status)) {
         if (fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_additional_rip", F_false) == F_known_not && main->error.verbosity != f_console_verbosity_quiet_e) {
@@ -411,7 +410,7 @@ extern "C" {
       return F_status_set_error(F_parameter);
     }
     else if (main->parameters.array[fake_parameter_mode_e].result == f_console_result_additional_e) {
-      status = fll_program_parameter_additional_rip(arguments->argv, main->parameters.array[fake_parameter_mode_e].values, &main->mode);
+      status = fll_program_parameter_additional_rip(argv, main->parameters.array[fake_parameter_mode_e].values, &main->mode);
 
       if (F_status_is_error(status)) {
         if (fll_error_print(main->error, F_status_set_fine(status), "fll_program_parameter_additional_rip", F_false) == F_known_not && main->error.verbosity != f_console_verbosity_quiet_e) {
index e86418c0e815d825b29b000b9b7d876cb8121ae2..a3ced28508d8c4ea17b39c436757cc06a3fe14ef 100644 (file)
@@ -352,7 +352,7 @@ extern "C" {
       }
 
       if (F_status_is_error_not(status) && main->parameters.array[fss_basic_list_read_parameter_delimit_e].result == f_console_result_additional_e) {
-        f_array_length_t location = 0;
+        f_array_length_t index = 0;
         f_array_length_t length = 0;
         uint16_t signal_check = 0;
 
@@ -371,8 +371,8 @@ extern "C" {
             signal_check = 0;
           }
 
-          location = main->parameters.array[fss_basic_list_read_parameter_delimit_e].values.array[i];
-          length = strnlen(arguments->argv[location], F_console_parameter_size_d);
+          index = main->parameters.array[fss_basic_list_read_parameter_delimit_e].values.array[i];
+          length = argv[index].used;
 
           if (!length) {
             flockfile(main->error.to.stream);
@@ -387,13 +387,13 @@ extern "C" {
 
             break;
           }
-          else if (fl_string_compare(arguments->argv[location], fss_basic_list_read_delimit_mode_name_none_s, length, fss_basic_list_read_delimit_mode_name_none_s_length) == F_equal_to) {
+          else if (fl_string_dynamic_compare_string(fss_basic_list_read_delimit_mode_name_none_s.string, argv[index], fss_basic_list_read_delimit_mode_name_none_s.used) == F_equal_to) {
             data.delimit_mode = fss_basic_list_read_delimit_mode_none_e;
           }
-          else if (fl_string_compare(arguments->argv[location], fss_basic_list_read_delimit_mode_name_all_s, length, fss_basic_list_read_delimit_mode_name_all_s_length) == F_equal_to) {
+          else if (fl_string_dynamic_compare_string(fss_basic_list_read_delimit_mode_name_all_s.string, argv[index], fss_basic_list_read_delimit_mode_name_all_s.used) == F_equal_to) {
             data.delimit_mode = fss_basic_list_read_delimit_mode_all_e;
           }
-          else if (fl_string_compare(arguments->argv[location], fss_basic_list_read_delimit_mode_name_object_s, length, fss_basic_list_read_delimit_mode_name_object_s_length) == F_equal_to) {
+          else if (fl_string_dynamic_compare_string(fss_basic_list_read_delimit_mode_name_object_s.string, argv[index], fss_basic_list_read_delimit_mode_name_object_s.used) == F_equal_to) {
             switch (data.delimit_mode) {
               case 0:
                 data.delimit_mode = fss_basic_list_read_delimit_mode_object_e;
@@ -430,7 +430,7 @@ extern "C" {
               data.delimit_mode = fss_basic_list_read_delimit_mode_content_object_e;
             }
 
-            if (arguments->argv[location][length - 1] == fss_basic_list_read_delimit_mode_name_greater_s.string[0]) {
+            if (argv[index][length - 1] == fss_basic_list_read_delimit_mode_name_greater_s.string[0]) {
               if (!(data.delimit_mode == fss_basic_list_read_delimit_mode_none_e || data.delimit_mode == fss_basic_list_read_delimit_mode_all_e)) {
                 if (data.delimit_mode == fss_basic_list_read_delimit_mode_content_object_e) {
                   data.delimit_mode = fss_basic_list_read_delimit_mode_content_greater_object_e;
@@ -443,7 +443,7 @@ extern "C" {
               // Shorten the length to better convert the remainder to a number.
               --length;
             }
-            else if (arguments->argv[location][length - 1] == fss_basic_list_read_delimit_mode_name_lesser_s.string[0]) {
+            else if (argv[index][length - 1] == fss_basic_list_read_delimit_mode_name_lesser_s.string[0]) {
               if (!(data.delimit_mode == fss_basic_list_read_delimit_mode_none_e || data.delimit_mode == fss_basic_list_read_delimit_mode_all_e)) {
                 if (data.delimit_mode == fss_basic_list_read_delimit_mode_content_object_e) {
                   data.delimit_mode = fss_basic_list_read_delimit_mode_content_lesser_object_e;
@@ -460,14 +460,14 @@ extern "C" {
             f_string_range_t range = macro_f_string_range_t_initialize(length);
 
             // Ignore leading plus sign.
-            if (arguments->argv[location][0] == '+') {
+            if (argv[index][0] == f_string_ascii_plus_s[0]) {
               ++range.start;
             }
 
-            status = fl_conversion_string_to_number_unsigned(arguments->argv[location], range, &data.delimit_depth);
+            status = fl_conversion_string_to_number_unsigned(argv[index].string, range, &data.delimit_depth);
 
             if (F_status_is_error(status)) {
-              fll_error_parameter_integer_print(main->error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_basic_list_read_long_delimit_s, arguments->argv[location]);
+              fll_error_parameter_integer_print(main->error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_basic_list_read_long_delimit_s, argv[index]);
 
               break;
             }
@@ -546,10 +546,10 @@ extern "C" {
 
           // This standard is newline sensitive, when appending files to the buffer if the file lacks a final newline then this could break the format for files appended thereafter.
           // Guarantee that a newline exists at the end of the buffer.
-          status = f_string_append_assure(f_string_eol_s, 1, &data.buffer);
+          status = f_string_dynamic_append_assure(f_string_eol_s, &data.buffer);
 
           if (F_status_is_error(status)) {
-            fll_error_file_print(main->error, F_status_set_fine(status), "f_string_append_assure", F_true, f_string_ascii_minus_s, f_file_operation_read_s, fll_error_file_type_pipe_e);
+            fll_error_file_print(main->error, F_status_set_fine(status), "f_string_dynamic_append_assure", F_true, f_string_ascii_minus_s, f_file_operation_read_s, fll_error_file_type_pipe_e);
           }
         }
         else {
@@ -578,10 +578,10 @@ extern "C" {
           file.stream = 0;
           file.id = -1;
 
-          status = f_file_stream_open(arguments->argv[main->parameters.remaining.array[i]], 0, &file);
+          status = f_file_stream_open(argv[main->parameters.remaining.array[i]], 0, &file);
 
           if (F_status_is_error(status)) {
-            fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_open", F_true, arguments->argv[main->parameters.remaining.array[i]], f_file_operation_open_s, fll_error_file_type_file_e);
+            fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_open", F_true, argv[main->parameters.remaining.array[i]], f_file_operation_open_s, fll_error_file_type_file_e);
 
             break;
           }
@@ -590,7 +590,7 @@ extern "C" {
           status = f_file_size_by_id(file.id, &size_file);
 
           if (F_status_is_error(status)) {
-            fll_error_file_print(main->error, F_status_set_fine(status), "f_file_size_by_id", F_true, arguments->argv[main->parameters.remaining.array[i]], f_file_operation_read_s, fll_error_file_type_file_e);
+            fll_error_file_print(main->error, F_status_set_fine(status), "f_file_size_by_id", F_true, argv[main->parameters.remaining.array[i]], f_file_operation_read_s, fll_error_file_type_file_e);
 
             break;
           }
@@ -599,7 +599,7 @@ extern "C" {
             status = f_string_dynamic_resize(data.buffer.size + size_file, &data.buffer);
 
             if (F_status_is_error(status)) {
-              fll_error_file_print(main->error, F_status_set_fine(status), "f_string_dynamic_resize", F_true, arguments->argv[main->parameters.remaining.array[i]], f_file_operation_read_s, fll_error_file_type_file_e);
+              fll_error_file_print(main->error, F_status_set_fine(status), "f_string_dynamic_resize", F_true, argv[main->parameters.remaining.array[i]], f_file_operation_read_s, fll_error_file_type_file_e);
 
               break;
             }
@@ -607,20 +607,20 @@ extern "C" {
             status = f_file_stream_read(file, &data.buffer);
 
             if (F_status_is_error(status)) {
-              fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_read", F_true, arguments->argv[main->parameters.remaining.array[i]], f_file_operation_read_s, fll_error_file_type_file_e);
+              fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_read", F_true, argv[main->parameters.remaining.array[i]], f_file_operation_read_s, fll_error_file_type_file_e);
 
               break;
             }
             else if (data.buffer.used > data.files.array[data.files.used].range.start) {
-              data.files.array[data.files.used].name = arguments->argv[main->parameters.remaining.array[i]];
+              data.files.array[data.files.used].name = argv[main->parameters.remaining.array[i]];
               data.files.array[data.files.used++].range.stop = data.buffer.used - 1;
 
               // This standard is newline sensitive, when appending files to the buffer if the file lacks a final newline then this could break the format for files appended thereafter.
               // Guarantee that a newline exists at the end of the buffer.
-              status = f_string_append_assure(f_string_eol_s, 1, &data.buffer);
+              status = f_string_dynamic_append_assure(f_string_eol_s, &data.buffer);
 
               if (F_status_is_error(status)) {
-                fll_error_file_print(main->error, F_status_set_fine(status), "f_string_append_assure", F_true, f_string_ascii_minus_s, f_file_operation_read_s, fll_error_file_type_pipe_e);
+                fll_error_file_print(main->error, F_status_set_fine(status), "f_string_dynamic_append_assure", F_true, f_string_ascii_minus_s, f_file_operation_read_s, fll_error_file_type_pipe_e);
               }
             }
           }
index 928ea681e96434c7a9898d68b72494041af46a88..e26fbc57f0a8e0a868d70dff10f522afa6a7ebd8 100644 (file)
@@ -108,12 +108,12 @@ extern "C" {
       else {
         position_depth = main->parameters.array[fss_basic_list_read_parameter_depth_e].values.array[i];
 
-        const f_string_range_t range = macro_f_string_range_t_initialize(strlen(arguments->argv[position_depth]));
+        const f_string_range_t range = macro_f_string_range_t_initialize(strlen(argv[position_depth]));
 
-        status = fl_conversion_string_to_number_unsigned(arguments->argv[position_depth], range, &data->depths.array[i].depth);
+        status = fl_conversion_string_to_number_unsigned(argv[position_depth].string, range, &data->depths.array[i].depth);
 
         if (F_status_is_error(status)) {
-          fll_error_parameter_integer_print(main->error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_basic_list_read_long_depth_s, arguments->argv[position_depth]);
+          fll_error_parameter_integer_print(main->error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_basic_list_read_long_depth_s, argv[position_depth]);
 
           return status;
         }
@@ -132,12 +132,12 @@ extern "C" {
 
           data->depths.array[i].index_at = main->parameters.array[fss_basic_list_read_parameter_at_e].values.array[position_at];
 
-          const f_string_range_t range = macro_f_string_range_t_initialize(strlen(arguments->argv[data->depths.array[i].index_at]));
+          const f_string_range_t range = macro_f_string_range_t_initialize(argv[data->depths.array[i].index_at].used);
 
-          status = fl_conversion_string_to_number_unsigned(arguments->argv[data->depths.array[i].index_at], range, &data->depths.array[i].value_at);
+          status = fl_conversion_string_to_number_unsigned(argv[data->depths.array[i].index_at].string, range, &data->depths.array[i].value_at);
 
           if (F_status_is_error(status)) {
-            fll_error_parameter_integer_print(main->error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_basic_list_read_long_at_s, arguments->argv[data->depths.array[i].index_at]);
+            fll_error_parameter_integer_print(main->error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_basic_list_read_long_at_s, argv[data->depths.array[i].index_at]);
 
             return status;
           }
@@ -158,14 +158,14 @@ extern "C" {
           data->depths.array[i].index_name = main->parameters.array[fss_basic_list_read_parameter_name_e].values.array[position_name];
 
           if (main->parameters.array[fss_basic_list_read_parameter_trim_e].result == f_console_result_found_e) {
-            status = fl_string_rip(arguments->argv[data->depths.array[i].index_name], strlen(arguments->argv[data->depths.array[i].index_name]), &data->depths.array[i].value_name);
+            status = fl_string_dynamic_rip(argv[data->depths.array[i].index_name], &data->depths.array[i].value_name);
           }
           else {
-            status = f_string_append(arguments->argv[data->depths.array[i].index_name], strlen(arguments->argv[data->depths.array[i].index_name]), &data->depths.array[i].value_name);
+            status = f_string_dynamic_append(argv[data->depths.array[i].index_name], &data->depths.array[i].value_name);
           }
 
           if (F_status_is_error(status)) {
-            fll_error_print(main->error, F_status_set_fine(status), main->parameters.array[fss_basic_list_read_parameter_trim_e].result == f_console_result_found_e ? "fl_string_rip" : "f_string_append", F_true);
+            fll_error_print(main->error, F_status_set_fine(status), main->parameters.array[fss_basic_list_read_parameter_trim_e].result == f_console_result_found_e ? "fl_string_dynamic_rip" : "f_string_dynamic_append", F_true);
 
             return status;
           }
@@ -200,7 +200,8 @@ extern "C" {
 
           return F_status_set_error(F_parameter);
         }
-        else if (data->depths.array[i].depth > data->depths.array[j].depth) {
+
+        if (data->depths.array[i].depth > data->depths.array[j].depth) {
           if (main->error.verbosity != f_console_verbosity_quiet_e) {
             flockfile(main->error.to.stream);
 
@@ -285,12 +286,12 @@ extern "C" {
 
     if (main->parameters.array[parameter].result == f_console_result_additional_e) {
       const f_array_length_t index = main->parameters.array[parameter].values.array[main->parameters.array[parameter].values.used - 1];
-      const f_string_range_t range = macro_f_string_range_t_initialize(strnlen(arguments->argv[index], F_console_parameter_size_d));
+      const f_string_range_t range = macro_f_string_range_t_initialize(main->argv[index].used);
 
-      const f_status_t status = fl_conversion_string_to_number_unsigned(arguments->argv[index], range, number);
+      const f_status_t status = fl_conversion_string_to_number_unsigned(main->argv[index].string, range, number);
 
       if (F_status_is_error(status)) {
-        fll_error_parameter_integer_print(main->error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, name, arguments->argv[index]);
+        fll_error_parameter_integer_print(main->error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, name, main->argv[index]);
 
         return status;
       }
index 13aec6115f503affa3a5f3ec7f68b2345d5d75f0..b2dde6b87ea32501f167cba8ec229b35c7cb2d2a 100644 (file)
@@ -178,14 +178,14 @@ extern "C" {
           status = F_status_set_error(F_parameter);
         }
         else {
-          const f_array_length_t location = main->parameters.array[fss_basic_list_write_parameter_file_e].values.array[0];
+          const f_array_length_t index = main->parameters.array[fss_basic_list_write_parameter_file_e].values.array[0];
 
           output.id = -1;
           output.stream = 0;
-          status = f_file_stream_open(arguments->argv[location], 0, &output);
+          status = f_file_stream_open(argv[index], f_string_static_empty_s, &output);
 
           if (F_status_is_error(status)) {
-            fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_open", F_true, arguments->argv[location], f_file_operation_open_s, fll_error_file_type_file_e);
+            fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_open", F_true, argv[index], f_file_operation_open_s, fll_error_file_type_file_e);
           }
         }
       }
@@ -324,18 +324,13 @@ extern "C" {
       }
       else if (main->parameters.array[fss_basic_list_write_parameter_prepend_e].result == f_console_result_additional_e) {
         const f_array_length_t index = main->parameters.array[fss_basic_list_write_parameter_prepend_e].values.array[main->parameters.array[fss_basic_list_write_parameter_prepend_e].values.used - 1];
-        const f_array_length_t length = strnlen(arguments->argv[index], F_console_parameter_size_d);
 
-        if (length) {
-          f_string_range_t range = macro_f_string_range_t_initialize(length);
+        if (argv[index].used) {
+          f_string_range_t range = macro_f_string_range_t_initialize(argv[index].used);
 
-          main->prepend.string = arguments->argv[index];
-          main->prepend.used = length;
-          main->prepend.size = length;
+          for (; range.start < argv[index].used; ++range.start) {
 
-          for (; range.start < length; range.start++) {
-
-            status = f_fss_is_space(main->prepend, range);
+            status = f_fss_is_space(argv[index], range);
             if (F_status_is_error(status)) break;
 
             if (status == F_false) {
@@ -419,12 +414,8 @@ extern "C" {
     }
 
     f_string_dynamic_t buffer = f_string_dynamic_t_initialize;
-    f_string_dynamic_t object = f_string_dynamic_t_initialize;
-    f_string_dynamic_t content = f_string_dynamic_t_initialize;
 
     if (F_status_is_error_not(status)) {
-      f_string_dynamic_t escaped = f_string_dynamic_t_initialize;
-
       if (main->process_pipe) {
         status = fss_basic_list_write_process_pipe(main, output, quote, &buffer);
 
@@ -452,11 +443,7 @@ extern "C" {
                 break;
               }
 
-              object.string = arguments->argv[main->parameters.array[fss_basic_list_write_parameter_object_e].values.array[i]];
-              object.used = strnlen(object.string, F_console_parameter_size_d);
-              object.size = object.used;
-
-              status = fss_basic_list_write_process(main, output, quote, &object, 0, &buffer);
+              status = fss_basic_list_write_process(main, output, quote, &argv[main->parameters.array[fss_basic_list_write_parameter_object_e].values.array[i]], 0, &buffer);
               if (F_status_is_error(status)) break;
             } // for
           }
@@ -469,11 +456,7 @@ extern "C" {
                 break;
               }
 
-              content.string = arguments->argv[main->parameters.array[fss_basic_list_write_parameter_content_e].values.array[i]];
-              content.used = strnlen(content.string, F_console_parameter_size_d);
-              content.size = content.used;
-
-              status = fss_basic_list_write_process(main, output, quote, 0, &content, &buffer);
+              status = fss_basic_list_write_process(main, output, quote, 0, &argv[main->parameters.array[fss_basic_list_write_parameter_content_e].values.array[i]], &buffer);
               if (F_status_is_error(status)) break;
             } // for
           }
@@ -487,15 +470,7 @@ extern "C" {
               break;
             }
 
-            object.string = arguments->argv[main->parameters.array[fss_basic_list_write_parameter_object_e].values.array[i]];
-            object.used = strnlen(object.string, F_console_parameter_size_d);
-            object.size = object.used;
-
-            content.string = arguments->argv[main->parameters.array[fss_basic_list_write_parameter_content_e].values.array[i]];
-            content.used = strnlen(content.string, F_console_parameter_size_d);
-            content.size = content.used;
-
-            status = fss_basic_list_write_process(main, output, quote, &object, &content, &buffer);
+            status = fss_basic_list_write_process(main, output, quote, &argv[main->parameters.array[fss_basic_list_write_parameter_object_e].values.array[i]], &argv[main->parameters.array[fss_basic_list_write_parameter_content_e].values.array[i]], &buffer);
             if (F_status_is_error(status)) break;
           } // for
         }
@@ -516,17 +491,6 @@ extern "C" {
           fll_print_dynamic_raw(f_string_eol_s, main->output.to.stream);
         }
       }
-
-      f_string_dynamic_resize(0, &escaped);
-
-      // Object and content, though being a "dynamic" type, is being used statically, so clear them up to avoid invalid free().
-      object.string = 0;
-      object.used = 0;
-      object.size = 0;
-
-      content.string = 0;
-      content.used = 0;
-      content.size = 0;
     }
 
     if (main->parameters.array[fss_basic_list_write_parameter_file_e].result == f_console_result_additional_e) {
@@ -543,8 +507,6 @@ extern "C" {
     }
 
     f_string_dynamic_resize(0, &buffer);
-    f_string_dynamic_resize(0, &object);
-    f_string_dynamic_resize(0, &content);
     fss_basic_list_write_main_delete(main);
 
     return status;
index f687e157fd56e996a962bf0f2cd55869e5568a83..5febba1e339109af6a43eb44a1192591e5254c40 100644 (file)
@@ -352,7 +352,7 @@ extern "C" {
       }
 
       if (F_status_is_error_not(status) && main->parameters.array[fss_basic_read_parameter_delimit_e].result == f_console_result_additional_e) {
-        f_array_length_t location = 0;
+        f_array_length_t index = 0;
         f_array_length_t length = 0;
 
         // Set the value to 0 to allow for detecting mode based on what is provided.
@@ -366,8 +366,8 @@ extern "C" {
             break;
           }
 
-          location = main->parameters.array[fss_basic_read_parameter_delimit_e].values.array[i];
-          length = strnlen(arguments->argv[location], F_console_parameter_size_d);
+          index = main->parameters.array[fss_basic_read_parameter_delimit_e].values.array[i];
+          length = argv[index].used;
 
           if (!length) {
             flockfile(main->error.to.stream);
@@ -382,13 +382,13 @@ extern "C" {
 
             break;
           }
-          else if (fl_string_compare(arguments->argv[location], fss_basic_read_delimit_mode_name_none_s, length, fss_basic_read_delimit_mode_name_none_s_length) == F_equal_to) {
+          else if (fl_string_dynamic_compare_string(fss_basic_read_delimit_mode_name_none_s.string, argv[index], fss_basic_read_delimit_mode_name_none_s.used) == F_equal_to) {
             data.delimit_mode = fss_basic_read_delimit_mode_none_e;
           }
-          else if (fl_string_compare(arguments->argv[location], fss_basic_read_delimit_mode_name_all_s, length, fss_basic_read_delimit_mode_name_all_s_length) == F_equal_to) {
+          else if (fl_string_dynamic_compare_string(fss_basic_read_delimit_mode_name_all_s.string, argv[index], fss_basic_read_delimit_mode_name_all_s.used) == F_equal_to) {
             data.delimit_mode = fss_basic_read_delimit_mode_all_e;
           }
-          else if (fl_string_compare(arguments->argv[location], fss_basic_read_delimit_mode_name_object_s, length, fss_basic_read_delimit_mode_name_object_s_length) == F_equal_to) {
+          else if (fl_string_dynamic_compare_string(fss_basic_read_delimit_mode_name_object_s.string, argv[index], fss_basic_read_delimit_mode_name_object_s.used) == F_equal_to) {
             switch (data.delimit_mode) {
               case 0:
                 data.delimit_mode = fss_basic_read_delimit_mode_object_e;
@@ -425,7 +425,7 @@ extern "C" {
               data.delimit_mode = fss_basic_read_delimit_mode_content_object_e;
             }
 
-            if (arguments->argv[location][length - 1] == fss_basic_read_delimit_mode_name_greater_s.string[0]) {
+            if (argv[index][length - 1] == fss_basic_read_delimit_mode_name_greater_s.string[0]) {
               if (!(data.delimit_mode == fss_basic_read_delimit_mode_none_e || data.delimit_mode == fss_basic_read_delimit_mode_all_e)) {
                 if (data.delimit_mode == fss_basic_read_delimit_mode_content_object_e) {
                   data.delimit_mode = fss_basic_read_delimit_mode_content_greater_object_e;
@@ -438,7 +438,7 @@ extern "C" {
               // Shorten the length to better convert the remainder to a number.
               --length;
             }
-            else if (arguments->argv[location][length - 1] == fss_basic_read_delimit_mode_name_lesser_s.string[0]) {
+            else if (argv[index][length - 1] == fss_basic_read_delimit_mode_name_lesser_s.string[0]) {
               if (!(data.delimit_mode == fss_basic_read_delimit_mode_none_e || data.delimit_mode == fss_basic_read_delimit_mode_all_e)) {
                 if (data.delimit_mode == fss_basic_read_delimit_mode_content_object_e) {
                   data.delimit_mode = fss_basic_read_delimit_mode_content_lesser_object_e;
@@ -455,14 +455,14 @@ extern "C" {
             f_string_range_t range = macro_f_string_range_t_initialize(length);
 
             // Ignore leading plus sign.
-            if (arguments->argv[location][0] == '+') {
+            if (argv[index][0] == '+') {
               ++range.start;
             }
 
-            status = fl_conversion_string_to_number_unsigned(arguments->argv[location], range, &data.delimit_depth);
+            status = fl_conversion_string_to_number_unsigned(argv[index].string, range, &data.delimit_depth);
 
             if (F_status_is_error(status)) {
-              fll_error_parameter_integer_print(main->error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_basic_read_long_delimit_s, arguments->argv[location]);
+              fll_error_parameter_integer_print(main->error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_basic_read_long_delimit_s, argv[index]);
 
               break;
             }
@@ -560,6 +560,7 @@ extern "C" {
 
           if (fss_basic_read_signal_received(main)) {
             status = F_status_set_error(F_signal);
+
             break;
           }
 
@@ -567,10 +568,10 @@ extern "C" {
           file.stream = 0;
           file.id = -1;
 
-          status = f_file_stream_open(arguments->argv[main->parameters.remaining.array[i]], 0, &file);
+          status = f_file_stream_open(argv[main->parameters.remaining.array[i]], 0, &file);
 
           if (F_status_is_error(status)) {
-            fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_open", F_true, arguments->argv[main->parameters.remaining.array[i]], f_file_operation_open_s, fll_error_file_type_file_e);
+            fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_open", F_true, argv[main->parameters.remaining.array[i]], f_file_operation_open_s, fll_error_file_type_file_e);
 
             break;
           }
@@ -579,7 +580,7 @@ extern "C" {
           status = f_file_size_by_id(file.id, &size_file);
 
           if (F_status_is_error(status)) {
-            fll_error_file_print(main->error, F_status_set_fine(status), "f_file_size_by_id", F_true, arguments->argv[main->parameters.remaining.array[i]], f_file_operation_read_s, fll_error_file_type_file_e);
+            fll_error_file_print(main->error, F_status_set_fine(status), "f_file_size_by_id", F_true, argv[main->parameters.remaining.array[i]], f_file_operation_read_s, fll_error_file_type_file_e);
 
             break;
           }
@@ -588,7 +589,7 @@ extern "C" {
             status = f_string_dynamic_resize(data.buffer.size + size_file, &data.buffer);
 
             if (F_status_is_error(status)) {
-              fll_error_file_print(main->error, F_status_set_fine(status), "f_string_dynamic_resize", F_true, arguments->argv[main->parameters.remaining.array[i]], f_file_operation_read_s, fll_error_file_type_file_e);
+              fll_error_file_print(main->error, F_status_set_fine(status), "f_string_dynamic_resize", F_true, argv[main->parameters.remaining.array[i]], f_file_operation_read_s, fll_error_file_type_file_e);
 
               break;
             }
@@ -596,13 +597,13 @@ extern "C" {
             status = f_file_stream_read(file, &data.buffer);
 
             if (F_status_is_error(status)) {
-              fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_read", F_true, arguments->argv[main->parameters.remaining.array[i]], f_file_operation_read_s, fll_error_file_type_file_e);
+              fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_read", F_true, argv[main->parameters.remaining.array[i]], f_file_operation_read_s, fll_error_file_type_file_e);
 
               break;
             }
 
             if (data.buffer.used > data.files.array[data.files.used].range.start) {
-              data.files.array[data.files.used].name = arguments->argv[main->parameters.remaining.array[i]];
+              data.files.array[data.files.used].name = argv[main->parameters.remaining.array[i]];
               data.files.array[data.files.used++].range.stop = data.buffer.used - 1;
 
               // This standard is newline sensitive, when appending files to the buffer if the file lacks a final newline then this could break the format for files appended thereafter.
index 3089404c973744d1f135fd9ca3befb6f9f26ffa5..7643acc2f6648be9f63e199eb98a19fd3aea666d 100644 (file)
@@ -80,12 +80,12 @@ extern "C" {
       else {
         position_depth = main->parameters.array[fss_basic_read_parameter_depth_e].values.array[i];
 
-        const f_string_range_t range = macro_f_string_range_t_initialize(strlen(arguments->argv[position_depth]));
+        const f_string_range_t range = macro_f_string_range_t_initialize(strlen(argv[position_depth]));
 
-        status = fl_conversion_string_to_number_unsigned(arguments->argv[position_depth], range, &data->depths.array[i].depth);
+        status = fl_conversion_string_to_number_unsigned(argv[position_depth], range, &data->depths.array[i].depth);
 
         if (F_status_is_error(status)) {
-          fll_error_parameter_integer_print(main->error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_basic_read_long_depth_s, arguments->argv[position_depth]);
+          fll_error_parameter_integer_print(main->error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_basic_read_long_depth_s, argv[position_depth]);
 
           return status;
         }
@@ -104,12 +104,12 @@ extern "C" {
 
           data->depths.array[i].index_at = main->parameters.array[fss_basic_read_parameter_at_e].values.array[position_at];
 
-          const f_string_range_t range = macro_f_string_range_t_initialize(strlen(arguments->argv[data->depths.array[i].index_at]));
+          const f_string_range_t range = macro_f_string_range_t_initialize(strlen(argv[data->depths.array[i].index_at]));
 
-          status = fl_conversion_string_to_number_unsigned(arguments->argv[data->depths.array[i].index_at], range, &data->depths.array[i].value_at);
+          status = fl_conversion_string_to_number_unsigned(argv[data->depths.array[i].index_at], range, &data->depths.array[i].value_at);
 
           if (F_status_is_error(status)) {
-            fll_error_parameter_integer_print(main->error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_basic_read_long_at_s, arguments->argv[data->depths.array[i].index_at]);
+            fll_error_parameter_integer_print(main->error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_basic_read_long_at_s, argv[data->depths.array[i].index_at]);
 
             return status;
           }
@@ -130,14 +130,14 @@ extern "C" {
           data->depths.array[i].index_name = main->parameters.array[fss_basic_read_parameter_name_e].values.array[position_name];
 
           if (main->parameters.array[fss_basic_read_parameter_trim_e].result == f_console_result_found_e) {
-            status = fl_string_rip(arguments->argv[data->depths.array[i].index_name], strlen(arguments->argv[data->depths.array[i].index_name]), &data->depths.array[i].value_name);
+            status = fl_string_dynamic_rip(argv[data->depths.array[i].index_name], &data->depths.array[i].value_name);
           }
           else {
-            status = f_string_append(arguments->argv[data->depths.array[i].index_name], strlen(arguments->argv[data->depths.array[i].index_name]), &data->depths.array[i].value_name);
+            status = f_string_dynamic_append(argv[data->depths.array[i].index_name], &data->depths.array[i].value_name);
           }
 
           if (F_status_is_error(status)) {
-            fll_error_print(main->error, F_status_set_fine(status), main->parameters.array[fss_basic_read_parameter_trim_e].result == f_console_result_found_e ? "fl_string_rip" : "f_string_append", F_true);
+            fll_error_print(main->error, F_status_set_fine(status), main->parameters.array[fss_basic_read_parameter_trim_e].result == f_console_result_found_e ? "fl_string_dynamic_rip" : "f_string_dynamic_append", F_true);
 
             return status;
           }
@@ -250,12 +250,12 @@ extern "C" {
 
     if (main->parameters.array[parameter].result == f_console_result_additional_e) {
       const f_array_length_t index = main->parameters.array[parameter].values.array[main->parameters.array[parameter].values.used - 1];
-      const f_string_range_t range = macro_f_string_range_t_initialize(strnlen(arguments->argv[index], F_console_parameter_size_d));
+      const f_string_range_t range = macro_f_string_range_t_initialize(strnlen(argv[index], F_console_parameter_size_d));
 
-      const f_status_t status = fl_conversion_string_to_number_unsigned(arguments->argv[index], range, number);
+      const f_status_t status = fl_conversion_string_to_number_unsigned(argv[index].string, range, number);
 
       if (F_status_is_error(status)) {
-        fll_error_parameter_integer_print(main->error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, name, arguments->argv[index]);
+        fll_error_parameter_integer_print(main->error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, name, argv[index]);
 
         return status;
       }
index 30028a8fe2256903ab036f2b2b5f0c0b1385186a..5f2ae691a11f90012a5570161eedb1136fade744 100644 (file)
@@ -176,14 +176,14 @@ extern "C" {
           status = F_status_set_error(F_parameter);
         }
         else {
-          const f_array_length_t location = main->parameters.array[fss_basic_write_parameter_file_e].values.array[0];
+          const f_array_length_t index = main->parameters.array[fss_basic_write_parameter_file_e].values.array[0];
 
           output.id = -1;
           output.stream = 0;
-          status = f_file_stream_open(arguments->argv[location], 0, &output);
+          status = f_file_stream_open(argv[index], f_string_empty_s, &output);
 
           if (F_status_is_error(status)) {
-            fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_open", F_true, arguments->argv[location], f_file_operation_open_s, fll_error_file_type_file_e);
+            fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_open", F_true, argv[index], f_file_operation_open_s, fll_error_file_type_file_e);
           }
         }
       }
@@ -322,16 +322,14 @@ extern "C" {
       }
       else if (main->parameters.array[fss_basic_write_parameter_prepend_e].result == f_console_result_additional_e) {
         const f_array_length_t index = main->parameters.array[fss_basic_write_parameter_prepend_e].values.array[main->parameters.array[fss_basic_write_parameter_prepend_e].values.used - 1];
-        const f_array_length_t length = strnlen(arguments->argv[index], F_console_parameter_size_d);
 
         // Even though this standard does not utilize this parameter, provide the validation for consistency.
-        if (length) {
-          f_string_range_t range = macro_f_string_range_t_initialize(length);
-          const f_string_static_t prepend = macro_f_string_static_t_initialize2(arguments->argv[index], length);
+        if (argv[index].used) {
+          f_string_range_t range = macro_f_string_range_t_initialize(argv[index].used);
 
-          for (; range.start < length; range.start++) {
+          for (; range.start < argv[index].used; ++range.start) {
 
-            status = f_fss_is_space(prepend, range);
+            status = f_fss_is_space(argv[index], range);
             if (F_status_is_error(status)) break;
 
             if (status == F_false) {
@@ -415,12 +413,8 @@ extern "C" {
     }
 
     f_string_dynamic_t buffer = f_string_dynamic_t_initialize;
-    f_string_dynamic_t object = f_string_dynamic_t_initialize;
-    f_string_dynamic_t content = f_string_dynamic_t_initialize;
 
     if (F_status_is_error_not(status)) {
-      f_string_dynamic_t escaped = f_string_dynamic_t_initialize;
-
       if (main->process_pipe) {
         status = fss_basic_write_process_pipe(main, output, quote, &buffer);
 
@@ -449,11 +443,7 @@ extern "C" {
                 break;
               }
 
-              object.string = arguments->argv[main->parameters.array[fss_basic_write_parameter_object_e].values.array[i]];
-              object.used = strnlen(object.string, F_console_parameter_size_d);
-              object.size = object.used;
-
-              status = fss_basic_write_process(main, output, quote, &object, 0, &buffer);
+              status = fss_basic_write_process(main, output, quote, &argv[main->parameters.array[fss_basic_write_parameter_object_e].values.array[i]], 0, &buffer);
               if (F_status_is_error(status)) break;
             } // for
           }
@@ -468,11 +458,7 @@ extern "C" {
                 break;
               }
 
-              content.string = arguments->argv[main->parameters.array[fss_basic_write_parameter_content_e].values.array[i]];
-              content.used = strnlen(content.string, F_console_parameter_size_d);
-              content.size = content.used;
-
-              status = fss_basic_write_process(main, output, quote, 0, &content, &buffer);
+              status = fss_basic_write_process(main, output, quote, 0, &argv[main->parameters.array[fss_basic_write_parameter_content_e].values.array[i]], &buffer);
               if (F_status_is_error(status)) break;
             } // for
           }
@@ -485,15 +471,7 @@ extern "C" {
               break;
             }
 
-            object.string = arguments->argv[main->parameters.array[fss_basic_write_parameter_object_e].values.array[i]];
-            object.used = strnlen(object.string, F_console_parameter_size_d);
-            object.size = object.used;
-
-            content.string = arguments->argv[main->parameters.array[fss_basic_write_parameter_content_e].values.array[i]];
-            content.used = strnlen(content.string, F_console_parameter_size_d);
-            content.size = content.used;
-
-            status = fss_basic_write_process(main, output, quote, &object, &content, &buffer);
+            status = fss_basic_write_process(main, output, quote, &argv[main->parameters.array[fss_basic_write_parameter_object_e].values.array[i]], &argv[main->parameters.array[fss_basic_write_parameter_content_e].values.array[i]], &buffer);
             if (F_status_is_error(status)) break;
           } // for
         }
@@ -514,17 +492,6 @@ extern "C" {
           fll_print_dynamic_raw(f_string_eol_s, main->output.to.stream);
         }
       }
-
-      f_string_dynamic_resize(0, &escaped);
-
-      // Object and content, though being a "dynamic" type, is being used statically, so clear them up to avoid invalid free().
-      object.string = 0;
-      object.used = 0;
-      object.size = 0;
-
-      content.string = 0;
-      content.used = 0;
-      content.size = 0;
     }
 
     if (main->parameters.array[fss_basic_write_parameter_file_e].result == f_console_result_additional_e) {
@@ -541,8 +508,6 @@ extern "C" {
     }
 
     f_string_dynamic_resize(0, &buffer);
-    f_string_dynamic_resize(0, &object);
-    f_string_dynamic_resize(0, &content);
     fss_basic_write_main_delete(main);
 
     return status;
index 09d713ddf6cfba023e087539ae1b2045f000156b..dce59097eca20b54dd9efd9a978e925d22d31ac4 100644 (file)
@@ -337,10 +337,10 @@ extern "C" {
           status = F_status_set_error(F_parameter);
         }
         else if (main->parameters.array[fss_embedded_list_read_parameter_delimit_e].result == f_console_result_additional_e) {
-          const f_array_length_t location = main->parameters.array[fss_embedded_list_read_parameter_delimit_e].values.array[0];
-          f_array_length_t length = strnlen(arguments->argv[location], F_console_parameter_size_d);
+          const f_array_length_t index = main->parameters.array[fss_embedded_list_read_parameter_delimit_e].values.array[0];
+          f_array_length_t length = argv[index].used;
 
-          if (length == 0) {
+          if (!length) {
             flockfile(main->error.to.stream);
 
             fl_print_format("%r%[%QThe value for the parameter '%]", main->error.to.stream, f_string_eol_s, main->error.context, main->error.prefix, main->error.context);
@@ -351,22 +351,22 @@ extern "C" {
 
             status = F_status_set_error(F_parameter);
           }
-          else if (fl_string_compare(arguments->argv[location], fss_embedded_list_read_delimit_mode_name_none_s, length, fss_embedded_list_read_delimit_mode_name_none_s_length) == F_equal_to) {
+          else if (fl_string_dynamic_compare_string(fss_embedded_list_read_delimit_mode_name_none_s.string, argv[index], fss_embedded_list_read_delimit_mode_name_none_s.used) == F_equal_to) {
             main->delimit_mode = fss_embedded_list_read_delimit_mode_none_e;
           }
-          else if (fl_string_compare(arguments->argv[location], fss_embedded_list_read_delimit_mode_name_all_s, length, fss_embedded_list_read_delimit_mode_name_all_s_length) == F_equal_to) {
+          else if (fl_string_dynamic_compare_string(fss_embedded_list_read_delimit_mode_name_all_s.string, argv[index], fss_embedded_list_read_delimit_mode_name_all_s.used) == F_equal_to) {
             main->delimit_mode = fss_embedded_list_read_delimit_mode_all_e;
           }
           else {
             main->delimit_mode = fss_embedded_list_read_delimit_mode_depth_e;
 
-            if (arguments->argv[location][length - 1] == fss_embedded_list_read_delimit_mode_name_greater_s.string[0]) {
+            if (argv[index][length - 1] == fss_embedded_list_read_delimit_mode_name_greater_s.string[0]) {
               main->delimit_mode = fss_embedded_list_read_delimit_mode_depth_greater_e;
 
               // Shorten the length to better convert the remainder to a number.
               --length;
             }
-            else if (arguments->argv[location][length - 1] == fss_embedded_list_read_delimit_mode_name_lesser_s.string[0]) {
+            else if (argv[index][length - 1] == fss_embedded_list_read_delimit_mode_name_lesser_s.string[0]) {
               main->delimit_mode = fss_embedded_list_read_delimit_mode_depth_lesser_e;
 
               // Shorten the length to better convert the remainder to a number.
@@ -376,14 +376,14 @@ extern "C" {
             f_string_range_t range = macro_f_string_range_t_initialize(length);
 
             // Ignore leading plus sign.
-            if (arguments->argv[location][0] == '+') {
+            if (argv[index][0] == f_string_ascii_plus_s[0]) {
               ++range.start;
             }
 
-            status = fl_conversion_string_to_number_unsigned(arguments->argv[location], range, &main->delimit_depth);
+            status = fl_conversion_string_to_number_unsigned(argv[index].string, range, &main->delimit_depth);
 
             if (F_status_is_error(status)) {
-              fll_error_parameter_integer_print(main->error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_embedded_list_read_long_delimit_s, arguments->argv[location]);
+              fll_error_parameter_integer_print(main->error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_embedded_list_read_long_delimit_s, argv[index]);
             }
           }
         }
@@ -445,17 +445,18 @@ extern "C" {
 
           if (fss_embedded_list_read_signal_received(main)) {
             status = F_status_set_error(F_interrupt);
+
             break;
           }
 
           f_file_t file = f_file_t_initialize;
 
-          status = f_file_open(arguments->argv[main->parameters.remaining.array[i]], 0, &file);
+          status = f_file_open(argv[main->parameters.remaining.array[i]], f_string_empty_s, &file);
 
           main->quantity.total = original_size;
 
           if (F_status_is_error(status)) {
-            fll_error_file_print(main->error, F_status_set_fine(status), "f_file_open", F_true, arguments->argv[main->parameters.remaining.array[i]], f_file_operation_open_s, fll_error_file_type_file_e);
+            fll_error_file_print(main->error, F_status_set_fine(status), "f_file_open", F_true, argv[main->parameters.remaining.array[i]], f_file_operation_open_s, fll_error_file_type_file_e);
 
             break;
           }
@@ -463,7 +464,7 @@ extern "C" {
           if (!main->quantity.total) {
             status = f_file_size_by_id(file.id, &main->quantity.total);
             if (F_status_is_error(status)) {
-              fll_error_file_print(main->error, F_status_set_fine(status), "f_file_size_by_id", F_true, arguments->argv[main->parameters.remaining.array[i]], f_file_operation_read_s, fll_error_file_type_file_e);
+              fll_error_file_print(main->error, F_status_set_fine(status), "f_file_size_by_id", F_true, argv[main->parameters.remaining.array[i]], f_file_operation_read_s, fll_error_file_type_file_e);
 
               f_file_stream_close(F_true, &file);
 
@@ -473,7 +474,7 @@ extern "C" {
             // Skip past empty files.
             if (!main->quantity.total) {
               if (main->parameters.array[fss_embedded_list_read_parameter_total_e].result == f_console_result_found_e) {
-                fll_print_format("0%r", main->output.to.stream, f_string_eol_s);
+                fll_print_format("%r%r", main->output.to.stream, f_string_ascii_0_s, f_string_eol_s);
               }
 
               f_file_stream_close(F_true, &file);
@@ -487,15 +488,15 @@ extern "C" {
           f_file_stream_close(F_true, &file);
 
           if (F_status_is_error(status)) {
-            fll_error_file_print(main->error, F_status_set_fine(status), "f_file_read_until", F_true, arguments->argv[main->parameters.remaining.array[i]], f_file_operation_read_s, fll_error_file_type_file_e);
+            fll_error_file_print(main->error, F_status_set_fine(status), "f_file_read_until", F_true, argv[main->parameters.remaining.array[i]], f_file_operation_read_s, fll_error_file_type_file_e);
 
             break;
           }
 
-          status = fss_embedded_list_read_main_process_file(main, arguments, arguments->argv[main->parameters.remaining.array[i]], depths, &objects_delimits, &contents_delimits, &comments);
+          status = fss_embedded_list_read_main_process_file(main, arguments, argv[main->parameters.remaining.array[i]], depths, &objects_delimits, &contents_delimits, &comments);
 
           if (F_status_is_error(status)) {
-            fll_error_file_print(main->error, F_status_set_fine(status), "fss_embedded_list_read_main_process_file", F_true, arguments->argv[main->parameters.remaining.array[i]], f_file_operation_read_s, fll_error_file_type_file_e);
+            fll_error_file_print(main->error, F_status_set_fine(status), "fss_embedded_list_read_main_process_file", F_true, argv[main->parameters.remaining.array[i]], f_file_operation_read_s, fll_error_file_type_file_e);
 
             break;
           }
index 10c1bcce5bd4d4f4073b89083f630f088d678e4d..1cd96d4a98b36e929aa256378cedea62d77818f7 100644 (file)
@@ -133,12 +133,12 @@ extern "C" {
         }
 
         if (values_type[i] == fss_embedded_list_read_parameter_depth_e || values_type[i] == fss_embedded_list_read_parameter_at_e) {
-          const f_string_range_t range = macro_f_string_range_t_initialize(strlen(arguments->argv[values_order[i]]));
+          const f_string_range_t range = macro_f_string_range_t_initialize(strlen(argv[values_order[i]]));
 
-          status = fl_conversion_string_to_number_unsigned(arguments->argv[values_order[i]], range, &number);
+          status = fl_conversion_string_to_number_unsigned(argv[values_order[i]], range, &number);
 
           if (F_status_is_error(status)) {
-            fll_error_parameter_integer_print(main->error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_embedded_list_read_long_depth_s, arguments->argv[values_order[i]]);
+            fll_error_parameter_integer_print(main->error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_embedded_list_read_long_depth_s, argv[values_order[i]]);
 
             return status;
           }
@@ -172,7 +172,7 @@ extern "C" {
           depths->array[depths->used].value_name.used = 0;
 
           if (main->parameters.array[fss_embedded_list_read_parameter_trim_e].result == f_console_result_found_e) {
-            status = fl_string_rip(arguments->argv[values_order[i]], strnlen(arguments->argv[values_order[i]], F_console_parameter_size_d), &depths->array[depths->used].value_name);
+            status = fl_string_rip(argv[values_order[i]], strnlen(argv[values_order[i]], F_console_parameter_size_d), &depths->array[depths->used].value_name);
 
             if (F_status_is_error(status)) {
               fll_error_print(main->error, F_status_set_fine(status), "fl_string_rip", F_true);
@@ -181,7 +181,7 @@ extern "C" {
             }
           }
           else {
-            status = f_string_append(arguments->argv[values_order[i]], strnlen(arguments->argv[values_order[i]], F_console_parameter_size_d), &depths->array[depths->used].value_name);
+            status = f_string_append(argv[values_order[i]], strnlen(argv[values_order[i]], F_console_parameter_size_d), &depths->array[depths->used].value_name);
 
             if (F_status_is_error(status)) {
               fll_error_print(main->error, F_status_set_fine(status), "f_string_append", F_true);
@@ -288,7 +288,7 @@ extern "C" {
     // Requested depths cannot be greater than contents depth.
     if (depths.used > main->nest.used) {
       if (main->parameters.array[fss_embedded_list_read_parameter_total_e].result == f_console_result_found_e) {
-        fll_print_format("0%r", main->output.to.stream, f_string_eol_s);
+        fll_print_format("%r%r", main->output.to.stream, f_string_ascii_0_s, f_string_eol_s);
 
         return F_none;
       }
@@ -301,18 +301,18 @@ extern "C" {
 
       if (main->parameters.array[fss_embedded_list_read_parameter_select_e].result == f_console_result_additional_e) {
         const f_array_length_t index = main->parameters.array[fss_embedded_list_read_parameter_select_e].values.array[main->parameters.array[fss_embedded_list_read_parameter_select_e].values.used - 1];
-        const f_string_range_t range = macro_f_string_range_t_initialize(strlen(arguments->argv[index]));
+        const f_string_range_t range = macro_f_string_range_t_initialize(argv[index]);
 
-        status = fl_conversion_string_to_number_unsigned(arguments->argv[index], range, &select);
+        status = fl_conversion_string_to_number_unsigned(argv[index].string, range, &select);
 
         if (F_status_is_error(status)) {
-          fll_error_parameter_integer_print(main->error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_embedded_list_read_long_select_s, arguments->argv[index]);
+          fll_error_parameter_integer_print(main->error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_embedded_list_read_long_select_s, argv[index]);
 
           return status;
         }
 
         // This standard does not support multiple content groups.
-        if (select > 0) {
+        if (select) {
           return F_none;
         }
       }
@@ -322,12 +322,12 @@ extern "C" {
 
     if (main->parameters.array[fss_embedded_list_read_parameter_line_e].result == f_console_result_additional_e) {
       const f_array_length_t index = main->parameters.array[fss_embedded_list_read_parameter_line_e].values.array[main->parameters.array[fss_embedded_list_read_parameter_line_e].values.used - 1];
-      const f_string_range_t range = macro_f_string_range_t_initialize(strlen(arguments->argv[index]));
+      const f_string_range_t range = macro_f_string_range_t_initialize(argv[index].used);
 
-      status = fl_conversion_string_to_number_unsigned(arguments->argv[index], range, &line);
+      status = fl_conversion_string_to_number_unsigned(argv[index].string, range, &line);
 
       if (F_status_is_error(status)) {
-        fll_error_parameter_integer_print(main->error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_embedded_list_read_long_line_s, arguments->argv[index]);
+        fll_error_parameter_integer_print(main->error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_embedded_list_read_long_line_s, argv[index]);
 
         return status;
       }
index 7630190edeb382fd3cabb5887b03e0cffaff3d37..0e50f93ae9be57b8fb2d8c401c5fd82f84524dec 100644 (file)
@@ -179,14 +179,14 @@ extern "C" {
           status = F_status_set_error(F_parameter);
         }
         else {
-          const f_array_length_t location = main->parameters.array[fss_embedded_list_write_parameter_file_e].values.array[0];
+          const f_array_length_t index = main->parameters.array[fss_embedded_list_write_parameter_file_e].values.array[0];
 
           output.id = -1;
           output.stream = 0;
-          status = f_file_stream_open(arguments->argv[location], 0, &output);
+          status = f_file_stream_open(argv[index], f_string_empty_s, &output);
 
           if (F_status_is_error(status)) {
-            fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_open", F_true, arguments->argv[location], f_file_operation_open_s, fll_error_file_type_file_e);
+            fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_open", F_true, argv[index], f_file_operation_open_s, fll_error_file_type_file_e);
           }
         }
       }
@@ -325,12 +325,11 @@ extern "C" {
       }
       else if (main->parameters.array[fss_embedded_list_write_parameter_prepend_e].result == f_console_result_additional_e) {
         const f_array_length_t index = main->parameters.array[fss_embedded_list_write_parameter_prepend_e].values.array[main->parameters.array[fss_embedded_list_write_parameter_prepend_e].values.used - 1];
-        const f_array_length_t length = strnlen(arguments->argv[index], F_console_parameter_size_d);
 
-        if (length) {
-          f_string_range_t range = macro_f_string_range_t_initialize(length);
+        if (argv[index].used) {
+          f_string_range_t range = macro_f_string_range_t_initialize(argv[index].used);
 
-          for (; range.start < length; ++range.start) {
+          for (; range.start < argv[index].used; ++range.start) {
 
             status = f_fss_is_space(main->parameter->arguments.array[index], range);
             if (F_status_is_error(status)) break;
@@ -416,11 +415,8 @@ extern "C" {
     }
 
     f_string_dynamic_t buffer = f_string_dynamic_t_initialize;
-    f_string_dynamic_t object = f_string_dynamic_t_initialize;
-    f_string_dynamic_t content = f_string_dynamic_t_initialize;
 
     if (F_status_is_error_not(status)) {
-      f_string_dynamic_t escaped = f_string_dynamic_t_initialize;
       f_string_ranges_t ignore = f_string_ranges_t_initialize;
 
       if (main->process_pipe) {
@@ -452,11 +448,7 @@ extern "C" {
                 break;
               }
 
-              object.string = arguments->argv[main->parameters.array[fss_embedded_list_write_parameter_object_e].values.array[i]];
-              object.used = strnlen(object.string, F_console_parameter_size_d);
-              object.size = object.used;
-
-              status = fss_embedded_list_write_process(main, output, quote, &object, 0, 0, &buffer);
+              status = fss_embedded_list_write_process(main, output, quote, &argv[main->parameters.array[fss_embedded_list_write_parameter_object_e].values.array[i]], 0, 0, &buffer);
               if (F_status_is_error(status)) break;
             } // for
           }
@@ -472,11 +464,7 @@ extern "C" {
               status = fss_embedded_list_write_process_parameter_ignore(main, arguments, main->parameters.array[fss_embedded_list_write_parameter_content_e].locations, i, &ignore);
               if (F_status_is_error(status)) break;
 
-              content.string = arguments->argv[main->parameters.array[fss_embedded_list_write_parameter_content_e].values.array[i]];
-              content.used = strnlen(content.string, F_console_parameter_size_d);
-              content.size = content.used;
-
-              status = fss_embedded_list_write_process(main, output, quote, 0, &content, &ignore, &buffer);
+              status = fss_embedded_list_write_process(main, output, quote, 0, &argv[main->parameters.array[fss_embedded_list_write_parameter_content_e].values.array[i]], &ignore, &buffer);
               if (F_status_is_error(status)) break;
             } // for
           }
@@ -493,15 +481,7 @@ extern "C" {
             status = fss_embedded_list_write_process_parameter_ignore(main, arguments, main->parameters.array[fss_embedded_list_write_parameter_content_e].locations, i, &ignore);
             if (F_status_is_error(status)) break;
 
-            object.string = arguments->argv[main->parameters.array[fss_embedded_list_write_parameter_object_e].values.array[i]];
-            object.used = strnlen(object.string, F_console_parameter_size_d);
-            object.size = object.used;
-
-            content.string = arguments->argv[main->parameters.array[fss_embedded_list_write_parameter_content_e].values.array[i]];
-            content.used = strnlen(content.string, F_console_parameter_size_d);
-            content.size = content.used;
-
-            status = fss_embedded_list_write_process(main, output, quote, &object, &content, &ignore, &buffer);
+            status = fss_embedded_list_write_process(main, output, quote, &argv[main->parameters.array[fss_embedded_list_write_parameter_object_e].values.array[i]], &argv[main->parameters.array[fss_embedded_list_write_parameter_content_e].values.array[i]], &ignore, &buffer);
             if (F_status_is_error(status)) break;
           } // for
         }
@@ -523,17 +503,7 @@ extern "C" {
         }
       }
 
-      f_string_dynamic_resize(0, &escaped);
       macro_f_string_ranges_t_delete_simple(ignore);
-
-      // Object and content, though being a "dynamic" type, is being used statically, so clear them up to avoid invalid free().
-      object.string = 0;
-      object.used = 0;
-      object.size = 0;
-
-      content.string = 0;
-      content.used = 0;
-      content.size = 0;
     }
 
     if (main->parameters.array[fss_embedded_list_write_parameter_file_e].result == f_console_result_additional_e) {
@@ -550,8 +520,6 @@ extern "C" {
     }
 
     f_string_dynamic_resize(0, &buffer);
-    f_string_dynamic_resize(0, &object);
-    f_string_dynamic_resize(0, &content);
     fss_embedded_list_write_main_delete(main);
 
     return status;
index 73f72cf61e77913bea97781e6b09e93a4e687c84..46bf8c572e68cba3827e2815ae0a78dfd91fa302 100644 (file)
@@ -402,17 +402,17 @@ extern "C" {
       index = main->parameters.array[fss_embedded_list_write_parameter_ignore_e].values.array[i * 2];
 
       range.start = 0;
-      range.stop = strnlen(arguments->argv[index], F_console_parameter_size_d) - 1;
+      range.stop = argv[index].used - 1;
 
       // allow and ignore the positive sign.
-      if (range.stop > 0 && arguments->argv[index][0] == '+') {
+      if (range.stop && argv[index][0] == f_string_ascii_plus_s[0]) {
         range.start = 1;
       }
 
-      status = fl_conversion_string_to_number_unsigned(arguments->argv[index], range, &number);
+      status = fl_conversion_string_to_number_unsigned(argv[index].string, range, &number);
 
       if (F_status_is_error(status)) {
-        fll_error_parameter_integer_print(main->error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_embedded_list_write_long_ignore_s, arguments->argv[index]);
+        fll_error_parameter_integer_print(main->error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_embedded_list_write_long_ignore_s, argv[index]);
 
         return status;
       }
@@ -422,17 +422,17 @@ extern "C" {
       index = main->parameters.array[fss_embedded_list_write_parameter_ignore_e].values.array[(i * 2) + 1];
 
       range.start = 0;
-      range.stop = strnlen(arguments->argv[index], F_console_parameter_size_d) - 1;
+      range.stop = argv[index].used - 1;
 
-      // allow and ignore the positive sign.
-      if (range.stop > 0 && arguments->argv[index][0] == '+') {
+      // Allow and ignore the positive sign.
+      if (range.stop && argv[index][0] == f_string_ascii_plus_s[0]) {
         range.start = 1;
       }
 
-      status = fl_conversion_string_to_number_unsigned(arguments->argv[index], range, &number);
+      status = fl_conversion_string_to_number_unsigned(argv[index].string, range, &number);
 
       if (F_status_is_error(status)) {
-        fll_error_parameter_integer_print(main->error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_embedded_list_write_long_ignore_s, arguments->argv[index]);
+        fll_error_parameter_integer_print(main->error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_embedded_list_write_long_ignore_s, argv[index]);
 
         return status;
       }
index f31ace0eae199dad2c7c5db79c0f2aeb46f6afbf..9dcb7482147504b550cbd047bdd28f0a10d11805 100644 (file)
@@ -352,7 +352,7 @@ extern "C" {
       }
 
       if (F_status_is_error_not(status) && main->parameters.array[fss_extended_list_read_parameter_delimit_e].result == f_console_result_additional_e) {
-        f_array_length_t location = 0;
+        f_array_length_t index = 0;
         f_array_length_t length = 0;
 
         // Set the value to 0 to allow for detecting mode based on what is provided.
@@ -366,8 +366,8 @@ extern "C" {
             break;
           }
 
-          location = main->parameters.array[fss_extended_list_read_parameter_delimit_e].values.array[i];
-          length = strnlen(arguments->argv[location], F_console_parameter_size_d);
+          index = main->parameters.array[fss_extended_list_read_parameter_delimit_e].values.array[i];
+          length = argv[index].used;
 
           if (!length) {
             flockfile(main->error.to.stream);
@@ -382,13 +382,13 @@ extern "C" {
 
             break;
           }
-          else if (fl_string_compare(arguments->argv[location], fss_extended_list_read_delimit_mode_name_none_s, length, fss_extended_list_read_delimit_mode_name_none_s_length) == F_equal_to) {
+          else if (fl_string_dynamic_compare_string(fss_extended_list_read_delimit_mode_name_none_s.string, argv[index], fss_extended_list_read_delimit_mode_name_none_s.used) == F_equal_to) {
             data.delimit_mode = fss_extended_list_read_delimit_mode_none_e;
           }
-          else if (fl_string_compare(arguments->argv[location], fss_extended_list_read_delimit_mode_name_all_s, length, fss_extended_list_read_delimit_mode_name_all_s_length) == F_equal_to) {
+          else if (fl_string_dynamic_compare_string(fss_extended_list_read_delimit_mode_name_all_s.string, argv[index], fss_extended_list_read_delimit_mode_name_all_s.used) == F_equal_to) {
             data.delimit_mode = fss_extended_list_read_delimit_mode_all_e;
           }
-          else if (fl_string_compare(arguments->argv[location], fss_extended_list_read_delimit_mode_name_object_s, length, fss_extended_list_read_delimit_mode_name_object_s_length) == F_equal_to) {
+          else if (fl_string_dynamic_compare_string(fss_extended_list_read_delimit_mode_name_object_s.string, argv[index], fss_extended_list_read_delimit_mode_name_object_s.used) == F_equal_to) {
             switch (data.delimit_mode) {
               case 0:
                 data.delimit_mode = fss_extended_list_read_delimit_mode_object_e;
@@ -425,7 +425,7 @@ extern "C" {
               data.delimit_mode = fss_extended_list_read_delimit_mode_content_object_e;
             }
 
-            if (arguments->argv[location][length - 1] == fss_extended_list_read_delimit_mode_name_greater_s.string[0]) {
+            if (argv[index][length - 1] == fss_extended_list_read_delimit_mode_name_greater_s.string[0]) {
               if (!(data.delimit_mode == fss_extended_list_read_delimit_mode_none_e || data.delimit_mode == fss_extended_list_read_delimit_mode_all_e)) {
                 if (data.delimit_mode == fss_extended_list_read_delimit_mode_content_object_e) {
                   data.delimit_mode = fss_extended_list_read_delimit_mode_content_greater_object_e;
@@ -438,7 +438,7 @@ extern "C" {
               // Shorten the length to better convert the remainder to a number.
               --length;
             }
-            else if (arguments->argv[location][length - 1] == fss_extended_list_read_delimit_mode_name_lesser_s.string[0]) {
+            else if (argv[index][length - 1] == fss_extended_list_read_delimit_mode_name_lesser_s.string[0]) {
               if (!(data.delimit_mode == fss_extended_list_read_delimit_mode_none_e || data.delimit_mode == fss_extended_list_read_delimit_mode_all_e)) {
                 if (data.delimit_mode == fss_extended_list_read_delimit_mode_content_object_e) {
                   data.delimit_mode = fss_extended_list_read_delimit_mode_content_lesser_object_e;
@@ -455,14 +455,14 @@ extern "C" {
             f_string_range_t range = macro_f_string_range_t_initialize(length);
 
             // Ignore leading plus sign.
-            if (arguments->argv[location][0] == '+') {
+            if (argv[index][0] == f_string_ascii_plus_s[0]) {
               ++range.start;
             }
 
-            status = fl_conversion_string_to_number_unsigned(arguments->argv[location], range, &data.delimit_depth);
+            status = fl_conversion_string_to_number_unsigned(argv[index].string, range, &data.delimit_depth);
 
             if (F_status_is_error(status)) {
-              fll_error_parameter_integer_print(main->error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_extended_list_read_long_delimit_s, arguments->argv[location]);
+              fll_error_parameter_integer_print(main->error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_extended_list_read_long_delimit_s, argv[index]);
 
               break;
             }
@@ -568,10 +568,10 @@ extern "C" {
           file.stream = 0;
           file.id = -1;
 
-          status = f_file_stream_open(arguments->argv[main->parameters.remaining.array[i]], 0, &file);
+          status = f_file_stream_open(argv[main->parameters.remaining.array[i]], 0, &file);
 
           if (F_status_is_error(status)) {
-            fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_open", F_true, arguments->argv[main->parameters.remaining.array[i]], f_file_operation_open_s, fll_error_file_type_file_e);
+            fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_open", F_true, argv[main->parameters.remaining.array[i]], f_file_operation_open_s, fll_error_file_type_file_e);
 
             break;
           }
@@ -580,7 +580,7 @@ extern "C" {
           status = f_file_size_by_id(file.id, &size_file);
 
           if (F_status_is_error(status)) {
-            fll_error_file_print(main->error, F_status_set_fine(status), "f_file_size_by_id", F_true, arguments->argv[main->parameters.remaining.array[i]], f_file_operation_read_s, fll_error_file_type_file_e);
+            fll_error_file_print(main->error, F_status_set_fine(status), "f_file_size_by_id", F_true, argv[main->parameters.remaining.array[i]], f_file_operation_read_s, fll_error_file_type_file_e);
 
             break;
           }
@@ -589,7 +589,7 @@ extern "C" {
             status = f_string_dynamic_resize(data.buffer.size + size_file, &data.buffer);
 
             if (F_status_is_error(status)) {
-              fll_error_file_print(main->error, F_status_set_fine(status), "f_string_dynamic_resize", F_true, arguments->argv[main->parameters.remaining.array[i]], f_file_operation_read_s, fll_error_file_type_file_e);
+              fll_error_file_print(main->error, F_status_set_fine(status), "f_string_dynamic_resize", F_true, argv[main->parameters.remaining.array[i]], f_file_operation_read_s, fll_error_file_type_file_e);
 
               break;
             }
@@ -597,12 +597,12 @@ extern "C" {
             status = f_file_stream_read(file, &data.buffer);
 
             if (F_status_is_error(status)) {
-              fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_read", F_true, arguments->argv[main->parameters.remaining.array[i]], f_file_operation_read_s, fll_error_file_type_file_e);
+              fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_read", F_true, argv[main->parameters.remaining.array[i]], f_file_operation_read_s, fll_error_file_type_file_e);
 
               break;
             }
             else if (data.buffer.used > data.files.array[data.files.used].range.start) {
-              data.files.array[data.files.used].name = arguments->argv[main->parameters.remaining.array[i]];
+              data.files.array[data.files.used].name = argv[main->parameters.remaining.array[i]];
               data.files.array[data.files.used++].range.stop = data.buffer.used - 1;
 
               // This standard is newline sensitive, when appending files to the buffer if the file lacks a final newline then this could break the format for files appended thereafter.
index 0a747b9de9b7d1fa377a4dbba69f8b920847e33e..b8f813b65ee6a873699c81612a26f8975abed196 100644 (file)
@@ -103,12 +103,12 @@ extern "C" {
       else {
         position_depth = main->parameters.array[fss_extended_list_read_parameter_depth_e].values.array[i];
 
-        const f_string_range_t range = macro_f_string_range_t_initialize(strlen(arguments->argv[position_depth]));
+        const f_string_range_t range = macro_f_string_range_t_initialize(argv[position_depth].used);
 
-        status = fl_conversion_string_to_number_unsigned(arguments->argv[position_depth], range, &data->depths.array[i].depth);
+        status = fl_conversion_string_to_number_unsigned(argv[position_depth].string, range, &data->depths.array[i].depth);
 
         if (F_status_is_error(status)) {
-          fll_error_parameter_integer_print(main->error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_extended_list_read_long_depth_s, arguments->argv[position_depth]);
+          fll_error_parameter_integer_print(main->error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_extended_list_read_long_depth_s, argv[position_depth]);
 
           return status;
         }
@@ -127,12 +127,12 @@ extern "C" {
 
           data->depths.array[i].index_at = main->parameters.array[fss_extended_list_read_parameter_at_e].values.array[position_at];
 
-          const f_string_range_t range = macro_f_string_range_t_initialize(strlen(arguments->argv[data->depths.array[i].index_at]));
+          const f_string_range_t range = macro_f_string_range_t_initialize(argv[data->depths.array[i].index_at].used);
 
-          status = fl_conversion_string_to_number_unsigned(arguments->argv[data->depths.array[i].index_at], range, &data->depths.array[i].value_at);
+          status = fl_conversion_string_to_number_unsigned(argv[data->depths.array[i].index_at].string, range, &data->depths.array[i].value_at);
 
           if (F_status_is_error(status)) {
-            fll_error_parameter_integer_print(main->error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_extended_list_read_long_at_s, arguments->argv[data->depths.array[i].index_at]);
+            fll_error_parameter_integer_print(main->error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_extended_list_read_long_at_s, argv[data->depths.array[i].index_at]);
 
             return status;
           }
@@ -153,14 +153,14 @@ extern "C" {
           data->depths.array[i].index_name = main->parameters.array[fss_extended_list_read_parameter_name_e].values.array[position_name];
 
           if (main->parameters.array[fss_extended_list_read_parameter_trim_e].result == f_console_result_found_e) {
-            status = fl_string_rip(arguments->argv[data->depths.array[i].index_name], strlen(arguments->argv[data->depths.array[i].index_name]), &data->depths.array[i].value_name);
+            status = fl_string_dynamic_rip(argv[data->depths.array[i].index_name], &data->depths.array[i].value_name);
           }
           else {
-            status = f_string_append(arguments->argv[data->depths.array[i].index_name], strlen(arguments->argv[data->depths.array[i].index_name]), &data->depths.array[i].value_name);
+            status = f_string_dynamic_append(argv[data->depths.array[i].index_name], &data->depths.array[i].value_name);
           }
 
           if (F_status_is_error(status)) {
-            fll_error_print(main->error, F_status_set_fine(status), main->parameters.array[fss_extended_list_read_parameter_trim_e].result == f_console_result_found_e ? "fl_string_rip" : "f_string_append", F_true);
+            fll_error_print(main->error, F_status_set_fine(status), main->parameters.array[fss_extended_list_read_parameter_trim_e].result == f_console_result_found_e ? "fl_string_dynamic_rip" : "f_string_dynamic_append", F_true);
 
             return status;
           }
@@ -272,12 +272,12 @@ extern "C" {
 
     if (main->parameters.array[parameter].result == f_console_result_additional_e) {
       const f_array_length_t index = main->parameters.array[parameter].values.array[main->parameters.array[parameter].values.used - 1];
-      const f_string_range_t range = macro_f_string_range_t_initialize(strnlen(arguments->argv[index], F_console_parameter_size_d));
+      const f_string_range_t range = macro_f_string_range_t_initialize(argv[index].used);
 
-      const f_status_t status = fl_conversion_string_to_number_unsigned(arguments->argv[index], range, number);
+      const f_status_t status = fl_conversion_string_to_number_unsigned(argv[index].string, range, number);
 
       if (F_status_is_error(status)) {
-        fll_error_parameter_integer_print(main->error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, name, arguments->argv[index]);
+        fll_error_parameter_integer_print(main->error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, name, argv[index]);
 
         return status;
       }
index 6e4217c0b59cbc98af484db9bd85519608a9992e..77b60eaf27661b37f931d1a57be921d190a19716 100644 (file)
@@ -179,14 +179,14 @@ extern "C" {
           status = F_status_set_error(F_parameter);
         }
         else {
-          const f_array_length_t location = main->parameters.array[fss_extended_list_write_parameter_file_e].values.array[0];
+          const f_array_length_t index = main->parameters.array[fss_extended_list_write_parameter_file_e].values.array[0];
 
           output.id = -1;
           output.stream = 0;
-          status = f_file_stream_open(arguments->argv[location], 0, &output);
+          status = f_file_stream_open(argv[index], f_string_empty_s, &output);
 
           if (F_status_is_error(status)) {
-            fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_open", F_true, arguments->argv[location], f_file_operation_open_s, fll_error_file_type_file_e);
+            fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_open", F_true, argv[index], f_file_operation_open_s, fll_error_file_type_file_e);
           }
         }
       }
@@ -324,12 +324,12 @@ extern "C" {
       }
       else if (main->parameters.array[fss_extended_list_write_parameter_prepend_e].result == f_console_result_additional_e) {
         const f_array_length_t index = main->parameters.array[fss_extended_list_write_parameter_prepend_e].values.array[main->parameters.array[fss_extended_list_write_parameter_prepend_e].values.used - 1];
-        const f_array_length_t length = strnlen(arguments->argv[index], F_console_parameter_size_d);
+        const f_array_length_t length = strnlen(argv[index], F_console_parameter_size_d);
 
         if (length) {
           f_string_range_t range = macro_f_string_range_t_initialize(length);
 
-          main->prepend.string = arguments->argv[index];
+          main->prepend.string = argv[index];
           main->prepend.used = length;
           main->prepend.size = length;
 
@@ -419,11 +419,8 @@ extern "C" {
     }
 
     f_string_dynamic_t buffer = f_string_dynamic_t_initialize;
-    f_string_dynamic_t object = f_string_dynamic_t_initialize;
-    f_string_dynamic_t content = f_string_dynamic_t_initialize;
 
     if (F_status_is_error_not(status)) {
-      f_string_dynamic_t escaped = f_string_dynamic_t_initialize;
       f_string_ranges_t ignore = f_string_ranges_t_initialize;
 
       if (main->process_pipe) {
@@ -455,11 +452,7 @@ extern "C" {
                 break;
               }
 
-              object.string = arguments->argv[main->parameters.array[fss_extended_list_write_parameter_object_e].values.array[i]];
-              object.used = strnlen(object.string, F_console_parameter_size_d);
-              object.size = object.used;
-
-              status = fss_extended_list_write_process(main, output, quote, &object, 0, 0, &buffer);
+              status = fss_extended_list_write_process(main, output, quote, &argv[main->parameters.array[fss_extended_list_write_parameter_object_e].values.array[i]], 0, 0, &buffer);
               if (F_status_is_error(status)) break;
             } // for
           }
@@ -475,11 +468,7 @@ extern "C" {
               status = fss_extended_list_write_process_parameter_ignore(main, arguments, main->parameters.array[fss_extended_list_write_parameter_content_e].locations, i, &ignore);
               if (F_status_is_error(status)) break;
 
-              content.string = arguments->argv[main->parameters.array[fss_extended_list_write_parameter_content_e].values.array[i]];
-              content.used = strnlen(content.string, F_console_parameter_size_d);
-              content.size = content.used;
-
-              status = fss_extended_list_write_process(main, output, quote, 0, &content, &ignore, &buffer);
+              status = fss_extended_list_write_process(main, output, quote, 0, &argv[main->parameters.array[fss_extended_list_write_parameter_content_e].values.array[i]], &ignore, &buffer);
               if (F_status_is_error(status)) break;
             } // for
           }
@@ -496,15 +485,7 @@ extern "C" {
             status = fss_extended_list_write_process_parameter_ignore(main, arguments, main->parameters.array[fss_extended_list_write_parameter_content_e].locations, i, &ignore);
             if (F_status_is_error(status)) break;
 
-            object.string = arguments->argv[main->parameters.array[fss_extended_list_write_parameter_object_e].values.array[i]];
-            object.used = strnlen(object.string, F_console_parameter_size_d);
-            object.size = object.used;
-
-            content.string = arguments->argv[main->parameters.array[fss_extended_list_write_parameter_content_e].values.array[i]];
-            content.used = strnlen(content.string, F_console_parameter_size_d);
-            content.size = content.used;
-
-            status = fss_extended_list_write_process(main, output, quote, &object, &content, &ignore, &buffer);
+            status = fss_extended_list_write_process(main, output, quote, &argv[main->parameters.array[fss_extended_list_write_parameter_object_e].values.array[i]], &argv[main->parameters.array[fss_extended_list_write_parameter_content_e].values.array[i]], &ignore, &buffer);
             if (F_status_is_error(status)) break;
           } // for
         }
@@ -526,17 +507,7 @@ extern "C" {
         }
       }
 
-      f_string_dynamic_resize(0, &escaped);
       macro_f_string_ranges_t_delete_simple(ignore);
-
-      // Object and content, though being a "dynamic" type, is being used statically, so clear them up to avoid invalid free().
-      object.string = 0;
-      object.used = 0;
-      object.size = 0;
-
-      content.string = 0;
-      content.used = 0;
-      content.size = 0;
     }
 
     if (main->parameters.array[fss_extended_list_write_parameter_file_e].result == f_console_result_additional_e) {
@@ -553,8 +524,6 @@ extern "C" {
     }
 
     f_string_dynamic_resize(0, &buffer);
-    f_string_dynamic_resize(0, &object);
-    f_string_dynamic_resize(0, &content);
     fss_extended_list_write_main_delete(main);
 
     return status;
index d74149ab00a52eb19951778dc9cd51cb32d4b207..2c3d4aa9a4e83b3d39dfb80272102a48c254203a 100644 (file)
@@ -399,17 +399,17 @@ extern "C" {
       index = main->parameters.array[fss_extended_list_write_parameter_ignore_e].values.array[i * 2];
 
       range.start = 0;
-      range.stop = strnlen(arguments->argv[index], F_console_parameter_size_d) - 1;
+      range.stop = strnlen(argv[index], F_console_parameter_size_d) - 1;
 
       // allow and ignore the positive sign.
-      if (range.stop > 0 && arguments->argv[index][0] == '+') {
+      if (range.stop > 0 && argv[index][0] == '+') {
         range.start = 1;
       }
 
-      status = fl_conversion_string_to_number_unsigned(arguments->argv[index], range, &number);
+      status = fl_conversion_string_to_number_unsigned(argv[index].string, range, &number);
 
       if (F_status_is_error(status)) {
-        fll_error_parameter_integer_print(main->error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_extended_list_write_long_ignore_s, arguments->argv[index]);
+        fll_error_parameter_integer_print(main->error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_extended_list_write_long_ignore_s, argv[index]);
 
         return status;
       }
@@ -419,17 +419,17 @@ extern "C" {
       index = main->parameters.array[fss_extended_list_write_parameter_ignore_e].values.array[(i * 2) + 1];
 
       range.start = 0;
-      range.stop = strnlen(arguments->argv[index], F_console_parameter_size_d) - 1;
+      range.stop = strnlen(argv[index], F_console_parameter_size_d) - 1;
 
       // allow and ignore the positive sign.
-      if (range.stop > 0 && arguments->argv[index][0] == '+') {
+      if (range.stop > 0 && argv[index][0] == '+') {
         range.start = 1;
       }
 
-      status = fl_conversion_string_to_number_unsigned(arguments->argv[index], range, &number);
+      status = fl_conversion_string_to_number_unsigned(argv[index].string, range, &number);
 
       if (F_status_is_error(status)) {
-        fll_error_parameter_integer_print(main->error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_extended_list_write_long_ignore_s, arguments->argv[index]);
+        fll_error_parameter_integer_print(main->error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_extended_list_write_long_ignore_s, argv[index]);
 
         return status;
       }
index 0db7da4666b8befd2388272d62436431f63f222c..c303b3df911148e6f2ebe59418da6b18649cabb6 100644 (file)
@@ -369,7 +369,7 @@ extern "C" {
           }
 
           location = main->parameters.array[fss_extended_read_parameter_delimit_e].values.array[i];
-          length = strnlen(arguments->argv[location], F_console_parameter_size_d);
+          length = strnlen(argv[location], F_console_parameter_size_d);
 
           if (!length) {
             flockfile(main->error.to.stream);
@@ -384,13 +384,13 @@ extern "C" {
 
             break;
           }
-          else if (fl_string_compare(arguments->argv[location], fss_extended_read_delimit_mode_name_none, length, fss_extended_read_delimit_mode_name_none_length) == F_equal_to) {
+          else if (fl_string_compare(argv[location], fss_extended_read_delimit_mode_name_none, length, fss_extended_read_delimit_mode_name_none_length) == F_equal_to) {
             data.delimit_mode = fss_extended_read_delimit_mode_none_e;
           }
-          else if (fl_string_compare(arguments->argv[location], fss_extended_read_delimit_mode_name_all, length, fss_extended_read_delimit_mode_name_all_length) == F_equal_to) {
+          else if (fl_string_compare(argv[location], fss_extended_read_delimit_mode_name_all, length, fss_extended_read_delimit_mode_name_all_length) == F_equal_to) {
             data.delimit_mode = fss_extended_read_delimit_mode_all_e;
           }
-          else if (fl_string_compare(arguments->argv[location], fss_extended_read_delimit_mode_name_object, length, fss_extended_read_delimit_mode_name_object_length) == F_equal_to) {
+          else if (fl_string_compare(argv[location], fss_extended_read_delimit_mode_name_object, length, fss_extended_read_delimit_mode_name_object_length) == F_equal_to) {
             switch (data.delimit_mode) {
               case 0:
                 data.delimit_mode = fss_extended_read_delimit_mode_object_e;
@@ -427,7 +427,7 @@ extern "C" {
               data.delimit_mode = fss_extended_read_delimit_mode_content_object_e;
             }
 
-            if (arguments->argv[location][length - 1] == fss_extended_read_delimit_mode_name_greater[0]) {
+            if (argv[location][length - 1] == fss_extended_read_delimit_mode_name_greater[0]) {
               if (!(data.delimit_mode == fss_extended_read_delimit_mode_none_e || data.delimit_mode == fss_extended_read_delimit_mode_all_e)) {
                 if (data.delimit_mode == fss_extended_read_delimit_mode_content_object_e) {
                   data.delimit_mode = fss_extended_read_delimit_mode_content_greater_object_e;
@@ -440,7 +440,7 @@ extern "C" {
               // Shorten the length to better convert the remainder to a number.
               --length;
             }
-            else if (arguments->argv[location][length - 1] == fss_extended_read_delimit_mode_name_lesser[0]) {
+            else if (argv[location][length - 1] == fss_extended_read_delimit_mode_name_lesser[0]) {
               if (!(data.delimit_mode == fss_extended_read_delimit_mode_none_e || data.delimit_mode == fss_extended_read_delimit_mode_all_e)) {
                 if (data.delimit_mode == fss_extended_read_delimit_mode_content_object_e) {
                   data.delimit_mode = fss_extended_read_delimit_mode_content_lesser_object_e;
@@ -457,14 +457,14 @@ extern "C" {
             f_string_range_t range = macro_f_string_range_t_initialize(length);
 
             // Ignore leading plus sign.
-            if (arguments->argv[location][0] == '+') {
+            if (argv[location][0] == '+') {
               ++range.start;
             }
 
-            status = fl_conversion_string_to_number_unsigned(arguments->argv[location], range, &data.delimit_depth);
+            status = fl_conversion_string_to_number_unsigned(argv[location], range, &data.delimit_depth);
 
             if (F_status_is_error(status)) {
-              fll_error_parameter_integer_print(main->error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_extended_read_long_delimit_s, arguments->argv[location]);
+              fll_error_parameter_integer_print(main->error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, fss_extended_read_long_delimit_s, argv[location]);
 
               break;
             }
@@ -574,10 +574,10 @@ extern "C" {
           file.stream = 0;
           file.id = -1;
 
-          status = f_file_stream_open(arguments->argv[main->parameters.remaining.array[i]], 0, &file);
+          status = f_file_stream_open(argv[main->parameters.remaining.array[i]], 0, &file);
 
           if (F_status_is_error(status)) {
-            fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_open", F_true, arguments->argv[main->parameters.remaining.array[i]], f_file_operation_open_s, fll_error_file_type_file_e);
+            fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_open", F_true, argv[main->parameters.remaining.array[i]], f_file_operation_open_s, fll_error_file_type_file_e);
 
             break;
           }
@@ -586,7 +586,7 @@ extern "C" {
           status = f_file_size_by_id(file.id, &size_file);
 
           if (F_status_is_error(status)) {
-            fll_error_file_print(main->error, F_status_set_fine(status), "f_file_size_by_id", F_true, arguments->argv[main->parameters.remaining.array[i]], f_file_operation_read_s, fll_error_file_type_file_e);
+            fll_error_file_print(main->error, F_status_set_fine(status), "f_file_size_by_id", F_true, argv[main->parameters.remaining.array[i]], f_file_operation_read_s, fll_error_file_type_file_e);
 
             break;
           }
@@ -595,7 +595,7 @@ extern "C" {
             status = f_string_dynamic_resize(data.buffer.size + size_file, &data.buffer);
 
             if (F_status_is_error(status)) {
-              fll_error_file_print(main->error, F_status_set_fine(status), "f_string_dynamic_resize", F_true, arguments->argv[main->parameters.remaining.array[i]], f_file_operation_read_s, fll_error_file_type_file_e);
+              fll_error_file_print(main->error, F_status_set_fine(status), "f_string_dynamic_resize", F_true, argv[main->parameters.remaining.array[i]], f_file_operation_read_s, fll_error_file_type_file_e);
 
               break;
             }
@@ -603,13 +603,13 @@ extern "C" {
             status = f_file_stream_read(file, &data.buffer);
 
             if (F_status_is_error(status)) {
-              fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_read", F_true, arguments->argv[main->parameters.remaining.array[i]], f_file_operation_read_s, fll_error_file_type_file_e);
+              fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_read", F_true, argv[main->parameters.remaining.array[i]], f_file_operation_read_s, fll_error_file_type_file_e);
 
               break;
             }
 
             if (data.buffer.used > data.files.array[data.files.used].range.start) {
-              data.files.array[data.files.used].name = arguments->argv[main->parameters.remaining.array[i]];
+              data.files.array[data.files.used].name = argv[main->parameters.remaining.array[i]];
               data.files.array[data.files.used++].range.stop = data.buffer.used - 1;
 
               // This standard is newline sensitive, when appending files to the buffer if the file lacks a final newline then this could break the format for files appended thereafter.
index 71a16912d8843f200cb804e6011e43da537802e8..0cb75cf40e9dfbd31bef4e6ce17675eaa819519c 100644 (file)
@@ -175,14 +175,14 @@ extern "C" {
           status = F_status_set_error(F_parameter);
         }
         else {
-          const f_array_length_t location = main->parameters.array[fss_extended_write_parameter_file_e].values.array[0];
+          const f_array_length_t index = main->parameters.array[fss_extended_write_parameter_file_e].values.array[0];
 
           output.id = -1;
           output.stream = 0;
-          status = f_file_stream_open(arguments->argv[location], 0, &output);
+          status = f_file_stream_open(argv[index], f_string_empty_s, &output);
 
           if (F_status_is_error(status)) {
-            fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_open", F_true, arguments->argv[location], f_file_operation_open_s, fll_error_file_type_file_e);
+            fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_open", F_true, argv[index], f_file_operation_open_s, fll_error_file_type_file_e);
           }
         }
       }
@@ -334,16 +334,14 @@ extern "C" {
       }
       else if (main->parameters.array[fss_extended_write_parameter_prepend_e].result == f_console_result_additional_e) {
         const f_array_length_t index = main->parameters.array[fss_extended_write_parameter_prepend_e].values.array[main->parameters.array[fss_extended_write_parameter_prepend_e].values.used - 1];
-        const f_array_length_t length = strnlen(arguments->argv[index], F_console_parameter_size_d);
 
         // Even though this standard does not utilize this parameter, provide the validation for consistency.
-        if (length) {
-          f_string_range_t range = macro_f_string_range_t_initialize(length);
-          const f_string_static_t prepend = macro_f_string_static_t_initialize2(arguments->argv[index], length);
+        if (argv[index].used) {
+          f_string_range_t range = macro_f_string_range_t_initialize(argv[index].used);
 
           for (; range.start < length; ++range.start) {
 
-            status = f_fss_is_space(prepend, range);
+            status = f_fss_is_space(argv[index], range);
             if (F_status_is_error(status)) break;
 
             if (status == F_false) {
@@ -466,7 +464,7 @@ extern "C" {
                 signal_check = 0;
               }
 
-              object.string = arguments->argv[main->parameters.array[fss_extended_write_parameter_object_e].values.array[i]];
+              object.string = argv[main->parameters.array[fss_extended_write_parameter_object_e].values.array[i]];
               object.used = strnlen(object.string, F_console_parameter_size_d);
               object.size = object.used;
 
@@ -491,7 +489,7 @@ extern "C" {
 
               for (; i < main->parameters.array[fss_extended_write_parameter_content_e].values.used; ++i) {
 
-                contents.array[contents.used].string = arguments->argv[main->parameters.array[fss_extended_write_parameter_content_e].values.array[i]];
+                contents.array[contents.used].string = argv[main->parameters.array[fss_extended_write_parameter_content_e].values.array[i]];
                 contents.array[contents.used].used = strnlen(contents.array[contents.used].string, F_console_parameter_size_d);
                 contents.array[contents.used].size = contents.array[contents.used].used;
                 ++contents.used;
@@ -535,7 +533,7 @@ extern "C" {
               object_next = main->parameters.array[fss_extended_write_parameter_object_e].locations.array[i + 1];
             }
 
-            object.string = arguments->argv[main->parameters.array[fss_extended_write_parameter_object_e].values.array[i]];
+            object.string = argv[main->parameters.array[fss_extended_write_parameter_object_e].values.array[i]];
             object.used = strnlen(object.string, F_console_parameter_size_d);
             object.size = object.used;
 
@@ -561,7 +559,7 @@ extern "C" {
                 contents.array[contents.used].used = 0;
               }
 
-              status = f_string_append(arguments->argv[main->parameters.array[fss_extended_write_parameter_content_e].values.array[j]], strnlen(arguments->argv[main->parameters.array[fss_extended_write_parameter_content_e].values.array[j]], F_console_parameter_size_d), &contents.array[contents.used]);
+              status = f_string_append(argv[main->parameters.array[fss_extended_write_parameter_content_e].values.array[j]], strnlen(argv[main->parameters.array[fss_extended_write_parameter_content_e].values.array[j]], F_console_parameter_size_d), &contents.array[contents.used]);
 
               if (F_status_is_error(status)) {
                 fll_error_print(main->error, F_status_set_fine(status), "f_string_append", F_true);
index 4be91961b8810d6429c1c740bac3ef04bed03880..bc8b53b5aae10b8197532584ec5501a35f5e0dc9 100644 (file)
@@ -15,7 +15,7 @@ extern "C" {
       f_print(id.name, id.used, main->output.to.stream);
 
       if (main->parameters.array[fss_identify_parameter_object_e].result != f_console_result_found_e || main->parameters.array[fss_identify_parameter_content_e].result == f_console_result_found_e) {
-        f_print_terminated(f_fss_type_header_part5_s, main->output.to.stream);
+        f_print_dynamic_raw(f_fss_type_header_part5_s, main->output.to.stream);
       }
     }
 
index f9744fd4c236957a57d6a42e911ae944d6dfb51d..3b5d98066f2acd2926007599bd855d8583f62d58 100644 (file)
@@ -4,6 +4,15 @@
 extern "C" {
 #endif
 
+#ifndef _di_fss_status_code_program_version_
+  const f_string_static_t fss_status_code_program_version_s = macro_f_string_static_t_initialize(FSS_STATUS_CODE_program_version_s, 0, FSS_STATUS_CODE_program_version_s_length);
+#endif // _di_fss_status_code_program_version_
+
+#ifndef _di_fss_status_code_program_name_
+  const f_string_static_t fss_status_code_program_name_s = macro_f_string_static_t_initialize(FSS_STATUS_CODE_program_name_s, 0, FSS_STATUS_CODE_program_name_s_length);
+  const f_string_static_t fss_status_code_program_name_long_s = macro_f_string_static_t_initialize(FSS_STATUS_CODE_program_name_long_s, 0, FSS_STATUS_CODE_program_name_long_s_length);
+#endif // _di_fss_status_code_program_name_
+
 #ifndef _di_fss_status_code_program_help_parameters_
   const f_string_static_t fss_status_code_program_help_parameters_s = macro_f_string_static_t_initialize(FSS_STATUS_CODE_program_help_parameters_s, 0, FSS_STATUS_CODE_program_help_parameters_s_length);
 #endif // _di_fss_status_code_program_help_parameters_
index b9855dff10aa977e60f8fa786fe598ca66c13139..12246be6833d57a083ac9aa9f2849bd45d9d4bfb 100644 (file)
@@ -20,25 +20,27 @@ extern "C" {
  * The program version.
  */
 #ifndef _di_fss_status_code_program_version_
-  #define FSS_STATUS_code_program_version_major_s F_string_ascii_0_s
-  #define FSS_STATUS_code_program_version_minor_s F_string_ascii_5_s
-  #define FSS_STATUS_code_program_version_micro_s F_string_ascii_8_s
+  #define FSS_STATUS_CODE_program_version_major_s F_string_ascii_0_s
+  #define FSS_STATUS_CODE_program_version_minor_s F_string_ascii_5_s
+  #define FSS_STATUS_CODE_program_version_micro_s F_string_ascii_8_s
 
-  #define FSS_STATUS_code_program_version_major_s_length F_string_ascii_0_s_length
-  #define FSS_STATUS_code_program_version_minor_s_length F_string_ascii_5_s_length
-  #define FSS_STATUS_code_program_version_micro_s_length F_string_ascii_8_s_length
+  #define FSS_STATUS_CODE_program_version_major_s_length F_string_ascii_0_s_length
+  #define FSS_STATUS_CODE_program_version_minor_s_length F_string_ascii_5_s_length
+  #define FSS_STATUS_CODE_program_version_micro_s_length F_string_ascii_8_s_length
 
-  #if !(defined(FSS_STATUS_program_version_nano_prefix_s) && defined(FSS_STATUS_program_version_nano_prefix_s_length))
-    #define FSS_STATUS_program_version_nano_prefix_s
-    #define FSS_STATUS_program_version_nano_prefix_s_length 0
-  #endif // !(defined(FSS_STATUS_program_version_nano_prefix_s) && defined(FSS_STATUS_program_version_nano_prefix_s_length))
+  #if !(defined(FSS_STATUS_CODE_program_version_nano_prefix_s) && defined(FSS_STATUS_CODE_program_version_nano_prefix_s_length))
+    #define FSS_STATUS_CODE_program_version_nano_prefix_s
+    #define FSS_STATUS_CODE_program_version_nano_prefix_s_length 0
+  #endif // !(defined(FSS_STATUS_CODE_program_version_nano_prefix_s) && defined(FSS_STATUS_CODE_program_version_nano_prefix_s_length))
 
-  #if !(defined(FSS_STATUS_program_version_nano_s) && defined(FSS_STATUS_program_version_nano_s_length))
-    #define FSS_STATUS_program_version_nano_s
-    #define FSS_STATUS_program_version_nano_s_length 0
-  #endif // !(defined(FSS_STATUS_program_version_nano_s) && defined(FSS_STATUS_program_version_nano_s_length))
+  #if !(defined(FSS_STATUS_CODE_program_version_nano_s) && defined(FSS_STATUS_CODE_program_version_nano_s_length))
+    #define FSS_STATUS_CODE_program_version_nano_s
+    #define FSS_STATUS_CODE_program_version_nano_s_length 0
+  #endif // !(defined(FSS_STATUS_CODE_program_version_nano_s) && defined(FSS_STATUS_CODE_program_version_nano_s_length))
 
-  #define FSS_STATUS_code_program_version_length_s FSS_STATUS_code_program_version_major_s F_string_ascii_period_s FSS_STATUS_code_program_version_minor_s F_string_ascii_period_s FSS_STATUS_code_program_version_micro_s FSS_STATUS_code_program_version_nano_prefix_s FSS_STATUS_code_program_version_nano_s
+  #define FSS_STATUS_CODE_program_version_s FSS_STATUS_CODE_program_version_major_s F_string_ascii_period_s FSS_STATUS_CODE_program_version_minor_s F_string_ascii_period_s FSS_STATUS_CODE_program_version_micro_s FSS_STATUS_CODE_program_version_nano_prefix_s FSS_STATUS_CODE_program_version_nano_s
+
+  #define FSS_STATUS_CODE_program_version_s_length FSS_STATUS_CODE_program_version_major_s_length + F_string_ascii_period_s_length + FSS_STATUS_CODE_program_version_minor_s_length + F_string_ascii_period_s_length + FSS_STATUS_CODE_program_version_micro_s_length + FSS_STATUS_CODE_program_version_nano_prefix_s_length + FSS_STATUS_CODE_program_version_nano_s_length
 
   extern const f_string_static_t fss_status_code_program_version_s;
 #endif // _di_fss_status_code_program_version_
@@ -47,11 +49,11 @@ extern "C" {
  * The program name.
  */
 #ifndef _di_fss_status_code_program_name_
-  #define FSS_STATUS_code_program_name_s      "FSS_STATUS_code"
-  #define FSS_STATUS_code_program_name_long_s "FSS Status Code"
+  #define FSS_STATUS_CODE_program_name_s      "fss_status_code"
+  #define FSS_STATUS_CODE_program_name_long_s "FSS Status Code"
 
-  #define FSS_STATUS_CODE_program_name_s_length
-  #define FSS_STATUS_CODE_program_name_long_s_length
+  #define FSS_STATUS_CODE_program_name_s_length      15
+  #define FSS_STATUS_CODE_program_name_long_s_length 15
 
   const f_string_static_t fss_status_code_program_name_s;
   const f_string_static_t fss_status_code_program_name_long_s;
index c3247ecaa791e86d32f453577ab54b7dac328aa5..95eb9f1ed7aa59f51013afd00c588b863a1ff790 100644 (file)
@@ -6,15 +6,6 @@
 extern "C" {
 #endif
 
-#ifndef _di_fss_status_code_program_version_
-  const f_string_static_t fss_status_code_program_version_s = macro_f_string_static_t_initialize(FSS_STATUS_CODE_program_version_s, 0, FSS_STATUS_CODE_program_version_s_length);
-#endif // _di_fss_status_code_program_version_
-
-#ifndef _di_fss_status_code_program_name_
-  const f_string_static_t fss_status_code_program_name_s = macro_f_string_static_t_initialize(FSS_STATUS_CODE_program_name_s, 0, FSS_STATUS_CODE_program_name_s_length);
-  const f_string_static_t fss_status_code_program_name_long_s = macro_f_string_static_t_initialize(FSS_STATUS_CODE_program_name_long_s, 0, FSS_STATUS_CODE_program_name_long_s_length);
-#endif // _di_fss_status_code_program_name_
-
 #ifndef _di_fss_status_code_print_help_
   f_status_t fss_status_code_print_help(const f_file_t file, const f_color_context_t context) {
 
@@ -84,6 +75,7 @@ extern "C" {
 
       if (F_status_is_error(status)) {
         fss_status_code_main_delete(main);
+
         return F_status_set_error(status);
       }
     }
@@ -98,6 +90,7 @@ extern "C" {
 
       if (F_status_is_error(status)) {
         fss_status_code_main_delete(main);
+
         return status;
       }
 
@@ -131,6 +124,7 @@ extern "C" {
       fss_status_code_print_help(main->output.to, main->context);
 
       fss_status_code_main_delete(main);
+
       return F_none;
     }
 
@@ -138,6 +132,7 @@ extern "C" {
       fll_program_print_version(main->output.to, fss_status_code_program_version_s);
 
       fss_status_code_main_delete(main);
+
       return F_none;
     }
 
@@ -154,9 +149,11 @@ extern "C" {
         funlockfile(main->error.to.stream);
 
         fss_status_code_main_delete(main);
+
         return F_status_set_error(status);
       }
-      else if (main->parameters.array[fss_status_code_parameter_is_fine_e].result == f_console_result_found_e) {
+
+      if (main->parameters.array[fss_status_code_parameter_is_fine_e].result == f_console_result_found_e) {
         flockfile(main->error.to.stream);
 
         fl_print_format("%r%[%QThe parameter '%]", main->error.to.stream, f_string_eol_s, main->error.context, main->error.prefix, main->error.context);
@@ -168,6 +165,7 @@ extern "C" {
         funlockfile(main->error.to.stream);
 
         fss_status_code_main_delete(main);
+
         return F_status_set_error(status);
       }
     }
@@ -183,6 +181,7 @@ extern "C" {
       funlockfile(main->error.to.stream);
 
       fss_status_code_main_delete(main);
+
       return F_status_set_error(status);
     }
 
@@ -190,6 +189,7 @@ extern "C" {
       fll_print_format("%[You failed to specify an error code.%]%r", main->error.to.stream, main->error.context, main->error.context, f_string_eol_s);
 
       fss_status_code_main_delete(main);
+
       return F_status_set_error(F_parameter);
     }
 
@@ -210,13 +210,14 @@ extern "C" {
           if (!((++signal_check) % fss_status_code_signal_check_d)) {
             if (fss_status_code_signal_received(main)) {
               status = F_status_set_error(F_interrupt);
+
               break;
             }
 
             signal_check = 0;
           }
 
-          status2 = fss_status_code_process_check(main, arguments->argv[main->parameters.remaining.array[i]]);
+          status2 = fss_status_code_process_check(main, argv[main->parameters.remaining.array[i]]);
 
           if (F_status_is_error(status2) && status == F_none) {
             status = status2;
@@ -241,13 +242,14 @@ extern "C" {
           if (!((++signal_check) % fss_status_code_signal_check_d)) {
             if (fss_status_code_signal_received(main)) {
               status = F_status_set_error(F_interrupt);
+
               break;
             }
 
             signal_check = 0;
           }
 
-          status2 = fss_status_code_process_number(main, arguments->argv[main->parameters.remaining.array[i]]);
+          status2 = fss_status_code_process_number(main, argv[main->parameters.remaining.array[i]]);
 
           if (F_status_is_error(status2) && status == F_none) {
             status = status2;
@@ -272,13 +274,14 @@ extern "C" {
           if (!((++signal_check) % fss_status_code_signal_check_d)) {
             if (fss_status_code_signal_received(main)) {
               status = F_status_set_error(F_interrupt);
+
               break;
             }
 
             signal_check = 0;
           }
 
-          status2 = fss_status_code_process_normal(main, arguments->argv[main->parameters.remaining.array[i]]);
+          status2 = fss_status_code_process_normal(main, argv[main->parameters.remaining.array[i]]);
 
           if (F_status_is_error(status2) && status == F_none) {
             status = status2;
index 2b0f84a2a33f9e3669baf716500408d6ec13d26d..df6c2585d1349226398a2db5e947a9132fd09ec5 100644 (file)
@@ -7,7 +7,7 @@ extern "C" {
 #endif
 
 #ifndef _di_fss_status_code_process_check_
-  f_status_t fss_status_code_process_check(fll_program_data_t * const main, const f_string_t value) {
+  f_status_t fss_status_code_process_check(fll_program_data_t * const main, const f_string_static_t value) {
 
     f_number_unsigned_t number = 0;
 
@@ -18,30 +18,30 @@ extern "C" {
 
     if (main->parameters.array[fss_status_code_parameter_is_error_e].result == f_console_result_found_e) {
       if (F_status_is_error(number)) {
-        f_print_terminated(f_status_true_s, main->output.to.stream);
+        f_print_dynamic_raw(f_status_true_s, main->output.to.stream);
       }
       else {
-        f_print_terminated(f_status_false_s, main->output.to.stream);
+        f_print_dynamic_raw(f_status_false_s, main->output.to.stream);
       }
 
       f_print_dynamic_raw(f_string_eol_s, main->output.to.stream);
     }
     else if (main->parameters.array[fss_status_code_parameter_is_warning_e].result == f_console_result_found_e) {
       if (F_status_is_warning(number)) {
-        f_print_terminated(f_status_true_s, main->output.to.stream);
+        f_print_dynamic_raw(f_status_true_s, main->output.to.stream);
       }
       else {
-        f_print_terminated(f_status_false_s, main->output.to.stream);
+        f_print_dynamic_raw(f_status_false_s, main->output.to.stream);
       }
 
       f_print_dynamic_raw(f_string_eol_s, main->output.to.stream);
     }
     else if (main->parameters.array[fss_status_code_parameter_is_fine_e].result == f_console_result_found_e) {
       if (F_status_is_fine(number)) {
-        f_print_terminated(f_status_true_s, main->output.to.stream);
+        f_print_dynamic_raw(f_status_true_s, main->output.to.stream);
       }
       else {
-        f_print_terminated(f_status_false_s, main->output.to.stream);
+        f_print_dynamic_raw(f_status_false_s, main->output.to.stream);
       }
 
       f_print_dynamic_raw(f_string_eol_s, main->output.to.stream);
@@ -52,16 +52,16 @@ extern "C" {
 #endif // _di_fss_status_code_process_check_
 
 #ifndef _di_fss_status_code_process_number_
-  f_status_t fss_status_code_process_number(fll_program_data_t * const main, const f_string_t value) {
+  f_status_t fss_status_code_process_number(fll_program_data_t * const main, const f_string_static_t value) {
 
     f_status_t status = F_none;
 
     {
-      const f_string_range_t range = macro_f_string_range_t_initialize(strlen(value));
+      const f_string_range_t range = macro_f_string_range_t_initialize(value.used);
 
       f_number_unsigned_t number = 0;
 
-      status = fl_conversion_string_to_number_unsigned(value, range, &number);
+      status = fl_conversion_string_to_number_unsigned(value.string, range, &number);
 
       if (status == F_none) {
         fl_print_format("%[invalid name%]%r", main->output.to.stream, main->context.set.error, main->context.set.error, f_string_eol_s);
@@ -110,17 +110,16 @@ extern "C" {
 #endif // _di_fss_status_code_process_number_
 
 #ifndef _di_fss_status_code_process_normal_
-  f_status_t fss_status_code_process_normal(fll_program_data_t * const main, const f_string_t value) {
+  f_status_t fss_status_code_process_normal(fll_program_data_t * const main, const f_string_static_t value) {
 
     f_number_unsigned_t number = 0;
 
     f_status_t status = fss_status_code_convert_number(main, value, &number);
     if (F_status_is_error(status)) return status;
 
-    const f_status_t code = (f_status_t) number;
-    f_string_t string = 0;
+    f_string_static_t name = f_string_static_t_initialize;
 
-    status = fll_fss_status_string_to(code, &string);
+    status = fll_fss_status_string_to((f_status_t) number, &name);
 
     if (F_status_is_error(status)) {
       if (F_status_set_fine(status) == F_data) {
@@ -133,18 +132,18 @@ extern "C" {
       return status;
     }
 
-    fl_print_format("%S%r", main->output.to.stream, string, f_string_eol_s);
+    fl_print_format("%Q%r", main->output.to.stream, name, f_string_eol_s);
 
     return F_none;
   }
 #endif // _di_fss_status_code_process_normal_
 
 #ifndef _di_fss_status_code_convert_number_
-  f_status_t fss_status_code_convert_number(fll_program_data_t * const main, const f_string_t value, f_number_unsigned_t *number) {
+  f_status_t fss_status_code_convert_number(fll_program_data_t * const main, const f_string_static_t value, f_number_unsigned_t *number) {
 
-    const f_string_range_t range = macro_f_string_range_t_initialize(strlen(value));
+    const f_string_range_t range = macro_f_string_range_t_initialize(value.used);
 
-    f_status_t status = fl_conversion_string_to_number_unsigned(value, range, number);
+    f_status_t status = fl_conversion_string_to_number_unsigned(value.string, range, number);
 
     if (*number > F_status_size_max_with_signal) {
       fl_print_format("%[out of range%]%r", main->output.to.stream, main->context.set.error, main->context.set.error, f_string_eol_s);
index 648718da5e4880e0eebf40465965ba866c994297..a4f53d3a1e1f41f40d031457e124d4a09c783b39 100644 (file)
@@ -34,7 +34,7 @@ extern "C" {
  * @see fss_status_code_convert_number()
  */
 #ifndef _di_fss_status_code_process_check_
-  extern f_status_t fss_status_code_process_check(fll_program_data_t * const main, const f_string_t value) F_attribute_visibility_internal_d;
+  extern f_status_t fss_status_code_process_check(fll_program_data_t * const main, const f_string_static_t value) F_attribute_visibility_internal_d;
 #endif // _di_fss_status_code_process_check_
 
 /**
@@ -56,7 +56,7 @@ extern "C" {
  * @see fll_fss_status_string_from()
  */
 #ifndef _di_fss_status_code_process_number_
-  extern f_status_t fss_status_code_process_number(fll_program_data_t * const main, const f_string_t value) F_attribute_visibility_internal_d;
+  extern f_status_t fss_status_code_process_number(fll_program_data_t * const main, const f_string_static_t value) F_attribute_visibility_internal_d;
 #endif // _di_fss_status_code_process_number_
 
 /**
@@ -83,7 +83,7 @@ extern "C" {
  * @see fss_status_code_convert_number()
  */
 #ifndef _di_fss_status_code_process_normal_
-  extern f_status_t fss_status_code_process_normal(fll_program_data_t * const main, const f_string_t value) F_attribute_visibility_internal_d;
+  extern f_status_t fss_status_code_process_normal(fll_program_data_t * const main, const f_string_static_t value) F_attribute_visibility_internal_d;
 #endif // _di_fss_status_code_process_normal_
 
 /**
@@ -111,7 +111,7 @@ extern "C" {
  * @see fl_console_parameter_to_number_unsigned()
  */
 #ifndef _di_fss_status_code_convert_number_
-  extern f_status_t fss_status_code_convert_number(fll_program_data_t * const main, const f_string_t value, f_number_unsigned_t *number) F_attribute_visibility_internal_d;
+  extern f_status_t fss_status_code_convert_number(fll_program_data_t * const main, const f_string_static_t value, f_number_unsigned_t *number) F_attribute_visibility_internal_d;
 #endif // _di_fss_status_code_convert_number_
 
 #ifdef __cplusplus
index 5f2872cebf149ec543772f53db3729240c816af5..44a80210449f8fba4b38d122d07e275b79da338a 100644 (file)
@@ -35,6 +35,20 @@ extern "C" {
   const f_string_static_t iki_read_long_whole_s = macro_f_string_static_t_initialize(IKI_READ_long_whole_s, 0, IKI_READ_long_whole_s_length);
 #endif // _di_iki_read_parameters_
 
+#ifndef _di_iki_read_substitution_t_
+  #define IKI_READ_substitution_vocabulary_s "vocabulary"
+  #define IKI_READ_substitution_replace_s    "replace"
+  #define IKI_READ_substitution_with_s       "with"
+
+  #define IKI_READ_substitution_vocabulary_s_length 10
+  #define IKI_READ_substitution_replace_s_length    7
+  #define IKI_READ_substitution_with_s_length       4
+
+  const f_string_static_t iki_read_substitution_vocabulary_s = macro_f_string_static_t_initialize(IKI_READ_substitution_vocabulary_s, 0, IKI_READ_substitution_vocabulary_s_length);
+  const f_string_static_t iki_read_substitution_replace_s = macro_f_string_static_t_initialize(IKI_READ_substitution_replace_s, 0, IKI_READ_substitution_replace_s_length);
+  const f_string_static_t iki_read_substitution_with_s = macro_f_string_static_t_initialize(IKI_READ_substitution_with_s, 0, IKI_READ_substitution_with_s_length);
+#endif // _di_iki_read_substitution_t_
+
 #ifndef _di_iki_read_main_delete_
   f_status_t iki_read_main_delete(iki_read_main_t * const main) {
 
index 012f9a5f1cb628d3102bab8d67d7b23a685a3be9..2149daddc75d958df71537db318e2e9fbf674ab3 100644 (file)
@@ -40,7 +40,7 @@ extern "C" {
 
   #define IKI_READ_program_version_s IKI_READ_program_version_major_s F_string_ascii_period_s IKI_READ_program_version_minor_s F_string_ascii_period_s IKI_READ_program_version_micro_s IKI_READ_program_version_nano_prefix_s IKI_READ_program_version_nano_s
 
-  #define IKI_READ_program_version_s_length iki_read_program_version_major_s_length + F_string_ascii_period_s iki_read_program_version_minor_s_length + F_string_ascii_period_s_length + iki_read_program_version_micro_s_length + iki_read_program_version_nano_prefix_s_length + iki_read_program_version_nano_s_length
+  #define IKI_READ_program_version_s_length IKI_READ_program_version_major_s_length + F_string_ascii_period_s_length + IKI_READ_program_version_minor_s_length + F_string_ascii_period_s_length + IKI_READ_program_version_micro_s_length + IKI_READ_program_version_nano_prefix_s_length + IKI_READ_program_version_nano_s_length
 
   extern const f_string_static_t iki_read_program_version_s;
 #endif // _di_iki_read_program_version_
@@ -52,8 +52,8 @@ extern "C" {
   #define IKI_READ_program_name_s      "iki_read"
   #define IKI_READ_program_name_long_s "IKI Read"
 
-  #define IKI_READ_program_name_s_length      9
-  #define IKI_READ_program_name_long_s_length 9
+  #define IKI_READ_program_name_s_length      8
+  #define IKI_READ_program_name_long_s_length 8
 
   extern const f_string_static_t iki_read_program_name_s;
   extern const f_string_static_t iki_read_program_name_long_s;
@@ -185,9 +185,17 @@ extern "C" {
 #endif // _di_iki_read_parameters_
 
 #ifndef _di_iki_read_substitution_t_
-  #define iki_read_substitution_vocabulary_s "vocabulary"
-  #define iki_read_substitution_replace_s    "replace"
-  #define iki_read_substitution_with_s       "with"
+  #define IKI_READ_substitution_vocabulary_s "vocabulary"
+  #define IKI_READ_substitution_replace_s    "replace"
+  #define IKI_READ_substitution_with_s       "with"
+
+  #define IKI_READ_substitution_vocabulary_s_length 10
+  #define IKI_READ_substitution_replace_s_length    7
+  #define IKI_READ_substitution_with_s_length       4
+
+  extern const f_string_static_t iki_read_substitution_vocabulary_s;
+  extern const f_string_static_t iki_read_substitution_replace_s;
+  extern const f_string_static_t iki_read_substitution_with_s;
 
   typedef struct {
     f_string_static_t replace;
@@ -230,7 +238,6 @@ extern "C" {
  * The main program data.
  *
  * parameters:   The state of pre-defined parameters passed to the program.
- * remaining:    The remaining, non-pre-defined parameters, passed to the program.
  * process_pipe: Designate whether or not to process the input pipe.
  * output:       The output file for general printing.
  * error:        The output file for error printing.
@@ -267,7 +274,6 @@ extern "C" {
   #define iki_read_main_t_initialize \
     { \
       f_console_parameters_t_initialize, \
-      f_array_lengths_t_initialize, \
       F_false, \
       fl_print_t_initialize, \
       macro_fl_print_t_initialize_error(), \
index 8c5b5a082334b9baa491f609e5ae109b62f5c45b..39ba5a20ae5298b785385c7a7eab50b3b655a3ab 100644 (file)
@@ -46,14 +46,14 @@ extern "C" {
     fl_print_format(" %[Notes:%]%r", file.stream, context.set.important, context.set.important, f_string_eol_s);
     fl_print_format("  This program will find and print variables, vocabularies, or content following the IKI standard, without focusing on any particular vocabulary specification.%r%r", file.stream, f_string_eol_s, f_string_eol_s);
 
-    fl_print_format("  This %[%r%s%] option, requires 3 additional parameters:", file.stream, context.set.notable, f_console_symbol_long_enable_s, iki_read_long_substitute_s, context.set.notable);
-    fl_print_format(" %[<%]%s%[>%]", file.stream, context.set.notable, context.set.notable, iki_read_substitution_vocabulary_s, context.set.notable, context.set.notable);
-    fl_print_format(" %[<%]%s%[>%]", file.stream, context.set.notable, context.set.notable, iki_read_substitution_replace_s, context.set.notable, context.set.notable);
-    fl_print_format(" %[<%]%s%[>%].%r", file.stream, context.set.notable, context.set.notable, iki_read_substitution_with_s, context.set.notable, context.set.notable, f_string_eol_s);
+    fl_print_format("  This %[%r%r%] option, requires 3 additional parameters:", file.stream, context.set.notable, f_console_symbol_long_enable_s, iki_read_long_substitute_s, context.set.notable);
+    fl_print_format(" %[<%]%r%[>%]", file.stream, context.set.notable, context.set.notable, iki_read_substitution_vocabulary_s, context.set.notable, context.set.notable);
+    fl_print_format(" %[<%]%r%[>%]", file.stream, context.set.notable, context.set.notable, iki_read_substitution_replace_s, context.set.notable, context.set.notable);
+    fl_print_format(" %[<%]%r%[>%].%r", file.stream, context.set.notable, context.set.notable, iki_read_substitution_with_s, context.set.notable, context.set.notable, f_string_eol_s);
 
-    fl_print_format("    %[%s%]: The name of the vocabulary whose content is to be substituted.%r", file.stream, context.set.notable, iki_read_substitution_vocabulary_s, context.set.notable, f_string_eol_s);
-    fl_print_format("    %[%s%]: The content matching this exact string will be substituted.%r", file.stream, context.set.notable, iki_read_substitution_replace_s, context.set.notable, f_string_eol_s);
-    fl_print_format("    %[%s%]: The new string to use as the substitute.%r%r", file.stream, context.set.notable, iki_read_substitution_with_s, context.set.notable, f_string_eol_s, f_string_eol_s);
+    fl_print_format("    %[%r%]: The name of the vocabulary whose content is to be substituted.%r", file.stream, context.set.notable, iki_read_substitution_vocabulary_s, context.set.notable, f_string_eol_s);
+    fl_print_format("    %[%r%]: The content matching this exact string will be substituted.%r", file.stream, context.set.notable, iki_read_substitution_replace_s, context.set.notable, f_string_eol_s);
+    fl_print_format("    %[%r%]: The new string to use as the substitute.%r%r", file.stream, context.set.notable, iki_read_substitution_with_s, context.set.notable, f_string_eol_s, f_string_eol_s);
 
     fl_print_format("  The vocabulary and replacement are case-sensitive and must exactly match.%r%r", file.stream, f_string_eol_s, f_string_eol_s);
 
@@ -187,14 +187,14 @@ extern "C" {
       }
       else if (main->parameters.array[iki_read_parameter_at_e].result == f_console_result_additional_e) {
         const f_array_length_t index = main->parameters.array[iki_read_parameter_at_e].values.array[main->parameters.array[iki_read_parameter_at_e].values.used - 1];
-        const f_string_range_t range = macro_f_string_range_t_initialize(strlen(arguments->argv[index]));
+        const f_string_range_t range = macro_f_string_range_t_initialize(argv[index].used);
 
         f_number_unsigned_t number = 0;
 
-        status = fl_conversion_string_to_number_unsigned(arguments->argv[index], range, &number);
+        status = fl_conversion_string_to_number_unsigned(argv[index].string, range, &number);
 
         if (F_status_is_error(status)) {
-          fll_error_parameter_integer_print(main->error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, F_console_symbol_long_enable_s iki_read_long_at_s, arguments->argv[index]);
+          fll_error_parameter_integer_print(main->error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, iki_read_long_at_s, argv[index]);
 
           status = F_status_set_error(F_parameter);
         }
@@ -233,14 +233,14 @@ extern "C" {
       }
       else if (main->parameters.array[iki_read_parameter_line_e].result == f_console_result_additional_e) {
         const f_array_length_t index = main->parameters.array[iki_read_parameter_line_e].values.array[main->parameters.array[iki_read_parameter_line_e].values.used - 1];
-        const f_string_range_t range = macro_f_string_range_t_initialize(strlen(arguments->argv[index]));
+        const f_string_range_t range = macro_f_string_range_t_initialize(argv[index].used);
 
         f_number_unsigned_t number = 0;
 
-        status = fl_conversion_string_to_number_unsigned(arguments->argv[index], range, &number);
+        status = fl_conversion_string_to_number_unsigned(argv[index].string, range, &number);
 
         if (F_status_is_error(status)) {
-          fll_error_parameter_integer_print(main->error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, F_console_symbol_long_enable_s iki_read_long_line_s, arguments->argv[index]);
+          fll_error_parameter_integer_print(main->error, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, iki_read_long_line_s, argv[index]);
 
           status = F_status_set_error(F_parameter);
         }
@@ -384,7 +384,8 @@ extern "C" {
         main->mode = iki_read_mode_total_e;
       }
       else {
-        // this is the default behavior, so there is no reason to check for the -c/--content parameter.
+
+        // This is the default behavior, so there is no reason to check for the -c/--content parameter.
         main->mode = iki_read_mode_content_e;
       }
 
@@ -424,10 +425,10 @@ extern "C" {
         status = f_file_read(file, &main->buffer);
 
         if (F_status_is_error(status)) {
-          fll_error_file_print(main->error, F_status_set_fine(status), "f_file_read", F_true, "-", f_file_operation_process_s, fll_error_file_type_file_e);
+          fll_error_file_print(main->error, F_status_set_fine(status), "f_file_read", F_true, f_string_ascii_minus_s, f_file_operation_process_s, fll_error_file_type_file_e);
         }
         else {
-          status = iki_read_process_buffer(main, arguments, "-");
+          status = iki_read_process_buffer(main);
         }
 
         // Clear buffers before continuing.
@@ -435,15 +436,16 @@ extern "C" {
       }
 
       if (F_status_is_fine(status) && main->parameters.remaining.used > 0) {
-        f_array_length_t i = 0;
+        uint16_t signal_check = 0;
         f_array_length_t total = 0;
         f_file_t file = f_file_t_initialize;
 
-        for (uint16_t signal_check = 0; i < main->parameters.remaining.used; ++i) {
+        for (f_array_length_t i = 0; i < main->parameters.remaining.used; ++i) {
 
           if (!((++signal_check) % iki_read_signal_check_d)) {
             if (iki_read_signal_received(main)) {
               status = F_status_set_error(F_interrupt);
+
               break;
             }
 
@@ -453,25 +455,28 @@ extern "C" {
           macro_f_file_t_reset(file);
           total = 0;
 
-          status = f_file_open(arguments->argv[main->parameters.remaining.array[i]], 0, &file);
+          status = f_file_open(argv[main->parameters.remaining.array[i]], 0, &file);
 
           if (F_status_is_error(status)) {
-            fll_error_file_print(main->error, F_status_set_fine(status), "f_file_open", F_true, arguments->argv[main->parameters.remaining.array[i]], f_file_operation_process_s, fll_error_file_type_file_e);
+            fll_error_file_print(main->error, F_status_set_fine(status), "f_file_open", F_true, argv[main->parameters.remaining.array[i]], f_file_operation_process_s, fll_error_file_type_file_e);
+
             break;
           }
 
           status = f_file_size_by_id(file.id, &total);
 
           if (F_status_is_error(status)) {
-            fll_error_file_print(main->error, F_status_set_fine(status), "f_file_size_by_id", F_true, arguments->argv[main->parameters.remaining.array[i]], f_file_operation_process_s, fll_error_file_type_file_e);
+            fll_error_file_print(main->error, F_status_set_fine(status), "f_file_size_by_id", F_true, argv[main->parameters.remaining.array[i]], f_file_operation_process_s, fll_error_file_type_file_e);
 
             f_file_stream_close(F_true, &file);
+
             break;
           }
 
           // Skip past empty files.
           if (!total) {
             f_file_stream_close(F_true, &file);
+
             continue;
           }
 
@@ -480,11 +485,12 @@ extern "C" {
           f_file_stream_close(F_true, &file);
 
           if (F_status_is_error(status)) {
-            fll_error_file_print(main->error, F_status_set_fine(status), "f_file_read_until", F_true, arguments->argv[main->parameters.remaining.array[i]], f_file_operation_process_s, fll_error_file_type_file_e);
+            fll_error_file_print(main->error, F_status_set_fine(status), "f_file_read_until", F_true, argv[main->parameters.remaining.array[i]], f_file_operation_process_s, fll_error_file_type_file_e);
+
             break;
           }
 
-          status = iki_read_process_buffer(main, arguments, arguments->argv[main->parameters.remaining.array[i]]);
+          status = iki_read_process_buffer(main);
           if (F_status_is_error(status)) break;
 
           // Clear buffers before repeating the loop.
index b995e85986b7fed9b0aa69af24e7f77cbed6d643..a268364392320fe6f56b56894ff571d3e1136f4e 100644 (file)
@@ -10,17 +10,11 @@ extern "C" {
   void iki_read_substitutions_print(iki_read_main_t * const main, const iki_data_t iki_data, const f_string_ranges_t ranges, const iki_read_substitutions_t substitutions, const f_array_length_t index, const bool content_only) {
 
     f_status_t status = F_none;
-
     f_array_length_t i = 0;
-    f_string_range_t range = f_string_range_t_initialize;
-
-    range.start = 0;
 
     for (; i < substitutions.used; ++i) {
 
-      range.stop = substitutions.array[i].replace.used - 1;
-
-      status = fl_string_dynamic_partial_compare(substitutions.array[i].replace, main->buffer, range, iki_data.content.array[index]);
+      status = fl_string_dynamic_partial_compare_string(substitutions.array[i].replace.string, main->buffer, substitutions.array[i].replace.used, iki_data.content.array[index]);
       if (status == F_equal_to) break;
     } // for
 
@@ -29,8 +23,7 @@ extern "C" {
         f_print_dynamic(substitutions.array[i].with, main->output.to.stream);
       }
       else {
-        range.start = iki_data.variable.array[index].start;
-        range.stop = iki_data.content.array[index].start - 1;
+        f_string_range_t range = macro_f_string_range_t_initialize2(iki_data.variable.array[index].start, iki_data.content.array[index].start - 1);
 
         f_print_dynamic_partial(main->buffer, range, main->output.to.stream);
 
index e9416ee24f7a91b521f89a00cbd251ed9b6adc09..7e3b3a8b97ed4d78fd2149b18d1ed63385a7cb92 100644 (file)
@@ -8,7 +8,7 @@ extern "C" {
 #endif
 
 #ifndef _di_iki_read_process_at_
-  f_status_t iki_read_process_at(iki_read_main_t * const main, const f_string_t file_name, f_string_range_t *range) {
+  f_status_t iki_read_process_at(iki_read_main_t * const main, f_string_range_t *range) {
 
     if (main->parameters.array[iki_read_parameter_line_e].result != f_console_result_additional_e) {
       return F_false;
@@ -36,7 +36,7 @@ extern "C" {
 #endif // _di_iki_read_process_at_
 
 #ifndef _di_iki_read_process_buffer_
-  f_status_t iki_read_process_buffer(iki_read_main_t * const main, const f_console_arguments_t *arguments, const f_string_t file_name) {
+  f_status_t iki_read_process_buffer(iki_read_main_t * const main) {
 
     f_status_t status = F_none;
     iki_data_t iki_data = iki_data_t_initialize;
@@ -44,7 +44,7 @@ extern "C" {
     if (main->parameters.array[iki_read_parameter_whole_e].result == f_console_result_found_e) {
       f_string_range_t buffer_range = macro_f_string_range_t_initialize(main->buffer.used);
 
-      status = iki_read_process_at(main, file_name, &buffer_range);
+      status = iki_read_process_at(main, &buffer_range);
 
       if (status == F_true) {
         if (buffer_range.start > main->buffer.used) {
@@ -56,22 +56,22 @@ extern "C" {
       }
 
       if (main->mode == iki_read_mode_content_e) {
-        status = iki_read_process_buffer_ranges_whole(main, arguments, file_name, buffer_range, &iki_data, &iki_data.content);
+        status = iki_read_process_buffer_ranges_whole(main, buffer_range, &iki_data, &iki_data.content);
       }
       else if (main->mode == iki_read_mode_literal_e) {
-        status = iki_read_process_buffer_ranges_whole(main, arguments, file_name, buffer_range, &iki_data, &iki_data.variable);
+        status = iki_read_process_buffer_ranges_whole(main, buffer_range, &iki_data, &iki_data.variable);
       }
       else if (main->mode == iki_read_mode_object_e) {
-        status = iki_read_process_buffer_ranges_whole(main, arguments, file_name, buffer_range, &iki_data, &iki_data.vocabulary);
+        status = iki_read_process_buffer_ranges_whole(main, buffer_range, &iki_data, &iki_data.vocabulary);
       }
     }
     else if (main->mode == iki_read_mode_total_e) {
-      status = iki_read_process_buffer_total(main, arguments, file_name, &iki_data);
+      status = iki_read_process_buffer_total(main, &iki_data);
     }
     else {
       f_string_range_t buffer_range = macro_f_string_range_t_initialize(main->buffer.used);
 
-      status = iki_read_process_at(main, file_name, &buffer_range);
+      status = iki_read_process_at(main, &buffer_range);
 
       if (status == F_true && buffer_range.start > main->buffer.used || status == F_data_not) {
         macro_iki_data_t_delete_simple(iki_data);
@@ -80,13 +80,13 @@ extern "C" {
       }
 
       if (main->mode == iki_read_mode_content_e) {
-        status = iki_read_process_buffer_ranges(main, arguments, file_name, &buffer_range, &iki_data, &iki_data.content);
+        status = iki_read_process_buffer_ranges(main, &buffer_range, &iki_data, &iki_data.content);
       }
       else if (main->mode == iki_read_mode_literal_e) {
-        status = iki_read_process_buffer_ranges(main, arguments, file_name, &buffer_range, &iki_data, &iki_data.variable);
+        status = iki_read_process_buffer_ranges(main, &buffer_range, &iki_data, &iki_data.variable);
       }
       else if (main->mode == iki_read_mode_object_e) {
-        status = iki_read_process_buffer_ranges(main, arguments, file_name, &buffer_range, &iki_data, &iki_data.vocabulary);
+        status = iki_read_process_buffer_ranges(main, &buffer_range, &iki_data, &iki_data.vocabulary);
       }
     }
 
@@ -97,7 +97,7 @@ extern "C" {
 #endif // _di_iki_read_process_buffer_
 
 #ifndef _di_iki_read_process_buffer_ranges_
-  f_status_t iki_read_process_buffer_ranges(iki_read_main_t * const main, const f_console_arguments_t *arguments, const f_string_t file_name, f_string_range_t *buffer_range, iki_data_t *iki_data, f_string_ranges_t *ranges) {
+  f_status_t iki_read_process_buffer_ranges(iki_read_main_t * const main, f_string_range_t *buffer_range, iki_data_t *iki_data, f_string_ranges_t *ranges) {
 
     f_status_t status = F_none;
 
@@ -126,7 +126,7 @@ extern "C" {
     memset(substitutionss, 0, sizeof(iki_read_substitutions_t) * iki_data->variable.used);
 
     if (main->mode == iki_read_mode_literal_e || main->mode == iki_read_mode_content_e) {
-      status = iki_read_substitutions_identify(main, arguments, file_name, &iki_data->vocabulary, substitutionss);
+      status = iki_read_substitutions_identify(main, &iki_data->vocabulary, substitutionss);
 
       if (F_status_is_error(status)) {
         fll_error_print(main->error, F_status_set_fine(status), "iki_read_substitutions_identify", F_true);
@@ -153,10 +153,10 @@ extern "C" {
         index = main->parameters.array[iki_read_parameter_name_e].values.array[i];
         name.used = 0;
 
-        status = f_string_append_nulless(arguments->argv[index], strlen(arguments->argv[index]), &name);
+        status = f_string_dynamic_append_nulless(main->parameters.arguments.array[index], &name);
 
         if (F_status_is_error(status)) {
-          fll_error_print(main->error, F_status_set_fine(status), "f_string_append_nulless", F_true);
+          fll_error_print(main->error, F_status_set_fine(status), "f_string_dynamic_append_nulless", F_true);
 
           for (f_array_length_t i = 0; i < iki_data->variable.used; ++i) {
             macro_iki_read_substitutions_t_delete_simple(substitutionss[i]);
@@ -197,8 +197,12 @@ extern "C" {
 
       f_string_dynamic_resize(0, &name);
 
-      if (unmatched) status = F_data_not;
-      else status = F_none;
+      if (unmatched) {
+        status = F_data_not;
+      }
+      else {
+        status = F_none;
+      }
     }
     else if (ranges->used) {
       if (main->parameters.array[iki_read_parameter_at_e].result == f_console_result_additional_e) {
@@ -255,7 +259,7 @@ extern "C" {
 #endif // _di_iki_read_process_buffer_ranges_
 
 #ifndef _di_iki_read_process_buffer_ranges_whole_
-  f_status_t iki_read_process_buffer_ranges_whole(iki_read_main_t * const main, const f_console_arguments_t *arguments, const f_string_t file_name, const f_string_range_t buffer_range, iki_data_t *iki_data, f_string_ranges_t *ranges) {
+  f_status_t iki_read_process_buffer_ranges_whole(iki_read_main_t * const main, const f_string_range_t buffer_range, iki_data_t *iki_data, f_string_ranges_t *ranges) {
 
     f_status_t status = F_none;
     f_string_range_t range = buffer_range;
@@ -289,7 +293,7 @@ extern "C" {
     memset(substitutionss, 0, sizeof(iki_read_substitutions_t) * iki_data->variable.used);
 
     if (main->mode == iki_read_mode_literal_e || main->mode == iki_read_mode_content_e) {
-      status = iki_read_substitutions_identify(main, arguments, file_name, &iki_data->vocabulary, substitutionss);
+      status = iki_read_substitutions_identify(main, &iki_data->vocabulary, substitutionss);
 
       if (F_status_is_error(status)) {
         fll_error_print(main->error, F_status_set_fine(status), "iki_read_substitutions_identify", F_true);
@@ -313,18 +317,14 @@ extern "C" {
     if (main->parameters.array[iki_read_parameter_name_e].result == f_console_result_additional_e) {
       f_array_length_t i = 0;
       f_array_length_t j = 0;
-      f_array_length_t length_argument = 0;
 
       for (f_array_length_t index = 0; i < main->parameters.array[iki_read_parameter_name_e].values.used; ++i) {
 
         index = main->parameters.array[iki_read_parameter_name_e].values.array[i];
-        length_argument = strnlen(arguments->argv[index], F_console_parameter_size_d);
 
         for (j = 0, name_missed = F_true; j < names.used; ++j) {
 
-          status = fl_string_compare(arguments->argv[index], names.array[j].string, length_argument, names.array[j].used);
-
-          if (status == F_equal_to) {
+          if (fl_string_dynamic_compare(main->parameters.arguments.array[index], names.array[j]) == F_equal_to) {
             name_missed = F_false;
 
             break;
@@ -340,10 +340,10 @@ extern "C" {
             break;
           }
 
-          status = f_string_append_nulless(arguments->argv[index], length_argument, &names.array[names.used]);
+          status = f_string_dynamic_append_nulless(main->parameters.arguments.array[index], &names.array[names.used]);
 
           if (F_status_is_error(status)) {
-            fll_error_print(main->error, F_status_set_fine(status), "f_string_append_nulless", F_true);
+            fll_error_print(main->error, F_status_set_fine(status), "f_string_dynamic_append_nulless", F_true);
 
             break;
           }
@@ -451,22 +451,22 @@ extern "C" {
 #endif // _di_iki_read_process_buffer_ranges_whole_
 
 #ifndef _di_iki_read_process_buffer_total_
-  f_status_t iki_read_process_buffer_total(iki_read_main_t * const main, const f_console_arguments_t *arguments, const f_string_t file_name, iki_data_t *iki_data) {
+  f_status_t iki_read_process_buffer_total(iki_read_main_t * const main, iki_data_t *iki_data) {
 
     f_status_t status = F_none;
     f_string_range_t range = macro_f_string_range_t_initialize(main->buffer.used);
 
-    status = iki_read_process_at(main, file_name, &range);
+    status = iki_read_process_at(main, &range);
 
     if (status == F_true) {
       if (range.start > main->buffer.used) {
-        fll_print_format("0%r", main->output.to.stream, f_string_eol_s);
+        fll_print_format("%r%r", main->output.to.stream, f_string_ascii_0_s, f_string_eol_s);
 
         return F_none;
       }
     }
     else if (status == F_data_not) {
-      fll_print_format("0%r", main->output.to.stream, f_string_eol_s);
+      fll_print_format("%r%r", main->output.to.stream, f_string_ascii_0_s, f_string_eol_s);
 
       return F_none;
     }
@@ -513,12 +513,13 @@ extern "C" {
         index = main->parameters.array[iki_read_parameter_name_e].values.array[i];
         name.used = 0;
 
-        status = f_string_append_nulless(arguments->argv[index], strlen(arguments->argv[index]), &name);
+        status = f_string_dynamic_append_nulless(main->parameters.arguments.array[index], &name);
 
         if (F_status_is_error(status)) {
-          fll_error_print(main->error, F_status_set_fine(status), "f_string_append_nulless", F_true);
+          fll_error_print(main->error, F_status_set_fine(status), "f_string_dynamic_append_nulless", F_true);
 
           f_string_dynamic_resize(0, &name);
+
           return status;
         }
 
@@ -555,7 +556,7 @@ extern "C" {
 #endif // _di_iki_read_process_buffer_total_
 
 #ifndef _di_iki_read_substitutions_identify_
-  f_status_t iki_read_substitutions_identify(iki_read_main_t * const main, const f_console_arguments_t *arguments, const f_string_t file_name, f_iki_vocabulary_t *vocabulary, iki_read_substitutions_t *substitutionss) {
+  f_status_t iki_read_substitutions_identify(iki_read_main_t * const main, f_iki_vocabulary_t *vocabulary, iki_read_substitutions_t *substitutionss) {
 
     if (main->parameters.array[iki_read_parameter_substitute_e].result != f_console_result_additional_e) {
       return F_none;
@@ -569,33 +570,24 @@ extern "C" {
     f_array_length_t index = 0;
     f_array_length_t index_2 = 0;
 
-    f_array_length_t length = 0;
-
     f_console_parameter_t *parameter = &main->parameters.array[iki_read_parameter_substitute_e];
 
     for (; i < parameter->values.used; i += 3) {
 
       index = parameter->values.array[i];
-      length = strnlen(arguments->argv[index], F_console_parameter_size_d);
 
       for (j = 0; j < vocabulary->used; ++j) {
 
-        status = fl_string_compare(arguments->argv[index], main->buffer.string + vocabulary->array[j].start, length, (vocabulary->array[j].stop - vocabulary->array[j].start) + 1);
-
-        if (status == F_equal_to) {
+        if (fl_string_dynamic_partial_compare_string(main->parameters.arguments.array[index].string, main->buffer, main->parameters.arguments.array[index].used, vocabulary->array[j]) == F_equal_to) {
           macro_f_memory_structure_increment(status, substitutionss[j], 1, F_iki_default_allocation_step_d, macro_iki_read_substitutions_t_resize, F_array_too_large);
           if (F_status_is_error(status)) return status;
 
           index = parameter->values.array[i + 1];
           index_2 = substitutionss[j].used;
-          substitutionss[j].array[index_2].replace.string = arguments->argv[index];
-          substitutionss[j].array[index_2].replace.used = strnlen(arguments->argv[index], F_console_parameter_size_d);
-          substitutionss[j].array[index_2].replace.size = substitutionss[j].array[index_2].replace.used;
+          substitutionss[j].array[index_2].replace = main->parameters.arguments.array[index];
 
           index = parameter->values.array[i + 2];
-          substitutionss[j].array[index_2].with.string = arguments->argv[index];
-          substitutionss[j].array[index_2].with.used = strnlen(arguments->argv[index], F_console_parameter_size_d);
-          substitutionss[j].array[index_2].with.size = substitutionss[j].array[index_2].with.used;
+          substitutionss[j].array[index_2].with = main->parameters.arguments.array[index];
 
           ++substitutionss[j].used;
         }
index 5fa6fe10b959b628c48edbdd2741b501a30ab00f..71348e5a81a7eec93d172c28b29e0b18812dcf8a 100644 (file)
@@ -20,8 +20,6 @@ extern "C" {
  *
  * @param main
  *   The main program data.
- * @param file_name
- *   The name of the file being processed.
  * @param range
  *   The range value to represent the --at values.
  *
@@ -33,7 +31,7 @@ extern "C" {
  *   Status codes (with error bit) are returned on any problem.
  */
 #ifndef _di_iki_read_process_at_
-  extern f_status_t iki_read_process_at(iki_read_main_t * const main, const f_string_t file_name, f_string_range_t *range) F_attribute_visibility_internal_d;
+  extern f_status_t iki_read_process_at(iki_read_main_t * const main, f_string_range_t *range) F_attribute_visibility_internal_d;
 #endif // _di_iki_read_process_at_
 
 /**
@@ -41,10 +39,6 @@ extern "C" {
  *
  * @param main
  *   The main program data.
- * @param arguments
- *   The console arguments passed to the program.
- * @param file_name
- *   The name of the file being processed.
  *
  * @return
  *   F_none on success.
@@ -53,7 +47,7 @@ extern "C" {
  *   Status codes (with error bit) are returned on any problem.
  */
 #ifndef _di_iki_read_process_buffer_
-  extern f_status_t iki_read_process_buffer(iki_read_main_t * const main, const f_console_arguments_t *arguments, const f_string_t file_name) F_attribute_visibility_internal_d;
+  extern f_status_t iki_read_process_buffer(iki_read_main_t * const main) F_attribute_visibility_internal_d;
 #endif // _di_iki_read_process_buffer_
 
 /**
@@ -61,10 +55,6 @@ extern "C" {
  *
  * @param main
  *   The main program data.
- * @param arguments
- *   The console arguments passed to the program.
- * @param file_name
- *   The name of the file being processed.
  * @param buffer_range
  *   The range within the buffer to process.
  * @param iki_data
@@ -80,7 +70,7 @@ extern "C" {
  *   Status codes (with error bit) are returned on any problem.
  */
 #ifndef _di_iki_read_process_buffer_ranges_
-  extern f_status_t iki_read_process_buffer_ranges(iki_read_main_t * const main, const f_console_arguments_t *arguments, const f_string_t file_name, f_string_range_t *buffer_range, iki_data_t *iki_data, f_string_ranges_t *ranges) F_attribute_visibility_internal_d;
+  extern f_status_t iki_read_process_buffer_ranges(iki_read_main_t * const main, f_string_range_t *buffer_range, iki_data_t *iki_data, f_string_ranges_t *ranges) F_attribute_visibility_internal_d;
 #endif // _di_iki_read_process_buffer_ranges_
 
 /**
@@ -90,10 +80,6 @@ extern "C" {
  *
  * @param main
  *   The main program data.
- * @param arguments
- *   The console arguments passed to the program.
- * @param file_name
- *   The name of the file being processed.
  * @param buffer_range
  *   The range within the buffer to process.
  * @param iki_data
@@ -109,7 +95,7 @@ extern "C" {
  *   Status codes (with error bit) are returned on any problem.
  */
 #ifndef _di_iki_read_process_buffer_ranges_whole_
-  extern f_status_t iki_read_process_buffer_ranges_whole(iki_read_main_t * const main, const f_console_arguments_t *arguments, const f_string_t file_name, const f_string_range_t buffer_range, iki_data_t *iki_data, f_string_ranges_t *ranges) F_attribute_visibility_internal_d;
+  extern f_status_t iki_read_process_buffer_ranges_whole(iki_read_main_t * const main, const f_string_range_t buffer_range, iki_data_t *iki_data, f_string_ranges_t *ranges) F_attribute_visibility_internal_d;
 #endif // _di_iki_read_process_buffer_ranges_whole_
 
 /**
@@ -117,10 +103,6 @@ extern "C" {
  *
  * @param main
  *   The main program data.
- * @param arguments
- *   The console arguments passed to the program.
- * @param file_name
- *   The name of the file being processed.
  * @param iki_data
  *   The IKI data.
  *
@@ -130,7 +112,7 @@ extern "C" {
  *   Status codes (with error bit) are returned on any problem.
  */
 #ifndef _di_iki_read_process_buffer_total_
-  extern f_status_t iki_read_process_buffer_total(iki_read_main_t * const main, const f_console_arguments_t *arguments, const f_string_t file_name, iki_data_t *iki_data) F_attribute_visibility_internal_d;
+  extern f_status_t iki_read_process_buffer_total(iki_read_main_t * const main, iki_data_t *iki_data) F_attribute_visibility_internal_d;
 #endif // _di_iki_read_process_buffer_total_
 
 /**
@@ -138,10 +120,6 @@ extern "C" {
  *
  * @param main
  *   The main program data.
- * @param arguments
- *   The console arguments passed to the program.
- * @param file_name
- *   The name of the file being processed.
  * @param vocabulary
  *   The ranges representing a vocabulary.
  * @param substitutionss
@@ -153,7 +131,7 @@ extern "C" {
  *   Status codes (with error bit) are returned on any problem.
  */
 #ifndef _di_iki_read_substitutions_identify_
-  extern f_status_t iki_read_substitutions_identify(iki_read_main_t * const main, const f_console_arguments_t *arguments, const f_string_t file_name, f_iki_vocabulary_t *vocabulary, iki_read_substitutions_t *substitutionss) F_attribute_visibility_internal_d;
+  extern f_status_t iki_read_substitutions_identify(iki_read_main_t * const main, f_iki_vocabulary_t *vocabulary, iki_read_substitutions_t *substitutionss) F_attribute_visibility_internal_d;
 #endif // _di_iki_read_substitutions_identify_
 
 #ifdef __cplusplus
index b3d4ba776a08633e295ec402697744777309e165..3c51aeea600b6081052e0669c8e60f080f02a940 100644 (file)
@@ -49,8 +49,8 @@ extern "C" {
  * The program name.
  */
 #ifndef _di_iki_write_program_name_
-  #define iki_write_program_name_s      "iki_write"
-  #define iki_write_program_name_long_s "IKI Write"
+  #define IKI_WRITE_program_name_s      "iki_write"
+  #define IKI_WRITE_program_name_long_s "IKI Write"
 
   #define IKI_WRITE_program_name_s_length      9
   #define IKI_WRITE_program_name_long_s_length 9
@@ -149,7 +149,6 @@ extern "C" {
  * The main program data.
  *
  * parameters:   The state of pre-defined parameters passed to the program.
- * remaining:    The remaining, non-pre-defined parameters, passed to the program.
  * process_pipe: Designate whether or not to process the input pipe.
  * output:       The output file for general printing.
  * error:        The output file for error printing.
@@ -180,7 +179,6 @@ extern "C" {
   #define iki_write_main_t_initialize \
     { \
       f_console_parameters_t_initialize, \
-      f_array_lengths_t_initialize, \
       F_false, \
       fl_print_t_initialize, \
       macro_fl_print_t_initialize_error(), \
index 68d7c8af8d62946a4a2feb35b12920239373158f..326f017097f567481bdb6b625371726f95c90c6a 100644 (file)
@@ -172,15 +172,15 @@ extern "C" {
           status = F_status_set_error(F_parameter);
         }
         else {
-          const f_array_length_t location = main->parameters.array[iki_write_parameter_file_e].values.array[0];
+          const f_array_length_t index = main->parameters.array[iki_write_parameter_file_e].values.array[0];
 
           file.id = -1;
           file.stream = 0;
 
-          status = f_file_stream_open(arguments->argv[location], 0, &file);
+          status = f_file_stream_open(argv[index], f_string_empty_s, &file);
 
           if (F_status_is_error(status)) {
-            fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_open", F_true, arguments->argv[location], f_file_operation_open_s, fll_error_file_type_file_e);
+            fll_error_file_print(main->error, F_status_set_fine(status), "f_file_stream_open", F_true, argv[index], f_file_operation_open_s, fll_error_file_type_file_e);
           }
         }
       }
@@ -263,18 +263,18 @@ extern "C" {
       }
     }
 
-    data->quote = f_iki_syntax_quote_double_s.string[0];
+    main->quote = f_iki_syntax_quote_double_s;
 
     if (F_status_is_error_not(status)) {
       if (main->parameters.array[iki_write_parameter_double_e].result == f_console_result_found_e) {
         if (main->parameters.array[iki_write_parameter_single_e].result == f_console_result_found_e) {
           if (main->parameters.array[iki_write_parameter_double_e].location < main->parameters.array[iki_write_parameter_single_e].location) {
-            data->quote = f_iki_syntax_quote_single_s.string[0];
+            main->quote = f_iki_syntax_quote_single_s;
           }
         }
       }
       else if (main->parameters.array[iki_write_parameter_single_e].result == f_console_result_found_e) {
-        data->quote = f_iki_syntax_quote_single_s.string[0];
+        main->quote = f_iki_syntax_quote_single_s;
       }
     }
 
@@ -315,7 +315,7 @@ extern "C" {
             status_pipe = f_file_read(pipe, &buffer);
 
             if (F_status_is_error(status_pipe)) {
-              fll_error_file_print(main->error, F_status_set_fine(status), "f_file_read_to", F_true, f_string_ascii_s, f_file_operation_read_s, fll_error_file_type_pipe_e);
+              fll_error_file_print(main->error, F_status_set_fine(status), "f_file_read_to", F_true, f_string_ascii_minus_s, f_file_operation_read_s, fll_error_file_type_pipe_e);
 
               status = F_status_set_error(F_pipe);
 
@@ -426,8 +426,6 @@ extern "C" {
       }
 
       if (F_status_is_error_not(status)) {
-        f_string_static_t object = f_string_static_t_initialize;
-        f_string_static_t content = f_string_static_t_initialize;
         uint16_t signal_check = 0;
 
         for (f_array_length_t i = 0; i < main->parameters.array[iki_write_parameter_object_e].values.used; ++i) {
@@ -441,15 +439,7 @@ extern "C" {
             signal_check = 0;
           }
 
-          object.string = arguments->argv[main->parameters.array[iki_write_parameter_object_e].values.array[i]];
-          object.used = strnlen(object.string, F_console_parameter_size_d);
-          object.size = object.used;
-
-          content.string = arguments->argv[main->parameters.array[iki_write_parameter_content_e].values.array[i]];
-          content.used = strnlen(content.string, F_console_parameter_size_d);
-          content.size = content.used;
-
-          status = iki_write_process(main, file, object, content, &escaped);
+          status = iki_write_process(main, file, argv[main->parameters.array[iki_write_parameter_object_e].values.array[i]], argv[main->parameters.array[iki_write_parameter_content_e].values.array[i]], &escaped);
           if (F_status_is_error(status)) break;
 
           fll_print_dynamic_raw(f_string_eol_s, file.stream);
index 300ea41fa8cdcbd8d2c381af0bfe601982d941e6..4b7d27e6870838308caa5bdc5cfe680c56268f41 100644 (file)
@@ -51,8 +51,6 @@ extern "C" {
     if (F_status_is_error(status)) {
       fll_error_print(main->error, F_status_set_fine(status), "fll_iki_content_escape", F_true);
 
-      f_string_dynamic_resize(0, &escaped);
-
       return F_status_set_error(F_failure);
     }
 
index fcfb96746bab394e93653e44995fb199bf0c1699..34d0161c7a5af588531812dc22488742b8e552aa 100644 (file)
@@ -38,9 +38,9 @@ extern "C" {
     #define STATUS_CODE_program_version_nano_s_length 0
   #endif // !(defined(STATUS_CODE_program_version_nano_s) && defined(STATUS_CODE_program_version_nano_s_length))
 
-  #define STATUS_CODE_progam_version_s STATUS_CODE_program_version_major_s F_string_ascii_period_s STATUS_CODE_program_version_minor_s F_string_ascii_period_s STATUS_CODE_program_version_micro_s STATUS_CODE_progam_version_nano_prefix_s STATUS_CODE_progam_version_nano_s
+  #define STATUS_CODE_program_version_s STATUS_CODE_program_version_major_s F_string_ascii_period_s STATUS_CODE_program_version_minor_s F_string_ascii_period_s STATUS_CODE_program_version_micro_s STATUS_CODE_program_version_nano_prefix_s STATUS_CODE_program_version_nano_s
 
-  #define STATUS_CODE_progam_version_s_length STATUS_CODE_program_version_major_s_length + F_string_ascii_period_s_length + STATUS_CODE_program_version_minor_s_length + F_string_ascii_period_s_length + STATUS_CODE_program_version_micro_s_length + STATUS_CODE_progam_version_nano_prefix_s_length + STATUS_CODE_progam_version_nano_s_length
+  #define STATUS_CODE_program_version_s_length STATUS_CODE_program_version_major_s_length + F_string_ascii_period_s_length + STATUS_CODE_program_version_minor_s_length + F_string_ascii_period_s_length + STATUS_CODE_program_version_micro_s_length + STATUS_CODE_program_version_nano_prefix_s_length + STATUS_CODE_program_version_nano_s_length
 
   extern const f_string_static_t status_code_program_version_s;
 #endif // _di_status_code_program_version_
@@ -49,11 +49,11 @@ extern "C" {
  * The program name.
  */
 #ifndef _di_status_code_program_name_
-  #define STATUS_CODE_progam_name_s      "status_code"
-  #define STATUS_CODE_progam_name_long_s "FSS Status Code"
+  #define STATUS_CODE_program_name_s      "status_code"
+  #define STATUS_CODE_program_name_long_s "Status Code"
 
   #define STATUS_CODE_program_name_s_length      11
-  #define STATUS_CODE_program_name_long_s_length 15
+  #define STATUS_CODE_program_name_long_s_length 11
 
   extern const f_string_static_t status_code_program_name_s;
   extern const f_string_static_t status_code_program_name_long_s;
index 29fdfde31305fbb8ee5512c5c509cb9b970c76f8..6e1fca12a1ab329d2657dcd11aadde795753df89 100644 (file)
@@ -7,41 +7,39 @@ extern "C" {
 #endif
 
 #ifndef _di_status_code_process_check_
-  f_status_t status_code_process_check(fll_program_data_t * const main, const f_string_t value) {
+  f_status_t status_code_process_check(fll_program_data_t * const main, const f_string_static_t value) {
 
     f_number_unsigned_t number = 0;
     f_status_t status = status_code_convert_number(main, value, &number);
 
-    if (F_status_is_error(status)) {
-      return status;
-    }
+    if (F_status_is_error(status)) return status;
 
     if (main->parameters.array[status_code_parameter_is_error_e].result == f_console_result_found_e) {
       if (F_status_is_error(number)) {
-        f_print_terminated(f_status_true_s, main->output.to.stream);
+        f_print_dynamic_raw(f_status_true_s, main->output.to.stream);
       }
       else {
-        f_print_terminated(f_status_false_s, main->output.to.stream);
+        f_print_dynamic_raw(f_status_false_s, main->output.to.stream);
       }
 
       f_print_dynamic_raw(f_string_eol_s, main->output.to.stream);
     }
     else if (main->parameters.array[status_code_parameter_is_warning_e].result == f_console_result_found_e) {
       if (F_status_is_warning(number)) {
-        f_print_terminated(f_status_true_s, main->output.to.stream);
+        f_print_dynamic_raw(f_status_true_s, main->output.to.stream);
       }
       else {
-        f_print_terminated(f_status_false_s, main->output.to.stream);
+        f_print_dynamic_raw(f_status_false_s, main->output.to.stream);
       }
 
       f_print_dynamic_raw(f_string_eol_s, main->output.to.stream);
     }
     else if (main->parameters.array[status_code_parameter_is_fine_e].result == f_console_result_found_e) {
       if (F_status_is_fine(number)) {
-        f_print_terminated(f_status_true_s, main->output.to.stream);
+        f_print_dynamic_raw(f_status_true_s, main->output.to.stream);
       }
       else {
-        f_print_terminated(f_status_false_s, main->output.to.stream);
+        f_print_dynamic_raw(f_status_false_s, main->output.to.stream);
       }
 
       f_print_dynamic_raw(f_string_eol_s, main->output.to.stream);
@@ -52,16 +50,16 @@ extern "C" {
 #endif // _di_status_code_process_check_
 
 #ifndef _di_status_code_process_number_
-  f_status_t status_code_process_number(fll_program_data_t * const main, const f_string_t value) {
+  f_status_t status_code_process_number(fll_program_data_t * const main, const f_string_static_t value) {
 
     f_status_t status = F_none;
 
     {
-      const f_string_range_t range = macro_f_string_range_t_initialize(strlen(value));
+      const f_string_range_t range = macro_f_string_range_t_initialize(value.used);
 
       f_number_unsigned_t number = 0;
 
-      status = fl_conversion_string_to_number_unsigned(value, range, &number);
+      status = fl_conversion_string_to_number_unsigned(value.string, range, &number);
 
       if (status == F_none) {
         fl_print_format("%[invalid name%]%r", main->output.to.stream, main->context.set.error, main->context.set.error, f_string_eol_s);
@@ -104,19 +102,16 @@ extern "C" {
 #endif // _di_status_code_process_number_
 
 #ifndef _di_status_code_process_normal_
-  f_status_t status_code_process_normal(fll_program_data_t * const main, const f_string_t value) {
+  f_status_t status_code_process_normal(fll_program_data_t * const main, const f_string_static_t value) {
 
     f_number_unsigned_t number = 0;
     f_status_t status = status_code_convert_number(main, value, &number);
 
-    if (F_status_is_error(status)) {
-      return status;
-    }
+    if (F_status_is_error(status)) return status;
 
-    const f_status_t code = (f_status_t) number;
-    f_string_static_t name = 0;
+    f_string_static_t name = f_string_static_t_initialize;
 
-    status = f_status_string_to(code, &name);
+    status = f_status_string_to((f_status_t) number, &name);
 
     if (F_status_is_error(status)) {
       if (F_status_set_fine(status) == F_data) {
@@ -129,18 +124,18 @@ extern "C" {
       return status;
     }
 
-    fl_print_format("%S%r", main->output.to.stream, name, f_string_eol_s);
+    fl_print_format("%Q%r", main->output.to.stream, name, f_string_eol_s);
 
     return F_none;
   }
 #endif // _di_status_code_process_normal_
 
 #ifndef _di_status_code_convert_number_
-  f_status_t status_code_convert_number(fll_program_data_t * const main, const f_string_t value, f_number_unsigned_t *number) {
+  f_status_t status_code_convert_number(fll_program_data_t * const main, const f_string_static_t value, f_number_unsigned_t *number) {
 
-    const f_string_range_t range = macro_f_string_range_t_initialize(strlen(value));
+    const f_string_range_t range = macro_f_string_range_t_initialize(value.used);
 
-    f_status_t status = fl_conversion_string_to_number_unsigned(value, range, number);
+    f_status_t status = fl_conversion_string_to_number_unsigned(value.string, range, number);
 
     if (*number > F_status_size_max_with_signal) {
       fl_print_format("%[out of range%]%r", main->output.to.stream, main->context.set.error, main->context.set.error, f_string_eol_s);
index d2da73719ed4eac833d4c82089474a472f91863d..632a9b8d134c8b45267e645c1f865ab4e423c8d1 100644 (file)
@@ -34,7 +34,7 @@ extern "C" {
  * @see fss_status_code_convert_number()
  */
 #ifndef _di_status_code_process_check_
-  extern f_status_t status_code_process_check(fll_program_data_t * const main, const f_string_t value) F_attribute_visibility_internal_d;
+  extern f_status_t status_code_process_check(fll_program_data_t * const main, const f_string_static_t value) F_attribute_visibility_internal_d;
 #endif // _di_status_code_process_check_
 
 /**
@@ -56,7 +56,7 @@ extern "C" {
  * @see fll_fss_status_string_from()
  */
 #ifndef _di_status_code_process_number_
-  extern f_status_t status_code_process_number(fll_program_data_t * const main, const f_string_t value) F_attribute_visibility_internal_d;
+  extern f_status_t status_code_process_number(fll_program_data_t * const main, const f_string_static_t value) F_attribute_visibility_internal_d;
 #endif // _di_status_code_process_number_
 
 /**
@@ -83,7 +83,7 @@ extern "C" {
  * @see fss_status_code_convert_number()
  */
 #ifndef _di_status_code_process_normal_
-  extern f_status_t status_code_process_normal(fll_program_data_t * const main, const f_string_t value) F_attribute_visibility_internal_d;
+  extern f_status_t status_code_process_normal(fll_program_data_t * const main, const f_string_static_t value) F_attribute_visibility_internal_d;
 #endif // _di_status_code_process_normal_
 
 /**
@@ -111,7 +111,7 @@ extern "C" {
  * @see fl_console_parameter_to_number_unsigned()
  */
 #ifndef _di_status_code_convert_number_
-  extern f_status_t status_code_convert_number(fll_program_data_t * const main, const f_string_t value, f_number_unsigned_t *number) F_attribute_visibility_internal_d;
+  extern f_status_t status_code_convert_number(fll_program_data_t * const main, const f_string_static_t value, f_number_unsigned_t *number) F_attribute_visibility_internal_d;
 #endif // _di_status_code_convert_number_
 
 #ifdef __cplusplus
index c96880f12005cf772de7c7b36a75b97dc65aae45..646702135af3ad1fafdbaef0f70202503cf88947 100644 (file)
@@ -11,7 +11,7 @@ extern "C" {
 
     flockfile(file.stream);
 
-    fll_program_print_help_header(file, context, status_code_progam_name_long_s, status_code_progam_version_s);
+    fll_program_print_help_header(file, context, status_code_program_name_long_s, status_code_program_version_s);
 
     fll_program_print_help_option(file, context, f_console_standard_short_help_s, f_console_standard_long_help_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "    Print this help message.");
     fll_program_print_help_option(file, context, f_console_standard_short_dark_s, f_console_standard_long_dark_s, f_console_symbol_short_disable_s, f_console_symbol_long_disable_s, "    Output using colors that show up better on dark backgrounds.");
@@ -30,7 +30,7 @@ extern "C" {
     fll_program_print_help_option(file, context, status_code_short_is_error_s, status_code_long_is_error_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "  Print F_true if the error code is an error, F_false otherwise.");
     fll_program_print_help_option(file, context, status_code_short_number_s, status_code_long_number_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "    Convert status code name to number.");
 
-    fll_program_print_help_usage(file, context, status_code_progam_name_s, status_code_program_help_parameters_s);
+    fll_program_print_help_usage(file, context, status_code_program_name_s, status_code_program_help_parameters_s);
 
     funlockfile(file.stream);
 
@@ -90,6 +90,7 @@ extern "C" {
 
       if (F_status_is_error(status)) {
         status_code_main_delete(main);
+
         return status;
       }
 
@@ -128,7 +129,7 @@ extern "C" {
     }
 
     if (main->parameters.array[status_code_parameter_version_e].result == f_console_result_found_e) {
-      fll_program_print_version(main->output.to, status_code_progam_version_s);
+      fll_program_print_version(main->output.to, status_code_program_version_s);
 
       status_code_main_delete(main);
 
@@ -151,7 +152,8 @@ extern "C" {
 
         return F_status_set_error(status);
       }
-      else if (main->parameters.array[status_code_parameter_is_fine_e].result == f_console_result_found_e) {
+
+      if (main->parameters.array[status_code_parameter_is_fine_e].result == f_console_result_found_e) {
         flockfile(main->error.to.stream);
 
         fl_print_format("%r%[%QThe parameter '%]", main->error.to.stream, f_string_eol_s, main->error.context, main->error.prefix, main->error.context);
@@ -208,13 +210,14 @@ extern "C" {
           if (!((++signal_check) % status_code_signal_check_d)) {
             if (status_code_signal_received(main)) {
               status = F_status_set_error(F_signal);
+
               break;
             }
 
             signal_check = 0;
           }
 
-          status2 = status_code_process_check(main, arguments->argv[main->parameters.remaining.array[i]]);
+          status2 = status_code_process_check(main, argv[main->parameters.remaining.array[i]]);
 
           if (F_status_is_error(status2) && status == F_none) {
             status = status2;
@@ -239,13 +242,14 @@ extern "C" {
           if (!((++signal_check) % status_code_signal_check_d)) {
             if (status_code_signal_received(main)) {
               status = F_status_set_error(F_signal);
+
               break;
             }
 
             signal_check = 0;
           }
 
-          status2 = status_code_process_number(main, arguments->argv[main->parameters.remaining.array[i]]);
+          status2 = status_code_process_number(main, argv[main->parameters.remaining.array[i]]);
 
           if (F_status_is_error(status2) && status == F_none) {
             status = status2;
@@ -270,13 +274,14 @@ extern "C" {
           if (!((++signal_check) % status_code_signal_check_d)) {
             if (status_code_signal_received(main)) {
               status = F_status_set_error(F_signal);
+
               break;
             }
 
             signal_check = 0;
           }
 
-          status2 = status_code_process_normal(main, arguments->argv[main->parameters.remaining.array[i]]);
+          status2 = status_code_process_normal(main, argv[main->parameters.remaining.array[i]]);
 
           if (F_status_is_error(status2) && status == F_none) {
             status = status2;