}
/*}}}*/
-bool ShowHelp(CommandLine &) /*{{{*/
+static bool ShowHelp(CommandLine &) /*{{{*/
{
std::cout <<
_("Usage: apt-ftparchive [options] command\n"
_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;
- PackageMap *I = (PackageMap *)End->UserData;
+ PackageMap * const I = static_cast<PackageMap *>(End->UserData);
if (I->PkgDone == true)
continue;
if (I->GenPackages(Setup,Stats) == false)
}
// Do the generation for Sources
- for (End = List; End->Str != 0; End++)
+ for (End = List; End->Str != 0; ++End)
{
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)
}
/*}}}*/
-std::vector<aptDispatchWithHelp> GetCommands() /*{{{*/
+static std::vector<aptDispatchWithHelp> GetCommands() /*{{{*/
{
return {
{"packages",&SimpleGenPackages, nullptr},
/*}}}*/
int main(int argc, const char *argv[]) /*{{{*/
{
- InitLocale();
-
// 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);