FindFirst fixes
This commit is contained in:
parent
60e58f0b7e
commit
d6ff4957c2
|
@ -14,7 +14,6 @@ Ported to Win32 by Rick Parrish<br />
|
|||
TODO list:<br />
|
||||
<ul>
|
||||
<li>Implement any REETODOs that appear in compiled executables</li>
|
||||
<li>Anything passing 0 for the Attr parameter to FindFirst should pass AnyFile instead (VP returns no files when 0 is passed for Attr)</li>
|
||||
<li>Investigate FILEMODE usage to see if FILEMODEREADWRITE, TEXTMODEREAD or TEXTMODEREADWRITE should be used</li>
|
||||
<li>Find/correct any usage of FOR loop variables after the loop (since they are 1 greater in VP than in BP</li>
|
||||
<li>Find/correct any file i/o on untyped files where Words or LongInts are being read</li>
|
||||
|
@ -28,4 +27,5 @@ Completed list<br />
|
|||
<li>TYPEs of OF INTEGER to OF SMALLINT (just in case they're used in a RECORD)</li>
|
||||
<li>WORD in RECORD to SMALLWORD</li>
|
||||
<li>INTEGER in RECORD to SMALLINT</li>
|
||||
<li>Anything passing 0 for the Attr parameter to FindFirst should pass AnyFile instead (VP returns no files when 0 is passed for Attr)</li>
|
||||
</ul>
|
||||
|
|
|
@ -3857,7 +3857,7 @@ FUNCTION MaxChatRec: LongInt;
|
|||
VAR
|
||||
DirInfo1: SearchRec;
|
||||
BEGIN
|
||||
FindFirst(General.TempPath+'MSG'+IntToStr(ThisNode)+'.TMP',0,DirInfo1);
|
||||
FindFirst(General.TempPath+'MSG'+IntToStr(ThisNode)+'.TMP',AnyFile,DirInfo1);
|
||||
IF (DOSError = 0) THEN
|
||||
MaxChatRec := DirInfo1.Size
|
||||
ELSE
|
||||
|
@ -3868,7 +3868,7 @@ FUNCTION MaxNodes: Byte;
|
|||
VAR
|
||||
DirInfo1: SearchRec;
|
||||
BEGIN
|
||||
FindFirst(General.DataPath+'MULTNODE.DAT',0,DirInfo1);
|
||||
FindFirst(General.DataPath+'MULTNODE.DAT',AnyFile,DirInfo1);
|
||||
IF (DOSError = 0) THEN
|
||||
MaxNodes := (DirInfo1.Size DIV SizeOf(NodeRecordType))
|
||||
ELSE
|
||||
|
@ -3963,7 +3963,7 @@ FUNCTION MaxUsers: Integer;
|
|||
VAR
|
||||
DirInfo1: SearchRec;
|
||||
BEGIN
|
||||
FindFirst(General.DataPath+'USERS.DAT',0,DirInfo1);
|
||||
FindFirst(General.DataPath+'USERS.DAT',AnyFile,DirInfo1);
|
||||
IF (DOSError = 0) THEN
|
||||
MaxUsers := (DirInfo1.Size DIV SizeOf(UserRecordType))
|
||||
ELSE
|
||||
|
@ -3974,7 +3974,7 @@ FUNCTION MaxIDXRec: Integer;
|
|||
VAR
|
||||
DirInfo1: SearchRec;
|
||||
BEGIN
|
||||
FindFirst(General.DataPath+'USERS.IDX',0,DirInfo1);
|
||||
FindFirst(General.DataPath+'USERS.IDX',AnyFile,DirInfo1);
|
||||
IF (DOSError = 0) THEN
|
||||
MaxIDXRec := (DirInfo1.Size DIV SizeOf(UserIDXRec))
|
||||
ELSE
|
||||
|
@ -3987,7 +3987,7 @@ FUNCTION HiMsg: Word;
|
|||
VAR
|
||||
DirInfo1: SearchRec;
|
||||
BEGIN
|
||||
FindFirst(General.MsgPath+MemMsgArea.FileName+'.HDR',0,DirInfo1);
|
||||
FindFirst(General.MsgPath+MemMsgArea.FileName+'.HDR',AnyFile,DirInfo1);
|
||||
IF (DOSError = 0) THEN
|
||||
HiMsg := (DirInfo1.Size DIV SizeOf(MHeaderRec))
|
||||
ELSE
|
||||
|
|
|
@ -762,7 +762,7 @@ BEGIN
|
|||
LogError(MemMsgPath+'HI_WATER.MRK/Read Record 0 Error - '+IntToStr(LastError)+' (Proc: GetMsgList)');
|
||||
Exit;
|
||||
END;
|
||||
FindFirst(MemMsgPath+IntToStr(HiWater)+'.MSG',0,DirInfo);
|
||||
FindFirst(MemMsgPath+IntToStr(HiWater)+'.MSG',AnyFile,DirInfo);
|
||||
IF (DOSError <> 0) THEN
|
||||
HiWater := 1;
|
||||
END;
|
||||
|
@ -779,7 +779,7 @@ BEGIN
|
|||
END;
|
||||
HighMsg := 1;
|
||||
LowMsg := 65535;
|
||||
FindFirst(MemMsgPath+'*.MSG',0,DirInfo);
|
||||
FindFirst(MemMsgPath+'*.MSG',AnyFile,DirInfo);
|
||||
WHILE (DOSError = 0) DO
|
||||
BEGIN
|
||||
FidoMsgNum := StrToInt(DirInfo.Name);
|
||||
|
@ -868,7 +868,7 @@ BEGIN
|
|||
ELSE
|
||||
BEGIN
|
||||
Purged := TRUE;
|
||||
FindFirst(MemMsgPath+'*.MSG',0,DirInfo);
|
||||
FindFirst(MemMsgPath+'*.MSG',AnyFile,DirInfo);
|
||||
IF (DOSError <> 0) THEN
|
||||
Purged := FALSE
|
||||
ELSE
|
||||
|
|
Loading…
Reference in New Issue