X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/8561c2fedae26aecd8ba758a5e7ef686ba1243f3..0fb16c3e678044d6d06ba8a6199b1e96487ee0d8:/cmdline/apt-sortpkgs.cc diff --git a/cmdline/apt-sortpkgs.cc b/cmdline/apt-sortpkgs.cc index 5057ac626..cf19b84ec 100644 --- a/cmdline/apt-sortpkgs.cc +++ b/cmdline/apt-sortpkgs.cc @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include @@ -132,18 +133,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 GetCommands() /*{{{*/ +static std::vector GetCommands() /*{{{*/ { return { {nullptr, nullptr, nullptr} @@ -152,10 +153,8 @@ std::vector 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++)