]> Kevux Git Server - fll/commitdiff
Refactor: Change "one", "two", and "three" into "a", "b", and "c".
authorKevin Day <thekevinday@gmail.com>
Sat, 19 Feb 2022 21:08:49 +0000 (15:08 -0600)
committerKevin Day <thekevinday@gmail.com>
Sat, 19 Feb 2022 21:08:49 +0000 (15:08 -0600)
This makes the use of triples easier.

level_0/f_string/c/private-string.c
level_0/f_string/c/string/triple.c
level_0/f_string/c/string/triple.h
level_0/f_utf/c/utf.h
level_0/f_utf/c/utf/private-string.c
level_0/f_utf/c/utf/triple.c
level_0/f_utf/c/utf/triple.h

index 50e08a867234003f4602b647c6ea5a634385315e..28c4132f55f00c0a753d8e32a844ad726be630e3 100644 (file)
@@ -891,13 +891,13 @@ extern "C" {
 
     for (f_array_length_t i = length; i < triples->size; ++i) {
 
-      status = private_f_string_dynamic_adjust(0, &triples->array[i].one);
+      status = private_f_string_dynamic_adjust(0, &triples->array[i].a);
       if (F_status_is_error(status)) return status;
 
-      status = private_f_string_dynamic_adjust(0, &triples->array[i].two);
+      status = private_f_string_dynamic_adjust(0, &triples->array[i].b);
       if (F_status_is_error(status)) return status;
 
-      status = private_f_string_dynamic_adjust(0, &triples->array[i].three);
+      status = private_f_string_dynamic_adjust(0, &triples->array[i].c);
       if (F_status_is_error(status)) return status;
     } // for
 
@@ -926,13 +926,13 @@ extern "C" {
 
     for (f_array_length_t i = length; i < triples->size; ++i) {
 
-      status = private_f_string_dynamic_resize(0, &triples->array[i].one);
+      status = private_f_string_dynamic_resize(0, &triples->array[i].a);
       if (F_status_is_error(status)) return status;
 
-      status = private_f_string_dynamic_resize(0, &triples->array[i].two);
+      status = private_f_string_dynamic_resize(0, &triples->array[i].b);
       if (F_status_is_error(status)) return status;
 
-      status = private_f_string_dynamic_resize(0, &triples->array[i].three);
+      status = private_f_string_dynamic_resize(0, &triples->array[i].c);
       if (F_status_is_error(status)) return status;
     } // for
 
index 056d7779d274c197dc538468bdf9dc6e8a32478f..497a58162bd30fae346f2b0ed930c5f0fb5bee03 100644 (file)
@@ -34,22 +34,22 @@ extern "C" {
 
     for (f_array_length_t i = 0; i < source.used; ++i, ++destination->used) {
 
-      destination->array[destination->used].one.used = 0;
-      destination->array[destination->used].two.used = 0;
-      destination->array[destination->used].three.used = 0;
+      destination->array[destination->used].a.used = 0;
+      destination->array[destination->used].b.used = 0;
+      destination->array[destination->used].c.used = 0;
 
-      if (source.array[i].one.used) {
-        status = private_f_string_append(source.array[i].one.string, source.array[i].one.used, &destination->array[destination->used].one);
+      if (source.array[i].a.used) {
+        status = private_f_string_append(source.array[i].a.string, source.array[i].a.used, &destination->array[destination->used].a);
         if (F_status_is_error(status)) return status;
       }
 
-      if (source.array[i].two.used) {
-        status = private_f_string_append(source.array[i].two.string, source.array[i].two.used, &destination->array[destination->used].two);
+      if (source.array[i].b.used) {
+        status = private_f_string_append(source.array[i].b.string, source.array[i].b.used, &destination->array[destination->used].b);
         if (F_status_is_error(status)) return status;
       }
 
-      if (source.array[i].three.used) {
-        status = private_f_string_append(source.array[i].three.string, source.array[i].three.used, &destination->array[destination->used].three);
+      if (source.array[i].c.used) {
+        status = private_f_string_append(source.array[i].c.string, source.array[i].c.used, &destination->array[destination->used].c);
         if (F_status_is_error(status)) return status;
       }
     } // for
index 27a0d71b9663c76b5e1a309728687c18eba815f7..322cf29eda8253126758a28ce4bb8129de86c6ce 100644 (file)
@@ -19,39 +19,39 @@ extern "C" {
 /**
  * A string triple consisting of a set of three strings.
  *
- * one:   A string representing the first string in the triple.
- * two:   A string representing the second string in the triple.
- * three: A string representing the third string in the triple.
+ * a: A string representing the first string in the triple.
+ * b: A string representing the second string in the triple.
+ * c: A string representing the third string in the triple.
  */
 #ifndef _di_f_string_triple_t_
   typedef struct {
-    f_string_dynamic_t one;
-    f_string_dynamic_t two;
-    f_string_dynamic_t three;
+    f_string_dynamic_t a;
+    f_string_dynamic_t b;
+    f_string_dynamic_t c;
   } f_string_triple_t;
 
   #define f_string_triple_t_initialize { f_string_dynamic_t_initialize, f_string_dynamic_t_initialize, f_string_dynamic_t_initialize }
 
   #define macro_f_string_triple_t_clear(triple) \
-    triple.one.array = 0; \
-    triple.one.size = 0; \
-    triple.one.used = 0; \
-    triple.two.array = 0; \
-    triple.two.size = 0; \
-    triple.two.used = 0; \
-    triple.three.array = 0; \
-    triple.three.size = 0; \
-    triple.three.used = 0;
+    triple.a.array = 0; \
+    triple.a.size = 0; \
+    triple.a.used = 0; \
+    triple.b.array = 0; \
+    triple.b.size = 0; \
+    triple.b.used = 0; \
+    triple.c.array = 0; \
+    triple.c.size = 0; \
+    triple.c.used = 0;
 
   #define macro_f_string_triple_t_delete_simple(triple) \
-    macro_f_string_dynamic_t_delete_simple(triple.one) \
-    macro_f_string_dynamic_t_delete_simple(triple.two) \
-    macro_f_string_dynamic_t_delete_simple(triple.three)
+    macro_f_string_dynamic_t_delete_simple(triple.a) \
+    macro_f_string_dynamic_t_delete_simple(triple.b) \
+    macro_f_string_dynamic_t_delete_simple(triple.c)
 
   #define macro_f_string_triple_t_destroy_simple(triple) \
-    macro_f_string_dynamic_t_destroy_simple(triple.one) \
-    macro_f_string_dynamic_t_destroy_simple(triple.two) \
-    macro_f_string_dynamic_t_destroy_simple(triple.three)
+    macro_f_string_dynamic_t_destroy_simple(triple.a) \
+    macro_f_string_dynamic_t_destroy_simple(triple.b) \
+    macro_f_string_dynamic_t_destroy_simple(triple.c)
 #endif // _di_f_string_triple_t_
 
 /**
index 4aa57ee70af47d6f2c2090b59b5372617f4b125a..3c14279ba075c5b51dfdfcf582f059dcfff76e45 100644 (file)
@@ -7,8 +7,6 @@
  *
  * Provides UTF-8 capabilities.
  *
- * @todo consider is_graph() functions being their own data set (review unicode to see which of checking only for graph() vs checking for all not-graph will be the smaller set).
- *
  * Identifiers:
  *   - UTF_8-1: 1000 0000
  *   - UTF_8-2: 1100 0000
index 7cf38a44a7bd073b9d53b7c00898dadd2fd2b826..ca8b2427ef306c4f0f96f929c12c1b60062ca5cd 100644 (file)
@@ -432,13 +432,13 @@ extern "C" {
 
     for (f_array_length_t i = length; i < triples->size; ++i) {
 
-      status = private_f_utf_string_dynamic_adjust(0, &triples->array[i].one);
+      status = private_f_utf_string_dynamic_adjust(0, &triples->array[i].a);
       if (F_status_is_error(status)) return status;
 
-      status = private_f_utf_string_dynamic_adjust(0, &triples->array[i].two);
+      status = private_f_utf_string_dynamic_adjust(0, &triples->array[i].b);
       if (F_status_is_error(status)) return status;
 
-      status = private_f_utf_string_dynamic_adjust(0, &triples->array[i].three);
+      status = private_f_utf_string_dynamic_adjust(0, &triples->array[i].c);
       if (F_status_is_error(status)) return status;
     } // for
 
@@ -467,13 +467,13 @@ extern "C" {
 
     for (f_array_length_t i = length; i < triples->size; ++i) {
 
-      status = private_f_utf_string_dynamic_resize(0, &triples->array[i].one);
+      status = private_f_utf_string_dynamic_resize(0, &triples->array[i].a);
       if (F_status_is_error(status)) return status;
 
-      status = private_f_utf_string_dynamic_resize(0, &triples->array[i].two);
+      status = private_f_utf_string_dynamic_resize(0, &triples->array[i].b);
       if (F_status_is_error(status)) return status;
 
-      status = private_f_utf_string_dynamic_resize(0, &triples->array[i].three);
+      status = private_f_utf_string_dynamic_resize(0, &triples->array[i].c);
       if (F_status_is_error(status)) return status;
     } // for
 
index 88fa935f0abf1b98364574b006b1c52fdcc2355e..0be292306c291674b0166537700c588be14bd086 100644 (file)
@@ -35,22 +35,22 @@ extern "C" {
 
     for (f_array_length_t i = 0; i < source.used; ++i, ++destination->used) {
 
-      destination->array[destination->used].one.used = 0;
-      destination->array[destination->used].two.used = 0;
-      destination->array[destination->used].three.used = 0;
+      destination->array[destination->used].a.used = 0;
+      destination->array[destination->used].b.used = 0;
+      destination->array[destination->used].c.used = 0;
 
-      if (source.array[i].one.used) {
-        status = private_f_utf_string_append(source.array[i].one.string, source.array[i].one.used, &destination->array[destination->used].one);
+      if (source.array[i].a.used) {
+        status = private_f_utf_string_append(source.array[i].a.string, source.array[i].a.used, &destination->array[destination->used].a);
         if (F_status_is_error(status)) return status;
       }
 
-      if (source.array[i].two.used) {
-        status = private_f_utf_string_append(source.array[i].two.string, source.array[i].two.used, &destination->array[destination->used].two);
+      if (source.array[i].b.used) {
+        status = private_f_utf_string_append(source.array[i].b.string, source.array[i].b.used, &destination->array[destination->used].b);
         if (F_status_is_error(status)) return status;
       }
 
-      if (source.array[i].three.used) {
-        status = private_f_utf_string_append(source.array[i].three.string, source.array[i].three.used, &destination->array[destination->used].three);
+      if (source.array[i].c.used) {
+        status = private_f_utf_string_append(source.array[i].c.string, source.array[i].c.used, &destination->array[destination->used].c);
         if (F_status_is_error(status)) return status;
       }
     } // for
index 7b41d3c45ec284f34d10bb1a1618d7d5c70eaca2..77e135578c6b2191aaf0aa8684702f61760ce078 100644 (file)
@@ -19,39 +19,39 @@ extern "C" {
 /**
  * A string triple consisting of a set of three strings.
  *
- * one: A string representing the first string in the triple.
- * two: A string representing the second string in the triple.
- * three: A string representing the third string in the triple.
+ * a: A string representing the first string in the triple.
+ * b: A string representing the second string in the triple.
+ * c: A string representing the third string in the triple.
  */
 #ifndef _di_f_utf_string_triple_t_
   typedef struct {
-    f_utf_string_dynamic_t one;
-    f_utf_string_dynamic_t two;
-    f_utf_string_dynamic_t three;
+    f_utf_string_dynamic_t a;
+    f_utf_string_dynamic_t b;
+    f_utf_string_dynamic_t c;
   } f_utf_string_triple_t;
 
   #define f_utf_string_triple_t_initialize { f_utf_string_dynamic_t_initialize, f_utf_string_dynamic_t_initialize, f_utf_string_dynamic_t_initialize }
 
   #define macro_f_utf_string_triple_t_clear(triple) \
-    triple.one.array = 0; \
-    triple.one.size = 0; \
-    triple.one.used = 0; \
-    triple.two.array = 0; \
-    triple.two.size = 0; \
-    triple.two.used = 0; \
-    triple.three.array = 0; \
-    triple.three.size = 0; \
-    triple.three.used = 0;
+    triple.a.array = 0; \
+    triple.a.size = 0; \
+    triple.a.used = 0; \
+    triple.b.array = 0; \
+    triple.b.size = 0; \
+    triple.b.used = 0; \
+    triple.c.array = 0; \
+    triple.c.size = 0; \
+    triple.c.used = 0;
 
   #define macro_f_utf_string_triple_t_delete_simple(triple) \
-    macro_f_utf_string_dynamic_t_delete_simple(triple.one) \
-    macro_f_utf_string_dynamic_t_delete_simple(triple.two) \
-    macro_f_utf_string_dynamic_t_delete_simple(triple.three)
+    macro_f_utf_string_dynamic_t_delete_simple(triple.a) \
+    macro_f_utf_string_dynamic_t_delete_simple(triple.b) \
+    macro_f_utf_string_dynamic_t_delete_simple(triple.c)
 
   #define macro_f_utf_string_triple_t_destroy_simple(triple) \
-    macro_f_utf_string_dynamic_t_destroy_simple(triple.one) \
-    macro_f_utf_string_dynamic_t_destroy_simple(triple.two) \
-    macro_f_utf_string_dynamic_t_destroy_simple(triple.three)
+    macro_f_utf_string_dynamic_t_destroy_simple(triple.a) \
+    macro_f_utf_string_dynamic_t_destroy_simple(triple.b) \
+    macro_f_utf_string_dynamic_t_destroy_simple(triple.c)
 #endif // _di_f_utf_string_triple_t_
 
 /**