From 47e0794d2d6bc11e5c891e42411506ee9162eaa5 Mon Sep 17 00:00:00 2001 From: Michael Schroeder Date: Thu, 6 Dec 2012 19:43:56 +0100 Subject: [PATCH] cosmetics: print number of problems in examples --- examples/pysolv | 2 +- examples/rbsolv | 2 +- examples/solv.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/pysolv b/examples/pysolv index b6b58ecb..d7fc9bde 100755 --- a/examples/pysolv +++ b/examples/pysolv @@ -762,7 +762,7 @@ while True: if not problems: break for problem in problems: - print "Problem %d:" % problem.id + print "Problem %d/%d:" % (problem.id, len(problems)) r = problem.findproblemrule() ri = r.info() print ri.problemstr() diff --git a/examples/rbsolv b/examples/rbsolv index d9b05c6d..b91bbaec 100755 --- a/examples/rbsolv +++ b/examples/rbsolv @@ -638,7 +638,7 @@ while true problems = solver.solve(jobs) break if problems.empty? for problem in problems - puts "Problem #{problem.id}:" + puts "Problem #{problem.id}/#{problems.count}:" puts problem.findproblemrule.info.problemstr solutions = problem.solutions for solution in solutions diff --git a/examples/solv.c b/examples/solv.c index 8ee8fe85..3d690f14 100644 --- a/examples/solv.c +++ b/examples/solv.c @@ -2834,7 +2834,7 @@ rerunsolver: for (problem = 1; problem <= pcnt; problem++) { int take = 0; - printf("Problem %d:\n", problem); + printf("Problem %d/%d:\n", problem, pcnt); solver_printprobleminfo(solv, problem); printf("\n"); scnt = solver_solution_count(solv, problem); -- 2.47.2