Kevin Day [Sat, 17 Dec 2022 00:15:47 +0000 (18:15 -0600)]
Bugfix: The "-mode" functionality is incomplete and incorrect in the bootstrap.sh script.
The bootstrap_load_settings_has() method is removed for being incorrect.
Add missing Objects, such as build_indexer, build_indexer_arguments, build_name, search_exclusive, and search_static, to the "has-" detection data array.
Add additional detection data array for the "-mode" variants of the "has-" data array keys.
Stop checking if Content is an empty string when doing an Object existence check.
Just check to see if the Object exist, with or without Content.
Override the parameters when a "-mode" is provided for single-value parameters, even if the Content does not exist.
This should properly fail for when the Object is overridden with a mode that has no Content and is required.
For example, take the following:
build_compiler gcc
build_compiler-clang
In that above case clang is a mode that is overriding but has no Content.
The build_compiler is required.
This should fail because clang mode replaces the single-valued build_compiler with no Content.
This is a proper failure.
Kevin Day [Fri, 16 Dec 2022 02:17:44 +0000 (20:17 -0600)]
Update: Documentation and specifications.
All of the documentation and specifications should now be IKI based.
I have finally decided on how I want abbreviations handled.
This removes the "abbreviation-" and "abbreviation:" from use.
The new behavior has the abbreviation followed by the expansion, such as FLL:"Featureless Linux Library".
have the block IKI structure identical in pattern to the script IKI structure.
Use "italic" instead of "emphasis" for such IKI vocabulary.
Kevin Day [Fri, 16 Dec 2022 00:33:14 +0000 (18:33 -0600)]
Cleanup: Bring a copy of time.txt from Controller to the core project.
New functionality needs to be added to the package.sh script to conditionally add documentation and specifications to any given package.
Once this is done, then the now redundant time.txt can be removed from the Controller and possibly Control projects.
There also needs to be a formally specification file for time.txt and not just documentation.
Kevin Day [Thu, 15 Dec 2022 00:14:47 +0000 (18:14 -0600)]
Bugfix: The IKI variables that expand reserved words should expand into multiple parameters.
Reserved words, such as the ones regarding the --mode parameter, have multiple values then these should themselves expand into multiple values.
Wrapping quotes can be added to prevent this behavior.
There may be previous issues that intentionally added this (and then possibly as a bugfix).
The previous behavior of expanding multi-valued reserved words into a single parameter value when not using quotes is now considered a bug.
Kevin Day [Wed, 14 Dec 2022 05:25:46 +0000 (23:25 -0600)]
Update: Slight changes to design around the build settings arguments.
Improve the argument handling when the fakefile contains a build settings with arguments.
This is done in observance of a bug where passed modes are combined into a single parameter when modes are passed via an IKI replacement.
A follow up bugfix that may involve some refactoring or functionality reinterpretation is needed.
This uses an explicit array when needed rather than an inexplicit pointer.
This repeats the parsing when printing the output so that information output is not misleading.
Kevin Day [Mon, 12 Dec 2022 00:40:30 +0000 (18:40 -0600)]
Feature: Add 'import' Object to fakefile and settings specifications.
This is important for building complex project structures and reducing the code redundancy.
To keep the logic and design simple, recursion is not allowed.
One can now create a base settings file that is imported by other settings files.
The same is true for fakefile files.
Kevin Day [Sat, 10 Dec 2022 16:28:24 +0000 (10:28 -0600)]
Security: Invalid write in FSS functions and ensure a reset used length on error.
The command that triggers this is "fss_basic_write -oc hi there".
An invalid write is happening due to not always performing the array size increase operations.
Update all FSS write functions with more thorough checks.
This problem is being obfuscated by the lossy allocation.
When errors happen the destination->used needs to be consistently reset to the original value on return.
Use the lossy allocation as well for allocation shwere the increase by is a raw digit.
In these specific cases use state.step_small rather than state.step_large.
Rename used_start to destination_used for improved consistency.
Kevin Day [Fri, 9 Dec 2022 03:51:03 +0000 (21:51 -0600)]
Bugfix: Some of the level checking defines have an "s" that should not be there.
Fix incorrect _di_level_0_parameters_checking_, replacing it with _di_level_0_parameter_checking_.
Fix incorrect _di_level_2_parameters_checking_, replacing it with _di_level_2_parameter_checking_.
In the second case the line 0000000000000001 should not print the string '| ∩ |'.
This is happening because the character is not being properly reset in the situation where the overflow happens at the end of input.
With this change the results should now be:
# clear ; echo -n "xa" | byte_dump -wt 2 && echo -n "∩" | byte_dump -wt 2 && echo -n "∩xa" | byte_dump -wt 2
Piped Byte Dump: (in Hexidecimal) 0000000000000000 78 61 | x a |
Perform a trivial cleanup/optimization where inverse of bytes is being checked for.
This is pointless when there is an else block.
Reverse the order and remove the "not" operator.
Kevin Day [Fri, 25 Nov 2022 01:11:29 +0000 (19:11 -0600)]
Update: Fix and improve FSS unit test regarding zero-width.
Recent changes to the Unicode functions regarding zero-width improved or changed how what is designated as a zero-width character.
The test is failing due to this change.
Update the test to treat the tested character as zero-width.
Add an additional test condition to test the stop range.
Kevin Day [Wed, 23 Nov 2022 02:46:16 +0000 (20:46 -0600)]
Regression: The f_console_environment_process() is accidentally set to private.
The commit 05c24138c0ad8f15a557274f21956fed206fec23 accidentally set the public function to private.
There are private functions that were set to private here but I somehow added F_attribute_visibility_internal_d to a public function.
Kevin Day [Wed, 23 Nov 2022 02:03:31 +0000 (20:03 -0600)]
Regression: Improper execution when no arguments and no pipe are passed to fake.
At some point in time the default for executing without a "clean", "make", or "build" stopped working.
This probably happened when I fixed the empty pipe bug.
Kevin Day [Wed, 23 Nov 2022 01:43:16 +0000 (19:43 -0600)]
Security: Invalid access when calling fake without 'make' or 'build'.
This is caused by the F_data_not return result not being processed in some of the fl_fss functions.
Additional changes:
- Make the return status constant.
- The status is being returned regardless in some cases so remove the effectively redundant lines of code.
- Combined the additional if condition blocks together.
Kevin Day [Tue, 22 Nov 2022 03:14:44 +0000 (21:14 -0600)]
Update: All projects should have fakefiles.
This is an oversight and neither a bug nor a feature.
The FLL is designed to be built using the build settings.
The flagship program fake, should still be directly supported and fakefiles should be available.
Most of these fakefiles just trigger the build settings.
Kevin Day [Sat, 19 Nov 2022 23:42:24 +0000 (17:42 -0600)]
Bugfix: The level_0 console should use private functions.
The level_0 f_console_identify function should not be directly called by another function in this project.
Create a private function and call that function.
This is the standard practice for this project
This improves hackability.
Kevin Day [Sun, 6 Nov 2022 22:03:36 +0000 (16:03 -0600)]
Feature: Add support for additional dependencies and settings files in level_3.
The package.sh build system helper script now supports additional dependencies and settings files.
This allows for special build modes, such as how the controller program has support for "controller" and "init" programs.
Kevin Day [Sat, 5 Nov 2022 01:24:38 +0000 (20:24 -0500)]
Bugfix: Incomplete UTF-8 zero-width detection, particularly for combining characters.
The zero-width calculations should be and are not including zero-width and most control characters.
The combining characters and most of the control characters are now considered zero-width.
Kevin Day [Sat, 29 Oct 2022 03:57:02 +0000 (22:57 -0500)]
Update: Slight improvement in UTF unassigned detection and add or correct some ranges.
Change "character" to "sequence" to be consistent with the rest of the private functions.
Add several additional checks to ideally reduce the number of checks.
This is only a cursory pass and not much effort is put into fine-tuned optimization.
There is huge room for improvement.
I discovered some ranges that needed to be added as unassined and added them.
Include the invalid ranges as unassigned.
Kevin Day [Sat, 29 Oct 2022 01:49:15 +0000 (20:49 -0500)]
Bugfix: Two 0's are printed when --total is used and there are no matching Objects.
There is an optimization used that immediately prints 0 and returns if there is no matching data on load.
The problem is that the caller isn't told that it should stop processing because F_none is returned.
Remove the optimization rather than implementing a custom return code and changing the code to handle this.
The normal code is still run and still correctly determines that there are 0 Objects.
Kevin Day [Fri, 28 Oct 2022 04:54:58 +0000 (23:54 -0500)]
Feature: Add support for ZSH in addition to BASH.
Some systems have started provided ZSH for license reasons (they don't want to agree to the license of BASH).
I experimented with and found that I can make my scripts ZSH friendly.
There is no way to "detect" that ZSH is being used as far as I can tell so I defined a new environment variable SHELL_ENGINE.
Set this to "zsh" and then run the script via the "zsh" program.
Enable emulation mode of "ksh" when using ZSH to be BASH friendly.
The ZSH doesn't support "${!i}" substitution.
I found a separate way to do this in ZSH via "${(P)i}".
It is a shame that they cannot simply replace "(P)" with "!".
There are several cases where "bash" is being directly called.
Replace this with a "shell_command" environment variable.
In some cases, directly calling "bash" may cause a loss of needed environment settings and so "bash" is not directly called when using BASH but "zsh" is still directly called when using ZSH.
The ZSH does not automatically handle arrays as well as BASH does.
Explicitly define arra with "-A" and explicitly set the initial value to "()".
Doing this may introduce problems with older versions of BASH that do not support "-A".
The ZSH cannot expand parameters as intelligently as BASH.
Parameters followed by certain characters, such as a bracket, that are not encases in braces result in ZSH errors.
Mass change many of the parameter uses to always be in braces.
Not all cases are changed and there may be some areas where I intended to make such a change and missed.
The ZSH appears not to handle output redirection from shell functions.
This behavior is used heavily in the project for building and using the variables array.
Change the behavior (at the cost of making the code a bit ugglier and harder to read in some cases) to assign a variable defined at a higher scope (such as "key").
The ZSH also appears to utilize "path" as a variable for "PATH" or is case insensitive when it comes to environment variables and shell variables.
This is a serious problem.
The variable "path" is defined so rename that to "path_" to avoid conflicts (and I'll just have to suffer cringing every time I see that trailing underscore).
I stumbled onto some bugs as well while making changes.
The necessary changes change the code that is buggy so I am allowing it to be in the same commit.
One of the bugs is a typo where errror is used rather than error.
Another bug is where the c_warning is used and then c_error is used within the same string (should be consistently using c_warning in this case).
It turns out "has-build_compiler" is not defined but conveniently a space for it is missing in bootstrap.sh (must be an accidental delete given the coincidence).
Some of the "mode" properties are incorrectly being assigned the non-mode value when a mode value exists in bootstrap.sh.
Kevin Day [Fri, 28 Oct 2022 01:07:00 +0000 (20:07 -0500)]
Cleanup: Rename and relocate private is_unassigned files.
The private-is_unassigned.c and private-is_unassigned.h are in incorrect locations and have incorrect names.
Relocate and rename to make these private files consistent with other private files.
Kevin Day [Fri, 28 Oct 2022 00:53:39 +0000 (19:53 -0500)]
Update: Support Unicode 15.0.
I couldn't easily find what Unicode version I am trying to suppot so I added a unicode.txt document.
The initial work was done for Unicode 12.1 and later switched to 14.0.
I was still in the initial stages of learning Unicode and so I expect there to be notable incompleteness or incorrectness.
With the release of Unicode 15.0 I am able to determine a distinct set of changes and I have applied the changes.
Add a private_inline_f_utf_character_handle_digit_offset() inline function to simplify some of the redundant code.
After some consideration I decided that this "bug" would still be useful in certain cases.
The old behavior of "--substitute" where the "--wrap" is ignored is re-created within the new parameter "--reassign".
This is a grey area when it comes to a "bug" and a "feature".
The behavior that is considered a "bug" turned out to be useful and as the behavior is already present it is carried on.
Kevin Day [Sun, 23 Oct 2022 04:03:11 +0000 (23:03 -0500)]
Bugfix: The iki_read is should apply the "--wrap" when using "--substitute".
Given some iki text such as:
This is some random:"iki" random:"text".
Run the command:
# echo 'This is some random:"iki" random:"text".' | iki_read -W random "___" "______" -L -s random text PIZZA -r random tomato
The result that I get is:
random:"___tomato______"
random:"PIZZA"
I think the following is better:
random:"___tomato______"
random:"___PIZZA______"
This makes more sense to me rather than having substitute not include wrap.
This is a behavioral change that I thought and perhaps still think can be considered a bug.
This "bug" is by design as per the documentation but in retrospect I think this is a mistake in the design and should be considered a bug.
I forgot to update the new "stand alone" build settings with the new private source file.
The tests now use this "stand alone" build for building fake and using that fake to perform the tests.
Fix a problem with existing code that has incorrect macros.
Kevin Day [Thu, 1 Sep 2022 02:38:01 +0000 (21:38 -0500)]
Bugfix: private_f_memory_structure_resize() is not returning the error status codes.
The private_f_memory_structure_adjust() function is returning error status code returned by private_f_memory_adjust().
The private_f_memory_structure_resize() is now changed to do the same thing as private_f_memory_structure_adjust() but with tbe status code returned by private_f_memory_resize().
Kevin Day [Tue, 23 Aug 2022 01:10:36 +0000 (20:10 -0500)]
Bugfix: The fll_program_standard_signal_received() needs a private implementation.
The function fll_program_standard_signal_received() is being called by fll_program_standard_signal_state().
This is not supposed to be allowed and breaks the functional-modular design.
Kevin Day [Mon, 22 Aug 2022 23:26:43 +0000 (18:26 -0500)]
The verify option in utf8 returns F_false but the program doesn't return 1.
When the --verify parameter is passed the result is not properly returned.
When F_false is returned, the the verify failed so return 1.
The F_false should not be returned in any other cases.
Kevin Day [Mon, 8 Aug 2022 04:04:26 +0000 (23:04 -0500)]
Update: The utf8 program should be using the stream read functions.
The file is opened using the stream open functions.
It is silly and inconsistent to use the non stream functions to read from a file opened via a stream.
Kevin Day [Mon, 8 Aug 2022 04:00:46 +0000 (23:00 -0500)]
Bugfix: Functions private_f_file_flush() and private_f_print_safely_get() are not being inclided when needed.
The disable macro _di_f_file_stream_close_ is missing.
The disable macros _di_f_print_raw_safely_, _di_f_print_raw_safely_dynamic_, and _di_f_print_raw_safely_dynamic_partial_ are missing.