Adding a new command rbtree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello HATAYAMA,

I am trying to add a new command can be used to display rbtree and
radix tree. After some investigation, I find they are similar to the
build-in command "list". So I send this mail to ask your opinion about
making cmd_list to be similar to the command "struct/union/*".

Another thing needed to be inquired is about the style of displaying
tree. I will list some of my thought, and some suggestion will be glad
to get from you.

1.
NODE ... : ...
  NODE ... : ...
    NODE ... : ...
      NODE ... : ...
    NODE ... : ...
  NODE ... : ...

This style can not indicate whether the leaf is left or right. And with
a big depth, the output may be ugly. So I do not like it.

2.
l - left child
r - right child

root NODE ... : ...
l    NODE ... : ...
ll   NODE ... : ...
lll  NODE ... : ...
lr   NODE ... : ...
r    NODE ... : ...

Of course, in radix tree, l & r will be changed to some string that can
indicate the child of a node. Still, with a big depth, the line will be
too long and ugly.

3.
root    NODE addr1 : ...
addr1 l NODE addr2 : ...
addr2 l NODE addr3 : ...
addr3 l NODE addr4 : ...
addr2 r NODE addr5 : ...
addr1 r NODE addr6 : ...

(l & r have the same meaning with the one in the 2.)

Surely, I prefer the the third one. What do you think? Or eliminating
the information indicating position is acceptable?

--
--
Regards
Qiao Nuohan



--
Crash-utility mailing list
Crash-utility@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/crash-utility


[Index of Archives]     [Fedora Development]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]

 

Powered by Linux