]> git.saurik.com Git - apt.git/blobdiff - ftparchive/apt-ftparchive.cc
keep Release.gpg on untrusted to trusted IMS-Hit
[apt.git] / ftparchive / apt-ftparchive.cc
index c7e38badfc1d9d166f702859e82b03c4e38fb299..ab6f48d616424b403ba11eed4ce2db0bf5fbff63 100644 (file)
@@ -615,7 +615,7 @@ static void LoadBinDir(vector<PackageMap> &PkgList,Configuration &Setup)
 }
                                                                        /*}}}*/
 
 }
                                                                        /*}}}*/
 
-bool ShowHelp(CommandLine &)                                           /*{{{*/
+static bool ShowHelp(CommandLine &)                                    /*{{{*/
 {
    std::cout <<
     _("Usage: apt-ftparchive [options] command\n"
 {
    std::cout <<
     _("Usage: apt-ftparchive [options] command\n"
@@ -819,12 +819,12 @@ static bool DoGeneratePackagesAndSources(Configuration &Setup,
       _error->DumpErrors();
       
       // Do the generation for Packages
       _error->DumpErrors();
       
       // Do the generation for Packages
-      for (End = List; End->Str != 0; End++)
+      for (End = List; End->Str != 0; ++End)
       {
         if (End->Hit == false)
            continue;
         
       {
         if (End->Hit == false)
            continue;
         
-        PackageMap *I = (PackageMap *)End->UserData;
+        PackageMap * const I = static_cast<PackageMap *>(End->UserData);
         if (I->PkgDone == true)
            continue;
         if (I->GenPackages(Setup,Stats) == false)
         if (I->PkgDone == true)
            continue;
         if (I->GenPackages(Setup,Stats) == false)
@@ -832,12 +832,12 @@ static bool DoGeneratePackagesAndSources(Configuration &Setup,
       }
       
       // Do the generation for Sources
       }
       
       // Do the generation for Sources
-      for (End = List; End->Str != 0; End++)
+      for (End = List; End->Str != 0; ++End)
       {
         if (End->Hit == false)
            continue;
         
       {
         if (End->Hit == false)
            continue;
         
-        PackageMap *I = (PackageMap *)End->UserData;
+        PackageMap * const I = static_cast<PackageMap *>(End->UserData);
         if (I->SrcDone == true)
            continue;
         if (I->GenSources(Setup,SrcStats) == false)
         if (I->SrcDone == true)
            continue;
         if (I->GenSources(Setup,SrcStats) == false)
@@ -1029,7 +1029,7 @@ static bool Clean(CommandLine &CmdL)
 }
                                                                        /*}}}*/
 
 }
                                                                        /*}}}*/
 
-std::vector<aptDispatchWithHelp> GetCommands()                         /*{{{*/
+static std::vector<aptDispatchWithHelp> GetCommands()                  /*{{{*/
 {
    return {
       {"packages",&SimpleGenPackages, nullptr},
 {
    return {
       {"packages",&SimpleGenPackages, nullptr},
@@ -1044,11 +1044,9 @@ std::vector<aptDispatchWithHelp> GetCommands()                           /*{{{*/
                                                                        /*}}}*/
 int main(int argc, const char *argv[])                                 /*{{{*/
 {
                                                                        /*}}}*/
 int main(int argc, const char *argv[])                                 /*{{{*/
 {
-   InitLocale();
-
    // Parse the command line and initialize the package library
    CommandLine CmdL;
    // Parse the command line and initialize the package library
    CommandLine CmdL;
-   auto const Cmds = ParseCommandLine(CmdL, APT_CMD::APT_FTPARCHIVE, &_config, NULL, argc, argv);
+   auto const Cmds = ParseCommandLine(CmdL, APT_CMD::APT_FTPARCHIVE, &_config, NULL, argc, argv, ShowHelp, &GetCommands);
 
    _config->CndSet("quiet",0);
    Quiet = _config->FindI("quiet",0);
 
    _config->CndSet("quiet",0);
    Quiet = _config->FindI("quiet",0);