]> git.saurik.com Git - apt.git/blobdiff - cmdline/apt-sortpkgs.cc
Merge pull request Debian/apt#16 from dombenson/master
[apt.git] / cmdline / apt-sortpkgs.cc
index 5057ac626ad47fc53aa57ccc4535dec1252be00e..b80bbedd6d93e39c4205c5b6e1b28b5680c7c925 100644 (file)
@@ -132,18 +132,18 @@ static bool DoIt(string InFile)
    return true;
 }
                                                                        /*}}}*/
-bool ShowHelp(CommandLine &)                                           /*{{{*/
+static bool ShowHelp(CommandLine &)                                    /*{{{*/
 {
    std::cout <<
     _("Usage: apt-sortpkgs [options] file1 [file2 ...]\n"
       "\n"
       "apt-sortpkgs is a simple tool to sort package information files.\n"
-      "It sorts by default by binary package information, but the -s option\n"
+      "By default it sorts by binary package information, but the -s option\n"
       "can be used to switch to source package ordering instead.\n");
    return true;
 }
                                                                        /*}}}*/
-std::vector<aptDispatchWithHelp> GetCommands()                         /*{{{*/
+static std::vector<aptDispatchWithHelp> GetCommands()                  /*{{{*/
 {
    return {
       {nullptr, nullptr, nullptr}
@@ -152,10 +152,8 @@ std::vector<aptDispatchWithHelp> GetCommands()                             /*{{{*/
                                                                        /*}}}*/
 int main(int argc,const char *argv[])                                  /*{{{*/
 {
-   InitLocale();
-
    CommandLine CmdL;
-   ParseCommandLine(CmdL, APT_CMD::APT_SORTPKG, &_config, &_system, argc, argv);
+   ParseCommandLine(CmdL, APT_CMD::APT_SORTPKG, &_config, &_system, argc, argv, &ShowHelp, &GetCommands);
 
    // Match the operation
    for (unsigned int I = 0; I != CmdL.FileSize(); I++)