Browse Source

+ added

git-svn-id: trunk@5407 -
Jonas Maebe 19 years ago
parent
commit
b8ff1ce664
3 changed files with 48 additions and 0 deletions
  1. 2 0
      .gitattributes
  2. 33 0
      tests/webtbs/tw7817a.pp
  3. 13 0
      tests/webtbs/tw7817b.pp

+ 2 - 0
.gitattributes

@@ -7706,6 +7706,8 @@ tests/webtbs/tw7568.pp svneol=native#text/plain
 tests/webtbs/tw7637.pp svneol=native#text/plain
 tests/webtbs/tw7643.pp svneol=native#text/plain
 tests/webtbs/tw7679.pp svneol=native#text/plain
+tests/webtbs/tw7817a.pp svneol=native#text/plain
+tests/webtbs/tw7817b.pp svneol=native#text/plain
 tests/webtbs/ub1873.pp svneol=native#text/plain
 tests/webtbs/ub1883.pp svneol=native#text/plain
 tests/webtbs/uw0555.pp svneol=native#text/plain

+ 33 - 0
tests/webtbs/tw7817a.pp

@@ -0,0 +1,33 @@
+{ %norun }
+
+{$mode macpas}
+
+{$inline on}
+
+unit uw7817;
+
+interface
+
+type
+        CFByteOrder = longint;
+        UInt8Ptr = ^byte;
+        UInt32 = cardinal;
+const
+        CFByteOrderUnknown = 0;
+        CFByteOrderLittleEndian = 1;
+        CFByteOrderBigEndian = 2;
+
+
+function CFByteOrderGetCurrent: CFByteOrder; inline;
+
+implementation
+
+function CFByteOrderGetCurrent: CFByteOrder; inline;
+        var
+                x: UInt32 = (CFByteOrderBigEndian shl 24) or CFByteOrderLittleEndian;
+begin
+        CFByteOrderGetCurrent := CFByteOrder(UInt8Ptr(@x)^);
+end;
+
+end.
+

+ 13 - 0
tests/webtbs/tw7817b.pp

@@ -0,0 +1,13 @@
+{$mode macpas}
+
+{$inline on}
+
+uses
+  uw7817;
+
+var
+  byteorder: cfbyteorder;
+begin
+  byteOrder := CFByteOrderGetCurrent;
+end.
+