From: xchaos Date: Tue, 18 Mar 2008 11:49:05 +0000 (+0000) Subject: version 0.6 moved to branches/ directory X-Git-Url: https://git.harvie.cz/?a=commitdiff_plain;h=93583418508acf4635f5d2064f627909c56e29c2;p=svn%2FCll1h%2F.git version 0.6 moved to branches/ directory git-svn-id: https://dev.arachne.cz/repos/cll1h/trunk@62 4bb87942-c103-4e5a-b51c-0ebff58f8515 --- diff --git a/demos/trees.c b/demos/trees.c index d08bc15..e216d0c 100644 --- a/demos/trees.c +++ b/demos/trees.c @@ -9,20 +9,21 @@ def_mem(Leaf) program { Leaf leaf,root=NULL; + int newkey; - for_ints(i, 8,1,-2,745,-32,-64,27,4 ) printf(" [%d]",i) + for_ints(newkey, 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; + leaf->__key=newkey; //grow tree - for(leaf=root; leaf && leaf->__key >= i ; leaf=leaf->__next) + for(leaf=root; leaf && leaf->__key <= newkey ; leaf=leaf->__next) { - if(leaf->__seek->key >=) + if(leaf->__seek->key <= newkey) }