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

« back to all changes in this revision

Viewing changes to fpcsrc/rtl/inc/cgenstr.inc

  • 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
{
 
2
    This file is part of the Free Pascal run time library.
 
3
    Copyright (c) 1999-2000 by Carl-Eric Codere,
 
4
    member of the Free Pascal development team.
 
5
 
 
6
    See the file COPYING.FPC, included in this distribution,
 
7
    for details about the copyright.
 
8
 
 
9
    This program is distributed in the hope that it will be useful,
 
10
    but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
12
 
 
13
 **********************************************************************}
 
14
 
 
15
{ we have to call the libc routines, because simply declaring our routines }
 
16
{ as cdecl and external in libc cause problems because the calling         }
 
17
{ convention the interface is different                                    }
 
18
 
 
19
{$ifndef FPC_UNIT_HAS_STREND}
 
20
{$define FPC_UNIT_HAS_STREND}
 
21
 
 
22
 function StrEnd(P: PChar): PChar;{$ifdef SYSTEMINLINE}inline;{$endif}
 
23
   begin
 
24
     strend := p+strlen(p);
 
25
   end;
 
26
{$endif FPC_UNIT_HAS_STREND}
 
27
 
 
28
 
 
29
{$ifndef FPC_UNIT_HAS_STRCOPY}
 
30
{$define FPC_UNIT_HAS_STRCOPY}
 
31
 function libc_strcpy(dest: pchar; const src: pchar): pchar; cdecl; external 'c' name 'strcpy';
 
32
 
 
33
 Function StrCopy(Dest, Source:PChar): PChar;{$ifdef SYSTEMINLINE}inline;{$endif}
 
34
   Begin
 
35
     StrCopy := libc_strcpy(dest,source);
 
36
   end;
 
37
{$endif FPC_UNIT_HAS_STRCOPY}
 
38
 
 
39
 
 
40
{$ifndef FPC_UNIT_HAS_STRSCAN}
 
41
{$define FPC_UNIT_HAS_STRSCAN}
 
42
 function libc_strchr(const p: pchar; c: longint): pchar; cdecl; external 'c' name 'strchr';
 
43
 
 
44
 function StrScan(P: PChar; C: Char): PChar;{$ifdef SYSTEMINLINE}inline;{$endif}
 
45
   Begin
 
46
     StrScan := libc_strchr(p,longint(c));
 
47
   end;
 
48
{$endif FPC_UNIT_HAS_STRSCAN}
 
49
 
 
50
 
 
51
{$ifndef FPC_UNIT_HAS_STRRSCAN}
 
52
{$define FPC_UNIT_HAS_STRRSCAN}
 
53
 function libc_strrchr(const p: pchar; c: longint): pchar; cdecl; external 'c' name 'strrchr';
 
54
 
 
55
 function StrRScan(P: PChar; C: Char): PChar;{$ifdef SYSTEMINLINE}inline;{$endif}
 
56
   Begin
 
57
     StrRScan := libc_strrchr(p,longint(c));
 
58
   end;
 
59
{$endif FPC_UNIT_HAS_STRRSCAN}
 
60
 
 
61
(*
 
62
{$ifndef FPC_UNIT_HAS_STRECOPY}
 
63
{$define FPC_UNIT_HAS_STRECOPY}
 
64
 function libc_stpcpy(dest: pchar; const src: pchar): pchar; cdecl; external 'c' name 'stpcpy';
 
65
 
 
66
  Function StrECopy(Dest, Source: PChar): PChar;{$ifdef SYSTEMINLINE}inline;{$endif}
 
67
    Begin
 
68
      StrECopy := libc_stpcpy(dest,source);
 
69
    end;
 
70
{$endif FPC_UNIT_HAS_STRECOPY}
 
71
*)
 
72
 
 
73
(*
 
74
{$ifndef FPC_UNIT_HAS_STRLCOPY}
 
75
{$define FPC_UNIT_HAS_STRLCOPY}
 
76
 
 
77
 function libc_strlcpy(dest: pchar; const src: pchar; maxlen: SizeInt): SizeInt; cdecl; external 'c' name 'strlcpy';
 
78
 
 
79
 Function StrLCopy(Dest,Source: PChar; MaxLen: SizeInt): PChar;{$ifdef SYSTEMINLINE}inline;{$endif}
 
80
   Begin
 
81
     libc_strlcpy(dest,source,maxlen);
 
82
     StrLCopy := Dest;
 
83
   end;
 
84
{$endif FPC_UNIT_HAS_STRLCOPY}
 
85
*)
 
86
 
 
87
{$ifndef FPC_UNIT_HAS_STRCOMP}
 
88
{$define FPC_UNIT_HAS_STRCOMP}
 
89
 function libc_strcmp(const str1,str2: pchar): longint; cdecl; external 'c' name 'strcmp';
 
90
 
 
91
 function StrComp(Str1, Str2 : PChar): SizeInt;{$ifdef SYSTEMINLINE}inline;{$endif}
 
92
   Begin
 
93
     strcomp := libc_strcmp(str1,str2);
 
94
   end;
 
95
{$endif FPC_UNIT_HAS_STRCOMP}
 
96
 
 
97
 
 
98
{$ifndef FPC_UNIT_HAS_STRICOMP}
 
99
{$define FPC_UNIT_HAS_STRICOMP}
 
100
 function libc_strcasecmp(const str1,str2: pchar): longint; cdecl; external 'c' name 'strcasecmp';
 
101
 
 
102
 function StrIComp(Str1, Str2 : PChar): SizeInt;{$ifdef SYSTEMINLINE}inline;{$endif}
 
103
   Begin
 
104
     stricomp := libc_strcasecmp(str1,str2);
 
105
   end;
 
106
{$endif FPC_UNIT_HAS_STRICOMP}
 
107
 
 
108
 
 
109
{$ifndef FPC_UNIT_HAS_STRLCOMP}
 
110
{$define FPC_UNIT_HAS_STRLCOMP}
 
111
 function libc_strncmp(const str1,str2: pchar; l: Cardinal): longint; cdecl; external 'c' name 'strncmp';
 
112
 
 
113
 function StrLComp(Str1, Str2 : PChar; L: SizeInt): SizeInt;{$ifdef SYSTEMINLINE}inline;{$endif}
 
114
   Begin
 
115
     strlcomp := libc_strncmp(str1,str2,l);
 
116
   end;
 
117
{$endif FPC_UNIT_HAS_STRLCOMP}
 
118
 
 
119
 
 
120
{$ifndef FPC_UNIT_HAS_STRLICOMP}
 
121
{$define FPC_UNIT_HAS_STRLICOMP}
 
122
 function libc_strncasecmp(const str1,str2: pchar; l: Cardinal): longint; cdecl; external 'c' name 'strncasecmp';
 
123
 
 
124
 function StrLIComp(Str1, Str2 : PChar; L: SizeInt): SizeInt;{$ifdef SYSTEMINLINE}inline;{$endif}
 
125
   Begin
 
126
     strlicomp := libc_strncasecmp(str1,str2,l);
 
127
   end;
 
128
{$endif FPC_UNIT_HAS_STRLICOMP}
 
129
 
 
130