- Jan 04, 2023
-
-
Jonathan Schöbel authored
The validator was used to check that every created tag is validate. However I now think that validation should take place at a later time, so it is not mandatory. Thus developing the validator is now discontinued.
-
- 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.
-
- Oct 15, 2022
-
-
Jonathan Schöbel authored
The constructor SH_Text_new_from_string accepts a string, with that the text is initialized. This can replace the so far needed two calls SH_Text_new and SH_Text_append_string. When writing the test, it was neccessary to simulate an overflow. Thereby a bug was detected regarding another overflow test. The bug was, that when SIZE_MAX % CHUNK_SIZE == 0 (which is normally true, if 2^n is taken as the value for CHUNK_SIZE) there can't be an overflow, so the test for an overflow fails. Actually there wasn't a neccesity to check for an overflow, as this could easily be bypassed by just allocating the requested size instead of the next chunk size, if this would be greater then SIZE_MAX.
-
- Sep 20, 2022
-
-
Jonathan Schöbel authored
-
- Sep 18, 2022
-
-
Jonathan Schöbel authored
This renaming is neccessary, as the future Fragmment will be the base class to all Fragment types.
-
- Sep 01, 2022
-
-
Jonathan Schöbel authored
A Fragment can output it's html. If there is an error the method aborts and returns NULL.
-
- Jun 21, 2022
-
-
Jonathan Schöbel authored
This is a data type to deal with frequently appending to a string.
-
Jonathan Schöbel authored
When a tag is made known to the Validator, which it already knows, the old id is returned and nothing is added. As this has to be checked by iterating over all known tags, a new helper function is written for both SH_Validator_check_tag and SH_Validator_register_tag: SH_Validator_get_tag. Because we want also to test this function, we have to include validator.c in the test file and override the static keyword by an empty macro. It isn't possible any more to check for correct overflowdetection by setting the index to UINT_MAX, because it will be iterated over all data, thus raising an SIGSEGV when doing so. This is solved by filling garbage unil UINT_MAX is really reached. As there would be an timeout and it would fill RAM with around 40 GB of garbage, UINT_MAX is overriden prior to inclusion of validator.c .
-
- Aug 31, 2022
-
-
Jonathan Schöbel authored
-
- Jun 21, 2022
-
-
Jonathan Schöbel authored
Validator serves as an syntax checker, i. e. it can be requested whether a tag is allowed.
-
- Jun 20, 2022
-
-
Jonathan Schöbel authored
-
Jonathan Schöbel authored
-
Jonathan Schöbel authored
Tests are done using check, allowing to integrate the tests into the Autotools. Methods that are part of another unit, but are called in this unit aren't tested as this would interfere with the idea of unittests. This also applies for purely wrapper functions, where a call is passed to another unit.
-