2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-28 13:08:06 +00:00

262 Commits

Author SHA1 Message Date
David Lawrence
8e1f35e1d7 free ancestor memory allocated in addonlevel 1999-02-01 03:26:00 +00:00
David Lawrence
265c6d0526 the space for the ancestor chain in addonlevel is now dynamic. 1999-01-31 19:55:52 +00:00
David Lawrence
94231e2288 added a function for getting space for ancestor nodes in the node_chain,
and use it within dns_rbt_findnode.

moved the guts of dns_rbt_deletename into its own function to clean up
the freeing of ancestor memory into just one location.

deletefromlevel required that ancestor_count be > 1, which would abort
trying to delete the root of the tree when the root had no children.
1999-01-31 18:43:57 +00:00
David Lawrence
97940a084c don't free the down data pointer in join_nodes. (what was i thinking?!)
do free the ancestor chain in dns_rbt_deletename
1999-01-31 16:50:01 +00:00
David Lawrence
d65db52903 deletetree does not take a root parameter any more.
removed the SET_foo macros left over from the rbtgen.c pseudo-code.
1999-01-31 01:35:04 +00:00
David Lawrence
0f5962ac3e many changes.
ancestor/level history no longer kept in rbt structure; node_chain structure
was created for this purpose, and each dns_rbt_deletename call will pass
the chain structure to dns_rbt_findnode.

color enum removed from rbtnode structure; single bit used instead

length of name in rbtnode no longer kept as int in rbtnode structure;
stored as single byte just past end of rbtnode, and the actual name data starts
two bytes past the end.

dns_rbt_create takes additional argument that is a pointer to a function
which is responsible for deleting the space pointed to by an rbtnode's data
pointer when the node is removed.

dns_rbt_addnode renamed to dns_rbt_addonlevel so that dns_rbt_addnode could
be a public function that can provide the address of the new node back
to the caller.

removed several #if 0 blocks that were held over from when parent pointers
were used.
1999-01-31 00:52:53 +00:00
Bob Halley
70db22e93b comparisions should be case-insensitive 1999-01-30 04:27:13 +00:00
David Lawrence
c4c843edb3 Basic deletion works again. Parent pointers have been expunged from
all the code.
1999-01-27 01:48:55 +00:00
David Lawrence
72d4e9f06f Don't use deletenode in deletetree, because the color fixups do not need
to be done, just the memory recovered.
1999-01-26 03:31:53 +00:00
David Lawrence
73d62a89f1 A variety of changes.
dns_rbt_node_t changed to dns_rbtnode_t to match ISC conventions.

  main() test routine and support functions removed, to be put in
    bin/tests/rbt_test.c

  adding a node and rotating left/right taught to not use parent pointers.

  deletion disabled because it currently does not know how to not use
    parent pointers, and since they are not being maintained by insertion,
    deleting has no prayer of working.

  several isc_result_t returns changed to dns_result_t.
1999-01-25 15:46:30 +00:00
Michael Graff
64ba6e4cc3 make this go on the Alpha. 1999-01-22 04:35:11 +00:00
David Lawrence
f389bc2c9e redblack.c include/dns/redblack.h
Initial (committed) implementation of red/black tree of trees.

Makefile.in:
	add redblack.o to libdns.
1999-01-20 10:13:43 +00:00