]> Kevux Git Server - fll/commit
Update: Rewrite f_color functions and use f_string_static_t instead of f_string_t...
authorKevin Day <thekevinday@gmail.com>
Mon, 17 Jan 2022 03:01:44 +0000 (21:01 -0600)
committerKevin Day <thekevinday@gmail.com>
Mon, 17 Jan 2022 03:01:44 +0000 (21:01 -0600)
commit93f66f140f21bea6d8fb617bd44ef3017ca53955
tree09d76a0c202989a7408855106a59b15f0887e63c
parent0d63d8174645d021f64caa73fe03469850b80c7e
Update: Rewrite f_color functions and use f_string_static_t instead of f_string_t for global constant strings.

Switch to using the f_string_static_t so that the size does not have to be constantly tested via an strnlen() or similar call.
The f_string_static_t by default uses 64-bit types for size and used so there may be a performance hit due to this over the normal 32-bit numbers in strnlen().

Originally macros were used to reduce code repition.
This was done long before I decided to make f_string an exception that can be depended on by all level 0 projects.
The dynamic string functions can now be used, significantly simplifying the code.
The macros can be replaced with functions 1 through 5 to allow for only passing the required arguments.
This should reduce the cost of the function call by having fewer arguments when not necessary to have them.

The documentation comments are now present when they were not before.

Change the order of the function parameters to be more consistent with the latest practices.

Update the unit tests.
22 files changed:
level_0/f_color/c/color-common.c
level_0/f_color/c/color-common.h
level_0/f_color/c/color.c
level_0/f_color/c/color.h
level_0/f_color/data/build/settings-tests
level_0/f_color/tests/c/test-color-load_context.c
level_0/f_color/tests/c/test-color-save.c [deleted file]
level_0/f_color/tests/c/test-color-save.h [deleted file]
level_0/f_color/tests/c/test-color-save_1.c [new file with mode: 0644]
level_0/f_color/tests/c/test-color-save_1.h [new file with mode: 0644]
level_0/f_color/tests/c/test-color-save_2.c [new file with mode: 0644]
level_0/f_color/tests/c/test-color-save_2.h [new file with mode: 0644]
level_0/f_color/tests/c/test-color-save_3.c [new file with mode: 0644]
level_0/f_color/tests/c/test-color-save_3.h [new file with mode: 0644]
level_0/f_color/tests/c/test-color-save_4.c [new file with mode: 0644]
level_0/f_color/tests/c/test-color-save_4.h [new file with mode: 0644]
level_0/f_color/tests/c/test-color-save_5.c [new file with mode: 0644]
level_0/f_color/tests/c/test-color-save_5.h [new file with mode: 0644]
level_0/f_color/tests/c/test-color.c
level_0/f_color/tests/c/test-color.h
level_1/fl_print/c/private-print.c
level_2/fll_program/c/program.c