]> Kevux Git Server - fll/log
fll
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.

10 months agoBugfix: Use fl_directory_create() instead of f_directory_create().
Kevin Day [Fri, 9 May 2025 02:30:34 +0000 (21:30 -0500)]
Bugfix: Use fl_directory_create() instead of f_directory_create().

The `fl_directory_create()` instead of `f_directory_create()` should be used to create the directory tree.

10 months agoCleanup: Remove unused fake_f_fake_execute_e.
Kevin Day [Fri, 9 May 2025 02:30:08 +0000 (21:30 -0500)]
Cleanup: Remove unused fake_f_fake_execute_e.

10 months agoBugfix: The fl_directory_create() is failing on directory exists with path ends in...
Kevin Day [Fri, 9 May 2025 02:23:39 +0000 (21:23 -0500)]
Bugfix: The fl_directory_create() is failing on directory exists with path ends in '/'.

The final directory gets created in the loop before the final directory create is called.

Check if the directory exists before the final directory create call.

10 months agoUpdate: Organize error status handling and address return codes.
Kevin Day [Fri, 9 May 2025 00:54:09 +0000 (19:54 -0500)]
Update: Organize error status handling and address return codes.

Improve some of the status handling that I noticed.

Several functions are return code 0 even on status errors.
Only when the execute is performed does the return code get set to something else.
Make sure this behavior is consistent.

There `fake_execute()` does not need to have the error message printed after calling.
That function already prints the error messages as needed.

10 months agoBugfix: Featueless Make array cache is being reset incorrectly in some cases.
Kevin Day [Thu, 8 May 2025 23:46:36 +0000 (18:46 -0500)]
Bugfix: Featueless Make array cache is being reset incorrectly in some cases.

The functions `fake_build_library_static_object()` and `fake_build_object()` are appending compiler arguments to the arguments cache.
Before this cache gets used, a for loop resets the cache and starts appending to the cache.
The initial data loaded into the cache gets lost without ever being used.

10 months agoWorkaround: The compiler and linker fail to understand that compiling statically...
Kevin Day [Thu, 8 May 2025 04:28:59 +0000 (23:28 -0500)]
Workaround: The compiler and linker fail to understand that compiling statically should also link statically.

This is a logic or design flaw that is just plain idiotic.
When compiling statically (passing `-static`), there cannot be any shared/dynamic linked data.

Rather than recognizing this, if there is a shared library during a static build then the shared library is linked to.

The compiler and linker, at least, supports explicitly forcing the point that a static library is to be linked.
This is done via `-l:libc.a` for libc linking rather than `-lc`.

This should not be necessary, but it unfortunately is.

10 months agoUpdate: Add none enumeration for fake_build_type_*_e.
Kevin Day [Thu, 8 May 2025 03:34:07 +0000 (22:34 -0500)]
Update: Add none enumeration for fake_build_type_*_e.

10 months agoCleanup: Remove extra space.
Kevin Day [Fri, 2 May 2025 00:55:37 +0000 (19:55 -0500)]
Cleanup: Remove extra space.

10 months agoUpdate: Next micro version (0.7.2).
Kevin Day [Thu, 1 May 2025 01:37:06 +0000 (20:37 -0500)]
Update: Next micro version (0.7.2).

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\.1|0.7.2|g' '{}' ';'
  # find build/ level_? specifications/ documents/ licenses/ -type f -exec sed -i -e 's|^version_micro 1|version_micro 2|g' '{}' ';'
  # find level_3/ -name *.h -exec sed -i -e 's|_program_version_micro_s F_string_ascii_1_s|_program_version_micro_s F_string_ascii_2_s|g' '{}' ';'
  # find level_3/ -name *.h -exec sed -i -e 's|_program_version_micro_s_length F_string_ascii_1_s_length|_program_version_micro_s_length F_string_ascii_2_s_length|g' '{}' ';'
  # sed -i -e 's|version_micro 1|version_micro 2|g' build/*/settings build/stand_alone/*.settings level_*/*/data/build/*settings*

10 months agoUpdate: Set month year in man pages to April 2025. 0.7.1
Kevin Day [Tue, 29 Apr 2025 22:46:23 +0000 (17:46 -0500)]
Update: Set month year in man pages to April 2025.

I am finding it much easier to simply mass update everything to a single year rather than only update what is known to change.
These dates need to be updated based on the year and month of the release.

10 months agoUpdate: Internal Cmocka version to 1.1.7.
Kevin Day [Mon, 28 Apr 2025 23:18:21 +0000 (18:18 -0500)]
Update: Internal Cmocka version to 1.1.7.

10 months agoRegression: Only append leading slash if the map values are not empty in Featureless...
Kevin Day [Mon, 28 Apr 2025 23:13:50 +0000 (18:13 -0500)]
Regression: Only append leading slash if the map values are not empty in Featureless Make.

The `source` can be an empty string for local paths, such as with the cmocka build settings file.

10 months agoUpdate: Improve example bootstrap script, exiting properly on error.
Kevin Day [Mon, 28 Apr 2025 22:14:33 +0000 (17:14 -0500)]
Update: Improve example bootstrap script, exiting properly on error.

The `bootstrap-example.sh` has been used as a demonstratable example that can be used to build this project.
This script has become incredibly convenient but I had not made it as resilient as it could be.

This changes the script to properly exit with a non-zero return code on error.
This should allow for adding this script to a series of bash commands along with the conditional operators like `&&` and `||`.

10 months agoUpdate: Add after_action and before_action helper flags for f_directory_recurse_do.
Kevin Day [Sun, 27 Apr 2025 22:28:17 +0000 (17:28 -0500)]
Update: Add after_action and before_action helper flags for f_directory_recurse_do.

10 months agoRegression: Fix the preserve and offset calculation in Featureless Make.
Kevin Day [Sun, 27 Apr 2025 22:18:00 +0000 (17:18 -0500)]
Regression: Fix the preserve and offset calculation in Featureless Make.

This addresses the problems observed in commit 3befe37125e426d452a1b9b9a1fab97ab221c7f1.
I never got the time to investigate this before I made my end of day commit.
This now addresses the observed problems.

The offset application logic is accidentally reversed.
This is now corrected.

The new logic does not require the buffer because the directory is being created later on in the process.
Using the `f_string_append_nulless()` to easily copy the source path with the offset onto the destination path.

Update the documentation comments to better communicate this behavior.

10 months agoUpdate: Add verbose printing of the install command when in debug for test.sh.
Kevin Day [Sun, 27 Apr 2025 21:03:52 +0000 (16:03 -0500)]
Update: Add verbose printing of the install command when in debug for test.sh.

10 months agoUpdate: Featureless Make with regard to recent fl_directory_do() changes.
Kevin Day [Sun, 27 Apr 2025 03:09:42 +0000 (22:09 -0500)]
Update: Featureless Make with regard to recent fl_directory_do() changes.

The changes to `fl_directory_do()` requires that the Featureless Make be updated.

I noticed that the `fake_build_copy()` has the `perserve_offset` parameter (also a typo in the name).
This was added in a hackish way in the past as sort of a quick and lazy solution.
Break this out into two parameters `preserve` and `offset` to allow for preserving the path with no offset at all.
I believe the current function structure is still not ideal but that is a problem for another time.

The `fake_do_copy_action()` callback for `fl_directory_do()` is now rewritten.
I distantly remember not being happy with the situation of the code and I would have needed to fix the `cache_map` to have a more logical use.
There were too many changes going on at the time and I did not want to deal with changing that as well.
Well, the problem of that approach finally caught up with me and I have fixed it now.
The `cache_map` now has the `key` as the source directory and the path as the `destination` directory.

I impulsively decided to use a `uint8_t` to designate the functions.
Then I wrapped the code in `F_status_is_error_not()` to allow for calling the error handling later on.
This has a downside of a rather ugly ternary blob.
Aside from the ternary blob, the rest of the code is rather simpler due to the avoidance of always handling the error and returning.

This is not well tested and I need to review the changes made as it should affect how the Featureless Make builds the tree structure.
The unit tests do seem to be failing to build.
I suspect there is some sort of problem in these changes that need to be further investigated.

10 months agoUpdate: Change fl_directory_do() to make the action optional as well.
Kevin Day [Sun, 27 Apr 2025 02:46:04 +0000 (21:46 -0500)]
Update: Change fl_directory_do() to make the action optional as well.

The action flag for `fl_directory_do()` should also be optional.
Adjust the code so that recursion still happens even if the action flag is not set.

This better allows for cases where the before is to be used but the action itself is not needed.
This happens to be the case with Featureless Make.

Add additional helper flags.

Improve documentation comments.
Add a warning about setting the top string to a string that is changed during recursion.

10 months agoCleanup: Remove build files from source directory.
Kevin Day [Sat, 26 Apr 2025 21:39:02 +0000 (16:39 -0500)]
Cleanup: Remove build files from source directory.

These file should not have been included and got included by accident.

10 months agoCleanup: Private fl_directory_do() code structure.
Kevin Day [Sat, 26 Apr 2025 21:30:46 +0000 (16:30 -0500)]
Cleanup: Private fl_directory_do() code structure.

Reduce the duplicate code by moving the callback outside of two blocks.

10 months agoBugfix: Incorrect flags passed to fl_directory_do().
Kevin Day [Sat, 26 Apr 2025 21:29:11 +0000 (16:29 -0500)]
Bugfix: Incorrect flags passed to fl_directory_do().

The `recurse->flag` should not be passed to the action and other callbacks.

10 months agoBugfix: Correct the fl_directory_do() top-level path execution order.
Kevin Day [Sat, 26 Apr 2025 03:03:10 +0000 (22:03 -0500)]
Bugfix: Correct the fl_directory_do() top-level path execution order.

The before must happen before the directory recurse.
The action must happen after the directory recurse.
The after must happen after the action.

This is already done in the recursive paths and it is now done in the top level path.

Update the documentation comments to more accurately and better explain this.

Apply the directory path resetting following recurse at the top level as well.

10 months agoBugfix: The fl_directory_do() depth is not being incremented at the top.
Kevin Day [Wed, 23 Apr 2025 02:45:16 +0000 (21:45 -0500)]
Bugfix: The fl_directory_do() depth is not being incremented at the top.

The top-most level must increment the depth before the initial recursion.

10 months agoUpdate: Use defines over enums in f_console, add stop behavior, and add alone behavior.
Kevin Day [Mon, 21 Apr 2025 00:49:56 +0000 (19:49 -0500)]
Update: Use defines over enums in f_console, add stop behavior, and add alone behavior.

The enumerations take up more space in the binary.
Several of the enumerations are being used as flags instead of enumerations.
I was not certain how I should do handle this in the past but now I am certain that using defines for flags is the way to go.

The ability to trigger stopping of the processing of parameters and storing the remaining parameters in the remaining array for f_console is now added via a stop flag.
The "alone" behavior is not complete and is a good to have for the desired stop behavior.
Many classic programs us `--` to trigger the end of the parameters.
The "stop" and "alone" behaviors allow for `--` to be used in the same way as classic programs.

10 months agoUpdate: The fl_directory_do() documentation comments and tweak flags.
Kevin Day [Sat, 19 Apr 2025 02:54:23 +0000 (21:54 -0500)]
Update: The fl_directory_do() documentation comments and tweak flags.

The documentation comments on how `fl_directory_do()` operates is now correctly updated.

Add an additional helper flag.

Improve use of flags in the process.

10 months agoBugfix: The fl_directory_do() needs to always process at the top level.
Kevin Day [Sat, 19 Apr 2025 02:19:11 +0000 (21:19 -0500)]
Bugfix: The fl_directory_do() needs to always process at the top level.

The top level directory is not being processed when the depth is less than the max depth.

Make sure to add the directory flag as well.

10 months agoUpdate: The experimental fll.c.tags.
Kevin Day [Fri, 18 Apr 2025 20:55:25 +0000 (15:55 -0500)]
Update: The experimental fll.c.tags.

10 months agoCleanup: Remove private headers from installation build path.
Kevin Day [Fri, 18 Apr 2025 20:47:56 +0000 (15:47 -0500)]
Cleanup: Remove private headers from installation build path.

10 months agoUpdate: Add directory functions, re-design fl_directory_do().
Kevin Day [Thu, 17 Apr 2025 03:11:27 +0000 (22:11 -0500)]
Update: Add directory functions, re-design fl_directory_do().

Add several directory functions.
I still may need to add more, such as a rewind to handle rewinddir().

Change the directory recurse do flags from an enumeration to defines.
Add a type fo handling `DIR *` called `f_directory_stream_t`.

Get rid of the directory listing structure to reduce memory usage.
This is only possible by replacing the `scandir()` with custom direct processing.
This change reduces the number of looping and removes the sorting behavior.
The directory recurse do flags are now redesigned.
The `top` is now entirely removed because a depth of 0 can be used to test for top without needing a flag.
The `opendir()` still has a notable cost, especially during recursion.
I need to do more research into how to more efficiently call `opendir()` without consuming too much memory.
The documentation comments still needs to be reviewed following these changes.

Make sure the directory functions only update the id values if there is no error.

Explicitly check for `-1` as return error rather than `< 0` to be more consistent with the standards.

Use typedefs to define callbacks.

Tweak the `fl_directory_list()` design.
Tweak the `fl_directory_path_pop()` design.

11 months agoRegression: Parent directory in recursion does not get processed properly.
Kevin Day [Sun, 13 Apr 2025 02:20:42 +0000 (21:20 -0500)]
Regression: Parent directory in recursion does not get processed properly.

The commit 8df0301badf6f38fcb4ddf73318e02708ad344f7 fixed a problem with the parent directory not being processed at all.
It failed to handle the situation where the child directory alters the path to append itself.

Save the parent directory path and then restore it after processing the child directory.

Many POSIX libc functions work on NULL termination where possible.
Make sure a NULL termination exists after restoring the path.

11 months agoUpdate: Add recurse flag masks.
Kevin Day [Sun, 13 Apr 2025 01:54:37 +0000 (20:54 -0500)]
Update: Add recurse flag masks.

This adds `f_directory_recurse_do_flag_action_mask_e` and `f_directory_recurse_do_flag_top_mask_e`.
These are helper flags for existing flag sets as a convenience.

11 months agoBugfix: The fl_directory_do() needs to operate on the parent directory during recursion.
Kevin Day [Thu, 10 Apr 2025 03:51:18 +0000 (22:51 -0500)]
Bugfix: The fl_directory_do() needs to operate on the parent directory during recursion.

The parent directory must be processed after recursion during the recursion steps.
These should not have the `f_directory_recurse_do_flag_top_after_e` flags because these are not top level.
These must have action because the action is expected to be performed on the directory just like other file types.

11 months agoCleanup: Add missing function documentation for fll_program_standard_signal_received_...
Kevin Day [Thu, 10 Apr 2025 02:29:56 +0000 (21:29 -0500)]
Cleanup: Add missing function documentation for fll_program_standard_signal_received_wait().

11 months agoFeature: Add fll_program_signal_check_loop() and fll_program_signal_check_simple().
Kevin Day [Wed, 9 Apr 2025 02:23:33 +0000 (21:23 -0500)]
Feature: Add fll_program_signal_check_loop() and fll_program_signal_check_simple().

These functions are already implemented in each of the level 3 programs.
The functions are pretty much identical.
Move the signal check logic into the `fll_program` project as `fll_program_signal_check_loop()` and `fll_program_signal_check_simple()`.

Update all of the programs, removing their variation and instead using one of these two.
Utilize a macro to call one or the other based on thread enabled state.

The fss_write payload is not calling the fss_write function and is instead using its own variation.
Replace that code with the macro as well.

Remove all stale and no longer needed signal check defines.

11 months agoCleanup: Remove unnecessary status checks in fl_directory_do().
Kevin Day [Fri, 4 Apr 2025 00:51:41 +0000 (19:51 -0500)]
Cleanup: Remove unnecessary status checks in fl_directory_do().

These checks are performed later on in the code at the end of the loop without additional status changes in between.

11 months agoBugfix: The fl_directory_do() needs to pass f_directory_recurse_do_flag_directory_e...
Kevin Day [Fri, 4 Apr 2025 00:46:57 +0000 (19:46 -0500)]
Bugfix: The fl_directory_do() needs to pass f_directory_recurse_do_flag_directory_e at the top.

At the top, before recursion, the path is known to be a directory.
The flag `f_directory_recurse_do_flag_directory_e` must be passed to the callbacks to let the callbacks know this is a directory.