mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-29 08:43:07 +02:00
* fixed range check errors
This commit is contained in:
parent
75bdddea4d
commit
6c6250c5b4
@ -558,7 +558,7 @@ end;
|
||||
procedure FindMatch(var f:searchrec);
|
||||
begin
|
||||
{ Find file with correct attribute }
|
||||
While (F.W32FindData.dwFileAttributes and F.ExcludeAttr)<>0 do
|
||||
While (F.W32FindData.dwFileAttributes and cardinal(F.ExcludeAttr))<>0 do
|
||||
begin
|
||||
if not FindNextFile (F.FindHandle,F.W32FindData) then
|
||||
begin
|
||||
@ -815,7 +815,7 @@ var
|
||||
begin
|
||||
doserror:=0;
|
||||
l:=GetFileAttributes(filerec(f).name);
|
||||
if l=$ffffffff then
|
||||
if l=longint($ffffffff) then
|
||||
begin
|
||||
doserror:=getlasterror;
|
||||
attr:=0;
|
||||
@ -1016,7 +1016,10 @@ begin
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.6 2000-09-06 20:47:34 peter
|
||||
Revision 1.7 2000-12-18 17:28:58 jonas
|
||||
* fixed range check errors
|
||||
|
||||
Revision 1.6 2000/09/06 20:47:34 peter
|
||||
* removed previous fsplit() patch as it's not the correct behaviour for
|
||||
LFNs. The code showing the bug could easily be adapted (merged)
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
||||
CONST
|
||||
{ REQUIRED TO PUT MANUALLY here, because of name conflicts in win32.inc }
|
||||
{ flags for CreateFile }
|
||||
GENERIC_READ=$80000000;
|
||||
GENERIC_READ=longint($80000000);
|
||||
GENERIC_WRITE=$40000000;
|
||||
CREATE_NEW = 1;
|
||||
CREATE_ALWAYS = 2;
|
||||
@ -184,7 +184,10 @@ END;
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.2 2000-07-13 11:33:57 michael
|
||||
Revision 1.3 2000-12-18 17:28:58 jonas
|
||||
* fixed range check errors
|
||||
|
||||
Revision 1.2 2000/07/13 11:33:57 michael
|
||||
+ removed logs
|
||||
|
||||
}
|
||||
|
@ -1171,7 +1171,7 @@ begin
|
||||
if IsConsole then Writeln(stderr,'Exception ',
|
||||
hexstr(excep^.ExceptionRecord^.ExceptionCode, 8));
|
||||
{$endif SYSTEMEXCEPTIONDEBUG}
|
||||
case excep^.ExceptionRecord^.ExceptionCode of
|
||||
case cardinal(excep^.ExceptionRecord^.ExceptionCode) of
|
||||
STATUS_INTEGER_DIVIDE_BY_ZERO,
|
||||
STATUS_FLOAT_DIVIDE_BY_ZERO :
|
||||
res := SysHandleErrorFrame(200, frame, true);
|
||||
@ -1380,7 +1380,10 @@ end.
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.1 2000-10-15 08:19:49 peter
|
||||
Revision 1.2 2000-12-18 17:28:58 jonas
|
||||
* fixed range check errors
|
||||
|
||||
Revision 1.1 2000/10/15 08:19:49 peter
|
||||
* system unit rename for 1.1 branch
|
||||
|
||||
Revision 1.6 2000/10/13 12:01:52 peter
|
||||
|
@ -42,7 +42,7 @@ implementation
|
||||
|
||||
Function FileOpen (Const FileName : string; Mode : Integer) : Longint;
|
||||
const
|
||||
AccessMode: array[0..2] of Integer = (
|
||||
AccessMode: array[0..2] of Cardinal = (
|
||||
GENERIC_READ,
|
||||
GENERIC_WRITE,
|
||||
GENERIC_READ or GENERIC_WRITE);
|
||||
@ -94,7 +94,7 @@ end;
|
||||
|
||||
Function FileSeek (Handle,FOffset,Origin : Longint) : Longint;
|
||||
begin
|
||||
Result := SetFilePointer(Handle, FOffset, nil, Origin);
|
||||
Result := longint(SetFilePointer(Handle, FOffset, nil, Origin));
|
||||
end;
|
||||
|
||||
|
||||
@ -108,7 +108,7 @@ end;
|
||||
|
||||
Function FileTruncate (Handle,Size: Longint) : boolean;
|
||||
begin
|
||||
Result:=SetFilePointer(handle,Size,nil,FILE_BEGIN)<>-1;
|
||||
Result:=longint(SetFilePointer(handle,Size,nil,FILE_BEGIN))<>-1;
|
||||
If Result then
|
||||
Result:=SetEndOfFile(handle);
|
||||
end;
|
||||
@ -163,7 +163,7 @@ end;
|
||||
Function FindMatch(var f: TSearchRec) : Longint;
|
||||
begin
|
||||
{ Find file with correct attribute }
|
||||
While (F.FindData.dwFileAttributes and F.ExcludeAttr)<>0 do
|
||||
While (F.FindData.dwFileAttributes and cardinal(F.ExcludeAttr))<>0 do
|
||||
begin
|
||||
if not FindNextFile (F.FindHandle,@F.FindData) then
|
||||
begin
|
||||
@ -643,7 +643,10 @@ Finalization
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.4 2000-09-19 23:57:57 pierre
|
||||
Revision 1.5 2000-12-18 17:28:58 jonas
|
||||
* fixed range check errors
|
||||
|
||||
Revision 1.4 2000/09/19 23:57:57 pierre
|
||||
* bug fix for 1041 (merged)
|
||||
|
||||
Revision 1.3 2000/08/29 18:01:52 michael
|
||||
|
@ -711,7 +711,7 @@ type
|
||||
{ argument types are unknown }
|
||||
function RGB(r,g,b : longint) : DWORD;
|
||||
begin
|
||||
RGB:=DWORD(((BYTE(r)) or ((WORD(g)) shl 8)) or ((DWORD(BYTE(b))) shl 16));
|
||||
RGB:=DWORD(((DWORD(BYTE(r))) or ((DWORD(WORD(g))) shl 8)) or ((DWORD(BYTE(b))) shl 16));
|
||||
end;
|
||||
|
||||
{ was #define dname(params) def_expr }
|
||||
@ -879,7 +879,7 @@ type
|
||||
{ argument types are unknown }
|
||||
function MAKEROP4(fore,back : longint) : DWORD;
|
||||
begin
|
||||
MAKEROP4:=DWORD(((back shl 8) and $FF000000) or fore);
|
||||
MAKEROP4:=DWORD((DWORD(back shl 8) and $FF000000) or DWORD(fore));
|
||||
end;
|
||||
|
||||
{ was #define dname(params) def_expr }
|
||||
@ -941,7 +941,10 @@ type
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.4 2000-10-11 16:05:56 peter
|
||||
Revision 1.5 2000-12-18 17:28:58 jonas
|
||||
* fixed range check errors
|
||||
|
||||
Revision 1.4 2000/10/11 16:05:56 peter
|
||||
* stdcall for callbacks (merged)
|
||||
|
||||
Revision 1.3 2000/08/16 18:35:19 peter
|
||||
|
@ -745,7 +745,7 @@
|
||||
DCB = record
|
||||
DCBlength : DWORD;
|
||||
BaudRate : DWORD;
|
||||
flag0 : longint;
|
||||
flag0 : DWORD;
|
||||
wReserved : WORD;
|
||||
XonLim : WORD;
|
||||
XoffLim : WORD;
|
||||
@ -908,7 +908,7 @@
|
||||
PCOMPOSITIONFORM = ^COMPOSITIONFORM;
|
||||
|
||||
COMSTAT = record
|
||||
flag0 : longint;
|
||||
flag0 : DWORD;
|
||||
cbInQue : DWORD;
|
||||
cbOutQue : DWORD;
|
||||
end;
|
||||
@ -6961,7 +6961,10 @@ type
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.4 2000-11-21 08:49:14 jonas
|
||||
Revision 1.5 2000-12-18 17:28:58 jonas
|
||||
* fixed range check errors
|
||||
|
||||
Revision 1.4 2000/11/21 08:49:14 jonas
|
||||
* workaround for the "hicon: hicon" bug (merged from fixes branch)
|
||||
|
||||
Revision 1.3 2000/10/11 16:05:56 peter
|
||||
|
@ -304,7 +304,7 @@ unit winsock;
|
||||
}
|
||||
const
|
||||
INVALID_SOCKET = not(1);
|
||||
SOCKET_ERROR = -1;
|
||||
SOCKET_ERROR = $ffffffff;
|
||||
SOCK_STREAM = 1;
|
||||
SOCK_DGRAM = 2;
|
||||
SOCK_RAW = 3;
|
||||
@ -951,7 +951,10 @@ unit winsock;
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.2 2000-07-13 11:33:58 michael
|
||||
Revision 1.3 2000-12-18 17:28:58 jonas
|
||||
* fixed range check errors
|
||||
|
||||
Revision 1.2 2000/07/13 11:33:58 michael
|
||||
+ removed logs
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user