mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-14 10:20:21 +02:00
* made the pascal name of the string range checking helpers match
their assembler name git-svn-id: trunk@23324 -
This commit is contained in:
parent
1355fc0198
commit
7c578c3541
@ -724,14 +724,14 @@ begin
|
||||
end;
|
||||
{$endif FPC_HAS_ANSISTR_COMPARE_EQUAL}
|
||||
|
||||
{$ifndef FPC_HAS_ANSISTR_CHECKRANGE}
|
||||
{$define FPC_HAS_ANSISTR_CHECKRANGE}
|
||||
Procedure fpc_AnsiStr_CheckRange(p: Pointer; index: SizeInt);[Public,Alias : 'FPC_ANSISTR_RANGECHECK']; compilerproc;
|
||||
{$ifndef FPC_HAS_ANSISTR_RANGECHECK}
|
||||
{$define FPC_HAS_ANSISTR_RANGECHECK}
|
||||
Procedure fpc_AnsiStr_RangeCheck(p: Pointer; index: SizeInt);[Public,Alias : 'FPC_ANSISTR_RANGECHECK']; compilerproc;
|
||||
begin
|
||||
if (p=nil) or (index>PAnsiRec(p-AnsiFirstOff)^.Len) or (Index<1) then
|
||||
HandleErrorAddrFrameInd(201,get_pc_addr,get_frame);
|
||||
end;
|
||||
{$endif FPC_HAS_ANSISTR_CHECKRANGE}
|
||||
{$endif FPC_HAS_ANSISTR_RANGECHECK}
|
||||
|
||||
{$ifndef FPC_HAS_ANSISTR_SETLENGTH}
|
||||
{$define FPC_HAS_ANSISTR_SETLENGTH}
|
||||
|
@ -232,7 +232,7 @@ Function fpc_CharArray_To_AnsiStr(const arr: array of AnsiChar; {$ifdef FPC_HAS_
|
||||
procedure fpc_ansistr_to_chararray(out res: array of AnsiChar; const src: RawByteString)compilerproc;
|
||||
Function fpc_AnsiStr_Compare(const S1,S2 : RawByteString): SizeInt; compilerproc;
|
||||
Function fpc_AnsiStr_Compare_equal(const S1,S2 : RawByteString): SizeInt; compilerproc;
|
||||
Procedure fpc_AnsiStr_CheckRange(p : Pointer; index : SizeInt); compilerproc;
|
||||
Procedure fpc_AnsiStr_RangeCheck(p : Pointer; index : SizeInt); compilerproc;
|
||||
|
||||
Procedure fpc_AnsiStr_SetLength (Var S : RawByteString; l : SizeInt{$ifdef FPC_HAS_CPSTRING};cp : TSystemCodePage{$endif FPC_HAS_CPSTRING}); compilerproc;
|
||||
Function fpc_ansistr_Copy (Const S : RawByteString; Index,Size : SizeInt): RawByteString;compilerproc;
|
||||
@ -267,7 +267,7 @@ procedure fpc_widestr_to_chararray(out res: array of char; const src: WideString
|
||||
procedure fpc_widestr_to_widechararray(out res: array of widechar; const src: WideString); compilerproc;
|
||||
Function fpc_WideStr_Compare(const S1,S2 : WideString): SizeInt; compilerproc;
|
||||
Function fpc_WideStr_Compare_equal(const S1,S2 : WideString): SizeInt; compilerproc;
|
||||
Procedure fpc_WideStr_CheckRange(p: Pointer; index : SizeInt); compilerproc;
|
||||
Procedure fpc_WideStr_RangeCheck(p: Pointer; index : SizeInt); compilerproc;
|
||||
|
||||
Procedure fpc_WideStr_SetLength (Var S : WideString; l : SizeInt); compilerproc;
|
||||
Function fpc_widestr_Copy (Const S : WideString; Index,Size : SizeInt) : WideString;compilerproc;
|
||||
@ -311,7 +311,7 @@ procedure fpc_ansistr_to_widechararray(out res: array of widechar; const src: Ra
|
||||
procedure fpc_unicodestr_to_widechararray(out res: array of widechar; const src: UnicodeString); compilerproc;
|
||||
Function fpc_UnicodeStr_Compare(const S1,S2 : UnicodeString): SizeInt; compilerproc;
|
||||
Function fpc_UnicodeStr_Compare_equal(const S1,S2 : UnicodeString): SizeInt; compilerproc;
|
||||
Procedure fpc_UnicodeStr_CheckRange(p: Pointer; index : SizeInt); compilerproc;
|
||||
Procedure fpc_UnicodeStr_RangeCheck(p: Pointer; index : SizeInt); compilerproc;
|
||||
|
||||
Procedure fpc_UnicodeStr_SetLength (Var S : UnicodeString; l : SizeInt); compilerproc;
|
||||
Function fpc_unicodestr_Copy (Const S : UnicodeString; Index,Size : SizeInt) : UnicodeString;compilerproc;
|
||||
|
@ -924,7 +924,7 @@ end;
|
||||
|
||||
{$ifndef FPC_HAS_UNICODESTR_RANGECHECK}
|
||||
{$define FPC_HAS_UNICODESTR_RANGECHECK}
|
||||
Procedure fpc_UnicodeStr_CheckRange(p: Pointer; index: SizeInt);[Public,Alias : 'FPC_UNICODESTR_RANGECHECK']; compilerproc;
|
||||
Procedure fpc_UnicodeStr_RangeCheck(p: Pointer; index: SizeInt);[Public,Alias : 'FPC_UNICODESTR_RANGECHECK']; compilerproc;
|
||||
begin
|
||||
if (p=nil) or (index>PUnicodeRec(p-UnicodeFirstOff)^.len) or (Index<1) then
|
||||
HandleErrorAddrFrameInd(201,get_pc_addr,get_frame);
|
||||
|
@ -481,7 +481,7 @@ begin
|
||||
exit(CompareWord(S1[1],S2[1],MaxI));
|
||||
end;
|
||||
|
||||
Procedure fpc_WideStr_CheckRange(p: Pointer; index: SizeInt);[Public,Alias : 'FPC_WIDESTR_RANGECHECK']; compilerproc;
|
||||
Procedure fpc_WideStr_RangeCheck(p: Pointer; index: SizeInt);[Public,Alias : 'FPC_WIDESTR_RANGECHECK']; compilerproc;
|
||||
begin
|
||||
if (p=nil) or (index>PWideRec(p-WideFirstOff)^.len div 2) or (Index<1) then
|
||||
HandleErrorAddrFrameInd(201,get_pc_addr,get_frame);
|
||||
|
@ -618,7 +618,7 @@ end;
|
||||
|
||||
|
||||
{ not required, the JVM does the range checking for us }
|
||||
{$define FPC_HAS_ANSISTR_CHECKRANGE}
|
||||
{$define FPC_HAS_ANSISTR_RANGECHECK}
|
||||
|
||||
|
||||
{$define FPC_HAS_ANSISTR_SETLENGTH}
|
||||
|
@ -231,6 +231,7 @@ procedure fpc_ansistr_to_chararray(out res: array of AnsiChar; const src: RawByt
|
||||
function fpc_ansistr_setchar(const s: RawByteString; const index: longint; const ch: ansichar): RawByteString; compilerproc;
|
||||
Function fpc_AnsiStr_Compare(const S1,S2 : RawByteString): SizeInt; compilerproc;
|
||||
Function fpc_AnsiStr_Compare_equal(const S1,S2 : RawByteString): SizeInt; compilerproc;
|
||||
//Procedure fpc_AnsiStr_RangeCheck(p : Pointer; index : SizeInt); compilerproc;
|
||||
|
||||
{ special declaration for the JVM }
|
||||
Procedure fpc_AnsiStr_SetLength (Var S : RawByteString; l : SizeInt{$ifdef FPC_HAS_CPSTRING};cp : TSystemCodePage{$endif FPC_HAS_CPSTRING}); compilerproc;
|
||||
@ -275,7 +276,7 @@ procedure fpc_ansistr_to_widechararray(out res: array of widechar; const src: Ra
|
||||
procedure fpc_unicodestr_to_widechararray(out res: array of widechar; const src: UnicodeString); compilerproc;
|
||||
Function fpc_UnicodeStr_Compare(const S1,S2 : UnicodeString): SizeInt; compilerproc;
|
||||
Function fpc_UnicodeStr_Compare_equal(const S1,S2 : UnicodeString): SizeInt; compilerproc;
|
||||
//Procedure fpc_UnicodeStr_CheckRange(p: Pointer; index : SizeInt); compilerproc;
|
||||
//Procedure fpc_UnicodeStr_RangeCheck(p: Pointer; index : SizeInt); compilerproc;
|
||||
|
||||
Procedure fpc_UnicodeStr_SetLength (Var S : UnicodeString; l : SizeInt); compilerproc;
|
||||
Function fpc_unicodestr_Copy (Const S : UnicodeString; Index,Size : SizeInt) : UnicodeString;compilerproc;
|
||||
|
Loading…
Reference in New Issue
Block a user