Kevin Day [Wed, 22 Feb 2023 23:59:01 +0000 (17:59 -0600)]
Bugfix: Control group function is partially outdated and uses incorrect integer.
The F_control_group_path_system_default_s_length should not be used here when progressing the path string.
Use control_group.groups.array[i].used instead.
Kevin Day [Wed, 22 Feb 2023 06:25:23 +0000 (00:25 -0600)]
Progress: Continue work on Featureless Make, focusing on printing.
There might be a problem with any code that prints the error messages as non-errors with these changes.
I need to follow up once I am done with the print re-organization and make sure any non-error error printing still works.
Kevin Day [Tue, 21 Feb 2023 04:24:43 +0000 (22:24 -0600)]
Progress: Continue working on Featureless Make, focusing on printing.
I noticed some odd behavior during this process where the file size of the resulting binary is increasing by as little as 72 bytes per function created.
I experimentally created a "void example_print(void) { }" function and was able to get that 72 number.
Fully populating or using the example_print function did not reduce or noticeably increase the file size.
I gave up experimenting and decided to continue on.
When I got close to wrapping up the print functions in the make, the resulting binary file size suddenly dropped 10k or so at least.
Once that dropped happened the functions no longer appeared to increase file size.
I suspect that there was some sort of weird optimization going on.
Some of the generic print functions in the fake make will probably be moved into the common directory as common print functions.
Kevin Day [Mon, 20 Feb 2023 06:13:37 +0000 (00:13 -0600)]
Progress: Continue work on Featureless Make, focusing on printing.
Relax parameter checks on most of the print functions.
Add check to see if file.stream is set and if not return F_stream_not but not an error.
Make sue similar string checks are consistently used.
This should better allow for more flexible designs around stream and string data.
This eliminates a good amount of parameter checking.
Further simplify printing that has a common structure into more common print function.
This print function may end up being moved to a more common path as I can see printing from other directory trees in Featureless Make utilizing this.
Kevin Day [Mon, 20 Feb 2023 00:56:51 +0000 (18:56 -0600)]
Progress: Continue working on Featureless Make, focusing on printing.
The fll_error_print() and private_fll_error_print() functions now accepts a uint8_t flag instead of a boolean to designate options.
The fallback is still supported.
A new flag "simple" is provided to allow for printing a simpler message (helps avoid ridiculous messages like "Unable to find file, reason: file not found.").
Kevin Day [Sat, 18 Feb 2023 04:41:19 +0000 (22:41 -0600)]
Progress: Continue program related work, focusing on Featureless Make printing.
The console program has a bug where the found bit is not being properly preserved for value matches.
This is happening due to an incomplete refactor from value assignment to bitwise assignment.
Allocate extra space for the terminating NULL.
Print message rather than an error when termination signal is received.
Kevin Day [Wed, 15 Feb 2023 05:25:42 +0000 (23:25 -0600)]
Security: Invalid read or write while expanding operations.
The logic here is non-standard.
The normal logic operates on a pre-allocated basis.
That is, right before accessing the data perform the pre-allocation.
This code operates on the expectation that new variables are only added when conditionally required.
This results in a post-allocation basis where once a variable is known to expand then increment the used variable for the next pass.
The allocation checks need to happen after the increment on used.
There are some cases where this post-allocation is not happening.
This is probably a regression in the very recent bug fixes regarding expanding operations.
Be sure to ensure a clean state after the post-allocation process.
Kevin Day [Tue, 14 Feb 2023 05:12:37 +0000 (23:12 -0600)]
Progress: Continue work, focusing on organizing Featureless Make directory structure.
I am planning on moving all of the print functions into appropriate print source and header files.
While planning this it occurred to me that I first should restructure.
This restructures the code.
Some code has been copied into other files.
This makes the current state rather messy.
Expect follow up commits (eventually) to further clean and organize these.
Expect more files resulting from further clean up and organization.
Kevin Day [Sun, 12 Feb 2023 16:34:25 +0000 (10:34 -0600)]
Feature: Add Turtle Kevux path support.
This does not break API or ABI because it requires macros to be defined that would break it.
These macros, when in use, should not break API (but does extend it) but may break ABI.
The return value may have additional results and might be considered an API but not ABI breaking change.
There is already Kevux-specific code in FLL.
Temporarily continue that process as a short term solution.
In the long term, separate functions or files may be used (or an entirely separate project).
Kevin Day [Mon, 6 Feb 2023 03:01:24 +0000 (21:01 -0600)]
Bugfix: Invalid defines, incorrect comments, missing flags, and missing dependencies.
There is an inconsistency where _di_f_color_string_s_ and _di_f_color_strings_s_ are used.
Settle on _di_f_color_string_s_ because it is defined in the header file.
Incorrect defines, such as _di_f_utf_is_contro_codel_ are removed.
The *.config.h comment example doesn't work.
Consistently add fanalyzer mode and make sure it is available in both settings and fakefile files.
Some of the define macros are missing in regards to private functions.
The controller program is missing f_limit and fl_directory dependencies.
Kevin Day [Tue, 31 Jan 2023 03:01:29 +0000 (21:01 -0600)]
Update: Controller and Control man page documentation.
Move the specification details into man (5) pages.
This further allows for more explicit declaration of the license of the specifications.
The following are the commands used to help generated these man pages:
fss_basic_list_read entry.txt +Q -cn "Entry Specification" | iki_read +Q -w -W code '\fB' '\fR'
Kevin Day [Tue, 31 Jan 2023 02:22:24 +0000 (20:22 -0600)]
Update: Featureless Make man page documentation.
Move the specification details into man (5) pages.
This further allows for more explicit declaration of the license of the specifications.
The following are the commands used to help generated these man pages.
fss_basic_list_read dependencies.txt +Q -cn "Dependencies Specification" | iki_read +Q -w -WWW code '\fB' '\fR' bold '\fB' '\fR' FLL '\fB' '\fR'
Kevin Day [Sun, 29 Jan 2023 23:36:06 +0000 (17:36 -0600)]
Bugfix: The build settings 'path_sources' is incorrectly added.
The commit 79858cf386916fd25ccd3578797de53b16f5c446 fixed a problem with the sources path passed to the program.
This revealed a bug where the build setting 'path_sources' is being added twice.
This is probably why the previous bug was not noticed for so long.
Make sure to apply the passed path sources parameter when the build settings does not have 'path_sources'.
Kevin Day [Sun, 29 Jan 2023 05:31:35 +0000 (23:31 -0600)]
Progress: Continue program related work, with emphasis on Featureless Make.
The common.h and related files are now broken up a little more.
There is now a common-string.h and common-type.h (with matching source files).
This should make it easier to navigate, particularly when there are a lot of functions, strings, and types.
Lots of tedious updates to the Featureless Make.
There are still a lot of structural changes to make.
Add more parameters to Featureless Make to address the documents and the licenses directories.
There is still more work to do with those parameters.
Fix some observed mistakes in the level_0 console code.
Kevin Day [Thu, 26 Jan 2023 04:27:01 +0000 (22:27 -0600)]
Regression: Serial example rule is not working.
Investigation revealed that the commit 002bf17595459e65173be16f983977ead99593b6 introduced a regression where the cached data is being reset incorrectly.
The data is properly processed but when there is more than a single rule the previous rules are being cleared.
Kevin Day [Thu, 26 Jan 2023 01:23:53 +0000 (19:23 -0600)]
Update: Add additional sanity checks.
The GCC -fanalyzer is reporting a problem that as far as I can tell is a false positive.
This program is older code practices and will eventually be rewritten anyway.
Kevin Day [Thu, 26 Jan 2023 00:56:04 +0000 (18:56 -0600)]
Security: NULL pointer dereference in writer due to pipe function result handling.
The GCC -fanalyzer parameter helped me discover this one.
The status_pipe is being read and processed.
There is a case where the status_pipe is being set but it is not being reset after handling.
In a later loop the pipe does not get read but the previously set state is used bringing the code into a bad state.
Then the loop doesn't do the block buffer used check and this results in the eventual NULL dereference.
Kevin Day [Thu, 26 Jan 2023 00:53:39 +0000 (18:53 -0600)]
Update: Add fanalyzer build mode.
I keep forgetting to run the GCC fanalyzer sanity checks to help catch problems before making a release.
Add a formal mode in all of the build settings to make this processor easier and therefore easier to remember.
Add missing -Wall to some of the files for the test mode.
Kevin Day [Tue, 24 Jan 2023 05:32:01 +0000 (23:32 -0600)]
Bugfix: Fakefile processing with color context is producing extra spaces when unquoted.
Do not generate a new argument when calling fake_make_operate_expand_context().
The color context should combine with existing arguments.
This does not handle the last context argument and more work is likely needed to handle that one.
Remove the not quoted check that always generates a new argument.
The FSS Extended should support one or more Content per Object.
All others support the same number of Objects as Content (not referring to nested Content).
The error and error message when this is and is not correctly being handled.
The correct detection needs to count based on sub locations rather than locations.
Kevin Day [Mon, 23 Jan 2023 05:16:55 +0000 (23:16 -0600)]
Progress: Continue program related work and make f_console related changes.
Work on fake and then focus on the relating console changes.
I imported the recent bugfix regarding console arguments (ccd15d4e64848f29d36823ca92ee639057f544b7).
I opted to just copy and paste and then re-convert to the latest practice.
Look out for regressions, but this is development anyway.
I've added it to the console function.
As far as how the main programs declaring and using f_state_t to pass to the console program, I'm not sure how I want to handle f_state.
Kevin Day [Sat, 21 Jan 2023 06:53:38 +0000 (00:53 -0600)]
Progress: Continue program related work, focusing primarily on fake and console parameter handling.
I realized that the new callback console parameter needs to be implemented.
I reviewed the drafted design and changed it accordingly.
I've been able to reduce the need to have a callback for each parameter and have a single callback for the set of parameters.
The documentation for the console parameter callback change is incomplete for this and my next progress should complete this documentation.
I updated several programs regarding the console changes and noticed a small number of bugs in the UTF8 program.
The first line is now being printed, conditionally, but future work may be needed.
Kevin Day [Wed, 18 Jan 2023 03:59:17 +0000 (21:59 -0600)]
Progress: Continue program related work.
This focuses on getting the Featureless Make program to compile.
The settings and functionality is not yet updated so the program is not expected to work yet.
Kevin Day [Sat, 14 Jan 2023 23:13:37 +0000 (17:13 -0600)]
Bugfix: Several problems with the wrapping define macros, unused private functions, and non-existent functions.
The stand alone builds revealed several problems with the wrapping define macros.
The ones that I noticed or were blocking me from compiling have been fixed.
It will be no surprise if there are still more such problems hiding in the code somewhere.
Remove stale and unused private functions.
There is are no f_file_clone_at() and f_file_copy_at() functions.
Remove references and related wrapping define macros.
Kevin Day [Fri, 13 Jan 2023 23:56:06 +0000 (17:56 -0600)]
Bugfix: Incorrect macro definition _di_pthread_support_ vs _di_thread_support_.
The _di_pthread_support_ is used in the project but all of the programs have _di_thread_support_.
The project name is f_thread and not f_pthread so favor _di_thread_support_ over _di_pthread_support_.
Kevin Day [Fri, 13 Jan 2023 04:13:57 +0000 (22:13 -0600)]
Cleanup: Fix license confusion.
The documentation should be under the cc-by-sa-4.0 license.
However, the specification must be under the open-standard-license-1.0 license.
This file is documentation on the time specification.
If the documentation is under another license, the standard it describes must still be followed according to the open-standard-license-1.0 license.
The documentation would have to communicate that the standard it is describing is still under the open-standard-license-1.0 license even if the documentation itself is under a different license.
This creates a confusing and misleading situation.
Clarify the situation by setting the license to open-standard-license-1.0.
Setting the license explicitly to open-standard-license-1.0 should hopefully address any misunderstandings.
Kevin Day [Sat, 7 Jan 2023 15:57:39 +0000 (09:57 -0600)]
Update: Improve logic and design of install.sh script.
The destination directories should be created if they do not already exist.
Fail when the destination exists but is not a directory rather than fail if that directory does not exist.
Fix grammar in 'Failed to create work directories'.
The includes should be created only when work is not an empty string.
The recently added documentation needs to be created as well.
The settings is not created and needs to be created just like with documentation.
Ensure the existence of these directories allows the copy and paste to work correctly.
Ensure the normal directories get created in addition to the work directories.
I originally designed this to not have any opinions for the settings.
I've decided to relax that and apply the default settings of the 'etc/' directory.
This directory is now installed to.
If say the 'etc/' is actually needing to be the 'share/' directory, custom paths can be altered as well.
Make sure the documentation and settings can be disabled or have their destination paths altered.
Kevin Day [Sat, 7 Jan 2023 05:03:34 +0000 (23:03 -0600)]
Feature: Add missing documentation handling functionality to Featureless Make.
This is an oversight and should have been implemented before the first stable release.
This feature should be a core feature.
Documentation is important.
Make sure the handling of documentation is available for use.
This adds "build_sources_documentation" to the build settings to help facilitate documentation installation.
The documentation that is copied is expected to be under 'data/documentation/'.
The 'documentation' and 'documents' terminology overlaps to some degree.
The 'documentation' is a more specific thing and may not always be a 'document'.
The existing behavior around 'documents' is left unchanged.
The skeleton operation now creates the 'data/documentation/' directory.
The bootstrap.sh script now supports enabling and disabling documentation via the more common '--enable-doc' and '--disable-doc' parameters.
Kevin Day [Sat, 7 Jan 2023 04:53:37 +0000 (22:53 -0600)]
Cleanup: Fake program has incorrectly named variables.
The variables with 'build_sources_settings' should not have an 's' on the end.
The variables with 'build_process_post_s' and 'build_process_pre_s' should not have an '_s' on the end except for when it is a string.
Kevin Day [Thu, 5 Jan 2023 03:20:16 +0000 (21:20 -0600)]
Feature: Support passing a fakefile Section name to the main program.
This is intuitive and should have already been supported in the project to better transition from GNU Make into Featureless Make.
The unknown parameter error is to no longer be thrown.
Instead, when the make process in being followed, check to see if any Sections exist in the fakefile matching the main program Section parameters.
Fail when this happens.
If the Section exists in the fakefile then that Section is operated on.
This, for example, now allows for doing something like "fake install" in the same way "make install" works.
The "install" Section must exist in the fakefile for this to work.
Kevin Day [Thu, 5 Jan 2023 01:57:04 +0000 (19:57 -0600)]
Update: De-couple the build settings data file from the install.sh script.
The design is originally focused around the data/build/settings file.
This file is simple enough and easy enough to use that I decided to use it beyond its intended design.
I noticed that the data/build/settings isn't required anymore.
Removing this allows me to better use in other projects, such as those that have only a fakefile or have a different directory location for the build settings data.
Kevin Day [Tue, 3 Jan 2023 20:52:16 +0000 (14:52 -0600)]
Update: Be more thorough in the f_file unit test.
The "*_returns_false" test is doing a more complete check but the "*_returns_true" is not.
Redesign the "*_returns_true" test to have the same structure as the "*_returns_false" test.