BBS: Inland Empire Archive Date: 02-26-93 (18:13) Number: 214 From: CORIDON HENSHAW Refer#: NONE To: JEFF WARD Recvd: NO Subj: Squish Conf: (2) Quik_Bas
Hello Jeff! Wednesday February 24 1993, Jeff Ward writes to Coridon Henshaw: JW> Can you tell me where you got the specs for the Squish message base? I JW> would apprecite any info I can get my hands on. Thanks! Right here: ===Chop=== TYPE SQIDX ' .SQI file: one of these per message (12 bytes) Offst AS LONG UMSGID AS LONG Hash AS LONG END TYPE TYPE SQBASE ' .SQD database header (256 bytes): 1 per .SQD file SLEN AS INTEGER ' A signed INTEGER with a min or - 32767 and a max of 32767 RSVD1 AS INTEGER NUMMSG AS LONG ' No of msgs in area HiMsg AS LONG ' Highest msg number (same as NUMMSG) SKIPMSG AS LONG ' # of msgs to protect from autoKill HiWater AS LONG ' Highwatermark UID AS LONG ' # of next UMSGID to use BaseId AS STRING * 80' Name (incl path) of this message base FBEGIN AS LONG ' Offset to 1st frame FLAST AS LONG ' Offset to last frame FFBEGIN AS LONG ' Offset to 1st free frame FFLAST AS LONG ' Offset to last free frame FEND AS LONG ' Offset to end of file MAXMSGS AS LONG ' # of msgs to keep MAXDAYS AS INTEGER ' # of days to keep msgs for SZSQHDR AS INTEGER ' Size of SQHDR (32 bytes) END TYPE TYPE SQHDR ID AS LONG Nextf AS LONG Prevf AS LONG FLEN AS LONG MsgLen AS LONG CLEN AS LONG FTYP AS INTEGER RSVD AS INTEGER END TYPE TYPE SQMESSAGE ' The message Header, as it appears in a Squish area ATTRIB AS LONG Junk AS STRING * 1 From AS STRING * 36 Dest AS STRING * 36 Subj AS STRING * 72 OrigZone AS INTEGER OrigNet AS INTEGER OrigNode AS INTEGER OrigPoint AS INTEGER DestZone AS INTEGER DestNet AS INTEGER DestNode AS INTEGER DestPoint AS INTEGER BINDATES AS STRING * 8 UTCOFST AS INTEGER ReplyTo AS LONG Replies AS STRING * 40 DateMsg AS STRING * 20 END TYPE 'Ok, now for the explanations: the two main files are <name>.SQD and_ <name>.SQI. ' The first structure is for the .SQI file (you can open that one as RANDOM_ with 'a length of 12); the others are for the .SQD file (which you open as BINARY). ' 'There is a one-to-one correspondence between records in .SQI and the (non- 'deleted) messages. You want message #25: just read the 25th record from the '.SQI file into the SQIDX-dimensioned variable. Then, use the offset SQI.OFFST '+ 1 to read the SQHDR-dimensioned variable (the SQI offsets start at 0 but QB 'treats the first byte in a BINARY file as byte 1). This SQHDR is 28-bytes 'long, and it is immediately followed by the 230 bytes of the SQMSG-defined 'variable (the message header), and SQD.MSGLEN bytes of message text. ===Chop=== There you go! Coridon Henshaw / Sirrus Software / QBCIMR FTSC Standards Technician / SM DEV --- GEcho 1.00 * Origin: TCS Concordia - Mail Only - Toronto, Ontario (1:250/820)
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