aboutsummaryrefslogtreecommitdiff
path: root/src/repo.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/repo.c')
-rw-r--r--src/repo.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/repo.c b/src/repo.c
index 9238a27..8d16320 100644
--- a/src/repo.c
+++ b/src/repo.c
@@ -1,11 +1,11 @@
-#define _XOPEN_SOURCE 700
-
#include "repo.h"
#include "dirent.h"
#include "limits.h"
#include "malloc.h"
+#include "package.h"
#include "stdio.h"
+#include <lua.h>
int repo_check_package(pow_repo **repos, size_t repo_count, const char *query) {
if (!repos) {
@@ -49,6 +49,16 @@ int repo_check_package(pow_repo **repos, size_t repo_count, const char *query) {
printf("found package %s in repo %s\n", query, repos[i]->path);
+ pow_package *pkg = malloc(sizeof(pow_package));
+
+ package_open(pkg, "../testing/samurai/1.3.lua");
+
+ printf("Name: %s\n"
+ "Version: %s\n",
+ pkg->name, pkg->version);
+
+ package_close(pkg);
+
closedir(dp);
}