]> Kevux Git Server - fll/commitdiff
Progress: Additional fixes based on unit tests.
authorKevin Day <Kevin@kevux.org>
Fri, 16 Oct 2026 03:36:30 +0000 (22:36 -0500)
committerKevin Day <Kevin@kevux.org>
Sat, 17 Oct 2026 01:56:11 +0000 (20:56 -0500)
19 files changed:
level_1/fl_fss/c/fss/basic.c
level_1/fl_fss/c/fss/basic_list.c
level_1/fl_fss/c/fss/basic_list.h
level_1/fl_fss/c/fss/extended.c
level_1/fl_fss/c/fss/extended_list.c
level_1/fl_fss/c/private-fss-list.c
level_1/fl_fss/c/private-fss.c
level_2/fll_fss/c/fss/basic.c
level_2/fll_fss/c/fss/basic.h
level_2/fll_fss/c/fss/basic_list.c
level_2/fll_fss/c/fss/basic_list.h
level_2/fll_fss/c/fss/embedded_list.c
level_2/fll_fss/c/fss/embedded_list.h
level_2/fll_fss/c/fss/extended.c
level_2/fll_fss/c/fss/extended.h
level_2/fll_fss/c/fss/extended_list.c
level_2/fll_fss/c/fss/extended_list.h
level_2/fll_fss/c/fss/payload.c
level_2/fll_fss/c/fss/payload.h

index 10de929890b39ace104b11446c41a96379eed083..35bba7b214363cd78e6ea7d0a74d49a115f58431 100644 (file)
@@ -48,6 +48,8 @@ extern "C" {
     }
 
     if (F_status_is_error_not(state->status)) {
+      state->status = f_memory_array_increase(state->step_small, sizeof(f_range_t), (void **) &found->array, &found->used, &found->size);
+      if (F_status_is_error(state->status)) return;
 
       // The EOS and stop cases only happen here when EOL is not found, so do not increment found.used.
       if (range->start >= buffer.used) {
index 412983d9fb283d564c3d6c22522511bf99ab860c..b2efa9cfabe5a161706043fdf5097e9600e4a82e 100644 (file)
@@ -42,6 +42,9 @@ extern "C" {
     #define ___fl_flag_has_graph_first___                 0x4
     #define ___fl_flag_has_graph_first_delimit_comment___ 0x6
     #define ___fl_flag_has_graph_first_do_escape___       0x5
+    #define ___fl_flag_has_line_first___                  0x8
+    #define ___fl_flag_has_line_first_graph_first___      0xc
+    #define ___fl_flag_has_line_first_delimit_comment___  0xa
 
     const f_number_unsigned_t delimits_used = delimits->used;
     const f_number_unsigned_t comments_used = comments->used;
@@ -56,7 +59,7 @@ extern "C" {
     f_number_unsigned_t slash_count = 0;
     f_number_unsigned_t line_start = begin;
 
-    uint8_t flag_fl = ___fl_flag_has_graph_first___;
+    uint8_t flag_fl = ___fl_flag_has_line_first_graph_first___;
 
     // The start position with a combining/joiner must be treated as Content and not as an Object.
     if (f_fss_is_combining_joiner(buffer, *range, state) == F_true) {
@@ -65,7 +68,6 @@ extern "C" {
 
     if (F_status_is_error(state->status)) return;
 
-    // Identify where the content ends.
     while (range->start <= range->stop && range->start < buffer.used) {
 
       if (state->interrupt) {
@@ -81,10 +83,10 @@ extern "C" {
           delimits->array[delimits->used++] = comment_delimit;
         }
 
-        newline_last = range->start;
         flag_fl |= ___fl_flag_has_graph_first___;
-        flag_fl &= ~___fl_flag_has_delimit_comment___;
-        ++range->start;
+        flag_fl &= ~___fl_flag_has_line_first_delimit_comment___;
+        newline_last = range->start;
+        line_start = ++range->start;
 
         // Any line that starts with a combining/joiner must be treated as Content and not as an Object.
         f_fss_skip_past_delimit(buffer, range, state);
@@ -115,7 +117,6 @@ extern "C" {
           // If any slash has a combining/joiner following it, then there is no escaping at all for that slash and therefore it is not considered an escaping character.
           if (f_fss_is_combining_joiner(buffer, *range, state) == F_true) {
             flag_fl &= ~___fl_flag_has_graph_first_do_escape___;
-            slash_count = 0;
 
             f_fss_skip_past_combining_joiner(buffer, range, state);
 
@@ -135,7 +136,7 @@ extern "C" {
         flag_fl &= ~___fl_flag_do_escape___;
 
         if (buffer.string[range->start] == f_fss_basic_list_open_s.string[0]) {
-          flag_fl &= ~___fl_flag_has_graph_first_delimit_comment___;
+          flag_fl &= ~___fl_flag_has_graph_first___;
           ++range->start;
 
           f_fss_skip_past_space(buffer, range, state);
@@ -154,13 +155,15 @@ extern "C" {
           if (F_status_is_error(state->status) || range->start > range->stop || range->start >= buffer.used) break;
 
           if (state->status == F_okay_eol) {
-            newline_last = line_start;
-            line_start = range->start;
+            previous = range->start;
             range->start = slash_first;
 
             if (slash_count % 2 == 0) {
+              state->status = f_memory_array_increase(state->step_small, sizeof(f_range_t), (void **) &found->array, &found->used, &found->size);
+              if (F_status_is_error(state->status)) break;
+
               found->array[found->used++].stop = newline_last;
-              range->start = newline_last + 1;
+              range->start = previous + 1;
               state->status = F_fss_found_content;
 
               return;
@@ -185,15 +188,8 @@ extern "C" {
 
             if (F_status_is_error(state->status)) break;
 
-            if (flag_fl & ___fl_flag_has_delimit_comment___) {
-              state->status = f_memory_array_increase(state->step_small, sizeof(f_number_unsigned_t), (void **) &delimits->array, &delimits->used, &delimits->size);
-              if (F_status_is_error(state->status)) break;
-
-              delimits->array[delimits->used++] = comment_delimit;
-            }
-
-            flag_fl |= ___fl_flag_has_graph_first___;
-            range->start = line_start + 1;
+            range->start = previous;
+            state->status = F_okay_eol;
           }
         }
         else if ((flag_fl & ___fl_flag_has_graph_first___) && buffer.string[range->start] == f_fss_comment_s.string[0]) {
@@ -210,7 +206,7 @@ extern "C" {
           else {
             if (F_status_is_error(state->status)) break;
 
-            flag_fl &= ___fl_flag_has_delimit_comment___;
+            flag_fl |= ___fl_flag_has_delimit_comment___;
             comment_delimit = slash_first;
           }
         }
@@ -220,7 +216,7 @@ extern "C" {
 
       if (buffer.string[range->start] == f_fss_basic_list_open_s.string[0]) {
         ++range->start;
-        flag_fl &= ~___fl_flag_has_graph_first_delimit_comment___;
+        flag_fl &= ~___fl_flag_has_graph_first___;
 
         f_fss_skip_past_space(buffer, range, state);
 
@@ -239,18 +235,28 @@ extern "C" {
 
         // Found a valid object, set stop point to last newline (if newline_last is begin, there newline_last is not a new line).
         if (state->status == F_okay_eol) {
-          if (begin != newline_last && newline_last == found->array[found->used].start) {
+          state->status = f_memory_array_increase(state->step_small, sizeof(f_range_t), (void **) &found->array, &found->used, &found->size);
+          if (F_status_is_error(state->status)) break;
+
+          if (flag_fl & ___fl_flag_has_delimit_comment___) {
+            state->status = f_memory_array_increase(state->step_small, sizeof(f_number_unsigned_t), (void **) &delimits->array, &delimits->used, &delimits->size);
+            if (F_status_is_error(state->status)) break;
+
+            delimits->array[delimits->used++] = comment_delimit;
+          }
+
+          if (flag_fl & ___fl_flag_has_line_first___) {
             found->array[found->used].start = 1;
             found->array[found->used++].stop = 0;
             range->start = newline_last;
+            state->status = F_fss_found_content_not;
           }
           else {
             range->start = begin == newline_last ? newline_last : newline_last + 1;
             found->array[found->used++].stop = newline_last;
+            state->status = F_fss_found_content;
           }
 
-          state->status = F_fss_found_content;
-
           return;
         }
 
@@ -275,10 +281,9 @@ extern "C" {
 
         range->start = previous;
 
-        // The newline_last is initialized to the range->start, which may not actually be a new line.
-        line_start = buffer.string[newline_last] == f_string_eol_s.string[0]
-          ? newline_last + 1
-          : newline_last;
+        line_start = flag_fl & ___fl_flag_has_line_first___
+          ? begin
+          : newline_last + 1;
 
         f_fss_seek_to_eol(buffer, range, state);
 
@@ -288,15 +293,10 @@ extern "C" {
 
         if (F_status_is_error(state->status)) break;
 
-        if (range->start > range->stop || range->start >= buffer.used) {
-          --range->start;
-        }
-        else {
-          newline_last = range->start;
-        }
-
         comments->array[comments->used].start = line_start;
-        comments->array[comments->used++].stop = range->start++;
+        comments->array[comments->used++].stop = range->start;
+        newline_last = range->start;
+        state->status = F_okay_eol;
 
         continue;
       }
@@ -305,7 +305,7 @@ extern "C" {
         if (f_fss_is_space(buffer, *range, state) == F_false) {
           if (F_status_is_error(state->status)) break;
 
-          flag_fl &= ~___fl_flag_has_graph_first_delimit_comment___;
+          flag_fl &= ~___fl_flag_has_graph_first___;
         }
       }
 
@@ -313,6 +313,14 @@ extern "C" {
       if (F_status_is_error(state->status)) break;
     } // while
 
+    if (flag_fl & ___fl_flag_has_delimit_comment___) {
+      state->status = f_memory_array_increase(state->step_small, sizeof(f_number_unsigned_t), (void **) &delimits->array, &delimits->used, &delimits->size);
+
+      if (F_status_is_error_not(state->status)) {
+        delimits->array[delimits->used++] = comment_delimit;
+      }
+    }
+
     if (F_status_is_error(state->status)) {
       delimits->used = delimits_used;
       comments->used = comments_used;
@@ -320,6 +328,9 @@ extern "C" {
       return;
     }
 
+    state->status = f_memory_array_increase(state->step_small, sizeof(f_range_t), (void **) &found->array, &found->used, &found->size);
+    if (F_status_is_error(state->status)) return;
+
     // The EOS and stop cases only happen here when the next object is not found, so do not increment found.used and let caller handle.
     if (range->start >= buffer.used) {
       found->array[found->used].stop = buffer.used - 1;
@@ -335,20 +346,25 @@ extern "C" {
       return;
     }
 
-    state->status = F_fss_found_content;
+    if (flag_fl & ___fl_flag_has_line_first___) {
+      state->status = F_fss_found_content_not;
 
-    if (range->start > begin) {
-      found->array[found->used++].stop = range->start - 1;
-    }
-    else {
       found->array[found->used].start = 1;
       found->array[found->used++].stop = 0;
     }
+    else {
+      state->status = F_fss_found_content;
+
+      found->array[found->used++].stop = range->start - 1;
+    }
 
     #undef ___fl_flag_do_escape___
     #undef ___fl_flag_has_delimit_comment___
     #undef ___fl_flag_has_graph_first___
     #undef ___fl_flag_has_graph_first_delimit_comment___
+    #undef ___fl_flag_has_graph_first_do_escape___
+    #undef ___fl_flag_has_line_first___
+    #undef ___fl_flag_has_line_first_graph_first___
   }
 #endif // _di_fl_fss_basic_list_content_read_
 
index f29cac941b13baf2c3fbbac46a33ca7dea6bda5d..b6d7165b65b0e060ac7b02dd97eb78032317bf52 100644 (file)
@@ -77,7 +77,7 @@ extern "C" {
  *
  *   This alters state.status:
  *     F_fss_found_content on success and Content is found (start location is at end of Content).
- *     F_fss_found_content_not on success and no Content is found (start location is after character designating this is not a Content).
+ *     F_fss_found_content_not on success and no Content is found or a valid Object is found before any Content is found (start location is after the character designating this is not a Content).
  *     F_okay_eos on success after reaching the end of the buffer (a valid Object is not yet confirmed).
  *     F_okay_stop on success after reaching stopping point (a valid Object is not yet confirmed).
  *     F_data_not if buffer is empty (buffer.used is 0).
@@ -92,6 +92,7 @@ extern "C" {
  *     Errors (with error bit) from: f_fss_is_space().
  *     Errors (with error bit) from: f_fss_seek_to_eol().
  *     Errors (with error bit) from: f_fss_skip_past_delimit().
+ *     Errors (with error bit) from: f_fss_skip_past_space().
  *     Errors (with error bit) from: f_memory_array_increase().
  *     Errors (with error bit) from: f_memory_array_increase_by().
  *     Errors (with error bit) from: f_utf_buffer_increment().
@@ -99,6 +100,7 @@ extern "C" {
  * @see f_fss_is_space()
  * @see f_fss_seek_to_eol()
  * @see f_fss_skip_past_delimit()
+ * @see f_fss_skip_past_space()
  * @see f_memory_array_increase()
  * @see f_memory_array_increase_by()
  * @see f_utf_buffer_increment()
index 40f7febddb3133e621aacac66fb333794a9bad94..aa21a4b55a31630d6d5cffaced873ca9fca8f412 100644 (file)
@@ -64,13 +64,14 @@ extern "C" {
       }
 
       if (state->status == F_fss_found_object || state->status == F_fss_found_object_content_not) {
-        status = f_memory_array_increase(state->step_small, sizeof(f_range_t), (void **) &found->array, &found->used, &found->size);
 
         // The private function sets the error bit on unterminated quoted Object.
         if (state->status == F_status_set_error(F_fss_found_object_content_not)) {
           state->status = F_fss_found_object_content_not;
         }
 
+        status = f_memory_array_increase(state->step_small, sizeof(f_range_t), (void **) &found->array, &found->used, &found->size);
+
         if (F_status_is_error_not(status) && quotes) {
           status = f_memory_array_increase(state->step_small, sizeof(uint8_t), (void **) &quotes->array, &quotes->used, &quotes->size);
         }
index c3fc0bfadab486a9a16e4f0d399631bf425a9bc0..f61e6b66c624aaede809efbe4a470e042745acf3 100644 (file)
@@ -207,6 +207,9 @@ extern "C" {
 
         // Found a valid content close, set stop point to last newline.
         if (state->status == F_okay_eol) {
+          state->status = f_memory_array_increase(state->step_small, sizeof(f_range_t), (void **) &found->array, &found->used, &found->size);
+          if (F_status_is_error(state->status)) break;
+
           close->start = line_start;
           close->stop = range->start - 1;
 
@@ -218,12 +221,11 @@ extern "C" {
             found->array[found->used++].stop = 0;
 
             state->status = F_fss_found_content_not;
-
-            return;
           }
-
-          found->array[found->used++].stop = newline_last;
-          state->status = F_fss_found_content;
+          else {
+            found->array[found->used++].stop = newline_last;
+            state->status = F_fss_found_content;
+          }
 
           return;
         }
index 76652f9f67c673d15f67ef767bb1918740cbcc2a..353b2d0bd9605b190a8e566a04c4cce70162e1bc 100644 (file)
@@ -32,9 +32,11 @@ extern "C" {
     // Ignore all comment lines.
     if (buffer.string[begin] == f_fss_comment_s.string[0]) {
       state->status = f_utf_buffer_increment(buffer, range, 1);
-      if (F_status_is_error(state->status)) return;
 
-      f_fss_skip_past_delimit(buffer, range, state);
+      if (F_status_is_error_not(state->status)) {
+        f_fss_skip_past_delimit(buffer, range, state);
+      }
+
       if (F_status_is_error(state->status)) return;
 
       if (range->start >= buffer.used || range->start > range->stop) {
@@ -94,53 +96,44 @@ extern "C" {
         slash_count = 1;
         flag_fl |= ___fl_flag_do_escape___;
 
-        f_fss_skip_past_delimit(buffer, range, state);
-
-        // If first slash has a combining/joiner following it, then there is no escaping at all but this is not a valid escaping slash.
-        if (F_status_is_error_not(state->status) && f_fss_is_combining_joiner(buffer, *range, state) == F_true) {
-          flag_fl &= ~___fl_flag_do_escape___;
-
-          f_fss_skip_past_combining_joiner(buffer, range, state);
+        if (flag_fl & ___fl_flag_has_graph_first___) {
+          line_start = slash_first;
         }
 
-        if (flag_fl & ___fl_flag_do_escape___) {
-          while (F_status_is_error_not(state->status) && range->start <= range->stop && range->start < buffer.used) {
+        // If any slash has a combining/joiner following it, then there is no escaping at all but this is not a valid escaping slash.
+        while (F_status_is_error_not(state->status) && range->start <= range->stop && range->start < buffer.used) {
 
-            if (state->interrupt) {
-              state->interrupt((void *) state, 0);
-              if (F_status_is_error(state->status)) break;
-            }
+          if (state->interrupt) {
+            state->interrupt((void *) state, 0);
+            if (F_status_is_error(state->status)) break;
+          }
 
-            if (buffer.string[range->start] == f_fss_placeholder_s.string[0]) {
-              // Do nothing.
-            }
-            else if (buffer.string[range->start] == f_fss_slash_s.string[0]) {
-              ++slash_count;
-            }
-            else if (f_fss_is_combining_joiner(buffer, *range, state) == F_true) {
-              flag_fl &= ~___fl_flag_do_escape___;
+          if (buffer.string[range->start] == f_fss_placeholder_s.string[0]) {
+            // Do nothing.
+          }
+          else if (buffer.string[range->start] == f_fss_slash_s.string[0]) {
+            ++slash_count;
+          }
+          else if (f_fss_is_combining_joiner(buffer, *range, state) == F_true) {
+            flag_fl &= ~___fl_flag_do_escape___;
 
-              f_fss_skip_past_combining_joiner(buffer, range, state);
+            f_fss_skip_past_combining_joiner(buffer, range, state);
 
-              break;
-            }
-            else {
-              break;
-            }
+            break;
+          }
+          else {
+            break;
+          }
 
-            if (F_status_is_error_not(state->status)) {
-              state->status = f_utf_buffer_increment(buffer, range, 1);
-            }
-          } // while
-        }
+          if (F_status_is_error_not(state->status)) {
+            state->status = f_utf_buffer_increment(buffer, range, 1);
+          }
+        } // while
 
         if (F_status_is_error(state->status)) break;
+        if (!(flag_fl & ___fl_flag_do_escape___)) continue;
 
-        if (!(flag_fl & ___fl_flag_do_escape___)) {
-          slash_count = 0;
-
-          continue;
-        }
+        flag_fl &= ~___fl_flag_do_escape___;
 
         if (range->start >= buffer.used || range->start > range->stop) {
           delimits->used = delimits_used;
@@ -164,7 +157,6 @@ extern "C" {
           f_fss_skip_past_delimit(buffer, range, state);
 
           if (F_status_is_error_not(state->status) && f_fss_is_combining_joiner(buffer, *range, state) == F_true) {
-            flag_fl &= ~___fl_flag_do_escape___;
             slash_count = 0;
 
             f_fss_skip_past_combining_joiner(buffer, range, state);
@@ -258,12 +250,11 @@ extern "C" {
         else if ((flag_fl & ___fl_flag_has_graph_first___) && buffer.string[range->start] == f_fss_comment_s.string[0]) {
           flag_fl &= ~___fl_flag_has_graph_first___;
           line_start = slash_first;
-          location = range->start++;
+          line_stop = location = range->start++;
 
           f_fss_skip_past_delimit(buffer, range, state);
 
           if (F_status_is_error_not(state->status) && f_fss_is_combining_joiner(buffer, *range, state) == F_true) {
-            flag_fl &= ~___fl_flag_do_escape___;
             slash_count = 0;
 
             f_fss_skip_past_combining_joiner(buffer, range, state);
@@ -291,7 +282,11 @@ extern "C" {
           line_stop = range->start++;
         }
         else {
-          flag_fl &= ~___fl_flag_has_graph_first___;
+          if (flag_fl & ___fl_flag_has_graph_first___) {
+            flag_fl &= ~___fl_flag_has_graph_first___;
+            line_start = slash_first;
+          }
+
           line_stop = range->start;
         }
 
@@ -299,6 +294,10 @@ extern "C" {
       }
 
       if (buffer.string[range->start] == list_open.string[0]) {
+        if (flag_fl & ___fl_flag_has_graph_first___) {
+          line_start = range->start;
+        }
+
         ++range->start;
 
         f_fss_skip_past_delimit(buffer, range, state);
@@ -338,8 +337,15 @@ extern "C" {
         }
 
         if (state->status == F_okay_eol) {
-          found->start = line_start;
-          found->stop = line_stop + macro_f_utf_byte_width(buffer.string[line_stop]) - 1;
+          if (flag_fl & ___fl_flag_has_graph_first___) {
+            found->start = 1;
+            found->stop = 0;
+          }
+          else {
+            found->start = line_start;
+            found->stop = line_stop + macro_f_utf_byte_width(buffer.string[line_stop]) - 1;
+          }
+
           ++range->start;
           state->status = F_fss_found_object;
 
@@ -348,19 +354,21 @@ extern "C" {
 
         if (flag_fl & ___fl_flag_has_graph_first___) {
           flag_fl &= ~___fl_flag_has_graph_first___;
-          line_start = 1;
-          line_stop = 0;
-        }
-        else {
-          line_stop = range->start;
+          line_start = range->start;
         }
 
+        line_stop = range->start;
+
         continue;
       }
 
       if (f_fss_is_space(buffer, *range, state) == F_false) {
-        if (F_status_is_error_not(state->status) && f_fss_is_combining_joiner(buffer, *range, state) == F_true) {
-          f_fss_skip_past_combining_joiner(buffer, range, state);
+        if ((flag_fl & ___fl_flag_has_graph_first___) && range->start > begin) {
+          if (F_status_is_error_not(state->status) && f_fss_is_combining_joiner(buffer, *range, state) == F_true) {
+            location = range->start;
+
+            state->status = f_utf_buffer_decrement(buffer, range, 1);
+          }
         }
 
         if (F_status_is_error_not(state->status)) {
index 3b6930801a640faa80bc9a09fbcfbce1384ccb20..072e3ad3312c6645b01ec5bfcc154668cdbf0dc0 100644 (file)
@@ -1332,7 +1332,7 @@ extern "C" {
         } // for
       } // for
 
-      // If there is no whitespace between the quotes, post-trimming, then remove the quotes.
+      // If there is no white space between the quotes, post-trimming, then remove the quotes.
       for (destination_range.start = front; destination_range.start < rear; ++destination_range.start) {
 
         if (state->interrupt) {
index 191a5718ec3a9f9dbefcf304caaf0448a0cdf4dd..7a89d79d4237a63fbdd6bfcd9f7a8c8334819d59 100644 (file)
@@ -41,6 +41,17 @@ extern "C" {
         }
 
         fl_fss_basic_object_read(buffer, range, &objects->array[objects->used], quoted_object, objects_delimits, state);
+
+        // Skip lines with combining/joiners at the start.
+        if (F_status_set_fine(state->status) == F_complete_not_utf_start) {
+          f_fss_seek_to_eol(buffer, range, state);
+
+          if (F_status_is_error_not(state->status)) {
+            state->status = F_fss_found_object_not;
+            continue;
+          }
+        }
+
         if (F_status_is_error(state->status)) return;
 
         if (range->start >= range->stop || range->start >= buffer.used) {
index 107e3ffd1acc1a73bed0f3f875c020c47e33a60f..53039c782b1eb45153bb3f47f7a1a0bad05450d6 100644 (file)
@@ -79,10 +79,12 @@ extern "C" {
  *     F_number_overflow (with error bit) if the maximum buffer size is reached.
  *     F_parameter (with error bit) if a parameter is invalid.
  *
+ *     Errors (with error bit) from: f_fss_seek_to_eol().
  *     Errors (with error bit) from: f_memory_array_increase().
  *     Errors (with error bit) from: fl_fss_basic_content_read().
  *     Errors (with error bit) from: fl_fss_basic_object_read().
  *
+ * @see f_fss_seek_to_eol()
  * @see f_memory_array_increase()
  * @see fl_fss_basic_content_read()
  * @see fl_fss_basic_object_read()
index 606a4ee147b066441b19be7d569c1a23d593e6a0..6974c3b08396d3185b1439243e87be417b1989ff 100644 (file)
@@ -32,6 +32,17 @@ extern "C" {
 
       do {
         fl_fss_basic_list_object_read(buffer, range, &objects->array[objects->used], objects_delimits, state);
+
+        // Skip lines with combining/joiners at the start.
+        if (F_status_set_fine(state->status) == F_complete_not_utf_start) {
+          f_fss_seek_to_eol(buffer, range, state);
+
+          if (F_status_is_error_not(state->status)) {
+            state->status = F_fss_found_object_not;
+            continue;
+          }
+        }
+
         if (F_status_is_error(state->status)) return;
 
         if (range->start >= range->stop || range->start >= buffer.used) {
index bf9555cf9d36d3e3d138f5c099c80fb3d7a386da..def398c61c85a8447db8fc86a10b2d121c3cf76b 100644 (file)
@@ -79,10 +79,12 @@ extern "C" {
  *     F_number_overflow (with error bit) if the maximum buffer size is reached.
  *     F_parameter (with error bit) if a parameter is invalid.
  *
+ *     Errors (with error bit) from: f_fss_seek_to_eol().
  *     Errors (with error bit) from: f_memory_array_increase().
  *     Errors (with error bit) from: fl_fss_basic_list_content_read().
  *     Errors (with error bit) from: fl_fss_basic_list_object_read().
  *
+ * @see f_fss_seek_to_eol()
  * @see f_memory_array_increase()
  * @see fl_fss_basic_list_content_read()
  * @see fl_fss_basic_list_object_read()
index 059e6623cbeffcec5fe4e7e3eb4b2b77e404096d..e717421ea73dfd8d62c45bca4dd8a75328e1a129 100644 (file)
@@ -35,6 +35,17 @@ extern "C" {
         nest->depth[nest->used].used = 0;
 
         fl_fss_embedded_list_object_read(buffer, range, &nest->depth[0].array[nest->depth[0].used].object, objects_delimits, state);
+
+        // Skip lines with combining/joiners at the start.
+        if (F_status_set_fine(state->status) == F_complete_not_utf_start) {
+          f_fss_seek_to_eol(buffer, range, state);
+
+          if (F_status_is_error_not(state->status)) {
+            state->status = F_fss_found_object_not;
+            continue;
+          }
+        }
+
         if (F_status_is_error(state->status)) return;
 
         if (range->start >= range->stop || range->start >= buffer.used) {
index 600e97bd77fe006b00de79b88f6aa6a13a7e16fb..a0ecc8ab2a1087e6d4e02026c7d8b481232eb8b1 100644 (file)
@@ -77,10 +77,12 @@ extern "C" {
  *     F_number_overflow (with error bit) if the maximum buffer size is reached.
  *     F_parameter (with error bit) if a parameter is invalid.
  *
+ *     Errors (with error bit) from: f_fss_seek_to_eol().
  *     Errors (with error bit) from: f_memory_array_increase().
  *     Errors (with error bit) from: fl_fss_embedded_list_content_read().
  *     Errors (with error bit) from: fl_fss_embedded_list_object_read().
  *
+ * @see f_fss_seek_to_eol()
  * @see f_memory_array_increase()
  * @see fl_fss_embedded_list_content_read()
  * @see fl_fss_embedded_list_object_read()
index bf10608820be95d9a8ce952b528f95d0cf72d1d0..029f557b0d57a33299b6337ef465d5411c3b2a2b 100644 (file)
@@ -49,6 +49,17 @@ extern "C" {
         }
 
         fl_fss_extended_object_read(buffer, range, &objects->array[objects->used], quoted_object, objects_delimits, state);
+
+        // Skip lines with combining/joiners at the start.
+        if (F_status_set_fine(state->status) == F_complete_not_utf_start) {
+          f_fss_seek_to_eol(buffer, range, state);
+
+          if (F_status_is_error_not(state->status)) {
+            state->status = F_fss_found_object_not;
+            continue;
+          }
+        }
+
         if (F_status_is_error(state->status)) return;
 
         if (range->start >= range->stop || range->start >= buffer.used) {
index 58236272f4cf31ee469902c8f0f2f77c23b723fa..f2bcab20a2a9915ab1c5c6087a6710678c6c3aa9 100644 (file)
@@ -83,10 +83,12 @@ extern "C" {
  *     F_number_overflow (with error bit) if the maximum buffer size is reached.
  *     F_parameter (with error bit) if a parameter is invalid.
  *
+ *     Errors (with error bit) from: f_fss_seek_to_eol().
  *     Errors (with error bit) from: f_memory_array_increase().
  *     Errors (with error bit) from: fl_fss_extended_content_read().
  *     Errors (with error bit) from: fl_fss_extended_object_read().
  *
+ * @see f_fss_seek_to_eol()
  * @see f_memory_array_increase()
  * @see fl_fss_extended_content_read()
  * @see fl_fss_extended_object_read()
index 344987e40bb33744ae2d27d33da6ea5919e3a137..70932d72e08643aa9d76f2a0b9a55163ef2aeecc 100644 (file)
@@ -34,6 +34,17 @@ extern "C" {
 
       do {
         fl_fss_extended_list_object_read(buffer, range, &objects->array[objects->used], objects_delimits, state);
+
+        // Skip lines with combining/joiners at the start.
+        if (F_status_set_fine(state->status) == F_complete_not_utf_start) {
+          f_fss_seek_to_eol(buffer, range, state);
+
+          if (F_status_is_error_not(state->status)) {
+            state->status = F_fss_found_object_not;
+            continue;
+          }
+        }
+
         if (F_status_is_error(state->status)) return;
 
         if (range->start >= range->stop || range->start >= buffer.used) {
index f75f0b23e46eaf3b5b21575f4ea5cb3420fd4321..9a21c2f2451bfd0f41c93ba4f01145c51cb0b1a1 100644 (file)
@@ -87,10 +87,12 @@ extern "C" {
  *     F_number_overflow (with error bit) if the maximum buffer size is reached.
  *     F_parameter (with error bit) if a parameter is invalid.
  *
+ *     Errors (with error bit) from: f_fss_seek_to_eol().
  *     Errors (with error bit) from: f_memory_array_increase().
  *     Errors (with error bit) from: fl_fss_extended_list_content_read().
  *     Errors (with error bit) from: fl_fss_extended_list_object_read().
  *
+ * @see f_fss_seek_to_eol()
  * @see f_memory_array_increase()
  * @see fl_fss_extended_list_content_read()
  * @see fl_fss_extended_list_object_read()
index 92bb984b346a477ea5601163b0e282f8014e6235..e150464df0292f7b481b006030efb422a07d9bd8 100644 (file)
@@ -41,6 +41,17 @@ extern "C" {
 
       do {
         fl_fss_basic_list_object_read(buffer, range, &objects->array[objects->used], objects_delimits, state);
+
+        // Skip lines with combining/joiners at the start.
+        if (F_status_set_fine(state->status) == F_complete_not_utf_start) {
+          f_fss_seek_to_eol(buffer, range, state);
+
+          if (F_status_is_error_not(state->status)) {
+            state->status = F_fss_found_object_not;
+            continue;
+          }
+        }
+
         if (F_status_is_error(state->status)) return;
 
         if (range->start >= range->stop || range->start >= buffer.used) {
index 4bf3e5107d372bfd505cb41a2f7738bb52935301..8fa70e1b66eef6b1c4c1416d7b41514944b755cd 100644 (file)
@@ -94,10 +94,12 @@ extern "C" {
  *
  *     F_number_overflow (with error bit) if the maximum buffer size is reached.
  *
+ *     Errors (with error bit) from: f_fss_seek_to_eol().
  *     Errors (with error bit) from: f_memory_array_increase().
  *     Errors (with error bit) from: fl_fss_basic_list_content_read().
  *     Errors (with error bit) from: fl_fss_basic_list_object_read().
  *
+ * @see f_fss_seek_to_eol()
  * @see f_memory_array_increase()
  * @see fl_fss_basic_list_content_read()
  * @see fl_fss_basic_list_object_read()