From 93583418508acf4635f5d2064f627909c56e29c2 Mon Sep 17 00:00:00 2001 From: xchaos Date: Tue, 18 Mar 2008 11:49:05 +0000 Subject: [PATCH] version 0.6 moved to branches/ directory git-svn-id: https://dev.arachne.cz/repos/cll1h/trunk@62 4bb87942-c103-4e5a-b51c-0ebff58f8515 --- demos/trees.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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) } -- 2.30.2