0.9.5 -featres and bugfixes (r1264) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [build] -Fix: more portable ranlib invocation -Change: move genht one level up so liblihata can be svn extern'd easier -Split: install dirs are in ../Makefile.conf -Add: install/linstall/uninstall executable of utils lhtflat and lhtview -Add: link and install static liblhtview.a -Add: $PREFIX [doc] -Fix: JSON array does support different types -Fix: remove non-unique-key hash option from the design doc requirements; we discarded that idea early on -Fix: www. for more stable links [dom] -Fix: make sure to remember file name pointers from the hash while introducing new locations - this is the only way the pointer stays valid as long as the document is valid -Fix: call parser error detail functions only if an error message needs to be written -Fix: use empty name for NULL name when creating a new node -Fix: export text doesn't introduce leading/trailing spaces -Fix: new, const correct hash keys -Fix: root is a text node: dom parser shouldn't segfault with missing active -Fix: don't brace a text value only because it contains a /, that's important for names because of paths, but not for values -Fix: loc_move file name hash handling bug got invalid source file name in all nodes being detached -Fix: INVALID nodes should be free'd too, they are oftne used as placeholders -Fix: don't crash if parent to be appended under is NULL while parsing -Fix: more appropriate error code for broken docs (text root) -Fix: do not create subtrees for te/sy and do not load text data into anything else than te/sy -Fix: do not abort on table col mismatch, just throw an error -Fix: don't free NULL table fields -Fix: list insert-after shall update parent->last when the newly inserted item is the new last item on the list -Fix: when exporting text (name or value), make sure \ and } are escaped with \ -Cleanup: lht_dom_table_grow_row returns with lht_err_t instead of int -Cleanup: lht_dom_list_insert returns with lht_err_t instead of int -Cleanup: lht_dom_export returns with lht_err_t instead of int -Add: user data field in each node so that lihata dom can be used as a generic tree data type -Add: recursive dup tree call -Add: function to decide whether a name or value needs to be protected with braces -Add: export with style -Add: parse/load a document from a string -Add: list clear utility function -Add: lht_dom_list_insert_after() [fungw] -Add: fungw bindings so scripts can use lihata [lhtflat] -Add: util to print a lihata file as a flat list [lhtpers] -Add: persist lib: merge-save to update a document keeping its formatting [parser] -Fix: avoid forward declared enums - C89 doesn't really permits this and the persist lib will need to see internal states too -Fix: prefix state value nameswith LHT_ -Fix: don't use char as bitfield, C89 won't allow that -Fix: properly parse the name and explicit type of quoted non-text nodes, e.g. {li:foo}={1;2} -Fix: indicate explicit type even when braced -Fix: special case for text: {key}={} (it used to mistake it for {}={key}) -Fix: accept \r as separator -Fix: avoid invalid memory handling on parser stack underflow -Add: function to expose internal parser state - required for persistent save -Add: query for explicit type and explicit name flags with state [regression tests] -Add: mising quoting test case -Add: special case for text: {name}={} -Add: ta_del_r tests all possible corner cases -Add: ta_del_c (with reference) -Add: tree_dup tests on hash, list, table, symlink and text [tester] -Add: test_tree call for testing tree dup -Add: tree tester: new_text can set text node name when argument has an '=' [tree] -Fix: invalid memory read while looking for a separator right at the end of a string -Fix: don't segfault if a floating tree is free'd (no doc) -Fix: tree del recursively free()'s detached trees properly (even tho they don't have a doc) -Fix: when inserting rows, don't memmove more rows than the table has becasue of the base offset -Fix: leaked detached doc in merge -Fix: corner case: when the root of a document is the source of a merge, make sure the source doc's root becomes NULL -Fix: move list clear from dom to tree, it depends on tree functions -Fix: tree merge: don't crash if source tree doc is NULL (merging in a floating subtree) -Fix: allocate tree table cols to expected 'allocated' size, not to number of cols actually used; the col grow code expects uniform over-allocation -Cleanup: lht_tree_table_del_row returns with lht_err_t instead of int -Cleanup: lht_tree_table_del_col returns with lht_err_t instead of int -Cleanup: lht_dom_table_grow_col returns with lht_err_t instead of int -Cleanup: lht_tree_table_ins_row_ returns with lht_err_t instead of int -Cleanup: lht_tree_table_ins_row returns with lht_err_t instead of int -Cleanup: lht_tree_table_ins_col returns with lht_err_t instead of int -Cleanup: list_del_nth returns with lht_err_t instead of int -Cleanup: const correctness: query-type calls should return mutable nodes (so that caller can change the tree) but take const nodes as starting point as they don't change anything in the tree -Cleanup: const correctness in name ':' split -Cleanup: rename list clean function to have the unified tree prefx -Split: merge function into public, per type merge functions so a different merge algorithm can reuse them -Add: tree merge with user provided node merge function 0.9.4 - tests and related bugfixes (r938) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [dom] -Fix: list iterator _first doesn't die on empty list [dom] -Fix: dom table free doesn't leak table row names [dom] -Fix: dom_hash_put: check error before doing any modification [tree] -Fix: return a more specific error message when an attempt is made to unlink the root of a doc [tree] -Fix: memory leak: when deleting a row of a table, node_free() the nodes, don't just free() them [tree] -Fix: memory leak: free nodes when deleting a table column [tests] -Cleanup: naming convention: tester names match real function names [tests] -Add: new tests: tree_unlink, tree_detach, list_detach_nth, table_named_cell, table_named_cell, dom_load, dom_iterate, dom_node_free, dom_list_append, dom_list_len, dom_list_insert, dom_hash_put, dom_hash_get, table_detach_child [tester] -Add: command to call lht_tree_del() [tester] -Add: count script line numbers to ease debugging [tests] -Fix: tts scripts free document loaded to avoid memory leaks 0.9.3 - tests and bugfixes (r820) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [dom] -Add: lht_dom_export [dom] -Add: dom pnode should print extra tags for node properties (whether the node is unlinked, detached, floating, is the root) [dom] -Fix: don't segfault for floating node being location-moved [tree] -Add: lht_tree_list_find_node [tree] -Add: lht_tree_path_build [tree] -Fix: assert table/list types in node find low level calls [tree] -Fix: empty segment in path should not change the current node (especially should not be considered as integer 0 for a list descend) [tree] -Fix: tree table call convention while replacing tree child (wrong order of args) [tree] -Fix: when checking for (broken) symlinks from a root, check root itself as well, before checking children [tree] -Fix: table node replace doesn't commit any modification on the table before finishing all sanity checks on the input args [tree] -Fix: table detach cell: check newn for NULL before use [tree] -Fix: node_is_under: a node is never under itself (not even root) [tree] -Fix: when merging cells from one table to another, make sure the doc and parent fields are set properly in the new table [tree] -Fix: table cell replace unlinks and does not detach the old node [tree] -Fix: list replace will unlink, not detach [tree] -Fix: hash unlinks instead of detaching on replace [marshaller] -Add: look up native pointers for symlinks [tests] -Add: revpath test also tests tightly coupled list_find_node [tests] -Add: test table for revpath tests [tests] -Add: table revpath tests [tests] -Add: export test [tests] -Add: table corner case test set with references - list and hash as table cell, named rows [tests] -Rename: table_insert_row.lht to ta.lht as it is used to more tts tests with inserts and deletion of rows and colums [tests] -Change: ta root is hash so that it's easier to address table cases by path (by name) [tests] -Update: ta_*.tts use paths instead of manual list crawling on ta.lht [tests] -Add: tree_has_sy.tts [tests] -Add: symlink_is_broken.tts [tests] -Add: introduce a broken symlink in symlink.lht for testing sy_is_broken [tests] -Add: ta_find_cell [tests] -Add: ta_detach_cell [tests] -Add: various tests for table row/col insert/del [tests] -Add: ta_replace_cell [tests] -Add: node_is_under [tests] -Add: li_repl_child [tests] -Add: li_det_child [tests] -Add: ta_repl_child 0.9.2 - detach cleanup, replace and documentation (r674) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [dom] -Change: API CHANGE: lht_dom_node_alloc() allocates floating node - there should be no node with doc field set but not linked in the tree or part of the unlinked list [dom] -Rename: API CHANGE: _tree_ prefixed calls to _dom_ prefixed calls [dom] -Change: move internal functions from dom.h to dom_internal.h and document the rest [dom] -Add: auto-freeing on detach (when detach_doc is 1 and root is removed) [dom] -Add: list and hash insert/append require detached node and move them under the current doc and set parent [dom] -Fix: allow appending nodes to floating subtrees [tree] -Fix: memmove() missing indirection bug when moving table rows/cols [tree] -Add: node replace function [tree] -Fix: when replacing cell of a table, make sure the detached node is moved into the document [tree] -Fix: lth_tree_detach() works for already detached nodes and root nodes [doc] -Add: document-tree-node API concepts: unlinking/detaching/deleting, floating nodes, iterators, debug/diagnostic calls [tests] -Add: table row/col insert/delete testes [tests] -Add: Tests.exclude lists local exclusions of test cases [tests] -Fix: sort ls output before generating Makefile.test - this will avoid unintended changes [util] -Add: prepare marshaler for pointers: - expect descriptions to be a hash of multiple structs - each struct must start with a type name (anonymous) - build field cache in marshaler 0.9.1 - core lib implementation (r618) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [lib] -Fix: lht_err_t return values are always positive [build] -Change: central Makefile.common for a module-based build system that handles cross-dependencies better [dom] -Fix: when growing table, don't realloc cols beyond cols [dom] -Split: move dangerous internal calls from dom.h to new dom_internal.h [tree] -Add: a function that determines whether a node is under another in the tree [tree] -Add: lht_tree_path_build() - reverse path build from node ptr [tree] -Add: lht_tree_sy_is_broken() [tree] -Add: hash del node function [tree] -Add: hash len function [tree] -Add: generic node detach [tree] -Add: node del function [tree] -Add: subtree merge code (empty symlink always fails to merge as specified in the doc since r600) [tree] -Add: symlink helper API and DFS implementation looking for symlinks and broken symlinks within a subtree [tree] -Fix: . and .. should behave as specified: . is ->parent, .. is ->parent->parent [tree] -Fix: tree.h does depend on dom.h - include it; include protection in tree.h [util] -Update: old PE_ references in validator lib [util] -Update: lht_marshaller for the "new" lht_ prefixes in the lib [util] -Add: lhtview - simple CLI for interactive inspection of lihata trees [util] -Fix: validator lib doesn't use stack_t (causes namespace collision on macosx) 0.9.0 - initial release ~~~~~~~~~~~~~~~~~~~~~~~ -Add: documentation: language design, design decisions and some API docs -Add: implementation of liblihata: fully functional event and dom parser and most of the tree handlers, including paths and basic symlink support -Add: example app: simple config load -Add: utilities: validator, flat marshaller