From: Kevin Day Date: Thu, 11 Jul 2024 05:23:00 +0000 (-0500) Subject: Update: Documentation and specifications and add additional status codes. X-Git-Url: https://git.kevux.org/?a=commitdiff_plain;h=d55edd4c41f9db159fe75a35ddbd9d5b450b1312;p=fll Update: Documentation and specifications and add additional status codes. I discovered that some of the documentation and specification files are out of date and are now updated. Add additional status codes regarding locks. --- diff --git a/build/documents/readme.bootstrap.txt b/build/documents/readme.bootstrap.txt index d437c7d..fe43da8 100644 --- a/build/documents/readme.bootstrap.txt +++ b/build/documents/readme.bootstrap.txt @@ -1,6 +1,7 @@ # fss-0002 iki-0000 # # license: cc-by-sa-4.0 +# version 2024/07/10 # # This file (assumed to be named readme.bootstrap.txt) can be more easily read using the following iki_read commands: # iki_read readme.bootstrap.txt +Q -w -rr FLL FLL FSS FSS -WW character "'" "'" code '"' '"' @@ -40,6 +41,7 @@ Bootstrap Readme Documentation: code:"./install.sh" Manual Install Example\: + code:"cp -vR build/documentation/* /usr/share/" code:"cp -vR build/includes/* /usr/include/" code:"cp -vR build/libaries/shared/* /usr/lib/" code:"cp -vR build/programs/shared/* /usr/bin/" diff --git a/build/documents/readme.build.txt b/build/documents/readme.build.txt index a58d596..a8dc273 100644 --- a/build/documents/readme.build.txt +++ b/build/documents/readme.build.txt @@ -1,6 +1,7 @@ # fss-0002 iki-0000 # # license: cc-by-sa-4.0 +# version 2024/07/10 # # This file (assumed to be named readme.build.txt) can be more easily read using the following iki_read commands: # iki_read readme.build.txt +Q -w -rr FLL FLL FSS FSS -WW character "'" "'" code '"' '"' @@ -39,6 +40,16 @@ Build Readme Documentation: Build Example, Explicitly Using code:"make"\: code:"fake make" + Install Example\: + code:"./install.sh" + + Manual Install Example\: + code:"cp -vR build/documentation/* /usr/share/" + code:"cp -vR build/includes/* /usr/include/" + code:"cp -vR build/libaries/shared/* /usr/lib/" + code:"cp -vR build/programs/shared/* /usr/bin/" + code:"cp -vR build/settings/* /etc/" + Build Tree Structure Example (using the FLL:"Featureless Linux Library" code:"status_code-0.7.0" project)\: block:" build/ @@ -104,6 +115,6 @@ Build Readme Documentation: └── sources_settings-settings.main.built " - See: FLL:"Featureless Linux Library" code:"fake" project documents for further details on how to use the bold:"Featureless Make" system. - See: FLL:"Featureless Linux Library" code:"fake" project specifications for how to configure the build FSS:"Featureless Settings Specification" files and make FSS:"Featureless Settings Specification" files. - See: file:"readme.bootstrap.txt" for notes on installing. + See: FLL:"Featureless Linux Library" code:"fake" project documents and specifications for further details on how to use the bold:"Featureless Make" system. + See: FLL:"Featureless Linux Library" project documentation and specifications for how to configure the bold:"Featureless Make" FSS:"Featureless Settings Specification" files. + See: file:"readme.bootstrap.txt" for notes on building and installing when bootstrapping the library. diff --git a/build/documents/readme.txt b/build/documents/readme.txt index 8d26cdc..8d05bf2 100644 --- a/build/documents/readme.txt +++ b/build/documents/readme.txt @@ -1,6 +1,7 @@ # fss-0002 iki-0000 # # license: cc-by-sa-4.0 +# version 2024/07/10 # # This file (assumed to be named readme.build.txt) can be more easily read using the following iki_read commands: # iki_read readme.txt +Q -w -rrrr API API FLL FLL FSS FSS KISS KISS -WW character "'" "'" code '"' '"' @@ -52,11 +53,8 @@ Readme Documentation: To facilitate building of this project, two different build systems are provided\: - The bootstrap, via the file:"bootstrap.sh" script. - - The bold:"Featureless Make", which is a level_3 project provided by FLL:"Featureless Linux Library". + - The bold:"Featureless Make", which is a level 3 project provided by FLL:"Featureless Linux Library". - An example bootstrap script is provided (file:"build/scripts/bootstrap-example.sh") is provided for to show how to build the FLL:"Featureless Linux Library" directly from source. - Use it as an example or explicitly call it (such as: code:"bash build/scripts/bootstrap-example.sh monolithic 0.7.0"). - - See: file:"dependencies" for specific dependencies of this project. - See: file:"readme.bootstrap.txt" for bootstrap compiling (or just regular compiling) any part of the FLL:"Featureless Linux Library" and notes on installing. - See: file:"readme.build.txt" for bold:"Featureless Make" compiling and notes on installing. + See: file:"data/build/dependencies" for specific dependencies of this project. + See: file:"documents/readme.bootstrap.txt" for bootstrap compiling (or just regular compiling) any part of the FLL:"Featureless Linux Library" and notes on installing. + See: file:"documents/readme.build.txt" for bold:"Featureless Make" compiling and notes on installing. diff --git a/documents/readme.txt b/documents/readme.txt index 3267ba7..64bc0f0 100644 --- a/documents/readme.txt +++ b/documents/readme.txt @@ -1,7 +1,7 @@ # fss-0002 iki-0000 # # license: cc-by-sa-4.0 -# version 2024/07/02 +# version 2024/07/10 # # This file (assumed to be named readme.txt) can be more easily read using the following iki_read commands: # iki_read readme.txt +Q -w -r FLL FLL -WW character "'" "'" code '"' '"' @@ -29,11 +29,14 @@ Installation: This install script is intended to be used only by the FLL:"Featureless Linux Library". Future versions of the FLL:"Featureless Linux Library" may include an install equivalent to the file:"fake" program (and there may possibly be a package generation equivalent as well). - The management scripts are as follows\: + The management scripts are as found in the directory:"build/scripts/" of the source repository as follows\: - file:"bootstrap.sh". - file:"bootstrap-example.sh". - file:"install.sh". - file:"package.sh". + - file:"test.sh". + + Some of these files are also copied over into individual packaged release files. The file:"bootstrap.sh" script is intended to take the FLL:"Featureless Linux Library" source code and compile it into appropriate binaries on the system, particularly when the file:"fake" program is not installed. This is analogous to the bold:"GNU Make" program and the FLL:"Featureless Linux Library" bold:"Featureless Make" program. @@ -47,6 +50,10 @@ Installation: Of particular note is that there are multiple ways to package the FLL:"Featureless Linux Library", such as each package as its own individual project, each package by level, or each package as a monolithic library. This script also provides management functions for ensuring the dependencies and configuration settings are accurate. + The file:"test.sh" script is intended to be a unit test runner for the base source file. + Individual packages projects may have unit tests run via their appropriate unit test bold:"Fakefile". + If an individual packaged project has unit tests, then those tests may be operated using the bold:"Fakefile" file:"data/build/testfile". + Other Readmes: Repository providers like bold:"Github" and bold:"Gitlab" utilize file:"README.md", file:"LICENSE", and other special files at the root project level. This practice is not supported by the FLL:"Featureless Linux Library" project structure and is not normally used. diff --git a/documents/style_guide.txt b/documents/style_guide.txt index d15d509..18d34a0 100644 --- a/documents/style_guide.txt +++ b/documents/style_guide.txt @@ -195,14 +195,14 @@ Global String Constant Names: - code:"f_file_open_mode_truncate_s": as a variable, such as: code:"extern const f_string_t f_file_open_mode_truncate_s;". Global Character Constant Names: - These C-language specific global names are identical to the strong:"Global String Constant Names" except that they represent a single 1-byte character. + These C-language specific global names are identical to the bold:"Global String Constant Names" except that they represent a single 1-byte character. These are of the form code:"(A)_(b)_c" or code:"(a)_(b)_c". The trailing code:"_c" designates that this is a 1-byte character. Global Data Constant Names: - These C-language specific global names are identical to the strong:"Global String Constant Names" except that they represent any other type of global data. + These C-language specific global names are identical to the bold:"Global String Constant Names" except that they represent any other type of global data. These are of the form code:"(A)_(b)_g" or code:"(a)_(b)_g". diff --git a/level_0/f_status/c/status.h b/level_0/f_status/c/status.h index e808384..14debba 100644 --- a/level_0/f_status/c/status.h +++ b/level_0/f_status/c/status.h @@ -361,7 +361,13 @@ extern "C" { F_local, F_local_not, F_lock, + F_lock_mutex, + F_lock_mutex_not, F_lock_not, + F_lock_read, + F_lock_read_not, + F_lock_write, + F_lock_write_not, F_loop, F_loop_not, F_maybe, diff --git a/level_0/f_status_string/c/status_string.c b/level_0/f_status_string/c/status_string.c index 2097bc6..97c3d7a 100644 --- a/level_0/f_status_string/c/status_string.c +++ b/level_0/f_status_string/c/status_string.c @@ -229,7 +229,13 @@ extern "C" { const f_string_static_t f_status_local_s = macro_f_string_static_t_initialize_1(F_status_local_s, 0, F_status_local_s_length); const f_string_static_t f_status_local_not_s = macro_f_string_static_t_initialize_1(F_status_local_not_s, 0, F_status_local_not_s_length); const f_string_static_t f_status_lock_s = macro_f_string_static_t_initialize_1(F_status_lock_s, 0, F_status_lock_s_length); + const f_string_static_t f_status_lock_mutex_s = macro_f_string_static_t_initialize_1(F_status_lock_mutex_s, 0, F_status_lock_mutex_s_length); + const f_string_static_t f_status_lock_mutex_not_s = macro_f_string_static_t_initialize_1(F_status_lock_mutex_not_s, 0, F_status_lock_mutex_not_s_length); const f_string_static_t f_status_lock_not_s = macro_f_string_static_t_initialize_1(F_status_lock_not_s, 0, F_status_lock_not_s_length); + const f_string_static_t f_status_lock_read_s = macro_f_string_static_t_initialize_1(F_status_lock_read_s, 0, F_status_lock_read_s_length); + const f_string_static_t f_status_lock_read_not_s = macro_f_string_static_t_initialize_1(F_status_lock_read_not_s, 0, F_status_lock_read_not_s_length); + const f_string_static_t f_status_lock_write_s = macro_f_string_static_t_initialize_1(F_status_lock_write_s, 0, F_status_lock_write_s_length); + const f_string_static_t f_status_lock_write_not_s = macro_f_string_static_t_initialize_1(F_status_lock_write_not_s, 0, F_status_lock_write_not_s_length); const f_string_static_t f_status_loop_s = macro_f_string_static_t_initialize_1(F_status_loop_s, 0, F_status_loop_s_length); const f_string_static_t f_status_loop_not_s = macro_f_string_static_t_initialize_1(F_status_loop_not_s, 0, F_status_loop_not_s_length); const f_string_static_t f_status_maybe_s = macro_f_string_static_t_initialize_1(F_status_maybe_s, 0, F_status_maybe_s_length); @@ -1806,11 +1812,41 @@ extern "C" { break; + case F_lock_mutex: + *name = f_status_lock_mutex_s; + + break; + + case F_lock_mutex_not: + *name = f_status_lock_mutex_not_s; + + break; + case F_lock_not: *name = f_status_lock_not_s; break; + case F_lock_read: + *name = f_status_lock_read_s; + + break; + + case F_lock_read_not: + *name = f_status_lock_read_not_s; + + break; + + case F_lock_write: + *name = f_status_lock_write_s; + + break; + + case F_lock_write_not: + *name = f_status_lock_write_not_s; + + break; + case F_loop: *name = f_status_loop_s; diff --git a/level_0/f_status_string/c/status_string.h b/level_0/f_status_string/c/status_string.h index b102c6e..39aa28b 100644 --- a/level_0/f_status_string/c/status_string.h +++ b/level_0/f_status_string/c/status_string.h @@ -389,7 +389,13 @@ extern "C" { #define F_status_local_s "F_local" #define F_status_local_not_s "F_local_not" #define F_status_lock_s "F_lock" + #define F_status_lock_mutex_s "F_lock_mutex" + #define F_status_lock_mutex_not_s "F_lock_mutex_not" #define F_status_lock_not_s "F_lock_not" + #define F_status_lock_read_s "F_lock_read" + #define F_status_lock_read_not_s "F_lock_read_not" + #define F_status_lock_write_s "F_lock_write" + #define F_status_lock_write_not_s "F_lock_write_not" #define F_status_loop_s "F_loop" #define F_status_loop_not_s "F_loop_not" #define F_status_maybe_s "F_maybe" @@ -723,7 +729,13 @@ extern "C" { #define F_status_local_s_length 7 #define F_status_local_not_s_length 11 #define F_status_lock_s_length 6 + #define F_status_lock_mutex_s_length 12 + #define F_status_lock_mutex_not_s_length 16 #define F_status_lock_not_s_length 10 + #define F_status_lock_read_s_length 11 + #define F_status_lock_read_not_s_length 15 + #define F_status_lock_write_s_length 12 + #define F_status_lock_write_not_s_length 16 #define F_status_loop_s_length 6 #define F_status_loop_not_s_length 10 #define F_status_maybe_s_length 7 @@ -1059,7 +1071,13 @@ extern "C" { extern const f_string_static_t f_status_local_s; extern const f_string_static_t f_status_local_not_s; extern const f_string_static_t f_status_lock_s; + extern const f_string_static_t f_status_lock_mutex_s; + extern const f_string_static_t f_status_lock_mutex_not_s; extern const f_string_static_t f_status_lock_not_s; + extern const f_string_static_t f_status_lock_read_s; + extern const f_string_static_t f_status_lock_read_not_s; + extern const f_string_static_t f_status_lock_write_s; + extern const f_string_static_t f_status_lock_write_not_s; extern const f_string_static_t f_status_loop_s; extern const f_string_static_t f_status_loop_not_s; extern const f_string_static_t f_status_maybe_s; diff --git a/level_0/f_status_string/tests/unit/c/test-status_string-to.c b/level_0/f_status_string/tests/unit/c/test-status_string-to.c index 3bbba08..5a1ff46 100644 --- a/level_0/f_status_string/tests/unit/c/test-status_string-to.c +++ b/level_0/f_status_string/tests/unit/c/test-status_string-to.c @@ -255,7 +255,13 @@ void test__f_status_string_to__works(void **state) { F_local, F_local_not, F_lock, + F_lock_mutex, + F_lock_mutex_not, F_lock_not, + F_lock_read, + F_lock_read_not, + F_lock_write, + F_lock_write_not, F_loop, F_loop_not, F_maybe, @@ -894,7 +900,13 @@ void test__f_status_string_to__works(void **state) { f_status_local_s, f_status_local_not_s, f_status_lock_s, + f_status_lock_mutex_s, + f_status_lock_mutex_not_s, f_status_lock_not_s, + f_status_lock_read_s, + f_status_lock_read_not_s, + f_status_lock_write_s, + f_status_lock_write_not_s, f_status_loop_s, f_status_loop_not_s, f_status_maybe_s, @@ -1307,7 +1319,7 @@ void test__f_status_string_to__works(void **state) { f_status_status_code_last_s, }; - for (uint16_t i = 0; i < 636; ++i) { + for (uint16_t i = 0; i < 642; ++i) { f_string_static_t result = f_string_static_t_initialize; diff --git a/level_1/fl_status_string/c/status_string.c b/level_1/fl_status_string/c/status_string.c index c8f984a..c5dfdf4 100644 --- a/level_1/fl_status_string/c/status_string.c +++ b/level_1/fl_status_string/c/status_string.c @@ -1371,12 +1371,48 @@ extern "C" { return F_okay; } + if (f_compare_dynamic(name, f_status_lock_mutex_s) == F_equal_to) { + *code = F_lock_mutex; + + return F_okay; + } + + if (f_compare_dynamic(name, f_status_lock_mutex_not_s) == F_equal_to) { + *code = F_lock_mutex_not; + + return F_okay; + } + if (f_compare_dynamic(name, f_status_lock_not_s) == F_equal_to) { *code = F_lock_not; return F_okay; } + if (f_compare_dynamic(name, f_status_lock_read_s) == F_equal_to) { + *code = F_lock_read; + + return F_okay; + } + + if (f_compare_dynamic(name, f_status_lock_read_not_s) == F_equal_to) { + *code = F_lock_read_not; + + return F_okay; + } + + if (f_compare_dynamic(name, f_status_lock_write_s) == F_equal_to) { + *code = F_lock_write; + + return F_okay; + } + + if (f_compare_dynamic(name, f_status_lock_write_not_s) == F_equal_to) { + *code = F_lock_write_not; + + return F_okay; + } + if (f_compare_dynamic(name, f_status_loop_s) == F_equal_to) { *code = F_loop; diff --git a/level_1/fl_status_string/tests/unit/c/test-status_string-from.c b/level_1/fl_status_string/tests/unit/c/test-status_string-from.c index 20d3cbc..d8b0ff0 100644 --- a/level_1/fl_status_string/tests/unit/c/test-status_string-from.c +++ b/level_1/fl_status_string/tests/unit/c/test-status_string-from.c @@ -271,7 +271,13 @@ void test__fl_status_string_from__works(void **state) { F_local, F_local_not, F_lock, + F_lock_mutex, + F_lock_mutex_not, F_lock_not, + F_lock_read, + F_lock_read_not, + F_lock_write, + F_lock_write_not, F_loop, F_loop_not, F_maybe, @@ -910,7 +916,13 @@ void test__fl_status_string_from__works(void **state) { f_status_local_s, f_status_local_not_s, f_status_lock_s, + f_status_lock_mutex_s, + f_status_lock_mutex_not_s, f_status_lock_not_s, + f_status_lock_read_s, + f_status_lock_read_not_s, + f_status_lock_write_s, + f_status_lock_write_not_s, f_status_loop_s, f_status_loop_not_s, f_status_maybe_s, @@ -1323,7 +1335,7 @@ void test__fl_status_string_from__works(void **state) { f_status_status_code_last_s, }; - for (uint16_t i = 0; i < 635; ++i) { + for (uint16_t i = 0; i < 642; ++i) { f_status_t result = F_okay; diff --git a/level_2/fll_error/c/error.c b/level_2/fll_error/c/error.c index 6443363..9a503e1 100644 --- a/level_2/fll_error/c/error.c +++ b/level_2/fll_error/c/error.c @@ -241,7 +241,7 @@ extern "C" { fl_print_format("%[%QUnable to %Q %Q '%]", print->to, print->context, print->prefix, operation, type_name, print->context); fl_print_format(f_string_format_Q_single_s.string, print->to, print->notable, name, print->notable); - fl_print_format("%[', found.%]%r", print->to, print->context, print->context, f_string_eol_s); + fl_print_format("%[', found existing %Q.%]%r", print->to, print->context, type_name, print->context, f_string_eol_s); funlockfile(print->to.stream); } diff --git a/specifications/iki.txt b/specifications/iki.txt index c496915..92fe7a9 100644 --- a/specifications/iki.txt +++ b/specifications/iki.txt @@ -1,7 +1,7 @@ # fss-0002 iki-0000 # # license open-standard-license-1.0-or-later -# version 2024/06/11 +# version 2024/07/10 # # This file (assumed to be named iki.txt) can be more easily read using the following iki_read commands: # iki_read iki.txt +Q -w -WWW character "'" "'" code '"' '"' italic '"' '"' @@ -69,7 +69,7 @@ IKI Specifications: The following italic\:"is escaped to not be treated as IKI data". - The conditionally optional open and close brackets allow for putting a variable directly next to another word character like: [context]\:"strong"this[context]\:"strong".' + The conditionally optional open and close brackets allow for putting a variable directly next to another word character like: [context]\:"bold"this[context]\:"bold".' Objects (also called vocabulary or variable name) would be\: 1) italic @@ -86,8 +86,8 @@ IKI Specifications: 3.1) Featureless Settings Specification 4.1) const char *string = "My \"quoted\" C string."; 5.1) is escaped to not be treated as IKI data - 6.1) strong - 7.1) strong + 6.1) bold + 7.1) bold The following are core specifications (each with a common name associated with the specification number)\: - fss-0000: Unrestricted