]> Kevux Git Server - fll/commitdiff
Progress: Continue mass converting to f_string_static_t and use const more.
authorKevin Day <thekevinday@gmail.com>
Sun, 20 Feb 2022 00:36:52 +0000 (18:36 -0600)
committerKevin Day <thekevinday@gmail.com>
Sun, 20 Feb 2022 00:40:33 +0000 (18:40 -0600)
In particular this separates the fl_conversion functions into two forms:
1) That accepts only the f_string_static_t and uses dynamic.used as the length.
2) That accepts both f_string_static_t and f_string_range_t and uses the range to determine the length.

This makes the conversion functions more consistent with the rest of the project's practices.

43 files changed:
level_0/f_limit/c/limit.h
level_1/fl_control_group/c/control_group.h
level_1/fl_conversion/c/conversion.c
level_1/fl_conversion/c/conversion.h
level_1/fl_conversion/c/private-conversion.c
level_1/fl_conversion/c/private-conversion.h
level_1/fl_execute/c/execute.h
level_2/fll_execute/c/execute.h
level_3/byte_dump/c/byte_dump.c
level_3/controller/c/controller/private-controller.c
level_3/controller/c/controller/private-controller.h
level_3/controller/c/entry/private-entry.c
level_3/controller/c/rule/private-rule.c
level_3/controller/c/rule/private-rule.h
level_3/fake/c/private-make-operate_process_type.c
level_3/fake/c/private-make-operate_process_type.h
level_3/fake/c/private-make-operate_validate.c
level_3/fake/c/private-make.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_read/c/private-read.h
level_3/fss_basic_read/c/fss_basic_read.c
level_3/fss_basic_read/c/private-read.c
level_3/fss_basic_read/c/private-read.h
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/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_read/c/private-read.h
level_3/fss_extended_list_write/c/private-write.c
level_3/fss_extended_read/c/fss_extended_read.c
level_3/fss_extended_read/c/private-read.c
level_3/fss_extended_read/c/private-read.h
level_3/fss_identify/c/fss_identify.c
level_3/fss_identify/c/private-identify.c
level_3/fss_identify/c/private-identify.h
level_3/fss_payload_read/c/fss_payload_read.c
level_3/fss_payload_read/c/private-read.c
level_3/fss_payload_read/c/private-read.h
level_3/fss_status_code/c/private-fss_status_code.c
level_3/iki_read/c/iki_read.c
level_3/status_code/c/private-status_code.c

index 9a5985ae1469618fc8415b448c3fdc6bc732873a..682dad1135db07b0ad72631a2c2f08d7dfb24ffa 100644 (file)
@@ -10,7 +10,7 @@
 #ifndef _F_limit_h
 #define _F_limit_h
 
-// include pre-requirements
+// Include pre-requirements.
 #define _GNU_SOURCE
 
 // Libc includes.
index e93d0cbfa9f0ca77f0ff3426875feb125a3e2dd0..da3a948953ef8a5d3b64b8a0970753aa882b9b3a 100644 (file)
@@ -16,7 +16,7 @@
 #ifndef _FL_control_group_h
 #define _FL_control_group_h
 
-// include pre-requirements
+// Include pre-requirements.
 #define _GNU_SOURCE
 
 // Libc includes.
index 88fd9d0bc67c1f369c9d41835e321375dcbfbd2c..1506f0c42ca0a075502d643c358e18b4982f6b5a 100644 (file)
 extern "C" {
 #endif
 
-#ifndef _di_fl_conversion_string_to_binary_signed_
-  f_status_t fl_conversion_string_to_binary_signed(const f_string_t string, const f_string_range_t range, const bool negative, f_number_signed_t *number) {
+#ifndef _di_fl_conversion_dynamic_partial_to_binary_signed_
+  f_status_t fl_conversion_dynamic_partial_to_binary_signed(const f_string_static_t dynamic, const f_string_range_t range, const bool negative, f_number_signed_t * const number) {
     #ifndef _di_level_1_parameter_checking_
-      if (!string) return F_status_set_error(F_parameter);
-      if (range.start > range.stop) return F_status_set_error(F_parameter);
       if (!number) return F_status_set_error(F_parameter);
     #endif // _di_level_1_parameter_checking_
 
-    return private_fl_conversion_string_to_binary_signed(string, range, negative, number);
+    if (!dynamic.used || range.start > range.stop) {
+      return F_data_not;
+    }
+
+    return private_fl_conversion_dynamic_to_binary_signed(dynamic.string + range.start, (range.stop - range.start) + 1, negative, number);
   }
-#endif // _di_fl_conversion_string_to_binary_signed_
+#endif // _di_fl_conversion_dynamic_partial_to_binary_signed_
 
-#ifndef _di_fl_conversion_string_to_binary_unsigned_
-  f_status_t fl_conversion_string_to_binary_unsigned(const f_string_t string, const f_string_range_t range, f_number_unsigned_t *number) {
+#ifndef _di_fl_conversion_dynamic_partial_to_binary_unsigned_
+  f_status_t fl_conversion_dynamic_partial_to_binary_unsigned(const f_string_static_t dynamic, const f_string_range_t range, f_number_unsigned_t * const number) {
     #ifndef _di_level_1_parameter_checking_
-      if (!string) return F_status_set_error(F_parameter);
-      if (range.start > range.stop) return F_status_set_error(F_parameter);
       if (!number) return F_status_set_error(F_parameter);
     #endif // _di_level_1_parameter_checking_
 
-    return private_fl_conversion_string_to_binary_unsigned(string, range, number);
+    if (!dynamic.used || range.start > range.stop) {
+      return F_data_not;
+    }
+
+    return private_fl_conversion_dynamic_to_binary_unsigned(dynamic.string + range.start, (range.stop - range.start) + 1, number);
   }
-#endif // _di_fl_conversion_string_to_binary_unsigned_
+#endif // _di_fl_conversion_dynamic_partial_to_binary_unsigned_
 
-#ifndef _di_fl_conversion_string_to_decimal_signed_
-  f_status_t fl_conversion_string_to_decimal_signed(const f_string_t string, const f_string_range_t range, const bool negative, f_number_signed_t *number) {
+#ifndef _di_fl_conversion_dynamic_partial_to_decimal_signed_
+  f_status_t fl_conversion_dynamic_partial_to_decimal_signed(const f_string_static_t dynamic, const f_string_range_t range, const bool negative, f_number_signed_t * const number) {
     #ifndef _di_level_1_parameter_checking_
-      if (!string) return F_status_set_error(F_parameter);
-      if (range.start > range.stop) return F_status_set_error(F_parameter);
       if (!number) return F_status_set_error(F_parameter);
     #endif // _di_level_1_parameter_checking_
 
-    return private_fl_conversion_string_to_decimal_signed(string, range, negative, number);
+    if (!dynamic.used || range.start > range.stop) {
+      return F_data_not;
+    }
+
+    return private_fl_conversion_dynamic_to_decimal_signed(dynamic.string + range.start, (range.stop - range.start) + 1, negative, number);
   }
-#endif // _di_fl_conversion_string_to_decimal_signed_
+#endif // _di_fl_conversion_dynamic_partial_to_decimal_signed_
 
-#ifndef _di_fl_conversion_string_to_decimal_unsigned_
-  f_status_t fl_conversion_string_to_decimal_unsigned(const f_string_t string, const f_string_range_t range, f_number_unsigned_t *number) {
+#ifndef _di_fl_conversion_dynamic_partial_to_decimal_unsigned_
+  f_status_t fl_conversion_dynamic_partial_to_decimal_unsigned(const f_string_static_t dynamic, const f_string_range_t range, f_number_unsigned_t * const number) {
     #ifndef _di_level_1_parameter_checking_
-      if (!string) return F_status_set_error(F_parameter);
-      if (range.start > range.stop) return F_status_set_error(F_parameter);
       if (!number) return F_status_set_error(F_parameter);
     #endif // _di_level_1_parameter_checking_
 
-    return private_fl_conversion_string_to_decimal_unsigned(string, range, number);
+    if (!dynamic.used || range.start > range.stop) {
+      return F_data_not;
+    }
+
+    return private_fl_conversion_dynamic_to_decimal_unsigned(dynamic.string + range.start, (range.stop - range.start) + 1, number);
   }
-#endif // _di_fl_conversion_string_to_decimal_unsigned_
+#endif // _di_fl_conversion_dynamic_partial_to_decimal_unsigned_
 
-#ifndef _di_fl_conversion_string_to_duodecimal_signed_
-  f_status_t fl_conversion_string_to_duodecimal_signed(const f_string_t string, const f_string_range_t range, const bool negative, f_number_signed_t *number) {
+#ifndef _di_fl_conversion_dynamic_partial_to_duodecimal_signed_
+  f_status_t fl_conversion_dynamic_partial_to_duodecimal_signed(const f_string_static_t dynamic, const f_string_range_t range, const bool negative, f_number_signed_t * const number) {
     #ifndef _di_level_1_parameter_checking_
-      if (!string) return F_status_set_error(F_parameter);
-      if (range.start > range.stop) return F_status_set_error(F_parameter);
       if (!number) return F_status_set_error(F_parameter);
     #endif // _di_level_1_parameter_checking_
 
-    return private_fl_conversion_string_to_duodecimal_signed(string, range, negative, number);
+    if (!dynamic.used || range.start > range.stop) {
+      return F_data_not;
+    }
+
+    return private_fl_conversion_dynamic_to_duodecimal_signed(dynamic.string + range.start, (range.stop - range.start) + 1, negative, number);
   }
-#endif // _di_fl_conversion_string_to_duodecimal_signed_
+#endif // _di_fl_conversion_dynamic_partial_to_duodecimal_signed_
 
-#ifndef _di_fl_conversion_string_to_duodecimal_unsigned_
-  f_status_t fl_conversion_string_to_duodecimal_unsigned(const f_string_t string, const f_string_range_t range, f_number_unsigned_t *number) {
+#ifndef _di_fl_conversion_dynamic_partial_to_duodecimal_unsigned_
+  f_status_t fl_conversion_dynamic_partial_to_duodecimal_unsigned(const f_string_static_t dynamic, const f_string_range_t range, f_number_unsigned_t * const number) {
     #ifndef _di_level_1_parameter_checking_
-      if (!string) return F_status_set_error(F_parameter);
-      if (range.start > range.stop) return F_status_set_error(F_parameter);
       if (!number) return F_status_set_error(F_parameter);
     #endif // _di_level_1_parameter_checking_
 
-    return private_fl_conversion_string_to_duodecimal_unsigned(string, range, number);
+    if (!dynamic.used || range.start > range.stop) {
+      return F_data_not;
+    }
+
+    return private_fl_conversion_dynamic_to_duodecimal_unsigned(dynamic.string + range.start, (range.stop - range.start) + 1, number);
   }
-#endif // _di_fl_conversion_string_to_duodecimal_unsigned_
+#endif // _di_fl_conversion_dynamic_partial_to_duodecimal_unsigned_
 
-#ifndef _di_fl_conversion_string_to_hexidecimal_signed_
-  f_status_t fl_conversion_string_to_hexidecimal_signed(const f_string_t string, const f_string_range_t range, const bool negative, f_number_signed_t *number) {
+#ifndef _di_fl_conversion_dynamic_partial_to_hexidecimal_signed_
+  f_status_t fl_conversion_dynamic_partial_to_hexidecimal_signed(const f_string_static_t dynamic, const f_string_range_t range, const bool negative, f_number_signed_t * const number) {
     #ifndef _di_level_1_parameter_checking_
-      if (!string) return F_status_set_error(F_parameter);
-      if (range.start > range.stop) return F_status_set_error(F_parameter);
       if (!number) return F_status_set_error(F_parameter);
     #endif // _di_level_1_parameter_checking_
 
-    return private_fl_conversion_string_to_hexidecimal_signed(string, range, negative, number);
+    if (!dynamic.used || range.start > range.stop) {
+      return F_data_not;
+    }
+
+    return private_fl_conversion_dynamic_to_hexidecimal_signed(dynamic.string + range.start, (range.stop - range.start) + 1, negative, number);
   }
-#endif // _di_fl_conversion_string_to_hexidecimal_signed_
+#endif // _di_fl_conversion_dynamic_partial_to_hexidecimal_signed_
 
-#ifndef _di_fl_conversion_string_to_hexidecimal_unsigned_
-  f_status_t fl_conversion_string_to_hexidecimal_unsigned(const f_string_t string, const f_string_range_t range, f_number_unsigned_t *number) {
+#ifndef _di_fl_conversion_dynamic_partial_to_hexidecimal_unsigned_
+  f_status_t fl_conversion_dynamic_partial_to_hexidecimal_unsigned(const f_string_static_t dynamic, const f_string_range_t range, f_number_unsigned_t * const number) {
     #ifndef _di_level_1_parameter_checking_
-      if (!string) return F_status_set_error(F_parameter);
-      if (range.start > range.stop) return F_status_set_error(F_parameter);
       if (!number) return F_status_set_error(F_parameter);
     #endif // _di_level_1_parameter_checking_
 
-    return private_fl_conversion_string_to_hexidecimal_unsigned(string, range, number);
+    if (!dynamic.used || range.start > range.stop) {
+      return F_data_not;
+    }
+
+    return private_fl_conversion_dynamic_to_hexidecimal_unsigned(dynamic.string + range.start, (range.stop - range.start) + 1, number);
   }
-#endif // _di_fl_conversion_string_to_hexidecimal_unsigned_
+#endif // _di_fl_conversion_dynamic_partial_to_hexidecimal_unsigned_
 
-#ifndef _di_fl_conversion_string_to_octal_signed_
-  f_status_t fl_conversion_string_to_octal_signed(const f_string_t string, const f_string_range_t range, const bool negative, f_number_signed_t *number) {
+#ifndef _di_fl_conversion_dynamic_partial_to_octal_signed_
+  f_status_t fl_conversion_dynamic_partial_to_octal_signed(const f_string_static_t dynamic, const f_string_range_t range, const bool negative, f_number_signed_t * const number) {
     #ifndef _di_level_1_parameter_checking_
-      if (!string) return F_status_set_error(F_parameter);
-      if (range.start > range.stop) return F_status_set_error(F_parameter);
       if (!number) return F_status_set_error(F_parameter);
     #endif // _di_level_1_parameter_checking_
 
-    return private_fl_conversion_string_to_octal_signed(string, range, negative, number);
+    if (!dynamic.used || range.start > range.stop) {
+      return F_data_not;
+    }
+
+    return private_fl_conversion_dynamic_to_octal_signed(dynamic.string + range.start, (range.stop - range.start) + 1, negative, number);
   }
-#endif // _di_fl_conversion_string_to_octal_signed_
+#endif // _di_fl_conversion_dynamic_partial_to_octal_signed_
 
-#ifndef _di_fl_conversion_string_to_octal_unsigned_
-  f_status_t fl_conversion_string_to_octal_unsigned(const f_string_t string, const f_string_range_t range, f_number_unsigned_t *number) {
+#ifndef _di_fl_conversion_dynamic_partial_to_octal_unsigned_
+  f_status_t fl_conversion_dynamic_partial_to_octal_unsigned(const f_string_static_t dynamic, const f_string_range_t range, f_number_unsigned_t * const number) {
     #ifndef _di_level_1_parameter_checking_
-      if (!string) return F_status_set_error(F_parameter);
-      if (range.start > range.stop) return F_status_set_error(F_parameter);
       if (!number) return F_status_set_error(F_parameter);
     #endif // _di_level_1_parameter_checking_
 
-    return private_fl_conversion_string_to_octal_unsigned(string, range, number);
+    if (!dynamic.used || range.start > range.stop) {
+      return F_data_not;
+    }
+
+    return private_fl_conversion_dynamic_to_octal_unsigned(dynamic.string + range.start, (range.stop - range.start) + 1, number);
   }
-#endif // _di_fl_conversion_string_to_octal_unsigned_
+#endif // _di_fl_conversion_dynamic_partial_to_octal_unsigned_
 
-#ifndef _di_fl_conversion_string_to_number_signed_
-  f_status_t fl_conversion_string_to_number_signed(const f_string_t string, const f_string_range_t range, f_number_signed_t *number) {
+#ifndef _di_fl_conversion_dynamic_partial_to_number_signed_
+  f_status_t fl_conversion_dynamic_partial_to_number_signed(const f_string_static_t dynamic, const f_string_range_t range, f_number_signed_t * const number) {
     #ifndef _di_level_1_parameter_checking_
-      if (!string) return F_status_set_error(F_parameter);
-      if (range.start > range.stop) return F_status_set_error(F_parameter);
       if (!number) return F_status_set_error(F_parameter);
     #endif // _di_level_1_parameter_checking_
 
-    if (!string[0]) {
+    if (!dynamic.used || range.start > range.stop) {
       return F_data_not;
     }
 
-    uint8_t width = 0;
-    f_array_length_t width_max = 0;
-    uint8_t mode = 0;
-    int8_t vector = 0; // 0 for assumed positive, 1 for explicit positive, -1 for negative.
-    f_array_length_t j = 0;
-    f_array_length_t offset = 0;
-    f_status_t status = F_none;
-
-    for (f_array_length_t i = range.start; i <= range.stop; ++i) {
-
-      width = macro_f_utf_byte_width_is(string[i]);
-
-      if (!width) {
-        if (isspace(string[i])) {
-          if (!mode && !vector) {
-            ++offset;
-
-            continue;
-          }
-
-          return F_status_set_error(F_number);
-        }
-      }
-      else {
-        if (!mode && !vector) {
-          width_max = (range.stop - i) + 1;
-
-          status = f_utf_is_whitespace(string + i, width_max);
-
-          if (status == F_true) {
-            offset = i + 1;
-
-            continue;
-          }
-
-          if (F_status_is_error(status)) {
-            if (status == F_status_set_error(F_maybe)) {
-              status = F_status_set_error(F_complete_not_utf);
-            }
-
-            return status;
-          }
-        }
-
-        return F_status_set_error(F_number);
-      }
-
-      if (string[i] == 0x30) {
-
-        // skip past all NULLs.
-        for (j = i + 1; j <= range.stop; ++j) {
-          if (string[j]) break;
-        } // for
-
-        // Immediate next value must be either a number, 'x', 'X', 'd', 'D', 'o', 'O', 'b', or 'B'.
-        if (j > range.stop) {
-          *number = 0;
-          return F_none;
-        }
-        else if (string[j] > 0x2f && string[j] < 0x3a) {
-          mode = 10;
-        }
-        else if (string[j] == 0x78 || string[j] == 0x58) {
-          mode = 16;
-          offset += 2;
-        }
-        else if (string[j] == 0x44 || string[j] == 0x64) {
-          mode = 12;
-          offset += 2;
-        }
-        else if (string[j] == 0x6f || string[j] == 0x4f) {
-          mode = 8;
-          offset += 2;
-        }
-        else if (string[j] == 0x62 || string[j] == 0x42) {
-          mode = 2;
-          offset += 2;
-        }
-        else if (string[j] == 0x2e) {
-          return F_status_set_error(F_number_decimal);
-        }
-        else {
-          return F_status_set_error(F_number);
-        }
-
-        break;
-      }
-
-      // plus sign is only allowed as the first non-whitespace character.
-      if (string[i] == 0x2b) {
-        if (!mode && !vector) {
-          vector = 1;
-          ++offset;
-        }
-        else {
-          return F_status_set_error(F_number);
-        }
-      }
-
-      // negative sign is not allowed.
-      if (string[i] == 0x2d) {
-        if (!mode && !vector) {
-          vector = -1;
-          ++offset;
-        }
-        else {
-          return F_status_set_error(F_number);
-        }
-      }
-
-      if (f_conversion_character_is_decimal(string[i]) == F_true) {
-        mode = 10;
-        break;
-      }
-
-      return F_status_set_error(F_number);
-    } // for
-
-    if (!mode) {
-      return F_status_set_error(F_number);
-    }
+    return private_fl_conversion_dynamic_to_number_signed(dynamic.string + range.start, (range.stop - range.start) + 1, number);
+  }
+#endif // _di_fl_conversion_dynamic_partial_to_number_signed_
 
-    f_string_range_t location_offset = f_string_range_t_initialize;
-    location_offset.start = range.start + offset;
-    location_offset.stop = range.stop;
+#ifndef _di_fl_conversion_dynamic_partial_to_number_unsigned_
+  f_status_t fl_conversion_dynamic_partial_to_number_unsigned(const f_string_static_t dynamic, const f_string_range_t range, f_number_unsigned_t * const number) {
+    #ifndef _di_level_1_parameter_checking_
+      if (!number) return F_status_set_error(F_parameter);
+    #endif // _di_level_1_parameter_checking_
 
-    if (range.start + offset > range.stop) {
-      return F_status_set_error(F_number);
+    if (!dynamic.used || range.start > range.stop) {
+      return F_data_not;
     }
 
-    if (mode == 10) {
-      return private_fl_conversion_string_to_decimal_signed(string, location_offset, vector == -1, number);
-    }
+    return private_fl_conversion_dynamic_to_number_unsigned(dynamic.string + range.start, (range.stop - range.start) + 1, number);
+  }
+#endif // _di_fl_conversion_dynamic_partial_to_number_unsigned_
 
-    if (mode == 16) {
-      return private_fl_conversion_string_to_hexidecimal_signed(string, location_offset, vector == -1, number);
-    }
+#ifndef _di_fl_conversion_dynamic_to_binary_signed_
+  f_status_t fl_conversion_dynamic_to_binary_signed(const f_string_static_t dynamic, const bool negative, f_number_signed_t * const number) {
+    #ifndef _di_level_1_parameter_checking_
+      if (!number) return F_status_set_error(F_parameter);
+    #endif // _di_level_1_parameter_checking_
 
-    if (mode == 12) {
-      return private_fl_conversion_string_to_duodecimal_signed(string, location_offset, vector == -1, number);
+    if (!dynamic.used) {
+      return F_data_not;
     }
 
-    if (mode == 8) {
-      return private_fl_conversion_string_to_octal_signed(string, location_offset, vector == -1, number);
+    return private_fl_conversion_dynamic_to_binary_signed(dynamic.string, dynamic.used, negative, number);
+  }
+#endif // _di_fl_conversion_dynamic_to_binary_signed_
+
+#ifndef _di_fl_conversion_dynamic_to_binary_unsigned_
+  f_status_t fl_conversion_dynamic_to_binary_unsigned(const f_string_static_t dynamic, f_number_unsigned_t * const number) {
+    #ifndef _di_level_1_parameter_checking_
+      if (!number) return F_status_set_error(F_parameter);
+    #endif // _di_level_1_parameter_checking_
+
+    if (!dynamic.used) {
+      return F_data_not;
     }
 
-    return private_fl_conversion_string_to_binary_signed(string, location_offset, vector == -1, number);
+    return private_fl_conversion_dynamic_to_binary_unsigned(dynamic.string, dynamic.used, number);
   }
-#endif // _di_fl_conversion_string_to_number_signed_
+#endif // _di_fl_conversion_dynamic_to_binary_unsigned_
 
-#ifndef _di_fl_conversion_string_to_number_unsigned_
-  f_status_t fl_conversion_string_to_number_unsigned(const f_string_t string, const f_string_range_t range, f_number_unsigned_t *number) {
+#ifndef _di_fl_conversion_dynamic_to_decimal_signed_
+  f_status_t fl_conversion_dynamic_to_decimal_signed(const f_string_static_t dynamic, const bool negative, f_number_signed_t * const number) {
     #ifndef _di_level_1_parameter_checking_
-      if (!string) return F_status_set_error(F_parameter);
-      if (range.start > range.stop) return F_status_set_error(F_parameter);
       if (!number) return F_status_set_error(F_parameter);
     #endif // _di_level_1_parameter_checking_
 
-    if (!string[0]) {
+    if (!dynamic.used) {
       return F_data_not;
     }
 
-    uint8_t width = 0;
-    f_array_length_t width_max = 0;
-    uint8_t mode = 0;
-    f_array_length_t j = 0;
-    f_array_length_t offset = 0;
-    f_status_t status = F_none;
-    int8_t sign_found = 0;
-
-    for (f_array_length_t i = range.start; i <= range.stop; ++i) {
-
-      width = macro_f_utf_byte_width_is(string[i]);
-
-      if (!width) {
-        if (isspace(string[i])) {
-          if (!mode) {
-            ++offset;
-
-            continue;
-          }
-
-          return F_status_set_error(F_number);
-        }
-      }
-      else {
-        if (!mode) {
-          width_max = (range.stop - i) + 1;
-
-          status = f_utf_is_whitespace(string + i, width_max);
-
-          if (status == F_true) {
-            offset = i + 1;
-
-            continue;
-          }
-
-          if (F_status_is_error(status)) {
-            if (status == F_status_set_error(F_maybe)) {
-              status = F_status_set_error(F_complete_not_utf);
-            }
-
-            return status;
-          }
-        }
-
-        return F_status_set_error(F_number);
-      }
-
-      if (string[i] == 0x30) {
-
-        // skip past all NULLs.
-        for (j = i + 1; j <= range.stop; ++j) {
-          if (string[j]) break;
-        } // for
-
-        // Immediate next value must be either a number, 'x', 'X', 'd', 'D', 'o', 'O', 'b', or 'B'.
-        if (j > range.stop) {
-          *number = 0;
-
-          return F_none;
-        }
-        else if (string[j] > 0x2f && string[j] < 0x3a) {
-          mode = 10;
-        }
-        else if (string[j] == 0x78 || string[j] == 0x58) {
-          mode = 16;
-          offset += 2;
-        }
-        else if (string[j] == 0x44 || string[j] == 0x64) {
-          mode = 12;
-          offset += 2;
-        }
-        else if (string[j] == 0x6f || string[j] == 0x4f) {
-          mode = 8;
-          offset += 2;
-        }
-        else if (string[j] == 0x62 || string[j] == 0x42) {
-          mode = 2;
-          offset += 2;
-        }
-        else if (string[j] == 0x2e) {
-          return F_status_set_error(F_number_decimal);
-        }
-        else {
-          return F_status_set_error(F_number);
-        }
-
-        break;
-      }
-
-      if (string[i] == 0x2b) {
-        ++offset;
-        sign_found = 1;
-      }
-
-      if (string[i] == 0x2d) {
-        ++offset;
-        sign_found = -1;
-      }
-
-      if (f_conversion_character_is_decimal(string[i]) == F_true) {
-        mode = 10;
-        break;
-      }
-
-      return F_status_set_error(F_number);
-    } // for
-
-    if (!mode) {
-      return F_status_set_error(F_number);
+    return private_fl_conversion_dynamic_to_decimal_signed(dynamic.string, dynamic.used, negative, number);
+  }
+#endif // _di_fl_conversion_dynamic_to_decimal_signed_
+
+#ifndef _di_fl_conversion_dynamic_to_decimal_unsigned_
+  f_status_t fl_conversion_dynamic_to_decimal_unsigned(const f_string_static_t dynamic, f_number_unsigned_t * const number) {
+    #ifndef _di_level_1_parameter_checking_
+      if (!number) return F_status_set_error(F_parameter);
+    #endif // _di_level_1_parameter_checking_
+
+    if (!dynamic.used) {
+      return F_data_not;
     }
 
-    f_string_range_t location_offset = f_string_range_t_initialize;
-    location_offset.start = range.start + offset;
-    location_offset.stop = range.stop;
+    return private_fl_conversion_dynamic_to_decimal_unsigned(dynamic.string, dynamic.used, number);
+  }
+#endif // _di_fl_conversion_dynamic_to_decimal_unsigned_
 
-    if (range.start + offset > range.stop) {
-      return F_status_set_error(F_number);
+#ifndef _di_fl_conversion_dynamic_to_duodecimal_signed_
+  f_status_t fl_conversion_dynamic_to_duodecimal_signed(const f_string_static_t dynamic, const bool negative, f_number_signed_t * const number) {
+    #ifndef _di_level_1_parameter_checking_
+      if (!number) return F_status_set_error(F_parameter);
+    #endif // _di_level_1_parameter_checking_
+
+    if (!dynamic.used) {
+      return F_data_not;
     }
 
-    if (mode == 10) {
-      status = private_fl_conversion_string_to_decimal_unsigned(string, location_offset, number);
+    return private_fl_conversion_dynamic_to_duodecimal_signed(dynamic.string, dynamic.used, negative, number);
+  }
+#endif // _di_fl_conversion_dynamic_to_duodecimal_signed_
+
+#ifndef _di_fl_conversion_dynamic_to_duodecimal_unsigned_
+  f_status_t fl_conversion_dynamic_to_duodecimal_unsigned(const f_string_static_t dynamic, f_number_unsigned_t * const number) {
+    #ifndef _di_level_1_parameter_checking_
+      if (!number) return F_status_set_error(F_parameter);
+    #endif // _di_level_1_parameter_checking_
+
+    if (!dynamic.used) {
+      return F_data_not;
     }
-    else if (mode == 16) {
-      status = private_fl_conversion_string_to_hexidecimal_unsigned(string, location_offset, number);
+
+    return private_fl_conversion_dynamic_to_duodecimal_unsigned(dynamic.string, dynamic.used, number);
+  }
+#endif // _di_fl_conversion_dynamic_to_duodecimal_unsigned_
+
+#ifndef _di_fl_conversion_dynamic_to_hexidecimal_signed_
+  f_status_t fl_conversion_dynamic_to_hexidecimal_signed(const f_string_static_t dynamic, const bool negative, f_number_signed_t * const number) {
+    #ifndef _di_level_1_parameter_checking_
+      if (!number) return F_status_set_error(F_parameter);
+    #endif // _di_level_1_parameter_checking_
+
+    if (!dynamic.used) {
+      return F_data_not;
     }
-    else if (mode == 12) {
-      status = private_fl_conversion_string_to_duodecimal_unsigned(string, location_offset, number);
+
+    return private_fl_conversion_dynamic_to_hexidecimal_signed(dynamic.string, dynamic.used, negative, number);
+  }
+#endif // _di_fl_conversion_dynamic_to_hexidecimal_signed_
+
+#ifndef _di_fl_conversion_dynamic_to_hexidecimal_unsigned_
+  f_status_t fl_conversion_dynamic_to_hexidecimal_unsigned(const f_string_static_t dynamic, f_number_unsigned_t * const number) {
+    #ifndef _di_level_1_parameter_checking_
+      if (!number) return F_status_set_error(F_parameter);
+    #endif // _di_level_1_parameter_checking_
+
+    if (!dynamic.used) {
+      return F_data_not;
     }
-    else if (mode == 8) {
-      status = private_fl_conversion_string_to_octal_unsigned(string, location_offset, number);
+
+    return private_fl_conversion_dynamic_to_hexidecimal_unsigned(dynamic.string, dynamic.used, number);
+  }
+#endif // _di_fl_conversion_dynamic_to_hexidecimal_unsigned_
+
+#ifndef _di_fl_conversion_dynamic_to_octal_signed_
+  f_status_t fl_conversion_dynamic_to_octal_signed(const f_string_static_t dynamic, const bool negative, f_number_signed_t * const number) {
+    #ifndef _di_level_1_parameter_checking_
+      if (!number) return F_status_set_error(F_parameter);
+    #endif // _di_level_1_parameter_checking_
+
+    if (!dynamic.used) {
+      return F_data_not;
     }
-    else {
-      status = private_fl_conversion_string_to_binary_unsigned(string, location_offset, number);
+
+    return private_fl_conversion_dynamic_to_octal_signed(dynamic.string, dynamic.used, negative, number);
+  }
+#endif // _di_fl_conversion_dynamic_to_octal_signed_
+
+#ifndef _di_fl_conversion_dynamic_to_octal_unsigned_
+  f_status_t fl_conversion_dynamic_to_octal_unsigned(const f_string_static_t dynamic, f_number_unsigned_t * const number) {
+    #ifndef _di_level_1_parameter_checking_
+      if (!number) return F_status_set_error(F_parameter);
+    #endif // _di_level_1_parameter_checking_
+
+    if (!dynamic.used) {
+      return F_data_not;
     }
 
-    // +/- signs are not allowed.
-    if (sign_found) {
-      if (status == F_none) {
-        if (sign_found == -1) {
-          return F_status_set_error(F_number_negative);
-        }
+    return private_fl_conversion_dynamic_to_octal_unsigned(dynamic.string, dynamic.used, number);
+  }
+#endif // _di_fl_conversion_dynamic_to_octal_unsigned_
 
-        return F_status_set_error(F_number_positive);
-      }
+#ifndef _di_fl_conversion_dynamic_to_number_signed_
+  f_status_t fl_conversion_dynamic_to_number_signed(const f_string_static_t dynamic, f_number_signed_t * const number) {
+    #ifndef _di_level_1_parameter_checking_
+      if (!number) return F_status_set_error(F_parameter);
+    #endif // _di_level_1_parameter_checking_
 
-      return F_status_set_error(F_number);
+    if (!dynamic.used) {
+      return F_data_not;
     }
 
-    return status;
+    return private_fl_conversion_dynamic_to_number_signed(dynamic.string, dynamic.used, number);
   }
-#endif // _di_fl_conversion_string_to_number_unsigned_
+#endif // _di_fl_conversion_dynamic_to_number_signed_
+
+#ifndef _di_fl_conversion_dynamic_to_number_unsigned_
+  f_status_t fl_conversion_dynamic_to_number_unsigned(const f_string_static_t dynamic, f_number_unsigned_t * const number) {
+    #ifndef _di_level_1_parameter_checking_
+      if (!number) return F_status_set_error(F_parameter);
+    #endif // _di_level_1_parameter_checking_
 
+    if (!dynamic.used) {
+      return F_data_not;
+    }
+
+    return private_fl_conversion_dynamic_to_number_unsigned(dynamic.string, dynamic.used, number);
+  }
+#endif // _di_fl_conversion_dynamic_to_number_unsigned_
 #ifdef __cplusplus
 } // extern "C"
 #endif
index 3fa029456d688e5613ef76c80184ccc7591328a1..4f8c6b5b8b6e3c3451361842a8d78e53dbd3cffd 100644 (file)
@@ -29,13 +29,13 @@ extern "C" {
 /**
  * Convert a series of positive or negative binary number characters into a f_number_signed_t.
  *
- * This will stop at one of the following: location.stop or a non-digit.
+ * This will stop at one of the following: range.stop or a non-digit.
  * This will ignore NULL values.
  * This will not process signed statuses (+/-).
  *
- * @param string
+ * @param dynamic
  *   The string to convert.
- * @param location
+ * @param range
  *   The start/stop range to convert.
  * @param negative
  *   Set to 0 to treat string as a positive number, 1 for as a negative number.
@@ -53,9 +53,9 @@ extern "C" {
  *   F_number_underflow (with error bit) on integer underflow.
  *   F_parameter (with error bit) if a parameter is invalid.
  */
-#ifndef _di_fl_conversion_string_to_binary_signed_
-  extern f_status_t fl_conversion_string_to_binary_signed(const f_string_t string, const f_string_range_t range, const bool negative, f_number_signed_t *number);
-#endif // _di_fl_conversion_string_to_binary_signed_
+#ifndef _di_fl_conversion_dynamic_partial_to_binary_signed_
+  extern f_status_t fl_conversion_dynamic_partial_to_binary_signed(const f_string_static_t dynamic, const f_string_range_t range, const bool negative, f_number_signed_t * const number);
+#endif // _di_fl_conversion_dynamic_partial_to_binary_signed_
 
 /**
  * Convert a series of positive binary number characters into a f_number_unsigned_t.
@@ -64,7 +64,7 @@ extern "C" {
  * This will ignore NULL values.
  * This will not process signed statuses (+/-).
  *
- * @param string
+ * @param dynamic
  *   The string to convert.
  * @param range
  *   The start/stop range to convert.
@@ -81,9 +81,9 @@ extern "C" {
  *   F_number_overflow (with error bit) on integer overflow.
  *   F_parameter (with error bit) if a parameter is invalid.
  */
-#ifndef _di_fl_conversion_string_to_binary_unsigned_
-  extern f_status_t fl_conversion_string_to_binary_unsigned(const f_string_t string, const f_string_range_t range, f_number_unsigned_t *number);
-#endif // _di_fl_conversion_string_to_binary_unsigned_
+#ifndef _di_fl_conversion_dynamic_partial_to_binary_unsigned_
+  extern f_status_t fl_conversion_dynamic_partial_to_binary_unsigned(const f_string_static_t dynamic, const f_string_range_t range, f_number_unsigned_t * const number);
+#endif // _di_fl_conversion_dynamic_partial_to_binary_unsigned_
 
 /**
  * Convert a series of positive or negative decimal number characters into an f_number_signed_t.
@@ -92,7 +92,7 @@ extern "C" {
  * This will ignore NULL values.
  * This will not process signed statuses (+/-).
  *
- * @param string
+ * @param dynamic
  *   The string to convert.
  * @param range
  *   The start/stop range to convert.
@@ -112,9 +112,9 @@ extern "C" {
  *   F_number_underflow (with error bit) on integer underflow.
  *   F_parameter (with error bit) if a parameter is invalid.
  */
-#ifndef _di_fl_conversion_string_to_decimal_signed_
-  extern f_status_t fl_conversion_string_to_decimal_signed(const f_string_t string, const f_string_range_t range, const bool negative, f_number_signed_t *number);
-#endif // _di_fl_conversion_string_to_decimal_signed_
+#ifndef _di_fl_conversion_dynamic_partial_to_decimal_signed_
+  extern f_status_t fl_conversion_dynamic_partial_to_decimal_signed(const f_string_static_t dynamic, const f_string_range_t range, const bool negative, f_number_signed_t * const number);
+#endif // _di_fl_conversion_dynamic_partial_to_decimal_signed_
 
 /**
  * Convert a series of positive decimal number characters into an f_number_unsigned_t.
@@ -123,7 +123,7 @@ extern "C" {
  * This will ignore NULL values.
  * This will not process signed statuses (+/-).
  *
- * @param string
+ * @param dynamic
  *   The string to convert.
  * @param range
  *   The start/stop range to convert.
@@ -140,9 +140,9 @@ extern "C" {
  *   F_number_overflow (with error bit) on integer overflow.
  *   F_parameter (with error bit) if a parameter is invalid.
  */
-#ifndef _di_fl_conversion_string_to_decimal_unsigned_
-  extern f_status_t fl_conversion_string_to_decimal_unsigned(const f_string_t string, const f_string_range_t range, f_number_unsigned_t *number);
-#endif // _di_fl_conversion_string_to_decimal_unsigned_
+#ifndef _di_fl_conversion_dynamic_partial_to_decimal_unsigned_
+  extern f_status_t fl_conversion_dynamic_partial_to_decimal_unsigned(const f_string_static_t dynamic, const f_string_range_t range, f_number_unsigned_t * const number);
+#endif // _di_fl_conversion_dynamic_partial_to_decimal_unsigned_
 
 /**
  * Convert a series of positive or negative duodecimal number characters into an f_number_signed_t.
@@ -151,7 +151,7 @@ extern "C" {
  * This will ignore NULL values.
  * This will not process signed statuses (+/-).
  *
- * @param string
+ * @param dynamic
  *   The string to convert.
  * @param range
  *   The start/stop range to convert.
@@ -171,9 +171,9 @@ extern "C" {
  *   F_number_underflow (with error bit) on integer underflow.
  *   F_parameter (with error bit) if a parameter is invalid.
  */
-#ifndef _di_fl_conversion_string_to_duodecimal_signed_
-  extern f_status_t fl_conversion_string_to_duodecimal_signed(const f_string_t string, const f_string_range_t range, const bool negative, f_number_signed_t *number);
-#endif // _di_fl_conversion_string_to_duodecimal_signed_
+#ifndef _di_fl_conversion_dynamic_partial_to_duodecimal_signed_
+  extern f_status_t fl_conversion_dynamic_partial_to_duodecimal_signed(const f_string_static_t dynamic, const f_string_range_t range, const bool negative, f_number_signed_t * const number);
+#endif // _di_fl_conversion_dynamic_partial_to_duodecimal_signed_
 
 /**
  * Convert a series of positive duodecimal number characters into an f_number_unsigned_t.
@@ -182,7 +182,7 @@ extern "C" {
  * This will ignore NULL values.
  * This will not process signed statuses (+/-).
  *
- * @param string
+ * @param dynamic
  *   The string to convert.
  * @param range
  *   The start/stop range to convert.
@@ -199,9 +199,9 @@ extern "C" {
  *   F_number_overflow (with error bit) on integer overflow.
  *   F_parameter (with error bit) if a parameter is invalid.
  */
-#ifndef _di_fl_conversion_string_to_duodecimal_unsigned_
-  extern f_status_t fl_conversion_string_to_duodecimal_unsigned(const f_string_t string, const f_string_range_t range, f_number_unsigned_t *number);
-#endif // _di_fl_conversion_string_to_duodecimal_unsigned_
+#ifndef _di_fl_conversion_dynamic_partial_to_duodecimal_unsigned_
+  extern f_status_t fl_conversion_dynamic_partial_to_duodecimal_unsigned(const f_string_static_t dynamic, const f_string_range_t range, f_number_unsigned_t * const number);
+#endif // _di_fl_conversion_dynamic_partial_to_duodecimal_unsigned_
 
 /**
  * Convert a series of positive or negative hexidecimal number characters into an f_number_signed_t.
@@ -210,7 +210,7 @@ extern "C" {
  * This will ignore NULL values.
  * This will not process signed statuses (+/-).
  *
- * @param string
+ * @param dynamic
  *   The string to convert.
  * @param range
  *   The start/stop range to convert.
@@ -230,9 +230,9 @@ extern "C" {
  *   F_number_underflow (with error bit) on integer underflow.
  *   F_parameter (with error bit) if a parameter is invalid.
  */
-#ifndef _di_fl_conversion_string_to_hexidecimal_signed_
-  extern f_status_t fl_conversion_string_to_hexidecimal_signed(const f_string_t string, const f_string_range_t range, const bool negative, f_number_signed_t *number);
-#endif // _di_fl_conversion_string_to_hexidecimal_signed_
+#ifndef _di_fl_conversion_dynamic_partial_to_hexidecimal_signed_
+  extern f_status_t fl_conversion_dynamic_partial_to_hexidecimal_signed(const f_string_static_t dynamic, const f_string_range_t range, const bool negative, f_number_signed_t * const number);
+#endif // _di_fl_conversion_dynamic_partial_to_hexidecimal_signed_
 
 /**
  * Convert a series of positive hexidecimal number characters into an f_number_unsigned_t.
@@ -241,7 +241,7 @@ extern "C" {
  * This will ignore NULL values.
  * This will not process signed statuses (+/-).
  *
- * @param string
+ * @param dynamic
  *   The string to convert.
  * @param range
  *   The start/stop range to convert.
@@ -258,9 +258,9 @@ extern "C" {
  *   F_number_overflow (with error bit) on integer overflow.
  *   F_parameter (with error bit) if a parameter is invalid.
  */
-#ifndef _di_fl_conversion_string_to_hexidecimal_unsigned_
-  extern f_status_t fl_conversion_string_to_hexidecimal_unsigned(const f_string_t string, const f_string_range_t range, f_number_unsigned_t *number);
-#endif // _di_fl_conversion_string_to_hexidecimal_unsigned_
+#ifndef _di_fl_conversion_dynamic_partial_to_hexidecimal_unsigned_
+  extern f_status_t fl_conversion_dynamic_partial_to_hexidecimal_unsigned(const f_string_static_t dynamic, const f_string_range_t range, f_number_unsigned_t * const number);
+#endif // _di_fl_conversion_dynamic_partial_to_hexidecimal_unsigned_
 
 /**
  * Convert a series of positive or negative octal number characters into an f_number_signed_t.
@@ -269,7 +269,7 @@ extern "C" {
  * This will ignore NULL values.
  * This will not process signed statuses (+/-).
  *
- * @param string
+ * @param dynamic
  *   The string to convert.
  * @param range
  *   The start/stop range to convert.
@@ -288,9 +288,9 @@ extern "C" {
  *   F_number_overflow (with error bit) on integer overflow.
  *   F_parameter (with error bit) if a parameter is invalid.
  */
-#ifndef _di_fl_conversion_string_to_octal_signed_
-  extern f_status_t fl_conversion_string_to_octal_signed(const f_string_t string, const f_string_range_t range, const bool negative, f_number_signed_t *number);
-#endif // _di_fl_conversion_string_to_octal_signed_
+#ifndef _di_fl_conversion_dynamic_partial_to_octal_signed_
+  extern f_status_t fl_conversion_dynamic_partial_to_octal_signed(const f_string_static_t dynamic, const f_string_range_t range, const bool negative, f_number_signed_t * const number);
+#endif // _di_fl_conversion_dynamic_partial_to_octal_signed_
 
 /**
  * Convert a series of positive octal number characters into an f_number_unsigned_t.
@@ -299,7 +299,7 @@ extern "C" {
  * This will ignore NULL values.
  * This will not process signed statuses (+/-).
  *
- * @param string
+ * @param dynamic
  *   The string to convert.
  * @param range
  *   The start/stop range to convert.
@@ -316,9 +316,9 @@ extern "C" {
  *   F_number_overflow (with error bit) on integer overflow.
  *   F_parameter (with error bit) if a parameter is invalid.
  */
-#ifndef _di_fl_conversion_string_to_octal_unsigned_
-  extern f_status_t fl_conversion_string_to_octal_unsigned(const f_string_t string, const f_string_range_t range, f_number_unsigned_t *number);
-#endif // _di_fl_conversion_string_to_octal_unsigned_
+#ifndef _di_fl_conversion_dynamic_partial_to_octal_unsigned_
+  extern f_status_t fl_conversion_dynamic_partial_to_octal_unsigned(const f_string_static_t dynamic, const f_string_range_t range, f_number_unsigned_t * const number);
+#endif // _di_fl_conversion_dynamic_partial_to_octal_unsigned_
 
 /**
  * Convert a series of positive or negative number characters into an f_number_signed_t.
@@ -339,7 +339,7 @@ extern "C" {
  * This function is similar to strtoll(), but the behavior of error handling and special bases are different.
  * In particular, octals are specified here with '0b' prefix or '0B' prefix instead of the ridiculous '0' prefix.
  *
- * @param string
+ * @param dynamic
  *   The string to convert.
  * @param range
  *   The start/stop range to convert.
@@ -360,9 +360,9 @@ extern "C" {
  *
  * @see strtoll()
  */
-#ifndef _di_fl_conversion_string_to_number_signed_
-  extern f_status_t fl_conversion_string_to_number_signed(const f_string_t string, const f_string_range_t range, f_number_signed_t *number);
-#endif // _di_fl_conversion_string_to_number_signed_
+#ifndef _di_fl_conversion_dynamic_partial_to_number_signed_
+  extern f_status_t fl_conversion_dynamic_partial_to_number_signed(const f_string_static_t dynamic, const f_string_range_t range, f_number_signed_t * const number);
+#endif // _di_fl_conversion_dynamic_partial_to_number_signed_
 
 /**
  * Convert a series of positive number characters into an f_number_unsigned_t.
@@ -384,7 +384,7 @@ extern "C" {
  * In particular, octals are specified here with '0b' prefix or '0B' prefix instead of the ridiculous '0' prefix.
  * Negative values are reported as such instead of being converted into the unsigned equivalent.
  *
- * @param string
+ * @param dynamic
  *   The string to convert.
  * @param range
  *   The start/stop range to convert.
@@ -406,9 +406,368 @@ extern "C" {
  *
  * @see strtoull()
  */
-#ifndef _di_fl_conversion_string_to_number_unsigned_
-  extern f_status_t fl_conversion_string_to_number_unsigned(const f_string_t string, const f_string_range_t range, f_number_unsigned_t *number);
-#endif // _di_fl_conversion_string_to_number_unsigned_
+#ifndef _di_fl_conversion_dynamic_partial_to_number_unsigned_
+  extern f_status_t fl_conversion_dynamic_partial_to_number_unsigned(const f_string_static_t dynamic, const f_string_range_t range, f_number_unsigned_t * const number);
+#endif // _di_fl_conversion_dynamic_partial_to_number_unsigned_
+/**
+ * Convert a series of positive or negative binary number characters into a f_number_signed_t.
+ *
+ * This will stop at one of the following: a non-digit.
+ * This will ignore NULL values.
+ * This will not process signed statuses (+/-).
+ *
+ * @param dynamic
+ *   The string to convert.
+ * @param negative
+ *   Set to 0 to treat string as a positive number, 1 for as a negative number.
+ * @param number
+ *   This will store the value of the converted string.
+ *   This value is only changed on success.
+ *
+ * @return
+ *   F_none if the binary string was converted to an signed long.
+ *   F_data_not if string starts with a null (length is 0).
+ *
+ *   F_number (with error bit) if no conversion was made due to non-binary values being found.
+ *   F_number_decimal (with error bit) if number has a decimal digit.
+ *   F_number_overflow (with error bit) on integer overflow.
+ *   F_number_underflow (with error bit) on integer underflow.
+ *   F_parameter (with error bit) if a parameter is invalid.
+ */
+#ifndef _di_fl_conversion_dynamic_to_binary_signed_
+  extern f_status_t fl_conversion_dynamic_to_binary_signed(const f_string_static_t dynamic, const bool negative, f_number_signed_t * const number);
+#endif // _di_fl_conversion_dynamic_to_binary_signed_
+
+/**
+ * Convert a series of positive binary number characters into a f_number_unsigned_t.
+ *
+ * This will stop at one of the following: a non-digit.
+ * This will ignore NULL values.
+ * This will not process signed statuses (+/-).
+ *
+ * @param dynamic
+ *   The string to convert.
+ * @param number
+ *   This will store the value of the converted string.
+ *   This value is only changed on success.
+ *
+ * @return
+ *   F_none if the binary string was converted to an unsigned long.
+ *   F_data_not if string starts with a null (length is 0).
+ *
+ *   F_number (with error bit) if no conversion was made due to non-binary values being found.
+ *   F_number_decimal (with error bit) if number has a decimal digit.
+ *   F_number_overflow (with error bit) on integer overflow.
+ *   F_parameter (with error bit) if a parameter is invalid.
+ */
+#ifndef _di_fl_conversion_dynamic_to_binary_unsigned_
+  extern f_status_t fl_conversion_dynamic_to_binary_unsigned(const f_string_static_t dynamic, f_number_unsigned_t * const number);
+#endif // _di_fl_conversion_dynamic_to_binary_unsigned_
+
+/**
+ * Convert a series of positive or negative decimal number characters into an f_number_signed_t.
+ *
+ * This will stop at one of the following: a non-digit.
+ * This will ignore NULL values.
+ * This will not process signed statuses (+/-).
+ *
+ * @param dynamic
+ *   The string to convert.
+ * @param negative
+ *   Set to 0 to treat string as a positive number, 1 for as a negative number.
+ * @param number
+ *   This will store the value of the converted string.
+ *   This value is only changed on success.
+ *
+ * @return
+ *   F_none if the decimal string was converted to an signed long.
+ *   F_data_not if string starts with a null (length is 0).
+ *
+ *   F_number (with error bit) if no conversion was made due to non-decimal values being found.
+ *   F_number_decimal (with error bit) if number has a decimal digit.
+ *   F_number_overflow (with error bit) on integer overflow.
+ *   F_number_underflow (with error bit) on integer underflow.
+ *   F_parameter (with error bit) if a parameter is invalid.
+ */
+#ifndef _di_fl_conversion_dynamic_to_decimal_signed_
+  extern f_status_t fl_conversion_dynamic_to_decimal_signed(const f_string_static_t dynamic, const bool negative, f_number_signed_t * const number);
+#endif // _di_fl_conversion_dynamic_to_decimal_signed_
+
+/**
+ * Convert a series of positive decimal number characters into an f_number_unsigned_t.
+ *
+ * This will stop at one of the following: a non-digit.
+ * This will ignore NULL values.
+ * This will not process signed statuses (+/-).
+ *
+ * @param dynamic
+ *   The string to convert.
+ * @param number
+ *   This will store the value of the converted string.
+ *   This value is only changed on success.
+ *
+ * @return
+ *   F_none if the decimal string was converted to an unsigned long.
+ *   F_data_not if string starts with a null (length is 0).
+ *
+ *   F_number (with error bit) if no conversion was made due to non-decimal values being found.
+ *   F_number_decimal (with error bit) if number has a decimal digit.
+ *   F_number_overflow (with error bit) on integer overflow.
+ *   F_parameter (with error bit) if a parameter is invalid.
+ */
+#ifndef _di_fl_conversion_dynamic_to_decimal_unsigned_
+  extern f_status_t fl_conversion_dynamic_to_decimal_unsigned(const f_string_static_t dynamic, f_number_unsigned_t * const number);
+#endif // _di_fl_conversion_dynamic_to_decimal_unsigned_
+
+/**
+ * Convert a series of positive or negative duodecimal number characters into an f_number_signed_t.
+ *
+ * This will stop at one of the following: a non-digit.
+ * This will ignore NULL values.
+ * This will not process signed statuses (+/-).
+ *
+ * @param dynamic
+ *   The string to convert.
+ * @param negative
+ *   Set to 0 to treat string as a positive number, 1 for as a negative number.
+ * @param number
+ *   This will store the value of the converted string.
+ *   This value is only changed on success.
+ *
+ * @return
+ *   F_none if the duodecimal string was converted to an signed long.
+ *   F_data_not if string starts with a null (length is 0).
+ *
+ *   F_number (with error bit) if no conversion was made due to non-duodecimal values being found.
+ *   F_number_decimal (with error bit) if number has a decimal digit.
+ *   F_number_overflow (with error bit) on integer overflow.
+ *   F_number_underflow (with error bit) on integer underflow.
+ *   F_parameter (with error bit) if a parameter is invalid.
+ */
+#ifndef _di_fl_conversion_dynamic_to_duodecimal_signed_
+  extern f_status_t fl_conversion_dynamic_to_duodecimal_signed(const f_string_static_t dynamic, const bool negative, f_number_signed_t * const number);
+#endif // _di_fl_conversion_dynamic_to_duodecimal_signed_
+
+/**
+ * Convert a series of positive duodecimal number characters into an f_number_unsigned_t.
+ *
+ * This will stop at one of the following: a non-digit.
+ * This will ignore NULL values.
+ * This will not process signed statuses (+/-).
+ *
+ * @param dynamic
+ *   The string to convert.
+ * @param number
+ *   This will store the value of the converted string.
+ *   This value is only changed on success.
+ *
+ * @return
+ *   F_none if the duodecimal string was converted to an unsigned long.
+ *   F_data_not if string starts with a null (length is 0).
+ *
+ *   F_number (with error bit) if no conversion was made due to non-duodecimal values being found.
+ *   F_number_decimal (with error bit) if number has a decimal digit.
+ *   F_number_overflow (with error bit) on integer overflow.
+ *   F_parameter (with error bit) if a parameter is invalid.
+ */
+#ifndef _di_fl_conversion_dynamic_to_duodecimal_unsigned_
+  extern f_status_t fl_conversion_dynamic_to_duodecimal_unsigned(const f_string_static_t dynamic, f_number_unsigned_t * const number);
+#endif // _di_fl_conversion_dynamic_to_duodecimal_unsigned_
+
+/**
+ * Convert a series of positive or negative hexidecimal number characters into an f_number_signed_t.
+ *
+ * This will stop at one of the following: a non-digit.
+ * This will ignore NULL values.
+ * This will not process signed statuses (+/-).
+ *
+ * @param dynamic
+ *   The string to convert.
+ * @param negative
+ *   Set to 0 to treat string as a positive number, 1 for as a negative number.
+ * @param number
+ *   This will store the value of the converted string.
+ *   This value is only changed on success.
+ *
+ * @return
+ *   F_none if the hexidecimal string was converted to an signed long.
+ *   F_data_not if string starts with a null (length is 0).
+ *
+ *   F_number (with error bit) if no conversion was made due to non-hexidecimal values being found.
+ *   F_number_decimal (with error bit) if number has a decimal digit.
+ *   F_number_overflow (with error bit) on integer overflow.
+ *   F_number_underflow (with error bit) on integer underflow.
+ *   F_parameter (with error bit) if a parameter is invalid.
+ */
+#ifndef _di_fl_conversion_dynamic_to_hexidecimal_signed_
+  extern f_status_t fl_conversion_dynamic_to_hexidecimal_signed(const f_string_static_t dynamic, const bool negative, f_number_signed_t * const number);
+#endif // _di_fl_conversion_dynamic_to_hexidecimal_signed_
+
+/**
+ * Convert a series of positive hexidecimal number characters into an f_number_unsigned_t.
+ *
+ * This will stop at one of the following: a non-digit.
+ * This will ignore NULL values.
+ * This will not process signed statuses (+/-).
+ *
+ * @param dynamic
+ *   The string to convert.
+ * @param number
+ *   This will store the value of the converted string.
+ *   This value is only changed on success.
+ *
+ * @return
+ *   F_none if the hexidecimal string was converted to an unsigned long.
+ *   F_data_not if string starts with a null (length is 0).
+ *
+ *   F_number (with error bit) if no conversion was made due to non-hexidecimal values being found.
+ *   F_number_decimal (with error bit) if number has a decimal digit.
+ *   F_number_overflow (with error bit) on integer overflow.
+ *   F_parameter (with error bit) if a parameter is invalid.
+ */
+#ifndef _di_fl_conversion_dynamic_to_hexidecimal_unsigned_
+  extern f_status_t fl_conversion_dynamic_to_hexidecimal_unsigned(const f_string_static_t dynamic, f_number_unsigned_t * const number);
+#endif // _di_fl_conversion_dynamic_to_hexidecimal_unsigned_
+
+/**
+ * Convert a series of positive or negative octal number characters into an f_number_signed_t.
+ *
+ * This will stop at one of the following: a non-digit.
+ * This will ignore NULL values.
+ * This will not process signed statuses (+/-).
+ *
+ * @param dynamic
+ *   The string to convert.
+ * @param negative
+ *   Set to 0 to treat string as a positive number, 1 for as a negative number.
+ * @param number
+ *   This will store the value of the converted string.
+ *   This value is only changed on success.
+ *
+ * @return
+ *   F_none if the octal string was converted to an signed long.
+ *   F_data_not if string starts with a null (length is 0).
+ *
+ *   F_number (with error bit) if no conversion was made due to non-octal values being found.
+ *   F_number_decimal (with error bit) if number has a decimal digit.
+ *   F_number_overflow (with error bit) on integer overflow.
+ *   F_parameter (with error bit) if a parameter is invalid.
+ */
+#ifndef _di_fl_conversion_dynamic_to_octal_signed_
+  extern f_status_t fl_conversion_dynamic_to_octal_signed(const f_string_static_t dynamic, const bool negative, f_number_signed_t * const number);
+#endif // _di_fl_conversion_dynamic_to_octal_signed_
+
+/**
+ * Convert a series of positive octal number characters into an f_number_unsigned_t.
+ *
+ * This will stop at one of the following: a non-digit.
+ * This will ignore NULL values.
+ * This will not process signed statuses (+/-).
+ *
+ * @param dynamic
+ *   The string to convert.
+ * @param number
+ *   This will store the value of the converted string.
+ *   This value is only changed on success.
+ *
+ * @return
+ *   F_none if the octal string was converted to an unsigned long.
+ *   F_data_not if string starts with a null (length is 0).
+ *
+ *   F_number (with error bit) if no conversion was made due to non-octal values being found.
+ *   F_number_decimal (with error bit) if number has a decimal digit.
+ *   F_number_overflow (with error bit) on integer overflow.
+ *   F_parameter (with error bit) if a parameter is invalid.
+ */
+#ifndef _di_fl_conversion_dynamic_to_octal_unsigned_
+  extern f_status_t fl_conversion_dynamic_to_octal_unsigned(const f_string_static_t dynamic, f_number_unsigned_t * const number);
+#endif // _di_fl_conversion_dynamic_to_octal_unsigned_
+
+/**
+ * Convert a series of positive or negative number characters into an f_number_signed_t.
+ *
+ * This will stop at one of the following: a non-digit.
+ * This will ignore NULL values.
+ * This will process signed statuses (+/-).
+ * This will detect based types as follows:
+ *   - hexidecimals begin with either '0x' or '0X'.
+ *   - duodecimals begin with either '0d' or '0D'.
+ *   - octals begin with either '0o' or '0O'.
+ *   - binaries begin with either '0b' or '0B'.
+ *   - decimal is used for all other cases.
+ *
+ * Leading 0's and whitespace are ignored.
+ * Whitespace after the first digit is considered invalid.
+ *
+ * This function is similar to strtoll(), but the behavior of error handling and special bases are different.
+ * In particular, octals are specified here with '0b' prefix or '0B' prefix instead of the ridiculous '0' prefix.
+ *
+ * @param dynamic
+ *   The string to convert.
+ * @param number
+ *   This will store the value of the converted string.
+ *   This value is only changed on success.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not if string starts with a null (length is 0).
+ *
+ *   F_complete_not_utf (with error bit) if an incomplete UTF-8 fragment is found.
+ *   F_number (with error bit) if parameter is not a number.
+ *   F_number_decimal (with error bit) if number has a decimal digit.
+ *   F_number_overflow (with error bit) on integer overflow.
+ *   F_number_underflow (with error bit) on integer underflow.
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ * @see strtoll()
+ */
+#ifndef _di_fl_conversion_dynamic_to_number_signed_
+  extern f_status_t fl_conversion_dynamic_to_number_signed(const f_string_static_t dynamic, f_number_signed_t * const number);
+#endif // _di_fl_conversion_dynamic_to_number_signed_
+
+/**
+ * Convert a series of positive number characters into an f_number_unsigned_t.
+ *
+ * This will stop at one of the following: a non-digit.
+ * This will ignore NULL values.
+ * This will not process signed statuses (+/-).
+ * This will detect based types as follows:
+ *   - hexidecimals begin with either '0x' or '0X'.
+ *   - duodecimals begin with either '0d' or '0D'.
+ *   - octals begin with either '0o' or '0O'.
+ *   - binaries begin with either '0b' or '0B'.
+ *   - decimal is used for all other cases.
+ *
+ * Leading 0's and whitespace are ignored.
+ * Whitespace after the first digit is considered invalid.
+ *
+ * This function is similar to strtoull(), but the behavior of error handling and special bases are different.
+ * In particular, octals are specified here with '0b' prefix or '0B' prefix instead of the ridiculous '0' prefix.
+ * Negative values are reported as such instead of being converted into the unsigned equivalent.
+ *
+ * @param dynamic
+ *   The string to convert.
+ * @param number
+ *   This will store the value of the converted string.
+ *   This value is only changed on success.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not if string starts with a null (length is 0).
+ *
+ *   F_complete_not_utf (with error bit) if an incomplete UTF-8 fragment is found.
+ *   F_number (with error bit) if parameter is not a number.
+ *   F_number_decimal (with error bit) if number has a decimal digit.
+ *   F_number_negative (with error bit) on negative value.
+ *   F_number_positive (with error bit) on positive value (has a +, such as '+1', when only '1' is valid here).
+ *   F_number_overflow (with error bit) on integer overflow.
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ * @see strtoull()
+ */
+#ifndef _di_fl_conversion_dynamic_to_number_unsigned_
+  extern f_status_t fl_conversion_dynamic_to_number_unsigned(const f_string_static_t dynamic, f_number_unsigned_t * const number);
+#endif // _di_fl_conversion_dynamic_to_number_unsigned_
 
 #ifdef __cplusplus
 } // extern "C"
index 16c10cd3149a9bdff79a560680f51a30c827e0e3..4a3fad13b4d9d526d10e0f506f07c0f471733bde 100644 (file)
@@ -5,18 +5,14 @@
 extern "C" {
 #endif
 
-#if !defined(_di_fl_conversion_string_to_binary_signed_) || !defined(_di_fl_conversion_string_to_number_signed_) || !defined(_di_fl_conversion_string_to_number_unsigned_)
-  f_status_t private_fl_conversion_string_to_binary_signed(const f_string_t string, const f_string_range_t range, const bool negative, f_number_signed_t *number) {
-
-    if (!string[0]) {
-      return F_data_not;
-    }
+#if !defined(_di_fl_conversion_dynamic_partial_to_binary_signed_) || !defined(_di_fl_conversion_dynamic_partial_to_number_signed_) || !defined(_di_fl_conversion_dynamic_to_binary_signed_) || !defined(_di_fl_conversion_dynamic_to_number_signed_)
+  f_status_t private_fl_conversion_dynamic_to_binary_signed(const f_string_t string, const f_array_length_t length, const bool negative, f_number_signed_t * const number) {
 
     uint8_t digits = 0;
     uint8_t digit = 0;
     f_number_unsigned_t converted = 0;
 
-    for (f_array_length_t i = range.start; i <= range.stop; ++i) {
+    for (f_array_length_t i = 0; i < length; ++i) {
 
       if (string[i] == 0x2e) {
         return F_status_set_error(F_number_decimal);
@@ -63,20 +59,16 @@ extern "C" {
 
     return F_none;
   }
-#endif // !defined(_di_fl_conversion_string_to_binary_signed_) || !defined(_di_fl_conversion_string_to_number_signed_) || !defined(_di_fl_conversion_string_to_binary_signed_)
+#endif // !defined(_di_fl_conversion_dynamic_partial_to_binary_signed_) || !defined(_di_fl_conversion_dynamic_partial_to_number_signed_) || !defined(_di_fl_conversion_dynamic_to_binary_signed_) || !defined(_di_fl_conversion_dynamic_to_number_signed_)
 
-#if !defined(_di_fl_conversion_string_to_binary_signed_) || !defined(_di_fl_conversion_string_to_number_signed_) || !defined(_di_fl_conversion_string_to_binary_unsigned_)
-  f_status_t private_fl_conversion_string_to_binary_unsigned(const f_string_t string, const f_string_range_t range, f_number_unsigned_t *number) {
-
-    if (!string[0]) {
-      return F_data_not;
-    }
+#if !defined(_di_fl_conversion_dynamic_partial_to_binary_unsigned_) || !defined(_di_fl_conversion_dynamic_partial_to_number_unsigned_) || !defined(_di_fl_conversion_dynamic_to_binary_unsigned_) || !defined(_di_fl_conversion_dynamic_to_number_unsigned_)
+  f_status_t private_fl_conversion_dynamic_to_binary_unsigned(const f_string_t string, const f_array_length_t length, f_number_unsigned_t * const number) {
 
     uint8_t digits = 0;
     uint8_t digit = 0;
     f_number_unsigned_t converted = 0;
 
-    for (f_array_length_t i = range.start; i <= range.stop; ++i) {
+    for (f_array_length_t i = 0; i < length; ++i) {
 
       if (string[i] == 0x2e) {
         return F_status_set_error(F_number_decimal);
@@ -107,20 +99,16 @@ extern "C" {
 
     return F_none;
   }
-#endif // !defined(_di_fl_conversion_string_to_binary_signed_) || !defined(_di_fl_conversion_string_to_number_signed_) || !defined(_di_fl_conversion_string_to_binary_unsigned_)
-
-#if !defined(_di_fl_conversion_string_to_binary_signed_) || !defined(_di_fl_conversion_string_to_number_signed_) || !defined(_di_fl_conversion_string_to_decimal_signed_)
-  f_status_t private_fl_conversion_string_to_decimal_signed(const f_string_t string, const f_string_range_t range, const bool negative, f_number_signed_t *number) {
+#endif // !defined(_di_fl_conversion_dynamic_partial_to_binary_unsigned_) || !defined(_di_fl_conversion_dynamic_partial_to_number_unsigned_) || !defined(_di_fl_conversion_dynamic_to_binary_unsigned_) || !defined(_di_fl_conversion_dynamic_to_number_unsigned_)
 
-    if (!string[0]) {
-      return F_data_not;
-    }
+#if !defined(_di_fl_conversion_dynamic_partial_to_decimal_signed_) || !defined(_di_fl_conversion_dynamic_partial_to_number_signed_) || !defined(_di_fl_conversion_dynamic_to_decimal_signed_) || !defined(_di_fl_conversion_dynamic_to_number_signed_)
+  f_status_t private_fl_conversion_dynamic_to_decimal_signed(const f_string_t string, const f_array_length_t length, const bool negative, f_number_signed_t * const number) {
 
     uint8_t digits = 0;
     uint8_t digit = 0;
     f_number_unsigned_t converted = 0;
 
-    for (f_array_length_t i = range.start; i <= range.stop; ++i) {
+    for (f_array_length_t i = 0; i < length; ++i) {
 
       if (string[i] == 0x2e) {
         return F_status_set_error(F_number_decimal);
@@ -172,20 +160,16 @@ extern "C" {
 
     return F_none;
   }
-#endif // !defined(_di_fl_conversion_string_to_binary_signed_) || !defined(_di_fl_conversion_string_to_number_signed_) || !defined(_di_fl_conversion_string_to_decimal_signed_)
-
-#if !defined(_di_fl_conversion_string_to_binary_signed_) || !defined(_di_fl_conversion_string_to_number_signed_) || !defined(_di_fl_conversion_string_to_decimal_unsigned_)
-  f_status_t private_fl_conversion_string_to_decimal_unsigned(const f_string_t string, const f_string_range_t range, f_number_unsigned_t *number) {
+#endif // !defined(_di_fl_conversion_dynamic_partial_to_decimal_signed_) || !defined(_di_fl_conversion_dynamic_partial_to_number_signed_) || !defined(_di_fl_conversion_dynamic_to_decimal_signed_) || !defined(_di_fl_conversion_dynamic_to_number_signed_)
 
-    if (!string[0]) {
-      return F_data_not;
-    }
+#if !defined(_di_fl_conversion_dynamic_partial_to_decimal_unsigned_) || !defined(_di_fl_conversion_dynamic_partial_to_number_unsigned_) || !defined(_di_fl_conversion_dynamic_to_decimal_unsigned_) || !defined(_di_fl_conversion_dynamic_to_number_unsigned_)
+  f_status_t private_fl_conversion_dynamic_to_decimal_unsigned(const f_string_t string, const f_array_length_t length, f_number_unsigned_t * const number) {
 
     uint8_t digits = 0;
     uint8_t digit = 0;
     f_number_unsigned_t converted = 0;
 
-    for (f_array_length_t i = range.start; i <= range.stop; ++i) {
+    for (f_array_length_t i = 0; i < length; ++i) {
 
       if (string[i] == 0x2e) {
         return F_status_set_error(F_number_decimal);
@@ -219,20 +203,16 @@ extern "C" {
 
     return F_none;
   }
-#endif // !defined(_di_fl_conversion_string_to_binary_signed_) || !defined(_di_fl_conversion_string_to_number_signed_) || !defined(_di_fl_conversion_string_to_decimal_unsigned_)
+#endif // !defined(_di_fl_conversion_dynamic_partial_to_decimal_unsigned_) || !defined(_di_fl_conversion_dynamic_partial_to_number_unsigned_) || !defined(_di_fl_conversion_dynamic_to_decimal_unsigned_) || !defined(_di_fl_conversion_dynamic_to_number_unsigned_)
 
-#if !defined(_di_fl_conversion_string_to_binary_signed_) || !defined(_di_fl_conversion_string_to_number_signed_) || !defined(_di_fl_conversion_string_to_duodecimal_signed_)
-  f_status_t private_fl_conversion_string_to_duodecimal_signed(const f_string_t string, const f_string_range_t range, const bool negative, f_number_signed_t *number) {
-
-    if (!string[0]) {
-      return F_data_not;
-    }
+#if !defined(_di_fl_conversion_dynamic_partial_to_duodecimal_signed_) || !defined(_di_fl_conversion_dynamic_partial_to_number_signed_) || !defined(_di_fl_conversion_dynamic_to_duodecimal_signed_) || !defined(_di_fl_conversion_dynamic_to_number_signed_)
+  f_status_t private_fl_conversion_dynamic_to_duodecimal_signed(const f_string_t string, const f_array_length_t length, const bool negative, f_number_signed_t * const number) {
 
     uint8_t digits = 0;
     uint8_t digit = 0;
     f_number_unsigned_t converted = 0;
 
-    for (f_array_length_t i = range.start; i <= range.stop; ++i) {
+    for (f_array_length_t i = 0; i < length; ++i) {
 
       if (string[i] == 0x2e) {
         return F_status_set_error(F_number_decimal);
@@ -284,20 +264,16 @@ extern "C" {
 
     return F_none;
   }
-#endif // !defined(_di_fl_conversion_string_to_binary_signed_) || !defined(_di_fl_conversion_string_to_number_signed_) || !defined(_di_fl_conversion_string_to_duodecimal_signed_)
+#endif // !defined(_di_fl_conversion_dynamic_partial_to_duodecimal_signed_) || !defined(_di_fl_conversion_dynamic_partial_to_number_signed_) || !defined(_di_fl_conversion_dynamic_to_duodecimal_signed_) || !defined(_di_fl_conversion_dynamic_to_number_signed_)
 
-#if !defined(_di_fl_conversion_string_to_binary_signed_) || !defined(_di_fl_conversion_string_to_number_signed_) || !defined(_di_fl_conversion_string_to_duodecimal_unsigned_)
-  f_status_t private_fl_conversion_string_to_duodecimal_unsigned(const f_string_t string, const f_string_range_t range, f_number_unsigned_t *number) {
-
-    if (!string[0]) {
-      return F_data_not;
-    }
+#if !defined(_di_fl_conversion_dynamic_partial_to_duodecimal_unsigned_) || !defined(_di_fl_conversion_dynamic_partial_to_number_unsigned_) || !defined(_di_fl_conversion_dynamic_to_duodecimal_unsigned_) || !defined(_di_fl_conversion_dynamic_to_number_unsigned_)
+  f_status_t private_fl_conversion_dynamic_to_duodecimal_unsigned(const f_string_t string, const f_array_length_t length, f_number_unsigned_t * const number) {
 
     uint8_t digits = 0;
     uint8_t digit = 0;
     f_number_unsigned_t converted = 0;
 
-    for (f_array_length_t i = range.start; i <= range.stop; ++i) {
+    for (f_array_length_t i = 0; i < length; ++i) {
 
       if (string[i] == 0x2e) {
         return F_status_set_error(F_number_decimal);
@@ -331,20 +307,16 @@ extern "C" {
 
     return F_none;
   }
-#endif // !defined(_di_fl_conversion_string_to_binary_signed_) || !defined(_di_fl_conversion_string_to_number_signed_) || !defined(_di_fl_conversion_string_to_duodecimal_unsigned_)
+#endif // !defined(_di_fl_conversion_dynamic_partial_to_duodecimal_unsigned_) || !defined(_di_fl_conversion_dynamic_partial_to_number_unsigned_) || !defined(_di_fl_conversion_dynamic_to_duodecimal_unsigned_) || !defined(_di_fl_conversion_dynamic_to_number_unsigned_)
 
-#if !defined(_di_fl_conversion_string_to_binary_signed_) || !defined(_di_fl_conversion_string_to_number_signed_) || !defined(_di_fl_conversion_string_to_hexidecimal_signed_)
-  f_status_t private_fl_conversion_string_to_hexidecimal_signed(const f_string_t string, const f_string_range_t range, const bool negative, f_number_signed_t *number) {
-
-    if (!string[0]) {
-      return F_data_not;
-    }
+#if !defined(_di_fl_conversion_dynamic_partial_to_hexidecimal_signed_) || !defined(_di_fl_conversion_dynamic_partial_to_number_signed_) || !defined(_di_fl_conversion_dynamic_to_hexidecimal_signed_) || !defined(_di_fl_conversion_dynamic_to_number_signed_)
+  f_status_t private_fl_conversion_dynamic_to_hexidecimal_signed(const f_string_t string, const f_array_length_t length, const bool negative, f_number_signed_t * const number) {
 
     uint8_t digits = 0;
     uint8_t digit = 0;
     f_number_unsigned_t converted = 0;
 
-    for (f_array_length_t i = range.start; i <= range.stop; ++i) {
+    for (f_array_length_t i = 0; i < length; ++i) {
 
       if (string[i] == 0x2e) {
         return F_status_set_error(F_number_decimal);
@@ -393,22 +365,19 @@ extern "C" {
     } // for
 
     *number = converted;
+
     return F_none;
   }
-#endif // !defined(_di_fl_conversion_string_to_binary_signed_) || !defined(_di_fl_conversion_string_to_number_signed_) || !defined(_di_fl_conversion_string_to_hexidecimal_signed_)
+#endif // !defined(_di_fl_conversion_dynamic_partial_to_hexidecimal_signed_) || !defined(_di_fl_conversion_dynamic_partial_to_number_signed_) || !defined(_di_fl_conversion_dynamic_to_hexidecimal_signed_) || !defined(_di_fl_conversion_dynamic_to_number_signed_)
 
-#if !defined(_di_fl_conversion_string_to_binary_signed_) || !defined(_di_fl_conversion_string_to_number_signed_) || !defined(_di_fl_conversion_string_to_hexidecimal_unsigned_)
-  f_status_t private_fl_conversion_string_to_hexidecimal_unsigned(const f_string_t string, const f_string_range_t range, f_number_unsigned_t *number) {
-
-    if (!string[0]) {
-      return F_data_not;
-    }
+#if !defined(_di_fl_conversion_dynamic_partial_to_hexidecimal_unsigned_) || !defined(_di_fl_conversion_dynamic_partial_to_number_unsigned_) || !defined(_di_fl_conversion_dynamic_to_hexidecimal_unsigned_) || !defined(_di_fl_conversion_dynamic_to_number_unsigned_)
+  f_status_t private_fl_conversion_dynamic_to_hexidecimal_unsigned(const f_string_t string, const f_array_length_t length, f_number_unsigned_t * const number) {
 
     uint8_t digits = 0;
     uint8_t digit = 0;
     f_number_unsigned_t converted = 0;
 
-    for (f_array_length_t i = range.start; i <= range.stop; ++i) {
+    for (f_array_length_t i = 0; i < length; ++i) {
 
       if (string[i] == 0x2e) {
         return F_status_set_error(F_number_decimal);
@@ -439,22 +408,19 @@ extern "C" {
     } // for
 
     *number = converted;
+
     return F_none;
   }
-#endif // !defined(_di_fl_conversion_string_to_binary_signed_) || !defined(_di_fl_conversion_string_to_number_signed_) || !defined(_di_fl_conversion_string_to_hexidecimal_unsigned_)
+#endif // !defined(_di_fl_conversion_dynamic_partial_to_hexidecimal_unsigned_) || !defined(_di_fl_conversion_dynamic_partial_to_number_unsigned_) || !defined(_di_fl_conversion_dynamic_to_hexidecimal_unsigned_) || !defined(_di_fl_conversion_dynamic_to_number_unsigned_)
 
-#if !defined(_di_fl_conversion_string_to_binary_signed_) || !defined(_di_fl_conversion_string_to_number_signed_) || !defined(_di_fl_conversion_string_to_octal_signed_)
-  f_status_t private_fl_conversion_string_to_octal_signed(const f_string_t string, const f_string_range_t range, const bool negative, f_number_signed_t *number) {
-
-    if (!string[0]) {
-      return F_data_not;
-    }
+#if !defined(_di_fl_conversion_dynamic_partial_to_octal_signed_) || !defined(_di_fl_conversion_dynamic_partial_to_number_signed_) || !defined(_di_fl_conversion_dynamic_to_octal_signed_) || !defined(_di_fl_conversion_dynamic_to_number_signed_)
+  f_status_t private_fl_conversion_dynamic_to_octal_signed(const f_string_t string, const f_array_length_t length, const bool negative, f_number_signed_t * const number) {
 
     uint8_t digits = 0;
     uint8_t digit = 0;
     f_number_unsigned_t converted = 0;
 
-    for (f_array_length_t i = range.start; i <= range.stop; ++i) {
+    for (f_array_length_t i = 0; i < length; ++i) {
 
       if (string[i] == 0x2e) {
         return F_status_set_error(F_number_decimal);
@@ -506,20 +472,16 @@ extern "C" {
 
     return F_none;
   }
-#endif // !defined(_di_fl_conversion_string_to_binary_signed_) || !defined(_di_fl_conversion_string_to_number_signed_) || !defined(_di_fl_conversion_string_to_octal_signed_)
-
-#if !defined(_di_fl_conversion_string_to_binary_signed_) || !defined(_di_fl_conversion_string_to_number_signed_) || !defined(_di_fl_conversion_string_to_octal_unsigned_)
-  f_status_t private_fl_conversion_string_to_octal_unsigned(const f_string_t string, const f_string_range_t range, f_number_unsigned_t *number) {
+#endif // !defined(_di_fl_conversion_dynamic_partial_to_octal_signed_) || !defined(_di_fl_conversion_dynamic_partial_to_number_signed_) || !defined(_di_fl_conversion_dynamic_to_octal_signed_) || !defined(_di_fl_conversion_dynamic_to_number_signed_)
 
-    if (!string[0]) {
-      return F_data_not;
-    }
+#if !defined(_di_fl_conversion_dynamic_partial_to_octal_unsigned_) || !defined(_di_fl_conversion_dynamic_partial_to_number_unsigned_) || !defined(_di_fl_conversion_dynamic_to_octal_unsigned_) || !defined(_di_fl_conversion_dynamic_to_number_unsigned_)
+  f_status_t private_fl_conversion_dynamic_to_octal_unsigned(const f_string_t string, const f_array_length_t length, f_number_unsigned_t * const number) {
 
     uint8_t digits = 0;
     uint8_t digit = 0;
     f_number_unsigned_t converted = 0;
 
-    for (f_array_length_t i = range.start; i <= range.stop; ++i) {
+    for (f_array_length_t i = 0; i < length; ++i) {
 
       if (string[i] == 0x2e) {
         return F_status_set_error(F_number_decimal);
@@ -553,7 +515,307 @@ extern "C" {
 
     return F_none;
   }
-#endif // !defined(_di_fl_conversion_string_to_binary_signed_) || !defined(_di_fl_conversion_string_to_number_signed_) || !defined(_di_fl_conversion_string_to_octal_unsigned_)
+#endif // !defined(_di_fl_conversion_dynamic_partial_to_octal_unsigned_) || !defined(_di_fl_conversion_dynamic_partial_to_number_unsigned_) || !defined(_di_fl_conversion_dynamic_to_octal_unsigned_) || !defined(_di_fl_conversion_dynamic_to_number_unsigned_)
+
+#if !defined(_di_fl_conversion_dynamic_to_number_signed_) || !defined(_di_fl_conversion_dynamic_partial_to_number_signed_)
+  f_status_t private_fl_conversion_dynamic_to_number_signed(const f_string_t string, const f_array_length_t length, f_number_signed_t * const number) {
+
+    uint8_t width = 0;
+    f_array_length_t width_max = 0;
+    uint8_t mode = 0;
+    int8_t vector = 0; // 0 for assumed positive, 1 for explicit positive, -1 for negative.
+    f_array_length_t j = 0;
+    f_array_length_t offset = 0;
+    f_status_t status = F_none;
+
+    for (f_array_length_t i = 0; i < length; ++i) {
+
+      width = macro_f_utf_byte_width_is(string[i]);
+
+      if (!width) {
+        if (isspace(string[i])) {
+          if (!mode && !vector) {
+            ++offset;
+
+            continue;
+          }
+
+          return F_status_set_error(F_number);
+        }
+      }
+      else {
+        if (!mode && !vector) {
+          width_max = length - i;
+
+          status = f_utf_is_whitespace(string + i, width_max);
+
+          if (status == F_true) {
+            offset = i + 1;
+
+            continue;
+          }
+
+          if (F_status_is_error(status)) {
+            if (status == F_status_set_error(F_maybe)) {
+              status = F_status_set_error(F_complete_not_utf);
+            }
+
+            return status;
+          }
+        }
+
+        return F_status_set_error(F_number);
+      }
+
+      if (string[i] == 0x30) {
+
+        // Skip past all NULLs.
+        for (j = i + 1; j < length; ++j) {
+          if (string[j]) break;
+        } // for
+
+        // Immediate next value must be either a number, 'x', 'X', 'd', 'D', 'o', 'O', 'b', or 'B'.
+        if (j >= length) {
+          *number = 0;
+          return F_none;
+        }
+        else if (string[j] > 0x2f && string[j] < 0x3a) {
+          mode = 10;
+        }
+        else if (string[j] == 0x78 || string[j] == 0x58) {
+          mode = 16;
+          offset += 2;
+        }
+        else if (string[j] == 0x44 || string[j] == 0x64) {
+          mode = 12;
+          offset += 2;
+        }
+        else if (string[j] == 0x6f || string[j] == 0x4f) {
+          mode = 8;
+          offset += 2;
+        }
+        else if (string[j] == 0x62 || string[j] == 0x42) {
+          mode = 2;
+          offset += 2;
+        }
+        else if (string[j] == 0x2e) {
+          return F_status_set_error(F_number_decimal);
+        }
+        else {
+          return F_status_set_error(F_number);
+        }
+
+        break;
+      }
+
+      // Plus sign is only allowed as the first non-whitespace character.
+      if (string[i] == 0x2b) {
+        if (!mode && !vector) {
+          vector = 1;
+          ++offset;
+        }
+        else {
+          return F_status_set_error(F_number);
+        }
+      }
+
+      // Negative sign is not allowed.
+      if (string[i] == 0x2d) {
+        if (!mode && !vector) {
+          vector = -1;
+          ++offset;
+        }
+        else {
+          return F_status_set_error(F_number);
+        }
+      }
+
+      if (f_conversion_character_is_decimal(string[i]) == F_true) {
+        mode = 10;
+        break;
+      }
+
+      return F_status_set_error(F_number);
+    } // for
+
+    if (!mode) {
+      return F_status_set_error(F_number);
+    }
+
+    if (offset >= length) {
+      return F_status_set_error(F_number);
+    }
+
+    if (mode == 10) {
+      return private_fl_conversion_dynamic_to_decimal_signed(string + offset, length - offset, vector == -1, number);
+    }
+
+    if (mode == 16) {
+      return private_fl_conversion_dynamic_to_hexidecimal_signed(string + offset, length - offset, vector == -1, number);
+    }
+
+    if (mode == 12) {
+      return private_fl_conversion_dynamic_to_duodecimal_signed(string + offset, length - offset, vector == -1, number);
+    }
+
+    if (mode == 8) {
+      return private_fl_conversion_dynamic_to_octal_signed(string + offset, length - offset, vector == -1, number);
+    }
+
+    return private_fl_conversion_dynamic_to_binary_signed(string + offset, length - offset, vector == -1, number);
+  }
+#endif // !defined(_di_fl_conversion_dynamic_to_number_signed_) || !defined(_di_fl_conversion_dynamic_partial_to_number_signed_)
+
+#if !defined(_di_fl_conversion_dynamic_to_number_unsigned_) || !defined(_di_fl_conversion_dynamic_partial_to_number_unsigned_)
+  f_status_t private_fl_conversion_dynamic_to_number_unsigned(const f_string_t string, const f_array_length_t length, f_number_unsigned_t * const number) {
+
+    uint8_t width = 0;
+    f_array_length_t width_max = 0;
+    uint8_t mode = 0;
+    f_array_length_t j = 0;
+    f_array_length_t offset = 0;
+    f_status_t status = F_none;
+    int8_t sign_found = 0;
+
+    for (f_array_length_t i = 0; i < length; ++i) {
+
+      width = macro_f_utf_byte_width_is(string[i]);
+
+      if (!width) {
+        if (isspace(string[i])) {
+          if (!mode) {
+            ++offset;
+
+            continue;
+          }
+
+          return F_status_set_error(F_number);
+        }
+      }
+      else {
+        if (!mode) {
+          width_max = length - i;
+
+          status = f_utf_is_whitespace(string + i, width_max);
+
+          if (status == F_true) {
+            offset = i + 1;
+
+            continue;
+          }
+
+          if (F_status_is_error(status)) {
+            if (status == F_status_set_error(F_maybe)) {
+              status = F_status_set_error(F_complete_not_utf);
+            }
+
+            return status;
+          }
+        }
+
+        return F_status_set_error(F_number);
+      }
+
+      if (string[i] == 0x30) {
+
+        // Skip past all NULLs.
+        for (j = i + 1; j < length; ++j) {
+          if (string[j]) break;
+        } // for
+
+        // Immediate next value must be either a number, 'x', 'X', 'd', 'D', 'o', 'O', 'b', or 'B'.
+        if (j >= length) {
+          *number = 0;
+
+          return F_none;
+        }
+        else if (string[j] > 0x2f && string[j] < 0x3a) {
+          mode = 10;
+        }
+        else if (string[j] == 0x78 || string[j] == 0x58) {
+          mode = 16;
+          offset += 2;
+        }
+        else if (string[j] == 0x44 || string[j] == 0x64) {
+          mode = 12;
+          offset += 2;
+        }
+        else if (string[j] == 0x6f || string[j] == 0x4f) {
+          mode = 8;
+          offset += 2;
+        }
+        else if (string[j] == 0x62 || string[j] == 0x42) {
+          mode = 2;
+          offset += 2;
+        }
+        else if (string[j] == 0x2e) {
+          return F_status_set_error(F_number_decimal);
+        }
+        else {
+          return F_status_set_error(F_number);
+        }
+
+        break;
+      }
+
+      if (string[i] == 0x2b) {
+        ++offset;
+        sign_found = 1;
+      }
+
+      if (string[i] == 0x2d) {
+        ++offset;
+        sign_found = -1;
+      }
+
+      if (f_conversion_character_is_decimal(string[i]) == F_true) {
+        mode = 10;
+        break;
+      }
+
+      return F_status_set_error(F_number);
+    } // for
+
+    if (!mode) {
+      return F_status_set_error(F_number);
+    }
+
+    if (offset >= length) {
+      return F_status_set_error(F_number);
+    }
+
+    if (mode == 10) {
+      status = private_fl_conversion_dynamic_to_decimal_unsigned(string + offset, length - offset, number);
+    }
+    else if (mode == 16) {
+      status = private_fl_conversion_dynamic_to_hexidecimal_unsigned(string + offset, length - offset, number);
+    }
+    else if (mode == 12) {
+      status = private_fl_conversion_dynamic_to_duodecimal_unsigned(string + offset, length - offset, number);
+    }
+    else if (mode == 8) {
+      status = private_fl_conversion_dynamic_to_octal_unsigned(string + offset, length - offset, number);
+    }
+    else {
+      status = private_fl_conversion_dynamic_to_binary_unsigned(string + offset, length - offset, number);
+    }
+
+    // +/- signs are not allowed.
+    if (sign_found) {
+      if (status == F_none) {
+        if (sign_found == -1) {
+          return F_status_set_error(F_number_negative);
+        }
+
+        return F_status_set_error(F_number_positive);
+      }
+
+      return F_status_set_error(F_number);
+    }
+
+    return status;
+  }
+#endif // !defined(_di_fl_conversion_dynamic_to_number_unsigned_) || !defined(_di_fl_conversion_dynamic_partial_to_number_unsigned_)
 
 #ifdef __cplusplus
 } // extern "C"
index a34b0bb21de5712ef32110c6abd242b240d1e71f..d9c1b79bea6ec2d4648f204a7b43ba2ac16ffa5f 100644 (file)
@@ -16,14 +16,14 @@ extern "C" {
 #endif
 
 /**
- * Private implementation of fl_conversion_string_to_binary_signed().
+ * Private implementation of fl_conversion_dynamic_to_binary_signed().
  *
  * Intended to be shared to each of the different implementation variations.
  *
  * @param string
  *   The string to convert.
- * @param location
- *   The start/stop range to convert.
+ * @param length
+ *   The length of the string to convert.
  * @param negative
  *   Set to 0 to treat string as a positive number, 1 for as a negative number.
  * @param number
@@ -39,20 +39,25 @@ extern "C" {
  *   F_number_overflow (with error bit) on integer overflow.
  *   F_number_underflow (with error bit) on integer underflow.
  *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ * @see fl_conversion_dynamic_partial_to_binary_signed()
+ * @see fl_conversion_dynamic_partial_to_number_signed()
+ * @see fl_conversion_dynamic_to_binary_signed()
+ * @see fl_conversion_dynamic_to_number_signed()
  */
-#if !defined(_di_fl_conversion_string_to_binary_signed_) || !defined(_di_fl_conversion_string_to_number_signed_) || !(_di_fl_conversion_string_to_binary_signed_)
-  extern f_status_t private_fl_conversion_string_to_binary_signed(const f_string_t string, const f_string_range_t range, const bool negative, f_number_signed_t *number);
-#endif // !defined(_di_fl_conversion_string_to_binary_signed_) || !defined(_di_fl_conversion_string_to_number_signed_) || !(_di_fl_conversion_string_to_binary_signed_)
+#if !defined(_di_fl_conversion_dynamic_partial_to_binary_signed_) || !defined(_di_fl_conversion_dynamic_partial_to_number_signed_) || !defined(_di_fl_conversion_dynamic_to_binary_signed_) || !defined(_di_fl_conversion_dynamic_to_number_signed_)
+  extern f_status_t private_fl_conversion_dynamic_to_binary_signed(const f_string_t string, const f_array_length_t length, const bool negative, f_number_signed_t * const number) F_attribute_visibility_internal_d;
+#endif // !defined(_di_fl_conversion_dynamic_partial_to_binary_signed_) || !defined(_di_fl_conversion_dynamic_partial_to_number_signed_) || !defined(_di_fl_conversion_dynamic_to_binary_signed_) || !defined(_di_fl_conversion_dynamic_to_number_signed_)
 
 /**
- * Private implementation of fl_conversion_string_to_binary_unsigned().
+ * Private implementation of fl_conversion_dynamic_to_binary_unsigned().
  *
  * Intended to be shared to each of the different implementation variations.
  *
  * @param string
  *   The string to convert.
- * @param range
- *   The start/stop range to convert.
+ * @param length
+ *   The length of the string to convert.
  * @param number
  *   This will store the value of the converted string.
  *   This value is only changed on success.
@@ -65,20 +70,25 @@ extern "C" {
  *   F_number_decimal (with error bit) if number has a decimal digit.
  *   F_number_overflow (with error bit) on integer overflow.
  *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ * @see fl_conversion_dynamic_partial_to_binary_unsigned()
+ * @see fl_conversion_dynamic_partial_to_number_unsigned()
+ * @see fl_conversion_dynamic_to_binary_unsigned()
+ * @see fl_conversion_dynamic_to_number_unsigned()
  */
-#if !defined(_di_fl_conversion_string_to_binary_signed_) || !defined(_di_fl_conversion_string_to_number_signed_) || !(_di_fl_conversion_string_to_binary_unsigned_)
-  extern f_status_t private_fl_conversion_string_to_binary_unsigned(const f_string_t string, const f_string_range_t range, f_number_unsigned_t *number);
-#endif // !defined(_di_fl_conversion_string_to_binary_signed_) || !defined(_di_fl_conversion_string_to_number_signed_) || !(_di_fl_conversion_string_to_binary_unsigned_)
+#if !defined(_di_fl_conversion_dynamic_partial_to_binary_unsigned_) || !defined(_di_fl_conversion_dynamic_partial_to_number_unsigned_) || !defined(_di_fl_conversion_dynamic_to_binary_unsigned_) || !defined(_di_fl_conversion_dynamic_to_number_unsigned_)
+  extern f_status_t private_fl_conversion_dynamic_to_binary_unsigned(const f_string_t string, const f_array_length_t length, f_number_unsigned_t * const number) F_attribute_visibility_internal_d;
+#endif // !defined(_di_fl_conversion_dynamic_partial_to_binary_unsigned_) || !defined(_di_fl_conversion_dynamic_partial_to_number_unsigned_) || !defined(_di_fl_conversion_dynamic_to_binary_unsigned_) || !defined(_di_fl_conversion_dynamic_to_number_unsigned_)
 
 /**
- * Private implementation of fl_conversion_string_to_decimal_signed().
+ * Private implementation of fl_conversion_dynamic_to_decimal_signed().
  *
  * Intended to be shared to each of the different implementation variations.
  *
  * @param string
  *   The string to convert.
- * @param range
- *   The start/stop range to convert.
+ * @param length
+ *   The length of the string to convert.
  * @param negative
  *   Set to 0 to treat string as a positive number, 1 for as a negative number.
  * @param number
@@ -94,20 +104,25 @@ extern "C" {
  *   F_number_overflow (with error bit) on integer overflow.
  *   F_number_underflow (with error bit) on integer underflow.
  *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ * @see fl_conversion_dynamic_partial_to_decimal_unsigned()
+ * @see fl_conversion_dynamic_partial_to_number_unsigned()
+ * @see fl_conversion_dynamic_to_decimal_unsigned()
+ * @see fl_conversion_dynamic_to_number_unsigned()
  */
-#if !defined(_di_fl_conversion_string_to_binary_signed_) || !defined(_di_fl_conversion_string_to_number_signed_) || !(_di_fl_conversion_string_to_decimal_signed_)
-  extern f_status_t private_fl_conversion_string_to_decimal_signed(const f_string_t string, const f_string_range_t range, const bool negative, f_number_signed_t *number);
-#endif // !defined(_di_fl_conversion_string_to_binary_signed_) || !defined(_di_fl_conversion_string_to_number_signed_) || !(_di_fl_conversion_string_to_decimal_signed_)
+#if !defined(_di_fl_conversion_dynamic_partial_to_decimal_signed_) || !defined(_di_fl_conversion_dynamic_partial_to_number_signed_) || !defined(_di_fl_conversion_dynamic_to_decimal_signed_) || !defined(_di_fl_conversion_dynamic_to_number_signed_)
+  extern f_status_t private_fl_conversion_dynamic_to_decimal_signed(const f_string_t string, const f_array_length_t length, const bool negative, f_number_signed_t * const number) F_attribute_visibility_internal_d;
+#endif // !defined(_di_fl_conversion_dynamic_partial_to_decimal_signed_) || !defined(_di_fl_conversion_dynamic_partial_to_number_signed_) || !defined(_di_fl_conversion_dynamic_to_decimal_signed_) || !defined(_di_fl_conversion_dynamic_to_number_signed_)
 
 /**
- * Private implementation of fl_conversion_string_to_decimal_unsigned().
+ * Private implementation of fl_conversion_dynamic_to_decimal_unsigned().
  *
  * Intended to be shared to each of the different implementation variations.
  *
  * @param string
  *   The string to convert.
- * @param range
- *   The start/stop range to convert.
+ * @param length
+ *   The length of the string to convert.
  * @param number
  *   This will store the value of the converted string.
  *   This value is only changed on success.
@@ -120,20 +135,25 @@ extern "C" {
  *   F_number_decimal (with error bit) if number has a decimal digit.
  *   F_number_overflow (with error bit) on integer overflow.
  *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ * @see fl_conversion_dynamic_partial_to_decimal_unsigned()
+ * @see fl_conversion_dynamic_partial_to_number_unsigned()
+ * @see fl_conversion_dynamic_to_decimal_unsigned()
+ * @see fl_conversion_dynamic_to_number_unsigned()
  */
-#if !defined(_di_fl_conversion_string_to_binary_signed_) || !defined(_di_fl_conversion_string_to_number_signed_) || !(_di_fl_conversion_string_to_decimal_unsigned_)
-  extern f_status_t private_fl_conversion_string_to_decimal_unsigned(const f_string_t string, const f_string_range_t range, f_number_unsigned_t *number);
-#endif // !defined(_di_fl_conversion_string_to_binary_signed_) || !defined(_di_fl_conversion_string_to_number_signed_) || !(_di_fl_conversion_string_to_decimal_unsigned_)
+#if !defined(_di_fl_conversion_dynamic_partial_to_decimal_unsigned_) || !defined(_di_fl_conversion_dynamic_partial_to_number_unsigned_) || !defined(_di_fl_conversion_dynamic_to_decimal_unsigned_) || !defined(_di_fl_conversion_dynamic_to_number_unsigned_)
+  extern f_status_t private_fl_conversion_dynamic_to_decimal_unsigned(const f_string_t string, const f_array_length_t length, f_number_unsigned_t * const number) F_attribute_visibility_internal_d;
+#endif // !defined(_di_fl_conversion_dynamic_partial_to_decimal_unsigned_) || !defined(_di_fl_conversion_dynamic_partial_to_number_unsigned_) || !defined(_di_fl_conversion_dynamic_to_decimal_unsigned_) || !defined(_di_fl_conversion_dynamic_to_number_unsigned_)
 
 /**
- * Private implementation of fl_conversion_string_to_duodecimal_signed().
+ * Private implementation of fl_conversion_dynamic_to_duodecimal_signed().
  *
  * Intended to be shared to each of the different implementation variations.
  *
  * @param string
  *   The string to convert.
- * @param range
- *   The start/stop range to convert.
+ * @param length
+ *   The length of the string to convert.
  * @param negative
  *   Set to 0 to treat string as a positive number, 1 for as a negative number.
  * @param number
@@ -149,20 +169,25 @@ extern "C" {
  *   F_number_overflow (with error bit) on integer overflow.
  *   F_number_underflow (with error bit) on integer underflow.
  *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ * @see fl_conversion_dynamic_partial_to_duodecimal_signed()
+ * @see fl_conversion_dynamic_partial_to_number_signed()
+ * @see fl_conversion_dynamic_to_duodecimal_signed()
+ * @see fl_conversion_dynamic_to_number_signed()
  */
-#if !defined(_di_fl_conversion_string_to_binary_signed_) || !defined(_di_fl_conversion_string_to_number_signed_) || !(_di_fl_conversion_string_to_duodecimal_signed_)
-  extern f_status_t private_fl_conversion_string_to_duodecimal_signed(const f_string_t string, const f_string_range_t range, const bool negative, f_number_signed_t *number);
-#endif // !defined(_di_fl_conversion_string_to_binary_signed_) || !defined(_di_fl_conversion_string_to_number_signed_) || !(_di_fl_conversion_string_to_duodecimal_signed_)
+#if !defined(_di_fl_conversion_dynamic_partial_to_duodecimal_signed_) || !defined(_di_fl_conversion_dynamic_partial_to_number_signed_) || !defined(_di_fl_conversion_dynamic_to_duodecimal_signed_) || !defined(_di_fl_conversion_dynamic_to_number_signed_)
+  extern f_status_t private_fl_conversion_dynamic_to_duodecimal_signed(const f_string_t string, const f_array_length_t length, const bool negative, f_number_signed_t * const number) F_attribute_visibility_internal_d;
+#endif // !defined(_di_fl_conversion_dynamic_partial_to_duodecimal_signed_) || !defined(_di_fl_conversion_dynamic_partial_to_number_signed_) || !defined(_di_fl_conversion_dynamic_to_duodecimal_signed_) || !defined(_di_fl_conversion_dynamic_to_number_signed_)
 
 /**
- * Private implementation of fl_conversion_string_to_duodecimal_unsigned().
+ * Private implementation of fl_conversion_dynamic_to_duodecimal_unsigned().
  *
  * Intended to be shared to each of the different implementation variations.
  *
  * @param string
  *   The string to convert.
- * @param range
- *   The start/stop range to convert.
+ * @param length
+ *   The length of the string to convert.
  * @param number
  *   This will store the value of the converted string.
  *   This value is only changed on success.
@@ -175,20 +200,25 @@ extern "C" {
  *   F_number_decimal (with error bit) if number has a decimal digit.
  *   F_number_overflow (with error bit) on integer overflow.
  *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ * @see fl_conversion_dynamic_partial_to_duodecimal_unsigned()
+ * @see fl_conversion_dynamic_partial_to_number_unsigned()
+ * @see fl_conversion_dynamic_to_duodecimal_unsigned()
+ * @see fl_conversion_dynamic_to_number_unsigned()
  */
-#if !defined(_di_fl_conversion_string_to_binary_signed_) || !defined(_di_fl_conversion_string_to_number_signed_) || !(_di_fl_conversion_string_to_duodecimal_unsigned_)
-  extern f_status_t private_fl_conversion_string_to_duodecimal_unsigned(const f_string_t string, const f_string_range_t range, f_number_unsigned_t *number);
-#endif // !defined(_di_fl_conversion_string_to_binary_signed_) || !defined(_di_fl_conversion_string_to_number_signed_) || !(_di_fl_conversion_string_to_duodecimal_unsigned_)
+#if !defined(_di_fl_conversion_dynamic_partial_to_duodecimal_unsigned_) || !defined(_di_fl_conversion_dynamic_partial_to_number_unsigned_) || !defined(_di_fl_conversion_dynamic_to_duodecimal_unsigned_) || !defined(_di_fl_conversion_dynamic_to_number_unsigned_)
+  extern f_status_t private_fl_conversion_dynamic_to_duodecimal_unsigned(const f_string_t string, const f_array_length_t length, f_number_unsigned_t * const number) F_attribute_visibility_internal_d;
+#endif // !defined(_di_fl_conversion_dynamic_partial_to_duodecimal_unsigned_) || !defined(_di_fl_conversion_dynamic_partial_to_number_unsigned_) || !defined(_di_fl_conversion_dynamic_to_duodecimal_unsigned_) || !defined(_di_fl_conversion_dynamic_to_number_unsigned_)
 
 /**
- * Private implementation of fl_conversion_string_to_hexidecimal_signed().
+ * Private implementation of fl_conversion_dynamic_to_hexidecimal_signed().
  *
  * Intended to be shared to each of the different implementation variations.
  *
  * @param string
  *   The string to convert.
- * @param range
- *   The start/stop range to convert.
+ * @param length
+ *   The length of the string to convert.
  * @param negative
  *   Set to 0 to treat string as a positive number, 1 for as a negative number.
  * @param number
@@ -204,20 +234,25 @@ extern "C" {
  *   F_number_overflow (with error bit) on integer overflow.
  *   F_number_underflow (with error bit) on integer underflow.
  *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ * @see fl_conversion_dynamic_partial_to_hexidecimal_signed()
+ * @see fl_conversion_dynamic_partial_to_number_signed()
+ * @see fl_conversion_dynamic_to_hexidecimal_signed()
+ * @see fl_conversion_dynamic_to_number_signed()
  */
-#if !defined(_di_fl_conversion_string_to_binary_signed_) || !defined(_di_fl_conversion_string_to_number_signed_) || !(_di_fl_conversion_string_to_hexidecimal_signed_)
-  extern f_status_t private_fl_conversion_string_to_hexidecimal_signed(const f_string_t string, const f_string_range_t range, const bool negative, f_number_signed_t *number);
-#endif // !defined(_di_fl_conversion_string_to_binary_signed_) || !defined(_di_fl_conversion_string_to_number_signed_) || !(_di_fl_conversion_string_to_hexidecimal_signed_)
+#if !defined(_di_fl_conversion_dynamic_partial_to_hexidecimal_signed_) || !defined(_di_fl_conversion_dynamic_partial_to_number_signed_) || !defined(_di_fl_conversion_dynamic_to_hexidecimal_signed_) || !defined(_di_fl_conversion_dynamic_to_number_signed_)
+  extern f_status_t private_fl_conversion_dynamic_to_hexidecimal_signed(const f_string_t string, const f_array_length_t length, const bool negative, f_number_signed_t * const number) F_attribute_visibility_internal_d;
+#endif // !defined(_di_fl_conversion_dynamic_partial_to_hexidecimal_signed_) || !defined(_di_fl_conversion_dynamic_partial_to_number_signed_) || !defined(_di_fl_conversion_dynamic_to_hexidecimal_signed_) || !defined(_di_fl_conversion_dynamic_to_number_signed_)
 
 /**
- * Private implementation of fl_conversion_string_to_hexidecimal_unsigned().
+ * Private implementation of fl_conversion_dynamic_to_hexidecimal_unsigned().
  *
  * Intended to be shared to each of the different implementation variations.
  *
  * @param string
  *   The string to convert.
- * @param range
- *   The start/stop range to convert.
+ * @param length
+ *   The length of the string to convert.
  * @param number
  *   This will store the value of the converted string.
  *   This value is only changed on success.
@@ -230,20 +265,25 @@ extern "C" {
  *   F_number_decimal (with error bit) if number has a decimal digit.
  *   F_number_overflow (with error bit) on integer overflow.
  *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ * @see fl_conversion_dynamic_partial_to_hexidecimal_unsigned()
+ * @see fl_conversion_dynamic_partial_to_number_unsigned()
+ * @see fl_conversion_dynamic_to_hexidecimal_unsigned()
+ * @see fl_conversion_dynamic_to_number_unsigned()
  */
-#if !defined(_di_fl_conversion_string_to_binary_signed_) || !defined(_di_fl_conversion_string_to_number_signed_) || !(_di_fl_conversion_string_to_hexidecimal_unsigned_)
-  extern f_status_t private_fl_conversion_string_to_hexidecimal_unsigned(const f_string_t string, const f_string_range_t range, f_number_unsigned_t *number);
-#endif // !defined(_di_fl_conversion_string_to_binary_signed_) || !defined(_di_fl_conversion_string_to_number_signed_) || !(_di_fl_conversion_string_to_hexidecimal_unsigned_)
+#if !defined(_di_fl_conversion_dynamic_partial_to_hexidecimal_unsigned_) || !defined(_di_fl_conversion_dynamic_partial_to_number_unsigned_) || !defined(_di_fl_conversion_dynamic_to_hexidecimal_unsigned_) || !defined(_di_fl_conversion_dynamic_to_number_unsigned_)
+  extern f_status_t private_fl_conversion_dynamic_to_hexidecimal_unsigned(const f_string_t string, const f_array_length_t length, f_number_unsigned_t * const number) F_attribute_visibility_internal_d;
+#endif // !defined(_di_fl_conversion_dynamic_partial_to_hexidecimal_unsigned_) || !defined(_di_fl_conversion_dynamic_partial_to_number_unsigned_) || !defined(_di_fl_conversion_dynamic_to_hexidecimal_unsigned_) || !defined(_di_fl_conversion_dynamic_to_number_unsigned_)
 
 /**
- * Private implementation of fl_conversion_string_to_octal_signed().
+ * Private implementation of fl_conversion_dynamic_to_octal_signed().
  *
  * Intended to be shared to each of the different implementation variations.
  *
  * @param string
  *   The string to convert.
- * @param range
- *   The start/stop range to convert.
+ * @param length
+ *   The length of the string to convert.
  * @param negative
  *   Set to 0 to treat string as a positive number, 1 for as a negative number.
  * @param number
@@ -258,20 +298,25 @@ extern "C" {
  *   F_number_decimal (with error bit) if number has a decimal digit.
  *   F_number_overflow (with error bit) on integer overflow.
  *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ * @see fl_conversion_dynamic_partial_to_octal_signed()
+ * @see fl_conversion_dynamic_partial_to_number_signed()
+ * @see fl_conversion_dynamic_to_octal_signed()
+ * @see fl_conversion_dynamic_to_number_signed()
  */
-#if !defined(_di_fl_conversion_string_to_binary_signed_) || !defined(_di_fl_conversion_string_to_number_signed_) || !(_di_fl_conversion_string_to_octal_signed_)
-  extern f_status_t private_fl_conversion_string_to_octal_signed(const f_string_t string, const f_string_range_t range, const bool negative, f_number_signed_t *number);
-#endif // !defined(_di_fl_conversion_string_to_binary_signed_) || !defined(_di_fl_conversion_string_to_number_signed_) || !(_di_fl_conversion_string_to_octal_signed_)
+#if !defined(_di_fl_conversion_dynamic_partial_to_octal_signed_) || !defined(_di_fl_conversion_dynamic_partial_to_number_signed_) || !defined(_di_fl_conversion_dynamic_to_octal_signed_) || !defined(_di_fl_conversion_dynamic_to_number_signed_)
+  extern f_status_t private_fl_conversion_dynamic_to_octal_signed(const f_string_t string, const f_array_length_t length, const bool negative, f_number_signed_t * const number) F_attribute_visibility_internal_d;
+#endif // !defined(_di_fl_conversion_dynamic_partial_to_octal_signed_) || !defined(_di_fl_conversion_dynamic_partial_to_number_signed_) || !defined(_di_fl_conversion_dynamic_to_octal_signed_) || !defined(_di_fl_conversion_dynamic_to_number_signed_)
 
 /**
- * Private implementation of fl_conversion_string_to_octal_unsigned().
+ * Private implementation of fl_conversion_dynamic_to_octal_unsigned().
  *
  * Intended to be shared to each of the different implementation variations.
  *
  * @param string
  *   The string to convert.
- * @param range
- *   The start/stop range to convert.
+ * @param length
+ *   The length of the string to convert.
  * @param number
  *   This will store the value of the converted string.
  *   This value is only changed on success.
@@ -284,10 +329,74 @@ extern "C" {
  *   F_number_decimal (with error bit) if number has a decimal digit.
  *   F_number_overflow (with error bit) on integer overflow.
  *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ * @see fl_conversion_dynamic_partial_to_octal_unsigned()
+ * @see fl_conversion_dynamic_partial_to_number_unsigned()
+ * @see fl_conversion_dynamic_to_octal_unsigned()
+ * @see fl_conversion_dynamic_to_number_unsigned()
+ */
+#if !defined(_di_fl_conversion_dynamic_partial_to_octal_unsigned_) || !defined(_di_fl_conversion_dynamic_partial_to_number_unsigned_) || !defined(_di_fl_conversion_dynamic_to_octal_unsigned_) || !defined(_di_fl_conversion_dynamic_to_number_unsigned_)
+  extern f_status_t private_fl_conversion_dynamic_to_octal_unsigned(const f_string_t string, const f_array_length_t length, f_number_unsigned_t * const number) F_attribute_visibility_internal_d;
+#endif // !defined(_di_fl_conversion_dynamic_partial_to_octal_unsigned_) || !defined(_di_fl_conversion_dynamic_partial_to_number_unsigned_) || !defined(_di_fl_conversion_dynamic_to_octal_unsigned_) || !defined(_di_fl_conversion_dynamic_to_number_unsigned_)
+
+/**
+ * Private implementation of fl_conversion_dynamic_to_number_signed().
+ *
+ * Intended to be shared to each of the different implementation variations.
+ *
+ * @param string
+ *   The string to convert.
+ * @param length
+ *   The length of the string to convert.
+ * @param number
+ *   This will store the value of the converted string.
+ *   This value is only changed on success.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not if string starts with a null (length is 0).
+ *
+ *   F_complete_not_utf (with error bit) if an incomplete UTF-8 fragment is found.
+ *   F_number (with error bit) if parameter is not a number.
+ *   F_number_decimal (with error bit) if number has a decimal digit.
+ *   F_number_overflow (with error bit) on integer overflow.
+ *   F_number_underflow (with error bit) on integer underflow.
+ *   F_parameter (with error bit) if a parameter is invalid.
+ */
+#if !defined(_di_fl_conversion_dynamic_to_number_signed_) || !defined(_di_fl_conversion_dynamic_partial_to_number_signed_)
+  extern f_status_t private_fl_conversion_dynamic_to_number_signed(const f_string_t string, const f_array_length_t length, f_number_signed_t * const number) F_attribute_visibility_internal_d;
+#endif // !defined(_di_fl_conversion_dynamic_to_number_signed_) || !defined(_di_fl_conversion_dynamic_partial_to_number_signed_)
+
+/**
+ * Private implementation of fl_conversion_dynamic_to_number_unsigned().
+ *
+ * Intended to be shared to each of the different implementation variations.
+ *
+ * @param string
+ *   The string to convert.
+ * @param range
+ *   The start/stop range to convert.
+ * @param number
+ *   This will store the value of the converted string.
+ *   This value is only changed on success.
+ *
+ * @return
+ *   F_none on success.
+ *   F_data_not if string starts with a null (length is 0).
+ *
+ *   F_complete_not_utf (with error bit) if an incomplete UTF-8 fragment is found.
+ *   F_number (with error bit) if parameter is not a number.
+ *   F_number_decimal (with error bit) if number has a decimal digit.
+ *   F_number_negative (with error bit) on negative value.
+ *   F_number_positive (with error bit) on positive value (has a +, such as '+1', when only '1' is valid here).
+ *   F_number_overflow (with error bit) on integer overflow.
+ *   F_parameter (with error bit) if a parameter is invalid.
+ *
+ * @see strtoull()
  */
-#if !defined(_di_fl_conversion_string_to_binary_signed_) || !defined(_di_fl_conversion_string_to_number_signed_) || !(_di_fl_conversion_string_to_octal_unsigned_)
-  extern f_status_t private_fl_conversion_string_to_octal_unsigned(const f_string_t string, const f_string_range_t range, f_number_unsigned_t *number);
-#endif // !defined(_di_fl_conversion_string_to_binary_signed_) || !defined(_di_fl_conversion_string_to_number_signed_) || !(_di_fl_conversion_string_to_octal_unsigned_)
+#if !defined(_di_fl_conversion_dynamic_to_number_unsigned_) || !defined(_di_fl_conversion_dynamic_partial_to_number_unsigned_)
+  extern f_status_t private_fl_conversion_dynamic_to_number_unsigned(const f_string_t string, const f_array_length_t length, f_number_unsigned_t * const number) F_attribute_visibility_internal_d;
+#endif // !defined(_di_fl_conversion_dynamic_to_number_unsigned_) || !defined(_di_fl_conversion_dynamic_partial_to_number_unsigned_)
 
 #ifdef __cplusplus
 } // extern "C"
index bcb00946d1c6fc61286a936ee4aeb94e8b7a374e..2b9c76cd30a6c13d0bb27a580ad6ebceab4db961 100644 (file)
@@ -14,7 +14,7 @@
 #ifndef _FL_execute_h
 #define _FL_execute_h
 
-// include pre-requirements
+// Include pre-requirements.
 #define _GNU_SOURCE
 
 // Libc includes.
index 918ea451ce2ce8c05d4c2c40ceda83fde8df37fa..e86a8baa9eda39aa778b5cd03f79afdba9b463f5 100644 (file)
@@ -13,7 +13,7 @@
 #ifndef _FLL_execute_h
 #define _FLL_execute_h
 
-// include pre-requirements
+// Include pre-requirements.
 #define _GNU_SOURCE
 
 // Libc includes.
index e0aae3e9479dd7605e7b4f40cb4e6df272ef995d..011f20565025b8f89db96b1b39208027c7678a5e 100644 (file)
@@ -279,11 +279,9 @@ extern "C" {
 
       if (main->parameters.array[byte_dump_parameter_width_e].result == f_console_result_additional_e) {
         const f_array_length_t index = main->parameters.array[byte_dump_parameter_width_e].values.array[main->parameters.array[byte_dump_parameter_width_e].values.used - 1];
-        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(argv[index].string, range, &number);
+        status = fl_conversion_dynamic_to_number_unsigned(argv[index], &number);
 
         if (F_status_is_error(status) || number < 1 || number >= 0xfb) {
           flockfile(main->error.to.stream);
@@ -324,11 +322,9 @@ extern "C" {
 
       if (main->parameters.array[byte_dump_parameter_first_e].result == f_console_result_additional_e) {
         const f_array_length_t index = main->parameters.array[byte_dump_parameter_first_e].values.array[main->parameters.array[byte_dump_parameter_first_e].values.used - 1];
-        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(argv[index].string, range, &number);
+        status = fl_conversion_dynamic_to_number_unsigned(argv[index], &number);
 
         if (F_status_is_error(status) || number > F_number_t_size_unsigned_d) {
           flockfile(main->error.to.stream);
@@ -369,11 +365,9 @@ extern "C" {
 
       if (main->parameters.array[byte_dump_parameter_last_e].result == f_console_result_additional_e) {
         const f_array_length_t index = main->parameters.array[byte_dump_parameter_last_e].values.array[main->parameters.array[byte_dump_parameter_last_e].values.used - 1];
-        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(argv[index].string, range, &number);
+        status = fl_conversion_dynamic_to_number_unsigned(argv[index], &number);
 
         if (F_status_is_error(status) || number < 0 || number > F_number_t_size_unsigned_d) {
           flockfile(main->error.to.stream);
index 2677062f0e4e2fb2a0f903c464133628c5f10e19..e9c1a505921d86e5b194a5de63bf5e02e7bde9c2 100644 (file)
@@ -238,7 +238,7 @@ extern "C" {
         if (!isspace(pid_buffer.string[range.stop])) break;
       } // for
 
-      status = fl_conversion_string_to_decimal_unsigned(pid_buffer.string, range, &number);
+      status = fl_conversion_dynamic_partial_to_decimal_unsigned(pid_buffer, range, &number);
 
       if (F_status_is_error_not(status) && number == pid) {
         status = f_file_remove(path);
@@ -291,7 +291,7 @@ extern "C" {
         if (!isspace(pid_buffer.string[range.stop])) break;
       } // for
 
-      status = fl_conversion_string_to_decimal_unsigned(pid_buffer.string, range, &number);
+      status = fl_conversion_dynamic_partial_to_decimal_unsigned(pid_buffer, range, &number);
 
       if (F_status_is_error_not(status)) {
         *pid = (pid_t) number;
@@ -309,7 +309,7 @@ extern "C" {
 
     f_number_unsigned_t number = 0;
 
-    f_status_t status = fl_conversion_string_to_number_unsigned(buffer.string, range, &number);
+    f_status_t status = fl_conversion_dynamic_partial_to_number_unsigned(buffer, range, &number);
 
     if (F_status_is_error(status)) {
       if (F_status_set_fine(status) == F_number) {
@@ -344,7 +344,7 @@ extern "C" {
 
     f_number_unsigned_t number = 0;
 
-    f_status_t status = fl_conversion_string_to_number_unsigned(buffer.string, range, &number);
+    f_status_t status = fl_conversion_dynamic_partial_to_number_unsigned(buffer, range, &number);
 
     if (F_status_is_error(status)) {
       if (F_status_set_fine(status) == F_number) {
index 01e254198138f7ab6ce919ed9c96cd927ac91258..52ad1cbbc9d16b61ade8c2f24e08bcb7369e0488 100644 (file)
@@ -172,7 +172,7 @@ extern "C" {
  *   Errors (with error bit) from: f_file_stream_close().
  *   Errors (with error bit) from: f_file_stream_open().
  *   Errors (with error bit) from: f_file_stream_read().
- *   Errors (with error bit) from: fl_conversion_string_to_decimal_unsigned()
+ *   Errors (with error bit) from: fl_conversion_dynamic_partial_to_decimal_unsigned()
  */
 #ifndef _di_controller_file_pid_delete_
   f_status_t controller_file_pid_delete(const pid_t pid, const f_string_static_t path) F_attribute_visibility_internal_d;
@@ -192,7 +192,7 @@ extern "C" {
  *   Errors (with error bit) from: f_file_stream_close().
  *   Errors (with error bit) from: f_file_stream_open().
  *   Errors (with error bit) from: f_file_stream_read().
- *   Errors (with error bit) from: fl_conversion_string_to_decimal_unsigned()
+ *   Errors (with error bit) from: fl_conversion_dynamic_partial_to_decimal_unsigned()
  */
 #ifndef _di_controller_file_pid_read_
   f_status_t controller_file_pid_read(const f_string_static_t path, pid_t * const pid) F_attribute_visibility_internal_d;
@@ -216,10 +216,10 @@ extern "C" {
  *   F_number_too_large (with error bit) if the given ID is too large.
  *
  *   Errors (with error bit) from: f_account_id_by_name().
- *   Errors (with error bit) from: fl_conversion_string_to_number_unsigned().
+ *   Errors (with error bit) from: fl_conversion_dynamic_partial_to_number_unsigned().
  *
  * @see f_account_id_by_name()
- * @see fl_conversion_string_to_number_unsigned()
+ * @see fl_conversion_dynamic_partial_to_number_unsigned()
  */
 #ifndef _di_controller_get_id_user_
   f_status_t controller_get_id_user(const f_string_static_t buffer, const f_string_range_t range, controller_cache_t * const cache, uid_t * const id) F_attribute_visibility_internal_d;
@@ -243,10 +243,10 @@ extern "C" {
  *   F_number_too_large (with error bit) if the given ID is too large.
  *
  *   Errors (with error bit) from: f_account_group_id_by_name().
- *   Errors (with error bit) from: fl_conversion_string_to_number_unsigned().
+ *   Errors (with error bit) from: fl_conversion_dynamic_partial_to_number_unsigned().
  *
  * @see f_account_group_id_by_name()
- * @see fl_conversion_string_to_number_unsigned()
+ * @see fl_conversion_dynamic_partial_to_number_unsigned()
  */
 #ifndef _di_controller_get_id_group_
   f_status_t controller_get_id_group(const f_string_static_t buffer, const f_string_range_t range, controller_cache_t * const cache, gid_t * const id) F_attribute_visibility_internal_d;
index f835858b718d864f2a34f265d2209bcb0fcdc39f..49f548e8939223764209804948b51fe336baa632 100644 (file)
@@ -591,9 +591,7 @@ extern "C" {
             }
 
             if (action->status == F_none) {
-              const f_string_range_t range = macro_f_string_range_t_initialize(action->parameters.array[1].used);
-
-              status = fl_conversion_string_to_number_unsigned(action->parameters.array[1].string, range, &action->number);
+              status = fl_conversion_dynamic_to_number_unsigned(action->parameters.array[1], &action->number);
 
               if (F_status_is_error(status) || status == F_data_not) {
                 action->number = 0;
@@ -606,9 +604,10 @@ extern "C" {
                 }
 
                 if (F_status_set_fine(status) == F_memory_not) {
-                  controller_entry_print_error(is_entry, global.main->error, cache->action, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true, global.thread);
+                  controller_entry_print_error(is_entry, global.main->error, cache->action, F_status_set_fine(status), "fl_conversion_dynamic_to_number_unsigned", F_true, global.thread);
 
                   status_action = status;
+
                   break;
                 }
 
index 03cb8e13b3d7b7e6540652d53058075aa9db2dc2..2e45f1bf5ccf172761a7fff3cc68ef14834d87d3 100644 (file)
@@ -691,10 +691,10 @@ extern "C" {
       status = F_status_set_error(F_valid_not);
     }
     else {
-      status = fl_conversion_string_to_number_signed(cache->buffer_item.string, cache->content_action.array[++(*index)], &parsed);
+      status = fl_conversion_dynamic_partial_to_number_signed(cache->buffer_item, cache->content_action.array[++(*index)], &parsed);
 
       if (F_status_set_fine(status) == F_number_positive) {
-        status = fl_conversion_string_to_number_signed(cache->buffer_item.string, controller_range_after_number_sign(cache->buffer_item, cache->content_action.array[*index]), &parsed);
+        status = fl_conversion_dynamic_partial_to_number_signed(cache->buffer_item, controller_range_after_number_sign(cache->buffer_item, cache->content_action.array[*index]), &parsed);
       }
 
       if (status == F_data_not) {
@@ -3720,10 +3720,10 @@ extern "C" {
             break;
           }
 
-          status = fl_conversion_string_to_number_signed(cache->buffer_item.string, cache->content_actions.array[i].array[j], &number);
+          status = fl_conversion_dynamic_partial_to_number_signed(cache->buffer_item, cache->content_actions.array[i].array[j], &number);
 
           if (F_status_set_fine(status) == F_number_positive) {
-            status = fl_conversion_string_to_number_signed(cache->buffer_item.string, controller_range_after_number_sign(cache->buffer_item, cache->content_actions.array[i].array[j]), &number);
+            status = fl_conversion_dynamic_partial_to_number_signed(cache->buffer_item, controller_range_after_number_sign(cache->buffer_item, cache->content_actions.array[i].array[j]), &number);
 
             // Restore error on parameter problem.
             if (F_status_set_fine(status) == F_parameter) {
@@ -3752,7 +3752,7 @@ extern "C" {
               }
             }
             else {
-              controller_rule_print_error(global.thread, global.main->error, cache->action, F_status_set_fine(status), "fl_conversion_string_to_number_signed", F_true, F_false);
+              controller_rule_print_error(global.thread, global.main->error, cache->action, F_status_set_fine(status), "fl_conversion_dynamic_partial_to_number_signed", F_true, F_false);
 
               status = F_status_set_error(status);
 
@@ -4113,10 +4113,10 @@ extern "C" {
 
         for (j = 1; j < 3; ++j, number = 0) {
 
-          status = fl_conversion_string_to_number_signed(cache->buffer_item.string, cache->content_actions.array[i].array[j], &number);
+          status = fl_conversion_dynamic_partial_to_number_signed(cache->buffer_item, cache->content_actions.array[i].array[j], &number);
 
           if (F_status_set_fine(status) == F_number_positive) {
-            status = fl_conversion_string_to_number_signed(cache->buffer_item.string, controller_range_after_number_sign(cache->buffer_item, cache->content_actions.array[i].array[j]), &number);
+            status = fl_conversion_dynamic_partial_to_number_signed(cache->buffer_item, controller_range_after_number_sign(cache->buffer_item, cache->content_actions.array[i].array[j]), &number);
 
             // Restore error on parameter problem.
             if (F_status_set_fine(status) == F_parameter) {
@@ -4145,7 +4145,7 @@ extern "C" {
               }
             }
             else {
-              controller_rule_print_error(global.thread, global.main->error, cache->action, F_status_set_fine(status), "fl_conversion_string_to_number_signed", F_true, F_false);
+              controller_rule_print_error(global.thread, global.main->error, cache->action, F_status_set_fine(status), "fl_conversion_dynamic_partial_to_number_signed", F_true, F_false);
 
               status = F_status_set_error(status);
 
@@ -4357,10 +4357,10 @@ extern "C" {
 
           f_number_signed_t number = 0;
 
-          status = fl_conversion_string_to_number_signed(cache->buffer_item.string, cache->content_actions.array[i].array[1], &number);
+          status = fl_conversion_dynamic_partial_to_number_signed(cache->buffer_item, cache->content_actions.array[i].array[1], &number);
 
           if (F_status_set_fine(status) == F_number_positive) {
-            status = fl_conversion_string_to_number_signed(cache->buffer_item.string, controller_range_after_number_sign(cache->buffer_item, cache->content_actions.array[i].array[1]), &number);
+            status = fl_conversion_dynamic_partial_to_number_signed(cache->buffer_item, controller_range_after_number_sign(cache->buffer_item, cache->content_actions.array[i].array[1]), &number);
 
             // Restore error on parameter problem.
             if (F_status_set_fine(status) == F_parameter) {
@@ -4407,7 +4407,7 @@ extern "C" {
               }
             }
             else {
-              controller_rule_print_error(global.thread, global.main->error, cache->action, status, "fl_conversion_string_to_number_signed", F_true, F_false);
+              controller_rule_print_error(global.thread, global.main->error, cache->action, status, "fl_conversion_dynamic_partial_to_number_signed", F_true, F_false);
               status = F_status_set_error(status);
 
               if (F_status_is_error_not(status_return)) {
@@ -4479,10 +4479,10 @@ extern "C" {
 
         f_number_unsigned_t number = 0;
 
-        status = fl_conversion_string_to_number_unsigned(cache->buffer_item.string, cache->content_actions.array[i].array[1], &number);
+        status = fl_conversion_dynamic_partial_to_number_unsigned(cache->buffer_item, cache->content_actions.array[i].array[1], &number);
 
         if (F_status_set_fine(status) == F_number_positive) {
-          status = fl_conversion_string_to_number_unsigned(cache->buffer_item.string, controller_range_after_number_sign(cache->buffer_item, cache->content_actions.array[i].array[1]), &number);
+          status = fl_conversion_dynamic_partial_to_number_unsigned(cache->buffer_item, controller_range_after_number_sign(cache->buffer_item, cache->content_actions.array[i].array[1]), &number);
 
           // Restore error on parameter problem.
           if (F_status_set_fine(status) == F_parameter) {
@@ -4507,7 +4507,7 @@ extern "C" {
 
             cache->action.line_action = ++cache->action.line_item;
 
-            controller_rule_print_error(global.thread, global.main->error, cache->action, status, "fl_conversion_string_to_number_signed", F_true, F_false);
+            controller_rule_print_error(global.thread, global.main->error, cache->action, status, "fl_conversion_dynamic_partial_to_number_signed", F_true, F_false);
           }
 
           if (F_status_is_error_not(status_return)) {
@@ -4633,10 +4633,10 @@ extern "C" {
         else if (type == controller_rule_setting_type_nice_e) {
           f_number_signed_t number = 0;
 
-          status = fl_conversion_string_to_number_signed(cache->buffer_item.string, cache->content_actions.array[i].array[0], &number);
+          status = fl_conversion_dynamic_partial_to_number_signed(cache->buffer_item, cache->content_actions.array[i].array[0], &number);
 
           if (F_status_set_fine(status) == F_number_positive) {
-            status = fl_conversion_string_to_number_signed(cache->buffer_item.string, controller_range_after_number_sign(cache->buffer_item, cache->content_actions.array[i].array[0]), &number);
+            status = fl_conversion_dynamic_partial_to_number_signed(cache->buffer_item, controller_range_after_number_sign(cache->buffer_item, cache->content_actions.array[i].array[0]), &number);
 
             // Restore error on parameter problem.
             if (F_status_set_fine(status) == F_parameter) {
@@ -4676,7 +4676,7 @@ extern "C" {
               }
             }
             else {
-              controller_rule_print_error(global.thread, global.main->error, cache->action, status, "fl_conversion_string_to_number_signed", F_true, F_false);
+              controller_rule_print_error(global.thread, global.main->error, cache->action, status, "fl_conversion_dynamic_partial_to_number_signed", F_true, F_false);
               status = F_status_set_error(status);
 
               if (F_status_is_error_not(status_return)) {
index 2384a29303ac07c5a659bf400e5ed3841d3c8073..383d5b1500e0e5bf4bb43d928fa9150d31135271 100644 (file)
@@ -667,10 +667,10 @@ extern "C" {
  *
  *   F_valid_not (with error bit) on failure due to invalid value.
  *
- *   Errors (with error bit) from: fl_conversion_string_to_number_signed().
+ *   Errors (with error bit) from: fl_conversion_dynamic_partial_to_number_signed().
  *
  * @see controller_rule_action_read()
- * @see fl_conversion_string_to_number_signed()
+ * @see fl_conversion_dynamic_partial_to_number_signed()
  */
 #ifndef _di_controller_rule_action_read_rerun_number_
   extern f_status_t controller_rule_action_read_rerun_number(const controller_global_t global, const f_string_t name, controller_cache_t * const cache, f_array_length_t * const index, f_number_unsigned_t * const number) F_attribute_visibility_internal_d;
index 38ae4db3f95a11fc5423803fbbe99e311bbdd32b..31eac131f0690c41833a3eddbed1e57f55f265aa 100644 (file)
@@ -653,7 +653,7 @@ extern "C" {
       status = F_status_set_error(F_failure);
     }
     else {
-      status = fl_conversion_string_to_number_unsigned(arguments.array[i].string, range, &number_left);
+      status = fl_conversion_dynamic_partial_to_number_unsigned(arguments.array[i], range, &number_left);
     }
 
     if (F_status_is_error_not(status)) {
@@ -677,7 +677,7 @@ extern "C" {
             status = F_status_set_error(F_failure);
           }
           else {
-            status = fl_conversion_string_to_number_unsigned(arguments.array[i].string, range, &number_right);
+            status = fl_conversion_dynamic_partial_to_number_unsigned(arguments.array[i], range, &number_right);
           }
         }
         else {
index 4be8a1410dadd72069794a189db2832a7fa4ac33..bdc1ed4de0b5c29ab34a6d61bd4473de29caed6f 100644 (file)
@@ -166,9 +166,9 @@ extern "C" {
  * @return
  *   F_none on success.
  *
- *   Errors (with error bit) from: fl_conversion_string_to_number_unsigned().
+ *   Errors (with error bit) from: fl_conversion_dynamic_partial_to_number_unsigned().
  *
- * @see fl_conversion_string_to_number_unsigned()
+ * @see fl_conversion_dynamic_partial_to_number_unsigned()
  */
 #ifndef _di_fake_make_operate_process_type_if_greater_if_lesser_
   extern f_status_t fake_make_operate_process_type_if_greater_if_lesser(fake_make_data_t * const data_make, const f_string_dynamics_t arguments, fake_state_process_t *state_process) F_attribute_visibility_internal_d;
index 6d4d7f5a002b8c022b49651d816d402bb856a0c7..60132f52fa23c37a5c36211b944490ac0a4d40d0 100644 (file)
@@ -1016,7 +1016,7 @@ extern "C" {
                   status_number = F_status_set_error(F_failure);
                 }
                 else {
-                  status_number = fl_conversion_string_to_number_unsigned(arguments.array[i].string, range, &number);
+                  status_number = fl_conversion_dynamic_partial_to_number_unsigned(arguments.array[i], range, &number);
                 }
               }
               else {
index 464ad4576a7df8438132fa4c18aa97685092ac35..615614048e4d23b6f90a296b72750f78e1bc1849 100644 (file)
@@ -50,11 +50,9 @@ extern "C" {
 #ifndef _di_fake_make_get_id_group_
   f_status_t fake_make_get_id_group(fake_main_t * const main, const fl_print_t print, const f_string_static_t buffer, gid_t *id) {
 
-    const f_string_range_t range = macro_f_string_range_t_initialize(buffer.used);
-
     f_number_unsigned_t number = 0;
 
-    f_status_t status = fl_conversion_string_to_number_unsigned(buffer.string, range, &number);
+    f_status_t status = fl_conversion_dynamic_to_number_unsigned(buffer, &number);
 
     if (F_status_is_error(status)) {
       status = F_status_set_fine(status);
@@ -84,7 +82,7 @@ extern "C" {
         return F_none;
       }
 
-      fll_error_print(print, F_status_set_fine(status), "fl_conversion_string_to_number_unsigned", F_true);
+      fll_error_print(print, F_status_set_fine(status), "fl_conversion_dynamic_to_number_unsigned", F_true);
       return F_status_set_error(status);
     }
     else if (number > F_type_size_32_unsigned_d) {
@@ -141,11 +139,9 @@ extern "C" {
 #ifndef _di_fake_make_get_id_owner_
   f_status_t fake_make_get_id_owner(fake_main_t * const main, const fl_print_t print, const f_string_static_t buffer, uid_t *id) {
 
-    const f_string_range_t range = macro_f_string_range_t_initialize(buffer.used);
-
     f_number_unsigned_t number = 0;
 
-    f_status_t status = fl_conversion_string_to_number_unsigned(buffer.string, range, &number);
+    f_status_t status = fl_conversion_dynamic_to_number_unsigned(buffer, &number);
 
     if (F_status_is_error(status)) {
       status = F_status_set_fine(status);
@@ -175,7 +171,7 @@ extern "C" {
         return F_none;
       }
 
-      fll_error_print(print, status, "fl_conversion_string_to_number_unsigned", F_true);
+      fll_error_print(print, status, "fl_conversion_dynamic_to_number_unsigned", F_true);
       return F_status_set_error(status);
     }
     else if (number > F_type_size_32_unsigned_d) {
index 91636e452b55f5a2b64adebdec20febd1cd7eedb..47abaf5779225bd260f61e494ac74264419b117f 100644 (file)
@@ -463,10 +463,10 @@ extern "C" {
               ++range.start;
             }
 
-            status = fl_conversion_string_to_number_unsigned(data.argv[index].string, range, &data.delimit_depth);
+            status = fl_conversion_dynamic_partial_to_number_unsigned(data.argv[index], 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, data.argv[index]);
+              fll_error_parameter_integer_print(main->error, F_status_set_fine(status), "fl_conversion_dynamic_partial_to_number_unsigned", F_true, fss_basic_list_read_long_delimit_s, data.argv[index]);
 
               break;
             }
index aab60ae79909ad19a581622703705c011ed9f4fb..50c0c72216bfe5b9126da0c346d3297af7ed6c75 100644 (file)
@@ -108,12 +108,10 @@ 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(data->argv[position_depth].used);
-
-        status = fl_conversion_string_to_number_unsigned(data->argv[position_depth].string, range, &data->depths.array[i].depth);
+        status = fl_conversion_dynamic_to_number_unsigned(data->argv[position_depth], &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, data->argv[position_depth]);
+          fll_error_parameter_integer_print(main->error, F_status_set_fine(status), "fl_conversion_dynamic_to_number_unsigned", F_true, fss_basic_list_read_long_depth_s, data->argv[position_depth]);
 
           return status;
         }
@@ -132,12 +130,10 @@ 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(data->argv[data->depths.array[i].index_at].used);
-
-          status = fl_conversion_string_to_number_unsigned(data->argv[data->depths.array[i].index_at].string, range, &data->depths.array[i].value_at);
+          status = fl_conversion_dynamic_to_number_unsigned(data->argv[data->depths.array[i].index_at], &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, data->argv[data->depths.array[i].index_at]);
+            fll_error_parameter_integer_print(main->error, F_status_set_fine(status), "fl_conversion_dynamic_to_number_unsigned", F_true, fss_basic_list_read_long_at_s, data->argv[data->depths.array[i].index_at]);
 
             return status;
           }
@@ -284,12 +280,11 @@ 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(data->argv[index].used);
 
-      const f_status_t status = fl_conversion_string_to_number_unsigned(data->argv[index].string, range, number);
+      const f_status_t status = fl_conversion_dynamic_to_number_unsigned(data->argv[index], 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, data->argv[index]);
+        fll_error_parameter_integer_print(main->error, F_status_set_fine(status), "fl_conversion_dynamic_to_number_unsigned", F_true, name, data->argv[index]);
 
         return status;
       }
index 3a21d7b3add5f52118bbd8edc3bd517843e0d960..9f329a3ea4ac50328d8915271df14be428c80d0e 100644 (file)
@@ -61,13 +61,13 @@ extern "C" {
  *
  *   Errors (with error bit) from: f_string_append().
  *   Errors (with error bit) from: fl_string_rip().
- *   Errors (with error bit) from: fl_conversion_string_to_number_unsigned().
+ *   Errors (with error bit) from: fl_conversion_dynamic_partial_to_number_unsigned().
  *
  *   Errors (with error bit) from: fss_basic_list_read_depths_resize().
  *
  * @see f_string_append()
  * @see fl_string_rip()
- * @see fl_conversion_string_to_number_unsigned()
+ * @see fl_conversion_dynamic_partial_to_number_unsigned()
  *
  * @see fss_basic_list_read_depths_resize()
  */
@@ -139,9 +139,9 @@ extern "C" {
  *   F_true on success and the parameter was found (and is valid).
  *   F_false on success and the parameter was not found.
  *
- *   Errors (with error bit) from: fl_conversion_string_to_number_unsigned().
+ *   Errors (with error bit) from: fl_conversion_dynamic_partial_to_number_unsigned().
  *
- * @see fl_conversion_string_to_number_unsigned()
+ * @see fl_conversion_dynamic_partial_to_number_unsigned()
  *
  * @see fss_basic_list_read_depths_resize()
  */
index 46aba998e4f29f6b993a1abd73d11d2039e8ed5e..b5ff87e176602e267174d1a5cb9f85824840d4ef 100644 (file)
@@ -458,10 +458,10 @@ extern "C" {
               ++range.start;
             }
 
-            status = fl_conversion_string_to_number_unsigned(data.argv[index].string, range, &data.delimit_depth);
+            status = fl_conversion_dynamic_partial_to_number_unsigned(data.argv[index], 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, data.argv[index]);
+              fll_error_parameter_integer_print(main->error, F_status_set_fine(status), "fl_conversion_dynamic_partial_to_number_unsigned", F_true, fss_basic_read_long_delimit_s, data.argv[index]);
 
               break;
             }
index 101a308363ac3c924d6b83e76b7500e547424d4f..3a2f381a03102577f6f7d7dcd7e417e926c60b6e 100644 (file)
@@ -80,12 +80,10 @@ 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(data->argv[position_depth].used);
-
-        status = fl_conversion_string_to_number_unsigned(data->argv[position_depth].string, range, &data->depths.array[i].depth);
+        status = fl_conversion_dynamic_to_number_unsigned(data->argv[position_depth], &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, data->argv[position_depth]);
+          fll_error_parameter_integer_print(main->error, F_status_set_fine(status), "fl_conversion_dynamic_to_number_unsigned", F_true, fss_basic_read_long_depth_s, data->argv[position_depth]);
 
           return status;
         }
@@ -104,12 +102,10 @@ 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(data->argv[data->depths.array[i].index_at].used);
-
-          status = fl_conversion_string_to_number_unsigned(data->argv[data->depths.array[i].index_at].string, range, &data->depths.array[i].value_at);
+          status = fl_conversion_dynamic_to_number_unsigned(data->argv[data->depths.array[i].index_at], &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, data->argv[data->depths.array[i].index_at]);
+            fll_error_parameter_integer_print(main->error, F_status_set_fine(status), "fl_conversion_dynamic_to_number_unsigned", F_true, fss_basic_read_long_at_s, data->argv[data->depths.array[i].index_at]);
 
             return status;
           }
@@ -250,12 +246,11 @@ 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(data->argv[index].used);
 
-      const f_status_t status = fl_conversion_string_to_number_unsigned(data->argv[index].string, range, number);
+      const f_status_t status = fl_conversion_dynamic_to_number_unsigned(data->argv[index], 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, data->argv[index]);
+        fll_error_parameter_integer_print(main->error, F_status_set_fine(status), "fl_conversion_dynamic_to_number_unsigned", F_true, name, data->argv[index]);
 
         return status;
       }
index d3a15ac7501ff08d0e53bd909049b9e11ce446fb..44fc1b0692006dc953198ca9ad2a008632349a3b 100644 (file)
@@ -45,13 +45,13 @@ extern "C" {
  *
  *   Errors (with error bit) from: f_string_append().
  *   Errors (with error bit) from: fl_string_rip().
- *   Errors (with error bit) from: fl_conversion_string_to_number_unsigned().
+ *   Errors (with error bit) from: fl_conversion_dynamic_partial_to_number_unsigned().
  *
  *   Errors (with error bit) from: fss_basic_read_depths_resize().
  *
  * @see f_string_append()
  * @see fl_string_rip()
- * @see fl_conversion_string_to_number_unsigned()
+ * @see fl_conversion_dynamic_partial_to_number_unsigned()
  *
  * @see fss_basic_read_depths_resize()
  */
@@ -123,9 +123,9 @@ extern "C" {
  *   F_true on success and the parameter was found (and is valid).
  *   F_false on success and the parameter was not found.
  *
- *   Errors (with error bit) from: fl_conversion_string_to_number_unsigned().
+ *   Errors (with error bit) from: fl_conversion_dynamic_partial_to_number_unsigned().
  *
- * @see fl_conversion_string_to_number_unsigned()
+ * @see fl_conversion_dynamic_partial_to_number_unsigned()
  *
  * @see fss_basic_read_depths_resize()
  */
index c697762c47b27ea27bd59cd3e1de585182d2f708..c46efe7533c42e3a66e6ef59376ee11b5d7cf79b 100644 (file)
@@ -381,10 +381,10 @@ extern "C" {
               ++range.start;
             }
 
-            status = fl_conversion_string_to_number_unsigned(argv[index].string, range, &main->delimit_depth);
+            status = fl_conversion_dynamic_partial_to_number_unsigned(argv[index], 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, argv[index]);
+              fll_error_parameter_integer_print(main->error, F_status_set_fine(status), "fl_conversion_dynamic_partial_to_number_unsigned", F_true, fss_embedded_list_read_long_delimit_s, argv[index]);
             }
           }
         }
index 7c3dd54172a464b52dd08da9aefd53fdb479b532..feeb544682258d54a09c1fa07dbd2873ae9d1b1a 100644 (file)
@@ -134,12 +134,10 @@ 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(argv[values_order[i]].used);
-
-          status = fl_conversion_string_to_number_unsigned(argv[values_order[i]].string, range, &number);
+          status = fl_conversion_dynamic_to_number_unsigned(argv[values_order[i]], &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, argv[values_order[i]]);
+            fll_error_parameter_integer_print(main->error, F_status_set_fine(status), "fl_conversion_dynamic_to_number_unsigned", F_true, fss_embedded_list_read_long_depth_s, argv[values_order[i]]);
 
             return status;
           }
@@ -302,12 +300,11 @@ 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(main->parameters.arguments.array[index].used);
 
-        status = fl_conversion_string_to_number_unsigned(main->parameters.arguments.array[index].string, range, &select);
+        status = fl_conversion_dynamic_to_number_unsigned(main->parameters.arguments.array[index], &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, main->parameters.arguments.array[index]);
+          fll_error_parameter_integer_print(main->error, F_status_set_fine(status), "fl_conversion_dynamic_to_number_unsigned", F_true, fss_embedded_list_read_long_select_s, main->parameters.arguments.array[index]);
 
           return status;
         }
@@ -323,12 +320,11 @@ 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(main->parameters.arguments.array[index].used);
 
-      status = fl_conversion_string_to_number_unsigned(main->parameters.arguments.array[index].string, range, &line);
+      status = fl_conversion_dynamic_to_number_unsigned(main->parameters.arguments.array[index], &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, main->parameters.arguments.array[index]);
+        fll_error_parameter_integer_print(main->error, F_status_set_fine(status), "fl_conversion_dynamic_to_number_unsigned", F_true, fss_embedded_list_read_long_line_s, main->parameters.arguments.array[index]);
 
         return status;
       }
index 5539572658515ffc75a511b927d3b9c0a132b655..9ea6f9f3ac4ec96505af79a96eb160a3a201d442 100644 (file)
@@ -419,10 +419,10 @@ extern "C" {
         range.start = 1;
       }
 
-      status = fl_conversion_string_to_number_unsigned(argv[index].string, range, &number);
+      status = fl_conversion_dynamic_partial_to_number_unsigned(argv[index], 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, argv[index]);
+        fll_error_parameter_integer_print(main->error, F_status_set_fine(status), "fl_conversion_dynamic_partial_to_number_unsigned", F_true, fss_embedded_list_write_long_ignore_s, argv[index]);
 
         return status;
       }
@@ -439,10 +439,10 @@ extern "C" {
         range.start = 1;
       }
 
-      status = fl_conversion_string_to_number_unsigned(argv[index].string, range, &number);
+      status = fl_conversion_dynamic_partial_to_number_unsigned(argv[index], 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, argv[index]);
+        fll_error_parameter_integer_print(main->error, F_status_set_fine(status), "fl_conversion_dynamic_partial_to_number_unsigned", F_true, fss_embedded_list_write_long_ignore_s, argv[index]);
 
         return status;
       }
index aa21681fc04277bff1ff4935400079279867c098..3627f9565d2708156c620893bf060c983c5eaa59 100644 (file)
@@ -458,10 +458,10 @@ extern "C" {
               ++range.start;
             }
 
-            status = fl_conversion_string_to_number_unsigned(data.argv[index].string, range, &data.delimit_depth);
+            status = fl_conversion_dynamic_partial_to_number_unsigned(data.argv[index], 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, data.argv[index]);
+              fll_error_parameter_integer_print(main->error, F_status_set_fine(status), "fl_conversion_dynamic_partial_to_number_unsigned", F_true, fss_extended_list_read_long_delimit_s, data.argv[index]);
 
               break;
             }
index 43d4dc58db5237433e8f45a3ecb8347121385780..e36c7802449db276b214a1bb837a3bba0e1821fd 100644 (file)
@@ -103,12 +103,10 @@ 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(data->argv[position_depth].used);
-
-        status = fl_conversion_string_to_number_unsigned(data->argv[position_depth].string, range, &data->depths.array[i].depth);
+        status = fl_conversion_dynamic_to_number_unsigned(data->argv[position_depth], &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, data->argv[position_depth]);
+          fll_error_parameter_integer_print(main->error, F_status_set_fine(status), "fl_conversion_dynamic_to_number_unsigned", F_true, fss_extended_list_read_long_depth_s, data->argv[position_depth]);
 
           return status;
         }
@@ -127,12 +125,10 @@ 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(data->argv[data->depths.array[i].index_at].used);
-
-          status = fl_conversion_string_to_number_unsigned(data->argv[data->depths.array[i].index_at].string, range, &data->depths.array[i].value_at);
+          status = fl_conversion_dynamic_to_number_unsigned(data->argv[data->depths.array[i].index_at], &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, data->argv[data->depths.array[i].index_at]);
+            fll_error_parameter_integer_print(main->error, F_status_set_fine(status), "fl_conversion_dynamic_to_number_unsigned", F_true, fss_extended_list_read_long_at_s, data->argv[data->depths.array[i].index_at]);
 
             return status;
           }
@@ -272,12 +268,11 @@ 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(data->argv[index].used);
 
-      const f_status_t status = fl_conversion_string_to_number_unsigned(data->argv[index].string, range, number);
+      const f_status_t status = fl_conversion_dynamic_to_number_unsigned(data->argv[index], 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, data->argv[index]);
+        fll_error_parameter_integer_print(main->error, F_status_set_fine(status), "fl_conversion_dynamic_to_number_unsigned", F_true, name, data->argv[index]);
 
         return status;
       }
index 15a3230ae6f8e48207e364fdd9fcd7a68a3d6077..512c39d63553fa928281cff03a84cd6463076f46 100644 (file)
@@ -59,13 +59,13 @@ extern "C" {
  *
  *   Errors (with error bit) from: f_string_append().
  *   Errors (with error bit) from: fl_string_rip().
- *   Errors (with error bit) from: fl_conversion_string_to_number_unsigned().
+ *   Errors (with error bit) from: fl_conversion_dynamic_partial_to_number_unsigned().
  *
  *   Errors (with error bit) from: fss_extended_list_read_depths_resize().
  *
  * @see f_string_append()
  * @see fl_string_rip()
- * @see fl_conversion_string_to_number_unsigned()
+ * @see fl_conversion_dynamic_partial_to_number_unsigned()
  *
  * @see fss_extended_list_read_depths_resize()
  */
@@ -137,9 +137,9 @@ extern "C" {
  *   F_true on success and the parameter was found (and is valid).
  *   F_false on success and the parameter was not found.
  *
- *   Errors (with error bit) from: fl_conversion_string_to_number_unsigned().
+ *   Errors (with error bit) from: fl_conversion_dynamic_partial_to_number_unsigned().
  *
- * @see fl_conversion_string_to_number_unsigned()
+ * @see fl_conversion_dynamic_partial_to_number_unsigned()
  *
  * @see fss_extended_list_read_depths_resize()
  */
index 47dbf96d89869251c6ec8b427e494673c312e4e8..9e70d7cde71ad5d7bcd1b825c3c03b2b88c0351a 100644 (file)
@@ -416,10 +416,10 @@ extern "C" {
         range.start = 1;
       }
 
-      status = fl_conversion_string_to_number_unsigned(argv[index].string, range, &number);
+      status = fl_conversion_dynamic_partial_to_number_unsigned(argv[index], 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, argv[index]);
+        fll_error_parameter_integer_print(main->error, F_status_set_fine(status), "fl_conversion_dynamic_partial_to_number_unsigned", F_true, fss_extended_list_write_long_ignore_s, argv[index]);
 
         return status;
       }
@@ -436,10 +436,10 @@ extern "C" {
         range.start = 1;
       }
 
-      status = fl_conversion_string_to_number_unsigned(argv[index].string, range, &number);
+      status = fl_conversion_dynamic_partial_to_number_unsigned(argv[index], 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, argv[index]);
+        fll_error_parameter_integer_print(main->error, F_status_set_fine(status), "fl_conversion_dynamic_partial_to_number_unsigned", F_true, fss_extended_list_write_long_ignore_s, argv[index]);
 
         return status;
       }
index 752829ab0319566dff304919fc1f102991a1627d..cb9d489c40c0fc9f602e16394758b0c77a8283dd 100644 (file)
@@ -461,10 +461,10 @@ extern "C" {
               ++range.start;
             }
 
-            status = fl_conversion_string_to_number_unsigned(data.argv[index].string, range, &data.delimit_depth);
+            status = fl_conversion_dynamic_partial_to_number_unsigned(data.argv[index], 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, data.argv[index]);
+              fll_error_parameter_integer_print(main->error, F_status_set_fine(status), "fl_conversion_dynamic_partial_to_number_unsigned", F_true, fss_extended_read_long_delimit_s, data.argv[index]);
 
               break;
             }
index b653b46b88d11adf8862f89458967a9bc16b7c8c..13889d9336cfa7e9c49598f3983ad0732372d592 100644 (file)
@@ -112,12 +112,10 @@ extern "C" {
       else {
         position_depth = main->parameters.array[fss_extended_read_parameter_depth_e].values.array[i];
 
-        const f_string_range_t range = macro_f_string_range_t_initialize(data->argv[position_depth].used);
-
-        status = fl_conversion_string_to_number_unsigned(data->argv[position_depth].string, range, &data->depths.array[i].depth);
+        status = fl_conversion_dynamic_to_number_unsigned(data->argv[position_depth], &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_read_long_depth_s, data->argv[position_depth]);
+          fll_error_parameter_integer_print(main->error, F_status_set_fine(status), "fl_conversion_dynamic_to_number_unsigned", F_true, fss_extended_read_long_depth_s, data->argv[position_depth]);
 
           return status;
         }
@@ -136,12 +134,10 @@ extern "C" {
 
           data->depths.array[i].index_at = main->parameters.array[fss_extended_read_parameter_at_e].values.array[position_at];
 
-          const f_string_range_t range = macro_f_string_range_t_initialize(data->argv[data->depths.array[i].index_at].used);
-
-          status = fl_conversion_string_to_number_unsigned(data->argv[data->depths.array[i].index_at].string, range, &data->depths.array[i].value_at);
+          status = fl_conversion_dynamic_to_number_unsigned(data->argv[data->depths.array[i].index_at], &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_read_long_at_s, data->argv[data->depths.array[i].index_at]);
+            fll_error_parameter_integer_print(main->error, F_status_set_fine(status), "fl_conversion_dynamic_to_number_unsigned", F_true, fss_extended_read_long_at_s, data->argv[data->depths.array[i].index_at]);
 
             return status;
           }
@@ -287,12 +283,11 @@ 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(data->argv[index].used);
 
-      const f_status_t status = fl_conversion_string_to_number_unsigned(data->argv[index].string, range, number);
+      const f_status_t status = fl_conversion_dynamic_to_number_unsigned(data->argv[index], 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, data->argv[index]);
+        fll_error_parameter_integer_print(main->error, F_status_set_fine(status), "fl_conversion_dynamic_to_number_unsigned", F_true, name, data->argv[index]);
 
         return status;
       }
index 1e6f45cbc4cd7f5f48f033efd6dafc23e4df5e05..bfa35cf0e8a3970d8ac696de4aed2ec0da1c94aa 100644 (file)
@@ -59,13 +59,13 @@ extern "C" {
  *
  *   Errors (with error bit) from: f_string_append().
  *   Errors (with error bit) from: fl_string_rip().
- *   Errors (with error bit) from: fl_conversion_string_to_number_unsigned().
+ *   Errors (with error bit) from: fl_conversion_dynamic_partial_to_number_unsigned().
  *
  *   Errors (with error bit) from: fss_extended_read_depths_resize().
  *
  * @see f_string_append()
  * @see fl_string_rip()
- * @see fl_conversion_string_to_number_unsigned()
+ * @see fl_conversion_dynamic_partial_to_number_unsigned()
  *
  * @see fss_extended_read_depths_resize()
  */
@@ -137,9 +137,9 @@ extern "C" {
  *   F_true on success and the parameter was found (and is valid).
  *   F_false on success and the parameter was not found.
  *
- *   Errors (with error bit) from: fl_conversion_string_to_number_unsigned().
+ *   Errors (with error bit) from: fl_conversion_dynamic_partial_to_number_unsigned().
  *
- * @see fl_conversion_string_to_number_unsigned()
+ * @see fl_conversion_dynamic_partial_to_number_unsigned()
  *
  * @see fss_extended_read_depths_resize()
  */
index 959be2f51b1952262634c538f373acfd1a60038b..c15017ffdf86964dc07b589b104895fbfacadf52 100644 (file)
@@ -176,12 +176,11 @@ extern "C" {
       }
       else if (main->parameters.array[fss_identify_parameter_line_e].result == f_console_result_additional_e) {
         const f_array_length_t index = main->parameters.array[fss_identify_parameter_line_e].values.array[main->parameters.array[fss_identify_parameter_line_e].values.used - 1];
-        const f_string_range_t range = macro_f_string_range_t_initialize(data.argv[index].used);
 
-        status = fl_conversion_string_to_number_unsigned(data.argv[index].string, range, &data.line);
+        status = fl_conversion_dynamic_to_number_unsigned(data.argv[index], &data.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_identify_long_line_s, data.argv[index]);
+          fll_error_parameter_integer_print(main->error, F_status_set_fine(status), "fl_conversion_dynamic_to_number_unsigned", F_true, fss_identify_long_line_s, data.argv[index]);
         }
       }
     }
index 5970d2ec709a4b8a0be262e800b56d3b8cb2fefe..e397fd1199f08120792a026df4ea2de5cd6e749a 100644 (file)
@@ -168,7 +168,7 @@ extern "C" {
       } // for
 
       {
-        const f_status_t status = fl_conversion_string_to_hexidecimal_unsigned(data->name.string, range, &number);
+        const f_status_t status = fl_conversion_dynamic_partial_to_hexidecimal_unsigned(data->name, range, &number);
         if (F_status_is_error(status)) return status;
       }
 
index 518ba6d33028b3b7eda34dbd62ff93dd625d0858..14f491f3a8cd08f3d4cd3cf95f550b889483b0fa 100644 (file)
@@ -83,10 +83,10 @@ extern "C" {
  *   F_true on match.
  *   F_false on no match.
  *
- *   Errors (with error bit) from fl_conversion_string_to_hexidecimal_unsigned().
+ *   Errors (with error bit) from fl_conversion_dynamic_partial_to_hexidecimal_unsigned().
  *   Errors (with error bit) from fl_string_dynamic_compare_string().
  *
- * @see fl_conversion_string_to_hexidecimal_unsigned()
+ * @see fl_conversion_dynamic_partial_to_hexidecimal_unsigned()
  * @see fl_string_dynamic_compare_string()
  */
 #ifndef _di_fss_identify_process_name_compare_
index 6a582b49de6ac8f1e971a5149fb19a1548b55e15..ac4cfa5624fe3c17c11f8847c286a3bf12d00fd6 100644 (file)
@@ -481,10 +481,10 @@ extern "C" {
               ++range.start;
             }
 
-            status = fl_conversion_string_to_number_unsigned(data.argv[index].string, range, &data.delimit_depth);
+            status = fl_conversion_dynamic_partial_to_number_unsigned(data.argv[index], 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_payload_read_long_delimit_s, data.argv[index]);
+              fll_error_parameter_integer_print(main->error, F_status_set_fine(status), "fl_conversion_dynamic_partial_to_number_unsigned", F_true, fss_payload_read_long_delimit_s, data.argv[index]);
 
               break;
             }
index fd558a9418ab6ec992502b8cc3129ae6da85f668..f60bc7f15cdc870df8c9b3f456574fbee02f7719 100644 (file)
@@ -108,12 +108,10 @@ extern "C" {
       else {
         position_depth = main->parameters.array[fss_payload_read_parameter_depth_e].values.array[i];
 
-        const f_string_range_t range = macro_f_string_range_t_initialize(data->argv[position_depth].used);
-
-        status = fl_conversion_string_to_number_unsigned(data->argv[position_depth].string, range, &data->depths.array[i].depth);
+        status = fl_conversion_dynamic_to_number_unsigned(data->argv[position_depth], &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_payload_read_long_depth_s, data->argv[position_depth]);
+          fll_error_parameter_integer_print(main->error, F_status_set_fine(status), "fl_conversion_dynamic_to_number_unsigned", F_true, fss_payload_read_long_depth_s, data->argv[position_depth]);
 
           return status;
         }
@@ -132,12 +130,10 @@ extern "C" {
 
           data->depths.array[i].index_at = main->parameters.array[fss_payload_read_parameter_at_e].values.array[position_at];
 
-          const f_string_range_t range = macro_f_string_range_t_initialize(data->argv[data->depths.array[i].index_at].used);
-
-          status = fl_conversion_string_to_number_unsigned(data->argv[data->depths.array[i].index_at].string, range, &data->depths.array[i].value_at);
+          status = fl_conversion_dynamic_to_number_unsigned(data->argv[data->depths.array[i].index_at], &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_payload_read_long_at_s, data->argv[data->depths.array[i].index_at]);
+            fll_error_parameter_integer_print(main->error, F_status_set_fine(status), "fl_conversion_dynamic_to_number_unsigned", F_true, fss_payload_read_long_at_s, data->argv[data->depths.array[i].index_at]);
 
             return status;
           }
@@ -318,12 +314,11 @@ 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(data->argv[index].used);
 
-      const f_status_t status = fl_conversion_string_to_number_unsigned(data->argv[index].string, range, number);
+      const f_status_t status = fl_conversion_dynamic_to_number_unsigned(data->argv[index], 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, data->argv[index]);
+        fll_error_parameter_integer_print(main->error, F_status_set_fine(status), "fl_conversion_dynamic_to_number_unsigned", F_true, name, data->argv[index]);
 
         return status;
       }
index e6149656cefca40e7df1b92febd7e13b9f7c1b39..cb7a8307e3d55e2aaa92fc8b517a94d22dd31d9f 100644 (file)
@@ -63,13 +63,13 @@ extern "C" {
  *
  *   Errors (with error bit) from: f_string_append().
  *   Errors (with error bit) from: fl_string_rip().
- *   Errors (with error bit) from: fl_conversion_string_to_number_unsigned().
+ *   Errors (with error bit) from: fl_conversion_dynamic_partial_to_number_unsigned().
  *
  *   Errors (with error bit) from: fss_payload_read_depths_resize().
  *
  * @see f_string_append()
  * @see fl_string_rip()
- * @see fl_conversion_string_to_number_unsigned()
+ * @see fl_conversion_dynamic_partial_to_number_unsigned()
  *
  * @see fss_payload_read_depths_resize()
  */
@@ -141,9 +141,9 @@ extern "C" {
  *   F_true on success and the parameter was found (and is valid).
  *   F_false on success and the parameter was not found.
  *
- *   Errors (with error bit) from: fl_conversion_string_to_number_unsigned().
+ *   Errors (with error bit) from: fl_conversion_dynamic_partial_to_number_unsigned().
  *
- * @see fl_conversion_string_to_number_unsigned()
+ * @see fl_conversion_dynamic_partial_to_number_unsigned()
  *
  * @see fss_payload_read_depths_resize()
  */
index df6c2585d1349226398a2db5e947a9132fd09ec5..8df8ea1e646d53c9b05d01b8c959f7febd37cd00 100644 (file)
@@ -57,11 +57,9 @@ extern "C" {
     f_status_t status = F_none;
 
     {
-      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.string, range, &number);
+      status = fl_conversion_dynamic_to_number_unsigned(value, &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);
@@ -141,9 +139,7 @@ extern "C" {
 #ifndef _di_fss_status_code_convert_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(value.used);
-
-    f_status_t status = fl_conversion_string_to_number_unsigned(value.string, range, number);
+    f_status_t status = fl_conversion_dynamic_to_number_unsigned(value, 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 6b861322ef97fe4322a51bda12c438ad34889c26..06e996450ee21b5f87c1d6ea561fc5a63bfdedad 100644 (file)
@@ -187,14 +187,13 @@ 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(argv[index].used);
 
         f_number_unsigned_t number = 0;
 
-        status = fl_conversion_string_to_number_unsigned(argv[index].string, range, &number);
+        status = fl_conversion_dynamic_to_number_unsigned(argv[index], &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, iki_read_long_at_s, argv[index]);
+          fll_error_parameter_integer_print(main->error, F_status_set_fine(status), "fl_conversion_dynamic_to_number_unsigned", F_true, iki_read_long_at_s, argv[index]);
 
           status = F_status_set_error(F_parameter);
         }
@@ -233,14 +232,13 @@ 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(argv[index].used);
 
         f_number_unsigned_t number = 0;
 
-        status = fl_conversion_string_to_number_unsigned(argv[index].string, range, &number);
+        status = fl_conversion_dynamic_to_number_unsigned(argv[index], &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, iki_read_long_line_s, argv[index]);
+          fll_error_parameter_integer_print(main->error, F_status_set_fine(status), "fl_conversion_dynamic_to_number_unsigned", F_true, iki_read_long_line_s, argv[index]);
 
           status = F_status_set_error(F_parameter);
         }
index 6e1fca12a1ab329d2657dcd11aadde795753df89..0550667b0cdf09c5d780f6a220882d1288b7c8ec 100644 (file)
@@ -55,11 +55,9 @@ extern "C" {
     f_status_t status = F_none;
 
     {
-      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.string, range, &number);
+      status = fl_conversion_dynamic_to_number_unsigned(value, &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);
@@ -133,9 +131,7 @@ extern "C" {
 #ifndef _di_status_code_convert_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(value.used);
-
-    f_status_t status = fl_conversion_string_to_number_unsigned(value.string, range, number);
+    f_status_t status = fl_conversion_dynamic_to_number_unsigned(value, 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);