X-Git-Url: https://git.harvie.cz/?a=blobdiff_plain;f=demos%2Ftrees.c;fp=demos%2Ftrees.c;h=d08bc15acbc1e2720e192ac381efd1e3f3bb7ba6;hb=436ac5fbbc41b28ca80c3011ff4495d9542603c7;hp=0000000000000000000000000000000000000000;hpb=818209bd9bec258c23559d3a604173493fa559ac;p=svn%2FCll1h%2F.git diff --git a/demos/trees.c b/demos/trees.c new file mode 100644 index 0000000..d08bc15 --- /dev/null +++ b/demos/trees.c @@ -0,0 +1,31 @@ +#include "cll1.h" + +def_mem(Leaf) +{ + int value; + array(Leaf); +}; + +program +{ + Leaf leaf,root=NULL; + + for_ints(i, 8,1,-2,745,-32,-64,27,4 ) printf(" [%d]",i) + { + leaf=get_mem(Leaf); + + //init + leaf->__next=NULL; + leaf->__seek=NULL; + leaf->__key=i; + + //grow tree + for(leaf=root; leaf && leaf->__key >= i ; leaf=leaf->__next) + { + if(leaf->__seek->key >=) + } + + + } + +}