]> Kevux Git Server - fll/log
fll
4 years agoUpdate: byte_dump should utilize color2 functions and handle zero-width characters
Kevin Day [Fri, 24 Apr 2020 02:50:44 +0000 (21:50 -0500)]
Update: byte_dump should utilize color2 functions and handle zero-width characters

4 years agoUpdate: further clarify fss specification rules in regards to leading/trailing whites...
Kevin Day [Fri, 24 Apr 2020 02:49:14 +0000 (21:49 -0500)]
Update: further clarify fss specification rules in regards to leading/trailing whitespace in object names

4 years agoFeature: add color print2 functions
Kevin Day [Fri, 24 Apr 2020 02:46:14 +0000 (21:46 -0500)]
Feature: add color print2 functions

It is very common to have colors that are bolded.
Adding a new function to handle to color codes so that bold can be used makes sense to me.

I do not like using numbers in function names, but in this exceptional case, it makes sense.

4 years agoCleanup: remove extra newline
Kevin Day [Fri, 24 Apr 2020 02:45:56 +0000 (21:45 -0500)]
Cleanup: remove extra newline

4 years agoBugfix: fix UTF-8 whitespace detection and provide zero-width detection function
Kevin Day [Fri, 24 Apr 2020 02:43:01 +0000 (21:43 -0500)]
Bugfix: fix UTF-8 whitespace detection and provide zero-width detection function

The whitespace detection codes for UTF-8 were incorrect.

Non-printing characters, called zero-width, are not whitespace.
Move them out of the whitespace detection and provide a new function for detecting zero-width.

Handle additional UTF-8 whitespace character codes that I had previously missed.

4 years agoFeature: implement support for the -T/--trim parameter
Kevin Day [Thu, 23 Apr 2020 01:40:50 +0000 (20:40 -0500)]
Feature: implement support for the -T/--trim parameter

Provide support for trimming the object names on input and output.

After implementing this I suddenly remember that the standard might require that the whitespace before and after a valid object name are to be ignored.
This may be removed in the future and fixed in the library.
Additional investigation on how I want to handle this needs to happen first.

The standard is originally designed around ASCII, which only ASCII whitespace is considered whitespace.
This will probably have to be fixed to match the additional goals of the project in terms of whitespace handling.

4 years agoUpdate: add simple documentation about private functions
Kevin Day [Wed, 22 Apr 2020 03:58:08 +0000 (22:58 -0500)]
Update: add simple documentation about private functions

4 years agoBugfix: correctly calculate end-- with UTF-8 and use correct function name
Kevin Day [Wed, 22 Apr 2020 03:50:15 +0000 (22:50 -0500)]
Bugfix: correctly calculate end-- with UTF-8 and use correct function name

When walking back from the end of the string and handling possible UTF-8 characters, the byte width needs to be properly handled.

The functions in these projects are fl_ and not f_.

Includes minor code cleanup.

4 years agoFeature: expand string functions and utf-8 string functions
Kevin Day [Wed, 22 Apr 2020 02:00:18 +0000 (21:00 -0500)]
Feature: expand string functions and utf-8 string functions

The need for this was realized while developing this trim parameter feature.
This has been added as is for commit isolation and may be incomplete.

This utilizes private functions to reduce duplicate code.
While the use of private functions is generally unwanted in this project, this specific case seems to be an exception.

Add rip functions.
Add non-dynamic equivalent of some string functions.
Add trim functions.

4 years agoUpdate: the print functions should increment by utf-8 char width and not 1
Kevin Day [Mon, 20 Apr 2020 04:53:54 +0000 (23:53 -0500)]
Update: the print functions should increment by utf-8 char width and not 1

The UTF-8 character may be of a width greater than 1.
The loop must increment by this width and not the literal 1.

4 years agoCleanup: ensure macro_ is pefixed in string macros
Kevin Day [Mon, 20 Apr 2020 04:51:44 +0000 (23:51 -0500)]
Cleanup: ensure macro_ is pefixed in string macros

4 years agoUpdate: experimentally switch to uint8_t to UTF-8 character processing
Kevin Day [Mon, 20 Apr 2020 04:48:41 +0000 (23:48 -0500)]
Update: experimentally switch to uint8_t to UTF-8 character processing

4 years agoUpdate: memory simple delete and simple destroy loop tweaks
Kevin Day [Mon, 20 Apr 2020 04:44:28 +0000 (23:44 -0500)]
Update: memory simple delete and simple destroy loop tweaks

Move the conditional outside of the loop for theoretical performance improvements.

4 years agoFeature: allow trimmed output
Kevin Day [Sun, 8 Mar 2020 23:16:38 +0000 (18:16 -0500)]
Feature: allow trimmed output

New functions added for trimming leading and trailing whitespace from some string.

4 years agoSecurity: fix memory leaks in FSS read programs
Kevin Day [Fri, 28 Feb 2020 04:30:54 +0000 (22:30 -0600)]
Security: fix memory leaks in FSS read programs

4 years agoCleanup: minor changes in f_print
Kevin Day [Fri, 28 Feb 2020 04:27:00 +0000 (22:27 -0600)]
Cleanup: minor changes in f_print

4 years agoCleanup: FLL errors is now FLL status
Kevin Day [Fri, 28 Feb 2020 04:25:40 +0000 (22:25 -0600)]
Cleanup: FLL errors is now FLL status

4 years agoCleanup: add missing parameter documentation for f_print_string()
Kevin Day [Wed, 26 Feb 2020 03:34:11 +0000 (21:34 -0600)]
Cleanup: add missing parameter documentation for f_print_string()

4 years agoProgress: continue development of FSS Extended List
Kevin Day [Tue, 25 Feb 2020 03:28:38 +0000 (21:28 -0600)]
Progress: continue development of FSS Extended List

In particular:
- Remove excessive fl_fss_increment_buffer() uses.
  - The removed code may be a good idea long term, but for now use a simpler and more efficient approach.
- Fix some mistakes in the slash delimiter handling.
- Begin the initial work for recursively (or so..) processing the nested lists.

4 years agoUpdate: add f_unterminated* status codes and fix f_unterminated_nest status codes
Kevin Day [Wed, 19 Feb 2020 01:51:17 +0000 (19:51 -0600)]
Update: add f_unterminated* status codes and fix f_unterminated_nest status codes

Add basic f_unterminated status codes just like f_unterminated_group status codes.
Fix missing status code conversions for f_unterminated_nest.

4 years agoCleanup: enable debugging by default for level and monolithic builds, just like with...
Kevin Day [Thu, 9 Jan 2020 02:54:33 +0000 (20:54 -0600)]
Cleanup: enable debugging by default for level and monolithic builds, just like with individual builds

4 years agoProgress: continue working on fss_extended_list
Kevin Day [Wed, 8 Jan 2020 03:44:33 +0000 (21:44 -0600)]
Progress: continue working on fss_extended_list

4 years agoCleanup: add period at end of sentences
Kevin Day [Wed, 8 Jan 2020 03:44:07 +0000 (21:44 -0600)]
Cleanup: add period at end of sentences

5 years agoUpdate: build level and monolithic fixes and improvements
Kevin Day [Sat, 23 Nov 2019 04:56:20 +0000 (22:56 -0600)]
Update: build level and monolithic fixes and improvements

Add missing library: fll_file.

Make it even easier to compile against "level" and "monolithic" build processes by providing "--level" and "--monolithic" parameters to the generate.sh script and associated settings files.

Make sure package.sh clears other build modes (when --level is specified, make sur --individual and --monolithic modes are not set).

5 years agoUpdate: implement *_delete_simple() and *_destroy_simple() macros and related changes
Kevin Day [Fri, 22 Nov 2019 02:24:43 +0000 (20:24 -0600)]
Update: implement *_delete_simple() and *_destroy_simple() macros and related changes

I do not want a *_delete() and *_destroy() that doesn't provide the ability to handle a status code.
However, in practice, the *_delete() and *_destroy() macros rarely needed the status response checked.
Additional f_status variables were created only to be provided for the status parameter of the stated macros.
This is a waste.

This provides and utilizes alternative *_delete() and *_destroy() macros called *_delete_simple() and *_destroy_simple().
These simple macros do not accept or process the status code.
The resulting code is simpler and easier.

I am on the fence whether or not to throw away the *_delete() and *_destroy() macros that utilize a status parameter.
Future versions may or may not replace the *_delete() and *_destroy() with the *_delete_simple() and *_destroy_simple() macros.

Update *_delete() and *_destroy() macros as needed.

5 years agoCleanup: fix spelling of occurred.
Kevin Day [Wed, 20 Nov 2019 02:21:26 +0000 (20:21 -0600)]
Cleanup: fix spelling of occurred.

5 years agoFeature: add new project fll_file
Kevin Day [Wed, 20 Nov 2019 02:21:07 +0000 (20:21 -0600)]
Feature: add new project fll_file

This project contains the function fll_file_error_print()  for handling common error output.

5 years agoRefactor: make status codes more consistent
Kevin Day [Wed, 20 Nov 2019 01:43:54 +0000 (19:43 -0600)]
Refactor: make status codes more consistent

Better follow the naming paradigm where reasonably possible.
Use more consistent naming, which should also help with reducing the changes of enum to function name conflicts.
Alphabetically organize status codes per group.

5 years agoUpdate: rewrite status code functions and related changes
Kevin Day [Wed, 20 Nov 2019 01:00:00 +0000 (19:00 -0600)]
Update: rewrite status code functions and related changes

Fix several problems with the status code processing, namely missing or incomplete data.
Add status code max size defines.
Add missing "#ifndef _di_f_status_codes_" to status codes.
Update cases where 'error' was not renamed to 'code' in status code sources.
Add missing status codes.
Fix incorrect define, "#ifdef _di_fl_status_invalid_" should instead be "#ifndef _di_fl_status_invalid_".
Fix incorrect sizes associated with status code output strings.
Prepare pipe support (not yet implemented).

Ensure f_utf is included and linked in all appriopriate dependencies.
Treat f_utf as a core level_0 project and update documentation accodingly.

Relocate fl_console_parameter_process() into f_console_parameter_process().

5 years agoCleanup: comments in f_utf
Kevin Day [Mon, 18 Nov 2019 01:27:39 +0000 (19:27 -0600)]
Cleanup: comments in f_utf

5 years agoFeature: enable custom filter and sort in fl_directory_list()
Kevin Day [Mon, 18 Nov 2019 01:25:40 +0000 (19:25 -0600)]
Feature: enable custom filter and sort in fl_directory_list()

5 years agoUpdate: Document fl_directory_list() and finish implementing it
Kevin Day [Mon, 18 Nov 2019 01:08:32 +0000 (19:08 -0600)]
Update: Document fl_directory_list() and finish implementing it

The said function is documented as incomplete and has now been completed.

5 years agoFeature: implement pipe support in byte_dump
Kevin Day [Sun, 17 Nov 2019 07:48:34 +0000 (01:48 -0600)]
Feature: implement pipe support in byte_dump

5 years agoBugfix: incorrect operators used in comparison
Kevin Day [Sun, 17 Nov 2019 07:15:10 +0000 (01:15 -0600)]
Bugfix: incorrect operators used in comparison

Should be using '&&' and not '||' when making sure the character is in the expected range.

5 years agoBugfix: When --last is set to 0, entire file is dumped
Kevin Day [Sun, 17 Nov 2019 06:58:40 +0000 (00:58 -0600)]
Bugfix: When --last is set to 0, entire file is dumped

The --last value being set to 0 is internally used to represent entire file.
Explicitly setting --last to 0 makes no sense, so set the minimum allowed size for --last to 1.

5 years agoBugfix: only present error when --first and --last are both provided and --last is...
Kevin Day [Sun, 17 Nov 2019 06:54:28 +0000 (00:54 -0600)]
Bugfix: only present error when --first and --last are both provided and --last is less than --first

If --first is specified by itself, --last is implicitly defined as the EOF.

5 years agoUpdate: byte_dump should take into consideration the offsets when processing --first
Kevin Day [Sun, 17 Nov 2019 06:40:59 +0000 (00:40 -0600)]
Update: byte_dump should take into consideration the offsets when processing --first

This includes moving some of the variables into structures to simplify the design.

5 years agoUpdate: use fl_console_parameter_to_number_unsigned() instead of atoll()
Kevin Day [Sun, 17 Nov 2019 01:15:57 +0000 (19:15 -0600)]
Update: use fl_console_parameter_to_number_unsigned() instead of atoll()

This includes minor source code changes.

5 years agoUpdate: only print newline when --empty is used and --select is 0
Kevin Day [Sat, 16 Nov 2019 21:06:05 +0000 (15:06 -0600)]
Update: only print newline when --empty is used and --select is 0

In all other cases with --empty and --select, such as --select 1, if that selection is empty do not print any newlines.

Remove some impossible conditions.

5 years agoUpdate: --name and --at in combination should process '--at' relative to '--name'
Kevin Day [Sat, 16 Nov 2019 20:50:58 +0000 (14:50 -0600)]
Update: --name and --at in combination should process '--at' relative to '--name'

This logic is already done with --line and other parameters.
Doing this same thing with --name and --at makes the code/logic more consistent and reasonable.

5 years agoCleanup: display correct standard in help for fss_basic_list_read and fss_extended_read
Kevin Day [Sat, 16 Nov 2019 05:01:59 +0000 (23:01 -0600)]
Cleanup: display correct standard in help for fss_basic_list_read and fss_extended_read

5 years agoUpdate: status code tweaks, including setting fl_fss_status_code_first as different...
Kevin Day [Sat, 16 Nov 2019 04:58:13 +0000 (22:58 -0600)]
Update: status code tweaks, including setting fl_fss_status_code_first as different from f_status_code_last

5 years agoCleanup: minor tweaks to comments
Kevin Day [Sat, 16 Nov 2019 04:21:43 +0000 (22:21 -0600)]
Cleanup: minor tweaks to comments

5 years agoUpdate: finish implementing fss_basic_list_read
Kevin Day [Sat, 16 Nov 2019 04:20:56 +0000 (22:20 -0600)]
Update: finish implementing fss_basic_list_read

5 years agoUpdate: finish implementing fss_extended_read
Kevin Day [Fri, 15 Nov 2019 03:15:39 +0000 (21:15 -0600)]
Update: finish implementing fss_extended_read

5 years agoUpdate: print newline for empty content even when --at and --line, so long as --empty...
Kevin Day [Fri, 15 Nov 2019 03:12:34 +0000 (21:12 -0600)]
Update: print newline for empty content even when --at and --line, so long as --empty is specified

5 years agoRegression: the --at parameter should be processed even when --depth is not specified
Kevin Day [Fri, 15 Nov 2019 02:46:26 +0000 (20:46 -0600)]
Regression: the --at parameter should be processed even when --depth is not specified

The implementation of --depth resulted in --at to not be processed when the --depth parameter is not provided.

5 years agoUpdate: ensure error output has appropriate highlighting
Kevin Day [Fri, 15 Nov 2019 02:44:57 +0000 (20:44 -0600)]
Update: ensure error output has appropriate highlighting

5 years agoCleanup: minor cleanups
Kevin Day [Fri, 15 Nov 2019 02:44:17 +0000 (20:44 -0600)]
Cleanup: minor cleanups

5 years agoBugfix: f_overflow should be returned with error bit set
Kevin Day [Fri, 15 Nov 2019 02:43:58 +0000 (20:43 -0600)]
Bugfix: f_overflow should be returned with error bit set

5 years agoBugfix: string to number conversions should handle leading 0's as a valid number
Kevin Day [Thu, 14 Nov 2019 03:04:55 +0000 (21:04 -0600)]
Bugfix: string to number conversions should handle leading 0's as a valid number

5 years agoFeature: add support for including empty content in fss_basic_read
Kevin Day [Thu, 14 Nov 2019 02:54:31 +0000 (20:54 -0600)]
Feature: add support for including empty content in fss_basic_read

Empty content is an object that has no content.
When there is no content for an object, no content is printed for that line and that line is not included in content totals or line selections.

5 years agoUpdate: finish implementing fss_basic_read
Kevin Day [Thu, 14 Nov 2019 02:44:53 +0000 (20:44 -0600)]
Update: finish implementing fss_basic_read

5 years agoProgress: continue implementing fss_basic_read, also numerous other fixes/tweaks
Kevin Day [Wed, 13 Nov 2019 06:12:42 +0000 (00:12 -0600)]
Progress: continue implementing fss_basic_read, also numerous other fixes/tweaks

I decided to allow --at and --name to be used at the same time (and therefore at the same --depth).
The depth code is to be rewritten and that is only partially rewritten.
Many of the parameters are now written and the fss_basic_read needs to be tested and reviewed.
(There fss_basic_read is still incomplete, but there is enough working code to begin testing.)

5 years agoBugfix: "true" is now a reserved type, so replace variable names of "true" with ...
Kevin Day [Tue, 12 Nov 2019 04:30:12 +0000 (22:30 -0600)]
Bugfix: "true" is now a reserved type, so replace variable names of "true" with "is_true"

5 years agoCleanup: add space to --help for duodecimal parameter
Kevin Day [Sun, 10 Nov 2019 04:39:41 +0000 (22:39 -0600)]
Cleanup: add space to --help for duodecimal parameter

5 years agoFeature: add support for duodecimal (base-12)
Kevin Day [Sun, 10 Nov 2019 04:31:20 +0000 (22:31 -0600)]
Feature: add support for duodecimal (base-12)

Now that duodecimal has been added to the FLL project, make sure byte_dump can print in that format.
There is no printf() code for base-12, so implement a custom print process.

Fix some typoes in the "hexi" decimal spelling.

5 years agoUpdate: implement f_number_signed and f_number_unsigned, as either 32-bit, 64-bit...
Kevin Day [Sun, 10 Nov 2019 04:28:28 +0000 (22:28 -0600)]
Update: implement f_number_signed and f_number_unsigned, as either 32-bit, 64-bit, or 128-bit

Provide the types f_number_signed and f_number_unsigned as a way to define the default "number" type to be used for string to number conversions and array indexes.
By providing 32-bit, 64-bit (default), and 128-bit types, the type can then be adjusted to more easily work on limited hardware or expand to more capable hardware.

This will be the recommended number data type to use in FLL functions going forward.

5 years agoProgress: f_conversion and fl_console changes
Kevin Day [Sat, 9 Nov 2019 07:27:49 +0000 (01:27 -0600)]
Progress: f_conversion and fl_console changes

This includes adding support for duodecimal (base 12)

5 years agoProgress: rewriting fss_* programs and all dependencies
Kevin Day [Sat, 9 Nov 2019 01:25:07 +0000 (19:25 -0600)]
Progress: rewriting fss_* programs and all dependencies

I am changing the parameters and design of the fss_* programs, such as fss_basic_read.
There is no work done on the fss_*_write programs yet.

There were a lot of changes in the dependencies, including cleanups and improvements.

The parameters passed to the fss_* functions will now be more consistent across each of them.
This should make scripting much easier.

There is a lot of incomplete work and I am focused currently on getting fss_basic_read to work as desired.
I halted my work on f_conversion and fl_console to make sure none of these changes are lost.

I do not expect this commit to compile with everything due to the incomplete work.
I would rather post incomplete code than risk losing code as has happened in the past.

5 years agoProgress: do not include closing brace when determining stop point in extended list
Kevin Day [Sat, 2 Nov 2019 20:54:42 +0000 (15:54 -0500)]
Progress: do not include closing brace when determining stop point in extended list

5 years agoProgress: use the content_nests equivalents in place of the contents
Kevin Day [Sat, 2 Nov 2019 20:05:07 +0000 (15:05 -0500)]
Progress: use the content_nests equivalents in place of the contents

When I copied basic_list code to use a starting point for extended, I missed creating "nest" equivalents to some code.

5 years agoProgress: continue working on fss-003 Extended List
Kevin Day [Fri, 1 Nov 2019 04:07:31 +0000 (23:07 -0500)]
Progress: continue working on fss-003 Extended List

A nested type has been created.
I suspect that I will need to change the structure of the other types to improve consistency, but more review and consideration is needed before any such changes are made.

A read program was written but it is essentially a copy and paste of Basic List, with a few minor changes just to make it compile.
The program arguments of all the FLL programs will need to be changed such that adding support for "depth" selection can be used for things lile Extended List.

The memory allocation is implemented but not reviewed.
I converted the behavior to support nesting, but I need to review the logic to ensure I caught everything.

No time was spent on the write support.

5 years agoProgress: begin implementing fss-003 Extended List
Kevin Day [Fri, 11 Oct 2019 04:19:26 +0000 (23:19 -0500)]
Progress: begin implementing fss-003 Extended List

5 years agoUpdate: FSS function documentation, use "location" instead of "input", have f_incompl...
Kevin Day [Fri, 20 Sep 2019 03:28:15 +0000 (22:28 -0500)]
Update: FSS function documentation, use "location" instead of "input", have f_incomplete_utf use error bit

5 years agoUpdate: finish implementing f_utf_character_is_valid() and related UTF-8 changes
Kevin Day [Wed, 18 Sep 2019 00:09:44 +0000 (19:09 -0500)]
Update: finish implementing f_utf_character_is_valid() and related UTF-8 changes

UTF-8 BOM is actually not a thing but only a suggestion, see RFC 3629.
I consider it a very bad practice now that I have learned that it is also the zero width space.
Get rid of the UTF-8 BOM support, it is a bad idea and is not to be supported by this project.

The referenced rfc also provides an easier way to view the valid ranges that my previous resources (such as wikipedia).
This helped me finish this function.

Updated byte_dump to better utilize this and to remove no longer necessary code.
Fix an accidental incorrect "invalid detection" check use before calling f_utf_character_is_valid() in byte_dump.
Explicitly print a "." or " " for UTF-8 control characters (ASCII control characters are already handled before this point so it is safe to call f_utf_character_is_control()).

5 years agoProgress: use a smaller byte structure for comparison in UTF-8 *_is_valid() function
Kevin Day [Tue, 17 Sep 2019 04:07:55 +0000 (23:07 -0500)]
Progress: use a smaller byte structure for comparison in UTF-8 *_is_valid() function

The full 4-byte wide character is still used in some circumstances.

5 years agoProgress: finish the main parts of invalid UTF-8 detection
Kevin Day [Tue, 17 Sep 2019 00:49:00 +0000 (19:49 -0500)]
Progress: finish the main parts of invalid UTF-8 detection

This wraps up the work needed for all explicitly declared invalid sequences.
There are some sequences, such as "Overlong", that are considered invalid (according to Wikipedia at this time) but the source (namely Wikipedia) does not explicitly declare what they are.
I need to figure out what these really are and handle them.
There are also likely cases of accidental copy and paste that will be fixed as I discover them (sorry, the size of documentation I had to go through to get these invalid sequences is massive to me).

There are also some @todo situations that I would like to resolve.

5 years agoProgress: more towards completing UTF-8 valid/invalid check
Kevin Day [Mon, 16 Sep 2019 04:22:19 +0000 (23:22 -0500)]
Progress: more towards completing UTF-8 valid/invalid check

5 years agoUpdate: int8_t and uint8_t are always size 1, so avoid sizeof(int8_t) and sizeof...
Kevin Day [Sun, 15 Sep 2019 03:41:48 +0000 (22:41 -0500)]
Update: int8_t and uint8_t are always size 1, so avoid sizeof(int8_t) and sizeof(uint8_t) calculations

5 years agoUpdate: disable init until I can get around to it
Kevin Day [Sun, 15 Sep 2019 03:35:26 +0000 (22:35 -0500)]
Update: disable init until I can get around to it

I decided to start at least clean up some of the compile errors, but this was simply too much of a mess.
Instead, just comment out code and deal with it later.

5 years agoProgress: continue adding to UTF-8 valid/invalid detection
Kevin Day [Sat, 14 Sep 2019 23:19:45 +0000 (18:19 -0500)]
Progress: continue adding to UTF-8 valid/invalid detection

5 years agoProgress: begin converting byte_dump to using f_utf_character_is_valid()
Kevin Day [Sat, 14 Sep 2019 20:59:45 +0000 (15:59 -0500)]
Progress: begin converting byte_dump to using f_utf_character_is_valid()

The function, f_utf_character_is_valid(), can be a bit expensive, so only call it if the current character is not already known to be invalid.

The function, byte_dump_print_text(), will need to be updated as well, given that the invalid range now includes some sequences currently being swapped with a space.

5 years agoCleanup: fix alignment of help text fo normal, simple, and classic parameters
Kevin Day [Sat, 14 Sep 2019 20:58:51 +0000 (15:58 -0500)]
Cleanup: fix alignment of help text fo normal, simple, and classic parameters

5 years agoProgress: continue UTF-8 work
Kevin Day [Sat, 14 Sep 2019 05:54:24 +0000 (00:54 -0500)]
Progress: continue UTF-8 work

5 years agoUpdate: types where not fully converted into new structure
Kevin Day [Sat, 14 Sep 2019 05:54:12 +0000 (00:54 -0500)]
Update: types where not fully converted into new structure

5 years agoUpdate: begin improving UTF-8
Kevin Day [Sat, 14 Sep 2019 00:38:52 +0000 (19:38 -0500)]
Update: begin improving UTF-8

I am now moving to perform a more thorough implementation of UTF-8 support.
Cleaned up the functions.

Due to the sheer size of the changes needed, I am uploading this is stages to ensure nothing gets lost.
The work done is incomplete.
The funtions will need to be reviewed once everything is in place.

5 years agoUpdate: redesign size types
Kevin Day [Thu, 12 Sep 2019 22:28:40 +0000 (17:28 -0500)]
Update: redesign size types

The FLL project is now being designed around explicit type usage.
Update the size type limitation #defines to be based on this.

5 years agoUpdate: use int8_t instead of char
Kevin Day [Thu, 12 Sep 2019 22:17:19 +0000 (17:17 -0500)]
Update: use int8_t instead of char

Guarantee that we are always dealing with 1-byte values by using int8_t instead of char.
They should be identical, but this prevents a given system from doing something different.
char by default is signed.

5 years agoUpdate: document f_type, switch f_bool fom unsigned short to uint8_t
Kevin Day [Thu, 12 Sep 2019 03:43:36 +0000 (22:43 -0500)]
Update: document f_type, switch f_bool fom unsigned short to uint8_t

5 years agoCleanup: document f_status
Kevin Day [Thu, 12 Sep 2019 03:43:19 +0000 (22:43 -0500)]
Cleanup: document f_status

5 years agoCleanup: document f_socket
Kevin Day [Thu, 12 Sep 2019 03:42:55 +0000 (22:42 -0500)]
Cleanup: document f_socket

5 years agoUpdate: documentation for f_pipe and add additional pipe functions
Kevin Day [Thu, 12 Sep 2019 03:38:30 +0000 (22:38 -0500)]
Update: documentation for f_pipe and add additional pipe functions

Provide f_pipe_warning_exists(), f_pipe_error_exists(), and f_pipe_debug_exists().
In theory, the program should be able to grab data piped from any of these sources, if both the source exists and a way to pipe the source exists.

5 years agoCleanup: documentation for f_path
Kevin Day [Thu, 12 Sep 2019 03:37:45 +0000 (22:37 -0500)]
Cleanup: documentation for f_path

5 years agoCleanup: documentation for f_memory
Kevin Day [Thu, 12 Sep 2019 03:36:57 +0000 (22:36 -0500)]
Cleanup: documentation for f_memory

5 years agoUpdate: documentation and increase f_fss_max_header_length to accomodate UTF-8 BOM
Kevin Day [Thu, 12 Sep 2019 03:35:46 +0000 (22:35 -0500)]
Update: documentation and increase f_fss_max_header_length to accomodate UTF-8 BOM

5 years agoUpdate: start enum's at 1 where possible
Kevin Day [Thu, 12 Sep 2019 02:03:08 +0000 (21:03 -0500)]
Update: start enum's at 1 where possible

By always setting enums as 1, the 0 value can be reserved as not-set.
There are still a few situations where enums must not start at 1.
Some are:
1) Type defenitions, so as in f_types where the status codes need to start at 0 for f_false.
2) Any enums that map 1to1 to an array, such as with parameter options.

5 years agoUpdate: document f_file functions and add missing functions
Kevin Day [Wed, 11 Sep 2019 03:57:09 +0000 (22:57 -0500)]
Update: document f_file functions and add missing functions

After reviewing and writing some documentation, it occurred to me that a few more functions should be written.

5 years agoUpdate: f_convesion, add comments and fix problems
Kevin Day [Tue, 10 Sep 2019 02:31:18 +0000 (21:31 -0500)]
Update: f_convesion, add comments and fix problems

Add comments (including correcting some existing ones).

Rename another case where digit should now be decimal.

Make sure the *decimal parameter only gets updated on success.
Be consistent about returning f_no_data.

5 years agoUpdate: Add 3 presentation modes to byte_dump: normal, simple, and classic
Kevin Day [Tue, 10 Sep 2019 00:44:12 +0000 (19:44 -0500)]
Update: Add 3 presentation modes to byte_dump: normal, simple, and classic

Normal presentation will replace ASCII control or whitespace character with the UTF-8 characters that represent this with a picture character.
Simple presentation will use a single space to represent any given ASCII control or whitespace character.
Classic presentation will do what the "hexdump" tool traditionally does and use a single period to represent an ASCII control or whitespace character.

5 years agoUpdate: add missing help options and fix miscellaneous minor issues
Kevin Day [Tue, 10 Sep 2019 00:24:51 +0000 (19:24 -0500)]
Update: add missing help options and fix miscellaneous minor issues

5 years agoBugfix: put '} // extern C' into correct location
Kevin Day [Tue, 10 Sep 2019 00:17:20 +0000 (19:17 -0500)]
Bugfix: put '} // extern C' into correct location

5 years agoUpdate: remove common type wrappers and use typedef instead of '#define'
Kevin Day [Mon, 9 Sep 2019 04:19:10 +0000 (23:19 -0500)]
Update: remove common type wrappers and use typedef instead of '#define'

I intend to begin transitioning from the core types like 'int', 'char', etc...
As part of this, I need to remove a number of the type #define wrappers.
This is also done, in part, because I learned that there are some equivalents to f_min_s_int.

Using explicit types is safer and better designed than something like 'char'.
The goal will be to replace 'char' with uint8_t (or int8_t as needed).

Furthermore, specifying int32_t and int64_t (and similar) should improve the code quality.
The use of types like "wchar", is dangerous because some systems use different sizes.
Instead, for something like "wchar", an uint32_t, might be used.
(although this project is to be designed around UTF-8 so the use of wchar is wrong anyway but it does make good example.)

5 years agoUpdate: add a space after "combining" characters and catch a few more invalid UTF...
Kevin Day [Mon, 9 Sep 2019 03:57:47 +0000 (22:57 -0500)]
Update: add a space after "combining" characters and catch a few more invalid UTF-8 sequences

Previously, I just printed a space instead of printing the "combining" characters.
It occurred to me that I could print a space following a known "combining" character to cause it to combine into a space.
This makes things easier to view and still displays the combining character instead of hiding it behind a blank space.
The downside is that this might cause problems if someone tried to copy and paste these combined characters.

Catch a few more invalid UTF-8 sequences that I came across while making these changes.
Fix an existing invalid UTF-8 sequence detection that seems to have been incomplete and incorrect.

5 years agoBugfix: last short parameter argument is not being processed correctly
Kevin Day [Mon, 9 Sep 2019 02:21:26 +0000 (21:21 -0500)]
Bugfix: last short parameter argument is not being processed correctly

For short parameters, only compare against a single character, not two.

5 years agoUpdate: use unsigned long for argc
Kevin Day [Mon, 9 Sep 2019 02:15:07 +0000 (21:15 -0500)]
Update: use unsigned long for argc

5 years agoUpdate: Simplifiy digit/decimal and hexidecimal functions
Kevin Day [Mon, 9 Sep 2019 00:46:41 +0000 (19:46 -0500)]
Update: Simplifiy digit/decimal and hexidecimal functions

Use simpler logic for determining if character is a decimal or a hexidecimal.
Rename digit to decimal.

5 years agoCleanup: move private functions into separate files
Kevin Day [Sun, 8 Sep 2019 23:44:14 +0000 (18:44 -0500)]
Cleanup: move private functions into separate files

5 years agoRefactor: ename bit_dump to byte_dump
Kevin Day [Sun, 8 Sep 2019 23:25:31 +0000 (18:25 -0500)]
Refactor: ename bit_dump to byte_dump

This program is operating on a per byte basis.
The name 'byte_dump' makes more sense than 'bit_dump'.

5 years agoFeature: implement --decimal display in bit_dump
Kevin Day [Sun, 8 Sep 2019 23:19:39 +0000 (18:19 -0500)]
Feature: implement --decimal display in bit_dump