From: Kevin Day Date: Tue, 16 Jan 2024 14:15:16 +0000 (-0600) Subject: Cleanup: Rename 'structure' to 'buffer' in parameters. X-Git-Url: https://git.kevux.org/?a=commitdiff_plain;h=2d7f7ddff7b3a75ff25397cf07d4a31e8d4f2434;p=fll Cleanup: Rename 'structure' to 'buffer' in parameters. The use of 'structure' is an old way of how I was doing things. Using 'buffer' is more precise. --- diff --git a/level_0/f_string/c/string/dynamic.c b/level_0/f_string/c/string/dynamic.c index 54cd724..31f95cb 100644 --- a/level_0/f_string/c/string/dynamic.c +++ b/level_0/f_string/c/string/dynamic.c @@ -558,19 +558,19 @@ extern "C" { #endif // _di_f_string_dynamic_prepend_nulless_ #ifndef _di_f_string_dynamic_seek_line_ - f_status_t f_string_dynamic_seek_line(const f_string_static_t structure, f_range_t * const range) { + f_status_t f_string_dynamic_seek_line(const f_string_static_t buffer, f_range_t * const range) { #ifndef _di_level_0_parameter_checking_ if (!range) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!structure.used) return F_data_not; + if (!buffer.used) return F_data_not; if (range->start > range->stop) return F_data_not_stop; - while (structure.string[range->start] != f_string_eol_s.string[0]) { + while (buffer.string[range->start] != f_string_eol_s.string[0]) { ++range->start; - if (range->start >= structure.used) return F_okay_eos; + if (range->start >= buffer.used) return F_okay_eos; if (range->start > range->stop) return F_okay_stop; } // while @@ -579,21 +579,21 @@ extern "C" { #endif // _di_f_string_dynamic_seek_line_ #ifndef _di_f_string_dynamic_seek_line_to_ - f_status_t f_string_dynamic_seek_line_to(const f_string_static_t structure, const f_char_t seek_to_this, f_range_t * const range) { + f_status_t f_string_dynamic_seek_line_to(const f_string_static_t buffer, const f_char_t seek_to_this, f_range_t * const range) { #ifndef _di_level_0_parameter_checking_ if (!range) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!structure.used) return F_data_not; + if (!buffer.used) return F_data_not; if (range->start > range->stop) return F_data_not_stop; - while (structure.string[range->start] != seek_to_this) { + while (buffer.string[range->start] != seek_to_this) { - if (structure.string[range->start] == f_string_eol_s.string[0]) return F_okay_eol; + if (buffer.string[range->start] == f_string_eol_s.string[0]) return F_okay_eol; ++range->start; - if (range->start >= structure.used) return F_okay_eos; + if (range->start >= buffer.used) return F_okay_eos; if (range->start > range->stop) return F_okay_stop; } // while @@ -602,19 +602,19 @@ extern "C" { #endif // _di_f_string_dynamic_seek_line_to_ #ifndef _di_f_string_dynamic_seek_to_ - f_status_t f_string_dynamic_seek_to(const f_string_static_t structure, const f_char_t seek_to_this, f_range_t * const range) { + f_status_t f_string_dynamic_seek_to(const f_string_static_t buffer, const f_char_t seek_to_this, f_range_t * const range) { #ifndef _di_level_0_parameter_checking_ if (!range) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - if (!structure.used) return F_data_not; + if (!buffer.used) return F_data_not; if (range->start > range->stop) return F_data_not_stop; - while (structure.string[range->start] != seek_to_this) { + while (buffer.string[range->start] != seek_to_this) { ++range->start; - if (range->start >= structure.used) return F_okay_eos; + if (range->start >= buffer.used) return F_okay_eos; if (range->start > range->stop) return F_okay_stop; } // while diff --git a/level_0/f_string/c/string/dynamic.h b/level_0/f_string/c/string/dynamic.h index 72c4db1..29ba25e 100644 --- a/level_0/f_string/c/string/dynamic.h +++ b/level_0/f_string/c/string/dynamic.h @@ -668,7 +668,7 @@ extern "C" { /** * Seek the buffer location forward until EOL is reached. * - * @param structure + * @param buffer * The buffer to traverse. * @param range * A range within the buffer representing the start and stop locations. @@ -686,13 +686,13 @@ extern "C" { * Errors (with error bit) from: f_memory_resize(). */ #ifndef _di_f_string_dynamic_seek_line_ - extern f_status_t f_string_dynamic_seek_line(const f_string_static_t structure, f_range_t * const range); + extern f_status_t f_string_dynamic_seek_line(const f_string_static_t buffer, f_range_t * const range); #endif // _di_f_string_dynamic_seek_line_ /** * Seek the buffer location forward until the character (1-byte wide) or EOL is reached. * - * @param structure + * @param buffer * The buffer to traverse. * @param seek_to_this * A single-width character representing a character to seek to. @@ -712,13 +712,13 @@ extern "C" { * Errors (with error bit) from: f_memory_resize(). */ #ifndef _di_f_string_dynamic_seek_line_to_ - extern f_status_t f_string_dynamic_seek_line_to(const f_string_static_t structure, const f_char_t seek_to_this, f_range_t * const range); + extern f_status_t f_string_dynamic_seek_line_to(const f_string_static_t buffer, const f_char_t seek_to_this, f_range_t * const range); #endif // _di_f_string_dynamic_seek_line_to_ /** * Seek the buffer location forward until the character (1-byte wide) is reached. * - * @param structure + * @param buffer * The buffer to traverse. * @param seek_to_this * A single-width character representing a character to seek to. @@ -738,7 +738,7 @@ extern "C" { * Errors (with error bit) from: f_memory_resize(). */ #ifndef _di_f_string_dynamic_seek_to_ - extern f_status_t f_string_dynamic_seek_to(const f_string_static_t structure, const f_char_t seek_to_this, f_range_t * const range); + extern f_status_t f_string_dynamic_seek_to(const f_string_static_t buffer, const f_char_t seek_to_this, f_range_t * const range); #endif // _di_f_string_dynamic_seek_to_ /**