Git-Url: http://git.frugalware.org/gitweb/gitweb.cgi?p=cfpm.git;a=commitdiff;h=3b878a66d3a3cf4ef0012f35ced1a2bbe0dc9b11
commit 3b878a66d3a3cf4ef0012f35ced1a2bbe0dc9b11 Author: Priyank <priy...@frugalware.org> Date: Fri Jun 5 14:34:24 2009 +0530 update test code diff --git a/main.cc b/main.cc index 6f4b5b1..4f7a0dd 100644 --- a/main.cc +++ b/main.cc @@ -1,11 +1,38 @@ +#include <iostream> #include "args.hh" +#include "pm.hh" + +using namespace PM; +using std::cout; +using std::cerr; +using std::endl; +using std::string; int main(int argc,char **argv) { Args args; + Database *db; - if( !args.parseArgs(argc,argv) ) - return 1; + //if( !args.parseArgs(argc,argv) ) + // return 1; + + /* initialize libpacman */ + if( !initialize("/") ) + cerr<<"Error initializing libpacman"<<endl; + + /* register a new database */ + db = new Database; + if ( db->registerDb("local") ) + cout<<"database registered"<<endl; + else + db->printStatus(); + + /* unregister database */ + db->unregisterDb(); + + /* release libpacman */ + release(); return 0; } + _______________________________________________ Frugalware-git mailing list Frugalware-git@frugalware.org http://frugalware.org/mailman/listinfo/frugalware-git