mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-16 23:21:57 +02:00
rtl: add SetTextCodePage, GetTextCodePage functions which set/get TTextRec.CodePage field
git-svn-id: trunk@19541 -
This commit is contained in:
parent
e46e2c3ebd
commit
2254dad68a
@ -997,6 +997,8 @@ Function SeekEOF:Boolean;
|
||||
Procedure SetTextBuf(var f:Text; var Buf);[INTERNPROC:fpc_in_settextbuf_file_x];
|
||||
Procedure SetTextBuf(var f:Text; var Buf; Size:SizeInt);
|
||||
Procedure SetTextLineEnding(var f:Text; Ending:string);
|
||||
function GetTextCodePage(var T: Text): TSystemCodePage;
|
||||
procedure SetTextCodePage(var T: Text; CodePage: TSystemCodePage);
|
||||
{$endif FPC_HAS_FEATURE_TEXTIO}
|
||||
|
||||
{****************************************************************************
|
||||
|
@ -441,6 +441,22 @@ Begin
|
||||
TextRec(F).LineEnd:=Ending;
|
||||
End;
|
||||
|
||||
function GetTextCodePage(var T: Text): TSystemCodePage;
|
||||
begin
|
||||
{$ifndef ver2_4}
|
||||
GetTextCodePage:=TextRec(T).CodePage;
|
||||
{$else}
|
||||
GetTextCodePage:=0;
|
||||
{$endif ver2_4}
|
||||
end;
|
||||
|
||||
procedure SetTextCodePage(var T: Text; CodePage: TSystemCodePage);
|
||||
begin
|
||||
{$ifndef ver2_4}
|
||||
TextRec(T).CodePage:=CodePage;
|
||||
{$endif ver2_4}
|
||||
end;
|
||||
|
||||
|
||||
Function fpc_get_input:PText;compilerproc;
|
||||
begin
|
||||
|
Loading…
Reference in New Issue
Block a user