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

« back to all changes in this revision

Viewing changes to fpcsrc/rtl/inc/stringsi.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 the Free Pascal development team
 
4
 
 
5
    Processor independent part for strings and sysutils units
 
6
 
 
7
    See the file COPYING.FPC, included in this distribution,
 
8
    for details about the copyright.
 
9
 
 
10
    This program is distributed in the hope that it will be useful,
 
11
    but WITHOUT ANY WARRANTY; without even the implied warranty of
 
12
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
13
 
 
14
 **********************************************************************}
 
15
 
 
16
    function strcat(dest,source : pchar) : pchar;
 
17
 
 
18
      begin
 
19
        strcopy(strend(dest),source);
 
20
        strcat:=dest;
 
21
      end;
 
22
 
 
23
    function strlcat(dest,source : pchar;l : SizeInt) : pchar;
 
24
 
 
25
      var
 
26
         destend : pchar;
 
27
 
 
28
      begin
 
29
         destend:=strend(dest);
 
30
         dec(l,destend-dest);
 
31
         if l>0 then
 
32
          strlcopy(destend,source,l);
 
33
         strlcat:=dest;
 
34
      end;
 
35
 
 
36
    function strmove(dest,source : pchar;l : SizeInt) : pchar;
 
37
 
 
38
      begin
 
39
         move(source^,dest^,l);
 
40
         strmove:=dest;
 
41
      end;
 
42
 
 
43
 
 
44
    function strpos(str1,str2 : pchar) : pchar;
 
45
      var
 
46
         p : pchar;
 
47
         lstr2 : SizeInt;
 
48
      begin
 
49
         strpos:=nil;
 
50
         if (str1 = nil) or (str2 = nil) then
 
51
           exit;
 
52
         p:=strscan(str1,str2^);
 
53
         if p=nil then
 
54
           exit;
 
55
         lstr2:=strlen(str2);
 
56
         while p<>nil do
 
57
           begin
 
58
              if strlcomp(p,str2,lstr2)=0 then
 
59
                begin
 
60
                   strpos:=p;
 
61
                   exit;
 
62
                end;
 
63
              inc(p);
 
64
              p:=strscan(p,str2^);
 
65
           end;
 
66
      end;
 
67