Skip to content
Snippets Groups Projects
  1. Jun 24, 2023
  2. Jun 21, 2023
  3. Jun 20, 2023
    • Jonathan Schöbel's avatar
      improved configure.ac · 28341acd
      Jonathan Schöbel authored
      Some adjustments suggested by autoupdate and autoscan were added.
      28341acd
    • Jonathan Schöbel's avatar
      Merge branch 'feature/polymorph-fragment' · f965156b
      Jonathan Schöbel authored
      The transition from a single fragment, which is a tree, to a polymorph
      fragment implemented by a base class (Fragment) and a subclass for
      storing the tree (NodeFragment) and another subclass for storing text
      (TextFragment) is now considered complete.
      What is still missing is the proper treatment of embed text. This should
      be indented and breaked at 72/79/80. Also newlines and special chars
      should be replaced on generation, maybe also giving some way of
      preventing XSS. Regarding the NodeFragment there should be some
      adjustments to further adjust the styling, which of course should also
      be reflected by TextFragment. This should also include the generation of
      self-closing tags. Furthermore the html generation should be based on a
      single text object, to which is added to. This will later on also enable
      to directly send generated parts over the network while still generating
      some data.
      But all this changes are to meant to change the behaviour of existing
      classes, so the will be eventually implemented on seperate branches.
      f965156b
  4. Jun 19, 2023
    • Jonathan Schöbel's avatar
      Fragment (base): added tests · 9acc29b4
      Jonathan Schöbel authored
      The html generation for both TextFragment and NodeFragment combined is
      tested. As the encoding semantics of the TextFragments are neither
      defined nor implemented, some tests are marked as XFAIL.
      9acc29b4
    • Jonathan Schöbel's avatar
      TextFragment: added text wrapper methods · 20b53be3
      Jonathan Schöbel authored
      Some basic text functionality is now directly supported via wrapper
      functions.
      
      Note that wrapper functions aren't tested in unit tests.
      20b53be3
    • Jonathan Schöbel's avatar
      TextFragment: added direct getter for text · 585b596a
      Jonathan Schöbel authored
      While this method is neccessary to manipulate the content of a
      TextFragment, the TextFragment should abstract the semantics of Text.
      While simple wrapper functions for appending are to be added, methods
      purely manipulating the text, i.e. relying on the text's contents, wont
      get wrapper functions. Thus this method is still needed until a more
      sophisticated approach is implemented.
      585b596a
    • Jonathan Schöbel's avatar
      ci: make jobs interruptible · d7c1c9fc
      Jonathan Schöbel authored
      d7c1c9fc
    • Jonathan Schöbel's avatar
      created ci rules to build and create a package on gitlab · a6528ca1
      Jonathan Schöbel authored
      There are seperate build, test and release stages. Also the resulting
      package is uploaded. To do that a special script was written to get the
      real name of the package, which autoconf inserts into the scripts on
      configure-time.
      a6528ca1
  5. Jun 10, 2023
  6. Jun 09, 2023
  7. Jun 07, 2023
    • Jonathan Schöbel's avatar
      fixup! Attr: changed semantics of (internal) move method · 054edb99
      Jonathan Schöbel authored
      While it should not be the case, that the Attr's internal method free's
      the passed attribute, as some of the other internal methods pass
      non-allocated pointers to it, the methods visible by the user should
      indeed free things, where the ownership of every inner element is
      already transfered. This was adjusted now. As some tests have taken
      advantage of the fact, that while not to be changed, the old pointers
      were still accessible, they had to be adjusted.
      054edb99
    • Jonathan Schöbel's avatar
      improved demo program · e161f370
      Jonathan Schöbel authored
      The demo program now uses some of the new functionality.
      e161f370
    • Jonathan Schöbel's avatar
      NodeFragment: changed semantics of insert_attr_new · 75d83bf1
      Jonathan Schöbel authored
      When there are methods in the api/abi, that take pointers to strings to
      store them in the library, there are two methods to do so. Either they
      are copying the string and leaving it intact, or they directly assign
      the given pointer to some internal storage. While the former method, is
      safer in terms of memory, as the user doesn't have to remember that he
      can't use the string anymore, the latter can be more efficient, as there
      is no extra strdup call, but the user is not allowed to change the
      pointer, free it and also can't use the pointer, because it can't be
      known whether it is already freed by the library. As it should be
      decideable by the user, the library often implements both approaches,
      where the method, that directly store pointers without creating a copy
      contains the raw_ prefix.
      
      The insert_attr_new methods were somewhat confusing in this regard, as
      it is likely to be expected, that they were copying the string, while in
      fact they did not. This is now fixed. The insert_attr_new methods copy
      the strings, while the added insert_attr_raw_new methods preserve the
      old behaviour of the insert_attr_new methods, thus allowing to let the
      user choose, what is more appropriate.
      75d83bf1
  8. Jun 06, 2023
  9. Jun 05, 2023
  10. Jun 04, 2023
    • Jonathan Schöbel's avatar
      NodeFragment: added remove_attr methods · 76e06eec
      Jonathan Schöbel authored
      Two alternatives are provided: remove_attr and pop_attr. While the
      former free's the Attr's data, the latter allocates a new Attr, to store
      and return the data. Both functionality is provided by a single
      (internal) static method.
      76e06eec
  11. Jun 03, 2023
    • Jonathan Schöbel's avatar
      Attr: changed semantics of (internal) move method · 29c275e5
      Jonathan Schöbel authored
      This method needs to be used in places where freeing the src-pointer is
      not possible, as it may be not allocated. If freeing is needed, it is
      now in the responsibility of the caller. As it turns out this approach
      is not even more useful, it is also less work, as it can be determined
      from the fact, that adjusting the tests to the new behavior means
      actually removing lines, that were previously working around the quirks,
      that the old approach introduced.
      29c275e5
    • Jonathan Schöbel's avatar
    • Jonathan Schöbel's avatar
      configure: added automatic depency checking for check · db0618d9
      Jonathan Schöbel authored
      Until now, the configure script just checked for check to be installed,
      which is needed to compile the tests.
      Now, configure provides a conditional (MISSING_CHECK) depending on its
      presence for use by automake. If check is missing, the tests aren't
      compiled. Instead a special script is executed to inform the user of the
      problem and stops the testsuite. Note, that it was not possible to
      directly stop the generation of the testsuite by injecting a rule to a
      Makefile without relying on implementation details of automake.
      See:
      https://stackoverflow.com/questions/76376806/automake-how-to-portably-throw-an-error-and-aborting-the-target/76382437
      To allow the script to issue messages to stderr, AM_TESTS_FD_REDIRECT is
      used, because the parallel test harness redirects output of its tests to
      logfiles. This isn't used for the serial test harness, because there is
      no redirection to logfiles, but there AM_TESTS_FD_REDIRECT is also not
      taken into account.
      See:
      https://www.gnu.org/software/automake/manual/html_node/Testsuite-Environment-Overrides.html
      Additionaly configure also provides an argument to enforce both
      behaviours. When specifying --enable-tests=no the tests are not compiled
      regardless of the presence of check. If --enable-tests=yes, it is
      assumed, that tests are really needed and the mandantory check for check
      is performed thus providing the former behaviour. If not specified
      --enable-tests default to auto, which results in the same behaviour as
      --enable-tests=yes, if check is present, and like --enable-tests=no
      otherwise.
      db0618d9
    • Jonathan Schöbel's avatar
      added README · edba1aa3
      Jonathan Schöbel authored
      edba1aa3
    • Jonathan Schöbel's avatar
      added .gitignore · a994de64
      Jonathan Schöbel authored
      Hiding files, that are generated during build, shouldn't be a personal
      choice, thus they should be added to the global .gitignore.
      Note that in this project it is choosen, to not include generated files
      into the version control system, but of course they must be always
      included for distributions.
      a994de64
    • Jonathan Schöbel's avatar
      95e61150
    • Jonathan Schöbel's avatar
      fixup! NodeFragment: improved insert methods · 8c0ae580
      Jonathan Schöbel authored
      The prepend_child and append_child methods were previously not tested.
      They are now added to testing.
      8c0ae580
Loading