mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-13 00:49:31 +02:00
* Char -> AnsiChar
This commit is contained in:
parent
abd1e72e9d
commit
8c39b9376b
rtl/powerpc64
@ -274,7 +274,7 @@ end;
|
||||
|
||||
{$ifndef FPC_SYSTEM_HAS_INDEXCHAR0}
|
||||
{$define FPC_SYSTEM_HAS_INDEXCHAR0}
|
||||
function IndexChar0(const buf;len:SizeInt;b:Char):int64; assembler; nostackframe;
|
||||
function IndexChar0(const buf;len:SizeInt;b:AnsiChar):int64; assembler; nostackframe;
|
||||
{ input: r3 = buf, r4 = len, r5 = b }
|
||||
{ output: r3 = position of found position (-1 if not found) }
|
||||
asm
|
||||
@ -467,7 +467,7 @@ end;
|
||||
|
||||
{$ifndef FPC_SYSTEM_HAS_FPC_PCHAR_TO_SHORTSTR}
|
||||
{$define FPC_SYSTEM_HAS_FPC_PCHAR_TO_SHORTSTR}
|
||||
procedure fpc_pchar_to_shortstr(out res : shortstring;p:pchar);[public,alias:'FPC_PCHAR_TO_SHORTSTR']; compilerproc;
|
||||
procedure fpc_pchar_to_shortstr(out res : shortstring;p:PAnsiChar);[public,alias:'FPC_PCHAR_TO_SHORTSTR']; compilerproc;
|
||||
assembler; nostackframe;
|
||||
{
|
||||
r3: result address
|
||||
@ -518,7 +518,7 @@ end;
|
||||
(*
|
||||
{$ifndef FPC_SYSTEM_HAS_FPC_PCHAR_LENGTH}
|
||||
{$define FPC_SYSTEM_HAS_FPC_PCHAR_LENGTH}
|
||||
function fpc_pchar_length(p:pchar):longint;assembler;[public,alias:'FPC_PCHAR_LENGTH']; {$ifdef hascompilerproc} compilerproc; {$endif} nostackframe;
|
||||
function fpc_pchar_length(p:PAnsiChar):longint;assembler;[public,alias:'FPC_PCHAR_LENGTH']; {$ifdef hascompilerproc} compilerproc; {$endif} nostackframe;
|
||||
{$include strlen.inc}
|
||||
{$endif FPC_SYSTEM_HAS_FPC_PCHAR_LENGTH}
|
||||
*)
|
||||
|
@ -21,7 +21,7 @@
|
||||
|
||||
{$ifndef FPC_UNIT_HAS_STRCOPY}
|
||||
{$define FPC_UNIT_HAS_STRCOPY}
|
||||
function strcopy(dest,source : pchar) : pchar;assembler;
|
||||
function strcopy(dest,source : PAnsiChar) : PAnsiChar;assembler;
|
||||
{ in: dest in r3, source in r4 }
|
||||
{ out: result (dest) in r3 }
|
||||
asm
|
||||
@ -99,7 +99,7 @@ end;
|
||||
|
||||
{$ifndef FPC_UNIT_HAS_STRECOPY}
|
||||
{$define FPC_UNIT_HAS_STRECOPY}
|
||||
function strecopy(dest,source : pchar) : pchar;assembler;
|
||||
function strecopy(dest,source : PAnsiChar) : PAnsiChar;assembler;
|
||||
{ in: dest in r3, source in r4 }
|
||||
{ out: result (end of new dest) in r3 }
|
||||
asm
|
||||
@ -173,7 +173,7 @@ end;
|
||||
|
||||
{$ifndef FPC_UNIT_HAS_STRLCOPY}
|
||||
{$define FPC_UNIT_HAS_STRLCOPY}
|
||||
function strlcopy(dest,source : pchar;maxlen : int64) : pchar;assembler;
|
||||
function strlcopy(dest,source : PAnsiChar;maxlen : int64) : PAnsiChar;assembler;
|
||||
{ in: dest in r3, source in r4, maxlen in r5 }
|
||||
{ out: result (dest) in r3 }
|
||||
asm
|
||||
@ -199,7 +199,7 @@ end;
|
||||
|
||||
{$ifndef FPC_UNIT_HAS_STREND}
|
||||
{$define FPC_UNIT_HAS_STREND}
|
||||
function strend(p : pchar) : pchar;assembler;
|
||||
function strend(p : PAnsiChar) : PAnsiChar;assembler;
|
||||
{ in: p in r3 }
|
||||
{ out: result (end of p) in r3 }
|
||||
asm
|
||||
@ -221,7 +221,7 @@ end;
|
||||
|
||||
{$ifndef FPC_UNIT_HAS_STRCOMP}
|
||||
{$define FPC_UNIT_HAS_STRCOMP}
|
||||
function strcomp(str1,str2 : pchar) : int64;assembler;
|
||||
function strcomp(str1,str2 : pansichar) : int64;assembler;
|
||||
{ in: str1 in r3, str2 in r4 }
|
||||
{ out: result (= 0 if strings equal, < 0 if str1 < str2, > 0 if str1 > str2 }
|
||||
{ in r3 }
|
||||
@ -250,7 +250,7 @@ end;
|
||||
|
||||
{$ifndef FPC_UNIT_HAS_STRLCOMP}
|
||||
{$define FPC_UNIT_HAS_STRLCOMP}
|
||||
function strlcomp(str1,str2 : pchar;l : int64) : int64;assembler;
|
||||
function strlcomp(str1,str2 : PAnsiChar;l : int64) : int64;assembler;
|
||||
{ (same as strcomp, but maximally compare until l'th character) }
|
||||
{ in: str1 in r3, str2 in r4, l in r5 }
|
||||
{ out: result (= 0 if strings equal, < 0 if str1 < str2, > 0 if str1 > str2 }
|
||||
@ -286,7 +286,7 @@ end;
|
||||
|
||||
{$ifndef FPC_UNIT_HAS_STRICOMP}
|
||||
{$define FPC_UNIT_HAS_STRICOMP}
|
||||
function stricomp(str1,str2 : pchar) : int64;assembler;
|
||||
function stricomp(str1,str2 : PAnsiChar) : int64;assembler;
|
||||
{ in: str1 in r3, str2 in r4 }
|
||||
{ out: result of case insensitive comparison (< 0, = 0, > 0) }
|
||||
asm
|
||||
@ -350,7 +350,7 @@ end;
|
||||
|
||||
{$ifndef FPC_UNIT_HAS_STRLICOMP}
|
||||
{$define FPC_UNIT_HAS_STRLICOMP}
|
||||
function strlicomp(str1,str2 : pchar;l : int64) : int64;assembler;
|
||||
function strlicomp(str1,str2 : PAnsiChar;l : int64) : int64;assembler;
|
||||
{ (same as stricomp, but maximally compare until l'th character) }
|
||||
{ in: str1 in r3, str2 in r4, l in r5 }
|
||||
{ out: result of case insensitive comparison (< 0, = 0, > 0) }
|
||||
@ -409,7 +409,7 @@ end;
|
||||
|
||||
{$ifndef FPC_UNIT_HAS_STRSCAN}
|
||||
{$define FPC_UNIT_HAS_STRSCAN}
|
||||
function strscan(p : pchar;c : char) : pchar;assembler;
|
||||
function strscan(p : PAnsiChar;c : AnsiChar) : PAnsiChar;assembler;
|
||||
asm
|
||||
{ empty/invalid string? }
|
||||
cmplwi r3,0
|
||||
@ -430,7 +430,7 @@ end;
|
||||
|
||||
{$ifndef FPC_UNIT_HAS_STRRSCAN}
|
||||
{$define FPC_UNIT_HAS_STRRSCAN}
|
||||
function strrscan(p : pchar;c : char) : pchar;assembler;
|
||||
function strrscan(p : PAnsiChar;c : AnsiChar) : PAnsiChar;assembler;
|
||||
asm
|
||||
{ empty/invalid string? }
|
||||
cmplwi r3,0
|
||||
@ -456,7 +456,7 @@ end;
|
||||
|
||||
{$ifndef FPC_UNIT_HAS_STRUPPER}
|
||||
{$define FPC_UNIT_HAS_STRUPPER}
|
||||
function strupper(p : pchar) : pchar;assembler;
|
||||
function strupper(p : PAnsiChar) : PAnsiChar;assembler;
|
||||
asm
|
||||
cmplwi r3,0
|
||||
beq .LStrUpperNil
|
||||
@ -479,7 +479,7 @@ end;
|
||||
|
||||
{$ifndef FPC_UNIT_HAS_STRLOWER}
|
||||
{$define FPC_UNIT_HAS_STRLOWER}
|
||||
function strlower(p : pchar) : pchar;assembler;
|
||||
function strlower(p : PAnsiChar) : PAnsiChar;assembler;
|
||||
asm
|
||||
cmplwi r3,0
|
||||
beq .LStrLowerNil
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
{$ifndef FPC_UNIT_HAS_STRPCOPY}
|
||||
{$define FPC_UNIT_HAS_STRPCOPY}
|
||||
function strpcopy(d : pchar;const s : string) : pchar;assembler;
|
||||
function strpcopy(d : PAnsiChar;const s : string) : PAnsiChar;assembler;
|
||||
asm
|
||||
{ get length }
|
||||
lbz r0,0(r4)
|
||||
|
Loading…
Reference in New Issue
Block a user