2
0
Martijn Laan 5 жил өмнө
parent
commit
31ba9997de

+ 2 - 8
Projects/ISPP/IsppPreprocess.pas

@@ -19,11 +19,6 @@ uses
   SysUtils, CmnFunc2, PathFunc,
   SysUtils, CmnFunc2, PathFunc,
   IsppBase, IsppTranslate, IsppSessions, IsppIntf, IsppIdentMan, IsppVarUtils, IsppConsts;
   IsppBase, IsppTranslate, IsppSessions, IsppIntf, IsppIdentMan, IsppVarUtils, IsppConsts;
 
 
-//type TPreprocProtectedMethods = class(TPreprocessor);
-
-var
-  BuiltinsDir: string;
-
 procedure ReadScript(const Params: TPreprocessScriptParams;
 procedure ReadScript(const Params: TPreprocessScriptParams;
   const Preprocessor: TPreprocessor);
   const Preprocessor: TPreprocessor);
 var
 var
@@ -169,7 +164,7 @@ var
     end;
     end;
   end;
   end;
 
 
-  function IncludeBuiltinsAndParseIncludeFiles(IncludeFiles: PChar; Options: TOptions): Boolean;
+  function IncludeBuiltinsAndParseIncludeFiles(BuiltinsDir: String; IncludeFiles: PChar; Options: TOptions): Boolean;
 
 
     function Escape(const S: string): string;
     function Escape(const S: string): string;
     var
     var
@@ -242,7 +237,6 @@ begin
     Exit;
     Exit;
   end;
   end;
 
 
-  BuiltinsDir := Params.CompilerPath;
   { Hack: push a dummy item onto the stack to defer deletion of temp. files }
   { Hack: push a dummy item onto the stack to defer deletion of temp. files }
   PushPreproc(nil);
   PushPreproc(nil);
   try
   try
@@ -261,7 +255,7 @@ begin
       Preprocessor.VarMan.DefineVariable('Ver', -1, V, dsPublic);
       Preprocessor.VarMan.DefineVariable('Ver', -1, V, dsPublic);
 
 
       if not ParseDefinitions(PChar(Definitions), Preprocessor.VarMan) or
       if not ParseDefinitions(PChar(Definitions), Preprocessor.VarMan) or
-         not IncludeBuiltinsAndParseIncludeFiles(PChar(IncludeFiles),
+         not IncludeBuiltinsAndParseIncludeFiles(Params.CompilerPath, PChar(IncludeFiles),
            Preprocessor.FOptions.ParserOptions.Options) then
            Preprocessor.FOptions.ParserOptions.Options) then
       begin
       begin
         Result := ispeInvalidParam;
         Result := ispeInvalidParam;