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

« back to all changes in this revision

Viewing changes to fpcsrc/tests/webtbs/tw2300.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
{ Source provided for Free Pascal Bug Report 2300 }
 
2
{ Submitted by "Sergey Kosarevsky" on  2002-12-30 }
 
3
{ e-mail: netsurfer@au.ru }
 
4
Unit tw2300;
 
5
Interface
 
6
Const LONG_STR_SIZE=4096;
 
7
Type tLongStr=Object
 
8
        LStr:Array[1..LONG_STR_SIZE] Of Char;
 
9
        LLength:Longint;
 
10
     End;
 
11
Operator := (S:String) R:tLongStr;
 
12
Operator := (S:tLongStr) R:pChar;
 
13
Operator + (S1:tLongStr;S2:String) R:tLongStr;
 
14
Operator + (S1:String;S2:tLongStr) R:tLongStr;
 
15
Operator + (S1:tLongStr;S2:pChar ) R:tLongStr;
 
16
Implementation
 
17
Operator := (S:String) R:tLongStr;
 
18
Begin
 
19
   R.LLength:=Length(S);
 
20
   Move(S[1],R.LStr[1],Length(S));
 
21
End;
 
22
Operator := (S:tLongStr) R:pChar;
 
23
Begin
 
24
   S.LStr[S.LLength+1]:=#0;
 
25
   R:=pChar(@(S.LStr[1]));
 
26
End;
 
27
Operator + (S1:tLongStr;S2:String) R:tLongStr;
 
28
Begin
 
29
   R.LLength:=S1.LLength+Length(S2);
 
30
   Move(S1.LStr[1],R.LStr[1],S1.LLength);
 
31
   Move(S2[1],R.LStr[S1.LLength+1],Length(S2));
 
32
End;
 
33
Operator + (S1:String;S2:tLongStr) R:tLongStr;
 
34
Begin
 
35
   R.LLength:=Length(S1)+S2.LLength;
 
36
   Move(S1[1],R.LStr[1],Length(S1));
 
37
   Move(S2.LStr[1],R.LStr[Length(S1)+1],S2.LLength);
 
38
End;
 
39
Operator + (S1:tLongStr;S2:pChar) R:tLongStr;
 
40
Begin
 
41
   R.LLength:=S1.LLength+StrLen(S2);
 
42
   Move(S1.LStr[1],R.LStr[1],S1.LLength);
 
43
   Move(S2^,R.LStr[S1.LLength+1],StrLen(S2));
 
44
End;
 
45
Begin
 
46
End.