Explorar o código

compatible with Delphi 2.

KngStr %!s(int64=11) %!d(string=hai) anos
pai
achega
34026bfea9
Modificáronse 2 ficheiros con 28 adicións e 4 borrados
  1. 27 3
      Projects/ISCC.dpr
  2. 1 1
      compile.bat

+ 27 - 3
Projects/ISCC.dpr

@@ -16,8 +16,6 @@ program ISCC;
 
 
 uses
 uses
   SafeDLLPath in 'SafeDLLPath.pas',
   SafeDLLPath in 'SafeDLLPath.pas',
-  IsppIntf in '.\ISPP\IsppIntf.pas',
-  IsppBase in '.\ISPP\IsppBase.pas',
   Windows, SysUtils, Classes,
   Windows, SysUtils, Classes,
   {$IFDEF STATICCOMPILER} Compile, {$ENDIF}
   {$IFDEF STATICCOMPILER} Compile, {$ENDIF}
   PathFunc, CmnFunc2, CompInt, FileClass, CompTypes;
   PathFunc, CmnFunc2, CompInt, FileClass, CompTypes;
@@ -33,6 +31,24 @@ type
     LineText: String;
     LineText: String;
     Next: PScriptLine;
     Next: PScriptLine;
   end;
   end;
+  
+  TOptionID = 0..25;
+
+  TOptions = packed set of TOptionID;
+
+  PIsppParserOptions = ^TIsppParserOptions;
+  TIsppParserOptions = packed record
+    Options: TOptions;
+  end;
+
+  TIsppOptions = packed record
+    ParserOptions: TIsppParserOptions;
+    Options: TOptions;
+    VerboseLevel: Byte;
+    InlineStart: string[7];
+    InlineEnd: string[7];
+    SpanSymbol: AnsiChar;
+  end;
 
 
 var
 var
   StdOutHandle, StdErrHandle: THandle;
   StdOutHandle, StdErrHandle: THandle;
@@ -48,6 +64,14 @@ var
   IsppOptions: TIsppOptions;
   IsppOptions: TIsppOptions;
   IsppMode: Boolean;
   IsppMode: Boolean;
 
 
+procedure SetOption(var Options: TOptions; Option: Char; Value: Boolean);
+begin
+  if Value then
+    Include(Options, Ord(UpCase(Option)) - Ord('A'))
+  else
+    Exclude(Options, Ord(UpCase(Option)) - Ord('A'))
+end;
+
 procedure PopulateOptions(var Options: TOptions; Symbol: Char);
 procedure PopulateOptions(var Options: TOptions; Symbol: Char);
 var
 var
   I: Integer;
   I: Integer;
@@ -420,7 +444,7 @@ begin
         end;
         end;
       end else if IsppMode and GetParam(S, 'D') then begin
       end else if IsppMode and GetParam(S, 'D') then begin
         if (Pos(';', S) > 0) or (Pos(' ', S) > 0) then
         if (Pos(';', S) > 0) or (Pos(' ', S) > 0) then
-          S := AnsiQuotedStr(S, '"');
+          S := AddQuotes(S);
         Definitions := Definitions + ';' + S;
         Definitions := Definitions + ';' + S;
       end
       end
       else if IsppMode and GetParam(S, 'I') then begin
       else if IsppMode and GetParam(S, 'I') then begin

+ 1 - 1
compile.bat

@@ -51,7 +51,7 @@ echo - Compil32.dpr
 if errorlevel 1 goto failed
 if errorlevel 1 goto failed
 
 
 echo - ISCC.dpr
 echo - ISCC.dpr
-"%DELPHI7ROOT%\bin\dcc32.exe" -Q -B -H -W %1 -U"%DELPHI7ROOT%\lib;..\Components" -E..\Files ISCC.dpr -DIS_ALLOWD7
+"%DELPHIROOT%\bin\dcc32.exe" -Q -B -H -W %1 -U"%DELPHIROOT%\lib;..\Components;..\Components\Ps\Source" -E..\Files -DPS_MINIVCL;PS_NOWIDESTRING;PS_NOINT64;PS_NOGRAPHCONST ISCC.dpr
 if errorlevel 1 goto failed
 if errorlevel 1 goto failed
 echo - ISCmplr.dpr
 echo - ISCmplr.dpr
 "%DELPHIROOT%\bin\dcc32.exe" -Q -B -H -W %1 -U"%DELPHIROOT%\lib;..\Components;..\Components\Ps\Source" -E..\Files -DPS_MINIVCL;PS_NOWIDESTRING;PS_NOINT64;PS_NOGRAPHCONST ISCmplr.dpr
 "%DELPHIROOT%\bin\dcc32.exe" -Q -B -H -W %1 -U"%DELPHIROOT%\lib;..\Components;..\Components\Ps\Source" -E..\Files -DPS_MINIVCL;PS_NOWIDESTRING;PS_NOINT64;PS_NOGRAPHCONST ISCmplr.dpr