One of the original goals of the FLL project is to achieve fail-through functionality.
Knowing that this is a lot of work, I have ignored a lot of situations where I can implement fail-through and simply performed fail-out or fail-over.
With the upcoming stable release, I believe that this must handle bad data files.
This adds the option to conditionally change the behavior between fail-through and fail-out for the fss read functions and related for invalid UTF-8 code sequences.
The default behavior is now changed from fail-out to fail-through.
This took longer than I hoped.
I will need to do additional reviewing of this code before the stable release is ready.
I also realized that I need to support raw printing of data in the fss read functions as well (and that means changing the existing -r/--raw parameter).
This also fixes the following naming problems:
- fl_fss_apply_delimit() should be f_fss_apply_delimit().
- fl_fss_apply_delimit_between() should be fl_fss_apply_delimit_between().
extern "C" {
#endif
-#ifndef _di_fl_fss_apply_delimit_
- f_status_t fl_fss_apply_delimit(const f_fss_delimits_t delimits, f_string_static_t * const buffer) {
+#ifndef _di_f_fss_apply_delimit_
+ f_status_t f_fss_apply_delimit(f_state_t state, const f_fss_delimits_t delimits, f_string_static_t * const buffer) {
#ifndef _di_level_0_parameter_checking_
if (!buffer) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
return F_none;
}
-#endif // _di_fl_fss_apply_delimit_
+#endif // _di_f_fss_apply_delimit_
-#ifndef _di_fl_fss_apply_delimit_between_
- f_status_t fl_fss_apply_delimit_between(const f_fss_delimits_t delimits, const f_string_range_t range, f_string_static_t * const buffer) {
+#ifndef _di_f_fss_apply_delimit_between_
+ f_status_t f_fss_apply_delimit_between(f_state_t state, const f_fss_delimits_t delimits, const f_string_range_t range, f_string_static_t * const buffer) {
#ifndef _di_level_0_parameter_checking_
if (!buffer) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
return F_none;
}
-#endif // _di_fl_fss_apply_delimit_between_
+#endif // _di_f_fss_apply_delimit_between_
#ifndef _di_f_fss_count_lines_
- f_status_t f_fss_count_lines(const f_string_static_t buffer, const f_array_length_t before, f_array_length_t * const line) {
+ f_status_t f_fss_count_lines(f_state_t state, const f_string_static_t buffer, const f_array_length_t before, f_array_length_t * const line) {
#ifndef _di_level_0_parameter_checking_
if (!line) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_fss_count_lines_
#ifndef _di_f_fss_count_lines_range_
- f_status_t f_fss_count_lines_range(const f_string_static_t buffer, const f_string_range_t range, const f_array_length_t before, f_array_length_t * const line) {
+ f_status_t f_fss_count_lines_range(f_state_t state, const f_string_static_t buffer, const f_string_range_t range, const f_array_length_t before, f_array_length_t * const line) {
#ifndef _di_level_0_parameter_checking_
if (!line) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
}
#endif // _di_f_fss_count_lines_range_
+#ifndef _di_f_fss_do_fail_utf_
+ f_status_t f_fss_fail_utf(f_state_t state, const f_status_t status) {
+
+ if (F_status_is_error(status)) {
+ if (F_status_set_fine(status) == F_utf_fragment || F_status_set_fine(status) == F_complete_not_utf || F_status_set_fine(status) == F_utf) {
+ if (!(state.flag & f_fss_state_flag_utf_fail_on_valid_not_e)) {
+ return F_status_set_fine(status);
+ }
+ }
+ }
+
+ return status;
+ }
+#endif // _di_f_fss_fail_utf_
+
+#ifndef _di_f_fss_do_fail_to_false_utf_
+ f_status_t f_fss_fail_utf_to_false(f_state_t state, const f_status_t status) {
+
+ if (F_status_is_error(status)) {
+ if (F_status_set_fine(status) == F_utf_fragment || F_status_set_fine(status) == F_complete_not_utf || F_status_set_fine(status) == F_utf) {
+ if (!(state.flag & f_fss_state_flag_utf_fail_on_valid_not_e)) {
+ return F_false;
+ }
+ }
+ }
+
+ return status;
+ }
+#endif // _di_f_fss_fail_utf_to_false_
+
#ifndef _di_f_fss_is_graph_
- f_status_t f_fss_is_graph(const f_string_static_t buffer, const f_string_range_t range) {
+ f_status_t f_fss_is_graph(f_state_t state, const f_string_static_t buffer, const f_string_range_t range) {
if (range.stop < range.start || range.start >= buffer.used || !buffer.used) {
return F_false;
width_max = buffer.used - range.start;
}
- return f_utf_is_graph(buffer.string + range.start, width_max);
+ return f_fss_fail_utf_to_false(state, f_utf_is_graph(buffer.string + range.start, width_max));
}
#endif // _di_f_fss_is_graph_
#ifndef _di_f_fss_is_space_
- f_status_t f_fss_is_space(const f_string_static_t buffer, const f_string_range_t range) {
+ f_status_t f_fss_is_space(f_state_t state, const f_string_static_t buffer, const f_string_range_t range) {
if (range.stop < range.start || range.start >= buffer.used || !buffer.used) {
return F_false;
width_max = buffer.used - range.start;
}
- f_status_t status = f_utf_is_zero_width(buffer.string + range.start, width_max);
+ f_status_t status = f_fss_fail_utf_to_false(state, f_utf_is_zero_width(buffer.string + range.start, width_max));
if (status != F_false) {
if (status == F_true) {
return status;
}
- status = f_utf_is_whitespace(buffer.string + range.start, width_max);
+ status = f_fss_fail_utf_to_false(state, f_utf_is_whitespace(buffer.string + range.start, width_max));
if (status == F_false) {
- return f_utf_is_control(buffer.string + range.start, width_max);
+ status = f_fss_fail_utf_to_false(state, f_utf_is_control(buffer.string + range.start, width_max));
}
return status;
#endif // _di_f_fss_is_space_
#ifndef _di_f_fss_is_zero_width_
- f_status_t f_fss_is_zero_width(const f_string_static_t buffer, const f_string_range_t range) {
+ f_status_t f_fss_is_zero_width(f_state_t state, const f_string_static_t buffer, const f_string_range_t range) {
if (range.stop < range.start || range.start >= buffer.used || !buffer.used) {
return F_false;
width_max = buffer.used - range.start;
}
- return f_utf_is_zero_width(buffer.string + range.start, width_max);
+ return f_fss_fail_utf_to_false(state, f_utf_is_zero_width(buffer.string + range.start, width_max));
}
#endif // _di_f_fss_is_zero_width_
#ifndef _di_f_fss_seek_to_eol_
- f_status_t f_fss_seek_to_eol(const f_string_dynamic_t buffer, f_string_range_t * const range) {
+ f_status_t f_fss_seek_to_eol(f_state_t state, const f_string_dynamic_t buffer, f_string_range_t * const range) {
#ifndef _di_level_0_parameter_checking_
if (!range) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_fss_seek_to_eol_
#ifndef _di_f_fss_shift_delimit_
- f_status_t f_fss_shift_delimit(const f_string_range_t range, f_string_dynamic_t * const buffer) {
+ f_status_t f_fss_shift_delimit(f_state_t state, const f_string_range_t range, f_string_dynamic_t * const buffer) {
#ifndef _di_level_0_parameter_checking_
if (!buffer) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
++distance;
}
- // do not waste time trying to process what is only going to be replaced with a delimit placeholder.
+ // Do not waste time trying to process what is only going to be replaced with a delimit placeholder.
if (position + distance >= buffer->used || position + distance > range.stop) {
break;
}
if (utf_width > 1) {
- // not enough space in buffer or in range range to process UTF-8 character.
+ // Not enough space in buffer or in range range to process UTF-8 character.
if (position + utf_width >= buffer->used || position + utf_width > range.stop) {
- return F_status_set_error(F_utf);
+ return f_fss_fail_utf(state, F_status_set_error(F_utf));
}
if (distance > 0) {
}
else {
- // shift everything down one for each delimit placeholder found.
+ // Shift everything down one for each delimit placeholder found.
if (distance > 0) {
buffer->string[position] = buffer->string[position + distance];
}
#endif // _di_f_fss_shift_delimit_
#ifndef _di_f_fss_skip_past_delimit_
- f_status_t f_fss_skip_past_delimit(const f_string_static_t buffer, f_string_range_t * const range) {
+ f_status_t f_fss_skip_past_delimit(f_state_t state, const f_string_static_t buffer, f_string_range_t * const range) {
#ifndef _di_level_0_parameter_checking_
if (!range) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
#endif // _di_f_fss_skip_past_delimit_
#ifndef _di_f_fss_skip_past_space_
- f_status_t f_fss_skip_past_space(const f_string_static_t buffer, f_string_range_t * const range) {
+ f_status_t f_fss_skip_past_space(f_state_t state, const f_string_static_t buffer, f_string_range_t * const range) {
#ifndef _di_level_0_parameter_checking_
if (!range) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
continue;
}
- status = f_utf_is_whitespace(buffer.string + range->start, width_max);
+ status = f_fss_fail_utf_to_false(state, f_utf_is_whitespace(buffer.string + range->start, width_max));
if (F_status_is_error(status)) return status;
if (status == F_false) {
- status = f_utf_is_zero_width(buffer.string + range->start, width_max);
+ status = f_fss_fail_utf_to_false(state, f_utf_is_zero_width(buffer.string + range->start, width_max));
if (F_status_is_error(status)) return status;
if (status == F_false) {
else if (width == 1) {
// Do not operate on UTF-8 fragments that are not the first byte of the character.
- return F_status_set_error(F_complete_not_utf);
+ return f_fss_fail_utf(state, F_status_set_error(F_complete_not_utf));
}
else {
if (range->start + width >= buffer.used) {
- return F_status_set_error(F_complete_not_utf_eos);
+ return f_fss_fail_utf(state, F_status_set_error(F_complete_not_utf_eos));
}
if (range->start + width > range->stop) {
- return F_status_set_error(F_complete_not_utf_stop);
+ return f_fss_fail_utf(state, F_status_set_error(F_complete_not_utf_stop));
}
}
#endif // _di_f_fss_skip_past_space_
#ifndef _di_f_fss_skip_past_non_graph_
- f_status_t f_fss_skip_past_non_graph(const f_string_static_t buffer, f_string_range_t * const range) {
+ f_status_t f_fss_skip_past_non_graph(f_state_t state, const f_string_static_t buffer, f_string_range_t * const range) {
#ifndef _di_level_0_parameter_checking_
if (!range) return F_status_set_error(F_parameter);
#endif // _di_level_0_parameter_checking_
for (;;) {
if (buffer.string[range->start] != f_fss_delimit_placeholder_s.string[0]) {
- status = f_utf_is_graph(buffer.string + range->start, width_max);
+ status = f_fss_fail_utf_to_false(state, f_utf_is_graph(buffer.string + range->start, width_max));
if (status == F_true) {
- // stop at a graph.
+ // Stop at a graph.
break;
}
else if (status == F_false) {
- status = f_utf_is_zero_width(buffer.string + range->start, width_max);
+ status = f_fss_fail_utf_to_false(state, f_utf_is_zero_width(buffer.string + range->start, width_max));
if (status == F_true) {
next = range->start + 1;
for (; next < buffer.used && next <= range->stop; next += macro_f_utf_byte_width_is(buffer.string[next])) {
- status = f_utf_is_graph(buffer.string + next, width_max);
+ status = f_fss_fail_utf_to_false(state, f_utf_is_graph(buffer.string + next, width_max));
if (status == F_true) {
- // treat zero-width as a graph when preceding a graph.
+ // Treat zero-width as a graph when preceding a graph.
return F_none;
}
- else if (status == F_false) {
+
+ if (status == F_false) {
status = f_utf_is_zero_width(buffer.string + next, width_max);
- if (status == F_true) {
+ // Seek until a non-zero-width is reached.
+ if (status == F_true) continue;
- // seek until a non-zero-width is reached.
- continue;
- }
- else if (status == F_false) {
+ // Treat zero-width as a non-graph when preceding a non-graph (that is not a zero-width).
+ if (status == F_false) break;
- // treat zero-width as a non-graph when preceding a non-graph (that is not a zero-width).
- break;
- }
- else if (F_status_is_error(status)) {
- return status;
- }
+ if (F_status_is_error(status)) return status;
}
else if (F_status_is_error(status)) {
return status;
}
else if (status == F_false) {
- // continue on when non-graph and non-zero-width.
+ // Continue on when non-graph and non-zero-width.
break;
}
else if (F_status_is_error(status)) {
else if (width == 1) {
// Do not operate on UTF-8 fragments that are not the first byte of the character.
- return F_status_set_error(F_complete_not_utf);
+ return f_fss_fail_utf(state, F_status_set_error(F_complete_not_utf));
}
else {
if (range->start + width >= buffer.used) {
- return F_status_set_error(F_complete_not_utf_eos);
+ return f_fss_fail_utf(state, F_status_set_error(F_complete_not_utf_eos));
}
if (range->start + width > range->stop) {
- return F_status_set_error(F_complete_not_utf_stop);
+ return f_fss_fail_utf(state, F_status_set_error(F_complete_not_utf_stop));
}
}
*
* The purpose of compression is not to compression the entire file's contents but only and individual objects content, so the file is still partially readable.
* NOTE: all start/stop locations must be defined as a (start < stop) and not (start <= stop), therefore if (start == stop) then stop.
- *
- * @todo identify all special UTF-8 characters that would violate the FSS design concepts, such as "Ogham space mark ( )" is not valid as whitespace in FSS because it is a visible non-whitespace character.
*/
#ifndef _F_fss_h
#define _F_fss_h
*
* Any delimits out of range (beyond the buffer.used) are ignored.
*
+ * @param state
+ * A state for providing flags and handling interrupts during long running operations.
* @param delimits
* An array of locations containing the delimits to apply within the buffer.
* @param buffer
*
* F_parameter (with error bit) if a parameter is invalid.
*/
-#ifndef _di_fl_fss_apply_delimit_
- extern f_status_t fl_fss_apply_delimit(const f_fss_delimits_t delimits, f_string_static_t * const buffer);
-#endif // _di_fl_fss_apply_delimit_
+#ifndef _di_f_fss_apply_delimit_
+ extern f_status_t f_fss_apply_delimit(f_state_t state, const f_fss_delimits_t delimits, f_string_static_t * const buffer);
+#endif // _di_f_fss_apply_delimit_
/**
* Replace all 1-byte character locations specified by the delimits within the given buffer by a delimit placeholder if within the given range.
*
* If the delimits are found to be (inclusively) within the range specified by range, then those delimits are applied.
*
+ * @param state
+ * A state for providing flags and handling interrupts during long running operations.
* @param delimits
* An array of locations containing the delimits to apply within the buffer.
* @param range
*
* F_parameter (with error bit) if a parameter is invalid.
*/
-#ifndef _di_fl_fss_apply_delimit_between_
- extern f_status_t fl_fss_apply_delimit_between(const f_fss_delimits_t delimits, const f_string_range_t range, f_string_static_t * const buffer);
-#endif // _di_fl_fss_apply_delimit_between_
+#ifndef _di_f_fss_apply_delimit_between_
+ extern f_status_t f_fss_apply_delimit_between(f_state_t state, const f_fss_delimits_t delimits, const f_string_range_t range, f_string_static_t * const buffer);
+#endif // _di_f_fss_apply_delimit_between_
/**
* Count the number of new lines from the buffer before the given location.
*
* This does not initialize line, instead it only performs addition to line.
*
+ * @param state
+ * A state for providing flags and handling interrupts during long running operations.
* @param buffer
* The string to process.
* @param before
* F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_f_fss_count_lines_
- extern f_status_t f_fss_count_lines(const f_string_static_t buffer, const f_array_length_t before, f_array_length_t * const line);
+ extern f_status_t f_fss_count_lines(f_state_t state, const f_string_static_t buffer, const f_array_length_t before, f_array_length_t * const line);
#endif // _di_f_fss_count_lines_
/**
*
* This does not initialize line, instead it only performs addition to line.
*
+ * @param state
+ * A state for providing flags and handling interrupts during long running operations.
* @param buffer
* The string to process.
* @param range
* F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_f_fss_count_lines_range_
- extern f_status_t f_fss_count_lines_range(const f_string_static_t buffer, const f_string_range_t range, const f_array_length_t before, f_array_length_t * const line);
+ extern f_status_t f_fss_count_lines_range(f_state_t state, const f_string_static_t buffer, const f_string_range_t range, const f_array_length_t before, f_array_length_t * const line);
#endif // _di_f_fss_count_lines_range_
/**
+ * Using the state, check that the status should return an error or not on invalid UTF-8.
+ *
+ * When f_fss_state_flag_utf_fail_on_valid_not_e is set, UTF-8 failures are returned as is.
+ * When f_fss_state_flag_utf_fail_on_valid_not_e is unset, UTF-8 failures are returned with the error bit removed.
+ *
+ * @param state
+ * A state for providing flags and handling interrupts during long running operations.
+ * @param status
+ * The status code to check.
+ * This handles status codes (with error bit set):
+ * - F_complete_not_utf
+ * - F_utf
+ * - F_utf_fragment
+ *
+ * @return
+ * Status is either directly passed through or the error bit is removed depending on state.flag.
+ */
+#ifndef _di_f_fss_do_fail_utf_
+ extern f_status_t f_fss_fail_utf(f_state_t state, const f_status_t status);
+#endif // _di_f_fss_fail_utf_
+
+/**
+ * Using the state, check that the status should return an error or not on invalid UTF-8.
+ *
+ * When f_fss_state_flag_utf_fail_on_valid_not_e is set, UTF-8 failures are returned as is.
+ * When f_fss_state_flag_utf_fail_on_valid_not_e is unset, UTF-8 failures are replaced with F_false.
+ *
+ * @param state
+ * A state for providing flags and handling interrupts during long running operations.
+ * @param status
+ * The status code to check.
+ * This handles status codes (with error bit set):
+ * - F_complete_not_utf
+ * - F_utf
+ * - F_utf_fragment
+ *
+ * @return
+ * Status is either directly passed through or F_false is returned depending on state.flag.
+ */
+#ifndef _di_f_fss_do_fail_to_false_utf_
+ extern f_status_t f_fss_fail_utf_to_false(f_state_t state, const f_status_t status);
+#endif // _di_f_fss_fail_utf_to_false_
+
+/**
* Identify whether or not a character in the buffer is a graph (ASCII or UTF-8) character.
*
+ * @param state
+ * A state for providing flags and handling interrupts during long running operations.
* @param buffer
* The string to process.
* @param range
* @see f_utf_is_graph()
*/
#ifndef _di_f_fss_is_graph_
- extern f_status_t f_fss_is_graph(const f_string_static_t buffer, const f_string_range_t range);
+ extern f_status_t f_fss_is_graph(f_state_t state, const f_string_static_t buffer, const f_string_range_t range);
#endif // _di_f_fss_is_graph_
/**
* Identify whether or not a character in the buffer is a non-zero-width whitespace or control (ASCII or UTF-8) character.
*
+ * @param state
+ * A state for providing flags and handling interrupts during long running operations.
* @param buffer
* The string to process.
* @param range
* @see f_utf_is_whitespace()
*/
#ifndef _di_f_fss_is_space_
- extern f_status_t f_fss_is_space(const f_string_static_t buffer, const f_string_range_t range);
+ extern f_status_t f_fss_is_space(f_state_t state, const f_string_static_t buffer, const f_string_range_t range);
#endif // _di_f_fss_is_space_
/**
* Identify whether or not a character in the buffer is a non-zero-width whitespace or control (ASCII or UTF-8) character.
*
+ * @param state
+ * A state for providing flags and handling interrupts during long running operations.
* @param buffer
* The string to process.
* @param range
* @see f_utf_is_zero_width()
*/
#ifndef _di_f_fss_is_zero_width_
- extern f_status_t f_fss_is_zero_width(const f_string_static_t buffer, const f_string_range_t range);
+ extern f_status_t f_fss_is_zero_width(f_state_t state, const f_string_static_t buffer, const f_string_range_t range);
#endif // _di_f_fss_is_zero_width_
/**
* Seek until an EOL character is reached.
*
+ * @param state
+ * A state for providing flags and handling interrupts during long running operations.
* @param buffer
* The string to process.
* @param range
* F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_f_fss_seek_to_eol_
- extern f_status_t f_fss_seek_to_eol(const f_string_dynamic_t buffer, f_string_range_t * const range);
+ extern f_status_t f_fss_seek_to_eol(f_state_t state, const f_string_dynamic_t buffer, f_string_range_t * const range);
#endif // _di_f_fss_seek_to_eol_
/**
* This allows one to do a printf on the dynamic string without the delimiters arbitrarily stopping the output.
* No reallocations are performed, this will only shift characters.
*
+ * @param state
+ * A state for providing flags and handling interrupts during long running operations.
* @param range
* A restriction on where within the buffer the shifting happens.
* @param buffer
* F_utf (with error bit) if UTF-8 cannot be fully processed (buffer or range range not long enough).
*/
#ifndef _di_f_fss_shift_delimit_
- extern f_status_t f_fss_shift_delimit(const f_string_range_t range, f_string_dynamic_t * const buffer);
+ extern f_status_t f_fss_shift_delimit(f_state_t state, const f_string_range_t range, f_string_dynamic_t * const buffer);
#endif // _di_f_fss_shift_delimit_
/**
* Skip past all delimit placeholders until a non-delimit placeholder is reached.
*
+ * @param state
+ * A state for providing flags and handling interrupts during long running operations.
* @param buffer
* The string to process.
* @param range
* F_parameter (with error bit) if a parameter is invalid.
*/
#ifndef _di_f_fss_skip_past_delimit_
- extern f_status_t f_fss_skip_past_delimit(const f_string_static_t buffer, f_string_range_t * const range);
+ extern f_status_t f_fss_skip_past_delimit(f_state_t state, const f_string_static_t buffer, f_string_range_t * const range);
#endif // _di_f_fss_skip_past_delimit_
/**
* Skip past all whitespace and control characters, except newline.
*
* Zero-width characters are not skipped because they might be part of a graph character, such as combining characters.
- * @todo needs consideration on how to handle zero-width before space/control vs zero-width before graph.
*
+ * @param state
+ * A state for providing flags and handling interrupts during long running operations.
* @param buffer
* The string to process.
* @param range
* @see f_utf_is_zero_width()
*/
#ifndef _di_f_fss_skip_past_space_
- extern f_status_t f_fss_skip_past_space(const f_string_static_t buffer, f_string_range_t * const range);
+ extern f_status_t f_fss_skip_past_space(f_state_t state, const f_string_static_t buffer, f_string_range_t * const range);
#endif // _di_f_fss_skip_past_space_
/**
* Skip past all non-graph and non-zero-width characters (whitespace and control characters).
*
* Zero-width characters are not skipped because they might be part of a graph character, such as combining characters.
- * @todo needs consideration on how to handle zero-width before space/control vs zero-width before graph.
*
+ * @param state
+ * A state for providing flags and handling interrupts during long running operations.
* @param buffer
* The string to process.
* @param range
* @see f_utf_is_zero_width()
*/
#ifndef _di_f_fss_skip_past_non_graph_
- extern f_status_t f_fss_skip_past_non_graph(const f_string_static_t buffer, f_string_range_t * const range);
+ extern f_status_t f_fss_skip_past_non_graph(f_state_t state, const f_string_static_t buffer, f_string_range_t * const range);
#endif // _di_f_fss_skip_past_non_graph_
#ifdef __cplusplus
#define macro_f_fss_contents_t_decimate_by(status, contents, amount) macro_f_string_rangess_t_decimate_by(status, contents, amount)
#endif // _di_f_fss_contents_t_
+/**
+ * State flags associated with FSS functions.
+ *
+ * These flags are meant to be bitwise for the 32-bit f_state_t flag property.
+ *
+ * The f_fss_state_flag_none_e is expected to be 0, therefore it must be safe to use 0 directly.
+ *
+ * f_fss_state_flag_*:
+ * - none: No flags are set.
+ * - utf_fail_on_valid_not: Immediately fail on invalid UTF-8 character (including incomplete).
+ */
+#ifndef _di_f_fss_state_flags_
+ enum {
+ f_fss_state_flag_none_e = 0,
+ f_fss_state_flag_utf_fail_on_valid_not_e = 0x1,
+ }; // enum
+#endif // _di_f_fss_state_flags_
+
#ifdef __cplusplus
} // extern "C"
#endif
if (!delimits) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- f_status_t status = f_fss_skip_past_space(buffer, range);
+ f_status_t status = f_fss_skip_past_space(state, buffer, range);
if (F_status_is_error(status)) return status;
if (status == F_none_eol) {
}
}
- status = f_fss_skip_past_delimit(buffer, range);
+ status = f_fss_skip_past_delimit(state, buffer, range);
if (F_status_is_error(status)) break;
if (status == F_none_eos || status == F_none_stop) {
f_status_t status = F_none;
- status = f_fss_skip_past_delimit(content, range);
+ status = f_fss_skip_past_delimit(state, content, range);
if (F_status_is_error(status)) return status;
if (range->start > range->stop || range->start >= content.used) {
* @param buffer
* The buffer to read from.
* @param state
- * A state for handling interrupts during long running operations.
- * There is no print_error() usage at this time (@todo this should be implemented and supported).
+ * A state for providing flags and handling interrupts during long running operations.
+ * There is no print_error().
* There is no functions structure.
- * There is no data structure passed to these functions (@todo the additional parameters could be moved to a custom structure).
+ * There is no data structure passed to these functions.
*
* When interrupt() returns, only F_interrupt and F_interrupt_not are processed.
* Error bit designates an error but must be passed along with F_interrupt.
* @param buffer
* The buffer to read from.
* @param state
- * A state for handling interrupts during long running operations.
- * There is no print_error() usage at this time (@todo this should be implemented and supported).
+ * A state for providing flags and handling interrupts during long running operations.
+ * There is no print_error().
* There is no functions structure.
- * There is no data structure passed to these functions (@todo the additional parameters could be moved to a custom structure).
+ * There is no data structure passed to these functions.
*
* When interrupt() returns, only F_interrupt and F_interrupt_not are processed.
* Error bit designates an error but must be passed along with F_interrupt.
* If f_fss_complete_partial_e, this will write any appropriate open and close aspects of this object.
* If f_fss_complete_partial_tim, this will write any appropriate open and close aspects of this object, but will omit whitespace before and after the object (inside the quotes).
* @param state
- * A state for handling interrupts during long running operations.
- * There is no print_error() usage at this time (@todo this should be implemented and supported).
+ * A state for providing flags and handling interrupts during long running operations.
+ * There is no print_error().
* There is no functions structure.
- * There is no data structure passed to these functions (@todo the additional parameters could be moved to a custom structure).
+ * There is no data structure passed to these functions.
*
* When interrupt() returns, only F_interrupt and F_interrupt_not are processed.
* Error bit designates an error but must be passed along with F_interrupt.
* If f_fss_complete_partial_e, this will write any appropriate open and close aspects of this content, except for the final newline.
* If f_fss_complete_full_e, this will write any appropriate open and close aspects of this content, including the final newline.
* @param state
- * A state for handling interrupts during long running operations.
- * There is no print_error() usage at this time (@todo this should be implemented and supported).
+ * A state for providing flags and handling interrupts during long running operations.
+ * There is no print_error().
* There is no functions structure.
- * There is no data structure passed to these functions (@todo the additional parameters could be moved to a custom structure).
+ * There is no data structure passed to these functions.
*
* When interrupt() returns, only F_interrupt and F_interrupt_not are processed.
* Error bit designates an error but must be passed along with F_interrupt.
const f_array_length_t delimits_used = delimits->used;
- f_status_t status = f_fss_skip_past_space(buffer, range);
+ f_status_t status = f_fss_skip_past_space(state, buffer, range);
if (F_status_is_error(status)) return status;
if (status == F_none_eol) {
// Ignore all comment lines.
if (buffer.string[range->start] == f_fss_comment_s.string[0]) {
- status = f_fss_seek_to_eol(buffer, range);
+ status = f_fss_seek_to_eol(state, buffer, range);
if (F_status_is_error(status)) return status;
if (status == F_none_eos) {
if (buffer.string[range->start] == f_fss_eol_s.string[0]) break;
- status = f_fss_is_space(buffer, *range);
+ status = f_fss_is_space(state, buffer, *range);
if (F_status_is_error(status)) break;
if (status == F_false) break;
if (buffer.string[range->start] == f_fss_eol_s.string[0]) break;
- status = f_fss_is_space(buffer, *range);
+ status = f_fss_is_space(state, buffer, *range);
if (F_status_is_error(status)) break;
if (status == F_false) break;
continue;
}
else if (graph_first) {
- status = f_fss_is_space(buffer, *range);
+ status = f_fss_is_space(state, buffer, *range);
if (F_status_is_error(status)) break;
if (status == F_false) {
}
// seek to the end of the line when no valid object is found.
- status = f_fss_seek_to_eol(buffer, range);
+ status = f_fss_seek_to_eol(state, buffer, range);
// move the start position to after the EOL.
++range->start;
const f_array_length_t delimits_used = delimits->used;
const f_array_length_t comments_used = comments->used;
- f_status_t status = f_fss_skip_past_delimit(buffer, range);
+ f_status_t status = f_fss_skip_past_delimit(state, buffer, range);
if (F_status_is_error(status)) return status;
private_macro_fl_fss_content_with_comments_return_on_overflow((buffer), (*range), (*found), (*delimits), delimits_used, (*comments), comments_used, F_none_eos, F_none_stop);
if (buffer.string[range->start] == f_fss_eol_s.string[0]) break;
- status = f_fss_is_space(buffer, *range);
+ status = f_fss_is_space(state, buffer, *range);
if (F_status_is_error(status)) break;
if (status == F_false) break;
if (buffer.string[range->start] == f_fss_eol_s.string[0]) break;
- status = f_fss_is_space(buffer, *range);
+ status = f_fss_is_space(state, buffer, *range);
if (F_status_is_error(status)) break;
if (status == F_false) break;
if (graph_first == 0x1 && buffer.string[range->start] == f_fss_comment_s.string[0]) {
start = newline_last + 1;
- status = f_fss_seek_to_eol(buffer, range);
+ status = f_fss_seek_to_eol(state, buffer, range);
if (F_status_is_error(status)) break;
macro_f_fss_comments_t_increase(status, state.step_small, (*comments))
}
if (graph_first == 0x1) {
- status = f_fss_is_space(buffer, *range);
+ status = f_fss_is_space(state, buffer, *range);
if (F_status_is_error(status)) break;
if (status == F_false) {
if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- f_status_t status = f_fss_skip_past_delimit(object, range);
+ f_status_t status = f_fss_skip_past_delimit(state, object, range);
if (F_status_is_error(status)) return status;
if (status == F_none_stop || status == F_none_eos) {
break;
}
- status = f_fss_is_graph(object, *range);
+ status = f_fss_is_graph(state, object, *range);
if (F_status_is_error(status)) break;
if (status == F_true) break;
break;
}
- status = f_fss_is_space(object, *range);
+ status = f_fss_is_space(state, object, *range);
if (F_status_is_error(status)) break;
if (status == F_true) {
if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- f_status_t status = f_fss_skip_past_delimit(content, range);
+ f_status_t status = f_fss_skip_past_delimit(state, content, range);
if (F_status_is_error(status)) return status;
if (status == F_none_stop || status == F_none_eos) {
if (content.string[range->start] == f_fss_basic_list_open_s.string[0]) {
start = range->start++;
- status = f_fss_skip_past_space(content, range);
+ status = f_fss_skip_past_space(state, content, range);
if (F_status_is_error(status)) break;
if (content.string[range->start] == f_fss_eol_s.string[0] || range->start >= content.used || range->start > range->stop) {
has_graph = F_true;
- status = f_fss_skip_past_space(content, range);
+ status = f_fss_skip_past_space(state, content, range);
if (F_status_is_error(status)) break;
if (content.string[range->start] == f_fss_eol_s.string[0] || range->start >= content.used || range->start > range->stop) {
is_comment = F_false;
}
else {
- status = f_fss_is_graph(content, *range);
+ status = f_fss_is_graph(state, content, *range);
if (status == F_true) {
has_graph = F_true;
* @param buffer
* The buffer to read from.
* @param state
- * A state for handling interrupts during long running operations.
- * There is no print_error() usage at this time (@todo this should be implemented and supported).
+ * A state for providing flags and handling interrupts during long running operations.
+ * There is no print_error().
* There is no functions structure.
- * There is no data structure passed to these functions (@todo the additional parameters could be moved to a custom structure).
+ * There is no data structure passed to these functions.
*
* When interrupt() returns, only F_interrupt and F_interrupt_not are processed.
* Error bit designates an error but must be passed along with F_interrupt.
* @param buffer
* The buffer to read from.
* @param state
- * A state for handling interrupts during long running operations.
- * There is no print_error() usage at this time (@todo this should be implemented and supported).
+ * A state for providing flags and handling interrupts during long running operations.
+ * There is no print_error().
* There is no functions structure.
- * There is no data structure passed to these functions (@todo the additional parameters could be moved to a custom structure).
+ * There is no data structure passed to these functions.
*
* When interrupt() returns, only F_interrupt and F_interrupt_not are processed.
* Error bit designates an error but must be passed along with F_interrupt.
* If f_fss_complete_partial_e, this will write any appropriate open and close aspects of this object.
* If f_fss_complete_partial_tim, this will write any appropriate open and close aspects of this object, but will omit whitespace before and after the object.
* @param state
- * A state for handling interrupts during long running operations.
- * There is no print_error() usage at this time (@todo this should be implemented and supported).
+ * A state for providing flags and handling interrupts during long running operations.
+ * There is no print_error().
* There is no functions structure.
- * There is no data structure passed to these functions (@todo the additional parameters could be moved to a custom structure).
+ * There is no data structure passed to these functions.
*
* When interrupt() returns, only F_interrupt and F_interrupt_not are processed.
* Error bit designates an error but must be passed along with F_interrupt.
* This should only be whitespace, anything else could produce invalid content.
* Set the pointer address to 0 to disable.
* @param state
- * A state for handling interrupts during long running operations.
- * There is no print_error() usage at this time (@todo this should be implemented and supported).
+ * A state for providing flags and handling interrupts during long running operations.
+ * There is no print_error().
* There is no functions structure.
- * There is no data structure passed to these functions (@todo the additional parameters could be moved to a custom structure).
+ * There is no data structure passed to these functions.
*
* When interrupt() returns, only F_interrupt and F_interrupt_not are processed.
* Error bit designates an error but must be passed along with F_interrupt.
const f_array_length_t delimits_used = delimits->used;
- f_status_t status = f_fss_skip_past_space(buffer, range);
+ f_status_t status = f_fss_skip_past_space(state, buffer, range);
if (F_status_is_error(status)) return status;
if (status == F_none_eol) {
// Ignore all comment lines.
if (buffer.string[range->start] == f_fss_comment_s.string[0]) {
- status = f_fss_seek_to_eol(buffer, range);
+ status = f_fss_seek_to_eol(state, buffer, range);
if (F_status_is_error(status)) {
delimits->used = delimits_used;
if (buffer.string[range->start] == f_fss_eol_s.string[0]) break;
- status = f_fss_is_graph(buffer, *range);
+ status = f_fss_is_graph(state, buffer, *range);
if (F_status_is_error(status)) break;
if (status == F_true) break;
if (buffer.string[range->start] == f_fss_eol_s.string[0]) break;
- status = f_fss_is_space(buffer, *range);
+ status = f_fss_is_space(state, buffer, *range);
if (F_status_is_error(status)) break;
if (status == F_false) break;
continue;
}
else if (graph_first) {
- status = f_fss_is_space(buffer, *range);
+ status = f_fss_is_space(state, buffer, *range);
if (F_status_is_error(status)) break;
if (status == F_false) {
if (!comments) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- f_status_t status = f_fss_skip_past_delimit(buffer, range);
+ f_status_t status = f_fss_skip_past_delimit(state, buffer, range);
if (F_status_is_error(status)) return status;
if (status == F_none_eos || status == F_none_stop) {
}
if (buffer.string[range->start] != f_fss_delimit_placeholder_s.string[0]) {
- status = f_fss_is_space(buffer, *range);
+ status = f_fss_is_space(state, buffer, *range);
if (F_status_is_error(status)) break;
if (status == F_false) break;
if (buffer.string[range->start] == f_fss_eol_s.string[0]) break;
if (buffer.string[range->start] != f_fss_delimit_placeholder_s.string[0]) {
- status = f_fss_is_space(buffer, *range);
+ status = f_fss_is_space(state, buffer, *range);
if (F_status_is_error(status)) break;
if (status == F_false) break;
else {
// No valid object close found, seek until EOL.
- status = f_fss_seek_to_eol(buffer, range);
+ status = f_fss_seek_to_eol(state, buffer, range);
if (F_status_is_error(status)) break;
if (graph_first == 0x2) {
if (buffer.string[range->start] == f_fss_eol_s.string[0]) break;
if (buffer.string[range->start] != f_fss_delimit_placeholder_s.string[0]) {
- status = f_fss_is_space(buffer, *range);
+ status = f_fss_is_space(state, buffer, *range);
if (F_status_is_error(status)) break;
if (status == F_false) break;
else if (graph_first == 0x1 && buffer.string[range->start] == f_fss_comment_s.string[0]) {
position = newline_last + 1;
- status = f_fss_seek_to_eol(buffer, range);
+ status = f_fss_seek_to_eol(state, buffer, range);
if (F_status_is_error(status)) break;
macro_f_fss_comments_t_increase(status, state.step_small, (*comments))
position_previous = range->start;
if (graph_first == 0x1) {
- status = f_fss_is_space(buffer, *range);
+ status = f_fss_is_space(state, buffer, *range);
if (F_status_is_error(status)) break;
if (status == F_false) {
if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- f_status_t status = f_fss_skip_past_delimit(object, range);
+ f_status_t status = f_fss_skip_past_delimit(state, object, range);
if (F_status_is_error(status)) return status;
if (status == F_none_eos) {
break;
}
- status = f_fss_is_graph(object, *range);
+ status = f_fss_is_graph(state, object, *range);
if (F_status_is_error(status)) break;
if (status == F_true) break;
break;
}
- status = f_fss_is_space(object, *range);
+ status = f_fss_is_space(state, object, *range);
if (F_status_is_error(status)) break;
if (status == F_true) {
break;
}
- status = f_fss_is_space(object, *range);
+ status = f_fss_is_space(state, object, *range);
if (F_status_is_error(status)) break;
ends_on_space = status == F_true;
if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- f_status_t status = f_fss_skip_past_delimit(content, range);
+ f_status_t status = f_fss_skip_past_delimit(state, content, range);
if (F_status_is_error(status)) return status;
if (status == F_none_eos) {
if (content.string[range->start] == f_fss_embedded_list_open_s.string[0] || content.string[range->start] == f_fss_embedded_list_close_s.string[0]) {
start = range->start++;
- status = f_fss_skip_past_space(content, range);
+ status = f_fss_skip_past_space(state, content, range);
if (F_status_is_error(status)) break;
if (range->start >= content.used || range->start > range->stop || content.string[range->start] == f_fss_eol_s.string[0]) {
has_graph = F_true;
- status = f_fss_skip_past_space(content, range);
+ status = f_fss_skip_past_space(state, content, range);
if (F_status_is_error(status)) break;
if (range->start >= content.used || range->start > range->stop || content.string[range->start] == f_fss_eol_s.string[0]) {
has_graph = F_false;
is_comment = F_false;
}
- else if ((status = f_fss_is_graph(content, *range)) == F_true) {
+ else if ((status = f_fss_is_graph(state, content, *range)) == F_true) {
has_graph = F_true;
}
else if (F_status_is_error(status)) {
* @param buffer
* The buffer to read from.
* @param state
- * A state for handling interrupts during long running operations.
- * There is no print_error() usage at this time (@todo this should be implemented and supported).
+ * A state for providing flags and handling interrupts during long running operations.
+ * There is no print_error().
* There is no functions structure.
- * There is no data structure passed to these functions (@todo the additional parameters could be moved to a custom structure).
+ * There is no data structure passed to these functions.
*
* When interrupt() returns, only F_interrupt and F_interrupt_not are processed.
* Error bit designates an error but must be passed along with F_interrupt.
* @param buffer
* The buffer to read from.
* @param state
- * A state for handling interrupts during long running operations.
- * There is no print_error() usage at this time (@todo this should be implemented and supported).
+ * A state for providing flags and handling interrupts during long running operations.
+ * There is no print_error().
* There is no functions structure.
- * There is no data structure passed to these functions (@todo the additional parameters could be moved to a custom structure).
+ * There is no data structure passed to these functions.
*
* When interrupt() returns, only F_interrupt and F_interrupt_not are processed.
* Error bit designates an error but must be passed along with F_interrupt.
* If f_fss_complete_partial_e, this will write any appropriate open and close aspects of this object.
* If f_fss_complete_partial_tim, this will write any appropriate open and close aspects of this object, but will omit whitespace before and after the object.
* @param state
- * A state for handling interrupts during long running operations.
- * There is no print_error() usage at this time (@todo this should be implemented and supported).
+ * A state for providing flags and handling interrupts during long running operations.
+ * There is no print_error().
* There is no functions structure.
- * There is no data structure passed to these functions (@todo the additional parameters could be moved to a custom structure).
+ * There is no data structure passed to these functions.
*
* When interrupt() returns, only F_interrupt and F_interrupt_not are processed.
* Error bit designates an error but must be passed along with F_interrupt.
* Any valid nested object open or valid nested object close inside an ingore range will not be escaped.
* Set the pointer address to 0 to disable.
* @param state
- * A state for handling interrupts during long running operations.
- * There is no print_error() usage at this time (@todo this should be implemented and supported).
+ * A state for providing flags and handling interrupts during long running operations.
+ * There is no print_error().
* There is no functions structure.
- * There is no data structure passed to these functions (@todo the additional parameters could be moved to a custom structure).
+ * There is no data structure passed to these functions.
*
* When interrupt() returns, only F_interrupt and F_interrupt_not are processed.
* Error bit designates an error but must be passed along with F_interrupt.
f_status_t status = F_none;
f_status_t status_allocate = F_none;
- status = f_fss_skip_past_space(buffer, range);
+ status = f_fss_skip_past_space(state, buffer, range);
if (F_status_is_error(status)) return status;
if (status == F_none_eol) {
* @param buffer
* The buffer to read from.
* @param state
- * A state for handling interrupts during long running operations.
- * There is no print_error() usage at this time (@todo this should be implemented and supported).
+ * A state for providing flags and handling interrupts during long running operations.
+ * There is no print_error().
* There is no functions structure.
- * There is no data structure passed to these functions (@todo the additional parameters could be moved to a custom structure).
+ * There is no data structure passed to these functions.
*
* When interrupt() returns, only F_interrupt and F_interrupt_not are processed.
* Error bit designates an error but must be passed along with F_interrupt.
* @param buffer
* The buffer to read from.
* @param state
- * A state for handling interrupts during long running operations.
- * There is no print_error() usage at this time (@todo this should be implemented and supported).
+ * A state for providing flags and handling interrupts during long running operations.
+ * There is no print_error().
* There is no functions structure.
- * There is no data structure passed to these functions (@todo the additional parameters could be moved to a custom structure).
+ * There is no data structure passed to these functions.
*
* When interrupt() returns, only F_interrupt and F_interrupt_not are processed.
* Error bit designates an error but must be passed along with F_interrupt.
* If f_fss_complete_full_e, this will write any appropriate open and close aspects of this object.
* If f_fss_complete_partial_e, this will write any appropriate open and close aspects of this object.
* @param state
- * A state for handling interrupts during long running operations.
- * There is no print_error() usage at this time (@todo this should be implemented and supported).
+ * A state for providing flags and handling interrupts during long running operations.
+ * There is no print_error().
* There is no functions structure.
- * There is no data structure passed to these functions (@todo the additional parameters could be moved to a custom structure).
+ * There is no data structure passed to these functions.
*
* When interrupt() returns, only F_interrupt and F_interrupt_not are processed.
* Error bit designates an error but must be passed along with F_interrupt.
* If f_fss_complete_partial_e, this will write any appropriate open and close aspects of this content, except for the final newline.
* If f_fss_complete_full_e, this will write any appropriate open and close aspects of this content, including the final newline.
* @param state
- * A state for handling interrupts during long running operations.
- * There is no print_error() usage at this time (@todo this should be implemented and supported).
+ * A state for providing flags and handling interrupts during long running operations.
+ * There is no print_error().
* There is no functions structure.
- * There is no data structure passed to these functions (@todo the additional parameters could be moved to a custom structure).
+ * There is no data structure passed to these functions.
*
* When interrupt() returns, only F_interrupt and F_interrupt_not are processed.
* Error bit designates an error but must be passed along with F_interrupt.
const f_array_length_t delimits_used = delimits->used;
- f_status_t status = f_fss_skip_past_space(buffer, range);
+ f_status_t status = f_fss_skip_past_space(state, buffer, range);
if (F_status_is_error(status)) return status;
if (status == F_none_eol) {
// Ignore all comment lines.
if (buffer.string[range->start] == f_fss_comment_s.string[0]) {
- status = f_fss_seek_to_eol(buffer, range);
+ status = f_fss_seek_to_eol(state, buffer, range);
if (F_status_is_error(status)) {
delimits->used = delimits_used;
if (buffer.string[range->start] == f_fss_eol_s.string[0]) break;
- status = f_fss_is_graph(buffer, *range);
+ status = f_fss_is_graph(state, buffer, *range);
if (F_status_is_error(status)) break;
if (status == F_true) break;
if (buffer.string[range->start] == f_fss_eol_s.string[0]) break;
- status = f_fss_is_space(buffer, *range);
+ status = f_fss_is_space(state, buffer, *range);
if (F_status_is_error(status)) break;
if (status == F_false) break;
continue;
}
else if (graph_first) {
- status = f_fss_is_space(buffer, *range);
+ status = f_fss_is_space(state, buffer, *range);
if (F_status_is_error(status)) break;
if (status == F_false) {
const f_array_length_t delimits_used = delimits->used;
const f_array_length_t comments_used = comments->used;
- f_status_t status = f_fss_skip_past_delimit(buffer, range);
+ f_status_t status = f_fss_skip_past_delimit(state, buffer, range);
if (F_status_is_error(status)) return status;
private_macro_fl_fss_content_with_comments_return_on_overflow((buffer), (*range), (*found), (*delimits), delimits_used, (*comments), comments_used, F_none_eos, F_none_stop);
}
}
- status = f_fss_skip_past_space(buffer, range);
+ status = f_fss_skip_past_space(state, buffer, range);
if (F_status_is_error(status)) break;
if (status == F_none_eol) {
if (buffer.string[range->start] == f_fss_eol_s.string[0]) break;
- status = f_fss_is_space(buffer, *range);
+ status = f_fss_is_space(state, buffer, *range);
if (F_status_is_error(status)) break;
if (status == F_false) break;
delimits->array[delimits->used++] = slash_first;
}
- status = f_fss_seek_to_eol(buffer, range);
+ status = f_fss_seek_to_eol(state, buffer, range);
if (F_status_is_error(status)) break;
continue;
if (buffer.string[range->start] == f_fss_eol_s.string[0]) break;
- status = f_fss_is_space(buffer, *range);
+ status = f_fss_is_space(state, buffer, *range);
if (F_status_is_error(status)) break;
if (status == F_false) break;
if (buffer.string[range->start] == f_fss_comment_s.string[0]) {
start = newline_last + 1;
- status = f_fss_seek_to_eol(buffer, range);
+ status = f_fss_seek_to_eol(state, buffer, range);
if (F_status_is_error(status)) break;
macro_f_fss_comments_t_increase(status, state.step_small, (*comments))
}
// There is no possibility of a valid content close, so seek until newline.
- status = f_fss_seek_to_eol(buffer, range);
+ status = f_fss_seek_to_eol(state, buffer, range);
if (F_status_is_error(status)) break;
} // while
if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- f_status_t status = f_fss_skip_past_delimit(object, range);
+ f_status_t status = f_fss_skip_past_delimit(state, object, range);
if (F_status_is_error(status)) return status;
if (status == F_none_eos) {
break;
}
- status = f_fss_is_graph(object, *range);
+ status = f_fss_is_graph(state, object, *range);
if (F_status_is_error(status)) break;
if (status == F_true) break;
break;
}
- status = f_fss_is_space(object, *range);
+ status = f_fss_is_space(state, object, *range);
if (F_status_is_error(status)) break;
if (status == F_true) {
break;
}
- status = f_fss_is_space(object, *range);
+ status = f_fss_is_space(state, object, *range);
if (F_status_is_error(status)) break;
ends_on_space = status == F_true;
if (!destination) return F_status_set_error(F_parameter);
#endif // _di_level_1_parameter_checking_
- f_status_t status = f_fss_skip_past_delimit(content, range);
+ f_status_t status = f_fss_skip_past_delimit(state, content, range);
if (F_status_is_error(status)) return status;
if (status == F_none_eos) {
if (content.string[range->start] == f_fss_extended_list_close_s.string[0]) {
start = range->start++;
- status = f_fss_skip_past_space(content, range);
+ status = f_fss_skip_past_space(state, content, range);
if (F_status_is_error(status)) break;
if (has_graph) {
has_graph = F_true;
- status = f_fss_skip_past_space(content, range);
+ status = f_fss_skip_past_space(state, content, range);
if (F_status_is_error(status)) break;
if (content.string[range->start] == f_fss_eol_s.string[0] || range->start >= content.used || range->start > range->stop) {
has_graph = F_false;
is_comment = F_false;
}
- else if ((status = f_fss_is_graph(content, *range)) == F_true) {
+ else if ((status = f_fss_is_graph(state, content, *range)) == F_true) {
has_graph = F_true;
}
else if (F_status_is_error(status)) {
* @param buffer
* The buffer to read from.
* @param state
- * A state for handling interrupts during long running operations.
- * There is no print_error() usage at this time (@todo this should be implemented and supported).
+ * A state for providing flags and handling interrupts during long running operations.
+ * There is no print_error().
* There is no functions structure.
- * There is no data structure passed to these functions (@todo the additional parameters could be moved to a custom structure).
+ * There is no data structure passed to these functions.
*
* When interrupt() returns, only F_interrupt and F_interrupt_not are processed.
* Error bit designates an error but must be passed along with F_interrupt.
* @param buffer
* The buffer to read from.
* @param state
- * A state for handling interrupts during long running operations.
- * There is no print_error() usage at this time (@todo this should be implemented and supported).
+ * A state for providing flags and handling interrupts during long running operations.
+ * There is no print_error().
* There is no functions structure.
- * There is no data structure passed to these functions (@todo the additional parameters could be moved to a custom structure).
+ * There is no data structure passed to these functions.
*
* When interrupt() returns, only F_interrupt and F_interrupt_not are processed.
* Error bit designates an error but must be passed along with F_interrupt.
* If f_fss_complete_partial_e, this will write any appropriate open and close aspects of this object.
* If f_fss_complete_partial_tim, this will write any appropriate open and close aspects of this object, but will omit whitespace before and after the object.
* @param state
- * A state for handling interrupts during long running operations.
- * There is no print_error() usage at this time (@todo this should be implemented and supported).
+ * A state for providing flags and handling interrupts during long running operations.
+ * There is no print_error().
* There is no functions structure.
- * There is no data structure passed to these functions (@todo the additional parameters could be moved to a custom structure).
+ * There is no data structure passed to these functions.
*
* When interrupt() returns, only F_interrupt and F_interrupt_not are processed.
* Error bit designates an error but must be passed along with F_interrupt.
* Any valid nested object open or valid nested object close inside an ingore range will not be escaped.
* Set the pointer address to 0 to disable.
* @param state
- * A state for handling interrupts during long running operations.
- * There is no print_error() usage at this time (@todo this should be implemented and supported).
+ * A state for providing flags and handling interrupts during long running operations.
+ * There is no print_error().
* There is no functions structure.
- * There is no data structure passed to these functions (@todo the additional parameters could be moved to a custom structure).
+ * There is no data structure passed to these functions.
*
* When interrupt() returns, only F_interrupt and F_interrupt_not are processed.
* Error bit designates an error but must be passed along with F_interrupt.
if (destination->string[destination_range.start] == f_fss_delimit_placeholder_s.string[0]) continue;
- status = f_fss_is_space(*destination, destination_range);
+ status = f_fss_is_space(state, *destination, destination_range);
if (F_status_is_error(status)) {
destination->used = used_start;
if (destination->string[destination_range.start] == f_fss_delimit_placeholder_s.string[0]) continue;
- status = f_fss_is_space(*destination, destination_range);
+ status = f_fss_is_space(state, *destination, destination_range);
// When going backwards, getting incomplete UTF-8 sequences is not an error.
if (F_status_set_fine(status) == F_complete_not_utf) continue;
}
}
- status = f_fss_is_space(*destination, destination_range);
+ status = f_fss_is_space(state, *destination, destination_range);
if (F_status_is_error(status)) {
destination->used = used_start;
if (destination->string[destination_range.start] == f_fss_delimit_placeholder_s.string[0]) continue;
- status = f_fss_is_space(*destination, destination_range);
+ status = f_fss_is_space(state, *destination, destination_range);
if (F_status_is_error(status)) {
destination->used = used_start;
continue;
}
- status = f_fss_is_space(*destination, destination_range);
+ status = f_fss_is_space(state, *destination, destination_range);
// When going backwards, getting incomplete UTF-8 sequences is not an error.
if (F_status_set_fine(status) == F_complete_not_utf) continue;
} // for
if (destination_range.start == 0) {
- status = f_fss_is_space(*destination, destination_range);
+ status = f_fss_is_space(state, *destination, destination_range);
if (F_status_is_error(status)) {
destination->used = used_start;
#if !defined(_di_fl_fss_basic_object_read_) || !defined(_di_fl_fss_extended_object_read_) || !defined(_di_fl_fss_extended_content_read_)
f_status_t private_fl_fss_basic_read(const f_string_static_t buffer, const bool object_as, f_state_t state, f_string_range_t * const range, f_fss_object_t * const found, f_fss_quote_t *quoted, f_fss_delimits_t * const delimits) {
- f_status_t status = f_fss_skip_past_space(buffer, range);
+ f_status_t status = f_fss_skip_past_space(state, buffer, range);
if (F_status_is_error(status)) return status;
if (status == F_none_eol) {
}
}
- status = f_fss_is_zero_width(buffer, *range);
- if (F_status_is_error(status)) break;
+ status = f_fss_is_zero_width(state, buffer, *range);
+ if (F_status_is_error(status)) return status;
if (status == F_true) {
status = f_utf_buffer_increment(buffer, range, 1);
}
if (buffer.string[range->start] != f_fss_delimit_slash_s.string[0]) {
- status = f_fss_is_space(buffer, *range);
- if (F_status_is_error(status)) break;
+ status = f_fss_is_space(state, buffer, *range);
+ if (F_status_is_error(status)) return status;
// Found the end of the object while processing the slash for potential delimits.
if (status == F_true) {
if (F_status_set_fine(status) == F_interrupt) {
status = F_status_set_error(F_interrupt);
+
break;
}
}
- status = f_fss_is_space(buffer, *range);
- if (F_status_is_error(status)) break;
+ status = f_fss_is_space(state, buffer, *range);
+ if (F_status_is_error(status)) return status;
if (status == F_true) break;
if (range->start + 1 <= range->stop && range->start + 1 < buffer.used) {
++range->start;
- status = f_fss_skip_past_delimit(buffer, range);
+ status = f_fss_skip_past_delimit(state, buffer, range);
if (F_status_is_error(status)) return status;
if (range->start > range->stop || range->start >= buffer.used) {
status = F_true;
}
else {
- status = f_fss_is_space(buffer, *range);
+ status = f_fss_is_space(state, buffer, *range);
if (F_status_is_error(status)) return status;
}
}
if (range->start > range->stop) return F_none_stop;
} // while
- status = f_fss_is_graph(buffer, *range);
+ status = f_fss_is_graph(state, buffer, *range);
if (F_status_is_error(status)) return status;
if (status == F_true) {
if (range->start + 1 <= range->stop && range->start + 1 < buffer.used) {
++range->start;
- status = f_fss_skip_past_delimit(buffer, range);
+ status = f_fss_skip_past_delimit(state, buffer, range);
if (F_status_is_error(status)) return status;
if (range->start > range->stop || range->start >= buffer.used) {
status = F_true;
}
else {
- status = f_fss_is_space(buffer, *range);
+ status = f_fss_is_space(state, buffer, *range);
if (F_status_is_error(status)) return status;
}
}
return F_fss_found_object_content_not;
}
- status = f_fss_is_space(buffer, *range);
+ status = f_fss_is_space(state, buffer, *range);
if (F_status_is_error(status)) return status;
if (status == F_true) {
}
// Seek to the EOL when no valid object is found.
- status = f_fss_seek_to_eol(buffer, range);
+ status = f_fss_seek_to_eol(state, buffer, range);
if (F_status_is_error(status)) return status;
// Move the start position to after the EOL.
#if !defined(_di_fl_fss_basic_object_write_) || !defined(_di_fl_fss_extended_object_write_) || !defined(_di_fl_fss_extended_content_write_)
f_status_t private_fl_fss_basic_write(const bool object_as, const f_string_static_t object, const f_fss_quote_t quoted, f_state_t state, f_string_range_t *range, f_string_dynamic_t *destination) {
- f_status_t status = f_fss_skip_past_space(object, range);
+ f_status_t status = f_fss_skip_past_space(state, object, range);
if (F_status_is_error(status)) return status;
if (status == F_none_eos) {
if (object.string[range->start] == quote_char) {
item_first = range->start++;
- status = f_fss_skip_past_delimit(object, range);
+ status = f_fss_skip_past_delimit(state, object, range);
if (F_status_is_error(status)) return status;
if (range->start > range->stop || range->start >= object.used) {
}
// if any space is found after a quote after a slash, then this must be delimited and quoted.
- status = f_fss_is_space(object, *range);
+ status = f_fss_is_space(state, object, *range);
if (F_status_is_error(status)) break;
if (status == F_true) {
else {
// If any space is found, then this must be quoted.
- status = f_fss_is_space(object, *range);
+ status = f_fss_is_space(state, object, *range);
if (F_status_is_error(status)) break;
if (status == F_true) {
destination->string[used_start + 1] = f_fss_delimit_slash_s.string[0];
}
- status = f_fss_skip_past_delimit(object, range);
+ status = f_fss_skip_past_delimit(state, object, range);
if (F_status_is_error(status)) return status;
if (range->start > range->stop || range->start >= object.used) {
}
// If any space is found, then this must be quoted.
- status = f_fss_is_space(object, *range);
+ status = f_fss_is_space(state, object, *range);
if (F_status_is_error(status)) break;
if (status == F_true) {
}
else if (object.string[range->start] != f_fss_delimit_placeholder_s.string[0]) {
if (!quoted_is) {
- status = f_fss_is_space(object, *range);
+ status = f_fss_is_space(state, object, *range);
if (F_status_is_error(status)) break;
if (status == F_true) {
range_i.start = i;
- status = f_fss_is_space(object, range_i);
+ status = f_fss_is_space(state, object, range_i);
if (F_status_is_error(status)) {
destination->used = used_start;
* @param used_start
* The destination.used value before any operations were perfomed.
* @param state
- * A state for handling interrupts during long running operations.
- * There is no print_error() usage at this time (@todo this should be implemented and supported).
+ * A state for providing flags and handling interrupts during long running operations.
+ * There is no print_error().
* There is no functions structure.
* There is no data structure passed to these functions.
*
* @param buffer
* The buffer to seek through.
* @param state
- * A state for handling interrupts during long running operations.
- * There is no print_error() usage at this time (@todo this should be implemented and supported).
+ * A state for providing flags and handling interrupts during long running operations.
+ * There is no print_error().
* There is no functions structure.
* There is no data structure passed to these functions.
*
* @param used_start
* The destination.used value before any operations were performed.
* @param state
- * A state for handling interrupts during long running operations.
- * There is no print_error() usage at this time (@todo this should be implemented and supported).
+ * A state for providing flags and handling interrupts during long running operations.
+ * There is no print_error().
* There is no functions structure.
* There is no data structure passed to these functions.
*
* As Object, this checks if the first graph character is a comment character '#', or an escaped comment character '#'.
* As Content, this does nothing special in regards to a leading '#'.
* @param state
- * A state for handling interrupts during long running operations.
- * There is no print_error() usage at this time (@todo this should be implemented and supported).
+ * A state for providing flags and handling interrupts during long running operations.
+ * There is no print_error().
* There is no functions structure.
* There is no data structure passed to these functions.
*
* If 0, then double quotes are auto-inserted, if needed.
* Otherwise, this is the type of quote to wrap the object in when writing.
* @param state
- * A state for handling interrupts during long running operations.
- * There is no print_error() usage at this time (@todo this should be implemented and supported).
+ * A state for providing flags and handling interrupts during long running operations.
+ * There is no print_error().
* There is no functions structure.
* There is no data structure passed to these functions.
*
* @param buffer
* The buffer to read from.
* @param state
- * A state for handling interrupts during long running operations.
- * There is no print_error() usage at this time (@todo this should be implemented and supported).
+ A state for providing flags and handling interrupts during long running operations.
+ * There is no print_error().
* There is no functions structure.
- * There is no data structure passed to these functions (@todo the additional parameters could be moved to a custom structure).
+ * There is no data structure passed to these functions.
*
* When interrupt() returns, only F_interrupt and F_interrupt_not are processed.
* Error bit designates an error but must be passed along with F_interrupt.
* If 0, then double quotes are auto-inserted, when required.
* Otherwise, this is the type of quote to wrap the object in when writing.
* @param state
- * A state for handling interrupts during long running operations.
- * There is no print_error() usage at this time (@todo this should be implemented and supported).
+ A state for providing flags and handling interrupts during long running operations.
+ * There is no print_error().
* There is no functions structure.
- * There is no data structure passed to these functions (@todo the additional parameters could be moved to a custom structure).
+ * There is no data structure passed to these functions.
*
* When interrupt() returns, only F_interrupt and F_interrupt_not are processed.
* Error bit designates an error but must be passed along with F_interrupt.
* @param buffer
* The buffer to read from.
* @param state
- * A state for handling interrupts during long running operations.
- * There is no print_error() usage at this time (@todo this should be implemented and supported).
+ A state for providing flags and handling interrupts during long running operations.
+ * There is no print_error().
* There is no functions structure.
- * There is no data structure passed to these functions (@todo the additional parameters could be moved to a custom structure).
+ * There is no data structure passed to these functions.
*
* When interrupt() returns, only F_interrupt and F_interrupt_not are processed.
* Error bit designates an error but must be passed along with F_interrupt.
* A string to prepend at the start of each line in content, such as spaces.
* Set the pointer address to 0 to disable.
* @param state
- * A state for handling interrupts during long running operations.
- * There is no print_error() usage at this time (@todo this should be implemented and supported).
+ A state for providing flags and handling interrupts during long running operations.
+ * There is no print_error().
* There is no functions structure.
- * There is no data structure passed to these functions (@todo the additional parameters could be moved to a custom structure).
+ * There is no data structure passed to these functions.
*
* When interrupt() returns, only F_interrupt and F_interrupt_not are processed.
* Error bit designates an error but must be passed along with F_interrupt.
* @param buffer
* The buffer to read from.
* @param state
- * A state for handling interrupts during long running operations.
- * There is no print_error() usage at this time (@todo this should be implemented and supported).
+ A state for providing flags and handling interrupts during long running operations.
+ * There is no print_error().
* There is no functions structure.
- * There is no data structure passed to these functions (@todo the additional parameters could be moved to a custom structure).
+ * There is no data structure passed to these functions.
*
* When interrupt() returns, only F_interrupt and F_interrupt_not are processed.
* Error bit designates an error but must be passed along with F_interrupt.
* Any valid nested object open or valid nested object close inside an ingore range will not be escaped.
* Set the pointer address to 0 to disable.
* @param state
- * A state for handling interrupts during long running operations.
- * There is no print_error() usage at this time (@todo this should be implemented and supported).
+ A state for providing flags and handling interrupts during long running operations.
+ * There is no print_error().
* There is no functions structure.
- * There is no data structure passed to these functions (@todo the additional parameters could be moved to a custom structure).
+ * There is no data structure passed to these functions.
*
* When interrupt() returns, only F_interrupt and F_interrupt_not are processed.
* Error bit designates an error but must be passed along with F_interrupt.
* @param buffer
* The buffer to read from.
* @param state
- * A state for handling interrupts during long running operations.
- * There is no print_error() usage at this time (@todo this should be implemented and supported).
+ A state for providing flags and handling interrupts during long running operations.
+ * There is no print_error().
* There is no functions structure.
- * There is no data structure passed to these functions (@todo the additional parameters could be moved to a custom structure).
+ * There is no data structure passed to these functions.
*
* When interrupt() returns, only F_interrupt and F_interrupt_not are processed.
* Error bit designates an error but must be passed along with F_interrupt.
* If 0, then double quotes are auto-inserted, when required.
* Otherwise, this is the type of quote to wrap the object in when writing.
* @param state
- * A state for handling interrupts during long running operations.
- * There is no print_error() usage at this time (@todo this should be implemented and supported).
+ A state for providing flags and handling interrupts during long running operations.
+ * There is no print_error().
* There is no functions structure.
- * There is no data structure passed to these functions (@todo the additional parameters could be moved to a custom structure).
+ * There is no data structure passed to these functions.
*
* When interrupt() returns, only F_interrupt and F_interrupt_not are processed.
* Error bit designates an error but must be passed along with F_interrupt.
* @param buffer
* The buffer to read from.
* @param state
- * A state for handling interrupts during long running operations.
- * There is no print_error() usage at this time (@todo this should be implemented and supported).
+ A state for providing flags and handling interrupts during long running operations.
+ * There is no print_error().
* There is no functions structure.
- * There is no data structure passed to these functions (@todo the additional parameters could be moved to a custom structure).
+ * There is no data structure passed to these functions.
*
* When interrupt() returns, only F_interrupt and F_interrupt_not are processed.
* Error bit designates an error but must be passed along with F_interrupt.
* Any valid nested object open or valid nested object close inside an ingore range will not be escaped.
* Set the pointer address to 0 to disable.
* @param state
- * A state for handling interrupts during long running operations.
- * There is no print_error() usage at this time (@todo this should be implemented and supported).
+ A state for providing flags and handling interrupts during long running operations.
+ * There is no print_error().
* There is no functions structure.
- * There is no data structure passed to these functions (@todo the additional parameters could be moved to a custom structure).
+ * There is no data structure passed to these functions.
*
* When interrupt() returns, only F_interrupt and F_interrupt_not are processed.
* Error bit designates an error but must be passed along with F_interrupt.
* @param buffer
* The buffer to read from.
* @param state
- * A state for handling interrupts during long running operations.
- * There is no print_error() usage at this time (@todo this should be implemented and supported).
+ A state for providing flags and handling interrupts during long running operations.
+ * There is no print_error().
* There is no functions structure.
- * There is no data structure passed to these functions (@todo the additional parameters could be moved to a custom structure).
+ * There is no data structure passed to these functions.
*
* When interrupt() returns, only F_interrupt and F_interrupt_not are processed.
* Error bit designates an error but must be passed along with F_interrupt.
* This will not be prepended for the Object "payload".
* Set the pointer address to 0 to disable.
* @param state
- * A state for handling interrupts during long running operations.
- * There is no print_error() usage at this time (@todo this should be implemented and supported).
+ A state for providing flags and handling interrupts during long running operations.
+ * There is no print_error().
* There is no functions structure.
- * There is no data structure passed to these functions (@todo the additional parameters could be moved to a custom structure).
+ * There is no data structure passed to these functions.
*
* When interrupt() returns, only F_interrupt and F_interrupt_not are processed.
* Error bit designates an error but must be passed along with F_interrupt.
return F_status_set_error(F_header);
}
- status = fl_fss_apply_delimit(data->cache.delimits, &data->cache.large);
+ status = f_fss_apply_delimit(state, data->cache.delimits, &data->cache.large);
if (F_status_is_error(status)) {
control_print_debug_packet_message(main, "Failure while processing delimits for the FSS Basic List in the response packet", 0, 0, &status);
return F_status_set_error(F_header_not);
}
- status = fl_fss_apply_delimit(data->cache.delimits, &data->cache.large);
+ status = f_fss_apply_delimit(state, data->cache.delimits, &data->cache.large);
if (F_status_is_error(status)) {
control_print_debug_packet_message(main, "Failure while processing delimits for the FSS Basic List in the response packet", 0, 0, &status);
fll_error_file_print(main->error, F_status_set_fine(status), "fll_fss_extended_read", F_true, data->cache.small, f_file_operation_process_s, fll_error_file_type_file_e);
}
else {
- status = fl_fss_apply_delimit(delimits, &data->cache.large);
+ status = f_fss_apply_delimit(state, delimits, &data->cache.large);
if (F_status_is_error(status)) {
- fll_error_file_print(main->error, F_status_set_fine(status), "fl_fss_apply_delimit", F_true, data->cache.small, f_file_operation_process_s, fll_error_file_type_file_e);
+ fll_error_file_print(main->error, F_status_set_fine(status), "f_fss_apply_delimit", F_true, data->cache.small, f_file_operation_process_s, fll_error_file_type_file_e);
}
}
* @see f_socket_read()
* @see f_string_dynamic_increase_by()
* @see fl_conversion_dynamic_partial_to_number_unsigned()
- * @see fl_fss_apply_delimit()
+ * @see f_fss_apply_delimit()
* @see fll_fss_extended_read()
* @see fll_fss_basic_list_read()
* @see fll_status_string_from()
* Errors (with error bit) from: f_string_dynamic_append_nulless().
* Errors (with error bit) from: f_string_dynamic_partial_append_nulless().
* Errors (with error bit) from: f_string_dynamics_resize().
- * Errors (with error bit) from: fl_fss_apply_delimit().
+ * Errors (with error bit) from: f_fss_apply_delimit().
* Errors (with error bit) from: fll_fss_extended_read().
*
* @see f_file_exists()
* @see f_string_dynamic_append_nulless()
* @see f_string_dynamic_partial_append_nulless()
* @see f_string_dynamics_resize()
- * @see fl_fss_apply_delimit()
+ * @see f_fss_apply_delimit()
* @see fll_fss_extended_read()
*/
#ifndef _di_control_settings_load_
return status;
}
- status = fl_fss_apply_delimit(cache->delimits, &cache->buffer_file);
+ f_state_t state = f_state_t_initialize;
+
+ status = f_fss_apply_delimit(state, cache->delimits, &cache->buffer_file);
if (F_status_is_error(status)) {
- controller_entry_print_error(is_entry, global.main->error, cache->action, F_status_set_fine(status), "fl_fss_apply_delimit", F_true, global.thread);
+ controller_entry_print_error(is_entry, global.main->error, cache->action, F_status_set_fine(status), "f_fss_apply_delimit", F_true, global.thread);
return status;
}
action->status = F_known_not;
action->parameters.used = 0;
- status = f_fss_count_lines(cache->buffer_file, cache->object_actions.array[i].start, &cache->action.line_action);
+ status = f_fss_count_lines(state, cache->buffer_file, cache->object_actions.array[i].start, &cache->action.line_action);
if (F_status_is_error(status)) {
controller_entry_print_error(is_entry, global.main->error, cache->action, F_status_set_fine(status), "f_fss_count_lines", F_true, global.thread);
controller_print_error(global.thread, global.main->error, F_status_set_fine(status), "fll_fss_basic_list_read", F_true);
}
else {
- status = fl_fss_apply_delimit(cache->delimits, &cache->buffer_file);
+ status = f_fss_apply_delimit(state, cache->delimits, &cache->buffer_file);
if (F_status_is_error(status)) {
- controller_entry_print_error(is_entry, global.main->error, cache->action, F_status_set_fine(status), "fl_fss_apply_delimit", F_true, global.thread);
+ controller_entry_print_error(is_entry, global.main->error, cache->action, F_status_set_fine(status), "f_fss_apply_delimit", F_true, global.thread);
}
}
}
f_array_length_t i = 0;
f_array_length_t j = 0;
+ f_state_t state = f_state_t_initialize;
+
for (; i < cache->object_items.used && controller_thread_is_enabled(is_entry, global.thread); ++i) {
if (code & 0x2) {
if (F_status_is_error(status)) {
controller_entry_print_error(is_entry, global.main->error, cache->action, F_status_set_fine(status), "controller_entry_items_increase_by", F_true, global.thread);
+
break;
}
break;
}
- status = f_fss_count_lines(cache->buffer_file, cache->object_items.array[i].start, &cache->action.line_item);
+ status = f_fss_count_lines(state, cache->buffer_file, cache->object_items.array[i].start, &cache->action.line_item);
if (F_status_is_error(status)) {
controller_entry_print_error(is_entry, global.main->error, cache->action, F_status_set_fine(status), "f_fss_count_lines", F_true, global.thread);
}
code |= 0x2;
+
break;
}
} // for
action = &entry->items.array[i].actions.array[j];
- // only process actions that don't already have an error.
+ // Only process actions that don't already have an error.
if (F_status_is_error(action->status)) continue;
if (action->type == controller_entry_action_type_failsafe_e || action->type == controller_entry_action_type_item_e) {
return status;
}
- status = fl_fss_apply_delimit(cache->delimits, &cache->buffer_file);
+ {
+ f_state_t state = f_state_t_initialize;
+
+ status = f_fss_apply_delimit(state, cache->delimits, &cache->buffer_file);
+ }
if (F_status_is_error(status)) {
- controller_entry_print_error(is_entry, global.main->error, cache->action, F_status_set_fine(status), "fl_fss_apply_delimit", F_true, global.thread);
+ controller_entry_print_error(is_entry, global.main->error, cache->action, F_status_set_fine(status), "f_fss_apply_delimit", F_true, global.thread);
return status;
}
f_array_length_t line = 0;
controller_entry_t *entry = is_entry ? &global.setting->entry : &global.setting->exit;
+ f_state_t state = f_state_t_initialize;
for (; i < cache->object_actions.used; ++i) {
- status = f_fss_count_lines(cache->buffer_file, cache->object_actions.array[i].start, &cache->action.line_action);
+ status = f_fss_count_lines(state, cache->buffer_file, cache->object_actions.array[i].start, &cache->action.line_action);
if (F_status_is_error(status)) {
controller_entry_print_error(is_entry, global.main->error, cache->action, F_status_set_fine(status), "f_fss_count_lines", F_true, global.thread);
*
* Errors (with error bit) from: controller_entry_actions_increase_by().
* Errors (with error bit) from: f_fss_count_lines().
- * Errors (with error bit) from: fl_fss_apply_delimit().
+ * Errors (with error bit) from: f_fss_apply_delimit().
* Errors (with error bit) from: f_string_dynamic_partial_append_nulless().
* Errors (with error bit) from: fl_string_dynamic_partial_rip_nulless().
* Errors (with error bit) from: f_string_dynamics_increase_by().
* @see f_fss_count_lines()
* @see f_string_dynamic_partial_append_nulless()
* @see f_string_dynamics_increase_by()
- * @see fl_fss_apply_delimit()
+ * @see f_fss_apply_delimit()
* @see fl_string_dynamic_partial_rip_nulless()
* @see fll_fss_extended_read()
*/
* Errors (with error bit) from: f_string_dynamic_partial_append().
* Errors (with error bit) from: f_string_dynamic_partial_append_nulless().
* Errors (with error bit) from: f_string_dynamic_terminate().
- * Errors (with error bit) from: fl_fss_apply_delimit().
+ * Errors (with error bit) from: f_fss_apply_delimit().
* Errors (with error bit) from: fll_fss_basic_list_read().
*
* @see controller_entry_actions_read()
* @see f_string_dynamic_partial_append()
* @see f_string_dynamic_partial_append_nulless()
* @see f_string_dynamic_terminate()
- * @see fl_fss_apply_delimit()
+ * @see f_fss_apply_delimit()
* @see fll_fss_basic_list_read()
*/
#ifndef _di_controller_entry_read_
}
if (status == F_fss_found_content) {
- status = fl_fss_apply_delimit(cache->delimits, &cache->buffer_item);
+ status = f_fss_apply_delimit(state, cache->delimits, &cache->buffer_item);
if (F_status_is_error(status)) {
- controller_print_error(global.thread, global.main->error, F_status_set_fine(status), "fl_fss_apply_delimit", F_true);
+ controller_print_error(global.thread, global.main->error, F_status_set_fine(status), "f_fss_apply_delimit", F_true);
return status;
}
return status;
}
- status = fl_fss_apply_delimit(cache->delimits, &cache->buffer_item);
+ status = f_fss_apply_delimit(state, cache->delimits, &cache->buffer_item);
if (F_status_is_error(status)) {
- controller_print_error(global.thread, global.main->error, F_status_set_fine(status), "fl_fss_apply_delimit", F_true);
+ controller_print_error(global.thread, global.main->error, F_status_set_fine(status), "f_fss_apply_delimit", F_true);
return status;
}
return status;
}
- status = f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &actions->array[actions->used].line);
+ status = f_fss_count_lines(state, cache->buffer_item, cache->object_actions.array[i].start, &actions->array[actions->used].line);
if (F_status_is_error(status)) {
controller_print_error(global.thread, global.main->error, F_status_set_fine(status), "f_fss_count_lines", F_true);
controller_print_error(global.thread, global.main->error, F_status_set_fine(status), "fll_fss_extended_content_read", F_true);
}
else if (status == F_fss_found_content) {
- status = fl_fss_apply_delimit(cache->delimits, &cache->buffer_item);
+ status = f_fss_apply_delimit(state, cache->delimits, &cache->buffer_item);
if (F_status_is_error(status)) {
- controller_print_error(global.thread, global.main->error, F_status_set_fine(status), "fl_fss_apply_delimit", F_true);
+ controller_print_error(global.thread, global.main->error, F_status_set_fine(status), "f_fss_apply_delimit", F_true);
}
else if (type == controller_rule_action_type_pid_file_e) {
item->pid_file.used = 0;
actions->array[actions->used++].parameters.used = 1;
}
else {
- status = f_fss_count_lines(cache->buffer_item, range->start, &actions->array[actions->used].line);
+ status = f_fss_count_lines(state, cache->buffer_item, range->start, &actions->array[actions->used].line);
if (F_status_is_error(status)) {
controller_print_error(global.thread, global.main->error, F_status_set_fine(status), "f_fss_count_lines", F_true);
if (status != F_fss_found_object) continue;
}
- status = fl_fss_apply_delimit(cache->delimits, &cache->buffer_item);
+ status = f_fss_apply_delimit(state, cache->delimits, &cache->buffer_item);
if (F_status_is_error(status)) {
- controller_print_error(global.thread, global.main->error, F_status_set_fine(status), "fl_fss_apply_delimit", F_true);
+ controller_print_error(global.thread, global.main->error, F_status_set_fine(status), "f_fss_apply_delimit", F_true);
break;
}
- status = f_fss_count_lines(cache->buffer_item, cache->range_action.start, &cache->action.line_action);
+ status = f_fss_count_lines(state, cache->buffer_item, cache->range_action.start, &cache->action.line_action);
if (F_status_is_error(status)) {
controller_print_error(global.thread, global.main->error, F_status_set_fine(status), "f_fss_count_lines", F_true);
controller_print_error(global.thread, global.main->error, F_status_set_fine(status), "fll_fss_basic_list_read", F_true);
}
else {
- status = fl_fss_apply_delimit(cache->delimits, &cache->buffer_file);
+ status = f_fss_apply_delimit(state, cache->delimits, &cache->buffer_file);
if (F_status_is_error(status)) {
- controller_print_error(global.thread, global.main->error, F_status_set_fine(status), "fl_fss_apply_delimit", F_true);
+ controller_print_error(global.thread, global.main->error, F_status_set_fine(status), "f_fss_apply_delimit", F_true);
}
}
}
else {
f_array_length_t i = 0;
f_array_length_t j = 0;
+ f_state_t state = f_state_t_initialize;
for (; i < cache->object_items.used; ++i) {
for_item = F_true;
- status = f_fss_count_lines(cache->buffer_file, cache->object_items.array[i].start, &cache->action.line_item);
+ status = f_fss_count_lines(state, cache->buffer_file, cache->object_items.array[i].start, &cache->action.line_item);
if (F_status_is_error(status)) {
controller_print_error(global.thread, global.main->error, F_status_set_fine(status), "f_fss_count_lines", F_true);
f_string_range_t range = macro_f_string_range_t_initialize2(cache->buffer_item.used);
f_string_range_t range2 = f_string_range_t_initialize;
- {
- controller_state_interrupt_t custom = macro_controller_state_interrupt_t_initialize(is_normal, global.thread);
- f_state_t state = macro_f_state_t_initialize(controller_common_allocation_large_d, controller_common_allocation_small_d, 0, 0, &controller_thread_signal_state_fss, 0, (void *) &custom, 0);
+ controller_state_interrupt_t custom = macro_controller_state_interrupt_t_initialize(is_normal, global.thread);
+ f_state_t state = macro_f_state_t_initialize(controller_common_allocation_large_d, controller_common_allocation_small_d, 0, 0, &controller_thread_signal_state_fss, 0, (void *) &custom, 0);
- status = fll_fss_extended_read(cache->buffer_item, state, &range, &cache->object_actions, &cache->content_actions, 0, 0, &cache->delimits, 0);
- }
+ status = fll_fss_extended_read(cache->buffer_item, state, &range, &cache->object_actions, &cache->content_actions, 0, 0, &cache->delimits, 0);
if (F_status_is_error(status)) {
controller_rule_print_error(global.thread, global.main->error, cache->action, F_status_set_fine(status), "fll_fss_extended_read", F_true, F_false);
// Get the current line number within the settings item.
cache->action.line_item = line_item;
- f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item);
+ f_fss_count_lines(state, cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item);
cache->action.line_action = ++cache->action.line_item;
// Get the current line number within the settings item.
cache->action.line_item = line_item;
- f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item);
+ f_fss_count_lines(state, cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item);
cache->action.line_action = ++cache->action.line_item;
// Get the current line number within the settings item.
cache->action.line_item = line_item;
- f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item);
+ f_fss_count_lines(state, cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item);
cache->action.line_action = ++cache->action.line_item;
// Get the current line number within the settings item.
cache->action.line_item = line_item;
- f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item);
+ f_fss_count_lines(state, cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item);
cache->action.line_action = ++cache->action.line_item;
// Get the current line number within the settings item.
cache->action.line_item = line_item;
- f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item);
+ f_fss_count_lines(state, cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item);
cache->action.line_action = ++cache->action.line_item;
// Get the current line number within the settings item.
cache->action.line_item = line_item;
- f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item);
+ f_fss_count_lines(state, cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item);
cache->action.line_action = ++cache->action.line_item;
// Get the current line number within the settings item.
cache->action.line_item = line_item;
- f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item);
+ f_fss_count_lines(state, cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item);
cache->action.line_action = ++cache->action.line_item;
// get the current line number within the settings item.
cache->action.line_item = line_item;
- f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item);
+ f_fss_count_lines(state, cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item);
cache->action.line_action = ++cache->action.line_item;
// Get the current line number within the settings item.
cache->action.line_item = line_item;
- f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item);
+ f_fss_count_lines(state, cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item);
cache->action.line_action = ++cache->action.line_item;
// get the current line number within the settings item.
cache->action.line_item = line_item;
- f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item);
+ f_fss_count_lines(state, cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item);
cache->action.line_action = ++cache->action.line_item;
// get the current line number within the settings item.
cache->action.line_item = line_item;
- f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item);
+ f_fss_count_lines(state, cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item);
cache->action.line_action = ++cache->action.line_item;
// get the current line number within the settings item.
cache->action.line_item = line_item;
- f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item);
+ f_fss_count_lines(state, cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item);
cache->action.line_action = ++cache->action.line_item;
// get the current line number within the settings item.
cache->action.line_item = line_item;
- f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item);
+ f_fss_count_lines(state, cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item);
cache->action.line_action = ++cache->action.line_item;
}
// Get the current line number within the settings item.
cache->action.line_item = line_item;
- f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item);
+ f_fss_count_lines(state, cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item);
cache->action.line_action = ++cache->action.line_item;
// Get the current line number within the settings item.
cache->action.line_item = line_item;
- f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item);
+ f_fss_count_lines(state, cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item);
cache->action.line_action = ++cache->action.line_item;
// Get the current line number within the settings item.
cache->action.line_item = line_item;
- f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item);
+ f_fss_count_lines(state, cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item);
cache->action.line_action = ++cache->action.line_item;
// Get the current line number within the settings item.
cache->action.line_item = line_item;
- f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item);
+ f_fss_count_lines(state, cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item);
cache->action.line_action = ++cache->action.line_item;
// Get the current line number within the settings item.
cache->action.line_item = line_item;
- f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item);
+ f_fss_count_lines(state, cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item);
cache->action.line_action = ++cache->action.line_item;
// Get the current line number within the settings item.
cache->action.line_item = line_item;
- f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item);
+ f_fss_count_lines(state, cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item);
cache->action.line_action = ++cache->action.line_item;
// Get the current line number within the settings item.
cache->action.line_item = line_item;
- f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item);
+ f_fss_count_lines(state, cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item);
cache->action.line_action = ++cache->action.line_item;
// Get the current line number within the settings item.
cache->action.line_item = line_item;
- f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item);
+ f_fss_count_lines(state, cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item);
cache->action.line_action = ++cache->action.line_item;
// Get the current line number within the settings item.
cache->action.line_item = line_item;
- f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item);
+ f_fss_count_lines(state, cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item);
cache->action.line_action = ++cache->action.line_item;
// Get the current line number within the settings item.
cache->action.line_item = line_item;
- f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item);
+ f_fss_count_lines(state, cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item);
cache->action.line_action = ++cache->action.line_item;
// Get the current line number within the settings item.
cache->action.line_item = line_item;
- f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item);
+ f_fss_count_lines(state, cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item);
cache->action.line_action = ++cache->action.line_item;
// Get the current line number within the settings item.
cache->action.line_item = line_item;
- f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item);
+ f_fss_count_lines(state, cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item);
cache->action.line_action = ++cache->action.line_item;
// Get the current line number within the settings item.
cache->action.line_item = line_item;
- f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item);
+ f_fss_count_lines(state, cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item);
cache->action.line_action = ++cache->action.line_item;
// Get the current line number within the settings item.
cache->action.line_item = line_item;
- f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item);
+ f_fss_count_lines(state, cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item);
cache->action.line_action = ++cache->action.line_item;
// Get the current line number within the settings item.
cache->action.line_item = line_item;
- f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item);
+ f_fss_count_lines(state, cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item);
cache->action.line_action = ++cache->action.line_item;
// Get the current line number within the settings item.
cache->action.line_item = line_item;
- f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item);
+ f_fss_count_lines(state, cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item);
cache->action.line_action = ++cache->action.line_item;
// Get the current line number within the settings item.
cache->action.line_item = line_item;
- f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item);
+ f_fss_count_lines(state, cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item);
cache->action.line_action = ++cache->action.line_item;
// Get the current line number within the settings item.
cache->action.line_item = line_item;
- f_fss_count_lines(cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item);
+ f_fss_count_lines(state, cache->buffer_item, cache->object_actions.array[i].start, &cache->action.line_item);
cache->action.line_action = ++cache->action.line_item;
* @see controller_rule_items_increase_by().
* @see controller_rule_item_read().
* @see f_fss_count_lines().
- * @see fl_fss_apply_delimit().
+ * @see f_fss_apply_delimit().
* @see f_string_dynamic_partial_append().
* @see f_string_dynamic_partial_append_nulless().
* @see fll_fss_basic_list_read().
if (print.verbosity == f_console_verbosity_quiet_e) return;
+ f_state_t state = f_state_t_initialize;
+
// Get the current line number within the settings item.
cache->action.line_item = line_item;
- f_fss_count_lines(cache->buffer_item, cache->object_actions.array[index].start, &cache->action.line_item);
+ f_fss_count_lines(state, cache->buffer_item, cache->object_actions.array[index].start, &cache->action.line_item);
cache->action.line_action = ++cache->action.line_item;
if (print.verbosity == f_console_verbosity_quiet_e) return;
+ f_state_t state = f_state_t_initialize;
+
// Get the current line number within the settings item.
cache->action.line_item = line_item;
- f_fss_count_lines(cache->buffer_item, cache->object_actions.array[index].start, &cache->action.line_item);
+ f_fss_count_lines(state, cache->buffer_item, cache->object_actions.array[index].start, &cache->action.line_item);
cache->action.line_action = ++cache->action.line_item;
if (F_status_is_error_not(*status)) {
f_string_range_t range = macro_f_string_range_t_initialize2(buffer.used);
f_fss_delimits_t delimits = f_fss_delimits_t_initialize;
+ f_state_t state = macro_f_state_t_initialize(fake_common_allocation_large_d, fake_common_allocation_small_d, 0, 0, &fll_program_standard_signal_state, 0, (void *) data->main, 0);
- {
- f_state_t state = macro_f_state_t_initialize(fake_common_allocation_large_d, fake_common_allocation_small_d, 0, 0, &fll_program_standard_signal_state, 0, (void *) data->main, 0);
-
- *status = fll_fss_extended_read(buffer, state, &range, &objects, &contents, 0, 0, &delimits, 0);
- }
+ *status = fll_fss_extended_read(buffer, state, &range, &objects, &contents, 0, 0, &delimits, 0);
if (F_status_is_error(*status)) {
fake_print_error_fss(data, F_status_set_fine(*status), "fll_fss_extended_read", data->file_data_build_settings, range, F_true);
}
else {
- *status = fl_fss_apply_delimit(delimits, &buffer);
+ *status = f_fss_apply_delimit(state, delimits, &buffer);
if (F_status_is_error(*status)) {
- fll_error_print(data->main->error, F_status_set_fine(*status), "fl_fss_apply_delimit", F_true);
+ fll_error_print(data->main->error, F_status_set_fine(*status), "f_fss_apply_delimit", F_true);
}
else {
fake_build_load_setting_process(data, F_true, setting_file.used ? path_file : data->file_data_build_settings, buffer, objects, contents, setting, status);
f_string_range_t range = macro_f_string_range_t_initialize2(data_make->buffer.used);
f_fss_delimits_t delimits = f_fss_delimits_t_initialize;
f_fss_comments_t comments = f_fss_comments_t_initialize;
+ f_state_t state = macro_f_state_t_initialize(fake_common_allocation_large_d, fake_common_allocation_small_d, 0, 0, &fll_program_standard_signal_state, 0, (void *) data_make->data, 0);
- {
- f_state_t state = macro_f_state_t_initialize(fake_common_allocation_large_d, fake_common_allocation_small_d, 0, 0, &fll_program_standard_signal_state, 0, (void *) data_make->data, 0);
-
- *status = fll_fss_basic_list_read(data_make->buffer, state, &range, &list_objects, &list_contents, &delimits, 0, &comments);
- }
+ *status = fll_fss_basic_list_read(data_make->buffer, state, &range, &list_objects, &list_contents, &delimits, 0, &comments);
if (F_status_is_error(*status)) {
fake_print_error_fss(data_make->data, F_status_set_fine(*status), "fll_fss_basic_list_read", data_make->data->file_data_build_fakefile, range, F_true);
}
else {
- *status = fl_fss_apply_delimit(delimits, &data_make->buffer);
+ *status = f_fss_apply_delimit(state, delimits, &data_make->buffer);
if (F_status_is_error(*status)) {
- fll_error_print(data_make->main->error, F_status_set_fine(*status), "fl_fss_apply_delimit", F_true);
+ fll_error_print(data_make->main->error, F_status_set_fine(*status), "f_fss_apply_delimit", F_true);
}
}
break;
}
- *status = fl_fss_apply_delimit(delimits, &data_make->buffer);
+ *status = f_fss_apply_delimit(state, delimits, &data_make->buffer);
if (F_status_is_error(*status)) {
- fll_error_print(data_make->main->error, F_status_set_fine(*status), "fl_fss_apply_delimit", F_true);
+ fll_error_print(data_make->main->error, F_status_set_fine(*status), "f_fss_apply_delimit", F_true);
break;
}
break;
}
- *status = fl_fss_apply_delimit(delimits, &data_make->buffer);
+ *status = f_fss_apply_delimit(state, delimits, &data_make->buffer);
if (F_status_is_error(*status)) {
- fll_error_print(data_make->main->error, F_status_set_fine(*status), "fl_fss_apply_delimit", F_true);
+ fll_error_print(data_make->main->error, F_status_set_fine(*status), "f_fss_apply_delimit", F_true);
break;
}
if (data->main->error.verbosity == f_console_verbosity_quiet_e || !print.to.stream) return;
f_array_length_t line = 1;
+ f_state_t state = f_state_t_initialize;
- f_fss_count_lines(buffer, operation_name.start, &line);
+ f_fss_count_lines(state, buffer, operation_name.start, &line);
flockfile(data->main->error.to.stream);
if (data->main->error.verbosity == f_console_verbosity_quiet_e || !print.to.stream) return;
f_array_length_t line = 1;
+ f_state_t state = f_state_t_initialize;
- f_fss_count_lines(buffer, operation_name.start, &line);
+ f_fss_count_lines(state, buffer, operation_name.start, &line);
flockfile(data->main->error.to.stream);
if (data->main->error.verbosity == f_console_verbosity_quiet_e || !print.to.stream) return;
f_array_length_t line = 1;
+ f_state_t state = f_state_t_initialize;
- f_fss_count_lines(buffer, operation_name.start, &line);
+ f_fss_count_lines(state, buffer, operation_name.start, &line);
flockfile(data->main->error.to.stream);
}
if (F_status_is_error_not(status)) {
- status = fl_fss_apply_delimit(delimits, &local_buffer);
+ f_state_t state = f_state_t_initialize;
+
+ status = f_fss_apply_delimit(state, delimits, &local_buffer);
if (F_status_is_error(status)) {
- fll_error_print(data->main->error, F_status_set_fine(status), "fl_fss_apply_delimit", F_true);
+ fll_error_print(data->main->error, F_status_set_fine(status), "f_fss_apply_delimit", F_true);
}
}
f_fss_delimits_t delimits = f_fss_delimits_t_initialize;
f_fss_comments_t comments = f_fss_comments_t_initialize;
+ f_state_t state = f_state_t_initialize;
{
- f_state_t state = f_state_t_initialize;
f_string_range_t input = macro_f_string_range_t_initialize2(local->buffer.used);
status = fll_fss_basic_list_read(local->buffer, state, &input, &local->chain_objects, &local->chain_contents, &delimits, 0, &comments);
}
}
else {
- status = fl_fss_apply_delimit(delimits, &local->buffer);
+ status = f_fss_apply_delimit(state, delimits, &local->buffer);
if (F_status_is_error(status)) {
- fll_error_print(data->main->error, F_status_set_fine(status), "fl_fss_apply_delimit", F_true);
+ fll_error_print(data->main->error, F_status_set_fine(status), "f_fss_apply_delimit", F_true);
}
}
f_status_t status = F_none;
f_fss_delimits_t delimits = f_fss_delimits_t_initialize;
+ f_state_t state = f_state_t_initialize;
- {
- f_state_t state = f_state_t_initialize;
-
- status = fll_fss_extended_read(local->buffer, state, range, &local->rule_objects, &local->rule_contents, 0, 0, &delimits, 0);
- }
+ status = fll_fss_extended_read(local->buffer, state, range, &local->rule_objects, &local->rule_contents, 0, 0, &delimits, 0);
if (F_status_is_error_not(status)) {
- status = fl_fss_apply_delimit(delimits, &local->buffer);
+ status = f_fss_apply_delimit(state, delimits, &local->buffer);
if (F_status_is_error(status)) {
- fll_error_print(data->main->error, F_status_set_fine(status), "fl_fss_apply_delimit", F_true);
+ fll_error_print(data->main->error, F_status_set_fine(status), "f_fss_apply_delimit", F_true);
}
}
const f_array_length_t index = main->parameters.array[fss_basic_list_write_parameter_prepend_e].values.array[main->parameters.array[fss_basic_list_write_parameter_prepend_e].values.used - 1];
if (main->parameters.arguments.array[index].used) {
+ f_state_t state = f_state_t_initialize;
f_string_range_t range = macro_f_string_range_t_initialize2(main->parameters.arguments.array[index].used);
for (; range.start < main->parameters.arguments.array[index].used; ++range.start) {
- status = f_fss_is_space(main->parameters.arguments.array[index], range);
+ status = f_fss_is_space(state, main->parameters.arguments.array[index], range);
if (F_status_is_error(status)) break;
if (status == F_false) {
// Even though this standard does not utilize this parameter, provide the validation for consistency.
if (argv[index].used) {
f_string_range_t range = macro_f_string_range_t_initialize2(argv[index].used);
+ f_state_t state = f_state_t_initialize;
for (; range.start < argv[index].used; ++range.start) {
- status = f_fss_is_space(argv[index], range);
+ status = f_fss_is_space(state, argv[index], range);
if (F_status_is_error(status)) break;
if (status == F_false) {
if (argv[index].used) {
f_string_range_t range = macro_f_string_range_t_initialize2(argv[index].used);
+ f_state_t state = f_state_t_initialize;
for (; range.start < argv[index].used; ++range.start) {
- status = f_fss_is_space(argv[index], range);
+ status = f_fss_is_space(state, argv[index], range);
if (F_status_is_error(status)) break;
if (status == F_false) {
#ifndef _di_fss_extended_list_read_load_
f_status_t fss_extended_list_read_load(fll_program_data_t * const main, fss_extended_list_read_data_t * const data) {
- f_state_t state = macro_f_state_t_initialize(fss_extended_list_read_common_allocation_large_d, fss_extended_list_read_common_allocation_small_d, 0, &fll_program_standard_signal_state, 0, 0, (void *) main, 0);
+ f_state_t state = macro_f_state_t_initialize(fss_extended_list_read_common_allocation_large_d, fss_extended_list_read_common_allocation_small_d, 0, 0, &fll_program_standard_signal_state, 0, (void *) main, 0);
f_string_range_t input = macro_f_string_range_t_initialize2(data->buffer.used);
data->delimits_object.used = 0;
if (argv[index].used) {
f_string_range_t range = macro_f_string_range_t_initialize2(argv[index].used);
+ f_state_t state = f_state_t_initialize;
for (; range.start < argv[index].used; ++range.start) {
- status = f_fss_is_space(argv[index], range);
+ status = f_fss_is_space(state, argv[index], range);
if (F_status_is_error(status)) break;
if (status == F_false) {
// Even though this standard does not utilize this parameter, provide the validation for consistency.
if (argv[index].used) {
f_string_range_t range = macro_f_string_range_t_initialize2(argv[index].used);
+ f_state_t state = f_state_t_initialize;
for (; range.start < argv[index].used; ++range.start) {
- status = f_fss_is_space(argv[index], range);
+ status = f_fss_is_space(state, argv[index], range);
if (F_status_is_error(status)) break;
if (status == F_false) {
if (argv[index].used) {
f_string_range_t range = macro_f_string_range_t_initialize2(argv[index].used);
+ f_state_t state = f_state_t_initialize;
for (; range.start < argv[index].used; range.start++) {
- status = f_fss_is_space(argv[index], range);
+ status = f_fss_is_space(state, argv[index], range);
if (F_status_is_error(status)) break;
if (status == F_false) {