~ubuntu-branches/debian/lenny/fpc/lenny

« back to all changes in this revision

Viewing changes to fpcsrc/tests/webtbs/tw4234.pp

  • Committer: Bazaar Package Importer
  • Author(s): Mazen Neifer, Torsten Werner, Mazen Neifer
  • Date: 2008-05-17 17:12:11 UTC
  • mfrom: (3.1.9 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080517171211-9qi33xhd9evfa0kg
Tags: 2.2.0-dfsg1-9
[ Torsten Werner ]
* Add Mazen Neifer to Uploaders field.

[ Mazen Neifer ]
* Moved FPC sources into a version dependent directory from /usr/share/fpcsrc
  to /usr/share/fpcsrc/${FPCVERSION}. This allow installing more than on FPC
  release.
* Fixed far call issue in compiler preventing building huge binearies.
  (closes: #477743)
* Updated building dependencies, recomennded and suggested packages.
* Moved fppkg to fp-utils as it is just a helper tool and is not required by
  compiler.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
{ %opt=-O2 }
 
2
 
 
3
{$mode objfpc}
 
4
 
 
5
type
 
6
  TFPColor = record
 
7
    red,green,blue,alpha : word;
 
8
  end;
 
9
  TColorData = qword;
 
10
 
 
11
  tcl=class
 
12
    function ColorColorAlpha16 (CD:TColorData) : TFPColor;
 
13
  end;
 
14
 
 
15
function tcl.ColorColorAlpha16 (CD:TColorData) : TFPColor;
 
16
var c : qword;
 
17
begin
 
18
with result do
 
19
begin
 
20
red := CD and $FFFF;
 
21
c := qword($FFFF0000);
 
22
green := (CD and c) shr 16;
 
23
c := c shl 16;
 
24
blue := (CD and c) shr 32;
 
25
c := c shl 16;
 
26
alpha := (CD and c) shr 48;
 
27
end;
 
28
end;
 
29
 
 
30
var
 
31
  cd  : tcolordata;
 
32
  c : tcl;
 
33
begin
 
34
  cd:=$1234;
 
35
  c:=tcl.create;
 
36
  c.colorcoloralpha16(cd);
 
37
end.