IDE: fixed macros

git-svn-id: trunk@28634 -
This commit is contained in:
mattias 2010-12-05 23:42:59 +00:00
parent 56e9d77a02
commit ecf90eadcb
2 changed files with 6 additions and 0 deletions

View File

@ -1343,6 +1343,7 @@ end;
- Removes empty paths.
- Uses TrimFilename on every path.
- If BaseDirectory<>'' then every relative Filename will be expanded.
- removes doubles
-------------------------------------------------------------------------------}
function TrimSearchPath(const SearchPath, BaseDirectory: string): string;
var
@ -1366,9 +1367,13 @@ begin
while (EndPos<=l) and (SearchPath[EndPos]<>';') do inc(EndPos);
CurPath:=copy(SearchPath,StartPos,EndPos-StartPos);
if CurPath<>'' then begin
// non empty path => expand, trim and normalize
if (BaseDir<>'') and (not FilenameIsAbsolute(CurPath)) then
CurPath:=BaseDir+CurPath;
CurPath:=ChompPathDelim(TrimFilename(CurPath));
// check if path already exists
// ToDo:
if Result<>'' then
CurPath:=';'+CurPath;
if CurPath<>'' then

View File

@ -369,6 +369,7 @@ begin
end;
end;
if not Handled then begin
if fBusy=nil then fBusy:=TStringList.Create;
try
fBusy.Add(MacroName);
if not SubstituteStr(MacroParam,Data,Depth+1) then begin