From baad29373ec0347dde8db870a1cece9aff3e517f Mon Sep 17 00:00:00 2001 From: Jonas Maebe Date: Sat, 20 Aug 2011 08:10:54 +0000 Subject: [PATCH] + ansistr_to_shortstr and vice versa stub helpers git-svn-id: branches/jvmbackend@18564 - --- rtl/java/astrings.inc | 16 ++++++++++++---- rtl/java/compproc.inc | 8 +++++--- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/rtl/java/astrings.inc b/rtl/java/astrings.inc index 0e578de168..4cc21eabc9 100644 --- a/rtl/java/astrings.inc +++ b/rtl/java/astrings.inc @@ -218,14 +218,17 @@ begin end; {$else FPC_STRTOSHORTSTRINGPROC} - +*) procedure fpc_AnsiStr_To_ShortStr (out res: shortstring; const S2 : Ansistring);[Public, alias: 'FPC_ANSISTR_TO_SHORTSTR']; compilerproc; { Converts a AnsiString to a ShortString; } +(* Var Size : SizeInt; +*) begin +(* if S2='' then res:='' else @@ -236,24 +239,29 @@ begin Move (S2[1],res[1],Size); byte(res[0]):=byte(Size); end; +*) end; - +(* {$endif FPC_STRTOSHORTSTRINGPROC} - +*) Function fpc_ShortStr_To_AnsiStr (Const S2 : ShortString): ansistring; compilerproc; { Converts a ShortString to a AnsiString; } +(* Var Size : SizeInt; +*) begin +(* Size:=Length(S2); Setlength (fpc_ShortStr_To_AnsiStr,Size); if Size>0 then Move(S2[1],Pointer(fpc_ShortStr_To_AnsiStr)^,Size); -end; *) +end; + Function fpc_Char_To_AnsiStr(const c : AnsiChar): AnsiString; compilerproc; { diff --git a/rtl/java/compproc.inc b/rtl/java/compproc.inc index f9c6b0b219..88784895e0 100644 --- a/rtl/java/compproc.inc +++ b/rtl/java/compproc.inc @@ -259,10 +259,12 @@ Procedure fpc_AnsiStr_ShortStr_Concat (Var S1: AnsiString; Var S2 : ShortString) {$ifndef FPC_STRTOSHORTSTRINGPROC} function fpc_AnsiStr_To_ShortStr (high_of_res: SizeInt;const S2 : Ansistring): shortstring; compilerproc; {$else FPC_STRTOSHORTSTRINGPROC} -procedure fpc_AnsiStr_To_ShortStr (out res : shortstring;const S2 : Ansistring); compilerproc; -{$endif FPC_STRTOSHORTSTRINGPROC} -Function fpc_ShortStr_To_AnsiStr (Const S2 : ShortString): ansistring; compilerproc; *) +procedure fpc_AnsiStr_To_ShortStr (out res : shortstring;const S2 : Ansistring); compilerproc; +(* +{$endif FPC_STRTOSHORTSTRINGPROC} +*) +Function fpc_ShortStr_To_AnsiStr (Const S2 : ShortString): ansistring; compilerproc; {$ifndef nounsupported} Function fpc_Char_To_AnsiStr(const c : AnsiChar): AnsiString; compilerproc; {$endif}