]> Kevux Git Server - fll/commitdiff
Update: Avoid the generic 'char' and switch to the explicit 'unsigned char'.
authorKevin Day <thekevinday@gmail.com>
Tue, 8 Mar 2022 03:12:18 +0000 (21:12 -0600)
committerKevin Day <thekevinday@gmail.com>
Tue, 8 Mar 2022 03:12:18 +0000 (21:12 -0600)
Operations against unsigned are generally safer than the signed equivalents.
Using the generic 'char' may be different between compilers and expecations cannot be guaranteed.
This could result in obscure security issues.

Changing this to 'unsigned char' guarantees consistent behavior.

There are problems with some standard libc functions that expect char.
Explicitly cast to 'char' in these cases.

73 files changed:
level_0/f_account/c/account.c
level_0/f_capability/c/capability.c
level_0/f_color/c/color.c
level_0/f_color/c/color/common.h
level_0/f_console/c/console/common.h
level_0/f_conversion/c/conversion.c
level_0/f_conversion/c/conversion.h
level_0/f_conversion/c/private-conversion.c
level_0/f_conversion/c/private-conversion.h
level_0/f_directory/c/directory.c
level_0/f_file/c/file.c
level_0/f_file/c/private-file.c
level_0/f_file/c/private-file.h
level_0/f_iki/c/private-iki.c
level_0/f_iki/c/private-iki.h
level_0/f_path/c/path.c
level_0/f_print/c/print.c
level_0/f_print/c/print.h
level_0/f_print/c/print/private-to.c
level_0/f_print/c/print/private-to.h
level_0/f_print/c/print/to.c
level_0/f_print/c/print/to.h
level_0/f_print/c/private-print.c
level_0/f_print/c/private-print.h
level_0/f_string/c/private-string.c
level_0/f_string/c/string/common.h
level_0/f_string/c/string/dynamic.c
level_0/f_string/c/string/dynamic.h
level_0/f_type/c/type.h
level_0/f_utf/c/utf/dynamic.c
level_0/f_utf/c/utf/dynamic.h
level_1/fl_control_group/c/control_group.c
level_1/fl_directory/c/directory.c
level_1/fl_directory/c/private-directory.c
level_1/fl_environment/c/environment.c
level_1/fl_fss/c/private-fss.c
level_1/fl_print/c/private-print.c
level_1/fl_string/c/string.c
level_1/fl_utf/c/utf.c
level_1/fl_utf/c/utf.h
level_1/fl_utf_file/c/private-utf_file.c
level_1/fl_utf_file/c/private-utf_file.h
level_1/fl_utf_file/c/utf_file.c
level_2/fll_control_group/c/control_group.c
level_2/fll_execute/c/execute.c
level_2/fll_execute/c/private-execute.c
level_2/fll_file/c/private-file.c
level_2/fll_iki/c/private-iki.c
level_2/fll_iki/c/private-iki.h
level_2/fll_print/c/print.c
level_2/fll_print/c/print.h
level_3/byte_dump/c/private-byte_dump.c
level_3/byte_dump/c/private-byte_dump.h
level_3/controller/c/common/private-control.h
level_3/controller/c/control/private-control.c
level_3/controller/c/control/private-control.h
level_3/controller/c/controller/private-controller.c
level_3/controller/c/entry/private-entry.c
level_3/controller/c/rule/private-rule.c
level_3/controller/c/thread/private-thread_control.c
level_3/controller/documents/packet.txt
level_3/controller/specifications/packet.txt
level_3/fake/c/private-build-library.c
level_3/fake/c/private-build-object.c
level_3/fake/c/private-build-program.c
level_3/fake/c/private-build-skeleton.c
level_3/fake/c/private-build.c
level_3/fake/c/private-make-operate_process_type.c
level_3/fake/c/private-make-operate_validate.c
level_3/fake/c/private-skeleton.c
level_3/firewall/c/firewall.c
level_3/utf8/c/private-utf8_binary.c
level_3/utf8/c/private-utf8_codepoint.c

index 9d67cd36b94b4fbb9dc7f8190e0912b4ccd1f3d0..13c6d3df1dc102bfed87e082fc4c3c977b575526 100644 (file)
@@ -35,7 +35,7 @@ extern "C" {
       // Must be set to 0 to avoid problems due to the design of getpwuid()/getpwuid_r().
       errno = 0;
 
-      char buffer[length];
+      unsigned char buffer[length];
       const int result = getpwuid_r(id, &password, buffer, length, &pointer);
 
       if (result) {
@@ -63,7 +63,7 @@ extern "C" {
 
     length = F_account_pwd_length_fallback_second_d;
 
-    char buffer[F_account_pwd_length_fallback_second_d];
+    unsigned char buffer[F_account_pwd_length_fallback_second_d];
 
     const int result = getpwuid_r(id, &password, buffer, length, &pointer);
 
@@ -116,7 +116,7 @@ extern "C" {
       // Must be set to 0 to avoid problems due to the design of getpwnam()/getpwnam_r().
       errno = 0;
 
-      char buffer[length];
+      unsigned char buffer[length];
       const int result = getpwnam_r(name.string, &password, buffer, length, &pointer);
 
       if (result) {
@@ -144,7 +144,7 @@ extern "C" {
 
     length = F_account_pwd_length_fallback_second_d;
 
-    char buffer[F_account_pwd_length_fallback_second_d];
+    unsigned char buffer[F_account_pwd_length_fallback_second_d];
 
     const int result = getpwnam_r(name.string, &password, buffer, length, &pointer);
 
@@ -189,7 +189,7 @@ extern "C" {
       // Must be set to 0 to avoid problems due to the design of getgrnam()/getgrnam_r().
       errno = 0;
 
-      char buffer[length];
+      unsigned char buffer[length];
       int result = getgrnam_r(name.string, &group_data, buffer, length, &pointer);
 
       if (result) {
@@ -219,7 +219,7 @@ extern "C" {
 
     length = F_account_pwd_length_fallback_second_d;
 
-    char buffer[F_account_pwd_length_fallback_second_d];
+    unsigned char buffer[F_account_pwd_length_fallback_second_d];
 
     const int result = getgrnam_r(name.string, &group_data, buffer, length, &pointer);
 
@@ -270,7 +270,7 @@ extern "C" {
       // Must be set to 0 to avoid problems due to the design of getpwuid()/getpwuid_r().
       errno = 0;
 
-      char buffer[length];
+      unsigned char buffer[length];
       const int result = getgrgid_r(id, &group_data, buffer, length, &pointer);
 
       if (result) {
@@ -308,7 +308,7 @@ extern "C" {
 
     length = F_account_pwd_length_fallback_second_d;
 
-    char buffer[F_account_pwd_length_fallback_second_d];
+    unsigned char buffer[F_account_pwd_length_fallback_second_d];
 
     const int result = getgrgid_r(id, &group_data, buffer, length, &pointer);
 
@@ -363,7 +363,7 @@ extern "C" {
       // Must be set to 0 to avoid problems due to the design of getpwnam()/getpwnam_r().
       errno = 0;
 
-      char buffer[length];
+      unsigned char buffer[length];
       const int result = getpwnam_r(name.string, &password, buffer, length, &pointer);
 
       if (result) {
@@ -393,7 +393,7 @@ extern "C" {
 
     length = F_account_pwd_length_fallback_second_d;
 
-    char buffer[F_account_pwd_length_fallback_second_d];
+    unsigned char buffer[F_account_pwd_length_fallback_second_d];
 
     const int result = getpwnam_r(name.string, &password, buffer, length, &pointer);
 
@@ -444,7 +444,7 @@ extern "C" {
       // Must be set to 0 to avoid problems due to the design of getpwuid()/getpwuid_r().
       errno = 0;
 
-      char buffer[length];
+      unsigned char buffer[length];
       const int result = getpwuid_r(id, &password, buffer, length, &pointer);
 
       if (result) {
@@ -482,7 +482,7 @@ extern "C" {
 
     length = F_account_pwd_length_fallback_second_d;
 
-    char buffer[F_account_pwd_length_fallback_second_d];
+    unsigned char buffer[F_account_pwd_length_fallback_second_d];
 
     const int result = getpwuid_r(id, &password, buffer, length, &pointer);
 
index 6e8fa33fe26b8175f9dad79fcfc11d6089c1cbe2..3c302b9066f1e43866c2506b7102a5355c6a617e 100644 (file)
@@ -1048,7 +1048,7 @@ extern "C" {
         if (!name) return F_status_set_error(F_parameter);
       #endif // _di_level_0_parameter_checking_
 
-      char *result = cap_to_name(code);
+      unsigned char *result = cap_to_name(code);
 
       if (result) {
         const f_array_length_t length = strlen(result);
@@ -1091,7 +1091,7 @@ extern "C" {
 
       ssize_t length = 0;
 
-      char *result = cap_to_text(capability, &length);
+      unsigned char *result = cap_to_text(capability, &length);
 
       if (result) {
         if (text->used + length + 1 > text->size) {
index 6433c35331342afe42501aba54c07d9fd1b03521..b79f05c52c3bee08b7951692cb8414325f495537 100644 (file)
@@ -12,7 +12,7 @@ extern "C" {
 
     // Switch to the appropriate terminal color mode.
     {
-      char *environment = getenv(f_color_terminal_name_s.string);
+      unsigned char *environment = getenv(f_color_terminal_name_s.string);
 
       if (!environment || strncmp(environment, f_color_terminal_value_linux_s.string, f_color_terminal_value_linux_s.used) == 0) {
         macro_f_color_t_set_linux(context->list);
index bd6361d7533e763d68b218622202d427faec6a1d..0337b7da0401dbde9d611a8f6b391756ca7c515c 100644 (file)
@@ -37,7 +37,7 @@ extern "C" {
  *   - xterminal: X-Terminal color code set.
  */
 #ifndef _di_f_color_code_t_
-  typedef char f_color_code_t;
+  typedef unsigned char f_color_code_t;
 
   #define F_color_code_none_d      0
   #define F_color_code_linux_d     1
index e1ced14e5dc5f1ae3fa784789c3bac80131cfab2..63fc65055258063410b870731eabeaa0e500c9b1 100644 (file)
@@ -262,9 +262,9 @@ extern "C" {
  */
 #ifndef _di_f_console_parameter_t_
   typedef struct {
-    const char *symbol_short;
-    const char *symbol_long;
-    const char *symbol_other;
+    const unsigned char *symbol_short;
+    const unsigned char *symbol_long;
+    const unsigned char *symbol_other;
 
     const uint8_t values_total;
     const uint8_t type;
index 18d431205fd625eed4020be03b26d7256c4bcbd9..1e5f664ed95dce483d8b64480bd64bef1b12208e 100644 (file)
@@ -6,7 +6,7 @@ extern "C" {
 #endif
 
 #ifndef _di_f_conversion_character_is_binary_
-  f_status_t f_conversion_character_is_binary(const char character) {
+  f_status_t f_conversion_character_is_binary(const unsigned char character) {
 
     if (character == 0x30 || character == 0x31) {
       return F_true;
@@ -17,7 +17,7 @@ extern "C" {
 #endif // _di_f_conversion_character_is_binary_
 
 #ifndef _di_f_conversion_character_is_decimal_
-  f_status_t f_conversion_character_is_decimal(const char character) {
+  f_status_t f_conversion_character_is_decimal(const unsigned char character) {
 
     if (character > 0x2f && character < 0x3a) {
       return F_true;
@@ -28,7 +28,7 @@ extern "C" {
 #endif // _di_f_conversion_character_is_decimal_
 
 #ifndef _di_f_conversion_character_is_duodecimal_
-  f_status_t f_conversion_character_is_duodecimal(const char character) {
+  f_status_t f_conversion_character_is_duodecimal(const unsigned char character) {
 
     if (character > 0x2f && character < 0x3a) {
       return F_true;
@@ -47,7 +47,7 @@ extern "C" {
 #endif // _di_f_conversion_character_is_duodecimal_
 
 #ifndef _di_f_conversion_character_is_hexidecimal_
-  f_status_t f_conversion_character_is_hexidecimal(const char character) {
+  f_status_t f_conversion_character_is_hexidecimal(const unsigned char character) {
 
     if (character > 0x2f && character < 0x3a) {
       return F_true;
@@ -66,7 +66,7 @@ extern "C" {
 #endif // _di_f_conversion_character_is_hexidecimal_
 
 #ifndef _di_f_conversion_character_is_octal_
-  f_status_t f_conversion_character_is_octal(const char character) {
+  f_status_t f_conversion_character_is_octal(const unsigned char character) {
 
     if (character > 0x2f && character < 0x38) {
       return F_true;
@@ -77,7 +77,7 @@ extern "C" {
 #endif // _di_f_conversion_character_is_octal_
 
 #ifndef _di_f_conversion_character_to_binary_
-  f_status_t f_conversion_character_to_binary(const char character, uint8_t * const number) {
+  f_status_t f_conversion_character_to_binary(const unsigned char character, uint8_t * const number) {
     #ifndef _di_level_0_parameter_checking_
       if (!number) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
@@ -95,7 +95,7 @@ extern "C" {
 #endif // _di_f_conversion_character_to_binary_
 
 #ifndef _di_f_conversion_character_to_decimal_
-  f_status_t f_conversion_character_to_decimal(const char character, uint8_t * const number) {
+  f_status_t f_conversion_character_to_decimal(const unsigned char character, uint8_t * const number) {
     #ifndef _di_level_0_parameter_checking_
       if (!number) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
@@ -111,7 +111,7 @@ extern "C" {
 #endif // _di_f_conversion_character_to_decimal_
 
 #ifndef _di_f_conversion_character_to_duodecimal_
-  f_status_t f_conversion_character_to_duodecimal(const char character, uint8_t * const number) {
+  f_status_t f_conversion_character_to_duodecimal(const unsigned char character, uint8_t * const number) {
     #ifndef _di_level_0_parameter_checking_
       if (!number) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
@@ -133,7 +133,7 @@ extern "C" {
 #endif // _di_f_conversion_character_to_duodecimal_
 
 #ifndef _di_f_conversion_character_to_hexidecimal_
-  f_status_t f_conversion_character_to_hexidecimal(const char character, uint8_t * const number) {
+  f_status_t f_conversion_character_to_hexidecimal(const unsigned char character, uint8_t * const number) {
     #ifndef _di_level_0_parameter_checking_
       if (!number) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
@@ -155,7 +155,7 @@ extern "C" {
 #endif // _di_f_conversion_character_to_hexidecimal_
 
 #ifndef _di_f_conversion_character_to_octal_
-  f_status_t f_conversion_character_to_octal(const char character, uint8_t * const number) {
+  f_status_t f_conversion_character_to_octal(const unsigned char character, uint8_t * const number) {
     #ifndef _di_level_0_parameter_checking_
       if (!number) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
index d5764a8d885562235688650e7f2379808fc1d61d..69a8b7ee87dc82690835fb1f68c580d7ff36b5f2 100644 (file)
@@ -47,7 +47,7 @@ extern "C" {
  *   F_false if character is not a binary.
  */
 #ifndef _di_f_conversion_character_is_binary_
-  extern f_status_t f_conversion_character_is_binary(const char character);
+  extern f_status_t f_conversion_character_is_binary(const unsigned char character);
 #endif // _di_f_conversion_character_is_binary_
 
 /**
@@ -65,7 +65,7 @@ extern "C" {
  *   F_false if character is not a decimal.
  */
 #ifndef _di_f_conversion_character_is_decimal_
-  extern f_status_t f_conversion_character_is_decimal(const char character);
+  extern f_status_t f_conversion_character_is_decimal(const unsigned char character);
 #endif // _di_f_conversion_character_is_decimal_
 
 /**
@@ -85,7 +85,7 @@ extern "C" {
  *   F_false if character is not a duodecimal.
  */
 #ifndef _di_f_conversion_character_is_duodecimal_
-  extern f_status_t f_conversion_character_is_duodecimal(const char character);
+  extern f_status_t f_conversion_character_is_duodecimal(const unsigned char character);
 #endif // _di_f_conversion_character_is_duodecimal_
 
 /**
@@ -109,7 +109,7 @@ extern "C" {
  *   F_false if character is not a hexidecimal.
  */
 #ifndef _di_f_conversion_character_is_hexidecimal_
-  extern f_status_t f_conversion_character_is_hexidecimal(const char character);
+  extern f_status_t f_conversion_character_is_hexidecimal(const unsigned char character);
 #endif // _di_f_conversion_character_is_hexidecimal_
 
 /**
@@ -127,7 +127,7 @@ extern "C" {
  *   F_false if character is not an octal.
  */
 #ifndef _di_f_conversion_character_is_octal_
-  extern f_status_t f_conversion_character_is_octal(const char character);
+  extern f_status_t f_conversion_character_is_octal(const unsigned char character);
 #endif // _di_f_conversion_character_is_octal_
 
 /**
@@ -146,7 +146,7 @@ extern "C" {
  *   F_parameter (with error bit) if a parameter is invalid.
  */
 #ifndef _di_f_conversion_character_to_binary_
-  extern f_status_t f_conversion_character_to_binary(const char character, uint8_t * const number);
+  extern f_status_t f_conversion_character_to_binary(const unsigned char character, uint8_t * const number);
 #endif // _di_f_conversion_character_to_binary_
 
 /**
@@ -165,7 +165,7 @@ extern "C" {
  *   F_parameter (with error bit) if a parameter is invalid.
  */
 #ifndef _di_f_conversion_character_to_decimal_
-  extern f_status_t f_conversion_character_to_decimal(const char character, uint8_t * const number);
+  extern f_status_t f_conversion_character_to_decimal(const unsigned char character, uint8_t * const number);
 #endif // _di_f_conversion_character_to_decimal_
 
 /**
@@ -184,7 +184,7 @@ extern "C" {
  *   F_parameter (with error bit) if a parameter is invalid.
  */
 #ifndef _di_f_conversion_character_to_duodecimal_
-  extern f_status_t f_conversion_character_to_duodecimal(const char character, uint8_t * const number);
+  extern f_status_t f_conversion_character_to_duodecimal(const unsigned char character, uint8_t * const number);
 #endif // _di_f_conversion_character_to_duodecimal_
 
 /**
@@ -203,7 +203,7 @@ extern "C" {
  *   F_parameter (with error bit) if a parameter is invalid.
  */
 #ifndef _di_f_conversion_character_to_hexidecimal_
-  extern f_status_t f_conversion_character_to_hexidecimal(const char character, uint8_t * const number);
+  extern f_status_t f_conversion_character_to_hexidecimal(const unsigned char character, uint8_t * const number);
 #endif // _di_f_conversion_character_to_hexidecimal_
 
 /**
@@ -222,7 +222,7 @@ extern "C" {
  *   F_parameter (with error bit) if a parameter is invalid.
  */
 #ifndef _di_f_conversion_character_to_octal_
-  extern f_status_t f_conversion_character_to_octal(const char character, uint8_t * const number);
+  extern f_status_t f_conversion_character_to_octal(const unsigned char character, uint8_t * const number);
 #endif // _di_f_conversion_character_to_octal_
 
 /**
index 4c216a4525e8dde6c865a95ce3b4194714f13204..3cbbe05bdb60d20d7a2fbc4bdb46c5bd9e749dfb 100644 (file)
@@ -121,7 +121,7 @@ extern "C" {
     f_number_unsigned_t current = number;
     f_number_unsigned_t work = 0;
 
-    for (char c = 0; digits; --digits) {
+    for (unsigned char c = 0; digits; --digits) {
 
       work = current / power;
       current -= work * power;
@@ -188,7 +188,7 @@ extern "C" {
         return F_status_set_error(F_output);
       }
 
-      char c = 0;
+      unsigned char c = 0;
 
       switch (data.base) {
         case 2:
@@ -320,7 +320,7 @@ extern "C" {
     f_number_unsigned_t current = number;
     f_number_unsigned_t work = 0;
 
-    for (char c = 0; digits; --digits) {
+    for (unsigned char c = 0; digits; --digits) {
 
       work = current / power;
       current -= work * power;
@@ -344,7 +344,7 @@ extern "C" {
 #endif // !defined(_di_f_conversion_number_signed_to_string_) || !defined(_di_f_conversion_number_unsigned_to_string_)
 
 #if !defined(_di_f_conversion_number_signed_to_string_) || !defined(_di_f_conversion_number_unsigned_to_string_)
-  void private_f_conversion_digit_to_string_pad(const f_conversion_data_t data, const char pad, int total, f_string_dynamic_t * const destination) {
+  void private_f_conversion_digit_to_string_pad(const f_conversion_data_t data, const unsigned char pad, int total, f_string_dynamic_t * const destination) {
 
     for (; total; --total) {
       destination->string[destination->used++] = pad;
@@ -373,7 +373,7 @@ extern "C" {
     if (data.flag & F_conversion_data_flag_base_prepend_d) {
       destination->string[destination->used++] = f_string_ascii_0_s.string[0];
 
-      char c = 0;
+      unsigned char c = 0;
 
       switch (data.base) {
         case 2:
index 625772360750cd75922a845c6dec4aa3e195d828..8eb99ecfb3da2a5a423122e3bbee09d8fd12d8df 100644 (file)
@@ -213,7 +213,7 @@ extern "C" {
  * @see f_conversion_number_unsigned_to_string()
  */
 #if !defined(_di_f_conversion_number_signed_to_string_) || !defined(_di_f_conversion_number_unsigned_to_string_)
-  extern void private_f_conversion_digit_to_string_pad(const f_conversion_data_t data, const char pad, int total, f_string_dynamic_t * const destination) F_attribute_visibility_internal_d;
+  extern void private_f_conversion_digit_to_string_pad(const f_conversion_data_t data, const unsigned char pad, int total, f_string_dynamic_t * const destination) F_attribute_visibility_internal_d;
 #endif // !defined(_di_f_conversion_number_signed_to_string_) || !defined(_di_f_conversion_number_unsigned_to_string_)
 
 /**
index 15777280b07c5016afbb2748b879d1b250c300ef..f3ba1a8cc380c880ec39584b71bb86ef075f9ec9 100644 (file)
@@ -188,7 +188,7 @@ extern "C" {
 
       // There is no reason to include "." and ".." in the directory listing.
       if (!strncmp(listing[i]->d_name, "..", 3) || !strncmp(listing[i]->d_name, ".", 2))  {
-        f_memory_delete(size, sizeof(char *), (void **) & listing[i]);
+        f_memory_delete(size, sizeof(unsigned char *), (void **) & listing[i]);
 
         continue;
       }
@@ -206,11 +206,11 @@ extern "C" {
       memcpy(names->array[names->used].string, listing[i]->d_name, size);
       names->array[names->used++].used = size;
 
-      f_memory_delete(size, sizeof(char *), (void **) & listing[i]);
+      f_memory_delete(size, sizeof(unsigned char *), (void **) & listing[i]);
     } // for
 
     for (; i < length; ++i) {
-      f_memory_delete(size, sizeof(char *), (void **) & listing[i]);
+      f_memory_delete(size, sizeof(unsigned char *), (void **) & listing[i]);
     } // for
 
     f_memory_delete(1, sizeof(struct dirent *), (void **) & listing);
@@ -324,7 +324,7 @@ extern "C" {
     int result = 0;
 
     if (depth_max) {
-      result = nftw(path.string, private_f_directory_remove_recursively, depth_max, FTW_DEPTH | FTW_PHYS);
+      result = nftw((char *) path.string, private_f_directory_remove_recursively, depth_max, FTW_DEPTH | FTW_PHYS);
 
       if (result == 0 && !preserve) {
         result = remove(path.string);
@@ -378,7 +378,7 @@ extern "C" {
     int result = 0;
 
     if (depth_max) {
-      result = nftw(path.string, custom, depth_max, FTW_DEPTH | FTW_PHYS);
+      result = nftw((char *) path.string, custom, depth_max, FTW_DEPTH | FTW_PHYS);
 
       if (result == 0 && !preserve) {
         result = remove(path.string);
index e5a60acd84a8f29eb6796c9f38d9f6de48580405..6d213d73af1c86c0154da6af26445d3116eff8b5 100644 (file)
@@ -1392,7 +1392,7 @@ extern "C" {
     }
 
     // POSIX basename() modifies the path, so protect it (and add a terminating NULL).
-    char path_argument[path.used + 1];
+    unsigned char path_argument[path.used + 1];
     f_string_t path_to_name;
 
     memcpy(path_argument, path.string, path.used);
@@ -1424,7 +1424,7 @@ extern "C" {
     }
 
     // POSIX dirname() modifies the path, so protect it (and add a terminating NULL).
-    char path_argument[path.used + 1];
+    unsigned char path_argument[path.used + 1];
     f_string_t path_to_name;
 
     memcpy(path_argument, path.string, path.used);
index d7fe2c29c6e1526f4380cbbda64cad2550ed5c14..b1ced975137b0a9fb07b1c1981b056e756ef8dc3 100644 (file)
@@ -60,7 +60,7 @@ extern "C" {
 
     ssize_t size_read = 0;
     ssize_t size_write = 0;
-    char *buffer[size_block];
+    unsigned char *buffer[size_block];
 
     memset(buffer, 0, size_block);
 
@@ -109,7 +109,7 @@ extern "C" {
 
     ssize_t size_read = 0;
     ssize_t size_write = 0;
-    char *buffer[size_block];
+    unsigned char *buffer[size_block];
 
     memset(buffer, 0, size_block);
 
@@ -761,7 +761,7 @@ extern "C" {
 #endif // !defined(_di_f_file_stat_by_id_) || !defined(_di_f_file_size_by_id_)
 
 #if !defined(_di_f_file_stream_descriptor_) || !defined(_di_f_file_stream_open_) || !defined(_di_f_file_stream_reopen_)
-  const char *private_f_file_stream_open_mode_determine(const int flag) {
+  const unsigned char *private_f_file_stream_open_mode_determine(const int flag) {
 
     if (flag & F_file_flag_read_write_d) {
       if (flag & F_file_flag_truncate_d) {
index adfd7d896f8606cbf26a899c7b2211791aa1f8a6..f9cc2723bff8de48ae7df4fb73780ace55e84f05 100644 (file)
@@ -903,7 +903,7 @@ extern "C" {
  * @see f_file_stream_reopen()
  */
 #if !defined(_di_f_file_stream_descriptor_) || !defined(_di_f_file_stream_open_) || !defined(_di_f_file_stream_reopen_)
-  extern const char *private_f_file_stream_open_mode_determine(const int flag) F_attribute_visibility_internal_d;
+  extern const unsigned char *private_f_file_stream_open_mode_determine(const int flag) F_attribute_visibility_internal_d;
 #endif // !defined(_di_f_file_stream_descriptor_) || !defined(_di_f_file_stream_open_) || !defined(_di_f_file_stream_reopen_)
 
 /**
index 03a9e6c69e15678d0dadb172f4f924bbe7beafbf..a5b2daa542a6dda160ca941f0b5ae1ae91618e34 100644 (file)
@@ -82,7 +82,7 @@ extern "C" {
 #endif // !defined(_di_f_iki_datas_append_) || !defined(_di_f_iki_datas_decrease_by_) || !defined(_di_f_iki_datas_increase_) || !defined(_di_f_iki_datas_increase_by_) || !defined(_di_f_iki_datas_resize_)
 
 #if !defined(_di_f_iki_content_is_) || !defined(_di_f_iki_content_partial_is_)
-  f_status_t private_f_iki_content_partial_is(const f_string_t buffer, const f_array_length_t length, const char quote) {
+  f_status_t private_f_iki_content_partial_is(const f_string_t buffer, const f_array_length_t length, const unsigned char quote) {
 
     f_array_length_t delimits = 0;
 
index 9632a568208189a7e241fdc599deb20eac7486cd..c6b5653df36c54608c0be52b31268649f62e83c7 100644 (file)
@@ -92,7 +92,7 @@ extern "C" {
  * @see f_iki_content_partial_is()
  */
 #if !defined(_di_f_iki_content_is_) || !defined(_di_f_iki_content_partial_is_)
-  extern f_status_t private_f_iki_content_partial_is(const f_string_t buffer, const f_array_length_t length, const char quote) F_attribute_visibility_internal_d;
+  extern f_status_t private_f_iki_content_partial_is(const f_string_t buffer, const f_array_length_t length, const unsigned char quote) F_attribute_visibility_internal_d;
 #endif // !defined(_di_f_iki_content_is_) || !defined(_di_f_iki_content_partial_is_)
 
 /**
index 51bbd0424fc79b138281ac947b012cfc6bfaadf1..817ac5470c455f86f276aae65f5c5d6b146ef2d4 100644 (file)
@@ -55,7 +55,7 @@ extern "C" {
       if (!path) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
 
-    char buffer[F_path_length_max_d];
+    unsigned char buffer[F_path_length_max_d];
 
     if (!getcwd(buffer, F_path_length_max_d)) {
       if (errno == EACCES) return F_status_set_error(F_access_denied);
index 5a19956feffa8f7a005b7912af19fad646fb2917..368dff084f5ff50946c9a03c72a7826835444a42 100644 (file)
@@ -20,7 +20,7 @@ extern "C" {
 #endif // _di_f_print_
 
 #ifndef _di_f_print_character_
-  f_status_t f_print_character(const char character, FILE * const output) {
+  f_status_t f_print_character(const unsigned char character, FILE * const output) {
     #ifndef _di_level_0_parameter_checking_
       if (!output) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
@@ -34,7 +34,7 @@ extern "C" {
 #endif // _di_f_print_character_
 
 #ifndef _di_f_print_character_safely_
-  f_status_t f_print_character_safely(const char character, FILE * const output) {
+  f_status_t f_print_character_safely(const unsigned char character, FILE * const output) {
     #ifndef _di_level_0_parameter_checking_
       if (!output) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
@@ -65,7 +65,7 @@ extern "C" {
 #endif // _di_f_print_character_safely_
 
 #ifndef _di_f_print_character_safely_get_
-  const f_string_static_t f_print_character_safely_get(const char character) {
+  const f_string_static_t f_print_character_safely_get(const unsigned char character) {
 
     return private_f_print_character_safely_get(character);
   }
index 65268a20d99689cd7ec7c151dfc8bafc75b42852..4289d63eb25184f54ea52f787f9cdf871f37e7cb 100644 (file)
@@ -85,7 +85,7 @@ extern "C" {
  * @see fwrite_unlocked()
  */
 #ifndef _di_f_print_character_
-  extern f_status_t f_print_character(const char character, FILE * const output);
+  extern f_status_t f_print_character(const unsigned char character, FILE * const output);
 #endif // _di_f_print_character_
 
 /**
@@ -116,7 +116,7 @@ extern "C" {
  * @see fwrite_unlocked()
  */
 #ifndef _di_f_print_character_safely_
-  extern f_status_t f_print_character_safely(const char character, FILE * const output);
+  extern f_status_t f_print_character_safely(const unsigned char character, FILE * const output);
 #endif // _di_f_print_character_safely_
 
 /**
@@ -140,7 +140,7 @@ extern "C" {
  *   A string with a non-zero used length is returned are NULL terminated (after the used length).
  */
 #ifndef _di_f_print_character_safely_get_
-  extern const f_string_static_t f_print_character_safely_get(const char character);
+  extern const f_string_static_t f_print_character_safely_get(const unsigned char character);
 #endif // _di_f_print_character_safely_get_
 
 /**
index fc4ed2a804489b688ed3936a4c5458d2dcf3954f..6df7b81d527f71e68d7222616ebbda29ff59362a 100644 (file)
@@ -65,7 +65,7 @@ static inline f_status_t private_inline_f_print_to_error(void) {
 #endif // !defined(_di_f_print_to_) || !defined(_di_f_print_dynamic_to_) || !defined(_di_f_print_dynamic_partial_to_)
 
 #if !defined(_di_f_print_to_character_safely_) || !defined(_di_f_print_to_safely_) || !defined(_di_f_print_to_safely_dynamic_) || !defined(_di_f_print_to_safely_dynamic_partial_) || !defined(_di_f_print_to_safely_terminated_) || !defined(_di_f_print_to_except_safely_) || !defined(_di_f_print_to_except_dynamic_safely_) || !defined(_di_f_print_to_except_dynamic_partial_safely_) || !defined(_di_f_print_to_except_in_safely_) || !defined(_di_f_print_to_except_in_dynamic_safely_) || !defined(_di_f_print_to_except_in_dynamic_partial_safely_)
-  f_status_t private_f_print_to_character_safely(const char character, const int id) {
+  f_status_t private_f_print_to_character_safely(const unsigned char character, const int id) {
 
     if (character == 0x7f) {
       if (write(id, f_print_sequence_delete_s.string, f_print_sequence_delete_s.used) != -1) {
index ec2f2a3f3fab9bbe9d6f7cad444ecadb5f24bec2..dc1570c4eae65067d21c20cc5184603b7ff3e22c 100644 (file)
@@ -102,7 +102,7 @@ extern "C" {
  * @see f_print_to_except_in_dynamic_partial_safely()
  */
 #if !defined(_di_f_print_to_character_safely_) || !defined(_di_f_print_to_safely_) || !defined(_di_f_print_to_safely_dynamic_) || !defined(_di_f_print_to_safely_dynamic_partial_) || !defined(_di_f_print_to_safely_terminated_) || !defined(_di_f_print_to_except_safely_) || !defined(_di_f_print_to_except_dynamic_safely_) || !defined(_di_f_print_to_except_dynamic_partial_safely_) || !defined(_di_f_print_to_except_in_safely_) || !defined(_di_f_print_to_except_in_dynamic_safely_) || !defined(_di_f_print_to_except_in_dynamic_partial_safely_)
-  extern f_status_t private_f_print_to_character_safely(const char character, const int id) F_attribute_visibility_internal_d;
+  extern f_status_t private_f_print_to_character_safely(const unsigned char character, const int id) F_attribute_visibility_internal_d;
 #endif // !defined(_di_f_print_to_character_safely_) || !defined(_di_f_print_to_safely_) || !defined(_di_f_print_to_safely_dynamic_) || !defined(_di_f_print_to_safely_dynamic_partial_) || !defined(_di_f_print_to_safely_terminated_) || !defined(_di_f_print_to_except_safely_) || !defined(_di_f_print_to_except_dynamic_safely_) || !defined(_di_f_print_to_except_dynamic_partial_safely_) || !defined(_di_f_print_to_except_in_safely_) || !defined(_di_f_print_to_except_in_dynamic_safely_) || !defined(_di_f_print_to_except_in_dynamic_partial_safely_)
 
 /**
index c6428999d93d2a971f9d0b959f6886340cba2be3..acdb4c4195ac219ea75b0674802ecdec91b9d8bd 100644 (file)
@@ -46,7 +46,7 @@ static inline f_status_t private_inline_f_print_to_error(void) {
 #endif // _di_f_print_to_
 
 #ifndef _di_f_print_to_character_
-  f_status_t f_print_to_character(const char character, const int id) {
+  f_status_t f_print_to_character(const unsigned char character, const int id) {
     #ifndef _di_level_0_parameter_checking_
       if (id == -1) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
@@ -60,7 +60,7 @@ static inline f_status_t private_inline_f_print_to_error(void) {
 #endif // _di_f_print_to_character_
 
 #ifndef _di_f_print_to_character_safely_
-  f_status_t f_print_to_character_safely(const char character, const int id) {
+  f_status_t f_print_to_character_safely(const unsigned char character, const int id) {
     #ifndef _di_level_0_parameter_checking_
       if (id == -1) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
index 01437ca43a3114b626572cecbeaef3a02092af0b..0ccb584e6bb1d33f82bc3854c53cd3ad3be2247b 100644 (file)
@@ -91,7 +91,7 @@ extern "C" {
  * @see write()
  */
 #ifndef _di_f_print_to_character_
-  extern f_status_t f_print_to_character(const char character, const int id);
+  extern f_status_t f_print_to_character(const unsigned char character, const int id);
 #endif // _di_f_print_to_character_
 
 /**
@@ -131,7 +131,7 @@ extern "C" {
  * @see write()
  */
 #ifndef _di_f_print_to_character_safely_
-  extern f_status_t f_print_to_character_safely(const char character, const int id);
+  extern f_status_t f_print_to_character_safely(const unsigned char character, const int id);
 #endif // _di_f_print_to_character_safely_
 
 /**
index 6bed169e91e2d07d8d3953d839a33cc5021b39b9..cfaa9715f1c4bca9009e10b7a940247f6ad7b81a 100644 (file)
@@ -39,7 +39,7 @@ extern "C" {
 #endif // !defined(_di_f_print_) || !defined(_di_f_print_dynamic_) || !defined(_di_f_print_dynamic_partial_)
 
 #if !defined(_di_f_print_character_safely_get_) || !defined(_di_f_print_dynamic_partial_safely_) || !defined(_di_f_print_dynamic_safely_) || !defined(_di_f_print_except_dynamic_partial_safely_) || !defined(_di_f_print_except_dynamic_safely_) || !defined(_di_f_print_except_in_dynamic_safely_) || !defined(_di_f_print_except_in_dynamic_partial_safely_) || !defined(_di_f_print_except_in_safely_) || !defined(_di_f_print_except_safely_) || !defined(_di_f_print_safely_) || !defined(_di_f_print_safely_terminated_) || !defined(_di_f_print_to_dynamic_partial_safely_) || !defined(_di_f_print_to_dynamic_safely_) || !defined(_di_f_print_to_except_dynamic_partial_safely_) || !defined(_di_f_print_to_except_dynamic_safely_) || !defined(_di_f_print_to_except_in_dynamic_safely_) || !defined(_di_f_print_to_except_in_dynamic_partial_safely_) || !defined(_di_f_print_to_except_in_safely_) || !defined(_di_f_print_to_except_safely_) || !defined(_di_f_print_to_safely_)
-  const f_string_static_t private_f_print_character_safely_get(const char character) {
+  const f_string_static_t private_f_print_character_safely_get(const unsigned char character) {
 
     if (character == 0x7f) {
       return f_print_sequence_delete_s;
index a729d1c5e8ae882a4051bfd34942daed90c93e5d..d60dbe083653937227adec9cf489c4f8c42006b5 100644 (file)
@@ -76,7 +76,7 @@ extern "C" {
  * @see f_print_except_in_dynamic_partial_safely()
  */
 #if !defined(_di_f_print_character_safely_) || !defined(_di_f_print_safely_) || !defined(_di_f_print_safely_dynamic_) || !defined(_di_f_print_safely_dynamic_partial_) || !defined(_di_f_print_safely_terminated_) || !defined(_di_f_print_except_safely_) || !defined(_di_f_print_except_dynamic_safely_) || !defined(_di_f_print_except_dynamic_partial_safely_) || !defined(_di_f_print_except_in_safely_) || !defined(_di_f_print_except_in_dynamic_safely_) || !defined(_di_f_print_except_in_dynamic_partial_safely_)
-  extern f_status_t private_f_print_character_safely(const char character, FILE * const output) F_attribute_visibility_internal_d;
+  extern f_status_t private_f_print_character_safely(const unsigned char character, FILE * const output) F_attribute_visibility_internal_d;
 #endif // !defined(_di_f_print_character_safely_) || !defined(_di_f_print_safely_) || !defined(_di_f_print_safely_dynamic_) || !defined(_di_f_print_safely_dynamic_partial_) || !defined(_di_f_print_safely_terminated_) || !defined(_di_f_print_except_safely_) || !defined(_di_f_print_except_dynamic_safely_) || !defined(_di_f_print_except_dynamic_partial_safely_) || !defined(_di_f_print_except_in_safely_) || !defined(_di_f_print_except_in_dynamic_safely_) || !defined(_di_f_print_except_in_dynamic_partial_safely_)
 
 /**
@@ -115,7 +115,7 @@ extern "C" {
  * @see f_print_to_safely()
  */
 #if !defined(_di_f_print_character_safely_get_) || !defined(_di_f_print_dynamic_partial_safely_) || !defined(_di_f_print_dynamic_safely_) || !defined(_di_f_print_except_dynamic_partial_safely_) || !defined(_di_f_print_except_dynamic_safely_) || !defined(_di_f_print_except_in_dynamic_safely_) || !defined(_di_f_print_except_in_dynamic_partial_safely_) || !defined(_di_f_print_except_in_safely_) || !defined(_di_f_print_except_safely_) || !defined(_di_f_print_safely_) || !defined(_di_f_print_safely_terminated_) || !defined(_di_f_print_to_dynamic_partial_safely_) || !defined(_di_f_print_to_dynamic_safely_) || !defined(_di_f_print_to_except_dynamic_partial_safely_) || !defined(_di_f_print_to_except_dynamic_safely_) || !defined(_di_f_print_to_except_in_dynamic_safely_) || !defined(_di_f_print_to_except_in_dynamic_partial_safely_) || !defined(_di_f_print_to_except_in_safely_) || !defined(_di_f_print_to_except_safely_) || !defined(_di_f_print_to_safely_)
-  extern const f_string_static_t private_f_print_character_safely_get(const char character) F_attribute_visibility_internal_d;
+  extern const f_string_static_t private_f_print_character_safely_get(const unsigned char character) F_attribute_visibility_internal_d;
 #endif // !defined(_di_f_print_character_safely_get_) || !defined(_di_f_print_dynamic_partial_safely_) || !defined(_di_f_print_dynamic_safely_) || !defined(_di_f_print_except_dynamic_partial_safely_) || !defined(_di_f_print_except_dynamic_safely_) || !defined(_di_f_print_except_in_dynamic_safely_) || !defined(_di_f_print_except_in_dynamic_partial_safely_) || !defined(_di_f_print_except_in_safely_) || !defined(_di_f_print_except_safely_) || !defined(_di_f_print_safely_) || !defined(_di_f_print_safely_terminated_) || !defined(_di_f_print_to_dynamic_partial_safely_) || !defined(_di_f_print_to_dynamic_safely_) || !defined(_di_f_print_to_except_dynamic_partial_safely_) || !defined(_di_f_print_to_except_dynamic_safely_) || !defined(_di_f_print_to_except_in_dynamic_safely_) || !defined(_di_f_print_to_except_in_dynamic_partial_safely_) || !defined(_di_f_print_to_except_in_safely_) || !defined(_di_f_print_to_except_safely_) || !defined(_di_f_print_to_safely_)
 
 /**
index 9d046b5de279616a2b8c8c0e346b723a7abc0fc6..56b6bbe486b9e0269fa46b978b5e316ba3ac24fd 100644 (file)
@@ -75,7 +75,7 @@ extern "C" {
 #if !defined(_di_f_string_dynamic_adjust_) || !defined(_di_f_string_dynamic_decimate_by_) || !defined(_di_f_string_dynamics_adjust_) || !defined(_di_f_string_dynamics_append_) || !defined(_di_f_string_dynamics_decimate_by_) || !defined(_di_f_string_map_multis_adjust_) || !defined(_di_f_string_map_multis_append_) || !defined(_di_f_string_triples_adjust_) || !defined(_di_f_string_triples_decimate_by_)
   f_status_t private_f_string_dynamic_adjust(const f_array_length_t length, f_string_dynamic_t * const dynamic) {
 
-    f_status_t status = f_memory_adjust(dynamic->size, length, sizeof(char), (void **) & dynamic->string);
+    f_status_t status = f_memory_adjust(dynamic->size, length, sizeof(unsigned char), (void **) & dynamic->string);
 
     if (F_status_is_error_not(status)) {
       dynamic->size = length;
@@ -107,7 +107,7 @@ extern "C" {
 #if !defined(_di_f_string_append_) || !defined(_di_f_string_append_assure_) || !defined(_di_f_string_append_mash_) || !defined(_di_f_string_append_nulless_) || !defined(_di_f_string_dynamic_append_) || !defined(_di_f_string_dynamic_append_assure_) || !defined(_di_f_string_dynamic_append_nulless_) || !defined(_di_f_string_dynamic_decrease_by_) || !defined(_di_f_string_dynamic_increase_) || !defined(_di_f_string_dynamic_increase_by_) || !defined(_di_f_string_dynamic_mash_) || !defined(_di_f_string_dynamic_mash_nulless_) || !defined(f_string_dynamic_partial_append) || !defined(_di_f_string_dynamic_partial_append_assure_) || !defined(_di_f_string_dynamic_partial_mash_) || !defined(_di_f_string_dynamic_prepend_) || !defined(_di_f_string_dynamic_prepend_nulless_) || !defined(_di_f_string_dynamic_terminate_) || !defined(_di_f_string_dynamic_terminate_after_) || !defined(_di_f_string_dynamics_append_) || !defined(_di_f_string_map_multis_append_) || !defined(_di_f_string_mash_nulless_) || !defined(_di_f_string_mash_) || !defined(_di_f_string_maps_append_) || !defined(_di_f_string_prepend_) || !defined(_di_f_string_prepend_nulless_) || !defined(_di_f_string_triples_append_)
   f_status_t private_f_string_dynamic_resize(const f_array_length_t length, f_string_dynamic_t * const dynamic) {
 
-    const f_status_t status = f_memory_resize(dynamic->size, length, sizeof(char), (void **) & dynamic->string);
+    const f_status_t status = f_memory_resize(dynamic->size, length, sizeof(unsigned char), (void **) & dynamic->string);
 
     if (F_status_is_error_not(status)) {
       dynamic->size = length;
index 05f9433920f2e6f8ecda1b2d8d996b62ca162a20..ecee027ec733b5c22ecab27f947d4b790404543f 100644 (file)
@@ -21,7 +21,7 @@ extern "C" {
  *      therefore this gets defined here.
  */
 #ifdef _en_BUG_strnlen_
-  extern size_t strnlen(const char * const string, size_t max_length);
+  extern size_t strnlen(const unsigned char * const string, size_t max_length);
 #endif // _en_BUG_strnlen_
 
 /**
@@ -36,7 +36,7 @@ extern "C" {
  * F_string_t_size_d is provided to help safely navigate this.
  */
 #ifndef _di_f_string_t_
-  typedef char *f_string_t;
+  typedef unsigned char *f_string_t;
 
   #define f_string_t_initialize 0
 
@@ -67,7 +67,7 @@ extern "C" {
  * When "f_string_constant_t * xxx" is passed to a function, then "xxx" can be changed.
  */
 #ifndef _di_f_string_constant_t_
-  typedef const char *f_string_constant_t;
+  typedef const unsigned char *f_string_constant_t;
 
   #define f_string_constant_t_initialize 0
 
index 2a1eed137e28a3dd9c8500f3e8ed6c6cf8c412c8..1b48d8ccce8ca888b37a2ca7ea0cdf8dfb20f9c5 100644 (file)
@@ -795,7 +795,7 @@ extern "C" {
 #endif // _di_f_string_dynamic_seek_line_
 
 #ifndef _di_f_string_dynamic_seek_line_to_
-  f_status_t f_string_dynamic_seek_line_to(const f_string_static_t buffer, const char seek_to_this, f_string_range_t * const range) {
+  f_status_t f_string_dynamic_seek_line_to(const f_string_static_t buffer, const unsigned char seek_to_this, f_string_range_t * const range) {
     #ifndef _di_level_0_parameter_checking_
       if (!range) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
@@ -818,7 +818,7 @@ extern "C" {
 #endif // _di_f_string_dynamic_seek_line_to_
 
 #ifndef _di_f_string_dynamic_seek_to_
-  f_status_t f_string_dynamic_seek_to(const f_string_static_t buffer, const char seek_to_this, f_string_range_t * const range) {
+  f_status_t f_string_dynamic_seek_to(const f_string_static_t buffer, const unsigned char seek_to_this, f_string_range_t * const range) {
     #ifndef _di_level_0_parameter_checking_
       if (!range) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
index 86ff8b1d741fb747c592e4d4add5f7d61c2e828a..51366f2c2aa22b0e5c18d30f43ae014c06f035bd 100644 (file)
@@ -913,7 +913,7 @@ extern "C" {
  *   Errors (with error bit) from: f_memory_resize().
  */
 #ifndef _di_f_string_dynamic_seek_line_to_
-  extern f_status_t f_string_dynamic_seek_line_to(const f_string_static_t buffer, const char seek_to_this, f_string_range_t * const range);
+  extern f_status_t f_string_dynamic_seek_line_to(const f_string_static_t buffer, const unsigned char seek_to_this, f_string_range_t * const range);
 #endif // _di_f_string_dynamic_seek_line_to_
 
 /**
@@ -939,7 +939,7 @@ extern "C" {
  *   Errors (with error bit) from: f_memory_resize().
  */
 #ifndef _di_f_string_dynamic_seek_to_
-  extern f_status_t f_string_dynamic_seek_to(const f_string_static_t buffer, const char seek_to_this, f_string_range_t * const range);
+  extern f_status_t f_string_dynamic_seek_to(const f_string_static_t buffer, const unsigned char seek_to_this, f_string_range_t * const range);
 #endif // _di_f_string_dynamic_seek_to_
 
 /**
index 4db4cec1bb9b71b35299921e5dcc6581b920346c..4b5652abc2fd91548188bf9235c5252e7be26ee8 100644 (file)
@@ -1174,7 +1174,7 @@ extern "C" {
  */
 #ifndef _di_f_fll_id_t_
   typedef struct {
-    char name[64];
+    unsigned char name[64];
 
     uint16_t type;
     uint8_t used;
index c856ccb57565af6762a5d725b4f5c8a465e03b3a..6aecfa32b906d9cc55a02a67f64840a42910b557 100644 (file)
@@ -774,7 +774,7 @@ extern "C" {
 #endif // _di_f_utf_string_dynamic_seek_line_
 
 #ifndef _di_f_utf_string_dynamic_seek_line_to_
-  f_status_t f_utf_string_dynamic_seek_line_to(const f_utf_string_static_t buffer, const char seek_to_this, f_string_range_t *range) {
+  f_status_t f_utf_string_dynamic_seek_line_to(const f_utf_string_static_t buffer, const unsigned char seek_to_this, f_string_range_t *range) {
     #ifndef _di_level_0_parameter_checking_
       if (!range) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
@@ -801,7 +801,7 @@ extern "C" {
 #endif // _di_f_utf_string_dynamic_seek_line_to_
 
 #ifndef _di_f_utf_string_dynamic_seek_to_
-  f_status_t f_utf_string_dynamic_seek_to(const f_utf_string_static_t buffer, const char seek_to_this, f_string_range_t *range) {
+  f_status_t f_utf_string_dynamic_seek_to(const f_utf_string_static_t buffer, const unsigned char seek_to_this, f_string_range_t *range) {
     #ifndef _di_level_0_parameter_checking_
       if (!range) return F_status_set_error(F_parameter);
     #endif // _di_level_0_parameter_checking_
index 87d7c5a77c410647e5f7dde0878cf0f09a0e87ea..3fcd11cdaebcd148f0c2de0aef1083a80799e163 100644 (file)
@@ -947,7 +947,7 @@ extern "C" {
  *   Errors (with error bit) from: f_memory_resize().
  */
 #ifndef _di_f_utf_string_dynamic_seek_line_to_
-  extern f_status_t f_utf_string_dynamic_seek_line_to(const f_utf_string_static_t buffer, const char seek_to_this, f_string_range_t *range);
+  extern f_status_t f_utf_string_dynamic_seek_line_to(const f_utf_string_static_t buffer, const unsigned char seek_to_this, f_string_range_t *range);
 #endif // _di_f_utf_string_dynamic_seek_line_to_
 
 /**
@@ -974,7 +974,7 @@ extern "C" {
  *   Errors (with error bit) from: f_memory_resize().
  */
 #ifndef _di_f_utf_string_dynamic_seek_to_
-  extern f_status_t f_utf_string_dynamic_seek_to(const f_utf_string_static_t buffer, const char seek_to_this, f_string_range_t *range);
+  extern f_status_t f_utf_string_dynamic_seek_to(const f_utf_string_static_t buffer, const unsigned char seek_to_this, f_string_range_t *range);
 #endif // _di_f_utf_string_dynamic_seek_to_
 
 /**
index 7995358f4716f2b45b4e0cd93a8a1ce7aa0f2b59..787132d4243ebb9581c94681321b27306c290e54 100644 (file)
@@ -31,7 +31,7 @@ extern "C" {
 
       path.used = control_group.path.used + control_group.groups.array[i].used + F_control_group_path_system_suffix_s_length;
 
-      char path_string[path.used + 1];
+      unsigned char path_string[path.used + 1];
       path.string = path_string;
 
       if (control_group.path.used) {
index 61ea13f3aaf3c5dc192cfce0abc33cf7dd42ce11..9cdefcd69d51efd0bde5ead2b2ef05f3d6a56d0a 100644 (file)
@@ -27,7 +27,7 @@ extern "C" {
       f_array_length_t at_path = 0;
       f_string_static_t tree = f_string_static_t_initialize;
 
-      char tree_string[path.used + 1];
+      unsigned char tree_string[path.used + 1];
       tree.string = tree_string;
       tree.used = path.used;
       tree_string[path.used] = 0;
index 49bc07c828b3ae663483350c1f9ed5f4c2390ed3..7a3e8172692756d4c9350c247884fc2999d883ed 100644 (file)
@@ -58,8 +58,8 @@ extern "C" {
       destination_sub.used = destination.used + listing.directory.array[i].used + 1;
       destination_sub.size = destination_sub.used;
 
-      char path_source_sub[source_sub.used + 1];
-      char path_destination_sub[destination_sub.used + 1];
+      unsigned char path_source_sub[source_sub.used + 1];
+      unsigned char path_destination_sub[destination_sub.used + 1];
 
       memcpy(path_source_sub, source.string, source.used);
       memcpy(path_source_sub + source.used + 1, listing.directory.array[i].string, listing.directory.array[i].used);
@@ -146,8 +146,8 @@ extern "C" {
     path_source.used = source.used + file.used + 2;
     path_destination.used = destination.used + file.used + 2;
 
-    char path_source_string[path_source.used];
-    char path_destination_string[path_destination.used];
+    unsigned char path_source_string[path_source.used];
+    unsigned char path_destination_string[path_destination.used];
 
     path_source.string = path_source_string;
     path_destination.string = path_destination_string;
@@ -283,8 +283,8 @@ extern "C" {
       destination_sub.used = destination.used + listing.directory.array[i].used + 1;
       destination_sub.size = destination_sub.used;
 
-      char path_source_sub[source_sub.used + 1];
-      char path_destination_sub[destination_sub.used + 1];
+      unsigned char path_source_sub[source_sub.used + 1];
+      unsigned char path_destination_sub[destination_sub.used + 1];
 
       memcpy(path_source_sub, source.string, source.used);
       memcpy(path_source_sub + source.used + 1, listing.directory.array[i].string, listing.directory.array[i].used);
@@ -358,8 +358,8 @@ extern "C" {
     path_source.used = source.used + file.used + 2;
     path_destination.used = destination.used + file.used + 2;
 
-    char path_source_string[path_source.used];
-    char path_destination_string[path_destination.used];
+    unsigned char path_source_string[path_source.used];
+    unsigned char path_destination_string[path_destination.used];
 
     path_source.string = path_source_string;
     path_destination.string = path_destination_string;
@@ -502,7 +502,7 @@ extern "C" {
 
       // There is no reason to include "." and ".." in the directory listing.
       if (!strncmp(name_directory.string, "..", 3) || !strncmp(name_directory.string, ".", 2)) {
-        f_memory_resize(1, 0, sizeof(char *), (void **) & entity[i]);
+        f_memory_resize(1, 0, sizeof(unsigned char *), (void **) & entity[i]);
 
         continue;
       }
@@ -552,13 +552,13 @@ extern "C" {
       memcpy(names->array[names->used].string, name_directory.string, name_directory.used);
       names->array[names->used++].used = name_directory.used;
 
-      f_memory_resize(1, 0, sizeof(char *), (void **) & entity[i]);
+      f_memory_resize(1, 0, sizeof(unsigned char *), (void **) & entity[i]);
     } // for
 
     closedir(parent);
 
     for (; i < length; ++i) {
-      f_memory_resize(1, 0, sizeof(char *), (void **) & entity[i]);
+      f_memory_resize(1, 0, sizeof(unsigned char *), (void **) & entity[i]);
     } // for
 
     f_memory_resize(1, 0, sizeof(struct dirent *), (void **) & entity);
index 9fbb80dca889d8579c03ca200797ba1e227e4a53..7e860ad2b6e4017902c7e2b9c316d66460815d19 100644 (file)
@@ -122,7 +122,7 @@ extern "C" {
         paths->array[paths->used].used = 0;
 
         if (total) {
-          char buffer[total + 1];
+          unsigned char buffer[total + 1];
 
           for (j = first, k = 0; j < i; ++j) {
 
@@ -200,7 +200,7 @@ extern "C" {
         paths->array[paths->used].used = 0;
 
         if (total) {
-          char buffer[total];
+          unsigned char buffer[total];
 
           for (j = 0, k = 0; j < total; ++j) {
 
index ef3a366eb27559897bd86aaa3fda1a7548a5cd26..f440191bbfaf15b7d40e731fe626ab58e0429134 100644 (file)
@@ -14,7 +14,7 @@ extern "C" {
     f_array_length_t i = 0;
 
     uint8_t width = 0;
-    const char quote_char = quoted == f_fss_quote_type_double_e ? f_string_ascii_quote_double_s.string[0] : f_string_ascii_quote_single_s.string[0];
+    const unsigned char quote_char = quoted == f_fss_quote_type_double_e ? f_string_ascii_quote_double_s.string[0] : f_string_ascii_quote_single_s.string[0];
 
     // If there are any spaces, then this will be quoted so find the first non-placeholder character.
     for (; destination_range.start < destination->used; ++destination_range.start) {
@@ -328,7 +328,7 @@ extern "C" {
     }
 
     // Handle quoted support.
-    char quote_found = 0;
+    unsigned char quote_found = 0;
 
     if (quoted) {
       *quoted = 0;
@@ -869,7 +869,7 @@ extern "C" {
     f_array_length_t item_total = 0;
     f_array_length_t i = 0;
 
-    const char quote_char = quoted == f_fss_quote_type_double_e ? f_string_ascii_quote_double_s.string[0] : f_string_ascii_quote_single_s.string[0];
+    const unsigned char quote_char = quoted == f_fss_quote_type_double_e ? f_string_ascii_quote_double_s.string[0] : f_string_ascii_quote_single_s.string[0];
 
     // Use placeholders for potential quote and potential delimited quote to avoid doing things such as memmove().
     destination->string[destination->used++] = f_fss_delimit_placeholder_s.string[0];
index 373145f9576a81280a2458b12aeee305f6988c48..31884ab92784612dd6c139c3b04136017f515574 100644 (file)
@@ -231,7 +231,7 @@ extern "C" {
           }
           else if (*string < 0x56) {
             if (*string == f_string_ascii_C_s.string[0]) {
-              char value[1] = { (char) va_arg(apl, int) };
+              unsigned char value[1] = { (unsigned char) va_arg(apl, int) };
 
               *status = f_print_safely(value, 1, stream);
 
@@ -627,7 +627,7 @@ extern "C" {
           }
           else if (*string < 0x72) {
             if (*string == f_string_ascii_c_s.string[0]) {
-              const char value = (char) va_arg(apl, uint32_t);
+              const unsigned char value = (unsigned char) va_arg(apl, uint32_t);
 
               if (!fputc_unlocked(value, stream)) {
                 *status = F_status_set_error(F_output);
@@ -1082,8 +1082,8 @@ extern "C" {
           }
           else if (type == f_print_format_type_double_32_e || type == f_print_format_type_double_64_e) {
             unsigned int f = 0;
-            char format[33];
-            char buffer[129];
+            unsigned char format[33];
+            unsigned char buffer[129];
 
             memset(format, 0, 33);
             memset(buffer, 0, 129);
index 89f9d64270b2e35b55622e63231e05f2e265d977..58fae93d9f0bda408c135c8015b3bf31a4a57874 100644 (file)
@@ -874,7 +874,7 @@ extern "C" {
 
     {
       f_array_length_t j = 0;
-      char number[5] = { 0, 0, 0, 0, 0 };
+      unsigned char number[5] = { 0, 0, 0, 0, 0 };
 
       for (++range->start; range->start <= range->stop && j < 4; ++range->start, ++j) {
 
index 40d60ed98720413a19befcf8b986ff425da1a0e3..bbd4b9daff362dbfa122ffc8f1a0156bbfc117af 100644 (file)
@@ -92,7 +92,7 @@ extern "C" {
 #endif // _di_fl_utf_string_dynamic_rip_nulless_
 
 #ifndef _di_fl_utf_string_dynamic_seek_line_to_char_
-  f_status_t fl_utf_string_dynamic_seek_line_to_char(const f_utf_string_static_t buffer, f_string_range_t * const range, const char seek_to_this) {
+  f_status_t fl_utf_string_dynamic_seek_line_to_char(const f_utf_string_static_t buffer, f_string_range_t * const range, const unsigned char seek_to_this) {
     #ifndef _di_level_1_parameter_checking_
       if (!range) return F_status_set_error(F_parameter);
       if (buffer.used <= range->start) return F_status_set_error(F_parameter);
@@ -225,7 +225,7 @@ extern "C" {
 #endif // _di_fl_utf_string_dynamic_seek_line_until_graph_non_
 
 #ifndef _di_fl_utf_string_dynamic_seek_to_char_
-  f_status_t fl_utf_string_dynamic_seek_to_char(const f_utf_string_static_t buffer, f_string_range_t * const range, const char seek_to_this) {
+  f_status_t fl_utf_string_dynamic_seek_to_char(const f_utf_string_static_t buffer, f_string_range_t * const range, const unsigned char seek_to_this) {
     #ifndef _di_level_1_parameter_checking_
       if (!range) return F_status_set_error(F_parameter);
       if (buffer.used <= range->start) return F_status_set_error(F_parameter);
@@ -321,7 +321,7 @@ extern "C" {
 #endif // _di_fl_utf_string_rip_nulless_
 
 #ifndef _di_fl_utf_string_seek_line_to_char_
-  f_status_t fl_utf_string_seek_line_to_char(const f_utf_string_t string, f_string_range_t * const range, const char seek_to_this) {
+  f_status_t fl_utf_string_seek_line_to_char(const f_utf_string_t string, f_string_range_t * const range, const unsigned char seek_to_this) {
     #ifndef _di_level_1_parameter_checking_
       if (!range) return F_status_set_error(F_parameter);
     #endif // _di_level_1_parameter_checking_
@@ -438,7 +438,7 @@ extern "C" {
 #endif // _di_fl_utf_string_seek_line_until_graph_non_
 
 #ifndef _di_fl_utf_string_seek_to_char_
-  f_status_t fl_utf_string_seek_to_char(const f_utf_string_t string, f_string_range_t * const range, const char seek_to_this) {
+  f_status_t fl_utf_string_seek_to_char(const f_utf_string_t string, f_string_range_t * const range, const unsigned char seek_to_this) {
     #ifndef _di_level_1_parameter_checking_
       if (!range) return F_status_set_error(F_parameter);
     #endif // _di_level_1_parameter_checking_
index eb149f3316227f35bc8d1211b9f6f35efe41d7c1..0f2255230f0d6a57fefca94d05c6acf1e40e1b03 100644 (file)
@@ -268,7 +268,7 @@ extern "C" {
  *   F_utf (with error bit) if a character in the buffer is an invalid UTF-8 character.
  */
 #ifndef _di_fl_utf_string_dynamic_seek_line_to_char_
-  extern f_status_t fl_utf_string_dynamic_seek_line_to_char(const f_utf_string_static_t buffer, f_string_range_t * const range, const char seek_to_this);
+  extern f_status_t fl_utf_string_dynamic_seek_line_to_char(const f_utf_string_static_t buffer, f_string_range_t * const range, const unsigned char seek_to_this);
 #endif // _di_fl_utf_string_dynamic_seek_line_to_char_
 
 /**
@@ -350,7 +350,7 @@ extern "C" {
  *   F_parameter (with error bit) if a parameter is invalid.
  */
 #ifndef _di_fl_utf_string_dynamic_seek_to_char_
-  extern f_status_t fl_utf_string_dynamic_seek_to_char(const f_utf_string_static_t buffer, f_string_range_t * const range, const char seek_to_this);
+  extern f_status_t fl_utf_string_dynamic_seek_to_char(const f_utf_string_static_t buffer, f_string_range_t * const range, const unsigned char seek_to_this);
 #endif // _di_fl_utf_string_dynamic_seek_to_char_
 
 /**
@@ -432,7 +432,7 @@ extern "C" {
  *   F_utf (with error bit) if a character in the buffer is an invalid UTF-8 character.
  */
 #ifndef _di_fl_utf_string_seek_line_to_char_
-  extern f_status_t fl_utf_string_seek_line_to_char(const f_utf_string_t string, f_string_range_t * const range, const char seek_to_this);
+  extern f_status_t fl_utf_string_seek_line_to_char(const f_utf_string_t string, f_string_range_t * const range, const unsigned char seek_to_this);
 #endif // _di_fl_utf_string_seek_line_to_char_
 
 /**
@@ -517,7 +517,7 @@ extern "C" {
  *   F_utf (with error bit) if a character in the buffer is an invalid UTF-8 character.
  */
 #ifndef _di_fl_utf_string_seek_to_character_
-  extern f_status_t fl_utf_string_seek_to_char(const f_utf_string_t string, f_string_range_t * const range, const char seek_to_this);
+  extern f_status_t fl_utf_string_seek_to_char(const f_utf_string_t string, f_string_range_t * const range, const unsigned char seek_to_this);
 #endif // _di_fl_utf_string__seek_to_character_
 
 #ifdef __cplusplus
index 61cf080f9479bc751d9a5a30abb89dcd9c0d233e..f8e7bc2fc4630ef10b4f6bda16e70ebe8399620c 100644 (file)
@@ -6,7 +6,7 @@ extern "C" {
 #endif
 
 #if !defined(_di_fl_utf_file_read_) || !defined(_di_fl_utf_file_read_until_) || !defined(_di_fl_utf_file_read_range_)
-  void private_fl_utf_file_process_read_buffer(const f_string_t buffer_read, const ssize_t size_read, f_utf_string_dynamic_t * const buffer, char buffer_char[], uint8_t * const width, int8_t * const width_last) {
+  void private_fl_utf_file_process_read_buffer(const f_string_t buffer_read, const ssize_t size_read, f_utf_string_dynamic_t * const buffer, unsigned char buffer_char[], uint8_t * const width, int8_t * const width_last) {
 
     uint8_t increment_by = 0;
 
index 6cff4c44657a3c1465a7c3f45a85ee4fed005a9b..b835dd587b7c347e3ce750a83f0095e1752a7569 100644 (file)
@@ -40,7 +40,7 @@ extern "C" {
  * @see fl_utf_file_read_until()
  */
 #if !defined(_di_fl_utf_file_read_) || !defined(_di_fl_utf_file_read_until_) || !defined(_di_fl_utf_file_read_range_)
-  void private_fl_utf_file_process_read_buffer(const f_string_t buffer_read, const ssize_t size_read, f_utf_string_dynamic_t * const buffer, char buffer_char[], uint8_t * const width, int8_t * const width_last) F_attribute_visibility_internal_d;
+  extern void private_fl_utf_file_process_read_buffer(const f_string_t buffer_read, const ssize_t size_read, f_utf_string_dynamic_t * const buffer, unsigned char buffer_char[], uint8_t * const width, int8_t * const width_last) F_attribute_visibility_internal_d;
 #endif // !defined(_di_fl_utf_file_read_) || !defined(_di_fl_utf_file_read_until_) || !defined(_di_fl_utf_file_read_range_)
 
 /**
index c8c7344a2da1a8a794dff444ec9b065aa8e0ab6b..abfd14e7704994e172db163045742252d2c91a98 100644 (file)
@@ -25,8 +25,8 @@ extern "C" {
     uint8_t width = 0;
     int8_t width_last = -1;
 
-    char buffer_read[file.size_read];
-    char buffer_char[4] = { 0, 0, 0, 0 };
+    unsigned char buffer_read[file.size_read];
+    unsigned char buffer_char[4] = { 0, 0, 0, 0 };
 
     memset(&buffer_read, 0, sizeof(file.size_read));
 
@@ -85,8 +85,8 @@ extern "C" {
     uint8_t width = 0;
     int8_t width_last = -1;
 
-    char buffer_read[file.size_read];
-    char buffer_char[4] = { 0, 0, 0, 0 };
+    unsigned char buffer_read[file.size_read];
+    unsigned char buffer_char[4] = { 0, 0, 0, 0 };
 
     memset(&buffer_read, 0, sizeof(file.size_read));
 
@@ -156,8 +156,8 @@ extern "C" {
       buffer_size = total;
     }
 
-    char buffer_read[buffer_size];
-    char buffer_char[4] = { 0, 0, 0, 0 };
+    unsigned char buffer_read[buffer_size];
+    unsigned char buffer_char[4] = { 0, 0, 0, 0 };
 
     memset(&buffer_read, 0, sizeof(buffer_size));
 
index 51a8af61d8235d85da35da273f1e1cadb298c4f4..6a5b9fe9a47434a9bafdc04d6541447cb377dab8 100644 (file)
@@ -26,7 +26,7 @@ extern "C" {
 
       path.used = control_group.path.used + control_group.groups.array[i].used;
 
-      char path_string[path.used + 1];
+      unsigned char path_string[path.used + 1];
       path.string = path_string;
 
       if (control_group.path.used) {
index ffa6ce43ed3b1775489dc86b312d9c739999331c..8b781bfd1b2879baf4e363ed2f5eb93d68d829f1 100644 (file)
@@ -91,7 +91,7 @@ extern "C" {
       program_name.used = program.used ? program.used : arguments.array[0].used;
     }
 
-    char program_name_string[program_name.used + 1];
+    unsigned char program_name_string[program_name.used + 1];
     program_name.string = program_name_string;
 
     private_fll_execute_path_arguments_fixate(program.used ? program : arguments.array[0], arguments, last_slash, !program.used, program_name, fixed_arguments);
@@ -187,7 +187,7 @@ extern "C" {
         }
       }
 
-      char program_path[found->used + 1];
+      unsigned char program_path[found->used + 1];
       program_path[found->used] = 0;
 
       memcpy(&program_path, found->string, found->used);
@@ -204,7 +204,7 @@ extern "C" {
         } // for
       }
 
-      code = execv(program_path, fixed_arguments);
+      code = execv(program_path, (char **) fixed_arguments);
     }
     else {
       if (environment) {
@@ -216,10 +216,10 @@ extern "C" {
       }
 
       if (last_slash) {
-        code = execv(program.used ? program.string : arguments.array[0].string, fixed_arguments);
+        code = execv(program.used ? program.string : arguments.array[0].string, (char **) fixed_arguments);
       }
       else {
-        code = execvp(program.used ? program.string : arguments.array[0].string, fixed_arguments);
+        code = execvp(program.used ? program.string : arguments.array[0].string, (char **) fixed_arguments);
       }
     }
 
@@ -287,7 +287,7 @@ extern "C" {
       program_name.used = program.used ? program.used : arguments.array[0].used;
     }
 
-    char program_name_string[program_name.used + 1];
+    unsigned char program_name_string[program_name.used + 1];
     program_name.string = program_name_string;
 
     private_fll_execute_path_arguments_fixate(program.used ? program : arguments.array[0], arguments, last_slash, !program.used, program_name, fixed_arguments);
@@ -379,7 +379,7 @@ extern "C" {
         }
       }
 
-      char program_path[found->used + 1];
+      unsigned char program_path[found->used + 1];
       program_path[found->used] = 0;
 
       memcpy(&program_path, found->string, found->used);
index 2d82aa290cede7f23729dd1cf4767fec06bcb45c..8235e1f70639e44d6ebee3e41681bfe2e4bcf6ad 100644 (file)
@@ -332,7 +332,7 @@ extern "C" {
       if (F_status_is_error(status)) return status;
     }
 
-    int code = direct ? execv(program.string, fixed_arguments) : execvp(program.string, fixed_arguments);
+    int code = direct ? execv(program.string, (char **) fixed_arguments) : execvp(program.string, (char **) fixed_arguments);
 
     if (code == -1) {
       if (errno == EACCES) code = F_execute_access;
@@ -518,7 +518,7 @@ extern "C" {
       if (F_status_is_error(status)) return status;
     }
 
-    int code = direct ? execv(program.string, fixed_arguments) : execvp(program.string, fixed_arguments);
+    int code = direct ? execv(program.string, (char **) fixed_arguments) : execvp(program.string, (char **) fixed_arguments);
 
     // Close the write pipe for the child when done.
     close(descriptors[0]);
index e11231f14906c971629450d2799bc50def0555cd..6fba9580cb62e5684a4fd619153e6453ae4e6b3d 100644 (file)
@@ -50,7 +50,7 @@ extern "C" {
 
           path_sub.used = path.used + list[i]->array[j].used + 1;
 
-          char path_sub_string[path_sub.used + 1];
+          unsigned char path_sub_string[path_sub.used + 1];
           path_sub.string = path_sub_string;
 
           memcpy(path_sub.string, path.string, path.used);
@@ -74,7 +74,7 @@ extern "C" {
 
       path_sub.used = path.used + listing.directory.array[i].used + 1;
 
-      char path_sub_string[path_sub.used + 1];
+      unsigned char path_sub_string[path_sub.used + 1];
       path_sub.string = path_sub_string;
 
       memcpy(path_sub.string, path.string, path.used);
@@ -152,7 +152,7 @@ extern "C" {
 
           path_sub.used = path.used + list[i]->array[j].used + 1;
 
-          char path_sub_string[path_sub.used + 1];
+          unsigned char path_sub_string[path_sub.used + 1];
           path_sub.string = path_sub_string;
 
           memcpy(path_sub.string, path.string, path.used);
@@ -175,7 +175,7 @@ extern "C" {
 
         path_sub.used = path.used + listing.directory.array[i].used + 1;
 
-        char path_sub_string[path_sub.used + 1];
+        unsigned char path_sub_string[path_sub.used + 1];
         path_sub.string = path_sub_string;
 
         memcpy(path_sub.string, path.string, path.used);
index cfb85bb31a2012c7bb6fea71f678a0c64b786495..b3ee5e8943fc912536ef2da4a75096f2026464ee 100644 (file)
@@ -6,7 +6,7 @@ extern "C" {
 #endif
 
 #if !defined(_di_fll_iki_content_escape_) || !defined(_di_fll_iki_content_partial_escape_)
-  f_status_t private_fll_iki_content_partial_escape(const f_string_static_t content, const f_string_range_t range, const char quote, f_string_dynamic_t * const escaped) {
+  f_status_t private_fll_iki_content_partial_escape(const f_string_static_t content, const f_string_range_t range, const unsigned char quote, f_string_dynamic_t * const escaped) {
 
     f_status_t status = F_none;
 
@@ -71,7 +71,7 @@ extern "C" {
 #endif // !defined(_di_fll_iki_content_escape_) || !defined(_di_fll_iki_content_partial_escape_)
 
 #if !defined(_di_fll_iki_content_unescape_) || !defined(_di_fll_iki_content_partial_unescape_)
-  f_status_t private_fll_iki_content_partial_unescape(const f_string_static_t content, const f_string_range_t range, const char quote, f_string_dynamic_t * const unescaped) {
+  f_status_t private_fll_iki_content_partial_unescape(const f_string_static_t content, const f_string_range_t range, const unsigned char quote, f_string_dynamic_t * const unescaped) {
 
     f_status_t status = F_none;
 
index 142752cf6fe27e6bc3292997eaa371a4f07f0855..3a060a48bab191bcdeeb366dc07ce3439662ec54 100644 (file)
@@ -40,7 +40,7 @@ extern "C" {
  *   Errors (with error bit) from: f_string_dynamic_increase_by().
  */
 #if !defined(_di_fll_iki_content_escape_) || !defined(_di_fll_iki_content_partial_escape_)
-  extern f_status_t private_fll_iki_content_partial_escape(const f_string_static_t content, const f_string_range_t range, const char quote, f_string_dynamic_t * const escaped) F_attribute_visibility_internal_d;
+  extern f_status_t private_fll_iki_content_partial_escape(const f_string_static_t content, const f_string_range_t range, const unsigned char quote, f_string_dynamic_t * const escaped) F_attribute_visibility_internal_d;
 #endif // !defined(_di_fll_iki_content_escape_) || !defined(_di_fll_iki_content_partial_escape_)
 
 /**
@@ -69,7 +69,7 @@ extern "C" {
  *   Errors (with error bit) from: f_string_dynamic_increase_by().
  */
 #if !defined(_di_fll_iki_content_unescape_) || !defined(_di_fll_iki_content_partial_unescape_)
-  extern f_status_t private_fll_iki_content_partial_unescape(const f_string_static_t content, const f_string_range_t range, const char quote, f_string_dynamic_t * const unescaped) F_attribute_visibility_internal_d;
+  extern f_status_t private_fll_iki_content_partial_unescape(const f_string_static_t content, const f_string_range_t range, const unsigned char quote, f_string_dynamic_t * const unescaped) F_attribute_visibility_internal_d;
 #endif // !defined(_di_fll_iki_content_unescape_) || !defined(_di_fll_iki_content_partial_unescape_)
 
 #ifdef __cplusplus
index aba71c8121e03c5d608814f80869bf020b824169..90af010a157508fe973b5fd14204fb337b1172da 100644 (file)
@@ -18,7 +18,7 @@ extern "C" {
 #endif // _di_fll_print_
 
 #ifndef _di_fll_print_character_
-  f_status_t fll_print_character(const char character, FILE * const output) {
+  f_status_t fll_print_character(const unsigned char character, FILE * const output) {
 
     flockfile(output);
 
@@ -31,7 +31,7 @@ extern "C" {
 #endif // _di_fll_print_character_
 
 #ifndef _di_fll_print_character_safely_
-  f_status_t fll_print_character_safely(const char character, FILE * const output) {
+  f_status_t fll_print_character_safely(const unsigned char character, FILE * const output) {
 
     flockfile(output);
 
index c8b598dc556a846266afb75ad7acc1ddde8308f5..d1e467d6794bdf7320605ceab5bdce6b2e0df48c 100644 (file)
@@ -72,7 +72,7 @@ extern "C" {
  * @see f_print_character()
  */
 #ifndef _di_fll_print_character_
-  extern f_status_t fll_print_character(const char character, FILE * const output);
+  extern f_status_t fll_print_character(const unsigned char character, FILE * const output);
 #endif // _di_fll_print_character_
 
 /**
@@ -94,7 +94,7 @@ extern "C" {
  * @see f_print_character_safely()
  */
 #ifndef _di_fll_print_character_safely_
-  extern f_status_t fll_print_character_safely(const char character, FILE * const output);
+  extern f_status_t fll_print_character_safely(const unsigned char character, FILE * const output);
 #endif // _di_fll_print_character_safely_
 
 /**
index a412af148ffa06ec8fece52e1bf56821f88dd2ea..4ee0803c15f4790ff5c1319eef8a233ee41f355d 100644 (file)
@@ -12,9 +12,9 @@ extern "C" {
     f_status_t status = F_none;
 
     uint64_t position = 0;
-    char byte = 0;
+    unsigned char byte = 0;
+    unsigned char offset = 0;
     int byte_get = 0;
-    uint8_t offset = 0;
 
     int8_t width_utf = -1;
     int8_t width_current = 0;
@@ -41,9 +41,9 @@ extern "C" {
         byte_get = fseek(file.stream, main->first, SEEK_SET);
       }
       else {
-        char skip[main->first];
+        unsigned char skip[main->first];
 
-        byte_get = fread(skip, sizeof(char), main->first, file.stream);
+        byte_get = fread(skip, sizeof(unsigned char), main->first, file.stream);
       }
     }
 
@@ -53,8 +53,8 @@ extern "C" {
     characters.size = main->width;
 
     // Record when a character is invalid.
-    char invalid[main->width];
-    memset(&invalid, 0, sizeof(char) * main->width);
+    unsigned char invalid[main->width];
+    memset(&invalid, 0, sizeof(unsigned char) * main->width);
 
     if (byte_get >= 0) {
       for (uint16_t signal_check = 0; ; ) {
@@ -71,7 +71,7 @@ extern "C" {
 
         if (byte_get < 0) break;
 
-        byte = (char) byte_get;
+        byte = (unsigned char) byte_get;
 
         // Storing the next character is designated by width_utf == -1.
         if (width_utf == -1) {
@@ -82,7 +82,7 @@ extern "C" {
           if (character_reset) {
             characters.used = 0;
             character_reset = F_false;
-            memset(&invalid, 0, sizeof(uint8_t) * main->width);
+            memset(&invalid, 0, sizeof(unsigned char) * main->width);
           }
 
           character_current = characters.used++;
@@ -304,9 +304,9 @@ extern "C" {
 #endif // _di_byte_dump_file_
 
 #ifndef _di_byte_dump_print_character_fragment_
-  bool byte_dump_print_character_fragment(byte_dump_main_t * const main, const f_utf_string_static_t characters, const char invalid[], const uint8_t width_utf, const char byte_current, byte_dump_previous_t *previous, byte_dump_cell_t *cell, uint8_t *offset) {
+  bool byte_dump_print_character_fragment(byte_dump_main_t * const main, const f_utf_string_static_t characters, const unsigned char invalid[], const uint8_t width_utf, const unsigned char byte_current, byte_dump_previous_t *previous, byte_dump_cell_t *cell, unsigned char *offset) {
 
-    char byte = 0;
+    unsigned char byte = 0;
 
     bool reset = F_false;
 
@@ -329,7 +329,7 @@ extern "C" {
       fl_print_format("%[%016_UL%] ", main->output.to.stream, main->context.set.notable, cell->row, main->context.set.notable);
 
       if (*offset) {
-        uint8_t offset_to_print = *offset;
+        unsigned char offset_to_print = *offset;
 
         // Pad the buffer with spaces to hide any skipped bytes (skipped via --first).
         while (offset_to_print && cell->column < main->width) {
@@ -565,14 +565,14 @@ extern "C" {
 #endif // _di_byte_dump_print_character_fragment_
 
 #ifndef _di_byte_dump_print_text_
-  void byte_dump_print_text(byte_dump_main_t * const main, const f_utf_string_static_t characters, const char invalid[], byte_dump_previous_t *previous, uint8_t *offset) {
+  void byte_dump_print_text(byte_dump_main_t * const main, const f_utf_string_static_t characters, const unsigned char invalid[], byte_dump_previous_t *previous, unsigned char *offset) {
 
+    unsigned char c = 0;
     uint8_t at = 0;
-    uint8_t c = 0;
     uint8_t width_utf = 0;
     bool print = F_true;
 
-    char byte[5] = { 0, 0, 0, 0, 0 };
+    unsigned char byte[5] = { 0, 0, 0, 0, 0 };
 
     fl_print_format("  %[%r%] ", main->output.to.stream, main->context.set.notable, byte_dump_character_wall_s, main->context.set.notable);
 
index c0dc1567bec68171d92cc6240e3228d282b7e472..bd9722cfbbf854a2803972894bef179695f791b3 100644 (file)
@@ -71,7 +71,7 @@ extern "C" {
  * @see byte_dump_print_text()
  */
 #ifndef _di_byte_dump_print_character_fragment_
-  extern bool byte_dump_print_character_fragment(byte_dump_main_t * const main, const f_utf_string_static_t characters, const char invalid[], const uint8_t width_utf, const char byte_current, byte_dump_previous_t *previous, byte_dump_cell_t *cell, uint8_t *offset) F_attribute_visibility_internal_d;
+  extern bool byte_dump_print_character_fragment(byte_dump_main_t * const main, const f_utf_string_static_t characters, const unsigned char invalid[], const uint8_t width_utf, const unsigned char byte_current, byte_dump_previous_t *previous, byte_dump_cell_t *cell, unsigned char *offset) F_attribute_visibility_internal_d;
 #endif // _di_byte_dump_print_character_fragment_
 
 /**
@@ -93,7 +93,7 @@ extern "C" {
  *   Will be reduced to 0 once used.
  */
 #ifndef _di_byte_dump_print_text_
-  extern void byte_dump_print_text(byte_dump_main_t * const main, const f_utf_string_static_t characters, const char invalid[], byte_dump_previous_t *previous, uint8_t *offset) F_attribute_visibility_internal_d;
+  extern void byte_dump_print_text(byte_dump_main_t * const main, const f_utf_string_static_t characters, const unsigned char invalid[], byte_dump_previous_t *previous, unsigned char *offset) F_attribute_visibility_internal_d;
 #endif // _di_byte_dump_print_text_
 
 #ifdef __cplusplus
index e0834983660c2eb853ea5095d15d6170ef72da23..7314f39b6d7d3504962260a46be29c7abd725bfe 100644 (file)
@@ -111,8 +111,8 @@ extern "C" {
  *   - endian_big: Designate that the packet is in big endian order (when not set then packet is in little endian order).
  */
 #ifndef _di_controller_control_packet_flag_
-  #define controller_control_packet_flag_binary_d     0x1
-  #define controller_control_packet_flag_endian_big_d 0x2
+  #define controller_control_packet_flag_binary_d     0x10000000
+  #define controller_control_packet_flag_endian_big_d 0x01000000
 #endif // _di_controller_control_packet_flag_
 
 /**
index 080d6140da00f7e38ba9f988879219558519e960..d7fb7bfe263f178c52e74bb1f1f7f84b47d79b0d 100644 (file)
@@ -16,7 +16,11 @@ extern "C" {
       control->client.id = -1;
     }*/
 
+    printf("\nDEBUG: begin client accept, addr=%ul, server id = %i, client id = %i\n", control->client, control->server.id, control->client.id);
+    fll_print_format("\nDEBUG: begin client accept, addr=%ul, server id = %i, client id = %i\n", stdout, control->client, control->server.id, control->client.id);
+
     f_status_t status = f_socket_accept(&control->client, control->server.id);
+    printf("\nDEBUG: client accept, at 1, status = %d\n", F_status_set_fine(status));
 
     if (F_status_is_error(status)) {
       f_socket_disconnect(&control->client, f_socket_close_fast_e);
@@ -31,7 +35,7 @@ extern "C" {
     control->input.used = 0;
     control->output.used = 0;
 
-    char buffer[controller_control_default_socket_buffer_d + 1];
+    unsigned char buffer[controller_control_default_socket_buffer_d + 1];
     size_t length = 0;
 
     memset(buffer, 0, controller_control_default_socket_buffer_d + 1);
@@ -39,6 +43,7 @@ extern "C" {
     // Pre-process the packet header.
     control->client.size_read = controller_control_default_socket_header_d;
     status = f_socket_read(&control->client, f_socket_flag_peek_d, buffer, &length);
+    printf("\nDEBUG: client accept, at 2, status = %d\n", F_status_set_fine(status));
 
     if (F_status_is_error(status)) {
       f_socket_disconnect(&control->client, f_socket_close_fast_e);
@@ -50,6 +55,7 @@ extern "C" {
 
     if (!length) {
       status = controller_control_respond_error_string(global, control, F_empty, "Received packet is empty.");
+      printf("\nDEBUG: client accept, at 3, status = %d\n", F_status_set_fine(status));
 
       f_socket_disconnect(&control->client, f_socket_close_fast_e);
 
@@ -60,6 +66,7 @@ extern "C" {
 
     if (length < controller_control_default_socket_header_d) {
       status = controller_control_respond_error_string(global, control, F_too_large, "Received packet is too small.");
+      printf("\nDEBUG: client accept, at 4, status = %d\n", F_status_set_fine(status));
 
       f_socket_disconnect(&control->client, f_socket_close_fast_e);
 
@@ -70,6 +77,7 @@ extern "C" {
 
     if (length > controller_control_default_socket_buffer_max_d) {
       status = controller_control_respond_error_string(global, control, F_too_large, "Received packet is too large.");
+      printf("\nDEBUG: client accept, at 5, status = %d\n", F_status_set_fine(status));
 
       f_socket_disconnect(&control->client, f_socket_close_fast_e);
 
@@ -78,11 +86,13 @@ extern "C" {
       return F_valid_not;
     }
 
+    // @todo rewrite based on control_payload_build(), but need to pre-process what is needed for the payload.
     const uint8_t packet_flag = controller_control_packet_header_flag(buffer);
     const uint32_t packet_length = controller_control_packet_header_length(packet_flag & controller_control_packet_flag_endian_big_d, buffer);
 
     if (packet_flag & controller_control_packet_flag_binary_d) {
       status = controller_control_respond_error_string(global, control, F_supported_not, "Binary is not a currently supported packet mode.");
+      printf("\nDEBUG: client accept, at 6, status = %d\n", F_status_set_fine(status));
 
       f_socket_disconnect(&control->client, f_socket_close_fast_e);
 
@@ -111,6 +121,7 @@ extern "C" {
 
       do {
         status = f_socket_read(&control->client, 0, &control->input, &total);
+      printf("\nDEBUG: client accept, at 7, status = %d\n", F_status_set_fine(status));
 
         if (F_status_is_error(status)) {
           controller_control_respond_error_string(global, control, F_status_set_fine(status), "Failure while reading from control->client socket.");
@@ -132,6 +143,7 @@ extern "C" {
     }
 
     // @todo process the data.
+    fll_print_format("\nDEBUG: received packet: '%q'\n", stdout, control->input);
 
     // @todo send any responses.
 
@@ -200,13 +212,13 @@ extern "C" {
 #endif // _di_controller_control_configure_server_
 
 #ifndef _di_controller_control_packet_header_flag_
-  uint8_t controller_control_packet_header_flag(const char buffer[]) {
-    return (uint8_t) ((buffer[0] & 0x8) ? controller_control_packet_flag_binary_d : 0) | ((buffer[0] & 0x4) ? controller_control_packet_flag_endian_big_d : 0);
+  uint8_t controller_control_packet_header_flag(const unsigned char buffer[]) {
+    return (uint8_t) (((buffer[0] & 0x8) ? controller_control_packet_flag_binary_d : 0) | ((buffer[0] & 0x4) ? controller_control_packet_flag_endian_big_d : 0));
   }
 #endif // _di_controller_control_packet_header_flag_
 
 #ifndef _di_controller_control_packet_header_length_
-  uint32_t controller_control_packet_header_length(const bool is_big, const char buffer[]) {
+  uint32_t controller_control_packet_header_length(const bool is_big, const unsigned char buffer[]) {
 
     register uint32_t length = (((buffer[0] & 0x3f) << 26) | (buffer[1] << 18) | (buffer[2] << 10) | (buffer[3] << 2) | ((buffer[4] & 0xc0) >> 6));
 
@@ -292,6 +304,7 @@ extern "C" {
 
     control->output.used = 0;
     control->cache_3.used = 0;
+    printf("\nDEBUG: controller_control_respond_error(), at start\n");
 
     {
       const f_conversion_data_t data_conversion = macro_f_conversion_data_t_initialize(10, 0, 1);
@@ -310,6 +323,8 @@ extern "C" {
       if (F_status_is_error(status2)) return status2;
     }
 
+    printf("\nDEBUG: controller_control_respond_error(), before write\n");
+
     return f_socket_write(&control->client, 0, control->output.string, 0);
   }
 #endif // _di_controller_control_respond_error_
index 515876319f602a0ffb759f7c8230efb27fd36abf..6d029c34581caf5f6f1b16b2152a216aef9021ae 100644 (file)
@@ -82,7 +82,7 @@ extern "C" {
  *   The 8-bit number representing the flags.
  */
 #ifndef _di_controller_control_packet_header_flag_
-  extern uint8_t controller_control_packet_header_flag(const char buffer[]) F_attribute_visibility_internal_d;
+  extern uint8_t controller_control_packet_header_flag(const unsigned char buffer[]) F_attribute_visibility_internal_d;
 #endif // _di_controller_control_packet_header_flag_
 
 /**
@@ -100,7 +100,7 @@ extern "C" {
  *   The 32-bit number representing the length.
  */
 #ifndef _di_controller_control_packet_header_length_
-  extern uint32_t controller_control_packet_header_length(const bool is_big, const char buffer[]) F_attribute_visibility_internal_d;
+  extern uint32_t controller_control_packet_header_length(const bool is_big, const unsigned char buffer[]) F_attribute_visibility_internal_d;
 #endif // _di_controller_control_packet_header_length_
 
 /**
index a826a2207f42e1ed9df8737d13ac4c6d1ea2352b..2f1667be246fd65c9d601d2755a7131788565353 100644 (file)
@@ -74,7 +74,7 @@ extern "C" {
       path.used = cache->action.name_file.used;
     }
 
-    char path_string[path.used + 1];
+    unsigned char path_string[path.used + 1];
     path.string = path_string;
 
     if (global.setting->path_setting.used) {
@@ -368,7 +368,7 @@ extern "C" {
         f_array_length_t length = destination->used - setting->path_current.used;
 
         if (length) {
-          char temporary[--length];
+          unsigned char temporary[--length];
           temporary[length] = 0;
 
           memcpy(temporary, destination->string + setting->path_current.used + 1, length);
index 9c198688b33334c5a5a96a8c0d7b454122dcf39a..82c8f411044a044394b2256cad7db633589b13ac 100644 (file)
@@ -1192,7 +1192,7 @@ extern "C" {
           }
 
           const f_array_length_t id_rule_length = entry_action->parameters.array[0].used + entry_action->parameters.array[1].used + 1;
-          char id_rule_name[id_rule_length + 1];
+          unsigned char id_rule_name[id_rule_length + 1];
           const f_string_static_t alias_rule = macro_f_string_static_t_initialize2(id_rule_name, id_rule_length);
 
           memcpy(id_rule_name, entry_action->parameters.array[0].string, entry_action->parameters.array[0].used);
@@ -1251,9 +1251,9 @@ extern "C" {
             const f_array_length_t cache_name_item_used = cache->action.name_item.used;
             const f_array_length_t cache_name_file_used = cache->action.name_file.used;
 
-            char cache_name_action[cache_name_action_used];
-            char cache_name_item[cache_name_item_used];
-            char cache_name_file[cache_name_file_used];
+            unsigned char cache_name_action[cache_name_action_used];
+            unsigned char cache_name_item[cache_name_item_used];
+            unsigned char cache_name_file[cache_name_file_used];
 
             memcpy(cache_name_action, cache->action.name_action.string, cache->action.name_action.used);
             memcpy(cache_name_item, cache->action.name_item.string, cache->action.name_item.used);
index a9de5c53acc7a9e5ba5e5357656a2c8bf5dfd8c9..6ad3ddf70c0d4ea0ce062ccd00402d6ab40f9989 100644 (file)
@@ -2059,7 +2059,7 @@ extern "C" {
         f_string_static_t buffer = f_string_static_t_initialize;
         buffer.used = (content.stop - content.start) + 1;
 
-        char buffer_string[buffer.used + 1];
+        unsigned char buffer_string[buffer.used + 1];
 
         memcpy(buffer_string, source.string + content.start, buffer.used);
         buffer_string[buffer.used] = 0;
@@ -2243,7 +2243,7 @@ extern "C" {
           f_string_static_t buffer = f_string_static_t_initialize;
           buffer.used = options[i].used + controller_parameter_map_option_s.used;
 
-          char buffer_string[buffer.used];
+          unsigned char buffer_string[buffer.used];
           buffer.string = buffer_string;
 
           memcpy(buffer_string, options[i].string, options[i].used);
@@ -2269,7 +2269,7 @@ extern "C" {
           f_string_static_t buffer = f_string_static_t_initialize;
           buffer.used = options[i].used + controller_parameter_map_value_s.used;
 
-          char buffer_string[buffer.used];
+          unsigned char buffer_string[buffer.used];
           buffer.string = buffer_string;
 
           memcpy(buffer_string, options[i].string, options[i].used);
@@ -2881,7 +2881,7 @@ extern "C" {
             f_string_static_t alias_other_buffer = f_string_static_t_initialize;
             alias_other_buffer.used = global.setting->rules.array[id_rule].alias.used;
 
-            char alias_other_buffer_string[alias_other_buffer.used + 1];
+            unsigned char alias_other_buffer_string[alias_other_buffer.used + 1];
             alias_other_buffer.string = alias_other_buffer_string;
 
             memcpy(alias_other_buffer_string, global.setting->rules.array[id_rule].alias.string, alias_other_buffer.used);
@@ -4004,7 +4004,7 @@ extern "C" {
     const f_array_length_t line_item = cache->action.line_item;
     const f_array_length_t length_name_item = cache->action.name_item.used;
 
-    char name_item[length_name_item];
+    unsigned char name_item[length_name_item];
     name_item[length_name_item] = 0;
 
     memcpy(name_item, cache->action.name_item.string, length_name_item);
index 8a2098a85454e06645f7c9995062e68d948f50b4..284a66f1ad6f40dadf10480773fac35a9a1765a4 100644 (file)
@@ -24,6 +24,7 @@ extern "C" {
     controller_control_t *control = &global->setting->control;
 
     do {
+      fll_print_format("\nDEBUG: Control Thread Main Loop, server id = %il.\n", stdout, control->server.id);
 
       // Remove any overly large buffers.
       if (control->cache_1.size > controller_control_default_socket_cache_d) {
@@ -54,6 +55,8 @@ extern "C" {
 
       status = f_socket_listen(&control->server, controller_control_default_socket_backlog_d);
 
+      fll_print_format("\nDEBUG: Listen returned, status = %ui.\n", stdout, status);
+
       if (F_status_is_error(status)) {
         controller_print_error(global->thread, global->main->error, F_status_set_fine(status), "f_socket_listen", F_true);
 
@@ -70,14 +73,20 @@ extern "C" {
       status = controller_control_accept(global, control);
       if (status == F_child) break;
 
+      fll_print_format("\nDEBUG: Accept returned, status = %ui.\n", stdout, F_status_set_fine(status));
+
       if (F_status_is_error(status)) {
         controller_print_error(global->thread, global->main->error, F_status_set_fine(status), "controller_control_accept", F_true);
       }
 
       status = F_none;
 
+      fll_print_format("\nDEBUG: End of loop.\n", stdout);
+
     } while (global->thread->enabled == controller_thread_enabled_e);
 
+    fll_print_format("\nDEBUG: Out of loop.\n", stdout);
+
     if (status == F_child) {
 
       // A forked child process should deallocate memory on exit.
@@ -86,8 +95,12 @@ extern "C" {
       controller_thread_delete_simple(global->thread);
       controller_setting_delete_simple(global->setting);
       controller_main_delete(global->main);
+
+      fll_print_format("\nDEBUG: child exit, all data should be deleted.\n", stdout);
     }
 
+    fll_print_format("\nDEBUG: cache should be deleted, final exit.\n", stdout);
+
     return 0;
   }
 #endif // _di_controller_thread_control_
index f01568050b66245b23c69d8e1437495009a60f2c..3e89851e875b4f6349fc7d6204de840f0b6d41df 100644 (file)
@@ -18,18 +18,12 @@ Packet Documentation:
 
     The size block\:
       The size block represents the size of the entire packet (the control block, the size blocks, and the payload block).
-      This number is an 32-bit unsigned integer.
-      The size block may contain up to 4 32-bit unsigned integers.
-      If the size is less than the max value of a 32-bit integer (4294967295), then the remaining 32-bit unsigned integers may be omitted.
+      This number is a single 32-bit unsigned integer.
 
-      Example size that is less than 2^32-1\:
+      Example packet structure\:
         [ control block ] [ size block                                  ] [ payload block         ]
         [ 0b10000000    ] [ 0b00000000 0b00000000 0b00000100 0b11010010 ] [ size: 1229 (1234 - 5) ]
 
-      Example size that is less than 2^64-1\:
-        [ control block ] [ size block                                  ] [ size block                                  ] [ payload block                     ]
-        [ 0b10000000    ] [ 0b11111111 0b11111111 0b11111111 0b11111111 ] [ 0b00000000 0b00000000 0b00000000 0b11001000 ] [ size: 4294967486 (4294967495 - 9) ]
-
     The payload block\:
       This block is represented by the FSS-000e payload specification and its structure ad use is described in the next sections.
 
@@ -71,5 +65,5 @@ Packet Documentation:
     The error payload is intended to communicate some sort of failure.
     The error payload is only sent in response to some request (and not in response to another response).
     The control (the client) is not expected to send error payloads and the controller (the service) should send an error in response to an error payload or ignore it entirely.
-    The "status" from the "header" designates the status code.
+    The "status" from the "header" designates the status code as either a status code name string or a status code number (where a number may have error and warning bits).
     The "payload" will contain a NULL terminated string representing the message used to describe the error.
index b388ae075fe5e19584a054b2be7b6ddc19e1021a..25ade858131f01059415265e8cb27eeada0f877a 100644 (file)
@@ -9,18 +9,18 @@ Entry Specification:
   Packet Structure\:
     Packet is grouped into the following blocks\:
       - control: A single 1-byte block representing contol codes.
-      - size: A set of 1 to 4 4-byte blocks representing the size of the entire packet.
+      - size: A single 4-byte block representing the size of the entire packet, including the contol block.
 
   The "header" Object contains the following FSS-0001 Extended Objects (depending on "type")\:
     - action: A valid action type: "freeze", "kill", "pause", "reboot", "reload", "rerun", "restart", "resume", "shutdown", "start", "stop", or "thaw".
     - length: A positive whole number inclusively between 0 and 4294965248 representing the length of the "payload".
-    - status: The string name representing an FSS status code, such as F_none or F_failure.
+    - status: The status code name or number representing an FSS status code, such as F_none, F_failure, or 200 (where a number may have error and warning bits).
     - type: The packet type that is one of "error" and "controller".
 
   When there are multiple Objects of the same name inside the "header"\:
     - action: The order represents the order in which the actions are performed.
     - length: There may only be one length Object, all others after the first are ignored.
-    - status: The first represents the status and all other represent additional statuses.
+    - status: A status for each action, in the same order as the order of the action.
     - type: The first represent the type and all others represents a sub-type.
 
   There are different headers and payload properties based on the "type".
index db7a0af63bd5b3dd65d21549acb42cdf914c4f1f..3e10c579f47ebb0c88db8c80545d0b3d09a10c4a 100644 (file)
@@ -83,11 +83,11 @@ extern "C" {
       }
     }
 
-    char parameter_file_name_string[parameter_file_name.used + 1];
-    char parameter_file_name_major_string[parameter_file_name_major.used + 1];
-    char parameter_file_name_minor_string[parameter_file_name_minor.used + 1];
-    char parameter_file_name_micro_string[parameter_file_name_micro.used + 1];
-    char parameter_file_name_nano_string[parameter_file_name_nano.used + 1];
+    unsigned char parameter_file_name_string[parameter_file_name.used + 1];
+    unsigned char parameter_file_name_major_string[parameter_file_name_major.used + 1];
+    unsigned char parameter_file_name_minor_string[parameter_file_name_minor.used + 1];
+    unsigned char parameter_file_name_micro_string[parameter_file_name_micro.used + 1];
+    unsigned char parameter_file_name_nano_string[parameter_file_name_nano.used + 1];
 
     parameter_file_name.string = parameter_file_name_string;
     parameter_file_name_major.string = parameter_file_name_major_string;
@@ -245,8 +245,8 @@ extern "C" {
         parameter_linker.used += parameter_file_name_nano.used;
       }
 
-      char parameter_file_path_string[parameter_file_path.used + 1];
-      char parameter_linker_string[parameter_linker.used + 1];
+      unsigned char parameter_file_path_string[parameter_file_path.used + 1];
+      unsigned char parameter_linker_string[parameter_linker.used + 1];
 
       parameter_file_path.string = parameter_file_path_string;
       parameter_linker.string = parameter_linker_string;
@@ -322,7 +322,7 @@ extern "C" {
       f_string_static_t parameter_file_path = f_string_static_t_initialize;
       parameter_file_path.used = main->path_build_libraries_shared.used + parameter_file_name.used;
 
-      char parameter_file_path_string[parameter_file_path.used + 1];
+      unsigned char parameter_file_path_string[parameter_file_path.used + 1];
       parameter_file_path.string = parameter_file_path_string;
       parameter_file_path_string[parameter_file_path.used] = 0;
 
@@ -353,7 +353,7 @@ extern "C" {
       {
         parameter_file_path.used = main->path_build_libraries_shared.used + parameter_file_name_major.used;
 
-        char parameter_file_path_string[parameter_file_path.used + 1];
+        unsigned char parameter_file_path_string[parameter_file_path.used + 1];
         parameter_file_path.string = parameter_file_path_string;
         parameter_file_path_string[parameter_file_path.used] = 0;
 
@@ -382,7 +382,7 @@ extern "C" {
         {
           parameter_file_path.used = main->path_build_libraries_shared.used + parameter_file_name_minor.used;
 
-          char parameter_file_path_string[parameter_file_path.used + 1];
+          unsigned char parameter_file_path_string[parameter_file_path.used + 1];
           parameter_file_path.string = parameter_file_path_string;
           parameter_file_path_string[parameter_file_path.used] = 0;
 
@@ -410,7 +410,7 @@ extern "C" {
         if (data_build->setting.version_file != fake_build_version_type_micro_e && parameter_file_name_micro.used) {
           parameter_file_path.used = main->path_build_libraries_shared.used + parameter_file_name_micro.used;
 
-          char parameter_file_path_string[parameter_file_path.used + 1];
+          unsigned char parameter_file_path_string[parameter_file_path.used + 1];
           parameter_file_path.string = parameter_file_path_string;
           parameter_file_path_string[parameter_file_path.used] = 0;
 
@@ -472,7 +472,7 @@ extern "C" {
       destination.used = main->path_build_libraries_static.used + fake_build_parameter_library_name_prefix_s.used;
       destination.used += data_build->setting.build_name.used + fake_build_parameter_library_name_suffix_static_s.used;
 
-      char destination_string[destination.used + 1];
+      unsigned char destination_string[destination.used + 1];
       destination.string = destination_string;
       destination_string[destination.used] = 0;
       destination.used = 0;
@@ -546,7 +546,7 @@ extern "C" {
             source.used = main->path_build_objects.used + file_name.used + fake_build_parameter_object_name_suffix_s.used;
           }
 
-          char source_string[source.used + 1];
+          unsigned char source_string[source.used + 1];
           source.string = source_string;
           source_string[source.used] = 0;
 
index 5dd55755273341303df055e8116800d298aad07a..394e541245d8309e09073243f62e8d341d123138 100644 (file)
@@ -47,7 +47,7 @@ extern "C" {
       f_string_static_t parameter_file_name_path = f_string_static_t_initialize;
       parameter_file_name_path.used = main->path_build_objects_shared.used + data_build->setting.build_name.used + fake_build_parameter_object_name_suffix_s.used;
 
-      char parameter_file_name_path_string[parameter_file_name_path.used + 1];
+      unsigned char parameter_file_name_path_string[parameter_file_name_path.used + 1];
       parameter_file_name_path.string = parameter_file_name_path_string;
       parameter_file_name_path_string[parameter_file_name_path.used] = 0;
 
@@ -118,7 +118,7 @@ extern "C" {
       f_string_static_t parameter_file_name_path = f_string_static_t_initialize;
       parameter_file_name_path.used = main->path_build_objects_static.used + data_build->setting.build_name.used + fake_build_parameter_object_name_suffix_s.used;
 
-      char parameter_file_name_path_string[parameter_file_name_path.used + 1];
+      unsigned char parameter_file_name_path_string[parameter_file_name_path.used + 1];
       parameter_file_name_path.string = parameter_file_name_path_string;
       parameter_file_name_path_string[parameter_file_name_path.used] = 0;
 
index 40493a37f6931d9b5eb817ddd3e00a7727f18c9f..04088b4b2cf5b1649a10a85578d7d79fd2b89d4b 100644 (file)
@@ -57,7 +57,7 @@ extern "C" {
       f_string_static_t parameter_file_name_path = f_string_static_t_initialize;
       parameter_file_name_path.used = main->path_build_programs_shared.used + data_build->setting.build_name.used;
 
-      char parameter_file_name_path_string[parameter_file_name_path.used + 1];
+      unsigned char parameter_file_name_path_string[parameter_file_name_path.used + 1];
       parameter_file_name_path.string = parameter_file_name_path_string;
       parameter_file_name_path_string[parameter_file_name_path.used] = 0;
 
@@ -83,7 +83,7 @@ extern "C" {
       f_string_static_t link_project_library = f_string_static_t_initialize;
       link_project_library.used = fake_build_parameter_library_link_file_s.used + data_build->setting.build_name.used;
 
-      char link_project_library_string[link_project_library.used + 1];
+      unsigned char link_project_library_string[link_project_library.used + 1];
       link_project_library.string = link_project_library_string;
       link_project_library_string[link_project_library.used] = 0;
 
@@ -151,7 +151,7 @@ extern "C" {
       f_string_static_t source_library = f_string_static_t_initialize;
       source_library.used = main->path_build_libraries_static.used + fake_build_parameter_library_name_prefix_s.used + data_build->setting.build_name.used + fake_build_parameter_library_name_suffix_static_s.used;
 
-      char source_library_string[source_library.used + 1];
+      unsigned char source_library_string[source_library.used + 1];
       source_library.string = source_library_string;
       source_library_string[source_library.used] = 0;
       source_library.used = 0;
@@ -174,7 +174,7 @@ extern "C" {
       f_string_static_t parameter_file_name_path = f_string_static_t_initialize;
       parameter_file_name_path.used = main->path_build_programs_static.used + data_build->setting.build_name.used;
 
-      char parameter_file_name_path_string[parameter_file_name_path.used + 1];
+      unsigned char parameter_file_name_path_string[parameter_file_name_path.used + 1];
       parameter_file_name_path.string = parameter_file_name_path_string;
       parameter_file_name_path_string[parameter_file_name_path.used] = 0;
 
index 0e9e3b5b9c595b9e5981797e5db081da4782ee67..9746224c57cd07bc45a3142ffeb68cadff39dcc8 100644 (file)
@@ -18,7 +18,7 @@ extern "C" {
     f_string_static_t path_headers = f_string_static_t_initialize;
     path_headers.used = main->path_build_includes.used + data_build->setting.path_headers.used;
 
-    char path_headers_string[path_headers.used + 1];
+    unsigned char path_headers_string[path_headers.used + 1];
     path_headers.string = path_headers_string;
 
     if (data_build->setting.path_headers.used) {
index 8191bc98ade72da0a905d42eac86d4f5311c4f04..e631b7f6e0be1abfbd7f89f623741579f8e7d36e 100644 (file)
@@ -31,7 +31,7 @@ extern "C" {
     {
       f_array_length_t build_libraries_length = fake_build_parameter_library_link_path_s.used + main->path_build_libraries_shared.used;
 
-      char build_libraries[build_libraries_length + 1];
+      unsigned char build_libraries[build_libraries_length + 1];
 
       memcpy(build_libraries, fake_build_parameter_library_link_path_s.string, fake_build_parameter_library_link_path_s.used);
 
@@ -46,7 +46,7 @@ extern "C" {
 
       f_array_length_t build_includes_length = fake_build_parameter_library_include_s.used + main->path_build_includes.used;
 
-      char build_includes[build_includes_length + 1];
+      unsigned char build_includes[build_includes_length + 1];
 
       memcpy(build_includes, fake_build_parameter_library_include_s.string, fake_build_parameter_library_include_s.used);
       memcpy(build_includes + fake_build_parameter_library_include_s.used, main->path_build_includes.string, main->path_build_includes.used);
@@ -71,7 +71,7 @@ extern "C" {
       if (F_status_is_error_not(*status)) {
         buffer.used = fake_build_parameter_library_include_s.used + main->path_work_includes.used;
 
-        char buffer_string[buffer.used + 1];
+        unsigned char buffer_string[buffer.used + 1];
         buffer.string = buffer_string;
         buffer_string[buffer.used] = 0;
 
@@ -84,7 +84,7 @@ extern "C" {
       if (data_build->setting.search_shared && (is_shared || !data_build->setting.search_exclusive) && F_status_is_error_not(*status)) {
         buffer.used = fake_build_parameter_library_link_path_s.used + main->path_work_libraries_shared.used;
 
-        char buffer_string[buffer.used + 1];
+        unsigned char buffer_string[buffer.used + 1];
         buffer.string = buffer_string;
         buffer_string[buffer.used] = 0;
 
@@ -97,7 +97,7 @@ extern "C" {
       if (data_build->setting.search_static && (!is_shared || !data_build->setting.search_exclusive) && F_status_is_error_not(*status)) {
         buffer.used = fake_build_parameter_library_link_path_s.used + main->path_work_libraries_static.used;
 
-        char buffer_string[buffer.used + 1];
+        unsigned char buffer_string[buffer.used + 1];
         buffer.string = buffer_string;
         buffer_string[buffer.used] = 0;
 
@@ -557,7 +557,7 @@ extern "C" {
       f_string_static_t argument = f_string_static_t_initialize;
       argument.used = f_console_symbol_short_disable_s.used + f_console_standard_short_dark_s.used;
 
-      char argument_string[argument.used + 1];
+      unsigned char argument_string[argument.used + 1];
       argument.string = argument_string;
       argument_string[argument.used] = 0;
 
@@ -581,7 +581,7 @@ extern "C" {
       f_string_static_t argument = f_string_static_t_initialize;
       argument.used = f_console_symbol_short_disable_s.used + f_console_standard_short_quiet_s.used;
 
-      char argument_string[argument.used + 1];
+      unsigned char argument_string[argument.used + 1];
       argument.string = argument_string;
       argument_string[argument.used] = 0;
 
@@ -786,7 +786,7 @@ extern "C" {
 
         source.used = path->used + sources[i]->array[j].used;
 
-        char source_string[source.used + 1];
+        unsigned char source_string[source.used + 1];
         source.string = source_string;
         source_string[source.used] = 0;
 
@@ -853,7 +853,7 @@ extern "C" {
 
         fake_build_path_source_length(main, &data_build, &data_build.setting.path_sources, &source);
 
-        char source_string[source.used + fake_path_part_script_s.used + 1];
+        unsigned char source_string[source.used + fake_path_part_script_s.used + 1];
         source.string = source_string;
 
         fake_build_path_source_string(main, &data_build, &data_build.setting.path_sources, &source);
@@ -871,7 +871,7 @@ extern "C" {
 
         fake_build_path_source_length(main, &data_build, &data_build.setting.path_sources, &source);
 
-        char source_string[source.used + 1];
+        unsigned char source_string[source.used + 1];
         source.string = source_string;
 
         fake_build_path_source_string(main, &data_build, &data_build.setting.path_sources, &source);
@@ -879,7 +879,7 @@ extern "C" {
         f_string_static_t path_headers = f_string_static_t_initialize;
         path_headers.used = main->path_build_includes.used + data_build.setting.path_headers.used;
 
-        char path_headers_string[path_headers.used + 1];
+        unsigned char path_headers_string[path_headers.used + 1];
         path_headers.string = path_headers_string;
 
         memcpy(path_headers_string, main->path_build_includes.string, main->path_build_includes.used);
@@ -924,7 +924,7 @@ extern "C" {
 
         fake_build_path_source_length(main, &data_build, &data_build.setting.path_sources, &source);
 
-        char source_string[source.used + fake_path_part_script_s.used + 1];
+        unsigned char source_string[source.used + fake_path_part_script_s.used + 1];
         source.string = source_string;
 
         fake_build_path_source_string(main, &data_build, &data_build.setting.path_sources, &source);
@@ -1026,7 +1026,7 @@ extern "C" {
 
         fake_build_path_source_length(main, data_build, &data_build->setting.path_sources, &source);
 
-        char source_string[source.used + sources[i]->array[j].used + 1];
+        unsigned char source_string[source.used + sources[i]->array[j].used + 1];
         source.string = source_string;
 
         fake_build_path_source_string(main, data_build, &data_build->setting.path_sources, &source);
@@ -1060,7 +1060,7 @@ extern "C" {
       source.used += generic->used;
     }
 
-    char source_string[source.used + 1];
+    unsigned char source_string[source.used + 1];
     source.string = source_string;
 
     fake_build_path_source_string(main, data_build, &data_build->setting.path_sources_object, &source);
index c110548f7309293ae8bc948482b0cf47dc6a9a64..8c65dd144411268ccf32427b3d0a459cedfd6ffa 100644 (file)
@@ -65,7 +65,7 @@ extern "C" {
         destination.used += arguments.array[i].used + 1;
       }
 
-      char destination_string[destination.used + 1];
+      unsigned char destination_string[destination.used + 1];
       destination.string = destination_string;
       destination_string[destination.used] = 0;
 
@@ -1056,7 +1056,7 @@ extern "C" {
         destination.used += arguments.array[i].used + 1;
       }
 
-      char destination_string[destination.used + 1];
+      unsigned char destination_string[destination.used + 1];
       destination.string = destination_string;
       destination_string[destination.used] = 0;
 
index 60132f52fa23c37a5c36211b944490ac0a4d40d0..fdcb0f5b39201a4285c81ccd7b056873b9ec08b9 100644 (file)
@@ -82,7 +82,7 @@ extern "C" {
           f_string_static_t path_file = f_string_static_t_initialize;
           path_file.used = data_make->main->path_data_build.used + arguments.array[0].used;
 
-          char path_file_string[path_file.used + 1];
+          unsigned char path_file_string[path_file.used + 1];
           path_file.string = path_file_string;
           path_file_string[path_file.used] = 0;
 
index d4c9ee9801ab5043830501bb50954caae1dba836..f72364db29c35a6daba4b991412403815ed14cb2 100644 (file)
@@ -36,11 +36,11 @@ extern "C" {
       fake_skeleton_path_source_length(main, &fake_path_part_cpp_s, &sources_cpp);
       fake_skeleton_path_source_length(main, &fake_path_part_script_s, &sources_script);
 
-      char sources_string[sources.used + 1];
-      char sources_bash_string[sources_bash.used + 1];
-      char sources_c_string[sources_c.used + 1];
-      char sources_cpp_string[sources_cpp.used + 1];
-      char sources_script_string[sources_script.used + 1];
+      unsigned char sources_string[sources.used + 1];
+      unsigned char sources_bash_string[sources_bash.used + 1];
+      unsigned char sources_c_string[sources_c.used + 1];
+      unsigned char sources_cpp_string[sources_cpp.used + 1];
+      unsigned char sources_script_string[sources_script.used + 1];
 
       sources.string = sources_string;
       sources_bash.string = sources_bash_string;
index 1449cdae4d7f4ee22acb8089f04f8c9f827bf2f4..a7c4e56603dd9627a4d7acad2efecf0af3c9ced9 100644 (file)
@@ -397,7 +397,7 @@ extern "C" {
         f_string_static_t path_file_other = f_string_static_t_initialize;
         path_file_other.used = firewall_network_path_s.used + firewall_file_other_s.used;
 
-        char path_file_other_string[path_file_other.used + 1];
+        unsigned char path_file_other_string[path_file_other.used + 1];
         path_file_other.string = path_file_other_string;
         path_file_other_string[path_file_other.used] = 0;
 
@@ -518,7 +518,7 @@ extern "C" {
         f_string_static_t path_file_first = f_string_static_t_initialize;
         path_file_first.used = firewall_network_path_s.used + firewall_file_first_s.used;
 
-        char path_file_first_string[path_file_first.used + 1];
+        unsigned char path_file_first_string[path_file_first.used + 1];
         path_file_first.string = path_file_first_string;
         path_file_first_string[path_file_first.used] = 0;
 
index 5a0980355fbfb231a71f6959d06f0164c195fcab..6a2d0d01f71f47bb16198f9efef0ac5609186ef1 100644 (file)
@@ -73,7 +73,7 @@ extern "C" {
     f_array_length_t i = 0;
     f_array_length_t j = 0;
 
-    char block_character[4] = { 0, 0, 0, 0 };
+    unsigned char block_character[4] = { 0, 0, 0, 0 };
     f_string_static_t character = macro_f_string_static_t_initialize2(block_character, 4);
 
     do {
index 6dae00f3a028d04ec24b17899bd86b6aaebe4429..ecca9f2d145cfa63fa6b8c00c835e157e7dfc1bf 100644 (file)
@@ -53,7 +53,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) {
-          char byte[5] = { 0, 0, 0, 0, 0 };
+          unsigned char byte[5] = { 0, 0, 0, 0, 0 };
           f_string_static_t character = macro_f_string_static_t_initialize2(byte, 5);
 
           status = f_utf_unicode_from(codepoint, 4, &character.string);
@@ -209,7 +209,7 @@ extern "C" {
     f_array_length_t i = 0;
     f_array_length_t j = 0;
 
-    char block[4] = { 0, 0, 0, 0 };
+    unsigned char block[4] = { 0, 0, 0, 0 };
     f_string_static_t character = macro_f_string_static_t_initialize2(block, 4);
 
     do {