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 IsSent: Boolean; Virtual; {Is current msg sent}
|
||||
Function IsFAttach: Boolean; Virtual; {Is current msg file attach}
|
||||
Function IsReqRct: Boolean; Virtual; {Is current msg request receipt}
|
||||
Function IsReqAud: Boolean; Virtual; {Is current msg request audit}
|
||||
Function IsRetRct: Boolean; Virtual; {Is current msg a return receipt}
|
||||
// Function IsReqRct: Boolean; Virtual; {Is current msg request receipt}
|
||||
// Function IsReqAud: Boolean; Virtual; {Is current msg request audit}
|
||||
// Function IsRetRct: Boolean; Virtual; {Is current msg a return receipt}
|
||||
Function IsFileReq: Boolean; Virtual; {Is current msg a file request}
|
||||
Function IsRcvd: Boolean; Virtual; {Is current msg received}
|
||||
Function IsPriv: Boolean; Virtual; {Is current msg priviledged/private}
|
||||
|
@ -437,17 +437,17 @@ Function TMsgBaseABS.IsFAttach: Boolean;
|
|||
Begin
|
||||
End;
|
||||
|
||||
Function TMsgBaseABS.IsReqRct: Boolean;
|
||||
Begin
|
||||
End;
|
||||
//Function TMsgBaseABS.IsReqRct: Boolean;
|
||||
//Begin
|
||||
//End;
|
||||
|
||||
Function TMsgBaseABS.IsReqAud: Boolean;
|
||||
Begin
|
||||
End;
|
||||
//Function TMsgBaseABS.IsReqAud: Boolean;
|
||||
//Begin
|
||||
//End;
|
||||
|
||||
Function TMsgBaseABS.IsRetRct: Boolean;
|
||||
Begin
|
||||
End;
|
||||
//Function TMsgBaseABS.IsRetRct: Boolean;
|
||||
//Begin
|
||||
//End;
|
||||
|
||||
Function TMsgBaseABS.IsFileReq: Boolean;
|
||||
Begin
|
||||
|
|
|
@ -126,8 +126,8 @@ Type
|
|||
TxtPos : LongInt;
|
||||
TxtEnd : LongInt;
|
||||
TxtBufStart : LongInt;
|
||||
TxtRead : {$IFDEF FPC} Word {$ELSE} LongInt {$ENDIF};
|
||||
IdxRead : {$IFDEF FPC} Word {$ELSE} LongInt {$ENDIF};
|
||||
TxtRead : Word;
|
||||
IdxRead : Word;
|
||||
MailType : MsgMailType;
|
||||
BufFile : File;
|
||||
LockCount : LongInt;
|
||||
|
@ -146,8 +146,8 @@ Type
|
|||
|
||||
Procedure EditMsgInit; Virtual;
|
||||
Procedure EditMsgSave; Virtual;
|
||||
Constructor Init; {Initialize}
|
||||
Destructor Done; Virtual; {Done}
|
||||
Constructor Init;
|
||||
Destructor Done; Virtual;
|
||||
Procedure SetMsgPath (St: String); Virtual; {Set netmail path}
|
||||
Function GetHighMsgNum : LongInt; Virtual; {Get highest netmail msg number in area}
|
||||
Function LockMsgBase : Boolean; Virtual; {Lock the message base}
|
||||
|
@ -205,9 +205,9 @@ Type
|
|||
Function IsKillSent: Boolean; Virtual; {Is current msg kill sent}
|
||||
Function IsSent: Boolean; Virtual; {Is current msg sent}
|
||||
Function IsFAttach: Boolean; Virtual; {Is current msg file attach}
|
||||
Function IsReqRct: Boolean; Virtual; {Is current msg request receipt}
|
||||
Function IsReqAud: Boolean; Virtual; {Is current msg request audit}
|
||||
Function IsRetRct: Boolean; Virtual; {Is current msg a return receipt}
|
||||
// Function IsReqRct: Boolean; Virtual; {Is current msg request receipt}
|
||||
// Function IsReqAud: Boolean; Virtual; {Is current msg request audit}
|
||||
// Function IsRetRct: Boolean; Virtual; {Is current msg a return receipt}
|
||||
Function IsFileReq: Boolean; Virtual; {Is current msg a file request}
|
||||
Function IsRcvd: Boolean; Virtual; {Is current msg received}
|
||||
Function IsPriv: Boolean; Virtual; {Is current msg priviledged/private}
|
||||
|
@ -268,6 +268,7 @@ Begin
|
|||
New (JamIdx);
|
||||
New (MsgHdr); { this new here messes everything up }
|
||||
New (TxtBuf);
|
||||
|
||||
If ((JM = Nil) Or (JamIdx = Nil) or (MsgHdr = Nil) or (TxtBuf = Nil)) Then Begin
|
||||
If JM <> Nil Then Dispose(JM);
|
||||
If JamIdx <> Nil Then Dispose(JamIdx);
|
||||
|
@ -277,6 +278,7 @@ Begin
|
|||
Exit;
|
||||
End Else Begin
|
||||
FillChar(JM^, SizeOf(JM^), #0);
|
||||
|
||||
JM^.MsgPath := '';
|
||||
JM^.IdxStart := -30;
|
||||
JM^.IdxRead := 0;
|
||||
|
@ -296,11 +298,12 @@ Function JamStrCrc(St: String): LongInt;
|
|||
Var
|
||||
i: Word;
|
||||
crc: LongInt;
|
||||
|
||||
Begin
|
||||
Crc := -1;
|
||||
|
||||
For i := 1 to Length(St) Do
|
||||
Crc := Crc32(Ord(LoCase(St[i])), Crc);
|
||||
|
||||
JamStrCrc := Crc;
|
||||
End;
|
||||
|
||||
|
@ -709,7 +712,7 @@ Begin
|
|||
WriteError := IoResult;
|
||||
End;
|
||||
|
||||
If ReReadIdx(IdxLoc) = 0 Then;
|
||||
ReReadIdx(IdxLoc);
|
||||
|
||||
(* new shit begin *)
|
||||
TmpHdr := MsgHdr^.JamHdr;
|
||||
|
@ -727,9 +730,9 @@ Begin
|
|||
Seek (JM^.HdrFile, FileSize(JM^.HdrFile));
|
||||
BlockWrite (JM^.HdrFile, MsgHdr^, SizeOf(MsgHdr^.JamHdr) + MsgHdr^.JamHdr.SubFieldLen);
|
||||
|
||||
If WriteIdx = 0 Then;
|
||||
WriteIdx;
|
||||
|
||||
If UnLockMsgBase Then; {unlock msg base}
|
||||
UnLockMsgBase;
|
||||
End;
|
||||
|
||||
Function TMsgBaseJAM.WriteMsg: Word;
|
||||
|
@ -741,20 +744,24 @@ Function TMsgBaseJAM.WriteMsg: Word;
|
|||
|
||||
Begin
|
||||
WriteError := 0;
|
||||
|
||||
If LastSoft Then Begin
|
||||
DoChar(#13);
|
||||
DoChar(#10);
|
||||
End;
|
||||
|
||||
If WriteError = 0 Then Begin
|
||||
MsgHdr^.JamHdr.Signature[1] := 'J';{Set signature}
|
||||
MsgHdr^.JamHdr.Signature[2] := 'A';
|
||||
MsgHdr^.JamHdr.Signature[3] := 'M';
|
||||
MsgHdr^.JamHdr.Signature[4] := #0;
|
||||
|
||||
Case JM^.MailType of
|
||||
mmtNormal : SetAttr1 (Jam_TypeLocal, True);
|
||||
mmtEchoMail : SetAttr1 (Jam_TypeEcho, True);
|
||||
mmtNetMail : SetAttr1 (Jam_TypeNet, True);
|
||||
End;
|
||||
|
||||
MsgHdr^.JamHdr.Rev := 1;
|
||||
MsgHdr^.JamHdr.DateArrived := ToUnixDate(CurDateDos); {Get date processed}
|
||||
|
||||
|
@ -778,10 +785,12 @@ Begin
|
|||
If Not LockMsgBase Then
|
||||
WriteError := 5;
|
||||
End;
|
||||
|
||||
If WriteError = 0 Then Begin {Handle message text}
|
||||
MsgHdr^.JamHdr.TextOfs := FileSize(JM^.TxtFile);
|
||||
MsgHdr^.JamHdr.MsgNum := GetHighMsgNum + 1;
|
||||
MsgHdr^.Jamhdr.TextLen := JM^.TxtPos;
|
||||
|
||||
If JM^.TxtBufStart > 0 Then Begin {Write text using buffer file}
|
||||
i := JM^.TxtPos - JM^.TxtBufStart;
|
||||
BlockWrite(JM^.BufFile, TxtBuf^, i); {write buffer to file}
|
||||
|
@ -1274,22 +1283,22 @@ Function TMsgBaseJAM.IsFAttach: Boolean; {Is current msg file attach}
|
|||
End;
|
||||
|
||||
|
||||
Function TMsgBaseJAM.IsReqRct: Boolean; {Is current msg request receipt}
|
||||
Begin
|
||||
IsReqRct := (MsgHdr^.JamHdr.Attr1 and Jam_RcptReq) <> 0;
|
||||
End;
|
||||
//Function TMsgBaseJAM.IsReqRct: Boolean; {Is current msg request receipt}
|
||||
// Begin
|
||||
// IsReqRct := (MsgHdr^.JamHdr.Attr1 and Jam_RcptReq) <> 0;
|
||||
// End;
|
||||
|
||||
|
||||
Function TMsgBaseJAM.IsReqAud: Boolean; {Is current msg request audit}
|
||||
Begin
|
||||
IsReqAud := (MsgHdr^.JamHdr.Attr1 and Jam_ConfmReq) <> 0;
|
||||
End;
|
||||
//Function TMsgBaseJAM.IsReqAud: Boolean; {Is current msg request audit}
|
||||
// Begin
|
||||
// IsReqAud := (MsgHdr^.JamHdr.Attr1 and Jam_ConfmReq) <> 0;
|
||||
// End;
|
||||
|
||||
|
||||
Function TMsgBaseJAM.IsRetRct: Boolean; {Is current msg a return receipt}
|
||||
Begin
|
||||
IsRetRct := False;
|
||||
End;
|
||||
//Function TMsgBaseJAM.IsRetRct: Boolean; {Is current msg a return receipt}
|
||||
// Begin
|
||||
// IsRetRct := False;
|
||||
// End;
|
||||
|
||||
|
||||
Function TMsgBaseJAM.IsFileReq: Boolean; {Is current msg a file request}
|
||||
|
|
|
@ -101,7 +101,7 @@ Const
|
|||
SqISize : Word = SizeOf(SqIdxType);
|
||||
|
||||
Const
|
||||
SqTxtBufferSize = 16000; {reduced from 34000 to 16000. this should }
|
||||
SqTxtBufferSize = 16000;
|
||||
{handle 200 lines x 80 chars EASILY }
|
||||
Type
|
||||
SqInfoType = Record
|
||||
|
@ -224,9 +224,9 @@ Type
|
|||
Function IsKillSent: Boolean; Virtual; {Is current msg kill sent}
|
||||
Function IsSent: Boolean; Virtual; {Is current msg sent}
|
||||
Function IsFAttach: Boolean; Virtual; {Is current msg file attach}
|
||||
Function IsReqRct: Boolean; Virtual; {Is current msg request receipt}
|
||||
Function IsReqAud: Boolean; Virtual; {Is current msg request audit}
|
||||
Function IsRetRct: Boolean; Virtual; {Is current msg a return receipt}
|
||||
// Function IsReqRct: Boolean; Virtual; {Is current msg request receipt}
|
||||
// Function IsReqAud: Boolean; Virtual; {Is current msg request audit}
|
||||
// Function IsRetRct: Boolean; Virtual; {Is current msg a return receipt}
|
||||
Function IsFileReq: Boolean; Virtual; {Is current msg a file request}
|
||||
Function IsRcvd: Boolean; Virtual; {Is current msg received}
|
||||
Function IsPriv: Boolean; Virtual; {Is current msg priviledged/private}
|
||||
|
@ -298,12 +298,14 @@ Constructor TMsgBaseSquish.Init;
|
|||
Begin
|
||||
New (SqInfo);
|
||||
New (FreeArray);
|
||||
|
||||
If ((SqInfo = nil) or (FreeArray = nil)) Then Begin
|
||||
If SqInfo <> Nil Then Dispose(SqInfo);
|
||||
If FreeArray <> Nil Then Dispose(FreeArray);
|
||||
Fail;
|
||||
Exit;
|
||||
End;
|
||||
|
||||
SqInfo^.SqdOpened := False;
|
||||
SqInfo^.SqiOpened := False;
|
||||
SqInfo^.FN := '';
|
||||
|
@ -320,6 +322,7 @@ Begin
|
|||
If SqInfo^.SqIAlloc > 0 Then
|
||||
If SqIdx <> Nil Then
|
||||
FreeMem(SqIdx, SqInfo^.SqiAlloc * SizeOf(SqIdxType));
|
||||
|
||||
Dispose(FreeArray);
|
||||
Dispose(SqInfo);
|
||||
End;
|
||||
|
@ -1268,20 +1271,20 @@ Begin
|
|||
IsFAttach := ((SqInfo^.MsgHdr.Attr and SqMsgFile) <> 0);
|
||||
End;
|
||||
|
||||
Function TMsgBaseSquish.IsReqRct: Boolean; {Is current msg request receipt}
|
||||
Begin
|
||||
IsReqRct := ((SqInfo^.MsgHdr.Attr and SqMsgRRQ) <> 0);
|
||||
End;
|
||||
//Function TMsgBaseSquish.IsReqRct: Boolean; {Is current msg request receipt}
|
||||
//Begin
|
||||
// IsReqRct := ((SqInfo^.MsgHdr.Attr and SqMsgRRQ) <> 0);
|
||||
//End;
|
||||
|
||||
Function TMsgBaseSquish.IsReqAud: Boolean; {Is current msg request audit}
|
||||
Begin
|
||||
IsReqAud := ((SqInfo^.MsgHdr.Attr and SqMsgArq) <> 0);
|
||||
End;
|
||||
//Function TMsgBaseSquish.IsReqAud: Boolean; {Is current msg request audit}
|
||||
//Begin
|
||||
// IsReqAud := ((SqInfo^.MsgHdr.Attr and SqMsgArq) <> 0);
|
||||
//End;
|
||||
|
||||
Function TMsgBaseSquish.IsRetRct: Boolean; {Is current msg a return receipt}
|
||||
Begin
|
||||
IsRetRct := ((SqInfo^.MsgHdr.Attr and SqMsgCpt) <> 0);
|
||||
End;
|
||||
//Function TMsgBaseSquish.IsRetRct: Boolean; {Is current msg a return receipt}
|
||||
//Begin
|
||||
// IsRetRct := ((SqInfo^.MsgHdr.Attr and SqMsgCpt) <> 0);
|
||||
//End;
|
||||
|
||||
Function TMsgBaseSquish.IsFileReq: Boolean; {Is current msg a file request}
|
||||
Begin
|
||||
|
|
Loading…
Reference in New Issue