mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-10 16:45:56 +02:00
* Fixed INt() proble. Defined THandle, included Filemode constants
This commit is contained in:
parent
641d6e3304
commit
d541279136
@ -83,9 +83,13 @@ end ;
|
||||
{ DateTimeToTimeStamp converts DateTime to a TTimeStamp }
|
||||
|
||||
function DateTimeToTimeStamp(DateTime: TDateTime): TTimeStamp;
|
||||
|
||||
|
||||
begin
|
||||
result.Time := Trunc(Frac(DateTime) * MSecsPerDay);
|
||||
result.Date := 1 + DateDelta + Trunc(Int(DateTime));
|
||||
result.Date := 1
|
||||
+ DateDelta
|
||||
+ Trunc(System.Int(DateTime));
|
||||
end ;
|
||||
|
||||
{ TimeStampToDateTime converts TimeStamp to a TDateTime value }
|
||||
@ -140,7 +144,7 @@ var
|
||||
l:longint;
|
||||
ly:boolean;
|
||||
begin
|
||||
l := Trunc(Int(Date)) + DateDelta;
|
||||
l := Trunc(System.Int(Date)) + DateDelta;
|
||||
year := 1 + 400 * (l div D400); l := (l mod D400);
|
||||
year := year + 100 * (l div D100);l := (l mod D100);
|
||||
year := year + 4 * (l div D4);l := (l mod D4);
|
||||
@ -621,7 +625,10 @@ end;
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.5 1998-10-15 09:39:12 michael
|
||||
Revision 1.6 1999-02-09 12:38:42 michael
|
||||
* Fixed INt() proble. Defined THandle, included Filemode constants
|
||||
|
||||
Revision 1.5 1998/10/15 09:39:12 michael
|
||||
Changes from Gretjan Schouten
|
||||
|
||||
Revision 1.4 1998/10/11 13:40:52 michael
|
||||
|
@ -14,10 +14,8 @@
|
||||
|
||||
**********************************************************************}
|
||||
|
||||
{$ifndef win32}
|
||||
Type
|
||||
THandle = Longint; // Needed for TSearchRec
|
||||
{$endif}
|
||||
THandle = Longint;
|
||||
|
||||
Type
|
||||
TSearchRec = Record
|
||||
@ -38,6 +36,11 @@ Const
|
||||
faDirectory = $00000010;
|
||||
faArchive = $00000020;
|
||||
faAnyFile = $0000003f;
|
||||
|
||||
fmOpenRead = $0000;
|
||||
fmOpenWrite = $0001;
|
||||
fmOpenReadWrite = $0002;
|
||||
|
||||
|
||||
Function FileOpen (Const FileName : string; Mode : Integer) : Longint;
|
||||
Function FileCreate (Const FileName : String) : Longint;
|
||||
@ -62,7 +65,10 @@ Function FileSearch (Const Name, DirList : String) : String;
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.3 1999-02-02 21:21:37 michael
|
||||
Revision 1.4 1999-02-09 12:38:43 michael
|
||||
* Fixed INt() proble. Defined THandle, included Filemode constants
|
||||
|
||||
Revision 1.3 1999/02/02 21:21:37 michael
|
||||
+ Added filetruncate
|
||||
|
||||
Revision 1.2 1998/10/11 13:47:45 michael
|
||||
|
@ -22,12 +22,12 @@ interface
|
||||
linux
|
||||
{$else}
|
||||
{$ifdef win32}
|
||||
windows,
|
||||
{$endif}
|
||||
dos
|
||||
{$ifdef go32v2}
|
||||
,go32
|
||||
{$endif go32v2}
|
||||
dos,windows
|
||||
{$else}
|
||||
{$ifdef go32v2}
|
||||
go32
|
||||
{$endif go32v2}
|
||||
{$endif win32}
|
||||
{$endif linux}
|
||||
;
|
||||
|
||||
@ -271,7 +271,10 @@ begin
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.19 1999-02-03 16:18:58 michael
|
||||
Revision 1.20 1999-02-09 12:38:44 michael
|
||||
* Fixed INt() proble. Defined THandle, included Filemode constants
|
||||
|
||||
Revision 1.19 1999/02/03 16:18:58 michael
|
||||
+ Uses Windows on win32 platform
|
||||
|
||||
Revision 1.18 1998/12/15 22:43:12 peter
|
||||
|
Loading…
Reference in New Issue
Block a user