mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-18 04:09:11 +02:00
* longint to cardinal corrections
This commit is contained in:
parent
430d498e48
commit
53837eb907
@ -150,45 +150,46 @@ procedure DosGetInfoBlocks (PATIB: PPThreadInfoBlock;
|
|||||||
external 'DOSCALLS' index 312;
|
external 'DOSCALLS' index 312;
|
||||||
|
|
||||||
function DosLoadModule (ObjName: PChar; ObjLen: cardinal; DLLName: PChar;
|
function DosLoadModule (ObjName: PChar; ObjLen: cardinal; DLLName: PChar;
|
||||||
var Handle: cardinal): longint; cdecl;
|
var Handle: cardinal): cardinal; cdecl;
|
||||||
external 'DOSCALLS' index 318;
|
external 'DOSCALLS' index 318;
|
||||||
|
|
||||||
function DosQueryProcAddr (Handle, Ordinal: cardinal; ProcName: PChar;
|
function DosQueryProcAddr (Handle, Ordinal: cardinal; ProcName: PChar;
|
||||||
var Address: pointer): longint; cdecl;
|
var Address: pointer): cardinal; cdecl;
|
||||||
external 'DOSCALLS' index 321;
|
external 'DOSCALLS' index 321;
|
||||||
|
|
||||||
function DosSetRelMaxFH (var ReqCount, CurMaxFH: longint): longint; cdecl;
|
function DosSetRelMaxFH (var ReqCount: longint; var CurMaxFH: cardinal):
|
||||||
|
cardinal; cdecl;
|
||||||
external 'DOSCALLS' index 382;
|
external 'DOSCALLS' index 382;
|
||||||
|
|
||||||
function DosSetCurrentDir (Name:PChar): longint; cdecl;
|
function DosSetCurrentDir (Name:PChar): cardinal; cdecl;
|
||||||
external 'DOSCALLS' index 255;
|
external 'DOSCALLS' index 255;
|
||||||
|
|
||||||
procedure DosQueryCurrentDisk(var DiskNum:longint;var Logical:longint); cdecl;
|
procedure DosQueryCurrentDisk(var DiskNum:cardinal;var Logical:cardinal); cdecl;
|
||||||
external 'DOSCALLS' index 275;
|
external 'DOSCALLS' index 275;
|
||||||
|
|
||||||
function DosSetDefaultDisk (DiskNum:longint): longint; cdecl;
|
function DosSetDefaultDisk (DiskNum:cardinal): cardinal; cdecl;
|
||||||
external 'DOSCALLS' index 220;
|
external 'DOSCALLS' index 220;
|
||||||
|
|
||||||
{ This is not real prototype, but is close enough }
|
{ This is not real prototype, but is close enough }
|
||||||
{ for us (the 2nd parameter is actually a pointer }
|
{ for us (the 2nd parameter is actually a pointer }
|
||||||
{ to a structure). }
|
{ to a structure). }
|
||||||
function DosCreateDir( Name : pchar; p : pointer): longint; cdecl;
|
function DosCreateDir (Name: PChar; P: pointer): cardinal; cdecl;
|
||||||
external 'DOSCALLS' index 270;
|
external 'DOSCALLS' index 270;
|
||||||
|
|
||||||
function DosDeleteDir( Name : pchar) : longint; cdecl;
|
function DosDeleteDir (Name: PChar): cardinal; cdecl;
|
||||||
external 'DOSCALLS' index 226;
|
external 'DOSCALLS' index 226;
|
||||||
|
|
||||||
function DosQueryCurrentDir(DiskNum:longint;var Buffer;
|
function DosQueryCurrentDir(DiskNum:cardinal;var Buffer;
|
||||||
var BufLen:longint):longint; cdecl;
|
var BufLen:cardinal): cardinal; cdecl;
|
||||||
external 'DOSCALLS' index 274;
|
external 'DOSCALLS' index 274;
|
||||||
|
|
||||||
function DosMove(OldFile,NewFile:PChar):longint; cdecl;
|
function DosMove(OldFile,NewFile:PChar):cardinal; cdecl;
|
||||||
external 'DOSCALLS' index 271;
|
external 'DOSCALLS' index 271;
|
||||||
|
|
||||||
function DosDelete(FileName:PChar):longint; cdecl;
|
function DosDelete(FileName:PChar):cardinal; cdecl;
|
||||||
external 'DOSCALLS' index 259;
|
external 'DOSCALLS' index 259;
|
||||||
|
|
||||||
procedure DosExit(Action, Result: longint); cdecl;
|
procedure DosExit(Action, Result: cardinal); cdecl;
|
||||||
external 'DOSCALLS' index 234;
|
external 'DOSCALLS' index 234;
|
||||||
|
|
||||||
{This is the correct way to call external assembler procedures.}
|
{This is the correct way to call external assembler procedures.}
|
||||||
@ -639,11 +640,12 @@ asm
|
|||||||
end ['eax', 'ebx', 'ecx', 'edx'];
|
end ['eax', 'ebx', 'ecx', 'edx'];
|
||||||
|
|
||||||
const
|
const
|
||||||
FileHandleCount: longint = 20;
|
FileHandleCount: cardinal = 20;
|
||||||
|
|
||||||
function Increase_File_Handle_Count: boolean;
|
function Increase_File_Handle_Count: boolean;
|
||||||
var Err: word;
|
var Err: word;
|
||||||
L1, L2: longint;
|
L1: longint;
|
||||||
|
L2: cardinal;
|
||||||
begin
|
begin
|
||||||
L1 := 10;
|
L1 := 10;
|
||||||
if DosSetRelMaxFH (L1, L2) <> 0 then
|
if DosSetRelMaxFH (L1, L2) <> 0 then
|
||||||
@ -668,7 +670,7 @@ procedure do_open(var f;p:pchar;flags:longint);
|
|||||||
when (flags and $10000) there is no check for close (needed for textfiles)
|
when (flags and $10000) there is no check for close (needed for textfiles)
|
||||||
}
|
}
|
||||||
|
|
||||||
var Action: longint;
|
var Action: cardinal;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
allowslash(p);
|
allowslash(p);
|
||||||
@ -854,7 +856,7 @@ end;
|
|||||||
|
|
||||||
procedure ChDir (const S: string);[IOCheck];
|
procedure ChDir (const S: string);[IOCheck];
|
||||||
|
|
||||||
var RC: longint;
|
var RC: cardinal;
|
||||||
Buffer: array [0..255] of char;
|
Buffer: array [0..255] of char;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
@ -906,7 +908,8 @@ begin
|
|||||||
{ dir[4] }
|
{ dir[4] }
|
||||||
{ Get dir from drivenr : 0=default, 1=A etc... }
|
{ Get dir from drivenr : 0=default, 1=A etc... }
|
||||||
l:=255-3;
|
l:=255-3;
|
||||||
InOutRes:=DosQueryCurrentDir(DriveNr, sof^, l);
|
InOutRes:=longint (DosQueryCurrentDir(DriveNr, sof^, l));
|
||||||
|
{$WARNING Result code should be translated in some cases!}
|
||||||
{ Now Dir should be filled with directory in ASCIIZ, }
|
{ Now Dir should be filled with directory in ASCIIZ, }
|
||||||
{ starting from dir[4] }
|
{ starting from dir[4] }
|
||||||
dir[0]:=#3;
|
dir[0]:=#3;
|
||||||
@ -1079,7 +1082,8 @@ end;
|
|||||||
|
|
||||||
|
|
||||||
function GetFileHandleCount: longint;
|
function GetFileHandleCount: longint;
|
||||||
var L1, L2: longint;
|
var L1: longint;
|
||||||
|
L2: cardinal;
|
||||||
begin
|
begin
|
||||||
L1 := 0; (* Don't change the amount, just check. *)
|
L1 := 0; (* Don't change the amount, just check. *)
|
||||||
if DosSetRelMaxFH (L1, L2) <> 0 then GetFileHandleCount := 50
|
if DosSetRelMaxFH (L1, L2) <> 0 then GetFileHandleCount := 50
|
||||||
@ -1158,7 +1162,10 @@ begin
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.44 2003-10-12 18:07:30 hajny
|
Revision 1.45 2003-10-13 21:17:31 hajny
|
||||||
|
* longint to cardinal corrections
|
||||||
|
|
||||||
|
Revision 1.44 2003/10/12 18:07:30 hajny
|
||||||
* wrong use of Intel syntax
|
* wrong use of Intel syntax
|
||||||
|
|
||||||
Revision 1.43 2003/10/12 17:59:40 hajny
|
Revision 1.43 2003/10/12 17:59:40 hajny
|
||||||
|
@ -92,44 +92,44 @@ type
|
|||||||
|
|
||||||
|
|
||||||
{ import the necessary stuff from the OS }
|
{ import the necessary stuff from the OS }
|
||||||
function DosAllocThreadLocalMemory (Count: cardinal; var P: pointer): longint;
|
function DosAllocThreadLocalMemory (Count: cardinal; var P: pointer): cardinal;
|
||||||
cdecl; external 'DOSCALLS' index 454;
|
cdecl; external 'DOSCALLS' index 454;
|
||||||
|
|
||||||
function DosFreeThreadLocalMemory (P: pointer): longint; cdecl;
|
function DosFreeThreadLocalMemory (P: pointer): cardinal; cdecl;
|
||||||
external 'DOSCALLS' index 455;
|
external 'DOSCALLS' index 455;
|
||||||
|
|
||||||
function DosCreateThread (var TID: longint; Address: pointer;
|
function DosCreateThread (var TID: cardinal; Address: pointer;
|
||||||
(* TThreadFunc *)
|
(* TThreadFunc *)
|
||||||
aParam: pointer; Flags: longint; StackSize: longint): longint; cdecl;
|
aParam: pointer; Flags: cardinal; StackSize: cardinal): cardinal; cdecl;
|
||||||
external 'DOSCALLS' index 311;
|
external 'DOSCALLS' index 311;
|
||||||
|
|
||||||
procedure DosExit (Action, Result: longint); cdecl;
|
procedure DosExit (Action, Result: cardinal); cdecl;
|
||||||
external 'DOSCALLS' index 234;
|
external 'DOSCALLS' index 234;
|
||||||
|
|
||||||
function DosCreateMutExSem (Name: PChar; var Handle: longint; Attr: longint;
|
function DosCreateMutExSem (Name: PChar; var Handle: longint; Attr: cardinal;
|
||||||
State: boolean): longint; cdecl; external 'DOSCALLS' index 331;
|
State: boolean): cardinal; cdecl; external 'DOSCALLS' index 331;
|
||||||
|
|
||||||
function DosCloseMutExSem (Handle: longint): longint; cdecl;
|
function DosCloseMutExSem (Handle: longint): cardinal; cdecl;
|
||||||
external 'DOSCALLS' index 333;
|
external 'DOSCALLS' index 333;
|
||||||
|
|
||||||
function DosQueryMutExSem (Handle: longint; var PID, TID, Count: longint):
|
function DosQueryMutExSem (Handle: longint; var PID, TID, Count: cardinal):
|
||||||
longint; cdecl; external 'DOSCALLS' index 336;
|
cardinal; cdecl; external 'DOSCALLS' index 336;
|
||||||
|
|
||||||
function DosRequestMutExSem (Handle, Timeout: longint): longint; cdecl;
|
function DosRequestMutExSem (Handle:longint; Timeout: cardinal): cardinal; cdecl;
|
||||||
external 'DOSCALLS' index 334;
|
external 'DOSCALLS' index 334;
|
||||||
|
|
||||||
function DosReleaseMutExSem (Handle: longint): longint; cdecl;
|
function DosReleaseMutExSem (Handle: longint): cardinal; cdecl;
|
||||||
external 'DOSCALLS' index 335;
|
external 'DOSCALLS' index 335;
|
||||||
|
|
||||||
function DosAllocMem (var P: pointer; Size, Flag: longint): longint; cdecl;
|
function DosAllocMem (var P: pointer; Size, Flag: cardinal): cardinal; cdecl;
|
||||||
external 'DOSCALLS' index 299;
|
external 'DOSCALLS' index 299;
|
||||||
|
|
||||||
function DosFreeMem (P: pointer): longint; cdecl;
|
function DosFreeMem (P: pointer): cardinal; cdecl;
|
||||||
external 'DOSCALLS' index 304;
|
external 'DOSCALLS' index 304;
|
||||||
|
|
||||||
function DosEnterCritSec:longint; cdecl; external 'DOSCALLS' index 232;
|
function DosEnterCritSec:cardinal; cdecl; external 'DOSCALLS' index 232;
|
||||||
|
|
||||||
function DosExitCritSec:longint; cdecl; external 'DOSCALLS' index 233;
|
function DosExitCritSec:cardinal; cdecl; external 'DOSCALLS' index 233;
|
||||||
|
|
||||||
procedure DosGetInfoBlocks (PATIB: PPThreadInfoBlock;
|
procedure DosGetInfoBlocks (PATIB: PPThreadInfoBlock;
|
||||||
PAPIB: PPProcessInfoBlock); cdecl;
|
PAPIB: PPProcessInfoBlock); cdecl;
|
||||||
@ -379,7 +379,10 @@ initialization
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.1 2002-11-17 22:31:46 hajny
|
Revision 1.2 2003-10-13 21:17:31 hajny
|
||||||
|
* longint to cardinal corrections
|
||||||
|
|
||||||
|
Revision 1.1 2002/11/17 22:31:46 hajny
|
||||||
+ first (incomplete) version of systhrds
|
+ first (incomplete) version of systhrds
|
||||||
|
|
||||||
Revision 1.1 2002/10/14 19:39:18 peter
|
Revision 1.1 2002/10/14 19:39:18 peter
|
||||||
|
@ -58,13 +58,13 @@ type
|
|||||||
DateLastWrite, {Date of last modification of file.}
|
DateLastWrite, {Date of last modification of file.}
|
||||||
TimeLastWrite: word; {Time of last modification of file.}
|
TimeLastWrite: word; {Time of last modification of file.}
|
||||||
FileSize, {Size of file.}
|
FileSize, {Size of file.}
|
||||||
FileAlloc: longint; {Amount of space the file really
|
FileAlloc: cardinal; {Amount of space the file really
|
||||||
occupies on disk.}
|
occupies on disk.}
|
||||||
end;
|
end;
|
||||||
PFileStatus0 = ^TFileStatus0;
|
PFileStatus0 = ^TFileStatus0;
|
||||||
|
|
||||||
TFileStatus3 = object (TFileStatus)
|
TFileStatus3 = object (TFileStatus)
|
||||||
NextEntryOffset: longint; {Offset of next entry}
|
NextEntryOffset: cardinal; {Offset of next entry}
|
||||||
DateCreation, {Date of file creation.}
|
DateCreation, {Date of file creation.}
|
||||||
TimeCreation, {Time of file creation.}
|
TimeCreation, {Time of file creation.}
|
||||||
DateLastAccess, {Date of last access to file.}
|
DateLastAccess, {Date of last access to file.}
|
||||||
@ -72,9 +72,9 @@ type
|
|||||||
DateLastWrite, {Date of last modification of file.}
|
DateLastWrite, {Date of last modification of file.}
|
||||||
TimeLastWrite: word; {Time of last modification of file.}
|
TimeLastWrite: word; {Time of last modification of file.}
|
||||||
FileSize, {Size of file.}
|
FileSize, {Size of file.}
|
||||||
FileAlloc: longint; {Amount of space the file really
|
FileAlloc: cardinal; {Amount of space the file really
|
||||||
occupies on disk.}
|
occupies on disk.}
|
||||||
AttrFile: longint; {Attributes of file.}
|
AttrFile: cardinal; {Attributes of file.}
|
||||||
end;
|
end;
|
||||||
PFileStatus3 = ^TFileStatus3;
|
PFileStatus3 = ^TFileStatus3;
|
||||||
|
|
||||||
@ -91,7 +91,7 @@ type
|
|||||||
(File_Sys_ID,
|
(File_Sys_ID,
|
||||||
Sectors_Per_Cluster,
|
Sectors_Per_Cluster,
|
||||||
Total_Clusters,
|
Total_Clusters,
|
||||||
Free_Clusters: longint;
|
Free_Clusters: cardinal;
|
||||||
Bytes_Per_Sector: word);
|
Bytes_Per_Sector: word);
|
||||||
2: {For date/time description,
|
2: {For date/time description,
|
||||||
see file searching realted
|
see file searching realted
|
||||||
@ -106,18 +106,18 @@ type
|
|||||||
PFSInfo = ^TFSInfo;
|
PFSInfo = ^TFSInfo;
|
||||||
|
|
||||||
TCountryCode=record
|
TCountryCode=record
|
||||||
Country, {Country to query info about (0=current).}
|
Country, {Country to query info about (0=current).}
|
||||||
CodePage: longint; {Code page to query info about (0=current).}
|
CodePage: cardinal; {Code page to query info about (0=current).}
|
||||||
end;
|
end;
|
||||||
PCountryCode=^TCountryCode;
|
PCountryCode=^TCountryCode;
|
||||||
|
|
||||||
TTimeFmt = (Clock12, Clock24);
|
TTimeFmt = (Clock12, Clock24);
|
||||||
|
|
||||||
TCountryInfo=record
|
TCountryInfo=record
|
||||||
Country, CodePage: longint; {Country and codepage requested.}
|
Country, CodePage: cardinal; {Country and codepage requested.}
|
||||||
case byte of
|
case byte of
|
||||||
0:
|
0:
|
||||||
(DateFormat: longint; {1=ddmmyy 2=yymmdd 3=mmddyy}
|
(DateFormat: cardinal; {1=ddmmyy 2=yymmdd 3=mmddyy}
|
||||||
CurrencyUnit: array [0..4] of char;
|
CurrencyUnit: array [0..4] of char;
|
||||||
ThousandSeparator: char; {Thousands separator.}
|
ThousandSeparator: char; {Thousands separator.}
|
||||||
Zero1: byte; {Always zero.}
|
Zero1: byte; {Always zero.}
|
||||||
@ -143,7 +143,7 @@ type
|
|||||||
Zero5: byte;
|
Zero5: byte;
|
||||||
Reserve2: array [0..4] of word);
|
Reserve2: array [0..4] of word);
|
||||||
1:
|
1:
|
||||||
(fsDateFmt: longint; {1=ddmmyy 2=yymmdd 3=mmddyy}
|
(fsDateFmt: cardinal; {1=ddmmyy 2=yymmdd 3=mmddyy}
|
||||||
szCurrency: array [0..4] of char;
|
szCurrency: array [0..4] of char;
|
||||||
{null terminated currency symbol}
|
{null terminated currency symbol}
|
||||||
szThousandsSeparator: array [0..1] of char;
|
szThousandsSeparator: array [0..1] of char;
|
||||||
@ -181,37 +181,37 @@ const
|
|||||||
{This is the correct way to call external assembler procedures.}
|
{This is the correct way to call external assembler procedures.}
|
||||||
procedure syscall;external name '___SYSCALL';
|
procedure syscall;external name '___SYSCALL';
|
||||||
|
|
||||||
function DosSetFileInfo (Handle, InfoLevel: longint; AFileStatus: PFileStatus;
|
function DosSetFileInfo (Handle: longint; InfoLevel: cardinal; AFileStatus: PFileStatus;
|
||||||
FileStatusLen: longint): longint; cdecl; external 'DOSCALLS' index 218;
|
FileStatusLen: cardinal): cardinal; cdecl; external 'DOSCALLS' index 218;
|
||||||
|
|
||||||
function DosQueryFSInfo (DiskNum, InfoLevel: longint; var Buffer: TFSInfo;
|
function DosQueryFSInfo (DiskNum, InfoLevel: cardinal; var Buffer: TFSInfo;
|
||||||
BufLen: longint): longint; cdecl; external 'DOSCALLS' index 278;
|
BufLen: cardinal): cardinal; cdecl; external 'DOSCALLS' index 278;
|
||||||
|
|
||||||
function DosQueryFileInfo (Handle, InfoLevel: longint;
|
function DosQueryFileInfo (Handle: longint; InfoLevel: cardinal;
|
||||||
AFileStatus: PFileStatus; FileStatusLen: longint): longint; cdecl;
|
AFileStatus: PFileStatus; FileStatusLen: cardinal): cardinal; cdecl;
|
||||||
external 'DOSCALLS' index 279;
|
external 'DOSCALLS' index 279;
|
||||||
|
|
||||||
function DosScanEnv (Name: PChar; var Value: PChar): longint; cdecl;
|
function DosScanEnv (Name: PChar; var Value: PChar): cardinal; cdecl;
|
||||||
external 'DOSCALLS' index 227;
|
external 'DOSCALLS' index 227;
|
||||||
|
|
||||||
function DosFindFirst (FileMask: PChar; var Handle: longint; Attrib: longint;
|
function DosFindFirst (FileMask: PChar; var Handle: longint; Attrib: cardinal;
|
||||||
AFileStatus: PFileStatus; FileStatusLen: cardinal;
|
AFileStatus: PFileStatus; FileStatusLen: cardinal;
|
||||||
var Count: cardinal; InfoLevel: cardinal): longint; cdecl;
|
var Count: cardinal; InfoLevel: cardinal): cardinal; cdecl;
|
||||||
external 'DOSCALLS' index 264;
|
external 'DOSCALLS' index 264;
|
||||||
|
|
||||||
function DosFindNext (Handle: longint; AFileStatus: PFileStatus;
|
function DosFindNext (Handle: longint; AFileStatus: PFileStatus;
|
||||||
FileStatusLen: cardinal; var Count: cardinal): longint; cdecl;
|
FileStatusLen: cardinal; var Count: cardinal): cardinal; cdecl;
|
||||||
external 'DOSCALLS' index 265;
|
external 'DOSCALLS' index 265;
|
||||||
|
|
||||||
function DosFindClose (Handle: longint): longint; cdecl;
|
function DosFindClose (Handle: longint): cardinal; cdecl;
|
||||||
external 'DOSCALLS' index 263;
|
external 'DOSCALLS' index 263;
|
||||||
|
|
||||||
function DosQueryCtryInfo (Size: longint; var Country: TCountryCode;
|
function DosQueryCtryInfo (Size: cardinal; var Country: TCountryCode;
|
||||||
var Res: TCountryInfo; var ActualSize: longint): longint; cdecl;
|
var Res: TCountryInfo; var ActualSize: cardinal): cardinal; cdecl;
|
||||||
external 'NLS' index 5;
|
external 'NLS' index 5;
|
||||||
|
|
||||||
function DosMapCase (Size: longint; var Country: TCountryCode;
|
function DosMapCase (Size: cardinal; var Country: TCountryCode;
|
||||||
AString: PChar): longint; cdecl; external 'NLS' index 7;
|
AString: PChar): cardinal; cdecl; external 'NLS' index 7;
|
||||||
|
|
||||||
|
|
||||||
{****************************************************************************
|
{****************************************************************************
|
||||||
@ -430,7 +430,7 @@ function FindFirst (const Path: string; Attr: longint; var Rslt: TSearchRec): lo
|
|||||||
var SR: PSearchRec;
|
var SR: PSearchRec;
|
||||||
FStat: PFileFindBuf3;
|
FStat: PFileFindBuf3;
|
||||||
Count: cardinal;
|
Count: cardinal;
|
||||||
Err: longint;
|
Err: cardinal;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
New (FStat);
|
New (FStat);
|
||||||
@ -459,7 +459,7 @@ function FindNext (var Rslt: TSearchRec): longint;
|
|||||||
var SR: PSearchRec;
|
var SR: PSearchRec;
|
||||||
FStat: PFileFindBuf3;
|
FStat: PFileFindBuf3;
|
||||||
Count: cardinal;
|
Count: cardinal;
|
||||||
Err: longint;
|
Err: cardinal;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
New (FStat);
|
New (FStat);
|
||||||
@ -506,7 +506,7 @@ end ['eax', 'ebx', 'ecx', 'edx'];
|
|||||||
|
|
||||||
function FileSetDate (Handle, Age: longint): longint;
|
function FileSetDate (Handle, Age: longint): longint;
|
||||||
var FStat: PFileStatus0;
|
var FStat: PFileStatus0;
|
||||||
RC: longint;
|
RC: cardinal;
|
||||||
begin
|
begin
|
||||||
New (FStat);
|
New (FStat);
|
||||||
RC := DosQueryFileInfo (Handle, ilStandard, FStat,
|
RC := DosQueryFileInfo (Handle, ilStandard, FStat,
|
||||||
@ -663,7 +663,7 @@ end;
|
|||||||
function DiskFree (Drive: byte): int64;
|
function DiskFree (Drive: byte): int64;
|
||||||
|
|
||||||
var FI: TFSinfo;
|
var FI: TFSinfo;
|
||||||
RC: longint;
|
RC: cardinal;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
{In OS/2, we use the filesystem information.}
|
{In OS/2, we use the filesystem information.}
|
||||||
@ -678,7 +678,7 @@ end;
|
|||||||
function DiskSize (Drive: byte): int64;
|
function DiskSize (Drive: byte): int64;
|
||||||
|
|
||||||
var FI: TFSinfo;
|
var FI: TFSinfo;
|
||||||
RC: longint;
|
RC: cardinal;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
{In OS/2, we use the filesystem information.}
|
{In OS/2, we use the filesystem information.}
|
||||||
@ -822,8 +822,8 @@ end;
|
|||||||
procedure InitInternational;
|
procedure InitInternational;
|
||||||
var Country: TCountryCode;
|
var Country: TCountryCode;
|
||||||
CtryInfo: TCountryInfo;
|
CtryInfo: TCountryInfo;
|
||||||
Size: longint;
|
Size: cardinal;
|
||||||
RC: longint;
|
RC: cardinal;
|
||||||
begin
|
begin
|
||||||
Size := 0;
|
Size := 0;
|
||||||
FillChar (Country, SizeOf (Country), 0);
|
FillChar (Country, SizeOf (Country), 0);
|
||||||
@ -886,7 +886,10 @@ end.
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.32 2003-10-08 05:22:47 yuri
|
Revision 1.33 2003-10-13 21:17:31 hajny
|
||||||
|
* longint to cardinal corrections
|
||||||
|
|
||||||
|
Revision 1.32 2003/10/08 05:22:47 yuri
|
||||||
* Some emx code removed
|
* Some emx code removed
|
||||||
|
|
||||||
Revision 1.31 2003/10/07 21:26:34 hajny
|
Revision 1.31 2003/10/07 21:26:34 hajny
|
||||||
|
@ -42,44 +42,44 @@ var
|
|||||||
DataIndex: PPointer;
|
DataIndex: PPointer;
|
||||||
|
|
||||||
{ import the necessary stuff from the OS }
|
{ import the necessary stuff from the OS }
|
||||||
function DosAllocThreadLocalMemory (Count: cardinal; var P: pointer): longint;
|
function DosAllocThreadLocalMemory (Count: cardinal; var P: pointer): cardinal;
|
||||||
cdecl; external 'DOSCALLS' index 454;
|
cdecl; external 'DOSCALLS' index 454;
|
||||||
|
|
||||||
function DosFreeThreadLocalMemory (P: pointer): longint; cdecl;
|
function DosFreeThreadLocalMemory (P: pointer): cardinal; cdecl;
|
||||||
external 'DOSCALLS' index 455;
|
external 'DOSCALLS' index 455;
|
||||||
|
|
||||||
function DosCreateThread (var TID: longint; Address: pointer;
|
function DosCreateThread (var TID: cardinal; Address: pointer;
|
||||||
(* TThreadFunc *)
|
(* TThreadFunc *)
|
||||||
aParam: pointer; Flags: longint; StackSize: longint): longint; cdecl;
|
aParam: pointer; Flags: cardinal; StackSize: cardinal): cardinal; cdecl;
|
||||||
external 'DOSCALLS' index 311;
|
external 'DOSCALLS' index 311;
|
||||||
|
|
||||||
procedure DosExit (Action, Result: longint); cdecl;
|
procedure DosExit (Action, Result: cardinal); cdecl;
|
||||||
external 'DOSCALLS' index 234;
|
external 'DOSCALLS' index 234;
|
||||||
|
|
||||||
function DosCreateMutExSem (Name: PChar; var Handle: longint; Attr: longint;
|
function DosCreateMutExSem (Name: PChar; var Handle: longint; Attr: cardinal;
|
||||||
State: boolean): longint; cdecl; external 'DOSCALLS' index 331;
|
State: boolean): cardinal; cdecl; external 'DOSCALLS' index 331;
|
||||||
|
|
||||||
function DosCloseMutExSem (Handle: longint): longint; cdecl;
|
function DosCloseMutExSem (Handle: longint): cardinal; cdecl;
|
||||||
external 'DOSCALLS' index 333;
|
external 'DOSCALLS' index 333;
|
||||||
|
|
||||||
function DosQueryMutExSem (Handle: longint; var PID, TID, Count: longint):
|
function DosQueryMutExSem (Handle: longint; var PID, TID, Count: cardinal):
|
||||||
longint; cdecl; external 'DOSCALLS' index 336;
|
cardinal; cdecl; external 'DOSCALLS' index 336;
|
||||||
|
|
||||||
function DosRequestMutExSem (Handle, Timeout: longint): longint; cdecl;
|
function DosRequestMutExSem (Handle: longint; Timeout: cardinal): cardinal;
|
||||||
external 'DOSCALLS' index 334;
|
cdecl; external 'DOSCALLS' index 334;
|
||||||
|
|
||||||
function DosReleaseMutExSem (Handle: longint): longint; cdecl;
|
function DosReleaseMutExSem (Handle: longint): cardinal; cdecl;
|
||||||
external 'DOSCALLS' index 335;
|
external 'DOSCALLS' index 335;
|
||||||
|
|
||||||
function DosAllocMem (var P: pointer; Size, Flag: longint): longint; cdecl;
|
function DosAllocMem (var P: pointer; Size, Flag: cardinal): cardinal; cdecl;
|
||||||
external 'DOSCALLS' index 299;
|
external 'DOSCALLS' index 299;
|
||||||
|
|
||||||
function DosFreeMem (P: pointer): longint; cdecl;
|
function DosFreeMem (P: pointer): cardinal; cdecl;
|
||||||
external 'DOSCALLS' index 304;
|
external 'DOSCALLS' index 304;
|
||||||
|
|
||||||
function DosEnterCritSec:longint; cdecl; external 'DOSCALLS' index 232;
|
function DosEnterCritSec:cardinal; cdecl; external 'DOSCALLS' index 232;
|
||||||
|
|
||||||
function DosExitCritSec:longint; cdecl; external 'DOSCALLS' index 233;
|
function DosExitCritSec:cardinal; cdecl; external 'DOSCALLS' index 233;
|
||||||
|
|
||||||
|
|
||||||
procedure Init_ThreadVar (var TVOffset: dword; Size: dword);
|
procedure Init_ThreadVar (var TVOffset: dword; Size: dword);
|
||||||
@ -165,7 +165,7 @@ procedure DoneThread;
|
|||||||
var
|
var
|
||||||
PTIB: PThreadInfoBlock;
|
PTIB: PThreadInfoBlock;
|
||||||
PPIB: PProcessInfoBlock;
|
PPIB: PProcessInfoBlock;
|
||||||
ThreadID: longint;
|
ThreadID: cardinal;
|
||||||
begin
|
begin
|
||||||
ReleaseThreadVars;
|
ReleaseThreadVars;
|
||||||
DosGetInfoBlocks (@PTIB, @PPIB);
|
DosGetInfoBlocks (@PTIB, @PPIB);
|
||||||
@ -264,7 +264,7 @@ end;
|
|||||||
|
|
||||||
procedure EnterCriticalSection (var CS: TRTLCriticalSection);
|
procedure EnterCriticalSection (var CS: TRTLCriticalSection);
|
||||||
var
|
var
|
||||||
P, T, Cnt: longint;
|
P, T, Cnt: cardinal;
|
||||||
PTIB: PThreadInfoBlock;
|
PTIB: PThreadInfoBlock;
|
||||||
PPIB: PProcessInfoBlock;
|
PPIB: PProcessInfoBlock;
|
||||||
begin
|
begin
|
||||||
@ -324,7 +324,10 @@ end;
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.13 2003-10-08 09:21:33 yuri
|
Revision 1.14 2003-10-13 21:17:31 hajny
|
||||||
|
* longint to cardinal corrections
|
||||||
|
|
||||||
|
Revision 1.13 2003/10/08 09:21:33 yuri
|
||||||
* EMX code removed. Most probably, MT broken. (EMX notification removed)
|
* EMX code removed. Most probably, MT broken. (EMX notification removed)
|
||||||
|
|
||||||
Revision 1.12 2003/10/08 05:22:47 yuri
|
Revision 1.12 2003/10/08 05:22:47 yuri
|
||||||
|
@ -60,14 +60,14 @@ const
|
|||||||
procedure DosGetInfoBlocks (PATIB: PPThreadInfoBlock;
|
procedure DosGetInfoBlocks (PATIB: PPThreadInfoBlock;
|
||||||
PAPIB: PPProcessInfoBlock); cdecl; external 'DOSCALLS' index 312;
|
PAPIB: PPProcessInfoBlock); cdecl; external 'DOSCALLS' index 312;
|
||||||
|
|
||||||
function DosSetPriority (Scope, TrClass, Delta, PortID: longint): longint;
|
function DosSetPriority (Scope, TrClass: cardinal; Delta: longing;
|
||||||
cdecl; external 'DOSCALLS' index 236;
|
PortID: cardinal): longint; cdecl; external 'DOSCALLS' index 236;
|
||||||
|
|
||||||
procedure DosExit (Action, Result: longint); cdecl;
|
procedure DosExit (Action, Result: longint); cdecl;
|
||||||
external 'DOSCALLS' index 233;
|
external 'DOSCALLS' index 233;
|
||||||
|
|
||||||
function DosCreateThread (var TID: longint; Address: TThreadEntry;
|
function DosCreateThread (var TID: cardinal; Address: TThreadEntry;
|
||||||
aParam: pointer; Flags: longint; StackSize: longint): longint; cdecl;
|
aParam: pointer; Flags: cardinal; StackSize: cardinal): longint; cdecl;
|
||||||
external 'DOSCALLS' index 311;
|
external 'DOSCALLS' index 311;
|
||||||
|
|
||||||
function DosKillThread (TID: longint): longint; cdecl;
|
function DosKillThread (TID: longint): longint; cdecl;
|
||||||
@ -181,7 +181,7 @@ end;
|
|||||||
|
|
||||||
constructor TThread.Create(CreateSuspended: Boolean);
|
constructor TThread.Create(CreateSuspended: Boolean);
|
||||||
var
|
var
|
||||||
Flags: Integer;
|
Flags: cardinal;
|
||||||
begin
|
begin
|
||||||
inherited Create;
|
inherited Create;
|
||||||
AddThread (Self);
|
AddThread (Self);
|
||||||
@ -194,7 +194,7 @@ begin
|
|||||||
FFinished := true;
|
FFinished := true;
|
||||||
Destroy;
|
Destroy;
|
||||||
end else FHandle := FThreadID;
|
end else FHandle := FThreadID;
|
||||||
IsMultiThread := TRUE;
|
IsMultiThread := true;
|
||||||
FFatalException := nil;
|
FFatalException := nil;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -240,7 +240,10 @@ end;
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.1 2003-10-06 21:01:07 peter
|
Revision 1.2 2003-10-13 21:17:31 hajny
|
||||||
|
* longint to cardinal corrections
|
||||||
|
|
||||||
|
Revision 1.1 2003/10/06 21:01:07 peter
|
||||||
* moved classes unit to rtl
|
* moved classes unit to rtl
|
||||||
|
|
||||||
Revision 1.8 2003/10/06 17:06:55 florian
|
Revision 1.8 2003/10/06 17:06:55 florian
|
||||||
|
Loading…
Reference in New Issue
Block a user