]> Kevux Git Server - fll/commitdiff
Progress: Update test file to be correct and remove some redundancy in the logic.
authorKevin Day <Kevin@kevux.org>
Sat, 3 Oct 2026 18:37:22 +0000 (13:37 -0500)
committerKevin Day <Kevin@kevux.org>
Sat, 3 Oct 2026 18:37:22 +0000 (13:37 -0500)
The matches for extended list combining test should all be a 2.

The `f_fss_is_combining_joiner()` already handles range and buffer checks and doesn't set error bit.
This means those checks can be removed.

level_1/fl_fss/c/fss/basic_list.c
level_1/fl_fss/c/fss/extended_list.c
level_1/fl_fss/c/private-fss.c
level_1/fl_fss/data/tests/matches/extended_list-combining_read.txt

index f592d4c23daf06d0617f55b7e219e022c9ffc4f9..195739e195c904865473ed0a3068bb032cf02a15 100644 (file)
@@ -268,7 +268,7 @@ extern "C" {
       if ((flag_fl & ___fl_flag_has_graph_first___) && buffer.string[range->start] == f_fss_comment_s.string[0]) {
         previous = range->start++;
 
-        if (range->start <= range->stop && range->start < buffer.used && f_fss_is_combining_joiner(buffer, *range, state) == F_true) {
+        if (f_fss_is_combining_joiner(buffer, *range, state) == F_true) {
           flag_fl &= ~___fl_flag_has_graph_first_do_escape___;
           slash_count = 0;
 
index 3395188445e51f590c5bd9f45d263845f69260f2..f6f3aefbb7cfeeea5731256946f31bb0c1160960 100644 (file)
@@ -147,7 +147,7 @@ extern "C" {
         else if (buffer.string[range->start] == f_fss_comment_s.string[0]) {
           previous = ++range->start;
 
-          if (range->start <= range->stop && range->start < buffer.used && f_fss_is_combining_joiner(buffer, *range, state) == F_true) {
+          if (f_fss_is_combining_joiner(buffer, *range, state) == F_true) {
             f_fss_skip_past_combining_joiner(buffer, range, state);
             if (F_status_is_error(state->status)) break;
 
@@ -214,7 +214,7 @@ extern "C" {
       if (buffer.string[range->start] == f_fss_comment_s.string[0]) {
         previous = ++range->start;
 
-        if (range->start <= range->stop && range->start < buffer.used && f_fss_is_combining_joiner(buffer, *range, state) == F_true) {
+        if (f_fss_is_combining_joiner(buffer, *range, state) == F_true) {
           f_fss_skip_past_combining_joiner(buffer, range, state);
           if (F_status_is_error(state->status)) break;
 
index 2b49539c413c8ff3065637f17de79839050154ee..c6b37e5c0c9be01bafc793b21c02432c52300e25 100644 (file)
@@ -235,13 +235,11 @@ extern "C" {
           f_fss_skip_past_delimit(buffer, range, state);
           if (F_status_is_error(state->status)) return;
 
-          if (range->start <= range->stop && range->start < buffer.used) {
-            if (f_fss_is_combining_joiner(buffer, *range, state) == F_true) {
-              f_fss_skip_past_combining_joiner(buffer, range, state);
-              if (F_status_is_error(state->status)) return;
+          if (f_fss_is_combining_joiner(buffer, *range, state) == F_true) {
+            f_fss_skip_past_combining_joiner(buffer, range, state);
+            if (F_status_is_error(state->status)) return;
 
-              continue;
-            }
+            continue;
           }
 
           flag_fl &= ~___fl_flag_has_joiner_combining___;
@@ -336,13 +334,11 @@ extern "C" {
                       state->status = f_utf_buffer_increment(buffer, range, 1);
                       if (F_status_is_error(state->status)) return;
 
-                      if (range->start <= range->stop && range->start < buffer.used) {
-                        if (f_fss_is_combining_joiner(buffer, *range, state) == F_true) {
-                          flag_fl |= ___fl_flag_has_joiner_combining___;
-                        }
-                        else {
-                          if (F_status_is_error(state->status)) return;
-                        }
+                      if (f_fss_is_combining_joiner(buffer, *range, state) == F_true) {
+                        flag_fl |= ___fl_flag_has_joiner_combining___;
+                      }
+                      else {
+                        if (F_status_is_error(state->status)) return;
                       }
 
                       // Designate that this is an appropriate space.
@@ -517,13 +513,11 @@ extern "C" {
               state->status = f_utf_buffer_increment(buffer, range, 1);
               if (F_status_is_error(state->status)) return;
 
-              if (range->start <= range->stop && range->start < buffer.used) {
-                if (f_fss_is_combining_joiner(buffer, *range, state) == F_true) {
-                  flag_fl |= ___fl_flag_has_joiner_combining___;
-                }
-                else {
-                  if (F_status_is_error(state->status)) return;
-                }
+              if (f_fss_is_combining_joiner(buffer, *range, state) == F_true) {
+                flag_fl |= ___fl_flag_has_joiner_combining___;
+              }
+              else {
+                if (F_status_is_error(state->status)) return;
               }
 
               // Designate that this is an appropriate space.