forked from ariadne/pkgconf
libpkgconf: PKG_PROPF namespace becomes PKGCONF_PKG_PROPF.
parent
dd86ba43dd
commit
ec5cc3f068
|
@ -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 <libpkgconf/config.h>
|
||||
#include <libpkgconf/stdinc.h>
|
||||
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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. */
|
||||
|
|
6
main.c
6
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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue