]> Kevux Git Server - fll/commitdiff
Progress: Clean ups and remove useless call.
authorKevin Day <Kevin@kevux.org>
Sat, 10 Oct 2026 03:50:58 +0000 (22:50 -0500)
committerKevin Day <Kevin@kevux.org>
Sat, 10 Oct 2026 03:50:58 +0000 (22:50 -0500)
Rename `start` to `line_start` to be more consistent with other functions.
The `line_start` is also more unique.
This makes it easier to search.

The `f_fss_is_combining_joiner()` call after the space skip is not necessary.

Remove some extra, unnecessary, new lines.

level_1/fl_fss/c/fss/basic_list.c
level_2/fll_fss/c/fss/basic.c
level_2/fll_fss/c/fss/embedded_list.c
level_2/fll_fss/c/fss/extended.c
level_2/fll_fss/c/fss/extended_list.c

index 195739e195c904865473ed0a3068bb032cf02a15..37eeb053a06a6e2f02967e05b25b26a10d182e13 100644 (file)
@@ -54,7 +54,7 @@ extern "C" {
     f_number_unsigned_t previous = 0;
     f_number_unsigned_t slash_first = 0;
     f_number_unsigned_t slash_count = 0;
-    f_number_unsigned_t start = begin;
+    f_number_unsigned_t line_start = begin;
 
     uint8_t flag_fl = ___fl_flag_has_graph_first___;
 
@@ -137,8 +137,8 @@ extern "C" {
           if (range->start > range->stop || range->start >= buffer.used) break;
 
           if (state->status == F_okay_eol) {
-            newline_last = start;
-            start = range->start;
+            newline_last = line_start;
+            line_start = range->start;
             range->start = slash_first;
 
             if (slash_count % 2 == 0) {
@@ -176,7 +176,7 @@ extern "C" {
             }
 
             flag_fl |= ___fl_flag_has_graph_first___;
-            range->start = start + 1;
+            range->start = line_start + 1;
           }
           else {
             flag_fl &= ~___fl_flag_do_escape___;
@@ -226,40 +226,17 @@ extern "C" {
 
         // Found a valid object, set stop point to last newline.
         if (state->status == F_okay_eol) {
-          previous = range->start;
-          range->start = start;
-
-          if (f_fss_is_combining_joiner(buffer, *range, state) == F_true) {
-            range->start = previous;
-
-            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;
-            }
-
-            newline_last = range->start;
-            start = ++range->start;
-            flag_fl |= ___fl_flag_has_graph_first___;
+          if (newline_last == found->array[found->used].start) {
+            found->array[found->used++].stop = range->start++;
           }
           else {
-            range->start = previous;
-
-            if (F_status_is_error(state->status)) break;
-
-            if (newline_last == found->array[found->used].start) {
-              found->array[found->used++].stop = range->start++;
-            }
-            else {
-              range->start = newline_last + 1;
-              found->array[found->used++].stop = newline_last;
-            }
+            range->start = newline_last + 1;
+            found->array[found->used++].stop = newline_last;
+          }
 
-            state->status = F_fss_found_content;
+          state->status = F_fss_found_content;
 
-            return;
-          }
+          return;
         }
 
         continue;
@@ -283,7 +260,7 @@ extern "C" {
         range->start = previous;
 
         // The newline_last is initialized to the range->start, which may not actually be a new line.
-        start = buffer.string[newline_last] == f_string_eol_s.string[0]
+        line_start = buffer.string[newline_last] == f_string_eol_s.string[0]
           ? newline_last + 1
           : newline_last;
 
@@ -302,7 +279,7 @@ extern "C" {
           newline_last = range->start;
         }
 
-        comments->array[comments->used].start = start;
+        comments->array[comments->used].start = line_start;
         comments->array[comments->used++].stop = range->start++;
 
         continue;
index fe3f717688cbdea0f1dea9c1888109dbe5a3f4b6..191a5718ec3a9f9dbefcf304caaf0448a0cdf4dd 100644 (file)
@@ -18,9 +18,7 @@ extern "C" {
 
     f_status_t status = F_okay;
     f_number_unsigned_t initial_used = objects->used;
-
     uint8_t found_data = F_false;
-
     uint8_t *quoted_object = 0;
 
     do {
index 947f5b94b2ac638d3e35b43eeaafd6c091be80b9..059e6623cbeffcec5fe4e7e3eb4b2b77e404096d 100644 (file)
@@ -17,7 +17,6 @@ extern "C" {
     #endif // _di_level_2_parameter_checking_
 
     f_number_unsigned_t initial_used = 0;
-
     uint8_t found_data = F_false;
 
     if (!nest->used) {
index a47c0531df03761f7d8756a1551d3f9a5600968d..bf10608820be95d9a8ce952b528f95d0cf72d1d0 100644 (file)
@@ -18,9 +18,7 @@ extern "C" {
 
     f_status_t status = F_okay;
     f_number_unsigned_t initial_used = objects->used;
-
     uint8_t found_data = F_false;
-
     uint8_t *quoted_object = 0;
     f_uint8s_t *quoted_content = 0;
 
index 7edd7b30a71b3fc5b894776c7585ad3fb428f6d6..344987e40bb33744ae2d27d33da6ea5919e3a137 100644 (file)
@@ -18,7 +18,6 @@ extern "C" {
 
     f_status_t status = F_okay;
     f_number_unsigned_t initial_used = objects->used;
-
     uint8_t found_data = F_false;
 
     do {