mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-20 10:45:08 +02:00
* Patch from Henrique Werlang to allow setting log config page
git-svn-id: trunk@47052 -
(cherry picked from commit a8bc2f6947
)
This commit is contained in:
parent
16886b5946
commit
a3d5b9532e
@ -67,6 +67,8 @@ Type
|
||||
FOnWriteJSCallBack: TWriteJSCallBack;
|
||||
FOnWriteJSData: Pointer;
|
||||
FReadBufferLen: Cardinal;
|
||||
function GetLogEncoding: String;
|
||||
procedure SetLogEncoding(AValue: String);
|
||||
Protected
|
||||
Function DoWriteJSFile(const DestFilename: String; aWriter: TPas2JSMapper): Boolean; override;
|
||||
Procedure GetLastError(AError : PAnsiChar; Var AErrorLength : Longint;
|
||||
@ -80,6 +82,7 @@ Type
|
||||
Function LibraryRun(ACompilerExe, AWorkingDir : PAnsiChar; CommandLine : PPAnsiChar; DoReset : Boolean) :Boolean; {$IFDEF UseCDecl}cdecl{$ELSE}stdcall{$ENDIF};
|
||||
Property LastError : String Read FLastError Write FLastError;
|
||||
Property LastErrorClass : String Read FLastErrorClass Write FLastErrorClass;
|
||||
property LogEncoding: String read GetLogEncoding write SetLogEncoding;
|
||||
Property OnLibLogCallBack : TLibLogCallBack Read FOnLibLogCallBack Write FOnLibLogCallBack;
|
||||
Property OnLibLogData : Pointer Read FOnLibLogData Write FOnLibLogData;
|
||||
Property OnWriteJSCallBack : TWriteJSCallBack Read FOnWriteJSCallBack Write FOnWriteJSCallBack;
|
||||
@ -107,6 +110,7 @@ Function RunPas2JSCompiler(P : PPas2JSCompiler; ACompilerExe, AWorkingDir : PAns
|
||||
Procedure FreePas2JSCompiler(P : PPas2JSCompiler); {$IFDEF UseCDecl}cdecl{$ELSE}stdcall{$ENDIF};
|
||||
Function GetPas2JSCompiler : PPas2JSCompiler; {$IFDEF UseCDecl}cdecl{$ELSE}stdcall{$ENDIF};
|
||||
Procedure GetPas2JSCompilerLastError(P : PPas2JSCompiler; AError : PAnsiChar; Var AErrorLength : Longint; AErrorClass : PAnsiChar; Var AErrorClassLength : Longint); {$IFDEF UseCDecl}cdecl{$ELSE}stdcall{$ENDIF};
|
||||
procedure SetPas2JSLogEncoding(P : PPas2JSCompiler; Enconding: PAnsiChar); {$IFDEF UseCDecl}cdecl{$ELSE}stdcall{$ENDIF};
|
||||
|
||||
implementation
|
||||
|
||||
@ -120,6 +124,16 @@ begin
|
||||
Result:=OnReadDir(FOnReadDirData,Dir,PAnsiChar(Dir.Path));
|
||||
end;
|
||||
|
||||
function TLibraryPas2JSCompiler.GetLogEncoding: String;
|
||||
begin
|
||||
Result := Log.Encoding;
|
||||
end;
|
||||
|
||||
procedure TLibraryPas2JSCompiler.SetLogEncoding(AValue: String);
|
||||
begin
|
||||
Log.Encoding := AValue;
|
||||
end;
|
||||
|
||||
function TLibraryPas2JSCompiler.DoWriteJSFile(const DestFilename: String; aWriter: TPas2JSMapper): Boolean;
|
||||
|
||||
Var
|
||||
@ -344,5 +358,10 @@ begin
|
||||
TLibraryPas2JSCompiler(P).GetLastError(AError,AErrorLength,AErrorClass,AErrorClassLength);
|
||||
end;
|
||||
|
||||
procedure SetPas2JSLogEncoding(P : PPas2JSCompiler; Enconding: PAnsiChar); {$IFDEF UseCDecl}cdecl{$ELSE}stdcall{$ENDIF};
|
||||
begin
|
||||
TLibraryPas2JSCompiler(P).LogEncoding := Enconding;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
|
@ -17,7 +17,8 @@ exports
|
||||
AddPas2JSDirectoryEntry,
|
||||
SetPas2JSUnitAliasCallBack,
|
||||
SetPas2JSCompilerLogCallBack,
|
||||
GetPas2JSCompilerLastError;
|
||||
GetPas2JSCompilerLastError,
|
||||
SetPas2JSLogEncoding;
|
||||
|
||||
end.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user