diff options
author | 2021-08-16 15:21:57 +0200 | |
---|---|---|
committer | 2021-08-16 15:21:57 +0200 | |
commit | 18c65792094cb90b6876940b86a35e21e3da488c (patch) | |
tree | 6a56f3e46ce05fc8e42727a68c91cdaada44c3c3 /quse.c | |
parent | TODO: update qmerge items (diff) | |
download | portage-utils-18c65792094cb90b6876940b86a35e21e3da488c.tar.gz portage-utils-18c65792094cb90b6876940b86a35e21e3da488c.tar.bz2 portage-utils-18c65792094cb90b6876940b86a35e21e3da488c.zip |
libq/atom: introduce atom_compare_flg
atom_compare_flg allows to give match behaviour flags, such that often
used exceptions can now be handled without having to modify the input
atoms.
atom_compare is now a macro calling atom_compare_flg with
flags=ATOM_COMP_DEFAULT.
Updated all callers that can use this feature.
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
Diffstat (limited to 'quse.c')
-rw-r--r-- | quse.c | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -1,5 +1,5 @@ /* - * Copyright 2005-2020 Gentoo Foundation + * Copyright 2005-2021 Gentoo Foundation * Distributed under the terms of the GNU General Public License v2 * * Copyright 2005-2010 Ned Ludd - <solar@gentoo.org> @@ -140,11 +140,9 @@ quse_search_use_local_desc(int portdirfd, struct quse_state *state) if ((atom = atom_explode(buf)) == NULL) continue; - atom->REPO = (char *)state->repo; - if (state->match != NULL) - atom->SLOT = state->match->SLOT; /* fake match */ if (state->match == NULL || - atom_compare(atom, state->match) == EQUAL) + atom_compare_flg(atom, state->match, + ATOM_COMP_NOSLOT | ATOM_COMP_NOREPO) == EQUAL) { if (state->do_list) { state->retv[i] = xstrdup(q); |