~ubuntu-branches/ubuntu/lucid/fpc/lucid-proposed

« back to all changes in this revision

Viewing changes to fpcsrc/tests/test/cg/tcase2.pp

  • Committer: Bazaar Package Importer
  • Author(s): Mazen Neifer, Torsten Werner, Mazen Neifer
  • Date: 2008-10-09 23:29:00 UTC
  • mfrom: (4.1.1 sid)
  • Revision ID: james.westby@ubuntu.com-20081009232900-553f61m37jkp6upv
Tags: 2.2.2-4
[ Torsten Werner ]
* Update ABI version in fpc-depends automatically.
* Remove empty directories from binary package fpc-source.

[ Mazen Neifer ]
* Removed leading path when calling update-alternatives to remove a Linitian
  error.
* Fixed clean target.
* Improved description of packages. (Closes: #498882)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
    const
 
2
       maxsmallint = high(smallint);
 
3
       { error codes }
 
4
       grOk =  0;
 
5
       grNoInitGraph = -1;
 
6
       grNotDetected = -2;
 
7
       grFileNotFound = -3;
 
8
       grInvalidDriver = -4;
 
9
       grNoLoadMem = -5;
 
10
       grNoScanMem = -6;
 
11
       grNoFloodMem = -7;
 
12
       grFontNotFound = -8;
 
13
       grNoFontMem = -9;
 
14
       grInvalidMode = -10;
 
15
       grError = -11;
 
16
       grIOerror = -12;
 
17
       grInvalidFont = -13;
 
18
       grInvalidFontNum = -14;
 
19
       grInvalidVersion = -18;
 
20
 
 
21
function GraphErrorMsg(ErrorCode: smallint): string;
 
22
Begin
 
23
 GraphErrorMsg:='';
 
24
 case ErrorCode of
 
25
  grOk,grFileNotFound,grInvalidDriver: exit;
 
26
  grNoInitGraph: GraphErrorMsg:='Graphics driver not installed';
 
27
  grNotDetected: GraphErrorMsg:='Graphics hardware not detected';
 
28
  grNoLoadMem,grNoScanMem,grNoFloodMem: GraphErrorMsg := 'Not enough memory for graphics';
 
29
  grNoFontMem: GraphErrorMsg := 'Not enough memory to load font';
 
30
  grFontNotFound: GraphErrorMsg:= 'Font file not found';
 
31
  grInvalidMode: GraphErrorMsg := 'Invalid graphics mode';
 
32
  grError: GraphErrorMsg:='Graphics error';
 
33
  grIoError: GraphErrorMsg:='Graphics I/O error';
 
34
  grInvalidFont,grInvalidFontNum: GraphErrorMsg := 'Invalid font';
 
35
  grInvalidVersion: GraphErrorMsg:='Invalid driver version';
 
36
 end;
 
37
end;
 
38
 
 
39
begin
 
40
  if GraphErrorMsg(grNoInitGraph) <> 'Graphics driver not installed' then
 
41
    halt(1);
 
42
end.