Removed FileMask IFDEF * should work in Windows and OSX/Linux

This commit is contained in:
mysticbbs 2012-02-24 12:27:05 -05:00
parent 389d07164a
commit e7fa616d06
4 changed files with 24 additions and 33 deletions

View File

@ -24,11 +24,6 @@ Uses
Const Const
WinConsoleTitle = 'Mystic Node '; WinConsoleTitle = 'Mystic Node ';
{$IFDEF UNIX}
FileMask = '*';
{$ELSE}
FileMask = '*.*';
{$ENDIF}
CopyID = 'Copyright (C) 1997-2012 By James Coyle. All Rights Reserved.'; CopyID = 'Copyright (C) 1997-2012 By James Coyle. All Rights Reserved.';
DateTypeStr : Array[1..4] of String[8] = ('MM/DD/YY', 'DD/MM/YY', 'YY/DD/MM', 'Ask '); DateTypeStr : Array[1..4] of String[8] = ('MM/DD/YY', 'DD/MM/YY', 'YY/DD/MM', 'Ask ');
GetKeyFunc : Function (Forced : Boolean) : Boolean = NIL; GetKeyFunc : Function (Forced : Boolean) : Boolean = NIL;
@ -36,8 +31,6 @@ Const
Var Var
Screen : TOutput; Screen : TOutput;
Input : TInput; Input : TInput;
// input will be gone, client and screen will be passed.
CurRoom : Byte; CurRoom : Byte;
NodeMsgFile : File of NodeMsgRec; NodeMsgFile : File of NodeMsgRec;
NodeMsg : NodeMsgRec; NodeMsg : NodeMsgRec;
@ -57,7 +50,7 @@ Procedure EditAccessFlags (Var Flags : AccessFlagType);
Function DrawAccessFlags (Var Flags : AccessFlagType) : String; Function DrawAccessFlags (Var Flags : AccessFlagType) : String;
Function NoGetKeyFunc (Forced : Boolean) : Boolean; Function NoGetKeyFunc (Forced : Boolean) : Boolean;
Function getColor (A: Byte) : Byte; Function getColor (A: Byte) : Byte;
Procedure KillRecord (var dFile; RecNum: LongInt; RecSize: Word); Procedure KillRecord (Var dFile; RecNum: LongInt; RecSize: Word);
Procedure AddRecord (var dFile; RecNum: LongInt; RecSize: Word); Procedure AddRecord (var dFile; RecNum: LongInt; RecSize: Word);
Function Bool_Search (Mask: String; Str: String) : Boolean; Function Bool_Search (Mask: String; Str: String) : Boolean;
Function strAddr2Str (Addr: RecEchoMailAddr) : String; Function strAddr2Str (Addr: RecEchoMailAddr) : String;
@ -251,7 +244,6 @@ End;
Function ShellDOS (ExecPath: String; Command: String) : LongInt; Function ShellDOS (ExecPath: String; Command: String) : LongInt;
Var Var
RetVal : Integer;
{$IFNDEF UNIX} {$IFNDEF UNIX}
Image : TConsoleImageRec; Image : TConsoleImageRec;
{$ENDIF} {$ENDIF}
@ -281,13 +273,13 @@ Begin
If ExecPath <> '' Then DirChange(ExecPath); If ExecPath <> '' Then DirChange(ExecPath);
{$IFDEF UNIX} {$IFDEF UNIX}
RetVal := Shell (Command); Result := Shell (Command);
{$ENDIF} {$ENDIF}
{$IFDEF WINDOWS} {$IFDEF WINDOWS}
If Command <> '' Then Command := '/C' + Command; If Command <> '' Then Command := '/C' + Command;
Exec (GetEnv('COMSPEC'), Command); Exec (GetEnv('COMSPEC'), Command);
RetVal := DosExitCode; Result := DosExitCode;
{$ENDIF} {$ENDIF}
{$IFDEF UNIX} {$IFDEF UNIX}
@ -315,7 +307,6 @@ Begin
{$ENDIF} {$ENDIF}
Session.TimeOut := TimerSeconds; Session.TimeOut := TimerSeconds;
ShellDOS := RetVal;
End; End;
{$IFNDEF UNIX} {$IFNDEF UNIX}

View File

@ -436,7 +436,7 @@ Begin
If ExportFileList(NewFiles, False) Then Begin If ExportFileList(NewFiles, False) Then Begin
If Session.io.GetYN (Session.GetPrompt(227), True) Then Begin If Session.io.GetYN (Session.GetPrompt(227), True) Then Begin
FileName := FileName + Session.User.ThisUser.Archive; FileName := FileName + Session.User.ThisUser.Archive;
ExecuteArchive (Session.TempPath + FileName, Session.User.ThisUser.Archive, Session.TempPath + FileMask, 1); ExecuteArchive (Session.TempPath + FileName, Session.User.ThisUser.Archive, Session.TempPath + '*', 1);
End Else End Else
FileName := FileName + 'txt'; FileName := FileName + 'txt';
@ -3386,7 +3386,7 @@ Var
Assign (FDirFile, Config.DataPath + FBase.FileName + '.dir'); Assign (FDirFile, Config.DataPath + FBase.FileName + '.dir');
FindFirst(FBase.Path + FileMask, Archive, DirInfo); FindFirst(FBase.Path + '*', Archive, DirInfo);
While DosError = 0 Do Begin While DosError = 0 Do Begin
OldPos := FilePos(FBaseFile); OldPos := FilePos(FBaseFile);

View File

@ -3114,7 +3114,7 @@ Var
Chunks : SmallInt; Chunks : SmallInt;
Begin Begin
If Session.LocalMode Then If Session.LocalMode Then
Session.FileBase.ExecuteArchive (Config.QWKPath + Config.qwkBBSID + '.rep', Session.User.ThisUser.Archive, FileMask{TempPath}, 2) Session.FileBase.ExecuteArchive (Config.QWKPath + Config.qwkBBSID + '.rep', Session.User.ThisUser.Archive, '*', 2)
Else Begin Else Begin
If Session.FileBase.SelectProtocol(False) = 'Q' Then Exit; If Session.FileBase.SelectProtocol(False) = 'Q' Then Exit;
@ -3126,7 +3126,7 @@ Begin
Exit; Exit;
End; End;
Session.FileBase.ExecuteArchive (Session.TempPath + Config.qwkBBSID + '.rep', Session.User.ThisUser.Archive, FileMask, 2) Session.FileBase.ExecuteArchive (Session.TempPath + Config.qwkBBSID + '.rep', Session.User.ThisUser.Archive, '*', 2)
End; End;
Assign (DataFile, Session.TempPath + Config.qwkBBSID + '.msg'); Assign (DataFile, Session.TempPath + Config.qwkBBSID + '.msg');
@ -3286,10 +3286,10 @@ Begin
If FileExist(Config.QwkGoodbye) Then FileCopy(Config.qwkGoodbye, Session.TempPath + JustFile(Config.qwkGoodbye)); If FileExist(Config.QwkGoodbye) Then FileCopy(Config.qwkGoodbye, Session.TempPath + JustFile(Config.qwkGoodbye));
If Session.LocalMode Then Begin If Session.LocalMode Then Begin
Session.FileBase.ExecuteArchive (Config.QWKPath + Temp, Session.User.ThisUser.Archive, Session.TempPath + FileMask, 1); Session.FileBase.ExecuteArchive (Config.QWKPath + Temp, Session.User.ThisUser.Archive, Session.TempPath + '*', 1);
Session.io.OutFullLn (Session.GetPrompt(235)); Session.io.OutFullLn (Session.GetPrompt(235));
End Else Begin End Else Begin
Session.FileBase.ExecuteArchive (Session.TempPath + Temp, Session.User.ThisUser.Archive, Session.TempPath + FileMask, 1); Session.FileBase.ExecuteArchive (Session.TempPath + Temp, Session.User.ThisUser.Archive, Session.TempPath + '*', 1);
Session.FileBase.SendFile (Session.TempPath + Temp); Session.FileBase.SendFile (Session.TempPath + Temp);
End; End;

View File

@ -497,6 +497,6 @@ Begin
Session.Menu.MenuName := Config.DefStartMenu; Session.Menu.MenuName := Config.DefStartMenu;
Repeat Repeat
Session.Menu.ExecuteMenu(True, True, False); Session.Menu.ExecuteMenu (True, True, False);
Until False; Until False;
End. End.