X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=zpm.h;h=f8ce56bf598609efb4388da4379c1c8e722e8a3f;hb=1323381f0eeb38466d8afc185a5295e4b5024bd5;hp=f9e7b3391a8d725094e8127de6ba9f55a64c98d3;hpb=33ef8ea6e32e935fa8bf62b62710b216a1ce9b40;p=zpackage diff --git a/zpm.h b/zpm.h index f9e7b33..f8ce56b 100644 --- a/zpm.h +++ b/zpm.h @@ -9,6 +9,7 @@ #include #include +#include #define ZPM_HASH_STRLEN 64 @@ -53,7 +54,7 @@ struct zpm_tag { struct zpm_package { struct zpm *zpm; - struct jsw_hash *ht; + struct jsw_hash_t *ht; /* char pointers are just pointers into the hash table */ /* integers/times and such are passed through atoi */ @@ -76,7 +77,9 @@ struct zpm_package { }; int zpm_parse_package(char *pstr, char *name, char *ver, int *rel); -char *zpm_findpkg(struct zpm *zpm, char *pkgstr); +char *zpm_findpkg(struct zpm *zpm, char *pkgstr, char *where); +char *zpm_findlib(struct zpm *zpm, char *soname, char *where); +int zpm_libraries_needed(struct zpm *zpm, char *pkgid, jsw_atree_t *list); int zpm_quote(char *value, char *dest, size_t n); struct zpm_file { @@ -174,9 +177,14 @@ int zpm_exec(struct zpm *z, const char *sql, int(*callback)(void *, int, char ** int zpm_foreach_path(struct zpm *zpm, char *pkgid, char *where, int (*callback)(void *f, int ncols, char **vals, char **cols), void *data, char **errmsg); +int zpm_foreach_package(struct zpm *zpm, char *where, +int (*callback)(void *cbdata, int ncols, char **vals, char **cols), +void *data, char **errmsg); int zpm_script_hash(struct zpm *zpm, char *pkgstr, char *phase, char *hash); int zpm_script_set(struct zpm *zpm, char *pkgstr, char *phase, char *hash); +int zpm_foreach_script(struct zpm *zpm, char *pkgstr, char *stage, void *cbd, + int (*cb)(void *ud, const char *pkg, const char *stage, const char *hash)); int zpm_package_hash(struct zpm *zpm, char *pkgid, char *hash); int zpm_package_sethash(struct zpm *zpm, char *pkgid, char *hash);