mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-09 03:49:05 +02:00
rtl: init widestring and unitcodestring managers before initialization of Standard IO files (stdin,stdout,stderr)
git-svn-id: trunk@19542 -
This commit is contained in:
parent
2254dad68a
commit
1ccf16358c
@ -381,6 +381,7 @@ begin
|
||||
{ Setup heap }
|
||||
InitHeap;
|
||||
SysInitExceptions;
|
||||
initunicodestringmanager;
|
||||
{ Setup stdin, stdout and stderr }
|
||||
SysInitStdIO;
|
||||
{ Reset IO Error }
|
||||
@ -389,9 +390,4 @@ begin
|
||||
GenerateArgs;
|
||||
InitSystemThreads;
|
||||
initvariantmanager;
|
||||
{$ifdef VER2_2}
|
||||
initwidestringmanager;
|
||||
{$else VER2_2}
|
||||
initunicodestringmanager;
|
||||
{$endif VER2_2}
|
||||
end.
|
||||
|
@ -762,6 +762,9 @@ begin
|
||||
ExitProc:=Nil;
|
||||
{ Setup heap }
|
||||
InitHeap;
|
||||
{$ifdef HASWIDESTRING}
|
||||
InitUnicodeStringManager;
|
||||
{$endif HASWIDESTRING}
|
||||
{ Setup stdin, stdout and stderr }
|
||||
OpenStdIO(Input,fmInput,StdInputHandle);
|
||||
OpenStdIO(Output,fmOutput,StdOutputHandle);
|
||||
@ -776,11 +779,4 @@ begin
|
||||
{ Setup command line arguments }
|
||||
argc:=GetParamCount(args);
|
||||
InitVariantManager;
|
||||
{$ifdef HASWIDESTRING}
|
||||
{$ifdef VER2_2}
|
||||
InitWideStringManager;
|
||||
{$else VER2_2}
|
||||
InitUnicodeStringManager;
|
||||
{$endif VER2_2}
|
||||
{$endif HASWIDESTRING}
|
||||
end.
|
||||
|
@ -429,6 +429,7 @@ begin
|
||||
SysInitExceptions;
|
||||
// WriteLn('after SysInitException');
|
||||
|
||||
initunicodestringmanager;
|
||||
{ Setup IO }
|
||||
SysInitStdIO;
|
||||
{ Reset IO Error }
|
||||
@ -437,11 +438,6 @@ begin
|
||||
{$ifdef HASVARIANT}
|
||||
initvariantmanager;
|
||||
{$endif HASVARIANT}
|
||||
{$ifdef VER2_2}
|
||||
initwidestringmanager;
|
||||
{$else VER2_2}
|
||||
initunicodestringmanager;
|
||||
{$endif VER2_2}
|
||||
setupexecname;
|
||||
{ restore original signal handlers in case this is a library }
|
||||
if IsLibrary then
|
||||
|
@ -328,6 +328,7 @@ Begin
|
||||
{ Setup heap }
|
||||
InitHeap;
|
||||
SysInitExceptions;
|
||||
initunicodestringmanager;
|
||||
{ Setup stdin, stdout and stderr }
|
||||
SysInitStdIO;
|
||||
{ Reset IO Error }
|
||||
@ -337,11 +338,6 @@ Begin
|
||||
{ threading }
|
||||
InitSystemThreads;
|
||||
initvariantmanager;
|
||||
{$ifdef VER2_2}
|
||||
initwidestringmanager;
|
||||
{$else VER2_2}
|
||||
initunicodestringmanager;
|
||||
{$endif VER2_2}
|
||||
{ restore original signal handlers in case this is a library }
|
||||
if IsLibrary then
|
||||
RestoreOldSignalHandlers;
|
||||
|
@ -573,6 +573,10 @@ begin
|
||||
{ ... and exceptions }
|
||||
SysInitExceptions;
|
||||
|
||||
{$ifdef HASWIDESTRING}
|
||||
InitUnicodeStringManager;
|
||||
{$endif HASWIDESTRING}
|
||||
|
||||
{ ... and I/O }
|
||||
SysInitStdIO;
|
||||
|
||||
@ -583,14 +587,6 @@ begin
|
||||
|
||||
InitVariantManager;
|
||||
|
||||
{$ifdef HASWIDESTRING}
|
||||
{$ifdef VER2_2}
|
||||
InitWideStringManager;
|
||||
{$else VER2_2}
|
||||
InitUnicodeStringManager;
|
||||
{$endif VER2_2}
|
||||
{$endif HASWIDESTRING}
|
||||
|
||||
if os_Mode in [osDOS,osDPMI] then
|
||||
DosEnvInit;
|
||||
|
||||
|
@ -658,6 +658,7 @@ Begin
|
||||
{ Setup heap }
|
||||
InitHeap;
|
||||
SysInitExceptions;
|
||||
initunicodestringmanager;
|
||||
{ Setup stdin, stdout and stderr }
|
||||
SysInitStdIO;
|
||||
{ Setup environment and arguments }
|
||||
@ -682,9 +683,4 @@ Begin
|
||||
InstallDefaultHandlers;
|
||||
{$endif EXCEPTIONS_IN_SYSTEM}
|
||||
initvariantmanager;
|
||||
{$ifdef VER2_2}
|
||||
initwidestringmanager;
|
||||
{$else VER2_2}
|
||||
initunicodestringmanager;
|
||||
{$endif VER2_2}
|
||||
End.
|
||||
|
@ -463,6 +463,7 @@ begin
|
||||
SysInitExceptions;
|
||||
// WriteLn('after SysInitException');
|
||||
|
||||
initunicodestringmanager;
|
||||
{ Setup IO }
|
||||
SysInitStdIO;
|
||||
{ Reset IO Error }
|
||||
@ -471,11 +472,6 @@ begin
|
||||
{$ifdef HASVARIANT}
|
||||
initvariantmanager;
|
||||
{$endif HASVARIANT}
|
||||
{$ifdef VER2_2}
|
||||
initwidestringmanager;
|
||||
{$else VER2_2}
|
||||
initunicodestringmanager;
|
||||
{$endif VER2_2}
|
||||
setupexecname;
|
||||
{ restore original signal handlers in case this is a library }
|
||||
if IsLibrary then
|
||||
|
@ -363,6 +363,7 @@ begin
|
||||
{ Setup heap }
|
||||
InitHeap;
|
||||
SysInitExceptions;
|
||||
initunicodestringmanager;
|
||||
{ Setup stdin, stdout and stderr }
|
||||
SysInitStdIO;
|
||||
{ Arguments }
|
||||
@ -372,11 +373,6 @@ begin
|
||||
{ threading }
|
||||
InitSystemThreads;
|
||||
initvariantmanager;
|
||||
{$ifdef VER2_2}
|
||||
initwidestringmanager;
|
||||
{$else VER2_2}
|
||||
initunicodestringmanager;
|
||||
{$endif VER2_2}
|
||||
{ restore original signal handlers in case this is a library }
|
||||
if IsLibrary then
|
||||
RestoreOldSignalHandlers;
|
||||
|
@ -548,6 +548,7 @@ begin
|
||||
|
||||
InitHeap;
|
||||
SysInitExceptions;
|
||||
initunicodestringmanager;
|
||||
SysInitStdIO;
|
||||
|
||||
{ Setup environment and arguments }
|
||||
@ -558,11 +559,6 @@ begin
|
||||
errno:=0;
|
||||
InitSystemThreads;
|
||||
initvariantmanager;
|
||||
{$ifdef VER2_2}
|
||||
initwidestringmanager;
|
||||
{$else VER2_2}
|
||||
initunicodestringmanager;
|
||||
{$endif VER2_2}
|
||||
|
||||
if StandAlone = 0 then
|
||||
begin
|
||||
|
@ -415,6 +415,7 @@ begin
|
||||
{ Setup heap }
|
||||
InitHeap;
|
||||
SysInitExceptions;
|
||||
initunicodestringmanager;
|
||||
{ Setup stdin, stdout and stderr }
|
||||
SysInitStdIO;
|
||||
{ Reset IO Error }
|
||||
@ -423,9 +424,4 @@ begin
|
||||
GenerateArgs;
|
||||
InitSystemThreads;
|
||||
initvariantmanager;
|
||||
{$ifdef VER2_2}
|
||||
initwidestringmanager;
|
||||
{$else VER2_2}
|
||||
initunicodestringmanager;
|
||||
{$endif VER2_2}
|
||||
end.
|
||||
|
@ -425,6 +425,9 @@ begin
|
||||
{$endif ndef KMODE and ndef HAS_MEMORYMANAGER}
|
||||
SysInitExceptions;
|
||||
initvariantmanager;
|
||||
{ we do not use winlike widestrings and also the RTL can't be compiled with
|
||||
2.2, so we can savely use the UnicodeString manager only. }
|
||||
initunicodestringmanager;
|
||||
{$ifndef KMODE}
|
||||
SysInitStdIO;
|
||||
{ Arguments }
|
||||
@ -433,8 +436,5 @@ begin
|
||||
InOutRes := 0;
|
||||
InitSystemThreads;
|
||||
errno := 0;
|
||||
{ we do not use winlike widestrings and also the RTL can't be compiled with
|
||||
2.2, so we can savely use the UnicodeString manager only. }
|
||||
initunicodestringmanager;
|
||||
end.
|
||||
|
||||
|
@ -469,6 +469,7 @@ Begin
|
||||
ConsolePrintf (#13'Start system, ThreadID: %x'#13#10,ThreadID);
|
||||
{$endif}
|
||||
|
||||
initunicodestringmanager;
|
||||
SysInitStdIO;
|
||||
|
||||
{Delphi Compatible}
|
||||
@ -476,9 +477,4 @@ Begin
|
||||
ExitCode := 0;
|
||||
InitSystemThreads;
|
||||
initvariantmanager;
|
||||
{$ifdef VER2_2}
|
||||
initwidestringmanager;
|
||||
{$else VER2_2}
|
||||
initunicodestringmanager;
|
||||
{$endif VER2_2}
|
||||
End.
|
||||
|
@ -544,6 +544,7 @@ Begin
|
||||
|
||||
ThreadID := dword(pthread_self);
|
||||
|
||||
initunicodestringmanager;
|
||||
SysInitStdIO;
|
||||
|
||||
{Delphi Compatible}
|
||||
@ -551,9 +552,4 @@ Begin
|
||||
ExitCode := 0;
|
||||
InitSystemThreads;
|
||||
initvariantmanager;
|
||||
{$ifdef VER2_2}
|
||||
initwidestringmanager;
|
||||
{$else VER2_2}
|
||||
initunicodestringmanager;
|
||||
{$endif VER2_2}
|
||||
End.
|
||||
|
@ -1179,6 +1179,10 @@ begin
|
||||
SysInitExceptions;
|
||||
fpc_cpucodeinit;
|
||||
|
||||
{$ifdef HASWIDESTRING}
|
||||
InitUnicodeStringManager;
|
||||
{$endif HASWIDESTRING}
|
||||
|
||||
{ ... and I/O }
|
||||
SysInitStdIO;
|
||||
|
||||
@ -1197,14 +1201,6 @@ begin
|
||||
InitSystemThreads;
|
||||
InitVariantManager;
|
||||
|
||||
{$ifdef HASWIDESTRING}
|
||||
{$ifdef VER2_2}
|
||||
InitWideStringManager;
|
||||
{$else VER2_2}
|
||||
InitUnicodeStringManager;
|
||||
{$endif VER2_2}
|
||||
{$endif HASWIDESTRING}
|
||||
|
||||
{$IFDEF EXTDUMPGROW}
|
||||
{ Int_HeapSize := high (cardinal);}
|
||||
{$ENDIF EXTDUMPGROW}
|
||||
|
@ -277,6 +277,7 @@ Begin
|
||||
fpc_cpucodeinit;
|
||||
{$endif cpui386}
|
||||
|
||||
initunicodestringmanager;
|
||||
|
||||
{ Setup stdin, stdout and stderr }
|
||||
SysInitStdIO;
|
||||
@ -286,11 +287,6 @@ Begin
|
||||
SetupCmdLine;
|
||||
InitSystemThreads;
|
||||
initvariantmanager;
|
||||
{$ifdef VER2_2}
|
||||
initwidestringmanager;
|
||||
{$else VER2_2}
|
||||
initunicodestringmanager;
|
||||
{$endif VER2_2}
|
||||
{ restore original signal handlers in case this is a library }
|
||||
if IsLibrary then
|
||||
RestoreOldSignalHandlers;
|
||||
|
@ -763,6 +763,7 @@ Begin
|
||||
{ Setup heap }
|
||||
InitHeap;
|
||||
SysInitExceptions;
|
||||
initunicodestringmanager;
|
||||
{ Setup stdin, stdout and stderr }
|
||||
SysInitStdIO;
|
||||
{ Setup environment and arguments }
|
||||
@ -786,9 +787,4 @@ Begin
|
||||
InstallDefaultHandlers;
|
||||
{$endif EXCEPTIONS_IN_SYSTEM}
|
||||
initvariantmanager;
|
||||
{$ifdef VER2_2}
|
||||
initwidestringmanager;
|
||||
{$else VER2_2}
|
||||
initunicodestringmanager;
|
||||
{$endif VER2_2}
|
||||
End.
|
||||
|
@ -695,6 +695,9 @@ begin
|
||||
SysInitExceptions;
|
||||
{ setup fastmove stuff }
|
||||
fpc_cpucodeinit;
|
||||
initwidestringmanager;
|
||||
initunicodestringmanager;
|
||||
InitWin32Widestrings;
|
||||
SysInitStdIO;
|
||||
{ Arguments }
|
||||
setup_arguments;
|
||||
@ -706,10 +709,5 @@ begin
|
||||
{ Reset internal error variable }
|
||||
errno:=0;
|
||||
initvariantmanager;
|
||||
initwidestringmanager;
|
||||
{$ifndef VER2_2}
|
||||
initunicodestringmanager;
|
||||
{$endif VER2_2}
|
||||
InitWin32Widestrings;
|
||||
DispCallByIDProc:=@DoDispCallByIDError;
|
||||
end.
|
||||
|
@ -610,6 +610,9 @@ begin
|
||||
SysInitExceptions;
|
||||
{ setup fastmove stuff }
|
||||
fpc_cpucodeinit;
|
||||
initwidestringmanager;
|
||||
initunicodestringmanager;
|
||||
InitWin32Widestrings;
|
||||
SysInitStdIO;
|
||||
{ Arguments }
|
||||
setup_arguments;
|
||||
@ -621,8 +624,5 @@ begin
|
||||
{ Reset internal error variable }
|
||||
errno:=0;
|
||||
initvariantmanager;
|
||||
initwidestringmanager;
|
||||
initunicodestringmanager;
|
||||
InitWin32Widestrings;
|
||||
DispCallByIDProc:=@DoDispCallByIDError;
|
||||
end.
|
||||
|
@ -1848,6 +1848,8 @@ initialization
|
||||
InitHeap;
|
||||
{$ENDIF HAS_MEMORYMANAGER}
|
||||
SysInitExceptions;
|
||||
initunicodestringmanager;
|
||||
InitWinCEWidestrings;
|
||||
if not IsLibrary then
|
||||
begin
|
||||
SysInitStdIO;
|
||||
@ -1860,8 +1862,6 @@ initialization
|
||||
{ Reset internal error variable }
|
||||
errno:=0;
|
||||
initvariantmanager;
|
||||
initunicodestringmanager;
|
||||
InitWinCEWidestrings;
|
||||
DispCallByIDProc:=@DoDispCallByIDError;
|
||||
|
||||
finalization
|
||||
|
Loading…
Reference in New Issue
Block a user