]> git.saurik.com Git - apt.git/blobdiff - cmdline/apt-cache.cc
glibc fix
[apt.git] / cmdline / apt-cache.cc
index 83fe53dfe0347ac3d3a8031e8f463a12411c5090..26d96c86011340381f85c6afe888e83c33d44a77 100644 (file)
@@ -1,6 +1,6 @@
 // -*- mode: cpp; mode: fold -*-
 // Description                                                         /*{{{*/
-// $Id: apt-cache.cc,v 1.21 1998/12/31 01:32:20 jgg Exp $
+// $Id: apt-cache.cc,v 1.24 1999/02/08 07:54:58 jgg Exp $
 /* ######################################################################
    
    apt-cache - Manages the cache files
 #include <apt-pkg/progress.h>
 #include <apt-pkg/sourcelist.h>
 #include <apt-pkg/cmndline.h>
-#include <strutl.h>
+#include <apt-pkg/strutl.h>
+#include <config.h>
 
 #include <iostream.h>
-#include <config.h>
+#include <errno.h>
                                                                        /*}}}*/
 
 pkgCache *GCache = 0;
@@ -447,6 +448,8 @@ bool ShowHelp(CommandLine &Cmd)
 {
    cout << PACKAGE << ' ' << VERSION << " for " << ARCHITECTURE <<
        " compiled on " << __DATE__ << "  " << __TIME__ << endl;
+   if (_config->FindB("version") == true)
+      return 100;
    
    cout << "Usage: apt-cache [options] command" << endl;
    cout << "       apt-cache [options] add file1 [file1 ...]" << endl;
@@ -492,6 +495,7 @@ int main(int argc,const char *argv[])
 {
    CommandLine::Args Args[] = {
       {'h',"help","help",0},
+      {'v',"version","version",0},
       {'p',"pkg-cache","Dir::Cache::pkgcache",CommandLine::HasArg},
       {'s',"src-cache","Dir::Cache::srcpkgcache",CommandLine::HasArg},
       {'q',"quiet","quiet",CommandLine::IntLevel},