- removes 2.2.x bootstrapping stuff

git-svn-id: trunk@16465 -
This commit is contained in:
florian 2010-11-28 17:29:15 +00:00
parent b5e590e732
commit f15141a6f3
5 changed files with 3 additions and 2141 deletions

2
.gitattributes vendored
View File

@ -6703,10 +6703,8 @@ rtl/inc/varianth.inc svneol=native#text/plain
rtl/inc/variants.pp svneol=native#text/plain
rtl/inc/video.inc svneol=native#text/plain
rtl/inc/videoh.inc svneol=native#text/plain
rtl/inc/wstring22h.inc svneol=native#text/plain
rtl/inc/wstringh.inc svneol=native#text/plain
rtl/inc/wstrings.inc svneol=native#text/plain
rtl/inc/wustring22.inc svneol=native#text/plain
rtl/inc/wustrings.inc svneol=native#text/plain
rtl/linux/Makefile svneol=native#text/plain
rtl/linux/Makefile.fpc svneol=native#text/plain

View File

@ -372,15 +372,10 @@ function aligntoptr(p : pointer) : pointer;inline;
{$endif FPC_HAS_FEATURE_ANSISTRINGS}
{$ifdef FPC_HAS_FEATURE_WIDESTRINGS}
{ this is for bootstrappung with 2.2.x }
{$ifdef VER2_2}
{$i wustring22.inc}
{$else VER2_2}
{$ifndef FPC_WIDESTRING_EQUAL_UNICODESTRING}
{$i wstrings.inc}
{$endif FPC_WIDESTRING_EQUAL_UNICODESTRING}
{$i ustrings.inc}
{$endif VER2_2}
{$endif FPC_HAS_FEATURE_WIDESTRINGS}
{$i aliases.inc}

View File

@ -21,9 +21,9 @@
{$I-,Q-,H-,R-,V-}
{$mode objfpc}
{ At least 2.0.0 is required }
{$if defined(VER1) or defined(VER2_0) or defined(VER2_2_0) }
{$fatal You need at least FPC 2.2.2 to build this version of FPC}
{ At least 2.4.0 is required }
{$if defined(VER1) or defined(VER2_0) or defined(VER2_2) }
{$fatal You need at least FPC 2.4.0 to build this version of FPC}
{$endif}
{ Using inlining for small system functions/wrappers }
@ -80,12 +80,6 @@
{$define FPC_HAS_FEATURE_OBJECTIVEC1}
{$endif FPC_HAS_FEATURE_SUPPORT}
{$ifndef VER2_2}
{$ifndef FPC_HAS_UNICODESTRING}
{$error Building trunk is only supported when using the latest release as a starting compiler}
{$endif}
{$endif}
{****************************************************************************
Global Types and Constants
****************************************************************************}
@ -102,9 +96,7 @@ Type
Delphi allows chose of overloaded procedure depending
on Real <-> Double, so use type here, see also tw7425.pp (FK) }
{$ifndef FPUNONE}
{$ifndef VER2_0}
Real = type Double;
{$endif VER2_0}
{$endif}
{$ifdef CPUI386}
@ -363,10 +355,6 @@ Type
UnicodeChar = WideChar;
PUnicodeChar = ^UnicodeChar;
{$ifdef VER2_2}
{ this is only to avoid too much ifdefs in the code }
UnicodeString = type WideString;
{$endif VER2_2}
PUnicodeString = ^UnicodeString;
{ Needed for fpc_get_output }
@ -876,14 +864,10 @@ function lowercase(const s : ansistring) : ansistring;
****************************************************************************}
{$ifdef FPC_HAS_FEATURE_WIDESTRINGS}
{$ifdef VER2_2}
{$i wstring22h.inc}
{$else VER2_2}
{$i ustringh.inc}
{$ifndef FPC_WIDESTRING_EQUAL_UNICODESTRING}
{$i wstringh.inc}
{$endif FPC_WIDESTRING_EQUAL_UNICODESTRING}
{$endif VER2_2}
{$endif FPC_HAS_FEATURE_WIDESTRINGS}

View File

@ -1,108 +0,0 @@
{
This file is part of the Free Pascal run time library.
Copyright (c) 1999-2005 by Florian Klaempfl,
member of the Free Pascal development team.
This file implements support routines for WideStrings with FPC 2.2
See the file COPYING.FPC, included in this distribution,
for details about the copyright.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
**********************************************************************}
{ this file can be removed when the 2.2.x series is outdated }
Procedure UniqueString (Var S : WideString);external name 'FPC_WIDESTR_UNIQUE';
Function Pos (Const Substr : WideString; Const Source : WideString) : SizeInt;
Function Pos (c : Char; Const s : WideString) : SizeInt;
Function Pos (c : WideChar; Const s : WideString) : SizeInt;
Function Pos (c : WideChar; Const s : AnsiString) : SizeInt;
Function Pos (c : AnsiString; Const s : WideString) : SizeInt;{$ifdef SYSTEMINLINE}inline;{$endif}
Function Pos (c : WideString; Const s : AnsiString) : SizeInt;{$ifdef SYSTEMINLINE}inline;{$endif}
Function Pos (c : ShortString; Const s : WideString) : SizeInt;{$ifdef SYSTEMINLINE}inline;{$endif}
Function UpCase(const s : WideString) : WideString;
Procedure Insert (Const Source : WideString; Var S : WideString; Index : SizeInt);
Procedure Delete (Var S : WideString; Index,Size: SizeInt);
Procedure SetString (Out S : WideString; Buf : PWideChar; Len : SizeInt);
Procedure SetString (Out S : WideString; Buf : PChar; Len : SizeInt);
function WideCharToString(S : PWideChar) : AnsiString;
function StringToWideChar(const Src : AnsiString;Dest : PWideChar;DestSize : SizeInt) : PWideChar;
function WideCharLenToString(S : PWideChar;Len : SizeInt) : AnsiString;
procedure WideCharLenToStrVar(Src : PWideChar;Len : SizeInt;out Dest : AnsiString);
procedure WideCharToStrVar(S : PWideChar;out Dest : AnsiString);
procedure DefaultWide2AnsiMove(source:pwidechar;var dest:ansistring;len:SizeInt);
procedure DefaultAnsi2WideMove(source:pchar;var dest:widestring;len:SizeInt);
Type
{ hooks for internationalization
please add new procedures at the end, it makes it easier to detect new procedures }
TWideStringManager = record
Wide2AnsiMoveProc : procedure(source:pwidechar;var dest:ansistring;len:SizeInt);
Ansi2WideMoveProc : procedure(source:pchar;var dest:widestring;len:SizeInt);
// UpperUTF8 : procedure(p:PUTF8String);
UpperWideStringProc : function(const S: WideString): WideString;
// UpperUCS4 : procedure(p:PUCS4Char);
// LowerUTF8 : procedure(p:PUTF8String);
LowerWideStringProc : function(const S: WideString): WideString;
// LowerUCS4 : procedure(p:PUCS4Char);
{
CompUTF8 : function(p1,p2:PUTF8String) : shortint;
CompUCS2 : function(p1,p2:PUCS2Char) : shortint;
CompUCS4 : function(p1,p2:PUC42Char) : shortint;
}
CompareWideStringProc : function(const s1, s2 : WideString) : PtrInt;
CompareTextWideStringProc : function(const s1, s2 : WideString): PtrInt;
CharLengthPCharProc : function(const Str: PChar): PtrInt;
UpperAnsiStringProc : function(const s : ansistring) : ansistring;
LowerAnsiStringProc : function(const s : ansistring) : ansistring;
CompareStrAnsiStringProc : function(const S1, S2: ansistring): PtrInt;
CompareTextAnsiStringProc : function(const S1, S2: ansistring): PtrInt;
StrCompAnsiStringProc : function(S1, S2: PChar): PtrInt;
StrICompAnsiStringProc : function(S1, S2: PChar): PtrInt;
StrLCompAnsiStringProc : function(S1, S2: PChar; MaxLen: PtrUInt): PtrInt;
StrLICompAnsiStringProc : function(S1, S2: PChar; MaxLen: PtrUInt): PtrInt;
StrLowerAnsiStringProc : function(Str: PChar): PChar;
StrUpperAnsiStringProc : function(Str: PChar): PChar;
ThreadInitProc : procedure;
ThreadFiniProc : procedure;
end;
TUnicodeStringManager = TWideStringManager;
function UnicodeToUtf8(Dest: PChar; Source: PWideChar; MaxBytes: SizeInt): SizeInt;{$ifdef SYSTEMINLINE}inline;{$endif}
function UnicodeToUtf8(Dest: PChar; MaxDestBytes: SizeUInt; Source: PWideChar; SourceChars: SizeUInt): SizeUInt;
function Utf8ToUnicode(Dest: PWideChar; Source: PChar; MaxChars: SizeInt): SizeInt;{$ifdef SYSTEMINLINE}inline;{$endif}
function Utf8ToUnicode(Dest: PWideChar; MaxDestChars: SizeUInt; Source: PChar; SourceBytes: SizeUInt): SizeUInt;
function UTF8Encode(const s : WideString) : UTF8String;
function UTF8Decode(const s : UTF8String): WideString;
function AnsiToUtf8(const s : ansistring): UTF8String;{$ifdef SYSTEMINLINE}inline;{$endif}
function Utf8ToAnsi(const s : UTF8String) : ansistring;{$ifdef SYSTEMINLINE}inline;{$endif}
function WideStringToUCS4String(const s : WideString) : UCS4String;
function UCS4StringToWideString(const s : UCS4String) : WideString;
{$ifdef MSWINDOWS}
const
winwidestringalloc : boolean = true;
{$endif MSWINDOWS}
var
widestringmanager : TWideStringManager;
Procedure GetWideStringManager (Var Manager : TWideStringManager);
Procedure SetWideStringManager (Const New : TWideStringManager);
Procedure SetWideStringManager (Const New : TWideStringManager; Var Old: TWideStringManager);
Procedure GetUnicodeStringManager (Var Manager : TUnicodeStringManager);
Procedure SetUnicodeStringManager (Const New : TUnicodeStringManager);
Procedure SetUnicodeStringManager (Const New : TUnicodeStringManager; Var Old: TUnicodeStringManager);

File diff suppressed because it is too large Load Diff