Explorar o código

options.pas:
* TOption.interpret_option & read_arguments: use add_package() from pkgutils instead of addpackage() from fpkg
fpkg.pas:
- remove no longer needed addpackage()

git-svn-id: branches/svenbarth/packages@31934 -

svenbarth %!s(int64=9) %!d(string=hai) anos
pai
achega
b1f03841c9
Modificáronse 2 ficheiros con 3 adicións e 15 borrados
  1. 0 12
      compiler/fpkg.pas
  2. 3 3
      compiler/options.pas

+ 0 - 12
compiler/fpkg.pas

@@ -56,23 +56,11 @@ interface
     end;
     ppackageentry=^tpackageentry;
 
-    procedure addpackage(list:tfphashlist;const pn:string);
-
 implementation
 
   uses
     cutils,globals;
 
-  procedure addpackage(list: tfphashlist;const pn:string);
-    var
-      pkgentry : ppackageentry;
-    begin
-      new(pkgentry);
-      pkgentry^.realpkgname:=pn;
-      pkgentry^.package:=nil;
-      list.add(upper(pn),pkgentry);
-    end;
-
   { tpackage }
 
   constructor tpackage.create(const pn: string);

+ 3 - 3
compiler/options.pas

@@ -94,7 +94,7 @@ uses
   symtable,scanner,rabase,
   symconst,
   dirparse,
-  fpkg,
+  pkgutil,
   i_bsd;
 
 const
@@ -1250,7 +1250,7 @@ begin
                      if ispara then
                        parapackages.add(more,nil)
                      else
-                       addpackage(packagelist,more);
+                       add_package(more,true);
                    end;
                  'p' :
                    begin
@@ -3294,7 +3294,7 @@ begin
   FrameworkSearchPath.AddList(option.ParaFrameworkPath,true);
   packagesearchpath.addlist(option.parapackagepath,true);
   for j:=0 to option.parapackages.count-1 do
-    addpackage(packagelist,option.parapackages.NameOfIndex(j));
+    add_package(option.parapackages.NameOfIndex(j),true);
 
   { add unit environment and exepath to the unit search path }
   if inputfilepath<>'' then