Skip to content

Releases: DreamyCecil/VDF

1.1

22 May 23:16

Choose a tag to compare

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).

1.0

09 May 15:59

Choose a tag to compare

1.0

The initial release of VDF/KeyValues parser.

Features

Data format

  • Pairs of key names and values as strings or as lists of more pairs.
  • Unquoted keys and string values until any whitespace or special token.
  • Single-line comments.
  • #base & #include macros that support relative and absolute paths.

Library

  • Reading from character buffers (null-terminated or sized) and from files.
  • Writing into character buffers (auto-expanded by step size) and into files (by writing character buffers as text).
  • Ability to specify the base directory to include files from using #base & #include instead of the current working directory.
  • Flags for toggling escape sequences in strings and support for multiple values under the same key name.
  • Lookup of values within lists.