test commit
[svn/Cll1h/.git] / demos / trees.c
CommitLineData
436ac5fb 1#include "cll1.h"
2
3def_mem(Leaf)
4{
5 int value;
6 array(Leaf);
7};
8
9program
10{
11 Leaf leaf,root=NULL;
93583418 12 int newkey;
436ac5fb 13
93583418 14 for_ints(newkey, 8,1,-2,745,-32,-64,27,4 ) printf(" [%d]",i)
436ac5fb 15 {
16 leaf=get_mem(Leaf);
17
18 //init
19 leaf->__next=NULL;
20 leaf->__seek=NULL;
93583418 21 leaf->__key=newkey;
436ac5fb 22
23 //grow tree
93583418 24 for(leaf=root; leaf && leaf->__key <= newkey ; leaf=leaf->__next)
436ac5fb 25 {
93583418 26 if(leaf->__seek->key <= newkey)
cda3141a 27 {
28
29 }
30 else
31 {
32
33 }
34 }
35 }
436ac5fb 36}
This page took 0.191945 seconds and 4 git commands to generate.