mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-11 10:26:05 +02:00
* enable more features for avr6
* ifdef'ed uncompilable procedures git-svn-id: trunk@37584 -
This commit is contained in:
parent
7debc7920a
commit
b086b10adf
@ -168,7 +168,9 @@
|
||||
-SfEXCEPTIONS
|
||||
-SfCLASSES
|
||||
-SfRTTI
|
||||
# AVR6 has normally more memory, so enable more functions
|
||||
#ifdef CPUAVR6
|
||||
-SfANSISTRINGS
|
||||
-SfWIDESTRINGS
|
||||
-SfDYNARRAYS
|
||||
-SfTHREADING
|
||||
|
@ -1332,6 +1332,11 @@ End;
|
||||
{$ifdef FPC_HAS_FEATURE_HEAP}
|
||||
{$ifdef FPC_HAS_FEATURE_ANSISTRINGS}
|
||||
function ArrayStringToPPchar(const S:Array of AnsiString;reserveentries:Longint):ppchar; // const ?
|
||||
{$ifdef EXCLUDE_COMPLEX_PROCS}
|
||||
begin
|
||||
runerror(217);
|
||||
end;
|
||||
{$else EXCLUDE_COMPLEX_PROCS}
|
||||
// Extra allocate reserveentries pchar's at the beginning (default param=0 after 1.0.x ?)
|
||||
// Note: for internal use by skilled programmers only
|
||||
// if "s" goes out of scope in the parent procedure, the pointer is dangling.
|
||||
@ -1354,6 +1359,7 @@ begin
|
||||
p[high(s)+1+Reserveentries]:=nil;
|
||||
ArrayStringToPPchar:=p;
|
||||
end;
|
||||
{$endif EXCLUDE_COMPLEX_PROCS}
|
||||
|
||||
|
||||
Function StringToPPChar(Var S:AnsiString;ReserveEntries:integer):ppchar;
|
||||
|
@ -642,7 +642,7 @@ var
|
||||
begin
|
||||
{$ifndef FPC_HAS_CPSTRING}
|
||||
cp:=DefaultSystemCodePage;
|
||||
{$endif FPC_HAS_CPSTRING}
|
||||
{$endif FPC_HAS_CPSTRING}
|
||||
cp:=TranslatePlaceholderCP(cp);
|
||||
widestringmanager.Unicode2AnsiMoveProc(@c, fpc_UChar_To_AnsiStr, cp, 1);
|
||||
end;
|
||||
@ -1690,6 +1690,11 @@ function UnicodeToUtf8(Dest: PChar; Source: PUnicodeChar; MaxBytes: SizeInt): Si
|
||||
|
||||
|
||||
function UnicodeToUtf8(Dest: PChar; MaxDestBytes: SizeUInt; Source: PUnicodeChar; SourceChars: SizeUInt): SizeUInt;
|
||||
{$ifdef EXCLUDE_COMPLEX_PROCS}
|
||||
begin
|
||||
runerror(217);
|
||||
end;
|
||||
{$else EXCLUDE_COMPLEX_PROCS}
|
||||
var
|
||||
i,j : SizeUInt;
|
||||
lw : longword;
|
||||
@ -1782,6 +1787,7 @@ function UnicodeToUtf8(Dest: PChar; MaxDestBytes: SizeUInt; Source: PUnicodeChar
|
||||
end;
|
||||
result:=j+1;
|
||||
end;
|
||||
{$endif EXCLUDE_COMPLEX_PROCS}
|
||||
|
||||
|
||||
function Utf8ToUnicode(Dest: PUnicodeChar; Source: PChar; MaxChars: SizeInt): SizeInt;{$ifdef SYSTEMINLINE}inline;{$endif}
|
||||
@ -1794,6 +1800,11 @@ function Utf8ToUnicode(Dest: PUnicodeChar; Source: PChar; MaxChars: SizeInt): Si
|
||||
|
||||
|
||||
function UTF8ToUnicode(Dest: PUnicodeChar; MaxDestChars: SizeUInt; Source: PChar; SourceBytes: SizeUInt): SizeUInt;
|
||||
{$ifdef EXCLUDE_COMPLEX_PROCS}
|
||||
begin
|
||||
runerror(217);
|
||||
end;
|
||||
{$else EXCLUDE_COMPLEX_PROCS}
|
||||
const
|
||||
UNICODE_INVALID=63;
|
||||
var
|
||||
@ -2072,6 +2083,7 @@ function UTF8ToUnicode(Dest: PUnicodeChar; MaxDestChars: SizeUInt; Source: PChar
|
||||
Result:=OutputUnicode+1;
|
||||
end;
|
||||
end;
|
||||
{$endif EXCLUDE_COMPLEX_PROCS}
|
||||
|
||||
|
||||
function UTF8Encode(const s : RawByteString) : RawByteString; inline;
|
||||
@ -2378,7 +2390,7 @@ begin
|
||||
Result := UTF8Decode(S);
|
||||
end;
|
||||
|
||||
function UTF8ToString(const S: ShortString): UnicodeString;
|
||||
function UTF8ToString(const S: ShortString): UnicodeString;
|
||||
Var
|
||||
rs: RawByteString;
|
||||
begin
|
||||
|
Loading…
Reference in New Issue
Block a user