This commit is contained in:
mysticbbs 2013-05-09 02:12:55 -04:00
parent fe7efba2c4
commit 4ef405c6d6
22 changed files with 282 additions and 250 deletions

View File

@ -51,7 +51,7 @@ Procedure Configuration_ArchiveEditor;
Var Var
Box : TAnsiMenuBox; Box : TAnsiMenuBox;
List : TAnsiMenuList; List : TAnsiMenuList;
F : TBufFile; ArcFile : File of RecArchive;
Arc : RecArchive; Arc : RecArchive;
Copied : RecArchive; Copied : RecArchive;
HasCopy : Boolean = False; HasCopy : Boolean = False;
@ -62,9 +62,10 @@ Var
Begin Begin
List.Clear; List.Clear;
F.Reset; ioReset (ArcFile, SizeOf(RecArchive), fmRWDN);
While Not F.Eof Do Begin
F.Read (Arc); While Not Eof(ArcFile) Do Begin
Read (ArcFile, Arc);
Case Arc.OSType of Case Arc.OSType of
0 : OS := 'Windows'; 0 : OS := 'Windows';
@ -80,9 +81,11 @@ Var
End; End;
Begin Begin
F := TBufFile.Create(SizeOf(RecArchive)); Assign (ArcFile, Config.DataPath + 'archive.dat');
F.Open (Config.DataPath + 'archive.dat', fmOpenCreate, fmReadWrite + fmDenyNone, SizeOf(RecArchive)); If Not ioReset(ArcFile, SizeOf(RecArchive), fmRWDN) Then
If Not ioReWrite(ArcFile, SizeOf(RecArchive), fmRWDN) Then
Exit;
Box := TAnsiMenuBox.Create; Box := TAnsiMenuBox.Create;
List := TAnsiMenuList.Create; List := TAnsiMenuList.Create;
@ -108,7 +111,7 @@ Begin
Case List.ExitCode of Case List.ExitCode of
'/' : Case GetCommandOption(10, 'I-Insert|D-Delete|C-Copy|P-Paste|') of '/' : Case GetCommandOption(10, 'I-Insert|D-Delete|C-Copy|P-Paste|') of
'I' : Begin 'I' : Begin
F.RecordInsert (List.Picked); AddRecord (ArcFile, List.Picked, SizeOf(RecArchive));
Arc.OSType := OSType; Arc.OSType := OSType;
Arc.Active := False; Arc.Active := False;
@ -118,42 +121,42 @@ Begin
Arc.Unpack := ''; Arc.Unpack := '';
Arc.View := ''; Arc.View := '';
F.Write (Arc); Write (ArcFile, Arc);
MakeList; MakeList;
End; End;
'D' : If ShowMsgBox(1, 'Delete this entry?') Then Begin 'D' : If ShowMsgBox(1, 'Delete this entry?') Then Begin
F.RecordDelete (List.Picked); KillRecord (ArcFile, List.Picked, SizeOf(RecArchive));
MakeList; MakeList;
End; End;
'C' : If List.Picked <> List.ListMax Then Begin 'C' : If List.Picked <> List.ListMax Then Begin
F.Seek (List.Picked - 1); Seek (ArcFile, List.Picked - 1);
F.Read (Copied); Read (ArcFile, Copied);
HasCopy := True; HasCopy := True;
End; End;
'P' : If HasCopy Then Begin 'P' : If HasCopy Then Begin
F.RecordInsert (List.Picked); AddRecord (ArcFile, List.Picked, SizeOf(RecArchive));
F.Write (Copied); Write (ArcFile, Copied);
MakeList; MakeList;
End; End;
End; End;
#13 : If List.Picked <> List.ListMax Then Begin #13 : If List.Picked <> List.ListMax Then Begin
F.Seek (List.Picked - 1); Seek (ArcFile, List.Picked - 1);
F.Read (Arc); Read (ArcFile, Arc);
EditArchive(Arc); EditArchive(Arc);
F.Seek (List.Picked - 1); Seek (ArcFile, List.Picked - 1);
F.Write (Arc); Write (ArcFile, Arc);
End; End;
#27 : Break; #27 : Break;
End; End;
Until False; Until False;
F.Close; Close (ArcFile);
F.Free;
Box.Close; Box.Close;
List.Free; List.Free;

View File

@ -43,7 +43,7 @@ Procedure Configuration_GroupEditor (Msg: Boolean);
Var Var
Box : TAnsiMenuBox; Box : TAnsiMenuBox;
List : TAnsiMenuList; List : TAnsiMenuList;
GroupFile : TBufFile; GroupFile : File of RecGroup;
Group : RecGroup; Group : RecGroup;
Copied : RecGroup; Copied : RecGroup;
HasCopy : Boolean = False; HasCopy : Boolean = False;
@ -52,31 +52,26 @@ Var
Begin Begin
List.Clear; List.Clear;
GroupFile.Reset; ioReset (GroupFile, SizeOf(RecGroup), fmRWDN);
While Not GroupFile.EOF Do Begin While Not EOF(GroupFile) Do Begin
GroupFile.Read (Group); Read (GroupFile, Group);
List.Add(strPadR(strI2S(GroupFile.FilePos), 3, ' ') + ' ' + strStripPipe(Group.Name), 0); List.Add(strPadR(strI2S(FilePos(GroupFile)), 3, ' ') + ' ' + strStripPipe(Group.Name), 0);
End; End;
List.Add('', 2); List.Add('', 2);
End; End;
Begin Begin
GroupFile := TBufFile.Create(2048); If Msg Then
Assign (GroupFile, Config.DataPath + 'groups_g.dat')
Else
Assign (GroupFile, Config.DataPath + 'groups_f.dat');
If Msg Then Begin If Not ioReset(GroupFile, SizeOf(RecGroup), fmRWDN) Then
If Not GroupFile.Open(Config.DataPath + 'groups_g.dat', fmOpenCreate, fmReadWrite + fmDenyNone, SizeOf(RecGroup)) Then Begin If Not ioReWrite(GroupFile, SizeOf(RecGroup), fmRWDN) Then
GroupFile.Free;
Exit; Exit;
End;
End Else Begin
If Not GroupFile.Open(Config.DataPath + 'groups_f.dat', fmOpenCreate, fmReadWrite + fmDenyNone, SizeOf(RecGroup)) Then Begin
GroupFile.Free;
Exit;
End;
End;
Box := TAnsiMenuBox.Create; Box := TAnsiMenuBox.Create;
List := TAnsiMenuList.Create; List := TAnsiMenuList.Create;
@ -110,56 +105,56 @@ Begin
Case List.ExitCode of Case List.ExitCode of
'/' : Case GetCommandOption(10, 'I-Insert|D-Delete|C-Copy|P-Paste|') of '/' : Case GetCommandOption(10, 'I-Insert|D-Delete|C-Copy|P-Paste|') of
'I' : If List.Picked > 0 Then Begin 'I' : If List.Picked > 0 Then Begin
GroupFile.RecordInsert (List.Picked); AddRecord (GroupFile, List.Picked, SizeOf(RecGroup));
Group.Name := 'New Group'; Group.Name := 'New Group';
Group.ACS := ''; Group.ACS := '';
Group.Hidden := False; Group.Hidden := False;
GroupFile.Write (Group); Write (GroupFile, Group);
MakeList; MakeList;
End; End;
'D' : If (List.Picked < List.ListMax) Then 'D' : If (List.Picked < List.ListMax) Then
If ShowMsgBox(1, 'Delete this entry?') Then Begin If ShowMsgBox(1, 'Delete this entry?') Then Begin
GroupFile.Seek (List.Picked - 1); Seek (GroupFile, List.Picked - 1);
GroupFile.Read (Group); Read (GroupFile, Group);
GroupFile.RecordDelete (List.Picked); KillRecord (GroupFile, List.Picked, SizeOf(RecGroup));
MakeList; MakeList;
End; End;
'C' : If List.Picked <> List.ListMax Then Begin 'C' : If List.Picked <> List.ListMax Then Begin
GroupFile.Seek (List.Picked - 1); Seek (GroupFile, List.Picked - 1);
GroupFile.Read (Copied); Read (GroupFile, Copied);
HasCopy := True; HasCopy := True;
End; End;
'P' : If HasCopy Then Begin 'P' : If HasCopy Then Begin
GroupFile.RecordInsert (List.Picked); AddRecord (GroupFile, List.Picked, SizeOf(RecGroup));
GroupFile.Write (Copied); Write (GroupFile, Copied);
MakeList; MakeList;
End; End;
End; End;
#13 : If List.Picked <> List.ListMax Then Begin #13 : If List.Picked <> List.ListMax Then Begin
GroupFile.Seek (List.Picked - 1); Seek (GroupFile, List.Picked - 1);
GroupFile.Read (Group); Read (GroupFile, Group);
EditGroup(Group); EditGroup(Group);
GroupFile.Seek (List.Picked - 1); Seek (GroupFile, List.Picked - 1);
GroupFile.Write (Group); Write (GroupFile, Group);
End; End;
#27 : Break; #27 : Break;
End; End;
Until False; Until False;
Box.Close; Box.Close;
GroupFile.Free;
List.Free; List.Free;
Box.Free; Box.Free;
Close (GroupFile);
End; End;
End. End.

View File

@ -51,7 +51,7 @@ Procedure Configuration_ProtocolEditor;
Var Var
Box : TAnsiMenuBox; Box : TAnsiMenuBox;
List : TAnsiMenuList; List : TAnsiMenuList;
F : TBufFile; ProtFile : File of RecProtocol;
Prot : RecProtocol; Prot : RecProtocol;
Copied : RecProtocol; Copied : RecProtocol;
HasCopy : Boolean = False; HasCopy : Boolean = False;
@ -62,10 +62,10 @@ Var
Begin Begin
List.Clear; List.Clear;
F.Reset; ioReset (ProtFile, SizeOf(RecProtocol), fmRWDN);
While Not F.Eof Do Begin While Not EOF(ProtFile) Do Begin
F.Read (Prot); Read (ProtFile, Prot);
Case Prot.OSType of Case Prot.OSType of
0 : OS := 'Windows'; 0 : OS := 'Windows';
@ -83,9 +83,11 @@ Var
End; End;
Begin Begin
F := TBufFile.Create(SizeOf(RecProtocol)); Assign (ProtFile, Config.DataPath + 'protocol.dat');
F.Open (Config.DataPath + 'protocol.dat', fmOpenCreate, fmReadWrite + fmDenyNone, SizeOf(RecProtocol)); If Not ioReset(ProtFile, SizeOf(RecProtocol), fmRWDN) Then
If Not ioReWrite(ProtFile, SizeOf(RecProtocol), fmRWDN) Then
Exit;
Box := TAnsiMenuBox.Create; Box := TAnsiMenuBox.Create;
List := TAnsiMenuList.Create; List := TAnsiMenuList.Create;
@ -111,7 +113,7 @@ Begin
Case List.ExitCode of Case List.ExitCode of
'/' : Case GetCommandOption(10, 'I-Insert|D-Delete|C-Copy|P-Paste|') of '/' : Case GetCommandOption(10, 'I-Insert|D-Delete|C-Copy|P-Paste|') of
'I' : Begin 'I' : Begin
F.RecordInsert (List.Picked); AddRecord (ProtFile, List.Picked, SizeOf(RecProtocol));
Prot.OSType := OSType; Prot.OSType := OSType;
Prot.Desc := 'New protocol'; Prot.Desc := 'New protocol';
@ -121,44 +123,43 @@ Begin
Prot.SendCmd := ''; Prot.SendCmd := '';
Prot.RecvCmd := ''; Prot.RecvCmd := '';
F.Write (Prot); Write (ProtFile, Prot);
MakeList; MakeList;
End; End;
'D' : If List.Picked < List.ListMax Then 'D' : If List.Picked < List.ListMax Then
If ShowMsgBox(1, 'Delete this entry?') Then Begin If ShowMsgBox(1, 'Delete this entry?') Then Begin
F.RecordDelete (List.Picked); KillRecord (ProtFile, List.Picked, SizeOf(RecProtocol));
MakeList; MakeList;
End; End;
'C' : If List.Picked <> List.ListMax Then Begin 'C' : If List.Picked <> List.ListMax Then Begin
F.Seek (List.Picked - 1); Seek (ProtFile, List.Picked - 1);
F.Read (Copied); Read (ProtFile, Copied);
HasCopy := True; HasCopy := True;
End; End;
'P' : If HasCopy Then Begin 'P' : If HasCopy Then Begin
F.RecordInsert (List.Picked); AddRecord (ProtFile, List.Picked, SizeOf(RecProtocol));
F.Write (Copied); Write (ProtFile, Copied);
MakeList; MakeList;
End; End;
End; End;
#13 : If List.Picked <> List.ListMax Then Begin #13 : If List.Picked <> List.ListMax Then Begin
F.Seek (List.Picked - 1); Seek (ProtFile, List.Picked - 1);
F.Read (Prot); Read (ProtFile, Prot);
EditProtocol(Prot); EditProtocol(Prot);
F.Seek (List.Picked - 1); Seek (ProtFile, List.Picked - 1);
F.Write (Prot); Write (ProtFile, Prot);
End; End;
#27 : Break; #27 : Break;
End; End;
Until False; Until False;
F.Close; Close (ProtFile);
F.Free;
Box.Close; Box.Close;
List.Free; List.Free;

View File

@ -734,17 +734,16 @@ Function Configuration_ThemeEditor (Select: Boolean) : String;
Var Var
Box : TAnsiMenuBox; Box : TAnsiMenuBox;
List : TAnsiMenuList; List : TAnsiMenuList;
ThemeFile : TBufFile; ThemeFile : File of RecTheme;
Theme : RecTheme; Theme : RecTheme;
Copied : RecTheme; Copied : RecTheme;
HasCopy : Boolean = False; HasCopy : Boolean = False;
Begin Begin
ThemeFile := TBufFile.Create(SizeOf(RecTheme)); Assign (ThemeFile, Config.DataPath + 'theme.dat');
If Not ThemeFile.Open(Config.DataPath + 'theme.dat', fmOpenCreate, fmReadWrite + fmDenyNone, SizeOf(RecTheme)) Then Begin If Not ioReset(ThemeFile, Sizeof(RecTheme), fmRWDN) Then
ThemeFile.Free; If Not ioReWrite(ThemeFile, SizeOf(RecTheme), fmRWDN) Then
Exit; Exit;
End;
Box := TAnsiMenuBox.Create; Box := TAnsiMenuBox.Create;
List := TAnsiMenuList.Create; List := TAnsiMenuList.Create;
@ -764,10 +763,10 @@ Begin
Repeat Repeat
List.Clear; List.Clear;
ThemeFile.Reset; Reset(ThemeFile);
While Not ThemeFile.EOF Do Begin While Not EOF(ThemeFile) Do Begin
ThemeFile.Read(Theme); Read (ThemeFile, Theme);
List.Add (strPadR(Theme.FileName, 20, ' ') + ' ' + Theme.Desc, 0); List.Add (strPadR(Theme.FileName, 20, ' ') + ' ' + Theme.Desc, 0);
End; End;
@ -780,7 +779,7 @@ Begin
Case List.ExitCode of Case List.ExitCode of
'/' : Case GetCommandOption(9, 'I-Insert|D-Delete|C-Copy|P-Paste|') of '/' : Case GetCommandOption(9, 'I-Insert|D-Delete|C-Copy|P-Paste|') of
'I' : Begin 'I' : Begin
ThemeFile.RecordInsert(List.Picked); AddRecord (ThemeFile, List.Picked, SizeOf(RecTheme));
FillChar(Theme, SizeOf(Theme), 0); FillChar(Theme, SizeOf(Theme), 0);
@ -837,26 +836,26 @@ Begin
MAreaList := VotingBar; MAreaList := VotingBar;
End; End;
ThemeFile.Write(Theme); Write (ThemeFile, Theme);
End; End;
'D' : If List.Picked <> List.ListMax Then 'D' : If List.Picked <> List.ListMax Then
If ShowMsgBox(1, 'Delete this entry?') Then If ShowMsgBox(1, 'Delete this entry?') Then
ThemeFile.RecordDelete (List.Picked); KillRecord (ThemeFile, List.Picked, SizeOf(RecTheme));
'C' : If List.Picked <> List.ListMax Then Begin 'C' : If List.Picked <> List.ListMax Then Begin
ThemeFile.Seek (List.Picked - 1); Seek (ThemeFile, List.Picked - 1);
ThemeFile.Read (Copied); Read (ThemeFile, Copied);
HasCopy := True; HasCopy := True;
End; End;
'P' : If HasCopy Then Begin 'P' : If HasCopy Then Begin
ThemeFile.RecordInsert (List.Picked); AddRecord (ThemeFile, List.Picked, SizeOf(RecTheme));
ThemeFile.Write (Copied); Write (ThemeFile, Copied);
End; End;
End; End;
#13 : If (List.ListMax > 0) And (List.Picked <> List.ListMax) Then #13 : If (List.ListMax > 0) And (List.Picked <> List.ListMax) Then
If Select Then Begin If Select Then Begin
ThemeFile.Seek (List.Picked - 1); Seek (ThemeFile, List.Picked - 1);
ThemeFile.Read (Theme); Read (ThemeFile, Theme);
Result := strStripB(Copy(List.List[List.Picked]^.Name, 1, 20), ' '); Result := strStripB(Copy(List.List[List.Picked]^.Name, 1, 20), ' ');
@ -864,24 +863,26 @@ Begin
End Else Begin End Else Begin
Box.Hide; Box.Hide;
ThemeFile.Seek (List.Picked - 1); Seek (ThemeFile, List.Picked - 1);
ThemeFile.Read (Theme); Read (ThemeFile, Theme);
EditTheme (Theme); EditTheme (Theme);
ThemeFile.Seek (List.Picked - 1); Seek (ThemeFile, List.Picked - 1);
ThemeFile.Write (Theme); Write (ThemeFile, Theme);
Box.Show; Box.Show;
End; End;
#27 : Break; #27 : Break;
End; End;
Until False; Until False;
Close (ThemeFile);
Box.Close; Box.Close;
Box.Free; Box.Free;
List.Free; List.Free;
ThemeFile.Free;
End; End;
End. End.

View File

@ -253,17 +253,17 @@ Procedure Configuration_UserEditor;
Var Var
Box : TAnsiMenuBox; Box : TAnsiMenuBox;
List : TAnsiMenuList; List : TAnsiMenuList;
UserFile : TBufFile; UserFile : File of RecUser;
User : RecUser; User : RecUser;
Procedure MakeList; Procedure MakeList;
Begin Begin
List.Clear; List.Clear;
UserFile.Reset; ioReset (UserFile, SizeOf(RecUser), fmRWDN);
While Not UserFile.EOF Do Begin While Not EOF(UserFile) Do Begin
UserFile.Read (User); Read (UserFile, User);
If User.Flags AND UserDeleted <> 0 Then If User.Flags AND UserDeleted <> 0 Then
List.Add (strPadR(User.Handle, 37, ' ') + 'DELETED', 0) List.Add (strPadR(User.Handle, 37, ' ') + 'DELETED', 0)
@ -275,12 +275,12 @@ Var
End; End;
Begin Begin
UserFile := TBufFile.Create(8192); Assign (UserFile, Config.DataPath + 'users.dat');
If Not UserFile.Open(Config.DataPath + 'users.dat', fmOpenCreate, fmRWDN, SizeOf(RecUser)) Then Begin If Not ioReset(UserFile, SizeOf(RecUser), fmRWDN) Then
UserFile.Free; If (FileExist(Config.DataPath + 'users.dat')) OR NOT
(ioReWrite(UserFile, SizeOf(RecUser), fmRWDN)) Then
Exit; Exit;
End;
Box := TAnsiMenuBox.Create; Box := TAnsiMenuBox.Create;
List := TAnsiMenuList.Create; List := TAnsiMenuList.Create;
@ -303,21 +303,21 @@ Begin
Case List.ExitCode of Case List.ExitCode of
#13 : If List.ListMax <> 0 Then Begin #13 : If List.ListMax <> 0 Then Begin
UserFile.Seek (List.Picked - 1); Seek (UserFile, List.Picked - 1);
UserFile.Read (User); Read (UserFile, User);
Configuration_EditUser(User); Configuration_EditUser(User);
UserFile.Seek (List.Picked - 1); Seek (UserFile, List.Picked - 1);
UserFile.Write (User); Write (UserFile, User);
End; End;
#27 : Break; #27 : Break;
End; End;
Until False; Until False;
Box.Close; Close (UserFile);
UserFile.Free; Box.Close;
List.Free; List.Free;
Box.Free; Box.Free;
End; End;

View File

@ -26,6 +26,8 @@ Uses
AView, AView,
{$IFDEF USEALTPROT} {$IFDEF USEALTPROT}
m_Prot_Base, m_Prot_Base,
// m_Prot_Xmodem,
// m_Prot_Ymodem,
m_Prot_Zmodem; m_Prot_Zmodem;
{$ELSE} {$ELSE}
m_Protocol_Queue, m_Protocol_Queue,
@ -297,6 +299,13 @@ Var
Command := strStripB(strUpper(Command), ' '); Command := strStripB(strUpper(Command), ' ');
// If Command = '@XMODEM' Then
// Protocol := New(XmodemProtocolPTR, Init(Client, False, False, 0))
// Else
// If Command = '@YMODEM' Then
// Protocol := New(YmodemProtocolPTR, Init(Client, False, False, 0))
// Else
If Command = '@ZMODEM' Then If Command = '@ZMODEM' Then
Protocol := New(ZmodemProtocolPTR, Init(Client, False)) Protocol := New(ZmodemProtocolPTR, Init(Client, False))
Else Else
@ -2400,6 +2409,7 @@ Var
Session.io.PromptInfo[3] := strI2S(FDir.Downloads); Session.io.PromptInfo[3] := strI2S(FDir.Downloads);
Session.io.PromptInfo[4] := Str; Session.io.PromptInfo[4] := Str;
Session.io.PromptInfo[5] := FDir.Uploader; Session.io.PromptInfo[5] := FDir.Uploader;
Session.io.PromptInfo[6] := strI2S(FDir.Downloads);
OK := ShowText(strDesc); OK := ShowText(strDesc);
End Else Begin End Else Begin

View File

@ -60,11 +60,11 @@ Var
Begin Begin
Editor := TEditorANSI.Create(Pointer(Session), Template); Editor := TEditorANSI.Create(Pointer(Session), Template);
Editor.Subject := Subj;
For Count := 1 to Lines Do For Count := 1 to Lines Do
Editor.SetLineText (Count, Session.Msgs.MsgText[Count]); Editor.SetLineText (Count, Session.Msgs.MsgText[Count]);
Editor.Subject := Subj;
Result := Editor.Edit; Result := Editor.Edit;
Subj := Editor.Subject; Subj := Editor.Subject;

View File

@ -1261,10 +1261,18 @@ Begin
If BufPos MOD BaudEmulator = 0 Then WaitMS(6); If BufPos MOD BaudEmulator = 0 Then WaitMS(6);
End; End;
(*
If AllowAbort And (BufPos MOD 128 = 0) Then
If InKey(0) = #32 Then Begin
AnsiColor(7);
Break;
End;
If AllowAbort And (InKey(0) = #32) Then Begin If AllowAbort And (InKey(0) = #32) Then Begin
AnsiColor(7); AnsiColor(7);
Break; Break;
End; End;
*)
Case Ch of Case Ch of
#10 : Begin #10 : Begin
@ -2136,9 +2144,9 @@ Var
FillSize : Byte; FillSize : Byte;
Attr : Byte; Attr : Byte;
Begin Begin
Attr := Screen.TextAttr; // Attr := Screen.TextAttr;
// Screen.TextAttr := 0; // kludge to force it to return full ansi codes Screen.TextAttr := 0; // kludge to force it to return full ansi codes
If Part > Whole Then Part := Whole; If Part > Whole Then Part := Whole;

View File

@ -1179,6 +1179,7 @@ Var
Total : LongInt; Total : LongInt;
ReplyBase : RecMessageBase; ReplyBase : RecMessageBase;
IsPrivate : Boolean; IsPrivate : Boolean;
IsIgnore : Boolean;
Begin Begin
ReplyBase := MBase; ReplyBase := MBase;
@ -1192,10 +1193,14 @@ Begin
Else Else
Session.io.OutFull(Session.GetPrompt(510)); Session.io.OutFull(Session.GetPrompt(510));
Case Session.io.OneKey (#13#27 + 'QBNE', True) of Case Session.io.OneKey (#13#27 + 'QBE', True) of
'Q', 'Q',
#27 : Exit; #27 : Exit;
'B' : Begin 'B' : Begin
IsIgnore := Session.User.IgnoreGroup;
Session.User.IgnoreGroup := True;
Total := ListAreas(Config.MCompress); Total := ListAreas(Config.MCompress);
Repeat Repeat
@ -1203,16 +1208,25 @@ Begin
Case Session.io.OneKeyRange(#13 + '?Q', 1, Total) of Case Session.io.OneKeyRange(#13 + '?Q', 1, Total) of
#13, #13,
'Q': Exit; 'Q': Begin
Session.User.IgnoreGroup := IsIgnore;
Exit;
End;
'?': Total := ListAreas(Config.MCompress); '?': Total := ListAreas(Config.MCompress);
Else Else
Break; Break;
End; End;
Until False; Until False;
If Not GetBaseCompressed(Session.io.RangeValue, ReplyBase) Then If Not GetBaseCompressed(Session.io.RangeValue, ReplyBase) Then Begin
Session.User.IgnoreGroup := IsIgnore;
Exit; Exit;
End; End;
Session.User.IgnoreGroup := IsIgnore;
End;
'E' : Begin 'E' : Begin
Reset (MBaseFile); Reset (MBaseFile);
Read (MBaseFile, ReplyBase); Read (MBaseFile, ReplyBase);
@ -1571,8 +1585,11 @@ Var
MsgNew : PMsgBaseABS; MsgNew : PMsgBaseABS;
Str : String; Str : String;
Addr : RecEchoMailAddr; Addr : RecEchoMailAddr;
Ignore : Boolean;
Begin Begin
Result := False; Result := False;
Ignore := Session.User.IgnoreGroup;
Session.User.IgnoreGroup := True; Session.User.IgnoreGroup := True;
Repeat Repeat
@ -1646,7 +1663,7 @@ Var
End; End;
Until False; Until False;
Session.User.IgnoreGroup := False; Session.User.IgnoreGroup := Ignore;
End; End;
Procedure ExportMessage; Procedure ExportMessage;
@ -4341,17 +4358,7 @@ Begin
Session.io.OutFullLn (Session.GetPrompt(235)); Session.io.OutFullLn (Session.GetPrompt(235));
End Else Begin End Else Begin
// Session.SystemLog('DEBUG: Arc QWK: Nonlocal mode');
Session.FileBase.ExecuteArchive (Session.TempPath + Temp, Session.User.ThisUser.Archive, Session.TempPath + '*', 1); Session.FileBase.ExecuteArchive (Session.TempPath + Temp, Session.User.ThisUser.Archive, Session.TempPath + '*', 1);
// If FileExist(Session.TempPath + Temp) Then
// Session.SystemLog('DEBUG: QWK successfully archived')
// Else
// Session.SystemLog('DEBUG: Could not find QWK archived packet');
// Session.SystemLog('DEBUG: QWK calling SendFile on "' + Temp + '"');
Session.FileBase.SendFile (Session.TempPath + Temp); Session.FileBase.SendFile (Session.TempPath + Temp);
End; End;

View File

@ -868,6 +868,7 @@
451 |CR|09Subject: |XX 451 |CR|09Subject: |XX
; standard quote header ; standard quote header
452 |15Quote mode: Select a range of text to quote|CR 452 |15Quote mode: Select a range of text to quote|CR
; node chat: show users in chat footer
453 |09|$D77Ä|CR|PA 453 |09|$D77Ä|CR|PA
; no history data ; no history data
454 |CR|12No history data available.|CR|CR|PA 454 |CR|12No history data available.|CR|CR|PA

View File

@ -868,7 +868,7 @@ End;
Procedure ExportAreasBBS; Procedure ExportAreasBBS;
Var Var
MBaseFile : TBufFile; MBaseFile : TFileBuffer;
MBase : RecMessageBase; MBase : RecMessageBase;
OutFile : Text; OutFile : Text;
Begin Begin
@ -879,13 +879,13 @@ Begin
If IoResult <> 0 Then Exit; If IoResult <> 0 Then Exit;
MBaseFile := TBufFile.Create(8192); MBaseFile := TFileBuffer.Create(8192);
If MBaseFile.Open(Config.DataPath + 'mbases.dat', fmOpen, fmRWDN, SizeOf(RecMessageBase)) Then Begin If MBaseFile.OpenStream (Config.DataPath + 'mbases.dat', fmOpen, fmRWDN) Then Begin
MBaseFile.Read(MBase); MBaseFile.BlockRead (MBase, SizeOf(MBase));
While Not MBaseFile.EOF Do Begin While Not MBaseFile.EOF Do Begin
MBaseFile.Read(MBase); MBaseFile.BlockRead (MBase, SizeOf(MBase));
Update_Bar (MBaseFile.FilePos, MBaseFile.FileSize); Update_Bar (MBaseFile.FilePos, MBaseFile.FileSize);
Update_Status (strStripPipe(MBase.Name)); Update_Status (strStripPipe(MBase.Name));

View File

@ -76,17 +76,17 @@ Var
Procedure ReadConfiguration; Procedure ReadConfiguration;
Var Var
FileConfig : TBufFile; FileConfig : TFileBuffer;
DatLoc : String; DatLoc : String;
Begin Begin
FileConfig := TBufFile.Create(SizeOf(RecConfig)); FileConfig := TFileBuffer.Create(SizeOf(RecConfig));
If Not FileConfig.Open('mystic.dat', fmOpen, fmReadWrite + fmDenyNone, SizeOf(RecConfig)) Then Begin If Not FileConfig.OpenStream ('mystic.dat', fmOpen, fmRWDN) Then Begin
DatLoc := GetEnv('mysticbbs'); DatLoc := GetEnv('mysticbbs');
If DatLoc <> '' Then DatLoc := DirSlash(DatLoc); If DatLoc <> '' Then DatLoc := DirSlash(DatLoc);
If Not FileConfig.Open(DatLoc + 'mystic.dat', fmOpen, fmReadWrite + fmDenyNone, SizeOf(RecConfig)) Then Begin If Not FileConfig.OpenStream (DatLoc + 'mystic.dat', fmOpen, fmRWDN) Then Begin
If Not DaemonMode Then Begin If Not DaemonMode Then Begin
Console.WriteLine (#13#10 + 'ERROR: Unable to read MYSTIC.DAT. This file must exist in the same'); Console.WriteLine (#13#10 + 'ERROR: Unable to read MYSTIC.DAT. This file must exist in the same');
Console.WriteLine ('directory as MIS'); Console.WriteLine ('directory as MIS');
@ -101,7 +101,7 @@ Begin
End; End;
End; End;
FileConfig.Read(bbsConfig); FileConfig.BlockRead (bbsConfig, SizeOf(bbsConfig));
FileConfig.Free; FileConfig.Free;
If bbsConfig.DataChanged <> mysDataChanged Then Begin If bbsConfig.DataChanged <> mysDataChanged Then Begin

View File

@ -323,7 +323,7 @@ End;
Function TFTPServer.FindDirectory (Var TempBase: RecFileBase) : LongInt; Function TFTPServer.FindDirectory (Var TempBase: RecFileBase) : LongInt;
Var Var
FBaseFile : TBufFile; FBaseFile : TFileBuffer;
Found : Boolean; Found : Boolean;
Begin Begin
Result := FBasePos; Result := FBasePos;
@ -348,13 +348,13 @@ Begin
If Data = '' Then Exit; If Data = '' Then Exit;
FBaseFile := TBufFile.Create(FileBufSize); FBaseFile := TFileBuffer.Create(FileBufSize);
If FBaseFile.Open(bbsConfig.DataPath + 'fbases.dat', fmOpen, fmRWDN, SizeOf(RecFileBase)) Then Begin If FBaseFile.OpenStream (bbsConfig.DataPath + 'fbases.dat', fmOpen, fmRWDN) Then Begin
Found := False; Found := False;
While Not FBaseFile.EOF Do Begin While Not FBaseFile.EOF Do Begin
FBaseFile.Read(TempBase); FBaseFile.BlockRead(TempBase, SizeOf(TempBase));
If (strUpper(TempBase.FtpName) = strUpper(Data)) and ValidDirectory(TempBase) Then Begin If (strUpper(TempBase.FtpName) = strUpper(Data)) and ValidDirectory(TempBase) Then Begin
Result := FBaseFile.FilePos; Result := FBaseFile.FilePos;
@ -520,7 +520,7 @@ Procedure TFTPServer.cmdNLST;
Var Var
TempBase : RecFileBase; TempBase : RecFileBase;
TempPos : LongInt; TempPos : LongInt;
DirFile : TBufFile; DirFile : TFileBuffer;
Dir : RecFileList; Dir : RecFileList;
Begin Begin
If LoggedIn Then Begin If LoggedIn Then Begin
@ -535,11 +535,11 @@ Begin
OpenDataSession; OpenDataSession;
DirFile := TBufFile.Create(FileBufSize); DirFile := TFileBuffer.Create(FileBufSize);
If DirFile.Open(bbsConfig.DataPath + TempBase.FileName + '.dir', fmOpenCreate, fmRWDN, SizeOf(RecFileList)) Then Begin If DirFile.OpenStream (bbsConfig.DataPath + TempBase.FileName + '.dir', fmOpenCreate, fmRWDN) Then Begin
While Not DirFile.EOF Do Begin While Not DirFile.EOF Do Begin
DirFile.Read(Dir); DirFile.BlockRead(Dir, SizeOf(RecFileList));
If (Dir.Flags And FDirDeleted <> 0) Then Continue; If (Dir.Flags And FDirDeleted <> 0) Then Continue;
If (Dir.Flags And FDirInvalid <> 0) And (Not CheckAccess(User, True, bbsConfig.AcsSeeUnvalid)) Then Continue; If (Dir.Flags And FDirInvalid <> 0) And (Not CheckAccess(User, True, bbsConfig.AcsSeeUnvalid)) Then Continue;
@ -572,8 +572,8 @@ Procedure TFTPServer.cmdLIST;
Var Var
TempBase : RecFileBase; TempBase : RecFileBase;
TempPos : LongInt; TempPos : LongInt;
FBaseFile : TBufFile; FBaseFile : TFileBuffer;
DirFile : TBufFile; DirFile : TFileBuffer;
Dir : RecFileList; Dir : RecFileList;
Begin Begin
{$IFDEF FTPDEBUG} LOG('LIST Calling FindDirectory'); {$ENDIF} {$IFDEF FTPDEBUG} LOG('LIST Calling FindDirectory'); {$ENDIF}
@ -590,11 +590,11 @@ Begin
{$IFDEF FTPDEBUG} LOG('Back from data session'); {$ENDIF} {$IFDEF FTPDEBUG} LOG('Back from data session'); {$ENDIF}
FBaseFile := TBufFile.Create(FileBufSize); FBaseFile := TFileBuffer.Create(FileBufSize);
If FBaseFile.Open(bbsConfig.DataPath + 'fbases.dat', fmOpen, fmRWDN, SizeOf(RecFileBase)) Then Begin If FBaseFile.OpenStream (bbsConfig.DataPath + 'fbases.dat', fmOpen, fmRWDN) Then Begin
While Not FBaseFile.EOF Do Begin While Not FBaseFile.EOF Do Begin
FBaseFile.Read(TempBase); FBaseFile.BlockRead(TempBase, SizeOf(RecFileBase));
If ValidDirectory(TempBase) and WildMatch(FileMask, TempBase.FtpName, False) Then If ValidDirectory(TempBase) and WildMatch(FileMask, TempBase.FtpName, False) Then
DataSocket.WriteLine('drwxr-xr-x 1 ftp ftp 0 Jul 11 23:35 ' + TempBase.FtpName) DataSocket.WriteLine('drwxr-xr-x 1 ftp ftp 0 Jul 11 23:35 ' + TempBase.FtpName)
@ -610,11 +610,11 @@ Begin
OpenDataSession; OpenDataSession;
DirFile := TBufFile.Create(FileBufSize); DirFile := TFileBuffer.Create(FileBufSize);
If DirFile.Open(bbsConfig.DataPath + TempBase.FileName + '.dir', fmOpenCreate, fmRWDN, SizeOf(RecFileList)) Then Begin If DirFile.OpenStream (bbsConfig.DataPath + TempBase.FileName + '.dir', fmOpenCreate, fmRWDN) Then Begin
While Not DirFile.EOF Do Begin While Not DirFile.EOF Do Begin
DirFile.Read(Dir); DirFile.BlockRead(Dir, SizeOf(RecFileList));
If (Dir.Flags And FDirDeleted <> 0) Then Continue; If (Dir.Flags And FDirDeleted <> 0) Then Continue;
If (Dir.Flags and FDirOffline <> 0) And (Not CheckAccess(User, True, bbsConfig.AcsSeeOffline)) Then Continue; If (Dir.Flags and FDirOffline <> 0) And (Not CheckAccess(User, True, bbsConfig.AcsSeeOffline)) Then Continue;
@ -637,7 +637,7 @@ Procedure TFTPServer.cmdRETR;
Var Var
TempPos : LongInt; TempPos : LongInt;
TempBase : RecFileBase; TempBase : RecFileBase;
DirFile : TBufFile; DirFile : TFileBuffer;
Dir : RecFileList; Dir : RecFileList;
Found : LongInt; Found : LongInt;
F : File; F : File;
@ -653,12 +653,12 @@ Begin
Exit; Exit;
End; End;
DirFile := TBufFile.Create(FileBufSize); DirFile := TFileBuffer.Create(FileBufSize);
Found := -1; Found := -1;
If DirFile.Open(bbsConfig.DataPath + TempBase.FileName + '.dir', fmOpenCreate, fmRWDN, SizeOf(RecFileList)) Then Begin If DirFile.OpenStream (bbsConfig.DataPath + TempBase.FileName + '.dir', fmOpenCreate, fmRWDN) Then Begin
While Not DirFile.EOF Do Begin While Not DirFile.EOF Do Begin
DirFile.Read(Dir); DirFile.BlockRead (Dir, SizeOf(RecFileList));
If WildMatch(FileMask, Dir.FileName, False) Then Begin If WildMatch(FileMask, Dir.FileName, False) Then Begin
Found := DirFile.FilePos; Found := DirFile.FilePos;

View File

@ -155,7 +155,7 @@ End;
Procedure TNNTPServer.cmd_GROUP; Procedure TNNTPServer.cmd_GROUP;
Var Var
MBaseFile : TBufFile; MBaseFile : TFileBuffer;
TempBase : RecMessageBase; TempBase : RecMessageBase;
MsgBase : PMsgBaseABS; MsgBase : PMsgBaseABS;
Active : LongInt = 0; Active : LongInt = 0;
@ -168,13 +168,13 @@ Begin
Exit; Exit;
End; End;
MBaseFile := TBufFile.Create(FileReadBuffer); MBaseFile := TFileBuffer.Create(FileReadBuffer);
If MBaseFile.Open(bbsConfig.DataPath + 'mbases.dat', fmOpen, fmRWDN, SizeOf(RecMessageBase)) Then Begin If MBaseFile.OpenStream (bbsConfig.DataPath + 'mbases.dat', fmOpen, fmRWDN) Then Begin
MBaseFile.Read(TempBase); MBaseFile.BlockRead(TempBase, SizeOf(TempBase));
While Not MBaseFile.EOF Do Begin While Not MBaseFile.EOF Do Begin
MBaseFile.Read(TempBase); MBaseFile.BlockRead(TempBase, SizeOf(TempBase));
If (TempBase.NewsName = Data) and CheckAccess(User, True, TempBase.ReadACS) Then Begin If (TempBase.NewsName = Data) and CheckAccess(User, True, TempBase.ReadACS) Then Begin
Found := True; Found := True;
@ -214,7 +214,7 @@ End;
Procedure TNNTPServer.cmd_LIST; Procedure TNNTPServer.cmd_LIST;
Var Var
MBaseFile : TBufFile; MBaseFile : TFileBuffer;
TempBase : RecMessageBase; TempBase : RecMessageBase;
MsgBase : PMsgBaseABS; MsgBase : PMsgBaseABS;
LowMessage : LongInt; LowMessage : LongInt;
@ -241,13 +241,13 @@ Begin
Exit; Exit;
End; End;
MBaseFile := TBufFile.Create(FileReadBuffer); MBaseFile := TFileBuffer.Create(FileReadBuffer);
If MBaseFile.Open(bbsConfig.DataPath + 'mbases.dat', fmOpen, fmRWDN, SizeOf(RecMessageBase)) Then Begin If MBaseFile.OpenStream (bbsConfig.DataPath + 'mbases.dat', fmOpen, fmRWDN) Then Begin
MBaseFile.Read(TempBase); MBaseFile.BlockRead(TempBase, SizeOf(TempBase));
While Not MBaseFile.EOF Do Begin While Not MBaseFile.EOF Do Begin
MBaseFile.Read(TempBase); MBaseFile.BlockRead(TempBase, SizeOf(TempBase));
If TempBase.NewsName = '' Then Continue; If TempBase.NewsName = '' Then Continue;

View File

@ -4,6 +4,7 @@ Unit MIS_Client_Telnet;
Interface Interface
{$IFNDEF CPUARM}
{$IFDEF LINUX} {$IFDEF LINUX}
{$IFDEF CPU32} {$IFDEF CPU32}
{$LinkLib libutil.a} {$LinkLib libutil.a}
@ -12,6 +13,7 @@ Interface
{$LinkLib libutil.a} {$LinkLib libutil.a}
{$ENDIF} {$ENDIF}
{$ENDIF} {$ENDIF}
{$ENDIF}
Uses Uses
{$IFDEF DARWIN} {$IFDEF DARWIN}

View File

@ -29,18 +29,18 @@ Uses
Function SearchForUser (UN: String; Var Rec: RecUser; Var RecPos: LongInt) : Boolean; Function SearchForUser (UN: String; Var Rec: RecUser; Var RecPos: LongInt) : Boolean;
Var Var
UserFile : TBufFile; UserFile : TFileBuffer;
Begin Begin
Result := False; Result := False;
UN := strUpper(UN); UN := strUpper(UN);
If UN = '' Then Exit; If UN = '' Then Exit;
UserFile := TBufFile.Create(4096); UserFile := TFileBuffer.Create (8 * 1024);
If UserFile.Open(bbsConfig.DataPath + 'users.dat', fmOpen, fmRWDN, SizeOf(RecUser)) Then If UserFile.OpenStream (bbsConfig.DataPath + 'users.dat', fmOpen, fmRWDN) Then
While Not UserFile.EOF Do Begin While Not UserFile.EOF Do Begin
UserFile.Read(Rec); UserFile.BlockRead(Rec, SizeOf(Rec));
If Rec.Flags AND UserDeleted <> 0 Then Continue; If Rec.Flags AND UserDeleted <> 0 Then Continue;

View File

@ -7,8 +7,7 @@ Interface
Uses Uses
DOS, DOS,
m_Strings, m_Strings,
m_FileIO, m_FileIO;
MPL_FileIO;
{$DEFINE MPLPARSER} {$DEFINE MPLPARSER}
@ -39,7 +38,7 @@ Type
TParserUpdateProc = Procedure (Mode: TParserUpdateInfo); TParserUpdateProc = Procedure (Mode: TParserUpdateInfo);
TParserSourceFile = Record TParserSourceFile = Record
DataFile : TCharFile; DataFile : TFileBuffer;
Position : LongInt; Position : LongInt;
PosSaved : LongInt; PosSaved : LongInt;
Size : LongInt; Size : LongInt;
@ -272,7 +271,7 @@ Begin
UpdateInfo.ErrorLine := 1; UpdateInfo.ErrorLine := 1;
UpdateInfo.ErrorCol := 0; UpdateInfo.ErrorCol := 0;
If InFile[CurFile].DataFile.Opened Then Begin If Assigned(InFile[CurFile].DataFile) And InFile[CurFile].DataFile.IsOpened Then Begin
InFile[CurFile].DataFile.Seek(0); InFile[CurFile].DataFile.Seek(0);
While Not InFile[CurFile].DataFile.EOF And (InFile[CurFile].DataFile.FilePos < InFile[CurFile].Position) Do Begin While Not InFile[CurFile].DataFile.EOF And (InFile[CurFile].DataFile.FilePos < InFile[CurFile].Position) Do Begin
@ -2829,10 +2828,11 @@ Begin
Else Else
UpdateStatus(StatusInclude); UpdateStatus(StatusInclude);
InFile[CurFile].DataFile.Init(4096); InFile[CurFile].DataFile := TFileBuffer.Create(8 * 1024);
If Not InFile[CurFile].DataFile.Open(FN) Then Begin If Not InFile[CurFile].DataFile.OpenStream(FN, fmOpen, fmRWDN) Then Begin
InFile[CurFile].DataFile.Done; InFile[CurFile].DataFile.Free;
InFile[CurFile].DataFile := NIL;
Error (mpsFileNotFound, FN); Error (mpsFileNotFound, FN);
@ -2851,8 +2851,8 @@ Begin
If (UpdateInfo.ErrorType = 0) Then If (UpdateInfo.ErrorType = 0) Then
UpdateStatus(StatusUpdate); UpdateStatus(StatusUpdate);
InFile[CurFile].DataFile.Close; InFile[CurFile].DataFile.Free;
InFile[CurFile].DataFile.Done; InFile[CurFile].DataFile := NIL;
Dec(CurFile); Dec(CurFile);
End; End;
@ -2887,12 +2887,8 @@ Begin
CloseSourceFile; CloseSourceFile;
For Count := 1 to CurFile Do Begin For Count := 1 to CurFile Do
InFile[Count].DataFile.Close; InFile[Count].DataFile.Free;
InFile[Count].DataFile.Done;
If IoResult <> 0 Then ;
End;
UpdateStatus(StatusDone); UpdateStatus(StatusDone);

View File

@ -6,7 +6,7 @@ Interface
Uses Uses
DOS, DOS,
MPL_FileIO, m_FileIO,
BBS_Common; BBS_Common;
{$I MPL_TYPES.PAS} {$I MPL_TYPES.PAS}
@ -19,7 +19,7 @@ Type
Owner : Pointer; Owner : Pointer;
ErrStr : String; ErrStr : String;
ErrNum : Byte; ErrNum : Byte;
DataFile : PCharFile; DataFile : TFileBuffer;
CurVarNum : Word; CurVarNum : Word;
CurVarID : Word; CurVarID : Word;
VarData : VarDataRec; VarData : VarDataRec;
@ -119,7 +119,6 @@ Uses
m_Strings, m_Strings,
m_DateTime, m_DateTime,
m_Types, m_Types,
m_FileIO,
BBS_Core, BBS_Core,
BBS_IO, BBS_IO,
BBS_General, BBS_General,
@ -395,24 +394,24 @@ End;
Procedure TInterpEngine.MoveToPos (Num: LongInt); Procedure TInterpEngine.MoveToPos (Num: LongInt);
Begin Begin
DataFile^.Seek (Num + mplVerLength); DataFile.Seek (Num + mplVerLength);
End; End;
Function TInterpEngine.CurFilePos : LongInt; Function TInterpEngine.CurFilePos : LongInt;
Begin Begin
Result := DataFile^.FilePos - mplVerLength; Result := DataFile.FilePos - mplVerLength;
End; End;
Procedure TInterpEngine.NextChar; Procedure TInterpEngine.NextChar;
Begin Begin
Ch := DataFile^.Read; Ch := DataFile.Read;
End; End;
Procedure TInterpEngine.NextWord; Procedure TInterpEngine.NextWord;
Var Var
Res : LongInt; Res : LongInt;
Begin Begin
DataFile^.BlockRead (W, 2, Res); DataFile.BlockRead (W, 2, Res);
End; End;
Procedure TInterpEngine.PrevChar; Procedure TInterpEngine.PrevChar;
@ -695,7 +694,7 @@ Begin
opOpenString : Begin opOpenString : Begin
NextChar; NextChar;
Result[0] := Ch; Result[0] := Ch;
DataFile^.BlockRead (Result[1], Byte(Ch), Res); DataFile.BlockRead (Result[1], Byte(Ch), Res);
End; End;
opProcExec : Case ExecuteProcedure(@Result) of opProcExec : Case ExecuteProcedure(@Result) of
iChar : Begin // convert to string if its a char iChar : Begin // convert to string if its a char
@ -2314,7 +2313,7 @@ Begin
Else Else
Error (mpxUnknownOp, strI2S(Ord(Ch))); Error (mpxUnknownOp, strI2S(Ord(Ch)));
End; End;
Until (ErrNum <> 0) or Done or DataFile^.EOF; Until (ErrNum <> 0) or Done or DataFile.EOF;
{$IFDEF LOGGING} {$IFDEF LOGGING}
Session.SystemLog('[' + strI2S(Depth) + '] ExecBlock KILL VAR: ' + strI2S(CurVarNum) + ' to ' + strI2S(StartVar + 1)); Session.SystemLog('[' + strI2S(Depth) + '] ExecBlock KILL VAR: ' + strI2S(CurVarNum) + ' to ' + strI2S(StartVar + 1));
@ -2366,7 +2365,7 @@ Begin
SavedMCI := Session.io.AllowMCI; SavedMCI := Session.io.AllowMCI;
SavedGroup := Session.User.IgnoreGroup; SavedGroup := Session.User.IgnoreGroup;
SavedArrow := Session.io.AllowArrow; SavedArrow := Session.io.AllowArrow;
DataFile := New(PCharFile, Init(mplExecuteBuffer)); DataFile := TFileBuffer.Create(mplExecuteBuffer);
Session.io.AllowArrow := True; Session.io.AllowArrow := True;
@ -2387,31 +2386,29 @@ Begin
MPEName := FN; MPEName := FN;
If Not DataFile^.Open(FN) Then Begin If Not DataFile.OpenStream(FN, fmOpen, fmRWDN) Then Begin
Dispose(DataFile, Done); DataFile.Free;
Exit; Exit;
End; End;
Result := 1; Result := 1;
If DataFile^.FileSize < mplVerLength Then Begin If DataFile.FileSize < mplVerLength Then Begin
DataFile^.Close; DataFile.Free;
Error (mpxInvalidFile, FN); Error (mpxInvalidFile, FN);
Dispose (DataFile, Done);
Exit; Exit;
End; End;
DataFile^.BlockRead (VerStr[1], mplVerLength, Res); DataFile.BlockRead (VerStr[1], mplVerLength, Res);
VerStr[0] := Chr(mplVerLength); VerStr[0] := Chr(mplVerLength);
If VerStr <> mplVersion Then Begin If VerStr <> mplVersion Then Begin
DataFile^.Close; DataFile.Free;
Error (mpxVerMismatch, VerStr); Error (mpxVerMismatch, VerStr);
Dispose (DataFile, Done);
Exit; Exit;
End; End;
@ -2419,9 +2416,7 @@ Begin
InitProcedures (Owner, Self, VarData, CurVarNum, CurVarID, 0); InitProcedures (Owner, Self, VarData, CurVarNum, CurVarID, 0);
ExecuteBlock (CurVarNum); ExecuteBlock (CurVarNum);
DataFile^.Close; DataFile.Free;
Dispose(DataFile, Done);
Session.io.AllowMCI := SavedMCI; Session.io.AllowMCI := SavedMCI;
Session.User.IgnoreGroup := SavedGroup; Session.User.IgnoreGroup := SavedGroup;

View File

@ -9,7 +9,6 @@ Uses
m_FileIO, m_FileIO,
m_Strings, m_Strings,
m_DateTime, m_DateTime,
MPL_FileIO,
BBS_Common, BBS_Common,
mUtil_Common; mUtil_Common;
@ -96,7 +95,7 @@ Type
Orig : RecEchoMailAddr; Orig : RecEchoMailAddr;
Dest : RecEchoMailAddr; Dest : RecEchoMailAddr;
MsgHdr : RecPKTMessageHdr; MsgHdr : RecPKTMessageHdr;
MsgFile : PCharFile; MsgFile : TFileBuffer;
MsgTo : String[50]; MsgTo : String[50];
MsgFrom : String[50]; MsgFrom : String[50];
MsgSubj : String[80]; MsgSubj : String[80];
@ -194,16 +193,13 @@ Constructor TPKTReader.Create;
Begin Begin
Opened := False; Opened := False;
MsgLines := 0; MsgLines := 0;
MsgFile := New (PCharFile, Init(1024 * 16)); MsgFile := TFileBuffer.Create(16 * 1024);
End; End;
Destructor TPKTReader.Destroy; Destructor TPKTReader.Destroy;
Begin Begin
DisposeText; DisposeText;
MsgFile.Free;
If MsgFile.Opened Then MsgFile.Close;
Dispose (MsgFile, Done);
Inherited Destroy; Inherited Destroy;
End; End;
@ -222,7 +218,7 @@ Procedure TPKTReader.Close;
Begin Begin
DisposeText; DisposeText;
If MsgFile.Opened Then MsgFile.Close; If MsgFile.IsOpened Then MsgFile.CloseStream;
End; End;
Function TPKTReader.Open (FN: String) : Boolean; Function TPKTReader.Open (FN: String) : Boolean;
@ -231,12 +227,12 @@ Var
Begin Begin
Result := False; Result := False;
If Not MsgFile.Open(FN) Then Exit; If Not MsgFile.OpenStream (FN, fmOpen, fmRWDN) Then Exit;
MsgFile.BlockRead (PKTHeader, SizeOf(PKTHeader), Res); MsgFile.BlockRead (PKTHeader, SizeOf(PKTHeader), Res);
If (Res <> SizeOf(PKTHeader)) or (PKTHeader.PKTType <> $0002) Then Begin If (Res <> SizeOf(PKTHeader)) or (PKTHeader.PKTType <> $0002) Then Begin
MsgFile.Close; MsgFile.CloseStream;
Opened := False; Opened := False;
End Else Begin End Else Begin

View File

@ -27,7 +27,7 @@ Type
End; End;
Var Var
LinkFile : TBufFile; LinkFile : TFileBuffer;
BaseKills : Cardinal = 0; BaseKills : Cardinal = 0;
BaseTotal : Cardinal = 0; BaseTotal : Cardinal = 0;
TotalKills : Cardinal = 0; TotalKills : Cardinal = 0;
@ -35,11 +35,12 @@ Var
Function GetMessageLink (OldNum: Cardinal; Zero: Boolean) : Cardinal; Function GetMessageLink (OldNum: Cardinal; Zero: Boolean) : Cardinal;
Var Var
L : RecMsgLink; L : RecMsgLink;
Res : LongInt;
Begin Begin
LinkFile.Reset; LinkFile.Seek(0);
While Not LinkFile.EOF Do Begin While Not LinkFile.EOF Do Begin
LinkFile.Read(L); LinkFile.BlockRead(L, SizeOf(L), Res);
If L.OldNum = OldNum Then Begin If L.OldNum = OldNum Then Begin
Result := L.NewNum; Result := L.NewNum;
@ -107,9 +108,9 @@ Var
Exit; Exit;
End; End;
LinkFile := TBufFile.Create (8 * 1024); LinkFile := TFileBuffer.Create (8 * 1024);
LinkFile.Open (TempPath + TempName + '.tmp', fmCreate, fmRWDN, SizeOf(RecMsgLink)); LinkFile.OpenStream (TempPath + TempName + '.tmp', fmCreate, fmRWDN);
MsgData^.SeekFirst(1); MsgData^.SeekFirst(1);
@ -162,7 +163,7 @@ Var
Link.OldNum := MsgData^.GetMsgNum; Link.OldNum := MsgData^.GetMsgNum;
Link.NewNum := NewData^.GetHighMsgNum; Link.NewNum := NewData^.GetHighMsgNum;
LinkFile.Write (Link); LinkFile.BlockWrite (Link, SizeOf(Link));
End; End;
MsgData^.SeekNext; MsgData^.SeekNext;

View File

@ -24,7 +24,7 @@ Var
Function GenerateList (ListType: TopListType) : Boolean; Function GenerateList (ListType: TopListType) : Boolean;
Var Var
UserFile : TBufFile; UserFile : File of RecUser;
User : RecUser; User : RecUser;
Sort : TQuickSort; Sort : TQuickSort;
@ -124,8 +124,8 @@ Var
If (CodeVal[1] in ['0'..'9']) And (CodeVal[2] in ['0'..'9']) Then Begin If (CodeVal[1] in ['0'..'9']) And (CodeVal[2] in ['0'..'9']) Then Begin
If Sort.Data[strS2I(CodeVal)] <> NIL Then Begin If Sort.Data[strS2I(CodeVal)] <> NIL Then Begin
UserFile.Seek (Pred(Sort.Data[strS2I(CodeVal)]^.Ptr)); Seek (UserFile, Pred(Sort.Data[strS2I(CodeVal)]^.Ptr));
UserFile.Read (User); Read (UserFile, User);
End Else Begin End Else Begin
FillChar (User, SizeOf(User), 0); FillChar (User, SizeOf(User), 0);
@ -178,16 +178,17 @@ Begin
BarOne.Reset; BarOne.Reset;
UserFile := TBufFile.Create(8192);
Sort := TQuickSort.Create; Sort := TQuickSort.Create;
If UserFile.Open(bbsConfig.DataPath + 'users.dat', fmOpen, fmRWDN, SizeOf(RecUser)) Then Begin Assign (UserFile, bbsConfig.DataPath + 'users.dat');
While Not UserFile.EOF Do Begin
UserFile.Read (User); If ioReset(UserFile, SizeOf(RecUser), fmRWDN) Then Begin
While Not EOF(UserFile) Do Begin
Read (UserFile, User);
If User.Flags And UserDeleted <> 0 Then Continue; If User.Flags And UserDeleted <> 0 Then Continue;
BarOne.Update(UserFile.FilePos, UserFile.FileSize); BarOne.Update(FilePos(UserFile), FileSize(UserFile));
Excluded := False; Excluded := False;
@ -213,19 +214,19 @@ Begin
End; End;
If Not Excluded Then If Not Excluded Then
Sort.Conditional(strPadL(strI2S(GetValue), 10, '0'), UserFile.FilePos, 99, SortMode); Sort.Conditional(strPadL(strI2S(GetValue), 10, '0'), FilePos(UserFile), 99, SortMode);
End; End;
Sort.Sort (1, Sort.Total, SortMode); Sort.Sort (1, Sort.Total, SortMode);
GenerateOutput; GenerateOutput;
Close (UserFile);
End Else End Else
Result := False; Result := False;
BarOne.Update(100, 100); BarOne.Update(100, 100);
UserFile.Free;
Sort.Free; Sort.Free;
End; End;

View File

@ -3310,7 +3310,7 @@
+ MUTIL now properly exports echomail and netmail for BSO-style point nodes. + MUTIL now properly exports echomail and netmail for BSO-style point nodes.
+ FIDOPOLL now supports sending/receiving echomail from point systems. + FIDOPOLL now supports sending/receiving echomail for point systems.
! Fixed a bug in the QWK download system that could cause some networked ! Fixed a bug in the QWK download system that could cause some networked
message bases to get corrupted. message bases to get corrupted.
@ -3318,7 +3318,22 @@
+ Mystic now allows the network interface to be defined for its MIS servers. + Mystic now allows the network interface to be defined for its MIS servers.
If you want it to work the same as before, you MUST set the "Interface" If you want it to work the same as before, you MUST set the "Interface"
value in "System Configuration -> Internet Options" to "0.0.0.0" without value in "System Configuration -> Internet Options" to "0.0.0.0" without
the quotes. the quotes. ALPHA TESTERS: DO NOT SKIP THIS STEP! USE CTRL-Y WHEN
EDITING THIS FIELD AND VALIDATE THAT IT IS BLANK BEFORE SETTING THE
VALUE TO 0.0.0.0 (ie no spaces before or after etc).
If you specify 0.0.0.0 Mystic will try to accept ANY connection on a
specified port for all adapters. If you specify one in particular Mystic
will only bind, accept, and use connections from that network interface.
+ Added some new file buffer functions to replace the old stuff. In areas
where this is used (very few for now) there should be some speed up. Be
on the lookout for broken things.
+ When selecting message base during a reply, Mystic will now list all bases
the user has access to, instead of just the current group.
! Fixed a rare bug that could ocassionally cause some strange behavior
during global new scans IF a message was moved.
<ALPHA 33 RELEASED> <ALPHA 33 RELEASED>