+ Merged revision 241

git-svn-id: branches/fixes_2_0@243 -
This commit is contained in:
michael 2005-06-07 20:43:18 +00:00
parent e71ac7f647
commit 0b6ef7f14e
21 changed files with 0 additions and 72 deletions

View File

@ -542,7 +542,5 @@ begin
{$ifdef HASVARIANT}
initvariantmanager;
{$endif HASVARIANT}
{$ifdef HASWIDESTRING}
initwidestringmanager;
{$endif HASWIDESTRING}
end.

View File

@ -257,7 +257,5 @@ Begin
{$ifdef HASVARIANT}
initvariantmanager;
{$endif HASVARIANT}
{$ifdef HASWIDESTRING}
initwidestringmanager;
{$endif HASWIDESTRING}
End.

View File

@ -651,7 +651,5 @@ Begin
{$ifdef HASVARIANT}
initvariantmanager;
{$endif HASVARIANT}
{$ifdef HASWIDESTRING}
initwidestringmanager;
{$endif HASWIDESTRING}
End.

View File

@ -177,11 +177,9 @@ Procedure fpc_WideStr_CheckRange(len,index : SizeInt); compilerproc;
Procedure fpc_WideStr_SetLength (Var S : WideString; l : SizeInt); compilerproc;
function fpc_widestr_Unique(Var S : Pointer): Pointer; compilerproc;
{$ifdef HASWIDECHAR}
Function fpc_PWideChar_To_AnsiStr(const p : pwidechar): ansistring; compilerproc;
Function fpc_PWideChar_To_WideStr(const p : pwidechar): widestring; compilerproc;
Function fpc_PWideChar_To_ShortStr(const p : pwidechar): shortstring; compilerproc;
{$endif HASWIDECHAR}
{ from text.inc }
Function fpc_get_input:PText;{$ifdef hascompilerproc}compilerproc;{$endif}
@ -192,9 +190,7 @@ Procedure fpc_Write_Text_ShortStr(Len : Longint;var f : Text;const s : String);
Procedure fpc_Write_Text_Pchar_as_Array(Len : Longint;var f : Text;const s : array of char); compilerproc;
Procedure fpc_Write_Text_PChar_As_Pointer(Len : Longint;var f : Text;p : PChar); compilerproc;
Procedure fpc_Write_Text_AnsiStr (Len : Longint; Var f : Text; S : AnsiString); compilerproc;
{$ifdef HASWIDESTRING}
Procedure fpc_Write_Text_WideStr (Len : Longint; Var f : Text; S : WideString); compilerproc;
{$endif HASWIDESTRING}
Procedure fpc_Write_Text_SInt(Len : Longint;var t : Text;l : ValSInt); compilerproc;
Procedure fpc_Write_Text_UInt(Len : Longint;var t : Text;l : ValUInt); compilerproc;
{$ifndef CPU64}
@ -204,9 +200,7 @@ procedure fpc_write_text_int64(len : longint;var t : text;i : int64); compilerpr
Procedure fpc_Write_Text_Float(rt,fixkomma,Len : Longint;var t : Text;r : ValReal); compilerproc;
Procedure fpc_Write_Text_Boolean(Len : Longint;var t : Text;b : Boolean); compilerproc;
Procedure fpc_Write_Text_Char(Len : Longint;var t : Text;c : Char); compilerproc;
{$ifdef HASWIDECHAR}
Procedure fpc_Write_Text_WideChar(Len : Longint;var t : Text;c : WideChar); compilerproc;
{$endif HASWIDECHAR}
{$ifdef HASVARIANT}
procedure fpc_variant_copy(d,s : pointer);compilerproc;

View File

@ -762,7 +762,6 @@ end;
{$endif ndef FPC_SYSTEM_HAS_FPC_PCHAR_LENGTH}
{$ifdef HASWIDESTRING}
{$ifndef FPC_SYSTEM_HAS_FPC_PWIDECHAR_LENGTH}
function fpc_pwidechar_length(p:pwidechar):longint;[public,alias:'FPC_PWIDECHAR_LENGTH']; {$ifdef hascompilerproc} compilerproc; {$endif}
@ -774,7 +773,6 @@ begin
end;
{$endif ndef FPC_SYSTEM_HAS_FPC_PWIDECHAR_LENGTH}
{$endif HASWIDESTRING}
{****************************************************************************
Caller/StackFrame Helpers

View File

@ -152,13 +152,11 @@ begin
fpc_AnsiStr_Decr_Ref(PPointer(Data)^);
PPointer(Data)^:=nil;
end;
{$ifdef HASWIDESTRING}
tkWstring :
begin
fpc_WideStr_Decr_Ref(PPointer(Data)^);
PPointer(Data)^:=nil;
end;
{$endif HASWIDESTRING}
tkArray :
arrayrtti(data,typeinfo,@int_finalize);
tkObject,
@ -184,10 +182,8 @@ begin
case PByte(TypeInfo)^ of
tkAstring :
fpc_AnsiStr_Incr_Ref(PPointer(Data)^);
{$ifdef HASWIDESTRING}
tkWstring :
fpc_WideStr_Incr_Ref(PPointer(Data)^);
{$endif HASWIDESTRING}
tkArray :
arrayrtti(data,typeinfo,@int_addref);
tkobject,
@ -215,10 +211,8 @@ begin
{ see AddRef for comment about below construct (JM) }
tkAstring:
fpc_AnsiStr_Decr_Ref(PPointer(Data)^);
{$ifdef HASWIDESTRING}
tkWstring:
fpc_WideStr_Decr_Ref(PPointer(Data)^);
{$endif HASWIDESTRING}
tkArray:
arrayrtti(data,typeinfo,@fpc_systemDecRef);
tkobject,

View File

@ -259,9 +259,7 @@ end;
{Requires int64.inc, since that contains the VAL functions for int64 and qword}
{$i astrings.inc}
{$ifdef HASWIDESTRING}
{$i wstrings.inc}
{$endif HASWIDESTRING}
{$i aliases.inc}

View File

@ -267,20 +267,12 @@ Type
POleVariant = ^OleVariant;
{$endif HASVARIANT}
{$ifdef HASWIDECHAR}
PWideChar = ^WideChar;
PPWideChar = ^PWideChar;
{ 1.0.x also has HASWIDECHAR defined, but doesn't support it
fully, setting WChar to Word as fallback (PFV) }
WChar = Widechar;
UCS2Char = WideChar;
PUCS2Char = PWideChar;
{$else}
WChar = Word;
{$endif HASWIDECHAR}
{$ifdef HASWIDESTRING}
PWideString = ^WideString;
{$endif HASWIDESTRING}
{ Needed for fpc_get_output }
PText = ^Text;
@ -551,9 +543,7 @@ function lowercase(const s : ansistring) : ansistring;
WideString Handling
****************************************************************************}
{$ifdef HASWIDESTRING}
{$i wstringh.inc}
{$endif HASWIDESTRING}
{****************************************************************************

View File

@ -608,7 +608,6 @@ begin
end;
{$ifdef HASWIDESTRING}
Procedure fpc_Write_Text_WideStr (Len : Longint; Var f : Text; S : WideString); iocheck; [Public,alias:'FPC_WRITE_TEXT_WIDESTR']; {$ifdef hascompilerproc} compilerproc; {$endif}
{
Writes a WideString to the Text file T
@ -630,7 +629,6 @@ begin
else InOutRes:=103;
end;
end;
{$endif HASWIDESTRING}
Procedure fpc_Write_Text_SInt(Len : Longint;var t : Text;l : ValSInt); iocheck; [Public,Alias:'FPC_WRITE_TEXT_SINT']; {$ifdef hascompilerproc} compilerproc; {$endif}
var
@ -722,7 +720,6 @@ Begin
End;
{$ifdef HASWIDECHAR}
Procedure fpc_Write_Text_WideChar(Len : Longint;var t : Text;c : WideChar); iocheck; [Public,Alias:'FPC_WRITE_TEXT_WIDECHAR']; {$ifdef hascompilerproc} compilerproc; {$endif}
var
ch : char;
@ -745,7 +742,6 @@ Begin
TextRec(t).Bufptr^[TextRec(t).BufPos]:=ch;
Inc(TextRec(t).BufPos);
End;
{$endif HASWIDECHAR}
{*****************************************************************************

View File

@ -246,7 +246,5 @@ Begin
{$ifdef HASVARIANT}
initvariantmanager;
{$endif HASVARIANT}
{$ifdef HASWIDESTRING}
initwidestringmanager;
{$endif HASWIDESTRING}
End.

View File

@ -545,9 +545,7 @@ begin
{$ifdef HASVARIANT}
initvariantmanager;
{$endif HASVARIANT}
{$ifdef HASWIDESTRING}
initwidestringmanager;
{$endif HASWIDESTRING}
if StandAlone = 0 then
begin

View File

@ -328,7 +328,5 @@ begin
{$ifdef HASVARIANT}
initvariantmanager;
{$endif HASVARIANT}
{$ifdef HASWIDESTRING}
initwidestringmanager;
{$endif HASWIDESTRING}
end.

View File

@ -482,7 +482,5 @@ Begin
{$ifdef HASVARIANT}
initvariantmanager;
{$endif HASVARIANT}
{$ifdef HASWIDESTRING}
initwidestringmanager;
{$endif HASWIDESTRING}
End.

View File

@ -553,7 +553,5 @@ Begin
{$ifdef HASVARIANT}
initvariantmanager;
{$endif HASVARIANT}
{$ifdef HASWIDESTRING}
initwidestringmanager;
{$endif HASWIDESTRING}
End.

View File

@ -1915,9 +1915,7 @@ end;
Function StrCharLength(const Str: PChar): Integer;
begin
{$ifdef HASWIDESTRING}
result:=widestringmanager.CharLengthPCharProc(Str);
{$endif HASWIDESTRING}
end;

View File

@ -226,12 +226,10 @@ Function GetStrProp(Instance: TObject; const PropName: string): string;
Procedure SetStrProp(Instance: TObject; const PropName: string; const Value: AnsiString);
Procedure SetStrProp(Instance: TObject; PropInfo : PPropInfo; const Value : Ansistring);
{$ifdef HASWIDESTRING}
Function GetWideStrProp(Instance: TObject; PropInfo: PPropInfo): WideString;
Function GetWideStrProp(Instance: TObject; const PropName: string): WideString;
Procedure SetWideStrProp(Instance: TObject; const PropName: string; const Value: WideString);
Procedure SetWideStrProp(Instance: TObject; PropInfo: PPropInfo; const Value: WideString);
{$endif HASWIDESTRING}
Function GetFloatProp(Instance: TObject; PropInfo : PPropInfo) : Extended;
Function GetFloatProp(Instance: TObject; const PropName: string): Extended;
@ -1005,10 +1003,8 @@ var
begin
Result:='';
case Propinfo^.PropType^.Kind of
{$ifdef HASWIDESTRING}
tkWString:
Result:=GetWideStrProp(Instance,PropInfo);
{$endif HASWIDESTRING}
tkSString:
begin
case (PropInfo^.PropProcs) and 3 of
@ -1063,10 +1059,8 @@ var
AMethod : TMethod;
begin
case Propinfo^.PropType^.Kind of
{$ifdef HASWIDESTRING}
tkWString:
SetWideStrProp(Instance,PropInfo,Value);
{$endif HASWIDESTRING}
tkSString:
begin
case (PropInfo^.PropProcs shr 2) and 3 of
@ -1123,7 +1117,6 @@ begin
end;
{$ifdef HASWIDESTRING}
Function GetWideStrProp(Instance: TObject; const PropName: string): WideString;
begin
Result:=GetWideStrProp(Instance, FindPropInfo(Instance, PropName));
@ -1204,7 +1197,6 @@ begin
end;
end;
{$endif HASWIDESTRING}
{ ---------------------------------------------------------------------

View File

@ -227,7 +227,5 @@ Begin
{$ifdef HASVARIANT}
initvariantmanager;
{$endif HASVARIANT}
{$ifdef HASWIDESTRING}
initwidestringmanager;
{$endif HASWIDESTRING}
End.

View File

@ -19,13 +19,10 @@ unit cwstring;
interface
{$ifdef HASWIDESTRING}
procedure SetCWidestringManager;
{$endif HASWIDESTRING}
implementation
{$ifdef HASWIDESTRING}
{$linklib c}
Uses
@ -244,4 +241,3 @@ initialization
finalization
iconv_close(iconv_ansi2wide);
end.
{$endif HASWIDESTRING}

View File

@ -1532,7 +1532,5 @@ Begin
{$ifdef HASVARIANT}
initvariantmanager;
{$endif HASVARIANT}
{$ifdef HASWIDESTRING}
initwidestringmanager;
{$endif HASWIDESTRING}
End.

View File

@ -910,7 +910,6 @@ end;
{$endif Set_i386_Exception_handler}
{$ifdef HASWIDESTRING}
{****************************************************************************
OS dependend widestrings
****************************************************************************}
@ -945,7 +944,6 @@ procedure InitWin32Widestrings;
widestringmanager.LowerWideStringProc:=@Win32WideLower;
end;
{$endif HASWIDESTRING}
{****************************************************************************
@ -1097,8 +1095,6 @@ begin
{$ifdef HASVARIANT}
initvariantmanager;
{$endif HASVARIANT}
{$ifdef HASWIDESTRING}
initwidestringmanager;
InitWin32Widestrings
{$endif HASWIDESTRING}
end.

View File

@ -995,7 +995,6 @@ end;
Target Dependent WideString stuff
****************************************************************************}
{$ifdef HASWIDESTRING}
function Win32CompareWideString(const s1, s2 : WideString) : PtrInt;
begin
@ -1103,13 +1102,10 @@ procedure InitWin32Widestrings;
widestringmanager.CompareTextWideStringProc:=@Win32CompareTextWideString;
end;
{$endif HASWIDESTRING}
Initialization
{$ifdef HASWIDESTRING}
InitWin32Widestrings;
{$endif HASWIDESTRING}
InitExceptions; { Initialize exceptions. OS independent }
InitInternational; { Initialize internationalization settings }
LoadVersionInfo;