]> Kevux Git Server - fll/commitdiff
Update: fix file stream error return, improve file error messages, add new status...
authorKevin Day <thekevinday@gmail.com>
Sat, 17 Apr 2021 19:44:21 +0000 (14:44 -0500)
committerKevin Day <thekevinday@gmail.com>
Sat, 17 Apr 2021 20:11:06 +0000 (15:11 -0500)
The f_file_stream_close() function is missing some errors.

The file error message printer is missing several error messages.
There is also some cleanup is needed in the file error messages (consistency problems, mostly).

Add F_file_overflow, and F_file_underflow for file specific overflow and underflow.
Add missing F_file_descriptor_not.

Remove F_file_allocation and F_file_deallocation, only the generalized F_memory and F_memory_not are used now.

level_0/f_file/c/file.c
level_0/f_file/c/file.h
level_0/f_status/c/status.h
level_1/fl_status/c/status.c
level_1/fl_status/c/status.h
level_2/fll_error/c/error.c
level_2/fll_status/c/status.c

index 67822403140f091c6f7b86865c3f5a1a060875c3..c963e6c558b5b2309674e49da84af1b33bf54deb 100644 (file)
@@ -1833,14 +1833,21 @@ extern "C" {
       if (errno == EACCES) return F_status_set_error(F_access_denied);
       if (errno == EAGAIN) return F_status_set_error(F_prohibited);
       if (errno == EBADF) return F_status_set_error(F_file_descriptor);
+      if (errno == EFBIG) return F_status_set_error(F_file_overflow);
       if (errno == EDEADLK) return F_status_set_error(F_deadlock);
+      if (errno == EDESTADDRREQ) return F_status_set_error(F_socket_not);
+      if (errno == EDQUOT) return F_status_set_error(F_space_not);
       if (errno == EFAULT) return F_status_set_error(F_buffer);
       if (errno == EINTR) return F_status_set_error(F_interrupt);
       if (errno == EINVAL) return F_status_set_error(F_parameter);
+      if (errno == EIO) return F_status_set_error(F_input_output);
       if (errno == EMFILE) return F_status_set_error(F_file_descriptor_max);
       if (errno == ENOLCK) return F_status_set_error(F_lock);
+      if (errno == ENOSPC) return F_status_set_error(F_space_not);
       if (errno == ENOTDIR) return F_status_set_error(F_file_type_not_directory);
       if (errno == EPERM) return F_status_set_error(F_prohibited);
+      if (errno == EPIPE) return F_status_set_error(F_pipe_not);
+      if (errno == EWOULDBLOCK) return F_status_set_error(F_block);
 
       return F_status_set_error(F_failure);
     }
index 95161ece3535015ed8b7a300da7d55a81492e59e..6cc0435f5bd7f7e7af5d42c58b06083e9ff91b1d 100644 (file)
@@ -1824,11 +1824,13 @@ extern "C" {
  * @return
  *   F_none is returned on success.
  *   F_access_denied (with error bit) on access denied.
+ *   F_block (with error bit) if the action would block and non-blocking is set on the stream.
  *   F_buffer (with error bit) if the buffer is invalid.
  *   F_deadlock (with error bit) if operation would cause a deadlock.
  *   F_file_close (with error bit) if fclose() failed for any other reason.
  *   F_file_descriptor (with error bit) if file descriptor is invalid.
  *   F_file_descriptor_max (with error bit) if max file descriptors was reached.
+ *   F_file_overflow (with error bit) if the write exceeds some implementation defined maximum file size.
  *   F_file_synchronize (with error bit) on flush failure.
  *   F_file_type_not_directory (with error bit) if F_NOTIFY was specified and file.id is not a directory.
  *   F_filesystem_quota_block (with error bit) if filesystem's disk blocks or inodes are exhausted.
@@ -1836,8 +1838,10 @@ extern "C" {
  *   F_interrupt (with error bit) when program received an interrupt signal, halting operation.
  *   F_lock (with error bit) if failed to lock, such as lock table is full or too many open segments.
  *   F_parameter (with error bit) if a parameter is invalid.
+ *   F_pipe_not (with error bit) if the stream is a pipe or a socket but the pipe or socket is already closed.
  *   F_prohibited (with error bit) if filesystem does not allow for making changes.
  *   F_space_not (with error bit) if filesystem is out of space (or filesystem quota is reached).
+ *   F_socket_not (with error bit) if the datagram socket in which a peer has not been set (for socket related streams).
  *
  * @see close()
  * @see fclose()
index a3e2745c21fdaa4ef18a6e4949a850ddf9e61a8e..abe7e199acdf7ded87392018a0e2aea6a52acc5e 100644 (file)
@@ -423,12 +423,11 @@ extern "C" {
 
     #ifndef _di_F_status_file_
       F_file,
-      F_file_allocation,
       F_file_close,
       F_file_closed,
-      F_file_deallocation,
       F_file_descriptor,
       F_file_descriptor_max,
+      F_file_descriptor_not,
       F_file_empty,
       F_file_flush,
       F_file_found,
@@ -437,6 +436,7 @@ extern "C" {
       F_file_open,
       F_file_opened,
       F_file_open_max,
+      F_file_overflow,
       F_file_purge,
       F_file_read,
       F_file_reallocation,
@@ -461,6 +461,7 @@ extern "C" {
       F_file_type_regular,
       F_file_type_socket,
       F_file_type_unknown,
+      F_file_underflow,
       F_file_utf,
       F_file_utf_not,
       F_file_write,
index 6dfeb6f136980643a70d38511e3a3688b5d5e8c2..be8eab10b881c26ff0c6c17c170637bc96d751b0 100644 (file)
@@ -1007,24 +1007,21 @@ extern "C" {
         case F_file:
           *string = FL_status_string_file;
           break;
-        case F_file_allocation:
-          *string = FL_status_string_file_allocation;
-          break;
         case F_file_close:
           *string = FL_status_string_file_close;
           break;
         case F_file_closed:
           *string = FL_status_string_file_closed;
           break;
-        case F_file_deallocation:
-          *string = FL_status_string_file_deallocation;
-          break;
         case F_file_descriptor:
           *string = FL_status_string_file_descriptor;
           break;
         case F_file_descriptor_max:
           *string = FL_status_string_file_descriptor_max;
           break;
+        case F_file_descriptor_not:
+          *string = FL_status_string_file_descriptor_not;
+          break;
         case F_file_empty:
           *string = FL_status_string_file_empty;
           break;
@@ -1049,6 +1046,9 @@ extern "C" {
         case F_file_opened:
           *string = FL_status_string_file_opened;
           break;
+        case F_file_overflow:
+          *string = FL_status_string_file_overflow;
+          break;
         case F_file_purge:
           *string = FL_status_string_file_purge;
           break;
@@ -1118,6 +1118,9 @@ extern "C" {
         case F_file_type_unknown:
           *string = FL_status_string_file_type_unknown;
           break;
+        case F_file_underflow:
+          *string = FL_status_string_file_underflow;
+          break;
         case F_file_utf:
           *string = FL_status_string_file_utf;
           break;
index 4f2de20f98aa47a2d234195fce536084188f4ff1..81be650faa73bc2a4cfbac6bf9357270684122a0 100644 (file)
@@ -708,12 +708,11 @@ extern "C" {
 
   #ifndef _di_F_status_file_
     #define FL_status_string_file                    "F_file"
-    #define FL_status_string_file_allocation         "F_file_allocation"
     #define FL_status_string_file_close              "F_file_close"
     #define FL_status_string_file_closed             "F_file_closed"
-    #define FL_status_string_file_deallocation       "F_file_deallocation"
     #define FL_status_string_file_descriptor         "F_file_descriptor"
     #define FL_status_string_file_descriptor_max     "F_file_descriptor_max"
+    #define FL_status_string_file_descriptor_not     "F_file_descriptor_not"
     #define FL_status_string_file_empty              "F_file_empty"
     #define FL_status_string_file_flush              "F_file_flush"
     #define FL_status_string_file_found              "F_file_found"
@@ -722,6 +721,7 @@ extern "C" {
     #define FL_status_string_file_open               "F_file_open"
     #define FL_status_string_file_open_max           "F_file_open_max"
     #define FL_status_string_file_opened             "F_file_opened"
+    #define FL_status_string_file_overflow           "F_file_overflow"
     #define FL_status_string_file_purge              "F_file_purge"
     #define FL_status_string_file_read               "F_file_read"
     #define FL_status_string_file_reallocation       "F_file_reallocation"
@@ -746,17 +746,17 @@ extern "C" {
     #define FL_status_string_file_type_regular       "F_file_type_regular"
     #define FL_status_string_file_type_socket        "F_file_type_socket"
     #define FL_status_string_file_type_unknown       "F_file_type_unknown"
+    #define FL_status_string_file_underflow          "F_file_underflow"
     #define FL_status_string_file_utf                "F_file_utf"
     #define FL_status_string_file_utf_not            "F_file_utf_not"
     #define FL_status_string_file_write              "F_file_write"
 
     #define FL_status_string_file_length                     6
-    #define FL_status_string_file_allocation_length          17
     #define FL_status_string_file_close_length               12
     #define FL_status_string_file_closed_length              13
-    #define FL_status_string_file_deallocation_length        19
     #define FL_status_string_file_descriptor_length          17
     #define FL_status_string_file_descriptor_max_length      21
+    #define FL_status_string_file_descriptor_not_length      21
     #define FL_status_string_file_empty_length               12
     #define FL_status_string_file_flush_length               12
     #define FL_status_string_file_found_length               12
@@ -765,6 +765,7 @@ extern "C" {
     #define FL_status_string_file_open_length                11
     #define FL_status_string_file_open_max_length            15
     #define FL_status_string_file_opened_length              13
+    #define FL_status_string_file_overflow_length            15
     #define FL_status_string_file_purge_length               12
     #define FL_status_string_file_read_length                11
     #define FL_status_string_file_reallocation_length        19
@@ -789,6 +790,7 @@ extern "C" {
     #define FL_status_string_file_type_regular_length        19
     #define FL_status_string_file_type_socket_length         18
     #define FL_status_string_file_type_unknown_length        19
+    #define FL_status_string_file_underflow_length           16
     #define FL_status_string_file_utf_length                 10
     #define FL_status_string_file_utf_not_length             14
     #define FL_status_string_file_write_length               12
index a7adfda814b9561348ed9011cc67c66de6244c2d..9143b91286c26ae07079271cd6ca12a05cb73567 100644 (file)
@@ -69,9 +69,20 @@ extern "C" {
     if (status == F_directory_empty_not) {
       if (print.verbosity != f_console_verbosity_quiet) {
         fprintf(print.to.stream, "%c", f_string_eol_s[0]);
-        fprintf(print.to.stream, "%s%sThe %s '", print.context.before->string, print.prefix, type_name);
+        fprintf(print.to.stream, "%s%sUnable to %s %s '", print.context.before->string, print.prefix, operation, type_name);
         fprintf(print.to.stream, "%s%s%s%s", print.context.after->string, print.notable.before->string, name, print.notable.after->string);
-        fprintf(print.to.stream, "%s' is not empty.%s%c", print.context.before->string, print.context.after->string, f_string_eol_s[0]);
+        fprintf(print.to.stream, "%s', not empty.%s%c", print.context.before->string, print.context.after->string, f_string_eol_s[0]);
+      }
+
+      return F_false;
+    }
+
+    if (status == F_file_close) {
+      if (print.verbosity != f_console_verbosity_quiet) {
+        fprintf(print.to.stream, "%c", f_string_eol_s[0]);
+        fprintf(print.to.stream, "%s%sUnable to %s %s '", print.context.before->string, print.prefix, operation, type_name);
+        fprintf(print.to.stream, "%s%s%s%s", print.context.after->string, print.notable.before->string, name, print.notable.after->string);
+        fprintf(print.to.stream, "%s', failed to close.%s%c", print.context.before->string, print.context.after->string, f_string_eol_s[0]);
       }
 
       return F_false;
@@ -80,9 +91,9 @@ extern "C" {
     if (status == F_file_closed) {
       if (print.verbosity != f_console_verbosity_quiet) {
         fprintf(print.to.stream, "%c", f_string_eol_s[0]);
-        fprintf(print.to.stream, "%s%sThe %s '", print.context.before->string, print.prefix, type_name);
+        fprintf(print.to.stream, "%s%sUnable to %s %s '", print.context.before->string, print.prefix, operation, type_name);
         fprintf(print.to.stream, "%s%s%s%s", print.context.after->string, print.notable.before->string, name, print.notable.after->string);
-        fprintf(print.to.stream, "%s' is not open.%s%c", print.context.before->string, print.context.after->string, f_string_eol_s[0]);
+        fprintf(print.to.stream, "%s', is closed.%s%c", print.context.before->string, print.context.after->string, f_string_eol_s[0]);
       }
 
       return F_false;
@@ -91,9 +102,9 @@ extern "C" {
     if (status == F_file_found) {
       if (print.verbosity != f_console_verbosity_quiet) {
         fprintf(print.to.stream, "%c", f_string_eol_s[0]);
-        fprintf(print.to.stream, "%s%sThe %s '", print.context.before->string, print.prefix, type_name);
+        fprintf(print.to.stream, "%s%sUnable to %s %s '", print.context.before->string, print.prefix, operation, type_name);
         fprintf(print.to.stream, "%s%s%s%s", print.context.after->string, print.notable.before->string, name, print.notable.after->string);
-        fprintf(print.to.stream, "%s' already exists.%s%c", print.context.before->string, print.context.after->string, f_string_eol_s[0]);
+        fprintf(print.to.stream, "%s', found %s.%s%c", print.context.before->string, type_name, print.context.after->string, f_string_eol_s[0]);
       }
 
       return F_false;
@@ -102,42 +113,96 @@ extern "C" {
     if (status == F_file_found_not) {
       if (print.verbosity != f_console_verbosity_quiet) {
         fprintf(print.to.stream, "%c", f_string_eol_s[0]);
-        fprintf(print.to.stream, "%s%sFailed to find %s '", print.context.before->string, print.prefix, type_name);
+        fprintf(print.to.stream, "%s%sUnable to %s %s '", print.context.before->string, print.prefix, operation, type_name);
         fprintf(print.to.stream, "%s%s%s%s", print.context.after->string, print.notable.before->string, name, print.notable.after->string);
-        fprintf(print.to.stream, "%s'.%s%c", print.context.before->string, print.context.after->string, f_string_eol_s[0]);
+        fprintf(print.to.stream, "%s', could not find %s.%s%c", print.context.before->string, type_name, print.context.after->string, f_string_eol_s[0]);
       }
 
       return F_false;
     }
 
     if (status == F_file_open) {
-      fprintf(print.to.stream, "%s%sUnable to open the %s '", print.context.before->string, print.prefix, type_name);
+      fprintf(print.to.stream, "%s%sUnable to %s %s '", print.context.before->string, print.prefix, operation, type_name);
       fprintf(print.to.stream, "%s%s%s%s", print.context.after->string, print.notable.before->string, name, print.notable.after->string);
-      fprintf(print.to.stream, "%s'.%s%c", print.context.before->string, print.context.after->string, f_string_eol_s[0]);
+      fprintf(print.to.stream, "%s', already open.%s%c", print.context.before->string, print.context.after->string, f_string_eol_s[0]);
 
       return F_false;
     }
 
     if (status == F_file_descriptor) {
-      fprintf(print.to.stream, "%s%sFile descriptor print while trying to open the %s '", print.context.before->string, print.prefix, type_name);
+      fprintf(print.to.stream, "%s%sFile descriptor error while trying to %s %s '", print.context.before->string, print.prefix, operation, type_name);
       fprintf(print.to.stream, "%s%s%s%s", print.context.after->string, print.notable.before->string, name, print.notable.after->string);
-      fprintf(print.to.stream, "%c", f_string_eol_s[0]);
+      fprintf(print.to.stream, "%s'.%s%c", print.context.before->string, print.context.after->string, f_string_eol_s[0]);
 
       return F_false;
     }
 
-    if (status == F_number_underflow) {
-      fprintf(print.to.stream, "%s%sInteger underflow while trying to buffer the %s '", print.context.before->string, print.prefix, type_name);
+    if (status == F_file_descriptor_max) {
+      fprintf(print.to.stream, "%s%sMax file descriptors reached while trying to %s %s '", print.context.before->string, print.prefix, operation, type_name);
+      fprintf(print.to.stream, "%s%s%s%s", print.context.after->string, print.notable.before->string, name, print.notable.after->string);
+      fprintf(print.to.stream, "%s'.%s%c", print.context.before->string, print.context.after->string, f_string_eol_s[0]);
+
+      return F_false;
+    }
+
+    if (status == F_file_descriptor_not) {
+      if (print.verbosity != f_console_verbosity_quiet) {
+        fprintf(print.to.stream, "%c", f_string_eol_s[0]);
+        fprintf(print.to.stream, "%s%sInvalid file descriptor while trying to %s %s '", print.context.before->string, print.prefix, operation, type_name);
+        fprintf(print.to.stream, "%s%s%s%s", print.context.after->string, print.notable.before->string, name, print.notable.after->string);
+        fprintf(print.to.stream, "%s'.%s%c", print.context.before->string, print.context.after->string, f_string_eol_s[0]);
+      }
+
+      return F_false;
+    }
+
+    if (status == F_file_empty) {
+      fprintf(print.to.stream, "%s%sUnable to %s %s '", print.context.before->string, print.prefix, operation, type_name);
+      fprintf(print.to.stream, "%s%s%s%s", print.context.after->string, print.notable.before->string, name, print.notable.after->string);
+      fprintf(print.to.stream, "%s', %s is empty.%s%c", print.context.before->string, type_name, print.context.after->string, f_string_eol_s[0]);
+
+      return F_false;
+    }
+
+    if (status == F_file_flush) {
+      fprintf(print.to.stream, "%s%sUnable to %s %s '", print.context.before->string, print.prefix, type_name);
+      fprintf(print.to.stream, "%s%s%s%s", print.context.after->string, print.notable.before->string, name, print.notable.after->string);
+      fprintf(print.to.stream, "%s', flush failed.%s%c", print.context.before->string, print.context.after->string, f_string_eol_s[0]);
+
+      return F_false;
+    }
+
+    if (status == F_file_open_max) {
+      fprintf(print.to.stream, "%s%sMax open files reached while trying to %s %s '", print.context.before->string, print.prefix, operation, type_name);
       fprintf(print.to.stream, "%s%s%s%s", print.context.after->string, print.notable.before->string, name, print.notable.after->string);
       fprintf(print.to.stream, "%s'.%s%c", print.context.before->string, print.context.after->string, f_string_eol_s[0]);
 
       return F_false;
     }
 
+    if (status == F_file_overflow) {
+      if (print.verbosity != f_console_verbosity_quiet) {
+        fprintf(print.to.stream, "%c", f_string_eol_s[0]);
+        fprintf(print.to.stream, "%s%sOverflow while trying to %s %s '", print.context.before->string, print.prefix, operation, type_name);
+        fprintf(print.to.stream, "%s%s%s%s", print.context.after->string, print.notable.before->string, name, print.notable.after->string);
+        fprintf(print.to.stream, "%s'.%s%c", print.context.before->string, print.context.after->string, f_string_eol_s[0]);
+      }
+
+      return F_false;
+    }
+
+    if (status == F_file_purge) {
+      fprintf(print.to.stream, "%s%sUnable to %s %s '", print.context.before->string, print.prefix, operation, type_name);
+      fprintf(print.to.stream, "%s%s%s%s", print.context.after->string, print.notable.before->string, name, print.notable.after->string);
+      fprintf(print.to.stream, "%s', purge failed.%s%c", print.context.before->string, print.context.after->string, f_string_eol_s[0]);
+
+      return F_false;
+    }
+
     if (status == F_file_read) {
       if (print.verbosity != f_console_verbosity_quiet) {
         fprintf(print.to.stream, "%c", f_string_eol_s[0]);
-        fprintf(print.to.stream, "%s%sA read print occurred while accessing the %s '", print.context.before->string, print.prefix, type_name);
+        fprintf(print.to.stream, "%s%sRead failed while trying to %s %s '", print.context.before->string, print.prefix, operation, type_name);
         fprintf(print.to.stream, "%s%s%s%s", print.context.after->string, print.notable.before->string, name, print.notable.after->string);
         fprintf(print.to.stream, "%s'.%s%c", print.context.before->string, print.context.after->string, f_string_eol_s[0]);
       }
@@ -148,7 +213,40 @@ extern "C" {
     if (status == F_file_seek) {
       if (print.verbosity != f_console_verbosity_quiet) {
         fprintf(print.to.stream, "%c", f_string_eol_s[0]);
-        fprintf(print.to.stream, "%s%sA seek print occurred while accessing the %s '", print.context.before->string, print.prefix, type_name);
+        fprintf(print.to.stream, "%s%sSeek failed while trying to %s %s '", print.context.before->string, print.prefix, operation, type_name);
+        fprintf(print.to.stream, "%s%s%s%s", print.context.after->string, print.notable.before->string, name, print.notable.after->string);
+        fprintf(print.to.stream, "%s'.%s%c", print.context.before->string, print.context.after->string, f_string_eol_s[0]);
+      }
+
+      return F_false;
+    }
+
+    if (status == F_file_stat) {
+      if (print.verbosity != f_console_verbosity_quiet) {
+        fprintf(print.to.stream, "%c", f_string_eol_s[0]);
+        fprintf(print.to.stream, "%s%sStat failed while trying to %s %s '", print.context.before->string, print.prefix, operation, type_name);
+        fprintf(print.to.stream, "%s%s%s%s", print.context.after->string, print.notable.before->string, name, print.notable.after->string);
+        fprintf(print.to.stream, "%s'.%s%c", print.context.before->string, print.context.after->string, f_string_eol_s[0]);
+      }
+
+      return F_false;
+    }
+
+    if (status == F_file_synchronize) {
+      if (print.verbosity != f_console_verbosity_quiet) {
+        fprintf(print.to.stream, "%c", f_string_eol_s[0]);
+        fprintf(print.to.stream, "%s%sSynchronize failed while trying to %s %s '", print.context.before->string, print.prefix, operation, type_name);
+        fprintf(print.to.stream, "%s%s%s%s", print.context.after->string, print.notable.before->string, name, print.notable.after->string);
+        fprintf(print.to.stream, "%s'.%s%c", print.context.before->string, print.context.after->string, f_string_eol_s[0]);
+      }
+
+      return F_false;
+    }
+
+    if (status == F_file_utf) {
+      if (print.verbosity != f_console_verbosity_quiet) {
+        fprintf(print.to.stream, "%c", f_string_eol_s[0]);
+        fprintf(print.to.stream, "%s%sUTF failure while trying to %s %s '", print.context.before->string, print.prefix, operation, type_name);
         fprintf(print.to.stream, "%s%s%s%s", print.context.after->string, print.notable.before->string, name, print.notable.after->string);
         fprintf(print.to.stream, "%s'.%s%c", print.context.before->string, print.context.after->string, f_string_eol_s[0]);
       }
@@ -156,6 +254,33 @@ extern "C" {
       return F_false;
     }
 
+    if (status == F_file_utf_not) {
+      if (print.verbosity != f_console_verbosity_quiet) {
+        fprintf(print.to.stream, "%c", f_string_eol_s[0]);
+        fprintf(print.to.stream, "%s%sInvalid UTF while trying to %s %s '", print.context.before->string, print.prefix, operation, type_name);
+        fprintf(print.to.stream, "%s%s%s%s", print.context.after->string, print.notable.before->string, name, print.notable.after->string);
+        fprintf(print.to.stream, "%s'.%s%c", print.context.before->string, print.context.after->string, f_string_eol_s[0]);
+      }
+
+      return F_false;
+    }
+
+    if (status == F_file_underflow) {
+      fprintf(print.to.stream, "%s%sUnderflow while trying to %s %s '", print.context.before->string, print.prefix, operation, type_name);
+      fprintf(print.to.stream, "%s%s%s%s", print.context.after->string, print.notable.before->string, name, print.notable.after->string);
+      fprintf(print.to.stream, "%s'.%s%c", print.context.before->string, print.context.after->string, f_string_eol_s[0]);
+
+      return F_false;
+    }
+
+    if (status == F_file_write) {
+      fprintf(print.to.stream, "%s%sFailed to %s %s '", print.context.before->string, print.prefix, operation, type_name);
+      fprintf(print.to.stream, "%s%s%s%s", print.context.after->string, print.notable.before->string, name, print.notable.after->string);
+      fprintf(print.to.stream, "%s', write failure.%s%c", print.context.before->string, print.context.after->string, f_string_eol_s[0]);
+
+      return F_false;
+    }
+
     if (status == F_loop) {
       if (print.verbosity != f_console_verbosity_quiet) {
         fprintf(print.to.stream, "%c", f_string_eol_s[0]);
@@ -181,7 +306,7 @@ extern "C" {
     if (status == F_number_overflow) {
       if (print.verbosity != f_console_verbosity_quiet) {
         fprintf(print.to.stream, "%c", f_string_eol_s[0]);
-        fprintf(print.to.stream, "%s%sOverflow while trying to %s %s '", print.context.before->string, print.prefix, operation, type_name);
+        fprintf(print.to.stream, "%s%sNumber overflow while trying to %s %s '", print.context.before->string, print.prefix, operation, type_name);
         fprintf(print.to.stream, "%s%s%s%s", print.context.after->string, print.notable.before->string, name, print.notable.after->string);
         fprintf(print.to.stream, "%s'.%s%c", print.context.before->string, print.context.after->string, f_string_eol_s[0]);
       }
@@ -189,6 +314,14 @@ extern "C" {
       return F_false;
     }
 
+    if (status == F_number_underflow) {
+      fprintf(print.to.stream, "%s%sNumber underflow while trying to %s %s '", print.context.before->string, print.prefix, operation, type_name);
+      fprintf(print.to.stream, "%s%s%s%s", print.context.after->string, print.notable.before->string, name, print.notable.after->string);
+      fprintf(print.to.stream, "%s'.%s%c", print.context.before->string, print.context.after->string, f_string_eol_s[0]);
+
+      return F_false;
+    }
+
     if (status == F_parameter) {
       if (print.verbosity != f_console_verbosity_quiet) {
         fprintf(print.to.stream, "%c", f_string_eol_s[0]);
@@ -228,6 +361,17 @@ extern "C" {
       }
     }
 
+    if (status == F_failure) {
+      if (print.verbosity != f_console_verbosity_quiet) {
+        fprintf(print.to.stream, "%c", f_string_eol_s[0]);
+        fprintf(print.to.stream, "%s%sFailed to %s %s '", print.context.before->string, print.prefix, operation, type_name);
+        fprintf(print.to.stream, "%s%s%s%s", print.context.after->string, print.notable.before->string, name, print.notable.after->string);
+        fprintf(print.to.stream, "%s'.%s%c", print.context.before->string, print.context.after->string, f_string_eol_s[0]);
+      }
+
+      return F_false;
+    }
+
     if (type == fll_error_file_type_file || type == fll_error_file_type_directory) {
       if (status == F_directory_found_not) {
         if (print.verbosity != f_console_verbosity_quiet) {
@@ -239,19 +383,6 @@ extern "C" {
 
         return F_false;
       }
-
-      if (type == fll_error_file_type_directory) {
-        if (status == F_failure) {
-          if (print.verbosity != f_console_verbosity_quiet) {
-            fprintf(print.to.stream, "%c", f_string_eol_s[0]);
-            fprintf(print.to.stream, "%s%sFailed to %s %s '", print.context.before->string, print.prefix, operation, type_name);
-            fprintf(print.to.stream, "%s%s%s%s", print.context.after->string, print.notable.before->string, name, print.notable.after->string);
-            fprintf(print.to.stream, "%s'.%s%c", print.context.before->string, print.context.after->string, f_string_eol_s[0]);
-          }
-
-          return F_false;
-        }
-      }
     }
 
     return private_fll_error_print(print, status, function, fallback);
index 6d9fd8d298cc48b88932b6f3d587805a405f10a0..1833f92ce14b43f19668ab3eaae814e21f4d7544 100644 (file)
@@ -1665,11 +1665,6 @@ extern "C" {
         return F_none;
       }
 
-      if (fl_string_compare(string, FL_status_string_file_allocation, length, FL_status_string_file_allocation_length) == F_equal_to) {
-        *code = F_file_allocation;
-        return F_none;
-      }
-
       if (fl_string_compare(string, FL_status_string_file_close, length, FL_status_string_file_close_length) == F_equal_to) {
         *code = F_file_close;
         return F_none;
@@ -1680,11 +1675,6 @@ extern "C" {
         return F_none;
       }
 
-      if (fl_string_compare(string, FL_status_string_file_deallocation, length, FL_status_string_file_deallocation_length) == F_equal_to) {
-        *code = F_file_deallocation;
-        return F_none;
-      }
-
       if (fl_string_compare(string, FL_status_string_file_descriptor, length, FL_status_string_file_descriptor_length) == F_equal_to) {
         *code = F_file_descriptor;
         return F_none;
@@ -1695,6 +1685,11 @@ extern "C" {
         return F_none;
       }
 
+      if (fl_string_compare(string, FL_status_string_file_descriptor_not, length, FL_status_string_file_descriptor_not_length) == F_equal_to) {
+        *code = F_file_descriptor_not;
+        return F_none;
+      }
+
       if (fl_string_compare(string, FL_status_string_file_empty, length, FL_status_string_file_empty_length) == F_equal_to) {
         *code = F_file_empty;
         return F_none;
@@ -1735,6 +1730,11 @@ extern "C" {
         return F_none;
       }
 
+      if (fl_string_compare(string, FL_status_string_file_overflow, length, FL_status_string_file_overflow_length) == F_equal_to) {
+        *code = F_file_overflow;
+        return F_none;
+      }
+
       if (fl_string_compare(string, FL_status_string_file_purge, length, FL_status_string_file_purge_length) == F_equal_to) {
         *code = F_file_purge;
         return F_none;
@@ -1850,6 +1850,11 @@ extern "C" {
         return F_none;
       }
 
+      if (fl_string_compare(string, FL_status_string_file_underflow, length, FL_status_string_file_underflow_length) == F_equal_to) {
+        *code = F_file_underflow;
+        return F_none;
+      }
+
       if (fl_string_compare(string, FL_status_string_file_utf, length, FL_status_string_file_utf_length) == F_equal_to) {
         *code = F_file_utf;
         return F_none;