]> git.saurik.com Git - apt.git/blobdiff - cmdline/apt-get.cc
fixed casting bug
[apt.git] / cmdline / apt-get.cc
index 07086b72f18a5bba1a7e1897aa2c10c54cd8071c..f7313a07e990a81ce4582ee24382e1c04d2f522a 100644 (file)
@@ -1,6 +1,6 @@
 // -*- mode: cpp; mode: fold -*-
 // Description                                                         /*{{{*/
-// $Id: apt-get.cc,v 1.27 1998/12/07 00:34:24 jgg Exp $
+// $Id: apt-get.cc,v 1.31 1998/12/14 02:23:47 jgg Exp $
 /* ######################################################################
    
    apt-get - Cover for dpkg
@@ -208,6 +208,7 @@ void ShowDel(ostream &out,pkgDepCache &Dep)
    for (;I.end() != true; I++)
       if (Dep[I].Delete() == true)
         List += string(I.Name()) + " ";
+   
    ShowList(out,"The following packages will be REMOVED:",List);
 }
                                                                        /*}}}*/
@@ -485,7 +486,7 @@ bool InstallPackages(CacheFile &Cache,bool ShwKept,bool Ask = true)
 
    if (Cache->DelCount() == 0 && Cache->InstCount() == 0 && 
        Cache->BadCount() == 0)
-      return true;   
+      return true;
 
    // Run the simulator ..
    if (_config->FindB("APT::Get::Simulate") == true)
@@ -958,7 +959,7 @@ bool DoCheck(CommandLine &CmdL)
 // ShowHelp - Show a help screen                                       /*{{{*/
 // ---------------------------------------------------------------------
 /* */
-int ShowHelp()
+bool ShowHelp(CommandLine &CmdL)
 {
    cout << PACKAGE << ' ' << VERSION << " for " << ARCHITECTURE <<
        " compiled on " << __DATE__ << "  " << __TIME__ << endl;
@@ -1057,6 +1058,7 @@ int main(int argc,const char *argv[])
                                    {"dselect-upgrade",&DoDSelectUpgrade},
                                    {"clean",&DoClean},
                                    {"check",&DoCheck},
+                                  {"help",&ShowHelp},
                                    {0,0}};
    
    // Parse the command line and initialize the package library
@@ -1071,7 +1073,7 @@ int main(int argc,const char *argv[])
    // See if the help should be shown
    if (_config->FindB("help") == true ||
        CmdL.FileSize() == 0)
-      return ShowHelp();
+      return ShowHelp(CmdL);
 
    // Setup the output streams
    c0out.rdbuf(cout.rdbuf());
@@ -1095,8 +1097,6 @@ int main(int argc,const char *argv[])
    {
       bool Errors = _error->PendingError();
       _error->DumpErrors();
-      if (Errors == true)
-        cout << "Returning 100." << endl;
       return Errors == true?100:0;
    }