]> Kevux Git Server - fll/commitdiff
Cleanup: Rename 'binary' to 'bytecode' in UTF8 program.
authorKevin Day <thekevinday@gmail.com>
Wed, 4 May 2022 02:16:39 +0000 (21:16 -0500)
committerKevin Day <thekevinday@gmail.com>
Wed, 4 May 2022 02:16:39 +0000 (21:16 -0500)
The use of the term "binary" here is both valid and invalid.
The UTF-8 is considered text and so this is better called text.
Another name for this is "bytecode".
Given that these both have "b" (for partially preserving the parameters) and "bytecode" is a bit more specific than text, use "bytecode".

14 files changed:
level_3/utf8/c/common.c
level_3/utf8/c/common.h
level_3/utf8/c/private-common.h
level_3/utf8/c/private-print.c
level_3/utf8/c/private-print.h
level_3/utf8/c/private-utf8.c
level_3/utf8/c/private-utf8.h
level_3/utf8/c/private-utf8_bytecode.c [moved from level_3/utf8/c/private-utf8_binary.c with 84% similarity]
level_3/utf8/c/private-utf8_bytecode.h [moved from level_3/utf8/c/private-utf8_binary.h with 59% similarity]
level_3/utf8/c/private-utf8_codepoint.c
level_3/utf8/c/private-utf8_codepoint.h
level_3/utf8/c/utf8.c
level_3/utf8/c/utf8.h
level_3/utf8/data/build/settings

index ad3b9613fdff56c7c804422fbdeeb53c637f4b00..20e8b88fe580a036668e826d95241cf1a2414171 100644 (file)
@@ -38,7 +38,7 @@ extern "C" {
 #endif // _di_utf8_defines_
 
 #ifndef _di_utf8_parameters_
-  const f_string_static_t utf8_short_from_binary_s = macro_f_string_static_t_initialize(UTF8_short_from_binary_s, 0, UTF8_short_from_binary_s_length);
+  const f_string_static_t utf8_short_from_bytecode_s = macro_f_string_static_t_initialize(UTF8_short_from_bytecode_s, 0, UTF8_short_from_bytecode_s_length);
   const f_string_static_t utf8_short_from_codepoint_s = macro_f_string_static_t_initialize(UTF8_short_from_codepoint_s, 0, UTF8_short_from_codepoint_s_length);
   const f_string_static_t utf8_short_from_file_s = macro_f_string_static_t_initialize(UTF8_short_from_file_s, 0, UTF8_short_from_file_s_length);
 
@@ -47,13 +47,13 @@ extern "C" {
   const f_string_static_t utf8_short_strip_invalid_s = macro_f_string_static_t_initialize(UTF8_short_strip_invalid_s, 0, UTF8_short_strip_invalid_s_length);
   const f_string_static_t utf8_short_verify_s = macro_f_string_static_t_initialize(UTF8_short_verify_s, 0, UTF8_short_verify_s_length);
 
-  const f_string_static_t utf8_short_to_binary_s = macro_f_string_static_t_initialize(UTF8_short_to_binary_s, 0, UTF8_short_to_binary_s_length);
+  const f_string_static_t utf8_short_to_bytecode_s = macro_f_string_static_t_initialize(UTF8_short_to_bytecode_s, 0, UTF8_short_to_bytecode_s_length);
   const f_string_static_t utf8_short_to_codepoint_s = macro_f_string_static_t_initialize(UTF8_short_to_codepoint_s, 0, UTF8_short_to_codepoint_s_length);
   const f_string_static_t utf8_short_to_combining_s = macro_f_string_static_t_initialize(UTF8_short_to_combining_s, 0, UTF8_short_to_combining_s_length);
   const f_string_static_t utf8_short_to_file_s = macro_f_string_static_t_initialize(UTF8_short_to_file_s, 0, UTF8_short_to_file_s_length);
   const f_string_static_t utf8_short_to_width_s = macro_f_string_static_t_initialize(UTF8_short_to_width_s, 0, UTF8_short_to_width_s_length);
 
-  const f_string_static_t utf8_long_from_binary_s = macro_f_string_static_t_initialize(UTF8_long_from_binary_s, 0, UTF8_long_from_binary_s_length);
+  const f_string_static_t utf8_long_from_bytecode_s = macro_f_string_static_t_initialize(UTF8_long_from_bytecode_s, 0, UTF8_long_from_bytecode_s_length);
   const f_string_static_t utf8_long_from_codepoint_s = macro_f_string_static_t_initialize(UTF8_long_from_codepoint_s, 0, UTF8_long_from_codepoint_s_length);
   const f_string_static_t utf8_long_from_file_s = macro_f_string_static_t_initialize(UTF8_long_from_file_s, 0, UTF8_long_from_file_s_length);
 
@@ -62,7 +62,7 @@ extern "C" {
   const f_string_static_t utf8_long_strip_invalid_s = macro_f_string_static_t_initialize(UTF8_long_strip_invalid_s, 0, UTF8_long_strip_invalid_s_length);
   const f_string_static_t utf8_long_verify_s = macro_f_string_static_t_initialize(UTF8_long_verify_s, 0, UTF8_long_verify_s_length);
 
-  const f_string_static_t utf8_long_to_binary_s = macro_f_string_static_t_initialize(UTF8_long_to_binary_s, 0, UTF8_long_to_binary_s_length);
+  const f_string_static_t utf8_long_to_bytecode_s = macro_f_string_static_t_initialize(UTF8_long_to_bytecode_s, 0, UTF8_long_to_bytecode_s_length);
   const f_string_static_t utf8_long_to_codepoint_s = macro_f_string_static_t_initialize(UTF8_long_to_codepoint_s, 0, UTF8_long_to_codepoint_s_length);
   const f_string_static_t utf8_long_to_combining_s = macro_f_string_static_t_initialize(UTF8_long_to_combining_s, 0, UTF8_long_to_combining_s_length);
   const f_string_static_t utf8_long_to_file_s = macro_f_string_static_t_initialize(UTF8_long_to_file_s, 0, UTF8_long_to_file_s_length);
index c71d95e733335fbc56a5ca0f5334028f77a93818..ab64ec506874661967e0255554896f639844e748 100644 (file)
@@ -141,7 +141,7 @@ extern "C" {
  * The main program parameters.
  */
 #ifndef _di_utf8_parameters_
-  #define UTF8_short_from_binary_s    "b"
+  #define UTF8_short_from_bytecode_s  "b"
   #define UTF8_short_from_codepoint_s "c"
   #define UTF8_short_from_file_s      "f"
 
@@ -150,13 +150,13 @@ extern "C" {
   #define UTF8_short_strip_invalid_s "s"
   #define UTF8_short_verify_s        "v"
 
-  #define UTF8_short_to_binary_s    "B"
+  #define UTF8_short_to_bytecode_s  "B"
   #define UTF8_short_to_codepoint_s "C"
   #define UTF8_short_to_combining_s "O"
   #define UTF8_short_to_file_s      "F"
   #define UTF8_short_to_width_s     "W"
 
-  #define UTF8_long_from_binary_s    "from_binary"
+  #define UTF8_long_from_bytecode_s  "from_bytecode"
   #define UTF8_long_from_codepoint_s "from_codepoint"
   #define UTF8_long_from_file_s      "from_file"
 
@@ -165,13 +165,13 @@ extern "C" {
   #define UTF8_long_strip_invalid_s "strip_invalid"
   #define UTF8_long_verify_s        "verify"
 
-  #define UTF8_long_to_binary_s    "to_binary"
+  #define UTF8_long_to_bytecode_s  "to_bytecode"
   #define UTF8_long_to_codepoint_s "to_codepoint"
   #define UTF8_long_to_combining_s "to_combining"
   #define UTF8_long_to_file_s      "to_file"
   #define UTF8_long_to_width_s     "to_width"
 
-  #define UTF8_short_from_binary_s_length    1
+  #define UTF8_short_from_bytecode_s_length  1
   #define UTF8_short_from_codepoint_s_length 1
   #define UTF8_short_from_file_s_length      1
 
@@ -180,13 +180,13 @@ extern "C" {
   #define UTF8_short_strip_invalid_s_length 1
   #define UTF8_short_verify_s_length        1
 
-  #define UTF8_short_to_binary_s_length    1
+  #define UTF8_short_to_bytecode_s_length  1
   #define UTF8_short_to_codepoint_s_length 1
   #define UTF8_short_to_combining_s_length 1
   #define UTF8_short_to_file_s_length      1
   #define UTF8_short_to_width_s_length     1
 
-  #define UTF8_long_from_binary_s_length    11
+  #define UTF8_long_from_bytecode_s_length  13
   #define UTF8_long_from_codepoint_s_length 14
   #define UTF8_long_from_file_s_length      9
 
@@ -195,13 +195,13 @@ extern "C" {
   #define UTF8_long_strip_invalid_s_length 13
   #define UTF8_long_verify_s_length        6
 
-  #define UTF8_long_to_binary_s_length    9
+  #define UTF8_long_to_bytecode_s_length  11
   #define UTF8_long_to_codepoint_s_length 12
   #define UTF8_long_to_combining_s_length 12
   #define UTF8_long_to_file_s_length      7
   #define UTF8_long_to_width_s_length     8
 
-  extern const f_string_static_t utf8_short_from_binary_s;
+  extern const f_string_static_t utf8_short_from_bytecode_s;
   extern const f_string_static_t utf8_short_from_codepoint_s;
   extern const f_string_static_t utf8_short_from_file_s;
 
@@ -210,13 +210,13 @@ extern "C" {
   extern const f_string_static_t utf8_short_strip_invalid_s;
   extern const f_string_static_t utf8_short_verify_s;
 
-  extern const f_string_static_t utf8_short_to_binary_s;
+  extern const f_string_static_t utf8_short_to_bytecode_s;
   extern const f_string_static_t utf8_short_to_codepoint_s;
   extern const f_string_static_t utf8_short_to_combining_s;
   extern const f_string_static_t utf8_short_to_file_s;
   extern const f_string_static_t utf8_short_to_width_s;
 
-  extern const f_string_static_t utf8_long_from_binary_s;
+  extern const f_string_static_t utf8_long_from_bytecode_s;
   extern const f_string_static_t utf8_long_from_codepoint_s;
   extern const f_string_static_t utf8_long_from_file_s;
 
@@ -225,7 +225,7 @@ extern "C" {
   extern const f_string_static_t utf8_long_strip_invalid_s;
   extern const f_string_static_t utf8_long_verify_s;
 
-  extern const f_string_static_t utf8_long_to_binary_s;
+  extern const f_string_static_t utf8_long_to_bytecode_s;
   extern const f_string_static_t utf8_long_to_codepoint_s;
   extern const f_string_static_t utf8_long_to_combining_s;
   extern const f_string_static_t utf8_long_to_file_s;
@@ -242,7 +242,7 @@ extern "C" {
     utf8_parameter_verbosity_debug_e,
     utf8_parameter_version_e,
 
-    utf8_parameter_from_binary_e,
+    utf8_parameter_from_bytecode_e,
     utf8_parameter_from_codepoint_e,
     utf8_parameter_from_file_e,
 
@@ -250,7 +250,7 @@ extern "C" {
     utf8_parameter_separate_e,
     utf8_parameter_strip_invalid_e,
 
-    utf8_parameter_to_binary_e,
+    utf8_parameter_to_bytecode_e,
     utf8_parameter_to_codepoint_e,
     utf8_parameter_to_combining_e,
     utf8_parameter_to_file_e,
@@ -270,13 +270,13 @@ extern "C" {
       macro_f_console_parameter_t_initialize(f_console_standard_short_verbose_s.string, f_console_standard_long_verbose_s.string, 0, 0, f_console_type_inverse_e), \
       macro_f_console_parameter_t_initialize(f_console_standard_short_debug_s.string, f_console_standard_long_debug_s.string, 0, 0, f_console_type_inverse_e), \
       macro_f_console_parameter_t_initialize(f_console_standard_short_version_s.string, f_console_standard_long_version_s.string, 0, 0, f_console_type_inverse_e), \
-      macro_f_console_parameter_t_initialize(utf8_short_from_binary_s.string, utf8_long_from_binary_s.string, 0, 0, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(utf8_short_from_bytecode_s.string, utf8_long_from_bytecode_s.string, 0, 0, f_console_type_normal_e), \
       macro_f_console_parameter_t_initialize(utf8_short_from_codepoint_s.string, utf8_long_from_codepoint_s.string, 0, 0, f_console_type_normal_e), \
       macro_f_console_parameter_t_initialize(utf8_short_from_file_s.string, utf8_long_from_file_s.string, 0, 1, f_console_type_normal_e), \
       macro_f_console_parameter_t_initialize(utf8_short_headers_s.string, utf8_long_headers_s.string, 0, 0, f_console_type_normal_e), \
       macro_f_console_parameter_t_initialize(utf8_short_separate_s.string, utf8_long_headers_s.string, 0, 0, f_console_type_normal_e), \
       macro_f_console_parameter_t_initialize(utf8_short_strip_invalid_s.string, utf8_long_strip_invalid_s.string, 0, 0, f_console_type_normal_e), \
-      macro_f_console_parameter_t_initialize(utf8_short_to_binary_s.string, utf8_long_to_binary_s.string, 0, 0, f_console_type_normal_e), \
+      macro_f_console_parameter_t_initialize(utf8_short_to_bytecode_s.string, utf8_long_to_bytecode_s.string, 0, 0, f_console_type_normal_e), \
       macro_f_console_parameter_t_initialize(utf8_short_to_codepoint_s.string, utf8_long_to_codepoint_s.string, 0, 0, f_console_type_normal_e), \
       macro_f_console_parameter_t_initialize(utf8_short_to_combining_s.string, utf8_long_to_combining_s.string, 0, 0, f_console_type_normal_e), \
       macro_f_console_parameter_t_initialize(utf8_short_to_file_s.string, utf8_long_to_file_s.string, 0, 1, f_console_type_normal_e), \
@@ -291,19 +291,19 @@ extern "C" {
  * Modes used to designate how to the input and output are to be processed.
  *
  * utf8_mode_from_*:
- *   - binary:    The input format is binary.
+ *   - bytecode:  The input format is bytecode.
  *   - codepoint: The input format is codepoint (U+XXXX or U+XXXXXX).
  *
  * utf8_mode_to_*:
- *   - binary:    The outout format is binary.
+ *   - bytecode:  The outout format is bytecode.
  *   - codepoint: The outout format is codepoint (U+XXXX or U+XXXXXX).
  *   - combining: The outout format is whether or not character is combining (may be used with "width").
  *   - width:     The outout format is how wide the character is (may be used with "combining").
  */
 #ifndef _di_utf8_modes_
-  #define utf8_mode_from_binary_d    0x1
+  #define utf8_mode_from_bytecode_d  0x1
   #define utf8_mode_from_codepoint_d 0x2
-  #define utf8_mode_to_binary_d      0x4
+  #define utf8_mode_to_bytecode_d    0x4
   #define utf8_mode_to_codepoint_d   0x8
   #define utf8_mode_to_combining_d   0x10
   #define utf8_mode_to_width_d       0x20
index a291ee291bc24b6b87ffc7187a153b60d73a969a..38652c229f9cdd34a6869edffa2c7daf16a078c9 100644 (file)
@@ -71,7 +71,7 @@ extern "C" {
       0, \
       0, \
       f_file_t_initialize, \
-      utf8_mode_from_binary_d | utf8_mode_to_codepoint_d, \
+      utf8_mode_from_bytecode_d | utf8_mode_to_codepoint_d, \
       f_color_set_t_initialize, \
       f_color_set_t_initialize, \
       f_string_static_t_initialize, \
index 780f9b2448a5d4c73a39a898d1936e86473f7558..754c7d746492f22a3b02ef8b3421a23165238608 100644 (file)
@@ -6,12 +6,12 @@
 extern "C" {
 #endif
 
-#ifndef _di_utf8_print_binary_
-  void utf8_print_binary(utf8_data_t * const data, const f_string_static_t character) {
+#ifndef _di_utf8_print_bytecode_
+  void utf8_print_bytecode(utf8_data_t * const data, const f_string_static_t character) {
 
     fl_print_format("%r%r%r", data->file.stream, data->prepend, character, data->append);
   }
-#endif // _di_utf8_print_binary_
+#endif // _di_utf8_print_bytecode_
 
 #ifndef _di_utf8_print_character_invalid_
   void utf8_print_character_invalid(utf8_data_t * const data, const f_string_static_t character) {
@@ -24,7 +24,7 @@ extern "C" {
     if ((data->mode & utf8_mode_to_combining_d) || (data->mode & utf8_mode_to_width_d)) {
       utf8_print_combining_or_width(data, character);
     }
-    else if (data->mode & utf8_mode_to_binary_d) {
+    else if (data->mode & utf8_mode_to_bytecode_d) {
       fl_print_format("%r%[%r%]%r", data->file.stream, data->prepend, data->valid_not, character, data->valid_not, data->append);
     }
     else if (data->mode & utf8_mode_from_codepoint_d) {
index a4033a7b4dbd5230b9be48dd791ffc125bc2e272..df35aa07e685584c50f0697eaac110b76bd0cdbf 100644 (file)
@@ -13,7 +13,7 @@ extern "C" {
 #endif
 
 /**
- * Print the binary character (such as '豸').
+ * Print the bytecode character (such as '豸').
  *
  * @param data
  *   The program data.
@@ -21,12 +21,12 @@ extern "C" {
  *   The character to print.
  *   This is a string that represents a single character.
  */
-#ifndef _di_utf8_print_binary_
-  extern void utf8_print_binary(utf8_data_t * const data, const f_string_static_t character) F_attribute_visibility_internal_d;
-#endif // _di_utf8_print_binary_
+#ifndef _di_utf8_print_bytecode_
+  extern void utf8_print_bytecode(utf8_data_t * const data, const f_string_static_t character) F_attribute_visibility_internal_d;
+#endif // _di_utf8_print_bytecode_
 
 /**
- * Print an invalid character either as a Unicode codeblock or as a binary.
+ * Print an invalid character either as a Unicode codeblock or as a bytecode.
  *
  * This handles whether or not the invalid character should be printed or not based on program parameters.
  *
index 255a46ec23961526260ce3e4878ec9e2c72df95d..3ac7858a81be00a9860ae2908ad8867a16aa9ab5 100644 (file)
@@ -2,7 +2,7 @@
 #include "private-common.h"
 #include "private-print.h"
 #include "private-utf8.h"
-#include "private-utf8_binary.h"
+#include "private-utf8_bytecode.h"
 #include "private-utf8_codepoint.h"
 
 #ifdef __cplusplus
@@ -40,8 +40,8 @@ extern "C" {
 
       status = F_none;
 
-      if (data->mode & utf8_mode_from_binary_d) {
-        status = utf8_convert_binary(data, text);
+      if (data->mode & utf8_mode_from_bytecode_d) {
+        status = utf8_convert_bytecode(data, text);
       }
       else {
         status = utf8_detect_codepoint(data, text, &mode_codepoint);
@@ -65,7 +65,7 @@ extern "C" {
       utf8_process_text_width(&text);
     } // for
 
-    if (F_status_is_error_not(status) && !(data->mode & utf8_mode_from_binary_d)) {
+    if (F_status_is_error_not(status) && !(data->mode & utf8_mode_from_bytecode_d)) {
       if (mode_codepoint != utf8_codepoint_mode_ready_e && mode_codepoint != utf8_codepoint_mode_end_e && mode_codepoint != utf8_codepoint_mode_bad_end_e) {
         if (mode_codepoint == utf8_codepoint_mode_number_e) {
           mode_codepoint = utf8_codepoint_mode_end_e;
index 6670bda07442a521c5f501e3506275d77773cff7..9fbad005c8182ad2b581a7cd22abe568bdc9d294 100644 (file)
@@ -26,11 +26,11 @@ extern "C" {
  *   F_false on success and contains invalid sequences.
  *   F_interrupt on (exit) signal received.
  *
- *   Errors (with error bit) from: utf8_convert_binary()
+ *   Errors (with error bit) from: utf8_convert_bytecode()
  *   Errors (with error bit) from: utf8_convert_codepoint()
  *   Errors (with error bit) from: utf8_detect_codepoint()
  *
- * @see utf8_convert_binary()
+ * @see utf8_convert_bytecode()
  * @see utf8_convert_codepoint()
  * @see utf8_detect_codepoint()
  * @see utf8_signal_received()
similarity index 84%
rename from level_3/utf8/c/private-utf8_binary.c
rename to level_3/utf8/c/private-utf8_bytecode.c
index b5f440b1a1abf192621eb340ccc3ddb64fac4234..77271d10c2ed985b664fa265c192bd8bfc21dbdb 100644 (file)
@@ -2,15 +2,15 @@
 #include "private-common.h"
 #include "private-print.h"
 #include "private-utf8.h"
-#include "private-utf8_binary.h"
+#include "private-utf8_bytecode.h"
 #include "private-utf8_codepoint.h"
 
 #ifdef __cplusplus
 extern "C" {
 #endif
 
-#ifndef _di_utf8_convert_binary_
-  f_status_t utf8_convert_binary(utf8_data_t * const data, const f_string_static_t character) {
+#ifndef _di_utf8_convert_bytecode_
+  f_status_t utf8_convert_bytecode(utf8_data_t * const data, const f_string_static_t character) {
 
     f_status_t status = F_none;
     bool valid_not = F_false;
@@ -41,8 +41,8 @@ extern "C" {
       }
     }
     else if (data->main->parameters.array[utf8_parameter_verify_e].result == f_console_result_none_e) {
-      if (data->mode & utf8_mode_to_binary_d) {
-        utf8_print_binary(data, character);
+      if (data->mode & utf8_mode_to_bytecode_d) {
+        utf8_print_bytecode(data, character);
       }
       else if (data->mode & utf8_mode_to_codepoint_d) {
         utf8_print_codepoint(data, codepoint);
@@ -58,10 +58,10 @@ extern "C" {
 
     return F_none;
   }
-#endif // _di_utf8_convert_binary_
+#endif // _di_utf8_convert_bytecode_
 
-#ifndef _di_utf8_process_file_binary_
-  f_status_t utf8_process_file_binary(utf8_data_t * const data, const f_file_t file) {
+#ifndef _di_utf8_process_file_bytecode_
+  f_status_t utf8_process_file_bytecode(utf8_data_t * const data, const f_file_t file) {
 
     f_status_t status = F_none;
 
@@ -107,8 +107,8 @@ extern "C" {
         } // for
 
         if (j == character.used) {
-          if (data->mode & utf8_mode_from_binary_d) {
-            status = utf8_convert_binary(data, character);
+          if (data->mode & utf8_mode_from_bytecode_d) {
+            status = utf8_convert_bytecode(data, character);
           }
           else {
             status = utf8_detect_codepoint(data, character, &mode_codepoint);
@@ -136,8 +136,8 @@ extern "C" {
     if (F_status_is_error_not(status) && status != F_interrupt && next == F_false) {
       character.used = j;
 
-      if (data->mode & utf8_mode_from_binary_d) {
-        status = utf8_convert_binary(data, character);
+      if (data->mode & utf8_mode_from_bytecode_d) {
+        status = utf8_convert_bytecode(data, character);
       }
       else {
         status = utf8_detect_codepoint(data, character, &mode_codepoint);
@@ -160,7 +160,7 @@ extern "C" {
 
     return valid;
   }
-#endif // _di_utf8_process_file_binary_
+#endif // _di_utf8_process_file_bytecode_
 
 #ifdef __cplusplus
 } // extern "C"
similarity index 59%
rename from level_3/utf8/c/private-utf8_binary.h
rename to level_3/utf8/c/private-utf8_bytecode.h
index 43ee5031635d1e17812238bba8d6c4be73bfeb9f..65ea852db54b5ec3a6793787038ebb44f7c59508 100644 (file)
@@ -5,15 +5,15 @@
  * API Version: 0.5
  * Licenses: lgpl-2.1-or-later
  */
-#ifndef _PRIVATE_utf8_binary_h
-#define _PRIVATE_utf8_binary_h
+#ifndef _PRIVATE_utf8_bytecode_h
+#define _PRIVATE_utf8_bytecode_h
 
 #ifdef __cplusplus
 extern "C" {
 #endif
 
 /**
- * Convert a binary character to another format.
+ * Convert a bytecode character to another format.
  *
  * This automatically determines the output format and is also handles the verify process.
  *
@@ -31,12 +31,12 @@ extern "C" {
  *
  *   Errors (with error bit) from: f_utf_unicode_to()
  */
-#ifndef _di_utf8_convert_binary_
-  extern f_status_t utf8_convert_binary(utf8_data_t * const data, const f_string_static_t character) F_attribute_visibility_internal_d;
-#endif // _di_utf8_convert_binary_
+#ifndef _di_utf8_convert_bytecode_
+  extern f_status_t utf8_convert_bytecode(utf8_data_t * const data, const f_string_static_t character) F_attribute_visibility_internal_d;
+#endif // _di_utf8_convert_bytecode_
 
 /**
- * Process file as a binary input, handling conversion or verification as appropriate.
+ * Process file as a bytecode input, handling conversion or verification as appropriate.
  *
  * @param data
  *   The program data.
@@ -49,19 +49,19 @@ extern "C" {
  *   F_false on success and contains invalid sequences.
  *   F_interrupt on (exit) signal received.
  *
- *   Errors (with error bit) from: utf8_convert_binary()
+ *   Errors (with error bit) from: utf8_convert_bytecode()
  *   Errors (with error bit) from: utf8_detect_codepoint()
  *
  * @see fll_program_standard_signal_received()
- * @see utf8_convert_binary()
+ * @see utf8_convert_bytecode()
  * @see utf8_detect_codepoint()
  */
-#ifndef _di_utf8_process_file_binary_
-  extern f_status_t utf8_process_file_binary(utf8_data_t * const data, const f_file_t file) F_attribute_visibility_internal_d;
-#endif // _di_utf8_process_file_binary_
+#ifndef _di_utf8_process_file_bytecode_
+  extern f_status_t utf8_process_file_bytecode(utf8_data_t * const data, const f_file_t file) F_attribute_visibility_internal_d;
+#endif // _di_utf8_process_file_bytecode_
 
 #ifdef __cplusplus
 } // extern "C"
 #endif
 
-#endif // _PRIVATE_utf8_binary_h
+#endif // _PRIVATE_utf8_bytecode_h
index 6df7b29d7eb24ce3c86398fee5b75f800c85cdb5..5b8e9273db728e6d27e43ac1fb1f4fdb01fc41ee 100644 (file)
@@ -2,7 +2,7 @@
 #include "private-common.h"
 #include "private-print.h"
 #include "private-utf8.h"
-#include "private-utf8_binary.h"
+#include "private-utf8_bytecode.h"
 #include "private-utf8_codepoint.h"
 
 #ifdef __cplusplus
@@ -52,7 +52,7 @@ extern "C" {
         }
       }
       else if (data->main->parameters.array[utf8_parameter_verify_e].result == f_console_result_none_e) {
-        if (data->mode & utf8_mode_to_binary_d) {
+        if (data->mode & utf8_mode_to_bytecode_d) {
           f_char_t byte[5] = { 0, 0, 0, 0, 0 };
           f_string_static_t character = macro_f_string_static_t_initialize2(byte, 5);
 
@@ -65,7 +65,7 @@ extern "C" {
             status = F_none;
             character.used = macro_f_utf_byte_width(character.string[0]);
 
-            utf8_print_binary(data, character);
+            utf8_print_bytecode(data, character);
           }
         }
         else if (data->mode & utf8_mode_to_codepoint_d) {
@@ -243,8 +243,8 @@ extern "C" {
         } // for
 
         if (j == character.used) {
-          if (data->mode & utf8_mode_from_binary_d) {
-            status = utf8_convert_binary(data, character);
+          if (data->mode & utf8_mode_from_bytecode_d) {
+            status = utf8_convert_bytecode(data, character);
           }
           else {
             status = utf8_detect_codepoint(data, character, &mode_codepoint);
@@ -272,8 +272,8 @@ extern "C" {
     if (F_status_is_error_not(status) && status != F_interrupt && next == F_false) {
       character.used = j;
 
-      if (data->mode & utf8_mode_from_binary_d) {
-        status = utf8_convert_binary(data, character);
+      if (data->mode & utf8_mode_from_bytecode_d) {
+        status = utf8_convert_bytecode(data, character);
       }
       else {
         status = utf8_detect_codepoint(data, character, &mode_codepoint);
index fcd935c4d1fe1d2451e484e5f55ae1f1691c5049..acb0730658c466babd45a8ec3aa09846b1c28eec 100644 (file)
@@ -70,11 +70,11 @@ extern "C" {
  *   F_false on success and contains invalid sequences.
  *   F_interrupt on (exit) signal received.
  *
- *   Errors (with error bit) from: utf8_convert_binary()
+ *   Errors (with error bit) from: utf8_convert_bytecode()
  *   Errors (with error bit) from: utf8_detect_codepoint()
  *
  * @see fll_program_standard_signal_received()
- * @see utf8_convert_binary()
+ * @see utf8_convert_bytecode()
  * @see utf8_detect_codepoint()
  */
 #ifndef _di_utf8_process_file_codepoint_
index 3d78dc67c6f924472b0754868187771f57cbe32f..4471b8414b32599a37454fd9a2424135251b00e0 100644 (file)
@@ -2,7 +2,7 @@
 #include "private-common.h"
 #include "private-print.h"
 #include "private-utf8.h"
-#include "private-utf8_binary.h"
+#include "private-utf8_bytecode.h"
 #include "private-utf8_codepoint.h"
 
 #ifdef __cplusplus
@@ -28,13 +28,13 @@ extern "C" {
 
     f_print_dynamic_raw(f_string_eol_s, file.stream);
 
-    fll_program_print_help_option(file, context, utf8_short_from_binary_s, utf8_long_from_binary_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "   The expected input format is binary (character data).");
+    fll_program_print_help_option(file, context, utf8_short_from_bytecode_s, utf8_long_from_bytecode_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " The expected input format is bytecode (character data).");
     fll_program_print_help_option(file, context, utf8_short_from_codepoint_s, utf8_long_from_codepoint_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "The expected input format is codepoint (such as U+0000).");
     fll_program_print_help_option(file, context, utf8_short_from_file_s, utf8_long_from_file_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "     Use the given file as the input source.");
 
     f_print_dynamic_raw(f_string_eol_s, file.stream);
 
-    fll_program_print_help_option(file, context, utf8_short_to_binary_s, utf8_long_to_binary_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "   The output format is binary (character data).");
+    fll_program_print_help_option(file, context, utf8_short_to_bytecode_s, utf8_long_to_bytecode_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, " The output format is bytecode (character data).");
     fll_program_print_help_option(file, context, utf8_short_to_codepoint_s, utf8_long_to_codepoint_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "The output format is codepoint (such as U+0000).");
     fll_program_print_help_option(file, context, utf8_short_to_combining_s, utf8_long_to_combining_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "The output format is to print whether or not character is combining or not.");
     fll_program_print_help_option(file, context, utf8_short_to_file_s, utf8_long_to_file_s, f_console_symbol_short_enable_s, f_console_symbol_long_enable_s, "     Use the given file as the output destination.");
@@ -49,7 +49,7 @@ extern "C" {
 
     fll_program_print_help_usage(file, context, utf8_program_name_s, utf8_program_help_parameters_s);
 
-    fl_print_format("  The default behavior is to assume the expected input is binary from the command line to be output to the screen as codepoints.%r%r", file.stream, f_string_eol_s, f_string_eol_s);
+    fl_print_format("  The default behavior is to assume the expected input is bytecode from the command line to be output to the screen as codepoints.%r%r", file.stream, f_string_eol_s, f_string_eol_s);
 
     fl_print_format("  Multiple input sources are allowed but only a single output destination is allowed.%r%r", file.stream, f_string_eol_s, f_string_eol_s);
 
@@ -150,7 +150,7 @@ extern "C" {
 
     // Identify and prioritize from mode parameters.
     {
-      f_console_parameter_id_t ids[2] = { utf8_parameter_from_binary_e, utf8_parameter_from_codepoint_e };
+      f_console_parameter_id_t ids[2] = { utf8_parameter_from_bytecode_e, utf8_parameter_from_codepoint_e };
       f_console_parameter_id_t choice = 0;
       const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 2);
 
@@ -164,16 +164,16 @@ extern "C" {
         return status;
       }
 
-      if (choice == utf8_parameter_from_binary_e) {
+      if (choice == utf8_parameter_from_bytecode_e) {
         if (data.mode & utf8_mode_from_codepoint_d) {
           data.mode -= utf8_mode_from_codepoint_d;
         }
 
-        data.mode |= utf8_mode_from_binary_d;
+        data.mode |= utf8_mode_from_bytecode_d;
       }
       else if (choice == utf8_parameter_from_codepoint_e) {
-        if (data.mode & utf8_mode_from_binary_d) {
-          data.mode -= utf8_mode_from_binary_d;
+        if (data.mode & utf8_mode_from_bytecode_d) {
+          data.mode -= utf8_mode_from_bytecode_d;
         }
 
         data.mode |= utf8_mode_from_codepoint_d;
@@ -182,7 +182,7 @@ extern "C" {
 
     // Identify and prioritize to mode parameters.
     {
-      f_console_parameter_id_t ids[4] = { utf8_parameter_to_binary_e, utf8_parameter_to_codepoint_e, utf8_parameter_to_combining_e, utf8_parameter_to_width_e };
+      f_console_parameter_id_t ids[4] = { utf8_parameter_to_bytecode_e, utf8_parameter_to_codepoint_e, utf8_parameter_to_combining_e, utf8_parameter_to_width_e };
       f_console_parameter_id_t choice = 0;
       const f_console_parameter_ids_t choices = macro_f_console_parameter_ids_t_initialize(ids, 4);
 
@@ -196,7 +196,7 @@ extern "C" {
         return status;
       }
 
-      if (choice == utf8_parameter_to_binary_e) {
+      if (choice == utf8_parameter_to_bytecode_e) {
         if (data.mode & utf8_mode_to_codepoint_d) {
           data.mode -= utf8_mode_to_codepoint_d;
         }
@@ -209,11 +209,11 @@ extern "C" {
           data.mode -= utf8_mode_to_width_d;
         }
 
-        data.mode |= utf8_mode_to_binary_d;
+        data.mode |= utf8_mode_to_bytecode_d;
       }
       else if (choice == utf8_parameter_to_codepoint_e) {
-        if (data.mode & utf8_mode_to_binary_d) {
-          data.mode -= utf8_mode_to_binary_d;
+        if (data.mode & utf8_mode_to_bytecode_d) {
+          data.mode -= utf8_mode_to_bytecode_d;
         }
 
         if (data.mode & utf8_mode_to_combining_d) {
@@ -227,8 +227,8 @@ extern "C" {
         data.mode |= utf8_mode_to_codepoint_d;
       }
       else if (choice == utf8_parameter_to_combining_e) {
-        if (data.mode & utf8_mode_to_binary_d) {
-          data.mode -= utf8_mode_to_binary_d;
+        if (data.mode & utf8_mode_to_bytecode_d) {
+          data.mode -= utf8_mode_to_bytecode_d;
         }
 
         if (data.mode & utf8_mode_to_codepoint_d) {
@@ -243,8 +243,8 @@ extern "C" {
         data.mode |= utf8_mode_to_combining_d;
       }
       else if (choice == utf8_parameter_to_width_e) {
-        if (data.mode & utf8_mode_to_binary_d) {
-          data.mode -= utf8_mode_to_binary_d;
+        if (data.mode & utf8_mode_to_bytecode_d) {
+          data.mode -= utf8_mode_to_bytecode_d;
         }
 
         if (data.mode & utf8_mode_to_codepoint_d) {
@@ -354,7 +354,7 @@ extern "C" {
         status = F_status_set_error(F_parameter);
       }
 
-      if (!(data.mode & utf8_mode_to_binary_d)) {
+      if (!(data.mode & utf8_mode_to_bytecode_d)) {
         if (main->parameters.array[utf8_parameter_separate_e].result == f_console_result_found_e || main->parameters.array[utf8_parameter_headers_e].result == f_console_result_found_e) {
           data.prepend = utf8_string_prepend_padding_s;
           data.append = f_string_eol_s;
@@ -378,15 +378,15 @@ extern "C" {
 
         utf8_print_section_header_pipe(&data);
 
-        if (data.mode & utf8_mode_from_binary_d) {
-          status = utf8_process_file_binary(&data, file);
+        if (data.mode & utf8_mode_from_bytecode_d) {
+          status = utf8_process_file_bytecode(&data, file);
         }
         else {
           status = utf8_process_file_codepoint(&data, file);
         }
 
         if (F_status_is_error(status) && F_status_set_fine(status) != F_utf_fragment) {
-          fll_error_file_print(main->error, F_status_set_fine(status), data.mode & utf8_mode_from_binary_d ? "utf8_process_file_binary" : "utf8_process_file_codepoint", F_true, f_string_empty_s, f_file_operation_process_s, fll_error_file_type_pipe_e);
+          fll_error_file_print(main->error, F_status_set_fine(status), data.mode & utf8_mode_from_bytecode_d ? "utf8_process_file_bytecode" : "utf8_process_file_codepoint", F_true, f_string_empty_s, f_file_operation_process_s, fll_error_file_type_pipe_e);
         }
       }
 
@@ -420,8 +420,8 @@ extern "C" {
             break;
           }
 
-          if (data.mode & utf8_mode_from_binary_d) {
-            status = utf8_process_file_binary(&data, file);
+          if (data.mode & utf8_mode_from_bytecode_d) {
+            status = utf8_process_file_bytecode(&data, file);
           }
           else {
             status = utf8_process_file_codepoint(&data, file);
@@ -436,7 +436,7 @@ extern "C" {
           }
 
           if (F_status_is_error(status) && F_status_set_fine(status) != F_utf_fragment) {
-            fll_error_file_print(main->error, F_status_set_fine(status), data.mode & utf8_mode_from_binary_d ? "utf8_process_file_binary" : "utf8_process_file_codepoint", F_true, data.argv[index], f_file_operation_process_s, fll_error_file_type_file_e);
+            fll_error_file_print(main->error, F_status_set_fine(status), data.mode & utf8_mode_from_bytecode_d ? "utf8_process_file_bytecode" : "utf8_process_file_codepoint", F_true, data.argv[index], f_file_operation_process_s, fll_error_file_type_file_e);
 
             break;
           }
index 1d65baca1d6f490104f431075021b605f96151b4..8d02b14c5d1b12e072289432b5260b87a28cd1f1 100644 (file)
@@ -8,10 +8,10 @@
  * This is intendend to support Unicode 14.0.
  *
  * This is a program for handling basic UTF-8 related conversions.
- *   - Convert from UTF-8 character to binary.
- *   - Convert from Unicode Codepoint (such as U+0000) to binary.
- *   - Convert from UTF-8 binary to character.
- *   - Convert from UTF-8 binary to Unicode Codepoint (such as U+0000).
+ *   - Convert from UTF-8 character to bytecode.
+ *   - Convert from Unicode Codepoint (such as U+0000) to bytecode.
+ *   - Convert from UTF-8 bytecode to character.
+ *   - Convert from UTF-8 bytecode to Unicode Codepoint (such as U+0000).
  */
 #ifndef _utf8_h
 #define _utf8_h
index d33c4b190e43dfc7afb36d3684f379b747f1f693..344825b4a7084548c9557dc54d5a462c6b73b2bf 100644 (file)
@@ -22,7 +22,7 @@ build_libraries-individual -lfll_error -lfll_print -lfll_program -lfl_conversion
 build_libraries-level -lfll_2 -lfll_1 -lfll_0
 build_libraries-monolithic -lfll
 
-build_sources_library utf8.c common.c private-common.c private-print.c private-utf8.c private-utf8_binary.c private-utf8_codepoint.c
+build_sources_library utf8.c common.c private-common.c private-print.c private-utf8.c private-utf8_bytecode.c private-utf8_codepoint.c
 
 build_sources_program main.c