if (F_status_is_error(state->status)) return;
#define ___fl_flag_do_escape___ 0x1
- #define ___fl_flag_has_graph_first___ 0x2
- #define ___fl_flag_has_graph_first_do_escape___ 0x3
- #define ___fl_flag_has_delimit_comment___ 0x4
- #define ___fl_flag_has_delimit_comment_graph_first___ 0x6
+ #define ___fl_flag_has_delimit_comment___ 0x2
+ #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
const f_number_unsigned_t delimits_used = delimits->used;
const f_number_unsigned_t comments_used = comments->used;
newline_last = range->start;
flag_fl |= ___fl_flag_has_graph_first___;
+ flag_fl &= ~___fl_flag_has_delimit_comment___;
++range->start;
continue;
if (range->start > range->stop || range->start >= buffer.used) break;
if (!(flag_fl & ___fl_flag_do_escape___)) continue;
+ flag_fl &= ~___fl_flag_do_escape___;
+
if (buffer.string[range->start] == f_fss_basic_list_open_s.string[0]) {
- flag_fl &= ~___fl_flag_has_delimit_comment_graph_first___;
+ flag_fl &= ~___fl_flag_has_graph_first_delimit_comment___;
++range->start;
f_fss_skip_past_space(buffer, range, state);
// The skip space returns F_complete_not_utf_start with error bit set on combining/joiner.
if (F_status_set_fine(state->status) == F_complete_not_utf_start) {
flag_fl &= ~___fl_flag_has_graph_first_do_escape___;
- slash_count = 0;
f_fss_skip_past_combining_joiner(buffer, range, state);
if (F_status_is_error(state->status)) break;
state->status = f_memory_array_increase_by((slash_count / 2) + 1, sizeof(f_number_unsigned_t), (void **) &delimits->array, &delimits->used, &delimits->size);
if (F_status_is_error(state->status)) break;
- while (slash_count > 0) {
+ while (slash_count) {
if (buffer.string[range->start] == f_fss_slash_s.string[0]) {
if (slash_count % 2 == 1) {
flag_fl |= ___fl_flag_has_graph_first___;
range->start = line_start + 1;
}
- else {
- flag_fl &= ~___fl_flag_do_escape___;
- slash_count = 0;
- }
}
else if ((flag_fl & ___fl_flag_has_graph_first___) && buffer.string[range->start] == f_fss_comment_s.string[0]) {
++range->start;
if (F_status_is_error_not(state->status) && 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);
if (F_status_is_error(state->status)) break;
if (buffer.string[range->start] == f_fss_basic_list_open_s.string[0]) {
++range->start;
- flag_fl &= ~___fl_flag_has_delimit_comment_graph_first___;
+ flag_fl &= ~___fl_flag_has_graph_first_delimit_comment___;
f_fss_skip_past_space(buffer, range, state);
// The skip space returns F_complete_not_utf_start with error bit set on combining/joiner.
if (F_status_set_fine(state->status) == F_complete_not_utf_start) {
flag_fl &= ~___fl_flag_has_graph_first_do_escape___;
- slash_count = 0;
f_fss_skip_past_combining_joiner(buffer, range, state);
if (F_status_is_error(state->status)) break;
if (F_status_is_error_not(state->status) && 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);
if (F_status_is_error(state->status)) break;
if (f_fss_is_space(buffer, *range, state) == F_false) {
if (F_status_is_error(state->status)) break;
- flag_fl &= ~___fl_flag_has_delimit_comment_graph_first___;
+ flag_fl &= ~___fl_flag_has_graph_first_delimit_comment___;
}
}
}
#undef ___fl_flag_do_escape___
- #undef ___fl_flag_has_graph_first___
#undef ___fl_flag_has_delimit_comment___
- #undef ___fl_flag_has_delimit_comment_graph_first___
+ #undef ___fl_flag_has_graph_first___
+ #undef ___fl_flag_has_graph_first_delimit_comment___
}
#endif // _di_fl_fss_basic_list_content_read_
fl_fss_basic_list_content_read(set_strings, &range, &found_content, &delimits, &comments, &state);
- if (!(state.status == F_fss_found_content || state.status == F_data_not)) {
- printf("[ -------> ] --- [11] Failure with fl_fss_basic_list_content_read(), with set %lu, status=%u, expected %u, or %u.\n", set, state.status, F_fss_found_content, F_data_not);
+ if (!(state.status == F_fss_found_content || state.status == F_okay_eos || state.status == F_okay_stop || state.status == F_data_not)) {
+ printf("[ -------> ] --- [11] Failure with fl_fss_basic_list_content_read(), with set %lu, status=%u, expected %u, %u, %u, or %u.\n", set, state.status, F_fss_found_content, F_okay_eos, F_okay_stop, F_data_not);
}
- assert_true(state.status == F_fss_found_content || state.status == F_data_not);
+ assert_true(state.status == F_fss_found_content || state.status == F_okay_eos || state.status == F_okay_stop || state.status == F_data_not);
- if (state.status == F_fss_found_content) {
+ if (state.status == F_fss_found_content || state.status == F_okay_eos || state.status == F_okay_stop) {
if (!found_content.used) {
printf("[ -------> ] --- [12] Failure with fl_fss_basic_list_content_read(), with set %lu, expected found_content.used (%lu) <> 0.\n", set, found_content.used);
}
fl_fss_embedded_list_content_read(set_strings, &range, &found_content, &delimits, &comments, &state);
- if (!(state.status == F_fss_found_content || state.status == F_data_not)) {
- printf("[ -------> ] --- [11] Failure with fl_fss_embedded_list_content_read(), with set %lu, status=%u, expected %u, or %u.\n", set, state.status, F_fss_found_content, F_data_not);
+ if (!(state.status == F_fss_found_content || state.status == F_okay_eos || state.status == F_okay_stop || state.status == F_data_not)) {
+ printf("[ -------> ] --- [11] Failure with fl_fss_embedded_list_content_read(), with set %lu, status=%u, expected %u, %u, %u, or %u.\n", set, state.status, F_fss_found_content, F_okay_eos, F_okay_stop, F_data_not);
}
- assert_true(state.status == F_fss_found_content || state.status == F_data_not);
+ assert_true(state.status == F_fss_found_content || state.status == F_okay_eos || state.status == F_okay_stop || state.status == F_data_not);
- if (state.status == F_fss_found_content) {
+ if (state.status == F_fss_found_content || state.status == F_okay_eos || state.status == F_okay_stop) {
if (!(found_content.used && found_content.depth[0].used && found_content.depth[0].array[0].content.used)) {
printf(
"[ -------> ] --- [12] Failure with fl_fss_embedded_list_content_read(), with set %lu, expected found_content.used (%lu) <> 0 or found_content.depth.used (%lu) <> 0 or found_content.depth[0].array[0].content.used (%lu) <> 0 <> 0.\n",