[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
function sqsetsqbsize(var fd: file): integer;
function sqopensqd(name: string; var fd: file; lock : boolean): integer;
function sqclosesqd(var fd: file): integer;
function sqreadbhdr(var fd: file; var sb: _sqbasetype): integer;
function sqwritebhdr(var fd: file; var sb: _sqbasetype): integer;
function sqreadfhdr(var fd: file; var sf: _sqfhdrtype; fp: longint): integer;
function sqwritefhdr(var fd: file; var sf: _sqfhdrtype; fp: longint): integer;
function sqreadmhdr(var fd: file; var sm: _sqmhdrtype; fp: longint): integer;
function sqwritemhdr(var fd: file; var sm: _sqmhdrtype; fp: longint): integer;
function sqreadmtxt(var fd: file; var st; fp: longint; ml: longint): integer;
function sqwritemtxt(var fd: file; var st; fp: longint; ml: longint): integer;
function sqopensqi(name: string; var fd: file): integer;
function sqclosesqi(var fd: file): integer;
function sqreadsqi(var fd: file; var si: _sqidxtype; fp: longint): integer;
function sqwritesqi(var fd: file; var si: _sqidxtype; fp: longint): integer;
function sdmread(name: string; var mh: _fidomsgtype; var mb: msgbufptrtype; var mz: longint): integer;
function squnlinkframe(var fd: file; var sf: _sqfhdrtype): integer;
function sqlinkframe(var fd: file; var sf: _sqfhdrtype; tp, lp: longint; op: word): integer;
function sqfreeframe(var fd: file; var sb: _sqbasetype; rp: longint): integer;
function sqfindframe(var fd: file; var sb: _sqbasetype; var fl, rp: longint): integer;
function sqnewframe(var fd: file; var sb: _sqbasetype; var sf: _sqfhdrtype; var ml, rp: longint): integer;
function sqreplaceframe(var fd: file; var sb: _sqbasetype; var sf: _sqfhdrtype; var rp, ml: longint): integer;
function sqazhashname(var s): longint;
function sqhashname (name : string) : longint;
procedure squishsqiptr(var sqiptr : sqiptrtype; fn :pathstr; var sqisize : longint);
function squishmsgntouid(var sqiptr : sqiptrtype; msgn : word ; totalsqi : word) : longint;
function squishuidtomsgn(var sqiptr : sqiptrtype; uid : longint; totalsqi : word) : word;
function getsquishbaserec(fn : pathstr; var sqbaserec : _sqbasetype) : integer;
function setsquishmsgattribute(var fvsqd : file; var fpos : longint; newattr : longint) : integer;
{ conversion from MSG to Squish }
function sdmtosqd(
mname,
sname: string;
var mh : _fidomsgtype;
var newnum : word;
lockit : boolean
): integer;
procedure arrangetxt(var msg: msgbufptrtype; var msiz, csiz: longint);
The BASE RECORD and the FRAME RECORD are potentially dynamic records.
When a squish file SQD is open, you should call SQSetSQBSize to reset
the SQBSIZE variable to proper the length, and when do you read in the
BASE RECORD, set the SBFSIZE variable to the value defined in the base
record. Doing so, will atleast conform to the way MAX today is setup for
the future changes in the base structure.
There is no critical error trap routines here. It is your programming
responsibility to TRAP and CLOSE, and especially UNLOCK any open SQUISH
file if a critical error occurs. There is a local unit variable
_SQD_FILE_LOCKED which is used here to determine if a message based is
locked when a closing function is called. It is suggested that you test
for this variable's logical state in your critical error trap routine.
Description:
Squish has four files:
*.SQL - the lastread pointers are stored for the user. The lastus00.dat
file has the user's record number. Seek to it and read a word
to get lastread value for the user for the message base.
*.SQI - is a index of LIVE MESSAGES in the Squish *.SQD file. It
basically stores the 'unique' message id for each message,
the offset of the SQUISH messahe header (sqhdr) and the
HASH of the TOWHOM user's name.
*.SQD - has all the mail. The basic layout is:
BASE_RECORD
then for each message
SQUISH MESSAGE HEADER
CONTROL INFORMATION Where all tuff is stored
TEXT MESSAGE may not always be null terminated
The base record will tell you where the first squish msg header
is at, and each msg header will point to the next or prev one.
In addition, the base record also will point to the first FREE
(one that was marked deleted) Squish Message Header and so on.
So from the base record, you can get a "Doublely linked list"
of both the live messages and free messages.
*.SQB - something to do with dupe checking and I think it's for the
squish mail processor. Not discussed or used in the this API.
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson