summaryrefslogtreecommitdiffstats
path: root/src/tree.c
Commit message (Collapse)AuthorAgeFilesLines
* MqTree: Print root node addresses in debugging outputP. J. McDermott2018-09-301-0/+5
|
* MqTree: InternationalizePatrick McDermott2017-11-201-6/+8
|
* mq_tree_seek(): Mark as purePatrick McDermott2017-11-011-1/+1
| | | | And mark the static recursive function it calls as pure.
* src/tree.c: Fix missing "static" qualifierPatrick McDermott2017-11-011-1/+1
| | | | | | | | | Fixes: CC src/marquee-tree.o src/tree.c:251:1: warning: no previous prototype for ‘seek’ [-Wmissing-prototypes] seek(MqTree *node, gint offset) ^
* MqTree: Fix debugging output macro for disabled debuggingPatrick McDermott2017-10-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes: CC src/marquee-tree.o src/tree.c: In function ‘mq_tree_append_child_allocated’: src/tree.c:171:41: error: macro "debug_print_tree" passed 2 arguments, but takes just 1 debug_print_tree("Appended child", node); ^ src/tree.c:171:2: error: ‘debug_print_tree’ undeclared (first use in this function) debug_print_tree("Appended child", node); ^ src/tree.c:171:2: note: each undeclared identifier is reported only once for each function it appears in src/tree.c: In function ‘mq_tree_append_sibling_allocated’: src/tree.c:200:43: error: macro "debug_print_tree" passed 2 arguments, but takes just 1 debug_print_tree("Appended sibling", node); ^ src/tree.c:200:2: error: ‘debug_print_tree’ undeclared (first use in this function) debug_print_tree("Appended sibling", node); ^ src/tree.c: In function ‘mq_tree_remove_allocated’: src/tree.c:247:39: error: macro "debug_print_tree" passed 2 arguments, but takes just 1 debug_print_tree("Removed node", node); ^ src/tree.c:247:2: error: ‘debug_print_tree’ undeclared (first use in this function) debug_print_tree("Removed node", node); ^
* MqTree: Split long node lines of tree debugging outputPatrick McDermott2017-10-251-7/+18
|
* MqTree: Fix width of pointers in debugging outputPatrick McDermott2017-10-251-12/+18
| | | | And modify configure.ac to search for logl() and add -lm to LIBS.
* Revert "mq_tree_remove*(): Don't update children's positions"Patrick McDermott2017-10-251-4/+1
| | | | | | This reverts commit ab9570ff5e856e4cc4056cb970e732be29405444. Children's positions do need to be updated.
* mq_tree_remove*(): Fix parent and sibling linksPatrick McDermott2017-10-251-7/+15
|
* MqTree: Add links to new tree debugging outputPatrick McDermott2017-10-251-2/+9
|
* mq_tree_remove_allocated(): Remove trailing whitespacePatrick McDermott2017-10-251-2/+2
|
* mq_tree_remove*(): Don't update children's positionsPatrick McDermott2017-10-251-1/+4
|
* mq_tree_remove*(): Link node's next sibling or parent to last childPatrick McDermott2017-10-251-4/+6
|
* mq_tree_remove*(): Update tree sizesPatrick McDermott2017-10-251-0/+2
|
* mq_tree_remove*(): Print debugging outputPatrick McDermott2017-10-251-0/+2
|
* mq_tree_remove_allocated(): ImplementPatrick McDermott2017-10-251-2/+26
|
* mq_tree_remove(): Rename to mq_tree_remove_allocated()Patrick McDermott2017-10-251-1/+1
|
* MqTree: Rename debugging output functionsPatrick McDermott2017-10-251-15/+15
|
* mq_tree_append_child*(), mq_tree_append_sibling*(): s/Inserted/Appended/ in ↵Patrick McDermott2017-10-241-2/+2
| | | | debugging output
* mq_tree_insert_child*(), mq_tree_insert_sibling*(): Rename to mq_tree_append_*()Patrick McDermott2017-10-241-2/+2
|
* mq_tree_insert_sibling*(): Append rather than insert siblingPatrick McDermott2017-10-241-10/+9
|
* mq_tree_foreach_from(): Fix upward traversalPatrick McDermott2017-10-241-8/+9
| | | | | | | | | | | | | | | | | | | | | | | | Steps to reproduce bug: 1. From tab 1, append a new child 2. From tab 1, insert a new sibling 3. From tab 1, insert a new sibling The position of the last tab (the next sibling of the new tab inserted in step 3) gets updated twice. Tree debugging output: Traversing tree from position, starting at 0x12bf620 0x12bf620 0x1272f80 0x1272f80 Inserted sibling 0x12bf620, new tree (size 5): 0xe7f7f0 (size 5, position 0) 0xed3e10 (size 2, position 1) 0x114ef40 (size 1, position 2) 0x12bf620 (size 1, position 3) 0x1272f80 (size 1, position 5)
* mq_tree_insert_sibling*(): Fix new node positionPatrick McDermott2017-10-241-1/+1
|
* MqTree: Add inserted node address to debugging outputPatrick McDermott2017-10-241-6/+5
|
* MqTree: Add sizes and positions to insertion dbg outputPatrick McDermott2017-10-241-1/+2
|
* MqTree: Improve tree traversal debugging outputPatrick McDermott2017-10-231-3/+3
|
* mq_tree_insert_*(): Fix position updating tree traversalPatrick McDermott2017-10-231-9/+15
| | | | Just use mq_tree_foreach_from() now.
* mq_tree_foreach_from(): Fix tree traversalPatrick McDermott2017-10-231-19/+14
|
* MqTree: Add foreach debugging outputPatrick McDermott2017-10-231-0/+20
|
* MqTree: Fix some foreach recursionPatrick McDermott2017-10-231-11/+0
|
* mq_tree_insert_*(): Add debugging outputPatrick McDermott2017-10-231-0/+49
|
* mq_tree_seek(): Fix assertion failures in recursive callsPatrick McDermott2017-10-231-7/+13
|
* mq_tree_seek(): Split assertionPatrick McDermott2017-10-231-1/+2
|
* mq_tree_foreach_child(): Remove functionPatrick McDermott2017-10-231-20/+0
|
* mq_tree_foreach_child(): Loop over node's children, not root'sPatrick McDermott2017-10-231-1/+1
|
* mq_tree_foreach_from(): New functionPatrick McDermott2017-10-231-0/+32
|
* MqTree: Reduce code in foreach*() static functionsPatrick McDermott2017-10-231-20/+12
|
* mq_tree_foreach*(): Accept only one user data argumentPatrick McDermott2017-10-231-30/+14
| | | | | | | | | And update MqNotebook. The va_copy()s didn't seem to work. va_arg() in MqNotebook's find_node_compare() returned garbage, preventing the node from being found and causing the assertion in find_node() (as called by mq_notebook_insert_sibling() and mq_notebook_insert_child()) to fail.
* mq_tree_insert_root_allocated(): Set node sizePatrick McDermott2017-10-231-0/+1
|
* MqTree: New typePatrick McDermott2017-10-231-0/+226