diff options
author | Detlev Casanova <detlev.casanova@gmail.com> | 2010-07-29 13:43:26 +0200 |
---|---|---|
committer | Detlev Casanova <detlev.casanova@gmail.com> | 2010-07-29 13:43:26 +0200 |
commit | e4edeb3446e6e6cbe38eee061d6e1cc60aa4b094 (patch) | |
tree | 566c386ca4de9c233acd19d1bb9609a09fbaa5c7 /src/tester.c | |
download | c-portage-e4edeb3446e6e6cbe38eee061d6e1cc60aa4b094.tar.gz c-portage-e4edeb3446e6e6cbe38eee061d6e1cc60aa4b094.tar.bz2 c-portage-e4edeb3446e6e6cbe38eee061d6e1cc60aa4b094.zip |
Initial library commit
Diffstat (limited to 'src/tester.c')
-rw-r--r-- | src/tester.c | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/src/tester.c b/src/tester.c new file mode 100644 index 0000000..02e43df --- /dev/null +++ b/src/tester.c @@ -0,0 +1,51 @@ +#include <stdlib.h> +#include "interpreter.h" + +int main(int argc, char *argv[]) +{ + argc = argc; + argv = argv; + int ret = 0; + portageInit(); + + /*Message *msg = messageCreate("portage", 0, 0, 0); + BareConfig *cfg = bareConfigCreate(msg, 0, 0, 0); + + LaymanAPI *l = portageAPICreate(cfg, 0, 0); + if (0 == portageAPIFetchRemoteList(l)) + { + printf("Unable to fetch the remote list.\n"); + ret = -1; + } + + StringList *strs = portageAPIGetAvailable(l, 0); + printf("list:\n"); + stringListPrint(strs); + + printf("\n"); + + unsigned int len = stringListCount(strs); + //OverlayInfo *infos = calloc(len, sizeof(OverlayInfo)); + //int count = portageAPIGetAllInfos(l, strs, infos); + + OverlayInfo *oi = portageAPIGetAllInfo(l, "kuroo"); + if (oi) + { + printf("%s\n~~~~~~~~~~~~~~~~~~~~\n", oi->name); + printf("%s\n\n", oi->description); + overlayInfoFree(*oi); + free(oi); + } + + printf("\n"); + + //free(infos); + stringListFree(strs); + + bareConfigFree(cfg); + portageAPIFree(l);*/ + + portageFinalize(); + + return ret; +} |