mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-19 04:09:30 +02:00
IDE: remove obsolete ParsedCompilerOptStringNames, use WriteStr
git-svn-id: trunk@33238 -
This commit is contained in:
parent
9a1d779e44
commit
46836a1a51
@ -866,7 +866,7 @@ begin
|
||||
begin
|
||||
if cp in ParsedCompilerSearchPaths then begin
|
||||
Result:=CheckSpecialCharsInPath(
|
||||
copy(ParsedCompilerOptStringNames[cp],5,100),
|
||||
copy(EnumToStr(cp),5,100),
|
||||
Options.ParsedOpts.GetParsedValue(cp));
|
||||
if not (Result in [mrOk,mrIgnore]) then exit;
|
||||
end;
|
||||
|
@ -175,20 +175,6 @@ const
|
||||
ParsedCompilerFiles =
|
||||
ParsedCompilerSearchPaths+ParsedCompilerFilenames+ParsedCompilerDirectories;
|
||||
|
||||
ParsedCompilerOptStringNames: array[TParsedCompilerOptString] of string = (
|
||||
'pcosNone',
|
||||
'pcosBaseDir', // only auto created packages can have macros in the BaseDir
|
||||
'pcosUnitPath',
|
||||
'pcosIncludePath',
|
||||
'pcosObjectPath',
|
||||
'pcosLibraryPath',
|
||||
'pcosSrcPath',
|
||||
'pcosLinkerOptions',
|
||||
'pcosCustomOptions',
|
||||
'pcosOutputDir',
|
||||
'pcosCompilerPath',
|
||||
'pcosDebugPath'
|
||||
);
|
||||
ParsedCompilerOptsVars: array[TParsedCompilerOptString] of string = (
|
||||
'',
|
||||
'',
|
||||
@ -668,6 +654,7 @@ var
|
||||
OnParseString: TParseStringEvent = nil;
|
||||
RunCompilerWithOptions: TRunCompilerWithOptions = nil;
|
||||
|
||||
function EnumToStr(opt: TParsedCompilerOptString): string;
|
||||
function ParseString(Options: TParsedCompilerOptions;
|
||||
const UnparsedValue: string;
|
||||
PlatformIndependent: boolean): string;
|
||||
@ -713,6 +700,11 @@ implementation
|
||||
const
|
||||
CompilerOptionsVersion = 11;
|
||||
|
||||
function EnumToStr(opt: TParsedCompilerOptString): string;
|
||||
begin
|
||||
WriteStr(Result, opt);
|
||||
end;
|
||||
|
||||
function ParseString(Options: TParsedCompilerOptions;
|
||||
const UnparsedValue: string; PlatformIndependent: boolean): string;
|
||||
begin
|
||||
@ -3657,7 +3649,7 @@ begin
|
||||
end;
|
||||
if ParsedStamp[Option]<>CompilerParseStamp then begin
|
||||
if Parsing[Option] then begin
|
||||
DebugLn('TParsedCompilerOptions.GetParsedValue Circle in Options: ',ParsedCompilerOptStringNames[Option],' Unparsed="',UnparsedValues[Option],'"');
|
||||
DebugLn('TParsedCompilerOptions.GetParsedValue Circle in Options: ',EnumToStr(Option),' Unparsed="',UnparsedValues[Option],'"');
|
||||
ParsedError(Option, lisCircleInMacros);
|
||||
exit('');
|
||||
end;
|
||||
@ -3683,7 +3675,7 @@ var
|
||||
begin
|
||||
if ParsedPIStamp[Option]<>CompilerParseStamp then begin
|
||||
if ParsingPI[Option] then begin
|
||||
DebugLn('TParsedCompilerOptions.GetParsedPIValue Circle in Options: ',ParsedCompilerOptStringNames[Option]);
|
||||
DebugLn('TParsedCompilerOptions.GetParsedPIValue Circle in Options: ',EnumToStr(Option));
|
||||
exit('');
|
||||
end;
|
||||
ParsingPI[Option]:=true;
|
||||
|
@ -183,8 +183,7 @@ begin
|
||||
pcosDebugPath:
|
||||
Msg:=lisErrorInTheDebuggerPathAddition;
|
||||
else
|
||||
Msg:=Format(lisIWonderHowYouDidThatErrorInThe, [
|
||||
ParsedCompilerOptStringNames[o]]);
|
||||
Msg:=Format(lisIWonderHowYouDidThatErrorInThe, [EnumToStr(o)]);
|
||||
end;
|
||||
Msg:=Msg+#13+FCompilerOpts.ParsedOpts.ParsedErrorMsg+#13
|
||||
+lisValue3+dbgstr(FCompilerOpts.ParsedOpts.UnparsedValues[o]);
|
||||
|
Loading…
Reference in New Issue
Block a user