소스 검색

Minor cleanup.

Martijn Laan 11 년 전
부모
커밋
c37a599bd0
3개의 변경된 파일13개의 추가작업 그리고 18개의 파일을 삭제
  1. 10 14
      Projects/ISCC.dpr
  2. 2 3
      README.md
  3. 1 1
      setup.iss

+ 10 - 14
Projects/ISCC.dpr

@@ -31,18 +31,13 @@ type
     LineText: String;
     LineText: String;
     Next: PScriptLine;
     Next: PScriptLine;
   end;
   end;
-  
+
   TOptionID = 0..25;
   TOptionID = 0..25;
 
 
   TOptions = packed set of TOptionID;
   TOptions = packed set of TOptionID;
 
 
-  PIsppParserOptions = ^TIsppParserOptions;
-  TIsppParserOptions = packed record
-    Options: TOptions;
-  end;
-
   TIsppOptions = packed record
   TIsppOptions = packed record
-    ParserOptions: TIsppParserOptions;
+    ParserOptions: TOptions;
     Options: TOptions;
     Options: TOptions;
     VerboseLevel: Byte;
     VerboseLevel: Byte;
     InlineStart: string[7];
     InlineStart: string[7];
@@ -143,14 +138,14 @@ begin
   with Opt do
   with Opt do
   begin
   begin
     SetOption(Options, 'C', True);
     SetOption(Options, 'C', True);
-    SetOption(ParserOptions.Options, 'B', True);
-    SetOption(ParserOptions.Options, 'P', True);
+    SetOption(ParserOptions, 'B', True);
+    SetOption(ParserOptions, 'P', True);
     VerboseLevel := 0;
     VerboseLevel := 0;
     InlineStart := '{#';
     InlineStart := '{#';
     InlineEnd := '}';
     InlineEnd := '}';
 
 
     PopulateOptions(Options, '$');
     PopulateOptions(Options, '$');
-    PopulateOptions(ParserOptions.Options, 'p');
+    PopulateOptions(ParserOptions, 'p');
   end;
   end;
 
 
   Definitions := 'ISPPCC_INVOKED';
   Definitions := 'ISPPCC_INVOKED';
@@ -159,9 +154,8 @@ end;
 
 
 procedure IsppOptionsToString(var S: String; Opt: TIsppOptions; Definitions, IncludePath: String);
 procedure IsppOptionsToString(var S: String; Opt: TIsppOptions; Definitions, IncludePath: String);
 begin
 begin
-  with Opt do
-  begin
-    AppendOption(S, 'ISPP:ParserOptions', ConvertOptionsToString(ParserOptions.Options));
+  with Opt do begin
+    AppendOption(S, 'ISPP:ParserOptions', ConvertOptionsToString(ParserOptions));
     AppendOption(S, 'ISPP:Options', ConvertOptionsToString(Options));
     AppendOption(S, 'ISPP:Options', ConvertOptionsToString(Options));
     AppendOption(S, 'ISPP:VerboseLevel', IntToStr(VerboseLevel));
     AppendOption(S, 'ISPP:VerboseLevel', IntToStr(VerboseLevel));
     AppendOption(S, 'ISPP:InlineStart', String(InlineStart));
     AppendOption(S, 'ISPP:InlineStart', String(InlineStart));
@@ -408,11 +402,13 @@ procedure ProcessCommandLine;
       WriteStdErr('  /{#<string>        Emulate #pragma inlinestart <string>');
       WriteStdErr('  /{#<string>        Emulate #pragma inlinestart <string>');
       WriteStdErr('  /}<string>         Emulate #pragma inlineend <string>');
       WriteStdErr('  /}<string>         Emulate #pragma inlineend <string>');
       WriteStdErr('  /V<number>         Emulate #pragma verboselevel <number>');
       WriteStdErr('  /V<number>         Emulate #pragma verboselevel <number>');
+    end;
+    WriteStdErr('  /?                 Show this help screen');
+    if IsppMode then begin
       WriteStdErr('');
       WriteStdErr('');
       WriteStdErr('Example: iscc /$c- /Pu+ "/DLic=Trial Lic.txt" /IC:\INC;D:\INC scriptfile.iss');
       WriteStdErr('Example: iscc /$c- /Pu+ "/DLic=Trial Lic.txt" /IC:\INC;D:\INC scriptfile.iss');
       WriteStdErr('');
       WriteStdErr('');
     end;
     end;
-    WriteStdErr('  /?                 Show this help screen');
   end;
   end;
 
 
 var
 var

+ 2 - 3
README.md

@@ -154,8 +154,7 @@ under Delphi 3 (3.02 to be exact). The rest of the projects are compiled
 under Delphi 2.01.
 under Delphi 2.01.
 
 
 **ISCC** - This is the command-line front-end to the compiler. Like
 **ISCC** - This is the command-line front-end to the compiler. Like
-Compil32, it depends on ISCmplr.dll to do the actual compiling. If
-ispp.dll exist, extra preprocessor related parameters would be supported.
+Compil32, it depends on ISCmplr.dll to do the actual compiling.
 
 
 **ISCmplr** - This is a DLL which is loaded by Compil32 and ISCC to compile
 **ISCmplr** - This is a DLL which is loaded by Compil32 and ISCC to compile
 scripts. The actual compiler code is in Compile.pas. See CompInt.pas for the
 scripts. The actual compiler code is in Compile.pas. See CompInt.pas for the
@@ -181,7 +180,7 @@ How do the projects link together?
   clauses of the projects and units if you aren't sure if a project uses a
   clauses of the projects and units if you aren't sure if a project uses a
   particular unit.
   particular unit.
 
 
-- ISPP use various copies of other Inno Setup files. To synch these
+- ISPP uses various copies of other Inno Setup files. To synch these
   run synch-isfiles.bat.
   run synch-isfiles.bat.
 
 
 5. Source code tips
 5. Source code tips

+ 1 - 1
setup.iss

@@ -95,7 +95,7 @@ Source: "license.txt"; DestDir: "{app}"; Flags: ignoreversion touch
 Source: "ishelp\Staging\ISetup.chm"; DestDir: "{app}"; Flags: ignoreversion touch
 Source: "ishelp\Staging\ISetup.chm"; DestDir: "{app}"; Flags: ignoreversion touch
 Source: "files\Compil32.exe"; DestDir: "{app}"; Flags: ignoreversion touch
 Source: "files\Compil32.exe"; DestDir: "{app}"; Flags: ignoreversion touch
 Source: "files\isscint.dll"; DestDir: "{app}"; Flags: ignoreversion touch
 Source: "files\isscint.dll"; DestDir: "{app}"; Flags: ignoreversion touch
-Source: "files\ISCC.exe"; DestDir: "{app}"; Flags: ignoreversion touch;
+Source: "files\ISCC.exe"; DestDir: "{app}"; Flags: ignoreversion touch
 Source: "files\ISCmplr.dll"; DestDir: "{app}"; Flags: ignoreversion touch
 Source: "files\ISCmplr.dll"; DestDir: "{app}"; Flags: ignoreversion touch
 Source: "files\Setup.e32"; DestDir: "{app}"; Flags: ignoreversion touch
 Source: "files\Setup.e32"; DestDir: "{app}"; Flags: ignoreversion touch
 Source: "files\SetupLdr.e32"; DestDir: "{app}"; Flags: ignoreversion touch
 Source: "files\SetupLdr.e32"; DestDir: "{app}"; Flags: ignoreversion touch