From 46fcfb4b6fd4e39c0ba1f96df383db82e36af2a1 Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Sat, 30 Jul 2022 09:45:48 -0500 Subject: [PATCH] Update: The f_color needs to follow latest practices with private functions. The f_color project is now updated to use private functions. Change the behavior of the color parameters to only append if the previous is provided. This includes the relevant color medium. Update the documentation comments to display the correct function dependencies and error return states. --- build/level_0/settings | 2 +- build/monolithic/settings | 2 +- level_0/f_color/c/color.c | 259 +++++++++++++----------------------- level_0/f_color/c/color.h | 38 ++++-- level_0/f_color/c/private-color.c | 82 ++++++++++++ level_0/f_color/c/private-color.h | 80 +++++++++++ level_0/f_color/data/build/settings | 2 +- 7 files changed, 280 insertions(+), 185 deletions(-) create mode 100644 level_0/f_color/c/private-color.c create mode 100644 level_0/f_color/c/private-color.h diff --git a/build/level_0/settings b/build/level_0/settings index ec2f74c..4c4335d 100644 --- a/build/level_0/settings +++ b/build/level_0/settings @@ -21,7 +21,7 @@ build_libraries -lc -lcap build_sources_library account.c private-account.c build_sources_library capability.c -build_sources_library color.c color/common.c +build_sources_library color.c private-color.c color/common.c build_sources_library console.c console/common.c build_sources_library control_group.c control_group/common.c build_sources_library conversion.c private-conversion.c conversion/common.c diff --git a/build/monolithic/settings b/build/monolithic/settings index 31ce640..a96ac66 100644 --- a/build/monolithic/settings +++ b/build/monolithic/settings @@ -21,7 +21,7 @@ build_libraries -lc -lcap build_sources_library level_0/account.c level_0/private-account.c build_sources_library level_0/capability.c -build_sources_library level_0/color.c level_0/color/common.c +build_sources_library level_0/color.c level_0/private-color.c level_0/color/common.c build_sources_library level_0/console.c level_0/console/common.c build_sources_library level_0/control_group.c level_0/control_group/common.c build_sources_library level_0/conversion.c level_0/private-conversion.c level_0/conversion/common.c diff --git a/level_0/f_color/c/color.c b/level_0/f_color/c/color.c index ab4eedf..0fbbc9f 100644 --- a/level_0/f_color/c/color.c +++ b/level_0/f_color/c/color.c @@ -1,4 +1,5 @@ #include "color.h" +#include "private-color.h" #ifdef __cplusplus extern "C" { @@ -22,35 +23,35 @@ extern "C" { } } - f_status_t status = f_color_save_1(context->format, context->list.reset, &context->reset); + f_status_t status = private_f_color_save_1(context->format, context->list.reset, &context->reset); if (F_status_is_error_not(status)) { - status = f_color_save_1(context->format, context->list.yellow, &context->warning); + status = private_f_color_save_1(context->format, context->list.yellow, &context->warning); } if (F_status_is_error_not(status)) { - status = f_color_save_2(context->format, context->list.bold, context->list.red, &context->error); + status = private_f_color_save_2(context->format, context->list.bold, context->list.red, &context->error); } if (F_status_is_error_not(status)) { - status = f_color_save_2(context->format, context->list.bold, context->list.green, &context->success); + status = private_f_color_save_2(context->format, context->list.bold, context->list.green, &context->success); } if (F_status_is_error_not(status)) { - status = f_color_save_1(context->format, context->list.bold, &context->notable); + status = private_f_color_save_1(context->format, context->list.bold, &context->notable); } if (use_light_colors) { if (F_status_is_error_not(status)) { - status = f_color_save_2(context->format, context->list.bold, context->list.blue, &context->title); + status = private_f_color_save_2(context->format, context->list.bold, context->list.blue, &context->title); } if (F_status_is_error_not(status)) { - status = f_color_save_1(context->format, context->list.blue, &context->important); + status = private_f_color_save_1(context->format, context->list.blue, &context->important); } if (F_status_is_error_not(status)) { - status = f_color_save_1(context->format, context->list.purple, &context->standout); + status = private_f_color_save_1(context->format, context->list.purple, &context->standout); } if (F_status_is_error_not(status)) { @@ -59,15 +60,15 @@ extern "C" { } else { if (F_status_is_error_not(status)) { - status = f_color_save_2(context->format, context->list.bold, context->list.yellow, &context->title); + status = private_f_color_save_2(context->format, context->list.bold, context->list.yellow, &context->title); } if (F_status_is_error_not(status)) { - status = f_color_save_2(context->format, context->list.bold, context->list.green, &context->important); + status = private_f_color_save_2(context->format, context->list.bold, context->list.green, &context->important); } if (F_status_is_error_not(status)) { - status = f_color_save_1(context->format, context->list.green, &context->standout); + status = private_f_color_save_1(context->format, context->list.green, &context->standout); } if (F_status_is_error_not(status)) { @@ -105,6 +106,8 @@ extern "C" { context->set.warning.before = &context->warning; context->set.warning.after = &context->reset; + + status = F_none; } return status; @@ -117,32 +120,7 @@ extern "C" { if (!buffer) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - f_status_t status = F_none; - - status = f_string_dynamic_increase_by(format.begin.used + format.end.used + color1.used + 1, buffer); - if (F_status_is_error(status)) return status; - - if (format.begin.used) { - memcpy(buffer->string + buffer->used, format.begin.string, sizeof(f_char_t) * format.begin.used); - - buffer->used += format.begin.used; - } - - if (color1.used) { - memcpy(buffer->string + buffer->used, color1.string, sizeof(f_char_t) * color1.used); - - buffer->used += color1.used; - } - - if (format.end.used) { - memcpy(buffer->string + buffer->used, format.end.string, sizeof(f_char_t) * format.end.used); - - buffer->used += format.end.used; - } - - buffer->string[buffer->used] = 0; - - return F_none; + return private_f_color_save_1(format, color1, buffer); } #endif // _di_f_color_save_1_ @@ -152,44 +130,7 @@ extern "C" { if (!buffer) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - f_status_t status = F_none; - - status = f_string_dynamic_increase_by(format.begin.used + format.medium.used + format.end.used + color1.used + color2.used + 1, buffer); - if (F_status_is_error(status)) return status; - - if (format.begin.used) { - memcpy(buffer->string + buffer->used, format.begin.string, sizeof(f_char_t) * format.begin.used); - - buffer->used += format.begin.used; - } - - if (color1.used) { - memcpy(buffer->string + buffer->used, color1.string, sizeof(f_char_t) * color1.used); - - buffer->used += color1.used; - } - - if (format.medium.used) { - memcpy(buffer->string + buffer->used, format.medium.string, sizeof(f_char_t) * format.medium.used); - - buffer->used += format.medium.used; - } - - if (color2.used) { - memcpy(buffer->string + buffer->used, color2.string, sizeof(f_char_t) * color2.used); - - buffer->used += color2.used; - } - - if (format.end.used) { - memcpy(buffer->string + buffer->used, format.end.string, sizeof(f_char_t) * format.end.used); - - buffer->used += format.end.used; - } - - buffer->string[buffer->used] = 0; - - return F_none; + return private_f_color_save_2(format, color1, color2, buffer); } #endif // _di_f_color_save_2_ @@ -199,45 +140,37 @@ extern "C" { if (!buffer) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - f_status_t status = F_none; - - status = f_string_dynamic_increase_by(format.begin.used + (format.medium.used * 2) + format.end.used + color1.used + color2.used + color3.used + 1, buffer); + f_status_t status = f_string_dynamic_increase_by(format.begin.used + (format.medium.used * 2) + format.end.used + color1.used + color2.used + color3.used + 1, buffer); if (F_status_is_error(status)) return status; - if (format.begin.used) { - memcpy(buffer->string + buffer->used, format.begin.string, sizeof(f_char_t) * format.begin.used); - - buffer->used += format.begin.used; - } - if (color1.used) { memcpy(buffer->string + buffer->used, color1.string, sizeof(f_char_t) * color1.used); buffer->used += color1.used; - } - if (format.medium.used) { - memcpy(buffer->string + buffer->used, format.medium.string, sizeof(f_char_t) * format.medium.used); + if (color2.used) { + if (format.medium.used) { + memcpy(buffer->string + buffer->used, format.medium.string, sizeof(f_char_t) * format.medium.used); - buffer->used += format.medium.used; - } + buffer->used += format.medium.used; + } - if (color2.used) { - memcpy(buffer->string + buffer->used, color2.string, sizeof(f_char_t) * color2.used); + memcpy(buffer->string + buffer->used, color2.string, sizeof(f_char_t) * color2.used); - buffer->used += color2.used; - } + buffer->used += color2.used; - if (format.medium.used) { - memcpy(buffer->string + buffer->used, format.medium.string, sizeof(f_char_t) * format.medium.used); + if (color3.used) { + if (format.medium.used) { + memcpy(buffer->string + buffer->used, format.medium.string, sizeof(f_char_t) * format.medium.used); - buffer->used += format.medium.used; - } + buffer->used += format.medium.used; + } - if (color3.used) { - memcpy(buffer->string + buffer->used, color3.string, sizeof(f_char_t) * color3.used); + memcpy(buffer->string + buffer->used, color3.string, sizeof(f_char_t) * color3.used); - buffer->used += color3.used; + buffer->used += color3.used; + } + } } if (format.end.used) { @@ -258,57 +191,49 @@ extern "C" { if (!buffer) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - f_status_t status = F_none; - - status = f_string_dynamic_increase_by(format.begin.used + (format.medium.used * 3) + format.end.used + color1.used + color2.used + color3.used + color4.used + 1, buffer); + f_status_t status = f_string_dynamic_increase_by(format.begin.used + (format.medium.used * 3) + format.end.used + color1.used + color2.used + color3.used + color4.used + 1, buffer); if (F_status_is_error(status)) return status; - if (format.begin.used) { - memcpy(buffer->string + buffer->used, format.begin.string, sizeof(f_char_t) * format.begin.used); - - buffer->used += format.begin.used; - } - if (color1.used) { memcpy(buffer->string + buffer->used, color1.string, sizeof(f_char_t) * color1.used); buffer->used += color1.used; - } - if (format.medium.used) { - memcpy(buffer->string + buffer->used, format.medium.string, sizeof(f_char_t) * format.medium.used); + if (color2.used) { + if (format.medium.used) { + memcpy(buffer->string + buffer->used, format.medium.string, sizeof(f_char_t) * format.medium.used); - buffer->used += format.medium.used; - } + buffer->used += format.medium.used; + } - if (color2.used) { - memcpy(buffer->string + buffer->used, color2.string, sizeof(f_char_t) * color2.used); + memcpy(buffer->string + buffer->used, color2.string, sizeof(f_char_t) * color2.used); - buffer->used += color2.used; - } + buffer->used += color2.used; - if (format.medium.used) { - memcpy(buffer->string + buffer->used, format.medium.string, sizeof(f_char_t) * format.medium.used); + if (color3.used) { + if (format.medium.used) { + memcpy(buffer->string + buffer->used, format.medium.string, sizeof(f_char_t) * format.medium.used); - buffer->used += format.medium.used; - } + buffer->used += format.medium.used; + } - if (color3.used) { - memcpy(buffer->string + buffer->used, color3.string, sizeof(f_char_t) * color3.used); + memcpy(buffer->string + buffer->used, color3.string, sizeof(f_char_t) * color3.used); - buffer->used += color3.used; - } + buffer->used += color3.used; - if (format.medium.used) { - memcpy(buffer->string + buffer->used, format.medium.string, sizeof(f_char_t) * format.medium.used); + if (color4.used) { + if (format.medium.used) { + memcpy(buffer->string + buffer->used, format.medium.string, sizeof(f_char_t) * format.medium.used); - buffer->used += format.medium.used; - } + buffer->used += format.medium.used; + } - if (color4.used) { - memcpy(buffer->string + buffer->used, color4.string, sizeof(f_char_t) * color4.used); + memcpy(buffer->string + buffer->used, color4.string, sizeof(f_char_t) * color4.used); - buffer->used += color4.used; + buffer->used += color4.used; + } + } + } } if (format.end.used) { @@ -329,9 +254,7 @@ extern "C" { if (!buffer) return F_status_set_error(F_parameter); #endif // _di_level_0_parameter_checking_ - f_status_t status = F_none; - - status = f_string_dynamic_increase_by(format.begin.used + (format.medium.used * 4) + format.end.used + color1.used + color2.used + color3.used + color4.used + color5.used + 1, buffer); + f_status_t status = f_string_dynamic_increase_by(format.begin.used + (format.medium.used * 4) + format.end.used + color1.used + color2.used + color3.used + color4.used + color5.used + 1, buffer); if (F_status_is_error(status)) return status; if (format.begin.used) { @@ -344,54 +267,54 @@ extern "C" { memcpy(buffer->string + buffer->used, color1.string, sizeof(f_char_t) * color1.used); buffer->used += color1.used; - } - if (format.medium.used) { - memcpy(buffer->string + buffer->used, format.medium.string, sizeof(f_char_t) * format.medium.used); + if (color2.used) { + if (format.medium.used) { + memcpy(buffer->string + buffer->used, format.medium.string, sizeof(f_char_t) * format.medium.used); - buffer->used += format.medium.used; - } + buffer->used += format.medium.used; + } - if (color2.used) { - memcpy(buffer->string + buffer->used, color2.string, sizeof(f_char_t) * color2.used); + memcpy(buffer->string + buffer->used, color2.string, sizeof(f_char_t) * color2.used); - buffer->used += color2.used; - } + buffer->used += color2.used; - if (format.medium.used) { - memcpy(buffer->string + buffer->used, format.medium.string, sizeof(f_char_t) * format.medium.used); + if (color3.used) { + if (format.medium.used) { + memcpy(buffer->string + buffer->used, format.medium.string, sizeof(f_char_t) * format.medium.used); - buffer->used += format.medium.used; - } + buffer->used += format.medium.used; + } - if (color3.used) { - memcpy(buffer->string + buffer->used, color3.string, sizeof(f_char_t) * color3.used); + memcpy(buffer->string + buffer->used, color3.string, sizeof(f_char_t) * color3.used); - buffer->used += color3.used; - } + buffer->used += color3.used; - if (format.medium.used) { - memcpy(buffer->string + buffer->used, format.medium.string, sizeof(f_char_t) * format.medium.used); + if (color4.used) { + if (format.medium.used) { + memcpy(buffer->string + buffer->used, format.medium.string, sizeof(f_char_t) * format.medium.used); - buffer->used += format.medium.used; - } + buffer->used += format.medium.used; + } - if (color4.used) { - memcpy(buffer->string + buffer->used, color4.string, sizeof(f_char_t) * color4.used); + memcpy(buffer->string + buffer->used, color4.string, sizeof(f_char_t) * color4.used); - buffer->used += color4.used; - } + buffer->used += color4.used; - if (format.medium.used) { - memcpy(buffer->string + buffer->used, format.medium.string, sizeof(f_char_t) * format.medium.used); + if (color5.used) { + if (format.medium.used) { + memcpy(buffer->string + buffer->used, format.medium.string, sizeof(f_char_t) * format.medium.used); - buffer->used += format.medium.used; - } + buffer->used += format.medium.used; + } - if (color5.used) { - memcpy(buffer->string + buffer->used, color5.string, sizeof(f_char_t) * color5.used); + memcpy(buffer->string + buffer->used, color5.string, sizeof(f_char_t) * color5.used); - buffer->used += color5.used; + buffer->used += color5.used; + } + } + } + } } if (format.end.used) { diff --git a/level_0/f_color/c/color.h b/level_0/f_color/c/color.h index f0b39ae..554f311 100644 --- a/level_0/f_color/c/color.h +++ b/level_0/f_color/c/color.h @@ -50,11 +50,11 @@ extern "C" { * * F_parameter (with error bit) if a parameter is invalid. * - * Errors (with error bit) from: f_color_save_1() - * Errors (with error bit) from: f_color_save_2() + * Errors (with error bit) from: f_string_dynamic_increase_by() + * + * @see memcpy() * - * @see f_color_save_1() - * @see f_color_save_2() + * @see f_string_dynamic_increase_by() */ #ifndef _di_f_color_load_context_ extern f_status_t f_color_load_context(const bool use_light_colors, f_color_context_t * const context); @@ -80,10 +80,10 @@ extern "C" { * * F_parameter (with error bit) if a parameter is invalid. * - * Errors (with error bit) from: f_string_dynamic_append() * Errors (with error bit) from: f_string_dynamic_increase_by() * - * @see f_string_dynamic_append() + * @see memcpy() + * * @see f_string_dynamic_increase_by() */ #ifndef _di_f_color_save_1_ @@ -103,6 +103,7 @@ extern "C" { * A color to assign. * @param color2 * A second color to assign. + * Ignored if color1.used is 0. * @param buffer * The string to save the colors to. * The buffer will become NULL terminated after the appended string length. @@ -112,10 +113,10 @@ extern "C" { * * F_parameter (with error bit) if a parameter is invalid. * - * Errors (with error bit) from: f_string_dynamic_append() * Errors (with error bit) from: f_string_dynamic_increase_by() * - * @see f_string_dynamic_append() + * @see memcpy() + * * @see f_string_dynamic_increase_by() */ #ifndef _di_f_color_save_2_ @@ -135,8 +136,10 @@ extern "C" { * A color to assign. * @param color2 * A second color to assign. + * Ignored if color1.used is 0. * @param color3 * A third color to assign. + * Ignored if color1.used or color2.used is 0. * @param buffer * The string to save the colors to. * The buffer will become NULL terminated after the appended string length. @@ -146,10 +149,10 @@ extern "C" { * * F_parameter (with error bit) if a parameter is invalid. * - * Errors (with error bit) from: f_string_dynamic_append() * Errors (with error bit) from: f_string_dynamic_increase_by() * - * @see f_string_dynamic_append() + * @see memcpy() + * * @see f_string_dynamic_increase_by() */ #ifndef _di_f_color_save_3_ @@ -169,10 +172,13 @@ extern "C" { * A color to assign. * @param color2 * A second color to assign. + * Ignored if color1.used is 0. * @param color3 * A third color to assign. + * Ignored if color1.used or color2.used is 0. * @param color4 * A fourth color to assign. + * Ignored if color1.used, color2.used, or color3.used is 0. * @param buffer * The string to save the colors to. * The buffer will become NULL terminated after the appended string length. @@ -182,10 +188,10 @@ extern "C" { * * F_parameter (with error bit) if a parameter is invalid. * - * Errors (with error bit) from: f_string_dynamic_append() * Errors (with error bit) from: f_string_dynamic_increase_by() * - * @see f_string_dynamic_append() + * @see memcpy() + * * @see f_string_dynamic_increase_by() */ #ifndef _di_f_color_save_4_ @@ -207,12 +213,16 @@ extern "C" { * A color to assign. * @param color2 * A second color to assign. + * Ignored if color1.used is 0. * @param color3 * A third color to assign. + * Ignored if color1.used or color2.used is 0. * @param color4 * A fourth color to assign. + * Ignored if color1.used, color2.used, or color3.used is 0. * @param color5 * A fifth color to assign. + * Ignored if color1.used, color2.used, color3.used, or color4.used is 0. * @param buffer * The string to save the colors to. * The buffer will become NULL terminated after the appended string length. @@ -222,10 +232,10 @@ extern "C" { * * F_parameter (with error bit) if a parameter is invalid. * - * Errors (with error bit) from: f_string_dynamic_append() * Errors (with error bit) from: f_string_dynamic_increase_by() * - * @see f_string_dynamic_append() + * @see memcpy() + * * @see f_string_dynamic_increase_by() */ #ifndef _di_f_color_save_5_ diff --git a/level_0/f_color/c/private-color.c b/level_0/f_color/c/private-color.c new file mode 100644 index 0000000..8dc843a --- /dev/null +++ b/level_0/f_color/c/private-color.c @@ -0,0 +1,82 @@ +#include "color.h" +#include "private-color.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#if !defined(_di_f_color_load_context_) || !defined(_di_f_color_save_1_) + f_status_t private_f_color_save_1(const f_color_format_t format, const f_string_static_t color1, f_string_dynamic_t * const buffer) { + + f_status_t status = f_string_dynamic_increase_by(format.begin.used + format.end.used + color1.used + 1, buffer); + if (F_status_is_error(status)) return status; + + if (format.begin.used) { + memcpy(buffer->string + buffer->used, format.begin.string, sizeof(f_char_t) * format.begin.used); + + buffer->used += format.begin.used; + } + + if (color1.used) { + memcpy(buffer->string + buffer->used, color1.string, sizeof(f_char_t) * color1.used); + + buffer->used += color1.used; + } + + if (format.end.used) { + memcpy(buffer->string + buffer->used, format.end.string, sizeof(f_char_t) * format.end.used); + + buffer->used += format.end.used; + } + + buffer->string[buffer->used] = 0; + + return F_none; + } +#endif // !defined(_di_f_color_load_context_) || !defined(_di_f_color_save_2_) + +#if !defined(_di_f_color_load_context_) || !defined(_di_f_color_save_2_) + f_status_t private_f_color_save_2(const f_color_format_t format, const f_string_static_t color1, const f_string_static_t color2, f_string_dynamic_t * const buffer) { + + f_status_t status = f_string_dynamic_increase_by(format.begin.used + format.medium.used + format.end.used + color1.used + color2.used + 1, buffer); + if (F_status_is_error(status)) return status; + + if (format.begin.used) { + memcpy(buffer->string + buffer->used, format.begin.string, sizeof(f_char_t) * format.begin.used); + + buffer->used += format.begin.used; + } + + if (color1.used) { + memcpy(buffer->string + buffer->used, color1.string, sizeof(f_char_t) * color1.used); + + buffer->used += color1.used; + + if (color2.used) { + if (format.medium.used) { + memcpy(buffer->string + buffer->used, format.medium.string, sizeof(f_char_t) * format.medium.used); + + buffer->used += format.medium.used; + } + + memcpy(buffer->string + buffer->used, color2.string, sizeof(f_char_t) * color2.used); + + buffer->used += color2.used; + } + } + + if (format.end.used) { + memcpy(buffer->string + buffer->used, format.end.string, sizeof(f_char_t) * format.end.used); + + buffer->used += format.end.used; + } + + buffer->string[buffer->used] = 0; + + return F_none; + } +#endif // !defined(_di_f_color_load_context_) || !defined(_di_f_color_save_2_) + +#ifdef __cplusplus +} // extern "C" +#endif diff --git a/level_0/f_color/c/private-color.h b/level_0/f_color/c/private-color.h new file mode 100644 index 0000000..a18da8c --- /dev/null +++ b/level_0/f_color/c/private-color.h @@ -0,0 +1,80 @@ +/** + * FLL - Level 0 + * + * Project: Color + * API Version: 0.6 + * Licenses: lgpl-2.1-or-later + * + * These are provided for internal reduction in redundant code. + * These should not be exposed/used outside of this project. + */ +#ifndef _PRIVATE_F_color_h +#define _PRIVATE_F_color_h + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * Private implementation of f_color_save_1(). + * + * Intended to be shared to each of the different implementation variations. + * + * @param format + * The color format parts. + * @param color1 + * A color to assign. + * @param buffer + * The string to save the colors to. + * The buffer will become NULL terminated after the appended string length. + * + * @return + * F_none on success. + * + * Errors (with error bit) from: f_string_dynamic_increase_by() + * + * @see memcpy() + * + * @see f_string_dynamic_increase_by() + * + * @see f_color_load_context() + * @see f_color_save_1() + */ +#if !defined(_di_f_color_load_context_) || !defined(_di_f_color_save_1_) + extern f_status_t private_f_color_save_1(const f_color_format_t format, const f_string_static_t color1, f_string_dynamic_t * const buffer) F_attribute_visibility_internal_d; +#endif // !defined(_di_f_color_load_context_) || !defined(_di_f_color_save_1_) + +/** + * Private implementation of f_color_save_2(). + * + * Intended to be shared to each of the different implementation variations. + * + * @param format + * The color format parts. + * @param color1 + * A color to assign. + * @param buffer + * The string to save the colors to. + * The buffer will become NULL terminated after the appended string length. + * + * @return + * F_none on success. + * + * Errors (with error bit) from: f_string_dynamic_increase_by() + * + * @see memcpy() + * + * @see f_string_dynamic_increase_by() + * + * @see f_color_load_context() + * @see f_color_save_2() + */ +#if !defined(_di_f_color_load_context_) || !defined(_di_f_color_save_2_) + extern f_status_t private_f_color_save_2(const f_color_format_t format, const f_string_static_t color1, const f_string_static_t color2, f_string_dynamic_t * const buffer) F_attribute_visibility_internal_d; +#endif // !defined(_di_f_color_load_context_) || !defined(_di_f_color_save_2_) + +#ifdef __cplusplus +} // extern "C" +#endif + +#endif // _PRIVATE_F_color_h diff --git a/level_0/f_color/data/build/settings b/level_0/f_color/data/build/settings index c7b0dff..a149d2c 100644 --- a/level_0/f_color/data/build/settings +++ b/level_0/f_color/data/build/settings @@ -20,7 +20,7 @@ build_language c build_libraries -lc build_libraries-individual -lf_memory -lf_string -build_sources_library color.c color/common.c +build_sources_library color.c private-color.c color/common.c build_sources_headers color.h color/common.h -- 1.8.3.1