Some code reformatting
This commit is contained in:
parent
eb8cd5aace
commit
6f1c54596b
|
@ -78,9 +78,9 @@ Type
|
||||||
Function IsKillSent: Boolean; Virtual; {Is current msg kill sent}
|
Function IsKillSent: Boolean; Virtual; {Is current msg kill sent}
|
||||||
Function IsSent: Boolean; Virtual; {Is current msg sent}
|
Function IsSent: Boolean; Virtual; {Is current msg sent}
|
||||||
Function IsFAttach: Boolean; Virtual; {Is current msg file attach}
|
Function IsFAttach: Boolean; Virtual; {Is current msg file attach}
|
||||||
Function IsReqRct: Boolean; Virtual; {Is current msg request receipt}
|
// Function IsReqRct: Boolean; Virtual; {Is current msg request receipt}
|
||||||
Function IsReqAud: Boolean; Virtual; {Is current msg request audit}
|
// Function IsReqAud: Boolean; Virtual; {Is current msg request audit}
|
||||||
Function IsRetRct: Boolean; Virtual; {Is current msg a return receipt}
|
// Function IsRetRct: Boolean; Virtual; {Is current msg a return receipt}
|
||||||
Function IsFileReq: Boolean; Virtual; {Is current msg a file request}
|
Function IsFileReq: Boolean; Virtual; {Is current msg a file request}
|
||||||
Function IsRcvd: Boolean; Virtual; {Is current msg received}
|
Function IsRcvd: Boolean; Virtual; {Is current msg received}
|
||||||
Function IsPriv: Boolean; Virtual; {Is current msg priviledged/private}
|
Function IsPriv: Boolean; Virtual; {Is current msg priviledged/private}
|
||||||
|
@ -437,17 +437,17 @@ Function TMsgBaseABS.IsFAttach: Boolean;
|
||||||
Begin
|
Begin
|
||||||
End;
|
End;
|
||||||
|
|
||||||
Function TMsgBaseABS.IsReqRct: Boolean;
|
//Function TMsgBaseABS.IsReqRct: Boolean;
|
||||||
Begin
|
//Begin
|
||||||
End;
|
//End;
|
||||||
|
|
||||||
Function TMsgBaseABS.IsReqAud: Boolean;
|
//Function TMsgBaseABS.IsReqAud: Boolean;
|
||||||
Begin
|
//Begin
|
||||||
End;
|
//End;
|
||||||
|
|
||||||
Function TMsgBaseABS.IsRetRct: Boolean;
|
//Function TMsgBaseABS.IsRetRct: Boolean;
|
||||||
Begin
|
//Begin
|
||||||
End;
|
//End;
|
||||||
|
|
||||||
Function TMsgBaseABS.IsFileReq: Boolean;
|
Function TMsgBaseABS.IsFileReq: Boolean;
|
||||||
Begin
|
Begin
|
||||||
|
|
|
@ -126,8 +126,8 @@ Type
|
||||||
TxtPos : LongInt;
|
TxtPos : LongInt;
|
||||||
TxtEnd : LongInt;
|
TxtEnd : LongInt;
|
||||||
TxtBufStart : LongInt;
|
TxtBufStart : LongInt;
|
||||||
TxtRead : {$IFDEF FPC} Word {$ELSE} LongInt {$ENDIF};
|
TxtRead : Word;
|
||||||
IdxRead : {$IFDEF FPC} Word {$ELSE} LongInt {$ENDIF};
|
IdxRead : Word;
|
||||||
MailType : MsgMailType;
|
MailType : MsgMailType;
|
||||||
BufFile : File;
|
BufFile : File;
|
||||||
LockCount : LongInt;
|
LockCount : LongInt;
|
||||||
|
@ -146,49 +146,49 @@ Type
|
||||||
|
|
||||||
Procedure EditMsgInit; Virtual;
|
Procedure EditMsgInit; Virtual;
|
||||||
Procedure EditMsgSave; Virtual;
|
Procedure EditMsgSave; Virtual;
|
||||||
Constructor Init; {Initialize}
|
Constructor Init;
|
||||||
Destructor Done; Virtual; {Done}
|
Destructor Done; Virtual;
|
||||||
Procedure SetMsgPath(St: String); Virtual; {Set netmail path}
|
Procedure SetMsgPath (St: String); Virtual; {Set netmail path}
|
||||||
Function GetHighMsgNum: LongInt; Virtual; {Get highest netmail msg number in area}
|
Function GetHighMsgNum : LongInt; Virtual; {Get highest netmail msg number in area}
|
||||||
Function LockMsgBase: Boolean; Virtual; {Lock the message base}
|
Function LockMsgBase : Boolean; Virtual; {Lock the message base}
|
||||||
Function UnLockMsgBase: Boolean; Virtual; {Unlock the message base}
|
Function UnLockMsgBase : Boolean; Virtual; {Unlock the message base}
|
||||||
Procedure SetDest(Var Addr: RecEchoMailAddr); Virtual; {Set Zone/Net/Node/Point for Dest}
|
Procedure SetDest (Var Addr: RecEchoMailAddr); Virtual; {Set Zone/Net/Node/Point for Dest}
|
||||||
Procedure SetOrig(Var Addr: RecEchoMailAddr); Virtual; {Set Zone/Net/Node/Point for Orig}
|
Procedure SetOrig (Var Addr: RecEchoMailAddr); Virtual; {Set Zone/Net/Node/Point for Orig}
|
||||||
Procedure SetFrom(Name: String); Virtual; {Set message from}
|
Procedure SetFrom (Name: String); Virtual; {Set message from}
|
||||||
Procedure SetTo(Name: String); Virtual; {Set message to}
|
Procedure SetTo (Name: String); Virtual; {Set message to}
|
||||||
Procedure SetSubj(Str: String); Virtual; {Set message subject}
|
Procedure SetSubj (Str: String); Virtual; {Set message subject}
|
||||||
Procedure SetCost(SCost: Word); Virtual; {Set message cost}
|
Procedure SetCost (SCost: Word); Virtual; {Set message cost}
|
||||||
Procedure SetRefer(SRefer: LongInt); Virtual; {Set message reference}
|
Procedure SetRefer (SRefer: LongInt); Virtual; {Set message reference}
|
||||||
Procedure SetSeeAlso(SAlso: LongInt); Virtual; {Set message see also}
|
Procedure SetSeeAlso (SAlso: LongInt); Virtual; {Set message see also}
|
||||||
Function GetNextSeeAlso: LongInt; Virtual;
|
Function GetNextSeeAlso : LongInt; Virtual;
|
||||||
Procedure SetNextSeeAlso(SAlso: LongInt); Virtual;
|
Procedure SetNextSeeAlso (SAlso: LongInt); Virtual;
|
||||||
Procedure SetDate(SDate: String); Virtual; {Set message date}
|
Procedure SetDate (SDate: String); Virtual; {Set message date}
|
||||||
Procedure SetTime(STime: String); Virtual; {Set message time}
|
Procedure SetTime (STime: String); Virtual; {Set message time}
|
||||||
Procedure SetLocal(LS: Boolean); Virtual; {Set local status}
|
Procedure SetLocal (LS: Boolean); Virtual; {Set local status}
|
||||||
Procedure SetRcvd(RS: Boolean); Virtual; {Set received status}
|
Procedure SetRcvd (RS: Boolean); Virtual; {Set received status}
|
||||||
Procedure SetPriv(PS: Boolean); Virtual; {Set priveledge vs public status}
|
Procedure SetPriv (PS: Boolean); Virtual; {Set priveledge vs public status}
|
||||||
Procedure SetHold(SS: Boolean); Virtual; {set hold netmail status}
|
Procedure SetHold (SS: Boolean); Virtual; {set hold netmail status}
|
||||||
Procedure SetCrash(SS: Boolean); Virtual; {Set crash netmail status}
|
Procedure SetCrash (SS: Boolean); Virtual; {Set crash netmail status}
|
||||||
Procedure SetKillSent(SS: Boolean); Virtual; {Set kill/sent netmail status}
|
Procedure SetKillSent (SS: Boolean); Virtual; {Set kill/sent netmail status}
|
||||||
Procedure SetSent(SS: Boolean); Virtual; {Set sent netmail status}
|
Procedure SetSent (SS: Boolean); Virtual; {Set sent netmail status}
|
||||||
Procedure SetFAttach(SS: Boolean); Virtual; {Set file attach status}
|
Procedure SetFAttach (SS: Boolean); Virtual; {Set file attach status}
|
||||||
Procedure SetReqRct(SS: Boolean); Virtual; {Set request receipt status}
|
Procedure SetReqRct (SS: Boolean); Virtual; {Set request receipt status}
|
||||||
Procedure SetReqAud(SS: Boolean); Virtual; {Set request audit status}
|
Procedure SetReqAud (SS: Boolean); Virtual; {Set request audit status}
|
||||||
Procedure SetRetRct(SS: Boolean); Virtual; {Set return receipt status}
|
Procedure SetRetRct (SS: Boolean); Virtual; {Set return receipt status}
|
||||||
Procedure SetFileReq(SS: Boolean); Virtual; {Set file request status}
|
Procedure SetFileReq (SS: Boolean); Virtual; {Set file request status}
|
||||||
Procedure DoString(Str: String); Virtual; {Add string to message text}
|
Procedure DoString (Str: String); Virtual; {Add string to message text}
|
||||||
Procedure DoChar(Ch: Char); Virtual; {Add character to message text}
|
Procedure DoChar (Ch: Char); Virtual; {Add character to message text}
|
||||||
Procedure DoStringLn(Str: String); Virtual; {Add string and newline to msg text}
|
Procedure DoStringLn (Str: String); Virtual; {Add string and newline to msg text}
|
||||||
Procedure DoKludgeLn(Str: String); Virtual; {Add ^AKludge line to msg}
|
Procedure DoKludgeLn (Str: String); Virtual; {Add ^AKludge line to msg}
|
||||||
Function WriteMsg: Word; Virtual;
|
Function WriteMsg : Word; Virtual;
|
||||||
Function GetChar: Char; Virtual;
|
Function GetChar : Char; Virtual;
|
||||||
Procedure MsgStartUp; Virtual; {set up msg for reading}
|
Procedure MsgStartUp; Virtual; {set up msg for reading}
|
||||||
Function EOM: Boolean; Virtual; {No more msg text}
|
Function EOM : Boolean; Virtual; {No more msg text}
|
||||||
Function GetString(MaxLen: Word): String; Virtual; {Get wordwrapped string}
|
Function GetString (MaxLen: Word): String; Virtual; {Get wordwrapped string}
|
||||||
Procedure SeekFirst(MsgNum: LongInt); Virtual; {Seek msg number}
|
Procedure SeekFirst (MsgNum: LongInt); Virtual; {Seek msg number}
|
||||||
Procedure SeekNext; Virtual; {Find next matching msg}
|
Procedure SeekNext; Virtual; {Find next matching msg}
|
||||||
Procedure SeekPrior; Virtual; {Seek prior matching msg}
|
Procedure SeekPrior; Virtual; {Seek prior matching msg}
|
||||||
Function GetFrom: String; Virtual; {Get from name on current msg}
|
Function GetFrom : String; Virtual; {Get from name on current msg}
|
||||||
Function GetTo: String; Virtual; {Get to name on current msg}
|
Function GetTo: String; Virtual; {Get to name on current msg}
|
||||||
Function GetSubj: String; Virtual; {Get subject on current msg}
|
Function GetSubj: String; Virtual; {Get subject on current msg}
|
||||||
Function GetCost: Word; Virtual; {Get cost of current msg}
|
Function GetCost: Word; Virtual; {Get cost of current msg}
|
||||||
|
@ -205,9 +205,9 @@ Type
|
||||||
Function IsKillSent: Boolean; Virtual; {Is current msg kill sent}
|
Function IsKillSent: Boolean; Virtual; {Is current msg kill sent}
|
||||||
Function IsSent: Boolean; Virtual; {Is current msg sent}
|
Function IsSent: Boolean; Virtual; {Is current msg sent}
|
||||||
Function IsFAttach: Boolean; Virtual; {Is current msg file attach}
|
Function IsFAttach: Boolean; Virtual; {Is current msg file attach}
|
||||||
Function IsReqRct: Boolean; Virtual; {Is current msg request receipt}
|
// Function IsReqRct: Boolean; Virtual; {Is current msg request receipt}
|
||||||
Function IsReqAud: Boolean; Virtual; {Is current msg request audit}
|
// Function IsReqAud: Boolean; Virtual; {Is current msg request audit}
|
||||||
Function IsRetRct: Boolean; Virtual; {Is current msg a return receipt}
|
// Function IsRetRct: Boolean; Virtual; {Is current msg a return receipt}
|
||||||
Function IsFileReq: Boolean; Virtual; {Is current msg a file request}
|
Function IsFileReq: Boolean; Virtual; {Is current msg a file request}
|
||||||
Function IsRcvd: Boolean; Virtual; {Is current msg received}
|
Function IsRcvd: Boolean; Virtual; {Is current msg received}
|
||||||
Function IsPriv: Boolean; Virtual; {Is current msg priviledged/private}
|
Function IsPriv: Boolean; Virtual; {Is current msg priviledged/private}
|
||||||
|
@ -264,10 +264,11 @@ Type
|
||||||
|
|
||||||
Constructor TMsgBaseJAM.Init;
|
Constructor TMsgBaseJAM.Init;
|
||||||
Begin
|
Begin
|
||||||
New(JM);
|
New (JM);
|
||||||
New(JamIdx);
|
New (JamIdx);
|
||||||
New(MsgHdr); { this new here messes everything up }
|
New (MsgHdr); { this new here messes everything up }
|
||||||
New(TxtBuf);
|
New (TxtBuf);
|
||||||
|
|
||||||
If ((JM = Nil) Or (JamIdx = Nil) or (MsgHdr = Nil) or (TxtBuf = Nil)) Then Begin
|
If ((JM = Nil) Or (JamIdx = Nil) or (MsgHdr = Nil) or (TxtBuf = Nil)) Then Begin
|
||||||
If JM <> Nil Then Dispose(JM);
|
If JM <> Nil Then Dispose(JM);
|
||||||
If JamIdx <> Nil Then Dispose(JamIdx);
|
If JamIdx <> Nil Then Dispose(JamIdx);
|
||||||
|
@ -277,6 +278,7 @@ Begin
|
||||||
Exit;
|
Exit;
|
||||||
End Else Begin
|
End Else Begin
|
||||||
FillChar(JM^, SizeOf(JM^), #0);
|
FillChar(JM^, SizeOf(JM^), #0);
|
||||||
|
|
||||||
JM^.MsgPath := '';
|
JM^.MsgPath := '';
|
||||||
JM^.IdxStart := -30;
|
JM^.IdxStart := -30;
|
||||||
JM^.IdxRead := 0;
|
JM^.IdxRead := 0;
|
||||||
|
@ -293,34 +295,35 @@ Begin
|
||||||
End;
|
End;
|
||||||
|
|
||||||
Function JamStrCrc(St: String): LongInt;
|
Function JamStrCrc(St: String): LongInt;
|
||||||
Var
|
Var
|
||||||
i: Word;
|
i: Word;
|
||||||
crc: LongInt;
|
crc: LongInt;
|
||||||
|
Begin
|
||||||
Begin
|
|
||||||
Crc := -1;
|
Crc := -1;
|
||||||
|
|
||||||
For i := 1 to Length(St) Do
|
For i := 1 to Length(St) Do
|
||||||
Crc := Crc32(Ord(LoCase(St[i])), Crc);
|
Crc := Crc32(Ord(LoCase(St[i])), Crc);
|
||||||
|
|
||||||
JamStrCrc := Crc;
|
JamStrCrc := Crc;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
|
|
||||||
Procedure TMsgBaseJAM.SetMsgPath(St: String);
|
Procedure TMsgBaseJAM.SetMsgPath(St: String);
|
||||||
Begin
|
Begin
|
||||||
JM^.MsgPath := Copy(St, 1, 124);
|
JM^.MsgPath := Copy(St, 1, 124);
|
||||||
End;
|
End;
|
||||||
|
|
||||||
|
|
||||||
Function TMsgBaseJAM.GetHighMsgNum: LongInt;
|
Function TMsgBaseJAM.GetHighMsgNum: LongInt;
|
||||||
Begin
|
Begin
|
||||||
GetHighMsgNum := JM^.BaseHdr.BaseMsgNum + FileSize(JM^.IdxFile) - 1;
|
GetHighMsgNum := JM^.BaseHdr.BaseMsgNum + FileSize(JM^.IdxFile) - 1;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
|
|
||||||
Procedure TMsgBaseJAM.SetDest(Var Addr: RecEchoMailAddr);
|
Procedure TMsgBaseJAM.SetDest(Var Addr: RecEchoMailAddr);
|
||||||
Begin
|
Begin
|
||||||
JM^.Dest := Addr;
|
JM^.Dest := Addr;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
|
|
||||||
Procedure TMsgBaseJAM.SetOrig(Var Addr: RecEchoMailAddr);
|
Procedure TMsgBaseJAM.SetOrig(Var Addr: RecEchoMailAddr);
|
||||||
|
@ -709,7 +712,7 @@ Begin
|
||||||
WriteError := IoResult;
|
WriteError := IoResult;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
If ReReadIdx(IdxLoc) = 0 Then;
|
ReReadIdx(IdxLoc);
|
||||||
|
|
||||||
(* new shit begin *)
|
(* new shit begin *)
|
||||||
TmpHdr := MsgHdr^.JamHdr;
|
TmpHdr := MsgHdr^.JamHdr;
|
||||||
|
@ -727,9 +730,9 @@ Begin
|
||||||
Seek (JM^.HdrFile, FileSize(JM^.HdrFile));
|
Seek (JM^.HdrFile, FileSize(JM^.HdrFile));
|
||||||
BlockWrite (JM^.HdrFile, MsgHdr^, SizeOf(MsgHdr^.JamHdr) + MsgHdr^.JamHdr.SubFieldLen);
|
BlockWrite (JM^.HdrFile, MsgHdr^, SizeOf(MsgHdr^.JamHdr) + MsgHdr^.JamHdr.SubFieldLen);
|
||||||
|
|
||||||
If WriteIdx = 0 Then;
|
WriteIdx;
|
||||||
|
|
||||||
If UnLockMsgBase Then; {unlock msg base}
|
UnLockMsgBase;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
Function TMsgBaseJAM.WriteMsg: Word;
|
Function TMsgBaseJAM.WriteMsg: Word;
|
||||||
|
@ -741,20 +744,24 @@ Function TMsgBaseJAM.WriteMsg: Word;
|
||||||
|
|
||||||
Begin
|
Begin
|
||||||
WriteError := 0;
|
WriteError := 0;
|
||||||
|
|
||||||
If LastSoft Then Begin
|
If LastSoft Then Begin
|
||||||
DoChar(#13);
|
DoChar(#13);
|
||||||
DoChar(#10);
|
DoChar(#10);
|
||||||
End;
|
End;
|
||||||
|
|
||||||
If WriteError = 0 Then Begin
|
If WriteError = 0 Then Begin
|
||||||
MsgHdr^.JamHdr.Signature[1] := 'J';{Set signature}
|
MsgHdr^.JamHdr.Signature[1] := 'J';{Set signature}
|
||||||
MsgHdr^.JamHdr.Signature[2] := 'A';
|
MsgHdr^.JamHdr.Signature[2] := 'A';
|
||||||
MsgHdr^.JamHdr.Signature[3] := 'M';
|
MsgHdr^.JamHdr.Signature[3] := 'M';
|
||||||
MsgHdr^.JamHdr.Signature[4] := #0;
|
MsgHdr^.JamHdr.Signature[4] := #0;
|
||||||
|
|
||||||
Case JM^.MailType of
|
Case JM^.MailType of
|
||||||
mmtNormal : SetAttr1 (Jam_TypeLocal, True);
|
mmtNormal : SetAttr1 (Jam_TypeLocal, True);
|
||||||
mmtEchoMail : SetAttr1 (Jam_TypeEcho, True);
|
mmtEchoMail : SetAttr1 (Jam_TypeEcho, True);
|
||||||
mmtNetMail : SetAttr1 (Jam_TypeNet, True);
|
mmtNetMail : SetAttr1 (Jam_TypeNet, True);
|
||||||
End;
|
End;
|
||||||
|
|
||||||
MsgHdr^.JamHdr.Rev := 1;
|
MsgHdr^.JamHdr.Rev := 1;
|
||||||
MsgHdr^.JamHdr.DateArrived := ToUnixDate(CurDateDos); {Get date processed}
|
MsgHdr^.JamHdr.DateArrived := ToUnixDate(CurDateDos); {Get date processed}
|
||||||
|
|
||||||
|
@ -778,10 +785,12 @@ Begin
|
||||||
If Not LockMsgBase Then
|
If Not LockMsgBase Then
|
||||||
WriteError := 5;
|
WriteError := 5;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
If WriteError = 0 Then Begin {Handle message text}
|
If WriteError = 0 Then Begin {Handle message text}
|
||||||
MsgHdr^.JamHdr.TextOfs := FileSize(JM^.TxtFile);
|
MsgHdr^.JamHdr.TextOfs := FileSize(JM^.TxtFile);
|
||||||
MsgHdr^.JamHdr.MsgNum := GetHighMsgNum + 1;
|
MsgHdr^.JamHdr.MsgNum := GetHighMsgNum + 1;
|
||||||
MsgHdr^.Jamhdr.TextLen := JM^.TxtPos;
|
MsgHdr^.Jamhdr.TextLen := JM^.TxtPos;
|
||||||
|
|
||||||
If JM^.TxtBufStart > 0 Then Begin {Write text using buffer file}
|
If JM^.TxtBufStart > 0 Then Begin {Write text using buffer file}
|
||||||
i := JM^.TxtPos - JM^.TxtBufStart;
|
i := JM^.TxtPos - JM^.TxtBufStart;
|
||||||
BlockWrite(JM^.BufFile, TxtBuf^, i); {write buffer to file}
|
BlockWrite(JM^.BufFile, TxtBuf^, i); {write buffer to file}
|
||||||
|
@ -1274,22 +1283,22 @@ Function TMsgBaseJAM.IsFAttach: Boolean; {Is current msg file attach}
|
||||||
End;
|
End;
|
||||||
|
|
||||||
|
|
||||||
Function TMsgBaseJAM.IsReqRct: Boolean; {Is current msg request receipt}
|
//Function TMsgBaseJAM.IsReqRct: Boolean; {Is current msg request receipt}
|
||||||
Begin
|
// Begin
|
||||||
IsReqRct := (MsgHdr^.JamHdr.Attr1 and Jam_RcptReq) <> 0;
|
// IsReqRct := (MsgHdr^.JamHdr.Attr1 and Jam_RcptReq) <> 0;
|
||||||
End;
|
// End;
|
||||||
|
|
||||||
|
|
||||||
Function TMsgBaseJAM.IsReqAud: Boolean; {Is current msg request audit}
|
//Function TMsgBaseJAM.IsReqAud: Boolean; {Is current msg request audit}
|
||||||
Begin
|
// Begin
|
||||||
IsReqAud := (MsgHdr^.JamHdr.Attr1 and Jam_ConfmReq) <> 0;
|
// IsReqAud := (MsgHdr^.JamHdr.Attr1 and Jam_ConfmReq) <> 0;
|
||||||
End;
|
// End;
|
||||||
|
|
||||||
|
|
||||||
Function TMsgBaseJAM.IsRetRct: Boolean; {Is current msg a return receipt}
|
//Function TMsgBaseJAM.IsRetRct: Boolean; {Is current msg a return receipt}
|
||||||
Begin
|
// Begin
|
||||||
IsRetRct := False;
|
// IsRetRct := False;
|
||||||
End;
|
// End;
|
||||||
|
|
||||||
|
|
||||||
Function TMsgBaseJAM.IsFileReq: Boolean; {Is current msg a file request}
|
Function TMsgBaseJAM.IsFileReq: Boolean; {Is current msg a file request}
|
||||||
|
|
|
@ -101,7 +101,7 @@ Const
|
||||||
SqISize : Word = SizeOf(SqIdxType);
|
SqISize : Word = SizeOf(SqIdxType);
|
||||||
|
|
||||||
Const
|
Const
|
||||||
SqTxtBufferSize = 16000; {reduced from 34000 to 16000. this should }
|
SqTxtBufferSize = 16000;
|
||||||
{handle 200 lines x 80 chars EASILY }
|
{handle 200 lines x 80 chars EASILY }
|
||||||
Type
|
Type
|
||||||
SqInfoType = Record
|
SqInfoType = Record
|
||||||
|
@ -138,12 +138,12 @@ Type
|
||||||
|
|
||||||
PMsgBaseSquish = ^TMsgBaseSquish;
|
PMsgBaseSquish = ^TMsgBaseSquish;
|
||||||
TMsgBaseSquish = Object(TMsgBaseAbs)
|
TMsgBaseSquish = Object(TMsgBaseAbs)
|
||||||
SqInfo : ^SqInfoType;
|
SqInfo : ^SqInfoType;
|
||||||
SqIdx : ^SqIdxArrayType;
|
SqIdx : ^SqIdxArrayType;
|
||||||
FreeArray : ^FreeArrayType;
|
FreeArray : ^FreeArrayType;
|
||||||
|
|
||||||
Procedure EditMsgInit; Virtual;
|
Procedure EditMsgInit; Virtual;
|
||||||
Procedure EditMsgSave; Virtual;
|
Procedure EditMsgSave; Virtual;
|
||||||
|
|
||||||
Constructor Init; {Initialize}
|
Constructor Init; {Initialize}
|
||||||
Destructor Done; Virtual; {Done cleanup and dispose}
|
Destructor Done; Virtual; {Done cleanup and dispose}
|
||||||
|
@ -209,7 +209,7 @@ Type
|
||||||
Procedure DoString(Str: String); Virtual; {Add string to message text}
|
Procedure DoString(Str: String); Virtual; {Add string to message text}
|
||||||
Procedure DoChar(Ch: Char); Virtual; {Add character to message text}
|
Procedure DoChar(Ch: Char); Virtual; {Add character to message text}
|
||||||
Procedure DoStringLn(Str: String); Virtual; {Add string and newline to msg text}
|
Procedure DoStringLn(Str: String); Virtual; {Add string and newline to msg text}
|
||||||
Function WriteMsg: Word; Virtual; {Write msg to msg base}
|
Function WriteMsg: Word; Virtual; {Write msg to msg base}
|
||||||
Procedure ReadIdx; Virtual;
|
Procedure ReadIdx; Virtual;
|
||||||
Procedure WriteIdx; Virtual;
|
Procedure WriteIdx; Virtual;
|
||||||
Procedure SeekFirst(MsgNum: LongInt); Virtual; {Seeks to 1st msg >= MsgNum}
|
Procedure SeekFirst(MsgNum: LongInt); Virtual; {Seeks to 1st msg >= MsgNum}
|
||||||
|
@ -224,9 +224,9 @@ Type
|
||||||
Function IsKillSent: Boolean; Virtual; {Is current msg kill sent}
|
Function IsKillSent: Boolean; Virtual; {Is current msg kill sent}
|
||||||
Function IsSent: Boolean; Virtual; {Is current msg sent}
|
Function IsSent: Boolean; Virtual; {Is current msg sent}
|
||||||
Function IsFAttach: Boolean; Virtual; {Is current msg file attach}
|
Function IsFAttach: Boolean; Virtual; {Is current msg file attach}
|
||||||
Function IsReqRct: Boolean; Virtual; {Is current msg request receipt}
|
// Function IsReqRct: Boolean; Virtual; {Is current msg request receipt}
|
||||||
Function IsReqAud: Boolean; Virtual; {Is current msg request audit}
|
// Function IsReqAud: Boolean; Virtual; {Is current msg request audit}
|
||||||
Function IsRetRct: Boolean; Virtual; {Is current msg a return receipt}
|
// Function IsRetRct: Boolean; Virtual; {Is current msg a return receipt}
|
||||||
Function IsFileReq: Boolean; Virtual; {Is current msg a file request}
|
Function IsFileReq: Boolean; Virtual; {Is current msg a file request}
|
||||||
Function IsRcvd: Boolean; Virtual; {Is current msg received}
|
Function IsRcvd: Boolean; Virtual; {Is current msg received}
|
||||||
Function IsPriv: Boolean; Virtual; {Is current msg priviledged/private}
|
Function IsPriv: Boolean; Virtual; {Is current msg priviledged/private}
|
||||||
|
@ -276,52 +276,55 @@ Uses
|
||||||
m_FileIO;
|
m_FileIO;
|
||||||
|
|
||||||
Const
|
Const
|
||||||
SqMsgPriv = $00001;
|
SqMsgPriv = $00001;
|
||||||
SqMsgCrash = $00002;
|
SqMsgCrash = $00002;
|
||||||
SqMsgRcvd = $00004;
|
SqMsgRcvd = $00004;
|
||||||
SqMsgSent = $00008;
|
SqMsgSent = $00008;
|
||||||
SqMsgFile = $00010;
|
SqMsgFile = $00010;
|
||||||
SqMsgFwd = $00020;
|
SqMsgFwd = $00020;
|
||||||
SqMsgOrphan = $00040;
|
SqMsgOrphan = $00040;
|
||||||
SqMsgKill = $00080;
|
SqMsgKill = $00080;
|
||||||
SqMsgLocal = $00100;
|
SqMsgLocal = $00100;
|
||||||
SqMsgHold = $00200;
|
SqMsgHold = $00200;
|
||||||
SqMsgXX2 = $00400;
|
SqMsgXX2 = $00400;
|
||||||
SqMsgFreq = $00800;
|
SqMsgFreq = $00800;
|
||||||
SqMsgRrq = $01000;
|
SqMsgRrq = $01000;
|
||||||
SqMsgCpt = $02000;
|
SqMsgCpt = $02000;
|
||||||
SqMsgArq = $04000;
|
SqMsgArq = $04000;
|
||||||
SqMsgUrg = $08000;
|
SqMsgUrg = $08000;
|
||||||
SqMsgScanned = $10000;
|
SqMsgScanned = $10000;
|
||||||
|
|
||||||
Constructor TMsgBaseSquish.Init;
|
Constructor TMsgBaseSquish.Init;
|
||||||
Begin
|
Begin
|
||||||
New(SqInfo);
|
New (SqInfo);
|
||||||
New(FreeArray);
|
New (FreeArray);
|
||||||
If ((SqInfo = nil) or (FreeArray = nil)) Then Begin
|
|
||||||
If SqInfo <> Nil Then Dispose(SqInfo);
|
If ((SqInfo = nil) or (FreeArray = nil)) Then Begin
|
||||||
If FreeArray <> Nil Then Dispose(FreeArray);
|
If SqInfo <> Nil Then Dispose(SqInfo);
|
||||||
Fail;
|
If FreeArray <> Nil Then Dispose(FreeArray);
|
||||||
Exit;
|
Fail;
|
||||||
End;
|
Exit;
|
||||||
SqInfo^.SqdOpened := False;
|
End;
|
||||||
SqInfo^.SqiOpened := False;
|
|
||||||
SqInfo^.FN := '';
|
SqInfo^.SqdOpened := False;
|
||||||
SqInfo^.Error := 0;
|
SqInfo^.SqiOpened := False;
|
||||||
SqInfo^.Locked := False;
|
SqInfo^.FN := '';
|
||||||
SqInfo^.FreeLoaded := False;
|
SqInfo^.Error := 0;
|
||||||
SqInfo^.SqiAlloc := 0;
|
SqInfo^.Locked := False;
|
||||||
|
SqInfo^.FreeLoaded := False;
|
||||||
|
SqInfo^.SqiAlloc := 0;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
Destructor TMsgBaseSquish.Done;
|
Destructor TMsgBaseSquish.Done;
|
||||||
Begin
|
Begin
|
||||||
If SqInfo^.SqdOpened Then SqdClose;
|
If SqInfo^.SqdOpened Then SqdClose;
|
||||||
If SqInfo^.SqiOpened Then SqiClose;
|
If SqInfo^.SqiOpened Then SqiClose;
|
||||||
If SqInfo^.SqIAlloc > 0 Then
|
If SqInfo^.SqIAlloc > 0 Then
|
||||||
If SqIdx <> Nil Then
|
If SqIdx <> Nil Then
|
||||||
FreeMem(SqIdx, SqInfo^.SqiAlloc * SizeOf(SqIdxType));
|
FreeMem(SqIdx, SqInfo^.SqiAlloc * SizeOf(SqIdxType));
|
||||||
Dispose(FreeArray);
|
|
||||||
Dispose(SqInfo);
|
Dispose(FreeArray);
|
||||||
|
Dispose(SqInfo);
|
||||||
End;
|
End;
|
||||||
|
|
||||||
Procedure TMsgBaseSquish.SetMsgPath(FN: String);
|
Procedure TMsgBaseSquish.SetMsgPath(FN: String);
|
||||||
|
@ -1105,7 +1108,7 @@ End;
|
||||||
|
|
||||||
Function TMsgBaseSquish.EOM: Boolean;
|
Function TMsgBaseSquish.EOM: Boolean;
|
||||||
Begin
|
Begin
|
||||||
EOM := (SqInfo^.TxtCtr >= SqInfo^.Frame.MsgLength) or (SqInfo^.MsgChars[SqInfo^.TxtCtr] = #0);
|
EOM := (SqInfo^.TxtCtr >= SqInfo^.Frame.MsgLength) or (SqInfo^.MsgChars[SqInfo^.TxtCtr] = #0);
|
||||||
End;
|
End;
|
||||||
|
|
||||||
(*
|
(*
|
||||||
|
@ -1268,20 +1271,20 @@ Begin
|
||||||
IsFAttach := ((SqInfo^.MsgHdr.Attr and SqMsgFile) <> 0);
|
IsFAttach := ((SqInfo^.MsgHdr.Attr and SqMsgFile) <> 0);
|
||||||
End;
|
End;
|
||||||
|
|
||||||
Function TMsgBaseSquish.IsReqRct: Boolean; {Is current msg request receipt}
|
//Function TMsgBaseSquish.IsReqRct: Boolean; {Is current msg request receipt}
|
||||||
Begin
|
//Begin
|
||||||
IsReqRct := ((SqInfo^.MsgHdr.Attr and SqMsgRRQ) <> 0);
|
// IsReqRct := ((SqInfo^.MsgHdr.Attr and SqMsgRRQ) <> 0);
|
||||||
End;
|
//End;
|
||||||
|
|
||||||
Function TMsgBaseSquish.IsReqAud: Boolean; {Is current msg request audit}
|
//Function TMsgBaseSquish.IsReqAud: Boolean; {Is current msg request audit}
|
||||||
Begin
|
//Begin
|
||||||
IsReqAud := ((SqInfo^.MsgHdr.Attr and SqMsgArq) <> 0);
|
// IsReqAud := ((SqInfo^.MsgHdr.Attr and SqMsgArq) <> 0);
|
||||||
End;
|
//End;
|
||||||
|
|
||||||
Function TMsgBaseSquish.IsRetRct: Boolean; {Is current msg a return receipt}
|
//Function TMsgBaseSquish.IsRetRct: Boolean; {Is current msg a return receipt}
|
||||||
Begin
|
//Begin
|
||||||
IsRetRct := ((SqInfo^.MsgHdr.Attr and SqMsgCpt) <> 0);
|
// IsRetRct := ((SqInfo^.MsgHdr.Attr and SqMsgCpt) <> 0);
|
||||||
End;
|
//End;
|
||||||
|
|
||||||
Function TMsgBaseSquish.IsFileReq: Boolean; {Is current msg a file request}
|
Function TMsgBaseSquish.IsFileReq: Boolean; {Is current msg a file request}
|
||||||
Begin
|
Begin
|
||||||
|
|
Loading…
Reference in New Issue