From 608c743a3dac28f657a4d84d2cb9f20e22d7c236 Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Wed, 1 Jun 2022 23:07:33 -0500 Subject: [PATCH] Update: Fixes and changes resulting from f_fss unit tests. After reviewing the code I found that the logic is outdated. The logic was written at the time when I was still far less familiar with Unicode. The zero-width is being processed in the same way as combining characters. This needs to change. After reviewing the combining character logic, I realized that there are bigger problems. The combining characters, for whatever reason, are processed from right to left. This breaks normal streaming logic and requires post checks on all variables. I am amazed that they let such a horrible idea get into the standard and I do not know why. Regardless, the logic on many of these functions needs to change. The logic is changed to more properly handle the combining characters and additional more explicit code comment documentation is added. There will likely need to be follow up changes in the processing code but I am going to leave that for another time. Change the code to be more consistent with how F_data_not is returned. Rename functions to more consistently follow the naming strategy used (such as changing "_between" to "_range"). Add f_fss_is_combining() function. Remove unused and unnecessary f_fss_shift_delimit() function. Remove unused and unnecessary f_fss_skip_past_non_graph() function. Update the FSS specifications to better clarify the combining character situation. The combining character logic implies that I need to return status codes to designate that the return is happening at the start of some processing. Create several "_start" status codes to address this need. Fix a bug from a previous commit that is the result of a misplaced regex replace ("alphabeticbetic" should instead be "alphabetic"). Fix a bug where some files where missed when refactoring is_alpha() into is_alphabetic(). --- level_0/f_fss/c/fss.c | 317 ++++----------------- level_0/f_fss/c/fss.h | 145 +++++----- level_0/f_fss/c/fss/delimit.h | 4 +- level_0/f_fss/c/fss/named.c | 24 +- level_0/f_fss/c/fss/nest.c | 34 +-- level_0/f_fss/c/fss/set.c | 48 +--- level_0/f_iki/c/iki/data.c | 24 +- level_0/f_limit/c/limit/set.c | 24 +- level_0/f_limit/c/limit/value.c | 24 +- level_0/f_status/c/status.h | 6 + level_0/f_thread/c/thread.c | 148 +++------- level_0/f_type_array/c/type_array/array_length.c | 24 +- level_0/f_type_array/c/type_array/cell.c | 24 +- level_0/f_type_array/c/type_array/fll_id.c | 24 +- level_0/f_type_array/c/type_array/int128.c | 24 +- level_0/f_type_array/c/type_array/int16.c | 24 +- level_0/f_type_array/c/type_array/int32.c | 24 +- level_0/f_type_array/c/type_array/int64.c | 24 +- level_0/f_type_array/c/type_array/int8.c | 24 +- level_0/f_type_array/c/type_array/state.c | 24 +- level_0/f_type_array/c/type_array/status.c | 24 +- level_0/f_type_array/c/type_array/uint128.c | 24 +- level_0/f_type_array/c/type_array/uint16.c | 24 +- level_0/f_type_array/c/type_array/uint32.c | 24 +- level_0/f_type_array/c/type_array/uint64.c | 24 +- level_0/f_type_array/c/type_array/uint8.c | 24 +- level_0/f_utf/c/private-utf.c | 4 +- level_0/f_utf/c/private-utf.h | 8 +- level_0/f_utf/c/private-utf_alphabetic.c | 12 +- level_0/f_utf/c/private-utf_alphabetic.h | 20 +- level_0/f_utf/c/utf/is.c | 16 +- level_0/f_utf/c/utf/is.h | 58 ++-- level_0/f_utf/c/utf/is_character.c | 2 +- level_0/f_utf/c/utf/is_character.h | 26 +- .../controller/c/controller/private-controller.c | 2 +- .../controller/c/controller/private-controller.h | 4 +- specifications/fss-0000.txt | 2 +- specifications/fss-0001.txt | 2 +- specifications/fss-0002.txt | 8 +- specifications/fss-0003.txt | 10 +- specifications/fss-0009.txt | 2 +- specifications/fss-000a.txt | 2 +- specifications/fss-000b.txt | 2 +- specifications/fss.txt | 9 +- 44 files changed, 408 insertions(+), 939 deletions(-) diff --git a/level_0/f_fss/c/fss.c b/level_0/f_fss/c/fss.c index 342f9ea..169acfe 100644 --- a/level_0/f_fss/c/fss.c +++ b/level_0/f_fss/c/fss.c @@ -11,6 +11,8 @@ extern "C" { if (!buffer) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ + if (!buffer->used) return F_data_not; + for (f_array_length_t i = 0; i < delimits.used; ++i) { if (delimits.array[i] < buffer->used) { @@ -22,12 +24,14 @@ extern "C" { } #endif // _di_f_fss_apply_delimit_ -#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_f_fss_apply_delimit_range_ + f_status_t f_fss_apply_delimit_range(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_ + if (!buffer->used || range.start > range.stop || range.start >= buffer->used) return F_data_not; + for (f_array_length_t i = 0; i < delimits.used; ++i) { if (delimits.array[i] < buffer->used && delimits.array[i] >= range.start && delimits.array[i] <= range.stop) { @@ -37,7 +41,7 @@ extern "C" { return F_none; } -#endif // _di_f_fss_apply_delimit_between_ +#endif // _di_f_fss_apply_delimit_range_ #ifndef _di_f_fss_count_lines_ 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) { @@ -45,46 +49,34 @@ extern "C" { if (!line) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (before >= buffer.used) { - return F_none; - } + if (!buffer.used) return F_data_not; - for (f_array_length_t i = before; i > 0; --i) { + for (f_array_length_t i = 0; i < before && i < buffer.used; i += macro_f_utf_byte_width(buffer.string[i])) { if (buffer.string[i] == f_fss_eol_s.string[0]) { ++(*line); } } // for - if (buffer.string[0] == f_fss_eol_s.string[0]) { - ++(*line); - } - return F_none; } #endif // _di_f_fss_count_lines_ #ifndef _di_f_fss_count_lines_range_ - 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) { + f_status_t f_fss_count_lines_range(f_state_t state, const f_string_static_t buffer, const f_string_range_t range, 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_ - if (range.stop < range.start || range.start >= buffer.used || !buffer.used || before >= buffer.used || before > range.stop) { - return F_none; - } + if (!buffer.used || range.start > range.stop || range.start >= buffer.used) return F_data_not; - for (f_array_length_t i = before; i > range.start; --i) { + for (f_array_length_t i = range.start; i <= range.stop && i < buffer.used; i += macro_f_utf_byte_width(buffer.string[i])) { if (buffer.string[i] == f_fss_eol_s.string[0]) { ++(*line); } } // for - if (buffer.string[range.start] == f_fss_eol_s.string[0]) { - ++(*line); - } - return F_none; } #endif // _di_f_fss_count_lines_range_ @@ -119,10 +111,27 @@ extern "C" { } #endif // _di_f_fss_fail_utf_to_false_ +#ifndef _di_f_fss_is_combining_ + f_status_t f_fss_is_combining(f_state_t state, const f_string_static_t buffer, const f_string_range_t range) { + + if (!buffer.used || range.start > range.stop || range.start >= buffer.used) { + return F_false; + } + + f_array_length_t width_max = (range.stop - range.start) + 1; + + if (width_max > buffer.used - range.start) { + width_max = buffer.used - range.start; + } + + return f_fss_fail_utf_to_false(state, f_utf_is_combining(buffer.string + range.start, width_max)); + } +#endif // _di_f_fss_is_combining_ + #ifndef _di_f_fss_is_graph_ 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) { + if (!buffer.used || range.start > range.stop || range.start >= buffer.used) { return F_false; } @@ -139,7 +148,7 @@ extern "C" { #ifndef _di_f_fss_is_space_ 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) { + if (!buffer.used || range.start > range.stop || range.start >= buffer.used) { return F_false; } @@ -172,7 +181,7 @@ extern "C" { #ifndef _di_f_fss_is_zero_width_ 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) { + if (!buffer.used || range.start > range.stop || range.start >= buffer.used) { return F_false; } @@ -192,6 +201,8 @@ extern "C" { if (!range) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ + if (!buffer.used || range->start > range->stop || range->start >= buffer.used) return F_data_not; + for (;; ++range->start) { if (range->start >= buffer.used) return F_none_eos; @@ -203,81 +214,14 @@ extern "C" { } #endif // _di_f_fss_seek_to_eol_ -#ifndef _di_f_fss_shift_delimit_ - 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_ - - if (range.stop < range.start || range.start >= buffer->used || !buffer->used) { - return F_none; - } - - f_array_length_t position = 0; - f_array_length_t distance = 0; - - uint8_t utf_width = 0; - - position = range.start; - - while (position < buffer->used && position <= range.stop) { - - if (buffer->string[position] == f_fss_delimit_placeholder_s.string[0]) { - ++distance; - } - - // 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; - } - - utf_width = macro_f_utf_byte_width_is(buffer->string[position]); - - if (utf_width > 1) { - - // 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_fss_fail_utf(state, F_status_set_error(F_utf_not)); - } - - if (distance > 0) { - while (utf_width) { - - buffer->string[position] = buffer->string[position + distance]; - --utf_width; - ++position; - } // while - } - } - else { - - // Shift everything down one for each delimit placeholder found. - if (distance > 0) { - buffer->string[position] = buffer->string[position + distance]; - } - - ++position; - } - } - - if (distance > 0) { - while (position < buffer->used + distance && position <= range.stop) { - - buffer->string[position] = f_fss_delimit_placeholder_s.string[0]; - ++position; - } - } - - return F_none; - } -#endif // _di_f_fss_shift_delimit_ - #ifndef _di_f_fss_skip_past_delimit_ 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_ + if (!buffer.used || range->start > range->stop || range->start >= buffer.used) return F_data_not; + for (;; ++range->start) { if (range->start >= buffer.used) return F_none_eos; @@ -295,25 +239,29 @@ extern "C" { if (!range) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (range->start > range->stop) { - return F_none_stop; - } - - if (range->start >= buffer.used || !buffer.used) { - return F_none_eos; - } + if (!buffer.used || range->start > range->stop || range->start >= buffer.used) return F_data_not; f_status_t status = F_none; uint8_t width = 0; - f_array_length_t width_max = (range->stop - range->start) + 1; if (width_max > buffer.used - range->start) { width_max = buffer.used - range->start; } + // Check that the first character is not a combining character. + status = f_fss_fail_utf_to_false(state, f_utf_is_combining(buffer.string + range->start, width_max)); + if (F_status_is_error(status)) return status; + if (status == F_true) return F_status_set_error(F_complete_not_utf_start); + for (;;) { + width_max = (range->stop - range->start) + 1; + + if (width_max > buffer.used - range->start) { + width_max = buffer.used - range->start; + } + if (buffer.string[range->start] == f_fss_eol_s.string[0]) { return F_none_eol; } @@ -321,161 +269,29 @@ extern "C" { if (buffer.string[range->start] == f_fss_delimit_placeholder_s.string[0]) { ++range->start; - if (range->start >= buffer.used) { - return F_none_eos; - } - - if (range->start > range->stop) { - return F_none_stop; - } - continue; } 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_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; + status = f_fss_fail_utf_to_false(state, f_utf_is_control(buffer.string + range->start, width_max)); if (status == F_false) { - return F_none; - } - } - - width = macro_f_utf_byte_width_is(buffer.string[range->start]); - - if (!width) { - width = 1; - } - else if (width == 1) { - - // Do not operate on UTF-8 fragments that are not the first byte of the character. - return f_fss_fail_utf(state, F_status_set_error(F_complete_not_utf)); - } - else { - if (range->start + width >= buffer.used) { - return f_fss_fail_utf(state, F_status_set_error(F_complete_not_utf_eos)); - } - - if (range->start + width > range->stop) { - return f_fss_fail_utf(state, F_status_set_error(F_complete_not_utf_stop)); - } - } - - range->start += width; - - if (range->start >= buffer.used) { - return F_none_eos; - } - - if (range->start > range->stop) { - return F_none_stop; - } - - width_max = (range->stop - range->start) + 1; - - if (width_max > buffer.used - range->start) { - width_max = buffer.used - range->start; - } - } // for - - return F_none; - } -#endif // _di_f_fss_skip_past_space_ - -#ifndef _di_f_fss_skip_past_non_graph_ - 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_ - - if (range->start > range->stop) { - return F_none_stop; - } - - if (range->start >= buffer.used || !buffer.used) { - return F_none_eos; - } - - f_status_t status = F_none; - uint8_t width = 0; - - f_array_length_t width_max = (range->stop - range->start) + 1; - f_array_length_t next = 0; + status = f_fss_fail_utf_to_false(state, f_utf_is_combining(buffer.string + range->start, width_max)); - if (width_max > buffer.used - range->start) { - width_max = buffer.used - range->start; - } - - for (;;) { - - if (buffer.string[range->start] != f_fss_delimit_placeholder_s.string[0]) { - 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. - break; - } - else if (status == F_false) { - 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_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. - return F_none; - } - - if (status == F_false) { - status = f_utf_is_zero_width(buffer.string + next, width_max); - - // Seek until a non-zero-width is reached. - if (status == F_true) continue; - - // Treat zero-width as a non-graph when preceding a non-graph (that is not a zero-width). - if (status == F_false) break; - - if (F_status_is_error(status)) return status; - } - else if (F_status_is_error(status)) { - return status; - } - } // for - } - else if (status == F_false) { - - // Continue on when non-graph and non-zero-width. - break; + if (status == F_false) { + status = f_fss_fail_utf_to_false(state, f_utf_is_zero_width(buffer.string + range->start, width_max)); + if (status == F_false) return F_none; } - else if (F_status_is_error(status)) { - return status; - } - } - else if (F_status_is_error(status)) { - return status; } } - width = macro_f_utf_byte_width_is(buffer.string[range->start]); + if (F_status_is_error(status)) return status; - if (!width) { - width = 1; - } - else if (width == 1) { + width = macro_f_utf_byte_width(buffer.string[range->start]); - // Do not operate on UTF-8 fragments that are not the first byte of the character. - return f_fss_fail_utf(state, F_status_set_error(F_complete_not_utf)); - } - else { + if (width > 1) { if (range->start + width >= buffer.used) { return f_fss_fail_utf(state, F_status_set_error(F_complete_not_utf_eos)); } @@ -487,28 +303,13 @@ extern "C" { range->start += width; - if (range->start >= buffer.used) { - return F_none_eos; - } - - if (range->start > range->stop) { - return F_none_stop; - } - - width_max = (range->stop - range->start) + 1; - - if (width_max > buffer.used - range->start) { - width_max = buffer.used - range->start; - } + if (range->start >= buffer.used) return F_none_eos; + if (range->start > range->stop) return F_none_stop; } // for - if (F_status_is_error(status)) { - return status; - } - return F_none; } -#endif // _di_f_fss_skip_past_non_graph_ +#endif // _di_f_fss_skip_past_space_ #ifdef __cplusplus } // extern "C" diff --git a/level_0/f_fss/c/fss.h b/level_0/f_fss/c/fss.h index c0d2867..a4bc0cb 100644 --- a/level_0/f_fss/c/fss.h +++ b/level_0/f_fss/c/fss.h @@ -48,6 +48,7 @@ extern "C" { * * @return * F_none on success. + * F_data_not on success but buffer.used is 0. * * F_parameter (with error bit) if a parameter is invalid. */ @@ -71,12 +72,13 @@ extern "C" { * * @return * F_none on success. + * F_data_not on success but buffer.used is 0. * * F_parameter (with error bit) if a parameter is invalid. */ -#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_ +#ifndef _di_f_fss_apply_delimit_range_ + extern f_status_t f_fss_apply_delimit_range(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_range_ /** * Count the number of new lines from the buffer before the given location. @@ -93,9 +95,12 @@ extern "C" { * The position in the buffer where to start counting before. * @param line * The total lines found leading up to but not including before. + * This value is not reset and only additions are performed. + * When F_data_not is returned, this value is not altered. * * @return * F_none on success. + * F_data_not on success but buffer.used is 0 (line is set to 0). * * F_parameter (with error bit) if a parameter is invalid. */ @@ -116,18 +121,19 @@ extern "C" { * The string to process. * @param range * The range within the buffer to process. - * @param before - * The position in the buffer where to start counting before. * @param line * The total lines found leading up to but not including before. + * This value is not reset and only additions are performed. + * When F_data_not is returned, this value is not altered. * * @return * F_none on success. + * F_data_not on success but the range.start is greater than buffer.used or buffer.used is 0 (line is set to 0). * * 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(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); + 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, f_array_length_t * const line); #endif // _di_f_fss_count_lines_range_ /** @@ -175,6 +181,41 @@ extern "C" { #endif // _di_f_fss_fail_utf_to_false_ /** + * Identify whether or not a character in the buffer is a combining (ASCII or UTF-8) character. + * + * This only checks if the given character is a combining character and does not check what this combines into. + * + * The combining characters combine from right to left. + * It is recommended to use this after testing for other characters, such as f_fss_is_space() or f_fss_is_graph(). + * A combining character can follow any character, even if it is something like a control character. + * This is unclear behavior so a simple strategy is to assume that a combining character results in a graph for anything except a non-combining zero-width character. + * U+0020 followed by U+0301 would result in the combination of the two being considered a graph rather than a space. + * Given that NULL characters are ignored by the general FSS standard, combining characters are not considered to combine into NULL. + * + * @param state + * A state for providing flags and handling interrupts during long running operations. + * @param buffer + * The string to process. + * @param range + * The character at the start position will be checked against the graph. + * @param header + * The header data to populate with results of this function. + * + * @return + * F_true if the character in the buffer is a combining character. + * F_false if the character in the buffer is not a combining character. + * + * F_parameter (with error bit) if a parameter is invalid. + * + * Errors (with error bit) from: f_utf_is_combining(). + * + * @see f_utf_is_combining() + */ +#ifndef _di_f_fss_is_combining_ + extern f_status_t f_fss_is_combining(f_state_t state, const f_string_static_t buffer, const f_string_range_t range); +#endif // _di_f_fss_is_combining_ + +/** * Identify whether or not a character in the buffer is a graph (ASCII or UTF-8) character. * * @param state @@ -201,7 +242,7 @@ extern "C" { #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. + * Identify whether or not a character in the buffer is a non-zero-width whitespace or non-zero-width control (ASCII or UTF-8) character. * * @param state * A state for providing flags and handling interrupts during long running operations. @@ -220,16 +261,20 @@ extern "C" { * * Errors (with error bit) from: f_utf_is_control(). * Errors (with error bit) from: f_utf_is_whitespace(). + * Errors (with error bit) from: f_utf_is_zero_width(). * * @see f_utf_is_control() * @see f_utf_is_whitespace() + * @see f_utf_is_zero_width() */ #ifndef _di_f_fss_is_space_ 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. + * Identify whether or not a character in the buffer is a zero-width (ASCII or UTF-8) character. + * + * The NULL character (U+0000) is a zero-width character. * * @param state * A state for providing flags and handling interrupts during long running operations. @@ -241,13 +286,12 @@ extern "C" { * The header data to populate with results of this function. * * @return - * F_true if the character in the buffer is a space character. - * F_false if the character in the buffer is not a space character. + * F_true if the character in the buffer is a zero-width character. + * F_false if the character in the buffer is not a zero-width character. * * F_parameter (with error bit) if a parameter is invalid. * - * Errors (with error bit) from: f_utf_is_control(). - * Errors (with error bit) from: f_utf_is_whitespace(). + * Errors (with error bit) from: f_utf_is_zero_width(). * * @see f_utf_is_zero_width() */ @@ -258,6 +302,11 @@ extern "C" { /** * Seek until an EOL character is reached. * + * This does not check the character after the EOL is reached. + * The character after an EOL should be checked to see if it is a combining character. + * Combining characters after the EOL effectively make the EOL character a non-standard EOL. + * For most, if not all, FSS standards, a combined EOL is not the same as a standard or normal EOL. + * * @param state * A state for providing flags and handling interrupts during long running operations. * @param buffer @@ -268,6 +317,7 @@ extern "C" { * * @return * F_none on success. + * F_data_not on success but buffer.used is 0, initial range.start is greater than range.stop, or initial range.start is greater than or equal to buffer.used. * F_none_eos on success and EOS was reached. * F_none_stop on success and stop point was reached. * @@ -278,32 +328,6 @@ extern "C" { #endif // _di_f_fss_seek_to_eol_ /** - * Shift all of the delimit placeholders to the end of the used buffer. - * - * 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 - * The string to process. - * This gets updated. - * - * @return - * F_none on success. - * F_none_eos on success and EOS was reached. - * F_none_stop on success and stop point was reached. - * - * F_parameter (with error bit) if a parameter is invalid. - * F_utf_not (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(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 @@ -316,6 +340,7 @@ extern "C" { * * @return * F_none on success. + * F_data_not on success but buffer.used is 0, initial range.start is greater than range.stop, or initial range.start is greater than or equal to buffer.used. * F_none_eos on success and EOS was reached. * F_none_stop on success and stop point was reached. * @@ -326,9 +351,10 @@ extern "C" { #endif // _di_f_fss_skip_past_delimit_ /** - * Skip past all whitespace and control characters, except newline. + * Skip past all white space, control characters, and zero-width characters, except newline '\n' (U+000A). * - * Zero-width characters are not skipped because they might be part of a graph character, such as combining characters. + * If the first character in the given range is a combining character, then because this will not skip past anything. + * This is because combining characters apply from right to left. * * @param state * A state for providing flags and handling interrupts during long running operations. @@ -340,19 +366,22 @@ extern "C" { * * @return * F_none on success. + * F_data_not on success but buffer.used is 0, initial range.start is greater than range.stop, or initial range.start is greater than or equal to buffer.used. * F_none_eol on success and EOL was reached. * F_none_eos on success and EOS was reached. * F_none_stop on success and stop point was reached. * - * F_complete_not_utf (with error bit) if an incomplete UTF-8 fragment was found. * F_complete_not_utf_eos (with error bit) if unable to get entire UTF-8 sequence due to EOS. + * F_complete_not_utf_start (with error bit) if the first character is a combining character. * F_complete_not_utf_stop (with error bit) if unable to get entire UTF-8 sequence due to stop point reached. * F_parameter (with error bit) if a parameter is invalid. * + * Errors (with error bit) from: f_utf_is_combining(). * Errors (with error bit) from: f_utf_is_control(). * Errors (with error bit) from: f_utf_is_whitespace(). * Errors (with error bit) from: f_utf_is_zero_width(). * + * @see f_utf_is_combining() * @see f_utf_is_control() * @see f_utf_is_whitespace() * @see f_utf_is_zero_width() @@ -361,40 +390,6 @@ extern "C" { 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. - * - * @param state - * A state for providing flags and handling interrupts during long running operations. - * @param buffer - * The string to process. - * @param range - * The start and stop positions in the buffer being processed. - * This increments range->start. - * - * @return - * F_none on success. - * F_none_eol on success and EOL was reached. - * F_none_eos on success and EOS was reached. - * F_none_stop on success and stop point was reached. - * - * F_complete_not_utf (with error bit) if an incomplete UTF-8 fragment was found. - * F_complete_not_utf_eos (with error bit) if unable to get entire UTF-8 sequence due to EOS. - * F_complete_not_utf_stop (with error bit) if unable to get entire UTF-8 sequence due to stop point reached. - * F_parameter (with error bit) if a parameter is invalid. - * - * Errors (with error bit) from: f_utf_is_graph(). - * Errors (with error bit) from: f_utf_is_zero_width(). - * - * @see f_utf_is_graph() - * @see f_utf_is_zero_width() - */ -#ifndef _di_f_fss_skip_past_non_graph_ - 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 } // extern "C" #endif diff --git a/level_0/f_fss/c/fss/delimit.h b/level_0/f_fss/c/fss/delimit.h index ee9d09a..fb0a923 100644 --- a/level_0/f_fss/c/fss/delimit.h +++ b/level_0/f_fss/c/fss/delimit.h @@ -22,7 +22,9 @@ extern "C" { #ifndef _di_f_fss_delimit_t_ typedef f_array_length_t f_fss_delimit_t; - #define macro_f_fss_object_t_initialize(length) macro_f_string_range_t_initialize2(length) + #define f_fss_delimit_t_initialize f_array_length_t_initialize + + #define macro_f_fss_delimit_t_initialize(delimit) macro_f_array_length_t_initialize(delimit) #endif // _di_f_fss_delimit_t_ /** diff --git a/level_0/f_fss/c/fss/named.c b/level_0/f_fss/c/fss/named.c index cf5ee1b..c49ed4e 100644 --- a/level_0/f_fss/c/fss/named.c +++ b/level_0/f_fss/c/fss/named.c @@ -21,9 +21,7 @@ extern "C" { if (!named) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (named->objects.size - amount > 0) { return private_f_fss_named_adjust(named->objects.size - amount, named); @@ -39,9 +37,7 @@ extern "C" { if (!named) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (named->objects.size - amount > 0) { return private_f_fss_named_resize(named->objects.size - amount, named); @@ -81,9 +77,7 @@ extern "C" { if (!named) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (named->objects.used + amount > named->objects.size) { if (named->objects.used + amount > F_array_length_t_size_d) { @@ -123,9 +117,7 @@ extern "C" { if (!nameds) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (nameds->size - amount > 0) { return private_f_fss_nameds_adjust(nameds->size - amount, nameds); @@ -141,9 +133,7 @@ extern "C" { if (!nameds) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (nameds->size - amount > 0) { return private_f_fss_nameds_resize(nameds->size - amount, nameds); @@ -183,9 +173,7 @@ extern "C" { if (!nameds) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (nameds->used + amount > nameds->size) { if (nameds->used + amount > F_array_length_t_size_d) { diff --git a/level_0/f_fss/c/fss/nest.c b/level_0/f_fss/c/fss/nest.c index 56e0e0a..34a0d65 100644 --- a/level_0/f_fss/c/fss/nest.c +++ b/level_0/f_fss/c/fss/nest.c @@ -21,9 +21,7 @@ extern "C" { if (!items) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (items->size - amount > 0) { return private_f_fss_items_adjust(items->size - amount, items); @@ -39,9 +37,7 @@ extern "C" { if (!items) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (items->size - amount > 0) { return private_f_fss_items_resize(items->size - amount, items); @@ -81,9 +77,7 @@ extern "C" { if (!items) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (items->used + amount > items->size) { if (items->used + amount > F_array_length_t_size_d) { @@ -123,9 +117,7 @@ extern "C" { if (!nest) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (nest->size - amount > 0) { return private_f_fss_nest_adjust(nest->size - amount, nest); @@ -141,9 +133,7 @@ extern "C" { if (!nest) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (nest->size - amount > 0) { return private_f_fss_nest_resize(nest->size - amount, nest); @@ -183,9 +173,7 @@ extern "C" { if (!nest) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (nest->used + amount > nest->size) { if (nest->used + amount > F_array_length_t_size_d) { @@ -225,9 +213,7 @@ extern "C" { if (!nests) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (nests->size - amount > 0) { return private_f_fss_nests_adjust(nests->size - amount, nests); @@ -243,6 +229,8 @@ extern "C" { if (!nests) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ + if (!amount) return F_data_not; + if (nests->size - amount > 0) { return private_f_fss_nests_resize(nests->size - amount, nests); } @@ -281,9 +269,7 @@ extern "C" { if (!nests) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (nests->used + amount > nests->size) { if (nests->used + amount > F_array_length_t_size_d) { diff --git a/level_0/f_fss/c/fss/set.c b/level_0/f_fss/c/fss/set.c index 65ace05..e783cfe 100644 --- a/level_0/f_fss/c/fss/set.c +++ b/level_0/f_fss/c/fss/set.c @@ -21,9 +21,7 @@ extern "C" { if (!set) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (set->objects.size - amount > 0) { return private_f_fss_set_adjust(set->objects.size - amount, set); @@ -39,9 +37,7 @@ extern "C" { if (!set) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (set->objects.size - amount > 0) { return private_f_fss_set_resize(set->objects.size - amount, set); @@ -81,9 +77,7 @@ extern "C" { if (!set) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (set->objects.used + amount > set->objects.size) { if (set->objects.used + amount > F_array_length_t_size_d) { @@ -123,9 +117,7 @@ extern "C" { if (!set_quote) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (set_quote->objects.size - amount > 0) { return private_f_fss_set_quote_adjust(set_quote->objects.size - amount, set_quote); @@ -141,9 +133,7 @@ extern "C" { if (!set_quote) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (set_quote->objects.size - amount > 0) { return private_f_fss_set_quote_resize(set_quote->objects.size - amount, set_quote); @@ -183,9 +173,7 @@ extern "C" { if (!set_quote) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (set_quote->objects.used + amount > set_quote->objects.size) { if (set_quote->objects.used + amount > F_array_length_t_size_d) { @@ -225,9 +213,7 @@ extern "C" { if (!set_quotes) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (set_quotes->size - amount > 0) { return private_f_fss_set_quotes_adjust(set_quotes->size - amount, set_quotes); @@ -243,9 +229,7 @@ extern "C" { if (!set_quotes) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (set_quotes->size - amount > 0) { return private_f_fss_set_quotes_resize(set_quotes->size - amount, set_quotes); @@ -285,9 +269,7 @@ extern "C" { if (!set_quotes) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (set_quotes->used + amount > set_quotes->size) { if (set_quotes->used + amount > F_array_length_t_size_d) { @@ -327,9 +309,7 @@ extern "C" { if (!sets) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (sets->size - amount > 0) { return private_f_fss_sets_adjust(sets->size - amount, sets); @@ -345,9 +325,7 @@ extern "C" { if (!sets) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (sets->size - amount > 0) { return private_f_fss_sets_resize(sets->size - amount, sets); @@ -387,9 +365,7 @@ extern "C" { if (!sets) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (sets->used + amount > sets->size) { if (sets->used + amount > F_array_length_t_size_d) { diff --git a/level_0/f_iki/c/iki/data.c b/level_0/f_iki/c/iki/data.c index d25f6d3..1a7d68f 100644 --- a/level_0/f_iki/c/iki/data.c +++ b/level_0/f_iki/c/iki/data.c @@ -88,9 +88,7 @@ extern "C" { if (!datas) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (datas->size - amount > 0) { return private_f_iki_datas_adjust(datas->size - amount, datas); @@ -106,9 +104,7 @@ extern "C" { if (!datas) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (datas->size - amount > 0) { return private_f_iki_datas_resize(datas->size - amount, datas); @@ -148,9 +144,7 @@ extern "C" { if (!datas) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (datas->used + amount > datas->size) { if (datas->used + amount > F_array_length_t_size_d) { @@ -243,9 +237,7 @@ extern "C" { if (!datass) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (datass->size - amount > 0) { return private_f_iki_datass_adjust(datass->size - amount, datass); @@ -261,9 +253,7 @@ extern "C" { if (!datass) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (datass->size - amount > 0) { return private_f_iki_datass_resize(datass->size - amount, datass); @@ -303,9 +293,7 @@ extern "C" { if (!datass) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (datass->used + amount > datass->size) { if (datass->used + amount > F_array_length_t_size_d) { diff --git a/level_0/f_limit/c/limit/set.c b/level_0/f_limit/c/limit/set.c index 51e2583..130bb13 100644 --- a/level_0/f_limit/c/limit/set.c +++ b/level_0/f_limit/c/limit/set.c @@ -44,9 +44,7 @@ extern "C" { if (!sets) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (sets->size - amount > 0) { return private_f_limit_sets_adjust(sets->size - amount, sets); @@ -62,9 +60,7 @@ extern "C" { if (!sets) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (sets->size - amount > 0) { return private_f_limit_sets_resize(sets->size - amount, sets); @@ -104,9 +100,7 @@ extern "C" { if (!sets) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (sets->used + amount > sets->size) { if (sets->used + amount > F_array_length_t_size_d) { @@ -199,9 +193,7 @@ extern "C" { if (!setss) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (setss->size - amount > 0) { return private_f_limit_setss_adjust(setss->size - amount, setss); @@ -217,9 +209,7 @@ extern "C" { if (!setss) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (setss->size - amount > 0) { return private_f_limit_setss_resize(setss->size - amount, setss); @@ -259,9 +249,7 @@ extern "C" { if (!setss) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (setss->used + amount > setss->size) { if (setss->used + amount > F_array_length_t_size_d) { diff --git a/level_0/f_limit/c/limit/value.c b/level_0/f_limit/c/limit/value.c index 01aa6ec..9cdde81 100644 --- a/level_0/f_limit/c/limit/value.c +++ b/level_0/f_limit/c/limit/value.c @@ -44,9 +44,7 @@ extern "C" { if (!values) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (values->size - amount > 0) { return private_f_limit_values_adjust(values->size - amount, values); @@ -62,9 +60,7 @@ extern "C" { if (!values) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (values->size - amount > 0) { return private_f_limit_values_resize(values->size - amount, values); @@ -104,9 +100,7 @@ extern "C" { if (!values) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (values->used + amount > values->size) { if (values->used + amount > F_array_length_t_size_d) { @@ -199,9 +193,7 @@ extern "C" { if (!valuess) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (valuess->size - amount > 0) { return private_f_limit_valuess_adjust(valuess->size - amount, valuess); @@ -217,9 +209,7 @@ extern "C" { if (!valuess) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (valuess->size - amount > 0) { return private_f_limit_valuess_resize(valuess->size - amount, valuess); @@ -259,9 +249,7 @@ extern "C" { if (!valuess) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (valuess->used + amount > valuess->size) { if (valuess->used + amount > F_array_length_t_size_d) { diff --git a/level_0/f_status/c/status.h b/level_0/f_status/c/status.h index 3dfe756..9c16238 100644 --- a/level_0/f_status/c/status.h +++ b/level_0/f_status/c/status.h @@ -558,12 +558,14 @@ extern "C" { F_complete_not_utf_eof, F_complete_not_utf_eol, F_complete_not_utf_eos, + F_complete_not_utf_start, F_complete_not_utf_stop, F_none_block, F_none_eoa, F_none_eof, F_none_eol, F_none_eos, + F_none_start, F_none_stop, F_data, F_data_not, @@ -572,6 +574,7 @@ extern "C" { F_data_not_eof, F_data_not_eol, F_data_not_eos, + F_data_not_start, F_data_not_stop, #endif // _di_f_status_buffer_ @@ -589,6 +592,7 @@ extern "C" { F_end_not_group_eof, F_end_not_group_eol, F_end_not_group_eos, + F_end_not_group_start, F_end_not_group_stop, F_end_not_nest, F_end_not_nest_block, @@ -596,7 +600,9 @@ extern "C" { F_end_not_nest_eof, F_end_not_nest_eol, F_end_not_nest_eos, + F_end_not_nest_start, F_end_not_nest_stop, + F_end_not_start, F_end_not_stop, #endif // _di_f_status_end_ diff --git a/level_0/f_thread/c/thread.c b/level_0/f_thread/c/thread.c index a4cc6be..22b0a98 100644 --- a/level_0/f_thread/c/thread.c +++ b/level_0/f_thread/c/thread.c @@ -526,9 +526,7 @@ extern "C" { if (!attributes) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (attributes->size - amount > 0) { return private_f_thread_attributes_resize(attributes->size - amount, attributes); @@ -568,9 +566,7 @@ extern "C" { if (!attributes) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (attributes->used + amount > attributes->size) { if (attributes->used + amount > F_array_length_t_size_d) { @@ -668,9 +664,7 @@ extern "C" { if (!attributes) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (attributes->size - amount > 0) { return private_f_thread_barrier_attributes_adjust(attributes->size - amount, attributes); @@ -686,9 +680,7 @@ extern "C" { if (!attributes) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (attributes->size - amount > 0) { return private_f_thread_barrier_attributes_resize(attributes->size - amount, attributes); @@ -728,9 +720,7 @@ extern "C" { if (!attributes) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (attributes->used + amount > attributes->size) { if (attributes->used + amount > F_array_length_t_size_d) { @@ -812,9 +802,7 @@ extern "C" { if (!barriers) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (barriers->size - amount > 0) { return private_f_thread_barriers_adjust(barriers->size - amount, barriers); @@ -830,9 +818,7 @@ extern "C" { if (!barriers) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (barriers->size - amount > 0) { return private_f_thread_barriers_resize(barriers->size - amount, barriers); @@ -872,9 +858,7 @@ extern "C" { if (!barriers) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (barriers->used + amount > barriers->size) { if (barriers->used + amount > F_array_length_t_size_d) { @@ -1068,9 +1052,7 @@ extern "C" { if (!attributes) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (attributes->size - amount > 0) { return private_f_thread_condition_attributes_adjust(attributes->size - amount, attributes); @@ -1086,9 +1068,7 @@ extern "C" { if (!attributes) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (attributes->size - amount > 0) { return private_f_thread_condition_attributes_resize(attributes->size - amount, attributes); @@ -1128,9 +1108,7 @@ extern "C" { if (!attributes) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (attributes->used + amount > attributes->size) { if (attributes->used + amount > F_array_length_t_size_d) { @@ -1297,9 +1275,7 @@ extern "C" { if (!conditions) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (conditions->size - amount > 0) { return private_f_thread_conditions_resize(conditions->size - amount, conditions); @@ -1339,9 +1315,7 @@ extern "C" { if (!conditions) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (conditions->used + amount > conditions->size) { if (conditions->used + amount > F_array_length_t_size_d) { @@ -1547,9 +1521,7 @@ extern "C" { if (!keys) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (keys->size - amount > 0) { return private_f_thread_keys_adjust(keys->size - amount, keys); @@ -1565,9 +1537,7 @@ extern "C" { if (!keys) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (keys->size - amount > 0) { return private_f_thread_keys_resize(keys->size - amount, keys); @@ -1607,9 +1577,7 @@ extern "C" { if (!keys) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (keys->used + amount > keys->size) { if (keys->used + amount > F_array_length_t_size_d) { @@ -1714,9 +1682,7 @@ extern "C" { if (!attributes) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (attributes->size - amount > 0) { return private_f_thread_lock_attributes_adjust(attributes->size - amount, attributes); @@ -1732,9 +1698,7 @@ extern "C" { if (!attributes) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (attributes->size - amount > 0) { return private_f_thread_lock_attributes_resize(attributes->size - amount, attributes); @@ -1774,9 +1738,7 @@ extern "C" { if (!attributes) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (attributes->used + amount > attributes->size) { if (attributes->used + amount > F_array_length_t_size_d) { @@ -1969,9 +1931,7 @@ extern "C" { if (!locks) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (locks->size - amount > 0) { return private_f_thread_locks_adjust(locks->size - amount, locks); @@ -1987,9 +1947,7 @@ extern "C" { if (!locks) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (locks->size - amount > 0) { return private_f_thread_locks_resize(locks->size - amount, locks); @@ -2029,9 +1987,7 @@ extern "C" { if (!locks) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (locks->used + amount > locks->size) { if (locks->used + amount > F_array_length_t_size_d) { @@ -2248,9 +2204,7 @@ extern "C" { if (!attributes) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (attributes->size - amount > 0) { return private_f_thread_mutex_attributes_adjust(attributes->size - amount, attributes); @@ -2266,9 +2220,7 @@ extern "C" { if (!attributes) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (attributes->size - amount > 0) { return private_f_thread_mutex_attributes_resize(attributes->size - amount, attributes); @@ -2308,9 +2260,7 @@ extern "C" { if (!attributes) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (attributes->used + amount > attributes->size) { if (attributes->used + amount > F_array_length_t_size_d) { @@ -2687,9 +2637,7 @@ extern "C" { if (!mutexs) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (mutexs->size - amount > 0) { return private_f_thread_mutexs_adjust(mutexs->size - amount, mutexs); @@ -2705,9 +2653,7 @@ extern "C" { if (!mutexs) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (mutexs->size - amount > 0) { return private_f_thread_mutexs_resize(mutexs->size - amount, mutexs); @@ -2747,9 +2693,7 @@ extern "C" { if (!mutexs) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (mutexs->used + amount > mutexs->size) { if (mutexs->used + amount > F_array_length_t_size_d) { @@ -2864,9 +2808,7 @@ extern "C" { if (!semaphores) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (semaphores->size - amount > 0) { return private_f_thread_semaphores_adjust(semaphores->size - amount, semaphores); @@ -2882,9 +2824,7 @@ extern "C" { if (!semaphores) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (semaphores->size - amount > 0) { return private_f_thread_semaphores_resize(semaphores->size - amount, semaphores); @@ -2924,9 +2864,7 @@ extern "C" { if (!semaphores) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (semaphores->used + amount > semaphores->size) { if (semaphores->used + amount > F_array_length_t_size_d) { @@ -2966,9 +2904,7 @@ extern "C" { if (!sets) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (sets->size - amount > 0) { return private_f_thread_sets_adjust(sets->size - amount, sets); @@ -2984,9 +2920,7 @@ extern "C" { if (!sets) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (sets->size - amount > 0) { return private_f_thread_sets_resize(sets->size - amount, sets); @@ -3026,9 +2960,7 @@ extern "C" { if (!sets) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (sets->used + amount > sets->size) { if (sets->used + amount > F_array_length_t_size_d) { @@ -3223,9 +3155,7 @@ extern "C" { if (!spins) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (spins->size - amount > 0) { return private_f_thread_spins_adjust(spins->size - amount, spins); @@ -3241,9 +3171,7 @@ extern "C" { if (!spins) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (spins->size - amount > 0) { return private_f_thread_spins_resize(spins->size - amount, spins); @@ -3283,9 +3211,7 @@ extern "C" { if (!spins) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (spins->used + amount > spins->size) { if (spins->used + amount > F_array_length_t_size_d) { diff --git a/level_0/f_type_array/c/type_array/array_length.c b/level_0/f_type_array/c/type_array/array_length.c index 47929ec..455029b 100644 --- a/level_0/f_type_array/c/type_array/array_length.c +++ b/level_0/f_type_array/c/type_array/array_length.c @@ -51,9 +51,7 @@ extern "C" { if (!lengths) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (lengths->size - amount > 0) { return private_f_array_lengths_adjust(lengths->size - amount, lengths); @@ -69,9 +67,7 @@ extern "C" { if (!lengths) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (lengths->size - amount > 0) { return private_f_array_lengths_resize(lengths->size - amount, lengths); @@ -111,9 +107,7 @@ extern "C" { if (!lengths) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (lengths->used + amount > lengths->size) { if (lengths->used + amount > F_array_length_t_size_d) { @@ -206,9 +200,7 @@ extern "C" { if (!lengthss) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (lengthss->size - amount > 0) { return private_f_array_lengthss_adjust(lengthss->size - amount, lengthss); @@ -224,9 +216,7 @@ extern "C" { if (!lengthss) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (lengthss->size - amount > 0) { return private_f_array_lengthss_resize(lengthss->size - amount, lengthss); @@ -266,9 +256,7 @@ extern "C" { if (!lengthss) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (lengthss->used + amount > lengthss->size) { if (lengthss->used + amount > F_array_length_t_size_d) { diff --git a/level_0/f_type_array/c/type_array/cell.c b/level_0/f_type_array/c/type_array/cell.c index 90221be..4eb3503 100644 --- a/level_0/f_type_array/c/type_array/cell.c +++ b/level_0/f_type_array/c/type_array/cell.c @@ -44,9 +44,7 @@ extern "C" { if (!cells) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (cells->size - amount > 0) { return private_f_cells_adjust(cells->size - amount, cells); @@ -62,9 +60,7 @@ extern "C" { if (!cells) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (cells->size - amount > 0) { return private_f_cells_resize(cells->size - amount, cells); @@ -104,9 +100,7 @@ extern "C" { if (!cells) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (cells->used + amount > cells->size) { if (cells->used + amount > F_array_length_t_size_d) { @@ -199,9 +193,7 @@ extern "C" { if (!cellss) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (cellss->size - amount > 0) { return private_f_cellss_adjust(cellss->size - amount, cellss); @@ -217,9 +209,7 @@ extern "C" { if (!cellss) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (cellss->size - amount > 0) { return private_f_cellss_resize(cellss->size - amount, cellss); @@ -259,9 +249,7 @@ extern "C" { if (!cellss) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (cellss->used + amount > cellss->size) { if (cellss->used + amount > F_array_length_t_size_d) { diff --git a/level_0/f_type_array/c/type_array/fll_id.c b/level_0/f_type_array/c/type_array/fll_id.c index b64be65..f122a35 100644 --- a/level_0/f_type_array/c/type_array/fll_id.c +++ b/level_0/f_type_array/c/type_array/fll_id.c @@ -44,9 +44,7 @@ extern "C" { if (!ids) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (ids->size - amount > 0) { return private_f_fll_ids_adjust(ids->size - amount, ids); @@ -62,9 +60,7 @@ extern "C" { if (!ids) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (ids->size - amount > 0) { return private_f_fll_ids_resize(ids->size - amount, ids); @@ -104,9 +100,7 @@ extern "C" { if (!ids) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (ids->used + amount > ids->size) { if (ids->used + amount > F_array_length_t_size_d) { @@ -199,9 +193,7 @@ extern "C" { if (!idss) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (idss->size - amount > 0) { return private_f_fll_idss_adjust(idss->size - amount, idss); @@ -217,9 +209,7 @@ extern "C" { if (!idss) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (idss->size - amount > 0) { return private_f_fll_idss_resize(idss->size - amount, idss); @@ -259,9 +249,7 @@ extern "C" { if (!idss) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (idss->used + amount > idss->size) { if (idss->used + amount > F_array_length_t_size_d) { diff --git a/level_0/f_type_array/c/type_array/int128.c b/level_0/f_type_array/c/type_array/int128.c index 983caee..5d6128d 100644 --- a/level_0/f_type_array/c/type_array/int128.c +++ b/level_0/f_type_array/c/type_array/int128.c @@ -44,9 +44,7 @@ extern "C" { if (!int128s) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (int128s->size - amount > 0) { return private_f_int128s_adjust(int128s->size - amount, int128s); @@ -62,9 +60,7 @@ extern "C" { if (!int128s) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (int128s->size - amount > 0) { return private_f_int128s_resize(int128s->size - amount, int128s); @@ -104,9 +100,7 @@ extern "C" { if (!int128s) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (int128s->used + amount > int128s->size) { if (int128s->used + amount > F_array_length_t_size_d) { @@ -199,9 +193,7 @@ extern "C" { if (!int128ss) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (int128ss->size - amount > 0) { return private_f_int128ss_adjust(int128ss->size - amount, int128ss); @@ -217,9 +209,7 @@ extern "C" { if (!int128ss) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (int128ss->size - amount > 0) { return private_f_int128ss_resize(int128ss->size - amount, int128ss); @@ -259,9 +249,7 @@ extern "C" { if (!int128ss) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (int128ss->used + amount > int128ss->size) { if (int128ss->used + amount > F_array_length_t_size_d) { diff --git a/level_0/f_type_array/c/type_array/int16.c b/level_0/f_type_array/c/type_array/int16.c index 9221c93..f580fd3 100644 --- a/level_0/f_type_array/c/type_array/int16.c +++ b/level_0/f_type_array/c/type_array/int16.c @@ -44,9 +44,7 @@ extern "C" { if (!int16s) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (int16s->size - amount > 0) { return private_f_int16s_adjust(int16s->size - amount, int16s); @@ -62,9 +60,7 @@ extern "C" { if (!int16s) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (int16s->size - amount > 0) { return private_f_int16s_resize(int16s->size - amount, int16s); @@ -104,9 +100,7 @@ extern "C" { if (!int16s) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (int16s->used + amount > int16s->size) { if (int16s->used + amount > F_array_length_t_size_d) { @@ -199,9 +193,7 @@ extern "C" { if (!int16ss) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (int16ss->size - amount > 0) { return private_f_int16ss_adjust(int16ss->size - amount, int16ss); @@ -217,9 +209,7 @@ extern "C" { if (!int16ss) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (int16ss->size - amount > 0) { return private_f_int16ss_resize(int16ss->size - amount, int16ss); @@ -259,9 +249,7 @@ extern "C" { if (!int16ss) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (int16ss->used + amount > int16ss->size) { if (int16ss->used + amount > F_array_length_t_size_d) { diff --git a/level_0/f_type_array/c/type_array/int32.c b/level_0/f_type_array/c/type_array/int32.c index 5425634..aff3139 100644 --- a/level_0/f_type_array/c/type_array/int32.c +++ b/level_0/f_type_array/c/type_array/int32.c @@ -44,9 +44,7 @@ extern "C" { if (!int32s) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (int32s->size - amount > 0) { return private_f_int32s_adjust(int32s->size - amount, int32s); @@ -62,9 +60,7 @@ extern "C" { if (!int32s) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (int32s->size - amount > 0) { return private_f_int32s_resize(int32s->size - amount, int32s); @@ -104,9 +100,7 @@ extern "C" { if (!int32s) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (int32s->used + amount > int32s->size) { if (int32s->used + amount > F_array_length_t_size_d) { @@ -199,9 +193,7 @@ extern "C" { if (!int32ss) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (int32ss->size - amount > 0) { return private_f_int32ss_adjust(int32ss->size - amount, int32ss); @@ -217,9 +209,7 @@ extern "C" { if (!int32ss) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (int32ss->size - amount > 0) { return private_f_int32ss_resize(int32ss->size - amount, int32ss); @@ -259,9 +249,7 @@ extern "C" { if (!int32ss) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (int32ss->used + amount > int32ss->size) { if (int32ss->used + amount > F_array_length_t_size_d) { diff --git a/level_0/f_type_array/c/type_array/int64.c b/level_0/f_type_array/c/type_array/int64.c index 128f61f..d661974 100644 --- a/level_0/f_type_array/c/type_array/int64.c +++ b/level_0/f_type_array/c/type_array/int64.c @@ -44,9 +44,7 @@ extern "C" { if (!int64s) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (int64s->size - amount > 0) { return private_f_int64s_adjust(int64s->size - amount, int64s); @@ -62,9 +60,7 @@ extern "C" { if (!int64s) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (int64s->size - amount > 0) { return private_f_int64s_resize(int64s->size - amount, int64s); @@ -104,9 +100,7 @@ extern "C" { if (!int64s) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (int64s->used + amount > int64s->size) { if (int64s->used + amount > F_array_length_t_size_d) { @@ -199,9 +193,7 @@ extern "C" { if (!int64ss) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (int64ss->size - amount > 0) { return private_f_int64ss_adjust(int64ss->size - amount, int64ss); @@ -217,9 +209,7 @@ extern "C" { if (!int64ss) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (int64ss->size - amount > 0) { return private_f_int64ss_resize(int64ss->size - amount, int64ss); @@ -259,9 +249,7 @@ extern "C" { if (!int64ss) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (int64ss->used + amount > int64ss->size) { if (int64ss->used + amount > F_array_length_t_size_d) { diff --git a/level_0/f_type_array/c/type_array/int8.c b/level_0/f_type_array/c/type_array/int8.c index 055d252..0c3de4a 100644 --- a/level_0/f_type_array/c/type_array/int8.c +++ b/level_0/f_type_array/c/type_array/int8.c @@ -44,9 +44,7 @@ extern "C" { if (!int8s) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (int8s->size - amount > 0) { return private_f_int8s_adjust(int8s->size - amount, int8s); @@ -62,9 +60,7 @@ extern "C" { if (!int8s) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (int8s->size - amount > 0) { return private_f_int8s_resize(int8s->size - amount, int8s); @@ -104,9 +100,7 @@ extern "C" { if (!int8s) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (int8s->used + amount > int8s->size) { if (int8s->used + amount > F_array_length_t_size_d) { @@ -199,9 +193,7 @@ extern "C" { if (!int8ss) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (int8ss->size - amount > 0) { return private_f_int8ss_adjust(int8ss->size - amount, int8ss); @@ -217,9 +209,7 @@ extern "C" { if (!int8ss) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (int8ss->size - amount > 0) { return private_f_int8ss_resize(int8ss->size - amount, int8ss); @@ -259,9 +249,7 @@ extern "C" { if (!int8ss) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (int8ss->used + amount > int8ss->size) { if (int8ss->used + amount > F_array_length_t_size_d) { diff --git a/level_0/f_type_array/c/type_array/state.c b/level_0/f_type_array/c/type_array/state.c index d9efd28..1799314 100644 --- a/level_0/f_type_array/c/type_array/state.c +++ b/level_0/f_type_array/c/type_array/state.c @@ -44,9 +44,7 @@ extern "C" { if (!states) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (states->size - amount > 0) { return private_f_states_adjust(states->size - amount, states); @@ -62,9 +60,7 @@ extern "C" { if (!states) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (states->size - amount > 0) { return private_f_states_resize(states->size - amount, states); @@ -104,9 +100,7 @@ extern "C" { if (!states) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (states->used + amount > states->size) { if (states->used + amount > F_array_length_t_size_d) { @@ -199,9 +193,7 @@ extern "C" { if (!statess) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (statess->size - amount > 0) { return private_f_statess_adjust(statess->size - amount, statess); @@ -217,9 +209,7 @@ extern "C" { if (!statess) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (statess->size - amount > 0) { return private_f_statess_resize(statess->size - amount, statess); @@ -259,9 +249,7 @@ extern "C" { if (!statess) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (statess->used + amount > statess->size) { if (statess->used + amount > F_array_length_t_size_d) { diff --git a/level_0/f_type_array/c/type_array/status.c b/level_0/f_type_array/c/type_array/status.c index b602cbd..cf45bb4 100644 --- a/level_0/f_type_array/c/type_array/status.c +++ b/level_0/f_type_array/c/type_array/status.c @@ -44,9 +44,7 @@ extern "C" { if (!statuss) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (statuss->size - amount > 0) { return private_f_statuss_adjust(statuss->size - amount, statuss); @@ -62,9 +60,7 @@ extern "C" { if (!statuss) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (statuss->size - amount > 0) { return private_f_statuss_resize(statuss->size - amount, statuss); @@ -104,9 +100,7 @@ extern "C" { if (!statuss) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (statuss->used + amount > statuss->size) { if (statuss->used + amount > F_array_length_t_size_d) { @@ -199,9 +193,7 @@ extern "C" { if (!statusss) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (statusss->size - amount > 0) { return private_f_statusss_adjust(statusss->size - amount, statusss); @@ -217,9 +209,7 @@ extern "C" { if (!statusss) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (statusss->size - amount > 0) { return private_f_statusss_resize(statusss->size - amount, statusss); @@ -259,9 +249,7 @@ extern "C" { if (!statusss) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (statusss->used + amount > statusss->size) { if (statusss->used + amount > F_array_length_t_size_d) { diff --git a/level_0/f_type_array/c/type_array/uint128.c b/level_0/f_type_array/c/type_array/uint128.c index 9afaf3c..ed8bfe5 100644 --- a/level_0/f_type_array/c/type_array/uint128.c +++ b/level_0/f_type_array/c/type_array/uint128.c @@ -44,9 +44,7 @@ extern "C" { if (!uint128s) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (uint128s->size - amount > 0) { return private_f_uint128s_adjust(uint128s->size - amount, uint128s); @@ -62,9 +60,7 @@ extern "C" { if (!uint128s) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (uint128s->size - amount > 0) { return private_f_uint128s_resize(uint128s->size - amount, uint128s); @@ -104,9 +100,7 @@ extern "C" { if (!uint128s) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (uint128s->used + amount > uint128s->size) { if (uint128s->used + amount > F_array_length_t_size_d) { @@ -199,9 +193,7 @@ extern "C" { if (!uint128ss) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (uint128ss->size - amount > 0) { return private_f_uint128ss_adjust(uint128ss->size - amount, uint128ss); @@ -217,9 +209,7 @@ extern "C" { if (!uint128ss) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (uint128ss->size - amount > 0) { return private_f_uint128ss_resize(uint128ss->size - amount, uint128ss); @@ -259,9 +249,7 @@ extern "C" { if (!uint128ss) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (uint128ss->used + amount > uint128ss->size) { if (uint128ss->used + amount > F_array_length_t_size_d) { diff --git a/level_0/f_type_array/c/type_array/uint16.c b/level_0/f_type_array/c/type_array/uint16.c index c56edf4..aaf88c1 100644 --- a/level_0/f_type_array/c/type_array/uint16.c +++ b/level_0/f_type_array/c/type_array/uint16.c @@ -44,9 +44,7 @@ extern "C" { if (!uint16s) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (uint16s->size - amount > 0) { return private_f_uint16s_adjust(uint16s->size - amount, uint16s); @@ -62,9 +60,7 @@ extern "C" { if (!uint16s) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (uint16s->size - amount > 0) { return private_f_uint16s_resize(uint16s->size - amount, uint16s); @@ -104,9 +100,7 @@ extern "C" { if (!uint16s) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (uint16s->used + amount > uint16s->size) { if (uint16s->used + amount > F_array_length_t_size_d) { @@ -199,9 +193,7 @@ extern "C" { if (!uint16ss) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (uint16ss->size - amount > 0) { return private_f_uint16ss_adjust(uint16ss->size - amount, uint16ss); @@ -217,9 +209,7 @@ extern "C" { if (!uint16ss) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (uint16ss->size - amount > 0) { return private_f_uint16ss_resize(uint16ss->size - amount, uint16ss); @@ -259,9 +249,7 @@ extern "C" { if (!uint16ss) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (uint16ss->used + amount > uint16ss->size) { if (uint16ss->used + amount > F_array_length_t_size_d) { diff --git a/level_0/f_type_array/c/type_array/uint32.c b/level_0/f_type_array/c/type_array/uint32.c index 4c4e5bf..43eec95 100644 --- a/level_0/f_type_array/c/type_array/uint32.c +++ b/level_0/f_type_array/c/type_array/uint32.c @@ -44,9 +44,7 @@ extern "C" { if (!uint32s) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (uint32s->size - amount > 0) { return private_f_uint32s_adjust(uint32s->size - amount, uint32s); @@ -62,9 +60,7 @@ extern "C" { if (!uint32s) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (uint32s->size - amount > 0) { return private_f_uint32s_resize(uint32s->size - amount, uint32s); @@ -104,9 +100,7 @@ extern "C" { if (!uint32s) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (uint32s->used + amount > uint32s->size) { if (uint32s->used + amount > F_array_length_t_size_d) { @@ -199,9 +193,7 @@ extern "C" { if (!uint32ss) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (uint32ss->size - amount > 0) { return private_f_uint32ss_adjust(uint32ss->size - amount, uint32ss); @@ -217,9 +209,7 @@ extern "C" { if (!uint32ss) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (uint32ss->size - amount > 0) { return private_f_uint32ss_resize(uint32ss->size - amount, uint32ss); @@ -259,9 +249,7 @@ extern "C" { if (!uint32ss) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (uint32ss->used + amount > uint32ss->size) { if (uint32ss->used + amount > F_array_length_t_size_d) { diff --git a/level_0/f_type_array/c/type_array/uint64.c b/level_0/f_type_array/c/type_array/uint64.c index ec8a048..fa08f97 100644 --- a/level_0/f_type_array/c/type_array/uint64.c +++ b/level_0/f_type_array/c/type_array/uint64.c @@ -44,9 +44,7 @@ extern "C" { if (!uint64s) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (uint64s->size - amount > 0) { return private_f_uint64s_adjust(uint64s->size - amount, uint64s); @@ -62,9 +60,7 @@ extern "C" { if (!uint64s) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (uint64s->size - amount > 0) { return private_f_uint64s_resize(uint64s->size - amount, uint64s); @@ -104,9 +100,7 @@ extern "C" { if (!uint64s) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (uint64s->used + amount > uint64s->size) { if (uint64s->used + amount > F_array_length_t_size_d) { @@ -199,9 +193,7 @@ extern "C" { if (!uint64ss) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (uint64ss->size - amount > 0) { return private_f_uint64ss_adjust(uint64ss->size - amount, uint64ss); @@ -217,9 +209,7 @@ extern "C" { if (!uint64ss) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (uint64ss->size - amount > 0) { return private_f_uint64ss_resize(uint64ss->size - amount, uint64ss); @@ -259,9 +249,7 @@ extern "C" { if (!uint64ss) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (uint64ss->used + amount > uint64ss->size) { if (uint64ss->used + amount > F_array_length_t_size_d) { diff --git a/level_0/f_type_array/c/type_array/uint8.c b/level_0/f_type_array/c/type_array/uint8.c index eaa88d8..0a62f8b 100644 --- a/level_0/f_type_array/c/type_array/uint8.c +++ b/level_0/f_type_array/c/type_array/uint8.c @@ -44,9 +44,7 @@ extern "C" { if (!uint8s) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (uint8s->size - amount > 0) { return private_f_uint8s_adjust(uint8s->size - amount, uint8s); @@ -62,9 +60,7 @@ extern "C" { if (!uint8s) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (uint8s->size - amount > 0) { return private_f_uint8s_resize(uint8s->size - amount, uint8s); @@ -104,9 +100,7 @@ extern "C" { if (!uint8s) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (uint8s->used + amount > uint8s->size) { if (uint8s->used + amount > F_array_length_t_size_d) { @@ -199,9 +193,7 @@ extern "C" { if (!uint8ss) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (uint8ss->size - amount > 0) { return private_f_uint8ss_adjust(uint8ss->size - amount, uint8ss); @@ -217,9 +209,7 @@ extern "C" { if (!uint8ss) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (uint8ss->size - amount > 0) { return private_f_uint8ss_resize(uint8ss->size - amount, uint8ss); @@ -259,9 +249,7 @@ extern "C" { if (!uint8ss) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!amount) { - return F_data_not; - } + if (!amount) return F_data_not; if (uint8ss->used + amount > uint8ss->size) { if (uint8ss->used + amount > F_array_length_t_size_d) { diff --git a/level_0/f_utf/c/private-utf.c b/level_0/f_utf/c/private-utf.c index 1e26234..1323233 100644 --- a/level_0/f_utf/c/private-utf.c +++ b/level_0/f_utf/c/private-utf.c @@ -6,7 +6,7 @@ extern "C" { #endif -#if !defined(_di_f_utf_char_to_character_) || !defined(_di_f_utf_is_alphabeticbetic_) || !defined(_di_f_utf_is_alphabeticbetic_digit_) || !defined(_di_f_utf_is_alphabeticbetic_numeric_) || !defined(_di_f_utf_is_ascii_) || !defined(_di_f_utf_is_combining_) || !defined(_di_f_utf_is_control_) || !defined(_di_f_utf_is_control_picture_) || !defined(_di_f_utf_is_digit_) || !defined(_di_f_utf_is_emoji_) || !defined(_di_f_utf_is_graph_) || !defined(_di_f_utf_is_numeric_) || !defined(_di_f_utf_is_phonetic_) || !defined(_di_f_utf_is_private_) || !defined(_di_f_utf_is_punctuation_) || !defined(_di_f_utf_is_surrogate_) || !defined(_di_f_utf_is_symbol_) || !defined(_di_f_utf_is_unassigned_) || !defined(_di_f_utf_is_valid_) || !defined(_di_f_utf_is_whitespace_) || !defined(_di_f_utf_is_whitespace_modifier_) || !defined(_di_f_utf_is_whitespace_other_) || !defined(_di_f_utf_is_wide_) || !defined(_di_f_utf_is_word_) || !defined(_di_f_utf_is_word_dash_) || !defined(_di_f_utf_is_word_dash_plus_) || !defined(_di_f_utf_is_zero_width_) || !defined(f_utf_unicode_to) +#if !defined(_di_f_utf_char_to_character_) || !defined(_di_f_utf_is_alphabetic_) || !defined(_di_f_utf_is_alphabetic_digit_) || !defined(_di_f_utf_is_alphabetic_numeric_) || !defined(_di_f_utf_is_ascii_) || !defined(_di_f_utf_is_combining_) || !defined(_di_f_utf_is_control_) || !defined(_di_f_utf_is_control_picture_) || !defined(_di_f_utf_is_digit_) || !defined(_di_f_utf_is_emoji_) || !defined(_di_f_utf_is_graph_) || !defined(_di_f_utf_is_numeric_) || !defined(_di_f_utf_is_phonetic_) || !defined(_di_f_utf_is_private_) || !defined(_di_f_utf_is_punctuation_) || !defined(_di_f_utf_is_surrogate_) || !defined(_di_f_utf_is_symbol_) || !defined(_di_f_utf_is_unassigned_) || !defined(_di_f_utf_is_valid_) || !defined(_di_f_utf_is_whitespace_) || !defined(_di_f_utf_is_whitespace_modifier_) || !defined(_di_f_utf_is_whitespace_other_) || !defined(_di_f_utf_is_wide_) || !defined(_di_f_utf_is_word_) || !defined(_di_f_utf_is_word_dash_) || !defined(_di_f_utf_is_word_dash_plus_) || !defined(_di_f_utf_is_zero_width_) || !defined(f_utf_unicode_to) f_status_t private_f_utf_char_to_character(const f_string_t character, const f_array_length_t width_max, f_utf_char_t *character_utf) { if (!macro_f_utf_byte_width_is(*character)) { @@ -45,7 +45,7 @@ extern "C" { return F_none; } -#endif // !defined(_di_f_utf_char_to_character_) || !defined(_di_f_utf_is_alphabeticbetic_) || !defined(_di_f_utf_is_alphabeticbetic_digit_) || !defined(_di_f_utf_is_alphabeticbetic_numeric_) || !defined(_di_f_utf_is_ascii_) || !defined(_di_f_utf_is_combining_) || !defined(_di_f_utf_is_control_) || !defined(_di_f_utf_is_control_picture_) || !defined(_di_f_utf_is_digit_) || !defined(_di_f_utf_is_emoji_) || !defined(_di_f_utf_is_graph_) || !defined(_di_f_utf_is_numeric_) || !defined(_di_f_utf_is_phonetic_) || !defined(_di_f_utf_is_private_) || !defined(_di_f_utf_is_punctuation_) || !defined(_di_f_utf_is_surrogate_) || !defined(_di_f_utf_is_symbol_) || !defined(_di_f_utf_is_unassigned_) || !defined(_di_f_utf_is_valid_) || !defined(_di_f_utf_is_whitespace_) || !defined(_di_f_utf_is_whitespace_modifier_) || !defined(_di_f_utf_is_whitespace_other_) || !defined(_di_f_utf_is_wide_) || !defined(_di_f_utf_is_word_) || !defined(_di_f_utf_is_word_dash_) || !defined(_di_f_utf_is_word_dash_plus_) || !defined(_di_f_utf_is_zero_width_) || !defined(f_utf_unicode_to) +#endif // !defined(_di_f_utf_char_to_character_) || !defined(_di_f_utf_is_alphabetic_) || !defined(_di_f_utf_is_alphabetic_digit_) || !defined(_di_f_utf_is_alphabetic_numeric_) || !defined(_di_f_utf_is_ascii_) || !defined(_di_f_utf_is_combining_) || !defined(_di_f_utf_is_control_) || !defined(_di_f_utf_is_control_picture_) || !defined(_di_f_utf_is_digit_) || !defined(_di_f_utf_is_emoji_) || !defined(_di_f_utf_is_graph_) || !defined(_di_f_utf_is_numeric_) || !defined(_di_f_utf_is_phonetic_) || !defined(_di_f_utf_is_private_) || !defined(_di_f_utf_is_punctuation_) || !defined(_di_f_utf_is_surrogate_) || !defined(_di_f_utf_is_symbol_) || !defined(_di_f_utf_is_unassigned_) || !defined(_di_f_utf_is_valid_) || !defined(_di_f_utf_is_whitespace_) || !defined(_di_f_utf_is_whitespace_modifier_) || !defined(_di_f_utf_is_whitespace_other_) || !defined(_di_f_utf_is_wide_) || !defined(_di_f_utf_is_word_) || !defined(_di_f_utf_is_word_dash_) || !defined(_di_f_utf_is_word_dash_plus_) || !defined(_di_f_utf_is_zero_width_) || !defined(f_utf_unicode_to) #if !defined(_di_f_utf_unicode_to_) || !defined(_di_f_utf_character_unicode_to_) f_status_t private_f_utf_character_unicode_to(const f_utf_char_t character, uint32_t *unicode) { diff --git a/level_0/f_utf/c/private-utf.h b/level_0/f_utf/c/private-utf.h index bede5bd..c68a677 100644 --- a/level_0/f_utf/c/private-utf.h +++ b/level_0/f_utf/c/private-utf.h @@ -44,8 +44,8 @@ extern "C" { * @see f_utf_character_is_valid() * @see f_utf_is_valid() * @see f_utf_is_alphabetic() - * @see f_utf_is_alphabeticbetic_digit() - * @see f_utf_is_alphabeticbetic_numeric() + * @see f_utf_is_alphabetic_digit() + * @see f_utf_is_alphabetic_numeric() * @see f_utf_is_ascii() * @see f_utf_is_combining() * @see f_utf_is_control() @@ -71,9 +71,9 @@ extern "C" { * @see f_utf_is_zero_width() * @see f_utf_unicode_to() */ -#if !defined(_di_f_utf_char_to_character_) || !defined(_di_f_utf_is_alphabeticbetic_) || !defined(_di_f_utf_is_alphabeticbetic_digit_) || !defined(_di_f_utf_is_alphabeticbetic_numeric_) || !defined(_di_f_utf_is_ascii_) || !defined(_di_f_utf_is_combining_) || !defined(_di_f_utf_is_control_) || !defined(_di_f_utf_is_control_picture_) || !defined(_di_f_utf_is_digit_) || !defined(_di_f_utf_is_emoji_) || !defined(_di_f_utf_is_graph_) || !defined(_di_f_utf_is_numeric_) || !defined(_di_f_utf_is_phonetic_) || !defined(_di_f_utf_is_private_) || !defined(_di_f_utf_is_punctuation_) || !defined(_di_f_utf_is_surrogate_) || !defined(_di_f_utf_is_symbol_) || !defined(_di_f_utf_is_unassigned_) || !defined(_di_f_utf_is_valid_) || !defined(_di_f_utf_is_whitespace_) || !defined(_di_f_utf_is_whitespace_modifier_) || !defined(_di_f_utf_is_whitespace_other_) || !defined(_di_f_utf_is_wide_) || !defined(_di_f_utf_is_word_) || !defined(_di_f_utf_is_word_dash_) || !defined(_di_f_utf_is_word_dash_plus_) || !defined(_di_f_utf_is_zero_width_) || !defined(f_utf_unicode_to) +#if !defined(_di_f_utf_char_to_character_) || !defined(_di_f_utf_is_alphabetic_) || !defined(_di_f_utf_is_alphabetic_digit_) || !defined(_di_f_utf_is_alphabetic_numeric_) || !defined(_di_f_utf_is_ascii_) || !defined(_di_f_utf_is_combining_) || !defined(_di_f_utf_is_control_) || !defined(_di_f_utf_is_control_picture_) || !defined(_di_f_utf_is_digit_) || !defined(_di_f_utf_is_emoji_) || !defined(_di_f_utf_is_graph_) || !defined(_di_f_utf_is_numeric_) || !defined(_di_f_utf_is_phonetic_) || !defined(_di_f_utf_is_private_) || !defined(_di_f_utf_is_punctuation_) || !defined(_di_f_utf_is_surrogate_) || !defined(_di_f_utf_is_symbol_) || !defined(_di_f_utf_is_unassigned_) || !defined(_di_f_utf_is_valid_) || !defined(_di_f_utf_is_whitespace_) || !defined(_di_f_utf_is_whitespace_modifier_) || !defined(_di_f_utf_is_whitespace_other_) || !defined(_di_f_utf_is_wide_) || !defined(_di_f_utf_is_word_) || !defined(_di_f_utf_is_word_dash_) || !defined(_di_f_utf_is_word_dash_plus_) || !defined(_di_f_utf_is_zero_width_) || !defined(f_utf_unicode_to) extern f_status_t private_f_utf_char_to_character(const f_string_t character, const f_array_length_t width_max, f_utf_char_t *character_utf) F_attribute_visibility_internal_d; -#endif // !defined(_di_f_utf_char_to_character_) || !defined(_di_f_utf_is_alphabeticbetic_) || !defined(_di_f_utf_is_alphabeticbetic_digit_) || !defined(_di_f_utf_is_alphabeticbetic_numeric_) || !defined(_di_f_utf_is_ascii_) || !defined(_di_f_utf_is_combining_) || !defined(_di_f_utf_is_control_) || !defined(_di_f_utf_is_control_picture_) || !defined(_di_f_utf_is_digit_) || !defined(_di_f_utf_is_emoji_) || !defined(_di_f_utf_is_graph_) || !defined(_di_f_utf_is_numeric_) || !defined(_di_f_utf_is_phonetic_) || !defined(_di_f_utf_is_private_) || !defined(_di_f_utf_is_punctuation_) || !defined(_di_f_utf_is_surrogate_) || !defined(_di_f_utf_is_symbol_) || !defined(_di_f_utf_is_unassigned_) || !defined(_di_f_utf_is_valid_) || !defined(_di_f_utf_is_whitespace_) || !defined(_di_f_utf_is_whitespace_modifier_) || !defined(_di_f_utf_is_whitespace_other_) || !defined(_di_f_utf_is_wide_) || !defined(_di_f_utf_is_word_) || !defined(_di_f_utf_is_word_dash_) || !defined(_di_f_utf_is_word_dash_plus_) || !defined(_di_f_utf_is_zero_width_) || !defined(f_utf_unicode_to) +#endif // !defined(_di_f_utf_char_to_character_) || !defined(_di_f_utf_is_alphabetic_) || !defined(_di_f_utf_is_alphabetic_digit_) || !defined(_di_f_utf_is_alphabetic_numeric_) || !defined(_di_f_utf_is_ascii_) || !defined(_di_f_utf_is_combining_) || !defined(_di_f_utf_is_control_) || !defined(_di_f_utf_is_control_picture_) || !defined(_di_f_utf_is_digit_) || !defined(_di_f_utf_is_emoji_) || !defined(_di_f_utf_is_graph_) || !defined(_di_f_utf_is_numeric_) || !defined(_di_f_utf_is_phonetic_) || !defined(_di_f_utf_is_private_) || !defined(_di_f_utf_is_punctuation_) || !defined(_di_f_utf_is_surrogate_) || !defined(_di_f_utf_is_symbol_) || !defined(_di_f_utf_is_unassigned_) || !defined(_di_f_utf_is_valid_) || !defined(_di_f_utf_is_whitespace_) || !defined(_di_f_utf_is_whitespace_modifier_) || !defined(_di_f_utf_is_whitespace_other_) || !defined(_di_f_utf_is_wide_) || !defined(_di_f_utf_is_word_) || !defined(_di_f_utf_is_word_dash_) || !defined(_di_f_utf_is_word_dash_plus_) || !defined(_di_f_utf_is_zero_width_) || !defined(f_utf_unicode_to) /** * Private implementation of f_utf_character_is_zero_width(). diff --git a/level_0/f_utf/c/private-utf_alphabetic.c b/level_0/f_utf/c/private-utf_alphabetic.c index 8905b54..a2382eb 100644 --- a/level_0/f_utf/c/private-utf_alphabetic.c +++ b/level_0/f_utf/c/private-utf_alphabetic.c @@ -15,7 +15,7 @@ extern "C" { #endif -#if !defined(_di_f_utf_character_is_alphabetic_) || !defined(_di_f_utf_is_alphabeticbetic_) +#if !defined(_di_f_utf_character_is_alphabetic_) || !defined(_di_f_utf_is_alphabetic_) f_status_t private_f_utf_character_is_alphabetic(const f_utf_char_t character) { if (private_f_utf_character_is_zero_width(character)) { @@ -61,9 +61,9 @@ extern "C" { return F_true; } -#endif // !defined(_di_f_utf_character_is_alphabetic_) || !defined(_di_f_utf_is_alphabeticbetic_) +#endif // !defined(_di_f_utf_character_is_alphabetic_) || !defined(_di_f_utf_is_alphabetic_) -#if !defined(_di_f_utf_character_is_alphabetic_digit_) || !defined(_di_f_utf_is_alphabeticbetic_digit_) +#if !defined(_di_f_utf_character_is_alphabetic_digit_) || !defined(_di_f_utf_is_alphabetic_digit_) f_status_t private_f_utf_character_is_alphabetic_digit(const f_utf_char_t character) { if (private_f_utf_character_is_digit(character)) { @@ -109,9 +109,9 @@ extern "C" { return F_false; } -#endif // !defined(_di_f_utf_character_is_alphabetic_digit_) || !defined(_di_f_utf_is_alphabeticbetic_digit_) +#endif // !defined(_di_f_utf_character_is_alphabetic_digit_) || !defined(_di_f_utf_is_alphabetic_digit_) -#if !defined(_di_f_utf_character_is_alphabetic_numeric_) || !defined(_di_f_utf_is_alphabeticbetic_numeric_) +#if !defined(_di_f_utf_character_is_alphabetic_numeric_) || !defined(_di_f_utf_is_alphabetic_numeric_) f_status_t private_f_utf_character_is_alphabetic_numeric(const f_utf_char_t character) { if (private_f_utf_character_is_numeric(character)) { @@ -153,7 +153,7 @@ extern "C" { return F_false; } -#endif // !defined(_di_f_utf_character_is_alphabetic_numeric_) || !defined(_di_f_utf_is_alphabeticbetic_numeric_) +#endif // !defined(_di_f_utf_character_is_alphabetic_numeric_) || !defined(_di_f_utf_is_alphabetic_numeric_) #ifdef __cplusplus } // extern "C" diff --git a/level_0/f_utf/c/private-utf_alphabetic.h b/level_0/f_utf/c/private-utf_alphabetic.h index b4dcc35..df694eb 100644 --- a/level_0/f_utf/c/private-utf_alphabetic.h +++ b/level_0/f_utf/c/private-utf_alphabetic.h @@ -18,7 +18,7 @@ extern "C" { #endif /** - * Private implementation of f_utf_character_is_alpha(). + * Private implementation of f_utf_character_is_alphabetic(). * * Intended to be shared to each of the different implementation variations. * @@ -34,12 +34,12 @@ extern "C" { * F_utf_fragment (with error bit) if character is a UTF-8 fragment. * F_utf_not (with error bit) if unicode is an invalid Unicode character. * - * @see f_utf_character_is_alpha() + * @see f_utf_character_is_alphabetic() * @see f_utf_is_alphabetic() */ -#if !defined(_di_f_utf_character_is_alphabetic_) || !defined(_di_f_utf_is_alphabeticbetic_) +#if !defined(_di_f_utf_character_is_alphabetic_) || !defined(_di_f_utf_is_alphabetic_) extern f_status_t private_f_utf_character_is_alphabetic(const f_utf_char_t character) F_attribute_visibility_internal_d; -#endif // !defined(_di_f_utf_character_is_alphabetic_) || !defined(_di_f_utf_is_alphabeticbetic_) +#endif // !defined(_di_f_utf_character_is_alphabetic_) || !defined(_di_f_utf_is_alphabetic_) /** * Private implementation of f_utf_character_is_alphabetic_digit(). @@ -59,11 +59,11 @@ extern "C" { * F_utf_not (with error bit) if unicode is an invalid Unicode character. * * @see f_utf_character_is_alphabetic_digit() - * @see f_utf_is_alphabeticbetic_digit() + * @see f_utf_is_alphabetic_digit() */ -#if !defined(_di_f_utf_character_is_alphabetic_digit_) || !defined(_di_f_utf_is_alphabeticbetic_digit_) +#if !defined(_di_f_utf_character_is_alphabetic_digit_) || !defined(_di_f_utf_is_alphabetic_digit_) extern f_status_t private_f_utf_character_is_alphabetic_digit(const f_utf_char_t character) F_attribute_visibility_internal_d; -#endif // !defined(_di_f_utf_character_is_alphabetic_digit_) || !defined(_di_f_utf_is_alphabeticbetic_digit_) +#endif // !defined(_di_f_utf_character_is_alphabetic_digit_) || !defined(_di_f_utf_is_alphabetic_digit_) /** * Private implementation of f_utf_character_is_alphabetic_numeric(). @@ -83,11 +83,11 @@ extern "C" { * F_utf_not (with error bit) if unicode is an invalid Unicode character. * * @see f_utf_character_is_alphabetic_numeric() - * @see f_utf_is_alphabeticbetic_numeric() + * @see f_utf_is_alphabetic_numeric() */ -#if !defined(_di_f_utf_character_is_alphabetic_numeric_) || !defined(_di_f_utf_is_alphabeticbetic_numeric_) +#if !defined(_di_f_utf_character_is_alphabetic_numeric_) || !defined(_di_f_utf_is_alphabetic_numeric_) extern f_status_t private_f_utf_character_is_alphabetic_numeric(const f_utf_char_t character) F_attribute_visibility_internal_d; -#endif // !defined(_di_f_utf_character_is_alphabetic_numeric_) || !defined(_di_f_utf_is_alphabeticbetic_numeric_) +#endif // !defined(_di_f_utf_character_is_alphabetic_numeric_) || !defined(_di_f_utf_is_alphabetic_numeric_) #ifdef __cplusplus } // extern "C" diff --git a/level_0/f_utf/c/utf/is.c b/level_0/f_utf/c/utf/is.c index eda7421..adb3766 100644 --- a/level_0/f_utf/c/utf/is.c +++ b/level_0/f_utf/c/utf/is.c @@ -31,7 +31,7 @@ extern "C" { } #endif // _di_f_utf_is_ -#ifndef _di_f_utf_is_alphabeticbetic_ +#ifndef _di_f_utf_is_alphabetic_ f_status_t f_utf_is_alphabetic(const f_string_t character, const f_array_length_t width_max) { #ifndef _di_level_0_parameter_checking_ if (width_max < 1) return F_status_set_error(F_parameter); @@ -62,10 +62,10 @@ extern "C" { return F_false; } -#endif // _di_f_utf_is_alphabeticbetic_ +#endif // _di_f_utf_is_alphabetic_ -#ifndef _di_f_utf_is_alphabeticbetic_digit_ - f_status_t f_utf_is_alphabeticbetic_digit(const f_string_t character, const f_array_length_t width_max) { +#ifndef _di_f_utf_is_alphabetic_digit_ + f_status_t f_utf_is_alphabetic_digit(const f_string_t character, const f_array_length_t width_max) { #ifndef _di_level_0_parameter_checking_ if (width_max < 1) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ @@ -95,10 +95,10 @@ extern "C" { return F_false; } -#endif // _di_f_utf_is_alphabeticbetic_digit_ +#endif // _di_f_utf_is_alphabetic_digit_ -#ifndef _di_f_utf_is_alphabeticbetic_numeric_ - f_status_t f_utf_is_alphabeticbetic_numeric(const f_string_t character, const f_array_length_t width_max) { +#ifndef _di_f_utf_is_alphabetic_numeric_ + f_status_t f_utf_is_alphabetic_numeric(const f_string_t character, const f_array_length_t width_max) { #ifndef _di_level_0_parameter_checking_ if (width_max < 1) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ @@ -128,7 +128,7 @@ extern "C" { return F_false; } -#endif // _di_f_utf_is_alphabeticbetic_numeric_ +#endif // _di_f_utf_is_alphabetic_numeric_ #ifndef _di_f_utf_is_ascii_ f_status_t f_utf_is_ascii(const f_string_t character, const f_array_length_t width_max) { diff --git a/level_0/f_utf/c/utf/is.h b/level_0/f_utf/c/utf/is.h index ebfec66..9968eb9 100644 --- a/level_0/f_utf/c/utf/is.h +++ b/level_0/f_utf/c/utf/is.h @@ -53,9 +53,9 @@ extern "C" { * * @see isalpha() */ -#ifndef _di_f_utf_is_alphabeticbetic_ +#ifndef _di_f_utf_is_alphabetic_ extern f_status_t f_utf_is_alphabetic(const f_string_t character, const f_array_length_t width_max); -#endif // _di_f_utf_is_alphabeticbetic_ +#endif // _di_f_utf_is_alphabetic_ /** * Check to see if the entire byte block of the character is an ASCII or UTF-8 alphabet or digit character. @@ -81,9 +81,9 @@ extern "C" { * * @see isalnum() */ -#ifndef _di_f_utf_is_alphabeticbetic_digit_ - extern f_status_t f_utf_is_alphabeticbetic_digit(const f_string_t character, const f_array_length_t width_max); -#endif // _di_f_utf_is_alphabeticbetic_digit_ +#ifndef _di_f_utf_is_alphabetic_digit_ + extern f_status_t f_utf_is_alphabetic_digit(const f_string_t character, const f_array_length_t width_max); +#endif // _di_f_utf_is_alphabetic_digit_ /** * Check to see if the entire byte block of the character is an ASCII or UTF-8 alphabet or numeric character. @@ -107,9 +107,9 @@ extern "C" { * * @see isalnum() */ -#ifndef _di_f_utf_is_alphabeticbetic_numeric_ - extern f_status_t f_utf_is_alphabeticbetic_numeric(const f_string_t character, const f_array_length_t width_max); -#endif // _di_f_utf_is_alphabeticbetic_numeric_ +#ifndef _di_f_utf_is_alphabetic_numeric_ + extern f_status_t f_utf_is_alphabetic_numeric(const f_string_t character, const f_array_length_t width_max); +#endif // _di_f_utf_is_alphabetic_numeric_ /** * Check to see if the entire byte block of the character is an ASCII character. @@ -593,13 +593,13 @@ extern "C" { /** * Check to see if the entire byte block of the character is an ASCII or UTF-8 general space character. * - * Non-printing or zero-width characters are not considered whitespace. - * This does include line separators like '\n'. - * This does not include phonetic spaces, like whitespace modifiers. - * This does not include non-true whitespace characters, such as Ogham Space Mark ( ). + * Non-printing or zero-width characters are not considered white space. + * This does include line separators like '\n' (U+000A). + * This does not include phonetic spaces, like white space modifiers. + * This does not include non-true white space characters, such as Ogham Space Mark ' ' (U+1680). * - * Phonetic spaces are whitespaces with additional phonetic meaning associated with them. - * However, because they are not renderred as whitespace, they are technically not white space. + * Phonetic spaces are white spaces with additional phonetic meaning associated with them. + * However, because they are not renderred as white space, they are technically not white space. * * @param character * The character to validate. @@ -609,11 +609,11 @@ extern "C" { * Can be anything greater than 0. * * @return - * F_true if a UTF-8 whitespace. - * F_false if not a UTF-8 whitespace. + * F_true if a UTF-8 white space. + * F_false if not a UTF-8 white space. * * F_complete_not_utf (with error bit set) if character is an incomplete UTF-8 sequence. - * F_maybe (with error bit) if this could be a whitespace but width is not long enough. + * F_maybe (with error bit) if this could be a white space but width is not long enough. * F_parameter (with error bit) if a parameter is invalid. * F_utf_fragment (with error bit) if character is a UTF-8 fragment. * F_utf_not (with error bit) if Unicode is an invalid Unicode character. @@ -625,12 +625,12 @@ extern "C" { #endif // _di_f_utf_is_whitespace_ /** - * Check to see if the entire byte block of the character is a UTF-8 whitespace modifier character. + * Check to see if the entire byte block of the character is a UTF-8 white space modifier character. * * These are phonetic spaces. * * Phonetic spaces are whitespaces with additional phonetic meaning associated with them. - * Therefore, these are valid spaces in the technical sense, even if they are not visibly whitespace. + * Therefore, these are valid spaces in the technical sense, even if they are not visibly white space. * * @param character * The character to validate. @@ -640,11 +640,11 @@ extern "C" { * Can be anything greater than 0. * * @return - * F_true if a UTF-8 whitespace. - * F_false if not a UTF-8 whitespace. + * F_true if a UTF-8 white space. + * F_false if not a UTF-8 white space. * * F_complete_not_utf (with error bit set) if character is an incomplete UTF-8 sequence. - * F_maybe (with error bit) if this could be a whitespace but width is not long enough. + * F_maybe (with error bit) if this could be a white space but width is not long enough. * F_parameter (with error bit) if a parameter is invalid. * F_utf_fragment (with error bit) if character is a UTF-8 fragment. * F_utf_not (with error bit) if Unicode is an invalid Unicode character. @@ -656,7 +656,7 @@ extern "C" { /** * Check to see if the entire byte block of the character is an other type of UTF-8 space character. * - * This is a list of whitespace that are not actual whitespace (because they are graph characters) but are considered whitespace, such as Ogham Space Mark ( ). + * This is a list of white space that are not actual white space (because they are graph characters) but are considered white space, such as Ogham Space Mark ' ' (U+1680). * * @param character * The character to validate. @@ -666,11 +666,11 @@ extern "C" { * Can be anything greater than 0. * * @return - * F_true if a UTF-8 whitespace. - * F_false if not a UTF-8 whitespace. + * F_true if a UTF-8 white space. + * F_false if not a UTF-8 white space. * * F_complete_not_utf (with error bit set) if character is an incomplete UTF-8 sequence. - * F_maybe (with error bit) if this could be a whitespace but width is not long enough. + * F_maybe (with error bit) if this could be a white space but width is not long enough. * F_parameter (with error bit) if a parameter is invalid. * F_utf_fragment (with error bit) if character is a UTF-8 fragment. * F_utf_not (with error bit) if Unicode is an invalid Unicode character. @@ -822,11 +822,11 @@ extern "C" { * Can be anything greater than 0. * * @return - * F_true if a UTF-8 whitespace. - * F_false if not a UTF-8 whitespace. + * F_true if a UTF-8 white space. + * F_false if not a UTF-8 white space. * * F_complete_not_utf (with error bit set) if character is an incomplete UTF-8 sequence. - * F_maybe (with error bit) if this could be a whitespace but width is not long enough. + * F_maybe (with error bit) if this could be a white space but width is not long enough. * F_parameter (with error bit) if a parameter is invalid. * F_utf_fragment (with error bit) if character is a UTF-8 fragment. * F_utf_not (with error bit) if Unicode is an invalid Unicode character. diff --git a/level_0/f_utf/c/utf/is_character.c b/level_0/f_utf/c/utf/is_character.c index 744ca94..44e9c1b 100644 --- a/level_0/f_utf/c/utf/is_character.c +++ b/level_0/f_utf/c/utf/is_character.c @@ -40,7 +40,7 @@ extern "C" { #endif // _di_f_utf_character_is_ #ifndef _di_f_utf_character_is_alphabetic_ - f_status_t f_utf_character_is_alpha(const f_utf_char_t character) { + f_status_t f_utf_character_is_alphabetic(const f_utf_char_t character) { if (macro_f_utf_char_t_width_is(character)) { if (macro_f_utf_char_t_width_is(character) == 1) { diff --git a/level_0/f_utf/c/utf/is_character.h b/level_0/f_utf/c/utf/is_character.h index 50be205..fcfd289 100644 --- a/level_0/f_utf/c/utf/is_character.h +++ b/level_0/f_utf/c/utf/is_character.h @@ -51,7 +51,7 @@ extern "C" { * @see isalpha() */ #ifndef _di_f_utf_character_is_alphabetic_ - extern f_status_t f_utf_character_is_alpha(const f_utf_char_t character); + extern f_status_t f_utf_character_is_alphabetic(const f_utf_char_t character); #endif // _di_f_utf_character_is_alphabetic_ /** @@ -489,20 +489,20 @@ extern "C" { /** * Check to see if the entire byte block of the character is an ASCII or UTF-8 general space character. * - * Non-printing or zero-width characters are not considered whitespace. - * This does include line separators like '\n'. - * This does not include phonetic spaces, like whitespace modifiers. - * This does not include non-true whitespace characters, such as Ogham Space Mark ( ). + * Non-printing or zero-width characters are not considered white space. + * This does include line separators like '\n' (U+000A). + * This does not include phonetic spaces, like white space modifiers. + * This does not include non-true white space characters, such as Ogham Space Mark ' ' (U+1680). * * Phonetic spaces are whitespaces with additional phonetic meaning associated with them. - * However, because they are not renderred as whitespace, they are technically not white space. + * However, because they are not renderred as white space, they are technically not white space. * * @param character * The character to validate. * * @return - * F_true if a UTF-8 whitespace. - * F_false if not a UTF-8 whitespace. + * F_true if a UTF-8 white space. + * F_false if not a UTF-8 white space. * * F_utf_fragment (with error bit) if character is a UTF-8 fragment. * F_utf_not (with error bit) if unicode is an invalid Unicode character. @@ -514,12 +514,12 @@ extern "C" { #endif // _di_f_utf_character_is_whitespace_ /** - * Check to see if the entire byte block of the character is an ASCII or UTF-8 whitespace modifier character. + * Check to see if the entire byte block of the character is an ASCII or UTF-8 white space modifier character. * * These are phonetic spaces. * * Phonetic spaces are whitespaces with additional phonetic meaning associated with them. - * Therefore, these are valid spaces in the technical sense, even if they are not visibly whitespace. + * Therefore, these are valid spaces in the technical sense, even if they are not visibly white space. * * @param character * The character to validate. @@ -538,14 +538,14 @@ extern "C" { /** * Check to see if the entire byte block of the character is an other type of UTF-8 space character. * - * This is a list of whitespace that are not actual whitespace (because they are graph characters) but are considered whitespace, such as Ogham Space Mark ( ). + * This is a list of white space that are not actual white space (because they are graph characters) but are considered white space, such as Ogham Space Mark ' ' (U+1680). * * @param character * The character to validate. * * @return - * F_true if a UTF-8 (other) whitespace. - * F_false if not a UTF-8 (other) whitespace. + * F_true if a UTF-8 (other) white space. + * F_false if not a UTF-8 (other) white space. * * F_utf_fragment (with error bit) if character is a UTF-8 fragment. * F_utf_not (with error bit) if unicode is an invalid Unicode character. diff --git a/level_3/controller/c/controller/private-controller.c b/level_3/controller/c/controller/private-controller.c index 2672ddb..fc59a7a 100644 --- a/level_3/controller/c/controller/private-controller.c +++ b/level_3/controller/c/controller/private-controller.c @@ -786,7 +786,7 @@ extern "C" { if (name.string[i] == '_') continue; - status = f_utf_is_alphabeticbetic_digit(name.string, name.used); + status = f_utf_is_alphabetic_digit(name.string, name.used); if (F_status_is_error(status)) return status; if (status == F_false) return F_false; diff --git a/level_3/controller/c/controller/private-controller.h b/level_3/controller/c/controller/private-controller.h index 59e5056..f4bf26f 100644 --- a/level_3/controller/c/controller/private-controller.h +++ b/level_3/controller/c/controller/private-controller.h @@ -381,10 +381,10 @@ extern "C" { * F_none if there is no string to validate (used = 0). * * Errors (with error bit) from: f_utf_is_alphabetic(). - * Errors (with error bit) from: f_utf_is_alphabeticbetic_digit(). + * Errors (with error bit) from: f_utf_is_alphabetic_digit(). * * @see f_utf_is_alphabetic() - * @see f_utf_is_alphabeticbetic_digit() + * @see f_utf_is_alphabetic_digit() */ #ifndef _di_controller_validate_define_name_ extern f_status_t controller_validate_environment_name(const f_string_static_t name) F_attribute_visibility_internal_d; diff --git a/specifications/fss-0000.txt b/specifications/fss-0000.txt index d7dbd75..24dc7c1 100644 --- a/specifications/fss-0000.txt +++ b/specifications/fss-0000.txt @@ -13,7 +13,7 @@ Featureless Settings Specification: 0000 - Basic: Each Object starts at the beginning of a line and white space to the left of the Object is not treated as part of the object. White space separates an Object from the Content. An Object may be preceded by a newline, in which case means that the Object has no Content. - If only printing white space follows a valid Object, that Object is considered to have no Content. + If only printing white spaces or non-printable characters follow a valid Object, then that Object is considered to have no Content. Content exists on the same line as the Object. Content is represented as a single Content column terminated by a newline. diff --git a/specifications/fss-0001.txt b/specifications/fss-0001.txt index 74315d8..20d139f 100644 --- a/specifications/fss-0001.txt +++ b/specifications/fss-0001.txt @@ -13,7 +13,7 @@ Featureless Settings Specification: 0001 - Extended: Each Object starts at the beginning of a line and white space to the left of the Object is not treated as an object. White space separates an Object from the Content. An Object may be followed by a newline, in which case means that the Object has no Content. - If only printing white space follows a valid Object, that Object is considered to have no Content. + If only printing white spaces or non-printable characters follow a valid Object, then that Object is considered to have no Content. Content exists on the same line as the Object. Content is represented as multiple Content columns. diff --git a/specifications/fss-0002.txt b/specifications/fss-0002.txt index e287b14..4f6c543 100644 --- a/specifications/fss-0002.txt +++ b/specifications/fss-0002.txt @@ -11,8 +11,8 @@ Featureless Settings Specification: 0002 - Basic List: Each Object starts at the beginning of a line and white space to the left of the Object is not treated as an object. - A colon followed by any white space until a newline terminates a valid Object. - Non-white space may not follow the colon of a valid Object. + A colon code:":" (code:"U+003A") followed by any white space until a newline terminates a valid Object. + Non-white space printable characters may not follow the colon of a valid Object. Content is represented as a single Content column of every line following a valid object until the end of file (or string) or until the next valid Object is found. Any Content that could be interpreted as a valid Object must have the colon delimited. @@ -24,8 +24,8 @@ Featureless Settings Specification: 0002 - Basic List: Key\: code:"\s" = White space, except newline. - code:"\o" = Any printable character, except unescaped ':'. - code:"\l" = Any printable character or white space, except unescaped ':'. + code:"\o" = Any printable character, except unescaped code:":" (code:"U+003A"). + code:"\l" = Any printable character or white space, except unescaped code:":" (code:"U+003A"). code:"\c" = Either white space or printable, including newline, that not interpretable as an Object. code:"\n" = Newline. code:"*" = Zero or more occurrences. diff --git a/specifications/fss-0003.txt b/specifications/fss-0003.txt index 50a7150..59fd8de 100644 --- a/specifications/fss-0003.txt +++ b/specifications/fss-0003.txt @@ -11,9 +11,9 @@ Featureless Settings Specification: 0003 - Extended List: Each Object starts at the beginning of a line and white space to the left of the Object is not treated as an object. - An open-brace code:"{" followed by any white space until a newline terminates a possible valid Object. - An Object is not considered fully valid until a valid close-brace code:"}" is found, designating the end of the Content. - Non-white space may not follow the open-brace of a valid Object. + An open-brace code:"{" (code:"U+007B") followed by any white space until a newline terminates a possible valid Object. + An Object is not considered fully valid until a valid close-brace code:"}" (code:"U+007D") is found, designating the end of the Content. + Non-white space printable characters may not follow the open-brace of a valid Object. Content is represented as a single Content column of every line following a valid object until the end of file (or string) or until a non-delimited close-brace code:"}". Any Content column that could be interpreted as an end of Content must be delimited if it should be part of the Content. @@ -32,8 +32,8 @@ Featureless Settings Specification: 0003 - Extended List: Key\: code:"\s" = White space, except newline. - code:"\o" = Any printable character, except unescaped code:"{". - code:"\l" = Any printable character or white space, except unescaped code:"}". + code:"\o" = Any printable character, except unescaped code:"{" (code:"U+007B"). + code:"\l" = Any printable character or white space, except unescaped code:"}" (code:"U+007D"). code:"\c" = Either white space or printable, including newline, that is not interpretable as an Object. code:"\n" = Newline. code:"*" = Zero or more occurrences. diff --git a/specifications/fss-0009.txt b/specifications/fss-0009.txt index 891184b..52e2732 100644 --- a/specifications/fss-0009.txt +++ b/specifications/fss-0009.txt @@ -15,7 +15,7 @@ Featureless Settings Specification: 0009 - Reverse Mapping: Each Object starts at the end of a line and white space to the left of the Object is not treated as part of the object. White space separates an Object from the Content. An Object may be preceded by a newline, in which case means that the Object has no Content. - If only printing white space precedes a valid Object, that Object is considered to have no Content. + If only printing white spaces or non-printable characters precedes a valid Object, then that Object is considered to have no Content. Content exists on the same line as the Object. Content is represented as a single Content column that begins at a newline. diff --git a/specifications/fss-000a.txt b/specifications/fss-000a.txt index d32f000..75b5d79 100644 --- a/specifications/fss-000a.txt +++ b/specifications/fss-000a.txt @@ -15,7 +15,7 @@ Featureless Settings Specification: 000A - Extended Reverse Mapping: Each Object starts at the end of a line and white space to the left of the Object is not treated as an object. White space separates an Object from the Content. An Object may be followed by a newline, in which case means that the Object has no Content. - If only printing white space follows a valid Object, that Object is considered to have no Content. + If only printing white spaces or non-printable characters follow a valid Object, then that Object is considered to have no Content. Content exists on the same line as the Object. Content is represented as multiple Content columns. diff --git a/specifications/fss-000b.txt b/specifications/fss-000b.txt index 8348d89..512bc10 100644 --- a/specifications/fss-000b.txt +++ b/specifications/fss-000b.txt @@ -10,7 +10,7 @@ # Featureless Settings Specification: 000B - Simple List: - This might be similar to code:"fss-0008 (Embedded List)", except it is an code:"fss-0003 (Extended List)" with a (non-recursive) code:"fss-0002 (Basic List)" inside the Content. + This is similar to code:"fss-0008 (Embedded List)", except that it is an code:"fss-0003 (Extended List)" with a (non-recursive) code:"fss-0002 (Basic List)" inside the Content. See the file:"fss-0002.txt" and file:"fss-0003.txt" specification files for details on the syntax rules. diff --git a/specifications/fss.txt b/specifications/fss.txt index daca525..589f05b 100644 --- a/specifications/fss.txt +++ b/specifications/fss.txt @@ -29,7 +29,7 @@ Featureless Settings Specifications: Objects and Contents can include any characters allowed by the specifications. The specification may choose how a given Object or Content are represented and parsed. - For example, in code:"fss-0000 (Basic)", Content is treated as a single item whereas in code:"fss-0001 (Extended)", Content is broken apart in multiple sub parts. + For example, in code:"fss-0000 (Basic)", Content is treated as a single item whereas in code:"fss-0001 (Extended)", Content is broken apart in multiple sub-parts. Contents may be broken up into zero or more discrete sets of Content. Each of these discrete sets of Content are referred to as a column. @@ -43,9 +43,14 @@ Featureless Settings Specifications: Unless otherwise specified, all specifications are newline sensitive (code:"\n" only). Newline characters are only code:"\n" and are never anything else (code:"\r" is not considered newline in any manner). + These specifications refer to characters that have printable representation as emphasis:"printable". + These specifications refer to characters that have no printable representation as emphasis:"non-printable". White spaces characters that are printable, such as tabs and spaces, must be considered the same type for the purposes of parsing. - Non-printing white spaces characters (zero-width characters) are ignored, are treated as placeholders for processing, or are considered part of the appropriate character if they are Unicode combining characters (this includes zero-width punctuation characters and similar). + Non-printing white spaces characters (zero-width characters) are ignored, are treated as placeholders for processing with the exception of combining characters. + White spaces that use combining characters result in printable characters and the resulting combination is treated as not white space. + Zero-width characters that use combining characters are treated as non-printing characters and are skipped. In terms of processing, it is recommended that the code:"NULL" character is not considered the end of a string, but this is only a suggestion. + Any specification may chose to limit, restrict, or otherwise prohibit special Unicode characters such as combining characters or zero-width characters. Unless otherwise specified, newlines designate the potential start (or end) of an Object or Content. -- 1.8.3.1