]> git.saurik.com Git - apt.git/blobdiff - cmdline/apt-extracttemplates.cc
use forward declaration in headers if possible instead of includes
[apt.git] / cmdline / apt-extracttemplates.cc
index 6d580cc28b55417f8e69a02f26ab3b17b21b82b6..d5c1a3208db11c0a7d7b78bc1bad75fc450d4c38 100644 (file)
@@ -13,6 +13,8 @@
    ##################################################################### */
                                                                        /*}}}*/
 // Include Files                                                       /*{{{*/
+#include<config.h>
+
 #include <apt-pkg/init.h>
 #include <apt-pkg/cmndline.h>
 #include <apt-pkg/pkgcache.h>
@@ -28,7 +30,8 @@
 #include <apt-pkg/error.h>
 #include <apt-pkg/strutl.h>
 #include <apt-pkg/fileutl.h>
-       
+#include <apt-pkg/pkgsystem.h>
+
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
@@ -36,7 +39,6 @@
 #include <fstream>
 
 #include <locale.h>
-#include <config.h>
 #include <apti18n.h>
 #include "apt-extracttemplates.h"
                                                                        /*}}}*/
@@ -249,7 +251,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 +298,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 +349,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 +391,4 @@ int main(int argc, const char **argv)
        
        return 0;
 }
+                                                                       /*}}}*/