Radish alpha
H
HardenedBSD Package Manager
Radicle
Git (anonymous pull)
Log in to clone via SSH
Add an function to return the number of repositories
Baptiste Daroussin committed 12 years ago
commit 8592c4a4c6051b84ee9fec518f59e0244db51063
parent 0f5640a1b98f5ff9eba59cd949ec6453b0a5dcc9
2 files changed +7 -0
modified libpkg/pkg.h.in
@@ -1360,6 +1360,7 @@ int pkg_to_old(struct pkg *pkg);
int pkg_register_old(struct pkg *pkg);
int pkg_sshserve(void);

+
int pkg_repos_count(void);
int pkg_repos(struct pkg_repo **);
const char *pkg_repo_url(struct pkg_repo *r);
const char *pkg_repo_ident(struct pkg_repo *r);
modified libpkg/pkg_config.c
@@ -1180,6 +1180,12 @@ pkg_shutdown(void)
}

int
+
pkg_repos_count(void)
+
{
+
	return (HASH_COUNT(repos));
+
}
+

+
int
pkg_repos(struct pkg_repo **r)
{
	HASH_NEXT(repos, (*r));