]> git.saurik.com Git - apt.git/blobdiff - cmdline/apt.cc
support dpkg debug mode in APT::StateChanges
[apt.git] / cmdline / apt.cc
index 761ad60db5ccc6386ea3e606205e3a3ebf76d81f..4b266bcbe94b61e496dd76cb19473256a76cd1bd 100644 (file)
@@ -40,7 +40,7 @@
 #include <apti18n.h>
                                                                        /*}}}*/
 
-bool ShowHelp(CommandLine &)                                           /*{{{*/
+static bool ShowHelp(CommandLine &)                                    /*{{{*/
 {
    std::cout <<
       _("Usage: apt [options] command\n"
@@ -53,7 +53,7 @@ bool ShowHelp(CommandLine &)                                          /*{{{*/
    return true;
 }
                                                                        /*}}}*/
-std::vector<aptDispatchWithHelp> GetCommands()                         /*{{{*/
+static std::vector<aptDispatchWithHelp> GetCommands()                  /*{{{*/
 {
    return {
       // query
@@ -97,10 +97,8 @@ std::vector<aptDispatchWithHelp> GetCommands()                               /*{{{*/
                                                                        /*}}}*/
 int main(int argc, const char *argv[])                                 /*{{{*/
 {
-   InitLocale();
-
    CommandLine CmdL;
-   auto const Cmds = ParseCommandLine(CmdL, APT_CMD::APT, &_config, &_system, argc, argv);
+   auto const Cmds = ParseCommandLine(CmdL, APT_CMD::APT, &_config, &_system, argc, argv, &ShowHelp, &GetCommands);
 
    int const quiet = _config->FindI("quiet", 0);
    if (quiet == 2)