cosmetics: print number of problems in examples
authorMichael Schroeder <mls@suse.de>
Thu, 6 Dec 2012 18:43:56 +0000 (19:43 +0100)
committerMichael Schroeder <mls@suse.de>
Thu, 6 Dec 2012 18:43:56 +0000 (19:43 +0100)
examples/pysolv
examples/rbsolv
examples/solv.c

index b6b58ec..d7fc9bd 100755 (executable)
@@ -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()
index d9b05c6..b91bbae 100755 (executable)
@@ -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
index 8ee8fe8..3d690f1 100644 (file)
@@ -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);