1 #define _POSIX_C_SOURCE 2
12 int zpm_foreach_path(struct zpm *zpm, char *pkgid,
13 int (*callback)(void *f, int ncols, char **vals, char **cols),
14 void *data, char **errmsg) {
16 char *files = "select * from packagefiles where"
17 " printf('%%s-%%s-%%s', package, version, release) = %Q"
23 if (!zpm || zpm->error || !pkgid || !callback) return 0;
25 sql = sqlite3_mprintf(files, pkgid);
31 zpm_exec(zpm, sql, callback, data, errmsg);