From: Kevin Day Date: Sun, 20 Feb 2022 06:37:57 +0000 (-0600) Subject: Refactor: Complete the mass converting to f_string_static_t and use const more. X-Git-Tag: 0.5.8~17 X-Git-Url: https://git.kevux.org/?a=commitdiff_plain;h=b7cf31119bf50bafb62684479f36b339c5d65725;p=fll Refactor: Complete the mass converting to f_string_static_t and use const more. This should be the last commit needed to migrate from f_string_t to f_string_static_t. In particular, this breaks apart several of the string rip functions into a dynamic rip and a partial dynamic rip function. Try to use "buffer" as the variable name more often than not rather than using "dynamic" for f_string_static_t parameters. --- diff --git a/level_0/f_file/c/file.c b/level_0/f_file/c/file.c index c7794c7..513d1a4 100644 --- a/level_0/f_file/c/file.c +++ b/level_0/f_file/c/file.c @@ -2423,7 +2423,6 @@ extern "C" { f_status_t f_file_stream_write_range(const f_file_t file, const f_string_static_t buffer, const f_string_range_t range, f_array_length_t * const written) { #ifndef _di_level_0_parameter_checking_ if (!file.size_write) return F_status_set_error(F_parameter); - if (range.stop < range.start) return F_status_set_error(F_parameter); if (range.start >= buffer.used) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ @@ -2431,7 +2430,7 @@ extern "C" { return F_status_set_error(F_file_closed); } - if (!buffer.used) { + if (!buffer.used || range.start >= buffer.used) { if (written) { *written = 0; } @@ -2817,7 +2816,6 @@ extern "C" { f_status_t f_file_write_range(const f_file_t file, const f_string_static_t buffer, const f_string_range_t range, f_array_length_t * const written) { #ifndef _di_level_0_parameter_checking_ if (!file.size_write) return F_status_set_error(F_parameter); - if (range.stop < range.start) return F_status_set_error(F_parameter); if (range.start >= buffer.used) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ @@ -2825,7 +2823,7 @@ extern "C" { return F_status_set_error(F_file_closed); } - if (!buffer.used) { + if (!buffer.used || range.start >= buffer.used) { if (written) { *written = 0; } diff --git a/level_0/f_file/c/file.h b/level_0/f_file/c/file.h index 5577d45..7075dc4 100644 --- a/level_0/f_file/c/file.h +++ b/level_0/f_file/c/file.h @@ -2535,6 +2535,7 @@ extern "C" { * @return * F_none on success. * F_none_stop on success but no data was written (written == 0) (not an error and often happens if file type is not a regular file). + * F_data_not if buffer.used is 0. * * F_block (with error bit) if file descriptor is set to non-block and the write would result in a blocking operation. * F_buffer (with error bit) if the buffer is invalid. @@ -2568,6 +2569,7 @@ extern "C" { * @return * F_none on success. * F_none_stop on success but no data was written (written == 0) (not an error and often happens if file type is not a regular file). + * F_data_not if buffer.used is 0. * * F_block (with error bit) if file descriptor is set to non-block and the write would result in a blocking operation. * F_buffer (with error bit) if the buffer is invalid. @@ -2602,6 +2604,7 @@ extern "C" { * F_none on success. * F_none_stop on success but no data was written (written == 0) (not an error and often happens if file type is not a regular file). * F_none_eos on success but range.stop exceeded buffer.used (only wrote up to buffer.used). + * F_data_not if buffer.used is 0 or total is 0. * * F_block (with error bit) if file descriptor is set to non-block and the write would result in a blocking operation. * F_buffer (with error bit) if the buffer is invalid. @@ -2636,6 +2639,7 @@ extern "C" { * F_none on success. * F_none_stop on success but no data was written (written == 0) (not an error and often happens if file type is not a regular file). * F_none_eos on success but range.stop exceeded buffer.used (only wrote up to buffer.used). + * F_data_not if buffer.used is 0 or range.start > range.stop. * * F_block (with error bit) if file descriptor is set to non-block and the write would result in a blocking operation. * F_buffer (with error bit) if the buffer is invalid. diff --git a/level_0/f_type/c/type.h b/level_0/f_type/c/type.h index 453fdc9..9e858b2 100644 --- a/level_0/f_type/c/type.h +++ b/level_0/f_type/c/type.h @@ -103,8 +103,8 @@ extern "C" { uint16_t step_large; uint16_t step_small; - f_status_t (*handle)(const f_status_t error, void *state, void *internal); - f_status_t (*interrupt)(void *state, void *internal); + f_status_t (*handle)(const f_status_t error, void * const state, void * const internal); + f_status_t (*interrupt)(void * const state, void * const internal); void *callbacks; void *custom; diff --git a/level_1/fl_conversion/c/conversion.c b/level_1/fl_conversion/c/conversion.c index 1506f0c..e73a09c 100644 --- a/level_1/fl_conversion/c/conversion.c +++ b/level_1/fl_conversion/c/conversion.c @@ -6,338 +6,338 @@ extern "C" { #endif #ifndef _di_fl_conversion_dynamic_partial_to_binary_signed_ - f_status_t fl_conversion_dynamic_partial_to_binary_signed(const f_string_static_t dynamic, const f_string_range_t range, const bool negative, f_number_signed_t * const number) { + f_status_t fl_conversion_dynamic_partial_to_binary_signed(const f_string_static_t buffer, const f_string_range_t range, const bool negative, f_number_signed_t * const number) { #ifndef _di_level_1_parameter_checking_ if (!number) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ - if (!dynamic.used || range.start > range.stop) { + if (!buffer.used || range.start > range.stop) { return F_data_not; } - return private_fl_conversion_dynamic_to_binary_signed(dynamic.string + range.start, (range.stop - range.start) + 1, negative, number); + return private_fl_conversion_dynamic_to_binary_signed(buffer.string + range.start, (range.stop - range.start) + 1, negative, number); } #endif // _di_fl_conversion_dynamic_partial_to_binary_signed_ #ifndef _di_fl_conversion_dynamic_partial_to_binary_unsigned_ - f_status_t fl_conversion_dynamic_partial_to_binary_unsigned(const f_string_static_t dynamic, const f_string_range_t range, f_number_unsigned_t * const number) { + f_status_t fl_conversion_dynamic_partial_to_binary_unsigned(const f_string_static_t buffer, const f_string_range_t range, f_number_unsigned_t * const number) { #ifndef _di_level_1_parameter_checking_ if (!number) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ - if (!dynamic.used || range.start > range.stop) { + if (!buffer.used || range.start > range.stop) { return F_data_not; } - return private_fl_conversion_dynamic_to_binary_unsigned(dynamic.string + range.start, (range.stop - range.start) + 1, number); + return private_fl_conversion_dynamic_to_binary_unsigned(buffer.string + range.start, (range.stop - range.start) + 1, number); } #endif // _di_fl_conversion_dynamic_partial_to_binary_unsigned_ #ifndef _di_fl_conversion_dynamic_partial_to_decimal_signed_ - f_status_t fl_conversion_dynamic_partial_to_decimal_signed(const f_string_static_t dynamic, const f_string_range_t range, const bool negative, f_number_signed_t * const number) { + f_status_t fl_conversion_dynamic_partial_to_decimal_signed(const f_string_static_t buffer, const f_string_range_t range, const bool negative, f_number_signed_t * const number) { #ifndef _di_level_1_parameter_checking_ if (!number) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ - if (!dynamic.used || range.start > range.stop) { + if (!buffer.used || range.start > range.stop) { return F_data_not; } - return private_fl_conversion_dynamic_to_decimal_signed(dynamic.string + range.start, (range.stop - range.start) + 1, negative, number); + return private_fl_conversion_dynamic_to_decimal_signed(buffer.string + range.start, (range.stop - range.start) + 1, negative, number); } #endif // _di_fl_conversion_dynamic_partial_to_decimal_signed_ #ifndef _di_fl_conversion_dynamic_partial_to_decimal_unsigned_ - f_status_t fl_conversion_dynamic_partial_to_decimal_unsigned(const f_string_static_t dynamic, const f_string_range_t range, f_number_unsigned_t * const number) { + f_status_t fl_conversion_dynamic_partial_to_decimal_unsigned(const f_string_static_t buffer, const f_string_range_t range, f_number_unsigned_t * const number) { #ifndef _di_level_1_parameter_checking_ if (!number) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ - if (!dynamic.used || range.start > range.stop) { + if (!buffer.used || range.start > range.stop) { return F_data_not; } - return private_fl_conversion_dynamic_to_decimal_unsigned(dynamic.string + range.start, (range.stop - range.start) + 1, number); + return private_fl_conversion_dynamic_to_decimal_unsigned(buffer.string + range.start, (range.stop - range.start) + 1, number); } #endif // _di_fl_conversion_dynamic_partial_to_decimal_unsigned_ #ifndef _di_fl_conversion_dynamic_partial_to_duodecimal_signed_ - f_status_t fl_conversion_dynamic_partial_to_duodecimal_signed(const f_string_static_t dynamic, const f_string_range_t range, const bool negative, f_number_signed_t * const number) { + f_status_t fl_conversion_dynamic_partial_to_duodecimal_signed(const f_string_static_t buffer, const f_string_range_t range, const bool negative, f_number_signed_t * const number) { #ifndef _di_level_1_parameter_checking_ if (!number) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ - if (!dynamic.used || range.start > range.stop) { + if (!buffer.used || range.start > range.stop) { return F_data_not; } - return private_fl_conversion_dynamic_to_duodecimal_signed(dynamic.string + range.start, (range.stop - range.start) + 1, negative, number); + return private_fl_conversion_dynamic_to_duodecimal_signed(buffer.string + range.start, (range.stop - range.start) + 1, negative, number); } #endif // _di_fl_conversion_dynamic_partial_to_duodecimal_signed_ #ifndef _di_fl_conversion_dynamic_partial_to_duodecimal_unsigned_ - f_status_t fl_conversion_dynamic_partial_to_duodecimal_unsigned(const f_string_static_t dynamic, const f_string_range_t range, f_number_unsigned_t * const number) { + f_status_t fl_conversion_dynamic_partial_to_duodecimal_unsigned(const f_string_static_t buffer, const f_string_range_t range, f_number_unsigned_t * const number) { #ifndef _di_level_1_parameter_checking_ if (!number) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ - if (!dynamic.used || range.start > range.stop) { + if (!buffer.used || range.start > range.stop) { return F_data_not; } - return private_fl_conversion_dynamic_to_duodecimal_unsigned(dynamic.string + range.start, (range.stop - range.start) + 1, number); + return private_fl_conversion_dynamic_to_duodecimal_unsigned(buffer.string + range.start, (range.stop - range.start) + 1, number); } #endif // _di_fl_conversion_dynamic_partial_to_duodecimal_unsigned_ #ifndef _di_fl_conversion_dynamic_partial_to_hexidecimal_signed_ - f_status_t fl_conversion_dynamic_partial_to_hexidecimal_signed(const f_string_static_t dynamic, const f_string_range_t range, const bool negative, f_number_signed_t * const number) { + f_status_t fl_conversion_dynamic_partial_to_hexidecimal_signed(const f_string_static_t buffer, const f_string_range_t range, const bool negative, f_number_signed_t * const number) { #ifndef _di_level_1_parameter_checking_ if (!number) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ - if (!dynamic.used || range.start > range.stop) { + if (!buffer.used || range.start > range.stop) { return F_data_not; } - return private_fl_conversion_dynamic_to_hexidecimal_signed(dynamic.string + range.start, (range.stop - range.start) + 1, negative, number); + return private_fl_conversion_dynamic_to_hexidecimal_signed(buffer.string + range.start, (range.stop - range.start) + 1, negative, number); } #endif // _di_fl_conversion_dynamic_partial_to_hexidecimal_signed_ #ifndef _di_fl_conversion_dynamic_partial_to_hexidecimal_unsigned_ - f_status_t fl_conversion_dynamic_partial_to_hexidecimal_unsigned(const f_string_static_t dynamic, const f_string_range_t range, f_number_unsigned_t * const number) { + f_status_t fl_conversion_dynamic_partial_to_hexidecimal_unsigned(const f_string_static_t buffer, const f_string_range_t range, f_number_unsigned_t * const number) { #ifndef _di_level_1_parameter_checking_ if (!number) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ - if (!dynamic.used || range.start > range.stop) { + if (!buffer.used || range.start > range.stop) { return F_data_not; } - return private_fl_conversion_dynamic_to_hexidecimal_unsigned(dynamic.string + range.start, (range.stop - range.start) + 1, number); + return private_fl_conversion_dynamic_to_hexidecimal_unsigned(buffer.string + range.start, (range.stop - range.start) + 1, number); } #endif // _di_fl_conversion_dynamic_partial_to_hexidecimal_unsigned_ #ifndef _di_fl_conversion_dynamic_partial_to_octal_signed_ - f_status_t fl_conversion_dynamic_partial_to_octal_signed(const f_string_static_t dynamic, const f_string_range_t range, const bool negative, f_number_signed_t * const number) { + f_status_t fl_conversion_dynamic_partial_to_octal_signed(const f_string_static_t buffer, const f_string_range_t range, const bool negative, f_number_signed_t * const number) { #ifndef _di_level_1_parameter_checking_ if (!number) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ - if (!dynamic.used || range.start > range.stop) { + if (!buffer.used || range.start > range.stop) { return F_data_not; } - return private_fl_conversion_dynamic_to_octal_signed(dynamic.string + range.start, (range.stop - range.start) + 1, negative, number); + return private_fl_conversion_dynamic_to_octal_signed(buffer.string + range.start, (range.stop - range.start) + 1, negative, number); } #endif // _di_fl_conversion_dynamic_partial_to_octal_signed_ #ifndef _di_fl_conversion_dynamic_partial_to_octal_unsigned_ - f_status_t fl_conversion_dynamic_partial_to_octal_unsigned(const f_string_static_t dynamic, const f_string_range_t range, f_number_unsigned_t * const number) { + f_status_t fl_conversion_dynamic_partial_to_octal_unsigned(const f_string_static_t buffer, const f_string_range_t range, f_number_unsigned_t * const number) { #ifndef _di_level_1_parameter_checking_ if (!number) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ - if (!dynamic.used || range.start > range.stop) { + if (!buffer.used || range.start > range.stop) { return F_data_not; } - return private_fl_conversion_dynamic_to_octal_unsigned(dynamic.string + range.start, (range.stop - range.start) + 1, number); + return private_fl_conversion_dynamic_to_octal_unsigned(buffer.string + range.start, (range.stop - range.start) + 1, number); } #endif // _di_fl_conversion_dynamic_partial_to_octal_unsigned_ #ifndef _di_fl_conversion_dynamic_partial_to_number_signed_ - f_status_t fl_conversion_dynamic_partial_to_number_signed(const f_string_static_t dynamic, const f_string_range_t range, f_number_signed_t * const number) { + f_status_t fl_conversion_dynamic_partial_to_number_signed(const f_string_static_t buffer, const f_string_range_t range, f_number_signed_t * const number) { #ifndef _di_level_1_parameter_checking_ if (!number) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ - if (!dynamic.used || range.start > range.stop) { + if (!buffer.used || range.start > range.stop) { return F_data_not; } - return private_fl_conversion_dynamic_to_number_signed(dynamic.string + range.start, (range.stop - range.start) + 1, number); + return private_fl_conversion_dynamic_to_number_signed(buffer.string + range.start, (range.stop - range.start) + 1, number); } #endif // _di_fl_conversion_dynamic_partial_to_number_signed_ #ifndef _di_fl_conversion_dynamic_partial_to_number_unsigned_ - f_status_t fl_conversion_dynamic_partial_to_number_unsigned(const f_string_static_t dynamic, const f_string_range_t range, f_number_unsigned_t * const number) { + f_status_t fl_conversion_dynamic_partial_to_number_unsigned(const f_string_static_t buffer, const f_string_range_t range, f_number_unsigned_t * const number) { #ifndef _di_level_1_parameter_checking_ if (!number) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ - if (!dynamic.used || range.start > range.stop) { + if (!buffer.used || range.start > range.stop) { return F_data_not; } - return private_fl_conversion_dynamic_to_number_unsigned(dynamic.string + range.start, (range.stop - range.start) + 1, number); + return private_fl_conversion_dynamic_to_number_unsigned(buffer.string + range.start, (range.stop - range.start) + 1, number); } #endif // _di_fl_conversion_dynamic_partial_to_number_unsigned_ #ifndef _di_fl_conversion_dynamic_to_binary_signed_ - f_status_t fl_conversion_dynamic_to_binary_signed(const f_string_static_t dynamic, const bool negative, f_number_signed_t * const number) { + f_status_t fl_conversion_dynamic_to_binary_signed(const f_string_static_t buffer, const bool negative, f_number_signed_t * const number) { #ifndef _di_level_1_parameter_checking_ if (!number) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ - if (!dynamic.used) { + if (!buffer.used) { return F_data_not; } - return private_fl_conversion_dynamic_to_binary_signed(dynamic.string, dynamic.used, negative, number); + return private_fl_conversion_dynamic_to_binary_signed(buffer.string, buffer.used, negative, number); } #endif // _di_fl_conversion_dynamic_to_binary_signed_ #ifndef _di_fl_conversion_dynamic_to_binary_unsigned_ - f_status_t fl_conversion_dynamic_to_binary_unsigned(const f_string_static_t dynamic, f_number_unsigned_t * const number) { + f_status_t fl_conversion_dynamic_to_binary_unsigned(const f_string_static_t buffer, f_number_unsigned_t * const number) { #ifndef _di_level_1_parameter_checking_ if (!number) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ - if (!dynamic.used) { + if (!buffer.used) { return F_data_not; } - return private_fl_conversion_dynamic_to_binary_unsigned(dynamic.string, dynamic.used, number); + return private_fl_conversion_dynamic_to_binary_unsigned(buffer.string, buffer.used, number); } #endif // _di_fl_conversion_dynamic_to_binary_unsigned_ #ifndef _di_fl_conversion_dynamic_to_decimal_signed_ - f_status_t fl_conversion_dynamic_to_decimal_signed(const f_string_static_t dynamic, const bool negative, f_number_signed_t * const number) { + f_status_t fl_conversion_dynamic_to_decimal_signed(const f_string_static_t buffer, const bool negative, f_number_signed_t * const number) { #ifndef _di_level_1_parameter_checking_ if (!number) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ - if (!dynamic.used) { + if (!buffer.used) { return F_data_not; } - return private_fl_conversion_dynamic_to_decimal_signed(dynamic.string, dynamic.used, negative, number); + return private_fl_conversion_dynamic_to_decimal_signed(buffer.string, buffer.used, negative, number); } #endif // _di_fl_conversion_dynamic_to_decimal_signed_ #ifndef _di_fl_conversion_dynamic_to_decimal_unsigned_ - f_status_t fl_conversion_dynamic_to_decimal_unsigned(const f_string_static_t dynamic, f_number_unsigned_t * const number) { + f_status_t fl_conversion_dynamic_to_decimal_unsigned(const f_string_static_t buffer, f_number_unsigned_t * const number) { #ifndef _di_level_1_parameter_checking_ if (!number) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ - if (!dynamic.used) { + if (!buffer.used) { return F_data_not; } - return private_fl_conversion_dynamic_to_decimal_unsigned(dynamic.string, dynamic.used, number); + return private_fl_conversion_dynamic_to_decimal_unsigned(buffer.string, buffer.used, number); } #endif // _di_fl_conversion_dynamic_to_decimal_unsigned_ #ifndef _di_fl_conversion_dynamic_to_duodecimal_signed_ - f_status_t fl_conversion_dynamic_to_duodecimal_signed(const f_string_static_t dynamic, const bool negative, f_number_signed_t * const number) { + f_status_t fl_conversion_dynamic_to_duodecimal_signed(const f_string_static_t buffer, const bool negative, f_number_signed_t * const number) { #ifndef _di_level_1_parameter_checking_ if (!number) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ - if (!dynamic.used) { + if (!buffer.used) { return F_data_not; } - return private_fl_conversion_dynamic_to_duodecimal_signed(dynamic.string, dynamic.used, negative, number); + return private_fl_conversion_dynamic_to_duodecimal_signed(buffer.string, buffer.used, negative, number); } #endif // _di_fl_conversion_dynamic_to_duodecimal_signed_ #ifndef _di_fl_conversion_dynamic_to_duodecimal_unsigned_ - f_status_t fl_conversion_dynamic_to_duodecimal_unsigned(const f_string_static_t dynamic, f_number_unsigned_t * const number) { + f_status_t fl_conversion_dynamic_to_duodecimal_unsigned(const f_string_static_t buffer, f_number_unsigned_t * const number) { #ifndef _di_level_1_parameter_checking_ if (!number) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ - if (!dynamic.used) { + if (!buffer.used) { return F_data_not; } - return private_fl_conversion_dynamic_to_duodecimal_unsigned(dynamic.string, dynamic.used, number); + return private_fl_conversion_dynamic_to_duodecimal_unsigned(buffer.string, buffer.used, number); } #endif // _di_fl_conversion_dynamic_to_duodecimal_unsigned_ #ifndef _di_fl_conversion_dynamic_to_hexidecimal_signed_ - f_status_t fl_conversion_dynamic_to_hexidecimal_signed(const f_string_static_t dynamic, const bool negative, f_number_signed_t * const number) { + f_status_t fl_conversion_dynamic_to_hexidecimal_signed(const f_string_static_t buffer, const bool negative, f_number_signed_t * const number) { #ifndef _di_level_1_parameter_checking_ if (!number) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ - if (!dynamic.used) { + if (!buffer.used) { return F_data_not; } - return private_fl_conversion_dynamic_to_hexidecimal_signed(dynamic.string, dynamic.used, negative, number); + return private_fl_conversion_dynamic_to_hexidecimal_signed(buffer.string, buffer.used, negative, number); } #endif // _di_fl_conversion_dynamic_to_hexidecimal_signed_ #ifndef _di_fl_conversion_dynamic_to_hexidecimal_unsigned_ - f_status_t fl_conversion_dynamic_to_hexidecimal_unsigned(const f_string_static_t dynamic, f_number_unsigned_t * const number) { + f_status_t fl_conversion_dynamic_to_hexidecimal_unsigned(const f_string_static_t buffer, f_number_unsigned_t * const number) { #ifndef _di_level_1_parameter_checking_ if (!number) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ - if (!dynamic.used) { + if (!buffer.used) { return F_data_not; } - return private_fl_conversion_dynamic_to_hexidecimal_unsigned(dynamic.string, dynamic.used, number); + return private_fl_conversion_dynamic_to_hexidecimal_unsigned(buffer.string, buffer.used, number); } #endif // _di_fl_conversion_dynamic_to_hexidecimal_unsigned_ #ifndef _di_fl_conversion_dynamic_to_octal_signed_ - f_status_t fl_conversion_dynamic_to_octal_signed(const f_string_static_t dynamic, const bool negative, f_number_signed_t * const number) { + f_status_t fl_conversion_dynamic_to_octal_signed(const f_string_static_t buffer, const bool negative, f_number_signed_t * const number) { #ifndef _di_level_1_parameter_checking_ if (!number) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ - if (!dynamic.used) { + if (!buffer.used) { return F_data_not; } - return private_fl_conversion_dynamic_to_octal_signed(dynamic.string, dynamic.used, negative, number); + return private_fl_conversion_dynamic_to_octal_signed(buffer.string, buffer.used, negative, number); } #endif // _di_fl_conversion_dynamic_to_octal_signed_ #ifndef _di_fl_conversion_dynamic_to_octal_unsigned_ - f_status_t fl_conversion_dynamic_to_octal_unsigned(const f_string_static_t dynamic, f_number_unsigned_t * const number) { + f_status_t fl_conversion_dynamic_to_octal_unsigned(const f_string_static_t buffer, f_number_unsigned_t * const number) { #ifndef _di_level_1_parameter_checking_ if (!number) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ - if (!dynamic.used) { + if (!buffer.used) { return F_data_not; } - return private_fl_conversion_dynamic_to_octal_unsigned(dynamic.string, dynamic.used, number); + return private_fl_conversion_dynamic_to_octal_unsigned(buffer.string, buffer.used, number); } #endif // _di_fl_conversion_dynamic_to_octal_unsigned_ #ifndef _di_fl_conversion_dynamic_to_number_signed_ - f_status_t fl_conversion_dynamic_to_number_signed(const f_string_static_t dynamic, f_number_signed_t * const number) { + f_status_t fl_conversion_dynamic_to_number_signed(const f_string_static_t buffer, f_number_signed_t * const number) { #ifndef _di_level_1_parameter_checking_ if (!number) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ - if (!dynamic.used) { + if (!buffer.used) { return F_data_not; } - return private_fl_conversion_dynamic_to_number_signed(dynamic.string, dynamic.used, number); + return private_fl_conversion_dynamic_to_number_signed(buffer.string, buffer.used, number); } #endif // _di_fl_conversion_dynamic_to_number_signed_ #ifndef _di_fl_conversion_dynamic_to_number_unsigned_ - f_status_t fl_conversion_dynamic_to_number_unsigned(const f_string_static_t dynamic, f_number_unsigned_t * const number) { + f_status_t fl_conversion_dynamic_to_number_unsigned(const f_string_static_t buffer, f_number_unsigned_t * const number) { #ifndef _di_level_1_parameter_checking_ if (!number) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ - if (!dynamic.used) { + if (!buffer.used) { return F_data_not; } - return private_fl_conversion_dynamic_to_number_unsigned(dynamic.string, dynamic.used, number); + return private_fl_conversion_dynamic_to_number_unsigned(buffer.string, buffer.used, number); } #endif // _di_fl_conversion_dynamic_to_number_unsigned_ #ifdef __cplusplus diff --git a/level_1/fl_conversion/c/conversion.h b/level_1/fl_conversion/c/conversion.h index 4f8c6b5..e96d720 100644 --- a/level_1/fl_conversion/c/conversion.h +++ b/level_1/fl_conversion/c/conversion.h @@ -33,7 +33,7 @@ extern "C" { * This will ignore NULL values. * This will not process signed statuses (+/-). * - * @param dynamic + * @param buffer * The string to convert. * @param range * The start/stop range to convert. @@ -54,7 +54,7 @@ extern "C" { * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_conversion_dynamic_partial_to_binary_signed_ - extern f_status_t fl_conversion_dynamic_partial_to_binary_signed(const f_string_static_t dynamic, const f_string_range_t range, const bool negative, f_number_signed_t * const number); + extern f_status_t fl_conversion_dynamic_partial_to_binary_signed(const f_string_static_t buffer, const f_string_range_t range, const bool negative, f_number_signed_t * const number); #endif // _di_fl_conversion_dynamic_partial_to_binary_signed_ /** @@ -64,7 +64,7 @@ extern "C" { * This will ignore NULL values. * This will not process signed statuses (+/-). * - * @param dynamic + * @param buffer * The string to convert. * @param range * The start/stop range to convert. @@ -82,7 +82,7 @@ extern "C" { * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_conversion_dynamic_partial_to_binary_unsigned_ - extern f_status_t fl_conversion_dynamic_partial_to_binary_unsigned(const f_string_static_t dynamic, const f_string_range_t range, f_number_unsigned_t * const number); + extern f_status_t fl_conversion_dynamic_partial_to_binary_unsigned(const f_string_static_t buffer, const f_string_range_t range, f_number_unsigned_t * const number); #endif // _di_fl_conversion_dynamic_partial_to_binary_unsigned_ /** @@ -92,7 +92,7 @@ extern "C" { * This will ignore NULL values. * This will not process signed statuses (+/-). * - * @param dynamic + * @param buffer * The string to convert. * @param range * The start/stop range to convert. @@ -113,7 +113,7 @@ extern "C" { * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_conversion_dynamic_partial_to_decimal_signed_ - extern f_status_t fl_conversion_dynamic_partial_to_decimal_signed(const f_string_static_t dynamic, const f_string_range_t range, const bool negative, f_number_signed_t * const number); + extern f_status_t fl_conversion_dynamic_partial_to_decimal_signed(const f_string_static_t buffer, const f_string_range_t range, const bool negative, f_number_signed_t * const number); #endif // _di_fl_conversion_dynamic_partial_to_decimal_signed_ /** @@ -123,7 +123,7 @@ extern "C" { * This will ignore NULL values. * This will not process signed statuses (+/-). * - * @param dynamic + * @param buffer * The string to convert. * @param range * The start/stop range to convert. @@ -141,7 +141,7 @@ extern "C" { * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_conversion_dynamic_partial_to_decimal_unsigned_ - extern f_status_t fl_conversion_dynamic_partial_to_decimal_unsigned(const f_string_static_t dynamic, const f_string_range_t range, f_number_unsigned_t * const number); + extern f_status_t fl_conversion_dynamic_partial_to_decimal_unsigned(const f_string_static_t buffer, const f_string_range_t range, f_number_unsigned_t * const number); #endif // _di_fl_conversion_dynamic_partial_to_decimal_unsigned_ /** @@ -151,7 +151,7 @@ extern "C" { * This will ignore NULL values. * This will not process signed statuses (+/-). * - * @param dynamic + * @param buffer * The string to convert. * @param range * The start/stop range to convert. @@ -172,7 +172,7 @@ extern "C" { * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_conversion_dynamic_partial_to_duodecimal_signed_ - extern f_status_t fl_conversion_dynamic_partial_to_duodecimal_signed(const f_string_static_t dynamic, const f_string_range_t range, const bool negative, f_number_signed_t * const number); + extern f_status_t fl_conversion_dynamic_partial_to_duodecimal_signed(const f_string_static_t buffer, const f_string_range_t range, const bool negative, f_number_signed_t * const number); #endif // _di_fl_conversion_dynamic_partial_to_duodecimal_signed_ /** @@ -182,7 +182,7 @@ extern "C" { * This will ignore NULL values. * This will not process signed statuses (+/-). * - * @param dynamic + * @param buffer * The string to convert. * @param range * The start/stop range to convert. @@ -200,7 +200,7 @@ extern "C" { * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_conversion_dynamic_partial_to_duodecimal_unsigned_ - extern f_status_t fl_conversion_dynamic_partial_to_duodecimal_unsigned(const f_string_static_t dynamic, const f_string_range_t range, f_number_unsigned_t * const number); + extern f_status_t fl_conversion_dynamic_partial_to_duodecimal_unsigned(const f_string_static_t buffer, const f_string_range_t range, f_number_unsigned_t * const number); #endif // _di_fl_conversion_dynamic_partial_to_duodecimal_unsigned_ /** @@ -210,7 +210,7 @@ extern "C" { * This will ignore NULL values. * This will not process signed statuses (+/-). * - * @param dynamic + * @param buffer * The string to convert. * @param range * The start/stop range to convert. @@ -231,7 +231,7 @@ extern "C" { * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_conversion_dynamic_partial_to_hexidecimal_signed_ - extern f_status_t fl_conversion_dynamic_partial_to_hexidecimal_signed(const f_string_static_t dynamic, const f_string_range_t range, const bool negative, f_number_signed_t * const number); + extern f_status_t fl_conversion_dynamic_partial_to_hexidecimal_signed(const f_string_static_t buffer, const f_string_range_t range, const bool negative, f_number_signed_t * const number); #endif // _di_fl_conversion_dynamic_partial_to_hexidecimal_signed_ /** @@ -241,7 +241,7 @@ extern "C" { * This will ignore NULL values. * This will not process signed statuses (+/-). * - * @param dynamic + * @param buffer * The string to convert. * @param range * The start/stop range to convert. @@ -259,7 +259,7 @@ extern "C" { * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_conversion_dynamic_partial_to_hexidecimal_unsigned_ - extern f_status_t fl_conversion_dynamic_partial_to_hexidecimal_unsigned(const f_string_static_t dynamic, const f_string_range_t range, f_number_unsigned_t * const number); + extern f_status_t fl_conversion_dynamic_partial_to_hexidecimal_unsigned(const f_string_static_t buffer, const f_string_range_t range, f_number_unsigned_t * const number); #endif // _di_fl_conversion_dynamic_partial_to_hexidecimal_unsigned_ /** @@ -269,7 +269,7 @@ extern "C" { * This will ignore NULL values. * This will not process signed statuses (+/-). * - * @param dynamic + * @param buffer * The string to convert. * @param range * The start/stop range to convert. @@ -289,7 +289,7 @@ extern "C" { * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_conversion_dynamic_partial_to_octal_signed_ - extern f_status_t fl_conversion_dynamic_partial_to_octal_signed(const f_string_static_t dynamic, const f_string_range_t range, const bool negative, f_number_signed_t * const number); + extern f_status_t fl_conversion_dynamic_partial_to_octal_signed(const f_string_static_t buffer, const f_string_range_t range, const bool negative, f_number_signed_t * const number); #endif // _di_fl_conversion_dynamic_partial_to_octal_signed_ /** @@ -299,7 +299,7 @@ extern "C" { * This will ignore NULL values. * This will not process signed statuses (+/-). * - * @param dynamic + * @param buffer * The string to convert. * @param range * The start/stop range to convert. @@ -317,7 +317,7 @@ extern "C" { * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_conversion_dynamic_partial_to_octal_unsigned_ - extern f_status_t fl_conversion_dynamic_partial_to_octal_unsigned(const f_string_static_t dynamic, const f_string_range_t range, f_number_unsigned_t * const number); + extern f_status_t fl_conversion_dynamic_partial_to_octal_unsigned(const f_string_static_t buffer, const f_string_range_t range, f_number_unsigned_t * const number); #endif // _di_fl_conversion_dynamic_partial_to_octal_unsigned_ /** @@ -339,7 +339,7 @@ extern "C" { * This function is similar to strtoll(), but the behavior of error handling and special bases are different. * In particular, octals are specified here with '0b' prefix or '0B' prefix instead of the ridiculous '0' prefix. * - * @param dynamic + * @param buffer * The string to convert. * @param range * The start/stop range to convert. @@ -361,7 +361,7 @@ extern "C" { * @see strtoll() */ #ifndef _di_fl_conversion_dynamic_partial_to_number_signed_ - extern f_status_t fl_conversion_dynamic_partial_to_number_signed(const f_string_static_t dynamic, const f_string_range_t range, f_number_signed_t * const number); + extern f_status_t fl_conversion_dynamic_partial_to_number_signed(const f_string_static_t buffer, const f_string_range_t range, f_number_signed_t * const number); #endif // _di_fl_conversion_dynamic_partial_to_number_signed_ /** @@ -384,7 +384,7 @@ extern "C" { * In particular, octals are specified here with '0b' prefix or '0B' prefix instead of the ridiculous '0' prefix. * Negative values are reported as such instead of being converted into the unsigned equivalent. * - * @param dynamic + * @param buffer * The string to convert. * @param range * The start/stop range to convert. @@ -407,7 +407,7 @@ extern "C" { * @see strtoull() */ #ifndef _di_fl_conversion_dynamic_partial_to_number_unsigned_ - extern f_status_t fl_conversion_dynamic_partial_to_number_unsigned(const f_string_static_t dynamic, const f_string_range_t range, f_number_unsigned_t * const number); + extern f_status_t fl_conversion_dynamic_partial_to_number_unsigned(const f_string_static_t buffer, const f_string_range_t range, f_number_unsigned_t * const number); #endif // _di_fl_conversion_dynamic_partial_to_number_unsigned_ /** * Convert a series of positive or negative binary number characters into a f_number_signed_t. @@ -416,7 +416,7 @@ extern "C" { * This will ignore NULL values. * This will not process signed statuses (+/-). * - * @param dynamic + * @param buffer * The string to convert. * @param negative * Set to 0 to treat string as a positive number, 1 for as a negative number. @@ -435,7 +435,7 @@ extern "C" { * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_conversion_dynamic_to_binary_signed_ - extern f_status_t fl_conversion_dynamic_to_binary_signed(const f_string_static_t dynamic, const bool negative, f_number_signed_t * const number); + extern f_status_t fl_conversion_dynamic_to_binary_signed(const f_string_static_t buffer, const bool negative, f_number_signed_t * const number); #endif // _di_fl_conversion_dynamic_to_binary_signed_ /** @@ -445,7 +445,7 @@ extern "C" { * This will ignore NULL values. * This will not process signed statuses (+/-). * - * @param dynamic + * @param buffer * The string to convert. * @param number * This will store the value of the converted string. @@ -461,7 +461,7 @@ extern "C" { * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_conversion_dynamic_to_binary_unsigned_ - extern f_status_t fl_conversion_dynamic_to_binary_unsigned(const f_string_static_t dynamic, f_number_unsigned_t * const number); + extern f_status_t fl_conversion_dynamic_to_binary_unsigned(const f_string_static_t buffer, f_number_unsigned_t * const number); #endif // _di_fl_conversion_dynamic_to_binary_unsigned_ /** @@ -471,7 +471,7 @@ extern "C" { * This will ignore NULL values. * This will not process signed statuses (+/-). * - * @param dynamic + * @param buffer * The string to convert. * @param negative * Set to 0 to treat string as a positive number, 1 for as a negative number. @@ -490,7 +490,7 @@ extern "C" { * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_conversion_dynamic_to_decimal_signed_ - extern f_status_t fl_conversion_dynamic_to_decimal_signed(const f_string_static_t dynamic, const bool negative, f_number_signed_t * const number); + extern f_status_t fl_conversion_dynamic_to_decimal_signed(const f_string_static_t buffer, const bool negative, f_number_signed_t * const number); #endif // _di_fl_conversion_dynamic_to_decimal_signed_ /** @@ -500,7 +500,7 @@ extern "C" { * This will ignore NULL values. * This will not process signed statuses (+/-). * - * @param dynamic + * @param buffer * The string to convert. * @param number * This will store the value of the converted string. @@ -516,7 +516,7 @@ extern "C" { * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_conversion_dynamic_to_decimal_unsigned_ - extern f_status_t fl_conversion_dynamic_to_decimal_unsigned(const f_string_static_t dynamic, f_number_unsigned_t * const number); + extern f_status_t fl_conversion_dynamic_to_decimal_unsigned(const f_string_static_t buffer, f_number_unsigned_t * const number); #endif // _di_fl_conversion_dynamic_to_decimal_unsigned_ /** @@ -526,7 +526,7 @@ extern "C" { * This will ignore NULL values. * This will not process signed statuses (+/-). * - * @param dynamic + * @param buffer * The string to convert. * @param negative * Set to 0 to treat string as a positive number, 1 for as a negative number. @@ -545,7 +545,7 @@ extern "C" { * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_conversion_dynamic_to_duodecimal_signed_ - extern f_status_t fl_conversion_dynamic_to_duodecimal_signed(const f_string_static_t dynamic, const bool negative, f_number_signed_t * const number); + extern f_status_t fl_conversion_dynamic_to_duodecimal_signed(const f_string_static_t buffer, const bool negative, f_number_signed_t * const number); #endif // _di_fl_conversion_dynamic_to_duodecimal_signed_ /** @@ -555,7 +555,7 @@ extern "C" { * This will ignore NULL values. * This will not process signed statuses (+/-). * - * @param dynamic + * @param buffer * The string to convert. * @param number * This will store the value of the converted string. @@ -571,7 +571,7 @@ extern "C" { * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_conversion_dynamic_to_duodecimal_unsigned_ - extern f_status_t fl_conversion_dynamic_to_duodecimal_unsigned(const f_string_static_t dynamic, f_number_unsigned_t * const number); + extern f_status_t fl_conversion_dynamic_to_duodecimal_unsigned(const f_string_static_t buffer, f_number_unsigned_t * const number); #endif // _di_fl_conversion_dynamic_to_duodecimal_unsigned_ /** @@ -581,7 +581,7 @@ extern "C" { * This will ignore NULL values. * This will not process signed statuses (+/-). * - * @param dynamic + * @param buffer * The string to convert. * @param negative * Set to 0 to treat string as a positive number, 1 for as a negative number. @@ -600,7 +600,7 @@ extern "C" { * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_conversion_dynamic_to_hexidecimal_signed_ - extern f_status_t fl_conversion_dynamic_to_hexidecimal_signed(const f_string_static_t dynamic, const bool negative, f_number_signed_t * const number); + extern f_status_t fl_conversion_dynamic_to_hexidecimal_signed(const f_string_static_t buffer, const bool negative, f_number_signed_t * const number); #endif // _di_fl_conversion_dynamic_to_hexidecimal_signed_ /** @@ -610,7 +610,7 @@ extern "C" { * This will ignore NULL values. * This will not process signed statuses (+/-). * - * @param dynamic + * @param buffer * The string to convert. * @param number * This will store the value of the converted string. @@ -626,7 +626,7 @@ extern "C" { * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_conversion_dynamic_to_hexidecimal_unsigned_ - extern f_status_t fl_conversion_dynamic_to_hexidecimal_unsigned(const f_string_static_t dynamic, f_number_unsigned_t * const number); + extern f_status_t fl_conversion_dynamic_to_hexidecimal_unsigned(const f_string_static_t buffer, f_number_unsigned_t * const number); #endif // _di_fl_conversion_dynamic_to_hexidecimal_unsigned_ /** @@ -636,7 +636,7 @@ extern "C" { * This will ignore NULL values. * This will not process signed statuses (+/-). * - * @param dynamic + * @param buffer * The string to convert. * @param negative * Set to 0 to treat string as a positive number, 1 for as a negative number. @@ -654,7 +654,7 @@ extern "C" { * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_conversion_dynamic_to_octal_signed_ - extern f_status_t fl_conversion_dynamic_to_octal_signed(const f_string_static_t dynamic, const bool negative, f_number_signed_t * const number); + extern f_status_t fl_conversion_dynamic_to_octal_signed(const f_string_static_t buffer, const bool negative, f_number_signed_t * const number); #endif // _di_fl_conversion_dynamic_to_octal_signed_ /** @@ -664,7 +664,7 @@ extern "C" { * This will ignore NULL values. * This will not process signed statuses (+/-). * - * @param dynamic + * @param buffer * The string to convert. * @param number * This will store the value of the converted string. @@ -680,7 +680,7 @@ extern "C" { * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_conversion_dynamic_to_octal_unsigned_ - extern f_status_t fl_conversion_dynamic_to_octal_unsigned(const f_string_static_t dynamic, f_number_unsigned_t * const number); + extern f_status_t fl_conversion_dynamic_to_octal_unsigned(const f_string_static_t buffer, f_number_unsigned_t * const number); #endif // _di_fl_conversion_dynamic_to_octal_unsigned_ /** @@ -702,7 +702,7 @@ extern "C" { * This function is similar to strtoll(), but the behavior of error handling and special bases are different. * In particular, octals are specified here with '0b' prefix or '0B' prefix instead of the ridiculous '0' prefix. * - * @param dynamic + * @param buffer * The string to convert. * @param number * This will store the value of the converted string. @@ -722,7 +722,7 @@ extern "C" { * @see strtoll() */ #ifndef _di_fl_conversion_dynamic_to_number_signed_ - extern f_status_t fl_conversion_dynamic_to_number_signed(const f_string_static_t dynamic, f_number_signed_t * const number); + extern f_status_t fl_conversion_dynamic_to_number_signed(const f_string_static_t buffer, f_number_signed_t * const number); #endif // _di_fl_conversion_dynamic_to_number_signed_ /** @@ -745,7 +745,7 @@ extern "C" { * In particular, octals are specified here with '0b' prefix or '0B' prefix instead of the ridiculous '0' prefix. * Negative values are reported as such instead of being converted into the unsigned equivalent. * - * @param dynamic + * @param buffer * The string to convert. * @param number * This will store the value of the converted string. @@ -766,7 +766,7 @@ extern "C" { * @see strtoull() */ #ifndef _di_fl_conversion_dynamic_to_number_unsigned_ - extern f_status_t fl_conversion_dynamic_to_number_unsigned(const f_string_static_t dynamic, f_number_unsigned_t * const number); + extern f_status_t fl_conversion_dynamic_to_number_unsigned(const f_string_static_t buffer, f_number_unsigned_t * const number); #endif // _di_fl_conversion_dynamic_to_number_unsigned_ #ifdef __cplusplus diff --git a/level_1/fl_directory/c/directory.c b/level_1/fl_directory/c/directory.c index 526c15f..61ea13f 100644 --- a/level_1/fl_directory/c/directory.c +++ b/level_1/fl_directory/c/directory.c @@ -325,7 +325,7 @@ extern "C" { #endif // _di_fl_directory_copy_content_ #ifndef _di_fl_directory_list_ - f_status_t fl_directory_list(const f_string_static_t path, int (*filter)(const struct dirent *), int (*sort)(const struct dirent **, const struct dirent **), const bool dereference, f_directory_listing_t *listing) { + f_status_t fl_directory_list(const f_string_static_t path, int (*filter)(const struct dirent *), int (*sort)(const struct dirent **, const struct dirent **), const bool dereference, f_directory_listing_t * const listing) { #ifndef _di_level_1_parameter_checking_ if (!path.string) return F_status_set_error(F_parameter); if (!listing) return F_status_set_error(F_parameter); @@ -340,7 +340,7 @@ extern "C" { #endif // _di_fl_directory_list_ #ifndef _di_fl_directory_path_pop_ - f_status_t fl_directory_path_pop(f_string_static_t *path) { + f_status_t fl_directory_path_pop(f_string_static_t * const path) { #ifndef _di_level_1_parameter_checking_ if (!path->string) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ @@ -414,7 +414,7 @@ extern "C" { #endif // _di_fl_directory_path_pop_ #ifndef _di_fl_directory_path_push_ - f_status_t fl_directory_path_push(const f_string_static_t source, f_string_dynamic_t *destination) { + f_status_t fl_directory_path_push(const f_string_static_t source, f_string_dynamic_t * const destination) { #ifndef _di_level_1_parameter_checking_ if (!source.string) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ diff --git a/level_1/fl_directory/c/directory.h b/level_1/fl_directory/c/directory.h index 8515ebf..a95b4e4 100644 --- a/level_1/fl_directory/c/directory.h +++ b/level_1/fl_directory/c/directory.h @@ -294,7 +294,7 @@ extern "C" { * @see f_string_dynamics_increase_by() */ #ifndef _di_fl_directory_list_ - extern f_status_t fl_directory_list(const f_string_static_t path, int (*filter)(const struct dirent *), int (*sort)(const struct dirent **, const struct dirent **), const bool dereference, f_directory_listing_t *listing); + extern f_status_t fl_directory_list(const f_string_static_t path, int (*filter)(const struct dirent *), int (*sort)(const struct dirent **, const struct dirent **), const bool dereference, f_directory_listing_t * const listing); #endif // _di_fl_directory_list_ /** @@ -318,7 +318,7 @@ extern "C" { * Errors (with error bit) from: f_utf_is_control(). */ #ifndef _di_fl_directory_path_pop_ - extern f_status_t fl_directory_path_pop(f_string_static_t *path); + extern f_status_t fl_directory_path_pop(f_string_static_t * const path); #endif // _di_fl_directory_path_pop_ /** @@ -345,7 +345,7 @@ extern "C" { * Errors (with error bit) from: f_utf_is_control(). */ #ifndef _di_fl_directory_path_push_ - extern f_status_t fl_directory_path_push(const f_string_static_t source, f_string_dynamic_t *destination); + extern f_status_t fl_directory_path_push(const f_string_static_t source, f_string_dynamic_t * const destination); #endif // _di_fl_directory_path_push_ #ifdef __cplusplus diff --git a/level_1/fl_directory/c/private-directory.c b/level_1/fl_directory/c/private-directory.c index b84b146..49bc07c 100644 --- a/level_1/fl_directory/c/private-directory.c +++ b/level_1/fl_directory/c/private-directory.c @@ -446,7 +446,7 @@ extern "C" { #endif // !defined(_di_fl_directory_copy_file_) #if !defined(_di_fl_directory_list_) - f_status_t private_fl_directory_list(const f_string_static_t path, int (*filter)(const struct dirent *), int (*sort)(const struct dirent **, const struct dirent **), const bool dereference, f_directory_listing_t *listing) { + f_status_t private_fl_directory_list(const f_string_static_t path, int (*filter)(const struct dirent *), int (*sort)(const struct dirent **, const struct dirent **), const bool dereference, f_directory_listing_t * const listing) { struct dirent **entity = 0; @@ -571,7 +571,7 @@ extern "C" { #endif // !defined(_di_fl_directory_list_) #if !defined(_di_fl_directory_path_push_) || !defined(_di_fl_directory_path_push_dynamic_) - f_status_t private_fl_directory_path_push(const f_string_static_t source, f_string_dynamic_t *destination) { + f_status_t private_fl_directory_path_push(const f_string_static_t source, f_string_dynamic_t * const destination) { bool terminated_null = F_false; bool separator_prepend = F_false; diff --git a/level_1/fl_directory/c/private-directory.h b/level_1/fl_directory/c/private-directory.h index 3fe1e50..53f8067 100644 --- a/level_1/fl_directory/c/private-directory.h +++ b/level_1/fl_directory/c/private-directory.h @@ -179,7 +179,7 @@ extern "C" { * @see fl_directory_list() */ #if !defined(_di_fl_directory_list_) - extern f_status_t private_fl_directory_list(const f_string_static_t path, int (*filter)(const struct dirent *), int (*sort)(const struct dirent **, const struct dirent **), const bool dereference, f_directory_listing_t *listing) F_attribute_visibility_internal_d; + extern f_status_t private_fl_directory_list(const f_string_static_t path, int (*filter)(const struct dirent *), int (*sort)(const struct dirent **, const struct dirent **), const bool dereference, f_directory_listing_t * const listing) F_attribute_visibility_internal_d; #endif // !defined(_di_fl_directory_list_) /** @@ -208,7 +208,7 @@ extern "C" { * @see fl_directory_path_push_dynamic() */ #if !defined(_di_fl_directory_path_push_) || !defined(_di_fl_directory_path_push_dynamic_) - extern f_status_t private_fl_directory_path_push(const f_string_static_t source, f_string_dynamic_t *destination) F_attribute_visibility_internal_d; + extern f_status_t private_fl_directory_path_push(const f_string_static_t source, f_string_dynamic_t * const destination) F_attribute_visibility_internal_d; #endif // !defined(_di_fl_directory_path_push_) || !defined(_di_fl_directory_path_push_dynamic_) #ifdef __cplusplus diff --git a/level_1/fl_environment/c/environment.c b/level_1/fl_environment/c/environment.c index b4ec370..9fbb80d 100644 --- a/level_1/fl_environment/c/environment.c +++ b/level_1/fl_environment/c/environment.c @@ -5,10 +5,10 @@ extern "C" { #endif #ifndef _di_fl_environment_load_name_ - f_status_t fl_environment_load_name(const f_string_static_t name, f_string_maps_t *environment) { - #ifndef _di_level_2_parameter_checking_ + f_status_t fl_environment_load_name(const f_string_static_t name, f_string_maps_t * const environment) { + #ifndef _di_level_1_parameter_checking_ if (!environment) return F_status_set_error(F_parameter); - #endif // _di_level_2_parameter_checking_ + #endif // _di_level_1_parameter_checking_ if (!name.used) { return F_data_not; @@ -40,10 +40,10 @@ extern "C" { #endif // _di_fl_environment_load_name_ #ifndef _di_fl_environment_load_names_ - f_status_t fl_environment_load_names(const f_string_statics_t names, f_string_maps_t *environment) { - #ifndef _di_level_2_parameter_checking_ + f_status_t fl_environment_load_names(const f_string_statics_t names, f_string_maps_t * const environment) { + #ifndef _di_level_1_parameter_checking_ if (!environment) return F_status_set_error(F_parameter); - #endif // _di_level_2_parameter_checking_ + #endif // _di_level_1_parameter_checking_ if (!names.used) { return F_data_not; @@ -79,10 +79,10 @@ extern "C" { #endif // _di_fl_environment_load_names_ #ifndef _di_fl_environment_path_explode_ - f_status_t fl_environment_path_explode(const f_string_static_t path, f_string_dynamics_t *paths) { - #ifndef _di_level_0_parameter_checking_ + f_status_t fl_environment_path_explode(const f_string_static_t path, f_string_dynamics_t * const paths) { + #ifndef _di_level_1_parameter_checking_ if (!paths) return F_status_set_error(F_parameter); - #endif // _di_level_0_parameter_checking_ + #endif // _di_level_1_parameter_checking_ f_status_t status = F_none; @@ -156,10 +156,10 @@ extern "C" { #endif // _di_fl_environment_path_explode_ #ifndef _di_fl_environment_path_explode_reverse_ - f_status_t fl_environment_path_explode_reverse(const f_string_static_t path, f_string_dynamics_t *paths) { - #ifndef _di_level_0_parameter_checking_ + f_status_t fl_environment_path_explode_reverse(const f_string_static_t path, f_string_dynamics_t * const paths) { + #ifndef _di_level_1_parameter_checking_ if (!paths) return F_status_set_error(F_parameter); - #endif // _di_level_0_parameter_checking_ + #endif // _di_level_1_parameter_checking_ f_status_t status = F_none; diff --git a/level_1/fl_environment/c/environment.h b/level_1/fl_environment/c/environment.h index dc5ae42..9f00620 100644 --- a/level_1/fl_environment/c/environment.h +++ b/level_1/fl_environment/c/environment.h @@ -10,6 +10,7 @@ #ifndef _FL_environment_h #define _FL_environment_h +// Libc includes. #include #include @@ -54,7 +55,7 @@ extern "C" { * @see f_string_maps_increase_by() */ #ifndef _di_fl_environment_load_name_ - extern f_status_t fl_environment_load_name(const f_string_static_t name, f_string_maps_t *environment); + extern f_status_t fl_environment_load_name(const f_string_static_t name, f_string_maps_t * const environment); #endif // _di_fl_environment_load_name_ /** @@ -87,7 +88,7 @@ extern "C" { * @see f_string_maps_increase_by() */ #ifndef _di_fl_environment_load_names_ - extern f_status_t fl_environment_load_names(const f_string_statics_t names, f_string_maps_t *environment); + extern f_status_t fl_environment_load_names(const f_string_statics_t names, f_string_maps_t * const environment); #endif // _di_fl_environment_load_names_ /** @@ -117,7 +118,7 @@ extern "C" { * @see f_string_dynamics_increase_by() */ #ifndef _di_fl_environment_path_explode_ - extern f_status_t fl_environment_path_explode(const f_string_static_t path, f_string_dynamics_t *paths); + extern f_status_t fl_environment_path_explode(const f_string_static_t path, f_string_dynamics_t * const paths); #endif // _di_fl_environment_path_explode_ /** @@ -149,7 +150,7 @@ extern "C" { * @see f_string_dynamics_increase_by() */ #ifndef _di_fl_environment_path_explode_reverse_ - extern f_status_t fl_environment_path_explode_reverse(const f_string_static_t path, f_string_dynamics_t *paths); + extern f_status_t fl_environment_path_explode_reverse(const f_string_static_t path, f_string_dynamics_t * const paths); #endif // _di_fl_environment_path_explode_reverse_ #ifdef __cplusplus diff --git a/level_1/fl_fss/c/fss/basic.c b/level_1/fl_fss/c/fss/basic.c index 5c92c52..3eb7591 100644 --- a/level_1/fl_fss/c/fss/basic.c +++ b/level_1/fl_fss/c/fss/basic.c @@ -7,7 +7,7 @@ extern "C" { #endif #ifndef _di_fl_fss_basic_object_read_ - f_status_t fl_fss_basic_object_read(const f_string_static_t buffer, f_state_t state, f_string_range_t *range, f_fss_object_t *found, f_fss_quote_t *quote, f_fss_delimits_t *delimits) { + f_status_t fl_fss_basic_object_read(const f_string_static_t buffer, f_state_t state, f_string_range_t * const range, f_fss_object_t * const found, f_fss_quote_t * const quote, f_fss_delimits_t * const delimits) { #ifndef _di_level_1_parameter_checking_ if (!range) return F_status_set_error(F_parameter); if (!found) return F_status_set_error(F_parameter); @@ -20,8 +20,6 @@ extern "C" { if (F_status_is_error(status)) { delimits->used = delimits_used; - - return status; } return status; @@ -29,7 +27,7 @@ extern "C" { #endif // _di_fl_fss_basic_object_read_ #ifndef _di_fl_fss_basic_content_read_ - f_status_t fl_fss_basic_content_read(const f_string_static_t buffer, f_state_t state, f_string_range_t *range, f_fss_content_t *found, f_fss_delimits_t *delimits) { + f_status_t fl_fss_basic_content_read(const f_string_static_t buffer, f_state_t state, f_string_range_t * const range, f_fss_content_t * const found, f_fss_delimits_t * const delimits) { #ifndef _di_level_1_parameter_checking_ if (!range) return F_status_set_error(F_parameter); if (!found) return F_status_set_error(F_parameter); @@ -65,6 +63,7 @@ extern "C" { if (F_status_set_fine(status) == F_interrupt) { status = F_status_set_error(F_interrupt); + break; } } @@ -93,7 +92,7 @@ extern "C" { #endif // _di_fl_fss_basic_content_read_ #ifndef _di_fl_fss_basic_object_write_ - f_status_t fl_fss_basic_object_write(const f_string_static_t object, const f_fss_quote_t quote, const uint8_t complete, f_state_t state, f_string_range_t *range, f_string_dynamic_t *destination) { + f_status_t fl_fss_basic_object_write(const f_string_static_t object, const f_fss_quote_t quote, const uint8_t complete, f_state_t state, f_string_range_t * const range, f_string_dynamic_t * const destination) { #ifndef _di_level_1_parameter_checking_ if (!range) return F_status_set_error(F_parameter); if (!destination) return F_status_set_error(F_parameter); @@ -136,6 +135,7 @@ extern "C" { if (F_status_is_error(status2)) { destination->used = destination_used; + return status2; } @@ -152,7 +152,7 @@ extern "C" { #endif // _di_fl_fss_basic_object_write_ #ifndef _di_fl_fss_basic_content_write_ - f_status_t fl_fss_basic_content_write(const f_string_static_t content, const uint8_t complete, f_state_t state, f_string_range_t *range, f_string_dynamic_t *destination) { + f_status_t fl_fss_basic_content_write(const f_string_static_t content, const uint8_t complete, f_state_t state, f_string_range_t * const range, f_string_dynamic_t * const destination) { #ifndef _di_level_1_parameter_checking_ if (!range) return F_status_set_error(F_parameter); if (!destination) return F_status_set_error(F_parameter); @@ -165,7 +165,7 @@ extern "C" { if (range->start > range->stop || range->start >= content.used) { - // content should be terminated, even if empty. + // Content should be terminated, even if empty. if (complete == f_fss_complete_full_e || complete == f_fss_complete_full_trim_e || complete == f_fss_complete_end_e) { status = f_string_dynamic_increase(state.step_large, destination); if (F_status_is_error(status)) return status; @@ -180,7 +180,7 @@ extern "C" { return F_data_not_eos; } - // ensure that there is room for the potential terminating newline. + // Ensure that there is room for the potential terminating newline. status = f_string_dynamic_increase_by(destination->used + (range->stop - range->start) + 1, destination); if (F_status_is_error(status)) return status; @@ -202,9 +202,7 @@ extern "C" { return F_status_set_error(F_none_eol); } - if (content.string[range->start] == f_fss_delimit_placeholder_s.string[0]) { - continue; - } + if (content.string[range->start] == f_fss_delimit_placeholder_s.string[0]) continue; destination->string[destination->used++] = content.string[range->start]; } // for diff --git a/level_1/fl_fss/c/fss/basic.h b/level_1/fl_fss/c/fss/basic.h index 13a4e28..a592707 100644 --- a/level_1/fl_fss/c/fss/basic.h +++ b/level_1/fl_fss/c/fss/basic.h @@ -81,7 +81,7 @@ extern "C" { * Errors (with error bit) from: f_fss_skip_past_space(). */ #ifndef _di_fl_fss_basic_object_read_ - extern f_status_t fl_fss_basic_object_read(const f_string_static_t buffer, f_state_t state, f_string_range_t *range, f_fss_object_t *found, f_fss_quote_t *quote, f_fss_delimits_t *delimits); + extern f_status_t fl_fss_basic_object_read(const f_string_static_t buffer, f_state_t state, f_string_range_t * const range, f_fss_object_t * const found, f_fss_quote_t * const quote, f_fss_delimits_t * const delimits); #endif // _di_fl_fss_basic_object_read_ /** @@ -128,7 +128,7 @@ extern "C" { * Errors (with error bit) from: f_fss_skip_past_space(). */ #ifndef _di_fl_fss_basic_content_read_ - extern f_status_t fl_fss_basic_content_read(const f_string_static_t buffer, f_state_t state, f_string_range_t *range, f_fss_content_t *found, f_fss_delimits_t *delimits); + extern f_status_t fl_fss_basic_content_read(const f_string_static_t buffer, f_state_t state, f_string_range_t * const range, f_fss_content_t * const found, f_fss_delimits_t * const delimits); #endif // _di_fl_fss_basic_content_read_ /** @@ -184,7 +184,7 @@ extern "C" { * Errors (with error bit) from: f_utf_buffer_increment(). */ #ifndef _di_fl_fss_basic_object_write_ - extern f_status_t fl_fss_basic_object_write(const f_string_static_t object, const f_fss_quote_t quote, const uint8_t complete, f_state_t state, f_string_range_t *range, f_string_dynamic_t *destination); + extern f_status_t fl_fss_basic_object_write(const f_string_static_t object, const f_fss_quote_t quote, const uint8_t complete, f_state_t state, f_string_range_t * const range, f_string_dynamic_t * const destination); #endif // _di_fl_fss_basic_object_write_ /** @@ -230,7 +230,7 @@ extern "C" { * F_string_too_large (with error bit) if appended string length is too large to store in the destination. */ #ifndef _di_fl_fss_basic_content_write_ - extern f_status_t fl_fss_basic_content_write(const f_string_static_t content, const uint8_t complete, f_state_t state, f_string_range_t *range, f_string_dynamic_t *destination); + extern f_status_t fl_fss_basic_content_write(const f_string_static_t content, const uint8_t complete, f_state_t state, f_string_range_t * const range, f_string_dynamic_t * const destination); #endif // _di_fl_fss_basic_content_write_ #ifdef __cplusplus diff --git a/level_1/fl_fss/c/fss/basic_list.c b/level_1/fl_fss/c/fss/basic_list.c index 757b95e..8441157 100644 --- a/level_1/fl_fss/c/fss/basic_list.c +++ b/level_1/fl_fss/c/fss/basic_list.c @@ -7,7 +7,7 @@ extern "C" { #endif #ifndef _di_fl_fss_basic_list_object_read_ - f_status_t fl_fss_basic_list_object_read(const f_string_static_t buffer, f_state_t state, f_string_range_t *range, f_fss_object_t *found, f_fss_delimits_t *delimits) { + f_status_t fl_fss_basic_list_object_read(const f_string_static_t buffer, f_state_t state, f_string_range_t * const range, f_fss_object_t * const found, f_fss_delimits_t * const delimits) { #ifndef _di_level_1_parameter_checking_ if (!range) return F_status_set_error(F_parameter); if (!found) return F_status_set_error(F_parameter); @@ -274,7 +274,7 @@ extern "C" { #endif // _di_fl_fss_basic_list_object_read_ #ifndef _di_fl_fss_basic_list_content_read_ - f_status_t fl_fss_basic_list_content_read(const f_string_static_t buffer, f_state_t state, f_string_range_t *range, f_fss_content_t *found, f_fss_delimits_t *delimits, f_fss_comments_t *comments) { + f_status_t fl_fss_basic_list_content_read(const f_string_static_t buffer, f_state_t state, f_string_range_t * const range, f_fss_content_t * const found, f_fss_delimits_t * const delimits, f_fss_comments_t * const comments) { #ifndef _di_level_1_parameter_checking_ if (!range) return F_status_set_error(F_parameter); if (!found) return F_status_set_error(F_parameter); @@ -347,11 +347,8 @@ extern "C" { } } - if (buffer.string[range->start] == f_fss_delimit_placeholder_s.string[0]) { - continue; - } else if (buffer.string[range->start] != f_fss_delimit_slash_s.string[0]) { - break; - } + if (buffer.string[range->start] == f_fss_delimit_placeholder_s.string[0]) continue; + if (buffer.string[range->start] != f_fss_delimit_slash_s.string[0]) break; ++slash_count; } // for @@ -473,6 +470,7 @@ extern "C" { if (newline_last == found->array[found->used].start && buffer.string[found->array[found->used].start] != f_fss_eol_s.string[0]) { range->start = newline_last; + return F_fss_found_content_not; } else { @@ -549,7 +547,7 @@ extern "C" { #endif // _di_fl_fss_basic_list_content_read_ #ifndef _di_fl_fss_basic_list_object_write_ - f_status_t fl_fss_basic_list_object_write(const f_string_static_t object, const uint8_t complete, f_state_t state, f_string_range_t *range, f_string_dynamic_t *destination) { + f_status_t fl_fss_basic_list_object_write(const f_string_static_t object, const uint8_t complete, f_state_t state, f_string_range_t * const range, f_string_dynamic_t * const destination) { #ifndef _di_level_1_parameter_checking_ if (!destination) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ @@ -676,11 +674,8 @@ extern "C" { } } - if (object.string[range->start] == f_fss_delimit_placeholder_s.string[0]) { - continue; - } else if (object.string[range->start] != f_fss_delimit_slash_s.string[0]) { - break; - } + if (object.string[range->start] == f_fss_delimit_placeholder_s.string[0]) continue; + if (object.string[range->start] != f_fss_delimit_slash_s.string[0]) break; ++slash_count; } // for @@ -700,9 +695,7 @@ extern "C" { destination->string[destination->used++] = f_fss_delimit_slash_s.string[0]; } // while - if (range->start > range->stop || range->start >= object.used) { - break; - } + if (range->start > range->stop || range->start >= object.used) break; } if (object.string[range->start] != f_fss_delimit_placeholder_s.string[0]) { diff --git a/level_1/fl_fss/c/fss/basic_list.h b/level_1/fl_fss/c/fss/basic_list.h index b5beef8..7c421e1 100644 --- a/level_1/fl_fss/c/fss/basic_list.h +++ b/level_1/fl_fss/c/fss/basic_list.h @@ -82,7 +82,7 @@ extern "C" { * Errors (with error bit) from: f_fss_skip_past_space(). */ #ifndef _di_fl_fss_basic_list_object_read_ - extern f_status_t fl_fss_basic_list_object_read(const f_string_static_t buffer, f_state_t state, f_string_range_t *range, f_fss_object_t *found, f_fss_delimits_t *delimits); + extern f_status_t fl_fss_basic_list_object_read(const f_string_static_t buffer, f_state_t state, f_string_range_t * const range, f_fss_object_t * const found, f_fss_delimits_t * const delimits); #endif // _di_fl_fss_basic_list_object_read_ /** @@ -141,7 +141,7 @@ extern "C" { * Errors (with error bit) from: f_fss_skip_past_space(). */ #ifndef _di_fl_fss_basic_list_content_read_ - extern f_status_t fl_fss_basic_list_content_read(const f_string_static_t buffer, f_state_t state, f_string_range_t *range, f_fss_content_t *found, f_fss_delimits_t *delimits, f_fss_comments_t *comments); + extern f_status_t fl_fss_basic_list_content_read(const f_string_static_t buffer, f_state_t state, f_string_range_t * const range, f_fss_content_t * const found, f_fss_delimits_t * const delimits, f_fss_comments_t * const comments); #endif // _di_fl_fss_basic_list_content_read_ /** @@ -192,7 +192,7 @@ extern "C" { * Errors (with error bit) from: f_utf_buffer_increment(). */ #ifndef _di_fl_fss_basic_list_object_write_ - extern f_status_t fl_fss_basic_list_object_write(const f_string_static_t object, const uint8_t complete, f_state_t state, f_string_range_t *range, f_string_dynamic_t *destination); + extern f_status_t fl_fss_basic_list_object_write(const f_string_static_t object, const uint8_t complete, f_state_t state, f_string_range_t * const range, f_string_dynamic_t * const destination); #endif // _di_fl_fss_basic_list_object_write_ /** @@ -246,7 +246,7 @@ extern "C" { * Errors (with error bit) from: f_utf_buffer_increment(). */ #ifndef _di_fl_fss_basic_list_content_write_ - extern f_status_t fl_fss_basic_list_content_write(const f_string_static_t content, const uint8_t complete, const f_string_static_t *prepend, f_state_t state, f_string_range_t *range, f_string_dynamic_t *destination); + extern f_status_t fl_fss_basic_list_content_write(const f_string_static_t content, const uint8_t complete, const f_string_static_t *prepend, f_state_t state, f_string_range_t * const range, f_string_dynamic_t * const destination); #endif // _di_fl_fss_basic_list_content_write_ #ifdef __cplusplus diff --git a/level_1/fl_fss/c/fss/embedded_list.c b/level_1/fl_fss/c/fss/embedded_list.c index 172f23d..e6b9efe 100644 --- a/level_1/fl_fss/c/fss/embedded_list.c +++ b/level_1/fl_fss/c/fss/embedded_list.c @@ -7,7 +7,7 @@ extern "C" { #endif #ifndef _di_fl_fss_embedded_list_object_read_ - f_status_t fl_fss_embedded_list_object_read(const f_string_static_t buffer, f_state_t state, f_string_range_t *range, f_fss_object_t *found, f_fss_delimits_t *delimits) { + f_status_t fl_fss_embedded_list_object_read(const f_string_static_t buffer, f_state_t state, f_string_range_t * const range, f_fss_object_t * const found, f_fss_delimits_t * const delimits) { #ifndef _di_level_1_parameter_checking_ if (!range) return F_status_set_error(F_parameter); if (!found) return F_status_set_error(F_parameter); @@ -122,8 +122,7 @@ extern "C" { if (buffer.string[range->start] == f_fss_embedded_list_open_s.string[0]) { graph_first = F_false; - stop = range->start - 1; - ++range->start; + stop = range->start++ - 1; while (range->start <= range->stop && range->start < buffer.used) { @@ -163,8 +162,7 @@ extern "C" { if (buffer.string[range->start] == f_fss_delimit_slash_s.string[0]) { if (slash_count % 2 == 1) { - delimits->array[delimits->used] = range->start; - ++delimits->used; + delimits->array[delimits->used++] = range->start; } --slash_count; @@ -262,6 +260,7 @@ extern "C" { if (F_status_is_error(status)) { delimits->used = delimits_used; + return status; } @@ -273,6 +272,7 @@ extern "C" { if (F_status_set_fine(status) == F_interrupt) { status = F_status_set_error(F_interrupt); + break; } } @@ -301,7 +301,7 @@ extern "C" { #endif // _di_fl_fss_embedded_list_object_read_ #ifndef _di_fl_fss_embedded_list_content_read_ - f_status_t fl_fss_embedded_list_content_read(const f_string_static_t buffer, f_state_t state, f_string_range_t *range, f_fss_nest_t *found, f_fss_delimits_t *delimits, f_fss_comments_t *comments) { + f_status_t fl_fss_embedded_list_content_read(const f_string_static_t buffer, f_state_t state, f_string_range_t * const range, f_fss_nest_t * const found, f_fss_delimits_t * const delimits, f_fss_comments_t * const comments) { #ifndef _di_level_1_parameter_checking_ if (!range) return F_status_set_error(F_parameter); if (!found) return F_status_set_error(F_parameter); @@ -363,7 +363,8 @@ extern "C" { bool is_open = F_false; - uint8_t graph_first = 0x0; // 0x0 = false, 0x1 = true, 0x2 = false, but there is a delimited comment, comment_delimit is set. + // 0x0 = false, 0x1 = true, 0x2 = false, but there is a delimited comment, comment_delimit is set. + uint8_t graph_first = 0x0; // Initialize depth 1 start position. // Positions_start.used is used as a max depth (such that positions_start.used == max depth + 1). @@ -549,9 +550,11 @@ extern "C" { while (slashes.array[depth]) { if (buffer.string[range->start] == f_fss_delimit_slash_s.string[0]) { - if (slashes.array[depth]-- % 2 == 1) { + if (slashes.array[depth] % 2 == 1) { delimits->array[delimits->used++] = range->start; } + + --slashes.array[depth]; } // Delimit slashes and placeholders are required to be in the ASCII range. @@ -562,9 +565,7 @@ extern "C" { // When slashes are even, the object is valid and needs to be processed. if (is_object) { - ++depth; - - if (depth > positions_start.size) { + if (++depth > positions_start.size) { macro_f_array_lengths_t_resize(status, positions_start, positions_start.size + state.step_small); if (F_status_is_error(status)) break; @@ -711,6 +712,7 @@ extern "C" { if (F_status_set_fine(status) == F_interrupt) { status = F_status_set_error(F_interrupt); + break; } } @@ -718,6 +720,7 @@ extern "C" { if (buffer.string[range->start] == f_fss_eol_s.string[0]) { newline_last = range->start; line_start = range->start + 1; + break; } @@ -757,17 +760,13 @@ extern "C" { status = f_utf_buffer_increment(buffer, range, 1); if (F_status_is_error(status)) break; - if (buffer.string[range->start] == f_fss_eol_s.string[0]) { - break; - } + if (buffer.string[range->start] == f_fss_eol_s.string[0]) break; if (buffer.string[range->start] != f_fss_delimit_placeholder_s.string[0]) { status = f_fss_is_space(buffer, *range); if (F_status_is_error(status)) break; - if (status == F_false) { - break; - } + if (status == F_false) break; } } // while @@ -932,9 +931,7 @@ extern "C" { status = f_utf_buffer_increment(buffer, range, 1); if (F_status_is_error(status)) break; - if (range->start >= buffer.used || range->start > range->stop) { - break; - } + if (range->start >= buffer.used || range->start > range->stop) break; continue; } @@ -973,7 +970,7 @@ extern "C" { #endif // _di_fl_fss_embedded_list_content_read_ #ifndef _di_fl_fss_embedded_list_object_write_ - f_status_t fl_fss_embedded_list_object_write(const f_string_static_t object, const uint8_t complete, f_state_t state, f_string_range_t *range, f_string_dynamic_t *destination) { + f_status_t fl_fss_embedded_list_object_write(const f_string_static_t object, const uint8_t complete, f_state_t state, f_string_range_t * const range, f_string_dynamic_t * const destination) { #ifndef _di_level_1_parameter_checking_ if (!destination) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ @@ -1024,6 +1021,7 @@ extern "C" { if (F_status_set_fine(status) == F_interrupt) { status = F_status_set_error(F_interrupt); + break; } } @@ -1035,6 +1033,7 @@ extern "C" { if (F_status_is_error(status)) break; destination->string[destination->used++] = f_fss_delimit_slash_s.string[0]; + break; } @@ -1047,6 +1046,7 @@ extern "C" { if (object.string[range->start] != f_fss_delimit_placeholder_s.string[0]) { if (object.string[range->start] == f_fss_eol_s.string[0]) { status = F_status_set_error(F_none_eol); + break; } @@ -1082,6 +1082,7 @@ extern "C" { if (F_status_set_fine(status) == F_interrupt) { status = F_status_set_error(F_interrupt); + break; } } @@ -1096,15 +1097,13 @@ extern "C" { if (F_status_set_fine(status) == F_interrupt) { status = F_status_set_error(F_interrupt); + break; } } - if (object.string[range->start] == f_fss_delimit_placeholder_s.string[0]) { - continue; - } else if (object.string[range->start] != f_fss_delimit_slash_s.string[0]) { - break; - } + if (object.string[range->start] == f_fss_delimit_placeholder_s.string[0]) continue; + if (object.string[range->start] != f_fss_delimit_slash_s.string[0]) break; ++slash_count; } // for @@ -1126,6 +1125,7 @@ extern "C" { if (range->start > range->stop || range->start >= object.used) { ends_on_space = F_false; + break; } } @@ -1133,6 +1133,7 @@ extern "C" { if (object.string[range->start] != f_fss_delimit_placeholder_s.string[0]) { if (object.string[range->start] == f_fss_eol_s.string[0]) { status = F_status_set_error(F_none_eol); + break; } @@ -1207,7 +1208,7 @@ extern "C" { #endif // _di_fl_fss_embedded_list_object_write_ #ifndef _di_fl_fss_embedded_list_content_write_ - f_status_t fl_fss_embedded_list_content_write(const f_string_static_t content, const uint8_t complete, const f_string_static_t *prepend, const f_string_ranges_t *ignore, f_state_t state, f_string_range_t *range, f_string_dynamic_t *destination) { + f_status_t fl_fss_embedded_list_content_write(const f_string_static_t content, const uint8_t complete, const f_string_static_t * const prepend, const f_string_ranges_t * const ignore, f_state_t state, f_string_range_t * const range, f_string_dynamic_t * const destination) { #ifndef _di_level_1_parameter_checking_ if (!range) return F_status_set_error(F_parameter); if (!destination) return F_status_set_error(F_parameter); @@ -1261,6 +1262,7 @@ extern "C" { if (F_status_set_fine(status) == F_interrupt) { status = F_status_set_error(F_interrupt); + break; } } @@ -1284,6 +1286,7 @@ extern "C" { if (F_status_set_fine(status) == F_interrupt) { status = F_status_set_error(F_interrupt); + break; } } diff --git a/level_1/fl_fss/c/fss/embedded_list.h b/level_1/fl_fss/c/fss/embedded_list.h index 1713d49..f336a7c 100644 --- a/level_1/fl_fss/c/fss/embedded_list.h +++ b/level_1/fl_fss/c/fss/embedded_list.h @@ -82,7 +82,7 @@ extern "C" { * Errors (with error bit) from: f_fss_skip_past_space(). */ #ifndef _di_fl_fss_embedded_list_object_read_ - extern f_status_t fl_fss_embedded_list_object_read(const f_string_static_t buffer, f_state_t state, f_string_range_t *range, f_fss_object_t *found, f_fss_delimits_t *delimits); + extern f_status_t fl_fss_embedded_list_object_read(const f_string_static_t buffer, f_state_t state, f_string_range_t * const range, f_fss_object_t * const found, f_fss_delimits_t * const delimits); #endif // _di_fl_fss_embedded_list_object_read_ /** @@ -144,7 +144,7 @@ extern "C" { * Errors (with error bit) from: f_fss_skip_past_space(). */ #ifndef _di_fl_fss_embedded_list_content_read_ - extern f_status_t fl_fss_embedded_list_content_read(const f_string_static_t buffer, f_state_t state, f_string_range_t *range, f_fss_nest_t *found, f_fss_delimits_t *delimits, f_fss_comments_t *comments); + extern f_status_t fl_fss_embedded_list_content_read(const f_string_static_t buffer, f_state_t state, f_string_range_t * const range, f_fss_nest_t * const found, f_fss_delimits_t * const delimits, f_fss_comments_t * const comments); #endif // _di_fl_fss_embedded_list_content_read_ /** @@ -195,7 +195,7 @@ extern "C" { * Errors (with error bit) from: f_utf_buffer_increment(). */ #ifndef _di_fl_fss_embedded_list_object_write_ - extern f_status_t fl_fss_embedded_list_object_write(const f_string_static_t object, const uint8_t complete, f_state_t state, f_string_range_t *range, f_string_dynamic_t *destination); + extern f_status_t fl_fss_embedded_list_object_write(const f_string_static_t object, const uint8_t complete, f_state_t state, f_string_range_t * const range, f_string_dynamic_t * const destination); #endif // _di_fl_fss_embedded_list_object_write_ /** @@ -253,7 +253,7 @@ extern "C" { * Errors (with error bit) from: f_utf_buffer_increment(). */ #ifndef _di_fl_fss_embedded_list_content_write_ - extern f_status_t fl_fss_embedded_list_content_write(const f_string_static_t content, const uint8_t complete, const f_string_static_t *prepend, const f_string_ranges_t *ignore, f_state_t state, f_string_range_t *range, f_string_dynamic_t *destination); + extern f_status_t fl_fss_embedded_list_content_write(const f_string_static_t content, const uint8_t complete, const f_string_static_t * const prepend, const f_string_ranges_t * const ignore, f_state_t state, f_string_range_t * const range, f_string_dynamic_t * const destination); #endif // _di_fl_fss_embedded_list_content_write_ #ifdef __cplusplus diff --git a/level_1/fl_fss/c/fss/extended.c b/level_1/fl_fss/c/fss/extended.c index f0425f1..ffc15e1 100644 --- a/level_1/fl_fss/c/fss/extended.c +++ b/level_1/fl_fss/c/fss/extended.c @@ -7,7 +7,7 @@ extern "C" { #endif #ifndef _di_fl_fss_extended_object_read_ - f_status_t fl_fss_extended_object_read(const f_string_static_t buffer, f_state_t state, f_string_range_t *range, f_fss_object_t *found, f_fss_quote_t *quoted, f_fss_delimits_t *delimits) { + f_status_t fl_fss_extended_object_read(const f_string_static_t buffer, f_state_t state, f_string_range_t * const range, f_fss_object_t * const found, f_fss_quote_t * const quoted, f_fss_delimits_t * const delimits) { #ifndef _di_level_1_parameter_checking_ if (!range) return F_status_set_error(F_parameter); if (!found) return F_status_set_error(F_parameter); @@ -35,7 +35,7 @@ extern "C" { #endif // _di_fl_fss_extended_object_read_ #ifndef _di_fl_fss_extended_content_read_ - f_status_t fl_fss_extended_content_read(const f_string_static_t buffer, f_state_t state, f_string_range_t *range, f_fss_content_t *found, f_fss_quotes_t *quotes, f_fss_delimits_t *delimits) { + f_status_t fl_fss_extended_content_read(const f_string_static_t buffer, f_state_t state, f_string_range_t * const range, f_fss_content_t * const found, f_fss_quotes_t * const quotes, f_fss_delimits_t * const delimits) { #ifndef _di_level_1_parameter_checking_ if (!range) return F_status_set_error(F_parameter); if (!found) return F_status_set_error(F_parameter); @@ -91,8 +91,7 @@ extern "C" { } } - found->array[found->used] = content_partial; - ++found->used; + found->array[found->used++] = content_partial; if (quotes) { quotes->array[quotes->used] = quoted == f_fss_quote_type_double_e ? f_string_ascii_quote_double_s.string[0] : f_string_ascii_quote_single_s.string[0]; @@ -151,7 +150,7 @@ extern "C" { #endif // _di_fl_fss_extended_content_read_ #ifndef _di_fl_fss_extended_object_write_ -f_status_t fl_fss_extended_object_write(const f_string_static_t object, const f_fss_quote_t quoted, const uint8_t complete, f_state_t state, f_string_range_t *range, f_string_dynamic_t *destination) { +f_status_t fl_fss_extended_object_write(const f_string_static_t object, const f_fss_quote_t quoted, const uint8_t complete, f_state_t state, f_string_range_t * const range, f_string_dynamic_t * const destination) { #ifndef _di_level_1_parameter_checking_ if (!range) return F_status_set_error(F_parameter); if (!destination) return F_status_set_error(F_parameter); @@ -192,7 +191,7 @@ f_status_t fl_fss_extended_object_write(const f_string_static_t object, const f_ #endif // _di_fl_fss_extended_object_write_ #ifndef _di_fl_fss_extended_content_write_ - f_status_t fl_fss_extended_content_write(const f_string_static_t content, const f_fss_quote_t quoted, const uint8_t complete, f_state_t state, f_string_range_t *range, f_string_dynamic_t *destination) { + f_status_t fl_fss_extended_content_write(const f_string_static_t content, const f_fss_quote_t quoted, const uint8_t complete, f_state_t state, f_string_range_t * const range, f_string_dynamic_t * const destination) { #ifndef _di_level_1_parameter_checking_ if (!range) return F_status_set_error(F_parameter); if (!destination) return F_status_set_error(F_parameter); diff --git a/level_1/fl_fss/c/fss/extended.h b/level_1/fl_fss/c/fss/extended.h index d26b617..c76b1e4 100644 --- a/level_1/fl_fss/c/fss/extended.h +++ b/level_1/fl_fss/c/fss/extended.h @@ -81,7 +81,7 @@ extern "C" { * Errors (with error bit) from: f_fss_skip_past_space(). */ #ifndef _di_fl_fss_extended_object_read_ - extern f_status_t fl_fss_extended_object_read(const f_string_static_t buffer, f_state_t state, f_string_range_t *range, f_fss_object_t *found, f_fss_quote_t *quoted, f_fss_delimits_t *delimits); + extern f_status_t fl_fss_extended_object_read(const f_string_static_t buffer, f_state_t state, f_string_range_t * const range, f_fss_object_t * const found, f_fss_quote_t * const quoted, f_fss_delimits_t * const delimits); #endif // _di_fl_fss_extended_object_read_ /** @@ -134,7 +134,7 @@ extern "C" { * Errors (with error bit) from: f_fss_skip_past_space(). */ #ifndef _di_fl_fss_extended_content_read_ - extern f_status_t fl_fss_extended_content_read(const f_string_static_t buffer, f_state_t state, f_string_range_t *range, f_fss_content_t *found, f_fss_quotes_t *quotes, f_fss_delimits_t *delimits); + extern f_status_t fl_fss_extended_content_read(const f_string_static_t buffer, f_state_t state, f_string_range_t * const range, f_fss_content_t * const found, f_fss_quotes_t * const quotes, f_fss_delimits_t * const delimits); #endif // _di_fl_fss_extended_content_read_ /** @@ -188,7 +188,7 @@ extern "C" { * Errors (with error bit) from: f_utf_buffer_increment(). */ #ifndef _di_fl_fss_extended_object_write_ - extern f_status_t fl_fss_extended_object_write(const f_string_static_t object, const f_fss_quote_t quoted, const uint8_t complete, f_state_t state, f_string_range_t *range, f_string_dynamic_t *destination); + extern f_status_t fl_fss_extended_object_write(const f_string_static_t object, const f_fss_quote_t quoted, const uint8_t complete, f_state_t state, f_string_range_t * const range, f_string_dynamic_t * const destination); #endif // _di_fl_fss_extended_object_write_ /** @@ -243,7 +243,7 @@ extern "C" { * Errors (with error bit) from: f_utf_buffer_increment(). */ #ifndef _di_fl_fss_extended_content_write_ - extern f_status_t fl_fss_extended_content_write(const f_string_static_t content, const f_fss_quote_t quoted, const uint8_t complete, f_state_t state, f_string_range_t *range, f_string_dynamic_t *destination); + extern f_status_t fl_fss_extended_content_write(const f_string_static_t content, const f_fss_quote_t quoted, const uint8_t complete, f_state_t state, f_string_range_t * const range, f_string_dynamic_t * const destination); #endif // _di_fl_fss_extended_content_write_ #ifdef __cplusplus diff --git a/level_1/fl_fss/c/fss/extended_list.c b/level_1/fl_fss/c/fss/extended_list.c index c56aa5b..3cb33a1 100644 --- a/level_1/fl_fss/c/fss/extended_list.c +++ b/level_1/fl_fss/c/fss/extended_list.c @@ -7,7 +7,7 @@ extern "C" { #endif #ifndef _di_fl_fss_extended_list_object_read_ - f_status_t fl_fss_extended_list_object_read(const f_string_static_t buffer, f_state_t state, f_string_range_t *range, f_fss_object_t *found, f_fss_delimits_t *delimits) { + f_status_t fl_fss_extended_list_object_read(const f_string_static_t buffer, f_state_t state, f_string_range_t * const range, f_fss_object_t * const found, f_fss_delimits_t * const delimits) { #ifndef _di_level_1_parameter_checking_ if (!range) return F_status_set_error(F_parameter); if (!found) return F_status_set_error(F_parameter); @@ -122,8 +122,7 @@ extern "C" { if (buffer.string[range->start] == f_fss_extended_list_open_s.string[0]) { graph_first = F_false; - stop = range->start - 1; - ++range->start; + stop = range->start++ - 1; while (range->start <= range->stop && range->start < buffer.used) { @@ -152,7 +151,6 @@ extern "C" { if (buffer.string[range->start] == f_fss_eol_s.string[0]) { start = range->start; - range->start = slash_first; macro_f_fss_delimits_t_increase_by(status, (*delimits), (slash_count / 2) + 1); @@ -303,7 +301,7 @@ extern "C" { #endif // _di_fl_fss_extended_list_object_read_ #ifndef _di_fl_fss_extended_list_content_read_ - f_status_t fl_fss_extended_list_content_read(const f_string_static_t buffer, f_state_t state, f_string_range_t *range, f_fss_content_t *found, f_fss_delimits_t *delimits, f_fss_comments_t *comments) { + f_status_t fl_fss_extended_list_content_read(const f_string_static_t buffer, f_state_t state, f_string_range_t * const range, f_fss_content_t * const found, f_fss_delimits_t * const delimits, f_fss_comments_t * const comments) { #ifndef _di_level_1_parameter_checking_ if (!range) return F_status_set_error(F_parameter); if (!found) return F_status_set_error(F_parameter); @@ -346,8 +344,7 @@ extern "C" { if (F_status_is_error(status)) break; if (status == F_none_eol) { - newline_last = range->start; - ++range->start; + newline_last = range->start++; continue; } @@ -370,11 +367,8 @@ extern "C" { } } - if (buffer.string[range->start] == f_fss_delimit_placeholder_s.string[0]) { - continue; - } else if (buffer.string[range->start] != f_fss_delimit_slash_s.string[0]) { - break; - } + if (buffer.string[range->start] == f_fss_delimit_placeholder_s.string[0]) continue; + if (buffer.string[range->start] != f_fss_delimit_slash_s.string[0]) break; ++slash_count; } // for @@ -523,7 +517,7 @@ extern "C" { #endif // _di_fl_fss_extended_list_content_read_ #ifndef _di_fl_fss_extended_list_object_write_ - f_status_t fl_fss_extended_list_object_write(const f_string_static_t object, const uint8_t complete, f_state_t state, f_string_range_t *range, f_string_dynamic_t *destination) { + f_status_t fl_fss_extended_list_object_write(const f_string_static_t object, const uint8_t complete, f_state_t state, f_string_range_t * const range, f_string_dynamic_t * const destination) { #ifndef _di_level_1_parameter_checking_ if (!destination) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ @@ -655,11 +649,8 @@ extern "C" { } } - if (object.string[range->start] == f_fss_delimit_placeholder_s.string[0]) { - continue; - } else if (object.string[range->start] != f_fss_delimit_slash_s.string[0]) { - break; - } + if (object.string[range->start] == f_fss_delimit_placeholder_s.string[0]) continue; + if (object.string[range->start] != f_fss_delimit_slash_s.string[0]) break; ++slash_count; } // for @@ -764,7 +755,7 @@ extern "C" { #endif // _di_fl_fss_extended_list_object_write_ #ifndef _di_fl_fss_extended_list_content_write_ - f_status_t fl_fss_extended_list_content_write(const f_string_static_t content, const uint8_t complete, const f_string_static_t *prepend, const f_string_ranges_t *ignore, f_state_t state, f_string_range_t *range, f_string_dynamic_t *destination) { + f_status_t fl_fss_extended_list_content_write(const f_string_static_t content, const uint8_t complete, const f_string_static_t * const prepend, const f_string_ranges_t * const ignore, f_state_t state, f_string_range_t * const range, f_string_dynamic_t * const destination) { #ifndef _di_level_1_parameter_checking_ if (!range) return F_status_set_error(F_parameter); if (!destination) return F_status_set_error(F_parameter); @@ -842,6 +833,7 @@ extern "C" { if (F_status_set_fine(status) == F_interrupt) { status = F_status_set_error(F_interrupt); + break; } } @@ -860,7 +852,7 @@ extern "C" { if (F_status_is_error(status)) break; if (has_graph) { - // do nothing. + // Do nothing. } else if (content.string[range->start] == f_fss_eol_s.string[0] || range->start >= content.used || range->start > range->stop) { diff --git a/level_1/fl_fss/c/fss/extended_list.h b/level_1/fl_fss/c/fss/extended_list.h index 3ba5b2e..ee49d85 100644 --- a/level_1/fl_fss/c/fss/extended_list.h +++ b/level_1/fl_fss/c/fss/extended_list.h @@ -82,7 +82,7 @@ extern "C" { * Errors (with error bit) from: f_fss_skip_past_space(). */ #ifndef _di_fl_fss_extended_list_object_read_ - extern f_status_t fl_fss_extended_list_object_read(const f_string_static_t buffer, f_state_t state, f_string_range_t *range, f_fss_object_t *found, f_fss_delimits_t *delimits); + extern f_status_t fl_fss_extended_list_object_read(const f_string_static_t buffer, f_state_t state, f_string_range_t * const range, f_fss_object_t * const found, f_fss_delimits_t * const delimits); #endif // _di_fl_fss_extended_list_object_read_ /** @@ -142,7 +142,7 @@ extern "C" { * Errors (with error bit) from: f_fss_skip_past_space(). */ #ifndef _di_fl_fss_extended_list_content_read_ - extern f_status_t fl_fss_extended_list_content_read(const f_string_static_t buffer, f_state_t state, f_string_range_t *range, f_fss_content_t *found, f_fss_delimits_t *delimits, f_fss_comments_t *comments); + extern f_status_t fl_fss_extended_list_content_read(const f_string_static_t buffer, f_state_t state, f_string_range_t * const range, f_fss_content_t * const found, f_fss_delimits_t * const delimits, f_fss_comments_t * const comments); #endif // _di_fl_fss_extended_list_content_read_ /** @@ -193,7 +193,7 @@ extern "C" { * Errors (with error bit) from: f_utf_buffer_increment(). */ #ifndef _di_fl_fss_extended_list_object_write_ - extern f_status_t fl_fss_extended_list_object_write(const f_string_static_t object, const uint8_t complete, f_state_t state, f_string_range_t *range, f_string_dynamic_t *destination); + extern f_status_t fl_fss_extended_list_object_write(const f_string_static_t object, const uint8_t complete, f_state_t state, f_string_range_t * const range, f_string_dynamic_t * const destination); #endif // _di_fl_fss_extended_list_object_write_ /** @@ -251,7 +251,7 @@ extern "C" { * Errors (with error bit) from: f_utf_buffer_increment(). */ #ifndef _di_fl_fss_extended_list_content_write_ - extern f_status_t fl_fss_extended_list_content_write(const f_string_static_t content, const uint8_t complete, const f_string_static_t *prepend, const f_string_ranges_t *ignore, f_state_t state, f_string_range_t *range, f_string_dynamic_t *destination); + extern f_status_t fl_fss_extended_list_content_write(const f_string_static_t content, const uint8_t complete, const f_string_static_t * const prepend, const f_string_ranges_t * const ignore, f_state_t state, f_string_range_t * const range, f_string_dynamic_t * const destination); #endif // _di_fl_fss_extended_list_content_write_ #ifdef __cplusplus diff --git a/level_1/fl_fss/c/fss/macro.h b/level_1/fl_fss/c/fss/macro.h index 10727e3..c489f94 100644 --- a/level_1/fl_fss/c/fss/macro.h +++ b/level_1/fl_fss/c/fss/macro.h @@ -40,20 +40,6 @@ extern "C" { } #endif // _di_macro_fl_fss_object_return_on_overflow_delimited_ -#ifndef _di_macro_fl_fss_content_return_on_overflow_ - #define private_macro_fl_fss_content_return_on_overflow(buffer, range, found, delimits, delimits_used, eos_status, stop_status) \ - if (range.start >= buffer.used) { \ - delimits.used = delimits_used; \ - found.array[found.used].stop = buffer.used - 1; \ - return eos_status; \ - } \ - else if (range.start > range.stop) { \ - delimits.used = delimits_used; \ - found.array[found.used].stop = range.stop; \ - return stop_status; \ - } -#endif // _di_macro_fl_fss_content_return_on_overflow_ - #ifndef _di_macro_fl_fss_content_with_comments_return_on_overflow_ #define private_macro_fl_fss_content_with_comments_return_on_overflow(buffer, range, found, delimits, delimits_used, comments, comments_used, eos_status, stop_status) \ if (range.start >= buffer.used) { \ diff --git a/level_1/fl_fss/c/private-fss.c b/level_1/fl_fss/c/private-fss.c index 5d2ab16..ef3a366 100644 --- a/level_1/fl_fss/c/private-fss.c +++ b/level_1/fl_fss/c/private-fss.c @@ -7,7 +7,7 @@ extern "C" { #endif #if !defined(_di_fl_fss_basic_object_write_) || !defined(_di_fl_fss_extended_object_write_) - f_status_t private_fl_fss_basic_write_object_trim(const f_fss_quote_t quoted, const f_array_length_t used_start, f_state_t state, f_string_dynamic_t *destination) { + f_status_t private_fl_fss_basic_write_object_trim(const f_fss_quote_t quoted, const f_array_length_t used_start, f_state_t state, f_string_dynamic_t * const destination) { f_status_t status = F_none; f_string_range_t destination_range = macro_f_string_range_t_initialize(destination->used); @@ -47,9 +47,7 @@ extern "C" { } } - if (destination->string[destination_range.start] == f_fss_delimit_placeholder_s.string[0]) { - continue; - } + if (destination->string[destination_range.start] == f_fss_delimit_placeholder_s.string[0]) continue; status = f_fss_is_space(*destination, destination_range); @@ -83,6 +81,7 @@ extern "C" { if (destination->string[destination_range.start] == quote_char) { --destination_range.start; + break; } } // for @@ -101,9 +100,7 @@ extern "C" { } } - if (destination->string[destination_range.start] == f_fss_delimit_placeholder_s.string[0]) { - continue; - } + if (destination->string[destination_range.start] == f_fss_delimit_placeholder_s.string[0]) continue; status = f_fss_is_space(*destination, destination_range); @@ -160,7 +157,7 @@ extern "C" { #endif // !defined(_di_fl_fss_basic_object_write_) || !defined(_di_fl_fss_extended_object_write_) #if !defined(_di_fl_fss_basic_list_content_write_) || !defined(_di_fl_fss_extended_list_content_write_) || !defined(_di_fl_fss_embedded_list_content_write_) - f_status_t private_fl_fss_basic_list_write_add_until_end(const f_string_static_t buffer, f_state_t state, f_string_range_t *range, f_string_dynamic_t *destination) { + f_status_t private_fl_fss_basic_list_write_add_until_end(const f_string_static_t buffer, f_state_t state, f_string_range_t * const range, f_string_dynamic_t * const destination) { f_status_t status = F_none; @@ -188,7 +185,7 @@ extern "C" { #endif // !defined(_di_fl_fss_basic_list_content_write_) || !defined(_di_fl_fss_extended_list_content_write_) || !defined(_di_fl_fss_embedded_list_content_write_) #if !defined(_di_fl_fss_basic_list_object_write_) || !defined(_di_fl_fss_extended_list_object_write_) - f_status_t private_fl_fss_basic_list_write_object_trim(const f_array_length_t used_start, f_state_t state, f_string_dynamic_t *destination) { + f_status_t private_fl_fss_basic_list_write_object_trim(const f_array_length_t used_start, f_state_t state, f_string_dynamic_t * const destination) { f_status_t status = F_none; f_string_range_t destination_range = macro_f_string_range_t_initialize(destination->used); @@ -206,9 +203,7 @@ extern "C" { } } - if (destination->string[destination_range.start] == f_fss_delimit_placeholder_s.string[0]) { - continue; - } + if (destination->string[destination_range.start] == f_fss_delimit_placeholder_s.string[0]) continue; status = f_fss_is_space(*destination, destination_range); @@ -245,7 +240,7 @@ extern "C" { status = f_fss_is_space(*destination, destination_range); - // when going backwards, getting incomplete UTF-8 sequences is not an error. + // When going backwards, getting incomplete UTF-8 sequences is not an error. if (F_status_set_fine(status) == F_complete_not_utf) continue; if (F_status_is_error(status)) { @@ -278,7 +273,7 @@ extern "C" { #endif // !defined(_di_fl_fss_basic_list_object_write_) || !defined(_di_fl_fss_extended_list_object_write_) #if !defined(_di_fl_fss_basic_object_read_) || !defined(_di_fl_fss_extended_object_read_) || !defined(_di_fl_fss_extended_content_read_) - f_status_t private_fl_fss_basic_read(const f_string_static_t buffer, const bool object_as, f_state_t state, f_string_range_t *range, f_fss_object_t *found, f_fss_quote_t *quoted, f_fss_delimits_t *delimits) { + f_status_t private_fl_fss_basic_read(const f_string_static_t buffer, const bool object_as, f_state_t state, f_string_range_t * const range, f_fss_object_t * const found, f_fss_quote_t *quoted, f_fss_delimits_t * const delimits) { f_status_t status = f_fss_skip_past_space(buffer, range); if (F_status_is_error(status)) return status; @@ -355,6 +350,7 @@ extern "C" { if (F_status_set_fine(status) == F_interrupt) { status = F_status_set_error(F_interrupt); + break; } } @@ -415,8 +411,7 @@ extern "C" { macro_f_fss_delimits_t_increase(status, state.step_small, (*delimits)); if (F_status_is_error(status)) return status; - delimits->array[delimits->used] = first_slash; - ++delimits->used; + delimits->array[delimits->used++] = first_slash; status = f_utf_buffer_increment(buffer, range, 1); if (F_status_is_error(status)) return status; @@ -603,9 +598,7 @@ extern "C" { } } - ++range->start; - - if (range->start >= buffer.used) return F_none_eos; + if (++range->start >= buffer.used) return F_none_eos; if (range->start > range->stop) return F_none_stop; } // while @@ -630,11 +623,13 @@ extern "C" { if (range->start >= buffer.used) { found->stop = buffer.used - 1; + return F_data_not_eos; } if (range->start > range->stop) { found->stop = range->stop; + return F_data_not_stop; } @@ -668,8 +663,7 @@ extern "C" { if (buffer.string[range->start] == f_fss_delimit_slash_s.string[0]) { if (slash_count % 2 == 1) { - delimits->array[delimits->used] = range->start; - ++delimits->used; + delimits->array[delimits->used++] = range->start; } --slash_count; @@ -699,6 +693,7 @@ extern "C" { if (F_status_is_error(status)) return status; if (range->start > range->stop || range->start >= buffer.used) { + // EOS or EOL was reached, so it is a valid closing quoted. // (for EOL, this is always TRUE, for EOS this could be false but there is no way to know this, so assume TRUE (@todo maybe none on stop?). status = F_true; @@ -709,6 +704,7 @@ extern "C" { } } else { + // EOS or EOL was reached, so it is a valid closing quoted. // (for EOL, this is always TRUE, for EOS this could be false but there is no way to know this, so assume TRUE (@todo maybe none on stop?). status = F_true; @@ -760,7 +756,6 @@ extern "C" { } if (buffer.string[range->start] != f_fss_delimit_placeholder_s.string[0]) { - while (range->start <= range->stop && range->start < buffer.used && buffer.string[range->start] != f_fss_eol_s.string[0]) { if (state.interrupt) { @@ -897,6 +892,7 @@ extern "C" { if (F_status_set_fine(status) == F_interrupt) { status = F_status_set_error(F_interrupt); + break; } } @@ -912,6 +908,7 @@ extern "C" { if (F_status_set_fine(status) == F_interrupt) { status = F_status_set_error(F_interrupt); + break; } } @@ -958,6 +955,7 @@ extern "C" { if (object.string[range->start] == f_fss_eol_s.string[0]) { status = F_status_set_error(F_none_eol); + break; } @@ -1037,8 +1035,7 @@ extern "C" { destination->string[destination->used++] = f_fss_delimit_slash_s.string[0]; } // for - destination->string[destination->used++] = object.string[range->start]; - ++range->start; + destination->string[destination->used++] = object.string[range->start++]; continue; } @@ -1090,6 +1087,7 @@ extern "C" { if (F_status_is_error(status)) break; destination->string[destination->used++] = quote_char; + break; } @@ -1131,6 +1129,7 @@ extern "C" { } else if (object.string[range->start] == f_fss_eol_s.string[0]) { status = F_status_set_error(F_none_eol); + break; } else if (object.string[range->start] != f_fss_delimit_placeholder_s.string[0]) { diff --git a/level_1/fl_fss/c/private-fss.h b/level_1/fl_fss/c/private-fss.h index bd2045c..cf36634 100644 --- a/level_1/fl_fss/c/private-fss.h +++ b/level_1/fl_fss/c/private-fss.h @@ -46,7 +46,7 @@ extern "C" { * @see fl_fss_extended_object_write() */ #if !defined(_di_fl_fss_basic_object_write_) || !defined(_di_fl_fss_extended_object_write_) - extern f_status_t private_fl_fss_basic_write_object_trim(const f_fss_quote_t quoted, const f_array_length_t used_start, f_state_t state, f_string_dynamic_t *destination) F_attribute_visibility_internal_d; + extern f_status_t private_fl_fss_basic_write_object_trim(const f_fss_quote_t quoted, const f_array_length_t used_start, f_state_t state, f_string_dynamic_t * const destination) F_attribute_visibility_internal_d; #endif // !defined(_di_fl_fss_basic_object_write_) || !defined(_di_fl_fss_extended_object_write_) /** @@ -81,7 +81,7 @@ extern "C" { * @see f_string_dynamic_increase() */ #if !defined(_di_fl_fss_basic_list_content_write_) || !defined(_di_fl_fss_extended_list_content_write_) || !defined(_di_fl_fss_embedded_list_content_write_) - extern f_status_t private_fl_fss_basic_list_write_add_until_end(const f_string_static_t buffer, f_state_t state, f_string_range_t *range, f_string_dynamic_t *destination) F_attribute_visibility_internal_d; + extern f_status_t private_fl_fss_basic_list_write_add_until_end(const f_string_static_t buffer, f_state_t state, f_string_range_t * const range, f_string_dynamic_t * const destination) F_attribute_visibility_internal_d; #endif // !defined(_di_fl_fss_basic_list_content_write_) || !defined(_di_fl_fss_extended_list_content_write_) || !defined(_di_fl_fss_embedded_list_content_write_) /** @@ -112,7 +112,7 @@ extern "C" { * @see fl_fss_extended_list_object_write() */ #if !defined(_di_fl_fss_basic_list_object_write_) || !defined(_di_fl_fss_extended_list_object_write_) - extern f_status_t private_fl_fss_basic_list_write_object_trim(const f_array_length_t used_start, f_state_t state, f_string_dynamic_t *destination) F_attribute_visibility_internal_d; + extern f_status_t private_fl_fss_basic_list_write_object_trim(const f_array_length_t used_start, f_state_t state, f_string_dynamic_t * const destination) F_attribute_visibility_internal_d; #endif // !defined(_di_fl_fss_basic_list_object_write_) || !defined(_di_fl_fss_extended_list_object_write_) /** @@ -182,7 +182,7 @@ extern "C" { * @see fl_fss_extended_content_read() */ #if !defined(_di_fl_fss_basic_object_read_) || !defined(_di_fl_fss_extended_object_read_) || !defined(_di_fl_fss_extended_content_read_) - extern f_status_t private_fl_fss_basic_read(const f_string_static_t buffer, const bool object_as, f_state_t state, f_string_range_t *range, f_fss_object_t *found, f_fss_quote_t *quoted, f_fss_delimits_t *delimits) F_attribute_visibility_internal_d; + extern f_status_t private_fl_fss_basic_read(const f_string_static_t buffer, const bool object_as, f_state_t state, f_string_range_t * const range, f_fss_object_t * const found, f_fss_quote_t * const quoted, f_fss_delimits_t * const delimits) F_attribute_visibility_internal_d; #endif // !defined(_di_fl_fss_basic_object_read_) || !defined(_di_fl_fss_extended_object_read_) || !defined(_di_fl_fss_extended_content_read_) /** @@ -239,7 +239,7 @@ extern "C" { * @see fl_fss_extended_content_write() */ #if !defined(fl_fss_basic_object_write) || !defined(fl_fss_extended_object_write) || !defined(_di_fl_fss_extended_content_write_) - extern f_status_t private_fl_fss_basic_write(const bool object_as, const f_string_static_t object, const f_fss_quote_t quoted, f_state_t state, f_string_range_t *range, f_string_dynamic_t *destination) F_attribute_visibility_internal_d; + extern f_status_t private_fl_fss_basic_write(const bool object_as, const f_string_static_t object, const f_fss_quote_t quoted, f_state_t state, f_string_range_t * const range, f_string_dynamic_t * const destination) F_attribute_visibility_internal_d; #endif // !defined(fl_fss_basic_object_write) || !defined(fl_fss_extended_object_write) || !defined(_di_fl_fss_extended_content_write_) #ifdef __cplusplus diff --git a/level_1/fl_iki/c/iki.c b/level_1/fl_iki/c/iki.c index 237360b..676d7b8 100644 --- a/level_1/fl_iki/c/iki.c +++ b/level_1/fl_iki/c/iki.c @@ -5,7 +5,7 @@ extern "C" { #endif #ifndef _di_fl_iki_read_ - f_status_t fl_iki_read(const f_state_t state, f_string_static_t * const buffer, f_string_range_t *range, f_iki_variable_t *variable, f_iki_vocabulary_t *vocabulary, f_iki_content_t *content, f_iki_delimits_t *delimits) { + f_status_t fl_iki_read(const f_state_t state, f_string_static_t * const buffer, f_string_range_t * const range, f_iki_variable_t * const variable, f_iki_vocabulary_t * const vocabulary, f_iki_content_t * const content, f_iki_delimits_t * const delimits) { #ifndef _di_level_1_parameter_checking_ if (!buffer) return F_status_set_error(F_parameter); if (!range) return F_status_set_error(F_parameter); diff --git a/level_1/fl_iki/c/iki.h b/level_1/fl_iki/c/iki.h index 2eb8f6b..09c8aae 100644 --- a/level_1/fl_iki/c/iki.h +++ b/level_1/fl_iki/c/iki.h @@ -75,7 +75,7 @@ extern "C" { * @see f_iki_read() */ #ifndef _di_fl_iki_read_ - extern f_status_t fl_iki_read(const f_state_t state, f_string_static_t * const buffer, f_string_range_t *range, f_iki_variable_t *variable, f_iki_vocabulary_t *vocabulary, f_iki_content_t *content, f_iki_delimits_t *delimits); + extern f_status_t fl_iki_read(const f_state_t state, f_string_static_t * const buffer, f_string_range_t * const range, f_iki_variable_t * const variable, f_iki_vocabulary_t * const vocabulary, f_iki_content_t * const content, f_iki_delimits_t * const delimits); #endif // _di_fl_iki_read_ #ifdef __cplusplus diff --git a/level_1/fl_print/c/print.c b/level_1/fl_print/c/print.c index e45b046..42c5032 100644 --- a/level_1/fl_print/c/print.c +++ b/level_1/fl_print/c/print.c @@ -6,7 +6,7 @@ extern "C" { #endif #ifndef _di_fl_print_format_ - f_status_t fl_print_format(const f_string_t string, FILE *stream, ...) { + f_status_t fl_print_format(const f_string_t string, FILE * const stream, ...) { #ifndef _di_level_1_parameter_checking_ if (!string) return F_status_set_error(F_parameter); if (!stream) return F_status_set_error(F_parameter); @@ -42,7 +42,7 @@ extern "C" { #endif // _di_fl_print_format_ #ifndef _di_fl_print_format_convert_ - f_string_t fl_print_format_convert(const f_string_t string, FILE *stream, va_list *ap, f_status_t *status) { + f_string_t fl_print_format_convert(const f_string_t string, FILE * const stream, va_list * const ap, f_status_t * const status) { #ifndef _di_level_1_parameter_checking_ if (!stream) return 0; if (!ap) return 0; @@ -53,7 +53,7 @@ extern "C" { #endif // _di_fl_print_format_convert_ #ifndef _di_fl_print_string_va_ - f_status_t fl_print_string_va(const f_string_t string, FILE *stream, va_list *ap) { + f_status_t fl_print_string_va(const f_string_t string, FILE * const stream, va_list * const ap) { #ifndef _di_level_1_parameter_checking_ if (!string) return F_status_set_error(F_parameter); if (!stream) return F_status_set_error(F_parameter); @@ -84,7 +84,7 @@ extern "C" { #endif // _di_fl_print_string_va_ #ifndef _di_fl_print_trim_ - f_status_t fl_print_trim(const f_string_t string, const f_array_length_t length, FILE *stream) { + f_status_t fl_print_trim(const f_string_t string, const f_array_length_t length, FILE * const stream) { #ifndef _di_level_1_parameter_checking_ if (!stream) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ @@ -98,7 +98,7 @@ extern "C" { #endif // _di_fl_print_trim_ #ifndef _di_fl_print_trim_raw_ - f_status_t fl_print_trim_raw(const f_string_t string, const f_array_length_t length, FILE *stream) { + f_status_t fl_print_trim_raw(const f_string_t string, const f_array_length_t length, FILE * const stream) { #ifndef _di_level_1_parameter_checking_ if (!stream) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ @@ -112,7 +112,7 @@ extern "C" { #endif // _di_fl_print_trim_raw_ #ifndef _di_fl_print_trim_raw_safely_ - f_status_t fl_print_trim_raw_safely(const f_string_t string, const f_array_length_t length, FILE *stream) { + f_status_t fl_print_trim_raw_safely(const f_string_t string, const f_array_length_t length, FILE * const stream) { #ifndef _di_level_1_parameter_checking_ if (!stream) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ @@ -126,7 +126,7 @@ extern "C" { #endif // _di_fl_print_trim_raw_safely_ #ifndef _di_fl_print_trim_safely_ - f_status_t fl_print_trim_safely(const f_string_t string, const f_array_length_t length, FILE *stream) { + f_status_t fl_print_trim_safely(const f_string_t string, const f_array_length_t length, FILE * const stream) { #ifndef _di_level_1_parameter_checking_ if (!stream) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ @@ -140,7 +140,7 @@ extern "C" { #endif // _di_fl_print_trim_safely_ #ifndef _di_fl_print_trim_dynamic_ - f_status_t fl_print_trim_dynamic(const f_string_static_t buffer, FILE *stream) { + f_status_t fl_print_trim_dynamic(const f_string_static_t buffer, FILE * const stream) { #ifndef _di_level_1_parameter_checking_ if (!stream) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ @@ -154,7 +154,7 @@ extern "C" { #endif // _di_fl_print_trim_dynamic_ #ifndef _di_fl_print_trim_dynamic_raw_ - f_status_t fl_print_trim_dynamic_raw(const f_string_static_t buffer, FILE *stream) { + f_status_t fl_print_trim_dynamic_raw(const f_string_static_t buffer, FILE * const stream) { #ifndef _di_level_1_parameter_checking_ if (!stream) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ @@ -168,7 +168,7 @@ extern "C" { #endif // _di_fl_print_trim_dynamic_raw_ #ifndef _di_fl_print_trim_dynamic_raw_safely_ - f_status_t fl_print_trim_dynamic_raw_safely(const f_string_static_t buffer, FILE *stream) { + f_status_t fl_print_trim_dynamic_raw_safely(const f_string_static_t buffer, FILE * const stream) { #ifndef _di_level_1_parameter_checking_ if (!stream) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ @@ -182,7 +182,7 @@ extern "C" { #endif // _di_fl_print_trim_dynamic_raw_safely_ #ifndef _di_fl_print_trim_dynamic_safely_ - f_status_t fl_print_trim_dynamic_safely(const f_string_static_t buffer, FILE *stream) { + f_status_t fl_print_trim_dynamic_safely(const f_string_static_t buffer, FILE * const stream) { #ifndef _di_level_1_parameter_checking_ if (!stream) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ @@ -196,7 +196,7 @@ extern "C" { #endif // _di_fl_print_trim_dynamic_safely_ #ifndef _di_fl_print_trim_dynamic_partial_ - f_status_t fl_print_trim_dynamic_partial(const f_string_static_t buffer, const f_string_range_t range, FILE *stream) { + f_status_t fl_print_trim_dynamic_partial(const f_string_static_t buffer, const f_string_range_t range, FILE * const stream) { #ifndef _di_level_1_parameter_checking_ if (!stream) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ @@ -216,7 +216,7 @@ extern "C" { #endif // _di_fl_print_trim_dynamic_partial_ #ifndef _di_fl_print_trim_dynamic_partial_raw_ - f_status_t fl_print_trim_dynamic_partial_raw(const f_string_static_t buffer, const f_string_range_t range, FILE *stream) { + f_status_t fl_print_trim_dynamic_partial_raw(const f_string_static_t buffer, const f_string_range_t range, FILE * const stream) { #ifndef _di_level_1_parameter_checking_ if (!stream) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ @@ -236,7 +236,7 @@ extern "C" { #endif // _di_fl_print_trim_dynamic_partial_raw_ #ifndef _di_fl_print_trim_dynamic_partial_raw_safely_ - f_status_t fl_print_trim_dynamic_partial_raw_safely(const f_string_static_t buffer, const f_string_range_t range, FILE *stream) { + f_status_t fl_print_trim_dynamic_partial_raw_safely(const f_string_static_t buffer, const f_string_range_t range, FILE * const stream) { #ifndef _di_level_1_parameter_checking_ if (!stream) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ @@ -256,7 +256,7 @@ extern "C" { #endif // _di_fl_print_trim_dynamic_partial_raw_safely_ #ifndef _di_fl_print_trim_dynamic_partial_safely_ - f_status_t fl_print_trim_dynamic_partial_safely(const f_string_static_t buffer, const f_string_range_t range, FILE *stream) { + f_status_t fl_print_trim_dynamic_partial_safely(const f_string_static_t buffer, const f_string_range_t range, FILE * const stream) { #ifndef _di_level_1_parameter_checking_ if (!stream) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ @@ -276,7 +276,7 @@ extern "C" { #endif // _di_fl_print_trim_dynamic_partial_safely_ #ifndef _di_fl_print_trim_except_ - f_status_t fl_print_trim_except(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except_at, FILE *stream) { + f_status_t fl_print_trim_except(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except_at, FILE * const stream) { #ifndef _di_level_1_parameter_checking_ if (!stream) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ @@ -292,7 +292,7 @@ extern "C" { #endif // _di_fl_print_trim_except_ #ifndef _di_fl_print_trim_except_raw_ - f_status_t fl_print_trim_except_raw(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except_at, FILE *stream) { + f_status_t fl_print_trim_except_raw(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except_at, FILE * const stream) { #ifndef _di_level_1_parameter_checking_ if (!stream) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ @@ -308,7 +308,7 @@ extern "C" { #endif // _di_fl_print_trim_except_raw_ #ifndef _di_fl_print_trim_except_raw_safely_ - f_status_t fl_print_trim_except_raw_safely(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except_at, FILE *stream) { + f_status_t fl_print_trim_except_raw_safely(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except_at, FILE * const stream) { #ifndef _di_level_1_parameter_checking_ if (!stream) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ @@ -324,7 +324,7 @@ extern "C" { #endif // _di_fl_print_trim_except_raw_safely_ #ifndef _di_fl_print_trim_except_safely_ - f_status_t fl_print_trim_except_safely(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except_at, FILE *stream) { + f_status_t fl_print_trim_except_safely(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except_at, FILE * const stream) { #ifndef _di_level_1_parameter_checking_ if (!stream) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ @@ -340,7 +340,7 @@ extern "C" { #endif // _di_fl_print_trim_except_safely_ #ifndef _di_fl_print_trim_except_dynamic_ - f_status_t fl_print_trim_except_dynamic(const f_string_static_t buffer, const f_array_lengths_t except_at, FILE *stream) { + f_status_t fl_print_trim_except_dynamic(const f_string_static_t buffer, const f_array_lengths_t except_at, FILE * const stream) { #ifndef _di_level_1_parameter_checking_ if (!stream) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ @@ -356,7 +356,7 @@ extern "C" { #endif // _di_fl_print_trim_except_dynamic_ #ifndef _di_fl_print_trim_except_dynamic_raw_ - f_status_t fl_print_trim_except_dynamic_raw(const f_string_static_t buffer, const f_array_lengths_t except_at, FILE *stream) { + f_status_t fl_print_trim_except_dynamic_raw(const f_string_static_t buffer, const f_array_lengths_t except_at, FILE * const stream) { #ifndef _di_level_1_parameter_checking_ if (!stream) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ @@ -372,7 +372,7 @@ extern "C" { #endif // _di_fl_print_trim_except_dynamic_raw_ #ifndef _di_fl_print_trim_except_dynamic_raw_safely_ - f_status_t fl_print_trim_except_dynamic_raw_safely(const f_string_static_t buffer, const f_array_lengths_t except_at, FILE *stream) { + f_status_t fl_print_trim_except_dynamic_raw_safely(const f_string_static_t buffer, const f_array_lengths_t except_at, FILE * const stream) { #ifndef _di_level_1_parameter_checking_ if (!stream) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ @@ -388,7 +388,7 @@ extern "C" { #endif // _di_fl_print_trim_except_dynamic_raw_safely_ #ifndef _di_fl_print_trim_except_dynamic_safely_ - f_status_t fl_print_trim_except_dynamic_safely(const f_string_static_t buffer, const f_array_lengths_t except_at, FILE *stream) { + f_status_t fl_print_trim_except_dynamic_safely(const f_string_static_t buffer, const f_array_lengths_t except_at, FILE * const stream) { #ifndef _di_level_1_parameter_checking_ if (!stream) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ @@ -404,7 +404,7 @@ extern "C" { #endif // _di_fl_print_trim_except_dynamic_safely_ #ifndef _di_fl_print_trim_except_in_ - f_status_t fl_print_trim_except_in(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE *stream) { + f_status_t fl_print_trim_except_in(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE * const stream) { #ifndef _di_level_1_parameter_checking_ if (!stream) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ @@ -418,7 +418,7 @@ extern "C" { #endif // _di_fl_print_trim_except_in_ #ifndef _di_fl_print_trim_except_in_raw_ - f_status_t fl_print_trim_except_in_raw(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE *stream) { + f_status_t fl_print_trim_except_in_raw(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE * const stream) { #ifndef _di_level_1_parameter_checking_ if (!stream) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ @@ -432,7 +432,7 @@ extern "C" { #endif // _di_fl_print_trim_except_in_raw_ #ifndef _di_fl_print_trim_except_in_raw_safely_ - f_status_t fl_print_trim_except_in_raw_safely(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE *stream) { + f_status_t fl_print_trim_except_in_raw_safely(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE * const stream) { #ifndef _di_level_1_parameter_checking_ if (!stream) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ @@ -446,7 +446,7 @@ extern "C" { #endif // _di_fl_print_trim_except_in_raw_safely_ #ifndef _di_fl_print_trim_except_in_safely_ - f_status_t fl_print_trim_except_in_safely(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE *stream) { + f_status_t fl_print_trim_except_in_safely(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE * const stream) { #ifndef _di_level_1_parameter_checking_ if (!stream) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ @@ -460,7 +460,7 @@ extern "C" { #endif // _di_fl_print_trim_except_in_safely_ #ifndef _di_fl_print_trim_except_in_dynamic_ - f_status_t fl_print_trim_except_in_dynamic(const f_string_static_t buffer, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE *stream) { + f_status_t fl_print_trim_except_in_dynamic(const f_string_static_t buffer, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE * const stream) { #ifndef _di_level_1_parameter_checking_ if (!stream) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ @@ -474,7 +474,7 @@ extern "C" { #endif // _di_fl_print_trim_except_in_dynamic_ #ifndef _di_fl_print_trim_except_in_dynamic_raw_ - f_status_t fl_print_trim_except_in_dynamic_raw(const f_string_static_t buffer, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE *stream) { + f_status_t fl_print_trim_except_in_dynamic_raw(const f_string_static_t buffer, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE * const stream) { #ifndef _di_level_1_parameter_checking_ if (!stream) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ @@ -488,7 +488,7 @@ extern "C" { #endif // _di_fl_print_trim_except_in_dynamic_raw_ #ifndef _di_fl_print_trim_except_in_dynamic_raw_safely_ - f_status_t fl_print_trim_except_in_dynamic_raw_safely(const f_string_static_t buffer, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE *stream) { + f_status_t fl_print_trim_except_in_dynamic_raw_safely(const f_string_static_t buffer, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE * const stream) { #ifndef _di_level_1_parameter_checking_ if (!stream) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ @@ -502,7 +502,7 @@ extern "C" { #endif // _di_fl_print_trim_except_in_dynamic_raw_safely_ #ifndef _di_fl_print_trim_except_in_dynamic_safely_ - f_status_t fl_print_trim_except_in_dynamic_safely(const f_string_static_t buffer, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE *stream) { + f_status_t fl_print_trim_except_in_dynamic_safely(const f_string_static_t buffer, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE * const stream) { #ifndef _di_level_1_parameter_checking_ if (!stream) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ @@ -516,7 +516,7 @@ extern "C" { #endif // _di_fl_print_trim_except_in_dynamic_safely_ #ifndef _di_fl_print_trim_except_in_dynamic_partial_ - f_status_t fl_print_trim_except_in_dynamic_partial(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE *stream) { + f_status_t fl_print_trim_except_in_dynamic_partial(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE * const stream) { #ifndef _di_level_1_parameter_checking_ if (!stream) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ @@ -536,7 +536,7 @@ extern "C" { #endif // _di_fl_print_trim_except_in_dynamic_partial_ #ifndef _di_fl_print_trim_except_in_dynamic_partial_raw_ - f_status_t fl_print_trim_except_in_dynamic_partial_raw(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE *stream) { + f_status_t fl_print_trim_except_in_dynamic_partial_raw(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE * const stream) { #ifndef _di_level_1_parameter_checking_ if (!stream) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ @@ -556,7 +556,7 @@ extern "C" { #endif // _di_fl_print_trim_except_in_dynamic_partial_raw_ #ifndef _di_fl_print_trim_except_in_dynamic_partial_raw_safely_ - f_status_t fl_print_trim_except_in_dynamic_partial_raw_safely(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE *stream) { + f_status_t fl_print_trim_except_in_dynamic_partial_raw_safely(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE * const stream) { #ifndef _di_level_1_parameter_checking_ if (!stream) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ @@ -576,7 +576,7 @@ extern "C" { #endif // _di_fl_print_trim_except_in_dynamic_partial_raw_safely_ #ifndef _di_fl_print_trim_except_in_dynamic_partial_safely_ - f_status_t fl_print_trim_except_in_dynamic_partial_safely(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE *stream) { + f_status_t fl_print_trim_except_in_dynamic_partial_safely(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE * const stream) { #ifndef _di_level_1_parameter_checking_ if (!stream) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ @@ -596,7 +596,7 @@ extern "C" { #endif // _di_fl_print_trim_except_in_dynamic_partial_safely_ #ifndef _di_fl_print_trim_except_dynamic_partial_ - f_status_t fl_print_trim_except_dynamic_partial(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except, FILE *stream) { + f_status_t fl_print_trim_except_dynamic_partial(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except, FILE * const stream) { #ifndef _di_level_1_parameter_checking_ if (!stream) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ @@ -618,7 +618,7 @@ extern "C" { #endif // _di_fl_print_trim_except_dynamic_partial_ #ifndef _di_fl_print_trim_except_dynamic_partial_raw_ - f_status_t fl_print_trim_except_dynamic_partial_raw(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except, FILE *stream) { + f_status_t fl_print_trim_except_dynamic_partial_raw(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except, FILE * const stream) { #ifndef _di_level_1_parameter_checking_ if (!stream) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ @@ -640,7 +640,7 @@ extern "C" { #endif // _di_fl_print_trim_except_dynamic_partial_raw_ #ifndef _di_fl_print_trim_except_dynamic_partial_raw_safely_ - f_status_t fl_print_trim_except_dynamic_partial_raw_safely(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except, FILE *stream) { + f_status_t fl_print_trim_except_dynamic_partial_raw_safely(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except, FILE * const stream) { #ifndef _di_level_1_parameter_checking_ if (!stream) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ @@ -662,7 +662,7 @@ extern "C" { #endif // _di_fl_print_trim_except_dynamic_partial_raw_safely_ #ifndef _di_fl_print_trim_except_dynamic_partial_safely_ - f_status_t fl_print_trim_except_dynamic_partial_safely(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except, FILE *stream) { + f_status_t fl_print_trim_except_dynamic_partial_safely(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except, FILE * const stream) { #ifndef _di_level_1_parameter_checking_ if (!stream) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ diff --git a/level_1/fl_print/c/print.h b/level_1/fl_print/c/print.h index 6b50645..4107a08 100644 --- a/level_1/fl_print/c/print.h +++ b/level_1/fl_print/c/print.h @@ -221,7 +221,7 @@ extern "C" { * @see f_print_terminated() */ #ifndef _di_fl_print_format_ - extern f_status_t fl_print_format(const f_string_t string, FILE *stream, ...); + extern f_status_t fl_print_format(const f_string_t string, FILE * const stream, ...); #endif // _di_fl_print_format_ /** @@ -280,7 +280,7 @@ extern "C" { * @see f_print_terminated() */ #ifndef _di_fl_print_format_convert_ - extern f_string_t fl_print_format_convert(const f_string_t string, FILE *stream, va_list *ap, f_status_t *status); + extern f_string_t fl_print_format_convert(const f_string_t string, FILE * const stream, va_list * const ap, f_status_t * const status); #endif // _di_fl_print_format_convert_ /** @@ -328,7 +328,7 @@ extern "C" { * @see fl_print_format() */ #ifndef _di_fl_print_string_va_ - extern f_status_t fl_print_string_va(const f_string_t string, FILE *stream, va_list *ap); + extern f_status_t fl_print_string_va(const f_string_t string, FILE * const stream, va_list * const ap); #endif // _di_fl_print_string_va_ /** @@ -363,7 +363,7 @@ extern "C" { * @see fputc_unlocked() */ #ifndef _di_fl_print_trim_ - extern f_status_t fl_print_trim(const f_string_t string, const f_array_length_t length, FILE *stream); + extern f_status_t fl_print_trim(const f_string_t string, const f_array_length_t length, FILE * const stream); #endif // _di_fl_print_trim_ /** @@ -399,7 +399,7 @@ extern "C" { * @see fputc_unlocked() */ #ifndef _di_fl_print_trim_raw_ - extern f_status_t fl_print_trim_raw(const f_string_t string, const f_array_length_t length, FILE *stream); + extern f_status_t fl_print_trim_raw(const f_string_t string, const f_array_length_t length, FILE * const stream); #endif // _di_fl_print_trim_raw_ /** @@ -436,7 +436,7 @@ extern "C" { * @see fputc_unlocked() */ #ifndef _di_fl_print_trim_raw_safely_ - extern f_status_t fl_print_trim_raw_safely(const f_string_t string, const f_array_length_t length, FILE *stream); + extern f_status_t fl_print_trim_raw_safely(const f_string_t string, const f_array_length_t length, FILE * const stream); #endif // _di_fl_print_trim_raw_safely_ /** @@ -471,7 +471,7 @@ extern "C" { * @see fputc_unlocked() */ #ifndef _di_fl_print_trim_safely_ - extern f_status_t fl_print_trim_safely(const f_string_t string, const f_array_length_t length, FILE *stream); + extern f_status_t fl_print_trim_safely(const f_string_t string, const f_array_length_t length, FILE * const stream); #endif // _di_fl_print_trim_safely_ /** @@ -507,7 +507,7 @@ extern "C" { * @see fputc_unlocked() */ #ifndef _di_fl_print_trim_dynamic_ - extern f_status_t fl_print_trim_dynamic(const f_string_static_t buffer, FILE *stream); + extern f_status_t fl_print_trim_dynamic(const f_string_static_t buffer, FILE * const stream); #endif // _di_fl_print_trim_dynamic_ /** @@ -544,7 +544,7 @@ extern "C" { * @see fputc_unlocked() */ #ifndef _di_fl_print_trim_dynamic_raw_ - extern f_status_t fl_print_trim_dynamic_raw(const f_string_static_t buffer, FILE *stream); + extern f_status_t fl_print_trim_dynamic_raw(const f_string_static_t buffer, FILE * const stream); #endif // _di_fl_print_trim_dynamic_raw_ /** @@ -582,7 +582,7 @@ extern "C" { * @see fputc_unlocked() */ #ifndef _di_fl_print_trim_dynamic_raw_safely_ - extern f_status_t fl_print_trim_dynamic_raw_safely(const f_string_static_t buffer, FILE *stream); + extern f_status_t fl_print_trim_dynamic_raw_safely(const f_string_static_t buffer, FILE * const stream); #endif // _di_fl_print_trim_dynamic_raw_safely_ /** @@ -618,7 +618,7 @@ extern "C" { * @see fputc_unlocked() */ #ifndef _di_fl_print_trim_dynamic_safely_ - extern f_status_t fl_print_trim_dynamic_safely(const f_string_static_t buffer, FILE *stream); + extern f_status_t fl_print_trim_dynamic_safely(const f_string_static_t buffer, FILE * const stream); #endif // _di_fl_print_trim_dynamic_safely_ /** @@ -656,7 +656,7 @@ extern "C" { * @see fputc_unlocked() */ #ifndef _di_fl_print_trim_dynamic_partial_ - extern f_status_t fl_print_trim_dynamic_partial(const f_string_static_t buffer, const f_string_range_t range, FILE *stream); + extern f_status_t fl_print_trim_dynamic_partial(const f_string_static_t buffer, const f_string_range_t range, FILE * const stream); #endif // _di_fl_print_trim_dynamic_partial_ /** @@ -695,7 +695,7 @@ extern "C" { * @see fputc_unlocked() */ #ifndef _di_fl_print_trim_dynamic_partial_raw_ - extern f_status_t fl_print_trim_dynamic_partial_raw(const f_string_static_t buffer, const f_string_range_t range, FILE *stream); + extern f_status_t fl_print_trim_dynamic_partial_raw(const f_string_static_t buffer, const f_string_range_t range, FILE * const stream); #endif // _di_fl_print_trim_dynamic_partial_raw_ /** @@ -735,7 +735,7 @@ extern "C" { * @see fputc_unlocked() */ #ifndef _di_fl_print_trim_dynamic_partial_raw_safely_ - extern f_status_t fl_print_trim_dynamic_partial_raw_safely(const f_string_static_t buffer, const f_string_range_t range, FILE *stream); + extern f_status_t fl_print_trim_dynamic_partial_raw_safely(const f_string_static_t buffer, const f_string_range_t range, FILE * const stream); #endif // _di_fl_print_trim_dynamic_partial_raw_safely_ /** @@ -773,7 +773,7 @@ extern "C" { * @see fputc_unlocked() */ #ifndef _di_fl_print_trim_dynamic_partial_safely_ - extern f_status_t fl_print_trim_dynamic_partial_safely(const f_string_static_t buffer, const f_string_range_t range, FILE *stream); + extern f_status_t fl_print_trim_dynamic_partial_safely(const f_string_static_t buffer, const f_string_range_t range, FILE * const stream); #endif // _di_fl_print_trim_dynamic_partial_safely_ /** @@ -816,7 +816,7 @@ extern "C" { * @see fputc_unlocked() */ #ifndef _di_fl_print_trim_except_ - extern f_status_t fl_print_trim_except(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except_at, FILE *stream); + extern f_status_t fl_print_trim_except(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except_at, FILE * const stream); #endif // _di_fl_print_trim_except_ /** @@ -860,7 +860,7 @@ extern "C" { * @see fputc_unlocked() */ #ifndef _di_fl_print_trim_except_raw_ - extern f_status_t fl_print_trim_except_raw(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except_at, FILE *stream); + extern f_status_t fl_print_trim_except_raw(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except_at, FILE * const stream); #endif // _di_fl_print_trim_except_raw_ /** @@ -905,7 +905,7 @@ extern "C" { * @see fputc_unlocked() */ #ifndef _di_fl_print_trim_except_raw_safely_ - extern f_status_t fl_print_trim_except_raw_safely(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except_at, FILE *stream); + extern f_status_t fl_print_trim_except_raw_safely(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except_at, FILE * const stream); #endif // _di_fl_print_trim_except_raw_safely_ /** @@ -948,7 +948,7 @@ extern "C" { * @see fputc_unlocked() */ #ifndef _di_fl_print_trim_except_safely_ - extern f_status_t fl_print_trim_except_safely(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except_at, FILE *stream); + extern f_status_t fl_print_trim_except_safely(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except_at, FILE * const stream); #endif // _di_fl_print_trim_except_safely_ /** @@ -988,7 +988,7 @@ extern "C" { * @see fputc_unlocked() */ #ifndef _di_fl_print_trim_except_dynamic_ - extern f_status_t fl_print_trim_except_dynamic(const f_string_static_t buffer, const f_array_lengths_t except_at, FILE *stream); + extern f_status_t fl_print_trim_except_dynamic(const f_string_static_t buffer, const f_array_lengths_t except_at, FILE * const stream); #endif // _di_fl_print_trim_except_dynamic_ /** @@ -1029,7 +1029,7 @@ extern "C" { * @see fputc_unlocked() */ #ifndef _di_fl_print_trim_except_dynamic_raw_ - extern f_status_t fl_print_trim_except_dynamic_raw(const f_string_static_t buffer, const f_array_lengths_t except_at, FILE *stream); + extern f_status_t fl_print_trim_except_dynamic_raw(const f_string_static_t buffer, const f_array_lengths_t except_at, FILE * const stream); #endif // _di_fl_print_trim_except_dynamic_raw_ /** @@ -1071,7 +1071,7 @@ extern "C" { * @see fputc_unlocked() */ #ifndef _di_fl_print_trim_except_dynamic_raw_safely_ - extern f_status_t fl_print_trim_except_dynamic_raw_safely(const f_string_static_t buffer, const f_array_lengths_t except_at, FILE *stream); + extern f_status_t fl_print_trim_except_dynamic_raw_safely(const f_string_static_t buffer, const f_array_lengths_t except_at, FILE * const stream); #endif // _di_fl_print_trim_except_dynamic_raw_safely_ /** @@ -1111,7 +1111,7 @@ extern "C" { * @see fputc_unlocked() */ #ifndef _di_fl_print_trim_except_dynamic_safely_ - extern f_status_t fl_print_trim_except_dynamic_safely(const f_string_static_t buffer, const f_array_lengths_t except_at, FILE *stream); + extern f_status_t fl_print_trim_except_dynamic_safely(const f_string_static_t buffer, const f_array_lengths_t except_at, FILE * const stream); #endif // _di_fl_print_trim_except_dynamic_safely_ /** @@ -1158,7 +1158,7 @@ extern "C" { * @see fputc_unlocked() */ #ifndef _di_fl_print_trim_except_in_ - extern f_status_t fl_print_trim_except_in(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE *stream); + extern f_status_t fl_print_trim_except_in(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE * const stream); #endif // _di_fl_print_trim_except_in_ /** @@ -1206,7 +1206,7 @@ extern "C" { * @see fputc_unlocked() */ #ifndef _di_fl_print_trim_except_in_raw_ - extern f_status_t fl_print_trim_except_in_raw(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE *stream); + extern f_status_t fl_print_trim_except_in_raw(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE * const stream); #endif // _di_fl_print_trim_except_in_raw_ /** @@ -1255,7 +1255,7 @@ extern "C" { * @see fputc_unlocked() */ #ifndef _di_fl_print_trim_except_in_raw_safely_ - extern f_status_t fl_print_trim_except_in_raw_safely(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE *stream); + extern f_status_t fl_print_trim_except_in_raw_safely(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE * const stream); #endif // _di_fl_print_trim_except_in_raw_safely_ /** @@ -1302,7 +1302,7 @@ extern "C" { * @see fputc_unlocked() */ #ifndef _di_fl_print_trim_except_in_safely_ - extern f_status_t fl_print_trim_except_in_safely(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE *stream); + extern f_status_t fl_print_trim_except_in_safely(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE * const stream); #endif // _di_fl_print_trim_except_in_safely_ /** @@ -1348,7 +1348,7 @@ extern "C" { * @see fputc_unlocked() */ #ifndef _di_fl_print_trim_except_in_dynamic_ - extern f_status_t fl_print_trim_except_in_dynamic(const f_string_static_t buffer, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE *stream); + extern f_status_t fl_print_trim_except_in_dynamic(const f_string_static_t buffer, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE * const stream); #endif // _di_fl_print_trim_except_in_dynamic_ /** @@ -1393,7 +1393,7 @@ extern "C" { * @see fputc_unlocked() */ #ifndef _di_fl_print_trim_except_in_dynamic_raw_ - extern f_status_t fl_print_trim_except_in_dynamic_raw(const f_string_static_t buffer, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE *stream); + extern f_status_t fl_print_trim_except_in_dynamic_raw(const f_string_static_t buffer, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE * const stream); #endif // _di_fl_print_trim_except_in_dynamic_raw_ /** @@ -1439,7 +1439,7 @@ extern "C" { * @see fputc_unlocked() */ #ifndef _di_fl_print_trim_except_in_dynamic_raw_safely_ - extern f_status_t fl_print_trim_except_in_dynamic_raw_safely(const f_string_static_t buffer, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE *stream); + extern f_status_t fl_print_trim_except_in_dynamic_raw_safely(const f_string_static_t buffer, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE * const stream); #endif // _di_fl_print_trim_except_in_dynamic_raw_safely_ /** @@ -1483,7 +1483,7 @@ extern "C" { * @see fputc_unlocked() */ #ifndef _di_fl_print_trim_except_in_dynamic_safely_ - extern f_status_t fl_print_trim_except_in_dynamic_safely(const f_string_static_t buffer, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE *stream); + extern f_status_t fl_print_trim_except_in_dynamic_safely(const f_string_static_t buffer, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE * const stream); #endif // _di_fl_print_trim_except_in_dynamic_safely_ /** @@ -1529,7 +1529,7 @@ extern "C" { * @see fputc_unlocked() */ #ifndef _di_fl_print_trim_except_in_dynamic_partial_ - extern f_status_t fl_print_trim_except_in_dynamic_partial(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE *stream); + extern f_status_t fl_print_trim_except_in_dynamic_partial(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE * const stream); #endif // _di_fl_print_trim_except_in_dynamic_partial_ /** @@ -1576,7 +1576,7 @@ extern "C" { * @see fputc_unlocked() */ #ifndef _di_fl_print_trim_except_in_dynamic_partial_raw_ - extern f_status_t fl_print_trim_except_in_dynamic_partial_raw(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE *stream); + extern f_status_t fl_print_trim_except_in_dynamic_partial_raw(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE * const stream); #endif // _di_fl_print_trim_except_in_dynamic_partial_raw_ /** @@ -1624,7 +1624,7 @@ extern "C" { * @see fputc_unlocked() */ #ifndef _di_fl_print_trim_except_in_dynamic_partial_raw_safely_ - extern f_status_t fl_print_trim_except_in_dynamic_partial_raw_safely(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE *stream); + extern f_status_t fl_print_trim_except_in_dynamic_partial_raw_safely(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE * const stream); #endif // _di_fl_print_trim_except_in_dynamic_partial_raw_safely_ /** @@ -1670,7 +1670,7 @@ extern "C" { * @see fputc_unlocked() */ #ifndef _di_fl_print_trim_except_in_dynamic_partial_safely_ - extern f_status_t fl_print_trim_except_in_dynamic_partial_safely(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE *stream); + extern f_status_t fl_print_trim_except_in_dynamic_partial_safely(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE * const stream); #endif // _di_fl_print_trim_except_in_dynamic_partial_safely_ /** @@ -1712,7 +1712,7 @@ extern "C" { * @see fputc_unlocked() */ #ifndef _di_fl_print_trim_except_dynamic_partial_ - extern f_status_t fl_print_trim_except_dynamic_partial(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except, FILE *stream); + extern f_status_t fl_print_trim_except_dynamic_partial(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except, FILE * const stream); #endif // _di_fl_print_trim_except_dynamic_partial_ /** @@ -1755,7 +1755,7 @@ extern "C" { * @see fputc_unlocked() */ #ifndef _di_fl_print_trim_except_dynamic_partial_raw_ - extern f_status_t fl_print_trim_except_dynamic_partial_raw(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except, FILE *stream); + extern f_status_t fl_print_trim_except_dynamic_partial_raw(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except, FILE * const stream); #endif // _di_fl_print_trim_except_dynamic_partial_raw_ /** @@ -1799,7 +1799,7 @@ extern "C" { * @see fputc_unlocked() */ #ifndef _di_fl_print_trim_except_dynamic_partial_raw_safely_ - extern f_status_t fl_print_trim_except_dynamic_partial_raw_safely(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except, FILE *stream); + extern f_status_t fl_print_trim_except_dynamic_partial_raw_safely(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except, FILE * const stream); #endif // _di_fl_print_trim_except_dynamic_partial_raw_safely_ /** @@ -1841,7 +1841,7 @@ extern "C" { * @see fputc_unlocked() */ #ifndef _di_fl_print_trim_except_dynamic_partial_safely_ - extern f_status_t fl_print_trim_except_dynamic_partial_safely(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except, FILE *stream); + extern f_status_t fl_print_trim_except_dynamic_partial_safely(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except, FILE * const stream); #endif // _di_fl_print_trim_except_dynamic_partial_safely_ #ifdef __cplusplus diff --git a/level_1/fl_print/c/private-print.c b/level_1/fl_print/c/private-print.c index 284ff89..983b1b8 100644 --- a/level_1/fl_print/c/private-print.c +++ b/level_1/fl_print/c/private-print.c @@ -6,7 +6,7 @@ extern "C" { #endif #if !defined(_di_fl_print_format_) || !defined(_di_fl_print_format_convert_) - f_string_t private_fl_print_format_convert(f_string_t string, FILE *stream, va_list *ap, f_status_t *status) { + f_string_t private_fl_print_format_convert(f_string_t string, FILE * const stream, va_list * const ap, f_status_t * const status) { const f_string_t start = string; @@ -1132,7 +1132,7 @@ extern "C" { #endif // !defined(_di_fl_print_format_) || !defined(_di_fl_print_format_convert_) #if !defined(_di_fl_print_format_) || !defined(_di_fl_print_format_convert_) - f_string_t private_fl_print_convert_number(f_string_t string, va_list *ap, unsigned int *number, f_status_t *status) { + f_string_t private_fl_print_convert_number(f_string_t string, va_list *ap, unsigned int * const number, f_status_t * const status) { for (*number = 0; *string; string += 1) { @@ -1155,7 +1155,7 @@ extern "C" { #endif // !defined(_di_fl_print_format_) || !defined(_di_fl_print_format_convert_) #if !defined(_di_fl_print_trim_except_) || !defined(_di_fl_print_trim_except_dynamic_) || !defined(_di_fl_print_trim_except_dynamic_partial_) || !defined(_di_fl_print_trim_except_in_) || !defined(_di_fl_print_trim_except_in_dynamic_) || !defined(_di_fl_print_trim_except_in_dynamic_partial_) - f_status_t private_fl_print_trim_except_in(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE *stream) { + f_status_t private_fl_print_trim_except_in(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE * const stream) { f_array_length_t i = offset; f_array_length_t j = 0; @@ -1373,7 +1373,7 @@ extern "C" { #endif // !defined(_di_fl_print_trim_except_) || !defined(_di_fl_print_trim_except_dynamic_) || !defined(_di_fl_print_trim_except_dynamic_partial_) || !defined(_di_fl_print_trim_except_in_) || !defined(_di_fl_print_trim_except_in_dynamic_) || !defined(_di_fl_print_trim_except_in_dynamic_partial_) #if !defined(_di_fl_print_trim_except_raw_) || !defined(_di_fl_print_trim_except_dynamic_raw_) || !defined(_di_fl_print_trim_except_dynamic_partial_raw_) || !defined(_di_fl_print_trim_except_in_raw_) || !defined(_di_fl_print_trim_except_in_dynamic_raw_) || !defined(_di_fl_print_trim_except_in_dynamic_partial_raw_) - f_status_t private_fl_print_trim_except_in_raw(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE *stream) { + f_status_t private_fl_print_trim_except_in_raw(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE * const stream) { f_array_length_t i = offset; f_array_length_t j = 0; @@ -1534,7 +1534,7 @@ extern "C" { #endif // !defined(_di_fl_print_trim_except_raw_) || !defined(_di_fl_print_trim_except_dynamic_raw_) || !defined(_di_fl_print_trim_except_dynamic_partial_raw_) || !defined(_di_fl_print_trim_except_in_raw_) || !defined(_di_fl_print_trim_except_in_dynamic_raw_) || !defined(_di_fl_print_trim_except_in_dynamic_partial_raw_) #if !defined(_di_fl_print_trim_except_raw_safely_) || !defined(_di_fl_print_trim_except_dynamic_raw_safely_) || !defined(_di_fl_print_trim_except_dynamic_partial_raw_safely_) || !defined(_di_fl_print_trim_except_in_raw_safely_) || !defined(_di_fl_print_trim_except_in_dynamic_raw_safely_) || !defined(_di_fl_print_trim_except_in_dynamic_partial_raw_safely_) - f_status_t private_fl_print_trim_except_in_raw_safely(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE *stream) { + f_status_t private_fl_print_trim_except_in_raw_safely(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE * const stream) { f_array_length_t i = offset; f_array_length_t j = 0; @@ -1750,7 +1750,7 @@ extern "C" { #endif // !defined(_di_fl_print_trim_except_raw_safely_) || !defined(_di_fl_print_trim_except_dynamic_raw_safely_) || !defined(_di_fl_print_trim_except_dynamic_partial_raw_safely_) || !defined(_di_fl_print_trim_except_in_raw_safely_) || !defined(_di_fl_print_trim_except_in_dynamic_raw_safely_) || !defined(_di_fl_print_trim_except_in_dynamic_partial_raw_safely_) #if !defined(_di_fl_print_trim_except_safely_) || !defined(_di_fl_print_trim_except_dynamic_safely_) || !defined(_di_fl_print_trim_except_dynamic_partial_safely_) || !defined(_di_fl_print_trim_except_in_safely_) || !defined(_di_fl_print_trim_except_in_dynamic_safely_) || !defined(_di_fl_print_trim_except_in_dynamic_partial_safely_) - f_status_t private_fl_print_trim_except_in_safely(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE *stream) { + f_status_t private_fl_print_trim_except_in_safely(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE * const stream) { f_array_length_t i = offset; f_array_length_t j = 0; @@ -1962,7 +1962,7 @@ extern "C" { #endif // !defined(_di_fl_print_trim_except_safely_) || !defined(_di_fl_print_trim_except_dynamic_safely_) || !defined(_di_fl_print_trim_except_dynamic_partial_safely_) || !defined(_di_fl_print_trim_except_in_safely_) || !defined(_di_fl_print_trim_except_in_dynamic_safely_) || !defined(_di_fl_print_trim_except_in_dynamic_partial_safely_) #if !defined(_di_fl_print_trim_) || !defined(_di_fl_print_trim_dynamic_) || !defined(_di_fl_print_trim_dynamic_partial_) - f_status_t private_fl_print_trim(const f_string_t string, const f_array_length_t length, FILE *stream) { + f_status_t private_fl_print_trim(const f_string_t string, const f_array_length_t length, FILE * const stream) { f_array_length_t i = 0; f_array_length_t j = 0; @@ -2094,7 +2094,7 @@ extern "C" { #endif // !defined(_di_fl_print_trim_) || !defined(_di_fl_print_trim_dynamic_) || !defined(_di_fl_print_trim_dynamic_partial_) #if !defined(_di_fl_print_trim_raw_) || !defined(_di_fl_print_trim_dynamic_raw_) || !defined(_di_fl_print_trim_dynamic_partial_raw_) - f_status_t private_fl_print_trim_raw(const f_string_t string, const f_array_length_t length, FILE *stream) { + f_status_t private_fl_print_trim_raw(const f_string_t string, const f_array_length_t length, FILE * const stream) { f_array_length_t i = 0; f_array_length_t j = 0; @@ -2169,7 +2169,7 @@ extern "C" { #endif // !defined(_di_fl_print_trim_raw_) || !defined(_di_fl_print_trim_dynamic_raw_) || !defined(_di_fl_print_trim_dynamic_partial_raw_) #if !defined(_di_fl_print_trim_raw_safely_) || !defined(_di_fl_print_trim_dynamic_raw_safely_) || !defined(_di_fl_print_trim_dynamic_partial_raw_safely_) - f_status_t private_fl_print_trim_raw_safely(const f_string_t string, const f_array_length_t length, FILE *stream) { + f_status_t private_fl_print_trim_raw_safely(const f_string_t string, const f_array_length_t length, FILE * const stream) { f_array_length_t i = 0; f_array_length_t j = 0; @@ -2299,7 +2299,7 @@ extern "C" { #endif // !defined(_di_fl_print_trim_raw_safely_) || !defined(_di_fl_print_trim_dynamic_raw_safely_) || !defined(_di_fl_print_trim_dynamic_partial_raw_safely_) #if !defined(_di_fl_print_trim_safely_) || !defined(_di_fl_print_trim_dynamic_safely_) || !defined(_di_fl_print_trim_dynamic_partial_safely_) - f_status_t private_fl_print_trim_safely(const f_string_t string, const f_array_length_t length, FILE *stream) { + f_status_t private_fl_print_trim_safely(const f_string_t string, const f_array_length_t length, FILE * const stream) { f_array_length_t i = 0; f_array_length_t j = 0; diff --git a/level_1/fl_print/c/private-print.h b/level_1/fl_print/c/private-print.h index c7b9b23..5d05be2 100644 --- a/level_1/fl_print/c/private-print.h +++ b/level_1/fl_print/c/private-print.h @@ -72,7 +72,7 @@ extern "C" { * @see private_fl_print_convert_number() */ #if !defined(_di_fl_print_format_) || !defined(_di_fl_print_format_convert_) - extern f_string_t private_fl_print_format_convert(f_string_t string, FILE *stream, va_list *ap, f_status_t *status) F_attribute_visibility_internal_d; + extern f_string_t private_fl_print_format_convert(f_string_t string, FILE * const stream, va_list * const ap, f_status_t * const status) F_attribute_visibility_internal_d; #endif // !defined(_di_fl_print_format_) || !defined(_di_fl_print_format_convert_) /** @@ -96,7 +96,7 @@ extern "C" { * @see va_arg() */ #if !defined(_di_fl_print_format_) || !defined(_di_fl_print_format_convert_) - extern f_string_t private_fl_print_convert_number(f_string_t string, va_list *ap, unsigned int *number, f_status_t *status) F_attribute_visibility_internal_d; + extern f_string_t private_fl_print_convert_number(f_string_t string, va_list * const ap, unsigned int * const number, f_status_t * const status) F_attribute_visibility_internal_d; #endif // !defined(_di_fl_print_format_) || !defined(_di_fl_print_format_convert_) /** @@ -142,7 +142,7 @@ extern "C" { * @see fl_print_trim_except_in_dynamic_partial() */ #if !defined(_di_fl_print_trim_except_) || !defined(_di_fl_print_trim_except_dynamic_) || !defined(_di_fl_print_trim_except_dynamic_partial_) || !defined(_di_fl_print_trim_except_in_) || !defined(_di_fl_print_trim_except_in_dynamic_) || !defined(_di_fl_print_trim_except_in_dynamic_partial_) - extern f_status_t private_fl_print_trim_except_in(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE *stream) F_attribute_visibility_internal_d; + extern f_status_t private_fl_print_trim_except_in(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE * const stream) F_attribute_visibility_internal_d; #endif // !defined(_di_fl_print_trim_except_) || !defined(_di_fl_print_trim_except_dynamic_) || !defined(_di_fl_print_trim_except_dynamic_partial_) || !defined(_di_fl_print_trim_except_in_) || !defined(_di_fl_print_trim_except_in_dynamic_) || !defined(_di_fl_print_trim_except_in_dynamic_partial_) /** @@ -186,7 +186,7 @@ extern "C" { * @see fl_print_trim_except_in_dynamic_partial_raw() */ #if !defined(_di_fl_print_trim_except_raw_) || !defined(_di_fl_print_trim_except_dynamic_raw_) || !defined(_di_fl_print_trim_except_dynamic_partial_raw_) || !defined(_di_fl_print_trim_except_in_raw_) || !defined(_di_fl_print_trim_except_in_dynamic_raw_) || !defined(_di_fl_print_trim_except_in_dynamic_partial_raw_) - extern f_status_t private_fl_print_trim_except_in_raw(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE *stream) F_attribute_visibility_internal_d; + extern f_status_t private_fl_print_trim_except_in_raw(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE * const stream) F_attribute_visibility_internal_d; #endif // !defined(_di_fl_print_trim_except_raw_) || !defined(_di_fl_print_trim_except_dynamic_raw_) || !defined(_di_fl_print_trim_except_dynamic_partial_raw_) || !defined(_di_fl_print_trim_except_in_raw_) || !defined(_di_fl_print_trim_except_in_dynamic_raw_) || !defined(_di_fl_print_trim_except_in_dynamic_partial_raw_) /** @@ -231,7 +231,7 @@ extern "C" { * @see fl_print_trim_except_in_dynamic_partial_raw_safely() */ #if !defined(_di_fl_print_trim_except_raw_safely_) || !defined(_di_fl_print_trim_except_dynamic_raw_safely_) || !defined(_di_fl_print_trim_except_dynamic_partial_raw_safely_) || !defined(_di_fl_print_trim_except_in_raw_safely_) || !defined(_di_fl_print_trim_except_in_dynamic_raw_safely_) || !defined(_di_fl_print_trim_except_in_dynamic_partial_raw_safely_) - extern f_status_t private_fl_print_trim_except_in_raw_safely(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE *stream) F_attribute_visibility_internal_d; + extern f_status_t private_fl_print_trim_except_in_raw_safely(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE * const stream) F_attribute_visibility_internal_d; #endif // !defined(_di_fl_print_trim_except_raw_safely_) || !defined(_di_fl_print_trim_except_dynamic_raw_safely_) || !defined(_di_fl_print_trim_except_dynamic_partial_raw_safely_) || !defined(_di_fl_print_trim_except_in_raw_safely_) || !defined(_di_fl_print_trim_except_in_dynamic_raw_safely_) || !defined(_di_fl_print_trim_except_in_dynamic_partial_raw_safely_) /** @@ -276,7 +276,7 @@ extern "C" { * @see fl_print_trim_except_in_dynamic_partial_safely() */ #if !defined(_di_fl_print_trim_except_safely_) || !defined(_di_fl_print_trim_except_dynamic_safely_) || !defined(_di_fl_print_trim_except_dynamic_partial_safely_) || !defined(_di_fl_print_trim_except_in_safely_) || !defined(_di_fl_print_trim_except_in_dynamic_safely_) || !defined(_di_fl_print_trim_except_in_dynamic_partial_safely_) - extern f_status_t private_fl_print_trim_except_in_safely(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE *stream) F_attribute_visibility_internal_d; + extern f_status_t private_fl_print_trim_except_in_safely(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE * const stream) F_attribute_visibility_internal_d; #endif // !defined(_di_fl_print_trim_except_safely_) || !defined(_di_fl_print_trim_except_dynamic_safely_) || !defined(_di_fl_print_trim_except_dynamic_partial_safely_) || !defined(_di_fl_print_trim_except_in_safely_) || !defined(_di_fl_print_trim_except_in_dynamic_safely_) || !defined(_di_fl_print_trim_except_in_dynamic_partial_safely_) /** @@ -311,7 +311,7 @@ extern "C" { * @see fl_print_trim_dynamic_partial() */ #if !defined(_di_fl_print_trim_) || !defined(_di_fl_print_trim_dynamic_) || !defined(_di_fl_print_trim_dynamic_partial_) - extern f_status_t private_fl_print_trim(const f_string_t string, const f_array_length_t length, FILE *stream) F_attribute_visibility_internal_d; + extern f_status_t private_fl_print_trim(const f_string_t string, const f_array_length_t length, FILE * const stream) F_attribute_visibility_internal_d; #endif // !defined(_di_fl_print_trim_) || !defined(_di_fl_print_trim_dynamic_) || !defined(_di_fl_print_trim_dynamic_partial_) /** @@ -344,7 +344,7 @@ extern "C" { * @see fl_print_trim_dynamic_partial_raw() */ #if !defined(_di_fl_print_trim_raw_) || !defined(_di_fl_print_trim_dynamic_raw_) || !defined(_di_fl_print_trim_dynamic_partial_raw_) - extern f_status_t private_fl_print_trim_raw(const f_string_t string, const f_array_length_t length, FILE *stream) F_attribute_visibility_internal_d; + extern f_status_t private_fl_print_trim_raw(const f_string_t string, const f_array_length_t length, FILE * const stream) F_attribute_visibility_internal_d; #endif // !defined(_di_fl_print_trim_raw_) || !defined(_di_fl_print_trim_dynamic_raw_) || !defined(_di_fl_print_trim_dynamic_partial_raw_) /** @@ -378,7 +378,7 @@ extern "C" { * @see fl_print_trim_dynamic_partial_raw_safely() */ #if !defined(_di_fl_print_trim_raw_safely_) || !defined(_di_fl_print_trim_dynamic_raw_safely_) || !defined(_di_fl_print_trim_dynamic_partial_raw_safely_) - extern f_status_t private_fl_print_trim_raw_safely(const f_string_t string, const f_array_length_t length, FILE *stream) F_attribute_visibility_internal_d; + extern f_status_t private_fl_print_trim_raw_safely(const f_string_t string, const f_array_length_t length, FILE * const stream) F_attribute_visibility_internal_d; #endif // !defined(_di_fl_print_trim_raw_safely_) || !defined(_di_fl_print_trim_dynamic_raw_safely_) || !defined(_di_fl_print_trim_dynamic_partial_raw_safely_) /** @@ -412,7 +412,7 @@ extern "C" { * @see fl_print_trim_dynamic_partial_safely() */ #if !defined(_di_fl_print_trim_safely_) || !defined(_di_fl_print_trim_dynamic_safely_) || !defined(_di_fl_print_trim_dynamic_partial_safely_) - extern f_status_t private_fl_print_trim_safely(const f_string_t string, const f_array_length_t length, FILE *stream) F_attribute_visibility_internal_d; + extern f_status_t private_fl_print_trim_safely(const f_string_t string, const f_array_length_t length, FILE * const stream) F_attribute_visibility_internal_d; #endif // !defined(_di_fl_print_trim_safely_) || !defined(_di_fl_print_trim_dynamic_safely_) || !defined(_di_fl_print_trim_dynamic_partial_safely_) #ifdef __cplusplus diff --git a/level_1/fl_signal/c/signal.c b/level_1/fl_signal/c/signal.c index f0a81a6..fdfd71f 100644 --- a/level_1/fl_signal/c/signal.c +++ b/level_1/fl_signal/c/signal.c @@ -5,7 +5,7 @@ extern "C" { #endif #ifndef _di_fl_signal_state_interrupt_ - f_status_t fl_signal_state_interrupt(void *state, void *internal) { + f_status_t fl_signal_state_interrupt(void * const state, void * const internal) { #ifndef _di_level_1_parameter_checking_ if (!state) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ diff --git a/level_1/fl_signal/c/signal.h b/level_1/fl_signal/c/signal.h index 821dbb8..f8ee8de 100644 --- a/level_1/fl_signal/c/signal.h +++ b/level_1/fl_signal/c/signal.h @@ -58,7 +58,7 @@ extern "C" { * @see f_signal_read() */ #ifndef _di_fl_signal_state_interrupt_ - extern f_status_t fl_signal_state_interrupt(void *state, void *internal); + extern f_status_t fl_signal_state_interrupt(void * const state, void * const internal); #endif // _di_fl_signal_state_interrupt_ #ifdef __cplusplus diff --git a/level_1/fl_string/c/private-string.c b/level_1/fl_string/c/private-string.c index c4f24bf..ae970d3 100644 --- a/level_1/fl_string/c/private-string.c +++ b/level_1/fl_string/c/private-string.c @@ -491,8 +491,8 @@ extern "C" { } #endif // !defined(_di_fl_string_compare_trim_) || !defined(_di_fl_string_dynamic_compare_trim_) || !defined(_di_fl_string_dynamic_partial_compare_trim_) -#if !defined(_di_fl_string_rip_) || !defined(_di_fl_string_dynamic_rip_) || !defined(_di_fl_string_rip_nulless_) || !defined(_di_fl_string_dynamic_rip_nulless_) - f_status_t private_fl_string_rip_find_range(const f_string_t source, f_array_length_t *start, f_array_length_t *stop) { +#if !defined(_di_fl_string_rip_) || !defined(_di_fl_string_dynamic_partial_rip_) || !defined(_di_fl_string_rip_nulless_) || !defined(_di_fl_string_dynamic_partial_rip_nulless_) + f_status_t private_fl_string_rip_find_range(const f_string_t source, f_array_length_t * const start, f_array_length_t * const stop) { const f_array_length_t stop_original = *stop; @@ -503,7 +503,7 @@ extern "C" { // Skip past leading whitespace. for (; *start <= *stop; *start += width) { - // skip past NULL. + // Skip past NULL. while (*start < *stop && !source[*start]) ++(*start); if (*start > *stop) break; @@ -524,14 +524,14 @@ extern "C" { for (; *stop > *start; --(*stop)) { - // skip past NULL. + // Skip past NULL. while (*stop > *start && !source[*stop]) --(*stop); if (!source[*stop]) continue; if (*stop == *start) break; - // each UTF-8 character of width 1 is an incomplete part. - // go left until either width is 0 (ascii, or > 1) to determine the character. + // Each UTF-8 character of width 1 is an incomplete part. + // Go left until either width is 0 (ascii, or > 1) to determine the character. for (;;) { width = macro_f_utf_byte_width_is(source[*stop]); @@ -579,7 +579,7 @@ extern "C" { return F_none; } -#endif // !defined(_di_fl_string_rip_) || !defined(_di_fl_string_dynamic_rip_) || !defined(_di_fl_string_rip_nulless_) || !defined(_di_fl_string_dynamic_rip_nulless_) +#endif // !defined(_di_fl_string_rip_) || !defined(_di_fl_string_dynamic_partial_rip_) || !defined(_di_fl_string_rip_nulless_) || !defined(_di_fl_string_dynamic_partial_rip_nulless_) #ifdef __cplusplus } // extern "C" diff --git a/level_1/fl_string/c/private-string.h b/level_1/fl_string/c/private-string.h index a9eeb5a..e9aab0b 100644 --- a/level_1/fl_string/c/private-string.h +++ b/level_1/fl_string/c/private-string.h @@ -181,12 +181,12 @@ extern "C" { * * @see fl_string_rip() * @see fl_string_rip_nulless() - * @see fl_string_dynamic_rip() - * @see fl_string_dynamic_rip_nulless() + * @see fl_string_dynamic_partial_rip() + * @see fl_string_dynamic_partial_rip_nulless() */ -#if !defined(_di_fl_string_rip_) || !defined(_di_fl_string_dynamic_rip_) || !defined(_di_fl_string_rip_nulless_) || !defined(_di_fl_string_dynamic_rip_nulless_) - extern f_status_t private_fl_string_rip_find_range(const f_string_t source, f_array_length_t *start, f_array_length_t *stop) F_attribute_visibility_internal_d; -#endif // !defined(_di_fl_string_rip_) || !defined(_di_fl_string_dynamic_rip_) || !defined(_di_fl_string_rip_nulless_) || !defined(_di_fl_string_dynamic_rip_nulless_) +#if !defined(_di_fl_string_rip_) || !defined(_di_fl_string_dynamic_partial_rip_) || !defined(_di_fl_string_rip_nulless_) || !defined(_di_fl_string_dynamic_partial_rip_nulless_) + extern f_status_t private_fl_string_rip_find_range(const f_string_t source, f_array_length_t * const start, f_array_length_t * const stop) F_attribute_visibility_internal_d; +#endif // !defined(_di_fl_string_rip_) || !defined(_di_fl_string_dynamic_partial_rip_) || !defined(_di_fl_string_rip_nulless_) || !defined(_di_fl_string_dynamic_partial_rip_nulless_) #ifdef __cplusplus } // extern "C" diff --git a/level_1/fl_string/c/string.c b/level_1/fl_string/c/string.c index 12592d9..89f9d64 100644 --- a/level_1/fl_string/c/string.c +++ b/level_1/fl_string/c/string.c @@ -356,12 +356,11 @@ extern "C" { } #endif // _di_fl_string_dynamic_partial_compare_trim_string_ -#ifndef _di_fl_string_dynamic_rip_ - f_status_t fl_string_dynamic_rip(const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination) { +#ifndef _di_fl_string_dynamic_partial_rip_ + f_status_t fl_string_dynamic_partial_rip(const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t * const destination) { #ifndef _di_level_1_parameter_checking_ if (source.used <= range.start) return F_status_set_error(F_parameter); if (source.used <= range.stop) return F_status_set_error(F_parameter); - if (range.stop < range.start) return F_status_set_error(F_parameter); if (!destination) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ @@ -369,34 +368,35 @@ extern "C" { return F_data_not_eos; } + if (range.start > range.stop) { + return F_data_not_stop; + } + f_array_length_t begin = range.start; f_array_length_t end = range.stop; - const f_status_t status = private_fl_string_rip_find_range(source.string, &begin, &end); - if (F_status_is_error(status)) return status; - - if (status == F_data_not) { - return status; - } + { + const f_status_t status = private_fl_string_rip_find_range(source.string, &begin, &end); + if (F_status_is_error(status)) return status; - if (!source.used) { - return F_data_not_eos; + if (status == F_data_not) { + return status; + } } - if (range.start > range.stop) { + if (begin > end) { return F_data_not_stop; } return f_string_append(source.string + begin, (end - begin) + 1, destination); } -#endif // _di_fl_string_dynamic_rip_ +#endif // _di_fl_string_dynamic_partial_rip_ -#ifndef _di_fl_string_dynamic_rip_nulless_ - f_status_t fl_string_dynamic_rip_nulless(const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination) { +#ifndef _di_fl_string_dynamic_partial_rip_nulless_ + f_status_t fl_string_dynamic_partial_rip_nulless(const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t * const destination) { #ifndef _di_level_1_parameter_checking_ if (source.used <= range.start) return F_status_set_error(F_parameter); if (source.used <= range.stop) return F_status_set_error(F_parameter); - if (range.stop < range.start) return F_status_set_error(F_parameter); if (!destination) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ @@ -404,21 +404,83 @@ extern "C" { return F_data_not_eos; } + if (range.start > range.stop) { + return F_data_not_stop; + } + f_array_length_t begin = range.start; f_array_length_t end = range.stop; - const f_status_t status = private_fl_string_rip_find_range(source.string, &begin, &end); - if (F_status_is_error(status)) return status; + { + const f_status_t status = private_fl_string_rip_find_range(source.string, &begin, &end); + if (F_status_is_error(status)) return status; - if (status == F_data_not) { - return status; + if (status == F_data_not) { + return status; + } + } + + if (begin > end) { + return F_data_not_stop; } + return f_string_append_nulless(source.string + begin, (end - begin) + 1, destination); + } +#endif // _di_fl_string_dynamic_partial_rip_nulless_ + +#ifndef _di_fl_string_dynamic_rip_ + f_status_t fl_string_dynamic_rip(const f_string_static_t source, f_string_dynamic_t * const destination) { + #ifndef _di_level_1_parameter_checking_ + if (!destination) return F_status_set_error(F_parameter); + #endif // _di_level_1_parameter_checking_ + if (!source.used) { return F_data_not_eos; } - if (range.start > range.stop) { + f_array_length_t begin = 0; + f_array_length_t end = source.used - 1; + + { + const f_status_t status = private_fl_string_rip_find_range(source.string, &begin, &end); + if (F_status_is_error(status)) return status; + + if (status == F_data_not) { + return status; + } + } + + if (begin > end) { + return F_data_not_stop; + } + + return f_string_append(source.string + begin, (end - begin) + 1, destination); + } +#endif // _di_fl_string_dynamic_rip_ + +#ifndef _di_fl_string_dynamic_rip_nulless_ + f_status_t fl_string_dynamic_rip_nulless(const f_string_static_t source, f_string_dynamic_t * const destination) { + #ifndef _di_level_1_parameter_checking_ + if (!destination) return F_status_set_error(F_parameter); + #endif // _di_level_1_parameter_checking_ + + if (!source.used) { + return F_data_not_eos; + } + + f_array_length_t begin = 0; + f_array_length_t end = source.used - 1; + + { + const f_status_t status = private_fl_string_rip_find_range(source.string, &begin, &end); + if (F_status_is_error(status)) return status; + + if (status == F_data_not) { + return status; + } + } + + if (begin > end) { return F_data_not_stop; } @@ -427,12 +489,12 @@ extern "C" { #endif // _di_fl_string_dynamic_rip_nulless_ #ifndef _di_fl_string_dynamic_seek_line_to_utf_character_ - f_status_t fl_string_dynamic_seek_line_to_utf_character(const f_string_t string, const f_utf_character_t seek_to_this, f_string_range_t *range) { + f_status_t fl_string_dynamic_seek_line_to_utf_character(const f_string_static_t buffer, const f_utf_character_t seek_to_this, f_string_range_t * const range) { #ifndef _di_level_1_parameter_checking_ if (!range) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ - if (!string) { + if (!buffer.used) { return F_data_not; } @@ -445,22 +507,22 @@ extern "C" { f_status_t status = F_none; unsigned short width = 0; - f_array_length_t width_max = 0; while (range->start <= range->stop) { + width_max = (range->stop - range->start) + 1; - width = macro_f_utf_byte_width_is(string[range->start]); + width = macro_f_utf_byte_width_is(buffer.string[range->start]); if (!width) { width = 1; - if (string[range->start] == f_string_eol_s.string[0]) { + if (buffer.string[range->start] == f_string_eol_s.string[0]) { return F_none_eol; } if (seek_width == width) { - if (string[range->start] == seek_to_this) { + if (buffer.string[range->start] == seek_to_this) { return F_none; } } @@ -477,7 +539,7 @@ extern "C" { if (width == seek_width) { f_utf_character_t character = 0; - status = f_utf_char_to_character(string + range->start, width_max, &character); + status = f_utf_char_to_character(buffer.string + range->start, width_max, &character); if (F_status_is_error(status)) return status; if (character == seek_to_this) { @@ -498,12 +560,12 @@ extern "C" { #endif // _di_fl_string_dynamic_seek_line_to_utf_character_ #ifndef _di_fl_string_dynamic_seek_line_until_graph_ - f_status_t fl_string_dynamic_seek_line_until_graph(const f_string_t string, const uint8_t placeholder, f_string_range_t *range) { + f_status_t fl_string_dynamic_seek_line_until_graph(const f_string_static_t buffer, const uint8_t placeholder, f_string_range_t * const range) { #ifndef _di_level_1_parameter_checking_ if (!range) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ - if (!string) { + if (!buffer.used) { return F_data_not; } @@ -516,15 +578,15 @@ extern "C" { f_array_length_t width_max = (range->stop - range->start) + 1; - while (string[range->start] == placeholder || (status = f_utf_is_graph(string + range->start, width_max)) == F_false) { + while (buffer.string[range->start] == placeholder || (status = f_utf_is_graph(buffer.string + range->start, width_max)) == F_false) { if (F_status_is_error(status)) return status; - if (string[range->start] == f_string_eol_s.string[0]) { + if (buffer.string[range->start] == f_string_eol_s.string[0]) { return F_none_eol; } - width = macro_f_utf_byte_width_is(string[range->start]); + width = macro_f_utf_byte_width_is(buffer.string[range->start]); if (!width) { width = 1; @@ -556,12 +618,12 @@ extern "C" { #endif // _di_fl_string_dynamic_seek_line_until_graph_ #ifndef _di_fl_string_dynamic_seek_line_until_graph_non_ - f_status_t fl_string_dynamic_seek_line_until_graph_non(const f_string_t string, const uint8_t placeholder, f_string_range_t *range) { + f_status_t fl_string_dynamic_seek_line_until_graph_non(const f_string_static_t buffer, const uint8_t placeholder, f_string_range_t * const range) { #ifndef _di_level_1_parameter_checking_ if (!range) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ - if (!string) { + if (!buffer.used) { return F_data_not; } @@ -574,15 +636,15 @@ extern "C" { f_array_length_t width_max = (range->stop - range->start) + 1; - while (string[range->start] == placeholder || (status = f_utf_is_whitespace(string + range->start, width_max)) == F_false) { + while (buffer.string[range->start] == placeholder || (status = f_utf_is_whitespace(buffer.string + range->start, width_max)) == F_false) { if (F_status_is_error(status)) return status; - if (string[range->start] == f_string_eol_s.string[0]) { + if (buffer.string[range->start] == f_string_eol_s.string[0]) { return F_none_eol; } - width = macro_f_utf_byte_width_is(string[range->start]); + width = macro_f_utf_byte_width_is(buffer.string[range->start]); if (!width) { width = 1; @@ -614,12 +676,12 @@ extern "C" { #endif // _di_fl_string_dynamic_seek_line_until_graph_non_ #ifndef _di_fl_string_dynamic_seek_to_utf_character_ - f_status_t fl_string_dynamic_seek_to_utf_character(const f_string_t string, const f_utf_character_t seek_to_this, f_string_range_t *range) { + f_status_t fl_string_dynamic_seek_to_utf_character(const f_string_static_t buffer, const f_utf_character_t seek_to_this, f_string_range_t * const range) { #ifndef _di_level_1_parameter_checking_ if (!range) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ - if (!string) { + if (!buffer.used) { return F_data_not; } @@ -638,13 +700,13 @@ extern "C" { while (range->start <= range->stop) { width_max = (range->stop - range->start) + 1; - width = macro_f_utf_byte_width_is(string[range->start]); + width = macro_f_utf_byte_width_is(buffer.string[range->start]); if (!width) { width = 1; if (seek_width == width) { - if (string[range->start] == seek_to_this) { + if (buffer.string[range->start] == seek_to_this) { return F_none; } } @@ -661,7 +723,7 @@ extern "C" { if (width == seek_width) { f_utf_character_t character = 0; - status = f_utf_char_to_character(string + range->start, width_max, &character); + status = f_utf_char_to_character(buffer.string + range->start, width_max, &character); if (F_status_is_error(status)) return status; if (character == seek_to_this) { @@ -681,8 +743,8 @@ extern "C" { } #endif // _di_fl_string_dynamic_seek_to_utf_character_ -#ifndef _di_fl_string_fll_identify_ - f_status_t fl_string_fll_identify(const f_string_static_t buffer, f_string_range_t *range, f_fll_id_t *id) { +#ifndef _di_fl_string_dynamic_partial_fll_identify_ + f_status_t fl_string_dynamic_partial_fll_identify(const f_string_static_t buffer, f_string_range_t * const range, f_fll_id_t * const id) { #ifndef _di_level_1_parameter_checking_ if (!range) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ @@ -924,8 +986,7 @@ extern "C" { if (!buffer.string[j]) continue; if (buffer.string[j] == f_string_ascii_minus_s.string[0]) break; - id->name[i] = buffer.string[j]; - ++i; + id->name[i++] = buffer.string[j]; } // for id->used = i + 1; @@ -937,10 +998,10 @@ extern "C" { return F_found; } -#endif // _di_fl_string_fll_identify_ +#endif // _di_fl_string_dynamic_partial_fll_identify_ #ifndef _di_fl_string_rip_ - f_status_t fl_string_rip(const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination) { + f_status_t fl_string_rip(const f_string_t source, const f_array_length_t length, f_string_dynamic_t * const destination) { #ifndef _di_level_1_parameter_checking_ if (!destination) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ @@ -964,7 +1025,7 @@ extern "C" { #endif // _di_fl_string_rip_ #ifndef _di_fl_string_rip_nulless_ - f_status_t fl_string_rip_nulless(const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination) { + f_status_t fl_string_rip_nulless(const f_string_t source, const f_array_length_t length, f_string_dynamic_t * const destination) { #ifndef _di_level_1_parameter_checking_ if (!destination) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ @@ -988,7 +1049,7 @@ extern "C" { #endif // _di_fl_string_rip_nulless_ #ifndef _di_fl_string_seek_line_to_utf_character_ - f_status_t fl_string_seek_line_to_utf_character(const f_string_t string, const f_utf_character_t seek_to, f_string_range_t *range) { + f_status_t fl_string_seek_line_to_utf_character(const f_string_t string, const f_utf_character_t seek_to, f_string_range_t * const range) { #ifndef _di_level_1_parameter_checking_ if (!range) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ @@ -1050,7 +1111,7 @@ extern "C" { #endif // _di_fl_string_seek_line_to_utf_character_ #ifndef _di_fl_string_seek_line_until_graph_ - f_status_t fl_string_seek_line_until_graph(const f_string_t string, const uint8_t placeholder, f_string_range_t *range) { + f_status_t fl_string_seek_line_until_graph(const f_string_t string, const uint8_t placeholder, f_string_range_t * const range) { #ifndef _di_level_1_parameter_checking_ if (!range) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ @@ -1104,7 +1165,7 @@ extern "C" { #endif // _di_fl_string_seek_line_until_graph_ #ifndef _di_fl_string_seek_line_until_graph_non_ - f_status_t fl_string_seek_line_until_graph_non(const f_string_t string, const uint8_t placeholder, f_string_range_t *range) { + f_status_t fl_string_seek_line_until_graph_non(const f_string_t string, const uint8_t placeholder, f_string_range_t * const range) { #ifndef _di_level_1_parameter_checking_ if (!range) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ @@ -1158,7 +1219,7 @@ extern "C" { #endif // _di_fl_string_seek_line_until_graph_non_ #ifndef _di_fl_string_seek_to_utf_character_ - f_status_t fl_string_seek_to_utf_character(const f_string_t string, const f_utf_character_t seek_to, f_string_range_t *range) { + f_status_t fl_string_seek_to_utf_character(const f_string_t string, const f_utf_character_t seek_to, f_string_range_t * const range) { #ifndef _di_level_1_parameter_checking_ if (!range) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ diff --git a/level_1/fl_string/c/string.h b/level_1/fl_string/c/string.h index fa7d689..2339f37 100644 --- a/level_1/fl_string/c/string.h +++ b/level_1/fl_string/c/string.h @@ -765,9 +765,9 @@ extern "C" { * F_parameter (with error bit) if a parameter is invalid. * F_string_too_large (with error bit) if the combined string is too large. */ -#ifndef _di_fl_string_dynamic_rip_ - extern f_status_t fl_string_dynamic_rip(const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination); -#endif // _di_fl_string_dynamic_rip_ +#ifndef _di_fl_string_dynamic_partial_rip_ + extern f_status_t fl_string_dynamic_partial_rip(const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t * const destination); +#endif // _di_fl_string_dynamic_partial_rip_ /** * Allocate a new string from the provided range in the buffer. @@ -793,14 +793,63 @@ extern "C" { * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. */ +#ifndef _di_fl_string_dynamic_partial_rip_nulless_ + extern f_status_t fl_string_dynamic_partial_rip_nulless(const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t * const destination); +#endif // _di_fl_string_dynamic_partial_rip_nulless_ + +/** + * Allocate a new string from the provided range in the buffer. + * + * Ignores leading and trailing whitespace. + * Ignores leading and trailing NULL characters. + * As a result, resulting size may be smaller than requested range. + * + * @param source + * The buffer to rip from. + * @param destination + * The new string, which will be allocated or reallocated as necessary. + * + * @return + * F_none on success. + * F_data_not_eos if source length is 0. + * + * F_memory_not (with error bit) on out of memory. + * F_parameter (with error bit) if a parameter is invalid. + * F_string_too_large (with error bit) if the combined string is too large. + */ +#ifndef _di_fl_string_dynamic_rip_ + extern f_status_t fl_string_dynamic_rip(const f_string_static_t source, f_string_dynamic_t * const destination); +#endif // _di_fl_string_dynamic_rip_ + +/** + * Allocate a new string from the provided range in the buffer. + * + * Ignores leading and trailing whitespace. + * Ignores leading and trailing NULL characters. + * As a result, resulting size may be smaller than requested range. + * + * Skips over NULL characters from source when appending. + * + * @param source + * The string to rip from. + * @param destination + * The new string, which will be allocated or reallocated as necessary. + * + * @return + * F_none on success. + * F_data_not_eos if source length is 0. + * + * F_memory_not (with error bit) on out of memory. + * F_parameter (with error bit) if a parameter is invalid. + */ #ifndef _di_fl_string_dynamic_rip_nulless_ - extern f_status_t fl_string_dynamic_rip_nulless(const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination); + extern f_status_t fl_string_dynamic_rip_nulless(const f_string_static_t source, f_string_dynamic_t * const destination); #endif // _di_fl_string_dynamic_rip_nulless_ /** * Seek the buffer location forward until the character (up to 4-byte wide) or EOL is reached. * - * @param string + * @param buffer * The string to traverse. * @param seek_to_this * A 1-width, 2-width, 3-width, or 4-width character representing a character to seek to. @@ -825,13 +874,13 @@ extern "C" { * @see f_utf_char_to_character() */ #ifndef _di_fl_string_dynamic_seek_line_to_utf_character_ - extern f_status_t fl_string_dynamic_seek_line_to_utf_character(const f_string_t string, const f_utf_character_t seek_to_this, f_string_range_t *range); + extern f_status_t fl_string_dynamic_seek_line_to_utf_character(const f_string_static_t buffer, const f_utf_character_t seek_to_this, f_string_range_t * const range); #endif // _di_fl_string_dynamic_seek_line_to_utf_character_ /** * Increment buffer location until a graph character (including UTF-8) or an EOL is matched. * - * @param string + * @param buffer * The string to traverse. * @param placeholder * A single-width character representing a placeholder to ignore (may be NULL). @@ -855,13 +904,13 @@ extern "C" { * @see f_utf_is_graph() */ #ifndef _di_fl_string_dynamic_seek_line_until_graph_ - extern f_status_t fl_string_dynamic_seek_line_until_graph(const f_string_t string, const uint8_t placeholder, f_string_range_t *range); + extern f_status_t fl_string_dynamic_seek_line_until_graph(const f_string_static_t buffer, const uint8_t placeholder, f_string_range_t * const range); #endif // _di_fl_string_dynamic_seek_line_until_graph_ /** * Increment buffer location until a non-graph character (including UTF-8) or an EOL is matched. * - * @param string + * @param buffer * The string to traverse. * @param placeholder * A single-width character representing a placeholder to ignore (may be NULL). @@ -885,13 +934,13 @@ extern "C" { * @see f_utf_is_graph() */ #ifndef _di_fl_string_dynamic_seek_line_until_graph_non_ - extern f_status_t fl_string_dynamic_seek_line_until_graph_non(const f_string_t string, const uint8_t placeholder, f_string_range_t *range); + extern f_status_t fl_string_dynamic_seek_line_until_graph_non(const f_string_static_t buffer, const uint8_t placeholder, f_string_range_t * const range); #endif // _di_fl_string_dynamic_seek_line_until_graph_non_ /** * Seek the buffer location forward until the UTF-8 character (up to 4-byte wide) is reached. * - * @param string + * @param buffer * The string to traverse. * @param seek_to_this * A 1-width, 2-width, 3-width, or 4-width character representing a character to seek to. @@ -915,7 +964,7 @@ extern "C" { * @see f_utf_char_to_character() */ #ifndef _di_fl_string_dynamic_seek_to_utf_character_ - extern f_status_t fl_string_dynamic_seek_to_utf_character(const f_string_t string, const f_utf_character_t seek_to_this, f_string_range_t *range); + extern f_status_t fl_string_dynamic_seek_to_utf_character(const f_string_static_t buffer, const f_utf_character_t seek_to_this, f_string_range_t * const range); #endif // _di_fl_string_dynamic_seek_to_utf_character_ /** @@ -966,9 +1015,9 @@ extern "C" { * @see f_utf_is_whitespace() * @see f_utf_is_word() */ -#ifndef _di_fl_string_fll_identify_ - extern f_status_t fl_string_fll_identify(const f_string_static_t buffer, f_string_range_t *range, f_fll_id_t *id); -#endif // _di_fl_string_fll_identify_ +#ifndef _di_fl_string_dynamic_partial_fll_identify_ + extern f_status_t fl_string_dynamic_partial_fll_identify(const f_string_static_t buffer, f_string_range_t * const range, f_fll_id_t * const id); +#endif // _di_fl_string_dynamic_partial_fll_identify_ /** * Allocate a new string from the provided range in the string. @@ -996,7 +1045,7 @@ extern "C" { * @see f_utf_is_whitespace() */ #ifndef _di_fl_string_rip_ - extern f_status_t fl_string_rip(const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination); + extern f_status_t fl_string_rip(const f_string_t source, const f_array_length_t length, f_string_dynamic_t * const destination); #endif // _di_fl_string_rip_ /** @@ -1027,7 +1076,7 @@ extern "C" { * @see f_utf_is_whitespace() */ #ifndef _di_fl_string_rip_nulless_ - extern f_status_t fl_string_rip_nulless(const f_string_t source, const f_array_length_t length, f_string_dynamic_t *destination); + extern f_status_t fl_string_rip_nulless(const f_string_t source, const f_array_length_t length, f_string_dynamic_t * const destination); #endif // _di_fl_string_rip_nulless_ /** @@ -1056,7 +1105,7 @@ extern "C" { * @see f_utf_char_to_character() */ #ifndef _di_fl_string_seek_line_to_utf_character_ - extern f_status_t fl_string_seek_line_to_utf_character(const f_string_t string, const f_utf_character_t seek_to, f_string_range_t *range); + extern f_status_t fl_string_seek_line_to_utf_character(const f_string_t string, const f_utf_character_t seek_to, f_string_range_t * const range); #endif // _di_fl_string_seek_line_to_utf_character_ /** @@ -1085,7 +1134,7 @@ extern "C" { * @see f_utf_is_graph() */ #ifndef _di_fl_string_seek_line_until_graph_ - extern f_status_t fl_string_seek_line_until_graph(const f_string_t string, const uint8_t placeholder, f_string_range_t *range); + extern f_status_t fl_string_seek_line_until_graph(const f_string_t string, const uint8_t placeholder, f_string_range_t * const range); #endif // _di_fl_string_seek_line_until_graph_ /** @@ -1115,7 +1164,7 @@ extern "C" { * @see f_utf_is_whitespace() */ #ifndef _di_fl_string_seek_line_until_graph_non_ - extern f_status_t fl_string_seek_line_until_graph_non(const f_string_t string, const uint8_t placeholder, f_string_range_t *range); + extern f_status_t fl_string_seek_line_until_graph_non(const f_string_t string, const uint8_t placeholder, f_string_range_t * const range); #endif // _di_fl_string_seek_line_until_graph_non_ /** @@ -1144,7 +1193,7 @@ extern "C" { * @see f_utf_char_to_character() */ #ifndef _di_fl_string_seek_to_utf_character_ - extern f_status_t fl_string_seek_to_utf_character(const f_string_t string, const f_utf_character_t seek_to, f_string_range_t *range); + extern f_status_t fl_string_seek_to_utf_character(const f_string_t string, const f_utf_character_t seek_to, f_string_range_t * const range); #endif // _di_fl_string_seek_to_utf_character_ #ifdef __cplusplus diff --git a/level_1/fl_utf/c/private-utf.c b/level_1/fl_utf/c/private-utf.c index 84c6669..e2583ea 100644 --- a/level_1/fl_utf/c/private-utf.c +++ b/level_1/fl_utf/c/private-utf.c @@ -13,18 +13,18 @@ extern "C" { for (; i1 < stop1 && i2 < stop2; ++i1, ++i2) { - // skip past NULL in string1. + // Skip past NULL in string1. while (i1 < stop1 && !string1[i1]) ++i1; if (i1 == stop1) break; - // skip past NULL in string2. + // Skip past NULL in string2. while (i2 < stop2 && !string2[i2]) ++i2; if (i2 == stop2) break; if (string1[i1] != string2[i2]) return F_equal_to_not; } // for - // only return F_equal_to if all remaining characters are NULL. + // Only return F_equal_to if all remaining characters are NULL. for (; i1 < stop1; ++i1) { if (string1[i1] != 0) return F_equal_to_not; } // for @@ -45,10 +45,10 @@ extern "C" { f_status_t status = F_none; - // skip past leading whitespace in string1. + // Skip past leading whitespace in string1. for (; i1 < stop1; ++i1) { - // skip past NULL in string1. + // Skip past NULL in string1. while (i1 < stop1 && !string1[i1]) ++i1; if (i1 == stop1) break; @@ -56,7 +56,7 @@ extern "C" { if (F_status_is_error(status)) { - // ignore possibly invalid UTF-8 codes. + // Ignore possibly invalid UTF-8 codes. if (F_status_set_fine(status) != F_maybe) { return status; } @@ -65,10 +65,10 @@ extern "C" { if (status == F_false) break; } // for - // skip past leading whitespace in string2. + // Skip past leading whitespace in string2. for (; i2 < stop2; i2++) { - // skip past NULL in string2. + // Skip past NULL in string2. while (i2 < stop2 && !string2[i2]) ++i2; if (i2 == stop2) break; @@ -76,7 +76,7 @@ extern "C" { if (F_status_is_error(status)) { - // ignore possibly invalid UTF-8 codes. + // Ignore possibly invalid UTF-8 codes. if (F_status_set_fine(status) != F_maybe) { return status; } @@ -89,15 +89,15 @@ extern "C" { f_array_length_t last2 = i2; { - // size1 and size2 are to represent to total number of characters after trim. + // The size1 and size2 are to represent to total number of characters after trim. f_array_length_t size1 = 0; f_array_length_t size2 = 0; f_array_length_t j = 0; - // determine where the last non-whitespace is in string1. + // Determine where the last non-whitespace is in string1. for (j = i1; j < stop1; ++j) { - // skip past NULL in string1. + // Skip past NULL in string1. while (j < stop1 && !string1[j]) ++j; if (j == stop1) break; @@ -116,10 +116,10 @@ extern "C" { } } // for - // determine where the last non-whitespace is in string2. + // Determine where the last non-whitespace is in string2. for (j = i2; j < stop2; ++j) { - // skip past NULL in string2. + // Skip past NULL in string2. while (j < stop2 && !string2[j]) ++j; if (j == stop2) break; @@ -127,7 +127,7 @@ extern "C" { if (F_status_is_error(status)) { - // ignore possibly invalid UTF-8 codes. + // Ignore possibly invalid UTF-8 codes. if (F_status_set_fine(status) != F_maybe) { return status; } @@ -146,18 +146,18 @@ extern "C" { for (; i1 < last1 && i2 < last2; ++i1, ++i2) { - // skip past NULL in string1. + // Skip past NULL in string1. while (i1 < last1 && !string1[i1]) ++i1; if (i1 == last1) break; - // skip past NULL in string2. + // Skip past NULL in string2. while (i2 < last2 && !string2[i2]) ++i2; if (i2 == last2) break; if (string1[i1] != string2[i2]) return F_equal_to_not; } // for - // only return F_equal_to if all remaining characters are NULL. + // Only return F_equal_to if all remaining characters are NULL. for (; i1 < last1; ++i1) { if (string1[i1] != 0) return F_equal_to_not; } // for @@ -178,7 +178,7 @@ extern "C" { // Skip past leading whitespace. for (; *start <= *stop; ++(*start)) { - // skip past NULL. + // Skip past NULL. while (*start < *stop && !source[*start]) ++(*start); if (*start > *stop) break; @@ -197,7 +197,7 @@ extern "C" { for (; *stop > *start; --(*stop)) { - // skip past NULL. + // Skip past NULL. while (*stop > *start && !source[*stop]) --(*stop); if (!source[*stop]) continue; diff --git a/level_1/fl_utf/c/utf.c b/level_1/fl_utf/c/utf.c index 71f92d7..40d60ed 100644 --- a/level_1/fl_utf/c/utf.c +++ b/level_1/fl_utf/c/utf.c @@ -52,7 +52,7 @@ extern "C" { #endif // _di_fl_utf_string_dynamic_partial_compare_trim_ #ifndef _di_fl_utf_string_dynamic_rip_ - f_status_t fl_utf_string_dynamic_rip(const f_utf_string_static_t source, const f_string_range_t range, f_utf_string_dynamic_t *destination) { + f_status_t fl_utf_string_dynamic_rip(const f_utf_string_static_t source, const f_string_range_t range, f_utf_string_dynamic_t * const destination) { #ifndef _di_level_1_parameter_checking_ if (source.used <= range.start) return F_status_set_error(F_parameter); if (source.used <= range.stop) return F_status_set_error(F_parameter); @@ -72,7 +72,7 @@ extern "C" { #endif // _di_fl_utf_string_dynamic_rip_ #ifndef _di_fl_utf_string_dynamic_rip_nulless_ - f_status_t fl_utf_string_dynamic_rip_nulless(const f_utf_string_static_t source, const f_string_range_t range, f_utf_string_dynamic_t *destination) { + f_status_t fl_utf_string_dynamic_rip_nulless(const f_utf_string_static_t source, const f_string_range_t range, f_utf_string_dynamic_t * const destination) { #ifndef _di_level_1_parameter_checking_ if (source.used <= range.start) return F_status_set_error(F_parameter); if (source.used <= range.stop) return F_status_set_error(F_parameter); @@ -92,7 +92,7 @@ extern "C" { #endif // _di_fl_utf_string_dynamic_rip_nulless_ #ifndef _di_fl_utf_string_dynamic_seek_line_to_char_ - f_status_t fl_utf_string_dynamic_seek_line_to_char(const f_utf_string_static_t buffer, f_string_range_t *range, const char seek_to_this) { + f_status_t fl_utf_string_dynamic_seek_line_to_char(const f_utf_string_static_t buffer, f_string_range_t * const range, const char seek_to_this) { #ifndef _di_level_1_parameter_checking_ if (!range) return F_status_set_error(F_parameter); if (buffer.used <= range->start) return F_status_set_error(F_parameter); @@ -114,12 +114,10 @@ extern "C" { while (buffer.string[range->start] != seek_to_character) { - if (buffer.string[range->start] == F_utf_character_t_eol_d) { + if (buffer.string[range->start++] == F_utf_character_t_eol_d) { return F_none_eol; } - ++range->start; - if (macro_f_utf_character_t_width_is(buffer.string[range->start]) == 1) { return F_status_set_error(F_utf); } @@ -138,7 +136,7 @@ extern "C" { #endif // _di_fl_utf_string_dynamic_seek_line_to_char_ #ifndef _di_fl_utf_string_dynamic_seek_line_until_graph_ - f_status_t fl_utf_string_dynamic_seek_line_until_graph(const f_utf_string_static_t buffer, f_string_range_t *range, const f_utf_character_t placeholder) { + f_status_t fl_utf_string_dynamic_seek_line_until_graph(const f_utf_string_static_t buffer, f_string_range_t * const range, const f_utf_character_t placeholder) { #ifndef _di_level_1_parameter_checking_ if (!range) return F_status_set_error(F_parameter); if (buffer.used <= range->start) return F_status_set_error(F_parameter); @@ -164,12 +162,10 @@ extern "C" { return status; } - if (buffer.string[range->start] == F_utf_character_t_eol_d) { + if (buffer.string[range->start++] == F_utf_character_t_eol_d) { return F_none_eol; } - ++range->start; - if (macro_f_utf_character_t_width_is(buffer.string[range->start]) == 1) { return F_status_set_error(F_utf); } @@ -192,7 +188,7 @@ extern "C" { #endif // _di_fl_utf_string_dynamic_seek_line_until_graph_ #ifndef _di_fl_utf_string_dynamic_seek_line_until_graph_non_ - f_status_t fl_utf_string_dynamic_seek_line_until_graph_non(const f_utf_string_static_t buffer, f_string_range_t *range, const f_utf_character_t placeholder) { + f_status_t fl_utf_string_dynamic_seek_line_until_graph_non(const f_utf_string_static_t buffer, f_string_range_t * const range, const f_utf_character_t placeholder) { #ifndef _di_level_1_parameter_checking_ if (!range) return F_status_set_error(F_parameter); if (buffer.used <= range->start) return F_status_set_error(F_parameter); @@ -229,7 +225,7 @@ extern "C" { #endif // _di_fl_utf_string_dynamic_seek_line_until_graph_non_ #ifndef _di_fl_utf_string_dynamic_seek_to_char_ - f_status_t fl_utf_string_dynamic_seek_to_char(const f_utf_string_static_t buffer, f_string_range_t *range, const char seek_to_this) { + f_status_t fl_utf_string_dynamic_seek_to_char(const f_utf_string_static_t buffer, f_string_range_t * const range, const char seek_to_this) { #ifndef _di_level_1_parameter_checking_ if (!range) return F_status_set_error(F_parameter); if (buffer.used <= range->start) return F_status_set_error(F_parameter); @@ -271,7 +267,7 @@ extern "C" { #endif // _di_fl_utf_string_dynamic_seek_to_char_ #ifndef _di_fl_utf_string_rip_ - f_status_t fl_utf_string_rip(const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination) { + f_status_t fl_utf_string_rip(const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t * const destination) { #ifndef _di_level_1_parameter_checking_ if (!destination) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ @@ -298,7 +294,7 @@ extern "C" { #endif // _di_fl_utf_string_rip_ #ifndef _di_fl_utf_string_rip_nulless_ - f_status_t fl_utf_string_rip_nulless(const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination) { + f_status_t fl_utf_string_rip_nulless(const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t * const destination) { #ifndef _di_level_1_parameter_checking_ if (!destination) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ @@ -325,7 +321,7 @@ extern "C" { #endif // _di_fl_utf_string_rip_nulless_ #ifndef _di_fl_utf_string_seek_line_to_char_ - f_status_t fl_utf_string_seek_line_to_char(const f_utf_string_t string, f_string_range_t *range, const char seek_to_this) { + f_status_t fl_utf_string_seek_line_to_char(const f_utf_string_t string, f_string_range_t * const range, const char seek_to_this) { #ifndef _di_level_1_parameter_checking_ if (!range) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ @@ -356,7 +352,7 @@ extern "C" { #endif // _di_fl_utf_string_seek_line_to_char_ #ifndef _di_fl_utf_string_seek_line_until_graph_ - f_status_t fl_utf_string_seek_line_until_graph(const f_utf_string_t string, f_string_range_t *range, const f_utf_character_t placeholder) { + f_status_t fl_utf_string_seek_line_until_graph(const f_utf_string_t string, f_string_range_t * const range, const f_utf_character_t placeholder) { #ifndef _di_level_1_parameter_checking_ if (!range) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ @@ -377,12 +373,10 @@ extern "C" { return status; } - if (string[range->start] == F_utf_character_t_eol_d) { + if (string[range->start++] == F_utf_character_t_eol_d) { return F_none_eol; } - ++range->start; - if (macro_f_utf_character_t_width_is(string[range->start]) == 1) { return F_status_set_error(F_utf); } @@ -401,7 +395,7 @@ extern "C" { #endif // _di_fl_utf_string_seek_line_until_graph_ #ifndef _di_fl_utf_string_seek_line_until_graph_non_ - f_status_t fl_utf_string_seek_line_until_graph_non(const f_utf_string_t string, f_string_range_t *range, const f_utf_character_t placeholder) { + f_status_t fl_utf_string_seek_line_until_graph_non(const f_utf_string_t string, f_string_range_t * const range, const f_utf_character_t placeholder) { #ifndef _di_level_1_parameter_checking_ if (!range) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ @@ -422,12 +416,10 @@ extern "C" { return status; } - if (string[range->start] == F_utf_character_t_eol_d) { + if (string[range->start++] == F_utf_character_t_eol_d) { return F_none_eol; } - ++range->start; - if (macro_f_utf_character_t_width_is(string[range->start]) == 1) { return F_status_set_error(F_utf); } @@ -446,12 +438,14 @@ extern "C" { #endif // _di_fl_utf_string_seek_line_until_graph_non_ #ifndef _di_fl_utf_string_seek_to_char_ - f_status_t fl_utf_string_seek_to_char(const f_utf_string_t string, f_string_range_t *range, const char seek_to_this) { + f_status_t fl_utf_string_seek_to_char(const f_utf_string_t string, f_string_range_t * const range, const char seek_to_this) { #ifndef _di_level_1_parameter_checking_ if (!range) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ - if (range->start > range->stop) return F_data_not_stop; + if (range->start > range->stop) { + return F_data_not_stop; + } const f_utf_character_t seek_to_character = seek_to_this << 24; @@ -461,12 +455,10 @@ extern "C" { while (range->start <= range->stop) { - if (string[range->start] == seek_to_character) { + if (string[range->start++] == seek_to_character) { return F_none; } - ++range->start; - if (macro_f_utf_character_t_width_is(string[range->start]) == 1) { return F_status_set_error(F_utf); } diff --git a/level_1/fl_utf/c/utf.h b/level_1/fl_utf/c/utf.h index 03a00cf..eb149f3 100644 --- a/level_1/fl_utf/c/utf.h +++ b/level_1/fl_utf/c/utf.h @@ -216,7 +216,7 @@ extern "C" { * F_string_too_large (with error bit) if the combined string is too large. */ #ifndef _di_fl_utf_string_dynamic_rip_ - extern f_status_t fl_utf_string_dynamic_rip(const f_utf_string_static_t source, const f_string_range_t range, f_utf_string_dynamic_t *destination); + extern f_status_t fl_utf_string_dynamic_rip(const f_utf_string_static_t source, const f_string_range_t range, f_utf_string_dynamic_t * const destination); #endif // _di_fl_utf_string_dynamic_rip_ /** @@ -243,7 +243,7 @@ extern "C" { * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_utf_string_dynamic_rip_nulless_ - extern f_status_t fl_utf_string_dynamic_rip_nulless(const f_utf_string_static_t source, const f_string_range_t range, f_utf_string_dynamic_t *destination); + extern f_status_t fl_utf_string_dynamic_rip_nulless(const f_utf_string_static_t source, const f_string_range_t range, f_utf_string_dynamic_t * const destination); #endif // _di_fl_utf_string_dynamic_rip_nulless_ /** @@ -268,7 +268,7 @@ extern "C" { * F_utf (with error bit) if a character in the buffer is an invalid UTF-8 character. */ #ifndef _di_fl_utf_string_dynamic_seek_line_to_char_ - extern f_status_t fl_utf_string_dynamic_seek_line_to_char(const f_utf_string_static_t buffer, f_string_range_t *range, const char seek_to_this); + extern f_status_t fl_utf_string_dynamic_seek_line_to_char(const f_utf_string_static_t buffer, f_string_range_t * const range, const char seek_to_this); #endif // _di_fl_utf_string_dynamic_seek_line_to_char_ /** @@ -296,7 +296,7 @@ extern "C" { * @see f_utf_character_is_graph() */ #ifndef _di_fl_utf_string_dynamic_seek_line_until_graph_ - extern f_status_t fl_utf_string_dynamic_seek_line_until_graph(const f_utf_string_static_t buffer, f_string_range_t *range, const f_utf_character_t placeholder); + extern f_status_t fl_utf_string_dynamic_seek_line_until_graph(const f_utf_string_static_t buffer, f_string_range_t * const range, const f_utf_character_t placeholder); #endif // _di_fl_utf_string_dynamic_seek_line_until_graph_ /** @@ -325,7 +325,7 @@ extern "C" { * @see f_utf_character_is_graph() */ #ifndef _di_fl_utf_string_dynamic_seek_line_until_graph_non_ - extern f_status_t fl_utf_string_dynamic_seek_line_until_graph_non(const f_utf_string_static_t buffer, f_string_range_t *range, const f_utf_character_t placeholder); + extern f_status_t fl_utf_string_dynamic_seek_line_until_graph_non(const f_utf_string_static_t buffer, f_string_range_t * const range, const f_utf_character_t placeholder); #endif // _di_fl_utf_string_dynamic_seek_line_until_graph_non_ /** @@ -350,7 +350,7 @@ extern "C" { * F_parameter (with error bit) if a parameter is invalid. */ #ifndef _di_fl_utf_string_dynamic_seek_to_char_ - extern f_status_t fl_utf_string_dynamic_seek_to_char(const f_utf_string_static_t buffer, f_string_range_t *range, const char seek_to_this); + extern f_status_t fl_utf_string_dynamic_seek_to_char(const f_utf_string_static_t buffer, f_string_range_t * const range, const char seek_to_this); #endif // _di_fl_utf_string_dynamic_seek_to_char_ /** @@ -378,7 +378,7 @@ extern "C" { * @see f_utf_character_is_whitespace() */ #ifndef _di_fl_utf_string_rip_ - extern f_status_t fl_utf_string_rip(const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination); + extern f_status_t fl_utf_string_rip(const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t * const destination); #endif // _di_fl_utf_string_rip_ /** @@ -408,7 +408,7 @@ extern "C" { * @see f_utf_character_is_whitespace() */ #ifndef _di_fl_utf_string_rip_nulless_ - extern f_status_t fl_utf_string_rip_nulless(const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t *destination); + extern f_status_t fl_utf_string_rip_nulless(const f_utf_string_t source, const f_array_length_t length, f_utf_string_dynamic_t * const destination); #endif // _di_fl_utf_string_rip_nulless_ /** @@ -432,7 +432,7 @@ extern "C" { * F_utf (with error bit) if a character in the buffer is an invalid UTF-8 character. */ #ifndef _di_fl_utf_string_seek_line_to_char_ - extern f_status_t fl_utf_string_seek_line_to_char(const f_utf_string_t string, f_string_range_t *range, const char seek_to_this); + extern f_status_t fl_utf_string_seek_line_to_char(const f_utf_string_t string, f_string_range_t * const range, const char seek_to_this); #endif // _di_fl_utf_string_seek_line_to_char_ /** @@ -462,7 +462,7 @@ extern "C" { * @see f_utf_character_is_graph() */ #ifndef _di_fl_utf_string_seek_line_until_graph_ - extern f_status_t fl_utf_string_seek_line_until_graph(const f_utf_string_t string, f_string_range_t *range, const f_utf_character_t placeholder); + extern f_status_t fl_utf_string_seek_line_until_graph(const f_utf_string_t string, f_string_range_t * const range, const f_utf_character_t placeholder); #endif // _di_fl_utf_string_seek_line_until_graph_ /** @@ -493,7 +493,7 @@ extern "C" { * @see f_utf_character_is_graph() */ #ifndef _di_fl_utf_string_seek_line_until_graph_non_ - extern f_status_t fl_utf_string_seek_line_until_graph_non(const f_utf_string_t string, f_string_range_t *range, const f_utf_character_t placeholder); + extern f_status_t fl_utf_string_seek_line_until_graph_non(const f_utf_string_t string, f_string_range_t * const range, const f_utf_character_t placeholder); #endif // _di_fl_utf_string_seek_line_until_graph_non_ /** @@ -517,7 +517,7 @@ extern "C" { * F_utf (with error bit) if a character in the buffer is an invalid UTF-8 character. */ #ifndef _di_fl_utf_string_seek_to_character_ - extern f_status_t fl_utf_string_seek_to_char(const f_utf_string_t string, f_string_range_t *range, const char seek_to_this); + extern f_status_t fl_utf_string_seek_to_char(const f_utf_string_t string, f_string_range_t * const range, const char seek_to_this); #endif // _di_fl_utf_string__seek_to_character_ #ifdef __cplusplus diff --git a/level_1/fl_utf_file/c/private-utf_file.c b/level_1/fl_utf_file/c/private-utf_file.c index 275082a..61cf080 100644 --- a/level_1/fl_utf_file/c/private-utf_file.c +++ b/level_1/fl_utf_file/c/private-utf_file.c @@ -6,7 +6,7 @@ extern "C" { #endif #if !defined(_di_fl_utf_file_read_) || !defined(_di_fl_utf_file_read_until_) || !defined(_di_fl_utf_file_read_range_) - void private_fl_utf_file_process_read_buffer(const char *buffer_read, const ssize_t size_read, f_utf_string_dynamic_t *buffer, char buffer_char[], uint8_t *width, int8_t *width_last) { + void private_fl_utf_file_process_read_buffer(const f_string_t buffer_read, const ssize_t size_read, f_utf_string_dynamic_t * const buffer, char buffer_char[], uint8_t * const width, int8_t * const width_last) { uint8_t increment_by = 0; @@ -70,7 +70,7 @@ extern "C" { #endif // !defined(_di_fl_utf_file_read_) || !defined(_di_fl_utf_file_read_until_) || !defined(_di_fl_utf_file_read_range_) #if !defined(_di_fl_utf_file_write_) || !defined(_di_fl_utf_file_write_until_) || !defined(fl_utf_file_write_range) - f_status_t private_fl_utf_file_write_until(const f_file_t file, const f_utf_string_t string, const f_array_length_t total, f_array_length_t *written) { + f_status_t private_fl_utf_file_write_until(const f_file_t file, const f_utf_string_t string, const f_array_length_t total, f_array_length_t * const written) { *written = 0; diff --git a/level_1/fl_utf_file/c/private-utf_file.h b/level_1/fl_utf_file/c/private-utf_file.h index 6e743a6..6cff4c4 100644 --- a/level_1/fl_utf_file/c/private-utf_file.h +++ b/level_1/fl_utf_file/c/private-utf_file.h @@ -40,7 +40,7 @@ extern "C" { * @see fl_utf_file_read_until() */ #if !defined(_di_fl_utf_file_read_) || !defined(_di_fl_utf_file_read_until_) || !defined(_di_fl_utf_file_read_range_) - void private_fl_utf_file_process_read_buffer(const char *buffer_read, const ssize_t size_read, f_utf_string_dynamic_t *buffer, char buffer_char[], uint8_t *width, int8_t *width_last) F_attribute_visibility_internal_d; + void private_fl_utf_file_process_read_buffer(const f_string_t buffer_read, const ssize_t size_read, f_utf_string_dynamic_t * const buffer, char buffer_char[], uint8_t * const width, int8_t * const width_last) F_attribute_visibility_internal_d; #endif // !defined(_di_fl_utf_file_read_) || !defined(_di_fl_utf_file_read_until_) || !defined(_di_fl_utf_file_read_range_) /** @@ -79,7 +79,7 @@ extern "C" { * @see fl_utf_file_write_until() */ #if !defined(_di_fl_utf_file_write_) || !defined(_di_fl_utf_file_write_until_) || !defined(_di_fl_utf_file_write_range_) - extern f_status_t private_fl_utf_file_write_until(const f_file_t file, const f_utf_string_t string, const f_array_length_t total, f_array_length_t *written) F_attribute_visibility_internal_d; + extern f_status_t private_fl_utf_file_write_until(const f_file_t file, const f_utf_string_t string, const f_array_length_t total, f_array_length_t * const written) F_attribute_visibility_internal_d; #endif // !defined(_di_fl_utf_file_write_) || !defined(_di_fl_utf_file_write_until_) || !defined(_di_fl_utf_file_write_range_) #ifdef __cplusplus diff --git a/level_1/fl_utf_file/c/utf_file.c b/level_1/fl_utf_file/c/utf_file.c index 40c2ab7..c8c7344 100644 --- a/level_1/fl_utf_file/c/utf_file.c +++ b/level_1/fl_utf_file/c/utf_file.c @@ -6,9 +6,9 @@ extern "C" { #endif #ifndef _di_fl_utf_file_read_ - f_status_t fl_utf_file_read(const f_file_t file, f_utf_string_dynamic_t *buffer) { + f_status_t fl_utf_file_read(const f_file_t file, f_utf_string_dynamic_t * const destination) { #ifndef _di_level_1_parameter_checking_ - if (!buffer) return F_status_set_error(F_parameter); + if (!destination) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ if (file.id < 0) { @@ -32,16 +32,16 @@ extern "C" { while ((size_read = read(file.id, buffer_read, file.size_read)) > 0) { - if (buffer->used + size_read > buffer->size) { - if (buffer->size + size_read > F_string_t_size_d) { + if (destination->used + size_read > destination->size) { + if (destination->size + size_read > F_string_t_size_d) { return F_status_set_error(F_string_too_large); } - macro_f_utf_string_dynamic_t_resize(status, (*buffer), buffer->size + size_read); + macro_f_utf_string_dynamic_t_resize(status, (*destination), destination->size + size_read); if (F_status_is_error(status)) return status; } - private_fl_utf_file_process_read_buffer(buffer_read, size_read, buffer, buffer_char, &width, &width_last); + private_fl_utf_file_process_read_buffer(buffer_read, size_read, destination, buffer_char, &width, &width_last); } // while if (!size_read) { @@ -71,9 +71,9 @@ extern "C" { #endif // _di_fl_utf_file_read_ #ifndef _di_fl_utf_file_read_block_ - f_status_t fl_utf_file_read_block(const f_file_t file, f_utf_string_dynamic_t *buffer) { + f_status_t fl_utf_file_read_block(const f_file_t file, f_utf_string_dynamic_t * const destination) { #ifndef _di_level_1_parameter_checking_ - if (!buffer) return F_status_set_error(F_parameter); + if (!destination) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ if (file.id < 0) return F_status_set_error(F_file); @@ -91,16 +91,16 @@ extern "C" { memset(&buffer_read, 0, sizeof(file.size_read)); if ((size_read = read(file.id, buffer_read, file.size_read)) > 0) { - if (buffer->used + size_read > buffer->size) { - if (buffer->size + size_read > F_string_t_size_d) { + if (destination->used + size_read > destination->size) { + if (destination->size + size_read > F_string_t_size_d) { return F_status_set_error(F_string_too_large); } - macro_f_utf_string_dynamic_t_resize(status, (*buffer), buffer->size + size_read); + macro_f_utf_string_dynamic_t_resize(status, (*destination), destination->size + size_read); if (F_status_is_error(status)) return status; } - private_fl_utf_file_process_read_buffer(buffer_read, size_read, buffer, buffer_char, &width, &width_last); + private_fl_utf_file_process_read_buffer(buffer_read, size_read, destination, buffer_char, &width, &width_last); } if (!size_read) { @@ -130,9 +130,9 @@ extern "C" { #endif // _di_fl_utf_file_read_block_ #ifndef _di_fl_utf_file_read_until_ - f_status_t fl_utf_file_read_until(const f_file_t file, const f_array_length_t total, f_utf_string_dynamic_t *buffer) { + f_status_t fl_utf_file_read_until(const f_file_t file, const f_array_length_t total, f_utf_string_dynamic_t * const destination) { #ifndef _di_level_1_parameter_checking_ - if (!buffer) return F_status_set_error(F_parameter); + if (!destination) return F_status_set_error(F_parameter); #endif // _di_level_1_parameter_checking_ if (file.id < 0) { @@ -163,16 +163,16 @@ extern "C" { while (buffer_count < total && (size_read = read(file.id, buffer_read, buffer_size)) > 0) { - if (buffer->used + size_read > buffer->size) { - if (buffer->size + size_read > F_string_t_size_d) { + if (destination->used + size_read > destination->size) { + if (destination->size + size_read > F_string_t_size_d) { return F_status_set_error(F_string_too_large); } - macro_f_utf_string_dynamic_t_resize(status, (*buffer), buffer->size + size_read); + macro_f_utf_string_dynamic_t_resize(status, (*destination), destination->size + size_read); if (F_status_is_error(status)) return status; } - private_fl_utf_file_process_read_buffer(buffer_read, size_read, buffer, buffer_char, &width, &width_last); + private_fl_utf_file_process_read_buffer(buffer_read, size_read, destination, buffer_char, &width, &width_last); } // while if (!size_read) { @@ -202,7 +202,7 @@ extern "C" { #endif // _di_fl_utf_file_read_until_ #ifndef _di_fl_utf_file_write_ - f_status_t fl_utf_file_write(const f_file_t file, const f_utf_string_static_t buffer, f_array_length_t *written) { + f_status_t fl_utf_file_write(const f_file_t file, const f_utf_string_static_t destination, f_array_length_t * const written) { #ifndef _di_level_0_parameter_checking_ if (!file.size_write) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ @@ -215,16 +215,16 @@ extern "C" { return F_status_set_error(F_file_closed); } - if (!buffer.used) { + if (!destination.used) { *written = 0; return F_data_not; } - const f_status_t status = private_fl_utf_file_write_until(file, buffer.string, buffer.used, written); + const f_status_t status = private_fl_utf_file_write_until(file, destination.string, destination.used, written); if (F_status_is_error(status)) return F_status_set_error(status); - if (status == F_none && *written == buffer.used) { + if (status == F_none && *written == destination.used) { return F_none_eos; } @@ -233,7 +233,7 @@ extern "C" { #endif // _di_fl_utf_file_write_ #ifndef _di_fl_utf_file_write_block_ - f_status_t fl_utf_file_write_block(const f_file_t file, const f_utf_string_static_t buffer, f_array_length_t *written) { + f_status_t fl_utf_file_write_block(const f_file_t file, const f_utf_string_static_t destination, f_array_length_t * const written) { #ifndef _di_level_0_parameter_checking_ if (!file.size_write) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ @@ -246,7 +246,7 @@ extern "C" { return F_status_set_error(F_file_closed); } - if (!buffer.used) { + if (!destination.used) { *written = 0; return F_data_not; @@ -254,14 +254,14 @@ extern "C" { f_array_length_t write_max = file.size_write; - if (write_max > buffer.used) { - write_max = buffer.used; + if (write_max > destination.used) { + write_max = destination.used; } - const f_status_t status = private_fl_utf_file_write_until(file, buffer.string, write_max, written); + const f_status_t status = private_fl_utf_file_write_until(file, destination.string, write_max, written); if (F_status_is_error(status)) return F_status_set_error(status); - if (status == F_none && *written == buffer.used) { + if (status == F_none && *written == destination.used) { return F_none_eos; } @@ -270,7 +270,7 @@ extern "C" { #endif // _di_fl_utf_file_write_block_ #ifndef _di_fl_utf_file_write_until_ - f_status_t fl_utf_file_write_until(const f_file_t file, const f_utf_string_static_t buffer, const f_array_length_t total, f_array_length_t *written) { + f_status_t fl_utf_file_write_until(const f_file_t file, const f_utf_string_static_t destination, const f_array_length_t total, f_array_length_t * const written) { #ifndef _di_level_0_parameter_checking_ if (!file.size_write) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ @@ -283,7 +283,7 @@ extern "C" { return F_status_set_error(F_file_closed); } - if (!buffer.used || !total) { + if (!destination.used || !total) { *written = 0; return F_data_not; @@ -291,14 +291,14 @@ extern "C" { f_array_length_t write_max = file.size_write; - if (write_max > buffer.used) { - write_max = buffer.used; + if (write_max > destination.used) { + write_max = destination.used; } - const f_status_t status = private_fl_utf_file_write_until(file, buffer.string, write_max, written); + const f_status_t status = private_fl_utf_file_write_until(file, destination.string, write_max, written); if (F_status_is_error(status)) return F_status_set_error(status); - if (status == F_none && *written == buffer.used) { + if (status == F_none && *written == destination.used) { return F_none_eos; } @@ -307,11 +307,10 @@ extern "C" { #endif // _di_fl_utf_file_write_until_ #ifndef _di_fl_utf_file_write_range_ - f_status_t fl_utf_file_write_range(const f_file_t file, const f_utf_string_static_t buffer, const f_string_range_t range, f_array_length_t *written) { + f_status_t fl_utf_file_write_range(const f_file_t file, const f_utf_string_static_t destination, const f_string_range_t range, f_array_length_t * const written) { #ifndef _di_level_0_parameter_checking_ if (!file.size_write) return F_status_set_error(F_parameter); - if (range.stop < range.start) return F_status_set_error(F_parameter); - if (range.start >= buffer.used) return F_status_set_error(F_parameter); + if (range.start >= destination.used) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ if (file.id < 0) { @@ -322,7 +321,7 @@ extern "C" { return F_status_set_error(F_file_closed); } - if (!buffer.used) { + if (!destination.used) { *written = 0; return F_data_not; @@ -331,11 +330,11 @@ extern "C" { const f_array_length_t total = (range.stop - range.start) + 1; f_array_length_t write_max = total; - if (write_max > buffer.used) { - write_max = buffer.used; + if (write_max > destination.used) { + write_max = destination.used; } - const f_status_t status = private_fl_utf_file_write_until(file, buffer.string + range.start, write_max, written); + const f_status_t status = private_fl_utf_file_write_until(file, destination.string + range.start, write_max, written); if (F_status_is_error(status)) return F_status_set_error(status); if (status == F_none) { @@ -343,7 +342,7 @@ extern "C" { return F_none_stop; } - if (range.start + *written == buffer.used) { + if (range.start + *written == destination.used) { return F_none_eos; } } diff --git a/level_1/fl_utf_file/c/utf_file.h b/level_1/fl_utf_file/c/utf_file.h index 5b9c5a1..6185f6e 100644 --- a/level_1/fl_utf_file/c/utf_file.h +++ b/level_1/fl_utf_file/c/utf_file.h @@ -28,14 +28,14 @@ extern "C" { /** * Read until EOF is reached. * - * To check how much was read into the buffer, record buffer->used before execution and compare to buffer->used after execution. + * To check how much was read into the destination, record destination->used before execution and compare to destination->used after execution. * * @param file * The file to read. * The file must already be open. - * @param buffer - * The buffer the file is being read into. - * The contents of the file is appended into this buffer. + * @param destination + * The destination the file is being read into. + * The contents of the file is appended into this destination. * * @return * F_none on success. @@ -56,20 +56,20 @@ extern "C" { * @see read() */ #ifndef _di_fl_utf_file_read_ - extern f_status_t fl_utf_file_read(const f_file_t file, f_utf_string_dynamic_t *buffer); + extern f_status_t fl_utf_file_read(const f_file_t file, f_utf_string_dynamic_t * const destination); #endif // _di_fl_utf_file_read_ /** * Read until a single block is filled or EOF is reached. * - * To check how much was read into the buffer, record buffer->used before execution and compare to buffer->used after execution. + * To check how much was read into the destination, record destination->used before execution and compare to destination->used after execution. * * @param file * The file to read. * The file must already be open. - * @param buffer - * The buffer the file is being read into. - * The contents of the file is appended into this buffer. + * @param destination + * The destination the file is being read into. + * The contents of the file is appended into this destination. * * @return * F_none on success. @@ -90,21 +90,21 @@ extern "C" { * @see read() */ #ifndef _di_fl_utf_file_read_block_ - extern f_status_t fl_utf_file_read_block(const f_file_t file, f_utf_string_dynamic_t *buffer); + extern f_status_t fl_utf_file_read_block(const f_file_t file, f_utf_string_dynamic_t * const destination); #endif // _di_fl_utf_file_read_block_ /** - * Read until a given number or EOF is reached, storing it in the buffer. + * Read until a given number or EOF is reached, storing it in the destination. * - * To check how much was read into the buffer, record buffer->used before execution and compare to buffer->used after execution. + * To check how much was read into the destination, record destination->used before execution and compare to destination->used after execution. * * @param file * The file to read. * The file must already be open. * @param total * The total bytes to read, unless EOF is reached first. - * @param buffer - * The buffer the file is being read into. + * @param destination + * The destination the file is being read into. * * @return * F_none on success. @@ -125,23 +125,23 @@ extern "C" { * @see read() */ #ifndef _di_fl_utf_file_read_until_ - extern f_status_t fl_utf_file_read_until(const f_file_t file, const f_array_length_t total, f_utf_string_dynamic_t *buffer); + extern f_status_t fl_utf_file_read_until(const f_file_t file, const f_array_length_t total, f_utf_string_dynamic_t * const destination); #endif // _di_fl_utf_file_read_until_ /** - * Write until entire buffer is written. + * Write until entire destination is written. * * @param file * The file to write to. * The file must already be open. - * @param buffer - * The buffer to write to the file. + * @param destination + * The destination to write to the file. * @param written * The total bytes written. * * @return * F_none on success. - * F_none_eos on success but range.stop exceeded buffer.used (only wrote up to buffer.used). + * F_none_eos on success but range.stop exceeded destination.used (only wrote up to destination.used). * F_none_stop on success but no data was written (written == 0) (not an error and often happens if file type is not a regular file). * F_complete_not_utf_stop if max write was reached but was unable to completely write a given UTF-8 block (incomplete UTF-8 is not written, not even partially). * @@ -158,25 +158,25 @@ extern "C" { * @see write() */ #ifndef _di_fl_utf_file_write_ - extern f_status_t fl_utf_file_write(const f_file_t file, const f_utf_string_static_t buffer, f_array_length_t *written); + extern f_status_t fl_utf_file_write(const f_file_t file, const f_utf_string_static_t destination, f_array_length_t * const written); #endif // _di_fl_utf_file_write_ /** - * Write until a single block is filled or entire buffer is written. + * Write until a single block is filled or entire destination is written. * - * To check how much was write into the buffer, record buffer->used before execution and compare to buffer->used after execution. + * To check how much was write into the destination, record destination->used before execution and compare to destination->used after execution. * * @param file * The file to write to. * The file must already be open. - * @param buffer - * The buffer to write to the file. + * @param destination + * The destination to write to the file. * @param written * The total bytes written. * * @return * F_none on success. - * F_none_eos on success but range.stop exceeded buffer.used (only wrote up to buffer.used). + * F_none_eos on success but range.stop exceeded destination.used (only wrote up to destination.used). * F_none_stop on success but no data was written (written == 0) (not an error and often happens if file type is not a regular file). * F_complete_not_utf_stop if max write was reached but was unable to completely write a given UTF-8 block (incomplete UTF-8 is not written, not even partially). * @@ -193,25 +193,25 @@ extern "C" { * @see write() */ #ifndef _di_fl_utf_file_write_block_ - extern f_status_t fl_utf_file_write_block(const f_file_t file, const f_utf_string_static_t buffer, f_array_length_t *written); + extern f_status_t fl_utf_file_write_block(const f_file_t file, const f_utf_string_static_t destination, f_array_length_t * const written); #endif // _di_fl_utf_file_write_block_ /** - * Write until a given number or entire buffer is written. + * Write until a given number or entire destination is written. * * @param file * The file to write to. * The file must already be open. - * @param buffer - * The buffer to write to the file. + * @param destination + * The destination to write to the file. * @param total - * The total bytes to write, unless end of buffer is reached first. + * The total bytes to write, unless end of destination is reached first. * @param written * The total bytes written. * * @return * F_none on success. - * F_none_eos on success but range.stop exceeded buffer.used (only wrote up to buffer.used). + * F_none_eos on success but range.stop exceeded destination.used (only wrote up to destination.used). * F_none_stop on success but no data was written (written == 0) (not an error and often happens if file type is not a regular file). * F_complete_not_utf_stop if max write was reached but was unable to completely write a given UTF-8 block (incomplete UTF-8 is not written, not even partially). * @@ -228,25 +228,25 @@ extern "C" { * @see write() */ #ifndef _di_fl_utf_file_write_until_ - extern f_status_t fl_utf_file_write_until(const f_file_t file, const f_utf_string_static_t buffer, const f_array_length_t total, f_array_length_t *written); + extern f_status_t fl_utf_file_write_until(const f_file_t file, const f_utf_string_static_t destination, const f_array_length_t total, f_array_length_t * const written); #endif // _di_fl_utf_file_write_until_ /** - * Write a given range within the buffer. + * Write a given range within the destination. * * @param file * The file to write to. * The file must already be open. - * @param buffer - * The buffer to write to the file. + * @param destination + * The destination to write to the file. * @param range - * An inclusive start an stop range within the buffer to read. + * An inclusive start an stop range within the destination to read. * @param written * The total bytes written. * * @return * F_none on success. - * F_none_eos on success but range.stop exceeded buffer.used (only wrote up to buffer.used). + * F_none_eos on success but range.stop exceeded destination.used (only wrote up to destination.used). * F_none_stop on success but no data was written (written == 0) (not an error and often happens if file type is not a regular file). * F_complete_not_utf_stop if max write was reached but was unable to completely write a given UTF-8 block (incomplete UTF-8 is not written, not even partially). * @@ -263,7 +263,7 @@ extern "C" { * @see write() */ #ifndef _di_fl_utf_file_write_range_ - extern f_status_t fl_utf_file_write_range(const f_file_t file, const f_utf_string_static_t buffer, const f_string_range_t range, f_array_length_t *written); + extern f_status_t fl_utf_file_write_range(const f_file_t file, const f_utf_string_static_t buffer, const f_string_range_t range, f_array_length_t * const written); #endif // _di_fl_utf_file_write_range_ #ifdef __cplusplus diff --git a/level_2/fll_execute/c/execute.c b/level_2/fll_execute/c/execute.c index ec7a616..ffa6ce4 100644 --- a/level_2/fll_execute/c/execute.c +++ b/level_2/fll_execute/c/execute.c @@ -6,7 +6,7 @@ extern "C" { #endif #ifndef _di_fll_execute_arguments_add_ - f_status_t fll_execute_arguments_add(const f_string_static_t source, f_string_dynamics_t *arguments) { + f_status_t fll_execute_arguments_add(const f_string_static_t source, f_string_dynamics_t * const arguments) { #ifndef _di_level_2_parameter_checking_ if (!arguments) return F_status_set_error(F_parameter); #endif // _di_level_2_parameter_checking_ @@ -22,7 +22,7 @@ extern "C" { #endif // _di_fll_execute_arguments_add_ #ifndef _di_fll_execute_arguments_add_parameter_ - f_status_t fll_execute_arguments_add_parameter(const f_string_static_t prefix, const f_string_static_t name, const f_string_static_t value, f_string_dynamics_t *arguments) { + f_status_t fll_execute_arguments_add_parameter(const f_string_static_t prefix, const f_string_static_t name, const f_string_static_t value, f_string_dynamics_t * const arguments) { #ifndef _di_level_2_parameter_checking_ if (!arguments) return F_status_set_error(F_parameter); #endif // _di_level_2_parameter_checking_ @@ -38,7 +38,7 @@ extern "C" { #endif // _di_fll_execute_arguments_add_parameter_ #ifndef _di_fll_execute_arguments_add_parameter_set_ - f_status_t fll_execute_arguments_add_parameter_set(const f_string_static_t prefix[], const f_string_static_t name[], const f_string_static_t value[], const f_array_length_t size, f_string_dynamics_t *arguments) { + f_status_t fll_execute_arguments_add_parameter_set(const f_string_static_t prefix[], const f_string_static_t name[], const f_string_static_t value[], const f_array_length_t size, f_string_dynamics_t * const arguments) { #ifndef _di_level_2_parameter_checking_ if (!arguments) return F_status_set_error(F_parameter); #endif // _di_level_2_parameter_checking_ @@ -55,7 +55,7 @@ extern "C" { #endif // _di_fll_execute_arguments_add_parameter_set_ #ifndef _di_fll_execute_arguments_add_set_ - f_status_t fll_execute_arguments_add_set(const f_string_static_t source[], const f_array_length_t size, f_string_dynamics_t *arguments) { + f_status_t fll_execute_arguments_add_set(const f_string_static_t source[], const f_array_length_t size, f_string_dynamics_t * const arguments) { #ifndef _di_level_2_parameter_checking_ if (!arguments) return F_status_set_error(F_parameter); #endif // _di_level_2_parameter_checking_ @@ -72,7 +72,7 @@ extern "C" { #endif // _di_fll_execute_arguments_add_set_ #ifndef _di_fll_execute_into_ - f_status_t fll_execute_into(const f_string_static_t program, const f_string_statics_t arguments, const uint8_t option, const f_string_maps_t *environment, int *result) { + f_status_t fll_execute_into(const f_string_static_t program, const f_string_statics_t arguments, const uint8_t option, const f_string_maps_t *environment, int * const result) { #ifndef _di_level_2_parameter_checking_ if (!program.used && !arguments.used) return F_status_set_error(F_parameter); if (!result) return F_status_set_error(F_parameter); @@ -268,7 +268,7 @@ extern "C" { #endif // _di_fll_execute_into_ #ifndef _di_fll_execute_program_ - f_status_t fll_execute_program(const f_string_static_t program, const f_string_statics_t arguments, fl_execute_parameter_t * const parameter, fl_execute_as_t * const as, void *result) { + f_status_t fll_execute_program(const f_string_static_t program, const f_string_statics_t arguments, fl_execute_parameter_t * const parameter, fl_execute_as_t * const as, void * const result) { #ifndef _di_level_2_parameter_checking_ if (!program.used && !arguments.used) return F_status_set_error(F_parameter); if (!result) return F_status_set_error(F_parameter); diff --git a/level_2/fll_execute/c/execute.h b/level_2/fll_execute/c/execute.h index e86a8ba..a250eff 100644 --- a/level_2/fll_execute/c/execute.h +++ b/level_2/fll_execute/c/execute.h @@ -78,7 +78,7 @@ extern "C" { * @see f_string_dynamics_increase() */ #ifndef _di_fll_execute_arguments_add_ - extern f_status_t fll_execute_arguments_add(const f_string_static_t source, f_string_dynamics_t *arguments); + extern f_status_t fll_execute_arguments_add(const f_string_static_t source, f_string_dynamics_t * const arguments); #endif // _di_fll_execute_arguments_add_ /** @@ -114,7 +114,7 @@ extern "C" { * @see f_string_dynamics_increase() */ #ifndef _di_fll_execute_arguments_add_parameter_ - extern f_status_t fll_execute_arguments_add_parameter(const f_string_static_t prefix, const f_string_static_t name, const f_string_static_t value, f_string_dynamics_t *arguments); + extern f_status_t fll_execute_arguments_add_parameter(const f_string_static_t prefix, const f_string_static_t name, const f_string_static_t value, f_string_dynamics_t * const arguments); #endif // _di_fll_execute_arguments_add_parameter_ /** @@ -152,7 +152,7 @@ extern "C" { * @see f_string_dynamics_increase() */ #ifndef _di_fll_execute_arguments_add_parameter_set_ - extern f_status_t fll_execute_arguments_add_parameter_set(const f_string_static_t prefix[], const f_string_static_t name[], const f_string_static_t value[], const f_array_length_t size, f_string_dynamics_t *arguments); + extern f_status_t fll_execute_arguments_add_parameter_set(const f_string_static_t prefix[], const f_string_static_t name[], const f_string_static_t value[], const f_array_length_t size, f_string_dynamics_t * const arguments); #endif // _di_fll_execute_arguments_add_parameter_set_ /** @@ -233,7 +233,7 @@ extern "C" { * @see fl_environment_path_explode() */ #ifndef _di_fll_execute_into_ - extern f_status_t fll_execute_into(const f_string_static_t program, const f_string_statics_t arguments, const uint8_t option, const f_string_maps_t *environment, int *result); + extern f_status_t fll_execute_into(const f_string_static_t program, const f_string_statics_t arguments, const uint8_t option, const f_string_maps_t * const environment, int * const result); #endif // _di_fll_execute_into_ /** @@ -346,7 +346,7 @@ extern "C" { * @see fl_environment_path_explode() */ #ifndef _di_fll_execute_program_ - extern f_status_t fll_execute_program(const f_string_static_t program, const f_string_statics_t arguments, fl_execute_parameter_t * const parameter, fl_execute_as_t * const as, void *result); + extern f_status_t fll_execute_program(const f_string_static_t program, const f_string_statics_t arguments, fl_execute_parameter_t * const parameter, fl_execute_as_t * const as, void * const result); #endif // _di_fll_execute_program_ #ifdef __cplusplus diff --git a/level_2/fll_execute/c/private-execute.c b/level_2/fll_execute/c/private-execute.c index 8c6188a..2d82aa2 100644 --- a/level_2/fll_execute/c/private-execute.c +++ b/level_2/fll_execute/c/private-execute.c @@ -6,7 +6,7 @@ extern "C" { #endif #if !defined(_di_fll_execute_arguments_add_) || !defined(_di_fll_execute_arguments_add_set_) - f_status_t private_fll_execute_arguments_add(const f_string_static_t source, f_string_dynamics_t *arguments) { + f_status_t private_fll_execute_arguments_add(const f_string_static_t source, f_string_dynamics_t * const arguments) { arguments->array[arguments->used].used = 0; @@ -23,7 +23,7 @@ extern "C" { #endif // !defined(_di_fll_execute_arguments_add_) || !defined(_di_fll_execute_arguments_add_set_) #if !defined(_di_fll_execute_arguments_add_parameter_) || !defined(_di_fll_execute_arguments_add_parameter_set_) - f_status_t private_fll_execute_arguments_add_parameter(const f_string_static_t prefix, const f_string_static_t name, const f_string_static_t value, f_string_dynamics_t *arguments) { + f_status_t private_fll_execute_arguments_add_parameter(const f_string_static_t prefix, const f_string_static_t name, const f_string_static_t value, f_string_dynamics_t * const arguments) { arguments->array[arguments->used].used = 0; @@ -53,7 +53,7 @@ extern "C" { #endif // !defined(_di_fll_execute_arguments_add_parameter_) || !defined(_di_fll_execute_arguments_add_parameter_set_) #if !defined(_di_fll_execute_program_) - f_status_t private_fll_execute_as_child(const fl_execute_as_t as, fl_execute_parameter_t * const parameter, int *result) { + f_status_t private_fll_execute_as_child(const fl_execute_as_t as, fl_execute_parameter_t * const parameter, int * const result) { if (as.nice) { errno = 0; @@ -125,13 +125,13 @@ extern "C" { #endif // !defined(_di_fll_execute_program_) #if !defined(_di_fll_execute_program_) - f_status_t private_fll_execute_as_parent(const fl_execute_as_t as, const pid_t id_child, fl_execute_parameter_t * const parameter, char *result) { + f_status_t private_fll_execute_as_parent(const fl_execute_as_t as, const pid_t id_child, fl_execute_parameter_t * const parameter, const f_string_static_t *result) { if (as.affinity && as.affinity->used) { cpu_set_t *set = CPU_ALLOC(as.affinity->used); if (set == 0) { - result[0] = '1'; + result = &f_string_ascii_1_s; return F_status_set_error(F_processor); } @@ -149,7 +149,7 @@ extern "C" { CPU_FREE(set); if (response == -1) { - result[0] = '1'; + result = &f_string_ascii_1_s; return F_status_set_error(F_processor); } @@ -157,7 +157,7 @@ extern "C" { if (as.control_group) { if (F_status_is_error(fl_control_group_apply(*as.control_group, id_child))) { - result[0] = '1'; + result = &f_string_ascii_1_s; return F_status_set_error(F_control_group); } @@ -170,7 +170,7 @@ extern "C" { errno = 0; if (sched_setscheduler(id_child, as.scheduler->policy, ¶meter_schedule) == -1) { - result[0] = '1'; + result = &f_string_ascii_1_s; return F_status_set_error(F_schedule); } @@ -180,7 +180,7 @@ extern "C" { for (f_array_length_t i = 0; i < as.limits->used; ++i) { if (F_status_is_error(f_limit_process(id_child, as.limits->array[i].type, &as.limits->array[i].value, 0))) { - result[0] = '1'; + result = &f_string_ascii_1_s; return F_status_set_error(F_limit); } @@ -192,7 +192,7 @@ extern "C" { #endif // !defined(_di_fll_execute_program_) #if !defined(_di_fll_execute_program_) - f_status_t private_fll_execute_fork(const bool direct, const f_string_static_t program, const f_string_t fixed_arguments[], fl_execute_parameter_t * const parameter, fl_execute_as_t * const as, void *result) { + f_status_t private_fll_execute_fork(const bool direct, const f_string_static_t program, const f_string_t fixed_arguments[], fl_execute_parameter_t * const parameter, fl_execute_as_t * const as, void * const result) { int descriptors[2] = { -1, -1 }; @@ -221,20 +221,13 @@ extern "C" { // Have the parent perform all appropriate access controls and then send either '0' for no error or '1' for error to the child. { - char string_result[2] = { '0', 0 }; - + const f_string_static_t *string_result = &f_string_ascii_0_s; const f_file_t file = macro_f_file_t_initialize2(0, descriptors[1], F_file_flag_write_only_d); - f_string_static_t buffer = f_string_static_t_initialize; - - buffer.string = string_result; - buffer.used = 1; - buffer.size = 2; - const f_status_t status = private_fll_execute_as_parent(*as, id_process, parameter, string_result); // Inform the child that it can now safely begin (or exit). - f_file_write(file, buffer, 0); + f_file_write(file, *string_result, 0); // Close the write pipe for the parent when finished writing. close(descriptors[1]); @@ -285,7 +278,7 @@ extern "C" { f_file_read_block(file, &response); - if (!response.used || response.string[0] == '1') { + if (!response.used || response.string[0] == f_string_ascii_1_s.string[0]) { f_string_dynamic_resize(0, &response); close(descriptors[0]); @@ -381,7 +374,7 @@ extern "C" { #endif // !defined(_di_fll_execute_program_) #if !defined(_di_fll_execute_program_) - f_status_t private_fll_execute_fork_data(const bool direct, const f_string_static_t program, const f_string_t fixed_arguments[], fl_execute_parameter_t * const parameter, fl_execute_as_t * const as, void *result) { + f_status_t private_fll_execute_fork_data(const bool direct, const f_string_static_t program, const f_string_t fixed_arguments[], fl_execute_parameter_t * const parameter, fl_execute_as_t * const as, void * const result) { int descriptors[2] = { -1, -1 }; @@ -404,7 +397,7 @@ extern "C" { close(descriptors[0]); { - char string_result[2] = { '0', 0 }; + const f_string_static_t *string_result = &f_string_ascii_0_s; const f_file_t file = macro_f_file_t_initialize2(0, descriptors[1], F_file_flag_write_only_d); @@ -412,22 +405,16 @@ extern "C" { // Have the parent perform all appropriate access controls and then send either '0' for no error or '1' for error to the child. if (as) { - f_string_static_t buffer = f_string_static_t_initialize; - - buffer.string = string_result; - buffer.used = 1; - buffer.size = 2; - status = private_fll_execute_as_parent(*as, id_process, parameter, string_result); // Inform the child that it can now safely begin (or exit). - if (F_status_is_error(f_file_write(file, buffer, 0))) { - string_result[0] = '1'; + if (F_status_is_error(f_file_write(file, *string_result, 0))) { + string_result = &f_string_ascii_1_s; } } // Write all data, if child doesn't read this could block until child closes the pipe. - if (string_result[0] == '0') { + if (string_result->string[0] == f_string_ascii_0_s.string[0]) { f_file_write(file, *parameter->data, 0); } @@ -479,7 +466,7 @@ extern "C" { f_file_read_block(file, &response); - if (!response.used || response.string[0] == '1') { + if (!response.used || response.string[0] == f_string_ascii_1_s.string[0]) { f_string_dynamic_resize(0, &response); close(descriptors[0]); diff --git a/level_2/fll_execute/c/private-execute.h b/level_2/fll_execute/c/private-execute.h index 8bde5c3..d3caae7 100644 --- a/level_2/fll_execute/c/private-execute.h +++ b/level_2/fll_execute/c/private-execute.h @@ -37,7 +37,7 @@ extern "C" { * @see f_string_dynamics_increase() */ #if !defined(_di_fll_execute_arguments_add_) || !defined(_di_fll_execute_arguments_add_set_) - extern f_status_t private_fll_execute_arguments_add(const f_string_static_t source, f_string_dynamics_t *arguments) F_attribute_visibility_internal_d; + extern f_status_t private_fll_execute_arguments_add(const f_string_static_t source, f_string_dynamics_t * const arguments) F_attribute_visibility_internal_d; #endif // !defined(_di_fll_execute_arguments_add_) || !defined(_di_fll_execute_arguments_add_set_) /** @@ -70,7 +70,7 @@ extern "C" { * @see fll_execute_arguments_dynamic_add_parameter_set() */ #if !defined(_di_fll_execute_arguments_add_parameter_) || !defined(_di_fll_execute_arguments_add_parameter_set_) - extern f_status_t private_fll_execute_arguments_add_parameter(const f_string_static_t prefix, const f_string_static_t name, const f_string_static_t value, f_string_dynamics_t *arguments) F_attribute_visibility_internal_d; + extern f_status_t private_fll_execute_arguments_add_parameter(const f_string_static_t prefix, const f_string_static_t name, const f_string_static_t value, f_string_dynamics_t * const arguments) F_attribute_visibility_internal_d; #endif // !defined(_di_fll_execute_arguments_add_parameter_) || !defined(_di_fll_execute_arguments_add_parameter_set_) /** @@ -109,7 +109,7 @@ extern "C" { * @see fll_execute_program() */ #if !defined(_di_fll_execute_program_) - extern f_status_t private_fll_execute_as_child(const fl_execute_as_t as, fl_execute_parameter_t * const parameter, int *result) F_attribute_visibility_internal_d; + extern f_status_t private_fll_execute_as_child(const fl_execute_as_t as, fl_execute_parameter_t * const parameter, int * const result) F_attribute_visibility_internal_d; #endif // !defined(_di_fll_execute_program_) /** @@ -127,7 +127,7 @@ extern "C" { * option: * A bitwise set of options, such as: FL_execute_parameter_option_exit_d, and FL_execute_parameter_option_path_d. * @param result - * A NULL termianted 2-byte string array where the first character represents the return code ('0' for success, '1' for failure). + * A string representing the return code ('0' for success, '1' for failure). * * @return * F_none on success. @@ -151,7 +151,7 @@ extern "C" { * @see fll_execute_program() */ #if !defined(_di_fll_execute_program_) - extern f_status_t private_fll_execute_as_parent(const fl_execute_as_t as, const pid_t id_child, fl_execute_parameter_t * const parameter, char *result) F_attribute_visibility_internal_d; + extern f_status_t private_fll_execute_as_parent(const fl_execute_as_t as, const pid_t id_child, fl_execute_parameter_t * const parameter, const f_string_static_t *result) F_attribute_visibility_internal_d; #endif // !defined(_di_fll_execute_program_) /** @@ -227,7 +227,7 @@ extern "C" { * @see fll_execute_program() */ #if !defined(_di_fll_execute_program_) - extern f_status_t private_fll_execute_fork(const bool direct, const f_string_static_t program, const f_string_t fixed_arguments[], fl_execute_parameter_t * const parameter, fl_execute_as_t * const as, void *result) F_attribute_visibility_internal_d; + extern f_status_t private_fll_execute_fork(const bool direct, const f_string_static_t program, const f_string_t fixed_arguments[], fl_execute_parameter_t * const parameter, fl_execute_as_t * const as, void * const result) F_attribute_visibility_internal_d; #endif // !defined(_di_fll_execute_program_) /** @@ -302,7 +302,7 @@ extern "C" { * @see fll_execute_program() */ #if !defined(_di_fll_execute_program_) - extern f_status_t private_fll_execute_fork_data(const bool direct, const f_string_static_t program, const f_string_t fixed_arguments[], fl_execute_parameter_t * const parameter, fl_execute_as_t * const as, void *result) F_attribute_visibility_internal_d; + extern f_status_t private_fll_execute_fork_data(const bool direct, const f_string_static_t program, const f_string_t fixed_arguments[], fl_execute_parameter_t * const parameter, fl_execute_as_t * const as, void * const result) F_attribute_visibility_internal_d; #endif // !defined(_di_fll_execute_program_) /** diff --git a/level_2/fll_fss/c/fss.c b/level_2/fll_fss/c/fss.c index dedcc05..3f2c670 100644 --- a/level_2/fll_fss/c/fss.c +++ b/level_2/fll_fss/c/fss.c @@ -5,7 +5,7 @@ extern "C" { #endif #ifndef _di_fll_fss_identify_ - f_status_t fll_fss_identify(const f_string_static_t buffer, f_string_range_t *range, f_fll_ids_t *ids) { + f_status_t fll_fss_identify(const f_string_static_t buffer, f_string_range_t * const range, f_fll_ids_t * const ids) { #ifndef _di_level_2_parameter_checking_ if (!range) return F_status_set_error(F_parameter); #endif // _di_level_2_parameter_checking_ @@ -123,7 +123,7 @@ extern "C" { } if (F_status_is_error_not(status)) { - status = fl_string_fll_identify(buffer, range, ids ? &ids->array[ids->used] : &id); + status = fl_string_dynamic_partial_fll_identify(buffer, range, ids ? &ids->array[ids->used] : &id); } if (F_status_is_error(status) || (status == F_found_not && !found_fss)) { @@ -185,7 +185,7 @@ extern "C" { #endif // _di_fll_fss_identify_ #ifndef _di_fll_fss_snatch_ - f_status_t fll_fss_snatch(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_static_t names[], const f_array_length_t size, f_string_dynamic_t *values[], bool matches[], f_array_length_t *indexs[]) { + f_status_t fll_fss_snatch(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_static_t names[], const f_array_length_t size, f_string_dynamic_t * const values[], bool matches[], f_array_length_t * const indexs[]) { #ifndef _di_level_2_parameter_checking_ if (!size) return F_status_set_error(F_parameter); if (objects.used != contents.used) return F_status_set_error(F_parameter); @@ -238,7 +238,7 @@ extern "C" { #endif // _di_fll_fss_snatch_ #ifndef _di_fll_fss_snatch_apart_ - f_status_t fll_fss_snatch_apart(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_static_t names[], const f_array_length_t size, f_string_dynamics_t *values[], bool matches[], f_array_lengths_t *indexs[]) { + f_status_t fll_fss_snatch_apart(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_static_t names[], const f_array_length_t size, f_string_dynamics_t * const values[], bool matches[], f_array_lengths_t * const indexs[]) { #ifndef _di_level_2_parameter_checking_ if (!size) return F_status_set_error(F_parameter); if (objects.used != contents.used) return F_status_set_error(F_parameter); @@ -304,7 +304,7 @@ extern "C" { #endif // _di_fll_fss_snatch_apart_ #ifndef _di_fll_fss_snatch_map_ - f_status_t fll_fss_snatch_map(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_static_t names[], const f_array_length_t size, f_string_maps_t *values[], bool matches[], f_array_lengths_t *indexs[]) { + f_status_t fll_fss_snatch_map(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_static_t names[], const f_array_length_t size, f_string_maps_t * const values[], bool matches[], f_array_lengths_t * const indexs[]) { #ifndef _di_level_2_parameter_checking_ if (!size) return F_status_set_error(F_parameter); if (objects.used != contents.used) return F_status_set_error(F_parameter); @@ -447,7 +447,7 @@ extern "C" { #endif // _di_fll_fss_snatch_map_ #ifndef _di_fll_fss_snatch_map_apart_ - f_status_t fll_fss_snatch_map_apart(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_static_t names[], const f_array_length_t size, f_string_map_multis_t *values[], bool matches[], f_array_lengths_t *indexs[]) { + f_status_t fll_fss_snatch_map_apart(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_static_t names[], const f_array_length_t size, f_string_map_multis_t * const values[], bool matches[], f_array_lengths_t * const indexs[]) { #ifndef _di_level_2_parameter_checking_ if (!size) return F_status_set_error(F_parameter); if (objects.used != contents.used) return F_status_set_error(F_parameter); @@ -521,7 +521,7 @@ extern "C" { #endif // _di_fll_fss_snatch_map_apart_ #ifndef _di_fll_fss_snatch_map_mash_ - f_status_t fll_fss_snatch_map_mash(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_static_t names[], const f_array_length_t size, const f_string_static_t glue, f_string_maps_t *values[], bool matches[], f_array_lengths_t *indexs[]) { + f_status_t fll_fss_snatch_map_mash(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_static_t names[], const f_array_length_t size, const f_string_static_t glue, f_string_maps_t * const values[], bool matches[], f_array_lengths_t * const indexs[]) { #ifndef _di_level_2_parameter_checking_ if (!size) return F_status_set_error(F_parameter); if (objects.used != contents.used) return F_status_set_error(F_parameter); @@ -590,7 +590,7 @@ extern "C" { #endif // _di_fll_fss_snatch_map_mash_ #ifndef _di_fll_fss_snatch_map_mash_apart_ - f_status_t fll_fss_snatch_map_mash_apart(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_static_t names[], const f_array_length_t size, const f_string_static_t glue, f_string_map_multis_t *values[], bool matches[], f_array_lengths_t *indexs[]) { + f_status_t fll_fss_snatch_map_mash_apart(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_static_t names[], const f_array_length_t size, const f_string_static_t glue, f_string_map_multis_t * const values[], bool matches[], f_array_lengths_t * const indexs[]) { #ifndef _di_level_2_parameter_checking_ if (!size) return F_status_set_error(F_parameter); if (objects.used != contents.used) return F_status_set_error(F_parameter); @@ -706,7 +706,7 @@ extern "C" { #endif // _di_fll_fss_snatch_map_mash_apart_ #ifndef _di_fll_fss_snatch_map_together_ - f_status_t fll_fss_snatch_map_together(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_static_t names[], const f_array_length_t size, const f_string_static_t glue, f_string_maps_t *values[], bool matches[], f_array_lengths_t *indexs[]) { + f_status_t fll_fss_snatch_map_together(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_static_t names[], const f_array_length_t size, const f_string_static_t glue, f_string_maps_t * const values[], bool matches[], f_array_lengths_t * const indexs[]) { #ifndef _di_level_2_parameter_checking_ if (!size) return F_status_set_error(F_parameter); if (objects.used != contents.used) return F_status_set_error(F_parameter); @@ -820,7 +820,7 @@ extern "C" { #endif // _di_fll_fss_snatch_map_together_ #ifndef _di_fll_fss_snatch_mash_ - f_status_t fll_fss_snatch_mash(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_static_t names[], const f_array_length_t size, const f_string_static_t glue, f_string_dynamic_t *values[], bool matches[], f_array_length_t *indexs[]) { + f_status_t fll_fss_snatch_mash(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_static_t names[], const f_array_length_t size, const f_string_static_t glue, f_string_dynamic_t * const values[], bool matches[], f_array_length_t * const indexs[]) { #ifndef _di_level_2_parameter_checking_ if (!size) return F_status_set_error(F_parameter); if (objects.used != contents.used) return F_status_set_error(F_parameter); @@ -875,7 +875,7 @@ extern "C" { #endif // _di_fll_fss_snatch_mash_ #ifndef _di_fll_fss_snatch_mash_apart_ - f_status_t fll_fss_snatch_mash_apart(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_static_t names[], const f_array_length_t size, const f_string_static_t glue, f_string_dynamics_t *values[], bool matches[], f_array_lengths_t *indexs[]) { + f_status_t fll_fss_snatch_mash_apart(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_static_t names[], const f_array_length_t size, const f_string_static_t glue, f_string_dynamics_t * const values[], bool matches[], f_array_lengths_t * const indexs[]) { #ifndef _di_level_2_parameter_checking_ if (!size) return F_status_set_error(F_parameter); if (objects.used != contents.used) return F_status_set_error(F_parameter); @@ -933,7 +933,7 @@ extern "C" { #endif // _di_fll_fss_snatch_mash_apart_ #ifndef _di_fll_fss_snatch_together_ - f_status_t fll_fss_snatch_together(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_static_t names[], const f_array_length_t size, const f_string_static_t glue, f_string_dynamic_t *values[], bool matches[], f_array_length_t *indexs[]) { + f_status_t fll_fss_snatch_together(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_static_t names[], const f_array_length_t size, const f_string_static_t glue, f_string_dynamic_t * const values[], bool matches[], f_array_length_t * const indexs[]) { #ifndef _di_level_2_parameter_checking_ if (!size) return F_status_set_error(F_parameter); if (objects.used != contents.used) return F_status_set_error(F_parameter); diff --git a/level_2/fll_fss/c/fss.h b/level_2/fll_fss/c/fss.h index 8279ec5..38fdd58 100644 --- a/level_2/fll_fss/c/fss.h +++ b/level_2/fll_fss/c/fss.h @@ -39,7 +39,7 @@ extern "C" { * This expects there to be at least a single "fss-XXXX" FSS Identifier. * If one is not found but the line contains valid FLL Identifiers, then this returns F_maybe. * - * See the fl_string_fll_identify() function for details on individual FLL/FSS Identifier processing. + * See the fl_string_dynamic_partial_fll_identify() function for details on individual FLL/FSS Identifier processing. * * @param buffer * The string to process. @@ -67,14 +67,14 @@ extern "C" { * * Errors (with error bit) from: f_fll_ids_increase(). * Errors (with error bit) from: f_utf_is_whitespace(). - * Errors (with error bit) from: fl_string_fll_identify(). + * Errors (with error bit) from: fl_string_dynamic_partial_fll_identify(). * * @see f_fll_ids_increase() * @see f_utf_is_whitespace() - * @see fl_string_fll_identify() + * @see fl_string_dynamic_partial_fll_identify() */ #ifndef _di_fll_fss_identify_ - extern f_status_t fll_fss_identify(const f_string_static_t buffer, f_string_range_t *range, f_fll_ids_t *ids); + extern f_status_t fll_fss_identify(const f_string_static_t buffer, f_string_range_t * const range, f_fll_ids_t * const ids); #endif // _di_fll_fss_identify_ /** @@ -120,7 +120,7 @@ extern "C" { * @see fl_string_compare_trim() */ #ifndef _di_fll_fss_snatch_ - extern f_status_t fll_fss_snatch(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_static_t names[], const f_array_length_t size, f_string_dynamic_t *values[], bool matches[], f_array_length_t *indexs[]); + extern f_status_t fll_fss_snatch(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_static_t names[], const f_array_length_t size, f_string_dynamic_t * const values[], bool matches[], f_array_length_t * const indexs[]); #endif // _di_fll_fss_snatch_ /** @@ -168,7 +168,7 @@ extern "C" { * @see fl_string_compare_trim() */ #ifndef _di_fll_fss_snatch_apart_ - extern f_status_t fll_fss_snatch_apart(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_static_t names[], const f_array_length_t size, f_string_dynamics_t *values[], bool matches[], f_array_lengths_t *indexs[]); + extern f_status_t fll_fss_snatch_apart(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_static_t names[], const f_array_length_t size, f_string_dynamics_t * const values[], bool matches[], f_array_lengths_t * const indexs[]); #endif // _di_fll_fss_snatch_apart_ /** @@ -218,7 +218,7 @@ extern "C" { * @see fl_string_compare_trim() */ #ifndef _di_fll_fss_snatch_map_ - extern f_status_t fll_fss_snatch_map(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_static_t names[], const f_array_length_t size, f_string_maps_t *values[], bool matches[], f_array_lengths_t *indexs[]); + extern f_status_t fll_fss_snatch_map(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_static_t names[], const f_array_length_t size, f_string_maps_t * const values[], bool matches[], f_array_lengths_t * const indexs[]); #endif // _di_fll_fss_snatch_map_ /** @@ -270,7 +270,7 @@ extern "C" { * @see fl_string_compare_trim() */ #ifndef _di_fll_fss_snatch_map_apart_ - extern f_status_t fll_fss_snatch_map_apart(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_static_t names[], const f_array_length_t size, f_string_map_multis_t *values[], bool matches[], f_array_lengths_t *indexs[]); + extern f_status_t fll_fss_snatch_map_apart(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_static_t names[], const f_array_length_t size, f_string_map_multis_t * const values[], bool matches[], f_array_lengths_t * const indexs[]); #endif // _di_fll_fss_snatch_map_apart_ /** @@ -320,7 +320,7 @@ extern "C" { * Errors (with error bit) from: fl_string_dynamic_partial_compare_trim_string(). */ #ifndef _di_fll_fss_snatch_map_mash_ - extern f_status_t fll_fss_snatch_map_mash(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_static_t names[], const f_array_length_t size, const f_string_static_t glue, f_string_maps_t *values[], bool matches[], f_array_lengths_t *indexs[]); + extern f_status_t fll_fss_snatch_map_mash(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_static_t names[], const f_array_length_t size, const f_string_static_t glue, f_string_maps_t * const values[], bool matches[], f_array_lengths_t * const indexs[]); #endif // _di_fll_fss_snatch_map_mash_ /** @@ -374,7 +374,7 @@ extern "C" { * @see fl_string_compare_trim() */ #ifndef _di_fll_fss_snatch_map_mash_apart_ - extern f_status_t fll_fss_snatch_map_mash_apart(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_static_t names[], const f_array_length_t size, const f_string_static_t glue, f_string_map_multis_t *values[], bool matches[], f_array_lengths_t *indexs[]); + extern f_status_t fll_fss_snatch_map_mash_apart(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_static_t names[], const f_array_length_t size, const f_string_static_t glue, f_string_map_multis_t * const values[], bool matches[], f_array_lengths_t * const indexs[]); #endif // _di_fll_fss_snatch_map_mash_apart_ /** @@ -427,7 +427,7 @@ extern "C" { * @see fl_string_compare_trim() */ #ifndef _di_fll_fss_snatch_map_together_ - extern f_status_t fll_fss_snatch_map_together(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_static_t names[], const f_array_length_t size, const f_string_static_t glue, f_string_maps_t *values[], bool matches[], f_array_lengths_t *indexs[]); + extern f_status_t fll_fss_snatch_map_together(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_static_t names[], const f_array_length_t size, const f_string_static_t glue, f_string_maps_t * const values[], bool matches[], f_array_lengths_t * const indexs[]); #endif // _di_fll_fss_snatch_map_together_ /** @@ -474,7 +474,7 @@ extern "C" { * Errors (with error bit) from: fl_string_dynamic_partial_compare_trim_string(). */ #ifndef _di_fll_fss_snatch_mash_ - extern f_status_t fll_fss_snatch_mash(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_static_t names[], const f_array_length_t size, const f_string_static_t glue, f_string_dynamic_t *values[], bool matches[], f_array_length_t *indexs[]); + extern f_status_t fll_fss_snatch_mash(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_static_t names[], const f_array_length_t size, const f_string_static_t glue, f_string_dynamic_t * const values[], bool matches[], f_array_length_t * const indexs[]); #endif // _di_fll_fss_snatch_mash_ /** @@ -525,7 +525,7 @@ extern "C" { * @see fl_string_compare_trim() */ #ifndef _di_fll_fss_snatch_mash_apart_ - extern f_status_t fll_fss_snatch_mash_apart(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_static_t names[], const f_array_length_t size, const f_string_static_t glue, f_string_dynamics_t *values[], bool matches[], f_array_lengths_t *indexs[]); + extern f_status_t fll_fss_snatch_mash_apart(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_static_t names[], const f_array_length_t size, const f_string_static_t glue, f_string_dynamics_t * const values[], bool matches[], f_array_lengths_t * const indexs[]); #endif // _di_fll_fss_snatch_mash_apart_ /** @@ -573,7 +573,7 @@ extern "C" { * @see fl_string_compare_trim() */ #ifndef _di_fll_fss_snatch_together_ - extern f_status_t fll_fss_snatch_together(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_static_t names[], const f_array_length_t size, const f_string_static_t glue, f_string_dynamic_t *values[], bool matches[], f_array_length_t *indexs[]); + extern f_status_t fll_fss_snatch_together(const f_string_static_t buffer, const f_fss_objects_t objects, const f_fss_contents_t contents, const f_string_static_t names[], const f_array_length_t size, const f_string_static_t glue, f_string_dynamic_t * const values[], bool matches[], f_array_length_t * const indexs[]); #endif // _di_fll_fss_snatch_together_ #ifdef __cplusplus diff --git a/level_2/fll_fss/c/fss/basic.c b/level_2/fll_fss/c/fss/basic.c index f967b53..8e6382e 100644 --- a/level_2/fll_fss/c/fss/basic.c +++ b/level_2/fll_fss/c/fss/basic.c @@ -5,7 +5,7 @@ extern "C" { #endif #ifndef _di_fll_fss_basic_read_ - f_status_t fll_fss_basic_read(const f_string_static_t buffer, f_state_t state, f_string_range_t *range, f_fss_objects_t *objects, f_fss_contents_t *contents, f_fss_quotes_t *objects_quoted, f_fss_delimits_t *objects_delimits, f_fss_delimits_t *contents_delimits) { + f_status_t fll_fss_basic_read(const f_string_static_t buffer, f_state_t state, f_string_range_t * const range, f_fss_objects_t * const objects, f_fss_contents_t * const contents, f_fss_quotes_t * const objects_quoted, f_fss_delimits_t * const objects_delimits, f_fss_delimits_t * const contents_delimits) { #ifndef _di_level_2_parameter_checking_ if (!range) return F_status_set_error(F_parameter); if (!objects) return F_status_set_error(F_parameter); @@ -152,7 +152,7 @@ extern "C" { #endif // _di_fll_fss_basic_read_ #ifndef _di_fll_fss_basic_write_string_ - f_status_t fll_fss_basic_write_string(const f_string_static_t object, const f_string_static_t content, const f_fss_quote_t quote, f_state_t state, f_string_dynamic_t *destination) { + f_status_t fll_fss_basic_write_string(const f_string_static_t object, const f_string_static_t content, const f_fss_quote_t quote, f_state_t state, f_string_dynamic_t * const destination) { #ifndef _di_level_2_parameter_checking_ if (!destination) return F_status_set_error(F_parameter); #endif // _di_level_2_parameter_checking_ diff --git a/level_2/fll_fss/c/fss/basic.h b/level_2/fll_fss/c/fss/basic.h index 7c70eef..9fdaf4f 100644 --- a/level_2/fll_fss/c/fss/basic.h +++ b/level_2/fll_fss/c/fss/basic.h @@ -80,7 +80,7 @@ extern "C" { * @see fl_fss_basic_object_read() */ #ifndef _di_fll_fss_basic_read_ - extern f_status_t fll_fss_basic_read(const f_string_static_t buffer, f_state_t state, f_string_range_t *range, f_fss_objects_t *objects, f_fss_contents_t *contents, f_fss_quotes_t *objects_quoted, f_fss_delimits_t *objects_delimits, f_fss_delimits_t *contents_delimits); + extern f_status_t fll_fss_basic_read(const f_string_static_t buffer, f_state_t state, f_string_range_t * const range, f_fss_objects_t * const objects, f_fss_contents_t * const contents, f_fss_quotes_t * const objects_quoted, f_fss_delimits_t * const objects_delimits, f_fss_delimits_t * const contents_delimits); #endif // _di_fll_fss_basic_read_ /** @@ -127,7 +127,7 @@ extern "C" { * @see fl_fss_basic_object_write() */ #ifndef _di_fll_fss_basic_write_string_ - extern f_status_t fll_fss_basic_write_string(const f_string_static_t object, const f_string_static_t content, const f_fss_quote_t quote, f_state_t state, f_string_dynamic_t *destination); + extern f_status_t fll_fss_basic_write_string(const f_string_static_t object, const f_string_static_t content, const f_fss_quote_t quote, f_state_t state, f_string_dynamic_t * const destination); #endif // _di_fll_fss_basic_write_string_ #ifdef __cplusplus diff --git a/level_2/fll_fss/c/fss/basic_list.c b/level_2/fll_fss/c/fss/basic_list.c index bd3e501..e660048 100644 --- a/level_2/fll_fss/c/fss/basic_list.c +++ b/level_2/fll_fss/c/fss/basic_list.c @@ -5,7 +5,7 @@ extern "C" { #endif #ifndef _di_fll_fss_basic_list_read_ - f_status_t fll_fss_basic_list_read(const f_string_static_t buffer, f_state_t state, f_string_range_t *range, f_fss_objects_t *objects, f_fss_contents_t *contents, f_fss_delimits_t *objects_delimits, f_fss_delimits_t *contents_delimits, f_fss_comments_t *comments) { + f_status_t fll_fss_basic_list_read(const f_string_static_t buffer, f_state_t state, f_string_range_t * const range, f_fss_objects_t * const objects, f_fss_contents_t * const contents, f_fss_delimits_t * const objects_delimits, f_fss_delimits_t * const contents_delimits, f_fss_comments_t * const comments) { #ifndef _di_level_2_parameter_checking_ if (!range) return F_status_set_error(F_parameter); if (!objects) return F_status_set_error(F_parameter); @@ -129,7 +129,7 @@ extern "C" { #endif // _di_fll_fss_basic_list_read_ #ifndef _di_fll_fss_basic_list_write_string_ - f_status_t fll_fss_basic_list_write_string(const f_string_static_t object, const f_string_static_t content, const f_string_static_t *content_prepend, f_state_t state, f_string_dynamic_t *destination) { + f_status_t fll_fss_basic_list_write_string(const f_string_static_t object, const f_string_static_t content, const f_string_static_t * const content_prepend, f_state_t state, f_string_dynamic_t * const destination) { #ifndef _di_level_2_parameter_checking_ if (!destination) return F_status_set_error(F_parameter); #endif // _di_level_2_parameter_checking_ diff --git a/level_2/fll_fss/c/fss/basic_list.h b/level_2/fll_fss/c/fss/basic_list.h index 75c6403..605f23f 100644 --- a/level_2/fll_fss/c/fss/basic_list.h +++ b/level_2/fll_fss/c/fss/basic_list.h @@ -79,7 +79,7 @@ extern "C" { * @see fl_fss_basic_list_object_read() */ #ifndef _di_fll_fss_basic_list_read_ - extern f_status_t fll_fss_basic_list_read(const f_string_static_t buffer, f_state_t state, f_string_range_t *range, f_fss_objects_t *objects, f_fss_contents_t *contents, f_fss_delimits_t *objects_delimits, f_fss_delimits_t *contents_delimits, f_fss_comments_t *comments); + extern f_status_t fll_fss_basic_list_read(const f_string_static_t buffer, f_state_t state, f_string_range_t * const range, f_fss_objects_t * const objects, f_fss_contents_t * const contents, f_fss_delimits_t * const objects_delimits, f_fss_delimits_t * const contents_delimits, f_fss_comments_t * const comments); #endif // _di_fll_fss_basic_list_read_ /** @@ -124,7 +124,7 @@ extern "C" { * @see fl_fss_basic_list_object_write() */ #ifndef _di_fll_fss_basic_list_write_string_ - extern f_status_t fll_fss_basic_list_write_string(const f_string_static_t object, const f_string_static_t content, const f_string_static_t *content_prepend, f_state_t state, f_string_dynamic_t *destination); + extern f_status_t fll_fss_basic_list_write_string(const f_string_static_t object, const f_string_static_t content, const f_string_static_t *content_prepend, f_state_t state, f_string_dynamic_t * const destination); #endif // _di_fll_fss_basic_list_write_string_ #ifdef __cplusplus diff --git a/level_2/fll_fss/c/fss/embedded_list.c b/level_2/fll_fss/c/fss/embedded_list.c index 908f7c5..b83899f 100644 --- a/level_2/fll_fss/c/fss/embedded_list.c +++ b/level_2/fll_fss/c/fss/embedded_list.c @@ -5,7 +5,7 @@ extern "C" { #endif #ifndef _di_fll_fss_embedded_list_read_ - f_status_t fll_fss_embedded_list_read(const f_string_static_t buffer, f_state_t state, f_string_range_t *range, f_fss_nest_t *nest, f_fss_delimits_t *objects_delimits, f_fss_delimits_t *contents_delimits, f_fss_comments_t *comments) { + f_status_t fll_fss_embedded_list_read(const f_string_static_t buffer, f_state_t state, f_string_range_t * const range, f_fss_nest_t * const nest, f_fss_delimits_t * const objects_delimits, f_fss_delimits_t * const contents_delimits, f_fss_comments_t * const comments) { #ifndef _di_level_2_parameter_checking_ if (!range) return F_status_set_error(F_parameter); if (!nest) return F_status_set_error(F_parameter); @@ -126,7 +126,7 @@ extern "C" { #endif // _di_fll_fss_embedded_list_read_ #ifndef _di_fll_fss_embedded_list_write_string_ - f_status_t fll_fss_embedded_list_write_string(const f_string_static_t object, const f_string_static_t content, const f_string_static_t *content_prepend, const f_string_ranges_t *ignore, f_state_t state, f_string_dynamic_t *destination) { + f_status_t fll_fss_embedded_list_write_string(const f_string_static_t object, const f_string_static_t content, const f_string_static_t *content_prepend, const f_string_ranges_t *ignore, f_state_t state, f_string_dynamic_t * const destination) { #ifndef _di_level_2_parameter_checking_ if (!destination) return F_status_set_error(F_parameter); #endif // _di_level_2_parameter_checking_ diff --git a/level_2/fll_fss/c/fss/embedded_list.h b/level_2/fll_fss/c/fss/embedded_list.h index c482376..2809f76 100644 --- a/level_2/fll_fss/c/fss/embedded_list.h +++ b/level_2/fll_fss/c/fss/embedded_list.h @@ -81,7 +81,7 @@ extern "C" { * Errors (with error bit) from: fl_fss_embedded_list_object_read(). */ #ifndef _di_fll_fss_embedded_list_read_ - extern f_status_t fll_fss_embedded_list_read(const f_string_static_t buffer, f_state_t state, f_string_range_t *range, f_fss_nest_t *nest, f_fss_delimits_t *objects_delimits, f_fss_delimits_t *contents_delimits, f_fss_comments_t *comments); + extern f_status_t fll_fss_embedded_list_read(const f_string_static_t buffer, f_state_t state, f_string_range_t * const range, f_fss_nest_t * const nest, f_fss_delimits_t * const objects_delimits, f_fss_delimits_t * const contents_delimits, f_fss_comments_t * const comments); #endif // _di_fll_fss_embedded_list_read_ /** @@ -131,7 +131,7 @@ extern "C" { * @see fl_fss_embedded_list_object_write() */ #ifndef _di_fll_fss_embedded_list_write_string_ - extern f_status_t fll_fss_embedded_list_write_string(const f_string_static_t object, const f_string_static_t content, const f_string_static_t *content_prepend, const f_string_ranges_t *ignore, f_state_t state, f_string_dynamic_t *destination); + extern f_status_t fll_fss_embedded_list_write_string(const f_string_static_t object, const f_string_static_t content, const f_string_static_t *content_prepend, const f_string_ranges_t *ignore, f_state_t state, f_string_dynamic_t * const destination); #endif // _di_fll_fss_embedded_list_write_string_ #ifdef __cplusplus diff --git a/level_2/fll_fss/c/fss/extended.c b/level_2/fll_fss/c/fss/extended.c index c5c2177..d8ec866 100644 --- a/level_2/fll_fss/c/fss/extended.c +++ b/level_2/fll_fss/c/fss/extended.c @@ -5,7 +5,7 @@ extern "C" { #endif #ifndef _di_fll_fss_extended_read_ - f_status_t fll_fss_extended_read(const f_string_static_t buffer, f_state_t state, f_string_range_t *range, f_fss_objects_t *objects, f_fss_contents_t *contents, f_fss_quotes_t *objects_quoted, f_fss_quotess_t *contents_quoted, f_fss_delimits_t *objects_delimits, f_fss_delimits_t *contents_delimits) { + f_status_t fll_fss_extended_read(const f_string_static_t buffer, f_state_t state, f_string_range_t * const range, f_fss_objects_t * const objects, f_fss_contents_t * const contents, f_fss_quotes_t * const objects_quoted, f_fss_quotess_t * const contents_quoted, f_fss_delimits_t * const objects_delimits, f_fss_delimits_t * const contents_delimits) { #ifndef _di_level_2_parameter_checking_ if (!range) return F_status_set_error(F_parameter); if (!objects) return F_status_set_error(F_parameter); @@ -191,7 +191,7 @@ extern "C" { #endif // _di_fll_fss_extended_read_ #ifndef _di_fll_fss_extended_write_string_ - f_status_t fll_fss_extended_write_string(const f_string_static_t object, const f_string_statics_t contents, const f_fss_quote_t quote, f_state_t state, f_string_dynamic_t *destination) { + f_status_t fll_fss_extended_write_string(const f_string_static_t object, const f_string_statics_t contents, const f_fss_quote_t quote, f_state_t state, f_string_dynamic_t * const destination) { #ifndef _di_level_2_parameter_checking_ if (!destination) return F_status_set_error(F_parameter); #endif // _di_level_2_parameter_checking_ diff --git a/level_2/fll_fss/c/fss/extended.h b/level_2/fll_fss/c/fss/extended.h index 39393d7..d29b602 100644 --- a/level_2/fll_fss/c/fss/extended.h +++ b/level_2/fll_fss/c/fss/extended.h @@ -82,7 +82,7 @@ extern "C" { * @see fl_fss_extended_object_read() */ #ifndef _di_fll_fss_extended_read_ - extern f_status_t fll_fss_extended_read(const f_string_static_t buffer, f_state_t state, f_string_range_t *range, f_fss_objects_t *objects, f_fss_contents_t *contents, f_fss_quotes_t *objects_quoted, f_fss_quotess_t *contents_quoted, f_fss_delimits_t *objects_delimits, f_fss_delimits_t *contents_delimits); + extern f_status_t fll_fss_extended_read(const f_string_static_t buffer, f_state_t state, f_string_range_t * const range, f_fss_objects_t * const objects, f_fss_contents_t * const contents, f_fss_quotes_t * const objects_quoted, f_fss_quotess_t * const contents_quoted, f_fss_delimits_t * const objects_delimits, f_fss_delimits_t * const contents_delimits); #endif // _di_fll_fss_extended_read_ /** @@ -127,7 +127,7 @@ extern "C" { * @see fl_fss_extended_object_write() */ #ifndef _di_fll_fss_extended_write_string_ - extern f_status_t fll_fss_extended_write_string(const f_string_static_t object, const f_string_statics_t contents, const f_fss_quote_t quote, f_state_t state, f_string_dynamic_t *destination); + extern f_status_t fll_fss_extended_write_string(const f_string_static_t object, const f_string_statics_t contents, const f_fss_quote_t quote, f_state_t state, f_string_dynamic_t * const destination); #endif // _di_fll_fss_extended_write_string_ #ifdef __cplusplus diff --git a/level_2/fll_fss/c/fss/extended_list.c b/level_2/fll_fss/c/fss/extended_list.c index fb1fade..a6df5f4 100644 --- a/level_2/fll_fss/c/fss/extended_list.c +++ b/level_2/fll_fss/c/fss/extended_list.c @@ -5,7 +5,7 @@ extern "C" { #endif #ifndef _di_fll_fss_extended_list_read_ - f_status_t fll_fss_extended_list_read(const f_string_static_t buffer, f_state_t state, f_string_range_t *range, f_fss_objects_t *objects, f_fss_contents_t *contents, f_fss_delimits_t *objects_delimits, f_fss_delimits_t *contents_delimits, f_fss_comments_t *comments) { + f_status_t fll_fss_extended_list_read(const f_string_static_t buffer, f_state_t state, f_string_range_t * const range, f_fss_objects_t * const objects, f_fss_contents_t * const contents, f_fss_delimits_t * const objects_delimits, f_fss_delimits_t * const contents_delimits, f_fss_comments_t * const comments) { #ifndef _di_level_2_parameter_checking_ if (!range) return F_status_set_error(F_parameter); if (!objects) return F_status_set_error(F_parameter); @@ -126,7 +126,7 @@ extern "C" { #endif // _di_fll_fss_extended_list_read_ #ifndef _di_fll_fss_extended_list_write_string_ - f_status_t fll_fss_extended_list_write_string(const f_string_static_t object, const f_string_static_t content, const f_string_static_t *content_prepend, const f_string_ranges_t *ignore, f_state_t state, f_string_dynamic_t *destination) { + f_status_t fll_fss_extended_list_write_string(const f_string_static_t object, const f_string_static_t content, const f_string_static_t *content_prepend, const f_string_ranges_t *ignore, f_state_t state, f_string_dynamic_t * const destination) { #ifndef _di_level_2_parameter_checking_ if (!destination) return F_status_set_error(F_parameter); #endif // _di_level_2_parameter_checking_ diff --git a/level_2/fll_fss/c/fss/extended_list.h b/level_2/fll_fss/c/fss/extended_list.h index 0871e90..e3b14a0 100644 --- a/level_2/fll_fss/c/fss/extended_list.h +++ b/level_2/fll_fss/c/fss/extended_list.h @@ -88,7 +88,7 @@ extern "C" { * @see fl_fss_extended_list_object_read() */ #ifndef _di_fll_fss_extended_list_read_ - extern f_status_t fll_fss_extended_list_read(const f_string_static_t buffer, f_state_t state, f_string_range_t *range, f_fss_objects_t *objects, f_fss_contents_t *contents, f_fss_delimits_t *objects_delimits, f_fss_delimits_t *contents_delimits, f_fss_comments_t *comments); + extern f_status_t fll_fss_extended_list_read(const f_string_static_t buffer, f_state_t state, f_string_range_t * const range, f_fss_objects_t * const objects, f_fss_contents_t * const contents, f_fss_delimits_t * const objects_delimits, f_fss_delimits_t * const contents_delimits, f_fss_comments_t * const comments); #endif // _di_fll_fss_extended_list_read_ /** @@ -138,7 +138,7 @@ extern "C" { * @see fl_fss_extended_list_object_write() */ #ifndef _di_fll_fss_extended_list_write_string_ - extern f_status_t fll_fss_extended_list_write_string(const f_string_static_t object, const f_string_static_t content, const f_string_static_t *content_prepend, const f_string_ranges_t *ignore, f_state_t state, f_string_dynamic_t *destination); + extern f_status_t fll_fss_extended_list_write_string(const f_string_static_t object, const f_string_static_t content, const f_string_static_t *content_prepend, const f_string_ranges_t *ignore, f_state_t state, f_string_dynamic_t * const destination); #endif // _di_fll_fss_extended_list_write_string_ #ifdef __cplusplus diff --git a/level_2/fll_fss/c/fss/payload.c b/level_2/fll_fss/c/fss/payload.c index 4839903..3656957 100644 --- a/level_2/fll_fss/c/fss/payload.c +++ b/level_2/fll_fss/c/fss/payload.c @@ -5,7 +5,7 @@ extern "C" { #endif #ifndef _di_fll_fss_payload_read_ - f_status_t fll_fss_payload_read(const f_string_static_t buffer, f_state_t state, f_string_range_t *range, f_fss_objects_t *objects, f_fss_contents_t *contents, f_fss_delimits_t *objects_delimits, f_fss_delimits_t *contents_delimits, f_fss_comments_t *comments) { + f_status_t fll_fss_payload_read(const f_string_static_t buffer, f_state_t state, f_string_range_t * const range, f_fss_objects_t * const objects, f_fss_contents_t * const contents, f_fss_delimits_t * const objects_delimits, f_fss_delimits_t * const contents_delimits, f_fss_comments_t * const comments) { #ifndef _di_level_2_parameter_checking_ if (!range) return F_status_set_error(F_parameter); if (!objects) return F_status_set_error(F_parameter); @@ -177,7 +177,7 @@ extern "C" { #endif // _di_fll_fss_payload_read_ #ifndef _di_fll_fss_payload_write_string_ - f_status_t fll_fss_payload_write_string(const f_string_static_t object, const f_string_static_t content, const bool trim, const f_string_static_t *content_prepend, f_state_t state, f_string_dynamic_t *destination) { + f_status_t fll_fss_payload_write_string(const f_string_static_t object, const f_string_static_t content, const bool trim, const f_string_static_t *content_prepend, f_state_t state, f_string_dynamic_t * const destination) { #ifndef _di_level_2_parameter_checking_ if (!destination) return F_status_set_error(F_parameter); #endif // _di_level_2_parameter_checking_ diff --git a/level_2/fll_fss/c/fss/payload.h b/level_2/fll_fss/c/fss/payload.h index a42982a..57f849e 100644 --- a/level_2/fll_fss/c/fss/payload.h +++ b/level_2/fll_fss/c/fss/payload.h @@ -89,7 +89,7 @@ extern "C" { * @see fl_fss_basic_list_object_read() */ #ifndef _di_fll_fss_payload_read_ - extern f_status_t fll_fss_payload_read(const f_string_static_t buffer, f_state_t state, f_string_range_t *range, f_fss_objects_t *objects, f_fss_contents_t *contents, f_fss_delimits_t *objects_delimits, f_fss_delimits_t *contents_delimits, f_fss_comments_t *comments); + extern f_status_t fll_fss_payload_read(const f_string_static_t buffer, f_state_t state, f_string_range_t * const range, f_fss_objects_t * const objects, f_fss_contents_t * const contents, f_fss_delimits_t * const objects_delimits, f_fss_delimits_t * const contents_delimits, f_fss_comments_t * const comments); #endif // _di_fll_fss_payload_read_ /** @@ -146,7 +146,7 @@ extern "C" { * @see fl_fss_basic_list_object_write() */ #ifndef _di_fll_fss_payload_write_string_ - extern f_status_t fll_fss_payload_write_string(const f_string_static_t object, const f_string_static_t content, const bool trim, const f_string_static_t *content_prepend, f_state_t state, f_string_dynamic_t *destination); + extern f_status_t fll_fss_payload_write_string(const f_string_static_t object, const f_string_static_t content, const bool trim, const f_string_static_t *content_prepend, f_state_t state, f_string_dynamic_t * const destination); #endif // _di_fll_fss_payload_write_string_ #ifdef __cplusplus diff --git a/level_2/fll_fss_status_string/c/fss_status_string.c b/level_2/fll_fss_status_string/c/fss_status_string.c index a3a859c..8db8904 100644 --- a/level_2/fll_fss_status_string/c/fss_status_string.c +++ b/level_2/fll_fss_status_string/c/fss_status_string.c @@ -32,7 +32,7 @@ extern "C" { #endif // _di_FLL_fss_status_string_ #ifndef _di_fll_fss_status_string_from_ - f_status_t fll_fss_status_string_from(const f_string_static_t name, f_status_t *code) { + f_status_t fll_fss_status_string_from(const f_string_static_t name, f_status_t * const code) { #ifndef _di_level_2_parameter_checking_ if (!code) return F_status_set_error(F_parameter); #endif // _di_level_2_parameter_checking_ @@ -139,7 +139,7 @@ extern "C" { #endif // _di_fll_fss_status_string_from_ #ifndef _di_fll_fss_status_string_to_ - f_status_t fll_fss_status_string_to(const f_status_t code, f_string_static_t *name) { + f_status_t fll_fss_status_string_to(const f_status_t code, f_string_static_t * const name) { #ifndef _di_level_2_parameter_checking_ if (!name) return F_status_set_error(F_parameter); #endif // _di_level_2_parameter_checking_ diff --git a/level_2/fll_fss_status_string/c/fss_status_string.h b/level_2/fll_fss_status_string/c/fss_status_string.h index 71f34ff..d117d99 100644 --- a/level_2/fll_fss_status_string/c/fss_status_string.h +++ b/level_2/fll_fss_status_string/c/fss_status_string.h @@ -110,7 +110,7 @@ extern "C" { * Errors (with error bit) from: f_conversion_character_is_decimal(). */ #ifndef _di_fll_fss_status_string_from_ - extern f_status_t fll_fss_status_string_from(const f_string_static_t name, f_status_t *code); + extern f_status_t fll_fss_status_string_from(const f_string_static_t name, f_status_t * const code); #endif // _di_fll_fss_status_string_to_ /** @@ -131,7 +131,7 @@ extern "C" { * @see f_status_string_to() */ #ifndef _di_fll_fss_status_string_to_ - extern f_status_t fll_fss_status_string_to(const f_status_t code, f_string_static_t *name); + extern f_status_t fll_fss_status_string_to(const f_status_t code, f_string_static_t * const name); #endif // _di_fll_fss_status_string_to_ #ifdef __cplusplus diff --git a/level_2/fll_iki/c/iki.c b/level_2/fll_iki/c/iki.c index 2af1dc2..43061e4 100644 --- a/level_2/fll_iki/c/iki.c +++ b/level_2/fll_iki/c/iki.c @@ -6,7 +6,7 @@ extern "C" { #endif #ifndef _di_fll_iki_content_escape_ - f_status_t fll_iki_content_escape(const f_string_static_t content, const f_string_static_t quote, f_string_dynamic_t *escaped) { + f_status_t fll_iki_content_escape(const f_string_static_t content, const f_string_static_t quote, f_string_dynamic_t * const escaped) { #ifndef _di_level_2_parameter_checking_ if (!quote.used) return F_status_set_error(F_parameter); if (quote.string[0] != f_iki_syntax_quote_single_s.string[0] && quote.string[0] != f_iki_syntax_quote_double_s.string[0]) return F_status_set_error(F_parameter); @@ -20,7 +20,7 @@ extern "C" { #endif // _di_fll_iki_content_escape_ #ifndef _di_fll_iki_content_partial_escape_ - f_status_t fll_iki_content_partial_escape(const f_string_static_t content, const f_string_range_t range, const f_string_static_t quote, f_string_dynamic_t *escaped) { + f_status_t fll_iki_content_partial_escape(const f_string_static_t content, const f_string_range_t range, const f_string_static_t quote, f_string_dynamic_t * const escaped) { #ifndef _di_level_2_parameter_checking_ if (range.start > range.stop) return F_status_set_error(F_parameter); if (range.start >= content.used) return F_status_set_error(F_parameter); @@ -34,7 +34,7 @@ extern "C" { #endif // _di_fll_iki_content_partial_escape_ #ifndef _di_fll_iki_content_partial_unescape_ - f_status_t fll_iki_content_partial_unescape(const f_string_static_t content, const f_string_range_t range, const f_string_static_t quote, f_string_dynamic_t *unescaped) { + f_status_t fll_iki_content_partial_unescape(const f_string_static_t content, const f_string_range_t range, const f_string_static_t quote, f_string_dynamic_t * const unescaped) { #ifndef _di_level_2_parameter_checking_ if (range.start > range.stop) return F_status_set_error(F_parameter); if (range.start >= content.used) return F_status_set_error(F_parameter); @@ -48,7 +48,7 @@ extern "C" { #endif // _di_fll_iki_content_partial_unescape_ #ifndef _di_fll_iki_content_unescape_ - f_status_t fll_iki_content_unescape(const f_string_static_t content, const f_string_static_t quote, f_string_dynamic_t *unescaped) { + f_status_t fll_iki_content_unescape(const f_string_static_t content, const f_string_static_t quote, f_string_dynamic_t * const unescaped) { #ifndef _di_level_2_parameter_checking_ if (!quote.used) return F_status_set_error(F_parameter); if (quote.string[0] != f_iki_syntax_quote_single_s.string[0] && quote.string[0] != f_iki_syntax_quote_double_s.string[0]) return F_status_set_error(F_parameter); diff --git a/level_2/fll_iki/c/iki.h b/level_2/fll_iki/c/iki.h index 7497e90..f20d602 100644 --- a/level_2/fll_iki/c/iki.h +++ b/level_2/fll_iki/c/iki.h @@ -57,7 +57,7 @@ extern "C" { * Errors (with error bit) from: f_string_dynamic_increase_by(). */ #ifndef _di_fll_iki_content_escape_ - extern f_status_t fll_iki_content_escape(const f_string_static_t content, const f_string_static_t quote, f_string_dynamic_t *escaped); + extern f_status_t fll_iki_content_escape(const f_string_static_t content, const f_string_static_t quote, f_string_dynamic_t * const escaped); #endif // _di_fll_iki_content_escape_ /** @@ -85,7 +85,7 @@ extern "C" { * Errors (with error bit) from: f_string_dynamic_increase_by(). */ #ifndef _di_fll_iki_content_partial_escape_ - extern f_status_t fll_iki_content_partial_escape(const f_string_static_t content, const f_string_range_t range, const f_string_static_t quote, f_string_dynamic_t *escaped); + extern f_status_t fll_iki_content_partial_escape(const f_string_static_t content, const f_string_range_t range, const f_string_static_t quote, f_string_dynamic_t * const escaped); #endif // _di_fll_iki_content_partial_escape_ /** @@ -114,7 +114,7 @@ extern "C" { * Errors (with error bit) from: f_string_dynamic_increase_by(). */ #ifndef _di_fll_iki_content_partial_unescape_ - extern f_status_t fll_iki_content_partial_unescape(const f_string_static_t content, const f_string_range_t range, const f_string_static_t quote, f_string_dynamic_t *unescaped); + extern f_status_t fll_iki_content_partial_unescape(const f_string_static_t content, const f_string_range_t range, const f_string_static_t quote, f_string_dynamic_t * const unescaped); #endif // _di_fll_iki_content_partial_unescape_ /** @@ -141,7 +141,7 @@ extern "C" { * Errors (with error bit) from: f_string_dynamic_increase_by(). */ #ifndef _di_fll_iki_content_unescape_ - extern f_status_t fll_iki_content_unescape(const f_string_static_t content, const f_string_static_t quote, f_string_dynamic_t *unescaped); + extern f_status_t fll_iki_content_unescape(const f_string_static_t content, const f_string_static_t quote, f_string_dynamic_t * const unescaped); #endif // _di_fll_iki_content_unescape_ #ifdef __cplusplus diff --git a/level_2/fll_iki/c/private-iki.c b/level_2/fll_iki/c/private-iki.c index 49befb1..cfb85bb 100644 --- a/level_2/fll_iki/c/private-iki.c +++ b/level_2/fll_iki/c/private-iki.c @@ -6,7 +6,7 @@ extern "C" { #endif #if !defined(_di_fll_iki_content_escape_) || !defined(_di_fll_iki_content_partial_escape_) - f_status_t private_fll_iki_content_partial_escape(const f_string_static_t content, const f_string_range_t range, const char quote, f_string_dynamic_t *escaped) { + f_status_t private_fll_iki_content_partial_escape(const f_string_static_t content, const f_string_range_t range, const char quote, f_string_dynamic_t * const escaped) { f_status_t status = F_none; @@ -71,7 +71,7 @@ extern "C" { #endif // !defined(_di_fll_iki_content_escape_) || !defined(_di_fll_iki_content_partial_escape_) #if !defined(_di_fll_iki_content_unescape_) || !defined(_di_fll_iki_content_partial_unescape_) - f_status_t private_fll_iki_content_partial_unescape(const f_string_static_t content, const f_string_range_t range, const char quote, f_string_dynamic_t *unescaped) { + f_status_t private_fll_iki_content_partial_unescape(const f_string_static_t content, const f_string_range_t range, const char quote, f_string_dynamic_t * const unescaped) { f_status_t status = F_none; diff --git a/level_2/fll_iki/c/private-iki.h b/level_2/fll_iki/c/private-iki.h index 09b0def..142752c 100644 --- a/level_2/fll_iki/c/private-iki.h +++ b/level_2/fll_iki/c/private-iki.h @@ -40,7 +40,7 @@ extern "C" { * Errors (with error bit) from: f_string_dynamic_increase_by(). */ #if !defined(_di_fll_iki_content_escape_) || !defined(_di_fll_iki_content_partial_escape_) - extern f_status_t private_fll_iki_content_partial_escape(const f_string_static_t content, const f_string_range_t range, const char quote, f_string_dynamic_t *escaped) F_attribute_visibility_internal_d; + extern f_status_t private_fll_iki_content_partial_escape(const f_string_static_t content, const f_string_range_t range, const char quote, f_string_dynamic_t * const escaped) F_attribute_visibility_internal_d; #endif // !defined(_di_fll_iki_content_escape_) || !defined(_di_fll_iki_content_partial_escape_) /** @@ -69,7 +69,7 @@ extern "C" { * Errors (with error bit) from: f_string_dynamic_increase_by(). */ #if !defined(_di_fll_iki_content_unescape_) || !defined(_di_fll_iki_content_partial_unescape_) - extern f_status_t private_fll_iki_content_partial_unescape(const f_string_static_t content, const f_string_range_t range, const char quote, f_string_dynamic_t *unescaped) F_attribute_visibility_internal_d; + extern f_status_t private_fll_iki_content_partial_unescape(const f_string_static_t content, const f_string_range_t range, const char quote, f_string_dynamic_t * const unescaped) F_attribute_visibility_internal_d; #endif // !defined(_di_fll_iki_content_unescape_) || !defined(_di_fll_iki_content_partial_unescape_) #ifdef __cplusplus diff --git a/level_2/fll_path/c/path.c b/level_2/fll_path/c/path.c index 42232c8..f218c9a 100644 --- a/level_2/fll_path/c/path.c +++ b/level_2/fll_path/c/path.c @@ -5,7 +5,7 @@ extern "C" { #endif #ifndef _di_fll_path_canonical_ - f_status_t fll_path_canonical(const f_string_static_t path, f_string_dynamic_t *canonical) { + f_status_t fll_path_canonical(const f_string_static_t path, f_string_dynamic_t * const canonical) { #ifndef _di_level_2_parameter_checking_ if (!canonical) return F_status_set_error(F_parameter); #endif // _di_level_2_parameter_checking_ diff --git a/level_2/fll_path/c/path.h b/level_2/fll_path/c/path.h index 2bed3ea..c5a6649 100644 --- a/level_2/fll_path/c/path.h +++ b/level_2/fll_path/c/path.h @@ -56,7 +56,7 @@ extern "C" { * @see f_string_dynamic_append_assure() */ #ifndef _di_fll_path_canonical_ - extern f_status_t fll_path_canonical(const f_string_static_t path, f_string_dynamic_t *canonical); + extern f_status_t fll_path_canonical(const f_string_static_t path, f_string_dynamic_t * const canonical); #endif // _di_fll_path_canonical_ #ifdef __cplusplus diff --git a/level_2/fll_print/c/print.c b/level_2/fll_print/c/print.c index 875bccf..ac44e02 100644 --- a/level_2/fll_print/c/print.c +++ b/level_2/fll_print/c/print.c @@ -5,7 +5,7 @@ extern "C" { #endif #ifndef _di_fll_print_ - f_status_t fll_print(const f_string_t string, const f_array_length_t length, FILE *output) { + f_status_t fll_print(const f_string_t string, const f_array_length_t length, FILE * const output) { flockfile(output); @@ -18,7 +18,7 @@ extern "C" { #endif // _di_fll_print_ #ifndef _di_fll_print_character_ - f_status_t fll_print_character(const char character, FILE *output) { + f_status_t fll_print_character(const char character, FILE * const output) { flockfile(output); @@ -31,7 +31,7 @@ extern "C" { #endif // _di_fll_print_character_ #ifndef _di_fll_print_character_safely_ - f_status_t fll_print_character_safely(const char character, FILE *output) { + f_status_t fll_print_character_safely(const char character, FILE * const output) { flockfile(output); @@ -44,7 +44,7 @@ extern "C" { #endif // _di_fll_print_character_safely_ #ifndef _di_fll_print_dynamic_ - f_status_t fll_print_dynamic(const f_string_static_t buffer, FILE *output) { + f_status_t fll_print_dynamic(const f_string_static_t buffer, FILE * const output) { flockfile(output); @@ -57,7 +57,7 @@ extern "C" { #endif // _di_fll_print_dynamic_ #ifndef _di_fll_print_dynamic_partial_ - f_status_t fll_print_dynamic_partial(const f_string_static_t buffer, const f_string_range_t range, FILE *output) { + f_status_t fll_print_dynamic_partial(const f_string_static_t buffer, const f_string_range_t range, FILE * const output) { flockfile(output); @@ -70,7 +70,7 @@ extern "C" { #endif // _di_fll_print_dynamic_partial_ #ifndef _di_fll_print_dynamic_partial_raw_ - f_status_t fll_print_dynamic_partial_raw(const f_string_static_t buffer, const f_string_range_t range, FILE *output) { + f_status_t fll_print_dynamic_partial_raw(const f_string_static_t buffer, const f_string_range_t range, FILE * const output) { flockfile(output); @@ -83,7 +83,7 @@ extern "C" { #endif // _di_fll_print_dynamic_partial_raw_ #ifndef _di_fll_print_dynamic_partial_raw_safely_ - f_status_t fll_print_dynamic_partial_raw_safely(const f_string_static_t buffer, const f_string_range_t range, FILE *output) { + f_status_t fll_print_dynamic_partial_raw_safely(const f_string_static_t buffer, const f_string_range_t range, FILE * const output) { flockfile(output); @@ -96,7 +96,7 @@ extern "C" { #endif // _di_fll_print_dynamic_partial_raw_safely_ #ifndef _di_fll_print_dynamic_partial_safely_ - f_status_t fll_print_dynamic_partial_safely(const f_string_static_t buffer, const f_string_range_t range, FILE *output) { + f_status_t fll_print_dynamic_partial_safely(const f_string_static_t buffer, const f_string_range_t range, FILE * const output) { flockfile(output); @@ -109,7 +109,7 @@ extern "C" { #endif // _di_fll_print_dynamic_partial_safely_ #ifndef _di_fll_print_dynamic_raw_ - f_status_t fll_print_dynamic_raw(const f_string_static_t buffer, FILE *output) { + f_status_t fll_print_dynamic_raw(const f_string_static_t buffer, FILE * const output) { flockfile(output); @@ -122,7 +122,7 @@ extern "C" { #endif // _di_fll_print_dynamic_raw_ #ifndef _di_fll_print_dynamic_raw_safely_ - f_status_t fll_print_dynamic_raw_safely(const f_string_static_t buffer, FILE *output) { + f_status_t fll_print_dynamic_raw_safely(const f_string_static_t buffer, FILE * const output) { flockfile(output); @@ -135,7 +135,7 @@ extern "C" { #endif // _di_fll_print_dynamic_raw_safely_ #ifndef _di_fll_print_dynamic_safely_ - f_status_t fll_print_dynamic_safely(const f_string_static_t buffer, FILE *output) { + f_status_t fll_print_dynamic_safely(const f_string_static_t buffer, FILE * const output) { flockfile(output); @@ -148,7 +148,7 @@ extern "C" { #endif // _di_fll_print_dynamic_safely_ #ifndef _di_fll_print_except_ - f_status_t fll_print_except(const f_string_t buffer, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except, FILE *output) { + f_status_t fll_print_except(const f_string_t buffer, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except, FILE * const output) { flockfile(output); @@ -161,7 +161,7 @@ extern "C" { #endif // _di_fll_print_except_ #ifndef _di_fll_print_except_dynamic_ - f_status_t fll_print_except_dynamic(const f_string_static_t buffer, const f_array_lengths_t except, FILE *output) { + f_status_t fll_print_except_dynamic(const f_string_static_t buffer, const f_array_lengths_t except, FILE * const output) { flockfile(output); @@ -174,7 +174,7 @@ extern "C" { #endif // _di_fll_print_except_dynamic_ #ifndef _di_fll_print_except_dynamic_partial_ - f_status_t fll_print_except_dynamic_partial(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except, FILE *output) { + f_status_t fll_print_except_dynamic_partial(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except, FILE * const output) { flockfile(output); @@ -187,7 +187,7 @@ extern "C" { #endif // _di_fll_print_except_dynamic_partial_ #ifndef _di_fll_print_except_dynamic_partial_raw_ - f_status_t fll_print_except_dynamic_partial_raw(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except, FILE *output) { + f_status_t fll_print_except_dynamic_partial_raw(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except, FILE * const output) { flockfile(output); @@ -200,7 +200,7 @@ extern "C" { #endif // _di_fll_print_except_dynamic_partial_raw_ #ifndef _di_fll_print_except_dynamic_partial_raw_safely_ - f_status_t fll_print_except_dynamic_partial_raw_safely(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except, FILE *output) { + f_status_t fll_print_except_dynamic_partial_raw_safely(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except, FILE * const output) { flockfile(output); @@ -213,7 +213,7 @@ extern "C" { #endif // _di_fll_print_except_dynamic_partial_raw_safely_ #ifndef _di_fll_print_except_dynamic_partial_safely_ - f_status_t fll_print_except_dynamic_partial_safely(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except, FILE *output) { + f_status_t fll_print_except_dynamic_partial_safely(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except, FILE * const output) { flockfile(output); @@ -226,7 +226,7 @@ extern "C" { #endif // _di_fll_print_except_dynamic_partial_safely_ #ifndef _di_fll_print_except_dynamic_raw_ - f_status_t fll_print_except_dynamic_raw(const f_string_static_t buffer, const f_array_lengths_t except, FILE *output) { + f_status_t fll_print_except_dynamic_raw(const f_string_static_t buffer, const f_array_lengths_t except, FILE * const output) { flockfile(output); @@ -239,7 +239,7 @@ extern "C" { #endif // _di_fll_print_except_dynamic_raw_ #ifndef _di_fll_print_except_dynamic_raw_safely_ - f_status_t fll_print_except_dynamic_raw_safely(const f_string_static_t buffer, const f_array_lengths_t except, FILE *output) { + f_status_t fll_print_except_dynamic_raw_safely(const f_string_static_t buffer, const f_array_lengths_t except, FILE * const output) { flockfile(output); @@ -252,7 +252,7 @@ extern "C" { #endif // _di_fll_print_except_dynamic_raw_safely_ #ifndef _di_fll_print_except_dynamic_safely_ - f_status_t fll_print_except_dynamic_safely(const f_string_static_t buffer, const f_array_lengths_t except, FILE *output) { + f_status_t fll_print_except_dynamic_safely(const f_string_static_t buffer, const f_array_lengths_t except, FILE * const output) { flockfile(output); @@ -265,7 +265,7 @@ extern "C" { #endif // _di_fll_print_except_dynamic_safely_ #ifndef _di_fll_print_except_raw_ - f_status_t fll_print_except_raw(const f_string_t buffer, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except, FILE *output) { + f_status_t fll_print_except_raw(const f_string_t buffer, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except, FILE * const output) { flockfile(output); @@ -278,7 +278,7 @@ extern "C" { #endif // _di_fll_print_except_raw_ #ifndef _di_fll_print_except_raw_safely_ - f_status_t fll_print_except_raw_safely(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except, FILE *output) { + f_status_t fll_print_except_raw_safely(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except, FILE * const output) { flockfile(output); @@ -291,7 +291,7 @@ extern "C" { #endif // _di_fll_print_except_raw_safely_ #ifndef _di_fll_print_except_safely_ - f_status_t fll_print_except_safely(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except, FILE *output) { + f_status_t fll_print_except_safely(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except, FILE * const output) { flockfile(output); @@ -304,7 +304,7 @@ extern "C" { #endif // _di_fll_print_except_safely_ #ifndef _di_fll_print_except_in_ - f_status_t fll_print_except_in(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE *output) { + f_status_t fll_print_except_in(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE * const output) { flockfile(output); @@ -317,7 +317,7 @@ extern "C" { #endif // _di_fll_print_except_in_ #ifndef _di_fll_print_except_in_dynamic_ - f_status_t fll_print_except_in_dynamic(const f_string_static_t buffer, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE *output) { + f_status_t fll_print_except_in_dynamic(const f_string_static_t buffer, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE * const output) { flockfile(output); @@ -330,7 +330,7 @@ extern "C" { #endif // _di_fll_print_except_in_dynamic_ #ifndef _di_fll_print_except_in_dynamic_partial_ - f_status_t fll_print_except_in_dynamic_partial(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE *output) { + f_status_t fll_print_except_in_dynamic_partial(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE * const output) { flockfile(output); @@ -343,7 +343,7 @@ extern "C" { #endif // _di_fll_print_except_in_dynamic_partial_ #ifndef _di_fll_print_except_in_dynamic_partial_raw_ - f_status_t fll_print_except_in_dynamic_partial_raw(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE *output) { + f_status_t fll_print_except_in_dynamic_partial_raw(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE * const output) { flockfile(output); @@ -356,7 +356,7 @@ extern "C" { #endif // _di_fll_print_except_in_dynamic_partial_raw_ #ifndef _di_fll_print_except_in_dynamic_partial_raw_safely_ - f_status_t fll_print_except_in_dynamic_partial_raw_safely(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE *output) { + f_status_t fll_print_except_in_dynamic_partial_raw_safely(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE * const output) { flockfile(output); @@ -369,7 +369,7 @@ extern "C" { #endif // _di_fll_print_except_in_dynamic_partial_raw_safely_ #ifndef _di_fll_print_except_in_dynamic_partial_safely_ - f_status_t fll_print_except_in_dynamic_partial_safely(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE *output) { + f_status_t fll_print_except_in_dynamic_partial_safely(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE * const output) { flockfile(output); @@ -382,7 +382,7 @@ extern "C" { #endif // _di_fll_print_except_in_dynamic_partial_safely_ #ifndef _di_fll_print_except_in_dynamic_raw_ - f_status_t fll_print_except_in_dynamic_raw(const f_string_static_t buffer, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE *output) { + f_status_t fll_print_except_in_dynamic_raw(const f_string_static_t buffer, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE * const output) { flockfile(output); @@ -395,7 +395,7 @@ extern "C" { #endif // _di_fll_print_except_in_dynamic_raw_ #ifndef _di_fll_print_except_in_dynamic_raw_safely_ - f_status_t fll_print_except_in_dynamic_raw_safely(const f_string_static_t buffer, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE *output) { + f_status_t fll_print_except_in_dynamic_raw_safely(const f_string_static_t buffer, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE * const output) { flockfile(output); @@ -408,7 +408,7 @@ extern "C" { #endif // _di_fll_print_except_in_dynamic_raw_safely_ #ifndef _di_fll_print_except_in_dynamic_safely_ - f_status_t fll_print_except_in_dynamic_safely(const f_string_static_t buffer, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE *output) { + f_status_t fll_print_except_in_dynamic_safely(const f_string_static_t buffer, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE * const output) { flockfile(output); @@ -421,7 +421,7 @@ extern "C" { #endif // _di_fll_print_except_in_dynamic_safely_ #ifndef _di_fll_print_except_in_raw_ - f_status_t fll_print_except_in_raw(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE *output) { + f_status_t fll_print_except_in_raw(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE * const output) { flockfile(output); @@ -434,7 +434,7 @@ extern "C" { #endif // _di_fll_print_except_in_raw_ #ifndef _di_fll_print_except_in_raw_safely_ - f_status_t fll_print_except_in_raw_safely(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE *output) { + f_status_t fll_print_except_in_raw_safely(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE * const output) { flockfile(output); @@ -447,7 +447,7 @@ extern "C" { #endif // _di_fll_print_except_in_raw_safely_ #ifndef _di_fll_print_except_in_safely_ - f_status_t fll_print_except_in_safely(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE *output) { + f_status_t fll_print_except_in_safely(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE * const output) { flockfile(output); @@ -460,7 +460,7 @@ extern "C" { #endif // _di_fll_print_except_in_safely_ #ifndef _di_fll_print_format_ - f_status_t fll_print_format(const f_string_t string, FILE *output, ...) { + f_status_t fll_print_format(const f_string_t string, FILE * const output, ...) { flockfile(output); @@ -479,7 +479,7 @@ extern "C" { #endif // _di_fll_print_format_ #ifndef _di_fll_print_format_convert_ - f_string_t fll_print_format_convert(const f_string_t string, FILE *output, va_list *ap, f_status_t *status) { + f_string_t fll_print_format_convert(const f_string_t string, FILE * const output, va_list * const ap, f_status_t * const status) { flockfile(output); @@ -492,7 +492,7 @@ extern "C" { #endif // _di_fll_print_format_convert_ #ifndef _di_fll_print_raw_ - f_status_t fll_print_raw(const f_string_t string, const f_array_length_t length, FILE *output) { + f_status_t fll_print_raw(const f_string_t string, const f_array_length_t length, FILE * const output) { flockfile(output); @@ -505,7 +505,7 @@ extern "C" { #endif // _di_fll_print_raw_ #ifndef _di_fll_print_raw_safely_ - f_status_t fll_print_raw_safely(const f_string_t string, const f_array_length_t length, FILE *output) { + f_status_t fll_print_raw_safely(const f_string_t string, const f_array_length_t length, FILE * const output) { flockfile(output); @@ -518,7 +518,7 @@ extern "C" { #endif // _di_fll_print_raw_safely_ #ifndef _di_fll_print_raw_terminated_ - f_status_t fll_print_raw_terminated(const f_string_t string, FILE *output) { + f_status_t fll_print_raw_terminated(const f_string_t string, FILE * const output) { flockfile(output); @@ -531,7 +531,7 @@ extern "C" { #endif // _di_fll_print_raw_terminated_ #ifndef _di_fll_print_safely_ - f_status_t fll_print_safely(const f_string_t string, const f_array_length_t length, FILE *output) { + f_status_t fll_print_safely(const f_string_t string, const f_array_length_t length, FILE * const output) { flockfile(output); @@ -544,7 +544,7 @@ extern "C" { #endif // _di_fll_print_safely_ #ifndef _di_fll_print_safely_terminated_ - f_status_t fll_print_safely_terminated(const f_string_t string, FILE *output) { + f_status_t fll_print_safely_terminated(const f_string_t string, FILE * const output) { flockfile(output); @@ -557,7 +557,7 @@ extern "C" { #endif // _di_fll_print_safely_terminated_ #ifndef _di_fll_print_string_va_ - f_status_t fll_print_string_va(const f_string_t string, FILE *output, va_list *ap) { + f_status_t fll_print_string_va(const f_string_t string, FILE * const output, va_list * const ap) { flockfile(output); @@ -570,7 +570,7 @@ extern "C" { #endif // _di_fll_print_string_va_ #ifndef _di_fll_print_terminated_ - f_status_t fll_print_terminated(const f_string_t string, FILE *output) { + f_status_t fll_print_terminated(const f_string_t string, FILE * const output) { flockfile(output); @@ -583,7 +583,7 @@ extern "C" { #endif // _di_fll_print_terminated_ #ifndef _di_fll_print_trim_raw_ - f_status_t fll_print_trim_raw(const f_string_t string, const f_array_length_t length, FILE *output) { + f_status_t fll_print_trim_raw(const f_string_t string, const f_array_length_t length, FILE * const output) { flockfile(output); @@ -596,7 +596,7 @@ extern "C" { #endif // _di_fll_print_trim_raw_ #ifndef _di_fll_print_trim_raw_safely_ - f_status_t fll_print_trim_raw_safely(const f_string_t string, const f_array_length_t length, FILE *output) { + f_status_t fll_print_trim_raw_safely(const f_string_t string, const f_array_length_t length, FILE * const output) { flockfile(output); @@ -609,7 +609,7 @@ extern "C" { #endif // _di_fll_print_trim_raw_safely_ #ifndef _di_fll_print_trim_safely_ - f_status_t fll_print_trim_safely(const f_string_t string, const f_array_length_t length, FILE *output) { + f_status_t fll_print_trim_safely(const f_string_t string, const f_array_length_t length, FILE * const output) { flockfile(output); @@ -622,7 +622,7 @@ extern "C" { #endif // _di_fll_print_trim_safely_ #ifndef _di_fll_print_trim_dynamic_ - f_status_t fll_print_trim_dynamic(const f_string_static_t buffer, FILE *output) { + f_status_t fll_print_trim_dynamic(const f_string_static_t buffer, FILE * const output) { flockfile(output); @@ -635,7 +635,7 @@ extern "C" { #endif // _di_fll_print_trim_dynamic_ #ifndef _di_fll_print_trim_dynamic_raw_ - f_status_t fll_print_trim_dynamic_raw(const f_string_static_t buffer, FILE *output) { + f_status_t fll_print_trim_dynamic_raw(const f_string_static_t buffer, FILE * const output) { flockfile(output); @@ -648,7 +648,7 @@ extern "C" { #endif // _di_fll_print_trim_dynamic_raw_ #ifndef _di_fll_print_trim_dynamic_raw_safely_ - f_status_t fll_print_trim_dynamic_raw_safely(const f_string_static_t buffer, FILE *output) { + f_status_t fll_print_trim_dynamic_raw_safely(const f_string_static_t buffer, FILE * const output) { flockfile(output); @@ -661,7 +661,7 @@ extern "C" { #endif // _di_fll_print_trim_dynamic_raw_safely_ #ifndef _di_fll_print_trim_dynamic_safely_ - f_status_t fll_print_trim_dynamic_safely(const f_string_static_t buffer, FILE *output) { + f_status_t fll_print_trim_dynamic_safely(const f_string_static_t buffer, FILE * const output) { flockfile(output); @@ -674,7 +674,7 @@ extern "C" { #endif // _di_fll_print_trim_dynamic_safely_ #ifndef _di_fll_print_trim_dynamic_partial_ - f_status_t fll_print_trim_dynamic_partial(const f_string_static_t buffer, const f_string_range_t range, FILE *output) { + f_status_t fll_print_trim_dynamic_partial(const f_string_static_t buffer, const f_string_range_t range, FILE * const output) { flockfile(output); @@ -687,7 +687,7 @@ extern "C" { #endif // _di_fll_print_trim_dynamic_partial_ #ifndef _di_fll_print_trim_dynamic_partial_raw_ - f_status_t fll_print_trim_dynamic_partial_raw(const f_string_static_t buffer, const f_string_range_t range, FILE *output) { + f_status_t fll_print_trim_dynamic_partial_raw(const f_string_static_t buffer, const f_string_range_t range, FILE * const output) { flockfile(output); @@ -700,7 +700,7 @@ extern "C" { #endif // _di_fll_print_trim_dynamic_partial_raw_ #ifndef _di_fll_print_trim_dynamic_partial_raw_safely_ - f_status_t fll_print_trim_dynamic_partial_raw_safely(const f_string_static_t buffer, const f_string_range_t range, FILE *output) { + f_status_t fll_print_trim_dynamic_partial_raw_safely(const f_string_static_t buffer, const f_string_range_t range, FILE * const output) { flockfile(output); @@ -713,7 +713,7 @@ extern "C" { #endif // _di_fll_print_trim_dynamic_partial_raw_safely_ #ifndef _di_fll_print_trim_dynamic_partial_safely_ - f_status_t fll_print_trim_dynamic_partial_safely(const f_string_static_t buffer, const f_string_range_t range, FILE *output) { + f_status_t fll_print_trim_dynamic_partial_safely(const f_string_static_t buffer, const f_string_range_t range, FILE * const output) { flockfile(output); @@ -726,7 +726,7 @@ extern "C" { #endif // _di_fll_print_trim_dynamic_partial_safely_ #ifndef _di_fll_print_trim_except_ - f_status_t fll_print_trim_except(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except, FILE *output) { + f_status_t fll_print_trim_except(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except, FILE * const output) { flockfile(output); @@ -739,7 +739,7 @@ extern "C" { #endif // _di_fll_print_trim_except_ #ifndef _di_fll_print_trim_except_raw_ - f_status_t fll_print_trim_except_raw(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except, FILE *output) { + f_status_t fll_print_trim_except_raw(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except, FILE * const output) { flockfile(output); @@ -752,7 +752,7 @@ extern "C" { #endif // _di_fll_print_trim_except_raw_ #ifndef _di_fll_print_trim_except_raw_safely_ - f_status_t fll_print_trim_except_raw_safely(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except, FILE *output) { + f_status_t fll_print_trim_except_raw_safely(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except, FILE * const output) { flockfile(output); @@ -765,7 +765,7 @@ extern "C" { #endif // _di_fll_print_trim_except_raw_safely_ #ifndef _di_fll_print_trim_except_safely_ - f_status_t fll_print_trim_except_safely(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except, FILE *output) { + f_status_t fll_print_trim_except_safely(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except, FILE * const output) { flockfile(output); @@ -778,7 +778,7 @@ extern "C" { #endif // _di_fll_print_trim_except_safely_ #ifndef _di_fll_print_trim_except_dynamic_ - f_status_t fll_print_trim_except_dynamic(const f_string_static_t buffer, const f_array_lengths_t except, FILE *output) { + f_status_t fll_print_trim_except_dynamic(const f_string_static_t buffer, const f_array_lengths_t except, FILE * const output) { flockfile(output); @@ -791,7 +791,7 @@ extern "C" { #endif // _di_fll_print_trim_except_dynamic_ #ifndef _di_fll_print_trim_except_dynamic_raw_ - f_status_t fll_print_trim_except_dynamic_raw(const f_string_static_t buffer, const f_array_lengths_t except, FILE *output) { + f_status_t fll_print_trim_except_dynamic_raw(const f_string_static_t buffer, const f_array_lengths_t except, FILE * const output) { flockfile(output); @@ -804,7 +804,7 @@ extern "C" { #endif // _di_fll_print_trim_except_dynamic_raw_ #ifndef _di_fll_print_trim_except_dynamic_raw_safely_ - f_status_t fll_print_trim_except_dynamic_raw_safely(const f_string_static_t buffer, const f_array_lengths_t except, FILE *output) { + f_status_t fll_print_trim_except_dynamic_raw_safely(const f_string_static_t buffer, const f_array_lengths_t except, FILE * const output) { flockfile(output); @@ -817,7 +817,7 @@ extern "C" { #endif // _di_fll_print_trim_except_dynamic_raw_safely_ #ifndef _di_fll_print_trim_except_dynamic_safely_ - f_status_t fll_print_trim_except_dynamic_safely(const f_string_static_t buffer, const f_array_lengths_t except, FILE *output) { + f_status_t fll_print_trim_except_dynamic_safely(const f_string_static_t buffer, const f_array_lengths_t except, FILE * const output) { flockfile(output); @@ -830,7 +830,7 @@ extern "C" { #endif // _di_fll_print_trim_except_dynamic_safely_ #ifndef _di_fll_print_trim_except_in_ - f_status_t fll_print_trim_except_in(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE *output) { + f_status_t fll_print_trim_except_in(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE * const output) { flockfile(output); @@ -843,7 +843,7 @@ extern "C" { #endif // _di_fll_print_trim_except_in_ #ifndef _di_fll_print_trim_except_in_raw_ - f_status_t fll_print_trim_except_in_raw(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE *output) { + f_status_t fll_print_trim_except_in_raw(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE * const output) { flockfile(output); @@ -856,7 +856,7 @@ extern "C" { #endif // _di_fll_print_trim_except_in_raw_ #ifndef _di_fll_print_trim_except_in_raw_safely_ - f_status_t fll_print_trim_except_in_raw_safely(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE *output) { + f_status_t fll_print_trim_except_in_raw_safely(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE * const output) { flockfile(output); @@ -869,7 +869,7 @@ extern "C" { #endif // _di_fll_print_trim_except_in_raw_safely_ #ifndef _di_fll_print_trim_except_in_safely_ - f_status_t fll_print_trim_except_in_safely(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE *output) { + f_status_t fll_print_trim_except_in_safely(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE * const output) { flockfile(output); @@ -882,7 +882,7 @@ extern "C" { #endif // _di_fll_print_trim_except_in_safely_ #ifndef _di_fll_print_trim_except_in_dynamic_ - f_status_t fll_print_trim_except_in_dynamic(const f_string_static_t buffer, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE *output) { + f_status_t fll_print_trim_except_in_dynamic(const f_string_static_t buffer, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE * const output) { flockfile(output); @@ -895,7 +895,7 @@ extern "C" { #endif // _di_fll_print_trim_except_in_dynamic_ #ifndef _di_fll_print_trim_except_in_dynamic_raw_ - f_status_t fll_print_trim_except_in_dynamic_raw(const f_string_static_t buffer, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE *output) { + f_status_t fll_print_trim_except_in_dynamic_raw(const f_string_static_t buffer, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE * const output) { flockfile(output); @@ -908,7 +908,7 @@ extern "C" { #endif // _di_fll_print_trim_except_in_dynamic_raw_ #ifndef _di_fll_print_trim_except_in_dynamic_raw_safely_ - f_status_t fll_print_trim_except_in_dynamic_raw_safely(const f_string_static_t buffer, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE *output) { + f_status_t fll_print_trim_except_in_dynamic_raw_safely(const f_string_static_t buffer, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE * const output) { flockfile(output); @@ -921,7 +921,7 @@ extern "C" { #endif // _di_fll_print_trim_except_in_dynamic_raw_safely_ #ifndef _di_fll_print_trim_except_in_dynamic_safely_ - f_status_t fll_print_trim_except_in_dynamic_safely(const f_string_static_t buffer, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE *output) { + f_status_t fll_print_trim_except_in_dynamic_safely(const f_string_static_t buffer, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE * const output) { flockfile(output); @@ -934,7 +934,7 @@ extern "C" { #endif // _di_fll_print_trim_except_in_dynamic_safely_ #ifndef _di_fll_print_trim_except_in_dynamic_partial_ - f_status_t fll_print_trim_except_in_dynamic_partial(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE *output) { + f_status_t fll_print_trim_except_in_dynamic_partial(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE * const output) { flockfile(output); @@ -947,7 +947,7 @@ extern "C" { #endif // _di_fll_print_trim_except_in_dynamic_partial_ #ifndef _di_fll_print_trim_except_in_dynamic_partial_raw_ - f_status_t fll_print_trim_except_in_dynamic_partial_raw(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE *output) { + f_status_t fll_print_trim_except_in_dynamic_partial_raw(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE * const output) { flockfile(output); @@ -960,7 +960,7 @@ extern "C" { #endif // _di_fll_print_trim_except_in_dynamic_partial_raw_ #ifndef _di_fll_print_trim_except_in_dynamic_partial_raw_safely_ - f_status_t fll_print_trim_except_in_dynamic_partial_raw_safely(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE *output) { + f_status_t fll_print_trim_except_in_dynamic_partial_raw_safely(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE * const output) { flockfile(output); @@ -973,7 +973,7 @@ extern "C" { #endif // _di_fll_print_trim_except_in_dynamic_partial_raw_safely_ #ifndef _di_fll_print_trim_except_in_dynamic_partial_safely_ - f_status_t fll_print_trim_except_in_dynamic_partial_safely(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE *output) { + f_status_t fll_print_trim_except_in_dynamic_partial_safely(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE * const output) { flockfile(output); @@ -986,7 +986,7 @@ extern "C" { #endif // _di_fll_print_trim_except_in_dynamic_partial_safely_ #ifndef _di_fll_print_trim_except_dynamic_partial_ - f_status_t fll_print_trim_except_dynamic_partial(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except, FILE *output) { + f_status_t fll_print_trim_except_dynamic_partial(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except, FILE * const output) { flockfile(output); @@ -999,7 +999,7 @@ extern "C" { #endif // _di_fll_print_trim_except_dynamic_partial_ #ifndef _di_fll_print_trim_except_dynamic_partial_raw_ - f_status_t fll_print_trim_except_dynamic_partial_raw(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except, FILE *output) { + f_status_t fll_print_trim_except_dynamic_partial_raw(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except, FILE * const output) { flockfile(output); @@ -1012,7 +1012,7 @@ extern "C" { #endif // _di_fll_print_trim_except_dynamic_partial_raw_ #ifndef _di_fll_print_trim_except_dynamic_partial_raw_safely_ - f_status_t fll_print_trim_except_dynamic_partial_raw_safely(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except, FILE *output) { + f_status_t fll_print_trim_except_dynamic_partial_raw_safely(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except, FILE * const output) { flockfile(output); @@ -1025,7 +1025,7 @@ extern "C" { #endif // _di_fll_print_trim_except_dynamic_partial_raw_safely_ #ifndef _di_fll_print_trim_except_dynamic_partial_safely_ - f_status_t fll_print_trim_except_dynamic_partial_safely(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except, FILE *output) { + f_status_t fll_print_trim_except_dynamic_partial_safely(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except, FILE * const output) { flockfile(output); diff --git a/level_2/fll_print/c/print.h b/level_2/fll_print/c/print.h index 3f71002..45c662a 100644 --- a/level_2/fll_print/c/print.h +++ b/level_2/fll_print/c/print.h @@ -50,7 +50,7 @@ extern "C" { * @see f_print() */ #ifndef _di_fll_print_ - extern f_status_t fll_print(const f_string_t string, const f_array_length_t length, FILE *output); + extern f_status_t fll_print(const f_string_t string, const f_array_length_t length, FILE * const output); #endif // _di_fll_print_ /** @@ -72,7 +72,7 @@ extern "C" { * @see f_print_character() */ #ifndef _di_fll_print_character_ - extern f_status_t fll_print_character(const char character, FILE *output); + extern f_status_t fll_print_character(const char character, FILE * const output); #endif // _di_fll_print_character_ /** @@ -94,7 +94,7 @@ extern "C" { * @see f_print_character_safely() */ #ifndef _di_fll_print_character_safely_ - extern f_status_t fll_print_character_safely(const char character, FILE *output); + extern f_status_t fll_print_character_safely(const char character, FILE * const output); #endif // _di_fll_print_character_safely_ /** @@ -116,7 +116,7 @@ extern "C" { * @see f_print_dynamic() */ #ifndef _di_fll_print_dynamic_ - extern f_status_t fll_print_dynamic(const f_string_static_t buffer, FILE *output); + extern f_status_t fll_print_dynamic(const f_string_static_t buffer, FILE * const output); #endif // _di_fll_print_dynamic_ /** @@ -140,7 +140,7 @@ extern "C" { * @see f_print_dynamic_partial() */ #ifndef _di_fll_print_dynamic_partial_ - extern f_status_t fll_print_dynamic_partial(const f_string_static_t buffer, const f_string_range_t range, FILE *output); + extern f_status_t fll_print_dynamic_partial(const f_string_static_t buffer, const f_string_range_t range, FILE * const output); #endif // _di_fll_print_dynamic_partial_ /** @@ -164,7 +164,7 @@ extern "C" { * @see f_print_dynamic_partial_raw() */ #ifndef _di_fll_print_dynamic_partial_raw_ - extern f_status_t fll_print_dynamic_partial_raw(const f_string_static_t buffer, const f_string_range_t range, FILE *output); + extern f_status_t fll_print_dynamic_partial_raw(const f_string_static_t buffer, const f_string_range_t range, FILE * const output); #endif // _di_fll_print_dynamic_partial_raw_ /** @@ -188,7 +188,7 @@ extern "C" { * @see f_print_dynamic_partial_raw_safely() */ #ifndef _di_fll_print_dynamic_partial_raw_safely_ - extern f_status_t fll_print_dynamic_partial_raw_safely(const f_string_static_t buffer, const f_string_range_t range, FILE *output); + extern f_status_t fll_print_dynamic_partial_raw_safely(const f_string_static_t buffer, const f_string_range_t range, FILE * const output); #endif // _di_fll_print_dynamic_partial_raw_safely_ /** @@ -212,7 +212,7 @@ extern "C" { * @see f_print_dynamic_partial_safely() */ #ifndef _di_fll_print_dynamic_partial_safely_ - extern f_status_t fll_print_dynamic_partial_safely(const f_string_static_t buffer, const f_string_range_t range, FILE *output); + extern f_status_t fll_print_dynamic_partial_safely(const f_string_static_t buffer, const f_string_range_t range, FILE * const output); #endif // _di_fll_print_dynamic_partial_safely_ /** @@ -234,7 +234,7 @@ extern "C" { * @see f_print_dynamic_raw() */ #ifndef _di_fll_print_dynamic_raw_ - extern f_status_t fll_print_dynamic_raw(const f_string_static_t buffer, FILE *output); + extern f_status_t fll_print_dynamic_raw(const f_string_static_t buffer, FILE * const output); #endif // _di_fll_print_dynamic_raw_ /** @@ -256,7 +256,7 @@ extern "C" { * @see f_print_dynamic_raw_safely() */ #ifndef _di_fll_print_dynamic_raw_safely_ - extern f_status_t fll_print_dynamic_raw_safely(const f_string_static_t buffer, FILE *output); + extern f_status_t fll_print_dynamic_raw_safely(const f_string_static_t buffer, FILE * const output); #endif // _di_fll_print_dynamic_raw_safely_ /** @@ -278,7 +278,7 @@ extern "C" { * @see f_print_dynamic_safely() */ #ifndef _di_fll_print_dynamic_safely_ - extern f_status_t fll_print_dynamic_safely(const f_string_static_t buffer, FILE *output); + extern f_status_t fll_print_dynamic_safely(const f_string_static_t buffer, FILE * const output); #endif // _di_fll_print_dynamic_safely_ /** @@ -307,7 +307,7 @@ extern "C" { * @see f_print_except() */ #ifndef _di_fll_print_except_ - extern f_status_t fll_print_except(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except, FILE *output); + extern f_status_t fll_print_except(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except, FILE * const output); #endif // _di_fll_print_except_ /** @@ -332,7 +332,7 @@ extern "C" { * @see f_print_except_dynamic() */ #ifndef _di_fll_print_except_dynamic_ - extern f_status_t fll_print_except_dynamic(const f_string_static_t buffer, const f_array_lengths_t except, FILE *output); + extern f_status_t fll_print_except_dynamic(const f_string_static_t buffer, const f_array_lengths_t except, FILE * const output); #endif // _di_fll_print_except_dynamic_ /** @@ -359,7 +359,7 @@ extern "C" { * @see f_print_except_dynamic_partial() */ #ifndef _di_fll_print_except_dynamic_partial_ - extern f_status_t fll_print_except_dynamic_partial(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except, FILE *output); + extern f_status_t fll_print_except_dynamic_partial(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except, FILE * const output); #endif // _di_fll_print_except_dynamic_partial_ /** @@ -386,7 +386,7 @@ extern "C" { * @see f_print_except_dynamic_partial_raw() */ #ifndef _di_fll_print_except_dynamic_partial_raw_ - extern f_status_t fll_print_except_dynamic_partial_raw(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except, FILE *output); + extern f_status_t fll_print_except_dynamic_partial_raw(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except, FILE * const output); #endif // _di_fll_print_except_dynamic_partial_raw_ /** @@ -413,7 +413,7 @@ extern "C" { * @see f_print_except_dynamic_partial_raw_safely() */ #ifndef _di_fll_print_except_dynamic_partial_raw_safely_ - extern f_status_t fll_print_except_dynamic_partial_raw_safely(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except, FILE *output); + extern f_status_t fll_print_except_dynamic_partial_raw_safely(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except, FILE * const output); #endif // _di_fll_print_except_dynamic_partial_raw_safely_ /** @@ -440,7 +440,7 @@ extern "C" { * @see f_print_except_dynamic_partial_safely() */ #ifndef _di_fll_print_except_dynamic_partial_safely_ - extern f_status_t fll_print_except_dynamic_partial_safely(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except, FILE *output); + extern f_status_t fll_print_except_dynamic_partial_safely(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except, FILE * const output); #endif // _di_fll_print_except_dynamic_partial_safely_ /** @@ -465,7 +465,7 @@ extern "C" { * @see f_print_except_dynamic_raw() */ #ifndef _di_fll_print_except_dynamic_raw_ - extern f_status_t fll_print_except_dynamic_raw(const f_string_static_t buffer, const f_array_lengths_t except, FILE *output); + extern f_status_t fll_print_except_dynamic_raw(const f_string_static_t buffer, const f_array_lengths_t except, FILE * const output); #endif // _di_fll_print_except_dynamic_raw_ /** @@ -490,7 +490,7 @@ extern "C" { * @see f_print_except_dynamic_raw_safely() */ #ifndef _di_fll_print_except_dynamic_raw_safely_ - extern f_status_t fll_print_except_dynamic_raw_safely(const f_string_static_t buffer, const f_array_lengths_t except, FILE *output); + extern f_status_t fll_print_except_dynamic_raw_safely(const f_string_static_t buffer, const f_array_lengths_t except, FILE * const output); #endif // _di_fll_print_except_dynamic_raw_safely_ /** @@ -515,7 +515,7 @@ extern "C" { * @see f_print_except_dynamic_safely() */ #ifndef _di_fll_print_except_dynamic_safely_ - extern f_status_t fll_print_except_dynamic_safely(const f_string_static_t buffer, const f_array_lengths_t except, FILE *output); + extern f_status_t fll_print_except_dynamic_safely(const f_string_static_t buffer, const f_array_lengths_t except, FILE * const output); #endif // _di_fll_print_except_dynamic_safely_ /** @@ -547,7 +547,7 @@ extern "C" { * @see f_print_except_in() */ #ifndef _di_fll_print_except_in_ - extern f_status_t fll_print_except_in(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE *output); + extern f_status_t fll_print_except_in(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE * const output); #endif // _di_fll_print_except_in_ /** @@ -579,7 +579,7 @@ extern "C" { * @see f_print_except_in_raw() */ #ifndef _di_fll_print_except_in_raw_ - extern f_status_t fll_print_except_in_raw(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE *output); + extern f_status_t fll_print_except_in_raw(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE * const output); #endif // _di_fll_print_except_in_raw_ /** @@ -611,7 +611,7 @@ extern "C" { * @see f_print_except_in_raw_safely() */ #ifndef _di_fll_print_except_in_raw_safely_ - extern f_status_t fll_print_except_in_raw_safely(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE *output); + extern f_status_t fll_print_except_in_raw_safely(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE * const output); #endif // _di_fll_print_except_in_raw_safely_ /** @@ -643,7 +643,7 @@ extern "C" { * @see f_print_except_in_safely() */ #ifndef _di_fll_print_except_in_safely_ - extern f_status_t fll_print_except_in_safely(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE *output); + extern f_status_t fll_print_except_in_safely(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE * const output); #endif // _di_fll_print_except_in_safely_ /** @@ -671,7 +671,7 @@ extern "C" { * @see f_print_except_in_dynamic() */ #ifndef _di_fll_print_except_in_dynamic_ - extern f_status_t fll_print_except_in_dynamic(const f_string_static_t buffer, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE *output); + extern f_status_t fll_print_except_in_dynamic(const f_string_static_t buffer, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE * const output); #endif // _di_fll_print_except_in_dynamic_ /** @@ -701,7 +701,7 @@ extern "C" { * @see f_print_except_in_dynamic_partial() */ #ifndef _di_fll_print_except_in_dynamic_partial_ - extern f_status_t fll_print_except_in_dynamic_partial(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE *output); + extern f_status_t fll_print_except_in_dynamic_partial(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE * const output); #endif // _di_fll_print_except_in_dynamic_partial_ /** @@ -731,7 +731,7 @@ extern "C" { * @see f_print_except_in_dynamic_partial_raw() */ #ifndef _di_fll_print_except_in_dynamic_partial_raw_ - extern f_status_t fll_print_except_in_dynamic_partial_raw(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE *output); + extern f_status_t fll_print_except_in_dynamic_partial_raw(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE * const output); #endif // _di_fll_print_except_in_dynamic_partial_raw_ /** @@ -761,7 +761,7 @@ extern "C" { * @see f_print_except_in_dynamic_partial_raw_safely() */ #ifndef _di_fll_print_except_in_dynamic_partial_raw_safely_ - extern f_status_t fll_print_except_in_dynamic_partial_raw_safely(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE *output); + extern f_status_t fll_print_except_in_dynamic_partial_raw_safely(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE * const output); #endif // _di_fll_print_except_in_dynamic_partial_raw_safely_ /** @@ -791,7 +791,7 @@ extern "C" { * @see f_print_except_in_dynamic_partial_safely() */ #ifndef _di_fll_print_except_in_dynamic_partial_safely_ - extern f_status_t fll_print_except_in_dynamic_partial_safely(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE *output); + extern f_status_t fll_print_except_in_dynamic_partial_safely(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE * const output); #endif // _di_fll_print_except_in_dynamic_partial_safely_ /** @@ -819,7 +819,7 @@ extern "C" { * @see f_print_except_in_dynamic_raw() */ #ifndef _di_fll_print_except_in_dynamic_raw_ - extern f_status_t fll_print_except_in_dynamic_raw(const f_string_static_t buffer, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE *output); + extern f_status_t fll_print_except_in_dynamic_raw(const f_string_static_t buffer, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE * const output); #endif // _di_fll_print_except_in_dynamic_raw_ /** @@ -847,7 +847,7 @@ extern "C" { * @see f_print_except_in_dynamic_raw_safely() */ #ifndef _di_fll_print_except_in_dynamic_raw_safely_ - extern f_status_t fll_print_except_in_dynamic_raw_safely(const f_string_static_t buffer, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE *output); + extern f_status_t fll_print_except_in_dynamic_raw_safely(const f_string_static_t buffer, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE * const output); #endif // _di_fll_print_except_in_dynamic_raw_safely_ /** @@ -875,7 +875,7 @@ extern "C" { * @see f_print_except_in_dynamic_safely() */ #ifndef _di_fll_print_except_in_dynamic_safely_ - extern f_status_t fll_print_except_in_dynamic_safely(const f_string_static_t buffer, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE *output); + extern f_status_t fll_print_except_in_dynamic_safely(const f_string_static_t buffer, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE * const output); #endif // _di_fll_print_except_in_dynamic_safely_ /** @@ -904,7 +904,7 @@ extern "C" { * @see f_print_except_raw() */ #ifndef _di_fll_print_except_raw_ - extern f_status_t fll_print_except_raw(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except, FILE *output); + extern f_status_t fll_print_except_raw(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except, FILE * const output); #endif // _di_fll_print_except_raw_ /** @@ -933,7 +933,7 @@ extern "C" { * @see f_print_except_raw_safely() */ #ifndef _di_fll_print_except_raw_safely_ - extern f_status_t fll_print_except_raw_safely(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except, FILE *output); + extern f_status_t fll_print_except_raw_safely(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except, FILE * const output); #endif // _di_fll_print_except_raw_safely_ /** @@ -962,7 +962,7 @@ extern "C" { * @see f_print_except_safely() */ #ifndef _di_fll_print_except_safely_ - extern f_status_t fll_print_except_safely(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except, FILE *output); + extern f_status_t fll_print_except_safely(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except, FILE * const output); #endif // _di_fll_print_except_safely_ /** @@ -989,7 +989,7 @@ extern "C" { * @see fl_print_format() */ #ifndef _di_fll_print_format_ - extern f_status_t fll_print_format(const f_string_t string, FILE *output, ...); + extern f_status_t fll_print_format(const f_string_t string, FILE * const output, ...); #endif // _di_fll_print_format_ /** @@ -1013,7 +1013,7 @@ extern "C" { * @see fl_print_format_convert() */ #ifndef _di_fll_print_format_convert_ - extern f_string_t fll_print_format_convert(const f_string_t current, FILE *output, va_list *ap, f_status_t *status); + extern f_string_t fll_print_format_convert(const f_string_t current, FILE * const output, va_list *ap, f_status_t *status); #endif // _di_fll_print_format_convert_ /** @@ -1037,7 +1037,7 @@ extern "C" { * @see f_print_raw() */ #ifndef _di_fll_print_raw_ - extern f_status_t fll_print_raw(const f_string_t string, const f_array_length_t length, FILE *output); + extern f_status_t fll_print_raw(const f_string_t string, const f_array_length_t length, FILE * const output); #endif // _di_fll_print_raw_ /** @@ -1061,7 +1061,7 @@ extern "C" { * @see f_print_raw_safely() */ #ifndef _di_fll_print_raw_safely_ - extern f_status_t fll_print_raw_safely(const f_string_t string, const f_array_length_t length, FILE *output); + extern f_status_t fll_print_raw_safely(const f_string_t string, const f_array_length_t length, FILE * const output); #endif // _di_fll_print_raw_safely_ /** @@ -1083,7 +1083,7 @@ extern "C" { * @see f_print_raw_terminated() */ #ifndef _di_fll_print_raw_terminated_ - extern f_status_t fll_print_raw_terminated(const f_string_t string, FILE *output); + extern f_status_t fll_print_raw_terminated(const f_string_t string, FILE * const output); #endif // _di_fll_print_raw_terminated_ /** @@ -1107,7 +1107,7 @@ extern "C" { * @see f_print_safely() */ #ifndef _di_fll_print_safely_ - extern f_status_t fll_print_safely(const f_string_t string, const f_array_length_t length, FILE *output); + extern f_status_t fll_print_safely(const f_string_t string, const f_array_length_t length, FILE * const output); #endif // _di_fll_print_safely_ /** @@ -1131,7 +1131,7 @@ extern "C" { * @see f_print_safely_terminated() */ #ifndef _di_fll_print_safely_terminated_ - extern f_status_t fll_print_safely_terminated(const f_string_t string, FILE *output); + extern f_status_t fll_print_safely_terminated(const f_string_t string, FILE * const output); #endif // _di_fll_print_safely_terminated_ /** @@ -1156,7 +1156,7 @@ extern "C" { * @see fl_print_string_va() */ #ifndef _di_fll_print_string_va_ - extern f_status_t fll_print_string_va(const f_string_t string, FILE *output, va_list *ap); + extern f_status_t fll_print_string_va(const f_string_t string, FILE * const output, va_list *ap); #endif // _di_fll_print_string_va_ /** @@ -1178,7 +1178,7 @@ extern "C" { * @see f_print_terminated() */ #ifndef _di_fll_print_terminated_ - extern f_status_t fll_print_terminated(const f_string_t string, FILE *output); + extern f_status_t fll_print_terminated(const f_string_t string, FILE * const output); #endif // _di_fll_print_terminated_ /** @@ -1202,7 +1202,7 @@ extern "C" { * @see f_print_except_dynamic_partial() */ #ifndef _di_fll_print_trim_ - extern f_status_t fll_print_trim(const f_string_t string, const f_array_length_t length, FILE *output); + extern f_status_t fll_print_trim(const f_string_t string, const f_array_length_t length, FILE * const output); #endif // _di_fll_print_trim_ /** @@ -1226,7 +1226,7 @@ extern "C" { * @see fl_print_trim_raw() */ #ifndef _di_fll_print_trim_raw_ - extern f_status_t fll_print_trim_raw(const f_string_t string, const f_array_length_t length, FILE *output); + extern f_status_t fll_print_trim_raw(const f_string_t string, const f_array_length_t length, FILE * const output); #endif // _di_fll_print_trim_raw_ /** @@ -1250,7 +1250,7 @@ extern "C" { * @see fl_print_trim_raw_safely() */ #ifndef _di_fll_print_trim_raw_safely_ - extern f_status_t fll_print_trim_raw_safely(const f_string_t string, const f_array_length_t length, FILE *output); + extern f_status_t fll_print_trim_raw_safely(const f_string_t string, const f_array_length_t length, FILE * const output); #endif // _di_fll_print_trim_raw_safely_ /** @@ -1274,7 +1274,7 @@ extern "C" { * @see fl_print_trim_safely() */ #ifndef _di_fll_print_trim_safely_ - extern f_status_t fll_print_trim_safely(const f_string_t string, const f_array_length_t length, FILE *output); + extern f_status_t fll_print_trim_safely(const f_string_t string, const f_array_length_t length, FILE * const output); #endif // _di_fll_print_trim_safely_ /** @@ -1296,7 +1296,7 @@ extern "C" { * @see fl_print_trim_dynamic() */ #ifndef _di_fll_print_trim_dynamic_ - extern f_status_t fll_print_trim_dynamic(const f_string_static_t buffer, FILE *output); + extern f_status_t fll_print_trim_dynamic(const f_string_static_t buffer, FILE * const output); #endif // _di_fll_print_trim_dynamic_ /** @@ -1318,7 +1318,7 @@ extern "C" { * @see fl_print_trim_dynamic_raw() */ #ifndef _di_fll_print_trim_dynamic_raw_ - extern f_status_t fll_print_trim_dynamic_raw(const f_string_static_t buffer, FILE *output); + extern f_status_t fll_print_trim_dynamic_raw(const f_string_static_t buffer, FILE * const output); #endif // _di_fll_print_trim_dynamic_raw_ /** @@ -1340,7 +1340,7 @@ extern "C" { * @see fl_print_trim_dynamic_raw_safely() */ #ifndef _di_fll_print_trim_dynamic_raw_safely_ - extern f_status_t fll_print_trim_dynamic_raw_safely(const f_string_static_t buffer, FILE *output); + extern f_status_t fll_print_trim_dynamic_raw_safely(const f_string_static_t buffer, FILE * const output); #endif // _di_fll_print_trim_dynamic_raw_safely_ /** @@ -1362,7 +1362,7 @@ extern "C" { * @see fl_print_trim_dynamic_safely() */ #ifndef _di_fll_print_trim_dynamic_safely_ - extern f_status_t fll_print_trim_dynamic_safely(const f_string_static_t buffer, FILE *output); + extern f_status_t fll_print_trim_dynamic_safely(const f_string_static_t buffer, FILE * const output); #endif // _di_fll_print_trim_dynamic_safely_ /** @@ -1386,7 +1386,7 @@ extern "C" { * @see fl_print_trim_dynamic_partial() */ #ifndef _di_fll_print_trim_dynamic_partial_ - extern f_status_t fll_print_trim_dynamic_partial(const f_string_static_t buffer, const f_string_range_t range, FILE *output); + extern f_status_t fll_print_trim_dynamic_partial(const f_string_static_t buffer, const f_string_range_t range, FILE * const output); #endif // _di_fll_print_trim_dynamic_partial_ /** @@ -1410,7 +1410,7 @@ extern "C" { * @see fl_print_trim_dynamic_partial_raw() */ #ifndef _di_fll_print_trim_dynamic_partial_raw_ - extern f_status_t fll_print_trim_dynamic_partial_raw(const f_string_static_t buffer, const f_string_range_t range, FILE *output); + extern f_status_t fll_print_trim_dynamic_partial_raw(const f_string_static_t buffer, const f_string_range_t range, FILE * const output); #endif // _di_fll_print_trim_dynamic_partial_raw_ /** @@ -1434,7 +1434,7 @@ extern "C" { * @see f_print_except_dynamic_partial() */ #ifndef _di_fll_print_trim_dynamic_partial_raw_safely_ - extern f_status_t fll_print_trim_dynamic_partial_raw_safely(const f_string_static_t buffer, const f_string_range_t range, FILE *output); + extern f_status_t fll_print_trim_dynamic_partial_raw_safely(const f_string_static_t buffer, const f_string_range_t range, FILE * const output); #endif // _di_fll_print_trim_dynamic_partial_raw_safely_ /** @@ -1458,7 +1458,7 @@ extern "C" { * @see f_print_except_dynamic_partial() */ #ifndef _di_fll_print_trim_dynamic_partial_safely_ - extern f_status_t fll_print_trim_dynamic_partial_safely(const f_string_static_t buffer, const f_string_range_t range, FILE *output); + extern f_status_t fll_print_trim_dynamic_partial_safely(const f_string_static_t buffer, const f_string_range_t range, FILE * const output); #endif // _di_fll_print_trim_dynamic_partial_safely_ /** @@ -1487,7 +1487,7 @@ extern "C" { * @see fl_print_trim_except() */ #ifndef _di_fll_print_trim_except_ - extern f_status_t fll_print_trim_except(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except, FILE *output); + extern f_status_t fll_print_trim_except(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except, FILE * const output); #endif // _di_fll_print_trim_except_ /** @@ -1516,7 +1516,7 @@ extern "C" { * @see fl_print_trim_except_raw() */ #ifndef _di_fll_print_trim_except_raw_ - extern f_status_t fll_print_trim_except_raw(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except, FILE *output); + extern f_status_t fll_print_trim_except_raw(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except, FILE * const output); #endif // _di_fll_print_trim_except_raw_ /** @@ -1545,7 +1545,7 @@ extern "C" { * @see fl_print_trim_except_raw_safely() */ #ifndef _di_fll_print_trim_except_raw_safely_ - extern f_status_t fll_print_trim_except_raw_safely(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except, FILE *output); + extern f_status_t fll_print_trim_except_raw_safely(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except, FILE * const output); #endif // _di_fll_print_trim_except_raw_safely_ /** @@ -1574,7 +1574,7 @@ extern "C" { * @see fl_print_trim_except_safely() */ #ifndef _di_fll_print_trim_except_safely_ - extern f_status_t fll_print_trim_except_safely(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except, FILE *output); + extern f_status_t fll_print_trim_except_safely(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except, FILE * const output); #endif // _di_fll_print_trim_except_safely_ /** @@ -1599,7 +1599,7 @@ extern "C" { * @see fl_print_trim_except_dynamic() */ #ifndef _di_fll_print_trim_except_dynamic_ - extern f_status_t fll_print_trim_except_dynamic(const f_string_static_t buffer, const f_array_lengths_t except, FILE *output); + extern f_status_t fll_print_trim_except_dynamic(const f_string_static_t buffer, const f_array_lengths_t except, FILE * const output); #endif // _di_fll_print_trim_except_dynamic_ /** @@ -1624,7 +1624,7 @@ extern "C" { * @see fl_print_trim_except_dynamic_raw() */ #ifndef _di_fll_print_trim_except_dynamic_raw_ - extern f_status_t fll_print_trim_except_dynamic_raw(const f_string_static_t buffer, const f_array_lengths_t except, FILE *output); + extern f_status_t fll_print_trim_except_dynamic_raw(const f_string_static_t buffer, const f_array_lengths_t except, FILE * const output); #endif // _di_fll_print_trim_except_dynamic_raw_ /** @@ -1649,7 +1649,7 @@ extern "C" { * @see fl_print_trim_except_dynamic_raw_safely() */ #ifndef _di_fll_print_trim_except_dynamic_raw_safely_ - extern f_status_t fll_print_trim_except_dynamic_raw_safely(const f_string_static_t buffer, const f_array_lengths_t except, FILE *output); + extern f_status_t fll_print_trim_except_dynamic_raw_safely(const f_string_static_t buffer, const f_array_lengths_t except, FILE * const output); #endif // _di_fll_print_trim_except_dynamic_raw_safely_ /** @@ -1674,7 +1674,7 @@ extern "C" { * @see fl_print_trim_except_dynamic_safely() */ #ifndef _di_fll_print_trim_except_dynamic_safely_ - extern f_status_t fll_print_trim_except_dynamic_safely(const f_string_static_t buffer, const f_array_lengths_t except, FILE *output); + extern f_status_t fll_print_trim_except_dynamic_safely(const f_string_static_t buffer, const f_array_lengths_t except, FILE * const output); #endif // _di_fll_print_trim_except_dynamic_safely_ /** @@ -1706,7 +1706,7 @@ extern "C" { * @see fl_print_trim_except_in() */ #ifndef _di_fll_print_trim_except_in_ - extern f_status_t fll_print_trim_except_in(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE *output); + extern f_status_t fll_print_trim_except_in(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE * const output); #endif // _di_fll_print_trim_except_in_ /** @@ -1738,7 +1738,7 @@ extern "C" { * @see fl_print_trim_except_in_raw() */ #ifndef _di_fll_print_trim_except_in_raw_ - extern f_status_t fll_print_trim_except_in_raw(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE *output); + extern f_status_t fll_print_trim_except_in_raw(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE * const output); #endif // _di_fll_print_trim_except_in_raw_ /** @@ -1770,7 +1770,7 @@ extern "C" { * @see fl_print_trim_except_in_raw_safely() */ #ifndef _di_fll_print_trim_except_in_raw_safely_ - extern f_status_t fll_print_trim_except_in_raw_safely(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE *output); + extern f_status_t fll_print_trim_except_in_raw_safely(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE * const output); #endif // _di_fll_print_trim_except_in_raw_safely_ /** @@ -1802,7 +1802,7 @@ extern "C" { * @see fl_print_trim_except_in_safely() */ #ifndef _di_fll_print_trim_except_in_safely_ - extern f_status_t fll_print_trim_except_in_safely(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE *output); + extern f_status_t fll_print_trim_except_in_safely(const f_string_t string, const f_array_length_t offset, const f_array_length_t length, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE * const output); #endif // _di_fll_print_trim_except_in_safely_ /** @@ -1830,7 +1830,7 @@ extern "C" { * @see fl_print_trim_except_in_dynamic() */ #ifndef _di_fll_print_trim_except_in_dynamic_ - extern f_status_t fll_print_trim_except_in_dynamic(const f_string_static_t buffer, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE *output); + extern f_status_t fll_print_trim_except_in_dynamic(const f_string_static_t buffer, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE * const output); #endif // _di_fll_print_trim_except_in_dynamic_ /** @@ -1858,7 +1858,7 @@ extern "C" { * @see fl_print_trim_except_in_dynamic_raw() */ #ifndef _di_fll_print_trim_except_in_dynamic_raw_ - extern f_status_t fll_print_trim_except_in_dynamic_raw(const f_string_static_t buffer, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE *output); + extern f_status_t fll_print_trim_except_in_dynamic_raw(const f_string_static_t buffer, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE * const output); #endif // _di_fll_print_trim_except_in_dynamic_raw_ /** @@ -1886,7 +1886,7 @@ extern "C" { * @see fl_print_trim_except_in_dynamic_raw_safely() */ #ifndef _di_fll_print_trim_except_in_dynamic_raw_safely_ - extern f_status_t fll_print_trim_except_in_dynamic_raw_safely(const f_string_static_t buffer, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE *output); + extern f_status_t fll_print_trim_except_in_dynamic_raw_safely(const f_string_static_t buffer, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE * const output); #endif // _di_fll_print_trim_except_in_dynamic_raw_safely_ /** @@ -1914,7 +1914,7 @@ extern "C" { * @see fl_print_trim_except_in_dynamic_safely() */ #ifndef _di_fll_print_trim_except_in_dynamic_safely_ - extern f_status_t fll_print_trim_except_in_dynamic_safely(const f_string_static_t buffer, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE *output); + extern f_status_t fll_print_trim_except_in_dynamic_safely(const f_string_static_t buffer, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE * const output); #endif // _di_fll_print_trim_except_in_dynamic_safely_ /** @@ -1944,7 +1944,7 @@ extern "C" { * @see fl_print_trim_except_in_dynamic_partial() */ #ifndef _di_fll_print_trim_except_in_dynamic_partial_ - extern f_status_t fll_print_trim_except_in_dynamic_partial(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE *output); + extern f_status_t fll_print_trim_except_in_dynamic_partial(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE * const output); #endif // _di_fll_print_trim_except_in_dynamic_partial_ /** @@ -1974,7 +1974,7 @@ extern "C" { * @see f_print_except_dynamic_partial() */ #ifndef _di_fll_print_trim_except_in_dynamic_partial_raw_ - extern f_status_t fll_print_trim_except_in_dynamic_partial_raw(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE *output); + extern f_status_t fll_print_trim_except_in_dynamic_partial_raw(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE * const output); #endif // _di_fll_print_trim_except_in_dynamic_partial_raw_ /** @@ -2004,7 +2004,7 @@ extern "C" { * @see f_print_except_dynamic_partial() */ #ifndef _di_fll_print_trim_except_in_dynamic_partial_raw_safely_ - extern f_status_t fll_print_trim_except_in_dynamic_partial_raw_safely(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE *output); + extern f_status_t fll_print_trim_except_in_dynamic_partial_raw_safely(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE * const output); #endif // _di_fll_print_trim_except_in_dynamic_partial_raw_safely_ /** @@ -2034,7 +2034,7 @@ extern "C" { * @see f_print_except_dynamic_partial() */ #ifndef _di_fll_print_trim_except_in_dynamic_partial_safely_ - extern f_status_t fll_print_trim_except_in_dynamic_partial_safely(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE *output); + extern f_status_t fll_print_trim_except_in_dynamic_partial_safely(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except_at, const f_string_ranges_t except_in, FILE * const output); #endif // _di_fll_print_trim_except_in_dynamic_partial_safely_ /** @@ -2061,7 +2061,7 @@ extern "C" { * @see fl_print_trim_except_dynamic_partial() */ #ifndef _di_fll_print_trim_except_dynamic_partial_ - extern f_status_t fll_print_trim_except_dynamic_partial(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except, FILE *output); + extern f_status_t fll_print_trim_except_dynamic_partial(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except, FILE * const output); #endif // _di_fll_print_trim_except_dynamic_partial_ /** @@ -2088,7 +2088,7 @@ extern "C" { * @see fl_print_trim_except_dynamic_partial_raw() */ #ifndef _di_fll_print_trim_except_dynamic_partial_raw_ - extern f_status_t fll_print_trim_except_dynamic_partial_raw(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except, FILE *output); + extern f_status_t fll_print_trim_except_dynamic_partial_raw(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except, FILE * const output); #endif // _di_fll_print_trim_except_dynamic_partial_raw_ /** @@ -2115,7 +2115,7 @@ extern "C" { * @see fl_print_trim_except_dynamic_partial_raw_safely() */ #ifndef _di_fll_print_trim_except_dynamic_partial_raw_safely_ - extern f_status_t fll_print_trim_except_dynamic_partial_raw_safely(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except, FILE *output); + extern f_status_t fll_print_trim_except_dynamic_partial_raw_safely(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except, FILE * const output); #endif // _di_fll_print_trim_except_dynamic_partial_raw_safely_ /** @@ -2142,7 +2142,7 @@ extern "C" { * @see fl_print_trim_except_dynamic_partial_safely() */ #ifndef _di_fll_print_trim_except_dynamic_partial_safely_ - extern f_status_t fll_print_trim_except_dynamic_partial_safely(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except, FILE *output); + extern f_status_t fll_print_trim_except_dynamic_partial_safely(const f_string_static_t buffer, const f_string_range_t range, const f_array_lengths_t except, FILE * const output); #endif // _di_fll_print_trim_except_dynamic_partial_safely_ #ifdef __cplusplus diff --git a/level_2/fll_program/c/program.c b/level_2/fll_program/c/program.c index acf7832..9fcd6e8 100644 --- a/level_2/fll_program/c/program.c +++ b/level_2/fll_program/c/program.c @@ -73,7 +73,7 @@ extern "C" { #endif // _di_fll_program_print_version_ #ifndef _di_fll_program_parameter_process_ - f_status_t fll_program_parameter_process(const f_console_arguments_t arguments, f_console_parameters_t * const parameters, const f_console_parameter_ids_t choices, const bool right, f_color_context_t *context) { + f_status_t fll_program_parameter_process(const f_console_arguments_t arguments, f_console_parameters_t * const parameters, const f_console_parameter_ids_t choices, const bool right, f_color_context_t * const context) { f_status_t status = F_none; @@ -109,7 +109,7 @@ extern "C" { #endif // _di_fll_program_parameter_process_ #ifndef _di_fll_program_parameter_process_empty_ - void fll_program_parameter_process_empty(f_color_context_t *context, f_color_set_t *sets[]) { + void fll_program_parameter_process_empty(f_color_context_t * const context, f_color_set_t * const sets[]) { context->set.reset = f_color_set_empty_s; context->set.warning = f_color_set_empty_s; @@ -131,7 +131,7 @@ extern "C" { #endif // _di_fll_program_parameter_process_empty_ #ifndef _di_fll_program_parameter_additional_append_ - f_status_t fll_program_parameter_additional_append(const f_string_static_t *arguments, const f_array_lengths_t values, f_string_dynamics_t *destination) { + f_status_t fll_program_parameter_additional_append(const f_string_static_t *arguments, const f_array_lengths_t values, f_string_dynamics_t * const destination) { #ifndef _di_level_2_parameter_checking_ if (!arguments) return F_status_set_error(F_parameter); if (!destination) return F_status_set_error(F_parameter); @@ -170,7 +170,7 @@ extern "C" { #endif // _di_fll_program_parameter_additional_append_ #ifndef _di_fll_program_parameter_additional_mash_ - f_status_t fll_program_parameter_additional_mash(const f_string_static_t glue, const f_string_static_t *arguments, const f_array_lengths_t values, f_string_dynamic_t *destination) { + f_status_t fll_program_parameter_additional_mash(const f_string_static_t glue, const f_string_static_t * const arguments, const f_array_lengths_t values, f_string_dynamic_t * const destination) { #ifndef _di_level_2_parameter_checking_ if (!arguments) return F_status_set_error(F_parameter); if (!destination) return F_status_set_error(F_parameter); @@ -197,7 +197,7 @@ extern "C" { #endif // _di_fll_program_parameter_additional_mash_ #ifndef _di_fll_program_parameter_additional_rip_ - f_status_t fll_program_parameter_additional_rip(const f_string_static_t *arguments, const f_array_lengths_t values, f_string_dynamics_t *destination) { + f_status_t fll_program_parameter_additional_rip(const f_string_static_t * const arguments, const f_array_lengths_t values, f_string_dynamics_t * const destination) { #ifndef _di_level_2_parameter_checking_ if (!arguments) return F_status_set_error(F_parameter); if (!destination) return F_status_set_error(F_parameter); @@ -214,7 +214,7 @@ extern "C" { destination->array[destination->used].used = 0; - status = fl_string_rip(arguments[values.array[i]].string, arguments[values.array[i]].used, &destination->array[destination->used]); + status = fl_string_dynamic_rip(arguments[values.array[i]], &destination->array[destination->used]); if (F_status_is_error(status)) break; if (status == F_data_not) { @@ -235,7 +235,7 @@ extern "C" { #endif // _di_fll_program_parameter_additional_rip_ #ifndef _di_fll_program_parameter_additional_rip_mash_ - f_status_t fll_program_parameter_additional_rip_mash(const f_string_static_t glue, const f_string_static_t *arguments, const f_array_lengths_t values, f_string_dynamic_t *destination) { + f_status_t fll_program_parameter_additional_rip_mash(const f_string_static_t glue, const f_string_static_t * const arguments, const f_array_lengths_t values, f_string_dynamic_t * const destination) { #ifndef _di_level_2_parameter_checking_ if (!arguments) return F_status_set_error(F_parameter); if (!destination) return F_status_set_error(F_parameter); @@ -251,7 +251,7 @@ extern "C" { if (arguments[values.array[i]].used) { ripped.used = 0; - status = fl_string_rip(arguments[values.array[i]].string, arguments[values.array[i]].used, &ripped); + status = fl_string_dynamic_rip(arguments[values.array[i]], &ripped); if (F_status_is_error(status)) break; if (ripped.used) { diff --git a/level_2/fll_program/c/program.h b/level_2/fll_program/c/program.h index de5ac41..873d303 100644 --- a/level_2/fll_program/c/program.h +++ b/level_2/fll_program/c/program.h @@ -218,7 +218,7 @@ extern "C" { * @see f_color_load_context() */ #ifndef _di_fll_program_parameter_process_ - extern f_status_t fll_program_parameter_process(const f_console_arguments_t arguments, f_console_parameters_t * const parameters, const f_console_parameter_ids_t choices, const bool right, f_color_context_t *context); + extern f_status_t fll_program_parameter_process(const f_console_arguments_t arguments, f_console_parameters_t * const parameters, const f_console_parameter_ids_t choices, const bool right, f_color_context_t * const context); #endif // _di_fll_program_parameter_process_ /** @@ -233,7 +233,7 @@ extern "C" { * Set to NULL to not use. */ #ifndef _di_fll_program_parameter_process_empty_ - extern void fll_program_parameter_process_empty(f_color_context_t *context, f_color_set_t *sets[]); + extern void fll_program_parameter_process_empty(f_color_context_t * const context, f_color_set_t * const sets[]); #endif // _di_fll_program_parameter_process_empty_ /** @@ -264,7 +264,7 @@ extern "C" { * @see f_string_dynamic_append() */ #ifndef _di_fll_program_parameter_additional_append_ - extern f_status_t fll_program_parameter_additional_append(const f_string_static_t *arguments, const f_array_lengths_t values, f_string_dynamics_t *destination); + extern f_status_t fll_program_parameter_additional_append(const f_string_static_t *arguments, const f_array_lengths_t values, f_string_dynamics_t * const destination); #endif // _di_fll_program_parameter_additional_append_ /** @@ -293,7 +293,7 @@ extern "C" { * @see f_string_dynamic_mash() */ #ifndef _di_fll_program_parameter_additional_mash_ - extern f_status_t fll_program_parameter_additional_mash(const f_string_static_t glue, const f_string_static_t *arguments, const f_array_lengths_t values, f_string_dynamic_t *destination); + extern f_status_t fll_program_parameter_additional_mash(const f_string_static_t glue, const f_string_static_t *arguments, const f_array_lengths_t values, f_string_dynamic_t * const destination); #endif // _di_fll_program_parameter_additional_mash_ /** @@ -316,12 +316,12 @@ extern "C" { * F_memory_not (with error bit) on out of memory. * F_parameter (with error bit) if a parameter is invalid. * - * Errors (with error bit) from: fl_string_rip(). + * Errors (with error bit) from: fl_string_dynamic_rip(). * - * @see fl_string_rip() + * @see fl_string_dynamic_rip() */ #ifndef _di_fll_program_parameter_additional_rip_ - extern f_status_t fll_program_parameter_additional_rip(const f_string_static_t *arguments, const f_array_lengths_t values, f_string_dynamics_t *destination); + extern f_status_t fll_program_parameter_additional_rip(const f_string_static_t *arguments, const f_array_lengths_t values, f_string_dynamics_t * const destination); #endif // _di_fll_program_parameter_additional_rip_ /** @@ -348,13 +348,13 @@ extern "C" { * F_string_too_large (with error bit) if the combined string is too large. * * Errors (with error bit) from: f_string_dynamic_mash(). - * Errors (with error bit) from: fl_string_rip(). + * Errors (with error bit) from: fl_string_dynamic_rip(). * * @see f_string_dynamic_mash() - * @see fl_string_rip() + * @see fl_string_dynamic_rip() */ #ifndef _di_fll_program_parameter_additional_rip_mash_ - extern f_status_t fll_program_parameter_additional_rip_mash(const f_string_static_t glue, const f_string_static_t *arguments, const f_array_lengths_t values, f_string_dynamic_t *destination); + extern f_status_t fll_program_parameter_additional_rip_mash(const f_string_static_t glue, const f_string_static_t *arguments, const f_array_lengths_t values, f_string_dynamic_t * const destination); #endif // _di_fll_program_parameter_additional_rip_mash_ /** diff --git a/level_2/fll_status_string/c/status_string.c b/level_2/fll_status_string/c/status_string.c index 2a30e4b..8422cd9 100644 --- a/level_2/fll_status_string/c/status_string.c +++ b/level_2/fll_status_string/c/status_string.c @@ -5,7 +5,7 @@ extern "C" { #endif #ifndef _di_fll_status_string_from_ - f_status_t fll_status_string_from(const f_string_static_t name, f_status_t *code) { + f_status_t fll_status_string_from(const f_string_static_t name, f_status_t * const code) { #ifndef _di_level_2_parameter_checking_ if (!code) return F_status_set_error(F_parameter); #endif // _di_level_2_parameter_checking_ diff --git a/level_2/fll_status_string/c/status_string.h b/level_2/fll_status_string/c/status_string.h index bef0af3..af96ed2 100644 --- a/level_2/fll_status_string/c/status_string.h +++ b/level_2/fll_status_string/c/status_string.h @@ -48,7 +48,7 @@ extern "C" { * Errors (with error bit) from: f_conversion_character_is_decimal(). */ #ifndef _di_fll_status_string_from_ - extern f_status_t fll_status_string_from(const f_string_static_t name, f_status_t *code); + extern f_status_t fll_status_string_from(const f_string_static_t name, f_status_t * const code); #endif // _di_fll_status_string_to_ #ifdef __cplusplus diff --git a/level_3/control/c/private-common.c b/level_3/control/c/private-common.c index 295bedf..97ecf47 100644 --- a/level_3/control/c/private-common.c +++ b/level_3/control/c/private-common.c @@ -76,7 +76,7 @@ extern "C" { #endif // _di_control_signal_received_ #ifndef _di_control_signal_state_interrupt_fss_ - f_status_t control_signal_state_interrupt_fss(void *state, void *internal) { + f_status_t control_signal_state_interrupt_fss(void * const state, void * const internal) { if (!state) { return F_interrupt_not; diff --git a/level_3/control/c/private-common.h b/level_3/control/c/private-common.h index 2fafdbf..039994e 100644 --- a/level_3/control/c/private-common.h +++ b/level_3/control/c/private-common.h @@ -303,7 +303,7 @@ extern "C" { * F_interrupt (with error bit) on receiving a terminate process signal, such as an interrupt signal. */ #ifndef _di_control_signal_state_interrupt_fss_ - extern f_status_t control_signal_state_interrupt_fss(void *state, void *internal) F_attribute_visibility_internal_d; + extern f_status_t control_signal_state_interrupt_fss(void * const state, void * const internal) F_attribute_visibility_internal_d; #endif // _di_control_signal_state_interrupt_fss_ #ifdef __cplusplus diff --git a/level_3/controller/c/controller/private-controller.c b/level_3/controller/c/controller/private-controller.c index e9c1a50..012d38a 100644 --- a/level_3/controller/c/controller/private-controller.c +++ b/level_3/controller/c/controller/private-controller.c @@ -33,7 +33,7 @@ extern "C" { #ifndef _di_controller_string_dynamic_rip_nulless_terminated_ f_status_t controller_dynamic_rip_nulless_terminated(const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination) { - return fl_string_dynamic_rip_nulless(source, range, destination); + return fl_string_dynamic_partial_rip_nulless(source, range, destination); } #endif // _di_controller_string_dynamic_rip_nulless_terminated_ diff --git a/level_3/controller/c/controller/private-controller.h b/level_3/controller/c/controller/private-controller.h index 52ad1cb..b931d24 100644 --- a/level_3/controller/c/controller/private-controller.h +++ b/level_3/controller/c/controller/private-controller.h @@ -43,9 +43,9 @@ extern "C" { * @return * F_none on success. * - * Errors (with error bit) from: fl_string_dynamic_rip_nulless(). + * Errors (with error bit) from: fl_string_dynamic_partial_rip_nulless(). * - * @see fl_string_dynamic_rip_nulless() + * @see fl_string_dynamic_partial_rip_nulless() */ #ifndef _di_controller_string_dynamic_rip_nulless_terminated_ extern f_status_t controller_dynamic_rip_nulless_terminated(const f_string_static_t source, const f_string_range_t range, f_string_dynamic_t *destination) F_attribute_visibility_internal_d; diff --git a/level_3/controller/c/entry/private-entry.h b/level_3/controller/c/entry/private-entry.h index 338ffa0..473663a 100644 --- a/level_3/controller/c/entry/private-entry.h +++ b/level_3/controller/c/entry/private-entry.h @@ -76,7 +76,7 @@ extern "C" { * Errors (with error bit) from: f_fss_count_lines(). * Errors (with error bit) from: fl_fss_apply_delimit(). * Errors (with error bit) from: f_string_dynamic_partial_append_nulless(). - * Errors (with error bit) from: fl_string_dynamic_rip_nulless(). + * Errors (with error bit) from: fl_string_dynamic_partial_rip_nulless(). * Errors (with error bit) from: f_string_dynamics_increase_by(). * Errors (with error bit) from: fll_fss_extended_read(). * @@ -85,7 +85,7 @@ extern "C" { * @see f_string_dynamic_partial_append_nulless() * @see f_string_dynamics_increase_by() * @see fl_fss_apply_delimit() - * @see fl_string_dynamic_rip_nulless() + * @see fl_string_dynamic_partial_rip_nulless() * @see fll_fss_extended_read() */ #ifndef _di_controller_entry_actions_read_ diff --git a/level_3/controller/c/rule/private-rule.c b/level_3/controller/c/rule/private-rule.c index 2e45f1b..cb0dd3d 100644 --- a/level_3/controller/c/rule/private-rule.c +++ b/level_3/controller/c/rule/private-rule.c @@ -435,10 +435,10 @@ extern "C" { else if (type == controller_rule_action_type_pid_file_e) { item->pid_file.used = 0; - status = fl_string_dynamic_rip(cache->buffer_item, cache->content_action.array[0], &item->pid_file); + status = fl_string_dynamic_partial_rip(cache->buffer_item, cache->content_action.array[0], &item->pid_file); if (F_status_is_error(status)) { - controller_print_error(global.thread, global.main->error, F_status_set_fine(status), "fl_string_dynamic_rip", F_true); + controller_print_error(global.thread, global.main->error, F_status_set_fine(status), "fl_string_dynamic_partial_rip", F_true); } } else if (type == controller_rule_action_type_rerun_e) { diff --git a/level_3/controller/c/rule/private-rule.h b/level_3/controller/c/rule/private-rule.h index 383d5b1..ba2a7ba 100644 --- a/level_3/controller/c/rule/private-rule.h +++ b/level_3/controller/c/rule/private-rule.h @@ -702,7 +702,7 @@ extern "C" { * F_valid_not (with error bit) on success but there were one or more invalid settings encountered. * * Errors (with error bit) from: f_string_dynamic_partial_append_nulless(). - * Errors (with error bit) from: fl_string_dynamic_rip_nulless(). + * Errors (with error bit) from: fl_string_dynamic_partial_rip_nulless(). * Errors (with error bit) from: f_string_dynamics_increase(). * Errors (with error bit) from: f_string_maps_increase(). * Errors (with error bit) from: fll_fss_extended_read(). @@ -711,7 +711,7 @@ extern "C" { * @see f_string_dynamic_partial_append_nulless() * @see f_string_dynamics_increase() * @see f_string_maps_increase() - * @see fl_string_dynamic_rip_nulless() + * @see fl_string_dynamic_partial_rip_nulless() * @see fll_fss_extended_read() * @see fll_path_canonical() */ diff --git a/level_3/fake/c/private-fake.c b/level_3/fake/c/private-fake.c index fc7f308..61d2036 100644 --- a/level_3/fake/c/private-fake.c +++ b/level_3/fake/c/private-fake.c @@ -509,7 +509,7 @@ extern "C" { #endif // _di_fake_process_console_parameters_ #ifndef _di_fake_signal_state_interrupt_fss_ - f_status_t fake_signal_state_interrupt_fss(void *state, void *internal) { + f_status_t fake_signal_state_interrupt_fss(void * const state, void * const internal) { if (!state) { return F_interrupt_not; @@ -536,7 +536,7 @@ extern "C" { #endif // _di_fake_signal_state_interrupt_fss_ #ifndef _di_fake_signal_state_interrupt_iki_ - f_status_t fake_signal_state_interrupt_iki(void *state, void *internal) { + f_status_t fake_signal_state_interrupt_iki(void * const state, void * const internal) { if (!state) { return F_interrupt_not; diff --git a/level_3/fake/c/private-fake.h b/level_3/fake/c/private-fake.h index 9eadbd2..c6cfc8d 100644 --- a/level_3/fake/c/private-fake.h +++ b/level_3/fake/c/private-fake.h @@ -88,7 +88,7 @@ extern "C" { * F_interrupt (with error bit) on receiving a terminate process signal, such as an interrupt signal. */ #ifndef _di_fake_signal_state_interrupt_fss_ - extern f_status_t fake_signal_state_interrupt_fss(void *state, void *internal) F_attribute_visibility_internal_d; + extern f_status_t fake_signal_state_interrupt_fss(void * const state, void * const internal) F_attribute_visibility_internal_d; #endif // _di_fake_signal_state_interrupt_fss_ /** @@ -105,7 +105,7 @@ extern "C" { * F_interrupt (with error bit) on receiving a terminate process signal, such as an interrupt signal. */ #ifndef _di_fake_signal_state_interrupt_iki_ - extern f_status_t fake_signal_state_interrupt_iki(void *state, void *internal) F_attribute_visibility_internal_d; + extern f_status_t fake_signal_state_interrupt_iki(void * const state, void * const internal) F_attribute_visibility_internal_d; #endif // _di_fake_signal_state_interrupt_iki_ /** diff --git a/level_3/fss_basic_list_read/c/private-read.c b/level_3/fss_basic_list_read/c/private-read.c index 50c0c72..704a32a 100644 --- a/level_3/fss_basic_list_read/c/private-read.c +++ b/level_3/fss_basic_list_read/c/private-read.c @@ -154,7 +154,7 @@ extern "C" { data->depths.array[i].index_name = main->parameters.array[fss_basic_list_read_parameter_name_e].values.array[position_name]; if (main->parameters.array[fss_basic_list_read_parameter_trim_e].result == f_console_result_found_e) { - status = fl_string_rip(data->argv[data->depths.array[i].index_name].string, data->argv[data->depths.array[i].index_name].used, &data->depths.array[i].value_name); + status = fl_string_dynamic_rip(data->argv[data->depths.array[i].index_name], &data->depths.array[i].value_name); } else { status = f_string_dynamic_append(data->argv[data->depths.array[i].index_name], &data->depths.array[i].value_name); diff --git a/level_3/fss_basic_list_read/c/private-read.h b/level_3/fss_basic_list_read/c/private-read.h index 9f329a3..f46472c 100644 --- a/level_3/fss_basic_list_read/c/private-read.h +++ b/level_3/fss_basic_list_read/c/private-read.h @@ -60,14 +60,14 @@ extern "C" { * F_interrupt (with error bit) on receiving a process signal, such as an interrupt signal. * * Errors (with error bit) from: f_string_append(). - * Errors (with error bit) from: fl_string_rip(). * Errors (with error bit) from: fl_conversion_dynamic_partial_to_number_unsigned(). + * Errors (with error bit) from: fl_string_dynamic_rip(). * * Errors (with error bit) from: fss_basic_list_read_depths_resize(). * * @see f_string_append() - * @see fl_string_rip() * @see fl_conversion_dynamic_partial_to_number_unsigned() + * @see fl_string_dynamic_rip() * * @see fss_basic_list_read_depths_resize() */ diff --git a/level_3/fss_basic_read/c/private-read.c b/level_3/fss_basic_read/c/private-read.c index 3a2f381..c58189c 100644 --- a/level_3/fss_basic_read/c/private-read.c +++ b/level_3/fss_basic_read/c/private-read.c @@ -126,7 +126,7 @@ extern "C" { data->depths.array[i].index_name = main->parameters.array[fss_basic_read_parameter_name_e].values.array[position_name]; if (main->parameters.array[fss_basic_read_parameter_trim_e].result == f_console_result_found_e) { - status = fl_string_rip(data->argv[data->depths.array[i].index_name].string, data->argv[data->depths.array[i].index_name].used, &data->depths.array[i].value_name); + status = fl_string_dynamic_rip(data->argv[data->depths.array[i].index_name], &data->depths.array[i].value_name); } else { status = f_string_dynamic_append(data->argv[data->depths.array[i].index_name], &data->depths.array[i].value_name); diff --git a/level_3/fss_basic_read/c/private-read.h b/level_3/fss_basic_read/c/private-read.h index 44fc1b0..1c96181 100644 --- a/level_3/fss_basic_read/c/private-read.h +++ b/level_3/fss_basic_read/c/private-read.h @@ -44,14 +44,14 @@ extern "C" { * F_none on success. * * Errors (with error bit) from: f_string_append(). - * Errors (with error bit) from: fl_string_rip(). * Errors (with error bit) from: fl_conversion_dynamic_partial_to_number_unsigned(). + * Errors (with error bit) from: fl_string_dynamic_rip(). * * Errors (with error bit) from: fss_basic_read_depths_resize(). * * @see f_string_append() - * @see fl_string_rip() * @see fl_conversion_dynamic_partial_to_number_unsigned() + * @see fl_string_dynamic_rip() * * @see fss_basic_read_depths_resize() */ diff --git a/level_3/fss_embedded_list_read/c/private-read.c b/level_3/fss_embedded_list_read/c/private-read.c index feeb544..e5a6b60 100644 --- a/level_3/fss_embedded_list_read/c/private-read.c +++ b/level_3/fss_embedded_list_read/c/private-read.c @@ -171,10 +171,10 @@ extern "C" { depths->array[depths->used].value_name.used = 0; if (main->parameters.array[fss_embedded_list_read_parameter_trim_e].result == f_console_result_found_e) { - status = fl_string_rip(argv[values_order[i]].string, argv[values_order[i]].used, &depths->array[depths->used].value_name); + status = fl_string_dynamic_rip(argv[values_order[i]], &depths->array[depths->used].value_name); if (F_status_is_error(status)) { - fll_error_print(main->error, F_status_set_fine(status), "fl_string_rip", F_true); + fll_error_print(main->error, F_status_set_fine(status), "fl_string_dynamic_rip", F_true); return status; } diff --git a/level_3/fss_extended_list_read/c/private-read.c b/level_3/fss_extended_list_read/c/private-read.c index e36c780..f298769 100644 --- a/level_3/fss_extended_list_read/c/private-read.c +++ b/level_3/fss_extended_list_read/c/private-read.c @@ -149,7 +149,7 @@ extern "C" { data->depths.array[i].index_name = main->parameters.array[fss_extended_list_read_parameter_name_e].values.array[position_name]; if (main->parameters.array[fss_extended_list_read_parameter_trim_e].result == f_console_result_found_e) { - status = fl_string_rip(data->argv[data->depths.array[i].index_name].string, data->argv[data->depths.array[i].index_name].used, &data->depths.array[i].value_name); + status = fl_string_dynamic_rip(data->argv[data->depths.array[i].index_name], &data->depths.array[i].value_name); } else { status = f_string_dynamic_append(data->argv[data->depths.array[i].index_name], &data->depths.array[i].value_name); diff --git a/level_3/fss_extended_list_read/c/private-read.h b/level_3/fss_extended_list_read/c/private-read.h index 512c39d..d1eb42b 100644 --- a/level_3/fss_extended_list_read/c/private-read.h +++ b/level_3/fss_extended_list_read/c/private-read.h @@ -58,14 +58,14 @@ extern "C" { * F_none on success. * * Errors (with error bit) from: f_string_append(). - * Errors (with error bit) from: fl_string_rip(). * Errors (with error bit) from: fl_conversion_dynamic_partial_to_number_unsigned(). + * Errors (with error bit) from: fl_string_dynamic_rip(). * * Errors (with error bit) from: fss_extended_list_read_depths_resize(). * * @see f_string_append() - * @see fl_string_rip() * @see fl_conversion_dynamic_partial_to_number_unsigned() + * @see fl_string_dynamic_rip() * * @see fss_extended_list_read_depths_resize() */ diff --git a/level_3/fss_extended_read/c/private-read.c b/level_3/fss_extended_read/c/private-read.c index 13889d9..c9d4c5c 100644 --- a/level_3/fss_extended_read/c/private-read.c +++ b/level_3/fss_extended_read/c/private-read.c @@ -158,14 +158,14 @@ extern "C" { data->depths.array[i].index_name = main->parameters.array[fss_extended_read_parameter_name_e].values.array[position_name]; if (main->parameters.array[fss_extended_read_parameter_trim_e].result == f_console_result_found_e) { - status = fl_string_rip(data->argv[data->depths.array[i].index_name].string, data->argv[data->depths.array[i].index_name].used, &data->depths.array[i].value_name); + status = fl_string_dynamic_rip(data->argv[data->depths.array[i].index_name], &data->depths.array[i].value_name); } else { status = f_string_dynamic_append(data->argv[data->depths.array[i].index_name], &data->depths.array[i].value_name); } if (F_status_is_error(status)) { - fll_error_print(main->error, F_status_set_fine(status), main->parameters.array[fss_extended_read_parameter_trim_e].result == f_console_result_found_e ? "fl_string_rip" : "f_string_dynamic_append", F_true); + fll_error_print(main->error, F_status_set_fine(status), main->parameters.array[fss_extended_read_parameter_trim_e].result == f_console_result_found_e ? "fl_string_dynamic_rip" : "f_string_dynamic_append", F_true); return status; } diff --git a/level_3/fss_extended_read/c/private-read.h b/level_3/fss_extended_read/c/private-read.h index bfa35cf..fcebadc 100644 --- a/level_3/fss_extended_read/c/private-read.h +++ b/level_3/fss_extended_read/c/private-read.h @@ -58,14 +58,14 @@ extern "C" { * F_none on success. * * Errors (with error bit) from: f_string_append(). - * Errors (with error bit) from: fl_string_rip(). * Errors (with error bit) from: fl_conversion_dynamic_partial_to_number_unsigned(). + * Errors (with error bit) from: fl_string_dynamic_rip(). * * Errors (with error bit) from: fss_extended_read_depths_resize(). * * @see f_string_append() - * @see fl_string_rip() * @see fl_conversion_dynamic_partial_to_number_unsigned() + * @see fl_string_dynamic_rip() * * @see fss_extended_read_depths_resize() */ diff --git a/level_3/fss_payload_read/c/private-read.c b/level_3/fss_payload_read/c/private-read.c index f60bc7f..47e0f45 100644 --- a/level_3/fss_payload_read/c/private-read.c +++ b/level_3/fss_payload_read/c/private-read.c @@ -154,14 +154,14 @@ extern "C" { data->depths.array[i].index_name = main->parameters.array[fss_payload_read_parameter_name_e].values.array[position_name]; if (main->parameters.array[fss_payload_read_parameter_trim_e].result == f_console_result_found_e) { - status = fl_string_rip(data->argv[data->depths.array[i].index_name].string, data->argv[data->depths.array[i].index_name].used, &data->depths.array[i].value_name); + status = fl_string_dynamic_rip(data->argv[data->depths.array[i].index_name], &data->depths.array[i].value_name); } else { status = f_string_dynamic_append(data->argv[data->depths.array[i].index_name], &data->depths.array[i].value_name); } if (F_status_is_error(status)) { - fll_error_print(main->error, F_status_set_fine(status), main->parameters.array[fss_payload_read_parameter_trim_e].result == f_console_result_found_e ? "fl_string_rip" : "f_string_dynamic_append", F_true); + fll_error_print(main->error, F_status_set_fine(status), main->parameters.array[fss_payload_read_parameter_trim_e].result == f_console_result_found_e ? "fl_string_dynamic_rip" : "f_string_dynamic_append", F_true); return status; } diff --git a/level_3/fss_payload_read/c/private-read.h b/level_3/fss_payload_read/c/private-read.h index cb7a830..ce6b6c7 100644 --- a/level_3/fss_payload_read/c/private-read.h +++ b/level_3/fss_payload_read/c/private-read.h @@ -62,14 +62,14 @@ extern "C" { * F_interrupt (with error bit) on receiving a process signal, such as an interrupt signal. * * Errors (with error bit) from: f_string_append(). - * Errors (with error bit) from: fl_string_rip(). * Errors (with error bit) from: fl_conversion_dynamic_partial_to_number_unsigned(). + * Errors (with error bit) from: fl_string_dynamic_rip(). * * Errors (with error bit) from: fss_payload_read_depths_resize(). * * @see f_string_append() - * @see fl_string_rip() * @see fl_conversion_dynamic_partial_to_number_unsigned() + * @see fl_string_dynamic_rip() * * @see fss_payload_read_depths_resize() */