diff options
author | DongHun Kwak <dh0128.kwak@samsung.com> | 2016-10-27 14:57:58 +0900 |
---|---|---|
committer | DongHun Kwak <dh0128.kwak@samsung.com> | 2016-10-27 14:57:58 +0900 |
commit | 8fcc0d8e03716077d1f2c2ca79fc622880a32196 (patch) | |
tree | 863163a13f269150c07ed7e9f0dfd289524e4140 /examples | |
parent | bc8d0a48b41d6cc4d79f1c062dda7ed230841644 (diff) | |
download | libsolv-8fcc0d8e03716077d1f2c2ca79fc622880a32196.tar.gz libsolv-8fcc0d8e03716077d1f2c2ca79fc622880a32196.tar.bz2 libsolv-8fcc0d8e03716077d1f2c2ca79fc622880a32196.zip |
Imported Upstream version 0.6.22upstream/0.6.22
Change-Id: Icb5f02bbb5483b043599397906113d6e6662ce3b
Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
Diffstat (limited to 'examples')
-rw-r--r-- | examples/solv/solv.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/examples/solv/solv.c b/examples/solv/solv.c index e12a686..814f7e1 100644 --- a/examples/solv/solv.c +++ b/examples/solv/solv.c @@ -767,7 +767,17 @@ rerunsolver: acnt = solver_alternatives_count(solv); if (acnt) { - printf("Have %d alternatives\n\n", acnt); + if (acnt == 1) + printf("Have one alternative:\n"); + else + printf("Have %d alternatives:\n", acnt); + for (i = 1; i <= acnt; i++) + { + Id id, from; + int atype = solver_get_alternative(solv, i, &id, &from, 0, 0, 0); + printf(" - %s\n", solver_alternative2str(solv, atype, id, from)); + } + printf("\n"); answer = yesno("OK to continue (y/n/a)? ", 'a'); } else |