From ec5cc3f068721786e3f2d3455f7a49c0eb09354b Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Sun, 6 Sep 2015 11:37:20 -0500 Subject: [PATCH] libpkgconf: PKG_PROPF namespace becomes PKGCONF_PKG_PROPF. --- libpkgconf/libpkgconf.h | 20 ++++++++++---------- libpkgconf/pkg.c | 16 ++++++++-------- libpkgconf/queue.c | 4 ++-- main.c | 6 +++--- 4 files changed, 23 insertions(+), 23 deletions(-) diff --git a/libpkgconf/libpkgconf.h b/libpkgconf/libpkgconf.h index bdeac8f..1c6be94 100644 --- a/libpkgconf/libpkgconf.h +++ b/libpkgconf/libpkgconf.h @@ -1,8 +1,8 @@ /* - * pkg.h - * Global include file for everything. + * libpkgconf.h + * Global include file for everything in libpkgconf. * - * Copyright (c) 2011 pkgconf authors (see AUTHORS). + * Copyright (c) 2011, 2015 pkgconf authors (see AUTHORS). * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -13,8 +13,8 @@ * from the use of this software. */ -#ifndef __PKG_H -#define __PKG_H +#ifndef LIBPKGCONF__LIBPKGCONF_H +#define LIBPKGCONF__LIBPKGCONF_H #include #include @@ -72,11 +72,11 @@ struct pkgconf_tuple_ { char *value; }; -#define PKG_PROPF_NONE 0x0 -#define PKG_PROPF_VIRTUAL 0x1 -#define PKG_PROPF_CACHED 0x2 -#define PKG_PROPF_SEEN 0x4 -#define PKG_PROPF_UNINSTALLED 0x8 +#define PKGCONF_PKG_PROPF_NONE 0x0 +#define PKGCONF_PKG_PROPF_VIRTUAL 0x1 +#define PKGCONF_PKG_PROPF_CACHED 0x2 +#define PKGCONF_PKG_PROPF_SEEN 0x4 +#define PKGCONF_PKG_PROPF_UNINSTALLED 0x8 struct pkgconf_pkg_ { pkgconf_node_t cache_iter; diff --git a/libpkgconf/pkg.c b/libpkgconf/pkg.c index f4191c0..32b8234 100644 --- a/libpkgconf/pkg.c +++ b/libpkgconf/pkg.c @@ -258,7 +258,7 @@ pkgconf_pkg_new_from_file(const char *filename, FILE *f, unsigned int flags) void pkgconf_pkg_free(pkgconf_pkg_t *pkg) { - if (pkg == NULL || pkg->flags & PKG_PROPF_VIRTUAL) + if (pkg == NULL || pkg->flags & PKGCONF_PKG_PROPF_VIRTUAL) return; pkgconf_cache_remove(pkg); @@ -327,7 +327,7 @@ pkgconf_pkg_try_specific_path(const char *path, const char *name, unsigned int f if (!(flags & PKGF_NO_UNINSTALLED) && (f = fopen(uninst_locbuf, "r")) != NULL) { pkg = pkgconf_pkg_new_from_file(uninst_locbuf, f, flags); - pkg->flags |= PKG_PROPF_UNINSTALLED; + pkg->flags |= PKGCONF_PKG_PROPF_UNINSTALLED; } else if ((f = fopen(locbuf, "r")) != NULL) pkg = pkgconf_pkg_new_from_file(locbuf, f, flags); @@ -456,7 +456,7 @@ pkgconf_pkg_find(const char *name, unsigned int flags) { if ((pkg = pkgconf_cache_lookup(name)) != NULL) { - pkg->flags |= PKG_PROPF_CACHED; + pkg->flags |= PKGCONF_PKG_PROPF_CACHED; return pkg; } } @@ -611,7 +611,7 @@ static pkgconf_pkg_t pkg_config_virtual = { .description = "virtual package defining pkg-config API version supported", .url = PACKAGE_BUGREPORT, .version = PACKAGE_VERSION, - .flags = PKG_PROPF_VIRTUAL, + .flags = PKGCONF_PKG_PROPF_VIRTUAL, .vars = { .head = &(pkgconf_node_t){ .prev = NULL, @@ -857,15 +857,15 @@ pkgconf_pkg_walk_list(pkgconf_pkg_t *parent, if (pkgdep == NULL) continue; - if (pkgdep->flags & PKG_PROPF_SEEN) + if (pkgdep->flags & PKGCONF_PKG_PROPF_SEEN) { pkgconf_pkg_unref(pkgdep); continue; } - pkgdep->flags |= PKG_PROPF_SEEN; + pkgdep->flags |= PKGCONF_PKG_PROPF_SEEN; eflags |= pkgconf_pkg_traverse(pkgdep, func, data, depth - 1, flags); - pkgdep->flags &= ~PKG_PROPF_SEEN; + pkgdep->flags &= ~PKGCONF_PKG_PROPF_SEEN; pkgconf_pkg_unref(pkgdep); } @@ -932,7 +932,7 @@ pkgconf_pkg_traverse(pkgconf_pkg_t *root, if (maxdepth == 0) return eflags; - if ((root->flags & PKG_PROPF_VIRTUAL) != PKG_PROPF_VIRTUAL || (flags & PKGF_SKIP_ROOT_VIRTUAL) != PKGF_SKIP_ROOT_VIRTUAL) + if ((root->flags & PKGCONF_PKG_PROPF_VIRTUAL) != PKGCONF_PKG_PROPF_VIRTUAL || (flags & PKGF_SKIP_ROOT_VIRTUAL) != PKGF_SKIP_ROOT_VIRTUAL) { if (func != NULL) func(root, data, flags); diff --git a/libpkgconf/queue.c b/libpkgconf/queue.c index 1356d9a..53e0122 100644 --- a/libpkgconf/queue.c +++ b/libpkgconf/queue.c @@ -74,7 +74,7 @@ pkgconf_queue_apply(pkgconf_list_t *list, pkgconf_queue_apply_func_t func, int m pkgconf_pkg_t world = { .id = "world", .realname = "virtual world package", - .flags = PKG_PROPF_VIRTUAL, + .flags = PKGCONF_PKG_PROPF_VIRTUAL, }; /* if maxdepth is one, then we will not traverse deeper than our virtual package. */ @@ -102,7 +102,7 @@ pkgconf_queue_validate(pkgconf_list_t *list, int maxdepth, unsigned int flags) pkgconf_pkg_t world = { .id = "world", .realname = "virtual world package", - .flags = PKG_PROPF_VIRTUAL, + .flags = PKGCONF_PKG_PROPF_VIRTUAL, }; /* if maxdepth is one, then we will not traverse deeper than our virtual package. */ diff --git a/main.c b/main.c index 498885c..4292bf7 100644 --- a/main.c +++ b/main.c @@ -109,7 +109,7 @@ print_fragment(pkgconf_fragment_t *frag) static void print_list_entry(const pkgconf_pkg_t *entry) { - if (entry->flags & PKG_PROPF_UNINSTALLED) + if (entry->flags & PKGCONF_PKG_PROPF_UNINSTALLED) return; printf("%-30s %s - %s\n", entry->id, entry->realname, entry->description); @@ -118,7 +118,7 @@ print_list_entry(const pkgconf_pkg_t *entry) static void print_package_entry(const pkgconf_pkg_t *entry) { - if (entry->flags & PKG_PROPF_UNINSTALLED) + if (entry->flags & PKGCONF_PKG_PROPF_UNINSTALLED) return; printf("%s\n", entry->id); @@ -435,7 +435,7 @@ check_uninstalled(pkgconf_pkg_t *pkg, void *data, unsigned int flags) int *retval = data; (void) flags; - if (pkg->flags & PKG_PROPF_UNINSTALLED) + if (pkg->flags & PKGCONF_PKG_PROPF_UNINSTALLED) *retval = EXIT_SUCCESS; }