X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/b21c043804b1be7f4d79ac3f5a6615dc96f26a42..fb83d0ccdda584a5aa9a93d87c6c71a03bc24ed4:/cmdline/apt-extracttemplates.cc diff --git a/cmdline/apt-extracttemplates.cc b/cmdline/apt-extracttemplates.cc index d6894a732..8fe15fdf9 100644 --- a/cmdline/apt-extracttemplates.cc +++ b/cmdline/apt-extracttemplates.cc @@ -13,6 +13,8 @@ ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ +#include + #include #include #include @@ -28,17 +30,19 @@ #include #include #include - +#include + #include #include #include #include +#include + #include -#include -#include -#include #include "apt-extracttemplates.h" + +#include /*}}}*/ using namespace std; @@ -51,8 +55,8 @@ pkgCache *DebFile::Cache = 0; // --------------------------------------------------------------------- /* */ DebFile::DebFile(const char *debfile) - : File(debfile, FileFd::ReadOnly), Control(0), DepOp(0), - PreDepOp(0), Config(0), Template(0), Which(None) + : File(debfile, FileFd::ReadOnly), Size(0), Control(NULL), ControlLen(0), + DepOp(0), PreDepOp(0), Config(0), Template(0), Which(None) { } /*}}}*/ @@ -222,8 +226,8 @@ bool DebFile::ParseInfo() /* */ int ShowHelp(void) { - ioprintf(cout,_("%s %s for %s %s compiled on %s %s\n"),PACKAGE,VERSION, - COMMON_OS,COMMON_CPU,__DATE__,__TIME__); + ioprintf(cout,_("%s %s for %s compiled on %s %s\n"),PACKAGE,PACKAGE_VERSION, + COMMON_ARCH,__DATE__,__TIME__); if (_config->FindB("version") == true) return 0; @@ -238,7 +242,7 @@ int ShowHelp(void) " -h This help text\n" " -t Set the temp dir\n" " -c=? Read this configuration file\n" - " -o=? Set an arbitary configuration option, eg -o dir::cache=/tmp\n"); + " -o=? Set an arbitrary configuration option, eg -o dir::cache=/tmp\n"); return 0; } /*}}}*/ @@ -249,7 +253,7 @@ string WriteFile(const char *package, const char *prefix, const char *data) { char fn[512]; static int i; - char *tempdir = NULL; + const char *tempdir = NULL; tempdir = getenv("TMPDIR"); if (tempdir == NULL) @@ -296,8 +300,7 @@ bool Go(CommandLine &CmdL) MMap *Map = 0; pkgSourceList List; List.ReadMainList(); - OpProgress Prog; - pkgMakeStatusCache(List,Prog,&Map,true); + pkgCacheGenerator::MakeStatusCache(List,NULL,&Map,true); if (Map == 0) return false; DebFile::Cache = new pkgCache(Map); @@ -348,8 +351,7 @@ bool Go(CommandLine &CmdL) return !_error->PendingError(); } /*}}}*/ - -int main(int argc, const char **argv) +int main(int argc, const char **argv) /*{{{*/ { CommandLine::Args Args[] = { {'h',"help","help",0}, @@ -391,3 +393,4 @@ int main(int argc, const char **argv) return 0; } + /*}}}*/