]> git.ipfire.org Git - pakfire.git/commitdiff
ctx: Create a new type for the context
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 27 Jun 2025 10:20:11 +0000 (10:20 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 27 Jun 2025 10:20:11 +0000 (10:20 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
108 files changed:
src/cli/lib/build.c
src/cli/lib/config.c
src/cli/lib/config.h
src/cli/lib/daemon.c
src/cli/lib/daemon.h
src/cli/lib/dump.c
src/cli/lib/lint.c
src/cli/lib/pakfire.h
src/cli/lib/progressbar.c
src/cli/lib/progressbar.h
src/cli/lib/repo_compose.c
src/cli/lib/terminal.c
src/cli/lib/terminal.h
src/cli/pakfire-builder.c
src/cli/pakfire-client.c
src/cli/pakfire-daemon.c
src/cli/pakfire.c
src/pakfire/archive.c
src/pakfire/archive_writer.c
src/pakfire/buffer.c
src/pakfire/buffer.h
src/pakfire/build.c
src/pakfire/build.h
src/pakfire/builder.c
src/pakfire/builder.h
src/pakfire/cgroup.c
src/pakfire/cgroup.h
src/pakfire/client.c
src/pakfire/client.h
src/pakfire/ctx.c
src/pakfire/ctx.h
src/pakfire/daemon.c
src/pakfire/daemon.h
src/pakfire/db.c
src/pakfire/dist.c
src/pakfire/elf.c
src/pakfire/elf.h
src/pakfire/env.c
src/pakfire/env.h
src/pakfire/fhs.c
src/pakfire/fhs.h
src/pakfire/file.c
src/pakfire/filelist.c
src/pakfire/filelist.h
src/pakfire/hasher.c
src/pakfire/hasher.h
src/pakfire/hashes.c
src/pakfire/hashes.h
src/pakfire/httpclient.c
src/pakfire/httpclient.h
src/pakfire/jail.c
src/pakfire/jail.h
src/pakfire/job.c
src/pakfire/job.h
src/pakfire/key.c
src/pakfire/key.h
src/pakfire/linter-file.c
src/pakfire/linter-file.h
src/pakfire/linter.c
src/pakfire/linter.h
src/pakfire/log_buffer.c
src/pakfire/log_buffer.h
src/pakfire/log_file.c
src/pakfire/log_file.h
src/pakfire/log_stream.c
src/pakfire/log_stream.h
src/pakfire/logging.h
src/pakfire/mirror.c
src/pakfire/mirror.h
src/pakfire/mirrorlist.c
src/pakfire/mirrorlist.h
src/pakfire/mount.c
src/pakfire/mount.h
src/pakfire/oci.c
src/pakfire/package.c
src/pakfire/packagelist.c
src/pakfire/packagelist.h
src/pakfire/packager.c
src/pakfire/pakfire.c
src/pakfire/pakfire.h
src/pakfire/parser.c
src/pakfire/parser/grammar.y
src/pakfire/problem.c
src/pakfire/progress.c
src/pakfire/progress.h
src/pakfire/pty.c
src/pakfire/pty.h
src/pakfire/pwd.c
src/pakfire/repo.c
src/pakfire/repo.h
src/pakfire/scriptlet.c
src/pakfire/scriptlet.h
src/pakfire/snapshot.c
src/pakfire/snapshot.h
src/pakfire/stripper.c
src/pakfire/transaction.c
src/pakfire/util.c
src/pakfire/util.h
src/pakfire/xfer.c
src/pakfire/xfer.h
src/python/ctx.c
src/python/ctx.h
src/python/pakfire.c
tests/libpakfire/jail.c
tests/libpakfire/log_stream.c
tests/parser/test.c
tests/testsuite.c
tests/testsuite.h

index 64ce2a3999f1697278ebd9966f329beb3cfe44ac..d1f88b461618a6c8c0ac20cf4dd7d3d15b3e83be 100644 (file)
@@ -162,7 +162,7 @@ static void log_callback(void* data, int priority, const char* file, int line,
                free(buffer);
 }
 
-static int result_callback(struct pakfire_ctx* ctx, struct pakfire* pakfire,
+static int result_callback(pakfire_ctx* ctx, struct pakfire* pakfire,
                struct pakfire_build* build, struct pakfire_archive* archive, void* data) {
        const struct cli_local_args* local_args = data;
        struct pakfire_package* pkg = NULL;
index 83fa22019c6517b3478c5c0eea797272dfdf3899..d2c10632248ec08765e4892bc6e569dc0379eb73 100644 (file)
@@ -24,7 +24,7 @@
 
 #include "config.h"
 
-const char* cli_get_default_distro(struct pakfire_ctx* ctx) {
+const char* cli_get_default_distro(pakfire_ctx* ctx) {
        struct pakfire_config* config = NULL;
        const char* distro = NULL;
 
index b74dec2440fdf85b7ec0553d8d46fe4ce38fcba4..dbeba31857e2024f7b0fcdf2884d80650aee92ed 100644 (file)
@@ -24,7 +24,7 @@
 #include <pakfire/config.h>
 #include <pakfire/ctx.h>
 
-const char* cli_get_default_distro(struct pakfire_ctx* ctx);
+const char* cli_get_default_distro(pakfire_ctx* ctx);
 
 int cli_read_distro_config(struct pakfire_config* config, const char* distro);
 
index a727486089133ccecd76db710c741c9c64c593c8..e0894f5bb980ac60933d417830ebd0f8df0e99c6 100644 (file)
@@ -23,7 +23,7 @@
 
 #include "daemon.h"
 
-int cli_daemon_main(struct pakfire_ctx* ctx) {
+int cli_daemon_main(pakfire_ctx* ctx) {
        struct pakfire_daemon* daemon = NULL;
        int r;
 
index 736c7625a00479b3033370d53a67924051666f13..566fafa9dae6fc214f1b908ff4fd554c7abd66e2 100644 (file)
@@ -23,6 +23,6 @@
 
 #include <pakfire/ctx.h>
 
-int cli_daemon_main(struct pakfire_ctx* ctx);
+int cli_daemon_main(pakfire_ctx* ctx);
 
 #endif /* PAKFIRE_CLI_DAEMON_H */
index 2037f92d555e0f96750267e48c897b69f41176fa..7055361ddd901bb381957c55d41db757bed81afc 100644 (file)
@@ -48,7 +48,7 @@ int cli_dump_package(struct pakfire_package* package, int flags) {
        return 0;
 }
 
-static int __cli_dump_package(struct pakfire_ctx* ctx, struct pakfire_package* package, void* p) {
+static int __cli_dump_package(pakfire_ctx* ctx, struct pakfire_package* package, void* p) {
        int flags = *(int*)p;
 
 #if 0
index 03b211e497b52472b6f4d2032c5d54bd17dd61aa..c20bcf4d741f3ec5e57a2800660a87fa6637565c 100644 (file)
@@ -60,7 +60,7 @@ static error_t parse(int key, char* arg, struct argp_state* state, void* data) {
        return 0;
 }
 
-static int cli_linter_result(struct pakfire_ctx* ctx, struct pakfire_archive* archive,
+static int cli_linter_result(pakfire_ctx* ctx, struct pakfire_archive* archive,
                struct pakfire_package* package, struct pakfire_file* file, int priority,
                const char* result, void* data) {
        const char* nevra = pakfire_package_get_string(package, PAKFIRE_PKG_NEVRA);
index dd5dc1c3b67517ea52fef7f81fd9bbb1428765d7..8a2230fc497eabc0adda868c224f3e2989d3f51f 100644 (file)
@@ -30,7 +30,7 @@
 #define MAX_REPOS 16
 
 struct cli_global_args {
-       struct pakfire_ctx* ctx;
+       pakfire_ctx* ctx;
 
        const char* distro;
        const char* config;
index c28d0d813275acc66de4aa51edb52a0a20e32052..3946fb4123104ea354dfd8924c8913a65bf7c0bb 100644 (file)
@@ -129,7 +129,7 @@ static void cli_progressbar_free(struct cli_progressbar* p) {
        free(p);
 }
 
-static void __cli_progressbar_free(struct pakfire_ctx* ctx,
+static void __cli_progressbar_free(pakfire_ctx* ctx,
                struct pakfire_progress* progress, void* data) {
        struct cli_progressbar* progressbar = data;
 
@@ -238,7 +238,7 @@ ERROR:
        return (void *)(intptr_t)r;
 }
 
-static int cli_progressbar_start(struct pakfire_ctx* ctx, struct pakfire_progress* progress,
+static int cli_progressbar_start(pakfire_ctx* ctx, struct pakfire_progress* progress,
                void* data, unsigned long int max_value) {
        struct cli_progressbar* progressbar = data;
 
@@ -249,7 +249,7 @@ static int cli_progressbar_start(struct pakfire_ctx* ctx, struct pakfire_progres
        return pthread_create(&progressbar->renderer, NULL, cli_progressbar_renderer, progressbar);
 }
 
-static int cli_progressbar_finish(struct pakfire_ctx* ctx, struct pakfire_progress* progress,
+static int cli_progressbar_finish(pakfire_ctx* ctx, struct pakfire_progress* progress,
                void* data) {
        struct cli_progressbar* progressbar = data;
        void* retval = NULL;
@@ -488,7 +488,7 @@ static int cli_progressbar_add_transfer_speed(struct cli_progressbar* p) {
        return cli_progressbar_add_widget(p, cli_progressbar_transfer_speed, NULL, 0, NULL);
 }
 
-int cli_setup_progressbar(struct pakfire_ctx* ctx, void* data, struct pakfire_progress* p) {
+int cli_setup_progressbar(pakfire_ctx* ctx, void* data, struct pakfire_progress* p) {
        struct cli_progressbar* progressbar = NULL;
        int r;
 
index ff7aa493ff7c2b93fdf7a2b4cf8fa90d47f15d22..74ee6559a4ec1cc67fa242c506bd05ccb92a0572 100644 (file)
@@ -24,6 +24,6 @@
 #include <pakfire/ctx.h>
 #include <pakfire/progress.h>
 
-int cli_setup_progressbar(struct pakfire_ctx* ctx, void* data, struct pakfire_progress* p);
+int cli_setup_progressbar(pakfire_ctx* ctx, void* data, struct pakfire_progress* p);
 
 #endif /* PAKFIRE_CLI_PROGRESSBAR_H */
index 3a87b41dd0006cc20c67652ac8b6006e5d8a7b71..f481da4ead2be041686521d4a0cb98e6a6f402b4 100644 (file)
@@ -77,7 +77,7 @@ static error_t parse(int key, char* arg, struct argp_state* state, void* data) {
 }
 
 static int cli_import_key(struct pakfire_key** key,
-               struct pakfire_ctx* ctx, const char* path) {
+               pakfire_ctx* ctx, const char* path) {
        FILE* f = NULL;
        int r;
 
index e32aa6701bca5a35a0b0df957c97778cd38f1ecf..a4cda59f5c4811c472429985465860d2d73c58c3 100644 (file)
@@ -85,7 +85,7 @@ int cli_term_is_interactive(void) {
        return isatty(STDIN_FILENO) && isatty(STDOUT_FILENO) && isatty(STDERR_FILENO);
 }
 
-int cli_term_confirm(struct pakfire_ctx* ctx, struct pakfire* pakfire,
+int cli_term_confirm(pakfire_ctx* ctx, struct pakfire* pakfire,
                void* data, const char* message, const char* question) {
        char* line = NULL;
        size_t length = 0;
@@ -140,7 +140,7 @@ END:
        return r;
 }
 
-int cli_term_confirm_yes(struct pakfire_ctx* ctx, struct pakfire* pakfire,
+int cli_term_confirm_yes(pakfire_ctx* ctx, struct pakfire* pakfire,
                void* data, const char* message, const char* question) {
        return 0;
 }
@@ -256,7 +256,7 @@ static struct pakfire_solution* cli_term_find_solution(
        return selected_solution;
 }
 
-int cli_term_pick_solution(struct pakfire_ctx* ctx, struct pakfire* pakfire, void* data,
+int cli_term_pick_solution(pakfire_ctx* ctx, struct pakfire* pakfire, void* data,
                struct pakfire_transaction* transaction) {
        struct pakfire_problem** problems = NULL;
        struct pakfire_solution* solution = NULL;
index 2f6c09672bb33c6801e01b50691d73b52ccc27c6..a34c7d9bdbcc1e3af9cdf39cced0cb9e959ce80a 100644 (file)
@@ -29,12 +29,12 @@ int cli_term_get_dimensions(int* rows, int* cols);
 
 int cli_term_is_interactive(void);
 
-int cli_term_confirm(struct pakfire_ctx* ctx, struct pakfire* pakfire,
+int cli_term_confirm(pakfire_ctx* ctx, struct pakfire* pakfire,
        void* data, const char* message, const char* question);
-int cli_term_confirm_yes(struct pakfire_ctx* ctx, struct pakfire* pakfire,
+int cli_term_confirm_yes(pakfire_ctx* ctx, struct pakfire* pakfire,
        void* data, const char* message, const char* question);
 
-int cli_term_pick_solution(struct pakfire_ctx* ctx, struct pakfire* pakfire,
+int cli_term_pick_solution(pakfire_ctx* ctx, struct pakfire* pakfire,
        void* data, struct pakfire_transaction* transaction);
 
 #endif /* PAKFIRE_CLI_TERMINAL_H */
index 859a588c7665632a8234c22a3ea0b72e84defc05..199f3b2d91dfaea3e5b43ed07bf27028bcc14231 100644 (file)
@@ -144,7 +144,7 @@ static error_t parse(int key, char* arg, struct argp_state* state, void* data) {
        return 0;
 }
 
-static int cli_confirm(struct pakfire_ctx* ctx, struct pakfire* pakfire,
+static int cli_confirm(pakfire_ctx* ctx, struct pakfire* pakfire,
                void* data, const char* message, const char* question) {
        // Just print the message
        if (message)
@@ -154,7 +154,7 @@ static int cli_confirm(struct pakfire_ctx* ctx, struct pakfire* pakfire,
 }
 
 int main(int argc, char* argv[]) {
-       struct pakfire_ctx* ctx = NULL;
+       pakfire_ctx* ctx = NULL;
        int r;
 
        // Setup the context
index 9899fff200b07861b237dfc45796a84fa6133b19..0ca8a3b0d6826d97735504e4308394e295648a0e 100644 (file)
@@ -80,7 +80,7 @@ static error_t parse(int key, char* arg, struct argp_state* state, void* data) {
 }
 
 int main(int argc, char* argv[]) {
-       struct pakfire_ctx* ctx = NULL;
+       pakfire_ctx* ctx = NULL;
        int r;
 
        // Setup the context
index c8072b73c7c017ff64d20b18b5776757144204d3..17a1ce1dbee33e78bf0427909656b3d49b8972f2 100644 (file)
@@ -43,7 +43,7 @@ static struct argp_option options[] = {
 };
 
 static error_t parse(int key, char* arg, struct argp_state* state, void* data) {
-       struct pakfire_ctx* ctx = data;
+       pakfire_ctx* ctx = data;
 
        switch (key) {
                case OPT_DEBUG:
@@ -62,7 +62,7 @@ static error_t parse(int key, char* arg, struct argp_state* state, void* data) {
 }
 
 int main(int argc, char* argv[]) {
-       struct pakfire_ctx* ctx = NULL;
+       pakfire_ctx* ctx = NULL;
        int r;
 
        // Initialize changing the process title
index f0c92b0bcc1627bfa71e44439bc54148c4154e62..4945e108d81811d6976b879acc93acd80931dba9 100644 (file)
@@ -137,7 +137,7 @@ static error_t parse(int key, char* arg, struct argp_state* state, void* data) {
 
 
 int main(int argc, char* argv[]) {
-       struct pakfire_ctx* ctx = NULL;
+       pakfire_ctx* ctx = NULL;
        int r;
 
        // Setup the context
index ec8806dd1625c998c602ce3f73d2b78dd05113ad..9cc499e08be1ffc44bacc7016781fef246014cec 100644 (file)
@@ -66,7 +66,7 @@
 #define ARCHIVE_READ_BLOCK_SIZE 512 * 1024
 
 struct pakfire_archive {
-       struct pakfire_ctx* ctx;
+       pakfire_ctx* ctx;
        struct pakfire* pakfire;
        int nrefs;
 
@@ -1924,7 +1924,7 @@ static int pakfire_archive_filter_systemd_sysusers(struct pakfire_archive* archi
 }
 
 static ssize_t pakfire_archive_stream_payload(
-               struct pakfire_ctx* ctx, void* data, char* buffer, size_t length) {
+               pakfire_ctx* ctx, void* data, char* buffer, size_t length) {
        struct archive* a = data;
        ssize_t bytes_read;
 
index d90f096fff9867921121d267d3899539c80ed1a2..b5a6ad25adfa9826ee80c68f5aed1ee2b424d032 100644 (file)
@@ -38,7 +38,7 @@
 #include <pakfire/string.h>
 
 struct pakfire_archive_writer {
-       struct pakfire_ctx* ctx;
+       pakfire_ctx* ctx;
        int nrefs;
 
        // Pakfire
@@ -454,7 +454,7 @@ ERROR:
 }
 
 static int pakfire_archive_writer_write_file(
-               struct pakfire_ctx* ctx, struct pakfire_file* file, void* data) {
+               pakfire_ctx* ctx, struct pakfire_file* file, void* data) {
        struct pakfire_archive_writer* self = data;
        struct archive_entry* sparse_entry = NULL;
        struct archive_entry* entry = NULL;
index c70f60ebba1c0ef357a71e84a5d5bcf8766ef71e..4e05752e0df17624967a4b6041d404d74112e7f7 100644 (file)
@@ -206,7 +206,7 @@ int pakfire_buffer_write(struct pakfire_buffer* self, int fd) {
 }
 
 int pakfire_buffer_fill(struct pakfire_buffer* self,
-               struct pakfire_ctx* ctx, pakfire_buffer_input_callback callback, void* data) {
+               pakfire_ctx* ctx, pakfire_buffer_input_callback callback, void* data) {
        ssize_t bytes_written = 0;
        int r;
 
index 5ab14bb89c992ff7358b7e292cdc6a7d6a6e58f4..826ba11ad8771ca50f2b7f6699e2fd7c96376e66 100644 (file)
@@ -24,7 +24,7 @@
 #include <pakfire/ctx.h>
 
 typedef ssize_t (*pakfire_buffer_input_callback)
-       (struct pakfire_ctx* ctx, void* data, char* buffer, size_t length);
+       (pakfire_ctx* ctx, void* data, char* buffer, size_t length);
 
 struct pakfire_buffer {
        char* data;
@@ -55,7 +55,7 @@ int pakfire_buffer_read(struct pakfire_buffer* self, int fd);
 int pakfire_buffer_write(struct pakfire_buffer* self, int fd);
 
 int pakfire_buffer_fill(struct pakfire_buffer* self,
-       struct pakfire_ctx* ctx, pakfire_buffer_input_callback callback, void* data);
+       pakfire_ctx* ctx, pakfire_buffer_input_callback callback, void* data);
 
 size_t pakfire_buffer_find_line(struct pakfire_buffer* self);
 
index 70609e640fecd858e3e0618ec96fa943cdec261a..edbd8ab45a8e71b5852baa7fbc33dadb27fed7b5 100644 (file)
@@ -67,7 +67,7 @@ static const char* PAKFIRE_BUILD_PACKAGES[] = {
 };
 
 struct pakfire_build {
-       struct pakfire_ctx* ctx;
+       pakfire_ctx* ctx;
        struct pakfire* pakfire;
        int nrefs;
 
@@ -126,7 +126,7 @@ static double pakfire_build_duration(struct pakfire_build* build) {
        return pakfire_timespec_delta(&now, &build->time_start);
 }
 
-static int pakfire_build_output_callback(struct pakfire_ctx* ctx, void* data,
+static int pakfire_build_output_callback(pakfire_ctx* ctx, void* data,
                const enum pakfire_jail_output_stream stream, const char* line, size_t length) {
        struct pakfire_build* build = data;
 
@@ -375,7 +375,7 @@ static int pakfire_build_process_pkgconfig_dep(struct pakfire_package* pkg,
        return 0;
 }
 
-static int pakfire_build_process_pkgconfig_provides(struct pakfire_ctx* ctx, void* data,
+static int pakfire_build_process_pkgconfig_provides(pakfire_ctx* ctx, void* data,
                const enum pakfire_jail_output_stream stream, const char* line, const size_t length) {
        struct pakfire_find_deps_ctx* deps = data;
        struct pakfire_build* self = deps->build;
@@ -394,7 +394,7 @@ static int pakfire_build_process_pkgconfig_provides(struct pakfire_ctx* ctx, voi
        return 0;
 }
 
-static int pakfire_build_process_pkgconfig_requires(struct pakfire_ctx* ctx, void* data,
+static int pakfire_build_process_pkgconfig_requires(pakfire_ctx* ctx, void* data,
                const enum pakfire_jail_output_stream stream, const char* line, const size_t length) {
        struct pakfire_find_deps_ctx* deps = data;
        struct pakfire_build* self = deps->build;
@@ -414,7 +414,7 @@ static int pakfire_build_process_pkgconfig_requires(struct pakfire_ctx* ctx, voi
 }
 
 static int pakfire_build_find_pkgconfig_provides(
-               struct pakfire_ctx* ctx, struct pakfire_file* file, struct pakfire_find_deps_ctx* deps) {
+               pakfire_ctx* ctx, struct pakfire_file* file, struct pakfire_find_deps_ctx* deps) {
        int r;
 
        // Fetch the absolute path
@@ -439,7 +439,7 @@ static int pakfire_build_find_pkgconfig_provides(
 }
 
 static int pakfire_build_find_pkgconfig_requires(
-               struct pakfire_ctx* ctx, struct pakfire_file* file, struct pakfire_find_deps_ctx* deps) {
+               pakfire_ctx* ctx, struct pakfire_file* file, struct pakfire_find_deps_ctx* deps) {
        struct pakfire_env* env = NULL;
        int r;
 
@@ -494,7 +494,7 @@ ERROR:
 }
 
 static int pakfire_build_find_elf_provides(
-               struct pakfire_ctx* ctx, struct pakfire_file* file, struct pakfire_find_deps_ctx* deps) {
+               pakfire_ctx* ctx, struct pakfire_file* file, struct pakfire_find_deps_ctx* deps) {
        struct pakfire_elf* elf = NULL;
        char** provides = NULL;
        int r;
@@ -545,7 +545,7 @@ ERROR:
 }
 
 static int pakfire_build_find_elf_requires(
-               struct pakfire_ctx* ctx, struct pakfire_file* file, struct pakfire_find_deps_ctx* deps) {
+               pakfire_ctx* ctx, struct pakfire_file* file, struct pakfire_find_deps_ctx* deps) {
        struct pakfire_elf* elf = NULL;
        char** requires = NULL;
        int r;
@@ -600,7 +600,7 @@ ERROR:
 }
 
 static int pakfire_build_find_python_abi_requires(
-               struct pakfire_ctx* ctx, struct pakfire_file* file, struct pakfire_find_deps_ctx* deps) {
+               pakfire_ctx* ctx, struct pakfire_file* file, struct pakfire_find_deps_ctx* deps) {
        char basename[PATH_MAX];
        const char* p = NULL;
        int r;
@@ -631,7 +631,7 @@ static int pakfire_build_find_python_abi_requires(
 }
 
 static int pakfire_build_find_symlink_destinations(
-               struct pakfire_ctx* ctx, struct pakfire_file* file, struct pakfire_find_deps_ctx* deps) {
+               pakfire_ctx* ctx, struct pakfire_file* file, struct pakfire_find_deps_ctx* deps) {
        const char* symlink = NULL;
        const char* path = NULL;
        char buffer[PATH_MAX];
@@ -661,7 +661,7 @@ static int pakfire_build_find_symlink_destinations(
 }
 
 static int pakfire_build_find_provides(
-               struct pakfire_ctx* ctx, struct pakfire_file* file, void* data) {
+               pakfire_ctx* ctx, struct pakfire_file* file, void* data) {
        struct pakfire_find_deps_ctx* deps = data;
        int r;
 
@@ -692,7 +692,7 @@ static int pakfire_build_find_provides(
 }
 
 static int pakfire_build_find_requires(
-               struct pakfire_ctx* ctx, struct pakfire_file* file, void* data) {
+               pakfire_ctx* ctx, struct pakfire_file* file, void* data) {
        struct pakfire_find_deps_ctx* deps = data;
        int r;
 
@@ -744,7 +744,7 @@ static int pakfire_build_find_requires(
 */
 
 static int pakfire_build_find_perl_files(
-               struct pakfire_ctx* ctx, struct pakfire_file* file, void* data) {
+               pakfire_ctx* ctx, struct pakfire_file* file, void* data) {
        struct pakfire_filelist* perlfiles = data;
 
        // Add all perl files
@@ -754,13 +754,13 @@ static int pakfire_build_find_perl_files(
        return 0;
 }
 
-static int pakfire_build_add_perl_dep(struct pakfire_ctx* ctx, struct pakfire_package* pkg,
+static int pakfire_build_add_perl_dep(pakfire_ctx* ctx, struct pakfire_package* pkg,
                const enum pakfire_package_key key, const char* line, size_t length) {
        // Add the dependency
        return pakfire_package_add_dep(pkg, key, "%.*s", (int)length, line);
 }
 
-static int pakfire_build_add_perl_provides(struct pakfire_ctx* ctx, void* data,
+static int pakfire_build_add_perl_provides(pakfire_ctx* ctx, void* data,
                const enum pakfire_jail_output_stream stream, const char* line, size_t length) {
        struct pakfire_package* pkg = data;
 
@@ -778,7 +778,7 @@ static int pakfire_build_add_perl_provides(struct pakfire_ctx* ctx, void* data,
        return 0;
 }
 
-static int pakfire_build_add_perl_requires(struct pakfire_ctx* ctx, void* data,
+static int pakfire_build_add_perl_requires(pakfire_ctx* ctx, void* data,
                const enum pakfire_jail_output_stream stream, const char* line, size_t length) {
        struct pakfire_package* pkg = data;
 
@@ -901,7 +901,7 @@ ERROR:
 }
 
 static int __pakfire_build_package_mark_config_files(
-               struct pakfire_ctx* ctx, struct pakfire_file* file, void* data) {
+               pakfire_ctx* ctx, struct pakfire_file* file, void* data) {
        char** configfiles = data;
        int r;
 
@@ -1053,7 +1053,7 @@ static int pakfire_build_extract_command(
        return __pakfire_string_setn(command, lcommand, s, l);
 }
 
-static int pakfire_build_process_scriptlet_dep(struct pakfire_ctx* ctx, void* data,
+static int pakfire_build_process_scriptlet_dep(pakfire_ctx* ctx, void* data,
                const enum pakfire_jail_output_stream stream, const char* line, const size_t length) {
        struct pakfire_find_deps_ctx* deps = data;
        struct pakfire_build* self = deps->build;
@@ -1320,7 +1320,7 @@ ERROR:
        return r;
 }
 
-static int pakfire_build_package_dump(struct pakfire_ctx* ctx,
+static int pakfire_build_package_dump(pakfire_ctx* ctx,
                struct pakfire_package* pkg, void* p) {
        struct pakfire_build* build = p;
 
@@ -1505,7 +1505,7 @@ ERROR:
 }
 
 static int __pakfire_build_remove_static_libraries(
-               struct pakfire_ctx* ctx, struct pakfire_file* file, void* data) {
+               pakfire_ctx* ctx, struct pakfire_file* file, void* data) {
        const struct pakfire_build_post_process_state* state = data;
        char path[PATH_MAX];
        int r;
@@ -1539,7 +1539,7 @@ static int pakfire_build_post_remove_static_libraries(
 }
 
 static int __pakfire_build_remove_libtool_archives(
-               struct pakfire_ctx* ctx, struct pakfire_file* file, void* data) {
+               pakfire_ctx* ctx, struct pakfire_file* file, void* data) {
        const struct pakfire_build_post_process_state* state = data;
 
        // Find all libtool archive files
@@ -1558,7 +1558,7 @@ static int pakfire_build_post_remove_libtool_archives(
 }
 
 static int __pakfire_build_check_broken_symlinks(
-               struct pakfire_ctx* ctx, struct pakfire_file* file, void* data) {
+               pakfire_ctx* ctx, struct pakfire_file* file, void* data) {
        const struct pakfire_build_post_process_state* state = data;
        int r;
 
@@ -1590,7 +1590,7 @@ static int pakfire_build_post_check_broken_symlinks(
 }
 
 static int pakfire_build_fix_script_interpreter(
-               struct pakfire_ctx* ctx, struct pakfire_file* file, void* data) {
+               pakfire_ctx* ctx, struct pakfire_file* file, void* data) {
        // Only run this for regular files
        switch (pakfire_file_get_type(file)) {
                case S_IFREG:
@@ -1614,7 +1614,7 @@ static int pakfire_build_fix_script_interpreter(
 }
 
 static int pakfire_build_check_buildroot(
-               struct pakfire_ctx* ctx, struct pakfire_file* file, void* data) {
+               pakfire_ctx* ctx, struct pakfire_file* file, void* data) {
        const struct pakfire_build_post_process_state* state = data;
        int r;
 
@@ -2090,7 +2090,7 @@ static int pakfire_build_setup_buildroot(struct pakfire_build* build) {
        return 0;
 }
 
-int pakfire_build_create(struct pakfire_build** build, struct pakfire_ctx* ctx,
+int pakfire_build_create(struct pakfire_build** build, pakfire_ctx* ctx,
                struct pakfire_config* config, const char* arch, const char* id, int flags) {
        int r;
 
@@ -2292,7 +2292,7 @@ ERROR:
 }
 
 static int __pakfire_build_unpackaged_file(
-               struct pakfire_ctx* ctx, struct pakfire_file* file, void* p) {
+               pakfire_ctx* ctx, struct pakfire_file* file, void* p) {
        char* s = pakfire_file_dump(file, PAKFIRE_FILE_DUMP_FULL);
        if (s) {
                ERROR(ctx, "%s\n", s);
@@ -2334,7 +2334,7 @@ ERROR:
        return r;
 }
 
-static int pakfire_build_install_package(struct pakfire_ctx* ctx,
+static int pakfire_build_install_package(pakfire_ctx* ctx,
                struct pakfire_package* pkg, void* p) {
        struct pakfire_transaction* transaction = (struct pakfire_transaction*)p;
 
@@ -2468,7 +2468,7 @@ ERROR:
 }
 
 static int pakfire_build_lint_archive(
-               struct pakfire_ctx* ctx, struct pakfire_package* pkg, struct pakfire_archive* archive, void* data) {
+               pakfire_ctx* ctx, struct pakfire_package* pkg, struct pakfire_archive* archive, void* data) {
        return pakfire_archive_lint(archive, NULL, NULL);
 }
 
@@ -2493,7 +2493,7 @@ struct pakfire_build_result {
        void* data;
 };
 
-static int pakfire_build_result(struct pakfire_ctx* ctx, struct pakfire_package* pkg,
+static int pakfire_build_result(pakfire_ctx* ctx, struct pakfire_package* pkg,
                struct pakfire_archive* archive, void* data) {
        const struct pakfire_build_result* result = data;
        struct pakfire_build* build = result->build;
@@ -2824,7 +2824,7 @@ int pakfire_build_clean(struct pakfire* pakfire, int flags) {
        struct pakfire_repo* local = NULL;
        int r = 0;
 
-       struct pakfire_ctx* ctx = pakfire_get_ctx(pakfire);
+       pakfire_ctx* ctx = pakfire_get_ctx(pakfire);
 
        // Fetch local repository
        local = pakfire_get_repo(pakfire, PAKFIRE_REPO_LOCAL);
index 4194ee48d5f4ad702576d5f6379b96862799faf5..8d77801e6d9d2ee2babd8a5e85165c69a5976c01 100644 (file)
@@ -35,10 +35,10 @@ enum pakfire_build_flags {
        PAKFIRE_BUILD_LOCAL            = (1 << 4),
 };
 
-typedef int (*pakfire_build_result_callback)(struct pakfire_ctx* ctx, struct pakfire* pakfire,
+typedef int (*pakfire_build_result_callback)(pakfire_ctx* ctx, struct pakfire* pakfire,
        struct pakfire_build* build, struct pakfire_archive* archive, void* data);
 
-int pakfire_build_create(struct pakfire_build** build, struct pakfire_ctx* ctx,
+int pakfire_build_create(struct pakfire_build** build, pakfire_ctx* ctx,
        struct pakfire_config* config, const char* arch, const char* id, int flags);
 
 struct pakfire_build* pakfire_build_ref(struct pakfire_build* build);
index 2402432b57cc4c290e0a864bfbc8533ca783b27a..4fd3eddc66a9cf30f67f3335248786bd3849ec3e 100644 (file)
@@ -39,7 +39,7 @@
 
 struct pakfire_builder {
        // Context
-       struct pakfire_ctx* ctx;
+       pakfire_ctx* ctx;
 
        // Reference Counter
        int nrefs;
@@ -82,7 +82,7 @@ static void pakfire_builder_free(struct pakfire_builder* self) {
 }
 
 int pakfire_builder_create(struct pakfire_builder** builder,
-               struct pakfire_ctx* ctx, struct pakfire_client* client) {
+               pakfire_ctx* ctx, struct pakfire_client* client) {
        struct pakfire_builder* self = NULL;
        int r;
 
index d43a323bac990c359ee9ab6709510094f2fdb5b4..05e86ea9f61e62bf600f68cb9d08a228bf92e2b3 100644 (file)
@@ -32,7 +32,7 @@ struct pakfire_builder;
 #include <pakfire/xfer.h>
 
 int pakfire_builder_create(struct pakfire_builder** builder,
-       struct pakfire_ctx* ctx, struct pakfire_client* client);
+       pakfire_ctx* ctx, struct pakfire_client* client);
 
 struct pakfire_builder* pakfire_builder_ref(struct pakfire_builder* self);
 struct pakfire_builder* pakfire_builder_unref(struct pakfire_builder* self);
index 8f9d61cabd8dc9121db18da5fc3bce49ab1eaa3c..4c7280e476c571c531391c1b749500de8f0b451e 100644 (file)
@@ -59,7 +59,7 @@
        })
 
 struct pakfire_cgroup {
-       struct pakfire_ctx* ctx;
+       pakfire_ctx* ctx;
        int nrefs;
 
        // The parent group
@@ -358,7 +358,7 @@ static int pakfire_cgroup_enable_controller(struct pakfire_cgroup* cgroup, int c
        If the cgroup doesn't exist, it will be created including any parent cgroups.
 */
 static int pakfire_cgroup_open(struct pakfire_cgroup** cgroup,
-               struct pakfire_ctx* ctx, struct pakfire_cgroup* parent, const char* name, int flags) {
+               pakfire_ctx* ctx, struct pakfire_cgroup* parent, const char* name, int flags) {
        struct pakfire_cgroup* c = NULL;
        int r;
 
@@ -427,7 +427,7 @@ ERROR:
 }
 
 static int pakfire_cgroup_create_recursive(struct pakfire_cgroup** cgroup,
-               struct pakfire_ctx* ctx, struct pakfire_cgroup* parent, const char* name, int flags) {
+               pakfire_ctx* ctx, struct pakfire_cgroup* parent, const char* name, int flags) {
        struct pakfire_cgroup* child = NULL;
        char buffer[NAME_MAX];
        char* p = NULL;
@@ -469,7 +469,7 @@ ERROR:
 }
 
 int pakfire_cgroup_create(struct pakfire_cgroup** cgroup,
-               struct pakfire_ctx* ctx, struct pakfire_cgroup* parent, const char* name, int flags) {
+               pakfire_ctx* ctx, struct pakfire_cgroup* parent, const char* name, int flags) {
        struct pakfire_cgroup* root = NULL;
        int r;
 
index 37c8863bdcf94e67c06af0d88d825949baeb041d..0cfd478950739556cbc2a4a1c1e8e79b35212d0f 100644 (file)
@@ -201,7 +201,7 @@ struct pakfire_cgroup_stats {
 };
 
 int pakfire_cgroup_create(struct pakfire_cgroup** cgroup,
-       struct pakfire_ctx* ctx, struct pakfire_cgroup* parent, const char* name, int flags);
+       pakfire_ctx* ctx, struct pakfire_cgroup* parent, const char* name, int flags);
 
 struct pakfire_cgroup* pakfire_cgroup_ref(struct pakfire_cgroup* cgroup);
 struct pakfire_cgroup* pakfire_cgroup_unref(struct pakfire_cgroup* cgroup);
index cb4fba0e7fd023f9e66a599b5201a5fb2c408401..ddc53877b6af0bec4ef2556bd1c753b0685ddc55 100644 (file)
@@ -72,7 +72,7 @@ struct pakfire_client_upload {
 };
 
 struct pakfire_client {
-       struct pakfire_ctx* ctx;
+       pakfire_ctx* ctx;
        int nrefs;
 
        // Event Loop
@@ -501,7 +501,7 @@ static void pakfire_client_free(struct pakfire_client* self) {
 }
 
 int pakfire_client_create(struct pakfire_client** client,
-               struct pakfire_ctx* ctx, const char* url, const char* principal) {
+               pakfire_ctx* ctx, const char* url, const char* principal) {
        struct pakfire_client* self = NULL;
        char hostname[HOST_NAME_MAX];
        int r;
index c8effeba15de421448eb63aaa8312f8ea4926147..ec4d073c1bae6f5bb2619b1b9e9b976aa97a3318 100644 (file)
@@ -31,7 +31,7 @@ struct pakfire_client;
 #include <pakfire/xfer.h>
 
 int pakfire_client_create(struct pakfire_client** client,
-       struct pakfire_ctx* ctx, const char* url, const char* principal);
+       pakfire_ctx* ctx, const char* url, const char* principal);
 
 struct pakfire_client* pakfire_client_ref(struct pakfire_client* client);
 struct pakfire_client* pakfire_client_unref(struct pakfire_client* client);
index 8e20f0ee4737b84a5179896679918f7a68f5517f..ceee07a2f0e348c79084558ff916ecaeba1890c4 100644 (file)
@@ -124,7 +124,7 @@ static int parse_log_level(const char* level) {
        return 0;
 }
 
-static int pakfire_ctx_setup_logging(struct pakfire_ctx* self) {
+static int pakfire_ctx_setup_logging(pakfire_ctx* self) {
        const char* env = NULL;
 
        // Set the default level to INFO
@@ -144,7 +144,7 @@ static int pakfire_ctx_setup_logging(struct pakfire_ctx* self) {
        return 0;
 }
 
-static int pakfire_ctx_default_confirm_callback(struct pakfire_ctx* self,
+static int pakfire_ctx_default_confirm_callback(pakfire_ctx* self,
                struct pakfire* pakfire, void* data, const char* message, const char* question) {
        // Just log the message
        INFO(self, "%s\n", message);
@@ -152,7 +152,7 @@ static int pakfire_ctx_default_confirm_callback(struct pakfire_ctx* self,
        return 0;
 }
 
-static int pakfire_ctx_load_config(struct pakfire_ctx* self, const char* path) {
+static int pakfire_ctx_load_config(pakfire_ctx* self, const char* path) {
        FILE* f = NULL;
        int r;
 
@@ -182,7 +182,7 @@ static int pakfire_ctx_load_config(struct pakfire_ctx* self, const char* path) {
        return r;
 }
 
-static void pakfire_ctx_free(struct pakfire_ctx* self) {
+static void pakfire_ctx_free(pakfire_ctx* self) {
        // Release the events
        if (self->events.loop_started)
                sd_event_source_unref(self->events.loop_started);
@@ -206,8 +206,8 @@ static void pakfire_ctx_free(struct pakfire_ctx* self) {
        free(self);
 }
 
-int pakfire_ctx_create(struct pakfire_ctx** ctx, const char* path) {
-       struct pakfire_ctx* self = NULL;
+int pakfire_ctx_create(pakfire_ctx** ctx, const char* path) {
+       pakfire_ctx* self = NULL;
        int r;
 
        // Allocate the context
@@ -257,13 +257,13 @@ ERROR:
        return r;
 }
 
-struct pakfire_ctx* pakfire_ctx_ref(struct pakfire_ctx* self) {
+pakfire_ctx* pakfire_ctx_ref(pakfire_ctx* self) {
        self->nrefs++;
 
        return self;
 }
 
-struct pakfire_ctx* pakfire_ctx_unref(struct pakfire_ctx* self) {
+pakfire_ctx* pakfire_ctx_unref(pakfire_ctx* self) {
        if (--self->nrefs > 0)
                return self;
 
@@ -273,11 +273,11 @@ struct pakfire_ctx* pakfire_ctx_unref(struct pakfire_ctx* self) {
 
 // Flags
 
-int pakfire_ctx_has_flag(struct pakfire_ctx* self, int flag) {
+int pakfire_ctx_has_flag(pakfire_ctx* self, int flag) {
        return self->flags & flag;
 }
 
-int pakfire_ctx_set_flag(struct pakfire_ctx* self, int flag) {
+int pakfire_ctx_set_flag(pakfire_ctx* self, int flag) {
        self->flags |= flag;
 
        return 0;
@@ -285,7 +285,7 @@ int pakfire_ctx_set_flag(struct pakfire_ctx* self, int flag) {
 
 // Config
 
-struct pakfire_config* pakfire_ctx_get_config(struct pakfire_ctx* self) {
+struct pakfire_config* pakfire_ctx_get_config(pakfire_ctx* self) {
        if (!self->config)
                return NULL;
 
@@ -294,27 +294,27 @@ struct pakfire_config* pakfire_ctx_get_config(struct pakfire_ctx* self) {
 
 // Distro
 
-const struct pakfire_distro* pakfire_ctx_get_distro(struct pakfire_ctx* self) {
+const struct pakfire_distro* pakfire_ctx_get_distro(pakfire_ctx* self) {
        return &self->distro;
 }
 
 // Logging
 
-int pakfire_ctx_get_log_level(struct pakfire_ctx* self) {
+int pakfire_ctx_get_log_level(pakfire_ctx* self) {
        return self->log.level;
 }
 
-void pakfire_ctx_set_log_level(struct pakfire_ctx* self, int level) {
+void pakfire_ctx_set_log_level(pakfire_ctx* self, int level) {
        self->log.level = level;
 }
 
-void pakfire_ctx_set_log_callback(struct pakfire_ctx* self,
+void pakfire_ctx_set_log_callback(pakfire_ctx* self,
                pakfire_log_callback callback, void* data) {
        self->log.callback = callback;
        self->log.data     = data;
 }
 
-void pakfire_ctx_log(struct pakfire_ctx* self, int level, const char* file, int line,
+void pakfire_ctx_log(pakfire_ctx* self, int level, const char* file, int line,
                const char* fn, const char* format, ...) {
        va_list args;
 
@@ -329,23 +329,23 @@ void pakfire_ctx_log(struct pakfire_ctx* self, int level, const char* file, int
 
 // Paths
 
-const char* pakfire_ctx_get_cache_path(struct pakfire_ctx* self) {
+const char* pakfire_ctx_get_cache_path(pakfire_ctx* self) {
        return self->paths.cache;
 }
 
-int pakfire_ctx_set_cache_path(struct pakfire_ctx* self, const char* path) {
+int pakfire_ctx_set_cache_path(pakfire_ctx* self, const char* path) {
        return pakfire_path_expand(self->paths.cache, path);
 }
 
 // Confirm
 
-void pakfire_ctx_set_confirm_callback(struct pakfire_ctx* self,
+void pakfire_ctx_set_confirm_callback(pakfire_ctx* self,
                pakfire_confirm_callback callback, void* data) {
        self->confirm.callback = callback;
        self->confirm.data     = data;
 }
 
-int pakfire_ctx_confirm(struct pakfire_ctx* self, struct pakfire* pakfire,
+int pakfire_ctx_confirm(pakfire_ctx* self, struct pakfire* pakfire,
                const char* message, const char* question) {
        // Run callback
        if (!self->confirm.callback)
@@ -356,13 +356,13 @@ int pakfire_ctx_confirm(struct pakfire_ctx* self, struct pakfire* pakfire,
 
 // Progress
 
-void pakfire_ctx_set_progress_callback(struct pakfire_ctx* self,
+void pakfire_ctx_set_progress_callback(pakfire_ctx* self,
                pakfire_progress_callback callback, void* data) {
        self->progress.callback = callback;
        self->progress.data     = data;
 }
 
-int pakfire_ctx_setup_progress(struct pakfire_ctx* self, struct pakfire_progress* progress) {
+int pakfire_ctx_setup_progress(pakfire_ctx* self, struct pakfire_progress* progress) {
        if (!self->progress.callback)
                return 0;
 
@@ -371,13 +371,13 @@ int pakfire_ctx_setup_progress(struct pakfire_ctx* self, struct pakfire_progress
 
 // Pick Solution
 
-void pakfire_ctx_set_pick_solution_callback(struct pakfire_ctx* self,
+void pakfire_ctx_set_pick_solution_callback(pakfire_ctx* self,
                pakfire_pick_solution_callback callback, void* data) {
        self->pick_solution.callback = callback;
        self->pick_solution.data     = data;
 }
 
-int pakfire_ctx_pick_solution(struct pakfire_ctx* self, struct pakfire* pakfire,
+int pakfire_ctx_pick_solution(pakfire_ctx* self, struct pakfire* pakfire,
                struct pakfire_transaction* transaction) {
        if (!self->pick_solution.callback)
                return 1;
@@ -390,7 +390,7 @@ int pakfire_ctx_pick_solution(struct pakfire_ctx* self, struct pakfire* pakfire,
 static int pakfire_ctx_loop_exited(sd_event_source* event, void* data);
 
 static int pakfire_ctx_loop_started(sd_event_source* event, void* data) {
-       struct pakfire_ctx* self = data;
+       pakfire_ctx* self = data;
 
        // Log action
        DEBUG(self, "Event loop started\n");
@@ -407,7 +407,7 @@ static int pakfire_ctx_loop_started(sd_event_source* event, void* data) {
 }
 
 static int pakfire_ctx_loop_exited(sd_event_source* event, void* data) {
-       struct pakfire_ctx* self = data;
+       pakfire_ctx* self = data;
 
        // Log action
        DEBUG(self, "Event loop exited\n");
@@ -423,7 +423,7 @@ static int pakfire_ctx_loop_exited(sd_event_source* event, void* data) {
                        &self->events.loop_started, pakfire_ctx_loop_started, self);
 }
 
-int pakfire_ctx_loop(struct pakfire_ctx* self, sd_event** loop) {
+int pakfire_ctx_loop(pakfire_ctx* self, sd_event** loop) {
        int r;
 
        // Initialize the loop whenever we need it
@@ -445,13 +445,13 @@ int pakfire_ctx_loop(struct pakfire_ctx* self, sd_event** loop) {
        return 0;
 }
 
-int pakfire_ctx_loop_is_running(struct pakfire_ctx* self) {
+int pakfire_ctx_loop_is_running(pakfire_ctx* self) {
        return self->loop_is_running;
 }
 
 // cURL
 
-CURLSH* pakfire_ctx_curl_share(struct pakfire_ctx* self) {
+CURLSH* pakfire_ctx_curl_share(pakfire_ctx* self) {
        int r;
 
        // Setup a new handle
@@ -483,7 +483,7 @@ ERROR:
 
 // Magic
 
-magic_t pakfire_ctx_magic(struct pakfire_ctx* self) {
+magic_t pakfire_ctx_magic(pakfire_ctx* self) {
        int r;
 
        // Initialize the context if not already done
index 12975ab78d781c4f323254e1f3dbb8f25069040c..41431770d4396ca916be3c3b3819c2e8e2b8f5ab 100644 (file)
@@ -21,7 +21,7 @@
 #ifndef PAKFIRE_CTX_H
 #define PAKFIRE_CTX_H
 
-struct pakfire_ctx;
+typedef struct pakfire_ctx pakfire_ctx;
 
 #include <pakfire/config.h>
 #include <pakfire/logging.h>
@@ -30,10 +30,10 @@ struct pakfire_ctx;
 #include <pakfire/progress.h>
 #include <pakfire/transaction.h>
 
-int pakfire_ctx_create(struct pakfire_ctx** ctx, const char* path);
+int pakfire_ctx_create(pakfire_ctx** ctx, const char* path);
 
-struct pakfire_ctx* pakfire_ctx_ref(struct pakfire_ctx* self);
-struct pakfire_ctx* pakfire_ctx_unref(struct pakfire_ctx* self);
+pakfire_ctx* pakfire_ctx_ref(pakfire_ctx* self);
+pakfire_ctx* pakfire_ctx_unref(pakfire_ctx* self);
 
 // Flags
 
@@ -42,90 +42,90 @@ enum pakfire_ctx_flags {
        PAKFIRE_CTX_IN_JAIL = (1 << 1),
 };
 
-int pakfire_ctx_has_flag(struct pakfire_ctx* self, int flag);
-int pakfire_ctx_set_flag(struct pakfire_ctx* self, int flag);
+int pakfire_ctx_has_flag(pakfire_ctx* self, int flag);
+int pakfire_ctx_set_flag(pakfire_ctx* self, int flag);
 
 // Config
 
-struct pakfire_config* pakfire_ctx_get_config(struct pakfire_ctx* self);
+struct pakfire_config* pakfire_ctx_get_config(pakfire_ctx* self);
 
 // Logging
 
-int pakfire_ctx_get_log_level(struct pakfire_ctx* self);
-void pakfire_ctx_set_log_level(struct pakfire_ctx* self, int level);
+int pakfire_ctx_get_log_level(pakfire_ctx* self);
+void pakfire_ctx_set_log_level(pakfire_ctx* self, int level);
 
-void pakfire_ctx_set_log_callback(struct pakfire_ctx* self,
+void pakfire_ctx_set_log_callback(pakfire_ctx* self,
        pakfire_log_callback callback, void* data);
 
 // Paths
 
-const char* pakfire_ctx_get_cache_path(struct pakfire_ctx* self);
-int pakfire_ctx_set_cache_path(struct pakfire_ctx* self, const char* path);
+const char* pakfire_ctx_get_cache_path(pakfire_ctx* self);
+int pakfire_ctx_set_cache_path(pakfire_ctx* self, const char* path);
 
 // Confirm
 
-typedef int (*pakfire_confirm_callback)(struct pakfire_ctx* self, struct pakfire* pakfire,
+typedef int (*pakfire_confirm_callback)(pakfire_ctx* self, struct pakfire* pakfire,
        void* data, const char* message, const char* question);
 
-void pakfire_ctx_set_confirm_callback(struct pakfire_ctx* self,
+void pakfire_ctx_set_confirm_callback(pakfire_ctx* self,
        pakfire_confirm_callback callback, void* data);
 
 // Progress
 
-typedef int (*pakfire_progress_callback)(struct pakfire_ctx* self,
+typedef int (*pakfire_progress_callback)(pakfire_ctx* self,
        void* data, struct pakfire_progress* progress);
 
-void pakfire_ctx_set_progress_callback(struct pakfire_ctx* self,
+void pakfire_ctx_set_progress_callback(pakfire_ctx* self,
        pakfire_progress_callback callback, void* data);
 
 // Pick Solution
 
-typedef int (*pakfire_pick_solution_callback)(struct pakfire_ctx* self,
+typedef int (*pakfire_pick_solution_callback)(pakfire_ctx* self,
        struct pakfire* pakfire, void* data, struct pakfire_transaction* transaction);
 
-void pakfire_ctx_set_pick_solution_callback(struct pakfire_ctx* self,
+void pakfire_ctx_set_pick_solution_callback(pakfire_ctx* self,
        pakfire_pick_solution_callback callback, void* data);
 
 // Distro
-const struct pakfire_distro* pakfire_ctx_get_distro(struct pakfire_ctx* self);
+const struct pakfire_distro* pakfire_ctx_get_distro(pakfire_ctx* self);
 
 // Logging
 
-void pakfire_ctx_log(struct pakfire_ctx* self, int level, const char* file, int line,
+void pakfire_ctx_log(pakfire_ctx* self, int level, const char* file, int line,
        const char* fn, const char* format, ...) __attribute__((format(printf, 6, 7)));
 
 // Confirm
 
-int pakfire_ctx_confirm(struct pakfire_ctx* self, struct pakfire* pakfire,
+int pakfire_ctx_confirm(pakfire_ctx* self, struct pakfire* pakfire,
        const char* message, const char* question);
 
 // Progress
 
-int pakfire_ctx_setup_progress(struct pakfire_ctx* self, struct pakfire_progress* progress);
+int pakfire_ctx_setup_progress(pakfire_ctx* self, struct pakfire_progress* progress);
 
 // Pick Solution
 
-int pakfire_ctx_pick_solution(struct pakfire_ctx* self, struct pakfire* pakfire,
+int pakfire_ctx_pick_solution(pakfire_ctx* self, struct pakfire* pakfire,
        struct pakfire_transaction* transaction);
 
 // Event Loop
 
 #include <systemd/sd-event.h>
 
-int pakfire_ctx_loop(struct pakfire_ctx* self, sd_event** loop);
+int pakfire_ctx_loop(pakfire_ctx* self, sd_event** loop);
 
-int pakfire_ctx_loop_is_running(struct pakfire_ctx* self);
+int pakfire_ctx_loop_is_running(pakfire_ctx* self);
 
 // cURL
 
 #include <curl/curl.h>
 
-CURLSH* pakfire_ctx_curl_share(struct pakfire_ctx* self);
+CURLSH* pakfire_ctx_curl_share(pakfire_ctx* self);
 
 // Magic
 
 #include <magic.h>
 
-magic_t pakfire_ctx_magic(struct pakfire_ctx* self);
+magic_t pakfire_ctx_magic(pakfire_ctx* self);
 
 #endif /* PAKFIRE_CTX_H */
index 8a99026b428af0699c70a8071b41274cc9259686..804a348a608457df42780db9910a233f36f1f356 100644 (file)
@@ -34,7 +34,7 @@
 #include <pakfire/util.h>
 
 struct pakfire_daemon {
-       struct pakfire_ctx* ctx;
+       pakfire_ctx* ctx;
        int nrefs;
 
        // Pakfire Client
@@ -332,7 +332,7 @@ static void pakfire_daemon_free(struct pakfire_daemon* self) {
        free(self);
 }
 
-int pakfire_daemon_create(struct pakfire_daemon** daemon, struct pakfire_ctx* ctx) {
+int pakfire_daemon_create(struct pakfire_daemon** daemon, pakfire_ctx* ctx) {
        struct pakfire_daemon* self = NULL;
        int r;
 
index b77bcd6937b32feec3da1d83c2a08ded64d192ce..369412223bf176a920bebd42a5a4a113adaafb49 100644 (file)
@@ -25,7 +25,7 @@ struct pakfire_daemon;
 
 #include <pakfire/ctx.h>
 
-int pakfire_daemon_create(struct pakfire_daemon** daemon, struct pakfire_ctx* ctx);
+int pakfire_daemon_create(struct pakfire_daemon** daemon, pakfire_ctx* ctx);
 
 struct pakfire_daemon* pakfire_daemon_ref(struct pakfire_daemon* self);
 struct pakfire_daemon* pakfire_daemon_unref(struct pakfire_daemon* self);
index 73ed487ef1b966100dfc306415f6f85d109c3e02..a5bf43be21a1c7ff625c57b8e17d54b1582d8a76 100644 (file)
@@ -47,7 +47,7 @@
 #define SCHEMA_MIN_SUP 7
 
 struct pakfire_db {
-       struct pakfire_ctx* ctx;
+       pakfire_ctx* ctx;
        struct pakfire* pakfire;
        int nrefs;
 
@@ -60,7 +60,7 @@ struct pakfire_db {
 };
 
 static void logging_callback(void* data, int r, const char* msg) {
-       struct pakfire_ctx* ctx = data;
+       pakfire_ctx* ctx = data;
 
        ERROR(ctx, "Database Error: %s: %s\n",
                sqlite3_errstr(r), msg);
index 1f8d9bec4195609593359935fe214a6123cee2e3..df96ea35fe5049ff3388d4561c79266bc5498353 100644 (file)
@@ -154,7 +154,7 @@ int pakfire_read_makefile(struct pakfire_parser** parser, struct pakfire* pakfir
        int r;
 
        // Fetch context
-       struct pakfire_ctx* ctx = pakfire_get_ctx(pakfire);
+       pakfire_ctx* ctx = pakfire_get_ctx(pakfire);
 
        // Create a new parser
        r = pakfire_parser_create(parser, pakfire, NULL, NULL, PAKFIRE_PARSER_FLAGS_EXPAND_COMMANDS);
@@ -230,7 +230,7 @@ ERROR:
        return r;
 }
 
-static int pakfire_dist_get_mirrorlist(struct pakfire_ctx* ctx, struct pakfire* pakfire,
+static int pakfire_dist_get_mirrorlist(pakfire_ctx* ctx, struct pakfire* pakfire,
                struct pakfire_parser* makefile, struct pakfire_mirrorlist** list) {
        struct pakfire_mirrorlist* m = NULL;
        struct pakfire_mirror* mirror = NULL;
@@ -280,11 +280,11 @@ ERROR:
        return r;
 }
 
-static int pakfire_dist_download_source(struct pakfire_ctx* ctx,
+static int pakfire_dist_download_source(pakfire_ctx* ctx,
        struct pakfire_mirrorlist* mirrorlist, const char* cache_path, const char* filename, ...)
        __attribute__((format(printf, 4, 5)));
 
-static int pakfire_dist_download_source(struct pakfire_ctx* ctx,
+static int pakfire_dist_download_source(pakfire_ctx* ctx,
                struct pakfire_mirrorlist* mirrorlist, const char* cache_path, const char* filename, ...) {
        struct pakfire_xfer* xfer = NULL;
        va_list args;
@@ -325,7 +325,7 @@ ERROR:
 }
 
 static int pakfire_dist_add_source(struct pakfire* pakfire, struct pakfire_packager* packager,
-               struct pakfire_package* pkg, struct pakfire_ctx* ctx,
+               struct pakfire_package* pkg, pakfire_ctx* ctx,
                struct pakfire_mirrorlist* mirrorlist, const char* filename) {
        char archive_path[PATH_MAX];
        char cache_path[PATH_MAX];
@@ -351,7 +351,7 @@ static int pakfire_dist_add_source(struct pakfire* pakfire, struct pakfire_packa
        return pakfire_packager_add(packager, cache_path, archive_path);
 }
 
-static int pakfire_dist_add_sources(struct pakfire_ctx* ctx, struct pakfire* pakfire,
+static int pakfire_dist_add_sources(pakfire_ctx* ctx, struct pakfire* pakfire,
                struct pakfire_packager* packager, struct pakfire_package* pkg, struct pakfire_parser* makefile) {
        struct pakfire_mirrorlist* mirrorlist = NULL;
        char* sources = NULL;
@@ -412,7 +412,7 @@ static int __pakfire_dist_find_root(char* root, const size_t length, const char*
        return __pakfire_path_dirname(root, length, p);
 }
 
-static int pakfire_dist_add_files(struct pakfire_ctx* ctx, struct pakfire* pakfire,
+static int pakfire_dist_add_files(pakfire_ctx* ctx, struct pakfire* pakfire,
                struct pakfire_packager* packager, const char* file) {
        struct pakfire_filelist* filelist = NULL;
        char root[PATH_MAX];
@@ -460,7 +460,7 @@ int pakfire_dist(struct pakfire* pakfire,
        int r;
 
        // Fetch context
-       struct pakfire_ctx* ctx = pakfire_get_ctx(pakfire);
+       pakfire_ctx* ctx = pakfire_get_ctx(pakfire);
 
        // Load makefile
        r = pakfire_read_makefile(&makefile, pakfire, path, &error);
index 6c97b18c32beaa58e281f14ae140ae67ab6f1261..97540f5f29ff1f44dd006fcdd51082c0c860177b 100644 (file)
@@ -34,7 +34,7 @@
 #include <elfutils/libdwelf.h>
 
 struct pakfire_elf {
-       struct pakfire_ctx* ctx;
+       pakfire_ctx* ctx;
        int nrefs;
 
        // Path
@@ -68,7 +68,7 @@ struct pakfire_elf {
        const char* debuglink;
 };
 
-static int pakfire_elf_init_libelf(struct pakfire_ctx* ctx) {
+static int pakfire_elf_init_libelf(pakfire_ctx* ctx) {
        // Initialize libelf
        if (elf_version(EV_CURRENT) == EV_NONE) {
                ERROR(ctx, "Could not initialize libelf: %s\n", elf_errmsg(-1));
@@ -142,7 +142,7 @@ static void pakfire_elf_free(struct pakfire_elf* self) {
 }
 
 int pakfire_elf_open(struct pakfire_elf** elf,
-               struct pakfire_ctx* ctx, const char* path, int fd) {
+               pakfire_ctx* ctx, const char* path, int fd) {
        struct pakfire_elf* self = NULL;
        int r;
 
@@ -191,7 +191,7 @@ ERROR:
 }
 
 int pakfire_elf_open_file(struct pakfire_elf** elf,
-               struct pakfire_ctx* ctx, struct pakfire_file* file) {
+               pakfire_ctx* ctx, struct pakfire_file* file) {
        const char* path = NULL;
        int fd = -EBADF;
        int r;
index 1d0c888414300434aee00403ededd9c453d6b4d1..3f9e954ab5a6f2706366fc0e946131e3488c90e2 100644 (file)
@@ -27,9 +27,9 @@ struct pakfire_elf;
 #include <pakfire/file.h>
 
 int pakfire_elf_open(struct pakfire_elf** elf,
-       struct pakfire_ctx* ctx, const char* path, int fd);
+       pakfire_ctx* ctx, const char* path, int fd);
 int pakfire_elf_open_file(struct pakfire_elf** elf,
-       struct pakfire_ctx* ctx, struct pakfire_file* file);
+       pakfire_ctx* ctx, struct pakfire_file* file);
 
 struct pakfire_elf* pakfire_elf_ref(struct pakfire_elf* self);
 struct pakfire_elf* pakfire_elf_unref(struct pakfire_elf* self);
@@ -67,7 +67,7 @@ int pakfire_elf_requires(struct pakfire_elf* self, char*** requires);
 
 // Source Files
 typedef int (*pakfire_elf_foreach_source_file_callback)
-       (struct pakfire_ctx* ctx, struct pakfire_elf* elf, const char* filename, void* data);
+       (pakfire_ctx* ctx, struct pakfire_elf* elf, const char* filename, void* data);
 
 int pakfire_elf_foreach_source_file(struct pakfire_elf* self,
        pakfire_elf_foreach_source_file_callback callback, void* data);
index 9ea23019ca54feeae6cfb3a0013bc2d53e52098b..ab1a0f1f67d1e5acfcfbf7e06351ed3688465183 100644 (file)
@@ -28,7 +28,7 @@
 #define ENVIRON_SIZE     128
 
 struct pakfire_env {
-       struct pakfire_ctx* ctx;
+       pakfire_ctx* ctx;
        int nrefs;
 
        char* env[ENVIRON_SIZE];
@@ -44,7 +44,7 @@ static void pakfire_env_free(struct pakfire_env* env) {
        free(env);
 }
 
-int pakfire_env_create(struct pakfire_env** env, struct pakfire_ctx* ctx) {
+int pakfire_env_create(struct pakfire_env** env, pakfire_ctx* ctx) {
        struct pakfire_env* e = NULL;
 
        // Allocate a new environment
index 3fb911639b992bbe217ce677da4be28deb6c5068..05fbe438b021e322aef61ded998d4dc74ce25f31 100644 (file)
@@ -25,7 +25,7 @@ struct pakfire_env;
 
 #include <pakfire/ctx.h>
 
-int pakfire_env_create(struct pakfire_env** env, struct pakfire_ctx* ctx);
+int pakfire_env_create(struct pakfire_env** env, pakfire_ctx* ctx);
 
 struct pakfire_env* pakfire_env_ref(struct pakfire_env* env);
 struct pakfire_env* pakfire_env_unref(struct pakfire_env* env);
index 01f20b2e6f0ac68e4195807c20ef35a008f8d67e..55631be6c20126bda96422511760b13cdb1d7969 100644 (file)
@@ -202,7 +202,7 @@ static const struct pakfire_fhs_check {
 };
 
 static const struct pakfire_fhs_check* pakfire_fhs_find_check(
-               struct pakfire_ctx* ctx, struct pakfire_file* file) {
+               pakfire_ctx* ctx, struct pakfire_file* file) {
        const struct pakfire_fhs_check* check = NULL;
        char path[PATH_MAX];
        int r;
@@ -247,7 +247,7 @@ ERROR:
 }
 
 static int pakfire_fhs_check_world_writable(
-               struct pakfire_ctx* ctx, struct pakfire_file* file) {
+               pakfire_ctx* ctx, struct pakfire_file* file) {
        // Run this check only for regular files
        switch (pakfire_file_get_type(file)) {
                case S_IFREG:
@@ -272,7 +272,7 @@ static int pakfire_fhs_check_world_writable(
        return 0;
 }
 
-static int pakfire_fhs_check_perms(struct pakfire_ctx* ctx,
+static int pakfire_fhs_check_perms(pakfire_ctx* ctx,
                const struct pakfire_fhs_check* check, struct pakfire_file* file) {
        // No permissions defined. Skipping check...
        if (!check->perms)
@@ -293,7 +293,7 @@ static int pakfire_fhs_check_perms(struct pakfire_ctx* ctx,
        return 0;
 }
 
-static int pakfire_fhs_check_ownership(struct pakfire_ctx* ctx,
+static int pakfire_fhs_check_ownership(pakfire_ctx* ctx,
                const struct pakfire_fhs_check* check, struct pakfire_file* file) {
        const char* path = pakfire_file_get_path(file);
 
@@ -325,7 +325,7 @@ static int pakfire_fhs_check_ownership(struct pakfire_ctx* ctx,
        return 0;
 }
 
-static int pakfire_fhs_check_noexec(struct pakfire_ctx* ctx,
+static int pakfire_fhs_check_noexec(pakfire_ctx* ctx,
                const struct pakfire_fhs_check* check, struct pakfire_file* file) {
        // Skip this check if PAKFIRE_FHS_CHECK_NOEXEC is not set
        if (!(check->flags & PAKFIRE_FHS_CHECK_NOEXEC))
@@ -346,7 +346,7 @@ static int pakfire_fhs_check_noexec(struct pakfire_ctx* ctx,
        return 0;
 }
 
-int pakfire_fhs_check_file(struct pakfire_ctx* ctx, struct pakfire_file* file) {
+int pakfire_fhs_check_file(pakfire_ctx* ctx, struct pakfire_file* file) {
        const struct pakfire_fhs_check* check = NULL;
        int status = 0;
        int r;
index aae6b28cd497c44a50ee01c38203c0e64c59c8ed..88ebb259983ac65ca66a9e2eff541671b5e6ca2c 100644 (file)
@@ -33,6 +33,6 @@ enum pakfire_fhs_status {
        PAKFIRE_FHS_NOEXEC         = (1 << 5),
 };
 
-int pakfire_fhs_check_file(struct pakfire_ctx* ctx, struct pakfire_file* file);
+int pakfire_fhs_check_file(pakfire_ctx* ctx, struct pakfire_file* file);
 
 #endif /* PAKFIRE_FHS_H */
index 176fde31a0992d6bb357938b946b54abc20fadd5..5ac6e25b12c9b127959c217038a8c61705077871 100644 (file)
@@ -61,7 +61,7 @@ enum pakfire_file_verification_status {
 };
 
 struct pakfire_file {
-       struct pakfire_ctx* ctx;
+       pakfire_ctx* ctx;
        struct pakfire* pakfire;
        int nrefs;
 
index f2e6011b34c9d7a5f3b2a32ee2d4ae632f6de8a1..6b785dff0febcfc9a13772e4364aa367f5558068 100644 (file)
@@ -36,7 +36,7 @@
 #include <pakfire/util.h>
 
 struct pakfire_filelist {
-       struct pakfire_ctx* ctx;
+       pakfire_ctx* ctx;
        struct pakfire* pakfire;
        int nrefs;
 
@@ -228,7 +228,7 @@ static int pakfire_filelist_remove(struct pakfire_filelist* list, struct pakfire
 }
 
 static int __pakfire_filelist_remove_one(
-               struct pakfire_ctx* ctx, struct pakfire_file* file, void* data) {
+               pakfire_ctx* ctx, struct pakfire_file* file, void* data) {
        struct pakfire_filelist* list = data;
 
        // Remove the file from the given filelist
@@ -553,7 +553,7 @@ ERROR:
 }
 
 static int __pakfire_filelist_dump(
-               struct pakfire_ctx* ctx, struct pakfire_file* file, void* data) {
+               pakfire_ctx* ctx, struct pakfire_file* file, void* data) {
        int* flags = data;
 
        char* s = pakfire_file_dump(file, *flags);
@@ -648,7 +648,7 @@ int pakfire_filelist_cleanup(struct pakfire_filelist* list, int flags) {
 }
 
 static int __pakfire_filelist_matches_class(
-               struct pakfire_ctx* ctx, struct pakfire_file* file, void* data) {
+               pakfire_ctx* ctx, struct pakfire_file* file, void* data) {
        int* class = data;
 
        return pakfire_file_matches_class(file, *class);
index 1377019880bd0957cdbb68d8407eb9cdaa9959c5..eb87174c0a918967726a7af7ee84d57ae4cabbb6 100644 (file)
@@ -58,7 +58,7 @@ int pakfire_filelist_scan(struct pakfire_filelist* list, const char* root,
 int pakfire_filelist_contains(struct pakfire_filelist* list, const char* pattern);
 
 typedef int (*pakfire_filelist_walk_callback)
-       (struct pakfire_ctx* ctx, struct pakfire_file* file, void* data);
+       (pakfire_ctx* ctx, struct pakfire_file* file, void* data);
 
 enum pakfire_filelist_walk_flags {
        PAKFIRE_FILELIST_SHOW_PROGRESS = (1 << 0),
index d588f082faa77ab13cbe1baf189bc8ed0d8a2d53..b1193d4d99be58ba53674e67bf760034776d4d42 100644 (file)
@@ -32,7 +32,7 @@
 #include <pakfire/hashes.h>
 
 struct pakfire_hasher {
-       struct pakfire_ctx* ctx;
+       pakfire_ctx* ctx;
        int nrefs;
 
        // Selected hashes
@@ -144,7 +144,7 @@ static int pakfire_hasher_setup_hashes(struct pakfire_hasher* self) {
 }
 
 int pakfire_hasher_create(struct pakfire_hasher** hasher,
-               struct pakfire_ctx* ctx, enum pakfire_hash_type types) {
+               pakfire_ctx* ctx, enum pakfire_hash_type types) {
        struct pakfire_hasher* self = NULL;
        int r;
 
@@ -318,7 +318,7 @@ int pakfire_hasher_finalize(struct pakfire_hasher* self, struct pakfire_hashes*
 /*
  * Convenience function to hash a buffer
  */
-int pakfire_hash_buffer(struct pakfire_ctx* ctx, const char* buffer, const size_t length,
+int pakfire_hash_buffer(pakfire_ctx* ctx, const char* buffer, const size_t length,
                const enum pakfire_hash_type types, struct pakfire_hashes* hashes) {
        struct pakfire_hasher* hasher = NULL;
        int r;
@@ -351,7 +351,7 @@ ERROR:
 /*
        Convenience function to hash a file
 */
-int pakfire_hash_file(struct pakfire_ctx* ctx,
+int pakfire_hash_file(pakfire_ctx* ctx,
                FILE* f, const enum pakfire_hash_type types, struct pakfire_hashes* hashes) {
        struct pakfire_hasher* hasher = NULL;
        char buffer[65536];
@@ -394,7 +394,7 @@ ERROR:
        return r;
 }
 
-int pakfire_hash_path(struct pakfire_ctx* ctx,
+int pakfire_hash_path(pakfire_ctx* ctx,
                const char* path, const enum pakfire_hash_type types, struct pakfire_hashes* hashes) {
        FILE* f = NULL;
        int r;
index 4324a82fc02ccc9fc1cc278fcdb0ddc49ea2548b..cabf65dc3ecd160485b2c6781276262337878657 100644 (file)
@@ -29,7 +29,7 @@
 struct pakfire_hasher;
 
 int pakfire_hasher_create(struct pakfire_hasher** hasher,
-       struct pakfire_ctx* ctx, enum pakfire_hash_type types);
+       pakfire_ctx* ctx, enum pakfire_hash_type types);
 
 struct pakfire_hasher* pakfire_hasher_ref(struct pakfire_hasher* self);
 struct pakfire_hasher* pakfire_hasher_unref(struct pakfire_hasher* self);
@@ -37,11 +37,11 @@ struct pakfire_hasher* pakfire_hasher_unref(struct pakfire_hasher* self);
 int pakfire_hasher_update(struct pakfire_hasher* self, const char* buffer, const size_t length);
 int pakfire_hasher_finalize(struct pakfire_hasher* self, struct pakfire_hashes* computed_hashes);
 
-int pakfire_hash_buffer(struct pakfire_ctx* ctx, const char* buffer, const size_t length,
+int pakfire_hash_buffer(pakfire_ctx* ctx, const char* buffer, const size_t length,
        const enum pakfire_hash_type types, struct pakfire_hashes* hashes);
-int pakfire_hash_file(struct pakfire_ctx* ctx,
+int pakfire_hash_file(pakfire_ctx* ctx,
        FILE* f, enum pakfire_hash_type types, struct pakfire_hashes* hashes);
-int pakfire_hash_path(struct pakfire_ctx* ctx,
+int pakfire_hash_path(pakfire_ctx* ctx,
        const char* path, const enum pakfire_hash_type types, struct pakfire_hashes* hashes);
 
 #endif /* PAKFIRE_HASHER_H */
index 471a710ed79cbc11ac5abe3d527ef891a98e10e3..333faa5f86bc2a4fec0f9fab52842f5610f2844d 100644 (file)
@@ -291,7 +291,7 @@ int pakfire_hashes_set_hex(struct pakfire_hashes* hashes,
        return 0;
 }
 
-static int __pakfire_hashes_dump(struct pakfire_ctx* ctx,
+static int __pakfire_hashes_dump(pakfire_ctx* ctx,
                const struct pakfire_hashes* hashes, const enum pakfire_hash_type hash, int level) {
        char* hexdigest = NULL;
        int r;
@@ -315,7 +315,7 @@ ERROR:
        return r;
 }
 
-int pakfire_hashes_dump(struct pakfire_ctx* ctx, const struct pakfire_hashes* hashes, int level) {
+int pakfire_hashes_dump(pakfire_ctx* ctx, const struct pakfire_hashes* hashes, int level) {
        enum pakfire_hash_type hash = PAKFIRE_HASH_UNDEFINED;
        int r;
 
@@ -328,7 +328,7 @@ int pakfire_hashes_dump(struct pakfire_ctx* ctx, const struct pakfire_hashes* ha
        return 0;
 }
 
-static int __pakfire_hashes_compare(struct pakfire_ctx* ctx, const enum pakfire_hash_type hash,
+static int __pakfire_hashes_compare(pakfire_ctx* ctx, const enum pakfire_hash_type hash,
                const struct pakfire_hashes* hashes1, const struct pakfire_hashes* hashes2) {
        int r;
 
@@ -373,7 +373,7 @@ static int __pakfire_hashes_compare(struct pakfire_ctx* ctx, const enum pakfire_
        return r;
 }
 
-int pakfire_hashes_compare(struct pakfire_ctx* ctx,
+int pakfire_hashes_compare(pakfire_ctx* ctx,
                const struct pakfire_hashes* hashes1, const struct pakfire_hashes* hashes2) {
        enum pakfire_hash_type hash = PAKFIRE_HASH_UNDEFINED;
        int r;
index e7a27b57be3186b9a3c967b2e6961c691de94d60..b225df7c4cf113b6d79000c34f99b6ce13282e6e 100644 (file)
@@ -98,9 +98,9 @@ int pakfire_hashes_get_hex(const struct pakfire_hashes* hashes,
 int pakfire_hashes_set_hex(struct pakfire_hashes* hashes,
        const enum pakfire_hash_type type, const char* hexdigest);
 
-int pakfire_hashes_dump(struct pakfire_ctx* ctx, const struct pakfire_hashes* hashes, int level);
+int pakfire_hashes_dump(pakfire_ctx* ctx, const struct pakfire_hashes* hashes, int level);
 
-int pakfire_hashes_compare(struct pakfire_ctx* ctx,
+int pakfire_hashes_compare(pakfire_ctx* ctx,
        const struct pakfire_hashes* hashes1, const struct pakfire_hashes* hashes2);
 
 #endif /* PAKFIRE_HASHES_H */
index 0aac81c6e40abb67705247eeed1a108604c0a284..fd14bc0bfb2b9a2a5fa74c572157389f0967ca85 100644 (file)
@@ -50,7 +50,7 @@ struct pakfire_httpclient_xfer {
 };
 
 struct pakfire_httpclient {
-       struct pakfire_ctx* ctx;
+       pakfire_ctx* ctx;
        int nrefs;
 
        // Flags
@@ -696,7 +696,7 @@ static void pakfire_httpclient_free(struct pakfire_httpclient* self) {
 }
 
 int pakfire_httpclient_create(struct pakfire_httpclient** client,
-               struct pakfire_ctx* ctx, int progress_flags) {
+               pakfire_ctx* ctx, int progress_flags) {
        struct pakfire_httpclient* self = NULL;
        int r;
 
index 8031834bc5482d43a39910d8b404a8da60d286d2..0fcce7a9180e2c9bdaab3f375703f69c42228dbe 100644 (file)
@@ -27,7 +27,7 @@ struct pakfire_httpclient;
 #include <pakfire/xfer.h>
 
 int pakfire_httpclient_create(struct pakfire_httpclient** client,
-               struct pakfire_ctx* ctx, int progress_flags);
+               pakfire_ctx* ctx, int progress_flags);
 
 struct pakfire_httpclient* pakfire_httpclient_ref(struct pakfire_httpclient* self);
 struct pakfire_httpclient* pakfire_httpclient_unref(struct pakfire_httpclient* self);
index 858593f69a932f236e7da119bd14a60d04e39bca..87b612d01c624d77431d544b3d064d9998e77b3d 100644 (file)
@@ -90,7 +90,7 @@ struct pakfire_jail_mountpoint {
 };
 
 struct pakfire_jail {
-       struct pakfire_ctx* ctx;
+       pakfire_ctx* ctx;
        struct pakfire* pakfire;
        int nrefs;
 
@@ -568,21 +568,21 @@ static void pakfire_jail_log_redirect(void* data, int priority, const char* file
 /*
        Passes any log messages on to the context logger
 */
-static int pakfire_jail_INFO(struct pakfire_ctx* ctx, void* data, const char* line, size_t length) {
+static int pakfire_jail_INFO(pakfire_ctx* ctx, void* data, const char* line, size_t length) {
        struct pakfire_jail* jail = data;
 
        INFO(jail->ctx, "%.*s", (int)length, line);
        return 0;
 }
 
-static int pakfire_jail_WARN(struct pakfire_ctx* ctx, void* data, const char* line, size_t length) {
+static int pakfire_jail_WARN(pakfire_ctx* ctx, void* data, const char* line, size_t length) {
        struct pakfire_jail* jail = data;
 
        ERROR(jail->ctx, "%.*s", (int)length, line);
        return 0;
 }
 
-static int pakfire_jail_ERROR(struct pakfire_ctx* ctx, void* data, const char* line, size_t length) {
+static int pakfire_jail_ERROR(pakfire_ctx* ctx, void* data, const char* line, size_t length) {
        struct pakfire_jail* jail = data;
 
        ERROR(jail->ctx, "%.*s", (int)length, line);
@@ -590,7 +590,7 @@ static int pakfire_jail_ERROR(struct pakfire_ctx* ctx, void* data, const char* l
 }
 
 #ifdef ENABLE_DEBUG
-static int pakfire_jail_DEBUG(struct pakfire_ctx* ctx, void* data, const char* line, size_t length) {
+static int pakfire_jail_DEBUG(pakfire_ctx* ctx, void* data, const char* line, size_t length) {
        struct pakfire_jail* jail = data;
 
        DEBUG(jail->ctx, "%.*s", (int)length, line);
@@ -598,7 +598,7 @@ static int pakfire_jail_DEBUG(struct pakfire_ctx* ctx, void* data, const char* l
 }
 #endif /* ENABLE_DEBUG */
 
-static int pakfire_jail_output_stdout(struct pakfire_ctx* ctx, void* data, const char* line, size_t length) {
+static int pakfire_jail_output_stdout(pakfire_ctx* ctx, void* data, const char* line, size_t length) {
        struct pakfire_jail_exec* exec = data;
 
        // Do nothing if we don't have a callback
@@ -608,7 +608,7 @@ static int pakfire_jail_output_stdout(struct pakfire_ctx* ctx, void* data, const
        return exec->callbacks.output(ctx, exec->callbacks.output_data, PAKFIRE_STDOUT, line, length);
 }
 
-static int pakfire_jail_output_stderr(struct pakfire_ctx* ctx, void* data, const char* line, size_t length) {
+static int pakfire_jail_output_stderr(pakfire_ctx* ctx, void* data, const char* line, size_t length) {
        struct pakfire_jail_exec* exec = data;
 
        // Do nothing if we don't have a callback
@@ -1224,7 +1224,7 @@ struct pakfire_jail_command {
        struct pakfire_env* env;
 };
 
-static int pakfire_jail_launch_command(struct pakfire_ctx* ctx, void* data) {
+static int pakfire_jail_launch_command(pakfire_ctx* ctx, void* data) {
        struct pakfire_jail_command* command = data;
        struct pakfire_env* env = NULL;
        char** envp = NULL;
@@ -2259,7 +2259,7 @@ static int pakfire_jail_run_if_possible(struct pakfire* pakfire, const char** ar
        int r;
 
        // Fetch the context
-       struct pakfire_ctx* ctx = pakfire_get_ctx(pakfire);
+       pakfire_ctx* ctx = pakfire_get_ctx(pakfire);
 
        r = pakfire_path(pakfire, path, "%s", *argv);
        if (r)
@@ -2300,7 +2300,7 @@ int pakfire_jail_run_systemd_tmpfiles(struct pakfire* pakfire) {
        return pakfire_jail_run_if_possible(pakfire, argv);
 }
 
-ssize_t pakfire_jail_send_buffer(struct pakfire_ctx* ctx,
+ssize_t pakfire_jail_send_buffer(pakfire_ctx* ctx,
                void* data, char* buffer, size_t length) {
        struct pakfire_input_buffer* input = data;
 
@@ -2326,7 +2326,7 @@ ssize_t pakfire_jail_send_buffer(struct pakfire_ctx* ctx,
        return length;
 }
 
-ssize_t pakfire_jail_send_filelist(struct pakfire_ctx* ctx,
+ssize_t pakfire_jail_send_filelist(pakfire_ctx* ctx,
                void* data, char* buffer, size_t length) {
        struct pakfire_jail_filelist* input = data;
        struct pakfire_file* file = NULL;
index 82defa99dcadf21a5c57c0d67de7c77b0af12ad1..e86a63509e669df478ca1f4de2ae074b416c2994 100644 (file)
@@ -37,7 +37,7 @@ enum pakfire_jail_output_stream {
        PAKFIRE_STDERR,
 };
 
-typedef int (*pakfire_jail_output_callback)(struct pakfire_ctx* ctx, void* data,
+typedef int (*pakfire_jail_output_callback)(pakfire_ctx* ctx, void* data,
        const enum pakfire_jail_output_stream stream, const char* line, size_t length);
 
 int pakfire_jail_create(struct pakfire_jail** jail, struct pakfire* pakfire);
@@ -55,7 +55,7 @@ int pakfire_jail_nice(struct pakfire_jail* jail, int nice);
 // Timeout
 int pakfire_jail_set_timeout(struct pakfire_jail* jail, unsigned int timeout);
 
-typedef int (*pakfire_jail_main_callback)(struct pakfire_ctx* ctx, void* data);
+typedef int (*pakfire_jail_main_callback)(pakfire_ctx* ctx, void* data);
 
 enum pakfire_jail_exec_flags {
        PAKFIRE_JAIL_INTERACTIVE      = (1 << 0),
@@ -102,7 +102,7 @@ struct pakfire_input_buffer {
        size_t length;
 };
 
-ssize_t pakfire_jail_send_buffer(struct pakfire_ctx* ctx,
+ssize_t pakfire_jail_send_buffer(pakfire_ctx* ctx,
        void* data, char* buffer, size_t length);
 
 // Stream a filelist
@@ -116,7 +116,7 @@ struct pakfire_jail_filelist {
        const char* p;
 };
 
-ssize_t pakfire_jail_send_filelist(struct pakfire_ctx* ctx,
+ssize_t pakfire_jail_send_filelist(pakfire_ctx* ctx,
        void* data, char* buffer, size_t length);
 
 #endif /* PAKFIRE_JAIL_H */
index 3514e3b04d9bb095930329764bab010afb8a16b8..01d639bf711232471b1a74eee42a3904ab08400f 100644 (file)
@@ -51,7 +51,7 @@
 #include <pakfire/util.h>
 
 struct pakfire_job {
-       struct pakfire_ctx* ctx;
+       pakfire_ctx* ctx;
        int nrefs;
 
        // Builder
@@ -406,7 +406,7 @@ static int pakfire_job_logfile_uploaded(struct pakfire_client* client,
        return pakfire_job_upload_packages(self);
 }
 
-static int pakfire_job_result(struct pakfire_ctx* ctx, struct pakfire* pakfire,
+static int pakfire_job_result(pakfire_ctx* ctx, struct pakfire* pakfire,
                struct pakfire_build* build, struct pakfire_archive* archive, void* data) {
        struct pakfire_job* self = data;
        struct pakfire_package* pkg = NULL;
@@ -535,7 +535,7 @@ static int pakfire_job_send_log(struct pakfire_job* job, int priority, const cha
        return pakfire_builder_stream_logs(job->builder);
 }
 
-static int pakfire_job_stdout(struct pakfire_ctx* ctx,
+static int pakfire_job_stdout(pakfire_ctx* ctx,
                void* data, const char* line, size_t length) {
        struct pakfire_job* job = data;
 
@@ -543,7 +543,7 @@ static int pakfire_job_stdout(struct pakfire_ctx* ctx,
        return pakfire_job_send_log(job, LOG_INFO, line, length);
 }
 
-static int pakfire_job_stderr(struct pakfire_ctx* ctx,
+static int pakfire_job_stderr(pakfire_ctx* ctx,
                void* data, const char* line, size_t length) {
        struct pakfire_job* job = data;
 
@@ -614,7 +614,7 @@ static void pakfire_job_log(void* data, int priority, const char* file,
 }
 
 static int pakfire_job_child(struct pakfire_job* job) {
-       struct pakfire_ctx* ctx = NULL;
+       pakfire_ctx* ctx = NULL;
        struct pakfire_build* build = NULL;
        int build_flags = 0;
        int r;
@@ -856,7 +856,7 @@ int pakfire_job_stream_logs(struct pakfire_job* self) {
        return 1;
 }
 
-int pakfire_job_create(struct pakfire_job** job, struct pakfire_ctx* ctx,
+int pakfire_job_create(struct pakfire_job** job, pakfire_ctx* ctx,
                struct pakfire_client* client, struct pakfire_builder* builder, json_object* data) {
        struct pakfire_job* j = NULL;
        char* p = NULL;
index 69e28559a03035cb10a862642bf5ff52f3df4211..576c6dd63fef67bdef3aa7f39ef36dc1aabc5fbb 100644 (file)
@@ -29,7 +29,7 @@
 
 struct pakfire_job;
 
-int pakfire_job_create(struct pakfire_job** worker, struct pakfire_ctx* ctx,
+int pakfire_job_create(struct pakfire_job** worker, pakfire_ctx* ctx,
        struct pakfire_client* client, struct pakfire_builder* builder, json_object* data);
 
 struct pakfire_job* pakfire_job_ref(struct pakfire_job* worker);
index db945dec6471b11d9d4ace9eeec01938100c9a7a..58b2402db8435f8cee195fb0c2354c7cfb60795b 100644 (file)
@@ -49,7 +49,7 @@
 #define ERROR_MAX              1024
 
 struct pakfire_key {
-       struct pakfire_ctx* ctx;
+       pakfire_ctx* ctx;
        int nrefs;
 
        // Algorithm
@@ -94,7 +94,7 @@ static int pakfire_key_id_equals(const pakfire_key_id* id1, const pakfire_key_id
        return !memcmp(*id1, *id2, sizeof(*id1));
 }
 
-static int pakfire_key_create(struct pakfire_key** key, struct pakfire_ctx* ctx,
+static int pakfire_key_create(struct pakfire_key** key, pakfire_ctx* ctx,
                const pakfire_key_algo_t algo, const pakfire_key_id id, EVP_PKEY* pkey, const char* comment) {
        struct pakfire_key* k = NULL;
        int r = 0;
@@ -195,7 +195,7 @@ const char* pakfire_key_get_comment(struct pakfire_key* key) {
        return key->comment;
 }
 
-int pakfire_key_generate(struct pakfire_key** key, struct pakfire_ctx* ctx,
+int pakfire_key_generate(struct pakfire_key** key, pakfire_ctx* ctx,
                const pakfire_key_algo_t algo, const char* comment) {
        EVP_PKEY* pkey = NULL;
        EVP_PKEY_CTX* pctx = NULL;
@@ -272,7 +272,7 @@ ERROR:
 */
 
 static int pakfire_key_import_secret_key(struct pakfire_key** key,
-               struct pakfire_ctx* ctx, const char* comment,
+               pakfire_ctx* ctx, const char* comment,
                const struct pakfire_key_private_key* buffer) {
        const pakfire_key_algo_t algo = PAKFIRE_KEY_ALGO_ED25519;
        EVP_PKEY* pkey = NULL;
@@ -347,7 +347,7 @@ ERROR:
 }
 
 static int pakfire_key_import_public_key(struct pakfire_key** key,
-               struct pakfire_ctx* ctx, const char* comment,
+               pakfire_ctx* ctx, const char* comment,
                const struct pakfire_key_public_key* buffer) {
        const pakfire_key_algo_t algo = PAKFIRE_KEY_ALGO_ED25519;
        EVP_PKEY* pkey = NULL;
@@ -389,7 +389,7 @@ ERROR:
 }
 
 int pakfire_key_import(struct pakfire_key** key,
-               struct pakfire_ctx* ctx, FILE* f) {
+               pakfire_ctx* ctx, FILE* f) {
        unsigned char* buffer = NULL;
        size_t buffer_length = 0;
        int r;
@@ -483,7 +483,7 @@ ERROR:
 }
 
 int pakfire_key_import_from_string(struct pakfire_key** key,
-               struct pakfire_ctx* ctx, const char* data, const size_t length) {
+               pakfire_ctx* ctx, const char* data, const size_t length) {
        FILE* f = NULL;
        int r;
 
index 55a6cc7941bb1ef562ae0e01b707c831d8db01d9..c69ecaf8699a32072515a6f91795e4e1b6ff6b89 100644 (file)
@@ -47,11 +47,11 @@ pakfire_key_id* pakfire_key_get_id(struct pakfire_key* key);
 const char* pakfire_key_get_algo(struct pakfire_key* key);
 const char* pakfire_key_get_comment(struct pakfire_key* key);
 
-int pakfire_key_generate(struct pakfire_key** key, struct pakfire_ctx* ctx,
+int pakfire_key_generate(struct pakfire_key** key, pakfire_ctx* ctx,
        const pakfire_key_algo_t algo, const char* comment);
 int pakfire_key_export(struct pakfire_key* key, FILE* f, const pakfire_key_export_mode_t mode);
 int pakfire_key_export_string(struct pakfire_key* self, char** buffer, size_t* length);
-int pakfire_key_import(struct pakfire_key** key, struct pakfire_ctx* ctx, FILE* f);
+int pakfire_key_import(struct pakfire_key** key, pakfire_ctx* ctx, FILE* f);
 
 // Sign
 int pakfire_key_sign(struct pakfire_key* key, FILE* s, FILE* f, const char* comment);
@@ -61,6 +61,6 @@ int pakfire_key_verify(struct pakfire_key* key,
        FILE* f, const void* data, const size_t length);
 
 int pakfire_key_import_from_string(struct pakfire_key** key,
-       struct pakfire_ctx* ctx, const char* data, const size_t length);
+       pakfire_ctx* ctx, const char* data, const size_t length);
 
 #endif /* PAKFIRE_KEY_H */
index 61424f961b393b7e1da2f5b7cd9ade8f7fd83c14..64a27ef0d9ae365bef6600775b6149c54c242348 100644 (file)
@@ -34,7 +34,7 @@
 #include <pakfire/string.h>
 
 struct pakfire_linter_file {
-       struct pakfire_ctx* ctx;
+       pakfire_ctx* ctx;
        int nrefs;
 
        // Linter
@@ -108,7 +108,7 @@ static void pakfire_linter_file_free(struct pakfire_linter_file* lfile) {
 }
 
 int pakfire_linter_file_create(struct pakfire_linter_file** lfile,
-               struct pakfire_ctx* ctx, struct pakfire_linter* linter, struct pakfire_file* file, int fd) {
+               pakfire_ctx* ctx, struct pakfire_linter* linter, struct pakfire_file* file, int fd) {
        struct pakfire_linter_file* l = NULL;
        int r = 0;
 
index 88845f608728444aa1484ef3a74cb739cd716174..f899eb92c2c6b9a4e4ba4678ee74023aca46e43f 100644 (file)
@@ -28,7 +28,7 @@ struct pakfire_linter_file;
 #include <pakfire/linter.h>
 
 int pakfire_linter_file_create(struct pakfire_linter_file** lfile,
-       struct pakfire_ctx* ctx, struct pakfire_linter* linter, struct pakfire_file* file, int fd);
+       pakfire_ctx* ctx, struct pakfire_linter* linter, struct pakfire_file* file, int fd);
 
 struct pakfire_linter_file* pakfire_linter_file_ref(struct pakfire_linter_file* lfile);
 struct pakfire_linter_file* pakfire_linter_file_unref(struct pakfire_linter_file* lfile);
index 59cd49f44c3065a39a002a921ed024665315f29c..6055113703fb9f58b573938c133da86a04ad4da2 100644 (file)
@@ -53,7 +53,7 @@ struct pakfire_linter_result {
 };
 
 struct pakfire_linter {
-       struct pakfire_ctx* ctx;
+       pakfire_ctx* ctx;
        int nrefs;
 
        // Pakfire
@@ -546,7 +546,7 @@ static int pakfire_linter_dump_results(
 }
 
 static int __pakfire_linter_dump_file(
-               struct pakfire_ctx* ctx, struct pakfire_file* file, void* data) {
+               pakfire_ctx* ctx, struct pakfire_file* file, void* data) {
        struct pakfire_linter* linter = data;
 
        // Show information about the file
index 586f9283cb98a1b3f8ede4269485525a0c8cbcae..6c1c5d04311616b6c4d23d2027904d415110b54c 100644 (file)
@@ -32,7 +32,7 @@ enum pakfire_linter_priority {
        PAKFIRE_LINTER_ERROR,
 };
 
-typedef int (*pakfire_linter_result_callback)(struct pakfire_ctx* ctx,
+typedef int (*pakfire_linter_result_callback)(pakfire_ctx* ctx,
        struct pakfire_archive* archive, struct pakfire_package* package,
        struct pakfire_file* file, int priority, const char* message, void* data);
 
index 3ef66368f3d5a9e4cdc9c4716bcffa444743252d..285ef38408a4ee1a1935dcd1d13be16a7463009d 100644 (file)
@@ -36,7 +36,7 @@ struct pakfire_log_line {
 };
 
 struct pakfire_log_buffer {
-       struct pakfire_ctx* ctx;
+       pakfire_ctx* ctx;
        int nrefs;
 
        STAILQ_HEAD(lines, pakfire_log_line) lines;
@@ -68,7 +68,7 @@ static void pakfire_log_buffer_free(struct pakfire_log_buffer* buffer) {
        free(buffer);
 }
 
-int pakfire_log_buffer_create(struct pakfire_log_buffer** buffer, struct pakfire_ctx* ctx, size_t max_length) {
+int pakfire_log_buffer_create(struct pakfire_log_buffer** buffer, pakfire_ctx* ctx, size_t max_length) {
        struct pakfire_log_buffer* b = NULL;
 
        // Allocate a new object
index 09ccb9ea14c8673777009e5da9d232e109951524..9831384b1d3e1b107af4af1d7e5d6cdb04de6105 100644 (file)
@@ -31,7 +31,7 @@
 
 struct pakfire_log_buffer;
 
-int pakfire_log_buffer_create(struct pakfire_log_buffer** buffer, struct pakfire_ctx* ctx, size_t size);
+int pakfire_log_buffer_create(struct pakfire_log_buffer** buffer, pakfire_ctx* ctx, size_t size);
 struct pakfire_log_buffer* pakfire_log_buffer_ref(struct pakfire_log_buffer* buffer);
 struct pakfire_log_buffer* pakfire_log_buffer_unref(struct pakfire_log_buffer* buffer);
 
index 4cdbcf0919c6566e305adbd7e96c4fff311a0f21..92776be1c6435e8223067919ecb70ffc1679e8e3 100644 (file)
@@ -30,7 +30,7 @@
 #define MAX_LINE_LENGTH 4096
 
 struct pakfire_log_file {
-       struct pakfire_ctx* ctx;
+       pakfire_ctx* ctx;
        int nrefs;
 
        // Filename
@@ -66,7 +66,7 @@ static void pakfire_log_file_free(struct pakfire_log_file* self) {
        free(self);
 }
 
-int pakfire_log_file_create(struct pakfire_log_file** file, struct pakfire_ctx* ctx,
+int pakfire_log_file_create(struct pakfire_log_file** file, pakfire_ctx* ctx,
                const char* path, const char* filename, int flags) {
        struct pakfire_log_file* self = NULL;
        int r;
index 2de233879b667ac35b1d8672fb6ec0b5f22e2ad6..b930ac064c9b7deabafaa150989a4460a847caaa 100644 (file)
@@ -34,7 +34,7 @@ enum pakfire_log_file_flags {
 };
 
 int pakfire_log_file_create(struct pakfire_log_file** file,
-       struct pakfire_ctx* ctx, const char* path, const char* filename, int flags);
+       pakfire_ctx* ctx, const char* path, const char* filename, int flags);
 struct pakfire_log_file* pakfire_log_file_ref(struct pakfire_log_file* self);
 struct pakfire_log_file* pakfire_log_file_unref(struct pakfire_log_file* self);
 
index 7cb8f12f50d6676a8a571314f21674ba5eef9bba..fcf0969a7f1c5dc53ca09457bd94d9e1064bd630 100644 (file)
@@ -35,7 +35,7 @@
 #define MAX_BUFFER_LENGTH 1024576 // 1 MiB
 
 struct pakfire_log_stream {
-       struct pakfire_ctx* ctx;
+       pakfire_ctx* ctx;
        int nrefs;
 
        // Pipe
@@ -67,7 +67,7 @@ static void pakfire_log_stream_free(struct pakfire_log_stream* stream) {
        free(stream);
 }
 
-int pakfire_log_stream_create(struct pakfire_log_stream** stream, struct pakfire_ctx* ctx,
+int pakfire_log_stream_create(struct pakfire_log_stream** stream, pakfire_ctx* ctx,
                pakfire_log_stream_callback callback, void* data) {
        struct pakfire_log_stream* s = NULL;
        int r;
index 85ce212e2dc389fce59ee0416628357239f0cf26..083ec3e4db8c4c1aaee12f26af6b794484271c22 100644 (file)
 
 struct pakfire_log_stream;
 
-typedef int (*pakfire_log_stream_callback)(struct pakfire_ctx* ctx,
+typedef int (*pakfire_log_stream_callback)(pakfire_ctx* ctx,
        void* data, const char* line, size_t length);
 
-int pakfire_log_stream_create(struct pakfire_log_stream** stream, struct pakfire_ctx* ctx,
+int pakfire_log_stream_create(struct pakfire_log_stream** stream, pakfire_ctx* ctx,
        pakfire_log_stream_callback callback, void* data);
 struct pakfire_log_stream* pakfire_log_stream_ref(struct pakfire_log_stream* stream);
 struct pakfire_log_stream* pakfire_log_stream_unref(struct pakfire_log_stream* stream);
index 862005b298748481da594b0151cd0112fa472d2d..e8a98eafddfb89a84a622e9767ec911763677e7c 100644 (file)
@@ -45,7 +45,7 @@ void pakfire_log_syslog(void* data, int priority, const char* file,
 
 // This function does absolutely nothing
 static inline void __attribute__((always_inline, format(printf, 2, 3)))
-       pakfire_ctx_log_null(struct pakfire_ctx* ctx, const char *format, ...) {}
+       pakfire_ctx_log_null(pakfire_ctx* ctx, const char *format, ...) {}
 
 #define INFO(ctx, arg...) pakfire_ctx_log_condition(ctx, LOG_INFO, ## arg)
 #define WARN(ctx, arg...) pakfire_ctx_log_condition(ctx, LOG_WARNING, ## arg)
index 30a200c341a8927fe1d973c435194d7aaa2d352c..038bfca246f37a9958e217d811a899c760ea2396 100644 (file)
@@ -29,7 +29,7 @@
 #define MIRROR_RETRIES                 3
 
 struct pakfire_mirror {
-       struct pakfire_ctx* ctx;
+       pakfire_ctx* ctx;
        int nrefs;
 
        char url[PATH_MAX];
@@ -49,7 +49,7 @@ static void pakfire_mirror_free(struct pakfire_mirror* mirror) {
 }
 
 int pakfire_mirror_create(struct pakfire_mirror** mirror,
-               struct pakfire_ctx* ctx, const char* url) {
+               pakfire_ctx* ctx, const char* url) {
        struct pakfire_mirror* m = NULL;
        int r;
 
index 754f542483d5b4b8d216e2e2f61045eb2e7f693b..e38d4094b58a7691e7fc9ac086f747da2ed5a803 100644 (file)
@@ -27,7 +27,7 @@ struct pakfire_mirror;
 #include <pakfire/xfer.h>
 
 int pakfire_mirror_create(struct pakfire_mirror** mirror,
-       struct pakfire_ctx* ctx, const char* url);
+       pakfire_ctx* ctx, const char* url);
 
 struct pakfire_mirror* pakfire_mirror_ref(struct pakfire_mirror* mirror);
 struct pakfire_mirror* pakfire_mirror_unref(struct pakfire_mirror* mirror);
index 10016b39a630d286d3a799c8d4630de64c23ac21..06233d9cfe87541c555c78a4d337de91428e3d7b 100644 (file)
@@ -30,7 +30,7 @@
 #include <pakfire/util.h>
 
 struct pakfire_mirrorlist {
-       struct pakfire_ctx* ctx;
+       pakfire_ctx* ctx;
        int nrefs;
 
        // Mirrors
@@ -58,7 +58,7 @@ static void pakfire_mirrorlist_free(struct pakfire_mirrorlist* list) {
        free(list);
 }
 
-int pakfire_mirrorlist_create(struct pakfire_mirrorlist** list, struct pakfire_ctx* ctx) {
+int pakfire_mirrorlist_create(struct pakfire_mirrorlist** list, pakfire_ctx* ctx) {
        struct pakfire_mirrorlist* l = NULL;
 
        // Allocate a new list
index a378228282b2c938821854fb76d9d06d11ebc6d4..999a864bbe5bce378bbe81a77debe973068f12e1 100644 (file)
@@ -26,7 +26,7 @@ struct pakfire_mirrorlist;
 #include <pakfire/ctx.h>
 #include <pakfire/mirror.h>
 
-int pakfire_mirrorlist_create(struct pakfire_mirrorlist** list, struct pakfire_ctx* ctx);
+int pakfire_mirrorlist_create(struct pakfire_mirrorlist** list, pakfire_ctx* ctx);
 
 struct pakfire_mirrorlist* pakfire_mirrorlist_ref(struct pakfire_mirrorlist* list);
 struct pakfire_mirrorlist* pakfire_mirrorlist_unref(struct pakfire_mirrorlist* list);
index 7b65cd3400f18f9e9e36154b8e45b060292073e9..ddfa502fa05eb9f5c915b34f4bf4b1e25feac76a 100644 (file)
@@ -261,7 +261,7 @@ static const struct pakfire_symlink {
        { NULL },
 };
 
-int pakfire_mount_change_propagation(struct pakfire_ctx* ctx, const char* path, int propagation) {
+int pakfire_mount_change_propagation(pakfire_ctx* ctx, const char* path, int propagation) {
        DEBUG(ctx, "Changing mount propagation on %s\n", path);
 
        int r = mount(NULL, path, NULL, propagation|MS_REC, NULL);
@@ -271,12 +271,12 @@ int pakfire_mount_change_propagation(struct pakfire_ctx* ctx, const char* path,
        return r;
 }
 
-static int pakfire_mount_is_mountpoint(struct pakfire_ctx* ctx, const char* path) {
+static int pakfire_mount_is_mountpoint(pakfire_ctx* ctx, const char* path) {
        // XXX THIS STILL NEEDS TO BE IMPLEMENTED
        return 1;
 }
 
-int pakfire_mount_make_mounpoint(struct pakfire_ctx* ctx, const char* path) {
+int pakfire_mount_make_mounpoint(pakfire_ctx* ctx, const char* path) {
        int r;
 
        // Check if path already is a mountpoint
@@ -305,7 +305,7 @@ int pakfire_mount_make_mounpoint(struct pakfire_ctx* ctx, const char* path) {
        return 0;
 }
 
-static int pakfire_mount(struct pakfire_ctx* ctx, const char* source, const char* target,
+static int pakfire_mount(pakfire_ctx* ctx, const char* source, const char* target,
                const char* fstype, unsigned long mflags, const void* data) {
        const char* options = (const char*)data;
 
@@ -327,7 +327,7 @@ static int pakfire_mount(struct pakfire_ctx* ctx, const char* source, const char
 }
 
 static int __pakfire_mount_list(char* line, size_t length, void* data) {
-       struct pakfire_ctx* ctx = data;
+       pakfire_ctx* ctx = data;
 
        // Send the line to the logger
        DEBUG(ctx, "  %.*s", (int)length, line);
@@ -335,13 +335,13 @@ static int __pakfire_mount_list(char* line, size_t length, void* data) {
        return 0;
 }
 
-int pakfire_mount_list(struct pakfire_ctx* ctx) {
+int pakfire_mount_list(pakfire_ctx* ctx) {
        DEBUG(ctx, "Mountpoints:\n");
 
        return pakfire_parse_file("/proc/self/mounts", __pakfire_mount_list, ctx);
 }
 
-int pakfire_populate_dev(struct pakfire_ctx* ctx, struct pakfire* pakfire, int flags) {
+int pakfire_populate_dev(pakfire_ctx* ctx, struct pakfire* pakfire, int flags) {
        char path[PATH_MAX];
 
        // Create device nodes
@@ -406,7 +406,7 @@ MOUNT:
        return 0;
 }
 
-int pakfire_mount_interpreter(struct pakfire_ctx* ctx, struct pakfire* pakfire) {
+int pakfire_mount_interpreter(pakfire_ctx* ctx, struct pakfire* pakfire) {
        char target[PATH_MAX];
 
        // Fetch the target architecture
@@ -444,7 +444,7 @@ int pakfire_mount_interpreter(struct pakfire_ctx* ctx, struct pakfire* pakfire)
        return r;
 }
 
-int pakfire_mount_all(struct pakfire_ctx* ctx, struct pakfire* pakfire, pakfire_mntns_t ns, int flags) {
+int pakfire_mount_all(pakfire_ctx* ctx, struct pakfire* pakfire, pakfire_mntns_t ns, int flags) {
        char target[PATH_MAX];
        int r;
 
@@ -481,7 +481,7 @@ int pakfire_mount_all(struct pakfire_ctx* ctx, struct pakfire* pakfire, pakfire_
        return 0;
 }
 
-int pakfire_bind(struct pakfire_ctx* ctx, struct pakfire* pakfire,
+int pakfire_bind(pakfire_ctx* ctx, struct pakfire* pakfire,
                const char* src, const char* dst, int flags) {
        struct stat st;
        char mountpoint[PATH_MAX];
index fc50eb9c9c049246855e12a1ee5bd7fd7b7bd49d..fc5db114cd4c10e20dd23c678d1584af45ebdcf2 100644 (file)
@@ -29,24 +29,24 @@ typedef enum pakfire_mntns {
        PAKFIRE_MNTNS_OUTER = (2 << 0),
 } pakfire_mntns_t;
 
-int pakfire_mount_change_propagation(struct pakfire_ctx* ctx, const char* path, int propagation);
+int pakfire_mount_change_propagation(pakfire_ctx* ctx, const char* path, int propagation);
 
-int pakfire_mount_make_mounpoint(struct pakfire_ctx* ctx, const char* path);
+int pakfire_mount_make_mounpoint(pakfire_ctx* ctx, const char* path);
 
-int pakfire_bind(struct pakfire_ctx* ctx, struct pakfire* pakfire,
+int pakfire_bind(pakfire_ctx* ctx, struct pakfire* pakfire,
        const char* src, const char* dst, int flags);
 
-int pakfire_mount_list(struct pakfire_ctx* ctx);
+int pakfire_mount_list(pakfire_ctx* ctx);
 
-int pakfire_populate_dev(struct pakfire_ctx* ctx, struct pakfire* pakfire, int flags);
+int pakfire_populate_dev(pakfire_ctx* ctx, struct pakfire* pakfire, int flags);
 
-int pakfire_mount_interpreter(struct pakfire_ctx* ctx, struct pakfire* pakfire);
+int pakfire_mount_interpreter(pakfire_ctx* ctx, struct pakfire* pakfire);
 
 enum pakfire_mount_flags {
        PAKFIRE_MOUNT_LOOP_DEVICES = (1 << 0),
 };
 
-int pakfire_mount_all(struct pakfire_ctx* ctx, struct pakfire* pakfire,
+int pakfire_mount_all(pakfire_ctx* ctx, struct pakfire* pakfire,
        pakfire_mntns_t ns, int flags);
 
 #endif /* PAKFIRE_MOUNT_H */
index 659083bbddeb4cadbd5930be37eddfee262a1876..adecfe6b6644e9e718eb74a144225cbeb2d5ff37 100644 (file)
@@ -41,7 +41,7 @@
 
 struct pakfire_oci_writer {
        // Context
-       struct pakfire_ctx* ctx;
+       pakfire_ctx* ctx;
 
        // Pakfire
        struct pakfire* pakfire;
index 7876286493a2649677faca9e13b9009b16576b87..2f17e269aa3019cfcba342ea7e13112fceb53bcc 100644 (file)
@@ -56,7 +56,7 @@
 #include <pakfire/util.h>
 
 struct pakfire_package {
-       struct pakfire_ctx* ctx;
+       pakfire_ctx* ctx;
        struct pakfire* pakfire;
        int nrefs;
 
@@ -222,7 +222,7 @@ int pakfire_package_create(struct pakfire_package** package,
        }
 
        // Fetch the context
-       struct pakfire_ctx* ctx = pakfire_get_ctx(pakfire);
+       pakfire_ctx* ctx = pakfire_get_ctx(pakfire);
 
        // Allocate a new solvable
        Id id = pakfire_repo_add_solvable(repo);
@@ -2296,7 +2296,7 @@ int pakfire_package_append_file(struct pakfire_package* pkg, const char* path) {
 }
 
 static int __pakfire_package_set_filelist(
-               struct pakfire_ctx* ctx, struct pakfire_file* file, void* data) {
+               pakfire_ctx* ctx, struct pakfire_file* file, void* data) {
        struct pakfire_package* pkg = data;
 
        // Fetch the path
@@ -2436,7 +2436,7 @@ ERROR:
 }
 
 static int __pakfire_package_add_json_filelist(
-               struct pakfire_ctx* ctx, struct pakfire_file* file, void* data) {
+               pakfire_ctx* ctx, struct pakfire_file* file, void* data) {
        struct json_object* filelist = data;
        int r;
 
@@ -2508,7 +2508,7 @@ ERROR:
        return r;
 }
 
-static int __pakfire_package_add_build_packages(struct pakfire_ctx* ctx,
+static int __pakfire_package_add_build_packages(pakfire_ctx* ctx,
                struct pakfire_package* pkg, void* p) {
        struct json_object* object = (struct json_object*)p;
        int r;
index 6d2d742624db7ee5ac8fcfd9e1d98eba1135131a..d4e7c1befd52d2ce988c7b90c313ee9d6230cc8b 100644 (file)
@@ -32,7 +32,7 @@
 #include <pakfire/util.h>
 
 struct pakfire_packagelist {
-       struct pakfire_ctx* ctx;
+       pakfire_ctx* ctx;
        int nrefs;
 
        struct pakfire_package** packages;
@@ -61,7 +61,7 @@ static void pakfire_packagelist_free(struct pakfire_packagelist* list) {
        free(list);
 }
 
-int pakfire_packagelist_create(struct pakfire_packagelist** list, struct pakfire_ctx* ctx) {
+int pakfire_packagelist_create(struct pakfire_packagelist** list, pakfire_ctx* ctx) {
        struct pakfire_packagelist* self = NULL;
 
        // Allocate some memory
@@ -223,7 +223,7 @@ int pakfire_packagelist_import_solvables(struct pakfire_packagelist* self,
 }
 
 static int __pakfire_packagelist_has_path(
-               struct pakfire_ctx* ctx, struct pakfire_package* pkg, void* data) {
+               pakfire_ctx* ctx, struct pakfire_package* pkg, void* data) {
        const char* path = data;
 
        // Fetch the path where we would expect this package to be
index a4e003b08dcb470ec7653a4781189aa662e9218b..e653e8f2d0d4849bf26bee7e842cf638397de40a 100644 (file)
@@ -29,7 +29,7 @@ struct pakfire_packagelist;
 #include <pakfire/package.h>
 #include <pakfire/pakfire.h>
 
-int pakfire_packagelist_create(struct pakfire_packagelist** list, struct pakfire_ctx* ctx);
+int pakfire_packagelist_create(struct pakfire_packagelist** list, pakfire_ctx* ctx);
 struct pakfire_packagelist* pakfire_packagelist_ref(struct pakfire_packagelist* list);
 struct pakfire_packagelist* pakfire_packagelist_unref(struct pakfire_packagelist* list);
 
@@ -40,7 +40,7 @@ int pakfire_packagelist_add(struct pakfire_packagelist* list, struct pakfire_pac
 int pakfire_packagelist_add_list(struct pakfire_packagelist* self, struct pakfire_packagelist* other);
 
 typedef int (*pakfire_packagelist_walk_callback)
-       (struct pakfire_ctx* ctx, struct pakfire_package* pkg, void* p);
+       (pakfire_ctx* ctx, struct pakfire_package* pkg, void* p);
 
 enum pakfire_packagelist_walk_flags {
        PAKFIRE_PACKAGELIST_KEEPGOING = (1 << 0),
index 5e9270bad333f16c461be9e8b854cd7463bfc6b7..122688071c1e295bb28d2d992c6721a57137c839 100644 (file)
@@ -46,7 +46,7 @@
 #include <pakfire/util.h>
 
 struct pakfire_packager {
-       struct pakfire_ctx* ctx;
+       pakfire_ctx* ctx;
        struct pakfire* pakfire;
        int nrefs;
 
@@ -537,7 +537,7 @@ ERROR:
 }
 
 static int __pakfire_packager_add_files(
-               struct pakfire_ctx* ctx, struct pakfire_file* file, void* data) {
+               pakfire_ctx* ctx, struct pakfire_file* file, void* data) {
        struct pakfire_packager* packager = data;
 
        return pakfire_packager_add_file(packager, file);
index 4c50ce50d3e2b3f3f60ba4c4929f636b1ebdccf7..57f32cdff1080c496faaf6d77dc115973477c243 100644 (file)
@@ -66,7 +66,7 @@
 #include <pakfire/util.h>
 
 struct pakfire {
-       struct pakfire_ctx* ctx;
+       pakfire_ctx* ctx;
        int nrefs;
 
        char path[PATH_MAX];
@@ -972,7 +972,7 @@ ERROR:
        return r;
 }
 
-int pakfire_create(struct pakfire** pakfire, struct pakfire_ctx* ctx,
+int pakfire_create(struct pakfire** pakfire, pakfire_ctx* ctx,
                struct pakfire_config* config, const char* path, const char* arch, int flags) {
        struct pakfire* p = NULL;
        int r;
@@ -1185,7 +1185,7 @@ struct pakfire* pakfire_unref(struct pakfire* pakfire) {
        return NULL;
 }
 
-struct pakfire_ctx* pakfire_get_ctx(struct pakfire* pakfire) {
+pakfire_ctx* pakfire_get_ctx(struct pakfire* pakfire) {
        return pakfire_ctx_ref(pakfire->ctx);
 }
 
@@ -1601,7 +1601,7 @@ int pakfire_whatprovides(struct pakfire* pakfire, const char* what, int flags,
        return 0;
 }
 
-static int __pakfire_whatrequires(struct pakfire_ctx* ctx, struct pakfire_package* pkg, void* data) {
+static int __pakfire_whatrequires(pakfire_ctx* ctx, struct pakfire_package* pkg, void* data) {
        struct pakfire_packagelist* reverse = NULL;
        struct pakfire_packagelist* list = data;
        int r;
index cc1a8848fc488744693f534e6e074f5458be8de8..3e2c062e907ecfccf83976d8f45c9c92347c2237 100644 (file)
@@ -57,7 +57,7 @@ enum pakfire_flags {
 typedef void (*pakfire_status_callback)(struct pakfire* pakfire, void* data,
        int progress, const char* status);
 
-int pakfire_create(struct pakfire** pakfire, struct pakfire_ctx* ctx,
+int pakfire_create(struct pakfire** pakfire, pakfire_ctx* ctx,
        struct pakfire_config* config, const char* path, const char* arch, int flags);
 
 struct pakfire* pakfire_ref(struct pakfire* pakfire);
@@ -97,7 +97,7 @@ int pakfire_check(struct pakfire* pakfire, struct pakfire_filelist* errors);
 // Snapshots
 int pakfire_update_snapshot(struct pakfire* pakfire);
 
-struct pakfire_ctx* pakfire_get_ctx(struct pakfire* pakfire);
+pakfire_ctx* pakfire_get_ctx(struct pakfire* pakfire);
 
 const char* pakfire_get_effective_arch(struct pakfire* pakfire);
 
index 0e415590915e9df2a260155647b999c39ff698bc..a99d06c030c6ed1930e345eea1ae076ba03cde10 100644 (file)
@@ -52,7 +52,7 @@ static struct pakfire_parser_regexes {
 } regexes = {};
 
 struct pakfire_parser {
-       struct pakfire_ctx* ctx;
+       pakfire_ctx* ctx;
        struct pakfire* pakfire;
        int nrefs;
 
index 0fb2cf522926cb725e43703530cc5b44ae7937c3..b51bbc199a28343ef5ee66b839f0e0a9ff160ad1 100644 (file)
@@ -22,7 +22,7 @@
 
 %parse-param
        {yyscan_t* scanner}
-       {struct pakfire_ctx* ctx}
+       {pakfire_ctx* ctx}
        {struct pakfire* pakfire}
        {struct pakfire_parser** parser}
        {struct pakfire_parser* parent}
@@ -77,7 +77,7 @@ enum operator {
        OP_EQUALS = 0,
 };
 
-static void yyerror(yyscan_t* scanner, struct pakfire_ctx* ctx, struct pakfire* pakfire,
+static void yyerror(yyscan_t* scanner, pakfire_ctx* ctx, struct pakfire* pakfire,
                struct pakfire_parser** parser, struct pakfire_parser* parent,
                struct pakfire_parser_error** error, const char* s) {
        const struct pakfire_parser_state* state = yyget_extra(scanner);
@@ -93,7 +93,7 @@ static void yyerror(yyscan_t* scanner, struct pakfire_ctx* ctx, struct pakfire*
        }
 }
 
-static struct pakfire_parser* make_if_stmt(struct pakfire_ctx* ctx, const enum operator op,
+static struct pakfire_parser* make_if_stmt(pakfire_ctx* ctx, const enum operator op,
                const char* val1, const char* val2, struct pakfire_parser* if_block, struct pakfire_parser* else_block);
 
 static int pakfire_parser_new_declaration(
@@ -424,7 +424,7 @@ int pakfire_parser_parse_data(struct pakfire_parser* parent, const char* data, s
        };
 
        // Fetch context
-       struct pakfire_ctx* ctx = pakfire_get_ctx(pakfire);
+       pakfire_ctx* ctx = pakfire_get_ctx(pakfire);
 
 #ifdef ENABLE_DEBUG
        DEBUG(ctx, "Parsing the following data (%zu):\n%.*s\n", len, (int)len, data);
@@ -491,7 +491,7 @@ ERROR:
        return r;
 }
 
-static struct pakfire_parser* make_if_stmt(struct pakfire_ctx* ctx, const enum operator op,
+static struct pakfire_parser* make_if_stmt(pakfire_ctx* ctx, const enum operator op,
                const char* val1, const char* val2, struct pakfire_parser* if_block, struct pakfire_parser* else_block) {
        switch (op) {
                case OP_EQUALS:
index 39551ec96f1e5a1cd21da1fd7af2a4ec63814706..9cbdc70a27b08cbaf8440734e7f0e3c8227bc224 100644 (file)
@@ -33,7 +33,7 @@
 #include <pakfire/util.h>
 
 struct pakfire_problem {
-       struct pakfire_ctx* ctx;
+       pakfire_ctx* ctx;
        struct pakfire* pakfire;
        int nrefs;
 
index ff9c6e5af06f4da119136c2c0e5dd7d1807fe9c4..c545136b4ed8c5c2fe0d378ca6529cdd89f9d511 100644 (file)
@@ -28,7 +28,7 @@
 #include <pakfire/string.h>
 
 struct pakfire_progress {
-       struct pakfire_ctx* ctx;
+       pakfire_ctx* ctx;
        int nrefs;
 
        // Title
@@ -89,7 +89,7 @@ static void pakfire_progress_free(struct pakfire_progress* p) {
        free(p);
 }
 
-static int pakfire_progress_default_start_callback(struct pakfire_ctx* ctx,
+static int pakfire_progress_default_start_callback(pakfire_ctx* ctx,
                struct pakfire_progress* p, void* data, unsigned long int value) {
        // Fetch the title
        const char* title = pakfire_progress_get_title(p);
@@ -102,7 +102,7 @@ static int pakfire_progress_default_start_callback(struct pakfire_ctx* ctx,
 }
 
 int pakfire_progress_create(struct pakfire_progress** progress,
-               struct pakfire_ctx* ctx, int flags, struct pakfire_progress* parent) {
+               pakfire_ctx* ctx, int flags, struct pakfire_progress* parent) {
        struct pakfire_progress* p = NULL;
        int r;
 
index ebee0f3c75d604060d614d656d6d3fd635db1add..edf3afa331c2921506376ea7ecb894622b3058ca 100644 (file)
@@ -43,15 +43,15 @@ int pakfire_progress_has_flag(struct pakfire_progress* p, int flag);
        Callbacks
 */
 typedef int (*pakfire_progress_start_callback)
-       (struct pakfire_ctx* ctx, struct pakfire_progress* progress, void* data, unsigned long int value);
+       (pakfire_ctx* ctx, struct pakfire_progress* progress, void* data, unsigned long int value);
 typedef int (*pakfire_progress_finish_callback)
-       (struct pakfire_ctx* ctx, struct pakfire_progress* progress, void* data);
+       (pakfire_ctx* ctx, struct pakfire_progress* progress, void* data);
 typedef int (*pakfire_progress_update_callback)
-       (struct pakfire_ctx* ctx, struct pakfire_progress* progress, void* data, unsigned long int value);
+       (pakfire_ctx* ctx, struct pakfire_progress* progress, void* data, unsigned long int value);
 typedef int (*pakfire_progress_status_callback)
-       (struct pakfire_ctx* ctx, struct pakfire_progress* progress, void* data, const char* status);
+       (pakfire_ctx* ctx, struct pakfire_progress* progress, void* data, const char* status);
 typedef void (*pakfire_progress_free_callback)
-       (struct pakfire_ctx* ctx, struct pakfire_progress* progress, void* data);
+       (pakfire_ctx* ctx, struct pakfire_progress* progress, void* data);
 
 void pakfire_progress_set_callback_data(struct pakfire_progress* p, void* data);
 
@@ -75,7 +75,7 @@ time_t pakfire_progress_get_eta(struct pakfire_progress* p);
 double pakfire_progress_get_transfer_speed(struct pakfire_progress* p);
 
 int pakfire_progress_create(struct pakfire_progress** progress,
-       struct pakfire_ctx* ctx, int flags, struct pakfire_progress* parent);
+       pakfire_ctx* ctx, int flags, struct pakfire_progress* parent);
 
 struct pakfire_progress* pakfire_progress_ref(struct pakfire_progress* p);
 struct pakfire_progress* pakfire_progress_unref(struct pakfire_progress* p);
index 7f49f874c3c48a9505ad2909a48c4c681f53a1ed..351372c2b4a7946f2ecd3107467fec920e9fbc07 100644 (file)
@@ -63,7 +63,7 @@ struct pakfire_pty_stdio {
 };
 
 struct pakfire_pty {
-       struct pakfire_ctx* ctx;
+       pakfire_ctx* ctx;
        int nrefs;
 
        // Event Loop
@@ -1040,7 +1040,7 @@ static void pakfire_pty_free(struct pakfire_pty* pty) {
        free(pty);
 }
 
-int pakfire_pty_create(struct pakfire_pty** pty, struct pakfire_ctx* ctx, sd_event* loop) {
+int pakfire_pty_create(struct pakfire_pty** pty, pakfire_ctx* ctx, sd_event* loop) {
        struct pakfire_pty* p = NULL;
        int r;
 
index 6abde7368b2cd335d4e269ffefe82d14b018489b..c4653f2aeace0fe7383b7a64f9bfe4d0c5131f75 100644 (file)
@@ -30,7 +30,7 @@
 
 struct pakfire_pty;
 
-int pakfire_pty_create(struct pakfire_pty** pty, struct pakfire_ctx* ctx, sd_event* loop);
+int pakfire_pty_create(struct pakfire_pty** pty, pakfire_ctx* ctx, sd_event* loop);
 
 struct pakfire_pty* pakfire_pty_ref(struct pakfire_pty* pty);
 struct pakfire_pty* pakfire_pty_unref(struct pakfire_pty* pty);
index 65afbcf5e83eedb2e952f3f9be4c2050b260beff..18526e21c972ba4f9983de34abe5bff3e75b1235 100644 (file)
@@ -179,7 +179,7 @@ static int pakfire_getsubid(struct pakfire* pakfire, const char* owner,
        int count;
        int r = -1;
 
-       struct pakfire_ctx* ctx = pakfire_get_ctx(pakfire);
+       pakfire_ctx* ctx = pakfire_get_ctx(pakfire);
 
        r = subid_init(PACKAGE_NAME, stderr);
        if (r) {
@@ -227,7 +227,7 @@ static int pakfire_fgetsubid(struct pakfire* pakfire, struct pakfire_subid* subi
        size_t length = 0;
        char* p = NULL;
 
-       struct pakfire_ctx* ctx = pakfire_get_ctx(pakfire);
+       pakfire_ctx* ctx = pakfire_get_ctx(pakfire);
 
        // Read the next line
        while (1) {
@@ -308,7 +308,7 @@ static int pakfire_getsubid(struct pakfire* pakfire, const char* path, const cha
        if (!owner)
                return 1;
 
-       struct pakfire_ctx* ctx = pakfire_get_ctx(pakfire);
+       pakfire_ctx* ctx = pakfire_get_ctx(pakfire);
 
        DEBUG(ctx, "Fetching SUBID from %s for %s\n", path, owner);
 
index 3acaf3280e047d46d539fe76efbf05d4dd729a9e..955d37d092e6dd3ab01066bfd0faa5bc13831a83 100644 (file)
@@ -124,7 +124,7 @@ struct pakfire_repo_appdata {
 };
 
 struct pakfire_repo {
-       struct pakfire_ctx* ctx;
+       pakfire_ctx* ctx;
        struct pakfire* pakfire;
        int nrefs;
 
@@ -777,7 +777,7 @@ ERROR:
        return r;
 }
 
-static int pakfire_repo_sync_remove(struct pakfire_ctx* ctx, struct pakfire_package* pkg, void* data) {
+static int pakfire_repo_sync_remove(pakfire_ctx* ctx, struct pakfire_package* pkg, void* data) {
        int r;
 
        // Check if the package is available
@@ -2567,7 +2567,7 @@ int pakfire_repo_compose(struct pakfire* pakfire, const char* path,
        }
 
        // Fetch context
-       struct pakfire_ctx* ctx = pakfire_get_ctx(pakfire);
+       pakfire_ctx* ctx = pakfire_get_ctx(pakfire);
 
        // XXX Check if the key is a secret key
 
@@ -2665,7 +2665,7 @@ ERROR:
 }
 
 int pakfire_repo_walk_packages(struct pakfire_repo* self,
-               int (*callback)(struct pakfire_ctx* ctx, struct pakfire_package* pkg, void* data), void* data, int flags) {
+               int (*callback)(pakfire_ctx* ctx, struct pakfire_package* pkg, void* data), void* data, int flags) {
        struct pakfire_packagelist* list = NULL;
        int r;
 
@@ -2692,7 +2692,7 @@ struct pakfire_repo_walk_archives_state {
 };
 
 static int __pakfire_repo_walk_archives(
-               struct pakfire_ctx* ctx, struct pakfire_package* pkg, void* data) {
+               pakfire_ctx* ctx, struct pakfire_package* pkg, void* data) {
        const struct pakfire_repo_walk_archives_state* state = data;
        struct pakfire_archive* archive = NULL;
        int r;
index 3c703f63f7d852cbd7e4d2b30ae39d8fa3d4b0f7..d6eb5cfde7b7694221a2c81093ac6125de4e9c08 100644 (file)
@@ -149,10 +149,10 @@ Repodata* pakfire_repo_get_repodata(struct pakfire_repo* repo);
 struct pakfire_mirrorlist* pakfire_repo_get_mirrorlist(struct pakfire_repo* repo);
 
 int pakfire_repo_walk_packages(struct pakfire_repo* self,
-       int (*callback)(struct pakfire_ctx* ctx, struct pakfire_package* pkg, void* data), void* data, int flags);
+       int (*callback)(pakfire_ctx* ctx, struct pakfire_package* pkg, void* data), void* data, int flags);
 
 typedef int (*pakfire_repo_walk_archives_callback)
-       (struct pakfire_ctx* ctx, struct pakfire_package* pkg, struct pakfire_archive* archive, void* data);
+       (pakfire_ctx* ctx, struct pakfire_package* pkg, struct pakfire_archive* archive, void* data);
 
 int pakfire_repo_walk_archives(struct pakfire_repo* self,
        pakfire_repo_walk_archives_callback callback, void* data, int flags);
index a29707e6a4463733fd7add24566e2e168f44abc9..eae5e7ac09295e1932e68a6622c8d01d84b0ee06 100644 (file)
@@ -47,7 +47,7 @@ const char* pakfire_scriptlet_types[] = {
 };
 
 struct pakfire_scriptlet {
-       struct pakfire_ctx* ctx;
+       pakfire_ctx* ctx;
        int nrefs;
 
        // Type
@@ -96,7 +96,7 @@ static void pakfire_scriptlet_free(struct pakfire_scriptlet* scriptlet) {
 }
 
 int pakfire_scriptlet_create(struct pakfire_scriptlet** scriptlet,
-               struct pakfire_ctx* ctx, const char* type, const char* data, size_t size) {
+               pakfire_ctx* ctx, const char* type, const char* data, size_t size) {
        int r;
 
        // Check inputs
index 94396b1f6f166d2dc91ccdc6f43de80c8226e488..146fa96fc47fd5f99ba1d55c70c9205db143afaa 100644 (file)
@@ -29,7 +29,7 @@ extern const char* pakfire_scriptlet_types[13];
 struct pakfire_scriptlet;
 
 int pakfire_scriptlet_create(struct pakfire_scriptlet** scriptlet,
-       struct pakfire_ctx* ctx, const char* type, const char* data, size_t size);
+       pakfire_ctx* ctx, const char* type, const char* data, size_t size);
 struct pakfire_scriptlet* pakfire_scriptlet_ref(struct pakfire_scriptlet* scriptlet);
 struct pakfire_scriptlet* pakfire_scriptlet_unref(struct pakfire_scriptlet* scriptlet);
 
index 69568e287eeefa3879efe1174e7f666f0c474c7f..609399333c86b50d112df746c3b82a52092e47b9 100644 (file)
@@ -41,7 +41,7 @@
 #define PAKFIRE_SNAPSHOT_MAX_AGE 86400 // 24 hrs
 
 struct pakfire_snapshot {
-       struct pakfire_ctx* ctx;
+       pakfire_ctx* ctx;
        int nrefs;
 
        // Path
@@ -78,7 +78,7 @@ static void pakfire_snapshot_free(struct pakfire_snapshot* self) {
 }
 
 int pakfire_snapshot_create(
-               struct pakfire_snapshot** snapshot, struct pakfire_ctx* ctx, const char* path) {
+               struct pakfire_snapshot** snapshot, pakfire_ctx* ctx, const char* path) {
        struct pakfire_snapshot* self = NULL;
        int r;
 
@@ -206,7 +206,7 @@ int pakfire_snapshot_find(struct pakfire_snapshot** snapshot, struct pakfire* pa
        int fd = -EBADF;
        int r;
 
-       struct pakfire_ctx* ctx = pakfire_get_ctx(pakfire);
+       pakfire_ctx* ctx = pakfire_get_ctx(pakfire);
 
        // Make the path
        r = pakfire_cache_path(pakfire, path, "%s", "snapshots");
@@ -523,7 +523,7 @@ int pakfire_snapshot_make(struct pakfire_snapshot** snapshot, struct pakfire* pa
                NULL,
        };
 
-       struct pakfire_ctx* ctx = pakfire_get_ctx(pakfire);
+       pakfire_ctx* ctx = pakfire_get_ctx(pakfire);
 
        // Fetch the configuration
        config = pakfire_get_config(pakfire);
@@ -609,7 +609,7 @@ int pakfire_snapshot_clean(struct pakfire* pakfire) {
        FTS* f = NULL;
        int r;
 
-       struct pakfire_ctx* ctx = pakfire_get_ctx(pakfire);
+       pakfire_ctx* ctx = pakfire_get_ctx(pakfire);
 
        DEBUG(ctx, "Cleaning up snapshots...\n");
 
index f4b0ef197dc0f0ccf94075e4eb11989576e78a57..fdce2b761d8ed0a256f0140154a157ec5f4649f1 100644 (file)
@@ -27,7 +27,7 @@
 struct pakfire_snapshot;
 
 int pakfire_snapshot_create(
-       struct pakfire_snapshot** snapshot, struct pakfire_ctx* ctx, const char* path);
+       struct pakfire_snapshot** snapshot, pakfire_ctx* ctx, const char* path);
 
 struct pakfire_snapshot* pakfire_snapshot_ref(struct pakfire_snapshot* self);
 struct pakfire_snapshot* pakfire_snapshot_unref(struct pakfire_snapshot* self);
index 4c62742e2c5128185e8d8f01c94616218a825dee..51d9ac264a5e7de2276db96c04167183363448f8 100644 (file)
@@ -37,7 +37,7 @@
 #include <pakfire/util.h>
 
 struct pakfire_stripper {
-       struct pakfire_ctx* ctx;
+       pakfire_ctx* ctx;
        int nrefs;
 
        // Pakfire
@@ -162,7 +162,7 @@ struct pakfire_stripper* pakfire_stripper_unref(struct pakfire_stripper* self) {
 }
 
 static int pakfire_stripper_find_elf(
-               struct pakfire_ctx* ctx, struct pakfire_file* file, void* data) {
+               pakfire_ctx* ctx, struct pakfire_file* file, void* data) {
        struct pakfire_stripper* self = data;
        int r;
 
@@ -210,7 +210,7 @@ ERROR:
 }
 
 static int pakfire_stripper_collect_sources(
-               struct pakfire_ctx* ctx, struct pakfire_elf* elf, const char* filename, void* data) {
+               pakfire_ctx* ctx, struct pakfire_elf* elf, const char* filename, void* data) {
        struct pakfire_stripper* self = data;
        struct pakfire_file* file = NULL;
        int r;
@@ -241,7 +241,7 @@ ERROR:
 }
 
 static int pakfire_stripper_copy_sources(
-               struct pakfire_ctx* ctx, struct pakfire_file* file, void* data) {
+               pakfire_ctx* ctx, struct pakfire_file* file, void* data) {
        struct pakfire_stripper* self = data;
        struct stat st = {};
        char p[PATH_MAX];
@@ -520,7 +520,7 @@ ERROR:
 }
 
 static int pakfire_stripper_strip(
-               struct pakfire_ctx* ctx, struct pakfire_file* file, void* data) {
+               pakfire_ctx* ctx, struct pakfire_file* file, void* data) {
        struct pakfire_stripper* self = data;
        struct pakfire_elf* elf = NULL;
        int r;
index 7b746bb2e67b9f555ebe218a176d30e1d26548ec..ac0d5b3f92a25bf524bbc890a393edfed92440d6 100644 (file)
@@ -46,7 +46,7 @@
 #include <pakfire/util.h>
 
 struct pakfire_transaction {
-       struct pakfire_ctx* ctx;
+       pakfire_ctx* ctx;
        struct pakfire* pakfire;
        int nrefs;
 
@@ -1780,7 +1780,7 @@ static int pakfire_transaction_open_archives(
        return 0;
 }
 
-static int pakfire_usrmove_symlink(struct pakfire_ctx* ctx, struct pakfire* pakfire,
+static int pakfire_usrmove_symlink(pakfire_ctx* ctx, struct pakfire* pakfire,
                const char* src, const char* dst) {
        char link[PATH_MAX];
        char path[PATH_MAX];
@@ -1822,7 +1822,7 @@ static int pakfire_usrmove_symlink(struct pakfire_ctx* ctx, struct pakfire* pakf
        that /bin, /sbin, /lib and /lib64 are symlinks to their
        corresponding path in /usr.
 */
-static int pakfire_usrmove(struct pakfire_ctx* ctx, struct pakfire* pakfire) {
+static int pakfire_usrmove(pakfire_ctx* ctx, struct pakfire* pakfire) {
        int r;
 
        r = pakfire_usrmove_symlink(ctx, pakfire, "/bin", "usr/bin");
index db66f6982d1bab2feff5b25dd67a853f588f4c02..363c8a31dc7b73ef1aba3503e1e5951e9b1fad4e 100644 (file)
@@ -284,7 +284,7 @@ char* pakfire_mkdtemp(char* path) {
        return mkdtemp(path);
 }
 
-int pakfire_symlink(struct pakfire_ctx* ctx, const char* target, const char* linkpath) {
+int pakfire_symlink(pakfire_ctx* ctx, const char* target, const char* linkpath) {
        char path[PATH_MAX];
        int r;
 
@@ -377,7 +377,7 @@ int __pakfire_which(struct pakfire* pakfire, char* path, const size_t length,
 
 // Resource Limits
 
-int pakfire_rlimit_set(struct pakfire_ctx* ctx, int limit) {
+int pakfire_rlimit_set(pakfire_ctx* ctx, int limit) {
        struct rlimit rl;
        int r;
 
@@ -413,13 +413,13 @@ int pakfire_rlimit_set(struct pakfire_ctx* ctx, int limit) {
        Resets RLIMIT_NOFILE to FD_SETSIZE (e.g. 1024)
        for compatibility with software that uses select()
 */
-int pakfire_rlimit_reset_nofile(struct pakfire_ctx* ctx) {
+int pakfire_rlimit_reset_nofile(pakfire_ctx* ctx) {
        return pakfire_rlimit_set(ctx, FD_SETSIZE);
 }
 
 // Regex
 
-int pakfire_compile_regex(struct pakfire_ctx* ctx, pcre2_code** regex, const char* pattern) {
+int pakfire_compile_regex(pakfire_ctx* ctx, pcre2_code** regex, const char* pattern) {
        int pcre2_errno;
        size_t pcre2_offset;
        PCRE2_UCHAR errmsg[256];
@@ -448,7 +448,7 @@ int pakfire_compile_regex(struct pakfire_ctx* ctx, pcre2_code** regex, const cha
 
 // Copy
 
-int pakfire_copy(struct pakfire_ctx* ctx, FILE* src, FILE* dst) {
+int pakfire_copy(pakfire_ctx* ctx, FILE* src, FILE* dst) {
        char buffer[BUFFER_SIZE];
        size_t bytes_read;
        size_t bytes_written;
@@ -478,7 +478,7 @@ int pakfire_copy(struct pakfire_ctx* ctx, FILE* src, FILE* dst) {
        return 0;
 }
 
-int pakfire_fd_set_non_blocking(struct pakfire_ctx* ctx, int fd) {
+int pakfire_fd_set_non_blocking(pakfire_ctx* ctx, int fd) {
        int flags;
        int r;
 
index 79ca2dbab4757443f2b02eff2bca6b6ad9215813..5151c7fc9021307326e86e1fd319cf2c01286de3 100644 (file)
@@ -64,7 +64,7 @@ int pakfire_mkparentdir(const char* path, mode_t mode);
 int pakfire_mkdir(const char* path, mode_t mode);
 FILE* pakfire_mktemp(char* path, const mode_t mode);
 char* pakfire_mkdtemp(char* path);
-int pakfire_symlink(struct pakfire_ctx* ctx, const char* target, const char* linkpath);
+int pakfire_symlink(pakfire_ctx* ctx, const char* target, const char* linkpath);
 int pakfire_rmtree(const char* path, int flags);
 
 #define pakfire_which(pakfire, path, what) \
@@ -80,18 +80,18 @@ char* pakfire_generate_uuid(void);
 
 #define PAKFIRE_RLIMIT_NOFILE_MAX (512 * 1024)
 
-int pakfire_rlimit_set(struct pakfire_ctx* ctx, int limit);
-int pakfire_rlimit_reset_nofile(struct pakfire_ctx* ctx);
+int pakfire_rlimit_set(pakfire_ctx* ctx, int limit);
+int pakfire_rlimit_reset_nofile(pakfire_ctx* ctx);
 
 // Regex
 
-int pakfire_compile_regex(struct pakfire_ctx* ctx, pcre2_code** regex, const char* pattern);
+int pakfire_compile_regex(pakfire_ctx* ctx, pcre2_code** regex, const char* pattern);
 
 // Copy
-int pakfire_copy(struct pakfire_ctx* ctx, FILE* src, FILE* dst);
+int pakfire_copy(pakfire_ctx* ctx, FILE* src, FILE* dst);
 
 // File Descriptors
-int pakfire_fd_set_non_blocking(struct pakfire_ctx* ctx, int fd);
+int pakfire_fd_set_non_blocking(pakfire_ctx* ctx, int fd);
 
 // Time
 
index e759070b712aa2780a78a71018b0393271ceec96..31ee39041832fd87d294205a0b2bdbfa1b247311 100644 (file)
@@ -42,7 +42,7 @@
 #include <pakfire/xfer.h>
 
 struct pakfire_xfer {
-       struct pakfire_ctx* ctx;
+       pakfire_ctx* ctx;
        int nrefs;
 
        // Reference to the progress indicator
@@ -188,7 +188,7 @@ static void pakfire_xfer_free(struct pakfire_xfer* xfer) {
 #ifdef ENABLE_DEBUG
 static int pakfire_xfer_debug_callback(CURL *handle, curl_infotype type,
                char* data, size_t size, void* private) {
-       struct pakfire_ctx* ctx = private;
+       pakfire_ctx* ctx = private;
 
        switch (type) {
                case CURLINFO_TEXT:
@@ -348,11 +348,11 @@ ERROR:
 }
 
 static int __pakfire_xfer_create_simple(struct pakfire_xfer** xfer,
-       struct pakfire_ctx* ctx, const char* url, ...) __attribute__((format(printf, 3, 4)));
+       pakfire_ctx* ctx, const char* url, ...) __attribute__((format(printf, 3, 4)));
 
 // A helper function to create va_list
 static int __pakfire_xfer_create_simple(
-               struct pakfire_xfer** xfer, struct pakfire_ctx* ctx, const char* url, ...) {
+               struct pakfire_xfer** xfer, pakfire_ctx* ctx, const char* url, ...) {
        va_list args;
        int r;
 
@@ -367,12 +367,12 @@ static int __pakfire_xfer_create_simple(
 }
 
 int pakfire_xfer_create_simple(
-               struct pakfire_xfer** xfer, struct pakfire_ctx* ctx, const char* url) {
+               struct pakfire_xfer** xfer, pakfire_ctx* ctx, const char* url) {
        return __pakfire_xfer_create_simple(xfer, ctx, "%s", url);
 }
 
 int pakfire_xfer_create(struct pakfire_xfer** xfer,
-               struct pakfire_ctx* ctx, const char* url, va_list args) {
+               pakfire_ctx* ctx, const char* url, va_list args) {
        struct pakfire_xfer* x = NULL;
        int r;
 
index 342c63969b50b8241067a7b32601830612082770..c659650bc0c63b3d45780e5a67f11aad71e5e9a7 100644 (file)
@@ -95,9 +95,9 @@ typedef enum pakfire_transfer_method {
 } pakfire_xfer_method_t;
 
 int pakfire_xfer_create_simple(
-       struct pakfire_xfer** xfer, struct pakfire_ctx* ctx, const char* url);
+       struct pakfire_xfer** xfer, pakfire_ctx* ctx, const char* url);
 
-int pakfire_xfer_create(struct pakfire_xfer** xfer, struct pakfire_ctx* ctx,
+int pakfire_xfer_create(struct pakfire_xfer** xfer, pakfire_ctx* ctx,
        const char* url, va_list args) __attribute__((format(printf, 3, 0)));
 
 struct pakfire_xfer* pakfire_xfer_ref(struct pakfire_xfer* xfer);
index a3f22d0a78dc5218b930b32014b821fc143558b7..e343850597ba35ba22710c59143c89e74395dea0 100644 (file)
@@ -228,7 +228,7 @@ static PyObject* Ctx_set_logger(CtxObject* self, PyObject* args) {
 
 // Confirm Callback
 
-static int Ctx_confirm_callback(struct pakfire_ctx* ctx, struct pakfire* pakfire,
+static int Ctx_confirm_callback(pakfire_ctx* ctx, struct pakfire* pakfire,
                void* data, const char* message, const char* question) {
        PyObject* callback = data;
        PyObject* ret = NULL;
@@ -280,7 +280,7 @@ static PyObject* Ctx_set_confirm_callback(CtxObject* self, PyObject* args) {
 
 // Progress Callback
 
-static int Ctx_progress_start(struct pakfire_ctx* ctx,
+static int Ctx_progress_start(pakfire_ctx* ctx,
                struct pakfire_progress* progress, void* data, unsigned long int value) {
        PyObject* ret = NULL;
        PyObject* p = data;
@@ -315,7 +315,7 @@ ERROR:
        return r;
 }
 
-static int Ctx_progress_finish(struct pakfire_ctx* ctx,
+static int Ctx_progress_finish(pakfire_ctx* ctx,
                struct pakfire_progress* progress, void* data) {
        PyObject* ret = NULL;
        PyObject* p = data;
@@ -347,7 +347,7 @@ ERROR:
        return r;
 }
 
-static int Ctx_progress_update(struct pakfire_ctx* ctx,
+static int Ctx_progress_update(pakfire_ctx* ctx,
                struct pakfire_progress* progress, void* data, unsigned long int value) {
        PyObject* ret = NULL;
        PyObject* p = data;
@@ -379,7 +379,7 @@ ERROR:
        return r;
 }
 
-static int Ctx_progress_status(struct pakfire_ctx* ctx,
+static int Ctx_progress_status(pakfire_ctx* ctx,
                struct pakfire_progress* progress, void* data, const char* text) {
        PyObject* ret = NULL;
        PyObject* p = data;
@@ -412,7 +412,7 @@ ERROR:
 }
 
 static void Ctx_progress_free(
-               struct pakfire_ctx* ctx, struct pakfire_progress* progress, void* data) {
+               pakfire_ctx* ctx, struct pakfire_progress* progress, void* data) {
        PyObject* p = data;
 
        // Acquire the GIL
@@ -426,7 +426,7 @@ static void Ctx_progress_free(
 }
 
 static int Ctx_progress_callback(
-               struct pakfire_ctx* ctx, void* data, struct pakfire_progress* progress) {
+               pakfire_ctx* ctx, void* data, struct pakfire_progress* progress) {
        PyObject* callback = data;
        PyObject* p = NULL;
        int r = -1;
index c5a0e3a885bd7fc3a9243d6d9592642b17930d5c..1e9c473f65e519bafe8f8ca39394c3c8d8e2e559 100644 (file)
@@ -27,7 +27,7 @@
 
 typedef struct {
        PyObject_HEAD
-       struct pakfire_ctx* ctx;
+       pakfire_ctx* ctx;
 
        PyObject* logger;
 
index 54226fef45ac70cb64643f8f2832134612f2dd37..8e1b606dacead6568909c5cb59ce514ca3766011 100644 (file)
@@ -539,7 +539,7 @@ struct Pakfire_execute_output {
        PyObject* stderr;
 };
 
-static int Pakfire_execute_stdout_callback(struct pakfire_ctx* ctx, void* data,
+static int Pakfire_execute_stdout_callback(pakfire_ctx* ctx, void* data,
                const enum pakfire_jail_output_stream stream, const char* line, const size_t length) {
        struct Pakfire_execute_output* output = data;
        PyObject* chunk = NULL;
index 241bd72073e5f1929fbc6fe59449c4a717a21e43..7b878b822def6390baddfbbe019ff09aa3de2831 100644 (file)
@@ -325,7 +325,7 @@ FAIL:
        return r;
 }
 
-static ssize_t callback_stdin(struct pakfire_ctx* ctx, void* data, char* buffer, size_t length) {
+static ssize_t callback_stdin(pakfire_ctx* ctx, void* data, char* buffer, size_t length) {
        int* lines = (int*)data;
        ssize_t bytes_written;
 
@@ -348,7 +348,7 @@ static ssize_t callback_stdin(struct pakfire_ctx* ctx, void* data, char* buffer,
 }
 
 // Just consume the entire line
-static int callback_stdout(struct pakfire_ctx* ctx, void* data,
+static int callback_stdout(pakfire_ctx* ctx, void* data,
                const enum pakfire_jail_output_stream stream, const char* line, size_t length) {
        return fwrite(line, 1, length, stdout);
 }
@@ -444,7 +444,7 @@ FAIL:
        return r;
 }
 
-static int __callback(struct pakfire_ctx* ctx, void* data) {
+static int __callback(pakfire_ctx* ctx, void* data) {
        int* i = data;
 
        // Log a message
index 8591af140c886b1570e03d04d3b4dd5d474d9003..c12f7f3fb223cf4000c38d64cb361c7cf2782cc8 100644 (file)
@@ -23,7 +23,7 @@
 
 #include "../testsuite.h"
 
-static int log_callback(struct pakfire_ctx* ctx,
+static int log_callback(pakfire_ctx* ctx,
                void* data, const char* line, size_t length) {
        int* lines_read = data;
 
index 99aa110379bec19256354d43b0401520e0ffc21d..e21621f6331403fee10df6fc3468ebcc07929357 100644 (file)
@@ -27,7 +27,7 @@
 
 int main(int argc, const char* argv[]) {
        struct pakfire_config* config = NULL;
-       struct pakfire_ctx* ctx = NULL;
+       pakfire_ctx* ctx = NULL;
        struct pakfire* pakfire = NULL;
        struct pakfire_parser* parser = NULL;
        struct pakfire_parser_error* error = NULL;
index f61a3a53ec808b9af0e9dc5ec7d62b5eefa842fd..f7cb59fea59b24fa39811cd68ea049c4df6830e9 100644 (file)
@@ -35,7 +35,7 @@
 struct testsuite ts;
 
 static int test_run(int i, struct test* t) {
-       struct pakfire_ctx* ctx = NULL;
+       pakfire_ctx* ctx = NULL;
        struct pakfire* p = NULL;
        int r;
 
index 648bc8c0cb6b007b5588d9ff58f7af16ca60764b..940e72bcbe289f333bfe9793f1c2fddc9f9bc55b 100644 (file)
@@ -49,7 +49,7 @@ struct test {
        struct pakfire_config* config;
 
        // Pakfire Context
-       struct pakfire_ctx* ctx;
+       pakfire_ctx* ctx;
 
        // Pakfire
        struct pakfire* pakfire;