|
@@ -1494,7 +1494,7 @@ function TPreprocessor.LookupPredefined(Name: string;
|
|
|
begin
|
|
|
Result := True;
|
|
|
Name := UpperCase(Name);
|
|
|
- if Name = '__FILE__' then
|
|
|
+ if (Name = '__FILENAME__') or (Name = '__FILE__') then
|
|
|
begin
|
|
|
if Value <> nil then MakeStr(Value^, ExtractFileName(FIncludes[FCurrentFile]))
|
|
|
end
|
|
@@ -1502,6 +1502,10 @@ begin
|
|
|
begin
|
|
|
if Value <> nil then MakeStr(Value^, FIncludes[FCurrentFile])
|
|
|
end
|
|
|
+ else if Name = '__DIR__' then
|
|
|
+ begin
|
|
|
+ if Value <> nil then MakeStr(Value^, ExtractFileDir(FIncludes[FCurrentFile]))
|
|
|
+ end
|
|
|
else if Name = '__LINE__' then
|
|
|
begin
|
|
|
if Value <> nil then MakeInt(Value^, FCurrentLine)
|