temporarily make isl_val_int_from_isl_int available
[platform/upstream/isl.git] / polyhedron_minimize.c
index 16ab138..bb9dabe 100644 (file)
@@ -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 <assert.h>
-#include "isl_set.h"
-#include "isl_vec.h"
-#include "isl_ilp.h"
-#include "isl_seq.h"
+#include <isl/set.h>
+#include <isl/vec.h>
+#include <isl/ilp.h>
+#include <isl/seq.h>
 
 /* 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);