mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-12 10:49:07 +02:00
+ types unit added
This commit is contained in:
parent
c8dbdd3e41
commit
42a7c6c636
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Don't edit, this file is generated by FPCMake Version 1.1 [2002/03/19]
|
||||
# Don't edit, this file is generated by FPCMake Version 1.1 [2002/04/23]
|
||||
#
|
||||
default: all
|
||||
MAKEFILETARGETS=linux go32v2 win32 os2 freebsd beos netbsd amiga atari sunos qnx netware
|
||||
@ -209,7 +209,7 @@ override FPCOPT+=-Ur
|
||||
endif
|
||||
OBJPASDIR=$(RTL)/objpas
|
||||
GRAPHDIR=$(INC)/graph
|
||||
override TARGET_UNITS+=system objpas strings beos dos sysutils typinfo math varutils cpu mmx getopts heaptrc lineinfo variants
|
||||
override TARGET_UNITS+=system objpas strings beos dos sysutils typinfo math varutils cpu mmx getopts heaptrc lineinfo variants types
|
||||
override TARGET_LOADERS+=prt0 cprt0 func dllprt
|
||||
override TARGET_RSTS+=math varutils typinfo
|
||||
override INSTALL_FPCPACKAGE=y
|
||||
@ -515,6 +515,18 @@ EXEEXT=
|
||||
FPCMADE=fpcmade.qnx
|
||||
ZIPSUFFIX=qnx
|
||||
endif
|
||||
ifeq ($(OS_TARGET),netware)
|
||||
STATICLIBPREFIX=
|
||||
PPUEXT=.ppn
|
||||
OEXT=.on
|
||||
ASMEXT=.s
|
||||
SMARTEXT=.sl
|
||||
STATICLIBEXT=.a
|
||||
SHAREDLIBEXT=.nlm
|
||||
FPCMADE=fpcmade.nw
|
||||
ZIPSUFFIX=nw
|
||||
EXEEXT=.nlm
|
||||
endif
|
||||
ifndef ECHO
|
||||
ECHO:=$(strip $(wildcard $(addsuffix /gecho$(SRCEXEEXT),$(SEARCHPATH))))
|
||||
ifeq ($(ECHO),)
|
||||
|
@ -11,7 +11,7 @@ units=system objpas strings \
|
||||
beos \
|
||||
dos \
|
||||
sysutils typinfo math varutils \
|
||||
cpu mmx getopts heaptrc lineinfo variants
|
||||
cpu mmx getopts heaptrc lineinfo variants types
|
||||
rsts=math varutils typinfo
|
||||
|
||||
[require]
|
||||
@ -151,4 +151,3 @@ lineinfo$(PPUEXT) : $(INC)/lineinfo.pp system$(PPUEXT)
|
||||
#
|
||||
# Other system-dependent RTL Units
|
||||
#
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Don't edit, this file is generated by FPCMake Version 1.1 [2002/03/19]
|
||||
# Don't edit, this file is generated by FPCMake Version 1.1 [2002/04/23]
|
||||
#
|
||||
default: all
|
||||
MAKEFILETARGETS=linux go32v2 win32 os2 freebsd beos netbsd amiga atari sunos qnx netware
|
||||
@ -221,7 +221,7 @@ GRAPHDIR=$(INC)/graph
|
||||
ifndef USELIBGGI
|
||||
USELIBGGI=NO
|
||||
endif
|
||||
override TARGET_UNITS+=$(SYSTEMUNIT) objpas strings $(LINUXUNIT) unix initc dos crt objects printer sysutils typinfo math varutils cpu mmx getopts heaptrc lineinfo errors sockets gpm ipc terminfo video mouse keyboard console serial variants
|
||||
override TARGET_UNITS+=$(SYSTEMUNIT) objpas strings $(LINUXUNIT) unix initc dos crt objects printer sysutils typinfo math varutils cpu mmx getopts heaptrc lineinfo errors sockets gpm ipc terminfo video mouse keyboard console serial variants types
|
||||
override TARGET_LOADERS+=prt0 cprt0
|
||||
override TARGET_RSTS+=math varutils typinfo
|
||||
override INSTALL_FPCPACKAGE=y y
|
||||
@ -527,6 +527,18 @@ EXEEXT=
|
||||
FPCMADE=fpcmade.qnx
|
||||
ZIPSUFFIX=qnx
|
||||
endif
|
||||
ifeq ($(OS_TARGET),netware)
|
||||
STATICLIBPREFIX=
|
||||
PPUEXT=.ppn
|
||||
OEXT=.on
|
||||
ASMEXT=.s
|
||||
SMARTEXT=.sl
|
||||
STATICLIBEXT=.a
|
||||
SHAREDLIBEXT=.nlm
|
||||
FPCMADE=fpcmade.nw
|
||||
ZIPSUFFIX=nw
|
||||
EXEEXT=.nlm
|
||||
endif
|
||||
ifndef ECHO
|
||||
ECHO:=$(strip $(wildcard $(addsuffix /gecho$(SRCEXEEXT),$(SEARCHPATH))))
|
||||
ifeq ($(ECHO),)
|
||||
|
@ -16,7 +16,7 @@ units=$(SYSTEMUNIT) objpas strings \
|
||||
sysutils typinfo math varutils \
|
||||
cpu mmx getopts heaptrc lineinfo \
|
||||
errors sockets gpm ipc terminfo \
|
||||
video mouse keyboard console serial variants
|
||||
video mouse keyboard console serial variants types
|
||||
rsts=math varutils typinfo
|
||||
|
||||
[require]
|
||||
@ -200,4 +200,3 @@ ipc$(PPUEXT) : $(UNIXINC)/ipc.pp unix$(PPUEXT) $(SYSTEMUNIT)$(PPUEXT)
|
||||
terminfo$(PPUEXT) : terminfo.pp unix$(PPUEXT)
|
||||
|
||||
callspec$(PPUEXT) : $(INC)/callspec.pp $(SYSTEMUNIT)$(PPUEXT)
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Don't edit, this file is generated by FPCMake Version 1.1 [2002/03/19]
|
||||
# Don't edit, this file is generated by FPCMake Version 1.1 [2002/04/23]
|
||||
#
|
||||
default: all
|
||||
MAKEFILETARGETS=linux go32v2 win32 os2 freebsd beos netbsd amiga atari sunos qnx netware
|
||||
@ -214,7 +214,7 @@ endif
|
||||
ifdef NO_EXCEPTIONS_IN_SYSTEM
|
||||
override FPCOPT+=-dNO_EXCEPTIONS_IN_SYSTEM
|
||||
endif
|
||||
override TARGET_UNITS+=system objpas strings go32 dpmiexcp initc ports profile dxeload emu387 dos crt objects printer graph sysutils math typinfo cpu mmx getopts heaptrc lineinfo msmouse charset varutils video mouse keyboard variants vesamode
|
||||
override TARGET_UNITS+=system objpas strings go32 dpmiexcp initc ports profile dxeload emu387 dos crt objects printer graph sysutils math typinfo cpu mmx getopts heaptrc lineinfo msmouse charset varutils video mouse keyboard variants vesamode types
|
||||
override TARGET_LOADERS+=prt0 exceptn fpu
|
||||
override TARGET_RSTS+=math varutils typinfo
|
||||
override INSTALL_FPCPACKAGE=y
|
||||
@ -520,6 +520,18 @@ EXEEXT=
|
||||
FPCMADE=fpcmade.qnx
|
||||
ZIPSUFFIX=qnx
|
||||
endif
|
||||
ifeq ($(OS_TARGET),netware)
|
||||
STATICLIBPREFIX=
|
||||
PPUEXT=.ppn
|
||||
OEXT=.on
|
||||
ASMEXT=.s
|
||||
SMARTEXT=.sl
|
||||
STATICLIBEXT=.a
|
||||
SHAREDLIBEXT=.nlm
|
||||
FPCMADE=fpcmade.nw
|
||||
ZIPSUFFIX=nw
|
||||
EXEEXT=.nlm
|
||||
endif
|
||||
ifndef ECHO
|
||||
ECHO:=$(strip $(wildcard $(addsuffix /gecho$(SRCEXEEXT),$(SEARCHPATH))))
|
||||
ifeq ($(ECHO),)
|
||||
|
@ -13,7 +13,7 @@ units=system objpas strings \
|
||||
sysutils math typinfo \
|
||||
cpu mmx getopts heaptrc lineinfo \
|
||||
msmouse charset varutils \
|
||||
video mouse keyboard variants vesamode
|
||||
video mouse keyboard variants vesamode types
|
||||
rsts=math varutils typinfo
|
||||
|
||||
[require]
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Don't edit, this file is generated by FPCMake Version 1.1 [2002/03/19]
|
||||
# Don't edit, this file is generated by FPCMake Version 1.1 [2002/04/23]
|
||||
#
|
||||
default: all
|
||||
MAKEFILETARGETS=linux go32v2 win32 os2 freebsd beos netbsd amiga atari sunos qnx netware
|
||||
@ -226,7 +226,7 @@ GRAPHDIR=$(INC)/graph
|
||||
ifndef USELIBGGI
|
||||
USELIBGGI=NO
|
||||
endif
|
||||
override TARGET_UNITS+=$(SYSTEMUNIT) objpas strings $(LINUXUNIT) unix initc $(CPU_UNITS) dos crt objects printer ggigraph sysutils typinfo math varutils getopts heaptrc lineinfo errors sockets gpm ipc serial terminfo dl dynlibs video mouse keyboard variants
|
||||
override TARGET_UNITS+=$(SYSTEMUNIT) objpas strings $(LINUXUNIT) unix initc $(CPU_UNITS) dos crt objects printer ggigraph sysutils typinfo math varutils getopts heaptrc lineinfo errors sockets gpm ipc serial terminfo dl dynlibs video mouse keyboard variants types
|
||||
override TARGET_LOADERS+=prt0 dllprt0 cprt0 gprt0 cprt21 gprt21
|
||||
override TARGET_RSTS+=math varutils typinfo variants
|
||||
override CLEAN_UNITS+=syslinux linux
|
||||
@ -533,6 +533,18 @@ EXEEXT=
|
||||
FPCMADE=fpcmade.qnx
|
||||
ZIPSUFFIX=qnx
|
||||
endif
|
||||
ifeq ($(OS_TARGET),netware)
|
||||
STATICLIBPREFIX=
|
||||
PPUEXT=.ppn
|
||||
OEXT=.on
|
||||
ASMEXT=.s
|
||||
SMARTEXT=.sl
|
||||
STATICLIBEXT=.a
|
||||
SHAREDLIBEXT=.nlm
|
||||
FPCMADE=fpcmade.nw
|
||||
ZIPSUFFIX=nw
|
||||
EXEEXT=.nlm
|
||||
endif
|
||||
ifndef ECHO
|
||||
ECHO:=$(strip $(wildcard $(addsuffix /gecho$(SRCEXEEXT),$(SEARCHPATH))))
|
||||
ifeq ($(ECHO),)
|
||||
|
@ -13,7 +13,7 @@ units=$(SYSTEMUNIT) objpas strings \
|
||||
sysutils typinfo math varutils \
|
||||
getopts heaptrc lineinfo \
|
||||
errors sockets gpm ipc serial terminfo dl dynlibs \
|
||||
video mouse keyboard variants
|
||||
video mouse keyboard variants types
|
||||
rsts=math varutils typinfo variants
|
||||
|
||||
[require]
|
||||
|
@ -1,8 +1,8 @@
|
||||
#
|
||||
# Don't edit, this file is generated by FPCMake Version 1.1 [2002/04/01]
|
||||
# Don't edit, this file is generated by FPCMake Version 1.1 [2002/04/23]
|
||||
#
|
||||
default: all
|
||||
MAKEFILETARGETS=netware
|
||||
MAKEFILETARGETS=linux go32v2 win32 os2 freebsd beos netbsd amiga atari sunos qnx netware
|
||||
override PATH:=$(subst \,/,$(PATH))
|
||||
ifeq ($(findstring ;,$(PATH)),)
|
||||
inUnix=1
|
||||
@ -211,7 +211,7 @@ override FPCOPT+=-Ur
|
||||
override FPCOPT+=-dMT
|
||||
CREATESMART=1
|
||||
OBJPASDIR=$(RTL)/objpas
|
||||
override TARGET_UNITS+=$(SYSTEMUNIT) objpas strings netware os_types winsock2 dos crt objects sysutils typinfo math cpu mmx getopts heaptrc lineinfo sockets aio varutils video mouse keyboard
|
||||
override TARGET_UNITS+=$(SYSTEMUNIT) objpas strings netware os_types winsock2 dos crt objects sysutils typinfo math cpu mmx getopts heaptrc lineinfo sockets aio varutils video mouse keyboard types
|
||||
override TARGET_LOADERS+=nwpre prelude
|
||||
override TARGET_RSTS+=math typinfo varutils
|
||||
override INSTALL_FPCPACKAGE=y
|
||||
|
@ -13,7 +13,7 @@ units=$(SYSTEMUNIT) objpas strings \
|
||||
sysutils typinfo math \
|
||||
cpu mmx getopts heaptrc lineinfo \
|
||||
sockets aio varutils \
|
||||
video mouse keyboard
|
||||
video mouse keyboard types
|
||||
rsts=math typinfo varutils
|
||||
|
||||
[require]
|
||||
@ -189,4 +189,4 @@ nwimp/tli.imp nwimp/vollib.imp nwimp/ws2_32.imp nwimp/ws2nlm.imp
|
||||
|
||||
#override UNITPPUFILES+=cpu.a crt.a dos.a getopts.a heaptrc.a keyboard.a \
|
||||
#lineinfo.a math.a mmx.a mouse.a netware.a objects.a objpas.a sockets.a \
|
||||
#strings.a system.a sysutils.a typinfo.a varutils.a video.a winsock2.a
|
||||
#strings.a system.a sysutils.a typinfo.a varutils.a video.a winsock2.a
|
319
rtl/objpas/types.pp
Normal file
319
rtl/objpas/types.pp
Normal file
@ -0,0 +1,319 @@
|
||||
{
|
||||
$Id$
|
||||
This file is part of the Free Pascal run time library.
|
||||
Copyright (c) 2002 by Florian Klaempfl,
|
||||
member of the Free Pascal development team.
|
||||
|
||||
See the file COPYING.FPC, included in this distribution,
|
||||
for details about the copyright.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
**********************************************************************}
|
||||
{$MODE OBJFPC}
|
||||
unit types;
|
||||
|
||||
interface
|
||||
|
||||
const
|
||||
RT_RCDATA = PChar(10);
|
||||
|
||||
type
|
||||
DWORD = LongWord;
|
||||
|
||||
PLongint = System.PLongint;
|
||||
PInteger = System.PInteger;
|
||||
PSmallInt = System.PSmallInt;
|
||||
PDouble = System.PDouble;
|
||||
PByte = System.PByte;
|
||||
|
||||
TPoint = packed record
|
||||
X : Longint;
|
||||
Y : Longint;
|
||||
end;
|
||||
PPoint = ^TPoint;
|
||||
tagPOINT = TPoint;
|
||||
|
||||
TRect = packed record
|
||||
case Integer of
|
||||
0: (Left,Top,Right,Bottom : Longint);
|
||||
1: (TopLeft,BottomRight : TPoint);
|
||||
end;
|
||||
PRect = ^TRect;
|
||||
|
||||
TSize = packed record
|
||||
cx : Longint;
|
||||
cy : Longint;
|
||||
end;
|
||||
PSize = ^TSize;
|
||||
tagSIZE = TSize;
|
||||
SIZE = TSize;
|
||||
|
||||
TSmallPoint = packed record
|
||||
x : SmallInt;
|
||||
y : SmallInt;
|
||||
end;
|
||||
PSmallPoint = ^TSmallPoint;
|
||||
|
||||
|
||||
{$ifndef win32}
|
||||
const
|
||||
STGTY_STORAGE = 1;
|
||||
STGTY_STREAM = 2;
|
||||
STGTY_LOCKBYTES = 3;
|
||||
STGTY_PROPERTY = 4;
|
||||
|
||||
STREAM_SEEK_SET = 0;
|
||||
STREAM_SEEK_CUR = 1;
|
||||
STREAM_SEEK_END = 2;
|
||||
|
||||
LOCK_WRITE = 1;
|
||||
LOCK_EXCLUSIVE = 2;
|
||||
LOCK_ONLYONCE = 4;
|
||||
|
||||
E_FAIL = HRESULT($80004005);
|
||||
|
||||
STG_E_INVALIDFUNCTION = HRESULT($80030001);
|
||||
STG_E_FILENOTFOUND = HRESULT($80030002);
|
||||
STG_E_PATHNOTFOUND = HRESULT($80030003);
|
||||
STG_E_TOOMANYOPENFILES = HRESULT($80030004);
|
||||
STG_E_ACCESSDENIED = HRESULT($80030005);
|
||||
STG_E_INVALIDHANDLE = HRESULT($80030006);
|
||||
STG_E_INSUFFICIENTMEMORY = HRESULT($80030008);
|
||||
STG_E_INVALIDPOINTER = HRESULT($80030009);
|
||||
STG_E_NOMOREFILES = HRESULT($80030012);
|
||||
STG_E_DISKISWRITEPROTECTED = HRESULT($80030013);
|
||||
STG_E_SEEKERROR = HRESULT($80030019);
|
||||
STG_E_WRITEFAULT = HRESULT($8003001D);
|
||||
STG_E_READFAULT = HRESULT($8003001E);
|
||||
STG_E_SHAREVIOLATION = HRESULT($80030020);
|
||||
STG_E_LOCKVIOLATION = HRESULT($80030021);
|
||||
STG_E_FILEALREADYEXISTS = HRESULT($80030050);
|
||||
STG_E_INVALIDPARAMETER = HRESULT($80030057);
|
||||
STG_E_MEDIUMFULL = HRESULT($80030070);
|
||||
STG_E_PROPSETMISMATCHED = HRESULT($800300F0);
|
||||
STG_E_ABNORMALAPIEXIT = HRESULT($800300FA);
|
||||
STG_E_INVALIDHEADER = HRESULT($800300FB);
|
||||
STG_E_INVALIDNAME = HRESULT($800300FC);
|
||||
STG_E_UNKNOWN = HRESULT($800300FD);
|
||||
STG_E_UNIMPLEMENTEDFUNCTION = HRESULT($800300FE);
|
||||
STG_E_INVALIDFLAG = HRESULT($800300FF);
|
||||
STG_E_INUSE = HRESULT($80030100);
|
||||
STG_E_NOTCURRENT = HRESULT($80030101);
|
||||
STG_E_REVERTED = HRESULT($80030102);
|
||||
STG_E_CANTSAVE = HRESULT($80030103);
|
||||
STG_E_OLDFORMAT = HRESULT($80030104);
|
||||
STG_E_OLDDLL = HRESULT($80030105);
|
||||
STG_E_SHAREREQUIRED = HRESULT($80030106);
|
||||
STG_E_EXTANTMARSHALLINGS = HRESULT($80030108);
|
||||
STG_E_DOCFILECORRUPT = HRESULT($80030109);
|
||||
STG_E_BADBASEADDRESS = HRESULT($80030110);
|
||||
STG_E_INCOMPLETE = HRESULT($80030201);
|
||||
STG_E_TERMINATED = HRESULT($80030202);
|
||||
|
||||
STG_S_CONVERTED = $00030200;
|
||||
STG_S_BLOCK = $00030201;
|
||||
STG_S_RETRYNOW = $00030202;
|
||||
STG_S_MONITORING = $00030203;
|
||||
|
||||
GUID_NULL: TGUID = '{00000000-0000-0000-0000-000000000000}';
|
||||
|
||||
type
|
||||
TOleChar = WideChar;
|
||||
POleStr = PWideChar;
|
||||
PPOleStr = ^POleStr;
|
||||
|
||||
PCLSID = PGUID;
|
||||
TCLSID = TGUID;
|
||||
|
||||
LARGE_INT = Int64;
|
||||
Largeint = LARGE_INT;
|
||||
PDWord = ^DWord;
|
||||
|
||||
PDisplay = Pointer;
|
||||
PEvent = Pointer;
|
||||
|
||||
TXrmOptionDescRec = record
|
||||
end;
|
||||
XrmOptionDescRec = TXrmOptionDescRec;
|
||||
PXrmOptionDescRec = ^TXrmOptionDescRec;
|
||||
|
||||
Widget = Pointer;
|
||||
WidgetClass = Pointer;
|
||||
ArgList = Pointer;
|
||||
Region = Pointer;
|
||||
|
||||
_FILETIME = packed record
|
||||
dwLowDateTime : DWORD;
|
||||
dwHighDateTime : DWORD;
|
||||
end;
|
||||
TFileTime = _FILETIME;
|
||||
FILETIME = _FILETIME;
|
||||
PFileTime = ^TFileTime;
|
||||
|
||||
tagSTATSTG = packed record
|
||||
pwcsName : POleStr;
|
||||
dwType : Longint;
|
||||
cbSize : Largeint;
|
||||
mtime : TFileTime;
|
||||
ctime : TFileTime;
|
||||
atime : TFileTime;
|
||||
grfMode : Longint;
|
||||
grfLocksSupported : Longint;
|
||||
clsid : TCLSID;
|
||||
grfStateBits : Longint;
|
||||
reserved : Longint;
|
||||
end;
|
||||
TStatStg = tagSTATSTG;
|
||||
STATSTG = TStatStg;
|
||||
PStatStg = ^TStatStg;
|
||||
|
||||
|
||||
IClassFactory = Interface(IUnknown) ['{00000001-0000-0000-C000-000000000046}']
|
||||
Function CreateInstance(Const unkOuter : IUnknown;Const riid : TGUID;Out vObject) : HResult;StdCall;
|
||||
Function LockServer(fLock : LongBool) : HResult;StdCall;
|
||||
End;
|
||||
|
||||
ISequentialStream = interface(IUnknown) ['{0c733a30-2a1c-11ce-ade5-00aa0044773d}']
|
||||
function Read(pv : Pointer;cb : DWord;pcbRead : PDWord) : HRESULT;stdcall;
|
||||
function Write(pv : Pointer;cb : DWord;pcbWritten : PDWord) : HRESULT;stdcall;
|
||||
end;
|
||||
|
||||
IStream = interface(ISequentialStream) ['{0000000C-0000-0000-C000-000000000046}']
|
||||
function Seek(dlibMove : LargeInt; dwOrigin : Longint;
|
||||
out libNewPosition : LargeInt) : HResult;stdcall;
|
||||
function SetSize(libNewSize : LargeInt) : HRESULT;stdcall;
|
||||
function CopyTo(stm: IStream;cb : LargeInt;out cbRead : LargeInt;
|
||||
out cbWritten : LargeInt) : HRESULT;stdcall;
|
||||
function Commit(grfCommitFlags : Longint) : HRESULT;stdcall;
|
||||
function Revert : HRESULT;stdcall;
|
||||
function LockRegion(libOffset : LargeInt;cb : LargeInt;
|
||||
dwLockType : Longint) : HRESULT;stdcall;
|
||||
function UnlockRegion(libOffset : LargeInt;cb : LargeInt;
|
||||
dwLockType : Longint) : HRESULT;stdcall;
|
||||
Function Stat(out statstg : TStatStg;grfStatFlag : Longint) : HRESULT;stdcall;
|
||||
function Clone(out stm : IStream) : HRESULT;stdcall;
|
||||
end;
|
||||
{$endif win32}
|
||||
|
||||
function EqualRect(const r1,r2 : TRect) : Boolean;
|
||||
function Rect(Left,Top,Right,Bottom : Integer) : TRect;
|
||||
function Bounds(ALeft,ATop,AWidth,AHeight : Integer) : TRect;
|
||||
function Point(x,y : Integer) : TPoint;
|
||||
function PtInRect(const Rect : TRect; const p : TPoint) : Boolean;
|
||||
function IntersectRect(var Rect : TRect; const R1,R2 : TRect) : Boolean;
|
||||
function UnionRect(var Rect : TRect; const R1,R2 : TRect) : Boolean;
|
||||
function IsRectEmpty(const Rect : TRect) : Boolean;
|
||||
function OffsetRect(var Rect : TRect;DX : Integer;DY : Integer) : Boolean;
|
||||
|
||||
implementation
|
||||
|
||||
function EqualRect(const r1,r2 : TRect) : Boolean;
|
||||
begin
|
||||
EqualRect:=(r1.left=r2.left) and (r1.right=r2.right) and (r1.top=r2.top) and (r1.bottom=r2.bottom);
|
||||
end;
|
||||
|
||||
function Rect(Left,Top,Right,Bottom : Integer) : TRect;
|
||||
begin
|
||||
Rect.Left:=Left;
|
||||
Rect.Top:=Top;
|
||||
Rect.Right:=Right;
|
||||
Rect.Bottom:=Bottom;
|
||||
end;
|
||||
|
||||
function Bounds(ALeft,ATop,AWidth,AHeight : Integer) : TRect;
|
||||
begin
|
||||
Bounds.Left:=ALeft;
|
||||
Bounds.Top:=ATop;
|
||||
Bounds.Right:=ALeft+AWidth;
|
||||
Bounds.Bottom:=ATop+AHeight;
|
||||
end;
|
||||
|
||||
function Point(x,y : Integer) : TPoint;
|
||||
begin
|
||||
Point.x:=x;
|
||||
Point.y:=y;
|
||||
end;
|
||||
|
||||
function PtInRect(const Rect : TRect;const p : TPoint) : Boolean;
|
||||
begin
|
||||
PtInRect:=(p.y>=Rect.Top) and (p.y<Rect.Bottom) and (p.x>=Rect.Left) and (p.x<Rect.Right);
|
||||
end;
|
||||
|
||||
function IntersectRect(var Rect : TRect;const R1,R2 : TRect) : Boolean;
|
||||
begin
|
||||
Rect:=R1;
|
||||
with R2 do
|
||||
begin
|
||||
if Left>R1.Left then
|
||||
Rect.Left:=Left;
|
||||
if Top>R1.Top then
|
||||
Rect.Top:=Top;
|
||||
if Right<R1.Right then
|
||||
Rect.Right:=Right;
|
||||
if Bottom<R1.Bottom then
|
||||
Rect.Bottom:=Bottom;
|
||||
end;
|
||||
if IsRectEmpty(Rect) then
|
||||
begin
|
||||
FillChar(Rect,SizeOf(Rect),0);
|
||||
IntersectRect:=false;
|
||||
end
|
||||
else
|
||||
IntersectRect:=true;
|
||||
end;
|
||||
|
||||
function UnionRect(var Rect : TRect;const R1,R2 : TRect) : Boolean;
|
||||
begin
|
||||
Rect:=R1;
|
||||
with R2 do
|
||||
begin
|
||||
if Left<R1.Left then
|
||||
Rect.Left:=Left;
|
||||
if Top<R1.Top then
|
||||
Rect.Top:=Top;
|
||||
if Right>R1.Right then
|
||||
Rect.Right:=Right;
|
||||
if Bottom>R1.Bottom then
|
||||
Rect.Bottom:=Bottom;
|
||||
end;
|
||||
if IsRectEmpty(Rect) then
|
||||
begin
|
||||
FillChar(Rect,SizeOf(Rect),0);
|
||||
UnionRect:=false;
|
||||
end
|
||||
else
|
||||
UnionRect:=true;
|
||||
end;
|
||||
|
||||
function IsRectEmpty(const Rect : TRect) : Boolean;
|
||||
begin
|
||||
IsRectEmpty:=(Rect.Right<=Rect.Left) or (Rect.Bottom<=Rect.Top);
|
||||
end;
|
||||
|
||||
function OffsetRect(var Rect : TRect;DX : Integer;DY : Integer) : Boolean;
|
||||
begin
|
||||
if assigned(@Rect) then
|
||||
begin
|
||||
with Rect do
|
||||
begin
|
||||
inc(Left,dx);
|
||||
inc(Top,dy);
|
||||
inc(Right,dx);
|
||||
inc(Bottom,dy);
|
||||
end;
|
||||
OffsetRect:=true;
|
||||
end
|
||||
else
|
||||
OffsetRect:=false;
|
||||
end;
|
||||
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.1 2002-07-23 20:39:54 florian
|
||||
+ types unit added
|
||||
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Don't edit, this file is generated by FPCMake Version 1.1 [2002/03/19]
|
||||
# Don't edit, this file is generated by FPCMake Version 1.1 [2002/04/23]
|
||||
#
|
||||
default: all
|
||||
MAKEFILETARGETS=linux go32v2 win32 os2 freebsd beos netbsd amiga atari sunos qnx netware
|
||||
@ -213,7 +213,7 @@ override FPCOPT+=-Ur
|
||||
endif
|
||||
OBJPASDIR=$(RTL)/objpas
|
||||
GRAPHDIR=$(INC)/graph
|
||||
override TARGET_UNITS+=$(SYSTEMUNIT) objpas strings ports os2def doscalls moncalls kbdcalls moucalls viocalls pmbitmap pmwin pmgpi dive dos crt objects printer sysutils math typinfo varutils ucomplex cpu mmx getopts heaptrc lineinfo dynlibs video mouse keyboard variants
|
||||
override TARGET_UNITS+=$(SYSTEMUNIT) objpas strings ports os2def doscalls moncalls kbdcalls moucalls viocalls pmbitmap pmwin pmgpi dive dos crt objects printer sysutils math typinfo varutils ucomplex cpu mmx getopts heaptrc lineinfo dynlibs video mouse keyboard variants types
|
||||
override TARGET_LOADERS+=prt0 prt1 code2 code3
|
||||
override TARGET_RSTS+=math varutils typinfo
|
||||
override INSTALL_FPCPACKAGE=y
|
||||
@ -519,6 +519,18 @@ EXEEXT=
|
||||
FPCMADE=fpcmade.qnx
|
||||
ZIPSUFFIX=qnx
|
||||
endif
|
||||
ifeq ($(OS_TARGET),netware)
|
||||
STATICLIBPREFIX=
|
||||
PPUEXT=.ppn
|
||||
OEXT=.on
|
||||
ASMEXT=.s
|
||||
SMARTEXT=.sl
|
||||
STATICLIBEXT=.a
|
||||
SHAREDLIBEXT=.nlm
|
||||
FPCMADE=fpcmade.nw
|
||||
ZIPSUFFIX=nw
|
||||
EXEEXT=.nlm
|
||||
endif
|
||||
ifndef ECHO
|
||||
ECHO:=$(strip $(wildcard $(addsuffix /gecho$(SRCEXEEXT),$(SEARCHPATH))))
|
||||
ifeq ($(ECHO),)
|
||||
|
@ -13,7 +13,7 @@ units=$(SYSTEMUNIT) objpas strings \
|
||||
dos crt objects printer \
|
||||
sysutils math typinfo varutils \
|
||||
ucomplex cpu mmx getopts heaptrc lineinfo dynlibs \
|
||||
video mouse keyboard variants
|
||||
video mouse keyboard variants types
|
||||
rsts=math varutils typinfo
|
||||
|
||||
[require]
|
||||
@ -175,4 +175,3 @@ lineinfo$(PPUEXT) : $(INC)/lineinfo.pp $(SYSTEMUNIT)$(PPUEXT)
|
||||
#
|
||||
# Other system-dependent RTL Units
|
||||
#
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Don't edit, this file is generated by FPCMake Version 1.1 [2002/03/19]
|
||||
# Don't edit, this file is generated by FPCMake Version 1.1 [2002/04/23]
|
||||
#
|
||||
default: all
|
||||
MAKEFILETARGETS=linux go32v2 win32 os2 freebsd beos netbsd amiga atari sunos qnx netware
|
||||
@ -217,7 +217,7 @@ OBJPASDIR=$(RTL)/objpas
|
||||
GRAPHDIR=$(INC)/graph
|
||||
include $(WININC)/makefile.inc
|
||||
WINDOWS_SOURCE_FILES=$(addprefix $(WININC)/,$(addsuffix .inc,$(WINDOWS_FILES)))
|
||||
override TARGET_UNITS+=$(SYSTEMUNIT) objpas strings windows ole2 activex opengl32 os_types winsock initc dos crt objects graph messages sysutils typinfo math varutils cpu mmx getopts heaptrc lineinfo wincrt winmouse winevent sockets printer dynlibs video mouse keyboard variants
|
||||
override TARGET_UNITS+=$(SYSTEMUNIT) objpas strings windows ole2 activex opengl32 os_types winsock initc dos crt objects graph messages sysutils typinfo math varutils cpu mmx getopts heaptrc lineinfo wincrt winmouse winevent sockets printer dynlibs video mouse keyboard variants types
|
||||
override TARGET_LOADERS+=wprt0 wdllprt0
|
||||
override TARGET_RSTS+=math varutils typinfo
|
||||
override INSTALL_FPCPACKAGE=y
|
||||
@ -523,6 +523,18 @@ EXEEXT=
|
||||
FPCMADE=fpcmade.qnx
|
||||
ZIPSUFFIX=qnx
|
||||
endif
|
||||
ifeq ($(OS_TARGET),netware)
|
||||
STATICLIBPREFIX=
|
||||
PPUEXT=.ppn
|
||||
OEXT=.on
|
||||
ASMEXT=.s
|
||||
SMARTEXT=.sl
|
||||
STATICLIBEXT=.a
|
||||
SHAREDLIBEXT=.nlm
|
||||
FPCMADE=fpcmade.nw
|
||||
ZIPSUFFIX=nw
|
||||
EXEEXT=.nlm
|
||||
endif
|
||||
ifndef ECHO
|
||||
ECHO:=$(strip $(wildcard $(addsuffix /gecho$(SRCEXEEXT),$(SEARCHPATH))))
|
||||
ifeq ($(ECHO),)
|
||||
|
@ -13,7 +13,7 @@ units=$(SYSTEMUNIT) objpas strings \
|
||||
sysutils typinfo math varutils \
|
||||
cpu mmx getopts heaptrc lineinfo \
|
||||
wincrt winmouse winevent sockets printer dynlibs \
|
||||
video mouse keyboard variants
|
||||
video mouse keyboard variants types
|
||||
rsts=math varutils typinfo
|
||||
|
||||
[require]
|
||||
@ -199,4 +199,4 @@ lineinfo$(PPUEXT) : $(INC)/lineinfo.pp $(SYSTEMUNIT)$(PPUEXT)
|
||||
# Other system-dependent RTL Units
|
||||
#
|
||||
|
||||
callspec$(PPUEXT) : $(INC)/callspec.pp $(SYSTEMUNIT)$(PPUEXT)
|
||||
callspec$(PPUEXT) : $(INC)/callspec.pp $(SYSTEMUNIT)$(PPUEXT)
|
Loading…
Reference in New Issue
Block a user