BBS: Inland Empire Archive Date: 02-26-93 (19:01) Number: 396 From: ROBERT CHURCH Refer#: NONE To: CORIDON HENSHAW Recvd: NO Subj: Nodelist Conf: (2) Quik_Bas
Here's my _latest_ nodelist compiler. This baby writes a nodelist database and index in 501 seconds. There's still plenty of room for improvement... Here's NODELIST.BI 'NODELIST FORMAT DESCRIPTION: ' ' A nodelist in 2 or optionally 3 files is created by this program. ' The first, here called NODELIST.SMD (for SirrusMail Data) contains ' all of the data for all of the nodes. The records are variable length. ' Each record begins with the 18-byte NodeRec structure followed by ' the variable length strings SystemName, Phone number, and Location. ' The NodeRec structure is described below. ' ______________________ ' | | ' | NodeRec (18-bytes) | ' | | ' ------------------------ ' | SystemName$ | ' ------------------------ ' | Phone$ | ' ------------------------ ' | Location$ | ' ------------------------ ' | Sysop$ | ' ------------------------ ' ' The second file is an index, and is here called NODELIST.SMI. ' It contains a Fido 4-d style address and an offset field. The node's ' data is located in the NODELIST.SMD file at the offset contained in the ' offset field. ' ' There could also need to be a NODELIST.SDS, sysop index. This could ' be optional. I can't think of a good way to do that. ' ' This is just the way I think the nodelist ought to work. All, some, or ' none of it may be used in the final design in SirrusMail and/or QB-CIMR. TYPE NodeRec Zone AS INTEGER Net AS INTEGER Node AS INTEGER Hub AS INTEGER 'This node's hub number. Point number if point flag 'set. Cost AS INTEGER Flags AS INTEGER 'system flags BPS AS INTEGER 'modem speed \ 100 SysLen AS STRING * 1 'length of system name field PhoneLen AS STRING * 1 'length of phone number field LocLen AS STRING * 1 'length of the location field SysopLen AS STRING * 1 END TYPE TYPE SMIRec Zone AS INTEGER Net AS INTEGER Node AS INTEGER Pnt AS INTEGER Offset AS LONG 'location in the NODELIST.SMD file where you can 'find the node with this address. Zilch AS INTEGER 'some implementations may find it advantageous to ' have a 16-byte SMIRec. END TYPE CONST Hub = 1 CONST Host = 2 CONST Region = 4 CONST Zone = 8 CONST Pvt = 16 CONST Pnt = 32 CONST CM = 64 CONST LO = 128 --- FMail 0.90 * Origin: -= Floating Point =- Hillsboro, Oregon (1:105/330.3)
Books at Amazon:
Back to BASIC: The History, Corruption, and Future of the Language
Hackers: Heroes of the Computer Revolution (including Tiny BASIC)
Go to: The Story of the Math Majors, Bridge Players, Engineers, Chess Wizards, Scientists and Iconoclasts who were the Hero Programmers of the Software Revolution
The Advent of the Algorithm: The Idea that Rules the World
Moths in the Machine: The Power and Perils of Programming
Mastering Visual Basic .NET