]> Kevux Git Server - fll/commitdiff
Update: get the level_3 / programs working after major file / directory changes
authorKevin Day <thekevinday@gmail.com>
Sat, 23 May 2020 05:35:03 +0000 (00:35 -0500)
committerKevin Day <thekevinday@gmail.com>
Sat, 23 May 2020 05:35:03 +0000 (00:35 -0500)
This required making some fixes in the files related code.
This puts the UTF-8 file (utf_file) project notably behind an additional work is necessary to get that working correctly as well as having it be consistent with f_file.

I've decided that when written pointer is 0, then the caller is requesting to not get back the written size.
I am very likely going to do similar behavior with null pointers in other uses, which will help further simplify the design.

Other minor changes.
Of particular note is moving flags into the f_file structure.
This was effectively how the pre-file redesign worked, but it uses flags now instead of the "r", "rw", "a", etc.. string modes used by fopen.
Make sure an append flag is available.

55 files changed:
level_0/f_file/c/file.c
level_0/f_file/c/file.h
level_0/f_file/c/private-file.c
level_0/f_file/c/private-file.h
level_0/f_pipe/c/pipe.c
level_0/f_pipe/c/pipe.h
level_0/f_status/c/status.h
level_0/f_type/c/type.h
level_1/fl_fss/c/fss.h
level_1/fl_status/c/status.c
level_1/fl_status/c/status.h
level_1/fl_utf_file/c/utf_file.c
level_2/fll_execute/c/execute.c
level_2/fll_file/c/file.h
level_2/fll_program/c/program.c
level_2/fll_status/c/status.c
level_3/byte_dump/c/byte_dump.c
level_3/byte_dump/c/main.c
level_3/byte_dump/c/private-byte_dump.c
level_3/fake/c/fake.c
level_3/fake/c/private-build.c
level_3/fake/c/private-clean.c
level_3/fake/c/private-fake.c
level_3/fake/c/private-skeleton.c
level_3/firewall/c/firewall.c
level_3/firewall/c/main.c
level_3/firewall/c/private-firewall.c
level_3/firewall/c/private-firewall.h
level_3/fss_basic_list_read/c/fss_basic_list_read.c
level_3/fss_basic_list_read/c/main.c
level_3/fss_basic_list_read/c/private-fss_basic_list_read.c
level_3/fss_basic_list_write/c/fss_basic_list_write.c
level_3/fss_basic_list_write/c/main.c
level_3/fss_basic_read/c/fss_basic_read.c
level_3/fss_basic_read/c/main.c
level_3/fss_basic_read/c/private-fss_basic_read.c
level_3/fss_basic_write/c/fss_basic_write.c
level_3/fss_extended_list_read/c/fss_extended_list_read.c
level_3/fss_extended_list_read/c/fss_extended_list_read.h
level_3/fss_extended_list_read/c/main.c
level_3/fss_extended_list_read/c/private-fss_extended_list_read.c
level_3/fss_extended_read/c/fss_extended_read.c
level_3/fss_extended_read/c/main.c
level_3/fss_extended_read/c/private-fss_extended_read.c
level_3/fss_extended_write/c/fss_extended_write.c
level_3/fss_extended_write/c/main.c
level_3/fss_status_code/c/fss_status_code.c
level_3/fss_status_code/c/main.c
level_3/fss_status_code/c/private-fss_status_code.c
level_3/init/c/init.c
level_3/init/c/main.c
level_3/init/c/private-init.c
level_3/status_code/c/main.c
level_3/status_code/c/private-status_code.c
level_3/status_code/c/status_code.c

index 0ef6071f623e986c0ea8a02c54981fe7b073c95f..c7a1c56d9b7baa2f6c43e3ad75559aa83bc45c65 100644 (file)
@@ -344,22 +344,22 @@ extern "C" {
 #endif // _di_f_file_is_at_
 
 #ifndef _di_f_file_open_
-  f_return_status f_file_open(const f_string path, const int flags, const mode_t mode, f_file *file) {
+  f_return_status f_file_open(const f_string path, const mode_t mode, f_file *file) {
     #ifndef _di_level_0_parameter_checking_
       if (file == 0) return f_status_set_error(f_invalid_parameter);
     #endif // _di_level_0_parameter_checking_
 
-    return private_f_file_open(path, mode, flags, file);
+    return private_f_file_open(path, mode, file);
   }
 #endif // _di_f_file_open_
 
 #ifndef _di_f_file_open_at_
-  f_return_status f_file_open_at(const int at_id, const f_string path, const int flags, const mode_t mode, f_file *file) {
+  f_return_status f_file_open_at(const int at_id, const f_string path, const mode_t mode, f_file *file) {
     #ifndef _di_level_0_parameter_checking_
       if (file == 0) return f_status_set_error(f_invalid_parameter);
     #endif // _di_level_0_parameter_checking_
 
-    return private_f_file_open_at(at_id, path, flags, mode, file);
+    return private_f_file_open_at(at_id, path, mode, file);
   }
 #endif // _di_f_file_open_at_
 
@@ -367,7 +367,7 @@ extern "C" {
   f_return_status f_file_read(const f_file file, f_string_dynamic *buffer) {
     #ifndef _di_level_0_parameter_checking_
       if (file.size_read == 0) return f_status_set_error(f_invalid_parameter);
-      if (buffer->used >= buffer->size) return f_status_set_error(f_invalid_parameter);
+      if (buffer->used > buffer->size) return f_status_set_error(f_invalid_parameter);
     #endif // _di_level_0_parameter_checking_
 
     if (file.id <= 0) return f_status_set_error(f_file_not_open);
@@ -417,7 +417,7 @@ extern "C" {
   f_return_status f_file_read_block(const f_file file, f_string_dynamic *buffer) {
     #ifndef _di_level_0_parameter_checking_
       if (file.size_read == 0) return f_status_set_error(f_invalid_parameter);
-      if (buffer->used >= buffer->size) return f_status_set_error(f_invalid_parameter);
+      if (buffer->used > buffer->size) return f_status_set_error(f_invalid_parameter);
     #endif // _di_level_0_parameter_checking_
 
     if (file.id <= 0) return f_status_set_error(f_file_not_open);
@@ -467,7 +467,7 @@ extern "C" {
   f_return_status f_file_read_until(const f_file file, f_string_dynamic *buffer, const f_string_length total) {
     #ifndef _di_level_0_parameter_checking_
       if (file.size_read == 0) return f_status_set_error(f_invalid_parameter);
-      if (buffer->used >= buffer->size) return f_status_set_error(f_invalid_parameter);
+      if (buffer->used > buffer->size) return f_status_set_error(f_invalid_parameter);
     #endif // _di_level_0_parameter_checking_
 
     if (file.id <= 0) return f_status_set_error(f_file_not_open);
@@ -696,14 +696,26 @@ extern "C" {
     if (file.id <= 0) return f_status_set_error(f_file_not_open);
 
     if (buffer.used == 0) {
-      *written = 0;
+      if (written) *written = 0;
       return f_no_data;
     }
 
-    f_status status = private_f_file_write_until(file, buffer.string, buffer.used, written);
-    if (f_status_is_error(status)) return f_status_set_error(status);
+    f_status status = f_none;
+
+    if (written) {
+      private_f_file_write_until(file, buffer.string, buffer.used, written);
+
+      if (status == f_none && *written == buffer.used) return f_none_on_eos;
+    }
+    else {
+      f_string_length written_local = 0;
 
-    if (status == f_none && *written == buffer.used) return f_none_on_eos;
+      private_f_file_write_until(file, buffer.string, buffer.used, &written_local);
+
+      if (status == f_none && written_local == buffer.used) return f_none_on_eos;
+    }
+
+    if (f_status_is_error(status)) return f_status_set_error(status);
 
     return status;
   }
@@ -719,7 +731,7 @@ extern "C" {
     if (file.id <= 0) return f_status_set_error(f_file_not_open);
 
     if (buffer.used == 0) {
-      *written = 0;
+      if (written) *written = 0;
       return f_no_data;
     }
 
@@ -729,10 +741,26 @@ extern "C" {
       write_max = buffer.used;
     }
 
-    f_status status = private_f_file_write_until(file, buffer.string, write_max, written);
-    if (f_status_is_error(status)) return f_status_set_error(status);
+    f_status status = f_none;
+
+    if (written) {
+      private_f_file_write_until(file, buffer.string, write_max, written);
 
-    if (status == f_none && *written == buffer.used) return f_none_on_eos;
+      if (status == f_none) {
+        if (*written == buffer.used) return f_none_on_eos;
+        if (*written == write_max) return f_none_on_stop;
+      }
+    }
+    else {
+      f_string_length written_local = 0;
+
+      private_f_file_write_until(file, buffer.string, write_max, &written_local);
+
+      if (status == f_none) {
+        if (written_local == buffer.used) return f_none_on_eos;
+        if (written_local == write_max) return f_none_on_stop;
+      }
+    }
 
     return status;
   }
@@ -748,7 +776,7 @@ extern "C" {
     if (file.id <= 0) return f_status_set_error(f_file_not_open);
 
     if (buffer.used == 0 || total == 0) {
-      *written = 0;
+      if (written) *written = 0;
       return f_no_data;
     }
 
@@ -758,10 +786,26 @@ extern "C" {
       write_max = buffer.used;
     }
 
-    f_status status = private_f_file_write_until(file, buffer.string, write_max, written);
-    if (f_status_is_error(status)) return f_status_set_error(status);
+    f_status status = f_none;
+
+    if (written) {
+      private_f_file_write_until(file, buffer.string, write_max, written);
 
-    if (status == f_none && *written == buffer.used) return f_none_on_eos;
+      if (status == f_none) {
+        if (*written == buffer.used) return f_none_on_eos;
+        if (*written == write_max) return f_none_on_stop;
+      }
+    }
+    else {
+      f_string_length written_local = 0;
+
+      private_f_file_write_until(file, buffer.string, buffer.used, &written_local);
+
+      if (status == f_none) {
+        if (written_local == buffer.used) return f_none_on_eos;
+        if (written_local == write_max) return f_none_on_stop;
+      }
+    }
 
     return status;
   }
@@ -779,7 +823,7 @@ extern "C" {
     if (file.id <= 0) return f_status_set_error(f_file_not_open);
 
     if (buffer.used == 0) {
-      *written = 0;
+      if (written) *written = 0;
       return f_no_data;
     }
 
@@ -790,12 +834,25 @@ extern "C" {
       write_max = buffer.used;
     }
 
-    f_status status = private_f_file_write_until(file, buffer.string + range.start, write_max, written);
-    if (f_status_is_error(status)) return f_status_set_error(status);
+    f_status status = f_none;
+
+    if (written) {
+      private_f_file_write_until(file, buffer.string + range.start, write_max, written);
+
+      if (status == f_none) {
+        if (range.start + *written == buffer.used) return f_none_on_stop;
+        if (range.start + *written == total) return f_none_on_eos;
+      }
+    }
+    else {
+      f_string_length written_local = 0;
 
-    if (status == f_none) {
-      if (range.start + *written == total) return f_none_on_stop;
-      if (range.start + *written == buffer.used) return f_none_on_eos;
+      private_f_file_write_until(file, buffer.string + range.start, write_max, &written_local);
+
+      if (status == f_none) {
+        if (range.start + written_local == buffer.used) return f_none_on_eos;
+        if (range.start + written_local == total) return f_none_on_stop;
+      }
     }
 
     return status;
index 321a042cba6c12b7a77baa181a4680eb84684893..efbec56dd9fa511de3ca71197171e2678c282a24 100644 (file)
@@ -86,16 +86,19 @@ extern "C" {
  * Commonly used file related properties.
  *
  * id: File descriptor.
- * size_block: The default number of 1-byte characters to read at a time and is often used for the read/write buffer size.
+ * flags: Flags used for opening the file.
+ * size_read: The default number of 1-byte characters to read at a time and is often used for the read buffer size.
+ * size_write: The default number of 1-byte characters to read at a time and is often used for the write buffer size.
  */
 #ifndef _di_f_file_
   typedef struct {
     int    id;
+    int    flags;
     size_t size_read;
     size_t size_write;
   } f_file;
 
-  #define f_file_initialize { 0, f_file_default_read_size, f_file_default_write_size }
+  #define f_file_initialize { 0, O_RDONLY, f_file_default_read_size, f_file_default_write_size }
 #endif // _di_f_file_
 
 /**
@@ -140,6 +143,10 @@ extern "C" {
   #define f_file_flag_truncate_rw (O_CREAT | O_TRUNC | O_RDRW)
   #define f_file_flag_truncate_wo (O_CREAT | O_TRUNC | O_WRONLY)
 
+  // file open flags pre-combined will truncate any existing files to 0.
+  #define f_file_flag_append_rw (O_CREAT | O_APPEND | O_RDRW)
+  #define f_file_flag_append_wo (O_CREAT | O_APPEND | O_WRONLY)
+
   // file open flags pre-combined with synchronous io.
   #define f_file_flag_sync_ro            (O_SYNC | O_RDONLY)
   #define f_file_flag_sync_wo            (O_SYNC | O_WRONLY)
@@ -242,6 +249,30 @@ extern "C" {
 #endif // _di_f_file_modes_
 
 /**
+ * Check if a file can be accessed.
+ *
+ * @param path
+ *   The path file name.
+ *
+ * @return
+ *   f_true if file exists.
+ *   f_false if file does not exist.
+ *   f_invalid_parameter (with error bit) if a parameter is invalid.
+ *   f_invalid_name (with error bit) if the filename is too long.
+ *   f_out_of_memory (with error bit) if out of memory.
+ *   f_number_overflow (with error bit) on overflow error.
+ *   f_invalid_directory (with error bit) on invalid directory.
+ *   f_access_denied (with error bit) on access denied.
+ *   f_loop (with error bit) on loop error.
+ *   f_false (with error bit) on unknown/unhandled errors.
+ *
+ * @see access()
+ */
+#ifndef _di_f_file_access_
+  extern f_return_status f_file_access(const f_string path);
+#endif // _di_f_file_access_
+
+/**
  * Change mode of a given file at the specified path.
  *
  * @param path
@@ -368,30 +399,6 @@ extern "C" {
 #endif // _di_f_file_change_owner_at_
 
 /**
- * Check if a file can be accessed.
- *
- * @param path
- *   The path file name.
- *
- * @return
- *   f_true if file exists.
- *   f_false if file does not exist.
- *   f_invalid_parameter (with error bit) if a parameter is invalid.
- *   f_invalid_name (with error bit) if the filename is too long.
- *   f_out_of_memory (with error bit) if out of memory.
- *   f_number_overflow (with error bit) on overflow error.
- *   f_invalid_directory (with error bit) on invalid directory.
- *   f_access_denied (with error bit) on access denied.
- *   f_loop (with error bit) on loop error.
- *   f_false (with error bit) on unknown/unhandled errors.
- *
- * @see access()
- */
-#ifndef _di_f_file_access_
-  extern f_return_status f_file_access(const f_string path);
-#endif // _di_f_file_access_
-
-/**
  * Copy a file.
  *
  * The paths must not contain NULL except for the terminating NULL.
@@ -827,8 +834,6 @@ extern "C" {
  *
  * @param path
  *   The path file name.
- * @param flags
- *   Any valid flag, such as AT_EMPTY_PATH, AT_NO_AUTOMOUNT, or AT_SYMLINK_NO_FOLLOW.
  * @param mode
  *   The file mode to open in.
  *   Set to 0 to not use.
@@ -846,7 +851,7 @@ extern "C" {
  * @see open()
  */
 #ifndef _di_f_file_open_
-  extern f_return_status f_file_open(const f_string path, const int flags, const mode_t mode, f_file *file);
+  extern f_return_status f_file_open(const f_string path, const mode_t mode, f_file *file);
 #endif // _di_f_file_open_
 
 /**
@@ -858,8 +863,6 @@ extern "C" {
  *   The parent directory, as an open directory file descriptor, in which path is relative to.
  * @param path
  *   The path file name.
- * @param flags
- *   Any valid flag, such as AT_EMPTY_PATH, AT_NO_AUTOMOUNT, or AT_SYMLINK_NO_FOLLOW.
  * @param mode
  *   The file mode to open in.
  *   Set to 0 to not use.
@@ -877,7 +880,7 @@ extern "C" {
  * @see openat()
  */
 #ifndef _di_f_file_open_at_
-  extern f_return_status f_file_open_at(const int at_id, const f_string path, const int flags, const mode_t mode, f_file *file);
+  extern f_return_status f_file_open_at(const int at_id, const f_string path, const mode_t mode, f_file *file);
 #endif // _di_f_file_open_at_
 
 /**
@@ -1234,6 +1237,7 @@ extern "C" {
  *   The buffer to write to the file.
  * @param written
  *   The total bytes written.
+ *   Set pointer to 0 to not use.
  *
  * @return
  *   f_none on success.
@@ -1265,6 +1269,7 @@ extern "C" {
  *   The buffer to write to the file.
  * @param written
  *   The total bytes written.
+ *   Set pointer to 0 to not use.
  *
  * @return
  *   f_none on success.
@@ -1296,6 +1301,7 @@ extern "C" {
  *   The total bytes to write, unless end of buffer is reached first.
  * @param written
  *   The total bytes written.
+ *   Set pointer to 0 to not use.
  *
  * @return
  *   f_none on success.
@@ -1328,6 +1334,7 @@ extern "C" {
  *   An inclusive start an stop range within the buffer to read.
  * @param written
  *   The total bytes written.
+ *   Set pointer to 0 to not use.
  *
  * @return
  *   f_none on success.
index 5e1728be5bd46dfdf6ad258906e2143c683814e4..fca39e33dd0b36e83c332c2c9531fe32bce83a57 100644 (file)
@@ -119,10 +119,13 @@ extern "C" {
     f_file file_source = f_file_initialize;
     f_file file_destination = f_file_initialize;
 
-    f_status status = private_f_file_open(source, f_file_flag_read_only, 0, &file_source);
+    file_source.flags = f_file_flag_read_only;
+    file_destination.flags = f_file_flag_write_only | f_file_flag_no_follow;
+
+    f_status status = private_f_file_open(source, 0, &file_source);
     if (f_status_is_error(status)) return status;
 
-    status = private_f_file_open(destination, f_file_flag_write_only | f_file_flag_no_follow, 0, &file_destination);
+    status = private_f_file_open(destination, 0, &file_destination);
     if (f_status_is_error(status)) {
       private_f_file_close(&file_source.id);
       return status;
@@ -156,18 +159,19 @@ extern "C" {
 
 #if !defined(_di_f_file_create_) || !defined(_di_f_file_copy_)
   f_return_status private_f_file_create(const f_string path, const mode_t mode, const bool exclusive, const bool dereference) {
-    int flags = O_CLOEXEC | O_CREAT | O_WRONLY;
+    f_file file = f_file_initialize;
+
+    file.flags = O_CLOEXEC | O_CREAT | O_WRONLY;
 
     if (exclusive) {
-      flags |= O_EXCL;
+      file.flags |= O_EXCL;
     }
 
     if (!dereference) {
-      flags |= O_NOFOLLOW;
+      file.flags |= O_NOFOLLOW;
     }
 
-    f_file file = f_file_initialize;
-    f_status status = private_f_file_open(path, mode, flags, &file);
+    f_status status = private_f_file_open(path, mode, &file);
 
     if (file.id > 0) {
       return private_f_file_close(&file.id);
@@ -179,18 +183,19 @@ extern "C" {
 
 #if !defined(_di_f_file_create_at_) || !defined(_di_f_file_copy_at_)
   f_return_status private_f_file_create_at(const int at_id, const f_string path, const mode_t mode, const bool exclusive, const bool dereference) {
-    int flags = O_CLOEXEC | O_CREAT | O_WRONLY;
+    f_file file = f_file_initialize;
+
+    file.flags = O_CLOEXEC | O_CREAT | O_WRONLY;
 
     if (exclusive) {
-      flags |= O_EXCL;
+      file.flags |= O_EXCL;
     }
 
     if (!dereference) {
-      flags |= O_NOFOLLOW;
+      file.flags |= O_NOFOLLOW;
     }
 
-    f_file file = f_file_initialize;
-    f_status status = private_f_file_open_at(at_id, path, flags, mode, &file);
+    f_status status = private_f_file_open_at(at_id, path, mode, &file);
 
     if (file.id > 0) {
       return private_f_file_close(&file.id);
@@ -275,12 +280,12 @@ extern "C" {
 #endif // !defined(_di_f_file_link_at_) || !defined(_di_f_file_copy_at_)
 
 #if !defined(_di_f_file_open_) || !defined(_di_f_file_copy_)
-  f_return_status private_f_file_open(const f_string path, const int flags, const mode_t mode, f_file *file) {
+  f_return_status private_f_file_open(const f_string path, const mode_t mode, f_file *file) {
     if (mode == 0) {
-      file->id = open(path, flags);
+      file->id = open(path, file->flags);
     }
     else {
-      file->id = open(path, flags, mode);
+      file->id = open(path, file->flags, mode);
     }
 
     if (file->id < 0) {
@@ -310,12 +315,12 @@ extern "C" {
 #endif // !defined(_di_f_file_open_) || !defined(_di_f_file_copy_)
 
 #if !defined(_di_f_file_open_at_) || !defined(_di_f_file_copy_at_)
-  f_return_status private_f_file_open_at(const int at_id, const f_string path, const int flags, const mode_t mode, f_file *file) {
+  f_return_status private_f_file_open_at(const int at_id, const f_string path, const mode_t mode, f_file *file) {
     if (mode == 0) {
-      file->id = openat(at_id, path, flags);
+      file->id = openat(at_id, path, file->flags);
     }
     else {
-      file->id = openat(at_id, path, flags, mode);
+      file->id = openat(at_id, path, file->flags, mode);
     }
 
     if (file->id < 0) {
index b63c22effe40172fd88d6ebfec93a9b933616d8b..83013f6c565e1281c5a0e451acfcc3c192918fa3 100644 (file)
@@ -43,6 +43,7 @@ extern "C" {
  *   f_failure (with error bit) for any other (mkdir()) error.
  *
  * @see f_file_change_mode()
+ * @see f_file_copy()
  */
 #if !defined(_di_f_file_change_mode_) || !defined(_di_f_file_copy_)
   extern f_return_status private_f_file_change_mode(const f_string path, const mode_t mode, const bool dereference) f_gcc_attribute_visibility_internal;
@@ -77,6 +78,7 @@ extern "C" {
  *   f_failure (with error bit) for any other (mkdir()) error.
  *
  * @see f_file_change_mode_at()
+ * @see f_file_copy_at()
  */
 #if !defined(_di_f_file_change_mode_at_) || !defined(_di_f_file_copy_at_)
   extern f_return_status private_f_file_change_mode_at(const int at_id, const f_string path, const mode_t mode, const int flags) f_gcc_attribute_visibility_internal;
@@ -112,6 +114,7 @@ extern "C" {
  *   f_failure (with error bit) for any other (mkdir()) error.
  *
  * @see f_file_change_owner()
+ * @see f_file_copy()
  */
 #if !defined(_di_f_file_change_owner_) || !defined(_di_f_file_copy_)
   extern f_return_status private_f_file_change_owner(const f_string path, const uid_t uid, const gid_t gid, const bool dereference) f_gcc_attribute_visibility_internal;
@@ -148,6 +151,7 @@ extern "C" {
  *   f_failure (with error bit) for any other (mkdir()) error.
  *
  * @see f_file_change_owner_at()
+ * @see f_file_copy_at()
  */
 #if !defined(_di_f_file_change_owner_at_) || !defined(_di_f_file_copy_at_)
   extern f_return_status private_f_file_change_owner_at(const int at_id, const f_string path, const uid_t uid, const gid_t gid, const int flags) f_gcc_attribute_visibility_internal;
@@ -173,6 +177,7 @@ extern "C" {
  *   f_file_error_close (with error bit) if fclose() failed for any other reason.
  *
  * @see f_file_close()
+ * @see f_file_copy()
  */
 #if !defined(_di_f_file_close_) || !defined(_di_f_file_copy_)
   extern f_return_status private_f_file_close(int *id) f_gcc_attribute_visibility_internal;
@@ -235,11 +240,17 @@ extern "C" {
  *   The path file name.
  * @param mode
  *   The file mode to open in.
- * @param flags
- *   Any valid flag, such as AT_EMPTY_PATH, AT_NO_AUTOMOUNT, or AT_SYMLINK_NO_FOLLOW.
  * @param file
  *   The data related to the file being opened.
  *   This will be updated with the file descriptor and file address.
+ *   This will be updated with the create flags (ignoring and overriding existing file.flags).
+ * @param exclusive
+ *   If TRUE, will fail when file already exists.
+ *   If FALSE, will not fail if file already exists.
+ * @param dereference
+ *   Set to TRUE to dereferenc symlinks (often is what is desired).
+ *   Set to FALSE to fail if the path is a symbolic link.
+ *   This does not write symbolic links. (@todo add function f_create_link() for creating symbolic links.)
  *
  * @return
  *   f_none on success.
@@ -261,6 +272,7 @@ extern "C" {
  *   f_file_max_open (with error bit) when system-wide max open files is reached.
  *   f_busy (with error bit) if filesystem is too busy to perforrm write.
  *
+ * @see f_file_copy()
  * @see f_file_create()
  */
 #if !defined(_di_f_file_create_) || !defined(_di_f_file_copy_)
@@ -277,12 +289,18 @@ extern "C" {
  * @param file
  *   The data related to the file being opened.
  *   This will be updated with the file descriptor and file address.
+ *   This will be updated with the create flags (ignoring and overriding existing file.flags).
  * @param path
  *   The path file name.
  * @param mode
  *   The file mode to open in.
- * @param flags
- *   Any valid flag, such as AT_EMPTY_PATH, AT_NO_AUTOMOUNT, or AT_SYMLINK_NO_FOLLOW.
+ * @param exclusive
+ *   If TRUE, will fail when file already exists.
+ *   If FALSE, will not fail if file already exists.
+ * @param dereference
+ *   Set to TRUE to dereferenc symlinks (often is what is desired).
+ *   Set to FALSE to fail if the path is a symbolic link.
+ *   This does not write symbolic links. (@todo add function f_create_link() for creating symbolic links.)
  *
  * @return
  *   f_none on success.
@@ -304,6 +322,7 @@ extern "C" {
  *   f_file_max_open (with error bit) when system-wide max open files is reached.
  *   f_busy (with error bit) if filesystem is too busy to perforrm write.
  *
+ * @see f_file_copy_at()
  * @see f_file_create_at()
  */
 #if !defined(_di_f_file_create_at_) || !defined(_di_f_file_copy_at_)
@@ -322,6 +341,7 @@ extern "C" {
  *
  * @return
  *
+ * @see f_file_copy()
  * @see f_file_link()
  */
 #if !defined(_di_f_file_link_) || !defined(_di_f_file_copy_)
@@ -342,6 +362,7 @@ extern "C" {
  *
  * @return
  *
+ * @see f_file_copy_at()
  * @see f_file_link_at()
  */
 #if !defined(_di_f_file_link_at_) || !defined(_di_f_file_copy_at_)
@@ -366,6 +387,8 @@ extern "C" {
  *   f_unsupported (with error bit) if the file system or file type does not support flushing.
  *   f_failure (with error bit) on any other failure.
  *
+ * @see f_file_close()
+ * @see f_file_copy()
  * @see f_file_flush()
  */
 #if !defined(_di_f_file_flush_) || !defined(_di_f_file_close_) || !defined(_di_f_file_copy_)
@@ -373,14 +396,52 @@ extern "C" {
 #endif // !defined(_di_f_file_flush_) || !defined(_di_f_file_close_) || !defined(_di_f_file_copy_)
 
 /**
+ * Create a link to a file.
+ *
+ * This will not replace existing files/links.
+ *
+ * @param target
+ *   A path that the link points to.
+ * @param point
+ *   A path to the link that does the pointing.
+ *
+ * @return
+ *
+ * @see f_file_link()
+ * @see f_file_copy()
+ */
+#if !defined(_di_f_file_link_) || !defined(_di_f_file_copy_)
+  extern f_return_status private_f_file_link(const f_string target, const f_string point);
+#endif // !defined(_di_f_file_link_) || !defined(_di_f_file_copy_)
+
+/**
+ * Create a link to a file.
+ *
+ * This will not replace existing files/links.
+ *
+ * @param at_id
+ *   The parent directory, as an open directory file descriptor, in which path is relative to.
+ * @param target
+ *   A path that the link points to.
+ * @param point
+ *   A path to the link that does the pointing.
+ *
+ * @return
+ *
+ * @see f_file_link_at()
+ * @see f_file_copy_at()
+ */
+#if !defined(_di_f_file_link_at_) || !defined(_di_f_file_copy_at_)
+  extern f_return_status private_f_file_link_at(const int at_id, const f_string target, const f_string point);
+#endif // !defined(_di_f_file_link_at_) || !defined(_di_f_file_copy_at_)
+
+/**
  * Private implementation of f_file_open().
  *
  * Intended to be shared to each of the different implementation variations.
  *
  * @param path
  *   The path file name.
- * @param flags
- *   Any valid flag, such as AT_EMPTY_PATH, AT_NO_AUTOMOUNT, or AT_SYMLINK_NO_FOLLOW.
  * @param mode
  *   The file mode to open in.
  *   Set to 0 to not use.
@@ -395,10 +456,11 @@ extern "C" {
  *   f_file_error_descriptor (with error bit) if unable to load the file descriptor (the file pointer may still be valid).
  *   f_invalid_parameter (with error bit) if a parameter is invalid.
  *
+ * @see f_file_copy()
  * @see f_file_open()
  */
 #if !defined(_di_f_file_open_) || !defined(_di_f_file_copy_)
-  extern f_return_status private_f_file_open(const f_string path, const int flags, const mode_t mode, f_file *file) f_gcc_attribute_visibility_internal;
+  extern f_return_status private_f_file_open(const f_string path, const mode_t mode, f_file *file) f_gcc_attribute_visibility_internal;
 #endif // !defined(_di_f_file_open_) || !defined(_di_f_file_copy_)
 
 /**
@@ -410,8 +472,6 @@ extern "C" {
  *   The parent directory, as an open directory file descriptor, in which path is relative to.
  * @param path
  *   The path file name.
- * @param flags
- *   Any valid flag, such as AT_EMPTY_PATH, AT_NO_AUTOMOUNT, or AT_SYMLINK_NO_FOLLOW.
  * @param mode
  *   The file mode to open in.
  *   Set to 0 to not use.
@@ -426,31 +486,14 @@ extern "C" {
  *   f_file_error_descriptor (with error bit) if unable to load the file descriptor (the file pointer may still be valid).
  *   f_invalid_parameter (with error bit) if a parameter is invalid.
  *
+ * @see f_file_copy_at()
  * @see f_file_open_at()
  */
 #if !defined(_di_f_file_open_at_) || !defined(_di_f_file_copy_at_)
-  extern f_return_status private_f_file_open_at(const int at_id, const f_string path, const int flags, const mode_t mode, f_file *file) f_gcc_attribute_visibility_internal;
+  extern f_return_status private_f_file_open_at(const int at_id, const f_string path, const mode_t mode, f_file *file) f_gcc_attribute_visibility_internal;
 #endif // !defined(_di_f_file_open_at_) || !defined(_di_f_file_copy_at_)
 
 /**
- * Create a link to a file.
- *
- * This will not replace existing files/links.
- *
- * @param target
- *   A path that the link points to.
- * @param point
- *   A path to the link that does the pointing.
- *
- * @return
- *
- * @see f_file_link()
- */
-#if !defined(_di_f_file_link_) || !defined(_di_f_file_copy_)
-  extern f_return_status private_f_file_link(const f_string target, const f_string point);
-#endif // !defined(_di_f_file_link_) || !defined(_di_f_file_copy_)
-
-/**
  * Private implementation of f_file_close().
  *
  * Intended to be shared to each of the different implementation variations.
@@ -474,6 +517,7 @@ extern "C" {
  *   f_loop (with error bit) if a loop occurred.
  *   f_invalid_parameter (with error bit) if a parameter is invalid.
  *
+ * @see f_file_copy()
  * @see f_file_stat()
  */
 #if !defined(_di_f_file_stat_) || !defined(_di_f_file_copy_)
@@ -506,6 +550,7 @@ extern "C" {
  *   f_loop (with error bit) if a loop occurred.
  *   f_invalid_parameter (with error bit) if a parameter is invalid.
  *
+ * @see f_file_copy_at()
  * @see f_file_stat_at()
  */
 #if !defined(_di_f_file_stat_at_) || !defined(_di_f_file_copy_at_)
index b038b5e4896b4a3962f011a8329f969ea93cb929..27c59fd515c6d93073db5c0b76284005c18dd1ca 100644 (file)
@@ -4,11 +4,11 @@
 extern "C" {
 #endif
 
-#ifndef _di_f_pipe_exists_
-  f_return_status f_pipe_exists() {
+#ifndef _di_f_pipe_input_exists_
+  f_return_status f_pipe_input_exists() {
     struct stat st_info;
 
-    if (fstat(fileno(f_pipe), &st_info) != 0) {
+    if (fstat(f_type_descriptor_input, &st_info) != 0) {
       return f_status_set_error(f_file_error_stat);
     }
 
@@ -18,13 +18,13 @@ extern "C" {
 
     return f_false;
   }
-#endif // _di_f_pipe_exists_
+#endif // _di_f_pipe_input_exists_
 
 #ifndef _di_f_pipe_warning_exists_
   f_return_status f_pipe_warning_exists() {
     struct stat st_info;
 
-    if (fstat(fileno(f_pipe_warning), &st_info) != 0) {
+    if (fstat(f_type_descriptor_warning, &st_info) != 0) {
       return f_status_set_error(f_file_error_stat);
     }
 
@@ -40,7 +40,7 @@ extern "C" {
   f_return_status f_pipe_error_exists() {
     struct stat st_info;
 
-    if (fstat(fileno(f_pipe_error), &st_info) != 0) {
+    if (fstat(f_type_descriptor_error, &st_info) != 0) {
       return f_status_set_error(f_file_error_stat);
     }
 
@@ -56,7 +56,7 @@ extern "C" {
   f_return_status f_pipe_debug_exists() {
     struct stat st_info;
 
-    if (fstat(fileno(f_pipe_debug), &st_info) != 0) {
+    if (fstat(f_type_descriptor_debug, &st_info) != 0) {
       return f_status_set_error(f_file_error_stat);
     }
 
index bc60ee93f4cc9119bcf7f5bccb9651518446017f..66172ac98b55d72dfa24ac91afb7a965c9d2bb66 100644 (file)
@@ -6,6 +6,8 @@
  * Licenses: lgplv2.1
  *
  * Provides pipe functionality.
+ *
+ * @todo implement pipe() functionality.
  */
 #ifndef _F_pipe_h
 #define _F_pipe_h
@@ -23,31 +25,21 @@ extern "C" {
 #endif
 
 /**
- * Default pipe sources.
- */
-#ifndef _di_f_pipe_
-  #define f_pipe         f_standard_input
-  #define f_pipe_warning f_standard_warning
-  #define f_pipe_error   f_standard_error
-  #define f_pipe_debug   f_standard_debug
-#endif // _di_f_pipe_
-
-/**
- * Identify whether or not the default f_pipe source (generally standard input) contains piped data.
+ * Identify whether or not the standard input pipe source contains piped data.
  *
  * @return
  *   f_true if there is piped data.
  *   f_false if there is no piped data.
  *   f_file_error_stat (with error bit) on stat() error.
  *
- * @see stat()
+ * @see fstat()
  */
-#ifndef _di_f_pipe_exists_
-  extern f_return_status f_pipe_exists();
-#endif // _di_f_pipe_exists_
+#ifndef _di_f_pipe_input_exists_
+  extern f_return_status f_pipe_input_exists();
+#endif // _di_f_pipe_input_exists_
 
 /**
- * Identify whether or not the default f_pipe_warning source (generally standard warning) contains piped data.
+ * Identify whether or not the standard warning pipe contains piped data.
  *
  * For most systems, standard warning does not exist and instead maps to standard output.
  *
@@ -56,28 +48,28 @@ extern "C" {
  *   f_false if there is no piped data.
  *   f_file_error_stat (with error bit) on stat() error.
  *
- * @see stat()
+ * @see fstat()
  */
 #ifndef _di_f_pipe_warning_exists_
   extern f_return_status f_pipe_warning_exists();
 #endif // _di_f_pipe_warning_exists_
 
 /**
- * Identify whether or not the default f_pipe_error source (generally standard error) contains piped data.
+ * Identify whether or not the standard error pipe source contains piped data.
  *
  * @return
  *   f_true if there is piped data.
  *   f_false if there is no piped data.
  *   f_file_error_stat (with error bit) on stat() error.
  *
- * @see stat()
+ * @see fstat()
  */
 #ifndef _di_f_pipe_error_exists_
   extern f_return_status f_pipe_error_exists();
 #endif // _di_f_pipe_error_exists_
 
 /**
- * Identify whether or not the default f_pipe_debug source (generally standard warning) contains piped data.
+ * Identify whether or not the standard debug pipe source contains piped data.
  *
  * For most systems, standard debug does not exist and instead maps to standard output.
  *
@@ -86,7 +78,7 @@ extern "C" {
  *   f_false if there is no piped data.
  *   f_file_error_stat (with error bit) on stat() error.
  *
- * @see stat()
+ * @see fstat()
  */
 #ifndef _di_f_pipe_debug_exists_
   extern f_return_status f_pipe_debug_exists();
index 2c2edff57dcd82a7c43d1c6eca39fd40e42402c1..8581e208097167d8b630262dd364ebd9bcf88c8f 100644 (file)
@@ -221,19 +221,23 @@ extern "C" {
     #ifndef _di_f_status_buffers_
       f_buffer_too_small,
       f_buffer_too_large,
+      f_error_on_block,
       f_error_on_eof,
       f_error_on_eol,
       f_error_on_eos,
       f_error_on_stop,
       f_incomplete_utf,
+      f_incomplete_utf_on_block,
       f_incomplete_utf_on_eof,
       f_incomplete_utf_on_eol,
       f_incomplete_utf_on_eos,
       f_incomplete_utf_on_stop,
+      f_none_on_block,
       f_none_on_eof,
       f_none_on_eol,
       f_none_on_eos,
       f_none_on_stop,
+      f_no_data_on_block,
       f_no_data_on_eof,
       f_no_data_on_eol,
       f_no_data_on_eos,
@@ -241,16 +245,19 @@ extern "C" {
       f_string_too_small,
       f_string_too_large,
       f_unterminated,
+      f_unterminated_on_block,
       f_unterminated_on_eof,
       f_unterminated_on_eol,
       f_unterminated_on_eos,
       f_unterminated_on_stop,
       f_unterminated_group,
+      f_unterminated_group_on_block,
       f_unterminated_group_on_eof,
       f_unterminated_group_on_eol,
       f_unterminated_group_on_eos,
       f_unterminated_group_on_stop,
       f_unterminated_nest,
+      f_unterminated_nest_on_block,
       f_unterminated_nest_on_eof,
       f_unterminated_nest_on_eol,
       f_unterminated_nest_on_eos,
index e70e8407d160e12698607629e81ad265dc1ca601..e056c9a4940a3663d7cf719115af77777cae12b9 100644 (file)
@@ -13,6 +13,7 @@
 // libc includes
 #include <stdbool.h>
 #include <stdint.h>
+#include <unistd.h>
 
 #ifdef __cplusplus
 extern "C" {
@@ -175,13 +176,19 @@ extern "C" {
  * For most systems, there is no standard warning nor is there a standard debug.
  * Therefore, these will map to standard output.
  */
-#ifndef _di_f_type_standard_input_output_
-  #define f_standard_debug   stdout
-  #define f_standard_error   stderr
-  #define f_standard_input   stdin
-  #define f_standard_output  stdout
-  #define f_standard_warning stdout
-#endif // _di_f_type_standard_input_output_
+#ifndef _di_f_type_input_output_
+  #define f_type_debug   stdout
+  #define f_type_error   stderr
+  #define f_type_input   stdin
+  #define f_type_output  stdout
+  #define f_type_warning stdout
+
+  #define f_type_descriptor_debug   STDOUT_FILENO
+  #define f_type_descriptor_error   STDERR_FILENO
+  #define f_type_descriptor_input   STDIN_FILENO
+  #define f_type_descriptor_output  STDOUT_FILENO
+  #define f_type_descriptor_warning STDOUT_FILENO
+#endif // _di_f_type_input_output_
 
 /**
  * Defines a variable to be used by arrays.
index 1ffe9190d5d95f7cb8bcc6fdcce688d79f75e309..f24dd037c9ec2ae88dc7f4cd0d3152181a6396f6 100644 (file)
@@ -86,11 +86,11 @@ extern "C" {
  *   f_none on success.
  *   f_invalid_parameter (with error bit) if a parameter is invalid.
  *
- *   Errors from (with error bit): f_file_read_quantity().
+ *   Errors from (with error bit): f_file_read_until().
  *   Errors from (with error bit): fl_fss_identify()
  *   File errors (with error bit): f_file_error_seek, f_file_not_open.
  *
- * @see f_file_read_quantity()
+ * @see f_file_read_until()
  * @see fl_fss_identify()
  */
 #ifndef _di_fl_fss_identify_file_
index 41d71d9f253da9165910966e66f62e6ff170e50a..dba56da7e65565fd45203c63dec1662e9d7ea8e0 100644 (file)
@@ -456,6 +456,9 @@ extern "C" {
         case f_no_data_on_stop:
           *string = fl_status_string_no_data_on_stop;
           break;
+        case f_no_data_on_block:
+          *string = fl_status_string_no_data_on_block;
+          break;
         case f_none_on_eof:
           *string = fl_status_string_none_on_eof;
           break;
@@ -468,6 +471,9 @@ extern "C" {
         case f_none_on_stop:
           *string = fl_status_string_none_on_stop;
           break;
+        case f_none_on_block:
+          *string = fl_status_string_none_on_block;
+          break;
         case f_error_on_eof:
           *string = fl_status_string_error_on_eof;
           break;
@@ -480,6 +486,9 @@ extern "C" {
         case f_error_on_stop:
           *string = fl_status_string_error_on_stop;
           break;
+        case f_error_on_block:
+          *string = fl_status_string_error_on_block;
+          break;
         case f_buffer_too_small:
           *string = fl_status_string_buffer_too_small;
           break;
@@ -507,6 +516,9 @@ extern "C" {
         case f_unterminated_on_stop:
           *string = fl_status_string_unterminated_on_stop;
           break;
+        case f_unterminated_on_block:
+          *string = fl_status_string_unterminated_on_block;
+          break;
         case f_unterminated_group:
           *string = fl_status_string_unterminated_group;
           break;
@@ -522,6 +534,9 @@ extern "C" {
         case f_unterminated_group_on_stop:
           *string = fl_status_string_unterminated_group_on_stop;
           break;
+        case f_unterminated_group_on_block:
+          *string = fl_status_string_unterminated_group_on_block;
+          break;
         case f_unterminated_nest:
           *string = fl_status_string_unterminated_nest;
           break;
@@ -537,6 +552,9 @@ extern "C" {
         case f_unterminated_nest_on_stop:
           *string = fl_status_string_unterminated_nest_on_stop;
           break;
+        case f_unterminated_nest_on_block:
+          *string = fl_status_string_unterminated_nest_on_block;
+          break;
         case f_incomplete_utf:
           *string = fl_status_string_incomplete_utf;
           break;
@@ -552,6 +570,9 @@ extern "C" {
         case f_incomplete_utf_on_stop:
           *string = fl_status_string_incomplete_utf_on_stop;
           break;
+        case f_incomplete_utf_on_block:
+          *string = fl_status_string_incomplete_utf_on_block;
+          break;
       #endif // _di_fl_status_buffers_
 
       #ifndef _di_fl_status_allocation_
index 66a705de64ce0d2f0dd279cb9498c1ea3b6e66b3..9dbbcfe7ddc861c9364d49ea539ae2cf36287ae6 100644 (file)
@@ -462,6 +462,9 @@ extern "C" {
     #define fl_status_string_no_data_on_stop "f_no_data_on_stop"
     #define fl_status_string_no_data_on_stop_length 17
 
+    #define fl_status_string_no_data_on_block "f_no_data_on_block"
+    #define fl_status_string_no_data_on_block_length 18
+
     #define fl_status_string_none_on_eol "f_none_on_eol"
     #define fl_status_string_none_on_eol_length 13
 
@@ -471,6 +474,9 @@ extern "C" {
     #define fl_status_string_none_on_stop "f_none_on_stop"
     #define fl_status_string_none_on_stop_length 14
 
+    #define fl_status_string_none_on_block "f_none_on_block"
+    #define fl_status_string_none_on_block_length 15
+
     #define fl_status_string_error_on_eof "f_error_on_eof"
     #define fl_status_string_error_on_eof_length 14
 
@@ -483,6 +489,9 @@ extern "C" {
     #define fl_status_string_error_on_stop "f_error_on_stop"
     #define fl_status_string_error_on_stop_length 15
 
+    #define fl_status_string_error_on_block "f_error_on_block"
+    #define fl_status_string_error_on_block_length 16
+
     #define fl_status_string_buffer_too_small "f_buffer_too_small"
     #define fl_status_string_buffer_too_small_length 18
 
@@ -510,6 +519,9 @@ extern "C" {
     #define fl_status_string_unterminated_on_stop "f_unterminated_on_stop"
     #define fl_status_string_unterminated_on_stop_length 22
 
+    #define fl_status_string_unterminated_on_block "f_unterminated_on_block"
+    #define fl_status_string_unterminated_on_block_length 23
+
     #define fl_status_string_unterminated_group "f_unterminated_group"
     #define fl_status_string_unterminated_group_length 20
 
@@ -525,6 +537,9 @@ extern "C" {
     #define fl_status_string_unterminated_group_on_stop "f_unterminated_group_on_stop"
     #define fl_status_string_unterminated_group_on_stop_length 28
 
+    #define fl_status_string_unterminated_group_on_block "f_unterminated_group_on_block"
+    #define fl_status_string_unterminated_group_on_block_length 29
+
     #define fl_status_string_unterminated_nest "f_unterminated_nest"
     #define fl_status_string_unterminated_nest_length 19
 
@@ -540,6 +555,9 @@ extern "C" {
     #define fl_status_string_unterminated_nest_on_stop "f_unterminated_nest_on_stop"
     #define fl_status_string_unterminated_nest_on_stop_length 27
 
+    #define fl_status_string_unterminated_nest_on_block "f_unterminated_nest_on_block"
+    #define fl_status_string_unterminated_nest_on_block_length 28
+
     #define fl_status_string_incomplete_utf "f_incomplete_utf"
     #define fl_status_string_incomplete_utf_length 16
 
@@ -554,6 +572,9 @@ extern "C" {
 
     #define fl_status_string_incomplete_utf_on_stop "f_incomplete_utf_on_stop"
     #define fl_status_string_incomplete_utf_on_stop_length 24
+
+    #define fl_status_string_incomplete_utf_on_block "f_incomplete_utf_on_block"
+    #define fl_status_string_incomplete_utf_on_block_length 25
   #endif // _di_fl_status_buffers_
 
   #ifndef _di_fl_status_allocation_
index 22297aa06bfa6856314806182454d5f373b61bb2..f0ef1ba236ada46838233bc78cfbbfc9de9ab22b 100644 (file)
@@ -9,7 +9,7 @@ extern "C" {
   f_return_status fl_utf_file_read(const f_file file, f_utf_string_dynamic *buffer) {
     #ifndef _di_level_1_parameter_checking_
       if (file.size_read == 0) return f_status_set_error(f_invalid_parameter);
-      if (buffer->used >= buffer->size) return f_status_set_error(f_invalid_parameter);
+      if (buffer->used > buffer->size) return f_status_set_error(f_invalid_parameter);
     #endif // _di_level_1_parameter_checking_
 
     if (file.id <= 0) return f_status_set_error(f_file_not_open);
@@ -84,7 +84,7 @@ extern "C" {
   f_return_status fl_utf_file_read_block(const f_file file, f_utf_string_dynamic *buffer) {
     #ifndef _di_level_1_parameter_checking_
       if (file.size_read == 0) return f_status_set_error(f_invalid_parameter);
-      if (buffer->used >= buffer->size) return f_status_set_error(f_invalid_parameter);
+      if (buffer->used > buffer->size) return f_status_set_error(f_invalid_parameter);
     #endif // _di_level_1_parameter_checking_
 
     if (file.id <= 0) return f_status_set_error(f_file_not_open);
@@ -159,7 +159,7 @@ extern "C" {
   f_return_status fl_utf_file_read_until(const f_file file, f_utf_string_dynamic *buffer, const f_utf_string_length total) {
     #ifndef _di_level_1_parameter_checking_
       if (file.size_read == 0) return f_status_set_error(f_invalid_parameter);
-      if (buffer->used >= buffer->size) return f_status_set_error(f_invalid_parameter);
+      if (buffer->used > buffer->size) return f_status_set_error(f_invalid_parameter);
     #endif // _di_level_1_parameter_checking_
 
     if (file.id <= 0) return f_status_set_error(f_file_not_open);
index 8eb5a240fe5bfbeb8bb61bad367ebebc4fb2f5f9..e27dc4c138a3e16c47c350a9d6a71e54b29f4de7 100644 (file)
@@ -388,7 +388,7 @@ extern "C" {
       clearenv();
 
       for (f_array_length i = 0; i < names.used; i++) {
-        f_environment_set_dynamic(names.array[i], values.array[i], true);
+        f_environment_set_dynamic(names.array[i], values.array[i], f_true);
       } // for
 
       execv(program_path, fixed_arguments);
@@ -614,7 +614,7 @@ extern "C" {
       clearenv();
 
       for (f_array_length i = 0; i < names.used; i++) {
-        f_environment_set_dynamic(names.array[i], values.array[i], true);
+        f_environment_set_dynamic(names.array[i], values.array[i], f_true);
       }
 
       execvp(program_path, fixed_arguments);
index 7a1b76ff4f494a77bfad4cb0c509f0052f33d2dc..2e926ae00ada6bc460b42eb1cb061b30a2488c7c 100644 (file)
@@ -31,7 +31,7 @@ extern "C" {
  * Print file error messages.
  *
  * @param file
- *   The file to write to, such as f_standard_output or f_standard_error.
+ *   The file to write to, such as f_type_output or f_type_error.
  * @param context
  *   The color context information to use when printing.
  * @param function_name
index 3baaea36c254375682b96c14885575d0990e742e..39ce242ae219324b9e7b46bd66690100d736a230 100644 (file)
@@ -7,13 +7,13 @@ extern "C" {
 #ifndef _di_fll_program_print_help_header_
   f_return_status fll_program_print_help_header(const fl_color_context context, const f_string name, const f_string version) {
     printf("%c", f_string_eol);
-    fl_color_print(f_standard_output, context.title, context.reset, " %s", name);
+    fl_color_print(f_type_output, context.title, context.reset, " %s", name);
 
     printf("%c", f_string_eol);
-    fl_color_print(f_standard_output, context.notable, context.reset, "  Version %s", version);
+    fl_color_print(f_type_output, context.notable, context.reset, "  Version %s", version);
 
     printf("%c%c", f_string_eol, f_string_eol);
-    fl_color_print(f_standard_output, context.important, context.reset, " Available Options: ");
+    fl_color_print(f_type_output, context.important, context.reset, " Available Options: ");
 
     return f_none;
   }
@@ -23,10 +23,10 @@ extern "C" {
   f_return_status fll_program_print_help_option(const fl_color_context context, const f_string option_short, const f_string option_long, const f_string symbol_short, const f_string symbol_long, const f_string description) {
     printf("%c", f_string_eol);
     printf("  %s", symbol_short);
-    fl_color_print(f_standard_output, context.standout, context.reset, option_short);
+    fl_color_print(f_type_output, context.standout, context.reset, option_short);
 
     printf(", %s", symbol_long);
-    fl_color_print(f_standard_output, context.standout, context.reset, option_long);
+    fl_color_print(f_type_output, context.standout, context.reset, option_long);
     printf("  %s", description);
 
     return f_none;
@@ -37,7 +37,7 @@ extern "C" {
   f_return_status fll_program_print_help_option_long(const fl_color_context context, const f_string option_long, const f_string symbol_long, const f_string description) {
     printf("%c", f_string_eol);
     printf("      %s", symbol_long);
-    fl_color_print(f_standard_output, context.standout, context.reset, option_long);
+    fl_color_print(f_type_output, context.standout, context.reset, option_long);
     printf("  %s", description);
 
     return f_none;
@@ -47,7 +47,7 @@ extern "C" {
 #ifndef _di_fll_program_print_help_option_other_
   f_return_status fll_program_print_help_option_other(const fl_color_context context, const f_string option_other, const f_string description) {
     printf("%c  ", f_string_eol);
-    fl_color_print(f_standard_output, context.standout, context.reset, option_other);
+    fl_color_print(f_type_output, context.standout, context.reset, option_other);
 
     printf("  %s", description);
 
@@ -58,23 +58,23 @@ extern "C" {
 #ifndef _di_fll_program_print_help_usage_
   f_return_status fll_program_print_help_usage(const fl_color_context context, const f_string name, const f_string parameters) {
     printf("%c%c", f_string_eol, f_string_eol);
-    fl_color_print(f_standard_output, context.important, context.reset, " Usage:");
+    fl_color_print(f_type_output, context.important, context.reset, " Usage:");
 
     printf("%c  ", f_string_eol);
-    fl_color_print(f_standard_output, context.standout, context.reset, name);
+    fl_color_print(f_type_output, context.standout, context.reset, name);
 
     printf(" ");
-    fl_color_print(f_standard_output, context.notable, context.reset, "[");
+    fl_color_print(f_type_output, context.notable, context.reset, "[");
 
     printf(" options ");
-    fl_color_print(f_standard_output, context.notable, context.reset, "]");
+    fl_color_print(f_type_output, context.notable, context.reset, "]");
 
     if (parameters[0] != '\0') {
       printf(" ");
-      fl_color_print(f_standard_output, context.notable, context.reset, "[");
+      fl_color_print(f_type_output, context.notable, context.reset, "[");
 
       printf(" %s ", parameters);
-      fl_color_print(f_standard_output, context.notable, context.reset, "]");
+      fl_color_print(f_type_output, context.notable, context.reset, "]");
     }
 
     printf("%c%c", f_string_eol, f_string_eol);
@@ -99,32 +99,32 @@ extern "C" {
       status = f_status_set_fine(status);
 
       if (status == f_no_data) {
-        fl_color_print_line(f_standard_error, context->error, context->reset, "ERROR: One of the parameters you passed requires an additional parameter that you did not pass.");
+        fl_color_print_line(f_type_error, context->error, context->reset, "ERROR: One of the parameters you passed requires an additional parameter that you did not pass.");
         // @todo there is a way to identify which parameter is incorrect
         //       to do this, one must look for any "has_additional" and then see if the "additional" location is set to 0
         //       nothing can be 0 as that represents the program name, unless argv[] is improperly created
       }
       else if (status == f_error_allocation || status == f_error_reallocation) {
-        fl_color_print(f_standard_error, context->error, context->reset, "CRITICAL ERROR: Unable to allocate memory while calling ");
-        fl_color_print(f_standard_error, context->notable, context->reset, "f_console_parameter_process");
-        fl_color_print_line(f_standard_error, context->error, context->reset, ").");
+        fl_color_print(f_type_error, context->error, context->reset, "CRITICAL ERROR: Unable to allocate memory while calling ");
+        fl_color_print(f_type_error, context->notable, context->reset, "f_console_parameter_process");
+        fl_color_print_line(f_type_error, context->error, context->reset, ").");
       }
       else if (status == f_invalid_utf) {
-        fl_color_print(f_standard_error, context->error, context->reset, "ENCODING ERROR: Invalid UTF-8 character in parameter when calling ");
-        fl_color_print(f_standard_error, context->notable, context->reset, "f_console_parameter_process()");
-        fl_color_print_line(f_standard_error, context->error, context->reset, ".");
+        fl_color_print(f_type_error, context->error, context->reset, "ENCODING ERROR: Invalid UTF-8 character in parameter when calling ");
+        fl_color_print(f_type_error, context->notable, context->reset, "f_console_parameter_process()");
+        fl_color_print_line(f_type_error, context->error, context->reset, ".");
       }
       else if (status == f_invalid_parameter) {
-        fl_color_print(f_standard_error, context->error, context->reset, "INTERNAL ERROR: Invalid parameter when calling ");
-        fl_color_print(f_standard_error, context->notable, context->reset, "f_console_parameter_process()");
-        fl_color_print_line(f_standard_error, context->error, context->reset, ".");
+        fl_color_print(f_type_error, context->error, context->reset, "INTERNAL ERROR: Invalid parameter when calling ");
+        fl_color_print(f_type_error, context->notable, context->reset, "f_console_parameter_process()");
+        fl_color_print_line(f_type_error, context->error, context->reset, ".");
       }
       else {
-        fl_color_print(f_standard_error, context->error, context->reset, "INTERNAL ERROR: An unhandled error (");
-        fl_color_print(f_standard_error, context->notable, context->reset, "%u", status);
-        fl_color_print(f_standard_error, context->error, context->reset, ") has occurred while calling ");
-        fl_color_print(f_standard_error, context->notable, context->reset, "f_console_parameter_process()");
-        fl_color_print_line(f_standard_error, context->error, context->reset, ".");
+        fl_color_print(f_type_error, context->error, context->reset, "INTERNAL ERROR: An unhandled error (");
+        fl_color_print(f_type_error, context->notable, context->reset, "%u", status);
+        fl_color_print(f_type_error, context->error, context->reset, ") has occurred while calling ");
+        fl_color_print(f_type_error, context->notable, context->reset, "f_console_parameter_process()");
+        fl_color_print_line(f_type_error, context->error, context->reset, ".");
       }
 
       return f_status_set_error(status);
@@ -147,21 +147,21 @@ extern "C" {
       status = f_status_set_fine(status);
 
       if (status == f_error_allocation || status == f_error_reallocation) {
-        fl_color_print(f_standard_error, context->error, context->reset, "CRITICAL ERROR: Unable to allocate memory while calling ");
-        fl_color_print(f_standard_error, context->notable, context->reset, "%s", function);
-        fl_color_print_line(f_standard_error, context->error, context->reset, ").");
+        fl_color_print(f_type_error, context->error, context->reset, "CRITICAL ERROR: Unable to allocate memory while calling ");
+        fl_color_print(f_type_error, context->notable, context->reset, "%s", function);
+        fl_color_print_line(f_type_error, context->error, context->reset, ").");
       }
       else if (status == f_invalid_parameter) {
-        fl_color_print(f_standard_error, context->error, context->reset, "INTERNAL ERROR: Invalid parameter when calling ");
-        fl_color_print(f_standard_error, context->notable, context->reset, "%s", function);
-        fl_color_print_line(f_standard_error, context->error, context->reset, "().");
+        fl_color_print(f_type_error, context->error, context->reset, "INTERNAL ERROR: Invalid parameter when calling ");
+        fl_color_print(f_type_error, context->notable, context->reset, "%s", function);
+        fl_color_print_line(f_type_error, context->error, context->reset, "().");
       }
       else {
-        fl_color_print(f_standard_error, context->error, context->reset, "INTERNAL ERROR: An unhandled error (");
-        fl_color_print(f_standard_error, context->notable, context->reset, "%u", status);
-        fl_color_print(f_standard_error, context->error, context->reset, ") has occurred while calling ");
-        fl_color_print(f_standard_error, context->notable, context->reset, "%s", function);
-        fl_color_print_line(f_standard_error, context->error, context->reset, "().");
+        fl_color_print(f_type_error, context->error, context->reset, "INTERNAL ERROR: An unhandled error (");
+        fl_color_print(f_type_error, context->notable, context->reset, "%u", status);
+        fl_color_print(f_type_error, context->error, context->reset, ") has occurred while calling ");
+        fl_color_print(f_type_error, context->notable, context->reset, "%s", function);
+        fl_color_print_line(f_type_error, context->error, context->reset, "().");
       }
 
       return f_status_set_error(status);
@@ -174,9 +174,9 @@ extern "C" {
       fl_macro_color_context_new(allocation_status, (*context));
 
       if (f_status_is_error(allocation_status)) {
-        fl_color_print(f_standard_error, context->error, context->reset, "CRITICAL ERROR: Unable to allocate memory while calling ");
-        fl_color_print(f_standard_error, context->notable, context->reset, "fl_macro_color_context_new");
-        fl_color_print_line(f_standard_error, context->error, context->reset, "().");
+        fl_color_print(f_type_error, context->error, context->reset, "CRITICAL ERROR: Unable to allocate memory while calling ");
+        fl_color_print(f_type_error, context->notable, context->reset, "fl_macro_color_context_new");
+        fl_color_print_line(f_type_error, context->error, context->reset, "().");
 
         return allocation_status;
       }
index e75176bbbff9432da50c0257f9d44a0e13111936..22c9dd90b2d96d10e9230d7fe01eac786ba9da3c 100644 (file)
@@ -746,6 +746,11 @@ extern "C" {
         return f_none;
       }
 
+      if (fl_string_compare(string, fl_status_string_no_data_on_block, length, fl_status_string_no_data_on_block_length) == f_equal_to) {
+        *code = f_no_data_on_block;
+        return f_none;
+      }
+
       if (fl_string_compare(string, fl_status_string_none_on_eof, length, fl_status_string_none_on_eof_length) == f_equal_to) {
         *code = f_none_on_eof;
         return f_none;
@@ -766,6 +771,11 @@ extern "C" {
         return f_none;
       }
 
+      if (fl_string_compare(string, fl_status_string_none_on_block, length, fl_status_string_none_on_block_length) == f_equal_to) {
+        *code = f_none_on_block;
+        return f_none;
+      }
+
       if (fl_string_compare(string, fl_status_string_error_on_eof, length, fl_status_string_error_on_eof_length) == f_equal_to) {
         *code = f_error_on_eof;
         return f_none;
@@ -786,6 +796,11 @@ extern "C" {
         return f_none;
       }
 
+      if (fl_string_compare(string, fl_status_string_error_on_block, length, fl_status_string_error_on_block_length) == f_equal_to) {
+        *code = f_error_on_block;
+        return f_none;
+      }
+
       if (fl_string_compare(string, fl_status_string_buffer_too_small, length, fl_status_string_buffer_too_small_length) == f_equal_to) {
         *code = f_buffer_too_small;
         return f_none;
@@ -831,6 +846,11 @@ extern "C" {
         return f_none;
       }
 
+      if (fl_string_compare(string, fl_status_string_unterminated_on_block, length, fl_status_string_unterminated_on_block_length) == f_equal_to) {
+        *code = f_unterminated_on_block;
+        return f_none;
+      }
+
       if (fl_string_compare(string, fl_status_string_unterminated_group, length, fl_status_string_unterminated_group_length) == f_equal_to) {
         *code = f_unterminated_group;
         return f_none;
@@ -856,6 +876,11 @@ extern "C" {
         return f_none;
       }
 
+      if (fl_string_compare(string, fl_status_string_unterminated_group_on_block, length, fl_status_string_unterminated_group_on_block_length) == f_equal_to) {
+        *code = f_unterminated_group_on_block;
+        return f_none;
+      }
+
       if (fl_string_compare(string, fl_status_string_unterminated_nest, length, fl_status_string_unterminated_nest_length) == f_equal_to) {
         *code = f_unterminated_nest;
         return f_none;
@@ -881,6 +906,11 @@ extern "C" {
         return f_none;
       }
 
+      if (fl_string_compare(string, fl_status_string_unterminated_nest_on_block, length, fl_status_string_unterminated_nest_on_block_length) == f_equal_to) {
+        *code = f_unterminated_nest_on_block;
+        return f_none;
+      }
+
       if (fl_string_compare(string, fl_status_string_incomplete_utf, length, fl_status_string_incomplete_utf_length) == f_equal_to) {
         *code = f_incomplete_utf;
         return f_none;
@@ -905,6 +935,11 @@ extern "C" {
         *code = f_incomplete_utf_on_stop;
         return f_none;
       }
+
+      if (fl_string_compare(string, fl_status_string_incomplete_utf_on_block, length, fl_status_string_incomplete_utf_on_block_length) == f_equal_to) {
+        *code = f_incomplete_utf_on_block;
+        return f_none;
+      }
     #endif // _di_fll_status_buffers_
 
     #ifndef _di_fll_status_allocation_
index 7baeb03306fa9262f193a1934db5d18bb6ccbffb..fd85a281169b58108028b256f7aa2564dd424201 100644 (file)
@@ -43,13 +43,13 @@ extern "C" {
     fll_program_print_help_usage(context, byte_dump_name, "filename(s)");
 
     printf("  When using the ");
-    fl_color_print(f_standard_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, byte_dump_long_text);
+    fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, byte_dump_long_text);
     printf(" option, some UTF-8 characters may be replaced by your instance and cause display alignment issues.");
 
     printf("%c%c", f_string_eol, f_string_eol);
 
     printf("  Special UTF-8 characters and non-spacing UTF-8 characters may be replaced with a space (or a placeholder when the ");
-    fl_color_print(f_standard_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, byte_dump_long_placeholder);
+    fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, byte_dump_long_placeholder);
     printf(" option is used).");
 
     printf("%c%c", f_string_eol, f_string_eol);
@@ -59,7 +59,7 @@ extern "C" {
     printf("%c%c", f_string_eol, f_string_eol);
 
     printf("  When ");
-    fl_color_print(f_standard_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, byte_dump_long_last);
+    fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, byte_dump_long_last);
     printf(" is used, any UTF-8 sequences will still be printed in full should any part is found within the requested range.");
 
     printf("%c%c", f_string_eol, f_string_eol);
@@ -162,9 +162,9 @@ extern "C" {
     }
     else if (data->remaining.used > 0 || data->process_pipe) {
       if (data->parameters[byte_dump_parameter_width].result == f_console_result_found) {
-        fl_color_print(f_standard_error, data->context.error, data->context.reset, "ERROR: The parameter '");
-        fl_color_print(f_standard_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, byte_dump_long_width);
-        fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "' was specified, but no value was given.");
+        fl_color_print(f_type_error, data->context.error, data->context.reset, "ERROR: The parameter '");
+        fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, byte_dump_long_width);
+        fl_color_print_line(f_type_error, data->context.error, data->context.reset, "' was specified, but no value was given.");
 
         byte_dump_delete_data(data);
         return f_status_set_error(status);
@@ -174,13 +174,13 @@ extern "C" {
         status = fl_console_parameter_to_number_unsigned(arguments.argv[data->parameters[byte_dump_parameter_width].additional.array[data->parameters[byte_dump_parameter_width].additional.used - 1]], &number);
 
         if (f_status_is_error(status) || number < 1 || number >= 0xfb) {
-          fl_color_print(f_standard_error, data->context.error, data->context.reset, "ERROR: The parameter '");
-          fl_color_print(f_standard_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, byte_dump_long_width);
-          fl_color_print(f_standard_error, data->context.error, data->context.reset, "' value can only be a number between ");
-          fl_color_print(f_standard_error, data->context.notable, data->context.reset, "0");
-          fl_color_print(f_standard_error, data->context.error, data->context.reset, " and ");
-          fl_color_print(f_standard_error, data->context.notable, data->context.reset, "251");
-          fl_color_print_line(f_standard_error, data->context.error, data->context.reset, ".");
+          fl_color_print(f_type_error, data->context.error, data->context.reset, "ERROR: The parameter '");
+          fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, byte_dump_long_width);
+          fl_color_print(f_type_error, data->context.error, data->context.reset, "' value can only be a number between ");
+          fl_color_print(f_type_error, data->context.notable, data->context.reset, "0");
+          fl_color_print(f_type_error, data->context.error, data->context.reset, " and ");
+          fl_color_print(f_type_error, data->context.notable, data->context.reset, "251");
+          fl_color_print_line(f_type_error, data->context.error, data->context.reset, ".");
 
           byte_dump_delete_data(data);
           return f_status_set_error(status);
@@ -190,9 +190,9 @@ extern "C" {
       }
 
       if (data->parameters[byte_dump_parameter_first].result == f_console_result_found) {
-        fl_color_print(f_standard_error, data->context.error, data->context.reset, "ERROR: The parameter '");
-        fl_color_print(f_standard_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, byte_dump_long_first);
-        fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "' was specified, but no value was given.");
+        fl_color_print(f_type_error, data->context.error, data->context.reset, "ERROR: The parameter '");
+        fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, byte_dump_long_first);
+        fl_color_print_line(f_type_error, data->context.error, data->context.reset, "' was specified, but no value was given.");
 
         byte_dump_delete_data(data);
         return f_status_set_error(status);
@@ -202,13 +202,13 @@ extern "C" {
         status = fl_console_parameter_to_number_unsigned(arguments.argv[data->parameters[byte_dump_parameter_first].additional.array[data->parameters[byte_dump_parameter_first].additional.used - 1]], &number);
 
         if (f_status_is_error(status) || number > f_type_number_size_unsigned) {
-          fl_color_print(f_standard_error, data->context.error, data->context.reset, "ERROR: The parameter '");
-          fl_color_print(f_standard_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, byte_dump_long_first);
-          fl_color_print(f_standard_error, data->context.error, data->context.reset, "' value can only be a number (inclusively) between ");
-          fl_color_print(f_standard_error, data->context.notable, data->context.reset, "0");
-          fl_color_print(f_standard_error, data->context.error, data->context.reset, " and ");
-          fl_color_print(f_standard_error, data->context.notable, data->context.reset, "%llu", f_type_number_size_unsigned);
-          fl_color_print_line(f_standard_error, data->context.error, data->context.reset, ".");
+          fl_color_print(f_type_error, data->context.error, data->context.reset, "ERROR: The parameter '");
+          fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, byte_dump_long_first);
+          fl_color_print(f_type_error, data->context.error, data->context.reset, "' value can only be a number (inclusively) between ");
+          fl_color_print(f_type_error, data->context.notable, data->context.reset, "0");
+          fl_color_print(f_type_error, data->context.error, data->context.reset, " and ");
+          fl_color_print(f_type_error, data->context.notable, data->context.reset, "%llu", f_type_number_size_unsigned);
+          fl_color_print_line(f_type_error, data->context.error, data->context.reset, ".");
 
           byte_dump_delete_data(data);
           return f_status_set_error(status);
@@ -218,9 +218,9 @@ extern "C" {
       }
 
       if (data->parameters[byte_dump_parameter_last].result == f_console_result_found) {
-        fl_color_print(f_standard_error, data->context.error, data->context.reset, "ERROR: The parameter '");
-        fl_color_print(f_standard_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, byte_dump_long_last);
-        fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "' was specified, but no value was given.");
+        fl_color_print(f_type_error, data->context.error, data->context.reset, "ERROR: The parameter '");
+        fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, byte_dump_long_last);
+        fl_color_print_line(f_type_error, data->context.error, data->context.reset, "' was specified, but no value was given.");
 
         byte_dump_delete_data(data);
         return f_status_set_error(status);
@@ -230,13 +230,13 @@ extern "C" {
         status = fl_console_parameter_to_number_unsigned(arguments.argv[data->parameters[byte_dump_parameter_last].additional.array[data->parameters[byte_dump_parameter_last].additional.used - 1]], &number);
 
         if (f_status_is_error(status) || number < 0 || number > f_type_number_size_unsigned) {
-          fl_color_print(f_standard_error, data->context.error, data->context.reset, "ERROR: The parameter '");
-          fl_color_print(f_standard_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, byte_dump_long_last);
-          fl_color_print(f_standard_error, data->context.error, data->context.reset, "' value can only be a number (inclusively) between ");
-          fl_color_print(f_standard_error, data->context.notable, data->context.reset, "0");
-          fl_color_print(f_standard_error, data->context.error, data->context.reset, " and ");
-          fl_color_print(f_standard_error, data->context.notable, data->context.reset, "%llu", f_type_number_size_unsigned);
-          fl_color_print_line(f_standard_error, data->context.error, data->context.reset, ".");
+          fl_color_print(f_type_error, data->context.error, data->context.reset, "ERROR: The parameter '");
+          fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, byte_dump_long_last);
+          fl_color_print(f_type_error, data->context.error, data->context.reset, "' value can only be a number (inclusively) between ");
+          fl_color_print(f_type_error, data->context.notable, data->context.reset, "0");
+          fl_color_print(f_type_error, data->context.error, data->context.reset, " and ");
+          fl_color_print(f_type_error, data->context.notable, data->context.reset, "%llu", f_type_number_size_unsigned);
+          fl_color_print_line(f_type_error, data->context.error, data->context.reset, ".");
 
           byte_dump_delete_data(data);
           return f_status_set_error(status);
@@ -247,11 +247,11 @@ extern "C" {
 
       if (data->parameters[byte_dump_parameter_first].result == f_console_result_additional && data->parameters[byte_dump_parameter_last].result == f_console_result_additional) {
         if (data->first > data->last) {
-            fl_color_print(f_standard_error, data->context.error, data->context.reset, "ERROR: The parameter '");
-            fl_color_print(f_standard_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, byte_dump_long_first);
-            fl_color_print(f_standard_error, data->context.error, data->context.reset, "' value cannot be greater than the parameter '");
-            fl_color_print(f_standard_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, byte_dump_long_last);
-            fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "' value.");
+            fl_color_print(f_type_error, data->context.error, data->context.reset, "ERROR: The parameter '");
+            fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, byte_dump_long_first);
+            fl_color_print(f_type_error, data->context.error, data->context.reset, "' value cannot be greater than the parameter '");
+            fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, byte_dump_long_last);
+            fl_color_print_line(f_type_error, data->context.error, data->context.reset, "' value.");
 
             byte_dump_delete_data(data);
             return f_status_set_error(status);
@@ -264,28 +264,28 @@ extern "C" {
       if (data->process_pipe) {
         f_file file = f_file_initialize;
 
-        file.address = f_pipe;
+        file.id = f_type_descriptor_input;
 
         printf("%c", f_string_eol);
-        fl_color_print(f_standard_output, data->context.title, data->context.reset, "Piped Byte Dump: (in ");
+        fl_color_print(f_type_output, data->context.title, data->context.reset, "Piped Byte Dump: (in ");
 
         if (data->mode == byte_dump_mode_hexidecimal) {
-          fl_color_print(f_standard_output, data->context.title, data->context.reset, "Hexidecimal");
+          fl_color_print(f_type_output, data->context.title, data->context.reset, "Hexidecimal");
         }
         else if (data->mode == byte_dump_mode_duodecimal) {
-          fl_color_print(f_standard_output, data->context.title, data->context.reset, "Duodecimal");
+          fl_color_print(f_type_output, data->context.title, data->context.reset, "Duodecimal");
         }
         else if (data->mode == byte_dump_mode_octal) {
-          fl_color_print(f_standard_output, data->context.title, data->context.reset, "Octal");
+          fl_color_print(f_type_output, data->context.title, data->context.reset, "Octal");
         }
         else if (data->mode == byte_dump_mode_binary) {
-          fl_color_print(f_standard_output, data->context.title, data->context.reset, "Binary");
+          fl_color_print(f_type_output, data->context.title, data->context.reset, "Binary");
         }
         else if (data->mode == byte_dump_mode_decimal) {
-          fl_color_print(f_standard_output, data->context.title, data->context.reset, "Decimal");
+          fl_color_print(f_type_output, data->context.title, data->context.reset, "Decimal");
         }
 
-        fl_color_print_line(f_standard_output, data->context.title, data->context.reset, ")");
+        fl_color_print_line(f_type_output, data->context.title, data->context.reset, ")");
 
         status = byte_dump_file(*data, "-", file);
 
@@ -322,7 +322,7 @@ extern "C" {
         for (f_array_length counter = 0; counter < data->remaining.used; counter++) {
           f_file file = f_file_initialize;
 
-          status = f_file_open(&file, arguments.argv[data->remaining.array[counter]]);
+          status = f_file_open(arguments.argv[data->remaining.array[counter]], 0, &file);
           if (f_status_is_error(status)) {
             byte_dump_print_file_error(data->context, "f_file_open", arguments.argv[data->remaining.array[counter]], f_status_set_fine(status));
             byte_dump_delete_data(data);
@@ -330,31 +330,31 @@ extern "C" {
           }
 
           printf("%c", f_string_eol);
-          fl_color_print(f_standard_output, data->context.title, data->context.reset, "Byte Dump of: ");
-          fl_color_print(f_standard_output, data->context.notable, data->context.reset, "%s", arguments.argv[data->remaining.array[counter]]);
-          fl_color_print(f_standard_output, data->context.title, data->context.reset, " (in ");
+          fl_color_print(f_type_output, data->context.title, data->context.reset, "Byte Dump of: ");
+          fl_color_print(f_type_output, data->context.notable, data->context.reset, "%s", arguments.argv[data->remaining.array[counter]]);
+          fl_color_print(f_type_output, data->context.title, data->context.reset, " (in ");
 
           if (data->mode == byte_dump_mode_hexidecimal) {
-            fl_color_print(f_standard_output, data->context.title, data->context.reset, "Hexidecimal");
+            fl_color_print(f_type_output, data->context.title, data->context.reset, "Hexidecimal");
           }
           else if (data->mode == byte_dump_mode_duodecimal) {
-            fl_color_print(f_standard_output, data->context.title, data->context.reset, "Duodecimal");
+            fl_color_print(f_type_output, data->context.title, data->context.reset, "Duodecimal");
           }
           else if (data->mode == byte_dump_mode_octal) {
-            fl_color_print(f_standard_output, data->context.title, data->context.reset, "Octal");
+            fl_color_print(f_type_output, data->context.title, data->context.reset, "Octal");
           }
           else if (data->mode == byte_dump_mode_binary) {
-            fl_color_print(f_standard_output, data->context.title, data->context.reset, "Binary");
+            fl_color_print(f_type_output, data->context.title, data->context.reset, "Binary");
           }
           else if (data->mode == byte_dump_mode_decimal) {
-            fl_color_print(f_standard_output, data->context.title, data->context.reset, "Decimal");
+            fl_color_print(f_type_output, data->context.title, data->context.reset, "Decimal");
           }
 
-          fl_color_print_line(f_standard_output, data->context.title, data->context.reset, ")");
+          fl_color_print_line(f_type_output, data->context.title, data->context.reset, ")");
 
           status = byte_dump_file(*data, arguments.argv[data->remaining.array[counter]], file);
 
-          f_file_close(&file);
+          f_file_close(&file.id);
 
           if (f_status_is_error(status)) {
             byte_dump_delete_data(data);
@@ -367,7 +367,7 @@ extern "C" {
       }
     }
     else {
-      fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "ERROR: you failed to specify one or more filenames.");
+      fl_color_print_line(f_type_error, data->context.error, data->context.reset, "ERROR: you failed to specify one or more filenames.");
       status = f_status_set_error(f_invalid_parameter);
     }
 
index 9fc3443dce063e680001b77fca82d01ba4dfcd46..027dacb2b9fbe891ab066b79db676f2e89bc9dcb 100644 (file)
@@ -4,7 +4,7 @@ int main(const unsigned long argc, const f_string *argv) {
   const f_console_arguments arguments = { argc, argv };
   byte_dump_data data = byte_dump_data_initialize;
 
-  if (f_pipe_exists()) {
+  if (f_pipe_input_exists()) {
     data.process_pipe = f_true;
   }
 
index d706de8f084ce976160adc5c1f98a8c740805661..9937147bcbc1bd93218b5a375c5d9698a559b2d7 100644 (file)
@@ -44,8 +44,6 @@ extern "C" {
     uint8_t invalid[data.width];
     memset(&invalid, 0, sizeof(uint8_t) * data.width);
 
-    fseek(file.address, data.first, SEEK_SET);
-
     while ((size = read(file.id, &byte, 1)) > 0) {
       // Storing the next character is designated by width_utf == -1.
       if (width_utf == -1) {
@@ -205,25 +203,25 @@ extern "C" {
     printf("%c", f_string_eol);
 
     // make sure to flush standard out to help prevent standard error from causing poblems.
-    fflush(f_standard_output);
+    fflush(f_type_output);
 
     if (found_invalid_utf) {
-      fl_color_print(f_standard_error, data.context.error, data.context.reset, "Invalid UTF-8 codes were detected for file '");
-      fl_color_print(f_standard_error, data.context.notable, data.context.reset, "%s", file_name);
-      fl_color_print_line(f_standard_error, data.context.error, data.context.reset, "'.");
+      fl_color_print(f_type_error, data.context.error, data.context.reset, "Invalid UTF-8 codes were detected for file '");
+      fl_color_print(f_type_error, data.context.notable, data.context.reset, "%s", file_name);
+      fl_color_print_line(f_type_error, data.context.error, data.context.reset, "'.");
       printf("%c", f_string_eol);
     }
 
     if (size < 0) {
       // @todo: determine what the error from read() is and display it.
-      fl_color_print(f_standard_error, data.context.error, data.context.reset, "ERROR: read() failed for '");
-      fl_color_print(f_standard_error, data.context.notable, data.context.reset, "%s", file_name);
-      fl_color_print_line(f_standard_error, data.context.error, data.context.reset, "'.");
+      fl_color_print(f_type_error, data.context.error, data.context.reset, "ERROR: read() failed for '");
+      fl_color_print(f_type_error, data.context.notable, data.context.reset, "%s", file_name);
+      fl_color_print_line(f_type_error, data.context.error, data.context.reset, "'.");
       printf("%c", f_string_eol);
       status = f_status_set_error(f_failure);
     }
 
-    fflush(f_standard_error);
+    fflush(f_type_error);
 
     return status;
   }
@@ -251,7 +249,7 @@ extern "C" {
     }
 
     if (cell->column == 0) {
-      fl_color_print(f_standard_output, data.context.notable, data.context.reset, "%016X ", (uint64_t) cell->row);
+      fl_color_print(f_type_output, data.context.notable, data.context.reset, "%016X ", (uint64_t) cell->row);
 
       if (*offset > 0) {
         uint8_t offset_to_print = *offset;
@@ -301,7 +299,7 @@ extern "C" {
     if (cell->column < data.width) {
       if (data.mode == byte_dump_mode_hexidecimal) {
         if (invalid[character_current]) {
-          fl_color_print(f_standard_output, data.context.error, data.context.reset, " %02x", (uint8_t) byte);
+          fl_color_print(f_type_output, data.context.error, data.context.reset, " %02x", (uint8_t) byte);
         }
         else {
           printf(" %02x", (uint8_t) byte);
@@ -309,7 +307,7 @@ extern "C" {
       }
       else if (data.mode == byte_dump_mode_duodecimal) {
         if (invalid[character_current]) {
-          f_print_string_dynamic(f_standard_output, data.context.error);
+          f_print_string_dynamic(f_type_output, data.context.error);
         }
 
         printf(" %01d", byte / 144);
@@ -339,12 +337,12 @@ extern "C" {
         }
 
         if (invalid[character_current]) {
-          f_print_string_dynamic(f_standard_output, data.context.reset);
+          f_print_string_dynamic(f_type_output, data.context.reset);
         }
       }
       else if (data.mode == byte_dump_mode_octal) {
         if (invalid[character_current]) {
-          fl_color_print(f_standard_output, data.context.error, data.context.reset, " %03o", (uint8_t) byte);
+          fl_color_print(f_type_output, data.context.error, data.context.reset, " %03o", (uint8_t) byte);
         }
         else {
           printf(" %03o", (uint8_t) byte);
@@ -363,7 +361,7 @@ extern "C" {
         binary_string[7] = (byte & 0x01) ? '1' : '0';
 
         if (invalid[character_current]) {
-          fl_color_print(f_standard_output, data.context.error, data.context.reset, " %s", binary_string);
+          fl_color_print(f_type_output, data.context.error, data.context.reset, " %s", binary_string);
         }
         else {
           printf(" %s", binary_string);
@@ -371,7 +369,7 @@ extern "C" {
       }
       else if (data.mode == byte_dump_mode_decimal) {
         if (invalid[character_current]) {
-          fl_color_print(f_standard_output, data.context.error, data.context.reset, " %3d", (uint8_t) byte);
+          fl_color_print(f_type_output, data.context.error, data.context.reset, " %3d", (uint8_t) byte);
         }
         else {
           printf(" %3d", (uint8_t) byte);
@@ -436,7 +434,7 @@ extern "C" {
     uint8_t width_utf = 0;
     bool printed = f_false;
 
-    fl_color_print(f_standard_output, data.context.notable, data.context.reset, "  %s ", byte_dump_character_wall);
+    fl_color_print(f_type_output, data.context.notable, data.context.reset, "  %s ", byte_dump_character_wall);
 
 
     if (*offset > 0) {
@@ -455,7 +453,7 @@ extern "C" {
         }
 
         while (*offset > 0 && j < data.width) {
-          fl_color_print(f_standard_output, data.context.warning, data.context.reset, "%s", placeholder);
+          fl_color_print(f_type_output, data.context.warning, data.context.reset, "%s", placeholder);
           (*offset)--;
           j++;
         } // while
@@ -474,13 +472,13 @@ extern "C" {
         if (data.parameters[byte_dump_parameter_placeholder].result == f_console_result_found) {
           for (; j < previous->bytes && j < data.width; j++) {
             if (previous->invalid) {
-              fl_color_print(f_standard_output, data.context.error, data.context.reset, "%s", byte_dump_character_placeholder);
+              fl_color_print(f_type_output, data.context.error, data.context.reset, "%s", byte_dump_character_placeholder);
             }
             else if (data.parameters[byte_dump_parameter_classic].result == f_console_result_found) {
               printf(".");
             }
             else {
-              fl_color_print(f_standard_output, data.context.warning, data.context.reset, "%s", byte_dump_character_placeholder);
+              fl_color_print(f_type_output, data.context.warning, data.context.reset, "%s", byte_dump_character_placeholder);
             }
           } // for
         }
@@ -505,111 +503,111 @@ extern "C" {
       width_utf = f_macro_utf_byte_width_is(output);
 
       if (invalid[i]) {
-        fl_color_print(f_standard_output, data.context.error, data.context.reset, "%s", byte_dump_character_incomplete);
+        fl_color_print(f_type_output, data.context.error, data.context.reset, "%s", byte_dump_character_incomplete);
       }
       else if (output >= 0 && output <= 32 || output == 127) {
         if (data.presentation == byte_dump_presentation_normal) {
           if (output == 0) {
-            fl_color_print2(f_standard_output, data.context.notable, data.context.warning, data.context.reset, "%s", byte_dump_sequence_null);
+            fl_color_print2(f_type_output, data.context.notable, data.context.warning, data.context.reset, "%s", byte_dump_sequence_null);
           }
           else if (output == 1) {
-            fl_color_print2(f_standard_output, data.context.notable, data.context.warning, data.context.reset, "%s", byte_dump_sequence_start_of_header);
+            fl_color_print2(f_type_output, data.context.notable, data.context.warning, data.context.reset, "%s", byte_dump_sequence_start_of_header);
           }
           else if (output == 2) {
-            fl_color_print2(f_standard_output, data.context.notable, data.context.warning, data.context.reset, "%s", byte_dump_sequence_start_of_text);
+            fl_color_print2(f_type_output, data.context.notable, data.context.warning, data.context.reset, "%s", byte_dump_sequence_start_of_text);
           }
           else if (output == 3) {
-            fl_color_print2(f_standard_output, data.context.notable, data.context.warning, data.context.reset, "%s", byte_dump_sequence_end_of_text);
+            fl_color_print2(f_type_output, data.context.notable, data.context.warning, data.context.reset, "%s", byte_dump_sequence_end_of_text);
           }
           else if (output == 4) {
-            fl_color_print2(f_standard_output, data.context.notable, data.context.warning, data.context.reset, "%s", byte_dump_sequence_end_of_transmission);
+            fl_color_print2(f_type_output, data.context.notable, data.context.warning, data.context.reset, "%s", byte_dump_sequence_end_of_transmission);
           }
           else if (output == 5) {
-            fl_color_print2(f_standard_output, data.context.notable, data.context.warning, data.context.reset, "%s", byte_dump_sequence_end_of_enquiry);
+            fl_color_print2(f_type_output, data.context.notable, data.context.warning, data.context.reset, "%s", byte_dump_sequence_end_of_enquiry);
           }
           else if (output == 6) {
-            fl_color_print2(f_standard_output, data.context.notable, data.context.warning, data.context.reset, "%s", byte_dump_sequence_acknowledge);
+            fl_color_print2(f_type_output, data.context.notable, data.context.warning, data.context.reset, "%s", byte_dump_sequence_acknowledge);
           }
           else if (output == 7) {
-            fl_color_print2(f_standard_output, data.context.notable, data.context.warning, data.context.reset, "%s", byte_dump_sequence_bell);
+            fl_color_print2(f_type_output, data.context.notable, data.context.warning, data.context.reset, "%s", byte_dump_sequence_bell);
           }
           else if (output == 8) {
-            fl_color_print2(f_standard_output, data.context.notable, data.context.warning, data.context.reset, "%s", byte_dump_sequence_backspace);
+            fl_color_print2(f_type_output, data.context.notable, data.context.warning, data.context.reset, "%s", byte_dump_sequence_backspace);
           }
           else if (output == 9) {
-            fl_color_print2(f_standard_output, data.context.notable, data.context.warning, data.context.reset, "%s", byte_dump_sequence_tab);
+            fl_color_print2(f_type_output, data.context.notable, data.context.warning, data.context.reset, "%s", byte_dump_sequence_tab);
           }
           else if (output == 10) {
-            fl_color_print2(f_standard_output, data.context.notable, data.context.warning, data.context.reset, "%s", byte_dump_sequence_new_line);
+            fl_color_print2(f_type_output, data.context.notable, data.context.warning, data.context.reset, "%s", byte_dump_sequence_new_line);
           }
           else if (output == 11) {
-            fl_color_print2(f_standard_output, data.context.notable, data.context.warning, data.context.reset, "%s", byte_dump_sequence_tab_vertical);
+            fl_color_print2(f_type_output, data.context.notable, data.context.warning, data.context.reset, "%s", byte_dump_sequence_tab_vertical);
           }
           else if (output == 12) {
-            fl_color_print2(f_standard_output, data.context.notable, data.context.warning, data.context.reset, "%s", byte_dump_sequence_form_feed);
+            fl_color_print2(f_type_output, data.context.notable, data.context.warning, data.context.reset, "%s", byte_dump_sequence_form_feed);
           }
           else if (output == 13) {
-            fl_color_print2(f_standard_output, data.context.notable, data.context.warning, data.context.reset, "%s", byte_dump_sequence_carriage_return);
+            fl_color_print2(f_type_output, data.context.notable, data.context.warning, data.context.reset, "%s", byte_dump_sequence_carriage_return);
           }
           else if (output == 14) {
-            fl_color_print2(f_standard_output, data.context.notable, data.context.warning, data.context.reset, "%s", byte_dump_sequence_shift_out);
+            fl_color_print2(f_type_output, data.context.notable, data.context.warning, data.context.reset, "%s", byte_dump_sequence_shift_out);
           }
           else if (output == 15) {
-            fl_color_print2(f_standard_output, data.context.notable, data.context.warning, data.context.reset, "%s", byte_dump_sequence_shift_in);
+            fl_color_print2(f_type_output, data.context.notable, data.context.warning, data.context.reset, "%s", byte_dump_sequence_shift_in);
           }
           else if (output == 16) {
-            fl_color_print2(f_standard_output, data.context.notable, data.context.warning, data.context.reset, "%s", byte_dump_sequence_data_link_escape);
+            fl_color_print2(f_type_output, data.context.notable, data.context.warning, data.context.reset, "%s", byte_dump_sequence_data_link_escape);
           }
           else if (output == 17) {
-            fl_color_print2(f_standard_output, data.context.notable, data.context.warning, data.context.reset, "%s", byte_dump_sequence_device_control_1);
+            fl_color_print2(f_type_output, data.context.notable, data.context.warning, data.context.reset, "%s", byte_dump_sequence_device_control_1);
           }
           else if (output == 18) {
-            fl_color_print2(f_standard_output, data.context.notable, data.context.warning, data.context.reset, "%s", byte_dump_sequence_device_control_2);
+            fl_color_print2(f_type_output, data.context.notable, data.context.warning, data.context.reset, "%s", byte_dump_sequence_device_control_2);
           }
           else if (output == 19) {
-            fl_color_print2(f_standard_output, data.context.notable, data.context.warning, data.context.reset, "%s", byte_dump_sequence_device_control_3);
+            fl_color_print2(f_type_output, data.context.notable, data.context.warning, data.context.reset, "%s", byte_dump_sequence_device_control_3);
           }
           else if (output == 20) {
-            fl_color_print2(f_standard_output, data.context.notable, data.context.warning, data.context.reset, "%s", byte_dump_sequence_device_control_4);
+            fl_color_print2(f_type_output, data.context.notable, data.context.warning, data.context.reset, "%s", byte_dump_sequence_device_control_4);
           }
           else if (output == 21) {
-            fl_color_print2(f_standard_output, data.context.notable, data.context.warning, data.context.reset, "%s", byte_dump_sequence_negative_acknowledge);
+            fl_color_print2(f_type_output, data.context.notable, data.context.warning, data.context.reset, "%s", byte_dump_sequence_negative_acknowledge);
           }
           else if (output == 22) {
-            fl_color_print2(f_standard_output, data.context.notable, data.context.warning, data.context.reset, "%s", byte_dump_sequence_synchronous_idle);
+            fl_color_print2(f_type_output, data.context.notable, data.context.warning, data.context.reset, "%s", byte_dump_sequence_synchronous_idle);
           }
           else if (output == 23) {
-            fl_color_print2(f_standard_output, data.context.notable, data.context.warning, data.context.reset, "%s", byte_dump_sequence_end_of_transmission_block);
+            fl_color_print2(f_type_output, data.context.notable, data.context.warning, data.context.reset, "%s", byte_dump_sequence_end_of_transmission_block);
           }
           else if (output == 24) {
-            fl_color_print2(f_standard_output, data.context.notable, data.context.warning, data.context.reset, "%s", byte_dump_sequence_cancel);
+            fl_color_print2(f_type_output, data.context.notable, data.context.warning, data.context.reset, "%s", byte_dump_sequence_cancel);
           }
           else if (output == 25) {
-            fl_color_print2(f_standard_output, data.context.notable, data.context.warning, data.context.reset, "%s", byte_dump_sequence_end_of_medium);
+            fl_color_print2(f_type_output, data.context.notable, data.context.warning, data.context.reset, "%s", byte_dump_sequence_end_of_medium);
           }
           else if (output == 26) {
-            fl_color_print2(f_standard_output, data.context.notable, data.context.warning, data.context.reset, "%s", byte_dump_sequence_substitute);
+            fl_color_print2(f_type_output, data.context.notable, data.context.warning, data.context.reset, "%s", byte_dump_sequence_substitute);
           }
           else if (output == 27) {
-            fl_color_print2(f_standard_output, data.context.notable, data.context.warning, data.context.reset, "%s", byte_dump_sequence_escape);
+            fl_color_print2(f_type_output, data.context.notable, data.context.warning, data.context.reset, "%s", byte_dump_sequence_escape);
           }
           else if (output == 28) {
-            fl_color_print2(f_standard_output, data.context.notable, data.context.warning, data.context.reset, "%s", byte_dump_sequence_file_separator);
+            fl_color_print2(f_type_output, data.context.notable, data.context.warning, data.context.reset, "%s", byte_dump_sequence_file_separator);
           }
           else if (output == 29) {
-            fl_color_print2(f_standard_output, data.context.notable, data.context.warning, data.context.reset, "%s", byte_dump_sequence_group_separator);
+            fl_color_print2(f_type_output, data.context.notable, data.context.warning, data.context.reset, "%s", byte_dump_sequence_group_separator);
           }
           else if (output == 30) {
-            fl_color_print2(f_standard_output, data.context.notable, data.context.warning, data.context.reset, "%s", byte_dump_sequence_record_separator);
+            fl_color_print2(f_type_output, data.context.notable, data.context.warning, data.context.reset, "%s", byte_dump_sequence_record_separator);
           }
           else if (output == 31) {
-            fl_color_print2(f_standard_output, data.context.notable, data.context.warning, data.context.reset, "%s", byte_dump_sequence_unit_separator);
+            fl_color_print2(f_type_output, data.context.notable, data.context.warning, data.context.reset, "%s", byte_dump_sequence_unit_separator);
           }
           else if (output == 32) {
-            fl_color_print2(f_standard_output, data.context.notable, data.context.warning, data.context.reset, "%s", byte_dump_sequence_space);
+            fl_color_print2(f_type_output, data.context.notable, data.context.warning, data.context.reset, "%s", byte_dump_sequence_space);
           }
           else if (output == 127) {
-            fl_color_print2(f_standard_output, data.context.notable, data.context.warning, data.context.reset, "%s", byte_dump_sequence_delete);
+            fl_color_print2(f_type_output, data.context.notable, data.context.warning, data.context.reset, "%s", byte_dump_sequence_delete);
           }
         }
         else if (data.presentation == byte_dump_presentation_simple) {
@@ -624,7 +622,7 @@ extern "C" {
           printf(".");
         }
         else {
-          fl_color_print2(f_standard_output, data.context.notable, data.context.warning, data.context.reset, "%s", byte_dump_sequence_space);
+          fl_color_print2(f_type_output, data.context.notable, data.context.warning, data.context.reset, "%s", byte_dump_sequence_space);
         }
       }
       else if (f_utf_character_is_zero_width(characters.string[i]) == f_true) {
@@ -632,7 +630,7 @@ extern "C" {
           printf(".");
         }
         else if (data.parameters[byte_dump_parameter_placeholder].result == f_console_result_found) {
-          fl_color_print(f_standard_output, data.context.warning, data.context.reset, "%s", byte_dump_character_placeholder);
+          fl_color_print(f_type_output, data.context.warning, data.context.reset, "%s", byte_dump_character_placeholder);
         }
         else {
           printf(" ");
@@ -641,7 +639,7 @@ extern "C" {
       else if (f_utf_character_is_control(characters.string[i]) == f_true) {
         // print a space (or '.') for control characters.
         if (data.presentation == byte_dump_presentation_classic) {
-          fl_color_print(f_standard_output, data.context.warning, data.context.reset, ".");
+          fl_color_print(f_type_output, data.context.warning, data.context.reset, ".");
         }
         else {
           printf(" ");
@@ -679,10 +677,10 @@ extern "C" {
       else if (width_utf == 1) {
         // print invalid placeholder for invalid UTF-8 widths.
         if (invalid[i]) {
-          fl_color_print(f_standard_output, data.context.error, data.context.reset, "%s", byte_dump_character_incomplete);
+          fl_color_print(f_type_output, data.context.error, data.context.reset, "%s", byte_dump_character_incomplete);
         }
         else {
-          fl_color_print(f_standard_output, data.context.warning, data.context.reset, "%s", byte_dump_character_incomplete);
+          fl_color_print(f_type_output, data.context.warning, data.context.reset, "%s", byte_dump_character_incomplete);
         }
       }
       else if (width_utf > 0) {
@@ -745,13 +743,13 @@ extern "C" {
       if (width_utf > 1 && j + 1 < data.width) {
         if (data.parameters[byte_dump_parameter_placeholder].result == f_console_result_found) {
           if (invalid[i]) {
-            fl_color_print(f_standard_output, data.context.error, data.context.reset, "%s", byte_dump_character_placeholder);
+            fl_color_print(f_type_output, data.context.error, data.context.reset, "%s", byte_dump_character_placeholder);
           }
           else if (data.parameters[byte_dump_parameter_classic].result == f_console_result_found) {
             printf(".");
           }
           else {
-            fl_color_print(f_standard_output, data.context.warning, data.context.reset, "%s", byte_dump_character_placeholder);
+            fl_color_print(f_type_output, data.context.warning, data.context.reset, "%s", byte_dump_character_placeholder);
           }
         }
         else {
@@ -763,13 +761,13 @@ extern "C" {
         if (width_utf > 2 && j + 1 < data.width) {
           if (data.parameters[byte_dump_parameter_placeholder].result == f_console_result_found) {
             if (invalid[i]) {
-              fl_color_print(f_standard_output, data.context.error, data.context.reset, "%s", byte_dump_character_placeholder);
+              fl_color_print(f_type_output, data.context.error, data.context.reset, "%s", byte_dump_character_placeholder);
             }
             else if (data.parameters[byte_dump_parameter_classic].result == f_console_result_found) {
               printf(".");
             }
             else {
-              fl_color_print(f_standard_output, data.context.warning, data.context.reset, "%s", byte_dump_character_placeholder);
+              fl_color_print(f_type_output, data.context.warning, data.context.reset, "%s", byte_dump_character_placeholder);
             }
           }
           else {
@@ -781,13 +779,13 @@ extern "C" {
           if (width_utf > 3 && j + 1 < data.width) {
             if (data.parameters[byte_dump_parameter_placeholder].result == f_console_result_found) {
               if (invalid[i]) {
-                fl_color_print(f_standard_output, data.context.error, data.context.reset, "%s", byte_dump_character_placeholder);
+                fl_color_print(f_type_output, data.context.error, data.context.reset, "%s", byte_dump_character_placeholder);
               }
               else if (data.parameters[byte_dump_parameter_classic].result == f_console_result_found) {
                 printf(".");
               }
               else {
-                fl_color_print(f_standard_output, data.context.warning, data.context.reset, "%s", byte_dump_character_placeholder);
+                fl_color_print(f_type_output, data.context.warning, data.context.reset, "%s", byte_dump_character_placeholder);
               }
             }
             else {
@@ -804,13 +802,13 @@ extern "C" {
     if (data.parameters[byte_dump_parameter_placeholder].result == f_console_result_found) {
       for (; j < data.width; j++) {
         if (invalid[j]) {
-          fl_color_print(f_standard_output, data.context.error, data.context.reset, "%s", byte_dump_character_placeholder);
+          fl_color_print(f_type_output, data.context.error, data.context.reset, "%s", byte_dump_character_placeholder);
         }
         else if (data.parameters[byte_dump_parameter_classic].result == f_console_result_found) {
           printf(".");
         }
         else {
-          fl_color_print(f_standard_output, data.context.warning, data.context.reset, "%s", byte_dump_character_placeholder);
+          fl_color_print(f_type_output, data.context.warning, data.context.reset, "%s", byte_dump_character_placeholder);
         }
       } // for
     }
@@ -820,7 +818,7 @@ extern "C" {
       } // for
     }
 
-    fl_color_print(f_standard_output, data.context.notable, data.context.reset, " |");
+    fl_color_print(f_type_output, data.context.notable, data.context.reset, " |");
     printf("%c", f_string_eol);
   }
 #endif // _di_byte_dump_file_
@@ -828,68 +826,68 @@ extern "C" {
 #ifndef _di_byte_dump_print_file_error_
   void byte_dump_print_file_error(const fl_color_context context, const f_string function, const f_string file_name, const f_status status) {
     if (status == f_false) {
-      fl_color_print(f_standard_error, context.error, context.reset, "ERROR: failed to find file '");
-      fl_color_print(f_standard_error, context.notable, context.reset, "%s", file_name);
-      fl_color_print_line(f_standard_error, context.error, context.reset, "'.");
+      fl_color_print(f_type_error, context.error, context.reset, "ERROR: failed to find file '");
+      fl_color_print(f_type_error, context.notable, context.reset, "%s", file_name);
+      fl_color_print_line(f_type_error, context.error, context.reset, "'.");
       return;
     }
 
     if (status == f_invalid_parameter) {
-      fl_color_print(f_standard_error, context.error, context.reset, "INTERNAL ERROR: Invalid parameter when calling ", function, file_name);
-      fl_color_print(f_standard_error, context.notable, context.reset, "%s", function);
-      fl_color_print(f_standard_error, context.error, context.reset, "() for the file '");
-      fl_color_print(f_standard_error, context.notable, context.reset, "%s", file_name);
-      fl_color_print_line(f_standard_error, context.error, context.reset, "'.");
+      fl_color_print(f_type_error, context.error, context.reset, "INTERNAL ERROR: Invalid parameter when calling ", function, file_name);
+      fl_color_print(f_type_error, context.notable, context.reset, "%s", function);
+      fl_color_print(f_type_error, context.error, context.reset, "() for the file '");
+      fl_color_print(f_type_error, context.notable, context.reset, "%s", file_name);
+      fl_color_print_line(f_type_error, context.error, context.reset, "'.");
       return;
     }
 
     if (status == f_invalid_name) {
-      fl_color_print(f_standard_error, context.error, context.reset, "ERROR: Invalid filename '");
-      fl_color_print(f_standard_error, context.notable, context.reset, "%s", file_name);
-      fl_color_print_line(f_standard_error, context.error, context.reset, "'.");
+      fl_color_print(f_type_error, context.error, context.reset, "ERROR: Invalid filename '");
+      fl_color_print(f_type_error, context.notable, context.reset, "%s", file_name);
+      fl_color_print_line(f_type_error, context.error, context.reset, "'.");
       return;
     }
 
     if (status == f_out_of_memory) {
-      fl_color_print(f_standard_error, context.error, context.reset, "CRITICAL ERROR: Unable to allocate memory, while trying to access file '");
-      fl_color_print(f_standard_error, context.notable, context.reset, "%s", file_name);
-      fl_color_print_line(f_standard_error, context.error, context.reset, "'.");
+      fl_color_print(f_type_error, context.error, context.reset, "CRITICAL ERROR: Unable to allocate memory, while trying to access file '");
+      fl_color_print(f_type_error, context.notable, context.reset, "%s", file_name);
+      fl_color_print_line(f_type_error, context.error, context.reset, "'.");
       return;
     }
 
     if (status == f_number_overflow) {
-      fl_color_print(f_standard_error, context.error, context.reset, "ERROR: Overflow while trying to access file '");
-      fl_color_print(f_standard_error, context.notable, context.reset, "%s", file_name);
-      fl_color_print_line(f_standard_error, context.error, context.reset, "'.");
+      fl_color_print(f_type_error, context.error, context.reset, "ERROR: Overflow while trying to access file '");
+      fl_color_print(f_type_error, context.notable, context.reset, "%s", file_name);
+      fl_color_print_line(f_type_error, context.error, context.reset, "'.");
       return;
     }
 
     if (status == f_invalid_directory) {
-      fl_color_print(f_standard_error, context.error, context.reset, "ERROR: Invalid directory while trying to access file '");
-      fl_color_print(f_standard_error, context.notable, context.reset, "%s", file_name);
-      fl_color_print_line(f_standard_error, context.error, context.reset, "'.");
+      fl_color_print(f_type_error, context.error, context.reset, "ERROR: Invalid directory while trying to access file '");
+      fl_color_print(f_type_error, context.notable, context.reset, "%s", file_name);
+      fl_color_print_line(f_type_error, context.error, context.reset, "'.");
       return;
     }
 
     if (status == f_access_denied) {
-      fl_color_print(f_standard_error, context.error, context.reset, "ERROR: Access denied while trying to access file '");
-      fl_color_print(f_standard_error, context.notable, context.reset, "%s", file_name);
-      fl_color_print_line(f_standard_error, context.error, context.reset, "'.");
+      fl_color_print(f_type_error, context.error, context.reset, "ERROR: Access denied while trying to access file '");
+      fl_color_print(f_type_error, context.notable, context.reset, "%s", file_name);
+      fl_color_print_line(f_type_error, context.error, context.reset, "'.");
       return;
     }
 
     if (status == f_loop) {
-      fl_color_print(f_standard_error, context.error, context.reset, "ERROR: Loop while trying to access file '");
-      fl_color_print(f_standard_error, context.notable, context.reset, "%s", file_name);
-      fl_color_print_line(f_standard_error, context.error, context.reset, "'.");
+      fl_color_print(f_type_error, context.error, context.reset, "ERROR: Loop while trying to access file '");
+      fl_color_print(f_type_error, context.notable, context.reset, "%s", file_name);
+      fl_color_print_line(f_type_error, context.error, context.reset, "'.");
       return;
     }
 
-    fl_color_print(f_standard_error, context.error, context.reset, "UNKNOWN ERROR: (");
-    fl_color_print(f_standard_error, context.notable, context.reset, "%d", status);
-    fl_color_print(f_standard_error, context.error, context.reset, ") occurred for file '");
-    fl_color_print(f_standard_error, context.notable, context.reset, "%s", file_name);
-    fl_color_print_line(f_standard_error, context.error, context.reset, "'.");
+    fl_color_print(f_type_error, context.error, context.reset, "UNKNOWN ERROR: (");
+    fl_color_print(f_type_error, context.notable, context.reset, "%d", status);
+    fl_color_print(f_type_error, context.error, context.reset, ") occurred for file '");
+    fl_color_print(f_type_error, context.notable, context.reset, "%s", file_name);
+    fl_color_print_line(f_type_error, context.error, context.reset, "'.");
   }
 #endif // _di_byte_dump_print_file_error_
 
index 8a778889f13379a1e4bd307654a11718f82c9c31..6b3e4a5429aae1ada102d520606b0f983a713b37 100644 (file)
@@ -37,7 +37,7 @@ extern "C" {
 
     printf("%c%c", f_string_eol, f_string_eol);
 
-    fl_color_print(f_standard_output, context.important, context.reset, " Special Options: ");
+    fl_color_print(f_type_output, context.important, context.reset, " Special Options: ");
 
     fll_program_print_help_option_long(context, fake_long_documents_disabled, f_console_symbol_long_enable, "   Forcibly do not build documents files.");
     fll_program_print_help_option_long(context, fake_long_documents_enabled, f_console_symbol_long_enable, "    Forcibly do build documents files.");
@@ -48,7 +48,7 @@ extern "C" {
 
     printf("%c%c", f_string_eol, f_string_eol);
 
-    fl_color_print(f_standard_output, context.important, context.reset, " Operations: ");
+    fl_color_print(f_type_output, context.important, context.reset, " Operations: ");
 
     fll_program_print_help_option_other(context, fake_other_operation_build, "   Build or compile the code based on build settings file.");
     fll_program_print_help_option_other(context, fake_other_operation_clean, "   Delete all build files.");
@@ -58,14 +58,14 @@ extern "C" {
     fll_program_print_help_usage(context, fake_name, "operation");
 
     printf("  When performing the ");
-    fl_color_print(f_standard_output, context.notable, context.reset, "%s", fake_other_operation_build);
+    fl_color_print(f_type_output, context.notable, context.reset, "%s", fake_other_operation_build);
     printf(" operation, the ");
-    fl_color_print(f_standard_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fake_long_mode);
+    fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fake_long_mode);
     printf(" parameter specifies a name (limited to alpha-numeric, underscore, and dash) to be used in addition to the global.");
     printf("%c", f_string_eol);
 
     printf("  For example, when a ");
-    fl_color_print(f_standard_output, context.notable, context.reset, "%s", fake_long_mode);
+    fl_color_print(f_type_output, context.notable, context.reset, "%s", fake_long_mode);
     printf(" of 'fll_monolithic' is specified, build libaries from both 'build_libraries' and 'build_libraries-fll_monolithic' are used (but not 'build_libraries-fll_level').");
 
     printf("%c%c", f_string_eol, f_string_eol);
@@ -302,10 +302,10 @@ extern "C" {
           }
 
           if (data->verbosity != fake_verbosity_quiet) {
-            fprintf(f_standard_error, "%c", f_string_eol);
-            fl_color_print(f_standard_error, data->context.error, data->context.reset, "ERROR: the operation '");
-            fl_color_print(f_standard_error, data->context.notable, data->context.reset, "%s", fake_other_operation_make);
-            fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "' is not yet implemented.");
+            fprintf(f_type_error, "%c", f_string_eol);
+            fl_color_print(f_type_error, data->context.error, data->context.reset, "ERROR: the operation '");
+            fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s", fake_other_operation_make);
+            fl_color_print_line(f_type_error, data->context.error, data->context.reset, "' is not yet implemented.");
           }
         }
         else if (operations[i] == fake_operation_skeleton) {
@@ -314,10 +314,10 @@ extern "C" {
 
         if (f_status_is_error(status)) {
           if (data->verbosity != fake_verbosity_quiet) {
-            fprintf(f_standard_error, "%c", f_string_eol);
-            fl_color_print(f_standard_error, data->context.error, data->context.reset, "ERROR: the operation '");
-            fl_color_print(f_standard_error, data->context.notable, data->context.reset, "%s", operations_name[i]);
-            fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "' failed.");
+            fprintf(f_type_error, "%c", f_string_eol);
+            fl_color_print(f_type_error, data->context.error, data->context.reset, "ERROR: the operation '");
+            fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s", operations_name[i]);
+            fl_color_print_line(f_type_error, data->context.error, data->context.reset, "' failed.");
           }
 
           break;
@@ -327,18 +327,18 @@ extern "C" {
       // ensure a newline is always put at the end of the program execution, unless in quite mode.
       if (data->verbosity != fake_verbosity_quiet) {
         if (f_status_is_error(status)) {
-          fprintf(f_standard_error, "%c", f_string_eol);
+          fprintf(f_type_error, "%c", f_string_eol);
         }
         else {
-          fprintf(f_standard_output, "%cAll operations complete.%c%c", f_string_eol, f_string_eol, f_string_eol);
+          fprintf(f_type_output, "%cAll operations complete.%c%c", f_string_eol, f_string_eol, f_string_eol);
         }
       }
     }
     else {
       if (data->verbosity != fake_verbosity_quiet) {
-        fprintf(f_standard_error, "%c", f_string_eol);
-        fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "ERROR: you failed to specify an operation.");
-        fprintf(f_standard_error, "%c", f_string_eol);
+        fprintf(f_type_error, "%c", f_string_eol);
+        fl_color_print_line(f_type_error, data->context.error, data->context.reset, "ERROR: you failed to specify an operation.");
+        fprintf(f_type_error, "%c", f_string_eol);
       }
 
       status = f_status_set_error(f_invalid_parameter);
index 667dfb1dacf71c5d4b68367a9821bb2ab2c6a88f..fa99e7d3ee1038b039383cec4cf5f76e21ba8519 100644 (file)
@@ -199,12 +199,12 @@ extern "C" {
           if (names.used + settings.environment.used > names.size) {
             if (names.used + settings.environment.used > f_array_length_size) {
               if (data.verbosity != fake_verbosity_quiet) {
-                fprintf(f_standard_error, "%c", f_string_eol);
-                fl_color_print(f_standard_error, data.context.error, data.context.reset, "ERROR: The values for the settings '");
-                fl_color_print(f_standard_error, data.context.notable, data.context.reset, "%s", fake_build_settings_name_environment);
-                fl_color_print(f_standard_error, data.context.error, data.context.reset, "' of settings file '");
-                fl_color_print(f_standard_error, data.context.notable, data.context.reset, "%s", data.file_data_build_settings.string);
-                fl_color_print_line(f_standard_error, data.context.error, data.context.reset, "' is too large.");
+                fprintf(f_type_error, "%c", f_string_eol);
+                fl_color_print(f_type_error, data.context.error, data.context.reset, "ERROR: The values for the settings '");
+                fl_color_print(f_type_error, data.context.notable, data.context.reset, "%s", fake_build_settings_name_environment);
+                fl_color_print(f_type_error, data.context.error, data.context.reset, "' of settings file '");
+                fl_color_print(f_type_error, data.context.notable, data.context.reset, "%s", data.file_data_build_settings.string);
+                fl_color_print_line(f_type_error, data.context.error, data.context.reset, "' is too large.");
               }
 
               f_macro_string_dynamic_delete_simple(part);
@@ -326,10 +326,10 @@ extern "C" {
     if (f_status_is_error(status)) {
       if (f_status_set_fine(status) == f_failure) {
         if (data.verbosity != fake_verbosity_quiet) {
-          fprintf(f_standard_error, "%c", f_string_eol);
-          fl_color_print(f_standard_error, data.context.error, data.context.reset, "ERROR: Failed to execute script: ");
-          fl_color_print(f_standard_error, data.context.notable, data.context.reset, "%s", path.string);
-          fl_color_print_line(f_standard_error, data.context.error, data.context.reset, ".");
+          fprintf(f_type_error, "%c", f_string_eol);
+          fl_color_print(f_type_error, data.context.error, data.context.reset, "ERROR: Failed to execute script: ");
+          fl_color_print(f_type_error, data.context.notable, data.context.reset, "%s", path.string);
+          fl_color_print_line(f_type_error, data.context.error, data.context.reset, ".");
         }
       }
       else {
@@ -347,7 +347,7 @@ extern "C" {
   f_return_status fake_build_operate(const fake_data data) {
     if (data.verbosity != fake_verbosity_quiet) {
       printf("%c", f_string_eol);
-      fl_color_print_line(f_standard_output, data.context.important, data.context.reset, "Building project.");
+      fl_color_print_line(f_type_output, data.context.important, data.context.reset, "Building project.");
     }
 
     f_status status = f_none;
@@ -399,13 +399,13 @@ extern "C" {
 
       if (status == f_true) {
         name_function = "f_file_open";
-        status = f_file_open(&file, data.file_data_build_settings.string);
+        status = f_file_open(data.file_data_build_settings.string, 0, &file);
 
         if (status == f_none) {
           name_function = "f_file_read";
-          status = f_file_read(&file, &buffer);
+          status = f_file_read(file, &buffer);
 
-          f_file_close(&file);
+          f_file_close(&file.id);
         }
       }
       else if (status == f_false) {
@@ -438,26 +438,26 @@ extern "C" {
 
         if (status == f_status_set_error(f_incomplete_utf_on_stop)) {
           if (data.verbosity != fake_verbosity_quiet) {
-            fprintf(f_standard_error, "%c", f_string_eol);
-            fl_color_print(f_standard_error, data.context.error, data.context.reset, "ENCODING ERROR: error occurred on invalid UTF-8 character at stop position (at ");
-            fl_color_print(f_standard_error, data.context.notable, data.context.reset, "%d", range.start);
-            fl_color_print(f_standard_error, data.context.error, data.context.reset, " of settings file '");
-            fl_color_print(f_standard_error, data.context.notable, data.context.reset, "%s", data.file_data_build_settings.string);
-            fl_color_print_line(f_standard_error, data.context.error, data.context.reset, "').");
+            fprintf(f_type_error, "%c", f_string_eol);
+            fl_color_print(f_type_error, data.context.error, data.context.reset, "ENCODING ERROR: error occurred on invalid UTF-8 character at stop position (at ");
+            fl_color_print(f_type_error, data.context.notable, data.context.reset, "%d", range.start);
+            fl_color_print(f_type_error, data.context.error, data.context.reset, " of settings file '");
+            fl_color_print(f_type_error, data.context.notable, data.context.reset, "%s", data.file_data_build_settings.string);
+            fl_color_print_line(f_type_error, data.context.error, data.context.reset, "').");
           }
         }
         else if (status == f_status_set_error(f_incomplete_utf_on_stop)) {
           if (data.verbosity != fake_verbosity_quiet) {
-            fprintf(f_standard_error, "%c", f_string_eol);
-            fl_color_print(f_standard_error, data.context.error, data.context.reset, "ENCODING ERROR: error occurred on invalid UTF-8 character at end of string (at ");
-            fl_color_print(f_standard_error, data.context.notable, data.context.reset, "%d", range.start);
-            fl_color_print(f_standard_error, data.context.error, data.context.reset, " of settings file '");
-            fl_color_print(f_standard_error, data.context.notable, data.context.reset, "%s", data.file_data_build_settings.string);
-            fl_color_print_line(f_standard_error, data.context.error, data.context.reset, "').");
+            fprintf(f_type_error, "%c", f_string_eol);
+            fl_color_print(f_type_error, data.context.error, data.context.reset, "ENCODING ERROR: error occurred on invalid UTF-8 character at end of string (at ");
+            fl_color_print(f_type_error, data.context.notable, data.context.reset, "%d", range.start);
+            fl_color_print(f_type_error, data.context.error, data.context.reset, " of settings file '");
+            fl_color_print(f_type_error, data.context.notable, data.context.reset, "%s", data.file_data_build_settings.string);
+            fl_color_print_line(f_type_error, data.context.error, data.context.reset, "').");
           }
         }
         else {
-          fake_print_error(data.context, data.verbosity, f_status_set_fine(status), "fll_fss_extended_read", true);
+          fake_print_error(data.context, data.verbosity, f_status_set_fine(status), "fll_fss_extended_read", f_true);
         }
 
         f_macro_fss_objects_delete_simple(objects);
@@ -627,12 +627,12 @@ extern "C" {
 
             if (found == f_false) {
               if (data.verbosity != fake_verbosity_quiet) {
-                fprintf(f_standard_error, "%c", f_string_eol);
-                fl_color_print(f_standard_error, data.context.error, data.context.reset, "ERROR: the specified mode '");
-                fl_color_print(f_standard_error, data.context.notable, data.context.reset, "%s", modes->array[i].string);
-                fl_color_print(f_standard_error, data.context.error, data.context.reset, "' is not a valid mode, according to '");
-                fl_color_print(f_standard_error, data.context.notable, data.context.reset, "%s", data.file_data_build_settings.string);
-                fl_color_print_line(f_standard_error, data.context.error, data.context.reset, "'.");
+                fprintf(f_type_error, "%c", f_string_eol);
+                fl_color_print(f_type_error, data.context.error, data.context.reset, "ERROR: the specified mode '");
+                fl_color_print(f_type_error, data.context.notable, data.context.reset, "%s", modes->array[i].string);
+                fl_color_print(f_type_error, data.context.error, data.context.reset, "' is not a valid mode, according to '");
+                fl_color_print(f_type_error, data.context.notable, data.context.reset, "%s", data.file_data_build_settings.string);
+                fl_color_print_line(f_type_error, data.context.error, data.context.reset, "'.");
               }
 
               error_printed = f_true;
@@ -680,10 +680,10 @@ extern "C" {
           if (status == f_status_set_error(f_string_too_large)) {
             if (data.verbosity != fake_verbosity_quiet) {
               // @todo update FSS functions to return which setting index the problem happened on.
-              fprintf(f_standard_error, "%c", f_string_eol);
-              fl_color_print(f_standard_error, data.context.error, data.context.reset, "ERROR: a setting in the build settings file '");
-              fl_color_print(f_standard_error, data.context.notable, data.context.reset, "%s", data.file_data_build_settings.string);
-              fl_color_print_line(f_standard_error, data.context.error, data.context.reset, "' is too long.");
+              fprintf(f_type_error, "%c", f_string_eol);
+              fl_color_print(f_type_error, data.context.error, data.context.reset, "ERROR: a setting in the build settings file '");
+              fl_color_print(f_type_error, data.context.notable, data.context.reset, "%s", data.file_data_build_settings.string);
+              fl_color_print_line(f_type_error, data.context.error, data.context.reset, "' is too long.");
             }
           }
           else if (!error_printed) {
@@ -773,14 +773,14 @@ extern "C" {
 
             if (settings_single_source[i]->used > 1) {
               if (data.verbosity != fake_verbosity_quiet) {
-                fprintf(f_standard_warning, "%c", f_string_eol);
-                fl_color_print(f_standard_warning, data.context.warning, data.context.reset, "WARNING: the setting '");
-                fl_color_print(f_standard_warning, data.context.notable, data.context.reset, "%s", settings_single_name[i]);
-                fl_color_print(f_standard_warning, data.context.warning, data.context.reset, "' in the file '");
-                fl_color_print(f_standard_warning, data.context.notable, data.context.reset, "%s", data.file_data_build_settings.string);
-                fl_color_print(f_standard_warning, data.context.warning, data.context.reset, "' may only have a single property, only using the first: '");
-                fl_color_print(f_standard_warning, data.context.notable, data.context.reset, "%s", settings_single_source[i]->array[0].string);
-                fl_color_print_line(f_standard_warning, data.context.warning, data.context.reset, "'.");
+                fprintf(f_type_warning, "%c", f_string_eol);
+                fl_color_print(f_type_warning, data.context.warning, data.context.reset, "WARNING: the setting '");
+                fl_color_print(f_type_warning, data.context.notable, data.context.reset, "%s", settings_single_name[i]);
+                fl_color_print(f_type_warning, data.context.warning, data.context.reset, "' in the file '");
+                fl_color_print(f_type_warning, data.context.notable, data.context.reset, "%s", data.file_data_build_settings.string);
+                fl_color_print(f_type_warning, data.context.warning, data.context.reset, "' may only have a single property, only using the first: '");
+                fl_color_print(f_type_warning, data.context.notable, data.context.reset, "%s", settings_single_source[i]->array[0].string);
+                fl_color_print_line(f_type_warning, data.context.warning, data.context.reset, "'.");
               }
             }
 
@@ -795,18 +795,18 @@ extern "C" {
                 *settings_single_bool[i] = f_true;
 
                 if (data.verbosity != fake_verbosity_quiet) {
-                  fprintf(f_standard_warning, "%c", f_string_eol);
-                  fl_color_print(f_standard_warning, data.context.warning, data.context.reset, "WARNING: the setting '");
-                  fl_color_print(f_standard_warning, data.context.notable, data.context.reset, "%s", settings_single_name[i]);
-                  fl_color_print(f_standard_warning, data.context.warning, data.context.reset, "' in the file '");
-                  fl_color_print(f_standard_warning, data.context.notable, data.context.reset, "%s", data.file_data_build_settings.string);
-                  fl_color_print(f_standard_warning, data.context.warning, data.context.reset, "' may be either '");
-                  fl_color_print(f_standard_warning, data.context.notable, data.context.reset, "%s", fake_build_settings_bool_yes);
-                  fl_color_print(f_standard_warning, data.context.warning, data.context.reset, "' or '");
-                  fl_color_print(f_standard_warning, data.context.notable, data.context.reset, "%s", fake_build_settings_bool_no);
-                  fl_color_print(f_standard_warning, data.context.warning, data.context.reset, "', defaulting to '");
-                  fl_color_print(f_standard_warning, data.context.notable, data.context.reset, "%s", fake_build_settings_bool_yes);
-                  fl_color_print_line(f_standard_warning, data.context.warning, data.context.reset, "'.");
+                  fprintf(f_type_warning, "%c", f_string_eol);
+                  fl_color_print(f_type_warning, data.context.warning, data.context.reset, "WARNING: the setting '");
+                  fl_color_print(f_type_warning, data.context.notable, data.context.reset, "%s", settings_single_name[i]);
+                  fl_color_print(f_type_warning, data.context.warning, data.context.reset, "' in the file '");
+                  fl_color_print(f_type_warning, data.context.notable, data.context.reset, "%s", data.file_data_build_settings.string);
+                  fl_color_print(f_type_warning, data.context.warning, data.context.reset, "' may be either '");
+                  fl_color_print(f_type_warning, data.context.notable, data.context.reset, "%s", fake_build_settings_bool_yes);
+                  fl_color_print(f_type_warning, data.context.warning, data.context.reset, "' or '");
+                  fl_color_print(f_type_warning, data.context.notable, data.context.reset, "%s", fake_build_settings_bool_no);
+                  fl_color_print(f_type_warning, data.context.warning, data.context.reset, "', defaulting to '");
+                  fl_color_print(f_type_warning, data.context.notable, data.context.reset, "%s", fake_build_settings_bool_yes);
+                  fl_color_print_line(f_type_warning, data.context.warning, data.context.reset, "'.");
                 }
               }
             }
index 4a9abd8e79dfbd6c0fe1d4a920de2281d5a29f07..7090943ff363288992dc52fb0b93bc490fbba3f5 100644 (file)
@@ -12,9 +12,9 @@ extern "C" {
 
     if (data.verbosity != fake_verbosity_quiet) {
       printf("%c", f_string_eol);
-      fl_color_print(f_standard_output, data.context.important, data.context.reset, "Deleting all files within build directory '");
-      fl_color_print(f_standard_output, data.context.notable, data.context.reset, "%s", data.path_build.string);
-      fl_color_print_line(f_standard_output, data.context.important, data.context.reset, "'.");
+      fl_color_print(f_type_output, data.context.important, data.context.reset, "Deleting all files within build directory '");
+      fl_color_print(f_type_output, data.context.notable, data.context.reset, "%s", data.path_build.string);
+      fl_color_print_line(f_type_output, data.context.important, data.context.reset, "'.");
     }
 
     if (data.verbosity == fake_verbosity_verbose) {
index 75040bcaea9bd001f9d56f7baaf1fb5b848a1f24..9166395300dfa8e0e65b50f6634d7e2cb6147a0f 100644 (file)
@@ -415,10 +415,10 @@ extern "C" {
 
     if (status == f_invalid_parameter) {
       if (verbosity != fake_verbosity_quiet) {
-        fprintf(f_standard_error, "%c", f_string_eol);
-        fl_color_print(f_standard_error, context.error, context.reset, "ERROR: Invalid parameter when calling function ");
-        fl_color_print(f_standard_error, context.notable, context.reset, "%s", function);
-        fl_color_print_line(f_standard_error, context.error, context.reset, "().");
+        fprintf(f_type_error, "%c", f_string_eol);
+        fl_color_print(f_type_error, context.error, context.reset, "ERROR: Invalid parameter when calling function ");
+        fl_color_print(f_type_error, context.notable, context.reset, "%s", function);
+        fl_color_print_line(f_type_error, context.error, context.reset, "().");
       }
 
       return f_none;
@@ -426,22 +426,22 @@ extern "C" {
 
     if (status == f_error_allocation || status == f_error_reallocation) {
       if (verbosity != fake_verbosity_quiet) {
-        fprintf(f_standard_error, "%c", f_string_eol);
-        fl_color_print(f_standard_error, context.error, context.reset, "ERROR: Unable to allocate memory in function ");
-        fl_color_print(f_standard_error, context.notable, context.reset, "%s", function);
-        fl_color_print_line(f_standard_error, context.error, context.reset, "().");
+        fprintf(f_type_error, "%c", f_string_eol);
+        fl_color_print(f_type_error, context.error, context.reset, "ERROR: Unable to allocate memory in function ");
+        fl_color_print(f_type_error, context.notable, context.reset, "%s", function);
+        fl_color_print_line(f_type_error, context.error, context.reset, "().");
       }
 
       return f_none;
     }
 
     if (fallback && verbosity != fake_verbosity_quiet) {
-      fprintf(f_standard_error, "%c", f_string_eol);
-      fl_color_print(f_standard_error, context.error, context.reset, "UNKNOWN ERROR: (");
-      fl_color_print(f_standard_error, context.notable, context.reset, "%d", status);
-      fl_color_print(f_standard_error, context.error, context.reset, ") in function ");
-      fl_color_print(f_standard_error, context.notable, context.reset, "%s", function);
-      fl_color_print_line(f_standard_error, context.error, context.reset, "().");
+      fprintf(f_type_error, "%c", f_string_eol);
+      fl_color_print(f_type_error, context.error, context.reset, "UNKNOWN ERROR: (");
+      fl_color_print(f_type_error, context.notable, context.reset, "%d", status);
+      fl_color_print(f_type_error, context.error, context.reset, ") in function ");
+      fl_color_print(f_type_error, context.notable, context.reset, "%s", function);
+      fl_color_print_line(f_type_error, context.error, context.reset, "().");
     }
 
     return f_unknown;
@@ -457,10 +457,10 @@ extern "C" {
 
     if (status == f_file_not_found) {
       if (verbosity != fake_verbosity_quiet) {
-        fprintf(f_standard_error, "%c", f_string_eol);
-        fl_color_print(f_standard_error, context.error, context.reset, "ERROR: failed to find %s '", file_or_directory);
-        fl_color_print(f_standard_error, context.notable, context.reset, "%s", name);
-        fl_color_print_line(f_standard_error, context.error, context.reset, "'.");
+        fprintf(f_type_error, "%c", f_string_eol);
+        fl_color_print(f_type_error, context.error, context.reset, "ERROR: failed to find %s '", file_or_directory);
+        fl_color_print(f_type_error, context.notable, context.reset, "%s", name);
+        fl_color_print_line(f_type_error, context.error, context.reset, "'.");
       }
 
       return f_none;
@@ -468,12 +468,12 @@ extern "C" {
 
     if (status == f_invalid_parameter) {
       if (verbosity != fake_verbosity_quiet) {
-        fprintf(f_standard_error, "%c", f_string_eol);
-        fl_color_print(f_standard_error, context.error, context.reset, "INTERNAL ERROR: Invalid parameter when calling ");
-        fl_color_print(f_standard_error, context.notable, context.reset, "%s", function);
-        fl_color_print(f_standard_error, context.error, context.reset, "() for the %s '", file_or_directory);
-        fl_color_print(f_standard_error, context.notable, context.reset, "%s", name);
-        fl_color_print_line(f_standard_error, context.error, context.reset, "'.");
+        fprintf(f_type_error, "%c", f_string_eol);
+        fl_color_print(f_type_error, context.error, context.reset, "INTERNAL ERROR: Invalid parameter when calling ");
+        fl_color_print(f_type_error, context.notable, context.reset, "%s", function);
+        fl_color_print(f_type_error, context.error, context.reset, "() for the %s '", file_or_directory);
+        fl_color_print(f_type_error, context.notable, context.reset, "%s", name);
+        fl_color_print_line(f_type_error, context.error, context.reset, "'.");
       }
 
       return f_none;
@@ -481,10 +481,10 @@ extern "C" {
 
     if (status == f_invalid_name) {
       if (verbosity != fake_verbosity_quiet) {
-        fprintf(f_standard_error, "%c", f_string_eol);
-        fl_color_print(f_standard_error, context.error, context.reset, "ERROR: Invalid %s name '", file_or_directory);
-        fl_color_print(f_standard_error, context.notable, context.reset, "%s", name);
-        fl_color_print_line(f_standard_error, context.error, context.reset, "'.");
+        fprintf(f_type_error, "%c", f_string_eol);
+        fl_color_print(f_type_error, context.error, context.reset, "ERROR: Invalid %s name '", file_or_directory);
+        fl_color_print(f_type_error, context.notable, context.reset, "%s", name);
+        fl_color_print_line(f_type_error, context.error, context.reset, "'.");
       }
 
       return f_none;
@@ -492,10 +492,10 @@ extern "C" {
 
     if (status == f_out_of_memory) {
       if (verbosity != fake_verbosity_quiet) {
-        fprintf(f_standard_error, "%c", f_string_eol);
-        fl_color_print(f_standard_error, context.error, context.reset, "CRITICAL ERROR: Unable to allocate memory, while trying to %s %s '", operation, file_or_directory);
-        fl_color_print(f_standard_error, context.notable, context.reset, "%s", name);
-        fl_color_print_line(f_standard_error, context.error, context.reset, "'.");
+        fprintf(f_type_error, "%c", f_string_eol);
+        fl_color_print(f_type_error, context.error, context.reset, "CRITICAL ERROR: Unable to allocate memory, while trying to %s %s '", operation, file_or_directory);
+        fl_color_print(f_type_error, context.notable, context.reset, "%s", name);
+        fl_color_print_line(f_type_error, context.error, context.reset, "'.");
       }
 
       return f_none;
@@ -503,10 +503,10 @@ extern "C" {
 
     if (status == f_number_overflow) {
       if (verbosity != fake_verbosity_quiet) {
-        fprintf(f_standard_error, "%c", f_string_eol);
-        fl_color_print(f_standard_error, context.error, context.reset, "ERROR: Overflow while trying to %s %s '", operation, file_or_directory);
-        fl_color_print(f_standard_error, context.notable, context.reset, "%s", name);
-        fl_color_print_line(f_standard_error, context.error, context.reset, "'.");
+        fprintf(f_type_error, "%c", f_string_eol);
+        fl_color_print(f_type_error, context.error, context.reset, "ERROR: Overflow while trying to %s %s '", operation, file_or_directory);
+        fl_color_print(f_type_error, context.notable, context.reset, "%s", name);
+        fl_color_print_line(f_type_error, context.error, context.reset, "'.");
       }
 
       return f_none;
@@ -514,10 +514,10 @@ extern "C" {
 
     if (status == f_invalid_directory) {
       if (verbosity != fake_verbosity_quiet) {
-        fprintf(f_standard_error, "%c", f_string_eol);
-        fl_color_print(f_standard_error, context.error, context.reset, "ERROR: Invalid directory while trying to %s %s '", operation, file_or_directory);
-        fl_color_print(f_standard_error, context.notable, context.reset, "%s", name);
-        fl_color_print_line(f_standard_error, context.error, context.reset, "'.");
+        fprintf(f_type_error, "%c", f_string_eol);
+        fl_color_print(f_type_error, context.error, context.reset, "ERROR: Invalid directory while trying to %s %s '", operation, file_or_directory);
+        fl_color_print(f_type_error, context.notable, context.reset, "%s", name);
+        fl_color_print_line(f_type_error, context.error, context.reset, "'.");
       }
 
       return f_none;
@@ -525,10 +525,10 @@ extern "C" {
 
     if (status == f_access_denied) {
       if (verbosity != fake_verbosity_quiet) {
-        fprintf(f_standard_error, "%c", f_string_eol);
-        fl_color_print(f_standard_error, context.error, context.reset, "ERROR: Access denied while trying to %s %s '", operation, file_or_directory);
-        fl_color_print(f_standard_error, context.notable, context.reset, "%s", name);
-        fl_color_print_line(f_standard_error, context.error, context.reset, "'.");
+        fprintf(f_type_error, "%c", f_string_eol);
+        fl_color_print(f_type_error, context.error, context.reset, "ERROR: Access denied while trying to %s %s '", operation, file_or_directory);
+        fl_color_print(f_type_error, context.notable, context.reset, "%s", name);
+        fl_color_print_line(f_type_error, context.error, context.reset, "'.");
       }
 
       return f_none;
@@ -536,10 +536,10 @@ extern "C" {
 
     if (status == f_loop) {
       if (verbosity != fake_verbosity_quiet) {
-        fprintf(f_standard_error, "%c", f_string_eol);
-        fl_color_print(f_standard_error, context.error, context.reset, "ERROR: Loop while trying to %s %s '", operation, file_or_directory);
-        fl_color_print(f_standard_error, context.notable, context.reset, "%s", name);
-        fl_color_print_line(f_standard_error, context.error, context.reset, "'.");
+        fprintf(f_type_error, "%c", f_string_eol);
+        fl_color_print(f_type_error, context.error, context.reset, "ERROR: Loop while trying to %s %s '", operation, file_or_directory);
+        fl_color_print(f_type_error, context.notable, context.reset, "%s", name);
+        fl_color_print_line(f_type_error, context.error, context.reset, "'.");
       }
 
       return f_none;
@@ -548,10 +548,10 @@ extern "C" {
     if (is_file) {
       if (status == f_directory_not_found) {
         if (verbosity != fake_verbosity_quiet) {
-          fprintf(f_standard_error, "%c", f_string_eol);
-          fl_color_print(f_standard_error, context.error, context.reset, "ERROR: failed to %s %s '", operation, file_or_directory);
-          fl_color_print(f_standard_error, context.notable, context.reset, "%s", name);
-          fl_color_print_line(f_standard_error, context.error, context.reset, "' due to an invalid directory in the path.");
+          fprintf(f_type_error, "%c", f_string_eol);
+          fl_color_print(f_type_error, context.error, context.reset, "ERROR: failed to %s %s '", operation, file_or_directory);
+          fl_color_print(f_type_error, context.notable, context.reset, "%s", name);
+          fl_color_print_line(f_type_error, context.error, context.reset, "' due to an invalid directory in the path.");
         }
 
         return f_none;
@@ -560,10 +560,10 @@ extern "C" {
     else {
       if (status == f_directory_not_found) {
         if (verbosity != fake_verbosity_quiet) {
-          fprintf(f_standard_error, "%c", f_string_eol);
-          fl_color_print(f_standard_error, context.error, context.reset, "ERROR: failed to %s %s '", operation, file_or_directory);
-          fl_color_print(f_standard_error, context.notable, context.reset, "%s", name);
-          fl_color_print_line(f_standard_error, context.error, context.reset, "' due to an invalid directory in the path.");
+          fprintf(f_type_error, "%c", f_string_eol);
+          fl_color_print(f_type_error, context.error, context.reset, "ERROR: failed to %s %s '", operation, file_or_directory);
+          fl_color_print(f_type_error, context.notable, context.reset, "%s", name);
+          fl_color_print_line(f_type_error, context.error, context.reset, "' due to an invalid directory in the path.");
         }
 
         return f_none;
@@ -571,10 +571,10 @@ extern "C" {
 
       if (status == f_failure) {
         if (verbosity != fake_verbosity_quiet) {
-          fprintf(f_standard_error, "%c", f_string_eol);
-          fl_color_print(f_standard_error, context.error, context.reset, "ERROR: failed to %s %s '", operation, file_or_directory);
-          fl_color_print(f_standard_error, context.notable, context.reset, "%s", name);
-          fl_color_print_line(f_standard_error, context.error, context.reset, "'.");
+          fprintf(f_type_error, "%c", f_string_eol);
+          fl_color_print(f_type_error, context.error, context.reset, "ERROR: failed to %s %s '", operation, file_or_directory);
+          fl_color_print(f_type_error, context.notable, context.reset, "%s", name);
+          fl_color_print_line(f_type_error, context.error, context.reset, "'.");
         }
 
         return f_none;
@@ -582,12 +582,12 @@ extern "C" {
     }
 
     if (fake_print_error(context, verbosity, status, function, f_false) == f_unknown && fallback && verbosity != fake_verbosity_quiet) {
-      fprintf(f_standard_error, "%c", f_string_eol);
-      fl_color_print(f_standard_error, context.error, context.reset, "UNKNOWN ERROR: (");
-      fl_color_print(f_standard_error, context.notable, context.reset, "%d", status);
-      fl_color_print(f_standard_error, context.error, context.reset, ") occurred while trying to %s %s '", operation, file_or_directory);
-      fl_color_print(f_standard_error, context.notable, context.reset, "%s", name);
-      fl_color_print_line(f_standard_error, context.error, context.reset, "'.");
+      fprintf(f_type_error, "%c", f_string_eol);
+      fl_color_print(f_type_error, context.error, context.reset, "UNKNOWN ERROR: (");
+      fl_color_print(f_type_error, context.notable, context.reset, "%d", status);
+      fl_color_print(f_type_error, context.error, context.reset, ") occurred while trying to %s %s '", operation, file_or_directory);
+      fl_color_print(f_type_error, context.notable, context.reset, "%s", name);
+      fl_color_print_line(f_type_error, context.error, context.reset, "'.");
     }
 
     return f_unknown;
@@ -597,10 +597,10 @@ extern "C" {
 #ifndef _di_fake_print_error_parameter_missing_value_
   void fake_print_error_parameter_missing_value(const fl_color_context context, const uint8_t verbosity, const f_string parameter) {
     if (verbosity != fake_verbosity_quiet) {
-      fprintf(f_standard_error, "%c", f_string_eol);
-      fl_color_print(f_standard_error, context.error, context.reset, "ERROR: The parameter '");
-      fl_color_print(f_standard_error, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, parameter);
-      fl_color_print_line(f_standard_error, context.error, context.reset, "' was specified, but no value was given.");
+      fprintf(f_type_error, "%c", f_string_eol);
+      fl_color_print(f_type_error, context.error, context.reset, "ERROR: The parameter '");
+      fl_color_print(f_type_error, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, parameter);
+      fl_color_print_line(f_type_error, context.error, context.reset, "' was specified, but no value was given.");
     }
   }
 #endif // _di_fake_print_error_parameter_missing_value_
@@ -608,10 +608,10 @@ extern "C" {
 #ifndef _di_fake_print_error_parameter_too_many_
   void fake_print_error_parameter_too_many(const fl_color_context context, const uint8_t verbosity, const f_string parameter) {
     if (verbosity != fake_verbosity_quiet) {
-      fprintf(f_standard_error, "%c", f_string_eol);
-      fl_color_print(f_standard_error, context.error, context.reset, "ERROR: the parameter '");
-      fl_color_print(f_standard_error, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, parameter);
-      fl_color_print_line(f_standard_error, context.error, context.reset, "' specified too many times.");
+      fprintf(f_type_error, "%c", f_string_eol);
+      fl_color_print(f_type_error, context.error, context.reset, "ERROR: the parameter '");
+      fl_color_print(f_type_error, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, parameter);
+      fl_color_print_line(f_type_error, context.error, context.reset, "' specified too many times.");
     }
   }
 #endif // _di_fake_print_error_parameter_too_many_
@@ -640,10 +640,10 @@ extern "C" {
       for (uint8_t i = 0; i < 4; i++) {
         if (data->parameters[parameters_id[i]].total > 1) {
           if (data->verbosity != fake_verbosity_quiet) {
-            fprintf(f_standard_error, "%c", f_string_eol);
-            fl_color_print(f_standard_error, data->context.error, data->context.reset, "ERROR: the operation '");
-            fl_color_print(f_standard_error, data->context.notable, data->context.reset, "%s", parameters_name[i]);
-            fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "' specified too many times.");
+            fprintf(f_type_error, "%c", f_string_eol);
+            fl_color_print(f_type_error, data->context.error, data->context.reset, "ERROR: the operation '");
+            fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s", parameters_name[i]);
+            fl_color_print_line(f_type_error, data->context.error, data->context.reset, "' specified too many times.");
           }
 
           return f_status_set_error(f_invalid_parameter);
@@ -697,10 +697,10 @@ extern "C" {
             if (f_status_is_error(status)) {
               if (status == f_status_set_error(f_string_too_large)) {
                 if (data->verbosity != fake_verbosity_quiet) {
-                  fprintf(f_standard_error, "%c", f_string_eol);
-                  fl_color_print(f_standard_error, data->context.error, data->context.reset, "ERROR: the parameter '");
-                  fl_color_print(f_standard_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, parameters_name[i]);
-                  fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "' is too long.");
+                  fprintf(f_type_error, "%c", f_string_eol);
+                  fl_color_print(f_type_error, data->context.error, data->context.reset, "ERROR: the parameter '");
+                  fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, parameters_name[i]);
+                  fl_color_print_line(f_type_error, data->context.error, data->context.reset, "' is too long.");
                 }
               }
               else {
@@ -716,10 +716,10 @@ extern "C" {
 
           if (length == 0 || status == f_no_data) {
             if (data->verbosity != fake_verbosity_quiet) {
-              fprintf(f_standard_error, "%c", f_string_eol);
-              fl_color_print(f_standard_error, data->context.error, data->context.reset, "ERROR: the parameter '");
-              fl_color_print(f_standard_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, parameters_name[i]);
-              fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "' must not be empty and must not contain only whitespace.");
+              fprintf(f_type_error, "%c", f_string_eol);
+              fl_color_print(f_type_error, data->context.error, data->context.reset, "ERROR: the parameter '");
+              fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, parameters_name[i]);
+              fl_color_print_line(f_type_error, data->context.error, data->context.reset, "' must not be empty and must not contain only whitespace.");
             }
           }
         }
@@ -793,10 +793,10 @@ extern "C" {
 
           if (f_status_is_error(status)) {
             if (fake_print_error(data->context, data->verbosity, f_status_set_fine(status), "fl_console_parameter_to_string_dynamic_directory", f_false) == f_unknown && data->verbosity != fake_verbosity_quiet) {
-              fprintf(f_standard_error, "%c", f_string_eol);
-              fl_color_print(f_standard_error, data->context.error, data->context.reset, "ERROR: failed to process parameter '");
-              fl_color_print(f_standard_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, parameters_name[i]);
-              fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "'.");
+              fprintf(f_type_error, "%c", f_string_eol);
+              fl_color_print(f_type_error, data->context.error, data->context.reset, "ERROR: failed to process parameter '");
+              fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, parameters_name[i]);
+              fl_color_print_line(f_type_error, data->context.error, data->context.reset, "'.");
             }
 
             return status;
@@ -807,10 +807,10 @@ extern "C" {
 
           if (f_status_is_error(status)) {
             if (fake_print_error(data->context, data->verbosity, f_status_set_fine(status), "f_macro_string_dynamic_new", f_false) == f_unknown && data->verbosity != fake_verbosity_quiet) {
-              fprintf(f_standard_error, "%c", f_string_eol);
-              fl_color_print(f_standard_error, data->context.error, data->context.reset, "ERROR: failed to load default for the parameter '");
-              fl_color_print(f_standard_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, parameters_name[i]);
-              fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "'.");
+              fprintf(f_type_error, "%c", f_string_eol);
+              fl_color_print(f_type_error, data->context.error, data->context.reset, "ERROR: failed to load default for the parameter '");
+              fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, parameters_name[i]);
+              fl_color_print_line(f_type_error, data->context.error, data->context.reset, "'.");
             }
 
             return status;
@@ -828,10 +828,10 @@ extern "C" {
       if (f_status_is_error(status)) {
         if (status == f_status_set_error(f_string_too_large)) {
           if (data->verbosity != fake_verbosity_quiet) {
-            fprintf(f_standard_error, "%c", f_string_eol);
-            fl_color_print(f_standard_error, data->context.error, data->context.reset, "ERROR: the (combined) parameter '");
-            fl_color_print(f_standard_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fake_long_defines);
-            fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "' is too long.");
+            fprintf(f_type_error, "%c", f_string_eol);
+            fl_color_print(f_type_error, data->context.error, data->context.reset, "ERROR: the (combined) parameter '");
+            fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fake_long_defines);
+            fl_color_print_line(f_type_error, data->context.error, data->context.reset, "' is too long.");
           }
         }
         else {
@@ -851,10 +851,10 @@ extern "C" {
 
       if (f_status_is_error(status)) {
         if (fake_print_error(data->context, data->verbosity, f_status_set_fine(status), "fll_program_parameter_additional_rip", f_false) == f_unknown && data->verbosity != fake_verbosity_quiet) {
-          fprintf(f_standard_error, "%c", f_string_eol);
-          fl_color_print(f_standard_error, data->context.error, data->context.reset, "ERROR: failed to process the parameter '");
-          fl_color_print(f_standard_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fake_long_mode);
-          fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "'.");
+          fprintf(f_type_error, "%c", f_string_eol);
+          fl_color_print(f_type_error, data->context.error, data->context.reset, "ERROR: failed to process the parameter '");
+          fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fake_long_mode);
+          fl_color_print_line(f_type_error, data->context.error, data->context.reset, "'.");
         }
 
         return status;
@@ -872,10 +872,10 @@ extern "C" {
 
           if (f_status_is_error(status)) {
             if (fake_print_error(data->context, data->verbosity, f_status_set_fine(status), "f_utf_is_word_dash_plus", f_false) == f_unknown && data->verbosity != fake_verbosity_quiet) {
-              fprintf(f_standard_error, "%c", f_string_eol);
-              fl_color_print(f_standard_error, data->context.error, data->context.reset, "ERROR: failed to process the parameter '");
-              fl_color_print(f_standard_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fake_long_mode);
-              fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "'.");
+              fprintf(f_type_error, "%c", f_string_eol);
+              fl_color_print(f_type_error, data->context.error, data->context.reset, "ERROR: failed to process the parameter '");
+              fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fake_long_mode);
+              fl_color_print_line(f_type_error, data->context.error, data->context.reset, "'.");
             }
 
             return status;
@@ -883,12 +883,12 @@ extern "C" {
 
           if (status == f_false) {
             if (data->verbosity != fake_verbosity_quiet) {
-              fprintf(f_standard_error, "%c", f_string_eol);
-              fl_color_print(f_standard_error, data->context.error, data->context.reset, "ERROR: the '");
-              fl_color_print(f_standard_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fake_long_mode);
-              fl_color_print(f_standard_error, data->context.error, data->context.reset, "' parameters value '");
-              fl_color_print(f_standard_error, data->context.notable, data->context.reset, "%s", data->mode.array[i].string);
-              fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "' contains non-word, non-dash, and non-plus characters.");
+              fprintf(f_type_error, "%c", f_string_eol);
+              fl_color_print(f_type_error, data->context.error, data->context.reset, "ERROR: the '");
+              fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fake_long_mode);
+              fl_color_print(f_type_error, data->context.error, data->context.reset, "' parameters value '");
+              fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s", data->mode.array[i].string);
+              fl_color_print_line(f_type_error, data->context.error, data->context.reset, "' contains non-word, non-dash, and non-plus characters.");
             }
 
             return f_status_set_error(f_invalid_parameter);
@@ -945,7 +945,7 @@ extern "C" {
       if (parameters_value[i]->used > 0) {
         memset(&directory_stat, 0, sizeof(struct stat));
 
-        status = f_file_stat(parameters_value[i]->string, &directory_stat);
+        status = f_file_stat(parameters_value[i]->string, f_true, &directory_stat);
 
         if (status == f_status_set_error(f_file_not_found)) status = f_status_set_error(f_directory_not_found);
 
@@ -957,10 +957,10 @@ extern "C" {
         }
       }
       else if (parameters_required[i]) {
-        fprintf(f_standard_error, "%c", f_string_eol);
-        fl_color_print(f_standard_error, data.context.error, data.context.reset, "ERROR: No valid path for the (required) directory parameter '");
-        fl_color_print(f_standard_error, data.context.notable, data.context.reset, "%s%s", f_console_symbol_long_enable, parameters_name[i]);
-        fl_color_print_line(f_standard_error, data.context.error, data.context.reset, "' was found.");
+        fprintf(f_type_error, "%c", f_string_eol);
+        fl_color_print(f_type_error, data.context.error, data.context.reset, "ERROR: No valid path for the (required) directory parameter '");
+        fl_color_print(f_type_error, data.context.notable, data.context.reset, "%s%s", f_console_symbol_long_enable, parameters_name[i]);
+        fl_color_print_line(f_type_error, data.context.error, data.context.reset, "' was found.");
 
         return f_status_set_error(f_directory_not_found);
       }
index 0848a4c34993f20820ebe5932a0f61f0e43d8233..9bc8b40c632b1cd6a95764722f753e46016d2efa 100644 (file)
@@ -12,7 +12,7 @@ extern "C" {
 
     if (data.verbosity != fake_verbosity_quiet) {
       printf("%c", f_string_eol);
-      fl_color_print_line(f_standard_output, data.context.important, data.context.reset, "Generating skeleton structure.");
+      fl_color_print_line(f_type_output, data.context.important, data.context.reset, "Generating skeleton structure.");
     }
 
     {
@@ -102,10 +102,10 @@ extern "C" {
 
     if (status == f_false) {
       if (data.verbosity != fake_verbosity_quiet) {
-        fprintf(f_standard_error, "%c", f_string_eol);
-        fl_color_print(f_standard_error, data.context.error, data.context.reset, "ERROR: The path '");
-        fl_color_print(f_standard_error, data.context.notable, data.context.reset, "%s", path.string);
-        fl_color_print_line(f_standard_error, data.context.error, data.context.reset, "' exists but is not a directory.");
+        fprintf(f_type_error, "%c", f_string_eol);
+        fl_color_print(f_type_error, data.context.error, data.context.reset, "ERROR: The path '");
+        fl_color_print(f_type_error, data.context.notable, data.context.reset, "%s", path.string);
+        fl_color_print_line(f_type_error, data.context.error, data.context.reset, "' exists but is not a directory.");
       }
 
       return f_status_set_warning(f_failure);
@@ -115,10 +115,10 @@ extern "C" {
 
       if (f_status_is_error(status)) {
         if (f_status_set_fine(status) == f_file_not_found) {
-          fprintf(f_standard_error, "%c", f_string_eol);
-          fl_color_print(f_standard_error, data.context.error, data.context.reset, "ERROR: The path '");
-          fl_color_print(f_standard_error, data.context.notable, data.context.reset, "%s", path.string);
-          fl_color_print_line(f_standard_error, data.context.error, data.context.reset, "' could not be created, a parent directory does not exist.");
+          fprintf(f_type_error, "%c", f_string_eol);
+          fl_color_print(f_type_error, data.context.error, data.context.reset, "ERROR: The path '");
+          fl_color_print(f_type_error, data.context.notable, data.context.reset, "%s", path.string);
+          fl_color_print_line(f_type_error, data.context.error, data.context.reset, "' could not be created, a parent directory does not exist.");
         }
         else {
           fake_print_error_file(data.context, data.verbosity, f_status_set_fine(status), "f_directory_create", path.string, "create", f_false, f_true);
@@ -182,14 +182,14 @@ extern "C" {
         mode = f_file_mode_all_rwx;
       }
 
-      status = f_file_create(path.string, mode, true);
+      status = f_file_create(path.string, mode, f_true, f_true);
 
       if (f_status_is_error(status)) {
         if (f_status_set_fine(status) == f_file_not_found) {
-          fprintf(f_standard_error, "%c", f_string_eol);
-          fl_color_print(f_standard_error, data.context.error, data.context.reset, "ERROR: The path '");
-          fl_color_print(f_standard_error, data.context.notable, data.context.reset, "%s", path.string);
-          fl_color_print_line(f_standard_error, data.context.error, data.context.reset, "' could not be created, a parent directory does not exist.");
+          fprintf(f_type_error, "%c", f_string_eol);
+          fl_color_print(f_type_error, data.context.error, data.context.reset, "ERROR: The file '");
+          fl_color_print(f_type_error, data.context.notable, data.context.reset, "%s", path.string);
+          fl_color_print_line(f_type_error, data.context.error, data.context.reset, "' could not be created, a parent directory does not exist.");
         }
         else {
           fake_print_error_file(data.context, data.verbosity, f_status_set_fine(status), "f_file_create", path.string, "create", f_true, f_true);
index 1c6701d44fce497e51aa95798d37ccc7a81c6ca4..0fed579bb98f10975320dce0d48a3ac56b58b88d 100644 (file)
@@ -26,26 +26,26 @@ extern "C" {
     #endif // _en_firewall_debug_
 
     printf("%c%c", f_string_eol, f_string_eol);
-    fl_color_print(f_standard_output, context.important, context.reset, " Available Commands: ");
+    fl_color_print(f_type_output, context.important, context.reset, " Available Commands: ");
 
     printf("%c  ", f_string_eol);
-    fl_color_print(f_standard_output, context.standout, context.reset, firewall_command_start);
+    fl_color_print(f_type_output, context.standout, context.reset, firewall_command_start);
     printf("    Turn on the firewall");
 
     printf("%c  ", f_string_eol);
-    fl_color_print(f_standard_output, context.standout, context.reset, firewall_command_stop);
+    fl_color_print(f_type_output, context.standout, context.reset, firewall_command_stop);
     printf("     Turn off the firewall");
 
     printf("%c  ", f_string_eol);
-    fl_color_print(f_standard_output, context.standout, context.reset, firewall_command_restart);
+    fl_color_print(f_type_output, context.standout, context.reset, firewall_command_restart);
     printf("  Turn off and then turn on the firewall");
 
     printf("%c  ", f_string_eol);
-    fl_color_print(f_standard_output, context.standout, context.reset, firewall_command_lock);
+    fl_color_print(f_type_output, context.standout, context.reset, firewall_command_lock);
     printf("     Prevent all communication");
 
     printf("%c  ", f_string_eol);
-    fl_color_print(f_standard_output, context.standout, context.reset, firewall_command_show);
+    fl_color_print(f_type_output, context.standout, context.reset, firewall_command_show);
     printf("     Show active firewall settings");
 
     fll_program_print_help_usage(context, firewall_name, "command");
@@ -162,7 +162,7 @@ extern "C" {
               if (strncmp("nat", arguments.argv[data->remaining.array[counter]], 4) != 0) {
                 if (strncmp("mangle",  arguments.argv[data->remaining.array[counter]], 7) != 0) {
                   if (strncmp("ports",  arguments.argv[data->remaining.array[counter]], 6) != 0) {
-                    fl_color_print_line(f_standard_warning, data->context.warning, data->context.reset, "WARNING: '%s' is not a valid show option", arguments.argv[data->remaining.array[counter]]);
+                    fl_color_print_line(f_type_warning, data->context.warning, data->context.reset, "WARNING: '%s' is not a valid show option", arguments.argv[data->remaining.array[counter]]);
                   }
                   else {
                     show_ports = f_true;
@@ -181,17 +181,17 @@ extern "C" {
           f_macro_string_dynamics_resize(status, parameters, 7);
 
           if (f_status_is_error(status)) {
-            fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "CRITICAL ERROR: Unable to allocate memory.");
+            fl_color_print_line(f_type_error, data->context.error, data->context.reset, "CRITICAL ERROR: Unable to allocate memory.");
             firewall_delete_local_data(&local);
             firewall_delete_data(data);
             return status;
           }
 
           if (show_nat) {
-            fl_color_print(f_standard_output, data->context.standout, data->context.reset, "=========================== ");
-            fl_color_print(f_standard_output, data->context.title, data->context.reset, "NAT");
-            fl_color_print_line(f_standard_output, data->context.standout, data->context.reset, " ============================");
-            fflush(f_standard_output);
+            fl_color_print(f_type_output, data->context.standout, data->context.reset, "=========================== ");
+            fl_color_print(f_type_output, data->context.title, data->context.reset, "NAT");
+            fl_color_print_line(f_type_output, data->context.standout, data->context.reset, " ============================");
+            fflush(f_type_output);
 
             parameters.used = 6;
 
@@ -211,15 +211,15 @@ extern "C" {
 
             status = fll_execute_program((f_string) firewall_tool_iptables, parameters, &results);
 
-            fprintf(f_standard_output, "\n");
-            fflush(f_standard_output);
+            fprintf(f_type_output, "\n");
+            fflush(f_type_output);
           }
 
           if (f_status_is_not_error(status) && show_mangle) {
-            fl_color_print(f_standard_output, data->context.standout, data->context.reset, "========================== ");
-            fl_color_print(f_standard_output, data->context.title, data->context.reset, "MANGLE");
-            fl_color_print_line(f_standard_output, data->context.standout, data->context.reset, " ==========================");
-            fflush(f_standard_output);
+            fl_color_print(f_type_output, data->context.standout, data->context.reset, "========================== ");
+            fl_color_print(f_type_output, data->context.title, data->context.reset, "MANGLE");
+            fl_color_print_line(f_type_output, data->context.standout, data->context.reset, " ==========================");
+            fflush(f_type_output);
 
             parameters.used = 6;
 
@@ -239,15 +239,15 @@ extern "C" {
 
             status = fll_execute_program((f_string) firewall_tool_iptables, parameters, &results);
 
-            fprintf(f_standard_output, "\n");
-            fflush(f_standard_output);
+            fprintf(f_type_output, "\n");
+            fflush(f_type_output);
           }
 
           if (f_status_is_not_error(status) && show_ports) {
-            fl_color_print(f_standard_output, data->context.standout, data->context.reset, "========================== ");
-            fl_color_print(f_standard_output, data->context.title, data->context.reset, "FILTER");
-            fl_color_print_line(f_standard_output, data->context.standout, data->context.reset, " ==========================");
-            fflush(f_standard_output);
+            fl_color_print(f_type_output, data->context.standout, data->context.reset, "========================== ");
+            fl_color_print(f_type_output, data->context.title, data->context.reset, "FILTER");
+            fl_color_print_line(f_type_output, data->context.standout, data->context.reset, " ==========================");
+            fflush(f_type_output);
 
             parameters.used = 4;
 
@@ -263,31 +263,31 @@ extern "C" {
 
             status = fll_execute_program((f_string) firewall_tool_iptables, parameters, &results);
 
-            fprintf(f_standard_output, "\n");
-            fflush(f_standard_output);
+            fprintf(f_type_output, "\n");
+            fflush(f_type_output);
           }
 
           if (f_status_is_error(status)) {
             status = f_status_set_fine(status);
 
             if (status == f_error_allocation || status == f_error_reallocation) {
-              fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "CRITICAL ERROR: Unable to allocate memory.");
+              fl_color_print_line(f_type_error, data->context.error, data->context.reset, "CRITICAL ERROR: Unable to allocate memory.");
             }
             else {
-              fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "ERROR: Failed to perform requested %s operation:", firewall_tool_iptables);
-              fprintf(f_standard_error, "  ");
+              fl_color_print_line(f_type_error, data->context.error, data->context.reset, "ERROR: Failed to perform requested %s operation:", firewall_tool_iptables);
+              fprintf(f_type_error, "  ");
 
               f_string_length i = 0;
 
-              fl_color_print_code(f_standard_error, data->context.error);
+              fl_color_print_code(f_type_error, data->context.error);
 
-              fprintf(f_standard_error, "%s ", firewall_tool_iptables);
+              fprintf(f_type_error, "%s ", firewall_tool_iptables);
               for (; i < parameters.used; i++) {
-                fprintf(f_standard_error, "%s ", parameters.array[i].string);
+                fprintf(f_type_error, "%s ", parameters.array[i].string);
               } // for
 
-              fl_color_print_code(f_standard_error, data->context.reset);
-              fprintf(f_standard_error, "\n");
+              fl_color_print_code(f_type_error, data->context.reset);
+              fprintf(f_type_error, "\n");
             }
 
             status = f_status_set_error(status);
@@ -321,13 +321,13 @@ extern "C" {
           status = f_status_set_fine(status);
 
           if (status == f_error_allocation || status == f_error_reallocation) {
-            fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "CRITICAL ERROR: Unable to allocate memory.");
+            fl_color_print_line(f_type_error, data->context.error, data->context.reset, "CRITICAL ERROR: Unable to allocate memory.");
           }
           else if (status == f_no_data) {
-            fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "ERROR: could not find any network devices");
+            fl_color_print_line(f_type_error, data->context.error, data->context.reset, "ERROR: could not find any network devices");
           }
           else if (status == f_failure) {
-            fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "ERROR: failed to read the device directory '%s'", network_devices);
+            fl_color_print_line(f_type_error, data->context.error, data->context.reset, "ERROR: failed to read the device directory '%s'", network_devices);
           }
 
           firewall_delete_local_data(&local);
@@ -410,7 +410,7 @@ extern "C" {
               return status;
             }
             else {
-              fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "ERROR: Failed to perform lock request because the lock instructions are missing from: %s.", network_path firewall_file_other);
+              fl_color_print_line(f_type_error, data->context.error, data->context.reset, "ERROR: Failed to perform lock request because the lock instructions are missing from: %s.", network_path firewall_file_other);
 
               firewall_delete_local_data(&local);
               firewall_delete_data(data);
@@ -450,7 +450,7 @@ extern "C" {
               }
             }
             else {
-              fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "ERROR: Failed to perform stop request because the lock instructions are missing from: %s.", network_path firewall_file_other);
+              fl_color_print_line(f_type_error, data->context.error, data->context.reset, "ERROR: Failed to perform stop request because the lock instructions are missing from: %s.", network_path firewall_file_other);
 
               firewall_delete_local_data(&local);
               firewall_delete_data(data);
@@ -527,7 +527,7 @@ extern "C" {
               f_macro_string_dynamic_resize(status, file_path, network_path_length + data->devices.array[i].used + firewall_file_suffix_length + 1);
 
               if (f_status_is_error(status)) {
-                fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "CRITICAL ERROR: Unable to allocate memory.");
+                fl_color_print_line(f_type_error, data->context.error, data->context.reset, "CRITICAL ERROR: Unable to allocate memory.");
                 firewall_delete_local_data(&local);
                 firewall_delete_data(data);
                 return status;
@@ -639,7 +639,7 @@ extern "C" {
         firewall_delete_local_data(&local);
       }
       else {
-        fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "ERROR: You did not pass a command");
+        fl_color_print_line(f_type_error, data->context.error, data->context.reset, "ERROR: You did not pass a command");
         status = f_status_set_error(f_invalid_parameter);
       }
     }
index 7eac47535e7fee185456dd9f6197fdc1a0a00811..9b0f4c91daa7a546a76d2655f5705563c878984e 100644 (file)
@@ -5,7 +5,7 @@ int main(const int argc, const f_string *argv) {
   const f_console_arguments arguments = { argc, argv };
   firewall_data data = firewall_data_initialize;
 
-  if (f_pipe_exists()) {
+  if (f_pipe_input_exists()) {
     data.process_pipe = f_true;
   }
 
index afc27fb7763ae34434b45a9b03220395cb082565..06d5c245c354c7603cda4b121af27cedeffb14e5 100644 (file)
@@ -72,7 +72,7 @@ f_return_status firewall_perform_commands(const firewall_local_data local, const
     if (length >= firewall_chain_length && fl_string_compare(local.buffer.string + local.rule_objects.array[i].start, (f_string) firewall_chain, length, firewall_chain_length) == f_equal_to) {
       if (chain == firewall_chain_custom_id) {
         // custom chains can only apply to themselves, so silently ignore chain commands specified within a custom chain.
-        fprintf(f_standard_warning, "WARNING: At line %i, the chain option is meaningle ss inside of a custom chain.", i);
+        fprintf(f_type_warning, "WARNING: At line %i, the chain option is meaningle ss inside of a custom chain.", i);
         continue;
       }
 
@@ -282,17 +282,17 @@ f_return_status firewall_perform_commands(const firewall_local_data local, const
     // process rule rule, if the remaining rule does not match as firewall_rule, then it is an invalid rule.
     else if (length < firewall_rule_length || fl_string_compare(local.buffer.string + local.rule_objects.array[i].start, (f_string) firewall_rule, length, firewall_rule_length) == f_not_equal_to) {
       if (length > 0) {
-        fl_color_print_code(f_standard_warning, data.context.warning);
-        fprintf(f_standard_warning, "WARNING: At line %i, the object '", i);
-        f_print_string(f_standard_warning, local.buffer.string + local.rule_objects.array[i].start, length);
-        fprintf(f_standard_warning, "' is invalid");
-        fl_color_print_code(f_standard_warning, data.context.reset);
+        fl_color_print_code(f_type_warning, data.context.warning);
+        fprintf(f_type_warning, "WARNING: At line %i, the object '", i);
+        f_print_string(f_type_warning, local.buffer.string + local.rule_objects.array[i].start, length);
+        fprintf(f_type_warning, "' is invalid");
+        fl_color_print_code(f_type_warning, data.context.reset);
       }
       else {
-        fprintf(f_standard_warning, "WARNING: At line %i, the object is missing", i);
+        fprintf(f_type_warning, "WARNING: At line %i, the object is missing", i);
       }
 
-      fprintf(f_standard_warning, "\n");
+      fprintf(f_type_warning, "\n");
       continue;
     }
 
@@ -300,17 +300,17 @@ f_return_status firewall_perform_commands(const firewall_local_data local, const
       length = firewall_macro_structure_size(local.rule_objects, i);
 
       if (length > 0) {
-        fl_color_print_code(f_standard_warning, data.context.warning);
-        fprintf(f_standard_warning, "WARNING: At line %i, the object '", i);
-        f_print_string(f_standard_warning, local.buffer.string + local.rule_objects.array[i].start, length);
-        fprintf(f_standard_warning, "' has invalid content '");
-        f_print_string(f_standard_warning, local.buffer.string + local.rule_contents.array[i].array[0].start, firewall_macro_structure_size(local.rule_contents.array[i], 0));
-        fprintf(f_standard_warning, "'");
-        fl_color_print_code(f_standard_warning, data.context.reset);
-        fprintf(f_standard_warning, "\n");
+        fl_color_print_code(f_type_warning, data.context.warning);
+        fprintf(f_type_warning, "WARNING: At line %i, the object '", i);
+        f_print_string(f_type_warning, local.buffer.string + local.rule_objects.array[i].start, length);
+        fprintf(f_type_warning, "' has invalid content '");
+        f_print_string(f_type_warning, local.buffer.string + local.rule_contents.array[i].array[0].start, firewall_macro_structure_size(local.rule_contents.array[i], 0));
+        fprintf(f_type_warning, "'");
+        fl_color_print_code(f_type_warning, data.context.reset);
+        fprintf(f_type_warning, "\n");
       }
       else {
-        fl_color_print_line(f_standard_warning, data.context.warning, data.context.reset, "WARNING: At line %i, the object has no content", i);
+        fl_color_print_line(f_type_warning, data.context.warning, data.context.reset, "WARNING: At line %i, the object has no content", i);
       }
 
       continue;
@@ -550,12 +550,12 @@ f_return_status firewall_perform_commands(const firewall_local_data local, const
       else {
         length = firewall_macro_structure_size(local.rule_objects, i);
 
-        fl_color_print_code(f_standard_warning, data.context.warning);
-        fprintf(f_standard_warning, "WARNING: At line %i, the object '", i);
-        f_print_string(f_standard_warning, local.buffer.string + local.rule_objects.array[i].start, length);
-        fprintf(f_standard_warning, "' has no content");
-        fl_color_print_code(f_standard_warning, data.context.reset);
-        fprintf(f_standard_warning, "\n");
+        fl_color_print_code(f_type_warning, data.context.warning);
+        fprintf(f_type_warning, "WARNING: At line %i, the object '", i);
+        f_print_string(f_type_warning, local.buffer.string + local.rule_objects.array[i].start, length);
+        fprintf(f_type_warning, "' has no content");
+        fl_color_print_code(f_type_warning, data.context.reset);
+        fprintf(f_type_warning, "\n");
 
         break;
       }
@@ -578,67 +578,67 @@ f_return_status firewall_perform_commands(const firewall_local_data local, const
             file_path.used = file_path.size;
             file_path.string[file_path.used] = 0;
 
-            status = f_file_open(&file, file_path.string);
+            status = f_file_open(file_path.string, 0, &file);
           }
 
           if (f_status_is_error(status)) {
             status = f_status_set_fine(status);
 
             if (status == f_invalid_parameter) {
-              fl_color_print_line(f_standard_error, data.context.error, data.context.reset, "INTERNAL ERROR: Invalid parameter when calling f_file_open()");
+              fl_color_print_line(f_type_error, data.context.error, data.context.reset, "INTERNAL ERROR: Invalid parameter when calling f_file_open()");
             }
             else if (status == f_file_not_found) {
               // the file does not have to exist
-              fl_color_print_line(f_standard_warning, data.context.warning, data.context.reset, "WARNING: Cannot find the file '%.*s'", file_path.used, file_path.string);
+              fl_color_print_line(f_type_warning, data.context.warning, data.context.reset, "WARNING: Cannot find the file '%.*s'", file_path.used, file_path.string);
               status = f_none;
             }
             else if (status == f_file_error_open) {
-              fl_color_print_line(f_standard_error, data.context.error, data.context.reset, "ERROR: Unable to open the file '%.*s'", file_path.used, file_path.string);
+              fl_color_print_line(f_type_error, data.context.error, data.context.reset, "ERROR: Unable to open the file '%.*s'", file_path.used, file_path.string);
             }
             else if (status == f_file_error_descriptor) {
-              fl_color_print_line(f_standard_error, data.context.error, data.context.reset, "ERROR: File descriptor error while trying to open the file '%.*s'", file_path.used, file_path.string);
+              fl_color_print_line(f_type_error, data.context.error, data.context.reset, "ERROR: File descriptor error while trying to open the file '%.*s'", file_path.used, file_path.string);
             }
             else if (status == f_error_allocation || status == f_error_reallocation) {
-              fl_color_print_line(f_standard_error, data.context.error, data.context.reset, "CRITICAL ERROR: Unable to allocate memory.");
+              fl_color_print_line(f_type_error, data.context.error, data.context.reset, "CRITICAL ERROR: Unable to allocate memory.");
             }
             else {
-              fl_color_print_line(f_standard_error, data.context.error, data.context.reset, "INTERNAL ERROR: An unhandled error (%u) has occurred while calling f_file_open()", status);
+              fl_color_print_line(f_type_error, data.context.error, data.context.reset, "INTERNAL ERROR: An unhandled error (%u) has occurred while calling f_file_open()", status);
             }
 
             if (status != f_file_not_found) {
               status = f_status_set_error(status);
             }
 
-            f_file_close(&file);
+            f_file_close(&file.id);
           }
           else {
-            status = f_file_read(&file, &local_buffer);
+            status = f_file_read(file, &local_buffer);
 
-            f_file_close(&file);
+            f_file_close(&file.id);
 
             if (f_status_is_error(status)) {
               status = f_status_set_fine(status);
 
               if (status == f_invalid_parameter) {
-                fl_color_print_line(f_standard_error, data.context.error, data.context.reset, "INTERNAL ERROR: Invalid parameter when calling fl_file_read_position()");
+                fl_color_print_line(f_type_error, data.context.error, data.context.reset, "INTERNAL ERROR: Invalid parameter when calling f_file_read()");
               }
               else if (status == f_number_overflow) {
-                fl_color_print_line(f_standard_error, data.context.error, data.context.reset, "ERROR: Integer overflow while trying to buffer the file '%.*s'", file_path.used, file_path.string);
+                fl_color_print_line(f_type_error, data.context.error, data.context.reset, "ERROR: Integer overflow while trying to buffer the file '%.*s'", file_path.used, file_path.string);
               }
               else if (status == f_file_not_open) {
-                fl_color_print_line(f_standard_error, data.context.error, data.context.reset, "INTERNAL ERROR: The file '%.*s' is no longer open", file_path.used, file_path.string);
+                fl_color_print_line(f_type_error, data.context.error, data.context.reset, "INTERNAL ERROR: The file '%.*s' is no longer open", file_path.used, file_path.string);
               }
               else if (status == f_file_error_seek) {
-                fl_color_print_line(f_standard_error, data.context.error, data.context.reset, "ERROR: A seek error occurred while accessing the file '%.*s'", file_path.used, file_path.string);
+                fl_color_print_line(f_type_error, data.context.error, data.context.reset, "ERROR: A seek error occurred while accessing the file '%.*s'", file_path.used, file_path.string);
               }
               else if (status == f_file_error_read) {
-                fl_color_print_line(f_standard_error, data.context.error, data.context.reset, "ERROR: A read error occurred while accessing the file '%.*s'", file_path.used, file_path.string);
+                fl_color_print_line(f_type_error, data.context.error, data.context.reset, "ERROR: A read error occurred while accessing the file '%.*s'", file_path.used, file_path.string);
               }
               else if (status == f_error_allocation || status == f_error_reallocation) {
-                fl_color_print_line(f_standard_error, data.context.error, data.context.reset, "CRITICAL ERROR: Unable to allocate memory.");
+                fl_color_print_line(f_type_error, data.context.error, data.context.reset, "CRITICAL ERROR: Unable to allocate memory.");
               }
               else {
-                fl_color_print_line(f_standard_error, data.context.error, data.context.reset, "INTERNAL ERROR: An unhandled error (%u) has occurred while calling fl_file_read_position()", status);
+                fl_color_print_line(f_type_error, data.context.error, data.context.reset, "INTERNAL ERROR: An unhandled error (%u) has occurred while calling f_file_read()", status);
               }
 
               status = f_status_set_error(status);
@@ -656,16 +656,16 @@ f_return_status firewall_perform_commands(const firewall_local_data local, const
                 status = f_status_set_fine(status);
 
                 if (status == f_invalid_parameter) {
-                  fl_color_print_line(f_standard_error, data.context.error, data.context.reset, "INTERNAL ERROR: Invalid parameter when calling fll_fss_basic_read() for the file '%.*s'", file_path.used, file_path.string);
+                  fl_color_print_line(f_type_error, data.context.error, data.context.reset, "INTERNAL ERROR: Invalid parameter when calling fll_fss_basic_read() for the file '%.*s'", file_path.used, file_path.string);
                 }
                 else if (status == f_no_data_on_eos || status == f_no_data || status == f_no_data_on_stop) {
                   // empty files are to be silently ignored
                 }
                 else if (status == f_error_allocation || status == f_error_reallocation) {
-                  fl_color_print_line(f_standard_error, data.context.error, data.context.reset, "CRITICAL ERROR: Unable to allocate memory.");
+                  fl_color_print_line(f_type_error, data.context.error, data.context.reset, "CRITICAL ERROR: Unable to allocate memory.");
                 }
                 else {
-                  fl_color_print_line(f_standard_error, data.context.error, data.context.reset, "INTERNAL ERROR: An unhandled error (%u) has occurred while calling fll_fss_basic_read() for the file '%.*s'", status, file_path.used, file_path.string);
+                  fl_color_print_line(f_type_error, data.context.error, data.context.reset, "INTERNAL ERROR: An unhandled error (%u) has occurred while calling fll_fss_basic_read() for the file '%.*s'", status, file_path.used, file_path.string);
                 }
 
                 status = f_status_set_error(status);
@@ -698,7 +698,7 @@ f_return_status firewall_perform_commands(const firewall_local_data local, const
                 }
 
                 if (f_status_is_error(status)) {
-                  fl_color_print_line(f_standard_error, data.context.error, data.context.reset, "CRITICAL ERROR: Unable to allocate memory.");
+                  fl_color_print_line(f_type_error, data.context.error, data.context.reset, "CRITICAL ERROR: Unable to allocate memory.");
 
                   f_macro_string_dynamic_delete_simple(ip_list_action);
                 }
@@ -718,7 +718,7 @@ f_return_status firewall_perform_commands(const firewall_local_data local, const
                     f_macro_string_dynamic_new(status, ip_argument, ip_length);
 
                     if (f_status_is_error(status)) {
-                      fl_color_print_line(f_standard_error, data.context.error, data.context.reset, "CRITICAL ERROR: Unable to allocate memory.");
+                      fl_color_print_line(f_type_error, data.context.error, data.context.reset, "CRITICAL ERROR: Unable to allocate memory.");
                       break;
                     }
 
@@ -731,33 +731,33 @@ f_return_status firewall_perform_commands(const firewall_local_data local, const
                     // print command when debugging.
                     #ifdef _en_firewall_debug_
                       if (data.parameters[firewall_parameter_debug].result == f_console_result_found) {
-                        fl_color_print_code(f_standard_debug, data.context.warning);
-                        fprintf(f_standard_debug, "%s ", current_tool);
+                        fl_color_print_code(f_type_debug, data.context.warning);
+                        fprintf(f_type_debug, "%s ", current_tool);
 
                         for (f_string_length i = 0; i < arguments.used; i++) {
-                          fprintf(f_standard_debug, "%.*s ", arguments.array[i].used, arguments.array[i].string);
+                          fprintf(f_type_debug, "%.*s ", arguments.array[i].used, arguments.array[i].string);
                         } // for
 
-                        fl_color_print_code(f_standard_debug, data.context.reset);
-                        fprintf(f_standard_debug, "\n");
+                        fl_color_print_code(f_type_debug, data.context.reset);
+                        fprintf(f_type_debug, "\n");
                       }
                     #endif // _en_firewall_debug_
 
                     status = fll_execute_program((f_string) current_tool, arguments, &results);
 
                     if (status == f_failure) {
-                      fl_color_print_line(f_standard_error, data.context.error, data.context.reset, "ERROR: Failed to perform requested %s operation:", current_tool);
-                      fprintf(f_standard_error, "  ");
+                      fl_color_print_line(f_type_error, data.context.error, data.context.reset, "ERROR: Failed to perform requested %s operation:", current_tool);
+                      fprintf(f_type_error, "  ");
 
-                      fl_color_print_code(f_standard_error, data.context.error);
+                      fl_color_print_code(f_type_error, data.context.error);
 
-                      fprintf(f_standard_error, "%s ", current_tool);
+                      fprintf(f_type_error, "%s ", current_tool);
                       for (f_string_length i = 0; i < arguments.used; i++) {
-                        fprintf(f_standard_error, "%.*s ", arguments.array[i].used, arguments.array[i].string);
+                        fprintf(f_type_error, "%.*s ", arguments.array[i].used, arguments.array[i].string);
                       } // for
 
-                      fl_color_print_code(f_standard_error, data.context.reset);
-                      fprintf(f_standard_error, "\n");
+                      fl_color_print_code(f_type_error, data.context.reset);
+                      fprintf(f_type_error, "\n");
 
                       // remove ip_argument from arguments string.
                       f_macro_string_dynamic_delete_simple(arguments.array[arguments.used]);
@@ -766,7 +766,7 @@ f_return_status firewall_perform_commands(const firewall_local_data local, const
                       break;
                     }
                     else if (status == f_invalid_parameter) {
-                      fl_color_print_line(f_standard_error, data.context.error, data.context.reset, "INTERNAL ERROR: Invalid parameter when calling fll_execute_program()");
+                      fl_color_print_line(f_type_error, data.context.error, data.context.reset, "INTERNAL ERROR: Invalid parameter when calling fll_execute_program()");
 
                       // remove ip_argument from arguments string.
                       f_macro_string_dynamic_delete_simple(arguments.array[arguments.used]);
@@ -801,37 +801,37 @@ f_return_status firewall_perform_commands(const firewall_local_data local, const
           // print command when debugging.
           #ifdef _en_firewall_debug_
             if (data.parameters[firewall_parameter_debug].result == f_console_result_found) {
-              fl_color_print_code(f_standard_debug, data.context.warning);
-              fprintf(f_standard_debug, "%s ", current_tool);
+              fl_color_print_code(f_type_debug, data.context.warning);
+              fprintf(f_type_debug, "%s ", current_tool);
 
               for (f_string_length i = 0; i < arguments.used; i++) {
-                fprintf(f_standard_debug, "%.*s ", arguments.array[i].used, arguments.array[i].string);
+                fprintf(f_type_debug, "%.*s ", arguments.array[i].used, arguments.array[i].string);
               } // for
 
-              fl_color_print_code(f_standard_debug, data.context.reset);
-              fprintf(f_standard_debug, "\n");
+              fl_color_print_code(f_type_debug, data.context.reset);
+              fprintf(f_type_debug, "\n");
             }
           #endif // _en_firewall_debug_
 
           status = fll_execute_program(current_tool, arguments, &results);
 
           if (status == f_failure) {
-            fl_color_print_line(f_standard_error, data.context.error, data.context.reset, "ERROR: Failed to perform requested %s operation:", current_tool);
-            fprintf(f_standard_error, "  ");
-            fl_color_print_code(f_standard_error, data.context.error);
+            fl_color_print_line(f_type_error, data.context.error, data.context.reset, "ERROR: Failed to perform requested %s operation:", current_tool);
+            fprintf(f_type_error, "  ");
+            fl_color_print_code(f_type_error, data.context.error);
 
-            fprintf(f_standard_error, "%s ", current_tool);
+            fprintf(f_type_error, "%s ", current_tool);
             for (f_string_length i = 0; i < arguments.used; i++) {
-              fprintf(f_standard_error, "%.*s ", arguments.array[i].used, arguments.array[i].string);
+              fprintf(f_type_error, "%.*s ", arguments.array[i].used, arguments.array[i].string);
             } // for
 
-            fl_color_print_code(f_standard_error, data.context.reset);
-            fprintf(f_standard_error, "\n");
+            fl_color_print_code(f_type_error, data.context.reset);
+            fprintf(f_type_error, "\n");
 
             break;
           }
           else if (status == f_invalid_parameter) {
-            fl_color_print_line(f_standard_error, data.context.error, data.context.reset, "INTERNAL ERROR: Invalid parameter when calling fll_execute_program()");
+            fl_color_print_line(f_type_error, data.context.error, data.context.reset, "INTERNAL ERROR: Invalid parameter when calling fll_execute_program()");
             break;
           }
         }
@@ -1041,15 +1041,15 @@ f_return_status firewall_create_custom_chains(firewall_reserved_chains *reserved
         // print command when debugging.
         #ifdef _en_firewall_debug_
           if (data->parameters[firewall_parameter_debug].result == f_console_result_found) {
-            fl_color_print_code(f_standard_debug, data->context.warning);
-            fprintf(f_standard_debug, "%s ", firewall_tool_iptables);
+            fl_color_print_code(f_type_debug, data->context.warning);
+            fprintf(f_type_debug, "%s ", firewall_tool_iptables);
 
             for (f_string_length i = 0; i < arguments.used; i++) {
-              fprintf(f_standard_debug, "%.*s ", arguments.array[i].used, arguments.array[i].string);
+              fprintf(f_type_debug, "%.*s ", arguments.array[i].used, arguments.array[i].string);
             } // for
 
-            fl_color_print_code(f_standard_debug, data->context.reset);
-            fprintf(f_standard_debug, "\n");
+            fl_color_print_code(f_type_debug, data->context.reset);
+            fprintf(f_type_debug, "\n");
           }
         #endif // _en_firewall_debug_
 
@@ -1060,15 +1060,15 @@ f_return_status firewall_create_custom_chains(firewall_reserved_chains *reserved
           // print command when debugging.
           #ifdef _en_firewall_debug_
             if (data->parameters[firewall_parameter_debug].result == f_console_result_found) {
-              fl_color_print_code(f_standard_debug, data->context.warning);
-              fprintf(f_standard_debug, "%s ", firewall_tool_ip6tables);
+              fl_color_print_code(f_type_debug, data->context.warning);
+              fprintf(f_type_debug, "%s ", firewall_tool_ip6tables);
 
               for (f_string_length i = 0; i < arguments.used; i++) {
-                fprintf(f_standard_debug, "%.*s ", arguments.array[i].used, arguments.array[i].string);
+                fprintf(f_type_debug, "%.*s ", arguments.array[i].used, arguments.array[i].string);
               } // for
 
-              fl_color_print_code(f_standard_debug, data->context.reset);
-              fprintf(f_standard_debug, "\n");
+              fl_color_print_code(f_type_debug, data->context.reset);
+              fprintf(f_type_debug, "\n");
             }
           #endif // _en_firewall_debug_
 
@@ -1081,34 +1081,34 @@ f_return_status firewall_create_custom_chains(firewall_reserved_chains *reserved
 
           if (status == f_failure) {
             if (tool == firewall_program_iptables) {
-              fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "ERROR: Failed to perform requested %s operation:", firewall_tool_iptables);
+              fl_color_print_line(f_type_error, data->context.error, data->context.reset, "ERROR: Failed to perform requested %s operation:", firewall_tool_iptables);
             }
             else if (tool == firewall_program_ip6tables) {
-              fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "ERROR: Failed to perform requested %s operation:", firewall_tool_ip6tables);
+              fl_color_print_line(f_type_error, data->context.error, data->context.reset, "ERROR: Failed to perform requested %s operation:", firewall_tool_ip6tables);
             }
 
-            fprintf(f_standard_error, "  ");
-            fl_color_print_code(f_standard_error, data->context.error);
+            fprintf(f_type_error, "  ");
+            fl_color_print_code(f_type_error, data->context.error);
 
             if (tool == firewall_program_iptables) {
-              fprintf(f_standard_error, "%s ", firewall_tool_iptables);
+              fprintf(f_type_error, "%s ", firewall_tool_iptables);
             }
             else if (tool == firewall_program_ip6tables) {
-              fprintf(f_standard_error, "%s ", firewall_tool_ip6tables);
+              fprintf(f_type_error, "%s ", firewall_tool_ip6tables);
             }
 
             for (f_string_length i = 0; i < arguments.used; i++) {
-              fprintf(f_standard_error, "%.*s ", arguments.array[i].used, arguments.array[i].string);
+              fprintf(f_type_error, "%.*s ", arguments.array[i].used, arguments.array[i].string);
             } // for
 
-            fl_color_print_code(f_standard_error, data->context.reset);
-            fprintf(f_standard_error, "\n");
+            fl_color_print_code(f_type_error, data->context.reset);
+            fprintf(f_type_error, "\n");
           }
           else if (status == f_invalid_parameter) {
-            fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "INTERNAL ERROR: Invalid parameter when calling fll_execute_program()");
+            fl_color_print_line(f_type_error, data->context.error, data->context.reset, "INTERNAL ERROR: Invalid parameter when calling fll_execute_program()");
           }
           else {
-            fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "INTERNAL ERROR: An unhandled error (%u) has occurred while calling fll_execute_program()", status);
+            fl_color_print_line(f_type_error, data->context.error, data->context.reset, "INTERNAL ERROR: An unhandled error (%u) has occurred while calling fll_execute_program()", status);
           }
 
           f_macro_string_dynamics_delete_simple(arguments);
@@ -1147,15 +1147,15 @@ f_return_status firewall_delete_chains(const firewall_data data) {
     // print command when debugging.
     #ifdef _en_firewall_debug_
       if (data.parameters[firewall_parameter_debug].result == f_console_result_found) {
-        fl_color_print_code(f_standard_debug, data.context.warning);
-        fprintf(f_standard_debug, "%s ", tools[i]);
+        fl_color_print_code(f_type_debug, data.context.warning);
+        fprintf(f_type_debug, "%s ", tools[i]);
 
         for (f_string_length i = 0; i < arguments.used; i++) {
-          fprintf(f_standard_debug, "%.*s ", arguments.array[i].used, arguments.array[i].string);
+          fprintf(f_type_debug, "%.*s ", arguments.array[i].used, arguments.array[i].string);
         } // for
 
-        fl_color_print_code(f_standard_debug, data.context.reset);
-        fprintf(f_standard_debug, "\n");
+        fl_color_print_code(f_type_debug, data.context.reset);
+        fprintf(f_type_debug, "\n");
       }
     #endif // _en_firewall_debug_
 
@@ -1165,24 +1165,24 @@ f_return_status firewall_delete_chains(const firewall_data data) {
       status = f_status_set_fine(status);
 
       if (status == f_failure) {
-        fl_color_print_line(f_standard_error, data.context.error, data.context.reset, "ERROR: Failed to perform requested %s operation:", tools[i]);
+        fl_color_print_line(f_type_error, data.context.error, data.context.reset, "ERROR: Failed to perform requested %s operation:", tools[i]);
 
-        fprintf(f_standard_error, "  ");
-        fl_color_print_code(f_standard_error, data.context.error);
+        fprintf(f_type_error, "  ");
+        fl_color_print_code(f_type_error, data.context.error);
 
-        fprintf(f_standard_error, "%s ", tools[i]);
+        fprintf(f_type_error, "%s ", tools[i]);
         for (f_string_length i = 0; i < arguments.used; i++) {
-          fprintf(f_standard_error, "%.*s ", arguments.array[i].used, arguments.array[i].string);
+          fprintf(f_type_error, "%.*s ", arguments.array[i].used, arguments.array[i].string);
         } // for
 
-        fl_color_print_code(f_standard_error, data.context.reset);
-        fprintf(f_standard_error, "\n");
+        fl_color_print_code(f_type_error, data.context.reset);
+        fprintf(f_type_error, "\n");
       }
       else if (status == f_invalid_parameter) {
-        fl_color_print_line(f_standard_error, data.context.error, data.context.reset, "INTERNAL ERROR: Invalid parameter when calling fll_execute_program()");
+        fl_color_print_line(f_type_error, data.context.error, data.context.reset, "INTERNAL ERROR: Invalid parameter when calling fll_execute_program()");
       }
       else {
-        fl_color_print_line(f_standard_error, data.context.error, data.context.reset, "INTERNAL ERROR: An unhandled error (%u) has occurred while calling fll_execute_program()", status);
+        fl_color_print_line(f_type_error, data.context.error, data.context.reset, "INTERNAL ERROR: An unhandled error (%u) has occurred while calling fll_execute_program()", status);
       }
 
       return status;
@@ -1205,15 +1205,15 @@ f_return_status firewall_delete_chains(const firewall_data data) {
     // print command when debugging.
     #ifdef _en_firewall_debug_
       if (data.parameters[firewall_parameter_debug].result == f_console_result_found) {
-        fl_color_print_code(f_standard_debug, data.context.warning);
-        fprintf(f_standard_debug, "%s ", tools[i]);
+        fl_color_print_code(f_type_debug, data.context.warning);
+        fprintf(f_type_debug, "%s ", tools[i]);
 
         for (f_string_length j = 0; j < arguments.used; j++) {
-          fprintf(f_standard_debug, "%.*s ", arguments.array[j].used, arguments.array[j].string);
+          fprintf(f_type_debug, "%.*s ", arguments.array[j].used, arguments.array[j].string);
         } // for
 
-        fl_color_print_code(f_standard_debug, data.context.reset);
-        fprintf(f_standard_debug, "\n");
+        fl_color_print_code(f_type_debug, data.context.reset);
+        fprintf(f_type_debug, "\n");
       }
     #endif // _en_firewall_debug_
 
@@ -1223,24 +1223,24 @@ f_return_status firewall_delete_chains(const firewall_data data) {
       status = f_status_set_fine(status);
 
       if (status == f_failure) {
-        fl_color_print_line(f_standard_error, data.context.error, data.context.reset, "ERROR: Failed to perform requested %s operation:", tools[i]);
+        fl_color_print_line(f_type_error, data.context.error, data.context.reset, "ERROR: Failed to perform requested %s operation:", tools[i]);
 
-        fprintf(f_standard_error, "  ");
-        fl_color_print_code(f_standard_error, data.context.error);
+        fprintf(f_type_error, "  ");
+        fl_color_print_code(f_type_error, data.context.error);
 
-        fprintf(f_standard_error, "%s ", tools[i]);
+        fprintf(f_type_error, "%s ", tools[i]);
         for (f_string_length j = 0; j < arguments.used; j++) {
-          fprintf(f_standard_error, "%.*s ", arguments.array[j].used, arguments.array[j].string);
+          fprintf(f_type_error, "%.*s ", arguments.array[j].used, arguments.array[j].string);
         } // for
 
-        fl_color_print_code(f_standard_error, data.context.reset);
-        fprintf(f_standard_error, "\n");
+        fl_color_print_code(f_type_error, data.context.reset);
+        fprintf(f_type_error, "\n");
       }
       else if (status == f_invalid_parameter) {
-        fl_color_print_line(f_standard_error, data.context.error, data.context.reset, "INTERNAL ERROR: Invalid parameter when calling fll_execute_program()");
+        fl_color_print_line(f_type_error, data.context.error, data.context.reset, "INTERNAL ERROR: Invalid parameter when calling fll_execute_program()");
       }
       else {
-        fl_color_print_line(f_standard_error, data.context.error, data.context.reset, "INTERNAL ERROR: An unhandled error (%u) has occurred while calling fll_execute_program()", status);
+        fl_color_print_line(f_type_error, data.context.error, data.context.reset, "INTERNAL ERROR: An unhandled error (%u) has occurred while calling fll_execute_program()", status);
       }
 
       return status;
@@ -1284,15 +1284,15 @@ f_return_status firewall_default_lock(const firewall_data data) {
       // print command when debugging.
       #ifdef _en_firewall_debug_
         if (data.parameters[firewall_parameter_debug].result == f_console_result_found) {
-          fl_color_print_code(f_standard_debug, data.context.warning);
-          fprintf(f_standard_debug, "%s ", tools[j]);
+          fl_color_print_code(f_type_debug, data.context.warning);
+          fprintf(f_type_debug, "%s ", tools[j]);
 
           for (f_string_length k = 0; k < arguments.used; k++) {
-            fprintf(f_standard_debug, "%.*s ", arguments.array[k].used, arguments.array[k].string);
+            fprintf(f_type_debug, "%.*s ", arguments.array[k].used, arguments.array[k].string);
           } // for
 
-          fl_color_print_code(f_standard_debug, data.context.reset);
-          fprintf(f_standard_debug, "\n");
+          fl_color_print_code(f_type_debug, data.context.reset);
+          fprintf(f_type_debug, "\n");
         }
       #endif // _en_firewall_debug_
 
@@ -1302,24 +1302,24 @@ f_return_status firewall_default_lock(const firewall_data data) {
         status = f_status_set_fine(status);
 
         if (status == f_failure) {
-          fl_color_print_line(f_standard_error, data.context.error, data.context.reset, "ERROR: Failed to perform requested %s operation:", tools[j]);
+          fl_color_print_line(f_type_error, data.context.error, data.context.reset, "ERROR: Failed to perform requested %s operation:", tools[j]);
 
-          fprintf(f_standard_error, "  ");
-          fl_color_print_code(f_standard_error, data.context.error);
+          fprintf(f_type_error, "  ");
+          fl_color_print_code(f_type_error, data.context.error);
 
-          fprintf(f_standard_error, "%s ", tools[j]);
+          fprintf(f_type_error, "%s ", tools[j]);
           for (f_string_length k = 0; k < arguments.used; k++) {
-            fprintf(f_standard_error, "%.*s ", arguments.array[k].used, arguments.array[k].string);
+            fprintf(f_type_error, "%.*s ", arguments.array[k].used, arguments.array[k].string);
           } // for
 
-          fl_color_print_code(f_standard_error, data.context.reset);
-          fprintf(f_standard_error, "\n");
+          fl_color_print_code(f_type_error, data.context.reset);
+          fprintf(f_type_error, "\n");
         }
         else if (status == f_invalid_parameter) {
-          fl_color_print_line(f_standard_error, data.context.error, data.context.reset, "INTERNAL ERROR: Invalid parameter when calling fll_execute_program()");
+          fl_color_print_line(f_type_error, data.context.error, data.context.reset, "INTERNAL ERROR: Invalid parameter when calling fll_execute_program()");
         }
         else {
-          fl_color_print_line(f_standard_error, data.context.error, data.context.reset, "INTERNAL ERROR: An unhandled error (%u) has occurred while calling fll_execute_program()", status);
+          fl_color_print_line(f_type_error, data.context.error, data.context.reset, "INTERNAL ERROR: An unhandled error (%u) has occurred while calling fll_execute_program()", status);
         }
 
         return status;
@@ -1334,66 +1334,66 @@ f_return_status firewall_buffer_rules(const f_string filename, const bool option
   f_file file = f_file_initialize;
   f_status status = f_none;
 
-  status = f_file_open(&file, filename);
+  status = f_file_open(filename, 0, &file);
 
   if (f_status_is_error(status)) {
     status = f_status_set_fine(status);
 
     if (optional) {
       if (status == f_invalid_parameter) {
-        fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "INTERNAL ERROR: Invalid parameter when calling f_file_open().");
+        fl_color_print_line(f_type_error, data->context.error, data->context.reset, "INTERNAL ERROR: Invalid parameter when calling f_file_open().");
       }
       else if (status != f_file_not_found && status != f_file_error_open && status != f_file_error_descriptor) {
-        fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "INTERNAL ERROR: An unhandled error (%u) has occurred while calling f_file_open().", status);
+        fl_color_print_line(f_type_error, data->context.error, data->context.reset, "INTERNAL ERROR: An unhandled error (%u) has occurred while calling f_file_open().", status);
       }
     } else {
       if (status == f_invalid_parameter) {
-        fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "INTERNAL ERROR: Invalid parameter when calling f_file_open().");
+        fl_color_print_line(f_type_error, data->context.error, data->context.reset, "INTERNAL ERROR: Invalid parameter when calling f_file_open().");
       }
       else if (status == f_file_not_found) {
-        fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "ERROR: Unable to find the file '%s'.", filename);
+        fl_color_print_line(f_type_error, data->context.error, data->context.reset, "ERROR: Unable to find the file '%s'.", filename);
       }
       else if (status == f_file_error_open) {
-        fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "ERROR: Unable to open the file '%s'.", filename);
+        fl_color_print_line(f_type_error, data->context.error, data->context.reset, "ERROR: Unable to open the file '%s'.", filename);
       }
       else if (status == f_file_error_descriptor) {
-        fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "ERROR: File descriptor error while trying to open the file '%s'.", filename);
+        fl_color_print_line(f_type_error, data->context.error, data->context.reset, "ERROR: File descriptor error while trying to open the file '%s'.", filename);
       }
       else {
-        fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "INTERNAL ERROR: An unhandled error (%u) has occurred while calling f_file_open().", status);
+        fl_color_print_line(f_type_error, data->context.error, data->context.reset, "INTERNAL ERROR: An unhandled error (%u) has occurred while calling f_file_open().", status);
       }
     }
 
     return status;
   }
 
-  status = f_file_read(&file, &local->buffer);
+  status = f_file_read(file, &local->buffer);
 
-  f_file_close(&file);
+  f_file_close(&file.id);
 
   if (f_status_is_error(status)) {
     status = f_status_set_fine(status);
 
     if (status == f_invalid_parameter) {
-      fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "INTERNAL ERROR: Invalid parameter when calling fl_file_read_position().");
+      fl_color_print_line(f_type_error, data->context.error, data->context.reset, "INTERNAL ERROR: Invalid parameter when calling f_file_read().");
     }
     else if (status == f_number_overflow) {
-      fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "ERROR: Integer overflow while trying to buffer the file '%s'.", filename);
+      fl_color_print_line(f_type_error, data->context.error, data->context.reset, "ERROR: Integer overflow while trying to buffer the file '%s'.", filename);
     }
     else if (status == f_file_not_open) {
-      fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "INTERNAL ERROR: The file '%s' is no longer open.", filename);
+      fl_color_print_line(f_type_error, data->context.error, data->context.reset, "INTERNAL ERROR: The file '%s' is no longer open.", filename);
     }
     else if (status == f_file_error_seek) {
-      fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "ERROR: A seek error occurred while accessing the file '%s'.", filename);
+      fl_color_print_line(f_type_error, data->context.error, data->context.reset, "ERROR: A seek error occurred while accessing the file '%s'.", filename);
     }
     else if (status == f_file_error_read) {
-      fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "ERROR: A read error occurred while accessing the file '%s'.", filename);
+      fl_color_print_line(f_type_error, data->context.error, data->context.reset, "ERROR: A read error occurred while accessing the file '%s'.", filename);
     }
     else if (status == f_error_allocation || status == f_error_reallocation) {
-      fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "CRITICAL ERROR: Unable to allocate memory.");
+      fl_color_print_line(f_type_error, data->context.error, data->context.reset, "CRITICAL ERROR: Unable to allocate memory.");
     }
     else {
-      fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "INTERNAL ERROR: An unhandled error (%u) has occurred while calling fl_file_read_position().", status);
+      fl_color_print_line(f_type_error, data->context.error, data->context.reset, "INTERNAL ERROR: An unhandled error (%u) has occurred while calling f_file_read().", status);
     }
 
     return status;
@@ -1410,16 +1410,16 @@ f_return_status firewall_buffer_rules(const f_string filename, const bool option
     status = f_status_set_fine(status);
 
     if (status == f_invalid_parameter) {
-      fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "INTERNAL ERROR: Invalid parameter when calling fll_fss_basic_list_read() for the file '%s'.", filename);
+      fl_color_print_line(f_type_error, data->context.error, data->context.reset, "INTERNAL ERROR: Invalid parameter when calling fll_fss_basic_list_read() for the file '%s'.", filename);
     }
     else if (status == f_no_data_on_eos || status == f_no_data || status == f_no_data_on_stop) {
-      fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "ERROR: No relevant data was found within the file '%s'.", filename);
+      fl_color_print_line(f_type_error, data->context.error, data->context.reset, "ERROR: No relevant data was found within the file '%s'.", filename);
     }
     else if (status == f_error_allocation || status == f_error_reallocation) {
-      fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "CRITICAL ERROR: Unable to allocate memory.");
+      fl_color_print_line(f_type_error, data->context.error, data->context.reset, "CRITICAL ERROR: Unable to allocate memory.");
     }
     else {
-      fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "INTERNAL ERROR: An unhandled error (%u) has occurred while calling fll_fss_basic_list_read() for the file '%s'.", status, filename);
+      fl_color_print_line(f_type_error, data->context.error, data->context.reset, "INTERNAL ERROR: An unhandled error (%u) has occurred while calling fll_fss_basic_list_read() for the file '%s'.", status, filename);
     }
 
     return status;
@@ -1440,13 +1440,13 @@ f_return_status firewall_process_rules(f_string_range *input, firewall_local_dat
       status = f_status_set_fine(status);
 
       if (status == f_error_allocation || status == f_error_reallocation) {
-        fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "CRITICAL ERROR: Unable to allocate memory.");
+        fl_color_print_line(f_type_error, data->context.error, data->context.reset, "CRITICAL ERROR: Unable to allocate memory.");
       }
       else if (status == f_failure) {
         // the error message has already been displayed.
       }
       else {
-        fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "INTERNAL ERROR: An unhandled error (%u) has occurred while calling firewall_perform_commands().", status);
+        fl_color_print_line(f_type_error, data->context.error, data->context.reset, "INTERNAL ERROR: An unhandled error (%u) has occurred while calling firewall_perform_commands().", status);
       }
 
       f_macro_fss_objects_delete_simple(local->rule_objects);
index 2127eeef3d660a280a56d1fd469be14d21499c99..e9e7517ccccbeabe11494490083d4a19875d058d 100644 (file)
@@ -85,7 +85,7 @@ typedef struct {
   (structure.array[index].stop - structure.array[index].start) + 1
 
 // TODO: temporarily added, convert this to a function below.
-// TODO: also report: fl_color_print_line(f_standard_error, data.context.error, data.context.reset, "CRITICAL ERROR: Unable to allocate memory.");
+// TODO: also report: fl_color_print_line(f_type_error, data.context.error, data.context.reset, "CRITICAL ERROR: Unable to allocate memory.");
 #define firewall_macro_append_argument_to_arguments(status, arguments, argument) \
   if (arguments.used >= arguments.size) { \
     f_macro_string_dynamics_resize(status, arguments, arguments.used + firewall_default_allocation_step); \
index 8da900bfc742b20c517f6b199a7def1e1c08713c..247877d6942cd2a23067e7c24a999ead7391a6bd 100644 (file)
@@ -29,7 +29,7 @@ extern "C" {
 
     fll_program_print_help_usage(context, fss_basic_list_read_name, "filename(s)");
 
-    fl_color_print(f_standard_output, context.important, context.reset, " Notes:");
+    fl_color_print(f_type_output, context.important, context.reset, " Notes:");
 
     printf("%c", f_string_eol, f_string_eol);
 
@@ -38,27 +38,27 @@ extern "C" {
     printf("%c", f_string_eol);
 
     printf("  When using the ");
-    fl_color_print(f_standard_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_depth);
+    fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_depth);
     printf(" option, an order of operations is enforced on the parameters.%c", f_string_eol);
 
     printf("  When this order of operations is in effect, parameters to the right of a depth parameter are influenced by that depth parameter:%c", f_string_eol);
 
     printf("    ");
-    fl_color_print(f_standard_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_at);
+    fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_at);
     printf(": An object index at the specified depth.%c", f_string_eol);
 
     printf("    ");
-    fl_color_print(f_standard_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_depth);
+    fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_depth);
     printf(": A new depth within the specified depth, indexed from the root.%c", f_string_eol);
 
     printf("    ");
-    fl_color_print(f_standard_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_name);
+    fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_name);
     printf(": An object name at the specified depth.%c", f_string_eol);
 
     printf("%c", f_string_eol);
 
     printf("  The parameter ");
-    fl_color_print(f_standard_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_depth);
+    fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_depth);
     printf(" must be in numeric order, but values in between may be skipped.%c", f_string_eol);
     printf("    ('-d 0 -a 1 -d 2 -a 2' would specify index 1 at depth 0, any index at depth 1, and index 2 at depth 2.)%c", f_string_eol);
     printf("    ('-d 2 -a 1 -d 0 -a 2' would be invalid because depth 2 is before depth 1.)%c", f_string_eol);
@@ -66,53 +66,53 @@ extern "C" {
     printf("%c", f_string_eol);
 
     printf("  The parameter ");
-    fl_color_print(f_standard_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_select);
+    fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_select);
     printf(" selects a content index at a given depth.%c", f_string_eol);
     printf("    (This parameter is not synonymous with the depth parameter and does not relate to nested content).%c", f_string_eol);
 
     printf("%c", f_string_eol);
 
     printf("  Specify both ");
-    fl_color_print(f_standard_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_object);
+    fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_object);
     printf(" and the ");
-    fl_color_print(f_standard_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_total);
+    fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_total);
     printf(" parameters to get the total objects.%c", f_string_eol);
 
     printf("%c", f_string_eol);
 
     printf("  When both ");
-    fl_color_print(f_standard_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_at);
+    fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_at);
     printf(" and ");
-    fl_color_print(f_standard_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_name);
+    fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_name);
     printf(" parameters are specified (at the same depth), the ");
-    fl_color_print(f_standard_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_at);
+    fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_at);
     printf(" parameter value will be treated as a position relative to the specified ");
-    fl_color_print(f_standard_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_name);
+    fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_name);
     printf(" parameter value.%c", f_string_eol);
 
     printf("%c", f_string_eol);
 
     printf("  This program may support parameters, such as ");
-    fl_color_print(f_standard_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_depth);
+    fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_depth);
     printf(" or ");
-    fl_color_print(f_standard_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_select);
+    fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_select);
     printf(", even if not supported by the standard.%c", f_string_eol);
     printf("  This is done to help ensure consistency for scripting.%c", f_string_eol);
 
     printf("%c", f_string_eol);
 
     printf("  For parameters like ");
-    fl_color_print(f_standard_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_depth);
+    fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_depth);
     printf(", if the standard doesn't support nested content, then only a depth of 0 would be valid.%c", f_string_eol);
 
     printf("  For parameters like ");
-    fl_color_print(f_standard_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_select);
+    fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_select);
     printf(", if the standard doesn't support multiple content groups, then only a select of 0 would be valid.%c", f_string_eol);
 
     printf("%c", f_string_eol);
 
     printf("  The parameter ");
-    fl_color_print(f_standard_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_trim);
+    fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_trim);
     printf(" will remove leading and trailing whitespaces when selecting objects or when printing objects.%c", f_string_eol);
 
     printf("%c", f_string_eol);
@@ -148,45 +148,45 @@ extern "C" {
     }
     else if (data->remaining.used > 0 || data->process_pipe) {
       if (data->parameters[fss_basic_list_read_parameter_at].result == f_console_result_found) {
-        fl_color_print(f_standard_error, data->context.error, data->context.reset, "ERROR: The parameter '");
-        fl_color_print(f_standard_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_at);
-        fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "' requires a positive number.");
+        fl_color_print(f_type_error, data->context.error, data->context.reset, "ERROR: The parameter '");
+        fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_at);
+        fl_color_print_line(f_type_error, data->context.error, data->context.reset, "' requires a positive number.");
 
         fss_basic_list_read_delete_data(data);
         return f_status_set_error(f_invalid_parameter);
       }
 
       if (data->parameters[fss_basic_list_read_parameter_depth].result == f_console_result_found) {
-        fl_color_print(f_standard_error, data->context.error, data->context.reset, "ERROR: The parameter '");
-        fl_color_print(f_standard_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_depth);
-        fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "' requires a positive number.");
+        fl_color_print(f_type_error, data->context.error, data->context.reset, "ERROR: The parameter '");
+        fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_depth);
+        fl_color_print_line(f_type_error, data->context.error, data->context.reset, "' requires a positive number.");
 
         fss_basic_list_read_delete_data(data);
         return f_status_set_error(f_invalid_parameter);
       }
 
       if (data->parameters[fss_basic_list_read_parameter_line].result == f_console_result_found) {
-        fl_color_print(f_standard_error, data->context.error, data->context.reset, "ERROR: The parameter '");
-        fl_color_print(f_standard_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_line);
-        fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "' requires a positive number.");
+        fl_color_print(f_type_error, data->context.error, data->context.reset, "ERROR: The parameter '");
+        fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_line);
+        fl_color_print_line(f_type_error, data->context.error, data->context.reset, "' requires a positive number.");
 
         fss_basic_list_read_delete_data(data);
         return f_status_set_error(f_invalid_parameter);
       }
 
       if (data->parameters[fss_basic_list_read_parameter_name].result == f_console_result_found) {
-        fl_color_print(f_standard_error, data->context.error, data->context.reset, "ERROR: The parameter '");
-        fl_color_print(f_standard_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_name);
-        fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "' requires a string.");
+        fl_color_print(f_type_error, data->context.error, data->context.reset, "ERROR: The parameter '");
+        fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_name);
+        fl_color_print_line(f_type_error, data->context.error, data->context.reset, "' requires a string.");
 
         fss_basic_list_read_delete_data(data);
         return f_status_set_error(f_invalid_parameter);
       }
 
       if (data->parameters[fss_basic_list_read_parameter_select].result == f_console_result_found) {
-        fl_color_print(f_standard_error, data->context.error, data->context.reset, "ERROR: The parameter '");
-        fl_color_print(f_standard_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_select);
-        fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "' requires a positive number.");
+        fl_color_print(f_type_error, data->context.error, data->context.reset, "ERROR: The parameter '");
+        fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_select);
+        fl_color_print_line(f_type_error, data->context.error, data->context.reset, "' requires a positive number.");
 
         fss_basic_list_read_delete_data(data);
         return f_status_set_error(f_invalid_parameter);
@@ -194,22 +194,22 @@ extern "C" {
 
       if (data->parameters[fss_basic_list_read_parameter_object].result == f_console_result_found) {
         if (data->parameters[fss_basic_list_read_parameter_line].result == f_console_result_additional) {
-          fl_color_print(f_standard_error, data->context.error, data->context.reset, "ERROR: Cannot specify the '");
-          fl_color_print(f_standard_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_object);
-          fl_color_print(f_standard_error, data->context.error, data->context.reset, "' parameter with the '");
-          fl_color_print(f_standard_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_line);
-          fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "' parameter.");
+          fl_color_print(f_type_error, data->context.error, data->context.reset, "ERROR: Cannot specify the '");
+          fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_object);
+          fl_color_print(f_type_error, data->context.error, data->context.reset, "' parameter with the '");
+          fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_line);
+          fl_color_print_line(f_type_error, data->context.error, data->context.reset, "' parameter.");
 
           fss_basic_list_read_delete_data(data);
           return f_status_set_error(f_invalid_parameter);
         }
 
         if (data->parameters[fss_basic_list_read_parameter_select].result == f_console_result_additional) {
-          fl_color_print(f_standard_error, data->context.error, data->context.reset, "ERROR: Cannot specify the '");
-          fl_color_print(f_standard_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_object);
-          fl_color_print(f_standard_error, data->context.error, data->context.reset, "' parameter with the '");
-          fl_color_print(f_standard_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_select);
-          fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "' parameter.");
+          fl_color_print(f_type_error, data->context.error, data->context.reset, "ERROR: Cannot specify the '");
+          fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_object);
+          fl_color_print(f_type_error, data->context.error, data->context.reset, "' parameter with the '");
+          fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_select);
+          fl_color_print_line(f_type_error, data->context.error, data->context.reset, "' parameter.");
 
           fss_basic_list_read_delete_data(data);
           return f_status_set_error(f_invalid_parameter);
@@ -218,11 +218,11 @@ extern "C" {
 
       if (data->parameters[fss_basic_list_read_parameter_line].result == f_console_result_additional) {
         if (data->parameters[fss_basic_list_read_parameter_total].result == f_console_result_found) {
-          fl_color_print(f_standard_error, data->context.error, data->context.reset, "ERROR: Cannot specify the '");
-          fl_color_print(f_standard_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_line);
-          fl_color_print(f_standard_error, data->context.error, data->context.reset, "' parameter with the '");
-          fl_color_print(f_standard_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_total);
-          fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "' parameter.");
+          fl_color_print(f_type_error, data->context.error, data->context.reset, "ERROR: Cannot specify the '");
+          fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_line);
+          fl_color_print(f_type_error, data->context.error, data->context.reset, "' parameter with the '");
+          fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_total);
+          fl_color_print_line(f_type_error, data->context.error, data->context.reset, "' parameter.");
 
           fss_basic_list_read_delete_data(data);
           return f_status_set_error(f_invalid_parameter);
@@ -232,7 +232,7 @@ extern "C" {
       fss_basic_list_read_depths depths = fss_basic_list_read_depths_initialize;
 
       f_string_length counter = 0;
-      f_string_length original_size = data->file_position.total;
+      f_string_length original_size = data->quantity.total;
 
       status = fss_basic_list_read_main_preprocess_depth(arguments, *data, &depths);
       if (f_status_is_error(status)) {
@@ -246,7 +246,7 @@ extern "C" {
         macro_fss_basic_list_read_depths_delete_simple(depths);
 
         if (data->parameters[fss_basic_list_read_parameter_total].result == f_console_result_found) {
-          fprintf(f_standard_output, "0%c", f_string_eol);
+          fprintf(f_type_output, "0%c", f_string_eol);
 
           fss_basic_list_read_delete_data(data);
           return f_none;
@@ -257,9 +257,9 @@ extern "C" {
       }
 
       if (data->parameters[fss_basic_list_read_parameter_select].result == f_console_result_found) {
-        fl_color_print(f_standard_error, data->context.error, data->context.reset, "ERROR: the '");
-        fl_color_print(f_standard_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_select);
-        fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "' parameter requires a positive number.");
+        fl_color_print(f_type_error, data->context.error, data->context.reset, "ERROR: the '");
+        fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_select);
+        fl_color_print_line(f_type_error, data->context.error, data->context.reset, "' parameter requires a positive number.");
 
         macro_fss_basic_list_read_depths_delete_simple(depths);
         fss_basic_list_read_delete_data(data);
@@ -269,9 +269,9 @@ extern "C" {
       if (data->process_pipe) {
         f_file file = f_file_initialize;
 
-        file.address = f_pipe;
+        file.id = f_type_descriptor_input;
 
-        status = fl_file_read(&file, &data->buffer);
+        status = f_file_read(file, &data->buffer);
 
         if (f_status_is_error(status)) {
           fss_basic_list_read_print_file_error(data->context, "fl_file_read", "-", f_status_set_fine(status));
@@ -299,9 +299,9 @@ extern "C" {
         for (; counter < data->remaining.used; counter++) {
           f_file file = f_file_initialize;
 
-          status = f_file_open(&file, arguments.argv[data->remaining.array[counter]]);
+          status = f_file_open(arguments.argv[data->remaining.array[counter]], 0, &file);
 
-          data->file_position.total = original_size;
+          data->quantity.total = original_size;
 
           if (f_status_is_error(status)) {
             fss_basic_list_read_print_file_error(data->context, "f_file_open", arguments.argv[data->remaining.array[counter]], f_status_set_fine(status));
@@ -310,26 +310,28 @@ extern "C" {
             return status;
           }
 
-          if (data->file_position.total == 0) {
-            fseek(file.address, 0, SEEK_END);
+          if (data->quantity.total == 0) {
+            status = f_file_size_by_id(file.id, &data->quantity.total);
 
-            data->file_position.total = ftell(file.address);
+            if (f_status_is_error(status)) {
+              fss_basic_list_read_print_file_error(data->context, "f_file_size_by_id", arguments.argv[data->remaining.array[counter]], f_status_set_fine(status));
+              macro_fss_basic_list_read_depths_delete_simple(depths);
+              fss_basic_list_read_delete_data(data);
+            }
 
             // Skip past empty files.
-            if (data->file_position.total == 0) {
-              f_file_close(&file);
+            if (data->quantity.total == 0) {
+              f_file_close(&file.id);
               continue;
             }
-
-            fseek(file.address, 0, SEEK_SET);
           }
 
-          status = fl_file_read_position(&file, &data->buffer, data->file_position);
+          status = f_file_read_until(file, &data->buffer, data->quantity.total);
 
-          f_file_close(&file);
+          f_file_close(&file.id);
 
           if (f_status_is_error(status)) {
-            fss_basic_list_read_print_file_error(data->context, "fl_file_read_position", arguments.argv[data->remaining.array[counter]], f_status_set_fine(status));
+            fss_basic_list_read_print_file_error(data->context, "f_file_read_until", arguments.argv[data->remaining.array[counter]], f_status_set_fine(status));
             macro_fss_basic_list_read_depths_delete_simple(depths);
             fss_basic_list_read_delete_data(data);
             return status;
@@ -353,7 +355,7 @@ extern "C" {
       macro_fss_basic_list_read_depths_delete_simple(depths);
     }
     else {
-      fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "ERROR: you failed to specify one or more files.");
+      fl_color_print_line(f_type_error, data->context.error, data->context.reset, "ERROR: you failed to specify one or more files.");
       status = f_status_set_error(f_invalid_parameter);
     }
 
index 4ccd184139ceb3ab93cdcca799986f1f2280a988..3b2ab3c4bd2987be056c4edf8d4c207daa9bc223 100644 (file)
@@ -4,7 +4,7 @@ int main(const unsigned long argc, const f_string *argv) {
   const f_console_arguments arguments = { argc, argv };
   fss_basic_list_read_data data = fss_basic_list_read_data_initialize;
 
-  if (f_pipe_exists()) {
+  if (f_pipe_input_exists()) {
     data.process_pipe = f_true;
   }
 
index 5e939781b8356b011bf1972251c8d2f231aad175..95a49c65d014bdb45528a899437ed87f180e5ea7 100644 (file)
@@ -8,12 +8,12 @@ extern "C" {
 #ifndef _di_fss_basic_list_read_print_file_error_
   void fss_basic_list_read_print_file_error(const fl_color_context context, const f_string function_name, const f_string file_name, const f_status status) {
 
-    if (fll_file_error_print(f_standard_error, context, function_name, file_name, status) == f_false) {
-      fl_color_print(f_standard_error, context.error, context.reset, "INTERNAL ERROR: An unhandled error (");
-      fl_color_print(f_standard_error, context.notable, context.reset, "%u", status);
-      fl_color_print(f_standard_error, context.error, context.reset, ") has occurred while calling ");
-      fl_color_print(f_standard_error, context.notable, context.reset, "%s()", function_name);
-      fl_color_print_line(f_standard_error, context.error, context.reset, ".");
+    if (fll_file_error_print(f_type_error, context, function_name, file_name, status) == f_false) {
+      fl_color_print(f_type_error, context.error, context.reset, "INTERNAL ERROR: An unhandled error (");
+      fl_color_print(f_type_error, context.notable, context.reset, "%u", status);
+      fl_color_print(f_type_error, context.error, context.reset, ") has occurred while calling ");
+      fl_color_print(f_type_error, context.notable, context.reset, "%s()", function_name);
+      fl_color_print_line(f_type_error, context.error, context.reset, ".");
     }
   }
 #endif // _di_fss_basic_list_read_print_file_error_
@@ -22,62 +22,62 @@ extern "C" {
   void fss_basic_list_read_print_number_argument_error(const fl_color_context context, const f_string function_name, const f_string parameter_name, const f_string argument, const f_status status) {
 
     if (status == f_invalid_parameter) {
-      fl_color_print(f_standard_error, context.error, context.reset, "INTERNAL ERROR: Invalid parameter when calling ");
-      fl_color_print(f_standard_error, context.notable, context.reset, "%s()", function_name);
-      fl_color_print_line(f_standard_error, context.error, context.reset, ".");
+      fl_color_print(f_type_error, context.error, context.reset, "INTERNAL ERROR: Invalid parameter when calling ");
+      fl_color_print(f_type_error, context.notable, context.reset, "%s()", function_name);
+      fl_color_print_line(f_type_error, context.error, context.reset, ".");
     }
     else if (status == f_number_invalid) {
-      fl_color_print(f_standard_error, context.error, context.reset, "ERROR: The argument '");
-      fl_color_print(f_standard_error, context.notable, context.reset, "%s", argument);
-      fl_color_print(f_standard_error, context.error, context.reset, "' is not a valid number for the parameter '");
-      fl_color_print(f_standard_error, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, parameter_name);
-      fl_color_print_line(f_standard_error, context.error, context.reset, "'.");
+      fl_color_print(f_type_error, context.error, context.reset, "ERROR: The argument '");
+      fl_color_print(f_type_error, context.notable, context.reset, "%s", argument);
+      fl_color_print(f_type_error, context.error, context.reset, "' is not a valid number for the parameter '");
+      fl_color_print(f_type_error, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, parameter_name);
+      fl_color_print_line(f_type_error, context.error, context.reset, "'.");
     }
     else if (status == f_number_underflow) {
-      fl_color_print(f_standard_error, context.error, context.reset, "ERROR: The argument '");
-      fl_color_print(f_standard_error, context.notable, context.reset, "%s", argument);
-      fl_color_print(f_standard_error, context.error, context.reset, "' is too small for the parameter '");
-      fl_color_print(f_standard_error, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, parameter_name);
-      fl_color_print_line(f_standard_error, context.error, context.reset, "'.");
+      fl_color_print(f_type_error, context.error, context.reset, "ERROR: The argument '");
+      fl_color_print(f_type_error, context.notable, context.reset, "%s", argument);
+      fl_color_print(f_type_error, context.error, context.reset, "' is too small for the parameter '");
+      fl_color_print(f_type_error, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, parameter_name);
+      fl_color_print_line(f_type_error, context.error, context.reset, "'.");
     }
     else if (status == f_number_overflow) {
-      fl_color_print(f_standard_error, context.error, context.reset, "ERROR: The argument '");
-      fl_color_print(f_standard_error, context.notable, context.reset, "%s", argument);
-      fl_color_print(f_standard_error, context.error, context.reset, "' is too large for the parameter '");
-      fl_color_print(f_standard_error, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, parameter_name);
-      fl_color_print_line(f_standard_error, context.error, context.reset, "'.");
+      fl_color_print(f_type_error, context.error, context.reset, "ERROR: The argument '");
+      fl_color_print(f_type_error, context.notable, context.reset, "%s", argument);
+      fl_color_print(f_type_error, context.error, context.reset, "' is too large for the parameter '");
+      fl_color_print(f_type_error, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, parameter_name);
+      fl_color_print_line(f_type_error, context.error, context.reset, "'.");
     }
     else if (status == f_number_negative) {
-      fl_color_print(f_standard_error, context.error, context.reset, "ERROR: The argument '");
-      fl_color_print(f_standard_error, context.notable, context.reset, "%s", argument);
-      fl_color_print(f_standard_error, context.error, context.reset, "' is negative, which is not allowed for the parameter '");
-      fl_color_print(f_standard_error, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, parameter_name);
-      fl_color_print_line(f_standard_error, context.error, context.reset, "'.");
+      fl_color_print(f_type_error, context.error, context.reset, "ERROR: The argument '");
+      fl_color_print(f_type_error, context.notable, context.reset, "%s", argument);
+      fl_color_print(f_type_error, context.error, context.reset, "' is negative, which is not allowed for the parameter '");
+      fl_color_print(f_type_error, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, parameter_name);
+      fl_color_print_line(f_type_error, context.error, context.reset, "'.");
     }
     else if (status == f_number_positive) {
-      fl_color_print(f_standard_error, context.error, context.reset, "ERROR: The argument '");
-      fl_color_print(f_standard_error, context.notable, context.reset, "%s", argument);
-      fl_color_print(f_standard_error, context.error, context.reset, "' contains a '");
-      fl_color_print(f_standard_error, context.notable, context.reset, "+");
-      fl_color_print(f_standard_error, context.error, context.reset, "', which is not allowed for the parameter '");
-      fl_color_print(f_standard_error, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, parameter_name);
-      fl_color_print_line(f_standard_error, context.error, context.reset, "'.");
+      fl_color_print(f_type_error, context.error, context.reset, "ERROR: The argument '");
+      fl_color_print(f_type_error, context.notable, context.reset, "%s", argument);
+      fl_color_print(f_type_error, context.error, context.reset, "' contains a '");
+      fl_color_print(f_type_error, context.notable, context.reset, "+");
+      fl_color_print(f_type_error, context.error, context.reset, "', which is not allowed for the parameter '");
+      fl_color_print(f_type_error, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, parameter_name);
+      fl_color_print_line(f_type_error, context.error, context.reset, "'.");
     }
     else if (status == f_no_data) {
-      fl_color_print(f_standard_error, context.error, context.reset, "ERROR: The parameter '");
-      fl_color_print(f_standard_error, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, parameter_name);
-      fl_color_print_line(f_standard_error, context.error, context.reset, "' must not be an empty string.");
+      fl_color_print(f_type_error, context.error, context.reset, "ERROR: The parameter '");
+      fl_color_print(f_type_error, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, parameter_name);
+      fl_color_print_line(f_type_error, context.error, context.reset, "' must not be an empty string.");
     }
     else {
-      fl_color_print(f_standard_error, context.error, context.reset, "INTERNAL ERROR: An unhandled error (");
-      fl_color_print(f_standard_error, context.notable, context.reset, "%u", status);
-      fl_color_print(f_standard_error, context.error, context.reset, ") has occurred while calling ");
-      fl_color_print(f_standard_error, context.notable, context.reset, "%s()", function_name);
-      fl_color_print(f_standard_error, context.error, context.reset, "' for the parameter '");
-      fl_color_print(f_standard_error, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, parameter_name);
-      fl_color_print(f_standard_error, context.error, context.reset, "' with the value '");
-      fl_color_print(f_standard_error, context.notable, context.reset, "%s", argument);
-      fl_color_print_line(f_standard_error, context.error, context.reset, "'.");
+      fl_color_print(f_type_error, context.error, context.reset, "INTERNAL ERROR: An unhandled error (");
+      fl_color_print(f_type_error, context.notable, context.reset, "%u", status);
+      fl_color_print(f_type_error, context.error, context.reset, ") has occurred while calling ");
+      fl_color_print(f_type_error, context.notable, context.reset, "%s()", function_name);
+      fl_color_print(f_type_error, context.error, context.reset, "' for the parameter '");
+      fl_color_print(f_type_error, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, parameter_name);
+      fl_color_print(f_type_error, context.error, context.reset, "' with the value '");
+      fl_color_print(f_type_error, context.notable, context.reset, "%s", argument);
+      fl_color_print_line(f_type_error, context.error, context.reset, "'.");
     }
   }
 #endif // _di_fss_basic_list_read_print_number_argument_error_
@@ -95,7 +95,7 @@ extern "C" {
 
       macro_fss_basic_list_read_depths_new(status, (*depths), depth_size);
       if (f_status_is_error(status)) {
-        fl_color_print_line(f_standard_error, data.context.error, data.context.reset, "CRITICAL ERROR: Unable to allocate memory.");
+        fl_color_print_line(f_type_error, data.context.error, data.context.reset, "CRITICAL ERROR: Unable to allocate memory.");
         return status;
       }
 
@@ -173,12 +173,12 @@ extern "C" {
 
             // @todo: move error printing into common function.
             if (status_code == f_error_allocation || status_code == f_error_reallocation) {
-              fl_color_print_line(f_standard_error, data.context.error, data.context.reset, "CRITICAL ERROR: Unable to allocate memory.");
+              fl_color_print_line(f_type_error, data.context.error, data.context.reset, "CRITICAL ERROR: Unable to allocate memory.");
             }
             else if (status_code == f_string_length_size) {
-              fl_color_print(f_standard_error, data.context.error, data.context.reset, "ERROR: Unable to process '");
-              fl_color_print(f_standard_error, data.context.notable, data.context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_trim);
-              fl_color_print_line(f_standard_error, data.context.error, data.context.reset, "' because the maximum buffer size was reached.");
+              fl_color_print(f_type_error, data.context.error, data.context.reset, "ERROR: Unable to process '");
+              fl_color_print(f_type_error, data.context.notable, data.context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_trim);
+              fl_color_print_line(f_type_error, data.context.error, data.context.reset, "' because the maximum buffer size was reached.");
             }
             else {
               f_string function = "fl_string_append";
@@ -187,20 +187,20 @@ extern "C" {
                 function = "fl_string_rip";
               }
 
-              fl_color_print(f_standard_error, data.context.error, data.context.reset, "INTERNAL ERROR: An unhandled error (");
-              fl_color_print(f_standard_error, data.context.notable, data.context.reset, "%u", status_code);
-              fl_color_print(f_standard_error, data.context.error, data.context.reset, ") has occurred while calling ");
-              fl_color_print(f_standard_error, data.context.notable, data.context.reset, "%s()", function);
-              fl_color_print_line(f_standard_error, data.context.error, data.context.reset, ".");
+              fl_color_print(f_type_error, data.context.error, data.context.reset, "INTERNAL ERROR: An unhandled error (");
+              fl_color_print(f_type_error, data.context.notable, data.context.reset, "%u", status_code);
+              fl_color_print(f_type_error, data.context.error, data.context.reset, ") has occurred while calling ");
+              fl_color_print(f_type_error, data.context.notable, data.context.reset, "%s()", function);
+              fl_color_print_line(f_type_error, data.context.error, data.context.reset, ".");
             }
 
             return status;
           }
 
           if (depths->array[i].value_name.used == 0) {
-            fl_color_print(f_standard_error, data.context.error, data.context.reset, "ERROR: The '");
-            fl_color_print(f_standard_error, data.context.notable, data.context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_name);
-            fl_color_print_line(f_standard_error, data.context.error, data.context.reset, "' must not be an empty string.");
+            fl_color_print(f_type_error, data.context.error, data.context.reset, "ERROR: The '");
+            fl_color_print(f_type_error, data.context.notable, data.context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_name);
+            fl_color_print_line(f_type_error, data.context.error, data.context.reset, "' must not be an empty string.");
 
             return f_status_set_error(f_invalid_parameter);
           }
@@ -211,22 +211,22 @@ extern "C" {
     for (f_array_length i = 0; i < depths->used; i++) {
       for (f_array_length j = i + 1; j < depths->used; j++) {
         if (depths->array[i].depth == depths->array[j].depth) {
-          fl_color_print(f_standard_error, data.context.error, data.context.reset, "ERROR: The value '");
-          fl_color_print(f_standard_error, data.context.notable, data.context.reset, "%llu", depths->array[i].depth);
-          fl_color_print(f_standard_error, data.context.error, data.context.reset, "' may only be specified once for the parameter '");
-          fl_color_print(f_standard_error, data.context.notable, data.context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_depth);
-          fl_color_print_line(f_standard_error, data.context.error, data.context.reset, "'.");
+          fl_color_print(f_type_error, data.context.error, data.context.reset, "ERROR: The value '");
+          fl_color_print(f_type_error, data.context.notable, data.context.reset, "%llu", depths->array[i].depth);
+          fl_color_print(f_type_error, data.context.error, data.context.reset, "' may only be specified once for the parameter '");
+          fl_color_print(f_type_error, data.context.notable, data.context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_depth);
+          fl_color_print_line(f_type_error, data.context.error, data.context.reset, "'.");
 
           return f_status_set_error(f_invalid_parameter);
         }
         else if (depths->array[i].depth > depths->array[j].depth) {
-          fl_color_print(f_standard_error, data.context.error, data.context.reset, "ERROR: The parameter '");
-          fl_color_print(f_standard_error, data.context.notable, data.context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_depth);
-          fl_color_print(f_standard_error, data.context.error, data.context.reset, "' may not have the value '");
-          fl_color_print(f_standard_error, data.context.notable, data.context.reset, "%llu", depths->array[i].depth);
-          fl_color_print(f_standard_error, data.context.error, data.context.reset, "' before the value '");
-          fl_color_print(f_standard_error, data.context.notable, data.context.reset, "%llu", depths->array[j].depth);
-          fl_color_print_line(f_standard_error, data.context.error, data.context.reset, "'.");
+          fl_color_print(f_type_error, data.context.error, data.context.reset, "ERROR: The parameter '");
+          fl_color_print(f_type_error, data.context.notable, data.context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_list_read_long_depth);
+          fl_color_print(f_type_error, data.context.error, data.context.reset, "' may not have the value '");
+          fl_color_print(f_type_error, data.context.notable, data.context.reset, "%llu", depths->array[i].depth);
+          fl_color_print(f_type_error, data.context.error, data.context.reset, "' before the value '");
+          fl_color_print(f_type_error, data.context.notable, data.context.reset, "%llu", depths->array[j].depth);
+          fl_color_print_line(f_type_error, data.context.error, data.context.reset, "'.");
 
           return f_status_set_error(f_invalid_parameter);
         }
@@ -253,33 +253,33 @@ extern "C" {
         status = f_status_set_fine(status);
 
         if (status == f_invalid_parameter) {
-          fl_color_print(f_standard_error, data->context.error, data->context.reset, "INTERNAL ERROR: Invalid parameter when calling ");
-          fl_color_print(f_standard_error, data->context.notable, data->context.reset, "fll_fss_basic_list_read()");
-          fl_color_print(f_standard_error, data->context.error, data->context.reset, " for the file '");
-          fl_color_print(f_standard_error, data->context.notable, data->context.reset, "%s", filename);
-          fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "'.");
+          fl_color_print(f_type_error, data->context.error, data->context.reset, "INTERNAL ERROR: Invalid parameter when calling ");
+          fl_color_print(f_type_error, data->context.notable, data->context.reset, "fll_fss_basic_list_read()");
+          fl_color_print(f_type_error, data->context.error, data->context.reset, " for the file '");
+          fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s", filename);
+          fl_color_print_line(f_type_error, data->context.error, data->context.reset, "'.");
         }
         else if (status == f_error_allocation || status == f_error_reallocation) {
-          fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "CRITICAL ERROR: Unable to allocate memory.");
+          fl_color_print_line(f_type_error, data->context.error, data->context.reset, "CRITICAL ERROR: Unable to allocate memory.");
         }
         else if (status == f_incomplete_utf_on_stop) {
-          fl_color_print(f_standard_error, data->context.error, data->context.reset, "ENCODING ERROR: error occurred on invalid UTF-8 character at stop position (at ");
-          fl_color_print(f_standard_error, data->context.notable, data->context.reset, "%d", input.start);
-          fl_color_print_line(f_standard_error, data->context.error, data->context.reset, ").");
+          fl_color_print(f_type_error, data->context.error, data->context.reset, "ENCODING ERROR: error occurred on invalid UTF-8 character at stop position (at ");
+          fl_color_print(f_type_error, data->context.notable, data->context.reset, "%d", input.start);
+          fl_color_print_line(f_type_error, data->context.error, data->context.reset, ").");
         }
         else if (status == f_incomplete_utf_on_eos) {
-          fl_color_print(f_standard_error, data->context.error, data->context.reset, "ENCODING ERROR: error occurred on invalid UTF-8 character at end of string (at ");
-          fl_color_print(f_standard_error, data->context.notable, data->context.reset, "%d", input.start);
-          fl_color_print_line(f_standard_error, data->context.error, data->context.reset, ").");
+          fl_color_print(f_type_error, data->context.error, data->context.reset, "ENCODING ERROR: error occurred on invalid UTF-8 character at end of string (at ");
+          fl_color_print(f_type_error, data->context.notable, data->context.reset, "%d", input.start);
+          fl_color_print_line(f_type_error, data->context.error, data->context.reset, ").");
         }
         else {
-          fl_color_print(f_standard_error, data->context.error, data->context.reset, "INTERNAL ERROR: An unhandled error (");
-          fl_color_print(f_standard_error, data->context.notable, data->context.reset, "%u", status);
-          fl_color_print(f_standard_error, data->context.error, data->context.reset, ") has occurred while calling ");
-          fl_color_print(f_standard_error, data->context.notable, data->context.reset, "fll_fss_basic_list_read()");
-          fl_color_print(f_standard_error, data->context.error, data->context.reset, " for the file '");
-          fl_color_print(f_standard_error, data->context.notable, data->context.reset, "%s", filename);
-          fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "'.");
+          fl_color_print(f_type_error, data->context.error, data->context.reset, "INTERNAL ERROR: An unhandled error (");
+          fl_color_print(f_type_error, data->context.notable, data->context.reset, "%u", status);
+          fl_color_print(f_type_error, data->context.error, data->context.reset, ") has occurred while calling ");
+          fl_color_print(f_type_error, data->context.notable, data->context.reset, "fll_fss_basic_list_read()");
+          fl_color_print(f_type_error, data->context.error, data->context.reset, " for the file '");
+          fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s", filename);
+          fl_color_print_line(f_type_error, data->context.error, data->context.reset, "'.");
         }
 
         return f_status_set_error(status);
@@ -365,10 +365,10 @@ extern "C" {
       if (data->parameters[fss_basic_list_read_parameter_total].result == f_console_result_found) {
         if (depths.array[0].index_at > 0) {
           if (depths.array[0].value_at < data->objects.used && names[depths.array[0].value_at]) {
-            fprintf(f_standard_output, "1%c", f_string_eol);
+            fprintf(f_type_output, "1%c", f_string_eol);
           }
           else {
-            fprintf(f_standard_output, "0%c", f_string_eol);
+            fprintf(f_type_output, "0%c", f_string_eol);
           }
         }
         else if (depths.array[0].index_name > 0) {
@@ -380,10 +380,10 @@ extern "C" {
             total++;
           } // for
 
-          fprintf(f_standard_output, "%llu%c", total, f_string_eol);
+          fprintf(f_type_output, "%llu%c", total, f_string_eol);
         }
         else {
-          fprintf(f_standard_output, "%llu%c", data->objects.used, f_string_eol);
+          fprintf(f_type_output, "%llu%c", data->objects.used, f_string_eol);
         }
 
         return f_none;
@@ -402,8 +402,8 @@ extern "C" {
         for (; i < data->objects.used; i++) {
           if (names[i]) {
             if (at == depths.array[0].value_at) {
-              print_object(f_standard_output, data->buffer, data->objects.array[i]);
-              fprintf(f_standard_output, "%c", f_string_eol);
+              print_object(f_type_output, data->buffer, data->objects.array[i]);
+              fprintf(f_type_output, "%c", f_string_eol);
               break;
             }
 
@@ -417,8 +417,8 @@ extern "C" {
       for (f_string_length i = 0; i < data->objects.used; i++) {
         if (names[i] == 0) continue;
 
-        print_object(f_standard_output, data->buffer, data->objects.array[i]);
-        fprintf(f_standard_output, "%c", f_string_eol);
+        print_object(f_type_output, data->buffer, data->objects.array[i]);
+        fprintf(f_type_output, "%c", f_string_eol);
       } // for
 
       return f_none;
@@ -427,7 +427,7 @@ extern "C" {
     if (depths.array[0].index_at > 0) {
       if (depths.array[0].value_at >= data->objects.used) {
         if (names[depths.array[0].value_at] && data->parameters[fss_basic_list_read_parameter_total].result == f_console_result_found) {
-          fprintf(f_standard_output, "0%c", f_string_eol);
+          fprintf(f_type_output, "0%c", f_string_eol);
         }
 
         return f_none;
@@ -441,7 +441,7 @@ extern "C" {
           if (at == depths.array[0].value_at) {
             if (data->parameters[fss_basic_list_read_parameter_total].result == f_console_result_found) {
               if (data->contents.array[i].used == 0) {
-                fprintf(f_standard_output, "0%c", f_string_eol);
+                fprintf(f_type_output, "0%c", f_string_eol);
               }
               else {
                 f_string_length total = 1;
@@ -454,7 +454,7 @@ extern "C" {
                   }
                 } // for
 
-                fprintf(f_standard_output, "%llu%c", total, f_string_eol);
+                fprintf(f_type_output, "%llu%c", total, f_string_eol);
               }
 
               return f_none;
@@ -463,7 +463,7 @@ extern "C" {
             if (data->parameters[fss_basic_list_read_parameter_line].result == f_console_result_additional) {
               if (data->contents.array[i].used == 0) {
                 if (include_empty && line == 0) {
-                  fprintf(f_standard_output, "%c", f_string_eol);
+                  fprintf(f_type_output, "%c", f_string_eol);
                 }
               }
               else {
@@ -473,11 +473,11 @@ extern "C" {
                   for (; i <= data->contents.array[i].array[0].stop; i++) {
                     if (data->buffer.string[i] == 0) continue;
                     if (data->buffer.string[i] == f_string_eol) {
-                      fprintf(f_standard_output, "%c", f_string_eol);
+                      fprintf(f_type_output, "%c", f_string_eol);
                       break;
                     }
 
-                    fprintf(f_standard_output, "%c", data->buffer.string[i]);
+                    fprintf(f_type_output, "%c", data->buffer.string[i]);
                   } // for
                 }
                 else {
@@ -495,11 +495,11 @@ extern "C" {
                         for (; i <= data->contents.array[i].array[0].stop; i++) {
                           if (data->buffer.string[i] == 0) continue;
                           if (data->buffer.string[i] == f_string_eol) {
-                            fprintf(f_standard_output, "%c", f_string_eol);
+                            fprintf(f_type_output, "%c", f_string_eol);
                             break;
                           }
 
-                          fprintf(f_standard_output, "%c", data->buffer.string[i]);
+                          fprintf(f_type_output, "%c", data->buffer.string[i]);
                         } // for
 
                         break;
@@ -513,10 +513,10 @@ extern "C" {
             }
 
             if (data->contents.array[i].used > 0) {
-              f_print_string_dynamic_partial(f_standard_output, data->buffer, data->contents.array[i].array[0]);
+              f_print_string_dynamic_partial(f_type_output, data->buffer, data->contents.array[i].array[0]);
             }
             else if (include_empty) {
-              fprintf(f_standard_output, "%c", f_string_eol);
+              fprintf(f_type_output, "%c", f_string_eol);
             }
 
             break;
@@ -552,7 +552,7 @@ extern "C" {
         } // for
       } // for
 
-      fprintf(f_standard_output, "%llu%c", total, f_string_eol);
+      fprintf(f_type_output, "%llu%c", total, f_string_eol);
       return f_none;
     }
 
@@ -569,7 +569,7 @@ extern "C" {
         if (data->contents.array[i].used == 0) {
           if (include_empty) {
             if (line_current == line) {
-              fprintf(f_standard_output, "%c", f_string_eol);
+              fprintf(f_type_output, "%c", f_string_eol);
               break;
             }
 
@@ -601,11 +601,11 @@ extern "C" {
             if (data->buffer.string[j] == 0) continue;
 
             if (data->buffer.string[j] == f_string_eol) {
-              fprintf(f_standard_output, "%c", f_string_eol);
+              fprintf(f_type_output, "%c", f_string_eol);
               break;
             }
 
-            fprintf(f_standard_output, "%c", data->buffer.string[j]);
+            fprintf(f_type_output, "%c", data->buffer.string[j]);
           } // for
 
           break;
@@ -622,13 +622,13 @@ extern "C" {
 
       if (data->contents.array[i].used == 0) {
         if (include_empty) {
-          fprintf(f_standard_output, "%c", f_string_eol);
+          fprintf(f_type_output, "%c", f_string_eol);
         }
 
         continue;
       }
 
-      f_print_string_dynamic_partial(f_standard_output, data->buffer, data->contents.array[i].array[0]);
+      f_print_string_dynamic_partial(f_type_output, data->buffer, data->contents.array[i].array[0]);
     } // for
 
     return f_none;
index d4470e9718724a8a8cf7bff6195d6ef2e080de3a..cb11c04080cde4a28e0946fb14919c5095f04b16 100644 (file)
@@ -62,27 +62,27 @@ extern "C" {
         f_file file  = f_file_initialize;
         f_string_dynamic input = f_string_dynamic_initialize;
 
-        file.address = f_pipe;
+        file.id = f_type_descriptor_input;
 
-        status = fl_file_read(&file, &input);
+        status = f_file_read(file, &input);
 
         if (f_status_is_error(status)) {
           status = f_status_set_fine(status);
 
           if (status == f_invalid_parameter) {
-            fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "INTERNAL ERROR: Invalid parameter when calling f_file_open()");
+            fl_color_print_line(f_type_error, data->context.error, data->context.reset, "INTERNAL ERROR: Invalid parameter when calling f_file_open()");
           }
           else if (status == f_file_not_found) {
-            fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "ERROR: Unable to find the file '%s'", "-");
+            fl_color_print_line(f_type_error, data->context.error, data->context.reset, "ERROR: Unable to find the file '%s'", "-");
           }
           else if (status == f_file_error_open) {
-            fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "ERROR: Unable to open the file '%s'", "-");
+            fl_color_print_line(f_type_error, data->context.error, data->context.reset, "ERROR: Unable to open the file '%s'", "-");
           }
           else if (status == f_file_error_descriptor) {
-            fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "ERROR: File descriptor error while trying to open the file '%s'", "-");
+            fl_color_print_line(f_type_error, data->context.error, data->context.reset, "ERROR: File descriptor error while trying to open the file '%s'", "-");
           }
           else {
-            fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "INTERNAL ERROR: An unhandled error (%u) has occurred while calling f_file_open()", status);
+            fl_color_print_line(f_type_error, data->context.error, data->context.reset, "INTERNAL ERROR: An unhandled error (%u) has occurred while calling f_file_open()", status);
           }
 
           f_macro_string_dynamic_delete_simple(input);
@@ -140,48 +140,49 @@ extern "C" {
       if (data->parameters[fss_basic_list_write_parameter_file].result == f_console_result_additional) {
         f_file output = f_file_initialize;
 
-        output.mode = f_file_write_append;
-        status = f_file_open(&output, arguments.argv[data->parameters[fss_basic_list_write_parameter_file].additional.array[0]]);
+        output.flags = f_file_flag_append_wo;
+
+        status = f_file_open(arguments.argv[data->parameters[fss_basic_list_write_parameter_file].additional.array[0]], 0, &output);
 
         if (f_status_is_error(status)) {
           status = f_status_set_fine(status);
 
-          f_file_close(&output);
+          f_file_close(&output.id);
 
           if (status == f_invalid_parameter) {
-            fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "INTERNAL ERROR: Invalid parameter when calling f_file_open()");
+            fl_color_print_line(f_type_error, data->context.error, data->context.reset, "INTERNAL ERROR: Invalid parameter when calling f_file_open()");
           }
           else if (status == f_file_not_found) {
-            fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "ERROR: Unable to find the file '%s'", arguments.argv[data->parameters[fss_basic_list_write_parameter_file].additional.array[0]]);
+            fl_color_print_line(f_type_error, data->context.error, data->context.reset, "ERROR: Unable to find the file '%s'", arguments.argv[data->parameters[fss_basic_list_write_parameter_file].additional.array[0]]);
           }
           else if (status == f_file_error_open) {
-            fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "ERROR: Unable to open the file '%s'", arguments.argv[data->parameters[fss_basic_list_write_parameter_file].additional.array[0]]);
+            fl_color_print_line(f_type_error, data->context.error, data->context.reset, "ERROR: Unable to open the file '%s'", arguments.argv[data->parameters[fss_basic_list_write_parameter_file].additional.array[0]]);
           }
           else if (status == f_file_error_descriptor) {
-            fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "ERROR: File descriptor error while trying to open the file '%s'", arguments.argv[data->parameters[fss_basic_list_write_parameter_file].additional.array[0]]);
+            fl_color_print_line(f_type_error, data->context.error, data->context.reset, "ERROR: File descriptor error while trying to open the file '%s'", arguments.argv[data->parameters[fss_basic_list_write_parameter_file].additional.array[0]]);
           }
           else {
-            fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "INTERNAL ERROR: An unhandled error (%u) has occurred while calling f_file_open()", status);
+            fl_color_print_line(f_type_error, data->context.error, data->context.reset, "INTERNAL ERROR: An unhandled error (%u) has occurred while calling f_file_open()", status);
           }
 
           fss_basic_list_write_delete_data(data);
           return f_status_set_error(status);
         }
 
-        status = fl_file_write(output, buffer);
-        f_file_close(&output);
+        status = f_file_write(output, buffer, 0);
+        f_file_close(&output.id);
 
         if (f_status_is_error(status)) {
           status = f_status_set_fine(status);
 
           if (status == f_invalid_parameter) {
-            fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "INTERNAL ERROR: Invalid parameter when calling fl_file_write()");
+            fl_color_print_line(f_type_error, data->context.error, data->context.reset, "INTERNAL ERROR: Invalid parameter when calling fl_file_write()");
           }
           else if (status == f_file_error_write) {
-            fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "ERROR: Unable to write to the file '%s'", arguments.argv[data->parameters[fss_basic_list_write_parameter_file].additional.array[0]]);
+            fl_color_print_line(f_type_error, data->context.error, data->context.reset, "ERROR: Unable to write to the file '%s'", arguments.argv[data->parameters[fss_basic_list_write_parameter_file].additional.array[0]]);
           }
           else {
-            fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "INTERNAL ERROR: An unhandled error (%u) has occurred while calling fl_file_write()", status);
+            fl_color_print_line(f_type_error, data->context.error, data->context.reset, "INTERNAL ERROR: An unhandled error (%u) has occurred while calling fl_file_write()", status);
           }
 
           fss_basic_list_write_delete_data(data);
@@ -189,7 +190,7 @@ extern "C" {
         }
       }
       else {
-        f_print_string_dynamic(f_standard_output, buffer);
+        f_print_string_dynamic(f_type_output, buffer);
       }
     }
 
index 46161a2a9b0ead27c483d585b2225a26513e70ed..884854b29742e73a0d09977b0154e7007662ce3b 100644 (file)
@@ -4,7 +4,7 @@ int main(const unsigned long argc, const f_string *argv) {
   const f_console_arguments arguments = { argc, argv };
   fss_basic_list_write_data data = fss_basic_list_write_data_initialize;
 
-  if (f_pipe_exists()) {
+  if (f_pipe_input_exists()) {
     data.process_pipe = f_true;
   }
 
index 55f527f2b9bfbf6fc886984d797c404829ddeefc..074e4cc28822e4ef7c58fd0497ffd5d315bf886c 100644 (file)
@@ -29,7 +29,7 @@ extern "C" {
 
     fll_program_print_help_usage(context, fss_basic_read_name, "filename(s)");
 
-    fl_color_print(f_standard_output, context.important, context.reset, " Notes:");
+    fl_color_print(f_type_output, context.important, context.reset, " Notes:");
 
     printf("%c", f_string_eol, f_string_eol);
 
@@ -38,27 +38,27 @@ extern "C" {
     printf("%c", f_string_eol);
 
     printf("  When using the ");
-    fl_color_print(f_standard_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_depth);
+    fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_depth);
     printf(" option, an order of operations is enforced on the parameters.%c", f_string_eol);
 
     printf("  When this order of operations is in effect, parameters to the right of a depth parameter are influenced by that depth parameter:%c", f_string_eol);
 
     printf("    ");
-    fl_color_print(f_standard_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_at);
+    fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_at);
     printf(": An object index at the specified depth.%c", f_string_eol);
 
     printf("    ");
-    fl_color_print(f_standard_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_depth);
+    fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_depth);
     printf(": A new depth within the specified depth, indexed from the root.%c", f_string_eol);
 
     printf("    ");
-    fl_color_print(f_standard_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_name);
+    fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_name);
     printf(": An object name at the specified depth.%c", f_string_eol);
 
     printf("%c", f_string_eol);
 
     printf("  The parameter ");
-    fl_color_print(f_standard_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_depth);
+    fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_depth);
     printf(" must be in numeric order, but values in between may be skipped.%c", f_string_eol);
     printf("    ('-d 0 -a 1 -d 2 -a 2' would specify index 1 at depth 0, any index at depth 1, and index 2 at depth 2.)%c", f_string_eol);
     printf("    ('-d 2 -a 1 -d 0 -a 2' would be invalid because depth 2 is before depth 1.)%c", f_string_eol);
@@ -66,53 +66,53 @@ extern "C" {
     printf("%c", f_string_eol);
 
     printf("  The parameter ");
-    fl_color_print(f_standard_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_select);
+    fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_select);
     printf(" selects a content index at a given depth.%c", f_string_eol);
     printf("    (This parameter is not synonymous with the depth parameter and does not relate to nested content).%c", f_string_eol);
 
     printf("%c", f_string_eol);
 
     printf("  Specify both ");
-    fl_color_print(f_standard_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_object);
+    fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_object);
     printf(" and the ");
-    fl_color_print(f_standard_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_total);
+    fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_total);
     printf(" parameters to get the total objects.%c", f_string_eol);
 
     printf("%c", f_string_eol);
 
     printf("  When both ");
-    fl_color_print(f_standard_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_at);
+    fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_at);
     printf(" and ");
-    fl_color_print(f_standard_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_name);
+    fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_name);
     printf(" parameters are specified (at the same depth), the ");
-    fl_color_print(f_standard_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_at);
+    fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_at);
     printf(" parameter value will be treated as a position relative to the specified ");
-    fl_color_print(f_standard_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_name);
+    fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_name);
     printf(" parameter value.%c", f_string_eol);
 
     printf("%c", f_string_eol);
 
     printf("  This program may support parameters, such as ");
-    fl_color_print(f_standard_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_depth);
+    fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_depth);
     printf(" or ");
-    fl_color_print(f_standard_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_select);
+    fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_select);
     printf(", even if not supported by the standard.%c", f_string_eol);
     printf("  This is done to help ensure consistency for scripting.%c", f_string_eol);
 
     printf("%c", f_string_eol);
 
     printf("  For parameters like ");
-    fl_color_print(f_standard_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_depth);
+    fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_depth);
     printf(", if the standard doesn't support nested content, then only a depth of 0 would be valid.%c", f_string_eol);
 
     printf("  For parameters like ");
-    fl_color_print(f_standard_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_select);
+    fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_select);
     printf(", if the standard doesn't support multiple content groups, then only a select of 0 would be valid.%c", f_string_eol);
 
     printf("%c", f_string_eol);
 
     printf("  The parameter ");
-    fl_color_print(f_standard_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_trim);
+    fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_trim);
     printf(" will remove leading and trailing whitespaces when selecting objects or when printing objects.%c", f_string_eol);
 
     printf("%c", f_string_eol);
@@ -148,45 +148,45 @@ extern "C" {
     }
     else if (data->remaining.used > 0 || data->process_pipe) {
       if (data->parameters[fss_basic_read_parameter_at].result == f_console_result_found) {
-        fl_color_print(f_standard_error, data->context.error, data->context.reset, "ERROR: The parameter '");
-        fl_color_print(f_standard_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_at);
-        fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "' requires a positive number.");
+        fl_color_print(f_type_error, data->context.error, data->context.reset, "ERROR: The parameter '");
+        fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_at);
+        fl_color_print_line(f_type_error, data->context.error, data->context.reset, "' requires a positive number.");
 
         fss_basic_read_delete_data(data);
         return f_status_set_error(f_invalid_parameter);
       }
 
       if (data->parameters[fss_basic_read_parameter_depth].result == f_console_result_found) {
-        fl_color_print(f_standard_error, data->context.error, data->context.reset, "ERROR: The parameter '");
-        fl_color_print(f_standard_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_depth);
-        fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "' requires a positive number.");
+        fl_color_print(f_type_error, data->context.error, data->context.reset, "ERROR: The parameter '");
+        fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_depth);
+        fl_color_print_line(f_type_error, data->context.error, data->context.reset, "' requires a positive number.");
 
         fss_basic_read_delete_data(data);
         return f_status_set_error(f_invalid_parameter);
       }
 
       if (data->parameters[fss_basic_read_parameter_line].result == f_console_result_found) {
-        fl_color_print(f_standard_error, data->context.error, data->context.reset, "ERROR: The parameter '");
-        fl_color_print(f_standard_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_line);
-        fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "' requires a positive number.");
+        fl_color_print(f_type_error, data->context.error, data->context.reset, "ERROR: The parameter '");
+        fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_line);
+        fl_color_print_line(f_type_error, data->context.error, data->context.reset, "' requires a positive number.");
 
         fss_basic_read_delete_data(data);
         return f_status_set_error(f_invalid_parameter);
       }
 
       if (data->parameters[fss_basic_read_parameter_name].result == f_console_result_found) {
-        fl_color_print(f_standard_error, data->context.error, data->context.reset, "ERROR: The parameter '");
-        fl_color_print(f_standard_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_name);
-        fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "' requires a string.");
+        fl_color_print(f_type_error, data->context.error, data->context.reset, "ERROR: The parameter '");
+        fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_name);
+        fl_color_print_line(f_type_error, data->context.error, data->context.reset, "' requires a string.");
 
         fss_basic_read_delete_data(data);
         return f_status_set_error(f_invalid_parameter);
       }
 
       if (data->parameters[fss_basic_read_parameter_select].result == f_console_result_found) {
-        fl_color_print(f_standard_error, data->context.error, data->context.reset, "ERROR: The parameter '");
-        fl_color_print(f_standard_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_select);
-        fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "' requires a positive number.");
+        fl_color_print(f_type_error, data->context.error, data->context.reset, "ERROR: The parameter '");
+        fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_select);
+        fl_color_print_line(f_type_error, data->context.error, data->context.reset, "' requires a positive number.");
 
         fss_basic_read_delete_data(data);
         return f_status_set_error(f_invalid_parameter);
@@ -194,22 +194,22 @@ extern "C" {
 
       if (data->parameters[fss_basic_read_parameter_object].result == f_console_result_found) {
         if (data->parameters[fss_basic_read_parameter_line].result == f_console_result_additional) {
-          fl_color_print(f_standard_error, data->context.error, data->context.reset, "ERROR: Cannot specify the '");
-          fl_color_print(f_standard_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_object);
-          fl_color_print(f_standard_error, data->context.error, data->context.reset, "' parameter with the '");
-          fl_color_print(f_standard_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_line);
-          fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "' parameter.");
+          fl_color_print(f_type_error, data->context.error, data->context.reset, "ERROR: Cannot specify the '");
+          fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_object);
+          fl_color_print(f_type_error, data->context.error, data->context.reset, "' parameter with the '");
+          fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_line);
+          fl_color_print_line(f_type_error, data->context.error, data->context.reset, "' parameter.");
 
           fss_basic_read_delete_data(data);
           return f_status_set_error(f_invalid_parameter);
         }
 
         if (data->parameters[fss_basic_read_parameter_select].result == f_console_result_additional) {
-          fl_color_print(f_standard_error, data->context.error, data->context.reset, "ERROR: Cannot specify the '");
-          fl_color_print(f_standard_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_object);
-          fl_color_print(f_standard_error, data->context.error, data->context.reset, "' parameter with the '");
-          fl_color_print(f_standard_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_select);
-          fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "' parameter.");
+          fl_color_print(f_type_error, data->context.error, data->context.reset, "ERROR: Cannot specify the '");
+          fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_object);
+          fl_color_print(f_type_error, data->context.error, data->context.reset, "' parameter with the '");
+          fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_select);
+          fl_color_print_line(f_type_error, data->context.error, data->context.reset, "' parameter.");
 
           fss_basic_read_delete_data(data);
           return f_status_set_error(f_invalid_parameter);
@@ -218,11 +218,11 @@ extern "C" {
 
       if (data->parameters[fss_basic_read_parameter_line].result == f_console_result_additional) {
         if (data->parameters[fss_basic_read_parameter_total].result == f_console_result_found) {
-          fl_color_print(f_standard_error, data->context.error, data->context.reset, "ERROR: Cannot specify the '");
-          fl_color_print(f_standard_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_line);
-          fl_color_print(f_standard_error, data->context.error, data->context.reset, "' parameter with the '");
-          fl_color_print(f_standard_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_total);
-          fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "' parameter.");
+          fl_color_print(f_type_error, data->context.error, data->context.reset, "ERROR: Cannot specify the '");
+          fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_line);
+          fl_color_print(f_type_error, data->context.error, data->context.reset, "' parameter with the '");
+          fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_total);
+          fl_color_print_line(f_type_error, data->context.error, data->context.reset, "' parameter.");
 
           fss_basic_read_delete_data(data);
           return f_status_set_error(f_invalid_parameter);
@@ -232,7 +232,7 @@ extern "C" {
       fss_basic_read_depths depths = fss_basic_read_depths_initialize;
 
       f_string_length counter = 0;
-      f_string_length original_size = data->file_position.total;
+      f_string_length original_size = data->quantity.total;
 
       status = fss_basic_read_main_preprocess_depth(arguments, *data, &depths);
       if (f_status_is_error(status)) {
@@ -246,7 +246,7 @@ extern "C" {
         macro_fss_basic_read_depths_delete_simple(depths);
 
         if (data->parameters[fss_basic_read_parameter_total].result == f_console_result_found) {
-          fprintf(f_standard_output, "0%c", f_string_eol);
+          fprintf(f_type_output, "0%c", f_string_eol);
 
           fss_basic_read_delete_data(data);
           return f_none;
@@ -257,9 +257,9 @@ extern "C" {
       }
 
       if (data->parameters[fss_basic_read_parameter_select].result == f_console_result_found) {
-        fl_color_print(f_standard_error, data->context.error, data->context.reset, "ERROR: the '");
-        fl_color_print(f_standard_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_select);
-        fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "' parameter requires a positive number.");
+        fl_color_print(f_type_error, data->context.error, data->context.reset, "ERROR: the '");
+        fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_select);
+        fl_color_print_line(f_type_error, data->context.error, data->context.reset, "' parameter requires a positive number.");
 
         macro_fss_basic_read_depths_delete_simple(depths);
         fss_basic_read_delete_data(data);
@@ -269,9 +269,9 @@ extern "C" {
       if (data->process_pipe) {
         f_file file = f_file_initialize;
 
-        file.address = f_pipe;
+        file.id = f_type_descriptor_input;
 
-        status = fl_file_read(&file, &data->buffer);
+        status = f_file_read(file, &data->buffer);
 
         if (f_status_is_error(status)) {
           fss_basic_read_print_file_error(data->context, "fl_file_read", "-", f_status_set_fine(status));
@@ -299,9 +299,9 @@ extern "C" {
         for (; counter < data->remaining.used; counter++) {
           f_file file = f_file_initialize;
 
-          status = f_file_open(&file, arguments.argv[data->remaining.array[counter]]);
+          status = f_file_open(arguments.argv[data->remaining.array[counter]], 0, &file);
 
-          data->file_position.total = original_size;
+          data->quantity.total = original_size;
 
           if (f_status_is_error(status)) {
             fss_basic_read_print_file_error(data->context, "f_file_open", arguments.argv[data->remaining.array[counter]], f_status_set_fine(status));
@@ -311,26 +311,28 @@ extern "C" {
             return status;
           }
 
-          if (data->file_position.total == 0) {
-            fseek(file.address, 0, SEEK_END);
+          if (data->quantity.total == 0) {
+            status = f_file_size_by_id(file.id, &data->quantity.total);
 
-            data->file_position.total = ftell(file.address);
+            if (f_status_is_error(status)) {
+              fss_basic_read_print_file_error(data->context, "f_file_size_by_id", arguments.argv[data->remaining.array[counter]], f_status_set_fine(status));
+              macro_fss_basic_read_depths_delete_simple(depths);
+              fss_basic_read_delete_data(data);
+            }
 
             // Skip past empty files.
-            if (data->file_position.total == 0) {
-              f_file_close(&file);
+            if (data->quantity.total == 0) {
+              f_file_close(&file.id);
               continue;
             }
-
-            fseek(file.address, 0, SEEK_SET);
           }
 
-          status = fl_file_read_position(&file, &data->buffer, data->file_position);
+          status = f_file_read_until(file, &data->buffer, data->quantity.total);
 
-          f_file_close(&file);
+          f_file_close(&file.id);
 
           if (f_status_is_error(status)) {
-            fss_basic_read_print_file_error(data->context, "fl_file_read_position", arguments.argv[data->remaining.array[counter]], f_status_set_fine(status));
+            fss_basic_read_print_file_error(data->context, "f_file_read_until", arguments.argv[data->remaining.array[counter]], f_status_set_fine(status));
 
             macro_fss_basic_read_depths_delete_simple(depths);
             fss_basic_read_delete_data(data);
@@ -355,7 +357,7 @@ extern "C" {
       macro_fss_basic_read_depths_delete_simple(depths);
     }
     else {
-      fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "ERROR: you failed to specify one or more files.");
+      fl_color_print_line(f_type_error, data->context.error, data->context.reset, "ERROR: you failed to specify one or more files.");
       status = f_status_set_error(f_invalid_parameter);
     }
 
index 7d796b0baa64b9a32ac14d952f5ab1b0e2bff036..e08308b3728c7a033ffbe11e9b272b6af063368d 100644 (file)
@@ -4,7 +4,7 @@ int main(const unsigned long argc, const f_string *argv) {
   const f_console_arguments arguments = { argc, argv };
   fss_basic_read_data data = fss_basic_read_data_initialize;
 
-  if (f_pipe_exists()) {
+  if (f_pipe_input_exists()) {
     data.process_pipe = f_true;
   }
 
index c82466385a25e4c48a61df2656d087de3dae7ce7..0f0247f2335fb241e3bf9711d312d51d81eaa9c9 100644 (file)
@@ -8,12 +8,12 @@ extern "C" {
 #ifndef _di_fss_basic_read_print_file_error_
   void fss_basic_read_print_file_error(const fl_color_context context, const f_string function_name, const f_string file_name, const f_status status) {
 
-    if (fll_file_error_print(f_standard_error, context, function_name, file_name, status) == f_false) {
-      fl_color_print(f_standard_error, context.error, context.reset, "INTERNAL ERROR: An unhandled error (");
-      fl_color_print(f_standard_error, context.notable, context.reset, "%u", status);
-      fl_color_print(f_standard_error, context.error, context.reset, ") has occurred while calling ");
-      fl_color_print(f_standard_error, context.notable, context.reset, "%s()", function_name);
-      fl_color_print_line(f_standard_error, context.error, context.reset, ".");
+    if (fll_file_error_print(f_type_error, context, function_name, file_name, status) == f_false) {
+      fl_color_print(f_type_error, context.error, context.reset, "INTERNAL ERROR: An unhandled error (");
+      fl_color_print(f_type_error, context.notable, context.reset, "%u", status);
+      fl_color_print(f_type_error, context.error, context.reset, ") has occurred while calling ");
+      fl_color_print(f_type_error, context.notable, context.reset, "%s()", function_name);
+      fl_color_print_line(f_type_error, context.error, context.reset, ".");
     }
   }
 #endif // _di_fss_basic_read_print_file_error_
@@ -22,62 +22,62 @@ extern "C" {
   void fss_basic_read_print_number_argument_error(const fl_color_context context, const f_string function_name, const f_string parameter_name, const f_string argument, const f_status status) {
 
     if (status == f_invalid_parameter) {
-      fl_color_print(f_standard_error, context.error, context.reset, "INTERNAL ERROR: Invalid parameter when calling ");
-      fl_color_print(f_standard_error, context.notable, context.reset, "%s()", function_name);
-      fl_color_print_line(f_standard_error, context.error, context.reset, ".");
+      fl_color_print(f_type_error, context.error, context.reset, "INTERNAL ERROR: Invalid parameter when calling ");
+      fl_color_print(f_type_error, context.notable, context.reset, "%s()", function_name);
+      fl_color_print_line(f_type_error, context.error, context.reset, ".");
     }
     else if (status == f_number_invalid) {
-      fl_color_print(f_standard_error, context.error, context.reset, "ERROR: The argument '");
-      fl_color_print(f_standard_error, context.notable, context.reset, "%s", argument);
-      fl_color_print(f_standard_error, context.error, context.reset, "' is not a valid number for the parameter '");
-      fl_color_print(f_standard_error, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, parameter_name);
-      fl_color_print_line(f_standard_error, context.error, context.reset, "'.");
+      fl_color_print(f_type_error, context.error, context.reset, "ERROR: The argument '");
+      fl_color_print(f_type_error, context.notable, context.reset, "%s", argument);
+      fl_color_print(f_type_error, context.error, context.reset, "' is not a valid number for the parameter '");
+      fl_color_print(f_type_error, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, parameter_name);
+      fl_color_print_line(f_type_error, context.error, context.reset, "'.");
     }
     else if (status == f_number_underflow) {
-      fl_color_print(f_standard_error, context.error, context.reset, "ERROR: The argument '");
-      fl_color_print(f_standard_error, context.notable, context.reset, "%s", argument);
-      fl_color_print(f_standard_error, context.error, context.reset, "' is too small for the parameter '");
-      fl_color_print(f_standard_error, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, parameter_name);
-      fl_color_print_line(f_standard_error, context.error, context.reset, "'.");
+      fl_color_print(f_type_error, context.error, context.reset, "ERROR: The argument '");
+      fl_color_print(f_type_error, context.notable, context.reset, "%s", argument);
+      fl_color_print(f_type_error, context.error, context.reset, "' is too small for the parameter '");
+      fl_color_print(f_type_error, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, parameter_name);
+      fl_color_print_line(f_type_error, context.error, context.reset, "'.");
     }
     else if (status == f_number_overflow) {
-      fl_color_print(f_standard_error, context.error, context.reset, "ERROR: The argument '");
-      fl_color_print(f_standard_error, context.notable, context.reset, "%s", argument);
-      fl_color_print(f_standard_error, context.error, context.reset, "' is too large for the parameter '");
-      fl_color_print(f_standard_error, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, parameter_name);
-      fl_color_print_line(f_standard_error, context.error, context.reset, "'.");
+      fl_color_print(f_type_error, context.error, context.reset, "ERROR: The argument '");
+      fl_color_print(f_type_error, context.notable, context.reset, "%s", argument);
+      fl_color_print(f_type_error, context.error, context.reset, "' is too large for the parameter '");
+      fl_color_print(f_type_error, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, parameter_name);
+      fl_color_print_line(f_type_error, context.error, context.reset, "'.");
     }
     else if (status == f_number_negative) {
-      fl_color_print(f_standard_error, context.error, context.reset, "ERROR: The argument '");
-      fl_color_print(f_standard_error, context.notable, context.reset, "%s", argument);
-      fl_color_print(f_standard_error, context.error, context.reset, "' is negative, which is not allowed for the parameter '");
-      fl_color_print(f_standard_error, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, parameter_name);
-      fl_color_print_line(f_standard_error, context.error, context.reset, "'.");
+      fl_color_print(f_type_error, context.error, context.reset, "ERROR: The argument '");
+      fl_color_print(f_type_error, context.notable, context.reset, "%s", argument);
+      fl_color_print(f_type_error, context.error, context.reset, "' is negative, which is not allowed for the parameter '");
+      fl_color_print(f_type_error, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, parameter_name);
+      fl_color_print_line(f_type_error, context.error, context.reset, "'.");
     }
     else if (status == f_number_positive) {
-      fl_color_print(f_standard_error, context.error, context.reset, "ERROR: The argument '");
-      fl_color_print(f_standard_error, context.notable, context.reset, "%s", argument);
-      fl_color_print(f_standard_error, context.error, context.reset, "' contains a '");
-      fl_color_print(f_standard_error, context.notable, context.reset, "+");
-      fl_color_print(f_standard_error, context.error, context.reset, "', which is not allowed for the parameter '");
-      fl_color_print(f_standard_error, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, parameter_name);
-      fl_color_print_line(f_standard_error, context.error, context.reset, "'.");
+      fl_color_print(f_type_error, context.error, context.reset, "ERROR: The argument '");
+      fl_color_print(f_type_error, context.notable, context.reset, "%s", argument);
+      fl_color_print(f_type_error, context.error, context.reset, "' contains a '");
+      fl_color_print(f_type_error, context.notable, context.reset, "+");
+      fl_color_print(f_type_error, context.error, context.reset, "', which is not allowed for the parameter '");
+      fl_color_print(f_type_error, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, parameter_name);
+      fl_color_print_line(f_type_error, context.error, context.reset, "'.");
     }
     else if (status == f_no_data) {
-      fl_color_print(f_standard_error, context.error, context.reset, "ERROR: The parameter '");
-      fl_color_print(f_standard_error, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, parameter_name);
-      fl_color_print_line(f_standard_error, context.error, context.reset, "' must not be an empty string.");
+      fl_color_print(f_type_error, context.error, context.reset, "ERROR: The parameter '");
+      fl_color_print(f_type_error, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, parameter_name);
+      fl_color_print_line(f_type_error, context.error, context.reset, "' must not be an empty string.");
     }
     else {
-      fl_color_print(f_standard_error, context.error, context.reset, "INTERNAL ERROR: An unhandled error (");
-      fl_color_print(f_standard_error, context.notable, context.reset, "%u", status);
-      fl_color_print(f_standard_error, context.error, context.reset, ") has occurred while calling ");
-      fl_color_print(f_standard_error, context.notable, context.reset, "%s()", function_name);
-      fl_color_print(f_standard_error, context.error, context.reset, "' for the parameter '");
-      fl_color_print(f_standard_error, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, parameter_name);
-      fl_color_print(f_standard_error, context.error, context.reset, "' with the value '");
-      fl_color_print(f_standard_error, context.notable, context.reset, "%s", argument);
-      fl_color_print_line(f_standard_error, context.error, context.reset, "'.");
+      fl_color_print(f_type_error, context.error, context.reset, "INTERNAL ERROR: An unhandled error (");
+      fl_color_print(f_type_error, context.notable, context.reset, "%u", status);
+      fl_color_print(f_type_error, context.error, context.reset, ") has occurred while calling ");
+      fl_color_print(f_type_error, context.notable, context.reset, "%s()", function_name);
+      fl_color_print(f_type_error, context.error, context.reset, "' for the parameter '");
+      fl_color_print(f_type_error, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, parameter_name);
+      fl_color_print(f_type_error, context.error, context.reset, "' with the value '");
+      fl_color_print(f_type_error, context.notable, context.reset, "%s", argument);
+      fl_color_print_line(f_type_error, context.error, context.reset, "'.");
     }
   }
 #endif // _di_fss_basic_read_print_number_argument_error_
@@ -95,7 +95,7 @@ extern "C" {
 
       macro_fss_basic_read_depths_new(status, (*depths), depth_size);
       if (f_status_is_error(status)) {
-        fl_color_print_line(f_standard_error, data.context.error, data.context.reset, "CRITICAL ERROR: Unable to allocate memory.");
+        fl_color_print_line(f_type_error, data.context.error, data.context.reset, "CRITICAL ERROR: Unable to allocate memory.");
         return status;
       }
 
@@ -173,12 +173,12 @@ extern "C" {
 
             // @todo: move error printing into common function.
             if (status_code == f_error_allocation || status_code == f_error_reallocation) {
-              fl_color_print_line(f_standard_error, data.context.error, data.context.reset, "CRITICAL ERROR: Unable to allocate memory.");
+              fl_color_print_line(f_type_error, data.context.error, data.context.reset, "CRITICAL ERROR: Unable to allocate memory.");
             }
             else if (status_code == f_string_length_size) {
-              fl_color_print(f_standard_error, data.context.error, data.context.reset, "ERROR: Unable to process '");
-              fl_color_print(f_standard_error, data.context.notable, data.context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_trim);
-              fl_color_print_line(f_standard_error, data.context.error, data.context.reset, "' because the maximum buffer size was reached.");
+              fl_color_print(f_type_error, data.context.error, data.context.reset, "ERROR: Unable to process '");
+              fl_color_print(f_type_error, data.context.notable, data.context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_trim);
+              fl_color_print_line(f_type_error, data.context.error, data.context.reset, "' because the maximum buffer size was reached.");
             }
             else {
               f_string function = "fl_string_append";
@@ -187,20 +187,20 @@ extern "C" {
                 function = "fl_string_rip";
               }
 
-              fl_color_print(f_standard_error, data.context.error, data.context.reset, "INTERNAL ERROR: An unhandled error (");
-              fl_color_print(f_standard_error, data.context.notable, data.context.reset, "%u", status_code);
-              fl_color_print(f_standard_error, data.context.error, data.context.reset, ") has occurred while calling ");
-              fl_color_print(f_standard_error, data.context.notable, data.context.reset, "%s()", function);
-              fl_color_print_line(f_standard_error, data.context.error, data.context.reset, ".");
+              fl_color_print(f_type_error, data.context.error, data.context.reset, "INTERNAL ERROR: An unhandled error (");
+              fl_color_print(f_type_error, data.context.notable, data.context.reset, "%u", status_code);
+              fl_color_print(f_type_error, data.context.error, data.context.reset, ") has occurred while calling ");
+              fl_color_print(f_type_error, data.context.notable, data.context.reset, "%s()", function);
+              fl_color_print_line(f_type_error, data.context.error, data.context.reset, ".");
             }
 
             return status;
           }
 
           if (depths->array[i].value_name.used == 0) {
-            fl_color_print(f_standard_error, data.context.error, data.context.reset, "ERROR: The '");
-            fl_color_print(f_standard_error, data.context.notable, data.context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_name);
-            fl_color_print_line(f_standard_error, data.context.error, data.context.reset, "' must not be an empty string.");
+            fl_color_print(f_type_error, data.context.error, data.context.reset, "ERROR: The '");
+            fl_color_print(f_type_error, data.context.notable, data.context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_name);
+            fl_color_print_line(f_type_error, data.context.error, data.context.reset, "' must not be an empty string.");
 
             return f_status_set_error(f_invalid_parameter);
           }
@@ -211,22 +211,22 @@ extern "C" {
     for (f_array_length i = 0; i < depths->used; i++) {
       for (f_array_length j = i + 1; j < depths->used; j++) {
         if (depths->array[i].depth == depths->array[j].depth) {
-          fl_color_print(f_standard_error, data.context.error, data.context.reset, "ERROR: The value '");
-          fl_color_print(f_standard_error, data.context.notable, data.context.reset, "%llu", depths->array[i].depth);
-          fl_color_print(f_standard_error, data.context.error, data.context.reset, "' may only be specified once for the parameter '");
-          fl_color_print(f_standard_error, data.context.notable, data.context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_depth);
-          fl_color_print_line(f_standard_error, data.context.error, data.context.reset, "'.");
+          fl_color_print(f_type_error, data.context.error, data.context.reset, "ERROR: The value '");
+          fl_color_print(f_type_error, data.context.notable, data.context.reset, "%llu", depths->array[i].depth);
+          fl_color_print(f_type_error, data.context.error, data.context.reset, "' may only be specified once for the parameter '");
+          fl_color_print(f_type_error, data.context.notable, data.context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_depth);
+          fl_color_print_line(f_type_error, data.context.error, data.context.reset, "'.");
 
           return f_status_set_error(f_invalid_parameter);
         }
         else if (depths->array[i].depth > depths->array[j].depth) {
-          fl_color_print(f_standard_error, data.context.error, data.context.reset, "ERROR: The parameter '");
-          fl_color_print(f_standard_error, data.context.notable, data.context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_depth);
-          fl_color_print(f_standard_error, data.context.error, data.context.reset, "' may not have the value '");
-          fl_color_print(f_standard_error, data.context.notable, data.context.reset, "%llu", depths->array[i].depth);
-          fl_color_print(f_standard_error, data.context.error, data.context.reset, "' before the value '");
-          fl_color_print(f_standard_error, data.context.notable, data.context.reset, "%llu", depths->array[j].depth);
-          fl_color_print_line(f_standard_error, data.context.error, data.context.reset, "'.");
+          fl_color_print(f_type_error, data.context.error, data.context.reset, "ERROR: The parameter '");
+          fl_color_print(f_type_error, data.context.notable, data.context.reset, "%s%s", f_console_symbol_long_enable, fss_basic_read_long_depth);
+          fl_color_print(f_type_error, data.context.error, data.context.reset, "' may not have the value '");
+          fl_color_print(f_type_error, data.context.notable, data.context.reset, "%llu", depths->array[i].depth);
+          fl_color_print(f_type_error, data.context.error, data.context.reset, "' before the value '");
+          fl_color_print(f_type_error, data.context.notable, data.context.reset, "%llu", depths->array[j].depth);
+          fl_color_print_line(f_type_error, data.context.error, data.context.reset, "'.");
 
           return f_status_set_error(f_invalid_parameter);
         }
@@ -253,33 +253,33 @@ extern "C" {
         status = f_status_set_fine(status);
 
         if (status == f_invalid_parameter) {
-          fl_color_print(f_standard_error, data->context.error, data->context.reset, "INTERNAL ERROR: Invalid parameter when calling ");
-          fl_color_print(f_standard_error, data->context.notable, data->context.reset, "fll_fss_basic_list_read()");
-          fl_color_print(f_standard_error, data->context.error, data->context.reset, " for the file '");
-          fl_color_print(f_standard_error, data->context.notable, data->context.reset, "%s", filename);
-          fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "'.");
+          fl_color_print(f_type_error, data->context.error, data->context.reset, "INTERNAL ERROR: Invalid parameter when calling ");
+          fl_color_print(f_type_error, data->context.notable, data->context.reset, "fll_fss_basic_list_read()");
+          fl_color_print(f_type_error, data->context.error, data->context.reset, " for the file '");
+          fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s", filename);
+          fl_color_print_line(f_type_error, data->context.error, data->context.reset, "'.");
         }
         else if (status == f_error_allocation || status == f_error_reallocation) {
-          fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "CRITICAL ERROR: Unable to allocate memory.");
+          fl_color_print_line(f_type_error, data->context.error, data->context.reset, "CRITICAL ERROR: Unable to allocate memory.");
         }
         else if (status == f_incomplete_utf_on_stop) {
-          fl_color_print(f_standard_error, data->context.error, data->context.reset, "ENCODING ERROR: error occurred on invalid UTF-8 character at stop position (at ");
-          fl_color_print(f_standard_error, data->context.notable, data->context.reset, "%d", input.start);
-          fl_color_print_line(f_standard_error, data->context.error, data->context.reset, ").");
+          fl_color_print(f_type_error, data->context.error, data->context.reset, "ENCODING ERROR: error occurred on invalid UTF-8 character at stop position (at ");
+          fl_color_print(f_type_error, data->context.notable, data->context.reset, "%d", input.start);
+          fl_color_print_line(f_type_error, data->context.error, data->context.reset, ").");
         }
         else if (status == f_incomplete_utf_on_eos) {
-          fl_color_print(f_standard_error, data->context.error, data->context.reset, "ENCODING ERROR: error occurred on invalid UTF-8 character at end of string (at ");
-          fl_color_print(f_standard_error, data->context.notable, data->context.reset, "%d", input.start);
-          fl_color_print_line(f_standard_error, data->context.error, data->context.reset, ").");
+          fl_color_print(f_type_error, data->context.error, data->context.reset, "ENCODING ERROR: error occurred on invalid UTF-8 character at end of string (at ");
+          fl_color_print(f_type_error, data->context.notable, data->context.reset, "%d", input.start);
+          fl_color_print_line(f_type_error, data->context.error, data->context.reset, ").");
         }
         else {
-          fl_color_print(f_standard_error, data->context.error, data->context.reset, "INTERNAL ERROR: An unhandled error (");
-          fl_color_print(f_standard_error, data->context.notable, data->context.reset, "%u", status);
-          fl_color_print(f_standard_error, data->context.error, data->context.reset, ") has occurred while calling ");
-          fl_color_print(f_standard_error, data->context.notable, data->context.reset, "fll_fss_basic_list_read()");
-          fl_color_print(f_standard_error, data->context.error, data->context.reset, " for the file '");
-          fl_color_print(f_standard_error, data->context.notable, data->context.reset, "%s", filename);
-          fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "'.");
+          fl_color_print(f_type_error, data->context.error, data->context.reset, "INTERNAL ERROR: An unhandled error (");
+          fl_color_print(f_type_error, data->context.notable, data->context.reset, "%u", status);
+          fl_color_print(f_type_error, data->context.error, data->context.reset, ") has occurred while calling ");
+          fl_color_print(f_type_error, data->context.notable, data->context.reset, "fll_fss_basic_list_read()");
+          fl_color_print(f_type_error, data->context.error, data->context.reset, " for the file '");
+          fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s", filename);
+          fl_color_print_line(f_type_error, data->context.error, data->context.reset, "'.");
         }
 
         return f_status_set_error(status);
@@ -365,10 +365,10 @@ extern "C" {
       if (data->parameters[fss_basic_read_parameter_total].result == f_console_result_found) {
         if (depths.array[0].index_at > 0) {
           if (depths.array[0].value_at < data->objects.used && names[depths.array[0].value_at]) {
-            fprintf(f_standard_output, "1%c", f_string_eol);
+            fprintf(f_type_output, "1%c", f_string_eol);
           }
           else {
-            fprintf(f_standard_output, "0%c", f_string_eol);
+            fprintf(f_type_output, "0%c", f_string_eol);
           }
         }
         else if (depths.array[0].index_name > 0) {
@@ -380,10 +380,10 @@ extern "C" {
             total++;
           } // for
 
-          fprintf(f_standard_output, "%llu%c", total, f_string_eol);
+          fprintf(f_type_output, "%llu%c", total, f_string_eol);
         }
         else {
-          fprintf(f_standard_output, "%llu%c", data->objects.used, f_string_eol);
+          fprintf(f_type_output, "%llu%c", data->objects.used, f_string_eol);
         }
 
         return f_none;
@@ -402,8 +402,8 @@ extern "C" {
         for (; i < data->objects.used; i++) {
           if (names[i]) {
             if (at == depths.array[0].value_at) {
-              print_object(f_standard_output, data->buffer, data->objects.array[i]);
-              fprintf(f_standard_output, "%c", f_string_eol);
+              print_object(f_type_output, data->buffer, data->objects.array[i]);
+              fprintf(f_type_output, "%c", f_string_eol);
               break;
             }
 
@@ -417,8 +417,8 @@ extern "C" {
       for (f_array_length i = 0; i < data->objects.used; i++) {
         if (names[i] == 0) continue;
 
-        print_object(f_standard_output, data->buffer, data->objects.array[i]);
-        fprintf(f_standard_output, "%c", f_string_eol);
+        print_object(f_type_output, data->buffer, data->objects.array[i]);
+        fprintf(f_type_output, "%c", f_string_eol);
       } // for
 
       return f_none;
@@ -427,7 +427,7 @@ extern "C" {
     if (depths.array[0].index_at > 0) {
       if (depths.array[0].value_at >= data->objects.used) {
         if (names[depths.array[0].value_at] && data->parameters[fss_basic_read_parameter_total].result == f_console_result_found) {
-          fprintf(f_standard_output, "0%c", f_string_eol);
+          fprintf(f_type_output, "0%c", f_string_eol);
         }
 
         return f_none;
@@ -447,28 +447,28 @@ extern "C" {
           if (at == depths.array[0].value_at) {
             if (data->parameters[fss_basic_read_parameter_total].result == f_console_result_found) {
               if (data->contents.array[i].used == 0) {
-                fprintf(f_standard_output, "0%c", f_string_eol);
+                fprintf(f_type_output, "0%c", f_string_eol);
               }
               else {
-                fprintf(f_standard_output, "1%c", f_string_eol);
+                fprintf(f_type_output, "1%c", f_string_eol);
               }
             }
             else if (data->parameters[fss_basic_read_parameter_line].result == f_console_result_additional) {
               if (data->contents.array[i].used > 0) {
-                f_print_string_dynamic_partial(f_standard_output, data->buffer, data->contents.array[i].array[0]);
-                fprintf(f_standard_output, "%c", f_string_eol);
+                f_print_string_dynamic_partial(f_type_output, data->buffer, data->contents.array[i].array[0]);
+                fprintf(f_type_output, "%c", f_string_eol);
               }
               else if (include_empty) {
-                fprintf(f_standard_output, "%c", f_string_eol);
+                fprintf(f_type_output, "%c", f_string_eol);
               }
             }
             else {
               if (data->contents.array[i].used > 0) {
-                f_print_string_dynamic_partial(f_standard_output, data->buffer, data->contents.array[i].array[0]);
-                fprintf(f_standard_output, "%c", f_string_eol);
+                f_print_string_dynamic_partial(f_type_output, data->buffer, data->contents.array[i].array[0]);
+                fprintf(f_type_output, "%c", f_string_eol);
               }
               else if (include_empty) {
-                fprintf(f_standard_output, "%c", f_string_eol);
+                fprintf(f_type_output, "%c", f_string_eol);
               }
             }
 
@@ -497,7 +497,7 @@ extern "C" {
         total++;
       } // for
 
-      fprintf(f_standard_output, "%llu%c", total, f_string_eol);
+      fprintf(f_type_output, "%llu%c", total, f_string_eol);
       return f_none;
     }
 
@@ -512,7 +512,7 @@ extern "C" {
         if (data->contents.array[i].used == 0) {
           if (include_empty) {
             if (line_current == line) {
-              fprintf(f_standard_output, "%c", f_string_eol);
+              fprintf(f_type_output, "%c", f_string_eol);
               break;
             }
 
@@ -523,8 +523,8 @@ extern "C" {
         }
 
         if (line_current == line) {
-          f_print_string_dynamic_partial(f_standard_output, data->buffer, data->contents.array[i].array[0]);
-          fprintf(f_standard_output, "%c", f_string_eol);
+          f_print_string_dynamic_partial(f_type_output, data->buffer, data->contents.array[i].array[0]);
+          fprintf(f_type_output, "%c", f_string_eol);
 
           break;
         }
@@ -542,14 +542,14 @@ extern "C" {
 
       if (data->contents.array[i].used == 0) {
         if (include_empty) {
-          fprintf(f_standard_output, "%c", f_string_eol);
+          fprintf(f_type_output, "%c", f_string_eol);
         }
 
         continue;
       }
 
-      f_print_string_dynamic_partial(f_standard_output, data->buffer, data->contents.array[i].array[0]);
-      fprintf(f_standard_output, "%c", f_string_eol);
+      f_print_string_dynamic_partial(f_type_output, data->buffer, data->contents.array[i].array[0]);
+      fprintf(f_type_output, "%c", f_string_eol);
     } // for
 
     return f_none;
index e3e85d1ebc5fb08d49471f7cc1a598e2b3e4b721..9fdfec3ebf1eb977ad4ede5445dde2deb70e96ae 100644 (file)
@@ -62,27 +62,27 @@ extern "C" {
         f_file file = f_file_initialize;
         f_string_dynamic input = f_string_dynamic_initialize;
 
-        file.address = f_pipe;
+        file.id = f_type_descriptor_input;
 
-        status = fl_file_read(&file, &input);
+        status = f_file_read(file, &input);
 
         if (f_status_is_error(status)) {
           status = f_status_set_fine(status);
 
           if (status == f_invalid_parameter) {
-            fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "INTERNAL ERROR: Invalid parameter when calling f_file_open()");
+            fl_color_print_line(f_type_error, data->context.error, data->context.reset, "INTERNAL ERROR: Invalid parameter when calling f_file_open()");
           }
           else if (status == f_file_not_found) {
-            fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "ERROR: Unable to find the file '%s'", "-");
+            fl_color_print_line(f_type_error, data->context.error, data->context.reset, "ERROR: Unable to find the file '%s'", "-");
           }
           else if (status == f_file_error_open) {
-            fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "ERROR: Unable to open the file '%s'", "-");
+            fl_color_print_line(f_type_error, data->context.error, data->context.reset, "ERROR: Unable to open the file '%s'", "-");
           }
           else if (status == f_file_error_descriptor) {
-            fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "ERROR: File descriptor error while trying to open the file '%s'", "-");
+            fl_color_print_line(f_type_error, data->context.error, data->context.reset, "ERROR: File descriptor error while trying to open the file '%s'", "-");
           }
           else {
-            fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "INTERNAL ERROR: An unhandled error (%u) has occurred while calling f_file_open()", status);
+            fl_color_print_line(f_type_error, data->context.error, data->context.reset, "INTERNAL ERROR: An unhandled error (%u) has occurred while calling f_file_open()", status);
           }
 
           f_macro_string_dynamic_delete_simple(input);
@@ -140,48 +140,49 @@ extern "C" {
       if (data->parameters[fss_basic_write_parameter_file].result == f_console_result_additional) {
         f_file output = f_file_initialize;
 
-        output.mode = f_file_write_append;
-        status = f_file_open(&output, arguments.argv[data->parameters[fss_basic_write_parameter_file].additional.array[0]]);
+        output.flags = f_file_flag_append_wo;
+
+        status = f_file_open(arguments.argv[data->parameters[fss_basic_write_parameter_file].additional.array[0]], 0, &output);
 
         if (f_status_is_error(status)) {
           status = f_status_set_fine(status);
 
-          f_file_close(&output);
+          f_file_close(&output.id);
 
           if (status == f_invalid_parameter) {
-            fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "INTERNAL ERROR: Invalid parameter when calling f_file_open()");
+            fl_color_print_line(f_type_error, data->context.error, data->context.reset, "INTERNAL ERROR: Invalid parameter when calling f_file_open()");
           }
           else if (status == f_file_not_found) {
-            fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "ERROR: Unable to find the file '%s'", arguments.argv[data->parameters[fss_basic_write_parameter_file].additional.array[0]]);
+            fl_color_print_line(f_type_error, data->context.error, data->context.reset, "ERROR: Unable to find the file '%s'", arguments.argv[data->parameters[fss_basic_write_parameter_file].additional.array[0]]);
           }
           else if (status == f_file_error_open) {
-            fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "ERROR: Unable to open the file '%s'", arguments.argv[data->parameters[fss_basic_write_parameter_file].additional.array[0]]);
+            fl_color_print_line(f_type_error, data->context.error, data->context.reset, "ERROR: Unable to open the file '%s'", arguments.argv[data->parameters[fss_basic_write_parameter_file].additional.array[0]]);
           }
           else if (status == f_file_error_descriptor) {
-            fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "ERROR: File descriptor error while trying to open the file '%s'", arguments.argv[data->parameters[fss_basic_write_parameter_file].additional.array[0]]);
+            fl_color_print_line(f_type_error, data->context.error, data->context.reset, "ERROR: File descriptor error while trying to open the file '%s'", arguments.argv[data->parameters[fss_basic_write_parameter_file].additional.array[0]]);
           }
           else {
-            fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "INTERNAL ERROR: An unhandled error (%u) has occurred while calling f_file_open()", status);
+            fl_color_print_line(f_type_error, data->context.error, data->context.reset, "INTERNAL ERROR: An unhandled error (%u) has occurred while calling f_file_open()", status);
           }
 
           fss_basic_write_delete_data(data);
           return status;
         }
 
-        status = fl_file_write(output, buffer);
-        f_file_close(&output);
+        status = f_file_write(output, buffer, 0);
+        f_file_close(&output.id);
 
         if (f_status_is_error(status)) {
           status = f_status_set_fine(status);
 
           if (status == f_invalid_parameter) {
-            fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "INTERNAL ERROR: Invalid parameter when calling fl_file_write()");
+            fl_color_print_line(f_type_error, data->context.error, data->context.reset, "INTERNAL ERROR: Invalid parameter when calling fl_file_write()");
           }
           else if (status == f_file_error_write) {
-            fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "ERROR: Unable to write to the file '%s'", arguments.argv[data->parameters[fss_basic_write_parameter_file].additional.array[0]]);
+            fl_color_print_line(f_type_error, data->context.error, data->context.reset, "ERROR: Unable to write to the file '%s'", arguments.argv[data->parameters[fss_basic_write_parameter_file].additional.array[0]]);
           }
           else {
-            fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "INTERNAL ERROR: An unhandled error (%u) has occurred while calling fl_file_write()", status);
+            fl_color_print_line(f_type_error, data->context.error, data->context.reset, "INTERNAL ERROR: An unhandled error (%u) has occurred while calling fl_file_write()", status);
           }
 
           fss_basic_write_delete_data(data);
@@ -189,7 +190,7 @@ extern "C" {
         }
       }
       else {
-        f_print_string_dynamic(f_standard_output, buffer);
+        f_print_string_dynamic(f_type_output, buffer);
       }
     }
 
index 547e203ff0c111431572102db6d93c78ba0a9ce4..c144eec597a50f5b195060a8deca40ff6a6ae1c7 100644 (file)
@@ -29,7 +29,7 @@ extern "C" {
 
     fll_program_print_help_usage(context, fss_extended_list_read_name, "filename(s)");
 
-    fl_color_print(f_standard_output, context.important, context.reset, " Notes:");
+    fl_color_print(f_type_output, context.important, context.reset, " Notes:");
 
     printf("%c", f_string_eol, f_string_eol);
 
@@ -38,27 +38,27 @@ extern "C" {
     printf("%c", f_string_eol);
 
     printf("  When using the ");
-    fl_color_print(f_standard_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_depth);
+    fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_depth);
     printf(" option, an order of operations is enforced on the parameters.%c", f_string_eol);
 
     printf("  When this order of operations is in effect, parameters to the right of a depth parameter are influenced by that depth parameter:%c", f_string_eol);
 
     printf("    ");
-    fl_color_print(f_standard_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_at);
+    fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_at);
     printf(": An object index at the specified depth.%c", f_string_eol);
 
     printf("    ");
-    fl_color_print(f_standard_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_depth);
+    fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_depth);
     printf(": A new depth within the specified depth, indexed from the root.%c", f_string_eol);
 
     printf("    ");
-    fl_color_print(f_standard_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_name);
+    fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_name);
     printf(": An object name at the specified depth.%c", f_string_eol);
 
     printf("%c", f_string_eol);
 
     printf("  The parameter ");
-    fl_color_print(f_standard_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_depth);
+    fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_depth);
     printf(" must be in numeric order, but values in between may be skipped.%c", f_string_eol);
     printf("    ('-d 0 -a 1 -d 2 -a 2' would specify index 1 at depth 0, any index at depth 1, and index 2 at depth 2.)%c", f_string_eol);
     printf("    ('-d 2 -a 1 -d 0 -a 2' would be invalid because depth 2 is before depth 1.)%c", f_string_eol);
@@ -66,53 +66,53 @@ extern "C" {
     printf("%c", f_string_eol);
 
     printf("  The parameter ");
-    fl_color_print(f_standard_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_select);
+    fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_select);
     printf(" selects a content index at a given depth.%c", f_string_eol);
     printf("    (This parameter is not synonymous with the depth parameter and does not relate to nested content).%c", f_string_eol);
 
     printf("%c", f_string_eol);
 
     printf("  Specify both ");
-    fl_color_print(f_standard_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_object);
+    fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_object);
     printf(" and the ");
-    fl_color_print(f_standard_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_total);
+    fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_total);
     printf(" parameters to get the total objects.%c", f_string_eol);
 
     printf("%c", f_string_eol);
 
     printf("  When both ");
-    fl_color_print(f_standard_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_at);
+    fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_at);
     printf(" and ");
-    fl_color_print(f_standard_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_name);
+    fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_name);
     printf(" parameters are specified (at the same depth), the ");
-    fl_color_print(f_standard_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_at);
+    fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_at);
     printf(" parameter value will be treated as a position relative to the specified ");
-    fl_color_print(f_standard_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_name);
+    fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_name);
     printf(" parameter value.%c", f_string_eol);
 
     printf("%c", f_string_eol);
 
     printf("  This program may support parameters, such as ");
-    fl_color_print(f_standard_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_depth);
+    fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_depth);
     printf(" or ");
-    fl_color_print(f_standard_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_select);
+    fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_select);
     printf(", even if not supported by the standard.%c", f_string_eol);
     printf("  This is done to help ensure consistency for scripting.%c", f_string_eol);
 
     printf("%c", f_string_eol);
 
     printf("  For parameters like ");
-    fl_color_print(f_standard_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_depth);
+    fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_depth);
     printf(", if the standard doesn't support nested content, then only a depth of 0 would be valid.%c", f_string_eol);
 
     printf("  For parameters like ");
-    fl_color_print(f_standard_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_select);
+    fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_select);
     printf(", if the standard doesn't support multiple content groups, then only a select of 0 would be valid.%c", f_string_eol);
 
     printf("%c", f_string_eol);
 
     printf("  The parameter ");
-    fl_color_print(f_standard_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_trim);
+    fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_trim);
     printf(" will remove leading and trailing whitespaces when selecting objects or when printing objects.%c", f_string_eol);
 
     printf("%c", f_string_eol);
@@ -148,45 +148,45 @@ extern "C" {
     }
     else if (data->remaining.used > 0 || data->process_pipe) {
       if (data->parameters[fss_extended_list_read_parameter_at].result == f_console_result_found) {
-        fl_color_print(f_standard_error, data->context.error, data->context.reset, "ERROR: The parameter '");
-        fl_color_print(f_standard_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_at);
-        fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "' requires a positive number.");
+        fl_color_print(f_type_error, data->context.error, data->context.reset, "ERROR: The parameter '");
+        fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_at);
+        fl_color_print_line(f_type_error, data->context.error, data->context.reset, "' requires a positive number.");
 
         fss_extended_list_read_delete_data(data);
         return f_status_set_error(f_invalid_parameter);
       }
 
       if (data->parameters[fss_extended_list_read_parameter_depth].result == f_console_result_found) {
-        fl_color_print(f_standard_error, data->context.error, data->context.reset, "ERROR: The parameter '");
-        fl_color_print(f_standard_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_depth);
-        fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "' requires a positive number.");
+        fl_color_print(f_type_error, data->context.error, data->context.reset, "ERROR: The parameter '");
+        fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_depth);
+        fl_color_print_line(f_type_error, data->context.error, data->context.reset, "' requires a positive number.");
 
         fss_extended_list_read_delete_data(data);
         return f_status_set_error(f_invalid_parameter);
       }
 
       if (data->parameters[fss_extended_list_read_parameter_line].result == f_console_result_found) {
-        fl_color_print(f_standard_error, data->context.error, data->context.reset, "ERROR: The parameter '");
-        fl_color_print(f_standard_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_line);
-        fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "' requires a positive number.");
+        fl_color_print(f_type_error, data->context.error, data->context.reset, "ERROR: The parameter '");
+        fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_line);
+        fl_color_print_line(f_type_error, data->context.error, data->context.reset, "' requires a positive number.");
 
         fss_extended_list_read_delete_data(data);
         return f_status_set_error(f_invalid_parameter);
       }
 
       if (data->parameters[fss_extended_list_read_parameter_name].result == f_console_result_found) {
-        fl_color_print(f_standard_error, data->context.error, data->context.reset, "ERROR: The parameter '");
-        fl_color_print(f_standard_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_name);
-        fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "' requires a string.");
+        fl_color_print(f_type_error, data->context.error, data->context.reset, "ERROR: The parameter '");
+        fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_name);
+        fl_color_print_line(f_type_error, data->context.error, data->context.reset, "' requires a string.");
 
         fss_extended_list_read_delete_data(data);
         return f_status_set_error(f_invalid_parameter);
       }
 
       if (data->parameters[fss_extended_list_read_parameter_select].result == f_console_result_found) {
-        fl_color_print(f_standard_error, data->context.error, data->context.reset, "ERROR: The parameter '");
-        fl_color_print(f_standard_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_select);
-        fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "' requires a positive number.");
+        fl_color_print(f_type_error, data->context.error, data->context.reset, "ERROR: The parameter '");
+        fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_select);
+        fl_color_print_line(f_type_error, data->context.error, data->context.reset, "' requires a positive number.");
 
         fss_extended_list_read_delete_data(data);
         return f_status_set_error(f_invalid_parameter);
@@ -194,22 +194,22 @@ extern "C" {
 
       if (data->parameters[fss_extended_list_read_parameter_object].result == f_console_result_found) {
         if (data->parameters[fss_extended_list_read_parameter_line].result == f_console_result_additional) {
-          fl_color_print(f_standard_error, data->context.error, data->context.reset, "ERROR: Cannot specify the '");
-          fl_color_print(f_standard_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_object);
-          fl_color_print(f_standard_error, data->context.error, data->context.reset, "' parameter with the '");
-          fl_color_print(f_standard_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_line);
-          fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "' parameter.");
+          fl_color_print(f_type_error, data->context.error, data->context.reset, "ERROR: Cannot specify the '");
+          fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_object);
+          fl_color_print(f_type_error, data->context.error, data->context.reset, "' parameter with the '");
+          fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_line);
+          fl_color_print_line(f_type_error, data->context.error, data->context.reset, "' parameter.");
 
           fss_extended_list_read_delete_data(data);
           return f_status_set_error(f_invalid_parameter);
         }
 
         if (data->parameters[fss_extended_list_read_parameter_select].result == f_console_result_additional) {
-          fl_color_print(f_standard_error, data->context.error, data->context.reset, "ERROR: Cannot specify the '");
-          fl_color_print(f_standard_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_object);
-          fl_color_print(f_standard_error, data->context.error, data->context.reset, "' parameter with the '");
-          fl_color_print(f_standard_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_select);
-          fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "' parameter.");
+          fl_color_print(f_type_error, data->context.error, data->context.reset, "ERROR: Cannot specify the '");
+          fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_object);
+          fl_color_print(f_type_error, data->context.error, data->context.reset, "' parameter with the '");
+          fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_select);
+          fl_color_print_line(f_type_error, data->context.error, data->context.reset, "' parameter.");
 
           fss_extended_list_read_delete_data(data);
           return f_status_set_error(f_invalid_parameter);
@@ -218,11 +218,11 @@ extern "C" {
 
       if (data->parameters[fss_extended_list_read_parameter_line].result == f_console_result_additional) {
         if (data->parameters[fss_extended_list_read_parameter_total].result == f_console_result_found) {
-          fl_color_print(f_standard_error, data->context.error, data->context.reset, "ERROR: Cannot specify the '");
-          fl_color_print(f_standard_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_line);
-          fl_color_print(f_standard_error, data->context.error, data->context.reset, "' parameter with the '");
-          fl_color_print(f_standard_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_total);
-          fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "' parameter.");
+          fl_color_print(f_type_error, data->context.error, data->context.reset, "ERROR: Cannot specify the '");
+          fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_line);
+          fl_color_print(f_type_error, data->context.error, data->context.reset, "' parameter with the '");
+          fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_total);
+          fl_color_print_line(f_type_error, data->context.error, data->context.reset, "' parameter.");
 
           fss_extended_list_read_delete_data(data);
           return f_status_set_error(f_invalid_parameter);
@@ -232,7 +232,7 @@ extern "C" {
       fss_extended_list_read_depths depths = fss_extended_list_read_depths_initialize;
 
       f_string_length counter = 0;
-      f_string_length original_size = data->file_position.total;
+      f_string_length original_size = data->quantity.total;
 
       status = fss_extended_list_read_main_preprocess_depth(arguments, *data, &depths);
       if (f_status_is_error(status)) {
@@ -242,9 +242,9 @@ extern "C" {
       }
 
       if (data->parameters[fss_extended_list_read_parameter_select].result == f_console_result_found) {
-        fl_color_print(f_standard_error, data->context.error, data->context.reset, "ERROR: the '");
-        fl_color_print(f_standard_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_select);
-        fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "' parameter requires a positive number.");
+        fl_color_print(f_type_error, data->context.error, data->context.reset, "ERROR: the '");
+        fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_select);
+        fl_color_print_line(f_type_error, data->context.error, data->context.reset, "' parameter requires a positive number.");
 
         macro_fss_extended_list_read_depths_delete_simple(depths);
         fss_extended_list_read_delete_data(data);
@@ -254,9 +254,9 @@ extern "C" {
       if (data->process_pipe) {
         f_file file = f_file_initialize;
 
-        file.address = f_pipe;
+        file.id = f_type_descriptor_input;
 
-        status = fl_file_read(&file, &data->buffer);
+        status = f_file_read(file, &data->buffer);
 
         if (f_status_is_error(status)) {
           fss_extended_list_read_print_file_error(data->context, "fl_file_read", "-", f_status_set_fine(status));
@@ -283,9 +283,9 @@ extern "C" {
         for (; counter < data->remaining.used; counter++) {
           f_file file = f_file_initialize;
 
-          status = f_file_open(&file, arguments.argv[data->remaining.array[counter]]);
+          status = f_file_open(arguments.argv[data->remaining.array[counter]], 0, &file);
 
-          data->file_position.total = original_size;
+          data->quantity.total = original_size;
 
           if (f_status_is_error(status)) {
             fss_extended_list_read_print_file_error(data->context, "f_file_open", arguments.argv[data->remaining.array[counter]], f_status_set_fine(status));
@@ -295,26 +295,28 @@ extern "C" {
             return status;
           }
 
-          if (data->file_position.total == 0) {
-            fseek(file.address, 0, SEEK_END);
+          if (data->quantity.total == 0) {
+            status = f_file_size_by_id(file.id, &data->quantity.total);
 
-            data->file_position.total = ftell(file.address);
+            if (f_status_is_error(status)) {
+              fss_extended_list_read_print_file_error(data->context, "f_file_size_by_id", arguments.argv[data->remaining.array[counter]], f_status_set_fine(status));
+              macro_fss_extended_list_read_depths_delete_simple(depths);
+              fss_extended_list_read_delete_data(data);
+            }
 
             // Skip past empty files.
-            if (data->file_position.total == 0) {
-              f_file_close(&file);
+            if (data->quantity.total == 0) {
+              f_file_close(&file.id);
               continue;
             }
-
-            fseek(file.address, 0, SEEK_SET);
           }
 
-          status = fl_file_read_position(&file, &data->buffer, data->file_position);
+          status = f_file_read_until(file, &data->buffer, data->quantity.total);
 
-          f_file_close(&file);
+          f_file_close(&file.id);
 
           if (f_status_is_error(status)) {
-            fss_extended_list_read_print_file_error(data->context, "fl_file_read_position", arguments.argv[data->remaining.array[counter]], f_status_set_fine(status));
+            fss_extended_list_read_print_file_error(data->context, "f_file_read_until", arguments.argv[data->remaining.array[counter]], f_status_set_fine(status));
 
             macro_fss_extended_list_read_depths_delete_simple(depths);
             fss_extended_list_read_delete_data(data);
@@ -338,7 +340,7 @@ extern "C" {
       macro_fss_extended_list_read_depths_delete_simple(depths);
     }
     else {
-      fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "ERROR: you failed to specify one or more files.");
+      fl_color_print_line(f_type_error, data->context.error, data->context.reset, "ERROR: you failed to specify one or more files.");
       status = f_status_set_error(f_invalid_parameter);
     }
 
index e842bb473cc64840e9f0b0b25a4c505a5b635736..4f317629561d37d83f9135eb01da54b79d0af7cd 100644 (file)
@@ -135,7 +135,7 @@ extern "C" {
       f_console_parameter_initialize_fss_extended_list_read, \
       f_string_dynamic_initialize, \
       f_fss_nest_initialize, \
-      f_quantity_initialize, \
+      f_string_quantity_initialize, \
       f_string_lengths_initialize, \
       f_false, \
       fl_color_context_initialize, \
index 8237b4a3f80190b1deb4a097fc65eee6d64d1b6d..958b83d5ab67d5779f5b4a175b8758afdaf278f4 100644 (file)
@@ -4,7 +4,7 @@ int main(const unsigned long argc, const f_string *argv) {
   const f_console_arguments arguments = { argc, argv };
   fss_extended_list_read_data data = fss_extended_list_read_data_initialize;
 
-  if (f_pipe_exists()) {
+  if (f_pipe_input_exists()) {
     data.process_pipe = f_true;
   }
 
index 2dba501fa79ac6e96efecd208b6544f1c8c1c8d2..fec3180ed0ec4cc82e1f18917929f865dd0a2b58 100644 (file)
@@ -8,12 +8,12 @@ extern "C" {
 #ifndef _di_fss_extended_list_read_print_file_error_
   void fss_extended_list_read_print_file_error(const fl_color_context context, const f_string function_name, const f_string file_name, const f_status status) {
 
-    if (fll_file_error_print(f_standard_error, context, function_name, file_name, status) == f_false) {
-      fl_color_print(f_standard_error, context.error, context.reset, "INTERNAL ERROR: An unhandled error (");
-      fl_color_print(f_standard_error, context.notable, context.reset, "%u", status);
-      fl_color_print(f_standard_error, context.error, context.reset, ") has occurred while calling ");
-      fl_color_print(f_standard_error, context.notable, context.reset, "%s()", function_name);
-      fl_color_print_line(f_standard_error, context.error, context.reset, ".");
+    if (fll_file_error_print(f_type_error, context, function_name, file_name, status) == f_false) {
+      fl_color_print(f_type_error, context.error, context.reset, "INTERNAL ERROR: An unhandled error (");
+      fl_color_print(f_type_error, context.notable, context.reset, "%u", status);
+      fl_color_print(f_type_error, context.error, context.reset, ") has occurred while calling ");
+      fl_color_print(f_type_error, context.notable, context.reset, "%s()", function_name);
+      fl_color_print_line(f_type_error, context.error, context.reset, ".");
     }
   }
 #endif // _di_fss_extended_list_read_print_file_error_
@@ -22,62 +22,62 @@ extern "C" {
   void fss_extended_list_read_print_number_argument_error(const fl_color_context context, const f_string function_name, const f_string parameter_name, const f_string argument, const f_status status) {
 
     if (status == f_invalid_parameter) {
-      fl_color_print(f_standard_error, context.error, context.reset, "INTERNAL ERROR: Invalid parameter when calling ");
-      fl_color_print(f_standard_error, context.notable, context.reset, "%s()", function_name);
-      fl_color_print_line(f_standard_error, context.error, context.reset, ".");
+      fl_color_print(f_type_error, context.error, context.reset, "INTERNAL ERROR: Invalid parameter when calling ");
+      fl_color_print(f_type_error, context.notable, context.reset, "%s()", function_name);
+      fl_color_print_line(f_type_error, context.error, context.reset, ".");
     }
     else if (status == f_number_invalid) {
-      fl_color_print(f_standard_error, context.error, context.reset, "ERROR: The argument '");
-      fl_color_print(f_standard_error, context.notable, context.reset, "%s", argument);
-      fl_color_print(f_standard_error, context.error, context.reset, "' is not a valid number for the parameter '");
-      fl_color_print(f_standard_error, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, parameter_name);
-      fl_color_print_line(f_standard_error, context.error, context.reset, "'.");
+      fl_color_print(f_type_error, context.error, context.reset, "ERROR: The argument '");
+      fl_color_print(f_type_error, context.notable, context.reset, "%s", argument);
+      fl_color_print(f_type_error, context.error, context.reset, "' is not a valid number for the parameter '");
+      fl_color_print(f_type_error, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, parameter_name);
+      fl_color_print_line(f_type_error, context.error, context.reset, "'.");
     }
     else if (status == f_number_underflow) {
-      fl_color_print(f_standard_error, context.error, context.reset, "ERROR: The argument '");
-      fl_color_print(f_standard_error, context.notable, context.reset, "%s", argument);
-      fl_color_print(f_standard_error, context.error, context.reset, "' is too small for the parameter '");
-      fl_color_print(f_standard_error, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, parameter_name);
-      fl_color_print_line(f_standard_error, context.error, context.reset, "'.");
+      fl_color_print(f_type_error, context.error, context.reset, "ERROR: The argument '");
+      fl_color_print(f_type_error, context.notable, context.reset, "%s", argument);
+      fl_color_print(f_type_error, context.error, context.reset, "' is too small for the parameter '");
+      fl_color_print(f_type_error, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, parameter_name);
+      fl_color_print_line(f_type_error, context.error, context.reset, "'.");
     }
     else if (status == f_number_overflow) {
-      fl_color_print(f_standard_error, context.error, context.reset, "ERROR: The argument '");
-      fl_color_print(f_standard_error, context.notable, context.reset, "%s", argument);
-      fl_color_print(f_standard_error, context.error, context.reset, "' is too large for the parameter '");
-      fl_color_print(f_standard_error, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, parameter_name);
-      fl_color_print_line(f_standard_error, context.error, context.reset, "'.");
+      fl_color_print(f_type_error, context.error, context.reset, "ERROR: The argument '");
+      fl_color_print(f_type_error, context.notable, context.reset, "%s", argument);
+      fl_color_print(f_type_error, context.error, context.reset, "' is too large for the parameter '");
+      fl_color_print(f_type_error, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, parameter_name);
+      fl_color_print_line(f_type_error, context.error, context.reset, "'.");
     }
     else if (status == f_number_negative) {
-      fl_color_print(f_standard_error, context.error, context.reset, "ERROR: The argument '");
-      fl_color_print(f_standard_error, context.notable, context.reset, "%s", argument);
-      fl_color_print(f_standard_error, context.error, context.reset, "' is negative, which is not allowed for the parameter '");
-      fl_color_print(f_standard_error, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, parameter_name);
-      fl_color_print_line(f_standard_error, context.error, context.reset, "'.");
+      fl_color_print(f_type_error, context.error, context.reset, "ERROR: The argument '");
+      fl_color_print(f_type_error, context.notable, context.reset, "%s", argument);
+      fl_color_print(f_type_error, context.error, context.reset, "' is negative, which is not allowed for the parameter '");
+      fl_color_print(f_type_error, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, parameter_name);
+      fl_color_print_line(f_type_error, context.error, context.reset, "'.");
     }
     else if (status == f_number_positive) {
-      fl_color_print(f_standard_error, context.error, context.reset, "ERROR: The argument '");
-      fl_color_print(f_standard_error, context.notable, context.reset, "%s", argument);
-      fl_color_print(f_standard_error, context.error, context.reset, "' contains a '");
-      fl_color_print(f_standard_error, context.notable, context.reset, "+");
-      fl_color_print(f_standard_error, context.error, context.reset, "', which is not allowed for the parameter '");
-      fl_color_print(f_standard_error, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, parameter_name);
-      fl_color_print_line(f_standard_error, context.error, context.reset, "'.");
+      fl_color_print(f_type_error, context.error, context.reset, "ERROR: The argument '");
+      fl_color_print(f_type_error, context.notable, context.reset, "%s", argument);
+      fl_color_print(f_type_error, context.error, context.reset, "' contains a '");
+      fl_color_print(f_type_error, context.notable, context.reset, "+");
+      fl_color_print(f_type_error, context.error, context.reset, "', which is not allowed for the parameter '");
+      fl_color_print(f_type_error, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, parameter_name);
+      fl_color_print_line(f_type_error, context.error, context.reset, "'.");
     }
     else if (status == f_no_data) {
-      fl_color_print(f_standard_error, context.error, context.reset, "ERROR: The parameter '");
-      fl_color_print(f_standard_error, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, parameter_name);
-      fl_color_print_line(f_standard_error, context.error, context.reset, "' must not be an empty string.");
+      fl_color_print(f_type_error, context.error, context.reset, "ERROR: The parameter '");
+      fl_color_print(f_type_error, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, parameter_name);
+      fl_color_print_line(f_type_error, context.error, context.reset, "' must not be an empty string.");
     }
     else {
-      fl_color_print(f_standard_error, context.error, context.reset, "INTERNAL ERROR: An unhandled error (");
-      fl_color_print(f_standard_error, context.notable, context.reset, "%u", status);
-      fl_color_print(f_standard_error, context.error, context.reset, ") has occurred while calling ");
-      fl_color_print(f_standard_error, context.notable, context.reset, "%s()", function_name);
-      fl_color_print(f_standard_error, context.error, context.reset, "' for the parameter '");
-      fl_color_print(f_standard_error, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, parameter_name);
-      fl_color_print(f_standard_error, context.error, context.reset, "' with the value '");
-      fl_color_print(f_standard_error, context.notable, context.reset, "%s", argument);
-      fl_color_print_line(f_standard_error, context.error, context.reset, "'.");
+      fl_color_print(f_type_error, context.error, context.reset, "INTERNAL ERROR: An unhandled error (");
+      fl_color_print(f_type_error, context.notable, context.reset, "%u", status);
+      fl_color_print(f_type_error, context.error, context.reset, ") has occurred while calling ");
+      fl_color_print(f_type_error, context.notable, context.reset, "%s()", function_name);
+      fl_color_print(f_type_error, context.error, context.reset, "' for the parameter '");
+      fl_color_print(f_type_error, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, parameter_name);
+      fl_color_print(f_type_error, context.error, context.reset, "' with the value '");
+      fl_color_print(f_type_error, context.notable, context.reset, "%s", argument);
+      fl_color_print_line(f_type_error, context.error, context.reset, "'.");
     }
   }
 #endif // _di_fss_extended_list_read_print_number_argument_error_
@@ -95,7 +95,7 @@ extern "C" {
 
       macro_fss_extended_list_read_depths_new(status, (*depths), depth_size);
       if (f_status_is_error(status)) {
-        fl_color_print_line(f_standard_error, data.context.error, data.context.reset, "CRITICAL ERROR: Unable to allocate memory.");
+        fl_color_print_line(f_type_error, data.context.error, data.context.reset, "CRITICAL ERROR: Unable to allocate memory.");
         return status;
       }
 
@@ -173,12 +173,12 @@ extern "C" {
 
             // @todo: move error printing into common function.
             if (status_code == f_error_allocation || status_code == f_error_reallocation) {
-              fl_color_print_line(f_standard_error, data.context.error, data.context.reset, "CRITICAL ERROR: Unable to allocate memory.");
+              fl_color_print_line(f_type_error, data.context.error, data.context.reset, "CRITICAL ERROR: Unable to allocate memory.");
             }
             else if (status_code == f_string_length_size) {
-              fl_color_print(f_standard_error, data.context.error, data.context.reset, "ERROR: Unable to process '");
-              fl_color_print(f_standard_error, data.context.notable, data.context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_trim);
-              fl_color_print_line(f_standard_error, data.context.error, data.context.reset, "' because the maximum buffer size was reached.");
+              fl_color_print(f_type_error, data.context.error, data.context.reset, "ERROR: Unable to process '");
+              fl_color_print(f_type_error, data.context.notable, data.context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_trim);
+              fl_color_print_line(f_type_error, data.context.error, data.context.reset, "' because the maximum buffer size was reached.");
             }
             else {
               f_string function = "fl_string_append";
@@ -187,20 +187,20 @@ extern "C" {
                 function = "fl_string_rip";
               }
 
-              fl_color_print(f_standard_error, data.context.error, data.context.reset, "INTERNAL ERROR: An unhandled error (");
-              fl_color_print(f_standard_error, data.context.notable, data.context.reset, "%u", status_code);
-              fl_color_print(f_standard_error, data.context.error, data.context.reset, ") has occurred while calling ");
-              fl_color_print(f_standard_error, data.context.notable, data.context.reset, "%s()", function);
-              fl_color_print_line(f_standard_error, data.context.error, data.context.reset, ".");
+              fl_color_print(f_type_error, data.context.error, data.context.reset, "INTERNAL ERROR: An unhandled error (");
+              fl_color_print(f_type_error, data.context.notable, data.context.reset, "%u", status_code);
+              fl_color_print(f_type_error, data.context.error, data.context.reset, ") has occurred while calling ");
+              fl_color_print(f_type_error, data.context.notable, data.context.reset, "%s()", function);
+              fl_color_print_line(f_type_error, data.context.error, data.context.reset, ".");
             }
 
             return status;
           }
 
           if (depths->array[i].value_name.used == 0) {
-            fl_color_print(f_standard_error, data.context.error, data.context.reset, "ERROR: The '");
-            fl_color_print(f_standard_error, data.context.notable, data.context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_name);
-            fl_color_print_line(f_standard_error, data.context.error, data.context.reset, "' must not be an empty string.");
+            fl_color_print(f_type_error, data.context.error, data.context.reset, "ERROR: The '");
+            fl_color_print(f_type_error, data.context.notable, data.context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_name);
+            fl_color_print_line(f_type_error, data.context.error, data.context.reset, "' must not be an empty string.");
 
             return f_status_set_error(f_invalid_parameter);
           }
@@ -211,22 +211,22 @@ extern "C" {
     for (f_array_length i = 0; i < depths->used; i++) {
       for (f_array_length j = i + 1; j < depths->used; j++) {
         if (depths->array[i].depth == depths->array[j].depth) {
-          fl_color_print(f_standard_error, data.context.error, data.context.reset, "ERROR: The value '");
-          fl_color_print(f_standard_error, data.context.notable, data.context.reset, "%llu", depths->array[i].depth);
-          fl_color_print(f_standard_error, data.context.error, data.context.reset, "' may only be specified once for the parameter '");
-          fl_color_print(f_standard_error, data.context.notable, data.context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_depth);
-          fl_color_print_line(f_standard_error, data.context.error, data.context.reset, "'.");
+          fl_color_print(f_type_error, data.context.error, data.context.reset, "ERROR: The value '");
+          fl_color_print(f_type_error, data.context.notable, data.context.reset, "%llu", depths->array[i].depth);
+          fl_color_print(f_type_error, data.context.error, data.context.reset, "' may only be specified once for the parameter '");
+          fl_color_print(f_type_error, data.context.notable, data.context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_depth);
+          fl_color_print_line(f_type_error, data.context.error, data.context.reset, "'.");
 
           return f_status_set_error(f_invalid_parameter);
         }
         else if (depths->array[i].depth > depths->array[j].depth) {
-          fl_color_print(f_standard_error, data.context.error, data.context.reset, "ERROR: The parameter '");
-          fl_color_print(f_standard_error, data.context.notable, data.context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_depth);
-          fl_color_print(f_standard_error, data.context.error, data.context.reset, "' may not have the value '");
-          fl_color_print(f_standard_error, data.context.notable, data.context.reset, "%llu", depths->array[i].depth);
-          fl_color_print(f_standard_error, data.context.error, data.context.reset, "' before the value '");
-          fl_color_print(f_standard_error, data.context.notable, data.context.reset, "%llu", depths->array[j].depth);
-          fl_color_print_line(f_standard_error, data.context.error, data.context.reset, "'.");
+          fl_color_print(f_type_error, data.context.error, data.context.reset, "ERROR: The parameter '");
+          fl_color_print(f_type_error, data.context.notable, data.context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_list_read_long_depth);
+          fl_color_print(f_type_error, data.context.error, data.context.reset, "' may not have the value '");
+          fl_color_print(f_type_error, data.context.notable, data.context.reset, "%llu", depths->array[i].depth);
+          fl_color_print(f_type_error, data.context.error, data.context.reset, "' before the value '");
+          fl_color_print(f_type_error, data.context.notable, data.context.reset, "%llu", depths->array[j].depth);
+          fl_color_print_line(f_type_error, data.context.error, data.context.reset, "'.");
 
           return f_status_set_error(f_invalid_parameter);
         }
@@ -253,33 +253,33 @@ extern "C" {
         status = f_status_set_fine(status);
 
         if (status == f_invalid_parameter) {
-          fl_color_print(f_standard_error, data->context.error, data->context.reset, "INTERNAL ERROR: Invalid parameter when calling ");
-          fl_color_print(f_standard_error, data->context.notable, data->context.reset, "fll_fss_extended_list_read()");
-          fl_color_print(f_standard_error, data->context.error, data->context.reset, " for the file '");
-          fl_color_print(f_standard_error, data->context.notable, data->context.reset, "%s", filename);
-          fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "'.");
+          fl_color_print(f_type_error, data->context.error, data->context.reset, "INTERNAL ERROR: Invalid parameter when calling ");
+          fl_color_print(f_type_error, data->context.notable, data->context.reset, "fll_fss_extended_list_read()");
+          fl_color_print(f_type_error, data->context.error, data->context.reset, " for the file '");
+          fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s", filename);
+          fl_color_print_line(f_type_error, data->context.error, data->context.reset, "'.");
         }
         else if (status == f_error_allocation || status == f_error_reallocation) {
-          fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "CRITICAL ERROR: Unable to allocate memory.");
+          fl_color_print_line(f_type_error, data->context.error, data->context.reset, "CRITICAL ERROR: Unable to allocate memory.");
         }
         else if (status == f_incomplete_utf_on_stop) {
-          fl_color_print(f_standard_error, data->context.error, data->context.reset, "ENCODING ERROR: error occurred on invalid UTF-8 character at stop position (at ");
-          fl_color_print(f_standard_error, data->context.notable, data->context.reset, "%d", input.start);
-          fl_color_print_line(f_standard_error, data->context.error, data->context.reset, ").");
+          fl_color_print(f_type_error, data->context.error, data->context.reset, "ENCODING ERROR: error occurred on invalid UTF-8 character at stop position (at ");
+          fl_color_print(f_type_error, data->context.notable, data->context.reset, "%d", input.start);
+          fl_color_print_line(f_type_error, data->context.error, data->context.reset, ").");
         }
         else if (status == f_incomplete_utf_on_eos) {
-          fl_color_print(f_standard_error, data->context.error, data->context.reset, "ENCODING ERROR: error occurred on invalid UTF-8 character at end of string (at ");
-          fl_color_print(f_standard_error, data->context.notable, data->context.reset, "%d", input.start);
-          fl_color_print_line(f_standard_error, data->context.error, data->context.reset, ").");
+          fl_color_print(f_type_error, data->context.error, data->context.reset, "ENCODING ERROR: error occurred on invalid UTF-8 character at end of string (at ");
+          fl_color_print(f_type_error, data->context.notable, data->context.reset, "%d", input.start);
+          fl_color_print_line(f_type_error, data->context.error, data->context.reset, ").");
         }
         else {
-          fl_color_print(f_standard_error, data->context.error, data->context.reset, "INTERNAL ERROR: An unhandled error (");
-          fl_color_print(f_standard_error, data->context.notable, data->context.reset, "%u", status);
-          fl_color_print(f_standard_error, data->context.error, data->context.reset, ") has occurred while calling ");
-          fl_color_print(f_standard_error, data->context.notable, data->context.reset, "fll_fss_extended_list_read()");
-          fl_color_print(f_standard_error, data->context.error, data->context.reset, " for the file '");
-          fl_color_print(f_standard_error, data->context.notable, data->context.reset, "%s", filename);
-          fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "'.");
+          fl_color_print(f_type_error, data->context.error, data->context.reset, "INTERNAL ERROR: An unhandled error (");
+          fl_color_print(f_type_error, data->context.notable, data->context.reset, "%u", status);
+          fl_color_print(f_type_error, data->context.error, data->context.reset, ") has occurred while calling ");
+          fl_color_print(f_type_error, data->context.notable, data->context.reset, "fll_fss_extended_list_read()");
+          fl_color_print(f_type_error, data->context.error, data->context.reset, " for the file '");
+          fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s", filename);
+          fl_color_print_line(f_type_error, data->context.error, data->context.reset, "'.");
         }
 
         return f_status_set_error(status);
@@ -296,7 +296,7 @@ extern "C" {
     // Requested depths cannot be greater than contents depth.
     if (depths.used > data->nest.used) {
       if (data->parameters[fss_extended_list_read_parameter_total].result == f_console_result_found) {
-        fprintf(f_standard_output, "0%c", f_string_eol);
+        fprintf(f_type_output, "0%c", f_string_eol);
         return f_none;
       }
 
@@ -385,10 +385,10 @@ extern "C" {
 
         if (depth_setting.index_at > 0) {
           if (depth_setting.value_at < items->used && names[depth_setting.value_at]) {
-            fprintf(f_standard_output, "1%c", f_string_eol);
+            fprintf(f_type_output, "1%c", f_string_eol);
           }
           else {
-            fprintf(f_standard_output, "0%c", f_string_eol);
+            fprintf(f_type_output, "0%c", f_string_eol);
           }
 
           return f_none;
@@ -402,12 +402,12 @@ extern "C" {
             total++;
           } // for
 
-          fprintf(f_standard_output, "%llu%c", total, f_string_eol);
+          fprintf(f_type_output, "%llu%c", total, f_string_eol);
 
           return f_none;
         }
 
-        fprintf(f_standard_output, "%llu%c", items->used, f_string_eol);
+        fprintf(f_type_output, "%llu%c", items->used, f_string_eol);
 
         return f_none;
       }
@@ -420,8 +420,8 @@ extern "C" {
 
       if (depth_setting.index_at > 0) {
         if (depth_setting.value_at < items->used && names[depth_setting.value_at]) {
-          print_object(f_standard_output, data->buffer, items->array[depth_setting.value_at].object);
-          fprintf(f_standard_output, "%c", f_string_eol);
+          print_object(f_type_output, data->buffer, items->array[depth_setting.value_at].object);
+          fprintf(f_type_output, "%c", f_string_eol);
         }
 
         return f_none;
@@ -429,8 +429,8 @@ extern "C" {
 
       for (f_array_length i = 0; i < items->used; i++) {
         if (names[i]) {
-          print_object(f_standard_output, data->buffer, items->array[i].object);
-          fprintf(f_standard_output, "%c", f_string_eol);
+          print_object(f_type_output, data->buffer, items->array[i].object);
+          fprintf(f_type_output, "%c", f_string_eol);
         }
       } // for
 
@@ -440,7 +440,7 @@ extern "C" {
     if (depth_setting.index_at > 0) {
       if (depth_setting.value_at >= items->used) {
         if (names[depth_setting.value_at] && data->parameters[fss_extended_list_read_parameter_total].result == f_console_result_found) {
-          fprintf(f_standard_output, "0%c", f_string_eol);
+          fprintf(f_type_output, "0%c", f_string_eol);
         }
 
         return f_none;
@@ -454,7 +454,7 @@ extern "C" {
           if (at == depth_setting.value_at) {
             if (data->parameters[fss_extended_list_read_parameter_total].result == f_console_result_found) {
               if (items->array[i].content.used == 0) {
-                fprintf(f_standard_output, "0%c", f_string_eol);
+                fprintf(f_type_output, "0%c", f_string_eol);
               }
               else {
                 f_string_length total = 1;
@@ -467,7 +467,7 @@ extern "C" {
                   }
                 } // for
 
-                fprintf(f_standard_output, "%llu%c", total, f_string_eol);
+                fprintf(f_type_output, "%llu%c", total, f_string_eol);
               }
 
               return f_none;
@@ -476,7 +476,7 @@ extern "C" {
             if (data->parameters[fss_extended_list_read_parameter_line].result == f_console_result_additional) {
               if (items->array[i].content.used == 0) {
                 if (include_empty && line == 0) {
-                  fprintf(f_standard_output, "%c", f_string_eol);
+                  fprintf(f_type_output, "%c", f_string_eol);
                 }
               }
               else {
@@ -486,11 +486,11 @@ extern "C" {
                   for (; i <= items->array[i].content.array[0].stop; i++) {
                     if (data->buffer.string[i] == 0) continue;
                     if (data->buffer.string[i] == f_string_eol) {
-                      fprintf(f_standard_output, "%c", f_string_eol);
+                      fprintf(f_type_output, "%c", f_string_eol);
                       break;
                     }
 
-                    fprintf(f_standard_output, "%c", data->buffer.string[i]);
+                    fprintf(f_type_output, "%c", data->buffer.string[i]);
                   } // for
                 }
                 else {
@@ -508,11 +508,11 @@ extern "C" {
                         for (; i <= items->array[i].content.array[0].stop; i++) {
                           if (data->buffer.string[i] == 0) continue;
                           if (data->buffer.string[i] == f_string_eol) {
-                            fprintf(f_standard_output, "%c", f_string_eol);
+                            fprintf(f_type_output, "%c", f_string_eol);
                             break;
                           }
 
-                          fprintf(f_standard_output, "%c", data->buffer.string[i]);
+                          fprintf(f_type_output, "%c", data->buffer.string[i]);
                         } // for
 
                         break;
@@ -526,10 +526,10 @@ extern "C" {
             }
 
             if (items->array[i].content.used > 0) {
-              f_print_string_dynamic_partial(f_standard_output, data->buffer, items->array[i].content.array[0]);
+              f_print_string_dynamic_partial(f_type_output, data->buffer, items->array[i].content.array[0]);
             }
             else if (include_empty) {
-              fprintf(f_standard_output, "%c", f_string_eol);
+              fprintf(f_type_output, "%c", f_string_eol);
             }
 
             break;
@@ -565,7 +565,7 @@ extern "C" {
         } // for
       } // for
 
-      fprintf(f_standard_output, "%llu%c", total, f_string_eol);
+      fprintf(f_type_output, "%llu%c", total, f_string_eol);
       return f_none;
     }
 
@@ -582,7 +582,7 @@ extern "C" {
         if (items->array[i].content.used == 0) {
           if (include_empty) {
             if (line_current == line) {
-              fprintf(f_standard_output, "%c", f_string_eol);
+              fprintf(f_type_output, "%c", f_string_eol);
               break;
             }
 
@@ -614,11 +614,11 @@ extern "C" {
             if (data->buffer.string[j] == 0) continue;
 
             if (data->buffer.string[j] == f_string_eol) {
-              fprintf(f_standard_output, "%c", f_string_eol);
+              fprintf(f_type_output, "%c", f_string_eol);
               break;
             }
 
-            fprintf(f_standard_output, "%c", data->buffer.string[j]);
+            fprintf(f_type_output, "%c", data->buffer.string[j]);
           } // for
 
           break;
@@ -635,13 +635,13 @@ extern "C" {
 
       if (items->array[i].content.used == 0) {
         if (include_empty) {
-          fprintf(f_standard_output, "%c", f_string_eol);
+          fprintf(f_type_output, "%c", f_string_eol);
         }
 
         continue;
       }
 
-      f_print_string_dynamic_partial(f_standard_output, data->buffer, items->array[i].content.array[0]);
+      f_print_string_dynamic_partial(f_type_output, data->buffer, items->array[i].content.array[0]);
     } // for
 
     return f_none;
index 8153fb9e5762350361fef849514488eec87048cf..6dfa479ec9b654cd855d17ab2e42d5b861625f95 100644 (file)
@@ -29,7 +29,7 @@ extern "C" {
 
     fll_program_print_help_usage(context, fss_extended_read_name, "filename(s)");
 
-    fl_color_print(f_standard_output, context.important, context.reset, " Notes:");
+    fl_color_print(f_type_output, context.important, context.reset, " Notes:");
 
     printf("%c", f_string_eol, f_string_eol);
 
@@ -38,27 +38,27 @@ extern "C" {
     printf("%c", f_string_eol);
 
     printf("  When using the ");
-    fl_color_print(f_standard_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_depth);
+    fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_depth);
     printf(" option, an order of operations is enforced on the parameters.%c", f_string_eol);
 
     printf("  When this order of operations is in effect, parameters to the right of a depth parameter are influenced by that depth parameter:%c", f_string_eol);
 
     printf("    ");
-    fl_color_print(f_standard_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_at);
+    fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_at);
     printf(": An object index at the specified depth.%c", f_string_eol);
 
     printf("    ");
-    fl_color_print(f_standard_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_depth);
+    fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_depth);
     printf(": A new depth within the specified depth, indexed from the root.%c", f_string_eol);
 
     printf("    ");
-    fl_color_print(f_standard_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_name);
+    fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_name);
     printf(": An object name at the specified depth.%c", f_string_eol);
 
     printf("%c", f_string_eol);
 
     printf("  The parameter ");
-    fl_color_print(f_standard_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_depth);
+    fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_depth);
     printf(" must be in numeric order, but values in between may be skipped.%c", f_string_eol);
     printf("    ('-d 0 -a 1 -d 2 -a 2' would specify index 1 at depth 0, any index at depth 1, and index 2 at depth 2.)%c", f_string_eol);
     printf("    ('-d 2 -a 1 -d 0 -a 2' would be invalid because depth 2 is before depth 1.)%c", f_string_eol);
@@ -66,53 +66,53 @@ extern "C" {
     printf("%c", f_string_eol);
 
     printf("  The parameter ");
-    fl_color_print(f_standard_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_select);
+    fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_select);
     printf(" selects a content index at a given depth.%c", f_string_eol);
     printf("    (This parameter is not synonymous with the depth parameter and does not relate to nested content).%c", f_string_eol);
 
     printf("%c", f_string_eol);
 
     printf("  Specify both ");
-    fl_color_print(f_standard_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_object);
+    fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_object);
     printf(" and the ");
-    fl_color_print(f_standard_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_total);
+    fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_total);
     printf(" parameters to get the total objects.%c", f_string_eol);
 
     printf("%c", f_string_eol);
 
     printf("  When both ");
-    fl_color_print(f_standard_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_at);
+    fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_at);
     printf(" and ");
-    fl_color_print(f_standard_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_name);
+    fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_name);
     printf(" parameters are specified (at the same depth), the ");
-    fl_color_print(f_standard_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_at);
+    fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_at);
     printf(" parameter value will be treated as a position relative to the specified ");
-    fl_color_print(f_standard_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_name);
+    fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_name);
     printf(" parameter value.%c", f_string_eol);
 
     printf("%c", f_string_eol);
 
     printf("  This program may support parameters, such as ");
-    fl_color_print(f_standard_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_depth);
+    fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_depth);
     printf(" or ");
-    fl_color_print(f_standard_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_select);
+    fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_select);
     printf(", even if not supported by the standard.%c", f_string_eol);
     printf("  This is done to help ensure consistency for scripting.%c", f_string_eol);
 
     printf("%c", f_string_eol);
 
     printf("  For parameters like ");
-    fl_color_print(f_standard_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_depth);
+    fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_depth);
     printf(", if the standard doesn't support nested content, then only a depth of 0 would be valid.%c", f_string_eol);
 
     printf("  For parameters like ");
-    fl_color_print(f_standard_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_select);
+    fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_select);
     printf(", if the standard doesn't support multiple content groups, then only a select of 0 would be valid.%c", f_string_eol);
 
     printf("%c", f_string_eol);
 
     printf("  The parameter ");
-    fl_color_print(f_standard_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_trim);
+    fl_color_print(f_type_output, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_trim);
     printf(" will remove leading and trailing whitespaces when selecting objects or when printing objects.%c", f_string_eol);
 
     printf("%c", f_string_eol);
@@ -148,45 +148,45 @@ extern "C" {
     }
     else if (data->remaining.used > 0 || data->process_pipe) {
       if (data->parameters[fss_extended_read_parameter_at].result == f_console_result_found) {
-        fl_color_print(f_standard_error, data->context.error, data->context.reset, "ERROR: The parameter '");
-        fl_color_print(f_standard_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_at);
-        fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "' requires a positive number.");
+        fl_color_print(f_type_error, data->context.error, data->context.reset, "ERROR: The parameter '");
+        fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_at);
+        fl_color_print_line(f_type_error, data->context.error, data->context.reset, "' requires a positive number.");
 
         fss_extended_read_delete_data(data);
         return f_status_set_error(f_invalid_parameter);
       }
 
       if (data->parameters[fss_extended_read_parameter_depth].result == f_console_result_found) {
-        fl_color_print(f_standard_error, data->context.error, data->context.reset, "ERROR: The parameter '");
-        fl_color_print(f_standard_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_depth);
-        fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "' requires a positive number.");
+        fl_color_print(f_type_error, data->context.error, data->context.reset, "ERROR: The parameter '");
+        fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_depth);
+        fl_color_print_line(f_type_error, data->context.error, data->context.reset, "' requires a positive number.");
 
         fss_extended_read_delete_data(data);
         return f_status_set_error(f_invalid_parameter);
       }
 
       if (data->parameters[fss_extended_read_parameter_line].result == f_console_result_found) {
-        fl_color_print(f_standard_error, data->context.error, data->context.reset, "ERROR: The parameter '");
-        fl_color_print(f_standard_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_line);
-        fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "' requires a positive number.");
+        fl_color_print(f_type_error, data->context.error, data->context.reset, "ERROR: The parameter '");
+        fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_line);
+        fl_color_print_line(f_type_error, data->context.error, data->context.reset, "' requires a positive number.");
 
         fss_extended_read_delete_data(data);
         return f_status_set_error(f_invalid_parameter);
       }
 
       if (data->parameters[fss_extended_read_parameter_name].result == f_console_result_found) {
-        fl_color_print(f_standard_error, data->context.error, data->context.reset, "ERROR: The parameter '");
-        fl_color_print(f_standard_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_name);
-        fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "' requires a string.");
+        fl_color_print(f_type_error, data->context.error, data->context.reset, "ERROR: The parameter '");
+        fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_name);
+        fl_color_print_line(f_type_error, data->context.error, data->context.reset, "' requires a string.");
 
         fss_extended_read_delete_data(data);
         return f_status_set_error(f_invalid_parameter);
       }
 
       if (data->parameters[fss_extended_read_parameter_select].result == f_console_result_found) {
-        fl_color_print(f_standard_error, data->context.error, data->context.reset, "ERROR: The parameter '");
-        fl_color_print(f_standard_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_select);
-        fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "' requires a positive number.");
+        fl_color_print(f_type_error, data->context.error, data->context.reset, "ERROR: The parameter '");
+        fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_select);
+        fl_color_print_line(f_type_error, data->context.error, data->context.reset, "' requires a positive number.");
 
         fss_extended_read_delete_data(data);
         return f_status_set_error(f_invalid_parameter);
@@ -194,22 +194,22 @@ extern "C" {
 
       if (data->parameters[fss_extended_read_parameter_object].result == f_console_result_found) {
         if (data->parameters[fss_extended_read_parameter_line].result == f_console_result_additional) {
-          fl_color_print(f_standard_error, data->context.error, data->context.reset, "ERROR: Cannot specify the '");
-          fl_color_print(f_standard_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_object);
-          fl_color_print(f_standard_error, data->context.error, data->context.reset, "' parameter with the '");
-          fl_color_print(f_standard_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_line);
-          fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "' parameter.");
+          fl_color_print(f_type_error, data->context.error, data->context.reset, "ERROR: Cannot specify the '");
+          fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_object);
+          fl_color_print(f_type_error, data->context.error, data->context.reset, "' parameter with the '");
+          fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_line);
+          fl_color_print_line(f_type_error, data->context.error, data->context.reset, "' parameter.");
 
           fss_extended_read_delete_data(data);
           return f_status_set_error(f_invalid_parameter);
         }
 
         if (data->parameters[fss_extended_read_parameter_select].result == f_console_result_additional) {
-          fl_color_print(f_standard_error, data->context.error, data->context.reset, "ERROR: Cannot specify the '");
-          fl_color_print(f_standard_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_object);
-          fl_color_print(f_standard_error, data->context.error, data->context.reset, "' parameter with the '");
-          fl_color_print(f_standard_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_select);
-          fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "' parameter.");
+          fl_color_print(f_type_error, data->context.error, data->context.reset, "ERROR: Cannot specify the '");
+          fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_object);
+          fl_color_print(f_type_error, data->context.error, data->context.reset, "' parameter with the '");
+          fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_select);
+          fl_color_print_line(f_type_error, data->context.error, data->context.reset, "' parameter.");
 
           fss_extended_read_delete_data(data);
           return f_status_set_error(f_invalid_parameter);
@@ -218,11 +218,11 @@ extern "C" {
 
       if (data->parameters[fss_extended_read_parameter_line].result == f_console_result_additional) {
         if (data->parameters[fss_extended_read_parameter_total].result == f_console_result_found) {
-          fl_color_print(f_standard_error, data->context.error, data->context.reset, "ERROR: Cannot specify the '");
-          fl_color_print(f_standard_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_line);
-          fl_color_print(f_standard_error, data->context.error, data->context.reset, "' parameter with the '");
-          fl_color_print(f_standard_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_total);
-          fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "' parameter.");
+          fl_color_print(f_type_error, data->context.error, data->context.reset, "ERROR: Cannot specify the '");
+          fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_line);
+          fl_color_print(f_type_error, data->context.error, data->context.reset, "' parameter with the '");
+          fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_total);
+          fl_color_print_line(f_type_error, data->context.error, data->context.reset, "' parameter.");
 
           fss_extended_read_delete_data(data);
           return f_status_set_error(f_invalid_parameter);
@@ -232,7 +232,7 @@ extern "C" {
       fss_extended_read_depths depths = fss_extended_read_depths_initialize;
 
       f_string_length counter = 0;
-      f_string_length original_size = data->file_position.total;
+      f_string_length original_size = data->quantity.total;
 
       status = fss_extended_read_main_preprocess_depth(arguments, *data, &depths);
       if (f_status_is_error(status)) {
@@ -246,7 +246,7 @@ extern "C" {
         macro_fss_extended_read_depths_delete_simple(depths);
 
         if (data->parameters[fss_extended_read_parameter_total].result == f_console_result_found) {
-          fprintf(f_standard_output, "0%c", f_string_eol);
+          fprintf(f_type_output, "0%c", f_string_eol);
 
           fss_extended_read_delete_data(data);
           return f_none;
@@ -257,9 +257,9 @@ extern "C" {
       }
 
       if (data->parameters[fss_extended_read_parameter_select].result == f_console_result_found) {
-        fl_color_print(f_standard_error, data->context.error, data->context.reset, "ERROR: the '");
-        fl_color_print(f_standard_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_select);
-        fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "' parameter requires a positive number.");
+        fl_color_print(f_type_error, data->context.error, data->context.reset, "ERROR: the '");
+        fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_select);
+        fl_color_print_line(f_type_error, data->context.error, data->context.reset, "' parameter requires a positive number.");
 
         macro_fss_extended_read_depths_delete_simple(depths);
         fss_extended_read_delete_data(data);
@@ -269,9 +269,9 @@ extern "C" {
       if (data->process_pipe) {
         f_file file = f_file_initialize;
 
-        file.address = f_pipe;
+        file.id = f_type_descriptor_input;
 
-        status = fl_file_read(&file, &data->buffer);
+        status = f_file_read(file, &data->buffer);
 
         if (f_status_is_error(status)) {
           fss_extended_read_print_file_error(data->context, "fl_file_read", "-", f_status_set_fine(status));
@@ -299,9 +299,9 @@ extern "C" {
         for (; counter < data->remaining.used; counter++) {
           f_file file = f_file_initialize;
 
-          status = f_file_open(&file, arguments.argv[data->remaining.array[counter]]);
+          status = f_file_open(arguments.argv[data->remaining.array[counter]], 0, &file);
 
-          data->file_position.total = original_size;
+          data->quantity.total = original_size;
 
           if (f_status_is_error(status)) {
             fss_extended_read_print_file_error(data->context, "f_file_open", arguments.argv[data->remaining.array[counter]], f_status_set_fine(status));
@@ -311,26 +311,28 @@ extern "C" {
             return status;
           }
 
-          if (data->file_position.total == 0) {
-            fseek(file.address, 0, SEEK_END);
+          if (data->quantity.total == 0) {
+            status = f_file_size_by_id(file.id, &data->quantity.total);
 
-            data->file_position.total = ftell(file.address);
+            if (f_status_is_error(status)) {
+              fss_extended_read_print_file_error(data->context, "f_file_size_by_id", arguments.argv[data->remaining.array[counter]], f_status_set_fine(status));
+              macro_fss_extended_read_depths_delete_simple(depths);
+              fss_extended_read_delete_data(data);
+            }
 
             // Skip past empty files.
-            if (data->file_position.total == 0) {
-              f_file_close(&file);
+            if (data->quantity.total == 0) {
+              f_file_close(&file.id);
               continue;
             }
-
-            fseek(file.address, 0, SEEK_SET);
           }
 
-          status = fl_file_read_position(&file, &data->buffer, data->file_position);
+          status = f_file_read_until(file, &data->buffer, data->quantity.total);
 
-          f_file_close(&file);
+          f_file_close(&file.id);
 
           if (f_status_is_error(status)) {
-            fss_extended_read_print_file_error(data->context, "fl_file_read_position", arguments.argv[data->remaining.array[counter]], f_status_set_fine(status));
+            fss_extended_read_print_file_error(data->context, "f_file_read_until", arguments.argv[data->remaining.array[counter]], f_status_set_fine(status));
 
             macro_fss_extended_read_depths_delete_simple(depths);
             fss_extended_read_delete_data(data);
@@ -355,7 +357,7 @@ extern "C" {
       macro_fss_extended_read_depths_delete_simple(depths);
     }
     else {
-      fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "ERROR: you failed to specify one or more files.");
+      fl_color_print_line(f_type_error, data->context.error, data->context.reset, "ERROR: you failed to specify one or more files.");
       status = f_status_set_error(f_invalid_parameter);
     }
 
index d11baada2775acf7f2baa733afa1e9057ab745fa..85576bc5e2abf232f339df5e2f55acad69c60b57 100644 (file)
@@ -4,7 +4,7 @@ int main(const unsigned long argc, const f_string *argv) {
   const f_console_arguments arguments = { argc, argv };
   fss_extended_read_data data = fss_extended_read_data_initialize;
 
-  if (f_pipe_exists()) {
+  if (f_pipe_input_exists()) {
     data.process_pipe = f_true;
   }
 
index 2b2166ff67923898ee111635c9038e4bb6c0d561..1f874a6f6c4e9498072d4f33cb8a35784430a446 100644 (file)
@@ -8,12 +8,12 @@ extern "C" {
 #ifndef _di_fss_extended_read_print_file_error_
   void fss_extended_read_print_file_error(const fl_color_context context, const f_string function_name, const f_string file_name, const f_status status) {
 
-    if (fll_file_error_print(f_standard_error, context, function_name, file_name, status) == f_false) {
-      fl_color_print(f_standard_error, context.error, context.reset, "INTERNAL ERROR: An unhandled error (");
-      fl_color_print(f_standard_error, context.notable, context.reset, "%u", status);
-      fl_color_print(f_standard_error, context.error, context.reset, ") has occurred while calling ");
-      fl_color_print(f_standard_error, context.notable, context.reset, "%s()", function_name);
-      fl_color_print_line(f_standard_error, context.error, context.reset, ".");
+    if (fll_file_error_print(f_type_error, context, function_name, file_name, status) == f_false) {
+      fl_color_print(f_type_error, context.error, context.reset, "INTERNAL ERROR: An unhandled error (");
+      fl_color_print(f_type_error, context.notable, context.reset, "%u", status);
+      fl_color_print(f_type_error, context.error, context.reset, ") has occurred while calling ");
+      fl_color_print(f_type_error, context.notable, context.reset, "%s()", function_name);
+      fl_color_print_line(f_type_error, context.error, context.reset, ".");
     }
   }
 #endif // _di_fss_extended_read_print_file_error_
@@ -22,62 +22,62 @@ extern "C" {
   void fss_extended_read_print_number_argument_error(const fl_color_context context, const f_string function_name, const f_string parameter_name, const f_string argument, const f_status status) {
 
     if (status == f_invalid_parameter) {
-      fl_color_print(f_standard_error, context.error, context.reset, "INTERNAL ERROR: Invalid parameter when calling ");
-      fl_color_print(f_standard_error, context.notable, context.reset, "%s()", function_name);
-      fl_color_print_line(f_standard_error, context.error, context.reset, ".");
+      fl_color_print(f_type_error, context.error, context.reset, "INTERNAL ERROR: Invalid parameter when calling ");
+      fl_color_print(f_type_error, context.notable, context.reset, "%s()", function_name);
+      fl_color_print_line(f_type_error, context.error, context.reset, ".");
     }
     else if (status == f_number_invalid) {
-      fl_color_print(f_standard_error, context.error, context.reset, "ERROR: The argument '");
-      fl_color_print(f_standard_error, context.notable, context.reset, "%s", argument);
-      fl_color_print(f_standard_error, context.error, context.reset, "' is not a valid number for the parameter '");
-      fl_color_print(f_standard_error, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, parameter_name);
-      fl_color_print_line(f_standard_error, context.error, context.reset, "'.");
+      fl_color_print(f_type_error, context.error, context.reset, "ERROR: The argument '");
+      fl_color_print(f_type_error, context.notable, context.reset, "%s", argument);
+      fl_color_print(f_type_error, context.error, context.reset, "' is not a valid number for the parameter '");
+      fl_color_print(f_type_error, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, parameter_name);
+      fl_color_print_line(f_type_error, context.error, context.reset, "'.");
     }
     else if (status == f_number_underflow) {
-      fl_color_print(f_standard_error, context.error, context.reset, "ERROR: The argument '");
-      fl_color_print(f_standard_error, context.notable, context.reset, "%s", argument);
-      fl_color_print(f_standard_error, context.error, context.reset, "' is too small for the parameter '");
-      fl_color_print(f_standard_error, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, parameter_name);
-      fl_color_print_line(f_standard_error, context.error, context.reset, "'.");
+      fl_color_print(f_type_error, context.error, context.reset, "ERROR: The argument '");
+      fl_color_print(f_type_error, context.notable, context.reset, "%s", argument);
+      fl_color_print(f_type_error, context.error, context.reset, "' is too small for the parameter '");
+      fl_color_print(f_type_error, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, parameter_name);
+      fl_color_print_line(f_type_error, context.error, context.reset, "'.");
     }
     else if (status == f_number_overflow) {
-      fl_color_print(f_standard_error, context.error, context.reset, "ERROR: The argument '");
-      fl_color_print(f_standard_error, context.notable, context.reset, "%s", argument);
-      fl_color_print(f_standard_error, context.error, context.reset, "' is too large for the parameter '");
-      fl_color_print(f_standard_error, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, parameter_name);
-      fl_color_print_line(f_standard_error, context.error, context.reset, "'.");
+      fl_color_print(f_type_error, context.error, context.reset, "ERROR: The argument '");
+      fl_color_print(f_type_error, context.notable, context.reset, "%s", argument);
+      fl_color_print(f_type_error, context.error, context.reset, "' is too large for the parameter '");
+      fl_color_print(f_type_error, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, parameter_name);
+      fl_color_print_line(f_type_error, context.error, context.reset, "'.");
     }
     else if (status == f_number_negative) {
-      fl_color_print(f_standard_error, context.error, context.reset, "ERROR: The argument '");
-      fl_color_print(f_standard_error, context.notable, context.reset, "%s", argument);
-      fl_color_print(f_standard_error, context.error, context.reset, "' is negative, which is not allowed for the parameter '");
-      fl_color_print(f_standard_error, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, parameter_name);
-      fl_color_print_line(f_standard_error, context.error, context.reset, "'.");
+      fl_color_print(f_type_error, context.error, context.reset, "ERROR: The argument '");
+      fl_color_print(f_type_error, context.notable, context.reset, "%s", argument);
+      fl_color_print(f_type_error, context.error, context.reset, "' is negative, which is not allowed for the parameter '");
+      fl_color_print(f_type_error, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, parameter_name);
+      fl_color_print_line(f_type_error, context.error, context.reset, "'.");
     }
     else if (status == f_number_positive) {
-      fl_color_print(f_standard_error, context.error, context.reset, "ERROR: The argument '");
-      fl_color_print(f_standard_error, context.notable, context.reset, "%s", argument);
-      fl_color_print(f_standard_error, context.error, context.reset, "' contains a '");
-      fl_color_print(f_standard_error, context.notable, context.reset, "+");
-      fl_color_print(f_standard_error, context.error, context.reset, "', which is not allowed for the parameter '");
-      fl_color_print(f_standard_error, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, parameter_name);
-      fl_color_print_line(f_standard_error, context.error, context.reset, "'.");
+      fl_color_print(f_type_error, context.error, context.reset, "ERROR: The argument '");
+      fl_color_print(f_type_error, context.notable, context.reset, "%s", argument);
+      fl_color_print(f_type_error, context.error, context.reset, "' contains a '");
+      fl_color_print(f_type_error, context.notable, context.reset, "+");
+      fl_color_print(f_type_error, context.error, context.reset, "', which is not allowed for the parameter '");
+      fl_color_print(f_type_error, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, parameter_name);
+      fl_color_print_line(f_type_error, context.error, context.reset, "'.");
     }
     else if (status == f_no_data) {
-      fl_color_print(f_standard_error, context.error, context.reset, "ERROR: The parameter '");
-      fl_color_print(f_standard_error, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, parameter_name);
-      fl_color_print_line(f_standard_error, context.error, context.reset, "' must not be an empty string.");
+      fl_color_print(f_type_error, context.error, context.reset, "ERROR: The parameter '");
+      fl_color_print(f_type_error, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, parameter_name);
+      fl_color_print_line(f_type_error, context.error, context.reset, "' must not be an empty string.");
     }
     else {
-      fl_color_print(f_standard_error, context.error, context.reset, "INTERNAL ERROR: An unhandled error (");
-      fl_color_print(f_standard_error, context.notable, context.reset, "%u", status);
-      fl_color_print(f_standard_error, context.error, context.reset, ") has occurred while calling ");
-      fl_color_print(f_standard_error, context.notable, context.reset, "%s()", function_name);
-      fl_color_print(f_standard_error, context.error, context.reset, "' for the parameter '");
-      fl_color_print(f_standard_error, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, parameter_name);
-      fl_color_print(f_standard_error, context.error, context.reset, "' with the value '");
-      fl_color_print(f_standard_error, context.notable, context.reset, "%s", argument);
-      fl_color_print_line(f_standard_error, context.error, context.reset, "'.");
+      fl_color_print(f_type_error, context.error, context.reset, "INTERNAL ERROR: An unhandled error (");
+      fl_color_print(f_type_error, context.notable, context.reset, "%u", status);
+      fl_color_print(f_type_error, context.error, context.reset, ") has occurred while calling ");
+      fl_color_print(f_type_error, context.notable, context.reset, "%s()", function_name);
+      fl_color_print(f_type_error, context.error, context.reset, "' for the parameter '");
+      fl_color_print(f_type_error, context.notable, context.reset, "%s%s", f_console_symbol_long_enable, parameter_name);
+      fl_color_print(f_type_error, context.error, context.reset, "' with the value '");
+      fl_color_print(f_type_error, context.notable, context.reset, "%s", argument);
+      fl_color_print_line(f_type_error, context.error, context.reset, "'.");
     }
   }
 #endif // _di_fss_extended_read_print_number_argument_error_
@@ -95,7 +95,7 @@ extern "C" {
 
       macro_fss_extended_read_depths_new(status, (*depths), depth_size);
       if (f_status_is_error(status)) {
-        fl_color_print_line(f_standard_error, data.context.error, data.context.reset, "CRITICAL ERROR: Unable to allocate memory.");
+        fl_color_print_line(f_type_error, data.context.error, data.context.reset, "CRITICAL ERROR: Unable to allocate memory.");
         return status;
       }
 
@@ -173,12 +173,12 @@ extern "C" {
 
             // @todo: move error printing into common function.
             if (status_code == f_error_allocation || status_code == f_error_reallocation) {
-              fl_color_print_line(f_standard_error, data.context.error, data.context.reset, "CRITICAL ERROR: Unable to allocate memory.");
+              fl_color_print_line(f_type_error, data.context.error, data.context.reset, "CRITICAL ERROR: Unable to allocate memory.");
             }
             else if (status_code == f_string_length_size) {
-              fl_color_print(f_standard_error, data.context.error, data.context.reset, "ERROR: Unable to process '");
-              fl_color_print(f_standard_error, data.context.notable, data.context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_trim);
-              fl_color_print_line(f_standard_error, data.context.error, data.context.reset, "' because the maximum buffer size was reached.");
+              fl_color_print(f_type_error, data.context.error, data.context.reset, "ERROR: Unable to process '");
+              fl_color_print(f_type_error, data.context.notable, data.context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_trim);
+              fl_color_print_line(f_type_error, data.context.error, data.context.reset, "' because the maximum buffer size was reached.");
             }
             else {
               f_string function = "fl_string_append";
@@ -187,20 +187,20 @@ extern "C" {
                 function = "fl_string_rip";
               }
 
-              fl_color_print(f_standard_error, data.context.error, data.context.reset, "INTERNAL ERROR: An unhandled error (");
-              fl_color_print(f_standard_error, data.context.notable, data.context.reset, "%u", status_code);
-              fl_color_print(f_standard_error, data.context.error, data.context.reset, ") has occurred while calling ");
-              fl_color_print(f_standard_error, data.context.notable, data.context.reset, "%s()", function);
-              fl_color_print_line(f_standard_error, data.context.error, data.context.reset, ".");
+              fl_color_print(f_type_error, data.context.error, data.context.reset, "INTERNAL ERROR: An unhandled error (");
+              fl_color_print(f_type_error, data.context.notable, data.context.reset, "%u", status_code);
+              fl_color_print(f_type_error, data.context.error, data.context.reset, ") has occurred while calling ");
+              fl_color_print(f_type_error, data.context.notable, data.context.reset, "%s()", function);
+              fl_color_print_line(f_type_error, data.context.error, data.context.reset, ".");
             }
 
             return status;
           }
 
           if (depths->array[i].value_name.used == 0) {
-            fl_color_print(f_standard_error, data.context.error, data.context.reset, "ERROR: The '");
-            fl_color_print(f_standard_error, data.context.notable, data.context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_name);
-            fl_color_print_line(f_standard_error, data.context.error, data.context.reset, "' must not be an empty string.");
+            fl_color_print(f_type_error, data.context.error, data.context.reset, "ERROR: The '");
+            fl_color_print(f_type_error, data.context.notable, data.context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_name);
+            fl_color_print_line(f_type_error, data.context.error, data.context.reset, "' must not be an empty string.");
 
             return f_status_set_error(f_invalid_parameter);
           }
@@ -211,22 +211,22 @@ extern "C" {
     for (f_array_length i = 0; i < depths->used; i++) {
       for (f_array_length j = i + 1; j < depths->used; j++) {
         if (depths->array[i].depth == depths->array[j].depth) {
-          fl_color_print(f_standard_error, data.context.error, data.context.reset, "ERROR: The value '");
-          fl_color_print(f_standard_error, data.context.notable, data.context.reset, "%llu", depths->array[i].depth);
-          fl_color_print(f_standard_error, data.context.error, data.context.reset, "' may only be specified once for the parameter '");
-          fl_color_print(f_standard_error, data.context.notable, data.context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_depth);
-          fl_color_print_line(f_standard_error, data.context.error, data.context.reset, "'.");
+          fl_color_print(f_type_error, data.context.error, data.context.reset, "ERROR: The value '");
+          fl_color_print(f_type_error, data.context.notable, data.context.reset, "%llu", depths->array[i].depth);
+          fl_color_print(f_type_error, data.context.error, data.context.reset, "' may only be specified once for the parameter '");
+          fl_color_print(f_type_error, data.context.notable, data.context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_depth);
+          fl_color_print_line(f_type_error, data.context.error, data.context.reset, "'.");
 
           return f_status_set_error(f_invalid_parameter);
         }
         else if (depths->array[i].depth > depths->array[j].depth) {
-          fl_color_print(f_standard_error, data.context.error, data.context.reset, "ERROR: The parameter '");
-          fl_color_print(f_standard_error, data.context.notable, data.context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_depth);
-          fl_color_print(f_standard_error, data.context.error, data.context.reset, "' may not have the value '");
-          fl_color_print(f_standard_error, data.context.notable, data.context.reset, "%llu", depths->array[i].depth);
-          fl_color_print(f_standard_error, data.context.error, data.context.reset, "' before the value '");
-          fl_color_print(f_standard_error, data.context.notable, data.context.reset, "%llu", depths->array[j].depth);
-          fl_color_print_line(f_standard_error, data.context.error, data.context.reset, "'.");
+          fl_color_print(f_type_error, data.context.error, data.context.reset, "ERROR: The parameter '");
+          fl_color_print(f_type_error, data.context.notable, data.context.reset, "%s%s", f_console_symbol_long_enable, fss_extended_read_long_depth);
+          fl_color_print(f_type_error, data.context.error, data.context.reset, "' may not have the value '");
+          fl_color_print(f_type_error, data.context.notable, data.context.reset, "%llu", depths->array[i].depth);
+          fl_color_print(f_type_error, data.context.error, data.context.reset, "' before the value '");
+          fl_color_print(f_type_error, data.context.notable, data.context.reset, "%llu", depths->array[j].depth);
+          fl_color_print_line(f_type_error, data.context.error, data.context.reset, "'.");
 
           return f_status_set_error(f_invalid_parameter);
         }
@@ -253,33 +253,33 @@ extern "C" {
         status = f_status_set_fine(status);
 
         if (status == f_invalid_parameter) {
-          fl_color_print(f_standard_error, data->context.error, data->context.reset, "INTERNAL ERROR: Invalid parameter when calling ");
-          fl_color_print(f_standard_error, data->context.notable, data->context.reset, "fll_fss_extended_read()");
-          fl_color_print(f_standard_error, data->context.error, data->context.reset, " for the file '");
-          fl_color_print(f_standard_error, data->context.notable, data->context.reset, "%s", filename);
-          fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "'.");
+          fl_color_print(f_type_error, data->context.error, data->context.reset, "INTERNAL ERROR: Invalid parameter when calling ");
+          fl_color_print(f_type_error, data->context.notable, data->context.reset, "fll_fss_extended_read()");
+          fl_color_print(f_type_error, data->context.error, data->context.reset, " for the file '");
+          fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s", filename);
+          fl_color_print_line(f_type_error, data->context.error, data->context.reset, "'.");
         }
         else if (status == f_error_allocation || status == f_error_reallocation) {
-          fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "CRITICAL ERROR: Unable to allocate memory.");
+          fl_color_print_line(f_type_error, data->context.error, data->context.reset, "CRITICAL ERROR: Unable to allocate memory.");
         }
         else if (status == f_incomplete_utf_on_stop) {
-          fl_color_print(f_standard_error, data->context.error, data->context.reset, "ENCODING ERROR: error occurred on invalid UTF-8 character at stop position (at ");
-          fl_color_print(f_standard_error, data->context.notable, data->context.reset, "%d", input.start);
-          fl_color_print_line(f_standard_error, data->context.error, data->context.reset, ").");
+          fl_color_print(f_type_error, data->context.error, data->context.reset, "ENCODING ERROR: error occurred on invalid UTF-8 character at stop position (at ");
+          fl_color_print(f_type_error, data->context.notable, data->context.reset, "%d", input.start);
+          fl_color_print_line(f_type_error, data->context.error, data->context.reset, ").");
         }
         else if (status == f_incomplete_utf_on_eos) {
-          fl_color_print(f_standard_error, data->context.error, data->context.reset, "ENCODING ERROR: error occurred on invalid UTF-8 character at end of string (at ");
-          fl_color_print(f_standard_error, data->context.notable, data->context.reset, "%d", input.start);
-          fl_color_print_line(f_standard_error, data->context.error, data->context.reset, ").");
+          fl_color_print(f_type_error, data->context.error, data->context.reset, "ENCODING ERROR: error occurred on invalid UTF-8 character at end of string (at ");
+          fl_color_print(f_type_error, data->context.notable, data->context.reset, "%d", input.start);
+          fl_color_print_line(f_type_error, data->context.error, data->context.reset, ").");
         }
         else {
-          fl_color_print(f_standard_error, data->context.error, data->context.reset, "INTERNAL ERROR: An unhandled error (");
-          fl_color_print(f_standard_error, data->context.notable, data->context.reset, "%u", status);
-          fl_color_print(f_standard_error, data->context.error, data->context.reset, ") has occurred while calling ");
-          fl_color_print(f_standard_error, data->context.notable, data->context.reset, "fll_fss_extended_read()");
-          fl_color_print(f_standard_error, data->context.error, data->context.reset, " for the file '");
-          fl_color_print(f_standard_error, data->context.notable, data->context.reset, "%s", filename);
-          fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "'.");
+          fl_color_print(f_type_error, data->context.error, data->context.reset, "INTERNAL ERROR: An unhandled error (");
+          fl_color_print(f_type_error, data->context.notable, data->context.reset, "%u", status);
+          fl_color_print(f_type_error, data->context.error, data->context.reset, ") has occurred while calling ");
+          fl_color_print(f_type_error, data->context.notable, data->context.reset, "fll_fss_extended_read()");
+          fl_color_print(f_type_error, data->context.error, data->context.reset, " for the file '");
+          fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s", filename);
+          fl_color_print_line(f_type_error, data->context.error, data->context.reset, "'.");
         }
 
         return f_status_set_error(status);
@@ -360,10 +360,10 @@ extern "C" {
       if (data->parameters[fss_extended_read_parameter_total].result == f_console_result_found) {
         if (depths.array[0].index_at > 0) {
           if (depths.array[0].value_at < data->objects.used && names[depths.array[0].value_at]) {
-            fprintf(f_standard_output, "1%c", f_string_eol);
+            fprintf(f_type_output, "1%c", f_string_eol);
           }
           else {
-            fprintf(f_standard_output, "0%c", f_string_eol);
+            fprintf(f_type_output, "0%c", f_string_eol);
           }
         }
         else if (depths.array[0].index_name > 0) {
@@ -375,10 +375,10 @@ extern "C" {
             total++;
           } // for
 
-          fprintf(f_standard_output, "%llu%c", total, f_string_eol);
+          fprintf(f_type_output, "%llu%c", total, f_string_eol);
         }
         else {
-          fprintf(f_standard_output, "%llu%c", data->objects.used, f_string_eol);
+          fprintf(f_type_output, "%llu%c", data->objects.used, f_string_eol);
         }
 
         return f_none;
@@ -397,8 +397,8 @@ extern "C" {
         for (; i < data->objects.used; i++) {
           if (names[i]) {
             if (at == depths.array[0].value_at) {
-              print_object(f_standard_output, data->buffer, data->objects.array[i]);
-              fprintf(f_standard_output, "%c", f_string_eol);
+              print_object(f_type_output, data->buffer, data->objects.array[i]);
+              fprintf(f_type_output, "%c", f_string_eol);
               break;
             }
 
@@ -412,8 +412,8 @@ extern "C" {
       for (f_string_length i = 0; i < data->objects.used; i++) {
         if (names[i] == 0) continue;
 
-        print_object(f_standard_output, data->buffer, data->objects.array[i]);
-        fprintf(f_standard_output, "%c", f_string_eol);
+        print_object(f_type_output, data->buffer, data->objects.array[i]);
+        fprintf(f_type_output, "%c", f_string_eol);
       } // for
 
       return f_none;
@@ -422,7 +422,7 @@ extern "C" {
     if (depths.array[0].index_at > 0) {
       if (depths.array[0].value_at >= data->objects.used) {
         if (names[depths.array[0].value_at] && data->parameters[fss_extended_read_parameter_total].result == f_console_result_found) {
-          fprintf(f_standard_output, "0%c", f_string_eol);
+          fprintf(f_type_output, "0%c", f_string_eol);
         }
 
         return f_none;
@@ -436,10 +436,10 @@ extern "C" {
           if (at == depths.array[0].value_at) {
             if (data->parameters[fss_extended_read_parameter_total].result == f_console_result_found) {
               if (data->contents.array[i].used == 0) {
-                fprintf(f_standard_output, "0%c", f_string_eol);
+                fprintf(f_type_output, "0%c", f_string_eol);
               }
               else {
-                fprintf(f_standard_output, "1%c", f_string_eol);
+                fprintf(f_type_output, "1%c", f_string_eol);
               }
 
               return f_none;
@@ -452,30 +452,30 @@ extern "C" {
 
                   if (data->parameters[fss_extended_read_parameter_select].result == f_console_result_additional) {
                     if (select < data->contents.array[i].used) {
-                      f_print_string_dynamic_partial(f_standard_output, data->buffer, data->contents.array[i].array[select]);
-                      fprintf(f_standard_output, "%c", f_string_eol);
+                      f_print_string_dynamic_partial(f_type_output, data->buffer, data->contents.array[i].array[select]);
+                      fprintf(f_type_output, "%c", f_string_eol);
                     }
                   }
                   else {
                     for (j = 0; j < data->contents.array[i].used; j++) {
-                      f_print_string_dynamic_partial(f_standard_output, data->buffer, data->contents.array[i].array[j]);
+                      f_print_string_dynamic_partial(f_type_output, data->buffer, data->contents.array[i].array[j]);
 
                       if (j + 1 < data->contents.array[i].used) {
                         printf(" ");
                       }
                     } // for
 
-                    fprintf(f_standard_output, "%c", f_string_eol);
+                    fprintf(f_type_output, "%c", f_string_eol);
                   }
                 }
                 else if (include_empty) {
                   if (data->parameters[fss_extended_read_parameter_select].result == f_console_result_additional) {
                     if (select == 0) {
-                      fprintf(f_standard_output, "%c", f_string_eol);
+                      fprintf(f_type_output, "%c", f_string_eol);
                     }
                   }
                   else {
-                    fprintf(f_standard_output, "%c", f_string_eol);
+                    fprintf(f_type_output, "%c", f_string_eol);
                   }
                 }
               }
@@ -488,30 +488,30 @@ extern "C" {
 
               if (data->parameters[fss_extended_read_parameter_select].result == f_console_result_additional) {
                 if (select < data->contents.array[i].used) {
-                  f_print_string_dynamic_partial(f_standard_output, data->buffer, data->contents.array[i].array[select]);
-                  fprintf(f_standard_output, "%c", f_string_eol);
+                  f_print_string_dynamic_partial(f_type_output, data->buffer, data->contents.array[i].array[select]);
+                  fprintf(f_type_output, "%c", f_string_eol);
                 }
               }
               else {
                 for (j = 0; j < data->contents.array[i].used; j++) {
-                  f_print_string_dynamic_partial(f_standard_output, data->buffer, data->contents.array[i].array[j]);
+                  f_print_string_dynamic_partial(f_type_output, data->buffer, data->contents.array[i].array[j]);
 
                   if (j + 1 < data->contents.array[i].used) {
                     printf(" ");
                   }
                 } // for
 
-                fprintf(f_standard_output, "%c", f_string_eol);
+                fprintf(f_type_output, "%c", f_string_eol);
               }
             }
             else if (include_empty) {
               if (data->parameters[fss_extended_read_parameter_select].result == f_console_result_additional) {
                 if (select == 0) {
-                  fprintf(f_standard_output, "%c", f_string_eol);
+                  fprintf(f_type_output, "%c", f_string_eol);
                 }
               }
               else {
-                fprintf(f_standard_output, "%c", f_string_eol);
+                fprintf(f_type_output, "%c", f_string_eol);
               }
             }
 
@@ -540,7 +540,7 @@ extern "C" {
         total++;
       } // for
 
-      fprintf(f_standard_output, "%llu%c", total, f_string_eol);
+      fprintf(f_type_output, "%llu%c", total, f_string_eol);
       return f_none;
     }
 
@@ -557,7 +557,7 @@ extern "C" {
         if (data->contents.array[i].used == 0) {
           if (include_empty) {
             if (line_current == line) {
-              fprintf(f_standard_output, "%c", f_string_eol);
+              fprintf(f_type_output, "%c", f_string_eol);
               break;
             }
 
@@ -570,20 +570,20 @@ extern "C" {
         if (line_current == line) {
           if (data->parameters[fss_extended_read_parameter_select].result == f_console_result_additional) {
             if (select < data->contents.array[i].used) {
-              f_print_string_dynamic_partial(f_standard_output, data->buffer, data->contents.array[i].array[select]);
-              fprintf(f_standard_output, "%c", f_string_eol);
+              f_print_string_dynamic_partial(f_type_output, data->buffer, data->contents.array[i].array[select]);
+              fprintf(f_type_output, "%c", f_string_eol);
             }
           }
           else {
             for (j = 0; j < data->contents.array[i].used; j++) {
-              f_print_string_dynamic_partial(f_standard_output, data->buffer, data->contents.array[i].array[j]);
+              f_print_string_dynamic_partial(f_type_output, data->buffer, data->contents.array[i].array[j]);
 
               if (j + 1 < data->contents.array[i].used) {
                 printf(" ");
               }
             } // for
 
-            fprintf(f_standard_output, "%c", f_string_eol);
+            fprintf(f_type_output, "%c", f_string_eol);
           }
 
           break;
@@ -605,7 +605,7 @@ extern "C" {
 
       if (data->contents.array[i].used == 0) {
         if (include_empty && select == 0) {
-          fprintf(f_standard_output, "%c", f_string_eol);
+          fprintf(f_type_output, "%c", f_string_eol);
         }
 
         continue;
@@ -613,20 +613,20 @@ extern "C" {
 
       if (data->parameters[fss_extended_read_parameter_select].result == f_console_result_additional) {
         if (select < data->contents.array[i].used) {
-          f_print_string_dynamic_partial(f_standard_output, data->buffer, data->contents.array[i].array[select]);
-          fprintf(f_standard_output, "%c", f_string_eol);
+          f_print_string_dynamic_partial(f_type_output, data->buffer, data->contents.array[i].array[select]);
+          fprintf(f_type_output, "%c", f_string_eol);
         }
       }
       else {
         for (j = 0; j < data->contents.array[i].used; j++) {
-          f_print_string_dynamic_partial(f_standard_output, data->buffer, data->contents.array[i].array[j]);
+          f_print_string_dynamic_partial(f_type_output, data->buffer, data->contents.array[i].array[j]);
 
           if (j + 1 < data->contents.array[i].used) {
             printf(" ");
           }
         } // for
 
-        fprintf(f_standard_output, "%c", f_string_eol);
+        fprintf(f_type_output, "%c", f_string_eol);
       }
     } // for
 
index 2dadede5c7dc9b601918ef648b870e7dab57e9b0..caeab35d7cf9638cec6918a0c656b87ca734a6e0 100644 (file)
@@ -50,22 +50,22 @@ extern "C" {
       status = f_status_set_fine(status);
 
       if (status == f_no_data) {
-        fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "ERROR: One of the parameters you passed requires an additional parameter that you did not pass.");
+        fl_color_print_line(f_type_error, data->context.error, data->context.reset, "ERROR: One of the parameters you passed requires an additional parameter that you did not pass.");
         // TODO: there is a way to identify which parameter is incorrect
         //       to do this, one must look for any "has_additional" and then see if the "additional" location is set to 0
         //       nothing can be 0 as that represents the program name, unless arguments.argv[] is improperly created
       }
       else if (status == f_error_allocation || status == f_error_reallocation) {
-        fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "CRITICAL ERROR: Unable to allocate memory.");
+        fl_color_print_line(f_type_error, data->context.error, data->context.reset, "CRITICAL ERROR: Unable to allocate memory.");
       }
       else if (status == f_invalid_utf) {
-        fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "ENCODING ERROR: Invalid UTF-8 character in parameter when calling f_console_parameter_process().");
+        fl_color_print_line(f_type_error, data->context.error, data->context.reset, "ENCODING ERROR: Invalid UTF-8 character in parameter when calling f_console_parameter_process().");
       }
       else if (status == f_invalid_parameter) {
-        fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "INTERNAL ERROR: Invalid parameter when calling f_console_parameter_process().");
+        fl_color_print_line(f_type_error, data->context.error, data->context.reset, "INTERNAL ERROR: Invalid parameter when calling f_console_parameter_process().");
       }
       else {
-        fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "INTERNAL ERROR: An unhandled error (%u) has occurred while calling f_console_parameter_process().", status);
+        fl_color_print_line(f_type_error, data->context.error, data->context.reset, "INTERNAL ERROR: An unhandled error (%u) has occurred while calling f_console_parameter_process().", status);
       }
 
       fss_extended_write_delete_data(data);
@@ -89,27 +89,27 @@ extern "C" {
         f_file file = f_file_initialize;
         f_string_dynamic input = f_string_dynamic_initialize;
 
-        file.address = f_pipe;
+        file.id = f_type_descriptor_input;
 
-        status = fl_file_read(&file, &input);
+        status = f_file_read(file, &input);
 
         if (f_status_is_error(status)) {
           status = f_status_set_fine(status);
 
           if (status == f_invalid_parameter) {
-            fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "INTERNAL ERROR: Invalid parameter when calling f_file_open()");
+            fl_color_print_line(f_type_error, data->context.error, data->context.reset, "INTERNAL ERROR: Invalid parameter when calling f_file_open()");
           }
           else if (status == f_file_not_found) {
-            fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "ERROR: Unable to find the file '%s'", "-");
+            fl_color_print_line(f_type_error, data->context.error, data->context.reset, "ERROR: Unable to find the file '%s'", "-");
           }
           else if (status == f_file_error_open) {
-            fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "ERROR: Unable to open the file '%s'", "-");
+            fl_color_print_line(f_type_error, data->context.error, data->context.reset, "ERROR: Unable to open the file '%s'", "-");
           }
           else if (status == f_file_error_descriptor) {
-            fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "ERROR: File descriptor error while trying to open the file '%s'", "-");
+            fl_color_print_line(f_type_error, data->context.error, data->context.reset, "ERROR: File descriptor error while trying to open the file '%s'", "-");
           }
           else {
-            fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "INTERNAL ERROR: An unhandled error (%u) has occurred while calling f_file_open()", status);
+            fl_color_print_line(f_type_error, data->context.error, data->context.reset, "INTERNAL ERROR: An unhandled error (%u) has occurred while calling f_file_open()", status);
           }
 
           f_macro_string_dynamic_delete_simple(input);
@@ -205,48 +205,49 @@ extern "C" {
       if (data->parameters[fss_extended_write_parameter_file].result == f_console_result_additional) {
         f_file output = f_file_initialize;
 
-        output.mode = f_file_write_append;
-        status = f_file_open(&output, arguments.argv[data->parameters[fss_extended_write_parameter_file].additional.array[0]]);
+        output.flags = f_file_flag_append_wo;
+
+        status = f_file_open(arguments.argv[data->parameters[fss_extended_write_parameter_file].additional.array[0]], 0, &output);
 
         if (f_status_is_error(status)) {
           status = f_status_set_fine(status);
 
-          f_file_close(&output);
+          f_file_close(&output.id);
 
           if (status == f_invalid_parameter) {
-            fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "INTERNAL ERROR: Invalid parameter when calling f_file_open()");
+            fl_color_print_line(f_type_error, data->context.error, data->context.reset, "INTERNAL ERROR: Invalid parameter when calling f_file_open()");
           }
           else if (status == f_file_not_found) {
-            fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "ERROR: Unable to find the file '%s'", arguments.argv[data->parameters[fss_extended_write_parameter_file].additional.array[0]]);
+            fl_color_print_line(f_type_error, data->context.error, data->context.reset, "ERROR: Unable to find the file '%s'", arguments.argv[data->parameters[fss_extended_write_parameter_file].additional.array[0]]);
           }
           else if (status == f_file_error_open) {
-            fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "ERROR: Unable to open the file '%s'", arguments.argv[data->parameters[fss_extended_write_parameter_file].additional.array[0]]);
+            fl_color_print_line(f_type_error, data->context.error, data->context.reset, "ERROR: Unable to open the file '%s'", arguments.argv[data->parameters[fss_extended_write_parameter_file].additional.array[0]]);
           }
           else if (status == f_file_error_descriptor) {
-            fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "ERROR: File descriptor error while trying to open the file '%s'", arguments.argv[data->parameters[fss_extended_write_parameter_file].additional.array[0]]);
+            fl_color_print_line(f_type_error, data->context.error, data->context.reset, "ERROR: File descriptor error while trying to open the file '%s'", arguments.argv[data->parameters[fss_extended_write_parameter_file].additional.array[0]]);
           }
           else {
-            fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "INTERNAL ERROR: An unhandled error (%u) has occurred while calling f_file_open()", status);
+            fl_color_print_line(f_type_error, data->context.error, data->context.reset, "INTERNAL ERROR: An unhandled error (%u) has occurred while calling f_file_open()", status);
           }
 
           fss_extended_write_delete_data(data);
           return status;
         }
 
-        status = fl_file_write(output, buffer);
-        f_file_close(&output);
+        status = f_file_write(output, buffer, 0);
+        f_file_close(&output.id);
 
         if (f_status_is_error(status)) {
           status = f_status_set_fine(status);
 
           if (status == f_invalid_parameter) {
-            fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "INTERNAL ERROR: Invalid parameter when calling fl_file_write()");
+            fl_color_print_line(f_type_error, data->context.error, data->context.reset, "INTERNAL ERROR: Invalid parameter when calling fl_file_write()");
           }
           else if (status == f_file_error_write) {
-            fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "ERROR: Unable to write to the file '%s'", arguments.argv[data->parameters[fss_extended_write_parameter_file].additional.array[0]]);
+            fl_color_print_line(f_type_error, data->context.error, data->context.reset, "ERROR: Unable to write to the file '%s'", arguments.argv[data->parameters[fss_extended_write_parameter_file].additional.array[0]]);
           }
           else {
-            fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "INTERNAL ERROR: An unhandled error (%u) has occurred while calling fl_file_write()", status);
+            fl_color_print_line(f_type_error, data->context.error, data->context.reset, "INTERNAL ERROR: An unhandled error (%u) has occurred while calling fl_file_write()", status);
           }
 
           fss_extended_write_delete_data(data);
@@ -254,7 +255,7 @@ extern "C" {
         }
       }
       else {
-        f_print_string_dynamic(f_standard_output, buffer);
+        f_print_string_dynamic(f_type_output, buffer);
       }
     }
 
index e55637629efe0e3ee19ffe71e1979d7b2b12dac4..24fc41a37c46f144825d42cbd38f4528f8db5e2a 100644 (file)
@@ -4,7 +4,7 @@ int main(const unsigned long argc, const f_string *argv) {
   const f_console_arguments arguments = { argc, argv };
   fss_extended_write_data data = fss_extended_write_data_initialize;
 
-  if (f_pipe_exists()) {
+  if (f_pipe_input_exists()) {
     data.process_pipe = f_true;
   }
 
index 66b34c1e69257744621dff92af1ee84248684d79..c485d7a82a194f1ee289cf38968844ec2caf3062 100644 (file)
@@ -60,39 +60,39 @@ extern "C" {
 
     if (data->parameters[fss_status_code_parameter_is_error].result == f_console_result_found) {
       if (data->parameters[fss_status_code_parameter_is_warning].result == f_console_result_found) {
-        fl_color_print(f_standard_error, data->context.error, data->context.reset, "ERROR: The parameter '");
-        fl_color_print(f_standard_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_status_code_long_is_error);
-        fl_color_print(f_standard_error, data->context.error, data->context.reset, "' cannot be used with the parameter ");
-        fl_color_print(f_standard_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_status_code_long_is_warning);
-        fl_color_print_line(f_standard_error, data->context.error, data->context.reset, ".");
+        fl_color_print(f_type_error, data->context.error, data->context.reset, "ERROR: The parameter '");
+        fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_status_code_long_is_error);
+        fl_color_print(f_type_error, data->context.error, data->context.reset, "' cannot be used with the parameter ");
+        fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_status_code_long_is_warning);
+        fl_color_print_line(f_type_error, data->context.error, data->context.reset, ".");
 
         fss_status_code_delete_data(data);
         return f_status_set_error(status);
       }
       else if (data->parameters[fss_status_code_parameter_is_fine].result == f_console_result_found) {
-        fl_color_print(f_standard_error, data->context.error, data->context.reset, "ERROR: The parameter '");
-        fl_color_print(f_standard_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_status_code_long_is_error);
-        fl_color_print(f_standard_error, data->context.error, data->context.reset, "' cannot be used with the parameter ");
-        fl_color_print(f_standard_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_status_code_long_is_fine);
-        fl_color_print_line(f_standard_error, data->context.error, data->context.reset, ".");
+        fl_color_print(f_type_error, data->context.error, data->context.reset, "ERROR: The parameter '");
+        fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_status_code_long_is_error);
+        fl_color_print(f_type_error, data->context.error, data->context.reset, "' cannot be used with the parameter ");
+        fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_status_code_long_is_fine);
+        fl_color_print_line(f_type_error, data->context.error, data->context.reset, ".");
 
         fss_status_code_delete_data(data);
         return f_status_set_error(status);
       }
     }
     else if (data->parameters[fss_status_code_parameter_is_warning].result == f_console_result_found && data->parameters[fss_status_code_parameter_is_fine].result == f_console_result_found) {
-      fl_color_print(f_standard_error, data->context.error, data->context.reset, "ERROR: The parameter '");
-      fl_color_print(f_standard_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_status_code_long_is_warning);
-      fl_color_print(f_standard_error, data->context.error, data->context.reset, "' cannot be used with the parameter ");
-      fl_color_print(f_standard_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_status_code_long_is_fine);
-      fl_color_print_line(f_standard_error, data->context.error, data->context.reset, ".");
+      fl_color_print(f_type_error, data->context.error, data->context.reset, "ERROR: The parameter '");
+      fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_status_code_long_is_warning);
+      fl_color_print(f_type_error, data->context.error, data->context.reset, "' cannot be used with the parameter ");
+      fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, fss_status_code_long_is_fine);
+      fl_color_print_line(f_type_error, data->context.error, data->context.reset, ".");
 
       fss_status_code_delete_data(data);
       return f_status_set_error(status);
     }
 
     if (data->remaining.used == 0 && !data->process_pipe) {
-      fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "ERROR: you failed to specify an error code.");
+      fl_color_print_line(f_type_error, data->context.error, data->context.reset, "ERROR: you failed to specify an error code.");
 
       fss_status_code_delete_data(data);
       return f_status_set_error(f_invalid_parameter);
index 9d899c376abc62a1b74147deb9cd3883362448bf..f7ef4e269172a975ab84de75ed6e04fc5c314110 100644 (file)
@@ -4,7 +4,7 @@ int main(const unsigned long argc, const f_string *argv) {
   const f_console_arguments arguments = { argc, argv };
   fss_status_code_data data = fss_status_code_data_initialize;
 
-  if (f_pipe_exists()) {
+  if (f_pipe_input_exists()) {
     data.process_pipe = f_true;
   }
 
index 9c0cf9d2fe40894720f15709fa8467936852816d..9ac19aa9c9277000535f6b88633098d6c257cddc 100644 (file)
@@ -53,13 +53,13 @@ extern "C" {
       status = fl_console_parameter_to_number_unsigned(value, &number);
 
       if (status == f_none) {
-        fl_color_print_line(f_standard_output, data.context.error, data.context.reset, "invalid name");
+        fl_color_print_line(f_type_output, data.context.error, data.context.reset, "invalid name");
 
         return f_status_set_error(f_invalid_parameter);
       }
 
       if (status == f_no_data || f_status_set_fine(status) == f_invalid_parameter) {
-        fl_color_print_line(f_standard_output, data.context.error, data.context.reset, "invalid data");
+        fl_color_print_line(f_type_output, data.context.error, data.context.reset, "invalid data");
 
         return status;
       }
@@ -76,10 +76,10 @@ extern "C" {
 
       if (f_status_is_error(status)) {
         if (f_status_set_fine(status) == f_invalid_data) {
-          fl_color_print_line(f_standard_output, data.context.error, data.context.reset, "unknown name");
+          fl_color_print_line(f_type_output, data.context.error, data.context.reset, "unknown name");
         }
         else {
-          fl_color_print_line(f_standard_output, data.context.error, data.context.reset, "failed to convert");
+          fl_color_print_line(f_type_output, data.context.error, data.context.reset, "failed to convert");
         }
 
         return status;
@@ -87,7 +87,7 @@ extern "C" {
     }
 
     if (status == f_invalid_data) {
-      fl_color_print_line(f_standard_output, data.context.warning, data.context.reset, "unknown code");
+      fl_color_print_line(f_type_output, data.context.warning, data.context.reset, "unknown code");
 
       return f_none;
     }
@@ -114,10 +114,10 @@ extern "C" {
 
     if (f_status_is_error(status)) {
       if (f_status_set_fine(status) == f_invalid_data) {
-        fl_color_print_line(f_standard_output, data.context.error, data.context.reset, "unknown code");
+        fl_color_print_line(f_type_output, data.context.error, data.context.reset, "unknown code");
       }
       else {
-        fl_color_print_line(f_standard_output, data.context.error, data.context.reset, "failed to convert");
+        fl_color_print_line(f_type_output, data.context.error, data.context.reset, "failed to convert");
       }
 
       return status;
@@ -134,17 +134,17 @@ extern "C" {
     f_status status = fl_console_parameter_to_number_unsigned(value, number);
 
     if (*number > f_status_size_max_with_signal) {
-      fl_color_print_line(f_standard_output, data.context.error, data.context.reset, "out of range");
+      fl_color_print_line(f_type_output, data.context.error, data.context.reset, "out of range");
 
       return status;
     }
 
     if (f_status_is_error(status)) {
       if (f_status_set_fine(status) == f_number_negative) {
-        fl_color_print_line(f_standard_output, data.context.error, data.context.reset, "out of range");
+        fl_color_print_line(f_type_output, data.context.error, data.context.reset, "out of range");
       }
       else {
-        fl_color_print_line(f_standard_output, data.context.error, data.context.reset, "invalid number");
+        fl_color_print_line(f_type_output, data.context.error, data.context.reset, "invalid number");
       }
 
       return status;
index e4fa957e1c02973dc16fb3fa3dbe37d2a554d427..d745226986f3e71559ab475bc95e9f7cd0d31df4 100644 (file)
@@ -117,13 +117,13 @@ extern "C" {
       pid_t pid_services = clone(init_handler_child_services, stack_memory.services + init_stack_size_small_services, init_flags_clone, stack_memory.services);
 
       if (pid_services < 0) {
-        fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "ERROR: Failed to clone services process (errno = %i).", errno);
+        fl_color_print_line(f_type_error, data->context.error, data->context.reset, "ERROR: Failed to clone services process (errno = %i).", errno);
       }
 
       pid_t pid_control_file = clone(init_handler_child_control_file, stack_memory.control_file + init_stack_size_control_file, init_flags_clone, stack_memory.control_file);
 
       if (pid_control_file < 0) {
-        fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "ERROR: Failed to clone control via file process (errno = %i).", errno);
+        fl_color_print_line(f_type_error, data->context.error, data->context.reset, "ERROR: Failed to clone control via file process (errno = %i).", errno);
       }
     */
 
@@ -151,11 +151,11 @@ extern "C" {
             continue;
           }
           else if (errno != EINTR) {
-            fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "ERROR: sigwaitinfo() failed (errno = %i).", errno);
+            fl_color_print_line(f_type_error, data->context.error, data->context.reset, "ERROR: sigwaitinfo() failed (errno = %i).", errno);
 
             signal_problem_count++;
             if (signal_problem_count > problem_count_max_signal_size) {
-              fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "ERROR: max signal problem count has been reached, sleeping for a period of time.", errno);
+              fl_color_print_line(f_type_error, data->context.error, data->context.reset, "ERROR: max signal problem count has been reached, sleeping for a period of time.", errno);
               sleep(init_panic_signal_sleep_seconds);
               signal_problem_count = 0;
             }
index e78f97f6468b4f957224cd766eaa70a9fd98dbf5..c1bcfd1d36ccc040390e22e8bb518eccb63519e5 100644 (file)
@@ -4,7 +4,7 @@ int main(const unsigned long argc, const f_string *argv) {
   const f_console_arguments arguments = { argc, argv };
   init_data data = init_data_initialize;
 
-  if (f_pipe_exists()) {
+  if (f_pipe_input_exists()) {
     data.process_pipe = f_true;
   }
 
index 09b99ef9252bdabd0550b3448eda5604d4cbbcae..97dcdc19fec06f97b00eeb44d97ecd5c72f3b279 100644 (file)
     f_status status = f_none;
     f_string_quantity quantity = f_string_quantity_initialize;
 
-    status = f_file_open(&file, filename);
+    status = f_file_open(filename, 0, 0, &file);
 
     if (f_status_is_error(status)) {
       status = f_status_set_fine(status);
 
       if (optional) {
         if (status == f_invalid_parameter) {
-          fl_color_print_line(f_standard_error, data.context.error, data.context.reset, "INTERNAL ERROR: Invalid parameter when calling f_file_open().");
+          fl_color_print_line(f_type_error, data.context.error, data.context.reset, "INTERNAL ERROR: Invalid parameter when calling f_file_open().");
         } else if (status != f_file_not_found && status != f_file_error_open && status != f_file_error_descriptor) {
-          fl_color_print_line(f_standard_error, data.context.error, data.context.reset, "INTERNAL ERROR: An unhandled error (%u) has occurred while calling f_file_open().", status);
+          fl_color_print_line(f_type_error, data.context.error, data.context.reset, "INTERNAL ERROR: An unhandled error (%u) has occurred while calling f_file_open().", status);
         }
       } else {
         if (status == f_invalid_parameter) {
-          fl_color_print_line(f_standard_error, data.context.error, data.context.reset, "INTERNAL ERROR: Invalid parameter when calling f_file_open().");
+          fl_color_print_line(f_type_error, data.context.error, data.context.reset, "INTERNAL ERROR: Invalid parameter when calling f_file_open().");
         } else if (status == f_file_not_found) {
-          fl_color_print_line(f_standard_error, data.context.error, data.context.reset, "ERROR: Unable to find the file '%s'.", filename);
+          fl_color_print_line(f_type_error, data.context.error, data.context.reset, "ERROR: Unable to find the file '%s'.", filename);
         } else if (status == f_file_error_open) {
-          fl_color_print_line(f_standard_error, data.context.error, data.context.reset, "ERROR: Unable to open the file '%s'.", filename);
+          fl_color_print_line(f_type_error, data.context.error, data.context.reset, "ERROR: Unable to open the file '%s'.", filename);
         } else if (status == f_file_error_descriptor) {
-          fl_color_print_line(f_standard_error, data.context.error, data.context.reset, "ERROR: File descriptor error while trying to open the file '%s'.", filename);
+          fl_color_print_line(f_type_error, data.context.error, data.context.reset, "ERROR: File descriptor error while trying to open the file '%s'.", filename);
         } else {
-          fl_color_print_line(f_standard_error, data.context.error, data.context.reset, "INTERNAL ERROR: An unhandled error (%u) has occurred while calling f_file_open().", status);
+          fl_color_print_line(f_type_error, data.context.error, data.context.reset, "INTERNAL ERROR: An unhandled error (%u) has occurred while calling f_file_open().", status);
         }
       }
 
     f_macro_file_reset_position(quantity, file)
 
     fflush(stdout);
-    status = fl_file_read_position(&file, buffer, quantity);
+    status = f_file_read_until(file, buffer, quantity);
 
-    f_file_close(&file);
+    f_file_close(&file.id);
 
     if (f_status_is_error(status)) {
       status = f_status_set_fine(status);
 
       if (status == f_invalid_parameter) {
-        fl_color_print_line(f_standard_error, data.context.error, data.context.reset, "INTERNAL ERROR: Invalid parameter when calling fl_file_read_position().");
+        fl_color_print_line(f_type_error, data.context.error, data.context.reset, "INTERNAL ERROR: Invalid parameter when calling f_file_read_until().");
       } else if (status == f_number_overflow) {
-        fl_color_print_line(f_standard_error, data.context.error, data.context.reset, "ERROR: Integer overflow while trying to buffer the file '%s'.", filename);
+        fl_color_print_line(f_type_error, data.context.error, data.context.reset, "ERROR: Integer overflow while trying to buffer the file '%s'.", filename);
       } else if (status == f_file_not_open) {
-        fl_color_print_line(f_standard_error, data.context.error, data.context.reset, "INTERNAL ERROR: The file '%s' is no longer open.", filename);
+        fl_color_print_line(f_type_error, data.context.error, data.context.reset, "INTERNAL ERROR: The file '%s' is no longer open.", filename);
       } else if (status == f_file_error_seek) {
-        fl_color_print_line(f_standard_error, data.context.error, data.context.reset, "ERROR: A seek error occurred while accessing the file '%s'.", filename);
+        fl_color_print_line(f_type_error, data.context.error, data.context.reset, "ERROR: A seek error occurred while accessing the file '%s'.", filename);
       } else if (status == f_file_error_read) {
-        fl_color_print_line(f_standard_error, data.context.error, data.context.reset, "ERROR: A read error occurred while accessing the file '%s'.", filename);
+        fl_color_print_line(f_type_error, data.context.error, data.context.reset, "ERROR: A read error occurred while accessing the file '%s'.", filename);
       } else if (status == f_error_allocation || status == f_error_reallocation) {
-        fl_color_print_line(f_standard_error, data.context.error, data.context.reset, "CRITICAL ERROR: Unable to allocate memory.");
+        fl_color_print_line(f_type_error, data.context.error, data.context.reset, "CRITICAL ERROR: Unable to allocate memory.");
       } else {
-        fl_color_print_line(f_standard_error, data.context.error, data.context.reset, "INTERNAL ERROR: An unhandled error (%u) has occurred while calling fl_file_read_position().", status);
+        fl_color_print_line(f_type_error, data.context.error, data.context.reset, "INTERNAL ERROR: An unhandled error (%u) has occurred while calling f_file_read_until().", status);
       }
 
       return f_status_set_error(status);
       status = f_status_set_fine(status);
 
       if (status == f_invalid_parameter) {
-        fl_color_print_line(f_standard_error, data.context.error, data.context.reset, "INTERNAL ERROR: Invalid parameter when calling fll_fss_basic_list_read() for the file '%s'.", filename);
+        fl_color_print_line(f_type_error, data.context.error, data.context.reset, "INTERNAL ERROR: Invalid parameter when calling fll_fss_basic_list_read() for the file '%s'.", filename);
       } else if (status == f_no_data_on_eos || status == f_no_data || status == f_no_data_on_stop) {
-        fl_color_print_line(f_standard_error, data.context.error, data.context.reset, "ERROR: No relevant data was found within the file '%s'.", filename);
+        fl_color_print_line(f_type_error, data.context.error, data.context.reset, "ERROR: No relevant data was found within the file '%s'.", filename);
       } else if (status == f_error_allocation || status == f_error_reallocation) {
-        fl_color_print_line(f_standard_error, data.context.error, data.context.reset, "CRITICAL ERROR: Unable to allocate memory.");
+        fl_color_print_line(f_type_error, data.context.error, data.context.reset, "CRITICAL ERROR: Unable to allocate memory.");
       } else {
-        fl_color_print_line(f_standard_error, data.context.error, data.context.reset, "INTERNAL ERROR: An unhandled error (%u) has occurred while calling fll_fss_basic_list_read() for the file '%s'.", status, filename);
+        fl_color_print_line(f_type_error, data.context.error, data.context.reset, "INTERNAL ERROR: An unhandled error (%u) has occurred while calling fll_fss_basic_list_read() for the file '%s'.", status, filename);
       }
 
       return f_status_set_error(status);
         status = f_status_set_fine(status);
 
         if (status == f_error_allocation || status == f_error_reallocation) {
-          fl_color_print_line(f_standard_error, data.context.error, data.context.reset, "CRITICAL ERROR: Unable to allocate memory.");
+          fl_color_print_line(f_type_error, data.context.error, data.context.reset, "CRITICAL ERROR: Unable to allocate memory.");
         } else if (status == f_failure) {
           // the error message has already been displayed.
         } else {
-          fl_color_print_line(f_standard_error, data.context.error, data.context.reset, "INTERNAL ERROR: An unhandled error (%u) has occurred while calling firewall_perform_commands().", status);
+          fl_color_print_line(f_type_error, data.context.error, data.context.reset, "INTERNAL ERROR: An unhandled error (%u) has occurred while calling firewall_perform_commands().", status);
         }
 
         f_macro_fss_objects_delete_simple(local->rule_objects);
       status = f_status_set_fine(status);
 
       if (status == f_invalid_parameter) {
-        fl_color_print_line(f_standard_error, data.context.error, data.context.reset, "INTERNAL ERROR: Invalid parameter when calling fll_fss_basic_list_read() for the file '%s'.", init_rule_core_file);
+        fl_color_print_line(f_type_error, data.context.error, data.context.reset, "INTERNAL ERROR: Invalid parameter when calling fll_fss_basic_list_read() for the file '%s'.", init_rule_core_file);
       } else if (status == f_no_data_on_eos || status == f_no_data || status == f_no_data_on_stop) {
-        fl_color_print_line(f_standard_error, data.context.error, data.context.reset, "ERROR: No relevant data was found within the file '%s'.", init_rule_core_file);
+        fl_color_print_line(f_type_error, data.context.error, data.context.reset, "ERROR: No relevant data was found within the file '%s'.", init_rule_core_file);
       } else if (status == f_error_allocation || status == f_error_reallocation) {
-        fl_color_print_line(f_standard_error, data.context.error, data.context.reset, "CRITICAL ERROR: Unable to allocate memory.");
+        fl_color_print_line(f_type_error, data.context.error, data.context.reset, "CRITICAL ERROR: Unable to allocate memory.");
       } else {
-        fl_color_print_line(f_standard_error, data.context.error, data.context.reset, "INTERNAL ERROR: An unhandled error (%u) has occurred while calling fll_fss_basic_list_read() for the file '%s'.", status, init_rule_core_file);
+        fl_color_print_line(f_type_error, data.context.error, data.context.reset, "INTERNAL ERROR: An unhandled error (%u) has occurred while calling fll_fss_basic_list_read() for the file '%s'.", status, init_rule_core_file);
       }
 
       f_macro_string_dynamic_delete(buffer);
 
     if (f_status_is_error(status_process)) {
       if (status == f_error_allocation || status == f_error_reallocation) {
-        fl_color_print_line(f_standard_error, data.context.error, data.context.reset, "CRITICAL ERROR: Unable to allocate memory.");
+        fl_color_print_line(f_type_error, data.context.error, data.context.reset, "CRITICAL ERROR: Unable to allocate memory.");
       }
       else {
-        fl_color_print_line(f_standard_error, data.context.error, data.context.reset, "INTERNAL ERROR: An unhandled error (%u) has occurred while calling init_load_main_rule().", status);
+        fl_color_print_line(f_type_error, data.context.error, data.context.reset, "INTERNAL ERROR: An unhandled error (%u) has occurred while calling init_load_main_rule().", status);
       }
 
       // @todo: init_delete_data((*data));
         status = f_status_set_fine(status);
 
         if (status == f_error_allocation || status == f_error_reallocation) {
-          fl_color_print_line(f_standard_error, data.context.error, context.reset, "CRITICAL ERROR: Unable to allocate memory.");
+          fl_color_print_line(f_type_error, data.context.error, context.reset, "CRITICAL ERROR: Unable to allocate memory.");
         } else if (status == f_failure) {
           // the error message has already been displayed.
         } else {
-          fl_color_print_line(f_standard_error, data.context.error, data.context.reset, "INTERNAL ERROR: An unhandled error (%u) has occurred while calling firewall_perform_commands().", status);
+          fl_color_print_line(f_type_error, data.context.error, data.context.reset, "INTERNAL ERROR: An unhandled error (%u) has occurred while calling firewall_perform_commands().", status);
         }
 
         f_macro_fss_objects_delete_simple((*rule_objects));
     }
     else {
       if (status == f_error_allocation || status == f_error_reallocation) {
-        fl_color_print_line(f_standard_error, context.error, context.reset, "CRITICAL ERROR: Unable to allocate memory.");
+        fl_color_print_line(f_type_error, context.error, context.reset, "CRITICAL ERROR: Unable to allocate memory.");
       }
       else {
-        fl_color_print_line(f_standard_error, context.error, context.reset, "INTERNAL ERROR: An unhandled error (%u) has occurred while calling init_load_main_rule().", status);
+        fl_color_print_line(f_type_error, context.error, context.reset, "INTERNAL ERROR: An unhandled error (%u) has occurred while calling init_load_main_rule().", status);
       }
     }
 
index 820b4cf665254fd99d649cbb85b6085b36748f4e..ad0a6e2823561c7a8f7696080ecb448ef415da08 100644 (file)
@@ -4,7 +4,7 @@ int main(const unsigned long argc, const f_string *argv) {
   const f_console_arguments arguments = { argc, argv };
   status_code_data data = status_code_data_initialize;
 
-  if (f_pipe_exists()) {
+  if (f_pipe_input_exists()) {
     data.process_pipe = f_true;
   }
 
index 07f052609200ce6e9ce7a572ac5619a7599f8b23..2c81ed7f820fc32335035b4e3d44e24e313d7f8f 100644 (file)
@@ -53,13 +53,13 @@ extern "C" {
       status = fl_console_parameter_to_number_unsigned(value, &number);
 
       if (status == f_none) {
-        fl_color_print_line(f_standard_output, data.context.error, data.context.reset, "invalid name");
+        fl_color_print_line(f_type_output, data.context.error, data.context.reset, "invalid name");
 
         return f_status_set_error(f_invalid_parameter);
       }
 
       if (status == f_no_data || f_status_set_fine(status) == f_invalid_parameter) {
-        fl_color_print_line(f_standard_output, data.context.error, data.context.reset, "invalid data");
+        fl_color_print_line(f_type_output, data.context.error, data.context.reset, "invalid data");
 
         return status;
       }
@@ -71,17 +71,17 @@ extern "C" {
 
     if (f_status_is_error(status)) {
       if (f_status_set_fine(status) == f_invalid_data) {
-        fl_color_print_line(f_standard_output, data.context.error, data.context.reset, "unknown name");
+        fl_color_print_line(f_type_output, data.context.error, data.context.reset, "unknown name");
       }
       else {
-        fl_color_print_line(f_standard_output, data.context.error, data.context.reset, "failed to convert");
+        fl_color_print_line(f_type_output, data.context.error, data.context.reset, "failed to convert");
       }
 
       return status;
     }
 
     if (status == f_invalid_data) {
-      fl_color_print_line(f_standard_output, data.context.warning, data.context.reset, "unknown code");
+      fl_color_print_line(f_type_output, data.context.warning, data.context.reset, "unknown code");
 
       return f_none;
     }
@@ -108,10 +108,10 @@ extern "C" {
 
     if (f_status_is_error(status)) {
       if (f_status_set_fine(status) == f_invalid_data) {
-        fl_color_print_line(f_standard_output, data.context.error, data.context.reset, "unknown code");
+        fl_color_print_line(f_type_output, data.context.error, data.context.reset, "unknown code");
       }
       else {
-        fl_color_print_line(f_standard_output, data.context.error, data.context.reset, "failed to convert");
+        fl_color_print_line(f_type_output, data.context.error, data.context.reset, "failed to convert");
       }
 
       return status;
@@ -128,17 +128,17 @@ extern "C" {
     f_status status = fl_console_parameter_to_number_unsigned(value, number);
 
     if (*number > f_status_size_max_with_signal) {
-      fl_color_print_line(f_standard_output, data.context.error, data.context.reset, "out of range");
+      fl_color_print_line(f_type_output, data.context.error, data.context.reset, "out of range");
 
       return status;
     }
 
     if (f_status_is_error(status)) {
       if (f_status_set_fine(status) == f_number_negative) {
-        fl_color_print_line(f_standard_output, data.context.error, data.context.reset, "out of range");
+        fl_color_print_line(f_type_output, data.context.error, data.context.reset, "out of range");
       }
       else {
-        fl_color_print_line(f_standard_output, data.context.error, data.context.reset, "invalid number");
+        fl_color_print_line(f_type_output, data.context.error, data.context.reset, "invalid number");
       }
 
       return status;
index d7a92d5e4ef10fd016ee5daa0eaffbc136471a8e..6ff0b7e40a8f159441f1efda397ec23ca5c6975e 100644 (file)
@@ -60,39 +60,39 @@ extern "C" {
 
     if (data->parameters[status_code_parameter_is_error].result == f_console_result_found) {
       if (data->parameters[status_code_parameter_is_warning].result == f_console_result_found) {
-        fl_color_print(f_standard_error, data->context.error, data->context.reset, "ERROR: The parameter '");
-        fl_color_print(f_standard_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, status_code_long_is_error);
-        fl_color_print(f_standard_error, data->context.error, data->context.reset, "' cannot be used with the parameter ");
-        fl_color_print(f_standard_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, status_code_long_is_warning);
-        fl_color_print_line(f_standard_error, data->context.error, data->context.reset, ".");
+        fl_color_print(f_type_error, data->context.error, data->context.reset, "ERROR: The parameter '");
+        fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, status_code_long_is_error);
+        fl_color_print(f_type_error, data->context.error, data->context.reset, "' cannot be used with the parameter ");
+        fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, status_code_long_is_warning);
+        fl_color_print_line(f_type_error, data->context.error, data->context.reset, ".");
 
         status_code_delete_data(data);
         return f_status_set_error(status);
       }
       else if (data->parameters[status_code_parameter_is_fine].result == f_console_result_found) {
-        fl_color_print(f_standard_error, data->context.error, data->context.reset, "ERROR: The parameter '");
-        fl_color_print(f_standard_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, status_code_long_is_error);
-        fl_color_print(f_standard_error, data->context.error, data->context.reset, "' cannot be used with the parameter ");
-        fl_color_print(f_standard_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, status_code_long_is_fine);
-        fl_color_print_line(f_standard_error, data->context.error, data->context.reset, ".");
+        fl_color_print(f_type_error, data->context.error, data->context.reset, "ERROR: The parameter '");
+        fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, status_code_long_is_error);
+        fl_color_print(f_type_error, data->context.error, data->context.reset, "' cannot be used with the parameter ");
+        fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, status_code_long_is_fine);
+        fl_color_print_line(f_type_error, data->context.error, data->context.reset, ".");
 
         status_code_delete_data(data);
         return f_status_set_error(status);
       }
     }
     else if (data->parameters[status_code_parameter_is_warning].result == f_console_result_found && data->parameters[status_code_parameter_is_fine].result == f_console_result_found) {
-      fl_color_print(f_standard_error, data->context.error, data->context.reset, "ERROR: The parameter '");
-      fl_color_print(f_standard_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, status_code_long_is_warning);
-      fl_color_print(f_standard_error, data->context.error, data->context.reset, "' cannot be used with the parameter ");
-      fl_color_print(f_standard_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, status_code_long_is_fine);
-      fl_color_print_line(f_standard_error, data->context.error, data->context.reset, ".");
+      fl_color_print(f_type_error, data->context.error, data->context.reset, "ERROR: The parameter '");
+      fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, status_code_long_is_warning);
+      fl_color_print(f_type_error, data->context.error, data->context.reset, "' cannot be used with the parameter ");
+      fl_color_print(f_type_error, data->context.notable, data->context.reset, "%s%s", f_console_symbol_long_enable, status_code_long_is_fine);
+      fl_color_print_line(f_type_error, data->context.error, data->context.reset, ".");
 
       status_code_delete_data(data);
       return f_status_set_error(status);
     }
 
     if (data->remaining.used == 0 && !data->process_pipe) {
-      fl_color_print_line(f_standard_error, data->context.error, data->context.reset, "ERROR: you failed to specify a status code.");
+      fl_color_print_line(f_type_error, data->context.error, data->context.reset, "ERROR: you failed to specify a status code.");
 
       status_code_delete_data(data);
       return f_status_set_error(f_invalid_parameter);