diff options
author | 2020-05-25 12:37:13 +0200 | |
---|---|---|
committer | 2020-05-25 12:37:13 +0200 | |
commit | 53cf6891705c4b953074b5f4bc94b0d53ad9422a (patch) | |
tree | 2b2ebdba72ccd1b5c4cf86d8827defb9bf1d4b9d /qatom.c | |
parent | libq/tree: rework tree_match_atom to return a list of results (diff) | |
download | portage-utils-53cf6891705c4b953074b5f4bc94b0d53ad9422a.tar.gz portage-utils-53cf6891705c4b953074b5f4bc94b0d53ad9422a.tar.bz2 portage-utils-53cf6891705c4b953074b5f4bc94b0d53ad9422a.zip |
qatom: adjust to changed tree_match_atom interface
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
Diffstat (limited to 'qatom.c')
-rw-r--r-- | qatom.c | 16 |
1 files changed, 11 insertions, 5 deletions
@@ -122,12 +122,18 @@ int qatom_main(int argc, char **argv) break; case _LOOKUP: { - tree_pkg_ctx *pkg = tree_match_atom(tree, atom); + tree_match_ctx *pkg = tree_match_atom(tree, atom, + TREE_MATCH_DEFAULT); if (pkg != NULL) { - atomc = tree_get_atom(pkg, true); - if (!quiet) - printf("%s: ", atom_to_string(atom)); - printf("%s\n", atom_format(format, atomc)); + tree_match_ctx *w; + + for (w = pkg; w != NULL; w = w->next) { + if (!quiet) + printf("%s: ", atom_to_string(atom)); + printf("%s\n", atom_format(format, w->atom)); + } + + tree_match_close(pkg); } } } |