From: Michael Schroeder Date: Thu, 6 Dec 2012 18:43:56 +0000 (+0100) Subject: cosmetics: print number of problems in examples X-Git-Tag: BASE-SuSE-Code-12_3-Branch~124 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=47e0794d2d6bc11e5c891e42411506ee9162eaa5;p=thirdparty%2Flibsolv.git cosmetics: print number of problems in examples --- 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);