From: Kevin Day Date: Sat, 10 Oct 2026 03:50:58 +0000 (-0500) Subject: Progress: Clean ups and remove useless call. X-Git-Url: https://git.kevux.org/?a=commitdiff_plain;h=506090b5a80b684fe29c90d837bcf5cfb1ff3b13;p=fll Progress: Clean ups and remove useless call. 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. --- diff --git a/level_1/fl_fss/c/fss/basic_list.c b/level_1/fl_fss/c/fss/basic_list.c index 195739e19..37eeb053a 100644 --- a/level_1/fl_fss/c/fss/basic_list.c +++ b/level_1/fl_fss/c/fss/basic_list.c @@ -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; diff --git a/level_2/fll_fss/c/fss/basic.c b/level_2/fll_fss/c/fss/basic.c index fe3f71768..191a5718e 100644 --- a/level_2/fll_fss/c/fss/basic.c +++ b/level_2/fll_fss/c/fss/basic.c @@ -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 { diff --git a/level_2/fll_fss/c/fss/embedded_list.c b/level_2/fll_fss/c/fss/embedded_list.c index 947f5b94b..059e6623c 100644 --- a/level_2/fll_fss/c/fss/embedded_list.c +++ b/level_2/fll_fss/c/fss/embedded_list.c @@ -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) { diff --git a/level_2/fll_fss/c/fss/extended.c b/level_2/fll_fss/c/fss/extended.c index a47c0531d..bf1060882 100644 --- a/level_2/fll_fss/c/fss/extended.c +++ b/level_2/fll_fss/c/fss/extended.c @@ -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; diff --git a/level_2/fll_fss/c/fss/extended_list.c b/level_2/fll_fss/c/fss/extended_list.c index 7edd7b30a..344987e40 100644 --- a/level_2/fll_fss/c/fss/extended_list.c +++ b/level_2/fll_fss/c/fss/extended_list.c @@ -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 {