]> Kevux Git Server - fll/commitdiff
Update: Add F_buffer_overflow and F_buffer_underflow status codes.
authorKevin Day <thekevinday@gmail.com>
Tue, 8 Feb 2022 00:56:30 +0000 (18:56 -0600)
committerKevin Day <thekevinday@gmail.com>
Tue, 8 Feb 2022 00:56:30 +0000 (18:56 -0600)
I am rather surprised that I don't already have at least F_buffer_overflow.

level_0/f_status/c/status.h
level_0/f_status_string/c/status_string.c
level_0/f_status_string/c/status_string.h
level_2/fll_status_string/c/status_string.c

index 12529ae38b2afc6660dc48d3418bf85e17d2eed8..d9f3a78ddf2f01adf0eff0ad889d094c3a3c2300 100644 (file)
@@ -484,8 +484,10 @@ extern "C" {
     #ifndef _di_F_status_buffer_
       F_buffer,
       F_buffer_not,
+      F_buffer_overflow,
       F_buffer_too_large,
       F_buffer_too_small,
+      F_buffer_underflow,
       F_complete_not_utf,
       F_complete_not_utf_block,
       F_complete_not_utf_eoa,
index f28264a12c991511f28518c4b609da7dc548a3a6..f4dd1ac71a764fea1d493666b387e514639b1589 100644 (file)
@@ -402,8 +402,10 @@ extern "C" {
   #ifndef _di_F_status_buffer_
     const f_string_static_t f_status_buffer_s = macro_f_string_static_t_initialize(F_status_buffer_s, 0, F_status_buffer_s_length);
     const f_string_static_t f_status_buffer_not_s = macro_f_string_static_t_initialize(F_status_buffer_not_s, 0, F_status_buffer_not_s_length);
+    const f_string_static_t f_status_buffer_overflow_s = macro_f_string_static_t_initialize(F_status_buffer_overflow_s, 0, F_status_buffer_overflow_s_length);
     const f_string_static_t f_status_buffer_too_large_s = macro_f_string_static_t_initialize(F_status_buffer_too_large_s, 0, F_status_buffer_too_large_s_length);
     const f_string_static_t f_status_buffer_too_small_s = macro_f_string_static_t_initialize(F_status_buffer_too_small_s, 0, F_status_buffer_too_small_s_length);
+    const f_string_static_t f_status_buffer_underflow_s = macro_f_string_static_t_initialize(F_status_buffer_underflow_s, 0, F_status_buffer_underflow_s_length);
     const f_string_static_t f_status_complete_not_utf_s = macro_f_string_static_t_initialize(F_status_complete_not_utf_s, 0, F_status_complete_not_utf_s_length);
     const f_string_static_t f_status_complete_not_utf_block_s = macro_f_string_static_t_initialize(F_status_complete_not_utf_block_s, 0, F_status_complete_not_utf_block_s_length);
     const f_string_static_t f_status_complete_not_utf_eoa_s = macro_f_string_static_t_initialize(F_status_complete_not_utf_eoa_s, 0, F_status_complete_not_utf_eoa_s_length);
@@ -2100,6 +2102,10 @@ extern "C" {
           *name = f_status_buffer_not_s;
           break;
 
+        case F_buffer_overflow:
+          *name = f_status_buffer_overflow_s;
+          break;
+
         case F_buffer_too_large:
           *name = f_status_buffer_too_large_s;
           break;
@@ -2108,6 +2114,10 @@ extern "C" {
           *name = f_status_buffer_too_small_s;
           break;
 
+        case F_buffer_underflow:
+          *name = f_status_buffer_underflow_s;
+          break;
+
         case F_complete_not_utf_block:
           *name = f_status_complete_not_utf_block_s;
           break;
index fa45810088f3b72509fb2849b2a121562cbf2788..822e9298ae2f3be38839a99e97c09e90c9248f31 100644 (file)
@@ -1175,8 +1175,10 @@ extern "C" {
   #ifndef _di_F_status_buffer_
     #define F_status_buffer_s                     "F_buffer"
     #define F_status_buffer_not_s                 "F_buffer_not"
+    #define F_status_buffer_overflow_s            "F_buffer_overflow"
     #define F_status_buffer_too_large_s           "F_buffer_too_large"
     #define F_status_buffer_too_small_s           "F_buffer_too_small"
+    #define F_status_buffer_underflow_s           "F_buffer_underflow"
     #define F_status_complete_not_utf_s           "F_complete_not_utf"
     #define F_status_complete_not_utf_block_s     "F_complete_not_utf_block"
     #define F_status_complete_not_utf_eoa_s       "F_complete_not_utf_eoa"
@@ -1224,8 +1226,10 @@ extern "C" {
 
     #define F_status_buffer_s_length                     8
     #define F_status_buffer_not_s_length                 12
+    #define F_status_buffer_overflow_s_length            17
     #define F_status_buffer_too_large_s_length           18
     #define F_status_buffer_too_small_s_length           18
+    #define F_status_buffer_underflow_s_length           18
     #define F_status_complete_not_utf_s_length           18
     #define F_status_complete_not_utf_block_s_length     24
     #define F_status_complete_not_utf_eoa_s_length       22
@@ -1273,8 +1277,10 @@ extern "C" {
 
     extern const f_string_static_t f_status_buffer_s;
     extern const f_string_static_t f_status_buffer_not_s;
+    extern const f_string_static_t f_status_buffer_overflow_s;
     extern const f_string_static_t f_status_buffer_too_large_s;
     extern const f_string_static_t f_status_buffer_too_small_s;
+    extern const f_string_static_t f_status_buffer_underflow_s;
     extern const f_string_static_t f_status_complete_not_utf_s;
     extern const f_string_static_t f_status_complete_not_utf_block_s;
     extern const f_string_static_t f_status_complete_not_utf_eoa_s;
index 7e3979ae43a7dde0bf7c94c03a20ce6a23009494..2a30e4bfd2369050bb6ec88b2eef51cd701c0a1f 100644 (file)
@@ -2274,6 +2274,12 @@ extern "C" {
         return F_none;
       }
 
+      if (fl_string_dynamic_compare(name, f_status_buffer_overflow_s) == F_equal_to) {
+        *code = F_buffer_overflow;
+
+        return F_none;
+      }
+
       if (fl_string_dynamic_compare(name, f_status_buffer_too_large_s) == F_equal_to) {
         *code = F_buffer_too_large;
 
@@ -2286,6 +2292,12 @@ extern "C" {
         return F_none;
       }
 
+      if (fl_string_dynamic_compare(name, f_status_buffer_underflow_s) == F_equal_to) {
+        *code = F_buffer_underflow;
+
+        return F_none;
+      }
+
       if (fl_string_dynamic_compare(name, f_status_complete_not_utf_s) == F_equal_to) {
         *code = F_complete_not_utf;