From: Michael Schroeder Date: Wed, 21 Dec 2022 13:18:16 +0000 (+0100) Subject: Use solver_problem2str() convenience function in the demo solver X-Git-Tag: 0.7.24~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=86c54ea5c7fa585e56eb6fcb52328a468334c98c;p=thirdparty%2Flibsolv.git Use solver_problem2str() convenience function in the demo solver --- diff --git a/examples/solv/solv.c b/examples/solv/solv.c index f7c0468b..22395306 100644 --- a/examples/solv/solv.c +++ b/examples/solv/solv.c @@ -788,16 +788,7 @@ rerunsolver: for (problem = 1; problem <= pcnt; problem++) { int take = 0; - Id rid; - printf("Problem %d/%d:\n", problem, pcnt); - rid = solver_findproblemrule(solv, problem); - if (rid) - { - Id source, target, dep; - SolverRuleinfo type = solver_ruleinfo(solv, rid, &source, &target, &dep); - printf("%s\n", solver_problemruleinfo2str(solv, type, source, target, dep)); - } - printf("\n"); + printf("Problem %d/%d:\n%s\n\n", problem, pcnt, solver_problem2str(solv, problem)); scnt = solver_solution_count(solv, problem); for (solution = 1; solution <= scnt; solution++) {