diff options
author | nickysn <nickysn@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2013-03-25 23:55:47 +0000 |
---|---|---|
committer | nickysn <nickysn@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2013-03-25 23:55:47 +0000 |
commit | 63c34beadbf2a9cfd52aa91445f0124cc2a60079 (patch) | |
tree | fcbfee4007b76dd3b25fd09ca40ab17d86bac808 /rtl/inc/astrings.inc | |
parent | f72adbe90246a30eb4e8186e1b3b9815dc53bf09 (diff) | |
download | fpc-63c34beadbf2a9cfd52aa91445f0124cc2a60079.tar.gz |
+ added Str() helpers for 32-bit ints for 16/8-bit CPUs
git-svn-id: http://svn.freepascal.org/svn/fpc/branches/i8086@24008 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'rtl/inc/astrings.inc')
-rw-r--r-- | rtl/inc/astrings.inc | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/rtl/inc/astrings.inc b/rtl/inc/astrings.inc index beef6d4a84..7ef49249f5 100644 --- a/rtl/inc/astrings.inc +++ b/rtl/inc/astrings.inc @@ -1190,6 +1190,30 @@ end; {$endif CPU64} +{$if defined(CPU16) or defined(CPU8)} +Procedure fpc_AnsiStr_LongWord(v : LongWord;Len : SizeInt; out S : RawByteString{$ifdef FPC_HAS_CPSTRING};cp : TSystemCodePage{$endif FPC_HAS_CPSTRING});[Public,Alias : 'FPC_ANSISTR_LONGWORD']; compilerproc; {$IFNDEF VER2_0} Inline; {$ENDIF} +Var + SS : ShortString; +begin + str(v:Len,SS); + S:=SS; + {$ifdef FPC_HAS_CPSTRING} + SetCodePage(s,cp,false); + {$endif FPC_HAS_CPSTRING} +end; + +Procedure fpc_AnsiStr_LongInt(v : LongInt; Len : SizeInt; out S : RawByteString{$ifdef FPC_HAS_CPSTRING};cp : TSystemCodePage{$endif FPC_HAS_CPSTRING});[Public,Alias : 'FPC_ANSISTR_LONGINT']; compilerproc; {$IFNDEF VER2_0} Inline; {$ENDIF} +Var + SS : ShortString; +begin + str (v:Len,SS); + S:=SS; + {$ifdef FPC_HAS_CPSTRING} + SetCodePage(s,cp,false); + {$endif FPC_HAS_CPSTRING} +end; +{$endif CPU16 or CPU8} + Procedure Delete(Var S : RawByteString; Index,Size: SizeInt); Var LS : SizeInt; |