- 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
Sometimes variables have to be passed to printf. Those the placeholders are adjusted. Later this should by solved by a variadic function.
-
Jonathan Schöbel authored
On initialization (of data), the Validator's knowledge is filled with some common tags. This is of course to be replaced later, by some dynamic handling.
-
Jonathan Schöbel authored
Data takes hold of the appropiate Validator.
-
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
The current page has to be returned, not the last one. This would lead to permanently wrong page ids, so that later no page is accessible.
-
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.
-
- Jun 21, 2022
-
-
Jonathan Schöbel authored
Error handling is done by passing an Error structure as inout parameter to functions that can fail on runtime predictable. This parameter is always the last one. Methods, where this is not the case, doesn't have an error parameter. When an Error is detected, also an ERROR is passed to the log. Because this isn't implemented yet, it is replaced by a nop. The macro EXIT becomes now useless. It was used earlier in case of an error, to terminate the program in the first place. This behaviour is not userfriendly, but it can't be decided on the library's side, whether there is an option to inform the user, something must be cleaned up or even that recovering is possible at all. Often these recognized errors are a non-working malloc or an over-/underflow. Error handling can be ignored by the caller by passing NULL to the Error parameter. Whether an error had occured, is also always possible to be determined, by examining the return value. If the error occours in a function returning a pointer, NULL will be returned. If it returns an value, a special error value of that type is returned, i.e. PAGE_ERR in SH_Data_register_page. If the return type would be void, a boolean is returned, which tells, whether the method has succeeded. (False means, that an error has occured.) The error may have occured in an intern method and is passed upwards (the stack). Internally errors are handled by an enum, but this must be considered an implementation detail and can be changed in later versions. It is in the responsibility of the caller to recover gracefully. It has to be assumed that the requested operation have neither worked, nor actually took place. Those the operation can be retried (hopefully).
-
- Jun 20, 2022
-
-
Jonathan Schöbel authored
-
Jonathan Schöbel authored
Fragment is the core of SeFHT. (As the name suggests) It represents a Node inside the DOM and all subsequent Nodes (a Tree).
-
Jonathan Schöbel authored
Pages are hold by Data, CMS passes trough the call(s).
-
Jonathan Schöbel authored
data handels all intern data and serves as a cache between the CMS and the (R)DBMS.
-
Jonathan Schöbel authored
cms will be the base "object", that performs all neccessary actions.
-
Jonathan Schöbel authored
-
Jonathan Schöbel authored
-
Jonathan Schöbel authored
-