jamesd@lakesys.UUCP (James Dicke) (12/08/88)
Since SO many people have been requesting, hounding, and asking questions about the B-PLUS (B-TREE database source) I posted last week I felt I should let you know what I did with my version. PLEASE NOTE: My version dosn't work fully yet, as I have not had the time to tackel it any more... But here are the things I did to get it at least to run on a Xenix 2.2.1 286. First off, it was written for MSC 5.0- not Xenix. But it should work fine since it dosn't have record locking anyways. There are several functions that it uses that are not supported in the Xenix version of the C compiler. Xenix C compile defaults to "cdecl" so you can strip it or define it to null. Second you have to set the "-Me" compiler option to allow the "pascal" type. The Xenix compiler dosn't set the SEEK_ standards so you'll need to: #define SEEK_SET 0 #define SEEK_CUR 1 #define SEEK_END 2 The functions missing that I noticed were: strupr and filelength. Here is some code for the strupr, but I didn't know how to do the filelength so I used lseek instead. /********* strupr - convert an entire string to UPPER case *********/ void strupr( s ) char s[]; { int p = 0; while ( s[p] != NULL ) { s[p] = toupper( s[p] ); p++; } } /* strupr */ /*** XENIX notes: cdecl is defualt and undefind so it was sripted. SEEK_SET, SEEK_CUR, & SEEK_END defines (ANSI) are not defined in XENIX so they were defined. include file "io.h" is not found in XENIX and was therefore replaced with "sys/ioctl.h" and "sys/iobuf.h" "\" is illigal in XENIX and was replaced with "/" O_BINARY is not defined in XENIX fcntl routines so it was removed form the open()'s using it filelength() is not supported in XENIX and was replaced with an lseek(ptr,0,SEEK_END) ****************/ My version index's properly and you can enter data into the test program and search for it... But its real buggy after that- I think there may be some program errors in the test program... Like I said I did as much as I could without spending days at it. I'm a novice at all this so I won't be able to answer many question. Sorry. P.S. Sorry if I anoied a few of you by posting the source to the descusion groups. It's just that there was such a demand (over 10 people requesting it) that I didn't want to have to repost it all over- so I posted to the group they were subscribed too. __________________________________________________________________________ | king@abyss.UUCP | {backbone,uunet}!marque!lakesys!abyss!king | %|-----------------------+--------------------------------------------------| %| "God is omnipotent, omniscient, omnibenevolent- it says so right here on | %| the label." God is a trademark of AT&T Bell Labs. ** Space for rent ** | %|__________________________________________________________________________| %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%