]> pd.if.org Git - zpackage/blobdiff - zpm-addfile.c
fix compile process for elf programs
[zpackage] / zpm-addfile.c
index fd8d67b4c50231331d6e721f301fa26b5216e6ca..f96d00279592690a682f4ccb12d2fef3626fda37 100644 (file)
@@ -1,6 +1,7 @@
 #include <stdlib.h>
 #include <stdio.h>
 #include "zpm.h"
+#include "sqlite/sqlite3.h"
 
 int main(int ac, char **av){
        struct zpm pkg;
@@ -12,13 +13,16 @@ int main(int ac, char **av){
                return 1;
        }
 
-       /* this is really just read env */
-       zpm_readopts(&pkg, ac, av);
-
+#if 0
+       i = sqlite3_config(SQLITE_CONFIG_MMAP_SIZE,98222080);
+       if (i != SQLITE_OK) {
+               exit(3);
+       }
+#endif
        if (zpm_open(&pkg, av[1])) {
                zpm_begin(&pkg);
                for (i=2; i<ac; i++) {
-                       if (zpm_import(&pkg, av[2], 0, hash)) {
+                       if (zpm_import(&pkg, av[i], 0, hash)) {
                                fprintf(stdout, "%s\n", hash);
        //                      zpm_addtopackage(&pkg, hash, 0);
                                //fprintf(stdout, "%s %s\n", hash, av[2]);