xbps-bin: add new action "repo-list".
--HG-- extra : convert_revision : e0d5fce9503c6544e8ceec56864560b170c0e8c8
This commit is contained in:
parent
045e10c94e
commit
db0484ae6e
3 changed files with 74 additions and 8 deletions
|
@ -230,3 +230,24 @@ xbps_list_pkgs_in_dict(prop_dictionary_t dict, const char *key)
|
|||
|
||||
prop_object_iterator_release(iter);
|
||||
}
|
||||
|
||||
void
|
||||
xbps_list_strings_in_array(prop_array_t array)
|
||||
{
|
||||
prop_object_iterator_t iter;
|
||||
prop_object_t obj;
|
||||
|
||||
if (array == NULL)
|
||||
return;
|
||||
|
||||
iter = prop_array_iterator(array);
|
||||
if (iter == NULL)
|
||||
return;
|
||||
|
||||
while ((obj = prop_object_iterator_next(iter))) {
|
||||
if (prop_object_type(obj) == PROP_TYPE_STRING)
|
||||
printf("%s\n", prop_string_cstring_nocopy(obj));
|
||||
}
|
||||
|
||||
prop_object_iterator_release(iter);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue