+ integrated the winprocs and wintypes .inc files into the win16 system unit

git-svn-id: trunk@31565 -
This commit is contained in:
nickysn 2015-09-06 23:37:04 +00:00
parent 55a8158c51
commit fe8cb4b09d
6 changed files with 31 additions and 21 deletions

View File

@ -2,8 +2,13 @@
type type
//Obsolete types, kept for backwards compatibility //Obsolete types, kept for backwards compatibility
TResourceHandle = PtrUint; TResourceHandle = PtrUint;
{$ifdef Win16}
HMODULE = THandle; {HINST}
HGLOBAL = THandle;
{$else Win16}
HMODULE = PtrUint; HMODULE = PtrUint;
HGLOBAL = PtrUint; HGLOBAL = PtrUint;
{$endif Win16}
//New types //New types
TFPResourceHandle = PtrUInt; TFPResourceHandle = PtrUInt;
TFPResourceHMODULE = PtrUInt; TFPResourceHMODULE = PtrUInt;

View File

@ -2567,7 +2567,7 @@ prt0l$(OEXT) : prt0l.asm prt0comn.asm $(COMPILER_UNITTARGETDIR)
$(NASM) -f obj -o $(UNITTARGETDIRPREFIX)prt0l$(OEXT) prt0l.asm $(NASM) -f obj -o $(UNITTARGETDIRPREFIX)prt0l$(OEXT) prt0l.asm
prt0h$(OEXT) : prt0h.asm prt0comn.asm $(COMPILER_UNITTARGETDIR) prt0h$(OEXT) : prt0h.asm prt0comn.asm $(COMPILER_UNITTARGETDIR)
$(NASM) -f obj -o $(UNITTARGETDIRPREFIX)prt0h$(OEXT) prt0h.asm $(NASM) -f obj -o $(UNITTARGETDIRPREFIX)prt0h$(OEXT) prt0h.asm
system$(PPUEXT) : system.pp $(SYSDEPS) $(INC)/tnyheaph.inc $(INC)/tinyheap.inc system$(PPUEXT) : system.pp $(SYSDEPS) $(INC)/tnyheaph.inc $(INC)/tinyheap.inc wintypes.inc winprocsh.inc winprocs.inc
$(COMPILER) -Us -Sg system.pp $(COMPILER) -Us -Sg system.pp
$(EXECPPAS) $(EXECPPAS)
uuchar$(PPUEXT): $(SYSTEMUNIT)$(PPUEXT) $(INC)/uuchar.pp uuchar$(PPUEXT): $(SYSTEMUNIT)$(PPUEXT) $(INC)/uuchar.pp

View File

@ -69,7 +69,7 @@ prt0h$(OEXT) : prt0h.asm prt0comn.asm $(COMPILER_UNITTARGETDIR)
# #
# System Units (System, Objpas, Strings) # System Units (System, Objpas, Strings)
# #
system$(PPUEXT) : system.pp $(SYSDEPS) $(INC)/tnyheaph.inc $(INC)/tinyheap.inc system$(PPUEXT) : system.pp $(SYSDEPS) $(INC)/tnyheaph.inc $(INC)/tinyheap.inc wintypes.inc winprocsh.inc winprocs.inc
$(COMPILER) -Us -Sg system.pp $(COMPILER) -Us -Sg system.pp
$(EXECPPAS) $(EXECPPAS)

View File

@ -118,6 +118,11 @@ type
{$I registers.inc} {$I registers.inc}
{$define SYSTEMUNIT}
{$I wintypes.inc}
{$I winprocsh.inc}
{$I winprocs.inc}
{$I system.inc} {$I system.inc}
{$I tinyheap.inc} {$I tinyheap.inc}

View File

@ -1,18 +1,18 @@
function LOBYTE(w: Word): Byte; inline; function LOBYTE(w: Word): Byte; {$ifdef SYSTEMUNIT}forward;{$else}inline;{$endif}
function HIBYTE(w: Word): Byte; inline; function HIBYTE(w: Word): Byte; {$ifdef SYSTEMUNIT}forward;{$else}inline;{$endif}
function LOWORD(l: LongInt): Word; inline; function LOWORD(l: LongInt): Word; {$ifdef SYSTEMUNIT}forward;{$else}inline;{$endif}
function HIWORD(l: LongInt): Word; inline; function HIWORD(l: LongInt): Word; {$ifdef SYSTEMUNIT}forward;{$else}inline;{$endif}
function MAKELONG(low, high: Word): LONG; inline; function MAKELONG(low, high: Word): LONG; {$ifdef SYSTEMUNIT}forward;{$else}inline;{$endif}
function MAKELPARAM(low, high: Word): LPARAM; inline; function MAKELPARAM(low, high: Word): LPARAM; {$ifdef SYSTEMUNIT}forward;{$else}inline;{$endif}
function MAKELRESULT(low, high: Word): LRESULT; inline; function MAKELRESULT(low, high: Word): LRESULT; {$ifdef SYSTEMUNIT}forward;{$else}inline;{$endif}
function MAKELP(sel, off: Word): FarPointer; inline; function MAKELP(sel, off: Word): FarPointer; {$ifdef SYSTEMUNIT}forward;{$else}inline;{$endif}
function SELECTOROF(lp: FarPointer): Word; inline; function SELECTOROF(lp: FarPointer): Word; {$ifdef SYSTEMUNIT}forward;{$else}inline;{$endif}
function OFFSETOF(lp: FarPointer): Word; inline; function OFFSETOF(lp: FarPointer): Word; {$ifdef SYSTEMUNIT}forward;{$else}inline;{$endif}
// FIELDOFFSET // FIELDOFFSET
@ -101,7 +101,7 @@ procedure DirectedYield(Task: HTASK); external 'KERNEL';
{ Global memory management } { Global memory management }
function GlobalDiscard(h: HGLOBAL): HGLOBAL; inline; function GlobalDiscard(h: HGLOBAL): HGLOBAL; {$ifdef SYSTEMUNIT}forward;{$else}inline;{$endif}
function GlobalAlloc(Flags: UINT; Bytes: DWORD): HGLOBAL; external 'KERNEL'; function GlobalAlloc(Flags: UINT; Bytes: DWORD): HGLOBAL; external 'KERNEL';
function GlobalReAlloc(Mem: HGLOBAL; Bytes: DWORD; Flags: UINT): HGLOBAL; external 'KERNEL'; function GlobalReAlloc(Mem: HGLOBAL; Bytes: DWORD; Flags: UINT): HGLOBAL; external 'KERNEL';
@ -137,8 +137,8 @@ procedure GlobalNotify(NotifyProc: GNOTIFYPROC); external 'KERNEL';
function LockSegment(Segment: UINT): HGLOBAL; external 'KERNEL'; function LockSegment(Segment: UINT): HGLOBAL; external 'KERNEL';
procedure UnlockSegment(Segment: UINT); external 'KERNEL'; procedure UnlockSegment(Segment: UINT); external 'KERNEL';
function LockData(dummy: SmallInt): HGLOBAL; inline; function LockData(dummy: SmallInt): HGLOBAL; {$ifdef SYSTEMUNIT}forward;{$else}inline;{$endif}
procedure UnlockData(dummy: SmallInt); inline; procedure UnlockData(dummy: SmallInt); {$ifdef SYSTEMUNIT}forward;{$else}inline;{$endif}
function AllocSelector(Selector: UINT): UINT; external 'KERNEL'; function AllocSelector(Selector: UINT): UINT; external 'KERNEL';
function FreeSelector(Selector: UINT): UINT; external 'KERNEL'; function FreeSelector(Selector: UINT): UINT; external 'KERNEL';
@ -155,7 +155,7 @@ procedure ValidateFreeSpaces; external 'KERNEL';
{ Local Memory Management } { Local Memory Management }
function LocalDiscard(h: HLOCAL): HLOCAL; inline; function LocalDiscard(h: HLOCAL): HLOCAL; {$ifdef SYSTEMUNIT}forward;{$else}inline;{$endif}
function LocalAlloc(Flags, Bytes: UINT): HLOCAL; external 'KERNEL'; function LocalAlloc(Flags, Bytes: UINT): HLOCAL; external 'KERNEL';
function LocalReAlloc(Mem: HLOCAL; Bytes, Flags: UINT): HLOCAL; external 'KERNEL'; function LocalReAlloc(Mem: HLOCAL; Bytes, Flags: UINT): HLOCAL; external 'KERNEL';

View File

@ -18,7 +18,7 @@ type
is better to be avoided. } is better to be avoided. }
PSTR = ^Char; PSTR = ^Char;
NPSTR = ^Char; near; NPSTR = ^Char; near;
LPSTR = ^Char; far; // LPSTR = ^Char; far;
LPCSTR = ^Char; far; LPCSTR = ^Char; far;
{ PBYTE is already defined in system } { PBYTE is already defined in system }
@ -45,7 +45,7 @@ type
SPHANDLE = ^THandle; near; SPHANDLE = ^THandle; near;
LPHANDLE = ^THandle; far; LPHANDLE = ^THandle; far;
HGLOBAL = THandle; // HGLOBAL = THandle;
HLOCAL = THandle; HLOCAL = THandle;
TGlobalHandle = THandle; TGlobalHandle = THandle;
@ -55,7 +55,7 @@ type
TAtom = ATOM; TAtom = ATOM;
HINST = THandle; { instead of HINSTANCE, to avoid conflict with var hInstance } HINST = THandle; { instead of HINSTANCE, to avoid conflict with var hInstance }
HMODULE = HINST; // HMODULE = HINST;
const const
{ GetWinFlags result mask values } { GetWinFlags result mask values }
@ -202,8 +202,8 @@ const
OF_REOPEN = $8000; OF_REOPEN = $8000;
{ _lopen() flags } { _lopen() flags }
READ = 0; _READ = 0;
WRITE = 1; _WRITE = 1;
READ_WRITE = 2; READ_WRITE = 2;
{ _llseek origin values } { _llseek origin values }