Skip to content

Choose a tag to compare

@DreamyCecil DreamyCecil released this 22 May 23:16
· 2 commits to main since this release

Changes since 1.0

Data format

  • Enabled multi-key support in parser contexts by default, just like in Source.
  • Fixed not being able to read unquoted string tokens before null terminators.
  • Fixed unquoted string tokens eating up one more symbol on break.
  • Implemented support for C-styled block comments.
  • Removed support for single slash comments (e.g. / Like this comment).
  • Made #include & #base macros behave exactly like in Source.
    • Both of them are now executed at the end of the current list as to not intervene with upcoming pairs.
    • #base macro now recursively merges all pairs with the current list and only adds new pairs if they don't already exist.

Library

  • Added CMake project files and proper code samples with tests.
  • Added data types to pair values.
  • Made all pair functions always store copies of strings passed into their functions for safety.
  • Ability to specify a custom strdup() function alongside other memory management functions.
  • Reworked lists of subpairs from simple arrays into doubly linked lists.
  • Merged KV_List functionality with KV_Pair, only leaving the latter struct as a result.
  • Added assertions to specific functions in debug mode using assert() from the standard library.
  • Allowed specifying the pair key separately from pair values.
  • Replaced memory management function macros with proper function pointers to make it easier to specify them for keyvalues.c.
  • Slight parser optimizations.
  • Added a string printer via a new struct with functions for convenience.
  • Added more context to error messages, such as the error source (relative path to a file or a buffer).