aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'qatom.c')
-rw-r--r--qatom.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/qatom.c b/qatom.c
index 1c1c50ed..a076c49b 100644
--- a/qatom.c
+++ b/qatom.c
@@ -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);
}
}
}