Browse Source

* fixed cmdline handling so that multiple parameters can be passed.
Needed for bug #16344, since a -Fi. needs to be passed.

git-svn-id: trunk@15732 -

marco 15 years ago
parent
commit
2f1581af8a
1 changed files with 6 additions and 1 deletions
  1. 6 1
      packages/fcl-passrc/examples/test_parser.pp

+ 6 - 1
packages/fcl-passrc/examples/test_parser.pp

@@ -36,6 +36,7 @@ var
   E: TPasTreeContainer;
   E: TPasTreeContainer;
   I: Integer;
   I: Integer;
   Decls: TList;
   Decls: TList;
+  cmdl : string;
 begin
 begin
   if Paramcount<1 then
   if Paramcount<1 then
     begin
     begin
@@ -44,9 +45,13 @@ begin
       writeln('usage: test_parser <commandline>');
       writeln('usage: test_parser <commandline>');
       halt;
       halt;
     end;
     end;
+  cmdl:=paramstr(1);
+  if paramcount>1 then
+    for i:=2 to paramcount do
+      cmdl:=cmdl+' '+paramstr(i);
   E := TSimpleEngine.Create;
   E := TSimpleEngine.Create;
   try
   try
-    M := ParseSource(E, ParamStr(1), 'linux', 'i386');
+    M := ParseSource(E, cmdl , 'linux', 'i386');
 
 
     { Cool, we successfully parsed the unit.
     { Cool, we successfully parsed the unit.
       Now output some info about it. }
       Now output some info about it. }