BBS: Inland Empire Archive Date: 08-10-92 (23:04) Number: 144 From: FRANCOIS ROY Refer#: NONE To: CHRIS HARPER Recvd: NO Subj: Re: Squish stuff Conf: (2) Quik_Bas
>Have you posted the code for this reader?
I posted the TYPEs a while ago; it's not really a
'reader': it simply scans all my echomail areas to find
mail addressed to me and re-route it to my point at work.
Here are the TYPEs:
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
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
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
The records in the .SQI file are 12-byte RANDOM-access records, used to find
the messages in the .SQD file. For example, the 3rd
message is at the byte OFFSET found in the 3rd such record
(remember that OFFSETS begin at 0, but QB addresses BINARY
files starting at byte 1).
What you find at the said OFFSET is a 28-byte entry of type
SQHDR, followed by a SQMESSAGE entry, and the message
itself. The MSGLEN in the SQHDR entry includes the length
of the SQMESSAGE header.
This is basically where I stopped: I had enough at that
point to read all my squish bases to locate messages of
interest.
--- msgedsq 2.1
* Origin: R&D BBS 'The VAX Heaven' {819/772-2952} 9600 HST/V32 (1:163/506)

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