+#ifndef ZPM_H_
+#define ZPM_H_ 1
+
#include <stdint.h>
#include <time.h>
#include <sqlite3.h>
char *version;
int release;
char *pkgname;
+ int error; /* internal error number */
time_t installed; /* install time, 0 for not installed */
};
void *compresslzma(void *buf, size_t bufsize, size_t *len);
#define SQLERROR(x) fprintf(stderr, "%s %d: %s\n", __func__, __LINE__, (x))
int zpm_hash(char *path, char *hash, uint32_t flags);
+int zpm_readopts(struct zpm *pkg, int ac, char **av);
+
+int zpm_vercmp(const char *a, const char *b);
+
+/* add vercmp collation to db */
+int zpm_addvercmp(struct zpm *pkg);
+
+int zpm_exec(struct zpm *z, const char *sql, int(*callback)(void *, int, char **, char**), void *arg, char **errmsg);
+
+
+#endif