X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=polyhedron_minimize.c;h=bb9dabe19e50318e9f4ace407d45391b3e6e1cb1;hb=7bc3560a92635b5dcf7eb9e7329992fc935a1ce2;hp=16ab138320f1a7356d8d99942b0876548175c55d;hpb=309036cf4fb6d77a3287a8de8a9098c0a1211778;p=platform%2Fupstream%2Fisl.git diff --git a/polyhedron_minimize.c b/polyhedron_minimize.c index 16ab138..bb9dabe 100644 --- a/polyhedron_minimize.c +++ b/polyhedron_minimize.c @@ -1,17 +1,17 @@ /* * Copyright 2008-2009 Katholieke Universiteit Leuven * - * Use of this software is governed by the GNU LGPLv2.1 license + * Use of this software is governed by the MIT license * * Written by Sven Verdoolaege, K.U.Leuven, Departement * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium */ #include -#include "isl_set.h" -#include "isl_vec.h" -#include "isl_ilp.h" -#include "isl_seq.h" +#include +#include +#include +#include /* The input of this program is the same as that of the "polytope_minimize" * program from the barvinok distribution. @@ -62,11 +62,12 @@ int main(int argc, char **argv) isl_int opt; unsigned dim; enum isl_lp_result res; + isl_printer *p; isl_int_init(opt); - bset = isl_basic_set_read_from_file(ctx, stdin, 0, ISL_FORMAT_POLYLIB); + bset = isl_basic_set_read_from_file(ctx, stdin); assert(bset); - obj = isl_vec_read_from_file(ctx, stdin, ISL_FORMAT_POLYLIB); + obj = isl_vec_read_from_file(ctx, stdin); assert(obj); dim = isl_basic_set_total_dim(bset); assert(obj->size >= dim && obj->size <= dim + 1); @@ -86,9 +87,12 @@ int main(int argc, char **argv) fprintf(stdout, "unbounded\n"); break; case isl_lp_ok: - isl_vec_dump(sol, stdout, 0); - isl_int_print(stdout, opt, 0); - fprintf(stdout, "\n"); + p = isl_printer_to_file(ctx, stdout); + p = isl_printer_print_vec(p, sol); + p = isl_printer_end_line(p); + p = isl_printer_print_isl_int(p, opt); + p = isl_printer_end_line(p); + isl_printer_free(p); } isl_basic_set_free(bset); isl_vec_free(obj);