summaryrefslogtreecommitdiff
path: root/packages/extra/univint/ToolUtils.pas
diff options
context:
space:
mode:
authorjonas <jonas@3ad0048d-3df7-0310-abae-a5850022a9f2>2006-12-01 13:35:31 +0000
committerjonas <jonas@3ad0048d-3df7-0310-abae-a5850022a9f2>2006-12-01 13:35:31 +0000
commit6f34e0d5b18f1ae6889db90bc45c5de3bcac071a (patch)
tree5bcfa411464c409dd45e6caa886f16b52cb6049e /packages/extra/univint/ToolUtils.pas
parentbb97aaf8b4e0b169c0b7491759d6bfb490125a0b (diff)
downloadfpc-6f34e0d5b18f1ae6889db90bc45c5de3bcac071a.tar.gz
* updated to r200 of the interfaces
git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@5515 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'packages/extra/univint/ToolUtils.pas')
-rw-r--r--packages/extra/univint/ToolUtils.pas39
1 files changed, 37 insertions, 2 deletions
diff --git a/packages/extra/univint/ToolUtils.pas b/packages/extra/univint/ToolUtils.pas
index 96b1e4e87c..cf0e615c3c 100644
--- a/packages/extra/univint/ToolUtils.pas
+++ b/packages/extra/univint/ToolUtils.pas
@@ -248,7 +248,7 @@ procedure LongMul(a: SInt32; b: SInt32; var result: Int64Bit); external name '_L
* CarbonLib: in CarbonLib H.a.c.k and later
* Mac OS X: not available
}
-function HiWord(x: SInt32): SInt16; external name '_HiWord';
+
{
* LoWord()
*
@@ -257,8 +257,43 @@ function HiWord(x: SInt32): SInt16; external name '_HiWord';
* CarbonLib: in CarbonLib H.a.c.k and later
* Mac OS X: not available
}
-function LoWord(x: SInt32): SInt16; external name '_LoWord';
+
+function HiWord(arg: SInt32): SInt16; inline; overload;
+function HiWord(arg: UInt32): UInt16; inline; overload;
+function LoWord(arg: SInt32): SInt16; inline; overload;
+function LoWord(arg: UInt32): UInt16; inline; overload;
+
+
+
{$ALIGN MAC68K}
+
+implementation
+
+
+function HiWord(arg: SInt32): SInt16; inline;
+begin
+ HiWord := arg shr 16;
+end;
+
+
+function HiWord(arg: UInt32): UInt16; inline;
+begin
+ HiWord := arg shr 16;
+end;
+
+
+function LoWord(arg: SInt32): SInt16; inline;
+begin
+ LoWord := SInt16(arg);
+end;
+
+
+function LoWord(arg: UInt32): UInt16; inline;
+begin
+ LoWord := UInt16(arg);
+end;
+
+
end.