- Nov 09, 2023
-
-
Jonathan Schöbel authored
These were excluded to separate files, because Mark was thought to make use of them.
-
- Jul 24, 2023
-
-
Jonathan Schöbel authored
The Validator also contains information about supported attrs. Currently they can't be initialized by a spec. Also it can only be queried whether an attr does exist at all and not whether it is supported in combination with a specific tag. The tests are missing.
-
- Jul 08, 2023
-
-
Jonathan Schöbel authored
There is a method to add a set of tags to a validator on initialisation. First this removes a user application from the burden of maintaining the html spec and also is more performant, as a lot of tags are to be inserted at once, so there aren't multiple allocation calls. As the validator needs the tags to be in order, the tags must be sorted on insertion. Of course it would be easier for the code, if the tags were already in order, but first there could be easily a mistake and second sorting the tags by an algorithm allows the tags to be specified in a logically grouped and those more maintainable order. For the sorting, insertion sort is used. Of course it has a worse quadratic time complexity, but in a constructor, I wouldn't introduce the overhead of memory managment a heap- or mergesort would introduce and in-place sorting is also out, because the data lies in ro-memory. Thus I choose an algorithm with constant space complexity. Also the 'long' running time is not so important, as the initilization only runs at startup once and the tags are not likely to exceed a few hundred so even a quadratic time isn't that bad.
-
- Jul 07, 2023
-
-
Jonathan Schöbel authored
Double inclusion accompanied with macro guards are a bit ugly in comparison to a separate file.
-
- Jun 24, 2023
-
-
Jonathan Schöbel authored
The marks are now allocated and the allocated, where appropriate.
-
Jonathan Schöbel authored
A mark will be used to point to a specific location inside of a text. Currently it can't do anything and isn't even used.
-
- Jun 21, 2023
-
-
Jonathan Schöbel authored
While it would be preferable, it doesn't seam to be possible to abstract over the internals of text_segment. That's why only some basic functionality is moved, but whether more is to follow, is not known yet.
-
- Jun 10, 2023
-
-
Jonathan Schöbel authored
The basic functionality to implement all abstract methods is added. This means, that TextFragment can be instantiated, but it can't do anything useful yet.
-
- Mar 17, 2023
-
-
Jonathan Schöbel authored
They are used later, if another internal module wants to use them.
-
Jonathan Schöbel authored
This is used later, if another internal module wants to include the declaration.
-
Jonathan Schöbel authored
When used with care, it is possible to bypass many strdup calls. To also save the instructions for the call, which are a lot of overhead now, link time optimization is turned on. (-flto)
-
Jonathan Schöbel authored
The structure SH_Attr implements an HTML Attribute.
-
- Jan 09, 2023
-
-
Jonathan Schöbel authored
-
- Jan 05, 2023
-
-
Jonathan Schöbel authored
-
- Nov 17, 2022
-
-
Jonathan Schöbel authored
Source code regarding tags are exported to validator_tag.c and validator_tag.h for better separation and integration of new features.
-
- Nov 15, 2022
-
-
Jonathan Schöbel authored
Instead of the trivial structure SH_Error, SH_Status is used. The name was chosen, because error/status is set independently whether an error has occurred. Beside the error type, it also contains the associated errno and an error message. The error message is also printed, when it is set. Generating error messages with variadic arguments is now also supported. There are also macros to check for a set status. The exception handling was removed for the *_free methods, because they can't fail predictably during runtime. Unfortunately the compiler reports, that inside the macro set_status printf may be called with NULL [printf (NULL)], although, this is explicitly debarred.
-
- Oct 17, 2022
-
-
Jonathan Schöbel authored
The make process was restructured to create a library. For this libtool is used to provide both static and dynamic linking. Also header inclusion guards were introduced, to prevent clients of the library to include some single file without including others. The types were exported with forward declarations for better abstraction. When compiling the library, the macro LIB_SEFHT_COMPILATION is defined and symbol declarations are exported fully. For compiling the tests this macro is also defined, as the tests not only tests the API, but also the internal state, because a lot of errors couldn't be detected otherwise.
-