From mboxrd@z Thu Jan 1 00:00:00 1970 From: Richard Wallman Subject: Re: ELKS port of Adventure - help needed :) Date: Wed, 11 Dec 2002 21:27:02 +0000 (GMT) Sender: linux-8086-owner@vger.kernel.org Message-ID: <200212112127.gBBLQx5G031546@eddie.loc> References: <1039594769.1511.27.camel@Castle.goembel> Mime-Version: 1.0 Return-path: In-Reply-To: <1039594769.1511.27.camel@Castle.goembel> List-Id: Content-Type: TEXT/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-8086@vger.kernel.org On 11 Dec, Phil Goembel wrote: > I'm guessing, without having looked at the code, that this is not a > source code problem. Possible a source code or bcc problem - the area to look at is the function 'binary' in the 'vocab.c' file. Put: printf("binary.vocab: mid=%d lo=%d hi=%d\n",mid,lo,hi); before and after the line: mid = (lo + hi) / 2; (about line 596 - I've been messing with my file) You'll see in the Linux compilation it follows a very nice textbook binary tree traversal. In the ELKS version, it starts out badly and just gets worse. I haven't found the cause yet - it's been a long day, and my brain isn't working properly :)~ I thought it might be something to do with overflow, but changing the int defs to long doesn't help. Still, there should be enough pointers here for someone to figure it out... (I'm still working on it as well) P.S. Phil - I think my mailer used your address rather than the list on my last post. Forward it if you like, but I think this supersedes it. -- Richard Wallman http://www.murkygoth.uklinux.net/elks