Kevin Day [Sun, 14 Dec 2025 16:34:56 +0000 (10:34 -0600)]
Update: Add man pages forr most or all FLL functions and programs.
The man page format is terrible.
The doxygen program helps automatically create these, but it is terrible at generating the man page format (on top of the man page format itself being terrible).
I found a tool from https://github.com/gsauthof/doxy2man.git that helps convert doxygen created xml files into man pages.
It works a lot better than doxygen's man page generation.
The generation from doxygen still has problems.
It doesn't understand some of the commenting structure.
This documents the process so that I do not have to try and figure this out all over again.
I have to take the generated man pages and modify them to clean up a bunch of mess.
This is a lot of work and so I am expecting to have missed something, overlooked something, or made some silly mistake.
Oh well. I can address such problems over time.
This is another reminder (like commit 63be746d22d66870ae89f9575c82db7d0b784e32 from the 0.6 branch) that I probably have to write something that provides a better documentation format.
Then I can convert that to man pages.
I imagine something using FSS + Wiki + IKI.
Using both Wiki and IKI is because IKI isn't meant to replace Wiki.
Kevin Day [Sat, 13 Dec 2025 17:21:55 +0000 (11:21 -0600)]
Update: Build settings header ordering and config.c and config.h files.
Change the ordering to have the headers before the source files.
This seems to flow more naturally.
Move the main program and config.c files onto their own source lines, in general.
Make sure all programs have a config.c and config.h file.
I've generated these files in the past but now with the external programs it has become less consistent.
Make the files statically defined rather than generated and explicitly add them to the build settings.
The individual, level, and monolithic builds should still craete the config.h and config.c files.
However, remove the automated insertion of the config.c into the build settings files.
These are now directly added to the build settings files.
Kevin Day [Fri, 12 Dec 2025 03:08:29 +0000 (21:08 -0600)]
Update: Existing stand alone builds.
Change the file structure for the fl_fss source files, breaking it up into two lines.
The status code should use `stand_alone` as the stage.
I was originally trying something different and abandoned the approach but I forgot to change the stage back to `stand_alone`.
Kevin Day [Thu, 11 Dec 2025 05:53:29 +0000 (23:53 -0600)]
Bugfix: Multiple dependencies files, not handling all of the dependencies.
A single stand alone project is not properly getting all of the FLL sources when multiple dependency files are specified and they have different dependencies.
This now ensures that all properly named `dependencies` files are processed.
Kevin Day [Wed, 10 Dec 2025 04:23:50 +0000 (22:23 -0600)]
Refactor: Build mode gcc_13 to flex_arrays to provide a more generic name.
The `gcc_13` was a temporary mode and I don't want to have version specific modes.
Replace the mode witha more long term version unspecific name `flex_arrays`.
Kevin Day [Sun, 7 Dec 2025 22:32:48 +0000 (16:32 -0600)]
Feature: Add f_process project.
This provides pidfd functionality that I intend to utilize in future work.
Provide `f_handle_t` for represetning `struct file_handle`.
Several of the functions being represented are not in some libc implementations.
Use `syscall()` to handle these.
Provide defines for enabling/disabling the `syscall()` behavior.
Provide stubs for mocking such functions in unit tests so as to avoid trying to mock `syscall()` itself.
Kevin Day [Sat, 6 Dec 2025 21:37:23 +0000 (15:37 -0600)]
Cleanup: Reduce extra blocks in delete and destroy call backs.
Early on I was uncertain at how I should handle this.
I wanted the block design, with anticipation that there would be cases where other code might operate after the first scope ended.
This made for easy and copy and paste (as well as some level of consistency) when switching between different types.
There has been massive changes over time regarding the structure of the delete and destroy functions (which are now call backs).
Most of the blocks end right before the function ends.
Simplify the design in these cases by removing one level of block structure.
Kevin Day [Wed, 3 Dec 2025 03:32:51 +0000 (21:32 -0600)]
Feature: Add macro_*_t_intialize_3(array_value, length_value) macros for initializing static arrays.
The standard array type structures now have a `macro_*_t_intialize_3(array_value, length_value)` where `length_value` is the `used` value and the `size` is set to `0`.
This designates that the array (or string) is statically allocated (only when the memory address for `array` or `string` is non-NULL).
Kevin Day [Mon, 1 Dec 2025 01:37:23 +0000 (19:37 -0600)]
Update: Avoid the use of bool, keeping it to a bare minimum.
Use `uint8_t` to both enforce a specific byte size as well as provide the ability for it to be converted into a set of bits if need be, without breaking API or ABI.
Kevin Day [Sun, 30 Nov 2025 21:56:48 +0000 (15:56 -0600)]
Update: Make *_t_clear() functionality consistent and fix existing problems.
These were being removed at one point in time, resulting in an inconsistent declaration of these macros.
The memory clear macros were also removed, but some of the uses still (incorrectly) remained.
Ensure that these `*_t_clear()` macros are encased in a brace defined block.
Do not use semi-colons at the end of the `*_t_clear()` uses.
Do use semi-colons at the end of `*_t_clear()` direct property assignments.
Kevin Day [Sun, 30 Nov 2025 05:26:10 +0000 (23:26 -0600)]
Refactor: Relocate the order of the size and used properties for f_string_static_t and f_string_dynamic_t.
This will be performed on all types, but I started with `f_string_static_t` and `f_string_dynamic_t` given how much they are being used.
This is done to help reduce potential security problems relating to allocation and buffer overflows.
This is not expected to stop attacks or intentional mis-uses.
This is instead expected to help reduce the attack surface area by reducing the possible harm from coding or runtime mistakes.
The basic structure is:
```pseudocode
my_type {
array
used
size
}
```
If an array overflow write occurs, it is mostly likely to write in the `used` structure rather than the `size` (unless the compiler does something different).
This can cause the `used` to become corrupted rather than the `size`.
This essentially makes `used` act as a buffer to the `size` property.
While this is still a bad state, the memory allocation might still get preserved and allow for proper de-allocation without memory leaks.
Stack protection and similar security practices helps make larger overflow writes more likely to get caught and therefore more likely to be stopped before the `size` gets corrupted.
This, of course, does not protect against intentional mis-uses and abuses.
I was holding this off for some time due to the sheer size of the required changes.
However, once a code freeze happens, then I cannot make these API and ABI breaking changes.
Therefore, now is the time for me to make these changes.
Also begin using the `{ .property = value }` notation.
Kevin Day [Thu, 27 Nov 2025 14:26:15 +0000 (08:26 -0600)]
Update: Use F_file_descriptor_not instead of F_file_descriptor for invalid file descriptors.
The "_not" suffixes were added later in in the project after some of these status codes were established.
This begins the process of using the "_not" suffixes for representing invalid states, variables, etc...
The `F_file_descriptor` should instead be `F_file_descriptor_not` for invalid file descriptor errors.
Kevin Day [Wed, 26 Nov 2025 06:51:54 +0000 (00:51 -0600)]
Update: Make some socket error codes more granular and add additional status codes.
Some of the socket status codes should be more granular given the specific behavior relating to networking.
Add error printing associated with this.
I anticipate more changes like this based around networking.
Kevin Day [Sun, 23 Nov 2025 03:51:51 +0000 (21:51 -0600)]
Bugfix: The fss_write is missing the recently added debug mode.
This causes the build system to fail to compile when using the default build modes.
My standard build process did not catch this because I was using explicitly specified build modes.
Kevin Day [Wed, 12 Nov 2025 04:33:02 +0000 (22:33 -0600)]
Update: Utilize the F_status_debug_source_d for handling the errors.
This simplifies some of the logic and code.
However, there are some disadvantages of doing this.
One such disadvantage is losing the specific function that has failed.
The location in the source file should be sufficient, if not ideal.
Address issues where the `debug` mode is not being specified in some programs.
Kevin Day [Tue, 11 Nov 2025 03:18:05 +0000 (21:18 -0600)]
Update: Utilize the debug mode, changing the error printing functions.
The `function` parameter is now replaced with `debug`.
There are several changes to the error printing functions to accommodate this.
A new function `fll_error_print_debug()` is added for handling the printing of this debug parameter.
Update the programs to ensure that they compile with these changes.
A follow up commit is required to fully and properly utilize this debug parameter.
The Featureless Make had to be updated further to get it to compile.
This fixes incorrect documentation that I observed.
The debug and function conversions are only enough to get things to compile.
This will still need a follow up commit to properly change everything.
Kevin Day [Sun, 9 Nov 2025 04:25:10 +0000 (22:25 -0600)]
Feature: Support generating debug souce and line as well as debug mode.
Prrovide a new build mode called `debug`.
Apply it consistently across all build settings files.
Update the build settings file to be more consistent in regards to modes and related comments.
Provide new debug option called `F_status_debug_source_d`.
This provides a way to get the current source file, line, and possibly function.
This should help with debugging.
This was first implemented in the controller program and I liked it enough to bring it in here.
The error printing functions are currently not updated.
I will have to decide if I want to get rid of the old way of using the hard-coded and mapped function names.
The `_en_status_debug_` allows for enabling the debug printing (passing `-D_en_status_debug_` to a compiler).
The `_di_f_status_debug_d_` is also available for providing the standard define wrapper.
Kevin Day [Sun, 2 Nov 2025 22:03:15 +0000 (16:03 -0600)]
Update: Provide more granular error status codes in the thread full functions.
The LIBC pthread implementations fail to provide a way to truly verify that thread data is properly allocated or not.
The full thread types have two different thread related memory freeing functions.
If the first function fails, then the second structure is still allocated.
The previous behavior provided no way to distinguish between the two different failures.
These more granular status codes allow for such distinction now.
This allows the caller to manually try to de-allocate other parts even if the first de-allocation failed.
Note: the `f_schedule_attribute_get()` and `f_schedule_attribute_set()` have to use `syscall()` directly due to design problems with glibc.
The `struct sched_attr` is also an incomplete/broken type in glibc.
I have declared my own type based on the kernel structure.
It is unclear on how well this will work in practice.
I am also uncertain of the best way to mock a variadic function like `syscall()`.
The mocks for these are therefore incomplete.
Kevin Day [Wed, 27 Aug 2025 02:32:43 +0000 (21:32 -0500)]
Update: Add specific source design documentation.
I have described this in one manner or another since the start of the FLL project.
This explicitly states the behavior that the FLL project (and related projects) have always followed.
Kevin Day [Thu, 21 Aug 2025 02:20:24 +0000 (21:20 -0500)]
Update: The FLL tags file with the latest code.
Geany does a pretty poor job of building the tag files.
The way I managed to get this to work is to:
1. Generate the monolithic package.
2. Perform `fake clean make` on that package.
3. Create a new project that points to the package, such as: `/path/to/fll-0.7.3/build/includes`.
4. Set `file_patterns` to `*.h`.
5. Set `source_patterns` to `*.c`.
6. Set `header_patterns` to `*.h`.
7. Set `ignored_dirs_patterns` to `*;test/*`.
8. Set `ignored_file_patterns` to `*.o;*.obj;*.a;*.lib;*.so;*.dll;*.lo;*.la;*.class;*.jar;*.pyc;*.mo;*.gmo`.
9. Select the `project->generate tags` option.
10. Rename the generate tags file to end in `.c.tags`.
11. Edit that file to replace `_TAG_PROC_CWD` value with something like `/usr/local/fll/includes/` (or `/usr/include/fll` for standard UNIX FHS systems).
The `ignored_file_patterns` has a lot of defaults that geany provided that I probably do not need.
The generated tags file is unusable because geany generates it without the `.c.tags` in the name and geany requires the `.c.tags` in the name to read (which is just plain stupid).
Kevin Day [Wed, 20 Aug 2025 03:46:29 +0000 (22:46 -0500)]
Update: Adding missing thread functions and types; restructure files.
It has become clear to me that I didn't actual complete the thread types.
This adds the array of array types that are missing.
The `thread.c` and `thread.h` files are huge.
Break apart the functions based on existing `thread/*` files.
Doing this requires being more particular about the ordering of the header includes.
Update and add appropriate unit tests.
Much of this is done via mass replacements.
There very likely are some unimportant oversights.
Kevin Day [Mon, 18 Aug 2025 04:20:26 +0000 (23:20 -0500)]
Update: Settings with latest code changes and address problems.
Fix issue where `_di_f_utf_string_seek_line_back` is missing the final `_`.
Fix issue with the `_di_f_idss_destroy_callback_` being missing.
Fix issue with the `_di_f_idss_*_callback_` having a messed up structure.
Add missing defines to stand alone build settings.
- Add explicit `#define _di_fll_error_s_a_` and `#define _di_fll_error_s_e_` to stand alone build settings.
- Add missing `#define _di_f_void_pointer_call_t_` to stand alone build settings.
- Add missing `#define _di_f_thread_name_get_` and `#define _di_f_thread_name_set_` to stand alone build settings.
Add the settings for the recently added thread "full" types and their related functions.