* far pointer helper types made global in the implementation of the system unit

git-svn-id: trunk@24578 -
This commit is contained in:
nickysn 2013-05-24 17:28:53 +00:00
parent a308994423
commit 035cb74855

View File

@ -81,6 +81,11 @@ implementation
const
fCarry = 1;
type
PFarByte = ^Byte;far;
PFarChar = ^Char;far;
PFarWord = ^Word;far;
var
dos_version:Word;public name 'dos_version';
@ -126,9 +131,6 @@ end;
*****************************************************************************}
function GetProgramName: string;
type
PFarByte = ^Byte;far;
PFarWord = ^Word;far;
var
dos_env_seg: Word;
ofs: Word;
@ -142,14 +144,14 @@ begin
dos_env_seg := PFarWord(Ptr(dos_psp, $2C))^;
ofs := 1;
repeat
Ch := Chr(PFarByte(Ptr(dos_env_seg,ofs - 1))^);
Ch2 := Chr(PFarByte(Ptr(dos_env_seg,ofs))^);
Ch := PFarChar(Ptr(dos_env_seg,ofs - 1))^;
Ch2 := PFarChar(Ptr(dos_env_seg,ofs))^;
if (Ch = #0) and (Ch2 = #0) then
begin
Inc(ofs, 3);
GetProgramName := '';
repeat
Ch := Chr(PFarByte(Ptr(dos_env_seg,ofs))^);
Ch := PFarChar(Ptr(dos_env_seg,ofs))^;
if Ch <> #0 then
GetProgramName := GetProgramName + Ch;
Inc(ofs);
@ -170,6 +172,7 @@ begin
until false;
end;
function paramcount : longint;
begin
paramcount := 0;