// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: apt-cache.cc,v 1.53 2001/12/07 05:57:43 jgg Exp $
+// $Id: apt-cache.cc,v 1.58 2002/03/26 07:38:58 jgg Exp $
/* ######################################################################
apt-cache - Manages the cache files
#include <config.h>
#include <apti18n.h>
-#include <iostream.h>
+#include <locale.h>
+#include <iostream>
#include <unistd.h>
#include <errno.h>
#include <regex.h>
_("Usage: apt-cache [options] command\n"
" apt-cache [options] add file1 [file1 ...]\n"
" apt-cache [options] showpkg pkg1 [pkg2 ...]\n"
+ " apt-cache [options] showsrc pkg1 [pkg2 ...]\n"
"\n"
"apt-cache is a low-level tool used to manipulate APT's binary\n"
"cache files, and query information from them\n"
" add - Add an package file to the source cache\n"
" gencaches - Build both the package and source cache\n"
" showpkg - Show some general information for a single package\n"
+ " showsrc - Show source records\n"
" stats - Show some basic statistics\n"
" dump - Show the entire file in a terse form\n"
" dumpavail - Print an available file to stdout\n"
{0,0}};
CacheInitialize();
-
+
+ // Set up gettext support
+ setlocale(LC_ALL,"");
+ textdomain(PACKAGE);
+
// Parse the command line and initialize the package library
CommandLine CmdL(Args,_config);
if (pkgInitConfig(*_config) == false ||
if (CmdL.DispatchArg(CmdsA,false) == false && _error->PendingError() == false)
{
- MMap *Map;
+ MMap *Map = 0;
if (_config->FindB("APT::Cache::Generate",true) == false)
{
Map = new MMap(*new FileFd(_config->FindFile("Dir::Cache::pkgcache"),