From: Michael Tremer Date: Thu, 30 Jan 2025 16:59:44 +0000 (+0000) Subject: repo: Make path composition public X-Git-Tag: 0.9.30~248 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b03dd1e03a457e5babd9bfa2ca2882d470092c15;p=pakfire.git repo: Make path composition public Signed-off-by: Michael Tremer --- diff --git a/src/pakfire/repo.c b/src/pakfire/repo.c index 90db8ff4..671297c0 100644 --- a/src/pakfire/repo.c +++ b/src/pakfire/repo.c @@ -199,14 +199,7 @@ char* pakfire_repo_url_replace(struct pakfire_repo* repo, const char* url) { return buffer; } -#define pakfire_repo_path(repo, path, format, ...) \ - __pakfire_repo_path(repo, path, sizeof(path), format, __VA_ARGS__) - -static int __pakfire_repo_path(struct pakfire_repo* repo, - char* path, const size_t length, const char* format, ...) - __attribute__((format(printf, 4, 5))); - -static int __pakfire_repo_path(struct pakfire_repo* repo, +int __pakfire_repo_path(struct pakfire_repo* repo, char* path, const size_t length, const char* format, ...) { char buffer[PATH_MAX]; va_list args; diff --git a/src/pakfire/repo.h b/src/pakfire/repo.h index 7b4e7996..df2bcbc9 100644 --- a/src/pakfire/repo.h +++ b/src/pakfire/repo.h @@ -71,6 +71,12 @@ int pakfire_repo_set_mirrorlist_url(struct pakfire_repo* repo, const char* url); struct pakfire_mirrorlist* pakfire_repo_get_mirrors(struct pakfire_repo* repo); +#define pakfire_repo_path(repo, path, format, ...) \ + __pakfire_repo_path(repo, path, sizeof(path), format, __VA_ARGS__) +int __pakfire_repo_path(struct pakfire_repo* repo, + char* path, const size_t length, const char* format, ...) + __attribute__((format(printf, 4, 5))); + int pakfire_repo_write_config(struct pakfire_repo* repo, FILE* f); int pakfire_repo_is_installed_repo(struct pakfire_repo* repo);