]> Kevux Git Server - fll/log
fll
3 months agoUpdate: The API version documentation comments to 0.8.
Kevin Day [Sat, 6 Dec 2025 04:52:20 +0000 (22:52 -0600)]
Update: The API version documentation comments to 0.8.

3 months agoUpdate: Use call back class structure.
Kevin Day [Sat, 6 Dec 2025 04:37:36 +0000 (22:37 -0600)]
Update: Use call back class structure.

I relatively recently started putting the call backs into their own structure.

This brings the status_code project in line with that practice.

3 months agoBugfix: Make sure the bootstrap.sh provide the standard default values.
Kevin Day [Sat, 6 Dec 2025 04:29:32 +0000 (22:29 -0600)]
Bugfix: Make sure the bootstrap.sh provide the standard default values.

This issue is exposed by the removal of numerous values from build settings files to favor the defaults.

3 months agoCleanup: Remove stale and invalid f_utf string files.
Kevin Day [Sat, 6 Dec 2025 03:57:10 +0000 (21:57 -0600)]
Cleanup: Remove stale and invalid f_utf string files.

3 months agoCleanup: Remove build settings objects that specify the default values.
Kevin Day [Sat, 6 Dec 2025 03:21:04 +0000 (21:21 -0600)]
Cleanup: Remove build settings objects that specify the default values.

3 months agoUpdate: Add missing array types for time and date structures.
Kevin Day [Thu, 4 Dec 2025 05:44:57 +0000 (23:44 -0600)]
Update: Add missing array types for time and date structures.

Update the build files.
Add unit tests.

3 months agoBugfix: Bootstrap example script is not returning proper error codes.
Kevin Day [Wed, 3 Dec 2025 05:02:50 +0000 (23:02 -0600)]
Bugfix: Bootstrap example script is not returning proper error codes.

The echo commands result in `$?` being a non-error code.
Just return `1` when printing errors.

3 months agoFeature: Add macro_*_t_intialize_3(array_value, length_value) macros for initializing...
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).

Switch to use these for static data.

3 months agoRefactor: Code to use { .a = b } notation for initializers and address related problems.
Kevin Day [Wed, 3 Dec 2025 02:52:36 +0000 (20:52 -0600)]
Refactor: Code to use { .a = b } notation for initializers and address related problems.

Change the coding style for the initializers and macro initializers to follow the `{ .a = b }` format.

3 months agoUpdate: Remove todo regarding delete and destroy functions for f_thread_once_t along...
Kevin Day [Mon, 1 Dec 2025 02:04:56 +0000 (20:04 -0600)]
Update: Remove todo regarding delete and destroy functions for f_thread_once_t along with unused tests.

The tests are not used and there are no functions to test.

Remove the `@todo` regarding adding delete and destroy functions for `f_thread_once_t`.
Document the reasons for this in the documentation comments.

3 months agoUpdate: Remove n longer valid *_delete_simple and *_destroy_simple macros.
Kevin Day [Mon, 1 Dec 2025 01:49:06 +0000 (19:49 -0600)]
Update: Remove n longer valid *_delete_simple and *_destroy_simple macros.

3 months agoUpdate: Avoid the use of bool, keeping it to a bare minimum.
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.

Update the tests to use `uint8_t` as well.

3 months agoUpdate: Make *_t_clear() functionality consistent and fix existing problems.
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.

3 months agoRefactor: Relocate the order of the size and used properties for numerous array struc...
Kevin Day [Sun, 30 Nov 2025 20:58:57 +0000 (14:58 -0600)]
Refactor: Relocate the order of the size and used properties for numerous array structure types.

For further details, see: a6ab23fe1333af5f582f73144ab55d753785aaf0.

3 months agoRefactor: Relocate the order of the size and used properties for string statics,...
Kevin Day [Sun, 30 Nov 2025 14:59:55 +0000 (08:59 -0600)]
Refactor: Relocate the order of the size and used properties for string statics, staticss, dynamics, and dynamicss.

For further details, see: a6ab23fe1333af5f582f73144ab55d753785aaf0.

3 months agoRefactor: Relocate the order of the size and used properties for f_string_static_t...
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.

3 months agoUpdate: Remove firewall files that were not migrated yet.
Kevin Day [Sat, 29 Nov 2025 17:42:32 +0000 (11:42 -0600)]
Update: Remove firewall files that were not migrated yet.

These files should now be in the separate kevux_firewall project.

3 months agoUpdate: Add the stand alone build defines for fll_program_print_error_parameter_too_f...
Kevin Day [Sat, 29 Nov 2025 17:40:48 +0000 (11:40 -0600)]
Update: Add the stand alone build defines for fll_program_print_error_parameter_too_few() and fll_program_print_error_parameter_too_many().

3 months agoFeature: Add fll_program_print_error_parameter_too_few() and fll_program_print_error_...
Kevin Day [Sat, 29 Nov 2025 16:05:13 +0000 (10:05 -0600)]
Feature: Add fll_program_print_error_parameter_too_few() and fll_program_print_error_parameter_too_many().

3 months agoUpdate: Remove F_file_type_not_* status codes.
Kevin Day [Fri, 28 Nov 2025 04:17:56 +0000 (22:17 -0600)]
Update: Remove F_file_type_not_* status codes.

Each of these already has a `_not` of the base type, such as:
  - `F_block_not`
  - `F_known_not`

3 months agoUpdate: The directory status codes and use F_directory_descriptor_not instead of...
Kevin Day [Thu, 27 Nov 2025 16:15:51 +0000 (10:15 -0600)]
Update: The directory status codes and use F_directory_descriptor_not instead of F_directory_descriptor.

Add missing "_not" status codes or the inverse.
The `F_directory_closed` is not needed now that there are the "_not" status codes.

Use `F_directory_descriptor_not` instead of `F_directory_descriptor` for invalid directory descriptors.

Replace `F_file_type_not_directory` with `F_directory_not`.

3 months agoUpdate: Use F_file_descriptor_not instead of F_file_descriptor for invalid file descr...
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.

3 months agoUpdate: Make more socket error codes more granular, add additional status codes,...
Kevin Day [Wed, 26 Nov 2025 23:28:18 +0000 (17:28 -0600)]
Update: Make more socket error codes more granular, add additional status codes, rename some others.

This particularly adds an underscore between file and system to be more proper.

3 months agoUpdate: Make more socket error codes more granular, add additional status codes,...
Kevin Day [Wed, 26 Nov 2025 19:08:04 +0000 (13:08 -0600)]
Update: Make more socket error codes more granular, add additional status codes, rename some others.

3 months agoUpdate: Make some socket error codes more granular and add additional status codes.
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.

Add clock status codes.

3 months agoUpdate: FLL Error should handle more standard network error codes.
Kevin Day [Wed, 26 Nov 2025 03:49:04 +0000 (21:49 -0600)]
Update: FLL Error should handle more standard network error codes.

Also add additional text "occurred" when an unhandled error gets printed by FLL Error.

3 months agoCleanup: Abstruse documentation comments.
Kevin Day [Tue, 25 Nov 2025 23:58:19 +0000 (17:58 -0600)]
Cleanup: Abstruse documentation comments.

Ensure the details on what is and is not de-allocated is described in the documentation comments.
Also alphabetize this list.

3 months agoBugfix: The asctime_r() function appends a new line.
Kevin Day [Mon, 24 Nov 2025 02:27:17 +0000 (20:27 -0600)]
Bugfix: The asctime_r() function appends a new line.

Ensure that the new line is not counted as part of the date string.

3 months agoBugfix: The fss_write is missing the recently added debug mode.
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.

3 months agoBugfix: Incorrect index usages in f_console_parameter_process().
Kevin Day [Sat, 22 Nov 2025 16:12:20 +0000 (10:12 -0600)]
Bugfix: Incorrect index usages in f_console_parameter_process().

Switch to use a pointer called `current` to simplify the code a little.

The unicode charater processing is accessing index `i` out of scope.

The process short list is accessing index `i` out of scope.

Utilize the `current` pointer to help better manage avoiding accessing index `i` out of scope.

3 months agoCleanup: Add missing documentation on wrap_up_stop.
Kevin Day [Sat, 22 Nov 2025 16:10:37 +0000 (10:10 -0600)]
Cleanup: Add missing documentation on wrap_up_stop.

3 months agoCleanup: Add additional comment for f_console_result_found_d documentation.
Kevin Day [Sat, 22 Nov 2025 04:37:20 +0000 (22:37 -0600)]
Cleanup: Add additional comment for f_console_result_found_d documentation.

3 months agoFeature: Additional status codes, F_case, F_match, F_miss, and F_word.
Kevin Day [Fri, 21 Nov 2025 04:56:16 +0000 (22:56 -0600)]
Feature: Additional status codes, F_case, F_match, F_miss, and F_word.

Along with their inverses:
- F_case_not
- F_match_not
- F_miss_not
- F_word_not

3 months agoBugfix: Add missing f_string_format_sentence_end_basic_s definition.
Kevin Day [Thu, 20 Nov 2025 04:33:34 +0000 (22:33 -0600)]
Bugfix: Add missing f_string_format_sentence_end_basic_s definition.

3 months agoUpdate: Remove firewall program.
Kevin Day [Mon, 17 Nov 2025 04:28:20 +0000 (22:28 -0600)]
Update: Remove firewall program.

The firewall program is being moved into the kevux-tools repository or in its own repository.
It will not be in the 0.8.x releases of the FLL project.

3 months agoUpdate: Next minor and micro version (0.8.0).
Kevin Day [Mon, 17 Nov 2025 04:10:15 +0000 (22:10 -0600)]
Update: Next minor and micro version (0.8.0).

The following are the commands that I ran to make this change:
  # find build/ level_? specifications/ documents/ licenses/ -type f -exec sed -i -e 's|0\.7\.3|0.8.0|g' -e 's|^version_micro 3|version_micro 0|g' -e 's|^version_minor 7|version_minor 8|g' '{}' ';'
  # find level_3/ -name *.h -exec sed -i -e 's|_program_version_micro_s F_string_ascii_3_s|_program_version_micro_s F_string_ascii_0_s|g' -e 's|_program_version_micro_s_length F_string_ascii_3_s_length|_program_version_micro_s_length F_string_ascii_0_s_length|g' '{}' ';'
  # find level_3/ -name *.h -exec sed -i -e 's|_program_version_minor_s F_string_ascii_7_s|_program_version_minor_s F_string_ascii_8_s|g' -e 's|_program_version_minor_s_length F_string_ascii_7_s_length|_program_version_minor_s_length F_string_ascii_8_s_length|g' '{}' ';'
  # find level_3/ -name *.h -exec sed -i -e 's|API Version: 0.7|API Version: 0.8|g' '{}' ';'
  # find level_3/ -type f  -name *.1  -exec sed -i -e 's|April 2025|November 2025|g' '{}' ';'
  # find level_3/ -type f  -name *.5  -exec sed -i -e 's|April 2025|November 2025|g' '{}' ';'
  # sed -i -e 's|version_micro 3|version_micro 0|g' build/*/settings build/stand_alone/*.settings level_*/*/data/build/*settings*
  # sed -i -e 's|version_minor 7|version_minor 8|g' build/*/settings build/stand_alone/*.settings level_*/*/data/build/*settings*

3 months agoUpdate: The FLL tags file with the latest code. 0.7.3
Kevin Day [Wed, 12 Nov 2025 06:10:44 +0000 (00:10 -0600)]
Update: The FLL tags file with the latest code.

3 months agoUpdate: Utilize the F_status_debug_source_d for handling the errors.
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.

4 months agoUpdate: Utilize the debug mode, changing the error printing functions.
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.

4 months agoUpdate: Add the debug mode to the build settings.
Kevin Day [Mon, 10 Nov 2025 04:43:18 +0000 (22:43 -0600)]
Update: Add the debug mode to the build settings.

4 months agoFeature: Additional status codes, F_pretty, F_ugly, etc...
Kevin Day [Sun, 9 Nov 2025 04:51:42 +0000 (22:51 -0600)]
Feature: Additional status codes, F_pretty, F_ugly, etc...

These status codes are added:
  - F_backward
  - F_backward_fast
  - F_backward_not
  - F_backward_slow
  - F_forward
  - F_forward_fast
  - F_forward_not
  - F_forward_slow
  - F_mute
  - F_mute_not
  - F_pretty
  - F_pretty_not
  - F_ugly
  - F_ugly_not

The pretty and ugly ones are based on the idea of prettify and uglify code concepts (such as prettify JSON or uglify JSON).

4 months agoFeature: Support generating debug souce and line as well as debug mode.
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.

4 months agoUpdate: Have thread condition wait functions return F_condition on success.
Kevin Day [Thu, 6 Nov 2025 05:57:46 +0000 (23:57 -0600)]
Update: Have thread condition wait functions return F_condition on success.

This provides a more accurate status code.

4 months agoUpdate: Provide more granular error status codes in the thread full functions.
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.

4 months agoFeature: Add additional status codes, F_read_write codes.
Kevin Day [Sat, 1 Nov 2025 15:42:26 +0000 (10:42 -0500)]
Feature: Add additional status codes, F_read_write codes.

- F_read_write
- F_read_write_execute
- F_read_write_execute_not
- F_read_write_execute_only
- F_read_write_not
- F_read_write_only

4 months agoFeature: Add additional status codes.
Kevin Day [Sat, 1 Nov 2025 04:10:44 +0000 (23:10 -0500)]
Feature: Add additional status codes.

- F_attribute
- F_attribute_not
- F_barrier
- F_barrier_not
- F_bdo
- F_bdo_not
- F_combarudoo
- F_combarudoo_not
- F_condition
- F_condition_not
- F_controller
- F_controller_not
- F_disk
- F_disk_not
- F_keyboard
- F_keyboard_not
- F_mouse
- F_mouse_not
- F_mutex
- F_mutex_not
- F_semaphore
- F_semaphore_not
- F_spin
- F_spin_not
- F_touch
- F_touch_not

5 months agoFeature: Add F_lock_critical, F_lock_read_write, F_lock_release, F_lock_signal, F_loc...
Kevin Day [Thu, 9 Oct 2025 01:51:28 +0000 (20:51 -0500)]
Feature: Add F_lock_critical, F_lock_read_write, F_lock_release, F_lock_signal, F_lock_time, and F_lock_wait.

Add additional lock related codes to standardize more options for more fine tuned status control when dealing with locking.

6 months agoUpdate: Remove f_thread_set_t and related.
Kevin Day [Tue, 2 Sep 2025 00:09:00 +0000 (19:09 -0500)]
Update: Remove f_thread_set_t and related.

This structure is no longer planned to be used and supported.
The path that I am taking is now different and does not need this particular structure.

6 months agoCleanup: Remove redundant mutex defines.
Kevin Day [Mon, 1 Sep 2025 23:36:33 +0000 (18:36 -0500)]
Cleanup: Remove redundant mutex defines.

6 months agoUpdate: Add f_schedule disables file.
Kevin Day [Mon, 1 Sep 2025 23:15:20 +0000 (18:15 -0500)]
Update: Add f_schedule disables file.

6 months agoUpdate: The FLL tags file.
Kevin Day [Mon, 1 Sep 2025 23:13:26 +0000 (18:13 -0500)]
Update: The FLL tags file.

6 months agoUpdate: Finish adding functions to f_schedule.
Kevin Day [Sun, 31 Aug 2025 20:49:01 +0000 (15:49 -0500)]
Update: Finish adding functions to f_schedule.

This adds:
  - `f_schedule_affinity_get()`
  - `f_schedule_affinity_set()`
  - `f_schedule_attribute_get()`
  - `f_schedule_attribute_set()`
  - `f_schedule_policy_robin_interval_get()`
  - `f_schedule_priority_get_max()`
  - `f_schedule_priority_get_min()`
  - `f_schedule_yield()`

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.

6 months agoProgress: Add more functions to f_schedule.
Kevin Day [Sat, 30 Aug 2025 20:21:37 +0000 (15:21 -0500)]
Progress: Add more functions to f_schedule.

This adds:
  - `f_schedule_policy_get()`
  - `f_schedule_policy_set()`
  - `f_schedule_priority_get()`
  - `f_schedule_priority_set()`
  - `f_schedule_value_get()`
  - `f_schedule_value_set()`

6 months agoProgress: Begin adding f_schedule.
Kevin Day [Fri, 29 Aug 2025 02:50:10 +0000 (21:50 -0500)]
Progress: Begin adding f_schedule.

I distantly remembered considering this in the past.
I think that I need to do this now.

This will be adding several of the scheduling functions.
This starts with the easiest one, `nice()`.

6 months agoUpdate: Add defines for f_thread and update appropriate build data.
Kevin Day [Thu, 28 Aug 2025 02:59:40 +0000 (21:59 -0500)]
Update: Add defines for f_thread and update appropriate build data.

Add `f_thread` `common.h` and `common.c` with the defines relating to threads.

Move the `f_thread_mutex_attribute_*_d` into these files and remove the `_attribute` from their names.

Update the build disable headers.

6 months agoUpdate: Add specific source design documentation.
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.

6 months agoCleanup: Style spacing in initialize define.
Kevin Day [Wed, 27 Aug 2025 02:31:52 +0000 (21:31 -0500)]
Cleanup: Style spacing in initialize define.

6 months agoUpdate: The FLL tags file with the latest code.
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).

6 months agoUpdate: Adding missing thread functions and types; restructure files.
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.

6 months agoUpdate: Settings with latest code changes and address problems.
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.

6 months agoUpdate: Provide "full" thread types and corrects other problems encountered.
Kevin Day [Sat, 16 Aug 2025 05:18:09 +0000 (00:18 -0500)]
Update: Provide "full" thread types and corrects other problems encountered.

There are new types like `f_thread_barrier_full_t` created that provide a structure of both the lock and its associated attribute variable.
For whatever reason the pthread design requires the attributes to be allocated.
This makes changing settings more complex.
These "full" types are provided to help reduce the burden of managing this mess.

I noticed a lot of random inconsistencies and other minor mistakes that I decided to simply address while working on this.
There are more things that could be done but I decided to limit myself to what is done here.

Of particular note are the attribute functions.
Several of the attribute functions were checking for error codes that do not exist as per the standard.
The attribute functions simply return fewer possible error codes that the locks.
I more than likely mass copied the locks into attributes and never corrects the dependencies.
Several of the tests were also testing these invalid status codes.

6 months agoCleanup: Add missing documentation in certain thread functions.
Kevin Day [Sat, 16 Aug 2025 01:50:02 +0000 (20:50 -0500)]
Cleanup: Add missing documentation in certain thread functions.

6 months agoFeature: Add F_pause and F_resume.
Kevin Day [Fri, 15 Aug 2025 03:20:32 +0000 (22:20 -0500)]
Feature: Add F_pause and F_resume.

I decided to add F_resume despite having F_continue due to the meanings being actually different despite the strong similarity.

6 months agoFeature: Add F_future, F_past, and F_present status groups.
Kevin Day [Wed, 13 Aug 2025 02:27:32 +0000 (21:27 -0500)]
Feature: Add F_future, F_past, and F_present status groups.

I am updating threads and realized that I should probably have a `F_future` status code.
Futures are common asynchronous terminology.

For completeness, I added `F_past` and `F_preset`.

This includes all of the respective "_not" codes.

6 months agoFeature: Add missing mutex consistent and robust mutex attribute functions.
Kevin Day [Wed, 13 Aug 2025 02:13:51 +0000 (21:13 -0500)]
Feature: Add missing mutex consistent and robust mutex attribute functions.

Add the following functions:
  - `f_thread_mutex_attribute_robust_get()`
  - `f_thread_mutex_attribute_robust_set()`
  - `f_thread_mutex_consistent()`

Add the new thread mutex group:
  - `f_thread_mutex_d`

Add the following status codes:
  - `F_consistent`
  - `F_consistent_not`
  - `F_robust`
  - `F_robust_not`

Add appropriate unit tests.

6 months agoUpdate: Add thread mutex attribute defines, update tests, and add missing error handling.
Kevin Day [Wed, 13 Aug 2025 00:20:31 +0000 (19:20 -0500)]
Update: Add thread mutex attribute defines, update tests, and add missing error handling.

Define `_di_f_thread_mutex_attribute_d_` such that the mutex attributes like `PTHREAD_MUTEX_NORMAL` have a mapped define.

The mutex lock and try lock are no longer missing the handling of `ENOTRECOVERABLE` and `EOWNERDEAD` errors.

7 months agoFeature: Add F_is and F_is_not status codes.
Kevin Day [Tue, 12 Aug 2025 00:12:17 +0000 (19:12 -0500)]
Feature: Add F_is and F_is_not status codes.

7 months agoCleanup: Several old status code locations (second pass).
Kevin Day [Mon, 11 Aug 2025 23:22:51 +0000 (18:22 -0500)]
Cleanup: Several old status code locations (second pass).

See the first pass for more details in commit: 8dacac51142c16c8118f9de8225d28708f540684.

This relocates the following sets:
- F_access
- F_directory
- F_equal_to
- F_file
- F_filesystem
- F_instance
- F_process
- F_socket
- F_terminal
- F_than

Remove any wrapping macro defines that should no longer apply.

7 months agoCleanup: Several old status code locations (first pass).
Kevin Day [Sun, 10 Aug 2025 23:44:02 +0000 (18:44 -0500)]
Cleanup: Several old status code locations (first pass).

The status code used to be broken up into separate groups, wrapped by conditional macros.
The conditional macros were removed but I had left the remaining work to be done later.
Now is later.

This relocates the following sets:
- F_array
- F_available
- F_buffer
- F_busy
- F_complete
- F_data
- F_debug
- F_end
- F_error
- F_fine
- F_network
- F_number
- F_warning

7 months agoCleanup: Fix typo of 'exit' in documentation comments.
Kevin Day [Sun, 3 Aug 2025 02:19:23 +0000 (21:19 -0500)]
Cleanup: Fix typo of 'exit' in documentation comments.

7 months agoFeature: Add F_load, F_refresh, F_reload, F_unload, F_socket_time status codes.
Kevin Day [Sun, 3 Aug 2025 22:33:04 +0000 (17:33 -0500)]
Feature: Add F_load, F_refresh, F_reload, F_unload, F_socket_time status codes.

This includes the associated "_not" codes.

7 months agoUpdate: The FLL tags file with the latest code.
Kevin Day [Sat, 2 Aug 2025 23:07:08 +0000 (18:07 -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).

7 months agoUpdate: Add additional documentation notes regarding threaded conditional waits.
Kevin Day [Sat, 2 Aug 2025 20:35:26 +0000 (15:35 -0500)]
Update: Add additional documentation notes regarding threaded conditional waits.

Make it easier to remember that the mutex must be locked before and unlocked after by the caller of the function.

7 months agoUpdate: Handle F_implement_not and F_support_not in fll_error.
Kevin Day [Sat, 2 Aug 2025 03:53:49 +0000 (22:53 -0500)]
Update: Handle F_implement_not and F_support_not in fll_error.

The Not Implemented and Not Supported error codes should be common enough to be handled by the standard FLL error print functions.

7 months agoCleanup: Fix alphabetic ordering in mocks.
Kevin Day [Sat, 2 Aug 2025 03:46:16 +0000 (22:46 -0500)]
Cleanup: Fix alphabetic ordering in mocks.

7 months agoFeature: Add f_thread_name_set() and f_thread_name_get().
Kevin Day [Sat, 2 Aug 2025 03:40:19 +0000 (22:40 -0500)]
Feature: Add f_thread_name_set() and f_thread_name_get().

These provide support for `pthread_setname_np()` and `pthread_getname_np(0)` respectively.

These pthread functions are not portable so provide the following variables to gracefully disable the calls:
  - `_pthread_setname_np_unsupported_`
  - `_pthread_getname_np_unsupported_`

The newly added functions return `F_implement_not` when these unsupported defines are set.
This allows for programs that call these to not really care if the thread naming support is present.
They can call the function and if it works, then it works and if it doesn't work, then it doesn't work.

7 months agoCleanup: Relocate local variables into block.
Kevin Day [Fri, 1 Aug 2025 00:47:00 +0000 (19:47 -0500)]
Cleanup: Relocate local variables into block.

The variable should be in a block so that they only exist as long as they need to.

7 months agoBugfix: Currency symbols are incorrectly being designated as unassigned.
Kevin Day [Sat, 19 Jul 2025 00:53:38 +0000 (19:53 -0500)]
Bugfix: Currency symbols are incorrectly being designated as unassigned.

An improper check in `private_f_utf_character_is_unassigned()` is resulting in valid currency symbols being treated as undefined.

Example:
```
  # echo "₿" | byte_dump -wt 4
  Piped Byte Dump: (in Hexidecimal)
  0000000000000000  e2 82 bf 0a  | �     ␊  |

  Invalid UTF-8 codes were detected for file '-'.
```

The following is the expected valid results:
```
  # echo "₿" | byte_dump -wt 4
  Piped Byte Dump: (in Hexidecimal)
  0000000000000000  e2 82 bf 0a  | ₿     ␊  |
```

8 months agoUpdate: Next micro version (0.7.3).
Kevin Day [Sun, 6 Jul 2025 20:59:54 +0000 (15:59 -0500)]
Update: Next micro version (0.7.3).

The following are the commands that I ran to make this change:
  # find build/ level_? specifications/ documents/ licenses/ -type f -exec sed -i -e 's|0\.7\.2|0.7.3|g' -e 's|^version_micro 2|version_micro 3|g' '{}' ';'
  # find level_3/ -name *.h -exec sed -i -e 's|_program_version_micro_s F_string_ascii_2_s|_program_version_micro_s F_string_ascii_3_s|g' -e 's|_program_version_micro_s_length F_string_ascii_2_s_length|_program_version_micro_s_length F_string_ascii_3_s_length|g' '{}' ';'
  # sed -i -e 's|version_micro 2|version_micro 3|g' build/*/settings build/stand_alone/*.settings level_*/*/data/build/*settings*

8 months agoCleanup: Remove not yet supported gitlab test.sh comment. 0.7.2
Kevin Day [Fri, 4 Jul 2025 20:00:36 +0000 (15:00 -0500)]
Cleanup: Remove not yet supported gitlab test.sh comment.

This has been used for some time now, so consider it supported.

8 months agoRegression: The --prepend command is not working.
Kevin Day [Wed, 2 Jul 2025 02:19:13 +0000 (21:19 -0500)]
Regression: The --prepend command is not working.

The commit f856496d258a223eb7eb5f8fe645297e8af27b46 introduced this problem.

The `<<< ${p}` was placed in the wrong location.
This happened due to a very simple regex that I used to mass make the changes.
I overlooked this complicated match pattern.

8 months agoCleanup: Documentation comments for program signal handlers.
Kevin Day [Tue, 1 Jul 2025 02:49:49 +0000 (21:49 -0500)]
Cleanup: Documentation comments for program signal handlers.

The function references and "must not be NULL" messages are missing.

8 months agoCleanup: Apply new script practices.
Kevin Day [Sat, 28 Jun 2025 03:35:45 +0000 (22:35 -0500)]
Cleanup: Apply new script practices.

Be more consistent about wrapping all variables in brackets.
This helps make the code more consistent and also more compatible with other interpreters like ZSH.

Don't use echo pipe syntax and instead use "<<<" redirection pipe syntax for passing variables to program calls.

The grep commands should use either `-sho` or `-shoP`.

8 months agoCleanup: Remove accidental version change in example go settings.
Kevin Day [Sat, 28 Jun 2025 03:32:29 +0000 (22:32 -0500)]
Cleanup: Remove accidental version change in example go settings.

8 months agoRegression: The console should return F_complete_not when incomplete.
Kevin Day [Sat, 28 Jun 2025 03:22:35 +0000 (22:22 -0500)]
Regression: The console should return F_complete_not when incomplete.

This is a regression in the commit 9d9f95d9f879ea4ca3477233f9ceb25251ba99f5.

The check to see if the needs array is still used on exit ended up moving up inside a nested function.

This results in situations where the check gets missed.

Relocate the check outside of the conditional blocks (but still inside the F_process conditional block).

8 months agoBugfix: Console stop is not appending to remaining array.
Kevin Day [Tue, 17 Jun 2025 01:43:25 +0000 (20:43 -0500)]
Bugfix: Console stop is not appending to remaining array.

Make sure `stop` variable is set to TRUE.
Add new types to differentiate between when "stop" has been reached and when "stop" has not been reached.
For example, the `f_console_parameter_state_type_wrap_up_stop_e` designates that the "stop" is reached and is performing wrap up.
When the type is `f_console_parameter_state_type_wrap_up_e`, then the wrap up is happening with the "stop" being reached.

The wrap up is now appending to the remaining array.

8 months agoUpdate: Unit tests for f_file_access functions.
Kevin Day [Sun, 15 Jun 2025 15:47:58 +0000 (10:47 -0500)]
Update: Unit tests for f_file_access functions.

I forgot to update the unit tests after making changes in this commit fc3aee088ea9767cae980cea2d6729fe5603353f.

8 months agoBugfix: File not found for file functions should be F_file_found_not.
Kevin Day [Sun, 15 Jun 2025 05:30:03 +0000 (00:30 -0500)]
Bugfix: File not found for file functions should be F_file_found_not.

The `F_file_not` is no the correct status code.
Instead, `F_file_found_not` should be returned.

8 months agoUpdate: The Featureless Make needs recurse callback.
Kevin Day [Sun, 15 Jun 2025 05:29:09 +0000 (00:29 -0500)]
Update: The Featureless Make needs recurse callback.

The recurse callback function parameter changed from `uint32_t` to `uint64_t`.

8 months agoCleanup: Fix _di_f_f_utf_, which should instead be _di_f_utf_.
Kevin Day [Sun, 15 Jun 2025 02:28:30 +0000 (21:28 -0500)]
Cleanup: Fix _di_f_f_utf_, which should instead be _di_f_utf_.

8 months agoFeature: Support F_recurse_not to skip recursing directory for fl_directory_do().
Kevin Day [Sun, 15 Jun 2025 00:03:50 +0000 (19:03 -0500)]
Feature: Support F_recurse_not to skip recursing directory for fl_directory_do().

The `fl_directory_do()` should support skipping directory recursion itself.
Add `F_recurse_not` checks before recursion.
The `F_recurse_not` does not prevent the action on the directory itself.

9 months agoUpdate: Improve status handling of fl_directory_do().
Kevin Day [Thu, 12 Jun 2025 02:13:26 +0000 (21:13 -0500)]
Update: Improve status handling of fl_directory_do().

Add `F_skip` support to allow skipping the next action for some path.

Honor the `F_break`, `F_continue`, `F_done`, and the `F_interrupt` more consistently.
Make sure to consistently clean up the directory stream when these are set.

9 months agoCleanup: Add the word 'an' to a documentation comment.
Kevin Day [Sun, 8 Jun 2025 23:48:32 +0000 (18:48 -0500)]
Cleanup: Add the word 'an' to a documentation comment.

9 months agoCleanup: Add unset main at the end of the example process scripts.
Kevin Day [Sun, 8 Jun 2025 23:48:11 +0000 (18:48 -0500)]
Cleanup: Add unset main at the end of the example process scripts.

9 months agoUpdate: Use a 64-bit for the recurse flag rather than a 32-bit integer.
Kevin Day [Sun, 8 Jun 2025 23:47:04 +0000 (18:47 -0500)]
Update: Use a 64-bit for the recurse flag rather than a 32-bit integer.

This should make the variable more flexible.

9 months agoCleanup: The script styling practices.
Kevin Day [Sun, 8 Jun 2025 01:42:17 +0000 (20:42 -0500)]
Cleanup: The script styling practices.

Over time my scripting style practices have changed.
Up date these older scripts.

The variables should always have braces (makes compatibilty with other shells like ZSH easier).
Add additional lines in certain places.
Make comments proper sentences by making first letter upper case.

9 months agoSecurity: Explicitly define IFS to prevent misuse.
Kevin Day [Fri, 6 Jun 2025 02:35:34 +0000 (21:35 -0500)]
Security: Explicitly define IFS to prevent misuse.

The scripts are written with certain expectations.
This expectation may not be properly met if the `IFS` value is changed.
This can potentially be used to create some sort of exploit.

Explicitly define IFS and then do so at a local variable scope to prevent affecting the callers IFS setting.`

9 months agoCleanup: Make value assignment pattern for outputs consistent.
Kevin Day [Fri, 6 Jun 2025 01:05:52 +0000 (20:05 -0500)]
Cleanup: Make value assignment pattern for outputs consistent.

Also make them alphabetical for convenience.

9 months agoBugfix: Directory recursion is losing the error state.
Kevin Day [Tue, 3 Jun 2025 03:49:25 +0000 (22:49 -0500)]
Bugfix: Directory recursion is losing the error state.

The stream is being closed at the end of the directory recursion regardless of the error state.
This ends up overwriting the status code.

Preserve the status code before closing the stream.
Process the stream close.
Then restore the original status if the original status has an error or if the stream close worked.

9 months agoBugfix: Incorrect processing order with --at, --select, and --total for FSS Read...
Kevin Day [Thu, 15 May 2025 01:52:51 +0000 (20:52 -0500)]
Bugfix: Incorrect processing order with --at, --select, and --total for FSS Read programs.

The parameters are processed in the wrong order when the `--total` is added to parameters with both `--at` and `--selet` specified at the same time.

The problem is with the correct at position needs to be properly checked and incremented.
In one case the `at` is already being used so I renamed that to `content` to help improve context readability as well as to allow me to use `at` to reference the `--at` parameter position association.

Add runtime unit tests to catch this problem.

I mostly focused on added the "order" tests.
I only manually checked the specific cases of `--at`, `--select`, and `--total`.
All others I just ignored and hope are correct.